Index: itignore
===================================================================
--- .gitignore	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,1 +1,0 @@
-/render/
Index: BOOK/Makefile
===================================================================
--- BOOK/Makefile	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/Makefile	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,221 +1,127 @@
-TOP		:= $(PWD)
-RENDERDIR	:= $(TOP)/../render
+BASEDIR		:= ~/cross-lfs-book
+DUMPDIR		:= ~/cross-lfs-commands
+DLLISTDIR	:= ~/cross-lfs-dllist
+CHUNK_QUIET	:= 1
+XSLROOTDIR	:= /usr/share/xml/docbook/xsl-stylesheets-1.69.1
 
-VALIDATEDIR	:= $(RENDERDIR)/validate
-PROFILEDIR	:= $(RENDERDIR)/profile
+S		:= -
 
-HTMLDIR		:= $(RENDERDIR)/html
-NOCHUNKDIR	:= $(RENDERDIR)/nochunk
+ARCHS		:= arm
 
-FODIR		:= $(RENDERDIR)/fo
-PDFDIR		:= $(RENDERDIR)/pdf
+ARCHS_HTML	:= $(ARCHS:%=%$(S)html)
+ARCHS_NOCHUNKS	:= $(ARCHS:%=%$(S)nochunks)
+ARCHS_PDF	:= $(ARCHS:%=%$(S)pdf)
+ARCHS_TEXT	:= $(ARCHS:%=%$(S)text)
+ARCHS_VALIDATE	:= $(ARCHS:%=%$(S)validate)
+ARCHS_TROUBLE	:= $(ARCHS:%=%$(S)trouble)
+ARCHS_DUMP	:= $(ARCHS:%=%$(S)dump)
+ARCHS_DLLIST	:= $(ARCHS:%=%$(S)dllist)
 
-TROUBLEDIR	:= $(RENDERDIR)/trouble
-DUMPDIR		:= $(RENDERDIR)/commands
-DLLISTDIR	:= $(RENDERDIR)/download-list
+lfs: render tidy
 
-CHUNK_QUIET	:= 1
-ROOT_ID		:=
+tidy:
+	@echo Running tidy on the created HTML
+	@for filename in `find $(BASEDIR) -name "*.html"`; do \
+	  tidy -config tidy.conf $$filename; \
+	  true; \
+	  sh obfuscate.sh $$filename; \
+	  sed -i -e "s@text/html@application/xhtml+xml@g" $$filename; \
+	done;
 
-ARCHS		:= alpha arm hppa x86
+render: $(ARCHS_HTML) titlepage
 
-ifdef V
-  Q =
-else
-  Q = @
-endif
+titlepage:
+	@xsltproc --nonet --output $(BASEDIR)/index.html $(PWD)/stylesheets/top-index.xsl $(PWD)/index.xml
 
-.PHONY: clfs lfs
-clfs lfs: html
+$(ARCHS_HTML): override html_arch = $(@:%$(S)html=%)
+$(ARCHS_HTML):
+	@echo "Rendering HTML of $(html_arch)..."
+	@xsltproc --xinclude --nonet -stringparam profile.condition html -stringparam chunk.quietly $(CHUNK_QUIET) -stringparam base.dir $(BASEDIR)/$(html_arch)/ $(PWD)/stylesheets/lfs-chunked.xsl $(PWD)/$(html_arch)-index.xml
+	@mkdir -p $(BASEDIR)/$(html_arch)/stylesheets
+	@cp $(PWD)/stylesheets/*.css $(BASEDIR)/$(html_arch)/stylesheets
+	@sed -i -e "s@../stylesheets@stylesheets@g" $(BASEDIR)/$(html_arch)/*.html
+	@mkdir -p $(BASEDIR)/$(html_arch)/images
+	@cp $(XSLROOTDIR)/images/*.png $(BASEDIR)/$(html_arch)/images
+	@sed -i -e "s@../images@images@g" $(BASEDIR)/$(html_arch)/*.html
 
-.PHONY: tidy tidy-f tidy-d
-ifeq ($(shell which tidy >/dev/null 2>&1 && echo yes),yes)
-tidy:
-	@$(MAKE) --no-print-directory tidy-d TIDY_DIR=$(HTMLDIR)
+nochunks: $(ARCHS_NOCHUNKS) tidy
 
-tidy-f:
-	@echo "Running tidy on F:$(shell basename $(TIDY_FILE))"
-	@$(TOP)/tidy.sh "$(TIDY_FILE)"
+$(ARCHS_NOCHUNKS): override nochunk_arch = $(@:%$(S)nochunks=%)
+$(ARCHS_NOCHUNKS):
+	@echo "Rendering Single File HTML of $(nochunk_arch)..."
+	@xsltproc --xinclude --nonet -stringparam profile.condition html --output $(BASEDIR)/CLFS-BOOK-$(nochunk_arch).html $(PWD)/stylesheets/lfs-nochunks.xsl $(nochunk_arch)-index.xml
 
-tidy-d:
-	@echo "Running tidy on D:$(shell basename $(TIDY_DIR))"
-	@$(TOP)/tidy.sh "$(TIDY_DIR)"
-else
-tidy tidy-f tidy-d:
-	@echo "Tidy is not installed on this system"
-endif
+pdf: $(ARCHS_PDF)
 
-.PHONY: titlepage
-titlepage:
-	@echo "Rendering the top-level index..."
-	$(Q)xsltproc --nonet --output $(HTMLDIR)/index.html \
-	  $(PWD)/stylesheets/top-index.xsl \
-	  $(PWD)/index.xml
-	@$(MAKE) --no-print-directory tidy-f TIDY_FILE=$(HTMLDIR)/index.html
+$(ARCHS_PDF): override pdf_arch =  $(@:%$(S)pdf=%)
+$(ARCHS_PDF):
+	@echo "Rendering PDF of $(pdf_arch)..."
+	@xsltproc --xinclude --nonet --output $(BASEDIR)/clfs-$(pdf_arch)-pdf.fo $(PWD)/stylesheets/lfs-pdf.xsl $(pdf_arch)-index.xml
+	@sed -i -e "s/inherit/all/" $(BASEDIR)/clfs-$(pdf_arch)-pdf.fo
+	@fop.sh -q -fo $(BASEDIR)/clfs-$(pdf_arch)-pdf.fo -pdf $(BASEDIR)/CLFS-BOOK-$(pdf_arch).pdf
+	@rm $(BASEDIR)/clfs-$(pdf_arch)-pdf.fo
 
-ARCHS_VD_XML := $(ARCHS:%=%-validate_dump-xml)
-.PHONY: $(ARCHS_VD_XML)
-$(ARCHS_VD_XML): override arch = $(@:%-validate_dump-xml=%)
-$(ARCHS_VD_XML):
-	@echo "Validating $(arch) book..."
-	$(Q)mkdir -p $(VALIDATEDIR)
-	$(Q)xmllint --nonet --noent --xinclude --postvalid \
-	  -o $(VALIDATEDIR)/$(arch)-full.xml \
-	  $(PWD)/$(arch)-index.xml
+text: $(ARCHS_TEXT)
 
-ARCHS_P_XML := $(ARCHS:%=%-profiled-xml)
-.PHONY: $(ARCHS_P_XML)
-$(ARCHS_P_XML): override arch = $(@:%-profiled-xml=%)
-$(ARCHS_P_XML):
-	@$(MAKE) --no-print-directory $(arch)-validate_dump-xml
-	@echo "Generating profiled $(arch) book..."
-	$(Q)mkdir -p $(PROFILEDIR)
-	$(Q)xsltproc --nonet --stringparam profile.condition html \
-	  --output $(PROFILEDIR)/$(arch)-html.xml \
-	  $(PWD)/stylesheets/lfs-xsl/profile.xsl \
-	  $(VALIDATEDIR)/$(arch)-full.xml
+$(ARCHS_TEXT): override text_arch =  $(@:%$(S)text=%)
+$(ARCHS_TEXT):
+	@echo "Rendering Text of $(text_arch)..."
+	@xsltproc --xinclude --nonet --output $(BASEDIR)/clfs-$(text_arch)-text.fo $(PWD)/stylesheets/lfs-pdf.xsl $(text_arch)-index.xml
+	@sed -i -e "s/inherit/all/" $(BASEDIR)/clfs-$(text_arch)-text.fo ; \
+	@fop.sh -q -fo $(BASEDIR)/clfs-$(text_arch)-text.fo -txt $(BASEDIR)/CLFS-BOOK-$(text_arch).txt ; \
+	@rm $(BASEDIR)/clfs-$(text_arch)-text.fo
 
-ARCHS_HTML := $(ARCHS:%=%-html)
-.PHONY: html render $(ARCHS_HTML)
-html render: $(ARCHS_HTML) titlepage
-$(ARCHS_HTML): override arch = $(@:%-html=%)
-$(ARCHS_HTML):
-	@$(MAKE) --no-print-directory $(arch)-profiled-xml
+validate: $(ARCHS_VALIDATE)
 
-	@echo "Rendering chunked XHTML of $(arch)..."
-	$(Q)mkdir -p $(HTMLDIR)/$(arch)
-	$(Q)xsltproc --nonet -stringparam chunk.quietly $(CHUNK_QUIET) \
-	  -stringparam rootid "$(ROOT_ID)" \
-	  -stringparam base.dir $(HTMLDIR)/$(arch)/ \
-	  $(PWD)/stylesheets/clfs-chunked.xsl \
-	  $(PROFILEDIR)/$(arch)-html.xml
+$(ARCHS_VALIDATE): override validate_arch =  $(@:%$(S)validate=%)
+$(ARCHS_VALIDATE):
+	@echo "Validating $(validate_arch)..."
+	@xmllint --xinclude --noout --nonet --postvalid $(PWD)/$(validate_arch)-index.xml
 
-	@echo "Copying CSS code and images for $(arch)..."
-	$(Q)mkdir -p $(HTMLDIR)/$(arch)/stylesheets
-	$(Q)cp $(PWD)/stylesheets/lfs-xsl/*.css $(HTMLDIR)/$(arch)/stylesheets
-	$(Q)sed -i -e "s@../stylesheets@stylesheets@g" $(HTMLDIR)/$(arch)/*.html
-	$(Q)mkdir -p $(HTMLDIR)/$(arch)/images
-	$(Q)cp $(PWD)/images/*.png $(HTMLDIR)/$(arch)/images
-	$(Q)sed -i -e "s@../images@images@g" $(HTMLDIR)/$(arch)/*.html
+trouble: $(ARCHS_TROUBLE)
 
-	@$(MAKE) --no-print-directory tidy-d TIDY_DIR=$(HTMLDIR)/$(arch)
+$(ARCHS_TROUBLE): override trouble_arch =  $(@:%$(S)trouble=%)
+$(ARCHS_TROUBLE):
+	@echo "Troubleshooting $(trouble_arch)..."
+	@xmllint --xinclude --nonet --postvalid $(PWD)/$(trouble_arch)-index.xml > /tmp/dump-$(trouble_arch)
+	@xmllint --xinclude --noout --nonet --valid /tmp/dump-$(trouble_arch)
+	@echo "You can now look at /tmp/dump-$(trouble_arch) to see the errors"
 
-ARCHS_NOCHUNKS := $(ARCHS:%=%-nochunks)
-.PHONY: nochunks $(ARCHS_NOCHUNKS)
-nochunks: $(ARCHS_NOCHUNKS)
-$(ARCHS_NOCHUNKS): override arch = $(@:%-nochunks=%)
-$(ARCHS_NOCHUNKS):
-	@$(MAKE) --no-print-directory $(arch)-profiled-xml
+dump-commands: $(ARCHS_DUMP)
 
-	@echo "Rendering Single File HTML of $(arch)..."
-	$(Q)mkdir -p $(NOCHUNKDIR)
-	$(Q)xsltproc --nonet -stringparam rootid "$(ROOT_ID)" \
-	  --output $(NOCHUNKDIR)/CLFS-$(arch).html \
-	  $(PWD)/stylesheets/clfs-nochunks.xsl \
-	  $(PROFILEDIR)/$(arch)-html.xml
+$(ARCHS_DUMP): override dump_arch =  $(@:%$(S)dump=%)
+$(ARCHS_DUMP):
+	@echo "Extracting commands from $(dump_arch)..."
+	@xsltproc --xinclude --nonet --output $(DUMPDIR)/$(dump_arch)/ $(PWD)/stylesheets/dump-commands.xsl $(dump_arch)-index.xml
 
-	@$(MAKE) --no-print-directory tidy-f TIDY_FILE=$(NOCHUNKDIR)/CLFS-$(arch).html
+download-list: $(ARCHS_DLLIST)
 
-ARCHS_FO := $(ARCHS:%=%-fo)
-.PHONY: fo $(ARCHS_FO)
-fo: $(ARCHS_FO)
-$(ARCHS_FO): override arch = $(@:%-fo=%)
-$(ARCHS_FO):
-	@$(MAKE) --no-print-directory $(arch)-profiled-xml
+$(ARCHS_DLLIST): override dllist_arch = $(@:%$(S)dllist=%)
+$(ARCHS_DLLIST):
+	@echo "Creating download list for $(dllist_arch)..."
+	@xsltproc --xinclude --nonet --output $(DLLISTDIR)/$(dllist_arch).dl.list $(PWD)/stylesheets/wget.xsl $(dllist_arch)-index.xml
 
-	@echo "Generating FO file of $(arch)..."
-	@mkdir -p $(FODIR)
-	$(Q)xsltproc --nonet -stringparam rootid "$(ROOT_ID)" \
-	  --output $(FODIR)/$(arch).fo \
-	  $(PWD)/stylesheets/clfs-pdf.xsl \
-	  $(PROFILEDIR)/$(arch)-html.xml
-	$(Q)sed -i -e 's/span="inherit"/span="all"/' $(FODIR)/$(arch).fo
-
-ARCHS_PDF := $(ARCHS:%=%-pdf)
-.PHONY: pdf $(ARCHS_PDF)
-pdf: $(ARCHS_PDF)
-$(ARCHS_PDF): override arch = $(@:%-pdf=%)
-$(ARCHS_PDF):
-	@$(MAKE) --no-print-directory $(arch)-fo
-
-	@echo "Rendering PDF of $(arch)..."
-	$(Q)mkdir -p $(PDFDIR)
-	$(Q)fop $(FODIR)/$(arch).fo $(PDFDIR)/CLFS-$(arch).pdf
-
-ARCHS_VALIDATE := $(ARCHS:%=%-validate)
-.PHONY: validate $(ARCHS_VALIDATE)
-validate: $(ARCHS_VALIDATE)
-$(ARCHS_VALIDATE): override arch =  $(@:%-validate=%)
-$(ARCHS_VALIDATE):
-	@echo "Validating $(arch)..."
-	$(Q)xmllint --xinclude --noout \
-	  --nonet --postvalid \
-	  $(PWD)/$(arch)-index.xml
-
-ARCHS_TROUBLE := $(ARCHS:%=%-trouble)
-.PHONY: trouble $(ARCHS_TROUBLE)
-trouble: $(ARCHS_TROUBLE)
-$(ARCHS_TROUBLE): override arch = $(@:%-trouble=%)
-$(ARCHS_TROUBLE):
-	@echo "Troubleshooting $(arch)..."
-	@mkdir -p $(TROUBLEDIR)
-	$(Q)xmllint --xinclude --nonet --postvalid \
-	  -o $(TROUBLEDIR)/dump-$(arch) \
-	  $(PWD)/$(arch)-index.xml
-	$(Q)xmllint --xinclude --noout --nonet --valid \
-	  $(TROUBLEDIR)/dump-$(arch)
-	@echo "You can now look at $(TROUBLEDIR)/dump-$(arch) to see the errors"
-
-ARCHS_DUMP := $(ARCHS:%=%-dump)
-.PHONY: dump-commands $(ARCHS_DUMP)
-dump-commands: $(ARCHS_DUMP)
-$(ARCHS_DUMP): override arch = $(@:%-dump=%)
-$(ARCHS_DUMP):
-	@echo "Extracting commands from $(arch)..."
-	$(Q)mkdir -p $(DUMPDIR)/$(arch)
-	$(Q)xsltproc --xinclude --nonet \
-	  --output $(DUMPDIR)/$(arch)/ \
-	  $(PWD)/stylesheets/dump-commands.xsl \
-	  $(PWD)/$(arch)-index.xml
-
-ARCHS_DLLIST := $(ARCHS:%=%-dllist)
-.PHONY: download-list $(ARCHS_DLLIST)
-download-list: $(ARCHS_DLLIST)
-$(ARCHS_DLLIST): override arch = $(@:%-dllist=%)
-$(ARCHS_DLLIST):
-	@echo "Creating download list for $(arch)..."
-	$(Q)mkdir -p $(DLLISTDIR)
-	$(Q)xsltproc --xinclude --nonet \
-	  --output $(DLLISTDIR)/$(arch).list \
-	  $(PWD)/stylesheets/wget.xsl \
-	  $(PWD)/$(arch)-index.xml
-
-FG_GREEN := $(shell echo -e '\e[0;32m')
-FG_BLUE := $(shell echo -e '\e[0;34m')
-FG_DEFAULT := $(shell echo -e '\e[0;0m')
 help:
-	@echo "Output: $(RENDERDIR)"
-	@echo
 	@echo "HTML Targets"
-	@echo "  $(FG_GREEN)clfs lfs tidy html render titlepage $(FG_BLUE)$(ARCHS_HTML)$(FG_DEFAULT)"
+	@echo -e "  \e[0;32mlfs tidy render titlepage \e[0;34m$(ARCHS_HTML)\e[0;0m"
 	@echo
 	@echo "NoChunks Targets"
-	@echo "  $(FG_GREEN)nochunks tidy $(FG_BLUE)$(ARCHS_NOCHUNKS)$(FG_DEFAULT)"
-	@echo
-	@echo "FO Targets"
-	@echo "  $(FG_GREEN)fo $(FG_BLUE)$(ARCHS_FO)$(FG_DEFAULT)"
+	@echo -e "  \e[0;32mnochunks tidy \e[0;34m$(ARCHS_NOCHUNKS)\e[0;0m"
 	@echo
 	@echo "PDF Targets"
-	@echo "  $(FG_GREEN)pdf $(FG_BLUE)$(ARCHS_PDF)$(FG_DEFAULT)"
+	@echo -e "  \e[0;32mpdf \e[0;34m$(ARCHS_PDF)\e[0;0m"
+	@echo
+	@echo "Text Targets"
+	@echo -e "  \e[0;32mtext \e[0;34m$(ARCHS_TEXT)\e[0;0m"
 	@echo
 	@echo "Validate Targets"
-	@echo "  $(FG_GREEN)validate $(FG_BLUE)$(ARCHS_VALIDATE)$(FG_DEFAULT)"
+	@echo -e "  \e[0;32mvalidate \e[0;34m$(ARCHS_VALIDATE)\e[0;0m"
 	@echo
 	@echo "Trouble Targets"
-	@echo "  $(FG_GREEN)trouble $(FG_BLUE)$(ARCHS_TROUBLE)$(FG_DEFAULT)"
+	@echo -e "  \e[0;32mtrouble \e[0;34m$(ARCHS_TROUBLE)\e[0;0m"
 	@echo
 	@echo "Dump-Commands Targets"
-	@echo "  $(FG_GREEN)dump-commands $(FG_BLUE)$(ARCHS_DUMP)$(FG_DEFAULT)"
+	@echo -e "  \e[0;32mtdump-commands \e[0;34m$(ARCHS_DUMP)\e[0;0m"
 	@echo
 	@echo "Download-List Targets"
-	@echo "  $(FG_GREEN)download-list $(FG_BLUE)$(ARCHS_DLLIST)$(FG_DEFAULT)"
+	@echo -e "  \e[0;32mdownload-list \e[0;34m$(ARCHS_DLLIST)\e[0;0m"
Index: OK/alpha-index.xml
===================================================================
--- BOOK/alpha-index.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,72 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "general.ent">
-  %general-entities;
-]>
-
-<book>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="prologue/alpha/bookinfo.xml"/>
-  <!--
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="prologue/dedication.xml"/>
-  -->
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="prologue/preface.xml"/>
-
-  <part id="part1">
-    <?dbhtml filename="part1.html"?>
-
-    <title>Introduction</title>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="introduction/alpha-chapter.xml"/>
-
-  </part>
-
-  <part id="part2">
-    <?dbhtml filename="part2.html"?>
-
-    <title>Preparing for the Build</title>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="partitioning/alpha-chapter.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="materials/alpha-chapter.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="final-preps/chapter.xml"/>
-
-  </part>
-
-  <part id="part3">
-    <?dbhtml filename="part3.html"?>
-
-    <title>Make the Cross-Compile Tools</title>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="cross-tools/alpha-chapter.xml"/>
-
-  </part>
-
-  <part id="part4">
-    <?dbhtml filename="part4.html"?>
-
-    <title>Building the CLFS System</title>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="final-system/alpha-chapter.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bootscripts/alpha-chapter.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="network/alpha-chapter.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bootable/alpha-chapter.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="the-end/chapter.xml"/>
-
-  </part>
-
-  <part id="part5">
-    <?dbhtml filename="part5.html"?>
-
-    <title>Appendices</title>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="appendices/acronymlist.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="appendices/dependencies/common.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="appendices/dependencies/alpha.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="appendices/license.xml"/>
-
-  </part>
-
-  <index/>
-
-</book>
Index: BOOK/appendices/acknowledgments.xml
===================================================================
--- BOOK/appendices/acknowledgments.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/appendices/acknowledgments.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../general.ent">
   %general-entities;
Index: BOOK/appendices/acronymlist.xml
===================================================================
--- BOOK/appendices/acronymlist.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/appendices/acronymlist.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../general.ent">
   %general-entities;
@@ -122,4 +122,11 @@
 
     <varlistentry>
+      <term><emphasis role="bold">CVS</emphasis></term>
+      <listitem>
+        <para>Concurrent Versions System</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
       <term><emphasis role="bold">DHCP</emphasis></term>
       <listitem>
@@ -241,4 +248,11 @@
 
     <varlistentry>
+      <term><emphasis role="bold">GPG</emphasis></term>
+      <listitem>
+        <para>GNU Privacy Guard</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
       <term><emphasis role="bold">HTML</emphasis></term>
       <listitem>
@@ -416,4 +430,11 @@
 
     <varlistentry>
+      <term><emphasis role="bold">PLFS</emphasis></term>
+      <listitem>
+        <para>Pure Linux From Scratch</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
       <term><emphasis role="bold">PTY</emphasis></term>
       <listitem>
Index: OK/appendices/dependencies/alpha.xml
===================================================================
--- BOOK/appendices/dependencies/alpha.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,16 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<appendix id="appendixc-alpha" xreflabel="Appendix C">
-  <?dbhtml dir="appendixc"?>
-  <?dbhtml filename="alpha-dependencies.html"?>
-
-  <title>Alpha Dependencies</title>
-
-  <para>This page contains dependency information for packages specific to Alpha.</para>
-
-</appendix>
Index: BOOK/appendices/dependencies/arm.xml
===================================================================
--- BOOK/appendices/dependencies/arm.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/appendices/dependencies/arm.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
Index: BOOK/appendices/dependencies/common.xml
===================================================================
--- BOOK/appendices/dependencies/common.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/appendices/dependencies/common.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -12,10 +12,10 @@
   <title>Dependencies</title>
 
-  <para>Every package built in CLFS relies on one or more other packages
+  <para>Every package built in LFS relies on one or more other packages
   in order to build and install properly. Some packages even participate
   in circular dependencies, that is, the first package depends on the second
   which in turn depends on the first. Because of these dependencies, the
-  order in which packages are built in CLFS is very important. The purpose
-  of this page is to document the dependencies of each package built in CLFS.</para>
+  order in which packages are built in LFS is very important. The purpose
+  of this page is to document the dependencies of each package built in LFS.</para>
 
   <para>For each package we build, we have listed three types of dependencies.
@@ -38,13 +38,13 @@
 
         <seglistitem>
-          <seg>Bash, Coreutils, Gawk, Grep, M4, Make, Perl, Sed and Texinfo</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&testsuites;</segtitle>
-
-        <seglistitem>
-          <seg>Automake, Binutils, Diffutils, Findutils, GCC and Libtool</seg>
+          <seg>Bash, Coreutils, Grep, M4, Make, Perl, Sed and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>Automake, Diffutils, Findutils, GCC and Libtool</seg>
         </seglistitem>
       </segmentedlist>
@@ -65,5 +65,5 @@
 
         <seglistitem>
-          <seg>Autoconf, Bash, Binutils, Coreutils, Gawk, Grep, M4, Make, Perl,
+          <seg>Autoconf, Bash, Coreutils, Gettext, Grep, M4, Make, Perl,
           Sed and Texinfo</seg>
         </seglistitem>
@@ -74,7 +74,7 @@
 
         <seglistitem>
-          <seg>Bison, Bzip2, DejaGNU, Diffutils, Expect, Findutils,
-          Flex, GCC, Gettext, Gzip, Libtool, XZ-Utils and Tar. Can also use several
-          other packages that are not installed in CLFS.</seg>
+          <seg>Binutils, Bison, Bzip2, DejaGNU, Diffutils, Expect, Findutils,
+          Flex, GCC, Gettext, Gzip, Libtool and Tar. Can also use several
+          other packages that are not installed in LFS.</seg>
         </seglistitem>
       </segmentedlist>
@@ -95,14 +95,14 @@
 
         <seglistitem>
-          <seg>Bash, Bison, Coreutils, Diffutils, Gawk, EGLIBC, GCC, Grep, Make,
-          Ncurses, Patch, Readline, Sed and Texinfo</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&testsuites;</segtitle>
-
-        <seglistitem>
-          <seg>None</seg>
+          <seg>Bash, Bison, Coreutils, Diffutils, GCC, Glibc, Grep, Make,
+	  Ncurses, Patch, Readline, Sed and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>Diffutils and Gawk</seg>
         </seglistitem>
       </segmentedlist>
@@ -123,6 +123,6 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, Diffutils, File, Gawk, EGLIBC, GCC,
-         Grep, Make, Perl, Sed, Texinfo and Zlib</seg>
+         <seg>Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep,
+         Make, Perl, Sed and Texinfo</seg>
         </seglistitem>
       </segmentedlist>
@@ -151,5 +151,5 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, Gawk, EGLIBC, GCC,
+         <seg>Bash, Binutils, Coreutils, GCC, Gettext, Glibc,
          Grep, M4, Make and Sed</seg>
         </seglistitem>
@@ -160,5 +160,5 @@
 
         <seglistitem>
-          <seg>Diffutils, Findutils and Gawk</seg>
+          <seg>Diffutils and Findutils</seg>
         </seglistitem>
       </segmentedlist>
@@ -179,13 +179,13 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, EGLIBC, GCC, Make</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&testsuites;</segtitle>
-
-        <seglistitem>
-          <seg>Diffutils</seg>
+         <seg>Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Make and Patch</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
         </seglistitem>
       </segmentedlist>
@@ -233,22 +233,22 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, Gawk, EGLIBC, GCC, GMP, Grep, Make,
-         Patch, Perl, Sed and Texinfo</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&testsuites;</segtitle>
-
-        <seglistitem>
-          <seg>Diffutils, E2fsprogs, Findutils, Util-linux-ng</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&before;</segtitle>
-
-        <seglistitem>
-          <seg>Bash, Diffutils, Findutils, Man and Udev</seg>
+         <seg>Bash, Binutils, Coreutils, GCC, Gettext, Glibc, Grep, Make,
+	 Patch, Perl, Sed and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>Diffutils</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>Bash, Diffutils, Findutils, Man-DB and Udev</seg>
         </seglistitem>
       </segmentedlist>
@@ -281,31 +281,4 @@
       </segmentedlist>
 
-<!-- Begin DHCPCD dependency info -->
-  <bridgehead renderas="sect2" id="dhcpcd-dep">DHCPCD</bridgehead>
-
-      <segmentedlist>
-        <segtitle>&dependencies;</segtitle>
-
-        <seglistitem>
-         <seg>Bash, Coreutils, GCC, Make, Sed</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&testsuites;</segtitle>
-
-        <seglistitem>
-          <seg>No testsuite available</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&before;</segtitle>
-
-        <seglistitem>
-          <seg>None</seg>
-        </seglistitem>
-      </segmentedlist>
-
 <!-- Begin Diffutils dependency info -->
   <bridgehead renderas="sect2" id="diffutils-dep">Diffutils</bridgehead>
@@ -315,6 +288,6 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, EGLIBC, GCC, Grep,
-         Make, Patch, Sed and Texinfo</seg>
+         <seg>Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep,
+	 Make, Patch, Sed and Texinfo</seg>
         </seglistitem>
       </segmentedlist>
@@ -343,6 +316,6 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, Diffutils, EGLIBC, GCC, Grep, Make,
-         Patch, Sed and Tcl</seg>
+         <seg>Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Grep, Make,
+	 Patch, Sed and Tcl</seg>
         </seglistitem>
       </segmentedlist>
@@ -371,22 +344,22 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, EGLIBC, Gawk, GCC, Gettext, Grep, Gzip,
-         Make, Sed, Texinfo and Util-linux-ng</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&testsuites;</segtitle>
-
-        <seglistitem>
-          <seg>Bzip2 and Diffutils</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&before;</segtitle>
-
-        <seglistitem>
-          <seg>None</seg>
+         <seg>Bash, Binutils, Coreutils, Gawk, GCC, Gettext, Glibc, Grep, Gzip,
+	 Make, Sed and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>Diffutils</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>Util-Linux</seg>
         </seglistitem>
       </segmentedlist>
@@ -399,6 +372,6 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, Diffutils, Gawk, EGLIBC, GCC, Grep,
-         Make, Sed and Zlib</seg>
+         <seg>Bash, Binutils, Coreutils, Diffutils, Gawk, GCC, Glibc, Grep,
+	 Make, Sed and Zlib</seg>
         </seglistitem>
       </segmentedlist>
@@ -427,6 +400,6 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, EGLIBC, GCC, Grep, Make,
-         Sed and Texinfo</seg>
+         <seg>Bash, Binutils, Coreutils, GCC, Gettext, Glibc, Grep, Make,
+	 Sed and Texinfo</seg>
         </seglistitem>
       </segmentedlist>
@@ -455,22 +428,22 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, EGLIBC, GCC, Grep, M4, Make,
-         Sed and Texinfo</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&testsuites;</segtitle>
-
-        <seglistitem>
-          <seg>Bison, Diffutils and Gawk</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&before;</segtitle>
-
-        <seglistitem>
-          <seg>IPRoute2, Kbd and Man</seg>
+         <seg>Bash, Binutils, Coreutils, GCC, Gettext, Glibc, Grep, M4, Make,
+	 Patch, Sed and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>Bison and Gawk</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>IPRoute2, Kbd and Man-DB</seg>
         </seglistitem>
       </segmentedlist>
@@ -483,5 +456,6 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, EGLIBC, GCC, Grep, Make, Sed and Texinfo</seg>
+         <seg>Bash, Binutils, Coreutils, GCC, Gettext, Glibc, Grep, Make,
+	 Patch, Sed and Texinfo</seg>
         </seglistitem>
       </segmentedlist>
@@ -510,6 +484,6 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, Diffutils, EGLIBC, Findutils, Gawk,
-         GCC, GMP, Grep, Make, MPFR, Patch, Perl, Sed, Tar and Texinfo</seg>
+         <seg>Bash, Binutils, Coreutils, Diffutils, Findutils, Gawk, GCC,
+	 Gettext, Glibc, Grep, Make, Patch, Perl, Sed, Tar and Texinfo</seg>
         </seglistitem>
       </segmentedlist>
@@ -538,14 +512,14 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, Diffutils, EGLIBC, Findutils, Gawk,
-         GCC, Grep, Make, Sed and Texinfo</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&testsuites;</segtitle>
-
-        <seglistitem>
-          <seg>Tar and Tcl</seg>
+         <seg>Bash, Binutils, Coreutils, Gawk, GCC, Glibc, Grep, Make,
+	 Sed and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>Diffutils, Perl and Tcl</seg>
         </seglistitem>
       </segmentedlist>
@@ -559,6 +533,6 @@
       </segmentedlist>
 
-<!-- Begin EGLIBC dependency info -->
-  <bridgehead renderas="sect2" id="eglibc-dep">EGLIBC</bridgehead>
+<!-- Begin Glibc dependency info -->
+  <bridgehead renderas="sect2" id="glibc-dep">Glibc</bridgehead>
 
       <segmentedlist>
@@ -587,32 +561,4 @@
       </segmentedlist>
 
-<!-- Begin GMP dependency info -->
-  <bridgehead renderas="sect2" id="gmp-dep">GMP</bridgehead>
-
-      <segmentedlist>
-        <segtitle>&dependencies;</segtitle>
-
-        <seglistitem>
-         <seg>Bash, Binutils, Coreutils, Diffutils, Gawk, EGLIBC, GCC, Grep, M4, Make,
-         Sed and Texinfo</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&testsuites;</segtitle>
-
-        <seglistitem>
-          <seg>None</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&before;</segtitle>
-
-        <seglistitem>
-          <seg>MPFR, GCC</seg>
-        </seglistitem>
-      </segmentedlist>
-
 <!-- Begin Grep dependency info -->
   <bridgehead renderas="sect2" id="grep-dep">Grep</bridgehead>
@@ -622,6 +568,6 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, EGLIBC, GCC, Grep,
-         Make, Patch, Sed and Texinfo</seg>
+         <seg>Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, Make,
+	 Patch, Sed and Texinfo</seg>
         </seglistitem>
       </segmentedlist>
@@ -639,5 +585,5 @@
 
         <seglistitem>
-          <seg>Man</seg>
+          <seg>Man-DB</seg>
         </seglistitem>
       </segmentedlist>
@@ -650,6 +596,6 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, Gawk, EGLIBC, GCC, Grep, Make, Perl
-         Sed and Texinfo</seg>
+         <seg>Bash, Binutils, Bison, Coreutils,  Gawk, GCC, Glibc, Grep, Make,
+	 Patch, Sed and Texinfo</seg>
         </seglistitem>
       </segmentedlist>
@@ -678,22 +624,22 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, EGLIBC, GCC, Grep, Make,
-         Sed and Texinfo</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&testsuites;</segtitle>
-
-        <seglistitem>
-          <seg>Diffutils</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&before;</segtitle>
-
-        <seglistitem>
-          <seg>Man</seg>
+         <seg>Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Grep, Make,
+	 Patch, Sed and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>No testsuite available</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>Man-DB</seg>
         </seglistitem>
       </segmentedlist>
@@ -726,4 +672,32 @@
       </segmentedlist>
 
+<!-- Begin Inetutils dependency info -->
+  <bridgehead renderas="sect2" id="inetutils-dep">Inetutils</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, GCC, Glibc, Grep, Make, Ncurses,
+	 Patch, Sed and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>No testsuite available</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>Tar</seg>
+        </seglistitem>
+      </segmentedlist>
+
 <!-- Begin IProute2 dependency info -->
   <bridgehead renderas="sect2" id="iproute2-dep">IProute2</bridgehead>
@@ -733,33 +707,6 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Bison, Coreutils, Findutils, Flex, EGLIBC, GCC,
-         Make, Linux-Headers and Sed</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&testsuites;</segtitle>
-
-        <seglistitem>
-          <seg>No testsuite available</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&before;</segtitle>
-
-        <seglistitem>
-          <seg>None</seg>
-        </seglistitem>
-      </segmentedlist>
-
-<!-- Begin IPutils dependency info -->
-  <bridgehead renderas="sect2" id="iputils-dep">IPutils</bridgehead>
-
-      <segmentedlist>
-        <segtitle>&dependencies;</segtitle>
-
-        <seglistitem>
-         <seg>Bash, Binutils, Coreutils, EGLIBC, GCC and Make</seg>
+         <seg>Bash, Berkeley DB, Bison, Coreutils, Flex, GCC, Glibc, Make
+	 and Linux-Headers</seg>
         </seglistitem>
       </segmentedlist>
@@ -788,5 +735,6 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, Gawk, EGLIBC, GCC, Gzip, Make and Sed</seg>
+         <seg>Bash, Binutils, Bison, Coreutils, Flex, GCC, Gettext, Glibc,
+	 Gzip, Make, Patch and Sed</seg>
         </seglistitem>
       </segmentedlist>
@@ -815,6 +763,6 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, EGLIBC, GCC, Grep, Make,
-         Ncurses and Sed</seg>
+         <seg>Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Grep, Make,
+	 Ncurses and Sed</seg>
         </seglistitem>
       </segmentedlist>
@@ -843,14 +791,14 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, Diffutils, Findutils, Gawk, EGLIBC, GCC, Grep,
-         Make, Sed and Texinfo</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&testsuites;</segtitle>
-
-        <seglistitem>
-          <seg>Autoconf</seg>
+         <seg>Bash, Binutils, Coreutils, Diffutils, Gawk, GCC, Glibc, Grep,
+	 Make, Sed and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>Findutils</seg>
         </seglistitem>
       </segmentedlist>
@@ -871,5 +819,5 @@
 
         <seglistitem>
-         <seg>Binutils, Coreutils, Findutils, GCC, Grep, Make, Perl and Sed</seg>
+         <seg>Coreutils and Findutils</seg>
         </seglistitem>
       </segmentedlist>
@@ -898,6 +846,6 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, Diffutils, Findutils, EGLIBC, GCC, Grep,
-         Gzip, Make, Module-Init-Tools, Ncurses, Perl and Sed</seg>
+         <seg>Bash, Binutils, Coreutils, Diffutils, Findutils, GCC, Glibc, Grep,
+	 Gzip, Make, Module-Init-Tools, Ncurses and Sed</seg>
         </seglistitem>
       </segmentedlist>
@@ -926,6 +874,5 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, Gawk, EGLIBC, GCC, Grep, Make, Sed
-         and Texinfo</seg>
+         <seg>Bash, Binutils, Coreutils, GCC, Glibc, Grep, Make and Sed</seg>
         </seglistitem>
       </segmentedlist>
@@ -944,4 +891,32 @@
         <seglistitem>
           <seg>Autoconf and Bison</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Man dependency info -->
+  <bridgehead renderas="sect2" id="man-dep">Man-DB</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Bzip2, Coreutils, Flex, GCC, Gettext,
+	 Glibc, Grep, Groff, Gzip, Less, Make and Sed</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>No testsuite available</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
         </seglistitem>
       </segmentedlist>
@@ -954,105 +929,49 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, EGLIBC, GCC, Grep,
-         Make, Sed and Texinfo</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&testsuites;</segtitle>
-
-        <seglistitem>
-          <seg>Perl and Procps</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&before;</segtitle>
-
-        <seglistitem>
-          <seg>None</seg>
-        </seglistitem>
-      </segmentedlist>
-
-<!-- Begin Man dependency info -->
-  <bridgehead renderas="sect2" id="man-dep">Man</bridgehead>
-
-      <segmentedlist>
-        <segtitle>&dependencies;</segtitle>
-
-        <seglistitem>
-         <seg>Bash, Binutils, Bzip2, Coreutils, EGLIBC, Gawk, GCC,
-         Grep, Groff, Gzip, Less, XZ-Utils, Make and Sed</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&testsuites;</segtitle>
-
-        <seglistitem>
-          <seg>No testsuite available</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&before;</segtitle>
-
-        <seglistitem>
-          <seg>None</seg>
-        </seglistitem>
-      </segmentedlist>
-
-<!-- Begin Man-Pages dependency info -->
-  <bridgehead renderas="sect2" id="man-pages-dep">Man-Pages</bridgehead>
-
-      <segmentedlist>
-        <segtitle>&dependencies;</segtitle>
-
-        <seglistitem>
-         <seg>Bash, Coreutils, and Make</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&testsuites;</segtitle>
-
-        <seglistitem>
-          <seg>No testsuite available</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&before;</segtitle>
-
-        <seglistitem>
-          <seg>None</seg>
-        </seglistitem>
-      </segmentedlist>
-
-<!-- Begin MPFR dependency info -->
-  <bridgehead renderas="sect2" id="mpfr-dep">MPFR</bridgehead>
-
-      <segmentedlist>
-        <segtitle>&dependencies;</segtitle>
-
-        <seglistitem>
-         <seg>Bash, Binutils, Coreutils, Diffutils, Gawk, EGLIBC, GCC, Grep, GMP,
-         Make, Sed and Texinfo</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&testsuites;</segtitle>
-
-        <seglistitem>
-          <seg>None</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&before;</segtitle>
-
-        <seglistitem>
-          <seg>GCC</seg>
+         <seg>Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep,
+	 Make, Sed and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>Perl</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Mktemp dependency info -->
+  <bridgehead renderas="sect2" id="mktemp-dep">Mktemp</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, GCC, Glibc, Grep, Patch and Sed</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>No testsuite available</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
         </seglistitem>
       </segmentedlist>
@@ -1065,14 +984,13 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, Findutils, EGLIBC, GCC, Grep, Make,
-         Sed and Zlib</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&testsuites;</segtitle>
-
-        <seglistitem>
-          <seg>Diffutils, File, Gawk and Gzip</seg>
+         <seg>Bash, Binutils, Coreutils, GCC, Glibc, Grep, Make, Sed and Zlib</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>File, Findutils and Gawk</seg>
         </seglistitem>
       </segmentedlist>
@@ -1093,6 +1011,6 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, Diffutils, Gawk, EGLIBC, GCC, Grep,
-         Make and Sed</seg>
+         <seg>Bash, Binutils, Coreutils, Diffutils, Gawk, GCC, Glibc, Grep,
+	 Make and Sed</seg>
         </seglistitem>
       </segmentedlist>
@@ -1111,5 +1029,5 @@
         <seglistitem>
           <seg>Bash, GRUB, Inetutils, Less, Procps, Psmisc, Readline, Texinfo,
-          Util-linux-ng and Vim</seg>
+	  Util-Linux and Vim</seg>
         </seglistitem>
       </segmentedlist>
@@ -1122,5 +1040,5 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, EGLIBC, GCC, Grep, Make and Sed</seg>
+         <seg>Bash, Binutils, Coreutils, GCC, Glibc, Grep, Make and Sed</seg>
         </seglistitem>
       </segmentedlist>
@@ -1149,14 +1067,14 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, Gawk, EGLIBC, GCC, Grep,
-         Make and Sed</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&testsuites;</segtitle>
-
-        <seglistitem>
-          <seg>Gzip, Iana-Etc and Procps, Tar</seg>
+         <seg>Bash, Binutils, Coreutils, Gawk, GCC, Glibc, Grep,
+	 Groff, Make and Sed</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>Iana-Etc and Procps</seg>
         </seglistitem>
       </segmentedlist>
@@ -1177,5 +1095,5 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, EGLIBC, GCC, Make and Ncurses</seg>
+         <seg>Bash, Binutils, Coreutils, GCC, Glibc, Make and Ncurses</seg>
         </seglistitem>
       </segmentedlist>
@@ -1204,6 +1122,6 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, EGLIBC, GCC, Grep, Make, Ncurses
-         and Sed</seg>
+         <seg>Bash, Coreutils, GCC, Gettext, Glibc, Grep, Make, Ncurses
+	 and Sed</seg>
         </seglistitem>
       </segmentedlist>
@@ -1232,5 +1150,5 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, EGLIBC, GCC, Grep, Make, Ncurses,
+         <seg>Bash, Binutils, Coreutils, GCC, Glibc, Grep, Make, Ncurses,
          Patch, Sed and Texinfo</seg>
         </seglistitem>
@@ -1250,32 +1168,4 @@
         <seglistitem>
           <seg>Bash</seg>
-        </seglistitem>
-      </segmentedlist>
-
-<!-- Begin Rsyslog dependency info -->
-  <bridgehead renderas="sect2" id="rsyslog-dep">Rsyslog</bridgehead>
-
-      <segmentedlist>
-        <segtitle>&dependencies;</segtitle>
-
-        <seglistitem>
-         <seg>Binutils, Coreutils, Diffutils, Gawk, EGLIBC, GCC, Grep, Make
-         and Sed</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&testsuites;</segtitle>
-
-        <seglistitem>
-          <seg>No testsuite available</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&before;</segtitle>
-
-        <seglistitem>
-          <seg>None</seg>
         </seglistitem>
       </segmentedlist>
@@ -1288,6 +1178,6 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, EGLIBC, GCC, Grep, Make,
-         Sed and Texinfo</seg>
+         <seg>Bash, Binutils, Coreutils, GCC, Gettext, Glibc, Grep, Make,
+	 Sed and Texinfo</seg>
         </seglistitem>
       </segmentedlist>
@@ -1316,6 +1206,33 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, Diffutils, EGLIBC, Findutils, Gawk,
-         GCC, Gettext, Grep, Make and Sed</seg>
+         <seg>Bash, Binutils, Coreutils, Diffutils, Findutils, Gawk, GCC,
+	 Gettext, Glibc, Grep, Make and Sed</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>No testsuite available</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Sysklogd dependency info -->
+  <bridgehead renderas="sect2" id="sysklogd-dep">Sysklogd</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Binutils, Coreutils, GCC, Glibc, Make and Patch</seg>
         </seglistitem>
       </segmentedlist>
@@ -1344,5 +1261,5 @@
 
         <seglistitem>
-         <seg>Binutils, Coreutils, EGLIBC, GCC, Make and Sed</seg>
+         <seg>Binutils, Coreutils, GCC, Glibc, Make and Sed</seg>
         </seglistitem>
       </segmentedlist>
@@ -1371,14 +1288,14 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Bison, Coreutils, EGLIBC, GCC,
-         Grep, Make, Sed and Texinfo</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&testsuites;</segtitle>
-
-        <seglistitem>
-          <seg>Diffutils, Findutils, Gawk and Gzip</seg>
+         <seg>Bash, Binutils, Bison, Coreutils, GCC, Gettext, Glibc,
+	 Grep, Inetutils, Make, Patch, Sed and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>Diffutils, Findutils and Gawk</seg>
         </seglistitem>
       </segmentedlist>
@@ -1399,6 +1316,6 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, Diffutils, EGLIBC, GCC, Grep,
-         Make and Sed</seg>
+         <seg>Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Grep,
+	 Make and Sed</seg>
         </seglistitem>
       </segmentedlist>
@@ -1427,14 +1344,41 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, Gawk, EGLIBC, GCC, Grep, Make,
-         Ncurses and Sed</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&testsuites;</segtitle>
-
-        <seglistitem>
-          <seg>Diffutils and Gzip</seg>
+         <seg>Bash, Binutils, Coreutils, GCC, Gettext, Glibc, Grep, Make,
+	 Ncurses, Patch and Sed</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Tree dependency info -->
+  <bridgehead renderas="sect2" id="tree-dep">Tree</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Coreutils, GCC and Make</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
         </seglistitem>
       </segmentedlist>
@@ -1455,50 +1399,76 @@
 
         <seglistitem>
-         <seg>Binutils, Coreutils, Diffutils, Gawk, EGLIBC, GCC, Grep,
-         Make and Sed</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&testsuites;</segtitle>
-
-        <seglistitem>
-          <seg>No testsuite available</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&before;</segtitle>
-
-        <seglistitem>
-          <seg>None</seg>
-        </seglistitem>
-      </segmentedlist>
-
-<!-- Begin Util-linux-ng dependency info -->
-  <bridgehead renderas="sect2" id="util-linux-ng-dep">Util-linux-ng</bridgehead>
-
-      <segmentedlist>
-        <segtitle>&dependencies;</segtitle>
-
-        <seglistitem>
-         <seg>Bash, Binutils, Coreutils, EGLIBC, GCC, Grep,
-         Make, Ncurses, Sed, Texinfo and Zlib</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&testsuites;</segtitle>
-
-        <seglistitem>
-          <seg>No testsuite available</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&before;</segtitle>
-
-        <seglistitem>
-          <seg>E2fsprogs</seg>
+         <seg>Binutils, Coreutils, GCC, Glibc and Make</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>Findutils, Perl and Sed</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Udev Rules dependency info -->
+  <bridgehead renderas="sect2" id="udev-rules-dep">Udev Rules</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Coreutils, Make and Sed</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Util-Linux dependency info -->
+  <bridgehead renderas="sect2" id="util-linux-dep">Util-Linux</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, E2fprogs, GCC, Gettext, Glibc, Grep,
+	 Make, Ncurses, Patch, Sed and Zlib</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>No testsuite available</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
         </seglistitem>
       </segmentedlist>
@@ -1511,34 +1481,6 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, Diffutils, EGLIBC, Findutils, Gawk,
-         GCC, Gettext, Grep, Make, Ncurses, Perl and Sed</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&testsuites;</segtitle>
-
-        <seglistitem>
-          <seg>Gzip</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&before;</segtitle>
-
-        <seglistitem>
-          <seg>None</seg>
-        </seglistitem>
-      </segmentedlist>
-
-<!-- Begin XZ-Utils dependency info -->
-  <bridgehead renderas="sect2" id="xz-utils-dep">XZ-Utils</bridgehead>
-
-      <segmentedlist>
-        <segtitle>&dependencies;</segtitle>
-
-        <seglistitem>
-         <seg>Bash, Binutils, Coreutils, Diffutils, EGLIBC, Findutils, Gawk,
-         GCC, Grep, Make and Sed</seg>
+         <seg>Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Grep, Make,
+	 Ncurses and Sed</seg>
         </seglistitem>
       </segmentedlist>
@@ -1567,21 +1509,21 @@
 
         <seglistitem>
-         <seg>Bash, Binutils, Coreutils, EGLIBC, GCC, Make and Sed</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&testsuites;</segtitle>
-
-        <seglistitem>
-          <seg>None</seg>
-        </seglistitem>
-      </segmentedlist>
-
-      <segmentedlist>
-        <segtitle>&before;</segtitle>
-
-        <seglistitem>
-          <seg>File, Module-Init-Tools and Util-linux-ng</seg>
+         <seg>Bash, Binutils, Coreutils, GCC, Glibc, Grep, Make and Sed</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>File, Module-Init-Tools and Util-Linux</seg>
         </seglistitem>
       </segmentedlist>
Index: OK/appendices/dependencies/hppa.xml
===================================================================
--- BOOK/appendices/dependencies/hppa.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,16 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<appendix id="appendixc-hppa" xreflabel="Appendix C">
-  <?dbhtml dir="appendixc"?>
-  <?dbhtml filename="hppa-dependencies.html"?>
-
-  <title>PA-RISC Dependencies</title>
-
-  <para>This page contains dependency information for packages specific to PA-RISC.</para>
-
-</appendix>
Index: OK/appendices/dependencies/x86.xml
===================================================================
--- BOOK/appendices/dependencies/x86.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,16 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<appendix id="appendixc-x86" xreflabel="Appendix C">
-  <?dbhtml dir="appendixc"?>
-  <?dbhtml filename="x86-dependencies.html"?>
-
-  <title>x86 Dependencies</title>
-
-  <para>This page contains dependency information for packages specific to x86.</para>
-
-</appendix>
Index: OK/appendices/license.xml
===================================================================
--- BOOK/appendices/license.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,188 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../general.ent">
-  %general-entities;
-]>
-
-<appendix id="license" xreflabel="Open Publication License">
-  <?dbhtml dir="appendices"?>
-  <?dbhtml filename="license.html"?>
-
-  <title>Open Publication License</title>
-  <bridgehead renderas="sect3">v1.0, 8 June 1999</bridgehead>
-
-
-  <bridgehead renderas="sect2">I. REQUIREMENTS ON BOTH UNMODIFIED AND
-  MODIFIED VERSIONS</bridgehead>
-
-  <para>The Open Publication works may be reproduced and distributed in
-  whole or in part, in any medium physical or electronic, provided that
-  the terms of this license are adhered to, and that this license or an
-  incorporation of it by reference (with any options elected by the
-  author(s) and/or publisher) is displayed in the reproduction.</para>
-
-  <para>Proper form for an incorporation by reference is as follows:</para>
-
-  <blockquote>
-    <para>Copyright &copy; &lt;year&gt; by &lt;author's name or designee&gt;.
-    This material may be distributed only subject to the terms and conditions
-    set forth in the Open Publication License, vX.Y or later (the latest
-    version is presently available at <ulink
-    url="http://www.opencontent.org/openpub/"/>).</para>
-  </blockquote>
-
-  <para>The reference must be immediately followed with any options elected
-  by the author(s) and/or publisher of the document (see section VI).</para>
-
-  <para>Commercial redistribution of Open Publication-licensed material
-  is permitted.</para>
-
-  <para>Any publication in standard (paper) book form shall require the
-  citation of the original publisher and author. The publisher and
-  author's names shall appear on all outer surfaces of the book. On all
-  outer surfaces of the book the original publisher's name shall be as
-  large as the bridgehead of the work and cited as possessive with respect
-  to the bridgehead.</para>
-
-
-  <bridgehead renderas="sect2">II. COPYRIGHT</bridgehead>
-
-  <para>The copyright to each Open Publication is owned by its
-  author(s) or designee.</para>
-
-  <bridgehead renderas="sect2">III. SCOPE OF LICENSE</bridgehead>
-
-  <para>The following license terms apply to all Open Publication works,
-  unless otherwise explicitly stated in the document.</para>
-
-  <para>Mere aggregation of Open Publication works or a portion of an
-  Open Publication work with other works or programs on the same media
-  shall not cause this license to apply to those other works. The
-  aggregate work shall contain a notice specifying the inclusion of the
-  Open Publication material and appropriate copyright notice.</para>
-
-  <para>SEVERABILITY. If any part of this license is found to be
-  unenforceable in any jurisdiction, the remaining portions of the
-  license remain in force.</para>
-
-  <para>NO WARRANTY. Open Publication works are licensed and provided
-  "as is" without warranty of any kind, express or implied, including,
-  but not limited to, the implied warranties of merchantability and
-  fitness for a particular purpose or a warranty of non-infringement.</para>
-
-
-  <bridgehead renderas="sect2">IV. REQUIREMENTS ON MODIFIED WORKS</bridgehead>
-
-  <para>All modified versions of documents covered by this license,
-  including translations, anthologies, compilations and partial documents,
-  must meet the following requirements:</para>
-
-  <orderedlist>
-    <listitem>
-      <para>The modified version must be labeled as such.</para>
-    </listitem>
-    <listitem>
-      <para>The person making the modifications must be identified and
-      the modifications dated.</para>
-    </listitem>
-    <listitem>
-      <para>Acknowledgement of the original author and publisher if
-      applicable must be retained according to normal academic citation
-      practices.</para>
-    </listitem>
-    <listitem>
-      <para>The location of the original unmodified document must be
-      identified.</para>
-    </listitem>
-    <listitem>
-      <para>The original author's (or authors') name(s) may not be used
-      to assert or imply endorsement of the resulting document without
-      the original author's (or authors') permission.</para>
-    </listitem>
-  </orderedlist>
-
-
-  <bridgehead renderas="sect2">V. GOOD-PRACTICE RECOMMENDATIONS</bridgehead>
-
-  <para>In addition to the requirements of this license, it is requested
-  from and strongly recommended of redistributors that:</para>
-
-  <orderedlist>
-    <listitem>
-      <para>If you are distributing Open Publication works on hardcopy
-      or CD-ROM, you provide email notification to the authors of your
-      intent to redistribute at least thirty days before your manuscript
-      or media freeze, to give the authors time to provide updated
-      documents. This notification should describe modifications, if any,
-      made to the document.</para>
-    </listitem>
-    <listitem>
-      <para>All substantive modifications (including deletions) be either
-      clearly marked up in the document or else described in an attachment
-      to the document.</para>
-    </listitem>
-    <listitem>
-      <para>Finally, while it is not mandatory under this license, it is
-      considered good form to offer a free copy of any hardcopy and CD-ROM
-      expression of an Open Publication-licensed work to its author(s).</para>
-    </listitem>
-  </orderedlist>
-
-
-  <bridgehead renderas="sect2">VI. LICENSE OPTIONS</bridgehead>
-
-  <para>The author(s) and/or publisher of an Open Publication-licensed
-  document may elect certain options by appending language to the reference
-  to or copy of the license. These options are considered part of the
-  license instance and must be included with the license (or its
-  incorporation by reference) in derived works.</para>
-
-  <para>A. To prohibit distribution of substantively modified versions
-  without the explicit permission of the author(s). "Substantive modification"
-  is defined as a change to the semantic content of the document, and
-  excludes mere changes in format or typographical corrections.</para>
-
-  <para>To accomplish this, add the phrase `Distribution of substantively
-  modified versions of this document is prohibited without the explicit
-  permission of the copyright holder.' to the license reference or copy.</para>
-
-  <para>B. To prohibit any publication of this work or derivative works in
-  whole or in part in standard (paper) book form for commercial purposes
-  is prohibited unless prior permission is obtained from the copyright
-  holder.</para>
-
-  <para>To accomplish this, add the phrase 'Distribution of the work or
-  derivative of the work in any standard (paper) book form is prohibited
-  unless prior permission is obtained from the copyright holder.' to the
-  license reference or copy.</para>
-
-
-  <bridgehead renderas="sect2">OPEN PUBLICATION POLICY APPENDIX</bridgehead>
-
-  <para>(This is not considered part of the license.)</para>
-
-  <para>Open Publication works are available in source format via the Open
-  Publication home page at <ulink url="http://works.opencontent.org/"/>.</para>
-
-  <para>Open Publication authors who want to include their own license on
-  Open Publication works may do so, as long as their terms are not more
-  restrictive than the Open Publication license.</para>
-
-  <para>If you have questions about the Open Publication License, please
-  contact David Wiley at dw@opencontent.org, and/or the Open Publication
-  Authors' List at opal@opencontent.org, via email.</para>
-
-  <para>To <emphasis role="strong">subscribe</emphasis> to the Open Publication
-  Authors' List: Send E-mail to opal-request@opencontent.org with the word
-  "subscribe" in the body.</para>
-
-  <para>To <emphasis role="strong">post</emphasis> to the Open Publication
-  Authors' List: Send E-mail to opal@opencontent.org or simply reply to a
-  previous post.</para>
-
-  <para>To <emphasis role="strong">unsubscribe</emphasis> from the Open
-  Publication Authors' List: Send E-mail to opal-request@opencontent.org
-  with the word "unsubscribe" in the body.</para>
-
-</appendix>
Index: BOOK/arm-index.xml
===================================================================
--- BOOK/arm-index.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/arm-index.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "general.ent">
   %general-entities;
@@ -50,5 +50,4 @@
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="final-system/arm-chapter.xml"/>
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bootscripts/arm-chapter.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="network/arm-chapter.xml"/>
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bootable/arm-chapter.xml"/>
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="the-end/chapter.xml"/>
@@ -62,7 +61,7 @@
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="appendices/acronymlist.xml"/>
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="appendices/acknowledgments.xml"/>
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="appendices/dependencies/common.xml"/>
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="appendices/dependencies/arm.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="appendices/license.xml"/>
 
   </part>
Index: OK/bootable/alpha-chapter.xml
===================================================================
--- BOOK/bootable/alpha-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,19 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../general.ent">
-  %general-entities;
-]>
-
-<chapter id="chapter-bootable" xreflabel="Making the CLFS System Bootable">
-  <?dbhtml dir="bootable"?>
-  <?dbhtml filename="chapter.html"?>
-
-  <title>Making the CLFS System Bootable</title>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/introduction.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/fstab.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="alpha/kernel.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/chowning.xml"/>
-
-</chapter>
Index: OK/bootable/alpha/kernel.xml
===================================================================
--- BOOK/bootable/alpha/kernel.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,123 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-bootable-kernel" role="wrap">
-  <?dbhtml filename="kernel.html"?>
-
-  <title>Linux-&linux-version;</title>
-
-  <indexterm zone="ch-bootable-kernel">
-    <primary sortas="a-Linux">Linux</primary>
-  </indexterm>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/kernel.xml"
-  xpointer="xpointer(//*[@role='package'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/kernel.xml"
-  xpointer="xpointer(//*[@role='build-env'])"/>
-
-  <sect2 role="installation">
-    <title>Installation of the kernel</title>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='a'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='b'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='c'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='d'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='h'])"/>
-
-<screen os="i"><userinput>make ARCH=alpha CROSS_COMPILE=${CLFS_TARGET}- menuconfig</userinput></screen>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='j'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='k'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='m'])"/>
-
-<screen os="n"><userinput>make ARCH=alpha CROSS_COMPILE=${CLFS_TARGET}-</userinput></screen>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='o'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='p'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='q'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='r'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='s'])"/>
-
-<screen os="t"><userinput>make ARCH=alpha CROSS_COMPILE=${CLFS_TARGET}- \
-    INSTALL_MOD_PATH=${CLFS} modules_install</userinput></screen>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='u'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='v'])"/>
-
-<screen><userinput>cp arch/i386/boot/bzImage ${CLFS}/boot/clfskernel-&linux-version;</userinput></screen>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='w'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='w1'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='x'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='y'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='z'])"/>
-
-  </sect2>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/kernel.xml"
-  xpointer="xpointer(id('contents-kernel'))"/>
-
-</sect1>
Index: BOOK/bootable/arm-chapter.xml
===================================================================
--- BOOK/bootable/arm-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/bootable/arm-chapter.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,19 +1,18 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../general.ent">
   %general-entities;
 ]>
 
-<chapter id="chapter-bootable" xreflabel="Making the CLFS System Bootable">
+<chapter id="chapter-bootable" xreflabel="Making the LFS System Bootable">
   <?dbhtml dir="bootable"?>
   <?dbhtml filename="chapter.html"?>
 
-  <title>Making the CLFS System Bootable</title>
+  <title>Making the LFS System Bootable</title>
 
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/introduction.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/fstab.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="arm/kernel.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/chowning.xml"/>
 
 </chapter>
Index: BOOK/bootable/arm/kernel.xml
===================================================================
--- BOOK/bootable/arm/kernel.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/bootable/arm/kernel.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -19,6 +19,4 @@
 
   </sect2>
-
-  &env-target;
 
   <sect2 role="installation">
@@ -39,12 +37,22 @@
     un-tarring.</para>
 
+    <para os="e">If, in <xref linkend="ch-scripts-console" role=","/> it was
+    decided to compile the keymap into the kernel, issue the command
+    below:</para>
+
+<screen os="f"><userinput>loadkeys -m /usr/share/kbd/keymaps/<replaceable>[path to  keymap]</replaceable> &gt; \
+    drivers/char/defkeymap.c</userinput></screen>
+
+    <para os="g">For example, if using a Dutch keyboard, use
+    <filename>/usr/share/kbd/keymaps/i386/qwerty/nl.map.gz</filename>.</para>
+
     <para os="h">Configure the kernel via a menu-driven interface.
     Please note that the udev bootscript requires "rtc" and "tmpfs" to be
-    enabled and built into the kernel, not as modules. CBLFS has
+    enabled and built into the kernel, not as modules. BLFS has
     some information regarding particular kernel configuration requirements of
-    packages outside of CLFS at <ulink
-    url="&cblfs-root;"/>:</para>
-
-<screen os="i"><userinput>make ARCH=arm CROSS_COMPILE=${CLFS_TARGET}- menuconfig</userinput></screen>
+    packages outside of LFS at <ulink
+    url="&blfs-root;view/svn/longindex.html#kernel-config-index"/>:</para>
+
+<screen os="i"><userinput>make menuconfig</userinput></screen>
 
     <para os="j">Alternatively, <command>make oldconfig</command> may be more
@@ -61,5 +69,5 @@
     <para os="m">Compile the kernel image and modules:</para>
 
-<screen os="n"><userinput>make ARCH=arm CROSS_COMPILE=${CLFS_TARGET}-</userinput></screen>
+<screen os="n"><userinput>make</userinput></screen>
 
     <para os="o">If using kernel modules, an
@@ -89,14 +97,13 @@
     them:</para>
 
-<screen os="t"><userinput>make ARCH=arm CROSS_COMPILE=${CLFS_TARGET}- \
-    INSTALL_MOD_PATH=${CLFS} modules_install</userinput></screen>
+<screen os="t"><userinput>make modules_install</userinput></screen>
 
     <para os="u">After kernel compilation is complete, additional steps are
     required to complete the installation. Some files need to be copied to
-    the <filename class="directory">${CLFS}/boot</filename> directory.</para>
+    the <filename class="directory">/boot</filename> directory.</para>
 
     <para os="v">Issue the following command to install the kernel:</para>
 
-<screen><userinput>cp vmlinux ${CLFS}/boot/clfskernel-&linux-version;</userinput></screen>
+<screen><userinput>cp arch/i386/boot/bzImage /boot/lfskernel-&linux-version;</userinput></screen>
 
     <para os="w"><filename>System.map</filename> is a symbol file for the kernel.
@@ -105,5 +112,5 @@
     kernel. Issue the following command to install the map file:</para>
 
-<screen os="w1"><userinput>cp System.map ${CLFS}/boot/System.map-&linux-version;</userinput></screen>
+<screen os="w1"><userinput>cp System.map /boot/System.map-&linux-version;</userinput></screen>
 
     <para os="x">The kernel configuration file <filename>.config</filename>
@@ -112,5 +119,24 @@
     It is a good idea to keep this file for future reference:</para>
 
-<screen os="y"><userinput>cp .config ${CLFS}/boot/config-&linux-version;</userinput></screen>
+<screen os="x1"><userinput>cp .config /boot/config-&linux-version;</userinput></screen>
+
+    <para os="y">It is important to note that the files in the kernel source
+    directory are not owned by <systemitem class="username">root</systemitem>.
+    Whenever a package is unpacked as user <systemitem
+    class="username">root</systemitem> (like we did
+    inside chroot), the files have the user and group IDs of whatever
+    they were on the packager's computer. This is usually not a problem
+    for any other package to be installed because the source tree is
+    removed after the installation. However, the Linux source tree is
+    often retained for a long time.  Because of this, there is a chance
+    that whatever user ID the packager used will be assigned to somebody
+    on the machine. That person would then have write access to the kernel
+    source.</para>
+
+    <para os="y1">If the kernel source tree is going to retained, run
+    <command>chown -R 0:0</command> on the <filename
+    class="directory">linux-&linux-version;</filename> directory to
+    ensure all files are owned by user <systemitem
+    class="username">root</systemitem>.</para>
 
     <warning os="z">
@@ -118,11 +144,11 @@
       <filename class="symlink">/usr/src/linux</filename> pointing to the
       kernel source directory. This is specific to kernels prior to the
-      2.6 series and <emphasis>must not</emphasis> be created on an CLFS
+      2.6 series and <emphasis>must not</emphasis> be created on an LFS
       system as it can cause problems for packages you may wish to build
-      once your base CLFS system is complete.</para>
+      once your base LFS system is complete.</para>
 
       <para>Also, the headers in the system's <filename
       class="directory">include</filename> directory should
-      <emphasis>always</emphasis> be the ones against which EGLIBC was
+      <emphasis>always</emphasis> be the ones against which Glibc was
       compiled (from the Linux-Headers package) and should
       <emphasis>never</emphasis> be replaced by the kernel headers.</para>
@@ -138,5 +164,5 @@
 
       <seglistitem>
-        <seg>config-[linux-version], clfskernel-[linux-version],
+        <seg>config-[linux-version], lfskernel-[linux-version],
         and System.map-[linux-version]</seg>
       </seglistitem>
@@ -158,6 +184,6 @@
       </varlistentry>
 
-      <varlistentry id="clfskernel">
-        <term><filename>clfskernel-[linux-version]</filename></term>
+      <varlistentry id="lfskernel">
+        <term><filename>lfskernel-[linux-version]</filename></term>
         <listitem>
           <para>The engine of the Linux system. When turning on the
@@ -168,6 +194,6 @@
           a multitasking machine capable of running scores of programs
           seemingly at the same time.</para>
-          <indexterm zone="ch-bootable-kernel clfskernel">
-            <primary sortas="b-clfskernel">clfskernel-[linux-version]</primary>
+          <indexterm zone="ch-bootable-kernel lfskernel">
+            <primary sortas="b-lfskernel">lfskernel-[linux-version]</primary>
           </indexterm>
         </listitem>
Index: OK/bootable/common/chowning.xml
===================================================================
--- BOOK/bootable/common/chowning.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,51 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-bootable-chowning">
-  <?dbhtml filename="chowning.html"?>
-
-  <title>Changing the Ownership Of The CLFS System</title>
-
-  <para>Throughout the book, every package has been compiled and installed as
-  the <systemitem class="username">clfs</systemitem> user. The final system
-  should be owned by <systemitem class="username">root</systemitem>.</para>
-
-  <important>
-
-    <para>The commands in the remainder of this book must be performed while
-    logged in as <systemitem class="username">root</systemitem>. Check that
-    ${CLFS} is still set:</para>
-
-    <screen><userinput>echo ${CLFS}</userinput></screen>
-
-  </important>
-
-  <para>Make <systemitem class="username">root</systemitem> the owner of the
-  entire CLFS system.</para>
-
-<screen><userinput>chown -Rv &uid-root;:&gid-root; ${CLFS}</userinput></screen>
-
-  <para>The following files are to be owned by the group
-  <systemitem class="username">utmp</systemitem> not by
-  <systemitem class="username">root</systemitem>.</para>
-
-<screen><userinput>chgrp -v &gid-utmp; ${CLFS}/var/run/utmp ${CLFS}/var/log/lastlog</userinput></screen>
-
-  <para>During the installation of Util-Linux-ng configure was instructed not
-  change the ownership of certain programs. Correct that ownership now that we
-  have sufficent privileges.</para>
-
-<screen><userinput>chgrp -v &gid-tty; ${CLFS}/usr/bin/write
-chmod g+s ${CLFS}/usr/bin/write</userinput></screen>
-
-  <para>The following device nodes need to be created for the system to
-  boot.</para>
-
-<screen><userinput>mknod -m 0666 ${CLFS}/dev/null c 1 3
-mknod -m 0600 ${CLFS}/dev/console c 5 1</userinput></screen>
-
-</sect1>
Index: BOOK/bootable/common/fstab.xml
===================================================================
--- BOOK/bootable/common/fstab.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/bootable/common/fstab.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -20,5 +20,5 @@
   to mounting. Create a new file systems table like this:</para>
 
-<screen><userinput>cat &gt; ${CLFS}/etc/fstab &lt;&lt; "EOF"
+<screen><userinput>cat &gt; ${LFS}/etc/fstab &lt;&lt; "EOF"
 <literal># Begin /etc/fstab
 
@@ -30,5 +30,5 @@
 proc           /proc        proc   defaults         0     0
 sysfs          /sys         sysfs  defaults         0     0
-devpts         /dev/pts     devpts gid=4,mode=620  0     0
+devpts         /dev/pts     devpts gid=10,mode=620  0     0
 shm            /dev/shm     tmpfs  defaults         0     0
 # End /etc/fstab</literal>
Index: BOOK/bootable/common/introduction.xml
===================================================================
--- BOOK/bootable/common/introduction.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/bootable/common/introduction.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -11,8 +11,8 @@
   <title>Introduction</title>
 
-  <para>It is time to make the CLFS system bootable. This chapter
+  <para>It is time to make the LFS system bootable. This chapter
   discusses creating an <filename>fstab</filename> file, building a
-  kernel for the new CLFS system, and installing the boot loader so
-  that the CLFS system can be selected for booting at startup.</para>
+  kernel for the new LFS system, and installing the boot loader so
+  that the LFS system can be selected for booting at startup.</para>
 
 </sect1>
Index: OK/bootable/hppa-chapter.xml
===================================================================
--- BOOK/bootable/hppa-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,19 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../general.ent">
-  %general-entities;
-]>
-
-<chapter id="chapter-bootable" xreflabel="Making the CLFS System Bootable">
-  <?dbhtml dir="bootable"?>
-  <?dbhtml filename="chapter.html"?>
-
-  <title>Making the CLFS System Bootable</title>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/introduction.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/fstab.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="hppa/kernel.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/chowning.xml"/>
-
-</chapter>
Index: OK/bootable/hppa/kernel.xml
===================================================================
--- BOOK/bootable/hppa/kernel.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,123 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-bootable-kernel" role="wrap">
-  <?dbhtml filename="kernel.html"?>
-
-  <title>Linux-&linux-version;</title>
-
-  <indexterm zone="ch-bootable-kernel">
-    <primary sortas="a-Linux">Linux</primary>
-  </indexterm>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/kernel.xml"
-  xpointer="xpointer(//*[@role='package'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/kernel.xml"
-  xpointer="xpointer(//*[@role='build-env'])"/>
-
-  <sect2 role="installation">
-    <title>Installation of the kernel</title>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='a'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='b'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='c'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='d'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='h'])"/>
-
-<screen os="i"><userinput>make ARCH=parisc CROSS_COMPILE=${CLFS_TARGET}- menuconfig</userinput></screen>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='j'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='k'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='m'])"/>
-
-<screen os="n"><userinput>make ARCH=parisc CROSS_COMPILE=${CLFS_TARGET}-</userinput></screen>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='o'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='p'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='q'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='r'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='s'])"/>
-
-<screen os="t"><userinput>make ARCH=parisc CROSS_COMPILE=${CLFS_TARGET}- \
-    INSTALL_MOD_PATH=${CLFS} modules_install</userinput></screen>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='u'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='v'])"/>
-
-<screen><userinput>cp vmlinux ${CLFS}/boot/clfskernel-&linux-version;</userinput></screen>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='w'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='w1'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='x'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='y'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='z'])"/>
-
-  </sect2>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/kernel.xml"
-  xpointer="xpointer(id('contents-kernel'))"/>
-
-</sect1>
Index: OK/bootable/x86-chapter.xml
===================================================================
--- BOOK/bootable/x86-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,19 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../general.ent">
-  %general-entities;
-]>
-
-<chapter id="chapter-bootable" xreflabel="Making the CLFS System Bootable">
-  <?dbhtml dir="bootable"?>
-  <?dbhtml filename="chapter.html"?>
-
-  <title>Making the CLFS System Bootable</title>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/introduction.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/fstab.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="x86/kernel.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/chowning.xml"/>
-
-</chapter>
Index: OK/bootable/x86/kernel.xml
===================================================================
--- BOOK/bootable/x86/kernel.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,123 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-bootable-kernel" role="wrap">
-  <?dbhtml filename="kernel.html"?>
-
-  <title>Linux-&linux-version;</title>
-
-  <indexterm zone="ch-bootable-kernel">
-    <primary sortas="a-Linux">Linux</primary>
-  </indexterm>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/kernel.xml"
-  xpointer="xpointer(//*[@role='package'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/kernel.xml"
-  xpointer="xpointer(//*[@role='build-env'])"/>
-
-  <sect2 role="installation">
-    <title>Installation of the kernel</title>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='a'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='b'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='c'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='d'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='h'])"/>
-
-<screen os="i"><userinput>make ARCH=i386 CROSS_COMPILE=${CLFS_TARGET}- menuconfig</userinput></screen>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='j'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='k'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='m'])"/>
-
-<screen os="n"><userinput>make ARCH=i386 CROSS_COMPILE=${CLFS_TARGET}-</userinput></screen>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='o'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='p'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='q'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='r'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='s'])"/>
-
-<screen os="t"><userinput>make ARCH=i386 CROSS_COMPILE=${CLFS_TARGET}- \
-    INSTALL_MOD_PATH=${CLFS} modules_install</userinput></screen>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='u'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='v'])"/>
-
-<screen><userinput>cp arch/i386/boot/bzImage ${CLFS}/boot/clfskernel-&linux-version;</userinput></screen>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='w'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='w1'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='x'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='y'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/kernel.xml"
-    xpointer="xpointer(//*[@os='z'])"/>
-
-  </sect2>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/kernel.xml"
-  xpointer="xpointer(id('contents-kernel'))"/>
-
-</sect1>
Index: OK/bootscripts/alpha-chapter.xml
===================================================================
--- BOOK/bootscripts/alpha-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,25 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../general.ent">
-  %general-entities;
-]>
-
-<chapter id="chapter-bootscripts" xreflabel="Setting Up System Bootscripts">
-  <?dbhtml dir="bootscripts"?>
-  <?dbhtml filename="chapter.html"?>
-
-  <title>Setting Up System Bootscripts</title>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/introduction.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/bootscripts.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/usage.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/setclock.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/console.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/udev.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/symlinks.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/profile.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/locale.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/inputrc.xml"/>
-
-</chapter>
Index: BOOK/bootscripts/arm-chapter.xml
===================================================================
--- BOOK/bootscripts/arm-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/bootscripts/arm-chapter.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../general.ent">
   %general-entities;
@@ -14,12 +14,15 @@
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/introduction.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/bootscripts.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/udev-rules.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/usage.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/udev.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/setclock.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/console.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/udev.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/symlinks.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/sysklogd.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/inputrc.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/profile.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/locale.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/inputrc.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/hostname.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/hosts.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/network.xml"/>
 
 </chapter>
Index: BOOK/bootscripts/common/bootscripts.xml
===================================================================
--- BOOK/bootscripts/common/bootscripts.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/bootscripts/common/bootscripts.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -9,5 +9,5 @@
   <?dbhtml filename="bootscripts.html"?>
 
-  <title>Bootscripts for CLFS &bootscripts-clfs-version;</title>
+  <title>CLFS-Bootscripts-&clfs-bootscripts-version;</title>
 
   <indexterm zone="ch-scripts-bootscripts">
@@ -18,5 +18,5 @@
     <title/>
 
-    <para>The Bootscripts package contains a set of scripts to
+    <para>The CLFS-Bootscripts package contains a set of scripts to
     start/stop the CLFS system at bootup/shutdown.</para>
 
@@ -24,18 +24,14 @@
 
   <sect2 role="installation">
-    <title>Installation of Bootscripts</title>
-
-    <para os="a">Install the package:</para>
-
-<screen os="b"><userinput>make DESTDIR=${CLFS} install-bootscripts</userinput></screen>
-
-    <para os="c">You can will need to run the following command to install support for Networking:</para>
-
-<screen os="d"><userinput>make DESTDIR=${CLFS} install-network</userinput></screen>
+    <title>Installation of CLFS-Bootscripts</title>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make DESTDIR=${LFS} install</userinput></screen>
 
   </sect2>
 
   <sect2 id="contents-bootscripts" role="content">
-    <title>Contents of Bootscripts</title>
+    <title>Contents of CLFS-Bootscripts</title>
 
     <segmentedlist>
@@ -45,5 +41,5 @@
         <seg>checkfs, cleanfs, console, functions, halt, ifdown,
         ifup, localnet, mountfs, mountkernfs, network, rc, reboot, sendsignals,
-        setclock, static, swap, sysklogd, template, and udev.</seg>
+        setclock, static, swap, sysklogd, and template.</seg>
       </seglistitem>
     </segmentedlist>
@@ -262,14 +258,4 @@
       </varlistentry>
 
-      <varlistentry id="udev-bootscripts">
-        <term><command>udev</command></term>
-        <listitem>
-          <para>Starts and stops the Udev daemon</para>
-          <indexterm zone="ch-scripts-bootscripts udev-bootscripts">
-            <primary sortas="d-udev">udev</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
     </variablelist>
 
Index: BOOK/bootscripts/common/console.xml
===================================================================
--- BOOK/bootscripts/common/console.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/bootscripts/common/console.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -14,5 +14,5 @@
   <secondary>configuring</secondary></indexterm>
 
-  <para>This section discusses how to configure the <command>i18n</command>
+  <para>This section discusses how to configure the <command>console</command>
   bootscript that sets up the keyboard map and the console font. If non-ASCII
   characters (e.g., the British pound sign and Euro character) will not be
@@ -21,20 +21,91 @@
   nothing.</para>
 
-  <para>The <command>i18n</command> script reads the
-  <filename>/etc/sysconfig/i18n</filename> file for configuration
+  <para>The <command>console</command> script reads the
+  <filename>/etc/sysconfig/console</filename> file for configuration
   information. Decide which keymap and screen font will be used. Various
   language-specific HOWTO's can also help with this (see <ulink
   url="http://www.tldp.org/HOWTO/HOWTO-INDEX/other-lang.html"/>. A pre-made
-  <filename>/etc/sysconfig/i18n</filename> file with known settings for
-  several countries was installed with the CLFS-Bootscripts package, so the
+  <filename>/etc/sysconfig/console</filename> file with known settings for
+  several countries was installed with the LFS-Bootscripts package, so the
   relevant section can be uncommented if the country is supported. If still
-  in doubt, look in the <filename class="directory">/usr/share/consolefonts</filename>
-  for valid screen fonts and <filename class="directory">/usr/share/keymaps</filename>
-  for valid keymaps.</para>
+  in doubt, look in the <filename class="directory">/usr/share/kbd</filename>
+  directory for valid keymaps and screen fonts. Read
+  <filename>loadkeys(1)</filename> and <filename>setfont(8)</filename> to
+  determine the correct arguments for these programs. Once decided, create
+  the configuration file with the following command:</para>
 
-  <para>The default <filename>/etc/sysconfig/i18n</filename> is set up for UTF-8
-  using the us keymap. You will need to edit the file to your specific needs.
-  The <filename>/etc/sysconfig/i18n</filename> file has additional information
-  in it to help you to assist in configuring.</para>
+<screen><userinput>cat &gt;${LFS}/etc/sysconfig/console &lt;&lt;"EOF"
+<literal>KEYMAP="<replaceable>[arguments for loadkeys]</replaceable>"
+FONT="<replaceable>[arguments for setfont]</replaceable>"</literal>
+EOF</userinput></screen>
+
+  <para>For example, for Spanish users who also want to use the Euro
+  character (accessible by pressing AltGr+E), the following settings are
+  correct:</para>
+
+<screen><userinput>cat &gt;${LFS}/etc/sysconfig/console &lt;&lt;"EOF"
+<literal>KEYMAP="es euro2"
+FONT="lat9-16 -u iso01"</literal>
+EOF</userinput></screen>
+
+  <note>
+    <para>The <envar>FONT</envar> line above is correct only for the ISO
+    8859-15 character set. If using ISO 8859-1 and, therefore, a pound sign
+    instead of Euro, the correct <envar>FONT</envar> line would be:</para>
+
+<screen><userinput>FONT="lat1-16"</userinput></screen>
+
+  </note>
+
+    <para>If the <envar>KEYMAP</envar> or <envar>FONT</envar> variable is not
+    set, the <command>console</command> initscript will not run the
+    corresponding program.</para>
+
+    <para>In some keymaps, the Backspace and Delete keys send characters
+    different from ones in the default keymap built into the kernel. This
+    confuses some applications. For example, Emacs displays its help (instead
+    of erasing the character before the cursor) when Backspace is pressed.
+    To check if the keymap in use is affected (this works only for i386
+    keymaps):</para>
+
+<screen><userinput>zgrep '\W14\W' <replaceable>[/path/to/your/keymap]</replaceable></userinput></screen>
+
+  <para>If the keycode 14 is Backspace instead of Delete, create the
+  following keymap snippet to fix this issue:</para>
+
+<screen><userinput>mkdir -p ${LFS}/etc/kbd &amp;&amp; cat &gt; ${LFS}/etc/kbd/bs-sends-del &lt;&lt;"EOF"
+<literal>                  keycode  14 = Delete Delete Delete Delete
+              alt keycode  14 = Meta_Delete
+        altgr alt keycode  14 = Meta_Delete
+                  keycode 111 = Remove
+    altgr control keycode 111 = Boot
+      control alt keycode 111 = Boot
+altgr control alt keycode 111 = Boot</literal>
+EOF</userinput></screen>
+
+  <para>Tell the <command>console</command> script to load this
+  snippet after the main keymap:</para>
+
+<screen><userinput>cat &gt;&gt; ${LFS}/etc/sysconfig/console &lt;&lt;"EOF"
+<literal>KEYMAP_CORRECTIONS="/etc/kbd/bs-sends-del"</literal>
+EOF</userinput></screen>
+
+  <para>To compile the keymap directly into the kernel instead of setting it
+  every time from the <command>console</command> bootscript, follow the
+  instructions given in <xref linkend="ch-bootable-kernel" role="."/> Doing
+  this ensures that the keyboard will always work as expected, even when
+  booting into maintenance mode (by passing <option>init=/bin/sh</option> to
+  the kernel), because the <command>console</command> bootscript will not be
+  run in that situation. Additionally, the kernel will not set the screen font
+  automatically. This should not pose many problems because ASCII characters
+  will be handled correctly, and it is unlikely that a user would need to rely
+  on non-ASCII characters while in maintenance mode.</para>
+
+  <para>Since the kernel will set up the keymap, it is possible to omit the
+  <envar>KEYMAP</envar> variable from the
+  <filename>/etc/sysconfig/console</filename> configuration file. It can
+  also be left in place, if desired, without consequence. Keeping it could
+  be beneficial if running several different kernels where it is difficult
+  to ensure that the keymap is compiled into every one of them.</para>
 
 </sect1>
Index: BOOK/bootscripts/common/hostname.xml
===================================================================
--- BOOK/bootscripts/common/hostname.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/bootscripts/common/hostname.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-scripts-hostname">
+  <?dbhtml filename="hostname.html"?>
+
+  <title>Configuring the localnet Script</title>
+
+  <indexterm zone="ch-scripts-hostname">
+    <primary sortas="d-localnet">localnet</primary>
+  <secondary>configuring</secondary></indexterm>
+
+  <para>Part of the job of the <command>localnet</command> script is
+  setting the system's hostname. This needs to be configured in the
+  <filename>/etc/sysconfig/network</filename> file.</para>
+
+  <para>Create the <filename>/etc/sysconfig/network</filename> file
+  and enter a hostname by running:</para>
+
+  <screen><userinput>echo "HOSTNAME=<replaceable>[lfs]</replaceable>" &gt; ${LFS}/etc/sysconfig/network</userinput></screen>
+
+  <para><replaceable>[lfs]</replaceable> needs to be replaced with the
+  name given to the computer. Do not enter the Fully Qualified
+  Domain Name (FQDN) here. That information will be put in the
+  <filename>/etc/hosts</filename> file in the next section.</para>
+
+</sect1>
Index: BOOK/bootscripts/common/hosts.xml
===================================================================
--- BOOK/bootscripts/common/hosts.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/bootscripts/common/hosts.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-scripts-hosts">
+  <?dbhtml filename="hosts.html"?>
+
+  <title>Customizing the /etc/hosts File</title>
+
+  <indexterm zone="ch-scripts-hosts">
+    <primary sortas="e-/etc/hosts">/etc/hosts</primary>
+  </indexterm>
+
+  <indexterm zone="ch-scripts-hosts">
+    <primary sortas="d-localnet">localnet</primary>
+  <secondary>/etc/hosts</secondary></indexterm>
+
+  <indexterm zone="ch-scripts-hosts">
+    <primary sortas="d-network">network</primary>
+  <secondary>/etc/hosts</secondary></indexterm>
+
+  <para>If a network card is to be configured, decide on the IP address,
+  FQDN, and possible aliases for use in the
+  <filename>/etc/hosts</filename> file. The syntax is:</para>
+
+  <screen>&lt;IP address&gt; myhost.example.org aliases</screen>
+
+  <para>Unless the computer is to be visible to the Internet (i.e.,
+  there is a registered domain and a valid block of assigned IP
+  addresses&mdash;most users do not have this), make sure that the IP
+  address is in the private network IP address range. Valid ranges
+  are:</para>
+
+<screen><literal>  Class Networks
+  A     10.0.0.0
+  B     172.16.0.0 through 172.31.0.255
+  C     192.168.0.0 through 192.168.255.255</literal></screen>
+
+  <para>A valid IP address could be 192.168.1.1. A valid FQDN for this
+  IP could be <uri>www.linuxfromscratch.org</uri> (not recommended
+  because this is a valid registered domain address and could cause
+  domain name server issues).</para>
+
+  <para>Even if not using a network card, an FQDN is still required.
+  This is necessary for certain programs to operate correctly.</para>
+
+  <para>Create the  <filename>/etc/hosts</filename> file by running:</para>
+
+<screen><userinput>cat &gt; ${LFS}/etc/hosts &lt;&lt; "EOF"
+<literal># Begin /etc/hosts (network card version)
+
+127.0.0.1 localhost
+<replaceable>[192.168.1.1]</replaceable> <replaceable>[&lt;HOSTNAME&gt;.example.org]</replaceable> <replaceable>[HOSTNAME]</replaceable>
+
+# End /etc/hosts (network card version)</literal>
+EOF</userinput></screen>
+
+  <para>The <replaceable>[192.168.1.1]</replaceable> and
+  <replaceable>[&lt;HOSTNAME&gt;.example.org]</replaceable>
+  values need to be changed for specific users or requirements (if
+  assigned an IP address by a network/system administrator and the
+  machine will be connected to an existing network).</para>
+
+
+  <para>If a network card is not going to be configured, create the
+  <filename>/etc/hosts</filename> file by running:</para>
+
+<screen><userinput>cat &gt; ${LFS}/etc/hosts &lt;&lt; "EOF"
+<literal># Begin /etc/hosts (no network card version)
+
+127.0.0.1 <replaceable>[&lt;HOSTNAME&gt;.example.org]</replaceable> <replaceable>[HOSTNAME]</replaceable> localhost
+
+# End /etc/hosts (no network card version)</literal>
+EOF</userinput></screen>
+
+</sect1>
Index: BOOK/bootscripts/common/inputrc.xml
===================================================================
--- BOOK/bootscripts/common/inputrc.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/bootscripts/common/inputrc.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
    <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -37,5 +37,5 @@
   using the following command:</para>
 
-<screen><?dbfo keep-together="auto"?><userinput>cat &gt; ${CLFS}/etc/inputrc &lt;&lt; "EOF"
+<screen><userinput>cat &gt; ${LFS}/etc/inputrc &lt;&lt; "EOF"
 <literal># Begin /etc/inputrc
 # Modified by Chris Lynn &lt;roryo@roryo.dynup.net&gt;
Index: BOOK/bootscripts/common/introduction.xml
===================================================================
--- BOOK/bootscripts/common/introduction.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/bootscripts/common/introduction.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -11,5 +11,5 @@
   <title>Introduction</title>
 
-  <para>This chapter details how to install and configure the CLFS-Bootscripts
+  <para>This chapter details how to install and configure the LFS-Bootscripts
   package. Most of these scripts will work without modification, but a few
   require additional configuration files because they deal with
@@ -19,5 +19,5 @@
   are widely used. For additional options, a hint detailing the BSD style
   init setup is available at <ulink
-  url="&hints-root;BSD-Init"/>.
+  url="http://www.linuxfromscratch.org/hints/downloads/files/bsd-init.txt"/>.
   Searching the LFS mailing lists for <quote>depinit</quote> will also offer
   additional choices.</para>
Index: OK/bootscripts/common/locale.xml
===================================================================
--- BOOK/bootscripts/common/locale.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,137 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-scripts-locale">
-  <title>Setting Up Locale Information</title>
-  <?dbhtml filename="locale.html"?>
-
-  <indexterm zone="ch-scripts-locale">
-    <primary sortas="e-/etc/profile">/etc/profile</primary>
-  </indexterm>
-
-  <para>The base <filename>/etc/profile</filename> below sets some
-  environment variables necessary for native language support. Setting
-  them properly results in:</para>
-
-  <itemizedlist>
-    <listitem>
-      <para>The output of programs translated into the native language</para>
-    </listitem>
-    <listitem>
-      <para>Correct classification of characters into letters, digits and
-      other classes. This is necessary for <command>bash</command> to
-      properly accept non-ASCII characters in command lines in non-English
-      locales</para>
-    </listitem>
-    <listitem>
-      <para>The correct alphabetical sorting order for the country</para>
-    </listitem>
-    <listitem>
-      <para>Appropriate default paper size</para>
-    </listitem>
-    <listitem>
-      <para>Correct formatting of monetary, time, and date values</para>
-    </listitem>
-  </itemizedlist>
-
-  <para>This script also sets the <envar>INPUTRC</envar> environment variable
-  that makes Bash and Readline use the <filename>/etc/inputrc</filename> file
-  created earlier.</para>
-
-  <para>Replace <replaceable>[ll]</replaceable> below with the
-  two-letter code for the desired language (e.g., <quote>en</quote>) and
-  <replaceable>[CC]</replaceable> with the two-letter code for the
-  appropriate country (e.g., <quote>GB</quote>).
-  <replaceable>[charmap]</replaceable> should be replaced with the
-  canonical charmap for your chosen locale.</para>
-
-  <para>The list of all locales supported by EGLIBC can be obtained by running
-  the following command:</para>
-
-<screen role="nodump"><userinput>locale -a</userinput></screen>
-
-  <para>Locales can have a number of synonyms, e.g. <quote>ISO-8859-1</quote>
-  is also referred to as <quote>iso8859-1</quote> and <quote>iso88591</quote>.
-  Some applications cannot handle the various synonyms correctly, so it is
-  safest to choose the canonical name for a particular locale. To determine
-  the canonical name, run the following command, where <replaceable>[locale
-  name]</replaceable> is the output given by <command>locale -a</command> for
-  your preferred locale (<quote>en_US.utf8</quote> in our example).</para>
-
-<screen role="nodump"><userinput>LC_ALL=<replaceable>[locale name]</replaceable> locale charmap</userinput></screen>
-
-  <para>For the <quote>en_US.utf8</quote> locale, the above command
-  will print:</para>
-
-<screen><computeroutput>UTF-8</computeroutput></screen>
-
-  <para>This results in a final locale setting of <quote>en_US.UTF-8</quote>.
-  It is important that the locale found using the heuristic above is tested prior
-  to it being added to the Bash startup files:</para>
-
-<screen role="nodump"><userinput>LC_ALL=[locale name] locale country
-LC_ALL=[locale name] locale language
-LC_ALL=[locale name] locale charmap
-LC_ALL=[locale name] locale int_curr_symbol
-LC_ALL=[locale name] locale int_prefix</userinput></screen>
-
-  <para>The above commands should print the language name, the character
-  encoding used by the locale, the local currency, and the prefix to dial
-  before the telephone number in order to get into the country. If any of the
-  commands above fail with a message similar to the one shown below, this means
-  that your locale was either not installed in Chapter 10 or is not supported by
-  the default installation of EGLIBC.</para>
-
-<screen><computeroutput>locale: Cannot set LC_* to default locale: No such file or directory</computeroutput></screen>
-
-  <para>If this happens, you should either install the desired locale using
-  the <command>localedef</command> command, or consider choosing a different
-  locale. Further instructions assume that there are no such error messages
-  from EGLIBC.</para>
-
-  <para>Some packages beyond CLFS may also lack support for your chosen locale.
-  One example is the X library (part of the X Window System), which outputs
-  the following error message:</para>
-
-<screen><computeroutput>Warning: locale not supported by Xlib, locale set to C</computeroutput></screen>
-
-  <para>Sometimes it is possible to fix this by removing the charmap part of
-  the locale specification, as long as that does not change the character map
-  that EGLIBC associates with the locale (this can be checked by running the
-  <command>locale charmap</command> command in both locales). For example,
-  one would have to change &quot;de_DE.ISO-8859-15@euro&quot; to
-  &quot;de_DE@euro&quot; in order to get this locale recognized by Xlib.</para>
-
-  <para>Other packages can also function incorrectly (but may not necessarily
-  display any error messages) if the locale name does not meet their expectations.
-  In those cases, investigating how other Linux distributions support your locale
-  might provide some useful information.</para>
-
-  <para>Once the proper locale settings have been determined, create the
-  <filename>/etc/profile</filename> file:</para>
-
-<screen><userinput>cat &gt; ${CLFS}/etc/profile &lt;&lt; "EOF"
-<literal># Begin /etc/profile
-
-export LANG=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable>.<replaceable>[charmap]</replaceable>
-export INPUTRC=/etc/inputrc
-
-# End /etc/profile</literal>
-EOF</userinput></screen>
-
-  <para>Setting the keyboard layout, screen font, and locale-related
-  environment variables are the only internationalization steps needed to
-  support locales that use ordinary single-byte encodings and left-to-right
-  writing direction. UTF-8 has been tested on the English, French, German,
-  Italian, and Spanish locales. All other locales are untested. If you discover
-  issues with any other locale please open a ticket in our Trac system.</para>
-
-  <para>Some locales need additional programs and support. CLFS will not be
-  supporting these locales in the book. We welcome the support for these other
-  locales via <ulink url="&cblfs-root;"/>.</para>
-
-</sect1>
Index: BOOK/bootscripts/common/network.xml
===================================================================
--- BOOK/bootscripts/common/network.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/bootscripts/common/network.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-scripts-network">
+  <?dbhtml filename="network.html"?>
+
+  <title>Configuring the network Script</title>
+
+  <indexterm zone="ch-scripts-network">
+    <primary sortas="d-network">network</primary>
+  <secondary>configuring</secondary></indexterm>
+
+  <para>This section only applies if a network card is to be
+  configured.</para>
+
+  <para>If a network card will not be used, there is likely no need to
+  create any configuration files relating to network cards. If that is
+  the case, remove the <filename class="symlink">network</filename>
+  symlinks from all run-level directories (<filename
+  class="directory">/etc/rc.d/rc*.d</filename>).</para>
+
+  <sect2>
+    <title>Creating Network Interface Configuration Files</title>
+
+    <para>Which interfaces are brought up and down by the network script
+    depends on the files and directories in the <filename
+    class="directory">/etc/sysconfig/network-devices</filename> hierarchy.
+    This directory should contain a sub-directory for each interface to be
+    configured, such as <filename>ifconfig.xyz</filename>, where
+    <quote>xyz</quote> is a network interface name. Inside this directory
+    would be files defining the attributes to this interface, such as its
+    IP address(es), subnet masks, and so forth.</para>
+
+    <para>The following command creates a sample <filename>ipv4</filename>
+    file for the <filename class="devicefile">eth0</filename> device:</para>
+
+<screen><userinput>cd ${LFS}/etc/sysconfig/network-devices &amp;&amp;
+mkdir ifconfig.eth0 &amp;&amp;
+cat &gt; ifconfig.eth0/ipv4 &lt;&lt; "EOF"
+<literal>ONBOOT=yes
+SERVICE=ipv4-static
+IP=192.168.1.1
+GATEWAY=192.168.1.2
+PREFIX=24
+BROADCAST=192.168.1.255</literal>
+EOF</userinput></screen>
+
+    <para>The values of these variables must be changed in every file to
+    match the proper setup. If the <envar>ONBOOT</envar> variable is
+    set to <quote>yes</quote> the network script will bring up the
+    Network Interface Card (NIC) during booting of the system. If set
+    to anything but <quote>yes</quote> the NIC will be ignored by the
+    network script and not brought up.</para>
+
+    <para>The <envar>SERVICE</envar> variable defines the method used for
+    obtaining the IP address. The LFS-Bootscripts package has a modular IP
+    assignment format, and creating additional files in the <filename
+    class="directory">/etc/sysconfig/network-devices/services</filename>
+    directory allows other IP assignment methods. This is commonly used
+    for Dynamic Host Configuration Protocol (DHCP), which is addressed in
+    the BLFS book.</para>
+
+    <para>The <envar>GATEWAY</envar> variable should contain the default
+    gateway IP address, if one is present. If not, then comment out the
+    variable entirely.</para>
+
+    <para>The <envar>PREFIX</envar> variable needs to contain the number
+    of bits used in the subnet. Each octet in an IP address is 8 bits.
+    If the subnet's netmask is 255.255.255.0, then it is using the first
+    three octets (24 bits) to specify the network number. If the netmask
+    is 255.255.255.240, it would be using the first 28 bits. Prefixes
+    longer than 24 bits are commonly used by DSL and cable-based Internet
+    Service Providers (ISPs). In this example (PREFIX=24), the netmask is
+    255.255.255.0. Adjust the <envar>PREFIX</envar> variable according to
+    your specific subnet.</para>
+
+  </sect2>
+
+  <sect2 id="resolv.conf">
+    <title>Creating the /etc/resolv.conf File</title>
+
+    <indexterm zone="resolv.conf">
+      <primary sortas="e-/etc/resolv.conf">/etc/resolv.conf</primary>
+    </indexterm>
+
+    <para>If the system is going to be connected to the Internet, it will
+    need some means of Domain Name Service (DNS) name resolution to resolve
+    Internet domain names to IP addresses, and vice versa. This is best
+    achieved by placing the IP address of the DNS server, available from
+    the ISP or network administrator, into <filename>/etc/resolv.conf</filename>.
+    Create the file by running the following:</para>
+
+<screen><userinput>cat &gt; ${LFS}/etc/resolv.conf &lt;&lt; "EOF"
+<literal># Begin /etc/resolv.conf
+
+domain {<replaceable>[Your Domain Name]</replaceable>}
+nameserver <replaceable>[IP address of your primary nameserver]</replaceable>
+nameserver <replaceable>[IP address of your secondary nameserver]</replaceable>
+
+# End /etc/resolv.conf</literal>
+EOF</userinput></screen>
+
+    <para>Replace <replaceable>[IP address of the nameserver]</replaceable>
+    with the IP address of the DNS most appropriate for the setup. There will
+    often be more than one entry (requirements demand secondary servers for
+    fallback capability). If you only need or want one DNS server, remove the
+    second <emphasis>nameserver</emphasis> line from the file. The IP address
+    may also be a router on the local network.</para>
+
+  </sect2>
+
+</sect1>
Index: BOOK/bootscripts/common/profile.xml
===================================================================
--- BOOK/bootscripts/common/profile.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/bootscripts/common/profile.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -18,7 +18,8 @@
   files to help create an environment to run in. Each file has a
   specific use and may affect login and interactive environments
-  differently. The files in the <filename class="directory">/etc</filename>
-  directory provide global settings. If an equivalent file exists in the
-  home directory, it may override the global settings.</para>
+  differently. The files in the <filename
+  class="directory">/etc</filename> directory provide global settings.
+  If an equivalent file exists in the home directory, it may override
+  the global settings.</para>
 
   <para>An interactive login shell is started after a successful login,
@@ -32,13 +33,134 @@
 
   <para>For more information, see <command>info bash</command> under the
-  <emphasis>Bash Startup Files and Interactive Shells</emphasis> section,
-  and <ulink url="&cblfs-root;index.php/Bash_Startup_Files">Bash Startup
-  Files</ulink> in CBLFS.</para>
+  <emphasis>Bash Startup Files and Interactive Shells</emphasis> section.</para>
 
   <para>The files <filename>/etc/profile</filename> and
   <filename>~/.bash_profile</filename> are read when the shell is
-  invoked as an interactive login shell. In the next section, a base
-  <filename>/etc/profile</filename> will be created to set up locale
-  information.</para>
+  invoked as an interactive login shell.</para>
+
+  <para>The base <filename>/etc/profile</filename> below sets some
+  environment variables necessary for native language support. Setting
+  them properly results in:</para>
+
+  <itemizedlist>
+    <listitem>
+      <para>The output of programs translated into the native language</para>
+    </listitem>
+    <listitem>
+      <para>Correct classification of characters into letters, digits and
+      other classes. This is necessary for <command>bash</command> to
+      properly accept non-ASCII characters in command lines in non-English
+      locales</para>
+    </listitem>
+    <listitem>
+      <para>The correct alphabetical sorting order for the country</para>
+    </listitem>
+    <listitem>
+      <para>Appropriate default paper size</para>
+    </listitem>
+    <listitem>
+      <para>Correct formatting of monetary, time, and date values</para>
+    </listitem>
+  </itemizedlist>
+
+  <para>This script also sets the <envar>INPUTRC</envar> environment variable
+  that makes Bash and Readline use the <filename>/etc/inputrc</filename> file
+  created earlier.</para>
+
+  <para>Replace <replaceable>[ll]</replaceable> below with the
+  two-letter code for the desired language (e.g., <quote>en</quote>) and
+  <replaceable>[CC]</replaceable> with the two-letter code for the
+  appropriate country (e.g., <quote>GB</quote>).
+  <replaceable>[charmap]</replaceable> should be replaced with the
+  canonical charmap for your chosen locale.</para>
+
+  <para>The list of all locales supported by Glibc can be obtained by running
+  the following command:</para>
+
+<screen role="nodump"><userinput>locale -a</userinput></screen>
+
+  <para>Locales can have a number of synonyms, e.g. <quote>ISO-8859-1</quote>
+  is also referred to as <quote>iso8859-1</quote> and <quote>iso88591</quote>.
+  Some applications cannot handle the various synonyms correctly, so it is
+  safest to choose the canonical name for a particular locale. To determine
+  the canonical name, run the following command, where <replaceable>[locale
+  name]</replaceable> is the output given by <command>locale -a</command> for
+  your preferred locale (<quote>en_GB.iso88591</quote> in our example).</para>
+
+<screen role="nodump"><userinput>LC_ALL=<replaceable>[locale name]</replaceable> locale charmap</userinput></screen>
+
+  <para>For the <quote>en_GB.iso88591</quote> locale, the above command
+  will print:</para>
+
+<screen><computeroutput>ISO-8859-1</computeroutput></screen>
+
+  <para>This results in a final locale setting of <quote>en_GB.ISO-8859-1</quote>.
+  It is important that the locale found using the heuristic above is tested prior
+  to it being added to the Bash startup files:</para>
+
+<screen role="nodump"><userinput>LC_ALL=[locale name] locale country
+LC_ALL=[locale name] locale language
+LC_ALL=[locale name] locale charmap
+LC_ALL=[locale name] locale int_curr_symbol
+LC_ALL=[locale name] locale int_prefix</userinput></screen>
+
+  <para>The above commands should print the country and language names, the
+  character encoding used by the locale, the local currency and the prefix
+  to dial before the telephone number in order to get into the country. If
+  any of the commands above fail with a message similar to the one shown
+  below, this means that your locale was either not installed in Chapter 6
+  or is not supported by the default installation of Glibc.</para>
+
+<screen><computeroutput>locale: Cannot set LC_* to default locale: No such file or directory</computeroutput></screen>
+
+  <para>If this happens, you should either install the desired locale using
+  the <command>localedef</command> command, or consider choosing a different
+  locale. Further instructions assume that there are no such error messages
+  from Glibc.</para>
+
+  <para>Some packages beyond LFS may also lack support for your chosen locale.
+  One example is the X library (part of the X Window System), which outputs
+  the following error message:</para>
+
+<screen><computeroutput>Warning: locale not supported by Xlib, locale set to C</computeroutput></screen>
+
+  <para>Sometimes it is possible to fix this by removing the charmap part of
+  the locale specification, as long as that does not change the character map
+  that Glibc associates with the locale (this can be checked by running the
+  <command>locale charmap</command> command in both locales). For example,
+  one would have to change &quot;de_DE.ISO-8859-15@euro&quot; to
+  &quot;de_DE@euro&quot; in order to get this locale recognized by Xlib.</para>
+
+  <para>Other packages can also function incorrectly (but may not necessarily
+  display any error messages) if the locale name does not meet their expectations.
+  In those cases, investigating how other Linux distributions support your locale
+  might provide some useful information.</para>
+
+  <para>Once the proper locale settings have been determined, create the
+  <filename>/etc/profile</filename> file:</para>
+
+<screen><userinput>cat &gt; ${LFS}/etc/profile &lt;&lt; "EOF"
+<literal># Begin /etc/profile
+
+export LANG=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable>.<replaceable>[charmap]</replaceable>
+export INPUTRC=/etc/inputrc
+
+# End /etc/profile</literal>
+EOF</userinput></screen>
+
+  <note>
+    <para>The <quote>C</quote> (default) and <quote>en_US</quote>
+    (the recommended one for United States English users) locales are
+    different.</para>
+  </note>
+
+  <para>Setting the keyboard layout, screen font, and locale-related
+  environment variables are the only internationalization steps needed to
+  support locales that use ordinary single-byte encodings and left-to-right
+  writing direction. More complex cases (including UTF-8 based locales)
+  require additional steps and additional patches because many applications
+  tend to not work properly under such conditions. These steps and patches
+  are not included in the LFS book and such locales are not yet supported
+  by LFS.</para>
 
 </sect1>
Index: BOOK/bootscripts/common/setclock.xml
===================================================================
--- BOOK/bootscripts/common/setclock.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/bootscripts/common/setclock.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -42,5 +42,5 @@
   the following:</para>
 
-<screen><userinput>cat &gt; ${CLFS}/etc/sysconfig/clock &lt;&lt; "EOF"
+<screen><userinput>cat &gt; ${LFS}/etc/sysconfig/clock &lt;&lt; "EOF"
 <literal># Begin /etc/sysconfig/clock
 
@@ -50,5 +50,5 @@
 EOF</userinput></screen>
 
-  <para os="e">A good hint explaining how to deal with time on CLFS is available
+  <para os="e">A good hint explaining how to deal with time on LFS is available
   at <ulink url="&hints-root;time.txt"/>. It explains issues such as
   time zones, UTC, and the <envar>TZ</envar> environment variable.</para>
Index: OK/bootscripts/common/symlinks.xml
===================================================================
--- BOOK/bootscripts/common/symlinks.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,141 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-scripts-symlinks">
-  <?dbhtml filename="symlinks.html"?>
-
-  <title>Creating custom symlinks to devices</title>
-
-  <sect2>
-
-    <title>CD-ROM symlinks</title>
-
-    <para>Some software that you may want to install later (e.g., various
-    media players) expect the /dev/cdrom and /dev/dvd symlinks to exist.
-    Also, it may be convenient to put references to those symlinks into
-    <filename>/etc/fstab</filename>. For each of your CD-ROM devices,
-    find the corresponding directory under
-    <filename class="directory">/sys</filename> (e.g., this can be
-    <filename class="directory">/sys/block/hdd</filename>) and
-    run a command similar to the following:</para>
-
-<screen role="nodump"><userinput>udevadm test /sys/block/hdd</userinput></screen>
-
-    <para>Look at the lines containing the output of various *_id programs.</para>
-
-    <para>There are two approaches to creating symlinks. The first one is to
-    use the model name and the serial number, the second one is based on the
-    location of the device on the bus. If you are going to use the first
-    approach, create a file similar to the following:</para>
-
-<screen role="nodump"><userinput>cat &gt; ${CLFS}/etc/udev/rules.d/82-cdrom.rules &lt;&lt; EOF
-<literal>
-# Custom CD-ROM symlinks
-SUBSYSTEM=="block", ENV{ID_MODEL}=="SAMSUNG_CD-ROM_SC-148F", \
-    ENV{ID_REVISION}=="PS05", SYMLINK+="cdrom"
-SUBSYSTEM=="block", ENV{ID_MODEL}=="PHILIPS_CDD5301", \
-    ENV{ID_SERIAL}=="5VO1306DM00190", SYMLINK+="cdrom1 dvd"
-</literal>
-EOF</userinput></screen>
-
-    <note>
-      <para>Although the examples in this book work properly, be aware
-      that Udev does not recognize the backslash for line continuation.
-      If modifying Udev rules with an editor, be sure to leave each rule
-      on one physical line.</para>
-    </note>
-
-    <para>This way, the symlinks will stay correct even if you move the drives
-    to different positions on the IDE bus, but the
-    <filename>/dev/cdrom</filename> symlink won't be created if you replace
-    the old SAMSUNG CD-ROM with a new drive.</para>
-<!-- The symlinks in the first approach survive even the transition
-     to libata for IDE drives, but that is not for the book. -->
-
-    <para>The SUBSYSTEM==&quot;block&quot; key is needed in order to avoid
-    matching SCSI generic devices. Without it, in the case with SCSI
-    CD-ROMs, the symlinks will sometimes point to the correct
-    <filename>/dev/srX</filename> devices, and sometimes to
-    <filename>/dev/sgX</filename>, which is wrong.</para>
-
-    <para>The second approach yields:</para>
-
-<screen role="nodump"><userinput>cat &gt; ${CLFS}/etc/udev/rules.d/82-cdrom.rules &lt;&lt; EOF
-<literal>
-# Custom CD-ROM symlinks
-SUBSYSTEM=="block", ENV{ID_TYPE}=="cd", \
-    ENV{ID_PATH}=="pci-0000:00:07.1-ide-0:1", SYMLINK+="cdrom"
-SUBSYSTEM=="block", ENV{ID_TYPE}=="cd", \
-    ENV{ID_PATH}=="pci-0000:00:07.1-ide-1:1", SYMLINK+="cdrom1 dvd"
-</literal>
-EOF</userinput></screen>
-
-    <para>This way, the symlinks will stay correct even if you replace drives
-    with different models, but place them to the old positions on the IDE
-    bus. The ENV{ID_TYPE}==&quot;cd&quot; key makes sure that the symlink
-    disappears if you put something other than a CD-ROM in that position on
-    the bus.</para>
-
-    <para>Of course, it is possible to mix the two approaches.</para>
-
-  </sect2>
-
-  <sect2>
-
-    <title>Dealing with duplicate devices</title>
-
-    <para>As explained in <xref linkend="ch-scripts-udev"/>, the order in
-    which devices with the same function appear in
-    <filename class="directory">/dev</filename> is essentially random.
-    E.g., if you have a USB web camera and a TV tuner, sometimes
-    <filename>/dev/video0</filename> refers to the camera and
-    <filename>/dev/video1</filename> refers to the tuner, and sometimes
-    after a reboot the order changes to the opposite one.
-    For all classes of hardware except sound cards and network cards, this is
-    fixable by creating udev rules for custom persistent symlinks.
-    The case of network cards is covered separately in
-    <xref linkend="chapter-network"/>, and sound card configuration can
-    be found in <ulink url="&cblfs-root;">CBLFS</ulink>.</para>
-
-    <para>For each of your devices that is likely to have this problem
-    (even if the problem doesn't exist in your current Linux distribution),
-    find the corresponding directory under
-    <filename class="directory">/sys/class</filename> or
-    <filename class="directory">/sys/block</filename>.
-    For video devices, this may be
-    <filename
-    class="directory">/sys/class/video4linux/video<replaceable>X</replaceable></filename>.
-    Figure out the attributes that identify the device uniquely (usually,
-    vendor and product IDs and/or serial numbers work):</para>
-
-<screen role="nodump"><userinput>udevadm info -a -p /sys/class/video4linux/video0</userinput></screen>
-
-    <para>Then write rules that create the symlinks, e.g.:</para>
-
-<screen role="nodump"><userinput>cat &gt; ${CLFS}/etc/udev/rules.d/83-duplicate_devs.rules &lt;&lt; EOF
-<literal>
-# Persistent symlinks for webcam and tuner
-KERNEL=="video*", SYSFS{idProduct}=="1910", SYSFS{idVendor}=="0d81", \
-    SYMLINK+="webcam"
-KERNEL=="video*", SYSFS{device}=="0x036f", SYSFS{vendor}=="0x109e", \
-    SYMLINK+="tvtuner"
-</literal>
-EOF</userinput></screen>
-
-    <para>The result is that <filename>/dev/video0</filename> and
-    <filename>/dev/video1</filename> devices still refer randomly to the tuner
-    and the web camera (and thus should never be used directly), but there are
-    symlinks <filename>/dev/tvtuner</filename> and
-    <filename>/dev/webcam</filename> that always point to the correct
-    device.</para>
-
-    <para>More information on writing Udev rules can be found in
-    <filename>/usr/share/doc/udev-&udev-version;/index.html</filename>.</para>
-
- </sect2>
-
-</sect1>
Index: BOOK/bootscripts/common/sysklogd.xml
===================================================================
--- BOOK/bootscripts/common/sysklogd.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/bootscripts/common/sysklogd.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-scripts-sysklogd">
+  <?dbhtml filename="sysklogd.html"?>
+
+  <title>Configuring the sysklogd script</title>
+
+  <indexterm zone="ch-scripts-sysklogd">
+    <primary sortas="d-sysklogd">sysklogd</primary>
+  <secondary>configuring</secondary></indexterm>
+
+  <para>The <filename>sysklogd</filename> script invokes the
+  <command>syslogd</command> program with the <option>-m 0</option> option.
+  This option turns off the periodic timestamp mark that
+  <command>syslogd</command> writes to the log files every 20 minutes by
+  default. If you want to turn on this periodic timestamp mark, edit the
+  <filename>sysklogd</filename> script and make the changes accordingly.
+  See <userinput>man syslogd</userinput> for more information.</para>
+
+</sect1>
Index: BOOK/bootscripts/common/udev-rules.xml
===================================================================
--- BOOK/bootscripts/common/udev-rules.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/bootscripts/common/udev-rules.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,195 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-scripts-udev-rules" role="wrap">
+  <?dbhtml filename="udev-rules.html"?>
+
+  <title>Udev Rules-&udev-cross-lfs-version;</title>
+
+  <indexterm zone="ch-scripts-udev-rules">
+    <primary sortas="a-Udev Rules">Udev Rules</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Udev Cross-LFS rules package contains the necessary
+    rules set for a basic functional system.</para>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Udev-Rules</title>
+
+    <para os="a">When you installed udev, it installed a set of rules. This package
+    replaces these rules. So we must first remove all the old rule
+    sets:</para>
+
+<screen os="b"><userinput>rm -vf ${LFS}/etc/udev/rules.d/*</userinput></screen>
+
+    <para os="c">Install the package:</para>
+
+<screen os="d"><userinput>make DESTDIR=${LFS} install</userinput></screen>
+
+  </sect2>
+
+  <sect2 id="contents-udev-rules" role="content">
+    <title>Contents of Udev Rules</title>
+
+    <segmentedlist>
+      <segtitle>Installed Rules</segtitle>
+      <segtitle>Installed Programs</segtitle>
+      <segtitle>Installed Bootscripts</segtitle>
+
+      <seglistitem>
+        <seg>05-udev-early.rules, 35-helper.rules, 40-modprobe.rules,
+        50-udev.rules, 55-sound.rules, 60-persistent-disk.rules,
+        61-persistent-input.rules, 90-user.rules, 95-debug.rules,
+        load_floppy_module.sh, show_event_log, udev, and udev_retry</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="z05-udev-early.rules-udev-rules">
+        <term><command>05-udev-early.rules</command></term>
+        <listitem>
+          <para>To be Written.</para>
+          <indexterm zone="ch-scripts-udev-rules z05-udev-early.rules-udev-rules">
+            <primary sortas="d-05-udev-early.rules">05-udev-early.rules</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="z35-helper.rules-udev-rules">
+        <term><command>35-helper.rules</command></term>
+        <listitem>
+          <para>To be Written.</para>
+          <indexterm zone="ch-scripts-udev-rules z35-helper.rules-udev-rules">
+            <primary sortas="d-35-helper.rules">35-helper.rules</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="z40-modprobe.rules">
+        <term><command>40-modprobe.rules</command></term>
+        <listitem>
+          <para>To be Written.</para>
+          <indexterm zone="ch-scripts-udev-rules z40-modprobe.rules">
+            <primary sortas="d-40-modprobe.rules">40-modprobe.rules</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="z50-udev.rules">
+        <term><command>50-udev.rules</command></term>
+        <listitem>
+          <para>To be Written.</para>
+          <indexterm zone="ch-scripts-udev-rules z50-udev.rules">
+            <primary sortas="d-50-udev.rules">50-udev.rules</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="z55-sound.rules">
+        <term><command>55-sound.rules</command></term>
+        <listitem>
+          <para>To be Written.</para>
+          <indexterm zone="ch-scripts-udev-rules z55-sound.rules">
+            <primary sortas="d-55-sound.rules">55-sound.rules</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="z60-persistent-disk.rules">
+        <term><command>60-persistent-disk.rules</command></term>
+        <listitem>
+          <para>To be Written.</para>
+          <indexterm zone="ch-scripts-udev-rules z60-persistent-disk.rules">
+            <primary sortas="d-60-persistent-disk.rules">60-persistent-disk.rules</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="z61-persistent-input.rules">
+        <term><command>61-persistent-input.rules</command></term>
+        <listitem>
+          <para>To be Written.</para>
+          <indexterm zone="ch-scripts-udev-rules z61-persistent-input.rules">
+            <primary sortas="d-61-persistent-input.rules">61-persistent-input.rules</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="z90-user.rules">
+        <term><command>90-user.rules</command></term>
+        <listitem>
+          <para>To be Written.</para>
+          <indexterm zone="ch-scripts-udev-rules z90-user.rules">
+            <primary sortas="d-90-user.rules">90-user.rules</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="z95-debug.rules">
+        <term><command>95-debug.rules</command></term>
+        <listitem>
+          <para>To be Written.</para>
+          <indexterm zone="ch-scripts-udev-rules z95-debug.rules">
+            <primary sortas="d-95-debug.rules">95-debug.rules</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="load_floppy_module.sh">
+        <term><command>load_floppy_module.sh</command></term>
+        <listitem>
+          <para>To be Written.</para>
+          <indexterm zone="ch-scripts-udev-rules load_floppy_module.sh">
+            <primary sortas="d-load_floppy_module.sh">load_floppy_module.sh</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="show_event_log">
+        <term><command>show_event_log</command></term>
+        <listitem>
+          <para>To be Written.</para>
+          <indexterm zone="ch-scripts-udev-rules show_event_log">
+            <primary sortas="d-show_event_log">show_event_log</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="udev">
+        <term><command>udev</command></term>
+        <listitem>
+          <para>To be Written.</para>
+          <indexterm zone="ch-scripts-udev-rules udev">
+            <primary sortas="d-udev">udev</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="udev_retry">
+        <term><command>udev_retry</command></term>
+        <listitem>
+          <para>To be Written.</para>
+          <indexterm zone="ch-scripts-udev-rules udev_retry">
+            <primary sortas="d-udev_retry">udev_retry</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
Index: BOOK/bootscripts/common/udev.xml
===================================================================
--- BOOK/bootscripts/common/udev.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/bootscripts/common/udev.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -9,31 +9,27 @@
   <?dbhtml filename="udev.html"?>
 
-  <title>Device and Module Handling on a CLFS System</title>
+  <title>Device and Module Handling on an LFS System</title>
 
   <indexterm zone="ch-scripts-udev">
     <primary sortas="a-Udev">Udev</primary>
-    <secondary>usage</secondary>
-  </indexterm>
+  <secondary>usage</secondary></indexterm>
 
   <para>In <xref linkend="chapter-building-system"/>, we installed the Udev
-  package. Before we go into the details regarding how this works,
-  a brief history of previous methods of handling devices is in
-  order.</para>
+  package. Before we go into the details regarding how this works, a brief
+  history of previous methods of handling devices is in order.</para>
 
   <para>Linux systems in general traditionally use a static device creation
   method, whereby a great many device nodes are created under <filename
   class="directory">/dev</filename> (sometimes literally thousands of nodes),
-  regardless of whether the corresponding hardware devices actually exist. This
-  is typically done via a <command>MAKEDEV</command> script, which contains a
-  number of calls to the <command>mknod</command> program with the relevant
-  major and minor device numbers for every possible device that might exist in
-  the world.</para>
-
-  <para>Using the Udev method, only those devices which are detected by the
-  kernel get device nodes created for them. Because these device nodes will be
-  created each time the system boots, they will be stored on a <systemitem
-  class="filesystem">tmpfs</systemitem> file system (a virtual file system that
-  resides entirely in system memory). Device nodes do not require much space, so
-  the memory that is used is negligible.</para>
+  regardless of whether the corresponding hardware devices actually exist.
+  This is typically done via a <command>MAKEDEV</command> script, which
+  contains a number of calls to the <command>mknod</command> program with
+  the relevant major and minor device numbers for every possible device that
+  might exist in the world. Using the Udev method, only those devices which
+  are detected by the kernel get device nodes created for them. Because
+  these device nodes will be created each time the system boots, they will
+  be stored on a <systemitem class="filesystem">tmpfs</systemitem> (a virtual
+  file system that resides entirely in system memory). Device nodes do not
+  require much space, so the memory that is used is negligible.</para>
 
   <sect2>
@@ -43,28 +39,28 @@
     class="filesystem">devfs</systemitem> was merged into the 2.3.46 kernel
     and was made available during the 2.4 series of stable kernels. Although
-    it was present in the kernel source itself, this method of creating devices
-    dynamically never received overwhelming support from the core kernel
-    developers.</para>
+    it was present in the kernel source itself, this method of creating
+    devices dynamically never received overwhelming support from the core
+    kernel developers.</para>
 
     <para>The main problem with the approach adopted by <systemitem
-    class="filesystem">devfs</systemitem> was the way it handled device
-    detection, creation, and naming. The latter issue, that of device node
-    naming, was perhaps the most critical. It is generally accepted that if
-    device names are allowed to be configurable, then the device naming policy
-    should be up to a system administrator, not imposed on them by any
-    particular developer(s). The <systemitem
+    class="filesystem">devfs</systemitem> was the way it handled
+    device detection, creation, and naming. The latter issue, that of
+    device node naming, was perhaps the most critical. It is generally
+    accepted that if device names are allowed to be configurable, then
+    the device naming policy should be up to a system administrator, not
+    imposed on them by any particular developer(s). The <systemitem
     class="filesystem">devfs</systemitem> file system also suffers from race
-    conditions that are inherent in its design and cannot be fixed without a
-    substantial revision to the kernel. It has also been marked as deprecated
-    due to a lack of recent maintenance.</para>
-
-    <para>With the development of the unstable 2.5 kernel tree, later released
-    as the 2.6 series of stable kernels, a new virtual filesystem called
-    <systemitem class="filesystem">sysfs</systemitem> came to be. The job of
-    <systemitem class="filesystem">sysfs</systemitem> is to export a view of
-    the system's hardware configuration to userspace processes. With this
-    userspace-visible representation, the possibility of seeing a userspace
-    replacement for <systemitem class="filesystem">devfs</systemitem> became
-    much more realistic.</para>
+    conditions that are inherent in its design and cannot be fixed
+    without a substantial revision to the kernel. It has also been marked
+    as deprecated due to a lack of recent maintenance.</para>
+
+    <para>With the development of the unstable 2.5 kernel tree, later
+    released as the 2.6 series of stable kernels, a new virtual filesystem
+    called <systemitem class="filesystem">sysfs</systemitem> came to be. The
+    job of <systemitem class="filesystem">sysfs</systemitem> is to export a
+    view of the system's hardware configuration to userspace processes. With
+    this userspace-visible representation, the possibility of seeing a
+    userspace replacement for <systemitem class="filesystem">devfs</systemitem>
+    became much more realistic.</para>
 
   </sect2>
@@ -73,252 +69,139 @@
     <title>Udev Implementation</title>
 
-    <sect3>
-      <title>Sysfs</title>
-
-      <para>The <systemitem class="filesystem">sysfs</systemitem> filesystem was
-      mentioned briefly above. One may wonder how <systemitem
-      class="filesystem">sysfs</systemitem> knows about the devices present on
-      a system and what device numbers should be used for them. Drivers that
-      have been compiled into the kernel directly register their objects with
-      <systemitem class="filesystem">sysfs</systemitem> as they are detected by
-      the kernel. For drivers compiled as modules, this registration will happen
-      when the module is loaded. Once the <systemitem
-      class="filesystem">sysfs</systemitem> filesystem is mounted (on <filename
-      class="directory">/sys</filename>), data which the built-in drivers
-      registered with <systemitem class="filesystem">sysfs</systemitem> are
-      available to userspace processes and to <command>udevd</command> for device
-      node creation.</para>
-
-    </sect3>
-
-    <sect3>
-      <title>Udev Bootscript</title>
-
-      <para>The <command>S10udev</command> initscript takes care of creating
-      device nodes when Linux is booted. The script unsets the uevent handler
-      from the default of <command>/sbin/hotplug</command>.  This is done
-      because the kernel no longer needs to call out to an external binary.
-      Instead <command>udevd</command> will listen on a netlink socket for
-      uevents that the kernel raises. Next, the bootscript copies any static
-      device nodes that exist in <filename
-      class="directory">/lib/udev/devices</filename> to <filename
-      class="directory">/dev</filename>. This is necessary because some devices,
-      directories, and symlinks are needed before the dynamic device handling
-      processes are available during the early stages of booting a system.
-      Creating static device nodes in <filename
-      class="directory">/lib/udev/devices</filename> also provides an easy
-      workaround for devices that are not supported by the dynamic device
-      handling infrastructure. The bootscript then starts the Udev daemon,
-      <command>udevd</command>, which will act on any uevents it receives.
-      Finally, the bootscript forces the kernel to replay uevents for any
-      devices that have already been registered and then waits for
-      <command>udevd</command> to handle them.</para>
-
-    </sect3>
-
-    <sect3>
-      <title>Device Node Creation</title>
-
-      <para>To obtain the right major and minor number for a device, Udev relies
-      on the information provided by <systemitem
-      class="filesystem">sysfs</systemitem> in <filename
-      class="directory">/sys</filename>.  For example,
-      <filename>/sys/class/tty/vcs/dev</filename> contains the string
-      <quote>7:0</quote>. This string is used by <command>udevd</command>
-      to create a device node with major number <emphasis>7</emphasis> and minor
-      <emphasis>0</emphasis>. The names and permissions of the nodes created
-      under the <filename class="directory">/dev</filename> directory are
-      determined by rules specified in the files within the <filename
-      class="directory">/etc/udev/rules.d/</filename> directory. These are
-      numbered in a similar fashion to the CLFS-Bootscripts package. If
-      <command>udevd</command> can't find a rule for the device it is creating,
-      it will default permissions to <emphasis>660</emphasis> and ownership to
-      <emphasis>root:root</emphasis>. Documentation on the syntax of the Udev
-      rules configuration files is available in
-      <filename>/usr/share/doc/udev-&udev-version;/index.html</filename></para>
-
-    </sect3>
-
-    <sect3>
-      <title>Module Loading</title>
-
-      <para>Device drivers compiled as modules may have aliases built into them.
-      Aliases are visible in the output of the <command>modinfo</command>
-      program and are usually related to the bus-specific identifiers of devices
-      supported by a module. For example, the <emphasis>snd-fm801</emphasis>
-      driver supports PCI devices with vendor ID 0x1319 and device ID 0x0801,
-      and has an alias of <quote>pci:v00001319d00000801sv*sd*bc04sc01i*</quote>.
-      For most devices, the bus driver exports the alias of the driver that
-      would handle the device via <systemitem
-      class="filesystem">sysfs</systemitem>. E.g., the
-      <filename>/sys/bus/pci/devices/0000:00:0d.0/modalias</filename> file
-      might contain the string
-      <quote>pci:v00001319d00000801sv00001319sd00001319bc04sc01i00</quote>.
-      The default rules provided by Udev will cause <command>udevd</command>
-      to call out to <command>/sbin/modprobe</command> with the contents of the
-      <envar>MODALIAS</envar> uevent environment variable (that should be the
-      same as the contents of the <filename>modalias</filename> file in sysfs),
-      thus loading all modules whose aliases match this string after wildcard
-      expansion.</para>
-
-      <para>In this example, this means that, in addition to
-      <emphasis>snd-fm801</emphasis>, the obsolete (and unwanted)
-      <emphasis>forte</emphasis> driver will be loaded if it is
-      available. See below for ways in which the loading of unwanted drivers can
-      be prevented.</para>
-
-      <para>The kernel itself is also able to load modules for network
-      protocols, filesystems and NLS support on demand.</para>
-
-    </sect3>
-
-    <sect3>
-      <title>Handling Hotpluggable/Dynamic Devices</title>
-
-      <para>When you plug in a device, such as a Universal Serial Bus (USB) MP3
-      player, the kernel recognizes that the device is now connected and
-      generates a uevent. This uevent is then handled by
-      <command>udevd</command> as described above.</para>
-
-    </sect3>
-
-  </sect2>
-
-  <sect2>
-    <title>Problems with Loading Modules and Creating Devices</title>
-
-    <para>There are a few possible problems when it comes to automatically
-    creating device nodes.</para>
-
-    <sect3>
-      <title>A kernel module is not loaded automatically</title>
-
-      <para>Udev will only load a module if it has a bus-specific alias and the
-      bus driver properly exports the necessary aliases to <systemitem
-      class="filesystem">sysfs</systemitem>. In other cases, one should
-      arrange module loading by other means. With Linux-&linux-version;, Udev is
-      known to load properly-written drivers for INPUT, IDE, PCI, USB, SCSI,
-      SERIO and FireWire devices.</para>
-
-      <para>To determine if the device driver you require has the necessary
-      support for Udev, run <command>modinfo</command> with the module name as
-      the argument.  Now try locating the device directory under
-      <filename class="directory">/sys/bus</filename> and check whether there is
-      a <filename>modalias</filename> file there.</para>
-
-      <para>If the <filename>modalias</filename> file exists in <systemitem
-      class="filesystem">sysfs</systemitem>, the driver supports the device and
-      can talk to it directly, but doesn't have the alias, it is a bug in the
-      driver. Load the driver without the help from Udev and expect the issue
-      to be fixed later.</para>
-
-      <para>If there is no <filename>modalias</filename> file in the relevant
-      directory under <filename class="directory">/sys/bus</filename>, this
-      means that the kernel developers have not yet added modalias support to
-      this bus type. With Linux-&linux-version;, this is the case with ISA
-      busses. Expect this issue to be fixed in later kernel versions.</para>
-
-      <para>Udev is not intended to load <quote>wrapper</quote> drivers such as
-      <emphasis>snd-pcm-oss</emphasis> and non-hardware drivers such as
-      <emphasis>loop</emphasis> at all.</para>
-
-    </sect3>
-
-    <sect3>
-      <title>A kernel module is not loaded automatically, and Udev is not
-      intended to load it</title>
-
-      <para>If the <quote>wrapper</quote> module only enhances the functionality
-      provided by some other module (e.g., <emphasis>snd-pcm-oss</emphasis>
-      enhances the functionality of <emphasis>snd-pcm</emphasis> by making the
-      sound cards available to OSS applications), configure
-      <command>modprobe</command> to load the wrapper after Udev loads the
-      wrapped module. To do this, add an <quote>install</quote> line in
-      <filename>/etc/modprobe.conf</filename>. For example:</para>
-
-<screen role="nodump"><literal>install snd-pcm /sbin/modprobe -i snd-pcm ; \
-    /sbin/modprobe snd-pcm-oss ; true</literal></screen>
-
-      <para>If the module in question is not a wrapper and is useful by itself,
-      configure the <command>S05modules</command> bootscript to load this
-      module on system boot. To do this, add the module name to the
-      <filename>/etc/sysconfig/modules</filename> file on a separate line.
-      This works for wrapper modules too, but is suboptimal in that case.</para>
-
-    </sect3>
-
-    <sect3>
-      <title>Udev loads some unwanted module</title>
-
-      <para>Either don't build the module, or blacklist it in
-      <filename>/etc/modprobe.conf</filename> file as done with the
-      <emphasis>forte</emphasis> module in the example below:</para>
-
-<screen role="nodump"><literal>blacklist forte</literal></screen>
-
-      <para>Blacklisted modules can still be loaded manually with the
-      explicit <command>modprobe</command> command.</para>
-
-    </sect3>
-
-    <sect3>
-      <title>Udev creates a device incorrectly, or makes a wrong symlink</title>
-
-      <para>This usually happens if a rule unexpectedly matches a device. For
-      example, a poorly-writen rule can match both a SCSI disk (as desired)
-      and the corresponding SCSI generic device (incorrectly) by vendor.
-      Find the offending rule and make it more specific, with the help of
-      <command>udevadm info</command>.</para>
-
-    </sect3>
-
-    <sect3>
-      <title>Udev rule works unreliably</title>
-
-      <para>This may be another manifestation of the previous problem. If not,
-      and your rule uses <systemitem class="filesystem">sysfs</systemitem>
-      attributes, it may be a kernel timing issue, to be fixed in later kernels.
-      For now, you can work around it by creating a rule that waits for the used
-      <systemitem class="filesystem">sysfs</systemitem> attribute and appending
-      it to the <filename>/etc/udev/rules.d/10-wait_for_sysfs.rules</filename>
-      file. Please notify the CLFS Development list if you do so and it
-      helps.</para>
-
-    </sect3>
-
-    <sect3>
-      <title>Udev does not create a device</title>
-
-      <para>Further text assumes that the driver is built statically into the
-      kernel or already loaded as a module, and that you have already checked
-      that Udev doesn't create a misnamed device.</para>
-
-      <para>Udev has no information needed to create a device node if a kernel
-      driver does not export its data to <systemitem
-      class="filesystem">sysfs</systemitem>.
-      This is most common with third party drivers from outside the kernel
-      tree. Create a static device node in
-      <filename>/lib/udev/devices</filename> with the appropriate major/minor
-      numbers (see the file <filename>devices.txt</filename> inside the kernel
-      documentation or the documentation provided by the third party driver
-      vendor). The static device node will be copied to
-      <filename class="directory">/dev</filename> by the
-      <command>S10udev</command> bootscript.</para>
-
-    </sect3>
-
-    <sect3>
-      <title>Device naming order changes randomly after rebooting</title>
-
-      <para>This is due to the fact that Udev, by design, handles uevents and
-      loads modules in parallel, and thus in an unpredictable order. This will
-      never be <quote>fixed</quote>. You should not rely upon the kernel device
-      names being stable. Instead, create your own rules that make symlinks with
-      stable names based on some stable attributes of the device, such as a
-      serial number or the output of various *_id utilities installed by Udev.
-      See <xref linkend="ch-scripts-symlinks"/> and
-      <xref linkend="chapter-network"/> for examples.</para>
-
-    </sect3>
+    <para>The <systemitem class="filesystem">sysfs</systemitem> filesystem
+    was mentioned briefly above. One may wonder how <systemitem
+    class="filesystem">sysfs</systemitem> knows about the devices present
+    on a system and what device numbers should be used for them. Drivers
+    that have been compiled into the kernel directly register their objects
+    with <systemitem class="filesystem">sysfs</systemitem> as they are
+    detected by the kernel. For drivers compiled as modules, this
+    registration will happen when the module is loaded. Once the
+    <systemitem class="filesystem">sysfs</systemitem> filesystem is mounted
+    (on <filename class="directory">/sys</filename>), data which the built-in
+    drivers registered with <systemitem class="filesystem">sysfs</systemitem>
+    are available to userspace processes and to <command>udev</command> for
+    device node creation.</para>
+
+    <para>The <command>S10udev</command> initscript takes care of creating
+    these device nodes when Linux is booted. This script starts by registering
+    <command>/sbin/udevsend</command> as a hotplug event handler. Hotplug
+    events (discussed below) are not usually generated during this stage,
+    but <command>udev</command> is registered just in case they do occur.
+    The <command>udevstart</command> program then walks through the
+    <systemitem class="filesystem">/sys</systemitem> filesystem and creates
+    devices under <filename class="directory">/dev</filename> that match the
+    descriptions. For example, <filename>/sys/class/tty/vcs/dev</filename>
+    contains the string <quote>7:0</quote> This string is used by
+    <command>udevstart</command> to create <filename>/dev/vcs</filename>
+    with major number <emphasis>7</emphasis> and minor <emphasis>0</emphasis>.
+    The names and permissions of the nodes created under the <filename
+    class="directory">/dev</filename> directory are configured according to
+    the rules specified in the files within the <filename
+    class="directory">/etc/udev/rules.d/</filename> directory. These are
+    numbered in a similar fashion to the LFS-Bootscripts package. If
+    <command>udev</command> can't find a rule for the device it is creating,
+    it will default permissions to <emphasis>660</emphasis> and ownership to
+    <emphasis>root:root</emphasis>.</para>
+
+    <para>Once the above stage is complete, all devices that were already
+    present and have compiled-in drivers will be available for use. This
+    leads us to the devices that have modular drivers.</para>
+
+    <para>Earlier, we mentioned the concept of a <quote>hotplug event
+    handler.</quote> When a new device connection is detected by the kernel,
+    the kernel will generate a hotplug event and look at the file
+    <filename>/proc/sys/kernel/hotplug</filename> to determine the userspace
+    program that handles the device's connection. The <command>udev</command>
+    bootscript registered <command>udevsend</command> as this handler. When
+    these hotplug events are generated, the kernel will tell
+    <command>udev</command> to check the <filename
+    class="directory">/sys</filename> filesystem for the information
+    pertaining to this new device and create the <filename
+    class="directory">/dev</filename> entry for it.</para>
+
+    <para>This brings us to one problem that exists with
+    <command>udev</command>, and likewise with <systemitem
+    class="filesystem">devfs</systemitem> before it. It is commonly
+    referred to as the <quote>chicken and egg</quote> problem. Most
+    Linux distributions handle loading modules via entries in
+    <filename>/etc/modules.conf</filename>. Access to a device node causes
+    the appropriate kernel module to load. With <command>udev</command>,
+    this method will not work because the device node does not exist until
+    the module is loaded. To solve this, the <command>S05modules</command>
+    bootscript was added to the LFS-Bootscripts package, along with the
+    <filename>/etc/sysconfig/modules</filename> file. By adding module
+    names to the <filename>modules</filename> file, these modules will be
+    loaded when the computer starts up. This allows <command>udev</command>
+    to detect the devices and create the appropriate device nodes.</para>
+
+    <para>Note that on slower machines or for drivers that create a lot
+    of device nodes, the process of creating devices may take a few
+    seconds to complete. This means that some device nodes may not be
+    immediately accessible.</para>
+
+  </sect2>
+
+  <sect2>
+    <title>Handling Hotpluggable/Dynamic Devices</title>
+
+    <para>When you plug in a device, such as a Universal Serial Bus (USB)
+    MP3 player, the kernel recognizes that the device is now connected and
+    generates a hotplug event. If the driver is already loaded (either
+    because it was compiled into the kernel or because it was loaded via
+    the <command>S05modules</command> bootscript), <command>udev</command>
+    will be called upon to create the relevant device node(s) according to
+    the <systemitem class="filesystem">sysfs</systemitem> data available in
+    <filename class="directory">/sys</filename>.</para>
+
+    <para>If the driver for the just plugged in device is available as a
+    module but currently unloaded, the Hotplug package will load the
+    appropriate module and make this device available by creating the
+    device node(s) for it.</para>
+
+  </sect2>
+
+  <sect2>
+    <title>Problems with Creating Devices</title>
+
+    <para>There are a few known problems when it comes to automatically
+    creating device nodes:</para>
+
+    <para>1) A kernel driver may not export its data to <systemitem
+    class="filesystem">sysfs</systemitem>.</para>
+
+    <para>This is most common with third party drivers from outside the
+    kernel tree. Udev will be unable to automatically create device nodes
+    for such drivers. Use the <filename>/etc/sysconfig/createfiles</filename>
+    configuration file to manually create the devices. Consult the
+    <filename>devices.txt</filename> file inside the kernel documentation
+    or the documentation for that driver to find the proper major/minor
+    numbers.</para>
+
+    <para>2) A non-hardware device is required. This is most common with
+    the Advanced Linux Sound Architecture (ALSA) project's Open Sound
+    System (OSS) compatibility module. These types of devices can be
+    handled in one of two ways:</para>
+
+    <itemizedlist>
+      <listitem>
+        <para>Adding the module names to
+        <filename>/etc/sysconfig/modules</filename></para>
+      </listitem>
+      <listitem>
+        <para>Using an <quote>install</quote> line in
+        <filename>/etc/modprobe.conf</filename>. This tells the
+        <command>modprobe</command> command <quote>when loading this
+        module, also load this other module, at the same time.</quote>
+        For example:</para>
+
+<screen><userinput>install snd-pcm modprobe -i snd-pcm ; modprobe \
+    snd-pcm-oss ; true</userinput></screen>
+
+        <para>This will cause the system to load both the
+        <emphasis>snd-pcm</emphasis> and <emphasis>snd-pcm-oss</emphasis>
+        modules when any request is made to load the driver
+        <emphasis>snd-pcm</emphasis>.</para>
+      </listitem>
+    </itemizedlist>
 
   </sect2>
@@ -331,15 +214,16 @@
 
     <itemizedlist>
-
       <listitem>
         <para remap="verbatim">A Userspace Implementation of <systemitem class="filesystem">devfs</systemitem>
         <ulink url="http://www.kroah.com/linux/talks/ols_2003_udev_paper/Reprint-Kroah-Hartman-OLS2003.pdf"/></para>
       </listitem>
-
-      <listitem>
-        <para remap="verbatim">The <systemitem class="filesystem">sysfs</systemitem> Filesystem
-        <ulink url="http://www.kernel.org/pub/linux/kernel/people/mochel/doc/papers/ols-2005/mochel.pdf"/></para>
-      </listitem>
-
+      <listitem>
+        <para remap="verbatim">udev FAQ
+        <ulink url="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev-FAQ"/></para>
+      </listitem>
+      <listitem>
+        <para remap="verbatim">The Linux Kernel Driver Model
+        <ulink url="http://public.planetmirror.com/pub/lca/2003/proceedings/papers/Patrick_Mochel/Patrick_Mochel.pdf"/></para>
+      </listitem>
     </itemizedlist>
 
Index: BOOK/bootscripts/common/usage.xml
===================================================================
--- BOOK/bootscripts/common/usage.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/bootscripts/common/usage.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -19,5 +19,5 @@
   different from one system to another, so it cannot be assumed that
   because things worked in one particular Linux distribution, they should work
-  the same in CLFS too. CLFS has its own way of doing things, but it
+  the same in LFS too. LFS has its own way of doing things, but it
   respects generally accepted standards.</para>
 
@@ -124,5 +124,5 @@
 
   <para>Feel free to modify the way the boot process works (after all,
-  it is your own CLFS system). The files given here are an example of how
+  it is your own LFS system). The files given here are an example of how
   it can be done.</para>
 
Index: OK/bootscripts/hppa-chapter.xml
===================================================================
--- BOOK/bootscripts/hppa-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,25 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../general.ent">
-  %general-entities;
-]>
-
-<chapter id="chapter-bootscripts" xreflabel="Setting Up System Bootscripts">
-  <?dbhtml dir="bootscripts"?>
-  <?dbhtml filename="chapter.html"?>
-
-  <title>Setting Up System Bootscripts</title>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/introduction.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/bootscripts.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/usage.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/setclock.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/console.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/udev.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/symlinks.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/profile.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/locale.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/inputrc.xml"/>
-
-</chapter>
Index: OK/bootscripts/x86-chapter.xml
===================================================================
--- BOOK/bootscripts/x86-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,25 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../general.ent">
-  %general-entities;
-]>
-
-<chapter id="chapter-bootscripts" xreflabel="Setting Up System Bootscripts">
-  <?dbhtml dir="bootscripts"?>
-  <?dbhtml filename="chapter.html"?>
-
-  <title>Setting Up System Bootscripts</title>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/introduction.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/bootscripts.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/usage.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/setclock.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/console.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/udev.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/symlinks.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/profile.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/locale.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/inputrc.xml"/>
-
-</chapter>
Index: OK/cross-tools/alpha-chapter.xml
===================================================================
--- BOOK/cross-tools/alpha-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,32 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../general.ent">
-  %general-entities;
-]>
-
-<chapter id="chapter-cross-tools" xreflabel="Constructing Cross-Compile Tools">
-  <?dbhtml dir="cross-tools"?>
-  <?dbhtml filename="chapter.html"?>
-
-  <title>Constructing Cross-Compile Tools</title>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/introduction.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/cflags.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="alpha/variables.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="alpha/linux-headers.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gmp.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/mpfr.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/ppl.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/cloog-ppl.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/binutils.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gcc-static.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="alpha/eglibc.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gcc-final.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/file.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/groff.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/shadow.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/ncurses.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/sysroot_wrapper.xml"/>
-
-</chapter>
Index: OK/cross-tools/alpha/eglibc.xml
===================================================================
--- BOOK/cross-tools/alpha/eglibc.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,126 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-cross-tools-eglibc" role="wrap">
-  <title>EGLIBC-&eglibc-version;</title>
-
-  <?dbhtml filename="eglibc.html"?>
-
-  <indexterm zone="ch-cross-tools-eglibc">
-    <primary sortas="a-EGLIBC">EGLIBC</primary>
-  </indexterm>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../common/eglibc.xml"
-  xpointer="xpointer(//*[@role='package'])"/>
-
-  <sect2 role="installation">
-    <title>Installation of EGLIBC</title>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='a'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='p1'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='p2'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='s1'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='s2'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='b'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='c'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='d'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='e'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='f'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='g'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='h'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='i'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='j'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='k'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='l'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='m'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='n'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='o'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='p'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='q'])"/>
-
-  </sect2>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../common/eglibc.xml"
-  xpointer="xpointer(id('i18n-eglibc'))"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../common/eglibc.xml"
-  xpointer="xpointer(id('conf-eglibc'))"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../common/eglibc.xml"
-  xpointer="xpointer(id('conf-ld'))"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../common/eglibc.xml"
-  xpointer="xpointer(id('contents-eglibc'))"/>
-
-</sect1>
Index: OK/cross-tools/alpha/linux-headers.xml
===================================================================
--- BOOK/cross-tools/alpha/linux-headers.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,49 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-cross-tools-linux-headers" role="wrap">
-  <?dbhtml filename="linux-headers.html"?>
-
-  <title>Linux-Headers-&linux-version;</title>
-
-  <indexterm zone="ch-cross-tools-linux-headers">
-    <primary sortas="a-Linux-Headers">Linux-Headers</primary>
-  </indexterm>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/linux-headers.xml"
-  xpointer="xpointer(//*[@role='package'])"/>
-
-  <sect2 role="installation">
-    <title>Installation of Linux Headers</title>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/linux-headers.xml"
-    xpointer="xpointer(//*[@os='a'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/linux-headers.xml"
-    xpointer="xpointer(//*[@os='b'])"/>
-
-<screen os="c"><userinput>make mrproper
-make ARCH=alpha headers_check
-make ARCH=alpha INSTALL_HDR_PATH=dest headers_install
-cp -rv dest/include/* ${CLFS}/usr/include
-find ${CLFS}/usr/include -name .install -or -name ..install.cmd | xargs rm -fv</userinput></screen>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/linux-headers.xml"
-    xpointer="xpointer(//*[@os='d'])"/>
-
-  </sect2>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/linux-headers.xml"
-  xpointer="xpointer(id('contents-linux-headers'))"/>
-
-</sect1>
-
Index: OK/cross-tools/alpha/variables.xml
===================================================================
--- BOOK/cross-tools/alpha/variables.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,37 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-cross-tools-variables">
-  <?dbhtml filename="variables.html"?>
-
-  <title>Build Variables</title>
-
-  <bridgehead renderas="sect4">Setting Host and Target</bridgehead>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/variables.xml"
-  xpointer="xpointer(//*[@os='a'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/variables.xml"
-  xpointer="xpointer(//*[@os='b'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/variables.xml"
-  xpointer="xpointer(//*[@os='c'])"/>
-
-<screen os="d"><userinput>export CLFS_TARGET="alpha-unknown-linux-gnu"</userinput></screen>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/variables.xml"
-  xpointer="xpointer(//*[@os='e'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/variables.xml"
-  xpointer="xpointer(//*[@os='f'])"/>
-
-</sect1>
Index: BOOK/cross-tools/arm-chapter.xml
===================================================================
--- BOOK/cross-tools/arm-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/cross-tools/arm-chapter.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../general.ent">
   %general-entities;
@@ -16,17 +16,8 @@
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="arm/variables.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="arm/linux-headers.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gmp.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/mpfr.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/ppl.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/cloog-ppl.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/binutils.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gcc-static.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="arm/eglibc.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/glibc.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gcc-final.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/file.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/groff.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/shadow.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/ncurses.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/sysroot_wrapper.xml"/>
 
 </chapter>
Index: OK/cross-tools/arm/eglibc.xml
===================================================================
--- BOOK/cross-tools/arm/eglibc.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,132 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-cross-tools-eglibc" role="wrap">
-  <title>EGLIBC-&eglibc-version;</title>
-
-  <?dbhtml filename="eglibc.html"?>
-
-  <indexterm zone="ch-cross-tools-eglibc">
-    <primary sortas="a-EGLIBC">EGLIBC</primary>
-  </indexterm>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../common/eglibc.xml"
-  xpointer="xpointer(//*[@role='package'])"/>
-
-  <sect2 role="installation">
-    <title>Installation of EGLIBC</title>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='a'])"/>
-
-    <para os="u1">This architecture is no longer supported in the main eglibc
-    tree, so we have to extract the eglibc-ports-&eglibc-version; package into
-    our eglibc-&eglibc-version; directory:</para>
-
-<screen os="u2"><userinput>tar -jxvf ../eglibc-ports-&eglibc-ports-dl-version;.tar.bz2</userinput></screen>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='p1'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='p2'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='s1'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='s2'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='b'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='c'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='d'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='e'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='f'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='g'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='h'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='i'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='j'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='k'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='l'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='m'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='n'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='o'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='p'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='q'])"/>
-
-  </sect2>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../common/eglibc.xml"
-  xpointer="xpointer(id('i18n-eglibc'))"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../common/eglibc.xml"
-  xpointer="xpointer(id('conf-eglibc'))"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../common/eglibc.xml"
-  xpointer="xpointer(id('conf-ld'))"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../common/eglibc.xml"
-  xpointer="xpointer(id('contents-eglibc'))"/>
-
-</sect1>
Index: BOOK/cross-tools/arm/linux-headers.xml
===================================================================
--- BOOK/cross-tools/arm/linux-headers.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/cross-tools/arm/linux-headers.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,15 +1,15 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
 ]>
 
-<sect1 id="ch-cross-tools-linux-headers" role="wrap">
+<sect1 id="ch-system-linux-headers" role="wrap">
   <?dbhtml filename="linux-headers.html"?>
 
-  <title>Linux-Headers-&linux-version;</title>
+  <title>Linux-Headers-&linux-headers-version;</title>
 
-  <indexterm zone="ch-cross-tools-linux-headers">
+  <indexterm zone="ch-system-linux-headers">
     <primary sortas="a-Linux-Headers">Linux-Headers</primary>
   </indexterm>
@@ -18,5 +18,5 @@
     <title/>
 
-    <para>The Linux Kernel contains a make target that installs
+    <para>The Linux Headers package contains the
     <quote>sanitized</quote> kernel headers.</para>
 
@@ -26,44 +26,31 @@
     <title>Installation of Linux-Headers</title>
 
-    <para os="a">For this step you will need the kernel tarball.</para>
+    <para os="a">For years it has been common practice to use
+    <quote>raw</quote> kernel headers (straight from a kernel tarball) in
+    <filename class="directory">/usr/include</filename>, but over the last few
+    years, the kernel developers have taken a strong stance that this
+    should not be done. This gave birth to the Linux-Libc-Headers Project,
+    which was designed to maintain an API stable version of the Linux
+    headers. Recently this project stopped producing updates, so the Cross-LFS
+    team started development on our own project to sanitize the headers.</para>
 
-    <para os="b">Install the kernel header files:</para>
+    <para os="b">Install the header files that are common to all architectures:</para>
 
-<screen os="c"><userinput>make mrproper
-make ARCH=arm headers_check
-make ARCH=arm INSTALL_HDR_PATH=dest headers_install
-cp -rv dest/include/* ${CLFS}/usr/include
-find ${CLFS}/usr/include -name .install -or -name ..install.cmd | xargs rm -fv</userinput></screen>
+<screen os="c"><userinput>install -dv ${LFS}/usr/include/{asm,asm-generic,linux,net,mtd,scsi,sound}
+cp -av include/asm-generic/* ${LFS}/usr/include/asm-generic
+cp -av include/linux/* ${LFS}/usr/include/linux
+cp -av include/mtd/* ${LFS}/usr/include/mtd
+cp -av include/net/* ${LFS}/usr/include/net
+cp -av include/scsi/* ${LFS}/usr/include/scsi
+cp -av include/sound/* ${LFS}/usr/include/sound</userinput></screen>
 
-    <variablelist os="d">
-      <title>The meaning of the make commands:</title>
+    <para os="d">Install the header files that are specific to this architecture:</para>
 
-      <varlistentry os="d1">
-        <term><parameter>make mrproper</parameter></term>
-        <listitem>
-          <para>Ensures that the kernel source dir is clean.</para>
-        </listitem>
-      </varlistentry>
+<screen><userinput>cp -av include/asm-arm/* ${LFS}/usr/include/asm</userinput></screen>
 
-      <varlistentry os="d2">
-        <term><parameter>make ARCH=<replaceable>[arch]</replaceable> headers_check</parameter></term>
-        <listitem>
-          <para>Sanitizes the raw kernel headers so that they can be used
-          by userspace programs.</para>
-        </listitem>
-      </varlistentry>
+    <para os="e">Make sure the users can read the headers:</para>
 
-      <varlistentry os="d3">
-        <term><parameter>make ARCH=<replaceable>[arch]</replaceable> INSTALL_HDR_PATH=dest headers_install</parameter></term>
-        <listitem>
-          <para>Normally the headers_install target removes the entire
-          destination directory (default
-          <filename class="directory">/usr/include</filename>) before
-          installing the headers. To prevent this, we tell the kernel to
-          install the headers to a directory inside the source dir.</para>
-        </listitem>
-      </varlistentry>
-
-    </variablelist>
+<screen os="f"><userinput>find ${LFS}/usr/include/{asm,asm-generic,linux,mtd,net,scsi,sound} -type d -exec chmod -v 755 {} \;
+find ${LFS}/usr/include/{asm,asm-generic,linux,mtd,net,scsi,sound} -type f -exec chmod -v 644 {} \;</userinput></screen>
 
   </sect2>
@@ -76,5 +63,5 @@
 
       <seglistitem>
-        <seg>/usr/include/{asm,asm-generic,drm,linux,mtd,rdma,sound,video}/*.h</seg>
+        <seg>/usr/include/{asm,linux}/*.h</seg>
       </seglistitem>
     </segmentedlist>
@@ -87,8 +74,8 @@
       <varlistentry id="linux-headers">
         <term><filename
-        class="headerfile">/usr/include/{asm,asm-generic,drm,linux,mtd,rdma,sound,video}/*.h</filename></term>
+        class="headerfile">/usr/include/{asm,linux}/*.h</filename></term>
         <listitem>
           <para>The Linux API headers</para>
-          <indexterm zone="ch-cross-tools-linux-headers linux-headers">
+          <indexterm zone="ch-system-linux-headers linux-headers">
             <primary
             sortas="e-/usr/include/{asm,linux}/*.h">/usr/include/{asm,linux}/*.h</primary>
Index: BOOK/cross-tools/arm/variables.xml
===================================================================
--- BOOK/cross-tools/arm/variables.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/cross-tools/arm/variables.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -15,28 +15,58 @@
   <para os="a">During the building of the cross-compile tools you will need to
   set a few variables that will be dependent on your particular needs.
-  The first variable will be the triplet of the host machine, which will be
-  put into the <envar>CLFS_HOST</envar> variable. To account for the
-  possibility that the host and target are the same arch, as cross-compiling
-  won't work when host and target are the same, part of the triplet needs to
-  be changed slightly to add "cross". Set <envar>CLFS_HOST</envar> using the
-  following command:</para>
+  The first variable will be the triplet of the <envar>HOST</envar> machine.
+  You will need to set the <envar>CHOST</envar> triplet to match your
+  particular needs. To set this information you can issue the following
+  command:</para>
 
-<screen os="b"><userinput>export CLFS_HOST="$(echo $MACHTYPE | \
-    sed "s/$(echo $MACHTYPE | cut -d- -f2)/cross/")"</userinput></screen>
+<screen os="b"><userinput>export LFS_HOST="`echo ${MACHTYPE} | sed -e 's/unknown/cross/g' -e 's/-pc-/-cross-/g'`"</userinput></screen>
 
-  <para os="c">Now you will need to set the triplet for the target
-  architecture. Set the target variable using the following command:</para>
+  <para os="c">Now you will need to set the target triplet for the target
+  architecture. You can do this by running the same command as above, just
+  running it on the target machine. If you can't run the command on the
+  target machine, you can use the table at the bottom of this page. Set
+  the command using the method listed below:</para>
 
-<screen os="d"><userinput>export CLFS_TARGET="arm-unknown-linux-gnu"</userinput></screen>
+<screen os="d"><userinput>export LFS_TARGET="{target triplet}"</userinput></screen>
 
   <bridgehead renderas="sect4">Copy settings to Environment</bridgehead>
 
-  <para os="e">Now add these to <filename>~/.bashrc</filename>, just in
+  <para os="e">Now we will add these to <filename>~/.bashrc</filename>, just in
   case you have to exit and restart building later:</para>
 
-<screen os="f"><userinput>cat &gt;&gt; ~/.bashrc &lt;&lt; EOF
-export CLFS_HOST="${CLFS_HOST}"
-export CLFS_TARGET="${CLFS_TARGET}"
-EOF</userinput></screen>
+<screen os="f"><userinput>echo export LFS_HOST=\""${LFS_HOST}\"" &gt;&gt; ~/.bashrc
+echo export LFS_TARGET=\""${LFS_TARGET}\"" &gt;&gt; ~/.bashrc</userinput></screen>
+
+  <table os="g">
+    <title>Processor Type and  Target Triplets</title>
+    <tgroup cols="2" align="center">
+      <colspec colname="Processor"/>
+      <colspec colname="Triplet"/>
+      <thead>
+        <row>
+          <entry>Processor</entry>
+          <entry>Target Triplet</entry>
+        </row>
+      </thead>
+      <tbody>
+        <row>
+          <entry>486 Compatibles</entry>
+          <entry>i486-pc-linux-gnu</entry>
+        </row>
+        <row>
+          <entry>Pentium, K6, 586 Compatibles</entry>
+          <entry>i586-pc-linux-gnu</entry>
+        </row>
+        <row>
+          <entry>Pentium II, Pentium III, Pentium 4</entry>
+          <entry>i686-pc-linux-gnu</entry>
+        </row>
+        <row>
+          <entry>Athlon, Duron</entry>
+          <entry>i686-pc-linux-gnu</entry>
+        </row>
+      </tbody>
+    </tgroup>
+  </table>
 
 </sect1>
Index: BOOK/cross-tools/common/binutils.xml
===================================================================
--- BOOK/cross-tools/common/binutils.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/cross-tools/common/binutils.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -24,30 +24,27 @@
 
     <para os="da">It is important that Binutils be the first package compiled
-    because both EGLIBC and GCC perform various tests on the available
+    because both Glibc and GCC perform various tests on the available
     linker and assembler to determine which of their own features to
     enable.</para>
 
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../../final-system/common/binutils.xml"
-    xpointer="xpointer(//*[@os='p3'])"/>
+    <para os="ba">To make sure that the proper syntax is used for a couple of
+    tools, apply the following patch:</para>
+
+<screen os="bb"><userinput>patch -Np1 -i ../&binutils-posix-patch;</userinput></screen>
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     href="../../final-system/common/binutils.xml"
-    xpointer="xpointer(//*[@os='p4'])"/>
+    xpointer="xpointer(//*[@os='g'])"/>
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     href="../../final-system/common/binutils.xml"
-    xpointer="xpointer(//*[@os='a'])"/>
+    xpointer="xpointer(//*[@os='h'])"/>
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     href="../../final-system/common/binutils.xml"
-    xpointer="xpointer(//*[@os='b'])"/>
+    xpointer="xpointer(//*[@os='i'])"/>
 
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../../final-system/common/binutils.xml"
-    xpointer="xpointer(//*[@os='c'])"/>
-
-<screen os="bc"><userinput>AR=ar AS=as ../binutils-&binutils-version;/configure --prefix=${CLFS}/cross-tools \
-   --host=${CLFS_HOST} --target=${CLFS_TARGET} --with-sysroot=${CLFS} \
+<screen os="bc"><userinput>../binutils-&binutils-version;/configure --prefix=/cross-tools \
+   --host=${LFS_HOST} --target=${LFS_TARGET} --with-sysroot=${LFS} \
    --disable-nls --enable-shared --disable-multilib</userinput></screen>
 
@@ -56,8 +53,8 @@
 
       <varlistentry os="bd1">
-        <term><parameter>--prefix=${CLFS}/cross-tools</parameter></term>
+        <term><parameter>--prefix=/cross-tools</parameter></term>
         <listitem>
           <para>This tells the configure script to prepare to install the
-          package in the <filename class="directory">${CLFS}/cross-tools</filename>
+          package in the <filename class="directory">/cross-tools</filename>
           directory.</para>
         </listitem>
@@ -65,26 +62,24 @@
 
       <varlistentry os="bd2">
-        <term><parameter>--host=${CLFS_HOST}</parameter></term>
+        <term><parameter>--host=${LFS_HOST}</parameter></term>
         <listitem>
           <para>When used with --target, this creates a cross-architecture
-          executable that creates files for ${CLFS_TARGET} but runs on
-          ${CLFS_HOST}.</para>
+          executable that creates files for ${LFS_TARGET} but runs on ${LFS_HOST).</para>
         </listitem>
       </varlistentry>
 
       <varlistentry os="bd3">
-        <term><parameter>--target=${CLFS_TARGET}</parameter></term>
+        <term><parameter>--target=${LFS_TARGET}</parameter></term>
         <listitem>
           <para>When used with --host, this creates a cross-architecture
-          executable that creates files for ${CLFS_TARGET} but runs on
-          ${CLFS_HOST}.</para>
+          executable that creates files for ${LFS_TARGET} but runs on ${LFS_HOST).</para>
         </listitem>
       </varlistentry>
 
       <varlistentry os="bd4">
-        <term><parameter>--with-sysroot=${CLFS}</parameter></term>
+        <term><parameter>--with-sysroot=${LFS}</parameter></term>
         <listitem>
-          <para>This tells configure that ${CLFS} is going to be the root
-          of our system. It will now use the specified sysroot, ${CLFS}, as
+          <para>This tells configure that ${LFS} is going to be the root
+          of our system. It will now use the specified sysroot, ${LFS} as
           a prefix of the default search paths.</para>
         </listitem>
@@ -110,5 +105,5 @@
         <listitem>
           <para>This option disables the building of a multilib
-          capable Binutils.</para>
+          capable binutils.</para>
         </listitem>
       </varlistentry>
@@ -128,5 +123,5 @@
         <listitem>
           <para>This checks the host environment and makes sure all the
-          necessary tools are available to compile Binutils.</para>
+          necessary tools are available to compile binutils.</para>
         </listitem>
       </varlistentry>
@@ -138,8 +133,8 @@
 <screen os="bi"><userinput>make install</userinput></screen>
 
-    <para os="bj">Install the <filename class="headerfile">libiberty</filename> header
-    file that is needed by some packages:</para>
+    <para os="bj">Copy the <filename class="headerfile">libiberty.h</filename> file to
+    <filename class="directory">${LFS}/usr/include</filename> directory:</para>
 
-<screen os="bk"><userinput>cp -v ../binutils-&binutils-version;/include/libiberty.h ${CLFS}/usr/include</userinput></screen>
+<screen os="bk"><userinput>cp -v ../binutils-&binutils-version;/include/libiberty.h ${LFS}/usr/include</userinput></screen>
 
   </sect2>
Index: BOOK/cross-tools/common/cflags.xml
===================================================================
--- BOOK/cross-tools/common/cflags.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/cross-tools/common/cflags.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -23,8 +23,6 @@
   case you have to exit and restart building later:</para>
 
-<screen><userinput>cat &gt;&gt; ~/.bashrc &lt;&lt; EOF
-unset CFLAGS
-unset CXXFLAGS
-EOF</userinput></screen>
+<screen><userinput>echo unset CFLAGS &gt;&gt; ~/.bashrc
+echo unset CXXFLAGS &gt;&gt; ~/.bashrc</userinput></screen>
 
 </sect1>
Index: OK/cross-tools/common/cloog-ppl.xml
===================================================================
--- BOOK/cross-tools/common/cloog-ppl.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,59 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-cross-tools-cloog-ppl" role="wrap">
-  <?dbhtml filename="cloog-ppl.html"?>
-
-  <title>CLooG-PPL-&cloog-ppl-version;</title>
-
-  <indexterm zone="ch-cross-tools-cloog-ppl">
-    <primary sortas="a-CLooG-PPL">CLooG-PPL</primary>
-    <secondary>cross-tools</secondary>
-  </indexterm>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../../final-system/common/cloog-ppl.xml"
-  xpointer="xpointer(//*[@role='package'])"/>
-
-  <sect2 role="installation">
-    <title>Installation of CLooG-PPL</title>
-
-<!--
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../../final-system/common/cloog-ppl.xml"
-    xpointer="xpointer(//*[@os='p1'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../../final-system/common/cloog-ppl.xml"
-	xpointer="xpointer(//*[@os='p2'])"/>
- -->
-
-    <para os="a">Prepare CLooG-PPL for compilation:</para>
-
-<screen os="b"><userinput>LDFLAGS="-Wl,-rpath,${CLFS}/cross-tools/lib" \
-    ./configure --prefix=${CLFS}/cross-tools --enable-shared --with-bits=gmp \
-    --with-gmp=${CLFS}/cross-tools --with-ppl=${CLFS}/cross-tools</userinput></screen>
-
-    <para os="c">Compile the package:</para>
-
-<screen os="d"><userinput>make</userinput></screen>
-
-    <para os="e">Install the package:</para>
-
-<screen os="f"><userinput>make install</userinput></screen>
-
-  </sect2>
-
-  <sect2 role="content">
-    <title/>
-
-    <para>Details on this package are located in <xref
-    linkend="contents-cloog-ppl" role="."/></para>
-
-  </sect2>
-
-</sect1>
Index: OK/cross-tools/common/eglibc.xml
===================================================================
--- BOOK/cross-tools/common/eglibc.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,862 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-cross-tools-eglibc" role="wrap">
-  <?dbhtml filename="eglibc.html"?>
-
-  <title>EGLIBC-&eglibc-version;</title>
-
-  <indexterm zone="ch-cross-tools-eglibc">
-    <primary sortas="a-EGLIBC">EGLIBC</primary>
-    <secondary>cross tools</secondary>
-  </indexterm>
-
-  <sect2 role="package">
-    <title/>
-
-    <para>The EGLIBC package contains the main C library. This library provides
-    the basic routines for allocating memory, searching directories, opening and
-    closing files, reading and writing files, string handling, pattern matching,
-    arithmetic, and so on.</para>
-
-  </sect2>
-
-  <sect2 role="installation">
-    <title>Installation of EGLIBC</title>
-
-    <note os="a">
-      <para>Some packages outside of CLFS suggest installing GNU libiconv in
-      order to translate data from one encoding to another. The project's
-      home page (<ulink url="http://www.gnu.org/software/libiconv/"/>) says
-      <quote>This library provides an <function>iconv()</function>
-      implementation, for use on systems which don't have one, or whose
-      implementation cannot convert from/to Unicode.</quote> EGLIBC provides
-      an <function>iconv()</function> implementation and can convert from/to
-      Unicode, therefore libiconv is not required on an CLFS system.</para>
-    </note>
-
-    <para os="p1">EGLIBC has various issues addressed by the following patch:</para>
-
-<screen os="p2"><userinput>patch -Np1 -i ../&eglibc-fixes-patch;</userinput></screen>
-
-    <para os="s1">Disable linking to <filename>libgcc_eh</filename>:</para>
-
-<screen os="s2"><userinput>cp -v Makeconfig{,.orig}
-sed -e 's/-lgcc_eh//g' Makeconfig.orig > Makeconfig</userinput></screen>
-
-    <para os="b">The EGLIBC documentation recommends building EGLIBC outside of the
-    source directory in a dedicated build directory:</para>
-
-<screen os="c"><userinput>mkdir -v ../eglibc-build
-cd ../eglibc-build</userinput></screen>
-
-    <para os="d">The following lines need to be added to
-    <filename>config.cache</filename> for EGLIBC to support NPTL:</para>
-
-<screen os="e"><userinput>cat &gt; config.cache &lt;&lt; EOF
-libc_cv_forced_unwind=yes
-libc_cv_c_cleanup=yes
-libc_cv_gnu89_inline=yes
-EOF</userinput></screen>
-
-    <para os="f">The following line needs to be added to
-    <filename>configparms</filename> to adjust installation paths:</para>
-
-<screen os="g"><userinput>cat &gt; configparms &lt;&lt; EOF
-install_root=${CLFS}
-EOF</userinput></screen>
-
-    <para os="h">Prepare EGLIBC for compilation:</para>
-
-<screen os="i"><userinput>BUILD_CC="gcc" CC="${CLFS_TARGET}-gcc" \
-    AR="${CLFS_TARGET}-ar" RANLIB="${CLFS_TARGET}-ranlib" \
-    ../eglibc-&eglibc-version;/configure --prefix=/usr \
-    --libexecdir=/usr/lib/eglibc --host=${CLFS_TARGET} --build=${CLFS_HOST} \
-    --disable-profile --enable-add-ons --with-tls --enable-kernel=2.6.0 \
-    --with-__thread --with-binutils=${CLFS}/cross-tools/bin \
-    --with-headers=${CLFS}/usr/include --cache-file=config.cache</userinput></screen>
-
-    <variablelist os="j">
-      <title>The meaning of the new configure options:</title>
-
-      <varlistentry os="j1">
-        <term><parameter>BUILD_CC="gcc"</parameter></term>
-        <listitem>
-          <para>This tells EGLIBC to use the compiler on the host system. This is
-          used to create the tools EGLIBC uses during its build.</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry os="j2">
-        <term><parameter>CC="${CLFS_TARGET}-gcc"</parameter></term>
-        <listitem>
-          <para>This forces EGLIBC to use the GCC compiler that we made for our target
-          architecture.</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry os="j3">
-        <term><parameter>AR="${CLFS_TARGET}-ar"</parameter></term>
-        <listitem>
-          <para>This forces EGLIBC to use the <command>ar</command> utility
-          we made for our target architecture.</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry os="j4">
-        <term><parameter>RANLIB="${CLFS_TARGET}-ranlib"</parameter></term>
-        <listitem>
-          <para>This forces EGLIBC to use the <command>ranlib</command> utility
-          we made for our target architecture.</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry os="j5">
-        <term><parameter>--disable-profile</parameter></term>
-        <listitem>
-          <para>This builds the libraries without profiling information.
-          Omit this option if profiling on the temporary tools is necessary.</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry os="j6">
-        <term><parameter>--enable-add-ons</parameter></term>
-        <listitem>
-          <para>This tells EGLIBC to utilize all add-ons that are
-          available.</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry os="j7">
-        <term><parameter>--with-tls</parameter></term>
-        <listitem>
-          <para>This tells EGLIBC to use Thread Local Storage.</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry os="j8">
-        <term><parameter>--with-__thread</parameter></term>
-        <listitem>
-          <para>This tells EGLIBC to use use the __thread for libc and
-          libpthread builds.</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry os="j9">
-        <term><parameter>--with-binutils=${CLFS}/cross-tools/bin</parameter></term>
-        <listitem>
-          <para>This tells EGLIBC to use the Binutils that are specific to
-          our target architecture.</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry os="j10">
-        <term><parameter>--cache-file=config.cache</parameter></term>
-        <listitem>
-          <para>This tells EGLIBC to utilize a premade cache file.</para>
-        </listitem>
-      </varlistentry>
-
-    </variablelist>
-
-    <para os="k">During this stage the following warning might appear:</para>
-
-<blockquote os="l"><screen><computeroutput>configure: WARNING:
-*** These auxiliary programs are missing or
-*** incompatible versions: msgfmt
-*** some features will be disabled.
-*** Check the INSTALL file for required versions.</computeroutput></screen></blockquote>
-
-    <para os="m">The missing or incompatible <command>msgfmt</command> program is
-    generally harmless. This <command>msgfmt</command> program is part of the
-    Gettext package which the host distribution should provide.</para>
-
-    <para os="n">Compile the package:</para>
-
-<screen os="o"><userinput>make</userinput></screen>
-
-    <para os="p">Install the package:</para>
-
-<screen os="q"><userinput>make install</userinput></screen>
-
-  </sect2>
-
-  <sect2 id="i18n-eglibc" role="configuration">
-    <title>Internationalization</title>
-
-    <para>To install locales we need to compile our own version of
-    localedef to run nativly on the host system, so we have to extract the
-    eglibc-localedef-&eglibc-version; package into our eglibc-&eglibc-version;
-    directory:</para>
-
-<screen><userinput>tar -jxvf ../eglibc-localedef-&eglibc-ports-dl-version;.tar.bz2
-cd localedef</userinput></screen>
-
-    <para>Prepare localedef for compilation:</para>
-
-<screen><userinput>./configure --prefix=${CLFS}/usr \
-    --with-glibc=../../eglibc-&eglibc-version;</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput>make</userinput></screen>
-
-    <para>The locales that can make the system respond in a different
-    language were not installed with EGLIBC. Install them
-    with:</para>
-
-<screen><userinput>make install-locales</userinput></screen>
-
-    <para>To save time, an alternative to running the previous command (which
-    generates and installs every locale listed in the
-    eglibc-&eglibc-version;/localedata/SUPPORTED file) is to install only
-    those locales that are wanted and needed. This can be achieved by using
-    the <command>localedef</command> command. Information on this command is
-    located in the <filename>INSTALL</filename> file in the EGLIBC source.
-    However, there are a number of locales that are essential in order for the
-    tests of future packages to pass, in particular, the
-    <emphasis>libstdc++</emphasis> tests from GCC. The following instructions,
-    instead of the <parameter>install-locales</parameter> target used above,
-    will install the minimum set of locales necessary for the tests to run
-    successfully:</para>
-
-<screen role="nodump"><userinput>make SUPPORTED-LOCALES="de_DE.UTF-8/UTF-8 de_DE/ISO-8859-1 de_DE@euro/ISO-8859-15 \
-    en_HK.UTF-8/UTF-8 en_HK/ISO-8859-1 \
-    en_PH.UTF-8/UTF-8 en_PH/ISO-8859-1 \
-    en_US.UTF-8/UTF-8 en_US/ISO-8859-1 \
-    es_MX.UTF-8/UTF-8 es_MX/ISO-8859-1 \
-    fa_IR/UTF-8 \
-    fr_FR.UTF-8/UTF-8 fr_FR/ISO-8859-1 fr_FR@euro/ISO-8859-15 \
-    it_IT.UTF-8/UTF-8 it_IT/ISO-8859-1 \
-    ja_JP.EUC-JP/EUC-JP ja_JP.UTF-8/UTF-8" install-locales</userinput></screen>
-
-    <para>Some locales installed by the <command>make
-    localedata/install-locales</command> command above are not properly
-    supported by some applications that are in the CLFS and CBLFS books. Because
-    of the various problems that arise due to application programmers making
-    assumptions that break in such locales, CLFS should not be used in locales
-    that utilize multibyte character sets (including UTF-8) or right-to-left
-    writing order.  Numerous unofficial and unstable patches are required to
-    fix these problems, and it has been decided by the CLFS developers not to
-    support such complex locales at this time. This applies to the ja_JP and
-    fa_IR locales as well&mdash;they have been installed only for GCC and
-    Gettext tests to pass, and the <command>watch</command> program (part of
-    the Procps package) does not work properly in them. Various attempts to
-    circumvent these restrictions are documented in internationalization-related
-    hints.</para>
-
-  </sect2>
-
-  <sect2 id="conf-eglibc" role="configuration">
-    <title>Configuring EGLIBC</title>
-
-    <indexterm zone="conf-eglibc">
-      <primary sortas="e-/etc/nsswitch.conf">/etc/nsswitch.conf</primary>
-    </indexterm>
-
-    <indexterm zone="conf-eglibc">
-      <primary sortas="e-/etc/localtime">/etc/localtime</primary>
-    </indexterm>
-
-    <para>The <filename>/etc/nsswitch.conf</filename> file needs to be created
-    because, although EGLIBC provides defaults when this file is missing or
-    corrupt, the EGLIBC defaults do not work well in a networked environment.
-    The time zone also needs to be configured.</para>
-
-    <para>Create a new file <filename>/etc/nsswitch.conf</filename> by running
-    the following:</para>
-
-<screen><userinput>cat &gt; ${CLFS}/etc/nsswitch.conf &lt;&lt; "EOF"
-<literal># Begin /etc/nsswitch.conf
-
-passwd: files
-group: files
-shadow: files
-
-hosts: files dns
-networks: files
-
-protocols: files
-services: files
-ethers: files
-rpc: files
-
-# End /etc/nsswitch.conf</literal>
-EOF</userinput></screen>
-
-    <para>To determine the local time zone, run the following script:</para>
-
-<screen role="nodump"><userinput>TZDIR="${CLFS}/usr/share/zoneinfo" ${CLFS}/usr/bin/tzselect</userinput></screen>
-
-    <para>After answering a few questions about the location, the script will
-    output the name of the time zone (e.g., <emphasis>EST5EDT</emphasis> or
-    <emphasis>Canada/Eastern</emphasis>). Then create the
-    <filename>/etc/localtime</filename> file by running:</para>
-
-<screen><userinput>cp -v --remove-destination ${CLFS}/usr/share/zoneinfo/<replaceable>[xxx]</replaceable> \
-    ${CLFS}/etc/localtime</userinput></screen>
-
-    <para>Replace <replaceable>[xxx]</replaceable> with the name of the time zone
-    that <command>tzselect</command> provided (e.g., Canada/Eastern).</para>
-
-    <variablelist>
-      <title>The meaning of the cp option:</title>
-
-      <varlistentry>
-        <term><parameter>--remove-destination</parameter></term>
-        <listitem>
-          <para>This is needed to force removal of the already existing symbolic
-          link. The reason for copying the file instead of using a symlink is to
-          cover the situation where <filename class="directory">/usr</filename>
-          is on a separate partition. This could be important when booted into
-          single user mode.</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-
-  </sect2>
-
-  <sect2 id="conf-ld" role="configuration">
-    <title>Configuring The Dynamic Loader</title>
-
-    <indexterm zone="conf-ld">
-      <primary sortas="e-/etc/ld.so.conf">/etc/ld.so.conf</primary>
-    </indexterm>
-
-    <para>By default, the dynamic loader (<filename
-    class="libraryfile">/lib/ld-linux.so.2</filename>) searches through
-    <filename class="directory">/lib</filename> and <filename
-    class="directory">/usr/lib</filename> for dynamic libraries that are
-    needed by programs as they are run. However, if there are libraries in
-    directories other than <filename class="directory">/lib</filename> and
-    <filename class="directory">/usr/lib</filename>, these need to be
-    added to the <filename>/etc/ld.so.conf</filename> file in order
-    for the dynamic loader to find them. Two directories that are commonly
-    known to contain additional libraries are <filename
-    class="directory">/usr/local/lib</filename> and <filename
-    class="directory">/opt/lib</filename>, so add those directories to the
-    dynamic loader's search path.</para>
-
-    <para>Create a new file <filename>/etc/ld.so.conf</filename> by running the
-    following:</para>
-
-<screen><userinput>cat &gt; ${CLFS}/etc/ld.so.conf &lt;&lt; "EOF"
-<literal># Begin /etc/ld.so.conf
-
-/usr/local/lib
-/opt/lib
-
-# End /etc/ld.so.conf</literal>
-EOF</userinput></screen>
-
-  </sect2>
-
-  <sect2 id="contents-eglibc" role="content">
-    <title>Contents of EGLIBC</title>
-
-    <segmentedlist>
-      <segtitle>Installed programs</segtitle>
-      <segtitle>Installed libraries</segtitle>
-
-      <seglistitem>
-        <seg>catchsegv, gencat, getconf, getent, iconv, iconvconfig, ldconfig,
-        ldd, lddlibc4, locale, localedef, mtrace, nscd,
-        pcprofiledump, pt_chown, rpcgen, rpcinfo, sln, sprof, tzselect, xtrace,
-        zdump, and zic</seg>
-        <seg>ld.so, libBrokenLocale.[a,so], libSegFault.so, libanl.[a,so],
-        libbsd-compat.a, libc.[a,so], libcrypt.[a,so], libdl.[a,so], libg.a,
-        libieee.a, libm.[a,so], libmcheck.a, libmemusage.so, libnsl.a,
-        libnss_compat.so, libnss_dns.so, libnss_files.so, libnss_hesiod.so,
-        libnss_nis.so, libnss_nisplus.so, libpcprofile.so, libpthread.[a,so],
-        libresolv.[a,so], librpcsvc.a, librt.[a,so], libthread_db.so, and
-        libutil.[a,so]</seg>
-      </seglistitem>
-    </segmentedlist>
-
-    <variablelist>
-      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
-      <?dbfo list-presentation="list"?>
-      <?dbhtml list-presentation="table"?>
-
-      <varlistentry id="catchsegv">
-        <term><command>catchsegv</command></term>
-        <listitem>
-          <para>Can be used to create a stack trace when a program
-          terminates with a segmentation fault</para>
-          <indexterm zone="ch-cross-tools-eglibc catchsegv">
-            <primary sortas="b-catchsegv">catchsegv</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="gencat">
-        <term><command>gencat</command></term>
-        <listitem>
-          <para>Generates message catalogues</para>
-          <indexterm zone="ch-cross-tools-eglibc gencat">
-            <primary sortas="b-gencat">gencat</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="getconf">
-        <term><command>getconf</command></term>
-        <listitem>
-          <para>Displays the system configuration values for file system specific
-          variables</para>
-          <indexterm zone="ch-cross-tools-eglibc getconf">
-            <primary sortas="b-getconf">getconf</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="getent">
-        <term><command>getent</command></term>
-        <listitem>
-          <para>Gets entries from an administrative database</para>
-          <indexterm zone="ch-cross-tools-eglibc getent">
-            <primary sortas="b-getent">getent</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="iconv">
-        <term><command>iconv</command></term>
-        <listitem>
-          <para>Performs character set conversion</para>
-          <indexterm zone="ch-cross-tools-eglibc iconv">
-            <primary sortas="b-iconv">iconv</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="iconvconfig">
-        <term><command>iconvconfig</command></term>
-        <listitem>
-          <para>Creates fastloading <command>iconv</command> module configuration
-          files</para>
-          <indexterm zone="ch-cross-tools-eglibc iconvconfig">
-            <primary sortas="b-iconvconfig">iconvconfig</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="ldconfig">
-        <term><command>ldconfig</command></term>
-        <listitem>
-          <para>Configures the dynamic linker runtime bindings</para>
-          <indexterm zone="ch-cross-tools-eglibc ldconfig">
-            <primary sortas="b-ldconfig">ldconfig</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="ldd">
-        <term><command>ldd</command></term>
-        <listitem>
-          <para>Reports which shared libraries are required
-          by each given program or shared library</para>
-          <indexterm zone="ch-cross-tools-eglibc ldd">
-            <primary sortas="b-ldd">ldd</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="lddlibc4">
-        <term><command>lddlibc4</command></term>
-        <listitem>
-          <para>Assists <command>ldd</command> with object files</para>
-          <indexterm zone="ch-cross-tools-eglibc lddlibc4">
-            <primary sortas="b-lddlibc4">lddlibc4</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="locale">
-        <term><command>locale</command></term>
-        <listitem>
-          <para>Tells the compiler to enable or disable the use of POSIX locales
-          for built-in operations</para>
-          <indexterm zone="ch-cross-tools-eglibc locale">
-            <primary sortas="b-locale">locale</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="localedef">
-        <term><command>localedef</command></term>
-        <listitem>
-          <para>Compiles locale specifications</para>
-          <indexterm zone="ch-cross-tools-eglibc localedef">
-            <primary sortas="b-localedef">localedef</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="mtrace">
-        <term><command>mtrace</command></term>
-        <listitem>
-          <para>Reads and interprets a memory trace file and
-          displays a summary in human-readable format</para>
-          <indexterm zone="ch-cross-tools-eglibc mtrace">
-            <primary sortas="b-mtrace">mtrace</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="nscd">
-        <term><command>nscd</command></term>
-        <listitem>
-          <para>A daemon that provides a cache for the most common name
-          service requests</para>
-          <indexterm zone="ch-cross-tools-eglibc nscd">
-            <primary sortas="b-nscd">nscd</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="pcprofiledump">
-        <term><command>pcprofiledump</command></term>
-        <listitem>
-          <para>Dumps information generated by PC profiling</para>
-          <indexterm zone="ch-cross-tools-eglibc pcprofiledump">
-            <primary sortas="b-pcprofiledump">pcprofiledump</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="pt_chown">
-        <term><command>pt_chown</command></term>
-        <listitem>
-          <para>A helper program for <command>grantpt</command> to set the owner,
-          group and access permissions of a slave pseudo terminal</para>
-          <indexterm zone="ch-cross-tools-eglibc pt_chown">
-            <primary sortas="b-pt_chown">pt_chown</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="rpcgen">
-        <term><command>rpcgen</command></term>
-        <listitem>
-          <para>Generates C code to implement the Remote Procecure Call (RPC)
-          protocol</para>
-          <indexterm zone="ch-cross-tools-eglibc rpcgen">
-            <primary sortas="b-rpcgen">rpcgen</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="rpcinfo">
-        <term><command>rpcinfo</command></term>
-        <listitem>
-          <para>Makes an RPC call to an RPC server</para>
-          <indexterm zone="ch-cross-tools-eglibc rpcinfo">
-            <primary sortas="b-rpcinfo">rpcinfo</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="sln">
-        <term><command>sln</command></term>
-        <listitem>
-          <para>A statically linked program that creates symbolic links</para>
-          <indexterm zone="ch-cross-tools-eglibc sln">
-            <primary sortas="b-sln">sln</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="sprof">
-        <term><command>sprof</command></term>
-        <listitem>
-          <para>Reads and displays shared object profiling data</para>
-          <indexterm zone="ch-cross-tools-eglibc sprof">
-            <primary sortas="b-sprof">sprof</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="tzselect">
-        <term><command>tzselect</command></term>
-        <listitem>
-          <para>Asks the user about the location of the
-          system and reports the corresponding time zone description</para>
-          <indexterm zone="ch-cross-tools-eglibc tzselect">
-            <primary sortas="b-tzselect">tzselect</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="xtrace">
-        <term><command>xtrace</command></term>
-        <listitem>
-          <para>Traces the execution of a program by
-          printing the currently executed function</para>
-          <indexterm zone="ch-cross-tools-eglibc xtrace">
-            <primary sortas="b-xtrace">xtrace</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="zdump">
-        <term><command>zdump</command></term>
-        <listitem>
-          <para>The time zone dumper</para>
-          <indexterm zone="ch-cross-tools-eglibc zdump">
-            <primary sortas="b-zdump">zdump</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="zic">
-        <term><command>zic</command></term>
-        <listitem>
-          <para>The time zone compiler</para>
-          <indexterm zone="ch-cross-tools-eglibc zic">
-            <primary sortas="b-zic">zic</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="ld.so">
-        <term><filename class="libraryfile">ld.so</filename></term>
-        <listitem>
-          <para>The helper program for shared library executables</para>
-          <indexterm zone="ch-cross-tools-eglibc ld.so">
-            <primary sortas="c-ld.so">ld.so</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="libBrokenLocale">
-        <term><filename class="libraryfile">libBrokenLocale</filename></term>
-        <listitem>
-          <para>Used by programs, such as Mozilla, to solve broken locales</para>
-          <indexterm zone="ch-cross-tools-eglibc libBrokenLocale">
-            <primary sortas="c-libBrokenLocale">libBrokenLocale</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="libSegFault">
-        <term><filename class="libraryfile">libSegFault</filename></term>
-        <listitem>
-          <para>The segmentation fault signal handler</para>
-          <indexterm zone="ch-cross-tools-eglibc libSegFault">
-            <primary sortas="c-libSegFault">libSegFault</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="libanl">
-        <term><filename class="libraryfile">libanl</filename></term>
-        <listitem>
-          <para>An asynchronous name lookup library</para>
-          <indexterm zone="ch-cross-tools-eglibc libanl">
-            <primary sortas="c-libanl">libanl</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="libbsd-compat">
-        <term><filename class="libraryfile">libbsd-compat</filename></term>
-        <listitem>
-          <para>Provides the portability needed
-          in order to run certain Berkey Software Distribution (BSD) programs
-          under Linux</para>
-          <indexterm zone="ch-cross-tools-eglibc libbsd-compat">
-            <primary sortas="c-libbsd-compat">libbsd-compat</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="libc">
-        <term><filename class="libraryfile">libc</filename></term>
-        <listitem>
-          <para>The main C library</para>
-          <indexterm zone="ch-cross-tools-eglibc libc">
-            <primary sortas="c-libc">libc</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="libcrypt">
-        <term><filename class="libraryfile">libcrypt</filename></term>
-        <listitem>
-          <para>The cryptography library</para>
-          <indexterm zone="ch-cross-tools-eglibc libcrypt">
-            <primary sortas="c-libcrypt">libcrypt</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="libdl">
-        <term><filename class="libraryfile">libdl</filename></term>
-        <listitem>
-          <para>The dynamic linking interface library</para>
-          <indexterm zone="ch-cross-tools-eglibc libdl">
-            <primary sortas="c-libdl">libdl</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="libg">
-        <term><filename class="libraryfile">libg</filename></term>
-        <listitem>
-          <para>A runtime library for <command>g++</command></para>
-          <indexterm zone="ch-cross-tools-eglibc libg">
-            <primary sortas="c-libg">libg</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="libieee">
-        <term><filename class="libraryfile">libieee</filename></term>
-        <listitem>
-          <para>The Institute of Electrical and Electronic Engineers (IEEE)
-          floating point library</para>
-          <indexterm zone="ch-cross-tools-eglibc libieee">
-            <primary sortas="c-libieee">libieee</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="libm">
-        <term><filename class="libraryfile">libm</filename></term>
-        <listitem>
-          <para>The mathematical library</para>
-          <indexterm zone="ch-cross-tools-eglibc libm">
-            <primary sortas="c-libm">libm</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="libmcheck">
-        <term><filename class="libraryfile">libmcheck</filename></term>
-        <listitem>
-          <para>Contains code run at boot</para>
-          <indexterm zone="ch-cross-tools-eglibc libmcheck">
-            <primary sortas="c-libmcheck">libmcheck</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="libmemusage">
-        <term><filename class="libraryfile">libmemusage</filename></term>
-        <listitem>
-          <para>Used by <command>memusage</command> (included in EGLIBC, but
-          not built in a base CLFS system as it has additional dependencies)
-          to help collect information about the memory usage of a program</para>
-          <indexterm zone="ch-cross-tools-eglibc libmemusage">
-            <primary sortas="c-libmemusage">libmemusage</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="libnsl">
-        <term><filename class="libraryfile">libnsl</filename></term>
-        <listitem>
-          <para>The network services library</para>
-          <indexterm zone="ch-cross-tools-eglibc libnsl">
-            <primary sortas="c-libnsl">libnsl</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="libnss">
-        <term><filename class="libraryfile">libnss</filename></term>
-        <listitem>
-          <para>The Name Service Switch libraries, containing functions for
-          resolving host names, user names, group names, aliases, services,
-          protocols, etc.</para>
-          <indexterm zone="ch-cross-tools-eglibc libnss">
-            <primary sortas="c-libnss">libnss</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="libpcprofile">
-        <term><filename class="libraryfile">libpcprofile</filename></term>
-        <listitem>
-          <para>Contains profiling functions used to track the amount of CPU
-          time spent in specific source code lines</para>
-          <indexterm zone="ch-cross-tools-eglibc libpcprofile">
-            <primary sortas="c-libpcprofile">libpcprofile</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="libpthread">
-        <term><filename class="libraryfile">libpthread</filename></term>
-        <listitem>
-          <para>The POSIX threads library</para>
-          <indexterm zone="ch-cross-tools-eglibc libpthread">
-            <primary sortas="c-libpthread">libpthread</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="libresolv">
-        <term><filename class="libraryfile">libresolv</filename></term>
-        <listitem>
-          <para>Contains functions for creating, sending, and interpreting
-          packets to the Internet domain name servers</para>
-          <indexterm zone="ch-cross-tools-eglibc libresolv">
-            <primary sortas="c-libresolv">libresolv</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="librpcsvc">
-        <term><filename class="libraryfile">librpcsvc</filename></term>
-        <listitem>
-          <para>Contains functions providing miscellaneous RPC services</para>
-          <indexterm zone="ch-cross-tools-eglibc librpcsvc">
-            <primary sortas="c-librpcsvc">librpcsvc</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="librt">
-        <term><filename class="libraryfile">librt</filename></term>
-        <listitem>
-          <para>Contains functions providing most of the interfaces specified by
-          the POSIX.1b Realtime Extension</para>
-          <indexterm zone="ch-cross-tools-eglibc librt">
-            <primary sortas="c-librt">librt</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="libthread_db">
-        <term><filename class="libraryfile">libthread_db</filename></term>
-        <listitem>
-          <para>Contains functions useful for
-          building debuggers for multi-threaded programs</para>
-          <indexterm zone="ch-cross-tools-eglibc libthread_db">
-            <primary sortas="c-libthread_db">libthread_db</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="libutil">
-        <term><filename class="libraryfile">libutil</filename></term>
-        <listitem>
-          <para>Contains code for <quote>standard</quote> functions used in
-          many different Unix utilities</para>
-          <indexterm zone="ch-cross-tools-eglibc libutil">
-            <primary sortas="c-libutil">libutil</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-    </variablelist>
-
-  </sect2>
-
-</sect1>
Index: OK/cross-tools/common/file.xml
===================================================================
--- BOOK/cross-tools/common/file.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,43 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-cross-tools-file">
-  <?dbhtml filename="file.html"?>
-
-  <title>File-&file-version; - Native</title>
-
-  <indexterm zone="ch-cross-tools-file">
-    <primary sortas="a-File">File</primary>
-    <secondary>cross tools</secondary>
-  </indexterm>
-
-  <sect2 role="installation">
-    <title>Installation of File</title>
-
-    <para>Prepare File for compilation:</para>
-
-<screen><userinput>./configure --prefix=${CLFS}/cross-tools</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput>make</userinput></screen>
-
-    <para>Install the package:</para>
-
-<screen><userinput>make install</userinput></screen>
-
-  </sect2>
-
-  <sect2 role="content">
-    <title/>
-
-    <para>Details on this package are located in <xref
-    linkend="contents-file" role="."/></para>
-
-  </sect2>
-
-</sect1>
Index: BOOK/cross-tools/common/gcc-final.xml
===================================================================
--- BOOK/cross-tools/common/gcc-final.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/cross-tools/common/gcc-final.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -25,4 +25,12 @@
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     href="../../final-system/common/gcc.xml"
+    xpointer="xpointer(//*[@os='p1'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../../final-system/common/gcc.xml"
+    xpointer="xpointer(//*[@os='p2'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../../final-system/common/gcc.xml"
     xpointer="xpointer(//*[@os='p3'])"/>
 
@@ -33,21 +41,34 @@
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     href="gcc-static.xml"
-    xpointer="xpointer(//*[@os='c'])"/>
+    xpointer="xpointer(//*[@os='aa'])"/>
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     href="gcc-static.xml"
-    xpointer="xpointer(//*[@os='d'])"/>
+    xpointer="xpointer(//*[@os='ab'])"/>
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     href="gcc-static.xml"
-    xpointer="xpointer(//*[@os='e'])"/>
+    xpointer="xpointer(//*[@os='ac'])"/>
 
-<screen os="ae"><userinput>AR=ar LDFLAGS="-Wl,-rpath,${CLFS}/cross-tools/lib" \
-    ../gcc-&gcc-version;/configure --prefix=${CLFS}/cross-tools \
-    --build=${CLFS_HOST} --host=${CLFS_HOST} --target=${CLFS_TARGET} \
-    --disable-multilib --with-sysroot=${CLFS} --disable-nls \
-    --enable-shared --enable-languages=c,c++ --enable-__cxa_atexit \
-    --with-mpfr=${CLFS}/cross-tools --with-gmp=${CLFS}/cross-tools \
-    --with-ppl=${CLFS}/cross-tools --with-cloog=${CLFS}/cross-tools \
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="gcc-static.xml"
+    xpointer="xpointer(//*[@os='ad'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="gcc-static.xml"
+    xpointer="xpointer(//*[@os='f'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="gcc-static.xml"
+    xpointer="xpointer(//*[@os='g'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="gcc-static.xml"
+    xpointer="xpointer(//*[@os='h'])"/>
+
+<screen os="ae"><userinput>../gcc-&gcc-version;/configure --prefix=/cross-tools \
+    --host=${LFS_HOST} --target=${LFS_TARGET} --disable-multilib \
+    --with-sysroot=${LFS} --disable-nls --disable-shared \
+    --disable-threads --enable-languages=c,c++ --enable-__cxa_atexit \
     --enable-c99 --enable-long-long --enable-threads=posix</userinput></screen>
 
@@ -100,6 +121,5 @@
     xpointer="xpointer(//*[@os='ag'])"/>
 
-<screen os="ah"><userinput>make AS_FOR_TARGET="${CLFS_TARGET}-as" \
-    LD_FOR_TARGET="${CLFS_TARGET}-ld"</userinput></screen>
+<screen os="ah"><userinput>make</userinput></screen>
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
Index: BOOK/cross-tools/common/gcc-static.xml
===================================================================
--- BOOK/cross-tools/common/gcc-static.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/cross-tools/common/gcc-static.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -24,33 +24,32 @@
     and no Threads</title>
 
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../../final-system/common/gcc.xml"
-    xpointer="xpointer(//*[@os='p3'])"/>
+    <para os="aa">To make sure that a couple of tools use the proper syntax,
+    apply the following patch:</para>
+
+<screen os="ab"><userinput>patch -Np1 -i ../&gcc-posix-patch;</userinput></screen>
+
+    <para os="ac">The following patch ensures that <command>gcc</command> does not
+    search the <filename class="directory">/usr</filename> directory for
+    <filename class="libraryfile">libgcc_s.so</filename> when
+    cross-compiling:</para>
+
+<screen os="ad"><userinput>patch -Np1 -i ../&gcc-cross_search-patch;</userinput></screen>
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     href="../../final-system/common/gcc.xml"
-    xpointer="xpointer(//*[@os='p4'])"/>
+    xpointer="xpointer(//*[@os='f'])"/>
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     href="../../final-system/common/gcc.xml"
-    xpointer="xpointer(//*[@os='c'])"/>
+    xpointer="xpointer(//*[@os='g'])"/>
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     href="../../final-system/common/gcc.xml"
-    xpointer="xpointer(//*[@os='d'])"/>
+    xpointer="xpointer(//*[@os='h'])"/>
 
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../../final-system/common/gcc.xml"
-    xpointer="xpointer(//*[@os='e'])"/>
-
-<screen os="ae"><userinput>AR=ar LDFLAGS="-Wl,-rpath,${CLFS}/cross-tools/lib" \
-    ../gcc-&gcc-version;/configure --prefix=${CLFS}/cross-tools \
-    --build=${CLFS_HOST} --host=${CLFS_HOST} --target=${CLFS_TARGET} \
-    --disable-multilib --with-sysroot=${CLFS} --disable-nls \
-    --without-headers --with-newlib --disable-decimal-float \
-    --disable-libgomp --disable-libmudflap --disable-libssp \
-    --with-mpfr=${CLFS}/cross-tools --with-gmp=${CLFS}/cross-tools \
-    --with-ppl=${CLFS}/cross-tools --with-cloog=${CLFS}/cross-tools \
-    --disable-shared --disable-threads --enable-languages=c</userinput></screen>
+<screen os="ae"><userinput>../gcc-&gcc-version;/configure --prefix=/cross-tools \
+    --host=${LFS_HOST} --target=${LFS_TARGET} --disable-multilib \
+    --with-sysroot=${LFS} --disable-nls --disable-shared \
+    --disable-threads --enable-languages=c</userinput></screen>
 
     <variablelist os="af">
@@ -70,5 +69,5 @@
           include files, since they haven't been created for this architecture
           yet. GCC will be able to find the multi-thread information after
-          the EGLIBC headers are created.</para>
+          the Glibc headers are created.</para>
         </listitem>
       </varlistentry>
@@ -85,9 +84,9 @@
     <para os="ag">Continue with compiling the package:</para>
 
-<screen os="ah"><userinput>make all-gcc all-target-libgcc</userinput></screen>
+<screen os="ah"><userinput>make all-gcc</userinput></screen>
 
     <para os="ai">Install the package:</para>
 
-<screen os="aj"><userinput>make install-gcc install-target-libgcc</userinput></screen>
+<screen os="aj"><userinput>make install-gcc</userinput></screen>
 
   </sect2>
Index: BOOK/cross-tools/common/glibc.xml
===================================================================
--- BOOK/cross-tools/common/glibc.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/cross-tools/common/glibc.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,854 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-cross-tools-glibc" role="wrap">
+  <?dbhtml filename="glibc.html"?>
+
+  <title>Glibc-&glibc-version;</title>
+
+  <indexterm zone="ch-cross-tools-glibc">
+    <primary sortas="a-Glibc">Glibc</primary>
+    <secondary>cross tools</secondary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Glibc package contains the main C library. This library provides
+    the basic routines for allocating memory, searching directories, opening and
+    closing files, reading and writing files, string handling, pattern matching,
+    arithmetic, and so on.</para>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Glibc</title>
+
+    <note os="a">
+      <para>Some packages outside of LFS suggest installing GNU libiconv in
+      order to translate data from one encoding to another. The project's
+      home page (<ulink url="http://www.gnu.org/software/libiconv/"/>) says
+      <quote>This library provides an <function>iconv()</function>
+      implementation, for use on systems which don't have one, or whose
+      implementation cannot convert from/to Unicode.</quote> Glibc provides
+      an <function>iconv()</function> implementation and can convert from/to
+      Unicode, therefore libiconv is not required on an LFS system.</para>
+    </note>
+
+    <para os="p1">Disable linking to <filename>libgcc_eh</filename>:</para>
+
+<screen os="p2"><userinput>patch -Np1 -i ../&glibc-libgcc_eh-patch;</userinput></screen>
+
+    <para os="p3">The following patch fixes an issue that can
+    cause <command>localdef</command> to segfault:</para>
+
+<screen os="p4"><userinput>patch -Np1 -i ../&glibc-localedef_segfault-patch;</userinput></screen>
+
+    <para os="b">The Glibc documentation recommends building Glibc outside of the
+    source directory in a dedicated build directory:</para>
+
+<screen os="c"><userinput>mkdir -v ../glibc-build
+cd ../glibc-build</userinput></screen>
+
+    <para os="d">The following lines need to be added to
+    <filename>config.cache</filename> for Glibc to support NPTL:</para>
+
+<screen os="e"><userinput>echo "libc_cv_forced_unwind=yes" &gt; config.cache
+echo "libc_cv_c_cleanup=yes" &gt;&gt; config.cache</userinput></screen>
+
+    <para os="f">The following line needs to be added to
+    <filename>configparms</filename> to adjust instalation paths:</para>
+
+<screen os="g"><userinput>echo "install_root=${LFS}" &gt; configparms</userinput></screen>
+
+    <para os="h">Prepare Glibc for compilation:</para>
+
+<screen os="i"><userinput>BUILD_CC="gcc" CC="${LFS_TARGET}-gcc" \
+    AR="${LFS_TARGET}-ar" RANLIB="${LFS_TARGET}-ranlib" \
+    ../glibc-&glibc-version;/configure --prefix=/usr --libexecdir=/usr/lib/glibc \
+    --host=${LFS_TARGET} --build=${LFS_HOST} \
+    --disable-profile --enable-add-ons \
+    --with-tls --enable-kernel=2.6.0 --with-__thread \
+    --with-binutils=/cross-tools/bin --with-headers=${LFS}/usr/include \
+    --cache-file=config.cache</userinput></screen>
+
+    <variablelist os="dj">
+      <title>The meaning of the new configure options:</title>
+
+      <varlistentry os="dj1">
+        <term><parameter>BUILD_CC="gcc"</parameter></term>
+        <listitem>
+          <para>This sets Glibc to use the current compiler on our system. This is
+          used to create the tools Glibc uses during its build.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry os="dj2">
+        <term><parameter>CC="${LFS_TARGET}-gcc"</parameter></term>
+        <listitem>
+          <para>This forces Glibc to use the GCC compiler that we made for our target
+          architecture.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry os="dj3">
+        <term><parameter>AR="${LFS_TARGET}-ar"</parameter></term>
+        <listitem>
+          <para>This forces Glibc to use the <command>ar</command> utility
+          we made for our target architecture.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry os="dj4">
+        <term><parameter>RANLIB="${LFS_TARGET}-ranlib"</parameter></term>
+        <listitem>
+          <para>This forces Glibc to use the <command>ranlib</command> utility
+          we made for our target architecture.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry os="dj5">
+        <term><parameter>--disable-profile</parameter></term>
+        <listitem>
+          <para>This builds the libraries without profiling information. 
+	  Omit this option if profiling on the temporary tools is necessary.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry os="dj6">
+        <term><parameter>--enable-add-ons</parameter></term>
+        <listitem>
+          <para>This tells Glibc to utilize all add-ons that are
+          available.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry os="dj7">
+        <term><parameter>--with-tls</parameter></term>
+        <listitem>
+          <para>This tells Glibc to use Thread Local Storage.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry os="dj8">
+        <term><parameter>--with-__thread</parameter></term>
+        <listitem>
+          <para>This tells Glibc to use use the __thread for libc and
+          libpthread builds.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry os="dj9">
+        <term><parameter>--with-binutils=/cross-tools/bin</parameter></term>
+        <listitem>
+          <para>This tells Glibc to use the Binutils that are specific to
+          our target architecture.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry os="dj10">
+        <term><parameter>--cache-file=config.cache</parameter></term>
+        <listitem>
+          <para>This tells Glibc to utilize a premade cache file.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+    <para os="k">During this stage the following warning might appear:</para>
+
+<blockquote os="l"><screen><computeroutput>configure: WARNING:
+*** These auxiliary programs are missing or
+*** incompatible versions: msgfmt
+*** some features will be disabled.
+*** Check the INSTALL file for required versions.</computeroutput></screen></blockquote>
+
+    <para os="m">The missing or incompatible <command>msgfmt</command> program is
+    generally harmless. This <command>msgfmt</command> program is part of the
+    Gettext package which the host distribution should provide.</para>
+
+    <para os="n">Compile the package:</para>
+
+<screen os="o"><userinput>make</userinput></screen>
+
+    <para os="p">Install the package:</para>
+
+<screen os="q"><userinput>make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 id="i18n-glibc" role="configuration">
+    <title>Internationalization (Current method is no good, REWRITE ME)</title>
+
+    <para>The locales that can make the system respond in a different
+    language were not installed by the above command. Install them
+    with:</para>
+
+<screen><userinput>make localedata/install-locales</userinput></screen>
+
+    <para>To save time, an alternative to running the previous command (which
+    generates and installs every locale listed in the
+    glibc-&glibc-version;/localedata/SUPPORTED file) is to install only
+    those locales that are wanted and needed. This can be achieved by using
+    the <command>localedef</command> command. Information on this command is
+    located in the <filename>INSTALL</filename> file in the Glibc source.
+    However, there are a number of locales that are essential in order for the
+    tests of future packages to pass, in particular, the
+    <emphasis>libstdc++</emphasis> tests from GCC. The following instructions,
+    instead of the <parameter>install-locales</parameter> target used above,
+    will install the minimum set of locales necessary for the tests to run
+    successfully:</para>
+
+<screen role="nodump"><userinput>mkdir -pv /usr/lib/locale
+localedef -i de_DE -f ISO-8859-1 de_DE
+localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro
+localedef -i en_HK -f ISO-8859-1 en_HK
+localedef -i en_PH -f ISO-8859-1 en_PH
+localedef -i en_US -f ISO-8859-1 en_US
+localedef -i es_MX -f ISO-8859-1 es_MX
+localedef -i fa_IR -f UTF-8 fa_IR
+localedef -i fr_FR -f ISO-8859-1 fr_FR
+localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro
+localedef -i it_IT -f ISO-8859-1 it_IT
+localedef -i ja_JP -f EUC-JP ja_JP</userinput></screen>
+
+    <para>Some locales installed by the <command>make
+    localedata/install-locales</command> command above are not properly
+    supported by some applications that are in the LFS and BLFS books. Because
+    of the various problems that arise due to application programmers making
+    assumptions that break in such locales, LFS should not be used in locales
+    that utilize multibyte character sets (including UTF-8) or right-to-left
+    writing order.  Numerous unofficial and unstable patches are required to
+    fix these problems, and it has been decided by the LFS developers not to
+    support such complex locales at this time. This applies to the ja_JP and
+    fa_IR locales as well&mdash;they have been installed only for GCC and
+    Gettext tests to pass, and the <command>watch</command> program (part of
+    the Procps package) does not work properly in them. Various attempts to
+    circumvent these restrictions are documented in internationalization-related
+    hints.</para>
+
+  </sect2>
+
+  <sect2 id="conf-glibc" role="configuration">
+    <title>Configuring Glibc</title>
+
+    <indexterm zone="conf-glibc">
+      <primary sortas="e-/etc/nsswitch.conf">/etc/nsswitch.conf</primary>
+    </indexterm>
+
+    <indexterm zone="conf-glibc">
+      <primary sortas="e-/etc/localtime">/etc/localtime</primary>
+    </indexterm>
+
+    <para>The <filename>/etc/nsswitch.conf</filename> file needs to be created
+    because, although Glibc provides defaults when this file is missing or
+    corrupt, the Glibc defaults do not work well in a networked environment.
+    The time zone also needs to be configured.</para>
+
+    <para>Create a new file <filename>/etc/nsswitch.conf</filename> by running
+    the following:</para>
+
+<screen><userinput>cat &gt; ${LFS}/etc/nsswitch.conf &lt;&lt; "EOF"
+<literal># Begin /etc/nsswitch.conf
+
+passwd: files
+group: files
+shadow: files
+
+hosts: files dns
+networks: files
+
+protocols: files
+services: files
+ethers: files
+rpc: files
+
+# End /etc/nsswitch.conf</literal>
+EOF</userinput></screen>
+
+    <para>To determine the local time zone, run the following script:</para>
+
+<screen role="nodump"><userinput>tzselect</userinput></screen>
+
+    <para>After answering a few questions about the location, the script will
+    output the name of the time zone (e.g., <emphasis>EST5EDT</emphasis> or
+    <emphasis>Canada/Eastern</emphasis>). Then create the
+    <filename>/etc/localtime</filename> file by running:</para>
+
+<screen><userinput>cp -v --remove-destination /usr/share/zoneinfo/<replaceable>[xxx]</replaceable> \
+    /etc/localtime</userinput></screen>
+
+    <para>Replace <replaceable>[xxx]</replaceable> with the name of the time zone
+    that <command>tzselect</command> provided (e.g., Canada/Eastern).</para>
+
+    <variablelist>
+      <title>The meaning of the cp option:</title>
+
+      <varlistentry>
+        <term><parameter>--remove-destination</parameter></term>
+        <listitem>
+          <para>This is needed to force removal of the already existing symbolic
+          link. The reason for copying the file instead of using a symlink is to
+          cover the situation where <filename class="directory">/usr</filename>
+          is on a separate partition. This could be important when booted into
+          single user mode.</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+
+  </sect2>
+
+  <sect2 id="conf-ld" role="configuration">
+    <title>Configuring The Dynamic Loader</title>
+
+    <indexterm zone="conf-ld">
+      <primary sortas="e-/etc/ld.so.conf">/etc/ld.so.conf</primary>
+    </indexterm>
+
+    <para>By default, the dynamic loader (<filename
+    class="libraryfile">/lib/ld-linux.so.2</filename>) searches through
+    <filename class="directory">/lib</filename> and <filename
+    class="directory">/usr/lib</filename> for dynamic libraries that are
+    needed by programs as they are run. However, if there are libraries in
+    directories other than <filename class="directory">/lib</filename> and
+    <filename class="directory">/usr/lib</filename>, these need to be
+    added to the <filename>/etc/ld.so.conf</filename> file in order
+    for the dynamic loader to find them. Two directories that are commonly
+    known to contain additional libraries are <filename
+    class="directory">/usr/local/lib</filename> and <filename
+    class="directory">/opt/lib</filename>, so add those directories to the
+    dynamic loader's search path.</para>
+
+    <para>Create a new file <filename>/etc/ld.so.conf</filename> by running the
+    following:</para>
+
+<screen><userinput>cat &gt; ${LFS}/etc/ld.so.conf &lt;&lt; "EOF"
+<literal># Begin /etc/ld.so.conf
+
+/usr/local/lib
+/opt/lib
+
+# End /etc/ld.so.conf</literal>
+EOF</userinput></screen>
+
+  </sect2>
+
+  <sect2 id="contents-glibc" role="content">
+    <title>Contents of Glibc</title>
+
+    <segmentedlist>
+      <segtitle>Installed programs</segtitle>
+      <segtitle>Installed libraries</segtitle>
+
+      <seglistitem>
+        <seg>catchsegv, gencat, getconf, getent, iconv, iconvconfig, ldconfig,
+        ldd, lddlibc4, locale, localedef, mtrace, nscd, nscd_nischeck,
+        pcprofiledump, pt_chown, rpcgen, rpcinfo, sln, sprof, tzselect, xtrace,
+        zdump, and zic</seg>
+        <seg>ld.so, libBrokenLocale.[a,so], libSegFault.so, libanl.[a,so],
+        libbsd-compat.a, libc.[a,so], libcrypt.[a,so], libdl.[a,so], libg.a,
+        libieee.a, libm.[a,so], libmcheck.a, libmemusage.so, libnsl.a,
+        libnss_compat.so, libnss_dns.so, libnss_files.so, libnss_hesiod.so,
+        libnss_nis.so, libnss_nisplus.so, libpcprofile.so, libpthread.[a,so],
+        libresolv.[a,so], librpcsvc.a, librt.[a,so], libthread_db.so, and
+        libutil.[a,so]</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="catchsegv">
+        <term><command>catchsegv</command></term>
+        <listitem>
+          <para>Can be used to create a stack trace when a program
+          terminates with a segmentation fault</para>
+          <indexterm zone="ch-system-glibc catchsegv">
+            <primary sortas="b-catchsegv">catchsegv</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="gencat">
+        <term><command>gencat</command></term>
+        <listitem>
+          <para>Generates message catalogues</para>
+          <indexterm zone="ch-system-glibc gencat">
+            <primary sortas="b-gencat">gencat</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="getconf">
+        <term><command>getconf</command></term>
+        <listitem>
+          <para>Displays the system configuration values for file system specific
+          variables</para>
+          <indexterm zone="ch-system-glibc getconf">
+            <primary sortas="b-getconf">getconf</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="getent">
+        <term><command>getent</command></term>
+        <listitem>
+          <para>Gets entries from an administrative database</para>
+          <indexterm zone="ch-system-glibc getent">
+            <primary sortas="b-getent">getent</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="iconv">
+        <term><command>iconv</command></term>
+        <listitem>
+          <para>Performs character set conversion</para>
+          <indexterm zone="ch-system-glibc iconv">
+            <primary sortas="b-iconv">iconv</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="iconvconfig">
+        <term><command>iconvconfig</command></term>
+        <listitem>
+          <para>Creates fastloading <command>iconv</command> module configuration
+          files</para>
+          <indexterm zone="ch-system-glibc iconvconfig">
+            <primary sortas="b-iconvconfig">iconvconfig</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="ldconfig">
+        <term><command>ldconfig</command></term>
+        <listitem>
+          <para>Configures the dynamic linker runtime bindings</para>
+          <indexterm zone="ch-system-glibc ldconfig">
+            <primary sortas="b-ldconfig">ldconfig</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="ldd">
+        <term><command>ldd</command></term>
+        <listitem>
+          <para>Reports which shared libraries are required
+          by each given program or shared library</para>
+          <indexterm zone="ch-system-glibc ldd">
+            <primary sortas="b-ldd">ldd</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="lddlibc4">
+        <term><command>lddlibc4</command></term>
+        <listitem>
+          <para>Assists <command>ldd</command> with object files</para>
+          <indexterm zone="ch-system-glibc lddlibc4">
+            <primary sortas="b-lddlibc4">lddlibc4</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="locale">
+        <term><command>locale</command></term>
+        <listitem>
+          <para>Tells the compiler to enable or disable the use of POSIX locales
+          for built-in operations</para>
+          <indexterm zone="ch-system-glibc locale">
+            <primary sortas="b-locale">locale</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="localedef">
+        <term><command>localedef</command></term>
+        <listitem>
+          <para>Compiles locale specifications</para>
+          <indexterm zone="ch-system-glibc localedef">
+            <primary sortas="b-localedef">localedef</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="mtrace">
+        <term><command>mtrace</command></term>
+        <listitem>
+          <para>Reads and interprets a memory trace file and
+          displays a summary in human-readable format</para>
+          <indexterm zone="ch-system-glibc mtrace">
+            <primary sortas="b-mtrace">mtrace</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="nscd">
+        <term><command>nscd</command></term>
+        <listitem>
+          <para>A daemon that provides a cache for the most common name
+          service requests</para>
+          <indexterm zone="ch-system-glibc nscd">
+            <primary sortas="b-nscd">nscd</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="nscd_nischeck">
+        <term><command>nscd_nischeck</command></term>
+        <listitem>
+          <para>Checks whether or not secure mode is necessary for NIS+
+          lookup</para>
+          <indexterm zone="ch-system-glibc nscd_nischeck">
+            <primary sortas="b-nscd_nischeck">nscd_nischeck</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="pcprofiledump">
+        <term><command>pcprofiledump</command></term>
+        <listitem>
+          <para>Dumps information generated by PC profiling</para>
+          <indexterm zone="ch-system-glibc pcprofiledump">
+            <primary sortas="b-pcprofiledump">pcprofiledump</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="pt_chown">
+        <term><command>pt_chown</command></term>
+        <listitem>
+          <para>A helper program for <command>grantpt</command> to set the owner,
+          group and access permissions of a slave pseudo terminal</para>
+          <indexterm zone="ch-system-glibc pt_chown">
+            <primary sortas="b-pt_chown">pt_chown</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="rpcgen">
+        <term><command>rpcgen</command></term>
+        <listitem>
+          <para>Generates C code to implement the Remote Procecure Call (RPC)
+          protocol</para>
+          <indexterm zone="ch-system-glibc rpcgen">
+            <primary sortas="b-rpcgen">rpcgen</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="rpcinfo">
+        <term><command>rpcinfo</command></term>
+        <listitem>
+          <para>Makes an RPC call to an RPC server</para>
+          <indexterm zone="ch-system-glibc rpcinfo">
+            <primary sortas="b-rpcinfo">rpcinfo</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="sln">
+        <term><command>sln</command></term>
+        <listitem>
+          <para>A statically linked <command>ln</command> program</para>
+          <indexterm zone="ch-system-glibc sln">
+            <primary sortas="b-sln">sln</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="sprof">
+        <term><command>sprof</command></term>
+        <listitem>
+          <para>Reads and displays shared object profiling data</para>
+          <indexterm zone="ch-system-glibc sprof">
+            <primary sortas="b-sprof">sprof</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="tzselect">
+        <term><command>tzselect</command></term>
+        <listitem>
+          <para>Asks the user about the location of the
+          system and reports the corresponding time zone description</para>
+          <indexterm zone="ch-system-glibc tzselect">
+            <primary sortas="b-tzselect">tzselect</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="xtrace">
+        <term><command>xtrace</command></term>
+        <listitem>
+          <para>Traces the execution of a program by
+          printing the currently executed function</para>
+          <indexterm zone="ch-system-glibc xtrace">
+            <primary sortas="b-xtrace">xtrace</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="zdump">
+        <term><command>zdump</command></term>
+        <listitem>
+          <para>The time zone dumper</para>
+          <indexterm zone="ch-system-glibc zdump">
+            <primary sortas="b-zdump">zdump</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="zic">
+        <term><command>zic</command></term>
+        <listitem>
+          <para>The time zone compiler</para>
+          <indexterm zone="ch-system-glibc zic">
+            <primary sortas="b-zic">zic</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="ld.so">
+        <term><filename class="libraryfile">ld.so</filename></term>
+        <listitem>
+          <para>The helper program for shared library executables</para>
+          <indexterm zone="ch-system-glibc ld.so">
+            <primary sortas="c-ld.so">ld.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libBrokenLocale">
+        <term><filename class="libraryfile">libBrokenLocale</filename></term>
+        <listitem>
+          <para>Used by programs, such as Mozilla, to solve broken locales</para>
+          <indexterm zone="ch-system-glibc libBrokenLocale">
+            <primary sortas="c-libBrokenLocale">libBrokenLocale</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libSegFault">
+        <term><filename class="libraryfile">libSegFault</filename></term>
+        <listitem>
+          <para>The segmentation fault signal handler</para>
+          <indexterm zone="ch-system-glibc libSegFault">
+            <primary sortas="c-libSegFault">libSegFault</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libanl">
+        <term><filename class="libraryfile">libanl</filename></term>
+        <listitem>
+          <para>An asynchronous name lookup library</para>
+          <indexterm zone="ch-system-glibc libanl">
+            <primary sortas="c-libanl">libanl</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libbsd-compat">
+        <term><filename class="libraryfile">libbsd-compat</filename></term>
+        <listitem>
+          <para>Provides the portability needed
+          in order to run certain Berkey Software Distribution (BSD) programs
+          under Linux</para>
+          <indexterm zone="ch-system-glibc libbsd-compat">
+            <primary sortas="c-libbsd-compat">libbsd-compat</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libc">
+        <term><filename class="libraryfile">libc</filename></term>
+        <listitem>
+          <para>The main C library</para>
+          <indexterm zone="ch-system-glibc libc">
+            <primary sortas="c-libc">libc</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libcrypt">
+        <term><filename class="libraryfile">libcrypt</filename></term>
+        <listitem>
+          <para>The cryptography library</para>
+          <indexterm zone="ch-system-glibc libcrypt">
+            <primary sortas="c-libcrypt">libcrypt</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libdl">
+        <term><filename class="libraryfile">libdl</filename></term>
+        <listitem>
+          <para>The dynamic linking interface library</para>
+          <indexterm zone="ch-system-glibc libdl">
+            <primary sortas="c-libdl">libdl</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libg">
+        <term><filename class="libraryfile">libg</filename></term>
+        <listitem>
+          <para>A runtime library for <command>g++</command></para>
+          <indexterm zone="ch-system-glibc libg">
+            <primary sortas="c-libg">libg</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libieee">
+        <term><filename class="libraryfile">libieee</filename></term>
+        <listitem>
+          <para>The Institute of Electrical and Electronic Engineers (IEEE)
+          floating point library</para>
+          <indexterm zone="ch-system-glibc libieee">
+            <primary sortas="c-libieee">libieee</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libm">
+        <term><filename class="libraryfile">libm</filename></term>
+        <listitem>
+          <para>The mathematical library</para>
+          <indexterm zone="ch-system-glibc libm">
+            <primary sortas="c-libm">libm</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libmcheck">
+        <term><filename class="libraryfile">libmcheck</filename></term>
+        <listitem>
+          <para>Contains code run at boot</para>
+          <indexterm zone="ch-system-glibc libmcheck">
+            <primary sortas="c-libmcheck">libmcheck</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libmemusage">
+        <term><filename class="libraryfile">libmemusage</filename></term>
+        <listitem>
+          <para>Used by <command>memusage</command> to help collect
+          information about the memory usage of a program</para>
+          <indexterm zone="ch-system-glibc libmemusage">
+            <primary sortas="c-libmemusage">libmemusage</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libnsl">
+        <term><filename class="libraryfile">libnsl</filename></term>
+        <listitem>
+          <para>The network services library</para>
+          <indexterm zone="ch-system-glibc libnsl">
+            <primary sortas="c-libnsl">libnsl</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libnss">
+        <term><filename class="libraryfile">libnss</filename></term>
+        <listitem>
+          <para>The Name Service Switch libraries, containing functions for
+          resolving host names, user names, group names, aliases, services,
+          protocols, etc.</para>
+          <indexterm zone="ch-system-glibc libnss">
+            <primary sortas="c-libnss">libnss</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libpcprofile">
+        <term><filename class="libraryfile">libpcprofile</filename></term>
+        <listitem>
+          <para>Contains profiling functions used to track the amount of CPU
+          time spent in specific source code lines</para>
+          <indexterm zone="ch-system-glibc libpcprofile">
+            <primary sortas="c-libpcprofile">libpcprofile</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libpthread">
+        <term><filename class="libraryfile">libpthread</filename></term>
+        <listitem>
+          <para>The POSIX threads library</para>
+          <indexterm zone="ch-system-glibc libpthread">
+            <primary sortas="c-libpthread">libpthread</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libresolv">
+        <term><filename class="libraryfile">libresolv</filename></term>
+        <listitem>
+          <para>Contains functions for creating, sending, and interpreting
+          packets to the Internet domain name servers</para>
+          <indexterm zone="ch-system-glibc libresolv">
+            <primary sortas="c-libresolv">libresolv</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="librpcsvc">
+        <term><filename class="libraryfile">librpcsvc</filename></term>
+        <listitem>
+          <para>Contains functions providing miscellaneous RPC services</para>
+          <indexterm zone="ch-system-glibc librpcsvc">
+            <primary sortas="c-librpcsvc">librpcsvc</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="librt">
+        <term><filename class="libraryfile">librt</filename></term>
+        <listitem>
+          <para>Contains functions providing most of the interfaces specified by
+          the POSIX.1b Realtime Extension</para>
+          <indexterm zone="ch-system-glibc librt">
+            <primary sortas="c-librt">librt</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libthread_db">
+        <term><filename class="libraryfile">libthread_db</filename></term>
+        <listitem>
+          <para>Contains functions useful for
+          building debuggers for multi-threaded programs</para>
+          <indexterm zone="ch-system-glibc libthread_db">
+            <primary sortas="c-libthread_db">libthread_db</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libutil">
+        <term><filename class="libraryfile">libutil</filename></term>
+        <listitem>
+          <para>Contains code for <quote>standard</quote> functions used in
+          many different Unix utilities</para>
+          <indexterm zone="ch-system-glibc libutil">
+            <primary sortas="c-libutil">libutil</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
Index: OK/cross-tools/common/gmp.xml
===================================================================
--- BOOK/cross-tools/common/gmp.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,48 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-cross-tools-gmp" role="wrap">
-  <?dbhtml filename="gmp.html"?>
-
-  <title>GMP-&gmp-version;</title>
-
-  <indexterm zone="ch-cross-tools-gmp">
-    <primary sortas="a-GMP">GMP</primary>
-    <secondary>cross-tools</secondary>
-  </indexterm>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../../final-system/common/gmp.xml"
-  xpointer="xpointer(//*[@role='package'])"/>
-
-  <sect2 role="installation">
-    <title>Installation of GMP</title>
-
-    <para os="a">Prepare GMP for compilation:</para>
-
-<screen os="b"><userinput>CPPFLAGS=-fexceptions ./configure \
-    --prefix=${CLFS}/cross-tools --enable-cxx</userinput></screen>
-
-    <para os="c">Compile the package:</para>
-
-<screen os="d"><userinput>make</userinput></screen>
-
-    <para os="e">Install the package:</para>
-
-<screen os="f"><userinput>make install</userinput></screen>
-
-  </sect2>
-
-  <sect2 role="content">
-    <title/>
-
-    <para>Details on this package are located in <xref
-    linkend="contents-gmp" role="."/></para>
-
-  </sect2>
-
-</sect1>
Index: OK/cross-tools/common/groff.xml
===================================================================
--- BOOK/cross-tools/common/groff.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,42 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-cross-tools-groff">
-  <?dbhtml filename="groff.html"?>
-
-  <title>Groff-&groff-version; - Native</title>
-
-  <sect2 role="installation">
-    <title>Installation of Groff</title>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../../final-system/common/groff.xml"
-    xpointer="xpointer(//*[@os='a'])"/>
-
-    <para>Prepare Groff for compilation:</para>
-
-<screen><userinput>PAGE=<replaceable>[paper_size]</replaceable> ./configure --prefix=${CLFS}/cross-tools --without-x</userinput></screen>
-
-    <para>Compile the Package:</para>
-
-<screen><userinput>make</userinput></screen>
-
-    <para>Install the package:</para>
-
-<screen><userinput>make install</userinput></screen>
-
-  </sect2>
-
-  <sect2 role="content">
-    <title/>
-
-    <para>Details on this package are located in <xref
-    linkend="contents-groff" role="."/></para>
-
-  </sect2>
-
-</sect1>
Index: BOOK/cross-tools/common/introduction.xml
===================================================================
--- BOOK/cross-tools/common/introduction.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/cross-tools/common/introduction.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -14,5 +14,5 @@
 
   <para>If for some reason you have to stop and come back later, remember
-  to use the <command>su - clfs</command> command, and it will setup the
+  to use the <command>su - lfs</command> command, and it will setup the
   build environment that you left.</para>
 
@@ -22,5 +22,5 @@
     <important>
       <para>Before issuing the build instructions for a package, the package
-      should be unpacked as user <systemitem class="username">clfs</systemitem>,
+      should be unpacked as user <systemitem class="username">lfs</systemitem>,
       and a <command>cd</command> into the created directory should be
       performed. The build instructions assume that the <command>bash</command>
Index: OK/cross-tools/common/mpfr.xml
===================================================================
--- BOOK/cross-tools/common/mpfr.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,57 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-cross-tools-mpfr" role="wrap">
-  <?dbhtml filename="mpfr.html"?>
-
-  <title>MPFR-&mpfr-version;</title>
-
-  <indexterm zone="ch-cross-tools-mpfr">
-    <primary sortas="a-MPFR">MPFR</primary>
-    <secondary>cross-tools</secondary>
-  </indexterm>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../../final-system/common/mpfr.xml"
-  xpointer="xpointer(//*[@role='package'])"/>
-
-  <sect2 role="installation">
-    <title>Installation of MPFR</title>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../../final-system/common/mpfr.xml"
-    xpointer="xpointer(//*[@os='p1'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../../final-system/common/mpfr.xml"
-    xpointer="xpointer(//*[@os='p2'])"/>
-
-    <para os="a">Prepare MPFR for compilation:</para>
-
-<screen os="b"><userinput>LDFLAGS="-Wl,-rpath,${CLFS}/cross-tools/lib" \
-./configure --prefix=${CLFS}/cross-tools \
-    --enable-shared --with-gmp=${CLFS}/cross-tools</userinput></screen>
-
-    <para os="c">Compile the package:</para>
-
-<screen os="d"><userinput>make</userinput></screen>
-
-    <para os="e">Install the package:</para>
-
-<screen os="f"><userinput>make install</userinput></screen>
-
-  </sect2>
-
-  <sect2 role="content">
-    <title/>
-
-    <para>Details on this package are located in <xref
-    linkend="contents-mpfr" role="."/></para>
-
-  </sect2>
-
-</sect1>
Index: OK/cross-tools/common/ncurses.xml
===================================================================
--- BOOK/cross-tools/common/ncurses.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,58 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-cross-tools-ncurses" role="wrap">
-  <?dbhtml filename="ncurses.html"?>
-
-  <title>Ncurses-&ncurses-version; - Native</title>
-
-  <indexterm zone="ch-cross-tools-ncurses">
-    <primary sortas="a-Ncurses">Ncurses</primary>
-    <secondary>cross tools</secondary>
-  </indexterm>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../../final-system/common/ncurses.xml"
-  xpointer="xpointer(//*[@role='package'])"/>
-
-  <sect2 role="installation">
-    <title>Installation of Ncurses</title>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../../final-system/common/ncurses.xml"
-    xpointer="xpointer(//*[@os='p3'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../../final-system/common/ncurses.xml"
-    xpointer="xpointer(//*[@os='p4'])"/>
-
-    <para os="a">Prepare Ncurses for compilation:</para>
-
-<screen os="b"><userinput>./configure --prefix=${CLFS}/cross-tools \
-    --without-debug --without-shared</userinput></screen>
-
-    <para os="c">Only one binary is needed for the Cross-Tools. Build the
-    headers and then build <command>tic</command>:</para>
-
-<screen os="d"><userinput>make -C include
-make -C progs tic</userinput></screen>
-
-    <para os="e">Install <command>tic</command> with the following command:</para>
-
-<screen os="f"><userinput>install -m755 progs/tic ${CLFS}/cross-tools/bin</userinput></screen>
-
-  </sect2>
-
-  <sect2 role="content">
-    <title/>
-
-    <para>Details on this package are located in <xref
-    linkend="contents-ncurses" role="."/></para>
-
-  </sect2>
-
-</sect1>
Index: OK/cross-tools/common/ppl.xml
===================================================================
--- BOOK/cross-tools/common/ppl.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,61 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-cross-tools-ppl" role="wrap">
-  <?dbhtml filename="ppl.html"?>
-
-  <title>PPL-&ppl-version;</title>
-
-  <indexterm zone="ch-cross-tools-ppl">
-    <primary sortas="a-PPL">PPL</primary>
-    <secondary>cross-tools</secondary>
-  </indexterm>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../../final-system/common/ppl.xml"
-  xpointer="xpointer(//*[@role='package'])"/>
-
-  <sect2 role="installation">
-    <title>Installation of PPL</title>
-
-<!--
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../../final-system/common/ppl.xml"
-	xpointer="xpointer(//*[@os='p1'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../../final-system/common/ppl.xml"
-	xpointer="xpointer(//*[@os='p2'])"/>
- -->
-
-    <para os="a">Prepare PPL for compilation:</para>
-
-<screen os="b"><userinput>LDFLAGS="-Wl,-rpath,${CLFS}/cross-tools/lib" \
-    ./configure --prefix=${CLFS}/cross-tools --enable-shared \
-    --enable-interfaces="c,cxx" --disable-optimization \
-    --with-libgmp-prefix=${CLFS}/cross-tools \
-    --with-libgmpxx-prefix=${CLFS}/cross-tools</userinput></screen>
-
-    <para os="c">Compile the package:</para>
-
-<screen os="d"><userinput>make</userinput></screen>
-
-    <para os="e">Install the package:</para>
-
-<screen os="f"><userinput>make install</userinput></screen>
-
-  </sect2>
-
-  <sect2 role="content">
-    <title/>
-
-    <para>Details on this package are located in <xref
-    linkend="contents-ppl" role="."/></para>
-
-  </sect2>
-
-</sect1>
Index: OK/cross-tools/common/shadow.xml
===================================================================
--- BOOK/cross-tools/common/shadow.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,76 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-cross-tools-shadow">
-  <?dbhtml filename="shadow.html"?>
-
-  <title>Shadow-&shadow-version; - Native</title>
-
-  <indexterm zone="ch-cross-tools-shadow">
-    <primary sortas="a-Shadow">Shadow</primary>
-    <secondary>cross tools</secondary>
-  </indexterm>
-
-  <sect2 role="installation">
-    <title>Installation of Shadow</title>
-
-    <para>The following patch changes the hard-coded <filename>/etc</filename>
-    in the sources to whatever was passed to configure. It also allows the
-    utilities to run as a user other then root:</para>
-
-<screen><userinput>patch -Np1 -i ../&shadow-sysroot_hacks-patch;</userinput></screen>
-
-    <para>The following value is added to <filename>config.cache</filename> to
-    make sure that the <filename>passwd</filename> program is found:</para>
-
-<screen><userinput>cat &gt; config.cache &lt;&lt; EOF
-shadow_cv_passwd_dir=${CLFS}/bin"
-EOF</userinput></screen>
-
-    <para>The following value causes Shadow to use its internal lckpwdf
-    instead of the one provided by EGLIBC. The one provided by EGLIBC will
-    attempt to modify the host system:</para>
-
-<screen><userinput>cat &gt;&gt; config.cache &lt;&lt; EOF
-ac_cv_func_lckpwdf=no
-EOF</userinput></screen>
-
-    <para>Prepare Shadow for compilation:</para>
-
-<screen><userinput>./configure --prefix=${CLFS}/cross-tools --sbindir=${CLFS}/cross-tools/bin \
-    --sysconfdir=$CLFS/etc --disable-shared --without-libpam \
-    --without-audit --without-selinux --program-prefix=${CLFS_TARGET}- \
-    --without-nscd --cache-file=config.cache</userinput></screen>
-
-    <para>Add the proper prefix to the <filename>passwd</filename> program:</para>
-
-<screen><userinput>cp config.h{,.orig}
-sed "/PASSWD_PROGRAM/s/passwd/${CLFS_TARGET}-&amp;/" config.h.orig &gt; config.h</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput>make</userinput></screen>
-
-    <para>Install the package:</para>
-
-<screen><userinput>make install</userinput></screen>
-
-    <note>
-      <para>The tools built on this page will be used later in this book.</para>
-    </note>
-
-  </sect2>
-
-  <sect2 role="content">
-    <title/>
-
-    <para>Details on this package are located in <xref
-    linkend="contents-shadow" role="."/></para>
-
-  </sect2>
-
-</sect1>
Index: OK/cross-tools/common/sysroot_wrapper.xml
===================================================================
--- BOOK/cross-tools/common/sysroot_wrapper.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,138 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-cross-tools-sysroot-wrapper" role="wrap">
-  <?dbhtml filename="sysroot_wrapper.html"?>
-
-  <title>Creating a Sysroot Wrapper</title>
-
-  <indexterm zone="ch-cross-tools-sysroot-wrapper">
-    <primary sortas="a-File">Sysroot Wrapper</primary>
-  </indexterm>
-
-  <sect2 role="package">
-    <title/>
-
-    <para>The Sysroot Wrapper is used to wrap certain binaries that have
-    hardcoded paths to libraries or are architecture specific.</para>
-
-  </sect2>
-
-  <sect2 role="installation">
-    <title>Installation of The Sysroot Wrapper</title>
-
-    <para os="a">Create the source file:</para>
-
-<screen os="b"><userinput>cat &gt; sysroot_wrapper.c &lt;&lt; "EOF"
-#include &lt;sys/wait.h&gt;
-#include &lt;stdio.h&gt;
-#include &lt;stdlib.h&gt;
-#include &lt;unistd.h&gt;
-#include &lt;string.h&gt;
-
-char *sysrootdir = "";
-
-int main(int argc, char *argv[]) {
-  sysrootdir = getenv("CLFS");
-  if (!sysrootdir)
-    sysrootdir="";
-
-  int stdout_pipe[2];
-  pipe(stdout_pipe);
-
-  pid_t pid = fork();
-
-  if (pid == 0) {
-    /* Redirect stdout to our pipe */
-    close(1);
-    dup(stdout_pipe[1]);
-    close(stdout_pipe[0]);
-    close(stdout_pipe[1]);
-
-    char *name = strdup(argv[0]);
-    strcat(name, ".sysroot");
-
-    execvp(name, argv);
-
-    free(name);
-
-    exit(0);
-  } else {
-    /* Close stdout for write */
-    close(stdout_pipe[1]);
-
-    /* redirect our stdout pipe from the child to our stdin */
-    close(0);
-    dup(stdout_pipe[0]);
-    close(stdout_pipe[0]);
-
-    char c, lc;
-    char *d = malloc(1);
-    int d_len = 0;
-
-    while ((c = fgetc(stdin)) != EOF) {
-      d_len++;
-      d = realloc(d, d_len + 1);
-      *(d + d_len - 1) = c;
-      *(d + d_len) = '\0';
-
-      if ((lc == '-')&amp;&amp;((c == 'L')||(c == 'I'))) {
-        d_len = d_len + strlen(sysrootdir);
-        d = realloc(d, d_len + 1);
-        strcat(d, sysrootdir);
-      }
-
-      lc = c;
-    }
-
-    printf ("%s", d);
-    free(d);
-
-    exit(0);
-  }
-
-  return 0;
-}
-EOF</userinput></screen>
-
-    <para os="c">Compile and Install the Sysroot Wrapper:</para>
-
-<screen os="d"><userinput>gcc ${BUILD64} sysroot_wrapper.c -o ${CLFS}/cross-tools/bin/sysroot_wrapper</userinput></screen>
-
-  </sect2>
-
-  <sect2 id="contents-sysroot-wrapper" role="content">
-    <title>Contents of The Sysroot Wrapper</title>
-
-    <segmentedlist>
-      <segtitle>Installed programs</segtitle>
-
-      <seglistitem>
-        <seg>sysroot_wrapper</seg>
-      </seglistitem>
-    </segmentedlist>
-
-    <variablelist>
-      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
-      <?dbfo list-presentation="list"?>
-      <?dbhtml list-presentation="table"?>
-
-      <varlistentry id="sysroot_wrapper">
-        <term><command>sysroot_wrapper</command></term>
-        <listitem>
-          <para>Description Needed</para>
-          <indexterm zone="ch-cross-tools-sysroot-wrapper sysroot_wrapper">
-            <primary sortas="b-sysroot_wrapper">sysroot_wrapper</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-    </variablelist>
-
-  </sect2>
-
-</sect1>
Index: OK/cross-tools/hppa-chapter.xml
===================================================================
--- BOOK/cross-tools/hppa-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,32 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../general.ent">
-  %general-entities;
-]>
-
-<chapter id="chapter-cross-tools" xreflabel="Constructing Cross-Compile Tools">
-  <?dbhtml dir="cross-tools"?>
-  <?dbhtml filename="chapter.html"?>
-
-  <title>Constructing Cross-Compile Tools</title>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/introduction.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/cflags.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="hppa/variables.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="hppa/linux-headers.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gmp.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/mpfr.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/ppl.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/cloog-ppl.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/binutils.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gcc-static.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="hppa/eglibc.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gcc-final.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/file.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/groff.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/shadow.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/ncurses.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/sysroot_wrapper.xml"/>
-
-</chapter>
Index: OK/cross-tools/hppa/eglibc.xml
===================================================================
--- BOOK/cross-tools/hppa/eglibc.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,138 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-cross-tools-eglibc" role="wrap">
-  <title>EGLIBC-&eglibc-version;</title>
-
-  <?dbhtml filename="eglibc.html"?>
-
-  <indexterm zone="ch-cross-tools-eglibc">
-    <primary sortas="a-EGLIBC">EGLIBC</primary>
-  </indexterm>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../common/eglibc.xml"
-  xpointer="xpointer(//*[@role='package'])"/>
-
-  <sect2 role="installation">
-    <title>Installation of EGLIBC</title>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='a'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/eglibc.xml"
-    xpointer="xpointer(//*[@os='u1'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/eglibc.xml"
-    xpointer="xpointer(//*[@os='u2'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='p1'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='p2'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='s1'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='s2'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='b'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='c'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='d'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='e'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='f'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='g'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='h'])"/>
-
-<screen os="i"><userinput>BUILD_CC="gcc" CC="${CLFS_TARGET}-gcc" \
-    AR="${CLFS_TARGET}-ar" RANLIB="${CLFS_TARGET}-ranlib" \
-    ../eglibc-&eglibc-version;/configure --prefix=/usr \
-    --libexecdir=/usr/lib/eglibc --host=${CLFS_TARGET} --build=${CLFS_HOST} \
-    --disable-profile --enable-add-ons --with-tls --enable-kernel=2.6.9 \
-    --with-__thread --with-binutils=${CLFS}/cross-tools/bin \
-    --with-headers=${CLFS}/usr/include --cache-file=config.cache</userinput></screen>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='j'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='k'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='l'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='m'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='n'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='o'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='p'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='q'])"/>
-
-  </sect2>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../common/eglibc.xml"
-  xpointer="xpointer(id('i18n-eglibc'))"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../common/eglibc.xml"
-  xpointer="xpointer(id('conf-eglibc'))"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../common/eglibc.xml"
-  xpointer="xpointer(id('conf-ld'))"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../common/eglibc.xml"
-  xpointer="xpointer(id('contents-eglibc'))"/>
-
-</sect1>
Index: OK/cross-tools/hppa/linux-headers.xml
===================================================================
--- BOOK/cross-tools/hppa/linux-headers.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,49 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-cross-tools-linux-headers" role="wrap">
-  <?dbhtml filename="linux-headers.html"?>
-
-  <title>Linux-Headers-&linux-version;</title>
-
-  <indexterm zone="ch-cross-tools-linux-headers">
-    <primary sortas="a-Linux-Headers">Linux-Headers</primary>
-  </indexterm>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/linux-headers.xml"
-  xpointer="xpointer(//*[@role='package'])"/>
-
-  <sect2 role="installation">
-    <title>Installation of Linux Headers</title>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/linux-headers.xml"
-    xpointer="xpointer(//*[@os='a'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/linux-headers.xml"
-    xpointer="xpointer(//*[@os='b'])"/>
-
-<screen os="c"><userinput>make mrproper
-make ARCH=parisc headers_check
-make ARCH=parisc INSTALL_HDR_PATH=dest headers_install
-cp -rv dest/include/* ${CLFS}/usr/include
-find ${CLFS}/usr/include -name .install -or -name ..install.cmd | xargs rm -fv</userinput></screen>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/linux-headers.xml"
-    xpointer="xpointer(//*[@os='d'])"/>
-
-  </sect2>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/linux-headers.xml"
-  xpointer="xpointer(id('contents-linux-headers'))"/>
-
-</sect1>
-
Index: OK/cross-tools/hppa/variables.xml
===================================================================
--- BOOK/cross-tools/hppa/variables.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,74 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-cross-tools-variables">
-  <?dbhtml filename="variables.html"?>
-
-  <title>Build Variables</title>
-
-  <bridgehead renderas="sect4">Setting Host and Target</bridgehead>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/variables.xml"
-  xpointer="xpointer(//*[@os='a'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/variables.xml"
-  xpointer="xpointer(//*[@os='b'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/variables.xml"
-  xpointer="xpointer(//*[@os='c'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../x86/variables.xml"
-  xpointer="xpointer(//*[@os='d'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/variables.xml"
-  xpointer="xpointer(//*[@os='e'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/variables.xml"
-  xpointer="xpointer(//*[@os='f'])"/>
-
-  <table os="g">
-    <title>Processor Type and  Target Triplets</title>
-    <?dbfo table-width="5in" ?>
-
-    <tgroup cols="2" align="center">
-
-      <colspec colnum="1" colwidth="2.5in" colname="Processor"/>
-      <colspec colnum="2" colwidth="2.5in" colname="Triplet"/>
-
-      <thead>
-        <row>
-          <entry>Processor</entry>
-          <entry>Target Triplet</entry>
-        </row>
-      </thead>
-
-      <tbody>
-        <row>
-          <entry>Unknown</entry>
-          <entry>hppa-unknown-linux-gnu</entry>
-        </row>
-        <row>
-          <entry>PA-7000 Series</entry>
-          <entry>hppa1.1-unknown-linux-gnu</entry>
-        </row>
-        <row>
-          <entry>PA-8000 Series</entry>
-          <entry>hppa2.0-unknown-linux-gnu</entry>
-        </row>
-      </tbody>
-
-    </tgroup>
-
-  </table>
-
-</sect1>
Index: OK/cross-tools/x86-chapter.xml
===================================================================
--- BOOK/cross-tools/x86-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,32 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../general.ent">
-  %general-entities;
-]>
-
-<chapter id="chapter-cross-tools" xreflabel="Constructing Cross-Compile Tools">
-  <?dbhtml dir="cross-tools"?>
-  <?dbhtml filename="chapter.html"?>
-
-  <title>Constructing Cross-Compile Tools</title>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/introduction.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/cflags.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="x86/variables.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="x86/linux-headers.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gmp.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/mpfr.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/ppl.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/cloog-ppl.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/binutils.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gcc-static.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="x86/eglibc.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gcc-final.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/file.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/groff.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/shadow.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/ncurses.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/sysroot_wrapper.xml"/>
-
-</chapter>
Index: OK/cross-tools/x86/eglibc.xml
===================================================================
--- BOOK/cross-tools/x86/eglibc.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,131 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-cross-tools-eglibc" role="wrap">
-  <title>EGLIBC-&eglibc-version;</title>
-
-  <?dbhtml filename="eglibc.html"?>
-
-  <indexterm zone="ch-cross-tools-eglibc">
-    <primary sortas="a-EGLIBC">EGLIBC</primary>
-  </indexterm>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../common/eglibc.xml"
-  xpointer="xpointer(//*[@role='package'])"/>
-
-  <sect2 role="installation">
-    <title>Installation of EGLIBC</title>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='a'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='p1'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='p2'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='s1'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='s2'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='b'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='c'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='d'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='e'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='f'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='g'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='h'])"/>
-
-<screen os="i"><userinput>BUILD_CC="gcc" CC="${CLFS_TARGET}-gcc" \
-    AR="${CLFS_TARGET}-ar" RANLIB="${CLFS_TARGET}-ranlib" \
-    CFLAGS="-march=$(cut -d- -f1 &lt;&lt;&lt; ${CLFS_TARGET}) -mtune=generic -g -O2" \
-    ../eglibc-&eglibc-version;/configure --prefix=/usr \
-    --libexecdir=/usr/lib/eglibc --host=${CLFS_TARGET} --build=${CLFS_HOST} \
-    --disable-profile --enable-add-ons --with-tls --enable-kernel=2.6.0 \
-    --with-__thread --with-binutils=${CLFS}/cross-tools/bin \
-    --with-headers=${CLFS}/usr/include --cache-file=config.cache</userinput></screen>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='j'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='k'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='l'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='m'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='n'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='o'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='p'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/eglibc.xml"
-    xpointer="xpointer(//*[@os='q'])"/>
-
-  </sect2>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../common/eglibc.xml"
-  xpointer="xpointer(id('i18n-eglibc'))"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../common/eglibc.xml"
-  xpointer="xpointer(id('conf-eglibc'))"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../common/eglibc.xml"
-  xpointer="xpointer(id('conf-ld'))"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../common/eglibc.xml"
-  xpointer="xpointer(id('contents-eglibc'))"/>
-
-</sect1>
Index: OK/cross-tools/x86/linux-headers.xml
===================================================================
--- BOOK/cross-tools/x86/linux-headers.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,49 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-cross-tools-linux-headers" role="wrap">
-  <?dbhtml filename="linux-headers.html"?>
-
-  <title>Linux-Headers-&linux-version;</title>
-
-  <indexterm zone="ch-cross-tools-linux-headers">
-    <primary sortas="a-Linux-Headers">Linux-Headers</primary>
-  </indexterm>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/linux-headers.xml"
-  xpointer="xpointer(//*[@role='package'])"/>
-
-  <sect2 role="installation">
-    <title>Installation of Linux Headers</title>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/linux-headers.xml"
-    xpointer="xpointer(//*[@os='a'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/linux-headers.xml"
-    xpointer="xpointer(//*[@os='b'])"/>
-
-<screen os="c"><userinput>make mrproper
-make ARCH=x86 headers_check
-make ARCH=x86 INSTALL_HDR_PATH=dest headers_install
-cp -rv dest/include/* ${CLFS}/usr/include
-find ${CLFS}/usr/include -name .install -or -name ..install.cmd | xargs rm -fv</userinput></screen>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/linux-headers.xml"
-    xpointer="xpointer(//*[@os='d'])"/>
-
-  </sect2>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/linux-headers.xml"
-  xpointer="xpointer(id('contents-linux-headers'))"/>
-
-</sect1>
-
Index: OK/cross-tools/x86/variables.xml
===================================================================
--- BOOK/cross-tools/x86/variables.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,79 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-cross-tools-variables">
-  <?dbhtml filename="variables.html"?>
-
-  <title>Build Variables</title>
-
-  <bridgehead renderas="sect4">Setting Host and Target</bridgehead>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/variables.xml"
-  xpointer="xpointer(//*[@os='a'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/variables.xml"
-  xpointer="xpointer(//*[@os='b'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/variables.xml"
-  xpointer="xpointer(//*[@os='c'])"/>
-
-<screen os="d"><userinput>export CLFS_TARGET="[target triplet]"</userinput></screen>
-
-  <para os="t1">Replace [target triplet] with the appropriate machine triplet
-  using the table at the bottom of the page.</para>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/variables.xml"
-  xpointer="xpointer(//*[@os='e'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/variables.xml"
-  xpointer="xpointer(//*[@os='f'])"/>
-
-  <table os="g">
-    <title>Processor Type and  Target Triplets</title>
-    <?dbfo table-width="5in" ?>
-
-    <tgroup cols="2" align="center">
-
-      <colspec colnum="1" colwidth="2.5in" colname="Processor"/>
-      <colspec colnum="2" colwidth="2.5in" colname="Triplet"/>
-
-      <thead>
-        <row>
-          <entry>Processor</entry>
-          <entry>Target Triplet</entry>
-        </row>
-      </thead>
-
-      <tbody>
-        <row>
-          <entry>486 Compatibles</entry>
-          <entry>i486-pc-linux-gnu</entry>
-        </row>
-        <row>
-          <entry>Pentium, K6, 586 Compatibles</entry>
-          <entry>i586-pc-linux-gnu</entry>
-        </row>
-        <row>
-          <entry>Pentium II, Pentium III, Pentium 4</entry>
-          <entry>i686-pc-linux-gnu</entry>
-        </row>
-        <row>
-          <entry>Athlon, Duron</entry>
-          <entry>i686-pc-linux-gnu</entry>
-        </row>
-      </tbody>
-
-    </tgroup>
-
-  </table>
-
-</sect1>
Index: OK/final-preps/aboutclfs.xml
===================================================================
--- BOOK/final-preps/aboutclfs.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,43 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-final-preps-aboutclfs">
-  <?dbhtml filename="aboutclfs.html"?>
-
-  <title>About ${CLFS}</title>
-
-  <para>Throughout this book, the environment variable <envar>CLFS</envar> will
-  be used several times. It is paramount that this variable is always defined.
-  It should be set to the mount point chosen for the CLFS partition.
-  Check that the <envar>CLFS</envar> variable is set up properly with:</para>
-
-<screen><userinput>echo ${CLFS}</userinput></screen>
-
-  <para>Make sure the output shows the path to the CLFS partition's mount
-  point, which is <filename class="directory">/mnt/clfs</filename> if the
-  provided example was followed. If the output is incorrect, the
-  variable can be set with:</para>
-
-<screen><userinput>export CLFS=/mnt/clfs</userinput></screen>
-
-  <para>Having this variable set is beneficial in that commands such as
-  <command>install -dv ${CLFS}/tools</command> can be typed literally. The shell
-  will automatically replace <quote>${CLFS}</quote> with
-  <quote>/mnt/clfs</quote> (or whatever the variable was set to) when it
-  processes the command line.</para>
-
-  <para>If you haven't created the <filename class="directory">${CLFS}</filename>
-  directory, do so at this time by issuing the following commands:</para>
-
-<screen><userinput>install -dv ${CLFS}</userinput></screen>
-
-  <para>Do not forget to check that <envar>${CLFS}</envar> is set whenever
-  you leave and reenter the current working environment (as when doing a
-  <quote>su</quote> to <systemitem class="username">root</systemitem> or
-  another user).</para>
-
-</sect1>
Index: BOOK/final-preps/aboutlfs.xml
===================================================================
--- BOOK/final-preps/aboutlfs.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/final-preps/aboutlfs.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-final-preps-aboutlfs">
+  <?dbhtml filename="aboutlfs.html"?>
+
+  <title>About $LFS</title>
+
+  <para>Throughout this book, the environment variable <envar>LFS</envar> will
+  be used several times. It is paramount that this variable is always defined.
+  It should be set to the mount point chosen for the CLFS partition.
+  Check that the <envar>LFS</envar> variable is set up properly with:</para>
+
+<screen><userinput>echo $LFS</userinput></screen>
+
+  <para>Make sure the output shows the path to the CLFS partition's mount
+  point, which is <filename class="directory">/mnt/lfs</filename> if the
+  provided example was followed. If the output is incorrect, the
+  variable can be set with:</para>
+
+<screen><userinput>export LFS=/mnt/lfs</userinput></screen>
+
+  <para>Having this variable set is beneficial in that commands such as
+  <command>install -d $LFS/tools</command> can be typed literally. The shell
+  will automatically replace <quote>$LFS</quote> with
+  <quote>/mnt/lfs</quote> (or whatever the variable was set to) when it
+  processes the command line.</para>
+
+  <para>If you haven't created the <filename class="directory">$LFS</filename>
+  directory, do so at this time by issuing the following commands:</para>
+
+<screen><userinput>install -dv $LFS</userinput></screen>
+
+  <para>Do not forget to check that <envar>$LFS</envar> is set whenever
+  you leave and reenter the current working environment (as when doing a
+  <quote>su</quote> to <systemitem class="username">root</systemitem> or
+  another user).</para>
+
+</sect1>
Index: BOOK/final-preps/abouttestsuites.xml
===================================================================
--- BOOK/final-preps/abouttestsuites.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-preps/abouttestsuites.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../general.ent">
   %general-entities;
Index: BOOK/final-preps/addinguser.xml
===================================================================
--- BOOK/final-preps/addinguser.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-preps/addinguser.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../general.ent">
   %general-entities;
@@ -9,5 +9,5 @@
   <?dbhtml filename="addinguser.html"?>
 
-  <title>Adding the CLFS User</title>
+  <title>Adding the LFS User</title>
 
   <para>When logged in as user <systemitem class="username">root</systemitem>,
@@ -16,13 +16,11 @@
   You could use your own user name, but to make it easier to set up a clean
   work environment, create a new user called <systemitem
-  class="username">clfs</systemitem> as a member of a new group (also named
-  <systemitem class="groupname">clfs</systemitem>) and use this user during
+  class="username">lfs</systemitem> as a member of a new group (also named
+  <systemitem class="groupname">lfs</systemitem>) and use this user during
   the installation process. As <systemitem class="username">root</systemitem>,
   issue the following commands to add the new user:</para>
 
-<screen><userinput>groupadd clfs
-useradd -s /bin/bash -g clfs -d /home/clfs clfs
-mkdir -pv /home/clfs
-chown -v clfs:clfs /home/clfs</userinput></screen>
+<screen><userinput>groupadd lfs
+useradd -s /bin/bash -g lfs -m -k /dev/null lfs</userinput></screen>
 
   <variablelist>
@@ -33,18 +31,35 @@
       <listitem>
         <para>This makes <command>bash</command> the default shell for
-        user <systemitem class="username">clfs</systemitem>.</para>
+        user <systemitem class="username">lfs</systemitem>.</para>
       </listitem>
     </varlistentry>
 
     <varlistentry>
-      <term><parameter>-g clfs</parameter></term>
+      <term><parameter>-g lfs</parameter></term>
       <listitem>
-        <para>This option adds user <systemitem class="username">clfs</systemitem>
-        to group <systemitem class="groupname">clfs</systemitem>.</para>
+        <para>This option adds user <systemitem class="username">lfs</systemitem>
+        to group <systemitem class="groupname">lfs</systemitem>.</para>
       </listitem>
     </varlistentry>
 
     <varlistentry>
-      <term><parameter>clfs</parameter></term>
+      <term><parameter>-m</parameter></term>
+      <listitem>
+        <para>This creates a home directory for <systemitem
+        class="username">lfs</systemitem>.</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><parameter>-k /dev/null</parameter></term>
+      <listitem>
+        <para>This parameter prevents possible copying of files from a skeleton
+        directory (default is <filename class="directory">/etc/skel</filename>)
+        by changing the input location to the special null device.</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><parameter>lfs</parameter></term>
       <listitem>
         <para>This is the actual name for the created group and user.</para>
@@ -54,24 +69,24 @@
   </variablelist>
 
-  <para>To log in as <systemitem class="username">clfs</systemitem> (as
-  opposed to switching to user <systemitem class="username">clfs</systemitem>
+  <para>To log in as <systemitem class="username">lfs</systemitem> (as
+  opposed to switching to user <systemitem class="username">lfs</systemitem>
   when logged in as <systemitem class="username">root</systemitem>, which
-  does not require the <systemitem class="username">clfs</systemitem> user
-  to have a password), give <systemitem class="username">clfs</systemitem>
+  does not require the <systemitem class="username">lfs</systemitem> user
+  to have a password), give <systemitem class="username">lfs</systemitem>
   a password:</para>
 
-<screen><userinput>passwd clfs</userinput></screen>
+<screen><userinput>passwd lfs</userinput></screen>
 
-  <para>Grant <systemitem class="username">clfs</systemitem> full access to
-  <filename class="directory">${CLFS}</filename> by making <systemitem
-  class="username">clfs</systemitem> the directory's owner:</para>
+  <para>Grant <systemitem class="username">lfs</systemitem> full access to
+  <filename class="directory">$LFS</filename> by making <systemitem
+  class="username">lfs</systemitem> the directory's owner:</para>
 
-<screen><userinput>chown -Rv clfs ${CLFS}</userinput></screen>
+<screen><userinput>chown -Rv lfs $LFS</userinput></screen>
 
-  <para>Next, login as user <systemitem class="username">clfs</systemitem>.
+  <para>Next, login as user <systemitem class="username">lfs</systemitem>.
   This can be done via a virtual console, through a display manager, or
   with the following substitute user command:</para>
 
-<screen><userinput>su - clfs</userinput></screen>
+<screen><userinput>su - lfs</userinput></screen>
 
   <para>The <quote><parameter>-</parameter></quote> instructs
Index: BOOK/final-preps/chapter.xml
===================================================================
--- BOOK/final-preps/chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-preps/chapter.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../general.ent">
   %general-entities;
@@ -12,5 +12,6 @@
   <title>Final Preparations</title>
 
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="aboutclfs.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="aboutlfs.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="creatingcrossdir.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="addinguser.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="settingenviron.xml"/>
Index: BOOK/final-preps/creatingcrossdir.xml
===================================================================
--- BOOK/final-preps/creatingcrossdir.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/final-preps/creatingcrossdir.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-final-preps-creatingcrossdir">
+  <?dbhtml filename="creatingcrossdir.html"?>
+
+  <title>Creating the $LFS/cross-tools Directory</title>
+
+  <para>The cross-binutils and cross-compiler built in
+  <xref linkend="chapter-cross-tools"/> will be installed under
+  <filename class="directory">$LFS/cross-tools</filename> to keep them
+  separate from the host programs. The programs compiled here are
+  cross-tools and will not be a part of the final CLFS system or the
+  temp-system. By keeping these programs in a separate directory, they
+  can easily be discarded later after their use.</para>
+
+  <para>Create the required directory by running the following as
+  <systemitem class="username">root</systemitem>:</para>
+
+<screen><userinput>install -dv $LFS/cross-tools</userinput></screen>
+
+  <para>The next step is to create a <filename
+  class="symlink">/cross-tools</filename> symlink on the host system.
+  This will point to the newly-created directory on the CLFS partition.
+  Run this command as  <systemitem class="username">root</systemitem> as well:</para>
+
+<screen><userinput>ln -sv $LFS/cross-tools /</userinput></screen>
+
+  <para>The symlink isn't technically necessary (though the book's
+  instructions do assume its existence), but is there mainly for
+  consistency (because /tools is also symlinked to $LFS/tools) and to
+  simplify the installation of the cross-compile tools.</para>
+
+</sect1>
Index: BOOK/final-preps/creatingdirs.xml
===================================================================
--- BOOK/final-preps/creatingdirs.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-preps/creatingdirs.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../general.ent">
   %general-entities;
@@ -11,20 +11,20 @@
   <title>Creating Directories</title>
 
-  <para>It is time to create some structure in the CLFS file system. Create a
+  <para>It is time to create some structure in the LFS file system. Create a
   standard directory tree by issuing the following commands:</para>
 
-<screen><userinput>mkdir -pv ${CLFS}/{bin,boot,dev,{etc/,}opt,home,lib,mnt}
-mkdir -pv ${CLFS}/{proc,media/{floppy,cdrom},sbin,srv,sys}
-mkdir -pv ${CLFS}/var/{lock,log,mail,run,spool}
-mkdir -pv ${CLFS}/var/{opt,cache,lib/{misc,locate},local}
-install -dv -m 0750 ${CLFS}/root
-install -dv -m 1777 ${CLFS}{/var,}/tmp
-mkdir -pv ${CLFS}/usr/{,local/}{bin,include,lib,sbin,src}
-mkdir -pv ${CLFS}/usr/{,local/}share/{doc,info,locale,man}
-mkdir -pv ${CLFS}/usr/{,local/}share/{misc,terminfo,zoneinfo}
-mkdir -pv ${CLFS}/usr/{,local/}share/man/man{1,2,3,4,5,6,7,8}
-for dir in ${CLFS}/usr{,/local}; do
-  ln -sfnv share/{man,doc,info} ${dir}
-done</userinput></screen>
+<screen><userinput>mkdir -pv ${LFS}/{bin,boot,etc/opt,home,lib,mnt,opt}
+mkdir -pv ${LFS}/{media/{floppy,cdrom},sbin,srv,var}
+install -dv -m 0750 /root
+install -dv -m 1777 /tmp /var/tmp
+mkdir -pv ${LFS}/usr/{,local/}{bin,include,lib,sbin,src}
+mkdir -pv ${LFS}/usr/{,local/}share/{doc,info,locale,man}
+mkdir -v  ${LFS}/usr/{,local/}share/{misc,terminfo,zoneinfo}
+mkdir -pv ${LFS}/usr/{,local/}share/man/man{1..8}
+for dir in ${LFS}/usr ${LFS}/usr/local; do
+  ln -sv share/{man,doc,info} $dir
+done
+mkdir -v ${LFS}/var/{lock,log,mail,run,spool}
+mkdir -pv ${LFS}/var/{opt,cache,lib/{misc,locate},local}</userinput></screen>
 
   <para>Directories are, by default, created with permission mode 755, but
Index: BOOK/final-preps/creatingfiles.xml
===================================================================
--- BOOK/final-preps/creatingfiles.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-preps/creatingfiles.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../general.ent">
   %general-entities;
@@ -9,29 +9,13 @@
   <?dbhtml filename="creatingfiles.html"?>
 
-  <title>Creating the passwd, group, and log Files</title>
+  <title>Creating Essential Files</title>
 
-  <indexterm zone="ch-final-preps-creatingfiles">
-    <primary sortas="e-/etc/passwd">/etc/passwd</primary>
-  </indexterm>
+  <para>A proper Linux system maintains a list of the mounted file systems in
+  the file <filename>/etc/mtab</filename>.  Normally, this file would be
+  created when we mount a new file system. Since we will not be mounting any
+  file systems inside our chroot environment, create an empty file for
+  utilities that expect the presence of <filename>/etc/mtab</filename>:</para>
 
-  <indexterm zone="ch-final-preps-creatingfiles">
-    <primary sortas="e-/etc/group">/etc/group</primary>
-  </indexterm>
-
-  <indexterm zone="ch-final-preps-creatingfiles">
-    <primary sortas="e-/var/run/utmp">/var/run/utmp</primary>
-  </indexterm>
-
-  <indexterm zone="ch-final-preps-creatingfiles">
-    <primary sortas="e-/var/log/btmp">/var/log/btmp</primary>
-  </indexterm>
-
-  <indexterm zone="ch-final-preps-creatingfiles">
-    <primary sortas="e-/var/log/lastlog">/var/log/lastlog</primary>
-  </indexterm>
-
-  <indexterm zone="ch-final-preps-creatingfiles">
-    <primary sortas="e-/var/log/wtmp">/var/log/wtmp</primary>
-  </indexterm>
+<screen><userinput>touch ${LFS}/etc/mtab</userinput></screen>
 
   <para>In order for user <systemitem class="username">root</systemitem> to be
@@ -43,149 +27,32 @@
   command:</para>
 
-<screen><userinput>cat &gt; ${CLFS}/etc/passwd &lt;&lt; "EOF"
-<literal>root::&uid-root;:&gid-root;:root:/root:/bin/bash</literal>
+<screen><userinput>cat &gt; %{LFS}/etc/passwd &lt;&lt; "EOF"
+<literal>root:x:0:0:root:/root:/bin/bash</literal>
 EOF</userinput></screen>
 
   <para>The actual password for <systemitem class="username">root</systemitem>
-  (the <quote>::</quote> used here is just a placeholder and allow you to login
-  with no password) will be set later.</para>
-
-  <variablelist os="b">
-
-    <title>Additional users you may want to add:</title>
-
-    <varlistentry>
-      <term><literal>bin:x:&uid-bin;:&gid-bin;:bin:/bin:/bin/false</literal></term>
-      <listitem>
-        <para>Can be useful for compatibility with legacy applications.</para>
-      </listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><literal>daemon:x:&uid-daemon;:&uid-daemon;:daemon:/sbin:/bin/false</literal></term>
-      <listitem>
-        <para>It is often recommended to use an unprivileged User ID/Group ID
-        for daemons in order to limit their access to the system.</para>
-      </listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><literal>adm:x:&uid-adm;:&gid-adm;:adm:/var/adm:/bin/false</literal></term>
-      <listitem>
-        <para>Was used for programs that performed administrative tasks.</para>
-      </listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><literal>lp:x:&uid-lp;:&gid-lp;:lp:/var/spool/lp:/bin/false</literal></term>
-      <listitem>
-        <para>Used by programs for printing.</para>
-      </listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><literal>mail:x:&uid-mail;:&gid-mail;:mail:/var/mail:/bin/false</literal></term>
-      <listitem>
-        <para>Often used by email programs.</para>
-      </listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><literal>news:x:&uid-news;:&gid-news;:news:/var/spool/news:/bin/false</literal></term>
-      <listitem>
-        <para>Often used for network news servers.</para>
-      </listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><literal>operator:x:&uid-operator;:&gid-root;:operator:/root:/bin/bash</literal></term>
-      <listitem>
-        <para>Often used to allow system operators to access the system.</para>
-      </listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><literal>postmaster:x:&uid-postmaster;:&gid-mail;:postmaster:/var/spool/mail:/bin/false</literal></term>
-      <listitem>
-        <para>Generally used as an account that receives all the information of troubles with the mail server.</para>
-      </listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><literal>nobody:x:&uid-nobody;:&gid-nobody;:nobody:/:/bin/false</literal></term>
-      <listitem>
-        <para>Used by NFS.</para>
-      </listitem>
-    </varlistentry>
-  </variablelist>
+  (the <quote>x</quote> used here is just a placeholder) will be set later.</para>
 
   <para>Create the <filename>/etc/group</filename> file by running the following
   command:</para>
 
-<screen><userinput>cat &gt; ${CLFS}/etc/group &lt;&lt; "EOF"
-<literal>root:x:&gid-root;:
-bin:x:&gid-bin;:
-sys:x:&gid-sys;:
-kmem:x:&gid-kmem;:
-tty:x:&gid-tty;:
-tape:x:&gid-tape;:
-daemon:x:&gid-daemon;:
-floppy:x:&gid-floppy;:
-disk:x:&gid-disk;:
-lp:x:&gid-lp;:
-dialout:x:&gid-dialout;:
-audio:x:&gid-audio;:
-video:x:&gid-video;:
-utmp:x:&gid-utmp;:
-usb:x:&gid-usb;:
-cdrom:x:&gid-cdrom;:</literal>
+<screen><userinput>cat &gt; ${LFS}/etc/group &lt;&lt; "EOF"
+<literal>root:x:0:
+bin:x:1:
+sys:x:2:
+kmem:x:3:
+tty:x:4:
+tape:x:5:
+daemon:x:6:
+floppy:x:7:
+disk:x:8:
+lp:x:9:
+dialout:x:10:
+audio:x:11:
+video:x:12:
+utmp:x:13:
+usb:x:14:
+cdrom:x:15:</literal>
 EOF</userinput></screen>
-
-  <variablelist os="c">
-
-    <title>Additional groups you may want to add</title>
-
-    <varlistentry>
-      <term><literal>adm:x:&gid-adm;:root,adm,daemon</literal></term>
-      <listitem>
-        <para>All users in this group are allowed to do administrative tasks</para>
-      </listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><literal>console:x:&gid-console;:</literal></term>
-      <listitem>
-        <para>This group has direct access to the console</para>
-      </listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><literal>cdrw:x:&gid-cdrw;:</literal></term>
-      <listitem>
-        <para>This group is allowed to use the CDRW drive</para>
-      </listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><literal>mail:x:&gid-mail;:mail</literal></term>
-      <listitem>
-        <para>Used by MTAs (Mail Transport Agents)</para>
-      </listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><literal>news:x:&gid-news;:news</literal></term>
-      <listitem>
-        <para>Used by Network News Servers</para>
-      </listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><literal>users:x:&gid-users;:</literal></term>
-      <listitem>
-        <para>The default GID used by shadow for new users</para>
-      </listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><literal>nogroup:x:&gid-nogroup;:</literal></term>
-      <listitem>
-        <para>This is a default group used by some programs that do not
-        require a group</para>
-      </listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><literal>nobody:x:&gid-nobody;:</literal></term>
-      <listitem>
-        <para>This is used by NFS</para>
-      </listitem>
-    </varlistentry>
-  </variablelist>
 
   <para>The created groups are not part of any standard&mdash;they are groups
@@ -207,7 +74,7 @@
   proper permissions:</para>
 
-<screen><userinput>touch ${CLFS}/var/run/utmp ${CLFS}/var/log/{btmp,lastlog,wtmp}
-chmod -v 664 ${CLFS}/var/run/utmp ${CLFS}/var/log/lastlog
-chmod -v 600 ${CLFS}/var/log/btmp</userinput></screen>
+<screen><userinput>touch ${LFS}/var/run/utmp ${LFS}/var/log/{btmp,lastlog,wtmp}
+chgrp -v utmp ${LFS}/var/run/utmp ${LFS}/var/log/lastlog
+chmod -v 664 ${LFS}/var/run/utmp ${LFS}/var/log/lastlog</userinput></screen>
 
   <para>The <filename>/var/run/utmp</filename> file records the users
Index: BOOK/final-preps/settingenviron.xml
===================================================================
--- BOOK/final-preps/settingenviron.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-preps/settingenviron.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../general.ent">
   %general-entities;
@@ -13,12 +13,12 @@
   <para os="a">Set up a good working environment by creating two new startup
   files for the <command>bash</command> shell. While logged in as user
-  <systemitem class="username">clfs</systemitem>, issue the following
+  <systemitem class="username">lfs</systemitem>, issue the following
   command to create a new <filename>.bash_profile</filename>:</para>
 
 <screen os="b"><userinput>cat &gt; ~/.bash_profile &lt;&lt; "EOF"
-<literal>exec env -i HOME=${HOME} TERM=${TERM} PS1='\u:\w\$ ' /bin/bash</literal>
+<literal>exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash</literal>
 EOF</userinput></screen>
 
-  <para os="c">When logged on as user <systemitem class="username">clfs</systemitem>,
+  <para os="c">When logged on as user <systemitem class="username">lfs</systemitem>,
   the initial shell is usually a <emphasis>login</emphasis> shell which
   reads the <filename>/etc/profile</filename> of the host (probably
@@ -42,8 +42,8 @@
 <literal>set +h
 umask 022
-CLFS=/mnt/clfs
+LFS=/mnt/lfs
 LC_ALL=POSIX
-PATH=${CLFS}/cross-tools/bin:/bin:/usr/bin
-export CLFS LC_ALL PATH</literal>
+PATH=/cross-tools/bin:/bin:/usr/bin
+export LFS LC_ALL PATH</literal>
 EOF</userinput></screen>
 
@@ -56,5 +56,5 @@
   the shell will always search the <envar>PATH</envar> when a program is to
   be run. As such, the shell will find the newly compiled tools in
-  <filename class="directory">${CLFS}/cross-tools</filename> as soon as they are
+  <filename class="directory">$LFS/cross-tools</filename> as soon as they are
   available without remembering a previous version of the same program in a
   different location.</para>
@@ -66,10 +66,11 @@
   mode 644 and directories with mode 755).</para>
 
-  <para os="h">The <envar>CLFS</envar> variable should be set to the
+  <para os="h">The <envar>LFS</envar> variable should be set to the
   chosen mount point.</para>
 
-  <para os="i">The <envar>LC_ALL</envar> variable controls the localization of
+  <para os="i">TO BE REWRITTEN - The <envar>LC_ALL</envar> variable controls
+  the localization of
   certain programs, making their messages follow the conventions of a
-  specified country.  If the host system uses a version of EGLIBC older
+  specified country.  If the host system uses a version of Glibc older
   than 2.2.4, having <envar>LC_ALL</envar> set to something other than
   <quote>POSIX</quote> or <quote>C</quote> (during this chapter) may cause
@@ -79,5 +80,5 @@
   the chroot environment.</para>
 
-  <para os="j">By putting <filename class="directory">${CLFS}/cross-tools/bin</filename>
+  <para os="j">By putting <filename class="directory">/cross-tools/bin</filename>
   at the beginning of the <envar>PATH</envar>, the cross-compiler
   built in <xref linkend="chapter-cross-tools"/> will be picked up by
Index: OK/final-system/alpha-chapter.xml
===================================================================
--- BOOK/final-system/alpha-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,70 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../general.ent">
-  %general-entities;
-]>
-
-<chapter id="chapter-building-system" xreflabel="Installing Basic System Software">
-  <?dbhtml dir="final-system"?>
-  <?dbhtml filename="chapter.html"?>
-
-  <title>Installing Basic System Software</title>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/introduction.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/pkgmgt.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/variables.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/man-pages.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gmp.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/mpfr.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/ppl.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/cloog-ppl.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/zlib.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/binutils.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gcc.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/sed.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/ncurses.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/util-linux-ng.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/e2fsprogs.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/coreutils.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/iana-etc.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/m4.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/bison.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/procps.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/libtool.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/flex.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/iproute2.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="alpha/perl.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/readline.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/autoconf.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/automake.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/bash.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/bzip2.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/diffutils.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/file.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/findutils.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gawk.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gettext.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/grep.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/groff.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gzip.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/iputils.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/kbd.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/less.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/make.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/man.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/module-init-tools.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/patch.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/psmisc.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/shadow.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/rsyslog.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/sysvinit.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/tar.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/texinfo.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/udev.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/vim.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/xz.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/aboutdebug.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/stripping.xml"/>
-
-</chapter>
Index: OK/final-system/alpha/perl.xml
===================================================================
--- BOOK/final-system/alpha/perl.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,84 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-system-perl" role="wrap">
-  <?dbhtml filename="perl.html"?>
-
-  <title>Perl-&perl-version;</title>
-
-  <indexterm zone="ch-system-perl">
-    <primary sortas="a-Perl">Perl</primary>
-  </indexterm>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/perl.xml"
-  xpointer="xpointer(//*[@role='package'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/perl.xml"
-  xpointer="xpointer(//*[@role='build-env'])"/>
-
-  <sect2 role="installation">
-    <title>Installation of Perl</title>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='w1'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='p3'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='p4'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='s1'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='s2'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='s3'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='s4'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='a'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='b'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='c'])"/>
-
-<screen os="d"><userinput>make ARCH=alpha CROSS_COMPILE=${CLFS_TARGET}-</userinput></screen>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='e'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='f'])"/>
-
-  </sect2>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/perl.xml"
-  xpointer="xpointer(id('contents-perl'))"/>
-
-</sect1>
Index: BOOK/final-system/arm-chapter.xml
===================================================================
--- BOOK/final-system/arm-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/arm-chapter.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../general.ent">
   %general-entities;
@@ -15,26 +15,17 @@
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/pkgmgt.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/variables.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/man-pages.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gmp.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/mpfr.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/ppl.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/cloog-ppl.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/zlib.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/binutils.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gcc.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/sed.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/ncurses.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/util-linux-ng.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/e2fsprogs.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/coreutils.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/iana-etc.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/m4.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/bison.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/ncurses.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/procps.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/sed.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/libtool.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/flex.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/iproute2.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="arm/perl.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/perl.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/readline.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/zlib.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/autoconf.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/automake.xml"/>
@@ -42,6 +33,8 @@
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/bzip2.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/diffutils.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/e2fsprogs.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/file.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/findutils.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/flex.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gawk.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gettext.xml"/>
@@ -49,20 +42,23 @@
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/groff.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gzip.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/iputils.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/inetutils.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/iproute2.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/kbd.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/less.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/make.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/man.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/man-pages.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/mktemp.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/module-init-tools.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/patch.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/psmisc.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/shadow.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/rsyslog.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/sysklogd.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/sysvinit.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/tar.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/texinfo.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/udev.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/util-linux.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/vim.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/xz.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/aboutdebug.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/stripping.xml"/>
Index: OK/final-system/arm/perl.xml
===================================================================
--- BOOK/final-system/arm/perl.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,414 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-system-perl" role="wrap">
-  <?dbhtml filename="perl.html"?>
-
-  <title>Perl-&perl-version;</title>
-
-  <indexterm zone="ch-system-perl">
-    <primary sortas="a-Perl">Perl</primary>
-  </indexterm>
-
-  <sect2 role="package">
-    <title/>
-
-    <para>The Perl package contains the Practical Extraction and Report
-    Language.</para>
-
-  </sect2>
-
-  &env-target;
-
-  <sect2 role="installation">
-    <title>Installation of Perl</title>
-
-    <warning os="w1">
-      <para>Building with <envar>CFLAGS</envar> or <envar>CXXFLAGS</envar> set
-      can cause the build to hang or fail.</para>
-    </warning>
-
-    <para os="p3">The following patch fixes issues with Perl and
-    cross-compiling:</para>
-
-<screen os="p4"><userinput>patch -Np1 -i ../&perl-cross_compile-patch;</userinput></screen>
-
-    <para os="s1">The following sed causes <filename>DynaLoader.a</filename>
-    to be built with -fPIC so it can be linked into a shared library
-    later:</para>
-
-<screen os="s2"><userinput>chmod -v 644 Makefile.SH
-cp -v Makefile.SH{,.orig}
-sed -e "s@pldlflags=''@pldlflags=\"\$cccdlflags\"@g" \
-    -e "s@static_target='static'@static_target='static_pic'@g" Makefile.SH.orig &gt; Makefile.SH</userinput></screen>
-
-    <para os="s3">By default, Perl's Compress::Raw::Zlib module builds and
-    links against its own internal copy of Zlib. The following command will
-    tell it use the system-installed Zlib:</para>
-
-<screen os="s4"><userinput>sed -i -e '/^BUILD_ZLIB/ s/True/False/' \
-        -e '/^INCLUDE\|^LIB/ s|\./zlib-src|/usr/include|' \
-        ext/Compress/Raw/Zlib/config.in</userinput></screen>
-
-    <para os="a">The Cross directory contains a Makefile for cross-compiling:</para>
-
-<screen os="b"><userinput>cd Cross</userinput></screen>
-
-    <para os="c">Compile the package:</para>
-
-<screen os="d"><userinput>make ARCH=arm CROSS_COMPILE=${CLFS_TARGET}-</userinput></screen>
-
-    <para os="e">Install the package:</para>
-
-<screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
-
-  </sect2>
-
-  <sect2 id="contents-perl" role="content">
-    <title>Contents of Perl</title>
-
-    <segmentedlist>
-      <segtitle>Installed programs</segtitle>
-      <segtitle>Installed libraries</segtitle>
-
-      <seglistitem>
-        <seg>a2p, c2ph, cpan, dprofpp, enc2xs, find2perl, h2ph, h2xs, instmodsh, libnetcfg,
-        perl, perl&perl-version; (link to perl), perlbug, perldoc,
-        perlivp, piconv, pl2pm, pod2html, pod2latex, pod2man, pod2text,
-        pod2usage, podchecker, podselect, prove, psed (link to s2p), pstruct (link
-        to c2ph), s2p, splain, and xsubpp</seg>
-        <seg>Several hundred which cannot all be listed here</seg>
-      </seglistitem>
-    </segmentedlist>
-
-    <variablelist>
-      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
-      <?dbfo list-presentation="list"?>
-      <?dbhtml list-presentation="table"?>
-
-      <varlistentry id="a2p">
-        <term><command>a2p</command></term>
-        <listitem>
-          <para>Translates awk to Perl</para>
-          <indexterm zone="ch-system-perl a2p">
-            <primary sortas="b-a2p">a2p</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="c2ph">
-        <term><command>c2ph</command></term>
-        <listitem>
-          <para>Dumps C structures as generated from
-          <command>cc -g -S</command></para>
-          <indexterm zone="ch-system-perl c2ph">
-            <primary sortas="b-c2ph">c2ph</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="cpan">
-        <term><command>cpan</command></term>
-        <listitem>
-          <para>Shell script that provides a command interface to CPAN.pm</para>
-          <indexterm zone="ch-system-perl cpan">
-            <primary sortas="b-cpan">cpan</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="dprofpp">
-        <term><command>dprofpp</command></term>
-        <listitem>
-          <para>Displays Perl profile data</para>
-          <indexterm zone="ch-system-perl dprofpp">
-            <primary sortas="b-dprofpp">dprofpp</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="enc2xs">
-        <term><command>enc2xs</command></term>
-        <listitem>
-          <para>Builds a Perl extension for the Encode module from either
-          Unicode Character Mappings or Tcl Encoding Files</para>
-          <indexterm zone="ch-system-perl enc2xs">
-            <primary sortas="b-enc2xs">enc2xs</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="find2perl">
-        <term><command>find2perl</command></term>
-        <listitem>
-          <para>Translates <command>find</command> commands to Perl</para>
-          <indexterm zone="ch-system-perl find2perl">
-            <primary sortas="b-find2perl">find2perl</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="h2ph">
-        <term><command>h2ph</command></term>
-        <listitem>
-          <para>Converts <filename class="extension">.h</filename> C header
-          files to <filename class="extension">.ph</filename> Perl header
-          files</para>
-          <indexterm zone="ch-system-perl h2ph">
-            <primary sortas="b-h2ph">h2ph</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="h2xs">
-        <term><command>h2xs</command></term>
-        <listitem>
-          <para>Converts <filename class="extension">.h</filename> C header
-          files to Perl extensions</para>
-          <indexterm zone="ch-system-perl h2xs">
-            <primary sortas="b-h2xs">h2xs</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="libnetcfg">
-        <term><command>libnetcfg</command></term>
-        <listitem>
-          <para>Can be used to configure the
-          <filename class="libraryfile">libnet</filename></para>
-          <indexterm zone="ch-system-perl libnetcfg">
-            <primary sortas="b-libnetcfg">libnetcfg</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="instmodsh">
-        <term><command>instmodsh</command></term>
-        <listitem>
-          <para>A shell script for examining installed Perl modules,
-          and can even create a tarball from an installed module</para>
-          <indexterm zone="ch-system-perl instmodsh">
-            <primary sortas="b-instmodsh">instmodsh</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="perl">
-        <term><command>perl</command></term>
-        <listitem>
-          <para>Combines some of the best features of C, <command>sed</command>,
-          <command>awk</command> and <command>sh</command> into a single
-          swiss-army-knife language</para>
-          <indexterm zone="ch-system-perl perl">
-            <primary sortas="b-perl">perl</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="perl-version">
-        <term><command>perl&perl-version;</command></term>
-        <listitem>
-          <para>A hard link to <command>perl</command></para>
-          <indexterm zone="ch-system-perl perl-version">
-            <primary sortas="b-perl&perl-version;">perl&perl-version;</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="perlbug">
-        <term><command>perlbug</command></term>
-        <listitem>
-          <para>Used to generate bug reports about Perl, or the modules that come
-          with it, and mail them</para>
-          <indexterm zone="ch-system-perl perlbug">
-            <primary sortas="b-perlbug">perlbug</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="perldoc">
-        <term><command>perldoc</command></term>
-        <listitem>
-          <para>Displays a piece of documentation in pod format that is embedded
-          in the Perl installation tree or in a Perl script</para>
-          <indexterm zone="ch-system-perl perldoc">
-            <primary sortas="b-perldoc">perldoc</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="perlivp">
-        <term><command>perlivp</command></term>
-        <listitem>
-          <para>The Perl Installation Verification Procedure; it can be used to
-          verify that Perl and its libraries have been installed
-          correctly</para>
-          <indexterm zone="ch-system-perl perlivp">
-            <primary sortas="b-perlivp">perlivp</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="piconv">
-        <term><command>piconv</command></term>
-        <listitem>
-          <para>A Perl version of the character encoding converter
-          <command>iconv</command></para>
-          <indexterm zone="ch-system-perl piconv">
-            <primary sortas="b-piconv">piconv</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="pl2pm">
-        <term><command>pl2pm</command></term>
-        <listitem>
-          <para>A rough tool for converting Perl4
-          <filename class="extension">.pl</filename> files to Perl5
-          <filename class="extension">.pm</filename> modules</para>
-          <indexterm zone="ch-system-perl pl2pm">
-            <primary sortas="b-pl2pm">pl2pm</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="pod2html">
-        <term><command>pod2html</command></term>
-        <listitem>
-          <para>Converts files from pod format to HTML format</para>
-          <indexterm zone="ch-system-perl pod2html">
-            <primary sortas="b-pod2html">pod2html</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="pod2latex">
-        <term><command>pod2latex</command></term>
-        <listitem>
-          <para>Converts files from pod format to LaTeX format</para>
-          <indexterm zone="ch-system-perl pod2latex">
-            <primary sortas="b-pod2latex">pod2latex</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="pod2man">
-        <term><command>pod2man</command></term>
-        <listitem>
-          <para>Converts pod data to formatted *roff input</para>
-          <indexterm zone="ch-system-perl pod2man">
-            <primary sortas="b-pod2man">pod2man</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="pod2text">
-        <term><command>pod2text</command></term>
-        <listitem>
-          <para>Converts pod data to formatted ASCII text</para>
-          <indexterm zone="ch-system-perl pod2text">
-            <primary sortas="b-pod2text">pod2text</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="pod2usage">
-        <term><command>pod2usage</command></term>
-        <listitem>
-          <para>Prints usage messages from embedded pod docs in files</para>
-          <indexterm zone="ch-system-perl pod2usage">
-            <primary sortas="b-pod2usage">pod2usage</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="podchecker">
-        <term><command>podchecker</command></term>
-        <listitem>
-          <para>Checks the syntax of pod format documentation files</para>
-          <indexterm zone="ch-system-perl podchecker">
-            <primary sortas="b-podchecker">podchecker</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="podselect">
-        <term><command>podselect</command></term>
-        <listitem>
-          <para>Displays selected sections of pod documentation</para>
-          <indexterm zone="ch-system-perl podselect">
-            <primary sortas="b-podselect">podselect</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="prove">
-        <term><command>prove</command></term>
-        <listitem>
-          <para>A command-line tool for running tests against Test::Harness</para>
-          <indexterm zone="ch-system-perl prove">
-            <primary sortas="b-prove">prove</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="psed">
-        <term><command>psed</command></term>
-        <listitem>
-          <para>A Perl version of the stream editor <command>sed</command></para>
-          <indexterm zone="ch-system-perl psed">
-            <primary sortas="b-psed">psed</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="pstruct">
-        <term><command>pstruct</command></term>
-        <listitem>
-          <para>Dumps C structures as generated from <command>cc -g -S</command>
-          stabs</para>
-          <indexterm zone="ch-system-perl pstruct">
-            <primary sortas="b-pstruct">pstruct</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="s2p">
-        <term><command>s2p</command></term>
-        <listitem>
-          <para>Translates <command>sed</command> to Perl</para>
-          <indexterm zone="ch-system-perl s2p">
-            <primary sortas="b-s2p">s2p</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="splain">
-        <term><command>splain</command></term>
-        <listitem>
-          <para>Is used to force verbose warning diagnostics in Perl</para>
-          <indexterm zone="ch-system-perl splain">
-            <primary sortas="b-splain">splain</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="xsubpp">
-        <term><command>xsubpp</command></term>
-        <listitem>
-          <para>Converts Perl XS code into C code</para>
-          <indexterm zone="ch-system-perl xsubpp">
-            <primary sortas="b-xsubpp">xsubpp</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-    </variablelist>
-
-  </sect2>
-
-</sect1>
Index: BOOK/final-system/common/aboutdebug.xml
===================================================================
--- BOOK/final-system/common/aboutdebug.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/aboutdebug.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -29,10 +29,10 @@
     </listitem>
     <listitem os="c3">
-      <para>EGLIBC and GCC files (<filename class="directory">/lib</filename>
+      <para>Glibc and GCC files (<filename class="directory">/lib</filename>
       and <filename class="directory">/usr/lib</filename>) with debugging
       symbols: 87 MB</para>
     </listitem>
     <listitem os="c4">
-      <para>EGLIBC and GCC files without debugging symbols: 16 MB</para>
+      <para>Glibc and GCC files without debugging symbols: 16 MB</para>
     </listitem>
   </itemizedlist>
Index: BOOK/final-system/common/autoconf.xml
===================================================================
--- BOOK/final-system/common/autoconf.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/autoconf.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -23,6 +23,4 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Autoconf</title>
@@ -30,6 +28,5 @@
     <para os="a">Prepare Autoconf for compilation:</para>
 
-<screen os="b"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr</userinput></screen>
+<screen os="b"><userinput>./configure --prefix=/usr --host=${LFS_TARGET}</userinput></screen>
 
     <para os="c">Compile the package:</para>
@@ -39,5 +36,5 @@
     <para os="e">Install the package:</para>
 
-<screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
+<screen os="f"><userinput>make DESTDIR=${LFS} install</userinput></screen>
 
   </sect2>
Index: BOOK/final-system/common/automake.xml
===================================================================
--- BOOK/final-system/common/automake.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/automake.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -23,6 +23,4 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Automake</title>
@@ -30,6 +28,5 @@
     <para os="a">Prepare Automake for compilation:</para>
 
-<screen os="b"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr</userinput></screen>
+<screen os="b"><userinput>./configure --prefix=/usr --host=${LFS_TARGET}</userinput></screen>
 
     <para os="c">Compile the package:</para>
@@ -39,5 +36,5 @@
     <para os="e">Install the package:</para>
 
-<screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
+<screen os="f"><userinput>make DESTDIR=${LFS} install</userinput></screen>
 
   </sect2>
@@ -50,6 +47,6 @@
 
       <seglistitem>
-        <seg>acinstall, aclocal, aclocal-&automake-version2;, automake,
-        automake-&automake-version2;, compile, config.guess, config.sub,
+        <seg>acinstall, aclocal, aclocal-&automake-version;, automake,
+        automake-&automake-version;, compile, config.guess, config.sub,
         depcomp, elisp-comp, install-sh, mdate-sh, missing, mkinstalldirs,
         py-compile, symlink-tree, and ylwrap</seg>
@@ -84,10 +81,10 @@
 
       <varlistentry id="aclocal-version">
-        <term><command>aclocal-&automake-version2;</command></term>
+        <term><command>aclocal-&automake-version;</command></term>
         <listitem>
           <para>A hard link to <command>aclocal</command></para>
           <indexterm zone="ch-system-automake aclocal-version">
             <primary
-            sortas="b-aclocal-&automake-version2;">aclocal-&automake-version2;</primary>
+            sortas="b-aclocal-&automake-version;">aclocal-&automake-version;</primary>
           </indexterm>
         </listitem>
@@ -112,10 +109,10 @@
 
       <varlistentry id="automake-version">
-        <term><command>automake-&automake-version2;</command></term>
+        <term><command>automake-&automake-version;</command></term>
         <listitem>
           <para>A hard link to <command>automake</command></para>
           <indexterm zone="ch-system-automake automake-version">
             <primary
-            sortas="b-automake-&automake-version2;">automake-&automake-version2;</primary>
+            sortas="b-automake-&automake-version;">automake-&automake-version;</primary>
           </indexterm>
         </listitem>
Index: BOOK/final-system/common/bash.xml
===================================================================
--- BOOK/final-system/common/bash.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/bash.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -22,41 +22,29 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Bash</title>
 
+    <para os="a">If you downloaded the Bash documentation tarball and wish to
+    install HTML documentation, issue the following commands:</para>
+
+<screen os="b"><userinput>tar -xvf ../bash-doc-&bash-doc-version;.tar.gz &amp;&amp;
+sed -i "s|htmldir = @htmldir@|htmldir = /usr/share/doc/bash-&bash-version;|" \
+    Makefile.in</userinput></screen>
+
     <para os="p1">The following patch contains updates from the maintainer. The
-    maintainer of Bash only releases these patches to fix serious issues:</para>
+    maintainer of Bash only releases these patches to fix serious issues.</para>
 
-<screen os="p2"><userinput>patch -Np1 -i ../&bash-branch_update-patch;</userinput></screen>
+<screen os="p2"><userinput>patch -Np1 -i ../&bash-fixes-patch;</userinput></screen>
 
-    <para os="c">When bBsh is cross-compiled, it cannot test for the presence
-    of named pipes, among other things. If you used <command>su</command> to
-    become an unprivileged user, this combination will cause Bash to build
-    without <emphasis>process substitution</emphasis>, which will break one
-    of the C++ test scripts in <literal>eglibc</literal>. The following prevents
-    future problems by skipping the check for named pipes, as well as other
-    tests that can not run while cross-compiling or that do not run properly:</para>
+    <para os="c">Create a config.cache containing information about a test that
+    cannot be run when cross-compiling:</para>
 
-<screen os="d"><userinput>cat &gt; config.cache &lt;&lt; "EOF"
-ac_cv_func_mmap_fixed_mapped=yes
-ac_cv_func_strcoll_works=yes
-ac_cv_func_working_mktime=yes
-bash_cv_func_sigsetjmp=present
-bash_cv_getcwd_malloc=yes
-bash_cv_job_control_missing=present
-bash_cv_printf_a_format=yes
-bash_cv_sys_named_pipes=present
-bash_cv_ulimit_maxfds=yes
-bash_cv_under_sys_siglist=yes
-bash_cv_unusable_rtsigs=no
-gt_cv_int_divbyzero_sigfpe=yes
-EOF</userinput></screen>
+<screen os="d"><userinput>echo "ac_cv_func_setvbuf_reversed=no" &gt; config.cache
+</userinput></screen>
 
-<para os="e">Prepare Bash for compilation:</para>
+    <para os="e">Prepare Bash for compilation:</para>
 
-<screen os="f"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr --bindir=/bin --cache-file=config.cache \
+<screen os="f"><userinput>./configure --prefix=/usr --bindir=/bin \
+    --host=${LFS_TARGET} --cache-file=config.cache \
     --without-bash-malloc --with-installed-readline</userinput></screen>
 
@@ -81,9 +69,9 @@
     <para os="j">Install the package:</para>
 
-<screen os="k"><userinput>make DESTDIR=${CLFS} htmldir=/usr/share/doc/bash-&bash-version; install</userinput></screen>
+<screen os="k"><userinput>make DESTDIR=${LFS} install</userinput></screen>
 
     <para os="l">Create /bin/sh:</para>
 
-<screen os="m"><userinput>ln -sfv bash ${CLFS}/bin/sh</userinput></screen>
+<screen os="m" role="nodump"><userinput>ln -sv bash ${LFS}/bin/sh</userinput></screen>
 
   </sect2>
Index: BOOK/final-system/common/binutils.xml
===================================================================
--- BOOK/final-system/common/binutils.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/binutils.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -23,14 +23,7 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Binutils</title>
 
-    <para os="p3">The following patch contains a number of updates to the
-    &binutils-version; branch by the Binutils developers:</para>
-
-<screen os="p4"><userinput>patch -Np1 -i ../&binutils-branch_update-patch;</userinput></screen>
-
     <para os="a">The Binutils documentation recommends building Binutils outside of the
     source directory in a dedicated build directory:</para>
@@ -41,7 +34,7 @@
     <para os="c">Prepare Binutils for compilation:</para>
 
-<screen os="d"><userinput>AR=ar AS=as ../binutils-&binutils-version;/configure --prefix=/usr \
-    --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --target=${CLFS_TARGET} --enable-shared</userinput></screen>
+<screen os="d"><userinput>../binutils-&binutils-version;/configure --prefix=/usr \
+    --build=${LFS_HOST} --host=${LFS_TARGET} \
+    --target=${LFS_TARGET} --enable-shared</userinput></screen>
 
     <para os="e">Compile the package:</para>
@@ -78,5 +71,10 @@
     <para os="j">Install the package:</para>
 
-<screen os="k"><userinput>make DESTDIR=${CLFS} tooldir=/usr install</userinput></screen>
+<screen os="k"><userinput>make DESTDIR=${LFS} tooldir=/usr install</userinput></screen>
+
+    <para os="l">Install the <filename class="headerfile">libiberty</filename> header
+    file that is needed by some packages:</para>
+
+<screen os="m"><userinput>cp -v ../binutils-&binutils-version;/include/libiberty.h ${LFS}/usr/include</userinput></screen>
 
   </sect2>
Index: BOOK/final-system/common/bison.xml
===================================================================
--- BOOK/final-system/common/bison.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/bison.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -22,6 +22,4 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Bison</title>
@@ -29,15 +27,12 @@
     <para os="a">Prepare Bison for compilation:</para>
 
-<screen os="b"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr</userinput></screen>
+<screen os="b"><userinput>./configure --prefix=/usr --host=${LFS_TARGET}</userinput></screen>
 
-    <para os="b1">The configure system causes Bison to be built without support
+    <para os="b1">The configure system causes bison to be built without support
     for internationalization of error messages if a <command>bison</command>
-    program is not already in ${PATH}.  The following addition will correct
+    program is not already in $PATH.  The following addition will correct
     this:</para>
 
-<screen os="b2"><userinput>cat &gt;&gt; config.h &lt;&lt; "EOF"
-#define YYENABLE_NLS 1
-EOF</userinput></screen>  
+<screen os="b2"><userinput>echo '#define YYENABLE_NLS 1' >> config.h</userinput></screen>  
 
     <para os="c">Compile the package:</para>
@@ -47,5 +42,5 @@
     <para os="e">Install the package:</para>
 
-<screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
+<screen os="f"><userinput>make DESTDIR=${LFS} install</userinput></screen>
 
   </sect2>
Index: BOOK/final-system/common/bzip2.xml
===================================================================
--- BOOK/final-system/common/bzip2.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/bzip2.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -25,21 +25,28 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Bzip2</title>
 
-    <para os="s1">Bzip2's default <filename>Makefile</filename> target
-    automatically runs the testsuite as well. Disable the tests since they
-    won't work on a multi-architecture build:</para>
+    <para os="p1">Apply a patch to install the documentation for this
+    package:</para>
+
+<screen os="p2"><userinput>patch -Np1 -i ../&bzip2-docs-patch;</userinput></screen>
+
+    <para os="p3">The <command>bzgrep</command> command does not escape '|' and
+    '&amp;' in filenames passed to it. This allows arbitrary commands to be
+    executed with the privileges of the user running <command>bzgrep</command>.
+    Apply the following patch to address this:</para>
+
+<screen os="p4"><userinput>patch -Np1 -i ../&bzip2-bzgrep-patch;</userinput></screen>
+
+    <para os="p5">The <command>bzdiff</command> script depends on tempfile.
+    We remove that dependency with this patch:</para>
+
+<screen os="p6"><userinput>patch -Np1 -i ../&bzip2-remove_tempfile-patch;</userinput></screen>
+
+    <para os="s1">Disable running of the testsuite after a successful build:</para>
 
 <screen os="s2"><userinput>cp Makefile{,.orig}
-sed -e "/^all:/s/ test//" Makefile.orig &gt; Makefile</userinput></screen>
-
-    <para os="s3">By default Bzip2 creates some symlinks that use absolute
-    pathnames. The following sed will cause them to be created with relative
-    paths instead:</para>
-
-<screen os="s4"><userinput>sed -i -e 's:ln -s -f $(PREFIX)/bin/:ln -s :' Makefile</userinput></screen>
+sed -e "/^all:/s/ test//" Makefile.orig %gt; Makefile</userinput></screen>
 
     <para os="a">The Bzip2 package does not contain a <command>configure</command>
@@ -59,18 +66,24 @@
 <screen os="e"><userinput>make CC="${CC}" AR="${AR}" RANLIB="${RANLIB}"</userinput></screen>
 
+    <note os="f">
+    <para>If reinstalling Bzip2, perform
+    <userinput>rm -vf /usr/bin/bz*</userinput> first, otherwise the
+    following <command>make PREFIX=${LFS}/usr install</command> will fail.</para>
+    </note>
+
     <para os="g">Install the programs:</para>
 
-<screen os="h"><userinput>make PREFIX=${CLFS}/usr install</userinput></screen>
+<screen os="h"><userinput>make PREFIX=${LFS}/usr install</userinput></screen>
 
     <para os="i">Install the shared <command>bzip2</command> binary into the
-    <filename class="directory">${CLFS}/bin</filename> directory, make
+    <filename class="directory">/bin</filename> directory, make
     some necessary symbolic links, and clean up:</para>
 
-<screen os="j"><userinput>cp -v bzip2-shared ${CLFS}/bin/bzip2
-cp -av libbz2.so* ${CLFS}/lib
-ln -sfv ../../lib/libbz2.so.1.0 ${CLFS}/usr/lib/libbz2.so
-rm -v ${CLFS}/usr/bin/{bunzip2,bzcat,bzip2}
-ln -sfv bzip2 ${CLFS}/bin/bunzip2
-ln -sfv bzip2 ${CLFS}/bin/bzcat</userinput></screen>
+<screen os="j"><userinput>cp -v ${LFS}bzip2-shared ${LFS}/bin/bzip2
+cp -av ${LFS}libbz2.so* ${LFS}/lib
+ln -sv ../../lib/libbz2.so.1.0 ${LFS}/usr/lib/libbz2.so
+rm -v ${LFS}/usr/bin/{bunzip2,bzcat,bzip2}
+ln -sv bzip2 ${LFS}/bin/bunzip2
+ln -sv bzip2 ${LFS}/bin/bzcatt</userinput></screen>
 
   </sect2>
@@ -84,7 +97,6 @@
 
       <seglistitem>
-        <seg>bunzip2 (link to bzip2), bzcat (link to bzip2), bzcmp (link to
-        bzdiff), bzdiff, bzegrep (link to bzgrep), bzfgrep (link to bzgrep),
-        bzgrep, bzip2, bzip2recover, bzless (link to bzmore), and bzmore</seg>
+        <seg>bunzip2 (link to bzip2), bzcat (link to bzip2), bzcmp, bzdiff,
+        bzegrep, bzfgrep, bzgrep, bzip2, bzip2recover, bzless, and bzmore</seg>
         <seg>libbz2.a, libbz2.so (link to libbz2.so.1.0), libbz2.so.1.0 (link to
         libbz2.so.&bzip2-version;), and libbz2.so.&bzip2-version;</seg>
Index: OK/final-system/common/cloog-ppl.xml
===================================================================
--- BOOK/final-system/common/cloog-ppl.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,97 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-system-cloog-ppl" role="wrap">
-  <?dbhtml filename="cloog-ppl.html"?>
-
-  <title>CLooG-PPL-&cloog-ppl-version;</title>
-
-  <indexterm zone="ch-system-cloog-ppl">
-    <primary sortas="a-CLooG-PPL">CLooG-PPL</primary>
-    <secondary>temporary system</secondary>
-  </indexterm>
-
-  <sect2 role="package">
-    <title/>
-
-    <para>CLooG-PPL is a library to generate code for scanning Z-polyhedra.
-    In other words, it finds code that reaches each integral point of one or
-    more parameterized polyhedra.  GCC links with this library in order to
-    enable the new loop generation code known as Graphite.</para>
-
-  </sect2>
-
-  &env-target;
-
-  <sect2 role="installation">
-    <title>Installation of CLooG-PPL</title>
-
-    <para os="a">Prepare CLooG-PPL for compilation:</para>
-
-<screen os="b"><userinput>LDFLAGS="-Wl,-rpath-link,${CLFS}/cross-tools/${CLFS_TARGET}/lib" \
-    ./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr --enable-shared \
-    --with-gmp --with-ppl</userinput></screen>
-
-    <para os="c">Compile the package:</para>
-
-<screen os="d"><userinput>make</userinput></screen>
-
-    <para os="h">Install the package:</para>
-
-<screen os="i"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
-
-    <para os="g">At this time, Libtool does not support searching a sysroot
-    for libraries. Leaving the .la files in place will cause Libtool to look
-    in the wrong place for libraries. These files are not required for
-    linking on Linux. Remove them with the following command:</para>
-
-<screen os="h"><userinput>rm -v ${CLFS}/usr/lib/libcloog.la</userinput></screen>
-
-  </sect2>
-
-  <sect2 id="contents-cloog-ppl" role="content">
-    <title>Contents of CLooG-PPL</title>
-
-    <segmentedlist>
-      <segtitle>Installed Libraries</segtitle>
-
-      <seglistitem>
-        <seg>libcloog.[a,so]</seg>
-      </seglistitem>
-    </segmentedlist>
-
-    <variablelist>
-      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
-      <?dbfo list-presentation="list"?>
-      <?dbhtml list-presentation="table"?>
-
-      <varlistentry id="cloog">
-        <term><command>cloog</command></term>
-        <listitem>
-          <para>Loop generator for scanning Z-polyhedra</para>
-          <indexterm zone="ch-system-cloog-ppl cloog">
-            <primary sortas="b-cloog">cloog</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="libcloog">
-        <term><filename class="libraryfile">libcloog</filename></term>
-        <listitem>
-          <para>The Chunky Loop Generator.</para>
-          <indexterm zone="ch-system-cloog-ppl libcloog">
-            <primary sortas="b-libcloog-ppl">libcloog</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-    </variablelist>
-
-  </sect2>
-
-</sect1>
Index: BOOK/final-system/common/coreutils.xml
===================================================================
--- BOOK/final-system/common/coreutils.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/coreutils.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -23,45 +23,16 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Coreutils</title>
 
-    <para os="p1">A known issue with the <command>uname</command> program from
-    this package is that the <option>-p</option> switch always
-    returns <computeroutput>unknown</computeroutput>. The following patch
-    fixes this behavior for all architectures:</para>
-
-<screen os="p2"><userinput>patch -Np1 -i ../&coreutils-uname-patch;</userinput></screen>
-
-    <para os="aa">The following command updates the timestamps on the uname
-    and hostname man pages so that the Makefile does not attempt to regenerate
-    them:</para>
-
-<screen os="ab"><userinput>touch man/uname.1 man/hostname.1</userinput></screen>
-
-    <para os="a">Configure can not properly determine how to get free space
-    when cross-compiling - as a result, the <command>df</command> program will
-    not be built. Add the following entries to <filename>config.cache</filename>
-    to correct this, and fix various cross-compiling issues:</para>
-
-<screen os="b"><userinput>cat &gt; config.cache &lt;&lt; EOF
-fu_cv_sys_stat_statfs2_bsize=yes
-gl_cv_func_rename_trailing_slash_bug=no
-gl_cv_func_mbrtowc_incomplete_state=yes
-gl_cv_func_mbrtowc_nul_retval=yes
-gl_cv_func_mbrtowc_null_arg=yes
-gl_cv_func_mbrtowc_retval=yes
-gl_cv_func_btowc_eof=yes
-gl_cv_func_wcrtomb_retval=yes
-gl_cv_func_wctob_works=yes
-EOF</userinput></screen>
+    <para os="a">Prevent Coreutils from installing binaries that will be
+    installed by other packages:</para>
+
+<screen os="b"><userinput>patch -Np1 -i ../&coreutils-suppress-patch;</userinput></screen>
 
     <para os="c">Now prepare Coreutils for compilation:</para>
 
-<screen os="d"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr --cache-file=config.cache \
-    --enable-no-install-program=kill,uptime \
-    --enable-install-program=hostname</userinput></screen>
+<screen os="d"><userinput>./configure --prefix=/usr \
+   --build=${LFS_HOST} --host=${LFS_TARGET}</userinput></screen>
 
     <para os="e">Compile the package:</para>
@@ -71,21 +42,21 @@
     <para os="g">Install the package:</para>
 
-<screen os="h"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
+<screen os="h"><userinput>make DESTDIR=${LFS} install</userinput></screen>
 
     <para os="i">Move programs to the locations specified by the FHS:</para>
 
-<screen os="j"><userinput>mv -v ${CLFS}/usr/bin/{cat,chgrp,chmod,chown,cp,date} ${CLFS}/bin
-mv -v ${CLFS}/usr/bin/{dd,df,echo,false,hostname,ln,ls,mkdir} ${CLFS}/bin
-mv -v ${CLFS}/usr/bin/{mv,pwd,rm,rmdir,stty,true,uname} ${CLFS}/bin
-mv -v ${CLFS}/usr/bin/chroot ${CLFS}/usr/sbin</userinput></screen>
-
-    <para os="k">Other Coreutils programs are used by some of the scripts
-    in the CLFS-Bootscripts package. As <filename
+<screen os="j"><userinput>mv -v ${LFS}/usr/bin/{[,basename,cat,chgrp,chmod,chown,cp} ${LFS}/bin
+mv -v ${LFS}/usr/bin/{date,dd,df,echo,false,hostname,install,ln} ${LFS}/bin
+mv -v ${LFS}/usr/bin/{ls,mkdir,mknod,mv,nice,pwd,readlink,rm,rmdir,sync} ${LFS}/bin
+mv -v ${LFS}/usr/bin/{stty,test,touch,true,uname} ${LFS}/bin
+mv -v ${LFS}/usr/bin/chroot ${LFS}/usr/sbin
+ln -svf ../../bin/install ${LFS}/usr/bin</userinput></screen>
+
+    <para os="k">Some of the scripts in the LFS-Bootscripts package depend on
+    <command>head</command> and <command>sleep</command>. As <filename
     class="directory">/usr</filename> may not be available during the early
     stages of booting, those binaries need to be on the root partition:</para>
 
-<screen os="l"><userinput>mv -v ${CLFS}/usr/bin/{[,basename,head,install,nice} ${CLFS}/bin
-mv -v ${CLFS}/usr/bin/{readlink,sleep,sync,test,touch} ${CLFS}/bin
-ln -sfv ../../bin/install ${CLFS}/usr/bin</userinput></screen>
+<screen os="l"><userinput>mv -v ${LFS}/usr/bin/{head,sleep} ${LFS}/bin</userinput></screen>
 
   </sect2>
@@ -98,14 +69,13 @@
 
       <seglistitem>
-        <seg>[, base64, basename, cat, chcon, chgrp, chmod, chown, chroot,
-        cksum, comm, cp, csplit, cut, date, dd, df, dir, dircolors, dirname, du,
+        <seg>basename, cat, chgrp, chmod, chown, chroot, cksum,
+        comm, cp, csplit, cut, date, dd, df, dir, dircolors, dirname, du,
         echo, env, expand, expr, factor, false, fmt, fold, groups, head,
         hostid, hostname, id, install, join, link, ln, logname, ls, md5sum,
-        mkdir, mkfifo, mknod, mktemp, mv, nice, nl, nohup, od, paste, pathchk,
-        pinky, pr, printenv, printf, ptx, pwd, readlink, rm, rmdir, runcon, seq,
-        sha1sum, sha224sum, sha256sum, sha384sum, sha512sum, shred, shuf,
-        sleep, sort, split, stat, stty, sum, sync, tac, tail, tee, test,
-        timeout, touch, tr, true, truncate, tsort, tty, uname, unexpand, uniq,
-        unlink, users, vdir, wc, who, whoami, and yes</seg>
+        mkdir, mkfifo, mknod, mv, nice, nl, nohup, od, paste, pathchk, pinky,
+        pr, printenv, printf, ptx, pwd, readlink, rm, rmdir, seq, sha1sum,
+        shred, sleep, sort, split, stat, stty, sum, sync, tac, tail, tee,
+        test, touch, tr, true, tsort, tty, uname, unexpand, uniq, unlink,
+        users, vdir, wc, who, whoami, and yes</seg>
       </seglistitem>
     </segmentedlist>
@@ -116,14 +86,4 @@
       <?dbhtml list-presentation="table"?>
 
-      <varlistentry id="base64">
-        <term><command>base64</command></term>
-        <listitem>
-          <para>Base64 encode/decode data and print to standard output</para>
-          <indexterm zone="ch-system-coreutils base64">
-            <primary sortas="b-base64">base64</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
       <varlistentry id="basename">
         <term><command>basename</command></term>
@@ -142,14 +102,4 @@
           <indexterm zone="ch-system-coreutils cat">
             <primary sortas="b-cat">cat</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="chcon">
-        <term><command>chcon</command></term>
-        <listitem>
-          <para>Changes security context for files and directories</para>
-          <indexterm zone="ch-system-coreutils chcon">
-            <primary sortas="b-chcon">chcon</primary>
           </indexterm>
         </listitem>
@@ -571,15 +521,4 @@
       </varlistentry>
 
-      <varlistentry id="mktemp">
-        <term><command>mktemp</command></term>
-        <listitem>
-          <para>Creates temporary files in a secure manner; it is used in
-          scripts</para>
-          <indexterm zone="ch-system-coreutils mktemp">
-            <primary sortas="b-mktemp">mktemp</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
       <varlistentry id="mv">
         <term><command>mv</command></term>
@@ -747,14 +686,4 @@
       </varlistentry>
 
-      <varlistentry id="runcon">
-        <term><command>runcon</command></term>
-        <listitem>
-          <para>Runs a command with specified security context</para>
-          <indexterm zone="ch-system-coreutils runcon">
-            <primary sortas="b-runcon">runcon</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
       <varlistentry id="seq">
         <term><command>seq</command></term>
@@ -779,44 +708,4 @@
       </varlistentry>
 
-      <varlistentry id="sha224sum">
-        <term><command>sha224sum</command></term>
-        <listitem>
-          <para>Prints or checks SHA224 checksums</para>
-          <indexterm zone="ch-system-coreutils sha224sum">
-            <primary sortas="b-sha224sum">sha224sum</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="sha256sum">
-        <term><command>sha256sum</command></term>
-        <listitem>
-          <para>Prints or checks SHA256 checksums</para>
-          <indexterm zone="ch-system-coreutils sha256sum">
-            <primary sortas="b-sha256sum">sha256sum</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="sha384sum">
-        <term><command>sha384sum</command></term>
-        <listitem>
-          <para>Prints or checks SHA384 checksums</para>
-          <indexterm zone="ch-system-coreutils sha384sum">
-            <primary sortas="b-sha384sum">sha384sum</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="sha512sum">
-        <term><command>sha512sum</command></term>
-        <listitem>
-          <para>Prints or checks SHA512 checksums</para>
-          <indexterm zone="ch-system-coreutils sha512sum">
-            <primary sortas="b-sha512sum">sha512sum</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
       <varlistentry id="shred">
         <term><command>shred</command></term>
@@ -830,14 +719,4 @@
       </varlistentry>
 
-      <varlistentry id="shuf">
-        <term><command>shuf</command></term>
-        <listitem>
-          <para>Write a random permutation of the input lines to standard output or a file</para>
-          <indexterm zone="ch-system-coreutils shuf">
-            <primary sortas="b-shuf">shuf</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
       <varlistentry id="sleep">
         <term><command>sleep</command></term>
@@ -945,19 +824,9 @@
 
       <varlistentry id="test">
-        <term><command>test</command> or <command>[</command></term>
+        <term><command>test</command></term>
         <listitem>
           <para>Compares values and checks file types</para>
           <indexterm zone="ch-system-coreutils test">
             <primary sortas="b-test">test</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="timeout">
-        <term><command>timeout</command></term>
-        <listitem>
-          <para>Runs a command with a time limit</para>
-          <indexterm zone="ch-system-coreutils timeout">
-            <primary sortas="b-timeout">timeout</primary>
           </indexterm>
         </listitem>
@@ -998,14 +867,4 @@
       </varlistentry>
 
-      <varlistentry id="truncate">
-        <term><command>truncate</command></term>
-        <listitem>
-          <para>Shrinks or expands a file to the specified size</para>
-          <indexterm zone="ch-system-coreutils truncate">
-            <primary sortas="b-truncate">truncate</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
       <varlistentry id="tsort">
         <term><command>tsort</command></term>
Index: BOOK/final-system/common/diffutils.xml
===================================================================
--- BOOK/final-system/common/diffutils.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/diffutils.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -23,29 +23,10 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Diffutils</title>
 
-    <para os="p1">This patch adds support for Internationalization:</para>
-
-<screen os="p2"><userinput>patch -Np1 -i ../&diffutils-i18n-patch;</userinput></screen>
-
     <para os="a">Prepare Diffutils for compilation:</para>
 
-<screen os="b"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr</userinput></screen>
-
-    <para os="s1">Diffutils wants ed as the default editor, the following sed will allow us
-    to use vim:</para>
-
-<screen os="s2"><userinput>sed -i 's@\(^#define DEFAULT_EDITOR_PROGRAM \).*@\1"vi"@' config.h</userinput></screen>
-
-    <para os="s3">Diffutils man-pages want to be recreated, but it requires
-    help2man. So we update the time on the files to prevent them from being
-    recreated:</para>
-
-<screen os="s4"><userinput>touch man/*.1</userinput></screen>
-
+<screen os="b"><userinput>./configure --prefix=/usr --host=${LFS_TARGET}</userinput></screen>
 
     <para os="c">Compile the package:</para>
@@ -55,5 +36,5 @@
     <para os="e">Install the package:</para>
 
-<screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
+<screen os="f"><userinput>make DESTDIR=${LFS} install</userinput></screen>
 
   </sect2>
Index: BOOK/final-system/common/e2fsprogs.xml
===================================================================
--- BOOK/final-system/common/e2fsprogs.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/e2fsprogs.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -20,11 +20,8 @@
     <para>The E2fsprogs package contains the utilities for handling the
     <systemitem class="filesystem">ext2</systemitem> file system. It also
-    supports the <systemitem class="filesystem">ext3</systemitem> and
-    <systemitem class="filesystem">ext4</systemitem> journaling
-    file systems.</para>
+    supports the <systemitem class="filesystem">ext3</systemitem> journaling
+    file system.</para>
 
   </sect2>
-
-  &env-target;
 
   <sect2 role="installation">
@@ -39,8 +36,7 @@
     <para os="c">Prepare E2fsprogs for compilation:</para>
 
-<screen os="d"><userinput>PKG_CONFIG=true ../configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr --with-root-prefix="" \
-    --enable-elf-shlibs --disable-libblkid \
-    --disable-libuuid --disable-fsck --disable-uuidd</userinput></screen>
+<screen os="d"><userinput>../configure --prefix=/usr --with-root-prefix="" \
+    --enable-elf-shlibs --disable-evms \
+    --host=${LFS_TARGET}</userinput></screen>
 
     <variablelist os="e">
@@ -75,5 +71,5 @@
           Management System (EVMS) plugin. This plugin is not up-to-date with
           the latest EVMS internal interfaces and EVMS is not installed as part
-          of a base CLFS system, so the plugin is not required. See the EVMS
+          of a base LFS system, so the plugin is not required. See the EVMS
           website at <ulink url="http://evms.sourceforge.net/"/> for more
           information regarding EVMS.</para>
@@ -87,19 +83,11 @@
 <screen os="g"><userinput>make</userinput></screen>
 
-    <para os="h">Install the binaries, documentation, and shared libraries:</para>
-
-<screen os="i"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
-
-    <para os="j">Install the static libraries and headers:</para>
-
-<screen os="k"><userinput>make DESTDIR=${CLFS} install-libs</userinput></screen>
-
-    <para os="l">Remove absolute paths from the link destinations:</para>
-
-<screen os="m"><userinput>rm -v ${CLFS}/usr/lib/lib{com_err,e2p,ext2fs,ss}.so
-ln -sv ../../lib/libcom_err.so.2 ${CLFS}/usr/lib/libcom_err.so
-ln -sv ../../lib/libe2p.so.2 ${CLFS}/usr/lib/libe2p.so
-ln -sv ../../lib/libext2fs.so.2 ${CLFS}/usr/lib/libext2fs.so
-ln -sv ../../lib/libss.so.2 ${CLFS}/usr/lib/libss.so</userinput></screen>
+    <para os="h">Install the binaries and documentation:</para>
+
+<screen os="i"><userinput>make DESTDIR=${LFS} install</userinput></screen>
+
+    <para os="j">Install the shared libraries:</para>
+
+<screen os="k"><userinput>make DESTDIR=${LFS} install-libs</userinput></screen>
 
   </sect2>
@@ -114,9 +102,9 @@
       <seglistitem>
         <seg>badblocks, blkid, chattr, compile_et, debugfs, dumpe2fs,
-        e2fsck, e2image, e2label, filefrag, findfs, fsck, fsck.ext2, fsck.ext3,
+        e2fsck, e2image, e2label, findfs, fsck, fsck.ext2, fsck.ext3,
         logsave, lsattr, mk_cmds, mke2fs, mkfs.ext2, mkfs.ext3,
-        mklost+found, resize2fs, and tune2fs.</seg>
-        <seg>libcom_err.[a,so], libe2p.[a,so],
-        libext2fs.[a,so], and libss.[a,so]</seg>
+        mklost+found, resize2fs, tune2fs, and uuidgen.</seg>
+        <seg>libblkid.[a,so], libcom_err.[a,so], libe2p.[a,so],
+        libext2fs.[a,so], libss.[a,so], and libuuid.[a,so]</seg>
       </seglistitem>
     </segmentedlist>
@@ -233,14 +221,4 @@
       </varlistentry>
 
-      <varlistentry id="filefrag">
-        <term><command>filefrag</command></term>
-        <listitem>
-          <para>Reports on how badly fragmented a particular file might be</para>
-          <indexterm zone="ch-system-e2fsprogs filefrag">
-            <primary sortas="b-filefrag">filefrag</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
       <varlistentry id="findfs">
         <term><command>findfs</command></term>
@@ -250,4 +228,14 @@
           <indexterm zone="ch-system-e2fsprogs findfs">
             <primary sortas="b-findfs">findfs</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="fsck">
+        <term><command>fsck</command></term>
+        <listitem>
+          <para>Is used to check, and optionally repair, file systems</para>
+          <indexterm zone="ch-system-e2fsprogs fsck">
+            <primary sortas="b-fsck">fsck</primary>
           </indexterm>
         </listitem>
@@ -378,4 +366,27 @@
       </varlistentry>
 
+      <varlistentry id="uuidgen">
+        <term><command>uuidgen</command></term>
+        <listitem>
+          <para>Creates new UUIDs. Each new UUID can reasonably be considered
+          unique among all UUIDs created, on the local system and on other
+          systems, in the past and in the future</para>
+          <indexterm zone="ch-system-e2fsprogs uuidgen">
+            <primary sortas="b-uuidgen">uuidgen</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libblkid">
+        <term><filename class="libraryfile">libblkid</filename></term>
+        <listitem>
+          <para>Contains routines for device identification and token
+          extraction</para>
+          <indexterm zone="ch-system-e2fsprogs libblkid">
+            <primary sortas="c-libblkid">libblkid</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
       <varlistentry id="libcom_err">
         <term><filename class="libraryfile">libcom_err</filename></term>
@@ -420,4 +431,15 @@
       </varlistentry>
 
+      <varlistentry id="libuuid">
+        <term><filename class="libraryfile">libuuid</filename></term>
+        <listitem>
+          <para>Contains routines for generating unique identifiers for objects
+          that may be accessible beyond the local system</para>
+          <indexterm zone="ch-system-e2fsprogs libuuid">
+            <primary sortas="c-libuuid">libuuid</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
     </variablelist>
 
Index: BOOK/final-system/common/file.xml
===================================================================
--- BOOK/final-system/common/file.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/file.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -23,21 +23,10 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of File</title>
 
-    <para os="ap1">The following patch will fix a compile issue that would prevent
-    a proper creation of the <filename>magic.mgc</filename> file. This would
-    show up as an error messsage.
-    <computeroutput>ERROR: file: File &file-version; supports only 6 version
-    magic files. `/tools/share/file/magic.mgc' is version 2</computeroutput>:</para>
-
-<screen os="ap2"><userinput>patch -Np1 -i ../&file-cross_compile-patch;</userinput></screen>
-
     <para os="a">Prepare File for compilation:</para>
 
-<screen os="b"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr</userinput></screen>
+<screen os="b"><userinput>./configure --prefix=/usr --host=${LFS_TARGET}</userinput></screen>
 
     <para os="c">Compile the package:</para>
@@ -47,5 +36,5 @@
     <para os="e">Install the package:</para>
 
-<screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
+<screen os="f"><userinput>make DESTDIR=${LFS} install</userinput></screen>
 
   </sect2>
Index: BOOK/final-system/common/findutils.xml
===================================================================
--- BOOK/final-system/common/findutils.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/findutils.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -25,24 +25,11 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Findutils</title>
 
-    <para os="c1">When Cross Compiling the configure script does not
-    run a select few tests, Set the values manually:</para>
-
-<screen os="c2"><userinput>cat &gt; config.cache &lt;&lt; EOF
-gl_cv_func_wcwidth_works=yes
-gl_cv_header_working_fcntl_h=yes
-ac_cv_func_fnmatch_gnu=yes
-EOF</userinput></screen>
-
     <para os="a">Prepare Findutils for compilation:</para>
 
-<screen os="b"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr --cache-file=config.cache \
-    --libexecdir=/usr/lib/locate \
-    --localstatedir=/var/lib/locate</userinput></screen>
+<screen os="b"><userinput>./configure --prefix=/usr --host=${LFS_TARGET} \
+    --libexecdir=/usr/lib/locate --localstatedir=/var/lib/locate</userinput></screen>
 
     <variablelist os="c">
@@ -66,21 +53,5 @@
     <para os="f">Install the package:</para>
 
-<screen os="g"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
-
-    <para os="h">The <command>find</command> program is used by some of the
-    scripts in the CLFS-Bootscripts package. As <filename
-    class="directory">/usr</filename> may not be available during the early
-    stages of booting, the <command>find</command> binary needs to be on
-    the root partition:</para>
-
-<screen os="i"><userinput>mv -v ${CLFS}/usr/bin/find ${CLFS}/bin</userinput></screen>
-
-    <para os="j">The <command>updatedb</command> script needs to be modified
-    to point to the new location for <command>find</command>:</para>
-
-<screen os="k"><userinput>cp ${CLFS}/usr/bin/updatedb{,.orig}
-sed 's@find:=${BINDIR}@find:=/bin@' ${CLFS}/usr/bin/updatedb.orig &gt; \
-    ${CLFS}/usr/bin/updatedb
-rm ${CLFS}/usr/bin/updatedb.orig</userinput></screen>
+<screen os="g"><userinput>make DESTDIR=${LFS} install</userinput></screen>
 
   </sect2>
Index: BOOK/final-system/common/flex.xml
===================================================================
--- BOOK/final-system/common/flex.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/flex.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -23,6 +23,4 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Flex</title>
@@ -33,26 +31,15 @@
 sed "s/-I@includedir@//g" Makefile.in.orig &gt; Makefile.in</userinput></screen>
 
-    <para os="cc1">When Cross Compiling the configure script does not
-    does not determine the correct values for the following, Set the values
-    manually:</para>
-
-<screen os="cc1"><userinput>cat &gt; config.cache &lt;&lt; EOF
-ac_cv_func_malloc_0_nonnull=yes
-ac_cv_func_realloc_0_nonnull=yes
-EOF</userinput></screen>
-
     <para os="c">Prepare Flex for compilation:</para>
 
-<screen os="d"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr --cache-file=config.cache</userinput></screen>
+<screen os="d"><userinput>./configure --prefix=/usr --host=${LFS_TARGET}</userinput></screen>
 
     <para os="e">Compile the package:</para>
 
-<screen os="f"><userinput>make CC="${CC} -fPIC" libfl.a
-make</userinput></screen>
+<screen os="f"><userinput>make</userinput></screen>
 
     <para os="g">Install the package:</para>
 
-<screen os="h"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
+<screen os="h"><userinput>make DESTDIR=${LFS} install</userinput></screen>
 
     <para os="i">There are some packages that expect to find the
@@ -61,5 +48,5 @@
     this:</para>
 
-<screen os="j"><userinput>ln -sfv libfl.a ${CLFS}/usr/lib/libl.a</userinput></screen>
+<screen os="j"><userinput>ln -sv libfl.a ${LFS}/usr/lib/libl.a</userinput></screen>
 
     <para os="k">A few programs do not know about <command>flex</command> yet and
@@ -69,5 +56,5 @@
     mode:</para>
 
-<screen os="l"><userinput>cat &gt; ${CLFS}/usr/bin/lex &lt;&lt; "EOF"
+<screen os="l"><userinput>cat &gt; ${LFS}/usr/bin/lex &lt;&lt; "EOF"
 <literal>#!/bin/sh
 # Begin /usr/bin/lex
@@ -77,5 +64,5 @@
 # End /usr/bin/lex</literal>
 EOF
-chmod -v 755 ${CLFS}/usr/bin/lex</userinput></screen>
+chmod -v 755 ${LFS}/usr/bin/lex</userinput></screen>
 
   </sect2>
@@ -90,5 +77,5 @@
       <seglistitem>
         <seg>flex and lex</seg>
-        <seg>libfl.a libfl_pic.a</seg>
+        <seg>libfl.a</seg>
       </seglistitem>
     </segmentedlist>
Index: BOOK/final-system/common/gawk.xml
===================================================================
--- BOOK/final-system/common/gawk.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/gawk.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -23,22 +23,24 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Gawk</title>
 
+    <para os="a">Patch Gawk to fix a bug which causes it to
+    segfault when invoked on a non-existent file:</para>
+
+<screen os="b"><userinput>patch -Np1 -i ../&gawk-segfault-patch;</userinput></screen>
+
     <para os="c">Prepare Gawk for compilation:</para>
 
-<screen os="d"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr --libexecdir=/usr/lib \
-    --disable-libsigsegv</userinput></screen>
+<screen os="d"><userinput>./configure --prefix=/usr --libexecdir=/usr/lib \
+    --build=${LFS_HOST} --host=${LFS_TARGET}</userinput></screen>
 
-    <para os="g">Compile the package:</para>
+    <para os="e">Compile the package:</para>
 
-<screen os="h"><userinput>make</userinput></screen>
+<screen os="f"><userinput>make</userinput></screen>
 
-    <para os="i">Install the package:</para>
+    <para os="g">Install the package:</para>
 
-<screen os="j"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
+<screen os="h"><userinput>make DESTDIR=${LFS} install</userinput></screen>
 
   </sect2>
Index: BOOK/final-system/common/gcc.xml
===================================================================
--- BOOK/final-system/common/gcc.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/gcc.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -23,13 +23,16 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of GCC</title>
 
-    <para os="p3">The following patch contains a number of updates to the
-    &gcc-version; branch by the GCC developers:</para>
-
-<screen os="p4"><userinput>patch -Np1 -i ../&gcc-branch_update-patch;</userinput></screen>
+    <para os="p1">The following patch fixes an issue where gcc doesn't generate
+    some code properly:</para>
+
+<screen os="p2"><userinput>patch -Np1 -i ../&gcc-PR26763-patch;</userinput></screen>
+
+    <para os="p3">The following patch fixes the searching of multilib dirs for
+    specs file:</para>
+
+<screen os="p4"><userinput>patch -Np1 -i ../&gcc-PR20425-patch;</userinput></screen>
 
     <para os="a">Apply a <command>sed</command> substitution that will suppress the
@@ -38,26 +41,13 @@
     Binutils will be used instead:</para>
 
-<screen os="b"><userinput>cp libiberty/Makefile.in{,.orig}
-sed 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in.orig &gt; \
-    libiberty/Makefile.in</userinput></screen>
+<screen os="b"><userinput>sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in</userinput></screen>
 
     <para os="e1">GCC provides a <command>gccbug</command> script which detects at
-    compile time whether <command>mktemp</command> is present, and hardcodes
-    the result in a test. If <command>mktemp</command> is not found, the
-    script will fall back to using less random names for temporary files.
-    <command>mktemp</command> will be installed as part of Coreutils
-    later, so the following <command>sed</command> will simulate its presence:</para>
-
-<screen os="e2"><userinput>cp gcc/gccbug.in{,.orig}
-sed 's/@have_mktemp_command@/yes/' gcc/gccbug.in.orig &gt; gcc/gccbug.in</userinput></screen>
-
-    <para os="s1">The <command>fixincludes</command> script attempts to "fix"
-    the system headers installed so far. Since GCC is cross-compiled expecting
-    the system headers to be in <filename class="directory">/usr/include</filename>,
-    the script will be looking at the host system's headers. The following sed
-    prevents <command>fixincludes</command> from running:</para>
-
-<screen os="s2"><userinput>cp gcc/Makefile.in{,.orig}
-sed 's@\./fixinc\.sh@-c true@' gcc/Makefile.in.orig &gt; gcc/Makefile.in</userinput></screen>
+    compile time whether mktemp is present, and hardcodes the result in a test.
+    If mktemp is not found, the script will fall back to using less
+    random names for temporary files.  We will be installing mktemp
+    later, so the following sed will simulate its presence:</para>
+
+<screen os="e2"><userinput>sed -i 's/@have_mktemp_command@/yes/' gcc/gccbug.in</userinput></screen>
 
     <para os="c">The GCC documentation recommends building GCC outside of the source
@@ -69,18 +59,10 @@
     <para os="e">Prepare GCC for compilation:</para>
 
-<screen os="f"><userinput>LDFLAGS="-Wl,-rpath-link,${CLFS}/cross-tools/${CLFS_TARGET}/lib" \
-    ../gcc-&gcc-version;/configure --prefix=/usr --libexecdir=/usr/lib \
-    --build=${CLFS_HOST} --host=${CLFS_TARGET} --target=${CLFS_TARGET} \
+<screen os="f"><userinput>../gcc-4.1.0/configure --prefix=/usr --libexecdir=/usr/lib \
+    --build=${LFS_HOST} --host=${LFS_TARGET} --target=${LFS_TARGET} \
     --enable-shared --enable-threads=posix --enable-__cxa_atexit \
     --enable-c99 --enable-long-long --enable-clocale=gnu \
     --enable-languages=c,c++ --disable-libstdcxx-pch</userinput></screen>
 
-    <para os="ts1">The following will prevent GCC from looking in the wrong
-    directories for headers and libraries:</para>
-
-<screen os="ts2"><userinput>cp Makefile{,.orig}
-sed "/^HOST_\(GMP\|PPL\|CLOOG\)\(LIBS\|INC\)/s:-[IL]/\(lib\|include\)::" \
-    Makefile.orig &gt; Makefile</userinput></screen>
-
     <para os="g">Compile the package:</para>
 
@@ -89,5 +71,5 @@
     <para os="i">Install the package:</para>
 
-<screen os="j"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
+<screen os="j"><userinput>make DESTDIR=${LFS} install</userinput></screen>
 
     <para os="k">Some packages expect the C preprocessor to be installed in the
@@ -95,10 +77,10 @@
     To support those packages, create this symlink:</para>
 
-<screen os="l"><userinput>ln -sfv ../usr/bin/cpp ${CLFS}/lib</userinput></screen>
+<screen os="l"><userinput>ln -sv ../usr/bin/cpp ${LFS}/lib</userinput></screen>
 
     <para os="m">Many packages use the name <command>cc</command> to call the C
     compiler. To satisfy those packages, create a symlink:</para>
 
-<screen os="o"><userinput>ln -sfv gcc ${CLFS}/usr/bin/cc</userinput></screen>
+<screen os="o"><userinput>ln -sv gcc ${LFS}/usr/bin/cc</userinput></screen>
 
   </sect2>
@@ -113,6 +95,6 @@
       <seglistitem>
         <seg>c++, cc (link to gcc), cpp, g++, gcc, gccbug, and gcov</seg>
-        <seg>libgcc.a, libgcc_eh.a, libgcc_s.so, libgomp.[a,so], libmudflap.[a,so],
-        libmudflapth.[a,so], libssp.[a,so], libstdc++.[a,so], and
+        <seg>libgcc.a, libgcc_eh.a, libgcc_s.so, libmudflap.[a,so], 
+        libmudflapth.[a,so], libstdc++.[a,so], and
         libsupc++.a</seg>
       </seglistitem>
Index: BOOK/final-system/common/gettext.xml
===================================================================
--- BOOK/final-system/common/gettext.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/gettext.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -25,23 +25,10 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Gettext</title>
 
-    <para os="c1">When Cross Compiling the configure script does not
-    run a select few tests, Set the values manually:</para>
-
-<screen os="c2"><userinput>cat &gt; config.cache &lt;&lt; EOF
-am_cv_func_iconv_works=yes
-gl_cv_func_wcwidth_works=yes
-gt_cv_func_printf_posix=yes
-gt_cv_int_divbyzero_sigfpe=yes
-EOF</userinput></screen>
-
     <para os="a">Prepare Gettext for compilation:</para>
 
-<screen os="b"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr --cache-file=config.cache</userinput></screen>
+<screen os="b"><userinput>./configure --prefix=/usr --host=${LFS_TARGET}</userinput></screen>
 
     <para os="c">Compile the package:</para>
@@ -51,5 +38,5 @@
     <para os="e">Install the package:</para>
 
-<screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
+<screen os="f"><userinput>make DESTDIR=${LFS} install</userinput></screen>
 
   </sect2>
@@ -63,10 +50,10 @@
 
       <seglistitem>
-        <seg>autopoint, config.charset, config.rpath, envsubst, gettext, gettext.sh,
+        <seg>autopoint, config.charset, config.rpath, envsubst, gettext,
         gettextize, hostname, msgattrib, msgcat, msgcmp, msgcomm, msgconv, msgen,
         msgexec, msgfilter, msgfmt, msggrep, msginit, msgmerge, msgunfmt, msguniq,
         ngettext, and xgettext</seg>
-        <seg>libasprintf.[a,so], libgettextlib.so, libgettextpo.[a,so], and
-        libgettextsrc.so</seg>
+        <seg>libasprintf.[a,so], libgettextlib,so, libgettextpo.[a,so], and
+        libgettextsrc,so</seg>
       </seglistitem>
     </segmentedlist>
@@ -128,14 +115,4 @@
           <indexterm zone="ch-system-gettext gettext">
             <primary sortas="b-gettext">gettext</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="gettext.sh">
-        <term><command>gettext.sh</command></term>
-        <listitem>
-          <para>Primarily serves as a shell function library for gettext</para>
-          <indexterm zone="ch-system-gettext gettext.sh">
-            <primary sortas="b-gettext.sh">gettext.sh</primary>
           </indexterm>
         </listitem>
Index: OK/final-system/common/gmp.xml
===================================================================
--- BOOK/final-system/common/gmp.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,94 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-system-gmp" role="wrap">
-  <?dbhtml filename="gmp.html"?>
-
-  <title>GMP-&gmp-version;</title>
-
-  <indexterm zone="ch-system-gmp">
-    <primary sortas="a-GMP">GMP</primary>
-    <secondary>temporary system</secondary>
-  </indexterm>
-
-  <sect2 role="package">
-    <title/>
-
-    <para>GMP is a library for arithmetic on arbitrary precision integers,
-    rational numbers, and floating-point numbers.</para>
-
-  </sect2>
-
-  &env-target;
-
-  <sect2 role="installation">
-    <title>Installation of GMP</title>
-
-    <para os="a">Prepare GMP for compilation:</para>
-
-<screen os="b"><userinput>CPPFLAGS=-fexceptions ./configure --prefix=/usr \
-    --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --enable-cxx --enable-mpbsd</userinput></screen>
-
-    <para os="c">Compile the package:</para>
-
-<screen os="d"><userinput>make</userinput></screen>
-
-    <para os="e">Install the package:</para>
-
-<screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
-
-    <para os="g">At this time, Libtool does not support searching a sysroot
-    for libraries. Leaving the .la files in place will cause Libtool to look
-    in the wrong place for libraries. These files are not required for
-    linking on Linux. Remove them with the following command:</para>
-
-<screen os="h"><userinput>rm -v ${CLFS}/usr/lib/lib{gmp,gmpxx,mp}.la</userinput></screen>
-
-  </sect2>
-
-  <sect2 id="contents-gmp" role="content">
-    <title>Contents of GMP</title>
-
-    <segmentedlist>
-      <segtitle>Installed Libraries</segtitle>
-
-      <seglistitem>
-        <seg>libgmp.[a,so], libgmpxx[a,so]</seg>
-      </seglistitem>
-    </segmentedlist>
-
-    <variablelist>
-      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
-      <?dbfo list-presentation="list"?>
-      <?dbhtml list-presentation="table"?>
-
-      <varlistentry id="libgmp">
-        <term><filename class="libraryfile">libgmp</filename></term>
-        <listitem>
-          <para>Contains the definitions for GNU multiple precision functions.</para>
-          <indexterm zone="ch-system-gmp libgmp">
-            <primary sortas="b-libgmp">libgmp</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="libgmpxx">
-        <term><filename class="libraryfile">libgmpxx</filename></term>
-        <listitem>
-          <para>Contains a C++ class wrapper for GMP types.</para>
-          <indexterm zone="ch-system-gmp libgmpxx">
-            <primary sortas="b-libgmpxx">libgmpxx</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-    </variablelist>
-
-  </sect2>
-
-</sect1>
Index: BOOK/final-system/common/grep.xml
===================================================================
--- BOOK/final-system/common/grep.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/grep.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -23,17 +23,11 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Grep</title>
 
-    <para os="p1">This patch adds support for Internationalization:</para>
-
-<screen os="p2"><userinput>patch -Np1 -i ../&grep-i18n-patch;</userinput></screen>
-
     <para os="a">Prepare Grep for compilation:</para>
 
-<screen os="b"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr --bindir=/bin --disable-perl-regexp</userinput></screen>
+<screen os="b"><userinput>./configure --prefix=/usr --bindir=/bin \
+    --host=${LFS_TARGET} --disable-perl-regexp</userinput></screen>
 
     <para os="c">Compile the package:</para>
@@ -43,5 +37,5 @@
     <para os="e">Install the package:</para>
 
-<screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
+<screen os="f"><userinput>make DESTDIR=${LFS} install</userinput></screen>
 
   </sect2>
Index: BOOK/final-system/common/groff.xml
===================================================================
--- BOOK/final-system/common/groff.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/groff.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -22,6 +22,4 @@
 
   </sect2>
-
-  &env-target;
 
   <sect2 role="installation">
@@ -35,21 +33,20 @@
     <para os="b">Prepare Groff for compilation:</para>
 
-<screen os="c"><userinput>PAGE=<replaceable>[paper_size]</replaceable> ./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr</userinput></screen>
+<screen os="c"><userinput>PAGE=<replaceable>[paper_size]</replaceable> ./configure --prefix=/usr --host=${LFS_TARGET}</userinput></screen>
 
     <para os="d">Compile the package:</para>
 
-<screen os="e"><userinput>make TROFFBIN=troff GROFFBIN=groff GROFF_BIN_PATH=</userinput></screen>
+<screen os="e"><userinput>make GROFFBIN=groff GROFF_BIN_PATH= GROFF_BIN_DIR=</userinput></screen>
 
     <para os="f">Install the package:</para>
 
-<screen os="g"><userinput>make prefix=${CLFS}/usr install</userinput></screen>
+<screen os="g"><userinput>make prefix=${LFS} install</userinput></screen>
 
     <para os="h">Some documentation programs, such as <command>xman</command>,
     will not work properly without the following symlinks:</para>
 
-<screen os="i"><userinput>ln -sfv soelim ${CLFS}/usr/bin/zsoelim
-ln -sfv eqn ${CLFS}/usr/bin/geqn
-ln -sfv tbl ${CLFS}/usr/bin/gtbl</userinput></screen>
+<screen os="i"><userinput>ln -sv soelim ${LFS}/usr/bin/zsoelim
+ln -sv eqn ${LFS}/usr/bin/geqn
+ln -sv tbl ${LFS}/usr/bin/gtbl</userinput></screen>
 
   </sect2>
@@ -62,8 +59,8 @@
 
       <seglistitem>
-        <seg>addftinfo, afmtodit, eqn, eqn2graph, gdiffmk, geqn (link to eqn),
-        grap2graph, grn, grodvi, groff, groffer, grog, grolbp, grolj4, grops,
-        grotty, gtbl (link to tbl), hpftodit, indxbib, lkbib, lookbib, mmroff,
-        neqn, nroff, pdfroff, pfbtops, pic, pic2graph, post-grohtml, pre-grohtml, refer,
+        <seg>addftinfo, afmtodit, eqn, eqn2graph, geqn (link to eqn), grn,
+        grodvi, groff, groffer, grog, grolbp, grolj4, grops, grotty, gtbl
+        (link to tbl), hpftodit, indxbib, lkbib, lookbib, mmroff, neqn,
+        nroff, pfbtops, pic, pic2graph, post-grohtml, pre-grohtml, refer,
         soelim, tbl, tfmtodit, troff, and zsoelim (link to soelim)</seg>
       </seglistitem>
@@ -119,14 +116,4 @@
       </varlistentry>
 
-      <varlistentry id="gdiffmk">
-        <term><command>gdiffmk</command></term>
-        <listitem>
-          <para>Marks differences between groff/nroff/troff files</para>
-          <indexterm zone="ch-system-groff gdiffmk">
-            <primary sortas="b-gdiffmk">gdiffmk</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
       <varlistentry id="geqn">
         <term><command>geqn</command></term>
@@ -135,14 +122,4 @@
           <indexterm zone="ch-system-groff geqn">
             <primary sortas="b-geqn">geqn</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="grap2graph">
-        <term><command>grap2graph</command></term>
-        <listitem>
-          <para>Converts a grap diagram into a cropped bitmap image</para>
-          <indexterm zone="ch-system-groff grap2graph">
-            <primary sortas="b-grap2graph">grap2graph</primary>
           </indexterm>
         </listitem>
@@ -342,14 +319,4 @@
       </varlistentry>
 
-      <varlistentry id="pdfroff">
-        <term><command>pdfroff</command></term>
-        <listitem>
-          <para>Creates pdf documents using groff</para>
-          <indexterm zone="ch-system-groff pdfroff">
-            <primary sortas="b-pdfroff">pdfroff</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
       <varlistentry id="pfbtops">
         <term><command>pfbtops</command></term>
Index: BOOK/final-system/common/gzip.xml
===================================================================
--- BOOK/final-system/common/gzip.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/gzip.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -23,36 +23,43 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Gzip</title>
 
-    <para os="s1">The following command renames the internal implementation of
-    futimens to gl_futimens as newer versions of EGLIBC provide an incompatible
-    version:</para>
-
-<screen os="s2"><userinput>for file in $(grep -lr futimens *); do
-  cp -v ${file}{,.orig}
-  sed -e "s/futimens/gl_&amp;/" ${file}.orig &gt; ${file}
-done</userinput></screen>
+    <para os="p1">The following patch fixes two security vulnerabilities in Gzip.
+    First, a path traversal bug when using the <option>-N</option> option
+    (CAN-2005-1228) Second, a race condition in the file permission restore
+    code (CAN-2005-0998)</para>
+
+<screen os="p2"><userinput>patch -Np1 -i ../&gzip-security_fix-patch;</userinput></screen>
 
     <para os="a">Prepare Gzip for compilation:</para>
 
-<screen os="b"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr --bindir=/bin</userinput></screen>
-
-    <para os="c">Compile the package:</para>
-
-<screen os="d"><userinput>make</userinput></screen>
-
-    <para os="e">Install the package:</para>
-
-<screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
-
-    <para os="g">Now we will move some of utilities to
-    <filename class="directory">/usr/bin</filename> to meet FHS compliance:</para>
-
-<screen os="h"><userinput>mv ${CLFS}/bin/z{egrep,cmp,diff,fgrep,force,grep,less,more,new} \
-    ${CLFS}/usr/bin</userinput></screen>
+<screen os="b"><userinput>./configure --prefix=/usr --host=${LFS_TARGET}</userinput></screen>
+
+    <para os="c">The <command>gzexe</command> script has the location of the
+    <command>gzip</command> binary hard-wired into it. Because the
+    location of the binary is changed later, the following command ensures
+    that the new location gets placed into the script:</para>
+
+<screen os="d"><userinput>sed -i 's@"BINDIR"@/bin@g' gzexe.in</userinput></screen>
+
+    <para os="e">Compile the package:</para>
+
+<screen os="f"><userinput>make</userinput></screen>
+
+    <para os="g">Install the package:</para>
+
+<screen os="h"><userinput>make DESTDIR=${LFS} install</userinput></screen>
+
+    <para os="i">Move the <command>gzip</command> program to the <filename
+    class="directory">/bin</filename> directory and create some commonly
+    used symlinks to it:</para>
+
+<screen os="j"><userinput>mv -v ${LFS}/usr/bin/gzip ${LFS}/bin
+rm -v ${LFS}/usr/bin/{gunzip,zcat}
+ln -sv gzip ${LFS}/bin/gunzip
+ln -sv gzip ${LFS}/bin/zcat
+ln -sv gzip ${LFS}/bin/compress
+ln -sv gunzip ${LFS}/bin/uncompress</userinput></screen>
 
   </sect2>
@@ -65,5 +72,6 @@
 
       <seglistitem>
-        <seg>gunzip, gzexe, gzip, uncompress, zcat, zcmp, zdiff,
+        <seg>compress (link to gzip), gunzip (link to gzip), gzexe, gzip,
+        uncompress (link to gunzip), zcat (link to gzip), zcmp, zdiff,
         zegrep, zfgrep, zforce, zgrep, zless, zmore, and znew</seg>
       </seglistitem>
@@ -74,4 +82,14 @@
       <?dbfo list-presentation="list"?>
       <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="compress">
+        <term><command>compress</command></term>
+        <listitem>
+          <para>Compresses and decompresses files</para>
+          <indexterm zone="ch-system-gzip compress">
+            <primary sortas="b-compress">compress</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
 
       <varlistentry id="gunzip">
Index: BOOK/final-system/common/iana-etc.xml
===================================================================
--- BOOK/final-system/common/iana-etc.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/iana-etc.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -23,6 +23,4 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Iana-Etc</title>
@@ -36,5 +34,5 @@
     <para os="c">Install the package:</para>
 
-<screen os="d"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
+<screen os="d"><userinput>make DESTDIR=${LFS} install</userinput></screen>
 
   </sect2>
Index: BOOK/final-system/common/inetutils.xml
===================================================================
--- BOOK/final-system/common/inetutils.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/final-system/common/inetutils.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-inetutils" role="wrap">
+  <?dbhtml filename="inetutils.html"?>
+
+  <title>Inetutils-&inetutils-version;</title>
+
+  <indexterm zone="ch-system-inetutils">
+    <primary sortas="a-Inetutils">Inetutils</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Inetutils package contains programs for basic networking.</para>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Inetutils</title>
+
+    <para os="p1">Not all programs that come with Inetutils will be installed.
+    However, the Inetutils build system will insist on installing all the
+    man pages anyway. The following patch will correct this
+    situation:</para>
+
+<screen os="p2"><userinput>patch -Np1 -i ../&inetutils-man_pages-patch;</userinput></screen>
+
+    <para os="p3">This patch addresses build issues with GCC &gcc-version;:</para>
+
+<screen os="p4"><userinput>patch -Np1 -i ../&inetutils-gcc4_fixes-patch;</userinput></screen>
+
+    <para os="a">Prepare Inetutils for compilation:</para>
+
+<screen os="b"><userinput>./configure --prefix=/usr --host=${LFS_TARGET} \
+    --libexecdir=/usr/sbin --sysconfdir=/etc \
+    --localstatedir=/var --disable-logger \
+    --disable-syslogd --disable-whois --disable-servers</userinput></screen>
+
+    <variablelist os="c">
+      <title>The meaning of the configure options:</title>
+
+      <varlistentry>
+        <term><parameter>--disable-logger</parameter></term>
+        <listitem>
+          <para>This option prevents Inetutils from installing the
+          <command>logger</command> program, which is used by scripts to
+          pass messages to the System Log Daemon. Do not install it because
+          Util-linux installs a better version later.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><parameter>--disable-syslogd</parameter></term>
+        <listitem>
+          <para>This option prevents Inetutils from installing the System Log
+          Daemon, which is installed with the Sysklogd package.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><parameter>--disable-whois</parameter></term>
+        <listitem>
+          <para>This option disables the building of the Inetutils
+          <command>whois</command> client, which is out of date.
+          Instructions for a better <command>whois</command> client are
+          in the BLFS book.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><parameter>--disable-servers</parameter></term>
+        <listitem>
+          <para>This disables the installation of the various network
+          servers included as part of the Inetutils package. These servers are
+          deemed not appropriate in a basic LFS system. Some are insecure by
+          nature and are only considered safe on trusted networks. More
+          information can be found at <ulink
+          url="&blfs-root;view/svn/basicnet/inetutils.html"/>. Note that
+          better replacements are available for many of these
+          servers.</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+
+    <para os="d">Compile the package:</para>
+
+<screen os="e"><userinput>make</userinput></screen>
+
+    <para os="f">Install the package:</para>
+
+<screen os="g"><userinput>make DESTDIR=${LFS} install</userinput></screen>
+
+    <para os="h">Move the <command>ping</command> program to its FHS-compliant
+    place:</para>
+
+<screen os="i"><userinput>mv -v ${LFS}/usr/bin/ping ${LFS}/bin</userinput></screen>
+
+  </sect2>
+
+  <sect2 id="contents-inetutils" role="content">
+    <title>Contents of Inetutils</title>
+
+    <segmentedlist>
+      <segtitle>Installed programs</segtitle>
+
+      <seglistitem>
+        <seg>ftp, ping, rcp, rlogin, rsh, talk, telnet, and tftp</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="ftp">
+        <term><command>ftp</command></term>
+        <listitem>
+          <para>Is the file transfer protocol program</para>
+          <indexterm zone="ch-system-inetutils ftp">
+            <primary sortas="b-ftp">ftp</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="ping">
+        <term><command>ping</command></term>
+        <listitem>
+          <para>Sends echo-request packets and reports how long the replies
+          take</para>
+          <indexterm zone="ch-system-inetutils ping">
+            <primary sortas="b-ping">ping</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="rcp">
+        <term><command>rcp</command></term>
+        <listitem>
+          <para>Performs remote file copy</para>
+          <indexterm zone="ch-system-inetutils rcp">
+            <primary sortas="b-rcp">rcp</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="rlogin">
+        <term><command>rlogin</command></term>
+        <listitem>
+          <para>Performs remote login</para>
+          <indexterm zone="ch-system-inetutils rlogin">
+            <primary sortas="b-rlogin">rlogin</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="rsh">
+        <term><command>rsh</command></term>
+        <listitem>
+          <para>Runs a remote shell</para>
+          <indexterm zone="ch-system-inetutils rsh">
+            <primary sortas="b-rsh">rsh</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="talk">
+        <term><command>talk</command></term>
+        <listitem>
+          <para>Is used to chat with another user</para>
+          <indexterm zone="ch-system-inetutils talk">
+            <primary sortas="b-talk">talk</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="telnet">
+        <term><command>telnet</command></term>
+        <listitem>
+          <para>An interface to the TELNET protocol</para>
+          <indexterm zone="ch-system-inetutils telnet">
+            <primary sortas="b-telnet">telnet</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="tftp">
+        <term><command>tftp</command></term>
+        <listitem>
+          <para>A trivial file transfer program</para>
+          <indexterm zone="ch-system-inetutils tftp">
+            <primary sortas="b-tftp">tftp</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
Index: BOOK/final-system/common/introduction.xml
===================================================================
--- BOOK/final-system/common/introduction.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/introduction.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -11,16 +11,17 @@
   <title>Introduction</title>
 
-  <para os="a">In this chapter, we use the cross-compile tools to build
-  the final CLFS system. The installation of this software is
-  straightforward. Although in many cases the installation instructions
-  could be made shorter and more generic, we have opted to provide the full
-  instructions for every package to minimize the possibilities for mistakes.
-  The key to learning what makes a Linux system work is to know what each
-  package is used for and why the user (or the system) needs it. For every
-  installed package, a summary of its contents is given, followed by concise
-  descriptions of each program and library the package installed.</para>
+  <para os="a">In this chapter, we enter the building site and start
+  constructing the CLFS system in earnest. The installation of this
+  software is straightforward. Although in many cases the installation
+  instructions could be made shorter and more generic, we have opted
+  to provide the full instructions for every package to minimize the
+  possibilities for mistakes.  The key to learning what makes a Linux
+  system work is to know what each package is used for and why the user
+  (or the system) needs it.  For every installed package, a summary of
+  its contents is given, followed by concise descriptions of each
+  program and library the package installed.</para>
 
   <para os="b">If using compiler optimizations, please review the
-  optimization hint at <ulink url="&hints-root;Optimization"/>.
+  optimization hint at <ulink url="&hints-root;optimization.txt"/>.
   Compiler optimizations can make a program run slightly faster, but
   they may also cause compilation difficulties and problems when
@@ -32,5 +33,5 @@
   the code and build tools.  Also note that the <option>-march</option>
   and <option>-mtune</option> options may cause problems with the toolchain
-  packages (Binutils, GCC and EGLIBC). The small potential gains achieved in
+  packages (Binutils, GCC and Glibc). The small potential gains achieved in
   using compiler optimizations are often outweighed by the risks. First-time
   builders of CLFS are encouraged to build without custom optimizations.
@@ -39,6 +40,12 @@
 
   <para os="c">The order that packages are installed in this chapter needs to
-  be strictly followed to ensure that all package dependencies are
-  fulfilled.</para>
+  be strictly followed to ensure that no program accidentally acquires a
+  path referring to <filename class="directory">/tools</filename>
+  hard-wired into it. For the same reason, do not compile packages in
+  parallel. Compiling in parallel may save time (especially on dual-CPU
+  machines), but it could result in a program containing a hard-wired
+  path to <filename class="directory">/tools</filename>, which will
+  cause the program to stop working when that directory is
+  removed.</para>
 
   <para os="d">To keep track of which package installs particular files, a
Index: BOOK/final-system/common/iproute2.xml
===================================================================
--- BOOK/final-system/common/iproute2.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/iproute2.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -23,33 +23,20 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of IPRoute2</title>
 
-    <para os="s1">The following command prevents <command>install</command>
-    from trying to strip the binaries:</para>
-
-<screen os="s2"><userinput>for dir in ip misc tc; do
-    cp ${dir}/Makefile{,.orig}
-    sed 's/0755 -s/0755/' ${dir}/Makefile.orig &gt; ${dir}/Makefile
-done</userinput></screen>
-
-    <para os="cb1">The <command>arpd</command> binary included in this package is
+    <para os="s1">The <command>arpd</command> binary included in this package is
     dependent on Berkeley DB.  Because <command>arpd</command> is not a
     very common requirement on a base Linux system, remove the dependency
     on Berkeley DB by applying the <command>sed</command> command below.
     If the <command>arpd</command> binary is needed, instructions for
-    compiling Berkeley DB can be found in CBLFS at <ulink
-    url="&cblfs-root;index.php/Berkeley_DB"/>.</para>
-
-<screen os="s4"><userinput>cp misc/Makefile{,.orig}
-sed '/^TARGETS/s@arpd@@g' misc/Makefile.orig &gt; misc/Makefile</userinput></screen>
+    compiling Berkeley DB can be found in the BLFS Book at <ulink
+    url="&blfs-root;view/svn/server/databases.html#db"/>.</para>
+
+<screen os="s2"><userinput>sed -i '/^TARGETS/s@arpd@@g' misc/Makefile</userinput></screen>
 
     <para os="a">Compile the package:</para>
 
-<screen os="b"><userinput>make DESTDIR=${CLFS} CC="${CC}" \
-    DOCDIR=/usr/share/doc/iproute2 \
-    MANDIR=/usr/share/man</userinput></screen>
+<screen os="b"><userinput>make CC="${CC}" SBINDIR=/sbin</userinput></screen>
 
     <variablelist os="c">
@@ -57,29 +44,19 @@
 
       <varlistentry>
-        <term><parameter>DESTDIR=/</parameter></term>
-        <listitem>
-          <para>This option overrides the default DESTDIR of /usr, so that
-          that the IPRoute2 binaries will be installed into
+        <term><parameter>SBINDIR=/sbin</parameter></term>
+        <listitem>
+          <para>This ensures that the IPRoute2 binaries will install into
           <filename class="directory">/sbin</filename>. This is the correct
           location according to the FHS, because some of the IPRoute2 binaries
-          are used by the CLFS-Bootscripts package.</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><parameter>DOCDIR=/usr/share/doc/iproute2 MANDIR=/usr/share/man</parameter></term>
-        <listitem>
-          <para>The DESTDIR=/ parameter would cause documentation to be
-          installed into /share/doc and /share/man. These options ensure
-          the docs are installed to the correct locations.</para>
+          are used by the LFS-Bootscripts package.</para>
         </listitem>
       </varlistentry>
     </variablelist>
-          
-    <para os="d">Install the package:</para>
-
-<screen os="e"><userinput>make DESTDIR=${CLFS}  \
-    DOCDIR=/usr/share/doc/iproute2 \
-    MANDIR=/usr/share/man install</userinput></screen>
+
+    <para os="d">This package does not come with a test suite.</para>
+
+    <para os="e">Install the package:</para>
+
+<screen os="f"><userinput>make DESTDIR=${LFS} SBINDIR=/sbin install</userinput></screen>
 
   </sect2>
@@ -108,5 +85,5 @@
           <para>Connection status utility</para>
           <indexterm zone="ch-system-iproute2 ctstat">
-            <primary sortas="b-ctstat">ctstat</primary>
+            <primary sortas="b-cstat">ctstat</primary>
           </indexterm>
         </listitem>
@@ -180,5 +157,5 @@
           program</para>
           <indexterm zone="ch-system-iproute2 lnstat">
-            <primary sortas="b-lnstat">lnstat</primary>
+            <primary sortas="b-cstat">lnstat</primary>
           </indexterm>
         </listitem>
Index: OK/final-system/common/iputils.xml
===================================================================
--- BOOK/final-system/common/iputils.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,97 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-system-iputils" role="wrap">
-  <?dbhtml filename="iputils.html"?>
-
-  <title>IPutils-&iputils-version;</title>
-
-  <indexterm zone="ch-system-iputils">
-    <primary sortas="a-IPutils">IPutils</primary>
-  </indexterm>
-
-  <sect2 role="package">
-    <title/>
-
-    <para>The IPutils package contains programs for basic networking.</para>
-
-  </sect2>
-
-  &env-target;
-
-  <sect2 role="installation">
-    <title>Installation of IPutils</title>
-
-    <para os="p1">IPutils has various issues addressed by the following patch:</para>
-
-<screen os="p2"><userinput>patch -Np1 -i ../&iputils-fixes-patch;</userinput></screen>
-
-    <para os="p3">The following patch contains the man-pages for IPutils:</para>
-
-<screen os="p4"><userinput>patch -Np0 -i ../&iputils-manpages-patch;</userinput></screen>
-
-    <para os="a">Compile the package:</para>
-
-<screen os="b"><userinput>make</userinput></screen>
-
-    <para os="c">This package does not come with a test suite.</para>
-
-    <para os="d">Install the package:</para>
-
-<screen os="e"><userinput>install -v -m755 ping{,6} ${CLFS}/bin
-install -v -m755 arping ${CLFS}/usr/bin
-install -v -m755 clockdiff ${CLFS}/usr/bin
-install -v -m755 rdisc ${CLFS}/usr/bin
-install -v -m755 tracepath ${CLFS}/usr/bin
-install -v -m755 trace{path,route}6 ${CLFS}/usr/bin
-install -v -m644 doc/*.8 ${CLFS}/usr/share/man/man8</userinput></screen>
-
-  </sect2>
-
-  <sect2 id="contents-iputils" role="content">
-    <title>Contents of iputils</title>
-
-    <segmentedlist>
-      <segtitle>Installed programs</segtitle>
-
-      <seglistitem>
-        <seg>arping, clockdiff, ping, ping6, rdisc. tracepath, tracepath6, and traceroute6</seg>
-      </seglistitem>
-    </segmentedlist>
-
-    <variablelist>
-      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
-      <?dbfo list-presentation="list"?>
-      <?dbhtml list-presentation="table"?>
-
-      <varlistentry id="ping">
-        <term><command>ping</command></term>
-        <listitem>
-          <para>Sends echo-request packets and reports how long the replies
-          take. This is the IPV4 version</para>
-          <indexterm zone="ch-system-iputils ping">
-            <primary sortas="b-ping">ping</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="ping6">
-        <term><command>ping6</command></term>
-        <listitem>
-          <para>Sends echo-request packets and reports how long the replies
-          take. This is the IPV6 version</para>
-          <indexterm zone="ch-system-iputils ping6">
-            <primary sortas="b-ping6">ping6</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-    </variablelist>
-
-  </sect2>
-
-</sect1>
Index: BOOK/final-system/common/kbd.xml
===================================================================
--- BOOK/final-system/common/kbd.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/kbd.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -23,37 +23,34 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Kbd</title>
 
-    <para os="cc1">When Cross Compiling the configure script does not
-    run a select few tests, Set the values manually:</para>
-
-<screen os="cc1"><userinput>cat &gt; config.cache &lt;&lt; EOF
-ac_cv_func_setpgrp_void=yes
-ac_cv_func_malloc_0_nonnull=yes
-ac_cv_func_realloc_0_nonnull=yes
-EOF</userinput></screen>
+    <para os="p1">The following patch fixes build issues with GCC &gcc-version;:</para>
+
+<screen os="p2"><userinput>patch -Np1 -i ../&kbd-gcc4_fixes-patch;</userinput></screen>
+
+    <para os="s1">The following sed disables running the built conftests while
+    running configure:</para>
+
+<screen os="s2"><userinput>cp configure{,.orig}
+sed -e "s@&amp;&amp; ./conftest@@" configure.orig &gt; configure</userinput></screen>
+
+    <para os="s3">The following sed removes -s from the install command which
+    will try to strip the installed files:</para>
+
+<screen os="s4"><userinput>cp src/Makefile{,.orig}
+sed -e "s/install -s/install/" src/Makefile.orig &gt; src/Makefile</userinput></screen>
 
     <para os="a">Prepare Kbd for compilation:</para>
 
-<screen os="b"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr --cache-file=config.cache</userinput></screen>
-
-    <para os="d">Compile the package:</para>
-
-<screen os="e"><userinput>make</userinput></screen>
-
-    <para os="f">Install the package:</para>
-
-<screen os="g"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
-
-    <para os="h">Some of the Programs from Kbd are used by some of the scripts
-    in the CLFS-Bootscripts package. As <filename
-    class="directory">/usr</filename> may not be available during the early
-    stages of booting, those binaries need to be on the root partition:</para>
-
-<screen os="i"><userinput>mv -v ${CLFS}/usr/bin/{kbd_mode,dumpkeys,loadkeys,openvt,setfont} ${CLFS}/bin</userinput></screen>
+<screen os="b"><userinput>./configure</userinput></screen>
+
+    <para os="c">Compile the package:</para>
+
+<screen os="d"><userinput>make CC="${CC}"</userinput></screen>
+
+    <para os="e">Install the package:</para>
+
+<screen os="f"><userinput>make DESTDIR=${LFS} install</userinput></screen>
 
   </sect2>
@@ -66,10 +63,10 @@
 
       <seglistitem>
-        <seg>chvt, deallocvt, dumpkeys, fgconsole, getkeycodes, kbd_mode,
-        kbdrate, loadkeys, loadunimap, mapscrn, openvt, psfaddtable
+        <seg>chvt, deallocvt, dumpkeys, fgconsole, getkeycodes, getunimap,
+        kbd_mode, kbdrate, loadkeys, loadunimap, mapscrn, openvt, psfaddtable
         (link to psfxtable), psfgettable (link to psfxtable), psfstriptable
         (link to psfxtable), psfxtable, resizecons, setfont, setkeycodes,
-        setleds, setmetamode, showconsolefont, showkey, unicode_start, and
-        unicode_stop</seg>
+        setleds, setlogcons, setmetamode, setvesablank, showconsolefont,
+        showkey, unicode_start, and unicode_stop</seg>
       </seglistitem>
     </segmentedlist>
@@ -126,4 +123,14 @@
           <indexterm zone="ch-system-kbd getkeycodes">
             <primary sortas="b-getkeycodes">getkeycodes</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="getunimap">
+        <term><command>getunimap</command></term>
+        <listitem>
+          <para>Prints the currently used unicode-to-font mapping table</para>
+          <indexterm zone="ch-system-kbd getunimap">
+            <primary sortas="b-getunimap">getunimap</primary>
           </indexterm>
         </listitem>
@@ -274,4 +281,14 @@
       </varlistentry>
 
+      <varlistentry id="setlogcons">
+        <term><command>setlogcons</command></term>
+        <listitem>
+          <para>Sends kernel messages to the console</para>
+          <indexterm zone="ch-system-kbd setlogcons">
+            <primary sortas="b-setlogcons">setlogcons</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
       <varlistentry id="setmetamode">
         <term><command>setmetamode</command></term>
@@ -280,4 +297,15 @@
           <indexterm zone="ch-system-kbd setmetamode">
             <primary sortas="b-setmetamode">setmetamode</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="setvesablank">
+        <term><command>setvesablank</command></term>
+        <listitem>
+          <para>Lets the user adjust the built-in hardware screensaver (a blank
+          screen)</para>
+          <indexterm zone="ch-system-kbd setvesablank">
+            <primary sortas="b-setvesablank">setvesablank</primary>
           </indexterm>
         </listitem>
@@ -309,5 +337,5 @@
         <listitem>
           <para>Puts the keyboard and console in UNICODE mode. Never use it on
-          CLFS, because applications are not configured to support UNICODE.</para>
+          LFS, because applications are not configured to support UNICODE.</para>
           <indexterm zone="ch-system-kbd unicode_start">
             <primary sortas="b-unicode_start">unicode_start</primary>
Index: BOOK/final-system/common/less.xml
===================================================================
--- BOOK/final-system/common/less.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/less.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -22,6 +22,4 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Less</title>
@@ -29,6 +27,6 @@
     <para os="a">Prepare Less for compilation:</para>
 
-<screen os="b"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr --sysconfdir=/etc</userinput></screen>
+<screen os="b"><userinput>./configure --prefix=/usr --sysconfdir=/etc \
+    --host=${LFS_TARGET}</userinput></screen>
 
     <variablelist os="c">
@@ -51,10 +49,9 @@
     <para os="f">Install the package:</para>
 
-<screen os="g"><userinput>make prefix=${CLFS}/usr install</userinput></screen>
+<screen os="g"><userinput>make DESTDIR=${LFS} install</userinput></screen>
 
-    <para os="h">Move <command>less</command> to
-    <filename class="directory">/bin</filename>:</para>
+    <para os="h">Move less to /bin:</para>
 
-<screen os="i"><userinput>mv -v ${CLFS}/usr/bin/less ${CLFS}/bin</userinput></screen>
+<screen os="i"><userinput>mv -v ${LFS}/usr/bin/less ${LFS}/bin</userinput></screen>
 
   </sect2>
Index: BOOK/final-system/common/libtool.xml
===================================================================
--- BOOK/final-system/common/libtool.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/libtool.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -24,6 +24,4 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Libtool</title>
@@ -31,6 +29,5 @@
     <para os="a">Prepare Libtool for compilation:</para>
 
-<screen os="b"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr</userinput></screen>
+<screen os="b"><userinput>./configure --prefix=/usr --host=${LFS_TARGET}</userinput></screen>
 
     <para os="c">Compile the package:</para>
@@ -40,5 +37,5 @@
     <para os="e">Install the package:</para>
 
-<screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
+<screen os="f"><userinput>make DESTDIR=${LFS} install</userinput></screen>
 
   </sect2>
Index: BOOK/final-system/common/m4.xml
===================================================================
--- BOOK/final-system/common/m4.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/m4.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -22,27 +22,10 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of M4</title>
 
-    <para os="cc1">Configure can not properly determine the results of the
-    following tests:</para>
-
-<screen os="cc2"><userinput>cat &gt; config.cache &lt;&lt; EOF
-gl_cv_func_btowc_eof=yes
-gl_cv_func_mbrtowc_incomplete_state=yes
-gl_cv_func_mbrtowc_sanitycheck=yes
-gl_cv_func_mbrtowc_null_arg=yes
-gl_cv_func_mbrtowc_retval=yes
-gl_cv_func_mbrtowc_nul_retval=yes
-gl_cv_func_wcrtomb_retval=yes
-gl_cv_func_wctob_works=yes
-EOF</userinput></screen>
-
     <para os="a">Prepare M4 for compilation:</para>
 
-<screen os="b"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr --cache-file=config.cache</userinput></screen>
+<screen os="b"><userinput>./configure --prefix=/usr --host=${LFS_TARGET}</userinput></screen>
 
     <para os="c">Compile the package:</para>
@@ -52,5 +35,5 @@
     <para os="e">Install the package:</para>
 
-<screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
+<screen os="f"><userinput>make DESTDIR=${LFS} install</userinput></screen>
 
   </sect2>
@@ -73,6 +56,5 @@
 
       <varlistentry id="m4">
-         <!-- Don't remove the extra space, it prevet a FOP warning. -->
-        <term><command>m4 </command></term>
+        <term><command>m4</command></term>
         <listitem>
           <para>copies the given files while expanding the macros that they
Index: BOOK/final-system/common/make.xml
===================================================================
--- BOOK/final-system/common/make.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/make.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -22,6 +22,4 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Make</title>
@@ -29,6 +27,5 @@
     <para os="a">Prepare Make for compilation:</para>
 
-<screen os="b"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr</userinput></screen>
+<screen os="b"><userinput>./configure --prefix=/usr --host=${LFS_TARGET}</userinput></screen>
 
     <para os="c">Compile the package:</para>
@@ -38,5 +35,5 @@
     <para os="e">Install the package:</para>
 
-<screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
+<screen os="f"><userinput>make DESTDIR=${LFS} install</userinput></screen>
 
   </sect2>
Index: BOOK/final-system/common/man-pages.xml
===================================================================
--- BOOK/final-system/common/man-pages.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/man-pages.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -22,6 +22,4 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Man-pages</title>
@@ -29,5 +27,5 @@
     <para os="a">Install Man-pages by running:</para>
 
-<screen os="b"><userinput>make prefix=${CLFS}/usr install</userinput></screen>
+<screen os="b"><userinput>make prefix=${LFS} install</userinput></screen>
 
   </sect2>
@@ -52,13 +50,6 @@
         <term><filename>man pages</filename></term>
         <listitem>
-          <para>This package contains man pages that describe the following:
-          POSIX headers (section 0p), 
-          POSIX utilities (section 1p), POSIX functions (section 3p),
-          user commands (section 1), system calls (section 2), 
-          libc calls (section 3), device information (section 4), 
-          file formats (section 5), games (section 6), 
-          conventions and macro packages (section 7),
-          system administration (section 8), and
-          kernel (section 9).</para>
+          <para>Describe the C and C++ functions, important
+          device files, and significant configuration files</para>
           <indexterm zone="ch-system-man-pages man-pages">
             <primary sortas="e-man-pages">man pages</primary>
Index: BOOK/final-system/common/man.xml
===================================================================
--- BOOK/final-system/common/man.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/man.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -23,46 +23,33 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Man</title>
 
-    <para os="p1">This patch adds support for Internationalization:</para>
-
-<screen os="p2"><userinput>patch -Np1 -i ../&man-i18n-patch;</userinput></screen>
-
-    <para os="p3">The following patch will add support for new compressors like XZ Utils:</para>
-
-<screen os="p4"><userinput>patch -Np1 -i ../&man-new_compressors-patch;</userinput></screen>
-
     <para os="a">A few adjustments need to be made to the sources of Man.</para>
 
-    <para os="b">First, a <command>sed</command> substitution is needed to
-    modify <command>configure</command>'s default search path for executables.
-    It cycles through the values in <envar>PREPATH</envar> until it finds the
-    program it is looking for. The <option>-R</option> switch is also added to
-    the <envar>PAGER</envar> variable so that escape sequences are properly
-    handled by Less:</para>
-
-<screen os="c"><userinput>cp configure{,.orig}
-sed -e "/PREPATH=/s@=.*@=\"$(eval echo ${CLFS}/{,usr/}{sbin,bin})\"@g" \
-    -e 's@-is@&amp;R@g' configure.orig &gt; configure</userinput></screen>
-
-    <para os="d">Another couple of <command>sed</command> substitutions
-    comment out the <quote>MANPATH /usr/man</quote> and
-    <quote>MANPATH /usr/local/man</quote> lines in the
-    <filename>man.conf</filename> file to prevent redundant
-    results when using programs such as <command>whatis</command>:</para>
-
-<screen os="e"><userinput>cp src/man.conf.in{,.orig}
-sed -e 's@MANPATH./usr/man@#&amp;@g' \
-    -e 's@MANPATH./usr/local/man@#&amp;@g' \
-    src/man.conf.in.orig &gt; src/man.conf.in</userinput></screen>
-
-    <para os="f">Prepare Man for compilation:</para>
-
-<screen os="g"><userinput>./configure -confdir=/etc</userinput></screen>
-
-    <variablelist os="h">
+    <para os="b">First, a <command>sed</command> substitution is
+    needed to add the <option>-R</option> switch to the
+    <envar>PAGER</envar> variable so that escape sequences are
+    properly handled by Less:</para>
+
+<screen os="c"><userinput>sed -i 's@-is@&amp;R@g' configure</userinput></screen>
+
+    <para os="d">Another <command>sed</command> substitution comments out the
+    <quote>MANPATH /usr/man</quote> line in the <filename>man.conf</filename>
+    file to prevent redundant results when using programs such as
+    <command>whatis</command>:</para>
+
+<screen os="e"><userinput>sed -i 's@MANPATH./usr/man@#&amp;@g' src/man.conf.in</userinput></screen>
+
+    <para os="f">Finally, correct a syntax error in the
+    <command>makewhatis</command> script:</para>
+
+<screen os="g"><userinput>sed -i 's@)) |@) |@' src/makewhatis.sh</userinput></screen>
+
+    <para os="h">Prepare Man for compilation:</para>
+
+<screen os="i"><userinput>./configure -confdir=/etc</userinput></screen>
+
+    <variablelist os="j">
       <title>The meaning of the configure options:</title>
 
@@ -77,15 +64,5 @@
     </variablelist>
 
-    <para os="i">Configure was modified to look in <filename
-    class="directory">${CLFS}</filename> for the paths of helper
-    programs. Right now all of the programs have <filename
-    class="directory">${CLFS}</filename> as a prefix. Remove that prefix
-    with the following command:</para>
-
-<screen os="j"><userinput>cp conf_script{,.orig}
-sed "s@${CLFS}@@" conf_script.orig &gt; conf_script</userinput></screen>
-
-    <para os="k">The <command>makemsg</command> program, in Man's source, is
-    executed during the build. Compile it using the host's <command>gcc</command>:</para>
+    <para os="k">Build makemsg using the hosts gcc. It is executed during the build</para>
 
 <screen os="l"><userinput>gcc src/makemsg.c -o src/makemsg</userinput></screen>
@@ -97,5 +74,5 @@
     <para os="o">Install the package:</para>
 
-<screen os="p"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
+<screen os="p"><userinput>make DESTDIR=${LFS} install</userinput></screen>
 
     <note os="q">
@@ -133,6 +110,10 @@
     non-ISO 8859-1 locales. Also, it does not work with multibyte
     character sets. The first problem does not currently have a solution.
-    The second issue is not of concern because the CLFS installation does
+    The second issue is not of concern because the LFS installation does
     not support multibyte character sets.</para>
+
+    <para os="v">Additional information with regards to the compression of
+    man and info pages can be found in the BLFS book at
+    <ulink url="&blfs-root;view/cvs/postlfs/compressdoc.html"/>.</para>
 
   </sect2>
Index: BOOK/final-system/common/mktemp.xml
===================================================================
--- BOOK/final-system/common/mktemp.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/final-system/common/mktemp.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-mktemp" role="wrap">
+  <?dbhtml filename="mktemp.html"?>
+
+  <title>Mktemp-&mktemp-version;</title>
+
+  <indexterm zone="ch-system-mktemp">
+    <primary sortas="a-Mktemp">Mktemp</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Mktemp package contains programs used to create secure
+    temporary files in shell scripts.</para>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Mktemp</title>
+
+    <para os="a">Many scripts still use the deprecated <command>tempfile</command>
+    program, which has functionality similar to <command>mktemp</command>.
+    Patch Mktemp to include a <command>tempfile</command> wrapper:</para>
+
+<screen os="b"><userinput>patch -Np1 -i ../&mktemp-tempfile-patch;</userinput></screen>
+
+    <para os="s1">The following sed removes -s from the install command which
+    will try to strip the installed files:</para>
+
+<screen os="s2"><userinput>cp Makefile{,.orig}
+sed -e 's/-s $(PROG)/$(PROG)/' Makefile.orig &gt; Makefile</userinput></screen>
+
+    <para os="c">Prepare Mktemp for compilation:</para>
+
+<screen os="d"><userinput>./configure --prefix=/usr --with-libc  --host=${LFS_TARGET}</userinput></screen>
+
+    <variablelist os="e">
+      <title>The meaning of the configure option:</title>
+
+      <varlistentry>
+        <term><parameter>--with-libc</parameter></term>
+        <listitem>
+          <para>This causes the <command>mktemp</command> program to use the
+          <emphasis>mkstemp</emphasis> and <emphasis>mkdtemp</emphasis>
+          functions from the system C library.</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+
+    <para os="f">Compile the package:</para>
+
+<screen os="g"><userinput>make</userinput></screen>
+
+    <para os="h">Install the package:</para>
+
+<screen os="i"><userinput>make prefix=${LFS} install
+make prefix=${LFS} install-tempfile</userinput></screen>
+
+  </sect2>
+
+  <sect2 id="contents-mktemp" role="content">
+    <title>Contents of Mktemp</title>
+
+    <segmentedlist>
+      <segtitle>Installed programs</segtitle>
+
+      <seglistitem>
+        <seg>mktemp and tempfile</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="mktemp">
+        <term><command>mktemp</command></term>
+        <listitem>
+          <para>Creates temporary files in a secure manner; it is used in
+          scripts</para>
+          <indexterm zone="ch-system-mktemp mktemp">
+            <primary sortas="b-mktemp">mktemp</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="tempfile">
+        <term><command>tempfile</command></term>
+        <listitem>
+          <para>Creates temporary files in a less secure manner than
+          <command>mktemp</command>; it is installed for
+          backwards-compatibility</para>
+          <indexterm zone="ch-system-mktemp tempfile">
+            <primary sortas="b-tempfile">tempfile</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
Index: BOOK/final-system/common/module-init-tools.xml
===================================================================
--- BOOK/final-system/common/module-init-tools.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/module-init-tools.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -23,6 +23,4 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Module-Init-Tools</title>
@@ -30,7 +28,5 @@
     <para os="a">Prepare Module-Init-Tools for compilation:</para>
 
-<screen os="b"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr --bindir=/bin \
-    --sbindir=/sbin --enable-zlib-dynamic</userinput></screen>
+<screen os="b"><userinput>./configure --prefix=/ --enable-zlib --host=${LFS_TARGET}</userinput></screen>
 
     <variablelist os="c">
@@ -38,5 +34,5 @@
 
       <varlistentry>
-        <term><parameter>--enable-zlib-dynamic</parameter></term>
+        <term><parameter>--enable-zlib</parameter></term>
         <listitem>
           <para>This allows the Module-Init-Tools package to handle compressed
@@ -49,22 +45,9 @@
     <para os="d">Compile the package:</para>
 
-<screen os="e"><userinput>make DOCBOOKTOMAN=</userinput></screen>
+<screen os="e"><userinput>make</userinput></screen>
 
     <para os="f">Install the package:</para>
 
-<screen os="g"><userinput>make DESTDIR=${CLFS} INSTALL=install install</userinput></screen>
-
-    <variablelist os="h">
-      <title>The meaning of the make parameter:</title>
-      <varlistentry>
-        <term><parameter>INSTALL=install</parameter></term>
-        <listitem>
-          <para>Normally, <command>make install</command> will not install the
-          binaries if they already exist. This option overrides that behavior
-          by calling <command>install</command> instead of using the default
-          wrapper script.</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
+<screen os="g"><userinput>make DESTDIR=${LFS} install</userinput></screen>
 
   </sect2>
@@ -77,6 +60,6 @@
 
       <seglistitem>
-        <seg>depmod, insmod, insmod.static, lsmod (link to insmod), modinfo,
-         modprobe (link to insmod), and rmmod (link to insmod)</seg>
+        <seg>depmod, insmod, insmod.static, lsmod (link to insmod),
+        modinfo, modprobe (link to insmod), and rmmod (link to insmod)</seg>
       </seglistitem>
     </segmentedlist>
Index: OK/final-system/common/mpfr.xml
===================================================================
--- BOOK/final-system/common/mpfr.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,86 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-system-mpfr" role="wrap">
-  <?dbhtml filename="mpfr.html"?>
-
-  <title>MPFR-&mpfr-version;</title>
-
-  <indexterm zone="ch-system-mpfr">
-    <primary sortas="a-MPFR">MPFR</primary>
-    <secondary>temporary system</secondary>
-  </indexterm>
-
-  <sect2 role="package">
-    <title/>
-
-    <para>The MPFR library is a C library for multiple-precision floating-point
-    computations with correct rounding.</para>
-
-  </sect2>
-
-  &env-target;
-
-  <sect2 role="installation">
-    <title>Installation of MPFR</title>
-
-    <para os="p1">The following patch contains a number of updates to the
-    &mpfr-version; branch by the MPFR developers:</para>
-
-<screen os="p2"><userinput>patch -Np1 -i ../&mpfr-branch_update-patch;</userinput></screen>
-
-    <para os="a">Prepare MPFR for compilation:</para>
-
-<screen os="b"><userinput>./configure --prefix=/usr --enable-shared \
-    --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --with-gmp-lib=${CLFS}/usr/lib</userinput></screen>
-
-    <para os="c">Compile the package:</para>
-
-<screen os="d"><userinput>make</userinput></screen>
-
-    <para os="e">Install the package:</para>
-
-<screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
-
-    <para os="g">At this time, libtool does not support searching a sysroot for libraries. Leaving the .la files in place will cause libtool to look in the wrong place for libraries. These files are not required for linking on linux. Remove them with the following command:</para>
-
-<screen os="h"><userinput>rm -v ${CLFS}/usr/lib/libmpfr.la</userinput></screen>
-
-  </sect2>
-
-  <sect2 id="contents-mpfr" role="content">
-    <title>Contents of MPFR</title>
-
-    <segmentedlist>
-      <segtitle>Installed Libraries</segtitle>
-
-      <seglistitem>
-        <seg>libmpfr.[a,so]</seg>
-      </seglistitem>
-    </segmentedlist>
-
-    <variablelist>
-      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
-      <?dbfo list-presentation="list"?>
-      <?dbhtml list-presentation="table"?>
-
-      <varlistentry id="libmpfr">
-        <term><filename class="libraryfile">libmpfr</filename></term>
-        <listitem>
-          <para>The Multiple Precision Floating-Point Reliable Library.</para>
-          <indexterm zone="ch-system-mpfr libmpfr">
-            <primary sortas="b-libmpfr">libmpfr</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-    </variablelist>
-
-  </sect2>
-
-</sect1>
Index: BOOK/final-system/common/ncurses.xml
===================================================================
--- BOOK/final-system/common/ncurses.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/ncurses.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -23,25 +23,12 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Ncurses</title>
 
-    <para os="p1">The following patch contains updates from the &ncurses-version; branch
-    by the Ncurses developers:</para>
-
-<screen os="p2"><userinput>patch -Np1 -i ../&ncurses-branch_update-patch;</userinput></screen>
-
-    <para os="p3">This patch fixes an issue with some Bash versions:</para>
-
-<screen os="p4"><userinput>patch -Np1 -i ../&ncurses-bashfix-patch;</userinput></screen>
-
     <para os="a">Prepare Ncurses for compilation:</para>
 
-<screen os="b"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr --libdir=/lib --with-shared \
-    --enable-widec --without-debug --without-ada \
-    --with-manpage-format=normal \
-    --with-build-cc="gcc -D_GNU_SOURCE"</userinput></screen>
+<screen os="b"><userinput>./configure --prefix=/usr --libdir=/lib \
+   --host=${LFS_TARGET} --with-shared \
+   --without-debug --without-ada --with-build-cc=gcc</userinput></screen>
 
     <para os="c">Compile the package:</para>
@@ -51,35 +38,22 @@
     <para os="e">Install the package:</para>
 
-<screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
+<screen os="f"><userinput>make DESTDIR=${LFS} install</userinput></screen>
 
     <para os="g">Move the Ncurses static libraries to the proper location:</para>
 
-<screen os="h"><userinput>mv -v ${CLFS}/lib/lib{panelw,menuw,formw,ncursesw,ncurses++w}.a \
-    ${CLFS}/usr/lib</userinput></screen>
+<screen os="h"><userinput>mv -v ${LFS}/lib/lib{panel,menu,form,ncurses,ncurses++,curses}.a ${LFS}/usr/lib</userinput></screen>
 
     <para os="i">Create symlinks in <filename class="directory">/usr/lib:</filename></para>
 
-<screen os="j"><userinput>rm -v ${CLFS}/lib/lib{ncursesw,menuw,panelw,formw}.so
-ln -sfv ../../lib/libncursesw.so.&ncurses-version2; ${CLFS}/usr/lib/libncursesw.so
-ln -sfv ../../lib/libmenuw.so.&ncurses-version2; ${CLFS}/usr/lib/libmenuw.so
-ln -sfv ../../lib/libpanelw.so.&ncurses-version2; ${CLFS}/usr/lib/libpanelw.so
-ln -sfv ../../lib/libformw.so.&ncurses-version2; ${CLFS}/usr/lib/libformw.so</userinput></screen>
-
-   <para os="k">Now we will make our Ncurses compatible for older and non-widec compatible programs
-    can build properly:</para>
-
-<screen os="l"><userinput>for lib in curses ncurses form panel menu ; do
-        echo "INPUT(-l${lib}w)" > ${CLFS}/usr/lib/lib${lib}.so
-        ln -sfv lib${lib}w.a ${CLFS}/usr/lib/lib${lib}.a
-done
-ln -sfv libncursesw.so ${CLFS}/usr/lib/libcursesw.so
-ln -sfv libncursesw.a ${CLFS}/usr/lib/libcursesw.a
-ln -sfv libncurses++w.a ${CLFS}/usr/lib/libncurses++.a
-ln -sfv ncursesw5-config ${CLFS}/usr/bin/ncurses5-config</userinput></screen>
-
-    <para os="m">Now we will create a symlink for /usr/share/terminfo in
-    <filename class="directory">/usr/lib</filename> for compatibility:</para>
-
-<screen os="n"><userinput>ln -sfv ../share/terminfo ${CLFS}/usr/lib/terminfo</userinput></screen>
+<screen os="j"><userinput>rm -v ${LFS}/lib/lib{ncurses,menu,panel,form,curses}.so
+ln -svf ../../lib/libncurses.so.5 ${LFS}/usr/lib/libcurses.so
+ln -svf ../../lib/libncurses.so.5 ${LFS}/usr/lib/libncurses.so
+ln -svf ../../lib/libmenu.so.5 ${LFS}/usr/lib/libmenu.so
+ln -svf ../../lib/libpanel.so.5 ${LFS}/usr/lib/libpanel.so
+ln -svf ../../lib/libform.so.5 ${LFS}/usr/lib/libform.so</userinput></screen>
+
+    <para os="k">Give the Ncurses libraries execute permissions:</para>
+
+<screen os="l"><userinput>chmod -v 755 ${LFS}/lib/lib{panel,menu,form,ncurses}.so.&ncurses-version;</userinput></screen>
 
   </sect2>
@@ -94,8 +68,8 @@
       <seglistitem>
         <seg>captoinfo (link to tic), clear, infocmp, infotocap (link to tic),
-        ncursesw5-config, reset (link to tset), tabs, tic, toe, tput, and tset</seg>
-        <seg>libcursesw.so (link to libncursesw.so), libformw.[a,so],
-        libmenuw.[a,so], libncurses++w.a, libncursesw.[a,so], and
-        libpanelw.[a,so]</seg>
+        reset (link to tset), tack, tic, toe, tput, and tset</seg>
+        <seg>libcurses.[a,so] (link to libncurses.[a,so]), libform.[a,so],
+        libmenu.[a,so], libncurses++.a, libncurses.[a,so], and
+        libpanel.[a,so]</seg>
       </seglistitem>
     </segmentedlist>
@@ -146,14 +120,4 @@
       </varlistentry>
 
-      <varlistentry id="ncursesw5-config">
-        <term><command>ncursesw5-config</command></term>
-        <listitem>
-          <para>Provides configuration information for ncurses</para>
-          <indexterm zone="ch-system-ncurses ncursesw5-config">
-            <primary sortas="b-ncursesw5-config">ncursesw5-config</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
       <varlistentry id="reset">
         <term><command>reset</command></term>
@@ -166,10 +130,11 @@
       </varlistentry>
 
-      <varlistentry id="tabs">
-        <term><command>tabs</command></term>
-        <listitem>
-          <para>Sets and clears tab stops on a terminal</para>
-          <indexterm zone="ch-system-ncurses tabs">
-            <primary sortas="b-tabs">tabs</primary>
+      <varlistentry id="tack">
+        <term><command>tack</command></term>
+        <listitem>
+          <para>The terminfo action checker; it is mainly used to test the
+          accuracy of an entry in the terminfo database</para>
+          <indexterm zone="ch-system-ncurses tack">
+            <primary sortas="b-tack">tack</primary>
           </indexterm>
         </listitem>
@@ -222,16 +187,16 @@
       </varlistentry>
 
-      <varlistentry id="libcursesw">
-        <term><filename class="libraryfile">libcursesw</filename></term>
-        <listitem>
-          <para>A link to <filename>libncursesw</filename></para>
-          <indexterm zone="ch-system-ncurses libcursesw">
-            <primary sortas="c-libcursesw">libcursesw</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="libncursesw">
-        <term><filename class="libraryfile">libncursesw</filename></term>
+      <varlistentry id="libcurses">
+        <term><filename class="libraryfile">libcurses</filename></term>
+        <listitem>
+          <para>A link to <filename>libncurses</filename></para>
+          <indexterm zone="ch-system-ncurses libcurses">
+            <primary sortas="c-libcurses">libcurses</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libncurses">
+        <term><filename class="libraryfile">libncurses</filename></term>
         <listitem>
           <para>Contains functions to display text in many complex ways on a
@@ -239,36 +204,36 @@
           menu displayed during the kernel's
           <command>make menuconfig</command></para>
-          <indexterm zone="ch-system-ncurses libncursesw">
-            <primary sortas="c-libncursesw">libncursesw</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="libformw">
-        <term><filename class="libraryfile">libformw</filename></term>
+          <indexterm zone="ch-system-ncurses libncurses">
+            <primary sortas="c-libncurses">libncurses</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libform">
+        <term><filename class="libraryfile">libform</filename></term>
         <listitem>
           <para>Contains functions to implement forms</para>
-          <indexterm zone="ch-system-ncurses libformw">
-            <primary sortas="c-libform">libformw</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="libmenuw">
-        <term><filename class="libraryfile">libmenuw</filename></term>
+          <indexterm zone="ch-system-ncurses libform">
+            <primary sortas="c-libform">libform</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libmenu">
+        <term><filename class="libraryfile">libmenu</filename></term>
         <listitem>
           <para>Contains functions to implement menus</para>
-          <indexterm zone="ch-system-ncurses libmenuw">
-            <primary sortas="c-libmenuw">libmenuw</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="libpanelw">
-        <term><filename class="libraryfile">libpanelw</filename></term>
+          <indexterm zone="ch-system-ncurses libmenu">
+            <primary sortas="c-libmenu">libmenu</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libpanel">
+        <term><filename class="libraryfile">libpanel</filename></term>
         <listitem>
           <para>Contains functions to implement panels</para>
-          <indexterm zone="ch-system-ncurses libpanelw">
-            <primary sortas="c-libpanelw">libpanelw</primary>
+          <indexterm zone="ch-system-ncurses libpanel">
+            <primary sortas="c-libpanel">libpanel</primary>
           </indexterm>
         </listitem>
Index: BOOK/final-system/common/patch.xml
===================================================================
--- BOOK/final-system/common/patch.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/patch.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -24,31 +24,18 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Patch</title>
 
-    <para os="a">Configure would like to hardcode the full path to
-    <command>ed</command>. When <command>ed</command> isn't found it falls
-    back on just "<command>ed</command>". Since <command>ed</command>
-    isn't installed by default but it may be installed on the host, Lets
-    force the fallback value.</para>
+    <para os="a">Prepare Patch for compilation:</para>
 
-<screen os="b"><userinput>cat &gt; config.cache &lt;&lt; EOF
-ac_cv_path_ed_PROGRAM=ed
-EOF</userinput></screen>
+<screen os="b"><userinput>./configure --prefix=/usr --host=${LFS_TARGET}</userinput></screen>
 
-    <para os="c">Prepare Patch for compilation:</para>
+    <para os="c">Compile the package:</para>
 
-<screen os="d"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr --cache-file=config.cache</userinput></screen>
+<screen os="d"><userinput>make</userinput></screen>
 
-    <para os="e">Compile the package:</para>
+    <para os="e">Install the package:</para>
 
-<screen os="f"><userinput>make</userinput></screen>
-
-    <para os="g">Install the package:</para>
-
-<screen os="h"><userinput>make prefix=${CLFS}/usr install</userinput></screen>
+<screen os="f"><userinput>make prefix=${LFS} install</userinput></screen>
 
   </sect2>
Index: BOOK/final-system/common/perl.xml
===================================================================
--- BOOK/final-system/common/perl.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/final-system/common/perl.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,402 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-perl" role="wrap">
+  <?dbhtml filename="perl.html"?>
+
+  <title>Perl-&perl-version;</title>
+
+  <indexterm zone="ch-system-perl">
+    <primary sortas="a-Perl">Perl</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Perl package contains the Practical Extraction and Report
+    Language.</para>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Perl</title>
+
+    <para os="w1"><important>Information on cross-compiling perl has not been added yet.</important></para>
+
+    <para os="a00">Before starting to configure, create a basic
+    <filename>/etc/hosts</filename> file which will be referenced in one
+    of Perl's configuration files as well as being used used by the testsuite
+    if you run that.</para>
+
+<screen os="a01"><userinput>echo "127.0.0.1 localhost $(hostname)" &gt; /etc/hosts</userinput></screen>
+
+    <para os="a">To have full control over the way Perl is set up, run the
+    interactive <command>Configure</command> script and hand-pick the way
+    this package is built. If the defaults it auto-detects are suitable,
+    prepare Perl for compilation with:</para>
+
+<screen os="b"><userinput>./configure.gnu --prefix=/usr \
+   -Dman1dir=/usr/share/man/man1 \
+   -Dman3dir=/usr/share/man/man3 \
+   -Dpager="/bin/less -isR"</userinput></screen>
+
+    <variablelist os="c">
+      <title>The meaning of the configure option:</title>
+
+      <varlistentry os="c1">
+        <term><parameter>-Dpager="/bin/less -isR"</parameter></term>
+        <listitem>
+          <para>This corrects an error in the way that <command>perldoc</command>
+          invokes the <command>less</command> program.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry os="c2">
+        <term><parameter>-Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3</parameter></term>
+        <listitem>
+          <para>Since Groff is not installed yet,
+          <command>configure.gnu</command> thinks that we do not want
+          man pages for Perl. Issuing these parameters overrides this decision.</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+
+    <para os="d">Compile the package:</para>
+
+<screen os="e"><userinput>make</userinput></screen>
+
+    <para os="h">To test the results, issue:
+    <userinput>make test</userinput>.</para>
+
+    <para os="j">Install the package:</para>
+
+<screen os="k"><userinput>make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 id="contents-perl" role="content">
+    <title>Contents of Perl</title>
+
+    <segmentedlist>
+      <segtitle>Installed programs</segtitle>
+      <segtitle>Installed libraries</segtitle>
+
+      <seglistitem>
+        <seg>a2p, c2ph, dprofpp, enc2xs, find2perl, h2ph, h2xs, libnetcfg,
+        perl, perl&perl-version; (link to perl), perlbug, perlcc, perldoc,
+        perlivp, piconv, pl2pm, pod2html, pod2latex, pod2man, pod2text,
+        pod2usage, podchecker, podselect, psed (link to s2p), pstruct (link
+        to c2ph), s2p, splain, and xsubpp</seg>
+        <seg>Several hundred which cannot all be listed here</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="a2p">
+        <term><command>a2p</command></term>
+        <listitem>
+          <para>Translates awk to Perl</para>
+          <indexterm zone="ch-system-perl a2p">
+            <primary sortas="b-a2p">a2p</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="c2ph">
+        <term><command>c2ph</command></term>
+        <listitem>
+          <para>Dumps C structures as generated from
+          <command>cc -g -S</command></para>
+          <indexterm zone="ch-system-perl c2ph">
+            <primary sortas="b-c2ph">c2ph</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="dprofpp">
+        <term><command>dprofpp</command></term>
+        <listitem>
+          <para>Displays Perl profile data</para>
+          <indexterm zone="ch-system-perl dprofpp">
+            <primary sortas="b-dprofpp">dprofpp</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="en2cxs">
+        <term><command>en2cxs</command></term>
+        <listitem>
+          <para>Builds a Perl extension for the Encode module from either
+          Unicode Character Mappings or Tcl Encoding Files</para>
+          <indexterm zone="ch-system-perl en2cxs">
+            <primary sortas="b-en2cxs">en2cxs</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="find2perl">
+        <term><command>find2perl</command></term>
+        <listitem>
+          <para>Translates <command>find</command> commands to Perl</para>
+          <indexterm zone="ch-system-perl find2perl">
+            <primary sortas="b-find2perl">find2perl</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="h2ph">
+        <term><command>h2ph</command></term>
+        <listitem>
+          <para>Converts <filename class="extension">.h</filename> C header
+          files to <filename class="extension">.ph</filename> Perl header
+          files</para>
+          <indexterm zone="ch-system-perl h2ph">
+            <primary sortas="b-h2ph">h2ph</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="h2xs">
+        <term><command>h2xs</command></term>
+        <listitem>
+          <para>Converts <filename class="extension">.h</filename> C header
+          files to Perl extensions</para>
+          <indexterm zone="ch-system-perl h2xs">
+            <primary sortas="b-h2xs">h2xs</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libnetcfg">
+        <term><command>libnetcfg</command></term>
+        <listitem>
+          <para>Can be used to configure the
+          <filename class="libraryfile">libnet</filename></para>
+          <indexterm zone="ch-system-perl libnetcfg">
+            <primary sortas="b-libnetcfg">libnetcfg</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="perl">
+        <term><command>perl</command></term>
+        <listitem>
+          <para>Combines some of the best features of C, <command>sed</command>,
+          <command>awk</command> and <command>sh</command> into a single
+          swiss-army language</para>
+          <indexterm zone="ch-system-perl perl">
+            <primary sortas="b-perl">perl</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="perl-version">
+        <term><command>perl&perl-version;</command></term>
+        <listitem>
+          <para>A hard link to <command>perl</command></para>
+          <indexterm zone="ch-system-perl perl-version">
+            <primary sortas="b-perl&perl-version;">perl&perl-version;</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="perlbug">
+        <term><command>perlbug</command></term>
+        <listitem>
+          <para>Used to generate bug reports about Perl, or the modules that come
+          with it, and mail them</para>
+          <indexterm zone="ch-system-perl perlbug">
+            <primary sortas="b-perlbug">perlbug</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="perlcc">
+        <term><command>perlcc</command></term>
+        <listitem>
+          <para>Generates executables from Perl programs</para>
+          <indexterm zone="ch-system-perl perlcc">
+            <primary sortas="b-perlcc">perlcc</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="perldoc">
+        <term><command>perldoc</command></term>
+        <listitem>
+          <para>Displays a piece of documentation in pod format that is embedded
+          in the Perl installation tree or in a Perl script</para>
+          <indexterm zone="ch-system-perl perldoc">
+            <primary sortas="b-perldoc">perldoc</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="perlivp">
+        <term><command>perlivp</command></term>
+        <listitem>
+          <para>The Perl Installation Verification Procedure; it can be used to
+          verify that Perl and its libraries have been installed
+          correctly</para>
+          <indexterm zone="ch-system-perl perlivp">
+            <primary sortas="b-perlivp">perlivp</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="piconv">
+        <term><command>piconv</command></term>
+        <listitem>
+          <para>A Perl version of the character encoding converter
+          <command>iconv</command></para>
+          <indexterm zone="ch-system-perl piconv">
+            <primary sortas="b-piconv">piconv</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="pl2pm">
+        <term><command>pl2pm</command></term>
+        <listitem>
+          <para>A rough tool for converting Perl4
+          <filename class="extension">.pl</filename> files to Perl5
+          <filename class="extension">.pm</filename> modules</para>
+          <indexterm zone="ch-system-perl pl2pm">
+            <primary sortas="b-pl2pm">pl2pm</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="pod2html">
+        <term><command>pod2html</command></term>
+        <listitem>
+          <para>Converts files from pod format to HTML format</para>
+          <indexterm zone="ch-system-perl pod2html">
+            <primary sortas="b-pod2html">pod2html</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="pod2latex">
+        <term><command>pod2latex</command></term>
+        <listitem>
+          <para>Converts files from pod format to LaTeX format</para>
+          <indexterm zone="ch-system-perl pod2latex">
+            <primary sortas="b-pod2latex">pod2latex</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="pod2man">
+        <term><command>pod2man</command></term>
+        <listitem>
+          <para>Converts pod data to formatted *roff input</para>
+          <indexterm zone="ch-system-perl pod2man">
+            <primary sortas="b-pod2man">pod2man</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="pod2text">
+        <term><command>pod2text</command></term>
+        <listitem>
+          <para>Converts pod data to formatted ASCII text</para>
+          <indexterm zone="ch-system-perl pod2text">
+            <primary sortas="b-pod2text">pod2text</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="pod2usage">
+        <term><command>pod2usage</command></term>
+        <listitem>
+          <para>Prints usage messages from embedded pod docs in files</para>
+          <indexterm zone="ch-system-perl pod2usage">
+            <primary sortas="b-pod2usage">pod2usage</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="podchecker">
+        <term><command>podchecker</command></term>
+        <listitem>
+          <para>Checks the syntax of pod format documentation files</para>
+          <indexterm zone="ch-system-perl podchecker">
+            <primary sortas="b-podchecker">podchecker</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="podselect">
+        <term><command>podselect</command></term>
+        <listitem>
+          <para>Displays selected sections of pod documentation</para>
+          <indexterm zone="ch-system-perl podselect">
+            <primary sortas="b-podselect">podselect</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="psed">
+        <term><command>psed</command></term>
+        <listitem>
+          <para>A Perl version of the stream editor <command>sed</command></para>
+          <indexterm zone="ch-system-perl psed">
+            <primary sortas="b-psed">psed</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="pstruct">
+        <term><command>pstruct</command></term>
+        <listitem>
+          <para>Dumps C structures as generated from <command>cc -g -S</command>
+          stabs</para>
+          <indexterm zone="ch-system-perl pstruct">
+            <primary sortas="b-pstruct">pstruct</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="s2p">
+        <term><command>s2p</command></term>
+        <listitem>
+          <para>Translates <command>sed</command> to Perl</para>
+          <indexterm zone="ch-system-perl s2p">
+            <primary sortas="b-s2p">s2p</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="splain">
+        <term><command>splain</command></term>
+        <listitem>
+          <para>Is used to force verbose warning diagnostics in Perl</para>
+          <indexterm zone="ch-system-perl splain">
+            <primary sortas="b-splain">splain</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="xsubpp">
+        <term><command>xsubpp</command></term>
+        <listitem>
+          <para>Converts Perl XS code into C code</para>
+          <indexterm zone="ch-system-perl xsubpp">
+            <primary sortas="b-xsubpp">xsubpp</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
Index: BOOK/final-system/common/pkgmgt.xml
===================================================================
--- BOOK/final-system/common/pkgmgt.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/pkgmgt.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -21,5 +21,5 @@
 
   <para>Some reasons why no specific package manager is recommended in
-  CLFS or CBLFS include:</para>
+  CLFS or BLFS include:</para>
 
   <itemizedlist>
@@ -44,5 +44,5 @@
 
     <para>A Package Manager makes it easy to upgrade to newer versions when they
-    are released. Generally the instructions in CLFS and CBLFS can be
+    are released. Generally the instructions in the CLFS and BLFS Book can be
     used to upgrade to the newer versions. Here are some points that you should
     be aware of when upgrading packages, especially on a running system.</para>
@@ -50,12 +50,12 @@
     <itemizedlist>
       <listitem>
-        <para>If one of the toolchain packages (EGLIBC, GCC or Binutils) needs
+        <para>If one of the toolchain packages (Glibc, GCC or Binutils) needs
         to be upgraded to a newer minor version, it is safer to
         rebuild CLFS. Though you <emphasis>may</emphasis> be able to get by
         rebuilding all the packages in their dependency order, we do not
-        recommend it. For example, if eglibc-2.2.x needs to be updated to
-        eglibc-2.3.x, it is safer to rebuild. For micro version updates, a
+        recommend it. For example, if glibc-2.2.x needs to be updated to
+        glibc-2.3.x, it is safer to rebuild. For micro version updates, a
         simple reinstallation usually works, but is not guaranteed. For
-        example, upgrading from eglibc-2.3.4 to glibc-2.3.5 will not
+        example, upgrading from glibc-2.3.4 to glibc-2.3.5 will not
         usually cause any problems.</para>
       </listitem>
@@ -222,6 +222,19 @@
       Standard Base Specification</ulink>), pkg-utils, Debian's apt, and
       Gentoo's Portage system.  A hint describing how to adopt this style of
-      package management for CLFS systems is located at <ulink
-      url="&hints-root;Fakeroot"/>.</para>
+      package management for LFS systems is located at <ulink
+      url="&hints-root;/fakeroot.txt"/>.</para>
+
+    </sect3>
+
+    <sect3>
+      <title>User Based Management</title>
+
+      <para>This scheme, unique to the LFS project, was devised by Matthias Benkmann, and is
+      available from the <ulink url="&hints-root;">Hints Project</ulink>. In
+      this scheme, each package is installed as a separate user into the
+      standard locations. Files belonging to a package are easily identified by
+      checking the user ID. The features and shortcomings of this approach are
+      too complex to describe in this section. For the details please see the
+      hint at <ulink url="&hints-root;/more_control_and_pkg_man.txt"/>.</para>
 
     </sect3>
Index: OK/final-system/common/ppl.xml
===================================================================
--- BOOK/final-system/common/ppl.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,132 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-system-ppl" role="wrap">
-  <?dbhtml filename="ppl.html"?>
-
-  <title>PPL-&ppl-version;</title>
-
-  <indexterm zone="ch-system-ppl">
-    <primary sortas="a-PPL">PPL</primary>
-    <secondary>temporary system</secondary>
-  </indexterm>
-
-  <sect2 role="package">
-    <title/>
-
-    <para>The Parma Polyhedra Library (PPL) provides numerical abstractions
-    especially targeted at applications in the field of analysis and
-    verification of complex systems.  CLooG-PPL requires this library.</para>
-
-  </sect2>
-
-  &env-target;
-
-  <sect2 role="installation">
-    <title>Installation of PPL</title>
-
-    <para os="a">Prepare PPL for compilation:</para>
-
-<screen os="b"><userinput>CPPFLAGS=-fexceptions \
-    ./configure --prefix=/usr \
-    --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --with-libgmp-prefix=${CLFS}/usr \
-    --with-libgmpxx-prefix=${CLFS}/usr \
-    --enable-shared --disable-optimization \
-    --enable-check=quick</userinput></screen>
-
-    <para os="c">Compile the package:</para>
-
-<screen os="d"><userinput>make</userinput></screen>
-
-    <para os="h">Install the package:</para>
-
-<screen os="i"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
-
-    <para os="j">At this time, Libtool does not support searching a sysroot
-    for libraries. Leaving the .la files in place will cause Libtool to look
-    in the wrong place for libraries. These files are not required for
-    linking on Linux. Remove them with the following command:</para>
-
-<screen os="k"><userinput>rm -v ${CLFS}/usr/lib/lib{ppl,ppl_c,pwl}.la</userinput></screen>
-
-  </sect2>
-
-  <sect2 id="contents-ppl" role="content">
-    <title>Contents of PPL</title>
-
-    <segmentedlist>
-      <segtitle>Installed Programs</segtitle>
-      <segtitle>Installed Libraries</segtitle>
-
-      <seglistitem>
-        <seg>ppl-config, ppl_lcdd</seg>
-        <seg>libppl.[a,so], libppl_c.[a,so], libpwl.[a,so]</seg>
-      </seglistitem>
-    </segmentedlist>
-
-    <variablelist>
-      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
-      <?dbfo list-presentation="list"?>
-      <?dbhtml list-presentation="table"?>
-
-      <varlistentry id="ppl-config">
-        <term><command>ppl-config</command></term>
-        <listitem>
-          <para>Outputs information about the PPL installation</para>
-          <indexterm zone="ch-system-ppl ppl-config">
-            <primary sortas="b-ppl-config">ppl-config</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="ppl_lcdd">
-        <term><command>ppl_lcdd</command></term>
-        <listitem>
-          <para>Reads an H-representation of a polyhedron and generates a
-          V-representation of the same polyhedron</para>
-          <indexterm zone="ch-system-ppl ppl_lcdd">
-            <primary sortas="b-ppl_lcdd">ppl_lcdd</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="libppl">
-        <term><filename class="libraryfile">libppl</filename></term>
-        <listitem>
-          <para>The Parma Polyhedra Library (PPL).</para>
-          <indexterm zone="ch-system-ppl libppl">
-            <primary sortas="b-libppl">libppl</primary>
-          </indexterm>
-	    </listitem>
-      </varlistentry>
-
-      <varlistentry id="libppl_c">
-        <term><filename class="libraryfile">libppl_c</filename></term>
-        <listitem>
-          <para>The Parma Polyhedra Library bindings for C.</para>
-          <indexterm zone="ch-system-ppl libppl_c">
-            <primary sortas="b-libppl_c">libppl_c</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="libpwl">
-        <term><filename class="libraryfile">libpwl</filename></term>
-        <listitem>
-          <para>The Parma Watchdog Library</para>
-          <indexterm zone="ch-system-ppl libpwl">
-            <primary sortas="b-libpwl">libpwl</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-    </variablelist>
-
-  </sect2>
-
-</sect1>
Index: BOOK/final-system/common/procps.xml
===================================================================
--- BOOK/final-system/common/procps.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/procps.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -23,39 +23,24 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Procps</title>
 
+    <para os="s1">The following sed stops the Makefile from trying to install
+    binaries owned by root and prevents ldconfig from being
+    run.</para>
+
+<screen os="s2"><userinput>cp -v Makefile{,.orig}
+sed -e "/^install  :=/s/--owner 0 --group 0//" \
+    -e "/^ldconfig :=/s/= ldconfig/=/" Makefile.orig &gt; Makefile</userinput></screen>
+
     <para os="a">Compile the package:</para>
 
-<screen os="b"><userinput>make CPPFLAGS= lib64=lib m64=</userinput></screen>
-
-    <para os="c">Install the package:</para>
-
-<screen os="d"><userinput>make DESTDIR=${CLFS} lib64=lib m64= ldconfig= \
-    install="install -D" install</userinput></screen>
-
-    <variablelist os="e">
-      <title>The meaning of the make options:</title>
-      <varlistentry>
-        <term><parameter>CPPFLAGS=</parameter></term>
-        <listitem>
-        <para>By default, procps tries to include the host system
-        ncurses headers, so we have to disable that.</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><parameter>lib64=lib</parameter></term>
-        <listitem>
-          <para>By default, procps will attempt to install into
-          <filename class="directory">/lib64</filename> if it
-          exists, even if the package is not built 64-bit. This option
-          forces procps to install its libraries into
-          <filename class="directory">/lib</filename> instead.</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
+<screen os="b"><userinput>make</userinput></screen>
+
+    <para os="c">This package does not come with a test suite.</para>
+
+    <para os="d">Install the package:</para>
+
+<screen os="e"><userinput>make DESTDIR=${LFS} lib64=lib install</userinput></screen>
 
   </sect2>
@@ -69,6 +54,6 @@
 
       <seglistitem>
-        <seg>free, kill, pgrep, pkill, pmap, ps, pwdx, skill, slabtop, snice, sysctl,
-        tload, top, uptime, vmstat, w, and watch</seg>
+        <seg>free, kill, pgrep, pkill, pmap, ps, skill, snice, sysctl, tload,
+        top, uptime, vmstat, w, and watch</seg>
         <seg>libproc.so</seg>
       </seglistitem>
@@ -141,14 +126,4 @@
       </varlistentry>
 
-      <varlistentry id="pwdx">
-        <term><command>pwdx</command></term>
-        <listitem>
-          <para>Reports the current working directory of a process</para>
-          <indexterm zone="ch-system-procps pwdx">
-            <primary sortas="b-pwdx">pwdx</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
       <varlistentry id="skill">
         <term><command>skill</command></term>
@@ -157,14 +132,4 @@
           <indexterm zone="ch-system-procps skill">
             <primary sortas="b-skill">skill</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="slabtop">
-        <term><command>slabtop</command></term>
-        <listitem>
-          <para>Displays detailed kernel slab cache information in real time</para>
-          <indexterm zone="ch-system-procps slabtop">
-            <primary sortas="b-slabtop">slabtop</primary>
           </indexterm>
         </listitem>
Index: BOOK/final-system/common/psmisc.xml
===================================================================
--- BOOK/final-system/common/psmisc.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/psmisc.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -23,23 +23,10 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Psmisc</title>
 
-    <para os="a1">When cross-compiling the <literal>AC_FUNC_MALLOC</literal>
-    macro will assume that the malloc provided is not GNU Compatible. The
-    following tells it that we do:</para>
-
-<screen os="a2"><userinput>cat &gt; config.cache &lt;&lt; EOF
-ac_cv_func_malloc_0_nonnull=yes
-ac_cv_func_realloc_0_nonnull=yes
-EOF</userinput></screen>
-
     <para os="a">Prepare Psmisc for compilation:</para>
 
-<screen os="b"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr --exec-prefix="" \
-    --cache-file=config.cache</userinput></screen>
+<screen os="b"><userinput>./configure --prefix=/usr --exec-prefix="" --host=${LFS_TARGET}</userinput></screen>
 
     <variablelist os="c">
@@ -53,5 +40,5 @@
           <filename class="directory">/usr/bin</filename>. This is the
           correct location according to the FHS, because some of the Psmisc
-          binaries are used by the CLFS-Bootscripts package.</para>
+          binaries are used by the LFS-Bootscripts package.</para>
         </listitem>
       </varlistentry>
@@ -64,5 +51,5 @@
     <para os="f">Install the package:</para>
 
-<screen os="g"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
+<screen os="g"><userinput>make install</userinput></screen>
 
     <para os="h">There is no reason for the <command>pstree</command> and
@@ -71,5 +58,5 @@
     class="directory">/usr/bin</filename>:</para>
 
-<screen os="i"><userinput>mv -v ${CLFS}/bin/pstree* ${CLFS}/usr/bin</userinput></screen>
+<screen os="i"><userinput>mv -v ${LFS}/bin/pstree* ${LFS}/usr/bin</userinput></screen>
 
     <para os="j">By default, Psmisc's <command>pidof</command> program is not installed.
@@ -79,5 +66,5 @@
     of Psmisc by creating the following symlink:</para>
 
-<screen os="k" role="nodump"><userinput>ln -sfv killall ${CLFS}/bin/pidof</userinput></screen>
+<screen os="k" role="nodump"><userinput>ln -sv killall ${LFS}/bin/pidof</userinput></screen>
 
   </sect2>
@@ -121,15 +108,4 @@
       </varlistentry>
 
-      <varlistentry id="oldfuser">
-        <term><command>oldfuser</command></term>
-        <listitem>
-          <para>Reports the Process IDs (PIDs) of processes that use the given
-          files or file systems</para>
-          <indexterm zone="ch-system-psmisc oldfuser">
-            <primary sortas="b-oldfuser">oldfuser</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
       <varlistentry id="pstree">
         <term><command>pstree</command></term>
Index: BOOK/final-system/common/readline.xml
===================================================================
--- BOOK/final-system/common/readline.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/readline.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -23,39 +23,44 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Readline</title>
 
     <para os="p1">The following patch contains updates from the maintainer. The
-    maintainer of Readline only releases these patches to fix serious issues:</para>
+    maintainer of Readline only releases these patches to fix serious issues.</para>
 
-<screen os="p2"><userinput>patch -Np1 -i ../&readline-branch_update-patch;</userinput></screen>
-
-    <para os="s1">This option forces Readline to link against the
-          <filename class="libraryfile">libncursesw</filename> library:</para>
-
-<screen os="s2"><userinput>sed -i 's:^SHLIB_LIBS=:SHLIB_LIBS=-lncursesw:' support/shobj-conf</userinput></screen>
+<screen os="p2"><userinput>patch -Np1 -i ../&readline-fixes-patch;</userinput></screen>
 
     <para os="a">Prepare Readline for compilation:</para>
 
-<screen os="b"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr --libdir=/lib</userinput></screen>
+<screen os="b"><userinput>./configure --prefix=/usr --libdir=/lib --host=${LFS_TARGET}</userinput></screen>
 
     <para os="c">Compile the package:</para>
 
-<screen os="d"><userinput>make</userinput></screen>
+<screen os="d"><userinput>make SHLIB_XLDFLAGS=-lncurses</userinput></screen>
 
-    <para os="e">Install the package:</para>
+    <variablelist os="e">
+      <title>The meaning of the make option:</title>
 
-<screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
+      <varlistentry>
+        <term><parameter>SHLIB_XLDFLAGS=-lncurses</parameter></term>
+        <listitem>
+          <para>This option forces Readline to link against the
+          <filename class="libraryfile">libncurses</filename> library.</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
 
-    <para os="h">Install the documentation:</para>
+    <para os="f">Install the package:</para>
 
-<screen os="i"><userinput>make DESTDIR=${CLFS} install-doc</userinput></screen>
+<screen os="g"><userinput>make DESTDIR=${LFS} install</userinput></screen>
+
+    <para os="h">Give Readline's dynamic libraries more appropriate
+    permissions:</para>
+
+<screen os="i"><userinput>chmod -v 755 ${LFS}/lib/lib{readline,history}.so*</userinput></screen>
 
     <para os="j">Now move the static libraries to a more appropriate location:</para>
 
-<screen os="k"><userinput>mv -v ${CLFS}/lib/lib{readline,history}.a ${CLFS}/usr/lib</userinput></screen>
+<screen os="k"><userinput>mv -v ${LFS}/lib/lib{readline,history}.a ${LFS}/usr/lib</userinput></screen>
 
     <para os="l">Next, remove the <filename class="extension">.so</filename>
@@ -63,7 +68,7 @@
     <filename class="directory">/usr/lib</filename>.</para>
 
-<screen os="m"><userinput>rm -v ${CLFS}/lib/lib{readline,history}.so
-ln -sfv ../../lib/libreadline.so.&readline-version2; ${CLFS}/usr/lib/libreadline.so
-ln -sfv ../../lib/libhistory.so.&readline-version2; ${CLFS}/usr/lib/libhistory.so</userinput></screen>
+<screen os="m"><userinput>rm -v ${LFS}/lib/lib{readline,history}.so
+ln -svf ../../lib/libreadline.so.5 ${LFS}/usr/lib/libreadline.so
+ln -svf ../../lib/libhistory.so.5 ${LFS}/usr/lib/libhistory.so</userinput></screen>
 
   </sect2>
Index: OK/final-system/common/rsyslog.xml
===================================================================
--- BOOK/final-system/common/rsyslog.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,174 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-system-rsyslog" xreflabel="rsyslog" role="wrap">
-  <?dbhtml filename="rsyslog.html"?>
-
-  <title>Rsyslog-&rsyslog-version;</title>
-
-  <indexterm zone="ch-system-rsyslog">
-    <primary sortas="a-rsyslog">rsyslog</primary>
-  </indexterm>
-
-  <sect2 role="package">
-    <title/>
-
-    <para>The rsyslog package contains programs for logging system messages,
-    such as those given by the kernel when unusual things happen.</para>
-
-  </sect2>
-
-  &env-target;
-
-  <sect2 role="installation">
-    <title>Installation of Rsyslog</title>
-
-    <para os="cc1">When Cross Compiling the configure script does not
-    does not determine the correct values for the following, Set the values
-    manually:</para>
-
-<screen os="cc1"><userinput>cat &gt; config.cache &lt;&lt; EOF
-ac_cv_func_malloc_0_nonnull=yes
-ac_cv_func_realloc_0_nonnull=yes
-EOF</userinput></screen>
-
-    <para os="a">Prepare Rsyslog for compilation:</para>
-
-<screen os="b"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr --sbindir=/sbin \
-    --cache-file=config.cache</userinput></screen>
-
-    <para os="c">Compile the package:</para>
-
-<screen os="d"><userinput>make</userinput></screen>
-
-    <para os="e">This package does not come with a test suite.</para>
-
-    <para os="f">Install the package:</para>
-
-<screen os="g"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
-
-    <para os="h">Create a directory for expansion snippets:</para>
-
-<screen os="i"><userinput>install -dv ${CLFS}/etc/rsyslog.d</userinput></screen>
-
-  </sect2>
-
-  <sect2 id="conf-rsyslog" role="configuration">
-    <title>Configuring rsyslog</title>
-
-    <indexterm zone="conf-rsyslog">
-      <primary sortas="a-rsyslog">rsyslog</primary>
-    <secondary>configuring</secondary></indexterm>
-
-    <indexterm zone="conf-rsyslog">
-      <primary sortas="e-/etc/rsyslog.conf">/etc/rsyslog.conf</primary>
-    </indexterm>
-
-    <para>Create a new <filename>/etc/rsyslog.conf</filename> file by running
-    the following:</para>
-
-<screen><userinput>cat &gt; ${CLFS}/etc/rsyslog.conf &lt;&lt; "EOF"
-<literal># Begin /etc/rsyslog.conf
-
-# CLFS configuration of rsyslog. For more info use man rsyslog.conf
-
-#######################################################################
-# Rsyslog Modules
-
-# Support for Local System Logging
-$ModLoad imuxsock.so
-
-# Support for Kernel Logging
-$ModLoad imklog.so
-
-#######################################################################
-# Global Options
-
-# Use traditional timestamp format.
-$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
-
-# Set the default permissions for all log files.
-$FileOwner root
-$FileGroup root
-$FileCreateMode 0640
-$DirCreateMode 0755
-
-# Provides UDP reception
-$ModLoad imudp
-$UDPServerRun 514
-
-# Disable Repating of Entries
-$RepeatedMsgReduction on
-
-#######################################################################
-# Include Rsyslog Config Snippets
-
-$IncludeConfig /etc/rsyslog.d/*.conf
-
-#######################################################################
-# Standard Log Files
-
-auth,authpriv.*                        /var/log/auth.log
-*.*;auth,authpriv.none                -/var/log/syslog
-daemon.*                        -/var/log/daemon.log
-kern.*                                -/var/log/kern.log
-lpr.*                                -/var/log/lpr.log
-mail.*                                -/var/log/mail.log
-user.*                                -/var/log/user.log
-
-# Catch All Logs
-*.=debug;\
-        auth,authpriv.none;\
-        news.none;mail.none        -/var/log/debug
-*.=info;*.=notice;*.=warn;\
-        auth,authpriv.none;\
-        cron,daemon.none;\
-        mail,news.none                -/var/log/messages
-
-# Emergency are shown to everyone
-*.emerg                                *
-
-# End /etc/rsyslog.conf</literal>
-EOF</userinput></screen>
-
-  </sect2>
-
-  <sect2 id="contents-rsyslog" role="content">
-    <title>Contents of rsyslog</title>
-
-    <segmentedlist>
-      <segtitle>Installed programs</segtitle>
-
-      <seglistitem>
-        <seg>rsyslogd</seg>
-      </seglistitem>
-    </segmentedlist>
-
-    <variablelist>
-      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
-      <?dbfo list-presentation="list"?>
-      <?dbhtml list-presentation="table"?>
-
-      <varlistentry id="rsyslogd">
-        <term><command>rsyslogd</command></term>
-        <listitem>
-          <para>Logs the messages that system programs offer for logging.
-          Every logged message contains at least a date stamp and a hostname,
-          and normally the program's name too, but that depends on how
-          trusting the logging daemon is told to be.</para>
-          <indexterm zone="ch-system-rsyslog rsyslogd">
-            <primary sortas="b-rsyslogd">syslogd</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-    </variablelist>
-
-  </sect2>
-
-</sect1>
Index: BOOK/final-system/common/sed.xml
===================================================================
--- BOOK/final-system/common/sed.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/sed.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -22,6 +22,4 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Sed</title>
@@ -29,22 +27,26 @@
     <para os="a">Prepare Sed for compilation:</para>
 
-<screen os="b"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr --bindir=/bin</userinput></screen>
+<screen os="b"><userinput>./configure --prefix=/usr --bindir=/bin \
+    --host=${LFS_TARGET} --enable-html</userinput></screen>
 
-    <para os="c">Compile the package:</para>
+    <variablelist os="c">
+      <title>The meaning of the new configure option:</title>
 
-<screen os="d"><userinput>make</userinput></screen>
+      <varlistentry>
+        <term><parameter>--enable-html</parameter></term>
+        <listitem>
+          <para>This option tells Sed to build and install its HTML
+          documentation.</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
 
-    <para os="e">Build the HTML documentation:</para>
+    <para os="d">Compile the package:</para>
 
-<screen os="f"><userinput>make html</userinput></screen>
+<screen os="e"><userinput>make</userinput></screen>
 
-    <para os="g">Install the package:</para>
+    <para os="f">Install the package:</para>
 
-<screen os="h"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
-
-    <para os="i">Install the HTML documentation:</para>
-
-<screen os="j"><userinput>make -C doc DESTDIR=${CLFS} install-html</userinput></screen>
+<screen os="g"><userinput>make DESTDIR=${LFS} install</userinput></screen>
 
   </sect2>
Index: BOOK/final-system/common/shadow.xml
===================================================================
--- BOOK/final-system/common/shadow.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/shadow.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -23,6 +23,4 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Shadow</title>
@@ -30,5 +28,5 @@
     <note os="a">
       <para>If you would like to enforce the use of strong passwords,
-      refer to <ulink url="&cblfs-root;index.php/Cracklib"/>
+      refer to <ulink url="&blfs-root;view/svn/postlfs/cracklib.html"/>
       for installing Cracklib prior to building Shadow. Then add
       <parameter>--with-libcrack</parameter> to the <command>configure</command>
@@ -39,35 +37,27 @@
     cannot be run when cross-compiling:</para>
 
-<screen os="c"><userinput>cat &gt; config.cache &lt;&lt; EOF
-ac_cv_func_setpgrp_void=yes
-EOF</userinput></screen>
+<screen os="c"><userinput>echo "ac_cv_func_setpgrp_void=yes" &gt; config.cache</userinput></screen>
 
     <para os="d">Prepare Shadow for compilation:</para>
 
-<screen os="e"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --sysconfdir=/etc --without-libpam \
-    --without-audit --without-selinux \
-    --cache-file=config.cache</userinput></screen>
+<screen os="e"><userinput>./configure --libdir=/lib --enable-shared \
+    --without-libpam --without-audit --without-selinux \
+    --host=${LFS_TARGET} --cache-file=config.cache</userinput></screen>
 
 <para os="f">The meaning of the configure options:</para>
 
   <variablelist os="g">
-    <varlistentry>
-      <term><parameter>--sysconfdir=/etc</parameter></term>
-      <listitem><para>Tells Shadow to install its configuration files into
-      /etc, rather than /usr/etc.</para></listitem>
-    </varlistentry>
     <varlistentry>
       <term><parameter>--without-libpam</parameter></term>
       <listitem><para>Support for Linux-PAM is enabled by default in Shadow,
-      however PAM is not installed on a base CLFS system, so this switch
+      however PAM is not installed on a base LFS system, so this switch
       disables PAM support in Shadow. For instructions to install PAM and
       link Shadow to it, you can look at
-      <ulink url="&cblfs-root;index.php/Linux-PAM"/>.</para></listitem>
+      <ulink url="&blfs-root;view/svn/postlfs/shadow.html"/>.</para></listitem>
     </varlistentry>
     <varlistentry>
       <term><parameter>--without-audit</parameter></term>
       <listitem><para>Support for auditing is enabled by default, but a
-      library that it needs is not installed in a base CLFS system. This
+      a library that it needs is not installed in a base LFS system. This
       switch disables auditing support.</para></listitem>
     </varlistentry>
@@ -75,5 +65,5 @@
       <term><parameter>--without-selinux</parameter></term>
       <listitem><para>Support for selinux is enabled by default, but selinux
-      is not built in a base CLFS system and configure will fail without this
+      is not built in a base LFS system and configure will fail without this
       switch.</para></listitem>
     </varlistentry>
@@ -83,11 +73,6 @@
     program and its man pages, as Coreutils provides a better version:</para>
 
-<screen os="i"><userinput>cp src/Makefile{,.orig}
-sed 's/groups$(EXEEXT) //' src/Makefile.orig &gt; src/Makefile
-for mkf in $(find man -name Makefile)
-do
-  cp ${mkf}{,.orig}
-  sed -e '/groups.1.xml/d' -e 's/groups.1 //' ${mkf}.orig &gt; ${mkf}
-done</userinput></screen>
+<screen os="i"><userinput>sed -i 's/groups$(EXEEXT) //' src/Makefile
+sed -i '/groups/d' man/Makefile</userinput></screen>
 
     <para os="j">Compile the package:</para>
@@ -97,5 +82,19 @@
     <para os="l">Install the package:</para>
 
-<screen os="m"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
+<screen os="m"><userinput>make DESTDIR=${LFS} install</userinput></screen>
+
+    <para id="shadow-limits-login_access" os="n">Shadow uses two files to configure
+    authentication settings for the system. Install these two configuration
+    files:</para>
+
+    <indexterm zone="shadow-limits-login_access" os="o">
+      <primary sortas="e-/etc/limits">/etc/limits</primary>
+    </indexterm>
+
+    <indexterm zone="shadow-limits-login_access" os="p">
+      <primary sortas="e-/etc/login.access">/etc/login.access</primary>
+    </indexterm>
+
+<screen os="q"><userinput>cp -v etc/{limits,login.access} ${LFS}/etc</userinput></screen>
 
     <para id="shadow-login_defs" os="r">Instead of using the default
@@ -105,7 +104,7 @@
     obsolete <filename class="directory">/var/spool/mail</filename> location
     for user mailboxes that Shadow uses by default to the <filename
-    class="directory">/var/mail</filename> location used currently. Use the
-    following sed command to make these changes to the appropriate
-    configuration file:</para>
+    class="directory">/var/mail</filename> location used currently. Both of
+    these can be accomplished by changing the relevant configuration file
+    while copying it to its destination:</para>
 
     <indexterm zone="shadow-login_defs" os="s">
@@ -113,8 +112,7 @@
     </indexterm>
 
-<screen os="t"><userinput>cp ${CLFS}/etc/login.defs login.defs.orig
-sed -e's@#MD5_CRYPT_ENAB.no@MD5_CRYPT_ENAB yes@' \
+<screen os="t"><userinput>sed -e's@#MD5_CRYPT_ENAB.no@MD5_CRYPT_ENAB yes@' \
     -e 's@/var/spool/mail@/var/mail@' \
-    login.defs.orig &gt; ${CLFS}/etc/login.defs</userinput></screen>
+    etc/login.defs &gt; ${LFS}/etc/login.defs</userinput></screen>
 
     <note os="u">
@@ -123,12 +121,23 @@
       dictionary:</para>
 
-<screen role="nodump"><userinput>cp ${CLFS}/etc/login.defs login.defs.orig
-sed 's@DICTPATH.*@DICTPATH\t/lib/cracklib/pw_dict@' login.defs.orig \
-    &gt; ${CLFS}/etc/login.defs</userinput></screen>
+<screen><userinput>sed -i 's@DICTPATH.*@DICTPATH\t/lib/cracklib/pw_dict@' ${LFS}/etc/login.defs</userinput></screen>
     </note>
 
     <para os="v">Move a misplaced program to its proper location:</para>
 
-<screen os="w"><userinput>mv -v ${CLFS}/usr/bin/passwd ${CLFS}/bin</userinput></screen>
+<screen os="w"><userinput>mv -v ${LFS}/usr/bin/passwd ${LFS}/bin</userinput></screen>
+
+    <para os="x">Move Shadow's dynamic libraries to a more appropriate
+    location:</para>
+
+<screen os="y"><userinput>mv -v ${LFS}/lib/libshadow.*a ${LFS}/usr/lib
+rm -v ${LFS}/lib/libshadow.so
+ln -svf ../../lib/libshadow.so.0 ${LFS}/usr/lib/libshadow.so</userinput></screen>
+
+    <para os="z">The <option>-D</option> option of the <command>useradd</command>
+    program requires the <filename class="directory">/etc/default</filename>
+    directory for it to work properly:</para>
+
+<screen os="za"><userinput>install -dv ${LFS}/etc/default</userinput></screen>
 
   </sect2>
@@ -153,15 +162,15 @@
     <para>To enable shadowed passwords, run the following command:</para>
 
-<screen role="nodump"><userinput>${CLFS_TARGET}-pwconv</userinput></screen>
+<screen><userinput>pwconv</userinput></screen>
 
     <para>To enable shadowed group passwords, run:</para>
 
-<screen role="nodump"><userinput>${CLFS_TARGET}-grpconv</userinput></screen>
-
-    <para>To view or change the default settings for new user accounts that
-    you create, you can edit <filename>/etc/default/useradd</filename>. See
-    <command>man useradd</command> or
-    <ulink url="&cblfs-root;index.php/Configuring_for_Adding_Users"/> for more
-    information.</para>
+<screen role="nodump"><userinput>grpconv</userinput></screen>
+
+    <para>Under normal circumstances, passwords will not have been created
+    yet. However, if returning to this section later to enable shadowing,
+    reset any current user passwords with the <command>passwd</command>
+    command or any group passwords with the <command>gpasswd</command>
+    command.</para>
 
   </sect2>
@@ -173,5 +182,5 @@
     class="username">root</systemitem> and set it by running:</para>
 
-<screen role="nodump"><userinput>${CLFS_TARGET}-passwd root</userinput></screen>
+<screen role="nodump"><userinput>passwd root</userinput></screen>
 
   </sect2>
@@ -185,9 +194,9 @@
 
       <seglistitem>
-        <seg>chage, chfn, chpasswd, chgpasswd, chsh, expiry, faillog, gpasswd,
-        groupadd, groupdel, groupmod, grpck, grpconv, grpunconv, lastlog,
-        login, logoutd, newgrp, newusers, nologin, passwd, pwck, pwconv,
-        pwunconv, sg (link to newgrp), useradd, userdel, usermod,
-        vigr (link to vipw), and vipw</seg>
+        <seg>chage, chfn, chpasswd, chsh, expiry, faillog, gpasswd, groupadd,
+        groupdel, groupmod, grpck, grpconv, grpunconv, lastlog, login,
+        logoutd, newgrp, newusers, passwd, pwck, pwconv, pwunconv,
+        sg (link to newgrp), useradd, userdel, usermod, vigr (link to vipw),
+        and vipw</seg>
         <seg>libshadow.[a,so]</seg>
       </seglistitem>
@@ -216,14 +225,4 @@
           <indexterm zone="ch-system-shadow chfn">
             <primary sortas="b-chfn">chfn</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="chgpasswd">
-        <term><command>chgpasswd</command></term>
-        <listitem>
-          <para>Used to update group passwords in batch mode</para>
-          <indexterm zone="ch-system-shadow chgpasswd">
-            <primary sortas="b-chgpasswd">chgpasswd</primary>
           </indexterm>
         </listitem>
@@ -401,16 +400,4 @@
       </varlistentry>
 
-      <varlistentry id="nologin">
-        <term><command>nologin</command></term>
-        <listitem>
-          <para>Displays a message that an account is not available. Designed
-          to be used as the default shell for accounts that have been
-          disabled</para>
-          <indexterm zone="ch-system-shadow nologin">
-            <primary sortas="b-nologin">nologin</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
       <varlistentry id="passwd">
         <term><command>passwd</command></term>
Index: BOOK/final-system/common/stripping.xml
===================================================================
--- BOOK/final-system/common/stripping.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/stripping.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -23,6 +23,23 @@
   backup of the current situation.</para>
 
-<screen os="c"><userinput>find ${CLFS}/{,usr/}{bin,lib,sbin} -type f \
-   -exec ${CLFS_TARGET}-strip --strip-debug '{}' ';'</userinput></screen>
+  <para os="c">Before performing the stripping, take special care to ensure that
+  none of the binaries that are about to be stripped are running. If
+  unsure whether the user entered chroot with the command given in
+  <!-- <xref linkend="chapter-chroot" role=","/> --> first exit from
+  chroot:</para>
+
+<screen os="d" role="nodump"><userinput>logout</userinput></screen>
+
+    <para os="e">Then reenter it with:</para>
+
+<screen os="f" role="nodump"><userinput>chroot $LFS /tools/bin/env -i \
+    HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
+    PATH=/bin:/usr/bin:/sbin:/usr/sbin \
+    /tools/bin/bash --login</userinput></screen>
+
+    <para os="g">Now the binaries and libraries can be safely stripped:</para>
+
+<screen os="h"><userinput>/tools/bin/find /{,usr/}{bin,lib,sbin} -type f \
+   -exec /tools/bin/strip --strip-debug '{}' ';'</userinput></screen>
 
     <para os="i">A large number of files will be reported as having their file
Index: BOOK/final-system/common/sysklogd.xml
===================================================================
--- BOOK/final-system/common/sysklogd.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/final-system/common/sysklogd.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-sysklogd" xreflabel="Sysklogd" role="wrap">
+  <?dbhtml filename="sysklogd.html"?>
+
+  <title>Sysklogd-&sysklogd-version;</title>
+
+  <indexterm zone="ch-system-sysklogd">
+    <primary sortas="a-Sysklogd">Sysklogd</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Sysklogd package contains programs for logging system messages,
+    such as those given by the kernel when unusual things happen.</para>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Sysklogd</title>
+
+    <para os="a">The following patch fixes various issues, including a
+    problem building Sysklogd with Linux 2.6 series kernels</para>
+
+<screen os="b"><userinput>patch -Np1 -i ../&sysklogd-fixes-patch;</userinput></screen>
+
+    <para os="s1">The following sed prevents chaning the owner of the installed man files and prevents install from trying to strip the installed binaries.</para>
+
+<screen os="s2"><userinput>cp Makefile{,.orig}
+sed -e 's/-o ${MAN_USER} -g ${MAN_GROUP}//' \
+    -e 's/500 -s/500/' Makefile.orig &gt; Makefile</userinput></screen>
+
+    <para os="c">Compile the package:</para>
+
+<screen os="d"><userinput>make CC="${CC}"</userinput></screen>
+
+    <para os="f">Install the package:</para>
+
+<screen os="g"><userinput>make DESTDIR=${LFS} install</userinput></screen>
+
+  </sect2>
+
+  <sect2 id="conf-sysklogd" role="configuration">
+    <title>Configuring Sysklogd</title>
+
+    <indexterm zone="conf-sysklogd">
+      <primary sortas="a-Sysklogd">Sysklogd</primary>
+    <secondary>configuring</secondary></indexterm>
+
+    <indexterm zone="conf-sysklogd">
+      <primary sortas="e-/etc/syslog.conf">/etc/syslog.conf</primary>
+    </indexterm>
+
+    <para>Create a new <filename>/etc/syslog.conf</filename> file by running
+    the following:</para>
+
+<screen><userinput>cat &gt; ${LFS}/etc/syslog.conf &lt;&lt; "EOF"
+<literal># Begin /etc/syslog.conf
+
+auth,authpriv.* -/var/log/auth.log
+*.*;auth,authpriv.none -/var/log/sys.log
+daemon.* -/var/log/daemon.log
+kern.* -/var/log/kern.log
+mail.* -/var/log/mail.log
+user.* -/var/log/user.log
+*.emerg *
+
+# log the bootscript output:
+local2.* -/var/log/boot.log
+
+# End /etc/syslog.conf</literal>
+EOF</userinput></screen>
+
+  </sect2>
+
+  <sect2 id="contents-sysklogd" role="content">
+    <title>Contents of Sysklogd</title>
+
+    <segmentedlist>
+      <segtitle>Installed programs</segtitle>
+
+      <seglistitem>
+        <seg>klogd and syslogd</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="klogd">
+        <term><command>klogd</command></term>
+        <listitem>
+          <para>A system daemon for intercepting and logging kernel
+          messages</para>
+          <indexterm zone="ch-system-sysklogd klogd">
+            <primary sortas="b-klogd">klogd</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="syslogd">
+        <term><command>syslogd</command></term>
+        <listitem>
+          <para>Logs the messages that system programs offer for logging.
+          Every logged message contains at least a date stamp and a hostname,
+          and normally the program's name too, but that depends on how
+          trusting the logging daemon is told to be.</para>
+          <indexterm zone="ch-system-sysklogd syslogd">
+            <primary sortas="b-syslogd">syslogd</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
Index: BOOK/final-system/common/sysvinit.xml
===================================================================
--- BOOK/final-system/common/sysvinit.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/sysvinit.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -22,21 +22,27 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Sysvinit</title>
 
-    <para os="p1">The following patch contains a number of updates to the
-    &sysvinit-version;:</para>
-
-<screen os="p2"><userinput>patch -Np1 -i ../&sysvinit-fixes-patch;</userinput></screen>
-
-    <para os="s1">The following sed makes changes in the Makefile required for cross-compiling:</para>
+    <para os="a">When run-levels are changed (for example, when halting the
+    system), <command>init</command> sends termination signals to those
+    processes that <command>init</command> itself started and that should
+    not be running in the new run-level.  While doing this,
+    <command>init</command> outputs messages like <quote>Sending processes
+    the TERM signal</quote> which seem to imply that it is sending these
+    signals to all currently running processes. To avoid this
+    misinterpretation, modify the source so that these messages read like
+    <quote>Sending processes started by init the TERM signal</quote>
+    instead:</para>
+
+<screen os="b"><userinput>sed -i 's@Sending processes@&amp; started by init@g' \
+    src/init.c</userinput></screen>
+
+    <para os="s1">The following sed makes changes in the Makefile required for cross-compiling</para>
 
 <screen os="s2"><userinput>cp -v src/Makefile src/Makefile.orig
-sed -e 's@/dev/initctl@$(ROOT)&amp;@g' \
+sed -e 's@root@0@g' \
+    -e "s@/dev/initctl@${LFS}&amp;@g" \
     -e 's@\(mknod \)-m \([0-9]* \)\(.* \)p@\1\3p; chmod \2\3@g' \
-    -e '/^ifeq/s/$(ROOT)//' \
-    -e 's@/usr/lib@$(ROOT)&amp;@' \
     src/Makefile.orig &gt; src/Makefile</userinput></screen>
 
@@ -44,9 +50,9 @@
 
 <screen os="d"><userinput>make -C src clobber
-make -C src ROOT=${CLFS} CC="${CC}"</userinput></screen>
+make -C src CC="${CC}"</userinput></screen>
 
     <para os="e">Install the package:</para>
 
-<screen os="f"><userinput>make -C src ROOT=${CLFS} INSTALL="install" install</userinput></screen>
+<screen os="f"><userinput>make -C src install</userinput></screen>
 
   </sect2>
@@ -66,5 +72,5 @@
     following:</para>
 
-<screen><userinput>cat &gt; ${CLFS}/etc/inittab &lt;&lt; "EOF"
+<screen><userinput>cat &gt; ${LFS}/etc/inittab &lt;&lt; "EOF"
 <literal># Begin /etc/inittab
 
@@ -84,13 +90,6 @@
 
 su:S016:once:/sbin/sulogin
-</literal>
-EOF</userinput></screen>
-
-    <para>The following command adds the standard virtual terminals to
-    <filename>/etc/inittab</filename>. If your system only has a serial
-    console skip the following command:</para>
-
-<screen><userinput>cat &gt;&gt; ${CLFS}/etc/inittab &lt;&lt; "EOF"
-<literal>1:2345:respawn:/sbin/agetty -I '\033(K' tty1 9600
+
+1:2345:respawn:/sbin/agetty -I '\033(K' tty1 9600
 2:2345:respawn:/sbin/agetty -I '\033(K' tty2 9600
 3:2345:respawn:/sbin/agetty -I '\033(K' tty3 9600
@@ -98,19 +97,6 @@
 5:2345:respawn:/sbin/agetty -I '\033(K' tty5 9600
 6:2345:respawn:/sbin/agetty -I '\033(K' tty6 9600
-</literal>
-EOF</userinput></screen>
-
-    <para>If your system has a serial console run the following command to add
-    the entry to <filename>/etc/inittab</filename>:</para>
-
-<screen><userinput>cat &gt;&gt; ${CLFS}/etc/inittab &lt;&lt; "EOF"
-<literal>c0:12345:respawn:/sbin/agetty 115200 ttyS0 vt100
-</literal>
-EOF</userinput></screen>
-
-   <para>Finally, Add the end line to <filename>/etc/inittab</filename>:</para>
-
-<screen><userinput>cat &gt;&gt; ${CLFS}/etc/inittab &lt;&lt; "EOF"
-<literal># End /etc/inittab</literal>
+
+# End /etc/inittab</literal>
 EOF</userinput></screen>
 
@@ -120,5 +106,5 @@
     character set to a user-defined one, which can be modified by running
     the <command>setfont</command> program. The <command>console</command>
-    initscript from the CLFS-Bootscripts package calls the
+    initscript from the LFS-Bootscripts package calls the
     <command>setfont</command> program during system startup. Sending this
     escape sequence is necessary for people who use non-ISO 8859-1 screen
@@ -134,8 +120,8 @@
 
       <seglistitem>
-        <seg>bootlogd, halt, init, killall5, last, lastb (link to last), mesg,
-        mountpoint, pidof (link to killall5), poweroff (link to halt),
-        reboot (link to halt), runlevel, shutdown, sulogin,
-        telinit (link to init), utmpdump, and wall</seg>
+        <seg>halt, init, killall5, last, lastb (link to last), mesg, pidof
+        (link to killall5), poweroff (link to halt), reboot (link to halt),
+        runlevel, shutdown, sulogin, telinit (link to init), utmpdump,
+        and wall</seg>
       </seglistitem>
     </segmentedlist>
@@ -145,14 +131,4 @@
       <?dbfo list-presentation="list"?>
       <?dbhtml list-presentation="table"?>
-
-      <varlistentry id="bootlogd">
-        <term><command>bootlogd</command></term>
-        <listitem>
-          <para>Logs boot messages to a log file</para>
-          <indexterm zone="ch-system-sysvinit bootlogd">
-            <primary sortas="b-bootlogd">bootlogd</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
 
       <varlistentry id="halt">
@@ -228,14 +204,4 @@
       </varlistentry>
 
-      <varlistentry id="mountpoint">
-        <term><command>mountpoint</command></term>
-        <listitem>
-          <para>Tells you whether or not a directory is a mount point.</para>
-          <indexterm zone="ch-system-sysvinit mountpoint">
-            <primary sortas="b-mountpoint">mountpoint</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
       <varlistentry id="pidof">
         <term><command>pidof</command></term>
Index: BOOK/final-system/common/tar.xml
===================================================================
--- BOOK/final-system/common/tar.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/tar.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -20,39 +20,28 @@
     <para>The Tar package contains an archiving program.</para>
 
+
   </sect2>
-
-  &env-target;
 
   <sect2 role="installation">
     <title>Installation of Tar</title>
 
-    <para os="p1">The following patch adds a man page for <command>tar</command>:</para>
+<para os="p1">Apply a patch to fix some issues with the test suite when using
+GCC-&gcc-version;:</para>
 
-<screen os="p2"><userinput>patch -Np1 -i ../&tar-man_page-patch;</userinput></screen>
+<screen os="p2"><userinput>patch -Np1 -i ../&tar-gcc4_fix-patch;</userinput></screen>
 
-    <para os="p3">The following patch will add support for new compressors like XZ Utils:</para>
+    <para os="p3">Tar has a bug when the <option>-S</option> option is used with
+    files larger than 4 GB. The following patch properly fixes this issue:</para>
 
-<screen os="p4"><userinput>patch -Np1 -i ../&tar-new_compressors-patch;</userinput></screen>
+<screen os="p4"><userinput>patch -Np1 -i ../&tar-sparse_fix-patch;</userinput></screen>
 
-    <para os="a">Configure can not properly determine the results of a few
-    tests. Set them manually:</para>
+    <para os="p5">This patch fixes a security vulnerability in Tar:</para>
 
-<screen os="b"><userinput>cat &gt; config.cache &lt;&lt; EOF
-gl_cv_func_wcwidth_works=yes
-gl_cv_func_btowc_eof=yes
-ac_cv_func_malloc_0_nonnull=yes
-ac_cv_func_realloc_0_nonnull=yes
-gl_cv_func_mbrtowc_incomplete_state=yes
-gl_cv_func_mbrtowc_nul_retval=yes
-gl_cv_func_mbrtowc_null_arg=yes
-gl_cv_func_mbrtowc_retval=yes
-gl_cv_func_wcrtomb_retval=yes
-EOF</userinput></screen>
+<screen os="p6"><userinput>patch -Np1 -i ../&tar-security_fixes-patch;</userinput></screen>
 
     <para os="a">Prepare Tar for compilation:</para>
 
-<screen os="b"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr --bindir=/bin --libexecdir=/usr/sbin \
-    --cache-file=config.cache</userinput></screen>
+<screen os="b"><userinput>./configure --prefix=/usr --bindir=/bin \
+    --libexecdir=/usr/sbin --host=${LFS_TARGET}</userinput></screen>
 
     <para os="c">Compile the package:</para>
@@ -62,5 +51,5 @@
     <para os="e">Install the package:</para>
 
-<screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
+<screen os="f"><userinput>make DESTDIR=${LFS} install</userinput></screen>
 
   </sect2>
Index: BOOK/final-system/common/texinfo.xml
===================================================================
--- BOOK/final-system/common/texinfo.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/texinfo.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -23,29 +23,44 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Texinfo</title>
 
-    <para os="p1">The following patch will add support for new compressors like XZ Utils:</para>
+    <para os="p1">Texinfo allows local users to overwrite arbitrary files via a symlink
+    attack on temporary files. Apply the following patch to fix this:</para>
 
-<screen os="p2"><userinput>patch -Np1 -i ../&texinfo-new_compressors-patch;</userinput></screen>
+<screen os="p2"><userinput>patch -Np1 -i ../&texinfo-tempfile_fix-patch;</userinput></screen>
 
     <para os="a">Prepare Texinfo for compilation:</para>
 
-<screen os="b"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr</userinput></screen>
+<screen os="b"><userinput>./configure --prefix=/usr --host=${LFS_TARGET}</userinput></screen>
 
     <para os="c">Compile the package:</para>
 
-<screen os="d"><userinput>make -C tools/gnulib/lib
-make -C tools
-make</userinput></screen>
+<screen os="d"><userinput>make</userinput></screen>
 
     <para os="e">Install the package:</para>
 
-<screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
+<screen os="f"><userinput>make DESTDIR=${LFS} install</userinput></screen>
 
-    <para os="g">The Info documentation system uses a plain text file to hold
+    <para os="g">Optionally, install the components belonging in a TeX
+    installation:</para>
+
+<screen os="h"><userinput>make DESTDIR=${LFS} TEXMF=/usr/share/texmf install-tex</userinput></screen>
+
+    <variablelist os="i">
+      <title>The meaning of the make parameter:</title>
+
+      <varlistentry>
+        <term><parameter>TEXMF=/usr/share/texmf</parameter></term>
+        <listitem>
+          <para>The <envar>TEXMF</envar> makefile variable holds the location
+          of the root of the TeX tree if, for example, a TeX package will be
+          installed later.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+    <para os="j">The Info documentation system uses a plain text file to hold
     its list of menu entries. The file is located at
     <filename>/usr/share/info/dir</filename>. Unfortunately, due to occasional
@@ -55,8 +70,8 @@
     the following optional commands will accomplish the task:</para>
 
-<screen os="h" role="nodump"><userinput>cd ${CLFS}/usr/share/info
+<screen os="k" role="nodump"><userinput>cd ${LFS}/usr/share/info
 rm dir
 for f in *
-do install-info ${f} dir 2&gt;/dev/null
+do install-info $f dir 2&gt;/dev/null
 done</userinput></screen>
 
Index: BOOK/final-system/common/udev.xml
===================================================================
--- BOOK/final-system/common/udev.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/udev.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -23,34 +23,50 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Udev</title>
 
-    <para os="a">Prepare Udev for compilation:</para>
-
-<screen os="b"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --exec-prefix="" --sysconfdir=/etc \
-    --libexecdir=/lib/udev --libdir=/usr/lib \
-    --disable-extras</userinput></screen>
-
-    <para os="c">Compile the package:</para>
-
-<screen os="d"><userinput>make</userinput></screen>
-
-    <para os="e">Install the package:</para>
-
-<screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
-
-    <para os="g">Install documentation:</para>
+    <para os="a">Compile the package:</para>
+
+<screen os="b"><userinput>make CROSS_COMPILE="${LFS_TARGET}-" CC="${CC}" LD="${CC}" \
+    EXTRAS="extras/floppy extras/cdrom_id extras/firmware \
+    extras/scsi_id extras/volume_id extras/ata_id extras/usb_id \
+    extras/edd_id extras/dasd_id extras/path_id" udevdir=/dev</userinput></screen>
+
+    <variablelist os="c">
+      <title>The meaning of the make parameter:</title>
+
+      <varlistentry>
+      <term><parameter>EXTRAS="extras/floppy extras/cdrom_id extras/firmware
+      extras/scsi_id extras/volume_id extras/ata_id extras/usb_id extras/edd_id
+      extras/dasd_id extras/path_id"</parameter></term>
+        <listitem>
+          <para>This builds the helper applications that are used with
+          udev. The helper programs assist in correct handling of devices.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+    <para os="c">Install the package:</para>
+
+<screen os="d"><userinput>make DESTDIR="${LFS}" \
+    EXTRAS="extras/floppy extras/cdrom_id extras/firmware \
+    extras/scsi_id extras/volume_id extras/ata_id extras/usb_id \
+    extras/edd_id extras/dasd_id extras/path_id" udevdir=/dev install</userinput></screen>
+
+    <para os="e">Install necessary helpers.</para>
+
+<screen os="f"><userinput>install -v extras/eventrecorder.sh ${LFS}/lib/udev</userinput></screen>
+
+    <para os="g">Install the documentation that explains how to create
+    Udev rules:</para>
 
 <screen os="h"><userinput>install -v -m644 -D docs/writing_udev_rules/index.html \
-    ${CLFS}/usr/share/doc/udev-&udev-version;/index.html</userinput></screen>
-
-    <para os="i">Create a directory for storing firmware that can be loaded by
-    <command>udev</command>:</para>
-
-<screen os="j"><userinput>install -dv ${CLFS}/lib/firmware</userinput></screen>
-
+    ${LFS}/usr/share/doc/udev-&udev-version;/index.html</userinput></screen>
+
+    <para os="i">Create a directory for storing firmware that can be
+    loaded by <command>udev</command>:</para>
+
+<screen os="j"><userinput>install -dv ${LFS}/lib/firmware</userinput></screen>
 
   </sect2>
@@ -123,15 +139,4 @@
       </varlistentry>
 
-      <varlistentry id="udevsettle">
-        <term><command>udevsettle</command></term>
-        <listitem>
-          <para>Watches the Udev event queue and exits if all current uevents
-          have been handled</para>
-          <indexterm zone="ch-system-udev udevsettle">
-            <primary sortas="b-udevsettle">udevsettle</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
       <varlistentry id="udevtest">
         <term><command>udevtest</command></term>
@@ -139,5 +144,6 @@
           <para>Simulates a <command>udev</command> run for the given device,
           and prints out the name of the node the real <command>udev</command>
-          would have created or the name of the renamed network interface</para>
+          would have created or (not in LFS) the name of the renamed network
+          interface</para>
           <indexterm zone="ch-system-udev udevtest">
             <primary sortas="b-udevtest">udevtest</primary>
@@ -150,5 +156,5 @@
         <listitem>
           <para>Walks the sysfs tree for devices that need to be added to the
-          system.</para>
+	  system.</para>
           <indexterm zone="ch-system-udev udevtrigger">
             <primary sortas="b-udevtrigger">udevtrigger</primary>
@@ -157,32 +163,70 @@
       </varlistentry>
 
- <!-- helpers start here -->
+      <varlistentry id="cdrom_id">
+        <term><command>cdrom_id</command></term>
+        <listitem>
+	  <para>To be written</para>  
+          <indexterm zone="ch-system-udev cdrom_id">
+            <primary sortas="b-cdrom_id">cdrom_id</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="firmware_helper">
+        <term><command>firmware_helper</command></term>
+        <listitem>
+	  <para>To be written</para>  
+          <indexterm zone="ch-system-udev firmware_helper">
+            <primary sortas="b-firmware_helper">firmware_helper</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="scsi_id">
+        <term><command>scsi_id</command></term>
+        <listitem>
+	  <para>To be written</para>  
+          <indexterm zone="ch-system-udev scsi_id">
+            <primary sortas="b-scsi_id">scsi_id</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="volume_id">
+        <term><command>volume_id</command></term>
+        <listitem>
+	  <para>To be written</para>  
+          <indexterm zone="ch-system-udev volume_id">
+            <primary sortas="b-volume_id">volume_id</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
       <varlistentry id="ata_id">
         <term><command>ata_id</command></term>
         <listitem>
-          <para>Provides Udev with a unique string and additional
-          information (uuid, label) for an ATA drive</para>
+	  <para>To be written</para>  
           <indexterm zone="ch-system-udev ata_id">
-            <primary sortas="b-ata_id">ata_id</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="cdrom_id">
-        <term><command>cdrom_id</command></term>
-        <listitem>
-          <para>Print the capabilities of a CDROM or DVDROM drive.</para>
-          <indexterm zone="ch-system-udev cdrom_id">
-            <primary sortas="b-cdrom_id">cdrom_id</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="create_floppy_devices">
-        <term><command>create_floppy_devices</command></term>
-        <listitem>
-          <para>Creates all possible floppy devices based on the CMOS type</para>
-          <indexterm zone="ch-system-udev create_floppy_devices">
-            <primary sortas="b-create_floppy_devices">create_floppy_devices</primary>
+            <primary sortas="b-volume_id">ata_id</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="usb_id">
+        <term><command>usb_id</command></term>
+        <listitem>
+	  <para>To be written</para>  
+          <indexterm zone="ch-system-udev usb_id">
+            <primary sortas="b-usb_id">usb_id</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="edd_id">
+        <term><command>edd_id</command></term>
+        <listitem>
+	  <para>To be written</para>  
+          <indexterm zone="ch-system-udev edd_id">
+            <primary sortas="b-edd_id">edd_id</primary>
           </indexterm>
         </listitem>
@@ -192,5 +236,5 @@
         <term><command>dasd_id</command></term>
         <listitem>
-          <para>Read the label from an s390 block device.</para>
+	  <para>To be written</para>  
           <indexterm zone="ch-system-udev dasd_id">
             <primary sortas="b-dasd_id">dasd_id</primary>
@@ -199,69 +243,8 @@
       </varlistentry>
 
-      <varlistentry id="edd_id">
-        <term><command>edd_id</command></term>
-        <listitem>
-          <para>Identify x86 disk drives from Enhanced Disk Drive calls.</para>
-          <indexterm zone="ch-system-udev edd_id">
-            <primary sortas="b-edd_id">edd_id</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="firmware.sh">
-        <term><command>firmware.sh</command></term>
-        <listitem>
-          <para>Script to load firmware for a device</para>
-          <indexterm zone="ch-system-udev firmware.sh">
-            <primary sortas="b-firmware.sh">firmware.sh</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="path_id">
-        <term><command>path_id</command></term>
-        <listitem>
-          <para>Provide the shortest possible unique hardware path to a
-          device</para>
-          <indexterm zone="ch-system-udev path_id">
-            <primary sortas="b-path_id">path_id</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="scsi_id">
-        <term><command>scsi_id</command></term>
-        <listitem>
-          <para>Retrieve or generate a unique SCSI identifier.</para>
-          <indexterm zone="ch-system-udev scsi_id">
-            <primary sortas="b-scsi_id">scsi_id</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="usb_id">
-        <term><command>usb_id</command></term>
-        <listitem>
-          <para>Identify a USB block device.</para>
-          <indexterm zone="ch-system-udev usb_id">
-            <primary sortas="b-usb_id">usb_id</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="vol_id">
-        <term><command>vol_id</command></term>
-        <listitem>
-          <para>Probe filesystem type and read label and uuid.</para>
-          <indexterm zone="ch-system-udev vol_id">
-            <primary sortas="b-vol_id">vol_id</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
       <varlistentry id="etc-udev">
         <term><filename class="directory">/etc/udev</filename></term>
         <listitem>
-          <para>Contains <command>udev</command> configuration files,
+          <para>Contains <command>udev</command> configuation files,
           device permissions, and rules for device naming</para>
           <indexterm zone="ch-system-udev etc-udev">
Index: OK/final-system/common/util-linux-ng.xml
===================================================================
--- BOOK/final-system/common/util-linux-ng.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,824 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-system-util-linux-ng" role="wrap">
-  <?dbhtml filename="util-linux-ng.html"?>
-
-  <title>Util-linux-ng-&util-linux-ng-version;</title>
-
-  <indexterm zone="ch-system-util-linux-ng">
-    <primary sortas="a-Util-linux-ng">Util-linux-ng</primary>
-  </indexterm>
-
-  <sect2 role="package">
-    <title/>
-
-    <para>The Util-linux-ng package contains miscellaneous utility programs.
-    Among them are utilities for handling file systems, consoles, partitions,
-    and messages.</para>
-
-  </sect2>
-
-  &env-target;
-
-  <sect2 id="fhs-util-linux-ng" role="installation">
-    <title>FHS compliance notes</title>
-
-    <para>The FHS recommends using the <filename
-    class="directory">/var/lib/hwclock</filename> directory instead of the
-    usual <filename class="directory">/etc</filename> directory as the
-    location for the <filename>adjtime</filename> file. To make the
-    <command>hwclock</command> program FHS-compliant, run the following:</para>
-
-<screen><userinput>cp hwclock/hwclock.c{,.orig}
-sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' \
-    hwclock/hwclock.c.orig &gt; hwclock/hwclock.c
-mkdir -pv ${CLFS}/var/lib/hwclock</userinput></screen>
-
-  </sect2>
-
-  <sect2 role="installation">
-    <title>Installation of Util-linux-ng</title>
-
-    <para os="a">Prepare Util-linux-ng for compilation:</para>
-
-<screen os="b"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --enable-arch --enable-partx --disable-wall \
-    --enable-write --disable-makeinstall-chown</userinput></screen>
-
-    <variablelist os="c">
-      <title>The meaning of the configure options:</title>
-
-      <varlistentry>
-        <term><parameter>--enable-arch</parameter></term>
-        <listitem>
-          <para>This option allows the <command>arch</command> program to be
-          installed.</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><parameter>--enable-partx</parameter></term>
-        <listitem>
-          <para>Enables building the <command>addpart</command>, <command>delpart</command>,
-           <command>partx</command> programs.</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><parameter>--enable-write</parameter></term>
-        <listitem>
-          <para>This option allows the <command>write</command> program to be
-          installed.</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><parameter>--disable-wall</parameter></term>
-        <listitem>
-          <para>Disables building the <command>wall</command> program,
-          as the Sysvinit package installs its own version.</para>
-        </listitem>
-      </varlistentry>
-
-    </variablelist>
-
-    <para os="d">Compile the package:</para>
-
-<screen os="e"><userinput>make</userinput></screen>
-
-    <para os="f">Install the package:</para>
-
-<screen os="g"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
-
-    <para os="h">Move the <command>logger</command> binary to
-    <filename class="directory">/bin</filename> as it is needed by the
-    CLFS-Bootscripts package:</para>
-
-<screen os="i"><userinput>mv -v ${CLFS}/usr/bin/logger ${CLFS}/bin</userinput></screen>
-
-  </sect2>
-
-  <sect2 id="contents-util-linux-ng" role="content">
-    <title>Contents of Util-linux-ng</title>
-
-    <segmentedlist>
-      <segtitle>Installed programs</segtitle>
-      <segtitle>Installed libraries</segtitle>
-
-      <seglistitem>
-        <seg>addpart, agetty, blockdev, cal, cfdisk, chkdupexe, col, colcrt,
-        colrm, column, ctrlaltdel, cytune, ddate, delpart, dmesg, fdformat,
-        fdisk, flock, fsck, fsck.cramfs, fsck.minix, getopt, hexdump, hwclock,
-        ionice, ipcrm, ipcs, isosize, line, logger, look, losetup, mcookie,
-        mkfs, mkfs.bfs, mkfs.cramfs, mkfs.minix, mkswap, more, mount, namei,
-        partx, pg, pivot_root, readprofile, rename, renice, rev, rtcwake,
-        script, scriptreplay, setarch, setsid, setterm, sfdisk,
-        swapoff (link to swapon), swapon, tailf, taskset, tunelp, ul, umount,
-        whereis, and write</seg>
-        <seg>libblkid.[a,so] and libuuid.[a,so]</seg>
-      </seglistitem>
-    </segmentedlist>
-
-    <variablelist>
-      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
-      <?dbfo list-presentation="list"?>
-      <?dbhtml list-presentation="table"?>
-
-      <varlistentry id="addpart">
-        <term><command>addpart</command></term>
-        <listitem>
-          <para>Informs the kernel of a new partition</para>
-          <indexterm zone="ch-system-util-linux-ng addpart">
-            <primary sortas="b-addpart">addpart</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="agetty">
-        <term><command>agetty</command></term>
-        <listitem>
-          <para>Opens a tty port, prompts for a login name,
-          and then invokes the <command>login</command> program</para>
-          <indexterm zone="ch-system-util-linux-ng agetty">
-            <primary sortas="b-agetty">agetty</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="blockdev">
-        <term><command>blockdev</command></term>
-        <listitem>
-          <para>Allows users to call block device ioctls from the command
-          line</para>
-          <indexterm zone="ch-system-util-linux-ng blockdev">
-            <primary sortas="b-blockdev">blockdev</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="cal">
-        <term><command>cal</command></term>
-        <listitem>
-          <para>Displays a simple calendar</para>
-          <indexterm zone="ch-system-util-linux-ng cal">
-            <primary sortas="b-cal">cal</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="cfdisk">
-        <term><command>cfdisk</command></term>
-        <listitem>
-          <para>Manipulates the partition table of the given device</para>
-          <indexterm zone="ch-system-util-linux-ng cfdisk">
-            <primary sortas="b-cfdisk">cfdisk</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="chkdupexe">
-        <term><command>chkdupexe</command></term>
-        <listitem>
-          <para>Finds duplicate executables</para>
-          <indexterm zone="ch-system-util-linux-ng chkdupexe">
-            <primary sortas="b-chkdupexe">chkdupexe</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="col">
-        <term><command>col</command></term>
-        <listitem>
-          <para>Filters out reverse line feeds</para>
-          <indexterm zone="ch-system-util-linux-ng col">
-            <primary sortas="b-col">col</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="colcrt">
-        <term><command>colcrt</command></term>
-        <listitem>
-          <para>Filters <command>nroff</command> output for terminals
-          that lack some capabilities, such as overstriking and half-lines</para>
-          <indexterm zone="ch-system-util-linux-ng colcrt">
-            <primary sortas="b-colcrt">colcrt</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="colrm">
-        <term><command>colrm</command></term>
-        <listitem>
-          <para>Filters out the given columns</para>
-          <indexterm zone="ch-system-util-linux-ng colrm">
-            <primary sortas="b-colrm">colrm</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="column">
-        <term><command>column</command></term>
-        <listitem>
-          <para>Formats a given file into multiple columns</para>
-          <indexterm zone="ch-system-util-linux-ng column">
-            <primary sortas="b-column">column</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="ctrlaltdel">
-        <term><command>ctrlaltdel</command></term>
-        <listitem>
-          <para>Sets the function of the Ctrl+Alt+Del key combination to a
-          hard or a soft reset</para>
-          <indexterm zone="ch-system-util-linux-ng ctrlaltdel">
-            <primary sortas="b-ctrlaltdel">ctrlaltdel</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="cytune">
-        <term><command>cytune</command></term>
-        <listitem>
-          <para>Tunes the parameters of the serial line drivers for
-          Cyclades cards</para>
-          <indexterm zone="ch-system-util-linux-ng cytune">
-            <primary sortas="b-cytune">cytune</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="ddate">
-        <term><command>ddate</command></term>
-        <listitem>
-          <para>Gives the Discordian date or converts the given Gregorian date
-          to a Discordian one</para>
-          <indexterm zone="ch-system-util-linux-ng ddate">
-            <primary sortas="b-ddate">ddate</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="delpart">
-        <term><command>delpart</command></term>
-        <listitem>
-          <para>Asks the kernel to remove a partition</para>
-          <indexterm zone="ch-system-util-linux-ng delpart">
-            <primary sortas="b-delpart">delpart</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="dmesg">
-        <term><command>dmesg</command></term>
-        <listitem>
-          <para>Dumps the kernel boot messages</para>
-          <indexterm zone="ch-system-util-linux-ng dmesg">
-            <primary sortas="b-dmesg">dmesg</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="fdformat">
-        <term><command>fdformat</command></term>
-        <listitem>
-          <para>Low-level formats a floppy disk</para>
-          <indexterm zone="ch-system-util-linux-ng fdformat">
-            <primary sortas="b-fdformat">fdformat</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="fdisk">
-        <term><command>fdisk</command></term>
-        <listitem>
-          <para>Manipulates the partition table of the given device</para>
-          <indexterm zone="ch-system-util-linux-ng fdisk">
-            <primary sortas="b-fdisk">fdisk</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="flock">
-        <term><command>flock</command></term>
-        <listitem>
-          <para>Acquires a file lock and then executes a command with the lock
-          held</para>
-          <indexterm zone="ch-system-util-linux-ng flock">
-            <primary sortas="b-flock">flock</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="fsck">
-        <term><command>fsck</command></term>
-        <listitem>
-          <para>Is used to check, and optionally repair, file systems</para>
-          <indexterm zone="ch-system-util-linux-ng fsck">
-            <primary sortas="b-fsck">fsck</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="fsck.cramfs">
-        <term><command>fsck.cramfs</command></term>
-        <listitem>
-          <para>Performs a consistency check on the Cramfs file system on the
-          given device</para>
-          <indexterm zone="ch-system-util-linux-ng fsck.cramfs">
-            <primary sortas="b-fsck.cramfs">fsck.cramfs</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="fsck.minix">
-        <term><command>fsck.minix</command></term>
-        <listitem>
-          <para>Performs a consistency check on the Minix file system on the
-          given device</para>
-          <indexterm zone="ch-system-util-linux-ng fsck.minix">
-            <primary sortas="b-fsck.minix">fsck.minix</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="getopt">
-        <term><command>getopt</command></term>
-        <listitem>
-          <para>Parses options in the given command line</para>
-          <indexterm zone="ch-system-util-linux-ng getopt">
-            <primary sortas="b-getopt">getopt</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="hexdump">
-        <term><command>hexdump</command></term>
-        <listitem>
-          <para>Dumps the given file in hexadecimal or in another given
-          format</para>
-          <indexterm zone="ch-system-util-linux-ng hexdump">
-            <primary sortas="b-hexdump">hexdump</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="hwclock">
-        <term><command>hwclock</command></term>
-        <listitem>
-          <para>Reads or sets the system's hardware clock, also called
-          the Real-Time Clock (RTC) or Basic Input-Output System (BIOS)
-          clock</para>
-          <indexterm zone="ch-system-util-linux-ng hwclock">
-            <primary sortas="b-hwclock">hwclock</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="ionice">
-        <term><command>ionice</command></term>
-        <listitem>
-          <para>Gives and sets program I/O scheduling class and priority</para>
-          <indexterm zone="ch-system-util-linux-ng ionice">
-            <primary sortas="b-ionice">ionice</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="ipcrm">
-        <term><command>ipcrm</command></term>
-        <listitem>
-          <para>Removes the given Inter-Process Communication (IPC) resource</para>
-          <indexterm zone="ch-system-util-linux-ng ipcrm">
-            <primary sortas="b-ipcrm">ipcrm</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="ipcs">
-        <term><command>ipcs</command></term>
-        <listitem>
-          <para>Provides IPC status information</para>
-          <indexterm zone="ch-system-util-linux-ng ipcs">
-            <primary sortas="b-ipcs">ipcs</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="isosize">
-        <term><command>isosize</command></term>
-        <listitem>
-          <para>Reports the size of an iso9660 file system</para>
-          <indexterm zone="ch-system-util-linux-ng isosize">
-            <primary sortas="b-isosize">isosize</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="line">
-        <term><command>line</command></term>
-        <listitem>
-          <para>Copies a single line</para>
-          <indexterm zone="ch-system-util-linux-ng line">
-            <primary sortas="b-line">line</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="logger">
-        <term><command>logger</command></term>
-        <listitem>
-          <para>Enters the given message into the system log</para>
-          <indexterm zone="ch-system-util-linux-ng logger">
-            <primary sortas="b-logger">logger</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="look">
-        <term><command>look</command></term>
-        <listitem>
-          <para>Displays lines that begin with the given string</para>
-          <indexterm zone="ch-system-util-linux-ng look">
-            <primary sortas="b-look">look</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="losetup">
-        <term><command>losetup</command></term>
-        <listitem>
-          <para>Sets up and controls loop devices</para>
-          <indexterm zone="ch-system-util-linux-ng losetup">
-            <primary sortas="b-losetup">losetup</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="mcookie">
-        <term><command>mcookie</command></term>
-        <listitem>
-          <para>Generates magic cookies (128-bit random hexadecimal numbers) for
-          <command>xauth</command></para>
-          <indexterm zone="ch-system-util-linux-ng mcookie">
-            <primary sortas="b-mcookie">mcookie</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="mkfs">
-        <term><command>mkfs</command></term>
-        <listitem>
-          <para>Builds a file system on a device (usually a hard disk
-          partition)</para>
-          <indexterm zone="ch-system-util-linux-ng mkfs">
-            <primary sortas="b-mkfs">mkfs</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="mkfs.bfs">
-        <term><command>mkfs.bfs</command></term>
-        <listitem>
-          <para>Creates a Santa Cruz Operations (SCO) bfs file system</para>
-          <indexterm zone="ch-system-util-linux-ng mkfs.bfs">
-            <primary sortas="b-mkfs.bfs">mkfs.bfs</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="mkfs.cramfs">
-        <term><command>mkfs.cramfs</command></term>
-        <listitem>
-          <para>Creates a cramfs file system</para>
-          <indexterm zone="ch-system-util-linux-ng mkfs.cramfs">
-            <primary sortas="b-mkfs.cramfs">mkfs.cramfs</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="mkfs.minix">
-        <term><command>mkfs.minix</command></term>
-        <listitem>
-          <para>Creates a Minix file system</para>
-          <indexterm zone="ch-system-util-linux-ng mkfs.minix">
-            <primary sortas="b-mkfs.minix">mkfs.minix</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="mkswap">
-        <term><command>mkswap</command></term>
-        <listitem>
-          <para>Initializes the given device or file to be used as a swap
-          area</para>
-          <indexterm zone="ch-system-util-linux-ng mkswap">
-            <primary sortas="b-mkswap">mkswap</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="more">
-        <term><command>more</command></term>
-        <listitem>
-          <para>A filter for paging through text one screen at a time</para>
-          <indexterm zone="ch-system-util-linux-ng more">
-            <primary sortas="b-more">more</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="mount">
-        <term><command>mount</command></term>
-        <listitem>
-          <para>Attaches the file system on the given device to a specified
-          directory in the file-system tree</para>
-          <indexterm zone="ch-system-util-linux-ng mount">
-            <primary sortas="b-mount">mount</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="namei">
-        <term><command>namei</command></term>
-        <listitem>
-          <para>Shows the symbolic links in the given pathnames</para>
-          <indexterm zone="ch-system-util-linux-ng namei">
-            <primary sortas="b-namei">namei</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="partx">
-        <term><command>partx</command></term>
-        <listitem>
-          <para>Tells the kernel about the presence and numbering of on-disk
-          partitions</para>
-          <indexterm zone="ch-system-util-linux-ng partx">
-            <primary sortas="b-partx">partx</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="pg">
-        <term><command>pg</command></term>
-        <listitem>
-          <para>Displays a text file one screen full at a time</para>
-          <indexterm zone="ch-system-util-linux-ng pg">
-            <primary sortas="b-pg">pg</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="pivot_root">
-        <term><command>pivot_root</command></term>
-        <listitem>
-          <para>Makes the given file system the new root file system of the
-          current process</para>
-          <indexterm zone="ch-system-util-linux-ng pivot_root">
-            <primary sortas="b-pivot_root">pivot_root</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="readprofile">
-        <term><command>readprofile</command></term>
-        <listitem>
-          <para>Reads kernel profiling information</para>
-          <indexterm zone="ch-system-util-linux-ng readprofile">
-            <primary sortas="b-readprofile">readprofile</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="rename">
-        <term><command>rename</command></term>
-        <listitem>
-          <para>Renames the given files, replacing a given string with
-          another</para>
-          <indexterm zone="ch-system-util-linux-ng rename">
-            <primary sortas="b-rename">rename</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="renice">
-        <term><command>renice</command></term>
-        <listitem>
-          <para>Alters the priority of running processes</para>
-          <indexterm zone="ch-system-util-linux-ng renice">
-            <primary sortas="b-renice">renice</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="rev">
-        <term><command>rev</command></term>
-        <listitem>
-          <para>Reverses the lines of a given file</para>
-          <indexterm zone="ch-system-util-linux-ng rev">
-            <primary sortas="b-rev">rev</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="rtcwake">
-        <term><command>rtcwake</command></term>
-        <listitem>
-          <para>Enters a system sleep state until a specified wakeup time</para>
-          <indexterm zone="ch-system-util-linux-ng rtcwake">
-            <primary sortas="b-rtcwake">rtcwake</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="script">
-        <term><command>script</command></term>
-        <listitem>
-          <para>Makes a typescript of a terminal session</para>
-          <indexterm zone="ch-system-util-linux-ng script">
-            <primary sortas="b-script">script</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="scriptreplay">
-        <term><command>scriptreplay</command></term>
-        <listitem>
-          <para>Plays back typescripts created by <command>script</command></para>
-          <indexterm zone="ch-system-util-linux-ng scriptreplay">
-            <primary sortas="b-scriptreplay">scriptreplay</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="setarch">
-        <term><command>setarch</command></term>
-        <listitem>
-          <para>Changes reported architecture in new program environment and
-          sets personality flags</para>
-          <indexterm zone="ch-system-util-linux-ng setarch">
-            <primary sortas="b-setarch">setarch</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="setsid">
-        <term><command>setsid</command></term>
-        <listitem>
-          <para>Runs the given program in a new session</para>
-          <indexterm zone="ch-system-util-linux-ng setsid">
-            <primary sortas="b-setsid">setsid</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="setterm">
-        <term><command>setterm</command></term>
-        <listitem>
-          <para>Sets terminal attributes</para>
-          <indexterm zone="ch-system-util-linux-ng setterm">
-            <primary sortas="b-setterm">setterm</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="sfdisk">
-        <term><command>sfdisk</command></term>
-        <listitem>
-          <para>A disk partition table manipulator</para>
-          <indexterm zone="ch-system-util-linux-ng sfdisk">
-            <primary sortas="b-sfdisk">sfdisk</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="swapoff">
-        <term><command>swapoff</command></term>
-        <listitem>
-          <para>Disables devices and files for paging and swapping</para>
-          <indexterm zone="ch-system-util-linux-ng swapoff">
-            <primary sortas="b-swapoff">swapoff</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="swapon">
-        <term><command>swapon</command></term>
-        <listitem>
-          <para>Enables devices and files for paging and swapping and
-          lists the devices and files currently in use</para>
-          <indexterm zone="ch-system-util-linux-ng swapon">
-            <primary sortas="b-swapon">swapon</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="tailf">
-        <term><command>tailf</command></term>
-        <listitem>
-          <para>Tracks the growth of a log file. Displays the last 10 lines
-          of a log file, then continues displaying any new entries in the
-          log file as they are created</para>
-          <indexterm zone="ch-system-util-linux-ng tailf">
-            <primary sortas="b-tailf">tailf</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="taskset">
-        <term><command>taskset</command></term>
-        <listitem>
-          <para>Retrieves or sets a process's CPU affinity</para>
-          <indexterm zone="ch-system-util-linux-ng taskset">
-            <primary sortas="b-taskset">taskset</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="tunelp">
-        <term><command>tunelp</command></term>
-        <listitem>
-          <para>Tunes the parameters of the line printer</para>
-          <indexterm zone="ch-system-util-linux-ng tunelp">
-            <primary sortas="b-tunelp">tunelp</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="ul">
-        <term><command>ul</command></term>
-        <listitem>
-          <para>A filter for translating underscores into escape sequences
-          indicating underlining for the terminal in use</para>
-          <indexterm zone="ch-system-util-linux-ng ul">
-            <primary sortas="b-ul">ul</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="umount">
-        <term><command>umount</command></term>
-        <listitem>
-          <para>Disconnects a file system from the system's file tree</para>
-          <indexterm zone="ch-system-util-linux-ng umount">
-            <primary sortas="b-umount">umount</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="whereis">
-        <term><command>whereis</command></term>
-        <listitem>
-          <para>Reports the location of the binary, source, and man page
-          for the given command</para>
-          <indexterm zone="ch-system-util-linux-ng whereis">
-            <primary sortas="b-whereis">whereis</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="write">
-        <term><command>write</command></term>
-        <listitem>
-          <para>Sends a message to the given user <emphasis>if</emphasis> that
-          user has not disabled receipt of such messages</para>
-          <indexterm zone="ch-system-util-linux-ng write">
-            <primary sortas="b-write">write</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="libblkid">
-        <term><filename class="libraryfile">libblkid</filename></term>
-        <listitem>
-          <para>Contains routines for device identification and token
-          extraction</para>
-          <indexterm zone="ch-system-util-linux-ng libblkid">
-            <primary sortas="c-libblkid">libblkid</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="libuuid">
-        <term><filename class="libraryfile">libuuid</filename></term>
-        <listitem>
-          <para>Contains routines for generating unique identifiers for objects
-          that may be accessible beyond the local system</para>
-          <indexterm zone="ch-system-util-linux-ng libuuid">
-            <primary sortas="c-libuuid">libuuid</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-    </variablelist>
-
-  </sect2>
-
-</sect1>
Index: BOOK/final-system/common/util-linux.xml
===================================================================
--- BOOK/final-system/common/util-linux.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/final-system/common/util-linux.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,794 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-util-linux" role="wrap">
+  <?dbhtml filename="util-linux.html"?>
+
+  <title>Util-linux-&util-linux-version;</title>
+
+  <indexterm zone="ch-system-util-linux">
+    <primary sortas="a-Util-linux">Util-linux</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Util-linux package contains miscellaneous utility programs.
+    Among them are utilities for handling file systems, consoles, partitions,
+    and messages.</para>
+
+
+  </sect2>
+
+  <sect2 id="fhs-util-linux" role="installation">
+    <title>FHS compliance notes</title>
+
+    <para>The FHS recommends using the <filename
+    class="directory">/var/lib/hwclock</filename> directory instead of the
+    usual <filename class="directory">/etc</filename> directory as the
+    location for the <filename>adjtime</filename> file. To make the
+    <command>hwclock</command> program FHS-compliant, run the following:</para>
+
+<screen><userinput>sed -i 's@etc/adjtime@var/lib/hwclock/adjtime@g' \
+    hwclock/hwclock.c
+mkdir -pv /var/lib/hwclock</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Util-linux</title>
+
+    <para os="p1">Util-linux fails to compile against newer versions of
+    Linux kernel headers. The following patch properly fixes this issue:</para>
+
+<screen os="p2"><userinput>patch -Np1 -i ../&util-linux-cramfs-patch;</userinput></screen>
+
+    <para os="p3">The following patch fixes build issues with GCC &gcc-version;:</para>
+
+<screen os="p4"><userinput>patch -Np1 -i ../&util-linux-gcc4_fixes-patch;</userinput></screen>
+
+    <para os="s1">The following sed prevents the installed files from being
+    owned by root</para>
+
+<screen os="s2"><userinput>cp MCONFIG{,.orig}
+sed -e "s/-o root//" MCONFIG.orig > MCONFIG</userinput></screen>
+
+    <para os="a">Prepare Util-linux for compilation:</para>
+
+<screen os="b"><userinput>./configure</userinput></screen>
+
+    <para os="c">Compile the package:</para>
+
+<screen os="d"><userinput>make HAVE_KILL=yes HAVE_SLN=yes \
+CPUOPT="" ARCH="" CPU=""</userinput></screen>
+
+    <variablelist os="e">
+      <title>The meaning of the make parameters:</title>
+
+      <varlistentry os="e1">
+        <term><parameter>HAVE_KILL=yes</parameter></term>
+        <listitem>
+          <para>This prevents the <command>kill</command> program (already
+          installed by Procps) from being built and installed again.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry os="e2">
+        <term><parameter>HAVE_SLN=yes</parameter></term>
+        <listitem>
+          <para>This prevents the <command>sln</command> program (a
+          statically linked version of <command>ln</command> already installed
+          by Glibc) from being built and installed again.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry os="e3">
+        <term><parameter>CPUOPT=""</parameter></term>
+        <listitem>
+          <para>This disables any compiler optimizations by CPU type.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry os="e4">
+        <term><parameter>ARCH=""</parameter></term>
+        <listitem>
+          <para>This disables the detection of the architecture.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry os="e5">
+        <term><parameter>CPU=""</parameter></term>
+        <listitem>
+          <para>This disables the detection of the CPU.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+    <para os="f">Install the package and move the <command>logger</command> binary
+    to <filename class="directory">/bin</filename> as it is needed by the
+    LFS-Bootscripts package:</para>
+
+<screen os="g"><userinput>make HAVE_KILL=yes HAVE_SLN=yes \
+CPUOPT="" ARCH="" CPU="" USE_TTY_GROUP=no DESTDIR=${LFS} install
+mv -v ${LFS}/usr/bin/logger ${LFS}/bin</userinput></screen>
+
+  </sect2>
+
+  <sect2 id="contents-util-linux" role="content">
+    <title>Contents of Util-linux</title>
+
+    <segmentedlist>
+      <segtitle>Installed programs</segtitle>
+
+      <seglistitem>
+        <seg>agetty, arch, blockdev, cal, cfdisk, chkdupexe, col, colcrt,
+        colrm, column, ctrlaltdel, cytune, ddate, dmesg, elvtune, fdformat,
+        fdisk, fsck.cramfs, fsck.minix, getopt, hexdump, hwclock, ipcrm,
+        ipcs, isosize, line, logger, look, losetup, mcookie, mkfs, mkfs.bfs,
+        mkfs.cramfs, mkfs.minix, mkswap, more, mount, namei, pg, pivot_root,
+        ramsize (link to rdev), raw, rdev, readprofile, rename, renice, rev,
+        rootflags (link to rdev), script, setfdprm, setsid, setterm, sfdisk,
+        swapdev, swapoff (link to swapon), swapon, tunelp, ul, umount, vidmode
+        (link to rdev), whereis, and write</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="agetty">
+        <term><command>agetty</command></term>
+        <listitem>
+          <para>Opens a tty port, prompts for a login name,
+          and then invokes the <command>login</command> program</para>
+          <indexterm zone="ch-system-util-linux agetty">
+            <primary sortas="b-agetty">agetty</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="arch">
+        <term><command>arch</command></term>
+        <listitem>
+          <para>Reports the machine's architecture</para>
+          <indexterm zone="ch-system-util-linux arch">
+            <primary sortas="b-arch">arch</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="blockdev">
+        <term><command>blockdev</command></term>
+        <listitem>
+          <para>Allows users to call block device ioctls from the command
+          line</para>
+          <indexterm zone="ch-system-util-linux blockdev">
+            <primary sortas="b-blockdev">blockdev</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="cal">
+        <term><command>cal</command></term>
+        <listitem>
+          <para>Displays a simple calendar</para>
+          <indexterm zone="ch-system-util-linux cal">
+            <primary sortas="b-cal">cal</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="cfdisk">
+        <term><command>cfdisk</command></term>
+        <listitem>
+          <para>Manipulates the partition table of the given device</para>
+          <indexterm zone="ch-system-util-linux cfdisk">
+            <primary sortas="b-cfdisk">cfdisk</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="chkdupexe">
+        <term><command>chkdupexe</command></term>
+        <listitem>
+          <para>Finds duplicate executables</para>
+          <indexterm zone="ch-system-util-linux chkdupexe">
+            <primary sortas="b-chkdupexe">chkdupexe</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="col">
+        <term><command>col</command></term>
+        <listitem>
+          <para>Filters out reverse line feeds</para>
+          <indexterm zone="ch-system-util-linux col">
+            <primary sortas="b-col">col</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="colcrt">
+        <term><command>colcrt</command></term>
+        <listitem>
+          <para>Filters <command>nroff</command> output for terminals
+          that lack some capabilities, such as overstriking and half-lines</para>
+          <indexterm zone="ch-system-util-linux colcrt">
+            <primary sortas="b-colcrt">colcrt</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="colrm">
+        <term><command>colrm</command></term>
+        <listitem>
+          <para>Filters out the given columns</para>
+          <indexterm zone="ch-system-util-linux colrm">
+            <primary sortas="b-colrm">colrm</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="column">
+        <term><command>column</command></term>
+        <listitem>
+          <para>Formats a given file into multiple columns</para>
+          <indexterm zone="ch-system-util-linux column">
+            <primary sortas="b-column">column</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="ctrlaltdel">
+        <term><command>ctrlaltdel</command></term>
+        <listitem>
+          <para>Sets the function of the Ctrl+Alt+Del key combination to a
+          hard or a soft reset</para>
+          <indexterm zone="ch-system-util-linux ctrlaltdel">
+            <primary sortas="b-ctrlaltdel">ctrlaltdel</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="cytune">
+        <term><command>cytune</command></term>
+        <listitem>
+          <para>Tunes the parameters of the serial line drivers for
+          Cyclades cards</para>
+          <indexterm zone="ch-system-util-linux cytune">
+            <primary sortas="b-cytune">cytune</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="ddate">
+        <term><command>ddate</command></term>
+        <listitem>
+          <para>Gives the Discordian date or converts the given Gregorian date
+          to a Discordian one</para>
+          <indexterm zone="ch-system-util-linux ddate">
+            <primary sortas="b-ddate">ddate</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="dmesg">
+        <term><command>dmesg</command></term>
+        <listitem>
+          <para>Dumps the kernel boot messages</para>
+          <indexterm zone="ch-system-util-linux dmesg">
+            <primary sortas="b-dmesg">dmesg</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="elvtune">
+        <term><command>elvtune</command></term>
+        <listitem>
+          <para>Tunes the performance and interactivity of a block
+          device</para>
+          <indexterm zone="ch-system-util-linux elvtune">
+            <primary sortas="b-elvtune">elvtune</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="fdformat">
+        <term><command>fdformat</command></term>
+        <listitem>
+          <para>Low-level formats a floppy disk</para>
+          <indexterm zone="ch-system-util-linux fdformat">
+            <primary sortas="b-fdformat">fdformat</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="fdisk">
+        <term><command>fdisk</command></term>
+        <listitem>
+          <para>Manipulates the partition table of the given device</para>
+          <indexterm zone="ch-system-util-linux fdisk">
+            <primary sortas="b-fdisk">fdisk</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="fsck.cramfs">
+        <term><command>fsck.cramfs</command></term>
+        <listitem>
+          <para>Performs a consistency check on the Cramfs file system on the
+          given device</para>
+          <indexterm zone="ch-system-util-linux fsck.cramfs">
+            <primary sortas="b-fsck.cramfs">fsck.cramfs</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="fsck.minix">
+        <term><command>fsck.minix</command></term>
+        <listitem>
+          <para>Performs a consistency check on the Minix file system on the
+          given device</para>
+          <indexterm zone="ch-system-util-linux fsck.minix">
+            <primary sortas="b-fsck.minix">fsck.minix</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="getopt">
+        <term><command>getopt</command></term>
+        <listitem>
+          <para>Parses options in the given command line</para>
+          <indexterm zone="ch-system-util-linux getopt">
+            <primary sortas="b-getopt">getopt</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="hexdump">
+        <term><command>hexdump</command></term>
+        <listitem>
+          <para>Dumps the given file in hexadecimal or in another given
+          format</para>
+          <indexterm zone="ch-system-util-linux hexdump">
+            <primary sortas="b-hexdump">hexdump</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="hwclock">
+        <term><command>hwclock</command></term>
+        <listitem>
+          <para>Reads or sets the system's hardware clock, also called
+          the Real-Time Clock (RTC) or Basic Input-Output System (BIOS)
+          clock</para>
+          <indexterm zone="ch-system-util-linux hwclock">
+            <primary sortas="b-hwclock">hwclock</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="ipcrm">
+        <term><command>ipcrm</command></term>
+        <listitem>
+          <para>Removes the given Inter-Process Communication (IPC) resource</para>
+          <indexterm zone="ch-system-util-linux ipcrm">
+            <primary sortas="b-ipcrm">ipcrm</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="ipcs">
+        <term><command>ipcs</command></term>
+        <listitem>
+          <para>Provides IPC status information</para>
+          <indexterm zone="ch-system-util-linux ipcs">
+            <primary sortas="b-ipcs">ipcs</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="isosize">
+        <term><command>isosize</command></term>
+        <listitem>
+          <para>Reports the size of an iso9660 file system</para>
+          <indexterm zone="ch-system-util-linux isosize">
+            <primary sortas="b-isosize">isosize</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="line">
+        <term><command>line</command></term>
+        <listitem>
+          <para>Copies a single line</para>
+          <indexterm zone="ch-system-util-linux line">
+            <primary sortas="b-line">line</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="logger">
+        <term><command>logger</command></term>
+        <listitem>
+          <para>Enters the given message into the system log</para>
+          <indexterm zone="ch-system-util-linux logger">
+            <primary sortas="b-logger">logger</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="look">
+        <term><command>look</command></term>
+        <listitem>
+          <para>Displays lines that begin with the given string</para>
+          <indexterm zone="ch-system-util-linux look">
+            <primary sortas="b-look">look</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="losetup">
+        <term><command>losetup</command></term>
+        <listitem>
+          <para>Sets up and controls loop devices</para>
+          <indexterm zone="ch-system-util-linux losetup">
+            <primary sortas="b-losetup">losetup</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="mcookie">
+        <term><command>mcookie</command></term>
+        <listitem>
+          <para>Generates magic cookies (128-bit random hexadecimal numbers) for
+          <command>xauth</command></para>
+          <indexterm zone="ch-system-util-linux mcookie">
+            <primary sortas="b-mcookie">mcookie</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="mkfs">
+        <term><command>mkfs</command></term>
+        <listitem>
+          <para>Builds a file system on a device (usually a hard disk
+          partition)</para>
+          <indexterm zone="ch-system-util-linux mkfs">
+            <primary sortas="b-mkfs">mkfs</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="mkfs.bfs">
+        <term><command>mkfs.bfs</command></term>
+        <listitem>
+          <para>Creates a Santa Cruz Operations (SCO) bfs file system</para>
+          <indexterm zone="ch-system-util-linux mkfs.bfs">
+            <primary sortas="b-mkfs.bfs">mkfs.bfs</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="mkfs.cramfs">
+        <term><command>mkfs.cramfs</command></term>
+        <listitem>
+          <para>Creates a cramfs file system</para>
+          <indexterm zone="ch-system-util-linux mkfs.cramfs">
+            <primary sortas="b-mkfs.cramfs">mkfs.cramfs</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="mkfs.minix">
+        <term><command>mkfs.minix</command></term>
+        <listitem>
+          <para>Creates a Minix file system</para>
+          <indexterm zone="ch-system-util-linux mkfs.minix">
+            <primary sortas="b-mkfs.minix">mkfs.minix</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="mkswap">
+        <term><command>mkswap</command></term>
+        <listitem>
+          <para>Initializes the given device or file to be used as a swap
+          area</para>
+          <indexterm zone="ch-system-util-linux mkswap">
+            <primary sortas="b-mkswap">mkswap</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="more">
+        <term><command>more</command></term>
+        <listitem>
+          <para>A filter for paging through text one screen at a time</para>
+          <indexterm zone="ch-system-util-linux more">
+            <primary sortas="b-more">more</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="mount">
+        <term><command>mount</command></term>
+        <listitem>
+          <para>Attaches the file system on the given device to a specified
+          directory in the file-system tree</para>
+          <indexterm zone="ch-system-util-linux mount">
+            <primary sortas="b-mount">mount</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="namei">
+        <term><command>namei</command></term>
+        <listitem>
+          <para>Shows the symbolic links in the given pathnames</para>
+          <indexterm zone="ch-system-util-linux namei">
+            <primary sortas="b-namei">namei</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="pg">
+        <term><command>pg</command></term>
+        <listitem>
+          <para>Displays a text file one screen full at a time</para>
+          <indexterm zone="ch-system-util-linux pg">
+            <primary sortas="b-pg">pg</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="pivot_root">
+        <term><command>pivot_root</command></term>
+        <listitem>
+          <para>Makes the given file system the new root file system of the
+          current process</para>
+          <indexterm zone="ch-system-util-linux pivot_root">
+            <primary sortas="b-pivot_root">pivot_root</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="ramsize">
+        <term><command>ramsize</command></term>
+        <listitem>
+          <para>Sets the size of the RAM disk in a bootable image</para>
+          <indexterm zone="ch-system-util-linux ramsize">
+            <primary sortas="b-ramsize">ramsize</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="raw">
+        <term><command>raw</command></term>
+        <listitem>
+          <para>Used to bind a Linux raw character device to a block
+          device</para>
+          <indexterm zone="ch-system-util-linux raw">
+            <primary sortas="b-raw">raw</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="rdev">
+        <term><command>rdev</command></term>
+        <listitem>
+          <para>Queries and sets the root device, among other things, in a
+          bootable image</para>
+          <indexterm zone="ch-system-util-linux rdev">
+            <primary sortas="b-rdev">rdev</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="readprofile">
+        <term><command>readprofile</command></term>
+        <listitem>
+          <para>Reads kernel profiling information</para>
+          <indexterm zone="ch-system-util-linux readprofile">
+            <primary sortas="b-readprofile">readprofile</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="rename">
+        <term><command>rename</command></term>
+        <listitem>
+          <para>Renames the given files, replacing a given string with
+          another</para>
+          <indexterm zone="ch-system-util-linux rename">
+            <primary sortas="b-rename">rename</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="renice">
+        <term><command>renice</command></term>
+        <listitem>
+          <para>Alters the priority of running processes</para>
+          <indexterm zone="ch-system-util-linux renice">
+            <primary sortas="b-renice">renice</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="rev">
+        <term><command>rev</command></term>
+        <listitem>
+          <para>Reverses the lines of a given file</para>
+          <indexterm zone="ch-system-util-linux rev">
+            <primary sortas="b-rev">rev</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="rootflags">
+        <term><command>rootflags</command></term>
+        <listitem>
+          <para>Sets the rootflags in a bootable image</para>
+          <indexterm zone="ch-system-util-linux rootflags">
+            <primary sortas="b-rootflags">rootflags</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="script">
+        <term><command>script</command></term>
+        <listitem>
+          <para>Makes a typescript of a terminal session</para>
+          <indexterm zone="ch-system-util-linux script">
+            <primary sortas="b-script">script</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="setfdprm">
+        <term><command>setfdprm</command></term>
+        <listitem>
+          <para>Sets user-provided floppy disk parameters</para>
+          <indexterm zone="ch-system-util-linux setfdprm">
+            <primary sortas="b-setfdprm">setfdprm</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="setsid">
+        <term><command>setsid</command></term>
+        <listitem>
+          <para>Runs the given program in a new session</para>
+          <indexterm zone="ch-system-util-linux setsid">
+            <primary sortas="b-setsid">setsid</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="setterm">
+        <term><command>setterm</command></term>
+        <listitem>
+          <para>Sets terminal attributes</para>
+          <indexterm zone="ch-system-util-linux setterm">
+            <primary sortas="b-setterm">setterm</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="sfdisk">
+        <term><command>sfdisk</command></term>
+        <listitem>
+          <para>A disk partition table manipulator</para>
+          <indexterm zone="ch-system-util-linux sfdisk">
+            <primary sortas="b-sfdisk">sfdisk</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="swapdev">
+        <term><command>swapdev</command></term>
+        <listitem>
+          <para>Sets the swap device in a bootable image</para>
+          <indexterm zone="ch-system-util-linux swapdev">
+            <primary sortas="b-swapdev">swapdev</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="swapoff">
+        <term><command>swapoff</command></term>
+        <listitem>
+          <para>Disables devices and files for paging and swapping</para>
+          <indexterm zone="ch-system-util-linux swapoff">
+            <primary sortas="b-swapoff">swapoff</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="swapon">
+        <term><command>swapon</command></term>
+        <listitem>
+          <para>Enables devices and files for paging and swapping and
+          lists the devices and files currently in use</para>
+          <indexterm zone="ch-system-util-linux swapon">
+            <primary sortas="b-swapon">swapon</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="tunelp">
+        <term><command>tunelp</command></term>
+        <listitem>
+          <para>Tunes the parameters of the line printer</para>
+          <indexterm zone="ch-system-util-linux tunelp">
+            <primary sortas="b-tunelp">tunelp</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="ul">
+        <term><command>ul</command></term>
+        <listitem>
+          <para>A filter for translating underscores into escape sequences
+          indicating underlining for the terminal in use</para>
+          <indexterm zone="ch-system-util-linux ul">
+            <primary sortas="b-ul">ul</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="umount">
+        <term><command>umount</command></term>
+        <listitem>
+          <para>Disconnects a file system from the system's file tree</para>
+          <indexterm zone="ch-system-util-linux umount">
+            <primary sortas="b-umount">umount</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="vidmode">
+        <term><command>vidmode</command></term>
+        <listitem>
+          <para>Sets the video mode in a bootable image</para>
+          <indexterm zone="ch-system-util-linux vidmode">
+            <primary sortas="b-vidmode">vidmode</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="whereis">
+        <term><command>whereis</command></term>
+        <listitem>
+          <para>Reports the location of the binary, source, and man page
+          for the given command</para>
+          <indexterm zone="ch-system-util-linux whereis">
+            <primary sortas="b-whereis">whereis</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="write">
+        <term><command>write</command></term>
+        <listitem>
+          <para>Sends a message to the given user <emphasis>if</emphasis> that
+          user has not disabled receipt of such messages</para>
+          <indexterm zone="ch-system-util-linux write">
+            <primary sortas="b-write">write</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
Index: BOOK/final-system/common/variables.xml
===================================================================
--- BOOK/final-system/common/variables.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/variables.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -11,5 +11,25 @@
   <title>Build Variables</title>
 
-  <para>Throughout this book, you will see a reference to different environment variables to be set and unset for different builds. The commands to set and unset the variables should be present on every page where compilation occurs. It may be unnecessary to run these commands each time as long as you're aware of what is set in your current enviornment.</para>
+  <para>Setup target-specific variables for the compiler
+  and linkers:</para>
+
+<screen><userinput>export CC="${LFS_TARGET}-gcc"
+export CXX="${LFS_TARGET}-g++"
+export AR="${LFS_TARGET}-ar"
+export AS="${LFS_TARGET}-as"
+export RANLIB="${LFS_TARGET}-ranlib"
+export LD="${LFS_TARGET}-ld"
+export STRIP="${LFS_TARGET}-strip"</userinput></screen>
+
+  <para>Then add the build variables to <filename>~/.bashrc</filename> to
+  prevent issues if you stop and come back later:</para>
+
+<screen><userinput>echo export CC=\""${CC}\"" &gt;&gt; ~/.bashrc
+echo export CXX=\""${CXX}\"" &gt;&gt; ~/.bashrc
+echo export AR=\""${AR}\"" &gt;&gt; ~/.bashrc
+echo export AS=\""${AS}\"" &gt;&gt; ~/.bashrc
+echo export RANLIB=\""${RANLIB}\"" &gt;&gt; ~/.bashrc
+echo export LD=\""${LD}\"" &gt;&gt; ~/.bashrc
+echo export STRIP=\""${STRIP}\"" &gt;&gt; ~/.bashrc</userinput></screen>
 
 </sect1>
Index: BOOK/final-system/common/vim.xml
===================================================================
--- BOOK/final-system/common/vim.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/vim.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -20,19 +20,19 @@
     <para>The Vim package contains a powerful text editor.</para>
 
+    <tip>
+      <title>Alternatives to Vim</title>
+
+      <para>If you prefer another editor&mdash;such as Emacs, Joe, or
+      Nano&mdash;please refer to <ulink
+      url="&blfs-root;view/svn/postlfs/editors.html"/>
+      for suggested installation instructions.</para>
+    </tip>
+
   </sect2>
-
-  &env-target;
 
   <sect2 role="installation">
     <title>Installation of Vim</title>
 
-    <tip os="t1">
-      <title>Alternatives to Vim</title>
-
-      <para>If you prefer another editor&mdash;such as Emacs, Joe, or
-      Nano&mdash;please refer to <ulink
-      url="&cblfs-root;index.php/Category:Text_Editors"/>
-      for suggested installation instructions.</para>
-    </tip>
+    <important>The cross-compilation of vim is currently a mystery. Help would be greatly apreciated</important>
 
     <para os="a">First, unpack both <filename>vim-&vim-version;.tar.bz2</filename>
@@ -40,24 +40,8 @@
     archives into the same directory.</para>
 
-    <para os="p1">The following patch merges all updates from the &vim-version; Branch
-    from the Vim developers:</para>
-
-<screen os="p2"><userinput>patch -Np1 -i ../&vim-branch_update-patch;</userinput></screen>
-
-    <para os="cc1">The <command>configure</command> script is full of logic
-    that aborts at the first sign of cross compiling. Work around this by
-    setting the cached values of several tests with the following
-    command:</para>
-
-<screen os="cc2"><userinput>cat &gt; src/auto/config.cache &lt;&lt; EOF
-vim_cv_getcwd_broken=no
-vim_cv_memmove_handles_overlap=yes
-vim_cv_stat_ignores_slash=no
-vim_cv_terminfo=yes
-vim_cv_tgent=zero
-vim_cv_toupper_broken=no
-vim_cv_tty_group=world
-ac_cv_sizeof_int=4
-EOF</userinput></screen>
+    <para os="p1">The following patch contains updates from the maintainer. The
+    maintainer of Vim only releases these patches to fix serious issues.</para>
+
+<screen os="p2"><userinput>patch -Np1 -i ../&vim-fixes-patch;</userinput></screen>
 
     <para os="b">Change the default location of
@@ -65,15 +49,9 @@
     class="directory">/etc</filename>:</para>
 
-<screen os="c"><userinput>cat &gt;&gt; src/feature.h &lt;&lt; "EOF"
-#define SYS_VIMRC_FILE "/etc/vimrc"
-EOF</userinput></screen>
+<screen os="c"><userinput>echo '#define SYS_VIMRC_FILE "/etc/vimrc"' &gt;&gt; src/feature.h</userinput></screen>
 
     <para os="d">Prepare Vim for compilation:</para>
 
-<screen os="e"><userinput>CPPFLAGS="-DUNUSED=" ./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr --enable-multibyte --enable-gui=no \
-    --disable-gtktest --disable-xim --with-features=normal \
-    --disable-gpm --without-x --disable-netbeans \
-    --with-tlib=ncurses</userinput></screen>
+<screen os="e"><userinput>./configure --prefix=/usr --enable-multibyte</userinput></screen>
 
     <variablelist os="f">
@@ -87,5 +65,5 @@
           if using a locale with a multibyte character set. This switch is
           also helpful to be able to edit text files initially created in
-          Linux distributions like Fedora that use UTF-8 as a default
+          Linux distributions like Fedora Core that use UTF-8 as a default
           character set.</para>
         </listitem>
@@ -98,18 +76,21 @@
 <screen os="h"><userinput>make</userinput></screen>
 
-    <para os="i">Install the package:</para>
-
-<screen os="j"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
-
-    <para os="k">Many users are accustomed to using <command>vi</command>
-    instead of <command>vim</command>. Some programs, such as
-    <command>vigr</command> and <command>vipw</command>, also use
-    <command>vi</command>. Create a symlink to permit execution of
-    <command>vim</command> when users habitually enter <command>vi</command>
-    and allow programs that use <command>vi</command> to work:</para>
-
-<screen os="l"><userinput>ln -sfv vim ${CLFS}/usr/bin/vi</userinput></screen>
-
-<para os="m">By default, Vim's documentation is installed in
+    <para os="i">To test the results, issue: <userinput>make test</userinput>.
+    However, this test suite outputs a lot of binary data to the
+    screen, which can cause issues with the settings of the current terminal.
+    This can be resolved by redirecting the output to a log file.</para>
+
+    <para os="j">Install the package:</para>
+
+<screen os="k"><userinput>make install</userinput></screen>
+
+    <para os="l">Many users are used to using <command>vi</command> instead of
+    <command>vim</command>. To allow execution of <command>vim</command>
+    when users habitually enter <command>vi</command>, create a
+    symlink:</para>
+
+<screen os="m"><userinput>ln -sv vim /usr/bin/vi</userinput></screen>
+
+<para os="n">By default, Vim's documentation is installed in
 <filename class="directory">/usr/share/vim</filename>.  The following symlink
 allows the documentation to be accessed via
@@ -117,12 +98,13 @@
 it consistent with the location of documentation for other packages:</para>
 
-<screen os="n"><userinput>ln -sfnv ../vim/vim&vim-version2;/doc ${CLFS}/usr/share/doc/vim-&vim-version;</userinput></screen>
-
-    <para os="o">If an X Window System is going to be installed on the CLFS
-    system, you may want to recompile Vim after installing X. Vim
+<screen os="o"><userinput>ln -sv ../vim/vim&vim-version2;/doc /usr/share/doc/vim-&vim-version;</userinput></screen>
+
+    <para os="p">If an X Window System is going to be installed on the LFS
+    system, it may be necessary to recompile Vim after installing X. Vim
     comes with a GUI version of the editor that requires X and some
-    additional libraries to be installed. For more information, refer to the
-    Vim documentation and the Vim installation page in CBLFS at <ulink
-    url="&cblfs-root;index.php/Vim"/>.</para>
+    additional libraries to be installed. For more information on this
+    process, refer to the Vim documentation and the Vim installation page
+    in the BLFS book at <ulink
+    url="&blfs-root;view/svn/postlfs/editors.html#postlfs-editors-vim"/>.</para>
 
   </sect2>
@@ -145,5 +127,5 @@
     following:</para>
 
-<screen><userinput>cat &gt; ${CLFS}/etc/vimrc &lt;&lt; "EOF"
+<screen><userinput>cat &gt; /etc/vimrc &lt;&lt; "EOF"
 <literal>" Begin /etc/vimrc
 
@@ -394,5 +376,5 @@
           necessary to highlight in <command>vim</command>. This script
           requires the old Unix <command>spell</command> command, which
-          is provided neither in CLFS nor in BLFS</para>
+          is provided neither in LFS nor in BLFS</para>
           <indexterm zone="ch-system-vim vimspell.sh">
             <primary sortas="b-vimspell.sh">vimspell.sh</primary>
Index: OK/final-system/common/xz.xml
===================================================================
--- BOOK/final-system/common/xz.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,187 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-system-xz" role="wrap">
-  <?dbhtml filename="xz.html"?>
-
-  <title>XZ-Utils-&xz-version;</title>
-
-  <indexterm zone="ch-system-xz">
-    <primary sortas="a-XZ-Utils">XZ-Utils</primary>
-  </indexterm>
-
-  <sect2 role="package">
-    <title/>
-
-    <para>The XZ-Utils package contains programs for compressing and
-    decompressing files. Compressing text files with <command>XZ-Utils</command>
-    yields a much better compression percentage than with the traditional
-    <command>gzip</command>.</para>
-
-  </sect2>
-
-  &env-target;
-
-  <sect2 role="installation">
-    <title>Installation of XZ-Utils</title>
-
-    <para os="a">Prepare XZ-Utils for compilation:</para>
-
-<screen os="b"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
-    --prefix=/usr</userinput></screen>
-
-    <para os="c">Compile the package:</para>
-
-<screen os="d"><userinput>make</userinput></screen>
-
-    <para os="e">Install the programs:</para>
-
-<screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
-
-    <para os="g">Move the <filename>xz</filename> binary, and several symlinks
-    that point to it, into the /bin directory:</para>
-
-<screen os="h"><userinput>mv -v ${CLFS}/usr/bin/{xz,lzma,lzcat,unlzma,unxz,xzcat} ${CLFS}/bin</userinput></screen>
-
-  </sect2>
-
-  <sect2 id="contents-xz" role="content">
-    <title>Contents of XZ-Utils</title>
-
-    <segmentedlist>
-      <segtitle>Installed programs</segtitle>
-      <segtitle>Installed libraries</segtitle>
-
-      <seglistitem>
-        <seg>lzcat (link to xz), lzcmp (link to lzdiff), lzdiff, lzegrep (link to lzgrep),
-        lzfgrep (link to lzgrep), lzgrep, lzless (link to lzmore), lzma (link to xz),
-        lzmadec, lzmore, unlzma (link to xz), unxz (link to xz), xz, xzdec, and
-        xzcat (link to xz).</seg>
-        <seg>/liblzma.a liblzma.la liblzma.so liblzma.so.0 liblzma.so.0.0.0</seg>
-      </seglistitem>
-    </segmentedlist>
-
-    <variablelist>
-      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
-      <?dbfo list-presentation="list"?>
-      <?dbhtml list-presentation="table"?>
-
-      <varlistentry id="lzcat">
-        <term><command>lzcat</command></term>
-        <listitem>
-          <para>Decompresses to standard output</para>
-          <indexterm zone="ch-system-xz lzcat">
-            <primary sortas="b-lzcat">lzcat</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="lzcmp">
-        <term><command>lzcmp</command></term>
-        <listitem>
-          <para>Compares lzma compressed files</para>
-          <indexterm zone="ch-system-xz lzcmp">
-            <primary sortas="b-lzcmp">lzcmp</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="lzdiff">
-        <term><command>lzdiff</command></term>
-        <listitem>
-          <para>Compares lzma compressed files</para>
-          <indexterm zone="ch-system-xz lzdiff">
-            <primary sortas="b-lzdiff">lzdiff</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="lzegrep">
-        <term><command>lzegrep</command></term>
-        <listitem>
-          <para>Runs <command>egrep</command> on lzma compressed files</para>
-          <indexterm zone="ch-system-xz lzegrep">
-            <primary sortas="b-lzegrep">lzegrep</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="lzfgrep">
-        <term><command>lzfgrep</command></term>
-        <listitem>
-          <para>Runs <command>fgrep</command> on lzma compressed files</para>
-          <indexterm zone="ch-system-xz lzfgrep">
-            <primary sortas="b-lzfgrep">lzfgrep</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="lzgrep">
-        <term><command>lzgrep</command></term>
-        <listitem>
-          <para>Runs <command>grep</command> on lzma compressed files</para>
-          <indexterm zone="ch-system-xz lzgrep">
-            <primary sortas="b-lzgrep">lzgrep</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="lzless">
-        <term><command>lzless</command></term>
-        <listitem>
-          <para>Runs <command>less</command> on lzma files</para>
-          <indexterm zone="ch-system-xz lzless">
-            <primary sortas="b-lzless">lzless</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="lzma">
-        <term><command>lzma</command></term>
-        <listitem>
-          <para>Compresses lzma files</para>
-          <indexterm zone="ch-system-xz lzma">
-            <primary sortas="b-lzma">lzma</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="lzmadec">
-        <term><command>lzmadec</command></term>
-        <listitem>
-          <para>Decompresses lzma files</para>
-          <indexterm zone="ch-system-xz lzmadec">
-            <primary sortas="b-lzmadec">lzmadec</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="lzmore">
-        <term><command>lzmore</command></term>
-        <listitem>
-          <para>Runs <command>more</command> on lzma files</para>
-          <indexterm zone="ch-system-xz lzmore">
-            <primary sortas="b-lzmore">lzmore</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry id="unlzma">
-        <term><command>unlzma</command></term>
-        <listitem>
-          <para>Uncompresses lzma files</para>
-          <indexterm zone="ch-system-xz unlzma">
-            <primary sortas="b-unlzma">unlzma</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-    </variablelist>
-
-  </sect2>
-
-</sect1>
Index: BOOK/final-system/common/zlib.xml
===================================================================
--- BOOK/final-system/common/zlib.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/final-system/common/zlib.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -23,6 +23,4 @@
   </sect2>
 
-  &env-target;
-
   <sect2 role="installation">
     <title>Installation of Zlib</title>
@@ -32,4 +30,9 @@
 
 <screen os="p2"><userinput>patch -Np1 -i ../&zlib-fpic-patch;</userinput></screen>
+
+    <para os="s1">The following sed tells the Makefile to pass r to AR:</para>
+
+<screen os="s2"><userinput>cp Makefile.in{,.orig}
+sed 's/$(AR) $@/$(AR) r $@/' Makefile.in &gt; Makefile.in</userinput></screen>
 
     <para os="a">Prepare Zlib for compilation:</para>
@@ -41,20 +44,20 @@
 <screen os="d"><userinput>make</userinput></screen>
 
-    <para os="e">Install the package:</para>
+    <para os="e">Install the pacakge:</para>
 
-<screen os="f"><userinput>make prefix=${CLFS}/usr install</userinput></screen>
+<screen os="f"><userinput>make prefix=${LFS}/usr install</userinput></screen>
 
     <para os="g">The previous command installed a <filename
     class="extension">.so</filename> file in <filename
-    class="directory">${CLFS}/usr/lib</filename>. We will move it into
-    <filename class="directory">${CLFS}/lib</filename> and then relink it
-    to <filename class="directory">${CLFS}/usr/lib</filename>:</para>
+    class="directory">/usr/lib</filename>. We will move it into
+    <filename class="directory">/lib</filename> and then relink it
+    to <filename class="directory">/usr/lib</filename>:</para>
 
-<screen os="h"><userinput>mv -v ${CLFS}/usr/lib/libz.so.* ${CLFS}/lib
-ln -sfv ../../lib/libz.so.1 ${CLFS}/usr/lib/libz.so</userinput></screen>
+<screen os="h"><userinput>mv -v ${LFS}/usr/lib/libz.so.* ${LFS}/lib
+ln -svf ../../lib/libz.so.1 ${LFS}/usr/lib/libz.so</userinput></screen>
 
     <para os="i">Now we fix the permissions on the static library:</para>
 
-<screen os="j"><userinput>chmod -v 644 ${CLFS}/usr/lib/libz.a</userinput></screen>
+<screen os="j"><userinput>chmod -v 644 /usr/lib/libz.a</userinput></screen>
 
   </sect2>
Index: OK/final-system/hppa-chapter.xml
===================================================================
--- BOOK/final-system/hppa-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,70 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../general.ent">
-  %general-entities;
-]>
-
-<chapter id="chapter-building-system" xreflabel="Installing Basic System Software">
-  <?dbhtml dir="final-system"?>
-  <?dbhtml filename="chapter.html"?>
-
-  <title>Installing Basic System Software</title>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/introduction.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/pkgmgt.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/variables.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/man-pages.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gmp.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/mpfr.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/ppl.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/cloog-ppl.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/zlib.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/binutils.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gcc.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/sed.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/ncurses.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/util-linux-ng.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/e2fsprogs.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/coreutils.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/iana-etc.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/m4.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/bison.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/procps.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/libtool.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/flex.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/iproute2.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="hppa/perl.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/readline.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/autoconf.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/automake.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/bash.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/bzip2.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/diffutils.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/file.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/findutils.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gawk.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gettext.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/grep.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/groff.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gzip.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/iputils.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/kbd.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/less.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/make.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/man.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/module-init-tools.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/patch.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/psmisc.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/shadow.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/rsyslog.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/sysvinit.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/tar.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/texinfo.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/udev.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/vim.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/xz.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/aboutdebug.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/stripping.xml"/>
-
-</chapter>
Index: OK/final-system/hppa/perl.xml
===================================================================
--- BOOK/final-system/hppa/perl.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,84 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-system-perl" role="wrap">
-  <?dbhtml filename="perl.html"?>
-
-  <title>Perl-&perl-version;</title>
-
-  <indexterm zone="ch-system-perl">
-    <primary sortas="a-Perl">Perl</primary>
-  </indexterm>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/perl.xml"
-  xpointer="xpointer(//*[@role='package'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/perl.xml"
-  xpointer="xpointer(//*[@role='build-env'])"/>
-
-  <sect2 role="installation">
-    <title>Installation of Perl</title>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='w1'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='p3'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='p4'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='s1'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='s2'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='s3'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='s4'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='a'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='b'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='c'])"/>
-
-<screen os="d"><userinput>make ARCH=hppa CROSS_COMPILE=${CLFS_TARGET}-</userinput></screen>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='e'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='f'])"/>
-
-  </sect2>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/perl.xml"
-  xpointer="xpointer(id('contents-perl'))"/>
-
-</sect1>
Index: OK/final-system/x86-chapter.xml
===================================================================
--- BOOK/final-system/x86-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,70 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../general.ent">
-  %general-entities;
-]>
-
-<chapter id="chapter-building-system" xreflabel="Installing Basic System Software">
-  <?dbhtml dir="final-system"?>
-  <?dbhtml filename="chapter.html"?>
-
-  <title>Installing Basic System Software</title>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/introduction.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/pkgmgt.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/variables.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/man-pages.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gmp.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/mpfr.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/ppl.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/cloog-ppl.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/zlib.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/binutils.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gcc.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/sed.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/ncurses.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/util-linux-ng.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/e2fsprogs.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/coreutils.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/iana-etc.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/m4.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/bison.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/procps.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/libtool.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/flex.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/iproute2.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="x86/perl.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/readline.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/autoconf.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/automake.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/bash.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/bzip2.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/diffutils.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/file.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/findutils.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gawk.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gettext.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/grep.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/groff.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gzip.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/iputils.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/kbd.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/less.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/make.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/man.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/module-init-tools.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/patch.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/psmisc.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/shadow.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/rsyslog.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/sysvinit.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/tar.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/texinfo.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/udev.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/vim.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/xz.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/aboutdebug.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/stripping.xml"/>
-
-</chapter>
Index: OK/final-system/x86/perl.xml
===================================================================
--- BOOK/final-system/x86/perl.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,84 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-system-perl" role="wrap">
-  <?dbhtml filename="perl.html"?>
-
-  <title>Perl-&perl-version;</title>
-
-  <indexterm zone="ch-system-perl">
-    <primary sortas="a-Perl">Perl</primary>
-  </indexterm>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/perl.xml"
-  xpointer="xpointer(//*[@role='package'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/perl.xml"
-  xpointer="xpointer(//*[@role='build-env'])"/>
-
-  <sect2 role="installation">
-    <title>Installation of Perl</title>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='w1'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='p3'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='p4'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='s1'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='s2'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='s3'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='s4'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='a'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='b'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='c'])"/>
-
-<screen os="d"><userinput>make ARCH=x86 CROSS_COMPILE=${CLFS_TARGET}-</userinput></screen>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='e'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../arm/perl.xml"
-    xpointer="xpointer(//*[@os='f'])"/>
-
-  </sect2>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/perl.xml"
-  xpointer="xpointer(id('contents-perl'))"/>
-
-</sect1>
Index: BOOK/general.ent
===================================================================
--- BOOK/general.ent	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/general.ent	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,33 +1,20 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 
-<!ENTITY month "07"> <!-- Use two digits -->
-<!ENTITY month_name "July">
-<!ENTITY day "26"> <!-- Use two digits -->
-<!ENTITY year "2009"> <!-- Use four digits -->
+<!ENTITY version "SVN-20060525">
+<!ENTITY version-ARM "&version;-ARM">
 
-<!ENTITY releasedate "&month_name; &day;, &year;">
-
-<!ENTITY major-version "0">
-<!ENTITY minor-version "0">
-<!ENTITY extra-version "1">
-<!ENTITY generic-version "0.0.1"> <!-- Use "svn", "testing", or "x.y.z[-pre{x}]" -->
-
-<!ENTITY version "SVN-&major-version;.&minor-version;.&extra-version;-&year;&month;&day;">
-
-<!ENTITY version-alpha "&version;-Alpha">
-<!ENTITY version-arm "&version;-ARM">
-<!ENTITY version-hppa "&version;-PA-RISC">
-<!ENTITY version-x86 "&version;-x86">
+<!ENTITY releasedate "May 25, 2006">
+<!ENTITY milestone "0.2">
+<!ENTITY generic-version "svn"> <!-- Use "svn", "testing", or "x.y[-pre{x}]" -->
 
 <!ENTITY lfs-root "http://www.linuxfromscratch.org/">
-<!ENTITY clfs-root "http://cross-lfs.org/">
-<!ENTITY clfs-wiki "http://trac.cross-lfs.org/">
-<!ENTITY cblfs-root "http://cblfs.cross-lfs.org/">
-<!ENTITY faq-root "&clfs-wiki;wiki/faq">
-<!ENTITY hints-root "http://hints.cross-lfs.org/index.php/">
+<!ENTITY clfs-root "http:/trac.cross-lfs.org/">
+<!ENTITY blfs-root "&lfs-root;blfs/">
+<!ENTITY faq-root "&lfs-root;faq/">
+<!ENTITY hints-root "&lfs-root;hints/downloads/files/">
 <!ENTITY hints-index "&lfs-root;hints/list.html">
 <!ENTITY livecd-root "&lfs-root;livecd/">
-<!ENTITY test-results "&clfs-wiki;clfs/build-logs/&generic-version;/">
-<!ENTITY errata "&clfs-wiki;clfs/errata/&generic-version;/">
+<!ENTITY test-results "&clfs-root;clfs/build-logs/&generic-version;/">
+<!ENTITY errata "&clfs-root;clfs/errata/&generic-version;/">
 
 <!ENTITY gnu "http://ftp.gnu.org/gnu/">
@@ -36,5 +23,5 @@
 <!ENTITY redhat "ftp://sources.redhat.com/pub/">
 <!ENTITY kernel "http://www.kernel.org/pub/">
-<!ENTITY sourceforge "http://downloads.sourceforge.net/">
+<!ENTITY sourceforge "http://prdownloads.sourceforge.net/">
 
 <!ENTITY dependencies "Installation depends on">
@@ -47,29 +34,2 @@
 <!ENTITY % patches-entities SYSTEM "patches.ent">
 %patches-entities;
-
-<!ENTITY % uid-gid-entities SYSTEM "users_groups.ent">
-%uid-gid-entities;
-
-<!ENTITY env-target '  <sect2 role="build-env">
-    <title>Environment Settings</title>
-
-    <para>This package requires compiler variables to be set for the target in the environment.</para>
-
-    <screen><userinput>export CC=&quot;${CLFS_TARGET}-gcc&quot;
-export CXX=&quot;${CLFS_TARGET}-g++&quot;
-export AR=&quot;${CLFS_TARGET}-ar&quot;
-export AS=&quot;${CLFS_TARGET}-as&quot;
-export RANLIB=&quot;${CLFS_TARGET}-ranlib&quot;
-export LD=&quot;${CLFS_TARGET}-ld&quot;
-export STRIP=&quot;${CLFS_TARGET}-strip&quot;</userinput></screen>
-
-  </sect2>'>
-
-<!ENTITY env-host '  <sect2 role="build-env">
-    <title>Environment Settings</title>
-
-    <para>This package requires compiler variables to be set for the host system.</para>
-
-    <screen><userinput>unset CC CXX AR AS RANLIB LD STRIP</userinput></screen>
-
-  </sect2>'>
Index: OK/hppa-index.xml
===================================================================
--- BOOK/hppa-index.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,72 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "general.ent">
-  %general-entities;
-]>
-
-<book>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="prologue/hppa/bookinfo.xml"/>
-  <!--
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="prologue/dedication.xml"/>
-  -->
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="prologue/preface.xml"/>
-
-  <part id="part1">
-    <?dbhtml filename="part1.html"?>
-
-    <title>Introduction</title>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="introduction/hppa-chapter.xml"/>
-
-  </part>
-
-  <part id="part2">
-    <?dbhtml filename="part2.html"?>
-
-    <title>Preparing for the Build</title>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="partitioning/hppa-chapter.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="materials/hppa-chapter.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="final-preps/chapter.xml"/>
-
-  </part>
-
-  <part id="part3">
-    <?dbhtml filename="part3.html"?>
-
-    <title>Make the Cross-Compile Tools</title>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="cross-tools/hppa-chapter.xml"/>
-
-  </part>
-
-  <part id="part4">
-    <?dbhtml filename="part4.html"?>
-
-    <title>Building the CLFS System</title>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="final-system/hppa-chapter.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bootscripts/hppa-chapter.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="network/hppa-chapter.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bootable/hppa-chapter.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="the-end/chapter.xml"/>
-
-  </part>
-
-  <part id="part5">
-    <?dbhtml filename="part5.html"?>
-
-    <title>Appendices</title>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="appendices/acronymlist.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="appendices/dependencies/common.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="appendices/dependencies/hppa.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="appendices/license.xml"/>
-
-  </part>
-
-  <index/>
-
-</book>
Index: BOOK/index.xml
===================================================================
--- BOOK/index.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/index.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE bookinfo PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE bookinfo PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "general.ent">
   %general-entities;
@@ -7,5 +7,5 @@
 
 <bookinfo>
-  <title>Cross-Compiled Linux From Scratch - Sysroot</title>
+  <title>Cross-Compiled Linux From Scratch</title>
   <subtitle>Version &version;</subtitle>
 
@@ -19,14 +19,14 @@
       <surname>Oliver</surname>
     </author>
-    <author>
-      <firstname>Joe</firstname>
-      <surname>Ciccone</surname>
-    </author>
   </authorgroup>
 
   <copyright id="copyright">
-    <year>2005&ndash;&year;</year>
-    <holder>Joe Ciccone, Jim Gifford, &amp; Ryan Oliver</holder>
+    <year>2005&ndash;2006</year>
+    <holder>Jim Gifford &amp; Ryan Oliver</holder>
   </copyright>
 
+  <bibliosource>
+    <emphasis>Based on LFS, Copyright © 1999&ndash;2006 Gerard Beekmans</emphasis>
+  </bibliosource>
+
 </bookinfo>
Index: OK/introduction/alpha-chapter.xml
===================================================================
--- BOOK/introduction/alpha-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,28 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../general.ent">
-  %general-entities;
-]>
-
-<chapter id="chapter-intro" xreflabel="Introduction">
-  <?dbhtml dir="introduction"?>
-  <?dbhtml filename="chapter.html"?>
-
-  <title>Introduction</title>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/acknowledgements.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/how.xml"/>
-  <!-- Uncoment after the first CLFS release
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/whatsnew.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="alpha/whatsnew.xml"/>
-  -->
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/changelog.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="alpha/changelog.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/resources.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/askforhelp.xml"/>
-  <!-- This page is only for published versions if the LiveCD is included
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="alpha/livecd.xml"/>
-  -->
-
-</chapter>
Index: OK/introduction/alpha/changelog.xml
===================================================================
--- BOOK/introduction/alpha/changelog.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,46 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-intro-changelog-alpha">
-  <title>Changelog for Alpha</title>
-  <?dbhtml filename="changelog-alpha.html"?>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/changelog.xml"
-  xpointer="xpointer(/sect1/para[1])"/>
-
-  <itemizedlist>
-    <title>Changelog Entries:</title>
-
-<!-- Changelog template
-
-    <listitem>
-      <para>Date</para>
-      <itemizedlist>
-        <listitem>
-          <para>[name] - Changelog entry.</para>
-        </listitem>
-        <listitem>
-          <para>[name] - Another changelog entry.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
--->
-
-    <listitem>
-      <para>February 19, 2007</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Added Alpha to the book.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-  </itemizedlist>
-
-</sect1>
Index: OK/introduction/alpha/livecd.xml
===================================================================
--- BOOK/introduction/alpha/livecd.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,106 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-intro-bootcd" arch="alpha">
-  <?dbhtml filename="bootcd.html"?>
-
-  <title>About the Included CD</title>
-
-  <para>For your convenience, we have included a CD with this book that
-  contains the source packages needed for creating a Linux From Scratch
-  system.  The CD is bootable and provides a stable working environment
-  for building LFS.  This book refers to this system as the
-  <quote>host system.</quote>  The CD images are actively maintained and
-  updated versions can be found at
-  <ulink url="ftp://ftp.lfs-matrix.de/pub/lfs-livecd/"/></para>
-
-  <para>In addition to the tools required to build LFS, the host system
-  on the CD has a number of other helpful tools installed:</para>
-
-  <itemizedlist>
-
-    <listitem>
-      <para>An HTML version of this book</para>
-    </listitem>
-
-    <listitem>
-      <para>The X Window System Environment</para>
-    </listitem>
-
-    <listitem>
-      <para>Web Tools</para>
-      <itemizedlist>
-        <listitem>
-          <para>Wget (command line file retriever)</para>
-        </listitem>
-        <listitem>
-          <para>Lynx (text web browser)</para>
-        </listitem>
-        <listitem>
-          <para>Irssi (console IRC client)</para>
-        </listitem>
-        <listitem>
-          <para>Firefox (graphical web browser)</para>
-        </listitem>
-        <listitem>
-          <para>Xchat (X-based IRC client)</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>Text Editors</para>
-      <itemizedlist>
-        <listitem>
-          <para>Vim</para>
-        </listitem>
-        <listitem>
-          <para>Nano</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>Network Tools</para>
-      <itemizedlist>
-        <listitem>
-          <para>SSH Server and Client</para>
-        </listitem>
-        <listitem>
-          <para>NFS Server and Client</para>
-        </listitem>
-        <listitem>
-          <para>Smbmount (mount.cifs) for Windows shares</para>
-        </listitem>
-        <listitem>
-          <para>Subversion</para>
-        </listitem>
-        <listitem>
-          <para>Dhcpcd (DHCP client)</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>Filesystem Programs</para>
-      <itemizedlist>
-        <listitem>
-          <para>Reiserfsprogs</para>
-        </listitem>
-        <listitem>
-          <para>Xfsprogs</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>nALFS - A tool for automating LFS builds</para>
-    </listitem>
-
-  </itemizedlist>
-
-</sect1>
Index: OK/introduction/alpha/whatsnew.xml
===================================================================
--- BOOK/introduction/alpha/whatsnew.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,40 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-intro-whatsnew-alpha">
-  <title>What's New for Alpha</title>
-  <?dbhtml filename="whatsnew-alpha.html"?>
-
-  <para>Below is a list of changes specifics for this architecture made
-  since the previous release of the book. For general changes see
-  <xref linkend="ch-intro-whatsnew"/>,</para>
-
-  <itemizedlist>
-    <title>Upgraded to:</title>
-
-    <listitem>
-      <para>None</para>
-    </listitem>
-  </itemizedlist>
-
-  <itemizedlist>
-    <title>Added:</title>
-
-    <listitem>
-      <para>None</para>
-    </listitem>
-  </itemizedlist>
-
-  <itemizedlist>
-    <title>Removed:</title>
-
-    <listitem>
-      <para>None</para>
-    </listitem>
-  </itemizedlist>
-
-</sect1>
Index: BOOK/introduction/arm-chapter.xml
===================================================================
--- BOOK/introduction/arm-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/introduction/arm-chapter.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../general.ent">
   %general-entities;
Index: BOOK/introduction/arm/changelog.xml
===================================================================
--- BOOK/introduction/arm/changelog.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/introduction/arm/changelog.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -34,18 +34,8 @@
 
     <listitem>
-      <para>April 5, 2009</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Added 2 patches to Glibc to fix errors while
-          compiling.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
       <para>May 24, 2006</para>
       <itemizedlist>
         <listitem>
-          <para>[jciccone] - Added arm to the book.</para>
+          <para>[jciccone] - Created the clfs-2.0 branch. Resetting all Changelogs.</para>
         </listitem>
       </itemizedlist>
Index: BOOK/introduction/arm/livecd.xml
===================================================================
--- BOOK/introduction/arm/livecd.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/introduction/arm/livecd.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
Index: BOOK/introduction/arm/whatsnew.xml
===================================================================
--- BOOK/introduction/arm/whatsnew.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/introduction/arm/whatsnew.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
Index: BOOK/introduction/common/acknowledgements.xml
===================================================================
--- BOOK/introduction/common/acknowledgements.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/introduction/common/acknowledgements.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -10,60 +10,10 @@
   <?dbhtml filename="acknowledgements.html"?>
 
-  <para>The CLFS team would like to acknowledge people who
+  <para>The editors of the book would like to acknowledge people who
   have assisted in making the book what it is today.</para>
-
-  <para>Our Leaders:</para>
 
   <itemizedlist>
     <listitem>
-      <para>Ryan Oliver - Build Process Developer.</para>
-    </listitem>
-    <listitem>
-      <para>Jim Gifford - Lead Developer.</para>
-    </listitem>
-    <listitem>
-      <para>Joe Ciccone - Lead Developer.</para>
-    </listitem>
-    <listitem>
-      <para>Jeremy Utley - Release Manager 1.x Series.</para>
-    </listitem>
-  </itemizedlist>
-
-  <para>Our CLFS Team:</para>
-
-  <itemizedlist>
-    <listitem>
-      <para>Nathan Coulson - Bootscripts.</para>
-    </listitem>
-    <listitem>
-      <para>Matt Darcy - x86, X86_64, and Sparc builds.</para>
-    </listitem>
-    <listitem>
-      <para>Manuel Canales Esparcia - Book XML.</para>
-    </listitem>
-    <listitem>
-      <para>Karen McGuiness - Proofreader.</para>
-    </listitem>
-    <listitem>
-      <para>Jeremy Huntwork - PowerPC, x86, Sparc builds.</para>
-    </listitem>
-    <listitem>
-      <para>Justin Knierim - Website Architect.</para>
-    </listitem>
-    <listitem>
-      <para>Ken Moffat - PowerPC and X86_64 builds. Developer of Pure 64 Hint.</para>
-    </listitem>
-    <listitem>
-      <para>Alexander E. Patrakov - Udev/Hotplug Integration</para>
-    </listitem>
-    <listitem>
-      <para>Chris Staub - x86 builds. Leader of Quality Control.</para>
-    </listitem>
-  </itemizedlist>
-
-  <para>Outside the Development Team</para>
-  <itemizedlist>
-    <listitem>
-      <para>Jürg Billeter - Testing and assisting in the development of the Linux Headers Package</para>
+      <para>Nathan Coulson - Bootscripts, typo, and content fixes.</para>
     </listitem>
     <listitem>
@@ -76,14 +26,19 @@
       <para>Tony Morgan - Typo and content fixes.</para>
     </listitem>
+    <listitem>
+      <para>Ryan Oliver - Developer of the Cross-LFS scripts.</para>
+    </listitem>
+    <listitem>
+      <para>Ken Moffat - Developer of the Pure64 Hint.</para>
+    </listitem>
   </itemizedlist>
 
-  <para>The CLFS team would also like to acknowledge contributions of people
-  from <ulink url="clfs-dev@lists.cross-lfs.org"/> and associated mailing lists
-  who have provided valuable technical and editorial corrections while testing
-  the Cross-LFS book.</para>
+<para>The editors of the book would also like to acknowledge people who
+have supported, spotted needed corrections, and testing of the cross-lfs book
+via the LFS-DEV Mailing lists.</para>
 
-  <itemizedlist>
+ <itemizedlist>
     <listitem>
-      <para>G. Moko - Text updates and Typos</para>
+      <para>Doug Ronne - Various x86_64 fixes.</para>
     </listitem>
     <listitem>
@@ -91,5 +46,17 @@
     </listitem>
     <listitem>
-      <para>Doug Ronne - Various x86_64 fixes.</para>
+      <para>Justin Knierim - Typos.</para>
+    </listitem>
+    <listitem>
+      <para>Joe Ciccone - Alpha Development, Testing and GCC 4.x fixes.</para>
+    </listitem>
+    <listitem>
+      <para>Matt Darcy - x86_64 Testing.</para>
+    </listitem>
+    <listitem>
+      <para>Alexander E. Patrakov - Udev/Hotplug Integration</para>
+    </listitem>
+    <listitem>
+      <para>G. Moko - Text updates and Typos</para>
     </listitem>
     <listitem>
@@ -99,14 +66,7 @@
       <para>Theo Schneider - Testing of the Linux Headers Package</para>
     </listitem>
-  </itemizedlist>
-
-  <para>The Linux From Scratch Project</para>
-  <itemizedlist>
     <listitem>
-      <para><ulink url="mailto:gerard@linuxfromscratch.org">Gerard
-      Beekmans</ulink> &lt;gerard@linuxfromscratch.org&gt; &ndash;
-      Creator of Linux From Scratch, on which Cross-LFS is based</para>
+      <para>Jürg Billeter - Testing and Developing of the Linux Headers Package</para>
     </listitem>
-
   </itemizedlist>
 
Index: BOOK/introduction/common/askforhelp.xml
===================================================================
--- BOOK/introduction/common/askforhelp.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/introduction/common/askforhelp.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -16,7 +16,10 @@
   answered on this page, try to find the source of the problem. The
   following hint will give you some guidance for troubleshooting:
-  <ulink url="&hints-root;Errors"/>.</para>
+  <ulink url="&hints-root;errors.txt"/>.</para>
 
-  <para>We also have a wonderful CLFS community that is willing to offer
+  <para>If you cannot find your problem listed in the FAQ, search the mailing
+  lists at <ulink url="&lfs-root;search.html"/>.</para>
+
+  <para>We also have a wonderful LFS community that is willing to offer
   assistance through the mailing lists and IRC (see the <xref
   linkend="ch-intro-resources"/> section of this book). However, we
@@ -24,5 +27,5 @@
   answered by going to the FAQ and by searching the mailing lists first.
   So for us to offer the best assistance possible, you need to do some
-  research on your own first. This allows us to focus on the more unusual
+  research on your own first. That allows us to focus on the more unusual
   support needs. If your searches do not produce a solution, please include
   all relevant information (mentioned below) in your request for help.</para>
@@ -41,25 +44,14 @@
       <listitem>
         <para>The host distribution and version being used to
-        create CLFS.</para>
+        create LFS</para>
       </listitem>
       <listitem>
-        <para>The architecture of the host and target.</para>
+        <para>The package or section the problem was encountered in</para>
       </listitem>
       <listitem>
-        <para>The value of the ${CLFS_HOST}, ${CLFS_TARGET}, ${BUILD32}, and ${BUILD64}
-        environment variables.</para>
+        <para>The exact error message or symptom being received</para>
       </listitem>
       <listitem>
-        <para>The package or section in which the problem was encountered.</para>
-      </listitem>
-      <listitem>
-        <para>The exact error message or symptom received. See <xref
-        linkend="ch-intro-askforhelp-compilation-problems"/> below for an
-        example.</para>
-      </listitem>
-      <listitem>
-        <para>Note whether you have deviated from the book at all. A package
-        version change or even a minor change to any command is considered
-        deviation.</para>
+        <para>Note whether you have deviated from the book at all </para>
       </listitem>
     </itemizedlist>
@@ -67,7 +59,7 @@
     <note>
       <para>Deviating from this book does <emphasis>not</emphasis>
-      mean that we will not help you. After all, the CLFS project is
-      about personal preference. Be upfront about any changes to
-      the established procedure&mdash;this helps us evaluate and determine
+      mean that we will not help you. After all, the LFS project is
+      about personal preference. Being upfront about any changes to
+      the established procedure helps us evaluate and determine
       possible causes of your problem.</para>
     </note>
@@ -80,12 +72,11 @@
     <para>If something goes wrong while running the <command>configure</command>
     script, review the <filename>config.log</filename> file. This file may
-    contain the errors you encountered during <command>configure</command>.
-    It often logs errors that may have not been printed to the screen. Include
-    only the <emphasis>relevant</emphasis> lines if you need to ask for
-    help.</para>
+    contain errors encountered during <command>configure</command> which were
+    not printed to the screen. Include the <emphasis>relevant</emphasis>
+    lines if you need to ask for help.</para>
 
   </sect2>
 
-  <sect2 id="ch-intro-askforhelp-compilation-problems">
+  <sect2>
     <title>Compilation Problems</title>
 
@@ -98,8 +89,8 @@
     from the screen output from <command>make</command>:</para>
 
-<screen><computeroutput>gcc -DALIASPATH=\"/mnt/clfs/usr/share/locale:.\"
--DLOCALEDIR=\"/mnt/clfs/usr/share/locale\"
--DLIBDIR=\"/mnt/clfs/usr/lib\"
--DINCLUDEDIR=\"/mnt/clfs/usr/include\" -DHAVE_CONFIG_H -I. -I.
+<screen><computeroutput>gcc -DALIASPATH=\"/mnt/lfs/usr/share/locale:.\"
+-DLOCALEDIR=\"/mnt/lfs/usr/share/locale\"
+-DLIBDIR=\"/mnt/lfs/usr/lib\"
+-DINCLUDEDIR=\"/mnt/lfs/usr/include\" -DHAVE_CONFIG_H -I. -I.
 -g -O2 -c getopt1.c
 gcc -g -O2 -static -o make ar.o arscan.o commands.o dir.o
@@ -108,11 +99,11 @@
 default.o remote-stub.o version.o opt1.o
 -lutil job.o: In function `load_too_high':
-/clfs/tmp/make-3.79.1/job.c:1565: undefined reference
+/lfs/tmp/make-3.79.1/job.c:1565: undefined reference
 to `getloadavg'
 collect2: ld returned 1 exit status
 make[2]: *** [make] Error 1
-make[2]: Leaving directory `/clfs/tmp/make-3.79.1'
+make[2]: Leaving directory `/lfs/tmp/make-3.79.1'
 make[1]: *** [all-recursive] Error 1
-make[1]: Leaving directory `/clfs/tmp/make-3.79.1'
+make[1]: Leaving directory `/lfs/tmp/make-3.79.1'
 make: *** [all-recursive-am] Error 2</computeroutput></screen>
 
Index: BOOK/introduction/common/changelog.xml
===================================================================
--- BOOK/introduction/common/changelog.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/introduction/common/changelog.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -14,5 +14,5 @@
   &releasedate;. If this book is more than six months old, a newer and better
   version is probably already available. To find out, please check one of the
-  mirrors via <ulink url="&clfs-wiki;"/>.</para>
+  mirrors via <ulink url="&lfs-root;"/>.</para>
 
   <para>Below is a list of detailed changes made since the previous release of
@@ -37,1570 +37,4 @@
 -->
 
-   <listitem>
-      <para>July 26, 2009</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Roll new EGlibc tarballs.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated the EGlibc fixes patch to -2.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Shadow to 4.1.4.2.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated DHCPCD to 5.0.6.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Gawk to 3.1.7.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated the Vim Branch Update Patch to -19.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated the Ncurses Branch Update Patch to
-          -18.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated GCC to 4.4.1.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated the Bash Branch Update Patch to -6.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Module Init Tools to 3.10.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Udev to 145.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Use Util-Linux-NG for libuuid and libblkid
-          instead of E2fsprogs.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Update Util-Linux-NG to 2.16.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated E2fsprogs to 1.41.8.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>July 11, 2009</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated Shadow to 4.1.4.1.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated the ZLib -fPIC patch to -2.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Automake to 1.11.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated DHCPCD to 4.0.4.</para>
-        </listitem>
-        <listitem>
-           <para>[jciccone] - Updated Bash Branch Update Patch to -5.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Moved DHCPCD to the Network section.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Less to 429.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated File to 5.03.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated the Kernel to 2.6.30.1.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Bootscripts to 1.2-pre8.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Glibc to EGLIBC 2.10.1.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Add CLooG and PPL for GCC, Based on Winkie's work
-          in the main branch.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-   <listitem>
-      <para>July 9, 2009</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated Coreutils to 7.4.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated IPRoute2 to 2.6.29-1.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Sed to 4.2.1.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Rsyslog to 4.2.0.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Procps to 3.2.8.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated the Binutils Branch Update patch to -5.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated E2fsprogs to 1.41.6.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated GMP to 4.3.1.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Findutils to 4.4.2.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated GCC to 4.4.0.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Util-Linux-NG to 2.15.1.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Udev to 143.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated M4 to 1.4.13.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated the MPFR Branch Update patch to -2.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Man-Pages to 3.21.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Module Init Tools to 3.9.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated the Vim Branch Update patch to -15.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Added Readline Branch Update Patch.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated the NCurses Branch Update Patch to -14.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - UUCP group no longer needed by udev.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>April 12, 2009</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Add a sysroot wrapper.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated the build variables.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>April 5, 2009</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Created a new Perl Cross Compile patch for
-          Perl 5.10.0.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>March 17, 2009</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated Glibc Cross Hacks Patch to -2.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Bootscripts to 1.2-pre6.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Module-Init-Tools to 3.6.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Linux 2.6.28.6.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated E2fsprogs to 1.41.4.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Applied Patch to Sysvinit. Fixed Various
-          Issues.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Moved location of dumpkeys to /bin. Required by
-          bootscripts.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Added --enable-multibyte to Groff.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Removed redundant acknowlegements page in
-          appendices.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>March 15, 2009</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Removed Get Counted page.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Hints URLs.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Grep to 2.5.4.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Added Arch to Util-Linux-NG. Updated descriptions
-          of configure parameters.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Util-Linux-NG to 2.14.2.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated the Linux Kernel to 2.6.28.7.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Man-Pages to 3.19.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Add File Fixes Patch.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Added New Compressors patches to File, Man,
-          Texinfo, Tar.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Binutils to 2.19.1.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Add Man Pages patch to Module-Init-Tools.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Add i18n patch to Procps.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Udev to 140.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Replaced Inetutils 1.6 with IP Utils 29971127.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Glibc 2.9.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Coreutils to 7.1.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Added XZ Utils 4.999.8beta.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Dependency Information.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Removed Sysklogd and Added Rsyslog 3.20.4.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Copied bootscript sections from trunk.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Bootscripts to 1.2-pre6.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Added DHCPCD to the final system.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated NCurses Branch Update Patch to -10.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Readline to 6.0.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Added i18n Patch to Diffutils.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Added i18n Patch to Grep.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Diffutils wants ed as a editor. Changed it to
-          Vim.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated GCC to 4.3.3.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated VIM Branch Update patch to -11.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated MPFR to 2.4.1 and added branch update
-          patch.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Bash to 4.0.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Tar to 1.22.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>Janurary 31, 2009</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Added Internationalization Patch to Man.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Groff to 1.20.1.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Ported the NCurses widec builds from trunk and
-          added the branch update patch.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Added command to make Perl use system-installed
-          Zlib. Fixes ticket #201.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Host System Requirements.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Add the Binutils Branch Update -4 Patch.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Change hard-links to relative-links in
-          bzip2.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Udev to 137. Fixed nagging uucp group
-          issue for udev.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Update Bootscripts to 1.2-pre3.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Add the VIM Branch Update -5 Patch.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Add the Tar Revert Pipe Drain patch and the Tar
-          Man Page patch.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated MPFR to 2.4.0.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated IPRoute2 to 2.6.28.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Added patch that will fix a build issue with Kbd. The patch is
-          for the linux-headers in final-system.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Linux to 2.6.28.2.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>Janurary 04, 2009</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Removed the vim cross-compile patch. It has been
-          sufficiently fixed upstream that so that config.cache entries are
-          enough.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Various Compilation fixes for the entire book.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Add NCurses Widec build.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Add GCC Branch Update Patch.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Add GMP and MPFR.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>Janurary 03, 2009</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Convert from the old depreciated kernel headers
-          tarball to the headers included with the kernel.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Update Patches.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Binutils to 2.19.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Glibc to 2.8.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated IPRoute2 to 2.6.26.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Libtool to 2.2.6a.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated the Kernel to 2.6.28.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated M4 to 1.4.12.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Man to 1.6f.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Man-Pages to 3.15.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Removed Mktemp.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Module-Init-Tools to 3.5.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated NCurses to 5.7.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Perl to 5.10.0.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated PSMisc to 22.6.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Shadow to 4.1.2.2.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Tar to 1.21.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Texinfo to 4.13a.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Udev to 135.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Util-Linux-NG to 2.14.1.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Vim to 7.2.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Less to 418.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Kbd to 1.15.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Inetutils to 1.6.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated IANA-ETC to 2.30.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Gettext to 0.17.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated GCC to 4.3.2.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Gawk to 3.1.6.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Flex to 2.5.35.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Findutils to 4.2.31.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated File to 4.26.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated E2fsProgs to 1.41.3.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Coreutils to 6.12.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated the Bootscripts to 1.2-pre2.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Bison to 2.4.1.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated BZip2 to 1.0.5.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Autoconf to 2.63.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Automake to 1.10.2.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>December 16, 2008</para>
-      <itemizedlist>
-        <listitem>
-          <para>[Jonathan] - Updated readline fixes patch to -4.</para>
-        </listitem>
-        <listitem>
-          <para>[Jonathan] - Corrected a typo in the changelog.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>December 16, 2008</para>
-      <itemizedlist>
-        <listitem>
-          <para>[Chris] - Corrected man-pages installation. Closes ticket
-          #187.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>January 21, 2008</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated the Bash fixes patch to -7.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>September 15, 2007</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Create entities for each UID and GID and reference
-          those entities throught the book instead of using user names and
-          group names.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Vim 7.1 fixes Patch to -3.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Readline 5.2 fixes Patch to -3.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Bash 3.2 fixes Patch to -6.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated CLFS Bootscripts to 1.1-pre4.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>September 9, 2007</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Build a PIC libfl.a with flex.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Util-Linux-ng 2.13.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Udev to 115.
-                             This change also removed the udev-cross-lfs package
-                             since our rules are the same as the ones installed.
-          </para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Man-Pages to 2.64.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Kbd to 1.13.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Less to 406.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Linux to 2.6.22.6 and Linux Headers to
-          2.6.22.6-09032007.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Sysklogd to 1.5.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Shadow Patch for more fixes. Man Page Typos
-          , buffer overflows, useradd -G fixes, better name support, and
-          the previous useradd fix.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Grep to 2.5.3.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Binutils to 2.18.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Glibc to 2.6.1.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>August 14, 2007</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Pointed Inetutils to the Ncurses headers in $CLFS.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-   <listitem>
-      <para>July 23, 2007</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated Texinfo to 4.9.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated E2fsprogs to 1.40.2.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated M4 to 1.4.10.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Tar to 1.18.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Libtool to 1.5.24.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated the Man Pages to 2.63.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>July 22, 2007</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated GCC to 4.2.1.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Glibc to 2.6.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>July 1, 2007</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated the download location for the Man Pages
-          package.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>June 18, 2007</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated to Tar 1.17.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Vim 7.1.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Findutils 4.2.31.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to File 4.21.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Less 403.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Man Pages 2.57.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>May 20, 2007</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated to GCC 4.2.0.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>April 30, 2007</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated to Man Pages 2.46.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Psmisc 22.5.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Gzip 1.3.12.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to M4 1.4.9.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Coreutile 6.9.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>April 4, 2007</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated Gzip's list of installed programs.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>March 10, 2007</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Added a patch to the Perl build that fixes an
-          issue with recent snapshots of gcc-4.2.0.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>March 9, 2007</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated Linux Headers to 2.6.20.1-02252007.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Linux to 2.6.20.1.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>February 19, 2007</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Changed the wording in the "Build Variables" page
-          to make it clearer. Copied from Chris's change in clfs-svn.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Fix the building of Ncurses when an unpatched
-          version of Bash 3.x is used.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Gzip to 1.3.11.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Added a command to remove the rules that Udev
-          installs by default.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated the Perl Cross-compile patch to
-          support Alpha.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>February 14, 2007</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated GCC to 4.1.2.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>February 06, 2007</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated Automake to 1.10.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated the Glibc Branch Update patch to -3.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Linux to 2.6.20.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Linux Headers to 2.6.20-02042007.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Udev to 105.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Udev Rules to 1.1-pre4.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>January 13, 2007</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated the Binutils Branch Update Patch.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated the Glibc Branch Update Patch.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>January 7, 2007</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated Bzip to 1.0.4.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>January 4, 2007</para>
-      <itemizedlist>
-        <listitem>
-          <para>[Chris] - Removed redundant command to copy libiberty.h to
-          ${CLFS}/usr/include a second time.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>December 23, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated Ncurses to 5.6.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>December 16, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated IPRoute2 to 2.6.19-061214</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Gzip to 1.3.9.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated File to 4.19.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Update Bash Patch from Upstream.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Added Readline Patch from Upstream.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Linux to 2.6.19.1.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Linux Headers to 2.6.19.1-12122006.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>December 11, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Removed MINOR patch and replaced it with a more
-          complete upstream patch will all current updates to the 2.5 branch
-          of Glibc.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Tar to 1.16.1.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Added Binutils Branch Update Patch.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Gzip to 1.3.8.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Linux Headers to 2.6.19-12042006.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Coreutils to 6.7.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>December 2, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated Linux-Headers to 2.6.19-11302006.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Linux to 2.6.19.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Man-Pages to 2.43.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>November 30, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated the Udev Rules to 1.1-pre3.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>November 29, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated Gettext to 0.16.1.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>November 25, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated Gzip to 1.3.6.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Man-Pages to 2.42.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Findutils to 4.2.29.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated the Glibc cross_hacks patch to -2. The new
-          version prevents <envar>CFLAGS</envar> from being used when compiling
-          a native tool.</para>
-        </listitem>
-        <listitem>
-          <para>[Chris] - Removed obsolete command from man instructions as
-          the problem it addresses was fixed in the latest man version).</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>November 24, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Added a native compile of Shadow. The native
-          utilities are configured to work with the target system. The password
-          and group files can now be shadowed and the root password can be set
-          before booting into the system.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>November 23, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Replace the glibc crosscompile timezone fix patch
-          with the glibc cross hacks patch. The new patch has support for
-          zoneinfo, locales, and librpcsvc.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Update the Glibc libgcc_eh patch to -2. The new
-          version checks to see if libgcc_eh exists and if it does Glibc will
-          link against it.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Man to 1.6e.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Coreutils to 6.6.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Linux to 2.6.18.3 and Linux Headers to
-          2.6.18.3-11202006.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated M4 to 1.4.8.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>November 20, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated Coreutils to 6.5.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Autoconf to 2.61.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>November 15, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated to IANA-Etc 2.20.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>November 14, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Bash 3.2 patch updated with upstream fixes 001-005.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Linux Headers 2.6.18.2-11122006.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>November 9, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[Chris] - Removed unnecessary creation of /etc/mtab.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>November 7, 2006</para>
-      <itemizedlist>
-       <listitem>
-         <para>[jciccone] - Added a patch to fix a versioning issue with Glibc 2.5.</para>
-       </listitem>
-       <listitem>
-         <para>[jciccone] - Updated to Glibc 2.5.</para>
-       </listitem>
-       <listitem>
-          <para>[jciccone] - Modified the instructions for disabling the
-          installation of the groups program to account for changes in shadow's
-          Makefile.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to File 4.18.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Bootscripts 1.1-pre3.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Bash 3.2 patch updated with upstream fixes.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Udev Rules 1.1-pre2.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Gettext 0.16.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Psmisc 22.3.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Moved e2fsprogs and sed before coreutils
-          for consistancy with clfs-svn. The testsuite dependency,
-          the reason for it moving, doesn't affect clfs2.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] -  Removed out of place udev text in bootscripts Networking.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Linux 2.6.18.2 and Linux-Headers 2.6.18.2-11052006.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Coreutils 6.4.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Udev 103.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Tar 1.16.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to IPRoute2 2.6.18-061002.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>November 5, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated to Inetutils 1.5.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Added command to man instructions to comment out
-          MANPATH /usr/local/man (in addition to /usr/man).</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Bash 3.2 with some unofficial upstream fixes. Thank you Chet Ramey.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>October 14, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated the udev rules tarball to 1.1-09062006.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated the vim fixes patch to -14.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Added patch to fix build issues with
-          Bash 3.2.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Udev to 102.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Man-Pages to 2.41.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Readline to 5.2.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Bash to 3.2.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - New patch for util-linux, replaces GCC 4 fixes.
-          The new patch fixes the same issues, and removes the use of
-          syscalls. Syscalls were removed from unistd.h during sanitation.
-          </para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Texinfo to 4.8a.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Added a patch to Util-Linux to fix build issues
-          due to changes in the kernel.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated M4 to 1.4.7</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Linux 2.6.18 and
-          Linux-Headers-2.6.18-09302006.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Bootscripts to 1.1-pre1. Adding in the
-          boot logging feature.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Removed TeX installation commands from Texinfo
-          instructions.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>October 5, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[manuel] - Changed book license to the Open Publication
-          License v1.0.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>August 31, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Added a Host System Requirements page.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Vim Patch -12, which contains upstream
-          fixes. This patch will be upgraded weekly, no further changelog
-          entries needed.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Add patch to fix gzexe. Used Matts change from LFS,
-          that utilizes Robert's fix. More details at
-          http://wiki.linuxfromscratch.org/lfs/ticket/1876.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Added a patch to fix Inetutils. Telnet on 64 bit
-          systems will fail, it will attempt to connect to 255.255.255.255
-          instead of the ip address entered. This was due to a change in glibc's
-          handling of inet_addr, was long now is u_int32_t. Bug found by
-          Vladimir Vainer.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Linux to 2.6.17.13 and Linux Headers to 2.6.17.13-09092006.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Replaced the Perl -fPIC patch with a sed.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Removed the keymap settings from the kernel
-          pages.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Added Shadow patch to fix useradd.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>August 30, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated to Coreutils Uname Patch -2, which supports all architectures.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Vim Patch -10, which contains upstream
-          fixes.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Udev 098 and udev-cross-lfs to
-          1.1-08272006 rules.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Findutils 4.2.28.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to M4 1.4.6.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Autoconf 2.60.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Man-Pages 2.39.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Procps 3.2.7.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Coreutils 0.97.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Shadow 4.0.18.1.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Gettext 0.15.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Cross-LFS Bootscripts 0.4.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Linux-2.6.17.11 and Linux-Headers to
-          2.6.17.11-08232006.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Added the Perl fPIC patch which makes perl build
-          a shared DynaLoader.a.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Removed mention of package users hint from
-          "Package Management" page.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>August 8, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Moved man-pages to the beginning of the build.
-          (fixes ticket #82).</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>August 7, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Fixed a problem where when bash is cross-compiled
-          it cannot test for the presence of named pipes.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Fixed symlink issue in bootscripts. New package
-          CLFS-bootscropts 0.3.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>July 22, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated the perl cross-compile patch to -2 to
-          support x86.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Added x86 to the book.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>July 21, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Added TZDIR="${CLFS}/usr/share/zoneinfo" to the
-          tzselect command. This makes sure that the tzselect command looks in
-          zoneinfo dir that was just installed by glibc instead of the host.
-          </para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>July 20, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Added groff to cross-tools to satisfy a dependency
-          when cross-compiling it later in the final system.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Udev-096.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to linux-2.6.17.6 and
-          linux-headers-2.6.17.6-07202006.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>July 16, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Added a sed to fix updatedb due to the new
-          location of find.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Removed unneeded chown and chmod commands from
-          the linux-headers installation.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>July 10, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated to linux-headers-2.6.17.4-07112006.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>July 10, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated to linux-headers-2.6.17.4-07092006.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>July 9, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated to linux-2.6.17.4 and
-          linux-headers-2.6.17.4-07072006.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Udev rules to 07062006, Fixed cdrom
-          permissions and groups. </para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Fixes a possible issue with bootscripts if the
-          /usr partition is not mounted during startup. Moved find to /bin
-          and moved some kbd utilities to /bin.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>July 2, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated passwd and group file creation
-                to only create minimal users and groups and
-                include information on other users/groups.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Cross-LFS Bootscripts. Added check for
-          for /etc/sysconfig/createfiles.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>June 28, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated to linux-headers-2.6.17.1-06272006.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>June 24, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated to Binutils-2.17.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>June 22, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated Vim 7.0 fixes patch to -5.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to linux-headers-2.6.17.1-06212006.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated Vim 7.0 fixes patch to -4.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Added mktemp to the Linux dependency list. New
-                dependency as of 2.6.17.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>June 21, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated to linux-2.6.17.1 and linux-headers-2.6.17.1-06202006-1.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>June 19, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated to man-1.6d.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Added an iconv_fix patch to glibc which fixes an
-                issue that has shown up primarily in samba.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to linux-2.6.17 and
-                linux-headers-2.6.17-06192006.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>June 18, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Added the glibc crosscompile_timezone-fix to glibc
-          which installs timezone info when cross-compiling.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>June 16, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Added information about cross-compiling perl.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>June 15, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated to Binutils-2.16.94.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>June 11, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated the list of installed programs for several packages.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Fixed the module-init-tools install in the presence of existing files.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Linux-Headers-2.6.16.20-10262006.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to Shadow-4.0.16.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>June 6, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Added information about cross-compiling vim.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>May 29, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated to linux-2.6.16.20, linux-headers-2.6.16.20-06052006, and Bison-2.3.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Added a patch to fix a missing declaration of R_OK in util-linux.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Updated to e2fsprogs-1.39, man-pages-2.33, and linux-headers-2.6.16.19-06042006.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>May 29, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Updated to linux-headers-05292006, udev-093, and binutils-2.16.93.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
     <listitem>
       <para>May 24, 2006</para>
@@ -1614,5 +48,5 @@
   </itemizedlist>
 
-  <para>Branch Synced from cross-lfs-1.0 on May 24th, 2006</para>
+  <para>Branch Synced from cross-lfs svn on May 24th, 2006</para>
 
 </sect1>
Index: BOOK/introduction/common/how.xml
===================================================================
--- BOOK/introduction/common/how.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/introduction/common/how.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -12,6 +12,6 @@
 
   <para>The CLFS system will be built by using a previously installed
-  Linux distribution (such as Debian, Fedora, Mandriva, SUSE, or Ubuntu).
-  This existing Linux system (the host) will be used as a starting point to
+  Linux distribution (such as Debian, Mandrake, Red Hat, or SuSE). This
+  existing Linux system (the host) will be used as a starting point to
   provide necessary programs, including a compiler, linker, and shell,
   to build the new system. Select the <quote>development</quote> option
@@ -20,16 +20,14 @@
 
   <para>As an alternative to installing an entire separate distribution
-  onto your machine, you may wish to use the Linux From Scratch LiveCD.
-  This CD works well as a host system, providing all the tools you need to
-  successfully follow the instructions in this book. It does also
-  contain source packages and patches for the LFS book, and a copy of the LFS
-  book, but not the needed packages or book for CLFS. You can still use the
-  CD for building CLFS, but you will need to download the packages, patches
-  and book separately. You can also look at
-  <ulink url="&hints-root;Remastering_the_LFS_LiveCD"/>
-  for infomation on building your own CD, replacing the LFS packages and book
-  with those for CLFS. Once you have the CD, no network connection or
-  additional downloads are necessary. For more information about the LFS
-  LiveCD or to download a copy, visit <ulink url="&livecd-root;"/>.</para>
+  onto your machine, you may wish to
+  use the Linux From Scratch LiveCD. The CD works well as a host system,
+  providing all the tools you need to successfully follow the instructions
+  in this book. Additionally, it contains all the source packages, patches
+  and a copy of this book. So once you have the CD, no network connection
+  or additional downloads are necessary. For more information about the
+  LFS LiveCD or to download a copy, visit <ulink url="&livecd-root;"/></para>
+
+  <!-- -->
+  <para>THE TEXT BELOW NEEDS TO BE REWRITTEN</para>
 
   <para><xref linkend="chapter-partitioning"/> of this book describes how
@@ -42,29 +40,63 @@
   <xref linkend="chapter-final-preps"/> carefully as it explains several
   important issues the developer should be aware of before beginning to
-  work through <xref linkend="chapter-cross-tools"/> and beyond.</para>
+  work through <xref linkend="chapter-cross-tools"/> and
+  beyond.</para>
 
   <para><xref linkend="chapter-cross-tools"/> explains the installation of
   cross-compile tools which will be built on the host but be able to compile
   programs that run on the target machine. These cross-compile tools will
-  be used to create the final-system.</para>
+  be used to create a temporary, minimal system that will be the basis for
+  building the final CLFS system. Some of these packages are needed to resolve
+  circular dependencies&mdash;for example, to compile a compiler, you need a
+  compiler.</para>
 
   <para>The process of building cross-compile tools first involves installing
-  binutils into ${CLFS}/cross-tools, so that we have an asembler and a linker
-  for our target architecture. GCC is then compiled statically and installed
-  into ${CLFS}/cross-tools, this cross-compiler is used to build EGLIBC for the
-  final-system. The GCC cross-compiler is then rebuilt dynamically - this final
-  cross-compiler is what will be used to build the final-system.</para>
+  binutils into /cross-tools, so that the linker can be used with the building
+  of everything else in the temp-system. GCC is then compiled statically and
+  installed into /cross-tools, and this cross-compiler is used to build glibc
+  into /tools for the temp-system. The GCC cross-compiler is then rebuilt
+  dynamically - this final cross-compiler is what will be used to build the
+  rest of the temporary system. When this is done, the CLFS installation
+  process will no longer depend on the host distribution, with the exception
+  of the running kernel.
+  <!-- still needs some work - needs to provide a better technical
+explanation, especially the reasoning for compiling gcc statically then dynamically... --></para>
+
+  <para>The packages in <!-- <xref linkend="chapter-temp-system"/> --> are then built
+  using the cross-compiled tools in /cross-tools, and linked against the
+  C library that was installed during the building of the cross-tools.</para>
+
+  <para>This effort to isolate the new system from the host distribution
+  may seem excessive, but a full technical explanation is provided at the
+  beginning of <!-- <xref linkend="chapter-temp-system"/> -->.</para>
 
   <para>In <xref linkend="chapter-building-system"/>, the full CLFS system is
-  cross-compiled. The system is built using a sysroot compiler. Sysroot is a
-  parameter passed to binutils and gcc that modifies its default search paths.
-  </para>
+  built. Depending on the system you are cross-compiling for, either you will
+  boot the minimal temp-system on the target machine, or chroot into it.</para>
+
+  <para>The <command>chroot</command> (change root) program is used to enter
+  a virtual environment and start a new shell whose root directory will be set
+  to the CLFS partition. This is very similar to rebooting and instructing the
+  kernel to mount the CLFS partition as the root partition.
+  The major advantage is that <quote>chrooting</quote> allows the builder to
+  continue using the host while CLFS is being built. While waiting for package
+  compilation to complete, a user can switch to a different virtual console
+  (VC) or X desktop and continue using the computer as normal.</para>
+
+  <para>Some systems cannot be built by chrooting so they must be
+  booted instead. Generally, if you building for a different arch than
+  the host system, you must reboot because the kernel will likely not
+  support the target machine. Booting involves installing a few
+  additional packages that are needed for bootup, installing
+  bootscripts, and building a miminal kernel.</para>
 
   <para>To finish the installation, the CLFS-Bootscripts are set up in <xref
   linkend="chapter-bootscripts"/>, and the kernel and boot loader are set
-  up in <xref linkend="chapter-bootable"/>. <xref linkend="chapter-finalizing"/>
-  contains information on furthering the CLFS experience beyond this book.
-  After the steps in this book have been implemented, the computer will be
-  ready to reboot into the new CLFS system.</para>
+  up in <xref linkend="chapter-bootable"/>. <xref
+  linkend="chapter-finalizing"/> contains information on furthering the
+  CLFS experience beyond this book.  After the steps in this book have
+  been implemented, the computer will be ready to reboot into the new
+  CLFS system.</para>
+  <!-- -->
 
   <para>This is the process in a nutshell. Detailed information on each
Index: BOOK/introduction/common/resources.xml
===================================================================
--- BOOK/introduction/common/resources.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/introduction/common/resources.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -14,5 +14,5 @@
     <title>FAQ</title>
 
-    <para>If during the building of the CLFS system you encounter any
+    <para>If during the building of the LFS system you encounter any
     errors, have any questions, or think there is a typo in the book,
     please start by consulting the Frequently Asked Questions (FAQ)
@@ -24,15 +24,14 @@
     <title>Mailing Lists</title>
 
-    <para>The <uri>cross-lfs.org</uri> server hosts a number of
-    mailing lists used for the development of the CLFS project. These lists
+    <para>The <uri>linuxfromscratch.org</uri> server hosts a number of
+    mailing lists used for the development of the LFS project. These lists
     include the main development and support lists, among others. If the
-    FAQ does not contain your answer, you can search the CLFS lists via
-    The Mail Archive <ulink url="http://www.mail-archive.com"/>. You can
-    find the mail lists with the following link:</para>
+    FAQ does not solve the problem you are having, the next step would be to
+    search the mailing lists at <ulink url="&lfs-root;search.html"/>.</para>
 
-    <para><ulink url="http://www.mail-archive.com/index.php?hunt=clfs"/></para>
-   
     <para>For information on the different lists, how to subscribe, archive
-    locations, and additional information, visit <ulink url="&clfs-wiki;wiki/lists"/>.</para>
+    locations, and additional information, visit
+    <ulink url="&lfs-root;mail.html"/>. For mailing lists specifically
+    for CLFS, visit <ulink url="&clfs-root;wiki/lists"/>.</para>
 
   </sect2>
@@ -41,10 +40,7 @@
     <title>News Server</title>
 
-    <para>Cross-LFS does not maintain its own News Server, but we do provide
-    access via <uri>gmane.org</uri> <ulink url="http://gmane.org"/>. If you want to subscribe
-    to the Cross-LFS lists via a newsreader you can utilize <uri>gmane.org</uri>.
-    You can find the gmane search for CLFS with the following link:</para>
-
-   <para><ulink url="http://dir.gmane.org/search.php?match=clfs"/></para>
+    <para> The Linux From Scratch News Server is no longer available.
+    Please use the other support methods listed on this page
+    </para>
 
   </sect2>
@@ -53,12 +49,22 @@
     <title>IRC</title>
 
-    <para>Several members of the CLFS community offer assistance on our
+    <para>Several members of the LFS community offer assistance on our
     community Internet Relay Chat (IRC) network. Before using this support,
-    please make sure that your question is not already answered in the CLFS
+    please make sure that your question is not already answered in the LFS
     FAQ or the mailing list archives. You can find the IRC network at
-    <uri>chat.freenode.net</uri>. The support channel for cross-lfs is
-    named #cross-lfs. If you need to show people the output of your
-    problems, please use http://pastebin.cross-lfs.org and reference
+    <uri>irc.linuxfromscratch.org</uri>. The support channel for cross-lfs is
+    named #cross-lfs. For support on the standard LFS the support channel
+    is named #lfs-support. If you need to show people the output of your
+    problems, please use http://pastebin.linuxfromscratch.org and reference
     the pastebin URL when asking your questions.</para>
+
+  </sect2>
+
+  <sect2 id="ch-intro-references">
+    <title>References</title>
+
+    <para>For additional information on the packages, useful tips are
+    available in the LFS Package Reference page located at <ulink
+    url="&lfs-root;~matthew/LFS-references.html"/>.</para>
 
   </sect2>
@@ -67,8 +73,8 @@
     <title>Mirror Sites</title>
 
-    <para>The CLFS project has a number of world-wide mirrors to make
+    <para>The LFS project has a number of world-wide mirrors to make
     accessing the website and downloading the required packages more
-    convenient. Please visit the CLFS website at
-    <ulink url="&clfs-wiki;wiki/mirrors"/> for mirrors of CLFS.</para>
+    convenient. Please visit the LFS website at <ulink
+    url="&lfs-root;mirrors.html"/> for a list of current mirrors.</para>
 
   </sect2>
@@ -77,6 +83,6 @@
     <title>Contact Information</title>
 
-    <para>Please direct all your questions and comments to the
-    CLFS mailing lists (see above).</para>
+    <para>Please direct all your questions and comments to one of the LFS
+    or CLFS mailing lists (see above).</para>
 
   </sect2>
Index: BOOK/introduction/common/whatsnew.xml
===================================================================
--- BOOK/introduction/common/whatsnew.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/introduction/common/whatsnew.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -11,5 +11,5 @@
   <title>What's new since the last release.</title>
 
-  <para>Below is a list of package updates made since the previous release of the book.</para>
+  <para>Below is a list of package updates  made since the previous release of the book.</para>
 
   <itemizedlist>
Index: OK/introduction/hppa-chapter.xml
===================================================================
--- BOOK/introduction/hppa-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,28 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../general.ent">
-  %general-entities;
-]>
-
-<chapter id="chapter-intro" xreflabel="Introduction">
-  <?dbhtml dir="introduction"?>
-  <?dbhtml filename="chapter.html"?>
-
-  <title>Introduction</title>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/acknowledgements.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/how.xml"/>
-  <!-- Uncoment after the first CLFS release
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/whatsnew.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="hppa/whatsnew.xml"/>
-  -->
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/changelog.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="hppa/changelog.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/resources.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/askforhelp.xml"/>
-  <!-- This page is only for published versions if the LiveCD is included
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="hppa/livecd.xml"/>
-  -->
-
-</chapter>
Index: OK/introduction/hppa/changelog.xml
===================================================================
--- BOOK/introduction/hppa/changelog.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,60 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-intro-changelog-hppa">
-  <title>Changelog for PA-RISC</title>
-  <?dbhtml filename="changelog-hppa.html"?>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/changelog.xml"
-  xpointer="xpointer(/sect1/para[1])"/>
-
-  <itemizedlist>
-    <title>Changelog Entries:</title>
-
-<!-- Changelog template
-
-    <listitem>
-      <para>Date</para>
-      <itemizedlist>
-        <listitem>
-          <para>[name] - Changelog entry.</para>
-        </listitem>
-        <listitem>
-          <para>[name] - Another changelog entry.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
--->
-
-    <listitem>
-      <para>November 30, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Added the GCC PR29114 patch which fixes the
-          compilation of Glibc on a 64bit host.</para>
-        </listitem>
-        <listitem>
-          <para>[jciccone] - Added a Glibc NPTL patch that allows Glibc to
-          compile with NPTL working support.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>November 26, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Added PA-RISC to the book.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-  </itemizedlist>
-
-</sect1>
Index: OK/introduction/hppa/livecd.xml
===================================================================
--- BOOK/introduction/hppa/livecd.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,106 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-intro-bootcd" arch="hppa">
-  <?dbhtml filename="bootcd.html"?>
-
-  <title>About the Included CD</title>
-
-  <para>For your convenience, we have included a CD with this book that
-  contains the source packages needed for creating a Linux From Scratch
-  system.  The CD is bootable and provides a stable working environment
-  for building LFS.  This book refers to this system as the
-  <quote>host system.</quote>  The CD images are actively maintained and
-  updated versions can be found at
-  <ulink url="ftp://ftp.lfs-matrix.de/pub/lfs-livecd/"/></para>
-
-  <para>In addition to the tools required to build LFS, the host system
-  on the CD has a number of other helpful tools installed:</para>
-
-  <itemizedlist>
-
-    <listitem>
-      <para>An HTML version of this book</para>
-    </listitem>
-
-    <listitem>
-      <para>The X Window System Environment</para>
-    </listitem>
-
-    <listitem>
-      <para>Web Tools</para>
-      <itemizedlist>
-        <listitem>
-          <para>Wget (command line file retriever)</para>
-        </listitem>
-        <listitem>
-          <para>Lynx (text web browser)</para>
-        </listitem>
-        <listitem>
-          <para>Irssi (console IRC client)</para>
-        </listitem>
-        <listitem>
-          <para>Firefox (graphical web browser)</para>
-        </listitem>
-        <listitem>
-          <para>Xchat (X-based IRC client)</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>Text Editors</para>
-      <itemizedlist>
-        <listitem>
-          <para>Vim</para>
-        </listitem>
-        <listitem>
-          <para>Nano</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>Network Tools</para>
-      <itemizedlist>
-        <listitem>
-          <para>SSH Server and Client</para>
-        </listitem>
-        <listitem>
-          <para>NFS Server and Client</para>
-        </listitem>
-        <listitem>
-          <para>Smbmount (mount.cifs) for Windows shares</para>
-        </listitem>
-        <listitem>
-          <para>Subversion</para>
-        </listitem>
-        <listitem>
-          <para>Dhcpcd (DHCP client)</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>Filesystem Programs</para>
-      <itemizedlist>
-        <listitem>
-          <para>Reiserfsprogs</para>
-        </listitem>
-        <listitem>
-          <para>Xfsprogs</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>nALFS - A tool for automating LFS builds</para>
-    </listitem>
-
-  </itemizedlist>
-
-</sect1>
Index: OK/introduction/hppa/whatsnew.xml
===================================================================
--- BOOK/introduction/hppa/whatsnew.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,40 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-intro-whatsnew-hppa">
-  <title>What's New for PA-RISC</title>
-  <?dbhtml filename="whatsnew-hppa.html"?>
-
-  <para>Below is a list of changes specifics for this architecture made
-  since the previous release of the book. For general changes see
-  <xref linkend="ch-intro-whatsnew"/>,</para>
-
-  <itemizedlist>
-    <title>Upgraded to:</title>
-
-    <listitem>
-      <para>None</para>
-    </listitem>
-  </itemizedlist>
-
-  <itemizedlist>
-    <title>Added:</title>
-
-    <listitem>
-      <para>None</para>
-    </listitem>
-  </itemizedlist>
-
-  <itemizedlist>
-    <title>Removed:</title>
-
-    <listitem>
-      <para>None</para>
-    </listitem>
-  </itemizedlist>
-
-</sect1>
Index: OK/introduction/x86-chapter.xml
===================================================================
--- BOOK/introduction/x86-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,28 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../general.ent">
-  %general-entities;
-]>
-
-<chapter id="chapter-intro" xreflabel="Introduction">
-  <?dbhtml dir="introduction"?>
-  <?dbhtml filename="chapter.html"?>
-
-  <title>Introduction</title>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/acknowledgements.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/how.xml"/>
-  <!-- Uncoment after the first CLFS release
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/whatsnew.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="x86/whatsnew.xml"/>
-  -->
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/changelog.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="x86/changelog.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/resources.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/askforhelp.xml"/>
-  <!-- This page is only for published versions if the LiveCD is included
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="x86/livecd.xml"/>
-  -->
-
-</chapter>
Index: OK/introduction/x86/changelog.xml
===================================================================
--- BOOK/introduction/x86/changelog.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,46 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-intro-changelog-x86">
-  <title>Changelog for x86</title>
-  <?dbhtml filename="changelog-x86.html"?>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/changelog.xml"
-  xpointer="xpointer(/sect1/para[1])"/>
-
-  <itemizedlist>
-    <title>Changelog Entries:</title>
-
-<!-- Changelog template
-
-    <listitem>
-      <para>Date</para>
-      <itemizedlist>
-        <listitem>
-          <para>[name] - Changelog entry.</para>
-        </listitem>
-        <listitem>
-          <para>[name] - Another changelog entry.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
--->
-
-    <listitem>
-      <para>June 22, 2006</para>
-      <itemizedlist>
-        <listitem>
-          <para>[jciccone] - Added x86 to the book.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-  </itemizedlist>
-
-</sect1>
Index: OK/introduction/x86/livecd.xml
===================================================================
--- BOOK/introduction/x86/livecd.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,106 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-intro-bootcd" arch="x86">
-  <?dbhtml filename="bootcd.html"?>
-
-  <title>About the Included CD</title>
-
-  <para>For your convenience, we have included a CD with this book that
-  contains the source packages needed for creating a Linux From Scratch
-  system.  The CD is bootable and provides a stable working environment
-  for building LFS.  This book refers to this system as the
-  <quote>host system.</quote>  The CD images are actively maintained and
-  updated versions can be found at
-  <ulink url="ftp://ftp.lfs-matrix.de/pub/lfs-livecd/"/></para>
-
-  <para>In addition to the tools required to build LFS, the host system
-  on the CD has a number of other helpful tools installed:</para>
-
-  <itemizedlist>
-
-    <listitem>
-      <para>An HTML version of this book</para>
-    </listitem>
-
-    <listitem>
-      <para>The X Window System Environment</para>
-    </listitem>
-
-    <listitem>
-      <para>Web Tools</para>
-      <itemizedlist>
-        <listitem>
-          <para>Wget (command line file retriever)</para>
-        </listitem>
-        <listitem>
-          <para>Lynx (text web browser)</para>
-        </listitem>
-        <listitem>
-          <para>Irssi (console IRC client)</para>
-        </listitem>
-        <listitem>
-          <para>Firefox (graphical web browser)</para>
-        </listitem>
-        <listitem>
-          <para>Xchat (X-based IRC client)</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>Text Editors</para>
-      <itemizedlist>
-        <listitem>
-          <para>Vim</para>
-        </listitem>
-        <listitem>
-          <para>Nano</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>Network Tools</para>
-      <itemizedlist>
-        <listitem>
-          <para>SSH Server and Client</para>
-        </listitem>
-        <listitem>
-          <para>NFS Server and Client</para>
-        </listitem>
-        <listitem>
-          <para>Smbmount (mount.cifs) for Windows shares</para>
-        </listitem>
-        <listitem>
-          <para>Subversion</para>
-        </listitem>
-        <listitem>
-          <para>Dhcpcd (DHCP client)</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>Filesystem Programs</para>
-      <itemizedlist>
-        <listitem>
-          <para>Reiserfsprogs</para>
-        </listitem>
-        <listitem>
-          <para>Xfsprogs</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>nALFS - A tool for automating LFS builds</para>
-    </listitem>
-
-  </itemizedlist>
-
-</sect1>
Index: OK/introduction/x86/whatsnew.xml
===================================================================
--- BOOK/introduction/x86/whatsnew.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,40 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-intro-whatsnew-x86">
-  <title>What's New for x86</title>
-  <?dbhtml filename="whatsnew-x86.html"?>
-
-  <para>Below is a list of changes specifics for this architecture made
-  since the previous release of the book. For general changes see
-  <xref linkend="ch-intro-whatsnew"/>,</para>
-
-  <itemizedlist>
-    <title>Upgraded to:</title>
-
-    <listitem>
-      <para>None</para>
-    </listitem>
-  </itemizedlist>
-
-  <itemizedlist>
-    <title>Added:</title>
-
-    <listitem>
-      <para>None</para>
-    </listitem>
-  </itemizedlist>
-
-  <itemizedlist>
-    <title>Removed:</title>
-
-    <listitem>
-      <para>None</para>
-    </listitem>
-  </itemizedlist>
-
-</sect1>
Index: OK/materials/alpha-chapter.xml
===================================================================
--- BOOK/materials/alpha-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,20 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../general.ent">
-  %general-entities;
-]>
-
-<chapter id="chapter-getting-materials" xreflabel="Packages and Patches">
-  <?dbhtml dir="materials"?>
-  <?dbhtml filename="chapter.html"?>
-
-  <title>Packages and Patches</title>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/introduction.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/packages.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="alpha/packages.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/patches.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="alpha/patches.xml"/>
-
-</chapter>
Index: OK/materials/alpha/packages.xml
===================================================================
--- BOOK/materials/alpha/packages.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,23 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-materials-packages-alpha">
-  <?dbhtml filename="packages-alpha.html"?>
-
-  <title>Additional Packages for Alpha</title>
-
-<!--
-  <variablelist role="materials">
-
-  </variablelist>
--->
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../common/packages.xml"
-  xpointer="xpointer(//*[@os='a'])"/>
-
-</sect1>
Index: OK/materials/alpha/patches.xml
===================================================================
--- BOOK/materials/alpha/patches.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,23 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-materials-patches-alpha">
-  <?dbhtml filename="patches-alpha.html"?>
-
-  <title>Additional Patches for Alpha</title>
-
-<!--
-  <variablelist role="materials">
-
-  </variablelist>
--->
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../common/patches.xml"
-  xpointer="xpointer(//*[@os='a'])"/>
-
-</sect1>
Index: BOOK/materials/arm-chapter.xml
===================================================================
--- BOOK/materials/arm-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/materials/arm-chapter.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../general.ent">
   %general-entities;
Index: BOOK/materials/arm/packages.xml
===================================================================
--- BOOK/materials/arm/packages.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/materials/arm/packages.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -7,21 +7,21 @@
 
 <sect1 id="ch-materials-packages-arm">
-  <?dbhtml filename="packages-arm.html"?>
+  <?dbhtml filename="packages-ARM.html"?>
 
   <title>Additional Packages for ARM</title>
-
+<!--
   <variablelist role="materials">
 
-    <varlistentry os="eglibcports">
-      <term>EGLIBC Ports (&eglibc-ports-version;) - <token>&eglibc-ports-size;</token>:</term>
+    <varlistentry os="grub">
+      <term>GRUB (&grub-version;) - <token>&grub-size;</token>:</term>
       <listitem>
-        <para>Home page: <ulink url="&eglibc-ports-home;"/></para>
-        <para>Download: <ulink url="&eglibc-ports-url;"/></para>
-        <para>MD5 sum: <literal>&eglibc-ports-md5;</literal></para>
+        <para>Home page: <ulink url="&grub-home;"/></para>
+        <para>Download: <ulink url="&grub-url;"/></para>
+        <para>MD5 sum: <literal>&grub-md5;</literal></para>
       </listitem>
     </varlistentry>
 
   </variablelist>
-
+-->
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
   href="../common/packages.xml"
Index: BOOK/materials/arm/patches.xml
===================================================================
--- BOOK/materials/arm/patches.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/materials/arm/patches.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -10,11 +10,27 @@
 
   <title>Additional Patches for ARM</title>
-
 <!--
   <variablelist role="materials">
 
+    <varlistentry os="coreutils-x86_uname-patch">
+      <term>Coreutils Uname Patch - <token>&coreutils-x86_uname-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink
+        url="&patches-root;coreutils/&coreutils-x86_uname-patch;"/></para>
+        <para>MD5 sum: <literal>&coreutils-x86_uname-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry os="gcc-specs-patch">
+      <term>GCC Specs Patch - <token>&gcc-specs-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink
+        url="&patches-root;gcc/&gcc-specs-patch;"/></para>
+        <para>MD5 sum: <literal>&gcc-specs-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
   </variablelist>
 -->
-
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
   href="../common/patches.xml"
Index: BOOK/materials/common/introduction.xml
===================================================================
--- BOOK/materials/common/introduction.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/materials/common/introduction.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -25,10 +25,14 @@
   most packages. If this search is unsuccessful, try one of the
   alternative means of downloading discussed at <ulink
-  url="&packages-root;"/>.</para>
+  url="&lfs-root;lfs/packages.html"/>.</para>
 
-  <para>Create a directory called
-  <filename class="directory">${CLFS}/sources</filename> and use it to store
-  your sources and patches. All packages should be compiled there as well.
-  Using any other location for compiling may have unexpected results.</para>
+  <para>Downloaded packages and patches will need to be stored somewhere
+  that is conveniently available throughout the entire build. A working
+  directory is also required to unpack the sources and build them.
+  <filename class="directory">$LFS/sources</filename> can be used both
+  as the place to store the tarballs and patches and as a working
+  directory. By using this directory, the required elements will be
+  located on the CLFS partition and will be available during all stages
+  of the building process.</para>
 
   <para>To create this directory, execute, as user <systemitem
@@ -36,13 +40,13 @@
   starting the download session:</para>
 
-<screen><userinput>mkdir -v ${CLFS}/sources</userinput></screen>
+<screen><userinput>mkdir -v $LFS/sources</userinput></screen>
 
-  <para>Make this directory writable and sticky. When a directory is
-  marked <quote>sticky</quote>, that means that even if multiple users have
-  write permission on that directory, any file within that directory can only be
-  deleted or modified by its owner. The following command will enable the
-  write and sticky modes:</para>
+  <para>Make this directory writable and sticky. <quote>Sticky</quote>
+  means that even if multiple users have write permission on a
+  directory, only the owner of a file can delete the file within a
+  sticky directory. The following command will enable the write and
+  sticky modes:</para>
 
-<screen><userinput>chmod -v a+wt ${CLFS}/sources</userinput></screen>
+<screen><userinput>chmod -v a+wt $LFS/sources</userinput></screen>
 
 </sect1>
Index: BOOK/materials/common/packages.xml
===================================================================
--- BOOK/materials/common/packages.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/materials/common/packages.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -43,4 +43,13 @@
 
     <varlistentry>
+      <term>Bash Documentation (&bash-doc-version;) - <token>&bash-doc-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&bash-doc-home;"/></para>
+        <para>Download: <ulink url="&bash-doc-url;"/></para>
+        <para>MD5 sum: <literal>&bash-doc-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
       <term>Binutils (&binutils-version;) - <token>&binutils-size;</token>:</term>
       <listitem>
@@ -61,13 +70,4 @@
 
     <varlistentry>
-      <term>Bootscripts for CLFS (&bootscripts-clfs-version;) - <token>&bootscripts-clfs-size;</token>:</term>
-      <listitem>
-        <para>Home page: <ulink url="&bootscripts-clfs-home;"/></para>
-        <para>Download: <ulink url="&bootscripts-clfs-url;"/></para>
-        <para>MD5 sum: <literal>&bootscripts-clfs-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
       <term>Bzip2 (&bzip2-version;) - <token>&bzip2-size;</token>:</term>
       <listitem>
@@ -79,9 +79,9 @@
 
     <varlistentry>
-      <term>ClooG-PPL (&cloog-ppl-version;) - <token>&cloog-ppl-size;</token>:</term>
-      <listitem>
-        <para>Home page: <ulink url="&cloog-ppl-home;"/></para>
-        <para>Download: <ulink url="&cloog-ppl-url;"/></para>
-        <para>MD5 sum: <literal>&cloog-ppl-md5;</literal></para>
+      <term>CLFS-Bootscripts (&clfs-bootscripts-version;) - <token>&clfs-bootscripts-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&clfs-bootscripts-home;"/></para>
+        <para>Download: <ulink url="&clfs-bootscripts-url;"/></para>
+        <para>MD5 sum: <literal>&clfs-bootscripts-md5;</literal></para>
       </listitem>
     </varlistentry>
@@ -97,9 +97,9 @@
 
     <varlistentry>
-      <term>DHCPCD (&dhcpcd-version;) - <token>&dhcpcd-size;</token>:</term>
-      <listitem>
-        <para>Home page: <ulink url="&dhcpcd-home;"/></para>
-        <para>Download: <ulink url="&dhcpcd-url;"/></para>
-        <para>MD5 sum: <literal>&dhcpcd-md5;</literal></para>
+      <term>DejaGNU (&dejagnu-version;) - <token>&dejagnu-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&dejagnu-home;"/></para>
+        <para>Download: <ulink url="&dejagnu-url;"/></para>
+        <para>MD5 sum: <literal>&dejagnu-md5;</literal></para>
       </listitem>
     </varlistentry>
@@ -124,18 +124,9 @@
 
     <varlistentry>
-      <term>EGLIBC (&eglibc-version;) - <token>&eglibc-size;</token>:</term>
-      <listitem>
-        <para>Home page: <ulink url="&eglibc-home;"/></para>
-        <para>Download: <ulink url="&eglibc-url;"/></para>
-        <para>MD5 sum: <literal>&eglibc-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
-      <term>EGLIBC Localedef (&eglibc-localedef-version;) - <token>&eglibc-localedef-size;</token>:</term>
-      <listitem>
-        <para>Home page: <ulink url="&eglibc-localedef-home;"/></para>
-        <para>Download: <ulink url="&eglibc-localedef-url;"/></para>
-        <para>MD5 sum: <literal>&eglibc-localedef-md5;</literal></para>
+      <term>Expect (&expect-version;) - <token>&expect-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&expect-home;"/></para>
+        <para>Download: <ulink url="&expect-url;"/></para>
+        <para>MD5 sum: <literal>&expect-md5;</literal></para>
       </listitem>
     </varlistentry>
@@ -154,5 +145,5 @@
           released. An alternative download location that may have the
           correct version available is <ulink
-          url="&packages-root;"/>.</para>
+          url="http://www.linuxfromscratch.org/lfs/download.html#ftp"/>.</para>
         </note>
       </listitem>
@@ -205,9 +196,9 @@
 
     <varlistentry>
-      <term>GMP (&gmp-version;) - <token>&gmp-size;</token>:</term>
-      <listitem>
-        <para>Home page: <ulink url="&gmp-home;"/></para>
-        <para>Download: <ulink url="&gmp-url;"/></para>
-        <para>MD5 sum: <literal>&gmp-md5;</literal></para>
+      <term>Glibc (&glibc-version;) - <token>&glibc-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&glibc-home;"/></para>
+        <para>Download: <ulink url="&glibc-url;"/></para>
+        <para>MD5 sum: <literal>&glibc-md5;</literal></para>
       </listitem>
     </varlistentry>
@@ -250,4 +241,13 @@
 
     <varlistentry>
+      <term>Inetutils (&inetutils-version;) - <token>&inetutils-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&inetutils-home;"/></para>
+        <para>Download: <ulink url="&inetutils-url;"/></para>
+        <para>MD5 sum: <literal>&inetutils-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
       <term>IPRoute2 (&iproute2-version;) - <token>&iproute2-size;</token>:</term>
       <listitem>
@@ -259,13 +259,4 @@
 
     <varlistentry>
-      <term>IPutils (&iputils-version;) - <token>&iputils-size;</token>:</term>
-      <listitem>
-        <para>Home page: <ulink url="&iputils-home;"/></para>
-        <para>Download: <ulink url="&iputils-url;"/></para>
-        <para>MD5 sum: <literal>&iputils-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
       <term>Kbd (&kbd-version;) - <token>&kbd-size;</token>:</term>
       <listitem>
@@ -304,4 +295,13 @@
 
     <varlistentry>
+      <term>Linux-Headers (&linux-headers-version;) - <token>&linux-headers-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&linux-headers-home;"/></para>
+        <para>Download: <ulink url="&linux-headers-url;"/></para>
+        <para>MD5 sum: <literal>&linux-headers-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
       <term>M4 (&m4-version;) - <token>&m4-size;</token>:</term>
       <listitem>
@@ -340,4 +340,13 @@
 
     <varlistentry>
+      <term>Mktemp (&mktemp-version;) - <token>&mktemp-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&mktemp-home;"/></para>
+        <para>Download: <ulink url="&mktemp-url;"/></para>
+        <para>MD5 sum: <literal>&mktemp-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
       <term>Module-Init-Tools (&module-init-tools-version;) - <token>&module-init-tools-size;</token>:</term>
       <listitem>
@@ -349,13 +358,4 @@
 
     <varlistentry>
-      <term>MPFR (&mpfr-version;) - <token>&mpfr-size;</token>:</term>
-      <listitem>
-        <para>Home page: <ulink url="&mpfr-home;"/></para>
-        <para>Download: <ulink url="&mpfr-url;"/></para>
-        <para>MD5 sum: <literal>&mpfr-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
       <term>Ncurses (&ncurses-version;) - <token>&ncurses-size;</token>:</term>
       <listitem>
@@ -385,13 +385,4 @@
 
     <varlistentry>
-      <term>PPL (&ppl-version;) - <token>&ppl-size;</token>:</term>
-      <listitem>
-        <para>Home page: <ulink url="&ppl-home;"/></para>
-        <para>Download: <ulink url="&ppl-url;"/></para>
-        <para>MD5 sum: <literal>&ppl-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
       <term>Procps (&procps-version;) - <token>&procps-size;</token>:</term>
       <listitem>
@@ -421,13 +412,4 @@
 
     <varlistentry>
-      <term>Rsyslog (&rsyslog-version;) - <token>&rsyslog-size;</token>:</term>
-      <listitem>
-        <para>Home page: <ulink url="&rsyslog-home;"/></para>
-        <para>Download: <ulink url="&rsyslog-url;"/></para>
-        <para>MD5 sum: <literal>&rsyslog-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
       <term>Sed (&sed-version;) - <token>&sed-size;</token>:</term>
       <listitem>
@@ -444,4 +426,22 @@
         <para>Download: <ulink url="&shadow-url;"/></para>
         <para>MD5 sum: <literal>&shadow-md5;</literal></para>
+
+        <note>
+          <para>Shadow (&shadow-version;) may no longer be available at the
+          listed location. The site administrators of the master download
+          location occasionally remove older versions when new ones are
+          released. An alternative download location that may have the
+          correct version available is <ulink
+          url="http://www.linuxfromscratch.org/lfs/download.html#ftp"/>.</para>
+        </note>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Sysklogd (&sysklogd-version;) - <token>&sysklogd-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&sysklogd-home;"/></para>
+        <para>Download: <ulink url="&sysklogd-url;"/></para>
+        <para>MD5 sum: <literal>&sysklogd-md5;</literal></para>
       </listitem>
     </varlistentry>
@@ -466,4 +466,13 @@
 
     <varlistentry>
+      <term>Tcl (&tcl-version;) - <token>&tcl-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&tcl-home;"/></para>
+        <para>Download: <ulink url="&tcl-url;"/></para>
+        <para>MD5 sum: <literal>&tcl-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
       <term>Texinfo (&texinfo-version;) - <token>&texinfo-size;</token>:</term>
       <listitem>
@@ -475,4 +484,13 @@
 
     <varlistentry>
+      <term>Tree (&tree-version;) - <token>&tree-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&tree-home;"/></para>
+        <para>Download: <ulink url="&tree-url;"/></para>
+        <para>MD5 sum: <literal>&tree-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
       <term>Udev (&udev-version;) - <token>&udev-size;</token>:</term>
       <listitem>
@@ -484,9 +502,18 @@
 
     <varlistentry>
-      <term>Util-linux-ng (&util-linux-ng-version;) - <token>&util-linux-ng-size;</token>:</term>
-      <listitem>
-        <para>Home page: <ulink url="&util-linux-ng-home;"/></para>
-        <para>Download: <ulink url="&util-linux-ng-url;"/></para>
-        <para>MD5 sum: <literal>&util-linux-ng-md5;</literal></para>
+      <term>Udev Cross-LFS Rules (&udev-cross-lfs-version;) - <token>&udev-cross-lfs-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&udev-cross-lfs-home;"/></para>
+        <para>Download: <ulink url="&udev-cross-lfs-url;"/></para>
+        <para>MD5 sum: <literal>&udev-cross-lfs-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Util-linux (&util-linux-version;) - <token>&util-linux-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&util-linux-home;"/></para>
+        <para>Download: <ulink url="&util-linux-url;"/></para>
+        <para>MD5 sum: <literal>&util-linux-md5;</literal></para>
       </listitem>
     </varlistentry>
@@ -511,13 +538,4 @@
 
     <varlistentry>
-      <term>XZ Utils  (&xz-version;) - <token>&xz-size;</token>:</term>
-      <listitem>
-        <para>Home page: <ulink url="&xz-home;"/></para>
-        <para>Download: <ulink url="&xz-url;"/></para>
-        <para>MD5 sum: <literal>&xz-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
       <term>Zlib (&zlib-version;) - <token>&zlib-size;</token>:</term>
       <listitem>
Index: BOOK/materials/common/patches.xml
===================================================================
--- BOOK/materials/common/patches.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/materials/common/patches.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -15,203 +15,255 @@
   fixed by the maintainer. The patches also make small modifications to
   make the packages easier to work with. The following patches will be
-  needed to build a CLFS system:</para>
+  needed to build an LFS system:</para>
 
   <variablelist role="materials">
 
     <varlistentry>
-      <term>Bash Branch Update Patch - <token>&bash-branch_update-patch-size;</token>:</term>
-      <listitem>
-        <para>Download: <ulink
-        url="&patches-root;&bash-branch_update-patch;"/></para>
-        <para>MD5 sum: <literal>&bash-branch_update-patch-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
-      <term>Binutils Branch Update Patch - <token>&binutils-branch_update-patch-size;</token>:</term>
-      <listitem>
-        <para>Download: <ulink
-        url="&patches-root;&binutils-branch_update-patch;"/></para>
-        <para>MD5 sum: <literal>&binutils-branch_update-patch-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-     <varlistentry>
-      <term>Coreutils Uname Patch - <token>&coreutils-uname-patch-size;</token>:</term>
-      <listitem>
-        <para>Download: <ulink
-        url="&patches-root;&coreutils-uname-patch;"/></para>
-        <para>MD5 sum: <literal>&coreutils-uname-patch-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
-      <term>Diffutils i18n Patch - <token>&diffutils-i18n-patch-size;</token>:</term>
-      <listitem>
-        <para>Download: <ulink
-        url="&patches-root;&diffutils-i18n-patch;"/></para>
-        <para>MD5 sum: <literal>&diffutils-i18n-patch-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
-      <term>EGLIBC Fixes Patch - <token>&eglibc-fixes-patch-size;</token>:</term>
-      <listitem>
-        <para>Download: <ulink
-        url="&patches-root;&eglibc-fixes-patch;"/></para>
-        <para>MD5 sum: <literal>&eglibc-fixes-patch-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
-      <term>File Cross-Compile Patch - <token>&file-cross_compile-patch-size;</token>:</term>
-      <listitem>
-        <para>Download: <ulink
-        url="&patches-root;&file-cross_compile-patch;"/></para>
-        <para>MD5 sum: <literal>&file-cross_compile-patch-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
-      <term>GCC Branch Update Patch - <token>&gcc-branch_update-patch-size;</token>:</term>
-      <listitem>
-        <para>Download: <ulink
-        url="&patches-root;&gcc-branch_update-patch;"/></para>
-        <para>MD5 sum: <literal>&gcc-branch_update-patch-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
-      <term>Grep i18n Patch - <token>&grep-i18n-patch-size;</token>:</term>
-      <listitem>
-        <para>Download: <ulink
-        url="&patches-root;&grep-i18n-patch;"/></para>
-        <para>MD5 sum: <literal>&grep-i18n-patch-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
-      <term>IPUtils Fixes Patch - <token>&iputils-fixes-patch-size;</token>:</term>
-      <listitem>
-        <para>Download: <ulink
-        url="&patches-root;&iputils-fixes-patch;"/></para>
-        <para>MD5 sum: <literal>&iputils-fixes-patch-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
-      <term>IPUtils Missing Man-Pages Patch - <token>&iputils-manpages-patch-size;</token>:</term>
-      <listitem>
-        <para>Download: <ulink
-        url="&patches-root;&iputils-manpages-patch;"/></para>
-        <para>MD5 sum: <literal>&iputils-manpages-patch-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
-      <term>Man i18n Patch - <token>&man-i18n-patch-size;</token>:</term>
-      <listitem>
-        <para>Download: <ulink
-        url="&patches-root;&man-i18n-patch;"/></para>
-        <para>MD5 sum: <literal>&man-i18n-patch-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
-      <term>Man New Compressors Patch - <token>&man-new_compressors-patch-size;</token>:</term>
-      <listitem>
-        <para>Download: <ulink
-        url="&patches-root;&man-new_compressors-patch;"/></para>
-        <para>MD5 sum: <literal>&man-new_compressors-patch-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
-      <term>MPFR Branch Update Patch - <token>&mpfr-branch_update-patch-size;</token>:</term>
-      <listitem>
-        <para>Download: <ulink
-        url="&patches-root;&mpfr-branch_update-patch;"/></para>
-        <para>MD5 sum: <literal>&mpfr-branch_update-patch-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
-      <term>Ncurses Bash Patch - <token>&ncurses-bashfix-patch-size;</token>:</term>
-      <listitem>
-        <para>Download: <ulink
-        url="&patches-root;&ncurses-bashfix-patch;"/></para>
-        <para>MD5 sum: <literal>&ncurses-bashfix-patch-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
-      <term>Ncurses Branch Update Patch - <token>&ncurses-branch_update-patch-size;</token>:</term>
-      <listitem>
-        <para>Download: <ulink
-        url="&patches-root;&ncurses-branch_update-patch;"/></para>
-        <para>MD5 sum: <literal>&ncurses-branch_update-patch-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
-      <term>Perl Cross Compile Patch - <token>&perl-cross_compile-patch-size;</token>:</term>
-      <listitem>
-        <para>Download: <ulink
-        url="&patches-root;&perl-cross_compile-patch;"/></para>
-        <para>MD5 sum: <literal>&perl-cross_compile-patch-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
-      <term>Readline Branch Update - <token>&readline-branch_update-patch-size;</token>:</term>
-      <listitem>
-        <para>Download: <ulink
-        url="&patches-root;&readline-branch_update-patch;"/></para>
-        <para>MD5 sum: <literal>&readline-branch_update-patch-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
-      <term>Shadow Sysroot Hacks Patch - <token>&shadow-sysroot_hacks-patch-size;</token>:</term>
-      <listitem>
-        <para>Download: <ulink
-        url="&patches-root;&shadow-sysroot_hacks-patch;"/></para>
-        <para>MD5 sum: <literal>&shadow-sysroot_hacks-patch-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
-      <term>Sysvinit Fixes Patch - <token>&sysvinit-fixes-patch-size;</token>:</term>
-      <listitem>
-        <para>Download: <ulink
-        url="&patches-root;&sysvinit-fixes-patch;"/></para>
-        <para>MD5 sum: <literal>&sysvinit-fixes-patch-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
-      <term>Tar Man Page Patch - <token>&tar-man_page-patch-size;</token>:</term>
-      <listitem>
-        <para>Download: <ulink
-        url="&patches-root;&tar-man_page-patch;"/></para>
-        <para>MD5 sum: <literal>&tar-man_page-patch-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
-      <term>Texinfo New Compressors Patch - <token>&texinfo-new_compressors-patch-size;</token>:</term>
-      <listitem>
-        <para>Download: <ulink
-        url="&patches-root;&texinfo-new_compressors-patch;"/></para>
-        <para>MD5 sum: <literal>&texinfo-new_compressors-patch-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
-      <term>Vim Branch Update Patch - <token>&vim-branch_update-patch-size;</token>:</term>
-      <listitem>
-        <para>Download: <ulink
-        url="&patches-root;&vim-branch_update-patch;"/></para>
-        <para>MD5 sum: <literal>&vim-branch_update-patch-md5;</literal></para>
+      <term>Bash Fixes Patch - <token>&bash-fixes-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink
+        url="&patches-root;bash/&bash-fixes-patch;"/></para>
+        <para>MD5 sum: <literal>&bash-fixes-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Binutils Posix Patch - <token>&binutils-posix-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink
+        url="&patches-root;binutils/&binutils-posix-patch;"/></para>
+        <para>MD5 sum: <literal>&binutils-posix-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Bzip2 Documentation Patch - <token>&bzip2-docs-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink
+        url="&patches-root;bzip2/&bzip2-docs-patch;"/></para>
+        <para>MD5 sum: <literal>&bzip2-docs-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Bzip2 Bzdiff Remove Tempfile - <token>&bzip2-remove_tempfile-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink
+        url="&patches-root;bzip2/&bzip2-remove_tempfile-patch;"/></para>
+        <para>MD5 sum: <literal>&bzip2-remove_tempfile-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Bzip2 Bzgrep Security Fixes Patch - <token>&bzip2-bzgrep-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink
+        url="&patches-root;bzip2/&bzip2-bzgrep-patch;"/></para>
+        <para>MD5 sum: <literal>&bzip2-bzgrep-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Coreutils Suppress Uptime, Kill, Su Patch - <token>&coreutils-suppress-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink
+        url="&patches-root;coreutils/&coreutils-suppress-patch;"/></para>
+        <para>MD5 sum: <literal>&coreutils-suppress-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Expect Spawn Patch - <token>&expect-spawn-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink
+        url="&patches-root;expect/&expect-spawn-patch;"/></para>
+        <para>MD5 sum: <literal>&expect-spawn-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Gawk Segfault Patch - <token>&gawk-segfault-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink
+        url="&patches-root;gawk/&gawk-segfault-patch;"/></para>
+        <para>MD5 sum: <literal>&gawk-segfault-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>GCC Cross Search Paths Patch - <token>&gcc-cross_search-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink
+        url="&patches-root;gcc/&gcc-cross_search-patch;"/></para>
+        <para>MD5 sum: <literal>&gcc-cross_search-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>GCC PR20425 Patch - <token>&gcc-PR20425-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink
+        url="&patches-root;gcc/&gcc-PR20425-patch;"/></para>
+        <para>MD5 sum: <literal>&gcc-PR20425-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>GCC Posix Patch - <token>&gcc-posix-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink
+        url="&patches-root;gcc/&gcc-posix-patch;"/></para>
+        <para>MD5 sum: <literal>&gcc-posix-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Glibc Disable linking with libgcc_eh.a - <token>&glibc-libgcc_eh-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink
+        url="&patches-root;glibc/&glibc-libgcc_eh-patch;"/></para>
+        <para>MD5 sum: <literal>&glibc-libgcc_eh-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Glibc Localedef Segfault - <token>&glibc-localedef_segfault-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink
+        url="&patches-root;glibc/&glibc-localedef_segfault-patch;"/></para>
+        <para>MD5 sum: <literal>&glibc-localedef_segfault-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Gzip Security Fix Patch - <token>&gzip-security_fix-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink
+        url="&patches-root;gzip/&gzip-security_fix-patch;"/></para>
+        <para>MD5 sum: <literal>&gzip-security_fix-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Inetutils GCC 4.x Fixes Patch - <token>&inetutils-gcc4_fixes-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink
+        url="&patches-root;inetutils/&inetutils-gcc4_fixes-patch;"/></para>
+        <para>MD5 sum: <literal>&inetutils-gcc4_fixes-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Inetutils No-Server-Man-Pages Patch - <token>&inetutils-man_pages-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink
+        url="&patches-root;inetutils/&inetutils-man_pages-patch;"/></para>
+        <para>MD5 sum: <literal>&inetutils-man_pages-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>KBD GCC 4.x Fixes Patch - <token>&kbd-gcc4_fixes-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink
+        url="&patches-root;kbd/&kbd-gcc4_fixes-patch;"/></para>
+        <para>MD5 sum: <literal>&kbd-gcc4_fixes-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Mktemp Tempfile Patch - <token>&mktemp-tempfile-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink
+        url="&patches-root;mktemp/&mktemp-tempfile-patch;"/></para>
+        <para>MD5 sum: <literal>&mktemp-tempfile-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Perl Libc Patch - <token>&perl-libc-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink
+        url="&patches-root;perl/&perl-libc-patch;"/></para>
+        <para>MD5 sum: <literal>&perl-libc-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Readline Fixes Patch - <token>&readline-fixes-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink
+        url="&patches-root;readline/&readline-fixes-patch;"/></para>
+        <para>MD5 sum: <literal>&readline-fixes-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Sysklogd Fixes Patch - <token>&sysklogd-fixes-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink
+        url="&patches-root;sysklogd/&sysklogd-fixes-patch;"/></para>
+        <para>MD5 sum: <literal>&sysklogd-fixes-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Tar GCC-4.x Fix Patch - <token>&tar-gcc4_fix-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink
+        url="&patches-root;tar/&tar-gcc4_fix-patch;"/></para>
+        <para>MD5 sum: <literal>&tar-gcc4_fix-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Tar Security Fix Patch - <token>&tar-security_fixes-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink
+        url="&patches-root;tar/&tar-security_fixes-patch;"/></para>
+        <para>MD5 sum: <literal>&tar-security_fixes-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Tar Sparse Fix Patch - <token>&tar-sparse_fix-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink
+        url="&patches-root;tar/&tar-sparse_fix-patch;"/></para>
+        <para>MD5 sum: <literal>&tar-sparse_fix-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+       <term>Texinfo Tempfile Fix Patch - <token>&texinfo-tempfile_fix-patch-size;</token>:</term>
+       <listitem>
+        <para>Download: <ulink
+        url="&patches-root;texinfo/&texinfo-tempfile_fix-patch;"/></para>
+        <para>MD5 sum: <literal>&texinfo-tempfile_fix-patch-md5;</literal></para>
+       </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Util-linux Cramfs Patch - <token>&util-linux-cramfs-patch-size;</token>:</term> <listitem>
+        <para>Download: <ulink
+        url="&patches-root;util-linux/&util-linux-cramfs-patch;"/></para>
+        <para>MD5 sum: <literal>&util-linux-cramfs-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Util-linux GCC 4.x Patch - <token>&util-linux-gcc4_fixes-patch-size;</token>:</term> <listitem>
+        <para>Download: <ulink
+        url="&patches-root;util-linux/&util-linux-gcc4_fixes-patch;"/></para>
+        <para>MD5 sum: <literal>&util-linux-gcc4_fixes-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Vim Fixes Patch - <token>&vim-fixes-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink
+        url="&patches-root;vim/&vim-fixes-patch;"/></para>
+        <para>MD5 sum: <literal>&vim-fixes-patch-md5;</literal></para>
       </listitem>
     </varlistentry>
@@ -220,5 +272,5 @@
       <term>Zlib fPIC Patch - <token>&zlib-fpic-patch-size;</token>:</term> <listitem>
         <para>Download: <ulink
-        url="&patches-root;&zlib-fpic-patch;"/></para>
+        url="&patches-root;zlib/&zlib-fpic-patch;"/></para>
         <para>MD5 sum: <literal>&zlib-fpic-patch-md5;</literal></para>
       </listitem>
@@ -230,5 +282,5 @@
 
   <para>In addition to the above required patches, there exist a number of
-  optional patches created by the CLFS community. These optional patches
+  optional patches created by the LFS community. These optional patches
   solve minor problems or enable functionality that is not enabled by
   default. Feel free to peruse the patches database located at
Index: OK/materials/hppa-chapter.xml
===================================================================
--- BOOK/materials/hppa-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,20 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../general.ent">
-  %general-entities;
-]>
-
-<chapter id="chapter-getting-materials" xreflabel="Packages and Patches">
-  <?dbhtml dir="materials"?>
-  <?dbhtml filename="chapter.html"?>
-
-  <title>Packages and Patches</title>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/introduction.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/packages.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="hppa/packages.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/patches.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="hppa/patches.xml"/>
-
-</chapter>
Index: OK/materials/hppa/packages.xml
===================================================================
--- BOOK/materials/hppa/packages.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,23 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-materials-packages-hppa">
-  <?dbhtml filename="packages-hppa.html"?>
-
-  <title>Additional Packages for PA-RISC</title>
-
-<!--
-  <variablelist role="materials">
-
-  </variablelist>
--->
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../common/packages.xml"
-  xpointer="xpointer(//*[@os='a'])"/>
-
-</sect1>
Index: OK/materials/hppa/patches.xml
===================================================================
--- BOOK/materials/hppa/patches.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,23 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-materials-patches-hppa">
-  <?dbhtml filename="patches-hppa.html"?>
-
-  <title>Additional Patches for PA-RISC</title>
-
-<!--
-  <variablelist role="materials">
-
-  </variablelist>
--->
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../common/patches.xml"
-  xpointer="xpointer(//*[@os='a'])"/>
-
-</sect1>
Index: OK/materials/x86-chapter.xml
===================================================================
--- BOOK/materials/x86-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,20 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../general.ent">
-  %general-entities;
-]>
-
-<chapter id="chapter-getting-materials" xreflabel="Packages and Patches">
-  <?dbhtml dir="materials"?>
-  <?dbhtml filename="chapter.html"?>
-
-  <title>Packages and Patches</title>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/introduction.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/packages.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="x86/packages.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/patches.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="x86/patches.xml"/>
-
-</chapter>
Index: OK/materials/x86/packages.xml
===================================================================
--- BOOK/materials/x86/packages.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,23 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-materials-packages-x86">
-  <?dbhtml filename="packages-x86.html"?>
-
-  <title>Additional Packages for x86</title>
-
-<!--
-  <variablelist role="materials">
-
-  </variablelist>
--->
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../common/packages.xml"
-  xpointer="xpointer(//*[@os='a'])"/>
-
-</sect1>
Index: OK/materials/x86/patches.xml
===================================================================
--- BOOK/materials/x86/patches.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,23 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-materials-patches-x86">
-  <?dbhtml filename="patches-x86.html"?>
-
-  <title>Additional Patches for x86</title>
-
-<!--
-  <variablelist role="materials">
-
-  </variablelist>
--->
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../common/patches.xml"
-  xpointer="xpointer(//*[@os='a'])"/>
-
-</sect1>
Index: OK/network/alpha-chapter.xml
===================================================================
--- BOOK/network/alpha-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,22 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../general.ent">
-  %general-entities;
-]>
-
-<chapter id="chapter-network" xreflabel="Networking Configuration">
-  <?dbhtml dir="network"?>
-  <?dbhtml filename="chapter.html"?>
-
-  <title>Networking Configuration</title>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/hostname.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/hosts.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/resolv.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/choose.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/static.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/dhcpcd.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/dhcp.xml"/>
-
-</chapter>
Index: OK/network/arm-chapter.xml
===================================================================
--- BOOK/network/arm-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,22 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../general.ent">
-  %general-entities;
-]>
-
-<chapter id="chapter-network" xreflabel="Networking Configuration">
-  <?dbhtml dir="network"?>
-  <?dbhtml filename="chapter.html"?>
-
-  <title>Networking Configuration</title>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/hostname.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/hosts.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/resolv.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/choose.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/static.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/dhcpcd.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/dhcp.xml"/>
-
-</chapter>
Index: OK/network/common/choose.xml
===================================================================
--- BOOK/network/common/choose.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,30 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-network-choose">
-  <?dbhtml filename="choose.html"?>
-
-  <title>DHCP or Static Networking?</title>
-
-  <indexterm zone="ch-network-choose">
-    <primary sortas="d-network">network</primary>
-  <secondary>configuring</secondary></indexterm>
-
-  <para>This section only applies if a network card is to be configured. If
-  you do not need to configure a network interface you can skip on to
-  <xref linkend="chapter-bootable"/>.</para>
-
-  <para> There are two different ways you can proceed from this point
-  to configure your network. Dynamic will allow you to take advantage of
-  a DHCP server to get all your configuration information. Static you become
-  responsible for setting up your options.</para>
-
-  <para>To configure a Static Interface, Follow <xref linkend="ch-network-static"/>.</para>
-
-  <para>To configure a DHCP Interface, Follow <xref linkend="ch-network-dhcp"/>.</para>
-
-</sect1>
Index: OK/network/common/dhcp.xml
===================================================================
--- BOOK/network/common/dhcp.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,57 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-network-dhcp">
-  <?dbhtml filename="network-dhcp.html"?>
-
-  <title>DHCP Networking Configuration</title>
-
-  <sect2>
-    <title>Creating the DHCP Network Interface Configuration Files</title>
-
-    <para>First install the service from the CLFS Bootscripts package:</para>
-
-<screen><userinput>tar -jxvf bootscripts-cross-lfs-&bootscripts-clfs-version;.tar.bz2
-cd -v bootscripts-cross-lfs-&bootscripts-clfs-version;
-make DESTDIR=${CLFS} install-service-dhcpcd</userinput></screen>
-
-    <para>Finally, create the
-    <filename>/etc/sysconfig/network-devices/ifconfig.eth0/dhcpcd</filename>
-    configuration file using the following commands. Adjust appropriately for
-    additional interfaces:</para>
-
-<screen><userinput>cd ${CLFS}/etc/sysconfig/network-devices &amp;&amp;
-mkdir -v ifconfig.eth0 &amp;&amp;
-cat &gt; ifconfig.eth0/dhcpcd &lt;&lt; "EOF"
-<literal>ONBOOT="yes"
-SERVICE="dhcpcd"
-
-# Start Command for DHCPCD
-DHCP_START="-q"
-
-# Stop Command for DHCPCD
-DHCP_STOP="-k"</literal>
-EOF</userinput></screen>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="static.xml"
-    xpointer="xpointer(//*[@os='var-ob'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="static.xml"
-    xpointer="xpointer(//*[@os='var-s'])"/>
-
-    <para>The <envar>DHCP_START</envar> and <envar>DHCP_STOP</envar> variables
-    arguments that are passed onto <filename>dhcpcd</filename> when starting
-    and stoppping the service. More information about what can be passed can
-    be found in the <filename>dhcpcd(8)</filename> man page.</para>
-
-    <para>To configure another Static Interface, Follow <xref linkend="ch-network-static"/>.</para>
-
-  </sect2>
-
-</sect1>
Index: OK/network/common/dhcpcd.xml
===================================================================
--- BOOK/network/common/dhcpcd.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,80 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-network-dhcpcd" role="wrap">
-  <?dbhtml filename="dhcpcd.html"?>
-
-  <title>DHCPCD-&dhcpcd-version;</title>
-
-  <indexterm zone="ch-network-dhcpcd">
-    <primary sortas="a-DHCPCD">DHCPCD</primary>
-  </indexterm>
-
-  <sect2 role="package">
-    <title/>
-
-    <para>The DHCPCD package provides a DHCP Client for network configuration.</para>
-
-  </sect2>
-
-  &env-target;
-
-  <sect2 role="installation">
-    <title>Installation of DHCPCD</title>
-
-    <para os="a">If you wish to configure your network to connect to a DHCP
-    server, you will first need to install a DHCP client. CLFS uses the
-    DHCPCD package for this.</para>
-
-    <para os="b">Prepare DHCPCD for compilation:</para>
-
-<screen os="c"><userinput>make PREFIX=/usr BINDIR=/sbin SYSCONFDIR=/etc \
-    DBDIR=/var/lib/dhcpcd LIBEXECDIR=/usr/lib/dhcpcd</userinput></screen>
-
-    <para os="d">This package does not come with a test suite.</para>
-
-    <para os="e">Install the package:</para>
-
-<screen os="f"><userinput>make PREFIX=/usr BINDIR=/sbin SYSCONFDIR=/etc \
-    DBDIR=/var/lib/dhcpcd LIBEXECDIR=/usr/lib/dhcpcd \
-    DESTDIR=${CLFS} install</userinput></screen>
-
-  </sect2>
-
-  <sect2 id="contents-dhcpcd" role="content">
-    <title>Contents of dhcpcd</title>
-
-    <segmentedlist>
-      <segtitle>Installed files</segtitle>
-
-      <seglistitem>
-        <seg>dhcpcd</seg>
-      </seglistitem>
-    </segmentedlist>
-
-    <variablelist>
-      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
-      <?dbfo list-presentation="list"?>
-      <?dbhtml list-presentation="table"?>
-
-      <varlistentry id="dhcpcd">
-        <term><command>dhcpcd</command></term>
-        <listitem>
-          <para>dhcpcd is an implementation of the DHCP client specified in
-          RFC 2131. It gets the host information from a DHCP server and
-          configures the network interface automatically.</para>
-          <indexterm zone="ch-network-dhcpcd">
-            <primary sortas="e-dhcpcd">dhcpcd</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
-    </variablelist>
-
-  </sect2>
-
-</sect1>
Index: OK/network/common/hostname.xml
===================================================================
--- BOOK/network/common/hostname.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,33 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-network-hostname">
-  <?dbhtml filename="hostname.html"?>
-
-  <title>Configuring the localnet Script</title>
-
-  <indexterm zone="ch-network-hostname">
-    <primary sortas="d-localnet">localnet</primary>
-  <secondary>configuring</secondary></indexterm>
-
-  <para>Part of the job of the <command>localnet</command> script is
-  setting the system's hostname. This needs to be configured in the
-  <filename>/etc/sysconfig/network</filename> file.</para>
-
-  <para>Create the <filename>/etc/sysconfig/network</filename> file
-  and enter a hostname by running:</para>
-
-<screen><userinput>cat &gt; ${CLFS}/etc/sysconfig/network &lt;&lt; EOF
-HOSTNAME=<replaceable>[clfs]</replaceable>
-EOF</userinput></screen>
-
-  <para><replaceable>[clfs]</replaceable> needs to be replaced with the
-  name given to the computer. Do not enter the Fully Qualified
-  Domain Name (FQDN) here. That information will be put in the
-  <filename>/etc/hosts</filename> file in the next section.</para>
-
-</sect1>
Index: OK/network/common/hosts.xml
===================================================================
--- BOOK/network/common/hosts.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,79 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-network-hosts">
-  <?dbhtml filename="hosts.html"?>
-
-  <title>Customizing the /etc/hosts File</title>
-
-  <indexterm zone="ch-network-hosts">
-    <primary sortas="e-/etc/hosts">/etc/hosts</primary>
-  </indexterm>
-
-  <indexterm zone="ch-network-hosts">
-    <primary sortas="d-localnet">localnet</primary>
-  <secondary>/etc/hosts</secondary></indexterm>
-
-  <indexterm zone="ch-network-hosts">
-    <primary sortas="d-network">network</primary>
-  <secondary>/etc/hosts</secondary></indexterm>
-
-  <para>If a network card is to be configured, decide on the IP address,
-  FQDN, and possible aliases for use in the
-  <filename>/etc/hosts</filename> file. The syntax is:</para>
-
-  <screen>&lt;IP address&gt; myhost.example.org aliases</screen>
-
-  <para>Unless the computer is to be visible to the Internet (i.e.,
-  there is a registered domain and a valid block of assigned IP
-  addresses&mdash;most users do not have this), make sure that the IP
-  address is in the private network IP address range. Valid ranges
-  are:</para>
-
-<screen><literal>  Class Networks
-  A     10.0.0.0
-  B     172.16.0.0 through 172.31.0.255
-  C     192.168.0.0 through 192.168.255.255</literal></screen>
-
-  <para>A valid IP address could be 192.168.1.1. A valid FQDN for this
-  IP could be <uri>www.linuxfromscratch.org</uri> (not recommended
-  because this is a valid registered domain address and could cause
-  domain name server issues).</para>
-
-  <para>Even if not using a network card, an FQDN is still required.
-  This is necessary for certain programs to operate correctly.</para>
-
-  <para>Create the  <filename>/etc/hosts</filename> file by running:</para>
-
-<screen><userinput>cat &gt; ${CLFS}/etc/hosts &lt;&lt; "EOF"
-<literal># Begin /etc/hosts (network card version)
-
-127.0.0.1 localhost
-<replaceable>[192.168.1.1]</replaceable> <replaceable>[&lt;HOSTNAME&gt;.example.org]</replaceable> <replaceable>[HOSTNAME]</replaceable>
-
-# End /etc/hosts (network card version)</literal>
-EOF</userinput></screen>
-
-  <para>The <replaceable>[192.168.1.1]</replaceable> and
-  <replaceable>[&lt;HOSTNAME&gt;.example.org]</replaceable>
-  values need to be changed for specific users or requirements (if
-  assigned an IP address by a network/system administrator and the
-  machine will be connected to an existing network).</para>
-
-
-  <para>If a network card is not going to be configured, create the
-  <filename>/etc/hosts</filename> file by running:</para>
-
-<screen><userinput>cat &gt; ${CLFS}/etc/hosts &lt;&lt; "EOF"
-<literal># Begin /etc/hosts (no network card version)
-
-127.0.0.1 <replaceable>[&lt;HOSTNAME&gt;.example.org]</replaceable> <replaceable>[HOSTNAME]</replaceable> localhost
-
-# End /etc/hosts (no network card version)</literal>
-EOF</userinput></screen>
-
-</sect1>
Index: OK/network/common/resolv.xml
===================================================================
--- BOOK/network/common/resolv.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,51 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-network-resolv">
-  <?dbhtml filename="resolv.html"?>
-
-  <title>Creating the /etc/resolv.conf File</title>
-
-  <sect2 id="resolv.conf">
-    <title>Creating the /etc/resolv.conf File</title>
-
-    <indexterm zone="resolv.conf">
-      <primary sortas="e-/etc/resolv.conf">/etc/resolv.conf</primary>
-    </indexterm>
-
-    <para>If the system is going to be connected to the Internet, it will
-    need some means of Domain Name Service (DNS) name resolution to
-    resolve Internet domain names to IP addresses, and vice versa. This is
-    best achieved by placing the IP address of the DNS server, available
-    from the ISP or network administrator, into
-    <filename>/etc/resolv.conf</filename>. If at least one of your network
-    interfaces is going to be configured by DHCP then you may not need to
-    create this file. By default DHCPCD will overwrite this file when it gets
-    a new lease from the DHCP server. If you wish to manually configure your
-    network interfaces or manually set your DNS using DHCP then create the
-    file by running the following:</para>
-
-<screen><userinput>cat &gt; ${CLFS}/etc/resolv.conf &lt;&lt; "EOF"
-<literal># Begin /etc/resolv.conf
-
-domain <replaceable>[Your Domain Name]</replaceable>
-nameserver <replaceable>[IP address of your primary nameserver]</replaceable>
-nameserver <replaceable>[IP address of your secondary nameserver]</replaceable>
-
-# End /etc/resolv.conf</literal>
-EOF</userinput></screen>
-
-    <para>Replace <replaceable>[IP address of the nameserver]</replaceable>
-    with the IP address of the DNS most appropriate for the setup. There will
-    often be more than one entry (requirements demand secondary servers for
-    fallback capability). If you only need or want one DNS server, remove the
-    second <emphasis>nameserver</emphasis> line from the file. The IP address
-    may also be a router on the local network.</para>
-
-  </sect2>
-
-</sect1>
Index: OK/network/common/static.xml
===================================================================
--- BOOK/network/common/static.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,69 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-network-static">
-  <?dbhtml filename="network-static.html"?>
-
-  <title>Static Networking Configuration</title>
-
-  <sect2>
-    <title>Creating the Static Network Interface Configuration Files</title>
-
-    <para>Which interfaces are brought up and down by the network script
-    depends on the files and directories in the <filename
-    class="directory">/etc/sysconfig/network-devices</filename> hierarchy.
-    This directory should contain a sub-directory for each interface to be
-    configured, such as <filename>ifconfig.xyz</filename>, where
-    <quote>xyz</quote> is a network interface name. Inside this directory
-    would be files defining the attributes to this interface, such as its IP
-    address(es), subnet masks, and so forth.</para>
-
-    <para>The following command creates a sample <filename>ipv4</filename>
-    file for the <emphasis>eth0</emphasis> device:</para>
-
-<screen><userinput>cd ${CLFS}/etc/sysconfig/network-devices &amp;&amp;
-mkdir -v ifconfig.eth0 &amp;&amp;
-cat &gt; ifconfig.eth0/ipv4 &lt;&lt; "EOF"
-<literal>ONBOOT=yes
-SERVICE=ipv4-static
-IP=192.168.1.1
-GATEWAY=192.168.1.2
-PREFIX=24
-BROADCAST=192.168.1.255</literal>
-EOF</userinput></screen>
-
-    <para os="var-ob">The values of these variables must be changed in every file to match
-    the proper setup. If the <envar>ONBOOT</envar> variable is set to
-    <quote>yes</quote> the network script will bring up the Network Interface
-    Card (NIC) during booting of the system. If set to anything but
-    <quote>yes</quote> the NIC will be ignored by the network script and not
-    be brought up.</para>
-
-    <para os="var-s">The <envar>SERVICE</envar> variable defines the method used for
-    obtaining the IP address. The CLFS-Bootscripts package has a modular IP
-    assignment format, and creating additional files in the <filename
-    class="directory">/etc/sysconfig/network-devices/services</filename>
-    directory allows other IP assignment methods.</para>
-
-    <para>The <envar>GATEWAY</envar> variable should contain the default
-    gateway IP address, if one is present. If not, then comment out the
-    variable entirely.</para>
-
-    <para>The <envar>PREFIX</envar> variable needs to contain the number of
-    bits used in the subnet. Each octet in an IP address is 8 bits. If the
-    subnet's netmask is 255.255.255.0, then it is using the first three octets
-    (24 bits) to specify the network number. If the netmask is 255.255.255.240,
-    it would be using the first 28 bits.  Prefixes longer than 24 bits are
-    commonly used by DSL and cable-based Internet Service Providers (ISPs).
-    In this example (PREFIX=24), the netmask is 255.255.255.0. Adjust the
-    <envar>PREFIX</envar> variable according to your specific subnet.</para>
-
-    <para>To configure another DHCP Interface, Follow <xref linkend="ch-network-dhcp"/>.</para>
-
-  </sect2>
-
-</sect1>
Index: OK/network/hppa-chapter.xml
===================================================================
--- BOOK/network/hppa-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,22 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../general.ent">
-  %general-entities;
-]>
-
-<chapter id="chapter-network" xreflabel="Networking Configuration">
-  <?dbhtml dir="network"?>
-  <?dbhtml filename="chapter.html"?>
-
-  <title>Networking Configuration</title>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/hostname.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/hosts.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/resolv.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/choose.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/static.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/dhcpcd.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/dhcp.xml"/>
-
-</chapter>
Index: OK/network/x86-chapter.xml
===================================================================
--- BOOK/network/x86-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,22 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../general.ent">
-  %general-entities;
-]>
-
-<chapter id="chapter-network" xreflabel="Networking Configuration">
-  <?dbhtml dir="network"?>
-  <?dbhtml filename="chapter.html"?>
-
-  <title>Networking Configuration</title>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/hostname.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/hosts.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/resolv.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/choose.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/static.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/dhcpcd.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/dhcp.xml"/>
-
-</chapter>
Index: BOOK/obfuscate.sh
===================================================================
--- BOOK/obfuscate.sh	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/obfuscate.sh	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -4,6 +4,4 @@
 # obfuscate email addresses in XML/HTML
 # Script written (and slight perl modification) by Archaic <archaic AT linuxfromscratch D0T org>
-# Modified from "sed -i" to old style "sed -e" by Manuel Canales <manuel AT linuxfromscratch D0T org>
-# to prevent hangs on very long files, like nonckunked books.
 # Original Perl expression by Anderson Lizardo <lizardo AT linuxfromscratch D0T org>
 # Released under the GNU General Public License
@@ -28,12 +26,10 @@
 #cp "$1" "$1".bak
 
-for i in `grep -o '"mailto:.*@.*"' ${1} |sed -e 's|^"mailto:||' -e 's|"$||'`; do
+for i in `grep -o '"mailto:.*@.*"' "$1" |sed -e 's|^"mailto:||' -e 's|"$||'`; do
   link=`echo $i | perl -pe 's/[^\n]/"\\\&#".ord($&)."\;"/ge'`
   plaintext=`echo $i | sed -e 's|@| AT |' -e 's|\.| D0T |g'`
-  cp ${1}{,.tmp}
-  sed -e "s|mailto:$i|mailto:$link|" \
-      -e "s|$i|$plaintext|" ${1}.tmp > ${1}
-  rm ${1}.tmp
+  sed -i "s|mailto:$i|mailto:$link|" "$1"
+  sed -i "s|$i|$plaintext|" "$1"
 done
-#rm $FILE.tmp
+
 #exit 0
Index: BOOK/packages.ent
===================================================================
--- BOOK/packages.ent	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/packages.ent	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,358 +1,435 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 
-<!ENTITY packages-root "&clfs-root;files/packages/sysroot-&generic-version;/">
-
 <!-- Note: For empty *-home entities use " " not "" -->
 
-<!ENTITY autoconf-version "2.63">
-<!ENTITY autoconf-size "992 KB">
+<!ENTITY aboot-version "0.9b">
+<!ENTITY aboot-size "112 KB">
+<!ENTITY aboot-url "&sourceforge;aboot/aboot-&aboot-version;.tar.bz2?download">
+<!ENTITY aboot-md5 "5f16edbf4e9d52cd191adc4d4b6a5327">
+<!ENTITY aboot-home "http://sourceforge.net/projects/aboot">
+
+<!ENTITY arcload-version "0.5">
+<!ENTITY arcload-size "47 KB">
+<!ENTITY arcload-url "ftp://ftp.linux-mips.org/pub/linux/mips/people/skylark/arcload-&arcload-version;.tar.bz2">
+<!ENTITY arcload-md5 "b00e1c79074a13c2de97748f56f9bd1f">
+<!ENTITY arcload-home "http://www.linux-mips.org/wiki/ARCLoad">
+
+<!ENTITY autoconf-version "2.59">
+<!ENTITY autoconf-size "904 KB">
 <!ENTITY autoconf-url "&gnu;autoconf/autoconf-&autoconf-version;.tar.bz2">
-<!ENTITY autoconf-md5 "7565809ed801bb5726da0631ceab3699">
-<!ENTITY autoconf-home "&gnu-software;autoconf">
-
-<!ENTITY automake-version "1.11">
-<!ENTITY automake-version2 "1.11">
-<!ENTITY automake-size "1,033 KB">
+<!ENTITY autoconf-md5 "1ee40f7a676b3cfdc0e3f7cd81551b5f">
+<!ENTITY autoconf-home "&gnu-software;autoconf/">
+
+<!ENTITY automake-version "1.9.6">
+<!ENTITY automake-size "748 KB">
 <!ENTITY automake-url "&gnu;automake/automake-&automake-version;.tar.bz2">
-<!ENTITY automake-md5 "4db4efe027e26b33930a7e151de19d0f">
-<!ENTITY automake-home "&gnu-software;automake">
-
-<!ENTITY bash-version "4.0">
-<!ENTITY bash-size "6,038 KB">
+<!ENTITY automake-md5 "c11b8100bb311492d8220378fd8bf9e0">
+<!ENTITY automake-home "&gnu-software;automake/">
+<!ENTITY automake-directory "automake-1.9">
+
+<!ENTITY bash-version "3.1">
+<!ENTITY bash-size "2,475 KB">
 <!ENTITY bash-url "&gnu;bash/bash-&bash-version;.tar.gz">
-<!ENTITY bash-md5 "a90a1b5a6db4838483f05438e05e8eb9">
-<!ENTITY bash-home "&gnu-software;bash">
-
-<!ENTITY binutils-version "2.19.1">
-<!ENTITY binutils-size "15,865 KB">
+<!ENTITY bash-md5 "ef5304c4b22aaa5088972c792ed45d72">
+<!ENTITY bash-home "&gnu-software;bash/">
+
+<!ENTITY bash-doc-version "3.1">
+<!ENTITY bash-doc-size "2,013 KB">
+<!ENTITY bash-doc-url "&gnu;bash/bash-doc-&bash-doc-version;.tar.gz">
+<!ENTITY bash-doc-md5 "a8c517c6a7b21b8b855190399c5935ae">
+<!ENTITY bash-doc-home " ">
+
+<!ENTITY bin86-version "0.16.17">
+<!ENTITY bin86-size "149 KB">
+<!ENTITY bin86-url "http://homepage.ntlworld.com/robert.debath/dev86/bin86-&bin86-version;.tar.gz">
+<!ENTITY bin86-md5 "c9e8d72dd2e7457b52d0e3164fc199a1">
+<!ENTITY bin86-home "http://freshmeat.net/projects/bin86/">
+
+<!ENTITY binutils-version "2.16.92">
+<!ENTITY binutils-size "13,374 KB">
+<!---
 <!ENTITY binutils-url "&gnu;binutils/binutils-&binutils-version;.tar.bz2">
-<!ENTITY binutils-md5 "09a8c5821a2dfdbb20665bc0bd680791">
-<!ENTITY binutils-home "http://sources.redhat.com/binutils">
-
-<!ENTITY bison-version "2.4.1">
-<!ENTITY bison-size "1,433 KB">
-<!ENTITY bison-url "&gnu;bison/bison-&bison-version;.tar.bz2">
-<!ENTITY bison-md5 "84e80a2a192c1a4c02d43fbf2bcc4ca4">
-<!ENTITY bison-home "&gnu-software;bison">
-
-<!ENTITY bootscripts-clfs-version "1.2-pre8">
-<!ENTITY bootscripts-clfs-size "39 KB">
-<!ENTITY bootscripts-clfs-url "&packages-root;bootscripts-cross-lfs-&bootscripts-clfs-version;.tar.bz2">
-<!ENTITY bootscripts-clfs-md5 "4aee3da55c0a4c3f0f50ae6ff209169d">
-<!ENTITY bootscripts-clfs-home " ">
-
-<!ENTITY bzip2-version "1.0.5">
-<!ENTITY bzip2-size "821 KB">
+-->
+<!ENTITY binutils-url "ftp://sourceware.org/pub/binutils/snapshots/binutils-&binutils-version;.tar.bz2">
+<!ENTITY binutils-md5 "1cc2db046dbe33ee9ab97d4bf9a0631f">
+<!ENTITY binutils-home "http://sources.redhat.com/binutils/">
+
+<!ENTITY bison-version "2.2">
+<!ENTITY bison-size "1,360 KB">
+<!ENTITY bison-url "&gnu;bison/bison-&bison-version;.tar.gz">
+<!ENTITY bison-md5 "4b0ebf57fe935d7d5cc01907d1400b8b">
+<!ENTITY bison-home "&gnu-software;bison/">
+
+<!ENTITY bzip2-version "1.0.3">
+<!ENTITY bzip2-size "654 KB">
 <!ENTITY bzip2-url "http://www.bzip.org/&bzip2-version;/bzip2-&bzip2-version;.tar.gz">
-<!ENTITY bzip2-md5 "3c15a0c8d1d3ee1c46a1634d00617b1a">
-<!ENTITY bzip2-home "http://www.bzip.org">
-
-<!ENTITY cloog-ppl-version "0.15.3">
-<!ENTITY cloog-ppl-size "788 KB">
-<!ENTITY cloog-ppl-url "ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-ppl-0.15.3.tar.gz">
-<!ENTITY cloog-ppl-md5 "9e7a3ff38b3877625d46badc6d4bbef9">
-<!ENTITY cloog-ppl-home "http://cloog.org">
-
-<!ENTITY coreutils-version "7.4">
-<!ENTITY coreutils-size "9,481 KB">
-<!ENTITY coreutils-url "&gnu;coreutils/coreutils-&coreutils-version;.tar.gz">
-<!ENTITY coreutils-md5 "c52f4f64dda9a245c38e74c09fdd86d2">
-<!ENTITY coreutils-home "&gnu-software;coreutils">
-
-<!ENTITY dhcpcd-version "5.0.6">
-<!ENTITY dhcpcd-size "61 KB">
-<!ENTITY dhcpcd-url "http://roy.marples.name/downloads/dhcpcd/dhcpcd-&dhcpcd-version;.tar.bz2">
-<!ENTITY dhcpcd-md5 "600716ddbfa2525a7ef7ae0968a8158a">
-<!ENTITY dhcpcd-home "http://roy.marples.name/projects/dhcpcd">
+<!ENTITY bzip2-md5 "8a716bebecb6e647d2e8a29ea5d8447f">
+<!ENTITY bzip2-home "http://www.bzip.org/">
+
+<!ENTITY clfs-bootscripts-version "0.1">
+<!ENTITY clfs-bootscripts-size "24 KB">
+<!ENTITY clfs-bootscripts-url "http://ftp.jg555.com/bootscripts/bootscripts-cross-lfs-&clfs-bootscripts-version;.tar.bz2">
+<!ENTITY clfs-bootscripts-md5 "cf9e749b476a9eed6a644506fff50804">
+<!ENTITY clfs-bootscripts-home " ">
+
+<!ENTITY colo-version "1.21">
+<!ENTITY colo-size "250 KB">
+<!ENTITY colo-url "http://www.colonel-panic.org/cobalt-mips/colo/colo-&colo-version;.tar.gz">
+<!ENTITY colo-md5 "9d8a37ad4984ec6660ff159e83f15404">
+<!ENTITY colo-home "http://www.linux-mips.org/wiki/CoLo">
+
+<!ENTITY coreutils-version "5.96">
+<!ENTITY coreutils-size "4,960 KB">
+<!ENTITY coreutils-url "&gnu;coreutils/coreutils-&coreutils-version;.tar.bz2">
+<!ENTITY coreutils-md5 "bf55d069d82128fd754a090ce8b5acff">
+<!ENTITY coreutils-home "&gnu-software;coreutils/">
+
+<!ENTITY dejagnu-version "1.4.4">
+<!ENTITY dejagnu-size "1,056 KB">
+<!ENTITY dejagnu-url "&gnu;dejagnu/dejagnu-&dejagnu-version;.tar.gz">
+<!ENTITY dejagnu-md5 "053f18fd5d00873de365413cab17a666">
+<!ENTITY dejagnu-home "&gnu-software;dejagnu/">
 
 <!ENTITY diffutils-version "2.8.7">
-<!ENTITY diffutils-size "1,033 KB">
+<!ENTITY diffutils-size "1,034 KB">
 <!ENTITY diffutils-url "&alpha-gnu;diffutils/diffutils-&diffutils-version;.tar.gz">
 <!ENTITY diffutils-md5 "18d6587cb915e7aa110a5d463d6ed156">
-<!ENTITY diffutils-home "&gnu-software;diffutils">
-
-<!ENTITY e2fsprogs-version "1.41.8">
-<!ENTITY e2fsprogs-size "4,336 KB">
-<!ENTITY e2fsprogs-url "&sourceforge;e2fsprogs/e2fsprogs-&e2fsprogs-version;.tar.gz">
-<!ENTITY e2fsprogs-md5 "6708cc8e484809fc5cfb232882e48489">
-<!ENTITY e2fsprogs-home "http://e2fsprogs.sourceforge.net">
-
-<!ENTITY file-version "5.03">
-<!ENTITY file-size "601 KB">
-<!ENTITY file-url "ftp://ftp.astron.com/pub/file/file-&file-version;.tar.gz">
-<!--<!ENTITY file-url "&packages-root;file-&file-version;.tar.gz">-->
-<!ENTITY file-md5 "d05f08a53e5c2f51f8ee6a4758c0cc53">
-<!ENTITY file-home "http://www.darwinsys.com/file">
-
-<!ENTITY findutils-version "4.4.2">
-<!ENTITY findutils-size "2,099 KB">
+<!ENTITY diffutils-home "&gnu-software;diffutils/">
+
+<!ENTITY dvhtool-version "1.0.1">
+<!ENTITY dvhtool-size "52 KB">
+<!ENTITY dvhtool-url "http://ftp.debian.org/debian/pool/main/d/dvhtool/dvhtool_&dvhtool-version;.orig.tar.gz">
+<!ENTITY dvhtool-md5 "4448c01e6a015685af90a79fbea8da4e">
+<!ENTITY dvhtool-home "http://packages.qa.debian.org/d/dvhtool.html">
+
+<!ENTITY e2fsprogs-version "1.38">
+<!ENTITY e2fsprogs-size "3,537 KB">
+<!ENTITY e2fsprogs-url "&sourceforge;e2fsprogs/e2fsprogs-&e2fsprogs-version;.tar.gz?download">
+<!ENTITY e2fsprogs-md5 "d774d4412bfb80d12cf3a4fdfd59de5a">
+<!ENTITY e2fsprogs-home "http://e2fsprogs.sourceforge.net/">
+
+<!ENTITY elftoaout-version "2.3">
+<!ENTITY elftoaout-size "13 KB">
+<!ENTITY elftoaout-url "http://gd.tuwien.ac.at/opsys/linux/Owl/pool/sources/elftoaout/elftoaout-&elftoaout-version;.tgz">
+<!ENTITY elftoaout-md5 "be3bd6f7ba8ae107cbdbaa820ba64f86">
+<!ENTITY elftoaout-home " ">
+
+<!ENTITY expect-version "5.43.0">
+<!ENTITY expect-size "514 KB">
+<!ENTITY expect-url "http://expect.nist.gov/src/expect-&expect-version;.tar.gz">
+<!ENTITY expect-md5 "43e1dc0e0bc9492cf2e1a6f59f276bc3">
+<!ENTITY expect-home "http://expect.nist.gov">
+<!ENTITY expect-lib-version "5.43">
+
+<!ENTITY file-version "4.17">
+<!ENTITY file-size "544 KB">
+<!ENTITY file-url "ftp://ftp.gw.com/mirrors/pub/unix/file/file-&file-version;.tar.gz">
+<!ENTITY file-md5 "50919c65e0181423d66bb25d7fe7b0fd">
+<!ENTITY file-home " ">
+
+<!ENTITY findutils-version "4.2.27">
+<!ENTITY findutils-size "1,097 KB">
 <!ENTITY findutils-url "&gnu;findutils/findutils-&findutils-version;.tar.gz">
-<!ENTITY findutils-md5 "351cc4adb07d54877fa15f75fb77d39f">
-<!ENTITY findutils-home "&gnu-software;findutils">
-
-<!ENTITY flex-version "2.5.35">
-<!ENTITY flex-size "1,227 KB">
-<!ENTITY flex-url "&sourceforge;flex/flex-&flex-version;.tar.bz2">
-<!ENTITY flex-md5 "10714e50cea54dc7a227e3eddcd44d57">
+<!ENTITY findutils-md5 "f1e0ddf09f28f8102ff3b90f3b5bc920">
+<!ENTITY findutils-home "&gnu-software;findutils/">
+
+<!ENTITY flex-version "2.5.33">
+<!ENTITY flex-size "680 KB">
+<!ENTITY flex-url "&sourceforge;flex/flex-&flex-version;.tar.bz2?download">
+<!ENTITY flex-md5 "343374a00b38d9e39d1158b71af37150">
 <!ENTITY flex-home "http://flex.sourceforge.net">
 
-<!ENTITY gawk-version "3.1.7">
-<!ENTITY gawk-size "2,310 KB">
+<!ENTITY gawk-version "3.1.5">
+<!ENTITY gawk-size "1,716 KB">
 <!ENTITY gawk-url "&gnu;gawk/gawk-&gawk-version;.tar.bz2">
-<!ENTITY gawk-md5 "674cc5875714315c490b26293d36dfcf">
-<!ENTITY gawk-home "&gnu-software;gawk">
-
-<!ENTITY gcc-version "4.4.1">
-<!ENTITY gcc-size "61,396 KB">
-<!ENTITY gcc-url "ftp://gcc.gnu.org/pub/gcc/releases/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2">
-<!ENTITY gcc-md5 "927eaac3d44b22f31f9c83df82f26436">
-<!ENTITY gcc-home "http://gcc.gnu.org">
-
-<!ENTITY gettext-version "0.17">
-<!ENTITY gettext-size "11,368 KB">
+<!ENTITY gawk-md5 "5703f72d0eea1d463f735aad8222655f">
+<!ENTITY gawk-home "&gnu-software;gawk/">
+
+<!ENTITY gcc-version "4.1.1">
+<!ENTITY gcc-size "38,300 KB">
+<!ENTITY gcc-url "&gnu;gcc/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2">
+<!ENTITY gcc-md5 "ad9f97a4d04982ccf4fd67cb464879f3">
+<!ENTITY gcc-home "http://gcc.gnu.org/">
+
+<!ENTITY gettext-version "0.14.5">
+<!ENTITY gettext-size "6,940 KB">
 <!ENTITY gettext-url "&gnu;gettext/gettext-&gettext-version;.tar.gz">
-<!ENTITY gettext-md5 "58a2bc6d39c0ba57823034d55d65d606">
-<!ENTITY gettext-home "&gnu-software;gettext">
-
-<!ENTITY eglibc-version "2.10.1">
-<!ENTITY eglibc-dl-version "&eglibc-version;-20090726-r8632">
-<!ENTITY eglibc-size "15,848 KB">
-<!ENTITY eglibc-url "&packages-root;eglibc-&eglibc-dl-version;.tar.bz2">
-<!ENTITY eglibc-md5 "11463bd364a0933c5af5b62a1e1abb76">
-<!ENTITY eglibc-home "http://www.eglibc.org/home">
-<!ENTITY eglibc-ld-name "ld-&eglibc-version;.so">
-
-<!ENTITY eglibc-ports-version "&eglibc-version;">
-<!ENTITY eglibc-ports-dl-version "&eglibc-dl-version;">
-<!ENTITY eglibc-ports-size "592 KB">
-<!ENTITY eglibc-ports-url "&packages-root;eglibc-ports-&eglibc-dl-version;.tar.bz2">
-<!ENTITY eglibc-ports-md5 "6dea1134ce62a373b376cb2ece25afc1">
-<!ENTITY eglibc-ports-home " ">
-
-<!ENTITY eglibc-localedef-version "&eglibc-version;">
-<!ENTITY eglibc-localedef-dl-version "&eglibc-dl-version;">
-<!ENTITY eglibc-localedef-size "592 KB">
-<!ENTITY eglibc-localedef-url "&packages-root;eglibc-localedef-&eglibc-dl-version;.tar.bz2">
-<!ENTITY eglibc-localedef-md5 "93415df45b9f70d0251de6e9c99c6d87">
-<!ENTITY eglibc-localedef-home " ">
-
-<!ENTITY gmp-version "4.3.1">
-<!ENTITY gmp-size "1,837 KB">
-<!ENTITY gmp-url "&gnu;gmp/gmp-&gmp-version;.tar.bz2">
-<!ENTITY gmp-md5 "26cec15a90885042dd4a15c4003b08ae">
-<!ENTITY gmp-home "http://gmplib.org/">
-
-<!ENTITY grep-version "2.5.4">
-<!ENTITY grep-size "706 KB">
+<!ENTITY gettext-md5 "e2f6581626a22a0de66dce1d81d00de3">
+<!ENTITY gettext-home "&gnu-software;gettext/">
+
+<!ENTITY glibc-version "2.4">
+<!ENTITY glibc-size "14,847 KB">
+<!ENTITY glibc-url "&gnu;glibc/glibc-&glibc-version;.tar.bz2">
+<!ENTITY glibc-md5 "7e9a88dcd41fbc53801dbe5bdacaf245">
+<!ENTITY glibc-home "&gnu-software;libc/">
+<!ENTITY glibc-ld-name "ld-2.4.so">
+
+<!ENTITY glibc-ports-version "&glibc-version;">
+<!ENTITY glibc-ports-size "534 KB">
+<!ENTITY glibc-ports-url "&gnu;glibc/glibc-ports-&glibc-ports-version;.tar.bz2">
+<!ENTITY glibc-ports-md5 "7bb1b35654e94994925e66676acabd4e">
+<!ENTITY glibc-ports-home " ">
+
+<!ENTITY grep-version "2.5.1a">
+<!ENTITY grep-size "516 KB">
 <!ENTITY grep-url "&gnu;grep/grep-&grep-version;.tar.bz2">
-<!ENTITY grep-md5 "5650ee2ae6ea4b39e9459d7d0585b315">
-<!ENTITY grep-home "&gnu-software;grep">
-
-<!ENTITY groff-version "1.20.1">
-<!ENTITY groff-size "3,510 KB">
+<!ENTITY grep-md5 "52202fe462770fa6be1bb667bd6cf30c">
+<!ENTITY grep-home "&gnu-software;grep/">
+
+<!ENTITY groff-version "1.19.2">
+<!ENTITY groff-size "2,836 KB">
 <!ENTITY groff-url "&gnu;groff/groff-&groff-version;.tar.gz">
-<!ENTITY groff-md5 "48fa768dd6fdeb7968041dd5ae8e2b02">
-<!ENTITY groff-home "&gnu-software;groff">
-
-<!ENTITY gzip-version "1.3.12">
-<!ENTITY gzip-size "451 KB">
-<!ENTITY gzip-url "&gnu;gzip/gzip-&gzip-version;.tar.gz">
-<!ENTITY gzip-md5 "b5bac2d21840ae077e0217bc5e4845b1">
-<!ENTITY gzip-home "http://www.gzip.org">
-
-<!ENTITY iana-etc-version "2.30">
-<!ENTITY iana-etc-size "200 KB">
+<!ENTITY groff-md5 "f7c9cf2e4b9967d3af167d7c9fadaae4">
+<!ENTITY groff-home "&gnu-software;groff/">
+
+<!ENTITY grub-version "0.97">
+<!ENTITY grub-size "950 KB">
+<!ENTITY grub-url "&alpha-gnu;grub/grub-&grub-version;.tar.gz">
+<!ENTITY grub-md5 "cd3f3eb54446be6003156158d51f4884">
+<!ENTITY grub-home "&gnu-software;grub/">
+
+<!ENTITY gzip-version "1.3.5">
+<!ENTITY gzip-size "324 KB">
+<!ENTITY gzip-url "&alpha-gnu;gzip/gzip-&gzip-version;.tar.gz">
+<!ENTITY gzip-md5 "3d6c191dfd2bf307014b421c12dc8469">
+<!ENTITY gzip-home "http://www.gzip.org/">
+
+<!ENTITY hfsutils-version "3.2.6">
+<!ENTITY hfsutils-size "203 KB">
+<!ENTITY hfsutils-url "ftp://ftp.mars.org/pub/hfs/hfsutils-&hfsutils-version;.tar.gz">
+<!ENTITY hfsutils-md5 "fa572afd6da969e25c1455f728750ec4">
+<!ENTITY hfsutils-home "http://www.mars.org/home/rob/proj/hfs/">
+
+<!ENTITY iana-etc-version "2.10">
+<!ENTITY iana-etc-size "184 KB">
 <!ENTITY iana-etc-url "http://www.sethwklein.net/projects/iana-etc/downloads/iana-etc-&iana-etc-version;.tar.bz2">
-<!ENTITY iana-etc-md5 "3ba3afb1d1b261383d247f46cb135ee8">
-<!ENTITY iana-etc-home "http://www.sethwklein.net/projects/iana-etc">
-
-<!ENTITY iproute2-version "2.6.29-1">
-<!ENTITY iproute2-size "359 KB">
-<!ENTITY iproute2-url "http://devresources.linux-foundation.org/dev/iproute2/download/iproute2-&iproute2-version;.tar.bz2">
-<!ENTITY iproute2-md5 "c1bc258a6c345905e79935ac7a3cc582">
-<!ENTITY iproute2-home "http://www.linuxfoundation.org/en/Net:Iproute2">
-
-<!ENTITY iputils-version "s20071127">
-<!ENTITY iputils-size "86 KB">
-<!ENTITY iputils-url "http://www.skbuff.net/iputils/iputils-&iputils-version;.tar.bz2">
-<!ENTITY iputils-md5 "12245e9927d60ff5cf4a99d265bcb7d3">
-<!ENTITY iputils-home "http://www.linuxfoundation.org/en/Net:Iputils">
-
-<!ENTITY kbd-version "1.15">
-<!ENTITY kbd-size "1,288 KB">
-<!ENTITY kbd-url "ftp://devel.altlinux.org/legion/kbd/kbd-&kbd-version;.tar.gz">
-<!ENTITY kbd-md5 "ba3fd20e6c79e58422c3cc6b28718939">
+<!ENTITY iana-etc-md5 "53dea53262b281322143c744ca60ffbb">
+<!ENTITY iana-etc-home "http://www.sethwklein.net/projects/iana-etc/">
+
+<!ENTITY inetutils-version "1.4.2">
+<!ENTITY inetutils-size "1019 KB">
+<!ENTITY inetutils-url "&gnu;inetutils/inetutils-&inetutils-version;.tar.gz">
+<!ENTITY inetutils-md5 "df0909a586ddac2b7a0d62795eea4206">
+<!ENTITY inetutils-home "&gnu-software;inetutils/">
+
+<!ENTITY iproute2-version "2.6.16-060323">
+<!ENTITY iproute2-size "378 KB">
+<!ENTITY iproute2-url "http://developer.osdl.org/dev/iproute2/download/iproute2-&iproute2-version;.tar.gz">
+<!ENTITY iproute2-md5 "f31d4516b35bbfeaa72c762f5959e97c">
+<!ENTITY iproute2-home "http://linux-net.osdl.org/index.php/Iproute2">
+
+<!ENTITY kbd-version "1.12">
+<!ENTITY kbd-size "618 KB">
+<!ENTITY kbd-url "&kernel;linux/utils/kbd/kbd-&kbd-version;.tar.bz2">
+<!ENTITY kbd-md5 "069d1175b4891343b107a8ac2b4a39f6">
 <!ENTITY kbd-home " ">
 
-<!ENTITY less-version "429">
-<!ENTITY less-size "296 KB">
+<!ENTITY less-version "394">
+<!ENTITY less-size "286 KB">
 <!ENTITY less-url "http://www.greenwoodsoftware.com/less/less-&less-version;.tar.gz">
-<!ENTITY less-md5 "206f2f13b9b0a35e45df660fcb6af31d">
-<!ENTITY less-home "http://www.greenwoodsoftware.com/less">
-
-<!ENTITY libtool-version "2.2.6a">
-<!ENTITY libtool-size "716 KB">
+<!ENTITY less-md5 "a9f072ccefa0d315b325f3e9cdbd4b97">
+<!ENTITY less-home "http://www.greenwoodsoftware.com/less/">
+
+<!ENTITY libtool-version "1.5.22">
+<!ENTITY libtool-size "2,854 KB">
 <!ENTITY libtool-url "&gnu;libtool/libtool-&libtool-version;.tar.gz">
-<!ENTITY libtool-md5 "8ca1ea241cd27ff9832e045fe9afe4fd">
-<!ENTITY libtool-home "&gnu-software;libtool">
+<!ENTITY libtool-md5 "8e0ac9797b62ba4dcc8a2fb7936412b0">
+<!ENTITY libtool-home "&gnu-software;libtool/">
+
+<!ENTITY lilo-version "22.7.1">
+<!ENTITY lilo-size "420 KB">
+<!ENTITY lilo-url "ftp://ftp.metalab.unc.edu/pub/Linux/system/boot/lilo/lilo-&lilo-version;.src.tar.gz">
+<!ENTITY lilo-md5 "1f3855c6f2c7b2beaa8a90bf9975a289">
+<!ENTITY lilo-home " ">
 
 <!ENTITY linux-dl-version "2.6">
 
-<!ENTITY linux-version "2.6.30.1">
-<!ENTITY linux-size "58,024 KB">
+<!ENTITY linux-version "2.6.16.18">
+<!ENTITY linux-size "39,884 KB">
 <!ENTITY linux-url "&kernel;linux/kernel/v&linux-dl-version;/linux-&linux-version;.tar.bz2">
-<!ENTITY linux-md5 "7da2e2e31f1c00f2673d2dc50de76b33">
-<!ENTITY linux-home "http://www.kernel.org">
-
-<!ENTITY m4-version "1.4.13">
-<!ENTITY m4-size "984 KB">
+<!ENTITY linux-md5 "5cb158630f9615983ab32cea9ace3025">
+<!ENTITY linux-home "http://www.kernel.org/">
+
+<!ENTITY linux-headers-version "&linux-version;-05222006">
+<!ENTITY linux-headers-size "1,468 KB">
+<!ENTITY linux-headers-url "http://ftp.jg555.com/headers/linux-headers-&linux-headers-version;.tar.bz2">
+<!ENTITY linux-headers-md5 "77ff1120edc9d7bdd5ee3573a8f8dc8a">
+<!ENTITY linux-headers-home "http://headers.cross-lfs.org/">
+
+<!ENTITY m4-version "1.4.4">
+<!ENTITY m4-size "300 KB">
 <!ENTITY m4-url "&gnu;m4/m4-&m4-version;.tar.bz2">
-<!ENTITY m4-md5 "28f9ccd3ac4da45409251008b911d677">
-<!ENTITY m4-home "&gnu-software;m4">
+<!ENTITY m4-md5 "eb93bfbcb12cf00165583302bb31a822">
+<!ENTITY m4-home "&gnu-software;m4/">
 
 <!ENTITY make-version "3.81">
-<!ENTITY make-size "1,124 KB">
+<!ENTITY make-size "1,125 KB">
 <!ENTITY make-url "&gnu;make/make-&make-version;.tar.bz2">
 <!ENTITY make-md5 "354853e0b2da90c527e35aabb8d6f1e6">
-<!ENTITY make-home "&gnu-software;make">
-
-<!ENTITY man-version "1.6f">
-<!ENTITY man-size "248 KB">
+<!ENTITY make-home "&gnu-software;make/">
+
+<!ENTITY man-version "1.6c">
+<!ENTITY man-size "240 KB">
 <!ENTITY man-url "http://primates.ximian.com/~flucifredi/man/man-&man-version;.tar.gz">
-<!ENTITY man-md5 "67aaaa6df35215e812fd7d89472c44b6">
-<!ENTITY man-home "http://primates.ximian.com/~flucifredi/man">
-
-<!ENTITY man-pages-version "3.21">
-<!ENTITY man-pages-size "1,062 KB">
-<!ENTITY man-pages-url "&kernel;linux/docs/manpages/Archive/man-pages-&man-pages-version;.tar.bz2">
-<!ENTITY man-pages-md5 "14b3f971348f4d59ae8b8362d8eb15ff">
-<!ENTITY man-pages-home "http://www.win.tue.nl/~aeb/linux/man">
-
-<!ENTITY module-init-tools-version "3.10">
-<!ENTITY module-init-tools-size "864 KB">
-<!ENTITY module-init-tools-url "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/module-init-tools-&module-init-tools-version;.tar.bz2">
-<!ENTITY module-init-tools-md5 "fcde0344ad07c4ae2ae6b40918fd092d">
-<!ENTITY module-init-tools-home "http://www.kerneltools.org/KernelTools.org">
-
-<!ENTITY mpfr-version "2.4.1">
-<!ENTITY mpfr-size "1,039 KB">
-<!ENTITY mpfr-dlid "18438">
-<!ENTITY mpfr-url "http://gforge.inria.fr/frs/download.php/&mpfr-dlid;/mpfr-&mpfr-version;.tar.bz2">
-<!ENTITY mpfr-md5 "a70bbde2a23d82e8f3314d4293500ae4">
-<!ENTITY mpfr-home "http://www.mpfr.org/">
-
-<!ENTITY ncurses-version2 "5">
-<!ENTITY ncurses-version "&ncurses-version2;.7">
-<!ENTITY ncurses-size "2,387 KB">
+<!ENTITY man-md5 "ac1e7d60dfedb7d1c6f398ae5b038996">
+<!ENTITY man-home "http://primates.ximian.com/~flucifredi/man/">
+
+<!ENTITY man-pages-version "2.32">
+<!ENTITY man-pages-size "1,752 KB">
+<!ENTITY man-pages-url "&kernel;linux/docs/manpages/man-pages-&man-pages-version;.tar.bz2">
+<!ENTITY man-pages-md5 "8e90f8312bdd35ec3e789bf67c9b0ee3">
+<!ENTITY man-pages-home " ">
+
+<!ENTITY mktemp-version "1.5">
+<!ENTITY mktemp-size "69 KB">
+<!ENTITY mktemp-url "ftp://ftp.mktemp.org/pub/mktemp/mktemp-&mktemp-version;.tar.gz">
+<!ENTITY mktemp-md5 "9a35c59502a228c6ce2be025fc6e3ff2">
+<!ENTITY mktemp-home "http://www.mktemp.org/">
+
+<!ENTITY module-init-tools-version "3.2.2">
+<!ENTITY module-init-tools-size "166 KB">
+<!ENTITY module-init-tools-url "&kernel;linux/utils/kernel/module-init-tools/module-init-tools-&module-init-tools-version;.tar.bz2">
+<!ENTITY module-init-tools-md5 "a1ad0a09d3231673f70d631f3f5040e9">
+<!ENTITY module-init-tools-home " ">
+
+<!ENTITY ncurses-version "5.5">
+<!ENTITY ncurses-size "2,260 KB">
 <!ENTITY ncurses-url "ftp://invisible-island.net/ncurses/ncurses-&ncurses-version;.tar.gz">
-<!ENTITY ncurses-md5 "cce05daf61a64501ef6cd8da1f727ec6">
-<!ENTITY ncurses-home "&gnu-software;ncurses">
+<!ENTITY ncurses-md5 "e73c1ac10b4bfc46db43b2ddfd6244ef">
+<!ENTITY ncurses-home "http://dickey.his.com/ncurses/">
 
 <!ENTITY patch-version "2.5.9">
-<!ENTITY patch-size "197 KB">
+<!ENTITY patch-size "198 KB">
 <!ENTITY patch-url "&alpha-gnu;diffutils/patch-&patch-version;.tar.gz">
 <!ENTITY patch-md5 "dacfb618082f8d3a2194601193cf8716">
-<!ENTITY patch-home "&gnu-software;patch">
-
-<!ENTITY perl-version "5.10.0">
-<!ENTITY perl-size "15,229 KB">
-<!ENTITY perl-url "http://ftp.funet.fi/pub/CPAN/src/perl-&perl-version;.tar.gz">
-<!ENTITY perl-md5 "d2c39b002ebfd2c3c5dba589365c5a71">
-<!ENTITY perl-home "http://www.perl.org">
-
-<!ENTITY ppl-version "0.10.2">
-<!ENTITY ppl-size "9,589 KB">
-<!ENTITY ppl-url "http://www.cs.unipr.it/ppl/Download/ftp/releases/0.10.2/ppl-0.10.2.tar.bz2">
-<!ENTITY ppl-md5 "5667111f53150618b0fa522ffc53fc3e">
-<!ENTITY ppl-home "http://www.cs.unipr.it/ppl">
-
-<!ENTITY procps-version "3.2.8">
-<!ENTITY procps-size "279 KB">
+<!ENTITY patch-home "&gnu-software;patch/">
+
+<!ENTITY parted-version "1.6.25.1">
+<!ENTITY parted-size "1,533 KB">
+<!ENTITY parted-url "&gnu;/parted/parted-&parted-version;.tar.gz">
+<!ENTITY parted-md5 "8ad8b2c8aa865d9d6a43a4ecfe021782">
+<!ENTITY parted-home "&gnu-software;parted/">
+
+<!ENTITY perl-version "5.8.8">
+<!ENTITY perl-size "9,887 KB">
+<!ENTITY perl-url "http://ftp.funet.fi/pub/CPAN/src/perl-&perl-version;.tar.bz2">
+<!ENTITY perl-md5 "a377c0c67ab43fd96eeec29ce19e8382">
+<!ENTITY perl-home "http://www.perl.com/">
+
+<!ENTITY powerpcutils-version "1.1.3">
+<!ENTITY powerpcutils-size "25 KB">
+<!ENTITY powerpcutils-url "http://ftp.debian.org/debian/pool/main/p/powerpc-utils/powerpc-utils_&powerpcutils-version;.orig.tar.gz">
+<!ENTITY powerpcutils-md5 "d879b109bb8f0d726304b60b147bff13">
+<!ENTITY powerpcutils-home "http://packages.qa.debian.org/p/powerpc-utils.html">
+
+<!ENTITY procps-version "3.2.6">
+<!ENTITY procps-size "273 KB">
 <!ENTITY procps-url "http://procps.sourceforge.net/procps-&procps-version;.tar.gz">
-<!ENTITY procps-md5 "9532714b6846013ca9898984ba4cd7e0">
-<!ENTITY procps-home "http://procps.sourceforge.net">
-
-<!ENTITY psmisc-version "22.6">
-<!ENTITY psmisc-size "275 KB">
-<!ENTITY psmisc-url "&sourceforge;psmisc/psmisc-&psmisc-version;.tar.gz">
-<!ENTITY psmisc-md5 "2e81938855cf5cc38856bd4a31d79a4c">
-<!ENTITY psmisc-home "http://psmisc.sourceforge.net">
-
-<!ENTITY readline-version2 "6">
-<!ENTITY readline-version "&readline-version2;.0">
-<!ENTITY readline-size "2,217 KB">
+<!ENTITY procps-md5 "7ce39ea27d7b3da0e8ad74dd41d06783">
+<!ENTITY procps-home "http://procps.sourceforge.net/">
+
+<!ENTITY psmisc-version "22.2">
+<!ENTITY psmisc-size "239 KB">
+<!ENTITY psmisc-url "&sourceforge;psmisc/psmisc-&psmisc-version;.tar.gz?download">
+<!ENTITY psmisc-md5 "77737c817a40ef2c160a7194b5b64337">
+<!ENTITY psmisc-home "http://psmisc.sourceforge.net/">
+
+<!ENTITY readline-version "5.1">
+<!ENTITY readline-size "1,983 KB">
 <!ENTITY readline-url "&gnu;readline/readline-&readline-version;.tar.gz">
-<!ENTITY readline-md5 "b7f65a48add447693be6e86f04a63019">
+<!ENTITY readline-md5 "7ee5a692db88b30ca48927a13fd60e46">
 <!ENTITY readline-home "http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html">
 
-<!ENTITY rsyslog-version "4.2.0">
-<!ENTITY rsyslog-size "1,365 KB">
-<!ENTITY rsyslog-url "http://download.rsyslog.com/rsyslog/rsyslog-&rsyslog-version;.tar.gz">
-<!ENTITY rsyslog-md5 "c66650e961f23253fc926da5d35bd71f">
-<!ENTITY rsyslog-home "http://www.rsyslog.com/">
-
-<!ENTITY sed-version "4.2.1">
-<!ENTITY sed-size "878 KB">
-<!ENTITY sed-url "&gnu;sed/sed-&sed-version;.tar.bz2">
-<!ENTITY sed-md5 "7d310fbd76e01a01115075c1fd3f455a">
-<!ENTITY sed-home "&gnu-software;sed">
-
-<!ENTITY shadow-version "4.1.4.2">
-<!ENTITY shadow-size "1,748 KB">
-<!ENTITY shadow-url "ftp://pkg-shadow.alioth.debian.org/pub/pkg-shadow/shadow-&shadow-version;.tar.bz2">
-<!ENTITY shadow-md5 "d593a9cab93c48ee0a6ba056db8c1997">
-<!ENTITY shadow-home "http://pkg-shadow.alioth.debian.org">
+<!ENTITY sed-version "4.1.5">
+<!ENTITY sed-size "781 KB">
+<!ENTITY sed-url "&gnu;sed/sed-&sed-version;.tar.gz">
+<!ENTITY sed-md5 "7a1cbbbb3341287308e140bd4834c3ba">
+<!ENTITY sed-home "&gnu-software;sed/">
+
+<!ENTITY shadow-version "4.0.15">
+<!ENTITY shadow-size "1,265 KB">
+<!ENTITY shadow-url "ftp://ftp.pld.org.pl/software/shadow/shadow-&shadow-version;.tar.bz2">
+<!ENTITY shadow-md5 "a0452fa989f8ba45023cc5a08136568e">
+<!ENTITY shadow-home " ">
+
+<!ENTITY silo-version "1.4.11">
+<!ENTITY silo-size "142 KB">
+<!ENTITY silo-url "http://www.sparc-boot.org/pub/silo/silo-&silo-version;.tar.bz2">
+<!ENTITY silo-md5 "37eea1b33d80f6c35d53af9029e30a02">
+<!ENTITY silo-home "http://www.sparc-boot.org/">
+
+<!ENTITY sysklogd-version "1.4.1">
+<!ENTITY sysklogd-size "80 KB">
+<!ENTITY sysklogd-url "http://www.infodrom.org/projects/sysklogd/download/sysklogd-&sysklogd-version;.tar.gz">
+<!ENTITY sysklogd-md5 "d214aa40beabf7bdb0c9b3c64432c774">
+<!ENTITY sysklogd-home "http://www.infodrom.org/projects/sysklogd/">
 
 <!ENTITY sysvinit-version "2.86">
-<!ENTITY sysvinit-size "96 KB">
+<!ENTITY sysvinit-size "97 KB">
 <!ENTITY sysvinit-url "ftp://ftp.cistron.nl/pub/people/miquels/sysvinit/sysvinit-&sysvinit-version;.tar.gz">
 <!ENTITY sysvinit-md5 "7d5d61c026122ab791ac04c8a84db967">
 <!ENTITY sysvinit-home " ">
 
-<!ENTITY tar-version "1.22">
-<!ENTITY tar-size "2,048 KB">
+<!ENTITY tar-version "1.15.1">
+<!ENTITY tar-size "1,574 KB">
 <!ENTITY tar-url "&gnu;tar/tar-&tar-version;.tar.bz2">
-<!ENTITY tar-md5 "07fa517027f426bb80f5f5ff91b63585">
-<!ENTITY tar-home "&gnu-software;tar">
-
-<!ENTITY texinfo-version "4.13a">
-<!ENTITY texinfo-size "2,686 KB">
-<!ENTITY texinfo-url "&gnu;texinfo/texinfo-&texinfo-version;.tar.gz">
-<!ENTITY texinfo-md5 "71ba711519209b5fb583fed2b3d86fcb">
-<!ENTITY texinfo-home "&gnu-software;texinfo">
-
-<!ENTITY udev-version "145">
-<!ENTITY udev-size "518 KB">
+<!ENTITY tar-md5 "57da3c38f8e06589699548a34d5a5d07">
+<!ENTITY tar-home "&gnu-software;tar/">
+
+<!ENTITY tcl-version "8.4.12">
+<!ENTITY tcl-size "3,419 KB">
+<!ENTITY tcl-url "&sourceforge;tcl/tcl&tcl-version;-src.tar.gz?download">
+<!ENTITY tcl-md5 "7480432d8730263f267952788eb4839b">
+<!ENTITY tcl-home "http://tcl.sourceforge.net/">
+
+<!ENTITY texinfo-version "4.8">
+<!ENTITY texinfo-size "1,487 KB">
+<!ENTITY texinfo-url "&gnu;texinfo/texinfo-&texinfo-version;.tar.bz2">
+<!ENTITY texinfo-md5 "6ba369bbfe4afaa56122e65b3ee3a68c">
+<!ENTITY texinfo-home "&gnu-software;texinfo/">
+
+<!ENTITY tree-version "1.5.0">
+<!ENTITY tree-size "26 KB">
+<!ENTITY tree-url "ftp://mama.indstate.edu/linux/tree/tree-&tree-version;.tgz">
+<!ENTITY tree-md5 "e0d090c564e7ea5afa16bac80620c7e0">
+<!ENTITY tree-home " ">
+
+<!ENTITY udev-version "091">
+<!ENTITY udev-size "189 KB">
 <!ENTITY udev-url "&kernel;linux/utils/kernel/hotplug/udev-&udev-version;.tar.bz2">
-<!ENTITY udev-md5 "b3d3b5f88c7b81e7615700a04db685e1">
+<!ENTITY udev-md5 "4151022ea7b4dcfaa768c1b7bf2ab9e5">
 <!ENTITY udev-home "http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html">
 
-<!ENTITY util-linux-ng-dl-version "2.16">
-
-<!ENTITY util-linux-ng-version "2.16">
-<!ENTITY util-linux-ng-size "3,392 KB">
-<!ENTITY util-linux-ng-url "&kernel;linux/utils/util-linux-ng/v&util-linux-ng-dl-version;/util-linux-ng-&util-linux-ng-version;.tar.bz2">
-<!ENTITY util-linux-ng-md5 "9623380641b0c2e0449f5b1ecc567663">
-<!ENTITY util-linux-ng-home "http://userweb.kernel.org/~kzak/util-linux-ng/">
-
-<!ENTITY vim-version "7.2">
-<!ENTITY vim-version2 "72">
-<!ENTITY vim-size "7,034 KB">
+<!ENTITY udev-cross-lfs-version "0.1-05142006">
+<!ENTITY udev-cross-lfs-size "9 KB">
+<!ENTITY udev-cross-lfs-url "http://ftp.jg555.com/udev/udev-cross-lfs-&udev-cross-lfs-version;.tar.bz2">
+<!ENTITY udev-cross-lfs-md5 "1d88251e017ad549a2225f96b0719cff">
+<!ENTITY udev-cross-lfs-home " ">
+
+<!ENTITY util-linux-version "2.12r">
+<!ENTITY util-linux-size "1,339 KB">
+<!ENTITY util-linux-url "&kernel;linux/utils/util-linux/util-linux-&util-linux-version;.tar.bz2">
+<!ENTITY util-linux-md5 "af9d9e03038481fbf79ea3ac33f116f9">
+<!ENTITY util-linux-home " ">
+
+<!ENTITY yaboot-version "1.3.13">
+<!ENTITY yaboot-size "269 KB">
+<!ENTITY yaboot-url "http://penguinppc.org/bootloaders/yaboot/yaboot-&yaboot-version;.tar.gz">
+<!ENTITY yaboot-md5 "f12798d1b2063f21d07e0ae7f602ccaf">
+<!ENTITY yaboot-home "http://yaboot.ozlabs.org/">
+
+<!ENTITY vim-version "7.0">
+<!ENTITY vim-version2 "70">
+<!ENTITY vim-size "6,422 KB">
 <!ENTITY vim-url "ftp://ftp.vim.org/pub/vim/unix/vim-&vim-version;.tar.bz2">
-<!ENTITY vim-md5 "f0901284b338e448bfd79ccca0041254">
+<!ENTITY vim-md5 "4ca69757678272f718b1041c810d82d8">
 <!ENTITY vim-home "http://www.vim.org">
-<!ENTITY vim-language-size "1,333 KB">
+<!ENTITY vim-language-size "1,153 KB">
 <!ENTITY vim-language-url "ftp://ftp.vim.org/pub/vim/extra/vim-&vim-version;-lang.tar.gz">
-<!ENTITY vim-language-md5 "d8884786979e0e520c112faf2e176f05">
+<!ENTITY vim-language-md5 "6d43efaff570b5c86e76b833ea0c6a04">
 <!ENTITY vim-language-home " ">
 
-<!ENTITY xz-version "4.999.8beta">
-<!ENTITY xz-size "833 KB">
-<!ENTITY xz-url "http://tukaani.org/xz/xz-&xz-version;.tar.gz">
-<!ENTITY xz-md5 "f00967331a487e88d51207fe17c56f52">
-<!ENTITY xz-home "http://tukaani.org/xz/">
-
 <!ENTITY zlib-version "1.2.3">
-<!ENTITY zlib-size "484 KB">
+<!ENTITY zlib-size "485 KB">
 <!ENTITY zlib-url "http://www.zlib.net/zlib-&zlib-version;.tar.gz">
 <!ENTITY zlib-md5 "debc62758716a169df9f62e6ab2bc634">
Index: OK/partitioning/alpha-chapter.xml
===================================================================
--- BOOK/partitioning/alpha-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,19 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../general.ent">
-  %general-entities;
-]>
-
-<chapter id="chapter-partitioning" xreflabel="Preparing a New Partition">
-  <?dbhtml dir="partitioning"?>
-  <?dbhtml filename="chapter.html"?>
-
-  <title>Preparing a New Partition</title>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/introduction.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/creatingpartition.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/creatingfilesystem.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/mounting.xml"/>
-
-</chapter>
Index: BOOK/partitioning/arm-chapter.xml
===================================================================
--- BOOK/partitioning/arm-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/partitioning/arm-chapter.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../general.ent">
   %general-entities;
Index: BOOK/partitioning/common/creatingfilesystem.xml
===================================================================
--- BOOK/partitioning/common/creatingfilesystem.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/partitioning/common/creatingfilesystem.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -16,13 +16,13 @@
   journaling file systems are becoming increasingly popular. We will create
   an <systemitem class="filesystem">ext2</systemitem> file system.
-  Instructions for other file systems can be found at
-  <ulink url="&cblfs-root;index.php?section=6#File_System"/>.</para>
+  Build instructions for other file systems can be found at
+  <ulink url="&blfs-root;view/svn/postlfs/filesystems.html"/>.</para>
 
   <para os="b">To create an <systemitem class="filesystem">ext2</systemitem> file
-  system on the CLFS partition, run the following:</para>
+  system on the LFS partition, run the following:</para>
 
 <screen os="c"><userinput>mke2fs /dev/<replaceable>[xxx]</replaceable></userinput></screen>
 
-  <para os="d">Replace <replaceable>[xxx]</replaceable> with the name of the CLFS
+  <para os="d">Replace <replaceable>[xxx]</replaceable> with the name of the LFS
   partition (<filename class="devicefile">hda5</filename> in our previous
   example).</para>
@@ -31,9 +31,9 @@
     <para>Some host distributions use custom features in their filesystem
     creation tools (E2fsprogs). This can cause problems when booting into
-    your new CLFS system, as those features will not be supported by the
-    CLFS-installed E2fsprogs; you will get an error similar to
-    <computeroutput>unsupported filesystem features, upgrade your
-    e2fsprogs</computeroutput>. To check if your host system uses custom
-    enhancements, run the following command:</para>
+    your new LFS, as those features will not be supported by the LFS-installed
+    E2fsprogs; you will get an error similar to <computeroutput>unsupported
+    filesystem features, upgrade your e2fsprogs</computeroutput>. To check
+    if your host system uses custom enhancements, run the following
+    command:</para>
 
 <screen os="f"><userinput>debugfs -R feature /dev/<replaceable>[xxx]</replaceable></userinput></screen>
@@ -43,5 +43,5 @@
     enhancements.  In that case, to avoid later problems, you should compile the
     stock E2fsprogs package and use the resulting binaries to re-create the
-    filesystem on your CLFS partition:</para>
+    filesystem on your LFS partition:</para>
 
 <screen os="g"><userinput>cd /tmp
Index: BOOK/partitioning/common/creatingpartition.xml
===================================================================
--- BOOK/partitioning/common/creatingpartition.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/partitioning/common/creatingpartition.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -11,18 +11,23 @@
   <title>Creating a New Partition</title>
 
-  <para os="a">Like most other operating systems, CLFS is usually installed
-  on a dedicated partition. The recommended approach to building a CLFS
+  <para os="a">Like most other operating systems, CLFS is usually installed on
+  a dedicated partition. The recommended approach to building a CLFS
   system is to use an available empty partition or, if you have enough
-  unpartitioned space, to create one. However, if you're building for a different
-  architecture you can simply build everything in <quote>/mnt/clfs</quote>
-  and transfer it to your target machine.</para>
+  unpartitioned space, to create one. However, a CLFS system (in fact
+  even multiple CLFS systems) may also be installed on a partition already
+  occupied by another operating system and the different systems will
+  co-exist peacefully. The document <ulink
+  url="&hints-root;lfs_next_to_existing_systems.txt"/> explains how to
+  implement this, whereas this book discusses the method of using a fresh
+  partition for the installation.</para>
 
-  <para os="b">A minimal system requires around 2.5 gigabytes (GB).
-  This is enough to store all the source tarballs and compile the packages. The CLFS
-  system itself will not take up this much room. A large portion of this requirement
-  is to provide sufficient free temporary storage. Compiling packages can require a
-  lot of disk space which will be reclaimed after the package is installed. If the
-  CLFS system is intended to be the primary Linux system,  additional software will
-  probably be installed which will require additional space (2-10 GB). </para>
+  <para os="b">A minimal system requires a partition of around 1.3 gigabytes (GB).
+  This is enough to store all the source tarballs and compile the packages.
+  However, if the CLFS system is intended to be the primary Linux system,
+  additional software will probably be installed which will require
+  additional space (2-3 GB). The LFS system itself will not take up this
+  much room. A large portion of this requirement is to provide sufficient
+  free temporary storage. Compiling packages can require a lot of disk space
+  which will be reclaimed after the package is installed.</para>
 
   <para os="c">Because there is not always enough Random Access Memory (RAM)
@@ -30,5 +35,5 @@
   partition as swap space. This is used by the kernel to store seldom-used
   data and leave more memory available for active processes. The swap
-  partition for an CLFS system can be the same as the one used by the host
+  partition for an LFS system can be the same as the one used by the host
   system, in which case it is not necessary to create another one.</para>
 
Index: BOOK/partitioning/common/introduction.xml
===================================================================
--- BOOK/partitioning/common/introduction.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/partitioning/common/introduction.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
Index: BOOK/partitioning/common/mounting.xml
===================================================================
--- BOOK/partitioning/common/mounting.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/partitioning/common/mounting.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -15,29 +15,29 @@
   mounted at a chosen mount point. For the purposes of this book, it is
   assumed that the file system is mounted under <filename
-  class="directory">/mnt/clfs</filename>, but the directory choice is up
+  class="directory">/mnt/lfs</filename>, but the directory choice is up
   to you.</para>
 
-  <para>Choose a mount point and assign it to the <envar>CLFS</envar>
+  <para>Choose a mount point and assign it to the <envar>LFS</envar>
   environment variable by running:</para>
 
-<screen><userinput>export CLFS=/mnt/clfs</userinput></screen>
+<screen><userinput>export LFS=/mnt/lfs</userinput></screen>
 
   <para>Next, create the mount point and mount the CLFS file system by
   running:</para>
 
-<screen><userinput>mkdir -pv ${CLFS}
-mount -v /dev/<replaceable>[xxx]</replaceable> ${CLFS}</userinput></screen>
+<screen><userinput>mkdir -pv $LFS
+mount -v /dev/<replaceable>[xxx]</replaceable> $LFS</userinput></screen>
 
   <para>Replace <replaceable>[xxx]</replaceable> with the designation of
   the CLFS partition.</para>
 
-  <para>If using multiple partitions for CLFS (e.g., one for <filename
+  <para>If using multiple partitions for LFS (e.g., one for <filename
   class="directory">/</filename> and another for <filename
   class="directory">/usr</filename>), mount them using:</para>
 
-<screen><userinput>mkdir -pv ${CLFS}
-mount -v /dev/<replaceable>[xxx]</replaceable> ${CLFS}
-mkdir -v ${CLFS}/usr
-mount -v /dev/<replaceable>[yyy]</replaceable> ${CLFS}/usr</userinput></screen>
+<screen><userinput>mkdir -pv $LFS
+mount -v /dev/<replaceable>[xxx]</replaceable> $LFS
+mkdir -v $LFS/usr
+mount -v /dev/<replaceable>[yyy]</replaceable> $LFS/usr</userinput></screen>
 
   <para>Replace <replaceable>[xxx]</replaceable> and
Index: OK/partitioning/hppa-chapter.xml
===================================================================
--- BOOK/partitioning/hppa-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,19 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../general.ent">
-  %general-entities;
-]>
-
-<chapter id="chapter-partitioning" xreflabel="Preparing a New Partition">
-  <?dbhtml dir="partitioning"?>
-  <?dbhtml filename="chapter.html"?>
-
-  <title>Preparing a New Partition</title>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/introduction.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/creatingpartition.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/creatingfilesystem.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/mounting.xml"/>
-
-</chapter>
Index: OK/partitioning/x86-chapter.xml
===================================================================
--- BOOK/partitioning/x86-chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,19 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../general.ent">
-  %general-entities;
-]>
-
-<chapter id="chapter-partitioning" xreflabel="Preparing a New Partition">
-  <?dbhtml dir="partitioning"?>
-  <?dbhtml filename="chapter.html"?>
-
-  <title>Preparing a New Partition</title>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/introduction.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/creatingpartition.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/creatingfilesystem.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/mounting.xml"/>
-
-</chapter>
Index: BOOK/patches.ent
===================================================================
--- BOOK/patches.ent	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/patches.ent	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,101 +1,121 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 
-<!ENTITY patches-root "http://patches.cross-lfs.org/sysroot-dev/">
+<!ENTITY patches-root "&lfs-root;patches/downloads/">
 
 <!-- Start of Common Patches -->
 
-<!ENTITY bash-branch_update-patch "bash-&bash-version;-branch_update-6.patch">
-<!ENTITY bash-branch_update-patch-md5 "b80de9ff5aa41a3e6ed2cdaa7c15027a">
-<!ENTITY bash-branch_update-patch-size "40 KB">
+<!ENTITY bash-fixes-patch "bash-&bash-version;-fixes-8.patch">
+<!ENTITY bash-fixes-patch-md5 "bc337045fa4c5839babf0306cc9df6d0">
+<!ENTITY bash-fixes-patch-size "23 KB">
 
-<!ENTITY binutils-branch_update-patch "binutils-&binutils-version;-branch_update-5.patch">
-<!ENTITY binutils-branch_update-patch-md5 "577d2c47daf07e35041382f4d5d6581e">
-<!ENTITY binutils-branch_update-patch-size "557 KB">
+<!ENTITY binutils-posix-patch "binutils-&binutils-version;-posix-1.patch">
+<!ENTITY binutils-posix-patch-md5 "7e42a8edc0c59246bbc58c428256113c">
+<!ENTITY binutils-posix-patch-size "4.9 KB">
 
-<!ENTITY coreutils-uname-patch "coreutils-&coreutils-version;-uname-1.patch">
-<!ENTITY coreutils-uname-patch-md5 "e21c03d8d79e07366ee558ab4b3c5ece">
-<!ENTITY coreutils-uname-patch-size "4 KB">
+<!ENTITY bzip2-docs-patch "bzip2-&bzip2-version;-install_docs-1.patch">
+<!ENTITY bzip2-docs-patch-md5 "9e5dfbf4814b71ef986b872c9af84488">
+<!ENTITY bzip2-docs-patch-size "1.7 KB">
 
-<!ENTITY diffutils-i18n-patch "diffutils-&diffutils-version;-i18n-1.patch">
-<!ENTITY diffutils-i18n-patch-md5 "2e176c390bf4dca2fb088e0a16261a96">
-<!ENTITY diffutils-i18n-patch-size "17 KB">
+<!ENTITY bzip2-remove_tempfile-patch "bzip2-&bzip2-version;-remove_tempfile-1.patch">
+<!ENTITY bzip2-remove_tempfile-patch-md5 "bcadb0ce282c96af15a86a2ccdac0765">
+<!ENTITY bzip2-remove_tempfile-patch-size "1.8 KB">
 
-<!ENTITY eglibc-fixes-patch "eglibc-&eglibc-version;-fixes-2.patch">
-<!ENTITY eglibc-fixes-patch-md5 "082eb9a8e2019ce31dff6a9b1f8d2a7c">
-<!ENTITY eglibc-fixes-patch-size "2 KB">
+<!ENTITY bzip2-bzgrep-patch "bzip2-&bzip2-version;-bzgrep_security-1.patch">
+<!ENTITY bzip2-bzgrep-patch-md5 "4eae50e4fd690498f23d3057dfad7066">
+<!ENTITY bzip2-bzgrep-patch-size "1.3 KB">
 
-<!ENTITY file-cross_compile-patch "file-&file-version;-cross_compile-1.patch">
-<!ENTITY file-cross_compile-patch-md5 "17956303345b8514a9c2bdc3939a21e5">
-<!ENTITY file-cross_compile-patch-size "1 KB">
+<!ENTITY coreutils-suppress-patch "coreutils-&coreutils-version;-suppress_uptime_kill_su-1.patch">
+<!ENTITY coreutils-suppress-patch-md5 "227d41a6d0f13c31375153eae91e913d">
+<!ENTITY coreutils-suppress-patch-size "13 KB">
 
-<!ENTITY gcc-branch_update-patch "gcc-&gcc-version;-branch_update-1.patch">
-<!ENTITY gcc-branch_update-patch-md5 "ab8fc23fb2814b2d1e4128fa8d02f4e2">
-<!ENTITY gcc-branch_update-patch-size "184 KB">
+<!ENTITY expect-spawn-patch "expect-&expect-version;-spawn-2.patch">
+<!ENTITY expect-spawn-patch-md5 "7706e1e8238c72eed8dc905d6f3b6aa9">
+<!ENTITY expect-spawn-patch-size "6.9 KB">
 
-<!ENTITY grep-i18n-patch "grep-&grep-version;-i18n-1.patch">
-<!ENTITY grep-i18n-patch-md5 "337d017202d7e3b08d428a89da3ee572">
-<!ENTITY grep-i18n-patch-size "26 KB">
+<!ENTITY gawk-segfault-patch "gawk-&gawk-version;-segfault_fix-1.patch">
+<!ENTITY gawk-segfault-patch-md5 "7679530d88bf3eb56c42eb6aba342ddb">
+<!ENTITY gawk-segfault-patch-size "1.3 KB">
 
-<!ENTITY iputils-fixes-patch "iputils-&iputils-version;-fixes-2.patch">
-<!ENTITY iputils-fixes-patch-md5 "31a39902b0d343233d48ef0f3c038559">
-<!ENTITY iputils-fixes-patch-size "6 KB">
+<!ENTITY gcc-cross_search-patch "gcc-&gcc-version;-cross_search_paths-1.patch">
+<!ENTITY gcc-cross_search-patch-md5 "541fe39d228ddaa0d8396a35ec3a0ada">
+<!ENTITY gcc-cross_search-patch-size "2 KB">
 
-<!ENTITY iputils-manpages-patch "iputils-&iputils-version;-manpages-2.patch">
-<!ENTITY iputils-manpages-patch-md5 "fc3ceca15794cc0f9d84a43a21692aeb">
-<!ENTITY iputils-manpages-patch-size "29 KB">
+<!ENTITY gcc-PR20425-patch "gcc-&gcc-version;-PR20425-1.patch">
+<!ENTITY gcc-PR20425-patch-md5 "95535bda8e4d37d30251db0b121b5374">
+<!ENTITY gcc-PR20425-patch-size "36 KB">
 
-<!ENTITY man-new_compressors-patch "man-&man-version;-new_compressors-1.patch">
-<!ENTITY man-new_compressors-patch-md5 "efebe29737e80c2f6de4833182f1edb6">
-<!ENTITY man-new_compressors-patch-size "2 KB">
+<!ENTITY gcc-posix-patch "gcc-&gcc-version;-posix-1.patch">
+<!ENTITY gcc-posix-patch-md5 "0d88068740a0e00780891f2cb905b808">
+<!ENTITY gcc-posix-patch-size "9 KB">
 
-<!ENTITY man-i18n-patch "man-&man-version;-i18n-1.patch">
-<!ENTITY man-i18n-patch-md5 "8b189d6500461797250ae9f3e5638dd5">
-<!ENTITY man-i18n-patch-size "10 KB">
+<!ENTITY glibc-libgcc_eh-patch "glibc-&glibc-version;-libgcc_eh-1.patch">
+<!ENTITY glibc-libgcc_eh-patch-md5 "e5122ea7b89a5f22615eaadf8e46b334">
+<!ENTITY glibc-libgcc_eh-patch-size "1 KB">
 
-<!ENTITY mpfr-branch_update-patch "mpfr-&mpfr-version;-branch_update-2.patch">
-<!ENTITY mpfr-branch_update-patch-md5 "2df45ded7bd8c5b987bb4af75ab1f21c">
-<!ENTITY mpfr-branch_update-patch-size "6 KB">
+<!ENTITY glibc-localedef_segfault-patch "glibc-&glibc-version;-localedef_segfault-1.patch">
+<!ENTITY glibc-localedef_segfault-patch-md5 "42452abc6196789e0a83afa1ca7e6e4e">
+<!ENTITY glibc-localedef_segfault-patch-size "1.9 KB">
 
-<!ENTITY ncurses-bashfix-patch "ncurses-&ncurses-version;-bash_fix-1.patch">
-<!ENTITY ncurses-bashfix-patch-md5 "c6f7f2ab0ebaf7721ebeb266641352db">
-<!ENTITY ncurses-bashfix-patch-size ".7 KB">
+<!ENTITY gzip-security_fix-patch "gzip-&gzip-version;-security_fixes-1.patch">
+<!ENTITY gzip-security_fix-patch-md5 "f107844f01fc49446654ae4a8f8a0728">
+<!ENTITY gzip-security_fix-patch-size "2 KB">
 
-<!ENTITY ncurses-branch_update-patch "ncurses-&ncurses-version;-branch_update-18.patch">
-<!ENTITY ncurses-branch_update-patch-md5 "6b17e03f6191a79f90666c25af0d758b">
-<!ENTITY ncurses-branch_update-patch-size "1,822">
+<!ENTITY inetutils-gcc4_fixes-patch "inetutils-&inetutils-version;-gcc4_fixes-3.patch">
+<!ENTITY inetutils-gcc4_fixes-patch-md5 "5204fbc503c9fb6a8e353583818db6b9">
+<!ENTITY inetutils-gcc4_fixes-patch-size "4.1 KB">
 
-<!ENTITY perl-cross_compile-patch "perl-&perl-version;-cross_compile-1.patch">
-<!ENTITY perl-cross_compile-patch-md5 "5efface8b393841a07c66a08dc7be847">
-<!ENTITY perl-cross_compile-patch-size "170 KB">
+<!ENTITY inetutils-man_pages-patch "inetutils-&inetutils-version;-no_server_man_pages-1.patch">
+<!ENTITY inetutils-man_pages-patch-md5 "eb477f532bc6d26e7025fcfc4452511d">
+<!ENTITY inetutils-man_pages-patch-size "1.3 KB">
 
-<!ENTITY readline-branch_update-patch "readline-&readline-version;-branch_update-1.patch">
-<!ENTITY readline-branch_update-patch-md5 "1113f58c09eebb9839c5fc4d692416d9">
-<!ENTITY readline-branch_update-patch-size "3 KB">
+<!ENTITY kbd-gcc4_fixes-patch "kbd-&kbd-version;-gcc4_fixes-1.patch">
+<!ENTITY kbd-gcc4_fixes-patch-md5 "615bc1e381ab646f04d8045751ed1f69">
+<!ENTITY kbd-gcc4_fixes-patch-size "1.5 KB">
 
-<!ENTITY shadow-sysroot_hacks-patch "shadow-&shadow-version;-sysroot_hacks-1.patch">
-<!ENTITY shadow-sysroot_hacks-patch-md5 "07ee28eff99b2c0ef68908fc947cf02c">
-<!ENTITY shadow-sysroot_hacks-patch-size "72 KB">
+<!ENTITY mktemp-tempfile-patch "mktemp-&mktemp-version;-add_tempfile-3.patch">
+<!ENTITY mktemp-tempfile-patch-md5 "65d73faabe3f637ad79853b460d30a19">
+<!ENTITY mktemp-tempfile-patch-size "3.6 KB">
 
-<!ENTITY sysvinit-fixes-patch "sysvinit-&sysvinit-version;-fixes-1.patch">
-<!ENTITY sysvinit-fixes-patch-md5 "405d23896b54ca61afd53003a62592fd">
-<!ENTITY sysvinit-fixes-patch-size "20 KB">
+<!ENTITY perl-libc-patch "perl-&perl-version;-libc-1.patch">
+<!ENTITY perl-libc-patch-md5 "80a0672509d5abb1f2e95e8d4ebfe65a">
+<!ENTITY perl-libc-patch-size "1.1 KB">
 
-<!ENTITY tar-man_page-patch "tar-&tar-version;-man_page-1.patch">
-<!ENTITY tar-man_page-patch-md5 "a8d01d18a3e550230302a5a52c686d25">
-<!ENTITY tar-man_page-patch-size "16 KB">
+<!ENTITY readline-fixes-patch "readline-&readline-version;-fixes-3.patch">
+<!ENTITY readline-fixes-patch-md5 "e30963cd5c6f6a11a23344af36cfa38c">
+<!ENTITY readline-fixes-patch-size "2.1 KB">
 
-<!ENTITY tar-new_compressors-patch "tar-&tar-version;-new_compressors-1.patch">
-<!ENTITY tar-new_compressors-patch-md5 "95a38ca73a39105a5aee528471c7fcc9">
-<!ENTITY tar-new_compressors-patch-size "2 KB">
+<!ENTITY sysklogd-fixes-patch "sysklogd-&sysklogd-version;-fixes-1.patch">
+<!ENTITY sysklogd-fixes-patch-md5 "508104f058d1aef26b3bc8059821935f">
+<!ENTITY sysklogd-fixes-patch-size "28 KB">
 
-<!ENTITY texinfo-new_compressors-patch "texinfo-&texinfo-version;-new_compressors-1.patch">
-<!ENTITY texinfo-new_compressors-patch-md5 "4ae2d3c132e21cb83b825bc691056d07">
-<!ENTITY texinfo-new_compressors-patch-size "2 KB">
+<!ENTITY tar-gcc4_fix-patch "tar-&tar-version;-gcc4_fix_tests-1.patch">
+<!ENTITY tar-gcc4_fix-patch-md5 "8e286a1394e6bcf2907f13801770a72a">
+<!ENTITY tar-gcc4_fix-patch-size "1.2 KB">
 
-<!ENTITY vim-branch_update-patch "vim-&vim-version;-branch_update-19.patch">
-<!ENTITY vim-branch_update-patch-md5 "6b17e03f6191a79f90666c25af0d758b">
-<!ENTITY vim-branch_update-patch-size "1,822 KB">
+<!ENTITY tar-security_fixes-patch "tar-&tar-version;-security_fixes-1.patch">
+<!ENTITY tar-security_fixes-patch-md5 "19876e726d9cec9ce1508e3af74dc22e">
+<!ENTITY tar-security_fixes-patch-size "3.9 KB">
 
-<!ENTITY zlib-fpic-patch "zlib-&zlib-version;-fPIC-2.patch">
-<!ENTITY zlib-fpic-patch-md5 "b1e6644c97b04c368e11c0a1554f2efe">
-<!ENTITY zlib-fpic-patch-size "3 KB">
+<!ENTITY tar-sparse_fix-patch "tar-&tar-version;-sparse_fix-1.patch">
+<!ENTITY tar-sparse_fix-patch-md5 "9e3623f7c88d8766878ecb27c980d86a">
+<!ENTITY tar-sparse_fix-patch-size "1 KB">
+
+<!ENTITY texinfo-tempfile_fix-patch "texinfo-&texinfo-version;-tempfile_fix-2.patch">
+<!ENTITY texinfo-tempfile_fix-patch-md5 "559bda136a2ac7777ecb67511227af85">
+<!ENTITY texinfo-tempfile_fix-patch-size "2.2 KB">
+
+<!ENTITY util-linux-cramfs-patch "util-linux-&util-linux-version;-cramfs-1.patch">
+<!ENTITY util-linux-cramfs-patch-md5 "1c3f40b30e12738eb7b66a35b7374572">
+<!ENTITY util-linux-cramfs-patch-size "2.8 KB">
+
+<!ENTITY util-linux-gcc4_fixes-patch "util-linux-&util-linux-version;-gcc4_fixes-1.patch">
+<!ENTITY util-linux-gcc4_fixes-patch-md5 "6c030921dc9b92daf688f12a4ee6f6e0">
+<!ENTITY util-linux-gcc4_fixes-patch-size "1 KB">
+
+<!ENTITY vim-fixes-patch "vim-&vim-version;-fixes-3.patch">
+<!ENTITY vim-fixes-patch-md5 "ed158ebfb653b797b642fbff175addea">
+<!ENTITY vim-fixes-patch-size "20 KB">
+
+<!ENTITY zlib-fpic-patch "zlib-&zlib-version;-fPIC-1.patch">
+<!ENTITY zlib-fpic-patch-md5 "545d60b20bfde6f53023de44438cef59">
+<!ENTITY zlib-fpic-patch-size "3.2 KB">
Index: OK/prologue/alpha/bookinfo.xml
===================================================================
--- BOOK/prologue/alpha/bookinfo.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,29 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE bookinfo PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<bookinfo>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/bookinfo.xml"
-  xpointer="xpointer(/bookinfo/title)"/>
-
-  <subtitle>Version &version-alpha;</subtitle>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/bookinfo.xml"
-  xpointer="xpointer(/bookinfo/authorgroup)"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/bookinfo.xml"
-  xpointer="xpointer(/bookinfo/copyright)"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/bookinfo.xml"
-  xpointer="xpointer(/bookinfo/legalnotice)"/>
-
-</bookinfo>
-
Index: BOOK/prologue/arm/bookinfo.xml
===================================================================
--- BOOK/prologue/arm/bookinfo.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/prologue/arm/bookinfo.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE bookinfo PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE bookinfo PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -12,5 +12,5 @@
   xpointer="xpointer(/bookinfo/title)"/>
 
-  <subtitle>Version &version-arm;</subtitle>
+  <subtitle>Version &version-ARM;</subtitle>
 
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
@@ -22,19 +22,45 @@
   xpointer="xpointer(/bookinfo/copyright)"/>
 
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+  href="../../index.xml"
+  xpointer="xpointer(bookinfo/bibliosource)"/>
+
   <legalnotice>
-    <para>Copyright &copy; 2005-&year;, Jim Gifford, &amp; Ryan Oliver</para>
+    <para>Copyright (c) 2005, Jim Gifford &amp; Ryan Oliver</para>
 
     <para>All rights reserved.</para>
 
-    <para>This material may be distributed only subject to the terms and
-    conditions set forth in the <xref linkend="license"/> v1.0 or later
-    (the latest version is presently available at <ulink
-    url="http://www.opencontent.org/openpub/"/>).</para>
+    <para>Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are
+    met:</para>
 
-    <!-- Modifications and limitations to the OPL (see section VI)
-    can be place here, if needed. -->
+    <itemizedlist>
+      <listitem>
+        <para>Redistributions in any form must retain the above copyright
+        notice, this list of conditions and the following disclaimer</para>
+      </listitem>
+      <listitem>
+        <para>Neither the name of <quote>Linux From Scratch</quote> nor the
+        names of its contributors may be used to endorse or promote products
+        derived from  this material without specific prior written
+        permission</para>
+      </listitem>
+      <listitem>
+        <para>Any material derived from Linux From Scratch must contain
+        a reference to the <quote>Linux From Scratch</quote> project</para>
+      </listitem>
+    </itemizedlist>
 
-    <para><trademark class='registered'>Linux</trademark> is a registered
-    trademark of Linus Torvalds.</para>
+    <para>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+    <quote>AS IS</quote> AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
+    BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+    FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
+    CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+    EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+    OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+    WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+    OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+    ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</para>
 
   </legalnotice>
Index: BOOK/prologue/common/audience.xml
===================================================================
--- BOOK/prologue/common/audience.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/prologue/common/audience.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -12,41 +12,41 @@
 
   <para>There are many reasons why somebody would want to read this book.
-  The principal reason is to install a Linux system from the  source code.
-  A question many people raise is, <quote>why go through all the hassle of
-  manually building a Linux system from scratch when you can just download
-  and install an existing one?</quote> That is a good question and is the
-  impetus for this section of the book.</para>
+  The principal reason is to install a Linux system from the
+  source code. A question many people raise is, <quote>why go through all
+  the hassle of manually building a Linux system from scratch when you
+  can just download and install an existing one?</quote> That is a good
+  question and is the impetus for this section of the book.</para>
 
-  <para>One important reason for the existence of CLFS is to help people
-  understand how a Linux system works.  Building an CLFS system helps
-  demonstrate what makes Linux tick, and how things work together and
-  depend on each other. One of the best things this learning experience
-  provides is the ability to customize Linux to your own
+  <para>One important reason for LFS's existence is to help people learn
+  how a Linux system works from the inside out. Building an LFS system
+  helps demonstrate what makes Linux tick, and how things work together
+  and depend on each other. One of the best things that this learning
+  experience provides is the ability to customize Linux to your own
   tastes and needs.</para>
 
-  <para>A key benefit of CLFS is that it allows users to have more control
-  over their system without any reliance on a Linux implementation designed
-  by someone else.  With CLFS, <emphasis>you</emphasis> are in the driver's
-  seat and dictate every aspect of the system, such as the directory layout
-  and bootscript setup. You also dictate where, why, and how programs are
-  installed.</para>
+  <para>A key benefit of LFS is that it allows users to have more control
+  over the system without relying on someone else's Linux implementation.
+  With LFS, <emphasis>you</emphasis> are in the driver's seat and dictate
+  every aspect of the system, such as the directory layout and bootscript
+  setup. You also dictate where, why, and how programs are installed.</para>
 
-  <para>Another benefit of CLFS is the ability to create a very compact
-  Linux system. When installing a regular distribution, one is often forced
-  to include several programs which are probably never used. These programs
-  waste disk space or CPU cycles.  It is not difficult to build an CLFS
-  system of less than 100 megabytes (MB), which is substantially smaller
-  than the majority of existing installations.  Does this still sound like a
-  lot of space? A few of us have been working on creating a very small
-  embedded CLFS system. We successfully built a system that was specialized
-  to run the Apache web server with approximately 8MB of disk space used.
-  Further stripping could bring this down to 5 MB or less. Try that with a
-  regular distribution! This is only one of the many benefits of designing
-  your own Linux implementation.</para>
+  <para>Another benefit of LFS is the ability to create a very compact
+  Linux system. When installing a regular distribution, one is often
+  forced to include several programs which are probably never used. These
+  programs waste disk space, or worse, CPU cycles. It is not
+  difficult to build an LFS system of less than 100 megabytes (MB), which
+  is substantially smaller than the majority of existing
+  installations.  Does this still sound like a lot of space? A few of us
+  have been working on creating a very small embedded LFS system. We
+  successfully built a system that was specialized to run the Apache web
+  server with approximately 8MB of disk space used. Further stripping
+  could bring this down to 5 MB or less. Try that with a regular
+  distribution! This is only one of the many benefits of designing your
+  own Linux implementation.</para>
 
   <para>We could compare Linux distributions to a hamburger purchased at
   a fast-food restaurant&mdash;you have no idea what might be in what you
-  are eating. CLFS, on the other hand, does not give you a hamburger.
-  Rather, CLFS provides the recipe to make the exact hamburger desired.
+  are eating. LFS, on the other hand, does not give you a hamburger.
+  Rather, LFS provides the recipe to make the exact hamburger desired.
   This allows users to review the recipe, omit unwanted ingredients, and
   add your own ingredients to enhance the flavor of the burger. When you
@@ -55,10 +55,10 @@
   barbecue it.</para>
 
-  <para>Another analogy that we can use is that of comparing CLFS with a
-  finished house. CLFS provides the skeletal plan of a house, but it is up
-  to you to build it. CLFS maintains the freedom to adjust plans throughout
-  the process, customizing it to the needs and preferences of the user.</para>
+  <para>Another analogy that we can use is that of comparing LFS with a
+  finished house. LFS provides the skeletal plan of a house, but it is up
+  to you to build it. LFS maintains the freedom to adjust plans throughout
+  the process, customizing it to the user's needs and preferences.</para>
 
-  <para>Security is an additional advantage of a custom built Linux system.
+  <para>An additional advantage of a custom built Linux system is security.
   By compiling the entire system from source code, you are empowered to
   audit everything and apply all the security patches desired. It is no
@@ -68,7 +68,7 @@
   correctly and adequately fixes the problem.</para>
 
-  <para>The goal of Cross Linux From Scratch is to build a complete and
-  usable foundation-level system. Readers who do not wish to build their
-  own Linux system from scratch may not benefit from the information in this
+  <para>The goal of Linux From Scratch is to build a complete and usable
+  foundation-level system. Readers who do not wish to build their own
+  Linux system from scratch may not benefit from the information in this
   book. If you only want to know what happens while the computer boots,
   we recommend the <quote>From Power Up To Bash Prompt</quote> HOWTO
@@ -78,10 +78,10 @@
   The HOWTO builds a system which is similar to that of this book, but it
   focuses strictly on creating a system capable of booting to a BASH prompt.
-  Consider your objective. If you wish to build a Linux system and learn
-  along the way, this book is your best choice.</para>
+  Consider your objective. If you wish to build a Linux system while
+  learning along the way, then this book is your best choice.</para>
 
-  <para>There are too many good reasons to build your own CLFS system to
+  <para>There are too many good reasons to build your own LFS system to
   list them all here. This section is only the tip of the iceberg. As
-  you continue in your CLFS experience, you will find the power that
+  you continue in your LFS experience, you will find the power that
   information and knowledge truly bring.</para>
 
Index: BOOK/prologue/common/dedication.xml
===================================================================
--- BOOK/prologue/common/dedication.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/prologue/common/dedication.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE dedication PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE dedication PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
Index: BOOK/prologue/common/errata.xml
===================================================================
--- BOOK/prologue/common/errata.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/prologue/common/errata.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -13,10 +13,10 @@
   <para>The software used to create a CLFS system is constantly being
   updated and enhanced. Security warnings and bug fixes may become
-  available after the CLFS book has been released. To check whether the
+  available after the LFS book has been released. To check whether the
   package versions or instructions in this release of CLFS need any
   modifications to accommodate security vulnerabilities or other bug fixes,
   please visit <ulink url="&errata;"/> before proceeding with your build.
   You should note any changes shown and apply them to the relevant section
-  of the book as you progress with building the CLFS system.</para>
+  of the book as you progress with building the LFS system.</para>
 
 </sect1>
Index: BOOK/prologue/common/foreword.xml
===================================================================
--- BOOK/prologue/common/foreword.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/prologue/common/foreword.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -11,42 +11,57 @@
   <title>Foreword</title>
 
-  <para>The Linux From Scratch Project has seen many changes in the
-  few years of its existence.  I personally became involved with the
-  project in 1999, around the time of the 2.x releases.  At that time,
-  the build process was to create static binaries with the host system,
-  then chroot and build the final binaries on top of the static ones.</para>
+  <para>My adventures in Linux began in 1998 when I downloaded and
+  installed my first distribution. After working with it for a while, I
+  discovered issues I definitely would have liked to see improved upon.
+  For example, I didn't like the arrangement of the bootscripts or the way
+  programs were configured by default. I tried a number of alternative
+  distributions to address these issues, yet each had its pros and cons.
+  Finally, I realized that if I wanted full satisfaction from my Linux
+  system, I would have to build my own from scratch.</para>
 
-  <para>Later came the use of the /static directory to hold the initial
-  static builds, keeping them separated from the final system, then
-  the PureLFS process developed by Ryan Oliver and Greg Schafer,
-  introducing a new toolchain build process that divorces even our initial
-  builds from the host.  Finally, LFS 6 bought Linux Kernel 2.6, the
-  udev dynamic device structure, sanitized kernel headers, and other
-  improvements to the Linux From Scratch system.</para>
+  <para>What does this mean? I resolved not to use pre-compiled packages
+  of any kind, nor CD-ROMs or boot disks that would install basic
+  utilities. I would use my current Linux system to develop my own
+  customized system. This <quote>perfect</quote> Linux system would then
+  have the strengths of various systems without their associated
+  weaknesses. In the beginning, the idea was rather daunting, but I
+  remained committed to the idea that a system could be built that would
+  conform to my needs and desires rather than to a standard that just
+  did not fit what I was looking for.</para>
 
-  <para>The one "flaw" in LFS is that it has always been based on an x86
-  class processor.  With the advent of the Athlon 64 and Intel EM64T
-  processors, the x86-only LFS is no longer ideal. Throughout this time,
-  Ryan Oliver developed and documented a process by which you could
-  build Linux for any system and from any system, by use of
-  cross-compilation techniques. Thus, the Cross-Compiled  LFS (CLFS) was
-  born.</para>
+  <para>After sorting through issues such as circular dependencies and
+  compile-time errors, I created a custom-built Linux system that was
+  fully operational and suitable to individual needs. This process also
+  allowed me to create compact and streamlined Linux systems which are
+  faster and take up less space than traditional operating systems. I
+  called this system a Linux From Scratch system, or an LFS system for
+  short.</para>
 
-  <para>CLFS follows the same guiding principles the LFS project has
-  always followed, e.g., knowing your system inside and out by virtue
-  of having built the system yourself.  Additionally, during a CLFS
-  build, you will learn advanced techniques such as cross-build toolchains,
-  multilib support (32 &amp; 64-bit libraries side-by-side), alternative
-  architectures such as Sparc, MIPS, and Alpha, and much more.</para>
+  <para>As I shared my goals and experiences with other members of the
+  Linux community, it became apparent that there was sustained interest
+  in the ideas set forth in my Linux adventures. Such custom-built LFS
+  systems serve not only to meet user specifications and requirements, but
+  also serve as an ideal learning opportunity for programmers and system
+  administrators to enhance their Linux skills. Out of this broadened
+  interest, the Linux From Scratch Project was born.</para>
 
-  <para>We hope you enjoy building your own CLFS system, and the benefits
-  that come from a system tailored to your needs.</para>
+  <para>This <emphasis>Linux From Scratch</emphasis> book provides
+  readers with the background and instruction to design and build custom
+  Linux systems. This book highlights the Linux from Scratch project and
+  the benefits of using this system. Users can dictate all aspects of
+  their system, including directory layout, script setup, and security.
+  The resulting system will be compiled completely from the source code,
+  and the user will be able to specify where, why, and how programs are
+  installed. This book allows readers to fully customize Linux systems
+  to their own needs and allows users more control over their
+  system.</para>
+
+  <para>I hope you will have a great time working on your own LFS
+  system, and enjoy the numerous benefits of having a system that is
+  truly <emphasis>your own</emphasis>.</para>
 
 <literallayout>--
-Jeremy Utley, CLFS 1.x Release Manager (Page Author)
-Jim Gifford, CLFS Project Co-leader
-Ryan Oliver, CLFS Project Co-leader
-Joe Ciccone, Justin Knierim, Chris Staub, Matt Darcy, Ken Moffat,
-Manuel Canales Esparcia, and Nathan Coulson - CLFS Developers</literallayout>
+Gerard Beekmans
+gerard@linuxfromscratch.org</literallayout>
 
 </sect1>
Index: OK/prologue/common/hostreqs.xml
===================================================================
--- BOOK/prologue/common/hostreqs.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,133 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="pre-hostreqs">
-  <?dbhtml filename="hostreqs.html"?>
-
-  <title>Host System Requirements</title>
-
-    <para>You should be able to build a CLFS system from just about any
-    Unix-type operating system. Your host system should have the following
-    software with the minimum versions indicated. Also note that many
-    distributions will place software headers into separate packages, often in
-    the form of <quote>[package-name]-devel</quote> or
-    <quote>[package-name]-dev</quote>. Be sure to install those if
-    your distribution provides them.</para>
-
-  <itemizedlist spacing="compact">
-
-    <listitem>
-      <para><emphasis role="strong">Bash-2.05a</emphasis></para>
-    </listitem>
-
-    <listitem>
-      <para><emphasis role="strong">Binutils-2.12</emphasis> (Versions
-      greater than &binutils-version; are not recommended as they have
-      not been tested)</para>
-    </listitem>
-
-    <listitem>
-      <para><emphasis role="strong">Bison-1.26a</emphasis></para>
-    </listitem>
-
-    <listitem>
-      <para><emphasis role="strong">Bzip2-1.0.2</emphasis></para>
-    </listitem>
-
-    <listitem>
-      <para><emphasis role="strong">Coreutils-5.0</emphasis> (or Sh-Utils-2.0,
-      Textutils-2.0, and Fileutils-4.1)</para>
-    </listitem>
-
-    <listitem>
-      <para><emphasis role="strong">Diffutils-2.8</emphasis></para>
-    </listitem>
-
-    <listitem>
-      <para><emphasis role="strong">Findutils-4.1.20</emphasis></para>
-    </listitem>
-
-    <listitem>
-      <para><emphasis role="strong">Gawk-3.0</emphasis></para>
-    </listitem>
-
-    <listitem>
-      <para><emphasis role="strong">Gcc-2.95.3</emphasis> (Versions
-      greater than &gcc-version; are not recommended as they have not
-      been tested)</para>
-    </listitem>
-
-    <listitem>
-      <para><emphasis role="strong">EGLIBC-2.2.5</emphasis> (Versions
-      greater than &eglibc-version; are not recommended as they have
-      not been tested)</para>
-    </listitem>
-
-    <listitem>
-      <para><emphasis role="strong">Grep-2.5</emphasis></para>
-    </listitem>
-
-    <listitem>
-      <para><emphasis role="strong">Gzip-1.2.4</emphasis></para>
-    </listitem>
-
-   <listitem>
-     <para><emphasis role="strong">Linux 2.6.22</emphasis></para>
-   </listitem>
-
-    <listitem>
-      <para><emphasis role="strong">Make-3.79.1</emphasis></para>
-    </listitem>
-
-    <listitem>
-      <para><emphasis role="strong">Patch-2.5.4</emphasis></para>
-    </listitem>
-
-    <listitem>
-      <para><emphasis role="strong">Sed-3.0.2</emphasis></para>
-    </listitem>
-
-    <listitem>
-      <para><emphasis role="strong">Tar-1.14</emphasis></para>
-    </listitem>
-
-    <listitem>
-      <para><emphasis role="strong">Texinfo</emphasis></para>
-    </listitem>
-
-  </itemizedlist>
-
-  <para>To see whether your host system has all the appropriate versions, run the following:</para>
-
-<screen role="nodump"><userinput>cat &gt; version-check.sh &lt;&lt; "EOF"
-<literal>#!/bin/bash
-
-# Simple script to list version numbers of critical development tools
-
-bash --version | head -n1 | cut -d" " -f2-4
-echo -n "Binutils: "; ld --version | head -n1 | cut -d" " -f3-4
-bison --version | head -n1
-bzip2 --version 2&gt;&amp;1 &lt; /dev/null | head -n1 | cut -d" " -f1,6-
-echo -n "Coreutils: "; chown --version | head -n1 | cut -d")" -f2
-diff --version | head -n1
-find --version | head -n1
-gawk --version | head -n1
-gcc --version | head -n1
-/lib/libc.so.6 | head -n1 | cut -d" " -f1-7
-grep --version | head -n1
-gzip --version | head -n1
-uname -s -r
-make --version | head -n1
-patch --version | head -n1
-sed --version | head -n1
-tar --version | head -n1</literal>
-
-EOF
-
-bash version-check.sh</userinput></screen>
-
-</sect1>
Index: BOOK/prologue/common/organization.xml
===================================================================
--- BOOK/prologue/common/organization.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/prologue/common/organization.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -64,9 +64,10 @@
     <title>Appendices</title>
 
-    <para>The appendices contain information that doesn't really fit anywhere
-    else in the book. Appendix A contains definitions of acronyms and
-    terms used in the book; Appendices B and C have information about
-    package dependencies and the build order. Some architectures may have
-    additional appendices for arch-specific issues.</para>
+    <para>The Appendices contain various information that doesn't really fit
+    anywhere else in the book. Appendix A contains definitions of acronyms and
+    terms used in the book, Appendix B has Acknowledgments of people who
+    have helped work on the CLFS project and website, and Appendices C
+    and D have information about package dependencies and the the
+    build order.</para>
 
   </sect2>
Index: BOOK/prologue/common/prerequisites.xml
===================================================================
--- BOOK/prologue/common/prerequisites.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/prologue/common/prerequisites.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -20,11 +20,11 @@
   Linux software. A basic knowledge of the architectures being used in 
   the Cross LFS process and the host operating systems in use is also
-  required.</para>
+  required</para>
 
   <para>Because the CLFS book assumes <emphasis>at least</emphasis> this basic
-  level of skill, the various CLFS support forums are unlikely to be able to
-  provide you with much assistance. Your questions regarding such basic knowledge
-  will likely go unanswered, or you will be referred to the CLFS essential
-  pre-reading list.</para>
+  level of skill, the various LFS support forums are unlikely to be able to
+  provide you with much assistance; you will find that your questions regarding
+  such basic knowledge will likely go unanswered, or you will simply be referred
+  to the LFS essential pre-reading list.</para>
 
   <para>Before building a CLFS system, we recommend reading the following
@@ -47,9 +47,9 @@
     <listitem>
       <para remap="verbatim">The Essential Pre-Reading Hint
-      <ulink url="&hints-root;Essential_Prereading"/></para>
+      <ulink url="&hints-root;essential_prereading.txt"/></para>
 
-      <para>This is a hint written specifically for users new to Linux.
+      <para>This is an LFS Hint written specifically for users new to Linux.
       It includes a list of links to excellent sources of information on a
-      wide range of topics. Anyone attempting to install CLFS should have an
+      wide range of topics. Anyone attempting to install LFS should have an
       understanding of many of the topics in this hint.</para>
     </listitem>
Index: BOOK/prologue/common/typography.xml
===================================================================
--- BOOK/prologue/common/typography.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/prologue/common/typography.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
@@ -23,5 +23,5 @@
   referenced.</para>
 
-<screen><computeroutput>install-info: unknown option '--dir-file=/mnt/clfs/usr/info/dir'</computeroutput></screen>
+<screen><computeroutput>install-info: unknown option '--dir-file=/mnt/lfs/usr/info/dir'</computeroutput></screen>
 
   <para>This form of text (fixed-width text) shows screen output,
@@ -34,11 +34,11 @@
   Its main purpose is to emphasize important points or items.</para>
 
-  <para><ulink url="&clfs-root;"/></para>
+  <para><ulink url="&lfs-root;"/></para>
 
-  <para>This format is used for hyperlinks, both within the CLFS
+  <para>This format is used for hyperlinks, both within the LFS
   community and to external pages. It includes HOWTOs, download locations,
   and websites.</para>
 
-<screen role="nodump"><userinput>cat &gt; ${CLFS}/etc/group &lt;&lt; "EOF"
+<screen role="nodump"><userinput>cat &gt; $LFS/etc/group &lt;&lt; "EOF"
 <literal>root:x:0:
 bin:x:1:
@@ -48,5 +48,5 @@
   <para>This format is used when creating configuration files. The first
   command tells the system to create the file
-  <filename>${CLFS}/etc/group</filename> from whatever is typed on the
+  <filename>$LFS/etc/group</filename> from whatever is typed on the
   following lines until the sequence end of file (EOF) is encountered.
   Therefore, this entire section is generally typed as seen.</para>
@@ -62,5 +62,5 @@
   referred to simply as a <quote>man</quote> page). The number inside
   parentheses indicates a specific section inside of <command>man</command>.
-  For example, <command>passwd</command> has two man pages. Per CLFS
+  For example, <command>passwd</command> has two man pages. Per LFS
   installation instructions, those two man pages will be located at
   <filename>/usr/share/man/man1/passwd.1</filename> and
Index: OK/prologue/hppa/bookinfo.xml
===================================================================
--- BOOK/prologue/hppa/bookinfo.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,29 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE bookinfo PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<bookinfo>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/bookinfo.xml"
-  xpointer="xpointer(/bookinfo/title)"/>
-
-  <subtitle>Version &version-hppa;</subtitle>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/bookinfo.xml"
-  xpointer="xpointer(/bookinfo/authorgroup)"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/bookinfo.xml"
-  xpointer="xpointer(/bookinfo/copyright)"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/bookinfo.xml"
-  xpointer="xpointer(/bookinfo/legalnotice)"/>
-
-</bookinfo>
-
Index: BOOK/prologue/preface.xml
===================================================================
--- BOOK/prologue/preface.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/prologue/preface.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE preface PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE preface PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../general.ent">
   %general-entities;
@@ -15,5 +15,4 @@
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/audience.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/prerequisites.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/hostreqs.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/typography.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/organization.xml"/>
Index: OK/prologue/x86/bookinfo.xml
===================================================================
--- BOOK/prologue/x86/bookinfo.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,29 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE bookinfo PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<bookinfo>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/bookinfo.xml"
-  xpointer="xpointer(/bookinfo/title)"/>
-
-  <subtitle>Version &version-x86;</subtitle>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/bookinfo.xml"
-  xpointer="xpointer(/bookinfo/authorgroup)"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/bookinfo.xml"
-  xpointer="xpointer(/bookinfo/copyright)"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../arm/bookinfo.xml"
-  xpointer="xpointer(/bookinfo/legalnotice)"/>
-
-</bookinfo>
-
Index: OK/stylesheets/clfs-chunked.xsl
===================================================================
--- BOOK/stylesheets/clfs-chunked.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,18 +1,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<!--
-$LastChangedBy$
-$Date$
--->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns="http://www.w3.org/1999/xhtml"
-                version="1.0">
-
-    <!-- LFS top-level chunk templates. -->
-  <xsl:import href="lfs-xsl/chunkfast.xsl"/>
-
-    <!-- The LFS book type to be processed (lfs, blfs, clfs, or hlfs) -->
-  <xsl:param name="book-type">clfs</xsl:param>
-
-</xsl:stylesheet>
Index: OK/stylesheets/clfs-nochunks.xsl
===================================================================
--- BOOK/stylesheets/clfs-nochunks.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,18 +1,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<!--
-$LastChangedBy$
-$Date$
--->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns="http://www.w3.org/1999/xhtml"
-                version="1.0">
-
-    <!-- LFS top-level no-chunk templates. -->
-  <xsl:import href="lfs-xsl/nochunks.xsl"/>
-
-    <!-- The LFS book type to be processed (lfs, blfs, clfs, or hlfs) -->
-  <xsl:param name="book-type">clfs</xsl:param>
-
-</xsl:stylesheet>
Index: OK/stylesheets/clfs-pdf.xsl
===================================================================
--- BOOK/stylesheets/clfs-pdf.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,18 +1,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<!--
-$LastChangedBy$
-$Date$
--->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                version="1.0">
-
-    <!-- LFS top-level pdf templates. -->
-  <xsl:import href="lfs-xsl/pdf.xsl"/>
-
-    <!-- The LFS book type to be processed (lfs, blfs, clfs, or hlfs) -->
-  <xsl:param name="book-type">clfs</xsl:param>
-
-</xsl:stylesheet>
Index: BOOK/stylesheets/lfs-chunked.xsl
===================================================================
--- BOOK/stylesheets/lfs-chunked.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/stylesheets/lfs-chunked.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,34 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns="http://www.w3.org/1999/xhtml"
+                version="1.0">
+
+  <xsl:import href="lfs-chunked2.xsl"/>
+  <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.69.1/xhtml/chunk-common.xsl"/>
+  <xsl:include href="http://docbook.sourceforge.net/release/xsl/1.69.1/xhtml/manifest.xsl"/>
+
+    <!--  From the original chunk.xsl file:
+
+    Why is chunk-code now xsl:included?
+
+    Suppose you want to customize *both* the chunking algorithm used *and* the
+    presentation of some elements that may be chunks. In order to do that, you
+    must get the order of imports "just right". The answer is to make your own
+    copy of this file, where you replace the initial import of "docbook.xsl"
+    with an import of your own base.xsl (that does its own import of docbook.xsl).
+
+    Put the templates for changing the presentation of elements in your base.xsl.
+
+    Put the templates that control chunking after the include of chunk-code.xsl.
+
+    Voila! (Man I hope we can do this better in XSLT 2.0)  -->
+
+  <xsl:include href="http://docbook.sourceforge.net/release/xsl/1.69.1/xhtml/profile-chunk-code.xsl"/>
+
+    <!-- Including our others customized chunks templates -->
+  <xsl:include href="xhtml/lfs-legalnotice.xsl"/>
+  <xsl:include href="xhtml/lfs-index.xsl"/>
+  <xsl:include href="xhtml/lfs-navigational.xsl"/>
+
+</xsl:stylesheet>
Index: BOOK/stylesheets/lfs-chunked2.xsl
===================================================================
--- BOOK/stylesheets/lfs-chunked2.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/stylesheets/lfs-chunked2.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,35 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns="http://www.w3.org/1999/xhtml"
+                version="1.0">
+
+    <!-- We use XHTML -->
+  <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.69.1/xhtml/docbook.xsl"/>
+  <xsl:param name="chunker.output.encoding" select="'ISO-8859-1'"/>
+
+    <!-- Including our others customized elements templates -->
+  <xsl:include href="xhtml/lfs-admon.xsl"/>
+  <xsl:include href="xhtml/lfs-sections.xsl"/>
+  <xsl:include href="xhtml/lfs-mixed.xsl"/>
+  <xsl:include href="xhtml/lfs-titles.xsl"/>
+  <xsl:include href="xhtml/lfs-toc.xsl"/>
+  <xsl:include href="xhtml/lfs-xref.xsl"/>
+
+    <!-- This file contains our localization strings (for internationalization) -->
+  <xsl:param name="local.l10n.xml" select="document('lfs-l10n.xml')"/>
+
+    <!-- The CSS Stylesheet -->
+  <xsl:param name="html.stylesheet" select="'../stylesheets/lfs.css'"/>
+  <xsl:template name='user.head.content'>
+     <link rel="stylesheet" href="../stylesheets/lfs-print.css" type="text/css" media="print"/>
+  </xsl:template>
+
+    <!-- Dropping some unwanted style attributes -->
+  <xsl:param name="ulink.target" select="''"></xsl:param>
+  <xsl:param name="css.decoration" select="0"></xsl:param>
+
+    <!-- No XML declaration -->
+  <xsl:param name="chunker.output.omit-xml-declaration" select="'yes'"/>
+
+</xsl:stylesheet>
Index: BOOK/stylesheets/lfs-l10n.xml
===================================================================
--- BOOK/stylesheets/lfs-l10n.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/stylesheets/lfs-l10n.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,58 @@
+<?xml version='1.0' encoding='US-ASCII'?>
+
+<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
+
+    <!-- Template to add more languages -->
+  <l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"
+          language="xx" english-language-name="xxxxx">
+
+    <l:gentext key="description" text=""/>
+    <l:gentext key="Libraries" text=""/>
+    <l:gentext key="Others" text=""/>
+    <l:gentext key="Packages" text=""/>
+    <l:gentext key="Programs" text=""/>
+    <l:gentext key="Scripts" text=""/>
+
+  </l:l10n>
+
+
+    <!-- English -->
+  <l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"
+          language="en" english-language-name="English">
+
+    <l:gentext key="description" text="description"/>
+    <l:gentext key="Libraries" text="Libraries"/>
+    <l:gentext key="Others" text="Others"/>
+    <l:gentext key="Packages" text="Packages"/>
+    <l:gentext key="Programs" text="Programs"/>
+    <l:gentext key="Scripts" text="Scripts"/>
+
+  </l:l10n>
+
+    <!-- Italian -->
+  <l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"
+          language="it" english-language-name="Italian">
+
+    <l:gentext key="description" text="descrizione"/>
+    <l:gentext key="Libraries" text="Librerie"/>
+    <l:gentext key="Others" text="Altri"/>
+    <l:gentext key="Packages" text="Pacchetti"/>
+    <l:gentext key="Programs" text="Programmi"/>
+    <l:gentext key="Scripts" text="Script"/>
+
+  </l:l10n>
+
+    <!-- Spanish -->
+  <l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"
+          language="es" english-language-name="Spanish">
+
+    <l:gentext key="description" text="descripci&#243;n"/>
+    <l:gentext key="Libraries" text="Librer&#237;as"/>
+    <l:gentext key="Others" text="Otros"/>
+    <l:gentext key="Packages" text="Paquetes"/>
+    <l:gentext key="Programs" text="Programas"/>
+    <l:gentext key="Scripts" text="Guiones"/>
+
+  </l:l10n>
+
+</l:i18n>
Index: BOOK/stylesheets/lfs-nochunks.xsl
===================================================================
--- BOOK/stylesheets/lfs-nochunks.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/stylesheets/lfs-nochunks.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,335 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns="http://www.w3.org/1999/xhtml"
+                version="1.0">
+
+    <!-- We use XHTML -->
+  <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.69.1/xhtml/profile-docbook.xsl"/>
+
+    <!-- Fix encoding issues with default UTF-8 output of the xhtml stylesheet -->
+  <xsl:output method="html" encoding="ISO-8859-1" indent="no" />
+
+   <!-- Including our others customized templates -->
+  <xsl:include href="xhtml/lfs-index.xsl"/>
+  <xsl:include href="xhtml/lfs-mixed.xsl"/>
+  <xsl:include href="xhtml/lfs-sections.xsl"/>
+  <xsl:include href="xhtml/lfs-toc.xsl"/>
+  <xsl:include href="xhtml/lfs-xref.xsl"/>
+
+    <!-- This file contains our localization strings (for internationalization) -->
+  <xsl:param name="local.l10n.xml" select="document('lfs-l10n.xml')"/>
+
+    <!-- Dropping some unwanted style attributes -->
+  <xsl:param name="ulink.target" select="''"></xsl:param>
+  <xsl:param name="css.decoration" select="0"></xsl:param>
+
+    <!-- Don't use graphics in admonitions -->
+  <xsl:param name="admon.graphics" select="0"/>
+
+    <!-- Changing the admonitions output tagging -->
+  <xsl:template name="nongraphical.admonition">
+    <div class="{name(.)}">
+      <div class ="admonhead">
+        <h3 class="admontitle">
+          <xsl:apply-templates select="." mode="object.title.markup"/>
+        </h3>
+      </div>
+      <div class="admonbody">
+        <xsl:apply-templates/>
+      </div>
+    </div>
+  </xsl:template>
+
+    <!-- To drop the remainig dot when title is empty (from lfs-titles.xsl)-->
+  <xsl:template name="sect2.titlepage">
+    <xsl:choose>
+      <xsl:when test="string-length(title) = 0"/>
+      <xsl:otherwise>
+        <div class="titlepage">
+          <xsl:if test="@id">
+            <a id="{@id}" name="{@id}"/>
+          </xsl:if>
+          <h3 class="{name(.)}">
+            <xsl:apply-templates select="." mode="label.markup"/>
+            <xsl:text>. </xsl:text>
+            <xsl:value-of select="title"/>
+          </h3>
+        </div>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+    <!-- Added the role param for proper punctuation in xref calls
+            (from lfs-titles.xsl). -->
+  <xsl:template match="*" mode="insert.title.markup">
+    <xsl:param name="purpose"/>
+    <xsl:param name="xrefstyle"/>
+    <xsl:param name="title"/>
+    <xsl:param name="role"/>
+    <xsl:choose>
+      <xsl:when test="$purpose = 'xref' and titleabbrev">
+        <xsl:apply-templates select="." mode="titleabbrev.markup"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:copy-of select="$title"/>
+        <xsl:value-of select="$role"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+    <!-- The CSS Stylesheet -->
+  <xsl:template name='user.head.content'>
+    <style type="text/css">
+      <xsl:text>
+/* Global settings */
+body {
+  font-family: sans-serif;
+  text-align: left;
+  background: #fff;
+  color: #333;
+  margin: 1em;
+  padding: 0;
+  font-size: 1em;
+  line-height: 1.2em
+}
+
+a:link { color: #22b; }
+a:visited { color: #7e4988; }
+a:hover, a:focus { color: #d30e08; }
+a:active { color: #6b77b1;}
+
+/* Headers */
+h1, h2, b, strong {
+  color: #000;
+  font-weight: bold;
+}
+
+h3, h4, h5, h6 {
+  color: #222;
+}
+
+h1 { font-size: 173%; text-align: center; }
+h2 { font-size: 144%; }
+h2.subtitle { text-align: center; }
+h3 { font-size: 120%; padding-top: 0.2em; margin-top: 0.3em; }
+h4 { font-size: 110%;}
+h5, h6 { font-size: 110%; font-style: italic; }
+
+/* TOC and Index*/
+
+div.toc ul, div.index ul, div.navheader ul, div.navfooter ul {
+  list-style: none;
+}
+
+div.toc, div.dedication {
+  padding-left: 1em;
+}
+
+li.preface {
+  margin-left: 1em;
+}
+
+div.toc ul li h3, div.toc ul li h4 {
+  margin: .4em;
+}
+
+.item {
+    width: 15em;
+    float: left;
+}
+
+.secitem {
+    font-weight: normal;
+    width: 14em;
+    float: left;
+}
+
+/* Admonitions */
+div.note, div.tip {
+  background-color: #fffff6;
+  border: 2px solid #dbddec;
+  width: 90%;
+  margin: .5em auto;
+}
+
+div.important, div.warning, div.caution {
+  background-color: #fffff6;
+  border: medium solid #400;
+  width: 90%;
+  margin: 1.5em auto;
+  color: #600;
+  font-size: larger;
+}
+
+div.important h3, div.warning h3, div.caution h3 {
+  color: #900;
+}
+
+h3.admontitle {
+  padding-left: 2.5em;
+  padding-top: 1em;
+}
+
+div.admonbody {
+  margin: .5em;
+}
+
+div.important em, div.warning em, div.caution em {
+  color: #000;
+  font-weight: bold;
+}
+
+div.important tt, div.warning tt, div.caution tt {
+  font-weight: bold;
+}
+
+/* variablelist and segmentedlist */
+dl {
+  margin: 0;
+  padding: 0;
+}
+
+dt {
+  display: list-item;
+  font-weight: bold;
+  margin: .33em 0 0 1em;
+  padding: 0;
+}
+
+div.content dt {
+  list-style: none;
+}
+
+dd  {
+  margin: 0 0 1em 3em;
+  padding: 0;
+}
+
+div.variablelist dd {
+  margin-bottom: 1em;
+}
+
+div.variablelist dd p {
+  margin-top: 0px;
+}
+
+dl.materials dd {
+  margin-left: 0px;
+}
+
+div.segmentedlist {
+  margin-top: 1em;
+}
+
+div.segmentedlist p {
+  margin: 0px auto;
+}
+
+/* itemizedlist */
+
+div.itemizedlist {
+  margin-left: 1em;
+}
+
+/* Indented blocks */
+p, ul, dl, code, blockquote {
+  padding-left: 1em;
+}
+
+/* Monospaced elements */
+tt, code, kbd, pre, .command {
+  font-family: monospace;
+}
+
+pre.userinput {
+  color: #101310;
+  background-color: #e5e5e5;
+  border: 1px solid #050505;
+  padding: .5em 1em;
+  margin: 0 2em;
+  font-weight: bold;
+}
+
+pre.screen {
+  background-color: #e9e9e9;
+  border: 1px solid #050505;
+  padding: .5em 1em;
+  margin: 0 2em;
+}
+
+/* Sections */
+div.package {
+  background: #f5f6f7;
+  border-bottom: 0.2em solid #dbddec;
+  padding: 0.5em 0.5em 0.3em 0.5em;
+  margin: 0px auto;
+}
+
+div.installation {
+  padding: 0 0.5em 0.3em 0.5em;
+  margin: 0.5em 0 0.5em 0;
+}
+
+div.configuration {
+  background:   #fefefe;
+  border-top: 0.2em solid #dbddec;
+  padding: 0.5em;
+  margin: 0.5em 0 .5em 0;
+}
+
+div.content {
+  background: #f5f6f7;
+  border-top: 0.2em solid #dbddec;
+  border-bottom: 0.2em solid #dbddec;
+  padding: 0.5em 0.5em 1em 0.5em;
+  margin: 0.5em 0 .5em 0;
+}
+
+div.installation h3.title, div.content h3.title {
+  padding-top: 0.3em;
+  margin: 0;
+}
+
+div.book, div.preface, div.part, div.chapter, div.sect1, div.index {
+  padding-bottom: 0.5em;
+}
+
+div.preface h2, div.part h1, div.chapter h2.title, div.sect1 h2.title, div.index h1 {
+  background: #f5f6f7;
+  border-bottom: .2em solid #dbddec;
+  border-top: .2em solid #dbddec;
+  margin-top 1em;
+  padding: .5em;
+  text-align: center;
+}
+
+div.book h1 {
+  background: #f5f6f7;
+  margin: 0px auto;
+  padding: 0.5em;
+}
+
+div.book h2.subtitle {
+  background: #dbddec;
+  margin: 0px auto;
+  padding: 0.2em;
+}
+div.authorgroup, div p.copyright, div.abstract {
+  background: #f5f6f7;
+  margin: 0px auto;
+  padding:  1em 0.5em;
+}
+
+hr {
+  background: #dbddec;
+  height: .3em;
+  border: 0px;
+  margin: 0px auto;
+  padding: 0;
+}
+      </xsl:text>
+    </style>
+  </xsl:template>
+
+</xsl:stylesheet>
Index: BOOK/stylesheets/lfs-pdf.xsl
===================================================================
--- BOOK/stylesheets/lfs-pdf.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/stylesheets/lfs-pdf.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,56 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version="1.0">
+    <!-- We use FO and FOP as the processor -->
+  <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.69.1/fo/docbook.xsl"/>
+  <xsl:param name="fop.extensions" select="1"/>
+  <xsl:param name="draft.mode" select="'no'"/>
+
+    <!-- Including our others customized templates -->
+  <xsl:include href="pdf/lfs-index.xsl"/>
+  <xsl:include href="pdf/lfs-pagesetup.xsl"/>
+  <xsl:include href="pdf/lfs-sections.xsl"/>
+  <xsl:include href="pdf/lfs-admon.xsl"/>
+  <xsl:include href="pdf/lfs-mixed.xsl"/>
+  <xsl:include href="pdf/lfs-xref.xsl"/>
+
+    <!-- This file contains our localization strings (for internationalization) -->
+  <xsl:param name="local.l10n.xml" select="document('lfs-l10n.xml')"/>
+
+   <!-- Standart paper size -->
+  <xsl:param name="paper.type" select="'letter'"/>
+
+    <!-- Paper size required by the publisher
+  <xsl:param name="paper.type" select="'Customized'"/>
+  <xsl:param name="page.width">7.25in</xsl:param>
+  <xsl:param name="page.height">9.25in</xsl:param>
+    -->
+
+    <!-- Printing Style -->
+    <!-- Change "double.sided" to "1" for published versions -->
+  <xsl:param name="double.sided" select="0"/>
+  <xsl:param name="hyphenate">false</xsl:param>
+  <xsl:param name="alignment">justify</xsl:param>
+
+    <!-- Font size -->
+  <xsl:param name="body.font.master">9</xsl:param>
+  <xsl:param name="body.font.size">12pt</xsl:param>
+
+    <!-- TOC stuff -->
+  <xsl:param name="generate.toc">
+    book      toc
+    part      nop
+  </xsl:param>
+  <xsl:param name="toc.section.depth">1</xsl:param>
+  <xsl:param name="generate.section.toc.level" select="-1"></xsl:param>
+  <xsl:param name="toc.indent.width" select="18"></xsl:param>
+
+    <!-- Page number in Xref ?-->
+  <xsl:param name="insert.xref.page.number">no</xsl:param>
+
+    <!-- Prevent duplicate e-mails in the Acknowledgments pages-->
+  <xsl:param name="ulink.show" select="0"/>
+
+</xsl:stylesheet>
Index: BOOK/stylesheets/lfs-print.css
===================================================================
--- BOOK/stylesheets/lfs-print.css	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/stylesheets/lfs-print.css	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,6 @@
+
+@import url(lfs.css);
+
+.navfooter, .headerlinks {
+   display: none;
+}
Index: BOOK/stylesheets/lfs-profile.xsl
===================================================================
--- BOOK/stylesheets/lfs-profile.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/stylesheets/lfs-profile.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,35 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version="1.0">
+
+  <!-- Include common profiling stylesheet -->
+  <xsl:include href="http://docbook.sourceforge.net/release/xsl/1.69.1/profiling/profile-mode.xsl"/>
+
+  <!-- Generate DocBook instance with correct DOCTYPE -->
+  <xsl:output method="xml"
+              doctype-public="-//OASIS//DTD DocBook XML V4.4//EN"
+              doctype-system="http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"/>
+
+  <!-- Profiling parameters -->
+  <xsl:param name="profile.arch" select="''"/>
+  <xsl:param name="profile.condition" select="''"/>
+  <xsl:param name="profile.conformance" select="''"/>
+  <xsl:param name="profile.lang" select="''"/>
+  <xsl:param name="profile.os" select="''"/>
+  <xsl:param name="profile.revision" select="''"/>
+  <xsl:param name="profile.revisionflag" select="''"/>
+  <xsl:param name="profile.role" select="''"/>
+  <xsl:param name="profile.security" select="''"/>
+  <xsl:param name="profile.userlevel" select="''"/>
+  <xsl:param name="profile.vendor" select="''"/>
+  <xsl:param name="profile.attribute" select="''"/>
+  <xsl:param name="profile.value" select="''"/>
+  <xsl:param name="profile.separator" select="';'"/>
+
+  <!-- Call common profiling mode -->
+  <xsl:template match="/">
+    <xsl:apply-templates select="." mode="profile"/>
+  </xsl:template>
+
+</xsl:stylesheet>
Index: BOOK/stylesheets/lfs-tex.xsl
===================================================================
--- BOOK/stylesheets/lfs-tex.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/stylesheets/lfs-tex.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,76 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<!-- Created by Larry Lawrence <larry@linuxfromscratch.org> -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+version='1.0'>
+
+<xsl:import href="http://db2latex.sourceforge.net/xsl/docbook.xsl"/>
+<xsl:output method="text" encoding="ISO-8859-1" indent="yes"/>
+<xsl:variable name="latex.override">
+
+\documentclass[12pt]{book}
+
+\usepackage{lfs}
+\usepackage{fancyhdr}
+\usepackage{fancyvrb}
+\usepackage{makeidx}
+\usepackage{hyperref}
+\usepackage{fancybox}
+
+\oddsidemargin -0.5in
+\evensidemargin -0.625in
+\textwidth 7in
+\textheight 8.5in
+
+%\ifx\pdfoutput\undefined
+%\else
+%\pdfpagewidth=7in
+%\pdfpageheight=8.5in
+%\fi
+
+\pagestyle{fancy}
+\newenvironment{admonition}[2] {
+ \vspace{8mm}
+ \hspace{0mm}\newline
+ \noindent
+}
+
+
+\fancyhf{}
+\fancyhead[LE,RO]{\bfseries\thepage}
+\fancyhead[LO]{\bfseries\rightmark}
+\fancyhead[RE]{\bfseries\leftmark}
+\renewcommand{\headrulewidth}{0.5pt}
+\renewcommand{\footrulewidth}{0pt}
+\addtolength{\headheight}{3pt}
+\fancypagestyle{plain}{%
+  \fancyhead{}
+  \renewcommand{\headrulewidth}{0pt}
+}
+
+
+\hyphenation{change-log cpp-flags ctrlaltdel ma-cros chil-ton}
+
+<!-- adds \frontmatter to document -->
+
+</xsl:variable>
+
+<xsl:variable name="toc.section.depth">1</xsl:variable>
+
+<xsl:variable name="latex.book.begindocument">
+        <xsl:text>\begin{document}&#10;</xsl:text>
+        <xsl:text>\frontmatter&#10;</xsl:text>
+</xsl:variable>
+
+<!-- This put each section on a new page in the preface section -->
+
+<xsl:template match="preface/sect1">
+        <xsl:text>&#10;</xsl:text>
+        <xsl:text>\newpage&#10;</xsl:text>
+        <xsl:text>\section*{</xsl:text><xsl:copy-of
+select="normalize-space(title)"/><xsl:text>}&#10;</xsl:text>
+        <xsl:apply-templates/>
+</xsl:template>
+
+</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/chunk-master.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/chunk-master.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,53 +1,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<!--
-$LastChangedBy$
-$Date$
--->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns="http://www.w3.org/1999/xhtml"
-                version="1.0">
-
-   <!-- Top-level chunked code for normal processing.
-        Import customized output templates.
-        Include customized chunk templates.
-        Replaces {docbook-xsl}/xhtml/chunk.xsl -->
-
-    <!-- Our master non-chunking presentation templates -->
-  <xsl:import href="chunk-slave.xsl"/>
-
-    <!-- Upstream chunk code named templates -->
-  <xsl:import href="docbook-xsl-snapshot/xhtml/chunk-common.xsl"/>
-
-    <!-- Upstream chunk code match templates -->
-  <xsl:include href="docbook-xsl-snapshot/xhtml/chunk-code.xsl"/>
-
-    <!-- Including our customized chunks templates -->
-  <xsl:include href="xhtml/lfs-index.xsl"/>
-  <xsl:include href="xhtml/lfs-legalnotice.xsl"/>
-  <xsl:include href="xhtml/lfs-navigational.xsl"/>
-
-    <!-- sect1:
-           Prevent creation of dummy sect1 files used to emulate sub-chapters. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/chunk-code.xsl
-         It match also others sect* tags. The code for that tags is unchanged. -->
-  <xsl:template match="sect1">
-    <xsl:variable name="ischunk">
-      <xsl:call-template name="chunk"/>
-    </xsl:variable>
-    <xsl:choose>
-      <xsl:when test="@role = 'dummy'"/>
-      <xsl:when test="not(parent::*)">
-        <xsl:call-template name="process-chunk-element"/>
-      </xsl:when>
-      <xsl:when test="$ischunk = 0">
-        <xsl:apply-imports/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="process-chunk-element"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/chunk-slave.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/chunk-slave.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,69 +1,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<!--
-$LastChangedBy$
-$Date$
--->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns="http://www.w3.org/1999/xhtml"
-                version="1.0">
-
-   <!-- Second level chunked output template.
-        Sets global params and include customized elements templates. -->
-
-    <!-- Upstream XHTML presentation templates -->
-  <xsl:import href="docbook-xsl-snapshot/xhtml/docbook.xsl"/>
-
-    <!-- Use ISO-8859-1 for output instead of default UTF-8 -->
-  <xsl:param name="chunker.output.encoding" select="'ISO-8859-1'"/>
-
-    <!-- Including our customized elements templates -->
-  <xsl:include href="common.xsl"/>
-  <xsl:include href="xhtml/lfs-admon.xsl"/>
-  <xsl:include href="xhtml/lfs-mixed.xsl"/>
-  <xsl:include href="xhtml/lfs-sections.xsl"/>
-  <xsl:include href="xhtml/lfs-titles.xsl"/>
-  <xsl:include href="xhtml/lfs-toc.xsl"/>
-  <xsl:include href="xhtml/lfs-xref.xsl"/>
-
-    <!-- The CSS Stylesheets. We set here relative path from sub-dirs HTML files.
-    The path from top-level HTML files (index.html, partX.html, etc) MUST be
-    fixed via a sed in the Makefile-->
-    <!-- Master CSS Stylesheet -->
-  <xsl:param name="html.stylesheet" select="'../stylesheets/lfs.css'"/>
-    <!-- Print CSS Stylesheet -->
-    <!-- The original template is in {docbook-xsl}/xhtml/docbook.xsl -->
-  <xsl:template name='user.head.content'>
-     <link rel="stylesheet" href="../stylesheets/lfs-print.css" type="text/css" media="print"/>
-  </xsl:template>
-
-    <!-- Dropping some unwanted style attributes -->
-  <xsl:param name="ulink.target" select="''"/>
-  <xsl:param name="css.decoration" select="0"/>
-
-    <!-- No XML declaration -->
-  <xsl:param name="chunker.output.omit-xml-declaration" select="'yes'"/>
-
-    <!-- Control generation of ToCs and LoTs -->
-  <xsl:param name="generate.toc">
-    book      toc,title
-    preface   toc
-    part      toc
-    chapter   toc
-    appendix  nop
-    sect1     nop
-    sect2     nop
-    sect3     nop
-    sect4     nop
-    sect5     nop
-    section   nop
-  </xsl:param>
-
-    <!-- How deep should recursive sections appear in the TOC? -->
-  <xsl:param name="toc.section.depth">1</xsl:param>
-
-    <!-- How maximaly deep should be each TOC? -->
-  <xsl:param name="toc.max.depth">3</xsl:param>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/chunkfast.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/chunkfast.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,76 +1,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<!--
-$LastChangedBy$
-$Date$
--->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns="http://www.w3.org/1999/xhtml"
-                xmlns:exsl="http://exslt.org/common"
-                xmlns:cf="http://docbook.sourceforge.net/xmlns/chunkfast/1.0"
-                version="1.0"
-                exclude-result-prefixes="cf exsl">
-
-   <!-- Top-level chunked code for fast processing.
-        Import standart customized chunk code.
-        Replaces {docbook-xsl}/xhtml/chunkfast.xsl
-
-        Note: Using this file as the top-level for chunked output implies that
-              profiling must be done on a previous step. -->
-
-    <!-- Our master chunking templates -->
-  <xsl:import href="chunk-master.xsl"/>
-
-    <!-- Use chunk.fast code? 1 = yes, 0 = no -->
-  <xsl:param name="chunk.fast" select="1"/>
-
-  <!-- The code below was copied as-is from {docbook-xsl}/xhtml/chunkfast.xsl -->
-
-  <xsl:variable name="chunks" select="exsl:node-set($chunk.hierarchy)//cf:div"/>
-
-  <xsl:template name="process-chunk-element">
-    <xsl:choose>
-      <xsl:when test="$chunk.fast != 0 and function-available('exsl:node-set')">
-        <xsl:variable name="genid" select="generate-id()"/>
-
-        <xsl:variable name="div" select="$chunks[@id=$genid or @xml:id=$genid]"/>
-
-        <xsl:variable name="prevdiv" select="($div/preceding-sibling::cf:div|$div/preceding::cf:div|$div/parent::cf:div)[last()]"/>
-        <xsl:variable name="prev" select="key('genid', ($prevdiv/@id|$prevdiv/@xml:id)[1])"/>
-
-        <xsl:variable name="nextdiv" select="($div/following-sibling::cf:div|$div/following::cf:div|$div/cf:div)[1]"/>
-        <xsl:variable name="next" select="key('genid', ($nextdiv/@id|$nextdiv/@xml:id)[1])"/>
-
-        <xsl:choose>
-          <xsl:when test="$onechunk != 0 and parent::*">
-            <xsl:apply-imports/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:call-template name="process-chunk">
-              <xsl:with-param name="prev" select="$prev"/>
-              <xsl:with-param name="next" select="$next"/>
-            </xsl:call-template>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:choose>
-          <xsl:when test="$onechunk != 0 and not(parent::*)">
-            <xsl:call-template name="chunk-all-sections"/>
-          </xsl:when>
-          <xsl:when test="$onechunk != 0">
-            <xsl:apply-imports/>
-          </xsl:when>
-          <xsl:when test="$chunk.first.sections = 0">
-            <xsl:call-template name="chunk-first-section-with-parent"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:call-template name="chunk-all-sections"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/common.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/common.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,458 +1,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<!--
-$LastChangedBy$
-$Date$
--->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns="http://www.w3.org/1999/xhtml"
-                version="1.0">
-
-  <!-- This stylesheet contains common params and templates for all outputs. -->
-
-    <!-- This file contains our localization strings (for internationalization) -->
-  <xsl:param name="local.l10n.xml" select="document('lfs-l10n.xml')"/>
-
-
-<!-- INDEX -->
-
-    <!-- Should the Index be generated? 1 = yes, 0 = no -->
-  <xsl:param name="generate.index" select="1"></xsl:param>
-
-    <!-- The indexing method used. Only 'basic' is supported by xsltproc -->
-  <xsl:param name="index.method" select="'basic'"></xsl:param>
-
-    <!-- The Index title:
-           We create this param to can have gentext support in both
-           the Index page title and links that point to the Index page.
-           It also allow us to change the title, if wanted.
-           Note: To change the title involves creating the appropiate
-           entries in lfs-l10n.xml -->
-  <xsl:param name="index-title">Index</xsl:param>
-
-    <!-- Index title generation. -->
-    <!-- The original template is in {docbook-xsl}/common/titles.xsl -->
-  <xsl:template match="index" mode="title.markup">
-    <xsl:param name="allow-anchors" select="0"/>
-    <xsl:call-template name="gentext">
-      <xsl:with-param name="key" select="$index-title"/>
-    </xsl:call-template>
-  </xsl:template>
-
-    <!-- indexterm:
-           Dropping unneeded anchors and fo:wraper elemments. -->
-    <!-- The original templates are in {docbook-xsl}/{xhtml,fo}/index.xsl -->
-  <xsl:template match="indexterm"/>
-
-<!-- -->
-
-<!-- LABELS -->
-
-    <!-- Are sections enumerated? 1 = yes, 0 = no -->
-  <xsl:param name="section.autolabel" select="1"/>
-
-    <!-- Do section labels include the component label? 1 = yes, 0 = no -->
-  <xsl:param name="section.label.includes.component.label" select="1"/>
-
-    <!-- sect1 label.markup:
-           Use lowercase roman numbers for sect1 in preface. -->
-    <!-- The original template is in {docbook-xsl}/common/labels.xsl -->
-  <xsl:template match="sect1" mode="label.markup">
-    <!-- if the parent is a component, maybe label that too -->
-    <xsl:variable name="parent.is.component">
-      <xsl:call-template name="is.component">
-        <xsl:with-param name="node" select=".."/>
-      </xsl:call-template>
-    </xsl:variable>
-    <xsl:variable name="component.label">
-      <xsl:if test="$section.label.includes.component.label != 0
-                    and $parent.is.component != 0">
-        <xsl:variable name="parent.label">
-          <xsl:apply-templates select=".." mode="label.markup"/>
-        </xsl:variable>
-        <xsl:if test="$parent.label != ''">
-          <xsl:apply-templates select=".." mode="label.markup"/>
-          <xsl:apply-templates select=".." mode="intralabel.punctuation"/>
-        </xsl:if>
-      </xsl:if>
-    </xsl:variable>
-    <xsl:choose>
-      <xsl:when test="@label">
-        <xsl:value-of select="@label"/>
-      </xsl:when>
-      <xsl:when test="$section.autolabel != 0">
-        <xsl:copy-of select="$component.label"/>
-        <xsl:choose>
-          <xsl:when test="ancestor::preface">
-            <xsl:number format="i" count="sect1"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:number format="1" count="sect1"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:when>
-    </xsl:choose>
-  </xsl:template>
-
-    <!-- sect2 label.markup:
-           Skip numeration for sect2 with empty title. -->
-    <!-- The original template is in {docbook-xsl}/common/labels.xsl
-         It match also sect3, sect4, and sect5, that are unchanged. -->
-  <xsl:template match="sect2" mode="label.markup">
-      <!-- label the parent -->
-      <xsl:variable name="parent.section.label">
-        <xsl:call-template name="label.this.section">
-          <xsl:with-param name="section" select=".."/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:if test="$parent.section.label != '0'">
-        <xsl:apply-templates select=".." mode="label.markup"/>
-        <xsl:apply-templates select=".." mode="intralabel.punctuation"/>
-      </xsl:if>
-      <xsl:choose>
-        <xsl:when test="@label">
-          <xsl:value-of select="@label"/>
-        </xsl:when>
-        <xsl:when test="$section.autolabel != 0">
-          <xsl:choose>
-            <!-- If the first sect2 isn't numbered, renumber the remainig sections -->
-            <xsl:when test="string-length(../sect2[1]/title) = 0">
-              <xsl:variable name="totalsect2">
-                <xsl:number count="sect2"/>
-              </xsl:variable>
-              <xsl:number value="$totalsect2 - 1"/>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:number count="sect2"/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-      </xsl:choose>
-  </xsl:template>
-
-    <!-- object.title.template:
-           Skip numeration for sectX > sect1 in preface. -->
-    <!-- The original template is in {docbook-xsl}/common/gentext.xsl. -->
-  <xsl:template match="section|sect1|sect2|sect3|sect4|sect5|simplesect|bridgehead"
-                mode="object.title.template">
-    <xsl:variable name="is.numbered">
-      <xsl:call-template name="label.this.section"/>
-    </xsl:variable>
-    <xsl:choose>
-      <xsl:when test="$is.numbered != 0 and not(ancestor::preface/sect1)">
-        <xsl:call-template name="gentext.template">
-          <xsl:with-param name="context" select="'title-numbered'"/>
-          <xsl:with-param name="name">
-            <xsl:call-template name="xpath.location"/>
-          </xsl:with-param>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="gentext.template">
-          <xsl:with-param name="context" select="'title-unnumbered'"/>
-          <xsl:with-param name="name">
-            <xsl:call-template name="xpath.location"/>
-          </xsl:with-param>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-<!-- -->
-
-<!-- XREF (see {xhtml,pdf}/xref.xsl) -->
-
-    <!-- mode object.xref.markup:
-           Propagate role to named template substitute-markup -->
-    <!-- The original template is in {docbook-xsl}/common/gentext.xsl -->
-  <xsl:template match="*" mode="object.xref.markup">
-    <xsl:param name="purpose"/>
-    <xsl:param name="xrefstyle"/>
-    <xsl:param name="referrer"/>
-    <xsl:param name="verbose" select="1"/>
-    <xsl:param name="role"/>
-    <xsl:variable name="template">
-      <xsl:choose>
-        <xsl:when test="starts-with(normalize-space($xrefstyle), 'select:')">
-          <xsl:call-template name="make.gentext.template">
-            <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-            <xsl:with-param name="purpose" select="$purpose"/>
-            <xsl:with-param name="referrer" select="$referrer"/>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:when test="starts-with(normalize-space($xrefstyle), 'template:')">
-          <xsl:value-of select="substring-after(normalize-space($xrefstyle), 'template:')"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates select="." mode="object.xref.template">
-            <xsl:with-param name="purpose" select="$purpose"/>
-            <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-            <xsl:with-param name="referrer" select="$referrer"/>
-          </xsl:apply-templates>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="$template = '' and $verbose != 0">
-      <xsl:message>
-        <xsl:text>object.xref.markup: empty xref template</xsl:text>
-        <xsl:text> for linkend="</xsl:text>
-        <xsl:value-of select="@id|@xml:id"/>
-        <xsl:text>" and @xrefstyle="</xsl:text>
-        <xsl:value-of select="$xrefstyle"/>
-        <xsl:text>"</xsl:text>
-      </xsl:message>
-    </xsl:if>
-    <xsl:call-template name="substitute-markup">
-      <xsl:with-param name="purpose" select="$purpose"/>
-      <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-      <xsl:with-param name="referrer" select="$referrer"/>
-      <xsl:with-param name="template" select="$template"/>
-      <xsl:with-param name="verbose" select="$verbose"/>
-      <xsl:with-param name="role" select="$role"/>
-    </xsl:call-template>
-  </xsl:template>
-
-    <!-- substitute-markup:
-           Propagate role to mode insert.title.markup -->
-    <!-- The original template is in {docbook-xsl}/common/gentext.xsl -->
-  <xsl:template name="substitute-markup">
-    <xsl:param name="template" select="''"/>
-    <xsl:param name="allow-anchors" select="'0'"/>
-    <xsl:param name="title" select="''"/>
-    <xsl:param name="subtitle" select="''"/>
-    <xsl:param name="docname" select="''"/>
-    <xsl:param name="label" select="''"/>
-    <xsl:param name="pagenumber" select="''"/>
-    <xsl:param name="purpose"/>
-    <xsl:param name="xrefstyle"/>
-    <xsl:param name="referrer"/>
-    <xsl:param name="verbose"/>
-    <xsl:param name="role"/>
-    <xsl:choose>
-      <xsl:when test="contains($template, '%')">
-        <xsl:value-of select="substring-before($template, '%')"/>
-        <xsl:variable name="candidate"
-                      select="substring(substring-after($template, '%'), 1, 1)"/>
-        <xsl:choose>
-          <xsl:when test="$candidate = 't'">
-            <xsl:apply-templates select="." mode="insert.title.markup">
-              <xsl:with-param name="purpose" select="$purpose"/>
-              <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-              <xsl:with-param name="role" select="$role"/>
-              <xsl:with-param name="title">
-                <xsl:choose>
-                  <xsl:when test="$title != ''">
-                    <xsl:copy-of select="$title"/>
-                  </xsl:when>
-                  <xsl:otherwise>
-                    <xsl:apply-templates select="." mode="title.markup">
-                      <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-                      <xsl:with-param name="verbose" select="$verbose"/>
-                    </xsl:apply-templates>
-                  </xsl:otherwise>
-                </xsl:choose>
-              </xsl:with-param>
-            </xsl:apply-templates>
-          </xsl:when>
-          <xsl:when test="$candidate = 's'">
-            <xsl:apply-templates select="." mode="insert.subtitle.markup">
-              <xsl:with-param name="purpose" select="$purpose"/>
-              <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-              <xsl:with-param name="subtitle">
-                <xsl:choose>
-                  <xsl:when test="$subtitle != ''">
-                    <xsl:copy-of select="$subtitle"/>
-                  </xsl:when>
-                  <xsl:otherwise>
-                    <xsl:apply-templates select="." mode="subtitle.markup">
-                      <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-                    </xsl:apply-templates>
-                  </xsl:otherwise>
-                </xsl:choose>
-              </xsl:with-param>
-            </xsl:apply-templates>
-          </xsl:when>
-          <xsl:when test="$candidate = 'n'">
-            <xsl:apply-templates select="." mode="insert.label.markup">
-              <xsl:with-param name="purpose" select="$purpose"/>
-              <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-              <xsl:with-param name="label">
-                <xsl:choose>
-                  <xsl:when test="$label != ''">
-                    <xsl:copy-of select="$label"/>
-                  </xsl:when>
-                  <xsl:otherwise>
-                    <xsl:apply-templates select="." mode="label.markup"/>
-                  </xsl:otherwise>
-                </xsl:choose>
-              </xsl:with-param>
-            </xsl:apply-templates>
-          </xsl:when>
-          <xsl:when test="$candidate = 'p'">
-            <xsl:apply-templates select="." mode="insert.pagenumber.markup">
-              <xsl:with-param name="purpose" select="$purpose"/>
-              <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-              <xsl:with-param name="pagenumber">
-                <xsl:choose>
-                  <xsl:when test="$pagenumber != ''">
-                    <xsl:copy-of select="$pagenumber"/>
-                  </xsl:when>
-                  <xsl:otherwise>
-                    <xsl:apply-templates select="." mode="pagenumber.markup"/>
-                  </xsl:otherwise>
-                </xsl:choose>
-              </xsl:with-param>
-            </xsl:apply-templates>
-          </xsl:when>
-          <xsl:when test="$candidate = 'o'">
-            <!-- olink target document title -->
-            <xsl:apply-templates select="." mode="insert.olink.docname.markup">
-              <xsl:with-param name="purpose" select="$purpose"/>
-              <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-              <xsl:with-param name="docname">
-                <xsl:choose>
-                  <xsl:when test="$docname != ''">
-                    <xsl:copy-of select="$docname"/>
-                  </xsl:when>
-                  <xsl:otherwise>
-                    <xsl:apply-templates select="." mode="olink.docname.markup"/>
-                  </xsl:otherwise>
-                </xsl:choose>
-              </xsl:with-param>
-            </xsl:apply-templates>
-          </xsl:when>
-          <xsl:when test="$candidate = 'd'">
-            <xsl:apply-templates select="." mode="insert.direction.markup">
-              <xsl:with-param name="purpose" select="$purpose"/>
-              <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-              <xsl:with-param name="direction">
-                <xsl:choose>
-                  <xsl:when test="$referrer">
-                    <xsl:variable name="referent-is-below">
-                      <xsl:for-each select="preceding::xref">
-                        <xsl:if test="generate-id(.) = generate-id($referrer)">1</xsl:if>
-                      </xsl:for-each>
-                    </xsl:variable>
-                    <xsl:choose>
-                      <xsl:when test="$referent-is-below = ''">
-                        <xsl:call-template name="gentext">
-                          <xsl:with-param name="key" select="'above'"/>
-                        </xsl:call-template>
-                      </xsl:when>
-                      <xsl:otherwise>
-                        <xsl:call-template name="gentext">
-                          <xsl:with-param name="key" select="'below'"/>
-                        </xsl:call-template>
-                      </xsl:otherwise>
-                    </xsl:choose>
-                  </xsl:when>
-                  <xsl:otherwise>
-                    <xsl:message>Attempt to use %d in gentext with no referrer!</xsl:message>
-                  </xsl:otherwise>
-                </xsl:choose>
-              </xsl:with-param>
-            </xsl:apply-templates>
-          </xsl:when>
-          <xsl:when test="$candidate = '%' ">
-            <xsl:text>%</xsl:text>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:text>%</xsl:text><xsl:value-of select="$candidate"/>
-          </xsl:otherwise>
-        </xsl:choose>
-        <!-- recurse with the rest of the template string -->
-        <xsl:variable name="rest"
-              select="substring($template,
-              string-length(substring-before($template, '%'))+3)"/>
-        <xsl:call-template name="substitute-markup">
-          <xsl:with-param name="template" select="$rest"/>
-          <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-          <xsl:with-param name="title" select="$title"/>
-          <xsl:with-param name="subtitle" select="$subtitle"/>
-          <xsl:with-param name="docname" select="$docname"/>
-          <xsl:with-param name="label" select="$label"/>
-          <xsl:with-param name="pagenumber" select="$pagenumber"/>
-          <xsl:with-param name="purpose" select="$purpose"/>
-          <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-          <xsl:with-param name="referrer" select="$referrer"/>
-          <xsl:with-param name="verbose" select="$verbose"/>
-          <xsl:with-param name="role" select="$role"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$template"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-<!-- -->
-
-<!-- Total packages size calculation -->
-
-    <!-- returnvalue:
-            If the tag is not empty, apply the original template.
-            Otherwise apply the calculation template. -->
-  <xsl:template match="returnvalue">
-    <xsl:choose>
-      <xsl:when test="count(*)&gt;0">
-        <xsl:apply-imports/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="calculation">
-          <xsl:with-param name="scope" select="../../variablelist"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-    <!-- Self-made calculation template. -->
-  <xsl:template name="calculation">
-    <xsl:param name="scope"/>
-    <xsl:param name="total">0</xsl:param>
-    <xsl:param name="position">1</xsl:param>
-    <xsl:variable name="tokens" select="count($scope/varlistentry)"/>
-    <xsl:variable name="token" select="$scope/varlistentry[$position]/term/token"/>
-    <xsl:variable name="size" select="substring-before($token,' KB')"/>
-    <xsl:variable name="rawsize">
-      <xsl:choose>
-        <xsl:when test="contains($size,',')">
-          <xsl:value-of select="concat(substring-before($size,','),substring-after($size,','))"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="$size"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:choose>
-      <xsl:when test="$position &lt;= $tokens">
-        <xsl:call-template name="calculation">
-          <xsl:with-param name="scope" select="$scope"/>
-          <xsl:with-param name="position" select="$position +1"/>
-          <xsl:with-param name="total" select="$total + $rawsize"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:choose>
-          <xsl:when test="$total &lt; '1000'">
-            <xsl:value-of select="$total"/>
-            <xsl:text>  KB</xsl:text>
-          </xsl:when>
-          <xsl:when test="$total &gt; '1000' and $total &lt; '5000'">
-            <xsl:value-of select="substring($total,1,1)"/>
-            <xsl:text>,</xsl:text>
-            <xsl:value-of select="substring($total,2)"/>
-            <xsl:text>  KB</xsl:text>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="round($total div 1024)"/>
-            <xsl:text>  MB</xsl:text>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-<!-- -->
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/COPYING
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/COPYING	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,47 +1,0 @@
-Copyright
----------
-Copyright (C) 1999-2007 Norman Walsh
-Copyright (C) 2003 JiÅÃ­ Kosek
-Copyright (C) 2004-2007 Steve Ball
-Copyright (C) 2005-2007 The DocBook Project
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the ``Software''), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or
-sell copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-Except as contained in this notice, the names of individuals
-credited with contribution to this software shall not be used in
-advertising or otherwise to promote the sale, use or other
-dealings in this Software without prior written authorization
-from the individuals in question.
-
-Any stylesheet derived from this Software that is publically
-distributed will be identified with a different name and the
-version strings in any derived Software will be changed so that
-no possibility of confusion between the derived package and this
-Software will exist.
-
-Warranty
---------
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT.  IN NO EVENT SHALL NORMAN WALSH OR ANY OTHER
-CONTRIBUTOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Contacting the Author
----------------------
-The DocBook XSL stylesheets are maintained by Norman Walsh,
-<ndw@nwalsh.com>, and members of the DocBook Project,
-<docbook-developers@sf.net>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/VERSION
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/VERSION	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,113 +1,0 @@
-<?xml version='1.0'?> <!-- -*- nxml -*- vim: set foldlevel=2: -->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:fm="http://freshmeat.net/projects/freshmeat-submit/"
-  xmlns:sf="http://sourceforge.net/"
-  xmlns:dyn="http://exslt.org/dynamic"
-  xmlns:saxon="http://icl.com/saxon"
-  exclude-result-prefixes="fm sf"
-  version='1.0'>
-
-<xsl:output omit-xml-declaration="yes"/>
-
-<xsl:param name="get"/>
-<xsl:param name="VERSION" select="string(document('')//fm:Version[1])"/>
-<xsl:param name="Tag" select="concat('V',translate(string(document('')//fm:Version[1]),'.',''))"/>
-<xsl:param name="DistroTitle" select="string(document('')//fm:Branch[1])"/>
-<xsl:param name="sf-relid" select="0"/>
-
-<xsl:param name="DistroName">docbook-xsl</xsl:param>
-<xsl:param name="PreviousRelease">1.72.0</xsl:param>
-<xsl:param name="PreviousReleaseRevision">6549</xsl:param>
-<xsl:param name="Revision">$Revision$</xsl:param>
-<xsl:param name="VersionFileURL">$URL: https://docbook.svn.sourceforge.net/svnroot/docbook/trunk/xsl/VERSION $</xsl:param>
-
-<xsl:strip-space elements="fm:*"/>
-
-<fm:project>
-  <fm:Project>DocBook</fm:Project>
-  <fm:Branch>XSL Stylesheets</fm:Branch>
-  <fm:Version>1.73.2</fm:Version>
-<!--
-  <fm:License>MIT/X Consortium License</fm:License>
--->
-  <fm:Release-Focus>
-<!-- * Initial freshmeat announcement -->
-<!-- * Documentation -->
-<!-- * Code cleanup -->
-<!-- * Minor feature enhancements -->
-<!-- * Major feature enhancements -->
-Minor bugfixes
-<!-- * Major bugfixes -->
-<!-- * Minor security fixes -->
-<!-- * Major security fixes -->
-  </fm:Release-Focus>
-  <fm:Home-Page-URL>http://sourceforge.net/projects/docbook/</fm:Home-Page-URL>
-  <fm:Gzipped-Tar-URL>http://prdownloads.sourceforge.net/docbook/{DISTRONAME-VERSION}.tar.gz?download</fm:Gzipped-Tar-URL>
-  <fm:Zipped-Tar-URL>http://prdownloads.sourceforge.net/docbook/{DISTRONAME-VERSION}.zip?download</fm:Zipped-Tar-URL>
-  <fm:Bzipped-Tar-URL>http://prdownloads.sourceforge.net/docbook/{DISTRONAME-VERSION}.bz2?download</fm:Bzipped-Tar-URL>
-  <fm:Changelog-URL>http://sourceforge.net/project/shownotes.php?release_id={SFRELID}</fm:Changelog-URL>
-  <fm:CVS-URL>http://docbook.svn.sourceforge.net/viewvc/docbook/</fm:CVS-URL>
-  <fm:Mailing-List-URL>http://lists.oasis-open.org/archives/docbook-apps/</fm:Mailing-List-URL>
-  <fm:Changes>This is a bug-fix update to the 1.73.1 release.
-</fm:Changes>
-</fm:project>
-
-<xsl:template match="/" priority="-100">
-  <xsl:choose>
-    <xsl:when test="$get = 'Tag'">
-      <xsl:value-of select="$Tag"/>
-    </xsl:when>
-    <xsl:when test="$get = 'PreviousRelease'">
-      <xsl:value-of select="$PreviousRelease"/>
-    </xsl:when>
-    <xsl:when test="$get = 'PreviousReleaseRevision'">
-      <xsl:value-of select="$PreviousReleaseRevision"/>
-    </xsl:when>
-    <xsl:when test="$get = 'DistroTitle'">
-      <xsl:value-of select="$DistroTitle"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:if test="$sf-relid = 0">
-        <xsl:message terminate="yes">
-         <xsl:text>You must specify the sf-relid as a parameter.</xsl:text>
-        </xsl:message>
-      </xsl:if>
-      <xsl:apply-templates select="//fm:project"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="fm:project">
-  <xsl:apply-templates/>
-  <xsl:text>&#10;</xsl:text>
-  <xsl:apply-templates select="fm:Changes" mode="text"/>
-</xsl:template>
-
-<xsl:template match="fm:Changes"/>
-
-<xsl:template match="fm:Gzipped-Tar-URL|fm:Zipped-Tar-URL|fm:Bzipped-Tar-URL">
-  <xsl:value-of select="local-name(.)"/>
-  <xsl:text>: </xsl:text>
-  <xsl:value-of select="substring-before(., '{DISTRONAME-VERSION}')"/>
-  <xsl:value-of select="concat($DistroName, '-', $VERSION)"/>
-  <xsl:value-of select="substring-after(., '{DISTRONAME-VERSION}')"/>
-  <xsl:text>&#10;</xsl:text>
-</xsl:template>
-
-<xsl:template match="fm:Changelog-URL">
-  <xsl:value-of select="local-name(.)"/>
-  <xsl:text>: </xsl:text>
-  <xsl:value-of select="substring-before(., '{SFRELID}')"/>
-  <xsl:value-of select="$sf-relid"/>
-  <xsl:value-of select="substring-after(., '{SFRELID}')"/>
-  <xsl:text>&#10;</xsl:text>
-</xsl:template>
-
-<xsl:template match="fm:*">
-  <xsl:value-of select="local-name(.)"/>
-  <xsl:text>: </xsl:text>
-  <xsl:value-of select="normalize-space(.)"/>
-  <xsl:text>&#10;</xsl:text>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/common.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/common.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,1981 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
-                xmlns:dyn="http://exslt.org/dynamic"
-                xmlns:saxon="http://icl.com/saxon"
-                exclude-result-prefixes="doc dyn saxon"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<doc:reference xmlns="" xml:id="base">
-  <info>
-    <title>Common Â» Base Template Reference</title>
-    <releaseinfo role="meta">
-      $Id$
-    </releaseinfo>
-  </info>
-  <!-- * yes, partintro is a valid child of a reference... -->
-  <partintro xml:id="partintro">
-    <title>Introduction</title>
-    <para>This is technical reference documentation for the âbaseâ
-      set of common templates in the DocBook XSL Stylesheets.</para>
-    <para>This is not intended to be user documentation. It is
-      provided for developers writing customization layers for the
-      stylesheets.</para>
-  </partintro>
-</doc:reference>
-
-<!-- ==================================================================== -->
-<!-- Establish strip/preserve whitespace rules -->
-
-<xsl:preserve-space elements="*"/>
-
-<xsl:strip-space elements="
-abstract affiliation anchor answer appendix area areaset areaspec
-artheader article audiodata audioobject author authorblurb authorgroup
-beginpage bibliodiv biblioentry bibliography biblioset blockquote book
-bookbiblio bookinfo callout calloutlist caption caution chapter
-citerefentry cmdsynopsis co collab colophon colspec confgroup
-copyright dedication docinfo editor entrytbl epigraph equation
-example figure footnote footnoteref formalpara funcprototype
-funcsynopsis glossary glossdef glossdiv glossentry glosslist graphicco
-group highlights imagedata imageobject imageobjectco important index
-indexdiv indexentry indexterm info informalequation informalexample
-informalfigure informaltable inlineequation inlinemediaobject
-itemizedlist itermset keycombo keywordset legalnotice listitem lot
-mediaobject mediaobjectco menuchoice msg msgentry msgexplan msginfo
-msgmain msgrel msgset msgsub msgtext note objectinfo
-orderedlist othercredit part partintro preface printhistory procedure
-programlistingco publisher qandadiv qandaentry qandaset question
-refentry reference refmeta refnamediv refsection refsect1 refsect1info refsect2
-refsect2info refsect3 refsect3info refsynopsisdiv refsynopsisdivinfo
-revhistory revision row sbr screenco screenshot sect1 sect1info sect2
-sect2info sect3 sect3info sect4 sect4info sect5 sect5info section
-sectioninfo seglistitem segmentedlist seriesinfo set setindex setinfo
-shortcut sidebar simplelist simplesect spanspec step subject
-subjectset substeps synopfragment table tbody textobject tfoot tgroup
-thead tip toc tocchap toclevel1 toclevel2 toclevel3 toclevel4
-toclevel5 tocpart varargs variablelist varlistentry videodata
-videoobject void warning subjectset
-
-classsynopsis
-constructorsynopsis
-destructorsynopsis
-fieldsynopsis
-methodparam
-methodsynopsis
-ooclass
-ooexception
-oointerface
-simplemsgentry
-manvolnum
-"/>
-<!-- ====================================================================== -->
-
-<doc:template name="is.component" xmlns="">
-<refpurpose>Tests if a given node is a component-level element</refpurpose>
-
-<refdescription id="is.component-desc">
-<para>This template returns '1' if the specified node is a component
-(Chapter, Appendix, etc.), and '0' otherwise.</para>
-</refdescription>
-
-<refparameter id="is.component-params">
-<variablelist>
-<varlistentry><term>node</term>
-<listitem>
-<para>The node which is to be tested.</para>
-</listitem>
-</varlistentry>
-</variablelist>
-</refparameter>
-
-<refreturn id="is.component-returns">
-<para>This template returns '1' if the specified node is a component
-(Chapter, Appendix, etc.), and '0' otherwise.</para>
-</refreturn>
-</doc:template>
-
-<xsl:template name="is.component">
-  <xsl:param name="node" select="."/>
-  <xsl:choose>
-    <xsl:when test="local-name($node) = 'appendix'
-                    or local-name($node) = 'article'
-                    or local-name($node) = 'chapter'
-                    or local-name($node) = 'preface'
-                    or local-name($node) = 'bibliography'
-                    or local-name($node) = 'glossary'
-                    or local-name($node) = 'index'">1</xsl:when>
-    <xsl:otherwise>0</xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ====================================================================== -->
-
-<doc:template name="is.section" xmlns="">
-<refpurpose>Tests if a given node is a section-level element</refpurpose>
-
-<refdescription id="is.section-desc">
-<para>This template returns '1' if the specified node is a section
-(Section, Sect1, Sect2, etc.), and '0' otherwise.</para>
-</refdescription>
-
-<refparameter id="is.section-params">
-<variablelist>
-<varlistentry><term>node</term>
-<listitem>
-<para>The node which is to be tested.</para>
-</listitem>
-</varlistentry>
-</variablelist>
-</refparameter>
-
-<refreturn id="is.section-returns">
-<para>This template returns '1' if the specified node is a section
-(Section, Sect1, Sect2, etc.), and '0' otherwise.</para>
-</refreturn>
-</doc:template>
-
-<xsl:template name="is.section">
-  <xsl:param name="node" select="."/>
-  <xsl:choose>
-    <xsl:when test="local-name($node) = 'section'
-                    or local-name($node) = 'sect1'
-                    or local-name($node) = 'sect2'
-                    or local-name($node) = 'sect3'
-                    or local-name($node) = 'sect4'
-                    or local-name($node) = 'sect5'
-                    or local-name($node) = 'refsect1'
-                    or local-name($node) = 'refsect2'
-                    or local-name($node) = 'refsect3'
-                    or local-name($node) = 'simplesect'">1</xsl:when>
-    <xsl:otherwise>0</xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ====================================================================== -->
-
-<doc:template name="section.level" xmlns="">
-<refpurpose>Returns the hierarchical level of a section</refpurpose>
-
-<refdescription id="section.level-desc">
-<para>This template calculates the hierarchical level of a section.
-The element <tag>sect1</tag> is at level 1, <tag>sect2</tag> is
-at level 2, etc.</para>
-
-<para>Recursive sections are calculated down to the fifth level.</para>
-</refdescription>
-
-<refparameter id="section.level-params">
-<variablelist>
-<varlistentry><term>node</term>
-<listitem>
-<para>The section node for which the level should be calculated.
-Defaults to the context node.</para>
-</listitem>
-</varlistentry>
-</variablelist>
-</refparameter>
-
-<refreturn id="section.level-returns">
-<para>The section level, <quote>1</quote>, <quote>2</quote>, etc.
-</para>
-</refreturn>
-</doc:template>
-
-<xsl:template name="section.level">
-  <xsl:param name="node" select="."/>
-  <xsl:choose>
-    <xsl:when test="local-name($node)='sect1'">1</xsl:when>
-    <xsl:when test="local-name($node)='sect2'">2</xsl:when>
-    <xsl:when test="local-name($node)='sect3'">3</xsl:when>
-    <xsl:when test="local-name($node)='sect4'">4</xsl:when>
-    <xsl:when test="local-name($node)='sect5'">5</xsl:when>
-    <xsl:when test="local-name($node)='section'">
-      <xsl:choose>
-        <xsl:when test="$node/../../../../../../section">6</xsl:when>
-        <xsl:when test="$node/../../../../../section">5</xsl:when>
-        <xsl:when test="$node/../../../../section">4</xsl:when>
-        <xsl:when test="$node/../../../section">3</xsl:when>
-        <xsl:when test="$node/../../section">2</xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:when test="local-name($node)='refsect1' or
-                    local-name($node)='refsect2' or
-                    local-name($node)='refsect3' or
-                    local-name($node)='refsection' or
-                    local-name($node)='refsynopsisdiv'">
-      <xsl:call-template name="refentry.section.level">
-        <xsl:with-param name="node" select="$node"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="local-name($node)='simplesect'">
-      <xsl:choose>
-        <xsl:when test="$node/../../sect1">2</xsl:when>
-        <xsl:when test="$node/../../sect2">3</xsl:when>
-        <xsl:when test="$node/../../sect3">4</xsl:when>
-        <xsl:when test="$node/../../sect4">5</xsl:when>
-        <xsl:when test="$node/../../sect5">5</xsl:when>
-        <xsl:when test="$node/../../section">
-          <xsl:choose>
-            <xsl:when test="$node/../../../../../section">5</xsl:when>
-            <xsl:when test="$node/../../../../section">4</xsl:when>
-            <xsl:when test="$node/../../../section">3</xsl:when>
-            <xsl:otherwise>2</xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>1</xsl:otherwise>
-  </xsl:choose>
-</xsl:template><!-- section.level -->
-
-<doc:template name="qanda.section.level" xmlns="">
-<refpurpose>Returns the hierarchical level of a QandASet</refpurpose>
-
-<refdescription id="qanda.section.level-desc">
-<para>This template calculates the hierarchical level of a QandASet.
-</para>
-</refdescription>
-
-<refreturn id="qanda.section.level-returns">
-<para>The level, <quote>1</quote>, <quote>2</quote>, etc.
-</para>
-</refreturn>
-</doc:template>
-
-<xsl:template name="qanda.section.level">
-  <xsl:variable name="section"
-                select="(ancestor::section
-                         |ancestor::simplesect
-                         |ancestor::sect5
-                         |ancestor::sect4
-                         |ancestor::sect3
-                         |ancestor::sect2
-                         |ancestor::sect1
-                         |ancestor::refsect3
-                         |ancestor::refsect2
-                         |ancestor::refsect1)[last()]"/>
-
-  <xsl:choose>
-    <xsl:when test="count($section) = '0'">1</xsl:when>
-    <xsl:otherwise>
-      <xsl:variable name="slevel">
-        <xsl:call-template name="section.level">
-          <xsl:with-param name="node" select="$section"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:value-of select="$slevel + 1"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- Finds the total section depth of a section in a refentry -->
-<xsl:template name="refentry.section.level">
-  <xsl:param name="node" select="."/>
-
-  <xsl:variable name="RElevel">
-    <xsl:call-template name="refentry.level">
-      <xsl:with-param name="node" select="$node/ancestor::refentry[1]"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="levelinRE">
-    <xsl:choose>
-      <xsl:when test="local-name($node)='refsynopsisdiv'">1</xsl:when>
-      <xsl:when test="local-name($node)='refsect1'">1</xsl:when>
-      <xsl:when test="local-name($node)='refsect2'">2</xsl:when>
-      <xsl:when test="local-name($node)='refsect3'">3</xsl:when>
-      <xsl:when test="local-name($node)='refsection'">
-        <xsl:choose>
-          <xsl:when test="$node/../../../../../refsection">5</xsl:when>
-          <xsl:when test="$node/../../../../refsection">4</xsl:when>
-          <xsl:when test="$node/../../../refsection">3</xsl:when>
-          <xsl:when test="$node/../../refsection">2</xsl:when>
-          <xsl:otherwise>1</xsl:otherwise>
-        </xsl:choose>
-      </xsl:when>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:value-of select="$levelinRE + $RElevel"/>
-</xsl:template>
-
-<!-- Finds the section depth of a refentry -->
-<xsl:template name="refentry.level">
-  <xsl:param name="node" select="."/>
-  <xsl:variable name="container"
-                select="($node/ancestor::section |
-                        $node/ancestor::sect1 |
-                        $node/ancestor::sect2 |
-                        $node/ancestor::sect3 |
-                        $node/ancestor::sect4 |
-                        $node/ancestor::sect5)[last()]"/>
-
-  <xsl:choose>
-    <xsl:when test="$container">
-      <xsl:variable name="slevel">
-        <xsl:call-template name="section.level">
-          <xsl:with-param name="node" select="$container"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:value-of select="$slevel + 1"/>
-    </xsl:when>
-    <xsl:otherwise>1</xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="qandadiv.section.level">
-  <xsl:variable name="section.level">
-    <xsl:call-template name="qanda.section.level"/>
-  </xsl:variable>
-  <xsl:variable name="anc.divs" select="ancestor::qandadiv"/>
-
-  <xsl:value-of select="count($anc.divs) + number($section.level)"/>
-</xsl:template>
-
-<xsl:template name="question.answer.label">
-  <xsl:variable name="deflabel">
-    <xsl:choose>
-      <xsl:when test="ancestor-or-self::*[@defaultlabel]">
-        <xsl:value-of select="(ancestor-or-self::*[@defaultlabel])[last()]
-                              /@defaultlabel"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$qanda.defaultlabel"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="label" select="@label"/>
-
-<!--
- (hnr      (hierarchical-number-recursive (normalize "qandadiv") node))
-
-         (parsect  (ancestor-member node (section-element-list)))
-
-         (defnum   (if (and %qanda-inherit-numeration% 
-                            %section-autolabel%)
-                       (if (node-list-empty? parsect)
-                           (section-autolabel-prefix node)
-                           (section-autolabel parsect))
-                       ""))
-
-         (hnumber  (let loop ((numlist hnr) (number defnum) 
-                              (sep (if (equal? defnum "") "" ".")))
-                     (if (null? numlist)
-                         number
-                         (loop (cdr numlist) 
-                               (string-append number
-                                              sep
-                                              (number->string (car numlist)))
-                               "."))))
-         (cnumber  (child-number (parent node)))
-         (number   (string-append hnumber 
-                                  (if (equal? hnumber "")
-                                      ""
-                                      ".")
-                                  (number->string cnumber))))
--->
-
-  <xsl:choose>
-    <xsl:when test="$deflabel = 'qanda'">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key">
-          <xsl:choose>
-            <xsl:when test="local-name(.) = 'question'">question</xsl:when>
-            <xsl:when test="local-name(.) = 'answer'">answer</xsl:when>
-            <xsl:when test="local-name(.) = 'qandadiv'">qandadiv</xsl:when>
-            <xsl:otherwise>qandaset</xsl:otherwise>
-          </xsl:choose>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="$deflabel = 'label'">
-      <xsl:value-of select="$label"/>
-    </xsl:when>
-    <xsl:when test="$deflabel = 'number'
-                    and local-name(.) = 'question'">
-      <xsl:apply-templates select="ancestor::qandaset[1]"
-                           mode="number"/>
-      <xsl:choose>
-        <xsl:when test="ancestor::qandadiv">
-          <xsl:apply-templates select="ancestor::qandadiv[1]"
-                               mode="number"/>
-          <xsl:apply-templates select="ancestor::qandaentry"
-                               mode="number"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates select="ancestor::qandaentry"
-                               mode="number"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <!-- nothing -->
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="qandaset" mode="number">
-  <!-- FIXME: -->
-</xsl:template>
-
-<xsl:template match="qandadiv" mode="number">
-  <xsl:number level="multiple" from="qandaset" format="1."/>
-</xsl:template>
-
-<xsl:template match="qandaentry" mode="number">
-  <xsl:choose>
-    <xsl:when test="ancestor::qandadiv">
-      <xsl:number level="single" from="qandadiv" format="1."/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:number level="single" from="qandaset" format="1."/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ====================================================================== -->
-
-<xsl:template name="object.id">
-  <xsl:param name="object" select="."/>
-  <xsl:choose>
-    <xsl:when test="$object/@id">
-      <xsl:value-of select="$object/@id"/>
-    </xsl:when>
-    <xsl:when test="$object/@xml:id">
-      <xsl:value-of select="$object/@xml:id"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="generate-id($object)"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="person.name">
-  <!-- Formats a personal name. Handles corpauthor as a special case. -->
-  <xsl:param name="node" select="."/>
-
-  <xsl:variable name="style">
-    <xsl:choose>
-      <xsl:when test="$node/@role">
-        <xsl:value-of select="$node/@role"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="gentext.template">
-          <xsl:with-param name="context" select="'styles'"/>
-          <xsl:with-param name="name" select="'person-name'"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:choose>
-    <!-- the personname element is a specialcase -->
-    <xsl:when test="$node/personname">
-      <xsl:call-template name="person.name">
-        <xsl:with-param name="node" select="$node/personname"/>
-      </xsl:call-template>
-    </xsl:when>
-
-    <!-- handle corpauthor as a special case...-->
-    <!-- * MikeSmith 2007-06: I'm wondering if the person.name template -->
-    <!-- * actually ever gets called to handle corpauthor.. maybe -->
-    <!-- * we don't actually need to check for corpauthor here. -->
-    <xsl:when test="local-name($node)='corpauthor'">
-      <xsl:apply-templates select="$node"/>
-    </xsl:when>
-
-    <xsl:otherwise>
-      <xsl:choose>
-        <!-- Handle case when personname contains only general markup (DocBook 5.0) -->
-        <xsl:when test="$node/self::personname and not($node/firstname or $node/honorific or $node/lineage or $node/othername or $node/surname)">
-          <xsl:apply-templates select="$node/node()"/>
-        </xsl:when>
-        <xsl:when test="$style = 'family-given'">
-          <xsl:call-template name="person.name.family-given">
-            <xsl:with-param name="node" select="$node"/>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:when test="$style = 'last-first'">
-          <xsl:call-template name="person.name.last-first">
-            <xsl:with-param name="node" select="$node"/>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="person.name.first-last">
-            <xsl:with-param name="node" select="$node"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="person.name.family-given">
-  <xsl:param name="node" select="."/>
-
-  <!-- The family-given style applies a convention for identifying given -->
-  <!-- and family names in locales where it may be ambiguous -->
-  <xsl:apply-templates select="$node//surname[1]"/>
-
-  <xsl:if test="$node//surname and $node//firstname">
-    <xsl:text> </xsl:text>
-  </xsl:if>
-
-  <xsl:apply-templates select="$node//firstname[1]"/>
-
-  <xsl:text> [FAMILY Given]</xsl:text>
-</xsl:template>
-
-<xsl:template name="person.name.last-first">
-  <xsl:param name="node" select="."/>
-
-  <xsl:apply-templates select="$node//surname[1]"/>
-
-  <xsl:if test="$node//surname and $node//firstname">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-
-  <xsl:apply-templates select="$node//firstname[1]"/>
-</xsl:template>
-
-<xsl:template name="person.name.first-last">
-  <xsl:param name="node" select="."/>
-
-  <xsl:if test="$node//honorific">
-    <xsl:apply-templates select="$node//honorific[1]"/>
-    <xsl:value-of select="$punct.honorific"/>
-  </xsl:if>
-
-  <xsl:if test="$node//firstname">
-    <xsl:if test="$node//honorific">
-      <xsl:text> </xsl:text>
-    </xsl:if>
-    <xsl:apply-templates select="$node//firstname[1]"/>
-  </xsl:if>
-
-  <xsl:if test="$node//othername and $author.othername.in.middle != 0">
-    <xsl:if test="$node//honorific or $node//firstname">
-      <xsl:text> </xsl:text>
-    </xsl:if>
-    <xsl:apply-templates select="$node//othername[1]"/>
-  </xsl:if>
-
-  <xsl:if test="$node//surname">
-    <xsl:if test="$node//honorific or $node//firstname
-                  or ($node//othername and $author.othername.in.middle != 0)">
-      <xsl:text> </xsl:text>
-    </xsl:if>
-    <xsl:apply-templates select="$node//surname[1]"/>
-  </xsl:if>
-
-  <xsl:if test="$node//lineage">
-    <xsl:text>, </xsl:text>
-    <xsl:apply-templates select="$node//lineage[1]"/>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="person.name.list">
-  <!-- Return a formatted string representation of the contents of
-       the current element. The current element must contain one or
-       more AUTHORs, CORPAUTHORs, OTHERCREDITs, and/or EDITORs.
-
-       John Doe
-     or
-       John Doe and Jane Doe
-     or
-       John Doe, Jane Doe, and A. Nonymous
-  -->
-  <xsl:param name="person.list"
-             select="author|corpauthor|othercredit|editor"/>
-  <xsl:param name="person.count" select="count($person.list)"/>
-  <xsl:param name="count" select="1"/>
-
-  <xsl:choose>
-    <xsl:when test="$count &gt; $person.count"></xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="person.name">
-        <xsl:with-param name="node" select="$person.list[position()=$count]"/>
-      </xsl:call-template>
-
-      <xsl:choose>
-        <xsl:when test="$person.count = 2 and $count = 1">
-          <xsl:call-template name="gentext.template">
-            <xsl:with-param name="context" select="'authorgroup'"/>
-            <xsl:with-param name="name" select="'sep2'"/>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:when test="$person.count &gt; 2 and $count+1 = $person.count">
-          <xsl:call-template name="gentext.template">
-            <xsl:with-param name="context" select="'authorgroup'"/>
-            <xsl:with-param name="name" select="'seplast'"/>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:when test="$count &lt; $person.count">
-          <xsl:call-template name="gentext.template">
-            <xsl:with-param name="context" select="'authorgroup'"/>
-            <xsl:with-param name="name" select="'sep'"/>
-          </xsl:call-template>
-        </xsl:when>
-      </xsl:choose>
-
-      <xsl:call-template name="person.name.list">
-        <xsl:with-param name="person.list" select="$person.list"/>
-        <xsl:with-param name="person.count" select="$person.count"/>
-        <xsl:with-param name="count" select="$count+1"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template><!-- person.name.list -->
-
-<!-- === synopsis ======================================================= -->
-<!-- The following definitions match those given in the reference
-     documentation for DocBook V3.0
--->
-
-<xsl:variable name="arg.choice.opt.open.str">[</xsl:variable>
-<xsl:variable name="arg.choice.opt.close.str">]</xsl:variable>
-<xsl:variable name="arg.choice.req.open.str">{</xsl:variable>
-<xsl:variable name="arg.choice.req.close.str">}</xsl:variable>
-<xsl:variable name="arg.choice.plain.open.str"><xsl:text> </xsl:text></xsl:variable>
-<xsl:variable name="arg.choice.plain.close.str"><xsl:text> </xsl:text></xsl:variable>
-<xsl:variable name="arg.choice.def.open.str">[</xsl:variable>
-<xsl:variable name="arg.choice.def.close.str">]</xsl:variable>
-<xsl:variable name="arg.rep.repeat.str">...</xsl:variable>
-<xsl:variable name="arg.rep.norepeat.str"></xsl:variable>
-<xsl:variable name="arg.rep.def.str"></xsl:variable>
-<xsl:variable name="arg.or.sep"> | </xsl:variable>
-<xsl:variable name="cmdsynopsis.hanging.indent">4pi</xsl:variable>
-
-<!-- ====================================================================== -->
-
-<!--
-<xsl:template name="xref.g.subst">
-  <xsl:param name="string"></xsl:param>
-  <xsl:param name="target" select="."/>
-  <xsl:variable name="subst">%g</xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="contains($string, $subst)">
-      <xsl:value-of select="substring-before($string, $subst)"/>
-      <xsl:call-template name="gentext.element.name">
-        <xsl:with-param name="element.name" select="local-name($target)"/>
-      </xsl:call-template>
-      <xsl:call-template name="xref.g.subst">
-        <xsl:with-param name="string"
-                        select="substring-after($string, $subst)"/>
-        <xsl:with-param name="target" select="$target"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$string"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="xref.t.subst">
-  <xsl:param name="string"></xsl:param>
-  <xsl:param name="target" select="."/>
-  <xsl:variable name="subst">%t</xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="contains($string, $subst)">
-      <xsl:call-template name="xref.g.subst">
-        <xsl:with-param name="string"
-                        select="substring-before($string, $subst)"/>
-        <xsl:with-param name="target" select="$target"/>
-      </xsl:call-template>
-      <xsl:call-template name="title.xref">
-        <xsl:with-param name="target" select="$target"/>
-      </xsl:call-template>
-      <xsl:call-template name="xref.t.subst">
-        <xsl:with-param name="string"
-                        select="substring-after($string, $subst)"/>
-        <xsl:with-param name="target" select="$target"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="xref.g.subst">
-        <xsl:with-param name="string" select="$string"/>
-        <xsl:with-param name="target" select="$target"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="xref.n.subst">
-  <xsl:param name="string"></xsl:param>
-  <xsl:param name="target" select="."/>
-  <xsl:variable name="subst">%n</xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="contains($string, $subst)">
-      <xsl:call-template name="xref.t.subst">
-        <xsl:with-param name="string"
-                        select="substring-before($string, $subst)"/>
-        <xsl:with-param name="target" select="$target"/>
-      </xsl:call-template>
-      <xsl:call-template name="number.xref">
-        <xsl:with-param name="target" select="$target"/>
-      </xsl:call-template>
-      <xsl:call-template name="xref.t.subst">
-        <xsl:with-param name="string"
-                        select="substring-after($string, $subst)"/>
-        <xsl:with-param name="target" select="$target"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="xref.t.subst">
-        <xsl:with-param name="string" select="$string"/>
-        <xsl:with-param name="target" select="$target"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="subst.xref.text">
-  <xsl:param name="xref.text"></xsl:param>
-  <xsl:param name="target" select="."/>
-
-  <xsl:call-template name="xref.n.subst">
-    <xsl:with-param name="string" select="$xref.text"/>
-    <xsl:with-param name="target" select="$target"/>
-  </xsl:call-template>
-</xsl:template>
--->
-
-<!-- ====================================================================== -->
-
-<xsl:template name="filename-basename">
-  <!-- We assume all filenames are really URIs and use "/" -->
-  <xsl:param name="filename"></xsl:param>
-  <xsl:param name="recurse" select="false()"/>
-
-  <xsl:choose>
-    <xsl:when test="substring-after($filename, '/') != ''">
-      <xsl:call-template name="filename-basename">
-        <xsl:with-param name="filename"
-                        select="substring-after($filename, '/')"/>
-        <xsl:with-param name="recurse" select="true()"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$filename"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="filename-extension">
-  <xsl:param name="filename"></xsl:param>
-  <xsl:param name="recurse" select="false()"/>
-
-  <!-- Make sure we only look at the base name... -->
-  <xsl:variable name="basefn">
-    <xsl:choose>
-      <xsl:when test="$recurse">
-        <xsl:value-of select="$filename"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="filename-basename">
-          <xsl:with-param name="filename" select="$filename"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="substring-after($basefn, '.') != ''">
-      <xsl:call-template name="filename-extension">
-        <xsl:with-param name="filename"
-                        select="substring-after($basefn, '.')"/>
-        <xsl:with-param name="recurse" select="true()"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="$recurse">
-      <xsl:value-of select="$basefn"/>
-    </xsl:when>
-    <xsl:otherwise></xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ====================================================================== -->
-
-<doc:template name="select.mediaobject" xmlns="">
-<refpurpose>Selects and processes an appropriate media object from a list</refpurpose>
-
-<refdescription id="select.mediaobject-desc">
-<para>This template takes a list of media objects (usually the
-children of a mediaobject or inlinemediaobject) and processes
-the "right" object.</para>
-
-<para>This template relies on a template named 
-"select.mediaobject.index" to determine which object
-in the list is appropriate.</para>
-
-<para>If no acceptable object is located, nothing happens.</para>
-</refdescription>
-
-<refparameter id="select.mediaobject-params">
-<variablelist>
-<varlistentry><term>olist</term>
-<listitem>
-<para>The node list of potential objects to examine.</para>
-</listitem>
-</varlistentry>
-</variablelist>
-</refparameter>
-
-<refreturn id="select.mediaobject-returns">
-<para>Calls &lt;xsl:apply-templates&gt; on the selected object.</para>
-</refreturn>
-</doc:template>
-
-<xsl:template name="select.mediaobject">
-  <xsl:param name="olist"
-             select="imageobject|imageobjectco
-                     |videoobject|audioobject|textobject"/>
-  
-  <xsl:variable name="mediaobject.index">
-    <xsl:call-template name="select.mediaobject.index">
-      <xsl:with-param name="olist" select="$olist"/>
-      <xsl:with-param name="count" select="1"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:if test="$mediaobject.index != ''">
-    <xsl:apply-templates select="$olist[position() = $mediaobject.index]"/>
-  </xsl:if>
-</xsl:template>
-
-<!-- ====================================================================== -->
-
-<doc:template name="select.mediaobject.index" xmlns="">
-<refpurpose>Selects the position of the appropriate media object from a list</refpurpose>
-
-<refdescription id="select.mediaobject.index-desc">
-<para>This template takes a list of media objects (usually the
-children of a mediaobject or inlinemediaobject) and determines
-the "right" object. It returns the position of that object
-to be used by the calling template.</para>
-
-<para>If the parameter <parameter>use.role.for.mediaobject</parameter>
-is nonzero, then it first checks for an object with
-a role attribute of the appropriate value.  It takes the first
-of those.  Otherwise, it takes the first acceptable object
-through a recursive pass through the list.</para>
-
-<para>This template relies on a template named "is.acceptable.mediaobject"
-to determine if a given object is an acceptable graphic. The semantics
-of media objects is that the first acceptable graphic should be used.
-</para>
-
-<para>If no acceptable object is located, no index is returned.</para>
-</refdescription>
-
-<refparameter id="select.mediaobject.index-params">
-<variablelist>
-<varlistentry><term>olist</term>
-<listitem>
-<para>The node list of potential objects to examine.</para>
-</listitem>
-</varlistentry>
-<varlistentry><term>count</term>
-<listitem>
-<para>The position in the list currently being considered by the 
-recursive process.</para>
-</listitem>
-</varlistentry>
-</variablelist>
-</refparameter>
-
-<refreturn id="select.mediaobject.index-returns">
-<para>Returns the position in the original list of the selected object.</para>
-</refreturn>
-</doc:template>
-
-<xsl:template name="select.mediaobject.index">
-  <xsl:param name="olist"
-             select="imageobject|imageobjectco
-                     |videoobject|audioobject|textobject"/>
-  <xsl:param name="count">1</xsl:param>
-
-  <xsl:choose>
-    <!-- Test for objects preferred by role -->
-    <xsl:when test="$use.role.for.mediaobject != 0 
-               and $preferred.mediaobject.role != ''
-               and $olist[@role = $preferred.mediaobject.role]"> 
-      
-      <!-- Get the first hit's position index -->
-      <xsl:for-each select="$olist">
-        <xsl:if test="@role = $preferred.mediaobject.role and
-             not(preceding-sibling::*[@role = $preferred.mediaobject.role])"> 
-          <xsl:value-of select="position()"/> 
-        </xsl:if>
-      </xsl:for-each>
-    </xsl:when>
-
-    <xsl:when test="$use.role.for.mediaobject != 0 
-               and $olist[@role = $stylesheet.result.type]">
-      <!-- Get the first hit's position index -->
-      <xsl:for-each select="$olist">
-        <xsl:if test="@role = $stylesheet.result.type and 
-              not(preceding-sibling::*[@role = $stylesheet.result.type])"> 
-          <xsl:value-of select="position()"/> 
-        </xsl:if>
-      </xsl:for-each>
-    </xsl:when>
-    <!-- Accept 'html' for $stylesheet.result.type = 'xhtml' -->
-    <xsl:when test="$use.role.for.mediaobject != 0 
-               and $stylesheet.result.type = 'xhtml'
-               and $olist[@role = 'html']">
-      <!-- Get the first hit's position index -->
-      <xsl:for-each select="$olist">
-        <xsl:if test="@role = 'html' and 
-              not(preceding-sibling::*[@role = 'html'])"> 
-          <xsl:value-of select="position()"/> 
-        </xsl:if>
-      </xsl:for-each>
-    </xsl:when>
-
-    <!-- If no selection by role, and there is only one object, use it -->
-    <xsl:when test="count($olist) = 1 and $count = 1">
-      <xsl:value-of select="$count"/> 
-    </xsl:when>
-
-    <xsl:otherwise>
-      <!-- Otherwise select first acceptable object -->
-      <xsl:if test="$count &lt;= count($olist)">
-        <xsl:variable name="object" select="$olist[position()=$count]"/>
-    
-        <xsl:variable name="useobject">
-          <xsl:choose>
-            <!-- The phrase is used only when contains TeX Math and output is FO -->
-            <xsl:when test="local-name($object)='textobject' and $object/phrase
-                            and $object/@role='tex' and $stylesheet.result.type = 'fo'
-                            and $tex.math.in.alt != ''">
-              <xsl:text>1</xsl:text> 
-            </xsl:when>
-            <!-- The phrase is never used -->
-            <xsl:when test="local-name($object)='textobject' and $object/phrase">
-              <xsl:text>0</xsl:text>
-            </xsl:when>
-            <xsl:when test="local-name($object)='textobject'
-                            and $object/ancestor::equation ">
-            <!-- The first textobject is not a reasonable fallback
-                 for equation image -->
-              <xsl:text>0</xsl:text>
-            </xsl:when>
-            <!-- The first textobject is a reasonable fallback -->
-            <xsl:when test="local-name($object)='textobject'
-                            and $object[not(@role) or @role!='tex']">
-              <xsl:text>1</xsl:text>
-            </xsl:when>
-            <!-- don't use graphic when output is FO, TeX Math is used 
-                 and there is math in alt element -->
-            <xsl:when test="$object/ancestor::equation and 
-                            $object/ancestor::equation/alt[@role='tex']
-                            and $stylesheet.result.type = 'fo'
-                            and $tex.math.in.alt != ''">
-              <xsl:text>0</xsl:text>
-            </xsl:when>
-            <!-- If there's only one object, use it -->
-            <xsl:when test="$count = 1 and count($olist) = 1">
-               <xsl:text>1</xsl:text>
-            </xsl:when>
-            <!-- Otherwise, see if this one is a useable graphic -->
-            <xsl:otherwise>
-              <xsl:choose>
-                <!-- peek inside imageobjectco to simplify the test -->
-                <xsl:when test="local-name($object) = 'imageobjectco'">
-                  <xsl:call-template name="is.acceptable.mediaobject">
-                    <xsl:with-param name="object" select="$object/imageobject"/>
-                  </xsl:call-template>
-                </xsl:when>
-                <xsl:otherwise>
-                  <xsl:call-template name="is.acceptable.mediaobject">
-                    <xsl:with-param name="object" select="$object"/>
-                  </xsl:call-template>
-                </xsl:otherwise>
-              </xsl:choose>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:variable>
-    
-        <xsl:choose>
-          <xsl:when test="$useobject='1'">
-            <xsl:value-of select="$count"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:call-template name="select.mediaobject.index">
-              <xsl:with-param name="olist" select="$olist"/>
-              <xsl:with-param name="count" select="$count + 1"/>
-            </xsl:call-template>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:if>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<doc:template name="is.acceptable.mediaobject" xmlns="">
-<refpurpose>Returns '1' if the specified media object is recognized</refpurpose>
-
-<refdescription id="is.acceptable.mediaobject-desc">
-<para>This template examines a media object and returns '1' if the
-object is recognized as a graphic.</para>
-</refdescription>
-
-<refparameter id="is.acceptable.mediaobject-params">
-<variablelist>
-<varlistentry><term>object</term>
-<listitem>
-<para>The media object to consider.</para>
-</listitem>
-</varlistentry>
-</variablelist>
-</refparameter>
-
-<refreturn id="is.acceptable.mediaobject-returns">
-<para>0 or 1</para>
-</refreturn>
-</doc:template>
-
-<xsl:template name="is.acceptable.mediaobject">
-  <xsl:param name="object"></xsl:param>
-
-  <xsl:variable name="filename">
-    <xsl:call-template name="mediaobject.filename">
-      <xsl:with-param name="object" select="$object"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="ext">
-    <xsl:call-template name="filename-extension">
-      <xsl:with-param name="filename" select="$filename"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <!-- there will only be one -->
-  <xsl:variable name="data" select="$object/videodata
-                                    |$object/imagedata
-                                    |$object/audiodata"/>
-
-  <xsl:variable name="format" select="$data/@format"/>
-
-  <xsl:variable name="graphic.format">
-    <xsl:if test="$format">
-      <xsl:call-template name="is.graphic.format">
-        <xsl:with-param name="format" select="$format"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="graphic.ext">
-    <xsl:if test="$ext">
-      <xsl:call-template name="is.graphic.extension">
-        <xsl:with-param name="ext" select="$ext"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$use.svg = 0 and $format = 'SVG'">0</xsl:when>
-    <xsl:when xmlns:svg="http://www.w3.org/2000/svg"
-              test="$use.svg != 0 and $object/svg:*">1</xsl:when>
-    <xsl:when test="$graphic.format = '1'">1</xsl:when>
-    <xsl:when test="$graphic.ext = '1'">1</xsl:when>
-    <xsl:otherwise>0</xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="mediaobject.filename">
-  <xsl:param name="object"></xsl:param>
-
-  <xsl:variable name="data" select="$object/videodata
-                                    |$object/imagedata
-                                    |$object/audiodata
-                                    |$object"/>
-
-  <xsl:variable name="filename">
-    <xsl:choose>
-      <xsl:when test="$data[@fileref]">
-        <xsl:apply-templates select="$data/@fileref"/>
-      </xsl:when>
-      <xsl:when test="$data[@entityref]">
-        <xsl:value-of select="unparsed-entity-uri($data/@entityref)"/>
-      </xsl:when>
-      <xsl:otherwise></xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="real.ext">
-    <xsl:call-template name="filename-extension">
-      <xsl:with-param name="filename" select="$filename"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="ext">
-    <xsl:choose>
-      <xsl:when test="$real.ext != ''">
-        <xsl:value-of select="$real.ext"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$graphic.default.extension"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="graphic.ext">
-    <xsl:call-template name="is.graphic.extension">
-      <xsl:with-param name="ext" select="$ext"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$real.ext = ''">
-      <xsl:choose>
-        <xsl:when test="$ext != ''">
-          <xsl:value-of select="$filename"/>
-          <xsl:text>.</xsl:text>
-          <xsl:value-of select="$ext"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="$filename"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:when test="not($graphic.ext)">
-      <xsl:choose>
-        <xsl:when test="$graphic.default.extension != ''">
-          <xsl:value-of select="$filename"/>
-          <xsl:text>.</xsl:text>
-          <xsl:value-of select="$graphic.default.extension"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="$filename"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$filename"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ====================================================================== -->
-
-<doc:template name="check.id.unique" xmlns="">
-<refpurpose>Warn users about references to non-unique IDs</refpurpose>
-<refdescription id="check.id.unique-desc">
-<para>If passed an ID in <varname>linkend</varname>,
-<function>check.id.unique</function> prints
-a warning message to the user if either the ID does not exist or
-the ID is not unique.</para>
-</refdescription>
-</doc:template>
-
-<xsl:template name="check.id.unique">
-  <xsl:param name="linkend"></xsl:param>
-  <xsl:if test="$linkend != ''">
-    <xsl:variable name="targets" select="key('id',$linkend)"/>
-    <xsl:variable name="target" select="$targets[1]"/>
-
-    <xsl:if test="count($targets)=0">
-      <xsl:message>
-        <xsl:text>Error: no ID for constraint linkend: </xsl:text>
-        <xsl:value-of select="$linkend"/>
-        <xsl:text>.</xsl:text>
-      </xsl:message>
-      <!--
-      <xsl:message>
-        <xsl:text>If the ID exists in your document, did your </xsl:text>
-        <xsl:text>XSLT Processor load the DTD?</xsl:text>
-      </xsl:message>
-      -->
-    </xsl:if>
-
-    <xsl:if test="count($targets)>1">
-      <xsl:message>
-        <xsl:text>Warning: multiple "IDs" for constraint linkend: </xsl:text>
-        <xsl:value-of select="$linkend"/>
-        <xsl:text>.</xsl:text>
-      </xsl:message>
-    </xsl:if>
-  </xsl:if>
-</xsl:template>
-
-<doc:template name="check.idref.targets" xmlns="">
-<refpurpose>Warn users about incorrectly typed references</refpurpose>
-<refdescription id="check.idref.targets-desc">
-<para>If passed an ID in <varname>linkend</varname>,
-<function>check.idref.targets</function> makes sure that the element
-pointed to by the link is one of the elements listed in
-<varname>element-list</varname> and warns the user otherwise.</para>
-</refdescription>
-</doc:template>
-
-<xsl:template name="check.idref.targets">
-  <xsl:param name="linkend"></xsl:param>
-  <xsl:param name="element-list"></xsl:param>
-  <xsl:if test="$linkend != ''">
-    <xsl:variable name="targets" select="key('id',$linkend)"/>
-    <xsl:variable name="target" select="$targets[1]"/>
-
-    <xsl:if test="count($target) &gt; 0">
-      <xsl:if test="not(contains(concat(' ', $element-list, ' '), local-name($target)))">
-        <xsl:message>
-          <xsl:text>Error: linkend (</xsl:text>
-          <xsl:value-of select="$linkend"/>
-          <xsl:text>) points to "</xsl:text>
-          <xsl:value-of select="local-name($target)"/>
-          <xsl:text>" not (one of): </xsl:text>
-          <xsl:value-of select="$element-list"/>
-        </xsl:message>
-      </xsl:if>
-    </xsl:if>
-  </xsl:if>
-</xsl:template>
-
-<!-- ====================================================================== -->
-<!-- Procedure Step Numeration -->
-
-<xsl:param name="procedure.step.numeration.formats" select="'1aiAI'"/>
-
-<xsl:template name="procedure.step.numeration">
-  <xsl:param name="context" select="."/>
-  <xsl:variable name="format.length"
-                select="string-length($procedure.step.numeration.formats)"/>
-  <xsl:choose>
-    <xsl:when test="local-name($context) = 'substeps'">
-      <xsl:variable name="ssdepth"
-                    select="count($context/ancestor::substeps)"/>
-      <xsl:variable name="sstype" select="($ssdepth mod $format.length)+2"/>
-      <xsl:choose>
-        <xsl:when test="$sstype &gt; $format.length">
-          <xsl:value-of select="substring($procedure.step.numeration.formats,1,1)"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="substring($procedure.step.numeration.formats,$sstype,1)"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:when test="local-name($context) = 'step'">
-      <xsl:variable name="sdepth"
-                    select="count($context/ancestor::substeps)"/>
-      <xsl:variable name="stype" select="($sdepth mod $format.length)+1"/>
-      <xsl:value-of select="substring($procedure.step.numeration.formats,$stype,1)"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:message>
-        <xsl:text>Unexpected context in procedure.step.numeration: </xsl:text>
-        <xsl:value-of select="local-name($context)"/>
-      </xsl:message>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="step" mode="number">
-  <xsl:param name="rest" select="''"/>
-  <xsl:param name="recursive" select="1"/>
-  <xsl:variable name="format">
-    <xsl:call-template name="procedure.step.numeration"/>
-  </xsl:variable>
-  <xsl:variable name="num">
-    <xsl:number count="step" format="{$format}"/>
-  </xsl:variable>
-  <xsl:choose>
-    <xsl:when test="$recursive != 0 and ancestor::step">
-      <xsl:apply-templates select="ancestor::step[1]" mode="number">
-        <xsl:with-param name="rest" select="concat('.', $num, $rest)"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="concat($num, $rest)"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ====================================================================== -->
-<!-- OrderedList Numeration -->
-<xsl:template name="output-orderedlist-starting-number">
-  <xsl:param name="list"/>
-  <xsl:param name="pi-start"/>
-  <xsl:choose>
-    <xsl:when test="not($list/@continuation = 'continues')">
-      <xsl:choose>
-        <xsl:when test="@startingnumber">
-          <xsl:value-of select="@startingnumber"/>
-        </xsl:when>
-        <xsl:when test="$pi-start != ''">
-          <xsl:value-of select="$pi-start"/>
-        </xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:variable name="prevlist"
-        select="$list/preceding::orderedlist[1]"/>
-      <xsl:choose>
-        <xsl:when test="count($prevlist) = 0">2</xsl:when>
-        <xsl:otherwise>
-          <xsl:variable name="prevlength" select="count($prevlist/listitem)"/>
-          <xsl:variable name="prevstart">
-            <xsl:call-template name="orderedlist-starting-number">
-              <xsl:with-param name="list" select="$prevlist"/>
-            </xsl:call-template>
-          </xsl:variable>
-          <xsl:value-of select="$prevstart + $prevlength"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="orderedlist-item-number">
-  <!-- context node must be a listitem in an orderedlist -->
-  <xsl:param name="node" select="."/>
-  <xsl:choose>
-    <xsl:when test="$node/@override">
-      <xsl:value-of select="$node/@override"/>
-    </xsl:when>
-    <xsl:when test="$node/preceding-sibling::listitem">
-      <xsl:variable name="pnum">
-        <xsl:call-template name="orderedlist-item-number">
-          <xsl:with-param name="node" select="$node/preceding-sibling::listitem[1]"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:value-of select="$pnum + 1"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="orderedlist-starting-number">
-        <xsl:with-param name="list" select="parent::*"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="next.numeration">
-  <xsl:param name="numeration" select="'default'"/>
-  <xsl:choose>
-    <!-- Change this list if you want to change the order of numerations -->
-    <xsl:when test="$numeration = 'arabic'">loweralpha</xsl:when>
-    <xsl:when test="$numeration = 'loweralpha'">lowerroman</xsl:when>
-    <xsl:when test="$numeration = 'lowerroman'">upperalpha</xsl:when>
-    <xsl:when test="$numeration = 'upperalpha'">upperroman</xsl:when>
-    <xsl:when test="$numeration = 'upperroman'">arabic</xsl:when>
-    <xsl:otherwise>arabic</xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="list.numeration">
-  <xsl:param name="node" select="."/>
-
-  <xsl:choose>
-    <xsl:when test="$node/@numeration">
-      <xsl:value-of select="$node/@numeration"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="$node/ancestor::orderedlist">
-          <xsl:call-template name="next.numeration">
-            <xsl:with-param name="numeration">
-              <xsl:call-template name="list.numeration">
-                <xsl:with-param name="node" select="$node/ancestor::orderedlist[1]"/>
-              </xsl:call-template>
-            </xsl:with-param>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="next.numeration"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ====================================================================== -->
-<!-- ItemizedList "Numeration" -->
-
-<xsl:template name="next.itemsymbol">
-  <xsl:param name="itemsymbol" select="'default'"/>
-  <xsl:choose>
-    <!-- Change this list if you want to change the order of symbols -->
-    <xsl:when test="$itemsymbol = 'disc'">circle</xsl:when>
-    <xsl:when test="$itemsymbol = 'circle'">square</xsl:when>
-    <xsl:otherwise>disc</xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="list.itemsymbol">
-  <xsl:param name="node" select="."/>
-
-  <xsl:choose>
-    <xsl:when test="@override">
-      <xsl:value-of select="@override"/>
-    </xsl:when>
-    <xsl:when test="$node/@mark">
-      <xsl:value-of select="$node/@mark"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="$node/ancestor::itemizedlist">
-          <xsl:call-template name="next.itemsymbol">
-            <xsl:with-param name="itemsymbol">
-              <xsl:call-template name="list.itemsymbol">
-                <xsl:with-param name="node" select="$node/ancestor::itemizedlist[1]"/>
-              </xsl:call-template>
-            </xsl:with-param>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="next.itemsymbol"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ====================================================================== -->
-
-<doc:template name="copyright.years" xmlns="">
-<refpurpose>Print a set of years with collapsed ranges</refpurpose>
-
-<refdescription id="copyright.years-desc">
-<para>This template prints a list of year elements with consecutive
-years printed as a range. In other words:</para>
-
-<screen><![CDATA[<year>1992</year>
-<year>1993</year>
-<year>1994</year>]]></screen>
-
-<para>is printed <quote>1992-1994</quote>, whereas:</para>
-
-<screen><![CDATA[<year>1992</year>
-<year>1994</year>]]></screen>
-
-<para>is printed <quote>1992, 1994</quote>.</para>
-
-<para>This template assumes that all the year elements contain only
-decimal year numbers, that the elements are sorted in increasing
-numerical order, that there are no duplicates, and that all the years
-are expressed in full <quote>century+year</quote>
-(<quote>1999</quote> not <quote>99</quote>) notation.</para>
-</refdescription>
-
-<refparameter id="copyright.years-params">
-<variablelist>
-<varlistentry><term>years</term>
-<listitem>
-<para>The initial set of year elements.</para>
-</listitem>
-</varlistentry>
-<varlistentry><term>print.ranges</term>
-<listitem>
-<para>If non-zero, multi-year ranges are collapsed. If zero, all years
-are printed discretely.</para>
-</listitem>
-</varlistentry>
-<varlistentry><term>single.year.ranges</term>
-<listitem>
-<para>If non-zero, two consecutive years will be printed as a range,
-otherwise, they will be printed discretely. In other words, a single
-year range is <quote>1991-1992</quote> but discretely it's
-<quote>1991, 1992</quote>.</para>
-</listitem>
-</varlistentry>
-</variablelist>
-</refparameter>
-
-<refreturn id="copyright.years-returns">
-<para>This template returns the formatted list of years.</para>
-</refreturn>
-</doc:template>
-
-<xsl:template name="copyright.years">
-  <xsl:param name="years"/>
-  <xsl:param name="print.ranges" select="1"/>
-  <xsl:param name="single.year.ranges" select="0"/>
-  <xsl:param name="firstyear" select="0"/>
-  <xsl:param name="nextyear" select="0"/>
-
-  <!--
-  <xsl:message terminate="no">
-    <xsl:text>CY: </xsl:text>
-    <xsl:value-of select="count($years)"/>
-    <xsl:text>, </xsl:text>
-    <xsl:value-of select="$firstyear"/>
-    <xsl:text>, </xsl:text>
-    <xsl:value-of select="$nextyear"/>
-    <xsl:text>, </xsl:text>
-    <xsl:value-of select="$print.ranges"/>
-    <xsl:text>, </xsl:text>
-    <xsl:value-of select="$single.year.ranges"/>
-    <xsl:text> (</xsl:text>
-    <xsl:value-of select="$years[1]"/>
-    <xsl:text>)</xsl:text>
-  </xsl:message>
-  -->
-
-  <xsl:choose>
-    <xsl:when test="$print.ranges = 0 and count($years) &gt; 0">
-      <xsl:choose>
-        <xsl:when test="count($years) = 1">
-          <xsl:apply-templates select="$years[1]" mode="titlepage.mode"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates select="$years[1]" mode="titlepage.mode"/>
-          <xsl:text>, </xsl:text>
-          <xsl:call-template name="copyright.years">
-            <xsl:with-param name="years"
-                            select="$years[position() &gt; 1]"/>
-            <xsl:with-param name="print.ranges" select="$print.ranges"/>
-            <xsl:with-param name="single.year.ranges"
-                            select="$single.year.ranges"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:when test="count($years) = 0">
-      <xsl:variable name="lastyear" select="$nextyear - 1"/>
-      <xsl:choose>
-        <xsl:when test="$firstyear = 0">
-          <!-- there weren't any years at all -->
-        </xsl:when>
-        <xsl:when test="$firstyear = $lastyear">
-          <xsl:value-of select="$firstyear"/>
-        </xsl:when>
-        <xsl:when test="$single.year.ranges = 0
-                        and $lastyear = $firstyear + 1">
-          <xsl:value-of select="$firstyear"/>
-          <xsl:text>, </xsl:text>
-          <xsl:value-of select="$lastyear"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="$firstyear"/>
-          <xsl:text>-</xsl:text>
-          <xsl:value-of select="$lastyear"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:when test="$firstyear = 0">
-      <xsl:call-template name="copyright.years">
-        <xsl:with-param name="years"
-                        select="$years[position() &gt; 1]"/>
-        <xsl:with-param name="firstyear" select="$years[1]"/>
-        <xsl:with-param name="nextyear" select="$years[1] + 1"/>
-        <xsl:with-param name="print.ranges" select="$print.ranges"/>
-        <xsl:with-param name="single.year.ranges"
-                        select="$single.year.ranges"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="$nextyear = $years[1]">
-      <xsl:call-template name="copyright.years">
-        <xsl:with-param name="years"
-                        select="$years[position() &gt; 1]"/>
-        <xsl:with-param name="firstyear" select="$firstyear"/>
-        <xsl:with-param name="nextyear" select="$nextyear + 1"/>
-        <xsl:with-param name="print.ranges" select="$print.ranges"/>
-        <xsl:with-param name="single.year.ranges"
-                        select="$single.year.ranges"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <!-- we have years left, but they aren't in the current range -->
-      <xsl:choose>
-        <xsl:when test="$nextyear = $firstyear + 1">
-          <xsl:value-of select="$firstyear"/>
-          <xsl:text>, </xsl:text>
-        </xsl:when>
-        <xsl:when test="$single.year.ranges = 0
-                        and $nextyear = $firstyear + 2">
-          <xsl:value-of select="$firstyear"/>
-          <xsl:text>, </xsl:text>
-          <xsl:value-of select="$nextyear - 1"/>
-          <xsl:text>, </xsl:text>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="$firstyear"/>
-          <xsl:text>-</xsl:text>
-          <xsl:value-of select="$nextyear - 1"/>
-          <xsl:text>, </xsl:text>
-        </xsl:otherwise>
-      </xsl:choose>
-      <xsl:call-template name="copyright.years">
-        <xsl:with-param name="years"
-                        select="$years[position() &gt; 1]"/>
-        <xsl:with-param name="firstyear" select="$years[1]"/>
-        <xsl:with-param name="nextyear" select="$years[1] + 1"/>
-        <xsl:with-param name="print.ranges" select="$print.ranges"/>
-        <xsl:with-param name="single.year.ranges"
-                        select="$single.year.ranges"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ====================================================================== -->
-
-<doc:template name="find.path.params" xmlns="">
-<refpurpose>Search in a table for the "best" match for the node</refpurpose>
-
-<refdescription id="find.path.params-desc">
-<para>This template searches in a table for the value that most-closely
-(in the typical best-match sense of XSLT) matches the current (element)
-node location.</para>
-</refdescription>
-</doc:template>
-
-<xsl:template name="find.path.params">
-  <xsl:param name="node" select="."/>
-  <xsl:param name="table" select="''"/>
-  <xsl:param name="location">
-    <xsl:call-template name="xpath.location">
-      <xsl:with-param name="node" select="$node"/>
-    </xsl:call-template>
-  </xsl:param>
-
-  <xsl:variable name="value">
-    <xsl:call-template name="lookup.key">
-      <xsl:with-param name="key" select="$location"/>
-      <xsl:with-param name="table" select="$table"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$value != ''">
-      <xsl:value-of select="$value"/>
-    </xsl:when>
-    <xsl:when test="contains($location, '/')">
-      <xsl:call-template name="find.path.params">
-        <xsl:with-param name="node" select="$node"/>
-        <xsl:with-param name="table" select="$table"/>
-        <xsl:with-param name="location" select="substring-after($location, '/')"/>
-      </xsl:call-template>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="relative-uri">
-  <xsl:param name="filename" select="."/>
-  <xsl:param name="destdir" select="''"/>
-  
-  <xsl:variable name="srcurl">
-    <xsl:call-template name="strippath">
-      <xsl:with-param name="filename">
-        <xsl:call-template name="xml.base.dirs">
-          <xsl:with-param name="base.elem" 
-                          select="$filename/ancestor-or-self::*
-                                   [@xml:base != ''][1]"/>
-        </xsl:call-template>
-        <xsl:value-of select="$filename"/>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="srcurl.trimmed">
-    <xsl:call-template name="trim.common.uri.paths">
-      <xsl:with-param name="uriA" select="$srcurl"/>
-      <xsl:with-param name="uriB" select="$destdir"/>
-      <xsl:with-param name="return" select="'A'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="destdir.trimmed">
-    <xsl:call-template name="trim.common.uri.paths">
-      <xsl:with-param name="uriA" select="$srcurl"/>
-      <xsl:with-param name="uriB" select="$destdir"/>
-      <xsl:with-param name="return" select="'B'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="depth">
-    <xsl:call-template name="count.uri.path.depth">
-      <xsl:with-param name="filename" select="$destdir.trimmed"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:call-template name="copy-string">
-    <xsl:with-param name="string" select="'../'"/>
-    <xsl:with-param name="count" select="$depth"/>
-  </xsl:call-template>
-  <xsl:value-of select="$srcurl.trimmed"/>
-
-</xsl:template>
-
-<!-- ===================================== -->
-
-<xsl:template name="xml.base.dirs">
-  <xsl:param name="base.elem" select="NONODE"/>
-
-  <!-- Recursively resolve xml:base attributes, up to a 
-       full path with : in uri -->
-  <xsl:if test="$base.elem/ancestor::*[@xml:base != ''] and
-                not(contains($base.elem/@xml:base, ':'))">
-    <xsl:call-template name="xml.base.dirs">
-      <xsl:with-param name="base.elem" 
-                      select="$base.elem/ancestor::*[@xml:base != ''][1]"/>
-    </xsl:call-template>
-  </xsl:if>
-  <xsl:call-template name="getdir">
-    <xsl:with-param name="filename" select="$base.elem/@xml:base"/>
-  </xsl:call-template>
-
-</xsl:template>
-
-<!-- ===================================== -->
-
-<xsl:template name="strippath">
-  <xsl:param name="filename" select="''"/>
-  <xsl:choose>
-    <!-- Leading .. are not eliminated -->
-    <xsl:when test="starts-with($filename, '../')">
-      <xsl:value-of select="'../'"/>
-      <xsl:call-template name="strippath">
-        <xsl:with-param name="filename" select="substring-after($filename, '../')"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="contains($filename, '/../')">
-      <xsl:call-template name="strippath">
-        <xsl:with-param name="filename">
-          <xsl:call-template name="getdir">
-            <xsl:with-param name="filename" select="substring-before($filename, '/../')"/>
-          </xsl:call-template>
-          <xsl:value-of select="substring-after($filename, '/../')"/>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$filename"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ===================================== -->
-
-<xsl:template name="getdir">
-  <xsl:param name="filename" select="''"/>
-  <xsl:if test="contains($filename, '/')">
-    <xsl:value-of select="substring-before($filename, '/')"/>
-    <xsl:text>/</xsl:text>
-    <xsl:call-template name="getdir">
-      <xsl:with-param name="filename" select="substring-after($filename, '/')"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<!-- ===================================== -->
-
-<doc:template name="string.upper" xmlns="">
-<refpurpose>Converts a string to all uppercase letters</refpurpose>
-
-<refdescription id="string.upper-desc">
-<para>Given a string, this template does a language-aware conversion
-of that string to all uppercase letters, based on the values of the
-<literal>lowercase.alpha</literal> and
-<literal>uppercase.alpha</literal> gentext keys for the current
-locale. It affects only those characters found in the values of
-<literal>lowercase.alpha</literal> and
-<literal>uppercase.alpha</literal>. All other characters are left
-unchanged.</para>
-</refdescription>
-
-<refparameter id="string.upper-params">
-<variablelist>
-<varlistentry><term>string</term>
-<listitem>
-<para>The string to convert to uppercase.</para>
-</listitem>
-</varlistentry>
-</variablelist>
-</refparameter>
-</doc:template>
-<xsl:template name="string.upper">
-  <xsl:param name="string" select="''"/>
-  <xsl:variable name="lowercase.alpha">
-    <xsl:call-template name="gentext">
-      <xsl:with-param name="key" select="'lowercase.alpha'"/>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:variable name="uppercase.alpha">
-    <xsl:call-template name="gentext">
-      <xsl:with-param name="key" select="'uppercase.alpha'"/>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:value-of select="translate($string,$lowercase.alpha,$uppercase.alpha)"/>
-</xsl:template>
-
-<!-- ===================================== -->
-
-<doc:template name="string.lower" xmlns="">
-<refpurpose>Converts a string to all lowercase letters</refpurpose>
-
-<refdescription id="string.lower-desc">
-<para>Given a string, this template does a language-aware conversion
-of that string to all lowercase letters, based on the values of the
-<literal>uppercase.alpha</literal> and
-<literal>lowercase.alpha</literal> gentext keys for the current
-locale. It affects only those characters found in the values of
-<literal>uppercase.alpha</literal> and
-<literal>lowercase.alpha</literal>. All other characters are left
-unchanged.</para>
-</refdescription>
-
-<refparameter id="string.lower-params">
-<variablelist>
-<varlistentry><term>string</term>
-<listitem>
-<para>The string to convert to lowercase.</para>
-</listitem>
-</varlistentry>
-</variablelist>
-</refparameter>
-</doc:template>
-<xsl:template name="string.lower">
-  <xsl:param name="string" select="''"/>
-  <xsl:variable name="uppercase.alpha">
-    <xsl:call-template name="gentext">
-      <xsl:with-param name="key" select="'uppercase.alpha'"/>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:variable name="lowercase.alpha">
-    <xsl:call-template name="gentext">
-      <xsl:with-param name="key" select="'lowercase.alpha'"/>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:value-of select="translate($string,$uppercase.alpha,$lowercase.alpha)"/>
-</xsl:template>
-
-<!-- ===================================== -->
-
-<doc:template name="select.choice.separator" xmlns="">
-  <refpurpose>Returns localized choice separator</refpurpose>
-  <refdescription id="select.choice.separator-desc">
-    <para>This template enables auto-generation of an appropriate
-    localized "choice" separator (for example, "and" or "or") before
-    the final item in an inline list (though it could also be useful
-    for generating choice separators for non-inline lists).</para>
-    <para>It currently works by evaluating a processing instruction
-    (PI) of the form &lt;?dbchoice&#xa0;choice="foo"?> :
-    <itemizedlist>
-      <listitem>
-        <simpara>if the value of the <tag>choice</tag>
-        pseudo-attribute is "and" or "or", returns a localized "and"
-        or "or"</simpara>
-      </listitem>
-      <listitem>
-        <simpara>otherwise returns the literal value of the
-        <tag>choice</tag> pseudo-attribute</simpara>
-      </listitem>
-    </itemizedlist>
-    The latter is provided only as a temporary workaround because the
-    locale files do not currently have translations for the word
-    <wordasword>or</wordasword>. So if you want to generate a a
-    logical "or" separator in French (for example), you currently need
-    to do this:
-    <literallayout>&lt;?dbchoice choice="ou"?></literallayout>
-    </para>
-    <warning>
-      <para>The <tag>dbchoice</tag> processing instruction is
-      an unfortunate hack; support for it may disappear in the future
-      (particularly if and when a more appropriate means for marking
-      up "choice" lists becomes available in DocBook).</para>
-    </warning>
-  </refdescription>
-</doc:template>
-<xsl:template name="select.choice.separator">
-  <xsl:variable name="choice">
-    <xsl:call-template name="pi.dbchoice_choice"/>
-  </xsl:variable>
-  <xsl:choose>
-    <!-- if value of $choice is "and" or "or", translate to equivalent in -->
-    <!-- current locale -->
-    <xsl:when test="$choice = 'and' or $choice = 'or'">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="$choice"/>
-      </xsl:call-template>
-    </xsl:when>
-    <!--  otherwise, just output value of $choice, whatever it is -->
-    <xsl:otherwise>
-      <xsl:value-of select="$choice"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ===================================== -->
-
-<doc:template name="evaluate.info.profile" xmlns="">
-  <refpurpose>Evaluates an info profile</refpurpose>
-  <refdescription id="evaluate.info.profile-desc">
-    <para>This template evaluates an "info profile" matching the XPath
-    expression given by the <parameter>profile</parameter>
-    parameter. It relies on the XSLT <function>evaluate()</function>
-    extension function.</para>
-
-    <para>The value of the <parameter>profile</parameter> parameter
-    can include the literal string <literal>$info</literal>. If found
-    in the value of the <parameter>profile</parameter> parameter, the
-    literal string <literal>$info</literal> string is replaced with
-    the value of the <parameter>info</parameter> parameter, which
-    should be a set of <replaceable>*info</replaceable> nodes; the
-    expression is then evaluated using the XSLT
-    <function>evaluate()</function> extension function.</para>
-  </refdescription>
-  <refparameter id="evaluate.info.profile-params">
-    <variablelist>
-       <varlistentry>
-        <term>profile</term>
-        <listitem>
-          <para>A string representing an XPath expression </para>
-        </listitem>
-      </varlistentry>
-       <varlistentry>
-        <term>info</term>
-        <listitem>
-          <para>A set of *info nodes</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-
-  <refreturn id="evaluate.info.profile-returns">
-    <para>Returns a node (the result of evaluating the
-    <parameter>profile</parameter> parameter)</para>
-  </refreturn>
-</doc:template>
-  <xsl:template name="evaluate.info.profile">
-    <xsl:param name="profile"/>
-    <xsl:param name="info"/>
-    <xsl:choose>
-      <!-- * xsltproc and Xalan both support dyn:evaluate() -->
-      <xsl:when test="function-available('dyn:evaluate')">
-        <xsl:apply-templates
-            select="dyn:evaluate($profile)" mode="get.refentry.metadata"/>
-      </xsl:when>
-      <!-- * Saxon has its own evaluate() & doesn't support dyn:evaluate() -->
-      <xsl:when test="function-available('saxon:evaluate')">
-        <xsl:apply-templates
-            select="saxon:evaluate($profile)" mode="get.refentry.metadata"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:message terminate="yes">
-Error: The "info profiling" mechanism currently requires an XSLT
-engine that supports the evaluate() XSLT extension function. Your XSLT
-engine does not support it.
-</xsl:message>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/de.xml
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/de.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,669 +1,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="de" english-language-name="German">
-
-<!-- * This file is generated automatically. -->
-<!-- * To submit changes to this file upstream (to the DocBook Project) -->
-<!-- * do not submit an edited version of this file. Instead, submit an -->
-<!-- * edited version of the source file at the following location: -->
-<!-- * -->
-<!-- *  https://svn.sourceforge.net/svnroot/docbook/trunk/gentext/locale/de.xml -->
-<!-- * -->
-<!-- * E-mail the edited de.xml source file to: -->
-<!-- * -->
-<!-- *  docbook-developers@lists.sourceforge.net -->
-
-<!-- ******************************************************************** -->
-
-<!-- This file is part of the XSL DocBook Stylesheet distribution. -->
-<!-- See ../README or http://docbook.sf.net/release/xsl/current/ for -->
-<!-- copyright and other information. -->
-
-<!-- ******************************************************************** -->
-<!-- In these files, % with a letter is used for a placeholder: -->
-<!--   %t is the current element's title -->
-<!--   %s is the current element's subtitle (if applicable)-->
-<!--   %n is the current element's number label-->
-<!--   %p is the current element's page number (if applicable)-->
-<!-- ******************************************************************** -->
-
-
-<l:gentext key="Abstract" text="Zusammenfassung"/>
-<l:gentext key="abstract" text="Zusammenfassung"/>
-<l:gentext key="Answer" text="A:"/>
-<l:gentext key="answer" text="A:"/>
-<l:gentext key="Appendix" text="Anhang"/>
-<l:gentext key="appendix" text="Anhang"/>
-<l:gentext key="Article" text="Artikel"/>
-<l:gentext key="article" text="Artikel"/>
-<l:gentext key="Author" text="Autor"/>
-<l:gentext key="Bibliography" text="Literaturverzeichnis"/>
-<l:gentext key="bibliography" text="Literaturverzeichnis"/>
-<l:gentext key="Book" text="Buch"/>
-<l:gentext key="book" text="Buch"/>
-<l:gentext key="CAUTION" text="ACHTUNG"/>
-<l:gentext key="Caution" text="Achtung"/>
-<l:gentext key="caution" text="Achtung"/>
-<l:gentext key="Chapter" text="Kapitel"/>
-<l:gentext key="chapter" text="Kapitel"/>
-<l:gentext key="Colophon" text="Kolophon"/>
-<l:gentext key="colophon" text="Kolophon"/>
-<l:gentext key="Copyright" text="Copyright"/>
-<l:gentext key="copyright" text="Copyright"/>
-<l:gentext key="Dedication" text="Widmung"/>
-<l:gentext key="dedication" text="Widmung"/>
-<l:gentext key="Edition" text="Ausgabe"/>
-<l:gentext key="edition" text="Ausgabe"/>
-<l:gentext key="Editor" text="Editor" lang="en"/>
-<l:gentext key="Equation" text="Gleichung"/>
-<l:gentext key="equation" text="Gleichung"/>
-<l:gentext key="Example" text="Beispiel"/>
-<l:gentext key="example" text="Beispiel"/>
-<l:gentext key="Figure" text="Abbildung"/>
-<l:gentext key="figure" text="Abbildung"/>
-<l:gentext key="Glossary" text="Glossar"/>
-<l:gentext key="glossary" text="Glossar"/>
-<l:gentext key="GlossSee" text="Siehe"/>
-<l:gentext key="glosssee" text="Siehe"/>
-<l:gentext key="GlossSeeAlso" text="Siehe auch"/>
-<l:gentext key="glossseealso" text="Siehe auch"/>
-<l:gentext key="IMPORTANT" text="WICHTIG"/>
-<l:gentext key="important" text="Wichtig"/>
-<l:gentext key="Important" text="Wichtig"/>
-<l:gentext key="Index" text="Stichwortverzeichnis"/>
-<l:gentext key="index" text="Stichwortverzeichnis"/>
-<l:gentext key="ISBN" text="ISBN"/>
-<l:gentext key="isbn" text="ISBN"/>
-<l:gentext key="LegalNotice" text="Rechtlicher Hinweis"/>
-<l:gentext key="legalnotice" text="Rechtlicher Hinweis"/>
-<l:gentext key="MsgAud" text="Zielgruppe"/>
-<l:gentext key="msgaud" text="Zielgruppe"/>
-<l:gentext key="MsgLevel" text="Dringlichkeit"/>
-<l:gentext key="msglevel" text="Dringlichkeit"/>
-<l:gentext key="MsgOrig" text="Ursprung"/>
-<l:gentext key="msgorig" text="Ursprung"/>
-<l:gentext key="NOTE" text="ANMERKUNG"/>
-<l:gentext key="Note" text="Anmerkung"/>
-<l:gentext key="note" text="Anmerkung"/>
-<l:gentext key="Part" text="Teil"/>
-<l:gentext key="part" text="Teil"/>
-<l:gentext key="Preface" text="Vorwort"/>
-<l:gentext key="preface" text="Vorwort"/>
-<l:gentext key="Procedure" text="Prozedur"/>
-<l:gentext key="procedure" text="Prozedur"/>
-<l:gentext key="ProductionSet" text="Produktion"/>
-<l:gentext key="PubDate" text="VerÃ¶ffentlicht"/>
-<l:gentext key="pubdate" text="VerÃ¶ffentlicht"/>
-<l:gentext key="Published" text="VerÃ¶ffentlicht"/>
-<l:gentext key="published" text="VerÃ¶ffentlicht"/>
-<l:gentext key="Publisher" text="Publisher" lang="en"/>
-<l:gentext key="Qandadiv" text="F &amp; A"/>
-<l:gentext key="qandadiv" text="F &amp; A"/>
-<l:gentext key="QandASet" text="Frequently Asked Questions" lang="en"/>
-<l:gentext key="Question" text="F:"/>
-<l:gentext key="question" text="F:"/>
-<l:gentext key="RefEntry" text=""/>
-<l:gentext key="refentry" text=""/>
-<l:gentext key="Reference" text="Verweis"/>
-<l:gentext key="reference" text="Verweis"/>
-<l:gentext key="References" text="References" lang="en"/>
-<l:gentext key="RefName" text="Name"/>
-<l:gentext key="refname" text="Name"/>
-<l:gentext key="RefSection" text="Abschnitt"/>
-<l:gentext key="refsection" text="Abschnitt"/>
-<l:gentext key="RefSynopsisDiv" text="Synopsis"/>
-<l:gentext key="refsynopsisdiv" text="Synopsis"/>
-<l:gentext key="RevHistory" text="Versionsgeschichte"/>
-<l:gentext key="revhistory" text="Versionsgeschichte"/>
-<l:gentext key="revision" text="Version"/>
-<l:gentext key="Revision" text="Version"/>
-<l:gentext key="sect1" text="Abschnitt"/>
-<l:gentext key="sect2" text="Abschnitt"/>
-<l:gentext key="sect3" text="Abschnitt"/>
-<l:gentext key="sect4" text="Abschnitt"/>
-<l:gentext key="sect5" text="Abschnitt"/>
-<l:gentext key="section" text="Abschnitt"/>
-<l:gentext key="Section" text="Abschnitt"/>
-<l:gentext key="see" text="Siehe"/>
-<l:gentext key="See" text="Siehe"/>
-<l:gentext key="seealso" text="Siehe auch"/>
-<l:gentext key="Seealso" text="Siehe auch"/>
-<l:gentext key="SeeAlso" text="Siehe auch"/>
-<l:gentext key="set" text="Satz"/>
-<l:gentext key="Set" text="Satz"/>
-<l:gentext key="setindex" text="Stichwortverzeichnis"/>
-<l:gentext key="SetIndex" text="Stichwortverzeichnis"/>
-<l:gentext key="Sidebar" text="Randnotiz"/>
-<l:gentext key="sidebar" text="randnotiz"/>
-<l:gentext key="step" text="Schritt"/>
-<l:gentext key="Step" text="Schritt"/>
-<l:gentext key="table" text="Tabelle"/>
-<l:gentext key="Table" text="Tabelle"/>
-<l:gentext key="task" text="Task" lang="en"/>
-<l:gentext key="Task" text="Task" lang="en"/>
-<l:gentext key="tip" text="Tipp"/>
-<l:gentext key="TIP" text="TIPP"/>
-<l:gentext key="Tip" text="Tipp"/>
-<l:gentext key="Warning" text="Warnung"/>
-<l:gentext key="warning" text="Warnung"/>
-<l:gentext key="WARNING" text="WARNUNG"/>
-<l:gentext key="and" text="und"/>
-<l:gentext key="by" text="von"/>
-<l:gentext key="Edited" text="Herausgegeben"/>
-<l:gentext key="edited" text="Herausgegeben"/>
-<l:gentext key="Editedby" text="Herausgegeben von"/>
-<l:gentext key="editedby" text="Herausgegeben von"/>
-<l:gentext key="in" text="in"/>
-<l:gentext key="lastlistcomma" text=""/>
-<l:gentext key="listcomma" text=","/>
-<l:gentext key="nonexistantelement" text="nicht existierendes Element"/>
-<l:gentext key="notes" text="FuÃnoten"/>
-<l:gentext key="Notes" text="FuÃnoten"/>
-<l:gentext key="Pgs" text="Seiten"/>
-<l:gentext key="pgs" text="Seiten"/>
-<l:gentext key="Revisedby" text="GeÃ€ndert durch: "/>
-<l:gentext key="revisedby" text="GeÃ€ndert durch: "/>
-<l:gentext key="TableNotes" text="Bemerkungen"/>
-<l:gentext key="tablenotes" text="Bemerkungen"/>
-<l:gentext key="TableofContents" text="Inhaltsverzeichnis"/>
-<l:gentext key="tableofcontents" text="Inhaltsverzeichnis"/>
-<l:gentext key="unexpectedelementname" text="Unerwarteter Elementname"/>
-<l:gentext key="unsupported" text="wird nicht unterstÃŒtzt"/>
-<l:gentext key="xrefto" text="xref auf"/>
-<l:gentext key="Authors" text="Autoren"/>
-<l:gentext key="copyeditor" text="Copy Editor" lang="en"/>
-<l:gentext key="graphicdesigner" text="Graphic Designer" lang="en"/>
-<l:gentext key="productioneditor" text="Production Editor" lang="en"/>
-<l:gentext key="technicaleditor" text="Technical Editor" lang="en"/>
-<l:gentext key="translator" text="Translator" lang="en"/>
-<l:gentext key="listofequations" text="Gleichungen"/>
-<l:gentext key="ListofEquations" text="Gleichungen"/>
-<l:gentext key="ListofExamples" text="Beispiele"/>
-<l:gentext key="listofexamples" text="Beispiele"/>
-<l:gentext key="ListofFigures" text="Abbildungsverzeichnis"/>
-<l:gentext key="listoffigures" text="Abbildungsverzeichnis"/>
-<l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
-<l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
-<l:gentext key="listoftables" text="Tabellenverzeichnis"/>
-<l:gentext key="ListofTables" text="Tabellenverzeichnis"/>
-<l:gentext key="ListofUnknown" text="???-Verzeichnis"/>
-<l:gentext key="listofunknown" text="???-Verzeichnis"/>
-<l:gentext key="nav-home" text="Zum Anfang"/>
-<l:gentext key="nav-next" text="Weiter"/>
-<l:gentext key="nav-next-sibling" text="Schnell weiter"/>
-<l:gentext key="nav-prev" text="ZurÃŒck"/>
-<l:gentext key="nav-prev-sibling" text="Schnell zurÃŒck"/>
-<l:gentext key="nav-up" text="Nach oben"/>
-<l:gentext key="nav-toc" text="InhV"/>
-<l:gentext key="Draft" text="Entwurf"/>
-<l:gentext key="above" text="oben"/>
-<l:gentext key="below" text="unten"/>
-<l:gentext key="sectioncalled" text="der Abschnitt namens"/>
-<l:gentext key="index symbols" text="Symbole"/>
-<l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyzÃ€Ã¶ÃŒÃ"/>
-<l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZÃÃÃÃ"/>
-<l:gentext key="normalize.sort.input" text="AaÃÃ ÃÃ¡ÃÃ¢ÃÃ£ÃÃ€Ã
-Ã¥ÄÄÄÄÄÄ
-ÇÇÇÇÇ Ç¡ÇºÇ»ÈÈÈÈÈŠÈ§ážážáºáº áº¡áº¢áº£áº€áº¥áºŠáº§áºšáº©áºªáº«áº¬áº­áº®áº¯áº°áº±áº²áº³áºŽáºµáº¶áº·BbÆÆÉÆÆážážážáž
-ážážCcÃÃ§ÄÄÄÄÄÄÄÄÆÆÉážážDdÄÄÄÄÆÉÆÆÇ
-Ç²È¡ÉážážážážážážážážážážEeÃÃšÃÃ©ÃÃªÃÃ«ÄÄÄÄÄÄÄÄÄÄÈÈ
-ÈÈÈšÈ©ážážážážážážážážážážáºžáº¹áººáº»áºŒáºœáºŸáº¿á»á»á»á»á»á»
-á»á»FfÆÆážážGgÄÄÄÄÄ Ä¡Ä¢Ä£ÆÉ Ç€Ç¥ÇŠÇ§ÇŽÇµáž áž¡HhÄ€Ä¥ÄŠÄ§ÈÈÉŠáž¢áž£áž€áž¥ážŠáž§ážšáž©ážªáž«áºIiÃÃ¬ÃÃ­ÃÃ®ÃÃ¯ÄšÄ©ÄªÄ«Ä¬Ä­Ä®Ä¯Ä°ÆÉšÇÇÈÈÈÈáž¬áž­áž®áž¯á»á»á»á»JjÄŽÄµÇ°ÊKkÄ¶Ä·ÆÆÇšÇ©áž°áž±áž²áž³ážŽážµLlÄ¹ÄºÄ»ÄŒÄœÄŸÄ¿ÅÅÅÆÇÈŽÉ«É¬É­áž¶áž·ážžáž¹ážºáž»ážŒážœMmÉ±ážŸáž¿á¹á¹á¹á¹NnÃÃ±ÅÅÅ
-ÅÅÅÆÉ²ÆÈ ÇÇžÇ¹ÈµÉ³á¹á¹
-á¹á¹á¹á¹á¹á¹OoÃÃ²ÃÃ³ÃÃŽÃÃµÃÃ¶ÃÃžÅÅÅÅÅÅÆÆ Æ¡ÇÇÇªÇ«Ç¬Ç­ÇŸÇ¿ÈÈÈÈÈªÈ«È¬È­È®È¯È°È±á¹á¹á¹á¹á¹á¹á¹á¹á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á» á»¡á»¢á»£PpÆ€Æ¥á¹á¹á¹á¹QqÊ RrÅÅÅÅÅÅÈÈÈÈÉŒÉœÉŸá¹á¹á¹á¹á¹á¹á¹á¹SsÅÅÅÅÅÅÅ Å¡ÈÈÊá¹ á¹¡á¹¢á¹£á¹€á¹¥á¹Šá¹§á¹šá¹©TtÅ¢Å£Å€Å¥ÅŠÅ§Æ«Æ¬Æ­Æ®ÊÈÈÈ¶á¹ªá¹«á¹¬á¹­á¹®á¹¯á¹°á¹±áºUuÃÃ¹ÃÃºÃÃ»ÃÃŒÅšÅ©ÅªÅ«Å¬Å­Å®Å¯Å°Å±Å²Å³Æ¯Æ°ÇÇÇÇÇÇÇÇÇÇÈÈÈÈá¹²á¹³á¹Žá¹µá¹¶á¹·á¹žá¹¹á¹ºá¹»á»€á»¥á»Šá»§á»šá»©á»ªá»«á»¬á»­á»®á»¯á»°á»±VvÆ²Êá¹Œá¹œá¹Ÿá¹¿WwÅŽÅµáºáºáºáºáºáº
-áºáºáºáºáºXxáºáºáºáºYyÃÃœÃ¿ÅžÅ¶Å·Æ³ÆŽÈ²È³áºáºáºá»²á»³á»Žá»µá»¶á»·á»žá»¹ZzÅ¹ÅºÅ»ÅŒÅœÅŸÆµÆ¶È€È¥ÊÊáºáºáºáºáºáºáº" lang="en"/>
-<l:gentext key="normalize.sort.output" text="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ" lang="en"/>
-<l:dingbat key="startquote" text="â"/>
-<l:dingbat key="endquote" text="â"/>
-<l:dingbat key="nestedstartquote" text="â"/>
-<l:dingbat key="nestedendquote" text="â"/>
-<l:dingbat key="singlestartquote" text="â"/>
-<l:dingbat key="singleendquote" text="â"/>
-<l:dingbat key="bullet" text="â¢"/>
-<l:gentext key="hyphenation-character" text="-"/>
-<l:gentext key="hyphenation-push-character-count" text="2"/>
-<l:gentext key="hyphenation-remain-character-count" text="3"/>
-<l:context name="styles"><l:template name="person-name" text="first-last"/>
-</l:context>
-<l:context name="title"><l:template name="abstract" text="%t"/>
-<l:template name="answer" text="%t"/>
-<l:template name="appendix" text="Anhang %n. %t"/>
-<l:template name="article" text="%t"/>
-<l:template name="authorblurb" text="%t"/>
-<l:template name="bibliodiv" text="%t"/>
-<l:template name="biblioentry" text="%t"/>
-<l:template name="bibliography" text="%t"/>
-<l:template name="bibliolist" text="%t" lang="en"/>
-<l:template name="bibliomixed" text="%t"/>
-<l:template name="bibliomset" text="%t"/>
-<l:template name="biblioset" text="%t"/>
-<l:template name="blockquote" text="%t"/>
-<l:template name="book" text="%t"/>
-<l:template name="calloutlist" text="%t"/>
-<l:template name="caution" text="%t"/>
-<l:template name="chapter" text="Kapitel %n. %t"/>
-<l:template name="colophon" text="%t"/>
-<l:template name="dedication" text="%t"/>
-<l:template name="equation" text="Gleichung %n. %t"/>
-<l:template name="example" text="Beispiel %n. %t"/>
-<l:template name="figure" text="Abbildung %n. %t"/>
-<l:template name="foil" text="%t" lang="en"/>
-<l:template name="foilgroup" text="%t" lang="en"/>
-<l:template name="formalpara" text="%t"/>
-<l:template name="glossary" text="%t"/>
-<l:template name="glossdiv" text="%t"/>
-<l:template name="glosslist" text="%t" lang="en"/>
-<l:template name="glossentry" text="%t"/>
-<l:template name="important" text="%t"/>
-<l:template name="index" text="%t"/>
-<l:template name="indexdiv" text="%t"/>
-<l:template name="itemizedlist" text="%t"/>
-<l:template name="legalnotice" text="%t"/>
-<l:template name="listitem" text=""/>
-<l:template name="lot" text="%t"/>
-<l:template name="msg" text="%t"/>
-<l:template name="msgexplan" text="%t"/>
-<l:template name="msgmain" text="%t"/>
-<l:template name="msgrel" text="%t"/>
-<l:template name="msgset" text="%t"/>
-<l:template name="msgsub" text="%t"/>
-<l:template name="note" text="%t"/>
-<l:template name="orderedlist" text="%t"/>
-<l:template name="part" text="Teil %n. %t"/>
-<l:template name="partintro" text="%t"/>
-<l:template name="preface" text="%t"/>
-<l:template name="procedure" text="%t"/>
-<l:template name="procedure.formal" text="Prozedur %n. %t"/>
-<l:template name="productionset" text="%t"/>
-<l:template name="productionset.formal" text="ProduktionÂ %n"/>
-<l:template name="qandadiv" text="%t"/>
-<l:template name="qandaentry" text="%t"/>
-<l:template name="qandaset" text="%t"/>
-<l:template name="question" text="F: %n"/>
-<l:template name="refentry" text="%t"/>
-<l:template name="reference" text="%t"/>
-<l:template name="refsection" text="%t"/>
-<l:template name="refsect1" text="%t"/>
-<l:template name="refsect2" text="%t"/>
-<l:template name="refsect3" text="%t"/>
-<l:template name="refsynopsisdiv" text="%t"/>
-<l:template name="refsynopsisdivinfo" text="%t"/>
-<l:template name="segmentedlist" text="%t"/>
-<l:template name="set" text="%t"/>
-<l:template name="setindex" text="%t"/>
-<l:template name="sidebar" text="%t"/>
-<l:template name="step" text="%t"/>
-<l:template name="table" text="Tabelle %n. %t"/>
-<l:template name="task" text="%t"/>
-<l:template name="tasksummary" text="%t" lang="en"/>
-<l:template name="taskprerequisites" text="%t" lang="en"/>
-<l:template name="taskrelated" text="%t" lang="en"/>
-<l:template name="tip" text="%t"/>
-<l:template name="toc" text="%t"/>
-<l:template name="variablelist" text="%t"/>
-<l:template name="varlistentry" text="" lang="en"/>
-<l:template name="warning" text="%t"/>
-</l:context>
-<l:context name="title-unnumbered"><l:template name="appendix" text="%t"/>
-<l:template name="article/appendix" text="%t"/>
-<l:template name="bridgehead" text="%t"/>
-<l:template name="chapter" text="%t"/>
-<l:template name="sect1" text="%t"/>
-<l:template name="sect2" text="%t"/>
-<l:template name="sect3" text="%t"/>
-<l:template name="sect4" text="%t"/>
-<l:template name="sect5" text="%t"/>
-<l:template name="section" text="%t"/>
-<l:template name="simplesect" text="%t"/>
-<l:template name="part" text="%t" lang="en"/>
-</l:context>
-<l:context name="title-numbered"><l:template name="appendix" text="Anhang %n. %t"/>
-<l:template name="article/appendix" text="%n.Â %t"/>
-<l:template name="bridgehead" text="%n.Â %t"/>
-<l:template name="chapter" text="Kapitel %n. %t"/>
-<l:template name="part" text="TeilÂ %n.Â %t"/>
-<l:template name="sect1" text="%n. %t"/>
-<l:template name="sect2" text="%n. %t"/>
-<l:template name="sect3" text="%n. %t"/>
-<l:template name="sect4" text="%n. %t"/>
-<l:template name="sect5" text="%n. %t"/>
-<l:template name="section" text="%n. %t"/>
-<l:template name="simplesect" text="%n. %t"/>
-</l:context>
-<l:context name="subtitle"><l:template name="appendix" text="%s"/>
-<l:template name="article" text="%s"/>
-<l:template name="bibliodiv" text="%s"/>
-<l:template name="biblioentry" text="%s"/>
-<l:template name="bibliography" text="%s"/>
-<l:template name="bibliomixed" text="%s"/>
-<l:template name="bibliomset" text="%s"/>
-<l:template name="biblioset" text="%s"/>
-<l:template name="book" text="%s"/>
-<l:template name="chapter" text="%s"/>
-<l:template name="colophon" text="%s"/>
-<l:template name="dedication" text="%s"/>
-<l:template name="glossary" text="%s"/>
-<l:template name="glossdiv" text="%s"/>
-<l:template name="index" text="%s"/>
-<l:template name="indexdiv" text="%s"/>
-<l:template name="lot" text="%s"/>
-<l:template name="part" text="%s"/>
-<l:template name="partintro" text="%s"/>
-<l:template name="preface" text="%s"/>
-<l:template name="refentry" text="%s"/>
-<l:template name="reference" text="%s"/>
-<l:template name="refsection" text="%s"/>
-<l:template name="refsect1" text="%s"/>
-<l:template name="refsect2" text="%s"/>
-<l:template name="refsect3" text="%s"/>
-<l:template name="refsynopsisdiv" text="%s"/>
-<l:template name="sect1" text="%s"/>
-<l:template name="sect2" text="%s"/>
-<l:template name="sect3" text="%s"/>
-<l:template name="sect4" text="%s"/>
-<l:template name="sect5" text="%s"/>
-<l:template name="section" text="%s"/>
-<l:template name="set" text="%s"/>
-<l:template name="setindex" text="%s"/>
-<l:template name="sidebar" text="%s"/>
-<l:template name="simplesect" text="%s"/>
-<l:template name="toc" text="%s"/>
-</l:context>
-<l:context name="xref"><l:template name="abstract" text="%t"/>
-<l:template name="answer" text="A:Â %n"/>
-<l:template name="appendix" text="%t"/>
-<l:template name="article" text="%t"/>
-<l:template name="authorblurb" text="%t"/>
-<l:template name="bibliodiv" text="%t"/>
-<l:template name="bibliography" text="%t"/>
-<l:template name="bibliomset" text="%t"/>
-<l:template name="biblioset" text="%t"/>
-<l:template name="blockquote" text="%t"/>
-<l:template name="book" text="%t"/>
-<l:template name="calloutlist" text="%t"/>
-<l:template name="caution" text="%t"/>
-<l:template name="chapter" text="%t"/>
-<l:template name="colophon" text="%t"/>
-<l:template name="constraintdef" text="%t"/>
-<l:template name="dedication" text="%t"/>
-<l:template name="equation" text="%t"/>
-<l:template name="example" text="%t"/>
-<l:template name="figure" text="%t"/>
-<l:template name="foil" text="%t" lang="en"/>
-<l:template name="foilgroup" text="%t" lang="en"/>
-<l:template name="formalpara" text="%t"/>
-<l:template name="glossary" text="%t"/>
-<l:template name="glossdiv" text="%t"/>
-<l:template name="important" text="%t"/>
-<l:template name="index" text="%t"/>
-<l:template name="indexdiv" text="%t"/>
-<l:template name="itemizedlist" text="%t"/>
-<l:template name="legalnotice" text="%t"/>
-<l:template name="listitem" text="%n"/>
-<l:template name="lot" text="%t"/>
-<l:template name="msg" text="%t"/>
-<l:template name="msgexplan" text="%t"/>
-<l:template name="msgmain" text="%t"/>
-<l:template name="msgrel" text="%t"/>
-<l:template name="msgset" text="%t"/>
-<l:template name="msgsub" text="%t"/>
-<l:template name="note" text="%t"/>
-<l:template name="orderedlist" text="%t"/>
-<l:template name="part" text="%t"/>
-<l:template name="partintro" text="%t"/>
-<l:template name="preface" text="%t"/>
-<l:template name="procedure" text="%t"/>
-<l:template name="productionset" text="%t"/>
-<l:template name="qandadiv" text="%t"/>
-<l:template name="qandaentry" text="F:Â %n"/>
-<l:template name="qandaset" text="%t"/>
-<l:template name="question" text="F: %n"/>
-<l:template name="reference" text="%t"/>
-<l:template name="refsynopsisdiv" text="%t"/>
-<l:template name="segmentedlist" text="%t"/>
-<l:template name="set" text="%t"/>
-<l:template name="setindex" text="%t"/>
-<l:template name="sidebar" text="%t"/>
-<l:template name="table" text="%t"/>
-<l:template name="task" text="%t" lang="en"/>
-<l:template name="tip" text="%t"/>
-<l:template name="toc" text="%t"/>
-<l:template name="variablelist" text="%t"/>
-<l:template name="varlistentry" text="%n"/>
-<l:template name="warning" text="%t"/>
-<l:template name="olink.document.citation" text=" in %o" lang="en"/>
-<l:template name="olink.page.citation" text=" (page %p)" lang="en"/>
-<l:template name="page.citation" text=" [%p]"/>
-<l:template name="page" text="(Seite %p)"/>
-<l:template name="docname" text=" in %o" lang="en"/>
-<l:template name="docnamelong" text=" in the document titled %o" lang="en"/>
-<l:template name="pageabbrev" text="(S. %p)"/>
-<l:template name="Page" text="Seite %p"/>
-<l:template name="bridgehead" text="â%tâ"/>
-<l:template name="refsection" text="â%tâ"/>
-<l:template name="refsect1" text="â%tâ"/>
-<l:template name="refsect2" text="â%tâ"/>
-<l:template name="refsect3" text="â%tâ"/>
-<l:template name="sect1" text="â%tâ"/>
-<l:template name="sect2" text="â%tâ"/>
-<l:template name="sect3" text="â%tâ"/>
-<l:template name="sect4" text="â%tâ"/>
-<l:template name="sect5" text="â%tâ"/>
-<l:template name="section" text="â%tâ"/>
-<l:template name="simplesect" text="â%tâ"/>
-</l:context>
-<l:context name="xref-number"><l:template name="answer" text="A:Â %n"/>
-<l:template name="appendix" text="AnhangÂ %n"/>
-<l:template name="bridgehead" text="AbschnittÂ %n"/>
-<l:template name="chapter" text="KapitelÂ %n"/>
-<l:template name="equation" text="GleichungÂ %n"/>
-<l:template name="example" text="BeispielÂ %n"/>
-<l:template name="figure" text="AbbildungÂ %n"/>
-<l:template name="part" text="TeilÂ %n"/>
-<l:template name="procedure" text="ProzedurÂ %n"/>
-<l:template name="productionset" text="ProduktionÂ %n"/>
-<l:template name="qandadiv" text="F &amp; AÂ %n"/>
-<l:template name="qandaentry" text="F:Â %n"/>
-<l:template name="question" text="F:Â %n"/>
-<l:template name="sect1" text="AbschnittÂ %n"/>
-<l:template name="sect2" text="AbschnittÂ %n"/>
-<l:template name="sect3" text="AbschnittÂ %n"/>
-<l:template name="sect4" text="AbschnittÂ %n"/>
-<l:template name="sect5" text="AbschnittÂ %n"/>
-<l:template name="section" text="AbschnittÂ %n"/>
-<l:template name="table" text="TabelleÂ %n"/>
-</l:context>
-<l:context name="xref-number-and-title"><l:template name="appendix" text="AnhangÂ %n, %t"/>
-<l:template name="bridgehead" text="AbschnittÂ %n, â%tâ"/>
-<l:template name="chapter" text="KapitelÂ %n, %t"/>
-<l:template name="equation" text="GleichungÂ %n, â%tâ"/>
-<l:template name="example" text="BeispielÂ %n, â%tâ"/>
-<l:template name="figure" text="AbbildungÂ %n, â%tâ"/>
-<l:template name="part" text="TeilÂ %n, â%tâ"/>
-<l:template name="procedure" text="ProzedurÂ %n, â%tâ"/>
-<l:template name="productionset" text="ProduktionÂ %n, â%tâ"/>
-<l:template name="qandadiv" text="F &amp; AÂ %n, â%tâ"/>
-<l:template name="refsect1" text="der Abschnitt namens â%tâ"/>
-<l:template name="refsect2" text="der Abschnitt namens â%tâ"/>
-<l:template name="refsect3" text="der Abschnitt namens â%tâ"/>
-<l:template name="refsection" text="der Abschnitt namens â%tâ"/>
-<l:template name="sect1" text="AbschnittÂ %n, â%tâ"/>
-<l:template name="sect2" text="AbschnittÂ %n, â%tâ"/>
-<l:template name="sect3" text="AbschnittÂ %n, â%tâ"/>
-<l:template name="sect4" text="AbschnittÂ %n, â%tâ"/>
-<l:template name="sect5" text="AbschnittÂ %n, â%tâ"/>
-<l:template name="section" text="AbschnittÂ %n, â%tâ"/>
-<l:template name="simplesect" text="der Abschnitt namens â%tâ"/>
-<l:template name="table" text="TabelleÂ %n, â%tâ"/>
-</l:context>
-<l:context name="authorgroup"><l:template name="sep" text=", "/>
-<l:template name="sep2" text=" und "/>
-<l:template name="seplast" text=" und "/>
-</l:context>
-<l:context name="glossary"><l:template name="see" text="Siehe %t"/>
-<l:template name="seealso" text="Siehe auch %t"/>
-</l:context>
-<l:context name="msgset"><l:template name="MsgAud" text="Zielgruppe: "/>
-<l:template name="MsgLevel" text="Dringlichkeit: "/>
-<l:template name="MsgOrig" text="Ursprung: "/>
-</l:context>
-<l:context name="datetime"><l:template name="format" text="d.m.Y"/>
-</l:context>
-<l:context name="termdef"><l:template name="prefix" text="[Definition: " lang="en"/>
-<l:template name="suffix" text="]" lang="en"/>
-</l:context>
-<l:context name="datetime-full"><l:template name="January" text="Januar"/>
-<l:template name="February" text="Februar"/>
-<l:template name="March" text="MÃ€rz"/>
-<l:template name="April" text="April"/>
-<l:template name="May" text="Mai"/>
-<l:template name="June" text="Juni"/>
-<l:template name="July" text="Juli"/>
-<l:template name="August" text="August"/>
-<l:template name="September" text="September"/>
-<l:template name="October" text="Oktober"/>
-<l:template name="November" text="November"/>
-<l:template name="December" text="Dezember"/>
-<l:template name="Monday" text="Montag"/>
-<l:template name="Tuesday" text="Dienstag"/>
-<l:template name="Wednesday" text="Mittwoch"/>
-<l:template name="Thursday" text="Donnerstag"/>
-<l:template name="Friday" text="Freitag"/>
-<l:template name="Saturday" text="Samstag"/>
-<l:template name="Sunday" text="Sonntag"/>
-</l:context>
-<l:context name="datetime-abbrev"><l:template name="Jan" text="Jan"/>
-<l:template name="Feb" text="Feb"/>
-<l:template name="Mar" text="Mar"/>
-<l:template name="Apr" text="Apr"/>
-<l:template name="May" text="Mai"/>
-<l:template name="Jun" text="Jun"/>
-<l:template name="Jul" text="Jul"/>
-<l:template name="Aug" text="Aug"/>
-<l:template name="Sep" text="Sep"/>
-<l:template name="Oct" text="Okt"/>
-<l:template name="Nov" text="Nov"/>
-<l:template name="Dec" text="Dez"/>
-<l:template name="Mon" text="Mo"/>
-<l:template name="Tue" text="Di"/>
-<l:template name="Wed" text="Mi"/>
-<l:template name="Thu" text="Do"/>
-<l:template name="Fri" text="Fr"/>
-<l:template name="Sat" text="Sa"/>
-<l:template name="Sun" text="So"/>
-</l:context>
-<l:context name="htmlhelp"><l:template name="langcode" text="0x0407 German (GERMANY)"/>
-</l:context>
-<l:context name="index"><l:template name="term-separator" text=", " lang="en"/>
-<l:template name="number-separator" text=", " lang="en"/>
-<l:template name="range-separator" text="-" lang="en"/>
-</l:context>
-<l:context name="iso690"><l:template name="lastfirst.sep" text=", " lang="en"/>
-<l:template name="alt.person.two.sep" text=" â " lang="en"/>
-<l:template name="alt.person.last.sep" text=" â " lang="en"/>
-<l:template name="alt.person.more.sep" text=" â " lang="en"/>
-<l:template name="primary.editor" text=" (ed.)" lang="en"/>
-<l:template name="primary.many" text=", et al." lang="en"/>
-<l:template name="primary.sep" text=". " lang="en"/>
-<l:template name="submaintitle.sep" text=": " lang="en"/>
-<l:template name="title.sep" text=". " lang="en"/>
-<l:template name="othertitle.sep" text=", " lang="en"/>
-<l:template name="medium1" text=" [" lang="en"/>
-<l:template name="medium2" text="]" lang="en"/>
-<l:template name="secondary.person.sep" text="; " lang="en"/>
-<l:template name="secondary.sep" text=". " lang="en"/>
-<l:template name="respons.sep" text=". " lang="en"/>
-<l:template name="edition.sep" text=". " lang="en"/>
-<l:template name="edition.serial.sep" text=", " lang="en"/>
-<l:template name="issuing.range" text="-" lang="en"/>
-<l:template name="issuing.div" text=", " lang="en"/>
-<l:template name="issuing.sep" text=". " lang="en"/>
-<l:template name="partnr.sep" text=". " lang="en"/>
-<l:template name="placepubl.sep" text=": " lang="en"/>
-<l:template name="publyear.sep" text=", " lang="en"/>
-<l:template name="pubinfo.sep" text=". " lang="en"/>
-<l:template name="spec.pubinfo.sep" text=", " lang="en"/>
-<l:template name="upd.sep" text=", " lang="en"/>
-<l:template name="datecit1" text=" [cited " lang="en"/>
-<l:template name="datecit2" text="]" lang="en"/>
-<l:template name="extent.sep" text=". " lang="en"/>
-<l:template name="locs.sep" text=", " lang="en"/>
-<l:template name="location.sep" text=". " lang="en"/>
-<l:template name="serie.sep" text=". " lang="en"/>
-<l:template name="notice.sep" text=". " lang="en"/>
-<l:template name="access" text="Available " lang="en"/>
-<l:template name="acctoo" text="Also available " lang="en"/>
-<l:template name="onwww" text="from World Wide Web" lang="en"/>
-<l:template name="oninet" text="from Internet" lang="en"/>
-<l:template name="access.end" text=": " lang="en"/>
-<l:template name="link1" text="&lt;" lang="en"/>
-<l:template name="link2" text="&gt;" lang="en"/>
-<l:template name="access.sep" text=". " lang="en"/>
-<l:template name="isbn" text="ISBN " lang="en"/>
-<l:template name="issn" text="ISSN " lang="en"/>
-<l:template name="stdnum.sep" text=". " lang="en"/>
-<l:template name="patcountry.sep" text=". " lang="en"/>
-<l:template name="pattype.sep" text=", " lang="en"/>
-<l:template name="patnum.sep" text=". " lang="en"/>
-<l:template name="patdate.sep" text=". " lang="en"/>
-</l:context><l:letters><l:l i="-1"/>
-<l:l i="0">Symbole</l:l>
-<l:l i="1">A</l:l>
-<l:l i="1">a</l:l>
-<l:l i="1">Ã</l:l>
-<l:l i="1">Ã€</l:l>
-<l:l i="2">B</l:l>
-<l:l i="2">b</l:l>
-<l:l i="3">C</l:l>
-<l:l i="3">c</l:l>
-<l:l i="4">D</l:l>
-<l:l i="4">d</l:l>
-<l:l i="5">E</l:l>
-<l:l i="5">e</l:l>
-<l:l i="6">F</l:l>
-<l:l i="6">f</l:l>
-<l:l i="7">G</l:l>
-<l:l i="7">g</l:l>
-<l:l i="8">H</l:l>
-<l:l i="8">h</l:l>
-<l:l i="9">I</l:l>
-<l:l i="9">i</l:l>
-<l:l i="10">J</l:l>
-<l:l i="10">j</l:l>
-<l:l i="11">K</l:l>
-<l:l i="11">k</l:l>
-<l:l i="12">L</l:l>
-<l:l i="12">l</l:l>
-<l:l i="13">M</l:l>
-<l:l i="13">m</l:l>
-<l:l i="14">N</l:l>
-<l:l i="14">n</l:l>
-<l:l i="15">O</l:l>
-<l:l i="15">o</l:l>
-<l:l i="15">Ã</l:l>
-<l:l i="15">Ã¶</l:l>
-<l:l i="16">P</l:l>
-<l:l i="16">p</l:l>
-<l:l i="17">Q</l:l>
-<l:l i="17">q</l:l>
-<l:l i="18">R</l:l>
-<l:l i="18">r</l:l>
-<l:l i="19">S</l:l>
-<l:l i="19">s</l:l>
-<l:l i="20">T</l:l>
-<l:l i="20">t</l:l>
-<l:l i="21">U</l:l>
-<l:l i="21">u</l:l>
-<l:l i="21">Ã</l:l>
-<l:l i="21">ÃŒ</l:l>
-<l:l i="22">V</l:l>
-<l:l i="22">v</l:l>
-<l:l i="23">W</l:l>
-<l:l i="23">w</l:l>
-<l:l i="24">X</l:l>
-<l:l i="24">x</l:l>
-<l:l i="25">Y</l:l>
-<l:l i="25">y</l:l>
-<l:l i="26">Z</l:l>
-<l:l i="26">z</l:l>
-</l:letters>
-</l:l10n>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/en.xml
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/en.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,1241 +1,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="en" english-language-name="English">
-
-<!-- * This file is generated automatically. -->
-<!-- * To submit changes to this file upstream (to the DocBook Project) -->
-<!-- * do not submit an edited version of this file. Instead, submit an -->
-<!-- * edited version of the source file at the following location: -->
-<!-- * -->
-<!-- *  https://svn.sourceforge.net/svnroot/docbook/trunk/gentext/locale/en.xml -->
-<!-- * -->
-<!-- * E-mail the edited en.xml source file to: -->
-<!-- * -->
-<!-- *  docbook-developers@lists.sourceforge.net -->
-
-<!-- ******************************************************************** -->
-
-<!-- This file is part of the XSL DocBook Stylesheet distribution. -->
-<!-- See ../README or http://docbook.sf.net/release/xsl/current/ for -->
-<!-- copyright and other information. -->
-
-<!-- ******************************************************************** -->
-<!-- In these files, % with a letter is used for a placeholder: -->
-<!--   %t is the current element's title -->
-<!--   %s is the current element's subtitle (if applicable)-->
-<!--   %n is the current element's number label-->
-<!--   %p is the current element's page number (if applicable)-->
-<!-- ******************************************************************** -->
-
-
-<l:gentext key="Abstract" text="Abstract"/>
-<l:gentext key="abstract" text="Abstract"/>
-<l:gentext key="Answer" text="A:"/>
-<l:gentext key="answer" text="A:"/>
-<l:gentext key="Appendix" text="Appendix"/>
-<l:gentext key="appendix" text="Appendix"/>
-<l:gentext key="Article" text="Article"/>
-<l:gentext key="article" text="Article"/>
-<l:gentext key="Author" text="Author"/>
-<l:gentext key="Bibliography" text="Bibliography"/>
-<l:gentext key="bibliography" text="Bibliography"/>
-<l:gentext key="Book" text="Book"/>
-<l:gentext key="book" text="Book"/>
-<l:gentext key="CAUTION" text="CAUTION"/>
-<l:gentext key="Caution" text="Caution"/>
-<l:gentext key="caution" text="Caution"/>
-<l:gentext key="Chapter" text="Chapter"/>
-<l:gentext key="chapter" text="Chapter"/>
-<l:gentext key="Colophon" text="Colophon"/>
-<l:gentext key="colophon" text="Colophon"/>
-<l:gentext key="Copyright" text="Copyright"/>
-<l:gentext key="copyright" text="Copyright"/>
-<l:gentext key="Dedication" text="Dedication"/>
-<l:gentext key="dedication" text="Dedication"/>
-<l:gentext key="Edition" text="Edition"/>
-<l:gentext key="edition" text="Edition"/>
-<l:gentext key="Editor" text="Editor"/>
-<l:gentext key="Equation" text="Equation"/>
-<l:gentext key="equation" text="Equation"/>
-<l:gentext key="Example" text="Example"/>
-<l:gentext key="example" text="Example"/>
-<l:gentext key="Figure" text="Figure"/>
-<l:gentext key="figure" text="Figure"/>
-<l:gentext key="Glossary" text="Glossary"/>
-<l:gentext key="glossary" text="Glossary"/>
-<l:gentext key="GlossSee" text="See"/>
-<l:gentext key="glosssee" text="See"/>
-<l:gentext key="GlossSeeAlso" text="See Also"/>
-<l:gentext key="glossseealso" text="See Also"/>
-<l:gentext key="IMPORTANT" text="IMPORTANT"/>
-<l:gentext key="important" text="Important"/>
-<l:gentext key="Important" text="Important"/>
-<l:gentext key="Index" text="Index"/>
-<l:gentext key="index" text="Index"/>
-<l:gentext key="ISBN" text="ISBN"/>
-<l:gentext key="isbn" text="ISBN"/>
-<l:gentext key="LegalNotice" text="Legal Notice"/>
-<l:gentext key="legalnotice" text="Legal Notice"/>
-<l:gentext key="MsgAud" text="Audience"/>
-<l:gentext key="msgaud" text="Audience"/>
-<l:gentext key="MsgLevel" text="Level"/>
-<l:gentext key="msglevel" text="Level"/>
-<l:gentext key="MsgOrig" text="Origin"/>
-<l:gentext key="msgorig" text="Origin"/>
-<l:gentext key="NOTE" text="NOTE"/>
-<l:gentext key="Note" text="Note"/>
-<l:gentext key="note" text="Note"/>
-<l:gentext key="Part" text="Part"/>
-<l:gentext key="part" text="Part"/>
-<l:gentext key="Preface" text="Preface"/>
-<l:gentext key="preface" text="Preface"/>
-<l:gentext key="Procedure" text="Procedure"/>
-<l:gentext key="procedure" text="Procedure"/>
-<l:gentext key="ProductionSet" text="Production"/>
-<l:gentext key="PubDate" text="Publication Date"/>
-<l:gentext key="pubdate" text="Publication date"/>
-<l:gentext key="Published" text="Published"/>
-<l:gentext key="published" text="Published"/>
-<l:gentext key="Publisher" text="Publisher"/>
-<l:gentext key="Qandadiv" text="Q &amp; A"/>
-<l:gentext key="qandadiv" text="Q &amp; A"/>
-<l:gentext key="QandASet" text="Frequently Asked Questions"/>
-<l:gentext key="Question" text="Q:"/>
-<l:gentext key="question" text="Q:"/>
-<l:gentext key="RefEntry" text=""/>
-<l:gentext key="refentry" text=""/>
-<l:gentext key="Reference" text="Reference"/>
-<l:gentext key="reference" text="Reference"/>
-<l:gentext key="References" text="References"/>
-<l:gentext key="RefName" text="Name"/>
-<l:gentext key="refname" text="Name"/>
-<l:gentext key="RefSection" text=""/>
-<l:gentext key="refsection" text=""/>
-<l:gentext key="RefSynopsisDiv" text="Synopsis"/>
-<l:gentext key="refsynopsisdiv" text="Synopsis"/>
-<l:gentext key="RevHistory" text="Revision History"/>
-<l:gentext key="revhistory" text="Revision History"/>
-<l:gentext key="revision" text="Revision"/>
-<l:gentext key="Revision" text="Revision"/>
-<l:gentext key="sect1" text="Section"/>
-<l:gentext key="sect2" text="Section"/>
-<l:gentext key="sect3" text="Section"/>
-<l:gentext key="sect4" text="Section"/>
-<l:gentext key="sect5" text="Section"/>
-<l:gentext key="section" text="Section"/>
-<l:gentext key="Section" text="Section"/>
-<l:gentext key="see" text="see"/>
-<l:gentext key="See" text="See"/>
-<l:gentext key="seealso" text="see also"/>
-<l:gentext key="Seealso" text="See also"/>
-<l:gentext key="SeeAlso" text="See Also"/>
-<l:gentext key="set" text="Set"/>
-<l:gentext key="Set" text="Set"/>
-<l:gentext key="setindex" text="Set Index"/>
-<l:gentext key="SetIndex" text="Set Index"/>
-<l:gentext key="Sidebar" text=""/>
-<l:gentext key="sidebar" text="sidebar"/>
-<l:gentext key="step" text="step"/>
-<l:gentext key="Step" text="Step"/>
-<l:gentext key="table" text="Table"/>
-<l:gentext key="Table" text="Table"/>
-<l:gentext key="task" text="Task"/>
-<l:gentext key="Task" text="Task"/>
-<l:gentext key="tip" text="Tip"/>
-<l:gentext key="TIP" text="TIP"/>
-<l:gentext key="Tip" text="Tip"/>
-<l:gentext key="Warning" text="Warning"/>
-<l:gentext key="warning" text="Warning"/>
-<l:gentext key="WARNING" text="WARNING"/>
-<l:gentext key="and" text="and"/>
-<l:gentext key="by" text="by"/>
-<l:gentext key="Edited" text="Edited"/>
-<l:gentext key="edited" text="Edited"/>
-<l:gentext key="Editedby" text="Edited by"/>
-<l:gentext key="editedby" text="Edited by"/>
-<l:gentext key="in" text="in"/>
-<l:gentext key="lastlistcomma" text=","/>
-<l:gentext key="listcomma" text=","/>
-<l:gentext key="nonexistantelement" text="non-existant element"/>
-<l:gentext key="notes" text="Notes"/>
-<l:gentext key="Notes" text="Notes"/>
-<l:gentext key="Pgs" text="Pgs."/>
-<l:gentext key="pgs" text="Pgs."/>
-<l:gentext key="Revisedby" text="Revised by: "/>
-<l:gentext key="revisedby" text="Revised by: "/>
-<l:gentext key="TableNotes" text="Notes"/>
-<l:gentext key="tablenotes" text="Notes"/>
-<l:gentext key="TableofContents" text="Table of Contents"/>
-<l:gentext key="tableofcontents" text="Table of Contents"/>
-<l:gentext key="unexpectedelementname" text="Unexpected element name"/>
-<l:gentext key="unsupported" text="unsupported"/>
-<l:gentext key="xrefto" text="xref to"/>
-<l:gentext key="Authors" text="Authors"/>
-<l:gentext key="copyeditor" text="Copy Editor"/>
-<l:gentext key="graphicdesigner" text="Graphic Designer"/>
-<l:gentext key="productioneditor" text="Production Editor"/>
-<l:gentext key="technicaleditor" text="Technical Editor"/>
-<l:gentext key="translator" text="Translator"/>
-<l:gentext key="listofequations" text="List of Equations"/>
-<l:gentext key="ListofEquations" text="List of Equations"/>
-<l:gentext key="ListofExamples" text="List of Examples"/>
-<l:gentext key="listofexamples" text="List of Examples"/>
-<l:gentext key="ListofFigures" text="List of Figures"/>
-<l:gentext key="listoffigures" text="List of Figures"/>
-<l:gentext key="ListofProcedures" text="List of Procedures"/>
-<l:gentext key="listofprocedures" text="List of Procedures"/>
-<l:gentext key="listoftables" text="List of Tables"/>
-<l:gentext key="ListofTables" text="List of Tables"/>
-<l:gentext key="ListofUnknown" text="List of Unknown"/>
-<l:gentext key="listofunknown" text="List of Unknown"/>
-<l:gentext key="nav-home" text="Home"/>
-<l:gentext key="nav-next" text="Next"/>
-<l:gentext key="nav-next-sibling" text="Fast Forward"/>
-<l:gentext key="nav-prev" text="Prev"/>
-<l:gentext key="nav-prev-sibling" text="Fast Backward"/>
-<l:gentext key="nav-up" text="Up"/>
-<l:gentext key="nav-toc" text="ToC"/>
-<l:gentext key="Draft" text="Draft"/>
-<l:gentext key="above" text="above"/>
-<l:gentext key="below" text="below"/>
-<l:gentext key="sectioncalled" text="the section called"/>
-<l:gentext key="index symbols" text="Symbols"/>
-<l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz"/>
-<l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/>
-<l:gentext key="normalize.sort.input" text="AaÃÃ ÃÃ¡ÃÃ¢ÃÃ£ÃÃ€Ã
-Ã¥ÄÄÄÄÄÄ
-ÇÇÇÇÇ Ç¡ÇºÇ»ÈÈÈÈÈŠÈ§ážážáºáº áº¡áº¢áº£áº€áº¥áºŠáº§áºšáº©áºªáº«áº¬áº­áº®áº¯áº°áº±áº²áº³áºŽáºµáº¶áº·BbÆÆÉÆÆážážážáž
-ážážCcÃÃ§ÄÄÄÄÄÄÄÄÆÆÉážážDdÄÄÄÄÆÉÆÆÇ
-Ç²È¡ÉážážážážážážážážážážEeÃÃšÃÃ©ÃÃªÃÃ«ÄÄÄÄÄÄÄÄÄÄÈÈ
-ÈÈÈšÈ©ážážážážážážážážážážáºžáº¹áººáº»áºŒáºœáºŸáº¿á»á»á»á»á»á»
-á»á»FfÆÆážážGgÄÄÄÄÄ Ä¡Ä¢Ä£ÆÉ Ç€Ç¥ÇŠÇ§ÇŽÇµáž áž¡HhÄ€Ä¥ÄŠÄ§ÈÈÉŠáž¢áž£áž€áž¥ážŠáž§ážšáž©ážªáž«áºIiÃÃ¬ÃÃ­ÃÃ®ÃÃ¯ÄšÄ©ÄªÄ«Ä¬Ä­Ä®Ä¯Ä°ÆÉšÇÇÈÈÈÈáž¬áž­áž®áž¯á»á»á»á»JjÄŽÄµÇ°ÊKkÄ¶Ä·ÆÆÇšÇ©áž°áž±áž²áž³ážŽážµLlÄ¹ÄºÄ»ÄŒÄœÄŸÄ¿ÅÅÅÆÇÈŽÉ«É¬É­áž¶áž·ážžáž¹ážºáž»ážŒážœMmÉ±ážŸáž¿á¹á¹á¹á¹NnÃÃ±ÅÅÅ
-ÅÅÅÆÉ²ÆÈ ÇÇžÇ¹ÈµÉ³á¹á¹
-á¹á¹á¹á¹á¹á¹OoÃÃ²ÃÃ³ÃÃŽÃÃµÃÃ¶ÃÃžÅÅÅÅÅÅÆÆ Æ¡ÇÇÇªÇ«Ç¬Ç­ÇŸÇ¿ÈÈÈÈÈªÈ«È¬È­È®È¯È°È±á¹á¹á¹á¹á¹á¹á¹á¹á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á» á»¡á»¢á»£PpÆ€Æ¥á¹á¹á¹á¹QqÊ RrÅÅÅÅÅÅÈÈÈÈÉŒÉœÉŸá¹á¹á¹á¹á¹á¹á¹á¹SsÅÅÅÅÅÅÅ Å¡ÈÈÊá¹ á¹¡á¹¢á¹£á¹€á¹¥á¹Šá¹§á¹šá¹©TtÅ¢Å£Å€Å¥ÅŠÅ§Æ«Æ¬Æ­Æ®ÊÈÈÈ¶á¹ªá¹«á¹¬á¹­á¹®á¹¯á¹°á¹±áºUuÃÃ¹ÃÃºÃÃ»ÃÃŒÅšÅ©ÅªÅ«Å¬Å­Å®Å¯Å°Å±Å²Å³Æ¯Æ°ÇÇÇÇÇÇÇÇÇÇÈÈÈÈá¹²á¹³á¹Žá¹µá¹¶á¹·á¹žá¹¹á¹ºá¹»á»€á»¥á»Šá»§á»šá»©á»ªá»«á»¬á»­á»®á»¯á»°á»±VvÆ²Êá¹Œá¹œá¹Ÿá¹¿WwÅŽÅµáºáºáºáºáºáº
-áºáºáºáºáºXxáºáºáºáºYyÃÃœÃ¿ÅžÅ¶Å·Æ³ÆŽÈ²È³áºáºáºá»²á»³á»Žá»µá»¶á»·á»žá»¹ZzÅ¹ÅºÅ»ÅŒÅœÅŸÆµÆ¶È€È¥ÊÊáºáºáºáºáºáºáº"/>
-<l:gentext key="normalize.sort.output" text="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ"/>
-<l:dingbat key="startquote" text="â"/>
-<l:dingbat key="endquote" text="â"/>
-<l:dingbat key="nestedstartquote" text="â"/>
-<l:dingbat key="nestedendquote" text="â"/>
-<l:dingbat key="singlestartquote" text="â"/>
-<l:dingbat key="singleendquote" text="â"/>
-<l:dingbat key="bullet" text="â¢"/>
-<l:gentext key="hyphenation-character" text="-"/>
-<l:gentext key="hyphenation-push-character-count" text="2"/>
-<l:gentext key="hyphenation-remain-character-count" text="2"/>
-<l:context name="styles"><l:template name="person-name" text="first-last"/>
-</l:context>
-<l:context name="title"><l:template name="abstract" text="%t"/>
-<l:template name="answer" text="%t"/>
-<l:template name="appendix" text="AppendixÂ %n.Â %t"/>
-<l:template name="article" text="%t"/>
-<l:template name="authorblurb" text="%t"/>
-<l:template name="bibliodiv" text="%t"/>
-<l:template name="biblioentry" text="%t"/>
-<l:template name="bibliography" text="%t"/>
-<l:template name="bibliolist" text="%t"/>
-<l:template name="bibliomixed" text="%t"/>
-<l:template name="bibliomset" text="%t"/>
-<l:template name="biblioset" text="%t"/>
-<l:template name="blockquote" text="%t"/>
-<l:template name="book" text="%t"/>
-<l:template name="calloutlist" text="%t"/>
-<l:template name="caution" text="%t"/>
-<l:template name="chapter" text="ChapterÂ %n.Â %t"/>
-<l:template name="colophon" text="%t"/>
-<l:template name="dedication" text="%t"/>
-<l:template name="equation" text="EquationÂ %n.Â %t"/>
-<l:template name="example" text="ExampleÂ %n.Â %t"/>
-<l:template name="figure" text="FigureÂ %n.Â %t"/>
-<l:template name="foil" text="%t"/>
-<l:template name="foilgroup" text="%t"/>
-<l:template name="formalpara" text="%t"/>
-<l:template name="glossary" text="%t"/>
-<l:template name="glossdiv" text="%t"/>
-<l:template name="glosslist" text="%t"/>
-<l:template name="glossentry" text="%t"/>
-<l:template name="important" text="%t"/>
-<l:template name="index" text="%t"/>
-<l:template name="indexdiv" text="%t"/>
-<l:template name="itemizedlist" text="%t"/>
-<l:template name="legalnotice" text="%t"/>
-<l:template name="listitem" text=""/>
-<l:template name="lot" text="%t"/>
-<l:template name="msg" text="%t"/>
-<l:template name="msgexplan" text="%t"/>
-<l:template name="msgmain" text="%t"/>
-<l:template name="msgrel" text="%t"/>
-<l:template name="msgset" text="%t"/>
-<l:template name="msgsub" text="%t"/>
-<l:template name="note" text="%t"/>
-<l:template name="orderedlist" text="%t"/>
-<l:template name="part" text="PartÂ %n.Â %t"/>
-<l:template name="partintro" text="%t"/>
-<l:template name="preface" text="%t"/>
-<l:template name="procedure" text="%t"/>
-<l:template name="procedure.formal" text="ProcedureÂ %n.Â %t"/>
-<l:template name="productionset" text="%t"/>
-<l:template name="productionset.formal" text="ProductionÂ %n"/>
-<l:template name="qandadiv" text="%t"/>
-<l:template name="qandaentry" text="%t"/>
-<l:template name="qandaset" text="%t"/>
-<l:template name="question" text="%t"/>
-<l:template name="refentry" text="%t"/>
-<l:template name="reference" text="%t"/>
-<l:template name="refsection" text="%t"/>
-<l:template name="refsect1" text="%t"/>
-<l:template name="refsect2" text="%t"/>
-<l:template name="refsect3" text="%t"/>
-<l:template name="refsynopsisdiv" text="%t"/>
-<l:template name="refsynopsisdivinfo" text="%t"/>
-<l:template name="segmentedlist" text="%t"/>
-<l:template name="set" text="%t"/>
-<l:template name="setindex" text="%t"/>
-<l:template name="sidebar" text="%t"/>
-<l:template name="step" text="%t"/>
-<l:template name="table" text="TableÂ %n.Â %t"/>
-<l:template name="task" text="%t"/>
-<l:template name="tasksummary" text="%t"/>
-<l:template name="taskprerequisites" text="%t"/>
-<l:template name="taskrelated" text="%t"/>
-<l:template name="tip" text="%t"/>
-<l:template name="toc" text="%t"/>
-<l:template name="variablelist" text="%t"/>
-<l:template name="varlistentry" text=""/>
-<l:template name="warning" text="%t"/>
-</l:context>
-<l:context name="title-unnumbered"><l:template name="appendix" text="%t"/>
-<l:template name="article/appendix" text="%t"/>
-<l:template name="bridgehead" text="%t"/>
-<l:template name="chapter" text="%t"/>
-<l:template name="sect1" text="%t"/>
-<l:template name="sect2" text="%t"/>
-<l:template name="sect3" text="%t"/>
-<l:template name="sect4" text="%t"/>
-<l:template name="sect5" text="%t"/>
-<l:template name="section" text="%t"/>
-<l:template name="simplesect" text="%t"/>
-<l:template name="part" text="%t"/>
-</l:context>
-<l:context name="title-numbered"><l:template name="appendix" text="AppendixÂ %n.Â %t"/>
-<l:template name="article/appendix" text="%n.Â %t"/>
-<l:template name="bridgehead" text="%n.Â %t"/>
-<l:template name="chapter" text="ChapterÂ %n.Â %t"/>
-<l:template name="part" text="PartÂ %n.Â %t"/>
-<l:template name="sect1" text="%n.Â %t"/>
-<l:template name="sect2" text="%n.Â %t"/>
-<l:template name="sect3" text="%n.Â %t"/>
-<l:template name="sect4" text="%n.Â %t"/>
-<l:template name="sect5" text="%n.Â %t"/>
-<l:template name="section" text="%n.Â %t"/>
-<l:template name="simplesect" text="%t"/>
-</l:context>
-<l:context name="subtitle"><l:template name="appendix" text="%s"/>
-<l:template name="article" text="%s"/>
-<l:template name="bibliodiv" text="%s"/>
-<l:template name="biblioentry" text="%s"/>
-<l:template name="bibliography" text="%s"/>
-<l:template name="bibliomixed" text="%s"/>
-<l:template name="bibliomset" text="%s"/>
-<l:template name="biblioset" text="%s"/>
-<l:template name="book" text="%s"/>
-<l:template name="chapter" text="%s"/>
-<l:template name="colophon" text="%s"/>
-<l:template name="dedication" text="%s"/>
-<l:template name="glossary" text="%s"/>
-<l:template name="glossdiv" text="%s"/>
-<l:template name="index" text="%s"/>
-<l:template name="indexdiv" text="%s"/>
-<l:template name="lot" text="%s"/>
-<l:template name="part" text="%s"/>
-<l:template name="partintro" text="%s"/>
-<l:template name="preface" text="%s"/>
-<l:template name="refentry" text="%s"/>
-<l:template name="reference" text="%s"/>
-<l:template name="refsection" text="%s"/>
-<l:template name="refsect1" text="%s"/>
-<l:template name="refsect2" text="%s"/>
-<l:template name="refsect3" text="%s"/>
-<l:template name="refsynopsisdiv" text="%s"/>
-<l:template name="sect1" text="%s"/>
-<l:template name="sect2" text="%s"/>
-<l:template name="sect3" text="%s"/>
-<l:template name="sect4" text="%s"/>
-<l:template name="sect5" text="%s"/>
-<l:template name="section" text="%s"/>
-<l:template name="set" text="%s"/>
-<l:template name="setindex" text="%s"/>
-<l:template name="sidebar" text="%s"/>
-<l:template name="simplesect" text="%s"/>
-<l:template name="toc" text="%s"/>
-</l:context>
-<l:context name="xref"><l:template name="abstract" text="%t"/>
-<l:template name="answer" text="A:Â %n"/>
-<l:template name="appendix" text="%t"/>
-<l:template name="article" text="%t"/>
-<l:template name="authorblurb" text="%t"/>
-<l:template name="bibliodiv" text="%t"/>
-<l:template name="bibliography" text="%t"/>
-<l:template name="bibliomset" text="%t"/>
-<l:template name="biblioset" text="%t"/>
-<l:template name="blockquote" text="%t"/>
-<l:template name="book" text="%t"/>
-<l:template name="calloutlist" text="%t"/>
-<l:template name="caution" text="%t"/>
-<l:template name="chapter" text="%t"/>
-<l:template name="colophon" text="%t"/>
-<l:template name="constraintdef" text="%t"/>
-<l:template name="dedication" text="%t"/>
-<l:template name="equation" text="%t"/>
-<l:template name="example" text="%t"/>
-<l:template name="figure" text="%t"/>
-<l:template name="foil" text="%t"/>
-<l:template name="foilgroup" text="%t"/>
-<l:template name="formalpara" text="%t"/>
-<l:template name="glossary" text="%t"/>
-<l:template name="glossdiv" text="%t"/>
-<l:template name="important" text="%t"/>
-<l:template name="index" text="%t"/>
-<l:template name="indexdiv" text="%t"/>
-<l:template name="itemizedlist" text="%t"/>
-<l:template name="legalnotice" text="%t"/>
-<l:template name="listitem" text="%n"/>
-<l:template name="lot" text="%t"/>
-<l:template name="msg" text="%t"/>
-<l:template name="msgexplan" text="%t"/>
-<l:template name="msgmain" text="%t"/>
-<l:template name="msgrel" text="%t"/>
-<l:template name="msgset" text="%t"/>
-<l:template name="msgsub" text="%t"/>
-<l:template name="note" text="%t"/>
-<l:template name="orderedlist" text="%t"/>
-<l:template name="part" text="%t"/>
-<l:template name="partintro" text="%t"/>
-<l:template name="preface" text="%t"/>
-<l:template name="procedure" text="%t"/>
-<l:template name="productionset" text="%t"/>
-<l:template name="qandadiv" text="%t"/>
-<l:template name="qandaentry" text="Q:Â %n"/>
-<l:template name="qandaset" text="%t"/>
-<l:template name="question" text="Q:Â %n"/>
-<l:template name="reference" text="%t"/>
-<l:template name="refsynopsisdiv" text="%t"/>
-<l:template name="segmentedlist" text="%t"/>
-<l:template name="set" text="%t"/>
-<l:template name="setindex" text="%t"/>
-<l:template name="sidebar" text="%t"/>
-<l:template name="table" text="%t"/>
-<l:template name="task" text="%t"/>
-<l:template name="tip" text="%t"/>
-<l:template name="toc" text="%t"/>
-<l:template name="variablelist" text="%t"/>
-<l:template name="varlistentry" text="%n"/>
-<l:template name="warning" text="%t"/>
-<l:template name="olink.document.citation" text=" in %o"/>
-<l:template name="olink.page.citation" text=" (page %p)"/>
-<l:template name="page.citation" text=" [%p]"/>
-<l:template name="page" text="(page %p)"/>
-<l:template name="docname" text=" in %o"/>
-<l:template name="docnamelong" text=" in the document titled %o"/>
-<l:template name="pageabbrev" text="(p. %p)"/>
-<l:template name="Page" text="Page %p"/>
-<l:template name="bridgehead" text="the section called â%tâ"/>
-<l:template name="refsection" text="the section called â%tâ"/>
-<l:template name="refsect1" text="the section called â%tâ"/>
-<l:template name="refsect2" text="the section called â%tâ"/>
-<l:template name="refsect3" text="the section called â%tâ"/>
-<l:template name="sect1" text="the section called â%tâ"/>
-<l:template name="sect2" text="the section called â%tâ"/>
-<l:template name="sect3" text="the section called â%tâ"/>
-<l:template name="sect4" text="the section called â%tâ"/>
-<l:template name="sect5" text="the section called â%tâ"/>
-<l:template name="section" text="the section called â%tâ"/>
-<l:template name="simplesect" text="the section called â%tâ"/>
-</l:context>
-<l:context name="xref-number"><l:template name="answer" text="A:Â %n"/>
-<l:template name="appendix" text="AppendixÂ %n"/>
-<l:template name="bridgehead" text="SectionÂ %n"/>
-<l:template name="chapter" text="ChapterÂ %n"/>
-<l:template name="equation" text="EquationÂ %n"/>
-<l:template name="example" text="ExampleÂ %n"/>
-<l:template name="figure" text="FigureÂ %n"/>
-<l:template name="part" text="PartÂ %n"/>
-<l:template name="procedure" text="ProcedureÂ %n"/>
-<l:template name="productionset" text="ProductionÂ %n"/>
-<l:template name="qandadiv" text="Q &amp; AÂ %n"/>
-<l:template name="qandaentry" text="Q:Â %n"/>
-<l:template name="question" text="Q:Â %n"/>
-<l:template name="sect1" text="SectionÂ %n"/>
-<l:template name="sect2" text="SectionÂ %n"/>
-<l:template name="sect3" text="SectionÂ %n"/>
-<l:template name="sect4" text="SectionÂ %n"/>
-<l:template name="sect5" text="SectionÂ %n"/>
-<l:template name="section" text="SectionÂ %n"/>
-<l:template name="table" text="TableÂ %n"/>
-</l:context>
-<l:context name="xref-number-and-title"><l:template name="appendix" text="AppendixÂ %n, %t"/>
-<l:template name="bridgehead" text="SectionÂ %n, â%tâ"/>
-<l:template name="chapter" text="ChapterÂ %n, %t"/>
-<l:template name="equation" text="EquationÂ %n, â%tâ"/>
-<l:template name="example" text="ExampleÂ %n, â%tâ"/>
-<l:template name="figure" text="FigureÂ %n, â%tâ"/>
-<l:template name="part" text="PartÂ %n, â%tâ"/>
-<l:template name="procedure" text="ProcedureÂ %n, â%tâ"/>
-<l:template name="productionset" text="ProductionÂ %n, â%tâ"/>
-<l:template name="qandadiv" text="Q &amp; AÂ %n, â%tâ"/>
-<l:template name="refsect1" text="the section called â%tâ"/>
-<l:template name="refsect2" text="the section called â%tâ"/>
-<l:template name="refsect3" text="the section called â%tâ"/>
-<l:template name="refsection" text="the section called â%tâ"/>
-<l:template name="sect1" text="SectionÂ %n, â%tâ"/>
-<l:template name="sect2" text="SectionÂ %n, â%tâ"/>
-<l:template name="sect3" text="SectionÂ %n, â%tâ"/>
-<l:template name="sect4" text="SectionÂ %n, â%tâ"/>
-<l:template name="sect5" text="SectionÂ %n, â%tâ"/>
-<l:template name="section" text="SectionÂ %n, â%tâ"/>
-<l:template name="simplesect" text="the section called â%tâ"/>
-<l:template name="table" text="TableÂ %n, â%tâ"/>
-</l:context>
-<l:context name="authorgroup"><l:template name="sep" text=", "/>
-<l:template name="sep2" text=" and "/>
-<l:template name="seplast" text=", and "/>
-</l:context>
-<l:context name="glossary"><l:template name="see" text="See %t"/>
-<l:template name="seealso" text="See Also %t"/>
-</l:context>
-<l:context name="msgset"><l:template name="MsgAud" text="Audience: "/>
-<l:template name="MsgLevel" text="Level: "/>
-<l:template name="MsgOrig" text="Origin: "/>
-</l:context>
-<l:context name="datetime"><l:template name="format" text="m/d/Y"/>
-</l:context>
-<l:context name="termdef"><l:template name="prefix" text="[Definition: "/>
-<l:template name="suffix" text="]"/>
-</l:context>
-<l:context name="datetime-full"><l:template name="January" text="January"/>
-<l:template name="February" text="February"/>
-<l:template name="March" text="March"/>
-<l:template name="April" text="April"/>
-<l:template name="May" text="May"/>
-<l:template name="June" text="June"/>
-<l:template name="July" text="July"/>
-<l:template name="August" text="August"/>
-<l:template name="September" text="September"/>
-<l:template name="October" text="October"/>
-<l:template name="November" text="November"/>
-<l:template name="December" text="December"/>
-<l:template name="Monday" text="Monday"/>
-<l:template name="Tuesday" text="Tuesday"/>
-<l:template name="Wednesday" text="Wednesday"/>
-<l:template name="Thursday" text="Thursday"/>
-<l:template name="Friday" text="Friday"/>
-<l:template name="Saturday" text="Saturday"/>
-<l:template name="Sunday" text="Sunday"/>
-</l:context>
-<l:context name="datetime-abbrev"><l:template name="Jan" text="Jan"/>
-<l:template name="Feb" text="Feb"/>
-<l:template name="Mar" text="Mar"/>
-<l:template name="Apr" text="Apr"/>
-<l:template name="May" text="May"/>
-<l:template name="Jun" text="Jun"/>
-<l:template name="Jul" text="Jul"/>
-<l:template name="Aug" text="Aug"/>
-<l:template name="Sep" text="Sep"/>
-<l:template name="Oct" text="Oct"/>
-<l:template name="Nov" text="Nov"/>
-<l:template name="Dec" text="Dec"/>
-<l:template name="Mon" text="Mon"/>
-<l:template name="Tue" text="Tue"/>
-<l:template name="Wed" text="Wed"/>
-<l:template name="Thu" text="Thu"/>
-<l:template name="Fri" text="Fri"/>
-<l:template name="Sat" text="Sat"/>
-<l:template name="Sun" text="Sun"/>
-</l:context>
-<l:context name="htmlhelp"><l:template name="langcode" text="0x0409 English (UNITED STATES)"/>
-</l:context>
-<l:context name="index"><l:template name="term-separator" text=", "/>
-<l:template name="number-separator" text=", "/>
-<l:template name="range-separator" text="-"/>
-</l:context>
-<l:context name="iso690"><l:template name="lastfirst.sep" text=", "/>
-<l:template name="alt.person.two.sep" text=" â "/>
-<l:template name="alt.person.last.sep" text=" â "/>
-<l:template name="alt.person.more.sep" text=" â "/>
-<l:template name="primary.editor" text=" (ed.)"/>
-<l:template name="primary.many" text=", et al."/>
-<l:template name="primary.sep" text=". "/>
-<l:template name="submaintitle.sep" text=": "/>
-<l:template name="title.sep" text=". "/>
-<l:template name="othertitle.sep" text=", "/>
-<l:template name="medium1" text=" ["/>
-<l:template name="medium2" text="]"/>
-<l:template name="secondary.person.sep" text="; "/>
-<l:template name="secondary.sep" text=". "/>
-<l:template name="respons.sep" text=". "/>
-<l:template name="edition.sep" text=". "/>
-<l:template name="edition.serial.sep" text=", "/>
-<l:template name="issuing.range" text="-"/>
-<l:template name="issuing.div" text=", "/>
-<l:template name="issuing.sep" text=". "/>
-<l:template name="partnr.sep" text=". "/>
-<l:template name="placepubl.sep" text=": "/>
-<l:template name="publyear.sep" text=", "/>
-<l:template name="pubinfo.sep" text=". "/>
-<l:template name="spec.pubinfo.sep" text=", "/>
-<l:template name="upd.sep" text=", "/>
-<l:template name="datecit1" text=" [cited "/>
-<l:template name="datecit2" text="]"/>
-<l:template name="extent.sep" text=". "/>
-<l:template name="locs.sep" text=", "/>
-<l:template name="location.sep" text=". "/>
-<l:template name="serie.sep" text=". "/>
-<l:template name="notice.sep" text=". "/>
-<l:template name="access" text="Available "/>
-<l:template name="acctoo" text="Also available "/>
-<l:template name="onwww" text="from World Wide Web"/>
-<l:template name="oninet" text="from Internet"/>
-<l:template name="access.end" text=": "/>
-<l:template name="link1" text="&lt;"/>
-<l:template name="link2" text="&gt;"/>
-<l:template name="access.sep" text=". "/>
-<l:template name="isbn" text="ISBN "/>
-<l:template name="issn" text="ISSN "/>
-<l:template name="stdnum.sep" text=". "/>
-<l:template name="patcountry.sep" text=". "/>
-<l:template name="pattype.sep" text=", "/>
-<l:template name="patnum.sep" text=". "/>
-<l:template name="patdate.sep" text=". "/>
-</l:context><l:letters><l:l i="-1"/>
-<l:l i="0">Symbols</l:l>
-<l:l i="10">A</l:l>
-<l:l i="10">a</l:l>
-<l:l i="10">Ã</l:l>
-<l:l i="10">Ã </l:l>
-<l:l i="10">Ã</l:l>
-<l:l i="10">Ã¡</l:l>
-<l:l i="10">Ã</l:l>
-<l:l i="10">Ã¢</l:l>
-<l:l i="10">Ã</l:l>
-<l:l i="10">Ã£</l:l>
-<l:l i="10">Ã</l:l>
-<l:l i="10">Ã€</l:l>
-<l:l i="10">Ã
-</l:l>
-<l:l i="10">Ã¥</l:l>
-<l:l i="10">Ä</l:l>
-<l:l i="10">Ä</l:l>
-<l:l i="10">Ä</l:l>
-<l:l i="10">Ä</l:l>
-<l:l i="10">Ä</l:l>
-<l:l i="10">Ä
-</l:l>
-<l:l i="10">Ç</l:l>
-<l:l i="10">Ç</l:l>
-<l:l i="10">Ç</l:l>
-<l:l i="10">Ç</l:l>
-<l:l i="10">Ç </l:l>
-<l:l i="10">Ç¡</l:l>
-<l:l i="10">Çº</l:l>
-<l:l i="10">Ç»</l:l>
-<l:l i="10">È</l:l>
-<l:l i="10">È</l:l>
-<l:l i="10">È</l:l>
-<l:l i="10">È</l:l>
-<l:l i="10">ÈŠ</l:l>
-<l:l i="10">È§</l:l>
-<l:l i="10">áž</l:l>
-<l:l i="10">áž</l:l>
-<l:l i="10">áº</l:l>
-<l:l i="10">áº </l:l>
-<l:l i="10">áº¡</l:l>
-<l:l i="10">áº¢</l:l>
-<l:l i="10">áº£</l:l>
-<l:l i="10">áº€</l:l>
-<l:l i="10">áº¥</l:l>
-<l:l i="10">áºŠ</l:l>
-<l:l i="10">áº§</l:l>
-<l:l i="10">áºš</l:l>
-<l:l i="10">áº©</l:l>
-<l:l i="10">áºª</l:l>
-<l:l i="10">áº«</l:l>
-<l:l i="10">áº¬</l:l>
-<l:l i="10">áº­</l:l>
-<l:l i="10">áº®</l:l>
-<l:l i="10">áº¯</l:l>
-<l:l i="10">áº°</l:l>
-<l:l i="10">áº±</l:l>
-<l:l i="10">áº²</l:l>
-<l:l i="10">áº³</l:l>
-<l:l i="10">áºŽ</l:l>
-<l:l i="10">áºµ</l:l>
-<l:l i="10">áº¶</l:l>
-<l:l i="10">áº·</l:l>
-<l:l i="20">B</l:l>
-<l:l i="20">b</l:l>
-<l:l i="20">Æ</l:l>
-<l:l i="20">Æ</l:l>
-<l:l i="20">É</l:l>
-<l:l i="20">Æ</l:l>
-<l:l i="20">Æ</l:l>
-<l:l i="20">áž</l:l>
-<l:l i="20">áž</l:l>
-<l:l i="20">áž</l:l>
-<l:l i="20">áž
-</l:l>
-<l:l i="20">áž</l:l>
-<l:l i="20">áž</l:l>
-<l:l i="30">C</l:l>
-<l:l i="30">c</l:l>
-<l:l i="30">Ã</l:l>
-<l:l i="30">Ã§</l:l>
-<l:l i="30">Ä</l:l>
-<l:l i="30">Ä</l:l>
-<l:l i="30">Ä</l:l>
-<l:l i="30">Ä</l:l>
-<l:l i="30">Ä</l:l>
-<l:l i="30">Ä</l:l>
-<l:l i="30">Ä</l:l>
-<l:l i="30">Ä</l:l>
-<l:l i="30">Æ</l:l>
-<l:l i="30">Æ</l:l>
-<l:l i="30">É</l:l>
-<l:l i="30">áž</l:l>
-<l:l i="30">áž</l:l>
-<l:l i="40">D</l:l>
-<l:l i="40">d</l:l>
-<l:l i="40">Ä</l:l>
-<l:l i="40">Ä</l:l>
-<l:l i="40">Ä</l:l>
-<l:l i="40">Ä</l:l>
-<l:l i="40">Æ</l:l>
-<l:l i="40">É</l:l>
-<l:l i="40">Æ</l:l>
-<l:l i="40">Æ</l:l>
-<l:l i="40">Ç
-</l:l>
-<l:l i="40">Ç²</l:l>
-<l:l i="40">È¡</l:l>
-<l:l i="40">É</l:l>
-<l:l i="40">áž</l:l>
-<l:l i="40">áž</l:l>
-<l:l i="40">áž</l:l>
-<l:l i="40">áž</l:l>
-<l:l i="40">áž</l:l>
-<l:l i="40">áž</l:l>
-<l:l i="40">áž</l:l>
-<l:l i="40">áž</l:l>
-<l:l i="40">áž</l:l>
-<l:l i="40">áž</l:l>
-<l:l i="50">E</l:l>
-<l:l i="50">e</l:l>
-<l:l i="50">Ã</l:l>
-<l:l i="50">Ãš</l:l>
-<l:l i="50">Ã</l:l>
-<l:l i="50">Ã©</l:l>
-<l:l i="50">Ã</l:l>
-<l:l i="50">Ãª</l:l>
-<l:l i="50">Ã</l:l>
-<l:l i="50">Ã«</l:l>
-<l:l i="50">Ä</l:l>
-<l:l i="50">Ä</l:l>
-<l:l i="50">Ä</l:l>
-<l:l i="50">Ä</l:l>
-<l:l i="50">Ä</l:l>
-<l:l i="50">Ä</l:l>
-<l:l i="50">Ä</l:l>
-<l:l i="50">Ä</l:l>
-<l:l i="50">Ä</l:l>
-<l:l i="50">Ä</l:l>
-<l:l i="50">È</l:l>
-<l:l i="50">È
-</l:l>
-<l:l i="50">È</l:l>
-<l:l i="50">È</l:l>
-<l:l i="50">Èš</l:l>
-<l:l i="50">È©</l:l>
-<l:l i="50">áž</l:l>
-<l:l i="50">áž</l:l>
-<l:l i="50">áž</l:l>
-<l:l i="50">áž</l:l>
-<l:l i="50">áž</l:l>
-<l:l i="50">áž</l:l>
-<l:l i="50">áž</l:l>
-<l:l i="50">áž</l:l>
-<l:l i="50">áž</l:l>
-<l:l i="50">áž</l:l>
-<l:l i="50">áºž</l:l>
-<l:l i="50">áº¹</l:l>
-<l:l i="50">áºº</l:l>
-<l:l i="50">áº»</l:l>
-<l:l i="50">áºŒ</l:l>
-<l:l i="50">áºœ</l:l>
-<l:l i="50">áºŸ</l:l>
-<l:l i="50">áº¿</l:l>
-<l:l i="50">á»</l:l>
-<l:l i="50">á»</l:l>
-<l:l i="50">á»</l:l>
-<l:l i="50">á»</l:l>
-<l:l i="50">á»</l:l>
-<l:l i="50">á»
-</l:l>
-<l:l i="50">á»</l:l>
-<l:l i="50">á»</l:l>
-<l:l i="60">F</l:l>
-<l:l i="60">f</l:l>
-<l:l i="60">Æ</l:l>
-<l:l i="60">Æ</l:l>
-<l:l i="60">áž</l:l>
-<l:l i="60">áž</l:l>
-<l:l i="70">G</l:l>
-<l:l i="70">g</l:l>
-<l:l i="70">Ä</l:l>
-<l:l i="70">Ä</l:l>
-<l:l i="70">Ä</l:l>
-<l:l i="70">Ä</l:l>
-<l:l i="70">Ä </l:l>
-<l:l i="70">Ä¡</l:l>
-<l:l i="70">Ä¢</l:l>
-<l:l i="70">Ä£</l:l>
-<l:l i="70">Æ</l:l>
-<l:l i="70">É </l:l>
-<l:l i="70">Ç€</l:l>
-<l:l i="70">Ç¥</l:l>
-<l:l i="70">ÇŠ</l:l>
-<l:l i="70">Ç§</l:l>
-<l:l i="70">ÇŽ</l:l>
-<l:l i="70">Çµ</l:l>
-<l:l i="70">áž </l:l>
-<l:l i="70">áž¡</l:l>
-<l:l i="80">H</l:l>
-<l:l i="80">h</l:l>
-<l:l i="80">Ä€</l:l>
-<l:l i="80">Ä¥</l:l>
-<l:l i="80">ÄŠ</l:l>
-<l:l i="80">Ä§</l:l>
-<l:l i="80">È</l:l>
-<l:l i="80">È</l:l>
-<l:l i="80">ÉŠ</l:l>
-<l:l i="80">áž¢</l:l>
-<l:l i="80">áž£</l:l>
-<l:l i="80">áž€</l:l>
-<l:l i="80">áž¥</l:l>
-<l:l i="80">ážŠ</l:l>
-<l:l i="80">áž§</l:l>
-<l:l i="80">ážš</l:l>
-<l:l i="80">áž©</l:l>
-<l:l i="80">ážª</l:l>
-<l:l i="80">áž«</l:l>
-<l:l i="80">áº</l:l>
-<l:l i="90">I</l:l>
-<l:l i="90">i</l:l>
-<l:l i="90">Ã</l:l>
-<l:l i="90">Ã¬</l:l>
-<l:l i="90">Ã</l:l>
-<l:l i="90">Ã­</l:l>
-<l:l i="90">Ã</l:l>
-<l:l i="90">Ã®</l:l>
-<l:l i="90">Ã</l:l>
-<l:l i="90">Ã¯</l:l>
-<l:l i="90">Äš</l:l>
-<l:l i="90">Ä©</l:l>
-<l:l i="90">Äª</l:l>
-<l:l i="90">Ä«</l:l>
-<l:l i="90">Ä¬</l:l>
-<l:l i="90">Ä­</l:l>
-<l:l i="90">Ä®</l:l>
-<l:l i="90">Ä¯</l:l>
-<l:l i="90">Ä°</l:l>
-<l:l i="90">Æ</l:l>
-<l:l i="90">Éš</l:l>
-<l:l i="90">Ç</l:l>
-<l:l i="90">Ç</l:l>
-<l:l i="90">È</l:l>
-<l:l i="90">È</l:l>
-<l:l i="90">È</l:l>
-<l:l i="90">È</l:l>
-<l:l i="90">áž¬</l:l>
-<l:l i="90">áž­</l:l>
-<l:l i="90">áž®</l:l>
-<l:l i="90">áž¯</l:l>
-<l:l i="90">á»</l:l>
-<l:l i="90">á»</l:l>
-<l:l i="90">á»</l:l>
-<l:l i="90">á»</l:l>
-<l:l i="100">J</l:l>
-<l:l i="100">j</l:l>
-<l:l i="100">ÄŽ</l:l>
-<l:l i="100">Äµ</l:l>
-<l:l i="100">Ç°</l:l>
-<l:l i="100">Ê</l:l>
-<l:l i="110">K</l:l>
-<l:l i="110">k</l:l>
-<l:l i="110">Ä¶</l:l>
-<l:l i="110">Ä·</l:l>
-<l:l i="110">Æ</l:l>
-<l:l i="110">Æ</l:l>
-<l:l i="110">Çš</l:l>
-<l:l i="110">Ç©</l:l>
-<l:l i="110">áž°</l:l>
-<l:l i="110">áž±</l:l>
-<l:l i="110">áž²</l:l>
-<l:l i="110">áž³</l:l>
-<l:l i="110">ážŽ</l:l>
-<l:l i="110">ážµ</l:l>
-<l:l i="120">L</l:l>
-<l:l i="120">l</l:l>
-<l:l i="120">Ä¹</l:l>
-<l:l i="120">Äº</l:l>
-<l:l i="120">Ä»</l:l>
-<l:l i="120">ÄŒ</l:l>
-<l:l i="120">Äœ</l:l>
-<l:l i="120">ÄŸ</l:l>
-<l:l i="120">Ä¿</l:l>
-<l:l i="120">Å</l:l>
-<l:l i="120">Å</l:l>
-<l:l i="120">Å</l:l>
-<l:l i="120">Æ</l:l>
-<l:l i="120">Ç</l:l>
-<l:l i="120">ÈŽ</l:l>
-<l:l i="120">É«</l:l>
-<l:l i="120">É¬</l:l>
-<l:l i="120">É­</l:l>
-<l:l i="120">áž¶</l:l>
-<l:l i="120">áž·</l:l>
-<l:l i="120">ážž</l:l>
-<l:l i="120">áž¹</l:l>
-<l:l i="120">ážº</l:l>
-<l:l i="120">áž»</l:l>
-<l:l i="120">ážŒ</l:l>
-<l:l i="120">ážœ</l:l>
-<l:l i="130">M</l:l>
-<l:l i="130">m</l:l>
-<l:l i="130">É±</l:l>
-<l:l i="130">ážŸ</l:l>
-<l:l i="130">áž¿</l:l>
-<l:l i="130">á¹</l:l>
-<l:l i="130">á¹</l:l>
-<l:l i="130">á¹</l:l>
-<l:l i="130">á¹</l:l>
-<l:l i="140">N</l:l>
-<l:l i="140">n</l:l>
-<l:l i="140">Ã</l:l>
-<l:l i="140">Ã±</l:l>
-<l:l i="140">Å</l:l>
-<l:l i="140">Å</l:l>
-<l:l i="140">Å
-</l:l>
-<l:l i="140">Å</l:l>
-<l:l i="140">Å</l:l>
-<l:l i="140">Å</l:l>
-<l:l i="140">Æ</l:l>
-<l:l i="140">É²</l:l>
-<l:l i="140">Æ</l:l>
-<l:l i="140">È </l:l>
-<l:l i="140">Ç</l:l>
-<l:l i="140">Çž</l:l>
-<l:l i="140">Ç¹</l:l>
-<l:l i="140">Èµ</l:l>
-<l:l i="140">É³</l:l>
-<l:l i="140">á¹</l:l>
-<l:l i="140">á¹
-</l:l>
-<l:l i="140">á¹</l:l>
-<l:l i="140">á¹</l:l>
-<l:l i="140">á¹</l:l>
-<l:l i="140">á¹</l:l>
-<l:l i="140">á¹</l:l>
-<l:l i="140">á¹</l:l>
-<l:l i="150">O</l:l>
-<l:l i="150">o</l:l>
-<l:l i="150">Ã</l:l>
-<l:l i="150">Ã²</l:l>
-<l:l i="150">Ã</l:l>
-<l:l i="150">Ã³</l:l>
-<l:l i="150">Ã</l:l>
-<l:l i="150">ÃŽ</l:l>
-<l:l i="150">Ã</l:l>
-<l:l i="150">Ãµ</l:l>
-<l:l i="150">Ã</l:l>
-<l:l i="150">Ã¶</l:l>
-<l:l i="150">Ã</l:l>
-<l:l i="150">Ãž</l:l>
-<l:l i="150">Å</l:l>
-<l:l i="150">Å</l:l>
-<l:l i="150">Å</l:l>
-<l:l i="150">Å</l:l>
-<l:l i="150">Å</l:l>
-<l:l i="150">Å</l:l>
-<l:l i="150">Æ</l:l>
-<l:l i="150">Æ </l:l>
-<l:l i="150">Æ¡</l:l>
-<l:l i="150">Ç</l:l>
-<l:l i="150">Ç</l:l>
-<l:l i="150">Çª</l:l>
-<l:l i="150">Ç«</l:l>
-<l:l i="150">Ç¬</l:l>
-<l:l i="150">Ç­</l:l>
-<l:l i="150">ÇŸ</l:l>
-<l:l i="150">Ç¿</l:l>
-<l:l i="150">È</l:l>
-<l:l i="150">È</l:l>
-<l:l i="150">È</l:l>
-<l:l i="150">È</l:l>
-<l:l i="150">Èª</l:l>
-<l:l i="150">È«</l:l>
-<l:l i="150">È¬</l:l>
-<l:l i="150">È­</l:l>
-<l:l i="150">È®</l:l>
-<l:l i="150">È¯</l:l>
-<l:l i="150">È°</l:l>
-<l:l i="150">È±</l:l>
-<l:l i="150">á¹</l:l>
-<l:l i="150">á¹</l:l>
-<l:l i="150">á¹</l:l>
-<l:l i="150">á¹</l:l>
-<l:l i="150">á¹</l:l>
-<l:l i="150">á¹</l:l>
-<l:l i="150">á¹</l:l>
-<l:l i="150">á¹</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á» </l:l>
-<l:l i="150">á»¡</l:l>
-<l:l i="150">á»¢</l:l>
-<l:l i="150">á»£</l:l>
-<l:l i="160">P</l:l>
-<l:l i="160">p</l:l>
-<l:l i="160">Æ€</l:l>
-<l:l i="160">Æ¥</l:l>
-<l:l i="160">á¹</l:l>
-<l:l i="160">á¹</l:l>
-<l:l i="160">á¹</l:l>
-<l:l i="160">á¹</l:l>
-<l:l i="170">Q</l:l>
-<l:l i="170">q</l:l>
-<l:l i="170">Ê </l:l>
-<l:l i="180">R</l:l>
-<l:l i="180">r</l:l>
-<l:l i="180">Å</l:l>
-<l:l i="180">Å</l:l>
-<l:l i="180">Å</l:l>
-<l:l i="180">Å</l:l>
-<l:l i="180">Å</l:l>
-<l:l i="180">Å</l:l>
-<l:l i="180">È</l:l>
-<l:l i="180">È</l:l>
-<l:l i="180">È</l:l>
-<l:l i="180">È</l:l>
-<l:l i="180">ÉŒ</l:l>
-<l:l i="180">Éœ</l:l>
-<l:l i="180">ÉŸ</l:l>
-<l:l i="180">á¹</l:l>
-<l:l i="180">á¹</l:l>
-<l:l i="180">á¹</l:l>
-<l:l i="180">á¹</l:l>
-<l:l i="180">á¹</l:l>
-<l:l i="180">á¹</l:l>
-<l:l i="180">á¹</l:l>
-<l:l i="180">á¹</l:l>
-<l:l i="190">S</l:l>
-<l:l i="190">s</l:l>
-<l:l i="190">Å</l:l>
-<l:l i="190">Å</l:l>
-<l:l i="190">Å</l:l>
-<l:l i="190">Å</l:l>
-<l:l i="190">Å</l:l>
-<l:l i="190">Å</l:l>
-<l:l i="190">Å </l:l>
-<l:l i="190">Å¡</l:l>
-<l:l i="190">È</l:l>
-<l:l i="190">È</l:l>
-<l:l i="190">Ê</l:l>
-<l:l i="190">á¹ </l:l>
-<l:l i="190">á¹¡</l:l>
-<l:l i="190">á¹¢</l:l>
-<l:l i="190">á¹£</l:l>
-<l:l i="190">á¹€</l:l>
-<l:l i="190">á¹¥</l:l>
-<l:l i="190">á¹Š</l:l>
-<l:l i="190">á¹§</l:l>
-<l:l i="190">á¹š</l:l>
-<l:l i="190">á¹©</l:l>
-<l:l i="200">T</l:l>
-<l:l i="200">t</l:l>
-<l:l i="200">Å¢</l:l>
-<l:l i="200">Å£</l:l>
-<l:l i="200">Å€</l:l>
-<l:l i="200">Å¥</l:l>
-<l:l i="200">ÅŠ</l:l>
-<l:l i="200">Å§</l:l>
-<l:l i="200">Æ«</l:l>
-<l:l i="200">Æ¬</l:l>
-<l:l i="200">Æ­</l:l>
-<l:l i="200">Æ®</l:l>
-<l:l i="200">Ê</l:l>
-<l:l i="200">È</l:l>
-<l:l i="200">È</l:l>
-<l:l i="200">È¶</l:l>
-<l:l i="200">á¹ª</l:l>
-<l:l i="200">á¹«</l:l>
-<l:l i="200">á¹¬</l:l>
-<l:l i="200">á¹­</l:l>
-<l:l i="200">á¹®</l:l>
-<l:l i="200">á¹¯</l:l>
-<l:l i="200">á¹°</l:l>
-<l:l i="200">á¹±</l:l>
-<l:l i="200">áº</l:l>
-<l:l i="210">U</l:l>
-<l:l i="210">u</l:l>
-<l:l i="210">Ã</l:l>
-<l:l i="210">Ã¹</l:l>
-<l:l i="210">Ã</l:l>
-<l:l i="210">Ãº</l:l>
-<l:l i="210">Ã</l:l>
-<l:l i="210">Ã»</l:l>
-<l:l i="210">Ã</l:l>
-<l:l i="210">ÃŒ</l:l>
-<l:l i="210">Åš</l:l>
-<l:l i="210">Å©</l:l>
-<l:l i="210">Åª</l:l>
-<l:l i="210">Å«</l:l>
-<l:l i="210">Å¬</l:l>
-<l:l i="210">Å­</l:l>
-<l:l i="210">Å®</l:l>
-<l:l i="210">Å¯</l:l>
-<l:l i="210">Å°</l:l>
-<l:l i="210">Å±</l:l>
-<l:l i="210">Å²</l:l>
-<l:l i="210">Å³</l:l>
-<l:l i="210">Æ¯</l:l>
-<l:l i="210">Æ°</l:l>
-<l:l i="210">Ç</l:l>
-<l:l i="210">Ç</l:l>
-<l:l i="210">Ç</l:l>
-<l:l i="210">Ç</l:l>
-<l:l i="210">Ç</l:l>
-<l:l i="210">Ç</l:l>
-<l:l i="210">Ç</l:l>
-<l:l i="210">Ç</l:l>
-<l:l i="210">Ç</l:l>
-<l:l i="210">Ç</l:l>
-<l:l i="210">È</l:l>
-<l:l i="210">È</l:l>
-<l:l i="210">È</l:l>
-<l:l i="210">È</l:l>
-<l:l i="210">á¹²</l:l>
-<l:l i="210">á¹³</l:l>
-<l:l i="210">á¹Ž</l:l>
-<l:l i="210">á¹µ</l:l>
-<l:l i="210">á¹¶</l:l>
-<l:l i="210">á¹·</l:l>
-<l:l i="210">á¹ž</l:l>
-<l:l i="210">á¹¹</l:l>
-<l:l i="210">á¹º</l:l>
-<l:l i="210">á¹»</l:l>
-<l:l i="210">á»€</l:l>
-<l:l i="210">á»¥</l:l>
-<l:l i="210">á»Š</l:l>
-<l:l i="210">á»§</l:l>
-<l:l i="210">á»š</l:l>
-<l:l i="210">á»©</l:l>
-<l:l i="210">á»ª</l:l>
-<l:l i="210">á»«</l:l>
-<l:l i="210">á»¬</l:l>
-<l:l i="210">á»­</l:l>
-<l:l i="210">á»®</l:l>
-<l:l i="210">á»¯</l:l>
-<l:l i="210">á»°</l:l>
-<l:l i="210">á»±</l:l>
-<l:l i="220">V</l:l>
-<l:l i="220">v</l:l>
-<l:l i="220">Æ²</l:l>
-<l:l i="220">Ê</l:l>
-<l:l i="220">á¹Œ</l:l>
-<l:l i="220">á¹œ</l:l>
-<l:l i="220">á¹Ÿ</l:l>
-<l:l i="220">á¹¿</l:l>
-<l:l i="230">W</l:l>
-<l:l i="230">w</l:l>
-<l:l i="230">ÅŽ</l:l>
-<l:l i="230">Åµ</l:l>
-<l:l i="230">áº</l:l>
-<l:l i="230">áº</l:l>
-<l:l i="230">áº</l:l>
-<l:l i="230">áº</l:l>
-<l:l i="230">áº</l:l>
-<l:l i="230">áº
-</l:l>
-<l:l i="230">áº</l:l>
-<l:l i="230">áº</l:l>
-<l:l i="230">áº</l:l>
-<l:l i="230">áº</l:l>
-<l:l i="230">áº</l:l>
-<l:l i="240">X</l:l>
-<l:l i="240">x</l:l>
-<l:l i="240">áº</l:l>
-<l:l i="240">áº</l:l>
-<l:l i="240">áº</l:l>
-<l:l i="240">áº</l:l>
-<l:l i="250">Y</l:l>
-<l:l i="250">y</l:l>
-<l:l i="250">Ã</l:l>
-<l:l i="250">Ãœ</l:l>
-<l:l i="250">Ã¿</l:l>
-<l:l i="250">Åž</l:l>
-<l:l i="250">Å¶</l:l>
-<l:l i="250">Å·</l:l>
-<l:l i="250">Æ³</l:l>
-<l:l i="250">ÆŽ</l:l>
-<l:l i="250">È²</l:l>
-<l:l i="250">È³</l:l>
-<l:l i="250">áº</l:l>
-<l:l i="250">áº</l:l>
-<l:l i="250">áº</l:l>
-<l:l i="250">á»²</l:l>
-<l:l i="250">á»³</l:l>
-<l:l i="250">á»Ž</l:l>
-<l:l i="250">á»µ</l:l>
-<l:l i="250">á»¶</l:l>
-<l:l i="250">á»·</l:l>
-<l:l i="250">á»ž</l:l>
-<l:l i="250">á»¹</l:l>
-<l:l i="260">Z</l:l>
-<l:l i="260">z</l:l>
-<l:l i="260">Å¹</l:l>
-<l:l i="260">Åº</l:l>
-<l:l i="260">Å»</l:l>
-<l:l i="260">ÅŒ</l:l>
-<l:l i="260">Åœ</l:l>
-<l:l i="260">ÅŸ</l:l>
-<l:l i="260">Æµ</l:l>
-<l:l i="260">Æ¶</l:l>
-<l:l i="260">È€</l:l>
-<l:l i="260">È¥</l:l>
-<l:l i="260">Ê</l:l>
-<l:l i="260">Ê</l:l>
-<l:l i="260">áº</l:l>
-<l:l i="260">áº</l:l>
-<l:l i="260">áº</l:l>
-<l:l i="260">áº</l:l>
-<l:l i="260">áº</l:l>
-<l:l i="260">áº</l:l>
-</l:letters>
-</l:l10n>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/entities.ent
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/entities.ent	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,47 +1,0 @@
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-     
-     This file contains common entity declarations used for
-     sorting by various templates.
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<!ENTITY lowercase "'Aa&#192;&#224;&#193;&#225;&#194;&#226;&#195;&#227;&#196;&#228;&#197;&#229;&#256;&#257;&#258;&#259;&#260;&#261;&#461;&#462;&#478;&#479;&#480;&#481;&#506;&#507;&#512;&#513;&#514;&#515;&#550;&#551;&#7680;&#7681;&#7834;&#7840;&#7841;&#7842;&#7843;&#7844;&#7845;&#7846;&#7847;&#7848;&#7849;&#7850;&#7851;&#7852;&#7853;&#7854;&#7855;&#7856;&#7857;&#7858;&#7859;&#7860;&#7861;&#7862;&#7863;Bb&#384;&#385;&#595;&#386;&#387;&#7682;&#7683;&#7684;&#7685;&#7686;&#7687;Cc&#199;&#231;&#262;&#263;&#264;&#265;&#266;&#267;&#268;&#269;&#391;&#392;&#597;&#7688;&#7689;Dd&#270;&#271;&#272;&#273;&#394;&#599;&#395;&#396;&#453;&#498;&#545;&#598;&#7690;&#7691;&#7692;&#7693;&#7694;&#7695;&#7696;&#7697;&#7698;&#7699;Ee&#200;&#232;&#201;&#233;&#202;&#234;&#203;&#235;&#274;&#275;&#276;&#277;&#278;&#279;&#280;&#281;&#282;&#283;&#516;&#517;&#518;&#519;&#552;&#553;&#7700;&#7701;&#7702;&#7703;&#7704;&#7705;&#7706;&#7707;&#7708;&#7709;&#7864;&#7865;&#7866;&#7867;&#7868;&#7869;&#7870;&#7871;&#7872;&#7873;&#7874;&#7875;&#7876;&#7877;&#7878;&#7879;Ff&#401;&#402;&#7710;&#7711;Gg&#284;&#285;&#286;&#287;&#288;&#289;&#290;&#291;&#403;&#608;&#484;&#485;&#486;&#487;&#500;&#501;&#7712;&#7713;Hh&#292;&#293;&#294;&#295;&#542;&#543;&#614;&#7714;&#7715;&#7716;&#7717;&#7718;&#7719;&#7720;&#7721;&#7722;&#7723;&#7830;Ii&#204;&#236;&#205;&#237;&#206;&#238;&#207;&#239;&#296;&#297;&#298;&#299;&#300;&#301;&#302;&#303;&#304;&#407;&#616;&#463;&#464;&#520;&#521;&#522;&#523;&#7724;&#7725;&#7726;&#7727;&#7880;&#7881;&#7882;&#7883;Jj&#308;&#309;&#496;&#669;Kk&#310;&#311;&#408;&#409;&#488;&#489;&#7728;&#7729;&#7730;&#7731;&#7732;&#7733;Ll&#313;&#314;&#315;&#316;&#317;&#318;&#319;&#320;&#321;&#322;&#410;&#456;&#564;&#619;&#620;&#621;&#7734;&#7735;&#7736;&#7737;&#7738;&#7739;&#7740;&#7741;Mm&#625;&#7742;&#7743;&#7744;&#7745;&#7746;&#7747;Nn&#209;&#241;&#323;&#324;&#325;&#326;&#327;&#328;&#413;&#626;&#414;&#544;&#459;&#504;&#505;&#565;&#627;&#7748;&#7749;&#7750;&#7751;&#7752;&#7753;&#7754;&#7755;Oo&#210;&#242;&#211;&#243;&#212;&#244;&#213;&#245;&#214;&#246;&#216;&#248;&#332;&#333;&#334;&#335;&#336;&#337;&#415;&#416;&#417;&#465;&#466;&#490;&#491;&#492;&#493;&#510;&#511;&#524;&#525;&#526;&#527;&#554;&#555;&#556;&#557;&#558;&#559;&#560;&#561;&#7756;&#7757;&#7758;&#7759;&#7760;&#7761;&#7762;&#7763;&#7884;&#7885;&#7886;&#7887;&#7888;&#7889;&#7890;&#7891;&#7892;&#7893;&#7894;&#7895;&#7896;&#7897;&#7898;&#7899;&#7900;&#7901;&#7902;&#7903;&#7904;&#7905;&#7906;&#7907;Pp&#420;&#421;&#7764;&#7765;&#7766;&#7767;Qq&#672;Rr&#340;&#341;&#342;&#343;&#344;&#345;&#528;&#529;&#530;&#531;&#636;&#637;&#638;&#7768;&#7769;&#7770;&#7771;&#7772;&#7773;&#7774;&#7775;Ss&#346;&#347;&#348;&#349;&#350;&#351;&#352;&#353;&#536;&#537;&#642;&#7776;&#7777;&#7778;&#7779;&#7780;&#7781;&#7782;&#7783;&#7784;&#7785;Tt&#354;&#355;&#356;&#357;&#358;&#359;&#427;&#428;&#429;&#430;&#648;&#538;&#539;&#566;&#7786;&#7787;&#7788;&#7789;&#7790;&#7791;&#7792;&#7793;&#7831;Uu&#217;&#249;&#218;&#250;&#219;&#251;&#220;&#252;&#360;&#361;&#362;&#363;&#364;&#365;&#366;&#367;&#368;&#369;&#370;&#371;&#431;&#432;&#467;&#468;&#469;&#470;&#471;&#472;&#473;&#474;&#475;&#476;&#532;&#533;&#534;&#535;&#7794;&#7795;&#7796;&#7797;&#7798;&#7799;&#7800;&#7801;&#7802;&#7803;&#7908;&#7909;&#7910;&#7911;&#7912;&#7913;&#7914;&#7915;&#7916;&#7917;&#7918;&#7919;&#7920;&#7921;Vv&#434;&#651;&#7804;&#7805;&#7806;&#7807;Ww&#372;&#373;&#7808;&#7809;&#7810;&#7811;&#7812;&#7813;&#7814;&#7815;&#7816;&#7817;&#7832;Xx&#7818;&#7819;&#7820;&#7821;Yy&#221;&#253;&#255;&#376;&#374;&#375;&#435;&#436;&#562;&#563;&#7822;&#7823;&#7833;&#7922;&#7923;&#7924;&#7925;&#7926;&#7927;&#7928;&#7929;Zz&#377;&#378;&#379;&#380;&#381;&#382;&#437;&#438;&#548;&#549;&#656;&#657;&#7824;&#7825;&#7826;&#7827;&#7828;&#7829;&#7829;'">
-<!ENTITY uppercase "'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ'">
-
-<!ENTITY primary   'normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = ""]))'>
-<!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas) or @sortas = ""]))'>
-<!ENTITY tertiary  'normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas) or @sortas = ""]))'>
-
-
-<!ENTITY section   '(ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage)[last()]'>
-
-<!ENTITY section.id 'generate-id(&section;)'>
-<!ENTITY sep '" "'>
-
-<!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))'>
-
-<!ENTITY setup-language-variable '
-<xsl:variable name="language" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-  <xsl:call-template name="l10n.language"/>
-</xsl:variable>
-
-<xsl:variable name="lowercase" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-  <xsl:call-template name="gentext">
-    <xsl:with-param name="key">normalize.sort.input</xsl:with-param>
-  </xsl:call-template>
-</xsl:variable>
-
-<xsl:variable name="uppercase" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-  <xsl:call-template name="gentext">
-    <xsl:with-param name="key">normalize.sort.output</xsl:with-param>
-  </xsl:call-template>
-</xsl:variable>
-'>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/es.xml
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/es.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,679 +1,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="es" english-language-name="Spanish">
-
-<!-- * This file is generated automatically. -->
-<!-- * To submit changes to this file upstream (to the DocBook Project) -->
-<!-- * do not submit an edited version of this file. Instead, submit an -->
-<!-- * edited version of the source file at the following location: -->
-<!-- * -->
-<!-- *  https://svn.sourceforge.net/svnroot/docbook/trunk/gentext/locale/es.xml -->
-<!-- * -->
-<!-- * E-mail the edited es.xml source file to: -->
-<!-- * -->
-<!-- *  docbook-developers@lists.sourceforge.net -->
-
-<!-- ******************************************************************** -->
-
-<!-- This file is part of the XSL DocBook Stylesheet distribution. -->
-<!-- See ../README or http://docbook.sf.net/release/xsl/current/ for -->
-<!-- copyright and other information. -->
-
-<!-- ******************************************************************** -->
-<!-- In these files, % with a letter is used for a placeholder: -->
-<!--   %t is the current element's title -->
-<!--   %s is the current element's subtitle (if applicable)-->
-<!--   %n is the current element's number label-->
-<!--   %p is the current element's page number (if applicable)-->
-<!-- ******************************************************************** -->
-
-
-<l:gentext key="Abstract" text="Resumen"/>
-<l:gentext key="abstract" text="resumen"/>
-<l:gentext key="Answer" text="R:"/>
-<l:gentext key="answer" text="r:"/>
-<l:gentext key="Appendix" text="ApÃ©ndice"/>
-<l:gentext key="appendix" text="apÃ©ndice"/>
-<l:gentext key="Article" text="ArtÃ­culo"/>
-<l:gentext key="article" text="artÃ­culo"/>
-<l:gentext key="Author" text="Autor"/>
-<l:gentext key="Bibliography" text="BibliografÃ­a"/>
-<l:gentext key="bibliography" text="bibliografÃ­a"/>
-<l:gentext key="Book" text="Libro"/>
-<l:gentext key="book" text="libro"/>
-<l:gentext key="CAUTION" text="ATENCIÃN"/>
-<l:gentext key="Caution" text="AtenciÃ³n"/>
-<l:gentext key="caution" text="atenciÃ³n"/>
-<l:gentext key="Chapter" text="CapÃ­tulo"/>
-<l:gentext key="chapter" text="capÃ­tulo"/>
-<l:gentext key="Colophon" text="ColofÃ³n"/>
-<l:gentext key="colophon" text="colofÃ³n"/>
-<l:gentext key="Copyright" text="Copyright"/>
-<l:gentext key="copyright" text="copyright"/>
-<l:gentext key="Dedication" text="Dedicatoria"/>
-<l:gentext key="dedication" text="dedicatoria"/>
-<l:gentext key="Edition" text="EdiciÃ³n"/>
-<l:gentext key="edition" text="ediciÃ³n"/>
-<l:gentext key="Editor" text="Editor" lang="en"/>
-<l:gentext key="Equation" text="EcuaciÃ³n"/>
-<l:gentext key="equation" text="ecuaciÃ³n"/>
-<l:gentext key="Example" text="Ejemplo"/>
-<l:gentext key="example" text="ejemplo"/>
-<l:gentext key="Figure" text="Figura"/>
-<l:gentext key="figure" text="figura"/>
-<l:gentext key="Glossary" text="Glosario"/>
-<l:gentext key="glossary" text="glosario"/>
-<l:gentext key="GlossSee" text="Ver"/>
-<l:gentext key="glosssee" text="ver"/>
-<l:gentext key="GlossSeeAlso" text="Ver tambiÃ©n"/>
-<l:gentext key="glossseealso" text="ver tambiÃ©n"/>
-<l:gentext key="IMPORTANT" text="IMPORTANTE"/>
-<l:gentext key="important" text="importante"/>
-<l:gentext key="Important" text="Importante"/>
-<l:gentext key="Index" text="Ãndice"/>
-<l:gentext key="index" text="Ã­ndice"/>
-<l:gentext key="ISBN" text="ISBN"/>
-<l:gentext key="isbn" text="isbn"/>
-<l:gentext key="LegalNotice" text="Aviso Legal"/>
-<l:gentext key="legalnotice" text="aviso legal"/>
-<l:gentext key="MsgAud" text="Audiencia"/>
-<l:gentext key="msgaud" text="audiencia"/>
-<l:gentext key="MsgLevel" text="Nivel"/>
-<l:gentext key="msglevel" text="nivel"/>
-<l:gentext key="MsgOrig" text="Origen"/>
-<l:gentext key="msgorig" text="origen"/>
-<l:gentext key="NOTE" text="NOTA"/>
-<l:gentext key="Note" text="Nota"/>
-<l:gentext key="note" text="nota"/>
-<l:gentext key="Part" text="Parte"/>
-<l:gentext key="part" text="parte"/>
-<l:gentext key="Preface" text="Prefacio"/>
-<l:gentext key="preface" text="prefacio"/>
-<l:gentext key="Procedure" text="Procedimiento"/>
-<l:gentext key="procedure" text="procedimiento"/>
-<l:gentext key="ProductionSet" text="ProducciÃ³n"/>
-<l:gentext key="PubDate" text="Fecha de publicaciÃ³n"/>
-<l:gentext key="pubdate" text="fecha de publicaciÃ³n"/>
-<l:gentext key="Published" text="Publicado"/>
-<l:gentext key="published" text="publicado"/>
-<l:gentext key="Publisher" text="Publisher" lang="en"/>
-<l:gentext key="Qandadiv" text="P y R"/>
-<l:gentext key="qandadiv" text="P y R"/>
-<l:gentext key="QandASet" text="Frequently Asked Questions" lang="en"/>
-<l:gentext key="Question" text="P:"/>
-<l:gentext key="question" text="p:"/>
-<l:gentext key="RefEntry" text="Entrada de referencia"/>
-<l:gentext key="refentry" text="entrada de referencia"/>
-<l:gentext key="Reference" text="Referencia"/>
-<l:gentext key="reference" text="referencia"/>
-<l:gentext key="References" text="References" lang="en"/>
-<l:gentext key="RefName" text="Nombre de referencia"/>
-<l:gentext key="refname" text="nombre de referencia"/>
-<l:gentext key="RefSection" text="SecciÃ³n de referencia"/>
-<l:gentext key="refsection" text="secciÃ³n de referencia"/>
-<l:gentext key="RefSynopsisDiv" text="Sinopsis"/>
-<l:gentext key="refsynopsisdiv" text="sinopsis"/>
-<l:gentext key="RevHistory" text="Historial de revisiones"/>
-<l:gentext key="revhistory" text="Historial de revisiones"/>
-<l:gentext key="revision" text="revisiÃ³n"/>
-<l:gentext key="Revision" text="RevisiÃ³n"/>
-<l:gentext key="sect1" text="SecciÃ³n"/>
-<l:gentext key="sect2" text="SecciÃ³n"/>
-<l:gentext key="sect3" text="SecciÃ³n"/>
-<l:gentext key="sect4" text="SecciÃ³n"/>
-<l:gentext key="sect5" text="SecciÃ³n"/>
-<l:gentext key="section" text="secciÃ³n"/>
-<l:gentext key="Section" text="SecciÃ³n"/>
-<l:gentext key="see" text="ver"/>
-<l:gentext key="See" text="Ver"/>
-<l:gentext key="seealso" text="ver tambiÃ©n"/>
-<l:gentext key="Seealso" text="Ver tambiÃ©n"/>
-<l:gentext key="SeeAlso" text="Ver TambiÃ©n"/>
-<l:gentext key="set" text="conjunto"/>
-<l:gentext key="Set" text="Conjunto"/>
-<l:gentext key="setindex" text="Ã­ndice del conjunto"/>
-<l:gentext key="SetIndex" text="Ãndice del Conjunto"/>
-<l:gentext key="Sidebar" text="Barra lateral"/>
-<l:gentext key="sidebar" text="barra lateral"/>
-<l:gentext key="step" text="paso"/>
-<l:gentext key="Step" text="Paso"/>
-<l:gentext key="table" text="tabla"/>
-<l:gentext key="Table" text="Tabla"/>
-<l:gentext key="task" text="Task" lang="en"/>
-<l:gentext key="Task" text="Task" lang="en"/>
-<l:gentext key="tip" text="sugerencia"/>
-<l:gentext key="TIP" text="SUGERENCIA"/>
-<l:gentext key="Tip" text="Sugerencia"/>
-<l:gentext key="Warning" text="Aviso"/>
-<l:gentext key="warning" text="aviso"/>
-<l:gentext key="WARNING" text="AVISO"/>
-<l:gentext key="and" text="y"/>
-<l:gentext key="by" text="por"/>
-<l:gentext key="Edited" text="Editado"/>
-<l:gentext key="edited" text="editado"/>
-<l:gentext key="Editedby" text="Editado por"/>
-<l:gentext key="editedby" text="editado por"/>
-<l:gentext key="in" text="en"/>
-<l:gentext key="lastlistcomma" text=","/>
-<l:gentext key="listcomma" text=","/>
-<l:gentext key="nonexistantelement" text="elemento inexistente"/>
-<l:gentext key="notes" text="notas"/>
-<l:gentext key="Notes" text="Notas"/>
-<l:gentext key="Pgs" text="PÃ¡gs."/>
-<l:gentext key="pgs" text="pÃ¡gs."/>
-<l:gentext key="Revisedby" text="Revisado por: "/>
-<l:gentext key="revisedby" text="revisado por: "/>
-<l:gentext key="TableNotes" text="Notas de tabla"/>
-<l:gentext key="tablenotes" text="notas de tabla"/>
-<l:gentext key="TableofContents" text="Tabla de contenidos"/>
-<l:gentext key="tableofcontents" text="tabla de contenidos"/>
-<l:gentext key="unexpectedelementname" text="nombre de elemento inesperado"/>
-<l:gentext key="unsupported" text="no soportado"/>
-<l:gentext key="xrefto" text="referencia a"/>
-<l:gentext key="Authors" text="Authors" lang="en"/>
-<l:gentext key="copyeditor" text="Copy Editor" lang="en"/>
-<l:gentext key="graphicdesigner" text="Graphic Designer" lang="en"/>
-<l:gentext key="productioneditor" text="Production Editor" lang="en"/>
-<l:gentext key="technicaleditor" text="Technical Editor" lang="en"/>
-<l:gentext key="translator" text="Translator" lang="en"/>
-<l:gentext key="listofequations" text="lista de ecuaciones"/>
-<l:gentext key="ListofEquations" text="Lista de ecuaciones"/>
-<l:gentext key="ListofExamples" text="Lista de ejemplos"/>
-<l:gentext key="listofexamples" text="lista de ejemplos"/>
-<l:gentext key="ListofFigures" text="Lista de figuras"/>
-<l:gentext key="listoffigures" text="lista de figuras"/>
-<l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
-<l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
-<l:gentext key="listoftables" text="lista de tablas"/>
-<l:gentext key="ListofTables" text="Lista de tablas"/>
-<l:gentext key="ListofUnknown" text="Lista de desconocido"/>
-<l:gentext key="listofunknown" text="lista de desconocido"/>
-<l:gentext key="nav-home" text="Inicio"/>
-<l:gentext key="nav-next" text="Siguiente"/>
-<l:gentext key="nav-next-sibling" text="Avanzar"/>
-<l:gentext key="nav-prev" text="Anterior"/>
-<l:gentext key="nav-prev-sibling" text="Retroceder"/>
-<l:gentext key="nav-up" text="Subir"/>
-<l:gentext key="nav-toc" text="ToC" lang="en"/>
-<l:gentext key="Draft" text="Borrador"/>
-<l:gentext key="above" text="arriba"/>
-<l:gentext key="below" text="abajo"/>
-<l:gentext key="sectioncalled" text="secciÃ³n llamada"/>
-<l:gentext key="index symbols" text="SÃ­mbolos"/>
-<l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyzÃ¡Ã©Ã­Ã³ÃºÃ±"/>
-<l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZÃÃÃÃÃÃ"/>
-<l:gentext key="normalize.sort.input" text="AaÃÃ ÃÃ¡ÃÃ¢ÃÃ£ÃÃ€Ã
-Ã¥ÄÄÄÄÄÄ
-ÇÇÇÇÇ Ç¡ÇºÇ»ÈÈÈÈÈŠÈ§ážážáºáº áº¡áº¢áº£áº€áº¥áºŠáº§áºšáº©áºªáº«áº¬áº­áº®áº¯áº°áº±áº²áº³áºŽáºµáº¶áº·BbÆÆÉÆÆážážážáž
-ážážCcÃÃ§ÄÄÄÄÄÄÄÄÆÆÉážážDdÄÄÄÄÆÉÆÆÇ
-Ç²È¡ÉážážážážážážážážážážEeÃÃšÃÃ©ÃÃªÃÃ«ÄÄÄÄÄÄÄÄÄÄÈÈ
-ÈÈÈšÈ©ážážážážážážážážážážáºžáº¹áººáº»áºŒáºœáºŸáº¿á»á»á»á»á»á»
-á»á»FfÆÆážážGgÄÄÄÄÄ Ä¡Ä¢Ä£ÆÉ Ç€Ç¥ÇŠÇ§ÇŽÇµáž áž¡HhÄ€Ä¥ÄŠÄ§ÈÈÉŠáž¢áž£áž€áž¥ážŠáž§ážšáž©ážªáž«áºIiÃÃ¬ÃÃ­ÃÃ®ÃÃ¯ÄšÄ©ÄªÄ«Ä¬Ä­Ä®Ä¯Ä°ÆÉšÇÇÈÈÈÈáž¬áž­áž®áž¯á»á»á»á»JjÄŽÄµÇ°ÊKkÄ¶Ä·ÆÆÇšÇ©áž°áž±áž²áž³ážŽážµLlÄ¹ÄºÄ»ÄŒÄœÄŸÄ¿ÅÅÅÆÇÈŽÉ«É¬É­áž¶áž·ážžáž¹ážºáž»ážŒážœMmÉ±ážŸáž¿á¹á¹á¹á¹NnÃÃ±ÅÅÅ
-ÅÅÅÆÉ²ÆÈ ÇÇžÇ¹ÈµÉ³á¹á¹
-á¹á¹á¹á¹á¹á¹OoÃÃ²ÃÃ³ÃÃŽÃÃµÃÃ¶ÃÃžÅÅÅÅÅÅÆÆ Æ¡ÇÇÇªÇ«Ç¬Ç­ÇŸÇ¿ÈÈÈÈÈªÈ«È¬È­È®È¯È°È±á¹á¹á¹á¹á¹á¹á¹á¹á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á» á»¡á»¢á»£PpÆ€Æ¥á¹á¹á¹á¹QqÊ RrÅÅÅÅÅÅÈÈÈÈÉŒÉœÉŸá¹á¹á¹á¹á¹á¹á¹á¹SsÅÅÅÅÅÅÅ Å¡ÈÈÊá¹ á¹¡á¹¢á¹£á¹€á¹¥á¹Šá¹§á¹šá¹©TtÅ¢Å£Å€Å¥ÅŠÅ§Æ«Æ¬Æ­Æ®ÊÈÈÈ¶á¹ªá¹«á¹¬á¹­á¹®á¹¯á¹°á¹±áºUuÃÃ¹ÃÃºÃÃ»ÃÃŒÅšÅ©ÅªÅ«Å¬Å­Å®Å¯Å°Å±Å²Å³Æ¯Æ°ÇÇÇÇÇÇÇÇÇÇÈÈÈÈá¹²á¹³á¹Žá¹µá¹¶á¹·á¹žá¹¹á¹ºá¹»á»€á»¥á»Šá»§á»šá»©á»ªá»«á»¬á»­á»®á»¯á»°á»±VvÆ²Êá¹Œá¹œá¹Ÿá¹¿WwÅŽÅµáºáºáºáºáºáº
-áºáºáºáºáºXxáºáºáºáºYyÃÃœÃ¿ÅžÅ¶Å·Æ³ÆŽÈ²È³áºáºáºá»²á»³á»Žá»µá»¶á»·á»žá»¹ZzÅ¹ÅºÅ»ÅŒÅœÅŸÆµÆ¶È€È¥ÊÊáºáºáºáºáºáºáº" lang="en"/>
-<l:gentext key="normalize.sort.output" text="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ" lang="en"/>
-<l:dingbat key="startquote" text="â"/>
-<l:dingbat key="endquote" text="â"/>
-<l:dingbat key="nestedstartquote" text="â"/>
-<l:dingbat key="nestedendquote" text="â"/>
-<l:dingbat key="singlestartquote" text="â" lang="en"/>
-<l:dingbat key="singleendquote" text="â" lang="en"/>
-<l:dingbat key="bullet" text="â¢"/>
-<l:gentext key="hyphenation-character" text="-" lang="en"/>
-<l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
-<l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
-<l:context name="styles"><l:template name="person-name" text="first-last"/>
-</l:context>
-<l:context name="title"><l:template name="abstract" text="%t"/>
-<l:template name="answer" text="%t"/>
-<l:template name="appendix" text="ApÃ©ndice %n. %t"/>
-<l:template name="article" text="%t"/>
-<l:template name="authorblurb" text="%t"/>
-<l:template name="bibliodiv" text="%t"/>
-<l:template name="biblioentry" text="%t"/>
-<l:template name="bibliography" text="%t"/>
-<l:template name="bibliolist" text="%t" lang="en"/>
-<l:template name="bibliomixed" text="%t"/>
-<l:template name="bibliomset" text="%t"/>
-<l:template name="biblioset" text="%t"/>
-<l:template name="blockquote" text="%t"/>
-<l:template name="book" text="%t"/>
-<l:template name="calloutlist" text="%t"/>
-<l:template name="caution" text="%t"/>
-<l:template name="chapter" text="CapÃ­tulo %n. %t"/>
-<l:template name="colophon" text="%t"/>
-<l:template name="dedication" text="%t"/>
-<l:template name="equation" text="EcuaciÃ³n %n. %t"/>
-<l:template name="example" text="Ejemplo %n. %t"/>
-<l:template name="figure" text="Figura %n. %t"/>
-<l:template name="foil" text="%t" lang="en"/>
-<l:template name="foilgroup" text="%t" lang="en"/>
-<l:template name="formalpara" text="%t"/>
-<l:template name="glossary" text="%t"/>
-<l:template name="glossdiv" text="%t"/>
-<l:template name="glosslist" text="%t" lang="en"/>
-<l:template name="glossentry" text="%t" lang="en"/>
-<l:template name="important" text="%t"/>
-<l:template name="index" text="%t"/>
-<l:template name="indexdiv" text="%t"/>
-<l:template name="itemizedlist" text="%t"/>
-<l:template name="legalnotice" text="%t"/>
-<l:template name="listitem" text=""/>
-<l:template name="lot" text="%t"/>
-<l:template name="msg" text="%t"/>
-<l:template name="msgexplan" text="%t"/>
-<l:template name="msgmain" text="%t"/>
-<l:template name="msgrel" text="%t"/>
-<l:template name="msgset" text="%t"/>
-<l:template name="msgsub" text="%t"/>
-<l:template name="note" text="%t"/>
-<l:template name="orderedlist" text="%t"/>
-<l:template name="part" text="Parte %n. %t"/>
-<l:template name="partintro" text="%t"/>
-<l:template name="preface" text="%t"/>
-<l:template name="procedure" text="%t"/>
-<l:template name="procedure.formal" text="Procedimiento %n. %t"/>
-<l:template name="productionset" text="%t"/>
-<l:template name="productionset.formal" text="ProducciÃ³n %n"/>
-<l:template name="qandadiv" text="%t"/>
-<l:template name="qandaentry" text="%t"/>
-<l:template name="qandaset" text="%t"/>
-<l:template name="question" text="%t"/>
-<l:template name="refentry" text="%t"/>
-<l:template name="reference" text="%t"/>
-<l:template name="refsection" text="%t"/>
-<l:template name="refsect1" text="%t"/>
-<l:template name="refsect2" text="%t"/>
-<l:template name="refsect3" text="%t"/>
-<l:template name="refsynopsisdiv" text="%t"/>
-<l:template name="refsynopsisdivinfo" text="%t"/>
-<l:template name="segmentedlist" text="%t"/>
-<l:template name="set" text="%t"/>
-<l:template name="setindex" text="%t"/>
-<l:template name="sidebar" text="%t"/>
-<l:template name="step" text="%t"/>
-<l:template name="table" text="Tabla %n. %t"/>
-<l:template name="task" text="%t" lang="en"/>
-<l:template name="tasksummary" text="%t" lang="en"/>
-<l:template name="taskprerequisites" text="%t" lang="en"/>
-<l:template name="taskrelated" text="%t" lang="en"/>
-<l:template name="tip" text="%t"/>
-<l:template name="toc" text="%t"/>
-<l:template name="variablelist" text="%t"/>
-<l:template name="varlistentry" text="" lang="en"/>
-<l:template name="warning" text="%t"/>
-</l:context>
-<l:context name="title-unnumbered"><l:template name="appendix" text="%t"/>
-<l:template name="article/appendix" text="%t" lang="en"/>
-<l:template name="bridgehead" text="%t"/>
-<l:template name="chapter" text="%t"/>
-<l:template name="sect1" text="%t"/>
-<l:template name="sect2" text="%t"/>
-<l:template name="sect3" text="%t"/>
-<l:template name="sect4" text="%t"/>
-<l:template name="sect5" text="%t"/>
-<l:template name="section" text="%t"/>
-<l:template name="simplesect" text="%t"/>
-<l:template name="part" text="%t" lang="en"/>
-</l:context>
-<l:context name="title-numbered"><l:template name="appendix" text="ApÃ©ndice %n. %t"/>
-<l:template name="article/appendix" text="%n.Â %t" lang="en"/>
-<l:template name="bridgehead" text="%n. %t"/>
-<l:template name="chapter" text="CapÃ­tulo %n. %t"/>
-<l:template name="part" text="ParteÂ %n.Â %t"/>
-<l:template name="sect1" text="%n. %t"/>
-<l:template name="sect2" text="%n. %t"/>
-<l:template name="sect3" text="%n. %t"/>
-<l:template name="sect4" text="%n. %t"/>
-<l:template name="sect5" text="%n. %t"/>
-<l:template name="section" text="%n. %t"/>
-<l:template name="simplesect" text="%t"/>
-</l:context>
-<l:context name="subtitle"><l:template name="appendix" text="%s"/>
-<l:template name="article" text="%s"/>
-<l:template name="bibliodiv" text="%s"/>
-<l:template name="biblioentry" text="%s"/>
-<l:template name="bibliography" text="%s"/>
-<l:template name="bibliomixed" text="%s"/>
-<l:template name="bibliomset" text="%s"/>
-<l:template name="biblioset" text="%s"/>
-<l:template name="book" text="%s"/>
-<l:template name="chapter" text="%s"/>
-<l:template name="colophon" text="%s"/>
-<l:template name="dedication" text="%s"/>
-<l:template name="glossary" text="%s"/>
-<l:template name="glossdiv" text="%s"/>
-<l:template name="index" text="%s"/>
-<l:template name="indexdiv" text="%s"/>
-<l:template name="lot" text="%s"/>
-<l:template name="part" text="%s"/>
-<l:template name="partintro" text="%s"/>
-<l:template name="preface" text="%s"/>
-<l:template name="refentry" text="%s"/>
-<l:template name="reference" text="%s"/>
-<l:template name="refsection" text="%s"/>
-<l:template name="refsect1" text="%s"/>
-<l:template name="refsect2" text="%s"/>
-<l:template name="refsect3" text="%s"/>
-<l:template name="refsynopsisdiv" text="%s"/>
-<l:template name="sect1" text="%s"/>
-<l:template name="sect2" text="%s"/>
-<l:template name="sect3" text="%s"/>
-<l:template name="sect4" text="%s"/>
-<l:template name="sect5" text="%s"/>
-<l:template name="section" text="%s"/>
-<l:template name="set" text="%s"/>
-<l:template name="setindex" text="%s"/>
-<l:template name="sidebar" text="%s"/>
-<l:template name="simplesect" text="%s"/>
-<l:template name="toc" text="%s"/>
-</l:context>
-<l:context name="xref"><l:template name="abstract" text="%t"/>
-<l:template name="answer" text="R:Â %n"/>
-<l:template name="appendix" text="%t"/>
-<l:template name="article" text="%t"/>
-<l:template name="authorblurb" text="%t"/>
-<l:template name="bibliodiv" text="%t"/>
-<l:template name="bibliography" text="%t"/>
-<l:template name="bibliomset" text="%t"/>
-<l:template name="biblioset" text="%t"/>
-<l:template name="blockquote" text="%t"/>
-<l:template name="book" text="%t"/>
-<l:template name="calloutlist" text="%t"/>
-<l:template name="caution" text="%t"/>
-<l:template name="chapter" text="%t"/>
-<l:template name="colophon" text="%t"/>
-<l:template name="constraintdef" text="%t"/>
-<l:template name="dedication" text="%t"/>
-<l:template name="equation" text="%t"/>
-<l:template name="example" text="%t"/>
-<l:template name="figure" text="%t"/>
-<l:template name="foil" text="%t" lang="en"/>
-<l:template name="foilgroup" text="%t" lang="en"/>
-<l:template name="formalpara" text="%t"/>
-<l:template name="glossary" text="%t"/>
-<l:template name="glossdiv" text="%t"/>
-<l:template name="important" text="%t"/>
-<l:template name="index" text="%t"/>
-<l:template name="indexdiv" text="%t"/>
-<l:template name="itemizedlist" text="%t"/>
-<l:template name="legalnotice" text="%t"/>
-<l:template name="listitem" text="%n"/>
-<l:template name="lot" text="%t"/>
-<l:template name="msg" text="%t"/>
-<l:template name="msgexplan" text="%t"/>
-<l:template name="msgmain" text="%t"/>
-<l:template name="msgrel" text="%t"/>
-<l:template name="msgset" text="%t"/>
-<l:template name="msgsub" text="%t"/>
-<l:template name="note" text="%t"/>
-<l:template name="orderedlist" text="%t"/>
-<l:template name="part" text="%t"/>
-<l:template name="partintro" text="%t"/>
-<l:template name="preface" text="%t"/>
-<l:template name="procedure" text="%t"/>
-<l:template name="productionset" text="%t"/>
-<l:template name="qandadiv" text="%t"/>
-<l:template name="qandaentry" text="P:Â %n"/>
-<l:template name="qandaset" text="%t"/>
-<l:template name="question" text="P:Â %n"/>
-<l:template name="reference" text="%t"/>
-<l:template name="refsynopsisdiv" text="%t"/>
-<l:template name="segmentedlist" text="%t"/>
-<l:template name="set" text="%t"/>
-<l:template name="setindex" text="%t"/>
-<l:template name="sidebar" text="%t"/>
-<l:template name="table" text="%t"/>
-<l:template name="task" text="%t" lang="en"/>
-<l:template name="tip" text="%t"/>
-<l:template name="toc" text="%t"/>
-<l:template name="variablelist" text="%t"/>
-<l:template name="varlistentry" text="%n"/>
-<l:template name="warning" text="%t"/>
-<l:template name="olink.document.citation" text=" in %o" lang="en"/>
-<l:template name="olink.page.citation" text=" (page %p)" lang="en"/>
-<l:template name="page.citation" text=" [%p]"/>
-<l:template name="page" text="(page %p)" lang="en"/>
-<l:template name="docname" text=" in %o" lang="en"/>
-<l:template name="docnamelong" text=" in the document titled %o" lang="en"/>
-<l:template name="pageabbrev" text="(p. %p)" lang="en"/>
-<l:template name="Page" text="Page %p" lang="en"/>
-<l:template name="bridgehead" text="â%tâ"/>
-<l:template name="refsection" text="â%tâ"/>
-<l:template name="refsect1" text="â%tâ"/>
-<l:template name="refsect2" text="â%tâ"/>
-<l:template name="refsect3" text="â%tâ"/>
-<l:template name="sect1" text="â%tâ"/>
-<l:template name="sect2" text="â%tâ"/>
-<l:template name="sect3" text="â%tâ"/>
-<l:template name="sect4" text="â%tâ"/>
-<l:template name="sect5" text="â%tâ"/>
-<l:template name="section" text="â%tâ"/>
-<l:template name="simplesect" text="â%tâ"/>
-</l:context>
-<l:context name="xref-number"><l:template name="answer" text="R:Â %n"/>
-<l:template name="appendix" text="ApÃ©ndiceÂ %n"/>
-<l:template name="bridgehead" text="SecciÃ³nÂ %n"/>
-<l:template name="chapter" text="CapÃ­tuloÂ %n"/>
-<l:template name="equation" text="EcuaciÃ³nÂ %n"/>
-<l:template name="example" text="EjemploÂ %n"/>
-<l:template name="figure" text="FiguraÂ %n"/>
-<l:template name="part" text="ParteÂ %n"/>
-<l:template name="procedure" text="ProcedimientoÂ %n"/>
-<l:template name="productionset" text="ProducciÃ³nÂ %n"/>
-<l:template name="qandadiv" text="P y RÂ %n"/>
-<l:template name="qandaentry" text="P:Â %n"/>
-<l:template name="question" text="P:Â %n"/>
-<l:template name="sect1" text="SecciÃ³nÂ %n"/>
-<l:template name="sect2" text="SecciÃ³nÂ %n"/>
-<l:template name="sect3" text="SecciÃ³nÂ %n"/>
-<l:template name="sect4" text="SecciÃ³nÂ %n"/>
-<l:template name="sect5" text="SecciÃ³nÂ %n"/>
-<l:template name="section" text="SecciÃ³nÂ %n"/>
-<l:template name="table" text="TablaÂ %n"/>
-</l:context>
-<l:context name="xref-number-and-title"><l:template name="appendix" text="ApÃ©ndiceÂ %n, %t"/>
-<l:template name="bridgehead" text="SecciÃ³nÂ %n, â%tâ"/>
-<l:template name="chapter" text="CapÃ­tuloÂ %n, %t"/>
-<l:template name="equation" text="EcuaciÃ³nÂ %n, â%tâ"/>
-<l:template name="example" text="EjemploÂ %n, â%tâ"/>
-<l:template name="figure" text="FiguraÂ %n, â%tâ"/>
-<l:template name="part" text="ParteÂ %n, â%tâ"/>
-<l:template name="procedure" text="ProcedimientoÂ %n, â%tâ"/>
-<l:template name="productionset" text="ProducciÃ³nÂ %n, â%tâ"/>
-<l:template name="qandadiv" text="P y RÂ %n, â%tâ"/>
-<l:template name="refsect1" text="secciÃ³n llamada â%tâ"/>
-<l:template name="refsect2" text="secciÃ³n llamada â%tâ"/>
-<l:template name="refsect3" text="secciÃ³n llamada â%tâ"/>
-<l:template name="refsection" text="secciÃ³n llamada â%tâ"/>
-<l:template name="sect1" text="SecciÃ³nÂ %n, â%tâ"/>
-<l:template name="sect2" text="SecciÃ³nÂ %n, â%tâ"/>
-<l:template name="sect3" text="SecciÃ³nÂ %n, â%tâ"/>
-<l:template name="sect4" text="SecciÃ³nÂ %n, â%tâ"/>
-<l:template name="sect5" text="SecciÃ³nÂ %n, â%tâ"/>
-<l:template name="section" text="SecciÃ³nÂ %n, â%tâ"/>
-<l:template name="simplesect" text="secciÃ³n llamada â%tâ"/>
-<l:template name="table" text="TablaÂ %n, â%tâ"/>
-</l:context>
-<l:context name="authorgroup"><l:template name="sep" text=", "/>
-<l:template name="sep2" text=" y "/>
-<l:template name="seplast" text=", y "/>
-</l:context>
-<l:context name="glossary"><l:template name="see" text="Ver %t"/>
-<l:template name="seealso" text="Ver tambiÃ©n %t"/>
-</l:context>
-<l:context name="msgset"><l:template name="MsgAud" text="Audiencia: "/>
-<l:template name="MsgLevel" text="Nivel: "/>
-<l:template name="MsgOrig" text="Origen: "/>
-</l:context>
-<l:context name="datetime"><l:template name="format" text="m/d/Y" lang="en"/>
-</l:context>
-<l:context name="termdef"><l:template name="prefix" text="[Definition: " lang="en"/>
-<l:template name="suffix" text="]" lang="en"/>
-</l:context>
-<l:context name="datetime-full"><l:template name="January" text="January" lang="en"/>
-<l:template name="February" text="February" lang="en"/>
-<l:template name="March" text="March" lang="en"/>
-<l:template name="April" text="April" lang="en"/>
-<l:template name="May" text="May" lang="en"/>
-<l:template name="June" text="June" lang="en"/>
-<l:template name="July" text="July" lang="en"/>
-<l:template name="August" text="August" lang="en"/>
-<l:template name="September" text="September" lang="en"/>
-<l:template name="October" text="October" lang="en"/>
-<l:template name="November" text="November" lang="en"/>
-<l:template name="December" text="December" lang="en"/>
-<l:template name="Monday" text="Monday" lang="en"/>
-<l:template name="Tuesday" text="Tuesday" lang="en"/>
-<l:template name="Wednesday" text="Wednesday" lang="en"/>
-<l:template name="Thursday" text="Thursday" lang="en"/>
-<l:template name="Friday" text="Friday" lang="en"/>
-<l:template name="Saturday" text="Saturday" lang="en"/>
-<l:template name="Sunday" text="Sunday" lang="en"/>
-</l:context>
-<l:context name="datetime-abbrev"><l:template name="Jan" text="Jan" lang="en"/>
-<l:template name="Feb" text="Feb" lang="en"/>
-<l:template name="Mar" text="Mar" lang="en"/>
-<l:template name="Apr" text="Apr" lang="en"/>
-<l:template name="May" text="May" lang="en"/>
-<l:template name="Jun" text="Jun" lang="en"/>
-<l:template name="Jul" text="Jul" lang="en"/>
-<l:template name="Aug" text="Aug" lang="en"/>
-<l:template name="Sep" text="Sep" lang="en"/>
-<l:template name="Oct" text="Oct" lang="en"/>
-<l:template name="Nov" text="Nov" lang="en"/>
-<l:template name="Dec" text="Dec" lang="en"/>
-<l:template name="Mon" text="Mon" lang="en"/>
-<l:template name="Tue" text="Tue" lang="en"/>
-<l:template name="Wed" text="Wed" lang="en"/>
-<l:template name="Thu" text="Thu" lang="en"/>
-<l:template name="Fri" text="Fri" lang="en"/>
-<l:template name="Sat" text="Sat" lang="en"/>
-<l:template name="Sun" text="Sun" lang="en"/>
-</l:context>
-<l:context name="htmlhelp"><l:template name="langcode" text="0x040a Spanish (Traditional Sort)"/>
-</l:context>
-<l:context name="index"><l:template name="term-separator" text=", " lang="en"/>
-<l:template name="number-separator" text=", " lang="en"/>
-<l:template name="range-separator" text="-" lang="en"/>
-</l:context>
-<l:context name="iso690"><l:template name="lastfirst.sep" text=", " lang="en"/>
-<l:template name="alt.person.two.sep" text=" â " lang="en"/>
-<l:template name="alt.person.last.sep" text=" â " lang="en"/>
-<l:template name="alt.person.more.sep" text=" â " lang="en"/>
-<l:template name="primary.editor" text=" (ed.)" lang="en"/>
-<l:template name="primary.many" text=", et al." lang="en"/>
-<l:template name="primary.sep" text=". " lang="en"/>
-<l:template name="submaintitle.sep" text=": " lang="en"/>
-<l:template name="title.sep" text=". " lang="en"/>
-<l:template name="othertitle.sep" text=", " lang="en"/>
-<l:template name="medium1" text=" [" lang="en"/>
-<l:template name="medium2" text="]" lang="en"/>
-<l:template name="secondary.person.sep" text="; " lang="en"/>
-<l:template name="secondary.sep" text=". " lang="en"/>
-<l:template name="respons.sep" text=". " lang="en"/>
-<l:template name="edition.sep" text=". " lang="en"/>
-<l:template name="edition.serial.sep" text=", " lang="en"/>
-<l:template name="issuing.range" text="-" lang="en"/>
-<l:template name="issuing.div" text=", " lang="en"/>
-<l:template name="issuing.sep" text=". " lang="en"/>
-<l:template name="partnr.sep" text=". " lang="en"/>
-<l:template name="placepubl.sep" text=": " lang="en"/>
-<l:template name="publyear.sep" text=", " lang="en"/>
-<l:template name="pubinfo.sep" text=". " lang="en"/>
-<l:template name="spec.pubinfo.sep" text=", " lang="en"/>
-<l:template name="upd.sep" text=", " lang="en"/>
-<l:template name="datecit1" text=" [cited " lang="en"/>
-<l:template name="datecit2" text="]" lang="en"/>
-<l:template name="extent.sep" text=". " lang="en"/>
-<l:template name="locs.sep" text=", " lang="en"/>
-<l:template name="location.sep" text=". " lang="en"/>
-<l:template name="serie.sep" text=". " lang="en"/>
-<l:template name="notice.sep" text=". " lang="en"/>
-<l:template name="access" text="Available " lang="en"/>
-<l:template name="acctoo" text="Also available " lang="en"/>
-<l:template name="onwww" text="from World Wide Web" lang="en"/>
-<l:template name="oninet" text="from Internet" lang="en"/>
-<l:template name="access.end" text=": " lang="en"/>
-<l:template name="link1" text="&lt;" lang="en"/>
-<l:template name="link2" text="&gt;" lang="en"/>
-<l:template name="access.sep" text=". " lang="en"/>
-<l:template name="isbn" text="ISBN " lang="en"/>
-<l:template name="issn" text="ISSN " lang="en"/>
-<l:template name="stdnum.sep" text=". " lang="en"/>
-<l:template name="patcountry.sep" text=". " lang="en"/>
-<l:template name="pattype.sep" text=", " lang="en"/>
-<l:template name="patnum.sep" text=". " lang="en"/>
-<l:template name="patdate.sep" text=". " lang="en"/>
-</l:context><l:letters><l:l i="-1"/>
-<l:l i="0">SÃ­mbolos</l:l>
-<l:l i="1">A</l:l>
-<l:l i="1">a</l:l>
-<l:l i="1">Ã¡</l:l>
-<l:l i="1">Ã</l:l>
-<l:l i="2">B</l:l>
-<l:l i="2">b</l:l>
-<l:l i="3">C</l:l>
-<l:l i="3">c</l:l>
-<l:l i="4">CH</l:l>
-<l:l i="4">ch</l:l>
-<l:l i="5">D</l:l>
-<l:l i="5">d</l:l>
-<l:l i="6">E</l:l>
-<l:l i="6">e</l:l>
-<l:l i="6">Ã</l:l>
-<l:l i="6">Ã©</l:l>
-<l:l i="7">F</l:l>
-<l:l i="7">f</l:l>
-<l:l i="8">G</l:l>
-<l:l i="8">g</l:l>
-<l:l i="9">H</l:l>
-<l:l i="9">h</l:l>
-<l:l i="10">I</l:l>
-<l:l i="10">i</l:l>
-<l:l i="10">Ã</l:l>
-<l:l i="10">Ã­</l:l>
-<l:l i="11">J</l:l>
-<l:l i="11">j</l:l>
-<l:l i="12">K</l:l>
-<l:l i="12">k</l:l>
-<l:l i="13">L</l:l>
-<l:l i="13">l</l:l>
-<l:l i="14">LL</l:l>
-<l:l i="14">ll</l:l>
-<l:l i="15">M</l:l>
-<l:l i="15">m</l:l>
-<l:l i="16">N</l:l>
-<l:l i="16">n</l:l>
-<l:l i="17">Ã</l:l>
-<l:l i="17">Ã±</l:l>
-<l:l i="18">O</l:l>
-<l:l i="18">o</l:l>
-<l:l i="18">Ã</l:l>
-<l:l i="18">Ã³</l:l>
-<l:l i="19">P</l:l>
-<l:l i="19">p</l:l>
-<l:l i="20">Q</l:l>
-<l:l i="20">q</l:l>
-<l:l i="21">R</l:l>
-<l:l i="21">r</l:l>
-<l:l i="22">S</l:l>
-<l:l i="22">s</l:l>
-<l:l i="23">T</l:l>
-<l:l i="23">t</l:l>
-<l:l i="24">U</l:l>
-<l:l i="24">u</l:l>
-<l:l i="24">Ã</l:l>
-<l:l i="24">Ãº</l:l>
-<l:l i="25">V</l:l>
-<l:l i="25">v</l:l>
-<l:l i="26">W</l:l>
-<l:l i="26">w</l:l>
-<l:l i="27">X</l:l>
-<l:l i="27">x</l:l>
-<l:l i="28">Y</l:l>
-<l:l i="28">y</l:l>
-<l:l i="29">Z</l:l>
-<l:l i="29">z</l:l>
-</l:letters>
-</l:l10n>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/fr.xml
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/fr.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,693 +1,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="fr" english-language-name="French">
-
-<!-- * This file is generated automatically. -->
-<!-- * To submit changes to this file upstream (to the DocBook Project) -->
-<!-- * do not submit an edited version of this file. Instead, submit an -->
-<!-- * edited version of the source file at the following location: -->
-<!-- * -->
-<!-- *  https://svn.sourceforge.net/svnroot/docbook/trunk/gentext/locale/fr.xml -->
-<!-- * -->
-<!-- * E-mail the edited fr.xml source file to: -->
-<!-- * -->
-<!-- *  docbook-developers@lists.sourceforge.net -->
-
-<!-- ******************************************************************** -->
-
-<!-- This file is part of the XSL DocBook Stylesheet distribution. -->
-<!-- See ../README or http://docbook.sf.net/release/xsl/current/ for -->
-<!-- copyright and other information. -->
-
-<!-- ******************************************************************** -->
-<!-- In these files, % with a letter is used for a placeholder: -->
-<!--   %t is the current element's title -->
-<!--   %s is the current element's subtitle (if applicable)-->
-<!--   %n is the current element's number label-->
-<!--   %p is the current element's page number (if applicable)-->
-<!-- ******************************************************************** -->
-
-
-<l:gentext key="Abstract" text="RÃ©sumÃ©"/>
-<l:gentext key="abstract" text="RÃ©sumÃ©"/>
-<l:gentext key="Answer" text="RÂ :"/>
-<l:gentext key="answer" text="RÂ :"/>
-<l:gentext key="Appendix" text="Annexe"/>
-<l:gentext key="appendix" text="annexe"/>
-<l:gentext key="Article" text="Article"/>
-<l:gentext key="article" text="Article"/>
-<l:gentext key="Author" text="Auteur"/>
-<l:gentext key="Bibliography" text="Bibliographie"/>
-<l:gentext key="bibliography" text="Bibliographie"/>
-<l:gentext key="Book" text="Livre"/>
-<l:gentext key="book" text="Livre"/>
-<l:gentext key="CAUTION" text="ATTENTION"/>
-<l:gentext key="Caution" text="Attention"/>
-<l:gentext key="caution" text="Attention"/>
-<l:gentext key="Chapter" text="Chapitre"/>
-<l:gentext key="chapter" text="chapitre"/>
-<l:gentext key="Colophon" text="AchevÃ© d'imprimer"/>
-<l:gentext key="colophon" text="AchevÃ© d'imprimer"/>
-<l:gentext key="Copyright" text="Copyright"/>
-<l:gentext key="copyright" text="Copyright"/>
-<l:gentext key="Dedication" text="DÃ©dicace"/>
-<l:gentext key="dedication" text="DÃ©dicace"/>
-<l:gentext key="Edition" text="Ãdition"/>
-<l:gentext key="edition" text="Ãdition"/>
-<l:gentext key="Editor" text="Editor" lang="en"/>
-<l:gentext key="Equation" text="Ãquation"/>
-<l:gentext key="equation" text="Ãquation"/>
-<l:gentext key="Example" text="Exemple"/>
-<l:gentext key="example" text="Exemple"/>
-<l:gentext key="Figure" text="Figure"/>
-<l:gentext key="figure" text="Figure"/>
-<l:gentext key="Glossary" text="Glossaire"/>
-<l:gentext key="glossary" text="Glossaire"/>
-<l:gentext key="GlossSee" text="Voir"/>
-<l:gentext key="glosssee" text="Voir"/>
-<l:gentext key="GlossSeeAlso" text="Voir aussi"/>
-<l:gentext key="glossseealso" text="Voir aussi"/>
-<l:gentext key="IMPORTANT" text="IMPORTANT"/>
-<l:gentext key="important" text="Important"/>
-<l:gentext key="Important" text="Important"/>
-<l:gentext key="Index" text="Index"/>
-<l:gentext key="index" text="Index"/>
-<l:gentext key="ISBN" text="ISBN"/>
-<l:gentext key="isbn" text="ISBN"/>
-<l:gentext key="LegalNotice" text="Note lÃ©gale"/>
-<l:gentext key="legalnotice" text="Note lÃ©gale"/>
-<l:gentext key="MsgAud" text="Public visÃ©"/>
-<l:gentext key="msgaud" text="Public visÃ©"/>
-<l:gentext key="MsgLevel" text="Niveau"/>
-<l:gentext key="msglevel" text="Niveau"/>
-<l:gentext key="MsgOrig" text="Origine"/>
-<l:gentext key="msgorig" text="Origine"/>
-<l:gentext key="NOTE" text="NOTE"/>
-<l:gentext key="Note" text="Note"/>
-<l:gentext key="note" text="Note"/>
-<l:gentext key="Part" text="Partie"/>
-<l:gentext key="part" text="Partie"/>
-<l:gentext key="Preface" text="PrÃ©face"/>
-<l:gentext key="preface" text="PrÃ©face"/>
-<l:gentext key="Procedure" text="ProcÃ©dure"/>
-<l:gentext key="procedure" text="ProcÃ©dure"/>
-<l:gentext key="ProductionSet" text="Production"/>
-<l:gentext key="PubDate" text="Date de publication"/>
-<l:gentext key="pubdate" text="Date de publication"/>
-<l:gentext key="Published" text="PubliÃ© le"/>
-<l:gentext key="published" text="PubliÃ© le"/>
-<l:gentext key="Publisher" text="Publisher" lang="en"/>
-<l:gentext key="Qandadiv" text="Q &amp; R"/>
-<l:gentext key="qandadiv" text="Q &amp; R"/>
-<l:gentext key="QandASet" text="Frequently Asked Questions" lang="en"/>
-<l:gentext key="Question" text="QÂ :"/>
-<l:gentext key="question" text="QÂ :"/>
-<l:gentext key="RefEntry" text=""/>
-<l:gentext key="refentry" text=""/>
-<l:gentext key="Reference" text="RÃ©fÃ©rence"/>
-<l:gentext key="reference" text="RÃ©fÃ©rence"/>
-<l:gentext key="References" text="References" lang="en"/>
-<l:gentext key="RefName" text="Nom"/>
-<l:gentext key="refname" text="Nom"/>
-<l:gentext key="RefSection" text=""/>
-<l:gentext key="refsection" text=""/>
-<l:gentext key="RefSynopsisDiv" text="Synopsis"/>
-<l:gentext key="refsynopsisdiv" text="Synopsis"/>
-<l:gentext key="RevHistory" text="Historique des versions"/>
-<l:gentext key="revhistory" text="Historique des versions"/>
-<l:gentext key="revision" text="Version"/>
-<l:gentext key="Revision" text="Version"/>
-<l:gentext key="sect1" text="Section"/>
-<l:gentext key="sect2" text="Section"/>
-<l:gentext key="sect3" text="Section"/>
-<l:gentext key="sect4" text="Section"/>
-<l:gentext key="sect5" text="Section"/>
-<l:gentext key="section" text="section"/>
-<l:gentext key="Section" text="Section"/>
-<l:gentext key="see" text="voir"/>
-<l:gentext key="See" text="Voir"/>
-<l:gentext key="seealso" text="voir aussi"/>
-<l:gentext key="Seealso" text="Voir aussi"/>
-<l:gentext key="SeeAlso" text="Voir Aussi"/>
-<l:gentext key="set" text="Ensemble"/>
-<l:gentext key="Set" text="Ensemble"/>
-<l:gentext key="setindex" text="Index"/>
-<l:gentext key="SetIndex" text="Index"/>
-<l:gentext key="Sidebar" text="Filet vertical"/>
-<l:gentext key="sidebar" text="Filet vertical"/>
-<l:gentext key="step" text="Ã©tape"/>
-<l:gentext key="Step" text="Ãtape"/>
-<l:gentext key="table" text="Tableau"/>
-<l:gentext key="Table" text="Tableau"/>
-<l:gentext key="task" text="Task" lang="en"/>
-<l:gentext key="Task" text="Task" lang="en"/>
-<l:gentext key="tip" text="ASTUCE"/>
-<l:gentext key="TIP" text="ASTUCE"/>
-<l:gentext key="Tip" text="Astuce"/>
-<l:gentext key="Warning" text="Avertissement"/>
-<l:gentext key="warning" text="AVERTISSEMENT"/>
-<l:gentext key="WARNING" text="AVERTISSEMENT"/>
-<l:gentext key="and" text="et"/>
-<l:gentext key="by" text="par"/>
-<l:gentext key="Edited" text="PubliÃ©"/>
-<l:gentext key="edited" text="PubliÃ©"/>
-<l:gentext key="Editedby" text="PubliÃ© par"/>
-<l:gentext key="editedby" text="PubliÃ© par"/>
-<l:gentext key="in" text="dans"/>
-<l:gentext key="lastlistcomma" text=","/>
-<l:gentext key="listcomma" text=","/>
-<l:gentext key="nonexistantelement" text="Cet Ã©lÃ©ment n'existe pas"/>
-<l:gentext key="notes" text="Notes"/>
-<l:gentext key="Notes" text="Notes"/>
-<l:gentext key="Pgs" text="Pages"/>
-<l:gentext key="pgs" text="Pages"/>
-<l:gentext key="Revisedby" text="Revu et corrigÃ© parÂ : "/>
-<l:gentext key="revisedby" text="Revu et corrigÃ© parÂ : "/>
-<l:gentext key="TableNotes" text="Remarques"/>
-<l:gentext key="tablenotes" text="Remarques"/>
-<l:gentext key="TableofContents" text="Table des matiÃšres"/>
-<l:gentext key="tableofcontents" text="Table des matiÃšres"/>
-<l:gentext key="unexpectedelementname" text="Nom d'Ã©lÃ©ment inattendu"/>
-<l:gentext key="unsupported" text="Non reconnu par le systÃšme"/>
-<l:gentext key="xrefto" text="RÃ©fÃ©rence vers"/>
-<l:gentext key="Authors" text="Authors" lang="en"/>
-<l:gentext key="copyeditor" text="Copy Editor" lang="en"/>
-<l:gentext key="graphicdesigner" text="Graphic Designer" lang="en"/>
-<l:gentext key="productioneditor" text="Production Editor" lang="en"/>
-<l:gentext key="technicaleditor" text="Technical Editor" lang="en"/>
-<l:gentext key="translator" text="Translator" lang="en"/>
-<l:gentext key="listofequations" text="Liste des Ã©quations"/>
-<l:gentext key="ListofEquations" text="Liste des Ã©quations"/>
-<l:gentext key="ListofExamples" text="Liste des exemples"/>
-<l:gentext key="listofexamples" text="Liste des exemples"/>
-<l:gentext key="ListofFigures" text="Liste des illustrations"/>
-<l:gentext key="listoffigures" text="Liste des illustrations"/>
-<l:gentext key="ListofProcedures" text="Liste des procÃ©dures"/>
-<l:gentext key="listofprocedures" text="Liste des procÃ©dures"/>
-<l:gentext key="listoftables" text="Liste des tableaux"/>
-<l:gentext key="ListofTables" text="Liste des tableaux"/>
-<l:gentext key="ListofUnknown" text="Liste inconnue"/>
-<l:gentext key="listofunknown" text="Liste inconnue"/>
-<l:gentext key="nav-home" text="Sommaire"/>
-<l:gentext key="nav-next" text="Suivant"/>
-<l:gentext key="nav-next-sibling" text="Avance rapide"/>
-<l:gentext key="nav-prev" text="PrÃ©cÃ©dent"/>
-<l:gentext key="nav-prev-sibling" text="ArriÃšre rapide"/>
-<l:gentext key="nav-up" text="Niveau supÃ©rieur"/>
-<l:gentext key="nav-toc" text="TdM"/>
-<l:gentext key="Draft" text="Brouillon"/>
-<l:gentext key="above" text="au-dessus"/>
-<l:gentext key="below" text="au-dessous"/>
-<l:gentext key="sectioncalled" text="la section intitulÃ©e"/>
-<l:gentext key="index symbols" text="Symboles"/>
-<l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyzÃ¢ÃªÃ®ÃŽÃ»Ã«Ã¯ÃŒÃ ÃšÃ¹Ã©Ã§ÃŠÅ"/>
-<l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZÃÃÃÃÃÃÃÃÃÃÃÃÃÃÅ"/>
-<l:gentext key="normalize.sort.input" text="AaÃÃ ÃÃ¡ÃÃ¢ÃÃ£ÃÃ€Ã
-Ã¥ÄÄÄÄÄÄ
-ÇÇÇÇÇ Ç¡ÇºÇ»ÈÈÈÈÈŠÈ§ážážáºáº áº¡áº¢áº£áº€áº¥áºŠáº§áºšáº©áºªáº«áº¬áº­áº®áº¯áº°áº±áº²áº³áºŽáºµáº¶áº·BbÆÆÉÆÆážážážáž
-ážážCcÃÃ§ÄÄÄÄÄÄÄÄÆÆÉážážDdÄÄÄÄÆÉÆÆÇ
-Ç²È¡ÉážážážážážážážážážážEeÃÃšÃÃ©ÃÃªÃÃ«ÄÄÄÄÄÄÄÄÄÄÈÈ
-ÈÈÈšÈ©ážážážážážážážážážážáºžáº¹áººáº»áºŒáºœáºŸáº¿á»á»á»á»á»á»
-á»á»FfÆÆážážGgÄÄÄÄÄ Ä¡Ä¢Ä£ÆÉ Ç€Ç¥ÇŠÇ§ÇŽÇµáž áž¡HhÄ€Ä¥ÄŠÄ§ÈÈÉŠáž¢áž£áž€áž¥ážŠáž§ážšáž©ážªáž«áºIiÃÃ¬ÃÃ­ÃÃ®ÃÃ¯ÄšÄ©ÄªÄ«Ä¬Ä­Ä®Ä¯Ä°ÆÉšÇÇÈÈÈÈáž¬áž­áž®áž¯á»á»á»á»JjÄŽÄµÇ°ÊKkÄ¶Ä·ÆÆÇšÇ©áž°áž±áž²áž³ážŽážµLlÄ¹ÄºÄ»ÄŒÄœÄŸÄ¿ÅÅÅÆÇÈŽÉ«É¬É­áž¶áž·ážžáž¹ážºáž»ážŒážœMmÉ±ážŸáž¿á¹á¹á¹á¹NnÃÃ±ÅÅÅ
-ÅÅÅÆÉ²ÆÈ ÇÇžÇ¹ÈµÉ³á¹á¹
-á¹á¹á¹á¹á¹á¹OoÃÃ²ÃÃ³ÃÃŽÃÃµÃÃ¶ÃÃžÅÅÅÅÅÅÆÆ Æ¡ÇÇÇªÇ«Ç¬Ç­ÇŸÇ¿ÈÈÈÈÈªÈ«È¬È­È®È¯È°È±á¹á¹á¹á¹á¹á¹á¹á¹á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á» á»¡á»¢á»£PpÆ€Æ¥á¹á¹á¹á¹QqÊ RrÅÅÅÅÅÅÈÈÈÈÉŒÉœÉŸá¹á¹á¹á¹á¹á¹á¹á¹SsÅÅÅÅÅÅÅ Å¡ÈÈÊá¹ á¹¡á¹¢á¹£á¹€á¹¥á¹Šá¹§á¹šá¹©TtÅ¢Å£Å€Å¥ÅŠÅ§Æ«Æ¬Æ­Æ®ÊÈÈÈ¶á¹ªá¹«á¹¬á¹­á¹®á¹¯á¹°á¹±áºUuÃÃ¹ÃÃºÃÃ»ÃÃŒÅšÅ©ÅªÅ«Å¬Å­Å®Å¯Å°Å±Å²Å³Æ¯Æ°ÇÇÇÇÇÇÇÇÇÇÈÈÈÈá¹²á¹³á¹Žá¹µá¹¶á¹·á¹žá¹¹á¹ºá¹»á»€á»¥á»Šá»§á»šá»©á»ªá»«á»¬á»­á»®á»¯á»°á»±VvÆ²Êá¹Œá¹œá¹Ÿá¹¿WwÅŽÅµáºáºáºáºáºáº
-áºáºáºáºáºXxáºáºáºáºYyÃÃœÃ¿ÅžÅ¶Å·Æ³ÆŽÈ²È³áºáºáºá»²á»³á»Žá»µá»¶á»·á»žá»¹ZzÅ¹ÅºÅ»ÅŒÅœÅŸÆµÆ¶È€È¥ÊÊáºáºáºáºáºáºáº" lang="en"/>
-<l:gentext key="normalize.sort.output" text="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ" lang="en"/>
-<l:dingbat key="startquote" text="Â«Â "/>
-<l:dingbat key="endquote" text="Â Â»"/>
-<l:dingbat key="nestedstartquote" text="â"/>
-<l:dingbat key="nestedendquote" text="â"/>
-<l:dingbat key="singlestartquote" text="â¹"/>
-<l:dingbat key="singleendquote" text="âº"/>
-<l:dingbat key="bullet" text="â¢"/>
-<l:gentext key="hyphenation-character" text="-"/>
-<l:gentext key="hyphenation-push-character-count" text="2"/>
-<l:gentext key="hyphenation-remain-character-count" text="2"/>
-<l:context name="styles"><l:template name="person-name" text="first-last"/>
-</l:context>
-<l:context name="title"><l:template name="abstract" text="%t"/>
-<l:template name="answer" text="%t"/>
-<l:template name="appendix" text="AnnexeÂ %n.Â %t"/>
-<l:template name="article" text="%t"/>
-<l:template name="authorblurb" text="%t"/>
-<l:template name="bibliodiv" text="%t"/>
-<l:template name="biblioentry" text="%t"/>
-<l:template name="bibliography" text="%t"/>
-<l:template name="bibliolist" text="%t" lang="en"/>
-<l:template name="bibliomixed" text="%t"/>
-<l:template name="bibliomset" text="%t"/>
-<l:template name="biblioset" text="%t"/>
-<l:template name="blockquote" text="%t"/>
-<l:template name="book" text="%t"/>
-<l:template name="calloutlist" text="%t"/>
-<l:template name="caution" text="%t"/>
-<l:template name="chapter" text="ChapitreÂ %n.Â %t"/>
-<l:template name="colophon" text="%t"/>
-<l:template name="dedication" text="%t"/>
-<l:template name="equation" text="ÃquationÂ %n.Â %t"/>
-<l:template name="example" text="ExempleÂ %n.Â %t"/>
-<l:template name="figure" text="FigureÂ %n.Â %t"/>
-<l:template name="foil" text="%t" lang="en"/>
-<l:template name="foilgroup" text="%t" lang="en"/>
-<l:template name="formalpara" text="%t"/>
-<l:template name="glossary" text="%t"/>
-<l:template name="glossdiv" text="%t"/>
-<l:template name="glosslist" text="%t" lang="en"/>
-<l:template name="glossentry" text="%t"/>
-<l:template name="important" text="%t"/>
-<l:template name="index" text="%t"/>
-<l:template name="indexdiv" text="%t"/>
-<l:template name="itemizedlist" text="%t"/>
-<l:template name="legalnotice" text="%t"/>
-<l:template name="listitem" text=""/>
-<l:template name="lot" text="%t"/>
-<l:template name="msg" text="%t"/>
-<l:template name="msgexplan" text="%t"/>
-<l:template name="msgmain" text="%t"/>
-<l:template name="msgrel" text="%t"/>
-<l:template name="msgset" text="%t"/>
-<l:template name="msgsub" text="%t"/>
-<l:template name="note" text="%t"/>
-<l:template name="orderedlist" text="%t"/>
-<l:template name="part" text="%t"/>
-<l:template name="partintro" text="%t"/>
-<l:template name="preface" text="%t"/>
-<l:template name="procedure" text="%t"/>
-<l:template name="procedure.formal" text="ProcÃ©dureÂ %n.Â %t"/>
-<l:template name="productionset" text="%t"/>
-<l:template name="productionset.formal" text="ProductionÂ %n"/>
-<l:template name="qandadiv" text="%t"/>
-<l:template name="qandaentry" text="%t"/>
-<l:template name="qandaset" text="%t"/>
-<l:template name="question" text="%t"/>
-<l:template name="refentry" text="%t"/>
-<l:template name="reference" text="%t"/>
-<l:template name="refsection" text="%t"/>
-<l:template name="refsect1" text="%t"/>
-<l:template name="refsect2" text="%t"/>
-<l:template name="refsect3" text="%t"/>
-<l:template name="refsynopsisdiv" text="%t"/>
-<l:template name="refsynopsisdivinfo" text="%t"/>
-<l:template name="segmentedlist" text="%t"/>
-<l:template name="set" text="%t"/>
-<l:template name="setindex" text="%t"/>
-<l:template name="sidebar" text="%t"/>
-<l:template name="step" text="%t"/>
-<l:template name="table" text="TableauÂ %n.Â %t"/>
-<l:template name="task" text="%t"/>
-<l:template name="tasksummary" text="%t" lang="en"/>
-<l:template name="taskprerequisites" text="%t" lang="en"/>
-<l:template name="taskrelated" text="%t" lang="en"/>
-<l:template name="tip" text="%t"/>
-<l:template name="toc" text="%t"/>
-<l:template name="variablelist" text="%t"/>
-<l:template name="varlistentry" text=""/>
-<l:template name="warning" text="%t"/>
-</l:context>
-<l:context name="title-unnumbered"><l:template name="appendix" text="%t"/>
-<l:template name="article/appendix" text="%t"/>
-<l:template name="bridgehead" text="%t"/>
-<l:template name="chapter" text="%t"/>
-<l:template name="sect1" text="%t"/>
-<l:template name="sect2" text="%t"/>
-<l:template name="sect3" text="%t"/>
-<l:template name="sect4" text="%t"/>
-<l:template name="sect5" text="%t"/>
-<l:template name="section" text="%t"/>
-<l:template name="simplesect" text="%t"/>
-<l:template name="part" text="%t" lang="en"/>
-</l:context>
-<l:context name="title-numbered"><l:template name="appendix" text="AnnexeÂ %n.Â %t"/>
-<l:template name="article/appendix" text="%n.Â %t"/>
-<l:template name="bridgehead" text="%n.Â %t"/>
-<l:template name="chapter" text="ChapitreÂ %n.Â %t"/>
-<l:template name="part" text="PartieÂ %n.Â %t"/>
-<l:template name="sect1" text="%n.Â %t"/>
-<l:template name="sect2" text="%n.Â %t"/>
-<l:template name="sect3" text="%n.Â %t"/>
-<l:template name="sect4" text="%n.Â %t"/>
-<l:template name="sect5" text="%n.Â %t"/>
-<l:template name="section" text="%n.Â %t"/>
-<l:template name="simplesect" text="%t"/>
-</l:context>
-<l:context name="subtitle"><l:template name="appendix" text="%s"/>
-<l:template name="article" text="%s"/>
-<l:template name="bibliodiv" text="%s"/>
-<l:template name="biblioentry" text="%s"/>
-<l:template name="bibliography" text="%s"/>
-<l:template name="bibliomixed" text="%s"/>
-<l:template name="bibliomset" text="%s"/>
-<l:template name="biblioset" text="%s"/>
-<l:template name="book" text="%s"/>
-<l:template name="chapter" text="%s"/>
-<l:template name="colophon" text="%s"/>
-<l:template name="dedication" text="%s"/>
-<l:template name="glossary" text="%s"/>
-<l:template name="glossdiv" text="%s"/>
-<l:template name="index" text="%s"/>
-<l:template name="indexdiv" text="%s"/>
-<l:template name="lot" text="%s"/>
-<l:template name="part" text="%s"/>
-<l:template name="partintro" text="%s"/>
-<l:template name="preface" text="%s"/>
-<l:template name="refentry" text="%s"/>
-<l:template name="reference" text="%s"/>
-<l:template name="refsection" text="%s"/>
-<l:template name="refsect1" text="%s"/>
-<l:template name="refsect2" text="%s"/>
-<l:template name="refsect3" text="%s"/>
-<l:template name="refsynopsisdiv" text="%s"/>
-<l:template name="sect1" text="%s"/>
-<l:template name="sect2" text="%s"/>
-<l:template name="sect3" text="%s"/>
-<l:template name="sect4" text="%s"/>
-<l:template name="sect5" text="%s"/>
-<l:template name="section" text="%s"/>
-<l:template name="set" text="%s"/>
-<l:template name="setindex" text="%s"/>
-<l:template name="sidebar" text="%s"/>
-<l:template name="simplesect" text="%s"/>
-<l:template name="toc" text="%s"/>
-</l:context>
-<l:context name="xref"><l:template name="abstract" text="%t"/>
-<l:template name="answer" text="RÂ :Â %n"/>
-<l:template name="appendix" text="%t"/>
-<l:template name="article" text="%t"/>
-<l:template name="authorblurb" text="%t"/>
-<l:template name="bibliodiv" text="%t"/>
-<l:template name="bibliography" text="%t"/>
-<l:template name="bibliomset" text="%t"/>
-<l:template name="biblioset" text="%t"/>
-<l:template name="blockquote" text="%t"/>
-<l:template name="book" text="%t"/>
-<l:template name="calloutlist" text="%t"/>
-<l:template name="caution" text="%t"/>
-<l:template name="chapter" text="%t"/>
-<l:template name="colophon" text="%t"/>
-<l:template name="constraintdef" text="%t"/>
-<l:template name="dedication" text="%t"/>
-<l:template name="equation" text="%t"/>
-<l:template name="example" text="%t"/>
-<l:template name="figure" text="%t"/>
-<l:template name="foil" text="%t" lang="en"/>
-<l:template name="foilgroup" text="%t" lang="en"/>
-<l:template name="formalpara" text="%t"/>
-<l:template name="glossary" text="%t"/>
-<l:template name="glossdiv" text="%t"/>
-<l:template name="important" text="%t"/>
-<l:template name="index" text="%t"/>
-<l:template name="indexdiv" text="%t"/>
-<l:template name="itemizedlist" text="%t"/>
-<l:template name="legalnotice" text="%t"/>
-<l:template name="listitem" text="%n"/>
-<l:template name="lot" text="%t"/>
-<l:template name="msg" text="%t"/>
-<l:template name="msgexplan" text="%t"/>
-<l:template name="msgmain" text="%t"/>
-<l:template name="msgrel" text="%t"/>
-<l:template name="msgset" text="%t"/>
-<l:template name="msgsub" text="%t"/>
-<l:template name="note" text="%t"/>
-<l:template name="orderedlist" text="%t"/>
-<l:template name="part" text="%t"/>
-<l:template name="partintro" text="%t"/>
-<l:template name="preface" text="%t"/>
-<l:template name="procedure" text="%t"/>
-<l:template name="productionset" text="%t"/>
-<l:template name="qandadiv" text="%t"/>
-<l:template name="qandaentry" text="QÂ :Â %n"/>
-<l:template name="qandaset" text="%t"/>
-<l:template name="question" text="QÂ :Â %n"/>
-<l:template name="reference" text="%t"/>
-<l:template name="refsynopsisdiv" text="%t"/>
-<l:template name="segmentedlist" text="%t"/>
-<l:template name="set" text="%t"/>
-<l:template name="setindex" text="%t"/>
-<l:template name="sidebar" text="%t"/>
-<l:template name="table" text="%t"/>
-<l:template name="task" text="%t" lang="en"/>
-<l:template name="tip" text="%t"/>
-<l:template name="toc" text="%t"/>
-<l:template name="variablelist" text="%t"/>
-<l:template name="varlistentry" text="%n"/>
-<l:template name="warning" text="%t"/>
-<l:template name="olink.document.citation" text=" in %o" lang="en"/>
-<l:template name="olink.page.citation" text=" (page %p)" lang="en"/>
-<l:template name="page.citation" text=" [%p]"/>
-<l:template name="page" text="(page %p)"/>
-<l:template name="docname" text=" in %o" lang="en"/>
-<l:template name="docnamelong" text=" in the document titled %o" lang="en"/>
-<l:template name="pageabbrev" text="(p. %p)"/>
-<l:template name="Page" text="Page %p"/>
-<l:template name="bridgehead" text="la section intitulÃ©e Â«Â %tÂ Â»"/>
-<l:template name="refsection" text="la section intitulÃ©e Â«Â %tÂ Â»"/>
-<l:template name="refsect1" text="la section intitulÃ©e Â«Â %tÂ Â»"/>
-<l:template name="refsect2" text="la section intitulÃ©e Â«Â %tÂ Â»"/>
-<l:template name="refsect3" text="la section intitulÃ©e Â«Â %tÂ Â»"/>
-<l:template name="sect1" text="la section intitulÃ©e Â«Â %tÂ Â»"/>
-<l:template name="sect2" text="la section intitulÃ©e Â«Â %tÂ Â»"/>
-<l:template name="sect3" text="la section intitulÃ©e Â«Â %tÂ Â»"/>
-<l:template name="sect4" text="la section intitulÃ©e Â«Â %tÂ Â»"/>
-<l:template name="sect5" text="la section intitulÃ©e Â«Â %tÂ Â»"/>
-<l:template name="section" text="la section intitulÃ©e Â«Â %tÂ Â»"/>
-<l:template name="simplesect" text="la section intitulÃ©e Â«Â %tÂ Â»"/>
-</l:context>
-<l:context name="xref-number"><l:template name="answer" text="RÂ :Â %n"/>
-<l:template name="appendix" text="AnnexeÂ %n"/>
-<l:template name="bridgehead" text="SectionÂ %n"/>
-<l:template name="chapter" text="ChapitreÂ %n"/>
-<l:template name="equation" text="ÃquationÂ %n"/>
-<l:template name="example" text="ExempleÂ %n"/>
-<l:template name="figure" text="FigureÂ %n"/>
-<l:template name="part" text="PartieÂ %n"/>
-<l:template name="procedure" text="ProcÃ©dureÂ %n"/>
-<l:template name="productionset" text="ProductionÂ %n"/>
-<l:template name="qandadiv" text="Q &amp; RÂ %n"/>
-<l:template name="qandaentry" text="QÂ :Â %n"/>
-<l:template name="question" text="QÂ :Â %n"/>
-<l:template name="sect1" text="SectionÂ %n"/>
-<l:template name="sect2" text="SectionÂ %n"/>
-<l:template name="sect3" text="SectionÂ %n"/>
-<l:template name="sect4" text="SectionÂ %n"/>
-<l:template name="sect5" text="SectionÂ %n"/>
-<l:template name="section" text="SectionÂ %n"/>
-<l:template name="table" text="TableauÂ %n"/>
-</l:context>
-<l:context name="xref-number-and-title"><l:template name="appendix" text="AnnexeÂ %n, %t"/>
-<l:template name="bridgehead" text="SectionÂ %n, Â«Â %tÂ Â»"/>
-<l:template name="chapter" text="ChapitreÂ %n, %t"/>
-<l:template name="equation" text="ÃquationÂ %n, Â«Â %tÂ Â»"/>
-<l:template name="example" text="ExempleÂ %n, Â«Â %tÂ Â»"/>
-<l:template name="figure" text="FigureÂ %n, Â«Â %tÂ Â»"/>
-<l:template name="part" text="PartieÂ %n, Â«Â %tÂ Â»"/>
-<l:template name="procedure" text="ProcÃ©dureÂ %n, Â«Â %tÂ Â»"/>
-<l:template name="productionset" text="ProductionÂ %n, Â«Â %tÂ Â»"/>
-<l:template name="qandadiv" text="Q &amp; RÂ %n, Â«Â %tÂ Â»"/>
-<l:template name="refsect1" text="la section intitulÃ©e Â«Â %tÂ Â»"/>
-<l:template name="refsect2" text="la section intitulÃ©e Â«Â %tÂ Â»"/>
-<l:template name="refsect3" text="la section intitulÃ©e Â«Â %tÂ Â»"/>
-<l:template name="refsection" text="la section intitulÃ©e Â«Â %tÂ Â»"/>
-<l:template name="sect1" text="SectionÂ %n, Â«Â %tÂ Â»"/>
-<l:template name="sect2" text="SectionÂ %n, Â«Â %tÂ Â»"/>
-<l:template name="sect3" text="SectionÂ %n, Â«Â %tÂ Â»"/>
-<l:template name="sect4" text="SectionÂ %n, Â«Â %tÂ Â»"/>
-<l:template name="sect5" text="SectionÂ %n, Â«Â %tÂ Â»"/>
-<l:template name="section" text="SectionÂ %n, Â«Â %tÂ Â»"/>
-<l:template name="simplesect" text="la section intitulÃ©e Â«Â %tÂ Â»"/>
-<l:template name="table" text="TableauÂ %n, Â«Â %tÂ Â»"/>
-</l:context>
-<l:context name="authorgroup"><l:template name="sep" text=", "/>
-<l:template name="sep2" text=" et "/>
-<l:template name="seplast" text=", et "/>
-</l:context>
-<l:context name="glossary"><l:template name="see" text="Voir %t"/>
-<l:template name="seealso" text="Voir aussi %t"/>
-</l:context>
-<l:context name="msgset"><l:template name="MsgAud" text="Public visÃ©: "/>
-<l:template name="MsgLevel" text="Niveau: "/>
-<l:template name="MsgOrig" text="Origine: "/>
-</l:context>
-<l:context name="datetime"><l:template name="format" text="d/m/Y"/>
-</l:context>
-<l:context name="termdef"><l:template name="prefix" text="[Definition: " lang="en"/>
-<l:template name="suffix" text="]" lang="en"/>
-</l:context>
-<l:context name="datetime-full"><l:template name="January" text="janvier"/>
-<l:template name="February" text="fÃ©vrier"/>
-<l:template name="March" text="mars"/>
-<l:template name="April" text="avril"/>
-<l:template name="May" text="mai"/>
-<l:template name="June" text="juin"/>
-<l:template name="July" text="juillet"/>
-<l:template name="August" text="aoÃ»t"/>
-<l:template name="September" text="septembre"/>
-<l:template name="October" text="octobre"/>
-<l:template name="November" text="novembre"/>
-<l:template name="December" text="dÃ©cembre"/>
-<l:template name="Monday" text="lundi"/>
-<l:template name="Tuesday" text="mardi"/>
-<l:template name="Wednesday" text="mercredi"/>
-<l:template name="Thursday" text="jeudi"/>
-<l:template name="Friday" text="vendredi"/>
-<l:template name="Saturday" text="samedi"/>
-<l:template name="Sunday" text="dimanche"/>
-</l:context>
-<l:context name="datetime-abbrev"><l:template name="Jan" text="jan"/>
-<l:template name="Feb" text="fÃ©v"/>
-<l:template name="Mar" text="mar"/>
-<l:template name="Apr" text="avr"/>
-<l:template name="May" text="mai"/>
-<l:template name="Jun" text="jun"/>
-<l:template name="Jul" text="jui"/>
-<l:template name="Aug" text="aoÃ»"/>
-<l:template name="Sep" text="sep"/>
-<l:template name="Oct" text="oct"/>
-<l:template name="Nov" text="nov"/>
-<l:template name="Dec" text="dÃ©c"/>
-<l:template name="Mon" text="lun"/>
-<l:template name="Tue" text="mar"/>
-<l:template name="Wed" text="mer"/>
-<l:template name="Thu" text="jeu"/>
-<l:template name="Fri" text="ven"/>
-<l:template name="Sat" text="sam"/>
-<l:template name="Sun" text="dim"/>
-</l:context>
-<l:context name="htmlhelp"><l:template name="langcode" text="0x040c French (FRANCE)"/>
-</l:context>
-<l:context name="index"><l:template name="term-separator" text=", " lang="en"/>
-<l:template name="number-separator" text=", " lang="en"/>
-<l:template name="range-separator" text="-" lang="en"/>
-</l:context>
-<l:context name="iso690"><l:template name="lastfirst.sep" text=", " lang="en"/>
-<l:template name="alt.person.two.sep" text=" â " lang="en"/>
-<l:template name="alt.person.last.sep" text=" â " lang="en"/>
-<l:template name="alt.person.more.sep" text=" â " lang="en"/>
-<l:template name="primary.editor" text=" (ed.)" lang="en"/>
-<l:template name="primary.many" text=", et al." lang="en"/>
-<l:template name="primary.sep" text=". " lang="en"/>
-<l:template name="submaintitle.sep" text=": " lang="en"/>
-<l:template name="title.sep" text=". " lang="en"/>
-<l:template name="othertitle.sep" text=", " lang="en"/>
-<l:template name="medium1" text=" [" lang="en"/>
-<l:template name="medium2" text="]" lang="en"/>
-<l:template name="secondary.person.sep" text="; " lang="en"/>
-<l:template name="secondary.sep" text=". " lang="en"/>
-<l:template name="respons.sep" text=". " lang="en"/>
-<l:template name="edition.sep" text=". " lang="en"/>
-<l:template name="edition.serial.sep" text=", " lang="en"/>
-<l:template name="issuing.range" text="-" lang="en"/>
-<l:template name="issuing.div" text=", " lang="en"/>
-<l:template name="issuing.sep" text=". " lang="en"/>
-<l:template name="partnr.sep" text=". " lang="en"/>
-<l:template name="placepubl.sep" text=": " lang="en"/>
-<l:template name="publyear.sep" text=", " lang="en"/>
-<l:template name="pubinfo.sep" text=". " lang="en"/>
-<l:template name="spec.pubinfo.sep" text=", " lang="en"/>
-<l:template name="upd.sep" text=", " lang="en"/>
-<l:template name="datecit1" text=" [cited " lang="en"/>
-<l:template name="datecit2" text="]" lang="en"/>
-<l:template name="extent.sep" text=". " lang="en"/>
-<l:template name="locs.sep" text=", " lang="en"/>
-<l:template name="location.sep" text=". " lang="en"/>
-<l:template name="serie.sep" text=". " lang="en"/>
-<l:template name="notice.sep" text=". " lang="en"/>
-<l:template name="access" text="Available " lang="en"/>
-<l:template name="acctoo" text="Also available " lang="en"/>
-<l:template name="onwww" text="from World Wide Web" lang="en"/>
-<l:template name="oninet" text="from Internet" lang="en"/>
-<l:template name="access.end" text=": " lang="en"/>
-<l:template name="link1" text="&lt;" lang="en"/>
-<l:template name="link2" text="&gt;" lang="en"/>
-<l:template name="access.sep" text=". " lang="en"/>
-<l:template name="isbn" text="ISBN " lang="en"/>
-<l:template name="issn" text="ISSN " lang="en"/>
-<l:template name="stdnum.sep" text=". " lang="en"/>
-<l:template name="patcountry.sep" text=". " lang="en"/>
-<l:template name="pattype.sep" text=", " lang="en"/>
-<l:template name="patnum.sep" text=". " lang="en"/>
-<l:template name="patdate.sep" text=". " lang="en"/>
-</l:context><l:letters><l:l i="-1"/>
-<l:l i="0">Symboles</l:l>
-<l:l i="1">A</l:l>
-<l:l i="1">a</l:l>
-<l:l i="1">Ã </l:l>
-<l:l i="1">Ã</l:l>
-<l:l i="1">Ã¢</l:l>
-<l:l i="1">Ã</l:l>
-<l:l i="1">Ã</l:l>
-<l:l i="1">ÃŠ</l:l>
-<l:l i="2">B</l:l>
-<l:l i="2">b</l:l>
-<l:l i="3">C</l:l>
-<l:l i="3">c</l:l>
-<l:l i="3">Ã§</l:l>
-<l:l i="4">D</l:l>
-<l:l i="4">d</l:l>
-<l:l i="5">E</l:l>
-<l:l i="5">e</l:l>
-<l:l i="5">Ãª</l:l>
-<l:l i="5">Ã</l:l>
-<l:l i="5">Ã©</l:l>
-<l:l i="5">Ã</l:l>
-<l:l i="5">Ãš</l:l>
-<l:l i="5">Ã</l:l>
-<l:l i="5">Ã«</l:l>
-<l:l i="5">Ã</l:l>
-<l:l i="5">â¬</l:l>
-<l:l i="6">F</l:l>
-<l:l i="6">f</l:l>
-<l:l i="7">G</l:l>
-<l:l i="7">g</l:l>
-<l:l i="8">H</l:l>
-<l:l i="8">h</l:l>
-<l:l i="9">I</l:l>
-<l:l i="9">i</l:l>
-<l:l i="9">Ã</l:l>
-<l:l i="9">Ã®</l:l>
-<l:l i="9">Ã</l:l>
-<l:l i="9">Ã¯</l:l>
-<l:l i="10">J</l:l>
-<l:l i="10">j</l:l>
-<l:l i="11">K</l:l>
-<l:l i="11">k</l:l>
-<l:l i="12">L</l:l>
-<l:l i="12">l</l:l>
-<l:l i="13">M</l:l>
-<l:l i="13">m</l:l>
-<l:l i="14">N</l:l>
-<l:l i="14">n</l:l>
-<l:l i="15">O</l:l>
-<l:l i="15">o</l:l>
-<l:l i="15">Ã</l:l>
-<l:l i="15">Ã¶</l:l>
-<l:l i="15">Å</l:l>
-<l:l i="15">Å</l:l>
-<l:l i="16">P</l:l>
-<l:l i="16">p</l:l>
-<l:l i="17">Q</l:l>
-<l:l i="17">q</l:l>
-<l:l i="18">R</l:l>
-<l:l i="18">r</l:l>
-<l:l i="19">S</l:l>
-<l:l i="19">s</l:l>
-<l:l i="20">T</l:l>
-<l:l i="20">t</l:l>
-<l:l i="21">U</l:l>
-<l:l i="21">u</l:l>
-<l:l i="21">Ã</l:l>
-<l:l i="21">Ã¹</l:l>
-<l:l i="21">Ã</l:l>
-<l:l i="21">Ã»</l:l>
-<l:l i="21">Ã</l:l>
-<l:l i="21">ÃŒ</l:l>
-<l:l i="22">V</l:l>
-<l:l i="22">v</l:l>
-<l:l i="23">W</l:l>
-<l:l i="23">w</l:l>
-<l:l i="24">X</l:l>
-<l:l i="24">x</l:l>
-<l:l i="25">Y</l:l>
-<l:l i="25">y</l:l>
-<l:l i="26">Z</l:l>
-<l:l i="26">z</l:l>
-</l:letters>
-</l:l10n>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/gentext.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/gentext.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,831 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
-                exclude-result-prefixes="doc"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-
-<xsl:template match="*" mode="object.title.template">
-  <xsl:call-template name="gentext.template">
-    <xsl:with-param name="context" select="'title'"/>
-    <xsl:with-param name="name">
-      <xsl:call-template name="xpath.location"/>
-    </xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="chapter" mode="object.title.template">
-  <xsl:choose>
-    <xsl:when test="string($chapter.autolabel) != 0">
-      <xsl:call-template name="gentext.template">
-        <xsl:with-param name="context" select="'title-numbered'"/>
-        <xsl:with-param name="name">
-          <xsl:call-template name="xpath.location"/>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="gentext.template">
-        <xsl:with-param name="context" select="'title-unnumbered'"/>
-        <xsl:with-param name="name">
-          <xsl:call-template name="xpath.location"/>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="appendix" mode="object.title.template">
-  <xsl:choose>
-    <xsl:when test="string($appendix.autolabel) != 0">
-      <xsl:call-template name="gentext.template">
-        <xsl:with-param name="context" select="'title-numbered'"/>
-        <xsl:with-param name="name">
-          <xsl:call-template name="xpath.location"/>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="gentext.template">
-        <xsl:with-param name="context" select="'title-unnumbered'"/>
-        <xsl:with-param name="name">
-          <xsl:call-template name="xpath.location"/>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="part" mode="object.title.template">
-  <xsl:choose>
-    <xsl:when test="string($part.autolabel) != 0">
-      <xsl:call-template name="gentext.template">
-        <xsl:with-param name="context" select="'title-numbered'"/>
-        <xsl:with-param name="name">
-          <xsl:call-template name="xpath.location"/>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="gentext.template">
-        <xsl:with-param name="context" select="'title-unnumbered'"/>
-        <xsl:with-param name="name">
-          <xsl:call-template name="xpath.location"/>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="section|sect1|sect2|sect3|sect4|sect5|simplesect
-                     |bridgehead"
-              mode="object.title.template">
-  <xsl:variable name="is.numbered">
-    <xsl:call-template name="label.this.section"/>
-  </xsl:variable>
-  <xsl:choose>
-    <xsl:when test="$is.numbered != 0">
-      <xsl:call-template name="gentext.template">
-        <xsl:with-param name="context" select="'title-numbered'"/>
-        <xsl:with-param name="name">
-          <xsl:call-template name="xpath.location"/>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="gentext.template">
-        <xsl:with-param name="context" select="'title-unnumbered'"/>
-        <xsl:with-param name="name">
-          <xsl:call-template name="xpath.location"/>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="procedure" mode="object.title.template">
-  <xsl:choose>
-    <xsl:when test="$formal.procedures != 0 and title">
-      <xsl:call-template name="gentext.template">
-        <xsl:with-param name="context" select="'title'"/>
-        <xsl:with-param name="name">
-          <xsl:call-template name="xpath.location"/>
-          <xsl:text>.formal</xsl:text>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="gentext.template">
-        <xsl:with-param name="context" select="'title'"/>
-        <xsl:with-param name="name">
-          <xsl:call-template name="xpath.location"/>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ============================================================ -->
-
-<xsl:template match="*" mode="object.subtitle.template">
-  <xsl:call-template name="gentext.template">
-    <xsl:with-param name="context" select="'subtitle'"/>
-    <xsl:with-param name="name">
-      <xsl:call-template name="xpath.location"/>
-    </xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<!-- ============================================================ -->
-
-<xsl:template match="*" mode="is.autonumber">
-  <xsl:value-of select="'0'"/>
-</xsl:template>
-
-<xsl:template match="section|sect1|sect2|sect3|sect4|sect5" 
-              mode="is.autonumber">
-  <xsl:call-template name="label.this.section"/>
-</xsl:template>
-
-<xsl:template match="figure|example|table|equation" mode="is.autonumber">
-  <xsl:value-of select="'1'"/>
-</xsl:template>
-
-<xsl:template match="appendix" mode="is.autonumber">
-  <xsl:value-of select="$appendix.autolabel"/>
-</xsl:template>
-
-<xsl:template match="chapter" mode="is.autonumber">
-  <xsl:value-of select="$chapter.autolabel"/>
-</xsl:template>
-
-<xsl:template match="part" mode="is.autonumber">
-  <xsl:value-of select="$part.autolabel"/>
-</xsl:template>
-
-<xsl:template match="preface" mode="is.autonumber">
-  <xsl:value-of select="$preface.autolabel"/>
-</xsl:template>
-
-<xsl:template match="question|answer" mode="is.autonumber">
-  <xsl:choose>
-    <xsl:when test="$qanda.defaultlabel = 'number'
-                    and not(label)">
-      <xsl:value-of select="'1'"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="'0'"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="qandadiv" mode="is.autonumber">
-  <xsl:value-of select="$qandadiv.autolabel"/>
-</xsl:template>
-
-<xsl:template match="bridgehead" mode="is.autonumber">
-  <xsl:value-of select="$section.autolabel"/>
-</xsl:template>
-
-<xsl:template match="*" mode="object.xref.template">
-  <xsl:param name="purpose"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="referrer"/>
-
-  <!-- Is autonumbering on? -->
-  <xsl:variable name="autonumber">
-    <xsl:apply-templates select="." mode="is.autonumber"/>
-  </xsl:variable>
-
-  <xsl:variable name="number-and-title-template">
-    <xsl:call-template name="gentext.template.exists">
-      <xsl:with-param name="context" select="'xref-number-and-title'"/>
-      <xsl:with-param name="name">
-        <xsl:call-template name="xpath.location"/>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="number-template">
-    <xsl:call-template name="gentext.template.exists">
-      <xsl:with-param name="context" select="'xref-number'"/>
-      <xsl:with-param name="name">
-        <xsl:call-template name="xpath.location"/>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="context">
-    <xsl:choose>
-      <xsl:when test="string($autonumber) != 0 
-                      and $number-and-title-template != 0
-                      and $xref.with.number.and.title != 0">
-         <xsl:value-of select="'xref-number-and-title'"/>
-      </xsl:when>
-      <xsl:when test="string($autonumber) != 0 
-                      and $number-template != 0">
-         <xsl:value-of select="'xref-number'"/>
-      </xsl:when>
-      <xsl:otherwise>
-         <xsl:value-of select="'xref'"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:call-template name="gentext.template">
-    <xsl:with-param name="context" select="$context"/>
-    <xsl:with-param name="name">
-      <xsl:call-template name="xpath.location"/>
-    </xsl:with-param>
-    <xsl:with-param name="purpose" select="$purpose"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-  </xsl:call-template>
-
-</xsl:template>
-
-
-<!-- ============================================================ -->
-
-<xsl:template match="*" mode="object.title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:variable name="template">
-    <xsl:apply-templates select="." mode="object.title.template"/>
-  </xsl:variable>
-
-<!--
-  <xsl:message>
-    <xsl:text>object.title.markup: </xsl:text>
-    <xsl:value-of select="local-name(.)"/>
-    <xsl:text>: </xsl:text>
-    <xsl:value-of select="$template"/>
-  </xsl:message>
--->
-
-  <xsl:call-template name="substitute-markup">
-    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-    <xsl:with-param name="template" select="$template"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="*" mode="object.title.markup.textonly">
-  <xsl:variable name="title">
-    <xsl:apply-templates select="." mode="object.title.markup"/>
-  </xsl:variable>
-  <xsl:value-of select="normalize-space($title)"/>
-</xsl:template>
-
-<!-- ============================================================ -->
-
-<xsl:template match="*" mode="object.titleabbrev.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-
-  <!-- Just for consistency in template naming -->
-
-  <xsl:apply-templates select="." mode="titleabbrev.markup">
-    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<!-- ============================================================ -->
-
-<xsl:template match="*" mode="object.subtitle.markup">
-  <xsl:variable name="template">
-    <xsl:apply-templates select="." mode="object.subtitle.template"/>
-  </xsl:variable>
-
-  <xsl:call-template name="substitute-markup">
-    <xsl:with-param name="template" select="$template"/>
-  </xsl:call-template>
-</xsl:template>
-
-<!-- ============================================================ -->
-
-<xsl:template match="*" mode="object.xref.markup">
-  <xsl:param name="purpose"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="referrer"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:variable name="template">
-    <xsl:choose>
-      <xsl:when test="starts-with(normalize-space($xrefstyle), 'select:')">
-        <xsl:call-template name="make.gentext.template">
-          <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-          <xsl:with-param name="purpose" select="$purpose"/>
-          <xsl:with-param name="referrer" select="$referrer"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:when test="starts-with(normalize-space($xrefstyle), 'template:')">
-        <xsl:value-of select="substring-after(normalize-space($xrefstyle), 'template:')"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:apply-templates select="." mode="object.xref.template">
-          <xsl:with-param name="purpose" select="$purpose"/>
-          <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-          <xsl:with-param name="referrer" select="$referrer"/>
-        </xsl:apply-templates>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-<!-- 
-  <xsl:message>
-    <xsl:text>object.xref.markup: </xsl:text>
-    <xsl:value-of select="local-name(.)"/>
-    <xsl:text>(</xsl:text>
-    <xsl:value-of select="$xrefstyle"/>
-    <xsl:text>, </xsl:text>
-    <xsl:value-of select="$purpose"/>
-    <xsl:text>)</xsl:text>
-    <xsl:text>: [</xsl:text>
-    <xsl:value-of select="$template"/>
-    <xsl:text>]</xsl:text>
-  </xsl:message>
--->
-
-  <xsl:if test="$template = '' and $verbose != 0">
-    <xsl:message>
-      <xsl:text>object.xref.markup: empty xref template</xsl:text>
-      <xsl:text> for linkend="</xsl:text>
-      <xsl:value-of select="@id|@xml:id"/>
-      <xsl:text>" and @xrefstyle="</xsl:text>
-      <xsl:value-of select="$xrefstyle"/>
-      <xsl:text>"</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:call-template name="substitute-markup">
-    <xsl:with-param name="purpose" select="$purpose"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="template" select="$template"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="listitem" mode="object.xref.markup">
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:choose>
-    <xsl:when test="parent::orderedlist">
-      <xsl:variable name="template">
-        <xsl:apply-templates select="." mode="object.xref.template"/>
-      </xsl:variable>
-      <xsl:call-template name="substitute-markup">
-        <xsl:with-param name="template" select="$template"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="$verbose != 0">
-      <xsl:message>
-        <xsl:text>Xref is only supported to listitems in an</xsl:text>
-        <xsl:text> orderedlist: </xsl:text>
-        <xsl:value-of select="@id|@xml:id"/>
-      </xsl:message>
-      <xsl:text>???</xsl:text>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="question" mode="object.xref.markup">
-  <xsl:param name="purpose"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="referrer"/>
-
-  <xsl:variable name="deflabel">
-    <xsl:choose>
-      <xsl:when test="ancestor-or-self::*[@defaultlabel]">
-        <xsl:value-of select="(ancestor-or-self::*[@defaultlabel])[last()]
-                              /@defaultlabel"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$qanda.defaultlabel"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="template">
-    <xsl:choose>
-      <!-- This avoids double Q: Q: in xref when defaultlabel=qanda -->
-      <xsl:when test="$deflabel = 'qanda' and not(label)">%n</xsl:when>
-      <xsl:otherwise>
-        <xsl:apply-templates select="." mode="object.xref.template">
-          <xsl:with-param name="purpose" select="$purpose"/>
-          <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-          <xsl:with-param name="referrer" select="$referrer"/>
-        </xsl:apply-templates>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:call-template name="substitute-markup">
-    <xsl:with-param name="purpose" select="$purpose"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="template" select="$template"/>
-  </xsl:call-template>
-</xsl:template>
-
-<!-- ============================================================ -->
-
-<xsl:template name="substitute-markup">
-  <xsl:param name="template" select="''"/>
-  <xsl:param name="allow-anchors" select="'0'"/>
-  <xsl:param name="title" select="''"/>
-  <xsl:param name="subtitle" select="''"/>
-  <xsl:param name="docname" select="''"/>
-  <xsl:param name="label" select="''"/>
-  <xsl:param name="pagenumber" select="''"/>
-  <xsl:param name="purpose"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="referrer"/>
-  <xsl:param name="verbose"/>
-
-  <xsl:choose>
-    <xsl:when test="contains($template, '%')">
-      <xsl:value-of select="substring-before($template, '%')"/>
-      <xsl:variable name="candidate"
-             select="substring(substring-after($template, '%'), 1, 1)"/>
-      <xsl:choose>
-        <xsl:when test="$candidate = 't'">
-          <xsl:apply-templates select="." mode="insert.title.markup">
-            <xsl:with-param name="purpose" select="$purpose"/>
-            <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-            <xsl:with-param name="title">
-              <xsl:choose>
-                <xsl:when test="$title != ''">
-                  <xsl:copy-of select="$title"/>
-                </xsl:when>
-                <xsl:otherwise>
-                  <xsl:apply-templates select="." mode="title.markup">
-                    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-                    <xsl:with-param name="verbose" select="$verbose"/>
-                  </xsl:apply-templates>
-                </xsl:otherwise>
-              </xsl:choose>
-            </xsl:with-param>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:when test="$candidate = 's'">
-          <xsl:apply-templates select="." mode="insert.subtitle.markup">
-            <xsl:with-param name="purpose" select="$purpose"/>
-            <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-            <xsl:with-param name="subtitle">
-              <xsl:choose>
-                <xsl:when test="$subtitle != ''">
-                  <xsl:copy-of select="$subtitle"/>
-                </xsl:when>
-                <xsl:otherwise>
-                  <xsl:apply-templates select="." mode="subtitle.markup">
-                    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-                  </xsl:apply-templates>
-                </xsl:otherwise>
-              </xsl:choose>
-            </xsl:with-param>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:when test="$candidate = 'n'">
-          <xsl:apply-templates select="." mode="insert.label.markup">
-            <xsl:with-param name="purpose" select="$purpose"/>
-            <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-            <xsl:with-param name="label">
-              <xsl:choose>
-                <xsl:when test="$label != ''">
-                  <xsl:copy-of select="$label"/>
-                </xsl:when>
-                <xsl:otherwise>
-                  <xsl:apply-templates select="." mode="label.markup"/>
-                </xsl:otherwise>
-              </xsl:choose>
-            </xsl:with-param>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:when test="$candidate = 'p'">
-          <xsl:apply-templates select="." mode="insert.pagenumber.markup">
-            <xsl:with-param name="purpose" select="$purpose"/>
-            <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-            <xsl:with-param name="pagenumber">
-              <xsl:choose>
-                <xsl:when test="$pagenumber != ''">
-                  <xsl:copy-of select="$pagenumber"/>
-                </xsl:when>
-                <xsl:otherwise>
-                  <xsl:apply-templates select="." mode="pagenumber.markup"/>
-                </xsl:otherwise>
-              </xsl:choose>
-            </xsl:with-param>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:when test="$candidate = 'o'">
-          <!-- olink target document title -->
-          <xsl:apply-templates select="." mode="insert.olink.docname.markup">
-            <xsl:with-param name="purpose" select="$purpose"/>
-            <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-            <xsl:with-param name="docname">
-              <xsl:choose>
-                <xsl:when test="$docname != ''">
-                  <xsl:copy-of select="$docname"/>
-                </xsl:when>
-                <xsl:otherwise>
-                  <xsl:apply-templates select="." mode="olink.docname.markup"/>
-                </xsl:otherwise>
-              </xsl:choose>
-            </xsl:with-param>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:when test="$candidate = 'd'">
-          <xsl:apply-templates select="." mode="insert.direction.markup">
-            <xsl:with-param name="purpose" select="$purpose"/>
-            <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-            <xsl:with-param name="direction">
-              <xsl:choose>
-                <xsl:when test="$referrer">
-                  <xsl:variable name="referent-is-below">
-                    <xsl:for-each select="preceding::xref">
-                      <xsl:if test="generate-id(.) = generate-id($referrer)">1</xsl:if>
-                    </xsl:for-each>
-                  </xsl:variable>
-                  <xsl:choose>
-                    <xsl:when test="$referent-is-below = ''">
-                      <xsl:call-template name="gentext">
-                        <xsl:with-param name="key" select="'above'"/>
-                      </xsl:call-template>
-                    </xsl:when>
-                    <xsl:otherwise>
-                      <xsl:call-template name="gentext">
-                        <xsl:with-param name="key" select="'below'"/>
-                      </xsl:call-template>
-                    </xsl:otherwise>
-                  </xsl:choose>
-                </xsl:when>
-                <xsl:otherwise>
-                  <xsl:message>Attempt to use %d in gentext with no referrer!</xsl:message>
-                </xsl:otherwise>
-              </xsl:choose>
-            </xsl:with-param>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:when test="$candidate = '%' ">
-          <xsl:text>%</xsl:text>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:text>%</xsl:text><xsl:value-of select="$candidate"/>
-        </xsl:otherwise>
-      </xsl:choose>
-      <!-- recurse with the rest of the template string -->
-      <xsl:variable name="rest"
-            select="substring($template,
-            string-length(substring-before($template, '%'))+3)"/>
-      <xsl:call-template name="substitute-markup">
-        <xsl:with-param name="template" select="$rest"/>
-        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-        <xsl:with-param name="title" select="$title"/>
-        <xsl:with-param name="subtitle" select="$subtitle"/>
-        <xsl:with-param name="docname" select="$docname"/>
-        <xsl:with-param name="label" select="$label"/>
-        <xsl:with-param name="pagenumber" select="$pagenumber"/>
-        <xsl:with-param name="purpose" select="$purpose"/>
-        <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-        <xsl:with-param name="referrer" select="$referrer"/>
-        <xsl:with-param name="verbose" select="$verbose"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$template"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ============================================================ -->
-
-<xsl:template name="make.gentext.template">
-  <xsl:param name="xrefstyle" select="''"/>
-  <xsl:param name="purpose"/>
-  <xsl:param name="referrer"/>
-  <xsl:param name="lang">
-    <xsl:call-template name="l10n.language"/>
-  </xsl:param>
-  <xsl:param name="target.elem" select="local-name(.)"/>
-
-  <!-- parse xrefstyle to get parts -->
-  <xsl:variable name="parts"
-      select="substring-after(normalize-space($xrefstyle), 'select:')"/>
-
-  <xsl:variable name="labeltype">
-    <xsl:choose>
-      <xsl:when test="contains($parts, 'labelnumber')">
-         <xsl:text>labelnumber</xsl:text>
-      </xsl:when>
-      <xsl:when test="contains($parts, 'labelname')">
-         <xsl:text>labelname</xsl:text>
-      </xsl:when>
-      <xsl:when test="contains($parts, 'label')">
-         <xsl:text>label</xsl:text>
-      </xsl:when>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="titletype">
-    <xsl:choose>
-      <xsl:when test="contains($parts, 'quotedtitle')">
-         <xsl:text>quotedtitle</xsl:text>
-      </xsl:when>
-      <xsl:when test="contains($parts, 'title')">
-         <xsl:text>title</xsl:text>
-      </xsl:when>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="pagetype">
-    <xsl:choose>
-      <xsl:when test="$insert.olink.page.number = 'no' and
-                      local-name($referrer) = 'olink'">
-        <!-- suppress page numbers -->
-      </xsl:when>
-      <xsl:when test="$insert.xref.page.number = 'no' and
-                      local-name($referrer) != 'olink'">
-        <!-- suppress page numbers -->
-      </xsl:when>
-      <xsl:when test="contains($parts, 'nopage')">
-         <xsl:text>nopage</xsl:text>
-      </xsl:when>
-      <xsl:when test="contains($parts, 'pagenumber')">
-         <xsl:text>pagenumber</xsl:text>
-      </xsl:when>
-      <xsl:when test="contains($parts, 'pageabbrev')">
-         <xsl:text>pageabbrev</xsl:text>
-      </xsl:when>
-      <xsl:when test="contains($parts, 'Page')">
-         <xsl:text>Page</xsl:text>
-      </xsl:when>
-      <xsl:when test="contains($parts, 'page')">
-         <xsl:text>page</xsl:text>
-      </xsl:when>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="docnametype">
-    <xsl:choose>
-      <xsl:when test="($olink.doctitle = 0 or
-                       $olink.doctitle = 'no') and
-                      local-name($referrer) = 'olink'">
-        <!-- suppress docname -->
-      </xsl:when>
-      <xsl:when test="contains($parts, 'nodocname')">
-         <xsl:text>nodocname</xsl:text>
-      </xsl:when>
-      <xsl:when test="contains($parts, 'docnamelong')">
-         <xsl:text>docnamelong</xsl:text>
-      </xsl:when>
-      <xsl:when test="contains($parts, 'docname')">
-         <xsl:text>docname</xsl:text>
-      </xsl:when>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:if test="$labeltype != ''">
-    <xsl:choose>
-      <xsl:when test="$labeltype = 'labelname'">
-        <xsl:call-template name="gentext">
-          <xsl:with-param name="key">
-            <xsl:choose>
-              <xsl:when test="local-name($referrer) = 'olink'">
-                <xsl:value-of select="$target.elem"/>
-              </xsl:when>
-              <xsl:otherwise>
-                <xsl:value-of select="local-name(.)"/>
-              </xsl:otherwise>
-            </xsl:choose>
-          </xsl:with-param>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:when test="$labeltype = 'labelnumber'">
-        <xsl:text>%n</xsl:text>
-      </xsl:when>
-      <xsl:when test="$labeltype = 'label'">
-        <xsl:call-template name="gentext.template">
-          <xsl:with-param name="context" select="'xref-number'"/>
-          <xsl:with-param name="name">
-            <xsl:choose>
-              <xsl:when test="local-name($referrer) = 'olink'">
-                <xsl:value-of select="$target.elem"/>
-              </xsl:when>
-              <xsl:otherwise>
-                <xsl:call-template name="xpath.location"/>
-              </xsl:otherwise>
-            </xsl:choose>
-          </xsl:with-param>
-          <xsl:with-param name="purpose" select="$purpose"/>
-          <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-          <xsl:with-param name="referrer" select="$referrer"/>
-        </xsl:call-template>
-      </xsl:when>
-    </xsl:choose>
-
-    <xsl:choose>
-      <xsl:when test="$titletype != ''">
-        <xsl:value-of select="$xref.label-title.separator"/>
-      </xsl:when>
-      <xsl:when test="$pagetype != ''">
-        <xsl:value-of select="$xref.label-page.separator"/>
-      </xsl:when>
-    </xsl:choose>
-  </xsl:if>
-
-  <xsl:if test="$titletype != ''">
-    <xsl:choose>
-      <xsl:when test="$titletype = 'title'">
-        <xsl:text>%t</xsl:text>
-      </xsl:when>
-      <xsl:when test="$titletype = 'quotedtitle'">
-        <xsl:call-template name="gentext.dingbat">
-          <xsl:with-param name="dingbat" select="'startquote'"/>
-        </xsl:call-template>
-        <xsl:text>%t</xsl:text>
-        <xsl:call-template name="gentext.dingbat">
-          <xsl:with-param name="dingbat" select="'endquote'"/>
-        </xsl:call-template>
-      </xsl:when>
-    </xsl:choose>
-
-    <xsl:choose>
-      <xsl:when test="$pagetype != '' and $pagetype != 'nopage'">
-        <xsl:value-of select="$xref.title-page.separator"/>
-      </xsl:when>
-    </xsl:choose>
-  </xsl:if>
-  
-  <!-- special case: use regular xref template if just turning off page -->
-  <xsl:if test="($pagetype = 'nopage' or $docnametype = 'nodocname')
-                  and local-name($referrer) != 'olink'
-                  and $labeltype = '' 
-                  and $titletype = ''">
-    <xsl:apply-templates select="." mode="object.xref.template">
-      <xsl:with-param name="purpose" select="$purpose"/>
-      <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-      <xsl:with-param name="referrer" select="$referrer"/>
-    </xsl:apply-templates>
-  </xsl:if>
-
-  <xsl:if test="$pagetype != ''">
-    <xsl:choose>
-      <xsl:when test="$pagetype = 'page'">
-        <xsl:call-template name="gentext.template">
-          <xsl:with-param name="context" select="'xref'"/>
-          <xsl:with-param name="name" select="'page'"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:when test="$pagetype = 'Page'">
-        <xsl:call-template name="gentext.template">
-          <xsl:with-param name="context" select="'xref'"/>
-          <xsl:with-param name="name" select="'Page'"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:when test="$pagetype = 'pageabbrev'">
-        <xsl:call-template name="gentext.template">
-          <xsl:with-param name="context" select="'xref'"/>
-          <xsl:with-param name="name" select="'pageabbrev'"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:when test="$pagetype = 'pagenumber'">
-        <xsl:text>%p</xsl:text>
-      </xsl:when>
-    </xsl:choose>
-
-  </xsl:if>
-
-  <!-- Add reference to other document title -->
-  <xsl:if test="$docnametype != '' and local-name($referrer) = 'olink'">
-    <!-- Any separator should be in the gentext template -->
-    <xsl:choose>
-      <xsl:when test="$docnametype = 'docnamelong'">
-        <xsl:call-template name="gentext.template">
-          <xsl:with-param name="context" select="'xref'"/>
-          <xsl:with-param name="name" select="'docnamelong'"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:when test="$docnametype = 'docname'">
-        <xsl:call-template name="gentext.template">
-          <xsl:with-param name="context" select="'xref'"/>
-          <xsl:with-param name="name" select="'docname'"/>
-        </xsl:call-template>
-      </xsl:when>
-    </xsl:choose>
-
-  </xsl:if>
-  
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/insertfile.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/insertfile.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,111 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:xi="http://www.w3.org/2001/XInclude"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<xsl:param name="textdata.default.encoding"></xsl:param>
-
-<!-- * This stylesheet makes a copy of a source tree, replacing all -->
-<!-- * instances of the following with corresponding Xinclude instances -->
-<!-- * in the result tree. -->
-<!-- * -->
-<!-- *   <textobject><textdata fileref="foo.txt"> -->
-<!-- *   <imagedata format="linespecific" fileref="foo.txt"> -->
-<!-- *   <inlinegraphic format="linespecific" fileref="foo.txt"> -->
-<!-- * -->
-<!-- * Those become: -->
-<!-- * -->
-<!-- *   <xi:include href="foo.txt" parse="text"/> -->
-<!-- * -->
-<!-- * It also works as expected with entityref in place of fileref, -->
-<!-- * and copies over the value of the <textdata>âencodingâ atrribute (if -->
-<!-- * found). It is basically intended as an alternative to using the -->
-<!-- * DocBook XSLT Java insertfile() extension. -->
-
-<!-- ==================================================================== -->
-
-<xsl:template name="get.external.filename">
-  <xsl:choose>
-    <xsl:when test="@entityref">
-      <xsl:value-of select="unparsed-entity-uri(@entityref)"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="@fileref"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="textobject[child::textdata[@entityref|@fileref]]">
-  <xsl:apply-templates select="textdata"/>
-</xsl:template>
-
-<xsl:template match="textdata[@entityref|@fileref]">
-  <xsl:variable name="filename">
-    <xsl:call-template name="get.external.filename"/>
-  </xsl:variable>
-  <xsl:variable name="encoding">
-    <xsl:choose>
-      <xsl:when test="@encoding">
-        <xsl:value-of select="@encoding"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$textdata.default.encoding"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-  <xi:include href="{$filename}" parse="text" encoding="{$encoding}"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template
-    match="inlinemediaobject
-           [child::imageobject
-           [child::imagedata
-           [@format = 'linespecific' and
-           (@entityref|@fileref)]]]">
-  <xsl:apply-templates select="imageobject/imagedata"/>
-</xsl:template>
-
-<xsl:template match="imagedata
-                     [@format = 'linespecific' and
-                     (@entityref|@fileref)]">
-  <xsl:variable name="filename">
-    <xsl:call-template name="get.external.filename"/>
-  </xsl:variable>
-  <xi:include href="{$filename}" parse="text" encoding="{$textdata.default.encoding}"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="inlinegraphic
-                     [@format = 'linespecific' and
-                     (@entityref|@fileref)]">
-  <xsl:variable name="filename">
-    <xsl:call-template name="get.external.filename"/>
-  </xsl:variable>
-  <xi:include href="{$filename}" parse="text" encoding="{$textdata.default.encoding}"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<!-- * copy everything else into result tree as-is -->
-<xsl:template match="node() | @*">
-  <xsl:copy>
-    <xsl:apply-templates select="@* | node()"/>
-  </xsl:copy>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/it.xml
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/it.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,1241 +1,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="it" english-language-name="Italian">
-
-<!-- * This file is generated automatically. -->
-<!-- * To submit changes to this file upstream (to the DocBook Project) -->
-<!-- * do not submit an edited version of this file. Instead, submit an -->
-<!-- * edited version of the source file at the following location: -->
-<!-- * -->
-<!-- *  https://svn.sourceforge.net/svnroot/docbook/trunk/gentext/locale/it.xml -->
-<!-- * -->
-<!-- * E-mail the edited it.xml source file to: -->
-<!-- * -->
-<!-- *  docbook-developers@lists.sourceforge.net -->
-
-<!-- ******************************************************************** -->
-
-<!-- This file is part of the XSL DocBook Stylesheet distribution. -->
-<!-- See ../README or http://docbook.sf.net/release/xsl/current/ for -->
-<!-- copyright and other information. -->
-
-<!-- ******************************************************************** -->
-<!-- In these files, % with a letter is used for a placeholder: -->
-<!--   %t is the current element's title -->
-<!--   %s is the current element's subtitle (if applicable)-->
-<!--   %n is the current element's number label-->
-<!--   %p is the current element's page number (if applicable)-->
-<!-- ******************************************************************** -->
-
-
-<l:gentext key="Abstract" text="Estratto"/>
-<l:gentext key="abstract" text="Estratto"/>
-<l:gentext key="Answer" text="R:"/>
-<l:gentext key="answer" text="R:"/>
-<l:gentext key="Appendix" text="Appendice"/>
-<l:gentext key="appendix" text="appendice"/>
-<l:gentext key="Article" text="Articolo"/>
-<l:gentext key="article" text="Articolo"/>
-<l:gentext key="Author" text="Autori"/>
-<l:gentext key="Bibliography" text="Bibliografia"/>
-<l:gentext key="bibliography" text="Bibliografia"/>
-<l:gentext key="Book" text="Libro"/>
-<l:gentext key="book" text="Libro"/>
-<l:gentext key="CAUTION" text="ATTENZIONE"/>
-<l:gentext key="Caution" text="Attenzione"/>
-<l:gentext key="caution" text="Attenzione"/>
-<l:gentext key="Chapter" text="Capitolo"/>
-<l:gentext key="chapter" text="capitolo"/>
-<l:gentext key="Colophon" text="Colophon"/>
-<l:gentext key="colophon" text="Colophon"/>
-<l:gentext key="Copyright" text="Copyright"/>
-<l:gentext key="copyright" text="Copyright"/>
-<l:gentext key="Dedication" text="Dedica"/>
-<l:gentext key="dedication" text="Dedica"/>
-<l:gentext key="Edition" text="Edizione"/>
-<l:gentext key="edition" text="Edizione"/>
-<l:gentext key="Editor" text="Editor" lang="en"/>
-<l:gentext key="Equation" text="Equazione"/>
-<l:gentext key="equation" text="Equazione"/>
-<l:gentext key="Example" text="Esempio"/>
-<l:gentext key="example" text="Esempio"/>
-<l:gentext key="Figure" text="Figura"/>
-<l:gentext key="figure" text="Figura"/>
-<l:gentext key="Glossary" text="Glossario"/>
-<l:gentext key="glossary" text="Glossario"/>
-<l:gentext key="GlossSee" text="Vedi"/>
-<l:gentext key="glosssee" text="Vedi"/>
-<l:gentext key="GlossSeeAlso" text="Vedi Anche"/>
-<l:gentext key="glossseealso" text="Vedi Anche"/>
-<l:gentext key="IMPORTANT" text="IMPORTANTE"/>
-<l:gentext key="important" text="Importante"/>
-<l:gentext key="Important" text="Importante"/>
-<l:gentext key="Index" text="Indice"/>
-<l:gentext key="index" text="Indice"/>
-<l:gentext key="ISBN" text="ISBN"/>
-<l:gentext key="isbn" text="ISBN"/>
-<l:gentext key="LegalNotice" text="Note Legali"/>
-<l:gentext key="legalnotice" text="Note Legali"/>
-<l:gentext key="MsgAud" text="Pubblico"/>
-<l:gentext key="msgaud" text="Pubblico"/>
-<l:gentext key="MsgLevel" text="Livello"/>
-<l:gentext key="msglevel" text="Livello"/>
-<l:gentext key="MsgOrig" text="Origine"/>
-<l:gentext key="msgorig" text="Origine"/>
-<l:gentext key="NOTE" text="NOTA"/>
-<l:gentext key="Note" text="Nota"/>
-<l:gentext key="note" text="Nota"/>
-<l:gentext key="Part" text="Parte"/>
-<l:gentext key="part" text="Parte"/>
-<l:gentext key="Preface" text="Prefazione"/>
-<l:gentext key="preface" text="Prefazione"/>
-<l:gentext key="Procedure" text="Procedura"/>
-<l:gentext key="procedure" text="Procedura"/>
-<l:gentext key="ProductionSet" text="Produzione"/>
-<l:gentext key="PubDate" text="Data di pubblicazione"/>
-<l:gentext key="pubdate" text="Data di pubblicazione"/>
-<l:gentext key="Published" text="Pubblicato"/>
-<l:gentext key="published" text="Pubblicato"/>
-<l:gentext key="Publisher" text="Publisher" lang="en"/>
-<l:gentext key="Qandadiv" text="D e R"/>
-<l:gentext key="qandadiv" text="D e R"/>
-<l:gentext key="QandASet" text="Frequently Asked Questions" lang="en"/>
-<l:gentext key="Question" text="D:"/>
-<l:gentext key="question" text="D:"/>
-<l:gentext key="RefEntry" text=""/>
-<l:gentext key="refentry" text=""/>
-<l:gentext key="Reference" text="Riferimento"/>
-<l:gentext key="reference" text="Riferimento"/>
-<l:gentext key="References" text="Riferimenti"/>
-<l:gentext key="RefName" text="Nome"/>
-<l:gentext key="refname" text="Nome"/>
-<l:gentext key="RefSection" text=""/>
-<l:gentext key="refsection" text=""/>
-<l:gentext key="RefSynopsisDiv" text="Sinossi"/>
-<l:gentext key="refsynopsisdiv" text="Sinossi"/>
-<l:gentext key="RevHistory" text="Diario delle Revisioni"/>
-<l:gentext key="revhistory" text="Diario delle Revisioni"/>
-<l:gentext key="revision" text="Revisione"/>
-<l:gentext key="Revision" text="Revisione"/>
-<l:gentext key="sect1" text="Sezione"/>
-<l:gentext key="sect2" text="Sezione"/>
-<l:gentext key="sect3" text="Sezione"/>
-<l:gentext key="sect4" text="Sezione"/>
-<l:gentext key="sect5" text="Sezione"/>
-<l:gentext key="section" text="Sezione"/>
-<l:gentext key="Section" text="Sezione"/>
-<l:gentext key="see" text="Vd."/>
-<l:gentext key="See" text="Vd."/>
-<l:gentext key="seealso" text="Vd. Anche"/>
-<l:gentext key="Seealso" text="Vd. anche"/>
-<l:gentext key="SeeAlso" text="Vd. Anche"/>
-<l:gentext key="set" text="Raccolta"/>
-<l:gentext key="Set" text="Raccolta"/>
-<l:gentext key="setindex" text="Indice Raccolta"/>
-<l:gentext key="SetIndex" text="Indice Raccolta"/>
-<l:gentext key="Sidebar" text=""/>
-<l:gentext key="sidebar" text="nota a margine"/>
-<l:gentext key="step" text="passo"/>
-<l:gentext key="Step" text="Passo"/>
-<l:gentext key="table" text="Tabella"/>
-<l:gentext key="Table" text="Tabella"/>
-<l:gentext key="task" text="Task" lang="en"/>
-<l:gentext key="Task" text="Task" lang="en"/>
-<l:gentext key="tip" text="Suggerimento"/>
-<l:gentext key="TIP" text="SUGGERIMENTO"/>
-<l:gentext key="Tip" text="Suggerimento"/>
-<l:gentext key="Warning" text="Avvertimento"/>
-<l:gentext key="warning" text="avvertimento"/>
-<l:gentext key="WARNING" text="AVVERTIMENTO"/>
-<l:gentext key="and" text="e"/>
-<l:gentext key="by" text="di"/>
-<l:gentext key="Edited" text="A cura"/>
-<l:gentext key="edited" text="A cura"/>
-<l:gentext key="Editedby" text="A cura di"/>
-<l:gentext key="editedby" text="A cura di"/>
-<l:gentext key="in" text="in"/>
-<l:gentext key="lastlistcomma" text=","/>
-<l:gentext key="listcomma" text=","/>
-<l:gentext key="nonexistantelement" text="elemento non esistente"/>
-<l:gentext key="notes" text="Note"/>
-<l:gentext key="Notes" text="Note"/>
-<l:gentext key="Pgs" text="pp."/>
-<l:gentext key="pgs" text="pp."/>
-<l:gentext key="Revisedby" text="Revisionato da: "/>
-<l:gentext key="revisedby" text="Revisionato da: "/>
-<l:gentext key="TableNotes" text="Note"/>
-<l:gentext key="tablenotes" text="Note"/>
-<l:gentext key="TableofContents" text="Sommario"/>
-<l:gentext key="tableofcontents" text="Sommario"/>
-<l:gentext key="unexpectedelementname" text="Nome elemento inaspettato"/>
-<l:gentext key="unsupported" text="non supportato"/>
-<l:gentext key="xrefto" text="riferimento a"/>
-<l:gentext key="Authors" text="Autori"/>
-<l:gentext key="copyeditor" text="Copy Editor" lang="en"/>
-<l:gentext key="graphicdesigner" text="Designer Grafico"/>
-<l:gentext key="productioneditor" text="Production Editor" lang="en"/>
-<l:gentext key="technicaleditor" text="Technical Editor" lang="en"/>
-<l:gentext key="translator" text="Traduttore"/>
-<l:gentext key="listofequations" text="Lista delle Equazioni"/>
-<l:gentext key="ListofEquations" text="Lista delle Equazioni"/>
-<l:gentext key="ListofExamples" text="Lista degli Esempi"/>
-<l:gentext key="listofexamples" text="Lista degli Esempi"/>
-<l:gentext key="ListofFigures" text="Lista delle Figure"/>
-<l:gentext key="listoffigures" text="Lista delle Figure"/>
-<l:gentext key="ListofProcedures" text="Lista delle procedure"/>
-<l:gentext key="listofprocedures" text="Lista delle procedure"/>
-<l:gentext key="listoftables" text="Lista delle Tabelle"/>
-<l:gentext key="ListofTables" text="Lista delle Tabelle"/>
-<l:gentext key="ListofUnknown" text="Lista degli Sconosciuti"/>
-<l:gentext key="listofunknown" text="Lista degli Sconosciuti"/>
-<l:gentext key="nav-home" text="Partenza"/>
-<l:gentext key="nav-next" text="Avanti"/>
-<l:gentext key="nav-next-sibling" text="Salta Avanti"/>
-<l:gentext key="nav-prev" text="Indietro"/>
-<l:gentext key="nav-prev-sibling" text="Salta Indietro"/>
-<l:gentext key="nav-up" text="Risali"/>
-<l:gentext key="nav-toc" text="ToC" lang="en"/>
-<l:gentext key="Draft" text="Bozza"/>
-<l:gentext key="above" text="sopra"/>
-<l:gentext key="below" text="sotto"/>
-<l:gentext key="sectioncalled" text="la sezione chiamata"/>
-<l:gentext key="index symbols" text="Simboli"/>
-<l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz"/>
-<l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/>
-<l:gentext key="normalize.sort.input" text="AaÃÃ ÃÃ¡ÃÃ¢ÃÃ£ÃÃ€Ã
-Ã¥ÄÄÄÄÄÄ
-ÇÇÇÇÇ Ç¡ÇºÇ»ÈÈÈÈÈŠÈ§ážážáºáº áº¡áº¢áº£áº€áº¥áºŠáº§áºšáº©áºªáº«áº¬áº­áº®áº¯áº°áº±áº²áº³áºŽáºµáº¶áº·BbÆÆÉÆÆážážážáž
-ážážCcÃÃ§ÄÄÄÄÄÄÄÄÆÆÉážážDdÄÄÄÄÆÉÆÆÇ
-Ç²È¡ÉážážážážážážážážážážEeÃÃšÃÃ©ÃÃªÃÃ«ÄÄÄÄÄÄÄÄÄÄÈÈ
-ÈÈÈšÈ©ážážážážážážážážážážáºžáº¹áººáº»áºŒáºœáºŸáº¿á»á»á»á»á»á»
-á»á»FfÆÆážážGgÄÄÄÄÄ Ä¡Ä¢Ä£ÆÉ Ç€Ç¥ÇŠÇ§ÇŽÇµáž áž¡HhÄ€Ä¥ÄŠÄ§ÈÈÉŠáž¢áž£áž€áž¥ážŠáž§ážšáž©ážªáž«áºIiÃÃ¬ÃÃ­ÃÃ®ÃÃ¯ÄšÄ©ÄªÄ«Ä¬Ä­Ä®Ä¯Ä°ÆÉšÇÇÈÈÈÈáž¬áž­áž®áž¯á»á»á»á»JjÄŽÄµÇ°ÊKkÄ¶Ä·ÆÆÇšÇ©áž°áž±áž²áž³ážŽážµLlÄ¹ÄºÄ»ÄŒÄœÄŸÄ¿ÅÅÅÆÇÈŽÉ«É¬É­áž¶áž·ážžáž¹ážºáž»ážŒážœMmÉ±ážŸáž¿á¹á¹á¹á¹NnÃÃ±ÅÅÅ
-ÅÅÅÆÉ²ÆÈ ÇÇžÇ¹ÈµÉ³á¹á¹
-á¹á¹á¹á¹á¹á¹OoÃÃ²ÃÃ³ÃÃŽÃÃµÃÃ¶ÃÃžÅÅÅÅÅÅÆÆ Æ¡ÇÇÇªÇ«Ç¬Ç­ÇŸÇ¿ÈÈÈÈÈªÈ«È¬È­È®È¯È°È±á¹á¹á¹á¹á¹á¹á¹á¹á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á» á»¡á»¢á»£PpÆ€Æ¥á¹á¹á¹á¹QqÊ RrÅÅÅÅÅÅÈÈÈÈÉŒÉœÉŸá¹á¹á¹á¹á¹á¹á¹á¹SsÅÅÅÅÅÅÅ Å¡ÈÈÊá¹ á¹¡á¹¢á¹£á¹€á¹¥á¹Šá¹§á¹šá¹©TtÅ¢Å£Å€Å¥ÅŠÅ§Æ«Æ¬Æ­Æ®ÊÈÈÈ¶á¹ªá¹«á¹¬á¹­á¹®á¹¯á¹°á¹±áºUuÃÃ¹ÃÃºÃÃ»ÃÃŒÅšÅ©ÅªÅ«Å¬Å­Å®Å¯Å°Å±Å²Å³Æ¯Æ°ÇÇÇÇÇÇÇÇÇÇÈÈÈÈá¹²á¹³á¹Žá¹µá¹¶á¹·á¹žá¹¹á¹ºá¹»á»€á»¥á»Šá»§á»šá»©á»ªá»«á»¬á»­á»®á»¯á»°á»±VvÆ²Êá¹Œá¹œá¹Ÿá¹¿WwÅŽÅµáºáºáºáºáºáº
-áºáºáºáºáºXxáºáºáºáºYyÃÃœÃ¿ÅžÅ¶Å·Æ³ÆŽÈ²È³áºáºáºá»²á»³á»Žá»µá»¶á»·á»žá»¹ZzÅ¹ÅºÅ»ÅŒÅœÅŸÆµÆ¶È€È¥ÊÊáºáºáºáºáºáºáº" lang="en"/>
-<l:gentext key="normalize.sort.output" text="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ" lang="en"/>
-<l:dingbat key="startquote" text="Â«"/>
-<l:dingbat key="endquote" text="Â»"/>
-<l:dingbat key="nestedstartquote" text="â"/>
-<l:dingbat key="nestedendquote" text="â"/>
-<l:dingbat key="singlestartquote" text="â" lang="en"/>
-<l:dingbat key="singleendquote" text="â" lang="en"/>
-<l:dingbat key="bullet" text="â¢"/>
-<l:gentext key="hyphenation-character" text="-" lang="en"/>
-<l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
-<l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
-<l:context name="styles"><l:template name="person-name" text="first-last"/>
-</l:context>
-<l:context name="title"><l:template name="abstract" text="%t"/>
-<l:template name="answer" text="%t"/>
-<l:template name="appendix" text="AppendiceÂ %n.Â %t"/>
-<l:template name="article" text="%t"/>
-<l:template name="authorblurb" text="%t"/>
-<l:template name="bibliodiv" text="%t"/>
-<l:template name="biblioentry" text="%t"/>
-<l:template name="bibliography" text="%t"/>
-<l:template name="bibliolist" text="%t" lang="en"/>
-<l:template name="bibliomixed" text="%t"/>
-<l:template name="bibliomset" text="%t"/>
-<l:template name="biblioset" text="%t"/>
-<l:template name="blockquote" text="%t"/>
-<l:template name="book" text="%t"/>
-<l:template name="calloutlist" text="%t"/>
-<l:template name="caution" text="%t"/>
-<l:template name="chapter" text="CapitoloÂ %n.Â %t"/>
-<l:template name="colophon" text="%t"/>
-<l:template name="dedication" text="%t"/>
-<l:template name="equation" text="EquazioneÂ %n.Â %t"/>
-<l:template name="example" text="EsempioÂ %n.Â %t"/>
-<l:template name="figure" text="FiguraÂ %n.Â %t"/>
-<l:template name="foil" text="%t" lang="en"/>
-<l:template name="foilgroup" text="%t" lang="en"/>
-<l:template name="formalpara" text="%t"/>
-<l:template name="glossary" text="%t"/>
-<l:template name="glossdiv" text="%t"/>
-<l:template name="glosslist" text="%t" lang="en"/>
-<l:template name="glossentry" text="%t" lang="en"/>
-<l:template name="important" text="%t"/>
-<l:template name="index" text="%t"/>
-<l:template name="indexdiv" text="%t"/>
-<l:template name="itemizedlist" text="%t"/>
-<l:template name="legalnotice" text="%t"/>
-<l:template name="listitem" text=""/>
-<l:template name="lot" text="%t"/>
-<l:template name="msg" text="%t"/>
-<l:template name="msgexplan" text="%t"/>
-<l:template name="msgmain" text="%t"/>
-<l:template name="msgrel" text="%t"/>
-<l:template name="msgset" text="%t"/>
-<l:template name="msgsub" text="%t"/>
-<l:template name="note" text="%t"/>
-<l:template name="orderedlist" text="%t"/>
-<l:template name="part" text="ParteÂ %n.Â %t"/>
-<l:template name="partintro" text="%t"/>
-<l:template name="preface" text="%t"/>
-<l:template name="procedure" text="%t"/>
-<l:template name="procedure.formal" text="ProceduraÂ %n.Â %t"/>
-<l:template name="productionset" text="%t"/>
-<l:template name="productionset.formal" text="ProduzioneÂ %n"/>
-<l:template name="qandadiv" text="%t"/>
-<l:template name="qandaentry" text="%t"/>
-<l:template name="qandaset" text="%t"/>
-<l:template name="question" text="%t"/>
-<l:template name="refentry" text="%t"/>
-<l:template name="reference" text="%t"/>
-<l:template name="refsection" text="%t"/>
-<l:template name="refsect1" text="%t"/>
-<l:template name="refsect2" text="%t"/>
-<l:template name="refsect3" text="%t"/>
-<l:template name="refsynopsisdiv" text="%t"/>
-<l:template name="refsynopsisdivinfo" text="%t"/>
-<l:template name="segmentedlist" text="%t"/>
-<l:template name="set" text="%t"/>
-<l:template name="setindex" text="%t"/>
-<l:template name="sidebar" text="%t"/>
-<l:template name="step" text="%t"/>
-<l:template name="table" text="TabellaÂ %n.Â %t"/>
-<l:template name="task" text="%t" lang="en"/>
-<l:template name="tasksummary" text="%t" lang="en"/>
-<l:template name="taskprerequisites" text="%t" lang="en"/>
-<l:template name="taskrelated" text="%t" lang="en"/>
-<l:template name="tip" text="%t"/>
-<l:template name="toc" text="%t"/>
-<l:template name="variablelist" text="%t"/>
-<l:template name="varlistentry" text=""/>
-<l:template name="warning" text="%t"/>
-</l:context>
-<l:context name="title-unnumbered"><l:template name="appendix" text="%t"/>
-<l:template name="article/appendix" text="%t" lang="en"/>
-<l:template name="bridgehead" text="%t"/>
-<l:template name="chapter" text="%t"/>
-<l:template name="sect1" text="%t"/>
-<l:template name="sect2" text="%t"/>
-<l:template name="sect3" text="%t"/>
-<l:template name="sect4" text="%t"/>
-<l:template name="sect5" text="%t"/>
-<l:template name="section" text="%t"/>
-<l:template name="simplesect" text="%t"/>
-<l:template name="part" text="%t" lang="en"/>
-</l:context>
-<l:context name="title-numbered"><l:template name="appendix" text="AppendiceÂ %n.Â %t"/>
-<l:template name="article/appendix" text="%n.Â %t" lang="en"/>
-<l:template name="bridgehead" text="%n.Â %t"/>
-<l:template name="chapter" text="CapitoloÂ %n.Â %t"/>
-<l:template name="part" text="ParteÂ %n.Â %t"/>
-<l:template name="sect1" text="%n.Â %t"/>
-<l:template name="sect2" text="%n.Â %t"/>
-<l:template name="sect3" text="%n.Â %t"/>
-<l:template name="sect4" text="%n.Â %t"/>
-<l:template name="sect5" text="%n.Â %t"/>
-<l:template name="section" text="%n.Â %t"/>
-<l:template name="simplesect" text="%t"/>
-</l:context>
-<l:context name="subtitle"><l:template name="appendix" text="%s"/>
-<l:template name="article" text="%s"/>
-<l:template name="bibliodiv" text="%s"/>
-<l:template name="biblioentry" text="%s"/>
-<l:template name="bibliography" text="%s"/>
-<l:template name="bibliomixed" text="%s"/>
-<l:template name="bibliomset" text="%s"/>
-<l:template name="biblioset" text="%s"/>
-<l:template name="book" text="%s"/>
-<l:template name="chapter" text="%s"/>
-<l:template name="colophon" text="%s"/>
-<l:template name="dedication" text="%s"/>
-<l:template name="glossary" text="%s"/>
-<l:template name="glossdiv" text="%s"/>
-<l:template name="index" text="%s"/>
-<l:template name="indexdiv" text="%s"/>
-<l:template name="lot" text="%s"/>
-<l:template name="part" text="%s"/>
-<l:template name="partintro" text="%s"/>
-<l:template name="preface" text="%s"/>
-<l:template name="refentry" text="%s"/>
-<l:template name="reference" text="%s"/>
-<l:template name="refsection" text="%s"/>
-<l:template name="refsect1" text="%s"/>
-<l:template name="refsect2" text="%s"/>
-<l:template name="refsect3" text="%s"/>
-<l:template name="refsynopsisdiv" text="%s"/>
-<l:template name="sect1" text="%s"/>
-<l:template name="sect2" text="%s"/>
-<l:template name="sect3" text="%s"/>
-<l:template name="sect4" text="%s"/>
-<l:template name="sect5" text="%s"/>
-<l:template name="section" text="%s"/>
-<l:template name="set" text="%s"/>
-<l:template name="setindex" text="%s"/>
-<l:template name="sidebar" text="%s"/>
-<l:template name="simplesect" text="%s"/>
-<l:template name="toc" text="%s"/>
-</l:context>
-<l:context name="xref"><l:template name="abstract" text="%t"/>
-<l:template name="answer" text="R:Â %n"/>
-<l:template name="appendix" text="%t"/>
-<l:template name="article" text="%t"/>
-<l:template name="authorblurb" text="%t"/>
-<l:template name="bibliodiv" text="%t"/>
-<l:template name="bibliography" text="%t"/>
-<l:template name="bibliomset" text="%t"/>
-<l:template name="biblioset" text="%t"/>
-<l:template name="blockquote" text="%t"/>
-<l:template name="book" text="%t"/>
-<l:template name="calloutlist" text="%t"/>
-<l:template name="caution" text="%t"/>
-<l:template name="chapter" text="%t"/>
-<l:template name="colophon" text="%t"/>
-<l:template name="constraintdef" text="%t"/>
-<l:template name="dedication" text="%t"/>
-<l:template name="equation" text="%t"/>
-<l:template name="example" text="%t"/>
-<l:template name="figure" text="%t"/>
-<l:template name="foil" text="%t" lang="en"/>
-<l:template name="foilgroup" text="%t" lang="en"/>
-<l:template name="formalpara" text="%t"/>
-<l:template name="glossary" text="%t"/>
-<l:template name="glossdiv" text="%t"/>
-<l:template name="important" text="%t"/>
-<l:template name="index" text="%t"/>
-<l:template name="indexdiv" text="%t"/>
-<l:template name="itemizedlist" text="%t"/>
-<l:template name="legalnotice" text="%t"/>
-<l:template name="listitem" text="%n"/>
-<l:template name="lot" text="%t"/>
-<l:template name="msg" text="%t"/>
-<l:template name="msgexplan" text="%t"/>
-<l:template name="msgmain" text="%t"/>
-<l:template name="msgrel" text="%t"/>
-<l:template name="msgset" text="%t"/>
-<l:template name="msgsub" text="%t"/>
-<l:template name="note" text="%t"/>
-<l:template name="orderedlist" text="%t"/>
-<l:template name="part" text="%t"/>
-<l:template name="partintro" text="%t"/>
-<l:template name="preface" text="%t"/>
-<l:template name="procedure" text="%t"/>
-<l:template name="productionset" text="%t"/>
-<l:template name="qandadiv" text="%t"/>
-<l:template name="qandaentry" text="D:Â %n"/>
-<l:template name="qandaset" text="%t"/>
-<l:template name="question" text="D:Â %n"/>
-<l:template name="reference" text="%t"/>
-<l:template name="refsynopsisdiv" text="%t"/>
-<l:template name="segmentedlist" text="%t"/>
-<l:template name="set" text="%t"/>
-<l:template name="setindex" text="%t"/>
-<l:template name="sidebar" text="%t"/>
-<l:template name="table" text="%t"/>
-<l:template name="task" text="%t" lang="en"/>
-<l:template name="tip" text="%t"/>
-<l:template name="toc" text="%t"/>
-<l:template name="variablelist" text="%t"/>
-<l:template name="varlistentry" text="%n"/>
-<l:template name="warning" text="%t"/>
-<l:template name="olink.document.citation" text=" in %o" lang="en"/>
-<l:template name="olink.page.citation" text=" (page %p)" lang="en"/>
-<l:template name="page.citation" text=" [%p]"/>
-<l:template name="page" text="(page %p)" lang="en"/>
-<l:template name="docname" text=" in %o" lang="en"/>
-<l:template name="docnamelong" text=" in the document titled %o" lang="en"/>
-<l:template name="pageabbrev" text="(p. %p)" lang="en"/>
-<l:template name="Page" text="Page %p" lang="en"/>
-<l:template name="bridgehead" text="la sezione chiamata Â«%tÂ»"/>
-<l:template name="refsection" text="la sezione chiamata Â«%tÂ»"/>
-<l:template name="refsect1" text="la sezione chiamata Â«%tÂ»"/>
-<l:template name="refsect2" text="la sezione chiamata Â«%tÂ»"/>
-<l:template name="refsect3" text="la sezione chiamata Â«%tÂ»"/>
-<l:template name="sect1" text="la sezione chiamata Â«%tÂ»"/>
-<l:template name="sect2" text="la sezione chiamata Â«%tÂ»"/>
-<l:template name="sect3" text="la sezione chiamata Â«%tÂ»"/>
-<l:template name="sect4" text="la sezione chiamata Â«%tÂ»"/>
-<l:template name="sect5" text="la sezione chiamata Â«%tÂ»"/>
-<l:template name="section" text="la sezione chiamata Â«%tÂ»"/>
-<l:template name="simplesect" text="la sezione chiamata Â«%tÂ»"/>
-</l:context>
-<l:context name="xref-number"><l:template name="answer" text="R:Â %n"/>
-<l:template name="appendix" text="AppendiceÂ %n"/>
-<l:template name="bridgehead" text="SezioneÂ %n"/>
-<l:template name="chapter" text="CapitoloÂ %n"/>
-<l:template name="equation" text="EquazioneÂ %n"/>
-<l:template name="example" text="EsempioÂ %n"/>
-<l:template name="figure" text="FiguraÂ %n"/>
-<l:template name="part" text="ParteÂ %n"/>
-<l:template name="procedure" text="ProceduraÂ %n"/>
-<l:template name="productionset" text="ProduzioneÂ %n"/>
-<l:template name="qandadiv" text="D e RÂ %n"/>
-<l:template name="qandaentry" text="D:Â %n"/>
-<l:template name="question" text="D:Â %n"/>
-<l:template name="sect1" text="SezioneÂ %n"/>
-<l:template name="sect2" text="SezioneÂ %n"/>
-<l:template name="sect3" text="SezioneÂ %n"/>
-<l:template name="sect4" text="SezioneÂ %n"/>
-<l:template name="sect5" text="SezioneÂ %n"/>
-<l:template name="section" text="SezioneÂ %n"/>
-<l:template name="table" text="TabellaÂ %n"/>
-</l:context>
-<l:context name="xref-number-and-title"><l:template name="appendix" text="AppendiceÂ %n, %t"/>
-<l:template name="bridgehead" text="SezioneÂ %n, Â«%tÂ»"/>
-<l:template name="chapter" text="CapitoloÂ %n, %t"/>
-<l:template name="equation" text="EquazioneÂ %n, Â«%tÂ»"/>
-<l:template name="example" text="EsempioÂ %n, Â«%tÂ»"/>
-<l:template name="figure" text="FiguraÂ %n, Â«%tÂ»"/>
-<l:template name="part" text="ParteÂ %n, Â«%tÂ»"/>
-<l:template name="procedure" text="ProceduraÂ %n, Â«%tÂ»"/>
-<l:template name="productionset" text="ProduzioneÂ %n, Â«%tÂ»"/>
-<l:template name="qandadiv" text="D e RÂ %n, Â«%tÂ»"/>
-<l:template name="refsect1" text="la sezione chiamata Â«%tÂ»"/>
-<l:template name="refsect2" text="la sezione chiamata Â«%tÂ»"/>
-<l:template name="refsect3" text="la sezione chiamata Â«%tÂ»"/>
-<l:template name="refsection" text="la sezione chiamata Â«%tÂ»"/>
-<l:template name="sect1" text="SezioneÂ %n, Â«%tÂ»"/>
-<l:template name="sect2" text="SezioneÂ %n, Â«%tÂ»"/>
-<l:template name="sect3" text="SezioneÂ %n, Â«%tÂ»"/>
-<l:template name="sect4" text="SezioneÂ %n, Â«%tÂ»"/>
-<l:template name="sect5" text="SezioneÂ %n, Â«%tÂ»"/>
-<l:template name="section" text="SezioneÂ %n, Â«%tÂ»"/>
-<l:template name="simplesect" text="la sezione chiamata Â«%tÂ»"/>
-<l:template name="table" text="TabellaÂ %n, Â«%tÂ»"/>
-</l:context>
-<l:context name="authorgroup"><l:template name="sep" text=", "/>
-<l:template name="sep2" text=" e "/>
-<l:template name="seplast" text=", e "/>
-</l:context>
-<l:context name="glossary"><l:template name="see" text="Vedi %t"/>
-<l:template name="seealso" text="Vedi Anche %t"/>
-</l:context>
-<l:context name="msgset"><l:template name="MsgAud" text="Pubblico: "/>
-<l:template name="MsgLevel" text="Livello: "/>
-<l:template name="MsgOrig" text="Origine: "/>
-</l:context>
-<l:context name="datetime"><l:template name="format" text="d/m/Y"/>
-</l:context>
-<l:context name="termdef"><l:template name="prefix" text="[Definition: " lang="en"/>
-<l:template name="suffix" text="]" lang="en"/>
-</l:context>
-<l:context name="datetime-full"><l:template name="January" text="gennaio"/>
-<l:template name="February" text="febbraio"/>
-<l:template name="March" text="marzo"/>
-<l:template name="April" text="aprile"/>
-<l:template name="May" text="maggio"/>
-<l:template name="June" text="giugno"/>
-<l:template name="July" text="luglio"/>
-<l:template name="August" text="agosto"/>
-<l:template name="September" text="settembre"/>
-<l:template name="October" text="ottobre"/>
-<l:template name="November" text="novembre"/>
-<l:template name="December" text="dicembre"/>
-<l:template name="Monday" text="lunedÃ¬"/>
-<l:template name="Tuesday" text="martedÃ¬"/>
-<l:template name="Wednesday" text="mercoledÃ¬"/>
-<l:template name="Thursday" text="giovedÃ¬"/>
-<l:template name="Friday" text="venerdÃ¬"/>
-<l:template name="Saturday" text="sabato"/>
-<l:template name="Sunday" text="domenica"/>
-</l:context>
-<l:context name="datetime-abbrev"><l:template name="Jan" text="gen"/>
-<l:template name="Feb" text="feb"/>
-<l:template name="Mar" text="mar"/>
-<l:template name="Apr" text="apr"/>
-<l:template name="May" text="mag"/>
-<l:template name="Jun" text="giu"/>
-<l:template name="Jul" text="lug"/>
-<l:template name="Aug" text="ago"/>
-<l:template name="Sep" text="set"/>
-<l:template name="Oct" text="ott"/>
-<l:template name="Nov" text="nov"/>
-<l:template name="Dec" text="dic"/>
-<l:template name="Mon" text="lun"/>
-<l:template name="Tue" text="mar"/>
-<l:template name="Wed" text="mer"/>
-<l:template name="Thu" text="gio"/>
-<l:template name="Fri" text="ven"/>
-<l:template name="Sat" text="sab"/>
-<l:template name="Sun" text="dom"/>
-</l:context>
-<l:context name="htmlhelp"><l:template name="langcode" text="0x0410 Italian"/>
-</l:context>
-<l:context name="index"><l:template name="term-separator" text=", " lang="en"/>
-<l:template name="number-separator" text=", " lang="en"/>
-<l:template name="range-separator" text="-" lang="en"/>
-</l:context>
-<l:context name="iso690"><l:template name="lastfirst.sep" text=", " lang="en"/>
-<l:template name="alt.person.two.sep" text=" â " lang="en"/>
-<l:template name="alt.person.last.sep" text=" â " lang="en"/>
-<l:template name="alt.person.more.sep" text=" â " lang="en"/>
-<l:template name="primary.editor" text=" (ed.)" lang="en"/>
-<l:template name="primary.many" text=", et al." lang="en"/>
-<l:template name="primary.sep" text=". " lang="en"/>
-<l:template name="submaintitle.sep" text=": " lang="en"/>
-<l:template name="title.sep" text=". " lang="en"/>
-<l:template name="othertitle.sep" text=", " lang="en"/>
-<l:template name="medium1" text=" [" lang="en"/>
-<l:template name="medium2" text="]" lang="en"/>
-<l:template name="secondary.person.sep" text="; " lang="en"/>
-<l:template name="secondary.sep" text=". " lang="en"/>
-<l:template name="respons.sep" text=". " lang="en"/>
-<l:template name="edition.sep" text=". " lang="en"/>
-<l:template name="edition.serial.sep" text=", " lang="en"/>
-<l:template name="issuing.range" text="-" lang="en"/>
-<l:template name="issuing.div" text=", " lang="en"/>
-<l:template name="issuing.sep" text=". " lang="en"/>
-<l:template name="partnr.sep" text=". " lang="en"/>
-<l:template name="placepubl.sep" text=": " lang="en"/>
-<l:template name="publyear.sep" text=", " lang="en"/>
-<l:template name="pubinfo.sep" text=". " lang="en"/>
-<l:template name="spec.pubinfo.sep" text=", " lang="en"/>
-<l:template name="upd.sep" text=", " lang="en"/>
-<l:template name="datecit1" text=" [cited " lang="en"/>
-<l:template name="datecit2" text="]" lang="en"/>
-<l:template name="extent.sep" text=". " lang="en"/>
-<l:template name="locs.sep" text=", " lang="en"/>
-<l:template name="location.sep" text=". " lang="en"/>
-<l:template name="serie.sep" text=". " lang="en"/>
-<l:template name="notice.sep" text=". " lang="en"/>
-<l:template name="access" text="Available " lang="en"/>
-<l:template name="acctoo" text="Also available " lang="en"/>
-<l:template name="onwww" text="from World Wide Web" lang="en"/>
-<l:template name="oninet" text="from Internet" lang="en"/>
-<l:template name="access.end" text=": " lang="en"/>
-<l:template name="link1" text="&lt;" lang="en"/>
-<l:template name="link2" text="&gt;" lang="en"/>
-<l:template name="access.sep" text=". " lang="en"/>
-<l:template name="isbn" text="ISBN " lang="en"/>
-<l:template name="issn" text="ISSN " lang="en"/>
-<l:template name="stdnum.sep" text=". " lang="en"/>
-<l:template name="patcountry.sep" text=". " lang="en"/>
-<l:template name="pattype.sep" text=", " lang="en"/>
-<l:template name="patnum.sep" text=". " lang="en"/>
-<l:template name="patdate.sep" text=". " lang="en"/>
-</l:context><l:letters lang="en"><l:l i="-1"/>
-<l:l i="0">Symbols</l:l>
-<l:l i="10">A</l:l>
-<l:l i="10">a</l:l>
-<l:l i="10">Ã</l:l>
-<l:l i="10">Ã </l:l>
-<l:l i="10">Ã</l:l>
-<l:l i="10">Ã¡</l:l>
-<l:l i="10">Ã</l:l>
-<l:l i="10">Ã¢</l:l>
-<l:l i="10">Ã</l:l>
-<l:l i="10">Ã£</l:l>
-<l:l i="10">Ã</l:l>
-<l:l i="10">Ã€</l:l>
-<l:l i="10">Ã
-</l:l>
-<l:l i="10">Ã¥</l:l>
-<l:l i="10">Ä</l:l>
-<l:l i="10">Ä</l:l>
-<l:l i="10">Ä</l:l>
-<l:l i="10">Ä</l:l>
-<l:l i="10">Ä</l:l>
-<l:l i="10">Ä
-</l:l>
-<l:l i="10">Ç</l:l>
-<l:l i="10">Ç</l:l>
-<l:l i="10">Ç</l:l>
-<l:l i="10">Ç</l:l>
-<l:l i="10">Ç </l:l>
-<l:l i="10">Ç¡</l:l>
-<l:l i="10">Çº</l:l>
-<l:l i="10">Ç»</l:l>
-<l:l i="10">È</l:l>
-<l:l i="10">È</l:l>
-<l:l i="10">È</l:l>
-<l:l i="10">È</l:l>
-<l:l i="10">ÈŠ</l:l>
-<l:l i="10">È§</l:l>
-<l:l i="10">áž</l:l>
-<l:l i="10">áž</l:l>
-<l:l i="10">áº</l:l>
-<l:l i="10">áº </l:l>
-<l:l i="10">áº¡</l:l>
-<l:l i="10">áº¢</l:l>
-<l:l i="10">áº£</l:l>
-<l:l i="10">áº€</l:l>
-<l:l i="10">áº¥</l:l>
-<l:l i="10">áºŠ</l:l>
-<l:l i="10">áº§</l:l>
-<l:l i="10">áºš</l:l>
-<l:l i="10">áº©</l:l>
-<l:l i="10">áºª</l:l>
-<l:l i="10">áº«</l:l>
-<l:l i="10">áº¬</l:l>
-<l:l i="10">áº­</l:l>
-<l:l i="10">áº®</l:l>
-<l:l i="10">áº¯</l:l>
-<l:l i="10">áº°</l:l>
-<l:l i="10">áº±</l:l>
-<l:l i="10">áº²</l:l>
-<l:l i="10">áº³</l:l>
-<l:l i="10">áºŽ</l:l>
-<l:l i="10">áºµ</l:l>
-<l:l i="10">áº¶</l:l>
-<l:l i="10">áº·</l:l>
-<l:l i="20">B</l:l>
-<l:l i="20">b</l:l>
-<l:l i="20">Æ</l:l>
-<l:l i="20">Æ</l:l>
-<l:l i="20">É</l:l>
-<l:l i="20">Æ</l:l>
-<l:l i="20">Æ</l:l>
-<l:l i="20">áž</l:l>
-<l:l i="20">áž</l:l>
-<l:l i="20">áž</l:l>
-<l:l i="20">áž
-</l:l>
-<l:l i="20">áž</l:l>
-<l:l i="20">áž</l:l>
-<l:l i="30">C</l:l>
-<l:l i="30">c</l:l>
-<l:l i="30">Ã</l:l>
-<l:l i="30">Ã§</l:l>
-<l:l i="30">Ä</l:l>
-<l:l i="30">Ä</l:l>
-<l:l i="30">Ä</l:l>
-<l:l i="30">Ä</l:l>
-<l:l i="30">Ä</l:l>
-<l:l i="30">Ä</l:l>
-<l:l i="30">Ä</l:l>
-<l:l i="30">Ä</l:l>
-<l:l i="30">Æ</l:l>
-<l:l i="30">Æ</l:l>
-<l:l i="30">É</l:l>
-<l:l i="30">áž</l:l>
-<l:l i="30">áž</l:l>
-<l:l i="40">D</l:l>
-<l:l i="40">d</l:l>
-<l:l i="40">Ä</l:l>
-<l:l i="40">Ä</l:l>
-<l:l i="40">Ä</l:l>
-<l:l i="40">Ä</l:l>
-<l:l i="40">Æ</l:l>
-<l:l i="40">É</l:l>
-<l:l i="40">Æ</l:l>
-<l:l i="40">Æ</l:l>
-<l:l i="40">Ç
-</l:l>
-<l:l i="40">Ç²</l:l>
-<l:l i="40">È¡</l:l>
-<l:l i="40">É</l:l>
-<l:l i="40">áž</l:l>
-<l:l i="40">áž</l:l>
-<l:l i="40">áž</l:l>
-<l:l i="40">áž</l:l>
-<l:l i="40">áž</l:l>
-<l:l i="40">áž</l:l>
-<l:l i="40">áž</l:l>
-<l:l i="40">áž</l:l>
-<l:l i="40">áž</l:l>
-<l:l i="40">áž</l:l>
-<l:l i="50">E</l:l>
-<l:l i="50">e</l:l>
-<l:l i="50">Ã</l:l>
-<l:l i="50">Ãš</l:l>
-<l:l i="50">Ã</l:l>
-<l:l i="50">Ã©</l:l>
-<l:l i="50">Ã</l:l>
-<l:l i="50">Ãª</l:l>
-<l:l i="50">Ã</l:l>
-<l:l i="50">Ã«</l:l>
-<l:l i="50">Ä</l:l>
-<l:l i="50">Ä</l:l>
-<l:l i="50">Ä</l:l>
-<l:l i="50">Ä</l:l>
-<l:l i="50">Ä</l:l>
-<l:l i="50">Ä</l:l>
-<l:l i="50">Ä</l:l>
-<l:l i="50">Ä</l:l>
-<l:l i="50">Ä</l:l>
-<l:l i="50">Ä</l:l>
-<l:l i="50">È</l:l>
-<l:l i="50">È
-</l:l>
-<l:l i="50">È</l:l>
-<l:l i="50">È</l:l>
-<l:l i="50">Èš</l:l>
-<l:l i="50">È©</l:l>
-<l:l i="50">áž</l:l>
-<l:l i="50">áž</l:l>
-<l:l i="50">áž</l:l>
-<l:l i="50">áž</l:l>
-<l:l i="50">áž</l:l>
-<l:l i="50">áž</l:l>
-<l:l i="50">áž</l:l>
-<l:l i="50">áž</l:l>
-<l:l i="50">áž</l:l>
-<l:l i="50">áž</l:l>
-<l:l i="50">áºž</l:l>
-<l:l i="50">áº¹</l:l>
-<l:l i="50">áºº</l:l>
-<l:l i="50">áº»</l:l>
-<l:l i="50">áºŒ</l:l>
-<l:l i="50">áºœ</l:l>
-<l:l i="50">áºŸ</l:l>
-<l:l i="50">áº¿</l:l>
-<l:l i="50">á»</l:l>
-<l:l i="50">á»</l:l>
-<l:l i="50">á»</l:l>
-<l:l i="50">á»</l:l>
-<l:l i="50">á»</l:l>
-<l:l i="50">á»
-</l:l>
-<l:l i="50">á»</l:l>
-<l:l i="50">á»</l:l>
-<l:l i="60">F</l:l>
-<l:l i="60">f</l:l>
-<l:l i="60">Æ</l:l>
-<l:l i="60">Æ</l:l>
-<l:l i="60">áž</l:l>
-<l:l i="60">áž</l:l>
-<l:l i="70">G</l:l>
-<l:l i="70">g</l:l>
-<l:l i="70">Ä</l:l>
-<l:l i="70">Ä</l:l>
-<l:l i="70">Ä</l:l>
-<l:l i="70">Ä</l:l>
-<l:l i="70">Ä </l:l>
-<l:l i="70">Ä¡</l:l>
-<l:l i="70">Ä¢</l:l>
-<l:l i="70">Ä£</l:l>
-<l:l i="70">Æ</l:l>
-<l:l i="70">É </l:l>
-<l:l i="70">Ç€</l:l>
-<l:l i="70">Ç¥</l:l>
-<l:l i="70">ÇŠ</l:l>
-<l:l i="70">Ç§</l:l>
-<l:l i="70">ÇŽ</l:l>
-<l:l i="70">Çµ</l:l>
-<l:l i="70">áž </l:l>
-<l:l i="70">áž¡</l:l>
-<l:l i="80">H</l:l>
-<l:l i="80">h</l:l>
-<l:l i="80">Ä€</l:l>
-<l:l i="80">Ä¥</l:l>
-<l:l i="80">ÄŠ</l:l>
-<l:l i="80">Ä§</l:l>
-<l:l i="80">È</l:l>
-<l:l i="80">È</l:l>
-<l:l i="80">ÉŠ</l:l>
-<l:l i="80">áž¢</l:l>
-<l:l i="80">áž£</l:l>
-<l:l i="80">áž€</l:l>
-<l:l i="80">áž¥</l:l>
-<l:l i="80">ážŠ</l:l>
-<l:l i="80">áž§</l:l>
-<l:l i="80">ážš</l:l>
-<l:l i="80">áž©</l:l>
-<l:l i="80">ážª</l:l>
-<l:l i="80">áž«</l:l>
-<l:l i="80">áº</l:l>
-<l:l i="90">I</l:l>
-<l:l i="90">i</l:l>
-<l:l i="90">Ã</l:l>
-<l:l i="90">Ã¬</l:l>
-<l:l i="90">Ã</l:l>
-<l:l i="90">Ã­</l:l>
-<l:l i="90">Ã</l:l>
-<l:l i="90">Ã®</l:l>
-<l:l i="90">Ã</l:l>
-<l:l i="90">Ã¯</l:l>
-<l:l i="90">Äš</l:l>
-<l:l i="90">Ä©</l:l>
-<l:l i="90">Äª</l:l>
-<l:l i="90">Ä«</l:l>
-<l:l i="90">Ä¬</l:l>
-<l:l i="90">Ä­</l:l>
-<l:l i="90">Ä®</l:l>
-<l:l i="90">Ä¯</l:l>
-<l:l i="90">Ä°</l:l>
-<l:l i="90">Æ</l:l>
-<l:l i="90">Éš</l:l>
-<l:l i="90">Ç</l:l>
-<l:l i="90">Ç</l:l>
-<l:l i="90">È</l:l>
-<l:l i="90">È</l:l>
-<l:l i="90">È</l:l>
-<l:l i="90">È</l:l>
-<l:l i="90">áž¬</l:l>
-<l:l i="90">áž­</l:l>
-<l:l i="90">áž®</l:l>
-<l:l i="90">áž¯</l:l>
-<l:l i="90">á»</l:l>
-<l:l i="90">á»</l:l>
-<l:l i="90">á»</l:l>
-<l:l i="90">á»</l:l>
-<l:l i="100">J</l:l>
-<l:l i="100">j</l:l>
-<l:l i="100">ÄŽ</l:l>
-<l:l i="100">Äµ</l:l>
-<l:l i="100">Ç°</l:l>
-<l:l i="100">Ê</l:l>
-<l:l i="110">K</l:l>
-<l:l i="110">k</l:l>
-<l:l i="110">Ä¶</l:l>
-<l:l i="110">Ä·</l:l>
-<l:l i="110">Æ</l:l>
-<l:l i="110">Æ</l:l>
-<l:l i="110">Çš</l:l>
-<l:l i="110">Ç©</l:l>
-<l:l i="110">áž°</l:l>
-<l:l i="110">áž±</l:l>
-<l:l i="110">áž²</l:l>
-<l:l i="110">áž³</l:l>
-<l:l i="110">ážŽ</l:l>
-<l:l i="110">ážµ</l:l>
-<l:l i="120">L</l:l>
-<l:l i="120">l</l:l>
-<l:l i="120">Ä¹</l:l>
-<l:l i="120">Äº</l:l>
-<l:l i="120">Ä»</l:l>
-<l:l i="120">ÄŒ</l:l>
-<l:l i="120">Äœ</l:l>
-<l:l i="120">ÄŸ</l:l>
-<l:l i="120">Ä¿</l:l>
-<l:l i="120">Å</l:l>
-<l:l i="120">Å</l:l>
-<l:l i="120">Å</l:l>
-<l:l i="120">Æ</l:l>
-<l:l i="120">Ç</l:l>
-<l:l i="120">ÈŽ</l:l>
-<l:l i="120">É«</l:l>
-<l:l i="120">É¬</l:l>
-<l:l i="120">É­</l:l>
-<l:l i="120">áž¶</l:l>
-<l:l i="120">áž·</l:l>
-<l:l i="120">ážž</l:l>
-<l:l i="120">áž¹</l:l>
-<l:l i="120">ážº</l:l>
-<l:l i="120">áž»</l:l>
-<l:l i="120">ážŒ</l:l>
-<l:l i="120">ážœ</l:l>
-<l:l i="130">M</l:l>
-<l:l i="130">m</l:l>
-<l:l i="130">É±</l:l>
-<l:l i="130">ážŸ</l:l>
-<l:l i="130">áž¿</l:l>
-<l:l i="130">á¹</l:l>
-<l:l i="130">á¹</l:l>
-<l:l i="130">á¹</l:l>
-<l:l i="130">á¹</l:l>
-<l:l i="140">N</l:l>
-<l:l i="140">n</l:l>
-<l:l i="140">Ã</l:l>
-<l:l i="140">Ã±</l:l>
-<l:l i="140">Å</l:l>
-<l:l i="140">Å</l:l>
-<l:l i="140">Å
-</l:l>
-<l:l i="140">Å</l:l>
-<l:l i="140">Å</l:l>
-<l:l i="140">Å</l:l>
-<l:l i="140">Æ</l:l>
-<l:l i="140">É²</l:l>
-<l:l i="140">Æ</l:l>
-<l:l i="140">È </l:l>
-<l:l i="140">Ç</l:l>
-<l:l i="140">Çž</l:l>
-<l:l i="140">Ç¹</l:l>
-<l:l i="140">Èµ</l:l>
-<l:l i="140">É³</l:l>
-<l:l i="140">á¹</l:l>
-<l:l i="140">á¹
-</l:l>
-<l:l i="140">á¹</l:l>
-<l:l i="140">á¹</l:l>
-<l:l i="140">á¹</l:l>
-<l:l i="140">á¹</l:l>
-<l:l i="140">á¹</l:l>
-<l:l i="140">á¹</l:l>
-<l:l i="150">O</l:l>
-<l:l i="150">o</l:l>
-<l:l i="150">Ã</l:l>
-<l:l i="150">Ã²</l:l>
-<l:l i="150">Ã</l:l>
-<l:l i="150">Ã³</l:l>
-<l:l i="150">Ã</l:l>
-<l:l i="150">ÃŽ</l:l>
-<l:l i="150">Ã</l:l>
-<l:l i="150">Ãµ</l:l>
-<l:l i="150">Ã</l:l>
-<l:l i="150">Ã¶</l:l>
-<l:l i="150">Ã</l:l>
-<l:l i="150">Ãž</l:l>
-<l:l i="150">Å</l:l>
-<l:l i="150">Å</l:l>
-<l:l i="150">Å</l:l>
-<l:l i="150">Å</l:l>
-<l:l i="150">Å</l:l>
-<l:l i="150">Å</l:l>
-<l:l i="150">Æ</l:l>
-<l:l i="150">Æ </l:l>
-<l:l i="150">Æ¡</l:l>
-<l:l i="150">Ç</l:l>
-<l:l i="150">Ç</l:l>
-<l:l i="150">Çª</l:l>
-<l:l i="150">Ç«</l:l>
-<l:l i="150">Ç¬</l:l>
-<l:l i="150">Ç­</l:l>
-<l:l i="150">ÇŸ</l:l>
-<l:l i="150">Ç¿</l:l>
-<l:l i="150">È</l:l>
-<l:l i="150">È</l:l>
-<l:l i="150">È</l:l>
-<l:l i="150">È</l:l>
-<l:l i="150">Èª</l:l>
-<l:l i="150">È«</l:l>
-<l:l i="150">È¬</l:l>
-<l:l i="150">È­</l:l>
-<l:l i="150">È®</l:l>
-<l:l i="150">È¯</l:l>
-<l:l i="150">È°</l:l>
-<l:l i="150">È±</l:l>
-<l:l i="150">á¹</l:l>
-<l:l i="150">á¹</l:l>
-<l:l i="150">á¹</l:l>
-<l:l i="150">á¹</l:l>
-<l:l i="150">á¹</l:l>
-<l:l i="150">á¹</l:l>
-<l:l i="150">á¹</l:l>
-<l:l i="150">á¹</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á» </l:l>
-<l:l i="150">á»¡</l:l>
-<l:l i="150">á»¢</l:l>
-<l:l i="150">á»£</l:l>
-<l:l i="160">P</l:l>
-<l:l i="160">p</l:l>
-<l:l i="160">Æ€</l:l>
-<l:l i="160">Æ¥</l:l>
-<l:l i="160">á¹</l:l>
-<l:l i="160">á¹</l:l>
-<l:l i="160">á¹</l:l>
-<l:l i="160">á¹</l:l>
-<l:l i="170">Q</l:l>
-<l:l i="170">q</l:l>
-<l:l i="170">Ê </l:l>
-<l:l i="180">R</l:l>
-<l:l i="180">r</l:l>
-<l:l i="180">Å</l:l>
-<l:l i="180">Å</l:l>
-<l:l i="180">Å</l:l>
-<l:l i="180">Å</l:l>
-<l:l i="180">Å</l:l>
-<l:l i="180">Å</l:l>
-<l:l i="180">È</l:l>
-<l:l i="180">È</l:l>
-<l:l i="180">È</l:l>
-<l:l i="180">È</l:l>
-<l:l i="180">ÉŒ</l:l>
-<l:l i="180">Éœ</l:l>
-<l:l i="180">ÉŸ</l:l>
-<l:l i="180">á¹</l:l>
-<l:l i="180">á¹</l:l>
-<l:l i="180">á¹</l:l>
-<l:l i="180">á¹</l:l>
-<l:l i="180">á¹</l:l>
-<l:l i="180">á¹</l:l>
-<l:l i="180">á¹</l:l>
-<l:l i="180">á¹</l:l>
-<l:l i="190">S</l:l>
-<l:l i="190">s</l:l>
-<l:l i="190">Å</l:l>
-<l:l i="190">Å</l:l>
-<l:l i="190">Å</l:l>
-<l:l i="190">Å</l:l>
-<l:l i="190">Å</l:l>
-<l:l i="190">Å</l:l>
-<l:l i="190">Å </l:l>
-<l:l i="190">Å¡</l:l>
-<l:l i="190">È</l:l>
-<l:l i="190">È</l:l>
-<l:l i="190">Ê</l:l>
-<l:l i="190">á¹ </l:l>
-<l:l i="190">á¹¡</l:l>
-<l:l i="190">á¹¢</l:l>
-<l:l i="190">á¹£</l:l>
-<l:l i="190">á¹€</l:l>
-<l:l i="190">á¹¥</l:l>
-<l:l i="190">á¹Š</l:l>
-<l:l i="190">á¹§</l:l>
-<l:l i="190">á¹š</l:l>
-<l:l i="190">á¹©</l:l>
-<l:l i="200">T</l:l>
-<l:l i="200">t</l:l>
-<l:l i="200">Å¢</l:l>
-<l:l i="200">Å£</l:l>
-<l:l i="200">Å€</l:l>
-<l:l i="200">Å¥</l:l>
-<l:l i="200">ÅŠ</l:l>
-<l:l i="200">Å§</l:l>
-<l:l i="200">Æ«</l:l>
-<l:l i="200">Æ¬</l:l>
-<l:l i="200">Æ­</l:l>
-<l:l i="200">Æ®</l:l>
-<l:l i="200">Ê</l:l>
-<l:l i="200">È</l:l>
-<l:l i="200">È</l:l>
-<l:l i="200">È¶</l:l>
-<l:l i="200">á¹ª</l:l>
-<l:l i="200">á¹«</l:l>
-<l:l i="200">á¹¬</l:l>
-<l:l i="200">á¹­</l:l>
-<l:l i="200">á¹®</l:l>
-<l:l i="200">á¹¯</l:l>
-<l:l i="200">á¹°</l:l>
-<l:l i="200">á¹±</l:l>
-<l:l i="200">áº</l:l>
-<l:l i="210">U</l:l>
-<l:l i="210">u</l:l>
-<l:l i="210">Ã</l:l>
-<l:l i="210">Ã¹</l:l>
-<l:l i="210">Ã</l:l>
-<l:l i="210">Ãº</l:l>
-<l:l i="210">Ã</l:l>
-<l:l i="210">Ã»</l:l>
-<l:l i="210">Ã</l:l>
-<l:l i="210">ÃŒ</l:l>
-<l:l i="210">Åš</l:l>
-<l:l i="210">Å©</l:l>
-<l:l i="210">Åª</l:l>
-<l:l i="210">Å«</l:l>
-<l:l i="210">Å¬</l:l>
-<l:l i="210">Å­</l:l>
-<l:l i="210">Å®</l:l>
-<l:l i="210">Å¯</l:l>
-<l:l i="210">Å°</l:l>
-<l:l i="210">Å±</l:l>
-<l:l i="210">Å²</l:l>
-<l:l i="210">Å³</l:l>
-<l:l i="210">Æ¯</l:l>
-<l:l i="210">Æ°</l:l>
-<l:l i="210">Ç</l:l>
-<l:l i="210">Ç</l:l>
-<l:l i="210">Ç</l:l>
-<l:l i="210">Ç</l:l>
-<l:l i="210">Ç</l:l>
-<l:l i="210">Ç</l:l>
-<l:l i="210">Ç</l:l>
-<l:l i="210">Ç</l:l>
-<l:l i="210">Ç</l:l>
-<l:l i="210">Ç</l:l>
-<l:l i="210">È</l:l>
-<l:l i="210">È</l:l>
-<l:l i="210">È</l:l>
-<l:l i="210">È</l:l>
-<l:l i="210">á¹²</l:l>
-<l:l i="210">á¹³</l:l>
-<l:l i="210">á¹Ž</l:l>
-<l:l i="210">á¹µ</l:l>
-<l:l i="210">á¹¶</l:l>
-<l:l i="210">á¹·</l:l>
-<l:l i="210">á¹ž</l:l>
-<l:l i="210">á¹¹</l:l>
-<l:l i="210">á¹º</l:l>
-<l:l i="210">á¹»</l:l>
-<l:l i="210">á»€</l:l>
-<l:l i="210">á»¥</l:l>
-<l:l i="210">á»Š</l:l>
-<l:l i="210">á»§</l:l>
-<l:l i="210">á»š</l:l>
-<l:l i="210">á»©</l:l>
-<l:l i="210">á»ª</l:l>
-<l:l i="210">á»«</l:l>
-<l:l i="210">á»¬</l:l>
-<l:l i="210">á»­</l:l>
-<l:l i="210">á»®</l:l>
-<l:l i="210">á»¯</l:l>
-<l:l i="210">á»°</l:l>
-<l:l i="210">á»±</l:l>
-<l:l i="220">V</l:l>
-<l:l i="220">v</l:l>
-<l:l i="220">Æ²</l:l>
-<l:l i="220">Ê</l:l>
-<l:l i="220">á¹Œ</l:l>
-<l:l i="220">á¹œ</l:l>
-<l:l i="220">á¹Ÿ</l:l>
-<l:l i="220">á¹¿</l:l>
-<l:l i="230">W</l:l>
-<l:l i="230">w</l:l>
-<l:l i="230">ÅŽ</l:l>
-<l:l i="230">Åµ</l:l>
-<l:l i="230">áº</l:l>
-<l:l i="230">áº</l:l>
-<l:l i="230">áº</l:l>
-<l:l i="230">áº</l:l>
-<l:l i="230">áº</l:l>
-<l:l i="230">áº
-</l:l>
-<l:l i="230">áº</l:l>
-<l:l i="230">áº</l:l>
-<l:l i="230">áº</l:l>
-<l:l i="230">áº</l:l>
-<l:l i="230">áº</l:l>
-<l:l i="240">X</l:l>
-<l:l i="240">x</l:l>
-<l:l i="240">áº</l:l>
-<l:l i="240">áº</l:l>
-<l:l i="240">áº</l:l>
-<l:l i="240">áº</l:l>
-<l:l i="250">Y</l:l>
-<l:l i="250">y</l:l>
-<l:l i="250">Ã</l:l>
-<l:l i="250">Ãœ</l:l>
-<l:l i="250">Ã¿</l:l>
-<l:l i="250">Åž</l:l>
-<l:l i="250">Å¶</l:l>
-<l:l i="250">Å·</l:l>
-<l:l i="250">Æ³</l:l>
-<l:l i="250">ÆŽ</l:l>
-<l:l i="250">È²</l:l>
-<l:l i="250">È³</l:l>
-<l:l i="250">áº</l:l>
-<l:l i="250">áº</l:l>
-<l:l i="250">áº</l:l>
-<l:l i="250">á»²</l:l>
-<l:l i="250">á»³</l:l>
-<l:l i="250">á»Ž</l:l>
-<l:l i="250">á»µ</l:l>
-<l:l i="250">á»¶</l:l>
-<l:l i="250">á»·</l:l>
-<l:l i="250">á»ž</l:l>
-<l:l i="250">á»¹</l:l>
-<l:l i="260">Z</l:l>
-<l:l i="260">z</l:l>
-<l:l i="260">Å¹</l:l>
-<l:l i="260">Åº</l:l>
-<l:l i="260">Å»</l:l>
-<l:l i="260">ÅŒ</l:l>
-<l:l i="260">Åœ</l:l>
-<l:l i="260">ÅŸ</l:l>
-<l:l i="260">Æµ</l:l>
-<l:l i="260">Æ¶</l:l>
-<l:l i="260">È€</l:l>
-<l:l i="260">È¥</l:l>
-<l:l i="260">Ê</l:l>
-<l:l i="260">Ê</l:l>
-<l:l i="260">áº</l:l>
-<l:l i="260">áº</l:l>
-<l:l i="260">áº</l:l>
-<l:l i="260">áº</l:l>
-<l:l i="260">áº</l:l>
-<l:l i="260">áº</l:l>
-</l:letters>
-</l:l10n>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/l10n.dtd
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/l10n.dtd	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,63 +1,0 @@
-<!ENTITY % prefix "l">
-
-<!ENTITY % xmlns "xmlns:%prefix;">
-<!ENTITY % uri "'http://docbook.sourceforge.net/xmlns/l10n/1.0'">
-
-<!ENTITY % i18n "%prefix;:i18n">
-<!ENTITY % l10n "%prefix;:l10n">
-<!ENTITY % gentext "%prefix;:gentext">
-<!ENTITY % dingbat "%prefix;:dingbat">
-<!ENTITY % context "%prefix;:context">
-<!ENTITY % template "%prefix;:template">
-<!ENTITY % letters "%prefix;:letters">
-<!ENTITY % l "%prefix;:l">
-<!ENTITY % lang "lang NMTOKEN #IMPLIED"> 
-
-<!ELEMENT %i18n; ((%l10n;)+)>
-<!ATTLIST %i18n;
-	%xmlns;		CDATA	#FIXED %uri;
->
-
-<!ELEMENT %l10n; (%gentext;|%dingbat;|%context;|%letters;)*>
-<!ATTLIST %l10n;
-	%xmlns;		CDATA	#FIXED %uri;
-	language	CDATA	#REQUIRED
-	english-language-name	CDATA	#IMPLIED
->
-
-<!ELEMENT %gentext; EMPTY>
-<!ATTLIST %gentext;
-	%lang;
-	key		CDATA	#REQUIRED
-	text		CDATA	#REQUIRED
->
-
-<!ELEMENT %dingbat; EMPTY>
-<!ATTLIST %dingbat;
-        %lang;
-	key		CDATA	#REQUIRED
-	text		CDATA	#REQUIRED
->
-
-<!ELEMENT %context; ((%template;)+)>
-<!ATTLIST %context;
-	name		CDATA	#REQUIRED
->
-
-<!ELEMENT %template; EMPTY>
-<!ATTLIST %template;
-        %lang;
-	name		CDATA	#REQUIRED
-	text		CDATA	#REQUIRED
-	style		CDATA	#IMPLIED
->
-
-<!ELEMENT %letters; ((%l;)+)>
-<!ATTLIST %letters;
-          %lang;
->
-
-<!ELEMENT %l; (#PCDATA)>
-<!ATTLIST %l;
-          i 		CDATA 	#REQUIRED
->
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/l10n.xml
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/l10n.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,19 +1,0 @@
-<?xml version='1.0'?>
-<!DOCTYPE l:i18n SYSTEM "l10n.dtd" [
-<!ENTITY de SYSTEM "de.xml">
-<!ENTITY en SYSTEM "en.xml">
-<!ENTITY es SYSTEM "es.xml">
-<!ENTITY fr SYSTEM "fr.xml">
-<!ENTITY it SYSTEM "it.xml">
-<!ENTITY zh_cn SYSTEM "zh_cn.xml">
-<!ENTITY zh_tw SYSTEM "zh_tw.xml">
-]>
-<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
-&de;
-&en;
-&es;
-&fr;
-&it;
-&zh_cn;
-&zh_tw;
-</l:i18n>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/l10n.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/l10n.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,441 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"
-                exclude-result-prefixes="l"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     This file contains localization templates (for internationalization)
-     ******************************************************************** -->
-
-<xsl:param name="l10n.xml" select="document('../common/l10n.xml')"/>
-<xsl:param name="local.l10n.xml" select="document('')"/>
-
-<xsl:template name="l10n.language">
-  <xsl:param name="target" select="."/>
-  <xsl:param name="xref-context" select="false()"/>
-
-  <xsl:variable name="mc-language">
-    <xsl:choose>
-      <xsl:when test="$l10n.gentext.language != ''">
-        <xsl:value-of select="$l10n.gentext.language"/>
-      </xsl:when>
-
-      <xsl:when test="$xref-context or $l10n.gentext.use.xref.language != 0">
-        <!-- can't do this one step: attributes are unordered! -->
-        <xsl:variable name="lang-scope"
-                      select="$target/ancestor-or-self::*
-                              [@lang or @xml:lang][1]"/>
-        <xsl:variable name="lang-attr"
-                      select="($lang-scope/@lang | $lang-scope/@xml:lang)[1]"/>
-        <xsl:choose>
-          <xsl:when test="string($lang-attr) = ''">
-            <xsl:value-of select="$l10n.gentext.default.language"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="$lang-attr"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:when>
-
-      <xsl:otherwise>
-        <!-- can't do this one step: attributes are unordered! -->
-        <xsl:variable name="lang-scope"
-                      select="$target/ancestor-or-self::*
-                              [@lang or @xml:lang][1]"/>
-        <xsl:variable name="lang-attr"
-                      select="($lang-scope/@lang | $lang-scope/@xml:lang)[1]"/>
-
-        <xsl:choose>
-          <xsl:when test="string($lang-attr) = ''">
-            <xsl:value-of select="$l10n.gentext.default.language"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="$lang-attr"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="language" select="translate($mc-language,
-                                        'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
-                                        'abcdefghijklmnopqrstuvwxyz')"/>
-
-  <xsl:variable name="adjusted.language">
-    <xsl:choose>
-      <xsl:when test="contains($language,'-')">
-        <xsl:value-of select="substring-before($language,'-')"/>
-        <xsl:text>_</xsl:text>
-        <xsl:value-of select="substring-after($language,'-')"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$language"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$l10n.xml/l:i18n/l:l10n[@language=$adjusted.language]">
-      <xsl:value-of select="$adjusted.language"/>
-    </xsl:when>
-    <!-- try just the lang code without country -->
-    <xsl:when test="$l10n.xml/l:i18n/l:l10n[@language=substring-before($adjusted.language,'_')]">
-      <xsl:value-of select="substring-before($adjusted.language,'_')"/>
-    </xsl:when>
-    <!-- or use the default -->
-    <xsl:otherwise>
-      <xsl:message>
-        <xsl:text>No localization exists for "</xsl:text>
-        <xsl:value-of select="$adjusted.language"/>
-        <xsl:text>" or "</xsl:text>
-        <xsl:value-of select="substring-before($adjusted.language,'_')"/>
-        <xsl:text>". Using default "</xsl:text>
-        <xsl:value-of select="$l10n.gentext.default.language"/>
-        <xsl:text>".</xsl:text>
-      </xsl:message>
-      <xsl:value-of select="$l10n.gentext.default.language"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="language.attribute">
-  <xsl:param name="node" select="."/>
-
-  <xsl:variable name="language">
-    <xsl:choose>
-      <xsl:when test="$l10n.gentext.language != ''">
-        <xsl:value-of select="$l10n.gentext.language"/>
-      </xsl:when>
-
-      <xsl:otherwise>
-        <!-- can't do this one step: attributes are unordered! -->
-        <xsl:variable name="lang-scope"
-                      select="$node/ancestor-or-self::*
-                              [@lang or @xml:lang][1]"/>
-        <xsl:variable name="lang-attr"
-                      select="($lang-scope/@lang | $lang-scope/@xml:lang)[1]"/>
-
-        <xsl:choose>
-          <xsl:when test="string($lang-attr) = ''">
-            <xsl:value-of select="$l10n.gentext.default.language"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="$lang-attr"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:if test="$language != ''">
-    <xsl:attribute name="lang">
-      <xsl:choose>
-        <xsl:when test="$l10n.lang.value.rfc.compliant != 0">
-          <xsl:value-of select="translate($language, '_', '-')"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="$language"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:attribute>
-  </xsl:if>
-
-  <!-- FIXME: This is sort of hack, but it was the easiest way to add at least partial support for dir attribute -->
-  <xsl:copy-of select="ancestor-or-self::*[@dir][1]/@dir"/>
-</xsl:template>
-
-<xsl:template name="gentext">
-  <xsl:param name="key" select="local-name(.)"/>
-  <xsl:param name="lang">
-    <xsl:call-template name="l10n.language"/>
-  </xsl:param>
-
-  <xsl:variable name="local.l10n.gentext"
-                select="($local.l10n.xml//l:i18n/l:l10n[@language=$lang]/l:gentext[@key=$key])[1]"/>
-
-  <xsl:variable name="l10n.gentext"
-                select="($l10n.xml/l:i18n/l:l10n[@language=$lang]/l:gentext[@key=$key])[1]"/>
-
-  <xsl:choose>
-    <xsl:when test="$local.l10n.gentext">
-      <xsl:value-of select="$local.l10n.gentext/@text"/>
-    </xsl:when>
-    <xsl:when test="$l10n.gentext">
-      <xsl:value-of select="$l10n.gentext/@text"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:message>
-        <xsl:text>No "</xsl:text>
-        <xsl:value-of select="$lang"/>
-        <xsl:text>" localization of "</xsl:text>
-        <xsl:value-of select="$key"/>
-        <xsl:text>" exists</xsl:text>
-        <xsl:choose>
-          <xsl:when test="$lang = 'en'">
-             <xsl:text>.</xsl:text>
-          </xsl:when>
-          <xsl:otherwise>
-             <xsl:text>; using "en".</xsl:text>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:message>
-
-      <xsl:value-of select="($l10n.xml/l:i18n/l:l10n[@language='en']/l:gentext[@key=$key])[1]/@text"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="gentext.element.name">
-  <xsl:param name="element.name" select="local-name(.)"/>
-  <xsl:param name="lang">
-    <xsl:call-template name="l10n.language"/>
-  </xsl:param>
-
-  <xsl:call-template name="gentext">
-    <xsl:with-param name="key" select="$element.name"/>
-    <xsl:with-param name="lang" select="$lang"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="gentext.space">
-  <xsl:text> </xsl:text>
-</xsl:template>
-
-<xsl:template name="gentext.edited.by">
-  <xsl:call-template name="gentext">
-    <xsl:with-param name="key" select="'Editedby'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="gentext.by">
-  <xsl:call-template name="gentext">
-    <xsl:with-param name="key" select="'by'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="gentext.dingbat">
-  <xsl:param name="dingbat">bullet</xsl:param>
-  <xsl:param name="lang">
-    <xsl:call-template name="l10n.language"/>
-  </xsl:param>
-
-  <xsl:variable name="local.l10n.dingbat"
-                select="($local.l10n.xml//l:i18n/l:l10n[@language=$lang]/l:dingbat[@key=$dingbat])[1]"/>
-
-  <xsl:variable name="l10n.dingbat"
-                select="($l10n.xml/l:i18n/l:l10n[@language=$lang]/l:dingbat[@key=$dingbat])[1]"/>
-
-  <xsl:choose>
-    <xsl:when test="$local.l10n.dingbat">
-      <xsl:value-of select="$local.l10n.dingbat/@text"/>
-    </xsl:when>
-    <xsl:when test="$l10n.dingbat">
-      <xsl:value-of select="$l10n.dingbat/@text"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:message>
-        <xsl:text>No "</xsl:text>
-        <xsl:value-of select="$lang"/>
-        <xsl:text>" localization of dingbat </xsl:text>
-        <xsl:value-of select="$dingbat"/>
-        <xsl:text> exists; using "en".</xsl:text>
-      </xsl:message>
-
-      <xsl:value-of select="($l10n.xml/l:i18n/l:l10n[@language='en']/l:dingbat[@key=$dingbat])[1]/@text"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="gentext.startquote">
-  <xsl:call-template name="gentext.dingbat">
-    <xsl:with-param name="dingbat">startquote</xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="gentext.endquote">
-  <xsl:call-template name="gentext.dingbat">
-    <xsl:with-param name="dingbat">endquote</xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="gentext.nestedstartquote">
-  <xsl:call-template name="gentext.dingbat">
-    <xsl:with-param name="dingbat">nestedstartquote</xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="gentext.nestedendquote">
-  <xsl:call-template name="gentext.dingbat">
-    <xsl:with-param name="dingbat">nestedendquote</xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="gentext.nav.prev">
-  <xsl:call-template name="gentext">
-    <xsl:with-param name="key" select="'nav-prev'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="gentext.nav.next">
-  <xsl:call-template name="gentext">
-    <xsl:with-param name="key" select="'nav-next'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="gentext.nav.home">
-  <xsl:call-template name="gentext">
-    <xsl:with-param name="key" select="'nav-home'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="gentext.nav.up">
-  <xsl:call-template name="gentext">
-    <xsl:with-param name="key" select="'nav-up'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<!-- ============================================================ -->
-
-<xsl:template name="gentext.template">
-  <xsl:param name="context" select="'default'"/>
-  <xsl:param name="name" select="'default'"/>
-  <xsl:param name="origname" select="$name"/>
-  <xsl:param name="purpose"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="referrer"/>
-  <xsl:param name="lang">
-    <xsl:call-template name="l10n.language"/>
-  </xsl:param>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:variable name="local.localization.node"
-                select="($local.l10n.xml//l:i18n/l:l10n[@language=$lang])[1]"/>
-
-  <xsl:variable name="localization.node"
-                select="($l10n.xml/l:i18n/l:l10n[@language=$lang])[1]"/>
-
-  <xsl:if test="count($localization.node) = 0
-                and count($local.localization.node) = 0
-                and $verbose != 0">
-    <xsl:message>
-      <xsl:text>No "</xsl:text>
-      <xsl:value-of select="$lang"/>
-      <xsl:text>" localization exists.</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:variable name="local.context.node"
-                select="$local.localization.node/l:context[@name=$context]"/>
-
-  <xsl:variable name="context.node"
-                select="$localization.node/l:context[@name=$context]"/>
-
-  <xsl:if test="count($context.node) = 0
-                and count($local.context.node) = 0
-                and $verbose != 0">
-    <xsl:message>
-      <xsl:text>No context named "</xsl:text>
-      <xsl:value-of select="$context"/>
-      <xsl:text>" exists in the "</xsl:text>
-      <xsl:value-of select="$lang"/>
-      <xsl:text>" localization.</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:variable name="local.template.node"
-                select="($local.context.node/l:template[@name=$name
-                                                        and @style
-                                                        and @style=$xrefstyle]
-                        |$local.context.node/l:template[@name=$name
-                                                        and not(@style)])[1]"/>
-
-  <xsl:variable name="template.node"
-                select="($context.node/l:template[@name=$name
-                                                  and @style
-                                                  and @style=$xrefstyle]
-                        |$context.node/l:template[@name=$name
-                                                  and not(@style)])[1]"/>
-
-  <xsl:choose>
-    <xsl:when test="$local.template.node/@text">
-      <xsl:value-of select="$local.template.node/@text"/>
-    </xsl:when>
-    <xsl:when test="$template.node/@text">
-      <xsl:value-of select="$template.node/@text"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="contains($name, '/')">
-          <xsl:call-template name="gentext.template">
-            <xsl:with-param name="context" select="$context"/>
-            <xsl:with-param name="name" select="substring-after($name, '/')"/>
-            <xsl:with-param name="origname" select="$origname"/>
-            <xsl:with-param name="purpose" select="$purpose"/>
-            <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-            <xsl:with-param name="referrer" select="$referrer"/>
-            <xsl:with-param name="lang" select="$lang"/>
-            <xsl:with-param name="verbose" select="$verbose"/>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:when test="$verbose = 0">
-          <!-- silence -->
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:message>
-            <xsl:text>No template for "</xsl:text>
-            <xsl:value-of select="$origname"/>
-            <xsl:text>" (or any of its leaves) exists
-in the context named "</xsl:text>
-            <xsl:value-of select="$context"/>
-            <xsl:text>" in the "</xsl:text>
-            <xsl:value-of select="$lang"/>
-            <xsl:text>" localization.</xsl:text>
-          </xsl:message>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- silently test if a gentext template exists -->
-
-<xsl:template name="gentext.template.exists">
-  <xsl:param name="context" select="'default'"/>
-  <xsl:param name="name" select="'default'"/>
-  <xsl:param name="origname" select="$name"/>
-  <xsl:param name="purpose"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="referrer"/>
-  <xsl:param name="lang">
-    <xsl:call-template name="l10n.language"/>
-  </xsl:param>
-
-  <xsl:variable name="template">
-    <xsl:call-template name="gentext.template">
-      <xsl:with-param name="context" select="$context"/>
-      <xsl:with-param name="name" select="$name"/>
-      <xsl:with-param name="origname" select="$origname"/>
-      <xsl:with-param name="purpose" select="$purpose"/>
-      <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-      <xsl:with-param name="referrer" select="$referrer"/>
-      <xsl:with-param name="lang" select="$lang"/>
-      <xsl:with-param name="verbose" select="0"/>
-    </xsl:call-template>
-  </xsl:variable>
-  
-  <xsl:choose>
-    <xsl:when test="string-length($template) != 0">1</xsl:when>
-    <xsl:otherwise>0</xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet>
-
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/labels.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/labels.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,869 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
-                exclude-result-prefixes="doc"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<!-- label markup -->
-
-<doc:mode mode="label.markup" xmlns="">
-<refpurpose>Provides access to element labels</refpurpose>
-<refdescription id="label.markup-desc">
-<para>Processing an element in the
-<literal role="mode">label.markup</literal> mode produces the
-element label.</para>
-<para>Trailing punctuation is not added to the label.
-</para>
-</refdescription>
-</doc:mode>
-
-<xsl:template match="*" mode="intralabel.punctuation">
-  <xsl:text>.</xsl:text>
-</xsl:template>
-
-<xsl:template match="*" mode="label.markup">
-  <xsl:param name="verbose" select="1"/>
-  <xsl:if test="$verbose">
-    <xsl:message>
-      <xsl:text>Request for label of unexpected element: </xsl:text>
-      <xsl:value-of select="local-name(.)"/>
-    </xsl:message>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="set|book" mode="label.markup">
-  <xsl:if test="@label">
-    <xsl:value-of select="@label"/>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="part" mode="label.markup">
-  <xsl:choose>
-    <xsl:when test="@label">
-      <xsl:value-of select="@label"/>
-    </xsl:when>
-    <xsl:when test="string($part.autolabel) != 0">
-      <xsl:variable name="format">
-        <xsl:call-template name="autolabel.format">
-          <xsl:with-param name="format" select="$part.autolabel"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:number from="book" count="part" format="{$format}"/>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="partintro" mode="label.markup">
-  <!-- no label -->
-</xsl:template>
-
-<xsl:template match="preface" mode="label.markup">
-  <xsl:choose>
-    <xsl:when test="@label">
-      <xsl:value-of select="@label"/>
-    </xsl:when>
-    <xsl:when test="string($preface.autolabel) != 0">
-      <xsl:if test="$component.label.includes.part.label != 0 and
-                      ancestor::part">
-        <xsl:variable name="part.label">
-          <xsl:apply-templates select="ancestor::part" 
-                               mode="label.markup"/>
-        </xsl:variable>
-        <xsl:if test="$part.label != ''">
-          <xsl:value-of select="$part.label"/>
-          <xsl:apply-templates select="ancestor::part" 
-                               mode="intralabel.punctuation"/>
-        </xsl:if>
-      </xsl:if>
-      <xsl:variable name="format">
-        <xsl:call-template name="autolabel.format">
-          <xsl:with-param name="format" select="$preface.autolabel"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:choose>
-        <xsl:when test="$label.from.part != 0 and ancestor::part">
-          <xsl:number from="part" count="preface" format="{$format}" level="any"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:number from="book" count="preface" format="{$format}" level="any"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="chapter" mode="label.markup">
-  <xsl:choose>
-    <xsl:when test="@label">
-      <xsl:value-of select="@label"/>
-    </xsl:when>
-    <xsl:when test="string($chapter.autolabel) != 0">
-      <xsl:if test="$component.label.includes.part.label != 0 and
-                      ancestor::part">
-        <xsl:variable name="part.label">
-          <xsl:apply-templates select="ancestor::part" 
-                               mode="label.markup"/>
-        </xsl:variable>
-        <xsl:if test="$part.label != ''">
-          <xsl:value-of select="$part.label"/>
-          <xsl:apply-templates select="ancestor::part" 
-                               mode="intralabel.punctuation"/>
-        </xsl:if>
-      </xsl:if>
-      <xsl:variable name="format">
-        <xsl:call-template name="autolabel.format">
-          <xsl:with-param name="format" select="$chapter.autolabel"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:choose>
-        <xsl:when test="$label.from.part != 0 and ancestor::part">
-          <xsl:number from="part" count="chapter" format="{$format}" level="any"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:number from="book" count="chapter" format="{$format}" level="any"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="appendix" mode="label.markup">
-  <xsl:choose>
-    <xsl:when test="@label">
-      <xsl:value-of select="@label"/>
-    </xsl:when>
-    <xsl:when test="string($appendix.autolabel) != 0">
-      <xsl:if test="$component.label.includes.part.label != 0 and
-                      ancestor::part">
-        <xsl:variable name="part.label">
-          <xsl:apply-templates select="ancestor::part" 
-                               mode="label.markup"/>
-        </xsl:variable>
-        <xsl:if test="$part.label != ''">
-          <xsl:value-of select="$part.label"/>
-          <xsl:apply-templates select="ancestor::part" 
-                               mode="intralabel.punctuation"/>
-        </xsl:if>
-      </xsl:if>
-      <xsl:variable name="format">
-        <xsl:call-template name="autolabel.format">
-          <xsl:with-param name="format" select="$appendix.autolabel"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:choose>
-        <xsl:when test="$label.from.part != 0 and ancestor::part">
-          <xsl:number from="part" count="appendix" format="{$format}" level="any"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:number from="book|article"
-                      count="appendix" format="{$format}" level="any"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="article" mode="label.markup">
-  <xsl:if test="@label">
-    <xsl:value-of select="@label"/>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="dedication|colophon" mode="label.markup">
-  <xsl:if test="@label">
-    <xsl:value-of select="@label"/>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="reference" mode="label.markup">
-  <xsl:choose>
-    <xsl:when test="@label">
-      <xsl:value-of select="@label"/>
-    </xsl:when>
-    <xsl:when test="string($reference.autolabel) != 0">
-      <xsl:if test="$component.label.includes.part.label != 0 and
-                      ancestor::part">
-        <xsl:variable name="part.label">
-          <xsl:apply-templates select="ancestor::part" 
-                               mode="label.markup"/>
-        </xsl:variable>
-        <xsl:if test="$part.label != ''">
-          <xsl:value-of select="$part.label"/>
-          <xsl:apply-templates select="ancestor::part" 
-                               mode="intralabel.punctuation"/>
-        </xsl:if>
-      </xsl:if>
-      <xsl:variable name="format">
-        <xsl:call-template name="autolabel.format">
-          <xsl:with-param name="format" select="$reference.autolabel"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:choose>
-        <xsl:when test="$label.from.part != 0 and ancestor::part">
-          <xsl:number from="part" count="reference" format="{$format}" level="any"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:number from="book" count="reference" format="{$format}" level="any"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="refentry" mode="label.markup">
-  <xsl:if test="@label">
-    <xsl:value-of select="@label"/>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="section" mode="label.markup">
-  <!-- if this is a nested section, label the parent -->
-  <xsl:if test="local-name(..) = 'section'">
-    <xsl:variable name="parent.section.label">
-      <xsl:call-template name="label.this.section">
-        <xsl:with-param name="section" select=".."/>
-      </xsl:call-template>
-    </xsl:variable>
-    <xsl:if test="$parent.section.label != '0'">
-      <xsl:apply-templates select=".." mode="label.markup"/>
-      <xsl:apply-templates select=".." mode="intralabel.punctuation"/>
-    </xsl:if>
-  </xsl:if>
-
-  <!-- if the parent is a component, maybe label that too -->
-  <xsl:variable name="parent.is.component">
-    <xsl:call-template name="is.component">
-      <xsl:with-param name="node" select=".."/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <!-- does this section get labelled? -->
-  <xsl:variable name="label">
-    <xsl:call-template name="label.this.section">
-      <xsl:with-param name="section" select="."/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:if test="$section.label.includes.component.label != 0
-                and $parent.is.component != 0">
-    <xsl:variable name="parent.label">
-      <xsl:apply-templates select=".." mode="label.markup"/>
-    </xsl:variable>
-    <xsl:if test="$parent.label != ''">
-      <xsl:apply-templates select=".." mode="label.markup"/>
-      <xsl:apply-templates select=".." mode="intralabel.punctuation"/>
-    </xsl:if>
-  </xsl:if>
-
-<!--
-  <xsl:message>
-    test: <xsl:value-of select="$label"/>, <xsl:number count="section"/>
-  </xsl:message>
--->
-
-  <xsl:choose>
-    <xsl:when test="@label">
-      <xsl:value-of select="@label"/>
-    </xsl:when>
-    <xsl:when test="$label != 0">      
-      <xsl:variable name="format">
-        <xsl:call-template name="autolabel.format">
-          <xsl:with-param name="format" select="$section.autolabel"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:number format="{$format}" count="section"/>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="sect1" mode="label.markup">
-  <!-- if the parent is a component, maybe label that too -->
-  <xsl:variable name="parent.is.component">
-    <xsl:call-template name="is.component">
-      <xsl:with-param name="node" select=".."/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="component.label">
-    <xsl:if test="$section.label.includes.component.label != 0
-                  and $parent.is.component != 0">
-      <xsl:variable name="parent.label">
-        <xsl:apply-templates select=".." mode="label.markup"/>
-      </xsl:variable>
-      <xsl:if test="$parent.label != ''">
-        <xsl:apply-templates select=".." mode="label.markup"/>
-        <xsl:apply-templates select=".." mode="intralabel.punctuation"/>
-      </xsl:if>
-    </xsl:if>
-  </xsl:variable>
-
-
-  <xsl:variable name="is.numbered">
-    <xsl:call-template name="label.this.section"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="@label">
-      <xsl:value-of select="@label"/>
-    </xsl:when>
-    <xsl:when test="$is.numbered != 0">
-      <xsl:variable name="format">
-        <xsl:call-template name="autolabel.format">
-          <xsl:with-param name="format" select="$section.autolabel"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:copy-of select="$component.label"/>
-      <xsl:number format="{$format}" count="sect1"/>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="sect2|sect3|sect4|sect5" mode="label.markup">
-  <!-- label the parent -->
-  <xsl:variable name="parent.section.label">
-    <xsl:call-template name="label.this.section">
-      <xsl:with-param name="section" select=".."/>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:if test="$parent.section.label != '0'">
-    <xsl:apply-templates select=".." mode="label.markup"/>
-    <xsl:apply-templates select=".." mode="intralabel.punctuation"/>
-  </xsl:if>
-
-  <xsl:variable name="is.numbered">
-    <xsl:call-template name="label.this.section"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="@label">
-      <xsl:value-of select="@label"/>
-    </xsl:when>
-    <xsl:when test="$is.numbered != 0">
-      <xsl:variable name="format">
-        <xsl:call-template name="autolabel.format">
-          <xsl:with-param name="format" select="$section.autolabel"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:choose>
-        <xsl:when test="local-name(.) = 'sect2'">
-          <xsl:number format="{$format}" count="sect2"/>
-        </xsl:when>
-        <xsl:when test="local-name(.) = 'sect3'">
-          <xsl:number format="{$format}" count="sect3"/>
-        </xsl:when>
-        <xsl:when test="local-name(.) = 'sect4'">
-          <xsl:number format="{$format}" count="sect4"/>
-        </xsl:when>
-        <xsl:when test="local-name(.) = 'sect5'">
-          <xsl:number format="{$format}" count="sect5"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:message>label.markup: this can't happen!</xsl:message>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="bridgehead" mode="label.markup">
-  <!-- FIXME: could we do a better job here? -->
-  <xsl:variable name="contsec"
-                select="(ancestor::section
-                         |ancestor::simplesect
-                         |ancestor::sect1
-                         |ancestor::sect2
-                         |ancestor::sect3
-                         |ancestor::sect4
-                         |ancestor::sect5
-                         |ancestor::refsect1
-                         |ancestor::refsect2
-                         |ancestor::refsect3
-                         |ancestor::chapter
-                         |ancestor::appendix
-                         |ancestor::preface)[last()]"/>
-
-  <xsl:apply-templates select="$contsec" mode="label.markup"/>
-</xsl:template>
-
-<xsl:template match="refsect1" mode="label.markup">
-  <xsl:choose>
-    <xsl:when test="@label">
-      <xsl:value-of select="@label"/>
-    </xsl:when>
-    <xsl:when test="$section.autolabel != 0">
-      <xsl:variable name="format">
-        <xsl:call-template name="autolabel.format">
-          <xsl:with-param name="format" select="$section.autolabel"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:number count="refsect1" format="{$format}"/>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="refsect2|refsect3" mode="label.markup">
-  <!-- label the parent -->
-  <xsl:variable name="parent.label">
-    <xsl:apply-templates select=".." mode="label.markup"/>
-  </xsl:variable>
-  <xsl:if test="$parent.label != ''">
-    <xsl:apply-templates select=".." mode="label.markup"/>
-    <xsl:apply-templates select=".." mode="intralabel.punctuation"/>
-  </xsl:if>
-
-  <xsl:choose>
-    <xsl:when test="@label">
-      <xsl:value-of select="@label"/>
-    </xsl:when>
-    <xsl:when test="$section.autolabel != 0">
-      <xsl:variable name="format">
-        <xsl:call-template name="autolabel.format">
-          <xsl:with-param name="format" select="$section.autolabel"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:choose>
-        <xsl:when test="local-name(.) = 'refsect2'">
-          <xsl:number count="refsect2" format="{$format}"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:number count="refsect3" format="{$format}"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="simplesect" mode="label.markup">
-  <!-- if this is a nested section, label the parent -->
-  <xsl:if test="local-name(..) = 'section'
-                or local-name(..) = 'sect1'
-                or local-name(..) = 'sect2'
-                or local-name(..) = 'sect3'
-                or local-name(..) = 'sect4'
-                or local-name(..) = 'sect5'">
-    <xsl:variable name="parent.section.label">
-      <xsl:apply-templates select=".." mode="label.markup"/>
-    </xsl:variable>
-    <xsl:if test="$parent.section.label != ''">
-      <xsl:apply-templates select=".." mode="label.markup"/>
-      <xsl:apply-templates select=".." mode="intralabel.punctuation"/>
-    </xsl:if>
-  </xsl:if>
-
-  <!-- if the parent is a component, maybe label that too -->
-  <xsl:variable name="parent.is.component">
-    <xsl:call-template name="is.component">
-      <xsl:with-param name="node" select=".."/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <!-- does this section get labelled? -->
-  <xsl:variable name="label">
-    <xsl:call-template name="label.this.section">
-      <xsl:with-param name="section" select="."/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:if test="$section.label.includes.component.label != 0
-                and $parent.is.component != 0">
-    <xsl:variable name="parent.label">
-      <xsl:apply-templates select=".." mode="label.markup"/>
-    </xsl:variable>
-    <xsl:if test="$parent.label != ''">
-      <xsl:apply-templates select=".." mode="label.markup"/>
-      <xsl:apply-templates select=".." mode="intralabel.punctuation"/>
-    </xsl:if>
-  </xsl:if>
-
-  <xsl:choose>
-    <xsl:when test="@label">
-      <xsl:value-of select="@label"/>
-    </xsl:when>
-    <xsl:when test="$label != 0">
-      <xsl:variable name="format">
-        <xsl:call-template name="autolabel.format">
-          <xsl:with-param name="format" select="$section.autolabel"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:number format="{$format}" count="simplesect"/>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="qandadiv" mode="label.markup">
-  <xsl:variable name="lparent" select="(ancestor::set
-                                       |ancestor::book
-                                       |ancestor::chapter
-                                       |ancestor::appendix
-                                       |ancestor::preface
-                                       |ancestor::section
-                                       |ancestor::simplesect
-                                       |ancestor::sect1
-                                       |ancestor::sect2
-                                       |ancestor::sect3
-                                       |ancestor::sect4
-                                       |ancestor::sect5
-                                       |ancestor::refsect1
-                                       |ancestor::refsect2
-                                       |ancestor::refsect3)[last()]"/>
-
-  <xsl:variable name="lparent.prefix">
-    <xsl:apply-templates select="$lparent" mode="label.markup"/>
-  </xsl:variable>
-
-  <xsl:variable name="prefix">
-    <xsl:if test="$qanda.inherit.numeration != 0">
-      <xsl:if test="$lparent.prefix != ''">
-        <xsl:apply-templates select="$lparent" mode="label.markup"/>
-        <xsl:apply-templates select="$lparent" mode="intralabel.punctuation"/>
-      </xsl:if>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$qandadiv.autolabel != 0">
-      <xsl:variable name="format">
-        <xsl:call-template name="autolabel.format">
-          <xsl:with-param name="format" select="$qandadiv.autolabel"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:value-of select="$prefix"/>
-      <xsl:number level="multiple" count="qandadiv" format="{$format}"/>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="question|answer" mode="label.markup">
-  <xsl:variable name="lparent" select="(ancestor::set
-                                       |ancestor::book
-                                       |ancestor::chapter
-                                       |ancestor::appendix
-                                       |ancestor::preface
-                                       |ancestor::section
-                                       |ancestor::simplesect
-                                       |ancestor::sect1
-                                       |ancestor::sect2
-                                       |ancestor::sect3
-                                       |ancestor::sect4
-                                       |ancestor::sect5
-                                       |ancestor::refsect1
-                                       |ancestor::refsect2
-                                       |ancestor::refsect3)[last()]"/>
-
-  <xsl:variable name="lparent.prefix">
-    <xsl:apply-templates select="$lparent" mode="label.markup"/>
-  </xsl:variable>
-
-  <xsl:variable name="prefix">
-    <xsl:if test="$qanda.inherit.numeration != 0">
-      <xsl:choose>
-        <xsl:when test="ancestor::qandadiv">
-          <xsl:apply-templates select="ancestor::qandadiv[1]" mode="label.markup"/>
-          <xsl:apply-templates select="ancestor::qandadiv[1]"
-                               mode="intralabel.punctuation"/>
-        </xsl:when>
-        <xsl:when test="$lparent.prefix != ''">
-          <xsl:apply-templates select="$lparent" mode="label.markup"/>
-          <xsl:apply-templates select="$lparent" mode="intralabel.punctuation"/>
-        </xsl:when>
-      </xsl:choose>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="inhlabel"
-                select="ancestor-or-self::qandaset/@defaultlabel[1]"/>
-
-  <xsl:variable name="deflabel">
-    <xsl:choose>
-      <xsl:when test="$inhlabel != ''">
-        <xsl:value-of select="$inhlabel"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$qanda.defaultlabel"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="label" select="label"/>
-
-  <xsl:choose>
-    <xsl:when test="count($label)>0">
-      <xsl:apply-templates select="$label"/>
-    </xsl:when>
-
-    <xsl:when test="$deflabel = 'qanda' and local-name(.) = 'question'">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'Question'"/>
-      </xsl:call-template>
-    </xsl:when>
-
-    <xsl:when test="$deflabel = 'qanda' and local-name(.) = 'answer'">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'Answer'"/>
-      </xsl:call-template>
-    </xsl:when>
-
-    <xsl:when test="$deflabel = 'number' and local-name(.) = 'question'">
-      <xsl:value-of select="$prefix"/>
-      <xsl:number level="multiple" count="qandaentry" format="1"/>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="bibliography|glossary|
-                     qandaset|index|setindex" mode="label.markup">
-  <xsl:if test="@label">
-    <xsl:value-of select="@label"/>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="figure|table|example" mode="label.markup">
-  <xsl:variable name="pchap"
-                select="ancestor::chapter
-                        |ancestor::appendix
-                        |ancestor::article[ancestor::book]"/>
-
-  <xsl:variable name="prefix">
-    <xsl:if test="count($pchap) &gt; 0">
-      <xsl:apply-templates select="$pchap" mode="label.markup"/>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="@label">
-      <xsl:value-of select="@label"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="$prefix != ''">
-            <xsl:apply-templates select="$pchap" mode="label.markup"/>
-            <xsl:apply-templates select="$pchap" mode="intralabel.punctuation"/>
-          <xsl:number format="1" from="chapter|appendix" level="any"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:number format="1" from="book|article" level="any"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="procedure" mode="label.markup">
-  <xsl:variable name="pchap"
-                select="ancestor::chapter
-                        |ancestor::appendix
-                        |ancestor::article[ancestor::book]"/>
-
-  <xsl:variable name="prefix">
-    <xsl:if test="count($pchap) &gt; 0">
-      <xsl:apply-templates select="$pchap" mode="label.markup"/>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="@label">
-      <xsl:value-of select="@label"/>
-    </xsl:when>
-    <xsl:when test="$formal.procedures = 0">
-      <!-- No label -->
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="count($pchap)>0">
-          <xsl:if test="$prefix != ''">
-            <xsl:apply-templates select="$pchap" mode="label.markup"/>
-            <xsl:apply-templates select="$pchap" mode="intralabel.punctuation"/>
-          </xsl:if>
-          <xsl:number count="procedure[title]" format="1" 
-                      from="chapter|appendix" level="any"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:number count="procedure[title]" format="1" 
-                      from="book|article" level="any"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="equation" mode="label.markup">
-  <xsl:variable name="pchap"
-                select="ancestor::chapter
-                        |ancestor::appendix
-                        |ancestor::article[ancestor::book]"/>
-
-  <xsl:variable name="prefix">
-    <xsl:if test="count($pchap) &gt; 0">
-      <xsl:apply-templates select="$pchap" mode="label.markup"/>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="@label">
-      <xsl:value-of select="@label"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="count($pchap)>0">
-          <xsl:if test="$prefix != ''">
-            <xsl:apply-templates select="$pchap" mode="label.markup"/>
-            <xsl:apply-templates select="$pchap" mode="intralabel.punctuation"/>
-          </xsl:if>
-          <xsl:number format="1" count="equation[title or info/title]" 
-	              from="chapter|appendix" level="any"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:number format="1" count="equation[title or info/title]" 
-	              from="book|article" level="any"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="orderedlist/listitem" mode="label.markup">
-  <xsl:variable name="numeration">
-    <xsl:call-template name="list.numeration">
-      <xsl:with-param name="node" select="parent::orderedlist"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="type">
-    <xsl:choose>
-      <xsl:when test="$numeration='arabic'">1</xsl:when>
-      <xsl:when test="$numeration='loweralpha'">a</xsl:when>
-      <xsl:when test="$numeration='lowerroman'">i</xsl:when>
-      <xsl:when test="$numeration='upperalpha'">A</xsl:when>
-      <xsl:when test="$numeration='upperroman'">I</xsl:when>
-      <!-- What!? This should never happen -->
-      <xsl:otherwise>
-        <xsl:message>
-          <xsl:text>Unexpected numeration: </xsl:text>
-          <xsl:value-of select="$numeration"/>
-        </xsl:message>
-        <xsl:value-of select="1."/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="item-number">
-    <xsl:call-template name="orderedlist-item-number"/>
-  </xsl:variable>
-
-  <xsl:number value="$item-number" format="{$type}"/>
-</xsl:template>
-
-<xsl:template match="abstract" mode="label.markup">
-  <!-- nop -->
-</xsl:template>
-
-<xsl:template match="sidebar" mode="label.markup">
-  <!-- nop -->
-</xsl:template>
-
-<!-- ============================================================ -->
-
-<xsl:template name="label.this.section">
-  <xsl:param name="section" select="."/>
-
-  <xsl:variable name="level">
-    <xsl:call-template name="section.level"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$level &lt;= $section.autolabel.max.depth">      
-      <xsl:value-of select="$section.autolabel"/>
-    </xsl:when>
-    <xsl:otherwise>0</xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<doc:template name="label.this.section" xmlns="">
-<refpurpose>Returns true if $section should be labelled</refpurpose>
-<refdescription id="label.this.section-desc">
-<para>Returns true if the specified section should be labelled.
-By default, this template returns zero unless 
-the section level is less than or equal to the value of the
-<literal>$section.autolabel.max.depth</literal> parameter, in
-which case it returns
-<literal>$section.autolabel</literal>.
-Custom stylesheets may override it to get more selective behavior.</para>
-</refdescription>
-</doc:template>
-
-<!-- ============================================================ -->
-
-<xsl:template name="default.autolabel.format">
-  <xsl:param name="context" select="."/>
-  <xsl:choose>
-    <xsl:when test="local-name($context) = 'appendix'">
-      <xsl:value-of select="'A'"/>
-    </xsl:when>
-    <xsl:when test="local-name($context) = 'part'">
-      <xsl:value-of select="'I'"/>
-    </xsl:when>
-    <xsl:otherwise>1</xsl:otherwise>
-  </xsl:choose>  
-</xsl:template>
-  
-<xsl:template name="autolabel.format">
-  <xsl:param name="context" select="."/>
-  <xsl:param name="format"/>
-
-  <xsl:choose>
-    <xsl:when test="string($format) != 0">
-      <xsl:choose>
-        <xsl:when test="string($format)='arabic' or $format='1'">1</xsl:when>
-        <xsl:when test="$format='loweralpha' or $format='a'">
-          <xsl:value-of select="'a'"/>
-        </xsl:when>
-        <xsl:when test="$format='lowerroman' or $format='i'">
-          <xsl:value-of select="'i'"/>
-        </xsl:when>
-        <xsl:when test="$format='upperalpha' or $format='A'">
-          <xsl:value-of select="'A'"/>
-        </xsl:when>
-        <xsl:when test="$format='upperroman' or $format='I'">
-          <xsl:value-of select="'I'"/>
-        </xsl:when>      
-	<xsl:when test="$format='arabicindic' or $format='&#x661;'">
-	  <xsl:value-of select="'&#x661;'"/>
-	</xsl:when>
-        <xsl:otherwise>
-          <xsl:message>
-            <xsl:text>Unexpected </xsl:text><xsl:value-of select="local-name(.)"/><xsl:text>.autolabel value: </xsl:text>
-            <xsl:value-of select="$format"/><xsl:text>; using default.</xsl:text>
-          </xsl:message>
-          <xsl:call-template name="default.autolabel.format"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<doc:template name="autolabel.format" xmlns="">
-<refpurpose>Returns format for autolabel parameters</refpurpose>
-<refdescription id="autolabel.format-desc">
-<para>Returns format passed as parameter if non zero. Supported
-  format are 'arabic' or '1', 'loweralpha' or 'a', 'lowerroman' or 'i', 
-  'upperlapha' or 'A', 'upperroman' or 'I', 'arabicindic' or '&#x661;'.
-  If its not one of these then 
-  returns the default format.</para>
-</refdescription>
-</doc:template>
-
-<!-- ============================================================ -->
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/olink.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/olink.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,1149 +1,0 @@
-<?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version="1.0">
-
-<!-- Create keys for quickly looking up olink targets -->
-<xsl:key name="targetdoc-key" match="document" use="@targetdoc" />
-<xsl:key name="targetptr-key"  match="div|obj"
-         use="concat(ancestor::document/@targetdoc, '/',
-                     @targetptr, '/', ancestor::document/@lang)" />
-
-<!-- Return filename of database -->
-<xsl:template name="select.target.database">
-  <xsl:param name="targetdoc.att" select="''"/>
-  <xsl:param name="targetptr.att" select="''"/>
-  <xsl:param name="olink.lang" select="''"/>
-
-  <!-- use root's xml:base if exists -->
-  <xsl:variable name="xml.base" select="/*/@xml:base"/>
-
-  <!-- This selection can be customized if needed -->
-  <xsl:variable name="target.database.filename">
-    <xsl:choose>
-      <xsl:when test="$xml.base != '' and
-                   not(starts-with($target.database.document, 'file:/')) and
-                   not(starts-with($target.database.document, '/'))">
-        <xsl:call-template name="systemIdToBaseURI">
-          <xsl:with-param name="systemId" select="$xml.base"/>
-        </xsl:call-template>
-        <xsl:value-of select="$target.database.document"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$target.database.document"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="target.database" 
-      select="document($target.database.filename,/)"/>
-
-  <xsl:choose>
-    <!-- Was the database document parameter not set? -->
-    <xsl:when test="$target.database.document = ''">
-      <xsl:message>
-        <xsl:text>Olinks not processed: must specify a </xsl:text>
-        <xsl:text>$target.database.document parameter&#10;</xsl:text>
-        <xsl:text>when using olinks with targetdoc </xsl:text>
-        <xsl:text>and targetptr attributes.</xsl:text>
-      </xsl:message>
-    </xsl:when>
-    <!-- Did it not open? Should be a targetset element -->
-    <xsl:when test="not($target.database/*)">
-      <xsl:message>
-        <xsl:text>Olink error: could not open target database '</xsl:text>
-        <xsl:value-of select="$target.database.filename"/>
-        <xsl:text>'.</xsl:text>
-      </xsl:message>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$target.database.filename"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="select.olink.key">
-  <xsl:param name="targetdoc.att" select="''"/>
-  <xsl:param name="targetptr.att" select="''"/>
-  <xsl:param name="olink.lang" select="''"/>
-  <xsl:param name="target.database"/>
-
-  <xsl:if test="$target.database/*">
-    <xsl:variable name="olink.fallback.sequence">
-      <xsl:call-template name="select.olink.lang.fallback">
-        <xsl:with-param name="olink.lang" select="$olink.lang"/>
-      </xsl:call-template>
-    </xsl:variable>
-  
-    <!-- Recurse through the languages until you find a match -->
-    <xsl:call-template name="select.olink.key.in.lang">
-      <xsl:with-param name="targetdoc.att" select="$targetdoc.att"/>
-      <xsl:with-param name="targetptr.att" select="$targetptr.att"/>
-      <xsl:with-param name="olink.lang" select="$olink.lang"/>
-      <xsl:with-param name="target.database" select="$target.database"/>
-      <xsl:with-param name="fallback.index" select="1"/>
-      <xsl:with-param name="olink.fallback.sequence"
-                      select="$olink.fallback.sequence"/>
-    </xsl:call-template>
-  </xsl:if>
-  
-</xsl:template>
-
-<!-- Locate olink key in a particular language -->
-<xsl:template name="select.olink.key.in.lang">
-  <xsl:param name="targetdoc.att" select="''"/>
-  <xsl:param name="targetptr.att" select="''"/>
-  <xsl:param name="olink.lang" select="''"/>
-  <xsl:param name="target.database"/>
-  <xsl:param name="fallback.index" select="1"/>
-  <xsl:param name="olink.fallback.sequence" select="''"/>
-  
-  <xsl:variable name="target.lang">
-    <xsl:call-template name="select.target.lang">
-      <xsl:with-param name="fallback.index" select="$fallback.index"/>
-      <xsl:with-param name="olink.fallback.sequence"
-                      select="$olink.fallback.sequence"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:if test="$olink.debug != 0">
-    <xsl:message><xsl:text>Olink debug: cases for targetdoc='</xsl:text>
-      <xsl:value-of select="$targetdoc.att"/>
-      <xsl:text>' and targetptr='</xsl:text>
-      <xsl:value-of select="$targetptr.att"/>
-      <xsl:text>' in language '</xsl:text>
-      <xsl:value-of select="$target.lang"/>
-      <xsl:text>'.</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <!-- Customize these cases if you want different selection logic -->
-  <xsl:variable name="CaseA">
-    <!-- targetdoc.att = not blank
-         targetptr.att = not blank
-    -->
-    <xsl:if test="$targetdoc.att != '' and
-                  $targetptr.att != ''">
-      <xsl:for-each select="$target.database">
-        <xsl:variable name="key" 
-                      select="concat($targetdoc.att, '/', 
-                                     $targetptr.att, '/',
-                                     $target.lang)"/>
-        <xsl:choose>
-          <xsl:when test="key('targetptr-key', $key)/@href != ''">
-            <xsl:value-of select="$key"/>
-            <xsl:if test="$olink.debug != 0">
-              <xsl:message>Olink debug: CaseA matched.</xsl:message>
-            </xsl:if>
-          </xsl:when>
-          <xsl:when test="$olink.debug != 0">
-            <xsl:message>Olink debug: CaseA NOT matched</xsl:message>
-          </xsl:when>
-        </xsl:choose>
-      </xsl:for-each>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="CaseB">
-    <!-- targetdoc.att = not blank
-         targetptr.att = not blank
-         prefer.internal.olink = not zero
-         current.docid = not blank 
-    -->
-    <xsl:if test="$targetdoc.att != '' and
-                  $targetptr.att != '' and
-                  $current.docid != '' and
-                  $prefer.internal.olink != 0">
-      <xsl:for-each select="$target.database">
-        <xsl:variable name="key" 
-                      select="concat($current.docid, '/', 
-                                     $targetptr.att, '/',
-                                     $target.lang)"/>
-        <xsl:choose>
-          <xsl:when test="key('targetptr-key', $key)/@href != ''">
-            <xsl:value-of select="$key"/>
-            <xsl:if test="$olink.debug != 0">
-              <xsl:message>Olink debug: CaseB matched.</xsl:message>
-            </xsl:if>
-          </xsl:when>
-          <xsl:when test="$olink.debug != 0">
-            <xsl:message>Olink debug: CaseB NOT matched</xsl:message>
-          </xsl:when>
-        </xsl:choose>
-      </xsl:for-each>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="CaseC">
-    <!-- targetdoc.att = blank
-         targetptr.att = not blank
-         current.docid = not blank 
-    -->
-    <xsl:if test="string-length($targetdoc.att) = 0 and
-                  $targetptr.att != '' and
-                  $current.docid != ''">
-      <!-- Must use a for-each to change context for keys to work -->
-      <xsl:for-each select="$target.database">
-        <xsl:variable name="key" 
-                      select="concat($current.docid, '/', 
-                                     $targetptr.att, '/',
-                                     $target.lang)"/>
-        <xsl:choose>
-          <xsl:when test="key('targetptr-key', $key)/@href != ''">
-            <xsl:value-of select="$key"/>
-            <xsl:if test="$olink.debug != 0">
-              <xsl:message>Olink debug: CaseC matched.</xsl:message>
-            </xsl:if>
-          </xsl:when>
-          <xsl:when test="$olink.debug != 0">
-            <xsl:message>Olink debug: CaseC NOT matched.</xsl:message>
-          </xsl:when>
-        </xsl:choose>
-      </xsl:for-each>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="CaseD">
-    <!-- targetdoc.att = blank
-         targetptr.att = not blank
-         current.docid = blank 
-    -->
-    <!-- This is possible if only one document in the database -->
-    <xsl:if test="string-length($targetdoc.att) = 0 and
-                  $targetptr.att != '' and
-                  string-length($current.docid) = 0 and
-                  count($target.database//document) = 1">
-      <xsl:for-each select="$target.database">
-        <xsl:variable name="key" 
-                      select="concat(.//document/@targetdoc, '/', 
-                                     $targetptr.att, '/',
-                                     $target.lang)"/>
-        <xsl:choose>
-          <xsl:when test="key('targetptr-key', $key)/@href != ''">
-            <xsl:value-of select="$key"/>
-            <xsl:if test="$olink.debug != 0">
-              <xsl:message>Olink debug: CaseD matched.</xsl:message>
-            </xsl:if>
-          </xsl:when>
-          <xsl:when test="$olink.debug != 0">
-            <xsl:message>Olink debug: CaseD NOT matched</xsl:message>
-          </xsl:when>
-        </xsl:choose>
-      </xsl:for-each>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="CaseE">
-    <!-- targetdoc.att = not blank
-         targetptr.att = blank
-    -->
-    <xsl:if test="$targetdoc.att != '' and
-                  string-length($targetptr.att) = 0">
-
-      <!-- Try the document's root element id -->
-      <xsl:variable name="rootid">
-        <xsl:choose>
-          <xsl:when test="$target.lang != ''">
-            <xsl:value-of select="$target.database//document[@targetdoc = $targetdoc.att and @lang = $target.lang]/*[1]/@targetptr"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="$target.database//document[@targetdoc = $targetdoc.att and not(@lang)]/*[1]/@targetptr"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:variable>
-
-      <xsl:for-each select="$target.database">
-        <xsl:variable name="key" 
-                      select="concat($targetdoc.att, '/', 
-                                     $rootid, '/',
-                                     $target.lang)"/>
-        <xsl:choose>
-          <xsl:when test="key('targetptr-key', $key)/@href != ''">
-            <xsl:value-of select="$key"/>
-            <xsl:if test="$olink.debug != 0">
-              <xsl:message>Olink debug: CaseE matched.</xsl:message>
-            </xsl:if>
-          </xsl:when>
-          <xsl:when test="$olink.debug != 0">
-            <xsl:message>Olink debug: CaseE NOT matched.</xsl:message>
-          </xsl:when>
-        </xsl:choose>
-      </xsl:for-each>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="CaseF">
-    <!-- targetdoc.att = not blank
-         targetptr.att = blank
-         prefer.internal.olink = not zero
-         current.docid = not blank 
-    -->
-    <xsl:if test="$targetdoc.att != '' and
-                  string-length($targetptr.att) = 0 and
-                  $current.docid != '' and
-                  $prefer.internal.olink != 0">
-      <!-- Try the document's root element id -->
-      <xsl:variable name="rootid">
-        <xsl:choose>
-          <xsl:when test="$target.lang != ''">
-            <xsl:value-of select="$target.database//document[@targetdoc = $current.docid and @lang = $target.lang]/*[1]/@targetptr"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="$target.database//document[@targetdoc = $current.docid and not(@lang)]/*[1]/@targetptr"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:variable>
-
-      <xsl:for-each select="$target.database">
-        <xsl:variable name="key" 
-                      select="concat($current.docid, '/', 
-                                     $rootid, '/',
-                                     $target.lang)"/>
-        <xsl:choose>
-          <xsl:when test="key('targetptr-key', $key)/@href != ''">
-            <xsl:value-of select="$key"/>
-            <xsl:if test="$olink.debug != 0">
-              <xsl:message>Olink debug: CaseF matched.</xsl:message>
-            </xsl:if>
-          </xsl:when>
-          <xsl:when test="$olink.debug != 0">
-            <xsl:message>Olink debug: CaseF NOT matched.</xsl:message>
-          </xsl:when>
-        </xsl:choose>
-      </xsl:for-each>
-    </xsl:if>
-  </xsl:variable>
-
-  <!-- Now select the best match. Customize the order if needed -->
-  <xsl:variable name="selected.key">
-    <xsl:choose>
-      <xsl:when test="$CaseB != ''">
-        <xsl:value-of select="$CaseB"/>
-        <xsl:if test="$olink.debug != 0">
-          <xsl:message>
-            <xsl:text>Olink debug: CaseB key is the final selection: </xsl:text>
-            <xsl:value-of select="$CaseB"/>
-          </xsl:message>
-        </xsl:if>
-      </xsl:when>
-      <xsl:when test="$CaseA != ''">
-        <xsl:value-of select="$CaseA"/>
-        <xsl:if test="$olink.debug != 0">
-          <xsl:message>
-            <xsl:text>Olink debug: CaseA key is the final selection: </xsl:text>
-            <xsl:value-of select="$CaseA"/>
-          </xsl:message>
-        </xsl:if>
-      </xsl:when>
-      <xsl:when test="$CaseC != ''">
-        <xsl:value-of select="$CaseC"/>
-        <xsl:if test="$olink.debug != 0">
-          <xsl:message>
-            <xsl:text>Olink debug: CaseC key is the final selection: </xsl:text>
-            <xsl:value-of select="$CaseC"/>
-          </xsl:message>
-        </xsl:if>
-      </xsl:when>
-      <xsl:when test="$CaseD != ''">
-        <xsl:value-of select="$CaseD"/>
-        <xsl:if test="$olink.debug != 0">
-          <xsl:message>
-            <xsl:text>Olink debug: CaseD key is the final selection: </xsl:text>
-            <xsl:value-of select="$CaseD"/>
-          </xsl:message>
-        </xsl:if>
-      </xsl:when>
-      <xsl:when test="$CaseF != ''">
-        <xsl:value-of select="$CaseF"/>
-        <xsl:if test="$olink.debug != 0">
-          <xsl:message>
-            <xsl:text>Olink debug: CaseF key is the final selection: </xsl:text>
-            <xsl:value-of select="$CaseF"/>
-          </xsl:message>
-        </xsl:if>
-      </xsl:when>
-      <xsl:when test="$CaseE != ''">
-        <xsl:value-of select="$CaseE"/>
-        <xsl:if test="$olink.debug != 0">
-          <xsl:message>
-            <xsl:text>Olink debug: CaseE key is the final selection: </xsl:text>
-            <xsl:value-of select="$CaseE"/>
-          </xsl:message>
-        </xsl:if>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:if test="$olink.debug != 0">
-          <xsl:message>
-            <xsl:text>Olink debug: No case matched for lang '</xsl:text>
-            <xsl:value-of select="$target.lang"/>
-            <xsl:text>'.</xsl:text>
-          </xsl:message>
-        </xsl:if>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$selected.key != ''">
-      <xsl:value-of select="$selected.key"/>
-    </xsl:when>
-    <xsl:when test="string-length($selected.key) = 0 and 
-                    string-length($target.lang) = 0">
-      <!-- No match on last try, and we are done -->
-    </xsl:when>
-    <xsl:otherwise>
-      <!-- Recurse through next language -->
-      <xsl:call-template name="select.olink.key.in.lang">
-        <xsl:with-param name="targetdoc.att" select="$targetdoc.att"/>
-        <xsl:with-param name="targetptr.att" select="$targetptr.att"/>
-        <xsl:with-param name="olink.lang" select="$olink.lang"/>
-        <xsl:with-param name="target.database" select="$target.database"/>
-        <xsl:with-param name="fallback.index" select="$fallback.index + 1"/>
-        <xsl:with-param name="olink.fallback.sequence"
-                        select="$olink.fallback.sequence"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-
-</xsl:template>
-
-<xsl:template name="select.target.lang">
-  <xsl:param name="fallback.index" select="1"/>
-  <xsl:param name="olink.fallback.sequence" select="''"/>
-
-  <!-- recurse backwards to find the lang matching the index -->
-  <xsl:variable name="firstlang" 
-                select="substring-before($olink.fallback.sequence, ' ')"/>
-  <xsl:variable name="rest" 
-                select="substring-after($olink.fallback.sequence, ' ')"/>
-  <xsl:choose>
-    <xsl:when test="$fallback.index = 1">
-      <xsl:value-of select="$firstlang"/>
-    </xsl:when>
-    <xsl:when test="$fallback.index &gt; 1">
-      <xsl:call-template name="select.target.lang">
-        <xsl:with-param name="fallback.index" select="$fallback.index - 1"/>
-        <xsl:with-param name="olink.fallback.sequence"
-                        select="$rest"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="select.olink.lang.fallback">
-  <xsl:param name="olink.lang" select="''"/>
-
-  <!-- Prefer language of the olink element -->
-  <xsl:value-of select="concat(normalize-space(concat($olink.lang, ' ', 
-                        $olink.lang.fallback.sequence)), ' ')"/>
-</xsl:template>
-
-<!-- Returns the complete olink href value if found -->
-<xsl:template name="make.olink.href">
-  <xsl:param name="olink.key" select="''"/>
-  <xsl:param name="target.database"/>
-
-  <xsl:if test="$olink.key != ''">
-    <xsl:variable name="target.href" >
-      <xsl:for-each select="$target.database" >
-        <xsl:value-of select="key('targetptr-key', $olink.key)/@href" />
-      </xsl:for-each>
-    </xsl:variable>
-  
-    <xsl:variable name="targetdoc">
-      <xsl:value-of select="substring-before($olink.key, '/')"/>
-    </xsl:variable>
-  
-    <!-- Does the target database use a sitemap? -->
-    <xsl:variable name="use.sitemap">
-      <xsl:choose>
-        <xsl:when test="$target.database//sitemap">1</xsl:when>
-        <xsl:otherwise>0</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-  
-  
-    <!-- Get the baseuri for this targetptr -->
-    <xsl:variable name="baseuri" >
-      <xsl:choose>
-        <!-- Does the database use a sitemap? -->
-        <xsl:when test="$use.sitemap != 0" >
-          <xsl:choose>
-            <!-- Was current.docid parameter set? -->
-            <xsl:when test="$current.docid != ''">
-              <!-- Was it found in the database? -->
-              <xsl:variable name="currentdoc.key" >
-                <xsl:for-each select="$target.database" >
-                  <xsl:value-of select="key('targetdoc-key',
-                                        $current.docid)/@targetdoc" />
-                </xsl:for-each>
-              </xsl:variable>
-              <xsl:choose>
-                <xsl:when test="$currentdoc.key != ''">
-                  <xsl:for-each select="$target.database" >
-                    <xsl:call-template name="targetpath" >
-                      <xsl:with-param name="dirnode" 
-                          select="key('targetdoc-key', $current.docid)/parent::dir"/>
-                      <xsl:with-param name="targetdoc" select="$targetdoc"/>
-                    </xsl:call-template>
-                  </xsl:for-each >
-                </xsl:when>
-                <xsl:otherwise>
-                  <xsl:message>
-                    <xsl:text>Olink error: cannot compute relative </xsl:text>
-                    <xsl:text>sitemap path because $current.docid '</xsl:text>
-                    <xsl:value-of select="$current.docid"/>
-                    <xsl:text>' not found in target database.</xsl:text>
-                  </xsl:message>
-                </xsl:otherwise>
-              </xsl:choose>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:message>
-                <xsl:text>Olink warning: cannot compute relative </xsl:text>
-                <xsl:text>sitemap path without $current.docid parameter</xsl:text>
-              </xsl:message>
-            </xsl:otherwise>
-          </xsl:choose> 
-          <!-- In either case, add baseuri from its document entry-->
-          <xsl:variable name="docbaseuri">
-            <xsl:for-each select="$target.database" >
-              <xsl:value-of select="key('targetdoc-key', $targetdoc)/@baseuri" />
-            </xsl:for-each>
-          </xsl:variable>
-          <xsl:if test="$docbaseuri != ''" >
-            <xsl:value-of select="$docbaseuri"/>
-          </xsl:if>
-        </xsl:when>
-        <!-- No database sitemap in use -->
-        <xsl:otherwise>
-          <!-- Just use any baseuri from its document entry -->
-          <xsl:variable name="docbaseuri">
-            <xsl:for-each select="$target.database" >
-              <xsl:value-of select="key('targetdoc-key', $targetdoc)/@baseuri" />
-            </xsl:for-each>
-          </xsl:variable>
-          <xsl:if test="$docbaseuri != ''" >
-            <xsl:value-of select="$docbaseuri"/>
-          </xsl:if>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-  
-    <!-- Form the href information -->
-    <xsl:if test="$baseuri != ''">
-      <xsl:value-of select="$baseuri"/>
-      <xsl:if test="substring($target.href,1,1) != '#'">
-        <!--xsl:text>/</xsl:text-->
-      </xsl:if>
-    </xsl:if>
-    <!-- optionally turn off frag for PDF references -->
-    <xsl:if test="not($insert.olink.pdf.frag = 0 and
-          translate(substring($baseuri, string-length($baseuri) - 3),
-                    'PDF', 'pdf') = '.pdf'
-          and starts-with($target.href, '#') )">
-      <xsl:value-of select="$target.href"/>
-    </xsl:if>
-  </xsl:if>
-</xsl:template>
-
-<!-- Computes the href of the object containing the olink element -->
-<xsl:template name="olink.from.uri">
-  <xsl:param name="target.database"/>
-  <xsl:param name="object" select="NotAnElement"/>
-  <xsl:param name="object.targetdoc" select="$current.docid"/>
-  <xsl:param name="object.lang" 
-           select="concat($object/ancestor::*[last()]/@lang,
-                          $object/ancestor::*[last()]/@xml:lang)"/>
-
-  <xsl:variable name="parent.id">
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="$object"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <!-- Get the olink key for the parent of olink element -->
-  <xsl:variable name="from.key">
-    <xsl:call-template name="select.olink.key">
-      <xsl:with-param name="targetdoc.att" select="$object.targetdoc"/>
-      <xsl:with-param name="targetptr.att" select="$parent.id"/>
-      <xsl:with-param name="olink.lang" select="$object.lang"/>
-      <xsl:with-param name="target.database" select="$target.database"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="from.olink.href">
-    <xsl:for-each select="$target.database" >
-      <xsl:value-of select="key('targetptr-key', $from.key)/@href" />
-    </xsl:for-each>
-  </xsl:variable>
-
-  <xsl:choose>
-    <!-- we found the olink object -->
-    <xsl:when test="$from.olink.href != ''">
-      <xsl:value-of select="$from.olink.href"/>
-    </xsl:when>
-    <xsl:when test="not($object/parent::*)">
-      <xsl:value-of select="$from.olink.href"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <!-- recurse upward in current document -->
-      <xsl:call-template name="olink.from.uri">
-        <xsl:with-param name="target.database" select="$target.database"/>
-        <xsl:with-param name="object" select="$object/parent::*"/>
-        <xsl:with-param name="object.targetdoc" select="$object.targetdoc"/>
-        <xsl:with-param name="object.lang" select="$object.lang"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-
-</xsl:template>
-
-<xsl:template name="olink.hottext">
-  <xsl:param name="target.database"/>
-  <xsl:param name="olink.lang" select="''"/>
-  <xsl:param name="olink.key" select="''"/>
-  <xsl:param name="referrer" select="."/>
-  <xsl:param name="xrefstyle">
-    <xsl:choose>
-      <xsl:when test="@role and not(@xrefstyle) 
-                      and $use.role.as.xrefstyle != 0">
-        <xsl:value-of select="@role"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="@xrefstyle"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:param>
-
-  <xsl:choose>
-    <!-- If it has elements or text (not just PI or comment) -->
-    <xsl:when test="child::text() or child::*">
-      <xsl:apply-templates/>
-    </xsl:when>
-    <xsl:when test="$olink.key != ''">
-      <!-- Get the xref text for this record -->
-      <xsl:variable name="xref.text" >
-        <xsl:for-each select="$target.database" >
-          <xsl:copy-of 
-                  select="key('targetptr-key', $olink.key)/xreftext/node()" />
-        </xsl:for-each>
-      </xsl:variable>
-
-      <xsl:variable name="xref.number" >
-        <xsl:for-each select="$target.database" >
-          <xsl:value-of select="key('targetptr-key', $olink.key)/@number" />
-        </xsl:for-each>
-      </xsl:variable>
-
-      <xsl:variable name="target.elem" >
-        <xsl:for-each select="$target.database" >
-          <xsl:value-of select="key('targetptr-key', $olink.key)/@element" />
-        </xsl:for-each>
-      </xsl:variable>
-
-      <xsl:variable name="lang">
-        <xsl:variable name="candidate">
-          <xsl:for-each select="$target.database" >
-            <xsl:value-of 
-                      select="key('targetptr-key', $olink.key)/@lang" />
-          </xsl:for-each>
-        </xsl:variable>
-        <xsl:choose>
-          <xsl:when test="$candidate != ''">
-            <xsl:value-of select="$candidate"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="$olink.lang"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:variable>
-
-      <xsl:variable name="targetdoc">
-        <xsl:value-of select="substring-before($olink.key, '/')"/>
-      </xsl:variable>
-
-      <xsl:choose>
-        <xsl:when test="$xrefstyle != '' and
-                        starts-with(normalize-space($xrefstyle), 'select:') and
-                        (contains($xrefstyle, 'nodocname') or
-                        contains($xrefstyle, 'nopage')) and
-                        not(contains($xrefstyle, 'title')) and
-                        not(contains($xrefstyle, 'label'))"> 
-          <xsl:copy-of select="$xref.text"/>
-        </xsl:when>
-        <xsl:when test="$xrefstyle != ''">
-          <xsl:if test="$olink.debug != 0">
-            <xsl:message>
-              <xsl:text>xrefstyle is '</xsl:text>
-              <xsl:value-of select="$xrefstyle"/>
-              <xsl:text>'.</xsl:text>
-            </xsl:message>
-          </xsl:if>
-          <xsl:variable name="template">
-            <xsl:choose>
-              <xsl:when test="starts-with(normalize-space($xrefstyle),
-                                          'select:')">
-                <xsl:call-template name="make.gentext.template">
-                  <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-                  <xsl:with-param name="purpose" select="'olink'"/>
-                  <xsl:with-param name="referrer" select="."/>
-                  <xsl:with-param name="target.elem" select="$target.elem"/>
-                </xsl:call-template>
-              </xsl:when>
-              <xsl:when test="starts-with(normalize-space($xrefstyle),
-                                          'template:')">
-                <xsl:value-of select="substring-after(
-                                 normalize-space($xrefstyle), 'template:')"/>
-              </xsl:when>
-              <xsl:otherwise>
-                <!-- Look for Gentext template with @style attribute -->
-                <!-- Must compare to no style value because gentext.template
-                     falls back to no style -->
-
-                <xsl:variable name="xref-context">
-                  <xsl:call-template name="gentext.template">
-                    <xsl:with-param name="context" select="'xref'"/>
-                    <xsl:with-param name="name" select="$target.elem"/>
-                    <xsl:with-param name="lang" select="$lang"/>
-                  </xsl:call-template>
-                </xsl:variable>
-
-                <xsl:variable name="styled-xref-context">
-                  <xsl:call-template name="gentext.template">
-                    <xsl:with-param name="context" select="'xref'"/>
-                    <xsl:with-param name="name" select="$target.elem"/>
-                    <xsl:with-param name="lang" select="$lang"/>
-                    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-                  </xsl:call-template>
-                </xsl:variable>
-
-                <xsl:variable name="xref-number-context">
-                  <xsl:call-template name="gentext.template">
-                    <xsl:with-param name="context" select="'xref-number'"/>
-                    <xsl:with-param name="name" select="$target.elem"/>
-                    <xsl:with-param name="lang" select="$lang"/>
-                  </xsl:call-template>
-                </xsl:variable>
-
-                <xsl:variable name="styled-xref-number-context">
-                  <xsl:call-template name="gentext.template">
-                    <xsl:with-param name="context" select="'xref-number'"/>
-                    <xsl:with-param name="name" select="$target.elem"/>
-                    <xsl:with-param name="lang" select="$lang"/>
-                    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-                  </xsl:call-template>
-                </xsl:variable>
-
-                <xsl:variable name="xref-number-and-title-context">
-                  <xsl:call-template name="gentext.template">
-                    <xsl:with-param name="context" 
-                                    select="'xref-number-and-title'"/>
-                    <xsl:with-param name="name" select="$target.elem"/>
-                    <xsl:with-param name="lang" select="$lang"/>
-                  </xsl:call-template>
-                </xsl:variable>
-
-                <xsl:variable name="styled-xref-number-and-title-context">
-                  <xsl:call-template name="gentext.template">
-                    <xsl:with-param name="context" 
-                                    select="'xref-number-and-title'"/>
-                    <xsl:with-param name="name" select="$target.elem"/>
-                    <xsl:with-param name="lang" select="$lang"/>
-                    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-                  </xsl:call-template>
-                </xsl:variable>
-
-                <xsl:choose>
-                  <xsl:when test="$xref-number-and-title-context != 
-                                 $styled-xref-number-and-title-context and
-                                 $xref.number != '' and
-                                 $xref.with.number.and.title != 0">
-                    <xsl:value-of 
-                            select="$styled-xref-number-and-title-context"/>
-                  </xsl:when>
-                  <xsl:when test="$xref-number-context != 
-                                 $styled-xref-number-context and
-                                 $xref.number != ''">
-                    <xsl:value-of select="$styled-xref-number-context"/>
-                  </xsl:when>
-                  <xsl:when test="$xref-context != $styled-xref-context">
-                    <xsl:value-of select="$styled-xref-context"/>
-                  </xsl:when>
-                  <xsl:when test="$xref-number-and-title-context != '' and
-                                 $xref.number != '' and
-                                 $xref.with.number.and.title != 0">
-                    <xsl:value-of 
-                            select="$xref-number-and-title-context"/>
-                    <xsl:if test="$olink.debug">
-                      <xsl:message>
-                        <xsl:text>Olink error: no gentext template</xsl:text>
-                        <xsl:text> exists for xrefstyle '</xsl:text>
-                        <xsl:value-of select="$xrefstyle"/>
-                        <xsl:text>' for element '</xsl:text>
-                        <xsl:value-of select="$target.elem"/>
-                        <xsl:text>' in language '</xsl:text>
-                        <xsl:value-of select="$lang"/>
-                        <xsl:text>' in context 'xref-number-and-title</xsl:text>
-                        <xsl:text>'. Using template without @style.</xsl:text>
-                      </xsl:message>
-                    </xsl:if>
-                  </xsl:when>
-                  <xsl:when test="$xref-number-context != '' and
-                                 $xref.number != ''">
-                    <xsl:value-of select="$xref-number-context"/>
-                    <xsl:if test="$olink.debug">
-                      <xsl:message>
-                        <xsl:text>Olink error: no gentext template</xsl:text>
-                        <xsl:text> exists for xrefstyle '</xsl:text>
-                        <xsl:value-of select="$xrefstyle"/>
-                        <xsl:text>' for element '</xsl:text>
-                        <xsl:value-of select="$target.elem"/>
-                        <xsl:text>' in language '</xsl:text>
-                        <xsl:value-of select="$lang"/>
-                        <xsl:text>' in context 'xref-number</xsl:text>
-                        <xsl:text>'. Using template without @style.</xsl:text>
-                      </xsl:message>
-                    </xsl:if>
-                  </xsl:when>
-                  <xsl:when test="$xref-context != ''">
-                    <xsl:value-of select="$xref-context"/>
-                    <xsl:if test="$olink.debug">
-                      <xsl:message>
-                        <xsl:text>Olink error: no gentext template</xsl:text>
-                        <xsl:text> exists for xrefstyle '</xsl:text>
-                        <xsl:value-of select="$xrefstyle"/>
-                        <xsl:text>' for element '</xsl:text>
-                        <xsl:value-of select="$target.elem"/>
-                        <xsl:text>' in language '</xsl:text>
-                        <xsl:value-of select="$lang"/>
-                        <xsl:text>' in context 'xref</xsl:text>
-                        <xsl:text>'. Using template without @style.</xsl:text>
-                      </xsl:message>
-                    </xsl:if>
-                  </xsl:when>
-                  <xsl:otherwise>
-                    <xsl:message>
-                      <xsl:text>Olink error: no gentext template</xsl:text>
-                      <xsl:text> exists for xrefstyle '</xsl:text>
-                      <xsl:value-of select="$xrefstyle"/>
-                      <xsl:text>' for element '</xsl:text>
-                      <xsl:value-of select="$target.elem"/>
-                      <xsl:text>' in language '</xsl:text>
-                      <xsl:value-of select="$lang"/>
-                      <xsl:text>'. Trying '%t'.</xsl:text>
-                    </xsl:message>
-                    <xsl:value-of select="'%t'"/>
-                  </xsl:otherwise>
-                </xsl:choose>
-              </xsl:otherwise>
-            </xsl:choose>
-          </xsl:variable>
-
-          <xsl:if test="$olink.debug != 0">
-            <xsl:message>
-              <xsl:text>Olink debug: xrefstyle template is '</xsl:text>
-              <xsl:value-of select="$template"/>
-              <xsl:text>'.</xsl:text>
-            </xsl:message>
-          </xsl:if>
-
-          <xsl:call-template name="substitute-markup">
-            <xsl:with-param name="template" select="$template"/>
-            <xsl:with-param name="title">
-              <xsl:for-each select="$target.database" >
-                <xsl:value-of select="key('targetptr-key', $olink.key)/ttl" />
-              </xsl:for-each>
-            </xsl:with-param>
-            <xsl:with-param name="label">
-              <xsl:for-each select="$target.database" >
-                <xsl:value-of 
-                        select="key('targetptr-key', $olink.key)/@number" />
-              </xsl:for-each>
-            </xsl:with-param>
-            <xsl:with-param name="pagenumber">
-              <xsl:for-each select="$target.database" >
-                <xsl:value-of 
-                        select="key('targetptr-key', $olink.key)/@page" />
-              </xsl:for-each>
-            </xsl:with-param>
-            <xsl:with-param name="docname">
-              <xsl:for-each select="$target.database" >
-                <xsl:value-of 
-                       select="key('targetdoc-key', $targetdoc)/div[1]/ttl" />
-              </xsl:for-each>
-            </xsl:with-param>
-          </xsl:call-template>
-        </xsl:when>
-
-        <xsl:when test="$use.local.olink.style != 0">
-
-          <xsl:variable name="template">
-            <xsl:call-template name="gentext.template">
-              <xsl:with-param name="context" select="'xref'"/>
-              <xsl:with-param name="name" select="$target.elem"/>
-              <xsl:with-param name="lang" select="$lang"/>
-            </xsl:call-template>
-          </xsl:variable>
-
-          <xsl:call-template name="substitute-markup">
-            <xsl:with-param name="template" select="$template"/>
-            <xsl:with-param name="title">
-              <xsl:for-each select="$target.database" >
-                <xsl:value-of select="key('targetptr-key', $olink.key)/ttl" />
-              </xsl:for-each>
-            </xsl:with-param>
-            <xsl:with-param name="label">
-              <xsl:for-each select="$target.database" >
-                <xsl:value-of 
-                          select="key('targetptr-key', $olink.key)/@number" />
-              </xsl:for-each>
-            </xsl:with-param>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:when test="$xref.text !=''">
-          <xsl:copy-of select="$xref.text"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:message>
-            <xsl:text>Olink error: no generated text for </xsl:text>
-            <xsl:text>targetdoc/targetptr/lang = '</xsl:text>
-            <xsl:value-of select="$olink.key"/>
-            <xsl:text>'.</xsl:text>
-          </xsl:message>
-          <xsl:text>????</xsl:text>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:when test="@targetdoc != '' or @targetptr != ''">
-      <xsl:if test="$olink.key != ''">
-        <xsl:message>
-          <xsl:text>Olink error: no generated text for </xsl:text>
-          <xsl:text>targetdoc/targetptr/lang = '</xsl:text>
-          <xsl:value-of select="$olink.key"/>
-          <xsl:text>'.</xsl:text>
-        </xsl:message>
-      </xsl:if>
-      <xsl:text>????</xsl:text>
-    </xsl:when>
-    <xsl:otherwise>
-      <!-- old style olink -->
-      <xsl:call-template name="olink.outline">
-        <xsl:with-param name="outline.base.uri"
-                        select="unparsed-entity-uri(@targetdocent)"/>
-        <xsl:with-param name="localinfo" select="@localinfo"/>
-        <xsl:with-param name="return" select="'xreftext'"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="*" mode="olink.docname.markup">
-  <!-- No-op for now -->
-</xsl:template>
-
-<xsl:template name="targetpath">
-  <xsl:param name="dirnode" />
-  <xsl:param name="targetdoc" select="''"/>
-
-<!-- 
-<xsl:message>dirnode is <xsl:value-of select="$dirnode/@name"/></xsl:message>
-<xsl:message>targetdoc is <xsl:value-of select="$targetdoc"/></xsl:message>
--->
-  <!-- recursive template generates path to olink target directory -->
-  <xsl:choose>
-    <!-- Have we arrived at the final path step? -->
-    <xsl:when test="$dirnode/child::document[@targetdoc = $targetdoc]">
-      <!-- We are done -->
-    </xsl:when>
-    <!-- Have we reached the top without a match? -->
-    <xsl:when test="local-name($dirnode) != 'dir'" >
-        <xsl:message>Olink error: cannot locate targetdoc <xsl:value-of select="$targetdoc"/> in sitemap</xsl:message>
-    </xsl:when>
-    <!-- Is the target in a descendant? -->
-    <xsl:when test="$dirnode/descendant::document/@targetdoc = $targetdoc">
-      <xsl:variable name="step" select="$dirnode/child::dir[descendant::document/@targetdoc = $targetdoc]"/>
-      <xsl:if test = "$step">
-        <xsl:value-of select="$step/@name"/>
-        <xsl:text>/</xsl:text>
-      </xsl:if>
-      <!-- Now recurse with the child -->
-      <xsl:call-template name="targetpath" >
-        <xsl:with-param name="dirnode" select="$step"/>
-        <xsl:with-param name="targetdoc" select="$targetdoc"/>
-      </xsl:call-template>
-    </xsl:when>
-    <!-- Otherwise we need to move up a step -->
-    <xsl:otherwise>
-      <xsl:if test="$dirnode/parent::dir">
-        <xsl:text>../</xsl:text>
-      </xsl:if>
-      <xsl:call-template name="targetpath" >
-        <xsl:with-param name="dirnode" select="$dirnode/parent::*"/>
-        <xsl:with-param name="targetdoc" select="$targetdoc"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="olink.page.citation">
-  <xsl:param name="olink.key" select="''"/>
-  <xsl:param name="olink.lang" select="'en'"/>
-  <xsl:param name="target.database"/>
-  <xsl:param name="linkend" select="''"/>
-  <xsl:param name="xrefstyle">
-    <xsl:choose>
-      <xsl:when test="@role and not(@xrefstyle) 
-                      and $use.role.as.xrefstyle != 0">
-        <xsl:value-of select="@role"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="@xrefstyle"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:param>
-
-  <xsl:variable name="targetdoc">
-    <xsl:value-of select="substring-before($olink.key, '/')"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$linkend != ''">
-      <xsl:call-template name="xref.page.citation">
-        <xsl:with-param name="linkend" select="$linkend"/>
-        <xsl:with-param name="target" select="key('id', $linkend)"/>
-        <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="not(starts-with(normalize-space($xrefstyle),
-                        'select:') 
-                and (contains($xrefstyle, 'page')
-                     or contains($xrefstyle, 'Page')))
-                and $current.docid != '' 
-                and $current.docid != $targetdoc
-                and $insert.olink.page.number = 'yes' ">
-  
-      <xsl:variable name="page-number">
-        <xsl:for-each select="$target.database" >
-          <xsl:value-of 
-                 select="key('targetptr-key', $olink.key)/@page" />
-        </xsl:for-each>
-      </xsl:variable>
-  
-      <xsl:if test="$page-number != ''">
-        <xsl:call-template name="substitute-markup">
-          <xsl:with-param name="template">
-            <xsl:call-template name="gentext.template">
-              <xsl:with-param name="name" select="'olink.page.citation'"/>
-              <xsl:with-param name="context" select="'xref'"/>
-              <xsl:with-param name="lang" select="$olink.lang"/>
-            </xsl:call-template>
-          </xsl:with-param>
-          <xsl:with-param name="pagenumber" select="$page-number"/>
-        </xsl:call-template>
-      </xsl:if>
-  
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="olink.document.citation">
-  <xsl:param name="olink.key" select="''"/>
-  <xsl:param name="olink.lang" select="'en'"/>
-  <xsl:param name="target.database"/>
-  <xsl:param name="xrefstyle">
-    <xsl:choose>
-      <xsl:when test="@role and not(@xrefstyle) 
-                      and $use.role.as.xrefstyle != 0">
-        <xsl:value-of select="@role"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="@xrefstyle"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:param>
-
-  <xsl:variable name="page">
-    <xsl:for-each select="$target.database" >
-      <xsl:value-of 
-             select="key('targetptr-key', $olink.key)/@page" />
-    </xsl:for-each>
-  </xsl:variable>
-
-  <xsl:variable name="targetdoc">
-    <xsl:value-of select="substring-before($olink.key, '/')"/>
-  </xsl:variable>
-
-  <xsl:variable name="targetptr">
-    <xsl:value-of 
-          select="substring-before(substring-after($olink.key, '/'), '/')"/>
-  </xsl:variable>
-
-  <!-- Don't add docname if pointing to root element -->
-  <xsl:variable name="rootptr">
-    <xsl:for-each select="$target.database" >
-      <xsl:value-of 
-             select="key('targetdoc-key', $targetdoc)/div[1]/@targetptr" />
-    </xsl:for-each>
-  </xsl:variable>
-
-  <xsl:variable name="docname">
-    <xsl:for-each select="$target.database" >
-      <xsl:value-of 
-             select="key('targetdoc-key', $targetdoc)/div[1]/ttl" />
-    </xsl:for-each>
-  </xsl:variable>
-
-  <xsl:if test="not(starts-with(normalize-space($xrefstyle), 'select:') 
-              and (contains($xrefstyle, 'docname')))
-              and ($olink.doctitle = 'yes' or $olink.doctitle = '1')
-              and $current.docid != '' 
-              and $rootptr != $targetptr
-              and $current.docid != $targetdoc
-              and $docname != ''">
-    <xsl:call-template name="substitute-markup">
-      <xsl:with-param name="template">
-        <xsl:call-template name="gentext.template">
-          <xsl:with-param name="name" select="'olink.document.citation'"/>
-          <xsl:with-param name="context" select="'xref'"/>
-          <xsl:with-param name="lang" select="$olink.lang"/>
-        </xsl:call-template>
-      </xsl:with-param>
-      <xsl:with-param name="docname" select="$docname"/>
-      <xsl:with-param name="pagenumber" select="$page"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="xref.page.citation">
-  <!-- Determine if this xref should have a page citation.
-       Context node is the xref or local olink element -->
-  <xsl:param name="linkend" select="@linkend"/>
-  <xsl:param name="target" select="key('id', $linkend)"/>
-  <xsl:param name="xrefstyle">
-    <xsl:choose>
-      <xsl:when test="@role and not(@xrefstyle) 
-                      and $use.role.as.xrefstyle != 0">
-        <xsl:value-of select="@role"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="@xrefstyle"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:param>
-
-  <xsl:if test="not(starts-with(normalize-space($xrefstyle),'select:')
-                    and (contains($xrefstyle, 'page')
-                         or contains($xrefstyle, 'Page')))
-                and ( $insert.xref.page.number = 'yes' 
-                   or $insert.xref.page.number = '1')
-                or local-name($target) = 'para'">
-    <xsl:apply-templates select="$target" mode="page.citation">
-      <xsl:with-param name="id" select="$linkend"/>
-    </xsl:apply-templates>
-  </xsl:if>
-</xsl:template>
-
-</xsl:stylesheet>
-
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/pi.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/pi.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,346 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
-  xmlns:date="http://exslt.org/dates-and-times"
-  xmlns:exsl="http://exslt.org/common"
-  xmlns:xlink="http://www.w3.org/1999/xlink"
-  exclude-result-prefixes="doc date exsl"
-  extension-element-prefixes="date exsl"
-  version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<doc:reference xmlns=""><info><title>Common Processing Instruction Reference</title>
-    <releaseinfo role="meta">
-      $Id$
-    </releaseinfo>
-  </info>
-  <partintro id="partintro">
-    <title>Introduction</title>
-    <para>This is generated reference documentation for all
-      user-specifiable processing instructions (PIs) in the
-      âcommonâ part of the DocBook XSL stylesheets.
-      <note>
-        <para>You add these PIs at particular points in a document to
-          cause specific âexceptionsâ to formatting/output behavior. To
-          make global changes in formatting/output behavior across an
-          entire document, itâs better to do it by setting an
-          appropriate stylesheet parameter (if there is one).</para>
-      </note>
-    </para>
-  </partintro>
-</doc:reference>
-
-<!-- ==================================================================== -->
-<doc:pi name="dbchoice_choice" xmlns="">
-  <refpurpose>Generates a localized choice separator</refpurpose>
-  <refdescription id="select.choice.separator-desc">
-    <para>Use the <tag class="xmlpi">dbchoice choice</tag> PI to
-      generate an appropriate localized âchoiceâ separator (for
-      example, <literal>and</literal> or <literal>or</literal>)
-      before the final item in an inline <tag>simplelist</tag></para>
-    <warning>
-      <para>This PI is a less-than-ideal hack; support for it may
-        disappear in the future (particularly if and when a more
-        appropriate means for marking up "choice" lists becomes
-        available in DocBook).</para>
-    </warning>
-  </refdescription>
-  <refsynopsisdiv>
-    <synopsis><tag class="xmlpi">dbchoice choice="and"|"or"|<replaceable>string</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter>
-    <variablelist>
-      <varlistentry><term>choice="and"</term>
-        <listitem>
-          <para>generates a localized <literal>and</literal> separator</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry><term>choice="or"</term>
-        <listitem>
-          <para>generates a localized <literal>or</literal> separator</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry><term>choice="<replaceable>string</replaceable>"</term>
-        <listitem>
-          <para>generates a literal <replaceable>string</replaceable> separator</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-</doc:pi>
-<xsl:template name="pi.dbchoice_choice">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="pi-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbchoice')"/>
-    <xsl:with-param name="attribute">choice</xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi name="dbtimestamp" xmlns="">
-  <refpurpose>Inserts a date timestamp</refpurpose>
-  <refdescription>
-    <para>Use the <tag class="xmlpi">dbtimestamp</tag> PI at any point in a
-      source document to cause a date timestamp (a formatted
-      string representing the current date and time) to be
-      inserted in output of the document.</para>
-  </refdescription>
-  <refsynopsisdiv>
-    <synopsis><tag class="xmlpi">dbtimestamp format="<replaceable>formatstring</replaceable>" [padding="0"|"1"]</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter>
-    <variablelist>
-      <varlistentry><term>format="<replaceable>formatstring</replaceable>"</term>
-        <listitem>
-          <para>Specifies format in which the date and time are
-            output</para>
-        <note>
-          <para>For details of the content of the format string,
-            see <link role="tcg" xlink:href="Datetime.html"
-              >Date and time</link>.</para>
-        </note>
-        </listitem>
-      </varlistentry>
-      <varlistentry><term>padding="0"|"1"</term>
-        <listitem>
-          <para>Specifies padding behavior; if non-zero, padding is is added</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-</doc:pi>
-<xsl:template name="pi.dbtimestamp">
-  <xsl:variable name="format">
-    <xsl:variable name="pi-format">
-      <xsl:call-template name="pi-attribute">
-        <xsl:with-param name="pis" select="."/>
-        <xsl:with-param name="attribute">format</xsl:with-param>
-      </xsl:call-template>
-    </xsl:variable>
-    <xsl:choose>
-      <xsl:when test="$pi-format != ''">
-        <xsl:value-of select="$pi-format"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="gentext.template">
-          <xsl:with-param name="context" select="'datetime'"/>
-          <xsl:with-param name="name" select="'format'"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable> 
-  <xsl:variable name="padding">
-    <xsl:variable name="pi-padding">
-      <xsl:call-template name="pi-attribute">
-        <xsl:with-param name="pis" select="."/>
-        <xsl:with-param name="attribute">padding</xsl:with-param>
-      </xsl:call-template>
-    </xsl:variable>
-    <xsl:choose>
-      <xsl:when test="$pi-padding != ''">
-        <xsl:value-of select="$pi-padding"/>
-      </xsl:when>
-      <xsl:otherwise>1</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-  <xsl:variable name="date">
-    <xsl:choose>
-      <xsl:when test="function-available('date:date-time')">
-        <xsl:value-of select="date:date-time()"/>
-      </xsl:when>
-      <xsl:when test="function-available('date:dateTime')">
-        <!-- Xalan quirk -->
-        <xsl:value-of select="date:dateTime()"/>
-      </xsl:when>
-    </xsl:choose>
-  </xsl:variable>
-  <xsl:choose>
-    <xsl:when test="function-available('date:date-time') or
-      function-available('date:dateTime')">
-      <xsl:call-template name="datetime.format">
-        <xsl:with-param name="date" select="$date"/>
-        <xsl:with-param name="format" select="$format"/>
-        <xsl:with-param name="padding" select="$padding"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:message>
-        Timestamp processing requires XSLT processor with EXSLT date support.
-      </xsl:message>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<doc:pi name="dbtex_delims" xmlns="">
-  <refpurpose>Generates delimiters around embedded TeX equations
-    in output</refpurpose>
-  <refdescription>
-    <para>Use the <tag class="xmlpi">dbtex delims</tag> PI as a
-      child of a <tag>textobject</tag> containing embedded TeX
-      markup, to cause that markup to be surrounded by
-      <literal>$</literal> delimiter characters in output.</para>
-  </refdescription>
-  <refsynopsisdiv>
-    <synopsis><tag class="xmlpi">dbtex delims="no"|"yes"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter>
-    <variablelist>
-      <varlistentry><term>dbtex delims="no"|"yes"</term>
-        <listitem>
-          <para>Specifies whether delimiters are output</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee role="params">
-    <para><parameter>tex.math.delims</parameter></para>
-  </refsee>
-  <refsee role="tcg">
-    <para><link role="tcg"
-        xlink:href="TexMath.html"
-        >DBTeXMath</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbtex_delims">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="pi-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbtex')"/>
-    <xsl:with-param name="attribute" select="'delims'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="processing-instruction()" mode="titlepage.mode">
-  <!-- * Als process PIs on title pages -->
-  <xsl:apply-templates select="."/>
-</xsl:template>
-
-<xsl:template match="processing-instruction('dbtimestamp')">
-  <xsl:call-template name="pi.dbtimestamp"/>
-</xsl:template>
-
-<xsl:template name="datetime.format">
-  <xsl:param name="date"/>
-  <xsl:param name="format"/>
-  <xsl:param name="padding" select="1"/>
-  <xsl:if test="$format != ''">
-    <!-- replace any whitespace in the format string with a non-breaking space -->
-    <xsl:variable name="format-nbsp"
-      select="translate($format,
-      '&#x20;&#x9;&#xd;&#xa;',
-      '&#xa0;&#xa0;&#xa0;&#xa0;')"/>
-    <xsl:variable name="tokenized-format-string">
-      <xsl:call-template name="str.tokenize.keep.delimiters">
-        <xsl:with-param name="string" select="$format-nbsp"/>
-        <xsl:with-param name="delimiters" select="'&#xa0;,./-()[]:'"/>
-      </xsl:call-template>
-    </xsl:variable>
-    <xsl:choose>
-      <!-- include extra test for Xalan quirk -->
-      <xsl:when test="function-available('exsl:node-set') or 
-        contains(system-property('xsl:vendor'),'Apache Software Foundation')">
-        <!-- We must preserve context node in order to get valid language -->
-        <xsl:variable name="context" select="."/>
-        <xsl:for-each select="exsl:node-set($tokenized-format-string)/node()">
-          <xsl:variable name="token">
-            <xsl:value-of select="."/>
-          </xsl:variable>
-          <!-- Restore context node -->
-          <xsl:for-each select="$context">
-            <xsl:choose>
-              <xsl:when test="$token = 'a'">
-                <xsl:call-template name="gentext.template">
-                  <xsl:with-param name="context" select="'datetime-abbrev'"/>
-                  <xsl:with-param name="name" select="date:day-abbreviation($date)"/>
-                </xsl:call-template>
-              </xsl:when>
-              <xsl:when test="$token = 'A'">
-                <xsl:call-template name="gentext.template">
-                  <xsl:with-param name="context" select="'datetime-full'"/>
-                  <xsl:with-param name="name" select="date:day-name($date)"/>
-                </xsl:call-template>
-              </xsl:when>
-              <xsl:when test="$token = 'b'">
-                <xsl:call-template name="gentext.template">
-                  <xsl:with-param name="context" select="'datetime-abbrev'"/>
-                  <xsl:with-param name="name" select="date:month-abbreviation($date)"/>
-                </xsl:call-template>
-              </xsl:when>
-              <xsl:when test="$token = 'c'">
-                <xsl:value-of select="date:date($date)"/>
-                <xsl:text> </xsl:text>
-                <xsl:value-of select="date:time($date)"/>
-              </xsl:when>
-              <xsl:when test="$token = 'B'">
-                <xsl:call-template name="gentext.template">
-                  <xsl:with-param name="context" select="'datetime-full'"/>
-                  <xsl:with-param name="name" select="date:month-name($date)"/>
-                </xsl:call-template>
-              </xsl:when>
-              <xsl:when test="$token = 'd'">
-                <xsl:if test="$padding = 1 and
-                  string-length(date:day-in-month($date)) = 1">0</xsl:if>
-                <xsl:value-of select="date:day-in-month($date)"/>
-              </xsl:when>
-              <xsl:when test="$token = 'H'">
-                <xsl:if test="$padding = 1 and string-length(date:hour-in-day($date)) = 1">0</xsl:if>
-                <xsl:value-of select="date:hour-in-day($date)"/>
-              </xsl:when>
-              <xsl:when test="$token = 'j'">
-                <xsl:value-of select="date:day-in-year($date)"/>
-              </xsl:when>
-              <xsl:when test="$token = 'm'">
-                <xsl:if test="$padding = 1 and string-length(date:month-in-year($date)) = 1">0</xsl:if>
-                <xsl:value-of select="date:month-in-year($date)"/>
-              </xsl:when>
-              <xsl:when test="$token = 'M'">
-                <xsl:if test="string-length(date:minute-in-hour($date)) = 1">0</xsl:if>
-                <xsl:value-of select="date:minute-in-hour($date)"/>
-              </xsl:when>
-              <xsl:when test="$token = 'S'">
-                <xsl:if test="string-length(date:second-in-minute($date)) = 1">0</xsl:if>
-                <xsl:value-of select="date:second-in-minute($date)"/>
-              </xsl:when>
-              <xsl:when test="$token = 'U'">
-                <xsl:value-of select="date:week-in-year($date)"/>
-              </xsl:when>
-              <xsl:when test="$token = 'w'">
-                <xsl:value-of select="date:day-in-week($date)"/>
-              </xsl:when>
-              <xsl:when test="$token = 'x'">
-                <xsl:value-of select="date:date($date)"/>
-              </xsl:when>
-              <xsl:when test="$token = 'X'">
-                <xsl:value-of select="date:time($date)"/>
-              </xsl:when>
-              <xsl:when test="$token = 'Y'">
-                <xsl:value-of select="date:year($date)"/>
-              </xsl:when>
-              <xsl:otherwise>
-                <xsl:value-of select="$token"/>
-              </xsl:otherwise>
-            </xsl:choose>
-          </xsl:for-each>
-        </xsl:for-each>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:message>
-          Timestamp processing requires an XSLT processor with support
-          for the EXSLT node-set() function.
-        </xsl:message>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:if>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/refentry.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/refentry.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,1277 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
-                xmlns:date="http://exslt.org/dates-and-times"
-                exclude-result-prefixes="doc date"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-<doc:reference xmlns="" xml:id="refentry">
-  <info>
-    <title>Common Â» Refentry Metadata Template Reference</title>
-    <releaseinfo role="meta">
-      $Id$
-    </releaseinfo>
-  </info>
-  <!-- * yes, partintro is a valid child of a reference... -->
-  <partintro xml:id="partintro">
-    <title>Introduction</title>
-    <para>This is technical reference documentation for the ârefentry
-    metadataâ templates in the DocBook XSL Stylesheets.</para>
-    <para>This is not intended to be user documentation. It is provided
-    for developers writing customization layers for the stylesheets.</para>
-    <note>
-      <para>Currently, only the manpages stylesheets make use of these
-      templates. They are, however, potentially useful elsewhere.</para>
-    </note>
-  </partintro>
-</doc:reference>
-
-<!-- ==================================================================== -->
-<doc:template name="get.refentry.metadata" xmlns="">
-  <refpurpose>Gathers metadata from a refentry and its ancestors</refpurpose>
-  <refdescription id="get.refentry.metadata-desc">
-    <para>Reference documentation for particular commands, functions,
-    etc., is sometimes viewed in isolation from its greater "context". For
-    example, users view Unix man pages as, well, individual pages, not as
-    part of a "book" of some kind. Therefore, it is sometimes necessary to
-    embed "context" information in output for each <tag>refentry</tag>.</para>
-
-    <para>However, one problem is that different users mark up that
-    context information in different ways. Often (usually), the
-    context information is not actually part of the content of the
-    <tag>refentry</tag> itself, but instead part of the content of a
-    parent or ancestor element to the the <tag>refentry</tag>. And
-    even then, DocBook provides a variety of elements that users might
-    potentially use to mark up the same kind of information. One user
-    might use the <tag>productnumber</tag> element to mark up version
-    information about a particular product, while another might use
-    the <tag>releaseinfo</tag> element.</para>
-
-    <para>Taking all that in mind, the
-    <function>get.refentry.metadata</function> template tries to gather
-    metadata from a <tag>refentry</tag> element and its ancestor
-    elements in an intelligent and user-configurable way. The basic
-    mechanism used in the XPath expressions throughout this stylesheet
-    is to select the relevant metadata from the *info element that is
-    closest to the actual <tag>refentry</tag>&#160;â either on the
-    <tag>refentry</tag> itself, or on its nearest ancestor.</para>
-
-    <note>
-      <para>The <function>get.refentry.metadata</function>
-        template is actually just sort of a "driver" template; it
-        calls other templates that do the actual data collection,
-        then returns the data as a set.</para>
-    </note>
-
-  </refdescription>
-  <refparameter id="get.refentry.metadata-params">
-    <variablelist>
-      <varlistentry>
-        <term>refname</term>
-        <listitem>
-          <para>The first <tag>refname</tag> in the refentry</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term>info</term>
-        <listitem>
-          <para>A set of info nodes (from a <tag>refentry</tag>
-          element and its ancestors)</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term>prefs</term>
-        <listitem>
-          <para>A node containing user preferences (from global
-          stylesheet parameters)</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refreturn id="get.refentry.metadata-returns">
-    <para>Returns a node set with the following elements. The
-    descriptions are verbatim from the <literal>man(7)</literal> man
-    page.
-    <variablelist>
-      <varlistentry>
-        <term>title</term>
-        <listitem>
-          <para>the title of the man page (e.g., <literal>MAN</literal>)</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term>section</term>
-        <listitem>
-          <para>the section number the man page should be placed in (e.g.,
-          <literal>7</literal>)</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term>date</term>
-        <listitem>
-          <para>the date of the last revision</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term>source</term>
-        <listitem>
-          <para>the source of the command</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term>manual</term>
-        <listitem>
-          <para>the title of the manual (e.g., <citetitle>Linux
-          Programmer's Manual</citetitle>)</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-    </para>
-  </refreturn>
-</doc:template>
-<xsl:template name="get.refentry.metadata">
-  <xsl:param name="refname"/>
-  <xsl:param name="info"/>
-  <xsl:param name="prefs"/>
-  <title>
-    <xsl:call-template name="get.refentry.title">
-      <xsl:with-param name="refname" select="$refname"/>
-    </xsl:call-template>
-  </title>
-  <section>
-    <xsl:call-template name="get.refentry.section">
-      <xsl:with-param name="refname" select="$refname"/>
-    </xsl:call-template>
-  </section>
-  <date>
-    <xsl:call-template name="get.refentry.date">
-      <xsl:with-param name="info" select="$info"/>
-      <xsl:with-param name="refname" select="$refname"/>
-      <xsl:with-param name="prefs" select="$prefs/DatePrefs"/>
-    </xsl:call-template>
-  </date>
-  <source>
-    <xsl:call-template name="get.refentry.source">
-      <xsl:with-param name="info" select="$info"/>
-      <xsl:with-param name="refname" select="$refname"/>
-      <xsl:with-param name="prefs" select="$prefs/SourcePrefs"/>
-    </xsl:call-template>
-  </source>
-  <manual>
-    <xsl:call-template name="get.refentry.manual">
-      <xsl:with-param name="info" select="$info"/>
-      <xsl:with-param name="refname" select="$refname"/>
-      <xsl:with-param name="prefs" select="$prefs/ManualPrefs"/>
-    </xsl:call-template>
-  </manual>
-</xsl:template>
-
-<!-- ====================================================================== -->
-<doc:template name="get.refentry.title" xmlns="">
-  <refpurpose>Gets title metadata for a refentry</refpurpose>
-  <refdescription id="get.refentry.title-desc">
-    <para>The <literal>man(7)</literal> man page describes this as "the
-    title of the man page (e.g., <literal>MAN</literal>). This differs
-    from <tag>refname</tag> in that, if the <tag>refentry</tag> has a
-    <tag>refentrytitle</tag>, we use that as the <tag>title</tag>;
-    otherwise, we just use first <tag>refname</tag> in the first
-    <tag>refnamediv</tag> in the source.</para>
-  </refdescription>
-  <refparameter id="get.refentry.title-params">
-    <variablelist>
-      <varlistentry>
-        <term>refname</term>
-        <listitem>
-          <para>The first <tag>refname</tag> in the refentry</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refreturn id="get.refentry.title-returns">
-  <para>Returns a <tag>title</tag> node.</para></refreturn>
-</doc:template>
-<xsl:template name="get.refentry.title">
-  <xsl:param name="refname"/>
-  <xsl:choose>
-    <xsl:when test="refmeta/refentrytitle">
-      <xsl:copy>
-        <xsl:apply-templates select="refmeta/refentrytitle/node()"/>
-      </xsl:copy>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy-of select="$refname"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-<doc:template name="get.refentry.section" xmlns="">
-  <refpurpose>Gets section metadata for a refentry</refpurpose>
-  <refdescription id="get.refentry.section-desc">
-    <para>The <literal>man(7)</literal> man page describes this as "the
-    section number the man page should be placed in (e.g.,
-    <literal>7</literal>)". If we do not find a <tag>manvolnum</tag>
-    specified in the source, and we find that the <tag>refentry</tag> is
-    for a function, we use the section number <literal>3</literal>
-    ["Library calls (functions within program libraries)"]; otherwise, we
-    default to using <literal>1</literal> ["Executable programs or shell
-    commands"].</para>
-  </refdescription>
-  <refparameter id="get.refentry.section-params">
-    <variablelist>
-      <varlistentry>
-        <term>refname</term>
-        <listitem>
-          <para>The first <tag>refname</tag> in the refentry</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term>quiet</term>
-        <listitem>
-          <para>If non-zero, no "missing" message is emitted</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refreturn id="get.refentry.section-returns">
-  <para>Returns a string representing a section number.</para></refreturn>
-</doc:template>
-<xsl:template name="get.refentry.section">
-  <xsl:param name="refname"/>
-  <xsl:param name="quiet" select="0"/>
-  <xsl:choose>
-    <xsl:when test="refmeta/manvolnum">
-      <xsl:value-of select="refmeta/manvolnum"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:if test="$quiet = 0">
-        <xsl:if test="$refentry.meta.get.quietly = 0">
-          <xsl:call-template name="log.message">
-            <xsl:with-param name="level">Note</xsl:with-param>
-            <xsl:with-param name="source" select="$refname"/>
-            <xsl:with-param name="context-desc">meta manvol</xsl:with-param>
-            <xsl:with-param name="message">
-              <xsl:text>no refentry/refmeta/manvolnum</xsl:text>
-            </xsl:with-param>
-          </xsl:call-template>
-          <xsl:call-template name="log.message">
-            <xsl:with-param name="level">Note</xsl:with-param>
-            <xsl:with-param name="source" select="$refname"/>
-            <xsl:with-param name="context-desc">meta manvol</xsl:with-param>
-            <xsl:with-param name="message">
-              <xsl:text>see http://docbook.sf.net/el/manvolnum</xsl:text>
-            </xsl:with-param>
-          </xsl:call-template>
-        </xsl:if>
-      </xsl:if>
-      <xsl:choose>
-        <xsl:when test=".//funcsynopsis">
-          <xsl:if test="$quiet = 0">
-            <xsl:if test="$refentry.meta.get.quietly = 0">
-              <xsl:call-template name="log.message">
-                <xsl:with-param name="level">Note</xsl:with-param>
-                <xsl:with-param name="source" select="$refname"/>
-                <xsl:with-param name="context-desc">meta manvol</xsl:with-param>
-                <xsl:with-param name="message">
-                  <xsl:text>Setting man section to 3</xsl:text>
-                </xsl:with-param>
-              </xsl:call-template>
-            </xsl:if>
-          </xsl:if>
-          <xsl:text>3</xsl:text>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:text>1</xsl:text>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-<doc:template name="get.refentry.date" xmlns="">
-  <refpurpose>Gets date metadata for a refentry</refpurpose>
-  <refdescription id="get.refentry.date-desc">
-    <para>The <literal>man(7)</literal> man page describes this as "the
-    date of the last revision". If we cannot find a date in the source, we
-    generate one.</para>
-  </refdescription>
-  <refparameter id="get.refentry.date-params">
-    <variablelist>
-      <varlistentry>
-        <term>refname</term>
-        <listitem>
-          <para>The first <tag>refname</tag> in the refentry</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term>info</term>
-        <listitem>
-          <para>A set of info nodes (from a <tag>refentry</tag>
-          element and its ancestors)</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term>prefs</term>
-        <listitem>
-          <para>A node containing users preferences (from global stylesheet parameters)</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refreturn id="get.refentry.date-returns">
-    <para>Returns a <tag>date</tag> node.</para>
-  </refreturn>
-</doc:template>
-<xsl:template name="get.refentry.date">
-  <xsl:param name="refname"/>
-  <xsl:param name="info"/>
-  <xsl:param name="prefs"/>
-  <xsl:variable name="Date">
-    <xsl:choose>
-      <!-- * if profiling is enabled for date, and the date -->
-      <!-- * profile is non-empty, use it -->
-      <xsl:when test="not($prefs/@profileEnabled = 0) and
-                      not($prefs/@profile = '')">
-        <xsl:call-template name="evaluate.info.profile">
-          <xsl:with-param name="profile" select="$prefs/@profile"/>
-          <xsl:with-param name="info" select="$info"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <!-- * either profiling is not enabled for date, or the-->
-        <!-- * date profile is empty, so we need to look for date -->
-        <!-- * in *info -->
-        <xsl:choose>
-          <!-- * look for date or pubdate in *info -->
-          <xsl:when test="$info/date/node()
-                          |$info/pubdate/node()">
-            <xsl:apply-templates
-                select="(($info[date])[last()]/date)[1]|
-                        (($info[pubdate])[last()]/pubdate)[1]"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <!-- * found no Date or Pubdate -->
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-  <xsl:choose>
-    <xsl:when test="not($Date = '')">
-      <xsl:value-of select="$Date"/>
-    </xsl:when>
-    <!-- * We couldn't find a date, so we generate a date. -->
-    <!-- * And we make it an appropriately localized date. -->
-    <xsl:otherwise>
-      <xsl:if test="$refentry.meta.get.quietly = 0">
-        <xsl:call-template name="log.message">
-          <xsl:with-param name="level">Note</xsl:with-param>
-          <xsl:with-param name="source" select="$refname"/>
-          <xsl:with-param name="context-desc">meta date</xsl:with-param>
-          <xsl:with-param name="message">
-            <xsl:text>no date; using generated date</xsl:text>
-          </xsl:with-param>
-        </xsl:call-template>
-        <xsl:call-template name="log.message">
-          <xsl:with-param name="level">Note</xsl:with-param>
-          <xsl:with-param name="source" select="$refname"/>
-          <xsl:with-param name="context-desc">meta date</xsl:with-param>
-          <xsl:with-param name="message">
-            <xsl:text>see http://docbook.sf.net/el/date</xsl:text>
-          </xsl:with-param>
-        </xsl:call-template>
-      </xsl:if>
-      <xsl:call-template name="datetime.format">
-        <xsl:with-param name="date">
-          <xsl:choose>
-            <xsl:when test="function-available('date:date-time')">
-              <xsl:value-of select="date:date-time()"/>
-            </xsl:when>
-            <xsl:when test="function-available('date:dateTime')">
-              <!-- Xalan quirk -->
-              <xsl:value-of select="date:dateTime()"/>
-            </xsl:when>
-          </xsl:choose>
-        </xsl:with-param>
-        <xsl:with-param name="format">
-          <xsl:call-template name="gentext.template">
-            <xsl:with-param name="context" select="'datetime'"/>
-            <xsl:with-param name="name" select="'format'"/>
-          </xsl:call-template>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-<doc:template name="get.refentry.source" xmlns="">
-  <refpurpose>Gets source metadata for a refentry</refpurpose>
-  <refdescription id="get.refentry.source-desc">
-    <para>The <literal>man(7)</literal> man page describes this as "the
-    source of the command", and provides the following examples:
-    <itemizedlist>
-      <listitem>
-        <para>For binaries, use something like: GNU, NET-2, SLS
-        Distribution, MCC Distribution.</para>
-      </listitem>
-      <listitem>
-        <para>For system calls, use the version of the kernel that you are
-        currently looking at: Linux 0.99.11.</para>
-      </listitem>
-      <listitem>
-        <para>For library calls, use the source of the function: GNU, BSD
-        4.3, Linux DLL 4.4.1.</para>
-      </listitem>
-    </itemizedlist>
-    </para>
-
-    <para>The <literal>solbook(5)</literal> man page describes
-    something very much like what <literal>man(7)</literal> calls
-    "source", except that <literal>solbook(5)</literal> names it
-    "software" and describes it like this:
-    <blockquote>
-      <para>This is the name of the software product that the topic
-      discussed on the reference page belongs to. For example UNIX
-      commands are part of the <literal>SunOS x.x</literal>
-      release.</para>
-    </blockquote>
-    </para>
-
-    <para>In practice, there are many pages that simply have a version
-    number in the "source" field. So, it looks like what we have is a
-    two-part field,
-    <replaceable>Name</replaceable>&#160;<replaceable>Version</replaceable>,
-    where:
-    <variablelist>
-      <varlistentry>
-        <term>Name</term>
-        <listitem>
-          <para>product name (e.g., BSD) or org. name (e.g., GNU)</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term>Version</term>
-        <listitem>
-          <para>version name</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-    Each part is optional. If the <replaceable>Name</replaceable> is a
-    product name, then the <replaceable>Version</replaceable> is probably
-    the version of the product. Or there may be no
-    <replaceable>Name</replaceable>, in which case, if there is a
-    <replaceable>Version</replaceable>, it is probably the version of the
-    item itself, not the product it is part of. Or, if the
-    <replaceable>Name</replaceable> is an organization name, then there
-    probably will be no <replaceable>Version</replaceable>.
-    </para>
-  </refdescription>
-  <refparameter id="get.refentry.source-params">
-    <variablelist>
-      <varlistentry>
-        <term>refname</term>
-        <listitem>
-          <para>The first <tag>refname</tag> in the refentry</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term>info</term>
-        <listitem>
-          <para>A set of info nodes (from a <tag>refentry</tag>
-          element and its ancestors)</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term>prefs</term>
-        <listitem>
-          <para>A node containing users preferences (from global
-          stylesheet parameters)</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refreturn id="get.refentry.source-returns">
-    <para>Returns a <tag>source</tag> node.</para>
-  </refreturn>
-</doc:template>
-<xsl:template name="get.refentry.source">
-  <xsl:param name="refname"/>
-  <xsl:param name="info"/>
-  <xsl:param name="prefs"/>
-  <xsl:variable name="Name">
-    <xsl:if test="$prefs/Name/@suppress = 0">
-      <xsl:call-template name="get.refentry.source.name">
-        <xsl:with-param name="info" select="$info"/>
-        <xsl:with-param name="refname" select="$refname"/>
-        <xsl:with-param name="prefs" select="$prefs/Name"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:variable>
-  <xsl:variable name="Version">
-    <xsl:if test="$prefs/Version/@suppress = 0">
-      <xsl:call-template name="get.refentry.version">
-        <xsl:with-param name="info" select="$info"/>
-        <xsl:with-param name="refname" select="$refname"/>
-        <xsl:with-param name="prefs" select="$prefs/Version"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:variable>
-  <xsl:choose>
-    <!-- * if we have a Name and/or Version, use either or both -->
-    <!-- * of those, in the form "Name Version" or just "Name" -->
-    <!-- * or just "Version" -->
-    <xsl:when test="not($Name = '') or not($Version = '')">
-      <xsl:choose>
-        <xsl:when test="not($Name = '') and not($Version = '')">
-          <xsl:copy-of select="$Name"/>
-          <xsl:text> </xsl:text>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:copy-of select="$Name"/>
-        </xsl:otherwise>
-      </xsl:choose>
-      <xsl:copy-of select="$Version"/>
-    </xsl:when>
-    <!-- * if no Name and no Version, use fallback (if any) -->
-    <xsl:when test="not($prefs/@fallback = '')">
-      <xsl:variable name="source.fallback">
-        <xsl:call-template name="evaluate.info.profile">
-          <xsl:with-param name="profile" select="$prefs/@fallback"/>
-          <xsl:with-param name="info" select="$info"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:choose>
-        <xsl:when test="not($source.fallback = '')">
-          <xsl:value-of select="$source.fallback"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:if test="$refentry.meta.get.quietly = 0">
-            <xsl:call-template name="log.message">
-              <xsl:with-param name="level">Warn</xsl:with-param>
-              <xsl:with-param name="source" select="$refname"/>
-              <xsl:with-param name="context-desc">meta source</xsl:with-param>
-              <xsl:with-param name="message">
-                <xsl:text>no valid fallback for source; leaving empty</xsl:text>
-              </xsl:with-param>
-            </xsl:call-template>
-          </xsl:if>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:if test="$refentry.meta.get.quietly = 0">
-        <xsl:call-template name="log.message">
-          <xsl:with-param name="level">Warn</xsl:with-param>
-          <xsl:with-param name="source" select="$refname"/>
-          <xsl:with-param name="context-desc">meta source</xsl:with-param>
-          <xsl:with-param name="message">
-            <xsl:text>no source fallback specified; leaving empty</xsl:text>
-          </xsl:with-param>
-        </xsl:call-template>
-      </xsl:if>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-<doc:template name="get.refentry.source.name" xmlns="">
-  <refpurpose>Gets source-name metadata for a refentry</refpurpose>
-  <refdescription id="get.refentry.source.name-desc">
-    <para>A "source name" is one part of a (potentially) two-part
-    <replaceable>Name</replaceable>&#160;<replaceable>Version</replaceable>
-    source field. For more details, see the documentation for the
-    <function>get.refentry.source</function> template.</para>
-  </refdescription>
-  <refparameter id="get.refentry.source.name-params">
-    <variablelist>
-      <varlistentry>
-        <term>refname</term>
-        <listitem>
-          <para>The first <tag>refname</tag> in the refentry</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term>info</term>
-        <listitem>
-          <para>A set of info nodes (from a <tag>refentry</tag>
-          element and its ancestors)</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term>prefs</term>
-        <listitem>
-          <para>A node containing users preferences (from global
-          stylesheet parameters)</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refreturn id="get.refentry.source.name-returns">
-    <para>Depending on what output method is used for the
-  current stylesheet, either returns a text node or possibly an element
-  node, containing "source name" data.</para>
-  </refreturn>
-</doc:template>
-<xsl:template name="get.refentry.source.name">
-  <xsl:param name="refname"/>
-  <xsl:param name="info"/>
-  <xsl:param name="prefs"/>
-  <xsl:choose>
-    <!-- * if profiling is enabled for source.name, and the -->
-    <!-- * source.name profile is non-empty, use it -->
-    <xsl:when test="not($prefs/@profileEnabled = 0) and
-                    not($prefs/@profile = '')">
-      <xsl:call-template name="evaluate.info.profile">
-        <xsl:with-param name="profile" select="$prefs/@profile"/>
-        <xsl:with-param name="info" select="$info"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <!-- * either profiling for source.name is not enabled, or-->
-      <!-- * the source.name profile is empty; so we need to look -->
-      <!-- * for a name to use -->
-      <xsl:choose>
-        <xsl:when test="refmeta/refmiscinfo[@class = 'source' or @class = 'software']">
-          <xsl:apply-templates 
-              select="refmeta/refmiscinfo[@class = 'source' or @class='software'][1]/node()"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:choose>
-            <xsl:when test="$info/productname">
-              <xsl:call-template name="set.refentry.metadata">
-                <xsl:with-param name="refname" select="$refname"/>
-                <xsl:with-param
-                    name="info"
-                    select="($info[productname])[last()]"/>
-                <xsl:with-param
-                    name="contents"
-                    select="(($info[productname])[last()]/productname)[1]"/>
-                <xsl:with-param name="context">source</xsl:with-param>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:when test="$info/corpname">
-              <xsl:call-template name="set.refentry.metadata">
-                <xsl:with-param name="refname" select="$refname"/>
-                <xsl:with-param
-                    name="info"
-                    select="($info[corpname])[last()]"/>
-                <xsl:with-param
-                    name="contents"
-                    select="(($info[corpname])[last()]/corpname)[1]"/>
-                <xsl:with-param name="context">source</xsl:with-param>
-                <xsl:with-param name="preferred">productname</xsl:with-param>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:when test="$info/corpcredit">
-              <xsl:call-template name="set.refentry.metadata">
-                <xsl:with-param name="refname" select="$refname"/>
-                <xsl:with-param
-                    name="info"
-                    select="($info[corpcredit])[last()]"/>
-                <xsl:with-param
-                    name="contents"
-                    select="(($info[corpcredit])[last()]/corpcredit)[1]"/>
-                <xsl:with-param name="context">source</xsl:with-param>
-                <xsl:with-param name="preferred">productname</xsl:with-param>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:when test="$info/corpauthor">
-              <xsl:call-template name="set.refentry.metadata">
-                <xsl:with-param name="refname" select="$refname"/>
-                <xsl:with-param
-                    name="info"
-                    select="($info[corpauthor])[last()]"/>
-                <xsl:with-param
-                    name="contents"
-                    select="(($info[corpauthor])[last()]/corpauthor)[1]"/>
-                <xsl:with-param name="context">source</xsl:with-param>
-                <xsl:with-param name="preferred">productname</xsl:with-param>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:when test="$info//orgname">
-              <xsl:call-template name="set.refentry.metadata">
-                <xsl:with-param name="refname" select="$refname"/>
-                <xsl:with-param
-                    name="info"
-                    select="($info[//orgname])[last()]"/>
-                <xsl:with-param
-                    name="contents"
-                    select="(($info[//orgname])[last()]//orgname)[1]"/>
-                <xsl:with-param name="context">source</xsl:with-param>
-                <xsl:with-param name="preferred">productname</xsl:with-param>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:when test="$info//publishername">
-              <xsl:call-template name="set.refentry.metadata">
-                <xsl:with-param name="refname" select="$refname"/>
-                <xsl:with-param
-                    name="info"
-                    select="($info[//publishername])[last()]"/>
-                <xsl:with-param
-                    name="contents"
-                    select="(($info[//publishername])[last()]//publishername)[1]"/>
-                <xsl:with-param name="context">source</xsl:with-param>
-                <xsl:with-param name="preferred">productname</xsl:with-param>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:if test="$refentry.meta.get.quietly = 0">
-                <xsl:call-template name="log.message">
-                  <xsl:with-param name="level">Note</xsl:with-param>
-                  <xsl:with-param name="source" select="$refname"/>
-                  <xsl:with-param name="context-desc">meta source</xsl:with-param>
-                  <xsl:with-param name="message">
-                    <xsl:text>no *info/productname or alternative</xsl:text>
-                  </xsl:with-param>
-                </xsl:call-template>
-                <xsl:call-template name="log.message">
-                  <xsl:with-param name="level">Note</xsl:with-param>
-                  <xsl:with-param name="source" select="$refname"/>
-                  <xsl:with-param name="context-desc">meta source</xsl:with-param>
-                  <xsl:with-param name="message">
-                    <xsl:text>see http://docbook.sf.net/el/productname</xsl:text>
-                  </xsl:with-param>
-                </xsl:call-template>
-                <xsl:call-template name="log.message">
-                  <xsl:with-param name="level">Note</xsl:with-param>
-                  <xsl:with-param name="source" select="$refname"/>
-                  <xsl:with-param name="context-desc">meta source</xsl:with-param>
-                  <xsl:with-param name="message">
-                    <xsl:text>no refentry/refmeta/refmiscinfo@class=source</xsl:text>
-                  </xsl:with-param>
-                </xsl:call-template>
-                <xsl:call-template name="log.message">
-                  <xsl:with-param name="level">Note</xsl:with-param>
-                  <xsl:with-param name="source" select="$refname"/>
-                  <xsl:with-param name="context-desc">meta source</xsl:with-param>
-                  <xsl:with-param name="message">
-                    <xsl:text>see http://docbook.sf.net/el/refmiscinfo</xsl:text>
-                  </xsl:with-param>
-                </xsl:call-template>
-              </xsl:if>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-<doc:template name="get.refentry.version" xmlns="">
-  <refpurpose>Gets version metadata for a refentry</refpurpose>
-  <refdescription id="get.refentry.version-desc">
-    <para>A "version" is one part of a (potentially) two-part
-    <replaceable>Name</replaceable>&#160;<replaceable>Version</replaceable>
-    source field. For more details, see the documentation for the
-    <function>get.refentry.source</function> template.</para>
-  </refdescription>
-  <refparameter id="get.refentry.version-params">
-    <variablelist>
-      <varlistentry>
-        <term>refname</term>
-        <listitem>
-          <para>The first <tag>refname</tag> in the refentry</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term>info</term>
-        <listitem>
-          <para>A set of info nodes (from a <tag>refentry</tag>
-          element and its ancestors)</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term>prefs</term>
-        <listitem>
-          <para>A node containing users preferences (from global
-          stylesheet parameters)</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refreturn id="get.refentry.version-returns">
-    <para>Depending on what output method is used for the
-  current stylesheet, either returns a text node or possibly an element
-  node, containing "version" data.</para>
-  </refreturn>
-</doc:template>
-<xsl:template name="get.refentry.version">
-  <xsl:param name="refname"/>
-  <xsl:param name="info"/>
-  <xsl:param name="prefs"/>
-  <xsl:choose>
-    <!-- * if profiling is enabled for version, and the -->
-    <!-- * version profile is non-empty, use it -->
-    <xsl:when test="not($prefs/@profileEnabled = 0) and
-                    not($prefs/@profile = '')">
-      <xsl:call-template name="evaluate.info.profile">
-        <xsl:with-param name="profile" select="$prefs/@profile"/>
-        <xsl:with-param name="info" select="$info"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <!-- * either profiling for source.name is not enabled, or-->
-      <!-- * the source.name profile is empty; so we need to look -->
-      <!-- * for a name to use -->
-      <xsl:choose>
-        <xsl:when test="refmeta/refmiscinfo[@class = 'version']">
-          <xsl:apply-templates 
-              select="refmeta/refmiscinfo[@class = 'version'][1]/node()"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:choose>
-            <xsl:when test="$info/productnumber">
-              <xsl:call-template name="set.refentry.metadata">
-                <xsl:with-param name="refname" select="$refname"/>
-                <xsl:with-param
-                    name="info"
-                    select="($info[productnumber])[last()]"/>
-                <xsl:with-param
-                    name="contents"
-                    select="(($info[productnumber])[last()]/productnumber)[1]"/>
-                <xsl:with-param name="context">version</xsl:with-param>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:when test="$info/edition">
-              <xsl:call-template name="set.refentry.metadata">
-                <xsl:with-param name="refname" select="$refname"/>
-                <xsl:with-param
-                    name="info"
-                    select="($info[edition])[last()]"/>
-                <xsl:with-param
-                    name="contents"
-                    select="(($info[edition])[last()]/edition)[1]"/>
-                <xsl:with-param name="context">version</xsl:with-param>
-                <xsl:with-param name="preferred">productnumber</xsl:with-param>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:when test="$info/releaseinfo">
-              <xsl:call-template name="set.refentry.metadata">
-                <xsl:with-param name="refname" select="$refname"/>
-                <xsl:with-param
-                    name="info"
-                    select="($info[releaseinfo])[last()]"/>
-                <xsl:with-param
-                    name="contents"
-                    select="(($info[releaseinfo])[last()]/releaseinfo)[1]"/>
-                <xsl:with-param name="context">version</xsl:with-param>
-                <xsl:with-param name="preferred">productnumber</xsl:with-param>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:if test="$refentry.meta.get.quietly = 0">
-                <xsl:call-template name="log.message">
-                  <xsl:with-param name="level">Note</xsl:with-param>
-                  <xsl:with-param name="source" select="$refname"/>
-                  <xsl:with-param name="context-desc">meta version</xsl:with-param>
-                  <xsl:with-param name="message">
-                    <xsl:text>no *info/productnumber or alternative</xsl:text>
-                  </xsl:with-param>
-                </xsl:call-template>
-                <xsl:call-template name="log.message">
-                  <xsl:with-param name="level">Note</xsl:with-param>
-                  <xsl:with-param name="source" select="$refname"/>
-                  <xsl:with-param name="context-desc">meta version</xsl:with-param>
-                  <xsl:with-param name="message">
-                    <xsl:text>see http://docbook.sf.net/el/productnumber</xsl:text>
-                  </xsl:with-param>
-                </xsl:call-template>
-                <xsl:call-template name="log.message">
-                  <xsl:with-param name="level">Note</xsl:with-param>
-                  <xsl:with-param name="source" select="$refname"/>
-                  <xsl:with-param name="context-desc">meta version</xsl:with-param>
-                  <xsl:with-param name="message">
-                    <xsl:text>no refentry/refmeta/refmiscinfo@class=version</xsl:text>
-                  </xsl:with-param>
-                </xsl:call-template>
-                <xsl:call-template name="log.message">
-                  <xsl:with-param name="level">Note</xsl:with-param>
-                  <xsl:with-param name="source" select="$refname"/>
-                  <xsl:with-param name="context-desc">meta version</xsl:with-param>
-                  <xsl:with-param name="message">
-                    <xsl:text>see http://docbook.sf.net/el/refmiscinfo</xsl:text>
-                  </xsl:with-param>
-                </xsl:call-template>
-              </xsl:if>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-<doc:template name="get.refentry.manual" xmlns="">
-  <refpurpose>Gets source metadata for a refentry</refpurpose>
-  <refdescription id="get.refentry.manual-desc">
-    <para>The <literal>man(7)</literal> man page describes this as "the
-    title of the manual (e.g., <citetitle>Linux Programmer's
-    Manual</citetitle>)". Here are some examples from existing man pages:
-    <itemizedlist>
-      <listitem>
-        <para><citetitle>dpkg utilities</citetitle>
-        (<command>dpkg-name</command>)</para>
-      </listitem>
-      <listitem>
-        <para><citetitle>User Contributed Perl Documentation</citetitle>
-        (<command>GET</command>)</para>
-      </listitem>
-      <listitem>
-        <para><citetitle>GNU Development Tools</citetitle>
-        (<command>ld</command>)</para>
-      </listitem>
-      <listitem>
-        <para><citetitle>Emperor Norton Utilities</citetitle>
-        (<command>ddate</command>)</para>
-      </listitem>
-      <listitem>
-        <para><citetitle>Debian GNU/Linux manual</citetitle>
-        (<command>faked</command>)</para>
-      </listitem>
-      <listitem>
-        <para><citetitle>GIMP Manual Pages</citetitle>
-        (<command>gimp</command>)</para>
-      </listitem>
-      <listitem>
-        <para><citetitle>KDOC Documentation System</citetitle>
-        (<command>qt2kdoc</command>)</para>
-      </listitem>
-    </itemizedlist>
-    </para>
-
-    <para>The <literal>solbook(5)</literal> man page describes
-    something very much like what <literal>man(7)</literal> calls
-    "manual", except that <literal>solbook(5)</literal> names it
-    "sectdesc" and describes it like this:
-    <blockquote>
-      <para>This is the section title of the reference page; for
-      example <literal>User Commands</literal>.</para>
-    </blockquote>
-    </para>
-
-  </refdescription>
-  <refparameter id="get.refentry.manual-params">
-    <variablelist>
-      <varlistentry>
-        <term>refname</term>
-        <listitem>
-          <para>The first <tag>refname</tag> in the refentry</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term>info</term>
-        <listitem>
-          <para>A set of info nodes (from a <tag>refentry</tag>
-          element and its ancestors)</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term>prefs</term>
-        <listitem>
-          <para>A node containing users preferences (from global
-          stylesheet parameters)</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refreturn id="get.refentry.manual-returns">
-    <para>Returns a <tag>manual</tag> node.</para>
-  </refreturn>
-</doc:template>
-<xsl:template name="get.refentry.manual">
-  <xsl:param name="refname"/>
-  <xsl:param name="info"/>
-  <xsl:param name="prefs"/>
-  <xsl:variable name="Manual">
-    <xsl:choose>
-      <!-- * if profiling is enabled for manual, and the manual -->
-      <!-- * profile is non-empty, use it -->
-      <xsl:when test="not($prefs/@profileEnabled = 0) and
-                      not($prefs/@profile = '')">
-        <xsl:call-template name="evaluate.info.profile">
-          <xsl:with-param name="profile" select="$prefs/@profile"/>
-          <xsl:with-param name="info" select="$info"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:choose>
-          <xsl:when test="refmeta/refmiscinfo[@class = 'manual' or @class = 'sectdesc']">
-            <xsl:apply-templates 
-                select="refmeta/refmiscinfo[@class = 'manual' or @class = 'sectdesc'][1]/node()"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <!-- * only in the case of choosing appropriate -->
-            <!-- * "manual" content do we select the furthest -->
-            <!-- * (first) matching element instead of the -->
-            <!-- * closest (last) matching one -->
-            <xsl:choose>
-              <xsl:when test="ancestor::*/title">
-                <xsl:call-template name="set.refentry.metadata">
-                  <xsl:with-param name="refname" select="$refname"/>
-                  <xsl:with-param
-                      name="info"
-                      select="(ancestor::*[title])[1]"/>
-                  <xsl:with-param
-                      name="contents"
-                      select="(ancestor::*[title])[1]/title"/>
-                  <xsl:with-param name="context">manual</xsl:with-param>
-                </xsl:call-template>
-              </xsl:when>
-              <xsl:when test="$info/title">
-                <xsl:call-template name="set.refentry.metadata">
-                  <xsl:with-param name="refname" select="$refname"/>
-                  <xsl:with-param
-                      name="info"
-                      select="($info[title])[1]"/>
-                  <xsl:with-param
-                      name="contents"
-                      select="(($info[title])[1]/title)[1]"/>
-                  <xsl:with-param name="context">manual</xsl:with-param>
-                </xsl:call-template>
-              </xsl:when>
-              <xsl:otherwise>
-                <xsl:if test="$refentry.meta.get.quietly = 0">
-                  <xsl:call-template name="log.message">
-                    <xsl:with-param name="level">Note</xsl:with-param>
-                    <xsl:with-param name="source" select="$refname"/>
-                    <xsl:with-param name="context-desc">meta manual</xsl:with-param>
-                    <xsl:with-param name="message">
-                      <xsl:text>no titled ancestor of refentry</xsl:text>
-                    </xsl:with-param>
-                  </xsl:call-template>
-                  <xsl:call-template name="log.message">
-                    <xsl:with-param name="level">Note</xsl:with-param>
-                    <xsl:with-param name="source" select="$refname"/>
-                    <xsl:with-param name="context-desc">meta manual</xsl:with-param>
-                    <xsl:with-param name="message">
-                      <xsl:text>no refentry/refmeta/refmiscinfo@class=manual</xsl:text>
-                    </xsl:with-param>
-                  </xsl:call-template>
-                  <xsl:call-template name="log.message">
-                    <xsl:with-param name="level">Note</xsl:with-param>
-                    <xsl:with-param name="source" select="$refname"/>
-                    <xsl:with-param name="context-desc">meta manual</xsl:with-param>
-                    <xsl:with-param name="message">
-                      <xsl:text>see http://docbook.sf.net/el/refmiscinfo</xsl:text>
-                    </xsl:with-param>
-                  </xsl:call-template>
-                </xsl:if>
-              </xsl:otherwise>
-            </xsl:choose>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-  <xsl:choose>
-    <xsl:when test="not($Manual = '')">
-      <xsl:copy-of select="$Manual"/>
-    </xsl:when>
-    <!-- * if no Manual, use contents of specified Fallback (if any) -->
-    <xsl:when test="not($prefs/@fallback = '')">
-      <xsl:variable name="manual.fallback">
-        <xsl:call-template name="evaluate.info.profile">
-          <xsl:with-param name="profile" select="$prefs/@fallback"/>
-          <xsl:with-param name="info" select="$info"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:choose>
-        <xsl:when test="not($manual.fallback = '')">
-          <xsl:value-of select="$manual.fallback"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:if test="$refentry.meta.get.quietly = 0">
-            <xsl:call-template name="log.message">
-              <xsl:with-param name="level">Warn</xsl:with-param>
-              <xsl:with-param name="source" select="$refname"/>
-              <xsl:with-param name="context-desc">meta manual</xsl:with-param>
-              <xsl:with-param name="message">
-                <xsl:text>no valid fallback for manual; leaving empty</xsl:text>
-              </xsl:with-param>
-            </xsl:call-template>
-          </xsl:if>
-        </xsl:otherwise>
-      </xsl:choose>
-
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:if test="$refentry.meta.get.quietly = 0">
-        <xsl:call-template name="log.message">
-          <xsl:with-param name="level">Warn</xsl:with-param>
-          <xsl:with-param name="source" select="$refname"/>
-          <xsl:with-param name="context-desc">meta manual</xsl:with-param>
-          <xsl:with-param name="message">
-            <xsl:text>no manual fallback specified; leaving empty</xsl:text>
-          </xsl:with-param>
-        </xsl:call-template>
-      </xsl:if>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ====================================================================== -->
-<doc:template name="get.refentry.metadata.prefs" xmlns="">
-  <refpurpose>Gets user preferences for refentry metadata gathering</refpurpose>
-  <refdescription id="get.refentry.metadata.prefs-desc">
-    <para>The DocBook XSL stylesheets include several user-configurable
-    global stylesheet parameters for controlling <tag>refentry</tag>
-    metadata gathering. Those parameters are not read directly by the
-    other <tag>refentry</tag> metadata-gathering
-    templates. Instead, they are read only by the
-    <function>get.refentry.metadata.prefs</function> template,
-    which assembles them into a structure that is then passed to
-    the other <tag>refentry</tag> metadata-gathering
-    templates.</para>
-
-    <para>So the, <function>get.refentry.metadata.prefs</function>
-    template is the only interface to collecting stylesheet parameters for
-    controlling <tag>refentry</tag> metadata gathering.</para>
-  </refdescription>
-  <refparameter id="get.refentry.metadata.prefs-params">
-    <para>There are no local parameters for this template; however, it
-    does rely on a number of global parameters.</para>
-  </refparameter>
-  <refreturn id="get.refentry.metadata.prefs-returns">
-    <para>Returns a <tag>manual</tag> node.</para>
-  </refreturn>
-</doc:template>
-<xsl:template name="get.refentry.metadata.prefs">
-  <DatePrefs>
-    <xsl:attribute name="profile">
-      <xsl:value-of select="$refentry.date.profile"/>
-    </xsl:attribute>
-    <xsl:attribute name="profileEnabled">
-      <xsl:value-of select="$refentry.date.profile.enabled"/>
-    </xsl:attribute>
-  </DatePrefs>
-  <SourcePrefs>
-    <xsl:attribute name="fallback">
-      <xsl:value-of select="$refentry.source.fallback.profile"/>
-    </xsl:attribute>
-    <Name>
-      <xsl:attribute name="profile">
-        <xsl:value-of select="$refentry.source.name.profile"/>
-      </xsl:attribute>
-      <xsl:attribute name="profileEnabled">
-        <xsl:value-of select="$refentry.source.name.profile.enabled"/>
-      </xsl:attribute>
-      <xsl:attribute name="suppress">
-        <xsl:value-of select="$refentry.source.name.suppress"/>
-      </xsl:attribute>
-    </Name>
-    <Version>
-      <xsl:attribute name="profile">
-        <xsl:value-of select="$refentry.version.profile"/>
-      </xsl:attribute>
-      <xsl:attribute name="profileEnabled">
-        <xsl:value-of select="$refentry.version.profile.enabled"/>
-      </xsl:attribute>
-      <xsl:attribute name="suppress">
-        <xsl:value-of select="$refentry.version.suppress"/>
-      </xsl:attribute>
-    </Version>
-  </SourcePrefs>
-  <ManualPrefs>
-    <xsl:attribute name="fallback">
-      <xsl:value-of select="$refentry.manual.fallback.profile"/>
-    </xsl:attribute>
-    <xsl:attribute name="profile">
-      <xsl:value-of select="$refentry.manual.profile"/>
-    </xsl:attribute>
-    <xsl:attribute name="profileEnabled">
-      <xsl:value-of select="$refentry.manual.profile.enabled"/>
-    </xsl:attribute>
-  </ManualPrefs>
-</xsl:template>
-
-<!-- ====================================================================== -->
-<doc:template name="set.refentry.metadata" xmlns="">
-  <refpurpose>Sets content of a refentry metadata item</refpurpose>
-  <refdescription id="set.refentry.metadata-desc">
-    <para>The <function>set.refentry.metadata</function> template is
-    called each time a suitable source element is found for a certain
-    metadata field.</para>
-  </refdescription>
-  <refparameter id="set.refentry.metadata-params">
-    <variablelist>
-      <varlistentry>
-        <term>refname</term>
-        <listitem>
-          <para>The first <tag>refname</tag> in the refentry</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term>info</term>
-        <listitem>
-          <para>A single *info node that contains the selected source element.</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term>contents</term>
-        <listitem>
-          <para>A node containing the selected source element.</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term>context</term>
-        <listitem>
-          <para>A string describing the metadata context in which the
-          <function>set.refentry.metadata</function> template was
-          called: either "date", "source", "version", or "manual".</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refreturn id="set.refentry.metadata-returns">
-  <para>Returns formatted contents of a selected source element.</para></refreturn>
-</doc:template>
-<xsl:template name="set.refentry.metadata">
-  <xsl:param name="refname"/>
-  <xsl:param name="info"/>
-  <xsl:param name="contents"/>
-  <xsl:param name="context"/>
-  <xsl:param name="preferred"/>
-  <xsl:if test="not($preferred = '')">
-    <xsl:if test="$refentry.meta.get.quietly = 0">
-      <xsl:call-template name="log.message">
-        <xsl:with-param name="level">Note</xsl:with-param>
-        <xsl:with-param name="source" select="$refname"/>
-        <xsl:with-param name="context-desc" select="concat('meta ', $context)"/>
-        <xsl:with-param name="message" select="concat('No ', $preferred)"/>
-      </xsl:call-template>
-      <xsl:call-template name="log.message">
-        <xsl:with-param name="level">Note</xsl:with-param>
-        <xsl:with-param name="source" select="$refname"/>
-        <xsl:with-param name="context-desc" select="concat('meta ', $context)"/>
-        <xsl:with-param name="message">
-          <xsl:text>no refentry/refmeta/refmiscinfo@class=</xsl:text>
-          <xsl:value-of select="$context"/>
-        </xsl:with-param>
-      </xsl:call-template>
-      <xsl:call-template name="log.message">
-        <xsl:with-param name="level">Note</xsl:with-param>
-        <xsl:with-param name="source" select="$refname"/>
-        <xsl:with-param name="context-desc" select="concat('meta ', $context)"/>
-        <xsl:with-param name="message" select="concat('Using ', local-name($contents))"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:if>
-  <xsl:value-of select="$contents"/>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/stripns.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/stripns.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,342 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:ng="http://docbook.org/docbook-ng"
-                xmlns:db="http://docbook.org/ns/docbook"
-                xmlns:saxon="http://icl.com/saxon"
-                xmlns:NodeInfo="http://org.apache.xalan.lib.NodeInfo"
-                xmlns:exsl="http://exslt.org/common"
-                exclude-result-prefixes="db ng exsl saxon NodeInfo"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- put an xml:base attribute on the root element -->
-<xsl:template match="/*" mode="stripNS">
-  <xsl:choose>
-    <xsl:when test="self::ng:* or self::db:*">
-      <xsl:element name="{local-name(.)}">
-        <xsl:copy-of select="@*[not(name(.) = 'xml:id')
-                                and not(name(.) = 'version')]"/>
-        <xsl:if test="@xml:id">
-          <xsl:attribute name="id">
-            <xsl:value-of select="@xml:id"/>
-          </xsl:attribute>
-        </xsl:if>
-
-        <xsl:call-template name="add-xml-base"/>
-
-        <xsl:apply-templates mode="stripNS"/>
-      </xsl:element>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy>
-        <xsl:copy-of select="@*[not(name(.) = 'xml:id')
-                                and not(name(.) = 'version')]"/>
-        <xsl:if test="@xml:id">
-          <xsl:attribute name="id">
-            <xsl:value-of select="@xml:id"/>
-          </xsl:attribute>
-        </xsl:if>
-
-        <xsl:call-template name="add-xml-base"/>
-
-        <xsl:apply-templates mode="stripNS"/>
-      </xsl:copy>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="*" mode="stripNS">
-  <xsl:choose>
-    <xsl:when test="self::ng:* or self::db:*">
-      <xsl:element name="{local-name(.)}">
-        <xsl:copy-of select="@*[not(name(.) = 'xml:id')
-                                and not(name(.) = 'version')]"/>
-        <xsl:if test="@xml:id">
-          <xsl:attribute name="id">
-            <xsl:value-of select="@xml:id"/>
-          </xsl:attribute>
-        </xsl:if>
-        <xsl:apply-templates mode="stripNS"/>
-      </xsl:element>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy>
-        <xsl:copy-of select="@*[not(name(.) = 'xml:id')
-                                and not(name(.) = 'version')]"/>
-        <xsl:if test="@xml:id">
-          <xsl:attribute name="id">
-            <xsl:value-of select="@xml:id"/>
-          </xsl:attribute>
-        </xsl:if>
-        <xsl:apply-templates mode="stripNS"/>
-      </xsl:copy>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="db:info" mode="stripNS">
-  <xsl:variable name="info">
-    <xsl:choose>
-      <xsl:when test="parent::db:article
-                      |parent::db:appendix
-                      |parent::db:bibliography
-                      |parent::db:book
-                      |parent::db:chapter
-                      |parent::db:glossary
-                      |parent::db:index
-                      |parent::db:part
-                      |parent::db:preface
-                      |parent::db:refentry
-                      |parent::db:reference
-                      |parent::db:refsect1
-                      |parent::db:refsect2
-                      |parent::db:refsect3
-                      |parent::db:refsection
-                      |parent::db:refsynopsisdiv
-                      |parent::db:sect1
-                      |parent::db:sect2
-                      |parent::db:sect3
-                      |parent::db:sect4
-                      |parent::db:sect5
-                      |parent::db:section
-                      |parent::db:setindex
-                      |parent::db:set
-                      |parent::db:slides
-                      |parent::db:sidebar">
-        <xsl:value-of select="local-name(parent::*)"/>
-        <xsl:text>info</xsl:text>
-      </xsl:when>
-      <xsl:when test="parent::db:audioobject
-                      |parent::db:imageobject
-                      |parent::db:inlinemediaobject
-                      |parent::db:mediaobject
-                      |parent::db:mediaobjectco
-                      |parent::db:textobject
-                      |parent::db:videoobject">
-        <xsl:text>objectinfo</xsl:text>
-      </xsl:when>
-      <xsl:otherwise>blockinfo</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:element name="{$info}">
-    <xsl:copy-of select="@*[not(name(.) = 'xml:id')
-                         and not(name(.) = 'version')]"/>
-    <xsl:if test="@xml:id">
-      <xsl:attribute name="id">
-        <xsl:value-of select="@xml:id"/>
-      </xsl:attribute>
-    </xsl:if>
-    <xsl:apply-templates mode="stripNS"/>
-  </xsl:element>
-
-  <xsl:if test="(not(../db:title) and not(../ng:title))
-                and ($info = 'prefaceinfo'
-                     or $info = 'chapterinfo'
-                     or $info = 'sectioninfo'
-                     or $info = 'sect1info'
-                     or $info = 'sect2info'
-                     or $info = 'sect3info'
-                     or $info = 'sect4info'
-                     or $info = 'sect5info'
-                     or $info = 'refsectioninfo'
-                     or $info = 'refsect1info'
-                     or $info = 'refsect2info'
-                     or $info = 'refsect3info'
-                     or $info = 'blockinfo'
-                     or $info = 'appendixinfo')">
-    <xsl:apply-templates select="db:title|ng:title" mode="stripNS"/>
-  </xsl:if>
-
-</xsl:template>
-
-<xsl:template match="ng:link|db:link" mode="stripNS">
-  <xsl:variable xmlns:xlink="http://www.w3.org/1999/xlink"
-                name="href" select="@xlink:href|@href"/>
-  <xsl:choose>
-    <xsl:when test="$href != '' and not(starts-with($href,'#'))">
-      <ulink url="{$href}">
-        <xsl:for-each select="@*">
-          <xsl:if test="local-name(.) != 'href'
-                        and name(.) != 'version'
-                        and name(.) != 'xml:id'">
-            <xsl:copy/>
-          </xsl:if>
-        </xsl:for-each>
-        <xsl:if test="@xml:id">
-          <xsl:attribute name="id">
-            <xsl:value-of select="@xml:id"/>
-          </xsl:attribute>
-        </xsl:if>
-        <xsl:apply-templates mode="stripNS"/>
-      </ulink>
-    </xsl:when>
-    <xsl:when test="$href != '' and starts-with($href,'#')">
-      <link linkend="{substring-after($href,'#')}">
-        <xsl:for-each select="@*">
-          <xsl:if test="local-name(.) != 'href'
-                        and name(.) != 'version'
-                        and name(.) != 'xml:id'">
-            <xsl:copy/>
-          </xsl:if>
-        </xsl:for-each>
-        <xsl:if test="@xml:id">
-          <xsl:attribute name="id">
-            <xsl:value-of select="@xml:id"/>
-          </xsl:attribute>
-        </xsl:if>
-        <xsl:apply-templates mode="stripNS"/>
-      </link>
-    </xsl:when>
-    <xsl:otherwise>
-      <link>
-        <xsl:copy-of select="@*[not(name(.) = 'xml:id')
-                             and not(name(.) = 'version')]"/>
-        <xsl:if test="@xml:id">
-          <xsl:attribute name="id">
-            <xsl:value-of select="@xml:id"/>
-          </xsl:attribute>
-        </xsl:if>
-        <xsl:apply-templates mode="stripNS"/>
-      </link>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="ng:tag|db:tag" mode="stripNS">
-  <sgmltag>
-    <xsl:copy-of select="@*[not(name(.) = 'xml:id')
-                         and not(name(.) = 'version')]"/>
-    <xsl:apply-templates mode="stripNS"/>
-  </sgmltag>
-</xsl:template>
-
-<xsl:template match="ng:textdata|db:textdata
-                     |ng:imagedata|db:imagedata
-                     |ng:videodata|db:videodata
-                     |ng:audiodata|db:audiodata" mode="stripNS">
-  <xsl:element name="{local-name(.)}">
-    <xsl:copy-of select="@*[not(name(.) = 'xml:id')
-                            and not(name(.) = 'version')
-                            and not(name(.) = 'entityref')]"/>
-    <xsl:if test="@xml:id">
-      <xsl:attribute name="id">
-        <xsl:value-of select="@xml:id"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:choose>
-      <xsl:when test="@entityref">
-        <xsl:attribute name="fileref">
-          <xsl:value-of select="unparsed-entity-uri(@entityref)"/>
-        </xsl:attribute>
-      </xsl:when>
-    </xsl:choose>
-
-    <xsl:apply-templates mode="stripNS"/>
-  </xsl:element>
-</xsl:template>
-
-<xsl:template name="add-xml-base">
-  <xsl:if test="not(@xml:base)">
-    <xsl:variable name="base">
-      <xsl:choose>
-        <xsl:when test="function-available('saxon:systemId')">
-          <xsl:value-of select="saxon:systemId()"/>
-        </xsl:when>
-        <xsl:when test="function-available('NodeInfo:systemId')">
-          <xsl:value-of select="NodeInfo:systemId()"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:message>
-            <xsl:text>WARNING: cannot add @xml:base to node </xsl:text>
-            <xsl:text>set root element.  </xsl:text>
-            <xsl:text>Relative paths may not work.</xsl:text>
-          </xsl:message>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <!-- debug
-    <xsl:message>base is <xsl:value-of select="$base"/></xsl:message>
-    -->
-    <xsl:if test="$base != ''">
-      <xsl:attribute name="xml:base">
-        <xsl:call-template name="systemIdToBaseURI">
-          <xsl:with-param name="systemId">
-            <!-- file: seems to confuse some processors. -->
-            <xsl:choose>
-              <!-- however, windows paths must use file:///c:/path -->
-              <xsl:when test="starts-with($base, 'file:///') and
-                              substring($base, 10, 1) = ':'">
-                <xsl:value-of select="$base"/>
-              </xsl:when>
-              <xsl:when test="starts-with($base, 'file:/')
-                              and substring($base, 8, 1) = ':'">
-                <xsl:value-of select="concat('file:///', 
-                                      substring-after($base,'file:/'))"/>
-              </xsl:when>
-              <xsl:when test="starts-with($base, 'file:///')">
-                <xsl:value-of select="substring-after($base,'file://')"/>
-              </xsl:when>
-              <xsl:when test="starts-with($base, 'file://')">
-                <xsl:value-of select="substring-after($base,'file:/')"/>
-              </xsl:when>
-              <xsl:when test="starts-with($base, 'file:/')">
-                <xsl:value-of select="substring-after($base,'file:')"/>
-              </xsl:when>
-              <xsl:otherwise>
-                <xsl:value-of select="$base"/>
-              </xsl:otherwise>
-            </xsl:choose>
-          </xsl:with-param>
-        </xsl:call-template>
-      </xsl:attribute>
-    </xsl:if>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="systemIdToBaseURI">
-  <xsl:param name="systemId" select="''"/>
-  <xsl:if test="contains($systemId,'/')">
-    <xsl:value-of select="substring-before($systemId,'/')"/>
-    <xsl:text>/</xsl:text>
-    <xsl:call-template name="systemIdToBaseURI">
-      <xsl:with-param name="systemId"
-                      select="substring-after($systemId,'/')"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="comment()|processing-instruction()|text()" mode="stripNS">
-  <xsl:copy/>
-</xsl:template>
-
-<xsl:template match="/" priority="-1">
-  <xsl:choose>
-    <xsl:when test="(function-available('exsl:node-set') or
-                     contains(system-property('xsl:vendor'),
-                       'Apache Software Foundation'))
-                    and (*/self::ng:* or */self::db:*)">
-      <xsl:message>Stripping namespace from DocBook 5 document.</xsl:message>
-      <xsl:variable name="nons">
-        <xsl:apply-templates mode="stripNS"/>
-      </xsl:variable>
-      <xsl:message>Processing stripped document.</xsl:message>
-      <xsl:apply-templates select="exsl:node-set($nons)"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy-of select="@* | node()"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/subtitles.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/subtitles.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,155 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
-                exclude-result-prefixes="doc"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<!-- subtitle markup -->
-
-<doc:mode mode="subtitle.markup" xmlns="">
-<refpurpose>Provides access to element subtitles</refpurpose>
-<refdescription id="subtitle.markup-desc">
-<para>Processing an element in the
-<literal role="mode">subtitle.markup</literal> mode produces the
-subtitle of the element.
-</para>
-</refdescription>
-</doc:mode>
-
-<xsl:template match="*" mode="subtitle.markup">
-  <xsl:message>
-    <xsl:text>Request for subtitle of unexpected element: </xsl:text>
-    <xsl:value-of select="local-name(.)"/>
-  </xsl:message>
-  <xsl:text>???SUBTITLE???</xsl:text>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="subtitle.markup">
-  <xsl:param name="allow-anchors" select="'0'"/>
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="set" mode="subtitle.markup">
-  <xsl:param name="allow-anchors" select="'0'"/>
-  <xsl:apply-templates select="(setinfo/subtitle|info/subtitle|subtitle)[1]"
-                       mode="subtitle.markup">
-    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="book" mode="subtitle.markup">
-  <xsl:param name="allow-anchors" select="'0'"/>
-  <xsl:apply-templates select="(bookinfo/subtitle|info/subtitle|subtitle)[1]"
-                       mode="subtitle.markup">
-    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="part" mode="subtitle.markup">
-  <xsl:param name="allow-anchors" select="'0'"/>
-  <xsl:apply-templates select="(partinfo/subtitle
-                                |docinfo/subtitle
-                                |info/subtitle
-                                |subtitle)[1]"
-                       mode="subtitle.markup">
-    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="preface|chapter|appendix" mode="subtitle.markup">
-  <xsl:param name="allow-anchors" select="'0'"/>
-  <xsl:apply-templates select="(docinfo/subtitle
-                                |info/subtitle
-                                |prefaceinfo/subtitle
-                                |chapterinfo/subtitle
-                                |appendixinfo/subtitle
-                                |subtitle)[1]"
-                       mode="subtitle.markup">
-    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="article" mode="subtitle.markup">
-  <xsl:param name="allow-anchors" select="'0'"/>
-  <xsl:apply-templates select="(artheader/subtitle
-                                |articleinfo/subtitle
-                                |info/subtitle
-                                |subtitle)[1]"
-                       mode="subtitle.markup">
-    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="dedication|colophon" mode="subtitle.markup">
-  <xsl:param name="allow-anchors" select="'0'"/>
-  <xsl:apply-templates select="(subtitle|info/subtitle)[1]"
-                       mode="subtitle.markup">
-    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="reference" mode="subtitle.markup">
-  <xsl:param name="allow-anchors" select="'0'"/>
-  <xsl:apply-templates select="(referenceinfo/subtitle
-                                |docinfo/subtitle
-                                |info/subtitle
-                                |subtitle)[1]"
-                       mode="subtitle.markup">
-    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="qandaset" mode="subtitle.markup">
-  <xsl:param name="allow-anchors" select="'0'"/>
-  <xsl:apply-templates select="(blockinfo/subtitle|info/subtitle)[1]"
-                       mode="subtitle.markup">
-    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="refentry" mode="subtitle.markup">
-  <xsl:param name="allow-anchors" select="'0'"/>
-  <xsl:apply-templates select="(refentryinfo/subtitle
-                                |info/subtitle
-                                |docinfo/subtitle)[1]"
-                       mode="subtitle.markup">
-    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="section
-                     |sect1|sect2|sect3|sect4|sect5
-                     |refsect1|refsect2|refsect3
-                     |simplesect"
-              mode="subtitle.markup">
-  <xsl:param name="allow-anchors" select="'0'"/>
-  <xsl:apply-templates select="(info/subtitle
-                                |sectioninfo/subtitle
-                                |sect1info/subtitle
-                                |sect2info/subtitle
-                                |sect3info/subtitle
-                                |sect4info/subtitle
-                                |sect5info/subtitle
-                                |refsect1info/subtitle
-                                |refsect2info/subtitle
-                                |refsect3info/subtitle
-                                |subtitle)[1]"
-                       mode="subtitle.markup">
-    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-</xsl:stylesheet>
-
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/table.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/table.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,514 +1,0 @@
-<?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
-                exclude-result-prefixes="doc"
-                version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:template name="blank.spans">
-  <xsl:param name="cols" select="1"/>
-  <xsl:if test="$cols &gt; 0">
-    <xsl:text>0:</xsl:text>
-    <xsl:call-template name="blank.spans">
-      <xsl:with-param name="cols" select="$cols - 1"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="calculate.following.spans">
-  <xsl:param name="colspan" select="1"/>
-  <xsl:param name="spans" select="''"/>
-
-  <xsl:choose>
-    <xsl:when test="$colspan &gt; 0">
-      <xsl:call-template name="calculate.following.spans">
-        <xsl:with-param name="colspan" select="$colspan - 1"/>
-        <xsl:with-param name="spans" select="substring-after($spans,':')"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$spans"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="finaltd">
-  <xsl:param name="spans"/>
-  <xsl:param name="col" select="0"/>
-
-  <xsl:if test="$spans != ''">
-    <xsl:choose>
-      <xsl:when test="starts-with($spans,'0:')">
-        <xsl:call-template name="empty.table.cell">
-          <xsl:with-param name="colnum" select="$col"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise></xsl:otherwise>
-    </xsl:choose>
-
-    <xsl:call-template name="finaltd">
-      <xsl:with-param name="spans" select="substring-after($spans,':')"/>
-      <xsl:with-param name="col" select="$col+1"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="sfinaltd">
-  <xsl:param name="spans"/>
-
-  <xsl:if test="$spans != ''">
-    <xsl:choose>
-      <xsl:when test="starts-with($spans,'0:')">0:</xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="substring-before($spans,':')-1"/>
-        <xsl:text>:</xsl:text>
-      </xsl:otherwise>
-    </xsl:choose>
-
-    <xsl:call-template name="sfinaltd">
-      <xsl:with-param name="spans" select="substring-after($spans,':')"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="entry.colnum">
-  <xsl:param name="entry" select="."/>
-
-  <xsl:choose>
-    <xsl:when test="$entry/@spanname">
-      <xsl:variable name="spanname" select="$entry/@spanname"/>
-      <xsl:variable name="spanspec"
-                    select="($entry/ancestor::tgroup/spanspec[@spanname=$spanname]
-                             |$entry/ancestor::entrytbl/spanspec[@spanname=$spanname])[last()]"/>
-      <xsl:variable name="colspec"
-                    select="($entry/ancestor::tgroup/colspec[@colname=$spanspec/@namest]
-                             |$entry/ancestor::entrytbl/colspec[@colname=$spanspec/@namest])[last()]"/>
-      <xsl:call-template name="colspec.colnum">
-        <xsl:with-param name="colspec" select="$colspec"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="$entry/@colname">
-      <xsl:variable name="colname" select="$entry/@colname"/>
-      <xsl:variable name="colspec"
-                    select="($entry/ancestor::tgroup/colspec[@colname=$colname]
-                             |$entry/ancestor::entrytbl/colspec[@colname=$colname])[last()]"/>
-      <xsl:call-template name="colspec.colnum">
-        <xsl:with-param name="colspec" select="$colspec"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="$entry/@namest">
-      <xsl:variable name="namest" select="$entry/@namest"/>
-      <xsl:variable name="colspec"
-                    select="($entry/ancestor::tgroup/colspec[@colname=$namest]
-                             |$entry/ancestor::entrytbl/colspec[@colname=$namest])[last()]"/>
-      <xsl:call-template name="colspec.colnum">
-        <xsl:with-param name="colspec" select="$colspec"/>
-      </xsl:call-template>
-    </xsl:when>
-    <!-- no idea, return 0 -->
-    <xsl:otherwise>0</xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<doc:template name="entry.colnum" xmlns="">
-<refpurpose>Determine the column number in which a given entry occurs</refpurpose>
-<refdescription id="entry.colnum-desc">
-<para>If an <tag>entry</tag> has a
-<tag class="attribute">colname</tag> or
-<tag class="attribute">namest</tag> attribute, this template
-will determine the number of the column in which the entry should occur.
-For other <tag>entry</tag>s, nothing is returned.</para>
-</refdescription>
-<refparameter id="entry.colnum-params">
-<variablelist>
-<varlistentry><term>entry</term>
-<listitem>
-<para>The <tag>entry</tag>-element which is to be tested.</para>
-</listitem>
-</varlistentry>
-</variablelist>
-</refparameter>
-
-<refreturn id="entry.colnum-returns">
-<para>This template returns the column number if it can be determined,
-or 0 (the empty string)</para>
-</refreturn>
-</doc:template>
-
-<xsl:template name="colspec.colnum">
-  <xsl:param name="colspec" select="."/>
-  <xsl:choose>
-    <xsl:when test="$colspec/@colnum">
-      <xsl:value-of select="$colspec/@colnum"/>
-    </xsl:when>
-    <xsl:when test="$colspec/preceding-sibling::colspec">
-      <xsl:variable name="prec.colspec.colnum">
-        <xsl:call-template name="colspec.colnum">
-          <xsl:with-param name="colspec"
-                          select="$colspec/preceding-sibling::colspec[1]"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:value-of select="$prec.colspec.colnum + 1"/>
-    </xsl:when>
-    <xsl:otherwise>1</xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="calculate.colspan">
-  <xsl:param name="entry" select="."/>
-  <xsl:variable name="spanname" select="$entry/@spanname"/>
-  <xsl:variable name="spanspec"
-                select="($entry/ancestor::tgroup/spanspec[@spanname=$spanname]
-                         |$entry/ancestor::entrytbl/spanspec[@spanname=$spanname])[last()]"/>
-
-  <xsl:variable name="namest">
-    <xsl:choose>
-      <xsl:when test="@spanname">
-        <xsl:value-of select="$spanspec/@namest"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$entry/@namest"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="nameend">
-    <xsl:choose>
-      <xsl:when test="@spanname">
-        <xsl:value-of select="$spanspec/@nameend"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$entry/@nameend"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="scol">
-    <xsl:call-template name="colspec.colnum">
-      <xsl:with-param name="colspec"
-                      select="($entry/ancestor::tgroup/colspec[@colname=$namest]
-                               |$entry/ancestor::entrytbl/colspec[@colname=$namest])[last()]"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="ecol">
-    <xsl:call-template name="colspec.colnum">
-      <xsl:with-param name="colspec"
-                      select="($entry/ancestor::tgroup/colspec[@colname=$nameend]
-                               |$entry/ancestor::entrytbl/colspec[@colname=$nameend])[last()]"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$namest != '' and $nameend != ''">
-      <xsl:choose>
-        <xsl:when test="number($ecol) &gt;= number($scol)">
-          <xsl:value-of select="number($ecol) - number($scol) + 1"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="number($scol) - number($ecol) + 1"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>1</xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="calculate.rowsep">
-  <xsl:param name="entry" select="."/>
-  <xsl:param name="colnum" select="0"/>
-
-  <xsl:call-template name="inherited.table.attribute">
-    <xsl:with-param name="entry" select="$entry"/>
-    <xsl:with-param name="colnum" select="$colnum"/>
-    <xsl:with-param name="attribute" select="'rowsep'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="calculate.colsep">
-  <xsl:param name="entry" select="."/>
-  <xsl:param name="colnum" select="0"/>
-
-  <xsl:call-template name="inherited.table.attribute">
-    <xsl:with-param name="entry" select="$entry"/>
-    <xsl:with-param name="colnum" select="$colnum"/>
-    <xsl:with-param name="attribute" select="'colsep'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="inherited.table.attribute">
-  <xsl:param name="entry" select="."/>
-  <xsl:param name="row" select="$entry/ancestor-or-self::row[1]"/>
-  <xsl:param name="colnum" select="0"/>
-  <xsl:param name="attribute" select="'colsep'"/>
-
-  <xsl:variable name="tgroup" select="$row/parent::*/parent::tgroup[1]"/>
-  <xsl:variable name="tbody" select="$row/parent::*[1]"/>
-
-  <xsl:variable name="table" select="($tgroup/ancestor::table
-                                     |$tgroup/ancestor::informaltable
-				     |$entry/ancestor::entrytbl)[last()]"/>
-
-  <xsl:variable name="entry.value">
-    <xsl:call-template name="get-attribute">
-      <xsl:with-param name="element" select="$entry"/>
-      <xsl:with-param name="attribute" select="$attribute"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="row.value">
-    <xsl:call-template name="get-attribute">
-      <xsl:with-param name="element" select="$row"/>
-      <xsl:with-param name="attribute" select="$attribute"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="span.value">
-    <xsl:if test="$entry/@spanname">
-      <xsl:variable name="spanname" select="$entry/@spanname"/>
-      <xsl:variable name="spanspec"
-                    select="$tgroup/spanspec[@spanname=$spanname]"/>
-      <xsl:variable name="span.colspec"
-                    select="$tgroup/colspec[@colname=$spanspec/@namest]"/>
-
-      <xsl:variable name="spanspec.value">
-        <xsl:call-template name="get-attribute">
-          <xsl:with-param name="element" select="$spanspec"/>
-          <xsl:with-param name="attribute" select="$attribute"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <xsl:variable name="scolspec.value">
-        <xsl:call-template name="get-attribute">
-          <xsl:with-param name="element" select="$span.colspec"/>
-          <xsl:with-param name="attribute" select="$attribute"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <xsl:choose>
-        <xsl:when test="$spanspec.value != ''">
-          <xsl:value-of select="$spanspec.value"/>
-        </xsl:when>
-        <xsl:when test="$scolspec.value != ''">
-          <xsl:value-of select="$scolspec.value"/>
-        </xsl:when>
-        <xsl:otherwise></xsl:otherwise>
-      </xsl:choose>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="namest.value">
-    <xsl:if test="$entry/@namest">
-      <xsl:variable name="namest" select="$entry/@namest"/>
-      <xsl:variable name="colspec"
-                    select="$tgroup/colspec[@colname=$namest]"/>
-
-      <xsl:variable name="inner.namest.value">
-        <xsl:call-template name="get-attribute">
-          <xsl:with-param name="element" select="$colspec"/>
-          <xsl:with-param name="attribute" select="$attribute"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <xsl:choose>
-        <xsl:when test="$inner.namest.value">
-          <xsl:value-of select="$inner.namest.value"/>
-        </xsl:when>
-        <xsl:otherwise></xsl:otherwise>
-      </xsl:choose>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="tgroup.value">
-    <xsl:call-template name="get-attribute">
-      <xsl:with-param name="element" select="$tgroup"/>
-      <xsl:with-param name="attribute" select="$attribute"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="tbody.value">
-    <xsl:call-template name="get-attribute">
-      <xsl:with-param name="element" select="$tbody"/>
-      <xsl:with-param name="attribute" select="$attribute"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="table.value">
-    <xsl:call-template name="get-attribute">
-      <xsl:with-param name="element" select="$table"/>
-      <xsl:with-param name="attribute" select="$attribute"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="default.value">
-    <!-- This section used to say that rowsep and colsep have defaults based -->
-    <!-- on the frame setting. Further reflection and closer examination of the -->
-    <!-- CALS spec reveals I was mistaken. The default is "1" for rowsep and colsep. -->
-    <!-- For everything else, the default is the tgroup value -->
-    <xsl:choose>
-      <xsl:when test="$tgroup.value != ''">
-        <xsl:value-of select="$tgroup.value"/>
-      </xsl:when>
-      <xsl:when test="$attribute = 'rowsep'">1</xsl:when>
-      <xsl:when test="$attribute = 'colsep'">1</xsl:when>
-      <xsl:otherwise><!-- empty --></xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="calc.colvalue">
-    <xsl:if test="$colnum &gt; 0">
-      <xsl:call-template name="colnum.colspec">
-        <xsl:with-param name="colnum" select="$colnum"/>
-        <xsl:with-param name="attribute" select="$attribute"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$entry.value != ''">
-      <xsl:value-of select="$entry.value"/>
-    </xsl:when>
-    <xsl:when test="$row.value != ''">
-      <xsl:value-of select="$row.value"/>
-    </xsl:when>
-    <xsl:when test="$span.value != ''">
-      <xsl:value-of select="$span.value"/>
-    </xsl:when>
-    <xsl:when test="$namest.value != ''">
-      <xsl:value-of select="$namest.value"/>
-    </xsl:when>
-    <xsl:when test="$calc.colvalue != ''">
-      <xsl:value-of select="$calc.colvalue"/>
-    </xsl:when>
-    <xsl:when test="$tbody.value != ''">
-      <xsl:value-of select="$tbody.value"/>
-    </xsl:when>
-    <xsl:when test="$tgroup.value != ''">
-      <xsl:value-of select="$tgroup.value"/>
-    </xsl:when>
-    <xsl:when test="$table.value != ''">
-      <xsl:value-of select="$table.value"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$default.value"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="colnum.colspec">
-  <xsl:param name="colnum" select="0"/>
-  <xsl:param name="attribute" select="'colname'"/>
-  <xsl:param name="colspec.ancestor" 
-             select="(ancestor::tgroup|ancestor::entrytbl)
-	             [position() = last()]"/>
-  <xsl:param name="colspecs" select="$colspec.ancestor/colspec"/>
-  <xsl:param name="count" select="1"/>
-
-  <xsl:choose>
-    <xsl:when test="not($colspecs) or $count &gt; $colnum">
-      <!-- nop -->
-    </xsl:when>
-    <xsl:when test="$colspecs[1]/@colnum">
-      <xsl:choose>
-        <xsl:when test="$colspecs[1]/@colnum = $colnum">
-          <xsl:call-template name="get-attribute">
-            <xsl:with-param name="element" select="$colspecs[1]"/>
-            <xsl:with-param name="attribute" select="$attribute"/>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="colnum.colspec">
-            <xsl:with-param name="colnum" select="$colnum"/>
-            <xsl:with-param name="attribute" select="$attribute"/>
-            <xsl:with-param name="colspecs"
-                            select="$colspecs[position()&gt;1]"/>
-            <xsl:with-param name="count"
-                            select="$colspecs[1]/@colnum+1"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="$count = $colnum">
-          <xsl:call-template name="get-attribute">
-            <xsl:with-param name="element" select="$colspecs[1]"/>
-            <xsl:with-param name="attribute" select="$attribute"/>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="colnum.colspec">
-            <xsl:with-param name="colnum" select="$colnum"/>
-            <xsl:with-param name="attribute" select="$attribute"/>
-            <xsl:with-param name="colspecs"
-                            select="$colspecs[position()&gt;1]"/>
-            <xsl:with-param name="count" select="$count+1"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="get-attribute">
-  <xsl:param name="element" select="."/>
-  <xsl:param name="attribute" select="''"/>
-
-  <xsl:for-each select="$element/@*">
-    <xsl:if test="local-name(.) = $attribute">
-      <xsl:value-of select="."/>
-    </xsl:if>
-  </xsl:for-each>
-</xsl:template>
-
-<xsl:template name="consume-row">
-  <xsl:param name="spans"/>
-
-  <xsl:if test="contains($spans,':')">
-    <xsl:value-of select="substring-before($spans,':') - 1"/>
-    <xsl:text>:</xsl:text>
-    <xsl:call-template name="consume-row">
-      <xsl:with-param name="spans" select="substring-after($spans,':')"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<!-- Returns the table style for the context element -->
-<xsl:template name="tabstyle">
-  <xsl:param name="node" select="."/>
-
-  <xsl:variable name="tgroup" select="$node/tgroup[1] | 
-                                      $node/ancestor-or-self::tgroup[1]"/>
-
-  <xsl:variable name="table" 
-                select="($node/ancestor-or-self::table | 
-                         $node/ancestor-or-self::informaltable)[1]"/>
-
-  <xsl:variable name="tabstyle">
-    <xsl:choose>
-      <xsl:when test="$table/@tabstyle != ''">
-        <xsl:value-of select="normalize-space($table/@tabstyle)"/>
-      </xsl:when>
-      <xsl:when test="$tgroup/@tgroupstyle != ''">
-        <xsl:value-of select="normalize-space($tgroup/@tgroupstyle)"/>
-      </xsl:when>
-      <xsl:otherwise>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:value-of select="$tabstyle"/>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/targetdatabase.dtd
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/targetdatabase.dtd	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,49 +1,0 @@
-<!-- targetdatabase.dtd -->
-<!-- A DTD for managing cross reference target information -->
-
-<!ELEMENT targetset (targetsetinfo?, sitemap*, document*) >
-
-<!ELEMENT targetsetinfo ANY >
-
-<!ELEMENT sitemap (dir) >
-
-<!ELEMENT dir ((dir|document)*) >
-<!ATTLIST dir
-        name      CDATA   #REQUIRED
->
-
-<!ELEMENT document (div*) >
-<!ATTLIST document
-        targetdoc CDATA   #REQUIRED
-        uri       CDATA   #IMPLIED
-        baseuri   CDATA   #IMPLIED
-        href      CDATA   #IMPLIED
-        dir       CDATA   #IMPLIED
->
-
-<!ELEMENT div (ttl?, objttl?, xreftext?, (div|obj)*)>
-<!ATTLIST div
-        targetptr  CDATA   #IMPLIED
-        element   CDATA   #IMPLIED
-        name      CDATA   #IMPLIED
-        number    CDATA   #IMPLIED
-        href      CDATA   #IMPLIED
-        lang      CDATA   #IMPLIED
-        page      CDATA   #IMPLIED
->
-        
-        
-<!ELEMENT ttl ANY >
-<!ELEMENT objttl ANY >
-<!ELEMENT xreftext ANY >
-
-<!ELEMENT obj (ttl?, objttl?, xreftext?)>
-<!ATTLIST obj
-        targetptr  CDATA   #IMPLIED
-        element   CDATA   #IMPLIED
-        name      CDATA   #IMPLIED
-        number    CDATA   #IMPLIED
-        href      CDATA   #IMPLIED
-        lang      CDATA   #IMPLIED
-        page      CDATA   #IMPLIED
->
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/targets.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/targets.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,272 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
-                exclude-result-prefixes="doc"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<!-- cross reference target collection  -->
-
-<doc:mode mode="collect.targets" xmlns="">
-<refpurpose>Collects information for potential cross reference targets</refpurpose>
-<refdescription id="collect.targets-desc">
-<para>Processing the root element in the
-<literal role="mode">collect.targets</literal> mode produces 
-a set of target database elements that can be used by
-the olink mechanism to resolve external cross references.
-The collection process is controlled by the <literal>
-collect.xref.targets</literal> parameter, which can be
-<literal>yes</literal> to collect targets and process
-the document for output, <literal>only</literal> to
-only collect the targets, and <literal>no</literal>
-(default) to not collect the targets and only process the document.
-</para>
-<para>
-A <literal>targets.filename</literal> parameter must be
-specified to receive the output if 
-<literal>collect.xref.targets</literal> is
-set to <literal>yes</literal> so as to
-redirect the target data to a file separate from the
-document output.
-</para>
-</refdescription>
-</doc:mode>
-
-<!-- ============================================================ -->
-
-<xsl:template match="*" mode="collect.targets">
-  <xsl:choose>
-    <xsl:when test="$collect.xref.targets = 'yes' and $targets.filename = ''">
-      <xsl:message>
-        Must specify a $targets.filename parameter when
-        $collect.xref.targets is set to 'yes'.
-        The xref targets were not collected.
-      </xsl:message>
-    </xsl:when> 
-    <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="$targets.filename">
-          <xsl:call-template name="write.chunk">
-            <xsl:with-param name="filename" select="$targets.filename"/>
-            <xsl:with-param name="method" select="'xml'"/>
-            <xsl:with-param name="encoding" select="'utf-8'"/>
-            <xsl:with-param name="omit-xml-declaration" select="'yes'"/>
-            <xsl:with-param name="doctype-public" select="''"/>
-            <xsl:with-param name="doctype-system" select="''"/>
-            <xsl:with-param name="indent" select="'no'"/>
-            <xsl:with-param name="quiet" select="0"/>
-            <xsl:with-param name="content">
-              <xsl:apply-templates select="." mode="olink.mode"/>
-            </xsl:with-param>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:otherwise>
-          <!-- Else write to standard output -->
-          <xsl:apply-templates select="." mode="olink.mode"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="olink.href.target">
-  <xsl:param name="nd" select="."/>
-
-  <xsl:value-of select="$olink.base.uri"/>
-  <xsl:call-template name="href.target">
-    <xsl:with-param name="object" select="$nd"/>
-    <xsl:with-param name="context" select="NOTANODE"/>
-  </xsl:call-template>
-</xsl:template>
-
-<!-- Templates for extracting cross reference information
-     from a document for use in an xref database.
--->
-
-<xsl:template name="attrs">
-  <xsl:param name="nd" select="."/>
-
-  <xsl:attribute name="element">
-    <xsl:value-of select="local-name(.)"/>
-  </xsl:attribute>
-
-  <xsl:attribute name="href">
-    <xsl:call-template name="olink.href.target">
-      <xsl:with-param name="nd" select="$nd"/>
-    </xsl:call-template>
-  </xsl:attribute>
-
-  <xsl:variable name="num">
-    <xsl:apply-templates select="$nd" mode="label.markup">
-      <xsl:with-param name="verbose" select="0"/>
-    </xsl:apply-templates>
-  </xsl:variable>
-
-  <xsl:if test="$num">
-    <xsl:attribute name="number">
-      <xsl:value-of select="$num"/>
-    </xsl:attribute>
-  </xsl:if>
-
-  <xsl:choose>
-    <xsl:when test="$nd/@id">
-      <xsl:attribute name="targetptr">
-        <xsl:value-of select="$nd/@id"/>
-      </xsl:attribute>
-    </xsl:when>
-    <xsl:when test="$nd/@xml:id">
-      <xsl:attribute name="targetptr">
-        <xsl:value-of select="$nd/@xml:id"/>
-      </xsl:attribute>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:if test="$nd/@lang">
-    <xsl:attribute name="lang">
-      <xsl:value-of select="$nd/@lang"/>
-    </xsl:attribute>
-  </xsl:if>
-
-</xsl:template>
-
-<xsl:template name="div">
-  <xsl:param name="nd" select="."/>
-
-  <div>
-    <xsl:call-template name="attrs">
-      <xsl:with-param name="nd" select="$nd"/>
-    </xsl:call-template>
-    <ttl>
-      <xsl:apply-templates select="$nd" mode="title.markup">
-        <xsl:with-param name="verbose" select="0"/>
-      </xsl:apply-templates>
-    </ttl>
-    <xreftext>
-      <xsl:choose>
-        <xsl:when test="$nd/@xreflabel">
-          <xsl:call-template name="xref.xreflabel">
-            <xsl:with-param name="target" select="$nd"/>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates select="$nd" mode="xref-to">
-            <xsl:with-param name="verbose" select="0"/>
-          </xsl:apply-templates>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xreftext>
-    <xsl:apply-templates mode="olink.mode"/>
-  </div>
-</xsl:template>
-
-<xsl:template name="obj">
-  <xsl:param name="nd" select="."/>
-
-  <obj>
-    <xsl:call-template name="attrs">
-      <xsl:with-param name="nd" select="$nd"/>
-    </xsl:call-template>
-    <ttl>
-      <xsl:apply-templates select="$nd" mode="title.markup">
-        <xsl:with-param name="verbose" select="0"/>
-      </xsl:apply-templates>
-    </ttl>
-    <xreftext>
-      <xsl:choose>
-        <xsl:when test="$nd/@xreflabel">
-          <xsl:call-template name="xref.xreflabel">
-            <xsl:with-param name="target" select="$nd"/>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates select="$nd" mode="xref-to">
-            <xsl:with-param name="verbose" select="0"/>
-          </xsl:apply-templates>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xreftext>
-  </obj>
-</xsl:template>
-
-<xsl:template match="text()|processing-instruction()|comment()"
-              mode="olink.mode">
-  <!-- nop -->
-</xsl:template>
-
-<!--
-<xsl:template match="*" mode="olink.mode">
-</xsl:template>
--->
-
-<xsl:template match="set" mode="olink.mode">
-  <xsl:call-template name="div"/>
-</xsl:template>
-
-<xsl:template match="book" mode="olink.mode">
-  <xsl:call-template name="div"/>
-</xsl:template>
-
-<xsl:template match="preface|chapter|appendix" mode="olink.mode">
-  <xsl:call-template name="div"/>
-</xsl:template>
-
-<xsl:template match="part|reference" mode="olink.mode">
-  <xsl:call-template name="div"/>
-</xsl:template>
-
-<xsl:template match="article" mode="olink.mode">
-  <xsl:call-template name="div"/>
-</xsl:template>
-
-<xsl:template match="bibliography|bibliodiv" mode="olink.mode">
-  <xsl:call-template name="div"/>
-</xsl:template>
-
-<xsl:template match="biblioentry|bibliomixed" mode="olink.mode">
-  <xsl:call-template name="obj"/>
-</xsl:template>
-
-<xsl:template match="refentry" mode="olink.mode">
-  <xsl:call-template name="div"/>
-</xsl:template>
-
-<xsl:template match="section|sect1|sect2|sect3|sect4|sect5" mode="olink.mode">
-  <xsl:call-template name="div"/>
-</xsl:template>
-
-<xsl:template match="refsection|refsect1|refsect2|refsect3" mode="olink.mode">
-  <xsl:call-template name="div"/>
-</xsl:template>
-
-<xsl:template match="figure|example|table" mode="olink.mode">
-  <xsl:call-template name="obj"/>
-  <xsl:apply-templates mode="olink.mode"/>
-</xsl:template>
-
-<xsl:template match="equation[title or info/title]" mode="olink.mode">
-  <xsl:call-template name="obj"/>
-</xsl:template>
-
-<xsl:template match="qandaset|qandaentry" mode="olink.mode">
-  <xsl:call-template name="div"/>
-</xsl:template>
-
-<xsl:template match="*" mode="olink.mode">
-  <xsl:if test="@id or @xml:id">
-    <xsl:call-template name="obj"/>
-  </xsl:if> 
-  <xsl:apply-templates mode="olink.mode"/>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/titles.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/titles.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,740 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
-                exclude-result-prefixes="doc"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<!-- title markup -->
-
-<doc:mode mode="title.markup" xmlns="">
-<refpurpose>Provides access to element titles</refpurpose>
-<refdescription id="title.markup-desc">
-<para>Processing an element in the
-<literal role="mode">title.markup</literal> mode produces the
-title of the element. This does not include the label.
-</para>
-</refdescription>
-</doc:mode>
-
-<xsl:template match="*" mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:param name="verbose" select="1"/>
-  <xsl:choose>
-    <!-- * FIXME: this should handle other *info elements as well -->
-    <!-- * but this is good enough for now. -->
-    <xsl:when test="title|info/title">
-      <xsl:apply-templates select="title[1]|info/title[1]" mode="title.markup">
-        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:when test="local-name(.) = 'partintro'">
-      <!-- partintro's don't have titles, use the parent (part or reference)
-           title instead. -->
-      <xsl:apply-templates select="parent::*" mode="title.markup"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:if test="$verbose != 0">
-        <xsl:message>
-          <xsl:text>Request for title of element with no title: </xsl:text>
-          <xsl:value-of select="local-name(.)"/>
-          <xsl:choose>
-            <xsl:when test="@id">
-              <xsl:text> (id="</xsl:text>
-              <xsl:value-of select="@id"/>
-              <xsl:text>")</xsl:text>
-            </xsl:when>
-            <xsl:when test="@xml:id">
-              <xsl:text> (xml:id="</xsl:text>
-              <xsl:value-of select="@xml:id"/>
-              <xsl:text>")</xsl:text>
-            </xsl:when>
-          </xsl:choose>
-        </xsl:message>
-      </xsl:if>
-      <xsl:text>???TITLE???</xsl:text>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="title" mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-
-  <xsl:choose>
-    <xsl:when test="$allow-anchors != 0">
-      <xsl:apply-templates/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates mode="no.anchor.mode"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- only occurs in HTML Tables! -->
-<xsl:template match="caption" mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-
-  <xsl:choose>
-    <xsl:when test="$allow-anchors != 0">
-      <xsl:apply-templates/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates mode="no.anchor.mode"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="set" mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:apply-templates select="(setinfo/title|info/title|title)[1]"
-                       mode="title.markup">
-    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="book" mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:apply-templates select="(bookinfo/title|info/title|title)[1]"
-                       mode="title.markup">
-    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="part" mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:apply-templates select="(partinfo/title|info/title|docinfo/title|title)[1]"
-                       mode="title.markup">
-    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="preface|chapter|appendix" mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-
-<!--
-  <xsl:message>
-    <xsl:value-of select="local-name(.)"/>
-    <xsl:text> </xsl:text>
-    <xsl:value-of select="$allow-anchors"/>
-  </xsl:message>
--->
-
-  <xsl:variable name="title" select="(docinfo/title
-                                      |info/title
-                                      |prefaceinfo/title
-                                      |chapterinfo/title
-                                      |appendixinfo/title
-                                      |title)[1]"/>
-  <xsl:apply-templates select="$title" mode="title.markup">
-    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="dedication" mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:choose>
-    <xsl:when test="title">
-      <xsl:apply-templates select="(title|info/title)[1]" mode="title.markup">
-        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'Dedication'"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="colophon" mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:choose>
-    <xsl:when test="title">
-      <xsl:apply-templates select="(title|info/title)[1]" mode="title.markup">
-        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'Colophon'"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="article" mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:variable name="title" select="(artheader/title
-                                      |articleinfo/title
-                                      |info/title
-                                      |title)[1]"/>
-
-  <xsl:apply-templates select="$title" mode="title.markup">
-    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="reference" mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:apply-templates select="(referenceinfo/title|docinfo/title|info/title|title)[1]"
-                       mode="title.markup">
-    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="refentry" mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:variable name="refmeta" select=".//refmeta"/>
-  <xsl:variable name="refentrytitle" select="$refmeta//refentrytitle"/>
-  <xsl:variable name="refnamediv" select=".//refnamediv"/>
-  <xsl:variable name="refname" select="$refnamediv//refname"/>
-  <xsl:variable name="refdesc" select="$refnamediv//refdescriptor"/>
-
-  <xsl:variable name="title">
-    <xsl:choose>
-      <xsl:when test="$refentrytitle">
-        <xsl:apply-templates select="$refentrytitle[1]" mode="title.markup"/>
-      </xsl:when>
-      <xsl:when test="$refdesc">
-        <xsl:apply-templates select="$refdesc" mode="title.markup"/>
-      </xsl:when>
-      <xsl:when test="$refname">
-        <xsl:apply-templates select="$refname[1]" mode="title.markup"/>
-      </xsl:when>
-      <xsl:otherwise>REFENTRY WITHOUT TITLE???</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:copy-of select="$title"/>
-</xsl:template>
-
-<xsl:template match="refentrytitle|refname|refdescriptor" mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:choose>
-    <xsl:when test="$allow-anchors != 0">
-      <xsl:apply-templates/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates mode="no.anchor.mode"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="section
-                     |sect1|sect2|sect3|sect4|sect5
-                     |refsect1|refsect2|refsect3|refsection
-                     |simplesect"
-              mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:variable name="title" select="(info/title
-                                      |sectioninfo/title
-                                      |sect1info/title
-                                      |sect2info/title
-                                      |sect3info/title
-                                      |sect4info/title
-                                      |sect5info/title
-                                      |refsect1info/title
-                                      |refsect2info/title
-                                      |refsect3info/title
-                                      |refsectioninfo/title
-                                      |title)[1]"/>
-
-  <xsl:apply-templates select="$title" mode="title.markup">
-    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="bridgehead" mode="title.markup">
-  <xsl:apply-templates mode="title.markup"/>
-</xsl:template>
-
-<xsl:template match="refsynopsisdiv" mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:choose>
-    <xsl:when test="title">
-      <xsl:apply-templates select="title" mode="title.markup">
-        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'RefSynopsisDiv'"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="bibliography" mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:variable name="title" select="(bibliographyinfo/title|info/title|title)[1]"/>
-  <xsl:choose>
-    <xsl:when test="$title">
-      <xsl:apply-templates select="$title" mode="title.markup">
-        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'Bibliography'"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="glossary" mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:variable name="title" select="(glossaryinfo/title|info/title|title)[1]"/>
-  <xsl:choose>
-    <xsl:when test="$title">
-      <xsl:apply-templates select="$title" mode="title.markup">
-        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="gentext.element.name">
-        <xsl:with-param name="element.name" select="local-name(.)"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="glossdiv" mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:variable name="title" select="(info/title|title)[1]"/>
-  <xsl:choose>
-    <xsl:when test="$title">
-      <xsl:apply-templates select="$title" mode="title.markup">
-        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:message>ERROR: glossdiv missing its required title</xsl:message>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="glossentry" mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:apply-templates select="glossterm" mode="title.markup">
-    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="glossterm" mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-
-  <xsl:choose>
-    <xsl:when test="$allow-anchors != 0">
-      <xsl:apply-templates/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates mode="no.anchor.mode"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="index" mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:variable name="title" select="(indexinfo/title|info/title|title)[1]"/>
-  <xsl:choose>
-    <xsl:when test="$title">
-      <xsl:apply-templates select="$title" mode="title.markup">
-        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'Index'"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="setindex" mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:variable name="title" select="(setindexinfo/title|info/title|title)[1]"/>
-  <xsl:choose>
-    <xsl:when test="$title">
-      <xsl:apply-templates select="$title" mode="title.markup">
-        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'SetIndex'"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="figure|example|equation" mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:apply-templates select="title|info/title" mode="title.markup">
-    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="table" mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:apply-templates select="(title|caption)[1]" mode="title.markup">
-    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="procedure" mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:apply-templates select="title" mode="title.markup">
-    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="task" mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:apply-templates select="title" mode="title.markup">
-    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="sidebar" mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:apply-templates select="(info/title|sidebarinfo/title|title)[1]"
-                       mode="title.markup">
-    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="abstract" mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:choose>
-    <xsl:when test="title|info/title">
-      <xsl:apply-templates select="(title|info/title)[1]" mode="title.markup">
-        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'Abstract'"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="caution|tip|warning|important|note" mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:variable name="title" select="(title|info/title)[1]"/>
-  <xsl:choose>
-    <xsl:when test="$title">
-      <xsl:apply-templates select="$title" mode="title.markup">
-        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key">
-          <xsl:choose>
-            <xsl:when test="local-name(.)='note'">Note</xsl:when>
-            <xsl:when test="local-name(.)='important'">Important</xsl:when>
-            <xsl:when test="local-name(.)='caution'">Caution</xsl:when>
-            <xsl:when test="local-name(.)='warning'">Warning</xsl:when>
-            <xsl:when test="local-name(.)='tip'">Tip</xsl:when>
-          </xsl:choose>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="question" mode="title.markup">
-  <!-- questions don't have titles -->
-  <xsl:text>Question</xsl:text>
-</xsl:template>
-
-<xsl:template match="answer" mode="title.markup">
-  <!-- answers don't have titles -->
-  <xsl:text>Answer</xsl:text>
-</xsl:template>
-
-<xsl:template match="qandaentry" mode="title.markup">
-  <!-- qandaentrys are represented by the first question in them -->
-  <xsl:text>Question</xsl:text>
-</xsl:template>
-
-<xsl:template match="qandaset" mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:variable name="title" select="(info/title|
-                                      blockinfo/title|
-                                      title)[1]"/>
-  <xsl:choose>
-    <xsl:when test="$title">
-      <xsl:apply-templates select="$title" mode="title.markup">
-        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'QandASet'"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:choose>
-    <xsl:when test="title">
-      <xsl:apply-templates select="title" mode="title.markup">
-        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'LegalNotice'"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ============================================================ -->
-
-<xsl:template match="*" mode="titleabbrev.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:choose>
-    <xsl:when test="titleabbrev">
-      <xsl:apply-templates select="titleabbrev[1]" mode="title.markup">
-        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates select="." mode="title.markup">
-        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-        <xsl:with-param name="verbose" select="$verbose"/>
-      </xsl:apply-templates>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="book|preface|chapter|appendix" mode="titleabbrev.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:variable name="titleabbrev" select="(docinfo/titleabbrev
-                                           |bookinfo/titleabbrev
-                                           |info/titleabbrev
-                                           |prefaceinfo/titleabbrev
-                                           |chapterinfo/titleabbrev
-                                           |appendixinfo/titleabbrev
-                                           |titleabbrev)[1]"/>
-
-  <xsl:choose>
-    <xsl:when test="$titleabbrev">
-      <xsl:apply-templates select="$titleabbrev" mode="title.markup">
-        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates select="." mode="title.markup">
-        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-        <xsl:with-param name="verbose" select="$verbose"/>
-      </xsl:apply-templates>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="article" mode="titleabbrev.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:variable name="titleabbrev" select="(artheader/titleabbrev
-                                           |articleinfo/titleabbrev
-                                           |info/titleabbrev
-                                           |titleabbrev)[1]"/>
-
-  <xsl:choose>
-    <xsl:when test="$titleabbrev">
-      <xsl:apply-templates select="$titleabbrev" mode="title.markup">
-        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates select="." mode="title.markup">
-        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-        <xsl:with-param name="verbose" select="$verbose"/>
-      </xsl:apply-templates>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="section
-                     |sect1|sect2|sect3|sect4|sect5
-                     |refsect1|refsect2|refsect3
-                     |simplesect"
-              mode="titleabbrev.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:variable name="titleabbrev" select="(info/titleabbrev
-                                            |sectioninfo/titleabbrev
-                                            |sect1info/titleabbrev
-                                            |sect2info/titleabbrev
-                                            |sect3info/titleabbrev
-                                            |sect4info/titleabbrev
-                                            |sect5info/titleabbrev
-                                            |refsect1info/titleabbrev
-                                            |refsect2info/titleabbrev
-                                            |refsect3info/titleabbrev
-                                            |titleabbrev)[1]"/>
-
-  <xsl:choose>
-    <xsl:when test="$titleabbrev">
-      <xsl:apply-templates select="$titleabbrev" mode="title.markup">
-        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates select="." mode="title.markup">
-        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
-        <xsl:with-param name="verbose" select="$verbose"/>
-      </xsl:apply-templates>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="titleabbrev" mode="title.markup">
-  <xsl:param name="allow-anchors" select="0"/>
-
-  <xsl:choose>
-    <xsl:when test="$allow-anchors != 0">
-      <xsl:apply-templates/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates mode="no.anchor.mode"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ============================================================ -->
-
-<xsl:template match="*" mode="no.anchor.mode">
-  <!-- Switch to normal mode if no links -->
-  <xsl:choose>
-    <xsl:when test="descendant-or-self::footnote or
-                    descendant-or-self::anchor or
-                    descendant-or-self::ulink or
-                    descendant-or-self::link or
-                    descendant-or-self::olink or
-                    descendant-or-self::xref or
-                    descendant-or-self::indexterm">
-
-      <xsl:apply-templates mode="no.anchor.mode"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates select="."/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="footnote" mode="no.anchor.mode">
-  <!-- nop, suppressed -->
-</xsl:template>
-
-<xsl:template match="anchor" mode="no.anchor.mode">
-  <!-- nop, suppressed -->
-</xsl:template>
-
-<xsl:template match="ulink" mode="no.anchor.mode">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="link" mode="no.anchor.mode">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="olink" mode="no.anchor.mode">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="indexterm" mode="no.anchor.mode">
-  <!-- nop, suppressed -->
-</xsl:template>
-
-<xsl:template match="xref" mode="no.anchor.mode">
-  <xsl:variable name="targets" select="key('id',@linkend)"/>
-  <xsl:variable name="target" select="$targets[1]"/>
-  <xsl:variable name="refelem" select="local-name($target)"/>
-  
-  <xsl:call-template name="check.id.unique">
-    <xsl:with-param name="linkend" select="@linkend"/>
-  </xsl:call-template>
-
-  <xsl:choose>
-    <xsl:when test="count($target) = 0">
-      <xsl:message>
-        <xsl:text>XRef to nonexistent id: </xsl:text>
-        <xsl:value-of select="@linkend"/>
-      </xsl:message>
-      <xsl:text>???</xsl:text>
-    </xsl:when>
-
-    <xsl:when test="@endterm">
-      <xsl:variable name="etargets" select="key('id',@endterm)"/>
-      <xsl:variable name="etarget" select="$etargets[1]"/>
-      <xsl:choose>
-        <xsl:when test="count($etarget) = 0">
-          <xsl:message>
-            <xsl:value-of select="count($etargets)"/>
-            <xsl:text>Endterm points to nonexistent ID: </xsl:text>
-            <xsl:value-of select="@endterm"/>
-          </xsl:message>
-          <xsl:text>???</xsl:text>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates select="$etarget" mode="endterm"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-
-    <xsl:when test="$target/@xreflabel">
-      <xsl:call-template name="xref.xreflabel">
-        <xsl:with-param name="target" select="$target"/>
-      </xsl:call-template>
-    </xsl:when>
-
-    <xsl:otherwise>
-      <xsl:apply-templates select="$target" mode="xref-to-prefix"/>
-
-      <xsl:apply-templates select="$target" mode="xref-to">
-        <xsl:with-param name="referrer" select="."/>
-        <xsl:with-param name="xrefstyle">
-          <xsl:choose>
-            <xsl:when test="@role and not(@xrefstyle) and $use.role.as.xrefstyle != 0">
-              <xsl:value-of select="@role"/>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:value-of select="@xrefstyle"/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:with-param>
-      </xsl:apply-templates>
-
-      <xsl:apply-templates select="$target" mode="xref-to-suffix"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ============================================================ -->
-
-</xsl:stylesheet>
-
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/utility.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/utility.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,290 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
-                xmlns:dyn="http://exslt.org/dynamic"
-                xmlns:saxon="http://icl.com/saxon"
-                xmlns:xlink="http://www.w3.org/1999/xlink"
-                exclude-result-prefixes="doc dyn saxon"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-<doc:reference xmlns="" xml:id="utility">
-  <info>
-    <title>Common Â» Utility Template Reference</title>
-    <releaseinfo role="meta">
-      $Id$
-    </releaseinfo>
-  </info>
-  <!-- * yes, partintro is a valid child of a reference... -->
-  <partintro xml:id="partintro">
-    <title>Introduction</title>
-    <para>This is technical reference documentation for the
-      miscellaneous utility templates in the DocBook XSL
-      Stylesheets.</para>
-    <note>
-      <para>These templates are defined in a separate file from the set
-        of âcommonâ templates because some of the common templates
-        reference DocBook XSL stylesheet parameters, requiring the
-        entire set of parameters to be imported/included in any
-        stylesheet that imports/includes the common templates.</para>
-      <para>The utility templates donât import or include any DocBook
-        XSL stylesheet parameters, so the utility templates can be used
-        without importing the whole set of parameters.</para>
-    </note>
-    <para>This is not intended to be user documentation. It is
-      provided for developers writing customization layers for the
-      stylesheets.</para>
-  </partintro>
-</doc:reference>
-
-<!-- ====================================================================== -->
-
-<doc:template name="log.message" xmlns="">
-  <refpurpose>Logs/emits formatted notes and warnings</refpurpose>
-
-  <refdescription id="log.message-desc">
-    <para>The <function>log.message</function> template is a utility
-    template for logging/emitting formatted messages&#xa0;â that is,
-    notes and warnings, along with a given log âlevelâ and an
-    identifier for the âsourceâ that the message relates to.</para>
-  </refdescription>
-
-  <refparameter id="log.message-params">
-    <variablelist>
-      <varlistentry><term>level</term>
-        <listitem>
-          <para>Text to log/emit in the message-level field to
-            indicate the message level
-          (<literal>Note</literal> or
-          <literal>Warning</literal>)</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry><term>source</term>
-        <listitem>
-          <para>Text to log/emit in the source field to identify the
-            âsourceâ to which the notification/warning relates.
-            This can be any arbitrary string, but because the
-            message lacks line and column numbers to identify the
-            exact part of the source document to which it
-            relates, the intention is that the value you pass
-            into the <literal>source</literal> parameter should
-            give the user some way to identify the portion of
-            their source document on which to take potentially
-            take action in response to the log message (for
-            example, to edit, change, or add content).</para>
-          <para>So the <literal>source</literal> value should be,
-            for example, an ID, book/chapter/article title, title
-            of some formal object, or even a string giving an
-            XPath expression.</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry><term>context-desc</term>
-        <listitem>
-          <para>Text to log/emit in the context-description field to
-            describe the context for the message.</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry><term>context-desc-field-length</term>
-        <listitem>
-          <para>Specifies length of the context-description field
-            (in characters); default is 12</para>
-          <para>If the text specified by the
-            <literal>context-desc</literal> parameter is longer
-            than the number of characters specified in
-            <literal>context-desc-field-length</literal>, it is
-            truncated to <literal>context-desc-field-length</literal>
-            (12 characters by default).</para>
-          <para>If the specified text is shorter than
-            <literal>context-desc-field-length</literal>,
-          it is right-padded out to
-          <literal>context-desc-field-length</literal> (12 by
-          default).</para>
-        <para>If no value has been specified for the
-          <literal>context-desc</literal> parameter, the field is
-          left empty and the text of the log message begins with
-          the value of the <literal>message</literal>
-          parameter.</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry><term>message</term>
-        <listitem>
-          <para>Text to log/emit in the actual message field</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry><term>message-field-length</term>
-        <listitem>
-          <para>Specifies length of the message
-            field (in characters); default is 45</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refreturn id="log.message-returns">
-  <para>Outputs a message (generally, to standard error).</para></refreturn>
-</doc:template>
-<xsl:template name="log.message">
-  <xsl:param name="level"/>
-  <xsl:param name="source"/>
-  <xsl:param name="context-desc"/>
-  <xsl:param name="context-desc-field-length">12</xsl:param>
-  <xsl:param name="context-desc-padded">
-    <xsl:if test="not($context-desc = '')">
-      <xsl:call-template name="pad-string">
-        <xsl:with-param name="leftRight">right</xsl:with-param>
-        <xsl:with-param name="padVar"
-          select="substring($context-desc, 1, $context-desc-field-length)"/>
-        <xsl:with-param name="length" select="$context-desc-field-length"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:param>
-  <xsl:param name="message"/>
-  <xsl:param name="message-field-length" select="45"/>
-  <xsl:param name="message-padded">
-    <xsl:variable name="spaces-for-blank-level">
-      <!-- * if the level field is blank, we'll need to pad out -->
-      <!-- * the message field with spaces to compensate -->
-      <xsl:choose>
-        <xsl:when test="$level = ''">
-          <xsl:value-of select="4 + 2"/>
-          <!-- * 4 = hard-coded length of comment text ("Note" or "Warn") -->
-          <!-- * + 2 = length of colon-plus-space separator ": " -->
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="0"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:variable name="spaces-for-blank-context-desc">
-      <!-- * if the context-description field is blank, we'll need -->
-      <!-- * to pad out the message field with spaces to compensate -->
-      <xsl:choose>
-        <xsl:when test="$context-desc = ''">
-          <xsl:value-of select="$context-desc-field-length + 2"/>
-          <!-- * + 2 = length of colon-plus-space separator ": " -->
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="0"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:variable name="extra-spaces"
-      select="$spaces-for-blank-level + $spaces-for-blank-context-desc"/>
-    <xsl:call-template name="pad-string">
-      <xsl:with-param name="leftRight">right</xsl:with-param>
-      <xsl:with-param name="padVar"
-        select="substring($message, 1, ($message-field-length + $extra-spaces))"/>
-      <xsl:with-param name="length"
-        select="$message-field-length + $extra-spaces"/>
-    </xsl:call-template>
-  </xsl:param>
-  <!-- * emit the actual log message -->
-  <xsl:message>
-    <xsl:if test="not($level = '')">
-      <xsl:value-of select="$level"/>
-      <xsl:text>: </xsl:text>
-    </xsl:if>
-    <xsl:if test="not($context-desc = '')">
-      <xsl:value-of select="$context-desc-padded"/>
-      <xsl:text>: </xsl:text>
-    </xsl:if>
-    <xsl:value-of select="$message-padded"/>
-    <xsl:text>  </xsl:text>
-    <xsl:value-of select="$source"/>
-  </xsl:message>
-</xsl:template>
-
-<!-- ===================================== -->
-<doc:template name="get.doc.title" xmlns="">
-  <refpurpose>Gets a title from the current document</refpurpose>
-  <refdescription id="get.doc.title-desc">
-    <para>The <function>get.doc.title</function> template is a
-      utility template for returning the first title found in the
-      current document.</para>
-  </refdescription>
-  <refreturn id="get.doc.title-returns">
-  <para>Returns a string containing some identifying title for the
-    current document .</para></refreturn>
-</doc:template>
-<xsl:template name="get.doc.title">
-  <xsl:choose>
-    <xsl:when test="//*[local-name() = 'title'
-      or local-name() = 'refname']">
-      <xsl:value-of select="//*[local-name() = 'title'
-        or local-name() = 'refname'][1]"/>
-    </xsl:when>
-    <xsl:when test="substring(local-name(*[1]),
-      string-length(local-name(*[1])-3) = 'info')
-      and *[1]/*[local-name() = 'title']">
-      <xsl:value-of select="*[1]/*[local-name() = 'title'][1]"/>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ===================================== -->
-<doc:template name="pad-string" xmlns="">
-  <refpurpose>Right-pads or left-pads a string out to a certain length</refpurpose>
-  <refdescription id="pad-string-desc">
-    <para>This function takes string <parameter>padVar</parameter> and
-      pads it out in the direction <parameter>rightLeft</parameter> to
-      the string-length <parameter>length</parameter>, using string
-      <parameter>padChar</parameter> (a space character by default) as
-      the padding string (note that <parameter>padChar</parameter> can
-      be a string; it is not limited to just being a single
-      character).</para>
-    <note>
-      <para>This function began as a copy of Nate Austin's
-        <function>prepend-pad</function> function in the <link
-          xlink:href="http://www.dpawson.co.uk/xsl/sect2/padding.html" >Padding
-          Content</link> section of Dave Pawson's <link
-          xlink:href="http://www.dpawson.co.uk/xsl/index.html" >XSLT
-          FAQ</link>.</para>
-    </note>
-  </refdescription>
-  <refreturn id="pad-string-returns">
-  <para>Returns a (padded) string.</para></refreturn>
-</doc:template>
-<xsl:template name="pad-string">
-  <!-- * recursive template to right/left pad the value with -->
-  <!-- * whatever padChar is passed in -->
-  <xsl:param name="padChar" select="' '"/>
-  <xsl:param name="leftRight">left</xsl:param>
-  <xsl:param name="padVar"/>
-  <xsl:param name="length"/>
-  <xsl:choose>
-    <xsl:when test="string-length($padVar) &lt; $length">
-      <xsl:call-template name="pad-string">
-        <xsl:with-param name="padChar" select="$padChar"/>
-        <xsl:with-param name="leftRight" select="$leftRight"/>
-        <xsl:with-param name="padVar">
-          <xsl:choose>
-            <!-- * determine whether string should be -->
-            <!-- * right- or left-padded -->
-            <xsl:when test="$leftRight = 'left'">
-              <!-- * pad it to left -->
-              <xsl:value-of select="concat($padChar,$padVar)"/>
-            </xsl:when>
-            <xsl:otherwise>
-              <!-- * otherwise, right-pad the string -->
-              <xsl:value-of select="concat($padVar,$padChar)"/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:with-param>
-        <xsl:with-param name="length" select="$length"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of 
-        select="substring($padVar,string-length($padVar) - $length + 1)"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/zh_cn.xml
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/zh_cn.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,698 +1,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="zh_cn" english-language-name="Chinese Simplified">
-
-<!-- * This file is generated automatically. -->
-<!-- * To submit changes to this file upstream (to the DocBook Project) -->
-<!-- * do not submit an edited version of this file. Instead, submit an -->
-<!-- * edited version of the source file at the following location: -->
-<!-- * -->
-<!-- *  https://svn.sourceforge.net/svnroot/docbook/trunk/gentext/locale/zh_cn.xml -->
-<!-- * -->
-<!-- * E-mail the edited zh_cn.xml source file to: -->
-<!-- * -->
-<!-- *  docbook-developers@lists.sourceforge.net -->
-
-<!-- ******************************************************************** -->
-
-<!-- This file is part of the XSL DocBook Stylesheet distribution. -->
-<!-- See ../README or http://docbook.sf.net/release/xsl/current/ for -->
-<!-- copyright and other information. -->
-
-<!-- ******************************************************************** -->
-<!-- In these files, % with a letter is used for a placeholder: -->
-<!--   %t is the current element's title -->
-<!--   %s is the current element's subtitle (if applicable)-->
-<!--   %n is the current element's number label-->
-<!--   %p is the current element's page number (if applicable)-->
-<!-- ******************************************************************** -->
-
-
-<l:gentext key="Abstract" text="æèŠ"/>
-<l:gentext key="abstract" text="æèŠ"/>
-<l:gentext key="Answer" text="ç­ïŒ"/>
-<l:gentext key="answer" text="ç­ïŒ"/>
-<l:gentext key="Appendix" text="éåœ"/>
-<l:gentext key="appendix" text="éåœ"/>
-<l:gentext key="Article" text="æç« "/>
-<l:gentext key="article" text="æç« "/>
-<l:gentext key="Author" text="Author" lang="en"/>
-<l:gentext key="Bibliography" text="åèä¹Šç®"/>
-<l:gentext key="bibliography" text="åèä¹Šç®"/>
-<l:gentext key="Book" text="ä¹Š"/>
-<l:gentext key="book" text="ä¹Š"/>
-<l:gentext key="CAUTION" text="å°å¿"/>
-<l:gentext key="Caution" text="å°å¿"/>
-<l:gentext key="caution" text="å°å¿"/>
-<l:gentext key="Chapter" text="ç« "/>
-<l:gentext key="chapter" text="ç« "/>
-<l:gentext key="Colophon" text="Colophon"/>
-<l:gentext key="colophon" text="Colophon"/>
-<l:gentext key="Copyright" text="çæ"/>
-<l:gentext key="copyright" text="çæ"/>
-<l:gentext key="Dedication" text="é¢è¯"/>
-<l:gentext key="dedication" text="é¢è¯"/>
-<l:gentext key="Edition" text="ç"/>
-<l:gentext key="edition" text="ç"/>
-<l:gentext key="Editor" text="çŒè
-"/>
-<l:gentext key="Equation" text="å
-¬åŒ"/>
-<l:gentext key="equation" text="å
-¬åŒ"/>
-<l:gentext key="Example" text="äŸ"/>
-<l:gentext key="example" text="äŸ"/>
-<l:gentext key="Figure" text="åŸ"/>
-<l:gentext key="figure" text="åŸ"/>
-<l:gentext key="Glossary" text="æ¯è¯­è¡š"/>
-<l:gentext key="glossary" text="æ¯è¯­è¡š"/>
-<l:gentext key="GlossSee" text="è§"/>
-<l:gentext key="glosssee" text="è§"/>
-<l:gentext key="GlossSeeAlso" text="åè§"/>
-<l:gentext key="glossseealso" text="åè§"/>
-<l:gentext key="IMPORTANT" text="éèŠ"/>
-<l:gentext key="important" text="éèŠ"/>
-<l:gentext key="Important" text="éèŠ"/>
-<l:gentext key="Index" text="çŽ¢åŒ"/>
-<l:gentext key="index" text="çŽ¢åŒ"/>
-<l:gentext key="ISBN" text="ISBN"/>
-<l:gentext key="isbn" text="ISBN"/>
-<l:gentext key="LegalNotice" text="æ³åŸéå"/>
-<l:gentext key="legalnotice" text="æ³åŸéå"/>
-<l:gentext key="MsgAud" text="åäŒ"/>
-<l:gentext key="msgaud" text="åäŒ"/>
-<l:gentext key="MsgLevel" text="çº§å«"/>
-<l:gentext key="msglevel" text="çº§å«"/>
-<l:gentext key="MsgOrig" text="åºå€"/>
-<l:gentext key="msgorig" text="åºå€"/>
-<l:gentext key="NOTE" text="æ³šæ"/>
-<l:gentext key="Note" text="æ³šæ"/>
-<l:gentext key="note" text="æ³šæ"/>
-<l:gentext key="Part" text="éšå"/>
-<l:gentext key="part" text="éšå"/>
-<l:gentext key="Preface" text="åèš"/>
-<l:gentext key="preface" text="åèš"/>
-<l:gentext key="Procedure" text="è¿çš"/>
-<l:gentext key="procedure" text="è¿çš"/>
-<l:gentext key="ProductionSet" text="äº§å"/>
-<l:gentext key="PubDate" text="åºçæ¥æ"/>
-<l:gentext key="pubdate" text="åºçæ¥æ"/>
-<l:gentext key="Published" text="åºçæ¹"/>
-<l:gentext key="published" text="åºçæ¹"/>
-<l:gentext key="Publisher" text="åºçè
-"/>
-<l:gentext key="Qandadiv" text="èŽšä¿"/>
-<l:gentext key="qandadiv" text="èŽšä¿"/>
-<l:gentext key="QandASet" text="åžžè§é®é¢"/>
-<l:gentext key="Question" text="é®ïŒ"/>
-<l:gentext key="question" text="é®ïŒ"/>
-<l:gentext key="RefEntry" text=""/>
-<l:gentext key="refentry" text=""/>
-<l:gentext key="Reference" text="åè"/>
-<l:gentext key="reference" text="åè"/>
-<l:gentext key="References" text="åè"/>
-<l:gentext key="RefName" text="åç§°"/>
-<l:gentext key="refname" text="åç§°"/>
-<l:gentext key="RefSection" text=""/>
-<l:gentext key="refsection" text=""/>
-<l:gentext key="RefSynopsisDiv" text="å€§çº²"/>
-<l:gentext key="refsynopsisdiv" text="å€§çº²"/>
-<l:gentext key="RevHistory" text="ä¿®è®¢åå²"/>
-<l:gentext key="revhistory" text="ä¿®è®¢åå²"/>
-<l:gentext key="revision" text="ä¿®è®¢"/>
-<l:gentext key="Revision" text="ä¿®è®¢"/>
-<l:gentext key="sect1" text="è"/>
-<l:gentext key="sect2" text="è"/>
-<l:gentext key="sect3" text="è"/>
-<l:gentext key="sect4" text="è"/>
-<l:gentext key="sect5" text="è"/>
-<l:gentext key="section" text="è"/>
-<l:gentext key="Section" text="è"/>
-<l:gentext key="see" text="è§"/>
-<l:gentext key="See" text="è§"/>
-<l:gentext key="seealso" text="åè§"/>
-<l:gentext key="Seealso" text="åè§"/>
-<l:gentext key="SeeAlso" text="åè§"/>
-<l:gentext key="set" text="Set"/>
-<l:gentext key="Set" text="Set"/>
-<l:gentext key="setindex" text="Set Index"/>
-<l:gentext key="SetIndex" text="Set Index"/>
-<l:gentext key="Sidebar" text=""/>
-<l:gentext key="sidebar" text="sidebar"/>
-<l:gentext key="step" text="æ­¥éª€"/>
-<l:gentext key="Step" text="æ­¥éª€"/>
-<l:gentext key="table" text="è¡š"/>
-<l:gentext key="Table" text="è¡š"/>
-<l:gentext key="task" text="ä»»å¡"/>
-<l:gentext key="Task" text="ä»»å¡"/>
-<l:gentext key="tip" text="æç€º"/>
-<l:gentext key="TIP" text="æç€º"/>
-<l:gentext key="Tip" text="æç€º"/>
-<l:gentext key="Warning" text="è­Šå"/>
-<l:gentext key="warning" text="è­Šå"/>
-<l:gentext key="WARNING" text="è­Šå"/>
-<l:gentext key="and" text="å"/>
-<l:gentext key="by" text="ç±"/>
-<l:gentext key="Edited" text="çŒèŸæ¶éŽ"/>
-<l:gentext key="edited" text="çŒèŸæ¶éŽ"/>
-<l:gentext key="Editedby" text="çŒèŸè
-"/>
-<l:gentext key="editedby" text="çŒèŸè
-"/>
-<l:gentext key="in" text="äº"/>
-<l:gentext key="lastlistcomma" text=""/>
-<l:gentext key="listcomma" text="ã"/>
-<l:gentext key="nonexistantelement" text="äžå­åšçå
-çŽ "/>
-<l:gentext key="notes" text="å€æ³š"/>
-<l:gentext key="Notes" text="å€æ³š"/>
-<l:gentext key="Pgs" text="é¡µ"/>
-<l:gentext key="pgs" text="é¡µ"/>
-<l:gentext key="Revisedby" text="ä¿®è®¢è
-ïŒ"/>
-<l:gentext key="revisedby" text="ä¿®è®¢è
-ïŒ"/>
-<l:gentext key="TableNotes" text="è¡šæ³š"/>
-<l:gentext key="tablenotes" text="è¡šæ³š"/>
-<l:gentext key="TableofContents" text="ç®åœ"/>
-<l:gentext key="tableofcontents" text="ç®åœ"/>
-<l:gentext key="unexpectedelementname" text="æªé¢æçåç§°"/>
-<l:gentext key="unsupported" text="äžæ¯æ"/>
-<l:gentext key="xrefto" text="xref to"/>
-<l:gentext key="Authors" text="äœè
-"/>
-<l:gentext key="copyeditor" text="çæçŒèŸ"/>
-<l:gentext key="graphicdesigner" text="çŸæ¯çŒèŸ"/>
-<l:gentext key="productioneditor" text="äº§åçŒèŸ"/>
-<l:gentext key="technicaleditor" text="ææ¯çŒèŸ"/>
-<l:gentext key="translator" text="è¯è
-"/>
-<l:gentext key="listofequations" text="å
-¬åŒæž
-å"/>
-<l:gentext key="ListofEquations" text="å
-¬åŒæž
-å"/>
-<l:gentext key="ListofExamples" text="èäŸæž
-å"/>
-<l:gentext key="listofexamples" text="èäŸæž
-å"/>
-<l:gentext key="ListofFigures" text="æåŸæž
-å"/>
-<l:gentext key="listoffigures" text="æåŸæž
-å"/>
-<l:gentext key="ListofProcedures" text="è¿çšæž
-å"/>
-<l:gentext key="listofprocedures" text="è¿çšæž
-å"/>
-<l:gentext key="listoftables" text="è¡šæ Œæž
-å"/>
-<l:gentext key="ListofTables" text="è¡šæ Œæž
-å"/>
-<l:gentext key="ListofUnknown" text="æªç¥æž
-å"/>
-<l:gentext key="listofunknown" text="æªç¥æž
-å"/>
-<l:gentext key="nav-home" text="èµ·å§é¡µ"/>
-<l:gentext key="nav-next" text="äžäžé¡µ"/>
-<l:gentext key="nav-next-sibling" text="å¿«è¿"/>
-<l:gentext key="nav-prev" text="äžäžé¡µ"/>
-<l:gentext key="nav-prev-sibling" text="å¿«é"/>
-<l:gentext key="nav-up" text="äžäžçº§"/>
-<l:gentext key="nav-toc" text="ç®åœ"/>
-<l:gentext key="Draft" text="èçš¿"/>
-<l:gentext key="above" text="ä»¥äž"/>
-<l:gentext key="below" text="ä»¥äž"/>
-<l:gentext key="sectioncalled" text="äžè"/>
-<l:gentext key="index symbols" text="ç¬Šå·"/>
-<l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz"/>
-<l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/>
-<l:gentext key="normalize.sort.input" text="AaÃÃ ÃÃ¡ÃÃ¢ÃÃ£ÃÃ€Ã
-Ã¥ÄÄÄÄÄÄ
-ÇÇÇÇÇ Ç¡ÇºÇ»ÈÈÈÈÈŠÈ§ážážáºáº áº¡áº¢áº£áº€áº¥áºŠáº§áºšáº©áºªáº«áº¬áº­áº®áº¯áº°áº±áº²áº³áºŽáºµáº¶áº·BbÆÆÉÆÆážážážáž
-ážážCcÃÃ§ÄÄÄÄÄÄÄÄÆÆÉážážDdÄÄÄÄÆÉÆÆÇ
-Ç²È¡ÉážážážážážážážážážážEeÃÃšÃÃ©ÃÃªÃÃ«ÄÄÄÄÄÄÄÄÄÄÈÈ
-ÈÈÈšÈ©ážážážážážážážážážážáºžáº¹áººáº»áºŒáºœáºŸáº¿á»á»á»á»á»á»
-á»á»FfÆÆážážGgÄÄÄÄÄ Ä¡Ä¢Ä£ÆÉ Ç€Ç¥ÇŠÇ§ÇŽÇµáž áž¡HhÄ€Ä¥ÄŠÄ§ÈÈÉŠáž¢áž£áž€áž¥ážŠáž§ážšáž©ážªáž«áºIiÃÃ¬ÃÃ­ÃÃ®ÃÃ¯ÄšÄ©ÄªÄ«Ä¬Ä­Ä®Ä¯Ä°ÆÉšÇÇÈÈÈÈáž¬áž­áž®áž¯á»á»á»á»JjÄŽÄµÇ°ÊKkÄ¶Ä·ÆÆÇšÇ©áž°áž±áž²áž³ážŽážµLlÄ¹ÄºÄ»ÄŒÄœÄŸÄ¿ÅÅÅÆÇÈŽÉ«É¬É­áž¶áž·ážžáž¹ážºáž»ážŒážœMmÉ±ážŸáž¿á¹á¹á¹á¹NnÃÃ±ÅÅÅ
-ÅÅÅÆÉ²ÆÈ ÇÇžÇ¹ÈµÉ³á¹á¹
-á¹á¹á¹á¹á¹á¹OoÃÃ²ÃÃ³ÃÃŽÃÃµÃÃ¶ÃÃžÅÅÅÅÅÅÆÆ Æ¡ÇÇÇªÇ«Ç¬Ç­ÇŸÇ¿ÈÈÈÈÈªÈ«È¬È­È®È¯È°È±á¹á¹á¹á¹á¹á¹á¹á¹á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á» á»¡á»¢á»£PpÆ€Æ¥á¹á¹á¹á¹QqÊ RrÅÅÅÅÅÅÈÈÈÈÉŒÉœÉŸá¹á¹á¹á¹á¹á¹á¹á¹SsÅÅÅÅÅÅÅ Å¡ÈÈÊá¹ á¹¡á¹¢á¹£á¹€á¹¥á¹Šá¹§á¹šá¹©TtÅ¢Å£Å€Å¥ÅŠÅ§Æ«Æ¬Æ­Æ®ÊÈÈÈ¶á¹ªá¹«á¹¬á¹­á¹®á¹¯á¹°á¹±áºUuÃÃ¹ÃÃºÃÃ»ÃÃŒÅšÅ©ÅªÅ«Å¬Å­Å®Å¯Å°Å±Å²Å³Æ¯Æ°ÇÇÇÇÇÇÇÇÇÇÈÈÈÈá¹²á¹³á¹Žá¹µá¹¶á¹·á¹žá¹¹á¹ºá¹»á»€á»¥á»Šá»§á»šá»©á»ªá»«á»¬á»­á»®á»¯á»°á»±VvÆ²Êá¹Œá¹œá¹Ÿá¹¿WwÅŽÅµáºáºáºáºáºáº
-áºáºáºáºáºXxáºáºáºáºYyÃÃœÃ¿ÅžÅ¶Å·Æ³ÆŽÈ²È³áºáºáºá»²á»³á»Žá»µá»¶á»·á»žá»¹ZzÅ¹ÅºÅ»ÅŒÅœÅŸÆµÆ¶È€È¥ÊÊáºáºáºáºáºáºáº" lang="en"/>
-<l:gentext key="normalize.sort.output" text="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ" lang="en"/>
-<l:dingbat key="startquote" text="â"/>
-<l:dingbat key="endquote" text="â"/>
-<l:dingbat key="nestedstartquote" text="â"/>
-<l:dingbat key="nestedendquote" text="â"/>
-<l:dingbat key="singlestartquote" text="â"/>
-<l:dingbat key="singleendquote" text="â"/>
-<l:dingbat key="bullet" text="Â·"/>
-<l:gentext key="hyphenation-character" text="-"/>
-<l:gentext key="hyphenation-push-character-count" text="2"/>
-<l:gentext key="hyphenation-remain-character-count" text="2"/>
-<l:context name="styles"><l:template name="person-name" text="first-last"/>
-</l:context>
-<l:context name="title"><l:template name="abstract" text="%t"/>
-<l:template name="answer" text="%t"/>
-<l:template name="appendix" text="éåœÂ %n.Â %t"/>
-<l:template name="article" text="%t"/>
-<l:template name="authorblurb" text="%t"/>
-<l:template name="bibliodiv" text="%t"/>
-<l:template name="biblioentry" text="%t"/>
-<l:template name="bibliography" text="%t"/>
-<l:template name="bibliolist" text="%t"/>
-<l:template name="bibliomixed" text="%t"/>
-<l:template name="bibliomset" text="%t"/>
-<l:template name="biblioset" text="%t"/>
-<l:template name="blockquote" text="%t"/>
-<l:template name="book" text="%t"/>
-<l:template name="calloutlist" text="%t"/>
-<l:template name="caution" text="%t"/>
-<l:template name="chapter" text="ç¬¬Â %nÂ ç« Â %t"/>
-<l:template name="colophon" text="%t"/>
-<l:template name="dedication" text="%t"/>
-<l:template name="equation" text="å
-¬åŒÂ %n.Â %t"/>
-<l:template name="example" text="äŸÂ %n.Â %t"/>
-<l:template name="figure" text="åŸÂ %n.Â %t"/>
-<l:template name="foil" text="%t" lang="en"/>
-<l:template name="foilgroup" text="%t" lang="en"/>
-<l:template name="formalpara" text="%t"/>
-<l:template name="glossary" text="%t"/>
-<l:template name="glossdiv" text="%t"/>
-<l:template name="glosslist" text="%t"/>
-<l:template name="glossentry" text="%t"/>
-<l:template name="important" text="%t"/>
-<l:template name="index" text="%t"/>
-<l:template name="indexdiv" text="%t"/>
-<l:template name="itemizedlist" text="%t"/>
-<l:template name="legalnotice" text="%t"/>
-<l:template name="listitem" text=""/>
-<l:template name="lot" text="%t"/>
-<l:template name="msg" text="%t"/>
-<l:template name="msgexplan" text="%t"/>
-<l:template name="msgmain" text="%t"/>
-<l:template name="msgrel" text="%t"/>
-<l:template name="msgset" text="%t"/>
-<l:template name="msgsub" text="%t"/>
-<l:template name="note" text="%t"/>
-<l:template name="orderedlist" text="%t"/>
-<l:template name="part" text="ç¬¬Â %nÂ éšåÂ %t"/>
-<l:template name="partintro" text="%t"/>
-<l:template name="preface" text="%t"/>
-<l:template name="procedure" text="%t"/>
-<l:template name="procedure.formal" text="è¿çšÂ %n.Â %t"/>
-<l:template name="productionset" text="%t"/>
-<l:template name="productionset.formal" text="äº§åÂ %n"/>
-<l:template name="qandadiv" text="%t"/>
-<l:template name="qandaentry" text="%t"/>
-<l:template name="qandaset" text="%t"/>
-<l:template name="question" text="%t"/>
-<l:template name="refentry" text="%t"/>
-<l:template name="reference" text="%t"/>
-<l:template name="refsection" text="%t"/>
-<l:template name="refsect1" text="%t"/>
-<l:template name="refsect2" text="%t"/>
-<l:template name="refsect3" text="%t"/>
-<l:template name="refsynopsisdiv" text="%t"/>
-<l:template name="refsynopsisdivinfo" text="%t"/>
-<l:template name="segmentedlist" text="%t"/>
-<l:template name="set" text="%t"/>
-<l:template name="setindex" text="%t"/>
-<l:template name="sidebar" text="%t"/>
-<l:template name="step" text="%t"/>
-<l:template name="table" text="è¡šÂ %n.Â %t"/>
-<l:template name="task" text="%t"/>
-<l:template name="tasksummary" text="%t" lang="en"/>
-<l:template name="taskprerequisites" text="%t" lang="en"/>
-<l:template name="taskrelated" text="%t" lang="en"/>
-<l:template name="tip" text="%t"/>
-<l:template name="toc" text="%t"/>
-<l:template name="variablelist" text="%t"/>
-<l:template name="varlistentry" text=""/>
-<l:template name="warning" text="%t"/>
-</l:context>
-<l:context name="title-unnumbered"><l:template name="appendix" text="%t"/>
-<l:template name="article/appendix" text="%t"/>
-<l:template name="bridgehead" text="%t"/>
-<l:template name="chapter" text="%t"/>
-<l:template name="sect1" text="%t"/>
-<l:template name="sect2" text="%t"/>
-<l:template name="sect3" text="%t"/>
-<l:template name="sect4" text="%t"/>
-<l:template name="sect5" text="%t"/>
-<l:template name="section" text="%t"/>
-<l:template name="simplesect" text="%t"/>
-<l:template name="part" text="%t" lang="en"/>
-</l:context>
-<l:context name="title-numbered"><l:template name="appendix" text="éåœÂ %n.Â %t"/>
-<l:template name="article/appendix" text="%n.Â %t"/>
-<l:template name="bridgehead" text="%n.Â %t"/>
-<l:template name="chapter" text="ç¬¬Â %nÂ ç« Â %t"/>
-<l:template name="part" text="éšåÂ %n.Â %t"/>
-<l:template name="sect1" text="%n.Â %t"/>
-<l:template name="sect2" text="%n.Â %t"/>
-<l:template name="sect3" text="%n.Â %t"/>
-<l:template name="sect4" text="%n.Â %t"/>
-<l:template name="sect5" text="%n.Â %t"/>
-<l:template name="section" text="%n.Â %t"/>
-<l:template name="simplesect" text="%t"/>
-</l:context>
-<l:context name="subtitle"><l:template name="appendix" text="%s"/>
-<l:template name="article" text="%s"/>
-<l:template name="bibliodiv" text="%s"/>
-<l:template name="biblioentry" text="%s"/>
-<l:template name="bibliography" text="%s"/>
-<l:template name="bibliomixed" text="%s"/>
-<l:template name="bibliomset" text="%s"/>
-<l:template name="biblioset" text="%s"/>
-<l:template name="book" text="%s"/>
-<l:template name="chapter" text="%s"/>
-<l:template name="colophon" text="%s"/>
-<l:template name="dedication" text="%s"/>
-<l:template name="glossary" text="%s"/>
-<l:template name="glossdiv" text="%s"/>
-<l:template name="index" text="%s"/>
-<l:template name="indexdiv" text="%s"/>
-<l:template name="lot" text="%s"/>
-<l:template name="part" text="%s"/>
-<l:template name="partintro" text="%s"/>
-<l:template name="preface" text="%s"/>
-<l:template name="refentry" text="%s"/>
-<l:template name="reference" text="%s"/>
-<l:template name="refsection" text="%s"/>
-<l:template name="refsect1" text="%s"/>
-<l:template name="refsect2" text="%s"/>
-<l:template name="refsect3" text="%s"/>
-<l:template name="refsynopsisdiv" text="%s"/>
-<l:template name="sect1" text="%s"/>
-<l:template name="sect2" text="%s"/>
-<l:template name="sect3" text="%s"/>
-<l:template name="sect4" text="%s"/>
-<l:template name="sect5" text="%s"/>
-<l:template name="section" text="%s"/>
-<l:template name="set" text="%s"/>
-<l:template name="setindex" text="%s"/>
-<l:template name="sidebar" text="%s"/>
-<l:template name="simplesect" text="%s"/>
-<l:template name="toc" text="%s"/>
-</l:context>
-<l:context name="xref"><l:template name="abstract" text="%t"/>
-<l:template name="answer" text="ç­ïŒÂ %n"/>
-<l:template name="appendix" text="%t"/>
-<l:template name="article" text="%t"/>
-<l:template name="authorblurb" text="%t"/>
-<l:template name="bibliodiv" text="%t"/>
-<l:template name="bibliography" text="%t"/>
-<l:template name="bibliomset" text="%t"/>
-<l:template name="biblioset" text="%t"/>
-<l:template name="blockquote" text="%t"/>
-<l:template name="book" text="%t"/>
-<l:template name="calloutlist" text="%t"/>
-<l:template name="caution" text="%t"/>
-<l:template name="chapter" text="%t"/>
-<l:template name="colophon" text="%t"/>
-<l:template name="constraintdef" text="%t"/>
-<l:template name="dedication" text="%t"/>
-<l:template name="equation" text="%t"/>
-<l:template name="example" text="%t"/>
-<l:template name="figure" text="%t"/>
-<l:template name="foil" text="%t" lang="en"/>
-<l:template name="foilgroup" text="%t" lang="en"/>
-<l:template name="formalpara" text="%t"/>
-<l:template name="glossary" text="%t"/>
-<l:template name="glossdiv" text="%t"/>
-<l:template name="important" text="%t"/>
-<l:template name="index" text="%t"/>
-<l:template name="indexdiv" text="%t"/>
-<l:template name="itemizedlist" text="%t"/>
-<l:template name="legalnotice" text="%t"/>
-<l:template name="listitem" text="%n"/>
-<l:template name="lot" text="%t"/>
-<l:template name="msg" text="%t"/>
-<l:template name="msgexplan" text="%t"/>
-<l:template name="msgmain" text="%t"/>
-<l:template name="msgrel" text="%t"/>
-<l:template name="msgset" text="%t"/>
-<l:template name="msgsub" text="%t"/>
-<l:template name="note" text="%t"/>
-<l:template name="orderedlist" text="%t"/>
-<l:template name="part" text="%t"/>
-<l:template name="partintro" text="%t"/>
-<l:template name="preface" text="%t"/>
-<l:template name="procedure" text="%t"/>
-<l:template name="productionset" text="%t"/>
-<l:template name="qandadiv" text="%t"/>
-<l:template name="qandaentry" text="é®ïŒÂ %n"/>
-<l:template name="qandaset" text="%t"/>
-<l:template name="question" text="é®ïŒÂ %n"/>
-<l:template name="reference" text="%t"/>
-<l:template name="refsynopsisdiv" text="%t"/>
-<l:template name="segmentedlist" text="%t"/>
-<l:template name="set" text="%t"/>
-<l:template name="setindex" text="%t"/>
-<l:template name="sidebar" text="%t"/>
-<l:template name="table" text="%t"/>
-<l:template name="task" text="%t" lang="en"/>
-<l:template name="tip" text="%t"/>
-<l:template name="toc" text="%t"/>
-<l:template name="variablelist" text="%t"/>
-<l:template name="varlistentry" text="%n"/>
-<l:template name="warning" text="%t"/>
-<l:template name="olink.document.citation" text=" in %o" lang="en"/>
-<l:template name="olink.page.citation" text=" (page %p)" lang="en"/>
-<l:template name="page.citation" text=" [%p]"/>
-<l:template name="page" text="(ç¬¬ %p é¡µ)"/>
-<l:template name="docname" text=" in %o" lang="en"/>
-<l:template name="docnamelong" text=" in the document titled %o" lang="en"/>
-<l:template name="pageabbrev" text="(ç¬¬ %p é¡µ)"/>
-<l:template name="Page" text="ç¬¬ %p é¡µ"/>
-<l:template name="bridgehead" text="â%tâäžè"/>
-<l:template name="refsection" text="â%tâäžè"/>
-<l:template name="refsect1" text="â%tâäžè"/>
-<l:template name="refsect2" text="â%tâäžè"/>
-<l:template name="refsect3" text="â%tâäžè"/>
-<l:template name="sect1" text="â%tâäžè"/>
-<l:template name="sect2" text="â%tâäžè"/>
-<l:template name="sect3" text="â%tâäžè"/>
-<l:template name="sect4" text="â%tâäžè"/>
-<l:template name="sect5" text="â%tâäžè"/>
-<l:template name="section" text="â%tâäžè"/>
-<l:template name="simplesect" text="â%tâäžè"/>
-</l:context>
-<l:context name="xref-number"><l:template name="answer" text="ç­ïŒÂ %n"/>
-<l:template name="appendix" text="éåœÂ %n"/>
-<l:template name="bridgehead" text="ç¬¬Â %nÂ è"/>
-<l:template name="chapter" text="ç¬¬Â %nÂ ç« "/>
-<l:template name="equation" text="å
-¬åŒÂ %n"/>
-<l:template name="example" text="äŸÂ %n"/>
-<l:template name="figure" text="åŸÂ %n"/>
-<l:template name="part" text="ç¬¬Â %nÂ éšå"/>
-<l:template name="procedure" text="è¿çšÂ %n"/>
-<l:template name="productionset" text="äº§åÂ %n"/>
-<l:template name="qandadiv" text="èŽšä¿Â %n"/>
-<l:template name="qandaentry" text="é®ïŒÂ %n"/>
-<l:template name="question" text="é®ïŒÂ %n"/>
-<l:template name="sect1" text="ç¬¬Â %nÂ è"/>
-<l:template name="sect2" text="ç¬¬Â %nÂ è"/>
-<l:template name="sect3" text="ç¬¬Â %nÂ è"/>
-<l:template name="sect4" text="ç¬¬Â %nÂ è"/>
-<l:template name="sect5" text="ç¬¬Â %nÂ è"/>
-<l:template name="section" text="ç¬¬Â %nÂ è"/>
-<l:template name="table" text="è¡šÂ %n"/>
-</l:context>
-<l:context name="xref-number-and-title"><l:template name="appendix" text="éåœÂ %n, %t"/>
-<l:template name="bridgehead" text="ç¬¬Â %nÂ è â%tâ"/>
-<l:template name="chapter" text="ç¬¬Â %nÂ ç«  %t"/>
-<l:template name="equation" text="å
-¬åŒÂ %n â%tâ"/>
-<l:template name="example" text="äŸÂ %n â%tâ"/>
-<l:template name="figure" text="åŸÂ %n â%tâ"/>
-<l:template name="part" text="ç¬¬Â %nÂ éšå â%tâ"/>
-<l:template name="procedure" text="è¿çšÂ %n, â%tâ"/>
-<l:template name="productionset" text="äº§åÂ %n, â%tâ"/>
-<l:template name="qandadiv" text="èŽšä¿Â %n, â%tâ"/>
-<l:template name="refsect1" text="â%tâäžè"/>
-<l:template name="refsect2" text="â%tâäžè"/>
-<l:template name="refsect3" text="â%tâäžè"/>
-<l:template name="refsection" text="â%tâäžè"/>
-<l:template name="sect1" text="ç¬¬Â %nÂ è â%tâ"/>
-<l:template name="sect2" text="ç¬¬Â %nÂ è â%tâ"/>
-<l:template name="sect3" text="ç¬¬Â %nÂ è â%tâ"/>
-<l:template name="sect4" text="ç¬¬Â %nÂ è â%tâ"/>
-<l:template name="sect5" text="ç¬¬Â %nÂ è â%tâ"/>
-<l:template name="section" text="ç¬¬Â %nÂ è â%tâ"/>
-<l:template name="simplesect" text="â%tâäžè"/>
-<l:template name="table" text="è¡šÂ %n â%tâ"/>
-</l:context>
-<l:context name="authorgroup"><l:template name="sep" text="ã"/>
-<l:template name="sep2" text="å"/>
-<l:template name="seplast" text="å"/>
-</l:context>
-<l:context name="glossary"><l:template name="see" text="è§%t"/>
-<l:template name="seealso" text="åè§%t"/>
-</l:context>
-<l:context name="msgset"><l:template name="MsgAud" text="åäŒïŒ"/>
-<l:template name="MsgLevel" text="çº§å«ïŒ"/>
-<l:template name="MsgOrig" text="åºå€ïŒ"/>
-</l:context>
-<l:context name="datetime"><l:template name="format" text="Y-m-d"/>
-</l:context>
-<l:context name="termdef"><l:template name="prefix" text="[Definition: " lang="en"/>
-<l:template name="suffix" text="]" lang="en"/>
-</l:context>
-<l:context name="datetime-full"><l:template name="January" text="äžæ"/>
-<l:template name="February" text="äºæ"/>
-<l:template name="March" text="äžæ"/>
-<l:template name="April" text="åæ"/>
-<l:template name="May" text="äºæ"/>
-<l:template name="June" text="å
-­æ"/>
-<l:template name="July" text="äžæ"/>
-<l:template name="August" text="å
-«æ"/>
-<l:template name="September" text="ä¹æ"/>
-<l:template name="October" text="åæ"/>
-<l:template name="November" text="åäžæ"/>
-<l:template name="December" text="åäºæ"/>
-<l:template name="Monday" text="ææäž"/>
-<l:template name="Tuesday" text="ææäº"/>
-<l:template name="Wednesday" text="ææäž"/>
-<l:template name="Thursday" text="ææå"/>
-<l:template name="Friday" text="ææäº"/>
-<l:template name="Saturday" text="ææå
-­"/>
-<l:template name="Sunday" text="æææ¥"/>
-</l:context>
-<l:context name="datetime-abbrev"><l:template name="Jan" text="äžæ"/>
-<l:template name="Feb" text="äºæ"/>
-<l:template name="Mar" text="äžæ"/>
-<l:template name="Apr" text="åæ"/>
-<l:template name="May" text="äºæ"/>
-<l:template name="Jun" text="å
-­æ"/>
-<l:template name="Jul" text="äžæ"/>
-<l:template name="Aug" text="å
-«æ"/>
-<l:template name="Sep" text="ä¹æ"/>
-<l:template name="Oct" text="åæ"/>
-<l:template name="Nov" text="åäžæ"/>
-<l:template name="Dec" text="åäºæ"/>
-<l:template name="Mon" text="åšäž"/>
-<l:template name="Tue" text="åšäº"/>
-<l:template name="Wed" text="åšäž"/>
-<l:template name="Thu" text="åšå"/>
-<l:template name="Fri" text="åšäº"/>
-<l:template name="Sat" text="åšå
-­"/>
-<l:template name="Sun" text="åšæ¥"/>
-</l:context>
-<l:context name="htmlhelp"><l:template name="langcode" text="0x0804 Chinese (CHINA)"/>
-</l:context>
-<l:context name="index"><l:template name="term-separator" text=", " lang="en"/>
-<l:template name="number-separator" text=", " lang="en"/>
-<l:template name="range-separator" text="-" lang="en"/>
-</l:context>
-<l:context name="iso690"><l:template name="lastfirst.sep" text=", " lang="en"/>
-<l:template name="alt.person.two.sep" text=" â " lang="en"/>
-<l:template name="alt.person.last.sep" text=" â " lang="en"/>
-<l:template name="alt.person.more.sep" text=" â " lang="en"/>
-<l:template name="primary.editor" text=" (ed.)" lang="en"/>
-<l:template name="primary.many" text=", et al." lang="en"/>
-<l:template name="primary.sep" text=". " lang="en"/>
-<l:template name="submaintitle.sep" text=": " lang="en"/>
-<l:template name="title.sep" text=". " lang="en"/>
-<l:template name="othertitle.sep" text=", " lang="en"/>
-<l:template name="medium1" text=" [" lang="en"/>
-<l:template name="medium2" text="]" lang="en"/>
-<l:template name="secondary.person.sep" text="; " lang="en"/>
-<l:template name="secondary.sep" text=". " lang="en"/>
-<l:template name="respons.sep" text=". " lang="en"/>
-<l:template name="edition.sep" text=". " lang="en"/>
-<l:template name="edition.serial.sep" text=", " lang="en"/>
-<l:template name="issuing.range" text="-" lang="en"/>
-<l:template name="issuing.div" text=", " lang="en"/>
-<l:template name="issuing.sep" text=". " lang="en"/>
-<l:template name="partnr.sep" text=". " lang="en"/>
-<l:template name="placepubl.sep" text=": " lang="en"/>
-<l:template name="publyear.sep" text=", " lang="en"/>
-<l:template name="pubinfo.sep" text=". " lang="en"/>
-<l:template name="spec.pubinfo.sep" text=", " lang="en"/>
-<l:template name="upd.sep" text=", " lang="en"/>
-<l:template name="datecit1" text=" [cited " lang="en"/>
-<l:template name="datecit2" text="]" lang="en"/>
-<l:template name="extent.sep" text=". " lang="en"/>
-<l:template name="locs.sep" text=", " lang="en"/>
-<l:template name="location.sep" text=". " lang="en"/>
-<l:template name="serie.sep" text=". " lang="en"/>
-<l:template name="notice.sep" text=". " lang="en"/>
-<l:template name="access" text="Available " lang="en"/>
-<l:template name="acctoo" text="Also available " lang="en"/>
-<l:template name="onwww" text="from World Wide Web" lang="en"/>
-<l:template name="oninet" text="from Internet" lang="en"/>
-<l:template name="access.end" text=": " lang="en"/>
-<l:template name="link1" text="&lt;" lang="en"/>
-<l:template name="link2" text="&gt;" lang="en"/>
-<l:template name="access.sep" text=". " lang="en"/>
-<l:template name="isbn" text="ISBN " lang="en"/>
-<l:template name="issn" text="ISSN " lang="en"/>
-<l:template name="stdnum.sep" text=". " lang="en"/>
-<l:template name="patcountry.sep" text=". " lang="en"/>
-<l:template name="pattype.sep" text=", " lang="en"/>
-<l:template name="patnum.sep" text=". " lang="en"/>
-<l:template name="patdate.sep" text=". " lang="en"/>
-</l:context><l:letters><l:l i="-1"/>
-<l:l i="0">å
-¶å®</l:l>
-<l:l i="10">A</l:l>
-<l:l i="10">a</l:l>
-<l:l i="20">B</l:l>
-<l:l i="20">b</l:l>
-<l:l i="30">C</l:l>
-<l:l i="30">c</l:l>
-<l:l i="40">D</l:l>
-<l:l i="40">d</l:l>
-<l:l i="50">E</l:l>
-<l:l i="50">e</l:l>
-<l:l i="60">F</l:l>
-<l:l i="60">f</l:l>
-<l:l i="70">G</l:l>
-<l:l i="70">g</l:l>
-<l:l i="80">H</l:l>
-<l:l i="80">h</l:l>
-<l:l i="90">I</l:l>
-<l:l i="90">i</l:l>
-<l:l i="100">J</l:l>
-<l:l i="100">j</l:l>
-<l:l i="110">K</l:l>
-<l:l i="110">k</l:l>
-<l:l i="120">L</l:l>
-<l:l i="120">l</l:l>
-<l:l i="130">M</l:l>
-<l:l i="130">m</l:l>
-<l:l i="140">N</l:l>
-<l:l i="140">n</l:l>
-<l:l i="150">O</l:l>
-<l:l i="150">o</l:l>
-<l:l i="160">P</l:l>
-<l:l i="160">p</l:l>
-<l:l i="170">Q</l:l>
-<l:l i="170">q</l:l>
-<l:l i="180">R</l:l>
-<l:l i="180">r</l:l>
-<l:l i="190">S</l:l>
-<l:l i="190">s</l:l>
-<l:l i="200">T</l:l>
-<l:l i="200">t</l:l>
-<l:l i="210">U</l:l>
-<l:l i="210">u</l:l>
-<l:l i="220">V</l:l>
-<l:l i="220">v</l:l>
-<l:l i="230">W</l:l>
-<l:l i="230">w</l:l>
-<l:l i="240">X</l:l>
-<l:l i="240">x</l:l>
-<l:l i="250">Y</l:l>
-<l:l i="250">y</l:l>
-<l:l i="260">Z</l:l>
-<l:l i="260">z</l:l>
-</l:letters>
-</l:l10n>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/zh_tw.xml
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/zh_tw.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,1262 +1,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="zh_tw" english-language-name="Chinese (Taiwan)">
-
-<!-- * This file is generated automatically. -->
-<!-- * To submit changes to this file upstream (to the DocBook Project) -->
-<!-- * do not submit an edited version of this file. Instead, submit an -->
-<!-- * edited version of the source file at the following location: -->
-<!-- * -->
-<!-- *  https://svn.sourceforge.net/svnroot/docbook/trunk/gentext/locale/zh_tw.xml -->
-<!-- * -->
-<!-- * E-mail the edited zh_tw.xml source file to: -->
-<!-- * -->
-<!-- *  docbook-developers@lists.sourceforge.net -->
-
-<!-- ******************************************************************** -->
-
-<!-- This file is part of the XSL DocBook Stylesheet distribution. -->
-<!-- See ../README or http://docbook.sf.net/release/xsl/current/ for -->
-<!-- copyright and other information. -->
-
-<!-- ******************************************************************** -->
-<!-- In these files, % with a letter is used for a placeholder: -->
-<!--   %t is the current element's title -->
-<!--   %s is the current element's subtitle (if applicable)-->
-<!--   %n is the current element's number label-->
-<!--   %p is the current element's page number (if applicable)-->
-<!-- ******************************************************************** -->
-
-
-<l:gentext key="Abstract" text="æèŠ"/>
-<l:gentext key="abstract" text="æèŠ"/>
-<l:gentext key="Answer" text="ç­ïŒ"/>
-<l:gentext key="answer" text="ç­ïŒ"/>
-<l:gentext key="Appendix" text="éé"/>
-<l:gentext key="appendix" text="éé"/>
-<l:gentext key="Article" text="æç« "/>
-<l:gentext key="article" text="æç« "/>
-<l:gentext key="Author" text="Author" lang="en"/>
-<l:gentext key="Bibliography" text="åèæç»"/>
-<l:gentext key="bibliography" text="åèæç»"/>
-<l:gentext key="Book" text="æžç®"/>
-<l:gentext key="book" text="æžç®"/>
-<l:gentext key="CAUTION" text="æ³šæ"/>
-<l:gentext key="Caution" text="æ³šæ"/>
-<l:gentext key="caution" text="æ³šæ"/>
-<l:gentext key="Chapter" text="ç« "/>
-<l:gentext key="chapter" text="ç« "/>
-<l:gentext key="Colophon" text="çæ¬èšé"/>
-<l:gentext key="colophon" text="çæ¬èšé"/>
-<l:gentext key="Copyright" text="çæ¬"/>
-<l:gentext key="copyright" text="çæ¬"/>
-<l:gentext key="Dedication" text="å¥ç»"/>
-<l:gentext key="dedication" text="å¥ç»"/>
-<l:gentext key="Edition" text="ç"/>
-<l:gentext key="edition" text="ç"/>
-<l:gentext key="Editor" text="Editor" lang="en"/>
-<l:gentext key="Equation" text="æ¹çšåŒ"/>
-<l:gentext key="equation" text="æ¹çšåŒ"/>
-<l:gentext key="Example" text="ç¯äŸ"/>
-<l:gentext key="example" text="ç¯äŸ"/>
-<l:gentext key="Figure" text="ååœ¢"/>
-<l:gentext key="figure" text="ååœ¢"/>
-<l:gentext key="Glossary" text="å°èŸ­åœ"/>
-<l:gentext key="glossary" text="å°èŸ­åœ"/>
-<l:gentext key="GlossSee" text="åèŠ"/>
-<l:gentext key="glosssee" text="åèŠ"/>
-<l:gentext key="GlossSeeAlso" text="åŠåèŠ"/>
-<l:gentext key="glossseealso" text="åŠåèŠ"/>
-<l:gentext key="IMPORTANT" text="éèŠ"/>
-<l:gentext key="important" text="éèŠ"/>
-<l:gentext key="Important" text="éèŠ"/>
-<l:gentext key="Index" text="çŽ¢åŒ"/>
-<l:gentext key="index" text="çŽ¢åŒ"/>
-<l:gentext key="ISBN" text="ISBN"/>
-<l:gentext key="isbn" text="ISBN"/>
-<l:gentext key="LegalNotice" text="æ³åŸè²æ"/>
-<l:gentext key="legalnotice" text="æ³åŸè²æ"/>
-<l:gentext key="MsgAud" text="è®è
-"/>
-<l:gentext key="msgaud" text="è®è
-"/>
-<l:gentext key="MsgLevel" text="çšåºŠ"/>
-<l:gentext key="msglevel" text="çšåºŠ"/>
-<l:gentext key="MsgOrig" text="åºè"/>
-<l:gentext key="msgorig" text="åºè"/>
-<l:gentext key="NOTE" text="æ³š"/>
-<l:gentext key="Note" text="æ³š"/>
-<l:gentext key="note" text="æ³š"/>
-<l:gentext key="Part" text="éš"/>
-<l:gentext key="part" text="éš"/>
-<l:gentext key="Preface" text="åºèš"/>
-<l:gentext key="preface" text="åºèš"/>
-<l:gentext key="Procedure" text="éçš"/>
-<l:gentext key="procedure" text="éçš"/>
-<l:gentext key="ProductionSet" text="Production"/>
-<l:gentext key="PubDate" text="Publication Date" lang="en"/>
-<l:gentext key="pubdate" text="Publication date" lang="en"/>
-<l:gentext key="Published" text="åºç"/>
-<l:gentext key="published" text="åºç"/>
-<l:gentext key="Publisher" text="Publisher" lang="en"/>
-<l:gentext key="Qandadiv" text="åïŒäžç­ïŒ"/>
-<l:gentext key="qandadiv" text="åïŒäžç­ïŒ"/>
-<l:gentext key="QandASet" text="Frequently Asked Questions" lang="en"/>
-<l:gentext key="Question" text="åïŒ"/>
-<l:gentext key="question" text="åïŒ"/>
-<l:gentext key="RefEntry" text="åç
-§é 
-ç®"/>
-<l:gentext key="refentry" text="åç
-§é 
-ç®"/>
-<l:gentext key="Reference" text="åè"/>
-<l:gentext key="reference" text="åè"/>
-<l:gentext key="References" text="References" lang="en"/>
-<l:gentext key="RefName" text="åèå"/>
-<l:gentext key="refname" text="åèå"/>
-<l:gentext key="RefSection" text="åç
-§ç« ç¯"/>
-<l:gentext key="refsection" text="åç
-§ç« ç¯"/>
-<l:gentext key="RefSynopsisDiv" text="å€§ç¶±"/>
-<l:gentext key="refsynopsisdiv" text="å€§ç¶±"/>
-<l:gentext key="RevHistory" text="ä¿®èšèšé"/>
-<l:gentext key="revhistory" text="ä¿®èšèšé"/>
-<l:gentext key="revision" text="ä¿®èš"/>
-<l:gentext key="Revision" text="ä¿®èš"/>
-<l:gentext key="sect1" text="Section"/>
-<l:gentext key="sect2" text="Section"/>
-<l:gentext key="sect3" text="Section"/>
-<l:gentext key="sect4" text="Section"/>
-<l:gentext key="sect5" text="Section"/>
-<l:gentext key="section" text="ç¯"/>
-<l:gentext key="Section" text="ç¯"/>
-<l:gentext key="see" text="èŠ"/>
-<l:gentext key="See" text="èŠ"/>
-<l:gentext key="seealso" text="åŠèŠ"/>
-<l:gentext key="Seealso" text="åŠèŠ"/>
-<l:gentext key="SeeAlso" text="åŠèŠ"/>
-<l:gentext key="set" text="Set"/>
-<l:gentext key="Set" text="Set"/>
-<l:gentext key="setindex" text="Set Index"/>
-<l:gentext key="SetIndex" text="Set Index"/>
-<l:gentext key="Sidebar" text=""/>
-<l:gentext key="sidebar" text=""/>
-<l:gentext key="step" text="æ­¥é©"/>
-<l:gentext key="Step" text="æ­¥é©"/>
-<l:gentext key="table" text="è¡šæ Œ"/>
-<l:gentext key="Table" text="è¡šæ Œ"/>
-<l:gentext key="task" text="Task" lang="en"/>
-<l:gentext key="Task" text="Task" lang="en"/>
-<l:gentext key="tip" text="æç€º"/>
-<l:gentext key="TIP" text="æç€º"/>
-<l:gentext key="Tip" text="æç€º"/>
-<l:gentext key="Warning" text="è­Šå"/>
-<l:gentext key="warning" text="è­Šå"/>
-<l:gentext key="WARNING" text="è­Šå"/>
-<l:gentext key="and" text="äž"/>
-<l:gentext key="by" text="ç±"/>
-<l:gentext key="Edited" text="ç·šèŒ¯"/>
-<l:gentext key="edited" text="ç·šèŒ¯"/>
-<l:gentext key="Editedby" text="ç·šèŒ¯"/>
-<l:gentext key="editedby" text="ç·šèŒ¯"/>
-<l:gentext key="in" text="åš"/>
-<l:gentext key="lastlistcomma" text=","/>
-<l:gentext key="listcomma" text=","/>
-<l:gentext key="nonexistantelement" text="äžå­åšçå
-çŽ "/>
-<l:gentext key="notes" text="æ³š"/>
-<l:gentext key="Notes" text="æ³š"/>
-<l:gentext key="Pgs" text="é "/>
-<l:gentext key="pgs" text="é "/>
-<l:gentext key="Revisedby" text="ä¿®èš"/>
-<l:gentext key="revisedby" text="ä¿®èš"/>
-<l:gentext key="TableNotes" text="æ³šé"/>
-<l:gentext key="tablenotes" text="æ³šé"/>
-<l:gentext key="TableofContents" text="å
-§å®¹ç®é"/>
-<l:gentext key="tableofcontents" text="å
-§å®¹ç®é"/>
-<l:gentext key="unexpectedelementname" text="éé æçå
-çŽ å"/>
-<l:gentext key="unsupported" text="æªæ¯æŽ"/>
-<l:gentext key="xrefto" text="åç
-§"/>
-<l:gentext key="Authors" text="Authors" lang="en"/>
-<l:gentext key="copyeditor" text="Copy Editor" lang="en"/>
-<l:gentext key="graphicdesigner" text="Graphic Designer" lang="en"/>
-<l:gentext key="productioneditor" text="Production Editor" lang="en"/>
-<l:gentext key="technicaleditor" text="Technical Editor" lang="en"/>
-<l:gentext key="translator" text="Translator" lang="en"/>
-<l:gentext key="listofequations" text="å
-¬åŒç®é"/>
-<l:gentext key="ListofEquations" text="å
-¬åŒç®é"/>
-<l:gentext key="ListofExamples" text="ç¯äŸç®é"/>
-<l:gentext key="listofexamples" text="ç¯äŸç®é"/>
-<l:gentext key="ListofFigures" text="éåç®é"/>
-<l:gentext key="listoffigures" text="éåç®é"/>
-<l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
-<l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
-<l:gentext key="listoftables" text="éè¡šç®é"/>
-<l:gentext key="ListofTables" text="éè¡šç®é"/>
-<l:gentext key="ListofUnknown" text="å
-¶å®å
-§å®¹ç®é"/>
-<l:gentext key="listofunknown" text="å
-¶å®å
-§å®¹ç®é"/>
-<l:gentext key="nav-home" text="å
-§å®¹"/>
-<l:gentext key="nav-next" text="äžäžé "/>
-<l:gentext key="nav-next-sibling" text="å¿«éååŸ"/>
-<l:gentext key="nav-prev" text="åäžé "/>
-<l:gentext key="nav-prev-sibling" text="å¿«éåå"/>
-<l:gentext key="nav-up" text="äžäžå±€"/>
-<l:gentext key="nav-toc" text="ToC" lang="en"/>
-<l:gentext key="Draft" text="Draft"/>
-<l:gentext key="above" text="above"/>
-<l:gentext key="below" text="below"/>
-<l:gentext key="sectioncalled" text="the section called"/>
-<l:gentext key="index symbols" text="Symbols"/>
-<l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz" lang="en"/>
-<l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ" lang="en"/>
-<l:gentext key="normalize.sort.input" text="AaÃÃ ÃÃ¡ÃÃ¢ÃÃ£ÃÃ€Ã
-Ã¥ÄÄÄÄÄÄ
-ÇÇÇÇÇ Ç¡ÇºÇ»ÈÈÈÈÈŠÈ§ážážáºáº áº¡áº¢áº£áº€áº¥áºŠáº§áºšáº©áºªáº«áº¬áº­áº®áº¯áº°áº±áº²áº³áºŽáºµáº¶áº·BbÆÆÉÆÆážážážáž
-ážážCcÃÃ§ÄÄÄÄÄÄÄÄÆÆÉážážDdÄÄÄÄÆÉÆÆÇ
-Ç²È¡ÉážážážážážážážážážážEeÃÃšÃÃ©ÃÃªÃÃ«ÄÄÄÄÄÄÄÄÄÄÈÈ
-ÈÈÈšÈ©ážážážážážážážážážážáºžáº¹áººáº»áºŒáºœáºŸáº¿á»á»á»á»á»á»
-á»á»FfÆÆážážGgÄÄÄÄÄ Ä¡Ä¢Ä£ÆÉ Ç€Ç¥ÇŠÇ§ÇŽÇµáž áž¡HhÄ€Ä¥ÄŠÄ§ÈÈÉŠáž¢áž£áž€áž¥ážŠáž§ážšáž©ážªáž«áºIiÃÃ¬ÃÃ­ÃÃ®ÃÃ¯ÄšÄ©ÄªÄ«Ä¬Ä­Ä®Ä¯Ä°ÆÉšÇÇÈÈÈÈáž¬áž­áž®áž¯á»á»á»á»JjÄŽÄµÇ°ÊKkÄ¶Ä·ÆÆÇšÇ©áž°áž±áž²áž³ážŽážµLlÄ¹ÄºÄ»ÄŒÄœÄŸÄ¿ÅÅÅÆÇÈŽÉ«É¬É­áž¶áž·ážžáž¹ážºáž»ážŒážœMmÉ±ážŸáž¿á¹á¹á¹á¹NnÃÃ±ÅÅÅ
-ÅÅÅÆÉ²ÆÈ ÇÇžÇ¹ÈµÉ³á¹á¹
-á¹á¹á¹á¹á¹á¹OoÃÃ²ÃÃ³ÃÃŽÃÃµÃÃ¶ÃÃžÅÅÅÅÅÅÆÆ Æ¡ÇÇÇªÇ«Ç¬Ç­ÇŸÇ¿ÈÈÈÈÈªÈ«È¬È­È®È¯È°È±á¹á¹á¹á¹á¹á¹á¹á¹á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á»á» á»¡á»¢á»£PpÆ€Æ¥á¹á¹á¹á¹QqÊ RrÅÅÅÅÅÅÈÈÈÈÉŒÉœÉŸá¹á¹á¹á¹á¹á¹á¹á¹SsÅÅÅÅÅÅÅ Å¡ÈÈÊá¹ á¹¡á¹¢á¹£á¹€á¹¥á¹Šá¹§á¹šá¹©TtÅ¢Å£Å€Å¥ÅŠÅ§Æ«Æ¬Æ­Æ®ÊÈÈÈ¶á¹ªá¹«á¹¬á¹­á¹®á¹¯á¹°á¹±áºUuÃÃ¹ÃÃºÃÃ»ÃÃŒÅšÅ©ÅªÅ«Å¬Å­Å®Å¯Å°Å±Å²Å³Æ¯Æ°ÇÇÇÇÇÇÇÇÇÇÈÈÈÈá¹²á¹³á¹Žá¹µá¹¶á¹·á¹žá¹¹á¹ºá¹»á»€á»¥á»Šá»§á»šá»©á»ªá»«á»¬á»­á»®á»¯á»°á»±VvÆ²Êá¹Œá¹œá¹Ÿá¹¿WwÅŽÅµáºáºáºáºáºáº
-áºáºáºáºáºXxáºáºáºáºYyÃÃœÃ¿ÅžÅ¶Å·Æ³ÆŽÈ²È³áºáºáºá»²á»³á»Žá»µá»¶á»·á»žá»¹ZzÅ¹ÅºÅ»ÅŒÅœÅŸÆµÆ¶È€È¥ÊÊáºáºáºáºáºáºáº" lang="en"/>
-<l:gentext key="normalize.sort.output" text="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ" lang="en"/>
-<l:dingbat key="startquote" text="â"/>
-<l:dingbat key="endquote" text="â"/>
-<l:dingbat key="nestedstartquote" text="â"/>
-<l:dingbat key="nestedendquote" text="â"/>
-<l:dingbat key="singlestartquote" text="â" lang="en"/>
-<l:dingbat key="singleendquote" text="â" lang="en"/>
-<l:dingbat key="bullet" text="â¢"/>
-<l:gentext key="hyphenation-character" text="-" lang="en"/>
-<l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
-<l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
-<l:context name="styles"><l:template name="person-name" text="first-last"/>
-</l:context>
-<l:context name="title"><l:template name="abstract" text="%t"/>
-<l:template name="answer" text="%t"/>
-<l:template name="appendix" text="éé %n. %t"/>
-<l:template name="article" text="%t"/>
-<l:template name="authorblurb" text="%t"/>
-<l:template name="bibliodiv" text="%t"/>
-<l:template name="biblioentry" text="%t"/>
-<l:template name="bibliography" text="%t"/>
-<l:template name="bibliolist" text="%t" lang="en"/>
-<l:template name="bibliomixed" text="%t"/>
-<l:template name="bibliomset" text="%t"/>
-<l:template name="biblioset" text="%t"/>
-<l:template name="blockquote" text="%t"/>
-<l:template name="book" text="%t"/>
-<l:template name="calloutlist" text="%t"/>
-<l:template name="caution" text="%t"/>
-<l:template name="chapter" text="ç«  %n. %t"/>
-<l:template name="colophon" text="%t"/>
-<l:template name="dedication" text="%t"/>
-<l:template name="equation" text="æ¹çšåŒ %n. %t"/>
-<l:template name="example" text="ç¯äŸ %n. %t"/>
-<l:template name="figure" text="ååœ¢ %n. %t"/>
-<l:template name="foil" text="%t" lang="en"/>
-<l:template name="foilgroup" text="%t" lang="en"/>
-<l:template name="formalpara" text="%t"/>
-<l:template name="glossary" text="%t"/>
-<l:template name="glossdiv" text="%t"/>
-<l:template name="glosslist" text="%t" lang="en"/>
-<l:template name="glossentry" text="%t" lang="en"/>
-<l:template name="important" text="%t"/>
-<l:template name="index" text="%t"/>
-<l:template name="indexdiv" text="%t"/>
-<l:template name="itemizedlist" text="%t"/>
-<l:template name="legalnotice" text="%t"/>
-<l:template name="listitem" text=""/>
-<l:template name="lot" text="%t"/>
-<l:template name="msg" text="%t"/>
-<l:template name="msgexplan" text="%t"/>
-<l:template name="msgmain" text="%t"/>
-<l:template name="msgrel" text="%t"/>
-<l:template name="msgset" text="%t"/>
-<l:template name="msgsub" text="%t"/>
-<l:template name="note" text="%t"/>
-<l:template name="orderedlist" text="%t"/>
-<l:template name="part" text="éš %n. %t"/>
-<l:template name="partintro" text="%t"/>
-<l:template name="preface" text="%t"/>
-<l:template name="procedure" text="%t"/>
-<l:template name="procedure.formal" text="éçšÂ %n.Â %t"/>
-<l:template name="productionset" text="%t"/>
-<l:template name="productionset.formal" text="ProductionÂ %n"/>
-<l:template name="qandadiv" text="%t"/>
-<l:template name="qandaentry" text="%t"/>
-<l:template name="qandaset" text="%t"/>
-<l:template name="question" text="%t"/>
-<l:template name="refentry" text="%t"/>
-<l:template name="reference" text="%t"/>
-<l:template name="refsection" text="%t" lang="en"/>
-<l:template name="refsect1" text="%t"/>
-<l:template name="refsect2" text="%t"/>
-<l:template name="refsect3" text="%t"/>
-<l:template name="refsynopsisdiv" text="%t"/>
-<l:template name="refsynopsisdivinfo" text="%t"/>
-<l:template name="segmentedlist" text="%t"/>
-<l:template name="set" text="%t"/>
-<l:template name="setindex" text="%t"/>
-<l:template name="sidebar" text="%t"/>
-<l:template name="step" text="%t"/>
-<l:template name="table" text="è¡šæ Œ %n. %t"/>
-<l:template name="task" text="%t" lang="en"/>
-<l:template name="tasksummary" text="%t" lang="en"/>
-<l:template name="taskprerequisites" text="%t" lang="en"/>
-<l:template name="taskrelated" text="%t" lang="en"/>
-<l:template name="tip" text="%t"/>
-<l:template name="toc" text="%t"/>
-<l:template name="variablelist" text="%t"/>
-<l:template name="varlistentry" text="" lang="en"/>
-<l:template name="warning" text="%t"/>
-</l:context>
-<l:context name="title-unnumbered"><l:template name="appendix" text="%t"/>
-<l:template name="article/appendix" text="%t" lang="en"/>
-<l:template name="bridgehead" text="%t"/>
-<l:template name="chapter" text="%t"/>
-<l:template name="sect1" text="%t"/>
-<l:template name="sect2" text="%t"/>
-<l:template name="sect3" text="%t"/>
-<l:template name="sect4" text="%t"/>
-<l:template name="sect5" text="%t"/>
-<l:template name="section" text="%t"/>
-<l:template name="simplesect" text="%t"/>
-<l:template name="part" text="%t" lang="en"/>
-</l:context>
-<l:context name="title-numbered"><l:template name="appendix" text="éé %n. %t"/>
-<l:template name="article/appendix" text="%n.Â %t" lang="en"/>
-<l:template name="bridgehead" text="%t"/>
-<l:template name="chapter" text="ç«  %n. %t"/>
-<l:template name="part" text="éšÂ %n.Â %t"/>
-<l:template name="sect1" text="%n. %t"/>
-<l:template name="sect2" text="%n. %t"/>
-<l:template name="sect3" text="%n. %t"/>
-<l:template name="sect4" text="%n. %t"/>
-<l:template name="sect5" text="%n. %t"/>
-<l:template name="section" text="%n. %t"/>
-<l:template name="simplesect" text="%n. %t"/>
-</l:context>
-<l:context name="subtitle"><l:template name="appendix" text="%s"/>
-<l:template name="article" text="%s"/>
-<l:template name="bibliodiv" text="%s"/>
-<l:template name="biblioentry" text="%s"/>
-<l:template name="bibliography" text="%s"/>
-<l:template name="bibliomixed" text="%s"/>
-<l:template name="bibliomset" text="%s"/>
-<l:template name="biblioset" text="%s"/>
-<l:template name="book" text="%s"/>
-<l:template name="chapter" text="%s"/>
-<l:template name="colophon" text="%s"/>
-<l:template name="dedication" text="%s"/>
-<l:template name="glossary" text="%s"/>
-<l:template name="glossdiv" text="%s"/>
-<l:template name="index" text="%s"/>
-<l:template name="indexdiv" text="%s"/>
-<l:template name="lot" text="%s"/>
-<l:template name="part" text="%s"/>
-<l:template name="partintro" text="%s"/>
-<l:template name="preface" text="%s"/>
-<l:template name="refentry" text="%s"/>
-<l:template name="reference" text="%s"/>
-<l:template name="refsection" text="%s" lang="en"/>
-<l:template name="refsect1" text="%s"/>
-<l:template name="refsect2" text="%s"/>
-<l:template name="refsect3" text="%s"/>
-<l:template name="refsynopsisdiv" text="%s"/>
-<l:template name="sect1" text="%s"/>
-<l:template name="sect2" text="%s"/>
-<l:template name="sect3" text="%s"/>
-<l:template name="sect4" text="%s"/>
-<l:template name="sect5" text="%s"/>
-<l:template name="section" text="%s"/>
-<l:template name="set" text="%s"/>
-<l:template name="setindex" text="%s"/>
-<l:template name="sidebar" text="%s"/>
-<l:template name="simplesect" text="%s"/>
-<l:template name="toc" text="%s"/>
-</l:context>
-<l:context name="xref"><l:template name="abstract" text="%t"/>
-<l:template name="answer" text="ç­ïŒÂ %n"/>
-<l:template name="appendix" text="%t"/>
-<l:template name="article" text="%t"/>
-<l:template name="authorblurb" text="%t"/>
-<l:template name="bibliodiv" text="%t"/>
-<l:template name="bibliography" text="%t"/>
-<l:template name="bibliomset" text="%t"/>
-<l:template name="biblioset" text="%t"/>
-<l:template name="blockquote" text="%t"/>
-<l:template name="book" text="%t"/>
-<l:template name="calloutlist" text="%t"/>
-<l:template name="caution" text="%t"/>
-<l:template name="chapter" text="%t"/>
-<l:template name="colophon" text="%t"/>
-<l:template name="constraintdef" text="%t"/>
-<l:template name="dedication" text="%t"/>
-<l:template name="equation" text="%t"/>
-<l:template name="example" text="%t"/>
-<l:template name="figure" text="%t"/>
-<l:template name="foil" text="%t" lang="en"/>
-<l:template name="foilgroup" text="%t" lang="en"/>
-<l:template name="formalpara" text="%t"/>
-<l:template name="glossary" text="%t"/>
-<l:template name="glossdiv" text="%t"/>
-<l:template name="important" text="%t"/>
-<l:template name="index" text="%t"/>
-<l:template name="indexdiv" text="%t"/>
-<l:template name="itemizedlist" text="%t"/>
-<l:template name="legalnotice" text="%t"/>
-<l:template name="listitem" text="%n"/>
-<l:template name="lot" text="%t"/>
-<l:template name="msg" text="%t"/>
-<l:template name="msgexplan" text="%t"/>
-<l:template name="msgmain" text="%t"/>
-<l:template name="msgrel" text="%t"/>
-<l:template name="msgset" text="%t"/>
-<l:template name="msgsub" text="%t"/>
-<l:template name="note" text="%t"/>
-<l:template name="orderedlist" text="%t"/>
-<l:template name="part" text="%t"/>
-<l:template name="partintro" text="%t"/>
-<l:template name="preface" text="%t"/>
-<l:template name="procedure" text="%t"/>
-<l:template name="productionset" text="%t"/>
-<l:template name="qandadiv" text="%t"/>
-<l:template name="qandaentry" text="åïŒÂ %n"/>
-<l:template name="qandaset" text="%t"/>
-<l:template name="question" text="åïŒÂ %n"/>
-<l:template name="reference" text="%t"/>
-<l:template name="refsynopsisdiv" text="%t"/>
-<l:template name="segmentedlist" text="%t"/>
-<l:template name="set" text="%t"/>
-<l:template name="setindex" text="%t"/>
-<l:template name="sidebar" text="%t"/>
-<l:template name="table" text="%t"/>
-<l:template name="task" text="%t" lang="en"/>
-<l:template name="tip" text="%t"/>
-<l:template name="toc" text="%t"/>
-<l:template name="variablelist" text="%t"/>
-<l:template name="varlistentry" text="%n"/>
-<l:template name="warning" text="%t"/>
-<l:template name="olink.document.citation" text=" in %o" lang="en"/>
-<l:template name="olink.page.citation" text=" (page %p)" lang="en"/>
-<l:template name="page.citation" text=" [%p]"/>
-<l:template name="page" text="(page %p)" lang="en"/>
-<l:template name="docname" text=" in %o" lang="en"/>
-<l:template name="docnamelong" text=" in the document titled %o" lang="en"/>
-<l:template name="pageabbrev" text="(p. %p)" lang="en"/>
-<l:template name="Page" text="Page %p" lang="en"/>
-<l:template name="bridgehead" text="â%tâ"/>
-<l:template name="refsection" text="â%tâ"/>
-<l:template name="refsect1" text="â%tâ"/>
-<l:template name="refsect2" text="â%tâ"/>
-<l:template name="refsect3" text="â%tâ"/>
-<l:template name="sect1" text="â%tâ"/>
-<l:template name="sect2" text="â%tâ"/>
-<l:template name="sect3" text="â%tâ"/>
-<l:template name="sect4" text="â%tâ"/>
-<l:template name="sect5" text="â%tâ"/>
-<l:template name="section" text="â%tâ"/>
-<l:template name="simplesect" text="â%tâ"/>
-</l:context>
-<l:context name="xref-number"><l:template name="answer" text="ç­ïŒÂ %n"/>
-<l:template name="appendix" text="ééÂ %n"/>
-<l:template name="bridgehead" text="ç¯Â %n"/>
-<l:template name="chapter" text="ç« Â %n"/>
-<l:template name="equation" text="æ¹çšåŒÂ %n"/>
-<l:template name="example" text="ç¯äŸÂ %n"/>
-<l:template name="figure" text="ååœ¢Â %n"/>
-<l:template name="part" text="éšÂ %n"/>
-<l:template name="procedure" text="éçšÂ %n"/>
-<l:template name="productionset" text="ProductionÂ %n"/>
-<l:template name="qandadiv" text="åïŒäžç­ïŒÂ %n"/>
-<l:template name="qandaentry" text="åïŒÂ %n"/>
-<l:template name="question" text="åïŒÂ %n"/>
-<l:template name="sect1" text="ç¯Â %n"/>
-<l:template name="sect2" text="ç¯Â %n"/>
-<l:template name="sect3" text="ç¯Â %n"/>
-<l:template name="sect4" text="ç¯Â %n"/>
-<l:template name="sect5" text="ç¯Â %n"/>
-<l:template name="section" text="ç¯Â %n"/>
-<l:template name="table" text="è¡šæ ŒÂ %n"/>
-</l:context>
-<l:context name="xref-number-and-title"><l:template name="appendix" text="ééÂ %n, %t"/>
-<l:template name="bridgehead" text="ç¯Â %n, â%tâ"/>
-<l:template name="chapter" text="ç« Â %n, %t"/>
-<l:template name="equation" text="æ¹çšåŒÂ %n, â%tâ"/>
-<l:template name="example" text="ç¯äŸÂ %n, â%tâ"/>
-<l:template name="figure" text="ååœ¢Â %n, â%tâ"/>
-<l:template name="part" text="éšÂ %n, â%tâ"/>
-<l:template name="procedure" text="éçšÂ %n, â%tâ"/>
-<l:template name="productionset" text="ProductionÂ %n, â%tâ"/>
-<l:template name="qandadiv" text="åïŒäžç­ïŒÂ %n, â%tâ"/>
-<l:template name="refsect1" text="the section called â%tâ"/>
-<l:template name="refsect2" text="the section called â%tâ"/>
-<l:template name="refsect3" text="the section called â%tâ"/>
-<l:template name="refsection" text="the section called â%tâ"/>
-<l:template name="sect1" text="ç¯Â %n, â%tâ"/>
-<l:template name="sect2" text="ç¯Â %n, â%tâ"/>
-<l:template name="sect3" text="ç¯Â %n, â%tâ"/>
-<l:template name="sect4" text="ç¯Â %n, â%tâ"/>
-<l:template name="sect5" text="ç¯Â %n, â%tâ"/>
-<l:template name="section" text="ç¯Â %n, â%tâ"/>
-<l:template name="simplesect" text="the section called â%tâ"/>
-<l:template name="table" text="è¡šæ ŒÂ %n, â%tâ"/>
-</l:context>
-<l:context name="authorgroup"><l:template name="sep" text=", "/>
-<l:template name="sep2" text=" äž "/>
-<l:template name="seplast" text=", äž "/>
-</l:context>
-<l:context name="glossary"><l:template name="see" text="åèŠ %t"/>
-<l:template name="seealso" text="åŠåèŠ %t"/>
-</l:context>
-<l:context name="msgset"><l:template name="MsgAud" text="è®è
-: "/>
-<l:template name="MsgLevel" text="çšåºŠ: "/>
-<l:template name="MsgOrig" text="åºè: "/>
-</l:context>
-<l:context name="datetime"><l:template name="format" text="m/d/Y" lang="en"/>
-</l:context>
-<l:context name="termdef"><l:template name="prefix" text="[Definition: " lang="en"/>
-<l:template name="suffix" text="]" lang="en"/>
-</l:context>
-<l:context name="datetime-full"><l:template name="January" text="January" lang="en"/>
-<l:template name="February" text="February" lang="en"/>
-<l:template name="March" text="March" lang="en"/>
-<l:template name="April" text="April" lang="en"/>
-<l:template name="May" text="May" lang="en"/>
-<l:template name="June" text="June" lang="en"/>
-<l:template name="July" text="July" lang="en"/>
-<l:template name="August" text="August" lang="en"/>
-<l:template name="September" text="September" lang="en"/>
-<l:template name="October" text="October" lang="en"/>
-<l:template name="November" text="November" lang="en"/>
-<l:template name="December" text="December" lang="en"/>
-<l:template name="Monday" text="Monday" lang="en"/>
-<l:template name="Tuesday" text="Tuesday" lang="en"/>
-<l:template name="Wednesday" text="Wednesday" lang="en"/>
-<l:template name="Thursday" text="Thursday" lang="en"/>
-<l:template name="Friday" text="Friday" lang="en"/>
-<l:template name="Saturday" text="Saturday" lang="en"/>
-<l:template name="Sunday" text="Sunday" lang="en"/>
-</l:context>
-<l:context name="datetime-abbrev"><l:template name="Jan" text="Jan" lang="en"/>
-<l:template name="Feb" text="Feb" lang="en"/>
-<l:template name="Mar" text="Mar" lang="en"/>
-<l:template name="Apr" text="Apr" lang="en"/>
-<l:template name="May" text="May" lang="en"/>
-<l:template name="Jun" text="Jun" lang="en"/>
-<l:template name="Jul" text="Jul" lang="en"/>
-<l:template name="Aug" text="Aug" lang="en"/>
-<l:template name="Sep" text="Sep" lang="en"/>
-<l:template name="Oct" text="Oct" lang="en"/>
-<l:template name="Nov" text="Nov" lang="en"/>
-<l:template name="Dec" text="Dec" lang="en"/>
-<l:template name="Mon" text="Mon" lang="en"/>
-<l:template name="Tue" text="Tue" lang="en"/>
-<l:template name="Wed" text="Wed" lang="en"/>
-<l:template name="Thu" text="Thu" lang="en"/>
-<l:template name="Fri" text="Fri" lang="en"/>
-<l:template name="Sat" text="Sat" lang="en"/>
-<l:template name="Sun" text="Sun" lang="en"/>
-</l:context>
-<l:context name="htmlhelp"><l:template name="langcode" text="0x0404 Chinese (TAIWAN)"/>
-</l:context>
-<l:context name="index"><l:template name="term-separator" text=", " lang="en"/>
-<l:template name="number-separator" text=", " lang="en"/>
-<l:template name="range-separator" text="-" lang="en"/>
-</l:context>
-<l:context name="iso690"><l:template name="lastfirst.sep" text=", " lang="en"/>
-<l:template name="alt.person.two.sep" text=" â " lang="en"/>
-<l:template name="alt.person.last.sep" text=" â " lang="en"/>
-<l:template name="alt.person.more.sep" text=" â " lang="en"/>
-<l:template name="primary.editor" text=" (ed.)" lang="en"/>
-<l:template name="primary.many" text=", et al." lang="en"/>
-<l:template name="primary.sep" text=". " lang="en"/>
-<l:template name="submaintitle.sep" text=": " lang="en"/>
-<l:template name="title.sep" text=". " lang="en"/>
-<l:template name="othertitle.sep" text=", " lang="en"/>
-<l:template name="medium1" text=" [" lang="en"/>
-<l:template name="medium2" text="]" lang="en"/>
-<l:template name="secondary.person.sep" text="; " lang="en"/>
-<l:template name="secondary.sep" text=". " lang="en"/>
-<l:template name="respons.sep" text=". " lang="en"/>
-<l:template name="edition.sep" text=". " lang="en"/>
-<l:template name="edition.serial.sep" text=", " lang="en"/>
-<l:template name="issuing.range" text="-" lang="en"/>
-<l:template name="issuing.div" text=", " lang="en"/>
-<l:template name="issuing.sep" text=". " lang="en"/>
-<l:template name="partnr.sep" text=". " lang="en"/>
-<l:template name="placepubl.sep" text=": " lang="en"/>
-<l:template name="publyear.sep" text=", " lang="en"/>
-<l:template name="pubinfo.sep" text=". " lang="en"/>
-<l:template name="spec.pubinfo.sep" text=", " lang="en"/>
-<l:template name="upd.sep" text=", " lang="en"/>
-<l:template name="datecit1" text=" [cited " lang="en"/>
-<l:template name="datecit2" text="]" lang="en"/>
-<l:template name="extent.sep" text=". " lang="en"/>
-<l:template name="locs.sep" text=", " lang="en"/>
-<l:template name="location.sep" text=". " lang="en"/>
-<l:template name="serie.sep" text=". " lang="en"/>
-<l:template name="notice.sep" text=". " lang="en"/>
-<l:template name="access" text="Available " lang="en"/>
-<l:template name="acctoo" text="Also available " lang="en"/>
-<l:template name="onwww" text="from World Wide Web" lang="en"/>
-<l:template name="oninet" text="from Internet" lang="en"/>
-<l:template name="access.end" text=": " lang="en"/>
-<l:template name="link1" text="&lt;" lang="en"/>
-<l:template name="link2" text="&gt;" lang="en"/>
-<l:template name="access.sep" text=". " lang="en"/>
-<l:template name="isbn" text="ISBN " lang="en"/>
-<l:template name="issn" text="ISSN " lang="en"/>
-<l:template name="stdnum.sep" text=". " lang="en"/>
-<l:template name="patcountry.sep" text=". " lang="en"/>
-<l:template name="pattype.sep" text=", " lang="en"/>
-<l:template name="patnum.sep" text=". " lang="en"/>
-<l:template name="patdate.sep" text=". " lang="en"/>
-</l:context><l:letters lang="en"><l:l i="-1"/>
-<l:l i="0">Symbols</l:l>
-<l:l i="10">A</l:l>
-<l:l i="10">a</l:l>
-<l:l i="10">Ã</l:l>
-<l:l i="10">Ã </l:l>
-<l:l i="10">Ã</l:l>
-<l:l i="10">Ã¡</l:l>
-<l:l i="10">Ã</l:l>
-<l:l i="10">Ã¢</l:l>
-<l:l i="10">Ã</l:l>
-<l:l i="10">Ã£</l:l>
-<l:l i="10">Ã</l:l>
-<l:l i="10">Ã€</l:l>
-<l:l i="10">Ã
-</l:l>
-<l:l i="10">Ã¥</l:l>
-<l:l i="10">Ä</l:l>
-<l:l i="10">Ä</l:l>
-<l:l i="10">Ä</l:l>
-<l:l i="10">Ä</l:l>
-<l:l i="10">Ä</l:l>
-<l:l i="10">Ä
-</l:l>
-<l:l i="10">Ç</l:l>
-<l:l i="10">Ç</l:l>
-<l:l i="10">Ç</l:l>
-<l:l i="10">Ç</l:l>
-<l:l i="10">Ç </l:l>
-<l:l i="10">Ç¡</l:l>
-<l:l i="10">Çº</l:l>
-<l:l i="10">Ç»</l:l>
-<l:l i="10">È</l:l>
-<l:l i="10">È</l:l>
-<l:l i="10">È</l:l>
-<l:l i="10">È</l:l>
-<l:l i="10">ÈŠ</l:l>
-<l:l i="10">È§</l:l>
-<l:l i="10">áž</l:l>
-<l:l i="10">áž</l:l>
-<l:l i="10">áº</l:l>
-<l:l i="10">áº </l:l>
-<l:l i="10">áº¡</l:l>
-<l:l i="10">áº¢</l:l>
-<l:l i="10">áº£</l:l>
-<l:l i="10">áº€</l:l>
-<l:l i="10">áº¥</l:l>
-<l:l i="10">áºŠ</l:l>
-<l:l i="10">áº§</l:l>
-<l:l i="10">áºš</l:l>
-<l:l i="10">áº©</l:l>
-<l:l i="10">áºª</l:l>
-<l:l i="10">áº«</l:l>
-<l:l i="10">áº¬</l:l>
-<l:l i="10">áº­</l:l>
-<l:l i="10">áº®</l:l>
-<l:l i="10">áº¯</l:l>
-<l:l i="10">áº°</l:l>
-<l:l i="10">áº±</l:l>
-<l:l i="10">áº²</l:l>
-<l:l i="10">áº³</l:l>
-<l:l i="10">áºŽ</l:l>
-<l:l i="10">áºµ</l:l>
-<l:l i="10">áº¶</l:l>
-<l:l i="10">áº·</l:l>
-<l:l i="20">B</l:l>
-<l:l i="20">b</l:l>
-<l:l i="20">Æ</l:l>
-<l:l i="20">Æ</l:l>
-<l:l i="20">É</l:l>
-<l:l i="20">Æ</l:l>
-<l:l i="20">Æ</l:l>
-<l:l i="20">áž</l:l>
-<l:l i="20">áž</l:l>
-<l:l i="20">áž</l:l>
-<l:l i="20">áž
-</l:l>
-<l:l i="20">áž</l:l>
-<l:l i="20">áž</l:l>
-<l:l i="30">C</l:l>
-<l:l i="30">c</l:l>
-<l:l i="30">Ã</l:l>
-<l:l i="30">Ã§</l:l>
-<l:l i="30">Ä</l:l>
-<l:l i="30">Ä</l:l>
-<l:l i="30">Ä</l:l>
-<l:l i="30">Ä</l:l>
-<l:l i="30">Ä</l:l>
-<l:l i="30">Ä</l:l>
-<l:l i="30">Ä</l:l>
-<l:l i="30">Ä</l:l>
-<l:l i="30">Æ</l:l>
-<l:l i="30">Æ</l:l>
-<l:l i="30">É</l:l>
-<l:l i="30">áž</l:l>
-<l:l i="30">áž</l:l>
-<l:l i="40">D</l:l>
-<l:l i="40">d</l:l>
-<l:l i="40">Ä</l:l>
-<l:l i="40">Ä</l:l>
-<l:l i="40">Ä</l:l>
-<l:l i="40">Ä</l:l>
-<l:l i="40">Æ</l:l>
-<l:l i="40">É</l:l>
-<l:l i="40">Æ</l:l>
-<l:l i="40">Æ</l:l>
-<l:l i="40">Ç
-</l:l>
-<l:l i="40">Ç²</l:l>
-<l:l i="40">È¡</l:l>
-<l:l i="40">É</l:l>
-<l:l i="40">áž</l:l>
-<l:l i="40">áž</l:l>
-<l:l i="40">áž</l:l>
-<l:l i="40">áž</l:l>
-<l:l i="40">áž</l:l>
-<l:l i="40">áž</l:l>
-<l:l i="40">áž</l:l>
-<l:l i="40">áž</l:l>
-<l:l i="40">áž</l:l>
-<l:l i="40">áž</l:l>
-<l:l i="50">E</l:l>
-<l:l i="50">e</l:l>
-<l:l i="50">Ã</l:l>
-<l:l i="50">Ãš</l:l>
-<l:l i="50">Ã</l:l>
-<l:l i="50">Ã©</l:l>
-<l:l i="50">Ã</l:l>
-<l:l i="50">Ãª</l:l>
-<l:l i="50">Ã</l:l>
-<l:l i="50">Ã«</l:l>
-<l:l i="50">Ä</l:l>
-<l:l i="50">Ä</l:l>
-<l:l i="50">Ä</l:l>
-<l:l i="50">Ä</l:l>
-<l:l i="50">Ä</l:l>
-<l:l i="50">Ä</l:l>
-<l:l i="50">Ä</l:l>
-<l:l i="50">Ä</l:l>
-<l:l i="50">Ä</l:l>
-<l:l i="50">Ä</l:l>
-<l:l i="50">È</l:l>
-<l:l i="50">È
-</l:l>
-<l:l i="50">È</l:l>
-<l:l i="50">È</l:l>
-<l:l i="50">Èš</l:l>
-<l:l i="50">È©</l:l>
-<l:l i="50">áž</l:l>
-<l:l i="50">áž</l:l>
-<l:l i="50">áž</l:l>
-<l:l i="50">áž</l:l>
-<l:l i="50">áž</l:l>
-<l:l i="50">áž</l:l>
-<l:l i="50">áž</l:l>
-<l:l i="50">áž</l:l>
-<l:l i="50">áž</l:l>
-<l:l i="50">áž</l:l>
-<l:l i="50">áºž</l:l>
-<l:l i="50">áº¹</l:l>
-<l:l i="50">áºº</l:l>
-<l:l i="50">áº»</l:l>
-<l:l i="50">áºŒ</l:l>
-<l:l i="50">áºœ</l:l>
-<l:l i="50">áºŸ</l:l>
-<l:l i="50">áº¿</l:l>
-<l:l i="50">á»</l:l>
-<l:l i="50">á»</l:l>
-<l:l i="50">á»</l:l>
-<l:l i="50">á»</l:l>
-<l:l i="50">á»</l:l>
-<l:l i="50">á»
-</l:l>
-<l:l i="50">á»</l:l>
-<l:l i="50">á»</l:l>
-<l:l i="60">F</l:l>
-<l:l i="60">f</l:l>
-<l:l i="60">Æ</l:l>
-<l:l i="60">Æ</l:l>
-<l:l i="60">áž</l:l>
-<l:l i="60">áž</l:l>
-<l:l i="70">G</l:l>
-<l:l i="70">g</l:l>
-<l:l i="70">Ä</l:l>
-<l:l i="70">Ä</l:l>
-<l:l i="70">Ä</l:l>
-<l:l i="70">Ä</l:l>
-<l:l i="70">Ä </l:l>
-<l:l i="70">Ä¡</l:l>
-<l:l i="70">Ä¢</l:l>
-<l:l i="70">Ä£</l:l>
-<l:l i="70">Æ</l:l>
-<l:l i="70">É </l:l>
-<l:l i="70">Ç€</l:l>
-<l:l i="70">Ç¥</l:l>
-<l:l i="70">ÇŠ</l:l>
-<l:l i="70">Ç§</l:l>
-<l:l i="70">ÇŽ</l:l>
-<l:l i="70">Çµ</l:l>
-<l:l i="70">áž </l:l>
-<l:l i="70">áž¡</l:l>
-<l:l i="80">H</l:l>
-<l:l i="80">h</l:l>
-<l:l i="80">Ä€</l:l>
-<l:l i="80">Ä¥</l:l>
-<l:l i="80">ÄŠ</l:l>
-<l:l i="80">Ä§</l:l>
-<l:l i="80">È</l:l>
-<l:l i="80">È</l:l>
-<l:l i="80">ÉŠ</l:l>
-<l:l i="80">áž¢</l:l>
-<l:l i="80">áž£</l:l>
-<l:l i="80">áž€</l:l>
-<l:l i="80">áž¥</l:l>
-<l:l i="80">ážŠ</l:l>
-<l:l i="80">áž§</l:l>
-<l:l i="80">ážš</l:l>
-<l:l i="80">áž©</l:l>
-<l:l i="80">ážª</l:l>
-<l:l i="80">áž«</l:l>
-<l:l i="80">áº</l:l>
-<l:l i="90">I</l:l>
-<l:l i="90">i</l:l>
-<l:l i="90">Ã</l:l>
-<l:l i="90">Ã¬</l:l>
-<l:l i="90">Ã</l:l>
-<l:l i="90">Ã­</l:l>
-<l:l i="90">Ã</l:l>
-<l:l i="90">Ã®</l:l>
-<l:l i="90">Ã</l:l>
-<l:l i="90">Ã¯</l:l>
-<l:l i="90">Äš</l:l>
-<l:l i="90">Ä©</l:l>
-<l:l i="90">Äª</l:l>
-<l:l i="90">Ä«</l:l>
-<l:l i="90">Ä¬</l:l>
-<l:l i="90">Ä­</l:l>
-<l:l i="90">Ä®</l:l>
-<l:l i="90">Ä¯</l:l>
-<l:l i="90">Ä°</l:l>
-<l:l i="90">Æ</l:l>
-<l:l i="90">Éš</l:l>
-<l:l i="90">Ç</l:l>
-<l:l i="90">Ç</l:l>
-<l:l i="90">È</l:l>
-<l:l i="90">È</l:l>
-<l:l i="90">È</l:l>
-<l:l i="90">È</l:l>
-<l:l i="90">áž¬</l:l>
-<l:l i="90">áž­</l:l>
-<l:l i="90">áž®</l:l>
-<l:l i="90">áž¯</l:l>
-<l:l i="90">á»</l:l>
-<l:l i="90">á»</l:l>
-<l:l i="90">á»</l:l>
-<l:l i="90">á»</l:l>
-<l:l i="100">J</l:l>
-<l:l i="100">j</l:l>
-<l:l i="100">ÄŽ</l:l>
-<l:l i="100">Äµ</l:l>
-<l:l i="100">Ç°</l:l>
-<l:l i="100">Ê</l:l>
-<l:l i="110">K</l:l>
-<l:l i="110">k</l:l>
-<l:l i="110">Ä¶</l:l>
-<l:l i="110">Ä·</l:l>
-<l:l i="110">Æ</l:l>
-<l:l i="110">Æ</l:l>
-<l:l i="110">Çš</l:l>
-<l:l i="110">Ç©</l:l>
-<l:l i="110">áž°</l:l>
-<l:l i="110">áž±</l:l>
-<l:l i="110">áž²</l:l>
-<l:l i="110">áž³</l:l>
-<l:l i="110">ážŽ</l:l>
-<l:l i="110">ážµ</l:l>
-<l:l i="120">L</l:l>
-<l:l i="120">l</l:l>
-<l:l i="120">Ä¹</l:l>
-<l:l i="120">Äº</l:l>
-<l:l i="120">Ä»</l:l>
-<l:l i="120">ÄŒ</l:l>
-<l:l i="120">Äœ</l:l>
-<l:l i="120">ÄŸ</l:l>
-<l:l i="120">Ä¿</l:l>
-<l:l i="120">Å</l:l>
-<l:l i="120">Å</l:l>
-<l:l i="120">Å</l:l>
-<l:l i="120">Æ</l:l>
-<l:l i="120">Ç</l:l>
-<l:l i="120">ÈŽ</l:l>
-<l:l i="120">É«</l:l>
-<l:l i="120">É¬</l:l>
-<l:l i="120">É­</l:l>
-<l:l i="120">áž¶</l:l>
-<l:l i="120">áž·</l:l>
-<l:l i="120">ážž</l:l>
-<l:l i="120">áž¹</l:l>
-<l:l i="120">ážº</l:l>
-<l:l i="120">áž»</l:l>
-<l:l i="120">ážŒ</l:l>
-<l:l i="120">ážœ</l:l>
-<l:l i="130">M</l:l>
-<l:l i="130">m</l:l>
-<l:l i="130">É±</l:l>
-<l:l i="130">ážŸ</l:l>
-<l:l i="130">áž¿</l:l>
-<l:l i="130">á¹</l:l>
-<l:l i="130">á¹</l:l>
-<l:l i="130">á¹</l:l>
-<l:l i="130">á¹</l:l>
-<l:l i="140">N</l:l>
-<l:l i="140">n</l:l>
-<l:l i="140">Ã</l:l>
-<l:l i="140">Ã±</l:l>
-<l:l i="140">Å</l:l>
-<l:l i="140">Å</l:l>
-<l:l i="140">Å
-</l:l>
-<l:l i="140">Å</l:l>
-<l:l i="140">Å</l:l>
-<l:l i="140">Å</l:l>
-<l:l i="140">Æ</l:l>
-<l:l i="140">É²</l:l>
-<l:l i="140">Æ</l:l>
-<l:l i="140">È </l:l>
-<l:l i="140">Ç</l:l>
-<l:l i="140">Çž</l:l>
-<l:l i="140">Ç¹</l:l>
-<l:l i="140">Èµ</l:l>
-<l:l i="140">É³</l:l>
-<l:l i="140">á¹</l:l>
-<l:l i="140">á¹
-</l:l>
-<l:l i="140">á¹</l:l>
-<l:l i="140">á¹</l:l>
-<l:l i="140">á¹</l:l>
-<l:l i="140">á¹</l:l>
-<l:l i="140">á¹</l:l>
-<l:l i="140">á¹</l:l>
-<l:l i="150">O</l:l>
-<l:l i="150">o</l:l>
-<l:l i="150">Ã</l:l>
-<l:l i="150">Ã²</l:l>
-<l:l i="150">Ã</l:l>
-<l:l i="150">Ã³</l:l>
-<l:l i="150">Ã</l:l>
-<l:l i="150">ÃŽ</l:l>
-<l:l i="150">Ã</l:l>
-<l:l i="150">Ãµ</l:l>
-<l:l i="150">Ã</l:l>
-<l:l i="150">Ã¶</l:l>
-<l:l i="150">Ã</l:l>
-<l:l i="150">Ãž</l:l>
-<l:l i="150">Å</l:l>
-<l:l i="150">Å</l:l>
-<l:l i="150">Å</l:l>
-<l:l i="150">Å</l:l>
-<l:l i="150">Å</l:l>
-<l:l i="150">Å</l:l>
-<l:l i="150">Æ</l:l>
-<l:l i="150">Æ </l:l>
-<l:l i="150">Æ¡</l:l>
-<l:l i="150">Ç</l:l>
-<l:l i="150">Ç</l:l>
-<l:l i="150">Çª</l:l>
-<l:l i="150">Ç«</l:l>
-<l:l i="150">Ç¬</l:l>
-<l:l i="150">Ç­</l:l>
-<l:l i="150">ÇŸ</l:l>
-<l:l i="150">Ç¿</l:l>
-<l:l i="150">È</l:l>
-<l:l i="150">È</l:l>
-<l:l i="150">È</l:l>
-<l:l i="150">È</l:l>
-<l:l i="150">Èª</l:l>
-<l:l i="150">È«</l:l>
-<l:l i="150">È¬</l:l>
-<l:l i="150">È­</l:l>
-<l:l i="150">È®</l:l>
-<l:l i="150">È¯</l:l>
-<l:l i="150">È°</l:l>
-<l:l i="150">È±</l:l>
-<l:l i="150">á¹</l:l>
-<l:l i="150">á¹</l:l>
-<l:l i="150">á¹</l:l>
-<l:l i="150">á¹</l:l>
-<l:l i="150">á¹</l:l>
-<l:l i="150">á¹</l:l>
-<l:l i="150">á¹</l:l>
-<l:l i="150">á¹</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á»</l:l>
-<l:l i="150">á» </l:l>
-<l:l i="150">á»¡</l:l>
-<l:l i="150">á»¢</l:l>
-<l:l i="150">á»£</l:l>
-<l:l i="160">P</l:l>
-<l:l i="160">p</l:l>
-<l:l i="160">Æ€</l:l>
-<l:l i="160">Æ¥</l:l>
-<l:l i="160">á¹</l:l>
-<l:l i="160">á¹</l:l>
-<l:l i="160">á¹</l:l>
-<l:l i="160">á¹</l:l>
-<l:l i="170">Q</l:l>
-<l:l i="170">q</l:l>
-<l:l i="170">Ê </l:l>
-<l:l i="180">R</l:l>
-<l:l i="180">r</l:l>
-<l:l i="180">Å</l:l>
-<l:l i="180">Å</l:l>
-<l:l i="180">Å</l:l>
-<l:l i="180">Å</l:l>
-<l:l i="180">Å</l:l>
-<l:l i="180">Å</l:l>
-<l:l i="180">È</l:l>
-<l:l i="180">È</l:l>
-<l:l i="180">È</l:l>
-<l:l i="180">È</l:l>
-<l:l i="180">ÉŒ</l:l>
-<l:l i="180">Éœ</l:l>
-<l:l i="180">ÉŸ</l:l>
-<l:l i="180">á¹</l:l>
-<l:l i="180">á¹</l:l>
-<l:l i="180">á¹</l:l>
-<l:l i="180">á¹</l:l>
-<l:l i="180">á¹</l:l>
-<l:l i="180">á¹</l:l>
-<l:l i="180">á¹</l:l>
-<l:l i="180">á¹</l:l>
-<l:l i="190">S</l:l>
-<l:l i="190">s</l:l>
-<l:l i="190">Å</l:l>
-<l:l i="190">Å</l:l>
-<l:l i="190">Å</l:l>
-<l:l i="190">Å</l:l>
-<l:l i="190">Å</l:l>
-<l:l i="190">Å</l:l>
-<l:l i="190">Å </l:l>
-<l:l i="190">Å¡</l:l>
-<l:l i="190">È</l:l>
-<l:l i="190">È</l:l>
-<l:l i="190">Ê</l:l>
-<l:l i="190">á¹ </l:l>
-<l:l i="190">á¹¡</l:l>
-<l:l i="190">á¹¢</l:l>
-<l:l i="190">á¹£</l:l>
-<l:l i="190">á¹€</l:l>
-<l:l i="190">á¹¥</l:l>
-<l:l i="190">á¹Š</l:l>
-<l:l i="190">á¹§</l:l>
-<l:l i="190">á¹š</l:l>
-<l:l i="190">á¹©</l:l>
-<l:l i="200">T</l:l>
-<l:l i="200">t</l:l>
-<l:l i="200">Å¢</l:l>
-<l:l i="200">Å£</l:l>
-<l:l i="200">Å€</l:l>
-<l:l i="200">Å¥</l:l>
-<l:l i="200">ÅŠ</l:l>
-<l:l i="200">Å§</l:l>
-<l:l i="200">Æ«</l:l>
-<l:l i="200">Æ¬</l:l>
-<l:l i="200">Æ­</l:l>
-<l:l i="200">Æ®</l:l>
-<l:l i="200">Ê</l:l>
-<l:l i="200">È</l:l>
-<l:l i="200">È</l:l>
-<l:l i="200">È¶</l:l>
-<l:l i="200">á¹ª</l:l>
-<l:l i="200">á¹«</l:l>
-<l:l i="200">á¹¬</l:l>
-<l:l i="200">á¹­</l:l>
-<l:l i="200">á¹®</l:l>
-<l:l i="200">á¹¯</l:l>
-<l:l i="200">á¹°</l:l>
-<l:l i="200">á¹±</l:l>
-<l:l i="200">áº</l:l>
-<l:l i="210">U</l:l>
-<l:l i="210">u</l:l>
-<l:l i="210">Ã</l:l>
-<l:l i="210">Ã¹</l:l>
-<l:l i="210">Ã</l:l>
-<l:l i="210">Ãº</l:l>
-<l:l i="210">Ã</l:l>
-<l:l i="210">Ã»</l:l>
-<l:l i="210">Ã</l:l>
-<l:l i="210">ÃŒ</l:l>
-<l:l i="210">Åš</l:l>
-<l:l i="210">Å©</l:l>
-<l:l i="210">Åª</l:l>
-<l:l i="210">Å«</l:l>
-<l:l i="210">Å¬</l:l>
-<l:l i="210">Å­</l:l>
-<l:l i="210">Å®</l:l>
-<l:l i="210">Å¯</l:l>
-<l:l i="210">Å°</l:l>
-<l:l i="210">Å±</l:l>
-<l:l i="210">Å²</l:l>
-<l:l i="210">Å³</l:l>
-<l:l i="210">Æ¯</l:l>
-<l:l i="210">Æ°</l:l>
-<l:l i="210">Ç</l:l>
-<l:l i="210">Ç</l:l>
-<l:l i="210">Ç</l:l>
-<l:l i="210">Ç</l:l>
-<l:l i="210">Ç</l:l>
-<l:l i="210">Ç</l:l>
-<l:l i="210">Ç</l:l>
-<l:l i="210">Ç</l:l>
-<l:l i="210">Ç</l:l>
-<l:l i="210">Ç</l:l>
-<l:l i="210">È</l:l>
-<l:l i="210">È</l:l>
-<l:l i="210">È</l:l>
-<l:l i="210">È</l:l>
-<l:l i="210">á¹²</l:l>
-<l:l i="210">á¹³</l:l>
-<l:l i="210">á¹Ž</l:l>
-<l:l i="210">á¹µ</l:l>
-<l:l i="210">á¹¶</l:l>
-<l:l i="210">á¹·</l:l>
-<l:l i="210">á¹ž</l:l>
-<l:l i="210">á¹¹</l:l>
-<l:l i="210">á¹º</l:l>
-<l:l i="210">á¹»</l:l>
-<l:l i="210">á»€</l:l>
-<l:l i="210">á»¥</l:l>
-<l:l i="210">á»Š</l:l>
-<l:l i="210">á»§</l:l>
-<l:l i="210">á»š</l:l>
-<l:l i="210">á»©</l:l>
-<l:l i="210">á»ª</l:l>
-<l:l i="210">á»«</l:l>
-<l:l i="210">á»¬</l:l>
-<l:l i="210">á»­</l:l>
-<l:l i="210">á»®</l:l>
-<l:l i="210">á»¯</l:l>
-<l:l i="210">á»°</l:l>
-<l:l i="210">á»±</l:l>
-<l:l i="220">V</l:l>
-<l:l i="220">v</l:l>
-<l:l i="220">Æ²</l:l>
-<l:l i="220">Ê</l:l>
-<l:l i="220">á¹Œ</l:l>
-<l:l i="220">á¹œ</l:l>
-<l:l i="220">á¹Ÿ</l:l>
-<l:l i="220">á¹¿</l:l>
-<l:l i="230">W</l:l>
-<l:l i="230">w</l:l>
-<l:l i="230">ÅŽ</l:l>
-<l:l i="230">Åµ</l:l>
-<l:l i="230">áº</l:l>
-<l:l i="230">áº</l:l>
-<l:l i="230">áº</l:l>
-<l:l i="230">áº</l:l>
-<l:l i="230">áº</l:l>
-<l:l i="230">áº
-</l:l>
-<l:l i="230">áº</l:l>
-<l:l i="230">áº</l:l>
-<l:l i="230">áº</l:l>
-<l:l i="230">áº</l:l>
-<l:l i="230">áº</l:l>
-<l:l i="240">X</l:l>
-<l:l i="240">x</l:l>
-<l:l i="240">áº</l:l>
-<l:l i="240">áº</l:l>
-<l:l i="240">áº</l:l>
-<l:l i="240">áº</l:l>
-<l:l i="250">Y</l:l>
-<l:l i="250">y</l:l>
-<l:l i="250">Ã</l:l>
-<l:l i="250">Ãœ</l:l>
-<l:l i="250">Ã¿</l:l>
-<l:l i="250">Åž</l:l>
-<l:l i="250">Å¶</l:l>
-<l:l i="250">Å·</l:l>
-<l:l i="250">Æ³</l:l>
-<l:l i="250">ÆŽ</l:l>
-<l:l i="250">È²</l:l>
-<l:l i="250">È³</l:l>
-<l:l i="250">áº</l:l>
-<l:l i="250">áº</l:l>
-<l:l i="250">áº</l:l>
-<l:l i="250">á»²</l:l>
-<l:l i="250">á»³</l:l>
-<l:l i="250">á»Ž</l:l>
-<l:l i="250">á»µ</l:l>
-<l:l i="250">á»¶</l:l>
-<l:l i="250">á»·</l:l>
-<l:l i="250">á»ž</l:l>
-<l:l i="250">á»¹</l:l>
-<l:l i="260">Z</l:l>
-<l:l i="260">z</l:l>
-<l:l i="260">Å¹</l:l>
-<l:l i="260">Åº</l:l>
-<l:l i="260">Å»</l:l>
-<l:l i="260">ÅŒ</l:l>
-<l:l i="260">Åœ</l:l>
-<l:l i="260">ÅŸ</l:l>
-<l:l i="260">Æµ</l:l>
-<l:l i="260">Æ¶</l:l>
-<l:l i="260">È€</l:l>
-<l:l i="260">È¥</l:l>
-<l:l i="260">Ê</l:l>
-<l:l i="260">Ê</l:l>
-<l:l i="260">áº</l:l>
-<l:l i="260">áº</l:l>
-<l:l i="260">áº</l:l>
-<l:l i="260">áº</l:l>
-<l:l i="260">áº</l:l>
-<l:l i="260">áº</l:l>
-</l:letters>
-</l:l10n>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/admon.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/admon.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,130 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<xsl:template match="note|important|warning|caution|tip">
-  <xsl:choose>
-    <xsl:when test="$admon.graphics != 0">
-      <xsl:call-template name="graphical.admonition"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="nongraphical.admonition"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="*" mode="admon.graphic.width">
-  <xsl:param name="node" select="."/>
-  <xsl:text>36pt</xsl:text>
-</xsl:template>
-
-<xsl:template name="admon.graphic">
-  <xsl:param name="node" select="."/>
-
-  <xsl:variable name="filename">
-    <xsl:value-of select="$admon.graphics.path"/>
-    <xsl:choose>
-      <xsl:when test="local-name($node)='note'">note</xsl:when>
-      <xsl:when test="local-name($node)='warning'">warning</xsl:when>
-      <xsl:when test="local-name($node)='caution'">caution</xsl:when>
-      <xsl:when test="local-name($node)='tip'">tip</xsl:when>
-      <xsl:when test="local-name($node)='important'">important</xsl:when>
-      <xsl:otherwise>note</xsl:otherwise>
-    </xsl:choose>
-    <xsl:value-of select="$admon.graphics.extension"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$passivetex.extensions != 0
-                    or $fop.extensions != 0
-                    or $arbortext.extensions != 0">
-      <xsl:value-of select="$filename"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:text>url(</xsl:text>
-      <xsl:value-of select="$filename"/>
-      <xsl:text>)</xsl:text>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="graphical.admonition">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-  <xsl:variable name="graphic.width">
-     <xsl:apply-templates select="." mode="admon.graphic.width"/>
-  </xsl:variable>
-
-  <fo:block id="{$id}"
-            xsl:use-attribute-sets="graphical.admonition.properties">
-    <fo:list-block provisional-distance-between-starts="{$graphic.width} + 18pt"
-                    provisional-label-separation="18pt">
-      <fo:list-item>
-          <fo:list-item-label end-indent="label-end()">
-            <fo:block>
-              <fo:external-graphic width="auto" height="auto"
-                                         content-width="{$graphic.width}" >
-                <xsl:attribute name="src">
-                  <xsl:call-template name="admon.graphic"/>
-                </xsl:attribute>
-              </fo:external-graphic>
-            </fo:block>
-          </fo:list-item-label>
-          <fo:list-item-body start-indent="body-start()">
-            <xsl:if test="$admon.textlabel != 0 or title or info/title">
-              <fo:block xsl:use-attribute-sets="admonition.title.properties">
-                <xsl:apply-templates select="." mode="object.title.markup">
-		  <xsl:with-param name="allow-anchors" select="1"/>
-		</xsl:apply-templates>
-              </fo:block>
-            </xsl:if>
-            <fo:block xsl:use-attribute-sets="admonition.properties">
-              <xsl:apply-templates/>
-            </fo:block>
-          </fo:list-item-body>
-      </fo:list-item>
-    </fo:list-block>
-  </fo:block>
-</xsl:template>
-
-<xsl:template name="nongraphical.admonition">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <fo:block id="{$id}"
-            xsl:use-attribute-sets="nongraphical.admonition.properties">
-    <xsl:if test="$admon.textlabel != 0 or title or info/title">
-      <fo:block keep-with-next.within-column='always'
-                xsl:use-attribute-sets="admonition.title.properties">
-         <xsl:apply-templates select="." mode="object.title.markup">
-	   <xsl:with-param name="allow-anchors" select="1"/>
-	 </xsl:apply-templates>
-      </fo:block>
-    </xsl:if>
-
-    <fo:block xsl:use-attribute-sets="admonition.properties">
-      <xsl:apply-templates/>
-    </fo:block>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="note/title"></xsl:template>
-<xsl:template match="important/title"></xsl:template>
-<xsl:template match="warning/title"></xsl:template>
-<xsl:template match="caution/title"></xsl:template>
-<xsl:template match="tip/title"></xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/annotations.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/annotations.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,18 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<xsl:template match="annotation"/>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/autoidx-kimber.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/autoidx-kimber.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,178 +1,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE xsl:stylesheet [
-
-<!ENTITY primary   'normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = ""]))'>
-<!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas) or @sortas = ""]))'>
-<!ENTITY tertiary  'normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas) or @sortas = ""]))'>
-
-<!ENTITY sep '" "'>
-<!-- Documents using the kimber index method must have a lang attribute -->
-<!-- Only one of these should be present in the entity -->
-<!ENTITY lang 'concat(/*/@lang, /*/@xml:lang)'>
-
-<!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node())
-                and ($role = @role or $type = @type or
-                (string-length($role) = 0 and string-length($type) = 0))'>
-]>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                xmlns:k="java:com.isogen.saxoni18n.Saxoni18nService"
-                exclude-result-prefixes="k"
-                version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the DocBook XSL Stylesheet distribution.
-     See ../README or http://docbook.sf.net/ for copyright
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-<!-- The "kimber" method contributed by Eliot Kimber of Innodata Isogen.  -->
-<!-- ==================================================================== -->
-<!--   *** THIS MODULE ONLY WORKS WITH SAXON 6 OR SAXON 8 ***             -->
-<!-- ==================================================================== -->
-
-<xsl:include href="../common/autoidx-kimber.xsl"/>
-
-<!-- Java sort apparently works only on lang part, not country -->
-<xsl:param name="sort.lang">
-  <xsl:choose>
-    <xsl:when test="contains(&lang;, '-')">
-      <xsl:value-of select="substring-before(&lang;, '-')"/>
-    </xsl:when>
-    <xsl:when test="contains(&lang;, '_')">
-      <xsl:value-of select="substring-before(&lang;, '_')"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="&lang;"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:param>
-
-<xsl:template name="generate-kimber-index">
-  <xsl:param name="scope" select="NOTANODE"/>
-
-  <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
-  <xsl:if test="not(contains($vendor, 'SAXON '))">
-    <xsl:message terminate="yes">
-      <xsl:text>ERROR: the 'kimber' index method requires the </xsl:text>
-      <xsl:text>Saxon version 6 or 8 XSLT processor.</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:if test="not(function-available('k:getIndexGroupKey'))">
-    <xsl:message terminate="yes">
-      <xsl:text>ERROR: the 'kimber' index method requires the </xsl:text>
-      <xsl:text>Innodata Isogen &#x0A;Java extensions for </xsl:text>
-      <xsl:text>internationalized indexes. &#x0A;Install those </xsl:text>
-      <xsl:text>extensions, or use a different index method.&#x0A;</xsl:text>
-      <xsl:text>For more information, see:&#x0A;</xsl:text>
-      <xsl:text>http://www.innodata-isogen.com/knowledge_center/tools_downloads/i18nsupport</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:variable name="role">
-    <xsl:if test="$index.on.role != 0">
-      <xsl:value-of select="@role"/>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="type">
-    <xsl:if test="$index.on.type != 0">
-      <xsl:value-of select="@type"/>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="terms"
-                select="//indexterm[count(.|key('k-group',
-                   k:getIndexGroupKey(&lang;, &primary;))
-                   [&scope;][1]) = 1
-                   and not(@class = 'endofrange')]"/>
-
-  <xsl:variable name="alphabetical"
-                select="$terms[not(starts-with(
-                k:getIndexGroupKey(&lang;, &primary;),
-                '#NUMERIC'
-                ))]"/>
-
-  <xsl:variable name="others"
-                select="$terms[starts-with(
-                k:getIndexGroupKey(&lang;, &primary;),
-                '#NUMERIC'
-                )]"/>
-
-  <fo:block>
-    <xsl:if test="$others">
-      <xsl:call-template name="indexdiv.title">
-        <xsl:with-param name="titlecontent">
-          <xsl:call-template name="gentext">
-            <xsl:with-param name="key" select="'index symbols'"/>
-          </xsl:call-template>
-        </xsl:with-param>
-      </xsl:call-template>
-
-      <fo:block>
-        <xsl:apply-templates select="$others"
-                             mode="index-symbol-div">
-          <xsl:with-param name="scope" select="$scope"/>
-          <xsl:with-param name="role" select="$role"/>
-          <xsl:with-param name="type" select="$type"/>
-          <xsl:sort lang="{$sort.lang}"
-              select="k:getIndexGroupSortKey(&lang;,
-                      k:getIndexGroupKey(&lang;, &primary;))"/>
-        </xsl:apply-templates>
-      </fo:block>
-    </xsl:if>
-
-    <xsl:apply-templates select="$alphabetical"
-                         mode="index-div-kimber">
-      <xsl:with-param name="scope" select="$scope"/>
-      <xsl:with-param name="role" select="$role"/>
-      <xsl:with-param name="type" select="$type"/>
-      <xsl:sort lang="{$sort.lang}"
-             select="k:getIndexGroupSortKey(&lang;,
-                     k:getIndexGroupKey(&lang;, &primary;))"/>
-    </xsl:apply-templates>
-  </fo:block>
-
-</xsl:template>
-
-<xsl:template match="indexterm" mode="index-div-kimber">
-  <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-
-  <xsl:variable name="key"
-          select="k:getIndexGroupKey(&lang;, &primary;)"/>
-
-  <xsl:variable name="label"
-          select="k:getIndexGroupLabel(&lang;, $key)"/>
-
-  <xsl:if test="key('k-group', $key)[&scope;]
-                [count(.|key('primary', &primary;)[&scope;][1]) = 1]">
-    <fo:block>
-      <xsl:call-template name="indexdiv.title">
-        <xsl:with-param name="titlecontent">
-          <xsl:value-of select="$label"/>
-        </xsl:with-param>
-      </xsl:call-template>
-      <fo:block>
-        <xsl:apply-templates select="key('k-group', $key)[&scope;]
-                            [count(.|key('primary', &primary;)[&scope;]
-                            [1])=1]"
-                             mode="index-primary">
-          <xsl:sort select="&primary;" lang="{$sort.lang}"/>
-          <xsl:with-param name="scope" select="$scope"/>
-          <xsl:with-param name="role" select="$role"/>
-          <xsl:with-param name="type" select="$type"/>
-        </xsl:apply-templates>
-      </fo:block>
-    </fo:block>
-  </xsl:if>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/autoidx-kosek.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/autoidx-kosek.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,150 +1,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE xsl:stylesheet [
-
-<!ENTITY primary   'normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = ""]))'>
-<!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas) or @sortas = ""]))'>
-<!ENTITY tertiary  'normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas) or @sortas = ""]))'>
-
-<!ENTITY sep '" "'>
-<!-- Documents using the kimber index method must have a lang attribute -->
-<!-- Only one of these should be present in the entity -->
-
-<!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node())
-                and ($role = @role or $type = @type or
-                (string-length($role) = 0 and string-length($type) = 0))'>
-]>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                xmlns:rx="http://www.renderx.com/XSL/Extensions"
-                xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
-                xmlns:i="urn:cz-kosek:functions:index"
-                xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"
-                xmlns:func="http://exslt.org/functions"
-                xmlns:exslt="http://exslt.org/common"
-                extension-element-prefixes="func exslt"
-                exclude-result-prefixes="func exslt i l"
-                version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the DocBook XSL Stylesheet distribution.
-     See ../README or http://docbook.sf.net/ for copyright
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-<!-- The "kosek" method contributed by Jirka Kosek. -->
-
-<xsl:include href="../common/autoidx-kosek.xsl"/>
-
-<xsl:template name="generate-kosek-index">
-  <xsl:param name="scope" select="NOTANODE"/>
-
-  <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
-  <xsl:if test="contains($vendor, 'libxslt')">
-    <xsl:message terminate="yes">
-      <xsl:text>ERROR: the 'kosek' index method does not </xsl:text>
-      <xsl:text>work with the xsltproc XSLT processor.</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:if test="contains($vendor, 'Saxonica')">
-    <xsl:message terminate="yes">
-      <xsl:text>ERROR: the 'kosek' index method does not </xsl:text>
-      <xsl:text>work with the Saxon 8 XSLT processor.</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-
-  <xsl:if test="not(function-available('exslt:node-set') or
-                    function-available('exslt:nodeSet'))">
-    <xsl:message terminate="yes">
-      <xsl:text>ERROR: the 'kosek' index method requires the </xsl:text>
-      <xsl:text>exslt:node-set() function. Use a processor that </xsl:text>
-      <xsl:text>has it, or use a different index method.</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:if test="not(function-available('i:group-index'))">
-    <xsl:message terminate="yes">
-      <xsl:text>ERROR: the 'kosek' index method requires the&#xA;</xsl:text>
-      <xsl:text>index extension functions be imported:&#xA;</xsl:text>
-      <xsl:text>  xsl:import href="common/autoidx-kosek.xsl"</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:variable name="role">
-    <xsl:if test="$index.on.role != 0">
-      <xsl:value-of select="@role"/>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="type">
-    <xsl:if test="$index.on.type != 0">
-      <xsl:value-of select="@type"/>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="terms"
-                select="//indexterm[count(.|key('group-code',
-                                          i:group-index(&primary;))
-                                          [&scope;][1]) = 1
-                                and not(@class = 'endofrange')]"/>
-  <fo:block>
-    <xsl:apply-templates select="$terms" mode="index-div-kosek">
-      <xsl:with-param name="scope" select="$scope"/>
-      <xsl:with-param name="role" select="$role"/>
-      <xsl:with-param name="type" select="$type"/>
-      <xsl:sort select="i:group-index(&primary;)" data-type="number"/>
-    </xsl:apply-templates>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="indexterm" mode="index-div-kosek">
-  <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-
-  <xsl:variable name="key"
-                select="i:group-index(&primary;)"/>
-
-  <xsl:variable name="lang">
-    <xsl:call-template name="l10n.language"/>
-  </xsl:variable>
-
-  <xsl:if test="key('group-code', $key)[&scope;]
-                [count(.|key('primary', &primary;)[&scope;][1]) = 1]">
-    <fo:block>
-      <xsl:call-template name="indexdiv.title">
-        <xsl:with-param name="titlecontent">
-          <xsl:choose>
-            <xsl:when test="$key = 0">
-              <xsl:call-template name="gentext">
-                <xsl:with-param name="key" select="'index symbols'"/>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:value-of select="i:group-letter($key)"/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:with-param>
-      </xsl:call-template>
-      <fo:block>
-        <xsl:apply-templates select="key('group-code', $key)[&scope;]
-                                     [count(.|key('primary', &primary;)
-                                     [&scope;][1])=1]"
-                             mode="index-primary">
-          <xsl:sort select="&primary;" lang="{$lang}"/>
-          <xsl:with-param name="scope" select="$scope"/>
-          <xsl:with-param name="role" select="$role"/>
-          <xsl:with-param name="type" select="$type"/>
-        </xsl:apply-templates>
-      </fo:block>
-    </fo:block>
-  </xsl:if>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/autoidx-ng.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/autoidx-ng.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,20 +1,0 @@
-<?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the DocBook XSL Stylesheet distribution.
-     See ../README or http://docbook.sf.net/ for copyright
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- You should have this directly in your customization file. -->
-<!-- This file is there only to retain backward compatibility. -->
-<xsl:import href="autoidx-kosek.xsl"/>
-<xsl:param name="index.method">kosek</xsl:param>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/autoidx.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/autoidx.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,1310 +1,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE xsl:stylesheet [
-<!ENTITY % common.entities SYSTEM "../common/entities.ent">
-%common.entities;
-]>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                xmlns:rx="http://www.renderx.com/XSL/Extensions"
-                xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
-                xmlns:exslt="http://exslt.org/common"
-                extension-element-prefixes="exslt"
-                exclude-result-prefixes="exslt"
-                version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the DocBook XSL Stylesheet distribution.
-     See ../README or http://docbook.sf.net/ for copyright
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-<!-- The "basic" method derived from Jeni Tennison's work. -->
-<!-- The "kosek" method contributed by Jirka Kosek. -->
-<!-- The "kimber" method contributed by Eliot Kimber of Innodata Isogen. -->
-
-<!-- Importing module for kimber or kosek method overrides one of these -->
-<xsl:param name="kimber.imported" select="0"/>
-<xsl:param name="kosek.imported" select="0"/>
-
-<!-- These keys used primary in all methods -->
-<xsl:key name="letter"
-         match="indexterm"
-         use="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/>
-
-<xsl:key name="primary"
-         match="indexterm"
-         use="&primary;"/>
-
-<xsl:key name="secondary"
-         match="indexterm"
-         use="concat(&primary;, &sep;, &secondary;)"/>
-
-<xsl:key name="tertiary"
-         match="indexterm"
-         use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/>
-
-<xsl:key name="endofrange"
-         match="indexterm[@class='endofrange']"
-         use="@startref"/>
-
-<xsl:key name="see-also"
-         match="indexterm[seealso]"
-         use="concat(&primary;, &sep;, 
-                     &secondary;, &sep;, 
-                     &tertiary;, &sep;, seealso)"/>
-
-<xsl:key name="see"
-         match="indexterm[see]"
-         use="concat(&primary;, &sep;, 
-                     &secondary;, &sep;, 
-                     &tertiary;, &sep;, see)"/>
-
-
-<xsl:template name="generate-index">
-  <xsl:param name="scope" select="(ancestor::book|/)[last()]"/>
-
-  <xsl:choose>
-    <xsl:when test="$index.method = 'kosek'">
-      <xsl:call-template name="generate-kosek-index">
-        <xsl:with-param name="scope" select="$scope"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="$index.method = 'kimber'">
-      <xsl:call-template name="generate-kimber-index">
-        <xsl:with-param name="scope" select="$scope"/>
-      </xsl:call-template>
-    </xsl:when>
-
-    <xsl:otherwise>
-      <xsl:call-template name="generate-basic-index">
-        <xsl:with-param name="scope" select="$scope"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-      
-<xsl:template name="generate-basic-index">
-  <xsl:param name="scope" select="NOTANODE"/>
-
-  <xsl:variable name="role">
-    <xsl:if test="$index.on.role != 0">
-      <xsl:value-of select="@role"/>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="type">
-    <xsl:if test="$index.on.type != 0">
-      <xsl:value-of select="@type"/>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="terms"
-                select="//indexterm
-                        [count(.|key('letter',
-                          translate(substring(&primary;, 1, 1),
-                             &lowercase;,
-                             &uppercase;))
-                          [&scope;][1]) = 1
-                          and not(@class = 'endofrange')]"/>
-
-  <xsl:variable name="alphabetical"
-                select="$terms[contains(concat(&lowercase;, &uppercase;),
-                                        substring(&primary;, 1, 1))]"/>
-
-  <xsl:variable name="others" select="$terms[not(contains(
-                                        concat(&lowercase;,
-                                        &uppercase;),
-                                        substring(&primary;, 1, 1)))]"/>
-  <fo:block>
-    <xsl:if test="$others">
-      <xsl:call-template name="indexdiv.title">
-        <xsl:with-param name="titlecontent">
-          <xsl:call-template name="gentext">
-            <xsl:with-param name="key" select="'index symbols'"/>
-          </xsl:call-template>
-        </xsl:with-param>
-      </xsl:call-template>
-
-      <fo:block>
-        <xsl:apply-templates select="$others[count(.|key('primary',
-                                     &primary;)[&scope;][1]) = 1]"
-                             mode="index-symbol-div">
-          <xsl:with-param name="scope" select="$scope"/>
-          <xsl:with-param name="role" select="$role"/>
-          <xsl:with-param name="type" select="$type"/>
-          <xsl:sort select="translate(&primary;, &lowercase;, 
-                            &uppercase;)"/>
-        </xsl:apply-templates>
-      </fo:block>
-    </xsl:if>
-
-    <xsl:apply-templates select="$alphabetical[count(.|key('letter',
-                                 translate(substring(&primary;, 1, 1),
-                                           &lowercase;,&uppercase;))
-                                           [&scope;][1]) = 1]"
-                         mode="index-div-basic">
-      <xsl:with-param name="scope" select="$scope"/>
-      <xsl:with-param name="role" select="$role"/>
-      <xsl:with-param name="type" select="$type"/>
-      <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
-    </xsl:apply-templates>
-  </fo:block>
-</xsl:template>
-
-<!-- This template not used if fo/autoidx-kosek.xsl is imported -->
-<xsl:template name="generate-kosek-index">
-  <xsl:param name="scope" select="NOTANODE"/>
-
-  <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
-  <xsl:if test="contains($vendor, 'libxslt')">
-    <xsl:message terminate="yes">
-      <xsl:text>ERROR: the 'kosek' index method does not </xsl:text>
-      <xsl:text>work with the xsltproc XSLT processor.</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-
-  <xsl:if test="not(function-available('exslt:node-set') or
-                    function-available('exslt:nodeSet'))">
-    <xsl:message terminate="yes">
-      <xsl:text>ERROR: the 'kosek' index method requires the </xsl:text>
-      <xsl:text>exslt:node-set() function. Use a processor that </xsl:text>
-      <xsl:text>has it, or use a different index method.</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:if test="$kosek.imported = 0">
-    <xsl:message terminate="yes">
-      <xsl:text>ERROR: the 'kosek' index method requires the&#xA;</xsl:text>
-      <xsl:text>kosek index extensions be imported:&#xA;</xsl:text>
-      <xsl:text>  xsl:import href="fo/autoidx-kosek.xsl"</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-</xsl:template>
-
-
-<!-- This template not used if fo/autoidx-kimber.xsl is imported -->
-<xsl:template name="generate-kimber-index">
-  <xsl:param name="scope" select="NOTANODE"/>
-
-  <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
-  <xsl:if test="not(contains($vendor, 'SAXON '))">
-    <xsl:message terminate="yes">
-      <xsl:text>ERROR: the 'kimber' index method requires the </xsl:text>
-      <xsl:text>Saxon version 6 or 8 XSLT processor.</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:if test="$kimber.imported = 0">
-    <xsl:message terminate="yes">
-      <xsl:text>ERROR: the 'kimber' index method requires the&#xA;</xsl:text>
-      <xsl:text>kimber index extensions be imported:&#xA;</xsl:text>
-      <xsl:text>  xsl:import href="fo/autoidx-kimber.xsl"</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-</xsl:template>
-
-<xsl:template match="indexterm" mode="index-div-basic">
-  <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-
-  <xsl:variable name="key"
-                select="translate(substring(&primary;, 1, 1),
-                         &lowercase;,&uppercase;)"/>
-
-  <xsl:if test="key('letter', $key)[&scope;]
-                [count(.|key('primary', &primary;)[&scope;][1]) = 1]">
-    <fo:block>
-      <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)">
-        <xsl:call-template name="indexdiv.title">
-          <xsl:with-param name="titlecontent">
-            <xsl:value-of select="translate($key, &lowercase;, &uppercase;)"/>
-          </xsl:with-param>
-        </xsl:call-template>
-      </xsl:if>
-      <fo:block xsl:use-attribute-sets="index.entry.properties">
-        <xsl:apply-templates select="key('letter', $key)[&scope;]
-                                     [count(.|key('primary', &primary;)
-                                     [&scope;][1])=1]"
-                             mode="index-primary">
-          <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
-          <xsl:with-param name="scope" select="$scope"/>
-          <xsl:with-param name="role" select="$role"/>
-          <xsl:with-param name="type" select="$type"/>
-        </xsl:apply-templates>
-      </fo:block>
-    </fo:block>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="indexterm" mode="index-symbol-div">
-  <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-
-  <xsl:variable name="key"
-                select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/>
-
-  <fo:block xsl:use-attribute-sets="index.entry.properties">
-    <xsl:apply-templates select="key('letter', $key)[&scope;][count(.|key('primary', &primary;)[&scope;][1]) = 1]"
-                         mode="index-primary">
-      <xsl:with-param name="scope" select="$scope"/>
-      <xsl:with-param name="role" select="$role"/>
-      <xsl:with-param name="type" select="$type"/>
-      <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
-    </xsl:apply-templates>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="indexterm" mode="index-primary">
-  <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-
-  <xsl:variable name="key" select="&primary;"/>
-  <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/>
-
-  <xsl:variable name="term.separator">
-    <xsl:call-template name="index.separator">
-      <xsl:with-param name="key" select="'index.term.separator'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="range.separator">
-    <xsl:call-template name="index.separator">
-      <xsl:with-param name="key" select="'index.range.separator'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="number.separator">
-    <xsl:call-template name="index.separator">
-      <xsl:with-param name="key" select="'index.number.separator'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <fo:block>
-    <xsl:if test="$axf.extensions != 0">
-      <xsl:attribute name="axf:suppress-duplicate-page-number">true</xsl:attribute>
-    </xsl:if>
-    <xsl:value-of select="primary"/>
-
-    <xsl:choose>
-      <xsl:when test="$xep.extensions != 0">
-        <xsl:if test="$refs[not(see) and not(secondary)]">
-          <xsl:copy-of select="$term.separator"/>
-          <xsl:variable name="primary" select="&primary;"/>
-          <xsl:variable name="primary.significant" select="concat(&primary;, $significant.flag)"/>
-          <rx:page-index list-separator="{$number.separator}"
-                         range-separator="{$range.separator}">
-            <xsl:if test="$refs[@significance='preferred'][not(see) and not(secondary)]">
-              <rx:index-item xsl:use-attribute-sets="index.preferred.page.properties xep.index.item.properties"
-                ref-key="{$primary.significant}"/>
-            </xsl:if>
-            <xsl:if test="$refs[not(@significance) or @significance!='preferred'][not(see) and not(secondary)]">
-              <rx:index-item xsl:use-attribute-sets="xep.index.item.properties"
-                ref-key="{$primary}"/>
-            </xsl:if>
-          </rx:page-index>        
-        </xsl:if>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:variable name="page-number-citations">
-          <xsl:for-each select="$refs[not(see) 
-                                and not(secondary)]">
-            <xsl:apply-templates select="." mode="reference">
-              <xsl:with-param name="scope" select="$scope"/>
-              <xsl:with-param name="role" select="$role"/>
-              <xsl:with-param name="type" select="$type"/>
-              <xsl:with-param name="position" select="position()"/>
-            </xsl:apply-templates>
-          </xsl:for-each>
-        </xsl:variable>
-
-        <xsl:choose>
-          <xsl:when test="$passivetex.extensions != '0'">
-            <fotex:sort xmlns:fotex="http://www.tug.org/fotex">
-              <xsl:copy-of select="$page-number-citations"/>
-            </fotex:sort>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:copy-of select="$page-number-citations"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:otherwise>
-    </xsl:choose>
-
-    <xsl:if test="$refs[not(secondary)]/*[self::see]">
-      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &sep;, &sep;, see))[&scope;][1])]"
-                           mode="index-see">
-         <xsl:with-param name="scope" select="$scope"/>
-         <xsl:with-param name="role" select="$role"/>
-         <xsl:with-param name="type" select="$type"/>
-         <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
-      </xsl:apply-templates>
-    </xsl:if>
-
-  </fo:block>
-
-  <xsl:if test="$refs/secondary or $refs[not(secondary)]/*[self::seealso]">
-    <fo:block start-indent="1pc">
-      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &sep;, &sep;, seealso))[&scope;][1])]"
-                           mode="index-seealso">
-         <xsl:with-param name="scope" select="$scope"/>
-         <xsl:with-param name="role" select="$role"/>
-         <xsl:with-param name="type" select="$type"/>
-         <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
-      </xsl:apply-templates>
-      <xsl:apply-templates select="$refs[secondary and count(.|key('secondary', concat($key, &sep;, &secondary;))[&scope;][1]) = 1]"
-                           mode="index-secondary">
-       <xsl:with-param name="scope" select="$scope"/>
-       <xsl:with-param name="role" select="$role"/>
-       <xsl:with-param name="type" select="$type"/>
-       <xsl:sort select="translate(&secondary;, &lowercase;, &uppercase;)"/>
-      </xsl:apply-templates>
-    </fo:block>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="indexterm" mode="index-secondary">
-  <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-
-  <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;)"/>
-  <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/>
-
-  <xsl:variable name="term.separator">
-    <xsl:call-template name="index.separator">
-      <xsl:with-param name="key" select="'index.term.separator'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="range.separator">
-    <xsl:call-template name="index.separator">
-      <xsl:with-param name="key" select="'index.range.separator'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="number.separator">
-    <xsl:call-template name="index.separator">
-      <xsl:with-param name="key" select="'index.number.separator'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <fo:block>
-    <xsl:if test="$axf.extensions != 0">
-      <xsl:attribute name="axf:suppress-duplicate-page-number">true</xsl:attribute>
-    </xsl:if>
-    <xsl:value-of select="secondary"/>
-
-    <xsl:choose>
-      <xsl:when test="$xep.extensions != 0">
-        <xsl:if test="$refs[not(see) and not(tertiary)]">
-          <xsl:copy-of select="$term.separator"/>
-          <xsl:variable name="primary" select="&primary;"/>
-          <xsl:variable name="secondary" select="&secondary;"/>
-          <xsl:variable name="primary.significant" select="concat(&primary;, $significant.flag)"/>
-          <rx:page-index list-separator="{$number.separator}"
-                         range-separator="{$range.separator}">
-            <xsl:if test="$refs[@significance='preferred'][not(see) and not(tertiary)]">
-              <rx:index-item xsl:use-attribute-sets="index.preferred.page.properties xep.index.item.properties">
-                <xsl:attribute name="ref-key">
-                  <xsl:value-of select="$primary.significant"/>
-                  <xsl:text>, </xsl:text>
-                  <xsl:value-of select="$secondary"/>
-                </xsl:attribute>
-              </rx:index-item>
-            </xsl:if>
-            <xsl:if test="$refs[not(@significance) or @significance!='preferred'][not(see) and not(tertiary)]">
-              <rx:index-item xsl:use-attribute-sets="xep.index.item.properties">
-                <xsl:attribute name="ref-key">
-                  <xsl:value-of select="$primary"/>
-                  <xsl:text>, </xsl:text>
-                  <xsl:value-of select="$secondary"/>
-                </xsl:attribute>
-              </rx:index-item>
-            </xsl:if>
-          </rx:page-index>
-        </xsl:if>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:variable name="page-number-citations">
-          <xsl:for-each select="$refs[not(see) 
-                                and not(tertiary)]">
-            <xsl:apply-templates select="." mode="reference">
-              <xsl:with-param name="scope" select="$scope"/>
-              <xsl:with-param name="role" select="$role"/>
-              <xsl:with-param name="type" select="$type"/>
-              <xsl:with-param name="position" select="position()"/>
-            </xsl:apply-templates>
-          </xsl:for-each>
-        </xsl:variable>
-
-        <xsl:choose>
-          <xsl:when test="$passivetex.extensions != '0'">
-            <fotex:sort xmlns:fotex="http://www.tug.org/fotex">
-              <xsl:copy-of select="$page-number-citations"/>
-            </fotex:sort>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:copy-of select="$page-number-citations"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:otherwise>
-    </xsl:choose>
-
-    <xsl:if test="$refs[not(tertiary)]/*[self::see]">
-      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, see))[&scope;][1])]"
-                           mode="index-see">
-        <xsl:with-param name="scope" select="$scope"/>
-        <xsl:with-param name="role" select="$role"/>
-        <xsl:with-param name="type" select="$type"/>
-        <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
-      </xsl:apply-templates>
-    </xsl:if>
-
-  </fo:block>
-
-  <xsl:if test="$refs/tertiary or $refs[not(tertiary)]/*[self::seealso]">
-    <fo:block start-indent="2pc">
-      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, seealso))[&scope;][1])]"
-                           mode="index-seealso">
-          <xsl:with-param name="scope" select="$scope"/>
-          <xsl:with-param name="role" select="$role"/>
-          <xsl:with-param name="type" select="$type"/>
-          <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
-      </xsl:apply-templates>
-      <xsl:apply-templates select="$refs[tertiary and count(.|key('tertiary', concat($key, &sep;, &tertiary;))[&scope;][1]) = 1]" 
-                           mode="index-tertiary">
-          <xsl:with-param name="scope" select="$scope"/>
-          <xsl:with-param name="role" select="$role"/>
-          <xsl:with-param name="type" select="$type"/>
-          <xsl:sort select="translate(&tertiary;, &lowercase;, &uppercase;)"/>
-      </xsl:apply-templates>
-    </fo:block>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="indexterm" mode="index-tertiary">
-  <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-  <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/>
-  <xsl:variable name="refs" select="key('tertiary', $key)[&scope;]"/>
-
-  <xsl:variable name="term.separator">
-    <xsl:call-template name="index.separator">
-      <xsl:with-param name="key" select="'index.term.separator'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="range.separator">
-    <xsl:call-template name="index.separator">
-      <xsl:with-param name="key" select="'index.range.separator'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="number.separator">
-    <xsl:call-template name="index.separator">
-      <xsl:with-param name="key" select="'index.number.separator'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <fo:block>
-    <xsl:if test="$axf.extensions != 0">
-      <xsl:attribute name="axf:suppress-duplicate-page-number">true</xsl:attribute>
-    </xsl:if>
-    <xsl:value-of select="tertiary"/>
-
-    <xsl:choose>
-      <xsl:when test="$xep.extensions != 0">
-        <xsl:if test="$refs[not(see)]">
-          <xsl:copy-of select="$term.separator"/>
-          <xsl:variable name="primary" select="&primary;"/>
-          <xsl:variable name="secondary" select="&secondary;"/>
-          <xsl:variable name="tertiary" select="&tertiary;"/>
-          <xsl:variable name="primary.significant" select="concat(&primary;, $significant.flag)"/>
-          <rx:page-index list-separator="{$number.separator}"
-                         range-separator="{$range.separator}">
-            <xsl:if test="$refs[@significance='preferred'][not(see)]">
-              <rx:index-item xsl:use-attribute-sets="index.preferred.page.properties xep.index.item.properties">
-                <xsl:attribute name="ref-key">
-                  <xsl:value-of select="$primary.significant"/>
-                  <xsl:text>, </xsl:text>
-                  <xsl:value-of select="$secondary"/>
-                  <xsl:text>, </xsl:text>
-                  <xsl:value-of select="$tertiary"/>
-                </xsl:attribute>
-              </rx:index-item>
-            </xsl:if>
-            <xsl:if test="$refs[not(@significance) or @significance!='preferred'][not(see)]">
-              <rx:index-item xsl:use-attribute-sets="xep.index.item.properties">
-                <xsl:attribute name="ref-key">
-                  <xsl:value-of select="$primary"/>
-                  <xsl:text>, </xsl:text>
-                  <xsl:value-of select="$secondary"/>
-                  <xsl:text>, </xsl:text>
-                  <xsl:value-of select="$tertiary"/>
-                </xsl:attribute>
-              </rx:index-item>
-            </xsl:if>
-          </rx:page-index>
-        </xsl:if>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:variable name="page-number-citations">
-          <xsl:for-each select="$refs[not(see)]">
-            <xsl:apply-templates select="." mode="reference">
-              <xsl:with-param name="scope" select="$scope"/>
-              <xsl:with-param name="role" select="$role"/>
-              <xsl:with-param name="type" select="$type"/>
-              <xsl:with-param name="position" select="position()"/>
-            </xsl:apply-templates>
-          </xsl:for-each>
-        </xsl:variable>
-
-        <xsl:choose>
-          <xsl:when test="$passivetex.extensions != '0'">
-            <fotex:sort xmlns:fotex="http://www.tug.org/fotex">
-              <xsl:copy-of select="$page-number-citations"/>
-            </fotex:sort>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:copy-of select="$page-number-citations"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:otherwise>
-    </xsl:choose>
-
-    <xsl:if test="$refs/see">
-      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see))[&scope;][1])]"
-                           mode="index-see">
-        <xsl:with-param name="scope" select="$scope"/>
-        <xsl:with-param name="role" select="$role"/>
-        <xsl:with-param name="type" select="$type"/>
-        <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
-      </xsl:apply-templates>
-    </xsl:if>
-
-  </fo:block>
-
-  <xsl:if test="$refs/seealso">
-    <fo:block>
-      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, seealso))[&scope;][1])]"
-                           mode="index-seealso">
-        <xsl:with-param name="scope" select="$scope"/>
-        <xsl:with-param name="role" select="$role"/>
-        <xsl:with-param name="type" select="$type"/>
-        <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
-      </xsl:apply-templates>
-    </fo:block>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="indexterm" mode="reference">
-  <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-  <xsl:param name="position" select="0"/>
-  <xsl:param name="separator" select="''"/>
-
-  <xsl:variable name="term.separator">
-    <xsl:call-template name="index.separator">
-      <xsl:with-param name="key" select="'index.term.separator'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="range.separator">
-    <xsl:call-template name="index.separator">
-      <xsl:with-param name="key" select="'index.range.separator'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="number.separator">
-    <xsl:call-template name="index.separator">
-      <xsl:with-param name="key" select="'index.number.separator'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$separator != ''">
-      <xsl:value-of select="$separator"/>
-    </xsl:when>
-    <xsl:when test="$position = 1">
-      <xsl:value-of select="$term.separator"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$number.separator"/>
-    </xsl:otherwise>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="@zone and string(@zone)">
-      <xsl:call-template name="reference">
-        <xsl:with-param name="zones" select="normalize-space(@zone)"/>
-        <xsl:with-param name="scope" select="$scope"/>
-        <xsl:with-param name="role" select="$role"/>
-        <xsl:with-param name="type" select="$type"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="ancestor::*[contains(local-name(),'info') and not(starts-with(local-name(),'info'))]">
-      <xsl:call-template name="info.reference">
-        <xsl:with-param name="scope" select="$scope"/>
-        <xsl:with-param name="role" select="$role"/>
-        <xsl:with-param name="type" select="$type"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:variable name="id">
-        <xsl:call-template name="object.id"/>
-      </xsl:variable>
-
-      <fo:basic-link internal-destination="{$id}"
-                     xsl:use-attribute-sets="index.page.number.properties">
-        <fo:page-number-citation ref-id="{$id}"/>
-      </fo:basic-link>
-
-      <xsl:if test="key('endofrange', $id)[&scope;]">
-        <xsl:apply-templates select="key('endofrange', $id)[&scope;][last()]"
-                             mode="reference">
-          <xsl:with-param name="scope" select="$scope"/>
-          <xsl:with-param name="role" select="$role"/>
-          <xsl:with-param name="type" select="$type"/>
-          <xsl:with-param name="separator" select="$range.separator"/>
-        </xsl:apply-templates>
-      </xsl:if>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="reference">
-  <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-  <xsl:param name="zones"/>
-
-  <xsl:variable name="number.separator">
-    <xsl:call-template name="index.separator">
-      <xsl:with-param name="key" select="'index.number.separator'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="contains($zones, ' ')">
-      <xsl:variable name="zone" select="substring-before($zones, ' ')"/>
-      <xsl:variable name="target" select="key('id', $zone)[&scope;]"/>
-
-      <xsl:variable name="id">
-        <xsl:call-template name="object.id">
-           <xsl:with-param name="object" select="$target[1]"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <fo:basic-link internal-destination="{$id}"
-                     xsl:use-attribute-sets="index.page.number.properties">
-        <fo:page-number-citation ref-id="{$id}"/>
-      </fo:basic-link>
-
-      <xsl:if test="$passivetex.extensions = '0'">
-        <xsl:copy-of select="$number.separator"/>
-      </xsl:if>
-      <xsl:call-template name="reference">
-        <xsl:with-param name="zones" select="substring-after($zones, ' ')"/>
-        <xsl:with-param name="scope" select="$scope"/>
-        <xsl:with-param name="role" select="$role"/>
-        <xsl:with-param name="type" select="$type"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:variable name="zone" select="$zones"/>
-      <xsl:variable name="target" select="key('id', $zone)[&scope;]"/>
-
-      <xsl:variable name="id">
-        <xsl:call-template name="object.id">
-          <xsl:with-param name="object" select="$target[1]"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <fo:basic-link internal-destination="{$id}"
-                     xsl:use-attribute-sets="index.page.number.properties">
-        <fo:page-number-citation ref-id="{$id}"/>
-      </fo:basic-link>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="info.reference">
-  <!-- This is not perfect. It doesn't treat indexterm inside info element as a range covering whole parent of info.
-       It also not work when there is no ID generated for parent element. But it works in the most common cases. -->
-  <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-
-  <xsl:variable name="target" select="(ancestor::appendix|ancestor::article|ancestor::bibliography|ancestor::book|
-                                       ancestor::chapter|ancestor::glossary|ancestor::part|ancestor::preface|
-                                       ancestor::refentry|ancestor::reference|ancestor::refsect1|ancestor::refsect2|
-                                       ancestor::refsect3|ancestor::refsection|ancestor::refsynopsisdiv|
-                                       ancestor::sect1|ancestor::sect2|ancestor::sect3|ancestor::sect4|ancestor::sect5|
-                                       ancestor::section|ancestor::setindex|ancestor::set|ancestor::sidebar)[&scope;]"/>
-  
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="$target[1]"/>
-    </xsl:call-template>
-  </xsl:variable>
-  
-  <fo:basic-link internal-destination="{$id}"
-                 xsl:use-attribute-sets="index.page.number.properties">
-    <fo:page-number-citation ref-id="{$id}"/>
-  </fo:basic-link>
-</xsl:template>
-
-<xsl:template match="indexterm" mode="index-see">
-   <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-
-   <fo:inline>
-     <xsl:text> (</xsl:text>
-     <xsl:call-template name="gentext">
-       <xsl:with-param name="key" select="'see'"/>
-     </xsl:call-template>
-     <xsl:text> </xsl:text>
-     <xsl:value-of select="see"/>
-     <xsl:text>)</xsl:text>
-   </fo:inline>
-</xsl:template>
-
-<xsl:template match="indexterm" mode="index-seealso">
-   <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-
-  <xsl:for-each select="seealso">
-    <xsl:sort select="translate(., &lowercase;, &uppercase;)"/>
-    <fo:block>
-      <xsl:text>(</xsl:text>
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'seealso'"/>
-      </xsl:call-template>
-      <xsl:text> </xsl:text>
-      <xsl:value-of select="."/>
-      <xsl:text>)</xsl:text>
-    </fo:block>
-  </xsl:for-each>
-
-</xsl:template>
-
-<!-- ====================================================================== -->
-
-<xsl:template name="generate-index-markup">
-  <xsl:param name="scope" select="(ancestor::book|/)[last()]"/>
-  <xsl:param name="role" select="@role"/>
-  <xsl:param name="type" select="@type"/>
-
-  <xsl:variable name="terms" select="$scope//indexterm[count(.|key('letter',
-                                     translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;))[&scope;][1]) = 1]"/>
-  <xsl:variable name="alphabetical"
-                select="$terms[contains(concat(&lowercase;, &uppercase;),
-                                        substring(&primary;, 1, 1))]"/>
-  <xsl:variable name="others" select="$terms[not(contains(concat(&lowercase;,
-                                                 &uppercase;),
-                                             substring(&primary;, 1, 1)))]"/>
-
-  <xsl:text>&lt;index&gt;&#10;</xsl:text>
-  <xsl:if test="$others">
-    <xsl:text>&#10;&lt;indexdiv&gt;&#10;</xsl:text>
-    <xsl:text>&lt;title&gt;</xsl:text>
-    <xsl:call-template name="gentext">
-      <xsl:with-param name="key" select="'index symbols'"/>
-    </xsl:call-template>
-    <xsl:text>&lt;/title&gt;&#10;</xsl:text>
-    <xsl:apply-templates select="$others[count(.|key('primary',
-                                 &primary;)[&scope;][1]) = 1]"
-                         mode="index-symbol-div-markup">
-      <xsl:with-param name="scope" select="$scope"/>
-      <xsl:with-param name="role" select="$role"/>
-      <xsl:with-param name="type" select="$type"/>
-      <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
-    </xsl:apply-templates>
-    <xsl:text>&lt;/indexdiv&gt;&#10;</xsl:text>
-  </xsl:if>
-
-  <xsl:apply-templates select="$alphabetical[count(.|key('letter',
-                               translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;))[&scope;][1]) = 1]"
-                       mode="index-div-markup">
-      <xsl:with-param name="scope" select="$scope"/>
-      <xsl:with-param name="role" select="$role"/>
-      <xsl:with-param name="type" select="$type"/>
-      <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
-  </xsl:apply-templates>
-  <xsl:text>&lt;/index&gt;&#10;</xsl:text>
-</xsl:template>
-
-<xsl:template match="*" mode="index-markup">
-  <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-
-  <xsl:text>&lt;</xsl:text>
-  <xsl:value-of select="local-name(.)"/>
-  <xsl:text>&gt;&#10;</xsl:text>
-  <xsl:apply-templates mode="index-markup">
-    <xsl:with-param name="scope" select="$scope"/>
-    <xsl:with-param name="role" select="$role"/>
-    <xsl:with-param name="type" select="$type"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="indexterm" mode="index-div-markup">
-  <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-  <xsl:variable name="key" select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/>
-  <xsl:text>&#10;&lt;indexdiv&gt;&#10;</xsl:text>
-  <xsl:text>&lt;title&gt;</xsl:text>
-  <xsl:value-of select="translate($key, &lowercase;, &uppercase;)"/>
-  <xsl:text>&lt;/title&gt;&#10;</xsl:text>
-
-  <xsl:apply-templates select="key('letter', $key)[&scope;][count(.|key('primary', &primary;)[&scope;][1]) = 1]"
-                       mode="index-primary-markup">
-    <xsl:with-param name="scope" select="$scope"/>
-    <xsl:with-param name="role" select="$role"/>
-    <xsl:with-param name="type" select="$type"/>
-    <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
-  </xsl:apply-templates>
-  <xsl:text>&lt;/indexdiv&gt;&#10;</xsl:text>
-</xsl:template>
-
-<xsl:template match="indexterm" mode="index-symbol-div-markup">
-  <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-  <xsl:variable name="key" select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/>
-
-  <xsl:apply-templates select="key('letter', $key)[&scope;][count(.|key('primary', &primary;)[&scope;][1]) = 1]"
-                       mode="index-primary-markup">
-    <xsl:with-param name="scope" select="$scope"/>
-    <xsl:with-param name="role" select="$role"/>
-    <xsl:with-param name="type" select="$type"/>
-    <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="indexterm" mode="index-primary-markup">
-  <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-  <xsl:variable name="key" select="&primary;"/>
-  <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/>
-  <xsl:variable name="pages" select="$refs[not(see) and not(seealso)]"/>
-
-  <xsl:text>&#10;&lt;indexentry&gt;&#10;</xsl:text>
-  <xsl:text>&lt;primaryie&gt;</xsl:text>
-  <xsl:text>&lt;phrase&gt;</xsl:text>
-  <xsl:call-template name="escape-text">
-    <xsl:with-param name="text" select="string(primary)"/>
-  </xsl:call-template>
-  <xsl:text>&lt;/phrase&gt;</xsl:text>
-  <xsl:if test="$pages">,</xsl:if>
-  <xsl:text>&#10;</xsl:text>
-
-  <xsl:for-each select="$pages">
-    <xsl:apply-templates select="." mode="reference-markup">
-      <xsl:with-param name="scope" select="$scope"/>
-      <xsl:with-param name="role" select="$role"/>
-      <xsl:with-param name="type" select="$type"/>
-    </xsl:apply-templates>
-  </xsl:for-each>
-
-  <xsl:text>&lt;/primaryie&gt;&#10;</xsl:text>
-
-  <xsl:if test="$refs/secondary or $refs[not(secondary)]/*[self::see or self::seealso]">
-    <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &sep;, &sep;, see))[&scope;][1])]"
-                         mode="index-see-markup">
-      <xsl:with-param name="scope" select="$scope"/>
-      <xsl:with-param name="role" select="$role"/>
-      <xsl:with-param name="type" select="$type"/>
-      <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
-    </xsl:apply-templates>
-
-    <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &sep;, &sep;, seealso))[&scope;][1])]"
-                         mode="index-seealso-markup">
-      <xsl:with-param name="scope" select="$scope"/>
-      <xsl:with-param name="role" select="$role"/>
-      <xsl:with-param name="type" select="$type"/>
-      <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
-    </xsl:apply-templates>
-
-    <xsl:apply-templates select="$refs[secondary and count(.|key('secondary', concat($key, &sep;, &secondary;))[&scope;][1]) = 1]" 
-                         mode="index-secondary-markup">
-      <xsl:with-param name="scope" select="$scope"/>
-      <xsl:with-param name="role" select="$role"/>
-      <xsl:with-param name="type" select="$type"/>
-      <xsl:sort select="translate(&secondary;, &lowercase;, &uppercase;)"/>
-    </xsl:apply-templates>
-  </xsl:if>
-  <xsl:text>&lt;/indexentry&gt;&#10;</xsl:text>
-</xsl:template>
-
-<xsl:template match="indexterm" mode="index-secondary-markup">
-  <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-  <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;)"/>
-  <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/>
-  <xsl:variable name="pages" select="$refs[not(see) and not(seealso)]"/>
-
-  <xsl:text>&lt;secondaryie&gt;</xsl:text>
-  <xsl:text>&lt;phrase&gt;</xsl:text>
-  <xsl:call-template name="escape-text">
-    <xsl:with-param name="text" select="string(secondary)"/>
-  </xsl:call-template>
-  <xsl:text>&lt;/phrase&gt;</xsl:text>
-  <xsl:if test="$pages">,</xsl:if>
-  <xsl:text>&#10;</xsl:text>
-
-  <xsl:for-each select="$pages">
-    <xsl:apply-templates select="." mode="reference-markup">
-      <xsl:with-param name="scope" select="$scope"/>
-      <xsl:with-param name="role" select="$role"/>
-      <xsl:with-param name="type" select="$type"/>
-    </xsl:apply-templates>
-  </xsl:for-each>
-
-  <xsl:text>&lt;/secondaryie&gt;&#10;</xsl:text>
-
-  <xsl:if test="$refs/tertiary or $refs[not(tertiary)]/*[self::see or self::seealso]">
-    <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, see))[&scope;][1])]"
-                         mode="index-see-markup">
-      <xsl:with-param name="scope" select="$scope"/>
-      <xsl:with-param name="role" select="$role"/>
-      <xsl:with-param name="type" select="$type"/>
-      <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
-    </xsl:apply-templates>
-    <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, seealso))[&scope;][1])]"
-                         mode="index-seealso-markup">
-      <xsl:with-param name="scope" select="$scope"/>
-      <xsl:with-param name="role" select="$role"/>
-      <xsl:with-param name="type" select="$type"/>
-      <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
-    </xsl:apply-templates>
-    <xsl:apply-templates select="$refs[tertiary and count(.|key('tertiary', concat($key, &sep;, &tertiary;))[&scope;][1]) = 1]" 
-                         mode="index-tertiary-markup">
-      <xsl:with-param name="scope" select="$scope"/>
-      <xsl:with-param name="role" select="$role"/>
-      <xsl:with-param name="type" select="$type"/>
-      <xsl:sort select="translate(&tertiary;, &lowercase;, &uppercase;)"/>
-    </xsl:apply-templates>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="indexterm" mode="index-tertiary-markup">
-  <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-  <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/>
-  <xsl:variable name="refs" select="key('tertiary', $key)[&scope;]"/>
-  <xsl:variable name="pages" select="$refs[not(see) and not(seealso)]"/>
-
-  <xsl:text>&lt;tertiaryie&gt;</xsl:text>
-  <xsl:text>&lt;phrase&gt;</xsl:text>
-  <xsl:call-template name="escape-text">
-    <xsl:with-param name="text" select="string(tertiary)"/>
-  </xsl:call-template>
-  <xsl:text>&lt;/phrase&gt;</xsl:text>
-  <xsl:if test="$pages">,</xsl:if>
-  <xsl:text>&#10;</xsl:text>
-
-  <xsl:for-each select="$pages">
-    <xsl:apply-templates select="." mode="reference-markup">
-      <xsl:with-param name="scope" select="$scope"/>
-      <xsl:with-param name="role" select="$role"/>
-      <xsl:with-param name="type" select="$type"/>
-    </xsl:apply-templates>
-  </xsl:for-each>
-
-  <xsl:text>&lt;/tertiaryie&gt;&#10;</xsl:text>
-
-  <xsl:variable name="see" select="$refs/see | $refs/seealso"/>
-  <xsl:if test="$see">
-    <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see))[&scope;][1])]"
-                         mode="index-see-markup">
-      <xsl:with-param name="scope" select="$scope"/>
-      <xsl:with-param name="role" select="$role"/>
-      <xsl:with-param name="type" select="$type"/>
-      <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
-    </xsl:apply-templates>
-    <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, seealso))[&scope;][1])]"
-                         mode="index-seealso-markup">
-      <xsl:with-param name="scope" select="$scope"/>
-      <xsl:with-param name="role" select="$role"/>
-      <xsl:with-param name="type" select="$type"/>
-      <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
-    </xsl:apply-templates>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="indexterm" mode="reference-markup">
-  <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-
-  <xsl:choose>
-    <xsl:when test="@zone and string(@zone)">
-      <xsl:call-template name="reference-markup">
-        <xsl:with-param name="zones" select="normalize-space(@zone)"/>
-        <xsl:with-param name="scope" select="$scope"/>
-        <xsl:with-param name="role" select="$role"/>
-        <xsl:with-param name="type" select="$type"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:variable name="id">
-        <xsl:call-template name="object.id"/>
-      </xsl:variable>
-
-
-      <xsl:choose>
-        <xsl:when test="@startref and @class='endofrange'">
-          <xsl:text>&lt;phrase role="pageno"&gt;</xsl:text>
-          <xsl:text>&lt;link linkend="</xsl:text>
-          <xsl:value-of select="@startref"/>
-          <xsl:text>"&gt;</xsl:text>
-          <fo:basic-link internal-destination="{@startref}"
-                     xsl:use-attribute-sets="index.page.number.properties">
-            <fo:page-number-citation ref-id="{@startref}"/>
-            <xsl:text>-</xsl:text>
-            <fo:page-number-citation ref-id="{$id}"/>
-          </fo:basic-link>
-          <xsl:text>&lt;/link&gt;</xsl:text>
-          <xsl:text>&lt;/phrase&gt;&#10;</xsl:text>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:text>&lt;phrase role="pageno"&gt;</xsl:text>
-          <xsl:if test="$id">
-            <xsl:text>&lt;link linkend="</xsl:text>
-            <xsl:value-of select="$id"/>
-            <xsl:text>"&gt;</xsl:text>
-          </xsl:if>
-          <fo:basic-link internal-destination="{$id}"
-                     xsl:use-attribute-sets="index.page.number.properties">
-            <fo:page-number-citation ref-id="{$id}"/>
-          </fo:basic-link>
-          <xsl:if test="$id">
-            <xsl:text>&lt;/link&gt;</xsl:text>
-          </xsl:if>
-          <xsl:text>&lt;/phrase&gt;&#10;</xsl:text>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="reference-markup">
-  <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-  <xsl:param name="zones"/>
-  <xsl:choose>
-    <xsl:when test="contains($zones, ' ')">
-      <xsl:variable name="zone" select="substring-before($zones, ' ')"/>
-      <xsl:variable name="target" select="key('id', $zone)[&scope;]"/>
-
-      <xsl:variable name="id">
-        <xsl:call-template name="object.id">
-          <xsl:with-param name="object" select="$target[1]"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <xsl:text>&lt;phrase fole="pageno"&gt;</xsl:text>
-      <xsl:if test="$target[1]/@id or $target[1]/@xml:id">
-        <xsl:text>&lt;link linkend="</xsl:text>
-        <xsl:value-of select="$id"/>
-        <xsl:text>"&gt;</xsl:text>
-      </xsl:if>
-      <fo:basic-link internal-destination="{$id}"
-                     xsl:use-attribute-sets="index.page.number.properties">
-        <fo:page-number-citation ref-id="{$id}"/>
-      </fo:basic-link>
-      <xsl:if test="$target[1]/@id or $target[1]/@xml:id">
-        <xsl:text>&lt;/link&gt;</xsl:text>
-      </xsl:if>
-      <xsl:text>&lt;/phrase&gt;&#10;</xsl:text>
-
-      <xsl:call-template name="reference">
-        <xsl:with-param name="zones" select="substring-after($zones, ' ')"/>
-        <xsl:with-param name="scope" select="$scope"/>
-        <xsl:with-param name="role" select="$role"/>
-        <xsl:with-param name="type" select="$type"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:variable name="zone" select="$zones"/>
-      <xsl:variable name="target" select="key('id', $zone)[&scope;]"/>
-
-      <xsl:variable name="id">
-        <xsl:call-template name="object.id">
-          <xsl:with-param name="object" select="$target[1]"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <xsl:text>&lt;phrase role="pageno"&gt;</xsl:text>
-      <xsl:if test="$target[1]/@id or target[1]/@xml:id">
-        <xsl:text>&lt;link linkend="</xsl:text>
-        <xsl:value-of select="$id"/>
-        <xsl:text>"&gt;</xsl:text>
-      </xsl:if>
-      <fo:basic-link internal-destination="{$id}"
-                     xsl:use-attribute-sets="index.page.number.properties">
-        <fo:page-number-citation ref-id="{$id}"/>
-      </fo:basic-link>
-      <xsl:if test="$target[1]/@id or target[1]/@xml:id">
-        <xsl:text>&lt;/link&gt;</xsl:text>
-      </xsl:if>
-      <xsl:text>&lt;/phrase&gt;&#10;</xsl:text>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="indexterm" mode="index-see-markup">
-  <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-  <fo:block>
-    <xsl:text>&lt;seeie&gt;</xsl:text>
-    <xsl:text>&lt;phrase&gt;</xsl:text>
-    <xsl:call-template name="escape-text">
-      <xsl:with-param name="text" select="string(see)"/>
-    </xsl:call-template>
-    <xsl:text>&lt;/phrase&gt;</xsl:text>
-    <xsl:text>&lt;/seeie&gt;&#10;</xsl:text>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="indexterm" mode="index-seealso-markup">
-  <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-  <fo:block>
-    <xsl:text>&lt;seealsoie&gt;</xsl:text>
-    <xsl:text>&lt;phrase&gt;</xsl:text>
-    <xsl:call-template name="escape-text">
-      <xsl:with-param name="text" select="string(seealso)"/>
-    </xsl:call-template>
-    <xsl:text>&lt;/phrase&gt;</xsl:text>
-    <xsl:text>&lt;/seealsoie&gt;&#10;</xsl:text>
-  </fo:block>
-</xsl:template>
-
-<xsl:template name="escape-text">
-  <xsl:param name="text" select="''"/>
-
-  <xsl:variable name="ltpos" select="substring-before($text, '&lt;')"/>
-  <xsl:variable name="amppos" select="substring-before($text, '&amp;')"/>
-
-  <xsl:choose>
-    <xsl:when test="contains($text,'&lt;') and contains($text, '&amp;')
-                    and string-length($ltpos) &lt; string-length($amppos)">
-      <xsl:value-of select="$ltpos"/>
-      <xsl:text>&amp;lt;</xsl:text>
-      <xsl:call-template name="escape-text">
-        <xsl:with-param name="text" select="substring-after($text, '&lt;')"/>
-      </xsl:call-template>
-    </xsl:when>
-
-    <xsl:when test="contains($text,'&lt;') and contains($text, '&amp;')
-                    and string-length($amppos) &lt; string-length($ltpos)">
-      <xsl:value-of select="$amppos"/>
-      <xsl:text>&amp;amp;</xsl:text>
-      <xsl:call-template name="escape-text">
-        <xsl:with-param name="text" select="substring-after($text, '&amp;')"/>
-      </xsl:call-template>
-    </xsl:when>
-
-    <xsl:when test="contains($text, '&lt;')">
-      <xsl:value-of select="$ltpos"/>
-      <xsl:text>&amp;lt;</xsl:text>
-      <xsl:call-template name="escape-text">
-        <xsl:with-param name="text" select="substring-after($text, '&lt;')"/>
-      </xsl:call-template>
-    </xsl:when>
-
-    <xsl:when test="contains($text, '&amp;')">
-      <xsl:value-of select="$amppos"/>
-      <xsl:text>&amp;amp;</xsl:text>
-      <xsl:call-template name="escape-text">
-        <xsl:with-param name="text" select="substring-after($text, '&amp;')"/>
-      </xsl:call-template>
-    </xsl:when>
-
-    <xsl:otherwise>
-      <xsl:value-of select="$text"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="index.separator">
-  <xsl:param name="key" select="''"/>
-  <xsl:param name="lang">
-    <xsl:call-template name="l10n.language"/>
-  </xsl:param>
-
-  <xsl:choose>
-    <xsl:when test="$key = 'index.term.separator'">
-      <xsl:choose>
-        <!-- Use the override if not blank -->
-        <xsl:when test="$index.term.separator != ''">
-          <xsl:copy-of select="$index.term.separator"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="gentext.template">
-            <xsl:with-param name="lang" select="$lang"/>
-            <xsl:with-param name="context">index</xsl:with-param>
-            <xsl:with-param name="name">term-separator</xsl:with-param>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:when test="$key = 'index.number.separator'">
-      <xsl:choose>
-        <!-- Use the override if not blank -->
-        <xsl:when test="$index.number.separator != ''">
-          <xsl:copy-of select="$index.number.separator"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="gentext.template">
-            <xsl:with-param name="lang" select="$lang"/>
-            <xsl:with-param name="context">index</xsl:with-param>
-            <xsl:with-param name="name">number-separator</xsl:with-param>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:when test="$key = 'index.range.separator'">
-      <xsl:choose>
-        <!-- Use the override if not blank -->
-        <xsl:when test="$index.range.separator != ''">
-          <xsl:copy-of select="$index.range.separator"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="gentext.template">
-            <xsl:with-param name="lang" select="$lang"/>
-            <xsl:with-param name="context">index</xsl:with-param>
-            <xsl:with-param name="name">range-separator</xsl:with-param>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/autotoc.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/autotoc.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,855 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:template name="set.toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="cid">
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="$toc-context"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="nodes" select="book|setindex"/>
-
-  <xsl:if test="$nodes">
-    <fo:block id="toc...{$id}"
-              xsl:use-attribute-sets="toc.margin.properties">
-      <xsl:if test="$axf.extensions != 0">
-        <xsl:attribute name="axf:outline-level">1</xsl:attribute>
-        <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
-        <xsl:attribute name="axf:outline-title">
-          <xsl:call-template name="gentext">
-            <xsl:with-param name="key" select="'TableofContents'"/>
-          </xsl:call-template>
-        </xsl:attribute>
-      </xsl:if>
-      <xsl:call-template name="table.of.contents.titlepage"/>
-      <xsl:apply-templates select="$nodes" mode="toc">
-        <xsl:with-param name="toc-context" select="$toc-context"/>
-      </xsl:apply-templates>
-    </fo:block>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="division.toc">
-  <xsl:param name="toc-context" select="."/>
-  <xsl:param name="toc.title.p" select="true()"/>
-
-  <xsl:variable name="cid">
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="$toc-context"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="nodes"
-                select="$toc-context/part
-                        |$toc-context/reference
-                        |$toc-context/preface
-                        |$toc-context/chapter
-                        |$toc-context/appendix
-                        |$toc-context/article
-                        |$toc-context/bibliography
-                        |$toc-context/glossary
-                        |$toc-context/index"/>
-
-  <xsl:if test="$nodes">
-    <fo:block id="toc...{$cid}"
-              xsl:use-attribute-sets="toc.margin.properties">
-      <xsl:if test="$axf.extensions != 0">
-        <xsl:attribute name="axf:outline-level">1</xsl:attribute>
-        <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
-        <xsl:attribute name="axf:outline-title">
-          <xsl:call-template name="gentext">
-            <xsl:with-param name="key" select="'TableofContents'"/>
-          </xsl:call-template>
-        </xsl:attribute>
-      </xsl:if>
-      <xsl:if test="$toc.title.p">
-        <xsl:call-template name="table.of.contents.titlepage"/>
-      </xsl:if>
-      <xsl:apply-templates select="$nodes" mode="toc">
-        <xsl:with-param name="toc-context" select="$toc-context"/>
-      </xsl:apply-templates>
-    </fo:block>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="component.toc">
-  <xsl:param name="toc-context" select="."/>
-  <xsl:param name="toc.title.p" select="true()"/>
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="cid">
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="$toc-context"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="nodes" select="section|sect1|refentry
-                                     |article|bibliography|glossary
-                                     |qandaset[$qanda.in.toc != 0]
-                                     |appendix|index"/>
-  <xsl:if test="$nodes">
-    <fo:block id="toc...{$id}"
-              xsl:use-attribute-sets="toc.margin.properties">
-      <xsl:if test="$toc.title.p">
-        <xsl:call-template name="table.of.contents.titlepage"/>
-      </xsl:if>
-      <xsl:apply-templates select="$nodes" mode="toc">
-        <xsl:with-param name="toc-context" select="$toc-context"/>
-      </xsl:apply-templates>
-    </fo:block>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="component.toc.separator">
-  <!-- Customize to output something between
-       component.toc and first output -->
-</xsl:template>
-
-<xsl:template name="section.toc">
-  <xsl:param name="toc-context" select="."/>
-  <xsl:param name="toc.title.p" select="true()"/>
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="cid">
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="$toc-context"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="nodes"
-                select="section|sect1|sect2|sect3|sect4|sect5|refentry
-                        |qandaset[$qanda.in.toc != 0]
-                        |bridgehead[$bridgehead.in.toc != 0]"/>
-
-  <xsl:variable name="level">
-    <xsl:call-template name="section.level"/>
-  </xsl:variable>
-
-  <xsl:if test="$nodes">
-    <fo:block id="toc...{$id}"
-              xsl:use-attribute-sets="toc.margin.properties">
-
-      <xsl:if test="$toc.title.p">
-        <xsl:call-template name="section.heading">
-          <xsl:with-param name="level" select="$level + 1"/>
-          <xsl:with-param name="title">
-            <fo:block space-after="0.5em">
-              <xsl:call-template name="gentext">
-                <xsl:with-param name="key" select="'TableofContents'"/>
-              </xsl:call-template>
-            </fo:block>
-          </xsl:with-param>
-        </xsl:call-template>
-      </xsl:if>
-
-      <xsl:apply-templates select="$nodes" mode="toc">
-        <xsl:with-param name="toc-context" select="$toc-context"/>
-      </xsl:apply-templates>
-    </fo:block>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="section.toc.separator">
-  <!-- Customize to output something between
-       section.toc and first output -->
-</xsl:template>
-<!-- ==================================================================== -->
-
-<xsl:template name="toc.line">
-  <xsl:param name="toc-context" select="NOTANODE"/>
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="label">
-    <xsl:apply-templates select="." mode="label.markup"/>
-  </xsl:variable>
-
-  <fo:block xsl:use-attribute-sets="toc.line.properties">
-    <fo:inline keep-with-next.within-line="always">
-      <fo:basic-link internal-destination="{$id}">
-        <xsl:if test="$label != ''">
-          <xsl:copy-of select="$label"/>
-          <xsl:value-of select="$autotoc.label.separator"/>
-        </xsl:if>
-        <xsl:apply-templates select="." mode="titleabbrev.markup"/>
-      </fo:basic-link>
-    </fo:inline>
-    <fo:inline keep-together.within-line="always">
-      <xsl:text> </xsl:text>
-      <fo:leader leader-pattern="dots"
-                 leader-pattern-width="3pt"
-                 leader-alignment="reference-area"
-                 keep-with-next.within-line="always"/>
-      <xsl:text> </xsl:text> 
-      <fo:basic-link internal-destination="{$id}">
-        <fo:page-number-citation ref-id="{$id}"/>
-      </fo:basic-link>
-    </fo:inline>
-  </fo:block>
-</xsl:template>
-
-<!-- ==================================================================== -->
-<xsl:template name="qandaset.toc">
-  <xsl:param name="toc-context" select="."/>
-  <xsl:param name="toc.title.p" select="true()"/>
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="cid">
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="$toc-context"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="nodes" select="qandadiv|qandaentry"/>
-
-  <xsl:if test="$nodes">
-    <fo:block id="toc...{$id}"
-              xsl:use-attribute-sets="toc.margin.properties">
-      <xsl:if test="$toc.title.p">
-        <xsl:call-template name="table.of.contents.titlepage"/>
-      </xsl:if>
-      <xsl:apply-templates select="$nodes" mode="toc">
-        <xsl:with-param name="toc-context" select="$toc-context"/>
-      </xsl:apply-templates>
-    </fo:block>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="qandaset.toc.separator">
-  <!-- Customize to output something between
-       qandaset.toc and first output -->
-</xsl:template>
-
-<xsl:template match="qandadiv" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="cid">
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="$toc-context"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:call-template name="toc.line">
-    <xsl:with-param name="toc-context" select="$toc-context"/>
-  </xsl:call-template>
-
-  <xsl:variable name="nodes" select="qandadiv|qandaentry"/>
-
-  <xsl:if test="$nodes">
-    <fo:block id="toc.{$cid}.{$id}">
-      <xsl:attribute name="margin-left">
-        <xsl:call-template name="set.toc.indent"/>
-      </xsl:attribute>
-
-      <xsl:apply-templates select="$nodes" mode="toc">
-        <xsl:with-param name="toc-context" select="$toc-context"/>
-      </xsl:apply-templates>
-    </fo:block>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="qandaentry" mode="toc">
-  <xsl:apply-templates select="question" mode="toc"/>
-</xsl:template>
-
-<xsl:template match="question" mode="toc">
-  <xsl:variable name="firstchunk">
-    <xsl:apply-templates select="(*[local-name(.)!='label'])[1]/node()"/>
-  </xsl:variable>
-
-  <xsl:variable name="deflabel">
-    <xsl:choose>
-      <xsl:when test="ancestor-or-self::*[@defaultlabel]">
-        <xsl:value-of select="(ancestor-or-self::*[@defaultlabel])[last()]
-                              /@defaultlabel"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$qanda.defaultlabel"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="label">
-    <xsl:apply-templates select="." mode="label.markup"/>
-  </xsl:variable>
-
-  <fo:block xsl:use-attribute-sets="toc.line.properties"
-	    margin-left="3em"
-	    text-indent="-3em"
-            end-indent="{$toc.indent.width}pt"
-            last-line-end-indent="-{$toc.indent.width}pt">
-    <fo:inline keep-with-next.within-line="always">
-      <fo:basic-link internal-destination="{$id}">
-        <xsl:if test="$label != ''">
-          <xsl:copy-of select="$label"/>
-          <xsl:if test="$deflabel = 'number' and not(label)">
-            <xsl:value-of select="$autotoc.label.separator"/>
-          </xsl:if>
-	  <xsl:text> </xsl:text>
-        </xsl:if>
-        <xsl:copy-of select="$firstchunk"/>
-      </fo:basic-link>
-    </fo:inline>
-    <fo:inline keep-together.within-line="always">
-      <xsl:text> </xsl:text>
-      <fo:leader leader-pattern="dots"
-                 leader-pattern-width="3pt"
-                 leader-alignment="reference-area"
-                 keep-with-next.within-line="always"/>
-      <xsl:text> </xsl:text> 
-      <fo:basic-link internal-destination="{$id}">
-        <fo:page-number-citation ref-id="{$id}"/>
-      </fo:basic-link>
-    </fo:inline>
-  </fo:block>
-
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="book|setindex" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="cid">
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="$toc-context"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:call-template name="toc.line">
-    <xsl:with-param name="toc-context" select="$toc-context"/>
-  </xsl:call-template>
-
-  <xsl:variable name="nodes" select="glossary|bibliography|preface|chapter
-                                     |reference|part|article|appendix|index"/>
-
-  <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
-
-  <xsl:if test="$toc.section.depth > 0 
-                and $toc.max.depth > $depth.from.context
-                and $nodes">
-    <fo:block id="toc.{$cid}.{$id}">
-      <xsl:attribute name="margin-left">
-        <xsl:call-template name="set.toc.indent"/>
-      </xsl:attribute>
-
-      <xsl:apply-templates select="$nodes" mode="toc">
-        <xsl:with-param name="toc-context" select="$toc-context"/>
-      </xsl:apply-templates>
-    </fo:block>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="part" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="cid">
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="$toc-context"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:call-template name="toc.line">
-    <xsl:with-param name="toc-context" select="$toc-context"/>
-  </xsl:call-template>
-
-  <xsl:variable name="nodes" select="chapter|appendix|preface|reference|
-                                     refentry|article|index|glossary|
-                                     bibliography"/>
-
-  <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
-
-  <xsl:if test="$toc.section.depth > 0 
-                and $toc.max.depth > $depth.from.context
-                and $nodes">
-    <fo:block id="toc.{$cid}.{$id}">
-      <xsl:attribute name="margin-left">
-        <xsl:call-template name="set.toc.indent"/>
-      </xsl:attribute>
-      
-      <xsl:apply-templates select="$nodes" mode="toc">
-        <xsl:with-param name="toc-context" select="$toc-context"/>
-      </xsl:apply-templates>
-    </fo:block>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="reference" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="cid">
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="$toc-context"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
-
-  <xsl:call-template name="toc.line">
-    <xsl:with-param name="toc-context" select="$toc-context"/>
-  </xsl:call-template>
-
-  <xsl:if test="$toc.section.depth > 0
-                and $toc.max.depth > $depth.from.context
-                and refentry">
-    <fo:block id="toc.{$cid}.{$id}">
-      <xsl:attribute name="margin-left">
-        <xsl:call-template name="set.toc.indent"/>
-      </xsl:attribute>
-              
-      <xsl:apply-templates select="refentry" mode="toc">
-        <xsl:with-param name="toc-context" select="$toc-context"/>
-      </xsl:apply-templates>
-    </fo:block>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="refentry" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <xsl:call-template name="toc.line">
-    <xsl:with-param name="toc-context" select="$toc-context"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="preface|chapter|appendix|article"
-              mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="cid">
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="$toc-context"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:call-template name="toc.line">
-    <xsl:with-param name="toc-context" select="$toc-context"/>
-  </xsl:call-template>
-
-  <xsl:variable name="nodes" select="section|sect1
-                                     |qandaset[$qanda.in.toc != 0]
-                                     |simplesect[$simplesect.in.toc != 0]
-                                     |refentry|appendix"/>
-
-  <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
-
-  <xsl:if test="$toc.section.depth > 0 
-                and $toc.max.depth > $depth.from.context
-                and $nodes">
-    <fo:block id="toc.{$cid}.{$id}">
-      <xsl:attribute name="margin-left">
-        <xsl:call-template name="set.toc.indent"/>
-      </xsl:attribute>
-              
-      <xsl:apply-templates select="$nodes" mode="toc">
-        <xsl:with-param name="toc-context" select="$toc-context"/>
-      </xsl:apply-templates>
-    </fo:block>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="sect1" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="cid">
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="$toc-context"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:call-template name="toc.line">
-    <xsl:with-param name="toc-context" select="$toc-context"/>
-  </xsl:call-template>
-
-  <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
-
-  <xsl:if test="$toc.section.depth > 1 
-                and $toc.max.depth > $depth.from.context
-                and sect2">
-    <fo:block id="toc.{$cid}.{$id}">
-      <xsl:attribute name="margin-left">
-        <xsl:call-template name="set.toc.indent"/>
-      </xsl:attribute>
-              
-      <xsl:apply-templates select="sect2|qandaset[$qanda.in.toc != 0]" 
-                           mode="toc">
-        <xsl:with-param name="toc-context" select="$toc-context"/>
-      </xsl:apply-templates>
-    </fo:block>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="sect2" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="cid">
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="$toc-context"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:call-template name="toc.line">
-    <xsl:with-param name="toc-context" select="$toc-context"/>
-  </xsl:call-template>
-
-  <xsl:variable name="reldepth"
-                select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
-
-  <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
-
-  <xsl:if test="$toc.section.depth > 2 
-                and $toc.max.depth > $depth.from.context
-                and sect3">
-    <fo:block id="toc.{$cid}.{$id}">
-      <xsl:attribute name="margin-left">
-        <xsl:call-template name="set.toc.indent">
-          <xsl:with-param name="reldepth" select="$reldepth"/>
-        </xsl:call-template>
-      </xsl:attribute>
-              
-      <xsl:apply-templates select="sect3|qandaset[$qanda.in.toc != 0]" 
-                           mode="toc">
-        <xsl:with-param name="toc-context" select="$toc-context"/>
-      </xsl:apply-templates>
-    </fo:block>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="sect3" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="cid">
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="$toc-context"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:call-template name="toc.line">
-    <xsl:with-param name="toc-context" select="$toc-context"/>
-  </xsl:call-template>
-
-  <xsl:variable name="reldepth"
-                select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
-
-  <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
-
-  <xsl:if test="$toc.section.depth > 3 
-                and $toc.max.depth > $depth.from.context
-                and sect4">
-    <fo:block id="toc.{$cid}.{$id}">
-      <xsl:attribute name="margin-left">
-        <xsl:call-template name="set.toc.indent">
-          <xsl:with-param name="reldepth" select="$reldepth"/>
-        </xsl:call-template>
-      </xsl:attribute>
-              
-      <xsl:apply-templates select="sect4|qandaset[$qanda.in.toc != 0]" 
-                           mode="toc">
-        <xsl:with-param name="toc-context" select="$toc-context"/>
-      </xsl:apply-templates>
-    </fo:block>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="sect4" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="cid">
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="$toc-context"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:call-template name="toc.line">
-    <xsl:with-param name="toc-context" select="$toc-context"/>
-  </xsl:call-template>
-
-  <xsl:variable name="reldepth"
-                select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
-
-  <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
-
-  <xsl:if test="$toc.section.depth > 4 
-                and $toc.max.depth > $depth.from.context
-                and sect5">
-    <fo:block id="toc.{$cid}.{$id}">
-      <xsl:attribute name="margin-left">
-        <xsl:call-template name="set.toc.indent">
-          <xsl:with-param name="reldepth" select="$reldepth"/>
-        </xsl:call-template>
-      </xsl:attribute>
-              
-      <xsl:apply-templates select="sect5|qandaset[$qanda.in.toc != 0]" 
-                           mode="toc">
-        <xsl:with-param name="toc-context" select="$toc-context"/>
-      </xsl:apply-templates>
-    </fo:block>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="sect5|simplesect" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <xsl:call-template name="toc.line">
-    <xsl:with-param name="toc-context" select="$toc-context"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="set.toc.indent">
-  <xsl:param name="reldepth"/>
-
-  <xsl:variable name="depth">
-    <xsl:choose>
-      <xsl:when test="$reldepth != ''">
-        <xsl:value-of select="$reldepth"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="count(ancestor::*)"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$fop.extensions != 0 or $passivetex.extensions != 0">
-       <xsl:value-of select="concat($depth*$toc.indent.width, 'pt')"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="concat($toc.indent.width, 'pt')"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-
-<xsl:template match="section" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="cid">
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="$toc-context"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="depth" select="count(ancestor::section) + 1"/>
-  <xsl:variable name="reldepth"
-                select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
-
-  <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
-
-  <xsl:if test="$toc.section.depth &gt;= $depth">
-    <xsl:call-template name="toc.line">
-      <xsl:with-param name="toc-context" select="$toc-context"/>
-    </xsl:call-template>
-
-    <xsl:if test="$toc.section.depth > $depth 
-                  and $toc.max.depth > $depth.from.context
-                  and section">
-      <fo:block id="toc.{$cid}.{$id}">
-        <xsl:attribute name="margin-left">
-          <xsl:call-template name="set.toc.indent">
-            <xsl:with-param name="reldepth" select="$reldepth"/>
-          </xsl:call-template>
-        </xsl:attribute>
-                
-        <xsl:apply-templates select="section|qandaset[$qanda.in.toc != 0]" 
-                           mode="toc">
-          <xsl:with-param name="toc-context" select="$toc-context"/>
-        </xsl:apply-templates>
-      </fo:block>
-    </xsl:if>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="bibliography|glossary"
-              mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <xsl:call-template name="toc.line">
-    <xsl:with-param name="toc-context" select="$toc-context"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="index" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <xsl:if test="* or $generate.index != 0">
-    <xsl:call-template name="toc.line">
-    <xsl:with-param name="toc-context" select="$toc-context"/>
-  </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="title" mode="toc">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="list.of.titles">
-  <xsl:param name="titles" select="'table'"/>
-  <xsl:param name="nodes" select=".//table"/>
-  <xsl:param name="toc-context" select="."/>
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:if test="$nodes">
-    <fo:block id="lot...{$titles}...{$id}">
-      <xsl:choose>
-        <xsl:when test="$titles='table'">
-          <xsl:call-template name="list.of.tables.titlepage"/>
-        </xsl:when>
-        <xsl:when test="$titles='figure'">
-          <xsl:call-template name="list.of.figures.titlepage"/>
-        </xsl:when>
-        <xsl:when test="$titles='equation'">
-          <xsl:call-template name="list.of.equations.titlepage"/>
-        </xsl:when>
-        <xsl:when test="$titles='example'">
-          <xsl:call-template name="list.of.examples.titlepage"/>
-        </xsl:when>
-        <xsl:when test="$titles='procedure'">
-          <xsl:call-template name="list.of.procedures.titlepage"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="list.of.unknowns.titlepage"/>
-        </xsl:otherwise>
-      </xsl:choose>
-      <xsl:apply-templates select="$nodes" mode="toc">
-        <xsl:with-param name="toc-context" select="$toc-context"/>
-      </xsl:apply-templates>
-    </fo:block>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="figure|table|example|equation|procedure" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-  <xsl:call-template name="toc.line">
-    <xsl:with-param name="toc-context" select="$toc-context"/>
-  </xsl:call-template>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<!-- qandaset handled like a section when qanda.in.toc is set -->
-<xsl:template match="qandaset" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="cid">
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="$toc-context"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="depth" select="count(ancestor::section) + 1"/>
-  <xsl:variable name="reldepth"
-                select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
-
-  <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
-
-  <xsl:if test="$toc.section.depth &gt;= $depth">
-    <xsl:call-template name="toc.line">
-      <xsl:with-param name="toc-context" select="$toc-context"/>
-    </xsl:call-template>
-
-    <xsl:if test="$toc.section.depth > $depth 
-                  and $toc.max.depth > $depth.from.context
-                  and (child::qandadiv or child::qandaentry)">
-      <fo:block id="toc.{$cid}.{$id}">
-        <xsl:attribute name="margin-left">
-          <xsl:call-template name="set.toc.indent">
-            <xsl:with-param name="reldepth" select="$reldepth"/>
-          </xsl:call-template>
-        </xsl:attribute>
-                
-        <xsl:apply-templates select="qandadiv|qandaentry" mode="toc">
-          <xsl:with-param name="toc-context" select="$toc-context"/>
-        </xsl:apply-templates>
-      </fo:block>
-    </xsl:if>
-  </xsl:if>
-</xsl:template>
-
-</xsl:stylesheet>
-
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/axf.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/axf.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,110 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ******************************************************************** -->
-
-<xsl:template name="axf-document-information">
-
-    <xsl:variable name="authors" select="(//author|//editor|
-                                          //corpauthor|//authorgroup)[1]"/>
-    <xsl:if test="$authors">
-      <xsl:variable name="author">
-        <xsl:choose>
-          <xsl:when test="$authors[self::authorgroup]">
-            <xsl:call-template name="person.name.list">
-              <xsl:with-param name="person.list" 
-                 select="$authors/*[self::author|self::corpauthor|
-                               self::othercredit|self::editor]"/>
-            </xsl:call-template>
-          </xsl:when>
-          <xsl:when test="$authors[self::corpauthor]">
-            <xsl:value-of select="$authors"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:call-template name="person.name">
-              <xsl:with-param name="node" select="$authors"/>
-            </xsl:call-template>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:variable>
-
-      <xsl:element name="axf:document-info">
-        <xsl:attribute name="name">author</xsl:attribute>
-        <xsl:attribute name="value">
-          <xsl:value-of select="normalize-space($author)"/>
-        </xsl:attribute>
-      </xsl:element>
-    </xsl:if>
-
-    <xsl:variable name="title">
-      <xsl:apply-templates select="/*[1]" mode="label.markup"/>
-      <xsl:apply-templates select="/*[1]" mode="title.markup"/>
-    </xsl:variable>
-
-    <!-- * see bug report #1465301 - mzjn -->
-    <axf:document-info name="title">
-      <xsl:attribute name="value">
-        <xsl:value-of select="normalize-space($title)"/>
-      </xsl:attribute>
-    </axf:document-info>
-
-    <xsl:if test="//keyword">
-      <xsl:element name="axf:document-info">
-        <xsl:attribute name="name">keywords</xsl:attribute>
-        <xsl:attribute name="value">
-          <xsl:for-each select="//keyword">
-            <xsl:value-of select="normalize-space(.)"/>
-            <xsl:if test="position() != last()">
-              <xsl:text>, </xsl:text>
-            </xsl:if>
-          </xsl:for-each>
-        </xsl:attribute>
-      </xsl:element>
-    </xsl:if>
-
-    <xsl:if test="//subjectterm">
-      <xsl:element name="axf:document-info">
-        <xsl:attribute name="name">subject</xsl:attribute>
-        <xsl:attribute name="value">
-          <xsl:for-each select="//subjectterm">
-            <xsl:value-of select="normalize-space(.)"/>
-            <xsl:if test="position() != last()">
-              <xsl:text>, </xsl:text>
-            </xsl:if>
-          </xsl:for-each>
-        </xsl:attribute>
-      </xsl:element>
-    </xsl:if>
-
-</xsl:template>
-
-<!-- These properties are added to fo:simple-page-master -->
-<xsl:template name="axf-page-master-properties">
-  <xsl:param name="page.master" select="''"/>
-
-  <xsl:if test="$crop.marks != 0">
-    <xsl:attribute name="axf:printer-marks">crop</xsl:attribute>
-    <xsl:attribute name="axf:bleed"><xsl:value-of
-                          select="$crop.mark.bleed"/></xsl:attribute>
-    <xsl:attribute name="axf:printer-marks-line-width"><xsl:value-of
-                          select="$crop.mark.width"/></xsl:attribute>
-    <xsl:attribute name="axf:crop-offset"><xsl:value-of
-                          select="$crop.mark.offset"/></xsl:attribute>
-  </xsl:if>
-
-  <xsl:call-template name="user-axf-page-master-properties">
-    <xsl:with-param name="page.master" select="$page.master"/>
-  </xsl:call-template>
-
-</xsl:template>
-
-<xsl:template name="user-axf-page-master-properties">
-  <xsl:param name="page.master" select="''"/>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/biblio-iso690.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/biblio-iso690.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,1300 +1,0 @@
-<?xml version="1.0" encoding="windows-1250"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     The original code for processing bibliography in ISO690 style
-     was provided by Jana Dvorakova <jana4u@seznam.cz>
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<!-- if biblioentry.alt.primary.seps is set to nonzero value then use alternative separators for primary responsibility - $alt.person.two.sep, $alt.person.last.sep, $alt.person.more.sep  -->
-<xsl:param name="biblioentry.alt.primary.seps" select="0"/>
-
-<!-- how many authors will be printed if there is more than three authors - set to number 1 (default value), 2 or 3 -->
-<xsl:param name="biblioentry.primary.count" select="1"/>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="iso690.makecitation">
-<!-- Types of resources -->
-  <xsl:choose>
-
-    <!-- SYSTEMS OF ELECTRONIC COMMUNICATION : ENTIRE MESSAGE SYSTEM -->
-    <!-- same as Monographs -->
-    <xsl:when test="./@role='messagesystem'">
-      <xsl:call-template name="iso690.monogr"/>
-    </xsl:when>
-
-    <!-- SYSTEMS OF ELECTRONIC COMMUNICATION : ELECTRONIC MESSAGES -->
-    <!-- same as Contributions to Monographs -->
-    <xsl:when test="./@role='message'">
-      <xsl:call-template name="iso690.paper.mon"/>
-    </xsl:when>
-
-    <!-- SERIALS -->
-    <xsl:when test="./@role='serial' or ./biblioid/@class='issn' or ./issn">
-      <xsl:call-template name="iso690.serial"/>
-    </xsl:when>
-
-    <!-- PARTS OF MONOGRAPHS -->
-    <xsl:when test="./@role='part' or (./bibliomisc[@role='secnum']|./bibliomisc[@role='sectitle'])">
-      <xsl:call-template name="iso690.monogr.part"/>
-    </xsl:when>
-
-    <!-- CONTRIBUTIONS TO MONOGRAPHS -->
-    <xsl:when test="./@role='contribution' or (./biblioset/@relation='part' and ./biblioset/@relation='book')">
-      <xsl:call-template name="iso690.paper.mon"/>
-    </xsl:when>
-
-    <!-- ARTICLES, ETC., IN SERIALS -->
-    <xsl:when test="./@role='article' or (./biblioset/@relation='journal' and ./biblioset/@relation='article')">
-      <xsl:call-template name="iso690.article"/>
-    </xsl:when>
-
-    <!-- PATENT DOCUMENTS -->
-    <xsl:when test="./@role='patent' or (./bibliomisc[@role='patenttype'] and ./bibliomisc[@role='patentnum'])">
-      <xsl:call-template name="iso690.patent"/>
-    </xsl:when>
-
-    <!-- MONOGRAPHS -->
-    <xsl:otherwise>
-      <xsl:call-template name="iso690.monogr"/>
-    </xsl:otherwise>
-
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<!-- MONOGRAPHS -->
-<xsl:template name="iso690.monogr">
-  <!-- Primary responsibility -->
-  <xsl:call-template name="iso690.primary"/>
-  <!-- Title and Type of medium -->
-  <xsl:call-template name="iso690.title"/>
-  <!-- Subordinate responsibility -->
-  <xsl:call-template name="iso690.secondary"/>
-  <!-- Edition -->
-  <xsl:call-template name="iso690.edition"/>
-  <!-- Place of publication, Publisher, Year/Date of publication, Date of update/revision, Date of citation -->
-  <xsl:call-template name="iso690.pub"/>
-  <!-- Extent -->
-  <xsl:call-template name="iso690.extent"/>
-  <!-- Series -->
-  <xsl:call-template name="iso690.serie"/>
-  <!-- Notes -->
-  <xsl:call-template name="iso690.notice"/>
-  <!-- Avaibility and access -->
-  <xsl:call-template name="iso690.access"/>
-  <!-- Standard number -->
-  <xsl:call-template name="iso690.isbn"/>
-</xsl:template>
-
-<!-- SERIALS -->
-<xsl:template name="iso690.serial">
-  <!-- Title and Type of medium -->
-  <xsl:call-template name="iso690.title"/>
-  <!-- Responsibility [nonEL] -->
-  <xsl:if test="not(./bibliomisc[@role='medium'])">
-    <xsl:call-template name="iso690.secondary"/>
-  </xsl:if>
-  <!-- Edition -->
-  <xsl:call-template name="iso690.edition">
-    <xsl:with-param name="after" select="./bibliomisc[@role='issuing']"/>
-  </xsl:call-template>
-  <!-- Issue designation (date and/or n°) [nonEL] -->
-  <xsl:if test="not(./bibliomisc[@role='medium'])">
-    <xsl:call-template name="iso690.issuing"/>
-  </xsl:if>
-  <!-- Place of publication, Publisher, Year/Date of publication, Date of update/revision, Date of citation -->
-  <xsl:call-template name="iso690.pub"/>
-  <!-- Series -->
-  <xsl:call-template name="iso690.serie"/>
-  <!-- Notes -->
-  <xsl:call-template name="iso690.notice"/>
-  <!-- Avaibility and access -->
-  <xsl:call-template name="iso690.access"/>
-  <!-- Standard number -->
-  <xsl:call-template name="iso690.issn"/>
-</xsl:template>
-
-<!-- PARTS OF MONOGRAPHS -->
-<xsl:template name="iso690.monogr.part">
-  <!-- Primary responsibility of host document -->
-  <xsl:call-template name="iso690.primary"/>
-  <!-- Title and Type of medium of host document -->
-  <xsl:call-template name="iso690.title"/>
-  <!-- Subordinate responsibility of host document [EL] -->
-  <xsl:if test="./bibliomisc[@role='medium']">
-    <xsl:call-template name="iso690.secondary"/>
-  </xsl:if>
-  <!-- Edition -->
-  <xsl:call-template name="iso690.edition">
-    <xsl:with-param name="after" select="./volumenum"/>
-  </xsl:call-template>
-  <!-- Numeration of the part [nonEL]-->
-  <xsl:if test="not(./bibliomisc[@role='medium'])">
-    <xsl:call-template name="iso690.partnr"/>
-  <!-- Subordinate responsibility [nonEL] -->
-    <xsl:call-template name="iso690.secondary"/>
-  </xsl:if>
-  <!-- Place of publication, Publisher, Year/Date of publication, Date of update/revision, Date of citation -->
-  <xsl:call-template name="iso690.pub"/>
-  <!-- Location within host -->
-  <xsl:call-template name="iso690.part.location"/>
-  <xsl:if test="./bibliomisc[@role='medium']">
-  <!-- Numeration within host document [EL] -->
-  <!-- Notes [EL] -->
-    <xsl:call-template name="iso690.notice"/>
-  <!-- Avaibility and access [EL] -->
-    <xsl:call-template name="iso690.access"/>
-  <!-- Standard number [EL] -->
-    <xsl:call-template name="iso690.isbn"/>
-  </xsl:if>
-</xsl:template>
-
-<!-- CONTRIBUTIONS TO MONOGRAPHS -->
-<xsl:template name="iso690.paper.mon">
-<!-- Contribution -->
-  <xsl:apply-templates mode="iso690.paper.part" select="./biblioset[@relation='part']"/>
-<!-- In -->
-  <xsl:text>In </xsl:text>
-<!-- Host -->
-  <xsl:apply-templates mode="iso690.paper.book" select="./biblioset[@relation='book']"/>
-</xsl:template>
-
-<xsl:template match="biblioset" mode="iso690.paper.part">
-<!-- Contribution -->
-  <!-- Primary responsibility -->
-  <xsl:call-template name="iso690.primary"/>
-  <!-- Title -->
-  <xsl:call-template name="iso690.title">
-    <xsl:with-param name="italic" select="0"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="biblioset" mode="iso690.paper.book">
-<!-- Host -->
-  <!-- Primary responsibility -->
-  <xsl:call-template name="iso690.primary"/>
-  <!-- Title and Type of medium -->
-  <xsl:call-template name="iso690.title"/>
-  <!-- Subordinate responsibility [EL] -->
-  <xsl:if test="./bibliomisc[@role='medium']">
-    <xsl:call-template name="iso690.secondary"/>
-  </xsl:if>
-  <!-- Edition -->
-  <xsl:call-template name="iso690.edition"/>
-  <!-- Place of publication, Publisher, Year/Date of publication, Date of update/revision, Date of citation -->
-  <xsl:call-template  name="iso690.paper.pub"/>
-  <!-- Numeration within host document [EL] -->
-  <!-- Location within host -->
-  <xsl:call-template name="iso690.location"/>
-  <xsl:if test="./bibliomisc[@role='medium']">
-  <!-- Notes [EL] -->
-    <xsl:call-template name="iso690.notice"/>
-  <!-- Avaibility and access [EL] -->
-    <xsl:call-template name="iso690.access"/>
-  <!-- Standard number [EL] -->
-    <xsl:call-template name="iso690.isbn"/>
-  </xsl:if>
-</xsl:template>
-
-<!-- ARTICLES, ETC., IN SERIALS -->
-<xsl:template name="iso690.article">
-<!-- Article -->
-  <xsl:apply-templates mode="iso690.article.art" select="./biblioset[@relation='article']"/>
-<!-- Serial -->
-  <xsl:apply-templates mode="iso690.article.jour" select="./biblioset[@relation='journal']"/>
-</xsl:template>
-
-<xsl:template match="biblioset" mode="iso690.article.art">
-<!-- Article -->
-  <!-- Primary responsibility -->
-  <xsl:call-template name="iso690.primary"/>
-  <!-- Title -->
-  <xsl:call-template name="iso690.title">
-    <xsl:with-param name="italic" select="0"/>
-  </xsl:call-template>
-  <!-- Subordinate responsibility [nonEL] -->
-  <xsl:if test="not(../*/bibliomisc[@role='medium'])">
-    <xsl:call-template name="iso690.secondary"/>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="biblioset" mode="iso690.article.jour">
-<!-- Serial -->
-  <!-- Title and Type of medium -->
-  <xsl:call-template name="iso690.title"/>
-  <!-- Edition -->
-  <xsl:call-template name="iso690.edition">
-    <xsl:with-param name="after" select="./pubdate[not(@role='issuing')]|./volumenum|./issuenum|./pagenums"/>
-  </xsl:call-template>
-  <!-- Number designation [EL] -->
-  <!-- Location within host -->
-  <xsl:call-template name="iso690.article.location"/>
-  <xsl:if test="./bibliomisc[@role='medium']">
-  <!-- Notes [EL] -->
-    <xsl:call-template name="iso690.notice"/>
-  <!-- Avaibility and access [EL] -->
-    <xsl:call-template name="iso690.access"/>
-  <!-- Standard number [EL] -->
-    <xsl:call-template name="iso690.issn"/>
-  </xsl:if>
-</xsl:template>
-
-<!-- PATENT DOCUMENTS -->
-<xsl:template name="iso690.patent">
-  <!-- Primary responsibility (applicant) -->
-  <xsl:call-template name="iso690.primary"/>
-  <!-- Title of the invention -->
-  <xsl:call-template name="iso690.title"/>
-  <!-- Subordinate responsibility -->
-  <xsl:call-template name="iso690.secondary"/>
-  <!-- Notes -->
-  <xsl:call-template name="iso690.notice"/>
-  <!-- Identification -->
-  <xsl:call-template name="iso690.pat.ident"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-<!-- Elements -->
-
-<!-- Primary responsibility -->
-<xsl:template name="iso690.primary">
-  <xsl:param name="primary.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'primary.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:choose>
-    <xsl:when test="./authorgroup/author|./author">
-      <xsl:call-template name="iso690.author.list">
-        <xsl:with-param name="person.list" select=".//authorgroup/author|.//author"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="./authorgroup/editor|./editor">
-      <xsl:call-template name="iso690.author.list">
-        <xsl:with-param name="person.list" select=".//authorgroup/editor|.//editor"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="./authorgroup/corpauthor|./corpauthor">
-      <xsl:call-template name="iso690.author.list">
-        <xsl:with-param name="person.list" select=".//authorgroup/corpauthor|.//corpauthor"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:if test="(./firstname)and(./surname)">
-        <xsl:call-template name="iso690.author"/>
-        <xsl:call-template name="iso690.endsep">
-          <xsl:with-param name="text" select="string(./firstname[1])"/>
-          <xsl:with-param name="sep" select="$primary.sep"/>
-        </xsl:call-template>
-      </xsl:if>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="iso690.author.list">
-  <xsl:param name="person.list"
-             select="author|corpauthor|editor"/>
-  <xsl:param name="person.count" select="count($person.list)"/>
-  <xsl:param name="count" select="1"/>
-  <xsl:param name="group" select="./authorgroup[@role='many']"/>
-  <xsl:param name="many" select="0"/>
-
-  <xsl:param name="primary.many">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'primary.many'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="primary.editor">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'primary.editor'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="primary.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'primary.sep'"/></xsl:call-template>
-  </xsl:param>
-
-  <xsl:choose>
-    <xsl:when test="$count &gt; $person.count"></xsl:when>
-    <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="$person.count &lt; 4 and not($group)">
-          <xsl:call-template name="iso690.author">
-            <xsl:with-param name="node" select="$person.list[position()=$count]"/>
-          </xsl:call-template>
-          <xsl:choose>
-            <xsl:when test="$person.count = 2 and $count = 1 and $biblioentry.alt.primary.seps != 0">
-              <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'alt.person.two.sep'"/></xsl:call-template>
-            </xsl:when>
-            <xsl:when test="$person.count = 2 and $count = 1">
-              <xsl:call-template name="gentext.template">
-                <xsl:with-param name="context" select="'authorgroup'"/>
-                <xsl:with-param name="name" select="'sep2'"/>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:when test="$person.count &gt; 2 and $count+1 = $person.count and $biblioentry.alt.primary.seps != 0">
-              <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'alt.person.last.sep'"/></xsl:call-template>
-            </xsl:when>
-            <xsl:when test="$person.count &gt; 2 and $count+1 = $person.count">
-              <xsl:call-template name="gentext.template">
-                <xsl:with-param name="context" select="'authorgroup'"/>
-                <xsl:with-param name="name" select="'seplast'"/>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:when test="$count &lt; $person.count and $biblioentry.alt.primary.seps != 0">
-              <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'alt.person.more.sep'"/></xsl:call-template>
-            </xsl:when>
-            <xsl:when test="$count &lt; $person.count">
-              <xsl:call-template name="gentext.template">
-                <xsl:with-param name="context" select="'authorgroup'"/>
-                <xsl:with-param name="name" select="'sep'"/>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:when test="($count = $person.count)">
-              <xsl:choose>
-                <xsl:when test="$many!=0">
-                  <xsl:if test="name($person.list[position()=$count])='editor'">
-                    <xsl:value-of select="$primary.editor"/>
-                  </xsl:if>
-                  <xsl:value-of select="$primary.many"/>
-                  <xsl:call-template name="iso690.endsep">
-                    <xsl:with-param name="text" select="$primary.many"/>
-                    <xsl:with-param name="sep" select="$primary.sep"/>
-                  </xsl:call-template>
-                </xsl:when>
-                <xsl:when test="name($person.list[position()=$count])='editor'">
-                  <xsl:value-of select="$primary.editor"/>
-                  <xsl:value-of select="$primary.sep"/>
-                </xsl:when>
-                <xsl:when test="name($person.list[position()=$count])='corpauthor'">
-                  <xsl:call-template name="iso690.endsep">
-                    <xsl:with-param name="text" select="string($person.list[position()=$count])"/>
-                    <xsl:with-param name="sep" select="$primary.sep"/>
-                  </xsl:call-template>
-                </xsl:when>
-                <xsl:otherwise>
-                  <xsl:call-template name="iso690.endsep">
-                    <xsl:with-param name="text" select="string($person.list[position()=$count]//firstname[1])"/>
-                    <xsl:with-param name="sep" select="$primary.sep"/>
-                  </xsl:call-template>
-                </xsl:otherwise>
-              </xsl:choose>
-            </xsl:when>
-          </xsl:choose>
-
-          <xsl:call-template name="iso690.author.list">
-            <xsl:with-param name="person.list" select="$person.list"/>
-            <xsl:with-param name="person.count" select="$person.count"/>
-            <xsl:with-param name="count" select="$count+1"/>
-            <xsl:with-param name="many" select="$many"/>
-            <xsl:with-param name="group"/>
-          </xsl:call-template>
-        </xsl:when>
-
-        <xsl:otherwise>
-          <xsl:choose>
-            <xsl:when test="($biblioentry.primary.count&gt;=3) and ($person.count&gt;=3)">
-              <xsl:call-template name="iso690.author.list">
-                <xsl:with-param name="person.list" select="$person.list[1]|$person.list[2]|$person.list[3]"/>
-                <xsl:with-param name="person.count" select="3"/>
-                <xsl:with-param name="count" select="1"/>
-                <xsl:with-param name="many" select="1"/>
-                <xsl:with-param name="group"/>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:when test="($biblioentry.primary.count&gt;1) and  ($person.count&gt;1)">
-              <xsl:call-template name="iso690.author.list">
-                <xsl:with-param name="person.list" select="$person.list[1]|$person.list[2]"/>
-                <xsl:with-param name="person.count" select="2"/>
-                <xsl:with-param name="count" select="1"/>
-                <xsl:with-param name="many" select="1"/>
-                <xsl:with-param name="group"/>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:call-template name="iso690.author.list">
-                <xsl:with-param name="person.list" select="$person.list[1]"/>
-                <xsl:with-param name="person.count" select="1"/>
-                <xsl:with-param name="count" select="1"/>
-                <xsl:with-param name="many" select="1"/>
-                <xsl:with-param name="group"/>
-              </xsl:call-template>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="iso690.author">
-  <xsl:param name="node" select="."/>
-  <xsl:param name="lastfirst.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'lastfirst.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:choose>
-    <xsl:when test="name($node)!='corpauthor'">
-      <fo:inline text-transform="uppercase">
-        <xsl:apply-templates mode="iso690.mode" select="$node//surname[1]"/>
-      </fo:inline>
-      <xsl:if test="$node//surname and $node//firstname">
-        <xsl:value-of select="$lastfirst.sep"/>
-      </xsl:if>
-      <xsl:apply-templates mode="iso690.mode" select="$node//firstname[1]"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:inline text-transform="uppercase">
-        <xsl:apply-templates mode="iso690.mode" select="$node"/>
-      </fo:inline>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="corpauthor|firstname|surname" mode="iso690.mode">
-  <xsl:apply-templates mode="iso690.mode"/>
-</xsl:template>
-
-<!-- Title and Type of medium -->
-<xsl:template name="iso690.title">
-  <xsl:param name="medium" select="./bibliomisc[@role='medium']"/>
-  <xsl:param name="italic" select="1"/>
-  <xsl:param name="sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'title.sep'"/></xsl:call-template>
-  </xsl:param>
-
-  <xsl:apply-templates mode="iso690.mode" select="./title">
-    <xsl:with-param name="medium" select="$medium"/>
-    <xsl:with-param name="italic" select="$italic"/>
-    <xsl:with-param name="sep" select="$sep"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="title" mode="iso690.mode">
-  <xsl:param name="medium"/>
-  <xsl:param name="italic" select="1"/>
-  <xsl:param name="sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'title.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="medium1">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'medium1'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="medium2">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'medium2'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:choose>
-    <xsl:when test="$italic=1">
-      <xsl:call-template name="iso690.italic.title"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="iso690.make.title"/>
-    </xsl:otherwise>
-  </xsl:choose>
-  <xsl:if test="$medium">
-    <xsl:value-of select="$medium1"/>
-    <xsl:apply-templates mode="iso690.mode" select="$medium"/>
-    <xsl:value-of select="$medium2"/>
-  </xsl:if>
-  <xsl:call-template name="iso690.endsep">
-    <xsl:with-param name="text" select="concat(string(.),string(../subtitle))"/>
-    <xsl:with-param name="sep" select="$sep"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="iso690.italic.title">
-  <fo:inline font-style="italic">
-    <xsl:call-template name="iso690.make.title"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template name="iso690.make.title">
-  <xsl:param name="submaintitle.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'submaintitle.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:apply-templates mode="iso690.mode"/>
-  <xsl:if test="../subtitle">
-    <xsl:value-of select="$submaintitle.sep"/>
-    <xsl:apply-templates mode="iso690.mode" select="../subtitle"/>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="iso690.mode">
-  <xsl:apply-templates mode="iso690.mode"/>
-</xsl:template>
-
-<xsl:template match="bibliomisc[@role='medium']" mode="iso690.mode">
-  <xsl:apply-templates mode="iso690.mode"/>
-</xsl:template>
-
-<!-- Subordinate responsibility -->
-<xsl:template name="iso690.secondary">
-  <xsl:param name="secondary.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'secondary.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="secondary.person.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'secondary.person.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:for-each select="./bibliomisc[@role='secondary']">
-    <xsl:apply-templates mode="iso690.mode" select="."/>
-    <xsl:choose>
-      <xsl:when test="position()=count(../bibliomisc[@role='secondary'])">
-        <xsl:call-template name="iso690.endsep">
-          <xsl:with-param name="text" select="string(.)"/>
-          <xsl:with-param name="sep" select="$secondary.sep"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$secondary.person.sep"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:for-each>
-</xsl:template>
-
-<xsl:template match="bibliomisc[@role='secondary']" mode="iso690.mode">
-  <xsl:apply-templates mode="iso690.mode"/>
-</xsl:template>
-
-<!-- Edition -->
-<xsl:template name="iso690.edition">
-  <xsl:param name="after"/>
-  <xsl:param name="edition.serial.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'edition.serial.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:choose>
-    <xsl:when test="string($after)!=''">
-      <xsl:apply-templates mode="iso690.mode" select="./edition">
-        <xsl:with-param name="sep" select="$edition.serial.sep"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates mode="iso690.mode" select="./edition"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="edition" mode="iso690.mode">
-  <xsl:param name="sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'edition.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:apply-templates mode="iso690.mode"/>
-  <xsl:call-template name="iso690.endsep">
-    <xsl:with-param name="text" select="string(.)"/>
-    <xsl:with-param name="sep" select="$sep"/>
-  </xsl:call-template>
-</xsl:template>
-
-<!-- Issue designation (date and/or n°) -->
-<xsl:template name="iso690.issuing">
-  <xsl:param name="issuing.div">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.div'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="issuing.range">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.range'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="issuing.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:choose>
-    <xsl:when test="./pubdate[@role='issuing'] and ./volumenum[2] and ./issuenum[2]">
-      <xsl:call-template name="iso690.issuedate"/>
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum[1]">
-        <xsl:with-param name="sep" select="$issuing.div"/>
-      </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./issuenum[1]">
-        <xsl:with-param name="sep" select="$issuing.range"/>
-      </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum[2]">
-        <xsl:with-param name="sep" select="$issuing.div"/>
-      </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./issuenum[2]">
-        <xsl:with-param name="sep" select="$issuing.sep"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:when test="./pubdate[@role='issuing'] and ./volumenum[2]">
-      <xsl:call-template name="iso690.issuedate"/>
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum[1]">
-        <xsl:with-param name="sep" select="$issuing.range"/>
-      </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum[2]">
-        <xsl:with-param name="sep" select="$issuing.sep"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:when test="./pubdate[@role='issuing'] and ./volumenum and ./issuenum">
-      <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing']">
-        <xsl:with-param name="sep" select="$issuing.div"/>
-      </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum">
-        <xsl:with-param name="sep" select="$issuing.div"/>
-      </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./issuenum">
-        <xsl:with-param name="sep" select="$issuing.sep"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:when test="./pubdate[@role='issuing']">
-      <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing']">
-        <xsl:with-param name="sep" select="$issuing.sep"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:when test="./volumenum">
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum">
-        <xsl:with-param name="sep" select="$issuing.sep"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:when test="./issuenum">
-      <xsl:apply-templates mode="iso690.mode" select="./issuenum">
-        <xsl:with-param name="sep" select="$issuing.sep"/>
-      </xsl:apply-templates>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="iso690.issuedate">
-  <xsl:param name="issuing.div">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.div'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="issuing.range">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.range'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="issuing.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:choose>
-    <xsl:when test="./pubdate[@role='issuing'][2]">
-      <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing'][1]">
-        <xsl:with-param name="sep" select="$issuing.range"/>
-      </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing'][2]">
-        <xsl:with-param name="sep" select="$issuing.div"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing']">
-        <xsl:with-param name="sep" select="$issuing.div"/>
-      </xsl:apply-templates>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="pubdate[@role='issuing']" mode="iso690.mode">
-  <xsl:param name="sep"/>
-  <xsl:variable name="substr" select="substring(string(.),string-length(string(.)))"/>
-  <xsl:apply-templates mode="iso690.mode"/>
-  <xsl:call-template name="iso690.space">
-    <xsl:with-param name="text" select="$substr"/>
-  </xsl:call-template>
-  <xsl:choose>
-    <xsl:when test="$substr='-'">
-      <xsl:call-template name="iso690.endsep">
-        <xsl:with-param name="text" select="' '"/>
-        <xsl:with-param name="sep" select="$sep"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="iso690.endsep">
-        <xsl:with-param name="text" select="string(.)"/>
-        <xsl:with-param name="sep" select="$sep"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- Numeration of the part -->
-<xsl:template name="iso690.partnr">
-  <xsl:param name="partnr.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'partnr.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:apply-templates mode="iso690.mode" select="./volumenum">
-    <xsl:with-param name="sep" select="$partnr.sep"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<!-- Place of publication, Publisher, Year/Date of publication, Date of update/revision, Date of citation -->
-<xsl:template name="iso690.pub">
-  <xsl:param name="onlydate" select="0"/>
-  <xsl:param name="placesep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'placepubl.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="pubsep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'publyear.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="endsep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'pubinfo.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:choose>
-    <xsl:when test="(./publisher/publishername|./publishername|./publisher/address/city)and($onlydate=0)and(./pubdate[not(@role='issuing')]|./copyright/year|./date[@role='upd']|./date[@role='upd'])">
-      <xsl:apply-templates mode="iso690.mode" select="./publisher/address/city">
-        <xsl:with-param name="sep" select="$placesep"/>
-      </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./publisher/publishername|./publishername">
-        <xsl:with-param name="sep" select="$pubsep"/>
-      </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]|./copyright/year">
-        <xsl:with-param name="sep" select="$endsep"/>
-      </xsl:apply-templates>
-      <xsl:if test="not(./pubdate[not(@role='issuing')]|./copyright/year)">
-        <xsl:call-template name="iso690.data">
-          <xsl:with-param name="sep" select="$endsep"/>
-        </xsl:call-template>
-      </xsl:if>
-    </xsl:when>
-    <xsl:when test="(./publisher/publishername|./publishername)and(./publisher/address/city)and($onlydate=0)">
-      <xsl:apply-templates mode="iso690.mode" select="./publisher/address/city">
-        <xsl:with-param name="sep" select="$placesep"/>
-      </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./publisher/publishername|./publishername">
-        <xsl:with-param name="sep" select="$endsep"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:when test="($onlydate=1)or(./pubdate[not(@role='issuing')]|./copyright/year)">
-      <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]|./copyright/year">
-        <xsl:with-param name="sep" select="$endsep"/>
-      </xsl:apply-templates>
-      <xsl:if test="$onlydate=1">
-        <xsl:call-template name="iso690.location">
-          <xsl:with-param name="onlypages" select="1"/>
-        </xsl:call-template>
-      </xsl:if>
-    </xsl:when>
-    <xsl:when test="not(./pubdate[not(@role='issuing')]|./copyright/year)">
-      <xsl:call-template name="iso690.data">
-        <xsl:with-param name="sep" select="$endsep"/>
-      </xsl:call-template>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="iso690.paper.pub">
-  <xsl:param name="spec.pubinfo.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'spec.pubinfo.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:choose>
-    <xsl:when test="./volumnum|./issuenum|./pagenums">
-      <xsl:call-template name="iso690.pub">
-        <xsl:with-param name="endsep" select="$spec.pubinfo.sep"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="iso690.pub"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="iso690.data">
-  <xsl:param name="sep"/>
-  <xsl:param name="datecit2">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'datecit2'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:apply-templates mode="iso690.mode" select="./date[@role='upd']">
-    <xsl:with-param name="sep"/>
-  </xsl:apply-templates>
-  <xsl:apply-templates mode="iso690.mode" select="./date[@role='cit']"/>
-  <xsl:choose>
-    <xsl:when test="./date[@role='cit']">
-      <xsl:call-template name="iso690.endsep">
-        <xsl:with-param name="text" select="$datecit2"/>
-        <xsl:with-param name="sep" select="$sep"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="./date[@role='upd']">
-      <xsl:call-template name="iso690.endsep">
-        <xsl:with-param name="text" select="string(./date[@role='upd'])"/>
-        <xsl:with-param name="sep" select="$sep"/>
-      </xsl:call-template>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="publisher/address/city|publishername" mode="iso690.mode">
-  <xsl:param name="sep"/>
-  <xsl:param name="upd" select="0"/>
-  <xsl:apply-templates mode="iso690.mode"/>
-  <xsl:call-template name="iso690.endsep">
-    <xsl:with-param name="text" select="string(.)"/>
-    <xsl:with-param name="sep" select="$sep"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="pubdate|copyright/year" mode="iso690.mode">
-  <xsl:param name="sep"/>
-  <xsl:param name="upd" select="1"/>
-  <xsl:param name="datecit2">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'datecit2'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:variable name="substr" select="substring(string(.),string-length(string(.)))"/>
-  <xsl:if test="name(.)!='pubdate'">
-    <xsl:value-of select="'&#x00A9;'"/><!-- copyright -->
-  </xsl:if>
-  <xsl:apply-templates mode="iso690.mode"/>
-  <xsl:call-template name="iso690.space">
-    <xsl:with-param name="text" select="$substr"/>
-  </xsl:call-template>
-  <xsl:if test="$upd!=0">
-    <xsl:choose>
-      <xsl:when test="name(.)='pubdate'">
-        <xsl:apply-templates mode="iso690.mode" select="../date[@role='upd']"/>
-        <xsl:apply-templates mode="iso690.mode" select="../date[@role='cit']"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:apply-templates mode="iso690.mode" select="../../date[@role='upd']"/>
-        <xsl:apply-templates mode="iso690.mode" select="../../date[@role='cit']"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:if>
-  <xsl:choose>
-    <xsl:when test="../date[@role='cit']|../../date[@role='cit'] and $upd!=0">
-      <xsl:call-template name="iso690.endsep">
-        <xsl:with-param name="text" select="$datecit2"/>
-        <xsl:with-param name="sep" select="$sep"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="../date[@role='upd']|../../date[@role='upd'] and $upd!=0">
-      <xsl:call-template name="iso690.endsep">
-        <xsl:with-param name="text" select="string(../date[@role='upd'])"/>
-        <xsl:with-param name="sep" select="$sep"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="$substr='-'">
-      <xsl:call-template name="iso690.endsep">
-        <xsl:with-param name="text" select="' '"/>
-        <xsl:with-param name="sep" select="$sep"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="iso690.endsep">
-        <xsl:with-param name="text" select="string(.)"/>
-        <xsl:with-param name="sep" select="$sep"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="iso690.space">
-  <xsl:param name="text" select="substring(string(.),string-length(string(.)))"/>
-  <xsl:if test="$text='-'">
-    <xsl:value-of select="' '"/>
-  </xsl:if>
-</xsl:template>
-
-<!-- Date of update/revision -->
-<xsl:template match="date[@role='upd']" mode="iso690.mode">
-  <xsl:param name="sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'upd.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:value-of select="$sep"/>
-  <xsl:apply-templates mode="iso690.mode"/>
-</xsl:template>
-
-<!-- Date of citation -->
-<xsl:template match="date[@role='cit']" mode="iso690.mode">
-  <xsl:param name="datecit1">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'datecit1'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="datecit2">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'datecit2'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:value-of select="$datecit1"/>
-  <xsl:apply-templates mode="iso690.mode"/>
-  <xsl:value-of select="$datecit2"/>
-</xsl:template>
-
-<!-- Extent -->
-<xsl:template name="iso690.extent">
-  <xsl:param name="extent.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'extent.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:apply-templates mode="iso690.mode" select="./pagenums">
-    <xsl:with-param name="sep" select="$extent.sep"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<!-- Location within host -->
-<xsl:template name="iso690.part.location">
-  <xsl:param name="location.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'location.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:choose>
-    <xsl:when test="./pagenums">
-      <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='secnum']"/>
-      <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='sectitle']"/>
-      <xsl:apply-templates mode="iso690.mode" select="./pagenums"/>
-    </xsl:when>
-    <xsl:when test="./bibliomisc[@role='sectitle']">
-      <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='secnum']"/>
-      <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='sectitle']">
-        <xsl:with-param name="sep" select="$location.sep"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='secnum']">
-        <xsl:with-param name="sep" select="$location.sep"/>
-      </xsl:apply-templates>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="iso690.article.location">
-  <xsl:param name="location.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'location.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="locs.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'locs.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:choose>
-    <xsl:when test="not(./date[@role='upd']|./date[@role='cit'])">
-      <xsl:choose>
-        <xsl:when test="./volumenum|./issuenum|./pagenums">
-          <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]">
-            <xsl:with-param name="upd" select="0"/>
-            <xsl:with-param name="sep" select="$locs.sep"/>
-          </xsl:apply-templates>
-          <xsl:call-template name="iso690.location"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]">
-            <xsl:with-param name="sep" select="$location.sep"/>
-          </xsl:apply-templates>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="./volumenum|./issuenum|./pagenums">
-          <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]">
-            <xsl:with-param name="upd" select="0"/>
-            <xsl:with-param name="sep" select="$locs.sep"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]">
-            <xsl:with-param name="upd" select="0"/>
-            <xsl:with-param name="sep" select="$location.sep"/>
-          </xsl:apply-templates>
-        </xsl:otherwise>
-      </xsl:choose>
-      <xsl:choose>
-        <xsl:when test="./issuenum">
-          <xsl:apply-templates mode="iso690.mode" select="./volumenum"/>
-          <xsl:apply-templates mode="iso690.mode" select="./issuenum">
-            <xsl:with-param name="sep"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates mode="iso690.mode" select="./volumenum">
-            <xsl:with-param name="sep"/>
-          </xsl:apply-templates>
-        </xsl:otherwise>
-      </xsl:choose>
-      <xsl:choose>
-        <xsl:when test="./pagenums">
-          <xsl:call-template name="iso690.data">
-            <xsl:with-param name="sep" select="$locs.sep"/>
-          </xsl:call-template>
-          <xsl:apply-templates mode="iso690.mode" select="./pagenums"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="iso690.data">
-            <xsl:with-param name="sep" select="$location.sep"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="iso690.location">
-  <xsl:param name="location.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'location.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:choose>
-    <xsl:when test="./volumenum and not(./issuenum) and not(./pagenums)">
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum">
-        <xsl:with-param name="sep" select="$location.sep"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:when test="./issuenum and not(./pagenums)">
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum"/>
-      <xsl:apply-templates mode="iso690.mode" select="./issuenum">
-        <xsl:with-param name="sep" select="$location.sep"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:when test="./pagenums">
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum"/>
-      <xsl:apply-templates mode="iso690.mode" select="./issuenum"/>
-      <xsl:apply-templates mode="iso690.mode" select="./pagenums"/>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="bibliomisc[@role='secnum']|bibliomisc[@role='sectitle']" mode="iso690.mode">
-  <xsl:param name="sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'locs.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:apply-templates mode="iso690.mode"/>
-  <xsl:call-template name="iso690.endsep">
-    <xsl:with-param name="text" select="string(.)"/>
-    <xsl:with-param name="sep" select="$sep"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="volumenum|issuenum" mode="iso690.mode">
-  <xsl:param name="sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'locs.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:apply-templates mode="iso690.mode"/>
-  <xsl:call-template name="iso690.endsep">
-    <xsl:with-param name="text" select="string(.)"/>
-    <xsl:with-param name="sep" select="$sep"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="pagenums" mode="iso690.mode">
-  <xsl:param name="sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'location.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:apply-templates mode="iso690.mode"/>
-  <xsl:call-template name="iso690.endsep">
-    <xsl:with-param name="text" select="string(.)"/>
-    <xsl:with-param name="sep" select="$sep"/>
-  </xsl:call-template>
-</xsl:template>
-
-<!-- Series -->
-<xsl:template name="iso690.serie">
-  <xsl:apply-templates mode="iso690.mode" select=".//bibliomisc[@role='serie']"/>
-</xsl:template>
-
-<!-- Notes -->
-<xsl:template name="iso690.notice">
-  <xsl:apply-templates mode="iso690.mode" select=".//bibliomisc[not(@role)]"/>
-</xsl:template>
-
-<xsl:template match="bibliomisc[not(@role)]|bibliomisc[@role='serie']" mode="iso690.mode">
-  <xsl:param name="notice.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'notice.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:apply-templates mode="iso690.mode"/>
-  <xsl:call-template name="iso690.endsep">
-    <xsl:with-param name="text" select="string(.)"/>
-    <xsl:with-param name="sep" select="$notice.sep"/>
-  </xsl:call-template>
-</xsl:template>
-
-<!-- Avaibility and access -->
-<xsl:template name="iso690.access">
-  <xsl:for-each select="./biblioid[@class='uri']|./bibliomisc[@role='access']">
-    <xsl:choose>
-      <xsl:when test="position()=1">
-        <xsl:apply-templates mode="iso690.mode" select="."/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:apply-templates mode="iso690.mode" select=".">
-          <xsl:with-param name="firstacc" select="0"/>
-        </xsl:apply-templates>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:for-each>
-</xsl:template>
-
-<xsl:template match="biblioid[@class='uri']/ulink|bibliomisc[@role='access']/ulink" mode="iso690.mode">
-  <xsl:param name="link1">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'link1'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="link2">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'link2'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:value-of select="$link1"/>
-  <xsl:call-template name="ulink"/>
-  <xsl:value-of select="$link2"/>
-</xsl:template>
-
-<xsl:template match="biblioid[@class='uri']|bibliomisc[@role='access']" mode="iso690.mode">
-  <xsl:param name="firstacc" select="1"/>
-  <xsl:param name="access">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'access'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="acctoo">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'acctoo'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="onwww">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'onwww'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="oninet">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'oninet'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="access.end">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'access.end'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="access.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'access.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:choose>
-    <xsl:when test="$firstacc=1">
-      <xsl:value-of select="$access"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$acctoo"/>
-    </xsl:otherwise>
-  </xsl:choose>
-  <xsl:choose>
-    <xsl:when test="(./ulink)and(string(./ulink)=string(.))">
-      <xsl:choose>
-        <xsl:when test="(starts-with(./ulink/@url,'http://')or(starts-with(./ulink/@url,'https://')))">
-          <xsl:value-of select="$onwww"/>
-          <xsl:value-of select="$access.end"/>
-          <xsl:apply-templates mode="iso690.mode" select="./ulink"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="$oninet"/>
-          <xsl:value-of select="$access.end"/>
-          <xsl:apply-templates mode="iso690.mode" select="./ulink"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:when test="(./ulink)and(string(./ulink)!=string(.))">
-      <xsl:value-of select="text()[1]"/>
-      <xsl:call-template name="iso690.endsep">
-        <xsl:with-param name="text" select="text()[1]"/>
-        <xsl:with-param name="sep" select="$access.end"/>
-      </xsl:call-template>
-      <xsl:apply-templates mode="iso690.mode" select="./ulink"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates mode="iso690.mode"/>
-    </xsl:otherwise>
-  </xsl:choose>
-  <xsl:value-of select="$access.sep"/>
-</xsl:template>
-
-<!-- Standard number - ISBN -->
-<xsl:template name="iso690.isbn">
-  <xsl:choose>
-    <xsl:when test="./biblioid/@class='isbn'">
-      <xsl:apply-templates mode="iso690.mode" select="./biblioid[@class='isbn']"/>
-    </xsl:when>
-    <xsl:when test="./isbn">
-      <xsl:apply-templates mode="iso690.mode" select="./isbn"/>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="isbn|biblioid[@class='isbn']" mode="iso690.mode">
-  <xsl:param name="isbn">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'isbn'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="stdnum.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'stdnum.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:value-of select="$isbn"/>
-  <xsl:apply-templates mode="iso690.mode"/>
-  <xsl:value-of select="$stdnum.sep"/>
-</xsl:template>
-
-<!-- Standard number - ISSN -->
-<xsl:template name="iso690.issn">
-  <xsl:choose>
-    <xsl:when test="./biblioid/@class='issn'">
-      <xsl:apply-templates mode="iso690.mode" select="./biblioid[@class='issn']"/>
-    </xsl:when>
-    <xsl:when test="./issn">
-      <xsl:apply-templates mode="iso690.mode" select="./issn"/>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="issn|biblioid[@class='issn']" mode="iso690.mode">
-  <xsl:param name="issn">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issn'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="stdnum.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'stdnum.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:value-of select="$issn"/>
-  <xsl:apply-templates mode="iso690.mode"/>
-  <xsl:value-of select="$stdnum.sep"/>
-</xsl:template>
-
-<!-- Identification of patent document -->
-<xsl:template name="iso690.pat.ident">
-  <xsl:param name="patdate.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'patdate.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:apply-templates mode="iso690.mode" select="./address/country"/>
-  <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='patenttype']"/>
-  <xsl:choose>
-    <xsl:when test="./biblioid[@class='other' and @otherclass='patentnum']">
-      <xsl:apply-templates mode="iso690.mode" select="./biblioid[@class='other' and @otherclass='patentnum']"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='patentnum']"/>
-    </xsl:otherwise>
-  </xsl:choose>
-  <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]">
-    <xsl:with-param name="sep" select="$patdate.sep"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<!-- Country or issuing office -->
-<xsl:template match="address/country" mode="iso690.mode">
-  <xsl:param name="patcountry.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'patcountry.sep'"/></xsl:call-template>
-  </xsl:param>
-  <fo:inline font-style="italic">
-    <xsl:apply-templates mode="iso690.mode"/>
-  </fo:inline>
-  <xsl:value-of select="$patcountry.sep"/>
-</xsl:template>
-
-<!-- Kind of patent document -->
-<xsl:template match="bibliomisc[@role='patenttype']" mode="iso690.mode">
-  <xsl:param name="pattype.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'pattype.sep'"/></xsl:call-template>
-  </xsl:param>
-  <fo:inline font-style="italic">
-    <xsl:apply-templates mode="iso690.mode"/>
-  </fo:inline>
-  <xsl:value-of select="$pattype.sep"/>
-</xsl:template>
-
-<!-- Number -->
-<xsl:template match="biblioid[@class='other' and @otherclass='patentnum']|bibliomisc[@role='patentnum']" mode="iso690.mode">
-  <xsl:param name="patnum.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'patnum.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:apply-templates mode="iso690.mode"/>
-  <xsl:value-of select="$patnum.sep"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-<!-- Supplementary templates -->
-
-<xsl:template name="iso690.endsep">
-  <xsl:param name="text"/>
-  <xsl:param name="sep" select=". "/>
-  <xsl:choose>
-    <xsl:when test="substring($text,string-length($text))!=substring($sep,1,1)">
-      <xsl:value-of select="$sep"/>
-    </xsl:when>
-    <xsl:when test="substring($text,string-length($text))=' '">
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="' '"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="*" mode="iso690.mode">
-  <xsl:apply-templates select="."/><!-- try the default mode -->
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/biblio.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/biblio.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,1169 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:template match="bibliography">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="not(parent::*) or parent::part or parent::book">
-      <xsl:variable name="master-reference">
-        <xsl:call-template name="select.pagemaster"/>
-      </xsl:variable>
-
-      <fo:page-sequence hyphenate="{$hyphenate}"
-                        master-reference="{$master-reference}">
-        <xsl:attribute name="language">
-          <xsl:call-template name="l10n.language"/>
-        </xsl:attribute>
-        <xsl:attribute name="format">
-          <xsl:call-template name="page.number.format">
-            <xsl:with-param name="master-reference" select="$master-reference"/>
-          </xsl:call-template>
-        </xsl:attribute>
-        <xsl:attribute name="initial-page-number">
-          <xsl:call-template name="initial.page.number">
-            <xsl:with-param name="master-reference" select="$master-reference"/>
-          </xsl:call-template>
-        </xsl:attribute>
-        <xsl:attribute name="force-page-count">
-          <xsl:call-template name="force.page.count">
-            <xsl:with-param name="master-reference" select="$master-reference"/>
-          </xsl:call-template>
-        </xsl:attribute>
-        <xsl:attribute name="hyphenation-character">
-          <xsl:call-template name="gentext">
-            <xsl:with-param name="key" select="'hyphenation-character'"/>
-          </xsl:call-template>
-        </xsl:attribute>
-        <xsl:attribute name="hyphenation-push-character-count">
-          <xsl:call-template name="gentext">
-            <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
-          </xsl:call-template>
-        </xsl:attribute>
-        <xsl:attribute name="hyphenation-remain-character-count">
-          <xsl:call-template name="gentext">
-            <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
-          </xsl:call-template>
-        </xsl:attribute>
-
-        <xsl:apply-templates select="." mode="running.head.mode">
-          <xsl:with-param name="master-reference" select="$master-reference"/>
-        </xsl:apply-templates>
-        <xsl:apply-templates select="." mode="running.foot.mode">
-          <xsl:with-param name="master-reference" select="$master-reference"/>
-        </xsl:apply-templates>
-
-        <fo:flow flow-name="xsl-region-body">
-          <xsl:call-template name="set.flow.properties">
-            <xsl:with-param name="element" select="local-name(.)"/>
-            <xsl:with-param name="master-reference" select="$master-reference"/>
-          </xsl:call-template>
-
-          <fo:block id="{$id}">
-            <xsl:call-template name="bibliography.titlepage"/>
-          </fo:block>
-          <xsl:apply-templates/>
-        </fo:flow>
-      </fo:page-sequence>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:block id="{$id}"
-                space-before.minimum="1em"
-                space-before.optimum="1.5em"
-                space-before.maximum="2em">
-        <xsl:call-template name="bibliography.titlepage"/>
-      </fo:block>
-      <xsl:apply-templates/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="bibliography/bibliographyinfo"></xsl:template>
-<xsl:template match="bibliography/info"></xsl:template>
-<xsl:template match="bibliography/title"></xsl:template>
-<xsl:template match="bibliography/subtitle"></xsl:template>
-<xsl:template match="bibliography/titleabbrev"></xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="bibliodiv">
-  <fo:block>
-    <xsl:attribute name="id">
-      <xsl:call-template name="object.id"/>
-    </xsl:attribute>
-    <xsl:call-template name="bibliodiv.titlepage"/>
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="bibliodiv/title"/>
-<xsl:template match="bibliodiv/subtitle"/>
-<xsl:template match="bibliodiv/titleabbrev"/>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="bibliolist">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <fo:block id="{$id}"
-            space-before.minimum="1em"
-            space-before.optimum="1.5em"
-            space-before.maximum="2em">
-
-    <xsl:if test="blockinfo/title|info/title|title">
-      <xsl:call-template name="formal.object.heading"/>
-    </xsl:if>
-
-    <xsl:apply-templates select="*[not(self::blockinfo)
-                                   and not(self::info)
-                                   and not(self::title)
-                                   and not(self::titleabbrev)]"/>
-  </fo:block>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="biblioentry">
-  <xsl:param name="label">
-    <xsl:call-template name="biblioentry.label"/>
-  </xsl:param>
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="string(.) = ''">
-      <xsl:variable name="bib" select="document($bibliography.collection,.)"/>
-      <xsl:variable name="entry" select="$bib/bibliography/
-                                         *[@id=$id or @xml:id=$id][1]"/>
-      <xsl:choose>
-        <xsl:when test="$entry">
-          <xsl:choose>
-            <xsl:when test="$bibliography.numbered != 0">
-              <xsl:apply-templates select="$entry">
-                <xsl:with-param name="label" select="$label"/>
-              </xsl:apply-templates>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:apply-templates select="$entry"/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:message>
-            <xsl:text>No bibliography entry: </xsl:text>
-            <xsl:value-of select="$id"/>
-            <xsl:text> found in </xsl:text>
-            <xsl:value-of select="$bibliography.collection"/>
-          </xsl:message>
-          <fo:block id="{$id}" xsl:use-attribute-sets="normal.para.spacing">
-            <xsl:text>Error: no bibliography entry: </xsl:text>
-            <xsl:value-of select="$id"/>
-            <xsl:text> found in </xsl:text>
-            <xsl:value-of select="$bibliography.collection"/>
-          </fo:block>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:block id="{$id}" xsl:use-attribute-sets="biblioentry.properties">
-        <xsl:copy-of select="$label"/>
-	<xsl:choose>
-	  <xsl:when test="$bibliography.style = 'iso690'">
-	    <xsl:call-template name="iso690.makecitation"/>
-	  </xsl:when>
-	  <xsl:otherwise>
-	    <xsl:apply-templates mode="bibliography.mode"/>
-	  </xsl:otherwise>
-	</xsl:choose>
-      </fo:block>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="bibliomixed">
-  <xsl:param name="label">
-    <xsl:call-template name="biblioentry.label"/>
-  </xsl:param>
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="string(.) = ''">
-      <xsl:variable name="bib" select="document($bibliography.collection,.)"/>
-      <xsl:variable name="entry" select="$bib/bibliography/
-                                         *[@id=$id or @xml:id=$id][1]"/>
-      <xsl:choose>
-        <xsl:when test="$entry">
-          <xsl:choose>
-            <xsl:when test="$bibliography.numbered != 0">
-              <xsl:apply-templates select="$entry">
-                <xsl:with-param name="label" select="$label"/>
-              </xsl:apply-templates>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:apply-templates select="$entry"/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:message>
-            <xsl:text>No bibliography entry: </xsl:text>
-            <xsl:value-of select="$id"/>
-            <xsl:text> found in </xsl:text>
-            <xsl:value-of select="$bibliography.collection"/>
-          </xsl:message>
-          <fo:block id="{$id}" xsl:use-attribute-sets="normal.para.spacing">
-            <xsl:text>Error: no bibliography entry: </xsl:text>
-            <xsl:value-of select="$id"/>
-            <xsl:text> found in </xsl:text>
-            <xsl:value-of select="$bibliography.collection"/>
-          </fo:block>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:block id="{$id}" xsl:use-attribute-sets="biblioentry.properties">
-        <xsl:copy-of select="$label"/>
-        <xsl:apply-templates mode="bibliomixed.mode"/>
-      </fo:block>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="biblioentry.label">
-  <xsl:param name="node" select="."/>
-
-  <xsl:choose>
-    <xsl:when test="$bibliography.numbered != 0">
-      <xsl:text>[</xsl:text>
-      <xsl:number from="bibliography" count="biblioentry|bibliomixed"
-                  level="any" format="1"/>
-      <xsl:text>] </xsl:text>
-    </xsl:when>
-    <xsl:when test="local-name($node/child::*[1]) = 'abbrev'">
-      <xsl:text>[</xsl:text>
-      <xsl:apply-templates select="$node/abbrev[1]"/>
-      <xsl:text>] </xsl:text>
-    </xsl:when>
-    <xsl:when test="$node/@xreflabel">
-      <xsl:text>[</xsl:text>
-      <xsl:value-of select="$node/@xreflabel"/>
-      <xsl:text>] </xsl:text>
-    </xsl:when>
-    <xsl:when test="$node/@id or $node/@xml:id">
-      <xsl:text>[</xsl:text>
-      <xsl:value-of select="($node/@id|$node/@xml:id)[1]"/>
-      <xsl:text>] </xsl:text>
-    </xsl:when>
-    <xsl:otherwise><!-- nop --></xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="*" mode="bibliography.mode">
-  <xsl:apply-templates select="."/><!-- try the default mode -->
-</xsl:template>
-
-<xsl:template match="abbrev" mode="bibliography.mode">
-  <xsl:if test="preceding-sibling::*">
-    <fo:inline>
-      <xsl:apply-templates mode="bibliography.mode"/>
-    </fo:inline>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="abstract" mode="bibliography.mode">
-  <!-- suppressed -->
-</xsl:template>
-
-<xsl:template match="address" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="affiliation" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="shortaffil" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="jobtitle" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="artheader|articleinfo|article/info" 
-              mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="artpagenums" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="author" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:call-template name="person.name"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="authorblurb|personblurb" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:call-template name="person.name.list"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="authorinitials" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="bibliomisc" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="bibliomset" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<!-- ================================================== -->
-
-<xsl:template match="biblioset" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="biblioset/title|biblioset/citetitle" 
-              mode="bibliography.mode">
-  <xsl:variable name="relation" select="../@relation"/>
-  <xsl:choose>
-    <xsl:when test="$relation='article' or @pubwork='article'">
-      <xsl:call-template name="gentext.startquote"/>
-      <xsl:apply-templates mode="bibliography.mode"/>
-      <xsl:call-template name="gentext.endquote"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:inline font-style="italic">
-        <xsl:apply-templates/>
-      </fo:inline>
-    </xsl:otherwise>
-  </xsl:choose>
-  <xsl:value-of select="$biblioentry.item.separator"/>
-</xsl:template>
-
-<!-- ================================================== -->
-
-<xsl:template match="bookbiblio" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="citetitle" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:choose>
-      <xsl:when test="@pubwork = 'article'">
-        <xsl:call-template name="gentext.startquote"/>
-        <xsl:apply-templates mode="bibliography.mode"/>
-        <xsl:call-template name="gentext.endquote"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <fo:inline font-style="italic">
-          <xsl:apply-templates mode="bibliography.mode"/>
-        </fo:inline>
-      </xsl:otherwise>
-    </xsl:choose>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="collab" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="confgroup" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="contractnum" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="contractsponsor" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="contrib" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<!-- ================================================== -->
-
-<xsl:template match="copyright" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:call-template name="gentext">
-      <xsl:with-param name="key" select="'Copyright'"/>
-    </xsl:call-template>
-    <xsl:call-template name="gentext.space"/>
-    <xsl:call-template name="dingbat">
-      <xsl:with-param name="dingbat">copyright</xsl:with-param>
-    </xsl:call-template>
-    <xsl:call-template name="gentext.space"/>
-    <xsl:apply-templates select="year" mode="bibliography.mode"/>
-    <xsl:if test="holder">
-      <xsl:call-template name="gentext.space"/>
-      <xsl:apply-templates select="holder" mode="bibliography.mode"/>
-    </xsl:if>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="year" mode="bibliography.mode">
-  <xsl:apply-templates/><xsl:text>, </xsl:text>
-</xsl:template>
-
-<xsl:template match="year[position()=last()]" mode="bibliography.mode">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="holder" mode="bibliography.mode">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<!-- ================================================== -->
-
-<xsl:template match="corpauthor" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="corpcredit" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="corpname" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="date" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="edition" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="editor" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:call-template name="person.name"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="firstname" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="honorific" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="indexterm" mode="bibliography.mode">
-  <xsl:apply-templates select="."/> 
-</xsl:template>
-
-<xsl:template match="invpartnumber" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="isbn" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="issn" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="issuenum" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="lineage" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="orgname" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="othername" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="pagenums" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="printhistory" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="productname" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="productnumber" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="publisher" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="publishername" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="pubsnumber" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="bibliography.mode">
-  <fo:block>
-    <xsl:apply-templates select="."/> <!-- use normal mode -->
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="seriesinfo" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="seriesvolnums" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="surname" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="title" mode="bibliography.mode">
-  <fo:inline>
-    <fo:inline font-style="italic">
-      <xsl:apply-templates mode="bibliography.mode"/>
-    </fo:inline>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="titleabbrev" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="volumenum" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="orgdiv" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="collabname" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="confdates" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="conftitle" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="confnum" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="confsponsor" mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="bibliocoverage|biblioid|bibliorelation|bibliosource"
-              mode="bibliography.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:value-of select="$biblioentry.item.separator"/>
-  </fo:inline>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="*" mode="bibliomixed.mode">
-  <xsl:apply-templates select="."/><!-- try the default mode -->
-</xsl:template>
-
-<xsl:template match="abbrev" mode="bibliomixed.mode">
-  <xsl:if test="preceding-sibling::*">
-    <fo:inline>
-      <xsl:apply-templates mode="bibliomixed.mode"/>
-    </fo:inline>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="abstract" mode="bibliomixed.mode">
-  <fo:block start-indent="1in">
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="para" mode="bibliomixed.mode">
-  <fo:block>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="address" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="affiliation" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="shortaffil" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="jobtitle" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliography.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="artpagenums" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="author" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:call-template name="person.name"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="authorblurb|personblurb" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="authorinitials" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="bibliomisc" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<!-- ================================================== -->
-
-<xsl:template match="bibliomset" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="bibliomset/title|bibliomset/citetitle" 
-              mode="bibliomixed.mode">
-  <xsl:variable name="relation" select="../@relation"/>
-  <xsl:choose>
-    <xsl:when test="$relation='article' or @pubwork='article'">
-      <xsl:call-template name="gentext.startquote"/>
-      <xsl:apply-templates mode="bibliomixed.mode"/>
-      <xsl:call-template name="gentext.endquote"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:inline font-style="italic">
-        <xsl:apply-templates/>
-      </fo:inline>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ================================================== -->
-
-<xsl:template match="biblioset" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="citetitle" mode="bibliomixed.mode">
-  <xsl:choose>
-    <xsl:when test="@pubwork = 'article'">
-      <xsl:call-template name="gentext.startquote"/>
-      <xsl:apply-templates mode="bibliomixed.mode"/>
-      <xsl:call-template name="gentext.endquote"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:inline font-style="italic">
-        <xsl:apply-templates mode="bibliography.mode"/>
-      </fo:inline>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="collab" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="confgroup" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="contractnum" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="contractsponsor" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="contrib" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="copyright" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="corpcredit" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="corpname" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="date" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="edition" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="editor" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="firstname" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="honorific" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="indexterm" mode="bibliomixed.mode">
-  <xsl:apply-templates select="."/> 
-</xsl:template>
-
-<xsl:template match="invpartnumber" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="isbn" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="issn" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="issuenum" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="lineage" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="orgname" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="othername" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="pagenums" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="printhistory" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="productname" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="productnumber" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="publisher" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="publishername" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="pubsnumber" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="seriesvolnums" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="surname" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="title" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="titleabbrev" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="volumenum" mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="bibliocoverage|biblioid|bibliorelation|bibliosource"
-              mode="bibliomixed.mode">
-  <fo:inline>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </fo:inline>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/block.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/block.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,600 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-<!-- What should we do about styling blockinfo? -->
-
-<xsl:template match="blockinfo|info">
-  <!-- suppress -->
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="block.object">
-  <fo:block>
-    <xsl:call-template name="anchor"/>
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="para">
-  <fo:block xsl:use-attribute-sets="normal.para.spacing">
-    <xsl:call-template name="anchor"/>
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="simpara">
-  <fo:block xsl:use-attribute-sets="normal.para.spacing">
-    <xsl:call-template name="anchor"/>
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="formalpara">
-  <fo:block xsl:use-attribute-sets="normal.para.spacing">
-    <xsl:call-template name="anchor"/>
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<!-- Only use title from info -->
-<xsl:template match="formalpara/info">
-  <xsl:apply-templates select="title"/>
-</xsl:template>
-
-<xsl:template match="formalpara/title|formalpara/info/title">
-  <xsl:variable name="titleStr">
-      <xsl:apply-templates/>
-  </xsl:variable>
-  <xsl:variable name="lastChar">
-    <xsl:if test="$titleStr != ''">
-      <xsl:value-of select="substring($titleStr,string-length($titleStr),1)"/>
-    </xsl:if>
-  </xsl:variable>
-
-  <fo:inline font-weight="bold"
-             keep-with-next.within-line="always"
-             padding-end="1em">
-    <xsl:copy-of select="$titleStr"/>
-    <xsl:if test="$lastChar != ''
-                  and not(contains($runinhead.title.end.punct, $lastChar))">
-      <xsl:value-of select="$runinhead.default.title.end.punct"/>
-    </xsl:if>
-    <xsl:text>&#160;</xsl:text>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="formalpara/para">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="blockquote">
-  <fo:block xsl:use-attribute-sets="blockquote.properties">
-    <xsl:call-template name="anchor"/>
-    <fo:block>
-      <xsl:if test="title|info/title">
-        <fo:block xsl:use-attribute-sets="formal.title.properties">
-          <xsl:apply-templates select="." mode="object.title.markup"/>
-        </fo:block>
-      </xsl:if>
-      <xsl:apply-templates select="*[local-name(.) != 'title'
-                                   and local-name(.) != 'attribution']"/>
-    </fo:block>
-    <xsl:if test="attribution">
-      <fo:block text-align="right">
-        <!-- mdash -->
-        <xsl:text>&#x2014;</xsl:text>
-        <xsl:apply-templates select="attribution"/>
-      </fo:block>
-    </xsl:if>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="epigraph">
-  <fo:block>
-    <xsl:call-template name="anchor"/>
-    <xsl:apply-templates select="para|simpara|formalpara|literallayout"/>
-    <xsl:if test="attribution">
-      <fo:inline>
-        <xsl:text>--</xsl:text>
-        <xsl:apply-templates select="attribution"/>
-      </fo:inline>
-    </xsl:if>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="attribution">
-  <fo:inline><xsl:apply-templates/></fo:inline>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="floater">
-  <xsl:param name="position" select="'none'"/>
-  <xsl:param name="clear" select="'both'"/>
-  <xsl:param name="width"/>
-  <xsl:param name="content"/>
-  <xsl:param name="start.indent">0pt</xsl:param>
-  <xsl:param name="end.indent">0pt</xsl:param>
-
-  <xsl:choose>
-    <xsl:when test="not($fop.extensions = 0)">
-      <!-- fop 0.20.5 does not support floats -->
-      <xsl:copy-of select="$content"/>
-    </xsl:when>
-    <xsl:when test="$position = 'none'">
-      <xsl:copy-of select="$content"/>
-    </xsl:when>
-    <xsl:when test="$position = 'before'">
-      <fo:float float="before">
-        <xsl:copy-of select="$content"/>
-      </fo:float>
-    </xsl:when>
-    <xsl:when test="$position = 'left' or
-                    $position = 'start' or
-                    $position = 'right' or
-                    $position = 'end' or
-                    $position = 'inside' or
-                    $position = 'outside'">
-      <xsl:variable name="float">
-        <fo:float float="{$position}"
-                  clear="{$clear}">
-          <fo:block-container 
-                    start-indent="{$start.indent}"
-                    end-indent="{$end.indent}">
-            <xsl:if test="$width != ''">
-              <xsl:attribute name="inline-progression-dimension">
-                <xsl:value-of select="$width"/>
-              </xsl:attribute>
-            </xsl:if>
-            <fo:block>
-              <xsl:copy-of select="$content"/>
-            </fo:block>
-          </fo:block-container>
-        </fo:float>
-      </xsl:variable>
-      <xsl:choose>
-        <xsl:when test="$axf.extensions != 0 and self::sidebar">
-          <fo:block xsl:use-attribute-sets="normal.para.spacing"
-                    space-after="0pt"
-                    space-after.precedence="force"
-                    start-indent="0pt" end-indent="0pt">
-            <xsl:copy-of select="$float"/>
-          </fo:block>
-        </xsl:when>
-        <xsl:when test="$axf.extensions != 0 and 
-                        ($position = 'left' or $position = 'start')">
-          <fo:float float="{$position}"
-                    clear="{$clear}">
-            <fo:block-container 
-                      inline-progression-dimension=".001mm"
-                      end-indent="{$start.indent} + {$width} + {$end.indent}">
-              <xsl:attribute name="start-indent">
-                <xsl:choose>
-                  <xsl:when test="ancestor::para">
-                    <!-- Special case for handling inline floats
-                         in Antenna House-->
-                    <xsl:value-of select="concat('-', $body.start.indent)"/>
-                  </xsl:when>
-                  <xsl:otherwise>0pt</xsl:otherwise>
-                </xsl:choose>
-              </xsl:attribute>
-              <fo:block start-indent="{$start.indent}"
-                        end-indent="-{$start.indent} - {$width}">
-                <xsl:copy-of select="$content"/>
-              </fo:block>
-            </fo:block-container>
-          </fo:float>
-
-        </xsl:when>
-        <xsl:when test="$axf.extensions != 0 and 
-                        ($position = 'right' or $position = 'end')">
-          <!-- Special case for handling inline floats in Antenna House-->
-          <fo:float float="{$position}"
-                    clear="{$clear}">
-            <fo:block-container 
-                      inline-progression-dimension=".001mm"
-                      end-indent="-{$body.end.indent}"
-                      start-indent="{$start.indent} + {$width} + {$end.indent}">
-              <fo:block end-indent="{$end.indent}"
-                        start-indent="-{$end.indent} - {$width}">
-                <xsl:copy-of select="$content"/>
-              </fo:block>
-            </fo:block-container>
-          </fo:float>
-
-        </xsl:when>
-        <xsl:when test="$xep.extensions != 0 and self::sidebar">
-          <!-- float needs some space above  to line up with following para -->
-          <fo:block xsl:use-attribute-sets="normal.para.spacing">
-            <xsl:copy-of select="$float"/>
-          </fo:block>
-        </xsl:when>
-        <xsl:when test="$xep.extensions != 0">
-          <xsl:copy-of select="$float"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:copy-of select="$float"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy-of select="$content"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="sidebar" name="sidebar">
-  <!-- Also does margin notes -->
-  <xsl:variable name="pi-type">
-    <xsl:call-template name="pi.dbfo_float-type"/>
-  </xsl:variable>
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$pi-type = 'margin.note'">
-      <xsl:call-template name="margin.note"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:variable name="content">
-        <fo:block xsl:use-attribute-sets="sidebar.properties"
-                  id="{$id}">
-          <xsl:call-template name="sidebar.titlepage"/>
-          <xsl:apply-templates select="node()[not(self::title) and
-                                         not(self::info) and
-                                         not(self::sidebarinfo)]"/>
-        </fo:block>
-      </xsl:variable>
-
-      <xsl:variable name="pi-width">
-        <xsl:call-template name="pi.dbfo_sidebar-width"/>
-      </xsl:variable>
-
-      <xsl:variable name="position">
-        <xsl:choose>
-          <xsl:when test="$pi-type != ''">
-            <xsl:value-of select="$pi-type"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="$sidebar.float.type"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:variable>
-    
-      <xsl:call-template name="floater">
-        <xsl:with-param name="content" select="$content"/>
-        <xsl:with-param name="position" select="$position"/>
-        <xsl:with-param name="width">
-          <xsl:choose>
-            <xsl:when test="$pi-width != ''">
-              <xsl:value-of select="$pi-width"/>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:value-of select="$sidebar.float.width"/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:with-param>
-        <xsl:with-param name="start.indent">
-          <xsl:choose>
-            <xsl:when test="$position = 'start' or 
-                            $position = 'left'">0pt</xsl:when>
-            <xsl:when test="$position = 'end' or 
-                            $position = 'right'">0.5em</xsl:when>
-            <xsl:otherwise>0pt</xsl:otherwise>
-          </xsl:choose>
-        </xsl:with-param>
-        <xsl:with-param name="end.indent">
-          <xsl:choose>
-            <xsl:when test="$position = 'start' or 
-                            $position = 'left'">0.5em</xsl:when>
-            <xsl:when test="$position = 'end' or 
-                            $position = 'right'">0pt</xsl:when>
-            <xsl:otherwise>0pt</xsl:otherwise>
-          </xsl:choose>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-
-</xsl:template>
-
-<xsl:template match="sidebar/title|sidebarinfo|sidebar/info"/>
-
-<xsl:template match="sidebar/title|sidebarinfo/title|sidebar/info/title"
-              mode="titlepage.mode" priority="1">
-  <fo:block xsl:use-attribute-sets="sidebar.title.properties">
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template name="margin.note">
-  <xsl:param name="content">
-    <fo:block xsl:use-attribute-sets="margin.note.properties">
-      <xsl:if test="./title">
-        <fo:block xsl:use-attribute-sets="margin.note.title.properties">
-          <xsl:apply-templates select="./title" mode="margin.note.title.mode"/>
-        </fo:block>
-      </xsl:if>
-      <xsl:apply-templates/>
-    </fo:block>
-  </xsl:param>
-
-  <xsl:variable name="pi-width">
-    <xsl:call-template name="pi.dbfo_sidebar-width"/>
-  </xsl:variable>
-
-  <xsl:variable name="position" select="$margin.note.float.type"/>
-
-  <xsl:call-template name="floater">
-    <xsl:with-param name="content" select="$content"/>
-    <xsl:with-param name="position" select="$position"/>
-    <xsl:with-param name="width" >
-      <xsl:choose>
-        <xsl:when test="$pi-width != ''">
-          <xsl:value-of select="$pi-width"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="$margin.note.width"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:with-param>
-    <xsl:with-param name="start.indent">
-      <xsl:choose>
-        <xsl:when test="$position = 'start' or 
-                        $position = 'left'">0pt</xsl:when>
-        <xsl:when test="$position = 'end' or 
-                        $position = 'right'">0.5em</xsl:when>
-        <xsl:otherwise>0pt</xsl:otherwise>
-      </xsl:choose>
-    </xsl:with-param>
-    <xsl:with-param name="end.indent">
-      <xsl:choose>
-        <xsl:when test="$position = 'start' or 
-                        $position = 'left'">0.5em</xsl:when>
-        <xsl:when test="$position = 'end' or 
-                        $position = 'right'">0pt</xsl:when>
-        <xsl:otherwise>0pt</xsl:otherwise>
-      </xsl:choose>
-    </xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="sidebar/title" mode="margin.note.title.mode">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="abstract">
-  <fo:block xsl:use-attribute-sets="abstract.properties">
-    <xsl:call-template name="anchor"/>
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="abstract/title|abstract/info/title">
-  <fo:block xsl:use-attribute-sets="abstract.title.properties">
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="msgset">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="msgentry">
-  <xsl:call-template name="block.object"/>
-</xsl:template>
-
-<xsl:template match="simplemsgentry">
-  <xsl:call-template name="block.object"/>
-</xsl:template>
-
-<xsl:template match="msg">
-  <xsl:call-template name="block.object"/>
-</xsl:template>
-
-<xsl:template match="msgmain">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="msgsub">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="msgrel">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="msgtext">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="msginfo">
-  <xsl:call-template name="block.object"/>
-</xsl:template>
-
-<xsl:template match="msglevel">
-  <fo:block>
-    <fo:inline font-weight="bold"
-               keep-with-next.within-line="always">
-      <xsl:call-template name="gentext.template">
-        <xsl:with-param name="context" select="'msgset'"/>
-        <xsl:with-param name="name" select="'MsgLevel'"/>
-      </xsl:call-template>
-    </fo:inline>
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="msgorig">
-  <fo:block>
-    <fo:inline font-weight="bold"
-               keep-with-next.within-line="always">
-      <xsl:call-template name="gentext.template">
-        <xsl:with-param name="context" select="'msgset'"/>
-        <xsl:with-param name="name" select="'MsgOrig'"/>
-      </xsl:call-template>
-    </fo:inline>
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="msgaud">
-  <fo:block>
-    <fo:inline font-weight="bold"
-               keep-with-next.within-line="always">
-      <xsl:call-template name="gentext.template">
-        <xsl:with-param name="context" select="'msgset'"/>
-        <xsl:with-param name="name" select="'MsgAud'"/>
-      </xsl:call-template>
-    </fo:inline>
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="msgexplan">
-  <xsl:call-template name="block.object"/>
-</xsl:template>
-
-<xsl:template match="msgexplan/title">
-  <fo:block font-weight="bold"
-            keep-with-next.within-column="always"
-            hyphenate="false">
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<!-- ==================================================================== -->
-<!-- For better or worse, revhistory is allowed in content... -->
-
-<xsl:template match="revhistory">
-  <fo:table table-layout="fixed" xsl:use-attribute-sets="revhistory.table.properties">
-    <xsl:call-template name="anchor"/>
-    <fo:table-column column-number="1" column-width="proportional-column-width(1)"/>
-    <fo:table-column column-number="2" column-width="proportional-column-width(1)"/>
-    <fo:table-column column-number="3" column-width="proportional-column-width(1)"/>
-    <fo:table-body start-indent="0pt" end-indent="0pt">
-      <fo:table-row>
-        <fo:table-cell number-columns-spanned="3" xsl:use-attribute-sets="revhistory.table.cell.properties">
-          <fo:block xsl:use-attribute-sets="revhistory.title.properties">
-            <xsl:call-template name="gentext">
-              <xsl:with-param name="key" select="'RevHistory'"/>
-            </xsl:call-template>
-          </fo:block>
-        </fo:table-cell>
-      </fo:table-row>
-      <xsl:apply-templates/>
-    </fo:table-body>
-  </fo:table>
-</xsl:template>
-
-<xsl:template match="revhistory/revision">
-  <xsl:variable name="revnumber" select="revnumber"/>
-  <xsl:variable name="revdate"   select="date"/>
-  <xsl:variable name="revauthor" select="authorinitials|author"/>
-  <xsl:variable name="revremark" select="revremark|revdescription"/>
-  <fo:table-row>
-    <fo:table-cell xsl:use-attribute-sets="revhistory.table.cell.properties">
-      <fo:block>
-        <xsl:call-template name="anchor"/>
-        <xsl:if test="$revnumber">
-          <xsl:call-template name="gentext">
-            <xsl:with-param name="key" select="'Revision'"/>
-          </xsl:call-template>
-          <xsl:call-template name="gentext.space"/>
-          <xsl:apply-templates select="$revnumber[1]"/>
-        </xsl:if>
-      </fo:block>
-    </fo:table-cell>
-    <fo:table-cell xsl:use-attribute-sets="revhistory.table.cell.properties">
-      <fo:block>
-        <xsl:apply-templates select="$revdate[1]"/>
-      </fo:block>
-    </fo:table-cell>
-    <fo:table-cell xsl:use-attribute-sets="revhistory.table.cell.properties">
-      <fo:block>
-        <xsl:for-each select="$revauthor">
-          <xsl:apply-templates select="."/>
-          <xsl:if test="position() != last()">
-            <xsl:text>, </xsl:text>
-          </xsl:if>
-        </xsl:for-each>
-      </fo:block>
-    </fo:table-cell>
-  </fo:table-row>
-  <xsl:if test="$revremark">
-    <fo:table-row>
-      <fo:table-cell number-columns-spanned="3" xsl:use-attribute-sets="revhistory.table.cell.properties">
-        <fo:block>
-          <xsl:apply-templates select="$revremark[1]"/>
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="revision/revnumber">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="revision/date">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="revision/authorinitials">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="revision/author">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="revision/revremark">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="revision/revdescription">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="ackno">
-  <fo:block xsl:use-attribute-sets="normal.para.spacing">
-    <xsl:call-template name="anchor"/>
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="highlights">
-  <xsl:call-template name="block.object"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/callout.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/callout.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,231 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                xmlns:sverb="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Verbatim"
-                xmlns:xverb="com.nwalsh.xalan.Verbatim"
-                xmlns:lxslt="http://xml.apache.org/xslt"
-                exclude-result-prefixes="sverb xverb lxslt"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<lxslt:component prefix="xverb"
-                 functions="insertCallouts"/>
-
-<xsl:template match="programlistingco|screenco">
-  <xsl:variable name="verbatim" select="programlisting|screen"/>
-  <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
-
-  <xsl:choose>
-    <xsl:when test="$use.extensions != '0'
-                    and $callouts.extension != '0'">
-      <xsl:variable name="rtf">
-        <xsl:apply-templates select="$verbatim">
-          <xsl:with-param name="suppress-numbers" select="'1'"/>
-        </xsl:apply-templates>
-      </xsl:variable>
-
-      <xsl:variable name="rtf-with-callouts">
-        <xsl:choose>
-          <xsl:when test="contains($vendor, 'SAXON ')">
-            <xsl:copy-of select="sverb:insertCallouts(areaspec,$rtf)"/>
-          </xsl:when>
-          <xsl:when test="contains($vendor, 'Apache Software Foundation')">
-            <xsl:copy-of select="xverb:insertCallouts(areaspec,$rtf)"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:message terminate="yes">
-              <xsl:text>Don't know how to do callouts with </xsl:text>
-              <xsl:value-of select="$vendor"/>
-            </xsl:message>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:variable>
-
-      <xsl:choose>
-        <xsl:when test="$verbatim/@linenumbering = 'numbered'
-                        and $linenumbering.extension != '0'">
-          <xsl:call-template name="number.rtf.lines">
-            <xsl:with-param name="rtf" select="$rtf-with-callouts"/>
-            <xsl:with-param name="pi.context"
-                            select="programlisting|screen"/>
-          </xsl:call-template>
-          <xsl:apply-templates select="calloutlist"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:copy-of select="$rtf-with-callouts"/>
-          <xsl:apply-templates select="calloutlist"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="areaspec|areaset|area">
-</xsl:template>
-
-<xsl:template match="areaset" mode="conumber">
-  <xsl:number count="area|areaset" format="1"/>
-</xsl:template>
-
-<xsl:template match="area" mode="conumber">
-  <xsl:number count="area|areaset" format="1"/>
-</xsl:template>
-
-<xsl:template match="co">
-  <fo:inline>
-    <xsl:call-template name="anchor"/>
-    <xsl:apply-templates select="." mode="callout-bug"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="coref">
-  <!-- tricky; this relies on the fact that we can process the "co" that's -->
-  <!-- "over there" as if it were "right here" -->
-
-  <xsl:variable name="co" select="key('id', @linkend)"/>
-  <xsl:choose>
-    <xsl:when test="not($co)">
-      <xsl:message>
-        <xsl:text>Error: coref link is broken: </xsl:text>
-        <xsl:value-of select="@linkend"/>
-      </xsl:message>
-    </xsl:when>
-    <xsl:when test="local-name($co) != 'co'">
-      <xsl:message>
-        <xsl:text>Error: coref doesn't point to a co: </xsl:text>
-        <xsl:value-of select="@linkend"/>
-      </xsl:message>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:inline>
-        <xsl:call-template name="anchor"/>
-        <xsl:apply-templates select="$co" mode="callout-bug"/>
-      </fo:inline>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="co" mode="callout-bug">
-  <xsl:call-template name="callout-bug">
-    <xsl:with-param name="conum">
-      <xsl:number count="co"
-                  level="any"
-                  from="programlisting|screen|literallayout|synopsis"
-                  format="1"/>
-    </xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="callout-bug">
-  <xsl:param name="conum" select='1'/>
-
-  <xsl:choose>
-    <!-- Draw callouts as images -->
-    <xsl:when test="$callout.graphics != '0'
-                    and $conum &lt;= $callout.graphics.number.limit">
-      <xsl:variable name="filename"
-                    select="concat($callout.graphics.path, $conum,
-		                   $callout.graphics.extension)"/>
-
-      <fo:external-graphic content-width="{$callout.icon.size}"
-                           width="{$callout.icon.size}">
-        <xsl:attribute name="src">
-          <xsl:choose>
-            <xsl:when test="$passivetex.extensions != 0
-                            or $fop.extensions != 0
-                            or $arbortext.extensions != 0">
-              <xsl:value-of select="$filename"/>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:text>url(</xsl:text>
-              <xsl:value-of select="$filename"/>
-              <xsl:text>)</xsl:text>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:attribute>
-      </fo:external-graphic>
-    </xsl:when>
-
-    <xsl:when test="$callout.unicode != 0
-                    and $conum &lt;= $callout.unicode.number.limit">
-      <xsl:variable name="comarkup">
-        <xsl:choose>
-          <xsl:when test="$callout.unicode.start.character = 10102">
-            <xsl:choose>
-              <xsl:when test="$conum = 1">&#10102;</xsl:when>
-              <xsl:when test="$conum = 2">&#10103;</xsl:when>
-              <xsl:when test="$conum = 3">&#10104;</xsl:when>
-              <xsl:when test="$conum = 4">&#10105;</xsl:when>
-              <xsl:when test="$conum = 5">&#10106;</xsl:when>
-              <xsl:when test="$conum = 6">&#10107;</xsl:when>
-              <xsl:when test="$conum = 7">&#10108;</xsl:when>
-              <xsl:when test="$conum = 8">&#10109;</xsl:when>
-              <xsl:when test="$conum = 9">&#10110;</xsl:when>
-              <xsl:when test="$conum = 10">&#10111;</xsl:when>
-            </xsl:choose>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:message>
-              <xsl:text>Don't know how to generate Unicode callouts </xsl:text>
-              <xsl:text>when $callout.unicode.start.character is </xsl:text>
-              <xsl:value-of select="$callout.unicode.start.character"/>
-            </xsl:message>
-            <fo:inline background-color="#404040"
-                       color="white"
-                       padding-top="0.1em"
-                       padding-bottom="0.1em"
-                       padding-start="0.2em"
-                       padding-end="0.2em"
-                       baseline-shift="0.1em"
-                       font-family="{$body.fontset}"
-                       font-weight="bold"
-                       font-size="75%">
-              <xsl:value-of select="$conum"/>
-            </fo:inline>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:variable>
-
-      <xsl:choose>
-        <xsl:when test="$callout.unicode.font != ''">
-          <fo:inline font-family="{$callout.unicode.font}">
-            <xsl:copy-of select="$comarkup"/>
-          </fo:inline>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:copy-of select="$comarkup"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-
-    <!-- Most safe: draw a dark gray square with a white number inside -->
-    <xsl:otherwise>
-      <fo:inline background-color="#404040"
-                 color="white"
-                 padding-top="0.1em"
-                 padding-bottom="0.1em"
-                 padding-start="0.2em"
-                 padding-end="0.2em"
-                 baseline-shift="0.1em"
-                 font-family="{$body.fontset}"
-                 font-weight="bold"
-                 font-size="75%">
-        <xsl:value-of select="$conum"/>
-      </fo:inline>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/component.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/component.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,797 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-
-<xsl:template name="component.title">
-  <xsl:param name="node" select="."/>
-  <xsl:param name="pagewide" select="0"/>
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="$node"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="title">
-    <xsl:apply-templates select="$node" mode="object.title.markup">
-      <xsl:with-param name="allow-anchors" select="1"/>
-    </xsl:apply-templates>
-  </xsl:variable>
-
-  <xsl:variable name="titleabbrev">
-    <xsl:apply-templates select="$node" mode="titleabbrev.markup"/>
-  </xsl:variable>
-
-  <xsl:variable name="level">
-    <xsl:choose>
-      <xsl:when test="ancestor::section">
-        <xsl:value-of select="count(ancestor::section)+1"/>
-      </xsl:when>
-      <xsl:when test="ancestor::sect5">6</xsl:when>
-      <xsl:when test="ancestor::sect4">5</xsl:when>
-      <xsl:when test="ancestor::sect3">4</xsl:when>
-      <xsl:when test="ancestor::sect2">3</xsl:when>
-      <xsl:when test="ancestor::sect1">2</xsl:when>
-      <xsl:otherwise>1</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:if test="$passivetex.extensions != 0">
-    <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex"
-                    fotex-bookmark-level="2"
-                    fotex-bookmark-label="{$id}">
-      <xsl:value-of select="$titleabbrev"/>
-    </fotex:bookmark>
-  </xsl:if>
-
-  <fo:block xsl:use-attribute-sets="component.title.properties">
-    <xsl:if test="$pagewide != 0">
-      <!-- Doesn't work to use 'all' here since not a child of fo:flow -->
-      <xsl:attribute name="span">inherit</xsl:attribute>
-    </xsl:if>
-    <xsl:attribute name="hyphenation-character">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-character'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-push-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-remain-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:if test="$axf.extensions != 0">
-      <xsl:attribute name="axf:outline-level">
-        <xsl:value-of select="count($node/ancestor::*)"/>
-      </xsl:attribute>
-      <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
-      <xsl:attribute name="axf:outline-title">
-        <xsl:value-of select="normalize-space($title)"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <!-- Let's handle the case where a component (bibliography, for example)
-         occurs inside a section; will we need parameters for this?
-         Danger Will Robinson: using section.title.level*.properties here
-         runs the risk that someone will set something other than
-         font-size there... -->
-    <xsl:choose>
-      <xsl:when test="$level=2">
-        <fo:block xsl:use-attribute-sets="section.title.level2.properties">
-          <xsl:copy-of select="$title"/>
-        </fo:block>
-      </xsl:when>
-      <xsl:when test="$level=3">
-        <fo:block xsl:use-attribute-sets="section.title.level3.properties">
-          <xsl:copy-of select="$title"/>
-        </fo:block>
-      </xsl:when>
-      <xsl:when test="$level=4">
-        <fo:block xsl:use-attribute-sets="section.title.level4.properties">
-          <xsl:copy-of select="$title"/>
-        </fo:block>
-      </xsl:when>
-      <xsl:when test="$level=5">
-        <fo:block xsl:use-attribute-sets="section.title.level5.properties">
-          <xsl:copy-of select="$title"/>
-        </fo:block>
-      </xsl:when>
-      <xsl:when test="$level=6">
-        <fo:block xsl:use-attribute-sets="section.title.level6.properties">
-          <xsl:copy-of select="$title"/>
-        </fo:block>
-      </xsl:when>
-      <xsl:otherwise>
-        <!-- not in a section: do nothing special -->
-        <xsl:copy-of select="$title"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </fo:block>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="dedication" mode="dedication">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="master-reference">
-    <xsl:call-template name="select.pagemaster"/>
-  </xsl:variable>
-
-  <fo:page-sequence hyphenate="{$hyphenate}"
-                    master-reference="{$master-reference}">
-    <xsl:attribute name="language">
-      <xsl:call-template name="l10n.language"/>
-    </xsl:attribute>
-    <xsl:attribute name="format">
-      <xsl:call-template name="page.number.format">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="initial-page-number">
-      <xsl:call-template name="initial.page.number">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="force-page-count">
-      <xsl:call-template name="force.page.count">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="hyphenation-character">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-character'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-push-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-remain-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:apply-templates select="." mode="running.head.mode">
-      <xsl:with-param name="master-reference" select="$master-reference"/>
-    </xsl:apply-templates>
-
-    <xsl:apply-templates select="." mode="running.foot.mode">
-      <xsl:with-param name="master-reference" select="$master-reference"/>
-    </xsl:apply-templates>
-
-    <fo:flow flow-name="xsl-region-body">
-      <xsl:call-template name="set.flow.properties">
-        <xsl:with-param name="element" select="local-name(.)"/>
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-
-      <fo:block id="{$id}"
-                xsl:use-attribute-sets="component.titlepage.properties">
-        <xsl:call-template name="dedication.titlepage"/>
-      </fo:block>
-      <xsl:apply-templates/>
-    </fo:flow>
-  </fo:page-sequence>
-</xsl:template>
-
-<xsl:template match="dedication"></xsl:template> <!-- see mode="dedication" -->
-<xsl:template match="dedication/docinfo"></xsl:template>
-<xsl:template match="dedication/title"></xsl:template>
-<xsl:template match="dedication/subtitle"></xsl:template>
-<xsl:template match="dedication/titleabbrev"></xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="colophon">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="master-reference">
-    <xsl:call-template name="select.pagemaster"/>
-  </xsl:variable>
-
-  <fo:page-sequence hyphenate="{$hyphenate}"
-                    master-reference="{$master-reference}">
-    <xsl:attribute name="language">
-      <xsl:call-template name="l10n.language"/>
-    </xsl:attribute>
-    <xsl:attribute name="format">
-      <xsl:call-template name="page.number.format">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="initial-page-number">
-      <xsl:call-template name="initial.page.number">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="force-page-count">
-      <xsl:call-template name="force.page.count">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-character">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-character'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-push-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-remain-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:apply-templates select="." mode="running.head.mode">
-      <xsl:with-param name="master-reference" select="$master-reference"/>
-    </xsl:apply-templates>
-
-    <xsl:apply-templates select="." mode="running.foot.mode">
-      <xsl:with-param name="master-reference" select="$master-reference"/>
-    </xsl:apply-templates>
-
-    <fo:flow flow-name="xsl-region-body">
-      <xsl:call-template name="set.flow.properties">
-        <xsl:with-param name="element" select="local-name(.)"/>
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-
-      <fo:block id="{$id}"
-                xsl:use-attribute-sets="component.titlepage.properties">
-        <xsl:call-template name="colophon.titlepage"/>
-      </fo:block>
-      <xsl:apply-templates/>
-    </fo:flow>
-  </fo:page-sequence>
-</xsl:template>
-
-<xsl:template match="colophon/title"></xsl:template>
-<xsl:template match="colophon/subtitle"></xsl:template>
-<xsl:template match="colophon/titleabbrev"></xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="preface">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="master-reference">
-    <xsl:call-template name="select.pagemaster"/>
-  </xsl:variable>
-
-  <fo:page-sequence hyphenate="{$hyphenate}"
-                    master-reference="{$master-reference}">
-    <xsl:attribute name="language">
-      <xsl:call-template name="l10n.language"/>
-    </xsl:attribute>
-    <xsl:attribute name="format">
-      <xsl:call-template name="page.number.format">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="initial-page-number">
-      <xsl:call-template name="initial.page.number">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="force-page-count">
-      <xsl:call-template name="force.page.count">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="hyphenation-character">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-character'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-push-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-remain-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:apply-templates select="." mode="running.head.mode">
-      <xsl:with-param name="master-reference" select="$master-reference"/>
-    </xsl:apply-templates>
-
-    <xsl:apply-templates select="." mode="running.foot.mode">
-      <xsl:with-param name="master-reference" select="$master-reference"/>
-    </xsl:apply-templates>
-
-    <fo:flow flow-name="xsl-region-body">
-      <xsl:call-template name="set.flow.properties">
-        <xsl:with-param name="element" select="local-name(.)"/>
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-
-      <fo:block id="{$id}"
-                xsl:use-attribute-sets="component.titlepage.properties">
-        <xsl:call-template name="preface.titlepage"/>
-      </fo:block>
-
-      <xsl:variable name="toc.params">
-        <xsl:call-template name="find.path.params">
-          <xsl:with-param name="table" 
-                          select="normalize-space($generate.toc)"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:if test="contains($toc.params, 'toc')">
-        <xsl:call-template name="component.toc">
-          <xsl:with-param name="toc.title.p" 
-                          select="contains($toc.params, 'title')"/>
-        </xsl:call-template>
-        <xsl:call-template name="component.toc.separator"/>
-      </xsl:if>
-
-      <xsl:apply-templates/>
-    </fo:flow>
-  </fo:page-sequence>
-</xsl:template>
-
-<xsl:template match="preface/docinfo|prefaceinfo"></xsl:template>
-<xsl:template match="preface/info"></xsl:template>
-<xsl:template match="preface/title"></xsl:template>
-<xsl:template match="preface/titleabbrev"></xsl:template>
-<xsl:template match="preface/subtitle"></xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="chapter">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="master-reference">
-    <xsl:call-template name="select.pagemaster"/>
-  </xsl:variable>
-
-  <fo:page-sequence hyphenate="{$hyphenate}"
-                    master-reference="{$master-reference}">
-    <xsl:attribute name="language">
-      <xsl:call-template name="l10n.language"/>
-    </xsl:attribute>
-    <xsl:attribute name="format">
-      <xsl:call-template name="page.number.format">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="initial-page-number">
-      <xsl:call-template name="initial.page.number">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="force-page-count">
-      <xsl:call-template name="force.page.count">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="hyphenation-character">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-character'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-push-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-remain-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:apply-templates select="." mode="running.head.mode">
-      <xsl:with-param name="master-reference" select="$master-reference"/>
-    </xsl:apply-templates>
-
-    <xsl:apply-templates select="." mode="running.foot.mode">
-      <xsl:with-param name="master-reference" select="$master-reference"/>
-    </xsl:apply-templates>
-
-    <fo:flow flow-name="xsl-region-body">
-      <xsl:call-template name="set.flow.properties">
-        <xsl:with-param name="element" select="local-name(.)"/>
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-
-      <fo:block id="{$id}"
-                xsl:use-attribute-sets="component.titlepage.properties">
-        <xsl:call-template name="chapter.titlepage"/>
-      </fo:block>
-
-      <xsl:variable name="toc.params">
-        <xsl:call-template name="find.path.params">
-          <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:if test="contains($toc.params, 'toc')">
-        <xsl:call-template name="component.toc">
-          <xsl:with-param name="toc.title.p" 
-                          select="contains($toc.params, 'title')"/>
-        </xsl:call-template>
-        <xsl:call-template name="component.toc.separator"/>
-      </xsl:if>
-      <xsl:apply-templates/>
-    </fo:flow>
-  </fo:page-sequence>
-</xsl:template>
-
-<xsl:template match="chapter/docinfo|chapterinfo"></xsl:template>
-<xsl:template match="chapter/info"></xsl:template>
-<xsl:template match="chapter/title"></xsl:template>
-<xsl:template match="chapter/titleabbrev"></xsl:template>
-<xsl:template match="chapter/subtitle"></xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="appendix">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="master-reference">
-    <xsl:call-template name="select.pagemaster"/>
-  </xsl:variable>
-
-  <fo:page-sequence hyphenate="{$hyphenate}"
-                    master-reference="{$master-reference}">
-    <xsl:attribute name="language">
-      <xsl:call-template name="l10n.language"/>
-    </xsl:attribute>
-    <xsl:attribute name="format">
-      <xsl:call-template name="page.number.format">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="initial-page-number">
-      <xsl:call-template name="initial.page.number">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="force-page-count">
-      <xsl:call-template name="force.page.count">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="hyphenation-character">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-character'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-push-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-remain-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:apply-templates select="." mode="running.head.mode">
-      <xsl:with-param name="master-reference" select="$master-reference"/>
-    </xsl:apply-templates>
-
-    <xsl:apply-templates select="." mode="running.foot.mode">
-      <xsl:with-param name="master-reference" select="$master-reference"/>
-    </xsl:apply-templates>
-
-    <fo:flow flow-name="xsl-region-body">
-      <xsl:call-template name="set.flow.properties">
-        <xsl:with-param name="element" select="local-name(.)"/>
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-
-      <fo:block id="{$id}"
-                xsl:use-attribute-sets="component.titlepage.properties">
-        <xsl:call-template name="appendix.titlepage"/>
-      </fo:block>
-
-      <xsl:variable name="toc.params">
-        <xsl:call-template name="find.path.params">
-          <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <xsl:if test="contains($toc.params, 'toc')">
-        <xsl:call-template name="component.toc">
-          <xsl:with-param name="toc.title.p" 
-                          select="contains($toc.params, 'title')"/>
-        </xsl:call-template>
-        <xsl:call-template name="component.toc.separator"/>
-      </xsl:if>
-      <xsl:apply-templates/>
-    </fo:flow>
-  </fo:page-sequence>
-</xsl:template>
-
-<xsl:template match="appendix/docinfo|appendixinfo"></xsl:template>
-<xsl:template match="appendix/info"></xsl:template>
-<xsl:template match="appendix/title"></xsl:template>
-<xsl:template match="appendix/titleabbrev"></xsl:template>
-<xsl:template match="appendix/subtitle"></xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="article">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="master-reference">
-    <xsl:call-template name="select.pagemaster"/>
-  </xsl:variable>
-
-  <fo:page-sequence hyphenate="{$hyphenate}"
-                    master-reference="{$master-reference}">
-    <xsl:attribute name="language">
-      <xsl:call-template name="l10n.language"/>
-    </xsl:attribute>
-    <xsl:attribute name="format">
-      <xsl:call-template name="page.number.format">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="initial-page-number">
-      <xsl:call-template name="initial.page.number">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="force-page-count">
-      <xsl:call-template name="force.page.count">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="hyphenation-character">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-character'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-push-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-remain-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:apply-templates select="." mode="running.head.mode">
-      <xsl:with-param name="master-reference" select="$master-reference"/>
-    </xsl:apply-templates>
-
-    <xsl:apply-templates select="." mode="running.foot.mode">
-      <xsl:with-param name="master-reference" select="$master-reference"/>
-    </xsl:apply-templates>
-
-    <fo:flow flow-name="xsl-region-body">
-      <xsl:call-template name="set.flow.properties">
-        <xsl:with-param name="element" select="local-name(.)"/>
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-
-      <fo:block id="{$id}"
-                xsl:use-attribute-sets="component.titlepage.properties">
-        <xsl:call-template name="article.titlepage"/>
-      </fo:block>
-
-      <xsl:variable name="toc.params">
-        <xsl:call-template name="find.path.params">
-          <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <xsl:if test="contains($toc.params, 'toc')">
-        <xsl:call-template name="component.toc">
-          <xsl:with-param name="toc.title.p" 
-                          select="contains($toc.params, 'title')"/>
-        </xsl:call-template>
-        <xsl:call-template name="component.toc.separator"/>
-      </xsl:if>
-      <xsl:apply-templates/>
-    </fo:flow>
-  </fo:page-sequence>
-</xsl:template>
-
-<xsl:template match="article/artheader"></xsl:template>
-<xsl:template match="article/articleinfo"></xsl:template>
-<xsl:template match="article/info"></xsl:template>
-<xsl:template match="article/title"></xsl:template>
-<xsl:template match="article/subtitle"></xsl:template>
-<xsl:template match="article/titleabbrev"></xsl:template>
-
-<xsl:template match="article/appendix">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="title">
-    <xsl:apply-templates select="." mode="object.title.markup"/>
-  </xsl:variable>
-
-  <xsl:variable name="titleabbrev">
-    <xsl:apply-templates select="." mode="titleabbrev.markup"/>
-  </xsl:variable>
-
-  <fo:block id='{$id}'>
-    <xsl:if test="$axf.extensions != 0">
-      <xsl:attribute name="axf:outline-level">
-        <xsl:value-of select="count(ancestor::*)+2"/>
-      </xsl:attribute>
-      <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
-      <xsl:attribute name="axf:outline-title">
-        <xsl:value-of select="normalize-space($titleabbrev)"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:if test="$passivetex.extensions != 0">
-      <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex" 
-                      fotex-bookmark-level="{count(ancestor::*)+2}" 
-                      fotex-bookmark-label="{$id}">
-        <xsl:value-of select="$titleabbrev"/>
-      </fotex:bookmark>
-    </xsl:if>
-
-    <fo:block xsl:use-attribute-sets="article.appendix.title.properties">
-      <fo:marker marker-class-name="section.head.marker">
-        <xsl:choose>
-          <xsl:when test="$titleabbrev = ''">
-            <xsl:value-of select="$title"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="$titleabbrev"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </fo:marker>
-      <xsl:copy-of select="$title"/>
-    </fo:block>
-
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<!-- Utility template to create a page sequence for an element -->
-<xsl:template match="*" mode="page.sequence" name="page.sequence">
-  <xsl:param name="content">
-    <xsl:apply-templates/>
-  </xsl:param>
-  <xsl:param name="master-reference">
-    <xsl:call-template name="select.pagemaster"/>
-  </xsl:param>
-  <xsl:param name="element" select="local-name(.)"/>
-  <xsl:param name="gentext-key" select="local-name(.)"/>
-  <xsl:param name="language">
-    <xsl:call-template name="l10n.language"/>
-  </xsl:param>
-
-  <xsl:param name="format">
-    <xsl:call-template name="page.number.format">
-      <xsl:with-param name="master-reference" select="$master-reference"/>
-      <xsl:with-param name="element" select="$element"/>
-    </xsl:call-template>
-  </xsl:param>
-
-  <xsl:param name="initial-page-number">
-    <xsl:call-template name="initial.page.number">
-      <xsl:with-param name="master-reference" select="$master-reference"/>
-      <xsl:with-param name="element" select="$element"/>
-    </xsl:call-template>
-  </xsl:param>
-
-  <xsl:param name="force-page-count">
-    <xsl:call-template name="force.page.count">
-      <xsl:with-param name="master-reference" select="$master-reference"/>
-      <xsl:with-param name="element" select="$element"/>
-    </xsl:call-template>
-  </xsl:param>
-
-  <fo:page-sequence hyphenate="{$hyphenate}"
-                    master-reference="{$master-reference}">
-    <xsl:attribute name="language">
-      <xsl:value-of select="$language"/>
-    </xsl:attribute>
-    <xsl:attribute name="format">
-      <xsl:value-of select="$format"/>
-    </xsl:attribute>
-
-    <xsl:attribute name="initial-page-number">
-      <xsl:value-of select="$initial-page-number"/>
-    </xsl:attribute>
-
-    <xsl:attribute name="force-page-count">
-      <xsl:value-of select="$force-page-count"/>
-    </xsl:attribute>
-
-    <xsl:attribute name="hyphenation-character">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-character'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-push-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-remain-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:apply-templates select="." mode="running.head.mode">
-      <xsl:with-param name="master-reference" select="$master-reference"/>
-      <xsl:with-param name="gentext-key" select="$gentext-key"/>
-    </xsl:apply-templates>
-
-    <xsl:apply-templates select="." mode="running.foot.mode">
-      <xsl:with-param name="master-reference" select="$master-reference"/>
-      <xsl:with-param name="gentext-key" select="$gentext-key"/>
-    </xsl:apply-templates>
-
-    <fo:flow flow-name="xsl-region-body">
-      <xsl:call-template name="set.flow.properties">
-        <xsl:with-param name="element" select="local-name(.)"/>
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-
-      <xsl:copy-of select="$content"/>
-
-    </fo:flow>
-  </fo:page-sequence>
-</xsl:template>
-
-</xsl:stylesheet>
-
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/division.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/division.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,611 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:template name="division.title">
-  <xsl:param name="node" select="."/>
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="$node"/>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:variable name="title">
-    <xsl:apply-templates select="$node" mode="object.title.markup"/>
-  </xsl:variable>
-
-  <xsl:if test="$passivetex.extensions != 0">
-    <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex"
-                    fotex-bookmark-level="1"
-                    fotex-bookmark-label="{$id}">
-      <xsl:value-of select="$title"/>
-    </fotex:bookmark>
-  </xsl:if>
-
-  <fo:block keep-with-next.within-column="always"
-            hyphenate="false">
-    <xsl:if test="$axf.extensions != 0">
-      <xsl:attribute name="axf:outline-level">
-        <xsl:choose>
-          <xsl:when test="count($node/ancestor::*) > 0">
-            <xsl:value-of select="count($node/ancestor::*)"/>
-          </xsl:when>
-          <xsl:otherwise>1</xsl:otherwise>
-        </xsl:choose>
-      </xsl:attribute>
-      <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
-      <xsl:attribute name="axf:outline-title">
-        <xsl:value-of select="normalize-space($title)"/>
-      </xsl:attribute>
-    </xsl:if>
-    <xsl:copy-of select="$title"/>
-  </fo:block>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="set">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="preamble"
-                select="*[not(self::book or self::setindex)]"/>
-
-  <xsl:variable name="content" select="book|setindex"/>
-
-  <xsl:variable name="titlepage-master-reference">
-    <xsl:call-template name="select.pagemaster">
-      <xsl:with-param name="pageclass" select="'titlepage'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="lot-master-reference">
-    <xsl:call-template name="select.pagemaster">
-      <xsl:with-param name="pageclass" select="'lot'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:if test="$preamble">
-    <fo:page-sequence hyphenate="{$hyphenate}"
-                      master-reference="{$titlepage-master-reference}">
-      <xsl:attribute name="language">
-        <xsl:call-template name="l10n.language"/>
-      </xsl:attribute>
-      <xsl:attribute name="format">
-        <xsl:call-template name="page.number.format">
-          <xsl:with-param name="master-reference" 
-                          select="$titlepage-master-reference"/>
-        </xsl:call-template>
-      </xsl:attribute>
-
-      <xsl:attribute name="initial-page-number">
-        <xsl:call-template name="initial.page.number">
-          <xsl:with-param name="master-reference" 
-                          select="$titlepage-master-reference"/>
-        </xsl:call-template>
-      </xsl:attribute>
-
-      <xsl:attribute name="force-page-count">
-        <xsl:call-template name="force.page.count">
-          <xsl:with-param name="master-reference" 
-                          select="$titlepage-master-reference"/>
-        </xsl:call-template>
-      </xsl:attribute>
-
-      <xsl:attribute name="hyphenation-character">
-        <xsl:call-template name="gentext">
-          <xsl:with-param name="key" select="'hyphenation-character'"/>
-        </xsl:call-template>
-      </xsl:attribute>
-      <xsl:attribute name="hyphenation-push-character-count">
-        <xsl:call-template name="gentext">
-          <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
-        </xsl:call-template>
-      </xsl:attribute>
-      <xsl:attribute name="hyphenation-remain-character-count">
-        <xsl:call-template name="gentext">
-          <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
-        </xsl:call-template>
-      </xsl:attribute>
-
-      <xsl:apply-templates select="." mode="running.head.mode">
-        <xsl:with-param name="master-reference" select="$titlepage-master-reference"/>
-      </xsl:apply-templates>
-
-      <xsl:apply-templates select="." mode="running.foot.mode">
-        <xsl:with-param name="master-reference" select="$titlepage-master-reference"/>
-      </xsl:apply-templates>
-
-      <fo:flow flow-name="xsl-region-body">
-        <xsl:call-template name="set.flow.properties">
-          <xsl:with-param name="element" select="local-name(.)"/>
-          <xsl:with-param name="master-reference" 
-                          select="$titlepage-master-reference"/>
-        </xsl:call-template>
-
-        <fo:block id="{$id}">
-          <xsl:call-template name="set.titlepage"/>
-        </fo:block>
-      </fo:flow>
-    </fo:page-sequence>
-  </xsl:if>
-
-  <xsl:variable name="toc.params">
-    <xsl:call-template name="find.path.params">
-      <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:if test="contains($toc.params, 'toc')">
-    <fo:page-sequence hyphenate="{$hyphenate}"
-                      master-reference="{$lot-master-reference}">
-      <xsl:attribute name="language">
-        <xsl:call-template name="l10n.language"/>
-      </xsl:attribute>
-      <xsl:attribute name="format">
-        <xsl:call-template name="page.number.format">
-          <xsl:with-param name="element" select="'toc'"/>
-          <xsl:with-param name="master-reference"
-                          select="$lot-master-reference"/>
-        </xsl:call-template>
-      </xsl:attribute>
-      <xsl:attribute name="initial-page-number">
-        <xsl:call-template name="initial.page.number">
-          <xsl:with-param name="master-reference"
-                          select="$lot-master-reference"/>
-        </xsl:call-template>
-      </xsl:attribute>
-      <xsl:attribute name="force-page-count">
-        <xsl:call-template name="force.page.count">
-          <xsl:with-param name="master-reference"
-                          select="$lot-master-reference"/>
-        </xsl:call-template>
-      </xsl:attribute>
-
-      <xsl:attribute name="hyphenation-character">
-        <xsl:call-template name="gentext">
-          <xsl:with-param name="key" select="'hyphenation-character'"/>
-        </xsl:call-template>
-      </xsl:attribute>
-      <xsl:attribute name="hyphenation-push-character-count">
-        <xsl:call-template name="gentext">
-          <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
-        </xsl:call-template>
-      </xsl:attribute>
-      <xsl:attribute name="hyphenation-remain-character-count">
-        <xsl:call-template name="gentext">
-          <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
-        </xsl:call-template>
-      </xsl:attribute>
-
-      <xsl:apply-templates select="." mode="running.head.mode">
-        <xsl:with-param name="master-reference" select="$lot-master-reference"/>
-      </xsl:apply-templates>
-
-      <xsl:apply-templates select="." mode="running.foot.mode">
-        <xsl:with-param name="master-reference" select="$lot-master-reference"/>
-      </xsl:apply-templates>
-
-      <fo:flow flow-name="xsl-region-body">
-        <xsl:call-template name="set.flow.properties">
-          <xsl:with-param name="element" select="local-name(.)"/>
-          <xsl:with-param name="master-reference" 
-                          select="$lot-master-reference"/>
-        </xsl:call-template>
-
-        <xsl:call-template name="set.toc"/>
-      </fo:flow>
-    </fo:page-sequence>
-  </xsl:if>
-
-  <xsl:apply-templates select="$content"/>
-</xsl:template>
-
-<xsl:template match="set/setinfo"></xsl:template>
-<xsl:template match="set/title"></xsl:template>
-<xsl:template match="set/subtitle"></xsl:template>
-<xsl:template match="set/titleabbrev"></xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="book">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="preamble"
-                select="title|subtitle|titleabbrev|bookinfo|info"/>
-
-  <xsl:variable name="content"
-                select="node()[not(self::title or self::subtitle
-                            or self::titleabbrev
-                            or self::info
-                            or self::bookinfo)]"/>
-
-  <xsl:variable name="titlepage-master-reference">
-    <xsl:call-template name="select.pagemaster">
-      <xsl:with-param name="pageclass" select="'titlepage'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:call-template name="front.cover"/>
-
-  <xsl:if test="$preamble">
-    <xsl:call-template name="page.sequence">
-      <xsl:with-param name="master-reference"
-                      select="$titlepage-master-reference"/>
-      <xsl:with-param name="content">
-        <fo:block id="{$id}">
-          <xsl:call-template name="book.titlepage"/>
-        </fo:block>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:if>
-
-  <xsl:apply-templates select="dedication" mode="dedication"/>
-
-  <xsl:call-template name="make.book.tocs"/>
-
-  <xsl:apply-templates select="$content"/>
-
-  <xsl:call-template name="back.cover"/>
-
-</xsl:template>
-
-<xsl:template match="book/bookinfo"></xsl:template>
-<xsl:template match="book/info"></xsl:template>
-<xsl:template match="book/title"></xsl:template>
-<xsl:template match="book/subtitle"></xsl:template>
-<xsl:template match="book/titleabbrev"></xsl:template>
-
-<!-- Placeholder templates -->
-<xsl:template name="front.cover"/>
-<xsl:template name="back.cover"/>
-
-<!-- ================================================================= -->
-<xsl:template name="make.book.tocs">
-
-  <xsl:variable name="lot-master-reference">
-    <xsl:call-template name="select.pagemaster">
-      <xsl:with-param name="pageclass" select="'lot'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="toc.params">
-    <xsl:call-template name="find.path.params">
-      <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:if test="contains($toc.params, 'toc')">
-    <xsl:call-template name="page.sequence">
-      <xsl:with-param name="master-reference"
-                      select="$lot-master-reference"/>
-      <xsl:with-param name="element" select="'toc'"/>
-      <xsl:with-param name="gentext-key" select="'TableofContents'"/>
-      <xsl:with-param name="content">
-        <xsl:call-template name="division.toc">
-          <xsl:with-param name="toc.title.p" 
-                          select="contains($toc.params, 'title')"/>
-        </xsl:call-template>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:if>
-
-  <xsl:if test="contains($toc.params,'figure') and .//figure">
-    <xsl:call-template name="page.sequence">
-      <xsl:with-param name="master-reference"
-                      select="$lot-master-reference"/>
-      <xsl:with-param name="element" select="'toc'"/>
-      <xsl:with-param name="gentext-key" select="'ListofFigures'"/>
-      <xsl:with-param name="content">
-        <xsl:call-template name="list.of.titles">
-          <xsl:with-param name="titles" select="'figure'"/>
-          <xsl:with-param name="nodes" select=".//figure"/>
-        </xsl:call-template>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:if>
-
-  <xsl:if test="contains($toc.params,'table') and .//table">
-    <xsl:call-template name="page.sequence">
-      <xsl:with-param name="master-reference"
-                      select="$lot-master-reference"/>
-      <xsl:with-param name="element" select="'toc'"/>
-      <xsl:with-param name="gentext-key" select="'ListofTables'"/>
-      <xsl:with-param name="content">
-        <xsl:call-template name="list.of.titles">
-          <xsl:with-param name="titles" select="'table'"/>
-          <xsl:with-param name="nodes" select=".//table"/>
-        </xsl:call-template>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:if>
-
-  <xsl:if test="contains($toc.params,'example') and .//example">
-    <xsl:call-template name="page.sequence">
-      <xsl:with-param name="master-reference"
-                      select="$lot-master-reference"/>
-      <xsl:with-param name="element" select="'toc'"/>
-      <xsl:with-param name="gentext-key" select="'ListofExample'"/>
-      <xsl:with-param name="content">
-        <xsl:call-template name="list.of.titles">
-          <xsl:with-param name="titles" select="'example'"/>
-          <xsl:with-param name="nodes" select=".//example"/>
-        </xsl:call-template>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:if>
-
-  <xsl:if test="contains($toc.params,'equation') and 
-                 .//equation[title or info/title]">
-    <xsl:call-template name="page.sequence">
-      <xsl:with-param name="master-reference"
-                      select="$lot-master-reference"/>
-      <xsl:with-param name="element" select="'toc'"/>
-      <xsl:with-param name="gentext-key" select="'ListofEquations'"/>
-      <xsl:with-param name="content">
-        <xsl:call-template name="list.of.titles">
-          <xsl:with-param name="titles" select="'equation'"/>
-          <xsl:with-param name="nodes" 
-                          select=".//equation[title or info/title]"/>
-        </xsl:call-template>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:if>
-
-  <xsl:if test="contains($toc.params,'procedure') and 
-                 .//procedure[title or info/title]">
-    <xsl:call-template name="page.sequence">
-      <xsl:with-param name="master-reference"
-                      select="$lot-master-reference"/>
-      <xsl:with-param name="element" select="'toc'"/>
-      <xsl:with-param name="gentext-key" select="'ListofProcedures'"/>
-      <xsl:with-param name="content">
-        <xsl:call-template name="list.of.titles">
-          <xsl:with-param name="titles" select="'procedure'"/>
-          <xsl:with-param name="nodes" 
-                          select=".//procedure[title or info/title]"/>
-        </xsl:call-template>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-<!-- ==================================================================== -->
-
-<xsl:template match="part">
-  <xsl:if test="not(partintro)">
-    <xsl:apply-templates select="." mode="part.titlepage.mode"/>
-    <xsl:call-template name="generate.part.toc"/>
-  </xsl:if>
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="part" mode="part.titlepage.mode">
-  <!-- done this way to force the context node to be the part -->
-  <xsl:param name="additional.content"/>
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="titlepage-master-reference">
-    <xsl:call-template name="select.pagemaster">
-      <xsl:with-param name="pageclass" select="'titlepage'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <fo:page-sequence hyphenate="{$hyphenate}"
-                    master-reference="{$titlepage-master-reference}">
-    <xsl:attribute name="language">
-      <xsl:call-template name="l10n.language"/>
-    </xsl:attribute>
-    <xsl:attribute name="format">
-      <xsl:call-template name="page.number.format">
-        <xsl:with-param name="master-reference" 
-                        select="$titlepage-master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="initial-page-number">
-      <xsl:call-template name="initial.page.number">
-        <xsl:with-param name="master-reference" 
-                        select="$titlepage-master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="force-page-count">
-      <xsl:call-template name="force.page.count">
-        <xsl:with-param name="master-reference" 
-                        select="$titlepage-master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="hyphenation-character">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-character'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-push-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-remain-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:apply-templates select="." mode="running.head.mode">
-      <xsl:with-param name="master-reference" select="$titlepage-master-reference"/>
-    </xsl:apply-templates>
-
-    <xsl:apply-templates select="." mode="running.foot.mode">
-      <xsl:with-param name="master-reference" select="$titlepage-master-reference"/>
-    </xsl:apply-templates>
-
-    <fo:flow flow-name="xsl-region-body">
-      <xsl:call-template name="set.flow.properties">
-        <xsl:with-param name="element" select="local-name(.)"/>
-        <xsl:with-param name="master-reference" 
-                        select="$titlepage-master-reference"/>
-      </xsl:call-template>
-
-      <fo:block id="{$id}">
-        <xsl:call-template name="part.titlepage"/>
-      </fo:block>
-      <xsl:copy-of select="$additional.content"/>
-    </fo:flow>
-  </fo:page-sequence>
-</xsl:template>
-
-<xsl:template match="part/docinfo|partinfo"></xsl:template>
-<xsl:template match="part/info"></xsl:template>
-<xsl:template match="part/title"></xsl:template>
-<xsl:template match="part/subtitle"></xsl:template>
-<xsl:template match="part/titleabbrev"></xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="generate.part.toc">
-  <xsl:param name="part" select="."/>
-
-  <xsl:variable name="lot-master-reference">
-    <xsl:call-template name="select.pagemaster">
-      <xsl:with-param name="pageclass" select="'lot'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="toc.params">
-    <xsl:call-template name="find.path.params">
-      <xsl:with-param name="node" select="$part"/>
-      <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="nodes" select="reference|
-                                     preface|
-                                     chapter|
-                                     appendix|
-                                     article|
-                                     bibliography|
-                                     glossary|
-                                     index"/>
-
-  <xsl:if test="count($nodes) &gt; 0 and contains($toc.params, 'toc')">
-    <fo:page-sequence hyphenate="{$hyphenate}"
-                      master-reference="{$lot-master-reference}">
-      <xsl:attribute name="language">
-        <xsl:call-template name="l10n.language"/>
-      </xsl:attribute>
-      <xsl:attribute name="format">
-        <xsl:call-template name="page.number.format">
-          <xsl:with-param name="element" select="'toc'"/>
-          <xsl:with-param name="master-reference" 
-                          select="$lot-master-reference"/>
-        </xsl:call-template>
-      </xsl:attribute>
-      <xsl:attribute name="initial-page-number">
-        <xsl:call-template name="initial.page.number">
-          <xsl:with-param name="element" select="'toc'"/>
-          <xsl:with-param name="master-reference" 
-                          select="$lot-master-reference"/>
-         </xsl:call-template>
-      </xsl:attribute>
-      <xsl:attribute name="force-page-count">
-        <xsl:call-template name="force.page.count">
-          <xsl:with-param name="master-reference" 
-                          select="$lot-master-reference"/>
-        </xsl:call-template>
-      </xsl:attribute>
-
-      <xsl:attribute name="hyphenation-character">
-        <xsl:call-template name="gentext">
-          <xsl:with-param name="key" select="'hyphenation-character'"/>
-        </xsl:call-template>
-      </xsl:attribute>
-      <xsl:attribute name="hyphenation-push-character-count">
-        <xsl:call-template name="gentext">
-          <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
-        </xsl:call-template>
-      </xsl:attribute>
-      <xsl:attribute name="hyphenation-remain-character-count">
-        <xsl:call-template name="gentext">
-          <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
-        </xsl:call-template>
-      </xsl:attribute>
-
-      <xsl:apply-templates select="$part" mode="running.head.mode">
-        <xsl:with-param name="master-reference" select="$lot-master-reference"/>
-      </xsl:apply-templates>
-
-      <xsl:apply-templates select="$part" mode="running.foot.mode">
-        <xsl:with-param name="master-reference" select="$lot-master-reference"/>
-      </xsl:apply-templates>
-
-      <fo:flow flow-name="xsl-region-body">
-        <xsl:call-template name="set.flow.properties">
-          <xsl:with-param name="element" select="local-name(.)"/>
-          <xsl:with-param name="master-reference" 
-                          select="$lot-master-reference"/>
-        </xsl:call-template>
-
-        <xsl:call-template name="division.toc">
-          <xsl:with-param name="toc-context" select="$part"/>
-          <xsl:with-param name="toc.title.p" 
-                          select="contains($toc.params, 'title')"/>
-        </xsl:call-template>
-
-      </fo:flow>
-    </fo:page-sequence>
-  </xsl:if>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="part/partintro">
-  <xsl:apply-templates select=".." mode="part.titlepage.mode">
-    <xsl:with-param name="additional.content">
-      <xsl:if test="title">
-        <xsl:call-template name="partintro.titlepage"/>
-      </xsl:if>
-      <xsl:apply-templates/>
-    </xsl:with-param>
-  </xsl:apply-templates>
-
-  <xsl:call-template name="generate.part.toc">
-    <xsl:with-param name="part" select=".."/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="partintro/title"></xsl:template>
-<xsl:template match="partintro/subtitle"></xsl:template>
-<xsl:template match="partintro/titleabbrev"></xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="book" mode="division.number">
-  <xsl:number from="set" count="book" format="1."/>
-</xsl:template>
-
-<xsl:template match="part" mode="division.number">
-  <xsl:number from="book" count="part" format="I."/>
-</xsl:template>
-
-</xsl:stylesheet>
-
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/docbook.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/docbook.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,331 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:exsl="http://exslt.org/common"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                xmlns:ng="http://docbook.org/docbook-ng"
-                xmlns:db="http://docbook.org/ns/docbook"
-                exclude-result-prefixes="db ng exsl"
-                version='1.0'>
-
-<!-- It is important to use indent="no" here, otherwise verbatim -->
-<!-- environments get broken by indented tags...at least when the -->
-<!-- callout extension is used...at least with some processors -->
-<xsl:output method="xml" indent="no"/>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:include href="../VERSION"/>
-<xsl:include href="param.xsl"/>
-<xsl:include href="../lib/lib.xsl"/>
-<xsl:include href="../common/l10n.xsl"/>
-<xsl:include href="../common/common.xsl"/>
-<xsl:include href="../common/utility.xsl"/>
-<xsl:include href="../common/labels.xsl"/>
-<xsl:include href="../common/titles.xsl"/>
-<xsl:include href="../common/subtitles.xsl"/>
-<xsl:include href="../common/gentext.xsl"/>
-<xsl:include href="../common/olink.xsl"/>
-<xsl:include href="../common/targets.xsl"/>
-<xsl:include href="../common/pi.xsl"/>
-<xsl:include href="autotoc.xsl"/>
-<xsl:include href="autoidx.xsl"/>
-<xsl:include href="lists.xsl"/>
-<xsl:include href="callout.xsl"/>
-<xsl:include href="verbatim.xsl"/>
-<xsl:include href="graphics.xsl"/>
-<xsl:include href="xref.xsl"/>
-<xsl:include href="formal.xsl"/>
-<xsl:include href="table.xsl"/>
-<xsl:include href="htmltbl.xsl"/>
-<xsl:include href="sections.xsl"/>
-<xsl:include href="inline.xsl"/>
-<xsl:include href="footnote.xsl"/>
-<xsl:include href="fo.xsl"/>
-<xsl:include href="fo-rtf.xsl"/>
-<xsl:include href="info.xsl"/>
-<xsl:include href="keywords.xsl"/>
-<xsl:include href="division.xsl"/>
-<xsl:include href="index.xsl"/>
-<xsl:include href="toc.xsl"/>
-<xsl:include href="refentry.xsl"/>
-<xsl:include href="math.xsl"/>
-<xsl:include href="admon.xsl"/>
-<xsl:include href="component.xsl"/>
-<xsl:include href="biblio.xsl"/>
-<xsl:include href="biblio-iso690.xsl"/>
-<xsl:include href="glossary.xsl"/>
-<xsl:include href="block.xsl"/>
-<xsl:include href="task.xsl"/>
-<xsl:include href="qandaset.xsl"/>
-<xsl:include href="synop.xsl"/>
-<xsl:include href="titlepage.xsl"/>
-<xsl:include href="titlepage.templates.xsl"/>
-<xsl:include href="pagesetup.xsl"/>
-<xsl:include href="pi.xsl"/>
-<xsl:include href="spaces.xsl"/>
-<xsl:include href="ebnf.xsl"/>
-<xsl:include href="../html/chunker.xsl"/>
-<xsl:include href="annotations.xsl"/>
-<xsl:include href="../common/stripns.xsl"/>
-
-<xsl:include href="fop.xsl"/>
-<xsl:include href="fop1.xsl"/>
-<xsl:include href="passivetex.xsl"/>
-<xsl:include href="xep.xsl"/>
-<xsl:include href="axf.xsl"/>
-<xsl:include href="ptc.xsl"/>
-
-<xsl:param name="stylesheet.result.type" select="'fo'"/>
-
-<!-- ==================================================================== -->
-
-<xsl:key name="id" match="*" use="@id|@xml:id"/>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="*">
-  <xsl:message>
-    <xsl:value-of select="name(.)"/>
-    <xsl:text> encountered</xsl:text>
-    <xsl:if test="parent::*">
-      <xsl:text> in </xsl:text>
-      <xsl:value-of select="name(parent::*)"/>
-    </xsl:if>
-    <xsl:text>, but no template matches.</xsl:text>
-  </xsl:message>
-  <fo:block color="red">
-    <xsl:text>&lt;</xsl:text>
-    <xsl:value-of select="name(.)"/>
-    <xsl:text>&gt;</xsl:text>
-    <xsl:apply-templates/> 
-    <xsl:text>&lt;/</xsl:text>
-    <xsl:value-of select="name(.)"/>
-    <xsl:text>&gt;</xsl:text>
-  </fo:block>
-</xsl:template>
-
-<!-- Update this list if new root elements supported -->
-<xsl:variable name="root.elements" select="' appendix article bibliography book chapter colophon dedication glossary index part preface qandaset refentry reference sect1 section set setindex '"/>
-
-<xsl:template match="/">
-  <!-- * Get a title for current doc so that we let the user -->
-  <!-- * know what document we are processing at this point. -->
-  <xsl:variable name="doc.title">
-    <xsl:call-template name="get.doc.title"/>
-  </xsl:variable>
-  <xsl:choose>
-    <!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document,
-         toss the namespace and continue.  Use the docbook5 namespaced
-         stylesheets for DocBook5 if you don't want to use this feature.-->
-    <!-- include extra test for Xalan quirk -->
-    <xsl:when test="(function-available('exsl:node-set') or
-                     contains(system-property('xsl:vendor'),
-                       'Apache Software Foundation'))
-                    and (*/self::ng:* or */self::db:*)">
-      <xsl:call-template name="log.message">
-        <xsl:with-param name="level">Note</xsl:with-param>
-        <xsl:with-param name="source" select="$doc.title"/>
-        <xsl:with-param name="context-desc">
-          <xsl:text>namesp. cut</xsl:text>
-        </xsl:with-param>
-        <xsl:with-param name="message">
-          <xsl:text>stripped namespace before processing</xsl:text>
-        </xsl:with-param>
-      </xsl:call-template>
-      <xsl:variable name="nons">
-        <xsl:apply-templates mode="stripNS"/>
-      </xsl:variable>
-      <xsl:call-template name="log.message">
-        <xsl:with-param name="level">Note</xsl:with-param>
-        <xsl:with-param name="source" select="$doc.title"/>
-        <xsl:with-param name="context-desc">
-          <xsl:text>namesp. cut</xsl:text>
-        </xsl:with-param>
-        <xsl:with-param name="message">
-          <xsl:text>processing stripped document</xsl:text>
-        </xsl:with-param>
-      </xsl:call-template>
-      <xsl:apply-templates select="exsl:node-set($nons)"/>
-    </xsl:when>
-    <!-- Can't process unless namespace removed -->
-    <xsl:when test="*/self::ng:* or */self::db:*">
-      <xsl:message terminate="yes">
-        <xsl:text>Unable to strip the namespace from DB5 document,</xsl:text>
-        <xsl:text> cannot proceed.</xsl:text>
-      </xsl:message>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="$rootid != ''">
-          <xsl:variable name="root.element" select="key('id', $rootid)"/>
-          <xsl:choose>
-            <xsl:when test="count($root.element) = 0">
-              <xsl:message terminate="yes">
-                <xsl:text>ID '</xsl:text>
-                <xsl:value-of select="$rootid"/>
-                <xsl:text>' not found in document.</xsl:text>
-              </xsl:message>
-            </xsl:when>
-            <xsl:when test="not(contains($root.elements, concat(' ', local-name($root.element), ' ')))">
-              <xsl:message terminate="yes">
-                <xsl:text>ERROR: Document root element ($rootid=</xsl:text>
-                <xsl:value-of select="$rootid"/>
-                <xsl:text>) for FO output </xsl:text>
-                <xsl:text>must be one of the following elements:</xsl:text>
-                <xsl:value-of select="$root.elements"/>
-              </xsl:message>
-            </xsl:when>
-            <!-- Otherwise proceed -->
-            <xsl:otherwise>
-              <xsl:if test="$collect.xref.targets = 'yes' or
-                            $collect.xref.targets = 'only'">
-                <xsl:apply-templates select="$root.element"
-                                     mode="collect.targets"/>
-              </xsl:if>
-              <xsl:if test="$collect.xref.targets != 'only'">
-                <xsl:apply-templates select="$root.element"
-                                     mode="process.root"/>
-              </xsl:if>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-        <!-- Otherwise process the document root element -->
-        <xsl:otherwise>
-          <xsl:variable name="document.element" select="*[1]"/>
-          <xsl:choose>
-            <xsl:when test="not(contains($root.elements,
-                     concat(' ', local-name($document.element), ' ')))">
-              <xsl:message terminate="yes">
-                <xsl:text>ERROR: Document root element for FO output </xsl:text>
-                <xsl:text>must be one of the following elements:</xsl:text>
-                <xsl:value-of select="$root.elements"/>
-              </xsl:message>
-            </xsl:when>
-            <!-- Otherwise proceed -->
-            <xsl:otherwise>
-              <xsl:if test="$collect.xref.targets = 'yes' or
-                            $collect.xref.targets = 'only'">
-                <xsl:apply-templates select="/"
-                                     mode="collect.targets"/>
-              </xsl:if>
-              <xsl:if test="$collect.xref.targets != 'only'">
-                <xsl:apply-templates select="/"
-                                     mode="process.root"/>
-              </xsl:if>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="*" mode="process.root">
-  <xsl:variable name="document.element" select="self::*"/>
-
-  <xsl:call-template name="root.messages"/>
-
-  <xsl:variable name="title">
-    <xsl:choose>
-      <xsl:when test="$document.element/title[1]">
-        <xsl:value-of select="$document.element/title[1]"/>
-      </xsl:when>
-      <xsl:otherwise>[could not find document title]</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-  
-  <!-- Include all id values in XEP output -->
-  <xsl:if test="$xep.extensions != 0">
-    <xsl:processing-instruction 
-     name="xep-pdf-drop-unused-destinations">false</xsl:processing-instruction>
-  </xsl:if>
-
-  <fo:root xsl:use-attribute-sets="root.properties">
-    <xsl:attribute name="language">
-      <xsl:call-template name="l10n.language">
-        <xsl:with-param name="target" select="/*[1]"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:if test="$xep.extensions != 0">
-      <xsl:call-template name="xep-pis"/>
-      <xsl:call-template name="xep-document-information"/>
-    </xsl:if>
-    <xsl:if test="$axf.extensions != 0">
-      <xsl:call-template name="axf-document-information"/>
-    </xsl:if>
-
-    <xsl:call-template name="setup.pagemasters"/>
-
-    <xsl:if test="$fop.extensions != 0">
-      <xsl:apply-templates select="$document.element" mode="fop.outline"/>
-    </xsl:if>
-
-    <xsl:if test="$fop1.extensions != 0">
-      <xsl:variable name="bookmarks">
-        <xsl:apply-templates select="$document.element" 
-                             mode="fop1.outline"/>
-      </xsl:variable>
-      <xsl:if test="string($bookmarks) != ''">
-        <fo:bookmark-tree>
-          <xsl:copy-of select="$bookmarks"/>
-        </fo:bookmark-tree>
-      </xsl:if>
-    </xsl:if>
-
-    <xsl:if test="$xep.extensions != 0">
-      <xsl:variable name="bookmarks">
-        <xsl:apply-templates select="$document.element" mode="xep.outline"/>
-      </xsl:variable>
-      <xsl:if test="string($bookmarks) != ''">
-        <rx:outline xmlns:rx="http://www.renderx.com/XSL/Extensions">
-          <xsl:copy-of select="$bookmarks"/>
-        </rx:outline>
-      </xsl:if>
-    </xsl:if>
-
-    <xsl:if test="$arbortext.extensions != 0 and $ati.xsl11.bookmarks != 0">
-      <xsl:variable name="bookmarks">
-        <xsl:apply-templates select="$document.element"
-                             mode="ati.xsl11.bookmarks"/>
-      </xsl:variable>
-      <xsl:if test="string($bookmarks) != ''">
-        <fo:bookmark-tree>
-          <xsl:copy-of select="$bookmarks"/>
-        </fo:bookmark-tree>
-      </xsl:if>
-    </xsl:if>
-
-    <xsl:apply-templates select="$document.element"/>
-  </fo:root>
-</xsl:template>
-
-<xsl:template name="root.messages">
-  <!-- redefine this any way you'd like to output messages -->
-  <!-- DO NOT OUTPUT ANYTHING FROM THIS TEMPLATE -->
-  <xsl:message>
-    <xsl:text>Making </xsl:text>
-    <xsl:value-of select="$page.orientation"/>
-    <xsl:text> pages on </xsl:text>
-    <xsl:value-of select="$paper.type"/>
-    <xsl:text> paper (</xsl:text>
-    <xsl:value-of select="$page.width"/>
-    <xsl:text>x</xsl:text>
-    <xsl:value-of select="$page.height"/>
-    <xsl:text>)</xsl:text>
-  </xsl:message>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/ebnf.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/ebnf.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,325 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
-                exclude-result-prefixes="doc"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<doc:reference xmlns="">
-<referenceinfo>
-<releaseinfo role="meta">
-$Id$
-</releaseinfo>
-<author><surname>Walsh</surname>
-<firstname>Norman</firstname></author>
-<copyright><year>1999</year><year>2000</year><year>2001</year>
-<holder>Norman Walsh</holder>
-</copyright>
-</referenceinfo>
-<title>HTML EBNF Reference</title>
-
-<partintro>
-<section><title>Introduction</title>
-
-<para>This is technical reference documentation for the DocBook XSL
-Stylesheets; it documents (some of) the parameters, templates, and
-other elements of the stylesheets.</para>
-
-<para>This reference describes the templates and parameters relevant
-to formatting EBNF markup.</para>
-
-<para>This is not intended to be <quote>user</quote> documentation.
-It is provided for developers writing customization layers for the
-stylesheets, and for anyone who's interested in <quote>how it
-works</quote>.</para>
-
-<para>Although I am trying to be thorough, this documentation is known
-to be incomplete. Don't forget to read the source, too :-)</para>
-</section>
-</partintro>
-</doc:reference>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="productionset">
-  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="title">
-      <fo:block id="{$id}" xsl:use-attribute-sets="formal.object.properties">
-        <xsl:call-template name="formal.object.heading">
-          <xsl:with-param name="placement" select="'before'"/>
-        </xsl:call-template>
-
-        <fo:table table-layout="fixed" width="100%">
-          <fo:table-column column-number="1" column-width="3%"/>
-          <fo:table-column column-number="2" column-width="15%"/>
-          <fo:table-column column-number="3" column-width="5%"/>
-          <fo:table-column column-number="4" column-width="52%"/>
-          <fo:table-column column-number="5" column-width="25%"/>
-          <fo:table-body start-indent="0pt" end-indent="0pt">
-            <xsl:apply-templates select="production|productionrecap"/>
-          </fo:table-body>
-        </fo:table>
-      </fo:block>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:table id="{$id}" table-layout="fixed" width="100%">
-        <fo:table-column column-number="1" column-width="3%"/>
-        <fo:table-column column-number="2" column-width="15%"/>
-        <fo:table-column column-number="3" column-width="5%"/>
-        <fo:table-column column-number="4" column-width="52%"/>
-        <fo:table-column column-number="5" column-width="25%"/>
-        <fo:table-body start-indent="0pt" end-indent="0pt">
-          <xsl:apply-templates select="production|productionrecap"/>
-        </fo:table-body>
-      </fo:table>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="productionset/title">
-  <!-- suppressed -->
-</xsl:template>
-
-<xsl:template match="production">
-  <xsl:param name="recap" select="false()"/>
-  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
-  <fo:table-row>
-    <fo:table-cell>
-      <fo:block text-align="start">
-        <xsl:text>[</xsl:text>
-        <xsl:number count="production" level="any"/>
-        <xsl:text>]</xsl:text>
-      </fo:block>
-    </fo:table-cell>
-    <fo:table-cell>
-      <fo:block text-align="end">
-        <xsl:choose>
-          <xsl:when test="$recap">
-            <fo:basic-link internal-destination="{$id}"
-                           xsl:use-attribute-sets="xref.properties">
-              <xsl:apply-templates select="lhs"/>
-            </fo:basic-link>
-          </xsl:when>
-          <xsl:otherwise>
-            <fo:wrapper id="{$id}">
-              <xsl:apply-templates select="lhs"/>
-            </fo:wrapper>
-          </xsl:otherwise>
-        </xsl:choose>
-      </fo:block>
-    </fo:table-cell>
-    <fo:table-cell>
-      <fo:block text-align="center">
-        <xsl:copy-of select="$ebnf.assignment"/>
-      </fo:block>
-    </fo:table-cell>
-    <fo:table-cell>
-      <fo:block>
-        <xsl:apply-templates select="rhs"/>
-        <xsl:copy-of select="$ebnf.statement.terminator"/>
-      </fo:block>
-    </fo:table-cell>
-    <fo:table-cell border-start-width="3pt">
-      <fo:block text-align="start">
-        <xsl:choose>
-          <xsl:when test="rhs/lineannotation|constraint">
-            <xsl:apply-templates select="rhs/lineannotation" mode="rhslo"/>
-            <xsl:apply-templates select="constraint"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:text>&#160;</xsl:text>
-          </xsl:otherwise>
-        </xsl:choose>
-      </fo:block>
-    </fo:table-cell>
-  </fo:table-row>
-</xsl:template>
-
-<xsl:template match="productionrecap">
-  <xsl:variable name="targets" select="key('id',@linkend)"/>
-  <xsl:variable name="target" select="$targets[1]"/>
-
-  <xsl:if test="count($targets)=0">
-    <xsl:message>
-      <xsl:text>Error: no ID for productionrecap linkend: </xsl:text>
-      <xsl:value-of select="@linkend"/>
-      <xsl:text>.</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:if test="count($targets)>1">
-    <xsl:message>
-      <xsl:text>Warning: multiple "IDs" for productionrecap linkend: </xsl:text>
-      <xsl:value-of select="@linkend"/>
-      <xsl:text>.</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:apply-templates select="$target">
-    <xsl:with-param name="recap" select="true()"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="lhs">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="rhs">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="nonterminal">
-  <xsl:variable name="linkend">
-    <xsl:call-template name="xpointer.idref">
-      <xsl:with-param name="xpointer" select="@def"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:call-template name="check.id.unique">
-    <xsl:with-param name="linkend" select="$linkend"/>
-  </xsl:call-template>
-
-  <xsl:call-template name="check.idref.targets">
-    <xsl:with-param name="linkend" select="$linkend"/>
-    <xsl:with-param name="element-list">production</xsl:with-param>
-  </xsl:call-template>
-
-  <!-- If you don't provide content, you can't point outside this doc. -->
-  <xsl:choose>
-    <xsl:when test="*|text()"><!--nop--></xsl:when>
-    <xsl:otherwise>
-      <xsl:if test="$linkend = ''">
-	<xsl:message>
-	  <xsl:text>Non-terminals with no content must point to </xsl:text>
-	  <xsl:text>production elements in the current document.</xsl:text>
-	</xsl:message>
-	<xsl:message>
-	  <xsl:text>Invalid xpointer for empty nt: </xsl:text>
-	  <xsl:value-of select="@def"/>
-	</xsl:message>
-      </xsl:if>
-    </xsl:otherwise>
-  </xsl:choose>
-
-  <xsl:variable name="href">
-    <xsl:choose>
-      <xsl:when test="$linkend != ''">
-	<xsl:variable name="targets" select="key('id',$linkend)"/>
-	<xsl:variable name="target" select="$targets[1]"/>
-        <xsl:call-template name="object.id">
-          <xsl:with-param name="object" select="$target"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-	<xsl:value-of select="@def"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <fo:basic-link internal-destination="{$href}"
-                 xsl:use-attribute-sets="xref.properties">
-    <xsl:choose>
-      <xsl:when test="*|text()">
-        <xsl:apply-templates/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:choose>
-          <xsl:when test="$linkend != ''">
-            <xsl:variable name="targets" select="key('id',$linkend)"/>
-            <xsl:variable name="target" select="$targets[1]"/>
-            <xsl:apply-templates select="$target/lhs"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:text>???</xsl:text>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:otherwise>
-    </xsl:choose>
-  </fo:basic-link>
-</xsl:template>
-
-<xsl:template match="rhs/lineannotation">
-  <!--nop-->
-</xsl:template>
-
-<xsl:template match="rhs/lineannotation" mode="rhslo">
-  <xsl:text>/*&#160;</xsl:text>
-  <xsl:apply-templates/>
-  <xsl:text>&#160;*/</xsl:text>
-</xsl:template>
-
-<xsl:template match="constraint">
-  <xsl:call-template name="check.id.unique">
-    <xsl:with-param name="linkend" select="@linkend"/>
-  </xsl:call-template>
-
-  <xsl:call-template name="check.idref.targets">
-    <xsl:with-param name="linkend" select="@linkend"/>
-    <xsl:with-param name="element-list">constraintdef</xsl:with-param>
-  </xsl:call-template>
-
-  <xsl:variable name="href">
-    <xsl:variable name="targets" select="key('id',@linkend)"/>
-    <xsl:variable name="target" select="$targets[1]"/>
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="$target"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:if test="preceding-sibling::constraint">
-    <fo:inline linefeed-treatment="preserve">&#xA;</fo:inline>
-  </xsl:if>
-  <xsl:text>[&#160;</xsl:text>
-
-  <xsl:choose>
-    <xsl:when test="@role">
-      <xsl:value-of select="@role"/>
-      <xsl:text>: </xsl:text>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:variable name="targets" select="key('id',@linkend)"/>
-      <xsl:variable name="target" select="$targets[1]"/>
-      <xsl:if test="$target/@role">
-	<xsl:value-of select="$target/@role"/>
-	<xsl:text>: </xsl:text>
-      </xsl:if>
-    </xsl:otherwise>
-  </xsl:choose>
-
-  <fo:basic-link internal-destination="{$href}"
-                 xsl:use-attribute-sets="xref.properties">
-    <xsl:variable name="targets" select="key('id',@linkend)"/>
-    <xsl:variable name="target" select="$targets[1]"/>
-    <xsl:apply-templates select="$target" mode="title.markup"/>
-  </fo:basic-link>
-  <xsl:text>&#160;]</xsl:text>
-</xsl:template>
-
-<xsl:template match="constraintdef">
-  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
-  <fo:block id="{$id}">
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="constraintdef/title">
-  <fo:block font-weight="bold">
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/fo-rtf.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/fo-rtf.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,154 +1,0 @@
-<?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                xmlns:exsl="http://exslt.org/common"
-                xmlns:set="http://exslt.org/sets"
-                exclude-result-prefixes="exsl set"
-                version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the DocBook XSL Stylesheet distribution.
-     See ../README or http://docbook.sf.net/ for copyright
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- This module contains templates that match against FO nodes. It is used
-     to post-process result tree fragments for some sorts of cleanup.
-     These templates can only ever be fired by a processor that supports
-     exslt:node-set(). -->
-
-<!-- ==================================================================== -->
-
-<!-- insert.fo.fnum mode templates insert a particular RTF at the beginning
-     of the first paragraph in the primary RTF. In fact, they are inserting
-     a footnote-number, so we tinker a few other things too, like spacing and
-     font-sizes. -->
-
-<xsl:template match="/" mode="insert.fo.fnum">
-  <xsl:param name="mark" select="'?'"/>
-  <xsl:apply-templates mode="insert.fo.fnum">
-    <xsl:with-param name="mark" select="$mark"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="*" mode="insert.fo.fnum">
-  <xsl:param name="mark" select="'?'"/>
-  <xsl:copy>
-    <xsl:copy-of select="@*"/>
-    <xsl:apply-templates mode="insert.fo.fnum">
-      <xsl:with-param name="mark" select="$mark"/>
-    </xsl:apply-templates>
-  </xsl:copy>
-</xsl:template>
-
-<xsl:template match="fo:block" mode="insert.fo.fnum">
-  <xsl:param name="mark" select="'?'"/>
-  <xsl:copy>
-    <xsl:for-each select="@*">
-      <xsl:choose>
-        <xsl:when test="starts-with(name(.), 'space-before')"/>
-        <xsl:when test="starts-with(name(.), 'space-after')"/>
-        <xsl:when test="starts-with(name(.), 'font-size')"/>
-        <xsl:otherwise>
-          <xsl:copy-of select="."/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:for-each>
-    <xsl:if test="not(preceding::fo:block)">
-      <xsl:copy-of select="$mark"/>
-    </xsl:if>
-    <xsl:apply-templates mode="insert.fo.fnum">
-      <xsl:with-param name="mark" select="$mark"/>
-    </xsl:apply-templates>
-  </xsl:copy>
-</xsl:template>
-
-<xsl:template match="text()|processing-instruction()|comment()" mode="insert.fo.fnum">
-  <xsl:param name="mark" select="'?'"/>
-  <xsl:copy/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<!-- insert.fo.block mode templates insert a particular RTF at the beginning
-     of the first paragraph in the primary RTF. -->
-
-<xsl:template match="/" mode="insert.fo.block">
-  <xsl:param name="mark" select="'?'"/>
-  <xsl:apply-templates mode="insert.fo.block">
-    <xsl:with-param name="mark" select="$mark"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="*" mode="insert.fo.block">
-  <xsl:param name="mark" select="'?'"/>
-  <xsl:copy>
-    <xsl:copy-of select="@*"/>
-    <xsl:apply-templates mode="insert.fo.block">
-      <xsl:with-param name="mark" select="$mark"/>
-    </xsl:apply-templates>
-  </xsl:copy>
-</xsl:template>
-
-<xsl:template match="fo:block" mode="insert.fo.block">
-  <xsl:param name="mark" select="'?'"/>
-  <xsl:copy>
-    <xsl:copy-of select="@*"/>
-    <xsl:if test="not(preceding::fo:block)">
-      <xsl:copy-of select="$mark"/>
-    </xsl:if>
-    <xsl:apply-templates mode="insert.fo.block">
-      <xsl:with-param name="mark" select="$mark"/>
-    </xsl:apply-templates>
-  </xsl:copy>
-</xsl:template>
-
-<xsl:template match="text()|processing-instruction()|comment()" mode="insert.fo.block">
-  <xsl:param name="mark" select="'?'"/>
-  <xsl:copy/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<!-- insert.fo.text mode templates insert a particular RTF at the beginning
-     of the first text-node in the primary RTF. -->
-
-<xsl:template match="/" mode="insert.fo.text">
-  <xsl:param name="mark" select="'?'"/>
-  <xsl:apply-templates mode="insert.fo.text">
-    <xsl:with-param name="mark" select="$mark"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="*" mode="insert.fo.text">
-  <xsl:param name="mark" select="'?'"/>
-  <xsl:copy>
-    <xsl:copy-of select="@*"/>
-    <xsl:apply-templates mode="insert.fo.text">
-      <xsl:with-param name="mark" select="$mark"/>
-    </xsl:apply-templates>
-  </xsl:copy>
-</xsl:template>
-
-<xsl:template match="text()|processing-instruction()|comment()" mode="insert.fo.text">
-  <xsl:param name="mark" select="'?'"/>
-
-  <xsl:if test="not(preceding::text())">
-    <xsl:copy-of select="$mark"/>
-  </xsl:if>
-
-  <xsl:copy/>
-</xsl:template>
-
-<xsl:template match="processing-instruction()|comment()" mode="insert.fo.text">
-  <xsl:param name="mark" select="'?'"/>
-  <xsl:copy/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/fo.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/fo.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,71 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<xsl:template name="anchor">
-  <xsl:param name="node" select="."/>
-  <xsl:param name="conditional" select="1"/>
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="$node"/>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:if test="$conditional = 0 or $node/@id or $node/@xml:id">
-    <xsl:attribute name="id"><xsl:value-of select="$id"/></xsl:attribute>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="dingbat">
-  <xsl:param name="dingbat">bullet</xsl:param>
-  <xsl:variable name="symbol">
-    <xsl:choose>
-      <xsl:when test="$dingbat='bullet'">o</xsl:when>
-      <xsl:when test="$dingbat='copyright'">&#x00A9;</xsl:when>
-      <xsl:when test="$dingbat='trademark'">&#x2122;</xsl:when>
-      <xsl:when test="$dingbat='trade'">&#x2122;</xsl:when>
-      <xsl:when test="$dingbat='registered'">&#x00AE;</xsl:when>
-      <xsl:when test="$dingbat='service'">(SM)</xsl:when>
-      <xsl:when test="$dingbat='ldquo'">"</xsl:when>
-      <xsl:when test="$dingbat='rdquo'">"</xsl:when>
-      <xsl:when test="$dingbat='lsquo'">'</xsl:when>
-      <xsl:when test="$dingbat='rsquo'">'</xsl:when>
-      <xsl:when test="$dingbat='em-dash'">&#x2014;</xsl:when>
-      <xsl:when test="$dingbat='en-dash'">-</xsl:when>
-      <xsl:otherwise>o</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$dingbat.font.family = ''">
-      <xsl:copy-of select="$symbol"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:inline font-family="{$dingbat.font.family}">
-        <xsl:copy-of select="$symbol"/>
-      </fo:inline>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="href.target">
-  <xsl:param name="context" select="."/>
-  <xsl:param name="object" select="."/>
-  <xsl:text>#</xsl:text>
-  <xsl:call-template name="object.id">
-    <xsl:with-param name="object" select="$object"/>
-  </xsl:call-template>
-</xsl:template>
-
-</xsl:stylesheet>
-
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/footnote.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/footnote.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,186 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                xmlns:exsl="http://exslt.org/common"
-                exclude-result-prefixes="exsl"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<xsl:template name="format.footnote.mark">
-  <xsl:param name="mark" select="'?'"/>
-  <fo:inline xsl:use-attribute-sets="footnote.mark.properties">
-    <xsl:choose>
-      <xsl:when test="$fop.extensions != 0">
-        <xsl:attribute name="vertical-align">super</xsl:attribute>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:attribute name="baseline-shift">super</xsl:attribute>
-      </xsl:otherwise>
-    </xsl:choose>
-    <xsl:copy-of select="$mark"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="footnote">
-  <xsl:choose>
-    <xsl:when test="ancestor::table or ancestor::informaltable">
-      <xsl:call-template name="format.footnote.mark">
-        <xsl:with-param name="mark">
-          <xsl:apply-templates select="." mode="footnote.number"/>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:footnote>
-        <fo:inline>
-          <xsl:call-template name="format.footnote.mark">
-            <xsl:with-param name="mark">
-              <xsl:apply-templates select="." mode="footnote.number"/>
-            </xsl:with-param>
-          </xsl:call-template>
-        </fo:inline>
-        <fo:footnote-body xsl:use-attribute-sets="footnote.properties">
-          <xsl:apply-templates/>
-        </fo:footnote-body>
-      </fo:footnote>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="footnoteref">
-  <xsl:variable name="footnote" select="key('id',@linkend)"/>
-  <xsl:call-template name="format.footnote.mark">
-    <xsl:with-param name="mark">
-      <xsl:apply-templates select="$footnote" mode="footnote.number"/>
-    </xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="footnote" mode="footnote.number">
-  <xsl:choose>
-    <xsl:when test="string-length(@label) != 0">
-      <xsl:value-of select="@label"/>
-    </xsl:when>
-    <xsl:when test="ancestor::table or ancestor::informaltable">
-      <xsl:variable name="tfnum">
-        <xsl:number level="any" from="table|informaltable" format="1"/>
-      </xsl:variable>
-
-      <xsl:choose>
-        <xsl:when test="string-length($table.footnote.number.symbols) &gt;= $tfnum">
-          <xsl:value-of select="substring($table.footnote.number.symbols, $tfnum, 1)"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:number level="any" from="table|informaltable"
-                      format="{$table.footnote.number.format}"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:variable name="fnum">
-        <!-- FIXME: list in @from is probably not complete -->
-        <xsl:number level="any" 
-                    from="chapter|appendix|preface|article|refentry|bibliography" 
-                    count="footnote[not(@label)][not(ancestor::table) and not(ancestor::informaltable)]|ulink[$ulink.footnotes != 0][node()][@url != .][not(ancestor::footnote)][$ulink.show != 0]" 
-                    format="1"/>
-      </xsl:variable>
-      <xsl:choose>
-        <xsl:when test="string-length($footnote.number.symbols) &gt;= $fnum">
-          <xsl:value-of select="substring($footnote.number.symbols, $fnum, 1)"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:number value="$fnum" format="{$footnote.number.format}"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="*" mode="footnote.body.number">
-  <xsl:variable name="footnote.mark">
-    <xsl:call-template name="format.footnote.mark">
-      <xsl:with-param name="mark">
-        <xsl:apply-templates select="ancestor::footnote" mode="footnote.number"/>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="fo">
-    <xsl:apply-templates select="."/>
-  </xsl:variable>
-
-  <xsl:variable name="fo-nodes" select="exsl:node-set($fo)"/>
-
-  <xsl:choose>
-    <xsl:when test="$fo-nodes//fo:block">
-      <xsl:apply-templates select="$fo-nodes" mode="insert.fo.fnum">
-        <xsl:with-param name="mark" select="$footnote.mark"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates select="$fo-nodes" mode="insert.fo.text">
-        <xsl:with-param name="mark" select="$footnote.mark"/>
-      </xsl:apply-templates>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="footnote/para[1]
-                     |footnote/simpara[1]
-                     |footnote/formalpara[1]"
-              priority="2">
-  <!-- this only works if the first thing in a footnote is a para, -->
-  <!-- which is ok, because it usually is. -->
-  <fo:block>
-    <xsl:call-template name="format.footnote.mark">
-      <xsl:with-param name="mark">
-        <xsl:apply-templates select="ancestor::footnote" mode="footnote.number"/>
-      </xsl:with-param>
-    </xsl:call-template>
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="footnote" mode="table.footnote.mode">
-  <xsl:choose>
-    <xsl:when test="local-name(*[1]) = 'para' or local-name(*[1]) = 'simpara'">
-      <fo:block xsl:use-attribute-sets="table.footnote.properties">
-        <xsl:apply-templates/>
-      </fo:block>
-    </xsl:when>
-
-    <xsl:when test="function-available('exsl:node-set')">
-      <fo:block xsl:use-attribute-sets="table.footnote.properties">
-        <xsl:apply-templates select="*[1]" mode="footnote.body.number"/>
-        <xsl:apply-templates select="*[position() &gt; 1]"/>
-      </fo:block>
-    </xsl:when>
-
-    <xsl:otherwise>
-      <xsl:message>
-        <xsl:text>Warning: footnote number may not be generated </xsl:text>
-        <xsl:text>correctly; </xsl:text>
-        <xsl:value-of select="local-name(*[1])"/>
-        <xsl:text> unexpected as first child of footnote.</xsl:text>
-      </xsl:message>
-      <fo:block xsl:use-attribute-sets="table.footnote.properties">
-        <xsl:apply-templates/>
-      </fo:block>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/fop.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/fop.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,92 +1,0 @@
-<?xml version='1.0' encoding="utf-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                xmlns:fox="http://xml.apache.org/fop/extensions"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-     (c) Stephane Bline Peregrine Systems 2001
-     Driver file to allow pdf bookmarking (based on fop implementation).
-     ******************************************************************** -->
-<!--
-In PDF bookmarks can't be used characters with code>255. This version of file
-translates characters with code>255 back to ASCII.
-
-   Pavel Zampach (zampach@volny.cz)
--->
-
-<xsl:variable name="a-dia" select=
-"'&#257;&#259;&#261;&#263;&#265;&#267;&#269;&#271;&#273;&#275;&#277;&#279;&#281;&#283;&#339;&#285;&#287;&#289;&#291;&#293;&#295;&#297;&#299;&#301;&#303;&#305;&#309;&#311;&#314;&#316;&#318;&#320;&#322;&#324;&#326;&#328;&#331;&#333;&#335;&#337;&#341;&#343;&#345;&#347;&#349;&#351;&#353;&#355;&#357;&#359;&#361;&#363;&#365;&#367;&#369;&#371;&#373;&#375;&#378;&#380;&#382;&#256;&#258;&#260;&#262;&#264;&#266;&#268;&#270;&#272;&#274;&#276;&#278;&#280;&#282;&#338;&#284;&#286;&#288;&#290;&#292;&#294;&#296;&#298;&#300;&#302;&#304;&#308;&#310;&#313;&#315;&#317;&#319;&#321;&#323;&#325;&#327;&#330;&#332;&#334;&#336;&#340;&#342;&#344;&#346;&#348;&#350;&#352;&#354;&#356;&#358;&#360;&#362;&#364;&#366;&#368;&#370;&#372;&#374;&#376;&#377;&#379;&#381;'"/>
-<xsl:variable name="a-asc" select=
-"'aaaccccddeeeeeegggghhiiiiijklllllnnnnooorrrsssstttuuuuuuwyzzzAAACCCCDDEEEEEEGGGGHHIIIIIJKLLLLLNNNNOOORRRSSSSTTTUUUUUUWYYZZZ'"/>
-
-<xsl:template match="*" mode="fop.outline">
-  <xsl:variable name="id">
-    <xsl:value-of select="(@id|@xml:id)[1]"/>
-  </xsl:variable>
-  <xsl:if test="$id != ''">
-    <fox:destination internal-destination="{$id}"/>
-  </xsl:if>
-  <xsl:apply-templates select="*" mode="fop.outline"/>
-</xsl:template>
-
-<xsl:template match="set|book|part|reference|preface|chapter|appendix|article
-                     |glossary|bibliography|index|setindex
-                     |refentry
-                     |sect1|sect2|sect3|sect4|sect5|section"
-              mode="fop.outline">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-  <xsl:variable name="bookmark-label">
-    <xsl:apply-templates select="." mode="object.title.markup"/>
-  </xsl:variable>
-
-  <!-- Put the root element bookmark at the same level as its children -->
-  <!-- If the object is a set or book, generate a bookmark for the toc -->
-
-  <xsl:choose>
-    <xsl:when test="parent::*">
-      <fox:outline internal-destination="{$id}">
-        <fox:label>
-          <xsl:value-of select="normalize-space(translate($bookmark-label, $a-dia, $a-asc))"/>
-        </fox:label>
-        <xsl:apply-templates select="*" mode="fop.outline"/>
-      </fox:outline>
-    </xsl:when>
-    <xsl:otherwise>
-      <fox:outline internal-destination="{$id}">
-        <fox:label>
-          <xsl:value-of select="normalize-space(translate($bookmark-label, $a-dia, $a-asc))"/>
-        </fox:label>
-      </fox:outline>
-
-      <xsl:variable name="toc.params">
-        <xsl:call-template name="find.path.params">
-          <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <xsl:if test="contains($toc.params, 'toc')
-                    and (book|part|reference|preface|chapter|appendix|article
-                         |glossary|bibliography|index|setindex
-                         |refentry
-                         |sect1|sect2|sect3|sect4|sect5|section)">
-        <fox:outline internal-destination="toc...{$id}">
-          <fox:label>
-            <xsl:call-template name="gentext">
-              <xsl:with-param name="key" select="'TableofContents'"/>
-            </xsl:call-template>
-          </fox:label>
-        </fox:outline>
-      </xsl:if>
-      <xsl:apply-templates select="*" mode="fop.outline"/>
-    </xsl:otherwise>
-  </xsl:choose>
-  <fox:destination internal-destination="{$id}"/>
-</xsl:template>
-
-</xsl:stylesheet>
-
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/fop1.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/fop1.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,71 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                version='1.0'>
-
-<xsl:template match="*" mode="fop1.outline">
-  <xsl:apply-templates select="*" mode="fop1.outline"/>
-</xsl:template>
-
-<xsl:template match="set|book|part|reference|
-                     preface|chapter|appendix|article
-                     |glossary|bibliography|index|setindex
-                     |refentry
-                     |sect1|sect2|sect3|sect4|sect5|section"
-              mode="fop1.outline">
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-  <xsl:variable name="bookmark-label">
-    <xsl:apply-templates select="." mode="object.title.markup"/>
-  </xsl:variable>
-
-  <!-- Put the root element bookmark at the same level as its children -->
-  <!-- If the object is a set or book, generate a bookmark for the toc -->
-
-  <xsl:choose>
-    <xsl:when test="parent::*">
-      <fo:bookmark internal-destination="{$id}">
-        <fo:bookmark-title>
-          <xsl:value-of select="normalize-space(translate($bookmark-label, $a-dia, $a-asc))"/>
-        </fo:bookmark-title>
-        <xsl:apply-templates select="*" mode="fop1.outline"/>
-      </fo:bookmark>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:bookmark internal-destination="{$id}">
-        <fo:bookmark-title>
-          <xsl:value-of select="normalize-space(translate($bookmark-label, $a-dia, $a-asc))"/>
-        </fo:bookmark-title>
-      </fo:bookmark>
-
-      <xsl:variable name="toc.params">
-        <xsl:call-template name="find.path.params">
-          <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <xsl:if test="contains($toc.params, 'toc')
-                    and (book|part|reference|preface|chapter|appendix|article
-                         |glossary|bibliography|index|setindex
-                         |refentry
-                         |sect1|sect2|sect3|sect4|sect5|section)">
-        <fo:bookmark internal-destination="toc...{$id}">
-          <fo:bookmark-title>
-            <xsl:call-template name="gentext">
-              <xsl:with-param name="key" select="'TableofContents'"/>
-            </xsl:call-template>
-          </fo:bookmark-title>
-        </fo:bookmark>
-      </xsl:if>
-      <xsl:apply-templates select="*" mode="fop1.outline"/>
-    </xsl:otherwise>
-  </xsl:choose>
-<!--
-  <fo:bookmark internal-destination="{$id}"/>
--->
-</xsl:template>
-
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/formal.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/formal.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,534 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- formal.object creates a basic block containing the
-     result of processing the object, including its title
-     and any keep-together properties.
-     The template calling formal.object may wrap these results in a
-     float or pgwide block. -->
-
-<xsl:template name="formal.object">
-  <xsl:param name="placement" select="'before'"/>
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="content">
-    <xsl:if test="$placement = 'before'">
-      <xsl:call-template name="formal.object.heading">
-        <xsl:with-param name="placement" select="$placement"/>
-      </xsl:call-template>
-    </xsl:if>
-    <xsl:apply-templates/>
-    <xsl:if test="$placement != 'before'">
-      <xsl:call-template name="formal.object.heading">
-        <xsl:with-param name="placement" select="$placement"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="keep.together">
-    <xsl:call-template name="pi.dbfo_keep-together"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <!-- tables have their own templates and 
-         are not handled by formal.object -->
-    <xsl:when test="self::figure">
-      <fo:block id="{$id}"
-                xsl:use-attribute-sets="figure.properties">
-        <xsl:if test="$keep.together != ''">
-          <xsl:attribute name="keep-together.within-column"><xsl:value-of
-                          select="$keep.together"/></xsl:attribute>
-        </xsl:if>
-        <xsl:copy-of select="$content"/>
-      </fo:block>
-    </xsl:when>
-    <xsl:when test="self::example">
-      <fo:block id="{$id}"
-                xsl:use-attribute-sets="example.properties">
-        <xsl:if test="$keep.together != ''">
-          <xsl:attribute name="keep-together.within-column"><xsl:value-of
-                          select="$keep.together"/></xsl:attribute>
-        </xsl:if>
-        <xsl:copy-of select="$content"/>
-      </fo:block>
-    </xsl:when>
-    <xsl:when test="self::equation">
-      <fo:block id="{$id}"
-                xsl:use-attribute-sets="equation.properties">
-        <xsl:if test="$keep.together != ''">
-          <xsl:attribute name="keep-together.within-column"><xsl:value-of
-                          select="$keep.together"/></xsl:attribute>
-        </xsl:if>
-        <xsl:copy-of select="$content"/>
-      </fo:block>
-    </xsl:when>
-    <xsl:when test="self::procedure">
-      <fo:block id="{$id}"
-                xsl:use-attribute-sets="procedure.properties">
-        <xsl:if test="$keep.together != ''">
-          <xsl:attribute name="keep-together.within-column"><xsl:value-of
-                          select="$keep.together"/></xsl:attribute>
-        </xsl:if>
-        <xsl:copy-of select="$content"/>
-      </fo:block>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:block id="{$id}"
-                xsl:use-attribute-sets="formal.object.properties">
-        <xsl:if test="$keep.together != ''">
-          <xsl:attribute name="keep-together.within-column"><xsl:value-of
-                          select="$keep.together"/></xsl:attribute>
-        </xsl:if>
-        <xsl:copy-of select="$content"/>
-      </fo:block>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="formal.object.heading">
-  <xsl:param name="object" select="."/>
-  <xsl:param name="placement" select="'before'"/>
-
-  <fo:block xsl:use-attribute-sets="formal.title.properties">
-    <xsl:choose>
-      <xsl:when test="$placement = 'before'">
-        <xsl:attribute
-               name="keep-with-next.within-column">always</xsl:attribute>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:attribute
-               name="keep-with-previous.within-column">always</xsl:attribute>
-      </xsl:otherwise>
-    </xsl:choose>
-    <xsl:apply-templates select="$object" mode="object.title.markup">
-      <xsl:with-param name="allow-anchors" select="1"/>
-    </xsl:apply-templates>
-  </fo:block>
-</xsl:template>
-
-<xsl:template name="informal.object">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="keep.together">
-    <xsl:call-template name="pi.dbfo_keep-together"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <!-- informaltables have their own templates and 
-         are not handled by formal.object -->
-    <xsl:when test="local-name(.) = 'equation'">
-      <fo:block id="{$id}"
-                xsl:use-attribute-sets="equation.properties">
-        <xsl:if test="$keep.together != ''">
-          <xsl:attribute name="keep-together.within-column"><xsl:value-of
-                          select="$keep.together"/></xsl:attribute>
-        </xsl:if>
-        <xsl:apply-templates/>
-      </fo:block>
-    </xsl:when>
-    <xsl:when test="local-name(.) = 'procedure'">
-      <fo:block id="{$id}"
-                xsl:use-attribute-sets="procedure.properties">
-        <xsl:if test="$keep.together != ''">
-          <xsl:attribute name="keep-together.within-column"><xsl:value-of
-                          select="$keep.together"/></xsl:attribute>
-        </xsl:if>
-        <xsl:apply-templates/>
-      </fo:block>
-    </xsl:when>
-    <xsl:when test="local-name(.) = 'informalfigure'">
-      <fo:block id="{$id}"
-                xsl:use-attribute-sets="informalfigure.properties">
-        <xsl:if test="$keep.together != ''">
-          <xsl:attribute name="keep-together.within-column"><xsl:value-of
-                          select="$keep.together"/></xsl:attribute>
-        </xsl:if>
-        <xsl:apply-templates/>
-      </fo:block>
-    </xsl:when>
-    <xsl:when test="local-name(.) = 'informalexample'">
-      <fo:block id="{$id}"
-                xsl:use-attribute-sets="informalexample.properties">
-        <xsl:if test="$keep.together != ''">
-          <xsl:attribute name="keep-together.within-column"><xsl:value-of
-                          select="$keep.together"/></xsl:attribute>
-        </xsl:if>
-        <xsl:apply-templates/>
-      </fo:block>
-    </xsl:when>
-    <xsl:when test="local-name(.) = 'informalequation'">
-      <fo:block id="{$id}"
-                xsl:use-attribute-sets="informalequation.properties">
-        <xsl:apply-templates/>
-      </fo:block>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:block id="{$id}" 
-                xsl:use-attribute-sets="informal.object.properties">
-        <xsl:if test="$keep.together != ''">
-          <xsl:attribute name="keep-together.within-column"><xsl:value-of
-                          select="$keep.together"/></xsl:attribute>
-        </xsl:if>
-        <xsl:apply-templates/>
-      </fo:block>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="semiformal.object">
-  <xsl:param name="placement" select="'before'"/>
-  <xsl:choose>
-    <xsl:when test="./title">
-      <xsl:call-template name="formal.object">
-        <xsl:with-param name="placement" select="$placement"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="informal.object"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="figure">
-  <xsl:variable name="param.placement"
-              select="substring-after(normalize-space($formal.title.placement),
-                                      concat(local-name(.), ' '))"/>
-
-  <xsl:variable name="placement">
-    <xsl:choose>
-      <xsl:when test="contains($param.placement, ' ')">
-        <xsl:value-of select="substring-before($param.placement, ' ')"/>
-      </xsl:when>
-      <xsl:when test="$param.placement = ''">before</xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$param.placement"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="figure">
-    <xsl:choose>
-      <xsl:when test="@pgwide = '1'">
-        <fo:block xsl:use-attribute-sets="pgwide.properties">
-          <xsl:call-template name="formal.object">
-            <xsl:with-param name="placement" select="$placement"/>
-          </xsl:call-template>
-        </fo:block>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="formal.object">
-          <xsl:with-param name="placement" select="$placement"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="floatstyle">
-    <xsl:call-template name="floatstyle"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$floatstyle != ''">
-      <xsl:call-template name="floater">
-        <xsl:with-param name="position" select="$floatstyle"/>
-        <xsl:with-param name="content" select="$figure"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy-of select="$figure"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="example">
-  <xsl:variable name="param.placement"
-             select="substring-after(normalize-space($formal.title.placement),
-                                     concat(local-name(.), ' '))"/>
-
-  <xsl:variable name="placement">
-    <xsl:choose>
-      <xsl:when test="contains($param.placement, ' ')">
-        <xsl:value-of select="substring-before($param.placement, ' ')"/>
-      </xsl:when>
-      <xsl:when test="$param.placement = ''">before</xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$param.placement"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <!-- Example doesn't have a pgwide attribute, so may use a PI -->
-  <xsl:variable name="pgwide.pi">
-    <xsl:call-template name="pi.dbfo_pgwide"/>
-  </xsl:variable>
-
-  <xsl:variable name="pgwide">
-    <xsl:choose>
-      <xsl:when test="$pgwide.pi">
-        <xsl:value-of select="$pgwide.pi"/>
-      </xsl:when>
-      <!-- child element may set pgwide -->
-      <xsl:when test="*[@pgwide]">
-        <xsl:value-of select="*[@pgwide][1]/@pgwide"/>
-      </xsl:when>
-    </xsl:choose>
-  </xsl:variable>
-
-  <!-- Get align value from internal mediaobject -->
-  <xsl:variable name="align">
-    <xsl:if test="mediaobject|mediaobjectco">
-      <xsl:variable name="olist" select="mediaobject/imageobject
-                     |mediaobjectco/imageobjectco
-                     |mediaobject/videoobject
-                     |mediaobject/audioobject
-                     |mediaobject/textobject"/>
-
-      <xsl:variable name="object.index">
-        <xsl:call-template name="select.mediaobject.index">
-          <xsl:with-param name="olist" select="$olist"/>
-          <xsl:with-param name="count" select="1"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <xsl:variable name="object" select="$olist[position() = $object.index]"/>
-
-      <xsl:value-of select="$object/descendant::imagedata[@align][1]/@align"/>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="example">
-    <xsl:choose>
-      <xsl:when test="$pgwide = '1'">
-        <fo:block xsl:use-attribute-sets="pgwide.properties">
-          <xsl:if test="$align != ''">
-            <xsl:attribute name="text-align">
-              <xsl:value-of select="$align"/>
-            </xsl:attribute>
-          </xsl:if>
-          <xsl:call-template name="formal.object">
-            <xsl:with-param name="placement" select="$placement"/>
-          </xsl:call-template>
-        </fo:block>
-      </xsl:when>
-      <xsl:otherwise>
-        <fo:block>
-          <xsl:if test="$align != ''">
-            <xsl:attribute name="text-align">
-              <xsl:value-of select="$align"/>
-            </xsl:attribute>
-          </xsl:if>
-          <xsl:call-template name="formal.object">
-            <xsl:with-param name="placement" select="$placement"/>
-          </xsl:call-template>
-        </fo:block>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="floatstyle">
-    <xsl:call-template name="floatstyle"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$floatstyle != ''">
-      <xsl:call-template name="floater">
-        <xsl:with-param name="position" select="$floatstyle"/>
-        <xsl:with-param name="content" select="$example"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy-of select="$example"/>
-    </xsl:otherwise>
-  </xsl:choose>
-
-</xsl:template>
-
-<!-- Unified handling of CALS and HTML tables, formal and not -->
-<!-- Creates a hierarchy of nested containers:
-     - Outer container does a float.
-     - Nested container does block-container for rotation
-     - Nested block contains title, layout table and footnotes
-     - Nested layout table placeholder template supports extensions.
-     - fo:table is innermost.
-     Created from the innermost and working out.
-     Not all layers apply to every table.
--->
-<xsl:template match="table|informaltable">
-  <xsl:if test="tgroup/tbody/tr
-                |tgroup/thead/tr
-                |tgroup/tfoot/tr">
-    <xsl:message terminate="yes">
-      <xsl:text>Broken table: tr descendent of CALS Table.</xsl:text>
-      <xsl:text>The text in the first tr is:&#10;</xsl:text>
-      <xsl:value-of 
-               select="(tgroup//tr)[1]"/>
-    </xsl:message>
-  </xsl:if>
-  <xsl:if test="not(tgroup) and .//row">
-    <xsl:message terminate="yes">
-      <xsl:text>Broken table: row descendent of HTML table.</xsl:text>
-      <xsl:text>The text in the first row is:&#10;</xsl:text>
-      <xsl:value-of 
-               select=".//row[1]"/>
-    </xsl:message>
-  </xsl:if>
-
-  <!-- Contains fo:table, not title or footnotes -->
-  <xsl:variable name="table.content">
-    <xsl:call-template name="make.table.content"/>
-  </xsl:variable>
-
-  <!-- Optional layout table template for extensions -->
-  <xsl:variable name="table.layout">
-    <xsl:call-template name="table.layout">
-      <xsl:with-param name="table.content" select="$table.content"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <!-- fo:block contains title, layout table, and footnotes  -->
-  <xsl:variable name="table.block">
-    <xsl:call-template name="table.block">
-      <xsl:with-param name="table.layout" select="$table.layout"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <!-- pgwide or orient container -->
-  <xsl:variable name="table.container">
-    <xsl:call-template name="table.container">
-      <xsl:with-param name="table.block" select="$table.block"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <!-- float or not -->
-  <xsl:variable name="floatstyle">
-    <xsl:call-template name="floatstyle"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$floatstyle != ''">
-      <xsl:call-template name="floater">
-        <xsl:with-param name="position" select="$floatstyle"/>
-        <xsl:with-param name="content" select="$table.container"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy-of select="$table.container"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-
-<xsl:template match="equation">
-  <xsl:variable name="param.placement"
-              select="substring-after(normalize-space($formal.title.placement),
-                                      concat(local-name(.), ' '))"/>
-
-  <xsl:variable name="placement">
-    <xsl:choose>
-      <xsl:when test="contains($param.placement, ' ')">
-        <xsl:value-of select="substring-before($param.placement, ' ')"/>
-      </xsl:when>
-      <xsl:when test="$param.placement = ''">before</xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$param.placement"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <!-- Equation doesn't have a pgwide attribute, so may use a PI -->
-  <xsl:variable name="pgwide">
-    <xsl:call-template name="pi.dbfo_pgwide"/>
-  </xsl:variable>
-
-  <xsl:variable name="equation">
-    <xsl:choose>
-      <xsl:when test="$pgwide = '1'">
-        <fo:block xsl:use-attribute-sets="pgwide.properties">
-          <xsl:call-template name="semiformal.object">
-            <xsl:with-param name="placement" select="$placement"/>
-          </xsl:call-template>
-        </fo:block>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="semiformal.object">
-          <xsl:with-param name="placement" select="$placement"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="floatstyle">
-    <xsl:call-template name="floatstyle"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$floatstyle != ''">
-      <xsl:call-template name="floater">
-        <xsl:with-param name="position" select="$floatstyle"/>
-        <xsl:with-param name="content" select="$equation"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy-of select="$equation"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="figure/title"></xsl:template>
-<xsl:template match="figure/titleabbrev"></xsl:template>
-<xsl:template match="table/title"></xsl:template>
-<xsl:template match="table/titleabbrev"></xsl:template>
-<xsl:template match="table/textobject"></xsl:template>
-<xsl:template match="example/title"></xsl:template>
-<xsl:template match="example/titleabbrev"></xsl:template>
-<xsl:template match="equation/title"></xsl:template>
-<xsl:template match="equation/titleabbrev"></xsl:template>
-
-<xsl:template match="informalfigure">
-  <xsl:call-template name="informal.object"/>
-</xsl:template>
-
-<xsl:template match="informalexample">
-  <xsl:call-template name="informal.object"/>
-</xsl:template>
-
-<xsl:template match="informaltable/textobject"></xsl:template>
-
-<xsl:template match="informalequation">
-  <xsl:call-template name="informal.object"/>
-</xsl:template>
-
-<xsl:template name="floatstyle">
-  <xsl:if test="(@float and @float != '0') or @floatstyle != ''">
-    <xsl:choose>
-      <xsl:when test="@floatstyle != ''">
-        <xsl:value-of select="@floatstyle"/>
-      </xsl:when>
-      <xsl:when test="@float = '1'">
-        <xsl:value-of select="$default.float.class"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="@float"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:if>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/glossary.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/glossary.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,1139 +1,0 @@
-<?xml version='1.0'?>
-<!DOCTYPE xsl:stylesheet [
-<!ENTITY % common.entities SYSTEM "../common/entities.ent">
-%common.entities;
-]>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:template match="glossary">
-  <xsl:call-template name="make-glossary"/>
-</xsl:template>
-
-<xsl:template match="glossdiv/title"/>
-<xsl:template match="glossdiv/subtitle"/>
-<xsl:template match="glossdiv/titleabbrev"/>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="make-glossary">
-  <xsl:param name="divs" select="glossdiv"/>
-  <xsl:param name="entries" select="glossentry"/>
-  <xsl:param name="preamble" select="*[not(self::title
-                                           or self::subtitle
-                                           or self::glossdiv
-                                           or self::glossentry)]"/>
-
-  &setup-language-variable;
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="presentation">
-    <xsl:call-template name="pi.dbfo_glossary-presentation"/>
-  </xsl:variable>
-
-  <xsl:variable name="term-width">
-    <xsl:call-template name="pi.dbfo_glossterm-width"/>
-  </xsl:variable>
-
-  <xsl:variable name="width">
-    <xsl:choose>
-      <xsl:when test="$term-width = ''">
-        <xsl:value-of select="$glossterm.width"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$term-width"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <fo:block id="{$id}">
-    <xsl:call-template name="glossary.titlepage"/>
-  </fo:block>
-
-  <xsl:if test="$preamble">
-    <xsl:apply-templates select="$preamble"/>
-  </xsl:if>
-
-  <xsl:choose>
-    <xsl:when test="$presentation = 'list'">
-      <xsl:apply-templates select="$divs" mode="glossary.as.list">
-        <xsl:with-param name="width" select="$width"/>
-      </xsl:apply-templates>
-      <xsl:if test="$entries">
-        <fo:list-block provisional-distance-between-starts="{$width}"
-                       provisional-label-separation="{$glossterm.separation}"
-                       xsl:use-attribute-sets="normal.para.spacing">
-          <xsl:choose>
-            <xsl:when test="$glossary.sort != 0">
-              <xsl:apply-templates select="$entries" mode="glossary.as.list">
-                <xsl:sort lang="{$language}"
-                          select="translate(glossterm, $lowercase, 
-                                            $uppercase)"/>
-              </xsl:apply-templates>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:apply-templates select="$entries" mode="glossary.as.list"/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </fo:list-block>
-      </xsl:if>
-    </xsl:when>
-    <xsl:when test="$presentation = 'blocks'">
-      <xsl:apply-templates select="$divs" mode="glossary.as.blocks"/>
-      <xsl:choose>
-        <xsl:when test="$glossary.sort != 0">
-          <xsl:apply-templates select="$entries" mode="glossary.as.blocks">
-            <xsl:sort lang="{$language}"
-                      select="translate(glossterm, $lowercase, 
-                                        $uppercase)"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates select="$entries" mode="glossary.as.blocks"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:when test="$glossary.as.blocks != 0">
-      <xsl:apply-templates select="$divs" mode="glossary.as.blocks"/>
-      <xsl:choose>
-        <xsl:when test="$glossary.sort != 0">
-          <xsl:apply-templates select="$entries" mode="glossary.as.blocks">
-            <xsl:sort lang="{$language}"
-                      select="translate(glossterm, $lowercase, 
-                                        $uppercase)"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates select="$entries" mode="glossary.as.blocks"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates select="$divs" mode="glossary.as.list">
-        <xsl:with-param name="width" select="$width"/>
-      </xsl:apply-templates>
-      <xsl:if test="$entries">
-        <fo:list-block provisional-distance-between-starts="{$width}"
-                       provisional-label-separation="{$glossterm.separation}"
-                       xsl:use-attribute-sets="normal.para.spacing">
-          <xsl:choose>
-            <xsl:when test="$glossary.sort != 0">
-              <xsl:apply-templates select="$entries" mode="glossary.as.list">
-                <xsl:sort lang="{$language}"
-                          select="translate(glossterm, $lowercase, 
-                                            $uppercase)"/>
-              </xsl:apply-templates>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:apply-templates select="$entries" mode="glossary.as.list"/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </fo:list-block>
-      </xsl:if>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="book/glossary|part/glossary|/glossary" priority="2">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="master-reference">
-    <xsl:call-template name="select.pagemaster"/>
-  </xsl:variable>
-
-  <fo:page-sequence hyphenate="{$hyphenate}"
-                    master-reference="{$master-reference}">
-    <xsl:attribute name="language">
-      <xsl:call-template name="l10n.language"/>
-    </xsl:attribute>
-
-    <xsl:attribute name="format">
-      <xsl:call-template name="page.number.format">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    
-    <xsl:attribute name="initial-page-number">
-      <xsl:call-template name="initial.page.number">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="force-page-count">
-      <xsl:call-template name="force.page.count">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="hyphenation-character">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-character'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-push-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-remain-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:apply-templates select="." mode="running.head.mode">
-      <xsl:with-param name="master-reference" select="$master-reference"/>
-    </xsl:apply-templates>
-    <xsl:apply-templates select="." mode="running.foot.mode">
-      <xsl:with-param name="master-reference" select="$master-reference"/>
-    </xsl:apply-templates>
-
-    <fo:flow flow-name="xsl-region-body">
-      <xsl:call-template name="set.flow.properties">
-        <xsl:with-param name="element" select="local-name(.)"/>
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-
-      <xsl:call-template name="make-glossary"/>
-    </fo:flow>
-  </fo:page-sequence>
-</xsl:template>
-
-<xsl:template match="glossary/glossaryinfo"></xsl:template>
-<xsl:template match="glossary/info"></xsl:template>
-<xsl:template match="glossary/title"></xsl:template>
-<xsl:template match="glossary/subtitle"></xsl:template>
-<xsl:template match="glossary/titleabbrev"></xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="glosslist">
-  &setup-language-variable;
-
-  <xsl:variable name="presentation">
-    <xsl:call-template name="pi.dbfo_glosslist-presentation"/>
-  </xsl:variable>
-
-  <xsl:variable name="term-width">
-    <xsl:call-template name="pi.dbfo_glossterm-width"/>
-  </xsl:variable>
-
-  <xsl:variable name="width">
-    <xsl:choose>
-      <xsl:when test="$term-width = ''">
-        <xsl:value-of select="$glossterm.width"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$term-width"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:if test="title or info/title">
-    <xsl:apply-templates select="(title|info/title)[1]" mode="list.title.mode"/>
-  </xsl:if>
-
-  <xsl:choose>
-    <xsl:when test="$presentation = 'list'">
-      <fo:list-block provisional-distance-between-starts="{$width}"
-                     provisional-label-separation="{$glossterm.separation}"
-                     xsl:use-attribute-sets="normal.para.spacing">
-        <xsl:choose>
-          <xsl:when test="$glossary.sort != 0">
-            <xsl:apply-templates select="glossentry" mode="glossary.as.list">
-              <xsl:sort lang="{$language}"
-                        select="translate(glossterm, $lowercase, 
-                                          $uppercase)"/>
-            </xsl:apply-templates>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:apply-templates select="glossentry" mode="glossary.as.list"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </fo:list-block>
-    </xsl:when>
-    <xsl:when test="$presentation = 'blocks'">
-      <xsl:choose>
-        <xsl:when test="$glossary.sort != 0">
-          <xsl:apply-templates select="glossentry" mode="glossary.as.blocks">
-            <xsl:sort lang="{$language}"
-                      select="translate(glossterm, $lowercase, 
-                                        $uppercase)"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates select="glossentry" mode="glossary.as.blocks"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:when test="$glosslist.as.blocks != 0">
-      <xsl:choose>
-        <xsl:when test="$glossary.sort != 0">
-          <xsl:apply-templates select="glossentry" mode="glossary.as.blocks">
-            <xsl:sort lang="{$language}"
-                      select="translate(glossterm, $lowercase, 
-                                        $uppercase)"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates select="glossentry" mode="glossary.as.blocks"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:list-block provisional-distance-between-starts="{$width}"
-                     provisional-label-separation="{$glossterm.separation}"
-                     xsl:use-attribute-sets="normal.para.spacing">
-        <xsl:choose>
-          <xsl:when test="$glossary.sort != 0">
-            <xsl:apply-templates select="glossentry" mode="glossary.as.list">
-              <xsl:sort lang="{$language}"
-                        select="translate(glossterm, $lowercase, 
-                                          $uppercase)"/>
-            </xsl:apply-templates>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:apply-templates select="glossentry" mode="glossary.as.list"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </fo:list-block>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-<!-- Glossary collection -->
-
-<xsl:template match="glossary[@role='auto']" priority="2">
-  <xsl:variable name="collection" select="document($glossary.collection, .)"/>
-  <xsl:if test="$glossary.collection = ''">
-    <xsl:message>
-      <xsl:text>Warning: processing automatic glossary </xsl:text>
-      <xsl:text>without a glossary.collection file.</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:if test="not($collection) and $glossary.collection != ''">
-    <xsl:message>
-      <xsl:text>Warning: processing automatic glossary but unable to </xsl:text>
-      <xsl:text>open glossary.collection file '</xsl:text>
-      <xsl:value-of select="$glossary.collection"/>
-      <xsl:text>'</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:call-template name="make-auto-glossary"/>
-</xsl:template>
-
-<xsl:template name="make-auto-glossary">
-  <xsl:param name="collection" select="document($glossary.collection, .)"/>
-  <xsl:param name="terms" select="//glossterm[not(parent::glossdef)]|//firstterm"/>
-  <xsl:param name="preamble" select="*[not(self::title
-                                           or self::subtitle
-                                           or self::glossdiv
-                                           or self::glossentry)]"/>
-
-  &setup-language-variable;
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="presentation">
-    <xsl:call-template name="pi.dbfo_glossary-presentation"/>
-  </xsl:variable>
-
-  <xsl:variable name="term-width">
-    <xsl:call-template name="pi.dbfo_glossterm-width"/>
-  </xsl:variable>
-
-  <xsl:variable name="width">
-    <xsl:choose>
-      <xsl:when test="$term-width = ''">
-        <xsl:value-of select="$glossterm.width"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$term-width"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:if test="$glossary.collection = ''">
-    <xsl:message>
-      <xsl:text>Warning: processing automatic glossary </xsl:text>
-      <xsl:text>without a glossary.collection file.</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <fo:block id="{$id}">
-    <xsl:call-template name="glossary.titlepage"/>
-  </fo:block>
-
-  <xsl:if test="$preamble">
-    <xsl:apply-templates select="$preamble"/>
-  </xsl:if>
-
-  <xsl:choose>
-    <xsl:when test="glossdiv and $collection//glossdiv">
-      <xsl:for-each select="$collection//glossdiv">
-        <!-- first see if there are any in this div -->
-        <xsl:variable name="exist.test">
-          <xsl:for-each select="glossentry">
-            <xsl:variable name="cterm" select="glossterm"/>
-            <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
-              <xsl:value-of select="glossterm"/>
-            </xsl:if>
-          </xsl:for-each>
-        </xsl:variable>
-
-        <xsl:if test="$exist.test != ''">
-          <xsl:choose>
-            <xsl:when test="$presentation = 'list'">
-              <xsl:apply-templates select="." mode="auto-glossary-as-list">
-                <xsl:with-param name="width" select="$width"/>
-                <xsl:with-param name="terms" select="$terms"/>
-              </xsl:apply-templates>
-            </xsl:when>
-            <xsl:when test="$presentation = 'blocks'">
-              <xsl:apply-templates select="." mode="auto-glossary-as-blocks">
-                <xsl:with-param name="terms" select="$terms"/>
-              </xsl:apply-templates>
-            </xsl:when>
-            <xsl:when test="$glossary.as.blocks != 0">
-              <xsl:apply-templates select="." mode="auto-glossary-as-blocks">
-                <xsl:with-param name="terms" select="$terms"/>
-              </xsl:apply-templates>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:apply-templates select="." mode="auto-glossary-as-list">
-                <xsl:with-param name="width" select="$width"/>
-                <xsl:with-param name="terms" select="$terms"/>
-              </xsl:apply-templates>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:if>
-      </xsl:for-each>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="$presentation = 'list'">
-          <fo:list-block provisional-distance-between-starts="{$width}"
-                         provisional-label-separation="{$glossterm.separation}"
-                         xsl:use-attribute-sets="normal.para.spacing">
-            <xsl:choose>
-              <xsl:when test="$glossary.sort != 0">
-                <xsl:for-each select="$collection//glossentry">
-                  <xsl:sort lang="{$language}"
-                            select="translate(glossterm, $lowercase, 
-                                              $uppercase)"/>
-                  <xsl:variable name="cterm" select="glossterm"/>
-                  <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
-                    <xsl:apply-templates select="." 
-                                         mode="auto-glossary-as-list"/>
-                  </xsl:if>
-                </xsl:for-each>
-              </xsl:when>
-              <xsl:otherwise>
-                <xsl:for-each select="$collection//glossentry">
-                  <xsl:variable name="cterm" select="glossterm"/>
-                  <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
-                    <xsl:apply-templates select="." 
-                                         mode="auto-glossary-as-list"/>
-                  </xsl:if>
-                </xsl:for-each>
-              </xsl:otherwise>
-            </xsl:choose>
-          </fo:list-block>
-        </xsl:when>
-        <xsl:when test="$presentation = 'blocks' or
-                        $glossary.as.blocks != 0">
-          <xsl:choose>
-            <xsl:when test="$glossary.sort != 0">
-              <xsl:for-each select="$collection//glossentry">
-                <xsl:sort lang="{$language}"
-                          select="translate(glossterm, $lowercase, 
-                                            $uppercase)"/>
-                <xsl:variable name="cterm" select="glossterm"/>
-                <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
-                  <xsl:apply-templates select="." 
-                                       mode="auto-glossary-as-blocks"/>
-                </xsl:if>
-              </xsl:for-each>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:for-each select="$collection//glossentry">
-                <xsl:variable name="cterm" select="glossterm"/>
-                <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
-                  <xsl:apply-templates select="." 
-                                       mode="auto-glossary-as-blocks"/>
-                </xsl:if>
-              </xsl:for-each>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-        <xsl:otherwise>
-          <fo:list-block provisional-distance-between-starts="{$width}"
-                         provisional-label-separation="{$glossterm.separation}"
-                         xsl:use-attribute-sets="normal.para.spacing">
-            <xsl:choose>
-              <xsl:when test="$glossary.sort != 0">
-                <xsl:for-each select="$collection//glossentry">
-                  <xsl:sort lang="{$language}"
-                            select="translate(glossterm, $lowercase, 
-                                              $uppercase)"/>
-                  <xsl:variable name="cterm" select="glossterm"/>
-                  <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
-                    <xsl:apply-templates select="." 
-                                         mode="auto-glossary-as-list"/>
-                  </xsl:if>
-                </xsl:for-each>
-              </xsl:when>
-              <xsl:otherwise>
-                <xsl:for-each select="$collection//glossentry">
-                  <xsl:variable name="cterm" select="glossterm"/>
-                  <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
-                    <xsl:apply-templates select="." 
-                                         mode="auto-glossary-as-list"/>
-                  </xsl:if>
-                </xsl:for-each>
-              </xsl:otherwise>
-            </xsl:choose>
-          </fo:list-block>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="book/glossary[@role='auto']|
-                     part/glossary[@role='auto']|
-                     /glossary[@role='auto']" priority="2.5">
-  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
-
-  <xsl:variable name="master-reference">
-    <xsl:call-template name="select.pagemaster"/>
-  </xsl:variable>
-
-  <xsl:if test="$glossary.collection = ''">
-    <xsl:message>
-      <xsl:text>Warning: processing automatic glossary </xsl:text>
-      <xsl:text>without a glossary.collection file.</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <fo:page-sequence hyphenate="{$hyphenate}"
-                    master-reference="{$master-reference}">
-    <xsl:attribute name="language">
-      <xsl:call-template name="l10n.language"/>
-    </xsl:attribute>
-    <xsl:attribute name="format">
-      <xsl:call-template name="page.number.format">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="initial-page-number">
-      <xsl:call-template name="initial.page.number">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="force-page-count">
-      <xsl:call-template name="force.page.count">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="hyphenation-character">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-character'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-push-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-remain-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:apply-templates select="." mode="running.head.mode">
-      <xsl:with-param name="master-reference" select="$master-reference"/>
-    </xsl:apply-templates>
-    <xsl:apply-templates select="." mode="running.foot.mode">
-      <xsl:with-param name="master-reference" select="$master-reference"/>
-    </xsl:apply-templates>
-
-    <fo:flow flow-name="xsl-region-body">
-      <xsl:call-template name="set.flow.properties">
-        <xsl:with-param name="element" select="local-name(.)"/>
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-
-      <xsl:call-template name="make-auto-glossary"/>
-    </fo:flow>
-  </fo:page-sequence>
-</xsl:template>
-
-<xsl:template match="glossdiv" mode="auto-glossary-as-list">
-  <xsl:param name="width" select="$glossterm.width"/>
-  <xsl:param name="terms" select="."/>
-
-  &setup-language-variable;
-
-  <xsl:variable name="preamble"
-                select="*[not(self::title
-                            or self::subtitle
-                            or self::glossentry)]"/>
-
-  <xsl:call-template name="glossdiv.titlepage"/>
-
-  <xsl:apply-templates select="$preamble"/>
-
-  <fo:list-block provisional-distance-between-starts="{$width}"
-                 provisional-label-separation="{$glossterm.separation}"
-                 xsl:use-attribute-sets="normal.para.spacing">
-    <xsl:choose>
-      <xsl:when test="$glossary.sort != 0">
-        <xsl:for-each select="glossentry">
-          <xsl:sort lang="{$language}"
-                    select="translate(glossterm, $lowercase, $uppercase)"/>
-          <xsl:variable name="cterm" select="glossterm"/>
-          <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
-            <xsl:apply-templates select="." mode="auto-glossary-as-list"/>
-          </xsl:if>
-        </xsl:for-each>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:for-each select="glossentry">
-          <xsl:variable name="cterm" select="glossterm"/>
-          <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
-            <xsl:apply-templates select="." mode="auto-glossary-as-list"/>
-          </xsl:if>
-        </xsl:for-each>
-      </xsl:otherwise>
-    </xsl:choose>
-  </fo:list-block>
-</xsl:template>
-
-<xsl:template match="glossentry" mode="auto-glossary-as-list">
-  <xsl:apply-templates select="." mode="glossary.as.list"/>
-</xsl:template>
-
-<xsl:template match="glossdiv" mode="auto-glossary-as-blocks">
-  <xsl:param name="terms" select="."/>
-
-  &setup-language-variable;
-
-  <xsl:variable name="preamble"
-                select="*[not(self::title
-                            or self::subtitle
-                            or self::glossentry)]"/>
-
-  <xsl:call-template name="glossdiv.titlepage"/>
-
-  <xsl:apply-templates select="$preamble"/>
-
-  <xsl:choose>
-    <xsl:when test="$glossary.sort != 0">
-      <xsl:for-each select="glossentry">
-        <xsl:sort lang="{$language}"
-                  select="translate(glossterm, $lowercase, $uppercase)"/>
-        <xsl:variable name="cterm" select="glossterm"/>
-        <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
-          <xsl:apply-templates select="." mode="auto-glossary-as-blocks"/>
-        </xsl:if>
-      </xsl:for-each>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:for-each select="glossentry">
-        <xsl:variable name="cterm" select="glossterm"/>
-        <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
-          <xsl:apply-templates select="." mode="auto-glossary-as-blocks"/>
-        </xsl:if>
-      </xsl:for-each>
-    </xsl:otherwise>
-  </xsl:choose>
-
-</xsl:template>
-
-<xsl:template match="glossentry" mode="auto-glossary-as-blocks">
-  <xsl:apply-templates select="." mode="glossary.as.blocks"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-<!-- Format glossary as a list -->
-
-<xsl:template match="glossdiv" mode="glossary.as.list">
-  <xsl:param name="width" select="$glossterm.width"/>
-
-  &setup-language-variable;
-
-  <xsl:variable name="entries" select="glossentry"/>
-
-  <xsl:variable name="preamble"
-                select="*[not(self::title
-                            or self::subtitle
-                            or self::glossentry)]"/>
-
-  <xsl:call-template name="glossdiv.titlepage"/>
-
-  <xsl:apply-templates select="$preamble"/>
-
-  <fo:list-block provisional-distance-between-starts="{$width}"
-                 provisional-label-separation="{$glossterm.separation}"
-                 xsl:use-attribute-sets="normal.para.spacing">
-    <xsl:choose>
-      <xsl:when test="$glossary.sort != 0">
-        <xsl:apply-templates select="$entries" mode="glossary.as.list">
-          <xsl:sort lang="{$language}"
-                    select="translate(glossterm, $lowercase, 
-                                      $uppercase)"/>
-        </xsl:apply-templates>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:apply-templates select="$entries" mode="glossary.as.list"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </fo:list-block>
-</xsl:template>
-
-<!--
-GlossEntry ::=
-  GlossTerm, Acronym?, Abbrev?,
-  (IndexTerm)*,
-  RevHistory?,
-  (GlossSee | GlossDef+)
--->
-
-<xsl:template match="glossentry" mode="glossary.as.list">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <fo:list-item xsl:use-attribute-sets="normal.para.spacing">
-    <xsl:call-template name="anchor">
-      <xsl:with-param name="conditional">
-        <xsl:choose>
-          <xsl:when test="$glossterm.auto.link != 0
-                          or $glossary.collection != ''">0</xsl:when>
-          <xsl:otherwise>1</xsl:otherwise>
-        </xsl:choose>
-      </xsl:with-param>
-    </xsl:call-template>
-
-    <fo:list-item-label end-indent="label-end()">
-      <fo:block>
-        <xsl:choose>
-          <xsl:when test="$glossentry.show.acronym = 'primary'">
-            <xsl:choose>
-              <xsl:when test="acronym|abbrev">
-                <xsl:apply-templates select="acronym|abbrev" 
-                                     mode="glossary.as.list"/>
-                <xsl:text> (</xsl:text>
-                <xsl:apply-templates select="glossterm" 
-                                     mode="glossary.as.list"/>
-                <xsl:text>)</xsl:text>
-              </xsl:when>
-              <xsl:otherwise>
-                <xsl:apply-templates select="glossterm" 
-                                     mode="glossary.as.list"/>
-              </xsl:otherwise>
-            </xsl:choose>
-          </xsl:when>
-
-          <xsl:when test="$glossentry.show.acronym = 'yes'">
-            <xsl:apply-templates select="glossterm" mode="glossary.as.list"/>
-
-            <xsl:if test="acronym|abbrev">
-              <xsl:text> (</xsl:text>
-              <xsl:apply-templates select="acronym|abbrev" 
-                                   mode="glossary.as.list"/>
-              <xsl:text>)</xsl:text>
-            </xsl:if>
-          </xsl:when>
-
-          <xsl:otherwise>
-            <xsl:apply-templates select="glossterm" mode="glossary.as.list"/>
-          </xsl:otherwise>
-        </xsl:choose>
-        <xsl:apply-templates select="indexterm"/>
-      </fo:block>
-    </fo:list-item-label>
-
-    <fo:list-item-body start-indent="body-start()">
-      <xsl:apply-templates select="glosssee|glossdef" mode="glossary.as.list"/>
-    </fo:list-item-body>
-  </fo:list-item>
-</xsl:template>
-
-<xsl:template match="glossentry/glossterm" mode="glossary.as.list">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-  <fo:inline id="{$id}">
-    <xsl:apply-templates/>
-  </fo:inline>
-  <xsl:if test="following-sibling::glossterm">, </xsl:if>
-</xsl:template>
-
-<xsl:template match="glossentry/acronym" mode="glossary.as.list">
-  <xsl:apply-templates/>
-  <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if>
-</xsl:template>
-
-<xsl:template match="glossentry/abbrev" mode="glossary.as.list">
-  <xsl:apply-templates/>
-  <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if>
-</xsl:template>
-
-<xsl:template match="glossentry/revhistory" mode="glossary.as.list">
-</xsl:template>
-
-<xsl:template match="glossentry/glosssee" mode="glossary.as.list">
-  <xsl:variable name="otherterm" select="@otherterm"/>
-  <xsl:variable name="targets" select="key('id', $otherterm)"/>
-  <xsl:variable name="target" select="$targets[1]"/>
-
-  <fo:block>
-    <xsl:variable name="template">
-      <xsl:call-template name="gentext.template">
-        <xsl:with-param name="context" select="'glossary'"/>
-        <xsl:with-param name="name" select="'see'"/>
-      </xsl:call-template>
-    </xsl:variable>
-    <xsl:variable name="title">
-      <xsl:choose>
-        <xsl:when test="$target">
-          <fo:basic-link internal-destination="{$otherterm}"
-                         xsl:use-attribute-sets="xref.properties">
-            <xsl:apply-templates select="$target" mode="xref-to"/>
-          </fo:basic-link>
-        </xsl:when>
-        <xsl:when test="$otherterm != '' and not($target)">
-          <xsl:message>
-            <xsl:text>Warning: glosssee @otherterm reference not found: </xsl:text>
-            <xsl:value-of select="$otherterm"/>
-          </xsl:message>
-          <xsl:apply-templates mode="glossary.as.list"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates mode="glossary.as.list"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:call-template name="substitute-markup">
-      <xsl:with-param name="template" select="$template"/>
-      <xsl:with-param name="title" select="$title"/>
-    </xsl:call-template>
-
-    <xsl:text>.</xsl:text>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="glossentry/glossdef" mode="glossary.as.list">
-  <xsl:apply-templates select="*[local-name(.) != 'glossseealso']"/>
-  <xsl:if test="glossseealso">
-    <fo:block>
-      <xsl:variable name="template">
-        <xsl:call-template name="gentext.template">
-          <xsl:with-param name="context" select="'glossary'"/>
-          <xsl:with-param name="name" select="'seealso'"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:variable name="title">
-        <xsl:apply-templates select="glossseealso" mode="glossary.as.list"/>
-      </xsl:variable>
-      <xsl:call-template name="substitute-markup">
-        <xsl:with-param name="template" select="$template"/>
-        <xsl:with-param name="title" select="$title"/>
-      </xsl:call-template>
-    </fo:block>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="glossentry/glossdef/para[1]|glossentry/glossdef/simpara[1]"
-              mode="glossary.as.list">
-  <fo:block>
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="glossseealso" mode="glossary.as.list">
-  <xsl:variable name="otherterm" select="@otherterm"/>
-  <xsl:variable name="targets" select="key('id', $otherterm)"/>
-  <xsl:variable name="target" select="$targets[1]"/>
-
-  <xsl:choose>
-    <xsl:when test="$target">
-      <fo:basic-link internal-destination="{$otherterm}"
-                     xsl:use-attribute-sets="xref.properties">
-        <xsl:apply-templates select="$target" mode="xref-to"/>
-      </fo:basic-link>
-    </xsl:when>
-    <xsl:when test="$otherterm != '' and not($target)">
-      <xsl:message>
-        <xsl:text>Warning: glossseealso @otherterm reference not found: </xsl:text>
-        <xsl:value-of select="$otherterm"/>
-      </xsl:message>
-      <xsl:apply-templates mode="glossary.as.list"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates mode="glossary.as.list"/>
-    </xsl:otherwise>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="position() = last()">
-      <xsl:text>.</xsl:text>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:text>, </xsl:text>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-<!-- Format glossary blocks -->
-
-<xsl:template match="glossdiv" mode="glossary.as.blocks">
-  &setup-language-variable;
-  <xsl:variable name="entries" select="glossentry"/>
-  <xsl:variable name="preamble"
-                select="*[not(self::title
-                            or self::subtitle
-                            or self::glossentry)]"/>
-
-  <xsl:call-template name="glossdiv.titlepage"/>
-
-  <xsl:apply-templates select="$preamble"/>
-
-  <xsl:choose>
-    <xsl:when test="$glossary.sort != 0">
-      <xsl:apply-templates select="$entries" mode="glossary.as.blocks">
-        <xsl:sort lang="{$language}"
-                  select="translate(glossterm, $lowercase, 
-                                    $uppercase)"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates select="$entries" mode="glossary.as.blocks"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!--
-GlossEntry ::=
-  GlossTerm, Acronym?, Abbrev?,
-  (IndexTerm)*,
-  RevHistory?,
-  (GlossSee | GlossDef+)
--->
-
-<xsl:template match="glossentry" mode="glossary.as.blocks">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <fo:block xsl:use-attribute-sets="list.item.spacing"
-           keep-with-next.within-column="always" 
-           keep-together.within-column="always">
-    <xsl:call-template name="anchor">
-      <xsl:with-param name="conditional">
-        <xsl:choose>
-          <xsl:when test="$glossterm.auto.link != 0
-                          or $glossary.collection != ''">0</xsl:when>
-          <xsl:otherwise>1</xsl:otherwise>
-        </xsl:choose>
-      </xsl:with-param>
-    </xsl:call-template>
-
-    <xsl:choose>
-      <xsl:when test="$glossentry.show.acronym = 'primary'">
-        <xsl:choose>
-          <xsl:when test="acronym|abbrev">
-            <xsl:apply-templates select="acronym|abbrev" mode="glossary.as.blocks"/>
-            <xsl:text> (</xsl:text>
-            <xsl:apply-templates select="glossterm" mode="glossary.as.blocks"/>
-            <xsl:text>)</xsl:text>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:apply-templates select="glossterm" mode="glossary.as.blocks"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:when>
-
-      <xsl:when test="$glossentry.show.acronym = 'yes'">
-        <xsl:apply-templates select="glossterm" mode="glossary.as.blocks"/>
-
-        <xsl:if test="acronym|abbrev">
-          <xsl:text> (</xsl:text>
-          <xsl:apply-templates select="acronym|abbrev" mode="glossary.as.blocks"/>
-          <xsl:text>)</xsl:text>
-        </xsl:if>
-      </xsl:when>
-
-      <xsl:otherwise>
-        <xsl:apply-templates select="glossterm" mode="glossary.as.blocks"/>
-      </xsl:otherwise>
-    </xsl:choose>
-
-    <xsl:apply-templates select="indexterm"/>
-  </fo:block>
-
-  <fo:block margin-left="0.25in">
-    <xsl:apply-templates select="glosssee|glossdef" mode="glossary.as.blocks"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="glossentry/glossterm" mode="glossary.as.blocks">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-  <fo:inline id="{$id}">
-    <xsl:apply-templates/>
-  </fo:inline>
-  <xsl:if test="following-sibling::glossterm">, </xsl:if>
-</xsl:template>
-
-<xsl:template match="glossentry/acronym" mode="glossary.as.blocks">
-  <xsl:apply-templates/>
-  <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if>
-</xsl:template>
-
-<xsl:template match="glossentry/abbrev" mode="glossary.as.blocks">
-  <xsl:apply-templates/>
-  <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if>
-</xsl:template>
-
-<xsl:template match="glossentry/glosssee" mode="glossary.as.blocks">
-  <xsl:variable name="otherterm" select="@otherterm"/>
-  <xsl:variable name="targets" select="key('id', $otherterm)"/>
-  <xsl:variable name="target" select="$targets[1]"/>
-
-  <xsl:variable name="template">
-    <xsl:call-template name="gentext.template">
-      <xsl:with-param name="context" select="'glossary'"/>
-      <xsl:with-param name="name" select="'see'"/>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:variable name="title">
-    <xsl:choose>
-      <xsl:when test="$target">
-        <fo:basic-link internal-destination="{$otherterm}"
-                       xsl:use-attribute-sets="xref.properties">
-          <xsl:apply-templates select="$target" mode="xref-to"/>
-        </fo:basic-link>
-      </xsl:when>
-      <xsl:when test="$otherterm != '' and not($target)">
-        <xsl:message>
-          <xsl:text>Warning: glosssee @otherterm reference not found: </xsl:text>
-          <xsl:value-of select="$otherterm"/>
-        </xsl:message>
-        <xsl:apply-templates mode="glossary.as.blocks"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:apply-templates mode="glossary.as.blocks"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-  <xsl:call-template name="substitute-markup">
-    <xsl:with-param name="template" select="$template"/>
-    <xsl:with-param name="title" select="$title"/>
-  </xsl:call-template>
-
-  <xsl:text>.</xsl:text>
-</xsl:template>
-
-<xsl:template match="glossentry/glossdef" mode="glossary.as.blocks">
-  <xsl:apply-templates select="*[local-name(.) != 'glossseealso']"
-                       mode="glossary.as.blocks"/>
-  <xsl:if test="glossseealso">
-    <fo:block>
-      <xsl:variable name="template">
-        <xsl:call-template name="gentext.template">
-          <xsl:with-param name="context" select="'glossary'"/>
-          <xsl:with-param name="name" select="'seealso'"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:variable name="title">
-        <xsl:apply-templates select="glossseealso" mode="glossary.as.blocks"/>
-      </xsl:variable>
-      <xsl:call-template name="substitute-markup">
-        <xsl:with-param name="template" select="$template"/>
-        <xsl:with-param name="title" select="$title"/>
-      </xsl:call-template>
-    </fo:block>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="glossentry/glossdef/para[1]|glossentry/glossdef/simpara[1]"
-              mode="glossary.as.blocks">
-  <fo:block>
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<!-- Handle any other glossdef content normally -->
-<xsl:template match="*" mode="glossary.as.blocks">
-  <xsl:apply-templates select="." />
-</xsl:template>
-
-<xsl:template match="glossseealso" mode="glossary.as.blocks">
-  <xsl:variable name="otherterm" select="@otherterm"/>
-  <xsl:variable name="targets" select="key('id', $otherterm)"/>
-  <xsl:variable name="target" select="$targets[1]"/>
-
-  <xsl:choose>
-    <xsl:when test="$target">
-      <fo:basic-link internal-destination="{$otherterm}"
-                     xsl:use-attribute-sets="xref.properties">
-        <xsl:apply-templates select="$target" mode="xref-to"/>
-      </fo:basic-link>
-    </xsl:when>
-    <xsl:when test="$otherterm != '' and not($target)">
-      <xsl:message>
-        <xsl:text>Warning: glossseealso @otherterm reference not found: </xsl:text>
-        <xsl:value-of select="$otherterm"/>
-      </xsl:message>
-      <xsl:apply-templates mode="glossary.as.blocks"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates mode="glossary.as.blocks"/>
-    </xsl:otherwise>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="position() = last()">
-      <xsl:text>.</xsl:text>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:text>, </xsl:text>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/graphics.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/graphics.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,637 +1,0 @@
-<?xml version='1.0'?>
-<!DOCTYPE xsl:stylesheet [
-<!ENTITY lowercase "'abcdefghijklmnopqrstuvwxyz'">
-<!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'">
- ]>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                xmlns:xlink="http://www.w3.org/1999/xlink"
-                xmlns:stext="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.TextFactory"
-                xmlns:xtext="com.nwalsh.xalan.Text"
-                xmlns:lxslt="http://xml.apache.org/xslt"
-                exclude-result-prefixes="xlink stext xtext lxslt"
-                extension-element-prefixes="stext xtext"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     Contributors:
-     Colin Paul Adams, <colin@colina.demon.co.uk>
-     Paul Grosso, <pgrosso@arbortext.com>
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-<!-- Graphic format tests for the FO backend -->
-
-<xsl:param name="graphic.notations">
-  <!-- n.b. exactly one leading space, one trailing space, and one inter-word space -->
-  <xsl:choose>
-    <xsl:when test="$passivetex.extensions != 0">
-      <xsl:text> PNG PDF JPG JPEG linespecific </xsl:text>
-    </xsl:when>
-    <xsl:when test="$fop1.extensions != 0">
-      <xsl:text> BMP GIF TIFF SVG PNG EPS JPG JPEG linespecific </xsl:text>
-    </xsl:when>
-    <xsl:when test="$fop.extensions != 0">
-      <xsl:text> BMP GIF TIFF SVG PNG EPS JPG JPEG linespecific </xsl:text>
-    </xsl:when>
-    <xsl:when test="$arbortext.extensions != 0">
-      <xsl:text> PNG PDF JPG JPEG linespecific GIF GIF87a GIF89a TIFF BMP </xsl:text>
-    </xsl:when>
-    <xsl:when test="$xep.extensions != 0">
-      <xsl:text> SVG PNG PDF JPG JPEG linespecific GIF GIF87a GIF89a TIFF BMP </xsl:text>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:text> PNG PDF JPG JPEG linespecific GIF GIF87a GIF89a TIFF BMP </xsl:text>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:param>
-
-<xsl:template name="is.graphic.format">
-  <xsl:param name="format"/>
-  <xsl:if test="contains($graphic.notations, concat(' ',$format,' '))">1</xsl:if>
-</xsl:template>
-
-<xsl:param name="graphic.extensions">
-  <!-- n.b. exactly one leading space, one trailing space, and one inter-word space -->
-  <xsl:choose>
-    <xsl:when test="$passivetex.extensions != 0">
-      <xsl:text> png pdf jpg jpeg </xsl:text>
-    </xsl:when>
-    <xsl:when test="$fop1.extensions != 0">
-      <xsl:text> bmp gif tif tiff svg png pdf jpg jpeg eps </xsl:text>
-    </xsl:when>
-    <xsl:when test="$fop.extensions != 0">
-      <xsl:text> bmp gif tif tiff svg png pdf jpg jpeg eps </xsl:text>
-    </xsl:when>
-    <xsl:when test="$arbortext.extensions != 0">
-      <xsl:text> png pdf jpg jpeg gif tif tiff bmp </xsl:text>
-    </xsl:when>
-    <xsl:when test="$xep.extensions != 0">
-      <xsl:text> svg png pdf jpg jpeg gif tif tiff bmp eps </xsl:text>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:text> svg png pdf jpg jpeg gif tif tiff bmp eps </xsl:text>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:param>
-
-<xsl:template name="is.graphic.extension">
-  <xsl:param name="ext"/>
-  <xsl:variable name="lcext" select="translate($ext,
-                                       'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
-                                       'abcdefghijklmnopqrstuvwxyz')"/>
-
-  <xsl:if test="contains($graphic.extensions,
-                         concat(' ', $lcext, ' '))">1</xsl:if>
-</xsl:template>
-
-<xsl:template name="graphic.format.content-type">
-  <xsl:param name="format"/>
-  <xsl:variable name="is.graphic.format">
-    <xsl:call-template name="is.graphic.format">
-      <xsl:with-param name="format" select="$format"/>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:if test="$is.graphic.format">
-    <xsl:choose>
-      <xsl:when test="$format = ''"></xsl:when>
-      <xsl:when test="$format = 'linespecific'"></xsl:when>
-      <xsl:when test="$format = 'PS'">application/postscript</xsl:when>
-      <xsl:when test="$format = 'PDF'">application/pdf</xsl:when>
-      <xsl:when test="$format = 'PNG'">image/png</xsl:when>
-      <xsl:when test="$format = 'SVG'">image/svg+xml</xsl:when>
-      <xsl:when test="$format = 'JPG'">image/jpeg</xsl:when>
-      <xsl:when test="$format = 'GIF87a'">image/gif</xsl:when>
-      <xsl:when test="$format = 'GIF89a'">image/gif</xsl:when>
-      <xsl:otherwise>
-          <xsl:value-of select="concat('image/', 
-            translate($format, &uppercase;, &lowercase;))"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:if>
-</xsl:template>
-
-
-<!-- ==================================================================== -->
-
-<xsl:template match="screenshot">
-  <fo:block>
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="screeninfo">
-</xsl:template>
-
-<!-- ==================================================================== -->
-<!-- Override these templates for FO -->
-<!-- ==================================================================== -->
-
-<xsl:template name="process.image">
-  <!-- When this template is called, the current node should be  -->
-  <!-- a graphic, inlinegraphic, imagedata, or videodata. All    -->
-  <!-- those elements have the same set of attributes, so we can -->
-  <!-- handle them all in one place.                             -->
-
-  <xsl:variable name="scalefit">
-    <xsl:choose>
-      <xsl:when test="$ignore.image.scaling != 0">0</xsl:when>
-      <xsl:when test="@contentwidth">0</xsl:when>
-      <xsl:when test="@contentdepth and 
-                      @contentdepth != '100%'">0</xsl:when>
-      <xsl:when test="@scale">0</xsl:when>
-      <xsl:when test="@scalefit"><xsl:value-of select="@scalefit"/></xsl:when>
-      <xsl:when test="@width or @depth">1</xsl:when>
-      <xsl:otherwise>0</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="scale">
-    <xsl:choose>
-      <xsl:when test="$ignore.image.scaling != 0">0</xsl:when>
-      <xsl:when test="@contentwidth or @contentdepth">1.0</xsl:when>
-      <xsl:when test="@scale">
-        <xsl:value-of select="@scale div 100.0"/>
-      </xsl:when>
-      <xsl:otherwise>1.0</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="filename">
-    <xsl:choose>
-      <xsl:when test="local-name(.) = 'graphic'
-                      or local-name(.) = 'inlinegraphic'">
-        <!-- handle legacy graphic and inlinegraphic by new template --> 
-        <xsl:call-template name="mediaobject.filename">
-          <xsl:with-param name="object" select="."/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <!-- imagedata, videodata, audiodata -->
-        <xsl:call-template name="mediaobject.filename">
-          <xsl:with-param name="object" select=".."/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="content-type">
-    <xsl:if test="@format">
-      <xsl:call-template name="graphic.format.content-type">
-        <xsl:with-param name="format" select="@format"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="bgcolor">
-    <xsl:call-template name="pi.dbfo_background-color">
-      <xsl:with-param name="node" select=".."/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <fo:external-graphic>
-    <xsl:attribute name="src">
-      <xsl:call-template name="fo-external-image">
-        <xsl:with-param name="filename">
-          <xsl:if test="$img.src.path != '' and
-                        not(starts-with($filename, '/')) and
-                        not(contains($filename, '://'))">
-            <xsl:value-of select="$img.src.path"/>
-          </xsl:if>
-          <xsl:value-of select="$filename"/>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="width">
-      <xsl:choose>
-        <xsl:when test="$ignore.image.scaling != 0">auto</xsl:when>
-        <xsl:when test="contains(@width,'%')">
-          <xsl:value-of select="@width"/>
-        </xsl:when>
-        <xsl:when test="@width and not(@width = '')">
-          <xsl:call-template name="length-spec">
-            <xsl:with-param name="length" select="@width"/>
-            <xsl:with-param name="default.units" select="'px'"/>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:when test="not(@depth) and $default.image.width != ''">
-          <xsl:call-template name="length-spec">
-            <xsl:with-param name="length" select="$default.image.width"/>
-            <xsl:with-param name="default.units" select="'px'"/>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:otherwise>auto</xsl:otherwise>
-      </xsl:choose>
-    </xsl:attribute>
-
-    <xsl:attribute name="height">
-      <xsl:choose>
-        <xsl:when test="$ignore.image.scaling != 0">auto</xsl:when>
-        <xsl:when test="contains(@depth,'%')">
-          <xsl:value-of select="@depth"/>
-        </xsl:when>
-        <xsl:when test="@depth">
-          <xsl:call-template name="length-spec">
-            <xsl:with-param name="length" select="@depth"/>
-            <xsl:with-param name="default.units" select="'px'"/>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:otherwise>auto</xsl:otherwise>
-      </xsl:choose>
-    </xsl:attribute>
-
-    <xsl:attribute name="content-width">
-      <xsl:choose>
-        <xsl:when test="$ignore.image.scaling != 0">auto</xsl:when>
-        <xsl:when test="contains(@contentwidth,'%')">
-          <xsl:value-of select="@contentwidth"/>
-        </xsl:when>
-        <xsl:when test="@contentwidth">
-          <xsl:call-template name="length-spec">
-            <xsl:with-param name="length" select="@contentwidth"/>
-            <xsl:with-param name="default.units" select="'px'"/>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:when test="number($scale) != 1.0">
-          <xsl:value-of select="$scale * 100"/>
-          <xsl:text>%</xsl:text>
-        </xsl:when>
-        <xsl:when test="$scalefit = 1">scale-to-fit</xsl:when>
-        <xsl:otherwise>auto</xsl:otherwise>
-      </xsl:choose>
-    </xsl:attribute>
-
-    <xsl:attribute name="content-height">
-      <xsl:choose>
-        <xsl:when test="$ignore.image.scaling != 0">auto</xsl:when>
-        <xsl:when test="contains(@contentdepth,'%')">
-          <xsl:value-of select="@contentdepth"/>
-        </xsl:when>
-        <xsl:when test="@contentdepth">
-          <xsl:call-template name="length-spec">
-            <xsl:with-param name="length" select="@contentdepth"/>
-            <xsl:with-param name="default.units" select="'px'"/>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:when test="number($scale) != 1.0">
-          <xsl:value-of select="$scale * 100"/>
-          <xsl:text>%</xsl:text>
-        </xsl:when>
-        <xsl:when test="$scalefit = 1">scale-to-fit</xsl:when>
-        <xsl:otherwise>auto</xsl:otherwise>
-      </xsl:choose>
-    </xsl:attribute>
-
-    <xsl:if test="$content-type != ''">
-      <xsl:attribute name="content-type">
-        <xsl:value-of select="concat('content-type:',$content-type)"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:if test="$bgcolor != ''">
-      <xsl:attribute name="background-color">
-        <xsl:value-of select="$bgcolor"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:if test="@align">
-      <xsl:attribute name="text-align">
-        <xsl:value-of select="@align"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:if test="@valign">
-      <xsl:attribute name="display-align">
-        <xsl:choose>
-          <xsl:when test="@valign = 'top'">before</xsl:when>
-          <xsl:when test="@valign = 'middle'">center</xsl:when>
-          <xsl:when test="@valign = 'bottom'">after</xsl:when>
-          <xsl:otherwise>auto</xsl:otherwise>
-        </xsl:choose>
-      </xsl:attribute>
-    </xsl:if>
-  </fo:external-graphic>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="graphic">
-  <xsl:choose>
-    <xsl:when test="parent::inlineequation">
-      <xsl:call-template name="process.image"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:block>
-        <xsl:if test="@align">
-          <xsl:attribute name="text-align">
-            <xsl:value-of select="@align"/>
-          </xsl:attribute>
-        </xsl:if>
-        <xsl:call-template name="process.image"/>
-      </fo:block>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="inlinegraphic">
-  <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
-  <xsl:variable name="filename">
-    <xsl:choose>
-      <xsl:when test="@entityref">
-        <xsl:value-of select="unparsed-entity-uri(@entityref)"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:apply-templates select="@fileref"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="@format='linespecific'">
-      <xsl:choose>
-        <xsl:when test="$use.extensions != '0'
-                        and $textinsert.extension != '0'">
-          <xsl:choose>
-            <xsl:when test="contains($vendor, 'SAXON')">
-              <stext:insertfile href="{$filename}" encoding="{$textdata.default.encoding}"/>
-            </xsl:when>
-            <xsl:when test="contains($vendor, 'Apache Software Foundation')">
-              <xtext:insertfile href="{$filename}"/>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:message terminate="yes">
-                <xsl:text>Don't know how to insert files with </xsl:text>
-                <xsl:value-of select="$vendor"/>
-              </xsl:message>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-	<xsl:otherwise>
-	  <xsl:message terminate="yes">
-	    <xsl:text>Cannot insert </xsl:text><xsl:value-of select="$filename"/>
-	    <xsl:text>. Check use.extensions and textinsert.extension parameters.</xsl:text> 
-	  </xsl:message>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="process.image"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="mediaobject|mediaobjectco">
-
-  <xsl:variable name="olist" select="imageobject|imageobjectco
-                     |videoobject|audioobject
-                     |textobject"/>
-
-  <xsl:variable name="object.index">
-    <xsl:call-template name="select.mediaobject.index">
-      <xsl:with-param name="olist" select="$olist"/>
-      <xsl:with-param name="count" select="1"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="object" select="$olist[position() = $object.index]"/>
-
-  <xsl:variable name="align">
-    <xsl:value-of select="$object/descendant::imagedata[@align][1]/@align"/>
-  </xsl:variable>
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <fo:block id="{$id}">
-    <xsl:if test="$align != '' ">
-      <xsl:attribute name="text-align">
-        <xsl:value-of select="$align"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:apply-templates select="$object"/>
-    <xsl:apply-templates select="caption"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="inlinemediaobject">
-  <xsl:call-template name="select.mediaobject"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="imageobjectco">
-  <xsl:apply-templates select="imageobject"/>
-  <xsl:apply-templates select="calloutlist"/>
-</xsl:template>
-
-<xsl:template match="imageobject">
-  <xsl:choose>
-    <xsl:when test="imagedata">
-      <xsl:apply-templates select="imagedata"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:instream-foreign-object>
-        <xsl:apply-templates mode="copy-all"/>
-      </fo:instream-foreign-object>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="*" mode="copy-all">
-  <xsl:copy>
-    <xsl:for-each select="@*">
-      <xsl:copy/>
-    </xsl:for-each>
-    <xsl:apply-templates mode="copy-all"/>
-  </xsl:copy>
-</xsl:template>
-
-<xsl:template match="text()|comment()|processing-instruction()" mode="copy-all">
-  <xsl:copy/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="imagedata">
-  <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
-  <xsl:variable name="filename">
-    <xsl:call-template name="mediaobject.filename">
-      <xsl:with-param name="object" select=".."/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="@format='linespecific'">
-      <xsl:choose>
-        <xsl:when test="$use.extensions != '0'
-                        and $textinsert.extension != '0'">
-          <xsl:choose>
-            <xsl:when test="contains($vendor, 'SAXON')">
-              <stext:insertfile href="{$filename}" encoding="{$textdata.default.encoding}"/>
-            </xsl:when>
-            <xsl:when test="contains($vendor, 'Apache Software Foundation')">
-              <xtext:insertfile href="{$filename}"/>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:message terminate="yes">
-                <xsl:text>Don't know how to insert files with </xsl:text>
-                <xsl:value-of select="$vendor"/>
-              </xsl:message>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-        <xsl:otherwise>
-	  <xsl:message terminate="yes">
-	    <xsl:text>Cannot insert </xsl:text><xsl:value-of select="$filename"/>
-	    <xsl:text>. Check use.extensions and textinsert.extension parameters.</xsl:text> 
-	  </xsl:message>
-	</xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="process.image"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="videoobject">
-  <xsl:apply-templates select="videodata"/>
-</xsl:template>
-
-<xsl:template match="videodata">
-  <xsl:call-template name="process.image"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="audioobject">
-  <xsl:apply-templates select="audiodata"/>
-</xsl:template>
-
-<xsl:template match="audiodata">
-  <xsl:call-template name="process.image"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="textobject">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="textdata">
-  <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
-  <xsl:variable name="filename">
-    <xsl:choose>
-      <xsl:when test="@entityref">
-        <xsl:value-of select="unparsed-entity-uri(@entityref)"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:apply-templates select="@fileref"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="encoding">
-    <xsl:choose>
-      <xsl:when test="@encoding">
-        <xsl:value-of select="@encoding"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$textdata.default.encoding"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$use.extensions != '0'
-                    and $textinsert.extension != '0'">
-      <xsl:choose>
-        <xsl:when test="element-available('stext:insertfile')">
-          <stext:insertfile href="{$filename}" encoding="{$encoding}"/>
-        </xsl:when>
-        <xsl:when test="element-available('xtext:insertfile')">
-          <xtext:insertfile href="{$filename}"/>
-        </xsl:when>
-	<xsl:otherwise>
-	  <xsl:message terminate="yes">
-	    <xsl:text>Don't know how to insert files with </xsl:text>
-	    <xsl:value-of select="$vendor"/>
-	  </xsl:message>
-	</xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:message terminate="yes">
-	<xsl:text>Cannot insert </xsl:text><xsl:value-of select="$filename"/>
-	<xsl:text>. Check use.extensions and textinsert.extension parameters.</xsl:text> 
-      </xsl:message>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="caption">
-  <fo:block>
-    <xsl:if test="@align = 'right' or @align = 'left' or @align='center'">
-      <xsl:attribute name="text-align"><xsl:value-of
-                         select="@align"/></xsl:attribute>
-    </xsl:if>
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="fo-external-image">
-  <xsl:param name="filename"/>
-
-  <xsl:choose>
-    <xsl:when test="$passivetex.extensions != 0
-                    or $fop.extensions != 0">
-      <xsl:value-of select="$filename"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="concat('url(', $filename, ')')"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- Resolve xml:base attributes -->
-<xsl:template match="@fileref">
-  <!-- need a check for absolute urls -->
-  <xsl:choose>
-    <xsl:when test="contains(., ':') or starts-with(.,'/')">
-      <!-- it has a uri scheme or starts with '/', so it is an absolute uri -->
-      <xsl:value-of select="."/>
-    </xsl:when>
-    <xsl:when test="$keep.relative.image.uris != 0">
-      <!-- leave it alone -->
-      <xsl:value-of select="."/>
-    </xsl:when>
-    <xsl:otherwise>
-      <!-- its a relative uri -->
-      <xsl:call-template name="relative-uri">
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/highlight.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/highlight.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,57 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-		xmlns:fo="http://www.w3.org/1999/XSL/Format"
-		xmlns:xslthl="http://xslthl.sf.net"
-                exclude-result-prefixes="xslthl"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     and other information.
-
-     ******************************************************************** -->
-
-<xsl:template match='xslthl:keyword'>
-  <fo:inline font-weight="bold"><xsl:apply-templates/></fo:inline>
-</xsl:template>
-
-<xsl:template match='xslthl:string'>
-  <fo:inline font-weight="bold" font-style="italic"><xsl:apply-templates/></fo:inline>
-</xsl:template>
-
-<xsl:template match='xslthl:comment'>
-  <fo:inline font-style="italic"><xsl:apply-templates/></fo:inline>
-</xsl:template>
-
-<xsl:template match='xslthl:tag'>
-  <fo:inline font-weight="bold"><xsl:apply-templates/></fo:inline>
-</xsl:template>
-
-<xsl:template match='xslthl:attribute'>
-  <fo:inline font-weight="bold"><xsl:apply-templates/></fo:inline>
-</xsl:template>
-
-<xsl:template match='xslthl:value'>
-  <fo:inline font-weight="bold"><xsl:apply-templates/></fo:inline>
-</xsl:template>
-
-<!--
-<xsl:template match='xslthl:html'>
-  <span style='background:#AFF'><font color='blue'><xsl:apply-templates/></font></span>
-</xsl:template>
-
-<xsl:template match='xslthl:xslt'>
-  <span style='background:#AAA'><font color='blue'><xsl:apply-templates/></font></span>
-</xsl:template>
-
-<xsl:template match='xslthl:section'>
-  <span style='background:yellow'><xsl:apply-templates/></span>
-</xsl:template>
--->
-
-</xsl:stylesheet>
-
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/htmltbl.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/htmltbl.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,217 +1,0 @@
-<?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:attribute-set name="th.style">
-  <xsl:attribute name="font-weight">bold</xsl:attribute>
-</xsl:attribute-set>
-
-<!-- Outputs an fo:table only, not the caption -->
-<xsl:template match="table|informaltable" mode="htmlTable">
-
-  <xsl:variable name="numcols">
-    <xsl:call-template name="widest-html-row">
-      <xsl:with-param name="rows" select=".//tr"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="prop-columns"
-                select=".//col[contains(@width, '%')] |
-                        .//colgroup[contains(@width, '%')]"/>
-
-  <xsl:variable name="table.width">
-    <xsl:call-template name="table.width"/>
-  </xsl:variable>
-
-  <fo:table xsl:use-attribute-sets="table.table.properties">
-    <xsl:choose>
-      <xsl:when test="$fop.extensions != 0 or
-                      $passivetex.extensions != 0">
-        <xsl:attribute name="table-layout">fixed</xsl:attribute>
-      </xsl:when>
-    </xsl:choose>
-    <xsl:attribute name="width">
-      <xsl:choose>
-        <xsl:when test="@width">
-          <xsl:value-of select="@width"/>
-        </xsl:when>
-        <xsl:when test="$table.width">
-          <xsl:value-of select="$table.width"/>
-        </xsl:when>
-        <xsl:otherwise>100%</xsl:otherwise>
-      </xsl:choose>
-    </xsl:attribute>
-    <xsl:call-template name="make-html-table-columns">
-      <xsl:with-param name="count" select="$numcols"/>
-    </xsl:call-template>
-    <xsl:apply-templates select="thead" mode="htmlTable"/>
-    <xsl:apply-templates select="tfoot" mode="htmlTable"/>
-    <xsl:choose>
-      <xsl:when test="tbody">
-        <xsl:apply-templates select="tbody" mode="htmlTable"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <fo:table-body start-indent="0pt" end-indent="0pt">
-          <xsl:apply-templates select="tr" mode="htmlTable"/>
-        </fo:table-body>
-      </xsl:otherwise>
-    </xsl:choose>
-  </fo:table>
-
-</xsl:template>
-
-<xsl:template match="caption" mode="htmlTable">
-  <!-- Handled by formal.object.heading -->
-</xsl:template>
-
-<xsl:template name="widest-html-row">
-  <xsl:param name="rows" select="''"/>
-  <xsl:param name="count" select="0"/>
-  <xsl:choose>
-    <xsl:when test="count($rows) = 0">
-      <xsl:value-of select="$count"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="$count &gt; count($rows[1]/*)">
-          <xsl:call-template name="widest-html-row">
-            <xsl:with-param name="rows" select="$rows[position() &gt; 1]"/>
-            <xsl:with-param name="count" select="$count"/>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="widest-html-row">
-            <xsl:with-param name="rows" select="$rows[position() &gt; 1]"/>
-            <xsl:with-param name="count" select="count($rows[1]/*)"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="make-html-table-columns">
-  <xsl:param name="count" select="0"/>
-  <xsl:param name="number" select="1"/>
-
-  <xsl:choose>
-    <xsl:when test="col|colgroup/col">
-      <xsl:for-each select="col|colgroup/col">
-        <fo:table-column>
-          <xsl:attribute name="column-number">
-            <xsl:number from="table|informaltable" level="any" format="1"/>
-          </xsl:attribute>
-          <xsl:if test="@width">
-            <xsl:attribute name="column-width">
-              <xsl:choose>
-                <xsl:when test="$fop.extensions != 0 and 
-                                contains(@width, '%')">
-                  <xsl:value-of select="concat('proportional-column-width(',
-                                               substring-before(@width, '%'),
-                                               ')')"/>
-                </xsl:when>
-                <xsl:otherwise>
-                  <xsl:value-of select="@width"/>
-                </xsl:otherwise>
-              </xsl:choose>
-            </xsl:attribute>
-          </xsl:if>
-        </fo:table-column>
-      </xsl:for-each>
-    </xsl:when>
-    <xsl:when test="$fop.extensions != 0">
-      <xsl:if test="$number &lt;= $count">
-        <fo:table-column column-number="{$number}"
-                         column-width="{6.5 div $count}in"/>
-        <xsl:call-template name="make-html-table-columns">
-          <xsl:with-param name="count" select="$count"/>
-          <xsl:with-param name="number" select="$number + 1"/>
-        </xsl:call-template>
-      </xsl:if>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="tbody" mode="htmlTable">
-  <fo:table-body border-bottom-width="0.25pt"
-                 border-bottom-style="solid"
-                 border-bottom-color="black"
-                 start-indent="0pt"
-                 end-indent="0pt">
-    <xsl:apply-templates mode="htmlTable"/>
-  </fo:table-body>
-</xsl:template>
-
-<xsl:template match="td" mode="htmlTable">
-  <xsl:variable name="bgcolor">
-    <xsl:call-template name="pi.dbfo_bgcolor"/>
-  </xsl:variable>
-  <fo:table-cell xsl:use-attribute-sets="table.cell.padding">
-    <xsl:call-template name="table.cell.properties">
-      <xsl:with-param name="bgcolor.pi" select="$bgcolor"/>
-      <xsl:with-param name="rowsep.inherit" select="0"/>
-      <xsl:with-param name="colsep.inherit" select="0"/>
-    </xsl:call-template>
-    <fo:block>
-      <xsl:call-template name="table.cell.block.properties"/>
-      <xsl:apply-templates/>
-    </fo:block>
-  </fo:table-cell>
-</xsl:template>
-
-<xsl:template match="tfoot" mode="htmlTable">
-  <fo:table-footer start-indent="0pt"
-                   end-indent="0pt">
-    <xsl:apply-templates mode="htmlTable"/>
-  </fo:table-footer>
-</xsl:template>
-
-<xsl:template match="th" mode="htmlTable">
-  <xsl:variable name="bgcolor">
-    <xsl:call-template name="pi.dbfo_bgcolor"/>
-  </xsl:variable>
-  <fo:table-cell xsl:use-attribute-sets="th.style table.cell.padding">
-    <xsl:call-template name="table.cell.properties">
-      <xsl:with-param name="bgcolor.pi" select="$bgcolor"/>
-      <xsl:with-param name="rowsep.inherit" select="0"/>
-      <xsl:with-param name="colsep.inherit" select="0"/>
-    </xsl:call-template>
-    <fo:block>
-      <xsl:call-template name="table.cell.block.properties"/>
-      <xsl:apply-templates/>
-    </fo:block>
-  </fo:table-cell>
-</xsl:template>
-
-<xsl:template match="thead" mode="htmlTable">
-  <fo:table-header border-bottom-width="0.25pt"
-                   border-bottom-style="solid"
-                   border-bottom-color="black"
-                   start-indent="0pt"
-                   end-indent="0pt"
-                   font-weight="bold">
-    <xsl:apply-templates mode="htmlTable"/>
-  </fo:table-header>
-</xsl:template>
-
-<xsl:template match="tr" mode="htmlTable">
-  <fo:table-row>
-    <xsl:call-template name="table.row.properties"/>
-    <xsl:apply-templates mode="htmlTable"/>
-  </fo:table-row>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/index.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/index.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,479 +1,0 @@
-<?xml version='1.0'?>
-<!DOCTYPE xsl:stylesheet [
-<!ENTITY primary   'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'>
-<!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas)]))'>
-<!ENTITY tertiary  'normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas)]))'>
-]>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                xmlns:rx="http://www.renderx.com/XSL/Extensions"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:template match="index">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
- <xsl:if test="$generate.index != 0">
-  <xsl:choose>
-    <xsl:when test="$make.index.markup != 0">
-      <fo:block>
-        <xsl:call-template name="generate-index-markup">
-          <xsl:with-param name="scope" select="(ancestor::book|/)[last()]"/>
-        </xsl:call-template>
-      </fo:block>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:block id="{$id}">
-        <xsl:call-template name="index.titlepage"/>
-      </fo:block>
-      <xsl:apply-templates/>
-      <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0">
-        <xsl:call-template name="generate-index">
-          <xsl:with-param name="scope" select="(ancestor::book|/)[last()]"/>
-        </xsl:call-template>
-      </xsl:if>
-    </xsl:otherwise>
-  </xsl:choose>
- </xsl:if>
-</xsl:template>
-
-<xsl:template match="book/index|part/index">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
- <xsl:if test="$generate.index != 0">
-  <xsl:variable name="master-reference">
-    <xsl:call-template name="select.pagemaster">
-      <xsl:with-param name="pageclass">
-        <xsl:if test="$make.index.markup != 0">body</xsl:if>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <fo:page-sequence hyphenate="{$hyphenate}"
-                    master-reference="{$master-reference}">
-    <xsl:attribute name="language">
-      <xsl:call-template name="l10n.language"/>
-    </xsl:attribute>
-    <xsl:attribute name="format">
-      <xsl:call-template name="page.number.format">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="initial-page-number">
-      <xsl:call-template name="initial.page.number">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="force-page-count">
-      <xsl:call-template name="force.page.count">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="hyphenation-character">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-character'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-push-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-remain-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:apply-templates select="." mode="running.head.mode">
-      <xsl:with-param name="master-reference" select="$master-reference"/>
-    </xsl:apply-templates>
-    <xsl:apply-templates select="." mode="running.foot.mode">
-      <xsl:with-param name="master-reference" select="$master-reference"/>
-    </xsl:apply-templates>
-
-    <fo:flow flow-name="xsl-region-body">
-      <xsl:call-template name="set.flow.properties">
-        <xsl:with-param name="element" select="local-name(.)"/>
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-
-      <fo:block id="{$id}">
-        <xsl:call-template name="index.titlepage"/>
-      </fo:block>
-      <xsl:apply-templates/>
-      <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0">
-
-        <xsl:choose>
-          <xsl:when test="$make.index.markup != 0">
-            <fo:block wrap-option='no-wrap'
-                      white-space-collapse='false'
-                      xsl:use-attribute-sets="monospace.verbatim.properties"
-                      linefeed-treatment="preserve">
-              <xsl:call-template name="generate-index-markup">
-                <xsl:with-param name="scope" select="(ancestor::book|/)[last()]"/>
-              </xsl:call-template>
-            </fo:block>
-          </xsl:when>
-          <xsl:when test="indexentry|indexdiv/indexentry">
-            <xsl:apply-templates/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:call-template name="generate-index">
-              <xsl:with-param name="scope" select="(ancestor::book|/)[last()]"/>
-            </xsl:call-template>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:if>
-    </fo:flow>
-  </fo:page-sequence>
- </xsl:if>
-</xsl:template>
-
-<xsl:template match="setindex">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
- <xsl:if test="$generate.index != 0">
-  <xsl:variable name="master-reference">
-    <xsl:call-template name="select.pagemaster">
-      <xsl:with-param name="pageclass">
-        <xsl:choose>
-          <xsl:when test="$make.index.markup != 0">body</xsl:when>
-          <xsl:otherwise>index</xsl:otherwise>
-        </xsl:choose>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <fo:page-sequence hyphenate="{$hyphenate}"
-                    master-reference="{$master-reference}">
-    <xsl:attribute name="language">
-      <xsl:call-template name="l10n.language"/>
-    </xsl:attribute>
-    <xsl:attribute name="format">
-      <xsl:call-template name="page.number.format">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="initial-page-number">
-      <xsl:call-template name="initial.page.number">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="force-page-count">
-      <xsl:call-template name="force.page.count">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="hyphenation-character">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-character'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-push-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-remain-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:apply-templates select="." mode="running.head.mode">
-      <xsl:with-param name="master-reference" select="$master-reference"/>
-    </xsl:apply-templates>
-    <xsl:apply-templates select="." mode="running.foot.mode">
-      <xsl:with-param name="master-reference" select="$master-reference"/>
-    </xsl:apply-templates>
-
-    <fo:flow flow-name="xsl-region-body">
-      <xsl:call-template name="set.flow.properties">
-        <xsl:with-param name="element" select="local-name(.)"/>
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-
-      <fo:block id="{$id}">
-        <xsl:call-template name="setindex.titlepage"/>
-      </fo:block>
-      <xsl:apply-templates/>
-      <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0">
-
-        <xsl:choose>
-          <xsl:when test="$make.index.markup != 0">
-            <fo:block wrap-option='no-wrap'
-                      white-space-collapse='false'
-                      xsl:use-attribute-sets="monospace.verbatim.properties"
-                      linefeed-treatment="preserve">
-              <xsl:call-template name="generate-index-markup">
-                <xsl:with-param name="scope" select="/"/>
-              </xsl:call-template>
-            </fo:block>
-          </xsl:when>
-          <xsl:when test="indexentry|indexdiv/indexentry">
-            <xsl:apply-templates/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:call-template name="generate-index">
-              <xsl:with-param name="scope" select="/"/>
-            </xsl:call-template>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:if>
-    </fo:flow>
-  </fo:page-sequence>
- </xsl:if>
-</xsl:template>
-
-<xsl:template match="index/indexinfo"></xsl:template>
-<xsl:template match="index/info"></xsl:template>
-<xsl:template match="index/title"></xsl:template>
-<xsl:template match="index/subtitle"></xsl:template>
-<xsl:template match="index/titleabbrev"></xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="indexdiv.title">
-  <xsl:param name="title"/>
-  <xsl:param name="titlecontent"/>
-
-  <fo:block xsl:use-attribute-sets="index.div.title.properties">
-    <xsl:choose>
-      <xsl:when test="$title">
-        <xsl:apply-templates select="." mode="object.title.markup">
-          <xsl:with-param name="allow-anchors" select="1"/>
-        </xsl:apply-templates>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:copy-of select="$titlecontent"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="indexdiv">
-  <fo:block>
-    <xsl:call-template name="indexdiv.titlepage"/>
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="indexdiv/title"/>
-<xsl:template match="indexdiv/subtitle"/>
-<xsl:template match="indexdiv/titleabbrev"/>
-
-<!-- ==================================================================== -->
-
-<!-- Text used for distiguishing between normal and significant entries -->
-<xsl:variable name="significant.flag">.tnacifingis</xsl:variable>
-
-<xsl:template match="indexterm" name="indexterm">
-  <!-- Temporal workaround for bug in AXF -->
-  <xsl:variable name="wrapper.name">
-    <xsl:choose>
-      <xsl:when test="$axf.extensions != 0">
-        <xsl:call-template name="inline.or.block"/>
-      </xsl:when>
-      <xsl:otherwise>fo:wrapper</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:element name="{$wrapper.name}">
-    <xsl:attribute name="id">
-      <xsl:call-template name="object.id"/>
-    </xsl:attribute>
-    <xsl:choose>
-      <xsl:when test="$xep.extensions != 0">
-        <xsl:attribute name="rx:key">
-          <xsl:value-of select="&primary;"/>
-          <xsl:if test="@significance='preferred'"><xsl:value-of select="$significant.flag"/></xsl:if>
-          <xsl:if test="secondary">
-            <xsl:text>, </xsl:text>
-            <xsl:value-of select="&secondary;"/>
-          </xsl:if>
-          <xsl:if test="tertiary">
-            <xsl:text>, </xsl:text>
-            <xsl:value-of select="&tertiary;"/>
-          </xsl:if>
-        </xsl:attribute>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:comment>
-          <xsl:call-template name="comment-escape-string">
-            <xsl:with-param name="string">
-              <xsl:value-of select="primary"/>
-              <xsl:if test="secondary">
-                <xsl:text>, </xsl:text>
-                <xsl:value-of select="secondary"/>
-              </xsl:if>
-              <xsl:if test="tertiary">
-                <xsl:text>, </xsl:text>
-                <xsl:value-of select="tertiary"/>
-              </xsl:if>
-            </xsl:with-param>
-          </xsl:call-template>
-        </xsl:comment>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:element>
-</xsl:template>
-
-<xsl:template match="indexterm[@class='startofrange']">
-  <xsl:choose>
-    <xsl:when test="$xep.extensions != 0">
-      <rx:begin-index-range>
-        <xsl:call-template name="anchor"/>
-        <xsl:attribute name="rx:key">
-          <xsl:value-of select="&primary;"/>
-          <xsl:if test="@significance='preferred'"><xsl:value-of select="$significant.flag"/></xsl:if>
-          <xsl:if test="secondary">
-            <xsl:text>, </xsl:text>
-            <xsl:value-of select="&secondary;"/>
-          </xsl:if>
-          <xsl:if test="tertiary">
-            <xsl:text>, </xsl:text>
-            <xsl:value-of select="&tertiary;"/>
-          </xsl:if>
-        </xsl:attribute>
-      </rx:begin-index-range>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="indexterm"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="indexterm[@class='endofrange']">
-  <xsl:choose>
-    <xsl:when test="$xep.extensions != 0">
-      <rx:end-index-range>
-        <xsl:attribute name="ref-id">
-          <xsl:value-of select="@startref"/>
-        </xsl:attribute>
-      </rx:end-index-range>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="indexterm"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="indexentry">
-  <fo:block>
-    <!-- don't process 'seeie's from here -->
-    <xsl:apply-templates select="primaryie|secondaryie|tertiaryie|seealsoie"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="primaryie">
-  <fo:block>
-    <xsl:apply-templates/>
-    <xsl:if test="following-sibling::seeie">
-      <xsl:text> (</xsl:text>
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'see'"/>
-      </xsl:call-template>
-      <xsl:text> </xsl:text>
-      <xsl:apply-templates select="following-sibling::seeie"/>
-      <xsl:text>)</xsl:text>
-    </xsl:if>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="secondaryie">
-  <fo:block start-indent="1pc">
-    <xsl:apply-templates/>
-    <xsl:if test="following-sibling::seeie">
-      <xsl:text> (</xsl:text>
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'see'"/>
-      </xsl:call-template>
-      <xsl:text> </xsl:text>
-      <xsl:apply-templates select="following-sibling::seeie"/>
-      <xsl:text>)</xsl:text>
-    </xsl:if>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="tertiaryie">
-  <fo:block start-indent="2pc">
-    <xsl:apply-templates/>
-    <xsl:if test="following-sibling::seeie">
-      <xsl:text> (</xsl:text>
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'see'"/>
-      </xsl:call-template>
-      <xsl:text> </xsl:text>
-      <xsl:apply-templates select="following-sibling::seeie"/>
-      <xsl:text>)</xsl:text>
-    </xsl:if>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="seeie">
-  <fo:inline>
-    <xsl:apply-templates/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="seealsoie">
-  <fo:block>
-    <xsl:attribute name="start-indent">
-      <xsl:choose>
-        <xsl:when test="preceding-sibling::tertiaryie">3pc</xsl:when>
-        <xsl:when test="preceding-sibling::secondaryie">2pc</xsl:when>
-        <xsl:otherwise>1pc</xsl:otherwise>
-      </xsl:choose>
-    </xsl:attribute>
-    <xsl:text>(</xsl:text>
-    <xsl:call-template name="gentext">
-      <xsl:with-param name="key" select="'seealso'"/>
-    </xsl:call-template>
-    <xsl:text> </xsl:text>
-    <xsl:apply-templates/>
-    <xsl:text>)</xsl:text>
-  </fo:block>
-</xsl:template>
-
-<!-- Determines if an object should be inserted as an fo:inline
-     or an fo:block.  Used for indexterms -->
-<xsl:template name="inline.or.block">
-  <xsl:param name="parentnode" select=".."/>
-
-  <xsl:variable name="parent" select="local-name($parentnode)"/>
-
-  <xsl:variable name="block.parents" select="'|answer|appendix|appendixinfo|article|articleinfo|bibliodiv|bibliography|bibliographyinfo|blockinfo|blockquote|bookinfo|callout|caution|chapter|chapterinfo|dedication|example|figure|formalpara|funcsynopsisinfo|glossary|glossaryinfo|glossdef|glossdiv|glossentry|highlights|important|index|indexinfo|info|informalexample|informalfigure|informaltable|itemizedlist|legalnotice|listitem|msgexplan|msgtext|note|objectinfo|orderedlist|partinfo|partintro|preface|prefaceinfo|procedure|qandadiv|qandaset|question|refentry|refentryinfo|referenceinfo|refmeta|refmiscinfo|refsect1|refsect1info|refsect2|refsect2info|refsect3|refsect3info|refsection|refsectioninfo|refsynopsisdiv|refsynopsisdivinfo|revdescription|screeninfo|sect1|sect1info|sect2|sect2info|sect3|sect3info|sect4|sect4info|sect5|sect5info|section|sectioninfo|setindex|setindexinfo|setinfo|sidebar|sidebarinfo|simplesect|step|table|task|taskprerequisites|taskrelated|tasksummary|tip|variablelist|warning|'"/>
-
-  <xsl:choose>
-    <xsl:when test="contains($parent, $block.parents)">fo:block</xsl:when>
-    <xsl:otherwise>fo:inline</xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/info.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/info.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,34 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- These templates define the "default behavior" for info
-     elements.  Even if you don't process the *info wrappers,
-     some of these elements are needed because the elements are
-     processed from named templates that are called with modes.
-     Since modes aren't sticky, these rules apply. 
-     (TODO: clarify this comment) -->
-
-<!-- ==================================================================== -->
-<!-- called from named templates in a given mode -->
-
-<xsl:template match="corpauthor">
-  <fo:inline>
-    <xsl:apply-templates/>
-  </fo:inline>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/inline.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/inline.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,1234 +1,0 @@
-<?xml version='1.0'?>
-<!DOCTYPE xsl:stylesheet [
-  <!ENTITY comment.block.parents "parent::answer|parent::appendix|parent::article|parent::bibliodiv|
-                                  parent::bibliography|parent::blockquote|parent::caution|parent::chapter|
-                                  parent::glossary|parent::glossdiv|parent::important|parent::index|
-                                  parent::indexdiv|parent::listitem|parent::note|parent::orderedlist|
-                                  parent::partintro|parent::preface|parent::procedure|parent::qandadiv|
-                                  parent::qandaset|parent::question|parent::refentry|parent::refnamediv|
-                                  parent::refsect1|parent::refsect2|parent::refsect3|parent::refsection|
-                                  parent::refsynopsisdiv|parent::sect1|parent::sect2|parent::sect3|parent::sect4|
-                                  parent::sect5|parent::section|parent::setindex|parent::sidebar|
-                                  parent::simplesect|parent::taskprerequisites|parent::taskrelated|
-                                  parent::tasksummary|parent::warning">
-]>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                xmlns:xlink='http://www.w3.org/1999/xlink'
-                exclude-result-prefixes="xlink"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<xsl:template name="simple.xlink">
-  <xsl:param name="node" select="."/>
-  <xsl:param name="content">
-    <xsl:apply-templates/>
-  </xsl:param>
-  <xsl:param name="linkend" select="$node/@linkend"/>
-  <xsl:param name="xhref" select="$node/@xlink:href"/>
-
-  <xsl:choose>
-    <xsl:when test="$xhref
-                    and (not($node/@xlink:type) or 
-                         $node/@xlink:type='simple')">
-
-      <!-- Is it a local idref? -->
-      <xsl:variable name="is.idref">
-        <xsl:choose>
-          <!-- if the href starts with # and does not contain an "(" -->
-          <!-- or if the href starts with #xpointer(id(, it's just an ID -->
-          <xsl:when test="starts-with($xhref,'#')
-                          and (not(contains($xhref,'&#40;'))
-                          or starts-with($xhref,
-                                     '#xpointer&#40;id&#40;'))">1</xsl:when>
-          <xsl:otherwise>0</xsl:otherwise>
-        </xsl:choose>
-      </xsl:variable>
-
-      <!-- Is it an olink ? -->
-      <xsl:variable name="is.olink">
-        <xsl:choose>
-	  <!-- If xlink:role="http://docbook.org/xlink/role/olink" -->
-          <!-- and if the href contains # -->
-          <xsl:when test="contains($xhref,'#') and
-	       @xlink:role = $xolink.role">1</xsl:when>
-          <xsl:otherwise>0</xsl:otherwise>
-        </xsl:choose>
-      </xsl:variable>
-
-      <xsl:choose>
-        <xsl:when test="$is.idref = 1">
-
-          <xsl:variable name="idref">
-            <xsl:call-template name="xpointer.idref">
-              <xsl:with-param name="xpointer" select="$xhref"/>
-            </xsl:call-template>
-          </xsl:variable>
-
-          <xsl:variable name="targets" select="key('id',$idref)"/>
-          <xsl:variable name="target" select="$targets[1]"/>
-
-          <xsl:call-template name="check.id.unique">
-            <xsl:with-param name="linkend" select="$idref"/>
-          </xsl:call-template>
-
-          <xsl:choose>
-            <xsl:when test="count($target) = 0">
-              <xsl:message>
-                <xsl:text>XLink to nonexistent id: </xsl:text>
-                <xsl:value-of select="$idref"/>
-              </xsl:message>
-              <xsl:copy-of select="$content"/>
-            </xsl:when>
-
-            <xsl:otherwise>
-              <fo:basic-link internal-destination="{$idref}">
-                <xsl:copy-of select="$content"/>
-              </fo:basic-link>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-
-        <xsl:when test="$is.olink = 1">
-	  <xsl:call-template name="olink">
-	    <xsl:with-param name="content" select="$content"/>
-	  </xsl:call-template>
-        </xsl:when>
-
-        <!-- otherwise it's a URI -->
-        <xsl:otherwise>
-          <fo:basic-link external-destination="url({$xhref})">
-            <xsl:copy-of select="$content"/>
-          </fo:basic-link>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-
-    <xsl:when test="$linkend">
-      <xsl:variable name="targets" select="key('id',$linkend)"/>
-      <xsl:variable name="target" select="$targets[1]"/>
-
-      <xsl:call-template name="check.id.unique">
-        <xsl:with-param name="linkend" select="$linkend"/>
-      </xsl:call-template>
-
-      <xsl:choose>
-        <xsl:when test="count($target) = 0">
-          <xsl:message>
-            <xsl:text>XLink to nonexistent id: </xsl:text>
-            <xsl:value-of select="$linkend"/>
-          </xsl:message>
-          <xsl:copy-of select="$content"/>
-        </xsl:when>
-
-        <xsl:otherwise>
-          <fo:basic-link internal-destination="{$linkend}">
-            <xsl:copy-of select="$content"/>
-          </fo:basic-link>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-
-    <xsl:otherwise>
-      <xsl:copy-of select="$content"/>
-    </xsl:otherwise>
-  </xsl:choose>
-
-</xsl:template>
-
-<xsl:template name="inline.charseq">
-  <xsl:param name="content">
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content">
-        <xsl:apply-templates/>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:param>
-
-  <xsl:choose>
-    <xsl:when test="@dir">
-      <fo:inline>
-        <xsl:attribute name="direction">
-          <xsl:choose>
-            <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
-            <xsl:otherwise>rtl</xsl:otherwise>
-          </xsl:choose>
-        </xsl:attribute>
-        <xsl:copy-of select="$content"/>
-      </fo:inline>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy-of select="$content"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="inline.monoseq">
-  <xsl:param name="content">
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content">
-        <xsl:apply-templates/>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:param>
-
-  <fo:inline xsl:use-attribute-sets="monospace.properties">
-    <xsl:if test="@dir">
-      <xsl:attribute name="direction">
-        <xsl:choose>
-          <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
-          <xsl:otherwise>rtl</xsl:otherwise>
-        </xsl:choose>
-      </xsl:attribute>
-    </xsl:if>
-    <xsl:copy-of select="$content"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template name="inline.boldseq">
-  <xsl:param name="content">
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content">
-        <xsl:apply-templates/>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:param>
-
-  <fo:inline font-weight="bold">
-    <xsl:if test="@dir">
-      <xsl:attribute name="direction">
-        <xsl:choose>
-          <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
-          <xsl:otherwise>rtl</xsl:otherwise>
-        </xsl:choose>
-      </xsl:attribute>
-    </xsl:if>
-    <xsl:copy-of select="$content"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template name="inline.italicseq">
-  <xsl:param name="content">
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content">
-        <xsl:apply-templates/>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:param>
-
-  <fo:inline font-style="italic">
-    <xsl:call-template name="anchor"/>
-    <xsl:if test="@dir">
-      <xsl:attribute name="direction">
-        <xsl:choose>
-          <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
-          <xsl:otherwise>rtl</xsl:otherwise>
-        </xsl:choose>
-      </xsl:attribute>
-    </xsl:if>
-    <xsl:copy-of select="$content"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template name="inline.boldmonoseq">
-  <xsl:param name="content">
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content">
-        <xsl:apply-templates/>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:param>
-
-  <fo:inline font-weight="bold" xsl:use-attribute-sets="monospace.properties">
-    <xsl:call-template name="anchor"/>
-    <xsl:if test="@dir">
-      <xsl:attribute name="direction">
-        <xsl:choose>
-          <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
-          <xsl:otherwise>rtl</xsl:otherwise>
-        </xsl:choose>
-      </xsl:attribute>
-    </xsl:if>
-    <xsl:copy-of select="$content"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template name="inline.italicmonoseq">
-  <xsl:param name="content">
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content">
-        <xsl:apply-templates/>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:param>
-
-  <fo:inline font-style="italic" xsl:use-attribute-sets="monospace.properties">
-    <xsl:call-template name="anchor"/>
-    <xsl:if test="@dir">
-      <xsl:attribute name="direction">
-        <xsl:choose>
-          <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
-          <xsl:otherwise>rtl</xsl:otherwise>
-        </xsl:choose>
-      </xsl:attribute>
-    </xsl:if>
-    <xsl:copy-of select="$content"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template name="inline.superscriptseq">
-  <xsl:param name="content">
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content">
-        <xsl:apply-templates/>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:param>
-
-  <fo:inline xsl:use-attribute-sets="superscript.properties">
-    <xsl:call-template name="anchor"/>
-    <xsl:if test="@dir">
-      <xsl:attribute name="direction">
-        <xsl:choose>
-          <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
-          <xsl:otherwise>rtl</xsl:otherwise>
-        </xsl:choose>
-      </xsl:attribute>
-    </xsl:if>
-    <xsl:choose>
-      <xsl:when test="$fop.extensions != 0">
-        <xsl:attribute name="vertical-align">super</xsl:attribute>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:attribute name="baseline-shift">super</xsl:attribute>
-      </xsl:otherwise>
-    </xsl:choose>
-    <xsl:copy-of select="$content"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template name="inline.subscriptseq">
-  <xsl:param name="content">
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content">
-        <xsl:apply-templates/>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:param>
-
-  <fo:inline xsl:use-attribute-sets="subscript.properties">
-    <xsl:call-template name="anchor"/>
-    <xsl:if test="@dir">
-      <xsl:attribute name="direction">
-        <xsl:choose>
-          <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
-          <xsl:otherwise>rtl</xsl:otherwise>
-        </xsl:choose>
-      </xsl:attribute>
-    </xsl:if>
-    <xsl:choose>
-      <xsl:when test="$fop.extensions != 0">
-        <xsl:attribute name="vertical-align">sub</xsl:attribute>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:attribute name="baseline-shift">sub</xsl:attribute>
-      </xsl:otherwise>
-    </xsl:choose>
-    <xsl:copy-of select="$content"/>
-  </fo:inline>
-</xsl:template>
-
-<!-- ==================================================================== -->
-<!-- some special cases -->
-
-<xsl:template match="author">
-  <xsl:call-template name="simple.xlink">
-    <xsl:with-param name="content">
-      <xsl:call-template name="person.name"/>
-    </xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="editor">
-  <xsl:call-template name="simple.xlink">
-    <xsl:with-param name="content">
-      <xsl:call-template name="person.name"/>
-    </xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="othercredit">
-  <xsl:call-template name="simple.xlink">
-    <xsl:with-param name="content">
-      <xsl:call-template name="person.name"/>
-    </xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="authorinitials">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="accel">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="action">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="application">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="classname">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:template match="exceptionname">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:template match="interfacename">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:template match="methodname">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:template match="command">
-  <xsl:call-template name="inline.boldseq"/>
-</xsl:template>
-
-<xsl:template match="computeroutput">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:template match="constant">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:template match="database">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="date">
-  <!-- should this support locale-specific formatting? how? -->
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="errorcode">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="errorname">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="errortype">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="errortext">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="envar">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:template match="filename">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:template match="function">
-  <xsl:choose>
-    <xsl:when test="$function.parens != '0'
-                    and (parameter or function or replaceable)">
-      <xsl:variable name="nodes" select="text()|*"/>
-      <xsl:call-template name="inline.monoseq">
-        <xsl:with-param name="content">
-          <xsl:call-template name="simple.xlink">
-            <xsl:with-param name="content">
-              <xsl:apply-templates select="$nodes[1]"/>
-            </xsl:with-param>
-          </xsl:call-template>
-        </xsl:with-param>
-      </xsl:call-template>
-      <xsl:text>(</xsl:text>
-      <xsl:apply-templates select="$nodes[position()>1]"/>
-      <xsl:text>)</xsl:text>
-    </xsl:when>
-    <xsl:otherwise>
-     <xsl:call-template name="inline.monoseq"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="function/parameter" priority="2">
-  <xsl:call-template name="inline.italicmonoseq"/>
-  <xsl:if test="following-sibling::*">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="function/replaceable" priority="2">
-  <xsl:call-template name="inline.italicmonoseq"/>
-  <xsl:if test="following-sibling::*">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="guibutton">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="guiicon">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="guilabel">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="guimenu">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="guimenuitem">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="guisubmenu">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="hardware">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="interface">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="interfacedefinition">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="keycap">
-  <xsl:call-template name="inline.boldseq"/>
-</xsl:template>
-
-<xsl:template match="keycode">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="keysym">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="literal">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:template match="code">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:template match="medialabel">
-  <xsl:call-template name="inline.italicseq"/>
-</xsl:template>
-
-<xsl:template match="shortcut">
-  <xsl:call-template name="inline.boldseq"/>
-</xsl:template>
-
-<xsl:template match="mousebutton">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="option">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:template match="package">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="parameter">
-  <xsl:call-template name="inline.italicmonoseq"/>
-</xsl:template>
-
-<xsl:template match="property">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="prompt">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:template match="replaceable">
-  <xsl:call-template name="inline.italicmonoseq"/>
-</xsl:template>
-
-<xsl:template match="returnvalue">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="structfield">
-  <xsl:call-template name="inline.italicmonoseq"/>
-</xsl:template>
-
-<xsl:template match="structname">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="symbol">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="systemitem">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:template match="token">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="type">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="userinput">
-  <xsl:call-template name="inline.boldmonoseq"/>
-</xsl:template>
-
-<xsl:template match="abbrev">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="acronym">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="citerefentry">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="citetitle">
-  <xsl:choose>
-    <xsl:when test="@pubwork = 'article'">
-      <xsl:call-template name="gentext.startquote"/>
-      <xsl:call-template name="inline.charseq"/>
-      <xsl:call-template name="gentext.endquote"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="inline.italicseq"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="emphasis">
-  <xsl:variable name="depth">
-    <xsl:call-template name="dot.count">
-      <xsl:with-param name="string">
-        <xsl:number level="multiple"/>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="@role='bold' or @role='strong'">
-      <xsl:call-template name="inline.boldseq"/>
-    </xsl:when>
-    <xsl:when test="@role='underline'">
-      <fo:inline text-decoration="underline">
-        <xsl:call-template name="inline.charseq"/>
-      </fo:inline>
-    </xsl:when>
-    <xsl:when test="@role='strikethrough'">
-      <fo:inline text-decoration="line-through">
-        <xsl:call-template name="inline.charseq"/>
-      </fo:inline>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="$depth mod 2 = 1">
-          <fo:inline font-style="normal">
-            <xsl:apply-templates/>
-          </fo:inline>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="inline.italicseq"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="foreignphrase">
-  <xsl:call-template name="inline.italicseq"/>
-</xsl:template>
-
-<xsl:template match="markup">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="phrase">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="quote">
-  <xsl:variable name="depth">
-    <xsl:call-template name="dot.count">
-      <xsl:with-param name="string"><xsl:number level="multiple"/></xsl:with-param>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:choose>
-    <xsl:when test="$depth mod 2 = 0">
-      <xsl:call-template name="gentext.startquote"/>
-      <xsl:call-template name="inline.charseq"/>
-      <xsl:call-template name="gentext.endquote"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="gentext.nestedstartquote"/>
-      <xsl:call-template name="inline.charseq"/>
-      <xsl:call-template name="gentext.nestedendquote"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="varname">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:template match="wordasword">
-  <xsl:call-template name="inline.italicseq"/>
-</xsl:template>
-
-<xsl:template match="lineannotation">
-  <fo:inline font-style="italic">
-    <xsl:call-template name="inline.charseq"/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="superscript">
-  <xsl:call-template name="inline.superscriptseq"/>
-</xsl:template>
-
-<xsl:template match="subscript">
-  <xsl:call-template name="inline.subscriptseq"/>
-</xsl:template>
-
-<xsl:template match="trademark">
-  <xsl:call-template name="inline.charseq"/>
-  <xsl:choose>
-    <xsl:when test="@class = 'copyright'
-                    or @class = 'registered'">
-      <xsl:call-template name="dingbat">
-        <xsl:with-param name="dingbat" select="@class"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="@class = 'service'">
-      <xsl:call-template name="inline.superscriptseq">
-        <xsl:with-param name="content" select="'SM'"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="dingbat">
-        <xsl:with-param name="dingbat" select="'trademark'"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="firstterm">
-  <xsl:call-template name="glossterm">
-    <xsl:with-param name="firstterm" select="1"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="glossterm" name="glossterm">
-  <xsl:param name="firstterm" select="0"/>
-
-  <xsl:choose>
-    <xsl:when test="($firstterm.only.link = 0 or $firstterm = 1) and @linkend">
-      <xsl:variable name="targets" select="key('id',@linkend)"/>
-      <xsl:variable name="target" select="$targets[1]"/>
-
-      <xsl:choose>
-        <xsl:when test="$target">
-          <fo:basic-link internal-destination="{@linkend}" 
-                         xsl:use-attribute-sets="xref.properties">
-            <xsl:call-template name="inline.italicseq"/>
-          </fo:basic-link>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="inline.italicseq"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-
-    <xsl:when test="not(@linkend)
-                    and ($firstterm.only.link = 0 or $firstterm = 1)
-                    and ($glossterm.auto.link != 0)
-                    and $glossary.collection != ''">
-      <xsl:variable name="term">
-        <xsl:choose>
-          <xsl:when test="@baseform"><xsl:value-of select="@baseform"/></xsl:when>
-          <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
-        </xsl:choose>
-      </xsl:variable>
-      <xsl:variable name="cterm"
-           select="(document($glossary.collection,.)//glossentry[glossterm=$term])[1]"/>
-
-      <xsl:choose>
-        <xsl:when test="not($cterm)">
-          <xsl:message>
-            <xsl:text>There's no entry for </xsl:text>
-            <xsl:value-of select="$term"/>
-            <xsl:text> in </xsl:text>
-            <xsl:value-of select="$glossary.collection"/>
-          </xsl:message>
-          <xsl:call-template name="inline.italicseq"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:variable name="id">
-            <xsl:call-template name="object.id">
-              <xsl:with-param name="object" select="$cterm"/>
-            </xsl:call-template>
-          </xsl:variable>
-          <fo:basic-link internal-destination="{$id}"
-                         xsl:use-attribute-sets="xref.properties">
-            <xsl:call-template name="inline.italicseq"/>
-          </fo:basic-link>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-
-    <xsl:when test="not(@linkend)
-                    and ($firstterm.only.link = 0 or $firstterm = 1)
-                    and $glossterm.auto.link != 0">
-      <xsl:variable name="term">
-        <xsl:choose>
-          <xsl:when test="@baseform">
-            <xsl:value-of select="@baseform"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="."/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:variable>
-
-      <xsl:variable name="targets"
-                    select="//glossentry[glossterm=$term or glossterm/@baseform=$term]"/>
-
-      <xsl:variable name="target" select="$targets[1]"/>
-
-      <xsl:choose>
-        <xsl:when test="count($targets)=0">
-          <xsl:message>
-            <xsl:text>Error: no glossentry for glossterm: </xsl:text>
-            <xsl:value-of select="."/>
-            <xsl:text>.</xsl:text>
-          </xsl:message>
-          <xsl:call-template name="inline.italicseq"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:variable name="termid">
-            <xsl:call-template name="object.id">
-              <xsl:with-param name="object" select="$target"/>
-            </xsl:call-template>
-          </xsl:variable>
-
-          <fo:basic-link internal-destination="{$termid}"
-                         xsl:use-attribute-sets="xref.properties">
-            <xsl:call-template name="inline.charseq"/>
-          </fo:basic-link>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="inline.italicseq"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="termdef">
-  <fo:inline>
-    <xsl:call-template name="gentext.template">
-      <xsl:with-param name="context" select="'termdef'"/>
-      <xsl:with-param name="name" select="'prefix'"/>
-    </xsl:call-template>
-    <xsl:apply-templates/>
-    <xsl:call-template name="gentext.template">
-      <xsl:with-param name="context" select="'termdef'"/>
-      <xsl:with-param name="name" select="'suffix'"/>
-    </xsl:call-template>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="sgmltag|tag">
-  <xsl:variable name="class">
-    <xsl:choose>
-      <xsl:when test="@class">
-        <xsl:value-of select="@class"/>
-      </xsl:when>
-      <xsl:otherwise>element</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$class='attribute'">
-      <xsl:call-template name="inline.monoseq"/>
-    </xsl:when>
-    <xsl:when test="$class='attvalue'">
-      <xsl:call-template name="inline.monoseq"/>
-    </xsl:when>
-    <xsl:when test="$class='element'">
-      <xsl:call-template name="inline.monoseq"/>
-    </xsl:when>
-    <xsl:when test="$class='endtag'">
-      <xsl:call-template name="inline.monoseq">
-        <xsl:with-param name="content">
-          <xsl:text>&lt;/</xsl:text>
-          <xsl:apply-templates/>
-          <xsl:text>&gt;</xsl:text>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="$class='genentity'">
-      <xsl:call-template name="inline.monoseq">
-        <xsl:with-param name="content">
-          <xsl:text>&amp;</xsl:text>
-          <xsl:apply-templates/>
-          <xsl:text>;</xsl:text>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="$class='numcharref'">
-      <xsl:call-template name="inline.monoseq">
-        <xsl:with-param name="content">
-          <xsl:text>&amp;#</xsl:text>
-          <xsl:apply-templates/>
-          <xsl:text>;</xsl:text>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="$class='paramentity'">
-      <xsl:call-template name="inline.monoseq">
-        <xsl:with-param name="content">
-          <xsl:text>%</xsl:text>
-          <xsl:apply-templates/>
-          <xsl:text>;</xsl:text>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="$class='pi'">
-      <xsl:call-template name="inline.monoseq">
-        <xsl:with-param name="content">
-          <xsl:text>&lt;?</xsl:text>
-          <xsl:apply-templates/>
-          <xsl:text>&gt;</xsl:text>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="$class='xmlpi'">
-      <xsl:call-template name="inline.monoseq">
-        <xsl:with-param name="content">
-          <xsl:text>&lt;?</xsl:text>
-          <xsl:apply-templates/>
-          <xsl:text>?&gt;</xsl:text>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="$class='starttag'">
-      <xsl:call-template name="inline.monoseq">
-        <xsl:with-param name="content">
-          <xsl:text>&lt;</xsl:text>
-          <xsl:apply-templates/>
-          <xsl:text>&gt;</xsl:text>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="$class='emptytag'">
-      <xsl:call-template name="inline.monoseq">
-        <xsl:with-param name="content">
-          <xsl:text>&lt;</xsl:text>
-          <xsl:apply-templates/>
-          <xsl:text>/&gt;</xsl:text>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="$class='sgmlcomment' or $class='comment'">
-      <xsl:call-template name="inline.monoseq">
-        <xsl:with-param name="content">
-          <xsl:text>&lt;!--</xsl:text>
-          <xsl:apply-templates/>
-          <xsl:text>--&gt;</xsl:text>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="inline.charseq"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="email">
-  <xsl:call-template name="inline.monoseq">
-    <xsl:with-param name="content">
-      <fo:inline keep-together.within-line="always" hyphenate="false">
-        <xsl:if test="not($email.delimiters.enabled = 0)">
-          <xsl:text>&lt;</xsl:text>
-        </xsl:if>
-        <xsl:apply-templates/>
-        <xsl:if test="not($email.delimiters.enabled = 0)">
-          <xsl:text>&gt;</xsl:text>
-        </xsl:if>
-      </fo:inline>
-    </xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="keycombo">
-  <xsl:variable name="action" select="@action"/>
-  <xsl:variable name="joinchar">
-    <xsl:choose>
-      <xsl:when test="$action='seq'"><xsl:text> </xsl:text></xsl:when>
-      <xsl:when test="$action='simul'">+</xsl:when>
-      <xsl:when test="$action='press'">-</xsl:when>
-      <xsl:when test="$action='click'">-</xsl:when>
-      <xsl:when test="$action='double-click'">-</xsl:when>
-      <xsl:when test="$action='other'"></xsl:when>
-      <xsl:otherwise>+</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-  <xsl:for-each select="*">
-    <xsl:if test="position()>1"><xsl:value-of select="$joinchar"/></xsl:if>
-    <xsl:apply-templates select="."/>
-  </xsl:for-each>
-</xsl:template>
-
-<xsl:template match="uri">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="menuchoice">
-  <xsl:variable name="shortcut" select="./shortcut"/>
-  <xsl:call-template name="process.menuchoice"/>
-  <xsl:if test="$shortcut">
-    <xsl:text> (</xsl:text>
-    <xsl:apply-templates select="$shortcut"/>
-    <xsl:text>)</xsl:text>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="process.menuchoice">
-  <xsl:param name="nodelist" select="guibutton|guiicon|guilabel|guimenu|guimenuitem|guisubmenu|interface"/><!-- not(shortcut) -->
-  <xsl:param name="count" select="1"/>
-
-  <xsl:variable name="mm.separator">
-    <xsl:choose>
-      <xsl:when test="($fop.extensions != 0 or $fop1.extensions != 0 ) and
-                contains($menuchoice.menu.separator, '&#x2192;')">
-        <fo:inline font-family="Symbol">
-          <xsl:copy-of select="$menuchoice.menu.separator"/>
-        </fo:inline>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:copy-of select="$menuchoice.menu.separator"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$count>count($nodelist)"></xsl:when>
-    <xsl:when test="$count=1">
-      <xsl:apply-templates select="$nodelist[$count=position()]"/>
-      <xsl:call-template name="process.menuchoice">
-        <xsl:with-param name="nodelist" select="$nodelist"/>
-        <xsl:with-param name="count" select="$count+1"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:variable name="node" select="$nodelist[$count=position()]"/>
-      <xsl:choose>
-        <xsl:when test="local-name($node)='guimenuitem'
-                        or local-name($node)='guisubmenu'">
-          <xsl:copy-of select="$mm.separator"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:copy-of select="$menuchoice.separator"/>
-        </xsl:otherwise>
-      </xsl:choose>
-      <xsl:apply-templates select="$node"/>
-      <xsl:call-template name="process.menuchoice">
-        <xsl:with-param name="nodelist" select="$nodelist"/>
-        <xsl:with-param name="count" select="$count+1"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="optional">
-  <xsl:value-of select="$arg.choice.opt.open.str"/>
-  <xsl:call-template name="inline.charseq"/>
-  <xsl:value-of select="$arg.choice.opt.close.str"/>
-</xsl:template>
-
-<xsl:template match="citation">
-  <!-- todo: integrate with bibliography collection -->
-  <xsl:variable name="targets" select="(//biblioentry | //bibliomixed)[abbrev = string(current())]"/>
-  <xsl:variable name="target" select="$targets[1]"/>
-
-  <xsl:choose>
-    <!-- try automatic linking based on match to abbrev -->
-    <xsl:when test="$target and not(xref) and not(link)">
-
-      <xsl:text>[</xsl:text>
-      <fo:basic-link>
-        <xsl:attribute name="internal-destination">
-          <xsl:call-template name="object.id">
-            <xsl:with-param name="object" select="$target"/>
-          </xsl:call-template>
-        </xsl:attribute>
-
-	<xsl:choose>
-	  <xsl:when test="$bibliography.numbered != 0">
-	    <xsl:apply-templates select="$target" mode="citation"/>
-	  </xsl:when>
-	  <xsl:otherwise>
-	    <xsl:call-template name="inline.charseq"/>
-	  </xsl:otherwise>
-	</xsl:choose>
-     
-      </fo:basic-link>
-      <xsl:text>]</xsl:text>
-    </xsl:when>
-
-    <xsl:otherwise>
-      <xsl:text>[</xsl:text>
-      <xsl:call-template name="inline.charseq"/>
-      <xsl:text>]</xsl:text>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="biblioentry|bibliomixed" mode="citation">
-  <xsl:number from="bibliography" count="biblioentry|bibliomixed"
-	      level="any" format="1"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="comment[&comment.block.parents;]|remark[&comment.block.parents;]">
-  <xsl:if test="$show.comments != 0">
-    <fo:block font-style="italic">
-      <xsl:call-template name="inline.charseq"/>
-    </fo:block>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="comment|remark">
-  <xsl:if test="$show.comments != 0">
-    <fo:inline font-style="italic">
-      <xsl:call-template name="inline.charseq"/>
-    </fo:inline>
-  </xsl:if>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="productname">
-  <xsl:call-template name="inline.charseq"/>
-  <xsl:if test="@class">
-    <xsl:call-template name="dingbat">
-      <xsl:with-param name="dingbat" select="@class"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="productnumber">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="pob|street|city|state|postcode|country|otheraddr">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="phone|fax">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<!-- in Addresses, for example -->
-<xsl:template match="honorific|firstname|surname|lineage|othername">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="person">
-  <xsl:apply-templates select="personname"/>
-</xsl:template>
-
-<xsl:template match="personname">
-  <xsl:call-template name="simple.xlink">
-    <xsl:with-param name="content">
-      <xsl:call-template name="person.name"/>
-    </xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="jobtitle">
-  <xsl:call-template name="simple.xlink">
-    <xsl:with-param name="content">
-      <xsl:apply-templates/>
-    </xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="org">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="orgname">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="orgdiv">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="affiliation">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="beginpage">
-  <!-- does nothing; this *is not* markup to force a page break. -->
-</xsl:template>
-
-</xsl:stylesheet>
-
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/keywords.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/keywords.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,21 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<xsl:template match="keywordset"></xsl:template>
-<xsl:template match="subjectset"></xsl:template>
-
-<!-- ==================================================================== -->
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/lists.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/lists.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,1287 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:template match="itemizedlist">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="pi-label-width">
-    <xsl:call-template name="pi.dbfo_label-width"/>
-  </xsl:variable>
-
-  <xsl:variable name="label-width">
-    <xsl:choose>
-      <xsl:when test="$pi-label-width = ''">
-	<xsl:value-of select="$itemizedlist.label.width"/>
-      </xsl:when>
-      <xsl:otherwise>
-	<xsl:value-of select="$pi-label-width"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:if test="title">
-    <xsl:apply-templates select="title" mode="list.title.mode"/>
-  </xsl:if>
-
-  <!-- Preserve order of PIs and comments -->
-  <xsl:apply-templates 
-      select="*[not(self::listitem
-                or self::title
-                or self::titleabbrev)]
-              |comment()[not(preceding-sibling::listitem)]
-              |processing-instruction()[not(preceding-sibling::listitem)]"/>
-
-  <xsl:variable name="content">
-    <xsl:apply-templates 
-          select="listitem
-                  |comment()[preceding-sibling::listitem]
-                  |processing-instruction()[preceding-sibling::listitem]"/>
-  </xsl:variable>
-
-  <!-- nested lists don't add extra list-block spacing -->
-  <xsl:choose>
-    <xsl:when test="ancestor::listitem">
-      <fo:list-block id="{$id}" xsl:use-attribute-sets="itemizedlist.properties">
-	<xsl:attribute name="provisional-distance-between-starts">
-	  <xsl:value-of select="$label-width"/>
-	</xsl:attribute>
-        <xsl:copy-of select="$content"/>
-      </fo:list-block>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:list-block id="{$id}" xsl:use-attribute-sets="list.block.spacing itemizedlist.properties">
-	<xsl:attribute name="provisional-distance-between-starts">
-	  <xsl:value-of select="$label-width"/>
-	</xsl:attribute>
-	<xsl:copy-of select="$content"/>
-      </fo:list-block>
-    </xsl:otherwise>
-  </xsl:choose>
-
-</xsl:template>
-
-<xsl:template match="itemizedlist/title|orderedlist/title">
-  <!--nop-->
-</xsl:template>
-
-<xsl:template match="variablelist/title" mode="vl.as.list">
-  <!--nop-->
-</xsl:template>
-
-<xsl:template match="variablelist/title" mode="vl.as.blocks">
-  <!--nop-->
-</xsl:template>
-
-<xsl:template match="itemizedlist/titleabbrev|orderedlist/titleabbrev">
-  <!--nop-->
-</xsl:template>
-
-<xsl:template match="procedure/titleabbrev">
-  <!--nop-->
-</xsl:template>
-
-<xsl:template match="variablelist/titleabbrev" mode="vl.as.list">
-  <!--nop-->
-</xsl:template>
-
-<xsl:template match="variablelist/titleabbrev" mode="vl.as.blocks">
-  <!--nop-->
-</xsl:template>
-
-<xsl:template match="itemizedlist/listitem">
-  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
-
-  <xsl:variable name="item.contents">
-    <fo:list-item-label end-indent="label-end()" xsl:use-attribute-sets="itemizedlist.label.properties">
-      <fo:block>
-        <xsl:call-template name="itemizedlist.label.markup">
-          <xsl:with-param name="itemsymbol">
-            <xsl:call-template name="list.itemsymbol">
-              <xsl:with-param name="node" select="parent::itemizedlist"/>
-            </xsl:call-template>
-          </xsl:with-param>
-        </xsl:call-template>
-      </fo:block>
-    </fo:list-item-label>
-    <fo:list-item-body start-indent="body-start()">
-      <xsl:choose>
-        <!-- * work around broken passivetex list-item-body rendering -->
-        <xsl:when test="$passivetex.extensions = '1'">
-          <xsl:apply-templates/>
-        </xsl:when>
-        <xsl:otherwise>
-          <fo:block>
-            <xsl:apply-templates/>
-          </fo:block>
-        </xsl:otherwise>
-      </xsl:choose>
-    </fo:list-item-body>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="parent::*/@spacing = 'compact'">
-      <fo:list-item id="{$id}" xsl:use-attribute-sets="compact.list.item.spacing">
-        <xsl:copy-of select="$item.contents"/>
-      </fo:list-item>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:list-item id="{$id}" xsl:use-attribute-sets="list.item.spacing">
-        <xsl:copy-of select="$item.contents"/>
-      </fo:list-item>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="itemizedlist.label.markup">
-  <xsl:param name="itemsymbol" select="'disc'"/>
-
-  <xsl:choose>
-    <xsl:when test="$itemsymbol='none'"></xsl:when>
-    <xsl:when test="$itemsymbol='disc'">&#x2022;</xsl:when>
-    <xsl:when test="$itemsymbol='bullet'">&#x2022;</xsl:when>
-    <xsl:when test="$itemsymbol='endash'">&#x2013;</xsl:when>
-    <xsl:when test="$itemsymbol='emdash'">&#x2014;</xsl:when>
-    <!-- Some of these may work in your XSL-FO processor and fonts -->
-    <!--
-    <xsl:when test="$itemsymbol='square'">&#x25A0;</xsl:when>
-    <xsl:when test="$itemsymbol='box'">&#x25A0;</xsl:when>
-    <xsl:when test="$itemsymbol='smallblacksquare'">&#x25AA;</xsl:when>
-    <xsl:when test="$itemsymbol='circle'">&#x25CB;</xsl:when>
-    <xsl:when test="$itemsymbol='opencircle'">&#x25CB;</xsl:when>
-    <xsl:when test="$itemsymbol='whitesquare'">&#x25A1;</xsl:when>
-    <xsl:when test="$itemsymbol='smallwhitesquare'">&#x25AB;</xsl:when>
-    <xsl:when test="$itemsymbol='round'">&#x25CF;</xsl:when>
-    <xsl:when test="$itemsymbol='blackcircle'">&#x25CF;</xsl:when>
-    <xsl:when test="$itemsymbol='whitebullet'">&#x25E6;</xsl:when>
-    <xsl:when test="$itemsymbol='triangle'">&#x2023;</xsl:when>
-    <xsl:when test="$itemsymbol='point'">&#x203A;</xsl:when>
-    <xsl:when test="$itemsymbol='hand'"><fo:inline 
-                         font-family="Wingdings 2">A</fo:inline></xsl:when>
-    -->
-    <xsl:otherwise>&#x2022;</xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="orderedlist">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="pi-label-width">
-    <xsl:call-template name="pi.dbfo_label-width"/>
-  </xsl:variable>
-
-  <xsl:variable name="label-width">
-    <xsl:choose>
-      <xsl:when test="$pi-label-width = ''">
-	<xsl:value-of select="$orderedlist.label.width"/>
-      </xsl:when>
-      <xsl:otherwise>
-	<xsl:value-of select="$pi-label-width"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:if test="title">
-    <xsl:apply-templates select="title" mode="list.title.mode"/>
-  </xsl:if>
-
-  <!-- Preserve order of PIs and comments -->
-  <xsl:apply-templates 
-      select="*[not(self::listitem
-                or self::title
-                or self::titleabbrev)]
-              |comment()[not(preceding-sibling::listitem)]
-              |processing-instruction()[not(preceding-sibling::listitem)]"/>
-
-  <xsl:variable name="content">
-    <xsl:apply-templates 
-          select="listitem
-                  |comment()[preceding-sibling::listitem]
-                  |processing-instruction()[preceding-sibling::listitem]"/>
-  </xsl:variable>
-
-  <!-- nested lists don't add extra list-block spacing -->
-  <xsl:choose>
-    <xsl:when test="ancestor::listitem">
-      <fo:list-block id="{$id}" xsl:use-attribute-sets="orderedlist.properties">
-	<xsl:attribute name="provisional-distance-between-starts">
-	  <xsl:value-of select="$label-width"/>
-	</xsl:attribute>
-        <xsl:copy-of select="$content"/>
-      </fo:list-block>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:list-block id="{$id}" xsl:use-attribute-sets="list.block.spacing orderedlist.properties">
-	<xsl:attribute name="provisional-distance-between-starts">
-	  <xsl:value-of select="$label-width"/>
-	</xsl:attribute>
-        <xsl:copy-of select="$content"/>
-      </fo:list-block>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="orderedlist/listitem" mode="item-number">
-  <xsl:variable name="numeration">
-    <xsl:call-template name="list.numeration">
-      <xsl:with-param name="node" select="parent::orderedlist"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="type">
-    <xsl:choose>
-      <xsl:when test="$numeration='arabic'">1.</xsl:when>
-      <xsl:when test="$numeration='loweralpha'">a.</xsl:when>
-      <xsl:when test="$numeration='lowerroman'">i.</xsl:when>
-      <xsl:when test="$numeration='upperalpha'">A.</xsl:when>
-      <xsl:when test="$numeration='upperroman'">I.</xsl:when>
-      <!-- What!? This should never happen -->
-      <xsl:otherwise>
-        <xsl:message>
-          <xsl:text>Unexpected numeration: </xsl:text>
-          <xsl:value-of select="$numeration"/>
-        </xsl:message>
-        <xsl:value-of select="1."/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="item-number">
-    <xsl:call-template name="orderedlist-item-number"/>
-  </xsl:variable>
-
-  <xsl:if test="parent::orderedlist/@inheritnum='inherit'
-                and ancestor::listitem[parent::orderedlist]">
-    <xsl:apply-templates select="ancestor::listitem[parent::orderedlist][1]"
-                         mode="item-number"/>
-  </xsl:if>
-
-  <xsl:number value="$item-number" format="{$type}"/>
-</xsl:template>
-
-<xsl:template match="orderedlist/listitem">
-  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
-
-  <xsl:variable name="item.contents">
-    <fo:list-item-label end-indent="label-end()" xsl:use-attribute-sets="orderedlist.label.properties">
-      <fo:block>
-        <xsl:apply-templates select="." mode="item-number"/>
-      </fo:block>
-    </fo:list-item-label>
-    <fo:list-item-body start-indent="body-start()">
-      <fo:block>
-        <xsl:apply-templates/>
-      </fo:block>
-    </fo:list-item-body>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="parent::*/@spacing = 'compact'">
-      <fo:list-item id="{$id}" xsl:use-attribute-sets="compact.list.item.spacing">
-        <xsl:copy-of select="$item.contents"/>
-      </fo:list-item>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:list-item id="{$id}" xsl:use-attribute-sets="list.item.spacing">
-        <xsl:copy-of select="$item.contents"/>
-      </fo:list-item>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="listitem/*[1][local-name()='para' or 
-                                   local-name()='simpara' or 
-                                   local-name()='formalpara']
-                     |glossdef/*[1][local-name()='para' or 
-                                   local-name()='simpara' or 
-                                   local-name()='formalpara']
-                     |step/*[1][local-name()='para' or 
-                                   local-name()='simpara' or 
-                                   local-name()='formalpara']
-                     |callout/*[1][local-name()='para' or 
-                                   local-name()='simpara' or 
-                                   local-name()='formalpara']"
-              priority="2">
-  <fo:block>
-    <xsl:call-template name="anchor"/>
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="variablelist">
-  <xsl:variable name="presentation">
-    <xsl:call-template name="pi.dbfo_list-presentation"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$presentation = 'list'">
-      <xsl:apply-templates select="." mode="vl.as.list"/>
-    </xsl:when>
-    <xsl:when test="$presentation = 'blocks'">
-      <xsl:apply-templates select="." mode="vl.as.blocks"/>
-    </xsl:when>
-    <xsl:when test="$variablelist.as.blocks != 0">
-      <xsl:apply-templates select="." mode="vl.as.blocks"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates select="." mode="vl.as.list"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="variablelist" mode="vl.as.list">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="term-width">
-    <xsl:call-template name="pi.dbfo_term-width"/>
-  </xsl:variable>
-
-  <xsl:variable name="termlength">
-    <xsl:choose>
-      <xsl:when test="$term-width != ''">
-        <xsl:value-of select="$term-width"/>
-      </xsl:when>
-      <xsl:when test="@termlength">
-        <xsl:variable name="termlength.is.number">
-          <xsl:value-of select="@termlength + 0"/>
-        </xsl:variable>
-        <xsl:choose>
-          <xsl:when test="string($termlength.is.number) = 'NaN'">
-            <!-- if the term length isn't just a number, assume it's a measurement -->
-            <xsl:value-of select="@termlength"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="@termlength"/>
-            <xsl:choose>
-              <!-- workaround for passivetex lack of support for non-constant expressions -->
-              <xsl:when test="$passivetex.extensions != 0">
-                <xsl:text>em</xsl:text>
-              </xsl:when>
-              <xsl:otherwise>
-                <xsl:text>em * 0.60</xsl:text>
-              </xsl:otherwise>
-            </xsl:choose>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="longest.term">
-          <xsl:with-param name="terms" select="varlistentry/term"/>
-          <xsl:with-param name="maxlength" select="$variablelist.max.termlength"/>
-        </xsl:call-template>
-        <xsl:choose>
-          <!-- workaround for passivetex lack of support for non-constant expressions -->
-          <xsl:when test="$passivetex.extensions != 0">
-            <xsl:text>em</xsl:text>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:text>em * 0.60</xsl:text>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-<!--
-  <xsl:message>
-    <xsl:text>term width: </xsl:text>
-    <xsl:value-of select="$termlength"/>
-  </xsl:message>
--->
-
-  <xsl:variable name="label-separation">1em</xsl:variable>
-  <xsl:variable name="distance-between-starts">
-    <xsl:choose>
-      <!-- workaround for passivetex lack of support for non-constant expressions -->
-      <xsl:when test="$passivetex.extensions != 0">
-        <xsl:value-of select="$termlength"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$termlength"/>
-        <xsl:text>+</xsl:text>
-        <xsl:value-of select="$label-separation"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:if test="title">
-    <xsl:apply-templates select="title" mode="list.title.mode"/>
-  </xsl:if>
-
-  <!-- Preserve order of PIs and comments -->
-  <xsl:apply-templates 
-    select="*[not(self::varlistentry
-              or self::title
-              or self::titleabbrev)]
-            |comment()[not(preceding-sibling::varlistentry)]
-            |processing-instruction()[not(preceding-sibling::varlistentry)]"/>
-
-  <xsl:variable name="content">
-    <xsl:apply-templates mode="vl.as.list"
-      select="varlistentry
-              |comment()[preceding-sibling::varlistentry]
-              |processing-instruction()[preceding-sibling::varlistentry]"/>
-  </xsl:variable>
-
-  <!-- nested lists don't add extra list-block spacing -->
-  <xsl:choose>
-    <xsl:when test="ancestor::listitem">
-      <fo:list-block id="{$id}"
-                     provisional-distance-between-starts=
-                        "{$distance-between-starts}"
-                     provisional-label-separation="{$label-separation}">
-        <xsl:copy-of select="$content"/>
-      </fo:list-block>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:list-block id="{$id}"
-                     provisional-distance-between-starts=
-                        "{$distance-between-starts}"
-                     provisional-label-separation="{$label-separation}"
-                     xsl:use-attribute-sets="list.block.spacing">
-        <xsl:copy-of select="$content"/>
-      </fo:list-block>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="longest.term">
-  <xsl:param name="longest" select="0"/>
-  <xsl:param name="terms" select="."/>
-  <xsl:param name="maxlength" select="-1"/>
-
-  <!-- Process out any indexterms in the term -->
-  <xsl:variable name="term.text">
-    <xsl:apply-templates select="$terms[1]"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$longest &gt; $maxlength and $maxlength &gt; 0">
-      <xsl:value-of select="$maxlength"/>
-    </xsl:when>
-    <xsl:when test="not($terms)">
-      <xsl:value-of select="$longest"/>
-    </xsl:when>
-    <xsl:when test="string-length($term.text) &gt; $longest">
-      <xsl:call-template name="longest.term">
-        <xsl:with-param name="longest" 
-            select="string-length($term.text)"/>
-        <xsl:with-param name="maxlength" select="$maxlength"/>
-        <xsl:with-param name="terms" select="$terms[position() &gt; 1]"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="longest.term">
-        <xsl:with-param name="longest" select="$longest"/>
-        <xsl:with-param name="maxlength" select="$maxlength"/>
-        <xsl:with-param name="terms" select="$terms[position() &gt; 1]"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="varlistentry" mode="vl.as.list">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-  <xsl:variable name="item.contents">
-    <fo:list-item-label end-indent="label-end()" text-align="start">
-      <fo:block>
-        <xsl:apply-templates select="term"/>
-      </fo:block>
-    </fo:list-item-label>
-    <fo:list-item-body start-indent="body-start()">
-      <fo:block>
-        <xsl:apply-templates select="listitem"/>
-      </fo:block>
-    </fo:list-item-body>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="parent::*/@spacing = 'compact'">
-      <fo:list-item id="{$id}"
-          xsl:use-attribute-sets="compact.list.item.spacing">
-        <xsl:copy-of select="$item.contents"/>
-      </fo:list-item>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:list-item id="{$id}" xsl:use-attribute-sets="list.item.spacing">
-        <xsl:copy-of select="$item.contents"/>
-      </fo:list-item>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-
-<xsl:template match="variablelist" mode="vl.as.blocks">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <!-- termlength is irrelevant -->
-
-  <xsl:if test="title">
-    <xsl:apply-templates select="title" mode="list.title.mode"/>
-  </xsl:if>
-
-  <!-- Preserve order of PIs and comments -->
-  <xsl:apply-templates 
-    select="*[not(self::varlistentry
-              or self::title
-              or self::titleabbrev)]
-            |comment()[not(preceding-sibling::varlistentry)]
-            |processing-instruction()[not(preceding-sibling::varlistentry)]"/>
-
-  <xsl:variable name="content">
-    <xsl:apply-templates mode="vl.as.blocks"
-      select="varlistentry
-              |comment()[preceding-sibling::varlistentry]
-              |processing-instruction()[preceding-sibling::varlistentry]"/>
-  </xsl:variable>
-
-  <!-- nested lists don't add extra list-block spacing -->
-  <xsl:choose>
-    <xsl:when test="ancestor::listitem">
-      <fo:block id="{$id}">
-        <xsl:copy-of select="$content"/>
-      </fo:block>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:block id="{$id}" xsl:use-attribute-sets="list.block.spacing">
-        <xsl:copy-of select="$content"/>
-      </fo:block>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="varlistentry" mode="vl.as.blocks">
-  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
-
-  <fo:block id="{$id}" xsl:use-attribute-sets="list.item.spacing"  
-      keep-together.within-column="always" 
-      keep-with-next.within-column="always">
-    <xsl:apply-templates select="term"/>
-  </fo:block>
-
-  <fo:block margin-left="0.25in">
-    <xsl:apply-templates select="listitem"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="varlistentry/term">
-  <fo:inline>
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content">
-        <xsl:apply-templates/>
-      </xsl:with-param>
-    </xsl:call-template>
-  </fo:inline>
-  <xsl:choose>
-    <xsl:when test="not(following-sibling::term)"/> <!-- do nothing -->
-    <xsl:otherwise>
-      <!-- * if we have multiple terms in the same varlistentry, generate -->
-      <!-- * a separator (", " by default) and/or an additional line -->
-      <!-- * break after each one except the last -->
-      <fo:inline><xsl:value-of select="$variablelist.term.separator"/></fo:inline>
-      <xsl:if test="not($variablelist.term.break.after = '0')">
-        <fo:block/>
-      </xsl:if>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="varlistentry/listitem">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="title" mode="list.title.mode">
-  <xsl:call-template name="formal.object.heading">
-    <xsl:with-param name="object" select=".."/>
-  </xsl:call-template>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="simplelist|simplelist[@type='vert']">
-  <!-- with no type specified, the default is 'vert' -->
-
-  <xsl:variable name="explicit.table.width">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis"
-		      select="processing-instruction('dbfo')"/>
-      <xsl:with-param name="attribute" select="'list-width'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="table.width">
-    <xsl:choose>
-      <xsl:when test="$explicit.table.width != ''">
-        <xsl:value-of select="$explicit.table.width"/>
-      </xsl:when>
-      <xsl:when test="$default.table.width = ''">
-        <xsl:text>100%</xsl:text>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$default.table.width"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <fo:table xsl:use-attribute-sets="normal.para.spacing">
-
-    <xsl:choose>
-      <xsl:when test="$axf.extensions != 0 or $xep.extensions != 0">
-	<xsl:attribute name="table-layout">auto</xsl:attribute>
-        <xsl:if test="$explicit.table.width != ''">
-          <xsl:attribute name="width"><xsl:value-of 
-	  select="$explicit.table.width"/></xsl:attribute>
-        </xsl:if>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:attribute name="table-layout">fixed</xsl:attribute>
-        <xsl:attribute name="width"><xsl:value-of 
-                                      select="$table.width"/></xsl:attribute>
-      </xsl:otherwise>
-    </xsl:choose>
-
-    <xsl:call-template name="simplelist.table.columns">
-      <xsl:with-param name="cols">
-        <xsl:choose>
-          <xsl:when test="@columns">
-            <xsl:value-of select="@columns"/>
-          </xsl:when>
-          <xsl:otherwise>1</xsl:otherwise>
-        </xsl:choose>
-      </xsl:with-param>
-    </xsl:call-template>
-    <fo:table-body start-indent="0pt" end-indent="0pt">
-      <xsl:call-template name="simplelist.vert">
-        <xsl:with-param name="cols">
-          <xsl:choose>
-            <xsl:when test="@columns">
-              <xsl:value-of select="@columns"/>
-            </xsl:when>
-            <xsl:otherwise>1</xsl:otherwise>
-          </xsl:choose>
-        </xsl:with-param>
-      </xsl:call-template>
-    </fo:table-body>
-  </fo:table>
-</xsl:template>
-
-<xsl:template match="simplelist[@type='inline']">
-  <!-- if dbchoice PI exists, use that to determine the choice separator -->
-  <!-- (that is, equivalent of "and" or "or" in current locale), or literal -->
-  <!-- value of "choice" otherwise -->
-  <fo:inline><xsl:variable name="localized-choice-separator">
-    <xsl:choose>
-      <xsl:when test="processing-instruction('dbchoice')">
-        <xsl:call-template name="select.choice.separator"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <!-- empty -->
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:for-each select="member">
-    <xsl:apply-templates/>
-    <xsl:choose>
-      <xsl:when test="position() = last()"/> <!-- do nothing -->
-      <xsl:otherwise>
-	<xsl:text>, </xsl:text>
-	<xsl:if test="position() = last() - 1">
-	  <xsl:if test="$localized-choice-separator != ''">
-	    <xsl:value-of select="$localized-choice-separator"/>
-	    <xsl:text> </xsl:text>
-	  </xsl:if>
-	</xsl:if>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:for-each></fo:inline>
-</xsl:template>
-
-<xsl:template match="simplelist[@type='horiz']">
-
-  <xsl:variable name="explicit.table.width">
-    <xsl:call-template name="pi.dbfo_list-width"/>
-  </xsl:variable>
-
-  <xsl:variable name="table.width">
-    <xsl:choose>
-      <xsl:when test="$explicit.table.width != ''">
-        <xsl:value-of select="$explicit.table.width"/>
-      </xsl:when>
-      <xsl:when test="$default.table.width = ''">
-        <xsl:text>100%</xsl:text>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$default.table.width"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <fo:table xsl:use-attribute-sets="normal.para.spacing">
-    <xsl:choose>
-      <xsl:when test="$axf.extensions != 0 or $xep.extensions != 0">
-        <xsl:attribute name="table-layout">auto</xsl:attribute>
-        <xsl:if test="$explicit.table.width != ''">
-          <xsl:attribute name="width"><xsl:value-of 
-                             select="$explicit.table.width"/></xsl:attribute>
-        </xsl:if>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:attribute name="table-layout">fixed</xsl:attribute>
-        <xsl:attribute name="width"><xsl:value-of 
-                                      select="$table.width"/></xsl:attribute>
-      </xsl:otherwise>
-    </xsl:choose>
-    <xsl:call-template name="simplelist.table.columns">
-      <xsl:with-param name="cols">
-        <xsl:choose>
-          <xsl:when test="@columns">
-            <xsl:value-of select="@columns"/>
-          </xsl:when>
-          <xsl:otherwise>1</xsl:otherwise>
-        </xsl:choose>
-      </xsl:with-param>
-    </xsl:call-template>
-    <fo:table-body start-indent="0pt" end-indent="0pt">
-      <xsl:call-template name="simplelist.horiz">
-        <xsl:with-param name="cols">
-          <xsl:choose>
-            <xsl:when test="@columns">
-              <xsl:value-of select="@columns"/>
-            </xsl:when>
-            <xsl:otherwise>1</xsl:otherwise>
-          </xsl:choose>
-        </xsl:with-param>
-      </xsl:call-template>
-    </fo:table-body>
-  </fo:table>
-</xsl:template>
-
-<xsl:template name="simplelist.table.columns">
-  <xsl:param name="cols" select="1"/>
-  <xsl:param name="curcol" select="1"/>
-  <fo:table-column column-number="{$curcol}"
-                   column-width="proportional-column-width(1)"/>
-  <xsl:if test="$curcol &lt; $cols">
-    <xsl:call-template name="simplelist.table.columns">
-      <xsl:with-param name="cols" select="$cols"/>
-      <xsl:with-param name="curcol" select="$curcol + 1"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="simplelist.horiz">
-  <xsl:param name="cols">1</xsl:param>
-  <xsl:param name="cell">1</xsl:param>
-  <xsl:param name="members" select="./member"/>
-
-  <xsl:if test="$cell &lt;= count($members)">
-    <fo:table-row>
-      <xsl:call-template name="simplelist.horiz.row">
-        <xsl:with-param name="cols" select="$cols"/>
-        <xsl:with-param name="cell" select="$cell"/>
-        <xsl:with-param name="members" select="$members"/>
-      </xsl:call-template>
-   </fo:table-row>
-    <xsl:call-template name="simplelist.horiz">
-      <xsl:with-param name="cols" select="$cols"/>
-      <xsl:with-param name="cell" select="$cell + $cols"/>
-      <xsl:with-param name="members" select="$members"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="simplelist.horiz.row">
-  <xsl:param name="cols">1</xsl:param>
-  <xsl:param name="cell">1</xsl:param>
-  <xsl:param name="members" select="./member"/>
-  <xsl:param name="curcol">1</xsl:param>
-
-  <xsl:if test="$curcol &lt;= $cols">
-    <fo:table-cell>
-      <fo:block>
-        <xsl:if test="$members[position()=$cell]">
-          <xsl:apply-templates select="$members[position()=$cell]"/>
-        </xsl:if>
-      </fo:block>
-    </fo:table-cell>
-    <xsl:call-template name="simplelist.horiz.row">
-      <xsl:with-param name="cols" select="$cols"/>
-      <xsl:with-param name="cell" select="$cell+1"/>
-      <xsl:with-param name="members" select="$members"/>
-      <xsl:with-param name="curcol" select="$curcol+1"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="simplelist.vert">
-  <xsl:param name="cols">1</xsl:param>
-  <xsl:param name="cell">1</xsl:param>
-  <xsl:param name="members" select="./member"/>
-  <xsl:param name="rows"
-             select="floor((count($members)+$cols - 1) div $cols)"/>
-
-  <xsl:if test="$cell &lt;= $rows">
-    <fo:table-row>
-      <xsl:call-template name="simplelist.vert.row">
-        <xsl:with-param name="cols" select="$cols"/>
-        <xsl:with-param name="rows" select="$rows"/>
-        <xsl:with-param name="cell" select="$cell"/>
-        <xsl:with-param name="members" select="$members"/>
-      </xsl:call-template>
-   </fo:table-row>
-    <xsl:call-template name="simplelist.vert">
-      <xsl:with-param name="cols" select="$cols"/>
-      <xsl:with-param name="cell" select="$cell+1"/>
-      <xsl:with-param name="members" select="$members"/>
-      <xsl:with-param name="rows" select="$rows"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="simplelist.vert.row">
-  <xsl:param name="cols">1</xsl:param>
-  <xsl:param name="rows">1</xsl:param>
-  <xsl:param name="cell">1</xsl:param>
-  <xsl:param name="members" select="./member"/>
-  <xsl:param name="curcol">1</xsl:param>
-
-  <xsl:if test="$curcol &lt;= $cols">
-    <fo:table-cell>
-      <fo:block>
-        <xsl:if test="$members[position()=$cell]">
-          <xsl:apply-templates select="$members[position()=$cell]"/>
-        </xsl:if>
-      </fo:block>
-    </fo:table-cell>
-    <xsl:call-template name="simplelist.vert.row">
-      <xsl:with-param name="cols" select="$cols"/>
-      <xsl:with-param name="rows" select="$rows"/>
-      <xsl:with-param name="cell" select="$cell+$rows"/>
-      <xsl:with-param name="members" select="$members"/>
-      <xsl:with-param name="curcol" select="$curcol+1"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="member">
-  <xsl:call-template name="simple.xlink">
-    <xsl:with-param name="content">
-      <xsl:apply-templates/>
-    </xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="procedure">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="param.placement"
-                select="substring-after(normalize-space($formal.title.placement),
-                                        concat(local-name(.), ' '))"/>
-
-  <xsl:variable name="placement">
-    <xsl:choose>
-      <xsl:when test="contains($param.placement, ' ')">
-        <xsl:value-of select="substring-before($param.placement, ' ')"/>
-      </xsl:when>
-      <xsl:when test="$param.placement = ''">before</xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$param.placement"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <!-- Preserve order of PIs and comments -->
-  <xsl:variable name="preamble"
-        select="*[not(self::step
-                  or self::title
-                  or self::titleabbrev)]
-                |comment()[not(preceding-sibling::step)]
-                |processing-instruction()[not(preceding-sibling::step)]"/>
-
-  <xsl:variable name="steps" 
-                select="step
-                        |comment()[preceding-sibling::step]
-                        |processing-instruction()[preceding-sibling::step]"/>
-
-  <fo:block id="{$id}" xsl:use-attribute-sets="procedure.properties list.block.spacing">
-    <xsl:if test="./title and $placement = 'before'">
-      <!-- n.b. gentext code tests for $formal.procedures and may make an "informal" -->
-      <!-- heading even though we called formal.object.heading. odd but true. -->
-      <xsl:call-template name="formal.object.heading"/>
-    </xsl:if>
-
-    <xsl:apply-templates select="$preamble"/>
-
-    <fo:list-block xsl:use-attribute-sets="list.block.spacing"
-                   provisional-distance-between-starts="2em"
-                   provisional-label-separation="0.2em">
-      <xsl:apply-templates select="$steps"/>
-    </fo:list-block>
-
-    <xsl:if test="./title and $placement != 'before'">
-      <!-- n.b. gentext code tests for $formal.procedures and may make an "informal" -->
-      <!-- heading even though we called formal.object.heading. odd but true. -->
-      <xsl:call-template name="formal.object.heading"/>
-    </xsl:if>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="procedure/title">
-</xsl:template>
-
-<xsl:template match="substeps">
-  <fo:list-block xsl:use-attribute-sets="list.block.spacing"
-                 provisional-distance-between-starts="2em"
-                 provisional-label-separation="0.2em">
-    <xsl:apply-templates/>
-  </fo:list-block>
-</xsl:template>
-
-<xsl:template match="procedure/step|substeps/step">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <fo:list-item xsl:use-attribute-sets="list.item.spacing">
-    <fo:list-item-label end-indent="label-end()">
-      <fo:block id="{$id}">
-        <!-- dwc: fix for one step procedures. Use a bullet if there's no step 2 -->
-        <xsl:choose>
-          <xsl:when test="count(../step) = 1">
-            <xsl:text>&#x2022;</xsl:text>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:apply-templates select="." mode="number">
-              <xsl:with-param name="recursive" select="0"/>
-            </xsl:apply-templates>.
-          </xsl:otherwise>
-        </xsl:choose>
-      </fo:block>
-    </fo:list-item-label>
-    <fo:list-item-body start-indent="body-start()">
-      <fo:block>
-        <xsl:apply-templates/>
-      </fo:block>
-    </fo:list-item-body>
-  </fo:list-item>
-</xsl:template>
-
-<xsl:template match="stepalternatives">
-  <fo:list-block provisional-distance-between-starts="2em"
-                 provisional-label-separation="0.2em">
-    <xsl:apply-templates select="step"/>
-  </fo:list-block>
-</xsl:template>
-
-<xsl:template match="stepalternatives/step">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <fo:list-item xsl:use-attribute-sets="list.item.spacing">
-    <fo:list-item-label end-indent="label-end()">
-      <fo:block id="{$id}">
-        <xsl:text>&#x2022;</xsl:text>
-      </fo:block>
-    </fo:list-item-label>
-    <fo:list-item-body start-indent="body-start()">
-      <fo:block>
-        <xsl:apply-templates/>
-      </fo:block>
-    </fo:list-item-body>
-  </fo:list-item>
-</xsl:template>
-
-<xsl:template match="step/title">
-  <fo:block font-weight="bold"
-            keep-together.within-column="always" 
-            keep-with-next.within-column="always">
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="segmentedlist">
-  <xsl:variable name="presentation">
-    <xsl:call-template name="pi.dbfo_list-presentation"/>
-  </xsl:variable>
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$presentation = 'table'">
-      <fo:block id="{$id}">
-        <xsl:apply-templates select="." mode="seglist-table"/>
-      </fo:block>
-    </xsl:when>
-    <xsl:when test="$presentation = 'list'">
-      <fo:block id="{$id}">
-        <xsl:apply-templates/>
-      </fo:block>
-    </xsl:when>
-    <xsl:when test="$segmentedlist.as.table != 0">
-      <fo:block id="{$id}">
-        <xsl:apply-templates select="." mode="seglist-table"/>
-      </fo:block>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:block id="{$id}">
-        <xsl:apply-templates/>
-      </fo:block>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="segmentedlist/title">
-  <xsl:apply-templates select="." mode="list.title.mode" />
-</xsl:template>
-
-<xsl:template match="segtitle">
-</xsl:template>
-
-<xsl:template match="segtitle" mode="segtitle-in-seg">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="seglistitem">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-  <fo:block id="{$id}">
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="seg">
-  <xsl:variable name="segnum" select="count(preceding-sibling::seg)+1"/>
-  <xsl:variable name="seglist" select="ancestor::segmentedlist"/>
-  <xsl:variable name="segtitles" select="$seglist/segtitle"/>
-
-  <!--
-     Note: segtitle is only going to be the right thing in a well formed
-     SegmentedList.  If there are too many Segs or too few SegTitles,
-     you'll get something odd...maybe an error
-  -->
-
-  <fo:block>
-    <fo:inline font-weight="bold">
-      <xsl:apply-templates select="$segtitles[$segnum=position()]"
-                           mode="segtitle-in-seg"/>
-      <xsl:text>: </xsl:text>
-    </fo:inline>
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="segmentedlist" mode="seglist-table">
-  <xsl:apply-templates select="title" mode="list.title.mode" />
-  <fo:table>
-    <fo:table-column column-number="1" column-width="proportional-column-width(1)"/>
-    <fo:table-column column-number="2" column-width="proportional-column-width(1)"/>
-    <fo:table-header start-indent="0pt" end-indent="0pt">
-      <fo:table-row>
-        <xsl:apply-templates select="segtitle" mode="seglist-table"/>
-      </fo:table-row>
-    </fo:table-header>
-    <fo:table-body start-indent="0pt" end-indent="0pt">
-      <xsl:apply-templates select="seglistitem" mode="seglist-table"/>
-    </fo:table-body>
-  </fo:table>
-</xsl:template>
-
-<xsl:template match="segtitle" mode="seglist-table">
-  <fo:table-cell>
-    <fo:block font-weight="bold">
-      <xsl:apply-templates/>
-    </fo:block>
-  </fo:table-cell>
-</xsl:template>
-
-<xsl:template match="seglistitem" mode="seglist-table">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-  <fo:table-row id="{$id}">
-    <xsl:apply-templates mode="seglist-table"/>
-  </fo:table-row>
-</xsl:template>
-
-<xsl:template match="seg" mode="seglist-table">
-  <fo:table-cell>
-    <fo:block>
-      <xsl:apply-templates/>
-    </fo:block>
-  </fo:table-cell>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="calloutlist">
-  <xsl:variable name="id">
-  <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <fo:block id="{$id}"
-            text-align="{$alignment}">
-    <!-- The above restores alignment altered by image align attribute -->
-    <xsl:if test="title|info/title">
-      <xsl:apply-templates select="(title|info/title)[1]" 
-                           mode="list.title.mode"/>
-    </xsl:if>
-
-    <!-- Preserve order of PIs and comments -->
-    <xsl:apply-templates 
-         select="*[not(self::callout or self::title or self::titleabbrev)]
-                   |comment()[not(preceding-sibling::callout)]
-                   |processing-instruction()[not(preceding-sibling::callout)]"/>
-
-    <fo:list-block space-before.optimum="1em"
-                   space-before.minimum="0.8em"
-                   space-before.maximum="1.2em"
-                   provisional-distance-between-starts="2.2em"
-                   provisional-label-separation="0.2em">
-      <xsl:apply-templates select="callout
-                                |comment()[preceding-sibling::callout]
-                                |processing-instruction()[preceding-sibling::callout]"/>
-    </fo:list-block>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="calloutlist/title">
-</xsl:template>
-
-<xsl:template match="callout">
-  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
-  <fo:list-item id="{$id}">
-    <fo:list-item-label end-indent="label-end()">
-      <fo:block>
-        <xsl:call-template name="callout.arearefs">
-          <xsl:with-param name="arearefs" select="@arearefs"/>
-        </xsl:call-template>
-      </fo:block>
-    </fo:list-item-label>
-    <fo:list-item-body start-indent="body-start()">
-      <fo:block>
-        <xsl:apply-templates/>
-      </fo:block>
-    </fo:list-item-body>
-  </fo:list-item>
-</xsl:template>
-
-<xsl:template name="callout.arearefs">
-  <xsl:param name="arearefs"></xsl:param>
-  <xsl:if test="$arearefs!=''">
-    <xsl:choose>
-      <xsl:when test="substring-before($arearefs,' ')=''">
-        <xsl:call-template name="callout.arearef">
-          <xsl:with-param name="arearef" select="$arearefs"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="callout.arearef">
-          <xsl:with-param name="arearef"
-                          select="substring-before($arearefs,' ')"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-    <xsl:call-template name="callout.arearefs">
-      <xsl:with-param name="arearefs"
-                      select="substring-after($arearefs,' ')"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="callout.arearef">
-  <xsl:param name="arearef"></xsl:param>
-  <xsl:variable name="targets" select="key('id',$arearef)"/>
-  <xsl:variable name="target" select="$targets[1]"/>
-
-  <xsl:choose>
-    <xsl:when test="count($target)=0">
-      <xsl:value-of select="$arearef"/>
-      <xsl:text>: ???</xsl:text>
-    </xsl:when>
-    <xsl:when test="local-name($target)='co'">
-      <xsl:apply-templates select="$target" mode="callout-bug"/>
-    </xsl:when>
-    <xsl:when test="local-name($target)='areaset'">
-      <xsl:call-template name="callout-bug">
-        <xsl:with-param name="conum">
-          <xsl:apply-templates select="$target" mode="conumber"/>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="local-name($target)='area'">
-      <xsl:choose>
-        <xsl:when test="$target/parent::areaset">
-          <xsl:call-template name="callout-bug">
-            <xsl:with-param name="conum">
-              <xsl:apply-templates select="$target/parent::areaset"
-                                   mode="conumber"/>
-            </xsl:with-param>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="callout-bug">
-            <xsl:with-param name="conum">
-              <xsl:apply-templates select="$target" mode="conumber"/>
-            </xsl:with-param>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:text>???</xsl:text>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="orderedlist-starting-number">
-  <xsl:param name="list" select="."/>
-  <xsl:variable name="pi-start">
-    <xsl:call-template name="pi.dbfo_start">
-      <xsl:with-param name="node" select="$list"/>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:call-template name="output-orderedlist-starting-number">
-    <xsl:with-param name="list" select="$list"/>
-    <xsl:with-param name="pi-start" select="$pi-start"/>
-  </xsl:call-template>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/math.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/math.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,128 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                xmlns:mml="http://www.w3.org/1998/Math/MathML"
-                exclude-result-prefixes="mml"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<xsl:template match="inlineequation">
-  <xsl:choose>
-    <xsl:when test="$passivetex.extensions != 0 and $tex.math.in.alt != ''">
-      <xsl:apply-templates select="alt[@role='tex'] | inlinemediaobject/textobject[@role='tex']">
-        <xsl:with-param name="output.delims">
-          <xsl:call-template name="tex.math.output.delims"/>
-        </xsl:with-param>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="alt">
-</xsl:template>
-
-<xsl:template match="mathphrase">
-  <fo:inline>
-    <xsl:apply-templates/>
-  </fo:inline>
-</xsl:template>
-
-<!-- "Support" for MathML -->
-
-<xsl:template match="mml:math" xmlns:mml="http://www.w3.org/1998/Math/MathML">
-  <fo:instream-foreign-object>
-    <xsl:copy>
-      <xsl:copy-of select="@*"/>
-      <xsl:apply-templates/>
-    </xsl:copy>
-  </fo:instream-foreign-object>
-</xsl:template>
-
-<xsl:template match="mml:*" xmlns:mml="http://www.w3.org/1998/Math/MathML">
-  <xsl:copy>
-    <xsl:copy-of select="@*"/>
-    <xsl:apply-templates/>
-  </xsl:copy>
-</xsl:template>
-
-<xsl:template match="equation/graphic | informalequation/graphic">
-  <xsl:if test="$passivetex.extensions = 0 or $tex.math.in.alt = ''">
-    <fo:block>
-      <xsl:call-template name="process.image"/>
-    </fo:block>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="inlineequation/alt[@role='tex'] | 
-                     inlineequation/inlinemediaobject/textobject[@role='tex']" priority="1">
-  <xsl:param name="output.delims" select="1"/>
-  <xsl:if test="$passivetex.extensions != 0 and $tex.math.in.alt != ''">
-    <xsl:processing-instruction name="xmltex">
-      <xsl:if test="$output.delims != 0">
-        <xsl:text>$</xsl:text>
-      </xsl:if>
-      <xsl:value-of select="."/>
-      <xsl:if test="$output.delims != 0">
-        <xsl:text>$</xsl:text>
-      </xsl:if>
-    </xsl:processing-instruction>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="equation/alt[@role='tex'] | informalequation/alt[@role='tex'] |
-                     equation/mediaobject/textobject[@role='tex'] |
-                     informalequation/mediaobject/textobject[@role='tex']" priority="1">
-  <xsl:variable name="output.delims">
-    <xsl:call-template name="tex.math.output.delims"/>
-  </xsl:variable>
-  <xsl:if test="$passivetex.extensions != 0 and $tex.math.in.alt != ''">
-    <xsl:processing-instruction name="xmltex">
-      <xsl:if test="$output.delims != 0">
-        <xsl:text>$$</xsl:text>
-      </xsl:if>
-      <xsl:value-of select="."/>
-      <xsl:if test="$output.delims != 0">
-        <xsl:text>$$</xsl:text>
-      </xsl:if>
-    </xsl:processing-instruction>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="alt[@role='tex']">
-  <xsl:if test="$passivetex.extensions != 0 and $tex.math.in.alt != ''">
-    <xsl:message>
-      Your equation is misplaced. It should be in inlineequation, equation or informalequation.
-    </xsl:message>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="tex.math.output.delims">
-  <xsl:variable name="pi.delims">
-    <xsl:call-template name="pi-attribute">
-      <xsl:with-param name="pis" select=".//processing-instruction('dbtex')"/>
-      <xsl:with-param name="attribute" select="'delims'"/>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:variable name="result">
-    <xsl:choose>
-      <xsl:when test="$pi.delims = 'no'">0</xsl:when>
-      <xsl:when test="$pi.delims = '' and $tex.math.delims = 0">0</xsl:when>
-      <xsl:otherwise>1</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-  <xsl:value-of select="$result"/>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/pagesetup.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/pagesetup.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,2314 +1,0 @@
-<?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the DocBook XSL Stylesheet distribution.
-     See ../README or http://docbook.sf.net/ for copyright
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:param name="body.fontset">
-  <xsl:value-of select="$body.font.family"/>
-  <xsl:if test="$body.font.family != ''
-                and $symbol.font.family  != ''">,</xsl:if>
-    <xsl:value-of select="$symbol.font.family"/>
-</xsl:param>
-
-<xsl:param name="title.fontset">
-  <xsl:value-of select="$title.font.family"/>
-  <xsl:if test="$title.font.family != ''
-                and $symbol.font.family  != ''">,</xsl:if>
-    <xsl:value-of select="$symbol.font.family"/>
-</xsl:param>
-
-<!-- PassiveTeX can't handle the math expression for
-     title.margin.left being negative, so ignore it.
-     margin-left="{$page.margin.outer} - {$title.margin.left}"
--->
-<xsl:param name="margin.left.outer">
-  <xsl:choose>
-    <xsl:when test="$passivetex.extensions != 0">
-      <xsl:value-of select="$page.margin.outer"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$page.margin.outer"/>
-      <xsl:text> - </xsl:text>
-      <xsl:value-of select="$title.margin.left"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:param>
-
-<xsl:param name="margin.left.inner">
-  <xsl:choose>
-    <xsl:when test="$passivetex.extensions != 0">
-      <xsl:value-of select="$page.margin.inner"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$page.margin.inner"/>
-      <xsl:text> - </xsl:text>
-      <xsl:value-of select="$title.margin.left"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:param>
-
-<xsl:template name="setup.pagemasters">
-  <fo:layout-master-set>
-    <!-- blank pages -->
-    <fo:simple-page-master master-name="blank"
-                           page-width="{$page.width}"
-                           page-height="{$page.height}"
-                           margin-top="{$page.margin.top}"
-                           margin-bottom="{$page.margin.bottom}"
-                           margin-left="{$margin.left.outer}"
-                           margin-right="{$page.margin.inner}">
-      <xsl:if test="$axf.extensions != 0">
-        <xsl:call-template name="axf-page-master-properties">
-          <xsl:with-param name="page.master">blank</xsl:with-param>
-        </xsl:call-template>
-      </xsl:if>
-      <fo:region-body display-align="center"
-                      margin-bottom="{$body.margin.bottom}"
-                      margin-top="{$body.margin.top}">
-        <xsl:if test="$fop.extensions = 0 and $fop1.extensions = 0">
-          <xsl:attribute name="region-name">blank-body</xsl:attribute>
-        </xsl:if>
-      </fo:region-body>
-      <fo:region-before region-name="xsl-region-before-blank"
-                        extent="{$region.before.extent}"
-                        display-align="before"/>
-      <fo:region-after region-name="xsl-region-after-blank"
-                       extent="{$region.after.extent}"
-                        display-align="after"/>
-    </fo:simple-page-master>
-
-    <!-- title pages -->
-    <fo:simple-page-master master-name="titlepage-first"
-                           page-width="{$page.width}"
-                           page-height="{$page.height}"
-                           margin-top="{$page.margin.top}"
-                           margin-bottom="{$page.margin.bottom}"
-                           margin-left="{$margin.left.inner}"
-                           margin-right="{$page.margin.outer}">
-      <xsl:if test="$axf.extensions != 0">
-        <xsl:call-template name="axf-page-master-properties">
-          <xsl:with-param name="page.master">titlepage-first</xsl:with-param>
-        </xsl:call-template>
-      </xsl:if>
-      <fo:region-body margin-bottom="{$body.margin.bottom}"
-                      margin-top="{$body.margin.top}"
-                      column-gap="{$column.gap.titlepage}"
-                      column-count="{$column.count.titlepage}">
-      </fo:region-body>
-      <fo:region-before region-name="xsl-region-before-first"
-                        extent="{$region.before.extent}"
-                        display-align="before"/>
-      <fo:region-after region-name="xsl-region-after-first"
-                       extent="{$region.after.extent}"
-                        display-align="after"/>
-    </fo:simple-page-master>
-
-    <fo:simple-page-master master-name="titlepage-odd"
-                           page-width="{$page.width}"
-                           page-height="{$page.height}"
-                           margin-top="{$page.margin.top}"
-                           margin-bottom="{$page.margin.bottom}"
-                           margin-left="{$margin.left.inner}"
-                           margin-right="{$page.margin.outer}">
-      <xsl:if test="$axf.extensions != 0">
-        <xsl:call-template name="axf-page-master-properties">
-          <xsl:with-param name="page.master">titlepage-odd</xsl:with-param>
-        </xsl:call-template>
-      </xsl:if>
-      <fo:region-body margin-bottom="{$body.margin.bottom}"
-                      margin-top="{$body.margin.top}"
-                      column-gap="{$column.gap.titlepage}"
-                      column-count="{$column.count.titlepage}">
-      </fo:region-body>
-      <fo:region-before region-name="xsl-region-before-odd"
-                        extent="{$region.before.extent}"
-                        display-align="before"/>
-      <fo:region-after region-name="xsl-region-after-odd"
-                       extent="{$region.after.extent}"
-                        display-align="after"/>
-    </fo:simple-page-master>
-
-    <fo:simple-page-master master-name="titlepage-even"
-                           page-width="{$page.width}"
-                           page-height="{$page.height}"
-                           margin-top="{$page.margin.top}"
-                           margin-bottom="{$page.margin.bottom}"
-                           margin-left="{$margin.left.outer}"
-                           margin-right="{$page.margin.inner}">
-      <xsl:if test="$axf.extensions != 0">
-        <xsl:call-template name="axf-page-master-properties">
-          <xsl:with-param name="page.master">titlepage-even</xsl:with-param>
-        </xsl:call-template>
-      </xsl:if>
-      <fo:region-body margin-bottom="{$body.margin.bottom}"
-                      margin-top="{$body.margin.top}"
-                      column-gap="{$column.gap.titlepage}"
-                      column-count="{$column.count.titlepage}">
-      </fo:region-body>
-      <fo:region-before region-name="xsl-region-before-even"
-                        extent="{$region.before.extent}"
-                        display-align="before"/>
-      <fo:region-after region-name="xsl-region-after-even"
-                       extent="{$region.after.extent}"
-                        display-align="after"/>
-    </fo:simple-page-master>
-
-    <!-- list-of-title pages -->
-    <fo:simple-page-master master-name="lot-first"
-                           page-width="{$page.width}"
-                           page-height="{$page.height}"
-                           margin-top="{$page.margin.top}"
-                           margin-bottom="{$page.margin.bottom}"
-                           margin-left="{$margin.left.inner}"
-                           margin-right="{$page.margin.outer}">
-      <xsl:if test="$axf.extensions != 0">
-        <xsl:call-template name="axf-page-master-properties">
-          <xsl:with-param name="page.master">lot-first</xsl:with-param>
-        </xsl:call-template>
-      </xsl:if>
-      <fo:region-body margin-bottom="{$body.margin.bottom}"
-                      margin-top="{$body.margin.top}"
-                      column-gap="{$column.gap.lot}"
-                      column-count="{$column.count.lot}">
-      </fo:region-body>
-      <fo:region-before region-name="xsl-region-before-first"
-                        extent="{$region.before.extent}"
-                        display-align="before"/>
-      <fo:region-after region-name="xsl-region-after-first"
-                       extent="{$region.after.extent}"
-                       display-align="after"/>
-    </fo:simple-page-master>
-
-    <fo:simple-page-master master-name="lot-odd"
-                           page-width="{$page.width}"
-                           page-height="{$page.height}"
-                           margin-top="{$page.margin.top}"
-                           margin-bottom="{$page.margin.bottom}"
-                           margin-left="{$margin.left.inner}"
-                           margin-right="{$page.margin.outer}">
-      <xsl:if test="$axf.extensions != 0">
-        <xsl:call-template name="axf-page-master-properties">
-          <xsl:with-param name="page.master">lot-odd</xsl:with-param>
-        </xsl:call-template>
-      </xsl:if>
-      <fo:region-body margin-bottom="{$body.margin.bottom}"
-                      margin-top="{$body.margin.top}"
-                      column-gap="{$column.gap.lot}"
-                      column-count="{$column.count.lot}">
-      </fo:region-body>
-      <fo:region-before region-name="xsl-region-before-odd"
-                        extent="{$region.before.extent}"
-                        display-align="before"/>
-      <fo:region-after region-name="xsl-region-after-odd"
-                       extent="{$region.after.extent}"
-                        display-align="after"/>
-    </fo:simple-page-master>
-
-    <fo:simple-page-master master-name="lot-even"
-                           page-width="{$page.width}"
-                           page-height="{$page.height}"
-                           margin-top="{$page.margin.top}"
-                           margin-bottom="{$page.margin.bottom}"
-                           margin-left="{$margin.left.outer}"
-                           margin-right="{$page.margin.inner}">
-      <xsl:if test="$axf.extensions != 0">
-        <xsl:call-template name="axf-page-master-properties">
-          <xsl:with-param name="page.master">lot-even</xsl:with-param>
-        </xsl:call-template>
-      </xsl:if>
-      <fo:region-body margin-bottom="{$body.margin.bottom}"
-                      margin-top="{$body.margin.top}"
-                      column-gap="{$column.gap.lot}"
-                      column-count="{$column.count.lot}">
-      </fo:region-body>
-      <fo:region-before region-name="xsl-region-before-even"
-                        extent="{$region.before.extent}"
-                        display-align="before"/>
-      <fo:region-after region-name="xsl-region-after-even"
-                       extent="{$region.after.extent}"
-                        display-align="after"/>
-    </fo:simple-page-master>
-
-    <!-- frontmatter pages -->
-    <fo:simple-page-master master-name="front-first"
-                           page-width="{$page.width}"
-                           page-height="{$page.height}"
-                           margin-top="{$page.margin.top}"
-                           margin-bottom="{$page.margin.bottom}"
-                           margin-left="{$margin.left.inner}"
-                           margin-right="{$page.margin.outer}">
-      <xsl:if test="$axf.extensions != 0">
-        <xsl:call-template name="axf-page-master-properties">
-          <xsl:with-param name="page.master">front-first</xsl:with-param>
-        </xsl:call-template>
-      </xsl:if>
-      <fo:region-body margin-bottom="{$body.margin.bottom}"
-                      margin-top="{$body.margin.top}"
-                      column-gap="{$column.gap.front}"
-                      column-count="{$column.count.front}">
-      </fo:region-body>
-      <fo:region-before region-name="xsl-region-before-first"
-                        extent="{$region.before.extent}"
-                        display-align="before"/>
-      <fo:region-after region-name="xsl-region-after-first"
-                       extent="{$region.after.extent}"
-                        display-align="after"/>
-    </fo:simple-page-master>
-
-    <fo:simple-page-master master-name="front-odd"
-                           page-width="{$page.width}"
-                           page-height="{$page.height}"
-                           margin-top="{$page.margin.top}"
-                           margin-bottom="{$page.margin.bottom}"
-                           margin-left="{$margin.left.inner}"
-                           margin-right="{$page.margin.outer}">
-      <xsl:if test="$axf.extensions != 0">
-        <xsl:call-template name="axf-page-master-properties">
-          <xsl:with-param name="page.master">front-odd</xsl:with-param>
-        </xsl:call-template>
-      </xsl:if>
-      <fo:region-body margin-bottom="{$body.margin.bottom}"
-                      margin-top="{$body.margin.top}"
-                      column-gap="{$column.gap.front}"
-                      column-count="{$column.count.front}">
-      </fo:region-body>
-      <fo:region-before region-name="xsl-region-before-odd"
-                        extent="{$region.before.extent}"
-                        display-align="before"/>
-      <fo:region-after region-name="xsl-region-after-odd"
-                       extent="{$region.after.extent}"
-                        display-align="after"/>
-    </fo:simple-page-master>
-
-    <fo:simple-page-master master-name="front-even"
-                           page-width="{$page.width}"
-                           page-height="{$page.height}"
-                           margin-top="{$page.margin.top}"
-                           margin-bottom="{$page.margin.bottom}"
-                           margin-left="{$margin.left.outer}"
-                           margin-right="{$page.margin.inner}">
-      <xsl:if test="$axf.extensions != 0">
-        <xsl:call-template name="axf-page-master-properties">
-          <xsl:with-param name="page.master">front-even</xsl:with-param>
-        </xsl:call-template>
-      </xsl:if>
-      <fo:region-body margin-bottom="{$body.margin.bottom}"
-                      margin-top="{$body.margin.top}"
-                      column-gap="{$column.gap.front}"
-                      column-count="{$column.count.front}">
-      </fo:region-body>
-      <fo:region-before region-name="xsl-region-before-even"
-                        extent="{$region.before.extent}"
-                        display-align="before"/>
-      <fo:region-after region-name="xsl-region-after-even"
-                       extent="{$region.after.extent}"
-                        display-align="after"/>
-    </fo:simple-page-master>
-
-    <!-- body pages -->
-    <fo:simple-page-master master-name="body-first"
-                           page-width="{$page.width}"
-                           page-height="{$page.height}"
-                           margin-top="{$page.margin.top}"
-                           margin-bottom="{$page.margin.bottom}"
-                           margin-left="{$margin.left.inner}"
-                           margin-right="{$page.margin.outer}">
-      <xsl:if test="$axf.extensions != 0">
-        <xsl:call-template name="axf-page-master-properties">
-          <xsl:with-param name="page.master">body-first</xsl:with-param>
-        </xsl:call-template>
-      </xsl:if>
-      <fo:region-body margin-bottom="{$body.margin.bottom}"
-                      margin-top="{$body.margin.top}"
-                      column-gap="{$column.gap.body}"
-                      column-count="{$column.count.body}">
-      </fo:region-body>
-      <fo:region-before region-name="xsl-region-before-first"
-                        extent="{$region.before.extent}"
-                        display-align="before"/>
-      <fo:region-after region-name="xsl-region-after-first"
-                       extent="{$region.after.extent}"
-                       display-align="after"/>
-    </fo:simple-page-master>
-
-    <fo:simple-page-master master-name="body-odd"
-                           page-width="{$page.width}"
-                           page-height="{$page.height}"
-                           margin-top="{$page.margin.top}"
-                           margin-bottom="{$page.margin.bottom}"
-                           margin-left="{$margin.left.inner}"
-                           margin-right="{$page.margin.outer}">
-      <xsl:if test="$axf.extensions != 0">
-        <xsl:call-template name="axf-page-master-properties">
-          <xsl:with-param name="page.master">body-odd</xsl:with-param>
-        </xsl:call-template>
-      </xsl:if>
-      <fo:region-body margin-bottom="{$body.margin.bottom}"
-                      margin-top="{$body.margin.top}"
-                      column-gap="{$column.gap.body}"
-                      column-count="{$column.count.body}">
-      </fo:region-body>
-      <fo:region-before region-name="xsl-region-before-odd"
-                        extent="{$region.before.extent}"
-                        display-align="before"/>
-      <fo:region-after region-name="xsl-region-after-odd"
-                       extent="{$region.after.extent}"
-                       display-align="after"/>
-    </fo:simple-page-master>
-
-    <fo:simple-page-master master-name="body-even"
-                           page-width="{$page.width}"
-                           page-height="{$page.height}"
-                           margin-top="{$page.margin.top}"
-                           margin-bottom="{$page.margin.bottom}"
-                           margin-left="{$margin.left.outer}"
-                           margin-right="{$page.margin.inner}">
-      <xsl:if test="$axf.extensions != 0">
-        <xsl:call-template name="axf-page-master-properties">
-          <xsl:with-param name="page.master">body-even</xsl:with-param>
-        </xsl:call-template>
-      </xsl:if>
-      <fo:region-body margin-bottom="{$body.margin.bottom}"
-                      margin-top="{$body.margin.top}"
-                      column-gap="{$column.gap.body}"
-                      column-count="{$column.count.body}">
-      </fo:region-body>
-      <fo:region-before region-name="xsl-region-before-even"
-                        extent="{$region.before.extent}"
-                        display-align="before"/>
-      <fo:region-after region-name="xsl-region-after-even"
-                       extent="{$region.after.extent}"
-                       display-align="after"/>
-    </fo:simple-page-master>
-
-    <!-- backmatter pages -->
-    <fo:simple-page-master master-name="back-first"
-                           page-width="{$page.width}"
-                           page-height="{$page.height}"
-                           margin-top="{$page.margin.top}"
-                           margin-bottom="{$page.margin.bottom}"
-                           margin-left="{$margin.left.inner}"
-                           margin-right="{$page.margin.outer}">
-      <xsl:if test="$axf.extensions != 0">
-        <xsl:call-template name="axf-page-master-properties">
-          <xsl:with-param name="page.master">back-first</xsl:with-param>
-        </xsl:call-template>
-      </xsl:if>
-      <fo:region-body margin-bottom="{$body.margin.bottom}"
-                      margin-top="{$body.margin.top}"
-                      column-gap="{$column.gap.back}"
-                      column-count="{$column.count.back}">
-      </fo:region-body>
-      <fo:region-before region-name="xsl-region-before-first"
-                        extent="{$region.before.extent}"
-                        display-align="before"/>
-      <fo:region-after region-name="xsl-region-after-first"
-                       extent="{$region.after.extent}"
-                       display-align="after"/>
-    </fo:simple-page-master>
-
-    <fo:simple-page-master master-name="back-odd"
-                           page-width="{$page.width}"
-                           page-height="{$page.height}"
-                           margin-top="{$page.margin.top}"
-                           margin-bottom="{$page.margin.bottom}"
-                           margin-left="{$margin.left.inner}"
-                           margin-right="{$page.margin.outer}">
-      <xsl:if test="$axf.extensions != 0">
-        <xsl:call-template name="axf-page-master-properties">
-          <xsl:with-param name="page.master">back-odd</xsl:with-param>
-        </xsl:call-template>
-      </xsl:if>
-      <fo:region-body margin-bottom="{$body.margin.bottom}"
-                      margin-top="{$body.margin.top}"
-                      column-gap="{$column.gap.back}"
-                      column-count="{$column.count.back}">
-      </fo:region-body>
-      <fo:region-before region-name="xsl-region-before-odd"
-                        extent="{$region.before.extent}"
-                        display-align="before"/>
-      <fo:region-after region-name="xsl-region-after-odd"
-                       extent="{$region.after.extent}"
-                       display-align="after"/>
-    </fo:simple-page-master>
-
-    <fo:simple-page-master master-name="back-even"
-                           page-width="{$page.width}"
-                           page-height="{$page.height}"
-                           margin-top="{$page.margin.top}"
-                           margin-bottom="{$page.margin.bottom}"
-                           margin-left="{$margin.left.outer}"
-                           margin-right="{$page.margin.inner}">
-      <xsl:if test="$axf.extensions != 0">
-        <xsl:call-template name="axf-page-master-properties">
-          <xsl:with-param name="page.master">back-even</xsl:with-param>
-        </xsl:call-template>
-      </xsl:if>
-      <fo:region-body margin-bottom="{$body.margin.bottom}"
-                      margin-top="{$body.margin.top}"
-                      column-gap="{$column.gap.back}"
-                      column-count="{$column.count.back}">
-      </fo:region-body>
-      <fo:region-before region-name="xsl-region-before-even"
-                        extent="{$region.before.extent}"
-                        display-align="before"/>
-      <fo:region-after region-name="xsl-region-after-even"
-                       extent="{$region.after.extent}"
-                       display-align="after"/>
-    </fo:simple-page-master>
-
-    <!-- index pages -->
-    <fo:simple-page-master master-name="index-first"
-                           page-width="{$page.width}"
-                           page-height="{$page.height}"
-                           margin-top="{$page.margin.top}"
-                           margin-bottom="{$page.margin.bottom}"
-                           margin-left="{$page.margin.inner}"
-                           margin-right="{$page.margin.outer}">
-      <xsl:if test="$axf.extensions != 0">
-        <xsl:call-template name="axf-page-master-properties">
-          <xsl:with-param name="page.master">index-first</xsl:with-param>
-        </xsl:call-template>
-      </xsl:if>
-      <fo:region-body margin-bottom="{$body.margin.bottom}"
-                      margin-top="{$body.margin.top}"
-                      column-gap="{$column.gap.index}"
-                      column-count="{$column.count.index}">
-      </fo:region-body>
-      <fo:region-before region-name="xsl-region-before-first"
-                        extent="{$region.before.extent}"
-                        display-align="before"/>
-      <fo:region-after region-name="xsl-region-after-first"
-                       extent="{$region.after.extent}"
-                       display-align="after"/>
-    </fo:simple-page-master>
-
-    <fo:simple-page-master master-name="index-odd"
-                           page-width="{$page.width}"
-                           page-height="{$page.height}"
-                           margin-top="{$page.margin.top}"
-                           margin-bottom="{$page.margin.bottom}"
-                           margin-left="{$page.margin.inner}"
-                           margin-right="{$page.margin.outer}">
-      <xsl:if test="$axf.extensions != 0">
-        <xsl:call-template name="axf-page-master-properties">
-          <xsl:with-param name="page.master">index-odd</xsl:with-param>
-        </xsl:call-template>
-      </xsl:if>
-      <fo:region-body margin-bottom="{$body.margin.bottom}"
-                      margin-top="{$body.margin.top}"
-                      column-gap="{$column.gap.index}"
-                      column-count="{$column.count.index}">
-      </fo:region-body>
-      <fo:region-before region-name="xsl-region-before-odd"
-                        extent="{$region.before.extent}"
-                        display-align="before"/>
-      <fo:region-after region-name="xsl-region-after-odd"
-                       extent="{$region.after.extent}"
-                       display-align="after"/>
-    </fo:simple-page-master>
-
-    <fo:simple-page-master master-name="index-even"
-                           page-width="{$page.width}"
-                           page-height="{$page.height}"
-                           margin-top="{$page.margin.top}"
-                           margin-bottom="{$page.margin.bottom}"
-                           margin-left="{$page.margin.outer}"
-                           margin-right="{$page.margin.inner}">
-      <xsl:if test="$axf.extensions != 0">
-        <xsl:call-template name="axf-page-master-properties">
-          <xsl:with-param name="page.master">index-even</xsl:with-param>
-        </xsl:call-template>
-      </xsl:if>
-      <fo:region-body margin-bottom="{$body.margin.bottom}"
-                      margin-top="{$body.margin.top}"
-                      column-gap="{$column.gap.index}"
-                      column-count="{$column.count.index}">
-      </fo:region-body>
-      <fo:region-before region-name="xsl-region-before-even"
-                        extent="{$region.before.extent}"
-                        display-align="before"/>
-      <fo:region-after region-name="xsl-region-after-even"
-                       extent="{$region.after.extent}"
-                       display-align="after"/>
-    </fo:simple-page-master>
-
-    <xsl:if test="$draft.mode != 'no'">
-      <!-- draft blank pages -->
-      <fo:simple-page-master master-name="blank-draft"
-                             page-width="{$page.width}"
-                             page-height="{$page.height}"
-                             margin-top="{$page.margin.top}"
-                             margin-bottom="{$page.margin.bottom}"
-                             margin-left="{$margin.left.outer}"
-                             margin-right="{$page.margin.inner}">
-        <xsl:if test="$axf.extensions != 0">
-          <xsl:call-template name="axf-page-master-properties">
-            <xsl:with-param name="page.master">blank-draft</xsl:with-param>
-          </xsl:call-template>
-        </xsl:if>
-        <fo:region-body margin-bottom="{$body.margin.bottom}"
-                        margin-top="{$body.margin.top}">
-          <xsl:if test="$draft.watermark.image != ''">
-            <xsl:attribute name="background-image">
-              <xsl:call-template name="fo-external-image">
-                <xsl:with-param name="filename" select="$draft.watermark.image"/>
-              </xsl:call-template>
-            </xsl:attribute>
-            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
-            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
-            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
-            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
-          </xsl:if>
-        </fo:region-body>
-        <fo:region-before region-name="xsl-region-before-blank"
-                          extent="{$region.before.extent}"
-                          display-align="before"/>
-        <fo:region-after region-name="xsl-region-after-blank"
-                         extent="{$region.after.extent}"
-                         display-align="after"/>
-      </fo:simple-page-master>
-
-      <!-- draft title pages -->
-      <fo:simple-page-master master-name="titlepage-first-draft"
-                             page-width="{$page.width}"
-                             page-height="{$page.height}"
-                             margin-top="{$page.margin.top}"
-                             margin-bottom="{$page.margin.bottom}"
-                             margin-left="{$margin.left.inner}"
-                             margin-right="{$page.margin.outer}">
-        <xsl:if test="$axf.extensions != 0">
-          <xsl:call-template name="axf-page-master-properties">
-            <xsl:with-param name="page.master">titlepage-first-draft</xsl:with-param>
-          </xsl:call-template>
-        </xsl:if>
-        <fo:region-body margin-bottom="{$body.margin.bottom}"
-                        margin-top="{$body.margin.top}"
-                        column-gap="{$column.gap.titlepage}"
-                        column-count="{$column.count.titlepage}">
-          <xsl:if test="$draft.watermark.image != ''">
-            <xsl:attribute name="background-image">
-              <xsl:call-template name="fo-external-image">
-                <xsl:with-param name="filename" select="$draft.watermark.image"/>
-              </xsl:call-template>
-            </xsl:attribute>
-            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
-            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
-            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
-            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
-          </xsl:if>
-        </fo:region-body>
-        <fo:region-before region-name="xsl-region-before-first"
-                          extent="{$region.before.extent}"
-                          display-align="before"/>
-        <fo:region-after region-name="xsl-region-after-first"
-                         extent="{$region.after.extent}"
-                         display-align="after"/>
-      </fo:simple-page-master>
-
-      <fo:simple-page-master master-name="titlepage-odd-draft"
-                             page-width="{$page.width}"
-                             page-height="{$page.height}"
-                             margin-top="{$page.margin.top}"
-                             margin-bottom="{$page.margin.bottom}"
-                             margin-left="{$margin.left.inner}"
-                             margin-right="{$page.margin.outer}">
-        <xsl:if test="$axf.extensions != 0">
-          <xsl:call-template name="axf-page-master-properties">
-            <xsl:with-param name="page.master">titlepage-odd-draft</xsl:with-param>
-          </xsl:call-template>
-        </xsl:if>
-        <fo:region-body margin-bottom="{$body.margin.bottom}"
-                        margin-top="{$body.margin.top}"
-                        column-gap="{$column.gap.titlepage}"
-                        column-count="{$column.count.titlepage}">
-          <xsl:if test="$draft.watermark.image != ''">
-            <xsl:attribute name="background-image">
-              <xsl:call-template name="fo-external-image">
-                <xsl:with-param name="filename" select="$draft.watermark.image"/>
-              </xsl:call-template>
-            </xsl:attribute>
-            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
-            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
-            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
-            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
-          </xsl:if>
-        </fo:region-body>
-        <fo:region-before region-name="xsl-region-before-odd"
-                          extent="{$region.before.extent}"
-                          display-align="before"/>
-        <fo:region-after region-name="xsl-region-after-odd"
-                         extent="{$region.after.extent}"
-                         display-align="after"/>
-      </fo:simple-page-master>
-
-      <fo:simple-page-master master-name="titlepage-even-draft"
-                             page-width="{$page.width}"
-                             page-height="{$page.height}"
-                             margin-top="{$page.margin.top}"
-                             margin-bottom="{$page.margin.bottom}"
-                             margin-left="{$margin.left.outer}"
-                             margin-right="{$page.margin.inner}">
-        <xsl:if test="$axf.extensions != 0">
-          <xsl:call-template name="axf-page-master-properties">
-            <xsl:with-param name="page.master">titlepage-even-draft</xsl:with-param>
-          </xsl:call-template>
-        </xsl:if>
-        <fo:region-body margin-bottom="{$body.margin.bottom}"
-                        margin-top="{$body.margin.top}"
-                        column-gap="{$column.gap.titlepage}"
-                        column-count="{$column.count.titlepage}">
-          <xsl:if test="$draft.watermark.image != ''">
-            <xsl:attribute name="background-image">
-              <xsl:call-template name="fo-external-image">
-                <xsl:with-param name="filename" select="$draft.watermark.image"/>
-              </xsl:call-template>
-            </xsl:attribute>
-            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
-            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
-            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
-            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
-          </xsl:if>
-        </fo:region-body>
-        <fo:region-before region-name="xsl-region-before-even"
-                          extent="{$region.before.extent}"
-                          display-align="before"/>
-        <fo:region-after region-name="xsl-region-after-even"
-                         extent="{$region.after.extent}"
-                         display-align="after"/>
-      </fo:simple-page-master>
-
-      <!-- draft list-of-title pages -->
-      <fo:simple-page-master master-name="lot-first-draft"
-                             page-width="{$page.width}"
-                             page-height="{$page.height}"
-                             margin-top="{$page.margin.top}"
-                             margin-bottom="{$page.margin.bottom}"
-                             margin-left="{$margin.left.inner}"
-                             margin-right="{$page.margin.outer}">
-        <xsl:if test="$axf.extensions != 0">
-          <xsl:call-template name="axf-page-master-properties">
-            <xsl:with-param name="page.master">lot-first-draft</xsl:with-param>
-          </xsl:call-template>
-        </xsl:if>
-        <fo:region-body margin-bottom="{$body.margin.bottom}"
-                        margin-top="{$body.margin.top}"
-                        column-gap="{$column.gap.lot}"
-                        column-count="{$column.count.lot}">
-          <xsl:if test="$draft.watermark.image != ''">
-            <xsl:attribute name="background-image">
-              <xsl:call-template name="fo-external-image">
-                <xsl:with-param name="filename" select="$draft.watermark.image"/>
-              </xsl:call-template>
-            </xsl:attribute>
-            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
-            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
-            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
-            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
-          </xsl:if>
-        </fo:region-body>
-        <fo:region-before region-name="xsl-region-before-first"
-                          extent="{$region.before.extent}"
-                          display-align="before"/>
-        <fo:region-after region-name="xsl-region-after-first"
-                         extent="{$region.after.extent}"
-                         display-align="after"/>
-      </fo:simple-page-master>
-
-      <fo:simple-page-master master-name="lot-odd-draft"
-                             page-width="{$page.width}"
-                             page-height="{$page.height}"
-                             margin-top="{$page.margin.top}"
-                             margin-bottom="{$page.margin.bottom}"
-                             margin-left="{$margin.left.inner}"
-                             margin-right="{$page.margin.outer}">
-        <xsl:if test="$axf.extensions != 0">
-          <xsl:call-template name="axf-page-master-properties">
-            <xsl:with-param name="page.master">lot-odd-draft</xsl:with-param>
-          </xsl:call-template>
-        </xsl:if>
-        <fo:region-body margin-bottom="{$body.margin.bottom}"
-                        margin-top="{$body.margin.top}"
-                        column-gap="{$column.gap.lot}"
-                        column-count="{$column.count.lot}">
-          <xsl:if test="$draft.watermark.image != ''">
-            <xsl:attribute name="background-image">
-              <xsl:call-template name="fo-external-image">
-                <xsl:with-param name="filename" select="$draft.watermark.image"/>
-              </xsl:call-template>
-            </xsl:attribute>
-            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
-            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
-            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
-            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
-          </xsl:if>
-        </fo:region-body>
-        <fo:region-before region-name="xsl-region-before-odd"
-                          extent="{$region.before.extent}"
-                          display-align="before"/>
-        <fo:region-after region-name="xsl-region-after-odd"
-                         extent="{$region.after.extent}"
-                         display-align="after"/>
-      </fo:simple-page-master>
-
-      <fo:simple-page-master master-name="lot-even-draft"
-                             page-width="{$page.width}"
-                             page-height="{$page.height}"
-                             margin-top="{$page.margin.top}"
-                             margin-bottom="{$page.margin.bottom}"
-                             margin-left="{$margin.left.outer}"
-                             margin-right="{$page.margin.inner}">
-        <xsl:if test="$axf.extensions != 0">
-          <xsl:call-template name="axf-page-master-properties">
-            <xsl:with-param name="page.master">lot-even-draft</xsl:with-param>
-          </xsl:call-template>
-        </xsl:if>
-        <fo:region-body margin-bottom="{$body.margin.bottom}"
-                        margin-top="{$body.margin.top}"
-                        column-gap="{$column.gap.lot}"
-                        column-count="{$column.count.lot}">
-          <xsl:if test="$draft.watermark.image != ''">
-            <xsl:attribute name="background-image">
-              <xsl:call-template name="fo-external-image">
-                <xsl:with-param name="filename" select="$draft.watermark.image"/>
-              </xsl:call-template>
-            </xsl:attribute>
-            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
-            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
-            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
-            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
-          </xsl:if>
-        </fo:region-body>
-        <fo:region-before region-name="xsl-region-before-even"
-                          extent="{$region.before.extent}"
-                          display-align="before"/>
-        <fo:region-after region-name="xsl-region-after-even"
-                         extent="{$region.after.extent}"
-                         display-align="after"/>
-      </fo:simple-page-master>
-
-      <!-- draft frontmatter pages -->
-      <fo:simple-page-master master-name="front-first-draft"
-                             page-width="{$page.width}"
-                             page-height="{$page.height}"
-                             margin-top="{$page.margin.top}"
-                             margin-bottom="{$page.margin.bottom}"
-                             margin-left="{$margin.left.inner}"
-                             margin-right="{$page.margin.outer}">
-        <xsl:if test="$axf.extensions != 0">
-          <xsl:call-template name="axf-page-master-properties">
-            <xsl:with-param name="page.master">front-first-draft</xsl:with-param>
-          </xsl:call-template>
-        </xsl:if>
-        <fo:region-body margin-bottom="{$body.margin.bottom}"
-                        margin-top="{$body.margin.top}"
-                        column-gap="{$column.gap.front}"
-                        column-count="{$column.count.front}">
-          <xsl:if test="$draft.watermark.image != ''">
-            <xsl:attribute name="background-image">
-              <xsl:call-template name="fo-external-image">
-                <xsl:with-param name="filename" select="$draft.watermark.image"/>
-              </xsl:call-template>
-            </xsl:attribute>
-            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
-            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
-            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
-            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
-          </xsl:if>
-        </fo:region-body>
-        <fo:region-before region-name="xsl-region-before-first"
-                          extent="{$region.before.extent}"
-                          display-align="before"/>
-        <fo:region-after region-name="xsl-region-after-first"
-                         extent="{$region.after.extent}"
-                         display-align="after"/>
-      </fo:simple-page-master>
-
-      <fo:simple-page-master master-name="front-odd-draft"
-                             page-width="{$page.width}"
-                             page-height="{$page.height}"
-                             margin-top="{$page.margin.top}"
-                             margin-bottom="{$page.margin.bottom}"
-                             margin-left="{$margin.left.inner}"
-                             margin-right="{$page.margin.outer}">
-        <xsl:if test="$axf.extensions != 0">
-          <xsl:call-template name="axf-page-master-properties">
-            <xsl:with-param name="page.master">front-odd-draft</xsl:with-param>
-          </xsl:call-template>
-        </xsl:if>
-        <fo:region-body margin-bottom="{$body.margin.bottom}"
-                        margin-top="{$body.margin.top}"
-                        column-gap="{$column.gap.front}"
-                        column-count="{$column.count.front}">
-          <xsl:if test="$draft.watermark.image != ''">
-            <xsl:attribute name="background-image">
-              <xsl:call-template name="fo-external-image">
-                <xsl:with-param name="filename" select="$draft.watermark.image"/>
-              </xsl:call-template>
-            </xsl:attribute>
-            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
-            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
-            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
-            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
-          </xsl:if>
-        </fo:region-body>
-        <fo:region-before region-name="xsl-region-before-odd"
-                          extent="{$region.before.extent}"
-                          display-align="before"/>
-        <fo:region-after region-name="xsl-region-after-odd"
-                         extent="{$region.after.extent}"
-                         display-align="after"/>
-      </fo:simple-page-master>
-
-      <fo:simple-page-master master-name="front-even-draft"
-                             page-width="{$page.width}"
-                             page-height="{$page.height}"
-                             margin-top="{$page.margin.top}"
-                             margin-bottom="{$page.margin.bottom}"
-                             margin-left="{$margin.left.outer}"
-                             margin-right="{$page.margin.inner}">
-        <xsl:if test="$axf.extensions != 0">
-          <xsl:call-template name="axf-page-master-properties">
-            <xsl:with-param name="page.master">front-even-draft</xsl:with-param>
-          </xsl:call-template>
-        </xsl:if>
-        <fo:region-body margin-bottom="{$body.margin.bottom}"
-                        margin-top="{$body.margin.top}"
-                        column-gap="{$column.gap.front}"
-                        column-count="{$column.count.front}">
-          <xsl:if test="$draft.watermark.image != ''">
-            <xsl:attribute name="background-image">
-              <xsl:call-template name="fo-external-image">
-                <xsl:with-param name="filename" select="$draft.watermark.image"/>
-              </xsl:call-template>
-            </xsl:attribute>
-            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
-            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
-            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
-            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
-          </xsl:if>
-        </fo:region-body>
-        <fo:region-before region-name="xsl-region-before-even"
-                          extent="{$region.before.extent}"
-                          display-align="before"/>
-        <fo:region-after region-name="xsl-region-after-even"
-                         extent="{$region.after.extent}"
-                         display-align="after"/>
-      </fo:simple-page-master>
-
-      <!-- draft body pages -->
-      <fo:simple-page-master master-name="body-first-draft"
-                             page-width="{$page.width}"
-                             page-height="{$page.height}"
-                             margin-top="{$page.margin.top}"
-                             margin-bottom="{$page.margin.bottom}"
-                             margin-left="{$margin.left.inner}"
-                             margin-right="{$page.margin.outer}">
-        <xsl:if test="$axf.extensions != 0">
-          <xsl:call-template name="axf-page-master-properties">
-            <xsl:with-param name="page.master">body-first-draft</xsl:with-param>
-          </xsl:call-template>
-        </xsl:if>
-        <fo:region-body margin-bottom="{$body.margin.bottom}"
-                        margin-top="{$body.margin.top}"
-                        column-gap="{$column.gap.body}"
-                        column-count="{$column.count.body}">
-          <xsl:if test="$draft.watermark.image != ''">
-            <xsl:attribute name="background-image">
-              <xsl:call-template name="fo-external-image">
-                <xsl:with-param name="filename" select="$draft.watermark.image"/>
-              </xsl:call-template>
-            </xsl:attribute>
-            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
-            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
-            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
-            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
-          </xsl:if>
-        </fo:region-body>
-        <fo:region-before region-name="xsl-region-before-first"
-                          extent="{$region.before.extent}"
-                          display-align="before"/>
-        <fo:region-after region-name="xsl-region-after-first"
-                         extent="{$region.after.extent}"
-                         display-align="after"/>
-      </fo:simple-page-master>
-
-      <fo:simple-page-master master-name="body-odd-draft"
-                             page-width="{$page.width}"
-                             page-height="{$page.height}"
-                             margin-top="{$page.margin.top}"
-                             margin-bottom="{$page.margin.bottom}"
-                             margin-left="{$margin.left.inner}"
-                             margin-right="{$page.margin.outer}">
-        <xsl:if test="$axf.extensions != 0">
-          <xsl:call-template name="axf-page-master-properties">
-            <xsl:with-param name="page.master">body-odd-draft</xsl:with-param>
-          </xsl:call-template>
-        </xsl:if>
-        <fo:region-body margin-bottom="{$body.margin.bottom}"
-                        margin-top="{$body.margin.top}"
-                        column-gap="{$column.gap.body}"
-                        column-count="{$column.count.body}">
-          <xsl:if test="$draft.watermark.image != ''">
-            <xsl:attribute name="background-image">
-              <xsl:call-template name="fo-external-image">
-                <xsl:with-param name="filename" select="$draft.watermark.image"/>
-              </xsl:call-template>
-            </xsl:attribute>
-            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
-            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
-            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
-            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
-          </xsl:if>
-        </fo:region-body>
-        <fo:region-before region-name="xsl-region-before-odd"
-                          extent="{$region.before.extent}"
-                          display-align="before"/>
-        <fo:region-after region-name="xsl-region-after-odd"
-                         extent="{$region.after.extent}"
-                         display-align="after"/>
-      </fo:simple-page-master>
-
-      <fo:simple-page-master master-name="body-even-draft"
-                             page-width="{$page.width}"
-                             page-height="{$page.height}"
-                             margin-top="{$page.margin.top}"
-                             margin-bottom="{$page.margin.bottom}"
-                             margin-left="{$margin.left.outer}"
-                             margin-right="{$page.margin.inner}">
-        <xsl:if test="$axf.extensions != 0">
-          <xsl:call-template name="axf-page-master-properties">
-            <xsl:with-param name="page.master">body-even-draft</xsl:with-param>
-          </xsl:call-template>
-        </xsl:if>
-        <fo:region-body margin-bottom="{$body.margin.bottom}"
-                        margin-top="{$body.margin.top}"
-                        column-gap="{$column.gap.body}"
-                        column-count="{$column.count.body}">
-          <xsl:if test="$draft.watermark.image != ''">
-            <xsl:attribute name="background-image">
-              <xsl:call-template name="fo-external-image">
-                <xsl:with-param name="filename" select="$draft.watermark.image"/>
-              </xsl:call-template>
-            </xsl:attribute>
-            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
-            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
-            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
-            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
-          </xsl:if>
-        </fo:region-body>
-        <fo:region-before region-name="xsl-region-before-even"
-                          extent="{$region.before.extent}"
-                          display-align="before"/>
-        <fo:region-after region-name="xsl-region-after-even"
-                         extent="{$region.after.extent}"
-                         display-align="after"/>
-      </fo:simple-page-master>
-
-      <!-- draft backmatter pages -->
-      <fo:simple-page-master master-name="back-first-draft"
-                             page-width="{$page.width}"
-                             page-height="{$page.height}"
-                             margin-top="{$page.margin.top}"
-                             margin-bottom="{$page.margin.bottom}"
-                             margin-left="{$margin.left.inner}"
-                             margin-right="{$page.margin.outer}">
-        <xsl:if test="$axf.extensions != 0">
-          <xsl:call-template name="axf-page-master-properties">
-            <xsl:with-param name="page.master">back-first-draft</xsl:with-param>
-          </xsl:call-template>
-        </xsl:if>
-        <fo:region-body margin-bottom="{$body.margin.bottom}"
-                        margin-top="{$body.margin.top}"
-                        column-gap="{$column.gap.back}"
-                        column-count="{$column.count.back}">
-          <xsl:if test="$draft.watermark.image != ''">
-            <xsl:attribute name="background-image">
-              <xsl:call-template name="fo-external-image">
-                <xsl:with-param name="filename" select="$draft.watermark.image"/>
-              </xsl:call-template>
-            </xsl:attribute>
-            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
-            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
-            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
-            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
-          </xsl:if>
-        </fo:region-body>
-        <fo:region-before region-name="xsl-region-before-first"
-                          extent="{$region.before.extent}"
-                          display-align="before"/>
-        <fo:region-after region-name="xsl-region-after-first"
-                         extent="{$region.after.extent}"
-                         display-align="after"/>
-      </fo:simple-page-master>
-
-      <fo:simple-page-master master-name="back-odd-draft"
-                             page-width="{$page.width}"
-                             page-height="{$page.height}"
-                             margin-top="{$page.margin.top}"
-                             margin-bottom="{$page.margin.bottom}"
-                             margin-left="{$margin.left.inner}"
-                             margin-right="{$page.margin.outer}">
-        <xsl:if test="$axf.extensions != 0">
-          <xsl:call-template name="axf-page-master-properties">
-            <xsl:with-param name="page.master">back-odd-draft</xsl:with-param>
-          </xsl:call-template>
-        </xsl:if>
-        <fo:region-body margin-bottom="{$body.margin.bottom}"
-                        margin-top="{$body.margin.top}"
-                        column-gap="{$column.gap.back}"
-                        column-count="{$column.count.back}">
-          <xsl:if test="$draft.watermark.image != ''">
-            <xsl:attribute name="background-image">
-              <xsl:call-template name="fo-external-image">
-                <xsl:with-param name="filename" select="$draft.watermark.image"/>
-              </xsl:call-template>
-            </xsl:attribute>
-            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
-            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
-            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
-            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
-          </xsl:if>
-        </fo:region-body>
-        <fo:region-before region-name="xsl-region-before-odd"
-                          extent="{$region.before.extent}"
-                          display-align="before"/>
-        <fo:region-after region-name="xsl-region-after-odd"
-                         extent="{$region.after.extent}"
-                         display-align="after"/>
-      </fo:simple-page-master>
-
-      <fo:simple-page-master master-name="back-even-draft"
-                             page-width="{$page.width}"
-                             page-height="{$page.height}"
-                             margin-top="{$page.margin.top}"
-                             margin-bottom="{$page.margin.bottom}"
-                             margin-left="{$margin.left.outer}"
-                             margin-right="{$page.margin.inner}">
-        <xsl:if test="$axf.extensions != 0">
-          <xsl:call-template name="axf-page-master-properties">
-            <xsl:with-param name="page.master">back-even-draft</xsl:with-param>
-          </xsl:call-template>
-        </xsl:if>
-        <fo:region-body margin-bottom="{$body.margin.bottom}"
-                        margin-top="{$body.margin.top}"
-                        column-gap="{$column.gap.back}"
-                        column-count="{$column.count.back}">
-          <xsl:if test="$draft.watermark.image != ''">
-            <xsl:attribute name="background-image">
-              <xsl:call-template name="fo-external-image">
-                <xsl:with-param name="filename" select="$draft.watermark.image"/>
-              </xsl:call-template>
-            </xsl:attribute>
-            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
-            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
-            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
-            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
-          </xsl:if>
-        </fo:region-body>
-        <fo:region-before region-name="xsl-region-before-even"
-                          extent="{$region.before.extent}"
-                          display-align="before"/>
-        <fo:region-after region-name="xsl-region-after-even"
-                         extent="{$region.after.extent}"
-                         display-align="after"/>
-      </fo:simple-page-master>
-
-      <!-- draft index pages -->
-      <fo:simple-page-master master-name="index-first-draft"
-                             page-width="{$page.width}"
-                             page-height="{$page.height}"
-                             margin-top="{$page.margin.top}"
-                             margin-bottom="{$page.margin.bottom}"
-                             margin-left="{$page.margin.inner}"
-                             margin-right="{$page.margin.outer}">
-        <xsl:if test="$axf.extensions != 0">
-          <xsl:call-template name="axf-page-master-properties">
-            <xsl:with-param name="page.master">index-first-draft</xsl:with-param>
-          </xsl:call-template>
-        </xsl:if>
-        <fo:region-body margin-bottom="{$body.margin.bottom}"
-                        margin-top="{$body.margin.top}"
-                        column-gap="{$column.gap.index}"
-                        column-count="{$column.count.index}">
-          <xsl:if test="$draft.watermark.image != ''">
-            <xsl:attribute name="background-image">
-              <xsl:call-template name="fo-external-image">
-                <xsl:with-param name="filename" select="$draft.watermark.image"/>
-              </xsl:call-template>
-            </xsl:attribute>
-            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
-            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
-            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
-            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
-          </xsl:if>
-        </fo:region-body>
-        <fo:region-before region-name="xsl-region-before-first"
-                          extent="{$region.before.extent}"
-                          display-align="before"/>
-        <fo:region-after region-name="xsl-region-after-first"
-                         extent="{$region.after.extent}"
-                         display-align="after"/>
-      </fo:simple-page-master>
-
-      <fo:simple-page-master master-name="index-odd-draft"
-                             page-width="{$page.width}"
-                             page-height="{$page.height}"
-                             margin-top="{$page.margin.top}"
-                             margin-bottom="{$page.margin.bottom}"
-                             margin-left="{$page.margin.inner}"
-                             margin-right="{$page.margin.outer}">
-        <xsl:if test="$axf.extensions != 0">
-          <xsl:call-template name="axf-page-master-properties">
-            <xsl:with-param name="page.master">index-odd-draft</xsl:with-param>
-          </xsl:call-template>
-        </xsl:if>
-        <fo:region-body margin-bottom="{$body.margin.bottom}"
-                        margin-top="{$body.margin.top}"
-                        column-gap="{$column.gap.index}"
-                        column-count="{$column.count.index}">
-          <xsl:if test="$draft.watermark.image != ''">
-            <xsl:attribute name="background-image">
-              <xsl:call-template name="fo-external-image">
-                <xsl:with-param name="filename" select="$draft.watermark.image"/>
-              </xsl:call-template>
-            </xsl:attribute>
-            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
-            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
-            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
-            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
-          </xsl:if>
-        </fo:region-body>
-        <fo:region-before region-name="xsl-region-before-odd"
-                          extent="{$region.before.extent}"
-                          display-align="before"/>
-        <fo:region-after region-name="xsl-region-after-odd"
-                         extent="{$region.after.extent}"
-                         display-align="after"/>
-      </fo:simple-page-master>
-
-      <fo:simple-page-master master-name="index-even-draft"
-                             page-width="{$page.width}"
-                             page-height="{$page.height}"
-                             margin-top="{$page.margin.top}"
-                             margin-bottom="{$page.margin.bottom}"
-                             margin-right="{$page.margin.inner}"
-                             margin-left="{$page.margin.outer}">
-        <xsl:if test="$axf.extensions != 0">
-          <xsl:call-template name="axf-page-master-properties">
-            <xsl:with-param name="page.master">index-even-draft</xsl:with-param>
-          </xsl:call-template>
-        </xsl:if>
-        <fo:region-body margin-bottom="{$body.margin.bottom}"
-                        margin-top="{$body.margin.top}"
-                        column-gap="{$column.gap.index}"
-                        column-count="{$column.count.index}">
-          <xsl:if test="$draft.watermark.image != ''">
-            <xsl:attribute name="background-image">
-              <xsl:call-template name="fo-external-image">
-                <xsl:with-param name="filename" select="$draft.watermark.image"/>
-              </xsl:call-template>
-            </xsl:attribute>
-            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
-            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
-            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
-            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
-          </xsl:if>
-        </fo:region-body>
-        <fo:region-before region-name="xsl-region-before-even"
-                          extent="{$region.before.extent}"
-                          display-align="before"/>
-        <fo:region-after region-name="xsl-region-after-even"
-                         extent="{$region.after.extent}"
-                         display-align="after"/>
-      </fo:simple-page-master>
-    </xsl:if>
-
-    <!-- setup for title page(s) -->
-    <fo:page-sequence-master master-name="titlepage">
-      <fo:repeatable-page-master-alternatives>
-        <fo:conditional-page-master-reference master-reference="blank"
-                                              blank-or-not-blank="blank"/>
-        <fo:conditional-page-master-reference master-reference="titlepage-first"
-                                              page-position="first"/>
-        <fo:conditional-page-master-reference master-reference="titlepage-odd"
-                                              odd-or-even="odd"/>
-        <fo:conditional-page-master-reference 
-                                              odd-or-even="even">
-          <xsl:attribute name="master-reference">
-            <xsl:choose>
-              <xsl:when test="$double.sided != 0">titlepage-even</xsl:when>
-              <xsl:otherwise>titlepage-odd</xsl:otherwise>
-            </xsl:choose>
-          </xsl:attribute>
-        </fo:conditional-page-master-reference>
-      </fo:repeatable-page-master-alternatives>
-    </fo:page-sequence-master>
-
-    <!-- setup for lots -->
-    <fo:page-sequence-master master-name="lot">
-      <fo:repeatable-page-master-alternatives>
-        <fo:conditional-page-master-reference master-reference="blank"
-                                              blank-or-not-blank="blank"/>
-        <fo:conditional-page-master-reference master-reference="lot-first"
-                                              page-position="first"/>
-        <fo:conditional-page-master-reference master-reference="lot-odd"
-                                              odd-or-even="odd"/>
-        <fo:conditional-page-master-reference 
-                                              odd-or-even="even">
-          <xsl:attribute name="master-reference">
-            <xsl:choose>
-              <xsl:when test="$double.sided != 0">lot-even</xsl:when>
-              <xsl:otherwise>lot-odd</xsl:otherwise>
-            </xsl:choose>
-          </xsl:attribute>
-        </fo:conditional-page-master-reference>
-      </fo:repeatable-page-master-alternatives>
-    </fo:page-sequence-master>
-
-    <!-- setup front matter -->
-    <fo:page-sequence-master master-name="front">
-      <fo:repeatable-page-master-alternatives>
-        <fo:conditional-page-master-reference master-reference="blank"
-                                              blank-or-not-blank="blank"/>
-        <fo:conditional-page-master-reference master-reference="front-first"
-                                              page-position="first"/>
-        <fo:conditional-page-master-reference master-reference="front-odd"
-                                              odd-or-even="odd"/>
-        <fo:conditional-page-master-reference 
-                                              odd-or-even="even">
-          <xsl:attribute name="master-reference">
-            <xsl:choose>
-              <xsl:when test="$double.sided != 0">front-even</xsl:when>
-              <xsl:otherwise>front-odd</xsl:otherwise>
-            </xsl:choose>
-          </xsl:attribute>
-        </fo:conditional-page-master-reference>
-      </fo:repeatable-page-master-alternatives>
-    </fo:page-sequence-master>
-
-    <!-- setup for body pages -->
-    <fo:page-sequence-master master-name="body">
-      <fo:repeatable-page-master-alternatives>
-        <fo:conditional-page-master-reference master-reference="blank"
-                                              blank-or-not-blank="blank"/>
-        <fo:conditional-page-master-reference master-reference="body-first"
-                                              page-position="first"/>
-        <fo:conditional-page-master-reference master-reference="body-odd"
-                                              odd-or-even="odd"/>
-        <fo:conditional-page-master-reference 
-                                              odd-or-even="even">
-          <xsl:attribute name="master-reference">
-            <xsl:choose>
-              <xsl:when test="$double.sided != 0">body-even</xsl:when>
-              <xsl:otherwise>body-odd</xsl:otherwise>
-            </xsl:choose>
-          </xsl:attribute>
-        </fo:conditional-page-master-reference>
-      </fo:repeatable-page-master-alternatives>
-    </fo:page-sequence-master>
-
-    <!-- setup back matter -->
-    <fo:page-sequence-master master-name="back">
-      <fo:repeatable-page-master-alternatives>
-        <fo:conditional-page-master-reference master-reference="blank"
-                                              blank-or-not-blank="blank"/>
-        <fo:conditional-page-master-reference master-reference="back-first"
-                                              page-position="first"/>
-        <fo:conditional-page-master-reference master-reference="back-odd"
-                                              odd-or-even="odd"/>
-        <fo:conditional-page-master-reference 
-                                              odd-or-even="even">
-          <xsl:attribute name="master-reference">
-            <xsl:choose>
-              <xsl:when test="$double.sided != 0">back-even</xsl:when>
-              <xsl:otherwise>back-odd</xsl:otherwise>
-            </xsl:choose>
-          </xsl:attribute>
-        </fo:conditional-page-master-reference>
-      </fo:repeatable-page-master-alternatives>
-    </fo:page-sequence-master>
-
-    <!-- setup back matter -->
-    <fo:page-sequence-master master-name="index">
-      <fo:repeatable-page-master-alternatives>
-        <fo:conditional-page-master-reference master-reference="blank"
-                                              blank-or-not-blank="blank"/>
-        <fo:conditional-page-master-reference master-reference="index-first"
-                                              page-position="first"/>
-        <fo:conditional-page-master-reference master-reference="index-odd"
-                                              odd-or-even="odd"/>
-        <fo:conditional-page-master-reference 
-                                              odd-or-even="even">
-          <xsl:attribute name="master-reference">
-            <xsl:choose>
-              <xsl:when test="$double.sided != 0">index-even</xsl:when>
-              <xsl:otherwise>index-odd</xsl:otherwise>
-            </xsl:choose>
-          </xsl:attribute>
-        </fo:conditional-page-master-reference>
-      </fo:repeatable-page-master-alternatives>
-    </fo:page-sequence-master>
-
-    <xsl:if test="$draft.mode != 'no'">
-      <!-- setup for draft title page(s) -->
-      <fo:page-sequence-master master-name="titlepage-draft">
-        <fo:repeatable-page-master-alternatives>
-          <fo:conditional-page-master-reference master-reference="blank-draft"
-                                                blank-or-not-blank="blank"/>
-          <fo:conditional-page-master-reference master-reference="titlepage-first-draft"
-                                                page-position="first"/>
-          <fo:conditional-page-master-reference master-reference="titlepage-odd-draft"
-                                                odd-or-even="odd"/>
-          <fo:conditional-page-master-reference 
-                                                odd-or-even="even">
-            <xsl:attribute name="master-reference">
-              <xsl:choose>
-                <xsl:when test="$double.sided != 0">titlepage-even-draft</xsl:when>
-                <xsl:otherwise>titlepage-odd-draft</xsl:otherwise>
-              </xsl:choose>
-            </xsl:attribute>
-          </fo:conditional-page-master-reference>
-        </fo:repeatable-page-master-alternatives>
-      </fo:page-sequence-master>
-
-      <!-- setup for draft lots -->
-      <fo:page-sequence-master master-name="lot-draft">
-        <fo:repeatable-page-master-alternatives>
-          <fo:conditional-page-master-reference master-reference="blank-draft"
-                                                blank-or-not-blank="blank"/>
-          <fo:conditional-page-master-reference master-reference="lot-first-draft"
-                                                page-position="first"/>
-          <fo:conditional-page-master-reference master-reference="lot-odd-draft"
-                                                odd-or-even="odd"/>
-          <fo:conditional-page-master-reference 
-                                                odd-or-even="even">
-            <xsl:attribute name="master-reference">
-              <xsl:choose>
-                <xsl:when test="$double.sided != 0">lot-even-draft</xsl:when>
-                <xsl:otherwise>lot-odd-draft</xsl:otherwise>
-              </xsl:choose>
-            </xsl:attribute>
-          </fo:conditional-page-master-reference>
-        </fo:repeatable-page-master-alternatives>
-      </fo:page-sequence-master>
-
-      <!-- setup draft front matter -->
-      <fo:page-sequence-master master-name="front-draft">
-        <fo:repeatable-page-master-alternatives>
-          <fo:conditional-page-master-reference master-reference="blank-draft"
-                                                blank-or-not-blank="blank"/>
-          <fo:conditional-page-master-reference master-reference="front-first-draft"
-                                                page-position="first"/>
-          <fo:conditional-page-master-reference master-reference="front-odd-draft"
-                                                odd-or-even="odd"/>
-          <fo:conditional-page-master-reference 
-                                                odd-or-even="even">
-            <xsl:attribute name="master-reference">
-              <xsl:choose>
-                <xsl:when test="$double.sided != 0">front-even-draft</xsl:when>
-                <xsl:otherwise>front-odd-draft</xsl:otherwise>
-              </xsl:choose>
-            </xsl:attribute>
-          </fo:conditional-page-master-reference>
-        </fo:repeatable-page-master-alternatives>
-      </fo:page-sequence-master>
-
-      <!-- setup for draft body pages -->
-      <fo:page-sequence-master master-name="body-draft">
-        <fo:repeatable-page-master-alternatives>
-          <fo:conditional-page-master-reference master-reference="blank-draft"
-                                                blank-or-not-blank="blank"/>
-          <fo:conditional-page-master-reference master-reference="body-first-draft"
-                                                page-position="first"/>
-          <fo:conditional-page-master-reference master-reference="body-odd-draft"
-                                                odd-or-even="odd"/>
-          <fo:conditional-page-master-reference 
-                                                odd-or-even="even">
-            <xsl:attribute name="master-reference">
-              <xsl:choose>
-                <xsl:when test="$double.sided != 0">body-even-draft</xsl:when>
-                <xsl:otherwise>body-odd-draft</xsl:otherwise>
-              </xsl:choose>
-            </xsl:attribute>
-          </fo:conditional-page-master-reference>
-        </fo:repeatable-page-master-alternatives>
-      </fo:page-sequence-master>
-
-      <!-- setup draft back matter -->
-      <fo:page-sequence-master master-name="back-draft">
-        <fo:repeatable-page-master-alternatives>
-          <fo:conditional-page-master-reference master-reference="blank-draft"
-                                                blank-or-not-blank="blank"/>
-          <fo:conditional-page-master-reference master-reference="back-first-draft"
-                                                page-position="first"/>
-          <fo:conditional-page-master-reference master-reference="back-odd-draft"
-                                                odd-or-even="odd"/>
-          <fo:conditional-page-master-reference 
-                                                odd-or-even="even">
-            <xsl:attribute name="master-reference">
-              <xsl:choose>
-                <xsl:when test="$double.sided != 0">back-even-draft</xsl:when>
-                <xsl:otherwise>back-odd-draft</xsl:otherwise>
-              </xsl:choose>
-            </xsl:attribute>
-          </fo:conditional-page-master-reference>
-        </fo:repeatable-page-master-alternatives>
-      </fo:page-sequence-master>
-
-      <!-- setup draft index pages -->
-      <fo:page-sequence-master master-name="index-draft">
-        <fo:repeatable-page-master-alternatives>
-          <fo:conditional-page-master-reference master-reference="blank-draft"
-                                                blank-or-not-blank="blank"/>
-          <fo:conditional-page-master-reference master-reference="index-first-draft"
-                                                page-position="first"/>
-          <fo:conditional-page-master-reference master-reference="index-odd-draft"
-                                                odd-or-even="odd"/>
-          <fo:conditional-page-master-reference 
-                                                odd-or-even="even">
-            <xsl:attribute name="master-reference">
-              <xsl:choose>
-                <xsl:when test="$double.sided != 0">index-even-draft</xsl:when>
-                <xsl:otherwise>index-odd-draft</xsl:otherwise>
-              </xsl:choose>
-            </xsl:attribute>
-          </fo:conditional-page-master-reference>
-        </fo:repeatable-page-master-alternatives>
-      </fo:page-sequence-master>
-    </xsl:if>
-
-    <xsl:call-template name="user.pagemasters"/>
-
-    </fo:layout-master-set>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="user.pagemasters"/> <!-- intentionally empty -->
-
-<!-- ==================================================================== -->
-
-<xsl:template name="select.pagemaster">
-  <xsl:param name="element" select="local-name(.)"/>
-  <xsl:param name="pageclass" select="''"/>
-
-  <xsl:variable name="pagemaster">
-    <xsl:choose>
-      <xsl:when test="$pageclass != ''">
-        <xsl:value-of select="$pageclass"/>
-      </xsl:when>
-      <xsl:when test="$pageclass = 'lot'">lot</xsl:when>
-      <xsl:when test="$element = 'dedication'">front</xsl:when>
-      <xsl:when test="$element = 'preface'">front</xsl:when>
-      <xsl:when test="$element = 'appendix'">back</xsl:when>
-      <xsl:when test="$element = 'glossary'">back</xsl:when>
-      <xsl:when test="$element = 'bibliography'">back</xsl:when>
-      <xsl:when test="$element = 'index'">index</xsl:when>
-      <xsl:when test="$element = 'colophon'">back</xsl:when>
-      <xsl:otherwise>body</xsl:otherwise>
-    </xsl:choose>
-
-    <xsl:choose>
-      <xsl:when test="$draft.mode = 'yes'">
-        <xsl:text>-draft</xsl:text>
-      </xsl:when>
-      <xsl:when test="$draft.mode = 'no'">
-        <!-- nop -->
-      </xsl:when>
-      <xsl:when test="ancestor-or-self::*[@status][1]/@status = 'draft'">
-        <xsl:text>-draft</xsl:text>
-      </xsl:when>
-      <xsl:otherwise>
-        <!-- nop -->
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:call-template name="select.user.pagemaster">
-    <xsl:with-param name="element" select="$element"/>
-    <xsl:with-param name="pageclass" select="$pageclass"/>
-    <xsl:with-param name="default-pagemaster" select="$pagemaster"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="select.user.pagemaster">
-  <xsl:param name="element"/>
-  <xsl:param name="pageclass"/>
-  <xsl:param name="default-pagemaster"/>
-
-  <!-- by default, return the default. But if you've created your own
-       pagemasters in user.pagemasters, you might want to select one here. -->
-  <xsl:value-of select="$default-pagemaster"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="head.sep.rule">
-  <xsl:param name="pageclass"/>
-  <xsl:param name="sequence"/>
-  <xsl:param name="gentext-key"/>
-
-  <xsl:if test="$header.rule != 0">
-    <xsl:attribute name="border-bottom-width">0.5pt</xsl:attribute>
-    <xsl:attribute name="border-bottom-style">solid</xsl:attribute>
-    <xsl:attribute name="border-bottom-color">black</xsl:attribute>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="foot.sep.rule">
-  <xsl:param name="pageclass"/>
-  <xsl:param name="sequence"/>
-  <xsl:param name="gentext-key"/>
-
-  <xsl:if test="$footer.rule != 0">
-    <xsl:attribute name="border-top-width">0.5pt</xsl:attribute>
-    <xsl:attribute name="border-top-style">solid</xsl:attribute>
-    <xsl:attribute name="border-top-color">black</xsl:attribute>
-  </xsl:if>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="*" mode="running.head.mode">
-  <xsl:param name="master-reference" select="'unknown'"/>
-  <xsl:param name="gentext-key" select="local-name(.)"/>
-
-  <!-- remove -draft from reference -->
-  <xsl:variable name="pageclass">
-    <xsl:choose>
-      <xsl:when test="contains($master-reference, '-draft')">
-        <xsl:value-of select="substring-before($master-reference, '-draft')"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$master-reference"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <fo:static-content flow-name="xsl-region-before-first">
-    <fo:block xsl:use-attribute-sets="header.content.properties">
-      <xsl:call-template name="header.table">
-        <xsl:with-param name="pageclass" select="$pageclass"/>
-        <xsl:with-param name="sequence" select="'first'"/>
-        <xsl:with-param name="gentext-key" select="$gentext-key"/>
-      </xsl:call-template>
-    </fo:block>
-  </fo:static-content>
-
-  <fo:static-content flow-name="xsl-region-before-odd">
-    <fo:block xsl:use-attribute-sets="header.content.properties">
-      <xsl:call-template name="header.table">
-        <xsl:with-param name="pageclass" select="$pageclass"/>
-        <xsl:with-param name="sequence" select="'odd'"/>
-        <xsl:with-param name="gentext-key" select="$gentext-key"/>
-      </xsl:call-template>
-    </fo:block>
-  </fo:static-content>
-
-  <fo:static-content flow-name="xsl-region-before-even">
-    <fo:block xsl:use-attribute-sets="header.content.properties">
-      <xsl:call-template name="header.table">
-        <xsl:with-param name="pageclass" select="$pageclass"/>
-        <xsl:with-param name="sequence" select="'even'"/>
-        <xsl:with-param name="gentext-key" select="$gentext-key"/>
-      </xsl:call-template>
-    </fo:block>
-  </fo:static-content>
-
-  <fo:static-content flow-name="xsl-region-before-blank">
-    <fo:block xsl:use-attribute-sets="header.content.properties">
-      <xsl:call-template name="header.table">
-        <xsl:with-param name="pageclass" select="$pageclass"/>
-        <xsl:with-param name="sequence" select="'blank'"/>
-        <xsl:with-param name="gentext-key" select="$gentext-key"/>
-      </xsl:call-template>
-    </fo:block>
-  </fo:static-content>
-
-  <xsl:call-template name="footnote-separator"/>
-
-  <xsl:if test="$fop.extensions = 0 and $fop1.extensions = 0">
-    <xsl:call-template name="blank.page.content"/>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="footnote-separator">
-  <fo:static-content flow-name="xsl-footnote-separator">
-    <fo:block>
-      <fo:leader xsl:use-attribute-sets="footnote.sep.leader.properties"/>
-    </fo:block>
-  </fo:static-content>
-</xsl:template>
-
-<xsl:template name="blank.page.content">
-  <fo:static-content flow-name="blank-body">
-    <fo:block text-align="center"/>
-  </fo:static-content>
-</xsl:template>
-
-<xsl:template name="header.table">
-  <xsl:param name="pageclass" select="''"/>
-  <xsl:param name="sequence" select="''"/>
-  <xsl:param name="gentext-key" select="''"/>
-
-  <!-- default is a single table style for all headers -->
-  <!-- Customize it for different page classes or sequence location -->
-
-  <xsl:choose>
-      <xsl:when test="$pageclass = 'index'">
-          <xsl:attribute name="margin-left">0pt</xsl:attribute>
-      </xsl:when>
-  </xsl:choose>
-
-  <xsl:variable name="column1">
-    <xsl:choose>
-      <xsl:when test="$double.sided = 0">1</xsl:when>
-      <xsl:when test="$sequence = 'first' or $sequence = 'odd'">1</xsl:when>
-      <xsl:otherwise>3</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="column3">
-    <xsl:choose>
-      <xsl:when test="$double.sided = 0">3</xsl:when>
-      <xsl:when test="$sequence = 'first' or $sequence = 'odd'">3</xsl:when>
-      <xsl:otherwise>1</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="candidate">
-    <fo:table xsl:use-attribute-sets="header.table.properties">
-      <xsl:call-template name="head.sep.rule">
-        <xsl:with-param name="pageclass" select="$pageclass"/>
-        <xsl:with-param name="sequence" select="$sequence"/>
-        <xsl:with-param name="gentext-key" select="$gentext-key"/>
-      </xsl:call-template>
-
-      <fo:table-column column-number="1">
-        <xsl:attribute name="column-width">
-          <xsl:text>proportional-column-width(</xsl:text>
-          <xsl:call-template name="header.footer.width">
-            <xsl:with-param name="location">header</xsl:with-param>
-            <xsl:with-param name="position" select="$column1"/>
-          </xsl:call-template>
-          <xsl:text>)</xsl:text>
-        </xsl:attribute>
-      </fo:table-column>
-      <fo:table-column column-number="2">
-        <xsl:attribute name="column-width">
-          <xsl:text>proportional-column-width(</xsl:text>
-          <xsl:call-template name="header.footer.width">
-            <xsl:with-param name="location">header</xsl:with-param>
-            <xsl:with-param name="position" select="2"/>
-          </xsl:call-template>
-          <xsl:text>)</xsl:text>
-        </xsl:attribute>
-      </fo:table-column>
-      <fo:table-column column-number="3">
-        <xsl:attribute name="column-width">
-          <xsl:text>proportional-column-width(</xsl:text>
-          <xsl:call-template name="header.footer.width">
-            <xsl:with-param name="location">header</xsl:with-param>
-            <xsl:with-param name="position" select="$column3"/>
-          </xsl:call-template>
-          <xsl:text>)</xsl:text>
-        </xsl:attribute>
-      </fo:table-column>
-
-      <fo:table-body>
-        <fo:table-row>
-          <xsl:attribute name="block-progression-dimension.minimum">
-            <xsl:value-of select="$header.table.height"/>
-          </xsl:attribute>
-          <fo:table-cell text-align="left"
-                         display-align="before">
-            <xsl:if test="$fop.extensions = 0">
-              <xsl:attribute name="relative-align">baseline</xsl:attribute>
-            </xsl:if>
-            <fo:block>
-              <xsl:call-template name="header.content">
-                <xsl:with-param name="pageclass" select="$pageclass"/>
-                <xsl:with-param name="sequence" select="$sequence"/>
-                <xsl:with-param name="position" select="'left'"/>
-                <xsl:with-param name="gentext-key" select="$gentext-key"/>
-              </xsl:call-template>
-            </fo:block>
-          </fo:table-cell>
-          <fo:table-cell text-align="center"
-                         display-align="before">
-            <xsl:if test="$fop.extensions = 0">
-              <xsl:attribute name="relative-align">baseline</xsl:attribute>
-            </xsl:if>
-            <fo:block>
-              <xsl:call-template name="header.content">
-                <xsl:with-param name="pageclass" select="$pageclass"/>
-                <xsl:with-param name="sequence" select="$sequence"/>
-                <xsl:with-param name="position" select="'center'"/>
-                <xsl:with-param name="gentext-key" select="$gentext-key"/>
-              </xsl:call-template>
-            </fo:block>
-          </fo:table-cell>
-          <fo:table-cell text-align="right"
-                         display-align="before">
-            <xsl:if test="$fop.extensions = 0">
-              <xsl:attribute name="relative-align">baseline</xsl:attribute>
-            </xsl:if>
-            <fo:block>
-              <xsl:call-template name="header.content">
-                <xsl:with-param name="pageclass" select="$pageclass"/>
-                <xsl:with-param name="sequence" select="$sequence"/>
-                <xsl:with-param name="position" select="'right'"/>
-                <xsl:with-param name="gentext-key" select="$gentext-key"/>
-              </xsl:call-template>
-            </fo:block>
-          </fo:table-cell>
-        </fo:table-row>
-      </fo:table-body>
-    </fo:table>
-  </xsl:variable>
-
-  <!-- Really output a header? -->
-  <xsl:choose>
-    <xsl:when test="$pageclass = 'titlepage' and $gentext-key = 'book'
-                    and $sequence='first'">
-      <!-- no, book titlepages have no headers at all -->
-    </xsl:when>
-    <xsl:when test="$sequence = 'blank' and $headers.on.blank.pages = 0">
-      <!-- no output -->
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy-of select="$candidate"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="header.content">
-  <xsl:param name="pageclass" select="''"/>
-  <xsl:param name="sequence" select="''"/>
-  <xsl:param name="position" select="''"/>
-  <xsl:param name="gentext-key" select="''"/>
-
-<!--
-  <fo:block>
-    <xsl:value-of select="$pageclass"/>
-    <xsl:text>, </xsl:text>
-    <xsl:value-of select="$sequence"/>
-    <xsl:text>, </xsl:text>
-    <xsl:value-of select="$position"/>
-    <xsl:text>, </xsl:text>
-    <xsl:value-of select="$gentext-key"/>
-  </fo:block>
--->
-
-  <fo:block>
-
-    <!-- sequence can be odd, even, first, blank -->
-    <!-- position can be left, center, right -->
-    <xsl:choose>
-      <xsl:when test="$sequence = 'blank'">
-        <!-- nothing -->
-      </xsl:when>
-
-      <xsl:when test="$position='left'">
-        <!-- Same for odd, even, empty, and blank sequences -->
-        <xsl:call-template name="draft.text"/>
-      </xsl:when>
-
-      <xsl:when test="($sequence='odd' or $sequence='even') and $position='center'">
-        <xsl:if test="$pageclass != 'titlepage'">
-          <xsl:choose>
-            <xsl:when test="ancestor::book and ($double.sided != 0)">
-              <fo:retrieve-marker retrieve-class-name="section.head.marker"
-                                  retrieve-position="first-including-carryover"
-                                  retrieve-boundary="page-sequence"/>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:apply-templates select="." mode="titleabbrev.markup"/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:if>
-      </xsl:when>
-
-      <xsl:when test="$position='center'">
-        <!-- nothing for empty and blank sequences -->
-      </xsl:when>
-
-      <xsl:when test="$position='right'">
-        <!-- Same for odd, even, empty, and blank sequences -->
-        <xsl:call-template name="draft.text"/>
-      </xsl:when>
-
-      <xsl:when test="$sequence = 'first'">
-        <!-- nothing for first pages -->
-      </xsl:when>
-
-      <xsl:when test="$sequence = 'blank'">
-        <!-- nothing for blank pages -->
-      </xsl:when>
-    </xsl:choose>
-  </fo:block>
-</xsl:template>
-
-<xsl:template name="header.footer.width">
-  <xsl:param name="location" select="'header'"/>
-  <xsl:param name="position" select="1"/>
-
-  <xsl:variable name="width.set">
-    <xsl:choose>
-      <xsl:when test="$location = 'header'">
-        <xsl:value-of select="normalize-space($header.column.widths)"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="normalize-space($footer.column.widths)"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-
-  <xsl:variable name="width">
-    <xsl:choose>
-      <xsl:when test="$position = 1">
-        <xsl:value-of select="substring-before($width.set, ' ')"/>
-      </xsl:when>
-      <xsl:when test="$position = 2">
-        <xsl:value-of select="substring-before(substring-after($width.set, ' '), ' ')"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="substring-after(substring-after($width.set, ' '), ' ')"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <!-- Make sure it is a number -->
-  <xsl:choose>
-    <xsl:when test = "$width = number($width)">
-      <xsl:value-of select="$width"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:message>Error: value in <xsl:value-of select="$location"/>.column.widths at position <xsl:value-of select="$position"/> is not a number.</xsl:message>
-      <xsl:text>1</xsl:text>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="draft.text">
-  <xsl:choose>
-    <xsl:when test="$draft.mode = 'yes'">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'Draft'"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="$draft.mode = 'no'">
-      <!-- nop -->
-    </xsl:when>
-    <xsl:when test="ancestor-or-self::*[@status][1]/@status = 'draft'">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'Draft'"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <!-- nop -->
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="*" mode="running.foot.mode">
-  <xsl:param name="master-reference" select="'unknown'"/>
-  <xsl:param name="gentext-key" select="local-name(.)"/>
-
-  <!-- remove -draft from reference -->
-  <xsl:variable name="pageclass">
-    <xsl:choose>
-      <xsl:when test="contains($master-reference, '-draft')">
-        <xsl:value-of select="substring-before($master-reference, '-draft')"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$master-reference"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <fo:static-content flow-name="xsl-region-after-first">
-    <fo:block xsl:use-attribute-sets="footer.content.properties">
-      <xsl:call-template name="footer.table">
-        <xsl:with-param name="pageclass" select="$pageclass"/>
-        <xsl:with-param name="sequence" select="'first'"/>
-        <xsl:with-param name="gentext-key" select="$gentext-key"/>
-      </xsl:call-template>
-    </fo:block>
-  </fo:static-content>
-
-  <fo:static-content flow-name="xsl-region-after-odd">
-    <fo:block xsl:use-attribute-sets="footer.content.properties">
-      <xsl:call-template name="footer.table">
-        <xsl:with-param name="pageclass" select="$pageclass"/>
-        <xsl:with-param name="sequence" select="'odd'"/>
-        <xsl:with-param name="gentext-key" select="$gentext-key"/>
-      </xsl:call-template>
-    </fo:block>
-  </fo:static-content>
-
-  <fo:static-content flow-name="xsl-region-after-even">
-    <fo:block xsl:use-attribute-sets="footer.content.properties">
-      <xsl:call-template name="footer.table">
-        <xsl:with-param name="pageclass" select="$pageclass"/>
-        <xsl:with-param name="sequence" select="'even'"/>
-        <xsl:with-param name="gentext-key" select="$gentext-key"/>
-      </xsl:call-template>
-    </fo:block>
-  </fo:static-content>
-
-  <fo:static-content flow-name="xsl-region-after-blank">
-    <fo:block xsl:use-attribute-sets="footer.content.properties">
-      <xsl:call-template name="footer.table">
-        <xsl:with-param name="pageclass" select="$pageclass"/>
-        <xsl:with-param name="sequence" select="'blank'"/>
-        <xsl:with-param name="gentext-key" select="$gentext-key"/>
-      </xsl:call-template>
-    </fo:block>
-  </fo:static-content>
-</xsl:template>
-
-<xsl:template name="footer.table">
-  <xsl:param name="pageclass" select="''"/>
-  <xsl:param name="sequence" select="''"/>
-  <xsl:param name="gentext-key" select="''"/>
-
-  <!-- default is a single table style for all footers -->
-  <!-- Customize it for different page classes or sequence location -->
-
-  <xsl:choose>
-      <xsl:when test="$pageclass = 'index'">
-          <xsl:attribute name="margin-left">0pt</xsl:attribute>
-      </xsl:when>
-  </xsl:choose>
-
-  <xsl:variable name="column1">
-    <xsl:choose>
-      <xsl:when test="$double.sided = 0">1</xsl:when>
-      <xsl:when test="$sequence = 'first' or $sequence = 'odd'">1</xsl:when>
-      <xsl:otherwise>3</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="column3">
-    <xsl:choose>
-      <xsl:when test="$double.sided = 0">3</xsl:when>
-      <xsl:when test="$sequence = 'first' or $sequence = 'odd'">3</xsl:when>
-      <xsl:otherwise>1</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="candidate">
-    <fo:table xsl:use-attribute-sets="footer.table.properties">
-      <xsl:call-template name="foot.sep.rule">
-        <xsl:with-param name="pageclass" select="$pageclass"/>
-        <xsl:with-param name="sequence" select="$sequence"/>
-        <xsl:with-param name="gentext-key" select="$gentext-key"/>
-      </xsl:call-template>
-      <fo:table-column column-number="1">
-        <xsl:attribute name="column-width">
-          <xsl:text>proportional-column-width(</xsl:text>
-          <xsl:call-template name="header.footer.width">
-            <xsl:with-param name="location">footer</xsl:with-param>
-            <xsl:with-param name="position" select="$column1"/>
-          </xsl:call-template>
-          <xsl:text>)</xsl:text>
-        </xsl:attribute>
-      </fo:table-column>
-      <fo:table-column column-number="2">
-        <xsl:attribute name="column-width">
-          <xsl:text>proportional-column-width(</xsl:text>
-          <xsl:call-template name="header.footer.width">
-            <xsl:with-param name="location">footer</xsl:with-param>
-            <xsl:with-param name="position" select="2"/>
-          </xsl:call-template>
-          <xsl:text>)</xsl:text>
-        </xsl:attribute>
-      </fo:table-column>
-      <fo:table-column column-number="3">
-        <xsl:attribute name="column-width">
-          <xsl:text>proportional-column-width(</xsl:text>
-          <xsl:call-template name="header.footer.width">
-            <xsl:with-param name="location">footer</xsl:with-param>
-            <xsl:with-param name="position" select="$column3"/>
-          </xsl:call-template>
-          <xsl:text>)</xsl:text>
-        </xsl:attribute>
-      </fo:table-column>
-
-      <fo:table-body>
-        <fo:table-row>
-          <xsl:attribute name="block-progression-dimension.minimum">
-            <xsl:value-of select="$footer.table.height"/>
-          </xsl:attribute>
-          <fo:table-cell text-align="left"
-                         display-align="after">
-            <xsl:if test="$fop.extensions = 0">
-              <xsl:attribute name="relative-align">baseline</xsl:attribute>
-            </xsl:if>
-            <fo:block>
-              <xsl:call-template name="footer.content">
-                <xsl:with-param name="pageclass" select="$pageclass"/>
-                <xsl:with-param name="sequence" select="$sequence"/>
-                <xsl:with-param name="position" select="'left'"/>
-                <xsl:with-param name="gentext-key" select="$gentext-key"/>
-              </xsl:call-template>
-            </fo:block>
-          </fo:table-cell>
-          <fo:table-cell text-align="center"
-                         display-align="after">
-            <xsl:if test="$fop.extensions = 0">
-              <xsl:attribute name="relative-align">baseline</xsl:attribute>
-            </xsl:if>
-            <fo:block>
-              <xsl:call-template name="footer.content">
-                <xsl:with-param name="pageclass" select="$pageclass"/>
-                <xsl:with-param name="sequence" select="$sequence"/>
-                <xsl:with-param name="position" select="'center'"/>
-                <xsl:with-param name="gentext-key" select="$gentext-key"/>
-              </xsl:call-template>
-            </fo:block>
-          </fo:table-cell>
-          <fo:table-cell text-align="right"
-                         display-align="after">
-            <xsl:if test="$fop.extensions = 0">
-              <xsl:attribute name="relative-align">baseline</xsl:attribute>
-            </xsl:if>
-            <fo:block>
-              <xsl:call-template name="footer.content">
-                <xsl:with-param name="pageclass" select="$pageclass"/>
-                <xsl:with-param name="sequence" select="$sequence"/>
-                <xsl:with-param name="position" select="'right'"/>
-                <xsl:with-param name="gentext-key" select="$gentext-key"/>
-              </xsl:call-template>
-            </fo:block>
-          </fo:table-cell>
-        </fo:table-row>
-      </fo:table-body>
-    </fo:table>
-  </xsl:variable>
-
-  <!-- Really output a footer? -->
-  <xsl:choose>
-    <xsl:when test="$pageclass='titlepage' and $gentext-key='book'
-                    and $sequence='first'">
-      <!-- no, book titlepages have no footers at all -->
-    </xsl:when>
-    <xsl:when test="$sequence = 'blank' and $footers.on.blank.pages = 0">
-      <!-- no output -->
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy-of select="$candidate"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="footer.content">
-  <xsl:param name="pageclass" select="''"/>
-  <xsl:param name="sequence" select="''"/>
-  <xsl:param name="position" select="''"/>
-  <xsl:param name="gentext-key" select="''"/>
-
-<!--
-  <fo:block>
-    <xsl:value-of select="$pageclass"/>
-    <xsl:text>, </xsl:text>
-    <xsl:value-of select="$sequence"/>
-    <xsl:text>, </xsl:text>
-    <xsl:value-of select="$position"/>
-    <xsl:text>, </xsl:text>
-    <xsl:value-of select="$gentext-key"/>
-  </fo:block>
--->
-
-  <fo:block>
-    <!-- pageclass can be front, body, back -->
-    <!-- sequence can be odd, even, first, blank -->
-    <!-- position can be left, center, right -->
-    <xsl:choose>
-      <xsl:when test="$pageclass = 'titlepage'">
-        <!-- nop; no footer on title pages -->
-      </xsl:when>
-
-      <xsl:when test="$double.sided != 0 and $sequence = 'even'
-                      and $position='left'">
-        <fo:page-number/>
-      </xsl:when>
-
-      <xsl:when test="$double.sided != 0 and ($sequence = 'odd' or $sequence = 'first')
-                      and $position='right'">
-        <fo:page-number/>
-      </xsl:when>
-
-      <xsl:when test="$double.sided = 0 and $position='center'">
-        <fo:page-number/>
-      </xsl:when>
-
-      <xsl:when test="$sequence='blank'">
-        <xsl:choose>
-          <xsl:when test="$double.sided != 0 and $position = 'left'">
-            <fo:page-number/>
-          </xsl:when>
-          <xsl:when test="$double.sided = 0 and $position = 'center'">
-            <fo:page-number/>
-          </xsl:when>
-          <xsl:otherwise>
-            <!-- nop -->
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:when>
-
-
-      <xsl:otherwise>
-        <!-- nop -->
-      </xsl:otherwise>
-    </xsl:choose>
-  </fo:block>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="page.number.format">
-  <xsl:param name="element" select="local-name(.)"/>
-  <xsl:param name="master-reference" select="''"/>
-
-  <xsl:choose>
-    <xsl:when test="$element = 'toc' and self::book">i</xsl:when>
-    <xsl:when test="$element = 'preface'">i</xsl:when>
-    <xsl:when test="$element = 'dedication'">i</xsl:when>
-    <xsl:otherwise>1</xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="initial.page.number">
-  <xsl:param name="element" select="local-name(.)"/>
-  <xsl:param name="master-reference" select="''"/>
-
-  <!-- Select the first content that the stylesheet places
-       after the TOC -->
-  <xsl:variable name="first.book.content" 
-                select="ancestor::book/*[
-                          not(self::title or
-                              self::subtitle or
-                              self::titleabbrev or
-                              self::bookinfo or
-                              self::info or
-                              self::dedication or
-                              self::preface or
-                              self::toc or
-                              self::lot)][1]"/>
-  <xsl:choose>
-    <!-- double-sided output -->
-    <xsl:when test="$double.sided != 0">
-      <xsl:choose>
-        <xsl:when test="$element = 'toc'">auto-odd</xsl:when>
-        <xsl:when test="$element = 'book'">1</xsl:when>
-        <!-- preface typically continues TOC roman numerals -->
-        <!-- Change page.number.format if not -->
-        <xsl:when test="$element = 'preface'">auto-odd</xsl:when>
-        <xsl:when test="($element = 'dedication' or $element = 'article') 
-                    and not(preceding::chapter
-                            or preceding::preface
-                            or preceding::appendix
-                            or preceding::article
-                            or preceding::dedication
-                            or parent::part
-                            or parent::reference)">1</xsl:when>
-        <xsl:when test="generate-id($first.book.content) =
-                        generate-id(.)">1</xsl:when>
-        <xsl:otherwise>auto-odd</xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-
-    <!-- single-sided output -->
-    <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="$element = 'toc'">auto</xsl:when>
-        <xsl:when test="$element = 'book'">1</xsl:when>
-        <xsl:when test="$element = 'preface'">auto</xsl:when>
-       <xsl:when test="($element = 'dedication' or $element = 'article') and
-                        not(preceding::chapter
-                            or preceding::preface
-                            or preceding::appendix
-                            or preceding::article
-                            or preceding::dedication
-                            or parent::part
-                            or parent::reference)">1</xsl:when>
-        <xsl:when test="generate-id($first.book.content) =
-                        generate-id(.)">1</xsl:when>
-        <xsl:otherwise>auto</xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="force.page.count">
-  <xsl:param name="element" select="local-name(.)"/>
-  <xsl:param name="master-reference" select="''"/>
-
-  <xsl:choose>
-    <!-- double-sided output -->
-    <xsl:when test="$double.sided != 0">end-on-even</xsl:when>
-    <!-- single-sided output -->
-    <xsl:otherwise>no-force</xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="set.flow.properties">
-  <xsl:param name="element" select="local-name(.)"/>
-  <xsl:param name="master-reference" select="''"/>
-
-  <!-- This template is called after each <fo:flow> starts. -->
-  <!-- Customize this template to set attributes on fo:flow -->
-
-  <!-- remove -draft from reference -->
-  <xsl:variable name="pageclass">
-    <xsl:choose>
-      <xsl:when test="contains($master-reference, '-draft')">
-        <xsl:value-of select="substring-before($master-reference, '-draft')"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$master-reference"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$fop.extensions != 0 or $passivetex.extensions != 0">
-      <!-- body.start.indent does not work well with these processors -->
-    </xsl:when>
-    <xsl:when test="starts-with($pageclass, 'body') or
-                    starts-with($pageclass, 'lot') or
-                    starts-with($pageclass, 'front') or
-                    $element = 'preface' or
-                    (starts-with($pageclass, 'back') and
-                    $element = 'appendix')">
-      <xsl:attribute name="start-indent">
-        <xsl:value-of select="$body.start.indent"/>
-      </xsl:attribute>
-      <xsl:attribute name="end-indent">
-        <xsl:value-of select="$body.end.indent"/>
-      </xsl:attribute>
-    </xsl:when>
-  </xsl:choose>
-
-</xsl:template>
-<!-- ==================================================================== -->
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/param.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/param.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,891 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-<!-- This file is generated from param.xweb -->
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<xsl:attribute-set name="abstract.properties">
-  <xsl:attribute name="start-indent">0.0in</xsl:attribute>
-  <xsl:attribute name="end-indent">0.0in</xsl:attribute>
-</xsl:attribute-set>
-<xsl:attribute-set name="abstract.title.properties">
-  <xsl:attribute name="font-family"><xsl:value-of select="$title.fontset"/></xsl:attribute>
-  <xsl:attribute name="font-weight">bold</xsl:attribute>
-  <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
-  <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
-  <xsl:attribute name="space-before.optimum"><xsl:value-of select="concat($body.font.master, 'pt')"/></xsl:attribute>
-  <xsl:attribute name="space-before.minimum"><xsl:value-of select="concat($body.font.master, 'pt * 0.8')"/></xsl:attribute>
-  <xsl:attribute name="space-before.maximum"><xsl:value-of select="concat($body.font.master, 'pt * 1.2')"/></xsl:attribute>
-  <xsl:attribute name="hyphenate">false</xsl:attribute>
-  <xsl:attribute name="text-align">center</xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="admon.graphics.extension">.png</xsl:param>
-<xsl:param name="admon.graphics" select="0"/>
-<xsl:param name="admon.graphics.path">images/</xsl:param>
-<xsl:param name="admon.textlabel" select="1"/>
-<xsl:attribute-set name="admonition.properties"/>
-<xsl:attribute-set name="admonition.title.properties">
-  <xsl:attribute name="font-size">14pt</xsl:attribute>
-  <xsl:attribute name="font-weight">bold</xsl:attribute>
-  <xsl:attribute name="hyphenate">false</xsl:attribute>
-  <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
-</xsl:attribute-set>
-<xsl:attribute-set name="graphical.admonition.properties">
-  <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
-  <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
-  <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
-  <xsl:attribute name="space-after.optimum">1em</xsl:attribute>
-  <xsl:attribute name="space-after.minimum">0.8em</xsl:attribute>
-  <xsl:attribute name="space-after.maximum">1.2em</xsl:attribute>
-</xsl:attribute-set>
-<xsl:attribute-set name="nongraphical.admonition.properties">
-  <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
-  <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
-  <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
-  <xsl:attribute name="margin-left">0.25in</xsl:attribute>
-  <xsl:attribute name="margin-right">0.25in</xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="alignment">justify</xsl:param>
-<xsl:param name="appendix.autolabel">A</xsl:param>
-<xsl:param name="arbortext.extensions" select="0"/>
-<xsl:attribute-set name="article.appendix.title.properties" use-attribute-sets="section.title.properties                          section.title.level1.properties">
-  <xsl:attribute name="margin-left">
-    <xsl:value-of select="$title.margin.left"/>
-  </xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="author.othername.in.middle" select="1"/>
-<xsl:param name="autotoc.label.separator">. </xsl:param>
-<xsl:param name="axf.extensions" select="0"/>
-<xsl:param name="biblioentry.item.separator">. </xsl:param>
-<xsl:attribute-set name="biblioentry.properties" use-attribute-sets="normal.para.spacing">
-  <xsl:attribute name="start-indent">0.5in</xsl:attribute>
-  <xsl:attribute name="text-indent">-0.5in</xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="bibliography.collection">http://docbook.sourceforge.net/release/bibliography/bibliography.xml</xsl:param>
-
-<xsl:param name="bibliography.numbered" select="0"/>
-<xsl:param name="bibliography.style">normal</xsl:param>
-<xsl:attribute-set name="blockquote.properties">
-<xsl:attribute name="margin-left">0.5in</xsl:attribute>
-<xsl:attribute name="margin-right">0.5in</xsl:attribute>
-<xsl:attribute name="space-after.minimum">0.5em</xsl:attribute>
-<xsl:attribute name="space-after.optimum">1em</xsl:attribute>
-<xsl:attribute name="space-after.maximum">2em</xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="body.font.family">serif</xsl:param>
-<xsl:param name="body.font.master">10</xsl:param>
-<xsl:param name="body.font.size">
- <xsl:value-of select="$body.font.master"/><xsl:text>pt</xsl:text>
-</xsl:param>
-<xsl:param name="body.margin.bottom">0.5in</xsl:param>
-<xsl:param name="body.margin.top">0.5in</xsl:param>
-<xsl:param name="body.start.indent">
-  <xsl:choose>
-    <xsl:when test="$fop.extensions != 0">0pt</xsl:when>
-    <xsl:when test="$passivetex.extensions != 0">0pt</xsl:when>
-    <xsl:otherwise>4pc</xsl:otherwise>
-  </xsl:choose>
-</xsl:param>
-<xsl:param name="body.end.indent">0pt</xsl:param>
-<xsl:param name="bridgehead.in.toc" select="0"/>
-<xsl:param name="callout.defaultcolumn">60</xsl:param>
-
-<xsl:param name="callout.graphics.extension">.svg</xsl:param>
-<xsl:param name="callout.graphics" select="1"/>
-<xsl:param name="callout.icon.size">7pt</xsl:param>
-
-<xsl:param name="callout.graphics.number.limit">30</xsl:param>
-<xsl:param name="callout.graphics.path">images/callouts/</xsl:param>
-<xsl:param name="callout.unicode.font">ZapfDingbats</xsl:param>
-<xsl:param name="callout.unicode" select="0"/>
-<xsl:param name="callout.unicode.number.limit">10</xsl:param>
-<xsl:param name="callout.unicode.start.character">10102</xsl:param>
-<xsl:param name="callouts.extension" select="1"/>
-<xsl:param name="chapter.autolabel" select="1"/>
-<xsl:param name="collect.xref.targets">no</xsl:param>
-<xsl:param name="column.count.back" select="1"/>
-<xsl:param name="column.count.body" select="1"/>
-<xsl:param name="column.count.front" select="1"/>
-<xsl:param name="column.count.index">2</xsl:param>
-<xsl:param name="column.count.lot" select="1"/>
-<xsl:param name="column.count.titlepage" select="1"/>
-<xsl:param name="column.gap.back">12pt</xsl:param>
-<xsl:param name="column.gap.body">12pt</xsl:param>
-<xsl:param name="column.gap.front">12pt</xsl:param>
-<xsl:param name="column.gap.index">12pt</xsl:param>
-<xsl:param name="column.gap.lot">12pt</xsl:param>
-<xsl:param name="column.gap.titlepage">12pt</xsl:param>
-<xsl:attribute-set name="compact.list.item.spacing">
-  <xsl:attribute name="space-before.optimum">0em</xsl:attribute>
-  <xsl:attribute name="space-before.minimum">0em</xsl:attribute>
-  <xsl:attribute name="space-before.maximum">0.2em</xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="component.label.includes.part.label" select="0"/>
-<xsl:attribute-set name="component.title.properties">
-  <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
-  <xsl:attribute name="space-before.optimum"><xsl:value-of select="concat($body.font.master, 'pt')"/></xsl:attribute>
-  <xsl:attribute name="space-before.minimum"><xsl:value-of select="concat($body.font.master, 'pt * 0.8')"/></xsl:attribute>
-  <xsl:attribute name="space-before.maximum"><xsl:value-of select="concat($body.font.master, 'pt * 1.2')"/></xsl:attribute>
-  <xsl:attribute name="hyphenate">false</xsl:attribute>
-  <xsl:attribute name="text-align">
-    <xsl:choose>
-      <xsl:when test="((parent::article | parent::articleinfo | parent::info/parent::article) and not(ancestor::book) and not(self::bibliography))         or (parent::slides | parent::slidesinfo)">center</xsl:when>
-      <xsl:otherwise>left</xsl:otherwise>
-    </xsl:choose>
-  </xsl:attribute>
-  <xsl:attribute name="start-indent"><xsl:value-of select="$title.margin.left"/></xsl:attribute>
-</xsl:attribute-set>
-<xsl:attribute-set name="component.titlepage.properties">
-</xsl:attribute-set>
-<xsl:param name="crop.marks" select="0"/>
-<xsl:param name="crop.mark.width">0.5pt</xsl:param>
-<xsl:param name="crop.mark.offset">24pt</xsl:param>
-<xsl:param name="crop.mark.bleed">6pt</xsl:param>
-<xsl:param name="current.docid"/>
-<xsl:param name="default.float.class">
-  <xsl:choose>
-    <xsl:when test="contains($stylesheet.result.type,'html')">left</xsl:when>
-    <xsl:otherwise>before</xsl:otherwise>
-  </xsl:choose>
-</xsl:param>
-<xsl:param name="default.image.width"/>
-<xsl:param name="default.table.width"/>
-<xsl:param name="default.table.frame">all</xsl:param>
-<xsl:param name="default.units">pt</xsl:param>
-<xsl:param name="dingbat.font.family">serif</xsl:param>
-<xsl:param name="double.sided" select="0"/>
-<xsl:param name="draft.mode">maybe</xsl:param>
-<xsl:param name="draft.watermark.image">http://docbook.sourceforge.net/release/images/draft.png</xsl:param>
-
-<xsl:param name="ebnf.assignment">
-  <fo:inline xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$monospace.font.family}">
-    <xsl:text>::=</xsl:text>
-  </fo:inline>
-</xsl:param>
-
-<xsl:param name="ebnf.statement.terminator"/>
-<xsl:param name="email.delimiters.enabled" select="1"/>
-<xsl:attribute-set name="equation.properties" use-attribute-sets="formal.object.properties"/>
-<xsl:attribute-set name="example.properties" use-attribute-sets="formal.object.properties"/>
-<xsl:attribute-set name="figure.properties" use-attribute-sets="formal.object.properties"/>
-<xsl:param name="firstterm.only.link" select="0"/>
-<xsl:attribute-set name="footer.content.properties">
-  <xsl:attribute name="font-family">
-    <xsl:value-of select="$body.fontset"/>
-  </xsl:attribute>
-  <xsl:attribute name="margin-left">
-    <xsl:value-of select="$title.margin.left"/>
-  </xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="footer.rule" select="1"/>
-<xsl:param name="footer.column.widths">1 1 1</xsl:param>
-<xsl:param name="footer.table.height">14pt</xsl:param>
-<xsl:attribute-set name="footer.table.properties">
-  <xsl:attribute name="table-layout">fixed</xsl:attribute>
-  <xsl:attribute name="width">100%</xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="footers.on.blank.pages" select="1"/>
-<xsl:param name="footnote.font.size">
- <xsl:value-of select="$body.font.master * 0.8"/><xsl:text>pt</xsl:text>
-</xsl:param>
-<xsl:param name="footnote.number.format">1</xsl:param>
-<xsl:param name="footnote.number.symbols"/>
-<xsl:attribute-set name="footnote.mark.properties">
-  <xsl:attribute name="font-size">75%</xsl:attribute>
-  <xsl:attribute name="font-weight">normal</xsl:attribute>
-  <xsl:attribute name="font-style">normal</xsl:attribute>
-</xsl:attribute-set>
-<xsl:attribute-set name="footnote.properties">
-  <xsl:attribute name="font-family"><xsl:value-of select="$body.fontset"/></xsl:attribute>
-  <xsl:attribute name="font-size"><xsl:value-of select="$footnote.font.size"/></xsl:attribute>
-  <xsl:attribute name="font-weight">normal</xsl:attribute>
-  <xsl:attribute name="font-style">normal</xsl:attribute>
-  <xsl:attribute name="text-align"><xsl:value-of select="$alignment"/></xsl:attribute>
-  <xsl:attribute name="start-indent">0pt</xsl:attribute>
-  <xsl:attribute name="text-indent">0pt</xsl:attribute>
-</xsl:attribute-set>
-<xsl:attribute-set name="footnote.sep.leader.properties">
-  <xsl:attribute name="color">black</xsl:attribute>
-  <xsl:attribute name="leader-pattern">rule</xsl:attribute>
-  <xsl:attribute name="leader-length">1in</xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="fop.extensions" select="0"/>
-<xsl:param name="fop1.extensions" select="0"/>
-<xsl:attribute-set name="formal.object.properties">
-  <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute>
-  <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
-  <xsl:attribute name="space-before.maximum">2em</xsl:attribute>
-  <xsl:attribute name="space-after.minimum">0.5em</xsl:attribute>
-  <xsl:attribute name="space-after.optimum">1em</xsl:attribute>
-  <xsl:attribute name="space-after.maximum">2em</xsl:attribute>
-  <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="formal.procedures" select="1"/>
-<xsl:param name="formal.title.placement">
-figure before
-example before
-equation before
-table before
-procedure before
-task before
-</xsl:param>
-<xsl:attribute-set name="formal.title.properties" use-attribute-sets="normal.para.spacing">
-  <xsl:attribute name="font-weight">bold</xsl:attribute>
-  <xsl:attribute name="font-size">
-    <xsl:value-of select="$body.font.master * 1.2"/>
-    <xsl:text>pt</xsl:text>
-  </xsl:attribute>
-  <xsl:attribute name="hyphenate">false</xsl:attribute>
-  <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute>
-  <xsl:attribute name="space-after.optimum">0.6em</xsl:attribute>
-  <xsl:attribute name="space-after.maximum">0.8em</xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="funcsynopsis.decoration" select="1"/>
-<xsl:param name="funcsynopsis.style">kr</xsl:param>
-<xsl:param name="function.parens" select="0"/>
-<xsl:param name="generate.index" select="1"/>
-<xsl:param name="generate.section.toc.level" select="0"/>
-
-<xsl:param name="generate.toc">
-/appendix toc,title
-article/appendix  nop
-/article  toc,title
-book      toc,title,figure,table,example,equation
-/chapter  toc,title
-part      toc,title
-/preface  toc,title
-reference toc,title
-/sect1    toc
-/sect2    toc
-/sect3    toc
-/sect4    toc
-/sect5    toc
-/section  toc
-set       toc,title
-</xsl:param>
-<xsl:param name="glossary.as.blocks" select="0"/>
-<xsl:param name="glossary.collection"/>
-<xsl:param name="glossary.sort" select="0"/>
-<xsl:param name="glossentry.show.acronym">no</xsl:param>
-<xsl:param name="glosslist.as.blocks" select="0"/>
-<xsl:param name="glossterm.auto.link" select="0"/>
-<xsl:param name="glossterm.separation">0.25in</xsl:param>
-<xsl:param name="glossterm.width">2in</xsl:param>
-<xsl:param name="graphic.default.extension"/>
-<xsl:attribute-set name="header.content.properties">
-  <xsl:attribute name="font-family">
-    <xsl:value-of select="$body.fontset"/>
-  </xsl:attribute>
-  <xsl:attribute name="margin-left">
-    <xsl:value-of select="$title.margin.left"/>
-  </xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="header.rule" select="1"/>
-<xsl:param name="header.column.widths">1 1 1</xsl:param>
-<xsl:param name="header.table.height">14pt</xsl:param>
-<xsl:attribute-set name="header.table.properties">
-  <xsl:attribute name="table-layout">fixed</xsl:attribute>
-  <xsl:attribute name="width">100%</xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="headers.on.blank.pages" select="1"/>
-<xsl:param name="highlight.default.language"/>
-<xsl:param name="highlight.source" select="0"/>
-<xsl:param name="hyphenate">true</xsl:param>
-<xsl:param name="hyphenate.verbatim" select="0"/>
-<xsl:param name="hyphenate.verbatim.characters"/>
-<xsl:param name="ignore.image.scaling" select="0"/>
-<xsl:param name="img.src.path"/>
-<xsl:param name="index.method">basic</xsl:param>
-<xsl:param name="index.on.role" select="0"/>
-<xsl:param name="index.on.type" select="0"/>
-<xsl:attribute-set name="index.page.number.properties">
-</xsl:attribute-set>
-<xsl:attribute-set name="informalequation.properties" use-attribute-sets="informal.object.properties"/>
-<xsl:attribute-set name="informalexample.properties" use-attribute-sets="informal.object.properties"/>
-<xsl:attribute-set name="informalfigure.properties" use-attribute-sets="informal.object.properties"/>
-<xsl:attribute-set name="informal.object.properties">
-  <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute>
-  <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
-  <xsl:attribute name="space-before.maximum">2em</xsl:attribute>
-  <xsl:attribute name="space-after.minimum">0.5em</xsl:attribute>
-  <xsl:attribute name="space-after.optimum">1em</xsl:attribute>
-  <xsl:attribute name="space-after.maximum">2em</xsl:attribute>
-</xsl:attribute-set>
-<xsl:attribute-set name="informaltable.properties" use-attribute-sets="informal.object.properties"/>
-<xsl:attribute-set name="index.preferred.page.properties">
-  <xsl:attribute name="font-weight">bold</xsl:attribute>
-</xsl:attribute-set>
-<xsl:attribute-set name="index.div.title.properties">
-  <xsl:attribute name="margin-left">0pt</xsl:attribute>
-  <xsl:attribute name="font-size">14.4pt</xsl:attribute>
-  <xsl:attribute name="font-family"><xsl:value-of select="$title.fontset"/></xsl:attribute>
-  <xsl:attribute name="font-weight">bold</xsl:attribute>
-  <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
-  <xsl:attribute name="space-before.optimum"><xsl:value-of select="concat($body.font.master,'pt')"/></xsl:attribute>
-  <xsl:attribute name="space-before.minimum"><xsl:value-of select="concat($body.font.master,'pt * 0.8')"/></xsl:attribute>
-  <xsl:attribute name="space-before.maximum"><xsl:value-of select="concat($body.font.master,'pt * 1.2')"/></xsl:attribute>
-  <xsl:attribute name="start-indent">0pt</xsl:attribute>
-</xsl:attribute-set>
-<xsl:attribute-set name="index.entry.properties">
-  <xsl:attribute name="start-indent">0pt</xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="index.number.separator"/>
-<xsl:param name="index.range.separator"/>
-<xsl:param name="index.term.separator"/>
-<xsl:param name="insert.link.page.number">no</xsl:param>
-<xsl:param name="insert.xref.page.number">no</xsl:param>
-<xsl:attribute-set name="itemizedlist.properties" use-attribute-sets="list.block.properties">
-</xsl:attribute-set>
-<xsl:attribute-set name="itemizedlist.label.properties">
-</xsl:attribute-set>
-    <xsl:param name="itemizedlist.label.width">1.0em</xsl:param>
-  
-
-<xsl:param name="keep.relative.image.uris" select="0"/>
-<xsl:param name="l10n.gentext.default.language">en</xsl:param>
-<xsl:param name="l10n.gentext.language"/>
-<xsl:param name="l10n.gentext.use.xref.language" select="0"/>
-<xsl:param name="l10n.lang.value.rfc.compliant" select="1"/>
-<xsl:param name="label.from.part" select="0"/>
-<xsl:param name="line-height">normal</xsl:param>
-<xsl:param name="linenumbering.everyNth">5</xsl:param>
-<xsl:param name="linenumbering.extension" select="1"/>
-<xsl:param name="linenumbering.separator"><xsl:text> </xsl:text></xsl:param>
-<xsl:param name="linenumbering.width">3</xsl:param>
-<xsl:attribute-set name="list.block.properties">
-  <xsl:attribute name="provisional-label-separation">0.2em</xsl:attribute>
-  <xsl:attribute name="provisional-distance-between-starts">1.5em</xsl:attribute>
-</xsl:attribute-set>
-<xsl:attribute-set name="list.block.spacing">
-  <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
-  <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
-  <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
-  <xsl:attribute name="space-after.optimum">1em</xsl:attribute>
-  <xsl:attribute name="space-after.minimum">0.8em</xsl:attribute>
-  <xsl:attribute name="space-after.maximum">1.2em</xsl:attribute>
-</xsl:attribute-set>
-<xsl:attribute-set name="list.item.spacing">
-  <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
-  <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
-  <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="make.index.markup" select="0"/>
-<xsl:param name="make.single.year.ranges" select="0"/>
-<xsl:param name="make.year.ranges" select="0"/>
-<xsl:attribute-set name="margin.note.properties">
-  <xsl:attribute name="font-size">90%</xsl:attribute>
-  <xsl:attribute name="text-align">start</xsl:attribute>
-</xsl:attribute-set>
-<xsl:attribute-set name="margin.note.title.properties">
-  <xsl:attribute name="font-weight">bold</xsl:attribute>
-  <xsl:attribute name="hyphenate">false</xsl:attribute>
-  <xsl:attribute name="text-align">start</xsl:attribute>
-  <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="margin.note.float.type">none</xsl:param>
-<xsl:param name="margin.note.width">1in</xsl:param>
-<xsl:param name="marker.section.level">2</xsl:param>
-<xsl:param name="menuchoice.menu.separator"> &#8594; </xsl:param>
-<xsl:param name="menuchoice.separator">+</xsl:param>
-<xsl:param name="monospace.font.family">monospace</xsl:param>
-<xsl:attribute-set name="monospace.properties">
-  <xsl:attribute name="font-family">
-    <xsl:value-of select="$monospace.font.family"/>
-  </xsl:attribute>
-</xsl:attribute-set>
-<xsl:attribute-set name="monospace.verbatim.properties" use-attribute-sets="verbatim.properties monospace.properties">
-  <xsl:attribute name="text-align">start</xsl:attribute>
-  <xsl:attribute name="wrap-option">no-wrap</xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="nominal.table.width">6in</xsl:param>
-<xsl:attribute-set name="normal.para.spacing">
-  <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
-  <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
-  <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="olink.doctitle">no</xsl:param> 
-<xsl:param name="olink.base.uri"/>
-<xsl:param name="olink.debug" select="0"/>
-<xsl:attribute-set name="olink.properties">
-  <xsl:attribute name="show-destination">replace</xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="olink.lang.fallback.sequence"/>
-<xsl:attribute-set name="orderedlist.properties" use-attribute-sets="list.block.properties">
-  <xsl:attribute name="provisional-distance-between-starts">2em</xsl:attribute>
-</xsl:attribute-set>
-<xsl:attribute-set name="orderedlist.label.properties">
-</xsl:attribute-set>
-<xsl:param name="orderedlist.label.width">1.2em</xsl:param>
-<xsl:param name="prefer.internal.olink" select="0"/>
-<xsl:param name="insert.olink.page.number">no</xsl:param>
-<xsl:param name="insert.olink.pdf.frag" select="0"/>
-<xsl:param name="page.height">
-  <xsl:choose>
-    <xsl:when test="$page.orientation = 'portrait'">
-      <xsl:value-of select="$page.height.portrait"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$page.width.portrait"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:param>
-<xsl:param name="page.height.portrait">
-  <xsl:choose>
-    <xsl:when test="$paper.type = 'A4landscape'">210mm</xsl:when>
-    <xsl:when test="$paper.type = 'USletter'">11in</xsl:when>
-    <xsl:when test="$paper.type = 'USlandscape'">8.5in</xsl:when>
-    <xsl:when test="$paper.type = '4A0'">2378mm</xsl:when>
-    <xsl:when test="$paper.type = '2A0'">1682mm</xsl:when>
-    <xsl:when test="$paper.type = 'A0'">1189mm</xsl:when>
-    <xsl:when test="$paper.type = 'A1'">841mm</xsl:when>
-    <xsl:when test="$paper.type = 'A2'">594mm</xsl:when>
-    <xsl:when test="$paper.type = 'A3'">420mm</xsl:when>
-    <xsl:when test="$paper.type = 'A4'">297mm</xsl:when>
-    <xsl:when test="$paper.type = 'A5'">210mm</xsl:when>
-    <xsl:when test="$paper.type = 'A6'">148mm</xsl:when>
-    <xsl:when test="$paper.type = 'A7'">105mm</xsl:when>
-    <xsl:when test="$paper.type = 'A8'">74mm</xsl:when>
-    <xsl:when test="$paper.type = 'A9'">52mm</xsl:when>
-    <xsl:when test="$paper.type = 'A10'">37mm</xsl:when>
-    <xsl:when test="$paper.type = 'B0'">1414mm</xsl:when>
-    <xsl:when test="$paper.type = 'B1'">1000mm</xsl:when>
-    <xsl:when test="$paper.type = 'B2'">707mm</xsl:when>
-    <xsl:when test="$paper.type = 'B3'">500mm</xsl:when>
-    <xsl:when test="$paper.type = 'B4'">353mm</xsl:when>
-    <xsl:when test="$paper.type = 'B5'">250mm</xsl:when>
-    <xsl:when test="$paper.type = 'B6'">176mm</xsl:when>
-    <xsl:when test="$paper.type = 'B7'">125mm</xsl:when>
-    <xsl:when test="$paper.type = 'B8'">88mm</xsl:when>
-    <xsl:when test="$paper.type = 'B9'">62mm</xsl:when>
-    <xsl:when test="$paper.type = 'B10'">44mm</xsl:when>
-    <xsl:when test="$paper.type = 'C0'">1297mm</xsl:when>
-    <xsl:when test="$paper.type = 'C1'">917mm</xsl:when>
-    <xsl:when test="$paper.type = 'C2'">648mm</xsl:when>
-    <xsl:when test="$paper.type = 'C3'">458mm</xsl:when>
-    <xsl:when test="$paper.type = 'C4'">324mm</xsl:when>
-    <xsl:when test="$paper.type = 'C5'">229mm</xsl:when>
-    <xsl:when test="$paper.type = 'C6'">162mm</xsl:when>
-    <xsl:when test="$paper.type = 'C7'">114mm</xsl:when>
-    <xsl:when test="$paper.type = 'C8'">81mm</xsl:when>
-    <xsl:when test="$paper.type = 'C9'">57mm</xsl:when>
-    <xsl:when test="$paper.type = 'C10'">40mm</xsl:when>
-    <xsl:otherwise>11in</xsl:otherwise>
-  </xsl:choose>
-</xsl:param>
-<xsl:param name="page.margin.bottom">0.5in</xsl:param>
-<xsl:param name="page.margin.inner">
-  <xsl:choose>
-    <xsl:when test="$double.sided != 0">1.25in</xsl:when>
-    <xsl:otherwise>1in</xsl:otherwise>
-  </xsl:choose>
-</xsl:param>
-<xsl:param name="page.margin.outer">
-  <xsl:choose>
-    <xsl:when test="$double.sided != 0">0.75in</xsl:when>
-    <xsl:otherwise>1in</xsl:otherwise>
-  </xsl:choose>
-</xsl:param>
-<xsl:param name="page.margin.top">0.5in</xsl:param>
-<xsl:param name="page.orientation">portrait</xsl:param>
-<xsl:param name="page.width">
-  <xsl:choose>
-    <xsl:when test="$page.orientation = 'portrait'">
-      <xsl:value-of select="$page.width.portrait"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$page.height.portrait"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:param>
-<xsl:param name="page.width.portrait">
-  <xsl:choose>
-    <xsl:when test="$paper.type = 'USletter'">8.5in</xsl:when>
-    <xsl:when test="$paper.type = '4A0'">1682mm</xsl:when>
-    <xsl:when test="$paper.type = '2A0'">1189mm</xsl:when>
-    <xsl:when test="$paper.type = 'A0'">841mm</xsl:when>
-    <xsl:when test="$paper.type = 'A1'">594mm</xsl:when>
-    <xsl:when test="$paper.type = 'A2'">420mm</xsl:when>
-    <xsl:when test="$paper.type = 'A3'">297mm</xsl:when>
-    <xsl:when test="$paper.type = 'A4'">210mm</xsl:when>
-    <xsl:when test="$paper.type = 'A5'">148mm</xsl:when>
-    <xsl:when test="$paper.type = 'A6'">105mm</xsl:when>
-    <xsl:when test="$paper.type = 'A7'">74mm</xsl:when>
-    <xsl:when test="$paper.type = 'A8'">52mm</xsl:when>
-    <xsl:when test="$paper.type = 'A9'">37mm</xsl:when>
-    <xsl:when test="$paper.type = 'A10'">26mm</xsl:when>
-    <xsl:when test="$paper.type = 'B0'">1000mm</xsl:when>
-    <xsl:when test="$paper.type = 'B1'">707mm</xsl:when>
-    <xsl:when test="$paper.type = 'B2'">500mm</xsl:when>
-    <xsl:when test="$paper.type = 'B3'">353mm</xsl:when>
-    <xsl:when test="$paper.type = 'B4'">250mm</xsl:when>
-    <xsl:when test="$paper.type = 'B5'">176mm</xsl:when>
-    <xsl:when test="$paper.type = 'B6'">125mm</xsl:when>
-    <xsl:when test="$paper.type = 'B7'">88mm</xsl:when>
-    <xsl:when test="$paper.type = 'B8'">62mm</xsl:when>
-    <xsl:when test="$paper.type = 'B9'">44mm</xsl:when>
-    <xsl:when test="$paper.type = 'B10'">31mm</xsl:when>
-    <xsl:when test="$paper.type = 'C0'">917mm</xsl:when>
-    <xsl:when test="$paper.type = 'C1'">648mm</xsl:when>
-    <xsl:when test="$paper.type = 'C2'">458mm</xsl:when>
-    <xsl:when test="$paper.type = 'C3'">324mm</xsl:when>
-    <xsl:when test="$paper.type = 'C4'">229mm</xsl:when>
-    <xsl:when test="$paper.type = 'C5'">162mm</xsl:when>
-    <xsl:when test="$paper.type = 'C6'">114mm</xsl:when>
-    <xsl:when test="$paper.type = 'C7'">81mm</xsl:when>
-    <xsl:when test="$paper.type = 'C8'">57mm</xsl:when>
-    <xsl:when test="$paper.type = 'C9'">40mm</xsl:when>
-    <xsl:when test="$paper.type = 'C10'">28mm</xsl:when>
-    <xsl:otherwise>8.5in</xsl:otherwise>
-  </xsl:choose>
-</xsl:param>
-<xsl:param name="paper.type">USletter</xsl:param>
-<xsl:param name="part.autolabel">I</xsl:param>
-<xsl:param name="passivetex.extensions" select="0"/>
-<xsl:attribute-set name="pgwide.properties">
-  <xsl:attribute name="start-indent">0pt</xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="preface.autolabel" select="0"/>
-<xsl:param name="preferred.mediaobject.role"/>
-<xsl:attribute-set name="procedure.properties" use-attribute-sets="formal.object.properties">
-  <xsl:attribute name="keep-together.within-column">auto</xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="process.empty.source.toc" select="0"/>
-<xsl:param name="process.source.toc" select="0"/>
-<xsl:param name="profile.arch"/>
-<xsl:param name="profile.audience"/>
-<xsl:param name="profile.attribute"/>
-<xsl:param name="profile.condition"/>
-<xsl:param name="profile.conformance"/>
-<xsl:param name="profile.lang"/>
-<xsl:param name="profile.os"/>
-<xsl:param name="profile.revision"/>
-<xsl:param name="profile.revisionflag"/>
-<xsl:param name="profile.role"/>
-<xsl:param name="profile.security"/>
-<xsl:param name="profile.separator">;</xsl:param>
-<xsl:param name="profile.status"/>
-<xsl:param name="profile.userlevel"/>
-<xsl:param name="profile.value"/>
-<xsl:param name="profile.vendor"/>
-<xsl:param name="profile.wordsize"/>
-<xsl:param name="punct.honorific">.</xsl:param>
-<xsl:param name="qanda.defaultlabel">number</xsl:param>
-<xsl:param name="qanda.in.toc" select="0"/>
-<xsl:param name="qanda.nested.in.toc" select="0"/>
-<xsl:param name="qanda.inherit.numeration" select="1"/>
-<xsl:param name="qandadiv.autolabel" select="1"/>
-<xsl:attribute-set name="qanda.title.level1.properties">
-  <xsl:attribute name="font-size">
-    <xsl:value-of select="$body.font.master * 2.0736"/>
-    <xsl:text>pt</xsl:text>
-  </xsl:attribute>
-</xsl:attribute-set>
-<xsl:attribute-set name="qanda.title.level2.properties">
-  <xsl:attribute name="font-size">
-    <xsl:value-of select="$body.font.master * 1.728"/>
-    <xsl:text>pt</xsl:text>
-  </xsl:attribute>
-</xsl:attribute-set>
-<xsl:attribute-set name="qanda.title.level3.properties">
-  <xsl:attribute name="font-size">
-    <xsl:value-of select="$body.font.master * 1.44"/>
-    <xsl:text>pt</xsl:text>
-  </xsl:attribute>
-</xsl:attribute-set>
-<xsl:attribute-set name="qanda.title.level4.properties">
-  <xsl:attribute name="font-size">
-    <xsl:value-of select="$body.font.master * 1.2"/>
-    <xsl:text>pt</xsl:text>
-  </xsl:attribute>
-</xsl:attribute-set>
-<xsl:attribute-set name="qanda.title.level5.properties">
-  <xsl:attribute name="font-size">
-    <xsl:value-of select="$body.font.master"/>
-    <xsl:text>pt</xsl:text>
-  </xsl:attribute>
-</xsl:attribute-set>
-<xsl:attribute-set name="qanda.title.level6.properties">
-  <xsl:attribute name="font-size">
-    <xsl:value-of select="$body.font.master"/>
-    <xsl:text>pt</xsl:text>
-  </xsl:attribute>
-</xsl:attribute-set>
-<xsl:attribute-set name="qanda.title.properties">
-  <xsl:attribute name="font-family">
-    <xsl:value-of select="$title.font.family"/>
-  </xsl:attribute>
-  <xsl:attribute name="font-weight">bold</xsl:attribute>
-  <!-- font size is calculated dynamically by qanda.heading template -->
-  <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
-  <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
-  <xsl:attribute name="space-before.optimum">1.0em</xsl:attribute>
-  <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="refentry.generate.name" select="1"/>
-<xsl:param name="refentry.generate.title" select="0"/>
-<xsl:param name="refentry.pagebreak" select="1"/>
-<xsl:attribute-set name="refentry.title.properties">
-  <xsl:attribute name="font-family">
-    <xsl:value-of select="$title.font.family"/>
-  </xsl:attribute>
-  <xsl:attribute name="font-size">18pt</xsl:attribute>
-  <xsl:attribute name="font-weight">bold</xsl:attribute>
-  <xsl:attribute name="space-after">1em</xsl:attribute>
-  <xsl:attribute name="hyphenate">false</xsl:attribute>
-  <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
-  <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
-  <xsl:attribute name="space-before.optimum">1.0em</xsl:attribute>
-  <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
-  <xsl:attribute name="space-after.optimum">0.5em</xsl:attribute>
-  <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute>
-  <xsl:attribute name="space-after.maximum">0.6em</xsl:attribute>
-  <xsl:attribute name="start-indent"><xsl:value-of select="$title.margin.left"/></xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="refentry.xref.manvolnum" select="1"/>
-  <xsl:param name="reference.autolabel">I</xsl:param>
-<xsl:param name="refclass.suppress" select="0"/>
-<xsl:param name="region.after.extent">0.4in</xsl:param>
-<xsl:param name="region.before.extent">0.4in</xsl:param>
-<xsl:attribute-set name="revhistory.table.properties">
-</xsl:attribute-set>
-<xsl:attribute-set name="revhistory.table.cell.properties">
-</xsl:attribute-set>
-<xsl:attribute-set name="revhistory.title.properties">
-</xsl:attribute-set>
-<xsl:attribute-set name="root.properties">
-  <xsl:attribute name="font-family">
-    <xsl:value-of select="$body.fontset"/>
-  </xsl:attribute>
-  <xsl:attribute name="font-size">
-    <xsl:value-of select="$body.font.size"/>
-  </xsl:attribute>
-  <xsl:attribute name="text-align">
-    <xsl:value-of select="$alignment"/>
-  </xsl:attribute>
-  <xsl:attribute name="line-height">
-    <xsl:value-of select="$line-height"/>
-  </xsl:attribute>
-  <xsl:attribute name="font-selection-strategy">character-by-character</xsl:attribute>
-  <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="rootid"/>
-<xsl:param name="runinhead.default.title.end.punct">.</xsl:param>
-<xsl:param name="runinhead.title.end.punct">.!?:</xsl:param>
-<xsl:param name="sans.font.family">sans-serif</xsl:param>
-<xsl:param name="section.autolabel" select="0"/>
-<xsl:param name="section.autolabel.max.depth">8</xsl:param>
-<xsl:param name="section.container.element">block</xsl:param>
-<xsl:param name="section.label.includes.component.label" select="0"/>
-<xsl:attribute-set name="section.title.level1.properties">
-  <xsl:attribute name="font-size">
-    <xsl:value-of select="$body.font.master * 2.0736"/>
-    <xsl:text>pt</xsl:text>
-  </xsl:attribute>
-</xsl:attribute-set>
-<xsl:attribute-set name="section.title.level2.properties">
-  <xsl:attribute name="font-size">
-    <xsl:value-of select="$body.font.master * 1.728"/>
-    <xsl:text>pt</xsl:text>
-  </xsl:attribute>
-</xsl:attribute-set>
-<xsl:attribute-set name="section.title.level3.properties">
-  <xsl:attribute name="font-size">
-    <xsl:value-of select="$body.font.master * 1.44"/>
-    <xsl:text>pt</xsl:text>
-  </xsl:attribute>
-</xsl:attribute-set>
-<xsl:attribute-set name="section.title.level4.properties">
-  <xsl:attribute name="font-size">
-    <xsl:value-of select="$body.font.master * 1.2"/>
-    <xsl:text>pt</xsl:text>
-  </xsl:attribute>
-</xsl:attribute-set>
-<xsl:attribute-set name="section.title.level5.properties">
-  <xsl:attribute name="font-size">
-    <xsl:value-of select="$body.font.master"/>
-    <xsl:text>pt</xsl:text>
-  </xsl:attribute>
-</xsl:attribute-set>
-<xsl:attribute-set name="section.title.level6.properties">
-  <xsl:attribute name="font-size">
-    <xsl:value-of select="$body.font.master"/>
-    <xsl:text>pt</xsl:text>
-  </xsl:attribute>
-</xsl:attribute-set>
-<xsl:attribute-set name="section.title.properties">
-  <xsl:attribute name="font-family">
-    <xsl:value-of select="$title.font.family"/>
-  </xsl:attribute>
-  <xsl:attribute name="font-weight">bold</xsl:attribute>
-  <!-- font size is calculated dynamically by section.heading template -->
-  <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
-  <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
-  <xsl:attribute name="space-before.optimum">1.0em</xsl:attribute>
-  <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
-  <xsl:attribute name="text-align">left</xsl:attribute>
-  <xsl:attribute name="start-indent"><xsl:value-of select="$title.margin.left"/></xsl:attribute>
-</xsl:attribute-set>
-<xsl:attribute-set name="section.level1.properties" use-attribute-sets="section.properties">
-</xsl:attribute-set>
-<xsl:attribute-set name="section.level2.properties" use-attribute-sets="section.properties">
-</xsl:attribute-set>
-<xsl:attribute-set name="section.level3.properties" use-attribute-sets="section.properties">
-</xsl:attribute-set>
-<xsl:attribute-set name="section.level4.properties" use-attribute-sets="section.properties">
-</xsl:attribute-set>
-<xsl:attribute-set name="section.level5.properties" use-attribute-sets="section.properties">
-</xsl:attribute-set>
-<xsl:attribute-set name="section.level6.properties" use-attribute-sets="section.properties">
-</xsl:attribute-set>
-<xsl:attribute-set name="section.properties">
-</xsl:attribute-set>
-<xsl:param name="segmentedlist.as.table" select="0"/>
-<xsl:param name="shade.verbatim" select="0"/>
-
-<xsl:attribute-set name="shade.verbatim.style">
-  <xsl:attribute name="background-color">#E0E0E0</xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="show.comments" select="1"/>
-<xsl:attribute-set name="sidebar.properties" use-attribute-sets="formal.object.properties">
-  <xsl:attribute name="border-style">solid</xsl:attribute>
-  <xsl:attribute name="border-width">1pt</xsl:attribute>
-  <xsl:attribute name="border-color">black</xsl:attribute>
-  <xsl:attribute name="background-color">#DDDDDD</xsl:attribute>
-  <xsl:attribute name="padding-left">12pt</xsl:attribute>
-  <xsl:attribute name="padding-right">12pt</xsl:attribute>
-  <xsl:attribute name="padding-top">6pt</xsl:attribute>
-  <xsl:attribute name="padding-bottom">6pt</xsl:attribute>
-  <xsl:attribute name="margin-left">0pt</xsl:attribute>
-  <xsl:attribute name="margin-right">0pt</xsl:attribute>
-<!--
-  <xsl:attribute name="margin-top">6pt</xsl:attribute>
-  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
--->
-</xsl:attribute-set>
-<xsl:attribute-set name="sidebar.title.properties">
-  <xsl:attribute name="font-weight">bold</xsl:attribute>
-  <xsl:attribute name="hyphenate">false</xsl:attribute>
-  <xsl:attribute name="text-align">start</xsl:attribute>
-  <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="sidebar.float.type">none</xsl:param>
-<xsl:param name="sidebar.float.width">1in</xsl:param>
-<xsl:param name="simplesect.in.toc" select="0"/>
-<xsl:attribute-set name="subscript.properties">
-  <xsl:attribute name="font-size">75%</xsl:attribute>
-</xsl:attribute-set>
-<xsl:attribute-set name="superscript.properties">
-  <xsl:attribute name="font-size">75%</xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="symbol.font.family">Symbol,ZapfDingbats</xsl:param>
-
-<xsl:param name="table.cell.border.color">black</xsl:param>
-<xsl:param name="table.cell.border.style">solid</xsl:param>
-<xsl:param name="table.cell.border.thickness">0.5pt</xsl:param>
-<xsl:attribute-set name="table.cell.padding">
-  <xsl:attribute name="padding-left">2pt</xsl:attribute>
-  <xsl:attribute name="padding-right">2pt</xsl:attribute>
-  <xsl:attribute name="padding-top">2pt</xsl:attribute>
-  <xsl:attribute name="padding-bottom">2pt</xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="table.footnote.number.format">a</xsl:param>
-<xsl:param name="table.footnote.number.symbols"/>
-<xsl:attribute-set name="table.footnote.properties">
-  <xsl:attribute name="font-family"><xsl:value-of select="$body.fontset"/></xsl:attribute>
-  <xsl:attribute name="font-size"><xsl:value-of select="$footnote.font.size"/></xsl:attribute>
-  <xsl:attribute name="font-weight">normal</xsl:attribute>
-  <xsl:attribute name="font-style">normal</xsl:attribute>
-  <xsl:attribute name="space-before">2pt</xsl:attribute>
-  <xsl:attribute name="text-align"><xsl:value-of select="$alignment"/></xsl:attribute>
-</xsl:attribute-set>
-
-<xsl:param name="table.frame.border.color">black</xsl:param>
-<xsl:param name="table.frame.border.style">solid</xsl:param>
-<xsl:param name="table.frame.border.thickness">0.5pt</xsl:param>
-<xsl:attribute-set name="table.properties" use-attribute-sets="formal.object.properties"/>
-<xsl:param name="tablecolumns.extension" select="1"/>
-<xsl:attribute-set name="table.table.properties">
-  <xsl:attribute name="border-before-width.conditionality">retain</xsl:attribute>
-  <xsl:attribute name="border-collapse">collapse</xsl:attribute>
-</xsl:attribute-set>
- <xsl:param name="target.database.document">olinkdb.xml</xsl:param>
-<xsl:param name="targets.filename">target.db</xsl:param>
-<xsl:param name="textdata.default.encoding"/>
-<xsl:param name="tex.math.delims" select="1"/>
-<xsl:param name="tex.math.in.alt"/>
-  <xsl:param name="textinsert.extension" select="1"/>
-<xsl:param name="title.font.family">sans-serif</xsl:param>
-<xsl:param name="title.margin.left">
-  <xsl:choose>
-    <xsl:when test="$fop.extensions != 0">-4pc</xsl:when>
-    <xsl:when test="$passivetex.extensions != 0">0pt</xsl:when>
-    <xsl:otherwise>0pt</xsl:otherwise>
-  </xsl:choose>
-</xsl:param>
-<xsl:param name="toc.indent.width">24</xsl:param>
-<!-- inconsistant point specification? -->
-<xsl:attribute-set name="toc.line.properties">
-  <xsl:attribute name="text-align-last">justify</xsl:attribute>
-  <xsl:attribute name="text-align">start</xsl:attribute>
-  <xsl:attribute name="end-indent"><xsl:value-of select="concat($toc.indent.width, 'pt')"/></xsl:attribute>
-  <xsl:attribute name="last-line-end-indent"><xsl:value-of select="concat('-', $toc.indent.width, 'pt')"/></xsl:attribute>
-</xsl:attribute-set>
-<xsl:attribute-set name="toc.margin.properties">
-  <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute>
-  <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
-  <xsl:attribute name="space-before.maximum">2em</xsl:attribute>
-  <xsl:attribute name="space-after.minimum">0.5em</xsl:attribute>
-  <xsl:attribute name="space-after.optimum">1em</xsl:attribute>
-  <xsl:attribute name="space-after.maximum">2em</xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="toc.max.depth">8</xsl:param>
-<xsl:param name="toc.section.depth">2</xsl:param>
-<xsl:param name="ulink.footnotes" select="0"/>
-<xsl:param name="ulink.hyphenate"/>
-<xsl:param name="ulink.hyphenate.chars">/</xsl:param>
-<xsl:param name="ulink.show" select="1"/>
-<xsl:param name="use.extensions" select="0"/>
-<xsl:param name="use.local.olink.style" select="0"/> 
-<xsl:param name="use.role.as.xrefstyle" select="1"/>
-<xsl:param name="use.role.for.mediaobject" select="1"/>
-<xsl:param name="use.svg" select="1"/>
-<xsl:param name="variablelist.as.blocks" select="0"/>
-<xsl:param name="variablelist.max.termlength">24</xsl:param>
-<xsl:param name="variablelist.term.separator">, </xsl:param>
-<xsl:param name="variablelist.term.break.after">0</xsl:param>
-<xsl:attribute-set name="verbatim.properties">
-  <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
-  <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
-  <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
-  <xsl:attribute name="space-after.minimum">0.8em</xsl:attribute>
-  <xsl:attribute name="space-after.optimum">1em</xsl:attribute>
-  <xsl:attribute name="space-after.maximum">1.2em</xsl:attribute>
-  <xsl:attribute name="hyphenate">false</xsl:attribute>
-  <xsl:attribute name="wrap-option">no-wrap</xsl:attribute>
-  <xsl:attribute name="white-space-collapse">false</xsl:attribute>
-  <xsl:attribute name="white-space-treatment">preserve</xsl:attribute>
-  <xsl:attribute name="linefeed-treatment">preserve</xsl:attribute>
-  <xsl:attribute name="text-align">start</xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="xep.extensions" select="0"/>
-<xsl:attribute-set name="xep.index.item.properties" use-attribute-sets="index.page.number.properties">
-  <xsl:attribute name="merge-subsequent-page-numbers">true</xsl:attribute>
-  <xsl:attribute name="link-back">true</xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="xref.label-page.separator"><xsl:text> </xsl:text></xsl:param>
-<xsl:param name="xref.label-title.separator">: </xsl:param>
-<xsl:attribute-set name="xref.properties">
-</xsl:attribute-set>
-<xsl:param name="xref.title-page.separator"><xsl:text> </xsl:text></xsl:param>
-<xsl:param name="xref.with.number.and.title" select="1"/>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/passivetex.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/passivetex.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,36 +1,0 @@
-<?xml version='1.0' encoding="utf-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-      This extension stops PassiveTeX from merging subsequent '-' to 
-      dashes. You must set passivetex.extensions to '1' if you want get
-      this functionality.
-     ******************************************************************** -->
-
-<xsl:template name="passivetex.dash.subst">
-  <xsl:param name="string"/>
-
-  <xsl:choose>
-    <xsl:when test="contains($string, '--')">
-      <xsl:variable name="rest">
-        <xsl:call-template name="passivetex.dash.subst">
-          <xsl:with-param name="string"
-                          select="concat('-', substring-after($string, '--'))"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:value-of select="concat(substring-before($string, '--'),
-                                   '-&#x200b;',
-                                   $rest)"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$string"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet>
-
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/pdf2index
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/pdf2index	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,140 +1,0 @@
-#!/usr/bin/perl -- # -*- Perl -*-
-
-# this needs some cleanup...
-
-my $PSTOTEXT = "pstotext";
-
-my $pdf = shift @ARGV;
-
-my $index = "";
-my $inindex = 0;
-open (F, "$PSTOTEXT $pdf |");
-while (<F>) {
-    if (/^<\/index/) {
-	$index .= $_;
-	$inindex = 0;
-    }
-    $inindex = 1 if /^<index/;
-
-    if ($inindex) {
-	$index .= $_ if /^\s*</;
-    }
-}
-
-my $cindex = "";
-while ($index =~ /^(.*?)((<phrase role=\"pageno\">.*?<\/phrase>\s*)+)/s) {
-    $cindex .= $1;
-    $_ = $2;
-    $index = $'; # '
-
-    my @pages = m/<phrase role=\"pageno\">.*?<\/phrase>\s*/sg;
-
-    # Expand ranges
-    if ($#pages >= 0) {
-	my @mpages = ();
-	foreach my $page (@pages) {
-	    my $pageno = &pageno($page);
-	    if ($pageno =~ /^([0-9]+)[^0-9]([0-9]+)$/) { # funky -
-		for (my $count = $1; $count <= $2; $count++) {
-		    push (@mpages, "<phrase role=\"$pageno\">$count</phrase>");
-		}
-	    } else {
-		push (@mpages, $page);
-	    }
-	}
-	@pages = sort rangesort @mpages;
-    }
-
-    # Remove duplicates...
-    if ($#pages > 0) {
-	my @mpages = ();
-	my $current = "";
-	foreach my $page (@pages) {
-	    my $pageno = &pageno($page);
-	    if ($pageno ne $current) {
-		push (@mpages, $page);
-		$current = $pageno;
-	    }
-	}
-	@pages = @mpages;
-    }
-
-    # Collapse ranges...
-    if ($#pages > 1) {
-	my @cpages = ();
-	while (@pages) {
-	    my $count = 0;
-	    my $len = &rangelen($count, @pages);
-	    if ($len <= 2) {
-		my $page = shift @pages;
-		push (@cpages, $page);
-	    } else {
-		my $fpage = shift @pages;
-		my $lpage = "";
-		while ($len > 1) {
-		    $lpage = shift @pages;
-		    $len--;
-		}
-		my $fpno = &pageno($fpage);
-		my $lpno = &pageno($lpage);
-		$fpage =~ s/>$fpno</>${fpno}-$lpno</s;
-		push (@cpages, $fpage);
-	    }
-	}
-	@pages = @cpages;
-    }
-
-    my $page = shift @pages;
-    $page =~ s/\s*$//s;
-    $cindex .= $page;
-    while (@pages) {
-	$page = shift @pages;
-	$page =~ s/\s*$//s;
-	$cindex .= ", $page";
-    }
-}
-$cindex .= $index;
-
-print "$cindex\n";
-
-sub pageno {
-    my $page = shift;
-
-    $page =~ s/^<phrase.*?>//;
-    $page =~ s/^<link.*?>//;
-
-    return $1 if $page =~ /^([^<>]+)/;
-    return "?";
-}
-
-sub rangesort {
-    my $apno = &pageno($a);
-    my $bpno = &pageno($b);
-
-    # Make sure roman pages come before arabic ones, otherwise sort them in order
-    return -1 if ($apno !~ /^\d+/ && $bpno =~ /^\d+/);
-    return  1 if ($apno =~ /^\d+/ && $bpno !~ /^\d+/);
-    return $apno <=> $bpno;
-}
-
-sub rangelen {
-    my $count = shift;
-    my @pages = @_;
-    my $len = 1;
-    my $inrange = 1;
-
-    my $current = &pageno($pages[$count]);
-    while ($count < $#pages && $inrange) {
-	$count++;
-	my $next = &pageno($pages[$count]);
-	if ($current + 1 eq $next) {
-	    $current = $next;
-	    $inrange = 1;
-	    $len++;
-	} else {
-	    $inrange = 0;
-	}
-    }
-
-    return $len;
-}
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/pi.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/pi.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,1008 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
-  xmlns:fo="http://www.w3.org/1999/XSL/Format"
-  xmlns:xlink="http://www.w3.org/1999/xlink"
-  exclude-result-prefixes="doc"
-  version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<doc:reference xmlns=""><info><title>FO Processing Instruction Reference</title>
-    <releaseinfo role="meta">
-      $Id$
-    </releaseinfo>
-  </info>
-
-  <partintro id="partintro">
-    <title>Introduction</title>
-
-    <para>This is generated reference documentation for all
-      user-specifiable processing instructions (PIs) in the DocBook
-      XSL stylesheets for FO output.
-      <note>
-        <para>You add these PIs at particular points in a document to
-          cause specific âexceptionsâ to formatting/output behavior. To
-          make global changes in formatting/output behavior across an
-          entire document, itâs better to do it by setting an
-          appropriate stylesheet parameter (if there is one).</para>
-      </note>
-    </para>
-  </partintro>
-</doc:reference>
-
-<!-- ==================================================================== -->
-
-<doc:pi name="dbfo_background-color" xmlns="">
-  <refpurpose>Sets background color for an image</refpurpose>
-  <refdescription>
-    <para>Use the <tag class="xmlpi">dbfo background-color</tag> PI before or
-      after an image (<tag>graphic</tag>, <tag>inlinegraphic</tag>,
-      <tag>imagedata</tag>, or <tag>videodata</tag> element) as a
-      sibling to the element, to set a background color for the
-      image.</para>
-  </refdescription>
-  <refsynopsisdiv>
-    <synopsis><tag class="xmlpi">dbfo background-color="<replaceable>color</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter>
-    <variablelist>
-      <varlistentry><term>background-color="<replaceable>color</replaceable>"</term>
-        <listitem>
-          <para>An HTML color value</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee role="tcg">
-    <para><link role="tcg"
-        xlink:href="BGcolor.html"
-        >Background color</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbfo_background-color">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbfo-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
-    <xsl:with-param name="attribute" select="'background-color'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi name="dbfo_bgcolor" xmlns="">
-  <refpurpose>Sets background color on a table row or table cell</refpurpose>
-  <refdescription>
-    <para>Use the <tag class="xmlpi">dbfo bgcolor</tag> PI as child of a table row
-      or cell to set a background color for that table row or cell.</para>
-  </refdescription>
-  <refsynopsisdiv>
-    <synopsis><tag class="xmlpi">dbfo bgcolor="<replaceable>color</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter>
-    <variablelist>
-      <varlistentry><term>bgcolor="<replaceable>color</replaceable>"</term>
-        <listitem>
-          <para>An HTML color value</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee role="tcg">
-    <para><link role="tcg"
-        xlink:href="BGtableColor.html#CellBGColor"
-        >Cell background color</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbfo_bgcolor">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbfo-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
-    <xsl:with-param name="attribute" select="'bgcolor'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi name="dbfo_float-type" xmlns="">
-  <refpurpose>Specifies float behavior for a sidebar</refpurpose>
-  <refdescription>
-    <para>Use the <tag class="xmlpi">dbfo float-type</tag> PI to specify the float
-      behavior for a <tag>sidebar</tag> (to cause the sidebar to be
-      displayed as a marginal note).</para>
-  </refdescription>
-  <refsynopsisdiv>
-    <synopsis><tag class="xmlpi">dbfo float-type="margin.note"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter>
-    <variablelist>
-      <varlistentry><term>float-type="margin.note"</term>
-        <listitem>
-          <para>Specifies that the <tag>sidebar</tag> should be
-            displayed as a marginal note.</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee role="params">
-    <para><parameter>sidebar.float.type parameter</parameter>,
-      <parameter>sidebar.float.width parameter</parameter>, 
-      <parameter>sidebar.properties attribute-set</parameter>,
-      <parameter>sidebar.title.properties</parameter>
-    </para>
-  </refsee>
-  <refsee role="tcg">
-    <para><link xlink:href="SideFloats.html#SidebarFloats" >A sidebar as
-        side float</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbfo_float-type">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbfo-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
-    <xsl:with-param name="attribute" select="'float-type'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi name="dbfo_glossary-presentation" xmlns="">
-  <refpurpose>Specifies presentation style for a glossary</refpurpose>
-  <refdescription>
-    <para>Use the <tag class="xmlpi">dbfo glossary-presentation</tag> PI as a child of
-      a <tag>glossary</tag> to control its presentation style.</para>
-  </refdescription>
-  <refsynopsisdiv>
-    <synopsis><tag class="xmlpi">dbfo glossary-presentation="list"|"blocks"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter>
-    <variablelist>
-      <varlistentry><term>glossary-presentation="list"</term>
-        <listitem>
-          <para>Displays the glossary as a list</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry><term>glossary-presentation="blocks"</term>
-        <listitem>
-          <para>Displays the glossary as blocks</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee role="params">
-    <para><parameter>glossary.as.blocks</parameter></para>
-  </refsee>
-  <refsee role="tcg">
-    <para><link xlink:href="Glossaries.html#GlossaryFormatPrint" >Glossary
-        formatting in print</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbfo_glossary-presentation">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbfo-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
-    <xsl:with-param name="attribute" select="'glossary-presentation'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi name="dbfo_glosslist-presentation" xmlns="">
-  <refpurpose>Specifies presentation style for a glosslist</refpurpose>
-  <refdescription>
-    <para>Use the <tag class="xmlpi">dbfo glosslist-presentation</tag> PI as a child of
-      a <tag>glosslist</tag> to control its presentation style.</para>
-  </refdescription>
-  <refsynopsisdiv>
-    <synopsis><tag class="xmlpi">dbfo glosslist-presentation="list"|"blocks"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter>
-    <variablelist>
-      <varlistentry><term>glosslist-presentation="list"</term>
-        <listitem>
-          <para>Displays the glosslist as a list</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry><term>glosslist-presentation="blocks"</term>
-        <listitem>
-          <para>Displays the glosslist as blocks</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee role="params">
-    <para><parameter>glosslist.as.blocks</parameter> </para>
-  </refsee>
-  <refsee role="tcg">
-    <para><link xlink:href="Glossaries.html#GlossaryFormatPrint" >Glossary
-        formatting in print</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbfo_glosslist-presentation">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbfo-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
-    <xsl:with-param name="attribute" select="'glosslist-presentation'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi name="dbfo_glossterm-width" xmlns="">
-  <refpurpose>Specifies the glossterm width for a glossary or
-    glosslist</refpurpose>
-  <refdescription>
-    <para>Use the <tag class="xmlpi">dbfo glossterm-width</tag> PI as a child of a
-      <tag>glossary</tag> or <tag>glosslist</tag> to specify the
-      width for output of <tag>glossterm</tag> instances in the
-      output.</para>
-  </refdescription>
-  <refsynopsisdiv>
-    <synopsis><tag class="xmlpi">dbfo glossterm-width="<replaceable>width</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter>
-    <variablelist>
-      <varlistentry><term>glossterm-width="<replaceable>width</replaceable>"</term>
-        <listitem>
-          <para>Specifies the glossterm width (including units)</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee role="params">
-    <para><parameter>glossterm.width</parameter>,
-      <parameter>glossterm.separation</parameter>
-    </para>
-  </refsee>
-  <refsee role="tcg">
-    <para><link xlink:href="Glossaries.html#GlossaryFormatPrint" >Glossary
-        formatting in print</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbfo_glossterm-width">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbfo-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
-    <xsl:with-param name="attribute" select="'glossterm-width'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi name="dbfo_keep-together" xmlns="">
-  <refpurpose>Specifies âkeepâ behavior for a table, example,
-    figure, or equation</refpurpose>
-  <refdescription>
-    <para>Use the <tag class="xmlpi">dbfo keep-together</tag> PI as a child of a
-      formal object (<tag>table</tag>, <tag>example</tag>,
-      <tag>figure</tag>, or <tag>equation</tag>) or their informal
-      equivalents) to specify âkeepâ behavior for the object (to
-      allow the object to âbreakâ across a page).</para>
-  </refdescription>
-  <refsynopsisdiv>
-    <synopsis><tag class="xmlpi">dbfo keep-together="auto"|"always"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter>
-    <variablelist>
-      <varlistentry><term>keep-together="auto"</term>
-        <listitem>
-          <para>Enables the object to break across a page</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry><term>keep-together="always"</term>
-        <listitem>
-          <para>Prevents the object from breaking across a page (the
-            default stylesheet behavior)</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee role="params">
-    <para>formal.object.properties</para>
-  </refsee>
-  <refsee role="tcg">
-    <para><link xlink:href="PageBreaking.html#KeepTogetherPI"
-        >Keep-together processing instruction</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbfo_keep-together">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbfo-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
-    <xsl:with-param name="attribute" select="'keep-together'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi name="dbfo_label-width" xmlns="">
-  <refpurpose>Specifies the label width for a qandaset</refpurpose>
-  <refdescription>
-    <para>Use the <tag class="xmlpi">dbfo label-width</tag> PI as a child of a
-      <tag>qandaset</tag> to specify the width of labels.</para>
-  </refdescription>
-  <refsynopsisdiv>
-    <synopsis><tag class="xmlpi">dbfo label-width="<replaceable>width</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter>
-    <variablelist>
-      <varlistentry><term>label-width="<replaceable>width</replaceable>"</term>
-        <listitem>
-          <para>Specifies the label width (including units)</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee role="tcg">
-    <para><link role="tcg"
-        xlink:href="QandAformat.html"
-        >Q and A formatting</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbfo_label-width">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbfo-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
-    <xsl:with-param name="attribute" select="'label-width'"/>
-  </xsl:call-template>
-</xsl:template> 
-
-<doc:pi name="dbfo_linenumbering.everyNth" xmlns="">
-  <refpurpose>Specifies interval for lines numbers in verbatims</refpurpose>
-  <refdescription>
-    <para>Use the <tag class="xmlpi">dbfo linenumbering.everyNth</tag> PI as a child
-      of a âverbatimâ element â <tag>programlisting</tag>,
-      <tag>screen</tag>, <tag>synopsis</tag> â to specify
-      the interval at which lines are numbered.</para>
-  </refdescription>
-  <refsynopsisdiv>
-    <synopsis><tag class="xmlpi">dbfo linenumbering.everyNth="<replaceable>N</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter>
-    <variablelist>
-      <varlistentry><term>linenumbering.everyNth="<replaceable>N</replaceable>"</term>
-        <listitem>
-          <para>Specifies numbering interval; a number is output
-            before every <replaceable>N</replaceable>th line</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee role="params">
-    <para><parameter>linenumbering.everyNth</parameter></para>
-  </refsee>
-  <refsee role="tcg">
-    <para><link role="tcg"
-        xlink:href="AnnotateListing.html#LineNumbering"
-        >Line numbering</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbfo_linenumbering.everyNth">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbfo-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
-    <xsl:with-param name="attribute" select="'linenumbering.everyNth'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi name="dbfo_linenumbering.separator" xmlns="">
-  <refpurpose>Specifies separator text for line numbers in verbatims</refpurpose>
-  <refdescription>
-    <para>Use the <tag class="xmlpi">dbfo linenumbering.separator</tag> PI as a child
-      of a âverbatimâ element â <tag>programlisting</tag>,
-      <tag>screen</tag>, <tag>synopsis</tag> â to specify
-      the separator text output between the line numbers and content.</para>
-  </refdescription>
-  <refsynopsisdiv>
-    <synopsis><tag class="xmlpi">dbfo linenumbering.separator="<replaceable>text</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter>
-    <variablelist>
-      <varlistentry><term>linenumbering.separator="<replaceable>text</replaceable>"</term>
-        <listitem>
-          <para>Specifies the text (zero or more characters)</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee role="params">
-    <para><parameter>linenumbering.separator</parameter></para>
-  </refsee>
-  <refsee role="tcg">
-    <para><link role="tcg"
-        xlink:href="AnnotateListing.html#LineNumbering"
-        >Line numbering</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbfo_linenumbering.separator">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbfo-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
-    <xsl:with-param name="attribute" select="'linenumbering.separator'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi name="dbfo_linenumbering.width" xmlns="">
-  <refpurpose>Specifies width for line numbers in verbatims</refpurpose>
-  <refdescription>
-    <para>Use the <tag class="xmlpi">dbfo linenumbering.width</tag> PI as a child
-      of a âverbatimâ element â <tag>programlisting</tag>,
-      <tag>screen</tag>, <tag>synopsis</tag> â to specify
-      the width set aside for line numbers.</para>
-  </refdescription>
-  <refsynopsisdiv>
-    <synopsis><tag class="xmlpi">dbfo linenumbering.width="<replaceable>width</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter>
-    <variablelist>
-      <varlistentry><term>linenumbering.width="<replaceable>width</replaceable>"</term>
-        <listitem>
-          <para>Specifies the width (inluding units)</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee role="params">
-    <para><parameter>linenumbering.width</parameter></para>
-  </refsee>
-  <refsee role="tcg">
-    <para><link role="tcg"
-        xlink:href="AnnotateListing.html#LineNumbering"
-        >Line numbering</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbfo_linenumbering.width">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbfo-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
-    <xsl:with-param name="attribute" select="'linenumbering.width'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi name="dbfo_list-presentation" xmlns="">
-  <refpurpose>Specifies presentation style for a variablelist or
-    segmentedlist</refpurpose>
-  <refdescription>
-    <para>Use the <tag class="xmlpi">dbfo list-presentation</tag> PI as a child of
-      a <tag>variablelist</tag> or <tag>segmentedlist</tag> to
-      control the presentation style for the list (to cause it, for
-      example, to be displayed as a table).</para>
-  </refdescription>
-  <refsynopsisdiv>
-    <synopsis><tag class="xmlpi">dbfo list-presentation="list"|"blocks"|"table"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter>
-    <variablelist>
-      <varlistentry><term>list-presentation="list"</term>
-        <listitem>
-          <para>Displays the list as a list</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry><term>list-presentation="blocks"</term>
-        <listitem>
-          <para>(<tag>variablelist</tag> only) Displays the list as blocks</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry><term>list-presentation="table"</term>
-        <listitem>
-          <para>(<tag>segmentedlist</tag> only) Displays the list as a table</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee role="params">
-    <itemizedlist>
-      <listitem>
-        <para><parameter>variablelist.as.blocks</parameter></para>
-      </listitem>
-      <listitem>
-        <para><parameter>variablelist.as.table</parameter></para>
-      </listitem>
-    </itemizedlist>
-  </refsee>
-  <refsee role="tcg">
-    <para><link role="tcg"
-        xlink:href="Variablelists.html#ListIndents"
-        >Variable list formatting in print</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbfo_list-presentation">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbfo-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
-    <xsl:with-param name="attribute" select="'list-presentation'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi name="dbfo_list-width" xmlns="">
-  <refpurpose>Specifies the width of a horizontal simplelist</refpurpose>
-  <refdescription>
-    <para>Use the <tag class="xmlpi">dbfo list-width</tag> PI as a child of a
-      <tag>simplelist</tag> whose <tag class="attribute">class</tag>
-      value is <literal>horizontal</literal>, to specify the width
-      of the <tag>simplelist</tag>.</para>
-  </refdescription>
-  <refsynopsisdiv>
-    <synopsis><tag class="xmlpi">dbfo list-width="<replaceable>width</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter>
-    <variablelist>
-      <varlistentry><term>list-width="<replaceable>width</replaceable>"</term>
-        <listitem>
-          <para>Specifies the <tag>simplelist</tag> width (including units)</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-</doc:pi>
-<xsl:template name="pi.dbfo_list-width">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbfo-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
-    <xsl:with-param name="attribute" select="'list-width'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi name="dbfo_orientation" xmlns="">
-  <refpurpose>Specifies the orientation for table row or cell</refpurpose>
-  <refdescription>
-    <para>Use the <tag class="xmlpi">dbfo orientation</tag> PI as a child of an
-      <tag>table</tag> row or cell to specify the orientation
-      (rotation) for the row or cell.</para>
-  </refdescription>
-  <refsynopsisdiv>
-    <synopsis><tag class="xmlpi">dbfo orientation="0"|"90"|"180"|"270"|"-90"|"-180"|"-270"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter>
-    <variablelist>
-      <varlistentry><term>orientation="0"|"90"|"180"|"270"|"-90"|"-180"|"-270"</term>
-        <listitem>
-          <para>Specifies the number of degrees by which the cell or
-            row is rotated</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-</doc:pi>
-<xsl:template name="pi.dbfo_orientation">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbfo-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
-    <xsl:with-param name="attribute" select="'orientation'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi name="dbfo_pgwide" xmlns="">
-  <refpurpose>Specifies if an <tag>equation</tag> or <tag>example</tag> goes across full page width</refpurpose>
-  <refdescription>
-    <para>Use the <tag class="xmlpi">dbfo pgwide</tag> PI as a child of an
-      <tag>equation</tag> or <tag>example</tag> to specify that the
-      content should rendered across the full width of the page.</para>
-  </refdescription>
-  <refsynopsisdiv>
-    <synopsis><tag class="xmlpi">dbfo pgwide="0"|"1"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter>
-    <variablelist>
-      <varlistentry><term>pgwide="0"</term>
-        <listitem>
-          <para>If zero, the content is rendered across the current
-            text flow</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry><term>pgwide="1"</term>
-        <listitem>
-          <para>If <code>1</code> (or any non-zero value), the
-            content is rendered across the full width of the page</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee role="params">
-    <para><parameter>pgwide.properties</parameter></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbfo_pgwide">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbfo-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
-    <xsl:with-param name="attribute" select="'pgwide'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi name="dbfo_rotated-width" xmlns="">
-  <refpurpose>Specifies the width for a table <tag>entry</tag> or
-    <tag>row</tag></refpurpose>
-  <refdescription>
-    <para>Use the <tag class="xmlpi">dbfo rotated-width</tag> PI as a child of an
-      <tag>entry</tag> or <tag>row</tag> instance to specify the
-      width of that the <tag>entry</tag> or <tag>row</tag>; or
-      use it higher up in table to cause the width to be inherited
-      recursively down.</para>
-  </refdescription>
-  <refsynopsisdiv>
-    <synopsis><tag class="xmlpi">dbfo rotated-width="<replaceable>width</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter>
-    <variablelist>
-      <varlistentry><term>rotated-width="<replaceable>width</replaceable>"</term>
-        <listitem>
-          <para>Specifies the width of a row or cell (including units)</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-</doc:pi>
-<xsl:template name="pi.dbfo_rotated-width">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbfo-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
-    <xsl:with-param name="attribute" select="'rotated-width'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi name="dbfo_sidebar-width" xmlns="">
-  <refpurpose>Specifies the width of a sidebar</refpurpose>
-  <refdescription>
-    <para>Use the <tag class="xmlpi">dbfo sidebar-width</tag> PI as a child of a
-      <tag>sidebar</tag> to specify the width of the sidebar.</para>
-  </refdescription>
-  <refsynopsisdiv>
-    <synopsis><tag class="xmlpi">dbfo sidebar-width="<replaceable>width</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter>
-    <variablelist>
-      <varlistentry><term>sidebar-width="<replaceable>width</replaceable>"</term>
-        <listitem>
-          <para>Specifies the <tag>sidebar</tag> width (including units)</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee role="params">
-    <para><parameter>sidebar.float.type parameter</parameter>,
-      <parameter>sidebar.float.width parameter</parameter>, 
-      <parameter>sidebar.properties attribute-set</parameter>,
-      <parameter>sidebar.title.properties</parameter>
-    </para>
-  </refsee>
-  <refsee role="tcg">
-    <para><link xlink:href="SideFloats.html#SidebarFloats" >A sidebar as
-        side float</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbfo_sidebar-width">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbfo-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
-    <xsl:with-param name="attribute" select="'sidebar-width'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi name="dbfo_start" xmlns="">
-  <refpurpose>(obsolete) Sets the starting number on an ordered list</refpurpose>
-  <refdescription>
-    <para><emphasis>This PI is obsolete</emphasis>. The intent of
-      it was to provide a means for setting a specific starting
-      number for an ordered list. Instead of this PI, set a value
-      for the <literal>override</literal> attribute on the first
-      <tag>listitem</tag> in the list; that will have the same
-      effect as what this PI was intended for.</para>
-  </refdescription>
-  <refsynopsisdiv>
-    <synopsis><tag class="xmlpi">dbfo start="<replaceable>character</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter>
-    <variablelist>
-      <varlistentry><term>start="<replaceable>character</replaceable>"</term>
-        <listitem>
-          <para>Specifies the character to use as the starting
-            number; use 0-9, a-z, A-Z, or lowercase or uppercase
-            Roman numerals</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee role="tcg">
-    <para><link role="tcg"
-        xlink:href="Orderedlists.html#ListStartNum"
-        >List starting number</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbfo_start">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="pi-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
-    <xsl:with-param name="attribute" select="'start'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi name="dbfo_table-width" xmlns="">
-  <refpurpose>Specifies the width for a table or for revhistory
-    output</refpurpose>
-  <refdescription>
-    <para>Use the <tag class="xmlpi">dbfo table-width</tag> PI as a child or
-      sibling of a <tag>table</tag>, or as a child of an
-      <tag>informaltable</tag>, <tag>entrybl</tag>, or
-      <tag>revhistory</tag> instance (which is rendered as a table
-      in output) to specify the width of the table in output.</para>
-  </refdescription>
-  <refsynopsisdiv>
-    <synopsis><tag class="xmlpi">dbfo table-width="<replaceable>width</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter>
-    <variablelist>
-      <varlistentry><term>table-width="<replaceable>width</replaceable>"</term>
-        <listitem>
-          <para>Specifies the table width (including units or as a percentage)</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee role="tcg">
-    <para><link role="tcg"
-        xlink:href="Tables.html#TableWidth"
-        >Table width</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbfo_table-width">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbfo-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
-    <xsl:with-param name="attribute" select="'table-width'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi name="dbfo_term-width" xmlns="">
-  <refpurpose>Specifies the term width for a variablelist</refpurpose>
-  <refdescription>
-    <para>Use the <tag class="xmlpi">dbfo term-width</tag> PI as a child of a
-      <tag>variablelist</tag> to specify the width for
-      <tag>term</tag> output.</para>
-  </refdescription>
-  <refsynopsisdiv>
-    <synopsis><tag class="xmlpi">dbfo term-width="<replaceable>width</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter>
-    <variablelist>
-      <varlistentry><term>term-width="<replaceable>width</replaceable>"</term>
-        <listitem>
-          <para>Specifies the term width (including units)</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee role="tcg">
-    <para><link role="tcg"
-        xlink:href="Variablelists.html#ListIndents"
-        >Variable list formatting in print</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbfo_term-width">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbfo-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
-    <xsl:with-param name="attribute" select="'term-width'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi name="dbfo_toc" xmlns="">
-  <refpurpose>Specifies whether a TOC should be generated for a qandaset</refpurpose>
-  <refdescription>
-    <para>Use the <tag class="xmlpi">dbfo toc</tag> PI as a child of a
-      <tag>qandaset</tag> to specify whether a table of contents
-      (TOC) is generated for the <tag>qandaset</tag>.</para>
-  </refdescription>
-  <refsynopsisdiv>
-    <synopsis><tag class="xmlpi">dbfo toc="0"|"1"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter>
-    <variablelist>
-      <varlistentry><term>toc="0"</term>
-        <listitem>
-          <para>If zero, no TOC is generated</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry><term>toc="1"</term>
-        <listitem>
-          <para>If <code>1</code> (or any non-zero value),
-            a TOC is generated</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee role="tcg">
-    <para><link role="tcg"
-        xlink:href="QandAtoc.html"
-        >Q and A list of questions</link>,
-      <link role="tcg"
-        xlink:href="QandAformat.html"
-        >Q and A formatting</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbfo_toc">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbfo-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
-    <xsl:with-param name="attribute" select="'toc'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi name="dbfo-need" xmlns="">
-  <refpurpose>Specify a need for space (a kind of soft page break)</refpurpose>
-  <refdescription>
-    <para>A âneedâ is a request for space on a page.  If the
-      requested space is not available, the page breaks and the
-      content that follows the need request appears on the next
-      page. If the requested space is available, then no page break
-      is inserted.</para>
-  </refdescription>
-  <refsynopsisdiv>
-    <synopsis><tag class="xmlpi">dbfo-need height="<replaceable>n</replaceable>" [space-before="<replaceable>n</replaceable>"]</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter>
-    <variablelist>
-      <varlistentry><term>height="<replaceable>n</replaceable>"</term>
-        <listitem>
-          <para>The amount of height needed (including units)</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry><term>space-before="<replaceable>n</replaceable>"</term>
-        <listitem>
-          <para>The amount of extra vertical space to add (including units)</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee role="tcg">
-    <para><link role="tcg"
-        xlink:href="PageBreaking.html#SoftPageBreaks"
-        >Soft page breaks</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbfo-need">
-  <xsl:variable name="pi-height">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis" select="."/>
-      <xsl:with-param name="attribute" select="'height'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="height">
-    <xsl:choose>
-      <xsl:when test="$pi-height != ''">
-        <xsl:value-of select="$pi-height"/>
-      </xsl:when>
-      <xsl:otherwise>0pt</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="pi-before">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis" select="."/>
-      <xsl:with-param name="attribute" select="'space-before'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="spacer">
-    <fo:block-container width="100%" height="{$height}">
-      <fo:block><fo:leader leader-length="0pt"/></fo:block>
-    </fo:block-container>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$fop.extensions != 0">
-      <!-- Doesn't work in fop -->
-    </xsl:when>
-    <xsl:when test="$pi-before != '' and
-      not(following-sibling::listitem) and
-      not(following-sibling::step)">
-      <fo:block space-after="0pt" space-before="{$pi-before}">
-        <xsl:copy-of select="$spacer"/>
-      </fo:block>
-    </xsl:when>
-    <xsl:when test="following-sibling::para">
-      <fo:block space-after="0pt" 
-        xsl:use-attribute-sets="normal.para.spacing">
-        <xsl:copy-of select="$spacer"/>
-      </fo:block>
-    </xsl:when>
-    <xsl:when test="following-sibling::table or
-      following-sibling::figure or
-      following-sibling::example or
-      following-sibling::equation">
-      <fo:block space-after="0pt" 
-        xsl:use-attribute-sets="formal.object.properties">
-        <xsl:copy-of select="$spacer"/>
-      </fo:block>
-    </xsl:when>
-    <xsl:when test="following-sibling::informaltable or
-      following-sibling::informalfigure or
-      following-sibling::informalexample or
-      following-sibling::informalequation">
-      <fo:block space-after="0pt" 
-        xsl:use-attribute-sets="informal.object.properties">
-        <xsl:copy-of select="$spacer"/>
-      </fo:block>
-    </xsl:when>
-    <xsl:when test="following-sibling::itemizedlist or
-      following-sibling::orderedlist or
-      following-sibling::variablelist or
-      following-sibling::simplelist">
-      <fo:block space-after="0pt" 
-        xsl:use-attribute-sets="informal.object.properties">
-        <xsl:copy-of select="$spacer"/>
-      </fo:block>
-    </xsl:when>
-    <xsl:when test="following-sibling::listitem or
-      following-sibling::step">
-      <fo:list-item space-after="0pt" 
-        xsl:use-attribute-sets="informal.object.properties">
-        <fo:list-item-label/>
-        <fo:list-item-body start-indent="0pt" end-indent="0pt">
-          <xsl:copy-of select="$spacer"/>
-        </fo:list-item-body>
-      </fo:list-item>
-    </xsl:when>
-    <xsl:when test="following-sibling::sect1 or
-      following-sibling::sect2 or
-      following-sibling::sect3 or
-      following-sibling::sect4 or
-      following-sibling::sect5 or
-      following-sibling::section">
-      <fo:block space-after="0pt" 
-        xsl:use-attribute-sets="section.title.properties">
-        <xsl:copy-of select="$spacer"/>
-      </fo:block>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:block space-after="0pt" space-before="0em">
-        <xsl:copy-of select="$spacer"/>
-      </fo:block>
-    </xsl:otherwise>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="$fop.extensions != 0">
-      <!-- Doesn't work in fop -->
-    </xsl:when>
-    <xsl:when test="following-sibling::listitem or
-      following-sibling::step">
-      <fo:list-item space-before.precedence="force"
-        space-before="-{$height}"
-        space-after="0pt"
-        space-after.precedence="force">
-        <fo:list-item-label/>
-        <fo:list-item-body start-indent="0pt" end-indent="0pt"/>
-      </fo:list-item>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:block space-before.precedence="force"
-        space-before="-{$height}"
-        space-after="0pt"
-        space-after.precedence="force">
-      </fo:block>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="dbfo-attribute">
-  <!-- * dbfo-attribute is an interal utility template for retrieving -->
-  <!-- * pseudo-attributes/parameters from PIs -->
-  <xsl:param name="pis" select="processing-instruction('dbfo')"/>
-  <xsl:param name="attribute">filename</xsl:param>
-  <xsl:call-template name="pi-attribute">
-    <xsl:with-param name="pis" select="$pis"/>
-    <xsl:with-param name="attribute" select="$attribute"/>
-  </xsl:call-template>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="processing-instruction()">
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="processing-instruction('dbfo-need')">
-  <xsl:call-template name="pi.dbfo-need"/>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/profile-docbook.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/profile-docbook.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,284 +1,0 @@
-<?xml version="1.0" encoding="US-ASCII"?>
-<!--This file was created automatically by xsl2profile-->
-<!--from the DocBook XSL stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ng="http://docbook.org/docbook-ng" xmlns:db="http://docbook.org/ns/docbook" xmlns:exslt="http://exslt.org/common" exslt:dummy="dummy" ng:dummy="dummy" db:dummy="dummy" extension-element-prefixes="exslt" exclude-result-prefixes="db ng exsl exslt" version="1.0">
-
-<!-- It is important to use indent="no" here, otherwise verbatim -->
-<!-- environments get broken by indented tags...at least when the -->
-<!-- callout extension is used...at least with some processors -->
-<xsl:output method="xml" indent="no"/>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:include href="../VERSION"/>
-<xsl:include href="param.xsl"/>
-<xsl:include href="../lib/lib.xsl"/>
-<xsl:include href="../common/l10n.xsl"/>
-<xsl:include href="../common/common.xsl"/>
-<xsl:include href="../common/utility.xsl"/>
-<xsl:include href="../common/labels.xsl"/>
-<xsl:include href="../common/titles.xsl"/>
-<xsl:include href="../common/subtitles.xsl"/>
-<xsl:include href="../common/gentext.xsl"/>
-<xsl:include href="../common/olink.xsl"/>
-<xsl:include href="../common/targets.xsl"/>
-<xsl:include href="../common/pi.xsl"/>
-<xsl:include href="autotoc.xsl"/>
-<xsl:include href="autoidx.xsl"/>
-<xsl:include href="lists.xsl"/>
-<xsl:include href="callout.xsl"/>
-<xsl:include href="verbatim.xsl"/>
-<xsl:include href="graphics.xsl"/>
-<xsl:include href="xref.xsl"/>
-<xsl:include href="formal.xsl"/>
-<xsl:include href="table.xsl"/>
-<xsl:include href="htmltbl.xsl"/>
-<xsl:include href="sections.xsl"/>
-<xsl:include href="inline.xsl"/>
-<xsl:include href="footnote.xsl"/>
-<xsl:include href="fo.xsl"/>
-<xsl:include href="fo-rtf.xsl"/>
-<xsl:include href="info.xsl"/>
-<xsl:include href="keywords.xsl"/>
-<xsl:include href="division.xsl"/>
-<xsl:include href="index.xsl"/>
-<xsl:include href="toc.xsl"/>
-<xsl:include href="refentry.xsl"/>
-<xsl:include href="math.xsl"/>
-<xsl:include href="admon.xsl"/>
-<xsl:include href="component.xsl"/>
-<xsl:include href="biblio.xsl"/>
-<xsl:include href="biblio-iso690.xsl"/>
-<xsl:include href="glossary.xsl"/>
-<xsl:include href="block.xsl"/>
-<xsl:include href="task.xsl"/>
-<xsl:include href="qandaset.xsl"/>
-<xsl:include href="synop.xsl"/>
-<xsl:include href="titlepage.xsl"/>
-<xsl:include href="titlepage.templates.xsl"/>
-<xsl:include href="pagesetup.xsl"/>
-<xsl:include href="pi.xsl"/>
-<xsl:include href="spaces.xsl"/>
-<xsl:include href="ebnf.xsl"/>
-<xsl:include href="../html/chunker.xsl"/>
-<xsl:include href="annotations.xsl"/>
-<xsl:include href="../common/stripns.xsl"/>
-
-<xsl:include href="fop.xsl"/>
-<xsl:include href="fop1.xsl"/>
-<xsl:include href="passivetex.xsl"/>
-<xsl:include href="xep.xsl"/>
-<xsl:include href="axf.xsl"/>
-<xsl:include href="ptc.xsl"/>
-
-<xsl:param name="stylesheet.result.type" select="'fo'"/>
-
-<!-- ==================================================================== -->
-
-<xsl:key name="id" match="*" use="@id|@xml:id"/>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="*">
-  <xsl:message>
-    <xsl:value-of select="name(.)"/>
-    <xsl:text> encountered</xsl:text>
-    <xsl:if test="parent::*">
-      <xsl:text> in </xsl:text>
-      <xsl:value-of select="name(parent::*)"/>
-    </xsl:if>
-    <xsl:text>, but no template matches.</xsl:text>
-  </xsl:message>
-  <fo:block color="red">
-    <xsl:text>&lt;</xsl:text>
-    <xsl:value-of select="name(.)"/>
-    <xsl:text>&gt;</xsl:text>
-    <xsl:apply-templates/> 
-    <xsl:text>&lt;/</xsl:text>
-    <xsl:value-of select="name(.)"/>
-    <xsl:text>&gt;</xsl:text>
-  </fo:block>
-</xsl:template>
-
-<!-- Update this list if new root elements supported -->
-<xsl:variable name="root.elements" select="' appendix article bibliography book chapter colophon dedication glossary index part preface qandaset refentry reference sect1 section set setindex '"/>
-
-<xslo:include xmlns:xslo="http://www.w3.org/1999/XSL/Transform" href="../profiling/profile-mode.xsl"/><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-content"><xslo:choose><xslo:when test="*/self::ng:* or */self::db:*"><xslo:message>Note: namesp. cut : stripped namespace before processing</xslo:message><xslo:variable name="stripped-content"><xslo:apply-templates select="/" mode="stripNS"/></xslo:variable><xslo:message>Note: namesp. cut : processing stripped document</xslo:message><xslo:apply-templates select="exslt:node-set($stripped-content)" mode="profile"/></xslo:when><xslo:otherwise><xslo:apply-templates select="/" mode="profile"/></xslo:otherwise></xslo:choose></xslo:variable><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-nodes" select="exslt:node-set($profiled-content)"/><xsl:template match="/">
-  <!-- * Get a title for current doc so that we let the user -->
-  <!-- * know what document we are processing at this point. -->
-  <xsl:variable name="doc.title">
-    <xsl:call-template name="get.doc.title"/>
-  </xsl:variable>
-  <xsl:choose>
-    <!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document,
-         toss the namespace and continue.  Use the docbook5 namespaced
-         stylesheets for DocBook5 if you don't want to use this feature.-->
-    <!-- include extra test for Xalan quirk -->
-    <xsl:when test="false()"/>
-    <!-- Can't process unless namespace removed -->
-    <xsl:when test="false()"/>
-    <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="$rootid != ''">
-          <xsl:variable name="root.element" select="key('id', $rootid)"/>
-          <xsl:choose>
-            <xsl:when test="count($root.element) = 0">
-              <xsl:message terminate="yes">
-                <xsl:text>ID '</xsl:text>
-                <xsl:value-of select="$rootid"/>
-                <xsl:text>' not found in document.</xsl:text>
-              </xsl:message>
-            </xsl:when>
-            <xsl:when test="not(contains($root.elements, concat(' ', local-name($root.element), ' ')))">
-              <xsl:message terminate="yes">
-                <xsl:text>ERROR: Document root element ($rootid=</xsl:text>
-                <xsl:value-of select="$rootid"/>
-                <xsl:text>) for FO output </xsl:text>
-                <xsl:text>must be one of the following elements:</xsl:text>
-                <xsl:value-of select="$root.elements"/>
-              </xsl:message>
-            </xsl:when>
-            <!-- Otherwise proceed -->
-            <xsl:otherwise>
-              <xsl:if test="$collect.xref.targets = 'yes' or                             $collect.xref.targets = 'only'">
-                <xsl:apply-templates select="$root.element" mode="collect.targets"/>
-              </xsl:if>
-              <xsl:if test="$collect.xref.targets != 'only'">
-                <xsl:apply-templates select="$root.element" mode="process.root"/>
-              </xsl:if>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-        <!-- Otherwise process the document root element -->
-        <xsl:otherwise>
-          <xsl:variable name="document.element" select="*[1]"/>
-          <xsl:choose>
-            <xsl:when test="not(contains($root.elements,                      concat(' ', local-name($document.element), ' ')))">
-              <xsl:message terminate="yes">
-                <xsl:text>ERROR: Document root element for FO output </xsl:text>
-                <xsl:text>must be one of the following elements:</xsl:text>
-                <xsl:value-of select="$root.elements"/>
-              </xsl:message>
-            </xsl:when>
-            <!-- Otherwise proceed -->
-            <xsl:otherwise>
-              <xsl:if test="$collect.xref.targets = 'yes' or                             $collect.xref.targets = 'only'">
-                <xsl:apply-templates select="$profiled-nodes" mode="collect.targets"/>
-              </xsl:if>
-              <xsl:if test="$collect.xref.targets != 'only'">
-                <xsl:apply-templates select="$profiled-nodes" mode="process.root"/>
-              </xsl:if>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="*" mode="process.root">
-  <xsl:variable name="document.element" select="self::*"/>
-
-  <xsl:call-template name="root.messages"/>
-
-  <xsl:variable name="title">
-    <xsl:choose>
-      <xsl:when test="$document.element/title[1]">
-        <xsl:value-of select="$document.element/title[1]"/>
-      </xsl:when>
-      <xsl:otherwise>[could not find document title]</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-  
-  <!-- Include all id values in XEP output -->
-  <xsl:if test="$xep.extensions != 0">
-    <xsl:processing-instruction name="xep-pdf-drop-unused-destinations">false</xsl:processing-instruction>
-  </xsl:if>
-
-  <fo:root xsl:use-attribute-sets="root.properties">
-    <xsl:attribute name="language">
-      <xsl:call-template name="l10n.language">
-        <xsl:with-param name="target" select="/*[1]"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:if test="$xep.extensions != 0">
-      <xsl:call-template name="xep-pis"/>
-      <xsl:call-template name="xep-document-information"/>
-    </xsl:if>
-    <xsl:if test="$axf.extensions != 0">
-      <xsl:call-template name="axf-document-information"/>
-    </xsl:if>
-
-    <xsl:call-template name="setup.pagemasters"/>
-
-    <xsl:if test="$fop.extensions != 0">
-      <xsl:apply-templates select="$document.element" mode="fop.outline"/>
-    </xsl:if>
-
-    <xsl:if test="$fop1.extensions != 0">
-      <xsl:variable name="bookmarks">
-        <xsl:apply-templates select="$document.element" mode="fop1.outline"/>
-      </xsl:variable>
-      <xsl:if test="string($bookmarks) != ''">
-        <fo:bookmark-tree>
-          <xsl:copy-of select="$bookmarks"/>
-        </fo:bookmark-tree>
-      </xsl:if>
-    </xsl:if>
-
-    <xsl:if test="$xep.extensions != 0">
-      <xsl:variable name="bookmarks">
-        <xsl:apply-templates select="$document.element" mode="xep.outline"/>
-      </xsl:variable>
-      <xsl:if test="string($bookmarks) != ''">
-        <rx:outline xmlns:rx="http://www.renderx.com/XSL/Extensions">
-          <xsl:copy-of select="$bookmarks"/>
-        </rx:outline>
-      </xsl:if>
-    </xsl:if>
-
-    <xsl:if test="$arbortext.extensions != 0 and $ati.xsl11.bookmarks != 0">
-      <xsl:variable name="bookmarks">
-        <xsl:apply-templates select="$document.element" mode="ati.xsl11.bookmarks"/>
-      </xsl:variable>
-      <xsl:if test="string($bookmarks) != ''">
-        <fo:bookmark-tree>
-          <xsl:copy-of select="$bookmarks"/>
-        </fo:bookmark-tree>
-      </xsl:if>
-    </xsl:if>
-
-    <xsl:apply-templates select="$document.element"/>
-  </fo:root>
-</xsl:template>
-
-<xsl:template name="root.messages">
-  <!-- redefine this any way you'd like to output messages -->
-  <!-- DO NOT OUTPUT ANYTHING FROM THIS TEMPLATE -->
-  <xsl:message>
-    <xsl:text>Making </xsl:text>
-    <xsl:value-of select="$page.orientation"/>
-    <xsl:text> pages on </xsl:text>
-    <xsl:value-of select="$paper.type"/>
-    <xsl:text> paper (</xsl:text>
-    <xsl:value-of select="$page.width"/>
-    <xsl:text>x</xsl:text>
-    <xsl:value-of select="$page.height"/>
-    <xsl:text>)</xsl:text>
-  </xsl:message>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/ptc.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/ptc.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,76 +1,0 @@
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-		xmlns:fo="http://www.w3.org/1999/XSL/Format"
-		version="1.0">
-
-<!-- ================================================================ -->
-<!--                                                                  -->
-<!-- PTC/Arbortext Code for XSL 1.1 bookmark support                  -->
-<!--                                                                  -->
-<!-- ================================================================ -->
-
-<xsl:param name="ati.xsl11.bookmarks" select="1"/>
-
-<xsl:variable name="ati-a-dia" select=
-"'&#257;&#259;&#261;&#263;&#265;&#267;&#269;&#271;&#273;&#275;&#277;&#279;&#281;&#283;&#339;&#285;&#287;&#289;&#291;&#293;&#295;&#297;&#299;&#301;&#303;&#305;&#309;&#311;&#314;&#316;&#318;&#320;&#322;&#324;&#326;&#328;&#331;&#333;&#335;&#337;&#341;&#343;&#345;&#347;&#349;&#351;&#353;&#355;&#357;&#359;&#361;&#363;&#365;&#367;&#369;&#371;&#373;&#375;&#378;&#380;&#382;&#256;&#258;&#260;&#262;&#264;&#266;&#268;&#270;&#272;&#274;&#276;&#278;&#280;&#282;&#338;&#284;&#286;&#288;&#290;&#292;&#294;&#296;&#298;&#300;&#302;&#304;&#308;&#310;&#313;&#315;&#317;&#319;&#321;&#323;&#325;&#327;&#330;&#332;&#334;&#336;&#340;&#342;&#344;&#346;&#348;&#350;&#352;&#354;&#356;&#358;&#360;&#362;&#364;&#366;&#368;&#370;&#372;&#374;&#376;&#377;&#379;&#381;'"/>
-
-<xsl:variable name="ati-a-asc" select=
-"'aaaccccddeeeeeegggghhiiiiijklllllnnnnooorrrsssstttuuuuuuwyzzzAAACCCCDDEEEEEEGGGGHHIIIIIJKLLLLLNNNNOOORRRSSSSTTTUUUUUUWYYZZZ'"/>
-
-<xsl:template match="*" mode="ati.xsl11.bookmarks">
-  <xsl:apply-templates select="*" mode="ati.xsl11.bookmarks"/>
-</xsl:template>
-
-<xsl:template match="set|book|part|reference|preface|chapter|appendix|article
-                     |glossary|bibliography|index|setindex
-                     |refentry
-                     |sect1|sect2|sect3|sect4|sect5|section"
-              mode="ati.xsl11.bookmarks">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-  <xsl:variable name="bookmark-label">
-    <xsl:apply-templates select="." mode="object.title.markup"/>
-  </xsl:variable>
-
-  <!-- Put the root element bookmark at the same level as its children -->
-  <!-- If the object is a set or book, generate a bookmark for the toc -->
-
-  <xsl:choose>
-    <xsl:when test="parent::*">
-      <fo:bookmark internal-destination="{$id}">
-        <fo:bookmark-title>
-          <xsl:value-of select="translate($bookmark-label, $ati-a-dia, $ati-a-asc)"/>
-        </fo:bookmark-title>
-        <xsl:apply-templates select="*" mode="ati.xsl11.bookmarks"/>
-      </fo:bookmark>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:bookmark internal-destination="{$id}">
-        <fo:bookmark-title>
-          <xsl:value-of select="translate($bookmark-label, $ati-a-dia, $ati-a-asc)"/>
-        </fo:bookmark-title>
-      </fo:bookmark>
-
-      <xsl:variable name="toc.params">
-        <xsl:call-template name="find.path.params">
-          <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:if test="contains($toc.params, 'toc')
-                    and section|sect1|refentry
-                        |article|bibliography|glossary
-                        |appendix">
-        <fo:bookmark internal-destination="toc...{$id}">
-          <fo:bookmark-title>
-            <xsl:call-template name="gentext">
-              <xsl:with-param name="key" select="'TableofContents'"/>
-            </xsl:call-template>
-          </fo:bookmark-title>
-        </fo:bookmark>
-      </xsl:if>
-      <xsl:apply-templates select="*" mode="ati.xsl11.bookmarks"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/qandaset.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/qandaset.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,393 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:template match="qandaset" name="process.qandaset">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="label-width">
-    <xsl:call-template name="pi.dbfo_label-width"/>
-  </xsl:variable>
-
-  <xsl:variable name="label-length">
-    <xsl:choose>
-      <xsl:when test="$label-width != ''">
-        <xsl:value-of select="$label-width"/>
-      </xsl:when>
-      <xsl:when test="descendant::label">
-        <xsl:call-template name="longest.term">
-          <xsl:with-param name="terms" select="descendant::label"/>
-          <xsl:with-param name="maxlength" select="20"/>
-        </xsl:call-template>
-        <xsl:text>em * 0.50</xsl:text>
-      </xsl:when>
-      <xsl:otherwise>2.5em</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-  
-  <xsl:variable name="toc">
-    <xsl:call-template name="pi.dbfo_toc"/>
-  </xsl:variable>
-
-  <xsl:variable name="toc.params">
-    <xsl:call-template name="find.path.params">
-      <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="content">
-    <fo:block id="{$id}">
-      <xsl:choose>
-        <xsl:when test="parent::*">
-          <xsl:if test="blockinfo/title|info/title|title">
-            <xsl:apply-templates select="(blockinfo/title|
-                                          info/title|title)[1]"/>
-          </xsl:if>
-        </xsl:when>
-        <!-- If it is the root element -->
-        <xsl:otherwise>
-          <xsl:call-template name="qandaset.titlepage"/>
-        </xsl:otherwise>
-      </xsl:choose>
-  
-      <xsl:if test="(contains($toc.params, 'toc') and $toc != '0') 
-                    or $toc = '1'">
-        <xsl:call-template name="qandaset.toc">
-          <xsl:with-param name="toc.title.p"
-                          select="contains($toc.params, 'title')"/>
-        </xsl:call-template>
-      </xsl:if>
-
-      <xsl:call-template name="qandaset.toc.separator"/>
-
-      <xsl:apply-templates select="*[local-name(.) != 'title'
-                                   and local-name(.) != 'titleabbrev'
-                                   and local-name(.) != 'qandadiv'
-                                   and local-name(.) != 'qandaentry']"/>
-      <xsl:apply-templates select="qandadiv"/>
-  
-      <xsl:if test="qandaentry">
-        <fo:list-block xsl:use-attribute-sets="list.block.spacing"
-                       provisional-label-separation="0.2em">
-          <xsl:attribute name="provisional-distance-between-starts">
-            <xsl:choose>
-              <xsl:when test="$label-length != ''">
-                <xsl:value-of select="$label-length"/>
-              </xsl:when>
-              <xsl:otherwise>2.5em</xsl:otherwise>
-            </xsl:choose>
-          </xsl:attribute>
-          <xsl:apply-templates select="qandaentry"/>
-        </fo:list-block>
-      </xsl:if>
-    </fo:block>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="parent::*">
-      <xsl:copy-of select="$content"/>
-    </xsl:when>
-    <!-- Otherwise create a page sequence -->
-    <xsl:otherwise>
-      <xsl:apply-templates select="." mode="page.sequence">
-        <xsl:with-param name="content" select="$content"/>
-        <xsl:with-param name="master-reference" select="'body'"/>
-      </xsl:apply-templates>
-    </xsl:otherwise>
-  </xsl:choose>
-  
-</xsl:template>
-
-<xsl:template match="qandaset/blockinfo/title|qandset/info/title|qandaset/title">
-  <xsl:variable name="enclsect" select="(ancestor::section
-                                        | ancestor::simplesect
-                                        | ancestor::sect5
-                                        | ancestor::sect4
-                                        | ancestor::sect3
-                                        | ancestor::sect2
-                                        | ancestor::sect1
-                                        | ancestor::refsect3
-                                        | ancestor::refsect2
-                                        | ancestor::refsect1)[last()]"/>
-  <xsl:variable name="sectlvl">
-    <xsl:call-template name="section.level">
-      <xsl:with-param name="node" select="$enclsect"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:call-template name="qanda.heading">
-    <xsl:with-param name="level" select="$sectlvl + 1"/>
-    <xsl:with-param name="marker" select="0"/>
-    <xsl:with-param name="title">
-      <xsl:apply-templates/>
-    </xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="qandaset/blockinfo|qandaset/info">
-  <!-- what should this template really do? -->
-  <xsl:apply-templates select="legalnotice" mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="qandadiv">
-  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
-
-  <xsl:variable name="label-width">
-    <xsl:call-template name="pi.dbfo_label-width"/>
-  </xsl:variable>
-
-  <xsl:variable name="label-length">
-    <xsl:choose>
-      <xsl:when test="$label-width != ''">
-        <xsl:value-of select="$label-width"/>
-      </xsl:when>
-      <xsl:when test="descendant::label">
-        <xsl:call-template name="longest.term">
-          <xsl:with-param name="terms" select="descendant::label"/>
-          <xsl:with-param name="maxlength" select="20"/>
-        </xsl:call-template>
-        <xsl:text>*0.6em</xsl:text>
-      </xsl:when>
-      <xsl:otherwise>2.5em</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <fo:block id="{$id}">
-    <xsl:apply-templates select="(blockinfo/title|info/title|title)[1]"/>
-    <xsl:apply-templates select="*[local-name(.) != 'title'
-                                 and local-name(.) != 'titleabbrev'
-                                 and local-name(.) != 'qandadiv'
-                                 and local-name(.) != 'qandaentry']"/>
-    <fo:block>
-      <xsl:apply-templates select="qandadiv"/>
-
-      <xsl:if test="qandaentry">
-        <fo:list-block xsl:use-attribute-sets="list.block.spacing"
-                       provisional-label-separation="0.2em">
-          <xsl:attribute name="provisional-distance-between-starts">
-            <xsl:choose>
-              <xsl:when test="$label-length != ''">
-                <xsl:value-of select="$label-length"/>
-              </xsl:when>
-              <xsl:otherwise>2.5em</xsl:otherwise>
-            </xsl:choose>
-          </xsl:attribute>
-          <xsl:apply-templates select="qandaentry"/>
-        </fo:list-block>
-      </xsl:if>
-    </fo:block>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="qandadiv/blockinfo/title|qandadiv/info/title|qandadiv/title">
-  <xsl:variable name="enclsect" select="(ancestor::section
-                                        | ancestor::simplesect
-                                        | ancestor::sect5
-                                        | ancestor::sect4
-                                        | ancestor::sect3
-                                        | ancestor::sect2
-                                        | ancestor::sect1
-                                        | ancestor::refsect3
-                                        | ancestor::refsect2
-                                        | ancestor::refsect1)[last()]"/>
-  <xsl:variable name="sectlvl">
-    <xsl:call-template name="section.level">
-      <xsl:with-param name="node" select="$enclsect"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:call-template name="qanda.heading">
-    <xsl:with-param name="level"  select="$sectlvl + 1 + count(ancestor::qandadiv)"/>
-    <xsl:with-param name="marker" select="0"/>
-    <xsl:with-param name="title">
-      <xsl:apply-templates select="parent::qandadiv" mode="label.markup"/>
-      <xsl:if test="$qandadiv.autolabel != 0">
-        <xsl:apply-templates select="." mode="intralabel.punctuation"/>
-        <xsl:text> </xsl:text>
-      </xsl:if>
-      <xsl:apply-templates/>
-    </xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="qandaentry">
-  <!-- Omit revhistory from fo:list-block because it is a table -->
-  <xsl:apply-templates select="question|answer"/>
-</xsl:template>
-
-<xsl:template match="question">
-  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
-
-  <xsl:variable name="entry.id">
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="parent::*"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="deflabel">
-    <xsl:choose>
-      <xsl:when test="ancestor-or-self::*[@defaultlabel]">
-        <xsl:value-of select="(ancestor-or-self::*[@defaultlabel])[last()]
-                              /@defaultlabel"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$qanda.defaultlabel"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-
-      <xsl:variable name="label.content">
-        <xsl:apply-templates select="." mode="label.markup"/>
-        <xsl:if test="$deflabel = 'number' and not(label)">
-          <xsl:apply-templates select="." mode="intralabel.punctuation"/>
-        </xsl:if>
-      </xsl:variable>
-
-  <fo:list-item id="{$entry.id}" xsl:use-attribute-sets="list.item.spacing">
-    <fo:list-item-label id="{$id}" end-indent="label-end()">
-        <xsl:if test="string-length($label.content) &gt; 0">
-			<fo:block font-weight="bold">
-			  <xsl:copy-of select="$label.content"/>          
-			</fo:block>
-        </xsl:if>
-    </fo:list-item-label>
-    <fo:list-item-body start-indent="body-start()">
-      <xsl:choose>
-        <xsl:when test="$deflabel = 'none' and not(label)">
-          <fo:block font-weight="bold">
-            <xsl:apply-templates select="*[local-name(.)!='label']"/>
-          </fo:block>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates select="*[local-name(.)!='label']"/>
-        </xsl:otherwise>
-      </xsl:choose>
-      <!-- Uncomment this line to get revhistory output in the question -->
-      <!-- <xsl:apply-templates select="preceding-sibling::revhistory"/> -->
-    </fo:list-item-body>
-  </fo:list-item>
-</xsl:template>
-
-<xsl:template match="answer">
-  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
-  <xsl:variable name="entry.id">
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="parent::*"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="deflabel">
-    <xsl:choose>
-      <xsl:when test="ancestor-or-self::*[@defaultlabel]">
-        <xsl:value-of select="(ancestor-or-self::*[@defaultlabel])[last()]
-                              /@defaultlabel"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$qanda.defaultlabel"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-      <xsl:variable name="answer.label">
-        <xsl:apply-templates select="." mode="label.markup"/>
-      </xsl:variable>
-
-  <fo:list-item xsl:use-attribute-sets="list.item.spacing">
-    <fo:list-item-label id="{$id}" end-indent="label-end()">
-      <xsl:choose>
-        <xsl:when test="string-length($answer.label) &gt; 0">
-			<fo:block font-weight="bold">
-			  <xsl:copy-of select="$answer.label"/>
-			</fo:block>
-        </xsl:when>
-        <xsl:otherwise>
-			<fo:block/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </fo:list-item-label>
-    <fo:list-item-body start-indent="body-start()">
-      <xsl:apply-templates select="*[local-name(.)!='label' and local-name(.) != 'qandaentry']"/>
-      <!-- * handle nested answer/qandaentry instances -->
-      <!-- * (bug 1509043 from Daniel Leidert) -->
-      <xsl:if test="descendant::question">
-        <xsl:call-template name="process.qandaset"/>
-      </xsl:if>
-    </fo:list-item-body>
-  </fo:list-item>
-</xsl:template>
-
-<xsl:template match="label">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template name="qanda.heading">
-  <xsl:param name="level" select="1"/>
-  <xsl:param name="marker" select="0"/>
-  <xsl:param name="title"/>
-  <xsl:param name="titleabbrev"/>
-
-  <fo:block xsl:use-attribute-sets="qanda.title.properties">
-    <xsl:if test="$marker != 0">
-      <fo:marker marker-class-name="section.head.marker">
-        <xsl:choose>
-          <xsl:when test="$titleabbrev = ''">
-            <xsl:value-of select="$title"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="$titleabbrev"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </fo:marker>
-    </xsl:if>
-    <xsl:choose>
-      <xsl:when test="$level=1">
-        <fo:block xsl:use-attribute-sets="qanda.title.level1.properties">
-          <xsl:copy-of select="$title"/>
-        </fo:block>
-      </xsl:when>
-      <xsl:when test="$level=2">
-        <fo:block xsl:use-attribute-sets="qanda.title.level2.properties">
-          <xsl:copy-of select="$title"/>
-        </fo:block>
-      </xsl:when>
-      <xsl:when test="$level=3">
-        <fo:block xsl:use-attribute-sets="qanda.title.level3.properties">
-          <xsl:copy-of select="$title"/>
-        </fo:block>
-      </xsl:when>
-      <xsl:when test="$level=4">
-        <fo:block xsl:use-attribute-sets="qanda.title.level4.properties">
-          <xsl:copy-of select="$title"/>
-        </fo:block>
-      </xsl:when>
-      <xsl:when test="$level=5">
-        <fo:block xsl:use-attribute-sets="qanda.title.level5.properties">
-          <xsl:copy-of select="$title"/>
-        </fo:block>
-      </xsl:when>
-      <xsl:otherwise>
-        <fo:block xsl:use-attribute-sets="qanda.title.level6.properties">
-          <xsl:copy-of select="$title"/>
-        </fo:block>
-      </xsl:otherwise>
-    </xsl:choose>
-  </fo:block>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/refentry.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/refentry.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,637 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:template match="reference">
-   <xsl:if test="not(partintro)">
-    <xsl:variable name="id">
-      <xsl:call-template name="object.id"/>
-    </xsl:variable>
-    <xsl:variable name="master-reference">
-      <xsl:call-template name="select.pagemaster"/>
-    </xsl:variable>
-
-    <fo:page-sequence hyphenate="{$hyphenate}"
-                      master-reference="{$master-reference}">
-      <xsl:attribute name="language">
-        <xsl:call-template name="l10n.language"/>
-      </xsl:attribute>
-      <xsl:attribute name="format">
-        <xsl:call-template name="page.number.format">
-          <xsl:with-param name="master-reference" select="$master-reference"/>
-        </xsl:call-template>
-      </xsl:attribute>
-
-      <xsl:attribute name="initial-page-number">
-        <xsl:call-template name="initial.page.number">
-          <xsl:with-param name="master-reference" select="$master-reference"/>
-        </xsl:call-template>
-      </xsl:attribute>
-
-      <xsl:attribute name="force-page-count">
-        <xsl:call-template name="force.page.count">
-          <xsl:with-param name="master-reference" select="$master-reference"/>
-        </xsl:call-template>
-      </xsl:attribute>
-
-      <xsl:attribute name="hyphenation-character">
-        <xsl:call-template name="gentext">
-          <xsl:with-param name="key" select="'hyphenation-character'"/>
-        </xsl:call-template>
-      </xsl:attribute>
-      <xsl:attribute name="hyphenation-push-character-count">
-        <xsl:call-template name="gentext">
-          <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
-        </xsl:call-template>
-      </xsl:attribute>
-      <xsl:attribute name="hyphenation-remain-character-count">
-        <xsl:call-template name="gentext">
-          <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
-        </xsl:call-template>
-      </xsl:attribute>
-
-      <xsl:apply-templates select="." mode="running.head.mode">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:apply-templates>
-      <xsl:apply-templates select="." mode="running.foot.mode">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:apply-templates>
-
-      <fo:flow flow-name="xsl-region-body">
-        <xsl:call-template name="set.flow.properties">
-          <xsl:with-param name="element" select="local-name(.)"/>
-          <xsl:with-param name="master-reference" select="$master-reference"/>
-        </xsl:call-template>
-
-        <fo:block id="{$id}">
-          <xsl:call-template name="reference.titlepage"/>
-        </fo:block>
-        <!-- Create one page sequence if no pagebreaks needed -->
-        <xsl:if test="$refentry.pagebreak = 0">
-          <xsl:apply-templates select="refentry"/>
-        </xsl:if>
-      </fo:flow>
-    </fo:page-sequence>
-  </xsl:if>
-  <xsl:apply-templates select="partintro"/>
-  <xsl:if test="$refentry.pagebreak != 0">
-    <xsl:apply-templates select="refentry"/>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="reference" mode="reference.titlepage.mode">
-  <xsl:call-template name="reference.titlepage"/>
-</xsl:template>
-
-<xsl:template match="reference/partintro">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="ancestor::reference"/>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:variable name="master-reference">
-    <xsl:call-template name="select.pagemaster"/>
-  </xsl:variable>
-
-  <fo:page-sequence hyphenate="{$hyphenate}"
-                    master-reference="{$master-reference}">
-    <xsl:attribute name="language">
-      <xsl:call-template name="l10n.language"/>
-    </xsl:attribute>
-    <xsl:attribute name="format">
-      <xsl:call-template name="page.number.format">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="initial-page-number">
-      <xsl:call-template name="initial.page.number">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="force-page-count">
-      <xsl:call-template name="force.page.count">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="hyphenation-character">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-character'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-push-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-remain-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:apply-templates select="." mode="running.head.mode">
-      <xsl:with-param name="master-reference" select="$master-reference"/>
-    </xsl:apply-templates>
-    <xsl:apply-templates select="." mode="running.foot.mode">
-      <xsl:with-param name="master-reference" select="$master-reference"/>
-    </xsl:apply-templates>
-
-    <fo:flow flow-name="xsl-region-body">
-      <xsl:call-template name="set.flow.properties">
-        <xsl:with-param name="element" select="local-name(.)"/>
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-      <fo:block id="{$id}">
-        <xsl:apply-templates select=".." mode="reference.titlepage.mode"/>
-      </fo:block>
-      <xsl:if test="title">
-        <xsl:call-template name="partintro.titlepage"/>
-      </xsl:if>
-      <xsl:apply-templates/>
-      <!-- Create one page sequence if no pagebreaks needed -->
-      <xsl:if test="$refentry.pagebreak = 0">
-        <xsl:apply-templates select="../refentry"/>
-      </xsl:if>
-    </fo:flow>
-  </fo:page-sequence>
-</xsl:template>
-
-<xsl:template match="reference/docinfo|refentry/refentryinfo"></xsl:template>
-<xsl:template match="reference/info"></xsl:template>
-<xsl:template match="reference/title"></xsl:template>
-<xsl:template match="reference/subtitle"></xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="refentry">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="master-reference">
-    <xsl:call-template name="select.pagemaster"/>
-  </xsl:variable>
-
-  <xsl:variable name="refentry.content">
-    <fo:block id="{$id}">
-      <xsl:apply-templates/>
-    </fo:block>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="not(parent::*) or 
-                    (parent::reference and $refentry.pagebreak != 0) or 
-                    parent::part">
-      <!-- make a page sequence -->
-      <fo:page-sequence hyphenate="{$hyphenate}"
-                        master-reference="{$master-reference}">
-        <xsl:attribute name="language">
-          <xsl:call-template name="l10n.language"/>
-        </xsl:attribute>
-        <xsl:attribute name="format">
-          <xsl:call-template name="page.number.format">
-            <xsl:with-param name="master-reference" select="$master-reference"/>
-          </xsl:call-template>
-        </xsl:attribute>
-
-        <xsl:attribute name="initial-page-number">
-          <xsl:call-template name="initial.page.number">
-            <xsl:with-param name="master-reference" select="$master-reference"/>
-          </xsl:call-template>
-        </xsl:attribute>
-
-        <xsl:attribute name="force-page-count">
-          <xsl:call-template name="force.page.count">
-            <xsl:with-param name="master-reference" select="$master-reference"/>
-          </xsl:call-template>
-        </xsl:attribute>
-
-        <xsl:attribute name="hyphenation-character">
-          <xsl:call-template name="gentext">
-            <xsl:with-param name="key" select="'hyphenation-character'"/>
-          </xsl:call-template>
-        </xsl:attribute>
-        <xsl:attribute name="hyphenation-push-character-count">
-          <xsl:call-template name="gentext">
-            <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
-          </xsl:call-template>
-        </xsl:attribute>
-        <xsl:attribute name="hyphenation-remain-character-count">
-          <xsl:call-template name="gentext">
-            <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
-          </xsl:call-template>
-        </xsl:attribute>
-
-        <xsl:apply-templates select="." mode="running.head.mode">
-          <xsl:with-param name="master-reference" select="$master-reference"/>
-        </xsl:apply-templates>
-        <xsl:apply-templates select="." mode="running.foot.mode">
-          <xsl:with-param name="master-reference" select="$master-reference"/>
-        </xsl:apply-templates>
-
-        <fo:flow flow-name="xsl-region-body">
-          <xsl:call-template name="set.flow.properties">
-            <xsl:with-param name="element" select="local-name(.)"/>
-            <xsl:with-param name="master-reference" select="$master-reference"/>
-          </xsl:call-template>
-
-          <xsl:copy-of select="$refentry.content"/>
-        </fo:flow>
-      </fo:page-sequence>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:block>
-        <xsl:if test="$refentry.pagebreak != 0">
-          <xsl:attribute name="break-before">page</xsl:attribute>
-        </xsl:if>
-        <xsl:copy-of select="$refentry.content"/>
-      </fo:block>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="refmeta">
-</xsl:template>
-
-<xsl:template match="manvolnum">
-  <xsl:if test="$refentry.xref.manvolnum != 0">
-    <xsl:text>(</xsl:text>
-    <xsl:apply-templates/>
-    <xsl:text>)</xsl:text>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="refmiscinfo">
-</xsl:template>
-
-<xsl:template match="refentrytitle">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="refnamediv">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <fo:block id="{$id}">
-
-    <!-- if refentry.generate.name is non-zero, then we need to generate a -->
-    <!-- localized "Name" subheading for this refnamdiv (unless it has a -->
-    <!-- preceding sibling that is a refnamediv, in which case we have already -->
-    <!-- generated a "Name" subheading, so we don't need to do it again -->
-    <xsl:if test="$refentry.generate.name != 0">
-        <xsl:choose>
-          <xsl:when test="preceding-sibling::refnamediv">
-            <!-- no generated title on secondary refnamedivs! -->
-          </xsl:when>
-          <xsl:otherwise>
-            <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                      xsl:use-attribute-sets="refnamediv.titlepage.recto.style"
-                      font-family="{$title.fontset}">
-              <!-- Contents of what is now the format.refentry.subheading -->
-              <!-- template were formerly intended to be used only to -->
-              <!-- process those subsections of Refentry that have "real" -->
-              <!-- title children. So as a kludge to get around the fact -->
-              <!-- that the template still basically "expects" to be -->
-              <!-- processing that kind of a node, when we call the -->
-              <!-- template to process generated titles, we must call it -->
-              <!-- with values for the "offset" and "section" parameters -->
-              <!-- that are different from the default values in the -->
-              <!-- format.refentry.subheading template itself. Because -->
-              <!-- those defaults are the values appropriate for processing -->
-              <!-- "real" title nodes. -->
-              <xsl:call-template name="format.refentry.subheading">
-                <xsl:with-param name="section" select="self::*"/>
-                <xsl:with-param name="offset" select="1"/>
-                <xsl:with-param name="gentext.key" select="'RefName'"/>
-              </xsl:call-template>
-            </fo:block>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:if>
-
-      <xsl:if test="$refentry.generate.title != 0">
-  <xsl:variable name="section.level">
-    <xsl:call-template name="refentry.level">
-      <xsl:with-param name="node" select="ancestor::refentry"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="reftitle">
-        <xsl:choose>
-          <xsl:when test="../refmeta/refentrytitle">
-            <xsl:apply-templates select="../refmeta/refentrytitle"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:apply-templates select="refname[1]"/>
-          </xsl:otherwise>
-        </xsl:choose>
-  </xsl:variable>
-
-  <!-- xsl:use-attribute-sets takes only a Qname, not a variable -->
-    <xsl:choose>
-      <xsl:when test="preceding-sibling::refnamediv">
-	<!-- no title on secondary refnamedivs! -->
-      </xsl:when>
-      <xsl:when test="$section.level = 1">
-        <fo:block xsl:use-attribute-sets="refentry.title.properties">
-          <fo:block xsl:use-attribute-sets="section.title.level1.properties">
-            <xsl:value-of select="$reftitle"/>
-          </fo:block>
-        </fo:block>
-      </xsl:when>
-      <xsl:when test="$section.level = 2">
-        <fo:block xsl:use-attribute-sets="refentry.title.properties">
-          <fo:block xsl:use-attribute-sets="section.title.level2.properties">
-            <xsl:value-of select="$reftitle"/>
-          </fo:block>
-        </fo:block>
-      </xsl:when>
-      <xsl:when test="$section.level = 3">
-        <fo:block xsl:use-attribute-sets="refentry.title.properties">
-          <fo:block xsl:use-attribute-sets="section.title.level3.properties">
-            <xsl:value-of select="$reftitle"/>
-          </fo:block>
-        </fo:block>
-      </xsl:when>
-      <xsl:when test="$section.level = 4">
-        <fo:block xsl:use-attribute-sets="refentry.title.properties">
-          <fo:block xsl:use-attribute-sets="section.title.level4.properties">
-            <xsl:value-of select="$reftitle"/>
-          </fo:block>
-        </fo:block>
-      </xsl:when>
-      <xsl:when test="$section.level = 5">
-        <fo:block xsl:use-attribute-sets="refentry.title.properties">
-          <fo:block xsl:use-attribute-sets="section.title.level5.properties">
-            <xsl:value-of select="$reftitle"/>
-          </fo:block>
-        </fo:block>
-      </xsl:when>
-      <xsl:otherwise>
-        <fo:block xsl:use-attribute-sets="refentry.title.properties">
-          <fo:block xsl:use-attribute-sets="section.title.level6.properties">
-            <xsl:value-of select="$reftitle"/>
-          </fo:block>
-        </fo:block>
-      </xsl:otherwise>
-    </xsl:choose>
-    </xsl:if>
-
-    <fo:block>
-      <xsl:if test="not(following-sibling::refnamediv)">
-	<xsl:attribute name="space-after">1em</xsl:attribute>
-      </xsl:if>
-      <xsl:apply-templates/>
-    </fo:block>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="refname">
-  <xsl:if test="not(preceding-sibling::refdescriptor)">
-    <xsl:apply-templates/>
-    <xsl:if test="following-sibling::refname">
-      <xsl:text>, </xsl:text>
-    </xsl:if>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="refpurpose">
-  <xsl:if test="node()">
-    <xsl:text> </xsl:text>
-    <xsl:call-template name="dingbat">
-      <xsl:with-param name="dingbat">em-dash</xsl:with-param>
-    </xsl:call-template>
-    <xsl:text> </xsl:text>
-    <xsl:apply-templates/>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="refdescriptor">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="refclass">
-  <xsl:if test="$refclass.suppress = 0">
-  <fo:block font-weight="bold">
-    <xsl:if test="@role">
-      <xsl:value-of select="@role"/>
-      <xsl:text>: </xsl:text>
-    </xsl:if>
-    <xsl:apply-templates/>
-  </fo:block>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="refsynopsisdiv">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <fo:block id="{$id}">
-    <xsl:if test="not(refsynopsisdivinfo/title|docinfo/title|info/title|title)">
-      <!-- * if we there is no appropriate title for this Refsynopsisdiv, -->
-      <!-- * then we need to call format.refentry.subheading to generate one -->
-      <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                xsl:use-attribute-sets="refsynopsisdiv.titlepage.recto.style"
-                font-family="{$title.fontset}">
-        <!-- Contents of what is now the format.refentry.subheading -->
-        <!-- template were formerly intended to be used only to -->
-        <!-- process those subsections of Refentry that have "real" -->
-        <!-- title children. So as a kludge to get around the fact -->
-        <!-- that the template still basically "expects" to be -->
-        <!-- processing that kind of a node, when we call the -->
-        <!-- template to process generated titles, we must call it -->
-        <!-- with values for the "offset" and "section" parameters -->
-        <!-- that are different from the default values in the -->
-        <!-- format.refentry.subheading template itself. Because -->
-        <!-- those defaults are the values appropriate for processing -->
-        <!-- "real" title nodes. -->
-        <xsl:call-template name="format.refentry.subheading">
-          <xsl:with-param name="section" select="parent::*"/>
-          <xsl:with-param name="offset" select="1"/>
-          <xsl:with-param name="gentext.key" select="'RefSynopsisDiv'"/>
-        </xsl:call-template>
-      </fo:block>
-    </xsl:if>
-    <xsl:call-template name="refsynopsisdiv.titlepage"/>
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="refsection">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <fo:block id="{$id}">
-    <xsl:call-template name="refsection.titlepage"/>
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="refsect1">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <fo:block id="{$id}">
-    <xsl:call-template name="refsect1.titlepage"/>
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="refsect2">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <fo:block id="{$id}">
-    <xsl:call-template name="refsect2.titlepage"/>
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="refsect3">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <fo:block id="{$id}">
-    <xsl:call-template name="refsect3.titlepage"/>
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="refsynopsisdiv/title
-                     |refsection/title
-                     |refsect1/title
-                     |refsect2/title
-                     |refsect3/title">
-  <!-- nop; titlepage.mode instead -->
-</xsl:template>
-
-<xsl:template match="refsynopsisdiv/title
-                     |refsection/title
-                     |refsect1/title
-                     |refsect2/title
-                     |refsect3/title
-                     |refsynopsisdiv/info/title
-                     |refsection/info/title
-                     |refsect1/info/title
-                     |refsect2/info/title
-                     |refsect3/info/title"
-              mode="titlepage.mode"
-              priority="2">
-  <xsl:call-template name="format.refentry.subheading"/>
-</xsl:template>
-
-<xsl:template name="format.refentry.subheading">
-<!-- This template is now called to process generated titles for -->
-<!-- Refnamediv and Refsynopsisdiv, as well as "real" titles for -->
-<!-- Refsynopsisdiv, Refsection, and Refsect[1-3]. -->
-<!-- -->
-<!-- But the contents of this template were formerly intended to be used -->
-<!-- only to process those subsections of Refentry that have "real" title -->
-<!-- children. So as a kludge to get around the fact that the template -->
-<!-- still basically "expects" to be processing that kind of a node, the -->
-<!-- "offset" parameter was added and the "section" variable was changed to -->
-<!-- a parameter so that when called for a generated title on a Refnamediv -->
-<!-- or Refsynopsisdiv, we can call it like this: -->
-<!-- -->
-<!--     <xsl:call-template name="format.refentry.subheading"> -->
-<!--       <xsl:with-param name="section" select="self::*"/> -->
-<!--       <xsl:with-param name="offset" select="1"/> -->
-<!--       <xsl:with-param name="gentext.key" select="'RefName'"/> -->
-<!--     </xsl:call-template> -->
-<!-- -->
-  <xsl:param name="section" 
-             select="(ancestor::refsynopsysdiv 
-                     |ancestor::refsection
-                     |ancestor::refsect1
-                     |ancestor::refsect2
-                     |ancestor::refsect3)[last()]"/>
-  <xsl:param name="offset" select="0"/>
-  <xsl:param name="gentext.key"/>
-
-  <fo:block keep-with-next.within-column="always">
-    <xsl:variable name="id">
-      <xsl:call-template name="object.id">
-        <xsl:with-param name="object" select="$section"/>
-      </xsl:call-template>
-    </xsl:variable>
-
-    <xsl:variable name="level">
-      <xsl:call-template name="section.level">
-        <xsl:with-param name="node" select="$section"/>
-      </xsl:call-template>
-    </xsl:variable>
-
-    <xsl:variable name="title">
-      <!-- If we have a non-empty value for the $gentext.key param, then we -->
-      <!-- generate an appropriate title here. Otherwise, we have a real -->
-      <!-- title child, so we copy contents of that to the result tree. -->
-      <xsl:choose>
-        <xsl:when test="$gentext.key != ''">
-          <xsl:call-template name="gentext">
-            <xsl:with-param name="key" select="$gentext.key"/>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates select="$section" mode="object.title.markup">
-            <xsl:with-param name="allow-anchors" select="1"/>
-          </xsl:apply-templates>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-
-    <xsl:if test="$passivetex.extensions != 0">
-      <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex" 
-                      fotex-bookmark-level="{$level + 2 + $offset}" 
-                      fotex-bookmark-label="{$id}">
-        <xsl:value-of select="$title"/>
-      </fotex:bookmark>
-    </xsl:if>
-
-    <xsl:if test="$axf.extensions != 0">
-      <xsl:attribute name="axf:outline-level">
-        <xsl:value-of select="count(ancestor::*)-1 + $offset"/>
-      </xsl:attribute>
-      <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
-      <xsl:attribute name="axf:outline-title">
-        <xsl:value-of select="$title"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:call-template name="section.heading">
-      <xsl:with-param name="level" select="$level + $offset"/>
-      <xsl:with-param name="title" select="$title"/>
-    </xsl:call-template>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="refsectioninfo|refsection/info"></xsl:template>
-<xsl:template match="refsect1info|refsect1/info"></xsl:template>
-<xsl:template match="refsect2info|refsect2/info"></xsl:template>
-<xsl:template match="refsect3info|refsect3/info"></xsl:template>
-
-<!-- ==================================================================== -->
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/sections.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/sections.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,764 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:template match="section">
-  <xsl:choose>
-    <xsl:when test="$rootid = @id or $rootid = @xml:id">
-      <xsl:call-template name="section.page.sequence"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:variable name="id">
-        <xsl:call-template name="object.id"/>
-      </xsl:variable>
-
-      <xsl:variable name="renderas">
-        <xsl:choose>
-          <xsl:when test="@renderas = 'sect1'">1</xsl:when>
-          <xsl:when test="@renderas = 'sect2'">2</xsl:when>
-          <xsl:when test="@renderas = 'sect3'">3</xsl:when>
-          <xsl:when test="@renderas = 'sect4'">4</xsl:when>
-          <xsl:when test="@renderas = 'sect5'">5</xsl:when>
-          <xsl:otherwise><xsl:value-of select="''"/></xsl:otherwise>
-        </xsl:choose>
-      </xsl:variable>
-
-      <xsl:variable name="level">
-        <xsl:choose>
-          <xsl:when test="$renderas != ''">
-            <xsl:value-of select="$renderas"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:call-template name="section.level"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:variable>
-
-      <!-- xsl:use-attribute-sets takes only a Qname, not a variable -->
-      <xsl:choose>
-        <xsl:when test="$level = 1">
-          <xsl:element name="fo:{$section.container.element}"
-		       use-attribute-sets="section.level1.properties">
-            <xsl:attribute name="id"><xsl:value-of 
-                                select="$id"/></xsl:attribute>
-            <xsl:call-template name="section.content"/>
-          </xsl:element>
-        </xsl:when>
-        <xsl:when test="$level = 2">
-          <xsl:element name="fo:{$section.container.element}"
-		       use-attribute-sets="section.level2.properties">
-            <xsl:attribute name="id"><xsl:value-of 
-                                select="$id"/></xsl:attribute>
-            <xsl:call-template name="section.content"/>
-          </xsl:element>
-        </xsl:when>
-        <xsl:when test="$level = 3">
-          <xsl:element name="fo:{$section.container.element}"
-                       use-attribute-sets="section.level3.properties">
-            <xsl:attribute name="id"><xsl:value-of 
-                                select="$id"/></xsl:attribute>
-            <xsl:call-template name="section.content"/>
-          </xsl:element>
-        </xsl:when>
-        <xsl:when test="$level = 4">
-          <xsl:element name="fo:{$section.container.element}"
-                       use-attribute-sets="section.level4.properties">
-            <xsl:attribute name="id"><xsl:value-of 
-                                select="$id"/></xsl:attribute>
-            <xsl:call-template name="section.content"/>
-          </xsl:element>
-        </xsl:when>
-        <xsl:when test="$level = 5">
-          <xsl:element name="fo:{$section.container.element}"
-		       use-attribute-sets="section.level5.properties">
-            <xsl:attribute name="id"><xsl:value-of 
-                                select="$id"/></xsl:attribute>
-            <xsl:call-template name="section.content"/>
-          </xsl:element>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:element name="fo:{$section.container.element}"
-		       use-attribute-sets="section.level6.properties">
-            <xsl:attribute name="id"><xsl:value-of 
-                                select="$id"/></xsl:attribute>
-            <xsl:call-template name="section.content"/>
-          </xsl:element>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="section.content">
-  <xsl:call-template name="section.titlepage"/>
-
-  <xsl:variable name="toc.params">
-    <xsl:call-template name="find.path.params">
-      <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:if test="contains($toc.params, 'toc')
-                and (count(ancestor::section)+1) &lt;= 
-		$generate.section.toc.level">
-    <xsl:call-template name="section.toc">
-      <xsl:with-param name="toc.title.p" 
-                      select="contains($toc.params, 'title')"/>
-    </xsl:call-template>
-   <xsl:call-template name="section.toc.separator"/>
-  </xsl:if>
-
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="/section" name="section.page.sequence">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="master-reference">
-    <xsl:call-template name="select.pagemaster"/>
-  </xsl:variable>
-
-  <fo:page-sequence hyphenate="{$hyphenate}"
-                    master-reference="{$master-reference}">
-    <xsl:attribute name="language">
-      <xsl:call-template name="l10n.language"/>
-    </xsl:attribute>
-    <xsl:attribute name="format">
-      <xsl:call-template name="page.number.format">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="initial-page-number">
-      <xsl:call-template name="initial.page.number">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="force-page-count">
-      <xsl:call-template name="force.page.count">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="hyphenation-character">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-character'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-push-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-remain-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:apply-templates select="." mode="running.head.mode">
-      <xsl:with-param name="master-reference" select="$master-reference"/>
-    </xsl:apply-templates>
-    <xsl:apply-templates select="." mode="running.foot.mode">
-      <xsl:with-param name="master-reference" select="$master-reference"/>
-    </xsl:apply-templates>
-
-    <fo:flow flow-name="xsl-region-body">
-      <xsl:call-template name="set.flow.properties">
-        <xsl:with-param name="element" select="local-name(.)"/>
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-
-      <fo:block id="{$id}" 
-            xsl:use-attribute-sets="section.level1.properties">
-        <xsl:call-template name="section.titlepage"/>
-      </fo:block>
-
-      <xsl:variable name="toc.params">
-        <xsl:call-template name="find.path.params">
-          <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <xsl:if test="contains($toc.params, 'toc')
-                    and (count(ancestor::section)+1) &lt;= 
-		    $generate.section.toc.level">
-        <xsl:call-template name="section.toc">
-          <xsl:with-param name="toc.title.p" 
-                          select="contains($toc.params, 'title')"/>
-        </xsl:call-template>
-        <xsl:call-template name="section.toc.separator"/>
-      </xsl:if>
-
-      <xsl:apply-templates/>
-   </fo:flow>
-  </fo:page-sequence>
-</xsl:template>
-
-<xsl:template match="section/title
-                     |simplesect/title
-                     |sect1/title
-                     |sect2/title
-                     |sect3/title
-                     |sect4/title
-                     |sect5/title
-                     |section/info/title
-                     |simplesect/info/title
-                     |sect1/info/title
-                     |sect2/info/title
-                     |sect3/info/title
-                     |sect4/info/title
-                     |sect5/info/title
-                     |section/sectioninfo/title
-                     |sect1/sect1info/title
-                     |sect2/sect2info/title
-                     |sect3/sect3info/title
-                     |sect4/sect4info/title
-                     |sect5/sect5info/title"
-              mode="titlepage.mode"
-              priority="2">
-
-  <xsl:variable name="section" 
-                select="(ancestor::section |
-                        ancestor::simplesect |
-                        ancestor::sect1 |
-                        ancestor::sect2 |
-                        ancestor::sect3 |
-                        ancestor::sect4 |
-                        ancestor::sect5)[position() = last()]"/>
-
-  <fo:block keep-with-next.within-column="always">
-    <xsl:variable name="id">
-      <xsl:call-template name="object.id">
-        <xsl:with-param name="object" select="$section"/>
-      </xsl:call-template>
-    </xsl:variable>
-
-    <xsl:variable name="renderas">
-      <xsl:choose>
-        <xsl:when test="$section/@renderas = 'sect1'">1</xsl:when>
-        <xsl:when test="$section/@renderas = 'sect2'">2</xsl:when>
-        <xsl:when test="$section/@renderas = 'sect3'">3</xsl:when>
-        <xsl:when test="$section/@renderas = 'sect4'">4</xsl:when>
-        <xsl:when test="$section/@renderas = 'sect5'">5</xsl:when>
-        <xsl:otherwise><xsl:value-of select="''"/></xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-  
-    <xsl:variable name="level">
-      <xsl:choose>
-        <xsl:when test="$renderas != ''">
-          <xsl:value-of select="$renderas"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="section.level">
-            <xsl:with-param name="node" select="$section"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-
-    <xsl:variable name="marker">
-      <xsl:choose>
-        <xsl:when test="$level &lt;= $marker.section.level">1</xsl:when>
-        <xsl:otherwise>0</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-
-    <xsl:variable name="title">
-      <xsl:apply-templates select="$section" mode="object.title.markup">
-        <xsl:with-param name="allow-anchors" select="1"/>
-      </xsl:apply-templates>
-    </xsl:variable>
-
-    <xsl:variable name="marker.title">
-      <xsl:apply-templates select="$section" mode="titleabbrev.markup">
-        <xsl:with-param name="allow-anchors" select="0"/>
-      </xsl:apply-templates>
-    </xsl:variable>
-
-    <xsl:if test="$passivetex.extensions != 0">
-      <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex" 
-                      fotex-bookmark-level="{$level + 2}" 
-                      fotex-bookmark-label="{$id}">
-        <xsl:value-of select="$marker.title"/>
-      </fotex:bookmark>
-    </xsl:if>
-
-    <xsl:if test="$axf.extensions != 0">
-      <xsl:attribute name="axf:outline-level">
-        <xsl:value-of select="count(ancestor::*)-1"/>
-      </xsl:attribute>
-      <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
-      <xsl:attribute name="axf:outline-title">
-        <xsl:value-of select="normalize-space($title)"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:call-template name="section.heading">
-      <xsl:with-param name="level" select="$level"/>
-      <xsl:with-param name="title" select="$title"/>
-      <xsl:with-param name="marker" select="$marker"/>
-      <xsl:with-param name="marker.title" select="$marker.title"/>
-    </xsl:call-template>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="sect1">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:element name="fo:{$section.container.element}"
-               use-attribute-sets="section.level1.properties">
-    <xsl:attribute name="id"><xsl:value-of 
-                        select="$id"/></xsl:attribute>
-    <xsl:call-template name="sect1.titlepage"/>
-
-    <xsl:variable name="toc.params">
-      <xsl:call-template name="find.path.params">
-        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-      </xsl:call-template>
-    </xsl:variable>
-
-    <xsl:if test="contains($toc.params, 'toc')
-                  and $generate.section.toc.level &gt;= 1">
-      <xsl:call-template name="section.toc">
-        <xsl:with-param name="toc.title.p" 
-                        select="contains($toc.params, 'title')"/>
-      </xsl:call-template>
-      <xsl:call-template name="section.toc.separator"/>
-    </xsl:if>
-
-    <xsl:apply-templates/>
-  </xsl:element>
-</xsl:template>
-
-<xsl:template match="/sect1">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-  <xsl:variable name="master-reference">
-    <xsl:call-template name="select.pagemaster"/>
-  </xsl:variable>
-
-  <fo:page-sequence hyphenate="{$hyphenate}"
-                    master-reference="{$master-reference}">
-    <xsl:attribute name="language">
-      <xsl:call-template name="l10n.language"/>
-    </xsl:attribute>
-    <xsl:attribute name="format">
-      <xsl:call-template name="page.number.format">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="initial-page-number">
-      <xsl:call-template name="initial.page.number">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="force-page-count">
-      <xsl:call-template name="force.page.count">
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:attribute name="hyphenation-character">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-character'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-push-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenation-remain-character-count">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
-      </xsl:call-template>
-    </xsl:attribute>
-
-    <xsl:apply-templates select="." mode="running.head.mode">
-      <xsl:with-param name="master-reference" select="$master-reference"/>
-    </xsl:apply-templates>
-    <xsl:apply-templates select="." mode="running.foot.mode">
-      <xsl:with-param name="master-reference" select="$master-reference"/>
-    </xsl:apply-templates>
-
-    <fo:flow flow-name="xsl-region-body">
-      <xsl:call-template name="set.flow.properties">
-        <xsl:with-param name="element" select="local-name(.)"/>
-        <xsl:with-param name="master-reference" select="$master-reference"/>
-      </xsl:call-template>
-
-      <fo:block id="{$id}" 
-                xsl:use-attribute-sets="section.level1.properties">
-        <xsl:call-template name="sect1.titlepage"/>
-      </fo:block>
-
-      <xsl:variable name="toc.params">
-        <xsl:call-template name="find.path.params">
-          <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <xsl:if test="contains($toc.params, 'toc')
-                    and $generate.section.toc.level &gt;= 1">
-        <xsl:call-template name="section.toc">
-          <xsl:with-param name="toc.title.p" 
-                          select="contains($toc.params, 'title')"/>
-        </xsl:call-template>
-        <xsl:call-template name="section.toc.separator"/>
-      </xsl:if>
-
-      <xsl:apply-templates/>
-   </fo:flow>
-  </fo:page-sequence>
-</xsl:template>
-
-<xsl:template match="sect2">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:element name="fo:{$section.container.element}"
-	       use-attribute-sets="section.level2.properties">
-    <xsl:attribute name="id"><xsl:value-of 
-                        select="$id"/></xsl:attribute>
-    <xsl:call-template name="sect2.titlepage"/>
-
-    <xsl:variable name="toc.params">
-      <xsl:call-template name="find.path.params">
-        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-      </xsl:call-template>
-    </xsl:variable>
-
-    <xsl:if test="contains($toc.params, 'toc')
-                   and $generate.section.toc.level &gt;= 2">
-      <xsl:call-template name="section.toc">
-        <xsl:with-param name="toc.title.p" 
-                        select="contains($toc.params, 'title')"/>
-      </xsl:call-template>
-      <xsl:call-template name="section.toc.separator"/>
-    </xsl:if>
-
-    <xsl:apply-templates/>
-  </xsl:element>
-</xsl:template>
-
-<xsl:template match="sect3">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:element name="fo:{$section.container.element}"
-	       use-attribute-sets="section.level3.properties">
-    <xsl:attribute name="id"><xsl:value-of 
-                        select="$id"/></xsl:attribute>
-    <xsl:call-template name="sect3.titlepage"/>
-
-    <xsl:variable name="toc.params">
-      <xsl:call-template name="find.path.params">
-        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-      </xsl:call-template>
-    </xsl:variable>
-
-    <xsl:if test="contains($toc.params, 'toc')
-                  and $generate.section.toc.level &gt;= 3">
-      <xsl:call-template name="section.toc">
-        <xsl:with-param name="toc.title.p" 
-                        select="contains($toc.params, 'title')"/>
-      </xsl:call-template>
-      <xsl:call-template name="section.toc.separator"/>
-    </xsl:if>
-
-    <xsl:apply-templates/>
-  </xsl:element>
-</xsl:template>
-
-<xsl:template match="sect4">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:element name="fo:{$section.container.element}"
-	       use-attribute-sets="section.level4.properties">
-    <xsl:attribute name="id"><xsl:value-of 
-                        select="$id"/></xsl:attribute>
-    <xsl:call-template name="sect4.titlepage"/>
-
-    <xsl:variable name="toc.params">
-      <xsl:call-template name="find.path.params">
-        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-      </xsl:call-template>
-    </xsl:variable>
-
-    <xsl:if test="contains($toc.params, 'toc')
-                  and $generate.section.toc.level &gt;= 4">
-      <xsl:call-template name="section.toc">
-        <xsl:with-param name="toc.title.p" 
-                        select="contains($toc.params, 'title')"/>
-      </xsl:call-template>
-      <xsl:call-template name="section.toc.separator"/>
-    </xsl:if>
-
-    <xsl:apply-templates/>
-  </xsl:element>
-</xsl:template>
-
-<xsl:template match="sect5">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:element name="fo:{$section.container.element}"
-	       use-attribute-sets="section.level5.properties">
-    <xsl:attribute name="id"><xsl:value-of 
-                        select="$id"/></xsl:attribute>
-    <xsl:call-template name="sect5.titlepage"/>
-
-    <xsl:variable name="toc.params">
-      <xsl:call-template name="find.path.params">
-        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-      </xsl:call-template>
-    </xsl:variable>
-
-    <xsl:if test="contains($toc.params, 'toc')
-                  and $generate.section.toc.level &gt;= 5">
-      <xsl:call-template name="section.toc">
-        <xsl:with-param name="toc.title.p" 
-                        select="contains($toc.params, 'title')"/>
-      </xsl:call-template>
-      <xsl:call-template name="section.toc.separator"/>
-    </xsl:if>
-
-    <xsl:apply-templates/>
-  </xsl:element>
-</xsl:template>
-
-<xsl:template match="simplesect">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:element name="fo:{$section.container.element}">
-    <xsl:attribute name="id"><xsl:value-of 
-                        select="$id"/></xsl:attribute>
-    <xsl:call-template name="simplesect.titlepage"/>
-    <xsl:apply-templates/>
-  </xsl:element>
-</xsl:template>
-
-<xsl:template match="sectioninfo"></xsl:template>
-<xsl:template match="section/info"></xsl:template>
-<xsl:template match="section/title"></xsl:template>
-<xsl:template match="section/titleabbrev"></xsl:template>
-<xsl:template match="section/subtitle"></xsl:template>
-
-<xsl:template match="sect1info"></xsl:template>
-<xsl:template match="sect1/info"></xsl:template>
-<xsl:template match="sect1/title"></xsl:template>
-<xsl:template match="sect1/titleabbrev"></xsl:template>
-<xsl:template match="sect1/subtitle"></xsl:template>
-
-<xsl:template match="sect2info"></xsl:template>
-<xsl:template match="sect2/info"></xsl:template>
-<xsl:template match="sect2/title"></xsl:template>
-<xsl:template match="sect2/titleabbrev"></xsl:template>
-<xsl:template match="sect2/subtitle"></xsl:template>
-
-<xsl:template match="sect3info"></xsl:template>
-<xsl:template match="sect3/info"></xsl:template>
-<xsl:template match="sect3/title"></xsl:template>
-<xsl:template match="sect3/titleabbrev"></xsl:template>
-<xsl:template match="sect3/subtitle"></xsl:template>
-
-<xsl:template match="sect4info"></xsl:template>
-<xsl:template match="sect4/info"></xsl:template>
-<xsl:template match="sect4/title"></xsl:template>
-<xsl:template match="sect4/titleabbrev"></xsl:template>
-<xsl:template match="sect4/subtitle"></xsl:template>
-
-<xsl:template match="sect5info"></xsl:template>
-<xsl:template match="sect5/info"></xsl:template>
-<xsl:template match="sect5/title"></xsl:template>
-<xsl:template match="sect5/titleabbrev"></xsl:template>
-<xsl:template match="sect5/subtitle"></xsl:template>
-
-<xsl:template match="simplesect/info"></xsl:template>
-<xsl:template match="simplesect/title"></xsl:template>
-<xsl:template match="simplesect/titleabbrev"></xsl:template>
-<xsl:template match="simplesect/subtitle"></xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="section.heading">
-  <xsl:param name="level" select="1"/>
-  <xsl:param name="marker" select="1"/>
-  <xsl:param name="title"/>
-  <xsl:param name="marker.title"/>
-
-  <fo:block xsl:use-attribute-sets="section.title.properties">
-    <xsl:if test="$marker != 0">
-      <fo:marker marker-class-name="section.head.marker">
-        <xsl:copy-of select="$marker.title"/>
-      </fo:marker>
-    </xsl:if>
-
-    <xsl:choose>
-      <xsl:when test="$level=1">
-        <fo:block xsl:use-attribute-sets="section.title.level1.properties">
-          <xsl:copy-of select="$title"/>
-        </fo:block>
-      </xsl:when>
-      <xsl:when test="$level=2">
-        <fo:block xsl:use-attribute-sets="section.title.level2.properties">
-          <xsl:copy-of select="$title"/>
-        </fo:block>
-      </xsl:when>
-      <xsl:when test="$level=3">
-        <fo:block xsl:use-attribute-sets="section.title.level3.properties">
-          <xsl:copy-of select="$title"/>
-        </fo:block>
-      </xsl:when>
-      <xsl:when test="$level=4">
-        <fo:block xsl:use-attribute-sets="section.title.level4.properties">
-          <xsl:copy-of select="$title"/>
-        </fo:block>
-      </xsl:when>
-      <xsl:when test="$level=5">
-        <fo:block xsl:use-attribute-sets="section.title.level5.properties">
-          <xsl:copy-of select="$title"/>
-        </fo:block>
-      </xsl:when>
-      <xsl:otherwise>
-        <fo:block xsl:use-attribute-sets="section.title.level6.properties">
-          <xsl:copy-of select="$title"/>
-        </fo:block>
-      </xsl:otherwise>
-    </xsl:choose>
-  </fo:block>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="bridgehead">
-  <xsl:variable name="container"
-                select="(ancestor::appendix
-                        |ancestor::article
-                        |ancestor::bibliography
-                        |ancestor::chapter
-                        |ancestor::glossary
-                        |ancestor::glossdiv
-                        |ancestor::index
-                        |ancestor::partintro
-                        |ancestor::preface
-                        |ancestor::refsect1
-                        |ancestor::refsect2
-                        |ancestor::refsect3
-                        |ancestor::sect1
-                        |ancestor::sect2
-                        |ancestor::sect3
-                        |ancestor::sect4
-                        |ancestor::sect5
-                        |ancestor::section
-                        |ancestor::setindex
-                        |ancestor::simplesect)[last()]"/>
-
-  <xsl:variable name="clevel">
-    <xsl:choose>
-      <xsl:when test="local-name($container) = 'appendix'
-                      or local-name($container) = 'chapter'
-                      or local-name($container) = 'article'
-                      or local-name($container) = 'bibliography'
-                      or local-name($container) = 'glossary'
-                      or local-name($container) = 'index'
-                      or local-name($container) = 'partintro'
-                      or local-name($container) = 'preface'
-                      or local-name($container) = 'setindex'">2</xsl:when>
-      <xsl:when test="local-name($container) = 'glossdiv'">
-        <xsl:value-of select="count(ancestor::glossdiv)+2"/>
-      </xsl:when>
-      <xsl:when test="local-name($container) = 'sect1'
-                      or local-name($container) = 'sect2'
-                      or local-name($container) = 'sect3'
-                      or local-name($container) = 'sect4'
-                      or local-name($container) = 'sect5'
-                      or local-name($container) = 'refsect1'
-                      or local-name($container) = 'refsect2'
-                      or local-name($container) = 'refsect3'
-                      or local-name($container) = 'section'
-                      or local-name($container) = 'simplesect'">
-        <xsl:variable name="slevel">
-          <xsl:call-template name="section.level">
-            <xsl:with-param name="node" select="$container"/>
-          </xsl:call-template>
-        </xsl:variable>
-        <xsl:value-of select="$slevel + 1"/>
-      </xsl:when>
-      <xsl:otherwise>2</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="level">
-    <xsl:choose>
-      <xsl:when test="@renderas = 'sect1'">1</xsl:when>
-      <xsl:when test="@renderas = 'sect2'">2</xsl:when>
-      <xsl:when test="@renderas = 'sect3'">3</xsl:when>
-      <xsl:when test="@renderas = 'sect4'">4</xsl:when>
-      <xsl:when test="@renderas = 'sect5'">5</xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$clevel"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="marker">
-    <xsl:choose>
-      <xsl:when test="$level &lt;= $marker.section.level">1</xsl:when>
-      <xsl:otherwise>0</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="marker.title">
-    <xsl:apply-templates/>
-  </xsl:variable>
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <fo:block id="{$id}">
-    <xsl:call-template name="section.heading">
-      <xsl:with-param name="level" select="$level"/>
-      <xsl:with-param name="title">
-        <xsl:apply-templates/>
-      </xsl:with-param>
-      <xsl:with-param name="marker" select="$marker"/>
-      <xsl:with-param name="marker.title" select="$marker.title"/>
-    </xsl:call-template>
-  </fo:block>
-</xsl:template>
-
-</xsl:stylesheet>
-
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/spaces.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/spaces.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,273 +1,0 @@
-<?xml version='1.0' encoding="utf-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-     XSL-FO specification treats all space characters like ordinary spaces.
-     We need to map them to fo:leader with different widths in order to
-     simulate desired behaviour.
-     ******************************************************************** -->
-
-<xsl:template match="text()[namespace-uri(..) = '']">
-  <xsl:choose>
-    <xsl:when test="$passivetex.extensions != 0">
-      <xsl:call-template name="passivetex.dash.subst">
-        <xsl:with-param name="string">
-	  <xsl:call-template name="space.2000.subst">
-	    <xsl:with-param name="string" select="."/>
-	  </xsl:call-template>
-	</xsl:with-param>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="space.2000.subst">
-	<xsl:with-param name="string" select="."/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:param name="space.enquad.width">0.5em</xsl:param>   <!-- U+2000 -->
-<xsl:param name="space.emquad.width">1em</xsl:param>     <!-- U+2001 -->
-<xsl:param name="space.enspace.width">0.5em</xsl:param>  <!-- U+2002 -->
-<xsl:param name="space.emspace.width">1em</xsl:param>    <!-- U+2003 -->
-<xsl:param name="space.3emspace.width">0.33em</xsl:param><!-- U+2004 -->
-<xsl:param name="space.4emspace.width">0.25em</xsl:param><!-- U+2005 -->
-<xsl:param name="space.6emspace.width">0.16em</xsl:param><!-- U+2006 -->
-<xsl:param name="space.figspace.width"></xsl:param>      <!-- U+2007 -->
-<xsl:param name="space.punctspace.width"></xsl:param>    <!-- U+2008 -->
-<xsl:param name="space.thinspace.width">0.2em</xsl:param><!-- U+2009 -->
-<xsl:param name="space.hairspace.width">0.1em</xsl:param><!-- U+200A -->
-
-<xsl:template name="space.2000.subst">
-  <xsl:param name="string"/>
-
-  <xsl:choose>
-    <xsl:when test="contains($string, '&#x2000;') and $space.enquad.width != ''">
-      <xsl:call-template name="space.2001.subst">
-	<xsl:with-param name="string" select="substring-before($string, '&#x2000;')"/>
-      </xsl:call-template>
-      <fo:leader leader-length="{$space.enquad.width}"/>
-      <xsl:call-template name="space.2000.subst">
-	<xsl:with-param name="string" select="substring-after($string, '&#x2000;')"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="space.2001.subst">
-	<xsl:with-param name="string" select="$string"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="space.2001.subst">
-  <xsl:param name="string"/>
-
-  <xsl:choose>
-    <xsl:when test="contains($string, '&#x2001;') and $space.emquad.width != ''">
-      <xsl:call-template name="space.2002.subst">
-	<xsl:with-param name="string" select="substring-before($string, '&#x2001;')"/>
-      </xsl:call-template>
-      <fo:leader leader-length="{$space.emquad.width}"/>
-      <xsl:call-template name="space.2001.subst">
-	<xsl:with-param name="string" select="substring-after($string, '&#x2001;')"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="space.2002.subst">
-	<xsl:with-param name="string" select="$string"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="space.2002.subst">
-  <xsl:param name="string"/>
-
-  <xsl:choose>
-    <xsl:when test="contains($string, '&#x2002;') and $space.enspace.width != ''">
-      <xsl:call-template name="space.2003.subst">
-	<xsl:with-param name="string" select="substring-before($string, '&#x2002;')"/>
-      </xsl:call-template>
-      <fo:leader leader-length="{$space.enspace.width}"/>
-      <xsl:call-template name="space.2002.subst">
-	<xsl:with-param name="string" select="substring-after($string, '&#x2002;')"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="space.2003.subst">
-	<xsl:with-param name="string" select="$string"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="space.2003.subst">
-  <xsl:param name="string"/>
-
-  <xsl:choose>
-    <xsl:when test="contains($string, '&#x2003;') and $space.emspace.width != ''">
-      <xsl:call-template name="space.2004.subst">
-	<xsl:with-param name="string" select="substring-before($string, '&#x2003;')"/>
-      </xsl:call-template>
-      <fo:leader leader-length="{$space.emspace.width}"/>
-      <xsl:call-template name="space.2003.subst">
-	<xsl:with-param name="string" select="substring-after($string, '&#x2003;')"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="space.2004.subst">
-	<xsl:with-param name="string" select="$string"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="space.2004.subst">
-  <xsl:param name="string"/>
-
-  <xsl:choose>
-    <xsl:when test="contains($string, '&#x2004;') and $space.3emspace.width != ''">
-      <xsl:call-template name="space.2005.subst">
-	<xsl:with-param name="string" select="substring-before($string, '&#x2004;')"/>
-      </xsl:call-template>
-      <fo:leader leader-length="{$space.3emspace.width}"/>
-      <xsl:call-template name="space.2004.subst">
-	<xsl:with-param name="string" select="substring-after($string, '&#x2004;')"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="space.2005.subst">
-	<xsl:with-param name="string" select="$string"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="space.2005.subst">
-  <xsl:param name="string"/>
-
-  <xsl:choose>
-    <xsl:when test="contains($string, '&#x2005;') and $space.4emspace.width != ''">
-      <xsl:call-template name="space.2006.subst">
-	<xsl:with-param name="string" select="substring-before($string, '&#x2005;')"/>
-      </xsl:call-template>
-      <fo:leader leader-length="{$space.4emspace.width}"/>
-      <xsl:call-template name="space.2005.subst">
-	<xsl:with-param name="string" select="substring-after($string, '&#x2005;')"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="space.2006.subst">
-	<xsl:with-param name="string" select="$string"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="space.2006.subst">
-  <xsl:param name="string"/>
-
-  <xsl:choose>
-    <xsl:when test="contains($string, '&#x2006;') and $space.6emspace.width != ''">
-      <xsl:call-template name="space.2007.subst">
-	<xsl:with-param name="string" select="substring-before($string, '&#x2006;')"/>
-      </xsl:call-template>
-      <fo:leader leader-length="{$space.6emspace.width}"/>
-      <xsl:call-template name="space.2006.subst">
-	<xsl:with-param name="string" select="substring-after($string, '&#x2006;')"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="space.2007.subst">
-	<xsl:with-param name="string" select="$string"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="space.2007.subst">
-  <xsl:param name="string"/>
-
-  <xsl:choose>
-    <xsl:when test="contains($string, '&#x2007;') and $space.figspace.width != ''">
-      <xsl:call-template name="space.2008.subst">
-	<xsl:with-param name="string" select="substring-before($string, '&#x2007;')"/>
-      </xsl:call-template>
-      <fo:leader leader-length="{$space.figspace.width}"/>
-      <xsl:call-template name="space.2007.subst">
-	<xsl:with-param name="string" select="substring-after($string, '&#x2007;')"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="space.2008.subst">
-	<xsl:with-param name="string" select="$string"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="space.2008.subst">
-  <xsl:param name="string"/>
-
-  <xsl:choose>
-    <xsl:when test="contains($string, '&#x2008;') and $space.punctspace.width != ''">
-      <xsl:call-template name="space.2009.subst">
-	<xsl:with-param name="string" select="substring-before($string, '&#x2008;')"/>
-      </xsl:call-template>
-      <fo:leader leader-length="{$space.punctspace.width}"/>
-      <xsl:call-template name="space.2008.subst">
-	<xsl:with-param name="string" select="substring-after($string, '&#x2008;')"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="space.2009.subst">
-	<xsl:with-param name="string" select="$string"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="space.2009.subst">
-  <xsl:param name="string"/>
-
-  <xsl:choose>
-    <xsl:when test="contains($string, '&#x2009;') and $space.thinspace.width != ''">
-      <xsl:call-template name="space.200A.subst">
-	<xsl:with-param name="string" select="substring-before($string, '&#x2009;')"/>
-      </xsl:call-template>
-      <fo:leader leader-length="{$space.thinspace.width}"/>
-      <xsl:call-template name="space.2009.subst">
-	<xsl:with-param name="string" select="substring-after($string, '&#x2009;')"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="space.200A.subst">
-	<xsl:with-param name="string" select="$string"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="space.200A.subst">
-  <xsl:param name="string"/>
-
-  <xsl:choose>
-    <xsl:when test="contains($string, '&#x200A;') and $space.hairspace.width != ''">
-      <xsl:value-of select="substring-before($string, '&#x200A;')"/>
-      <fo:leader leader-length="{$space.hairspace.width}"/>
-      <xsl:call-template name="space.200A.subst">
-	<xsl:with-param name="string" select="substring-after($string, '&#x200A;')"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$string"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet>
-
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/synop.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/synop.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,967 +1,0 @@
-<?xml version='1.0'?>
-<!DOCTYPE xsl:stylesheet [
-<!ENTITY RE "&#10;">
-<!ENTITY nbsp "&#160;">
-]>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<!-- synopsis is in verbatim -->
-
-<!-- ==================================================================== -->
-
-<xsl:template match="cmdsynopsis">
-  <fo:block xsl:use-attribute-sets="normal.para.spacing">
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="cmdsynopsis/command">
-  <xsl:call-template name="inline.monoseq"/>
-  <xsl:text> </xsl:text>
-</xsl:template>
-
-<xsl:template match="cmdsynopsis/command[1]" priority="2">
-  <xsl:call-template name="inline.monoseq"/>
-  <xsl:text> </xsl:text>
-</xsl:template>
-
-<xsl:template match="group|arg" name="group-or-arg">
-  <xsl:variable name="choice" select="@choice"/>
-  <xsl:variable name="rep" select="@rep"/>
-  <xsl:variable name="sepchar">
-    <xsl:choose>
-      <xsl:when test="ancestor-or-self::*/@sepchar">
-        <xsl:value-of select="ancestor-or-self::*/@sepchar"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:text> </xsl:text>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-  <xsl:if test="preceding-sibling::*">
-    <xsl:value-of select="$sepchar"/>
-  </xsl:if>
-  <xsl:choose>
-    <xsl:when test="$choice='plain'">
-      <xsl:value-of select="$arg.choice.plain.open.str"/>
-    </xsl:when>
-    <xsl:when test="$choice='req'">
-      <xsl:value-of select="$arg.choice.req.open.str"/>
-    </xsl:when>
-    <xsl:when test="$choice='opt'">
-      <xsl:value-of select="$arg.choice.opt.open.str"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$arg.choice.def.open.str"/>
-    </xsl:otherwise>
-  </xsl:choose>
-  <xsl:apply-templates/>
-  <xsl:choose>
-    <xsl:when test="$rep='repeat'">
-      <xsl:value-of select="$arg.rep.repeat.str"/>
-    </xsl:when>
-    <xsl:when test="$rep='norepeat'">
-      <xsl:value-of select="$arg.rep.norepeat.str"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$arg.rep.def.str"/>
-    </xsl:otherwise>
-  </xsl:choose>
-  <xsl:choose>
-    <xsl:when test="$choice='plain'">
-      <xsl:value-of select="$arg.choice.plain.close.str"/>
-    </xsl:when>
-    <xsl:when test="$choice='req'">
-      <xsl:value-of select="$arg.choice.req.close.str"/>
-    </xsl:when>
-    <xsl:when test="$choice='opt'">
-      <xsl:value-of select="$arg.choice.opt.close.str"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$arg.choice.def.close.str"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="group/arg">
-  <xsl:variable name="choice" select="@choice"/>
-  <xsl:variable name="rep" select="@rep"/>
-  <xsl:if test="preceding-sibling::*">
-    <xsl:value-of select="$arg.or.sep"/>
-  </xsl:if>
-  <xsl:call-template name="group-or-arg"/>
-</xsl:template>
-
-<xsl:template match="sbr">
-  <fo:block/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="synopfragmentref">
-  <xsl:variable name="target" select="key('id',@linkend)"/>
-  <xsl:variable name="snum">
-    <xsl:apply-templates select="$target" mode="synopfragment.number"/>
-  </xsl:variable>
-  <fo:inline font-style="italic">
-    <fo:basic-link internal-destination="{@linkend}"
-                   xsl:use-attribute-sets="xref.properties">
-      <xsl:text>(</xsl:text>
-      <xsl:value-of select="$snum"/>
-      <xsl:text>)</xsl:text>
-    </fo:basic-link>
-    <xsl:text>&#160;</xsl:text>
-    <xsl:apply-templates/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="synopfragment" mode="synopfragment.number">
-  <xsl:number format="1"/>
-</xsl:template>
-
-<xsl:template match="synopfragment">
-  <xsl:variable name="snum">
-    <xsl:apply-templates select="." mode="synopfragment.number"/>
-  </xsl:variable>
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-  <fo:block id="{$id}">
-    <xsl:text>(</xsl:text>
-    <xsl:value-of select="$snum"/>
-    <xsl:text>)</xsl:text>
-    <xsl:text> </xsl:text>
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="funcsynopsis">
-  <xsl:call-template name="informal.object"/>
-</xsl:template>
-
-<xsl:template match="funcsynopsisinfo">
-  <fo:block space-after.minimum="0.8em"
-            space-after.optimum="1em"
-            space-after.maximum="1.2em">
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="funcprototype">
-  <fo:block font-family="{$monospace.font.family}"
-          space-before.minimum="0.8em"
-          space-before.optimum="1em"
-          space-before.maximum="1.2em">
-    <xsl:apply-templates/>
-    <xsl:if test="$funcsynopsis.style='kr'">
-      <fo:block
-          space-before.minimum="0.8em"
-          space-before.optimum="1em"
-          space-before.maximum="1.2em">
-      <xsl:apply-templates select="./paramdef" mode="kr-funcsynopsis-mode"/>
-      </fo:block>
-    </xsl:if>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="funcdef">
-  <fo:inline font-family="{$monospace.font.family}">
-    <xsl:apply-templates/>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template match="funcdef/function">
-  <xsl:choose>
-    <xsl:when test="$funcsynopsis.decoration != 0">
-      <fo:inline font-weight="bold">
-        <xsl:apply-templates/>
-      </fo:inline>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="void">
-  <xsl:choose>
-    <xsl:when test="$funcsynopsis.style='ansi'">
-      <xsl:text>(void);</xsl:text>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:text>();</xsl:text>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="varargs">
-  <xsl:text>(...);</xsl:text>
-</xsl:template>
-
-<xsl:template match="paramdef">
-  <xsl:variable name="paramnum">
-    <xsl:number count="paramdef" format="1"/>
-  </xsl:variable>
-  <xsl:if test="$paramnum=1">(</xsl:if>
-  <xsl:choose>
-    <xsl:when test="$funcsynopsis.style='ansi'">
-      <xsl:apply-templates/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates select="./parameter"/>
-    </xsl:otherwise>
-  </xsl:choose>
-  <xsl:choose>
-    <xsl:when test="following-sibling::paramdef">
-      <xsl:text>, </xsl:text>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:text>);</xsl:text>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="paramdef/parameter">
-  <xsl:choose>
-    <xsl:when test="$funcsynopsis.decoration != 0">
-      <xsl:call-template name="inline.italicseq"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates/>
-    </xsl:otherwise>
-  </xsl:choose>
-  <xsl:if test="following-sibling::parameter">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="paramdef" mode="kr-funcsynopsis-mode">
-  <fo:block>
-    <xsl:apply-templates/>
-    <xsl:text>;</xsl:text>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="funcparams">
-  <xsl:text>(</xsl:text>
-  <xsl:apply-templates/>
-  <xsl:text>)</xsl:text>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:variable name="default-classsynopsis-language">java</xsl:variable>
-
-<xsl:template match="classsynopsis
-                     |fieldsynopsis
-                     |methodsynopsis
-                     |constructorsynopsis
-                     |destructorsynopsis">
-  <xsl:param name="language">
-    <xsl:choose>
-      <xsl:when test="@language">
-	<xsl:value-of select="@language"/>
-      </xsl:when>
-      <xsl:otherwise>
-	<xsl:value-of select="$default-classsynopsis-language"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:param>
-
-  <!--
-  <xsl:message>process <xsl:value-of select="local-name(.)"/> in <xsl:value-of select="$language"/></xsl:message>
-  -->
-
-  <xsl:choose>
-    <xsl:when test="$language='java' or $language='Java'">
-      <xsl:apply-templates select="." mode="java"/>
-    </xsl:when>
-    <xsl:when test="$language='perl' or $language='Perl'">
-      <xsl:apply-templates select="." mode="perl"/>
-    </xsl:when>
-    <xsl:when test="$language='idl' or $language='IDL'">
-      <xsl:apply-templates select="." mode="idl"/>
-    </xsl:when>
-    <xsl:when test="$language='cpp' or $language='c++' or $language='C++'">
-      <xsl:apply-templates select="." mode="cpp"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:message>
-	<xsl:text>Unrecognized language on </xsl:text>
-        <xsl:value-of select="local-name(.)"/>
-        <xsl:text>: </xsl:text>
-	<xsl:value-of select="$language"/>
-      </xsl:message>
-      <xsl:apply-templates select=".">
-	<xsl:with-param name="language"
-	  select="$default-classsynopsis-language"/>
-      </xsl:apply-templates>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="synop-break">
-  <xsl:if test="parent::classsynopsis
-                or (following-sibling::fieldsynopsis
-                    |following-sibling::methodsynopsis
-                    |following-sibling::constructorsynopsis
-                    |following-sibling::destructorsynopsis)">
-    <fo:inline>&RE;</fo:inline>
-  </xsl:if>
-</xsl:template>
-
-<!-- ===== Java ======================================================== -->
-
-<xsl:template match="classsynopsis" mode="java">
-  <fo:block wrap-option='no-wrap'
-            white-space-collapse='false'
-            linefeed-treatment="preserve"
-            xsl:use-attribute-sets="monospace.verbatim.properties">
-    <xsl:apply-templates select="ooclass[1]" mode="java"/>
-    <xsl:if test="ooclass[preceding-sibling::*]">
-      <xsl:text> extends</xsl:text>
-      <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="java"/>
-      <xsl:if test="oointerface|ooexception">
-        <xsl:text>&RE;&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
-      </xsl:if>
-    </xsl:if>
-    <xsl:if test="oointerface">
-      <xsl:text>implements</xsl:text>
-      <xsl:apply-templates select="oointerface" mode="java"/>
-      <xsl:if test="ooexception">
-	<xsl:text>&RE;&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
-      </xsl:if>
-    </xsl:if>
-    <xsl:if test="ooexception">
-      <xsl:text>throws</xsl:text>
-      <xsl:apply-templates select="ooexception" mode="java"/>
-    </xsl:if>
-    <xsl:text>&nbsp;{&RE;</xsl:text>
-    <xsl:apply-templates select="constructorsynopsis
-                                 |destructorsynopsis
-                                 |fieldsynopsis
-                                 |methodsynopsis
-                                 |classsynopsisinfo" mode="java"/>
-    <xsl:text>}</xsl:text>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="classsynopsisinfo" mode="java">
-  <xsl:apply-templates mode="java"/>
-</xsl:template>
-
-<xsl:template match="ooclass|oointerface|ooexception" mode="java">
-  <xsl:choose>
-    <xsl:when test="preceding-sibling::*">
-      <xsl:text>, </xsl:text>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:text> </xsl:text>
-    </xsl:otherwise>
-  </xsl:choose>
-  <xsl:apply-templates mode="java"/>
-</xsl:template>
-
-<xsl:template match="modifier|package" mode="java">
-  <xsl:apply-templates mode="java"/>
-  <xsl:if test="following-sibling::*">
-    <xsl:text>&nbsp;</xsl:text>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="classname" mode="java">
-  <xsl:if test="local-name(preceding-sibling::*[1]) = 'classname'">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <xsl:apply-templates mode="java"/>
-</xsl:template>
-
-<xsl:template match="interfacename" mode="java">
-  <xsl:if test="local-name(preceding-sibling::*[1]) = 'interfacename'">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <xsl:apply-templates mode="java"/>
-</xsl:template>
-
-<xsl:template match="exceptionname" mode="java">
-  <xsl:if test="local-name(preceding-sibling::*[1]) = 'exceptionname'">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <xsl:apply-templates mode="java"/>
-</xsl:template>
-
-<xsl:template match="fieldsynopsis" mode="java">
-  <fo:block wrap-option='no-wrap'
-            white-space-collapse='false'
-            linefeed-treatment="preserve"
-            xsl:use-attribute-sets="monospace.verbatim.properties">
-    <xsl:text>&nbsp;&nbsp;</xsl:text>
-    <xsl:apply-templates mode="java"/>
-    <xsl:text>;</xsl:text>
-    <xsl:call-template name="synop-break"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="type" mode="java">
-  <xsl:apply-templates mode="java"/>
-  <xsl:text>&nbsp;</xsl:text>
-</xsl:template>
-
-<xsl:template match="varname" mode="java">
-  <xsl:apply-templates mode="java"/>
-  <xsl:text>&nbsp;</xsl:text>
-</xsl:template>
-
-<xsl:template match="initializer" mode="java">
-  <xsl:text>=&nbsp;</xsl:text>
-  <xsl:apply-templates mode="java"/>
-</xsl:template>
-
-<xsl:template match="void" mode="java">
-  <xsl:text>void&nbsp;</xsl:text>
-</xsl:template>
-
-<xsl:template match="methodname" mode="java">
-  <xsl:apply-templates mode="java"/>
-</xsl:template>
-
-<xsl:template match="methodparam" mode="java">
-  <xsl:param name="indent">0</xsl:param>
-  <xsl:if test="preceding-sibling::methodparam">
-    <xsl:text>,&RE;</xsl:text>
-    <xsl:if test="$indent &gt; 0">
-      <xsl:call-template name="copy-string">
-	<xsl:with-param name="string">&nbsp;</xsl:with-param>
-	<xsl:with-param name="count" select="$indent + 1"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:if>
-  <xsl:apply-templates mode="java"/>
-</xsl:template>
-
-<xsl:template match="parameter" mode="java">
-  <xsl:apply-templates mode="java"/>
-</xsl:template>
-
-<xsl:template mode="java"
-  match="constructorsynopsis|destructorsynopsis|methodsynopsis">
-  <xsl:variable name="start-modifiers" select="modifier[following-sibling::*[local-name(.) != 'modifier']]"/>
-  <xsl:variable name="notmod" select="*[local-name(.) != 'modifier']"/>
-  <xsl:variable name="end-modifiers" select="modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/>
-  <xsl:variable name="decl">
-    <xsl:text>  </xsl:text>
-    <xsl:apply-templates select="$start-modifiers" mode="java"/>
-
-    <!-- type -->
-    <xsl:if test="local-name($notmod[1]) != 'methodname'">
-      <xsl:apply-templates select="$notmod[1]" mode="java"/>
-    </xsl:if>
-
-    <xsl:apply-templates select="methodname" mode="java"/>
-  </xsl:variable>
-
-  <fo:block wrap-option='no-wrap'
-            white-space-collapse='false'
-            linefeed-treatment="preserve"
-            xsl:use-attribute-sets="monospace.verbatim.properties">
-    <xsl:copy-of select="$decl"/>
-    <xsl:text>(</xsl:text>
-    <xsl:apply-templates select="methodparam" mode="java">
-      <xsl:with-param name="indent" select="string-length($decl)"/>
-    </xsl:apply-templates>
-    <xsl:text>)</xsl:text>
-    <xsl:if test="exceptionname">
-      <xsl:text>&RE;&nbsp;&nbsp;&nbsp;&nbsp;throws&nbsp;</xsl:text>
-      <xsl:apply-templates select="exceptionname" mode="java"/>
-    </xsl:if>
-    <xsl:if test="modifier[preceding-sibling::*[local-name(.) != 'modifier']]">
-      <xsl:text> </xsl:text>
-      <xsl:apply-templates select="$end-modifiers" mode="java"/>
-    </xsl:if>
-    <xsl:text>;</xsl:text>
-  </fo:block>
-  <xsl:call-template name="synop-break"/>
-</xsl:template>
-
-<!-- ===== C++ ========================================================= -->
-
-<xsl:template match="classsynopsis" mode="cpp">
-  <fo:block wrap-option='no-wrap'
-            white-space-collapse='false'
-            linefeed-treatment="preserve"
-            xsl:use-attribute-sets="monospace.verbatim.properties">
-    <xsl:apply-templates select="ooclass[1]" mode="cpp"/>
-    <xsl:if test="ooclass[preceding-sibling::*]">
-      <xsl:text>: </xsl:text>
-      <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="cpp"/>
-      <xsl:if test="oointerface|ooexception">
-	<xsl:text>&RE;&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
-      </xsl:if>
-    </xsl:if>
-    <xsl:if test="oointerface">
-      <xsl:text> implements</xsl:text>
-      <xsl:apply-templates select="oointerface" mode="cpp"/>
-      <xsl:if test="ooexception">
-	<xsl:text>&RE;&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
-      </xsl:if>
-    </xsl:if>
-    <xsl:if test="ooexception">
-      <xsl:text> throws</xsl:text>
-      <xsl:apply-templates select="ooexception" mode="cpp"/>
-    </xsl:if>
-    <xsl:text>&nbsp;{&RE;</xsl:text>
-    <xsl:apply-templates select="constructorsynopsis
-                                 |destructorsynopsis
-                                 |fieldsynopsis
-                                 |methodsynopsis
-                                 |classsynopsisinfo" mode="cpp"/>
-    <xsl:text>}</xsl:text>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="classsynopsisinfo" mode="cpp">
-  <xsl:apply-templates mode="cpp"/>
-</xsl:template>
-
-<xsl:template match="ooclass|oointerface|ooexception" mode="cpp">
-  <xsl:if test="preceding-sibling::*">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <xsl:apply-templates mode="cpp"/>
-</xsl:template>
-
-<xsl:template match="modifier|package" mode="cpp">
-  <xsl:apply-templates mode="cpp"/>
-    <xsl:if test="following-sibling::*">
-      <xsl:text>&nbsp;</xsl:text>
-    </xsl:if>
-</xsl:template>
-
-<xsl:template match="classname" mode="cpp">
-  <xsl:if test="local-name(preceding-sibling::*[1]) = 'classname'">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <xsl:apply-templates mode="cpp"/>
-</xsl:template>
-
-<xsl:template match="interfacename" mode="cpp">
-  <xsl:if test="local-name(preceding-sibling::*[1]) = 'interfacename'">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <xsl:apply-templates mode="cpp"/>
-</xsl:template>
-
-<xsl:template match="exceptionname" mode="cpp">
-  <xsl:if test="local-name(preceding-sibling::*[1]) = 'exceptionname'">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <xsl:apply-templates mode="cpp"/>
-</xsl:template>
-
-<xsl:template match="fieldsynopsis" mode="cpp">
-  <fo:block wrap-option='no-wrap'
-            white-space-collapse='false'
-            linefeed-treatment="preserve"
-            xsl:use-attribute-sets="monospace.verbatim.properties">
-    <xsl:text>&nbsp;&nbsp;</xsl:text>
-    <xsl:apply-templates mode="cpp"/>
-    <xsl:text>;</xsl:text>
-  </fo:block>
-  <xsl:call-template name="synop-break"/>
-</xsl:template>
-
-<xsl:template match="type" mode="cpp">
-  <xsl:apply-templates mode="cpp"/>
-  <xsl:text>&nbsp;</xsl:text>
-</xsl:template>
-
-<xsl:template match="varname" mode="cpp">
-  <xsl:apply-templates mode="cpp"/>
-  <xsl:text>&nbsp;</xsl:text>
-</xsl:template>
-
-<xsl:template match="initializer" mode="cpp">
-  <xsl:text>=&nbsp;</xsl:text>
-  <xsl:apply-templates mode="cpp"/>
-</xsl:template>
-
-<xsl:template match="void" mode="cpp">
-  <xsl:text>void&nbsp;</xsl:text>
-</xsl:template>
-
-<xsl:template match="methodname" mode="cpp">
-  <xsl:apply-templates mode="cpp"/>
-</xsl:template>
-
-<xsl:template match="methodparam" mode="cpp">
-  <xsl:if test="preceding-sibling::methodparam">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <xsl:apply-templates mode="cpp"/>
-</xsl:template>
-
-<xsl:template match="parameter" mode="cpp">
-  <xsl:apply-templates mode="cpp"/>
-</xsl:template>
-
-<xsl:template mode="cpp"
-  match="constructorsynopsis|destructorsynopsis|methodsynopsis">
-  <xsl:variable name="start-modifiers" select="modifier[following-sibling::*[local-name(.) != 'modifier']]"/>
-  <xsl:variable name="notmod" select="*[local-name(.) != 'modifier']"/>
-  <xsl:variable name="end-modifiers" select="modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/>
-
-  <fo:block wrap-option='no-wrap'
-            white-space-collapse='false'
-            linefeed-treatment="preserve"
-            xsl:use-attribute-sets="monospace.verbatim.properties">
-    <xsl:text>  </xsl:text>
-    <xsl:apply-templates select="$start-modifiers" mode="cpp"/>
-
-    <!-- type -->
-    <xsl:if test="local-name($notmod[1]) != 'methodname'">
-      <xsl:apply-templates select="$notmod[1]" mode="cpp"/>
-    </xsl:if>
-
-    <xsl:apply-templates select="methodname" mode="cpp"/>
-    <xsl:text>(</xsl:text>
-    <xsl:apply-templates select="methodparam" mode="cpp"/>
-    <xsl:text>)</xsl:text>
-    <xsl:if test="exceptionname">
-      <xsl:text>&RE;&nbsp;&nbsp;&nbsp;&nbsp;throws&nbsp;</xsl:text>
-      <xsl:apply-templates select="exceptionname" mode="cpp"/>
-    </xsl:if>
-    <xsl:if test="modifier[preceding-sibling::*[local-name(.) != 'modifier']]">
-      <xsl:text> </xsl:text>
-      <xsl:apply-templates select="$end-modifiers" mode="cpp"/>
-    </xsl:if>
-    <xsl:text>;</xsl:text>
-  </fo:block>
-  <xsl:call-template name="synop-break"/>
-</xsl:template>
-
-<!-- ===== IDL ========================================================= -->
-
-<xsl:template match="classsynopsis" mode="idl">
-  <fo:block wrap-option='no-wrap'
-            white-space-collapse='false'
-            linefeed-treatment="preserve"
-            xsl:use-attribute-sets="monospace.verbatim.properties">
-    <xsl:text>interface </xsl:text>
-    <xsl:apply-templates select="ooclass[1]" mode="idl"/>
-    <xsl:if test="ooclass[preceding-sibling::*]">
-      <xsl:text>: </xsl:text>
-      <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="idl"/>
-      <xsl:if test="oointerface|ooexception">
-	<xsl:text>&RE;&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
-      </xsl:if>
-    </xsl:if>
-    <xsl:if test="oointerface">
-      <xsl:text> implements</xsl:text>
-      <xsl:apply-templates select="oointerface" mode="idl"/>
-      <xsl:if test="ooexception">
-	<xsl:text>&RE;&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
-      </xsl:if>
-    </xsl:if>
-    <xsl:if test="ooexception">
-      <xsl:text> throws</xsl:text>
-      <xsl:apply-templates select="ooexception" mode="idl"/>
-    </xsl:if>
-    <xsl:text>&nbsp;{&RE;</xsl:text>
-    <xsl:apply-templates select="constructorsynopsis
-                                 |destructorsynopsis
-                                 |fieldsynopsis
-                                 |methodsynopsis
-                                 |classsynopsisinfo" mode="idl"/>
-    <xsl:text>}</xsl:text>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="classsynopsisinfo" mode="idl">
-  <xsl:apply-templates mode="idl"/>
-</xsl:template>
-
-<xsl:template match="ooclass|oointerface|ooexception" mode="idl">
-  <xsl:if test="preceding-sibling::*">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <xsl:apply-templates mode="idl"/>
-</xsl:template>
-
-<xsl:template match="modifier|package" mode="idl">
-  <xsl:apply-templates mode="idl"/>
-    <xsl:if test="following-sibling::*">
-      <xsl:text>&nbsp;</xsl:text>
-    </xsl:if>
-</xsl:template>
-
-<xsl:template match="classname" mode="idl">
-  <xsl:if test="local-name(preceding-sibling::*[1]) = 'classname'">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <xsl:apply-templates mode="idl"/>
-</xsl:template>
-
-<xsl:template match="interfacename" mode="idl">
-  <xsl:if test="local-name(preceding-sibling::*[1]) = 'interfacename'">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <xsl:apply-templates mode="idl"/>
-</xsl:template>
-
-<xsl:template match="exceptionname" mode="idl">
-  <xsl:if test="local-name(preceding-sibling::*[1]) = 'exceptionname'">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <xsl:apply-templates mode="idl"/>
-</xsl:template>
-
-<xsl:template match="fieldsynopsis" mode="idl">
-  <fo:block wrap-option='no-wrap'
-            white-space-collapse='false'
-            linefeed-treatment="preserve"
-            xsl:use-attribute-sets="monospace.verbatim.properties">
-    <xsl:text>&nbsp;&nbsp;</xsl:text>
-    <xsl:apply-templates mode="idl"/>
-    <xsl:text>;</xsl:text>
-  </fo:block>
-  <xsl:call-template name="synop-break"/>
-</xsl:template>
-
-<xsl:template match="type" mode="idl">
-  <xsl:apply-templates mode="idl"/>
-  <xsl:text>&nbsp;</xsl:text>
-</xsl:template>
-
-<xsl:template match="varname" mode="idl">
-  <xsl:apply-templates mode="idl"/>
-  <xsl:text>&nbsp;</xsl:text>
-</xsl:template>
-
-<xsl:template match="initializer" mode="idl">
-  <xsl:text>=&nbsp;</xsl:text>
-  <xsl:apply-templates mode="idl"/>
-</xsl:template>
-
-<xsl:template match="void" mode="idl">
-  <xsl:text>void&nbsp;</xsl:text>
-</xsl:template>
-
-<xsl:template match="methodname" mode="idl">
-  <xsl:apply-templates mode="idl"/>
-</xsl:template>
-
-<xsl:template match="methodparam" mode="idl">
-  <xsl:if test="preceding-sibling::methodparam">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <xsl:apply-templates mode="idl"/>
-</xsl:template>
-
-<xsl:template match="parameter" mode="idl">
-  <xsl:apply-templates mode="idl"/>
-</xsl:template>
-
-<xsl:template mode="idl"
-  match="constructorsynopsis|destructorsynopsis|methodsynopsis">
-  <xsl:variable name="start-modifiers" select="modifier[following-sibling::*[local-name(.) != 'modifier']]"/>
-  <xsl:variable name="notmod" select="*[local-name(.) != 'modifier']"/>
-  <xsl:variable name="end-modifiers" select="modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/>
-
-  <fo:block wrap-option='no-wrap'
-            white-space-collapse='false'
-            linefeed-treatment="preserve"
-            xsl:use-attribute-sets="monospace.verbatim.properties">
-    <xsl:text>  </xsl:text>
-    <xsl:apply-templates select="$start-modifiers" mode="idl"/>
-
-    <!-- type -->
-    <xsl:if test="local-name($notmod[1]) != 'methodname'">
-      <xsl:apply-templates select="$notmod[1]" mode="idl"/>
-    </xsl:if>
-
-    <xsl:apply-templates select="methodname" mode="idl"/>
-    <xsl:text>(</xsl:text>
-    <xsl:apply-templates select="methodparam" mode="idl"/>
-    <xsl:text>)</xsl:text>
-    <xsl:if test="exceptionname">
-      <xsl:text>&RE;&nbsp;&nbsp;&nbsp;&nbsp;raises(</xsl:text>
-      <xsl:apply-templates select="exceptionname" mode="idl"/>
-      <xsl:text>)</xsl:text>
-    </xsl:if>
-    <xsl:if test="modifier[preceding-sibling::*[local-name(.) != 'modifier']]">
-      <xsl:text> </xsl:text>
-      <xsl:apply-templates select="$end-modifiers" mode="idl"/>
-    </xsl:if>
-    <xsl:text>;</xsl:text>
-  </fo:block>
-  <xsl:call-template name="synop-break"/>
-</xsl:template>
-
-<!-- ===== Perl ======================================================== -->
-
-<xsl:template match="classsynopsis" mode="perl">
-  <fo:block wrap-option='no-wrap'
-            white-space-collapse='false'
-            linefeed-treatment="preserve"
-            xsl:use-attribute-sets="monospace.verbatim.properties">
-    <xsl:text>package </xsl:text>
-    <xsl:apply-templates select="ooclass[1]" mode="perl"/>
-    <xsl:text>;&RE;</xsl:text>
-
-    <xsl:if test="ooclass[preceding-sibling::*]">
-      <xsl:text>@ISA = (</xsl:text>
-      <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="perl"/>
-      <xsl:text>);&RE;</xsl:text>
-    </xsl:if>
-
-    <xsl:apply-templates select="constructorsynopsis
-                                 |destructorsynopsis
-                                 |fieldsynopsis
-                                 |methodsynopsis
-                                 |classsynopsisinfo" mode="perl"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="classsynopsisinfo" mode="perl">
-  <xsl:apply-templates mode="perl"/>
-</xsl:template>
-
-<xsl:template match="ooclass|oointerface|ooexception" mode="perl">
-  <xsl:if test="preceding-sibling::*">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <xsl:apply-templates mode="perl"/>
-</xsl:template>
-
-<xsl:template match="modifier|package" mode="perl">
-  <xsl:apply-templates mode="perl"/>
-    <xsl:if test="following-sibling::*">
-      <xsl:text>&nbsp;</xsl:text>
-    </xsl:if>
-</xsl:template>
-
-<xsl:template match="classname" mode="perl">
-  <xsl:if test="local-name(preceding-sibling::*[1]) = 'classname'">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <xsl:apply-templates mode="perl"/>
-</xsl:template>
-
-<xsl:template match="interfacename" mode="perl">
-  <xsl:if test="local-name(preceding-sibling::*[1]) = 'interfacename'">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <xsl:apply-templates mode="perl"/>
-</xsl:template>
-
-<xsl:template match="exceptionname" mode="perl">
-  <xsl:if test="local-name(preceding-sibling::*[1]) = 'exceptionname'">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <xsl:apply-templates mode="perl"/>
-</xsl:template>
-
-<xsl:template match="fieldsynopsis" mode="perl">
-  <fo:block wrap-option='no-wrap'
-            white-space-collapse='false'
-            linefeed-treatment="preserve"
-            xsl:use-attribute-sets="monospace.verbatim.properties">
-    <xsl:text>&nbsp;&nbsp;</xsl:text>
-    <xsl:apply-templates mode="perl"/>
-    <xsl:text>;</xsl:text>
-  </fo:block>
-  <xsl:call-template name="synop-break"/>
-</xsl:template>
-
-<xsl:template match="type" mode="perl">
-  <xsl:apply-templates mode="perl"/>
-  <xsl:text>&nbsp;</xsl:text>
-</xsl:template>
-
-<xsl:template match="varname" mode="perl">
-  <xsl:apply-templates mode="perl"/>
-  <xsl:text>&nbsp;</xsl:text>
-</xsl:template>
-
-<xsl:template match="initializer" mode="perl">
-  <xsl:text>=&nbsp;</xsl:text>
-  <xsl:apply-templates mode="perl"/>
-</xsl:template>
-
-<xsl:template match="void" mode="perl">
-  <xsl:text>void&nbsp;</xsl:text>
-</xsl:template>
-
-<xsl:template match="methodname" mode="perl">
-  <xsl:apply-templates mode="perl"/>
-</xsl:template>
-
-<xsl:template match="methodparam" mode="perl">
-  <xsl:if test="preceding-sibling::methodparam">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <xsl:apply-templates mode="perl"/>
-</xsl:template>
-
-<xsl:template match="parameter" mode="perl">
-  <xsl:apply-templates mode="perl"/>
-</xsl:template>
-
-<xsl:template mode="perl"
-  match="constructorsynopsis|destructorsynopsis|methodsynopsis">
-  <xsl:variable name="start-modifiers" select="modifier[following-sibling::*[local-name(.) != 'modifier']]"/>
-  <xsl:variable name="notmod" select="*[local-name(.) != 'modifier']"/>
-  <xsl:variable name="end-modifiers" select="modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/>
-
-  <fo:block wrap-option='no-wrap'
-            white-space-collapse='false'
-            linefeed-treatment="preserve"
-            xsl:use-attribute-sets="monospace.verbatim.properties">
-    <xsl:text>sub </xsl:text>
-
-    <xsl:apply-templates select="methodname" mode="perl"/>
-    <xsl:text> { ... };</xsl:text>
-    <xsl:call-template name="synop-break"/>
-  </fo:block>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<!-- * DocBook 5 allows linking elements (link, olink, and xref) -->
-<!-- * within the OO *synopsis elements (classsynopsis, fieldsynopsis, -->
-<!-- * methodsynopsis, constructorsynopsis, destructorsynopsis) and -->
-<!-- * their children. So we need to have mode="java|cpp|idl|perl" -->
-<!-- * per-mode matches for those linking elements in order for them -->
-<!-- * to be processed as expected. -->
-
-<xsl:template match="link|olink|xref" mode="java">
-  <xsl:apply-templates select="."/>
-</xsl:template>
-
-<xsl:template match="link|olink|xref" mode="cpp">
-  <xsl:apply-templates select="."/>
-</xsl:template>
-
-<xsl:template match="link|olink|xref" mode="idl">
-  <xsl:apply-templates select="."/>
-</xsl:template>
-
-<xsl:template match="link|olink|xref" mode="perl">
-  <xsl:apply-templates select="."/>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/table.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/table.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,1535 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                xmlns:rx="http://www.renderx.com/XSL/Extensions"
-                xmlns:stbl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Table"
-                xmlns:xtbl="com.nwalsh.xalan.Table"
-                xmlns:lxslt="http://xml.apache.org/xslt"
-                xmlns:ptbl="http://nwalsh.com/xslt/ext/xsltproc/python/Table"
-                exclude-result-prefixes="doc stbl xtbl lxslt ptbl"
-                version='1.0'>
-
-<xsl:include href="../common/table.xsl"/>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<doc:reference xmlns="" xml:id="table-templates">
-  <?dbhtml dir="fo"?>
-  <info>
-    <title>Formatting Object Table Reference</title>
-    <releaseinfo role="meta">
-      $Id$
-    </releaseinfo>
-  </info>
-  <partintro xml:id="partintro">
-    <title>Introduction</title>
-    <para>This is technical reference documentation for the FO
-      table-processing templates in the DocBook XSL Stylesheets.</para>
-    <para>This is not intended to be user documentation.  It is
-      provided for developers writing customization layers for the
-      stylesheets.</para>
-  </partintro>
-</doc:reference>
-
-<!-- ==================================================================== -->
-
-<lxslt:component prefix="xtbl"
-                 functions="adjustColumnWidths"/>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="make.table.content">
-  <xsl:choose>
-    <xsl:when test="tgroup|mediaobject|graphic">
-      <xsl:call-template name="calsTable"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates select="." mode="htmlTable"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="calsTable">
-
-  <xsl:variable name="keep.together">
-    <xsl:call-template name="pi.dbfo_keep-together"/>
-  </xsl:variable>
-
-  <xsl:for-each select="tgroup">
-
-    <fo:table xsl:use-attribute-sets="table.table.properties">
-      <xsl:if test="$keep.together != ''">
-        <xsl:attribute name="keep-together.within-column">
-          <xsl:value-of select="$keep.together"/>
-        </xsl:attribute>
-      </xsl:if>
-      <xsl:call-template name="table.frame"/>
-      <xsl:if test="following-sibling::tgroup">
-        <xsl:attribute name="border-bottom-width">0pt</xsl:attribute>
-        <xsl:attribute name="border-bottom-style">none</xsl:attribute>
-        <xsl:attribute name="padding-bottom">0pt</xsl:attribute>
-        <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
-        <xsl:attribute name="space-after">0pt</xsl:attribute>
-        <xsl:attribute name="space-after.minimum">0pt</xsl:attribute>
-        <xsl:attribute name="space-after.optimum">0pt</xsl:attribute>
-        <xsl:attribute name="space-after.maximum">0pt</xsl:attribute>
-      </xsl:if>
-      <xsl:if test="preceding-sibling::tgroup">
-        <xsl:attribute name="border-top-width">0pt</xsl:attribute>
-        <xsl:attribute name="border-top-style">none</xsl:attribute>
-        <xsl:attribute name="padding-top">0pt</xsl:attribute>
-        <xsl:attribute name="margin-top">0pt</xsl:attribute>
-        <xsl:attribute name="space-before">0pt</xsl:attribute>
-        <xsl:attribute name="space-before.minimum">0pt</xsl:attribute>
-        <xsl:attribute name="space-before.optimum">0pt</xsl:attribute>
-        <xsl:attribute name="space-before.maximum">0pt</xsl:attribute>
-      </xsl:if>
-      <xsl:apply-templates select="."/>
-    </fo:table>
-  </xsl:for-each>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<!-- Placeholder template enables wrapping a fo:table in
-     another table for purposes of layout or applying
-     extensions such as XEP table-omit-initial-header to
-     create "continued" titles on page breaks. -->
-<xsl:template name="table.layout">
-  <xsl:param name="table.content" select="NOTANODE"/>
-
-  <xsl:copy-of select="$table.content"/>
-</xsl:template>
-
-<xsl:template name="table.block">
-  <xsl:param name="table.layout" select="NOTANODE"/>
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="param.placement"
-                select="substring-after(normalize-space(
-                   $formal.title.placement), concat(local-name(.), ' '))"/>
-
-  <xsl:variable name="placement">
-    <xsl:choose>
-      <xsl:when test="contains($param.placement, ' ')">
-        <xsl:value-of select="substring-before($param.placement, ' ')"/>
-      </xsl:when>
-      <xsl:when test="$param.placement = ''">before</xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$param.placement"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="self::table">
-      <fo:block id="{$id}"
-                xsl:use-attribute-sets="table.properties">
-        <xsl:if test="$placement = 'before'">
-          <xsl:call-template name="formal.object.heading">
-            <xsl:with-param name="placement" select="$placement"/>
-          </xsl:call-template>
-        </xsl:if>
-        <xsl:copy-of select="$table.layout"/>
-        <xsl:call-template name="table.footnote.block"/>
-        <xsl:if test="$placement != 'before'">
-          <xsl:call-template name="formal.object.heading">
-            <xsl:with-param name="placement" select="$placement"/>
-          </xsl:call-template>
-        </xsl:if>
-      </fo:block>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:block id="{$id}"
-                xsl:use-attribute-sets="informaltable.properties">
-        <xsl:copy-of select="$table.layout"/>
-        <xsl:call-template name="table.footnote.block"/>
-      </fo:block>
-    </xsl:otherwise>
-  </xsl:choose>
-
-
-</xsl:template>
-
-<!-- Output a table's footnotes in a block -->
-<xsl:template name="table.footnote.block">
-  <xsl:if test=".//footnote">
-    <fo:block keep-with-previous.within-column="always">
-      <xsl:apply-templates select=".//footnote" mode="table.footnote.mode"/>
-    </fo:block>
-  </xsl:if>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="table.container">
-  <xsl:param name="table.block"/>
-  <xsl:choose>
-    <xsl:when test="@orient='land' and 
-                    $fop.extensions = 0 and 
-                    $passivetex.extensions = 0" >
-      <fo:block-container reference-orientation="90"
-            padding="6pt"
-            xsl:use-attribute-sets="list.block.spacing">
-        <xsl:attribute name="width">
-          <xsl:call-template name="table.width"/>
-        </xsl:attribute>
-        <fo:block start-indent="0pt" end-indent="0pt">
-          <xsl:copy-of select="$table.block"/>
-        </fo:block>
-      </fo:block-container>
-    </xsl:when>
-    <xsl:when test="@pgwide = 1">
-      <fo:block xsl:use-attribute-sets="pgwide.properties">
-        <xsl:copy-of select="$table.block"/>
-      </fo:block>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy-of select="$table.block"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="empty.table.cell">
-  <xsl:param name="colnum" select="0"/>
-
-  <xsl:variable name="rowsep">
-    <xsl:choose>
-      <!-- If this is the last row, rowsep never applies. -->
-      <xsl:when test="not(ancestor-or-self::row[1]/following-sibling::row
-                          or ancestor-or-self::thead/following-sibling::tbody
-                          or ancestor-or-self::tbody/preceding-sibling::tfoot)">
-        <xsl:value-of select="0"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="inherited.table.attribute">
-          <xsl:with-param name="entry" select="NOT-AN-ELEMENT-NAME"/>
-          <xsl:with-param name="row" select="ancestor-or-self::row[1]"/>
-          <xsl:with-param name="colnum" select="$colnum"/>
-          <xsl:with-param name="attribute" select="'rowsep'"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="colsep">
-    <xsl:choose>
-      <!-- If this is the last column, colsep never applies. -->
-      <xsl:when test="number($colnum) &gt;= ancestor::tgroup/@cols">0</xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="inherited.table.attribute">
-          <xsl:with-param name="entry" select="NOT-AN-ELEMENT-NAME"/>
-          <xsl:with-param name="row" select="ancestor-or-self::row[1]"/>
-          <xsl:with-param name="colnum" select="$colnum"/>
-          <xsl:with-param name="attribute" select="'colsep'"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <fo:table-cell text-align="center"
-                 display-align="center"
-                 xsl:use-attribute-sets="table.cell.padding">
-    <xsl:if test="$xep.extensions != 0">
-      <!-- Suggested by RenderX to workaround a bug in their implementation -->
-      <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
-    </xsl:if>
-    <xsl:if test="$rowsep &gt; 0">
-      <xsl:call-template name="border">
-        <xsl:with-param name="side" select="'bottom'"/>
-      </xsl:call-template>
-    </xsl:if>
-
-    <xsl:if test="$colsep &gt; 0 and number($colnum) &lt; ancestor::tgroup/@cols">
-      <xsl:call-template name="border">
-        <xsl:with-param name="side" select="'right'"/>
-      </xsl:call-template>
-    </xsl:if>
-
-    <!-- fo:table-cell should not be empty -->
-    <fo:block/>
-  </fo:table-cell>
-</xsl:template>
-
-<!-- ==================================================================== -->
-<xsl:template name="table.frame">
-  <xsl:variable name="frame">
-    <xsl:choose>
-      <xsl:when test="../@frame">
-        <xsl:value-of select="../@frame"/>
-      </xsl:when>
-      <xsl:when test="$default.table.frame != ''">
-        <xsl:value-of select="$default.table.frame"/>
-      </xsl:when>
-      <xsl:otherwise>all</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$frame='all'">
-      <xsl:attribute name="border-left-style">
-        <xsl:value-of select="$table.frame.border.style"/>
-      </xsl:attribute>
-      <xsl:attribute name="border-right-style">
-        <xsl:value-of select="$table.frame.border.style"/>
-      </xsl:attribute>
-      <xsl:attribute name="border-top-style">
-        <xsl:value-of select="$table.frame.border.style"/>
-      </xsl:attribute>
-      <xsl:attribute name="border-bottom-style">
-        <xsl:value-of select="$table.frame.border.style"/>
-      </xsl:attribute>
-      <xsl:attribute name="border-left-width">
-        <xsl:value-of select="$table.frame.border.thickness"/>
-      </xsl:attribute>
-      <xsl:attribute name="border-right-width">
-        <xsl:value-of select="$table.frame.border.thickness"/>
-      </xsl:attribute>
-      <xsl:attribute name="border-top-width">
-        <xsl:value-of select="$table.frame.border.thickness"/>
-      </xsl:attribute>
-      <xsl:attribute name="border-bottom-width">
-        <xsl:value-of select="$table.frame.border.thickness"/>
-      </xsl:attribute>
-      <xsl:attribute name="border-left-color">
-        <xsl:value-of select="$table.frame.border.color"/>
-      </xsl:attribute>
-      <xsl:attribute name="border-right-color">
-        <xsl:value-of select="$table.frame.border.color"/>
-      </xsl:attribute>
-      <xsl:attribute name="border-top-color">
-        <xsl:value-of select="$table.frame.border.color"/>
-      </xsl:attribute>
-      <xsl:attribute name="border-bottom-color">
-        <xsl:value-of select="$table.frame.border.color"/>
-      </xsl:attribute>
-    </xsl:when>
-    <xsl:when test="$frame='bottom'">
-      <xsl:attribute name="border-left-style">none</xsl:attribute>
-      <xsl:attribute name="border-right-style">none</xsl:attribute>
-      <xsl:attribute name="border-top-style">none</xsl:attribute>
-      <xsl:attribute name="border-bottom-style">
-        <xsl:value-of select="$table.frame.border.style"/>
-      </xsl:attribute>
-      <xsl:attribute name="border-bottom-width">
-        <xsl:value-of select="$table.frame.border.thickness"/>
-      </xsl:attribute>
-      <xsl:attribute name="border-bottom-color">
-        <xsl:value-of select="$table.frame.border.color"/>
-      </xsl:attribute>
-    </xsl:when>
-    <xsl:when test="$frame='sides'">
-      <xsl:attribute name="border-left-style">
-        <xsl:value-of select="$table.frame.border.style"/>
-      </xsl:attribute>
-      <xsl:attribute name="border-right-style">
-        <xsl:value-of select="$table.frame.border.style"/>
-      </xsl:attribute>
-      <xsl:attribute name="border-top-style">none</xsl:attribute>
-      <xsl:attribute name="border-bottom-style">none</xsl:attribute>
-      <xsl:attribute name="border-left-width">
-        <xsl:value-of select="$table.frame.border.thickness"/>
-      </xsl:attribute>
-      <xsl:attribute name="border-right-width">
-        <xsl:value-of select="$table.frame.border.thickness"/>
-      </xsl:attribute>
-      <xsl:attribute name="border-left-color">
-        <xsl:value-of select="$table.frame.border.color"/>
-      </xsl:attribute>
-      <xsl:attribute name="border-right-color">
-        <xsl:value-of select="$table.frame.border.color"/>
-      </xsl:attribute>
-    </xsl:when>
-    <xsl:when test="$frame='top'">
-      <xsl:attribute name="border-left-style">none</xsl:attribute>
-      <xsl:attribute name="border-right-style">none</xsl:attribute>
-      <xsl:attribute name="border-top-style">
-        <xsl:value-of select="$table.frame.border.style"/>
-      </xsl:attribute>
-      <xsl:attribute name="border-bottom-style">none</xsl:attribute>
-      <xsl:attribute name="border-top-width">
-        <xsl:value-of select="$table.frame.border.thickness"/>
-      </xsl:attribute>
-      <xsl:attribute name="border-top-color">
-        <xsl:value-of select="$table.frame.border.color"/>
-      </xsl:attribute>
-    </xsl:when>
-    <xsl:when test="$frame='topbot'">
-      <xsl:attribute name="border-left-style">none</xsl:attribute>
-      <xsl:attribute name="border-right-style">none</xsl:attribute>
-      <xsl:attribute name="border-top-style">
-        <xsl:value-of select="$table.frame.border.style"/>
-      </xsl:attribute>
-      <xsl:attribute name="border-bottom-style">
-        <xsl:value-of select="$table.frame.border.style"/>
-      </xsl:attribute>
-      <xsl:attribute name="border-top-width">
-        <xsl:value-of select="$table.frame.border.thickness"/>
-      </xsl:attribute>
-      <xsl:attribute name="border-bottom-width">
-        <xsl:value-of select="$table.frame.border.thickness"/>
-      </xsl:attribute>
-      <xsl:attribute name="border-top-color">
-        <xsl:value-of select="$table.frame.border.color"/>
-      </xsl:attribute>
-      <xsl:attribute name="border-bottom-color">
-        <xsl:value-of select="$table.frame.border.color"/>
-      </xsl:attribute>
-    </xsl:when>
-    <xsl:when test="$frame='none'">
-      <xsl:attribute name="border-left-style">none</xsl:attribute>
-      <xsl:attribute name="border-right-style">none</xsl:attribute>
-      <xsl:attribute name="border-top-style">none</xsl:attribute>
-      <xsl:attribute name="border-bottom-style">none</xsl:attribute>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:message>
-        <xsl:text>Impossible frame on table: </xsl:text>
-        <xsl:value-of select="$frame"/>
-      </xsl:message>
-      <xsl:attribute name="border-left-style">none</xsl:attribute>
-      <xsl:attribute name="border-right-style">none</xsl:attribute>
-      <xsl:attribute name="border-top-style">none</xsl:attribute>
-      <xsl:attribute name="border-bottom-style">none</xsl:attribute>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="border">
-  <xsl:param name="side" select="'left'"/>
-
-  <xsl:attribute name="border-{$side}-width">
-    <xsl:value-of select="$table.cell.border.thickness"/>
-  </xsl:attribute>
-  <xsl:attribute name="border-{$side}-style">
-    <xsl:value-of select="$table.cell.border.style"/>
-  </xsl:attribute>
-  <xsl:attribute name="border-{$side}-color">
-    <xsl:value-of select="$table.cell.border.color"/>
-  </xsl:attribute>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="tgroup" name="tgroup">
-  <xsl:if test="not(@cols) or @cols = '' or string(number(@cols)) = 'NaN'">
-    <xsl:message terminate="yes">
-      <xsl:text>Error: CALS tables must specify the number of columns.</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:variable name="table.width">
-    <xsl:call-template name="table.width"/>
-  </xsl:variable>
-
-  <xsl:variable name="colspecs">
-    <xsl:choose>
-      <xsl:when test="$use.extensions != 0
-                      and $tablecolumns.extension != 0">
-        <xsl:call-template name="generate.colgroup.raw">
-          <xsl:with-param name="cols" select="@cols"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="generate.colgroup">
-          <xsl:with-param name="cols" select="@cols"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="prop-columns"
-                select=".//colspec[contains(@colwidth, '*')]"/>
-  <xsl:if test="count($prop-columns) != 0 or
-                $fop.extensions != 0 or
-                $fop1.extensions != 0 or
-                $passivetex.extensions != 0">
-    <xsl:attribute name="table-layout">fixed</xsl:attribute>
-  </xsl:if>
- 
-    <xsl:attribute name="width">
-      <xsl:value-of select="$table.width"/>
-    </xsl:attribute>
- 
-  <xsl:choose>
-    <xsl:when test="$use.extensions != 0
-                    and $tablecolumns.extension != 0">
-      <xsl:choose>
-        <xsl:when test="function-available('stbl:adjustColumnWidths')">
-          <xsl:copy-of select="stbl:adjustColumnWidths($colspecs)"/>
-        </xsl:when>
-        <xsl:when test="function-available('xtbl:adjustColumnWidths')">
-          <xsl:copy-of select="xtbl:adjustColumnWidths($colspecs)"/>
-        </xsl:when>
-        <xsl:when test="function-available('ptbl:adjustColumnWidths')">
-          <xsl:copy-of select="ptbl:adjustColumnWidths($colspecs)"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:message terminate="yes">
-            <xsl:text>No adjustColumnWidths function available.</xsl:text>
-          </xsl:message>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy-of select="$colspecs"/>
-    </xsl:otherwise>
-  </xsl:choose>
-
-  <xsl:apply-templates select="thead"/>
-  <xsl:apply-templates select="tfoot"/>
-  <xsl:apply-templates select="tbody"/>
-</xsl:template>
-
-<xsl:template match="colspec"></xsl:template>
-
-<xsl:template name="table.width">
-
-  <xsl:variable name="numcols">
-    <xsl:call-template name="widest-html-row">
-      <xsl:with-param name="rows" select=".//tr"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="explicit.table.width">
-    <xsl:choose>
-      <xsl:when test="self::entrytbl">
-        <xsl:call-template name="pi.dbfo_table-width"/>
-      </xsl:when>
-      <xsl:when test="self::table or self::informaltable">
-        <xsl:call-template name="pi.dbfo_table-width"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <!-- * no dbfo@table-width PI as a child of this table, so check -->
-        <!-- * the parent of this table to see if the table has any -->
-        <!-- * sibling dbfo@table-width PIs (FIXME: 2007-07 MikeSmith: we -->
-        <!-- * should really instead be checking here just to see if the -->
-        <!-- * first preceding sibling of this table is a -->
-        <!-- * dbfo@table-width PI) -->
-        <xsl:call-template name="pi.dbfo_table-width">
-          <xsl:with-param name="node" select=".."/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="column.sum">
-    <xsl:choose>
-      <!-- CALS table -->
-      <xsl:when test="@cols">
-        <xsl:if test="count(colspec) = @cols">
-          <xsl:for-each select="colspec">
-            <xsl:if test="position() != 1">
-              <xsl:text> + </xsl:text>
-            </xsl:if>
-            <xsl:choose>
-              <xsl:when test="not(@colwidth)">NOWIDTH</xsl:when>
-              <xsl:when test="contains(@colwidth, '*')">NOWIDTH</xsl:when>
-              <xsl:otherwise>
-                <xsl:value-of select="@colwidth"/>
-              </xsl:otherwise>
-            </xsl:choose>
-          </xsl:for-each>
-        </xsl:if>
-      </xsl:when>
-      <xsl:otherwise>
-        <!-- HTML table -->
-        <xsl:if test="count(col|colgroup/col) = $numcols">
-          <xsl:for-each select="col|colgroup/col">
-            <xsl:if test="position() != 1">
-              <xsl:text> + </xsl:text>
-            </xsl:if>
-            <xsl:choose>
-              <xsl:when test="not(@width)">NOWIDTH</xsl:when>
-              <xsl:when test="contains(@width, '%')">NOWIDTH</xsl:when>
-              <xsl:otherwise>
-                <xsl:value-of select="@width"/>
-              </xsl:otherwise>
-            </xsl:choose>
-          </xsl:for-each>
-        </xsl:if>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="column.sum.width">
-    <xsl:if test="not(contains($column.sum, 'NOWIDTH'))">
-      <xsl:value-of select="$column.sum"/>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="prop-columns"
-                select=".//colspec[contains(@colwidth, '*')]"/>
-
-  <xsl:variable name="table.width">
-    <xsl:choose>
-      <xsl:when test="$explicit.table.width != ''">
-        <xsl:value-of select="$explicit.table.width"/>
-      </xsl:when>
-      <xsl:when test="$column.sum.width != ''">
-        <xsl:value-of select="$column.sum.width"/>
-      </xsl:when>
-      <xsl:when test="$default.table.width = ''">
-        <xsl:choose>
-          <!-- These processors don't support table-layout="auto" -->
-          <xsl:when test="$fop.extensions != 0 or
-                          $fop1.extensions != 0 or
-                          $passivetex.extensions != 0">
-            <xsl:text>100%</xsl:text>
-          </xsl:when>
-          <!-- Proportional columns imply 100% width -->
-          <xsl:when test="count($prop-columns) != 0">
-            <xsl:text>100%</xsl:text>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:text>auto</xsl:text>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$default.table.width"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-  <xsl:value-of select="$table.width"/>
-
-</xsl:template>
-
-<xsl:template match="spanspec"></xsl:template>
-
-<xsl:template match="thead">
-  <xsl:variable name="tgroup" select="parent::*"/>
-
-  <fo:table-header start-indent="0pt" end-indent="0pt">
-    <xsl:apply-templates select="row[1]">
-      <xsl:with-param name="spans">
-        <xsl:call-template name="blank.spans">
-          <xsl:with-param name="cols" select="../@cols"/>
-        </xsl:call-template>
-      </xsl:with-param>
-    </xsl:apply-templates>
-  </fo:table-header>
-</xsl:template>
-
-<xsl:template match="tfoot">
-  <xsl:variable name="tgroup" select="parent::*"/>
-
-  <fo:table-footer start-indent="0pt" end-indent="0pt">
-    <xsl:apply-templates select="row[1]">
-      <xsl:with-param name="spans">
-        <xsl:call-template name="blank.spans">
-          <xsl:with-param name="cols" select="../@cols"/>
-        </xsl:call-template>
-      </xsl:with-param>
-    </xsl:apply-templates>
-
-  </fo:table-footer>
-</xsl:template>
-
-<xsl:template match="tbody">
-  <xsl:variable name="tgroup" select="parent::*"/>
-
-  <fo:table-body start-indent="0pt" end-indent="0pt">
-    <xsl:apply-templates select="row[1]">
-      <xsl:with-param name="spans">
-        <xsl:call-template name="blank.spans">
-          <xsl:with-param name="cols" select="../@cols"/>
-        </xsl:call-template>
-      </xsl:with-param>
-    </xsl:apply-templates>
-  </fo:table-body>
-</xsl:template>
-
-<xsl:template match="row">
-  <xsl:param name="spans"/>
-
-  <xsl:choose>
-    <xsl:when test="contains($spans, '0')">
-      <xsl:call-template name="normal-row">
-        <xsl:with-param name="spans" select="$spans"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <!--
-      <xsl:message>
-        <xsl:text>Ignoring row: </xsl:text>
-        <xsl:value-of select="$spans"/>
-        <xsl:text> = </xsl:text>
-        <xsl:call-template name="consume-row">
-          <xsl:with-param name="spans" select="$spans"/>
-        </xsl:call-template>
-      </xsl:message>
-      -->
-
-      <xsl:if test="normalize-space(.//text()) != ''">
-        <xsl:message>Warning: overlapped row contains content!</xsl:message>
-      </xsl:if>
-
-      <fo:table-row>
-        <xsl:comment> This row intentionally left blank </xsl:comment>
-        <fo:table-cell><fo:block/></fo:table-cell>
-      </fo:table-row>
-
-      <xsl:apply-templates select="following-sibling::row[1]">
-        <xsl:with-param name="spans">
-          <xsl:call-template name="consume-row">
-            <xsl:with-param name="spans" select="$spans"/>
-          </xsl:call-template>
-        </xsl:with-param>
-      </xsl:apply-templates>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="normal-row">
-  <xsl:param name="spans"/>
-
-  <fo:table-row>
-    <xsl:call-template name="table.row.properties"/>
-    <xsl:call-template name="anchor"/>
-
-    <xsl:apply-templates select="(entry|entrytbl)[1]">
-      <xsl:with-param name="spans" select="$spans"/>
-    </xsl:apply-templates>
-  </fo:table-row>
-
-  <xsl:if test="following-sibling::row">
-    <xsl:variable name="nextspans">
-      <xsl:apply-templates select="(entry|entrytbl)[1]" mode="span">
-        <xsl:with-param name="spans" select="$spans"/>
-      </xsl:apply-templates>
-    </xsl:variable>
-
-    <xsl:apply-templates select="following-sibling::row[1]">
-      <xsl:with-param name="spans" select="$nextspans"/>
-    </xsl:apply-templates>
-  </xsl:if>
-</xsl:template>
-
-<!-- customize this template to add row properties -->
-<xsl:template name="table.row.properties">
-  <xsl:variable name="bgcolor">
-    <xsl:call-template name="pi.dbfo_bgcolor"/>
-  </xsl:variable>
-  <xsl:if test="$bgcolor != ''">
-    <xsl:attribute name="background-color">
-      <xsl:value-of select="$bgcolor"/>
-    </xsl:attribute>
-  </xsl:if>
-
-  <!-- Keep header row with next row -->
-  <xsl:if test="ancestor::thead">
-    <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
-  </xsl:if>
-
-</xsl:template>
-
-<xsl:template match="entry|entrytbl" name="entry">
-  <xsl:param name="col" select="1"/>
-  <xsl:param name="spans"/>
-
-  <xsl:variable name="row" select="parent::row"/>
-  <xsl:variable name="group" select="$row/parent::*[1]"/>
-  <xsl:variable name="frame" select="ancestor::tgroup/parent::*/@frame"/>
-
-  <xsl:variable name="empty.cell" select="count(node()) = 0"/>
-
-  <xsl:variable name="named.colnum">
-    <xsl:call-template name="entry.colnum"/>
-  </xsl:variable>
-
-  <xsl:variable name="entry.colnum">
-    <xsl:choose>
-      <xsl:when test="$named.colnum &gt; 0">
-        <xsl:value-of select="$named.colnum"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$col"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="entry.colspan">
-    <xsl:choose>
-      <xsl:when test="@spanname or @namest">
-        <xsl:call-template name="calculate.colspan"/>
-      </xsl:when>
-      <xsl:otherwise>1</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="following.spans">
-    <xsl:call-template name="calculate.following.spans">
-      <xsl:with-param name="colspan" select="$entry.colspan"/>
-      <xsl:with-param name="spans" select="$spans"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="rowsep">
-    <xsl:choose>
-      <!-- If this is the last row, rowsep never applies. -->
-      <xsl:when test="not(ancestor-or-self::row[1]/following-sibling::row
-                          or ancestor-or-self::thead/following-sibling::tbody
-                          or ancestor-or-self::tbody/preceding-sibling::tfoot)">
-        <xsl:value-of select="0"/>
-      </xsl:when>
-      <!-- Check for morerows too -->
-      <xsl:when test="(@morerows and count(ancestor-or-self::row[1]/
-                       following-sibling::row) = @morerows )
-                      and not (ancestor-or-self::thead/following-sibling::tbody
-                       or ancestor-or-self::tbody/preceding-sibling::tfoot)">
-        <xsl:value-of select="0"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="inherited.table.attribute">
-          <xsl:with-param name="entry" select="."/>
-          <xsl:with-param name="colnum" select="$entry.colnum"/>
-          <xsl:with-param name="attribute" select="'rowsep'"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-<!--
-  <xsl:message><xsl:value-of select="."/>: <xsl:value-of select="$rowsep"/></xsl:message>
--->
-
-  <xsl:variable name="colsep">
-    <xsl:choose>
-      <!-- If this is the last column, colsep never applies. -->
-      <xsl:when test="$following.spans = ''">0</xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="inherited.table.attribute">
-          <xsl:with-param name="entry" select="."/>
-          <xsl:with-param name="colnum" select="$entry.colnum"/>
-          <xsl:with-param name="attribute" select="'colsep'"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="valign">
-    <xsl:call-template name="inherited.table.attribute">
-      <xsl:with-param name="entry" select="."/>
-      <xsl:with-param name="colnum" select="$entry.colnum"/>
-      <xsl:with-param name="attribute" select="'valign'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="align">
-    <xsl:call-template name="inherited.table.attribute">
-      <xsl:with-param name="entry" select="."/>
-      <xsl:with-param name="colnum" select="$entry.colnum"/>
-      <xsl:with-param name="attribute" select="'align'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="char">
-    <xsl:call-template name="inherited.table.attribute">
-      <xsl:with-param name="entry" select="."/>
-      <xsl:with-param name="colnum" select="$entry.colnum"/>
-      <xsl:with-param name="attribute" select="'char'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="charoff">
-    <xsl:call-template name="inherited.table.attribute">
-      <xsl:with-param name="entry" select="."/>
-      <xsl:with-param name="colnum" select="$entry.colnum"/>
-      <xsl:with-param name="attribute" select="'charoff'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$spans != '' and not(starts-with($spans,'0:'))">
-      <xsl:call-template name="entry">
-        <xsl:with-param name="col" select="$col+1"/>
-        <xsl:with-param name="spans" select="substring-after($spans,':')"/>
-      </xsl:call-template>
-    </xsl:when>
-
-    <xsl:when test="number($entry.colnum) &gt; $col">
-      <xsl:call-template name="empty.table.cell">
-        <xsl:with-param name="colnum" select="$col"/>
-      </xsl:call-template>
-      <xsl:call-template name="entry">
-        <xsl:with-param name="col" select="$col+1"/>
-        <xsl:with-param name="spans" select="substring-after($spans,':')"/>
-      </xsl:call-template>
-    </xsl:when>
-
-    <xsl:otherwise>
-      <xsl:variable name="cell.content">
-        <fo:block>
-          <xsl:call-template name="table.cell.block.properties"/>
-
-          <!-- are we missing any indexterms? -->
-          <xsl:if test="not(preceding-sibling::entry)
-                        and not(parent::row/preceding-sibling::row)">
-            <!-- this is the first entry of the first row -->
-            <xsl:if test="ancestor::thead or
-                          (ancestor::tbody
-                           and not(ancestor::tbody/preceding-sibling::thead
-                                   or ancestor::tbody/preceding-sibling::tbody))">
-              <!-- of the thead or the first tbody -->
-              <xsl:apply-templates select="ancestor::tgroup/preceding-sibling::indexterm"/>
-            </xsl:if>
-          </xsl:if>
-
-          <!--
-          <xsl:text>(</xsl:text>
-          <xsl:value-of select="$rowsep"/>
-          <xsl:text>,</xsl:text>
-          <xsl:value-of select="$colsep"/>
-          <xsl:text>)</xsl:text>
-          -->
-          <xsl:choose>
-            <xsl:when test="$empty.cell">
-              <xsl:text>&#160;</xsl:text>
-            </xsl:when>
-            <xsl:when test="self::entrytbl">
-              <xsl:variable name="prop-columns"
-                            select=".//colspec[contains(@colwidth, '*')]"/>
-              <fo:table xsl:use-attribute-sets="table.table.properties">
-                <xsl:if test="count($prop-columns) != 0">
-                  <xsl:attribute name="table-layout">fixed</xsl:attribute>
-                </xsl:if>
-                <xsl:call-template name="tgroup"/>
-              </fo:table>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:apply-templates/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </fo:block>
-      </xsl:variable>
-
-      <xsl:variable name="cell-orientation">
-        <xsl:call-template name="pi.dbfo_orientation">
-          <xsl:with-param name="node" select="ancestor-or-self::entry"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <xsl:variable name="row-orientation">
-        <xsl:call-template name="pi.dbfo_orientation">
-          <xsl:with-param name="node" select="ancestor-or-self::row"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <xsl:variable name="cell-width">
-        <xsl:call-template name="pi.dbfo_rotated-width">
-          <xsl:with-param name="node" select="ancestor-or-self::entry"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <xsl:variable name="row-width">
-        <xsl:call-template name="pi.dbfo_rotated-width">
-          <xsl:with-param name="node" select="ancestor-or-self::row"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <xsl:variable name="orientation">
-        <xsl:choose>
-          <xsl:when test="$cell-orientation != ''">
-            <xsl:value-of select="$cell-orientation"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="$row-orientation"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:variable>
-
-      <xsl:variable name="rotated-width">
-        <xsl:choose>
-          <xsl:when test="$cell-width != ''">
-            <xsl:value-of select="$cell-width"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="$row-width"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:variable>
-
-      <xsl:variable name="bgcolor">
-        <xsl:call-template name="pi.dbfo_bgcolor">
-          <xsl:with-param name="node" select="ancestor-or-self::entry"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <fo:table-cell xsl:use-attribute-sets="table.cell.padding">
-        <xsl:call-template name="table.cell.properties">
-          <xsl:with-param name="bgcolor.pi" select="$bgcolor"/>
-          <xsl:with-param name="rowsep.inherit" select="$rowsep"/>
-          <xsl:with-param name="colsep.inherit" select="$colsep"/>
-          <xsl:with-param name="col" select="$col"/>
-          <xsl:with-param name="valign.inherit" select="$valign"/>
-          <xsl:with-param name="align.inherit" select="$align"/>
-          <xsl:with-param name="char.inherit" select="$char"/>
-        </xsl:call-template>
-
-        <xsl:call-template name="anchor"/>
-
-        <xsl:if test="@morerows">
-          <xsl:attribute name="number-rows-spanned">
-            <xsl:value-of select="@morerows+1"/>
-          </xsl:attribute>
-        </xsl:if>
-
-        <xsl:if test="$entry.colspan &gt; 1">
-          <xsl:attribute name="number-columns-spanned">
-            <xsl:value-of select="$entry.colspan"/>
-          </xsl:attribute>
-        </xsl:if>
-
-<!--
-        <xsl:if test="@charoff">
-          <xsl:attribute name="charoff">
-            <xsl:value-of select="@charoff"/>
-          </xsl:attribute>
-        </xsl:if>
--->
-
-        <xsl:choose>
-          <xsl:when test="$fop.extensions = 0 and $passivetex.extensions = 0
-                          and $orientation != ''">
-            <fo:block-container reference-orientation="{$orientation}">
-              <xsl:if test="$rotated-width != ''">
-                <xsl:attribute name="width">
-                  <xsl:value-of select="$rotated-width"/>
-                </xsl:attribute>
-              </xsl:if>
-              <xsl:copy-of select="$cell.content"/>
-            </fo:block-container>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:copy-of select="$cell.content"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </fo:table-cell>
-
-      <xsl:choose>
-        <xsl:when test="following-sibling::entry|following-sibling::entrytbl">
-          <xsl:apply-templates select="(following-sibling::entry
-                                       |following-sibling::entrytbl)[1]">
-            <xsl:with-param name="col" select="$col+$entry.colspan"/>
-            <xsl:with-param name="spans" select="$following.spans"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="finaltd">
-            <xsl:with-param name="spans" select="$following.spans"/>
-            <xsl:with-param name="col" select="$col+$entry.colspan"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- Expand this template to add properties to any fo:table-cell -->
-<xsl:template name="table.cell.properties">
-  <xsl:param name="bgcolor.pi" select="''"/>
-  <xsl:param name="rowsep.inherit" select="1"/>
-  <xsl:param name="colsep.inherit" select="1"/>
-  <xsl:param name="col" select="1"/>
-  <xsl:param name="valign.inherit" select="''"/>
-  <xsl:param name="align.inherit" select="''"/>
-  <xsl:param name="char.inherit" select="''"/>
-
-  <xsl:choose>
-    <xsl:when test="ancestor::tgroup">
-      <xsl:if test="$bgcolor.pi != ''">
-        <xsl:attribute name="background-color">
-          <xsl:value-of select="$bgcolor.pi"/>
-        </xsl:attribute>
-      </xsl:if>
-
-      <xsl:if test="$rowsep.inherit &gt; 0">
-        <xsl:call-template name="border">
-          <xsl:with-param name="side" select="'bottom'"/>
-        </xsl:call-template>
-      </xsl:if>
-
-      <xsl:if test="$colsep.inherit &gt; 0 and 
-                      $col &lt; ancestor::tgroup/@cols">
-        <xsl:call-template name="border">
-          <xsl:with-param name="side" select="'right'"/>
-        </xsl:call-template>
-      </xsl:if>
-
-      <xsl:if test="$valign.inherit != ''">
-        <xsl:attribute name="display-align">
-          <xsl:choose>
-            <xsl:when test="$valign.inherit='top'">before</xsl:when>
-            <xsl:when test="$valign.inherit='middle'">center</xsl:when>
-            <xsl:when test="$valign.inherit='bottom'">after</xsl:when>
-            <xsl:otherwise>
-              <xsl:message>
-                <xsl:text>Unexpected valign value: </xsl:text>
-                <xsl:value-of select="$valign.inherit"/>
-                <xsl:text>, center used.</xsl:text>
-              </xsl:message>
-              <xsl:text>center</xsl:text>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:attribute>
-      </xsl:if>
-
-      <xsl:choose>
-        <xsl:when test="$align.inherit = 'char' and $char.inherit != ''">
-          <xsl:attribute name="text-align">
-            <xsl:value-of select="$char.inherit"/>
-          </xsl:attribute>
-        </xsl:when>
-        <xsl:when test="$align.inherit != ''">
-          <xsl:attribute name="text-align">
-            <xsl:value-of select="$align.inherit"/>
-          </xsl:attribute>
-        </xsl:when>
-      </xsl:choose>
-
-    </xsl:when>
-    <xsl:otherwise>
-      <!-- HTML table -->
-      <xsl:variable name="border" 
-                    select="(ancestor::table |
-                             ancestor::informaltable)[last()]/@border"/>
-      <xsl:if test="$border != '' and $border != 0">
-        <xsl:attribute name="border">
-          <xsl:value-of select="$table.cell.border.thickness"/>
-          <xsl:text> </xsl:text>
-          <xsl:value-of select="$table.cell.border.style"/>
-          <xsl:text> </xsl:text>
-          <xsl:value-of select="$table.cell.border.color"/>
-        </xsl:attribute>
-      </xsl:if>
-    </xsl:otherwise>
-  </xsl:choose>
-
-</xsl:template>
-
-<!-- Expand this template to add properties to any cell's block -->
-<xsl:template name="table.cell.block.properties">
-  <!-- highlight this entry? -->
-  <xsl:if test="ancestor::thead or ancestor::tfoot">
-    <xsl:attribute name="font-weight">bold</xsl:attribute>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="entry|entrytbl" name="sentry" mode="span">
-  <xsl:param name="col" select="1"/>
-  <xsl:param name="spans"/>
-
-  <xsl:variable name="entry.colnum">
-    <xsl:call-template name="entry.colnum"/>
-  </xsl:variable>
-
-  <xsl:variable name="entry.colspan">
-    <xsl:choose>
-      <xsl:when test="@spanname or @namest">
-        <xsl:call-template name="calculate.colspan"/>
-      </xsl:when>
-      <xsl:otherwise>1</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="following.spans">
-    <xsl:call-template name="calculate.following.spans">
-      <xsl:with-param name="colspan" select="$entry.colspan"/>
-      <xsl:with-param name="spans" select="$spans"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$spans != '' and not(starts-with($spans,'0:'))">
-      <xsl:value-of select="substring-before($spans,':')-1"/>
-      <xsl:text>:</xsl:text>
-      <xsl:call-template name="sentry">
-        <xsl:with-param name="col" select="$col+1"/>
-        <xsl:with-param name="spans" select="substring-after($spans,':')"/>
-      </xsl:call-template>
-    </xsl:when>
-
-    <xsl:when test="number($entry.colnum) &gt; $col">
-      <xsl:text>0:</xsl:text>
-      <xsl:call-template name="sentry">
-        <xsl:with-param name="col" select="$col+$entry.colspan"/>
-        <xsl:with-param name="spans" select="$following.spans"/>
-      </xsl:call-template>
-    </xsl:when>
-
-    <xsl:otherwise>
-      <xsl:call-template name="copy-string">
-        <xsl:with-param name="count" select="$entry.colspan"/>
-        <xsl:with-param name="string">
-          <xsl:choose>
-            <xsl:when test="@morerows">
-              <xsl:value-of select="@morerows"/>
-            </xsl:when>
-            <xsl:otherwise>0</xsl:otherwise>
-          </xsl:choose>
-          <xsl:text>:</xsl:text>
-        </xsl:with-param>
-      </xsl:call-template>
-
-      <xsl:choose>
-        <xsl:when test="following-sibling::entry|following-sibling::entrytbl">
-          <xsl:apply-templates select="(following-sibling::entry
-                                       |following-sibling::entrytbl)[1]"
-                               mode="span">
-            <xsl:with-param name="col" select="$col+$entry.colspan"/>
-            <xsl:with-param name="spans" select="$following.spans"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="sfinaltd">
-            <xsl:with-param name="spans" select="$following.spans"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="generate.colgroup.raw">
-  <xsl:param name="cols" select="1"/>
-  <xsl:param name="count" select="1"/>
-
-  <xsl:choose>
-    <xsl:when test="$count>$cols"></xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="generate.col.raw">
-        <xsl:with-param name="countcol" select="$count"/>
-      </xsl:call-template>
-      <xsl:call-template name="generate.colgroup.raw">
-        <xsl:with-param name="cols" select="$cols"/>
-        <xsl:with-param name="count" select="$count+1"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="generate.colgroup">
-  <xsl:param name="cols" select="1"/>
-  <xsl:param name="count" select="1"/>
-
-  <xsl:choose>
-    <xsl:when test="$count>$cols"></xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="generate.col">
-        <xsl:with-param name="countcol" select="$count"/>
-      </xsl:call-template>
-      <xsl:call-template name="generate.colgroup">
-        <xsl:with-param name="cols" select="$cols"/>
-        <xsl:with-param name="count" select="$count+1"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="generate.col.raw">
-  <!-- generate the table-column for column countcol -->
-  <xsl:param name="countcol">1</xsl:param>
-  <xsl:param name="colspecs" select="./colspec"/>
-  <xsl:param name="count">1</xsl:param>
-  <xsl:param name="colnum">1</xsl:param>
-
-  <xsl:choose>
-    <xsl:when test="$count>count($colspecs)">
-      <fo:table-column column-number="{$countcol}"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:variable name="colspec" select="$colspecs[$count=position()]"/>
-
-      <xsl:variable name="colspec.colnum">
-        <xsl:choose>
-          <xsl:when test="$colspec/@colnum">
-            <xsl:value-of select="$colspec/@colnum"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="$colnum"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:variable>
-
-      <xsl:variable name="colspec.colwidth">
-        <xsl:choose>
-          <xsl:when test="$colspec/@colwidth">
-            <xsl:value-of select="$colspec/@colwidth"/>
-          </xsl:when>
-          <xsl:otherwise>1*</xsl:otherwise>
-        </xsl:choose>
-      </xsl:variable>
-
-      <xsl:choose>
-        <xsl:when test="$colspec.colnum=$countcol">
-          <fo:table-column column-number="{$countcol}">
-            <xsl:attribute name="column-width">
-              <xsl:value-of select="$colspec.colwidth"/>
-            </xsl:attribute>
-          </fo:table-column>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="generate.col.raw">
-            <xsl:with-param name="countcol" select="$countcol"/>
-            <xsl:with-param name="colspecs" select="$colspecs"/>
-            <xsl:with-param name="count" select="$count+1"/>
-            <xsl:with-param name="colnum">
-              <xsl:choose>
-                <xsl:when test="$colspec/@colnum">
-                  <xsl:value-of select="$colspec/@colnum + 1"/>
-                </xsl:when>
-                <xsl:otherwise>
-                  <xsl:value-of select="$colnum + 1"/>
-                </xsl:otherwise>
-              </xsl:choose>
-            </xsl:with-param>
-           </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="generate.col">
-  <!-- generate the table-column for column countcol -->
-  <xsl:param name="countcol">1</xsl:param>
-  <xsl:param name="colspecs" select="./colspec"/>
-  <xsl:param name="count">1</xsl:param>
-  <xsl:param name="colnum">1</xsl:param>
-
-  <xsl:choose>
-    <xsl:when test="$count>count($colspecs)">
-      <fo:table-column column-number="{$countcol}">
-        <xsl:variable name="colwidth">
-          <xsl:call-template name="calc.column.width"/>
-        </xsl:variable>
-        <xsl:if test="$colwidth != 'proportional-column-width(1)'">
-          <xsl:attribute name="column-width">
-            <xsl:value-of select="$colwidth"/>
-          </xsl:attribute>
-        </xsl:if>
-      </fo:table-column>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:variable name="colspec" select="$colspecs[$count=position()]"/>
-
-      <xsl:variable name="colspec.colnum">
-        <xsl:choose>
-          <xsl:when test="$colspec/@colnum">
-            <xsl:value-of select="$colspec/@colnum"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="$colnum"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:variable>
-
-      <xsl:variable name="colspec.colwidth">
-        <xsl:choose>
-          <xsl:when test="$colspec/@colwidth">
-            <xsl:value-of select="$colspec/@colwidth"/>
-          </xsl:when>
-          <xsl:otherwise>1*</xsl:otherwise>
-        </xsl:choose>
-      </xsl:variable>
-
-      <xsl:choose>
-        <xsl:when test="$colspec.colnum=$countcol">
-          <fo:table-column column-number="{$countcol}">
-            <xsl:variable name="colwidth">
-              <xsl:call-template name="calc.column.width">
-                <xsl:with-param name="colwidth">
-                  <xsl:value-of select="$colspec.colwidth"/>
-                </xsl:with-param>
-              </xsl:call-template>
-            </xsl:variable>
-            <xsl:if test="$colwidth != 'proportional-column-width(1)'">
-              <xsl:attribute name="column-width">
-                <xsl:value-of select="$colwidth"/>
-              </xsl:attribute>
-            </xsl:if>
-          </fo:table-column>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="generate.col">
-            <xsl:with-param name="countcol" select="$countcol"/>
-            <xsl:with-param name="colspecs" select="$colspecs"/>
-            <xsl:with-param name="count" select="$count+1"/>
-            <xsl:with-param name="colnum">
-              <xsl:choose>
-                <xsl:when test="$colspec/@colnum">
-                  <xsl:value-of select="$colspec/@colnum + 1"/>
-                </xsl:when>
-                <xsl:otherwise>
-                  <xsl:value-of select="$colnum + 1"/>
-                </xsl:otherwise>
-              </xsl:choose>
-            </xsl:with-param>
-           </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<doc:template name="calc.column.width" xmlns="">
-<refpurpose>Calculate an XSL FO table column width specification from a
-CALS table column width specification.</refpurpose>
-
-<refdescription>
-<para>CALS expresses table column widths in the following basic
-forms:</para>
-
-<itemizedlist>
-<listitem>
-<para><emphasis>99.99units</emphasis>, a fixed length specifier.</para>
-</listitem>
-<listitem>
-<para><emphasis>99.99</emphasis>, a fixed length specifier without any units.</para>
-</listitem>
-<listitem>
-<para><emphasis>99.99*</emphasis>, a relative length specifier.</para>
-</listitem>
-<listitem>
-<para><emphasis>99.99*+99.99units</emphasis>, a combination of both.</para>
-</listitem>
-</itemizedlist>
-
-<para>The CALS units are points (pt), picas (pi), centimeters (cm),
-millimeters (mm), and inches (in). These are the same units as XSL,
-except that XSL abbreviates picas "pc" instead of "pi". If a length
-specifier has no units, the CALS default unit (pt) is assumed.</para>
-
-<para>Relative length specifiers are represented in XSL with the
-proportional-column-width() function.</para>
-
-<para>Here are some examples:</para>
-
-<itemizedlist>
-<listitem>
-<para>"36pt" becomes "36pt"</para>
-</listitem>
-<listitem>
-<para>"3pi" becomes "3pc"</para>
-</listitem>
-<listitem>
-<para>"36" becomes "36pt"</para>
-</listitem>
-<listitem>
-<para>"3*" becomes "proportional-column-width(3)"</para>
-</listitem>
-<listitem>
-<para>"3*+2pi" becomes "proportional-column-width(3)+2pc"</para>
-</listitem>
-<listitem>
-<para>"1*+2" becomes "proportional-column-width(1)+2pt"</para>
-</listitem>
-</itemizedlist>
-</refdescription>
-
-<refparameter>
-<variablelist>
-<varlistentry><term>colwidth</term>
-<listitem>
-<para>The CALS column width specification.</para>
-</listitem>
-</varlistentry>
-</variablelist>
-</refparameter>
-
-<refreturn>
-<para>The XSL column width specification.</para>
-</refreturn>
-</doc:template>
-
-<xsl:template name="calc.column.width">
-  <xsl:param name="colwidth">1*</xsl:param>
-
-  <!-- Ok, the colwidth could have any one of the following forms: -->
-  <!--        1*       = proportional width -->
-  <!--         *       = same as 1* -->
-  <!--     1unit       = 1.0 units wide -->
-  <!--         1       = 1pt wide -->
-  <!--  1*+1unit       = proportional width + some fixed width -->
-  <!--      1*+1       = proportional width + some fixed width -->
-
-  <!-- If it has a proportional width, translate it to XSL -->
-  <xsl:if test="contains($colwidth, '*')">
-    <xsl:text>proportional-column-width(</xsl:text>
-    <xsl:choose>
-      <xsl:when test="substring-before($colwidth, '*') != ''"> 
-        <xsl:value-of select="substring-before($colwidth, '*')"/>
-      </xsl:when>
-      <xsl:otherwise>
-         <xsl:text>1.00</xsl:text>
-      </xsl:otherwise>
-    </xsl:choose>
-    <xsl:text>)</xsl:text>
-  </xsl:if>
-
-  <!-- Now grab the non-proportional part of the specification -->
-  <xsl:variable name="width-units">
-    <xsl:choose>
-      <xsl:when test="contains($colwidth, '*')">
-        <xsl:value-of
-             select="normalize-space(substring-after($colwidth, '*'))"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="normalize-space($colwidth)"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <!-- Ok, now the width-units could have any one of the following forms: -->
-  <!--                 = <empty string> -->
-  <!--     1unit       = 1.0 units wide -->
-  <!--         1       = 1pt wide -->
-  <!-- with an optional leading sign -->
-
-  <!-- Grab the width part by blanking out the units part and discarding -->
-  <!-- whitespace. It's not pretty, but it works. -->
-  <xsl:variable name="width"
-       select="normalize-space(translate($width-units,
-                                         '+-0123456789.abcdefghijklmnopqrstuvwxyz',
-                                         '+-0123456789.'))"/>
-
-  <!-- Grab the units part by blanking out the width part and discarding -->
-  <!-- whitespace. It's not pretty, but it works. -->
-  <xsl:variable name="units"
-       select="normalize-space(translate($width-units,
-                                         'abcdefghijklmnopqrstuvwxyz+-0123456789.',
-                                         'abcdefghijklmnopqrstuvwxyz'))"/>
-
-  <!-- Output the width -->
-  <xsl:value-of select="$width"/>
-
-  <!-- Output the units, translated appropriately -->
-  <xsl:choose>
-    <xsl:when test="$units = 'pi'">pc</xsl:when>
-    <xsl:when test="$units = '' and $width != ''">pt</xsl:when>
-    <xsl:otherwise><xsl:value-of select="$units"/></xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/task.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/task.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,81 +1,0 @@
-<?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:template match="task">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="param.placement"
-                select="substring-after(normalize-space($formal.title.placement),
-                                        concat(local-name(.), ' '))"/>
-
-  <xsl:variable name="placement">
-    <xsl:choose>
-      <xsl:when test="contains($param.placement, ' ')">
-        <xsl:value-of select="substring-before($param.placement, ' ')"/>
-      </xsl:when>
-      <xsl:when test="$param.placement = ''">before</xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$param.placement"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="preamble"
-                select="*[not(self::title
-                              or self::titleabbrev)]"/>
-
-  <fo:block id="{$id}"
-            xsl:use-attribute-sets="formal.object.properties">
-    <xsl:call-template name="anchor"/>
-
-    <xsl:if test="title and $placement = 'before'">
-      <xsl:call-template name="formal.object.heading"/>
-    </xsl:if>
-
-    <xsl:apply-templates select="$preamble"/>
-
-    <xsl:if test="title and $placement != 'before'">
-      <xsl:call-template name="formal.object.heading"/>
-    </xsl:if>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="task/title">
-  <!-- nop -->
-</xsl:template>
-
-<xsl:template match="tasksummary">
-  <xsl:call-template name="semiformal.object"/>
-</xsl:template>
-
-<xsl:template match="tasksummary/title"/>
-
-<xsl:template match="taskprerequisites">
-  <xsl:call-template name="semiformal.object"/>
-</xsl:template>
-
-<xsl:template match="taskprerequisites/title"/>
-
-<xsl:template match="taskrelated">
-  <xsl:call-template name="semiformal.object"/>
-</xsl:template>
-
-<xsl:template match="taskrelated/title"/>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/titlepage.templates.xml
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/titlepage.templates.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,1311 +1,0 @@
-<!DOCTYPE t:templates [
-<!ENTITY hsize0 "10pt">
-<!ENTITY hsize1 "12pt">
-<!ENTITY hsize2 "14.4pt">
-<!ENTITY hsize3 "17.28pt">
-<!ENTITY hsize4 "20.736pt">
-<!ENTITY hsize5 "24.8832pt">
-<!ENTITY hsize0space "7.5pt"> <!-- 0.75 * hsize0 -->
-<!ENTITY hsize1space "9pt"> <!-- 0.75 * hsize1 -->
-<!ENTITY hsize2space "10.8pt"> <!-- 0.75 * hsize2 -->
-<!ENTITY hsize3space "12.96pt"> <!-- 0.75 * hsize3 -->
-<!ENTITY hsize4space "15.552pt"> <!-- 0.75 * hsize4 -->
-<!ENTITY hsize5space "18.6624pt"> <!-- 0.75 * hsize5 -->
-]>
-<t:templates xmlns:t="http://nwalsh.com/docbook/xsl/template/1.0"
-	     xmlns:param="http://nwalsh.com/docbook/xsl/template/1.0/param"
-             xmlns:fo="http://www.w3.org/1999/XSL/Format"
-             xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the DocBook XSL Stylesheet distribution.
-     See ../README or http://docbook.sf.net/ for copyright
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<t:titlepage t:element="article" t:wrapper="fo:block"
-             font-family="{$title.fontset}">
-
-  <t:titlepage-content t:side="recto"
-	     start-indent="0pt"
-             text-align="center">
-
-    <title t:named-template="component.title"
-	   param:node="ancestor-or-self::article[1]"
-	   keep-with-next.within-column="always"
-	   font-size="&hsize5;"
-	   font-weight="bold"/>
-
-    <subtitle/>
-
-    <corpauthor space-before="0.5em"
-                font-size="&hsize2;"/>
-    <authorgroup space-before="0.5em"
-                 font-size="&hsize2;"/>
-    <author space-before="0.5em"
-            font-size="&hsize2;"/>
-
-    <othercredit space-before="0.5em"/>
-    <releaseinfo space-before="0.5em"/>
-    <copyright space-before="0.5em"/>
-    <legalnotice text-align="start"
-                 margin-left="0.5in"
-                 margin-right="0.5in"
-                 font-family="{$body.fontset}"/>
-    <pubdate space-before="0.5em"/>
-    <revision space-before="0.5em"/>
-    <revhistory space-before="0.5em"/>
-    <abstract space-before="0.5em"
-	      text-align="start"
-	      margin-left="0.5in"
-              margin-right="0.5in"
-              font-family="{$body.fontset}"/>
-  </t:titlepage-content>
-
-  <t:titlepage-content t:side="verso">
-  </t:titlepage-content>
-
-  <t:titlepage-separator>
-  </t:titlepage-separator>
-
-  <t:titlepage-before t:side="recto">
-  </t:titlepage-before>
-
-  <t:titlepage-before t:side="verso">
-  </t:titlepage-before>
-</t:titlepage>
-
-<!-- ==================================================================== -->
-
-<t:titlepage t:element="set" t:wrapper="fo:block">
-  <t:titlepage-content t:side="recto">
-      <title
-	     t:named-template="division.title"
-	     param:node="ancestor-or-self::set[1]"
-	     text-align="center"
-	     font-size="&hsize5;"
-	     space-before="&hsize5space;"
-	     font-weight="bold"
-	     font-family="{$title.fontset}"/>
-    <subtitle
-	      font-family="{$title.fontset}"
-	      text-align="center"/>
-    <corpauthor/>
-    <authorgroup/>
-    <author/>
-    <othercredit/>
-    <releaseinfo/>
-    <copyright/>
-    <legalnotice/>
-    <pubdate/>
-    <revision/>
-    <revhistory/>
-    <abstract/>
-  </t:titlepage-content>
-
-  <t:titlepage-content t:side="verso">
-  </t:titlepage-content>
-
-  <t:titlepage-separator>
-  </t:titlepage-separator>
-
-  <t:titlepage-before t:side="recto">
-  </t:titlepage-before>
-
-  <t:titlepage-before t:side="verso">
-  </t:titlepage-before>
-</t:titlepage>
-
-<!-- ==================================================================== -->
-
-  <t:titlepage t:element="book" t:wrapper="fo:block">
-    <t:titlepage-content t:side="recto">
-      <title
-	     t:named-template="division.title"
-	     param:node="ancestor-or-self::book[1]"
-	     text-align="center"
-	     font-size="&hsize5;"
-	     space-before="&hsize5space;"
-	     font-weight="bold"
-	     font-family="{$title.fontset}"/>
-      <subtitle
-		text-align="center"
-		font-size="&hsize4;"
-		space-before="&hsize4space;"
-		font-family="{$title.fontset}"/>
-      <corpauthor font-size="&hsize3;"
-		  keep-with-next.within-column="always"
-		  space-before="2in"/>
-      <authorgroup space-before="2in"/>
-      <author font-size="&hsize3;"
-	      space-before="&hsize2space;"
-	      keep-with-next.within-column="always"/>
-    </t:titlepage-content>
-
-  <t:titlepage-content t:side="verso">
-      <title
-	     t:named-template="book.verso.title"
-	     font-size="&hsize2;"
-	     font-weight="bold"
-	     font-family="{$title.fontset}"/>
-      <corpauthor/>
-      <authorgroup t:named-template="verso.authorgroup"/>
-      <author/>
-      <othercredit/>
-      <releaseinfo space-before="0.5em"/>
-      <pubdate space-before="1em"/>
-      <copyright/>
-      <abstract/>
-      <legalnotice font-size="8pt"/>
-  </t:titlepage-content>
-
-  <t:titlepage-separator>
-      <fo:block break-after="page"/>
-  </t:titlepage-separator>
-
-  <t:titlepage-before t:side="recto">
-  </t:titlepage-before>
-
-  <t:titlepage-before t:side="verso">
-      <fo:block break-after="page"/>
-  </t:titlepage-before>
-</t:titlepage>
-
-<!-- ==================================================================== -->
-
-<t:titlepage t:element="part" t:wrapper="fo:block">
-  <t:titlepage-content t:side="recto">
-      <title
-	     t:named-template="division.title"
-	     param:node="ancestor-or-self::part[1]"
-	     text-align="center"
-	     font-size="&hsize5;"
-	     space-before="&hsize5space;"
-	     font-weight="bold"
-	     font-family="{$title.fontset}"/>
-    <subtitle
-	      text-align="center"
-	      font-size="&hsize4;"
-	      space-before="&hsize4space;"
-	      font-weight='bold'
-	      font-style='italic'
-	      font-family="{$title.fontset}"/>
-  </t:titlepage-content>
-
-  <t:titlepage-content t:side="verso">
-  </t:titlepage-content>
-
-  <t:titlepage-separator>
-  </t:titlepage-separator>
-
-  <t:titlepage-before t:side="recto">
-  </t:titlepage-before>
-
-  <t:titlepage-before t:side="verso">
-  </t:titlepage-before>
-</t:titlepage>
-
-<t:titlepage t:element="partintro" t:wrapper="fo:block">
-  <t:titlepage-content t:side="recto">
-    <title
-	   text-align="center"
-	   font-size="&hsize5;"
-	   font-weight="bold"
-	   space-before="1em"
-	   font-family="{$title.fontset}"/>
-    <subtitle
-	      text-align="center"
-	      font-size="&hsize2;"
-	      font-weight="bold"
-	      font-style="italic"
-	      font-family="{$title.fontset}"/>
-    <corpauthor/>
-    <authorgroup/>
-    <author/>
-    <othercredit/>
-    <releaseinfo/>
-    <copyright/>
-    <legalnotice/>
-    <pubdate/>
-    <revision/>
-    <revhistory/>
-    <abstract/>
-  </t:titlepage-content>
-
-  <t:titlepage-content t:side="verso">
-  </t:titlepage-content>
-
-  <t:titlepage-separator>
-  </t:titlepage-separator>
-
-  <t:titlepage-before t:side="recto">
-  </t:titlepage-before>
-
-  <t:titlepage-before t:side="verso">
-  </t:titlepage-before>
-</t:titlepage>
-
-<!-- ==================================================================== -->
-
-<t:titlepage t:element="reference" t:wrapper="fo:block">
-  <t:titlepage-content t:side="recto">
-      <title
-	     t:named-template="division.title"
-	     param:node="ancestor-or-self::reference[1]"
-	     text-align="center"
-	     font-size="&hsize5;"
-	     space-before="&hsize5space;"
-	     font-weight="bold"
-	     font-family="{$title.fontset}"/>
-    <subtitle
-	      font-family="{$title.fontset}"
-	      text-align="center"/>
-    <corpauthor/>
-    <authorgroup/>
-    <author/>
-    <othercredit/>
-    <releaseinfo/>
-    <copyright/>
-    <legalnotice/>
-    <pubdate/>
-    <revision/>
-    <revhistory/>
-    <abstract/>
-  </t:titlepage-content>
-
-  <t:titlepage-content t:side="verso">
-  </t:titlepage-content>
-
-  <t:titlepage-separator>
-  </t:titlepage-separator>
-
-  <t:titlepage-before t:side="recto">
-  </t:titlepage-before>
-
-  <t:titlepage-before t:side="verso">
-  </t:titlepage-before>
-</t:titlepage>
-
-<!-- ==================================================================== -->
-
-<t:titlepage t:element="refsynopsisdiv" t:wrapper="fo:block">
-  <t:titlepage-content t:side="recto">
-    <title
-	   font-family="{$title.fontset}"/>
-  </t:titlepage-content>
-
-  <t:titlepage-content t:side="verso">
-  </t:titlepage-content>
-
-  <t:titlepage-separator>
-  </t:titlepage-separator>
-
-  <t:titlepage-before t:side="recto">
-  </t:titlepage-before>
-
-  <t:titlepage-before t:side="verso">
-  </t:titlepage-before>
-</t:titlepage>
-
-<!-- ==================================================================== -->
-
-<t:titlepage t:element="refsection" t:wrapper="fo:block">
-  <t:titlepage-content t:side="recto">
-    <title
-	   font-family="{$title.fontset}"/>
-  </t:titlepage-content>
-
-  <t:titlepage-content t:side="verso">
-  </t:titlepage-content>
-
-  <t:titlepage-separator>
-  </t:titlepage-separator>
-
-  <t:titlepage-before t:side="recto">
-  </t:titlepage-before>
-
-  <t:titlepage-before t:side="verso">
-  </t:titlepage-before>
-</t:titlepage>
-
-<!-- ==================================================================== -->
-
-<t:titlepage t:element="refsect1" t:wrapper="fo:block">
-  <t:titlepage-content t:side="recto">
-    <title
-	   font-family="{$title.fontset}"/>
-  </t:titlepage-content>
-
-  <t:titlepage-content t:side="verso">
-  </t:titlepage-content>
-
-  <t:titlepage-separator>
-  </t:titlepage-separator>
-
-  <t:titlepage-before t:side="recto">
-  </t:titlepage-before>
-
-  <t:titlepage-before t:side="verso">
-  </t:titlepage-before>
-</t:titlepage>
-
-<!-- ==================================================================== -->
-
-<t:titlepage t:element="refsect2" t:wrapper="fo:block">
-  <t:titlepage-content t:side="recto">
-    <title
-	   font-family="{$title.fontset}"/>
-  </t:titlepage-content>
-
-  <t:titlepage-content t:side="verso">
-  </t:titlepage-content>
-
-  <t:titlepage-separator>
-  </t:titlepage-separator>
-
-  <t:titlepage-before t:side="recto">
-  </t:titlepage-before>
-
-  <t:titlepage-before t:side="verso">
-  </t:titlepage-before>
-</t:titlepage>
-
-<!-- ==================================================================== -->
-
-<t:titlepage t:element="refsect3" t:wrapper="fo:block">
-  <t:titlepage-content t:side="recto">
-    <title
-	   font-family="{$title.fontset}"/>
-  </t:titlepage-content>
-
-  <t:titlepage-content t:side="verso">
-  </t:titlepage-content>
-
-  <t:titlepage-separator>
-  </t:titlepage-separator>
-
-  <t:titlepage-before t:side="recto">
-  </t:titlepage-before>
-
-  <t:titlepage-before t:side="verso">
-  </t:titlepage-before>
-</t:titlepage>
-
-<!-- ==================================================================== -->
-
-  <t:titlepage t:element="dedication" t:wrapper="fo:block">
-    <t:titlepage-content t:side="recto">
-      <title
-	     t:force="1"
-	     t:named-template="component.title"
-	     param:node="ancestor-or-self::dedication[1]"
-	     margin-left="{$title.margin.left}"
-	     font-size="&hsize5;"
-	     font-family="{$title.fontset}"
-	     font-weight="bold"/>
-      <subtitle
-		font-family="{$title.fontset}"/>
-    </t:titlepage-content>
-
-  <t:titlepage-content t:side="verso">
-  </t:titlepage-content>
-
-  <t:titlepage-separator>
-  </t:titlepage-separator>
-
-  <t:titlepage-before t:side="recto">
-  </t:titlepage-before>
-
-  <t:titlepage-before t:side="verso">
-  </t:titlepage-before>
-</t:titlepage>
-
-<!-- ==================================================================== -->
-
-  <t:titlepage t:element="preface" t:wrapper="fo:block">
-    <t:titlepage-content t:side="recto">
-      <title
-	     t:force="1"
-	     t:named-template="component.title"
-	     param:node="ancestor-or-self::preface[1]"
-	     margin-left="{$title.margin.left}"
-	     font-size="&hsize5;"
-	     font-family="{$title.fontset}"
-	     font-weight="bold"/>
-      <subtitle
-		font-family="{$title.fontset}"/>
-      <corpauthor/>
-      <authorgroup/>
-      <author/>
-      <othercredit/>
-      <releaseinfo/>
-      <copyright/>
-      <legalnotice/>
-      <pubdate/>
-      <revision/>
-      <revhistory/>
-      <abstract/>
-    </t:titlepage-content>
-
-  <t:titlepage-content t:side="verso">
-  </t:titlepage-content>
-
-  <t:titlepage-separator>
-  </t:titlepage-separator>
-
-  <t:titlepage-before t:side="recto">
-  </t:titlepage-before>
-
-  <t:titlepage-before t:side="verso">
-  </t:titlepage-before>
-</t:titlepage>
-
-<!-- ==================================================================== -->
-
-  <t:titlepage t:element="chapter" t:wrapper="fo:block"
-               font-family="{$title.fontset}">
-    <t:titlepage-content t:side="recto" margin-left="{$title.margin.left}">
-      <title t:named-template="component.title"
-	     param:node="ancestor-or-self::chapter[1]"
-	     font-size="&hsize5;"
-	     font-weight="bold"/>
-
-      <subtitle space-before="0.5em"
-		font-style="italic"
-		font-size="&hsize2;"
-		font-weight="bold"/>
-
-      <corpauthor  space-before="0.5em"
-	           space-after="0.5em"
-                   font-size="&hsize2;"/>
-
-      <authorgroup space-before="0.5em"
-	           space-after="0.5em"
-                   font-size="&hsize2;"/>
-
-      <author      space-before="0.5em"
-	           space-after="0.5em"
-                   font-size="&hsize2;"/>
-
-      <othercredit/>
-      <releaseinfo/>
-      <copyright/>
-      <legalnotice/>
-      <pubdate/>
-      <revision/>
-      <revhistory/>
-      <abstract/>
-    </t:titlepage-content>
-
-  <t:titlepage-content t:side="verso">
-  </t:titlepage-content>
-
-  <t:titlepage-separator>
-  </t:titlepage-separator>
-
-  <t:titlepage-before t:side="recto">
-  </t:titlepage-before>
-
-  <t:titlepage-before t:side="verso">
-  </t:titlepage-before>
-</t:titlepage>
-
-<!-- ==================================================================== -->
-
-  <t:titlepage t:element="appendix" t:wrapper="fo:block">
-    <t:titlepage-content t:side="recto">
-      <title
-	     t:named-template="component.title"
-	     param:node="ancestor-or-self::appendix[1]"
-	     margin-left="{$title.margin.left}"
-	     font-size="&hsize5;"
-	     font-weight="bold"
-	     font-family="{$title.fontset}"/>
-      <subtitle
-		font-family="{$title.fontset}"/>
-      <corpauthor/>
-      <authorgroup/>
-      <author/>
-      <othercredit/>
-      <releaseinfo/>
-      <copyright/>
-      <legalnotice/>
-      <pubdate/>
-      <revision/>
-      <revhistory/>
-      <abstract/>
-    </t:titlepage-content>
-
-  <t:titlepage-content t:side="verso">
-  </t:titlepage-content>
-
-  <t:titlepage-separator>
-  </t:titlepage-separator>
-
-  <t:titlepage-before t:side="recto">
-  </t:titlepage-before>
-
-  <t:titlepage-before t:side="verso">
-  </t:titlepage-before>
-</t:titlepage>
-
-<!-- ==================================================================== -->
-
-<t:titlepage t:element="section" t:wrapper="fo:block">
-  <t:titlepage-content t:side="recto">
-    <title
-	   margin-left="{$title.margin.left}"
-	   font-family="{$title.fontset}"/>
-    <subtitle
-	      font-family="{$title.fontset}"/>
-    <corpauthor/>
-    <authorgroup/>
-    <author/>
-    <othercredit/>
-    <releaseinfo/>
-    <copyright/>
-    <legalnotice/>
-    <pubdate/>
-    <revision/>
-    <revhistory/>
-    <abstract/>
-  </t:titlepage-content>
-
-  <t:titlepage-content t:side="verso">
-  </t:titlepage-content>
-
-  <t:titlepage-separator>
-  </t:titlepage-separator>
-
-  <t:titlepage-before t:side="recto">
-  </t:titlepage-before>
-
-  <t:titlepage-before t:side="verso">
-  </t:titlepage-before>
-</t:titlepage>
-
-<t:titlepage t:element="sect1" t:wrapper="fo:block">
-  <t:titlepage-content t:side="recto">
-    <title
-	   margin-left="{$title.margin.left}"
-	   font-family="{$title.fontset}"/>
-    <subtitle
-	      font-family="{$title.fontset}"/>
-    <corpauthor/>
-    <authorgroup/>
-    <author/>
-    <othercredit/>
-    <releaseinfo/>
-    <copyright/>
-    <legalnotice/>
-    <pubdate/>
-    <revision/>
-    <revhistory/>
-    <abstract/>
-  </t:titlepage-content>
-
-  <t:titlepage-content t:side="verso">
-  </t:titlepage-content>
-
-  <t:titlepage-separator>
-  </t:titlepage-separator>
-
-  <t:titlepage-before t:side="recto">
-  </t:titlepage-before>
-
-  <t:titlepage-before t:side="verso">
-  </t:titlepage-before>
-</t:titlepage>
-
-<t:titlepage t:element="sect2" t:wrapper="fo:block">
-  <t:titlepage-content t:side="recto">
-    <title
-	   margin-left="{$title.margin.left}"
-	   font-family="{$title.fontset}"/>
-    <subtitle
-	      font-family="{$title.fontset}"/>
-    <corpauthor/>
-    <authorgroup/>
-    <author/>
-    <othercredit/>
-    <releaseinfo/>
-    <copyright/>
-    <legalnotice/>
-    <pubdate/>
-    <revision/>
-    <revhistory/>
-    <abstract/>
-  </t:titlepage-content>
-
-  <t:titlepage-content t:side="verso">
-  </t:titlepage-content>
-
-  <t:titlepage-separator>
-  </t:titlepage-separator>
-
-  <t:titlepage-before t:side="recto">
-  </t:titlepage-before>
-
-  <t:titlepage-before t:side="verso">
-  </t:titlepage-before>
-</t:titlepage>
-
-<t:titlepage t:element="sect3" t:wrapper="fo:block">
-  <t:titlepage-content t:side="recto">
-    <title
-	   margin-left="{$title.margin.left}"
-	   font-family="{$title.fontset}"/>
-    <subtitle
-	      font-family="{$title.fontset}"/>
-    <corpauthor/>
-    <authorgroup/>
-    <author/>
-    <othercredit/>
-    <releaseinfo/>
-    <copyright/>
-    <legalnotice/>
-    <pubdate/>
-    <revision/>
-    <revhistory/>
-    <abstract/>
-  </t:titlepage-content>
-
-  <t:titlepage-content t:side="verso">
-  </t:titlepage-content>
-
-  <t:titlepage-separator>
-  </t:titlepage-separator>
-
-  <t:titlepage-before t:side="recto">
-  </t:titlepage-before>
-
-  <t:titlepage-before t:side="verso">
-  </t:titlepage-before>
-</t:titlepage>
-
-<t:titlepage t:element="sect4" t:wrapper="fo:block">
-  <t:titlepage-content t:side="recto">
-    <title
-	   margin-left="{$title.margin.left}"
-	   font-family="{$title.fontset}"/>
-    <subtitle
-	      font-family="{$title.fontset}"/>
-    <corpauthor/>
-    <authorgroup/>
-    <author/>
-    <othercredit/>
-    <releaseinfo/>
-    <copyright/>
-    <legalnotice/>
-    <pubdate/>
-    <revision/>
-    <revhistory/>
-    <abstract/>
-  </t:titlepage-content>
-
-  <t:titlepage-content t:side="verso">
-  </t:titlepage-content>
-
-  <t:titlepage-separator>
-  </t:titlepage-separator>
-
-  <t:titlepage-before t:side="recto">
-  </t:titlepage-before>
-
-  <t:titlepage-before t:side="verso">
-  </t:titlepage-before>
-</t:titlepage>
-
-<t:titlepage t:element="sect5" t:wrapper="fo:block">
-  <t:titlepage-content t:side="recto">
-    <title
-	   margin-left="{$title.margin.left}"
-	   font-family="{$title.fontset}"/>
-    <subtitle
-	      font-family="{$title.fontset}"/>
-    <corpauthor/>
-    <authorgroup/>
-    <author/>
-    <othercredit/>
-    <releaseinfo/>
-    <copyright/>
-    <legalnotice/>
-    <pubdate/>
-    <revision/>
-    <revhistory/>
-    <abstract/>
-  </t:titlepage-content>
-
-  <t:titlepage-content t:side="verso">
-  </t:titlepage-content>
-
-  <t:titlepage-separator>
-  </t:titlepage-separator>
-
-  <t:titlepage-before t:side="recto">
-  </t:titlepage-before>
-
-  <t:titlepage-before t:side="verso">
-  </t:titlepage-before>
-</t:titlepage>
-
-<t:titlepage t:element="simplesect" t:wrapper="fo:block">
-  <t:titlepage-content t:side="recto">
-    <title
-	   margin-left="{$title.margin.left}"
-	   font-family="{$title.fontset}"/>
-    <subtitle
-	      font-family="{$title.fontset}"/>
-    <corpauthor/>
-    <authorgroup/>
-    <author/>
-    <othercredit/>
-    <releaseinfo/>
-    <copyright/>
-    <legalnotice/>
-    <pubdate/>
-    <revision/>
-    <revhistory/>
-    <abstract/>
-  </t:titlepage-content>
-
-  <t:titlepage-content t:side="verso">
-  </t:titlepage-content>
-
-  <t:titlepage-separator>
-  </t:titlepage-separator>
-
-  <t:titlepage-before t:side="recto">
-  </t:titlepage-before>
-
-  <t:titlepage-before t:side="verso">
-  </t:titlepage-before>
-</t:titlepage>
-
-<!-- ==================================================================== -->
-
-  <t:titlepage t:element="bibliography" t:wrapper="fo:block">
-    <t:titlepage-content t:side="recto">
-      <title
-	     t:force="1"
-	     t:named-template="component.title"
-	     param:node="ancestor-or-self::bibliography[1]"
-	     margin-left="{$title.margin.left}"
-	     font-size="&hsize5;"
-	     font-family="{$title.fontset}"
-	     font-weight="bold"/>
-      <subtitle
-		font-family="{$title.fontset}"/>
-    </t:titlepage-content>
-
-    <t:titlepage-content t:side="verso">
-    </t:titlepage-content>
-
-    <t:titlepage-separator>
-    </t:titlepage-separator>
-
-    <t:titlepage-before t:side="recto">
-    </t:titlepage-before>
-
-    <t:titlepage-before t:side="verso">
-    </t:titlepage-before>
-  </t:titlepage>
-
-<!-- ==================================================================== -->
-
-  <t:titlepage t:element="bibliodiv" t:wrapper="fo:block">
-    <t:titlepage-content t:side="recto">
-      <title t:named-template="component.title"
-	     param:node="ancestor-or-self::bibliodiv[1]"
-	     margin-left="{$title.margin.left}"
-	     font-size="&hsize4;"
-	     font-family="{$title.fontset}"
-	     font-weight="bold"/>
-      <subtitle
-		font-family="{$title.fontset}"/>
-    </t:titlepage-content>
-
-    <t:titlepage-content t:side="verso">
-    </t:titlepage-content>
-
-    <t:titlepage-separator>
-    </t:titlepage-separator>
-
-    <t:titlepage-before t:side="recto">
-    </t:titlepage-before>
-
-    <t:titlepage-before t:side="verso">
-    </t:titlepage-before>
-  </t:titlepage>
-
-<!-- ==================================================================== -->
-
-  <t:titlepage t:element="glossary" t:wrapper="fo:block">
-    <t:titlepage-content t:side="recto">
-      <title
-	     t:force="1"
-	     t:named-template="component.title"
-	     param:node="ancestor-or-self::glossary[1]"
-	     margin-left="{$title.margin.left}"
-	     font-size="&hsize5;"
-	     font-family="{$title.fontset}"
-	     font-weight="bold"/>
-      <subtitle
-		font-family="{$title.fontset}"/>
-    </t:titlepage-content>
-
-    <t:titlepage-content t:side="verso">
-    </t:titlepage-content>
-
-    <t:titlepage-separator>
-    </t:titlepage-separator>
-
-    <t:titlepage-before t:side="recto">
-    </t:titlepage-before>
-
-    <t:titlepage-before t:side="verso">
-    </t:titlepage-before>
-  </t:titlepage>
-
-<!-- ==================================================================== -->
-
-  <t:titlepage t:element="glossdiv" t:wrapper="fo:block">
-    <t:titlepage-content t:side="recto">
-      <title t:named-template="component.title"
-	     param:node="ancestor-or-self::glossdiv[1]"
-	     margin-left="{$title.margin.left}"
-	     font-size="&hsize4;"
-	     font-family="{$title.fontset}"
-	     font-weight="bold"/>
-      <subtitle
-		font-family="{$title.fontset}"/>
-    </t:titlepage-content>
-
-    <t:titlepage-content t:side="verso">
-    </t:titlepage-content>
-
-    <t:titlepage-separator>
-    </t:titlepage-separator>
-
-    <t:titlepage-before t:side="recto">
-    </t:titlepage-before>
-
-    <t:titlepage-before t:side="verso">
-    </t:titlepage-before>
-  </t:titlepage>
-
-<!-- ==================================================================== -->
-
-  <t:titlepage t:element="index" t:wrapper="fo:block">
-    <t:titlepage-content t:side="recto">
-      <title
-	     t:force="1"
-	     t:named-template="component.title"
-	     param:node="ancestor-or-self::index[1]"
-             param:pagewide="1"
-	     margin-left="0pt"
-	     font-size="&hsize5;"
-	     font-family="{$title.fontset}"
-	     font-weight="bold"/>
-      <subtitle
-		font-family="{$title.fontset}"/>
-    </t:titlepage-content>
-
-    <t:titlepage-content t:side="verso">
-    </t:titlepage-content>
-
-    <t:titlepage-separator>
-    </t:titlepage-separator>
-
-    <t:titlepage-before t:side="recto">
-    </t:titlepage-before>
-
-    <t:titlepage-before t:side="verso">
-    </t:titlepage-before>
-  </t:titlepage>
-
-<!-- ==================================================================== -->
-
-  <!-- The indexdiv.title template is used so that manual and -->
-  <!-- automatically generated indexdiv titles get the same -->
-  <!-- formatting. -->
-
-  <t:titlepage t:element="indexdiv" t:wrapper="fo:block">
-    <t:titlepage-content t:side="recto">
-      <title t:force="1"
-	     t:named-template="indexdiv.title"
-	     param:title="title"/>
-      <subtitle
-		font-family="{$title.fontset}"/>
-    </t:titlepage-content>
-
-    <t:titlepage-content t:side="verso">
-    </t:titlepage-content>
-
-    <t:titlepage-separator>
-    </t:titlepage-separator>
-
-    <t:titlepage-before t:side="recto">
-    </t:titlepage-before>
-
-    <t:titlepage-before t:side="verso">
-    </t:titlepage-before>
-  </t:titlepage>
-
-<!-- ==================================================================== -->
-
-  <t:titlepage t:element="setindex" t:wrapper="fo:block">
-    <t:titlepage-content t:side="recto">
-      <title
-	     t:force="1"
-	     t:named-template="component.title"
-	     param:node="ancestor-or-self::setindex[1]"
-             param:pagewide="1"
-	     margin-left="0pt"
-	     font-size="&hsize5;"
-	     font-family="{$title.fontset}"
-	     font-weight="bold"/>
-      <subtitle
-		font-family="{$title.fontset}"/>
-    </t:titlepage-content>
-
-    <t:titlepage-content t:side="verso">
-    </t:titlepage-content>
-
-    <t:titlepage-separator>
-    </t:titlepage-separator>
-
-    <t:titlepage-before t:side="recto">
-    </t:titlepage-before>
-
-    <t:titlepage-before t:side="verso">
-    </t:titlepage-before>
-  </t:titlepage>
-
-<!-- ==================================================================== -->
-
-  <t:titlepage t:element="colophon" t:wrapper="fo:block">
-    <t:titlepage-content t:side="recto">
-      <title
-	     t:force="1"
-	     t:named-template="component.title"
-	     param:node="ancestor-or-self::colophon[1]"
-	     margin-left="{$title.margin.left}"
-	     font-size="&hsize5;"
-	     font-family="{$title.fontset}"
-	     font-weight="bold"/>
-      <subtitle
-		font-family="{$title.fontset}"/>
-    </t:titlepage-content>
-
-  <t:titlepage-content t:side="verso">
-  </t:titlepage-content>
-
-  <t:titlepage-separator>
-  </t:titlepage-separator>
-
-  <t:titlepage-before t:side="recto">
-  </t:titlepage-before>
-
-  <t:titlepage-before t:side="verso">
-  </t:titlepage-before>
-</t:titlepage>
-
-<!-- ==================================================================== -->
-
-  <t:titlepage t:element="sidebar" t:wrapper="fo:block">
-    <t:titlepage-content t:side="recto">
-      <title 
-	     font-family="{$title.fontset}"
-	     font-weight="bold"/>
-      <subtitle
-		font-family="{$title.fontset}"/>
-    </t:titlepage-content>
-
-    <t:titlepage-content t:side="verso">
-    </t:titlepage-content>
-
-    <t:titlepage-separator>
-    </t:titlepage-separator>
-
-    <t:titlepage-before t:side="recto">
-    </t:titlepage-before>
-
-    <t:titlepage-before t:side="verso">
-    </t:titlepage-before>
-  </t:titlepage>
-
-<!-- ==================================================================== -->
-<t:titlepage t:element="qandaset" t:wrapper="fo:block"
-             font-family="{$title.fontset}">
-
-  <t:titlepage-content t:side="recto"
-	     start-indent="0pt"
-             text-align="center">
-
-    <title t:named-template="component.title"
-	   param:node="ancestor-or-self::qandaset[1]"
-	   keep-with-next.within-column="always"
-	   font-size="&hsize5;"
-	   font-weight="bold"/>
-
-    <subtitle/>
-
-    <corpauthor space-before="0.5em"
-                font-size="&hsize2;"/>
-    <authorgroup space-before="0.5em"
-                 font-size="&hsize2;"/>
-    <author space-before="0.5em"
-            font-size="&hsize2;"/>
-
-    <othercredit space-before="0.5em"/>
-    <releaseinfo space-before="0.5em"/>
-    <copyright space-before="0.5em"/>
-    <legalnotice text-align="start"
-                 margin-left="0.5in"
-                 margin-right="0.5in"
-                 font-family="{$body.fontset}"/>
-    <pubdate space-before="0.5em"/>
-    <revision space-before="0.5em"/>
-    <revhistory space-before="0.5em"/>
-    <abstract space-before="0.5em"
-	      text-align="start"
-	      margin-left="0.5in"
-              margin-right="0.5in"
-              font-family="{$body.fontset}"/>
-  </t:titlepage-content>
-
-  <t:titlepage-content t:side="verso">
-  </t:titlepage-content>
-
-  <t:titlepage-separator>
-  </t:titlepage-separator>
-
-  <t:titlepage-before t:side="recto">
-  </t:titlepage-before>
-
-  <t:titlepage-before t:side="verso">
-  </t:titlepage-before>
-</t:titlepage>
-
-<!-- ==================================================================== -->
-
-  <t:titlepage t:element="table.of.contents" t:wrapper="fo:block">
-    <t:titlepage-content t:side="recto">
-      <title
-	     t:force="1"
-	     t:named-template="gentext"
-	     param:key="'TableofContents'"
-             space-before.minimum="1em"
-             space-before.optimum="1.5em"
-             space-before.maximum="2em"
-	     space-after="0.5em"
-	     margin-left="{$title.margin.left}"
-	     start-indent="0pt"
-	     font-size="&hsize3;"
-	     font-weight="bold"
-	     font-family="{$title.fontset}"/>
-    </t:titlepage-content>
-
-    <t:titlepage-content t:side="verso">
-    </t:titlepage-content>
-
-    <t:titlepage-separator>
-    </t:titlepage-separator>
-
-    <t:titlepage-before t:side="recto">
-    </t:titlepage-before>
-
-    <t:titlepage-before t:side="verso">
-    </t:titlepage-before>
-  </t:titlepage>
-
-  <t:titlepage t:element="list.of.tables" t:wrapper="fo:block">
-    <t:titlepage-content t:side="recto">
-      <title
-	     t:force="1"
-	     t:named-template="gentext"
-	     param:key="'ListofTables'"
-             space-before.minimum="1em"
-             space-before.optimum="1.5em"
-             space-before.maximum="2em"
-	     space-after="0.5em"
-	     margin-left="{$title.margin.left}"
-	     start-indent="0pt"
-	     font-size="&hsize3;"
-	     font-weight="bold"
-	     font-family="{$title.fontset}"/>
-    </t:titlepage-content>
-
-    <t:titlepage-content t:side="verso">
-    </t:titlepage-content>
-
-    <t:titlepage-separator>
-    </t:titlepage-separator>
-
-    <t:titlepage-before t:side="recto">
-    </t:titlepage-before>
-
-    <t:titlepage-before t:side="verso">
-    </t:titlepage-before>
-  </t:titlepage>
-
-  <t:titlepage t:element="list.of.figures" t:wrapper="fo:block">
-    <t:titlepage-content t:side="recto">
-      <title
-	     t:force="1"
-	     t:named-template="gentext"
-	     param:key="'ListofFigures'"
-             space-before.minimum="1em"
-             space-before.optimum="1.5em"
-             space-before.maximum="2em"
-	     space-after="0.5em"
-	     margin-left="{$title.margin.left}"
-	     start-indent="0pt"
-	     font-size="&hsize3;"
-	     font-weight="bold"
-	     font-family="{$title.fontset}"/>
-    </t:titlepage-content>
-
-    <t:titlepage-content t:side="verso">
-    </t:titlepage-content>
-
-    <t:titlepage-separator>
-    </t:titlepage-separator>
-
-    <t:titlepage-before t:side="recto">
-    </t:titlepage-before>
-
-    <t:titlepage-before t:side="verso">
-    </t:titlepage-before>
-  </t:titlepage>
-
-  <t:titlepage t:element="list.of.examples" t:wrapper="fo:block">
-    <t:titlepage-content t:side="recto">
-      <title
-	     t:force="1"
-	     t:named-template="gentext"
-	     param:key="'ListofExamples'"
-             space-before.minimum="1em"
-             space-before.optimum="1.5em"
-             space-before.maximum="2em"
-	     space-after="0.5em"
-	     margin-left="{$title.margin.left}"
-	     start-indent="0pt"
-	     font-size="&hsize3;"
-	     font-weight="bold"
-	     font-family="{$title.fontset}"/>
-    </t:titlepage-content>
-
-    <t:titlepage-content t:side="verso">
-    </t:titlepage-content>
-
-    <t:titlepage-separator>
-    </t:titlepage-separator>
-
-    <t:titlepage-before t:side="recto">
-    </t:titlepage-before>
-
-    <t:titlepage-before t:side="verso">
-    </t:titlepage-before>
-  </t:titlepage>
-
-  <t:titlepage t:element="list.of.equations" t:wrapper="fo:block">
-    <t:titlepage-content t:side="recto">
-      <title
-	     t:force="1"
-	     t:named-template="gentext"
-	     param:key="'ListofEquations'"
-             space-before.minimum="1em"
-             space-before.optimum="1.5em"
-             space-before.maximum="2em"
-	     space-after="0.5em"
-	     margin-left="{$title.margin.left}"
-	     start-indent="0pt"
-	     font-size="&hsize3;"
-	     font-weight="bold"
-	     font-family="{$title.fontset}"/>
-    </t:titlepage-content>
-
-    <t:titlepage-content t:side="verso">
-    </t:titlepage-content>
-
-    <t:titlepage-separator>
-    </t:titlepage-separator>
-
-    <t:titlepage-before t:side="recto">
-    </t:titlepage-before>
-
-    <t:titlepage-before t:side="verso">
-    </t:titlepage-before>
-  </t:titlepage>
-
-  <t:titlepage t:element="list.of.procedures" t:wrapper="fo:block">
-    <t:titlepage-content t:side="recto">
-      <title
-	     t:force="1"
-	     t:named-template="gentext"
-	     param:key="'ListofProcedures'"
-             space-before.minimum="1em"
-             space-before.optimum="1.5em"
-             space-before.maximum="2em"
-	     space-after="0.5em"
-	     margin-left="{$title.margin.left}"
-	     start-indent="0pt"
-	     font-size="&hsize3;"
-	     font-weight="bold"
-	     font-family="{$title.fontset}"/>
-    </t:titlepage-content>
-
-    <t:titlepage-content t:side="verso">
-    </t:titlepage-content>
-
-    <t:titlepage-separator>
-    </t:titlepage-separator>
-
-    <t:titlepage-before t:side="recto">
-    </t:titlepage-before>
-
-    <t:titlepage-before t:side="verso">
-    </t:titlepage-before>
-  </t:titlepage>
-
-  <t:titlepage t:element="list.of.unknowns" t:wrapper="fo:block">
-    <t:titlepage-content t:side="recto">
-      <title
-	     t:force="1"
-	     t:named-template="gentext"
-	     param:key="'ListofUnknown'"
-             space-before.minimum="1em"
-             space-before.optimum="1.5em"
-             space-before.maximum="2em"
-	     space-after="0.5em"
-	     margin-left="{$title.margin.left}"
-	     start-indent="0pt"
-	     font-size="&hsize3;"
-	     font-weight="bold"
-	     font-family="{$title.fontset}"/>
-    </t:titlepage-content>
-
-    <t:titlepage-content t:side="verso">
-    </t:titlepage-content>
-
-    <t:titlepage-separator>
-    </t:titlepage-separator>
-
-    <t:titlepage-before t:side="recto">
-    </t:titlepage-before>
-
-    <t:titlepage-before t:side="verso">
-    </t:titlepage-before>
-  </t:titlepage>
-
-<!-- ==================================================================== -->
-
-</t:templates>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/titlepage.templates.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/titlepage.templates.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,5094 +1,0 @@
-<?xml version="1.0"?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" version="1.0" exclude-result-prefixes="exsl">
-
-<!-- This stylesheet was created by template/titlepage.xsl-->
-
-<xsl:template name="article.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="articleinfo/title">
-      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/title"/>
-    </xsl:when>
-    <xsl:when test="artheader/title">
-      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="articleinfo/subtitle">
-      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="artheader/subtitle">
-      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/corpauthor"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/corpauthor"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/authorgroup"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/authorgroup"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/author"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/author"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/othercredit"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/othercredit"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/releaseinfo"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/releaseinfo"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/copyright"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/copyright"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/legalnotice"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/legalnotice"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/pubdate"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/pubdate"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/revision"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/revision"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/revhistory"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/revhistory"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/revhistory"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/abstract"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/abstract"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
-<xsl:template name="article.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="article.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="article.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="article.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="article.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$title.fontset}">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="article.titlepage.before.recto"/>
-      <xsl:call-template name="article.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block start-indent="0pt" text-align="center"><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="article.titlepage.before.verso"/>
-      <xsl:call-template name="article.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="article.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="article.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="article.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="article.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" keep-with-next.within-column="always" font-size="24.8832pt" font-weight="bold">
-<xsl:call-template name="component.title">
-<xsl:with-param name="node" select="ancestor-or-self::article[1]"/>
-</xsl:call-template>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="article.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style">
-<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="article.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
-<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="article.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
-<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="author" mode="article.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
-<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="article.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
-<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="article.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
-<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="copyright" mode="article.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
-<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="article.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" text-align="start" margin-left="0.5in" margin-right="0.5in" font-family="{$body.fontset}">
-<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="article.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
-<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="revision" mode="article.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
-<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="article.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
-<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="abstract" mode="article.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" text-align="start" margin-left="0.5in" margin-right="0.5in" font-family="{$body.fontset}">
-<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="set.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="setinfo/title">
-      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="setinfo/subtitle">
-      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/corpauthor"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/authorgroup"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/author"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/othercredit"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/releaseinfo"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/copyright"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/legalnotice"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/pubdate"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revision"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revhistory"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revhistory"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/abstract"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
-<xsl:template name="set.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="set.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="set.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="set.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="set.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="set.titlepage.before.recto"/>
-      <xsl:call-template name="set.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="set.titlepage.before.verso"/>
-      <xsl:call-template name="set.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="set.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="set.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="set.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="set.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style" text-align="center" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}">
-<xsl:call-template name="division.title">
-<xsl:with-param name="node" select="ancestor-or-self::set[1]"/>
-</xsl:call-template>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="set.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style" font-family="{$title.fontset}" text-align="center">
-<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="set.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
-<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="set.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
-<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="author" mode="set.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
-<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="set.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
-<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="set.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
-<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="copyright" mode="set.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
-<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="set.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
-<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="set.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
-<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="revision" mode="set.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
-<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="set.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
-<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="abstract" mode="set.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
-<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="book.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="bookinfo/title">
-      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="bookinfo/subtitle">
-      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/corpauthor"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/authorgroup"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/author"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/author"/>
-</xsl:template>
-
-<xsl:template name="book.titlepage.verso">
-  <xsl:choose>
-    <xsl:when test="bookinfo/title">
-      <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/corpauthor"/>
-  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/authorgroup"/>
-  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/author"/>
-  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/othercredit"/>
-  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/releaseinfo"/>
-  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/pubdate"/>
-  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/copyright"/>
-  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/abstract"/>
-  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/abstract"/>
-  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/legalnotice"/>
-  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/legalnotice"/>
-</xsl:template>
-
-<xsl:template name="book.titlepage.separator"><fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" break-after="page"/>
-</xsl:template>
-
-<xsl:template name="book.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="book.titlepage.before.verso"><fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" break-after="page"/>
-</xsl:template>
-
-<xsl:template name="book.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="book.titlepage.before.recto"/>
-      <xsl:call-template name="book.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="book.titlepage.before.verso"/>
-      <xsl:call-template name="book.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="book.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="book.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="book.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="book.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" text-align="center" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}">
-<xsl:call-template name="division.title">
-<xsl:with-param name="node" select="ancestor-or-self::book[1]"/>
-</xsl:call-template>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="book.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" text-align="center" font-size="20.736pt" space-before="15.552pt" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="book.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" font-size="17.28pt" keep-with-next.within-column="always" space-before="2in">
-<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="book.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" space-before="2in">
-<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="author" mode="book.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" font-size="17.28pt" space-before="10.8pt" keep-with-next.within-column="always">
-<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="title" mode="book.titlepage.verso.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" font-size="14.4pt" font-weight="bold" font-family="{$title.fontset}">
-<xsl:call-template name="book.verso.title">
-</xsl:call-template>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="book.titlepage.verso.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
-<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="book.titlepage.verso.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
-<xsl:call-template name="verso.authorgroup">
-</xsl:call-template>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="author" mode="book.titlepage.verso.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
-<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="book.titlepage.verso.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
-<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="book.titlepage.verso.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" space-before="0.5em">
-<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="book.titlepage.verso.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" space-before="1em">
-<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="copyright" mode="book.titlepage.verso.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
-<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="abstract" mode="book.titlepage.verso.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
-<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="book.titlepage.verso.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" font-size="8pt">
-<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="part.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="partinfo/title">
-      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/title"/>
-    </xsl:when>
-    <xsl:when test="docinfo/title">
-      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="partinfo/subtitle">
-      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-</xsl:template>
-
-<xsl:template name="part.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="part.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="part.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="part.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="part.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="part.titlepage.before.recto"/>
-      <xsl:call-template name="part.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="part.titlepage.before.verso"/>
-      <xsl:call-template name="part.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="part.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="part.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="part.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="part.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="part.titlepage.recto.style" text-align="center" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}">
-<xsl:call-template name="division.title">
-<xsl:with-param name="node" select="ancestor-or-self::part[1]"/>
-</xsl:call-template>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="part.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="part.titlepage.recto.style" text-align="center" font-size="20.736pt" space-before="15.552pt" font-weight="bold" font-style="italic" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="partintro.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="partintroinfo/title">
-      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/title"/>
-    </xsl:when>
-    <xsl:when test="docinfo/title">
-      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="partintroinfo/subtitle">
-      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/corpauthor"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/authorgroup"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/author"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/author"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/othercredit"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/releaseinfo"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/copyright"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/copyright"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/legalnotice"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/pubdate"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revision"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revision"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revhistory"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revhistory"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/abstract"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/abstract"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
-<xsl:template name="partintro.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="partintro.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="partintro.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="partintro.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="partintro.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="partintro.titlepage.before.recto"/>
-      <xsl:call-template name="partintro.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="partintro.titlepage.before.verso"/>
-      <xsl:call-template name="partintro.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="partintro.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="partintro.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="partintro.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="partintro.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style" text-align="center" font-size="24.8832pt" font-weight="bold" space-before="1em" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="partintro.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style" text-align="center" font-size="14.4pt" font-weight="bold" font-style="italic" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="partintro.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
-<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="partintro.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
-<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="author" mode="partintro.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
-<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="partintro.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
-<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="partintro.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
-<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="copyright" mode="partintro.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
-<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="partintro.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
-<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="partintro.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
-<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="revision" mode="partintro.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
-<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="partintro.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
-<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="abstract" mode="partintro.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
-<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="reference.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="referenceinfo/title">
-      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/title"/>
-    </xsl:when>
-    <xsl:when test="docinfo/title">
-      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="referenceinfo/subtitle">
-      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/corpauthor"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/authorgroup"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/author"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/author"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/othercredit"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/releaseinfo"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/copyright"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/copyright"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/legalnotice"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/pubdate"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revision"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revision"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revhistory"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revhistory"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/abstract"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/abstract"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
-<xsl:template name="reference.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="reference.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="reference.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="reference.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="reference.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="reference.titlepage.before.recto"/>
-      <xsl:call-template name="reference.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="reference.titlepage.before.verso"/>
-      <xsl:call-template name="reference.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="reference.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="reference.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="reference.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="reference.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style" text-align="center" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}">
-<xsl:call-template name="division.title">
-<xsl:with-param name="node" select="ancestor-or-self::reference[1]"/>
-</xsl:call-template>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="reference.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style" font-family="{$title.fontset}" text-align="center">
-<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="reference.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
-<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="reference.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
-<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="author" mode="reference.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
-<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="reference.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
-<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="reference.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
-<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="copyright" mode="reference.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
-<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="reference.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
-<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="reference.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
-<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="revision" mode="reference.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
-<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="reference.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
-<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="abstract" mode="reference.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
-<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="refsynopsisdiv.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="refsynopsisdivinfo/title">
-      <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="refsynopsisdivinfo/title"/>
-    </xsl:when>
-    <xsl:when test="docinfo/title">
-      <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="docinfo/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-</xsl:template>
-
-<xsl:template name="refsynopsisdiv.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="refsynopsisdiv.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="refsynopsisdiv.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="refsynopsisdiv.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="refsynopsisdiv.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="refsynopsisdiv.titlepage.before.recto"/>
-      <xsl:call-template name="refsynopsisdiv.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="refsynopsisdiv.titlepage.before.verso"/>
-      <xsl:call-template name="refsynopsisdiv.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="refsynopsisdiv.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="refsynopsisdiv.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="refsynopsisdiv.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="refsynopsisdiv.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsynopsisdiv.titlepage.recto.style" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="refsynopsisdiv.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="refsection.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="refsectioninfo/title">
-      <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="refsectioninfo/title"/>
-    </xsl:when>
-    <xsl:when test="docinfo/title">
-      <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="docinfo/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-</xsl:template>
-
-<xsl:template name="refsection.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="refsection.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="refsection.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="refsection.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="refsection.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="refsection.titlepage.before.recto"/>
-      <xsl:call-template name="refsection.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="refsection.titlepage.before.verso"/>
-      <xsl:call-template name="refsection.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="refsection.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="refsection.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="refsection.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="refsection.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsection.titlepage.recto.style" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="refsection.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="refsect1.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="refsect1info/title">
-      <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="refsect1info/title"/>
-    </xsl:when>
-    <xsl:when test="docinfo/title">
-      <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="docinfo/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-</xsl:template>
-
-<xsl:template name="refsect1.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="refsect1.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="refsect1.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="refsect1.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="refsect1.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="refsect1.titlepage.before.recto"/>
-      <xsl:call-template name="refsect1.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="refsect1.titlepage.before.verso"/>
-      <xsl:call-template name="refsect1.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="refsect1.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="refsect1.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="refsect1.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="refsect1.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect1.titlepage.recto.style" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="refsect1.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="refsect2.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="refsect2info/title">
-      <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="refsect2info/title"/>
-    </xsl:when>
-    <xsl:when test="docinfo/title">
-      <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="docinfo/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-</xsl:template>
-
-<xsl:template name="refsect2.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="refsect2.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="refsect2.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="refsect2.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="refsect2.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="refsect2.titlepage.before.recto"/>
-      <xsl:call-template name="refsect2.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="refsect2.titlepage.before.verso"/>
-      <xsl:call-template name="refsect2.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="refsect2.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="refsect2.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="refsect2.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="refsect2.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect2.titlepage.recto.style" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="refsect2.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="refsect3.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="refsect3info/title">
-      <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="refsect3info/title"/>
-    </xsl:when>
-    <xsl:when test="docinfo/title">
-      <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="docinfo/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-</xsl:template>
-
-<xsl:template name="refsect3.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="refsect3.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="refsect3.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="refsect3.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="refsect3.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="refsect3.titlepage.before.recto"/>
-      <xsl:call-template name="refsect3.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="refsect3.titlepage.before.verso"/>
-      <xsl:call-template name="refsect3.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="refsect3.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="refsect3.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="refsect3.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="refsect3.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect3.titlepage.recto.style" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="refsect3.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="dedication.titlepage.recto">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="dedication.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
-<xsl:call-template name="component.title">
-<xsl:with-param name="node" select="ancestor-or-self::dedication[1]"/>
-</xsl:call-template></fo:block>
-  <xsl:choose>
-    <xsl:when test="dedicationinfo/subtitle">
-      <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="dedicationinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-</xsl:template>
-
-<xsl:template name="dedication.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="dedication.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="dedication.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="dedication.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="dedication.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="dedication.titlepage.before.recto"/>
-      <xsl:call-template name="dedication.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="dedication.titlepage.before.verso"/>
-      <xsl:call-template name="dedication.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="dedication.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="dedication.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="dedication.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="dedication.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="dedication.titlepage.recto.style" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="dedication.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="preface.titlepage.recto">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
-<xsl:call-template name="component.title">
-<xsl:with-param name="node" select="ancestor-or-self::preface[1]"/>
-</xsl:call-template></fo:block>
-  <xsl:choose>
-    <xsl:when test="prefaceinfo/subtitle">
-      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/corpauthor"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/authorgroup"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/author"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/author"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/othercredit"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/releaseinfo"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/copyright"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/copyright"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/legalnotice"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/pubdate"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revision"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revision"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revhistory"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revhistory"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/abstract"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/abstract"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
-<xsl:template name="preface.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="preface.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="preface.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="preface.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="preface.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="preface.titlepage.before.recto"/>
-      <xsl:call-template name="preface.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="preface.titlepage.before.verso"/>
-      <xsl:call-template name="preface.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="preface.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="preface.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="preface.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="preface.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="preface.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
-<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="preface.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
-<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="author" mode="preface.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
-<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="preface.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
-<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="preface.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
-<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="copyright" mode="preface.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
-<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="preface.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
-<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="preface.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
-<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="revision" mode="preface.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
-<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="preface.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
-<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="abstract" mode="preface.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
-<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="chapter.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="chapterinfo/title">
-      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/title"/>
-    </xsl:when>
-    <xsl:when test="docinfo/title">
-      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="chapterinfo/subtitle">
-      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/corpauthor"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/authorgroup"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/author"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/author"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/othercredit"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/releaseinfo"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/copyright"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/copyright"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/legalnotice"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/pubdate"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revision"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revision"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revhistory"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revhistory"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/abstract"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/abstract"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
-<xsl:template name="chapter.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="chapter.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="chapter.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="chapter.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="chapter.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$title.fontset}">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="chapter.titlepage.before.recto"/>
-      <xsl:call-template name="chapter.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block margin-left="{$title.margin.left}"><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="chapter.titlepage.before.verso"/>
-      <xsl:call-template name="chapter.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="chapter.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="chapter.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="chapter.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" font-size="24.8832pt" font-weight="bold">
-<xsl:call-template name="component.title">
-<xsl:with-param name="node" select="ancestor-or-self::chapter[1]"/>
-</xsl:call-template>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="chapter.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" font-style="italic" font-size="14.4pt" font-weight="bold">
-<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="chapter.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" space-after="0.5em" font-size="14.4pt">
-<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="chapter.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" space-after="0.5em" font-size="14.4pt">
-<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="author" mode="chapter.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" space-after="0.5em" font-size="14.4pt">
-<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="chapter.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
-<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="chapter.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
-<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="copyright" mode="chapter.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
-<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="chapter.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
-<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="chapter.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
-<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="revision" mode="chapter.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
-<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="chapter.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
-<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="abstract" mode="chapter.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
-<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="appendix.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="appendixinfo/title">
-      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/title"/>
-    </xsl:when>
-    <xsl:when test="docinfo/title">
-      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="appendixinfo/subtitle">
-      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/corpauthor"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/authorgroup"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/author"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/author"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/othercredit"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/releaseinfo"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/copyright"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/copyright"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/legalnotice"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/pubdate"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revision"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revision"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revhistory"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revhistory"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/abstract"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/abstract"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
-<xsl:template name="appendix.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="appendix.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="appendix.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="appendix.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="appendix.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="appendix.titlepage.before.recto"/>
-      <xsl:call-template name="appendix.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="appendix.titlepage.before.verso"/>
-      <xsl:call-template name="appendix.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="appendix.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="appendix.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="appendix.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="appendix.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-weight="bold" font-family="{$title.fontset}">
-<xsl:call-template name="component.title">
-<xsl:with-param name="node" select="ancestor-or-self::appendix[1]"/>
-</xsl:call-template>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="appendix.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="appendix.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
-<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="appendix.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
-<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="author" mode="appendix.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
-<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="appendix.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
-<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="appendix.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
-<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="copyright" mode="appendix.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
-<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="appendix.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
-<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="appendix.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
-<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="revision" mode="appendix.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
-<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="appendix.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
-<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="abstract" mode="appendix.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
-<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="section.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="sectioninfo/title">
-      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="sectioninfo/subtitle">
-      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/corpauthor"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/authorgroup"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/author"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/othercredit"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/releaseinfo"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/copyright"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/legalnotice"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/pubdate"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revision"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revhistory"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revhistory"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/abstract"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
-<xsl:template name="section.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="section.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="section.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="section.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="section.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="section.titlepage.before.recto"/>
-      <xsl:call-template name="section.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="section.titlepage.before.verso"/>
-      <xsl:call-template name="section.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="section.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="section.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="section.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="section.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="section.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="section.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
-<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="section.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
-<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="author" mode="section.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
-<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="section.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
-<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="section.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
-<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="copyright" mode="section.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
-<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="section.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
-<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="section.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
-<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="revision" mode="section.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
-<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="section.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
-<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="abstract" mode="section.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
-<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="sect1.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="sect1info/title">
-      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="sect1info/subtitle">
-      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/corpauthor"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/authorgroup"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/author"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/othercredit"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/releaseinfo"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/copyright"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/legalnotice"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/pubdate"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revision"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revhistory"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revhistory"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/abstract"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
-<xsl:template name="sect1.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="sect1.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="sect1.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="sect1.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="sect1.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="sect1.titlepage.before.recto"/>
-      <xsl:call-template name="sect1.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="sect1.titlepage.before.verso"/>
-      <xsl:call-template name="sect1.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="sect1.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="sect1.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="sect1.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="sect1.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="sect1.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="sect1.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="sect1.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="author" mode="sect1.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="sect1.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="sect1.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="copyright" mode="sect1.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="sect1.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="sect1.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="revision" mode="sect1.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="sect1.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="abstract" mode="sect1.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="sect2.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="sect2info/title">
-      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="sect2info/subtitle">
-      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/corpauthor"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/authorgroup"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/author"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/othercredit"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/releaseinfo"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/copyright"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/legalnotice"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/pubdate"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revision"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revhistory"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revhistory"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/abstract"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
-<xsl:template name="sect2.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="sect2.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="sect2.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="sect2.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="sect2.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="sect2.titlepage.before.recto"/>
-      <xsl:call-template name="sect2.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="sect2.titlepage.before.verso"/>
-      <xsl:call-template name="sect2.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="sect2.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="sect2.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="sect2.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="sect2.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="sect2.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="sect2.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="sect2.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="author" mode="sect2.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="sect2.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="sect2.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="copyright" mode="sect2.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="sect2.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="sect2.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="revision" mode="sect2.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="sect2.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="abstract" mode="sect2.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="sect3.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="sect3info/title">
-      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="sect3info/subtitle">
-      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/corpauthor"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/authorgroup"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/author"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/othercredit"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/releaseinfo"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/copyright"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/legalnotice"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/pubdate"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revision"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revhistory"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revhistory"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/abstract"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
-<xsl:template name="sect3.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="sect3.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="sect3.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="sect3.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="sect3.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="sect3.titlepage.before.recto"/>
-      <xsl:call-template name="sect3.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="sect3.titlepage.before.verso"/>
-      <xsl:call-template name="sect3.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="sect3.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="sect3.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="sect3.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="sect3.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="sect3.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="sect3.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="sect3.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="author" mode="sect3.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="sect3.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="sect3.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="copyright" mode="sect3.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="sect3.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="sect3.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="revision" mode="sect3.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="sect3.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="abstract" mode="sect3.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="sect4.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="sect4info/title">
-      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="sect4info/subtitle">
-      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/corpauthor"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/authorgroup"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/author"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/othercredit"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/releaseinfo"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/copyright"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/legalnotice"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/pubdate"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revision"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revhistory"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revhistory"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/abstract"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
-<xsl:template name="sect4.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="sect4.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="sect4.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="sect4.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="sect4.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="sect4.titlepage.before.recto"/>
-      <xsl:call-template name="sect4.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="sect4.titlepage.before.verso"/>
-      <xsl:call-template name="sect4.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="sect4.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="sect4.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="sect4.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="sect4.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="sect4.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="sect4.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="sect4.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="author" mode="sect4.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="sect4.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="sect4.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="copyright" mode="sect4.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="sect4.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="sect4.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="revision" mode="sect4.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="sect4.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="abstract" mode="sect4.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="sect5.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="sect5info/title">
-      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="sect5info/subtitle">
-      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/corpauthor"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/authorgroup"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/author"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/othercredit"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/releaseinfo"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/copyright"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/legalnotice"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/pubdate"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revision"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revhistory"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revhistory"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/abstract"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
-<xsl:template name="sect5.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="sect5.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="sect5.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="sect5.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="sect5.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="sect5.titlepage.before.recto"/>
-      <xsl:call-template name="sect5.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="sect5.titlepage.before.verso"/>
-      <xsl:call-template name="sect5.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="sect5.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="sect5.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="sect5.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="sect5.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="sect5.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="sect5.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="sect5.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="author" mode="sect5.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="sect5.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="sect5.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="copyright" mode="sect5.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="sect5.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="sect5.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="revision" mode="sect5.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="sect5.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="abstract" mode="sect5.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="simplesect.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="simplesectinfo/title">
-      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/title"/>
-    </xsl:when>
-    <xsl:when test="docinfo/title">
-      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="simplesectinfo/subtitle">
-      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/corpauthor"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/authorgroup"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/author"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/author"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/othercredit"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/releaseinfo"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/copyright"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/copyright"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/legalnotice"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/pubdate"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revision"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revision"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revhistory"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revhistory"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/abstract"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/abstract"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
-<xsl:template name="simplesect.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="simplesect.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="simplesect.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="simplesect.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="simplesect.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="simplesect.titlepage.before.recto"/>
-      <xsl:call-template name="simplesect.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="simplesect.titlepage.before.verso"/>
-      <xsl:call-template name="simplesect.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="simplesect.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="simplesect.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="simplesect.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="simplesect.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="simplesect.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="simplesect.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
-<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="simplesect.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
-<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="author" mode="simplesect.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
-<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="simplesect.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
-<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="simplesect.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
-<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="copyright" mode="simplesect.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
-<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="simplesect.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
-<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="simplesect.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
-<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="revision" mode="simplesect.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
-<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="simplesect.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
-<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="abstract" mode="simplesect.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
-<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="bibliography.titlepage.recto">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliography.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
-<xsl:call-template name="component.title">
-<xsl:with-param name="node" select="ancestor-or-self::bibliography[1]"/>
-</xsl:call-template></fo:block>
-  <xsl:choose>
-    <xsl:when test="bibliographyinfo/subtitle">
-      <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="bibliographyinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-</xsl:template>
-
-<xsl:template name="bibliography.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="bibliography.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="bibliography.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="bibliography.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="bibliography.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="bibliography.titlepage.before.recto"/>
-      <xsl:call-template name="bibliography.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="bibliography.titlepage.before.verso"/>
-      <xsl:call-template name="bibliography.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="bibliography.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="bibliography.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="bibliography.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="bibliography.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliography.titlepage.recto.style" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="bibliography.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="bibliodiv.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="bibliodivinfo/title">
-      <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="bibliodivinfo/title"/>
-    </xsl:when>
-    <xsl:when test="docinfo/title">
-      <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="docinfo/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="bibliodivinfo/subtitle">
-      <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="bibliodivinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-</xsl:template>
-
-<xsl:template name="bibliodiv.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="bibliodiv.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="bibliodiv.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="bibliodiv.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="bibliodiv.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="bibliodiv.titlepage.before.recto"/>
-      <xsl:call-template name="bibliodiv.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="bibliodiv.titlepage.before.verso"/>
-      <xsl:call-template name="bibliodiv.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="bibliodiv.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="bibliodiv.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="bibliodiv.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="bibliodiv.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliodiv.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="20.736pt" font-family="{$title.fontset}" font-weight="bold">
-<xsl:call-template name="component.title">
-<xsl:with-param name="node" select="ancestor-or-self::bibliodiv[1]"/>
-</xsl:call-template>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="bibliodiv.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliodiv.titlepage.recto.style" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="bibliodiv.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="glossary.titlepage.recto">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossary.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
-<xsl:call-template name="component.title">
-<xsl:with-param name="node" select="ancestor-or-self::glossary[1]"/>
-</xsl:call-template></fo:block>
-  <xsl:choose>
-    <xsl:when test="glossaryinfo/subtitle">
-      <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="glossaryinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-</xsl:template>
-
-<xsl:template name="glossary.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="glossary.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="glossary.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="glossary.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="glossary.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="glossary.titlepage.before.recto"/>
-      <xsl:call-template name="glossary.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="glossary.titlepage.before.verso"/>
-      <xsl:call-template name="glossary.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="glossary.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="glossary.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="glossary.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="glossary.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossary.titlepage.recto.style" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="glossary.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="glossdiv.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="glossdivinfo/title">
-      <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="glossdivinfo/title"/>
-    </xsl:when>
-    <xsl:when test="docinfo/title">
-      <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="docinfo/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="glossdivinfo/subtitle">
-      <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="glossdivinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-</xsl:template>
-
-<xsl:template name="glossdiv.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="glossdiv.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="glossdiv.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="glossdiv.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="glossdiv.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="glossdiv.titlepage.before.recto"/>
-      <xsl:call-template name="glossdiv.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="glossdiv.titlepage.before.verso"/>
-      <xsl:call-template name="glossdiv.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="glossdiv.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="glossdiv.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="glossdiv.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="glossdiv.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossdiv.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="20.736pt" font-family="{$title.fontset}" font-weight="bold">
-<xsl:call-template name="component.title">
-<xsl:with-param name="node" select="ancestor-or-self::glossdiv[1]"/>
-</xsl:call-template>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="glossdiv.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossdiv.titlepage.recto.style" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="glossdiv.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="index.titlepage.recto">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="index.titlepage.recto.style" margin-left="0pt" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
-<xsl:call-template name="component.title">
-<xsl:with-param name="node" select="ancestor-or-self::index[1]"/>
-<xsl:with-param name="pagewide" select="1"/>
-</xsl:call-template></fo:block>
-  <xsl:choose>
-    <xsl:when test="indexinfo/subtitle">
-      <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="indexinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-</xsl:template>
-
-<xsl:template name="index.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="index.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="index.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="index.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="index.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="index.titlepage.before.recto"/>
-      <xsl:call-template name="index.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="index.titlepage.before.verso"/>
-      <xsl:call-template name="index.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="index.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="index.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="index.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="index.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="index.titlepage.recto.style" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="index.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="indexdiv.titlepage.recto">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="indexdiv.titlepage.recto.style">
-<xsl:call-template name="indexdiv.title">
-<xsl:with-param name="title" select="title"/>
-</xsl:call-template></fo:block>
-  <xsl:choose>
-    <xsl:when test="indexdivinfo/subtitle">
-      <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="indexdivinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-</xsl:template>
-
-<xsl:template name="indexdiv.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="indexdiv.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="indexdiv.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="indexdiv.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="indexdiv.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="indexdiv.titlepage.before.recto"/>
-      <xsl:call-template name="indexdiv.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="indexdiv.titlepage.before.verso"/>
-      <xsl:call-template name="indexdiv.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="indexdiv.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="indexdiv.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="indexdiv.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="indexdiv.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="indexdiv.titlepage.recto.style" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="indexdiv.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="setindex.titlepage.recto">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="setindex.titlepage.recto.style" margin-left="0pt" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
-<xsl:call-template name="component.title">
-<xsl:with-param name="node" select="ancestor-or-self::setindex[1]"/>
-<xsl:with-param name="pagewide" select="1"/>
-</xsl:call-template></fo:block>
-  <xsl:choose>
-    <xsl:when test="setindexinfo/subtitle">
-      <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="setindexinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-</xsl:template>
-
-<xsl:template name="setindex.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="setindex.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="setindex.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="setindex.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="setindex.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="setindex.titlepage.before.recto"/>
-      <xsl:call-template name="setindex.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="setindex.titlepage.before.verso"/>
-      <xsl:call-template name="setindex.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="setindex.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="setindex.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="setindex.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="setindex.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="setindex.titlepage.recto.style" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="setindex.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="colophon.titlepage.recto">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="colophon.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
-<xsl:call-template name="component.title">
-<xsl:with-param name="node" select="ancestor-or-self::colophon[1]"/>
-</xsl:call-template></fo:block>
-  <xsl:choose>
-    <xsl:when test="colophoninfo/subtitle">
-      <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="colophoninfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-</xsl:template>
-
-<xsl:template name="colophon.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="colophon.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="colophon.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="colophon.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="colophon.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="colophon.titlepage.before.recto"/>
-      <xsl:call-template name="colophon.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="colophon.titlepage.before.verso"/>
-      <xsl:call-template name="colophon.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="colophon.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="colophon.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="colophon.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="colophon.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="colophon.titlepage.recto.style" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="colophon.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="sidebar.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="sidebarinfo/title">
-      <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="sidebarinfo/title"/>
-    </xsl:when>
-    <xsl:when test="docinfo/title">
-      <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="docinfo/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="sidebarinfo/subtitle">
-      <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="sidebarinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-</xsl:template>
-
-<xsl:template name="sidebar.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="sidebar.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="sidebar.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="sidebar.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="sidebar.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="sidebar.titlepage.before.recto"/>
-      <xsl:call-template name="sidebar.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="sidebar.titlepage.before.verso"/>
-      <xsl:call-template name="sidebar.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="sidebar.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="sidebar.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="sidebar.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="sidebar.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sidebar.titlepage.recto.style" font-family="{$title.fontset}" font-weight="bold">
-<xsl:apply-templates select="." mode="sidebar.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="sidebar.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sidebar.titlepage.recto.style" font-family="{$title.fontset}">
-<xsl:apply-templates select="." mode="sidebar.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="qandaset.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="qandasetinfo/title">
-      <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/title"/>
-    </xsl:when>
-    <xsl:when test="blockinfo/title">
-      <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="qandasetinfo/subtitle">
-      <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="blockinfo/subtitle">
-      <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/corpauthor"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/corpauthor"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/authorgroup"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/authorgroup"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/author"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/author"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/othercredit"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/othercredit"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/releaseinfo"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/releaseinfo"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/copyright"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/copyright"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/legalnotice"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/legalnotice"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/pubdate"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/pubdate"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/revision"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/revision"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/revhistory"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/revhistory"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/revhistory"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/abstract"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/abstract"/>
-  <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
-<xsl:template name="qandaset.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="qandaset.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="qandaset.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="qandaset.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="qandaset.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$title.fontset}">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="qandaset.titlepage.before.recto"/>
-      <xsl:call-template name="qandaset.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block start-indent="0pt" text-align="center"><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="qandaset.titlepage.before.verso"/>
-      <xsl:call-template name="qandaset.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="qandaset.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="qandaset.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="qandaset.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="qandaset.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" keep-with-next.within-column="always" font-size="24.8832pt" font-weight="bold">
-<xsl:call-template name="component.title">
-<xsl:with-param name="node" select="ancestor-or-self::qandaset[1]"/>
-</xsl:call-template>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="qandaset.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style">
-<xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="qandaset.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
-<xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="qandaset.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
-<xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="author" mode="qandaset.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
-<xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="qandaset.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
-<xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="qandaset.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
-<xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="copyright" mode="qandaset.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
-<xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="qandaset.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" text-align="start" margin-left="0.5in" margin-right="0.5in" font-family="{$body.fontset}">
-<xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="qandaset.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
-<xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="revision" mode="qandaset.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
-<xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="qandaset.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
-<xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template match="abstract" mode="qandaset.titlepage.recto.auto.mode">
-<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em" text-align="start" margin-left="0.5in" margin-right="0.5in" font-family="{$body.fontset}">
-<xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
-</fo:block>
-</xsl:template>
-
-<xsl:template name="table.of.contents.titlepage.recto">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="table.of.contents.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
-<xsl:call-template name="gentext">
-<xsl:with-param name="key" select="'TableofContents'"/>
-</xsl:call-template></fo:block>
-</xsl:template>
-
-<xsl:template name="table.of.contents.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="table.of.contents.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="table.of.contents.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="table.of.contents.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="table.of.contents.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="table.of.contents.titlepage.before.recto"/>
-      <xsl:call-template name="table.of.contents.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="table.of.contents.titlepage.before.verso"/>
-      <xsl:call-template name="table.of.contents.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="table.of.contents.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="table.of.contents.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="table.of.contents.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template name="list.of.tables.titlepage.recto">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.tables.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
-<xsl:call-template name="gentext">
-<xsl:with-param name="key" select="'ListofTables'"/>
-</xsl:call-template></fo:block>
-</xsl:template>
-
-<xsl:template name="list.of.tables.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="list.of.tables.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="list.of.tables.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="list.of.tables.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="list.of.tables.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="list.of.tables.titlepage.before.recto"/>
-      <xsl:call-template name="list.of.tables.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="list.of.tables.titlepage.before.verso"/>
-      <xsl:call-template name="list.of.tables.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="list.of.tables.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="list.of.tables.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="list.of.tables.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template name="list.of.figures.titlepage.recto">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.figures.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
-<xsl:call-template name="gentext">
-<xsl:with-param name="key" select="'ListofFigures'"/>
-</xsl:call-template></fo:block>
-</xsl:template>
-
-<xsl:template name="list.of.figures.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="list.of.figures.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="list.of.figures.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="list.of.figures.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="list.of.figures.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="list.of.figures.titlepage.before.recto"/>
-      <xsl:call-template name="list.of.figures.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="list.of.figures.titlepage.before.verso"/>
-      <xsl:call-template name="list.of.figures.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="list.of.figures.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="list.of.figures.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="list.of.figures.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template name="list.of.examples.titlepage.recto">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.examples.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
-<xsl:call-template name="gentext">
-<xsl:with-param name="key" select="'ListofExamples'"/>
-</xsl:call-template></fo:block>
-</xsl:template>
-
-<xsl:template name="list.of.examples.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="list.of.examples.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="list.of.examples.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="list.of.examples.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="list.of.examples.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="list.of.examples.titlepage.before.recto"/>
-      <xsl:call-template name="list.of.examples.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="list.of.examples.titlepage.before.verso"/>
-      <xsl:call-template name="list.of.examples.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="list.of.examples.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="list.of.examples.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="list.of.examples.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template name="list.of.equations.titlepage.recto">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.equations.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
-<xsl:call-template name="gentext">
-<xsl:with-param name="key" select="'ListofEquations'"/>
-</xsl:call-template></fo:block>
-</xsl:template>
-
-<xsl:template name="list.of.equations.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="list.of.equations.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="list.of.equations.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="list.of.equations.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="list.of.equations.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="list.of.equations.titlepage.before.recto"/>
-      <xsl:call-template name="list.of.equations.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="list.of.equations.titlepage.before.verso"/>
-      <xsl:call-template name="list.of.equations.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="list.of.equations.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="list.of.equations.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="list.of.equations.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template name="list.of.procedures.titlepage.recto">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.procedures.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
-<xsl:call-template name="gentext">
-<xsl:with-param name="key" select="'ListofProcedures'"/>
-</xsl:call-template></fo:block>
-</xsl:template>
-
-<xsl:template name="list.of.procedures.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="list.of.procedures.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="list.of.procedures.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="list.of.procedures.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="list.of.procedures.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="list.of.procedures.titlepage.before.recto"/>
-      <xsl:call-template name="list.of.procedures.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="list.of.procedures.titlepage.before.verso"/>
-      <xsl:call-template name="list.of.procedures.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="list.of.procedures.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="list.of.procedures.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="list.of.procedures.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template name="list.of.unknowns.titlepage.recto">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.unknowns.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
-<xsl:call-template name="gentext">
-<xsl:with-param name="key" select="'ListofUnknown'"/>
-</xsl:call-template></fo:block>
-</xsl:template>
-
-<xsl:template name="list.of.unknowns.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="list.of.unknowns.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="list.of.unknowns.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="list.of.unknowns.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="list.of.unknowns.titlepage">
-  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="list.of.unknowns.titlepage.before.recto"/>
-      <xsl:call-template name="list.of.unknowns.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="list.of.unknowns.titlepage.before.verso"/>
-      <xsl:call-template name="list.of.unknowns.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
-    </xsl:if>
-    <xsl:call-template name="list.of.unknowns.titlepage.separator"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="*" mode="list.of.unknowns.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="list.of.unknowns.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-</xsl:stylesheet>
-
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/titlepage.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/titlepage.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,738 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:attribute-set name="book.titlepage.recto.style">
-  <xsl:attribute name="font-family">
-    <xsl:value-of select="$title.fontset"/>
-  </xsl:attribute>
-  <xsl:attribute name="font-weight">bold</xsl:attribute>
-  <xsl:attribute name="font-size">12pt</xsl:attribute>
-  <xsl:attribute name="text-align">center</xsl:attribute>
-</xsl:attribute-set>
-
-<xsl:attribute-set name="book.titlepage.verso.style">
-  <xsl:attribute name="font-size">10pt</xsl:attribute>
-</xsl:attribute-set>
-
-<xsl:attribute-set name="article.titlepage.recto.style"/>
-<xsl:attribute-set name="article.titlepage.verso.style"/>
-
-<xsl:attribute-set name="set.titlepage.recto.style"/>
-<xsl:attribute-set name="set.titlepage.verso.style"/>
-
-<xsl:attribute-set name="part.titlepage.recto.style">
-  <xsl:attribute name="text-align">center</xsl:attribute>
-</xsl:attribute-set>
-
-<xsl:attribute-set name="part.titlepage.verso.style"/>
-
-<xsl:attribute-set name="partintro.titlepage.recto.style"/>
-<xsl:attribute-set name="partintro.titlepage.verso.style"/>
-
-<xsl:attribute-set name="reference.titlepage.recto.style"/>
-<xsl:attribute-set name="reference.titlepage.verso.style"/>
-
-<xsl:attribute-set name="dedication.titlepage.recto.style"/>
-<xsl:attribute-set name="dedication.titlepage.verso.style"/>
-
-<xsl:attribute-set name="preface.titlepage.recto.style"/>
-<xsl:attribute-set name="preface.titlepage.verso.style"/>
-
-<xsl:attribute-set name="chapter.titlepage.recto.style"/>
-<xsl:attribute-set name="chapter.titlepage.verso.style"/>
-
-<xsl:attribute-set name="appendix.titlepage.recto.style"/>
-<xsl:attribute-set name="appendix.titlepage.verso.style"/>
-
-<xsl:attribute-set name="bibliography.titlepage.recto.style"/>
-<xsl:attribute-set name="bibliography.titlepage.verso.style"/>
-
-<xsl:attribute-set name="bibliodiv.titlepage.recto.style"/>
-<xsl:attribute-set name="bibliodiv.titlepage.verso.style"/>
-
-<xsl:attribute-set name="glossary.titlepage.recto.style"/>
-<xsl:attribute-set name="glossary.titlepage.verso.style"/>
-
-<xsl:attribute-set name="glossdiv.titlepage.recto.style"/>
-<xsl:attribute-set name="glossdiv.titlepage.verso.style"/>
-
-<xsl:attribute-set name="index.titlepage.recto.style"/>
-<xsl:attribute-set name="index.titlepage.verso.style"/>
-
-<xsl:attribute-set name="setindex.titlepage.recto.style"/>
-<xsl:attribute-set name="setindex.titlepage.verso.style"/>
-
-<xsl:attribute-set name="indexdiv.titlepage.recto.style"/>
-<xsl:attribute-set name="indexdiv.titlepage.verso.style"/>
-
-<xsl:attribute-set name="colophon.titlepage.recto.style"/>
-<xsl:attribute-set name="colophon.titlepage.verso.style"/>
-
-<xsl:attribute-set name="sidebar.titlepage.recto.style"/>
-<xsl:attribute-set name="sidebar.titlepage.verso.style"/>
-
-<xsl:attribute-set name="qandaset.titlepage.recto.style"/>
-<xsl:attribute-set name="qandaset.titlepage.verso.style"/>
-
-<xsl:attribute-set name="section.titlepage.recto.style">
-  <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
-</xsl:attribute-set>
-
-<xsl:attribute-set name="section.titlepage.verso.style">
-  <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
-  <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
-</xsl:attribute-set>
-
-<xsl:attribute-set name="sect1.titlepage.recto.style"
-                   use-attribute-sets="section.titlepage.recto.style"/>
-<xsl:attribute-set name="sect1.titlepage.verso.style"
-                   use-attribute-sets="section.titlepage.verso.style"/>
-
-<xsl:attribute-set name="sect2.titlepage.recto.style"
-                   use-attribute-sets="section.titlepage.recto.style"/>
-<xsl:attribute-set name="sect2.titlepage.verso.style"
-                   use-attribute-sets="section.titlepage.verso.style"/>
-
-<xsl:attribute-set name="sect3.titlepage.recto.style"
-                   use-attribute-sets="section.titlepage.recto.style"/>
-<xsl:attribute-set name="sect3.titlepage.verso.style"
-                   use-attribute-sets="section.titlepage.verso.style"/>
-
-<xsl:attribute-set name="sect4.titlepage.recto.style"
-                   use-attribute-sets="section.titlepage.recto.style"/>
-<xsl:attribute-set name="sect4.titlepage.verso.style"
-                   use-attribute-sets="section.titlepage.verso.style"/>
-
-<xsl:attribute-set name="sect5.titlepage.recto.style"
-                   use-attribute-sets="section.titlepage.recto.style"/>
-<xsl:attribute-set name="sect5.titlepage.verso.style"
-                   use-attribute-sets="section.titlepage.verso.style"/>
-
-<xsl:attribute-set name="simplesect.titlepage.recto.style"
-                   use-attribute-sets="section.titlepage.recto.style"/>
-<xsl:attribute-set name="simplesect.titlepage.verso.style"
-                   use-attribute-sets="section.titlepage.verso.style"/>
-
-<xsl:attribute-set name="refnamediv.titlepage.recto.style"
-                   use-attribute-sets="section.titlepage.recto.style"/>
-<xsl:attribute-set name="refnamediv.titlepage.verso.style"
-                   use-attribute-sets="section.titlepage.verso.style"/>
-
-<xsl:attribute-set name="refsynopsisdiv.titlepage.recto.style"
-                   use-attribute-sets="section.titlepage.recto.style"/>
-<xsl:attribute-set name="refsynopsisdiv.titlepage.verso.style"
-                   use-attribute-sets="section.titlepage.verso.style"/>
-
-<xsl:attribute-set name="refsection.titlepage.recto.style"
-                   use-attribute-sets="section.titlepage.recto.style"/>
-<xsl:attribute-set name="refsection.titlepage.verso.style"
-                   use-attribute-sets="section.titlepage.verso.style"/>
-
-<xsl:attribute-set name="refsect1.titlepage.recto.style"
-                   use-attribute-sets="section.titlepage.recto.style"/>
-<xsl:attribute-set name="refsect1.titlepage.verso.style"
-                   use-attribute-sets="section.titlepage.verso.style"/>
-
-<xsl:attribute-set name="refsect2.titlepage.recto.style"
-                   use-attribute-sets="section.titlepage.recto.style"/>
-<xsl:attribute-set name="refsect2.titlepage.verso.style"
-                   use-attribute-sets="section.titlepage.verso.style"/>
-
-<xsl:attribute-set name="refsect3.titlepage.recto.style"
-                   use-attribute-sets="section.titlepage.recto.style"/>
-<xsl:attribute-set name="refsect3.titlepage.verso.style"
-                   use-attribute-sets="section.titlepage.verso.style"/>
-
-<xsl:attribute-set name="table.of.contents.titlepage.recto.style"/>
-<xsl:attribute-set name="table.of.contents.titlepage.verso.style"/>
-
-<xsl:attribute-set name="list.of.tables.titlepage.recto.style"/>
-<xsl:attribute-set name="list.of.tables.contents.titlepage.verso.style"/>
-
-<xsl:attribute-set name="list.of.figures.titlepage.recto.style"/>
-<xsl:attribute-set name="list.of.figures.contents.titlepage.verso.style"/>
-
-<xsl:attribute-set name="list.of.equations.titlepage.recto.style"/>
-<xsl:attribute-set name="list.of.equations.contents.titlepage.verso.style"/>
-
-<xsl:attribute-set name="list.of.examples.titlepage.recto.style"/>
-<xsl:attribute-set name="list.of.examples.contents.titlepage.verso.style"/>
-
-<xsl:attribute-set name="list.of.procedures.titlepage.recto.style"/>
-<xsl:attribute-set name="list.of.procedures.contents.titlepage.verso.style"/>
-
-<xsl:attribute-set name="list.of.unknowns.titlepage.recto.style"/>
-<xsl:attribute-set name="list.of.unknowns.contents.titlepage.verso.style"/>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="*" mode="titlepage.mode">
-  <!-- if an element isn't found in this mode, try the default mode -->
-  <xsl:apply-templates select="."/>
-</xsl:template>
-
-<xsl:template match="abbrev" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="abstract" mode="titlepage.mode">
-  <fo:block>
-    <xsl:call-template name="formal.object.heading">
-      <xsl:with-param name="title">
-        <xsl:apply-templates select="." mode="title.markup"/>
-      </xsl:with-param>
-    </xsl:call-template>
-    <xsl:apply-templates mode="titlepage.mode"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="abstract/title" mode="titlepage.mode"/>
-
-<xsl:template match="abstract/title" mode="titlepage.abstract.title.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="address" mode="titlepage.mode">
-  <!-- use the normal address handling code -->
-  <xsl:apply-templates select="."/>
-</xsl:template>
-
-<xsl:template match="affiliation" mode="titlepage.mode">
-  <fo:block>
-    <xsl:apply-templates mode="titlepage.mode"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="artpagenums" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="author" mode="titlepage.mode">
-  <fo:block>
-    <xsl:call-template name="anchor"/>
-    <xsl:call-template name="person.name"/>
-    <xsl:if test="affiliation/orgname">
-      <xsl:text>, </xsl:text>
-      <xsl:apply-templates select="affiliation/orgname" mode="titlepage.mode"/>
-    </xsl:if>
-    <xsl:if test="email|affiliation/address/email">
-      <xsl:text> </xsl:text>
-      <xsl:apply-templates select="(email|affiliation/address/email)[1]"/>
-    </xsl:if>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="authorblurb" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="titlepage.mode">
-  <fo:wrapper>
-    <xsl:call-template name="anchor"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-  </fo:wrapper>
-</xsl:template>
-
-<xsl:template match="authorinitials" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="bibliomisc" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="bibliomset" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="collab" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="confgroup" mode="titlepage.mode">
-  <fo:block>
-    <xsl:apply-templates mode="titlepage.mode"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="confdates" mode="titlepage.mode">
-  <fo:block>
-    <xsl:apply-templates mode="titlepage.mode"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="conftitle" mode="titlepage.mode">
-  <fo:block>
-    <xsl:apply-templates mode="titlepage.mode"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="confnum" mode="titlepage.mode">
-  <!-- suppress -->
-</xsl:template>
-
-<xsl:template match="contractnum" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="contractsponsor" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="contrib" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="copyright" mode="titlepage.mode">
-  <xsl:call-template name="gentext">
-    <xsl:with-param name="key" select="'Copyright'"/>
-  </xsl:call-template>
-  <xsl:call-template name="gentext.space"/>
-  <xsl:call-template name="dingbat">
-    <xsl:with-param name="dingbat">copyright</xsl:with-param>
-  </xsl:call-template>
-  <xsl:call-template name="gentext.space"/>
-  <xsl:call-template name="copyright.years">
-    <xsl:with-param name="years" select="year"/>
-    <xsl:with-param name="print.ranges" select="$make.year.ranges"/>
-    <xsl:with-param name="single.year.ranges"
-                    select="$make.single.year.ranges"/>
-  </xsl:call-template>
-  <xsl:call-template name="gentext.space"/>
-  <xsl:apply-templates select="holder" mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="year" mode="titlepage.mode">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="holder" mode="titlepage.mode">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="corpcredit" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="corpname" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="date" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="edition" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-  <xsl:call-template name="gentext.space"/>
-  <xsl:call-template name="gentext">
-    <xsl:with-param name="key" select="'Edition'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="editor" mode="titlepage.mode">
-  <!-- The first editor is dealt with in the following template,
-       which in turn displays all editors of the same mode. -->
-</xsl:template>
-
-<xsl:template match="editor[1]" priority="2" mode="titlepage.mode">
-  <xsl:call-template name="gentext.edited.by"/>
-  <xsl:call-template name="gentext.space"/>
-  <xsl:call-template name="person.name.list">
-    <xsl:with-param name="person.list" select="../editor"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="firstname" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="graphic" mode="titlepage.mode">
-  <!-- use the normal graphic handling code -->
-  <xsl:apply-templates select="."/>
-</xsl:template>
-
-<xsl:template match="honorific" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="isbn" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="issn" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="biblioid" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="itermset" mode="titlepage.mode">
-  <!-- discard -->
-</xsl:template>
-
-<xsl:template match="invpartnumber" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="issuenum" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="jobtitle" mode="titlepage.mode">
-  <fo:block>
-    <xsl:apply-templates mode="titlepage.mode"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="keywordset" mode="titlepage.mode">
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="titlepage.mode">
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <fo:block id="{$id}">
-    <xsl:if test="title"> <!-- FIXME: add param for using default title? -->
-      <xsl:call-template name="formal.object.heading"/>
-    </xsl:if>
-    <xsl:apply-templates mode="titlepage.mode"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="legalnotice/title" mode="titlepage.mode">
-</xsl:template>
-
-<xsl:template match="lineage" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="modespec" mode="titlepage.mode">
-  <!-- discard -->
-</xsl:template>
-
-<xsl:template match="orgdiv" mode="titlepage.mode">
-  <xsl:if test="preceding-sibling::*[1][self::orgname]">
-    <xsl:text> </xsl:text>
-  </xsl:if>
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="orgname" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="titlepage.mode">
-  <xsl:variable name="contrib" select="string(contrib)"/>
-  <xsl:choose>
-    <xsl:when test="contrib">
-      <xsl:if test="not(preceding-sibling::othercredit[string(contrib)=$contrib])">
-        <fo:block>
-          <xsl:apply-templates mode="titlepage.mode" select="contrib"/>
-          <xsl:text>: </xsl:text>
-          <xsl:call-template name="person.name"/>
-          <xsl:apply-templates mode="titlepage.mode" select="affiliation"/>
-          <xsl:apply-templates select="following-sibling::othercredit[string(contrib)=$contrib]" mode="titlepage.othercredits"/>
-        </fo:block>
-      </xsl:if>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:block><xsl:call-template name="person.name"/></fo:block>
-      <xsl:apply-templates mode="titlepage.mode" select="./affiliation"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="titlepage.othercredits">
-  <xsl:text>, </xsl:text>
-  <xsl:call-template name="person.name"/>
-</xsl:template>
-
-<xsl:template match="othername" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="pagenums" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="printhistory" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="productname" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="productnumber" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="publisher" mode="titlepage.mode">
-  <fo:block>
-    <xsl:apply-templates mode="titlepage.mode"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="publishername" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="pubsnumber" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="titlepage.mode">
-
-  <xsl:variable name="explicit.table.width">
-    <xsl:call-template name="pi.dbfo_table-width"/>
-  </xsl:variable>
-
-  <xsl:variable name="table.width">
-    <xsl:choose>
-      <xsl:when test="$explicit.table.width != ''">
-        <xsl:value-of select="$explicit.table.width"/>
-      </xsl:when>
-      <xsl:when test="$default.table.width = ''">
-        <xsl:text>100%</xsl:text>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$default.table.width"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <fo:table table-layout="fixed" width="{$table.width}" xsl:use-attribute-sets="revhistory.table.properties">
-    <fo:table-column column-number="1" column-width="proportional-column-width(1)"/>
-    <fo:table-column column-number="2" column-width="proportional-column-width(1)"/>
-    <fo:table-column column-number="3" column-width="proportional-column-width(1)"/>
-    <fo:table-body start-indent="0pt" end-indent="0pt">
-      <fo:table-row>
-        <fo:table-cell number-columns-spanned="3" xsl:use-attribute-sets="revhistory.table.cell.properties">
-          <fo:block xsl:use-attribute-sets="revhistory.title.properties">
-            <xsl:call-template name="gentext">
-              <xsl:with-param name="key" select="'RevHistory'"/>
-            </xsl:call-template>
-          </fo:block>
-        </fo:table-cell>
-      </fo:table-row>
-      <xsl:apply-templates mode="titlepage.mode"/>
-    </fo:table-body>
-  </fo:table>
-</xsl:template>
-
-<xsl:template match="revhistory/revision" mode="titlepage.mode">
-  <xsl:variable name="revnumber" select="revnumber"/>
-  <xsl:variable name="revdate"   select="date"/>
-  <xsl:variable name="revauthor" select="authorinitials|author"/>
-  <xsl:variable name="revremark" select="revremark|revdescription"/>
-  <fo:table-row>
-    <fo:table-cell xsl:use-attribute-sets="revhistory.table.cell.properties">
-      <fo:block>
-        <xsl:if test="$revnumber">
-          <xsl:call-template name="gentext">
-            <xsl:with-param name="key" select="'Revision'"/>
-          </xsl:call-template>
-          <xsl:call-template name="gentext.space"/>
-          <xsl:apply-templates select="$revnumber[1]" mode="titlepage.mode"/>
-        </xsl:if>
-      </fo:block>
-    </fo:table-cell>
-    <fo:table-cell xsl:use-attribute-sets="revhistory.table.cell.properties">
-      <fo:block>
-        <xsl:apply-templates select="$revdate[1]" mode="titlepage.mode"/>
-      </fo:block>
-    </fo:table-cell>
-    <fo:table-cell xsl:use-attribute-sets="revhistory.table.cell.properties">
-      <fo:block>
-        <xsl:for-each select="$revauthor">
-          <xsl:apply-templates select="." mode="titlepage.mode"/>
-          <xsl:if test="position() != last()">
-            <xsl:text>, </xsl:text>
-          </xsl:if>
-        </xsl:for-each>
-      </fo:block>
-    </fo:table-cell>
-  </fo:table-row>
-  <xsl:if test="$revremark">
-    <fo:table-row>
-      <fo:table-cell number-columns-spanned="3" xsl:use-attribute-sets="revhistory.table.cell.properties">
-        <fo:block>
-          <xsl:apply-templates select="$revremark[1]" mode="titlepage.mode"/>
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="revision/revnumber" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="revision/date" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="revision/authorinitials" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="revision/author" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="revision/revremark" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="revision/revdescription" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="seriesvolnums" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="shortaffil" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="subjectset" mode="titlepage.mode">
-  <!-- discard -->
-</xsl:template>
-
-<xsl:template match="subtitle" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="surname" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="titleabbrev" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="volumenum" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-<!-- Book templates -->
-
-<!-- Note: these templates cannot use *.titlepage.recto.mode or
-     *.titlepage.verso.mode. If they do then subsequent use of a custom
-     titlepage.templates.xml file will not work correctly. -->
-
-<!-- book recto -->
-
-<xsl:template match="bookinfo/authorgroup|info/authorgroup"
-              mode="titlepage.mode" priority="2">
-  <fo:block>
-    <xsl:call-template name="anchor"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-  </fo:block>
-</xsl:template>
-
-<!-- book verso -->
-
-<xsl:template name="book.verso.title">
-  <fo:block>
-    <xsl:apply-templates mode="titlepage.mode"/>
-
-    <xsl:if test="following-sibling::subtitle
-                  |following-sibling::info/subtitle
-                  |following-sibling::bookinfo/subtitle">
-      <xsl:text>: </xsl:text>
-
-      <xsl:apply-templates select="(following-sibling::subtitle
-                                   |following-sibling::info/subtitle
-                                   |following-sibling::bookinfo/subtitle)[1]"
-                           mode="book.verso.subtitle.mode"/>
-    </xsl:if>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="book.verso.subtitle.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-  <xsl:if test="following-sibling::subtitle">
-    <xsl:text>: </xsl:text>
-    <xsl:apply-templates select="following-sibling::subtitle[1]"
-                         mode="book.verso.subtitle.mode"/>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="verso.authorgroup">
-  <fo:block>
-    <xsl:call-template name="gentext">
-      <xsl:with-param name="key" select="'by'"/>
-    </xsl:call-template>
-    <xsl:text> </xsl:text>
-    <xsl:call-template name="person.name.list">
-      <xsl:with-param name="person.list" select="author|corpauthor|editor"/>
-    </xsl:call-template>
-  </fo:block>
-  <xsl:apply-templates select="othercredit" mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="bookinfo/author|info/author"
-              mode="titlepage.mode" priority="2">
-  <fo:block>
-    <xsl:call-template name="person.name"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="bookinfo/corpauthor|info/corpauthor"
-              mode="titlepage.mode" priority="2">
-  <fo:block>
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="bookinfo/pubdate|info/pubdate"
-              mode="titlepage.mode" priority="2">
-  <fo:block>
-    <xsl:call-template name="gentext">
-      <xsl:with-param name="key" select="'published'"/>
-    </xsl:call-template>
-    <xsl:text> </xsl:text>
-    <xsl:apply-templates mode="titlepage.mode"/>
-  </fo:block>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/toc.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/toc.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,280 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<!-- FIXME: in the contexts where <toc> can occur, I think it's always
-     the case that a page-sequence is required. Is that true? -->
-
-<xsl:template match="toc">
-  <xsl:variable name="master-reference">
-    <xsl:call-template name="select.pagemaster"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="*">
-      <xsl:if test="$process.source.toc != 0">
-        <!-- if the toc isn't empty, process it -->
-        <fo:page-sequence hyphenate="{$hyphenate}"
-                          master-reference="{$master-reference}">
-          <xsl:attribute name="language">
-            <xsl:call-template name="l10n.language"/>
-          </xsl:attribute>
-          <xsl:attribute name="format">
-            <xsl:call-template name="page.number.format">
-              <xsl:with-param name="element" select="'toc'"/>
-              <xsl:with-param name="master-reference" 
-                              select="$master-reference"/>
-            </xsl:call-template>
-          </xsl:attribute>
-
-          <xsl:attribute name="initial-page-number">
-            <xsl:call-template name="initial.page.number">
-              <xsl:with-param name="element" select="'toc'"/>
-              <xsl:with-param name="master-reference" 
-                              select="$master-reference"/>
-            </xsl:call-template>
-          </xsl:attribute>
-
-          <xsl:attribute name="force-page-count">
-            <xsl:call-template name="force.page.count">
-              <xsl:with-param name="master-reference" 
-	                      select="$master-reference"/>
-            </xsl:call-template>
-          </xsl:attribute>
-
-          <xsl:attribute name="hyphenation-character">
-            <xsl:call-template name="gentext">
-              <xsl:with-param name="key" select="'hyphenation-character'"/>
-            </xsl:call-template>
-          </xsl:attribute>
-          <xsl:attribute name="hyphenation-push-character-count">
-            <xsl:call-template name="gentext">
-              <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
-            </xsl:call-template>
-          </xsl:attribute>
-          <xsl:attribute name="hyphenation-remain-character-count">
-            <xsl:call-template name="gentext">
-              <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
-            </xsl:call-template>
-          </xsl:attribute>
-
-          <xsl:apply-templates select="." mode="running.head.mode">
-            <xsl:with-param name="master-reference" select="$master-reference"/>
-          </xsl:apply-templates>
-          <xsl:apply-templates select="." mode="running.foot.mode">
-            <xsl:with-param name="master-reference" select="$master-reference"/>
-          </xsl:apply-templates>
-
-          <fo:flow flow-name="xsl-region-body">
-            <xsl:call-template name="set.flow.properties">
-              <xsl:with-param name="element" select="local-name(.)"/>
-              <xsl:with-param name="master-reference" 
-                              select="$master-reference"/>
-            </xsl:call-template>
-
-            <fo:block xsl:use-attribute-sets="toc.margin.properties">
-              <xsl:call-template name="table.of.contents.titlepage"/>
-              <xsl:apply-templates/>
-            </fo:block>
-          </fo:flow>
-        </fo:page-sequence>
-      </xsl:if>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:if test="$process.empty.source.toc != 0">
-        <fo:page-sequence hyphenate="{$hyphenate}"
-                          master-reference="{$master-reference}">
-          <xsl:attribute name="language">
-            <xsl:call-template name="l10n.language"/>
-          </xsl:attribute>
-          <xsl:attribute name="format">
-            <xsl:call-template name="page.number.format">
-              <xsl:with-param name="element" select="'toc'"/>
-              <xsl:with-param name="master-reference" 
-                              select="$master-reference"/>
-            </xsl:call-template>
-          </xsl:attribute>
-
-          <xsl:attribute name="initial-page-number">
-            <xsl:call-template name="initial.page.number">
-              <xsl:with-param name="element" select="'toc'"/>
-              <xsl:with-param name="master-reference" 
-                              select="$master-reference"/>
-            </xsl:call-template>
-          </xsl:attribute>
-
-          <xsl:attribute name="hyphenation-character">
-            <xsl:call-template name="gentext">
-              <xsl:with-param name="key" select="'hyphenation-character'"/>
-            </xsl:call-template>
-          </xsl:attribute>
-          <xsl:attribute name="hyphenation-push-character-count">
-            <xsl:call-template name="gentext">
-              <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
-            </xsl:call-template>
-          </xsl:attribute>
-          <xsl:attribute name="hyphenation-remain-character-count">
-            <xsl:call-template name="gentext">
-              <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
-            </xsl:call-template>
-          </xsl:attribute>
-
-          <xsl:apply-templates select="." mode="running.head.mode">
-            <xsl:with-param name="master-reference" select="$master-reference"/>
-          </xsl:apply-templates>
-          <xsl:apply-templates select="." mode="running.foot.mode">
-            <xsl:with-param name="master-reference" select="$master-reference"/>
-          </xsl:apply-templates>
-
-          <fo:flow flow-name="xsl-region-body">
-            <xsl:choose>
-              <xsl:when test="parent::section
-                              or parent::sect1
-                              or parent::sect2
-                              or parent::sect3
-                              or parent::sect4
-                              or parent::sect5">
-                <xsl:apply-templates select="parent::*"
-                                     mode="toc.for.section"/>
-              </xsl:when>
-              <xsl:when test="parent::article">
-                <xsl:apply-templates select="parent::*"
-                                     mode="toc.for.component"/>
-              </xsl:when>
-              <xsl:when test="parent::book
-                              or parent::part">
-                <xsl:apply-templates select="parent::*"
-                                     mode="toc.for.division"/>
-              </xsl:when>
-              <xsl:when test="parent::set">
-                <xsl:apply-templates select="parent::*"
-                                     mode="toc.for.set"/>
-              </xsl:when>
-              <!-- there aren't any other contexts that allow toc -->
-              <xsl:otherwise>
-                <xsl:message>
-                  <xsl:text>I don't know how to make a TOC in this context!</xsl:text>
-                </xsl:message>
-              </xsl:otherwise>
-            </xsl:choose>
-          </fo:flow>
-        </fo:page-sequence>
-      </xsl:if>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="tocpart|tocchap
-                     |toclevel1|toclevel2|toclevel3|toclevel4|toclevel5">
-  <xsl:apply-templates select="tocentry"/>
-  <xsl:if test="tocchap|toclevel1|toclevel2|toclevel3|toclevel4|toclevel5">
-    <fo:block start-indent="{count(ancestor::*)*2}pc">
-      <xsl:apply-templates select="tocchap|toclevel1|toclevel2|toclevel3|toclevel4|toclevel5"/>
-    </fo:block>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="tocentry|tocfront|tocback">
-  <fo:block text-align-last="justify"
-            end-indent="2pc"
-            last-line-end-indent="-2pc">
-    <fo:inline keep-with-next.within-line="always">
-      <xsl:choose>
-        <xsl:when test="@linkend">
-          <fo:basic-link internal-destination="{@linkend}">
-            <xsl:apply-templates/>
-          </fo:basic-link>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </fo:inline>
-
-    <xsl:choose>
-      <xsl:when test="@linkend">
-        <fo:inline keep-together.within-line="always">
-          <xsl:text> </xsl:text>
-          <fo:leader leader-pattern="dots"
-                     keep-with-next.within-line="always"/>
-          <xsl:text> </xsl:text>
-          <fo:basic-link internal-destination="{@linkend}">
-            <xsl:choose>
-              <xsl:when test="@pagenum">
-                <xsl:value-of select="@pagenum"/>
-              </xsl:when>
-              <xsl:otherwise>
-                <fo:page-number-citation ref-id="{@linkend}"/>
-              </xsl:otherwise>
-            </xsl:choose>
-          </fo:basic-link>
-        </fo:inline>
-      </xsl:when>
-      <xsl:when test="@pagenum">
-        <fo:inline keep-together.within-line="always">
-          <xsl:text> </xsl:text>
-          <fo:leader leader-pattern="dots"
-                     keep-with-next.within-line="always"/>
-          <xsl:text> </xsl:text>
-          <xsl:value-of select="@pagenum"/>
-        </fo:inline>
-      </xsl:when>
-      <xsl:otherwise>
-        <!-- just the leaders, what else can I do? -->
-        <fo:inline keep-together.within-line="always">
-          <xsl:text> </xsl:text>
-          <fo:leader leader-pattern="space"
-                     keep-with-next.within-line="always"/>
-        </fo:inline>
-      </xsl:otherwise>
-    </xsl:choose>
-  </fo:block>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="*" mode="toc.for.section">
-<!--
-  <xsl:call-template name="section.toc"/>
--->
-</xsl:template>
-
-<xsl:template match="*" mode="toc.for.component">
-  <xsl:call-template name="component.toc"/>
-</xsl:template>
-
-<xsl:template match="*" mode="toc.for.section">
-<!--
-  <xsl:call-template name="section.toc"/>
--->
-</xsl:template>
-
-<xsl:template match="*" mode="toc.for.division">
-  <xsl:call-template name="division.toc"/>
-</xsl:template>
-
-<xsl:template match="*" mode="toc.for.set">
-<!--
-  <xsl:call-template name="set.toc"/>
--->
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="lot|lotentry">
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/verbatim.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/verbatim.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,417 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                xmlns:sverb="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Verbatim"
-                xmlns:xverb="com.nwalsh.xalan.Verbatim"
-                xmlns:lxslt="http://xml.apache.org/xslt"
-                xmlns:exsl="http://exslt.org/common"
-                exclude-result-prefixes="sverb xverb lxslt exsl"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<xsl:include href="../highlighting/common.xsl"/>
-<xsl:include href="highlight.xsl"/>
-
-<lxslt:component prefix="xverb"
-                 functions="numberLines"/>
-
-<xsl:template match="programlisting|screen|synopsis">
-  <xsl:param name="suppress-numbers" select="'0'"/>
-  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
-
-  <xsl:variable name="content">
-    <xsl:choose>
-      <xsl:when test="$suppress-numbers = '0'
-                      and @linenumbering = 'numbered'
-                      and $use.extensions != '0'
-                      and $linenumbering.extension != '0'">
-        <xsl:call-template name="number.rtf.lines">
-          <xsl:with-param name="rtf">
-	    <xsl:call-template name="apply-highlighting"/>
-          </xsl:with-param>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-	<xsl:call-template name="apply-highlighting"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$shade.verbatim != 0">
-      <fo:block id="{$id}"
-                xsl:use-attribute-sets="monospace.verbatim.properties shade.verbatim.style">
-        <xsl:choose>
-          <xsl:when test="$hyphenate.verbatim != 0 and function-available('exsl:node-set')">
-            <xsl:apply-templates select="exsl:node-set($content)" mode="hyphenate.verbatim"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:copy-of select="$content"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </fo:block>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:block id="{$id}"
-                xsl:use-attribute-sets="monospace.verbatim.properties">
-        <xsl:choose>
-          <xsl:when test="$hyphenate.verbatim != 0 and function-available('exsl:node-set')">
-            <xsl:apply-templates select="exsl:node-set($content)" mode="hyphenate.verbatim"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:copy-of select="$content"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </fo:block>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="literallayout">
-  <xsl:param name="suppress-numbers" select="'0'"/>
-
-  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
-
-  <xsl:variable name="content">
-    <xsl:choose>
-      <xsl:when test="$suppress-numbers = '0'
-                      and @linenumbering = 'numbered'
-                      and $use.extensions != '0'
-                      and $linenumbering.extension != '0'">
-        <xsl:call-template name="number.rtf.lines">
-          <xsl:with-param name="rtf">
-            <xsl:apply-templates/>
-          </xsl:with-param>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:apply-templates/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="@class='monospaced'">
-      <xsl:choose>
-        <xsl:when test="$shade.verbatim != 0">
-          <fo:block id="{$id}"
-                    xsl:use-attribute-sets="monospace.verbatim.properties shade.verbatim.style">
-
-            <xsl:copy-of select="$content"/>
-          </fo:block>
-        </xsl:when>
-        <xsl:otherwise>
-          <fo:block id="{$id}"
-                    xsl:use-attribute-sets="monospace.verbatim.properties">
-            <xsl:copy-of select="$content"/>
-          </fo:block>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="$shade.verbatim != 0">
-          <fo:block id="{$id}"
-                    xsl:use-attribute-sets="verbatim.properties shade.verbatim.style">
-            <xsl:copy-of select="$content"/>
-          </fo:block>
-        </xsl:when>
-        <xsl:otherwise>
-          <fo:block id="{$id}"
-                    xsl:use-attribute-sets="verbatim.properties">
-            <xsl:copy-of select="$content"/>
-          </fo:block>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="address">
-  <xsl:param name="suppress-numbers" select="'0'"/>
-
-  <xsl:variable name="content">
-    <xsl:choose>
-      <xsl:when test="$suppress-numbers = '0'
-                      and @linenumbering = 'numbered'
-                      and $use.extensions != '0'
-                      and $linenumbering.extension != '0'">
-        <xsl:call-template name="number.rtf.lines">
-          <xsl:with-param name="rtf">
-            <xsl:apply-templates/>
-          </xsl:with-param>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:apply-templates/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <fo:block xsl:use-attribute-sets="verbatim.properties">
-    <xsl:copy-of select="$content"/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template name="number.rtf.lines">
-  <xsl:param name="rtf" select="''"/>
-  <xsl:param name="pi.context" select="."/>
-
-  <!-- Save the global values -->
-  <xsl:variable name="global.linenumbering.everyNth"
-                select="$linenumbering.everyNth"/>
-
-  <xsl:variable name="global.linenumbering.separator"
-                select="$linenumbering.separator"/>
-
-  <xsl:variable name="global.linenumbering.width"
-                select="$linenumbering.width"/>
-
-  <!-- Extract the <?dbfo linenumbering.*?> PI values -->
-  <xsl:variable name="pi.linenumbering.everyNth">
-    <xsl:call-template name="pi.dbfo_linenumbering.everyNth">
-      <xsl:with-param name="node" select="$pi.context"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="pi.linenumbering.separator">
-    <xsl:call-template name="pi.dbfo_linenumbering.separator">
-      <xsl:with-param name="node" select="$pi.context"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="pi.linenumbering.width">
-    <xsl:call-template name="pi.dbfo_linenumbering.width">
-      <xsl:with-param name="node" select="$pi.context"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <!-- Construct the 'in-context' values -->
-  <xsl:variable name="linenumbering.everyNth">
-    <xsl:choose>
-      <xsl:when test="$pi.linenumbering.everyNth != ''">
-        <xsl:value-of select="$pi.linenumbering.everyNth"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$global.linenumbering.everyNth"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="linenumbering.separator">
-    <xsl:choose>
-      <xsl:when test="$pi.linenumbering.separator != ''">
-        <xsl:value-of select="$pi.linenumbering.separator"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$global.linenumbering.separator"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="linenumbering.width">
-    <xsl:choose>
-      <xsl:when test="$pi.linenumbering.width != ''">
-        <xsl:value-of select="$pi.linenumbering.width"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$global.linenumbering.width"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="linenumbering.startinglinenumber">
-    <xsl:choose>
-      <xsl:when test="$pi.context/@startinglinenumber">
-        <xsl:value-of select="$pi.context/@startinglinenumber"/>
-      </xsl:when>
-      <xsl:when test="$pi.context/@continuation='continues'">
-        <xsl:variable name="lastLine">
-          <xsl:choose>
-            <xsl:when test="$pi.context/self::programlisting">
-              <xsl:call-template name="lastLineNumber">
-                <xsl:with-param name="listings"
-                     select="preceding::programlisting[@linenumbering='numbered']"/>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:when test="$pi.context/self::screen">
-              <xsl:call-template name="lastLineNumber">
-                <xsl:with-param name="listings"
-                     select="preceding::screen[@linenumbering='numbered']"/>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:when test="$pi.context/self::literallayout">
-              <xsl:call-template name="lastLineNumber">
-                <xsl:with-param name="listings"
-                     select="preceding::literallayout[@linenumbering='numbered']"/>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:when test="$pi.context/self::address">
-              <xsl:call-template name="lastLineNumber">
-                <xsl:with-param name="listings"
-                     select="preceding::address[@linenumbering='numbered']"/>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:when test="$pi.context/self::synopsis">
-              <xsl:call-template name="lastLineNumber">
-                <xsl:with-param name="listings"
-                     select="preceding::synopsis[@linenumbering='numbered']"/>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:message>
-                <xsl:text>Unexpected verbatim environment: </xsl:text>
-                <xsl:value-of select="local-name(.)"/>
-              </xsl:message>
-              <xsl:value-of select="0"/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:variable>
-
-        <xsl:value-of select="$lastLine + 1"/>
-      </xsl:when>
-      <xsl:otherwise>1</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="function-available('sverb:numberLines')">
-      <xsl:copy-of select="sverb:numberLines($rtf)"/>
-    </xsl:when>
-    <xsl:when test="function-available('xverb:numberLines')">
-      <xsl:copy-of select="xverb:numberLines($rtf)"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:message terminate="yes">
-        <xsl:text>No numberLines function available.</xsl:text>
-      </xsl:message>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ======================================================================== -->
-
-<xsl:template name="lastLineNumber">
-  <xsl:param name="listings"/>
-  <xsl:param name="number" select="0"/>
-
-  <xsl:variable name="lines">
-    <xsl:call-template name="countLines">
-      <xsl:with-param name="listing" select="string($listings[1])"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="not($listings)">
-      <xsl:value-of select="$number"/>
-    </xsl:when>
-    <xsl:when test="$listings[1]/@startinglinenumber">
-      <xsl:value-of select="$number + $listings[1]/@startinglinenumber + $lines - 1"/>
-    </xsl:when>
-    <xsl:when test="$listings[1]/@continuation='continues'">
-      <xsl:call-template name="lastLineNumber">
-        <xsl:with-param name="listings" select="listings[position() &gt; 1]"/>
-        <xsl:with-param name="number" select="$number + $lines"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$lines"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="countLines">
-  <xsl:param name="listing"/>
-  <xsl:param name="count" select="1"/>
-
-  <xsl:choose>
-    <xsl:when test="contains($listing, '&#10;')">
-      <xsl:call-template name="countLines">
-        <xsl:with-param name="listing" select="substring-after($listing, '&#10;')"/>
-        <xsl:with-param name="count" select="$count + 1"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$count"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ======================================================================== -->
-
-<xsl:template match="node()|@*" mode="hyphenate.verbatim">
-  <xsl:copy>
-    <xsl:copy-of select="@*"/>
-    <xsl:apply-templates mode="hyphenate.verbatim"/>
-  </xsl:copy>
-</xsl:template>
-
-<xsl:template match="text()" mode="hyphenate.verbatim" priority="2">
-  <xsl:call-template name="hyphenate.verbatim.block">
-    <xsl:with-param name="content" select="."/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="hyphenate.verbatim.block">
-  <xsl:param name="content" select="''"/>
-  <xsl:param name="count" select="1"/>
-
-  <!-- recurse on lines first to keep recursion depth reasonable -->
-  <xsl:choose>
-    <xsl:when test="contains($content, '&#xA;')">
-      <xsl:variable name="line" select="substring-before($content, '&#xA;')"/>
-      <xsl:variable name="rest" select="substring-after($content, '&#xA;')"/>
-      <xsl:call-template name="hyphenate.verbatim">
-        <xsl:with-param name="content" select="concat($line, '&#xA;')"/>
-      </xsl:call-template>
-      <xsl:call-template name="hyphenate.verbatim.block">
-        <xsl:with-param name="content" select="$rest"/>
-        <xsl:with-param name="count" select="$count + 1"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="hyphenate.verbatim">
-        <xsl:with-param name="content" select="$content"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-  
-</xsl:template>
-
-<xsl:template name="hyphenate.verbatim">
-  <xsl:param name="content"/>
-  <xsl:variable name="head" select="substring($content, 1, 1)"/>
-  <xsl:variable name="tail" select="substring($content, 2)"/>
-  <xsl:choose>
-    <!-- Place soft-hyphen after space or non-breakable space. -->
-    <xsl:when test="$head = ' ' or $head = '&#160;'">
-      <xsl:text>&#160;</xsl:text>
-      <xsl:text>&#x00AD;</xsl:text>
-    </xsl:when>
-    <xsl:when test="$hyphenate.verbatim.characters != '' and
-                    translate($head, $hyphenate.verbatim.characters, '') = '' and not($tail = '')">
-      <xsl:value-of select="$head"/>
-      <xsl:text>&#x00AD;</xsl:text>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$head"/>
-    </xsl:otherwise>
-  </xsl:choose>
-  <xsl:if test="$tail">
-    <xsl:call-template name="hyphenate.verbatim">
-      <xsl:with-param name="content" select="$tail"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/xep.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/xep.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,180 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                xmlns:rx="http://www.renderx.com/XSL/Extensions"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-     (c) Stephane Bline Peregrine Systems 2001
-     Implementation of xep extensions:
-       * Pdf bookmarks (based on the XEP 2.5 implementation)
-       * Document information (XEP 2.5 meta information extensions)
-     ******************************************************************** -->
-
-<!-- FIXME: Norm, I changed things so that the top-level element (book or set)
-     does not appear in the TOC. Is this the right thing? -->
-
-<xsl:template name="xep-document-information">
-  <rx:meta-info>
-    <xsl:variable name="authors" 
-                  select="(//author|//editor|//corpauthor|//authorgroup)[1]"/>
-    <xsl:if test="$authors">
-      <xsl:variable name="author">
-        <xsl:choose>
-          <xsl:when test="$authors[self::authorgroup]">
-            <xsl:call-template name="person.name.list">
-              <xsl:with-param name="person.list" 
-                        select="$authors/*[self::author|self::corpauthor|
-                               self::othercredit|self::editor]"/>
-            </xsl:call-template>
-          </xsl:when>
-          <xsl:when test="$authors[self::corpauthor]">
-            <xsl:value-of select="$authors"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:call-template name="person.name">
-              <xsl:with-param name="node" select="$authors"/>
-            </xsl:call-template>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:variable>
-      <xsl:element name="rx:meta-field">
-        <xsl:attribute name="name">author</xsl:attribute>
-        <xsl:attribute name="value">
-          <xsl:value-of select="normalize-space($author)"/>
-        </xsl:attribute>
-      </xsl:element>
-    </xsl:if>
-
-    <xsl:variable name="title">
-      <xsl:apply-templates select="/*[1]" mode="label.markup"/>
-      <xsl:apply-templates select="/*[1]" mode="title.markup"/>
-    </xsl:variable>
-
-    <xsl:element name="rx:meta-field">
-      <xsl:attribute name="name">creator</xsl:attribute>
-      <xsl:attribute name="value">
-        <xsl:text>DocBook </xsl:text>
-        <xsl:value-of select="$DistroTitle"/>
-        <xsl:text> V</xsl:text>
-        <xsl:value-of select="$VERSION"/>
-      </xsl:attribute>
-    </xsl:element>
-
-    <xsl:element name="rx:meta-field">
-      <xsl:attribute name="name">title</xsl:attribute>
-      <xsl:attribute name="value">
-        <xsl:value-of select="normalize-space($title)"/>
-      </xsl:attribute>
-    </xsl:element>
-
-    <xsl:if test="//keyword">
-      <xsl:element name="rx:meta-field">
-        <xsl:attribute name="name">keywords</xsl:attribute>
-        <xsl:attribute name="value">
-          <xsl:for-each select="//keyword">
-            <xsl:value-of select="normalize-space(.)"/>
-            <xsl:if test="position() != last()">
-              <xsl:text>, </xsl:text>
-            </xsl:if>
-          </xsl:for-each>
-        </xsl:attribute>
-      </xsl:element>
-    </xsl:if>
-
-    <xsl:if test="//subjectterm">
-      <xsl:element name="rx:meta-field">
-        <xsl:attribute name="name">subject</xsl:attribute>
-        <xsl:attribute name="value">
-          <xsl:for-each select="//subjectterm">
-            <xsl:value-of select="normalize-space(.)"/>
-            <xsl:if test="position() != last()">
-              <xsl:text>, </xsl:text>
-            </xsl:if>
-          </xsl:for-each>
-        </xsl:attribute>
-      </xsl:element>
-    </xsl:if>
-  </rx:meta-info>
-</xsl:template>
-
-<!-- ********************************************************************
-     Pdf bookmarks
-     ******************************************************************** -->
-
-<xsl:template match="*" mode="xep.outline">
-  <xsl:apply-templates select="*" mode="xep.outline"/>
-</xsl:template>
-
-<xsl:template match="set|book|part|reference|preface|chapter|appendix|article
-                     |glossary|bibliography|index|setindex
-                     |refentry|refsynopsisdiv
-                     |refsect1|refsect2|refsect3|refsection
-                     |sect1|sect2|sect3|sect4|sect5|section"
-              mode="xep.outline">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-  <xsl:variable name="bookmark-label">
-    <xsl:apply-templates select="." mode="object.title.markup"/>
-  </xsl:variable>
-
-  <!-- Put the root element bookmark at the same level as its children -->
-  <!-- If the object is a set or book, generate a bookmark for the toc -->
-
-  <xsl:choose>
-    <xsl:when test="parent::*">
-      <rx:bookmark internal-destination="{$id}">
-        <rx:bookmark-label>
-          <xsl:value-of select="normalize-space($bookmark-label)"/>
-        </rx:bookmark-label>
-        <xsl:apply-templates select="*" mode="xep.outline"/>
-      </rx:bookmark>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:if test="$bookmark-label != ''">
-        <rx:bookmark internal-destination="{$id}">
-          <rx:bookmark-label>
-            <xsl:value-of select="normalize-space($bookmark-label)"/>
-          </rx:bookmark-label>
-        </rx:bookmark>
-      </xsl:if>
-
-      <xsl:variable name="toc.params">
-        <xsl:call-template name="find.path.params">
-          <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:if test="contains($toc.params, 'toc')
-                    and set|book|part|reference|section|sect1|refentry
-                        |article|bibliography|glossary|chapter
-                        |appendix">
-        <rx:bookmark internal-destination="toc...{$id}">
-          <rx:bookmark-label>
-            <xsl:call-template name="gentext">
-              <xsl:with-param name="key" select="'TableofContents'"/>
-            </xsl:call-template>
-          </rx:bookmark-label>
-        </rx:bookmark>
-      </xsl:if>
-      <xsl:apply-templates select="*" mode="xep.outline"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="xep-pis">
-  <xsl:if test="$crop.marks != 0">
-    <xsl:processing-instruction name="xep-pdf-crop-mark-width"><xsl:value-of select="$crop.mark.width"/></xsl:processing-instruction>
-    <xsl:processing-instruction name="xep-pdf-crop-offset"><xsl:value-of select="$crop.mark.offset"/></xsl:processing-instruction>
-    <xsl:processing-instruction name="xep-pdf-bleed"><xsl:value-of select="$crop.mark.bleed"/></xsl:processing-instruction>
-  </xsl:if>
-
-  <xsl:call-template name="user-xep-pis"/>
-</xsl:template>
-
-<!-- Placeholder for user defined PIs -->
-<xsl:template name="user-xep-pis"/>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/xref.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/xref.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,1440 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                xmlns:exsl="http://exslt.org/common"
-                xmlns:xlink='http://www.w3.org/1999/xlink'
-                exclude-result-prefixes="exsl"
-                version='1.0'>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- Use internal variable for olink xlink role for consistency -->
-<xsl:variable 
-      name="xolink.role">http://docbook.org/xlink/role/olink</xsl:variable>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="anchor">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-  <fo:inline id="{$id}"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="xref" name="xref">
-  <xsl:param name="xhref" select="@xlink:href"/>
-  <!-- is the @xlink:href a local idref link? -->
-  <xsl:param name="xlink.idref">
-    <xsl:if test="starts-with($xhref,'#')
-                  and (not(contains($xhref,'&#40;'))
-                  or starts-with($xhref, '#xpointer&#40;id&#40;'))">
-      <xsl:call-template name="xpointer.idref">
-        <xsl:with-param name="xpointer" select="$xhref"/>
-      </xsl:call-template>
-   </xsl:if>
-  </xsl:param>
-  <xsl:param name="xlink.targets" select="key('id',$xlink.idref)"/>
-  <xsl:param name="linkend.targets" select="key('id',@linkend)"/>
-  <xsl:param name="target" select="($xlink.targets | $linkend.targets)[1]"/>
-  <xsl:param name="refelem" select="local-name($target)"/>
-
-  <xsl:variable name="xrefstyle">
-    <xsl:choose>
-      <xsl:when test="@role and not(@xrefstyle) 
-                      and $use.role.as.xrefstyle != 0">
-        <xsl:value-of select="@role"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="@xrefstyle"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="content">
-    <fo:inline xsl:use-attribute-sets="xref.properties">
-      <xsl:choose>
-        <xsl:when test="@endterm">
-          <xsl:variable name="etargets" select="key('id',@endterm)"/>
-          <xsl:variable name="etarget" select="$etargets[1]"/>
-          <xsl:choose>
-            <xsl:when test="count($etarget) = 0">
-              <xsl:message>
-                <xsl:value-of select="count($etargets)"/>
-                <xsl:text>Endterm points to nonexistent ID: </xsl:text>
-                <xsl:value-of select="@endterm"/>
-              </xsl:message>
-              <xsl:text>???</xsl:text>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:apply-templates select="$etarget" mode="endterm"/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-  
-        <xsl:when test="$target/@xreflabel">
-          <xsl:call-template name="xref.xreflabel">
-            <xsl:with-param name="target" select="$target"/>
-          </xsl:call-template>
-        </xsl:when>
-  
-        <xsl:when test="$target">
-          <xsl:if test="not(parent::citation)">
-            <xsl:apply-templates select="$target" mode="xref-to-prefix"/>
-          </xsl:if>
-  
-          <xsl:apply-templates select="$target" mode="xref-to">
-            <xsl:with-param name="referrer" select="."/>
-            <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-          </xsl:apply-templates>
-  
-          <xsl:if test="not(parent::citation)">
-            <xsl:apply-templates select="$target" mode="xref-to-suffix"/>
-          </xsl:if>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:message>
-            <xsl:text>ERROR: xref linking to </xsl:text>
-            <xsl:value-of select="@linkend|@xlink:href"/>
-            <xsl:text> has no generated link text.</xsl:text>
-          </xsl:message>
-          <xsl:text>???</xsl:text>
-        </xsl:otherwise>
-      </xsl:choose>
-    </fo:inline>
-  </xsl:variable>
-
-  <!-- Convert it into an active link -->
-  <xsl:call-template name="simple.xlink">
-    <xsl:with-param name="content" select="$content"/>
-  </xsl:call-template>
-
-  <!-- Add standard page reference? -->
-  <xsl:choose>
-    <xsl:when test="not($target)">
-      <!-- page numbers only for local targets -->
-    </xsl:when>
-    <xsl:when test="starts-with(normalize-space($xrefstyle), 'select:') 
-                  and contains($xrefstyle, 'nopage')">
-      <!-- negative xrefstyle in instance turns it off -->
-    </xsl:when>
-    <!-- positive xrefstyle already handles it -->
-    <xsl:when test="not(starts-with(normalize-space($xrefstyle), 'select:') 
-                  and (contains($xrefstyle, 'page')
-                       or contains($xrefstyle, 'Page')))
-                  and ( $insert.xref.page.number = 'yes' 
-                     or $insert.xref.page.number = '1')
-                  or local-name($target) = 'para'">
-      <xsl:apply-templates select="$target" mode="page.citation">
-        <xsl:with-param name="id" select="$target/@id|$target/@xml:id"/>
-      </xsl:apply-templates>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<!-- Handled largely like an xref -->
-<!-- To be done: add support for begin, end, and units attributes -->
-<xsl:template match="biblioref" name="biblioref">
-  <xsl:variable name="targets" select="key('id',@linkend)"/>
-  <xsl:variable name="target" select="$targets[1]"/>
-  <xsl:variable name="refelem" select="local-name($target)"/>
-
-  <xsl:call-template name="check.id.unique">
-    <xsl:with-param name="linkend" select="@linkend"/>
-  </xsl:call-template>
-
-  <xsl:choose>
-    <xsl:when test="$refelem=''">
-      <xsl:message>
-        <xsl:text>XRef to nonexistent id: </xsl:text>
-        <xsl:value-of select="@linkend"/>
-      </xsl:message>
-      <xsl:text>???</xsl:text>
-    </xsl:when>
-
-    <xsl:when test="@endterm">
-      <fo:basic-link internal-destination="{@linkend}"
-                     xsl:use-attribute-sets="xref.properties">
-        <xsl:variable name="etargets" select="key('id',@endterm)"/>
-        <xsl:variable name="etarget" select="$etargets[1]"/>
-        <xsl:choose>
-          <xsl:when test="count($etarget) = 0">
-            <xsl:message>
-              <xsl:value-of select="count($etargets)"/>
-              <xsl:text>Endterm points to nonexistent ID: </xsl:text>
-              <xsl:value-of select="@endterm"/>
-            </xsl:message>
-            <xsl:text>???</xsl:text>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:apply-templates select="$etarget" mode="endterm"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </fo:basic-link>
-    </xsl:when>
-
-    <xsl:when test="$target/@xreflabel">
-      <fo:basic-link internal-destination="{@linkend}"
-                     xsl:use-attribute-sets="xref.properties">
-        <xsl:call-template name="xref.xreflabel">
-          <xsl:with-param name="target" select="$target"/>
-        </xsl:call-template>
-      </fo:basic-link>
-    </xsl:when>
-
-    <xsl:otherwise>
-      <xsl:if test="not(parent::citation)">
-        <xsl:apply-templates select="$target" mode="xref-to-prefix"/>
-      </xsl:if>
-
-      <fo:basic-link internal-destination="{@linkend}"
-                     xsl:use-attribute-sets="xref.properties">
-        <xsl:apply-templates select="$target" mode="xref-to">
-          <xsl:with-param name="referrer" select="."/>
-          <xsl:with-param name="xrefstyle">
-            <xsl:choose>
-              <xsl:when test="@role and not(@xrefstyle) and $use.role.as.xrefstyle != 0">
-                <xsl:value-of select="@role"/>
-              </xsl:when>
-              <xsl:otherwise>
-                <xsl:value-of select="@xrefstyle"/>
-              </xsl:otherwise>
-            </xsl:choose>
-          </xsl:with-param>
-        </xsl:apply-templates>
-      </fo:basic-link>
-
-      <xsl:if test="not(parent::citation)">
-        <xsl:apply-templates select="$target" mode="xref-to-suffix"/>
-      </xsl:if>
-    </xsl:otherwise>
-  </xsl:choose>
-
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="*" mode="endterm">
-  <!-- Process the children of the endterm element -->
-  <xsl:variable name="endterm">
-    <xsl:apply-templates select="child::node()"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="function-available('exsl:node-set')">
-      <xsl:apply-templates select="exsl:node-set($endterm)" mode="remove-ids"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy-of select="$endterm"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="*" mode="remove-ids">
-  <xsl:copy>
-    <xsl:for-each select="@*">
-      <xsl:choose>
-        <xsl:when test="name(.) != 'id'">
-          <xsl:copy/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:message>removing <xsl:value-of select="name(.)"/></xsl:message>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:for-each>
-    <xsl:apply-templates mode="remove-ids"/>
-  </xsl:copy>
-</xsl:template>
-
-<!--- ==================================================================== -->
-
-<xsl:template match="*" mode="xref-to-prefix"/>
-<xsl:template match="*" mode="xref-to-suffix"/>
-
-<xsl:template match="*" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-
-  <xsl:if test="$verbose != 0">
-    <xsl:message>
-      <xsl:text>Don't know what gentext to create for xref to: "</xsl:text>
-      <xsl:value-of select="name(.)"/>
-      <xsl:text>"</xsl:text>
-    </xsl:message>
-    <xsl:text>???</xsl:text>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="title" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <!-- if you xref to a title, xref to the parent... -->
-  <xsl:choose>
-    <!-- FIXME: how reliable is this? -->
-    <xsl:when test="contains(local-name(parent::*), 'info')">
-      <xsl:apply-templates select="parent::*[2]" mode="xref-to">
-        <xsl:with-param name="referrer" select="$referrer"/>
-        <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-        <xsl:with-param name="verbose" select="$verbose"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates select="parent::*" mode="xref-to">
-        <xsl:with-param name="referrer" select="$referrer"/>
-        <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-        <xsl:with-param name="verbose" select="$verbose"/>
-      </xsl:apply-templates>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="abstract|article|authorblurb|bibliodiv|bibliomset
-                     |biblioset|blockquote|calloutlist|caution|colophon
-                     |constraintdef|formalpara|glossdiv|important|indexdiv
-                     |itemizedlist|legalnotice|lot|msg|msgexplan|msgmain
-                     |msgrel|msgset|msgsub|note|orderedlist|partintro
-                     |productionset|qandadiv|refsynopsisdiv|segmentedlist
-                     |set|setindex|sidebar|tip|toc|variablelist|warning"
-              mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <!-- catch-all for things with (possibly optional) titles -->
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="author|editor|othercredit|personname" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:call-template name="person.name"/>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:call-template name="person.name.list"/>
-</xsl:template>
-
-<xsl:template match="figure|example|table|equation" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="procedure" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose"/>
-
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="task" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose"/>
-
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="cmdsynopsis" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="(.//command)[1]" mode="xref"/>
-</xsl:template>
-
-<xsl:template match="funcsynopsis" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="(.//function)[1]" mode="xref"/>
-</xsl:template>
-
-<xsl:template match="dedication|preface|chapter|appendix" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="bibliography" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="biblioentry|bibliomixed" mode="xref-to-prefix">
-  <xsl:text>[</xsl:text>
-</xsl:template>
-
-<xsl:template match="biblioentry|bibliomixed" mode="xref-to-suffix">
-  <xsl:text>]</xsl:text>
-</xsl:template>
-
-<xsl:template match="biblioentry|bibliomixed" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <!-- handles both biblioentry and bibliomixed -->
-  <xsl:choose>
-    <xsl:when test="string(.) = ''">
-      <xsl:variable name="bib" select="document($bibliography.collection,.)"/>
-      <xsl:variable name="id" select="(@id|@xml:id)[1]"/>
-      <xsl:variable name="entry" select="$bib/bibliography/
-                                         *[@id=$id or @xml:id=$id][1]"/>
-      <xsl:choose>
-        <xsl:when test="$entry">
-          <xsl:choose>
-            <xsl:when test="$bibliography.numbered != 0">
-              <xsl:number from="bibliography" count="biblioentry|bibliomixed"
-                          level="any" format="1"/>
-            </xsl:when>
-            <xsl:when test="local-name($entry/*[1]) = 'abbrev'">
-              <xsl:apply-templates select="$entry/*[1]"/>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:value-of select="(@id|@xml:id)[1]"/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:message>
-            <xsl:text>No bibliography entry: </xsl:text>
-            <xsl:value-of select="$id"/>
-            <xsl:text> found in </xsl:text>
-            <xsl:value-of select="$bibliography.collection"/>
-          </xsl:message>
-          <xsl:value-of select="(@id|@xml:id)[1]"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="$bibliography.numbered != 0">
-          <xsl:number from="bibliography" count="biblioentry|bibliomixed"
-                      level="any" format="1"/>
-        </xsl:when>
-        <xsl:when test="local-name(*[1]) = 'abbrev'">
-          <xsl:apply-templates select="*[1]"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="(@id|@xml:id)[1]"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="glossary" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="glossentry" mode="xref-to">
-  <xsl:choose>
-    <xsl:when test="$glossentry.show.acronym = 'primary'">
-      <xsl:choose>
-        <xsl:when test="acronym|abbrev">
-          <xsl:apply-templates select="(acronym|abbrev)[1]"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates select="glossterm[1]" mode="xref-to"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates select="glossterm[1]" mode="xref-to"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="glossterm" mode="xref-to">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="index" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="listitem" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="section|simplesect
-                     |sect1|sect2|sect3|sect4|sect5
-                     |refsect1|refsect2|refsect3|refsection" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-  <!-- What about "in Chapter X"? -->
-</xsl:template>
-
-<xsl:template match="bridgehead" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-  <!-- What about "in Chapter X"? -->
-</xsl:template>
-
-<xsl:template match="qandaset" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="qandadiv" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="qandaentry" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="question[1]" mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="question|answer" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="part|reference" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="refentry" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:choose>
-    <xsl:when test="refmeta/refentrytitle">
-      <xsl:apply-templates select="refmeta/refentrytitle"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates select="refnamediv/refname[1]"/>
-    </xsl:otherwise>
-  </xsl:choose>
-  <xsl:apply-templates select="refmeta/manvolnum"/>
-</xsl:template>
-
-<xsl:template match="refnamediv" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="refname[1]" mode="xref-to">
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="refname" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates mode="xref-to">
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="step" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:call-template name="gentext">
-    <xsl:with-param name="key" select="'Step'"/>
-  </xsl:call-template>
-  <xsl:text> </xsl:text>
-  <xsl:apply-templates select="." mode="number"/>
-</xsl:template>
-
-<xsl:template match="varlistentry" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="term[1]" mode="xref-to">
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="varlistentry/term" mode="xref-to">
-  <xsl:param name="verbose" select="1"/>
-  <!-- to avoid the comma that will be generated if there are several terms -->
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="co" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="." mode="callout-bug"/>
-</xsl:template>
-
-<xsl:template match="area|areaset" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-
-  <xsl:call-template name="callout-bug">
-    <xsl:with-param name="conum">
-      <xsl:apply-templates select="." mode="conumber"/>
-    </xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="book" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="para" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose"/>
-
-  <xsl:variable name="context" select="(ancestor::simplesect
-                                       |ancestor::section
-                                       |ancestor::sect1
-                                       |ancestor::sect2
-                                       |ancestor::sect3
-                                       |ancestor::sect4
-                                       |ancestor::sect5
-                                       |ancestor::refsection
-                                       |ancestor::refsect1
-                                       |ancestor::refsect2
-                                       |ancestor::refsect3
-                                       |ancestor::chapter
-                                       |ancestor::appendix
-                                       |ancestor::preface
-                                       |ancestor::partintro
-                                       |ancestor::dedication
-                                       |ancestor::colophon
-                                       |ancestor::bibliography
-                                       |ancestor::index
-                                       |ancestor::glossary
-                                       |ancestor::glossentry
-                                       |ancestor::listitem
-                                       |ancestor::varlistentry)[last()]"/>
-
-  <xsl:apply-templates select="$context" mode="xref-to">
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="link" name="link">
-  <xsl:param name="linkend" select="@linkend"/>
-  <xsl:param name="targets" select="key('id',$linkend)"/>
-  <xsl:param name="target" select="$targets[1]"/>
-
-  <xsl:variable name="xrefstyle">
-    <xsl:choose>
-      <xsl:when test="@role and not(@xrefstyle) 
-                      and $use.role.as.xrefstyle != 0">
-        <xsl:value-of select="@role"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="@xrefstyle"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="content">
-    <fo:inline xsl:use-attribute-sets="xref.properties">
-      <xsl:choose>
-        <xsl:when test="count(child::node()) &gt; 0">
-          <!-- If it has content, use it -->
-          <xsl:apply-templates/>
-        </xsl:when>
-        <!-- look for an endterm -->
-        <xsl:when test="@endterm">
-          <xsl:variable name="etargets" select="key('id',@endterm)"/>
-          <xsl:variable name="etarget" select="$etargets[1]"/>
-          <xsl:choose>
-            <xsl:when test="count($etarget) = 0">
-              <xsl:message>
-                <xsl:value-of select="count($etargets)"/>
-                <xsl:text>Endterm points to nonexistent ID: </xsl:text>
-                <xsl:value-of select="@endterm"/>
-              </xsl:message>
-              <xsl:text>???</xsl:text>
-            </xsl:when>
-            <xsl:otherwise>
-                <xsl:apply-templates select="$etarget" mode="endterm"/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-        <!-- Use the xlink:href if no other text -->
-        <xsl:when test="@xlink:href">
-          <xsl:value-of select="@xlink:href"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:message>
-            <xsl:text>Link element has no content and no Endterm. </xsl:text>
-            <xsl:text>Nothing to show in the link to </xsl:text>
-            <xsl:value-of select="$target"/>
-          </xsl:message>
-          <xsl:text>???</xsl:text>
-        </xsl:otherwise>
-      </xsl:choose>
-    </fo:inline>
-  </xsl:variable>
-
-  <xsl:call-template name="simple.xlink">
-    <xsl:with-param name="node" select="."/>
-    <xsl:with-param name="linkend" select="$linkend"/>
-    <xsl:with-param name="content" select="$content"/>
-  </xsl:call-template>
-
-  <!-- Add standard page reference? -->
-  <xsl:choose>
-    <!-- page numbering on link only enabled for @linkend -->
-    <!-- There is no link element in DB5 with xlink:href -->
-    <xsl:when test="not($linkend)">
-    </xsl:when>
-    <!-- negative xrefstyle in instance turns it off -->
-    <xsl:when test="starts-with(normalize-space($xrefstyle), 'select:') 
-                  and contains($xrefstyle, 'nopage')">
-    </xsl:when>
-    <xsl:when test="(starts-with(normalize-space($xrefstyle), 'select:') 
-                  and $insert.link.page.number = 'maybe'  
-                  and (contains($xrefstyle, 'page')
-                       or contains($xrefstyle, 'Page')))
-                  or ( $insert.link.page.number = 'yes' 
-                     or $insert.link.page.number = '1')
-                  or local-name($target) = 'para'">
-      <xsl:apply-templates select="$target" mode="page.citation">
-        <xsl:with-param name="id" select="$linkend"/>
-      </xsl:apply-templates>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="ulink" name="ulink">
-  <xsl:param name="url" select="@url"/>
-
-  <xsl:variable name ="ulink.url">
-    <xsl:call-template name="fo-external-image">
-      <xsl:with-param name="filename" select="$url"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <fo:basic-link xsl:use-attribute-sets="xref.properties"
-                 external-destination="{$ulink.url}">
-    <xsl:choose>
-      <xsl:when test="count(child::node())=0">
-        <xsl:call-template name="hyphenate-url">
-          <xsl:with-param name="url" select="$url"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:apply-templates/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </fo:basic-link>
-
-  <xsl:if test="count(child::node()) != 0
-                and string(.) != $url
-                and $ulink.show != 0">
-    <!-- yes, show the URI -->
-    <xsl:choose>
-      <xsl:when test="$ulink.footnotes != 0 and not(ancestor::footnote)">
-        <fo:footnote>
-          <xsl:call-template name="ulink.footnote.number"/>
-          <fo:footnote-body xsl:use-attribute-sets="footnote.properties">
-            <fo:block>
-              <xsl:call-template name="ulink.footnote.number"/>
-              <xsl:text> </xsl:text>
-              <fo:basic-link external-destination="{$ulink.url}">
-                <xsl:value-of select="$url"/>
-              </fo:basic-link>
-            </fo:block>
-          </fo:footnote-body>
-        </fo:footnote>
-      </xsl:when>
-      <xsl:otherwise>
-        <fo:inline hyphenate="false">
-          <xsl:text> [</xsl:text>
-          <fo:basic-link external-destination="{$ulink.url}">
-            <xsl:call-template name="hyphenate-url">
-              <xsl:with-param name="url" select="$url"/>
-            </xsl:call-template>
-          </fo:basic-link>
-          <xsl:text>]</xsl:text>
-        </fo:inline>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:if>
-
-</xsl:template>
-
-<xsl:template name="ulink.footnote.number">
-  <fo:inline xsl:use-attribute-sets="footnote.mark.properties">
-    <xsl:choose>
-      <xsl:when test="$fop.extensions != 0">
-        <xsl:attribute name="vertical-align">super</xsl:attribute>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:attribute name="baseline-shift">super</xsl:attribute>
-      </xsl:otherwise>
-    </xsl:choose>
-    <xsl:variable name="fnum">
-      <!-- FIXME: list in @from is probably not complete -->
-      <xsl:number level="any" 
-                  from="chapter|appendix|preface|article|refentry|bibliography[not(parent::article)]" 
-                  count="footnote[not(@label)][not(ancestor::tgroup)]|ulink[node()][@url != .][not(ancestor::footnote)]" 
-                  format="1"/>
-    </xsl:variable>
-    <xsl:choose>
-      <xsl:when test="string-length($footnote.number.symbols) &gt;= $fnum">
-        <xsl:value-of select="substring($footnote.number.symbols, $fnum, 1)"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:number value="$fnum" format="{$footnote.number.format}"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </fo:inline>
-</xsl:template>
-
-<xsl:template name="hyphenate-url">
-  <xsl:param name="url" select="''"/>
-  <xsl:choose>
-    <xsl:when test="$ulink.hyphenate = ''">
-      <xsl:value-of select="$url"/>
-    </xsl:when>
-    <xsl:when test="string-length($url) &gt; 1">
-      <xsl:variable name="char" select="substring($url, 1, 1)"/>
-      <xsl:value-of select="$char"/>
-      <xsl:if test="contains($ulink.hyphenate.chars, $char)">
-        <!-- Do not hyphen in-between // -->
-        <xsl:if test="not($char = '/' and substring($url,2,1) = '/')">
-          <xsl:copy-of select="$ulink.hyphenate"/>
-        </xsl:if>
-      </xsl:if>
-      <!-- recurse to the next character -->
-      <xsl:call-template name="hyphenate-url">
-        <xsl:with-param name="url" select="substring($url, 2)"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$url"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="olink" name="olink">
-  <!-- olink content may be passed in from xlink olink -->
-  <xsl:param name="content" select="NOTANELEMENT"/>
-
-  <xsl:call-template name="anchor"/>
-
-  <xsl:variable name="localinfo" select="@localinfo"/>
-
-  <xsl:choose>
-    <!-- olinks resolved by stylesheet and target database -->
-    <xsl:when test="@targetdoc or @targetptr or
-                    (@xlink:role=$xolink.role and
-                     contains(@xlink:href, '#') )" >
-
-      <xsl:variable name="targetdoc.att">
-        <xsl:choose>
-          <xsl:when test="@targetdoc != ''">
-            <xsl:value-of select="@targetdoc"/>
-          </xsl:when>
-          <xsl:when test="@xlink:role=$xolink.role and
-                       contains(@xlink:href, '#')" >
-            <xsl:value-of select="substring-before(@xlink:href, '#')"/>
-          </xsl:when>
-        </xsl:choose>
-      </xsl:variable>
-
-      <xsl:variable name="targetptr.att">
-        <xsl:choose>
-          <xsl:when test="@targetptr != ''">
-            <xsl:value-of select="@targetptr"/>
-          </xsl:when>
-          <xsl:when test="@xlink:role=$xolink.role and
-                       contains(@xlink:href, '#')" >
-            <xsl:value-of select="substring-after(@xlink:href, '#')"/>
-          </xsl:when>
-        </xsl:choose>
-      </xsl:variable>
-
-      <xsl:variable name="olink.lang">
-        <xsl:call-template name="l10n.language">
-          <xsl:with-param name="xref-context" select="true()"/>
-        </xsl:call-template>
-      </xsl:variable>
-    
-      <xsl:variable name="target.database.filename">
-        <xsl:call-template name="select.target.database">
-          <xsl:with-param name="targetdoc.att" select="$targetdoc.att"/>
-          <xsl:with-param name="targetptr.att" select="$targetptr.att"/>
-          <xsl:with-param name="olink.lang" select="$olink.lang"/>
-        </xsl:call-template>
-      </xsl:variable>
-    
-      <xsl:variable name="target.database" 
-          select="document($target.database.filename, /)"/>
-    
-      <xsl:if test="$olink.debug != 0">
-        <xsl:message>
-          <xsl:text>Olink debug: root element of target.database is '</xsl:text>
-          <xsl:value-of select="local-name($target.database/*[1])"/>
-          <xsl:text>'.</xsl:text>
-        </xsl:message>
-      </xsl:if>
-    
-      <xsl:variable name="olink.key">
-        <xsl:call-template name="select.olink.key">
-          <xsl:with-param name="targetdoc.att" select="$targetdoc.att"/>
-          <xsl:with-param name="targetptr.att" select="$targetptr.att"/>
-          <xsl:with-param name="olink.lang" select="$olink.lang"/>
-          <xsl:with-param name="target.database" select="$target.database"/>
-        </xsl:call-template>
-      </xsl:variable>
-    
-      <xsl:if test="string-length($olink.key) = 0">
-        <xsl:message>
-          <xsl:text>Error: unresolved olink: </xsl:text>
-          <xsl:text>targetdoc/targetptr = '</xsl:text>
-          <xsl:value-of select="$targetdoc.att"/>
-          <xsl:text>/</xsl:text>
-          <xsl:value-of select="$targetptr.att"/>
-          <xsl:text>'.</xsl:text>
-        </xsl:message>
-      </xsl:if>
-
-      <xsl:variable name="href">
-        <xsl:call-template name="make.olink.href">
-          <xsl:with-param name="olink.key" select="$olink.key"/>
-          <xsl:with-param name="target.database" select="$target.database"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <!-- Olink that points to internal id can be a link -->
-      <xsl:variable name="linkend">
-        <xsl:call-template name="olink.as.linkend">
-          <xsl:with-param name="olink.key" select="$olink.key"/>
-          <xsl:with-param name="olink.lang" select="$olink.lang"/>
-          <xsl:with-param name="target.database" select="$target.database"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <xsl:variable name="hottext">
-        <xsl:choose>
-          <xsl:when test="$content">
-            <xsl:copy-of select="$content"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:call-template name="olink.hottext">
-              <xsl:with-param name="olink.key" select="$olink.key"/>
-              <xsl:with-param name="olink.lang" select="$olink.lang"/>
-              <xsl:with-param name="target.database" select="$target.database"/>
-            </xsl:call-template>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:variable>
-
-      <xsl:variable name="olink.docname.citation">
-        <xsl:call-template name="olink.document.citation">
-          <xsl:with-param name="olink.key" select="$olink.key"/>
-          <xsl:with-param name="target.database" select="$target.database"/>
-          <xsl:with-param name="olink.lang" select="$olink.lang"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <xsl:variable name="olink.page.citation">
-        <xsl:call-template name="olink.page.citation">
-          <xsl:with-param name="olink.key" select="$olink.key"/>
-          <xsl:with-param name="target.database" select="$target.database"/>
-          <xsl:with-param name="olink.lang" select="$olink.lang"/>
-          <xsl:with-param name="linkend" select="$linkend"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <xsl:choose>
-        <xsl:when test="$linkend != ''">
-          <fo:basic-link internal-destination="{$linkend}"
-                       xsl:use-attribute-sets="xref.properties">
-            <xsl:copy-of select="$hottext"/>
-            <xsl:copy-of select="$olink.page.citation"/>
-          </fo:basic-link>
-        </xsl:when>
-        <xsl:when test="$href != ''">
-          <xsl:choose>
-            <xsl:when test="$xep.extensions != 0">
-              <fo:basic-link external-destination="url({$href})"
-                             xsl:use-attribute-sets="olink.properties">
-                <xsl:copy-of select="$hottext"/>
-              </fo:basic-link>
-              <xsl:copy-of select="$olink.page.citation"/>
-              <xsl:copy-of select="$olink.docname.citation"/>
-            </xsl:when>
-            <xsl:when test="$axf.extensions != 0">
-              <fo:basic-link external-destination="{$href}"
-                             xsl:use-attribute-sets="olink.properties">
-                <xsl:copy-of select="$hottext"/>
-              </fo:basic-link>
-              <xsl:copy-of select="$olink.page.citation"/>
-              <xsl:copy-of select="$olink.docname.citation"/>
-            </xsl:when>
-            <xsl:otherwise>
-              <fo:basic-link external-destination="{$href}"
-                             xsl:use-attribute-sets="olink.properties">
-                <xsl:copy-of select="$hottext"/>
-              </fo:basic-link>
-              <xsl:copy-of select="$olink.page.citation"/>
-              <xsl:copy-of select="$olink.docname.citation"/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:copy-of select="$hottext"/>
-          <xsl:copy-of select="$olink.page.citation"/>
-          <xsl:copy-of select="$olink.docname.citation"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-
-    <!-- olink never implemented in FO for old olink entity syntax -->
-    <xsl:otherwise>
-      <xsl:apply-templates/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="*" mode="insert.olink.docname.markup">
-  <xsl:param name="docname" select="''"/>
-  
-  <fo:inline font-style="italic">
-    <xsl:value-of select="$docname"/>
-  </fo:inline>
-
-</xsl:template>
-
-<!-- This prevents error message when processing olinks with xrefstyle -->
-<xsl:template match="olink" mode="object.xref.template"/>
-
-
-<xsl:template name="olink.as.linkend">
-  <xsl:param name="olink.key" select="''"/>
-  <xsl:param name="olink.lang" select="''"/>
-  <xsl:param name="target.database" select="NotANode"/>
-
-  <xsl:variable name="targetdoc">
-    <xsl:value-of select="substring-before($olink.key, '/')"/>
-  </xsl:variable>
-
-  <xsl:variable name="targetptr">
-    <xsl:value-of 
-       select="substring-before(substring-after($olink.key, '/'), '/')"/>
-  </xsl:variable>
-
-  <xsl:variable name="target.lang">
-    <xsl:variable name="candidate">
-      <xsl:for-each select="$target.database" >
-        <xsl:value-of 
-                  select="key('targetptr-key', $olink.key)/@lang" />
-      </xsl:for-each>
-    </xsl:variable>
-    <xsl:choose>
-      <xsl:when test="$candidate != ''">
-        <xsl:value-of select="$candidate"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$olink.lang"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:if test="$current.docid = $targetdoc and 
-                $olink.lang = $target.lang">
-    <xsl:variable name="targets" select="key('id',$targetptr)"/>
-    <xsl:variable name="target" select="$targets[1]"/>
-    <xsl:if test="$target">
-      <xsl:value-of select="$targetptr"/>
-    </xsl:if>
-  </xsl:if>
-
-</xsl:template>
-
-
-<xsl:template name="olink.outline">
-  <xsl:param name="outline.base.uri"/>
-  <xsl:param name="localinfo"/>
-  <xsl:param name="return" select="href"/>
-
-  <xsl:message terminate="yes">Fatal error: olink.outline template: what is this supposed to do?</xsl:message>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="title.xref">
-  <xsl:param name="target" select="."/>
-  <xsl:choose>
-    <xsl:when test="local-name($target) = 'figure'
-                    or local-name($target) = 'example'
-                    or local-name($target) = 'equation'
-                    or local-name($target) = 'table'
-                    or local-name($target) = 'dedication'
-                    or local-name($target) = 'preface'
-                    or local-name($target) = 'bibliography'
-                    or local-name($target) = 'glossary'
-                    or local-name($target) = 'index'
-                    or local-name($target) = 'setindex'
-                    or local-name($target) = 'colophon'">
-      <xsl:call-template name="gentext.startquote"/>
-      <xsl:apply-templates select="$target" mode="title.markup"/>
-      <xsl:call-template name="gentext.endquote"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:inline font-style="italic">
-        <xsl:apply-templates select="$target" mode="title.markup"/>
-      </fo:inline>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="number.xref">
-  <xsl:param name="target" select="."/>
-  <xsl:apply-templates select="$target" mode="label.markup"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="xref.xreflabel">
-  <!-- called to process an xreflabel...you might use this to make  -->
-  <!-- xreflabels come out in the right font for different targets, -->
-  <!-- for example. -->
-  <xsl:param name="target" select="."/>
-  <xsl:value-of select="$target/@xreflabel"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="title" mode="xref">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="command" mode="xref">
-  <xsl:call-template name="inline.boldseq"/>
-</xsl:template>
-
-<xsl:template match="function" mode="xref">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:template match="*" mode="page.citation">
-  <xsl:param name="id" select="'???'"/>
-
-  <fo:basic-link internal-destination="{$id}"
-                 xsl:use-attribute-sets="xref.properties">
-    <fo:inline keep-together.within-line="always">
-      <xsl:call-template name="substitute-markup">
-        <xsl:with-param name="template">
-          <xsl:call-template name="gentext.template">
-            <xsl:with-param name="name" select="'page.citation'"/>
-            <xsl:with-param name="context" select="'xref'"/>
-          </xsl:call-template>
-        </xsl:with-param>
-      </xsl:call-template>
-    </fo:inline>
-  </fo:basic-link>
-</xsl:template>
-
-<xsl:template match="*" mode="pagenumber.markup">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-  <fo:page-number-citation ref-id="{$id}"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="*" mode="insert.title.markup">
-  <xsl:param name="purpose"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="title"/>
-
-  <xsl:choose>
-    <!-- FIXME: what about the case where titleabbrev is inside the info? -->
-    <xsl:when test="$purpose = 'xref' and titleabbrev">
-      <xsl:apply-templates select="." mode="titleabbrev.markup"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy-of select="$title"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="chapter|appendix" mode="insert.title.markup">
-  <xsl:param name="purpose"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="title"/>
-
-  <xsl:choose>
-    <xsl:when test="$purpose = 'xref'">
-      <fo:inline font-style="italic">
-        <xsl:copy-of select="$title"/>
-      </fo:inline>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy-of select="$title"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="*" mode="insert.subtitle.markup">
-  <xsl:param name="purpose"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="subtitle"/>
-
-  <xsl:copy-of select="$subtitle"/>
-</xsl:template>
-
-<xsl:template match="*" mode="insert.label.markup">
-  <xsl:param name="purpose"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="label"/>
-
-  <xsl:copy-of select="$label"/>
-</xsl:template>
-
-<xsl:template match="*" mode="insert.pagenumber.markup">
-  <xsl:param name="purpose"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="pagenumber"/>
-
-  <xsl:copy-of select="$pagenumber"/>
-</xsl:template>
-
-<xsl:template match="*" mode="insert.direction.markup">
-  <xsl:param name="purpose"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="direction"/>
-
-  <xsl:copy-of select="$direction"/>
-</xsl:template>
-
-<xsl:template match="olink" mode="pagenumber.markup">
-  <!-- Local olinks can use page-citation -->
-  <xsl:variable name="targetdoc.att" select="@targetdoc"/>
-  <xsl:variable name="targetptr.att" select="@targetptr"/>
-
-  <xsl:variable name="olink.lang">
-    <xsl:call-template name="l10n.language">
-      <xsl:with-param name="xref-context" select="true()"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="target.database.filename">
-    <xsl:call-template name="select.target.database">
-      <xsl:with-param name="targetdoc.att" select="$targetdoc.att"/>
-      <xsl:with-param name="targetptr.att" select="$targetptr.att"/>
-      <xsl:with-param name="olink.lang" select="$olink.lang"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="target.database" 
-      select="document($target.database.filename, /)"/>
-
-  <xsl:if test="$olink.debug != 0">
-    <xsl:message>
-      <xsl:text>Olink debug: root element of target.database is '</xsl:text>
-      <xsl:value-of select="local-name($target.database/*[1])"/>
-      <xsl:text>'.</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:variable name="olink.key">
-    <xsl:call-template name="select.olink.key">
-      <xsl:with-param name="targetdoc.att" select="$targetdoc.att"/>
-      <xsl:with-param name="targetptr.att" select="$targetptr.att"/>
-      <xsl:with-param name="olink.lang" select="$olink.lang"/>
-      <xsl:with-param name="target.database" select="$target.database"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <!-- Olink that points to internal id can be a link -->
-  <xsl:variable name="linkend">
-    <xsl:call-template name="olink.as.linkend">
-      <xsl:with-param name="olink.key" select="$olink.key"/>
-      <xsl:with-param name="olink.lang" select="$olink.lang"/>
-      <xsl:with-param name="target.database" select="$target.database"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$linkend != ''">
-      <fo:page-number-citation ref-id="{$linkend}"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:message>
-        <xsl:text>Olink error: no page number linkend for local olink '</xsl:text>
-        <xsl:value-of select="$olink.key"/>
-        <xsl:text>'</xsl:text>
-      </xsl:message>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/highlighting/common.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/highlighting/common.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,16 +1,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version='1.0'>
-
-<!-- ********************************************************************
-
-     Fake file to keep happy ../{fo,xhtml}/verbatim.xsl
-
-     ******************************************************************** -->
-
-  <xsl:template name="apply-highlighting">
-    <xsl:apply-templates/>
-  </xsl:template>
-
-</xsl:stylesheet>
-
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/html/chunker.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/html/chunker.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,439 +1,0 @@
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:saxon="http://icl.com/saxon"
-                xmlns:lxslt="http://xml.apache.org/xslt"
-                xmlns:redirect="http://xml.apache.org/xalan/redirect"
-                xmlns:exsl="http://exslt.org/common"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
-		version="1.0"
-                exclude-result-prefixes="doc"
-                extension-element-prefixes="saxon redirect lxslt exsl">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<!-- This stylesheet works with XSLT implementations that support -->
-<!-- exsl:document, saxon:output, or Xalan's redirect:write -->
-<!-- Note: Only Saxon 6.4.2 or later is supported. -->
-
-<xsl:param name="chunker.output.method" select="'html'"/>
-<xsl:param name="chunker.output.encoding" select="'ISO-8859-1'"/>
-<xsl:param name="chunker.output.indent" select="'no'"/>
-<xsl:param name="chunker.output.omit-xml-declaration" select="'no'"/>
-<xsl:param name="chunker.output.standalone" select="'no'"/>
-<xsl:param name="chunker.output.doctype-public" select="''"/>
-<xsl:param name="chunker.output.doctype-system" select="''"/>
-<xsl:param name="chunker.output.media-type" select="''"/>
-<xsl:param name="chunker.output.cdata-section-elements" select="''"/>
-<xsl:param name="chunker.output.quiet" select="0"/>
-
-<xsl:param name="saxon.character.representation" select="'entity;decimal'"/>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="make-relative-filename">
-  <xsl:param name="base.dir" select="'./'"/>
-  <xsl:param name="base.name" select="''"/>
-
-  <xsl:choose>
-    <!-- put Saxon first to work around a bug in libxslt -->
-    <xsl:when test="element-available('saxon:output')">
-      <!-- Saxon doesn't make the chunks relative -->
-      <xsl:value-of select="concat($base.dir,$base.name)"/>
-    </xsl:when>
-    <xsl:when test="element-available('exsl:document')">
-      <!-- EXSL document does make the chunks relative, I think -->
-      <xsl:choose>
-        <xsl:when test="count(parent::*) = 0">
-          <xsl:value-of select="concat($base.dir,$base.name)"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="$base.name"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:when test="element-available('redirect:write')">
-      <!-- Xalan doesn't make the chunks relative -->
-      <xsl:value-of select="concat($base.dir,$base.name)"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:message terminate="yes">
-        <xsl:text>Don't know how to chunk with </xsl:text>
-        <xsl:value-of select="system-property('xsl:vendor')"/>
-      </xsl:message>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="write.chunk">
-  <xsl:param name="filename" select="''"/>
-  <xsl:param name="quiet" select="$chunker.output.quiet"/>
-  <xsl:param name="suppress-context-node-name" select="0"/>
-  <xsl:param name="message-prolog"/>
-  <xsl:param name="message-epilog"/>
-
-  <xsl:param name="method" select="$chunker.output.method"/>
-  <xsl:param name="encoding" select="$chunker.output.encoding"/>
-  <xsl:param name="indent" select="$chunker.output.indent"/>
-  <xsl:param name="omit-xml-declaration"
-             select="$chunker.output.omit-xml-declaration"/>
-  <xsl:param name="standalone" select="$chunker.output.standalone"/>
-  <xsl:param name="doctype-public" select="$chunker.output.doctype-public"/>
-  <xsl:param name="doctype-system" select="$chunker.output.doctype-system"/>
-  <xsl:param name="media-type" select="$chunker.output.media-type"/>
-  <xsl:param name="cdata-section-elements"
-             select="$chunker.output.cdata-section-elements"/>
-
-  <xsl:param name="content"/>
-
-  <xsl:if test="$quiet = 0">
-    <xsl:message>
-      <xsl:if test="not($message-prolog = '')">
-        <xsl:value-of select="$message-prolog"/>
-      </xsl:if>
-      <xsl:text>Writing </xsl:text>
-      <xsl:value-of select="$filename"/>
-      <xsl:if test="name(.) != '' and $suppress-context-node-name = 0">
-        <xsl:text> for </xsl:text>
-        <xsl:value-of select="name(.)"/>
-        <xsl:if test="@id or @xml:id">
-          <xsl:text>(</xsl:text>
-          <xsl:value-of select="(@id|@xml:id)[1]"/>
-          <xsl:text>)</xsl:text>
-        </xsl:if>
-      </xsl:if>
-      <xsl:if test="not($message-epilog = '')">
-        <xsl:value-of select="$message-epilog"/>
-      </xsl:if>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:choose>
-    <xsl:when test="element-available('exsl:document')">
-      <xsl:choose>
-        <!-- Handle the permutations ... -->
-        <xsl:when test="$media-type != ''">
-          <xsl:choose>
-            <xsl:when test="$doctype-public != '' and $doctype-system != ''">
-              <exsl:document href="{$filename}"
-                             method="{$method}"
-                             encoding="{$encoding}"
-                             indent="{$indent}"
-                             omit-xml-declaration="{$omit-xml-declaration}"
-                             cdata-section-elements="{$cdata-section-elements}"
-                             media-type="{$media-type}"
-                             doctype-public="{$doctype-public}"
-                             doctype-system="{$doctype-system}"
-                             standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </exsl:document>
-            </xsl:when>
-            <xsl:when test="$doctype-public != '' and $doctype-system = ''">
-              <exsl:document href="{$filename}"
-                             method="{$method}"
-                             encoding="{$encoding}"
-                             indent="{$indent}"
-                             omit-xml-declaration="{$omit-xml-declaration}"
-                             cdata-section-elements="{$cdata-section-elements}"
-                             media-type="{$media-type}"
-                             doctype-public="{$doctype-public}"
-                             standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </exsl:document>
-            </xsl:when>
-            <xsl:when test="$doctype-public = '' and $doctype-system != ''">
-              <exsl:document href="{$filename}"
-                             method="{$method}"
-                             encoding="{$encoding}"
-                             indent="{$indent}"
-                             omit-xml-declaration="{$omit-xml-declaration}"
-                             cdata-section-elements="{$cdata-section-elements}"
-                             media-type="{$media-type}"
-                             doctype-system="{$doctype-system}"
-                             standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </exsl:document>
-            </xsl:when>
-            <xsl:otherwise><!-- $doctype-public = '' and $doctype-system = ''"> -->
-              <exsl:document href="{$filename}"
-                             method="{$method}"
-                             encoding="{$encoding}"
-                             indent="{$indent}"
-                             omit-xml-declaration="{$omit-xml-declaration}"
-                             cdata-section-elements="{$cdata-section-elements}"
-                             media-type="{$media-type}"
-                             standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </exsl:document>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:choose>
-            <xsl:when test="$doctype-public != '' and $doctype-system != ''">
-              <exsl:document href="{$filename}"
-                             method="{$method}"
-                             encoding="{$encoding}"
-                             indent="{$indent}"
-                             omit-xml-declaration="{$omit-xml-declaration}"
-                             cdata-section-elements="{$cdata-section-elements}"
-                             doctype-public="{$doctype-public}"
-                             doctype-system="{$doctype-system}"
-                             standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </exsl:document>
-            </xsl:when>
-            <xsl:when test="$doctype-public != '' and $doctype-system = ''">
-              <exsl:document href="{$filename}"
-                             method="{$method}"
-                             encoding="{$encoding}"
-                             indent="{$indent}"
-                             omit-xml-declaration="{$omit-xml-declaration}"
-                             cdata-section-elements="{$cdata-section-elements}"
-                             doctype-public="{$doctype-public}"
-                             standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </exsl:document>
-            </xsl:when>
-            <xsl:when test="$doctype-public = '' and $doctype-system != ''">
-              <exsl:document href="{$filename}"
-                             method="{$method}"
-                             encoding="{$encoding}"
-                             indent="{$indent}"
-                             omit-xml-declaration="{$omit-xml-declaration}"
-                             cdata-section-elements="{$cdata-section-elements}"
-                             doctype-system="{$doctype-system}"
-                             standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </exsl:document>
-            </xsl:when>
-            <xsl:otherwise><!-- $doctype-public = '' and $doctype-system = ''"> -->
-              <exsl:document href="{$filename}"
-                             method="{$method}"
-                             encoding="{$encoding}"
-                             indent="{$indent}"
-                             omit-xml-declaration="{$omit-xml-declaration}"
-                             cdata-section-elements="{$cdata-section-elements}"
-                             standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </exsl:document>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-
-    <xsl:when test="element-available('saxon:output')">
-      <xsl:choose>
-        <!-- Handle the permutations ... -->
-        <xsl:when test="$media-type != ''">
-          <xsl:choose>
-            <xsl:when test="$doctype-public != '' and $doctype-system != ''">
-              <saxon:output saxon:character-representation="{$saxon.character.representation}"
-                            href="{$filename}"
-                            method="{$method}"
-                            encoding="{$encoding}"
-                            indent="{$indent}"
-                            omit-xml-declaration="{$omit-xml-declaration}"
-                            cdata-section-elements="{$cdata-section-elements}"
-                            media-type="{$media-type}"
-                            doctype-public="{$doctype-public}"
-                            doctype-system="{$doctype-system}"
-                            standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </saxon:output>
-            </xsl:when>
-            <xsl:when test="$doctype-public != '' and $doctype-system = ''">
-              <saxon:output saxon:character-representation="{$saxon.character.representation}"
-                            href="{$filename}"
-                            method="{$method}"
-                            encoding="{$encoding}"
-                            indent="{$indent}"
-                            omit-xml-declaration="{$omit-xml-declaration}"
-                            cdata-section-elements="{$cdata-section-elements}"
-                            media-type="{$media-type}"
-                            doctype-public="{$doctype-public}"
-                            standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </saxon:output>
-            </xsl:when>
-            <xsl:when test="$doctype-public = '' and $doctype-system != ''">
-              <saxon:output saxon:character-representation="{$saxon.character.representation}"
-                            href="{$filename}"
-                            method="{$method}"
-                            encoding="{$encoding}"
-                            indent="{$indent}"
-                            omit-xml-declaration="{$omit-xml-declaration}"
-                            cdata-section-elements="{$cdata-section-elements}"
-                            media-type="{$media-type}"
-                            doctype-system="{$doctype-system}"
-                            standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </saxon:output>
-            </xsl:when>
-            <xsl:otherwise><!-- $doctype-public = '' and $doctype-system = ''"> -->
-              <saxon:output saxon:character-representation="{$saxon.character.representation}"
-                            href="{$filename}"
-                            method="{$method}"
-                            encoding="{$encoding}"
-                            indent="{$indent}"
-                            omit-xml-declaration="{$omit-xml-declaration}"
-                            cdata-section-elements="{$cdata-section-elements}"
-                            media-type="{$media-type}"
-                            standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </saxon:output>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:choose>
-            <xsl:when test="$doctype-public != '' and $doctype-system != ''">
-              <saxon:output saxon:character-representation="{$saxon.character.representation}"
-                            href="{$filename}"
-                            method="{$method}"
-                            encoding="{$encoding}"
-                            indent="{$indent}"
-                            omit-xml-declaration="{$omit-xml-declaration}"
-                            cdata-section-elements="{$cdata-section-elements}"
-                            doctype-public="{$doctype-public}"
-                            doctype-system="{$doctype-system}"
-                            standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </saxon:output>
-            </xsl:when>
-            <xsl:when test="$doctype-public != '' and $doctype-system = ''">
-              <saxon:output saxon:character-representation="{$saxon.character.representation}"
-                            href="{$filename}"
-                            method="{$method}"
-                            encoding="{$encoding}"
-                            indent="{$indent}"
-                            omit-xml-declaration="{$omit-xml-declaration}"
-                            cdata-section-elements="{$cdata-section-elements}"
-                            doctype-public="{$doctype-public}"
-                            standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </saxon:output>
-            </xsl:when>
-            <xsl:when test="$doctype-public = '' and $doctype-system != ''">
-              <saxon:output saxon:character-representation="{$saxon.character.representation}"
-                            href="{$filename}"
-                            method="{$method}"
-                            encoding="{$encoding}"
-                            indent="{$indent}"
-                            omit-xml-declaration="{$omit-xml-declaration}"
-                            cdata-section-elements="{$cdata-section-elements}"
-                            doctype-system="{$doctype-system}"
-                            standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </saxon:output>
-            </xsl:when>
-            <xsl:otherwise><!-- $doctype-public = '' and $doctype-system = ''"> -->
-              <saxon:output saxon:character-representation="{$saxon.character.representation}"
-                            href="{$filename}"
-                            method="{$method}"
-                            encoding="{$encoding}"
-                            indent="{$indent}"
-                            omit-xml-declaration="{$omit-xml-declaration}"
-                            cdata-section-elements="{$cdata-section-elements}"
-                            standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </saxon:output>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-
-    <xsl:when test="element-available('redirect:write')">
-      <!-- Xalan uses redirect -->
-      <redirect:write file="{$filename}">
-        <xsl:copy-of select="$content"/>
-      </redirect:write>
-    </xsl:when>
-
-    <xsl:otherwise>
-      <!-- it doesn't matter since we won't be making chunks... -->
-      <xsl:message terminate="yes">
-        <xsl:text>Can't make chunks with </xsl:text>
-        <xsl:value-of select="system-property('xsl:vendor')"/>
-        <xsl:text>'s processor.</xsl:text>
-      </xsl:message>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="write.chunk.with.doctype">
-  <xsl:param name="filename" select="''"/>
-  <xsl:param name="quiet" select="$chunker.output.quiet"/>
-
-  <xsl:param name="method" select="$chunker.output.method"/>
-  <xsl:param name="encoding" select="$chunker.output.encoding"/>
-  <xsl:param name="indent" select="$chunker.output.indent"/>
-  <xsl:param name="omit-xml-declaration"
-             select="$chunker.output.omit-xml-declaration"/>
-  <xsl:param name="standalone" select="$chunker.output.standalone"/>
-  <xsl:param name="doctype-public" select="$chunker.output.doctype-public"/>
-  <xsl:param name="doctype-system" select="$chunker.output.doctype-system"/>
-  <xsl:param name="media-type" select="$chunker.output.media-type"/>
-  <xsl:param name="cdata-section-elements"
-             select="$chunker.output.cdata-section-elements"/>
-
-  <xsl:param name="content"/>
-
-  <xsl:call-template name="write.chunk">
-    <xsl:with-param name="filename" select="$filename"/>
-    <xsl:with-param name="quiet" select="$quiet"/>
-    <xsl:with-param name="method" select="$method"/>
-    <xsl:with-param name="encoding" select="$encoding"/>
-    <xsl:with-param name="indent" select="$indent"/>
-    <xsl:with-param name="omit-xml-declaration" select="$omit-xml-declaration"/>
-    <xsl:with-param name="standalone" select="$standalone"/>
-    <xsl:with-param name="doctype-public" select="$doctype-public"/>
-    <xsl:with-param name="doctype-system" select="$doctype-system"/>
-    <xsl:with-param name="media-type" select="$media-type"/>
-    <xsl:with-param name="cdata-section-elements" select="$cdata-section-elements"/>
-    <xsl:with-param name="content" select="$content"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="write.text.chunk">
-  <xsl:param name="filename" select="''"/>
-  <xsl:param name="quiet" select="$chunker.output.quiet"/>
-  <xsl:param name="suppress-context-node-name" select="0"/>
-  <xsl:param name="message-prolog"/>
-  <xsl:param name="message-epilog"/>
-  <xsl:param name="method" select="'text'"/>
-  <xsl:param name="encoding" select="$chunker.output.encoding"/>
-  <xsl:param name="media-type" select="$chunker.output.media-type"/>
-  <xsl:param name="content"/>
-
-  <xsl:call-template name="write.chunk">
-    <xsl:with-param name="filename" select="$filename"/>
-    <xsl:with-param name="quiet" select="$quiet"/>
-    <xsl:with-param name="suppress-context-node-name" select="$suppress-context-node-name"/>
-    <xsl:with-param name="message-prolog" select="$message-prolog"/>
-    <xsl:with-param name="message-epilog" select="$message-epilog"/>
-    <xsl:with-param name="method" select="$method"/>
-    <xsl:with-param name="encoding" select="$encoding"/>
-    <xsl:with-param name="indent" select="'no'"/>
-    <xsl:with-param name="omit-xml-declaration" select="'no'"/>
-    <xsl:with-param name="standalone" select="'no'"/>
-    <xsl:with-param name="doctype-public"/>
-    <xsl:with-param name="doctype-system"/>
-    <xsl:with-param name="media-type" select="$media-type"/>
-    <xsl:with-param name="cdata-section-elements"/>
-    <xsl:with-param name="content" select="$content"/>
-  </xsl:call-template>
-</xsl:template>
-
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/lib/lib.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/lib/lib.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,480 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     This module implements DTD-independent functions
-
-     ******************************************************************** -->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-<xsl:template name="dot.count">
-  <!-- Returns the number of "." characters in a string -->
-  <xsl:param name="string"/>
-  <xsl:param name="count" select="0"/>
-  <xsl:choose>
-    <xsl:when test="contains($string, '.')">
-      <xsl:call-template name="dot.count">
-        <xsl:with-param name="string" select="substring-after($string, '.')"/>
-        <xsl:with-param name="count" select="$count+1"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$count"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-<xsl:template name="copy-string">
-  <!-- returns 'count' copies of 'string' -->
-  <xsl:param name="string"/>
-  <xsl:param name="count" select="0"/>
-  <xsl:param name="result"/>
-
-  <xsl:choose>
-    <xsl:when test="$count&gt;0">
-      <xsl:call-template name="copy-string">
-        <xsl:with-param name="string" select="$string"/>
-        <xsl:with-param name="count" select="$count - 1"/>
-        <xsl:with-param name="result">
-          <xsl:value-of select="$result"/>
-          <xsl:value-of select="$string"/>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$result"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-<xsl:template name="string.subst">
-  <xsl:param name="string"/>
-  <xsl:param name="target"/>
-  <xsl:param name="replacement"/>
-
-  <xsl:choose>
-    <xsl:when test="contains($string, $target)">
-      <xsl:variable name="rest">
-        <xsl:call-template name="string.subst">
-          <xsl:with-param name="string" select="substring-after($string, $target)"/>
-          <xsl:with-param name="target" select="$target"/>
-          <xsl:with-param name="replacement" select="$replacement"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:value-of select="concat(substring-before($string, $target),                                    $replacement,                                    $rest)"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$string"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-<xsl:template name="xpointer.idref">
-  <xsl:param name="xpointer">http://...</xsl:param>
-  <xsl:choose>
-    <xsl:when test="starts-with($xpointer, '#xpointer(id(')">
-      <xsl:variable name="rest" select="substring-after($xpointer, '#xpointer(id(')"/>
-      <xsl:variable name="quote" select="substring($rest, 1, 1)"/>
-      <xsl:value-of select="substring-before(substring-after($xpointer, $quote), $quote)"/>
-    </xsl:when>
-    <xsl:when test="starts-with($xpointer, '#')">
-      <xsl:value-of select="substring-after($xpointer, '#')"/>
-    </xsl:when>
-    <!-- otherwise it's a pointer to some other document -->
-  </xsl:choose>
-</xsl:template>
-<xsl:template name="length-magnitude">
-  <xsl:param name="length" select="'0pt'"/>
-
-  <xsl:choose>
-    <xsl:when test="string-length($length) = 0"/>
-    <xsl:when test="substring($length,1,1) = '0'                     or substring($length,1,1) = '1'                     or substring($length,1,1) = '2'                     or substring($length,1,1) = '3'                     or substring($length,1,1) = '4'                     or substring($length,1,1) = '5'                     or substring($length,1,1) = '6'                     or substring($length,1,1) = '7'                     or substring($length,1,1) = '8'                     or substring($length,1,1) = '9'                     or substring($length,1,1) = '.'">
-      <xsl:value-of select="substring($length,1,1)"/>
-      <xsl:call-template name="length-magnitude">
-        <xsl:with-param name="length" select="substring($length,2)"/>
-      </xsl:call-template>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-<xsl:template name="length-units">
-  <xsl:param name="length" select="'0pt'"/>
-  <xsl:param name="default.units" select="'px'"/>
-  <xsl:variable name="magnitude">
-    <xsl:call-template name="length-magnitude">
-      <xsl:with-param name="length" select="$length"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="units">
-    <xsl:value-of select="substring($length, string-length($magnitude)+1)"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$units = ''">
-      <xsl:value-of select="$default.units"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$units"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-<xsl:template name="length-spec">
-  <xsl:param name="length" select="'0pt'"/>
-  <xsl:param name="default.units" select="'px'"/>
-
-  <xsl:variable name="magnitude">
-    <xsl:call-template name="length-magnitude">
-      <xsl:with-param name="length" select="$length"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="units">
-    <xsl:value-of select="substring($length, string-length($magnitude)+1)"/>
-  </xsl:variable>
-
-  <xsl:value-of select="$magnitude"/>
-  <xsl:choose>
-    <xsl:when test="$units='cm'                     or $units='mm'                     or $units='in'                     or $units='pt'                     or $units='pc'                     or $units='px'                     or $units='em'">
-      <xsl:value-of select="$units"/>
-    </xsl:when>
-    <xsl:when test="$units = ''">
-      <xsl:value-of select="$default.units"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:message>
-        <xsl:text>Unrecognized unit of measure: </xsl:text>
-        <xsl:value-of select="$units"/>
-        <xsl:text>.</xsl:text>
-      </xsl:message>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-<xsl:template name="length-in-points">
-  <xsl:param name="length" select="'0pt'"/>
-  <xsl:param name="em.size" select="10"/>
-  <xsl:param name="pixels.per.inch" select="90"/>
-
-  <xsl:variable name="magnitude">
-    <xsl:call-template name="length-magnitude">
-      <xsl:with-param name="length" select="$length"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="units">
-    <xsl:value-of select="substring($length, string-length($magnitude)+1)"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$units = 'pt'">
-      <xsl:value-of select="$magnitude"/>
-    </xsl:when>
-    <xsl:when test="$units = 'cm'">
-      <xsl:value-of select="$magnitude div 2.54 * 72.0"/>
-    </xsl:when>
-    <xsl:when test="$units = 'mm'">
-      <xsl:value-of select="$magnitude div 25.4 * 72.0"/>
-    </xsl:when>
-    <xsl:when test="$units = 'in'">
-      <xsl:value-of select="$magnitude * 72.0"/>
-    </xsl:when>
-    <xsl:when test="$units = 'pc'">
-      <xsl:value-of select="$magnitude * 12.0"/>
-    </xsl:when>
-    <xsl:when test="$units = 'px'">
-      <xsl:value-of select="$magnitude div $pixels.per.inch * 72.0"/>
-    </xsl:when>
-    <xsl:when test="$units = 'em'">
-      <xsl:value-of select="$magnitude * $em.size"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:message>
-        <xsl:text>Unrecognized unit of measure: </xsl:text>
-        <xsl:value-of select="$units"/>
-        <xsl:text>.</xsl:text>
-      </xsl:message>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-<xsl:template name="pi-attribute">
-  <xsl:param name="pis" select="processing-instruction('BOGUS_PI')"/>
-  <xsl:param name="attribute">filename</xsl:param>
-  <xsl:param name="count">1</xsl:param>
-
-  <xsl:choose>
-    <xsl:when test="$count&gt;count($pis)">
-      <!-- not found -->
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:variable name="pi">
-        <xsl:value-of select="$pis[$count]"/>
-      </xsl:variable>
-      <xsl:variable name="pivalue">
-        <xsl:value-of select="concat(' ', normalize-space($pi))"/>
-      </xsl:variable>
-      <xsl:choose>
-        <xsl:when test="contains($pivalue,concat(' ', $attribute, '='))">
-          <xsl:variable name="rest" select="substring-after($pivalue,concat(' ', $attribute,'='))"/>
-          <xsl:variable name="quote" select="substring($rest,1,1)"/>
-          <xsl:value-of select="substring-before(substring($rest,2),$quote)"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="pi-attribute">
-            <xsl:with-param name="pis" select="$pis"/>
-            <xsl:with-param name="attribute" select="$attribute"/>
-            <xsl:with-param name="count" select="$count + 1"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-<xsl:template name="lookup.key">
-  <xsl:param name="key" select="''"/>
-  <xsl:param name="table" select="''"/>
-
-  <xsl:if test="contains($table, ' ')">
-    <xsl:choose>
-      <xsl:when test="substring-before($table, ' ') = $key">
-        <xsl:variable name="rest" select="substring-after($table, ' ')"/>
-        <xsl:choose>
-          <xsl:when test="contains($rest, ' ')">
-            <xsl:value-of select="substring-before($rest, ' ')"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="$rest"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="lookup.key">
-          <xsl:with-param name="key" select="$key"/>
-          <xsl:with-param name="table" select="substring-after(substring-after($table,' '), ' ')"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:if>
-</xsl:template>
-<xsl:template name="xpath.location">
-  <xsl:param name="node" select="."/>
-  <xsl:param name="path" select="''"/>
-
-  <xsl:variable name="next.path">
-    <xsl:value-of select="local-name($node)"/>
-    <xsl:if test="$path != ''">/</xsl:if>
-    <xsl:value-of select="$path"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$node/parent::*">
-      <xsl:call-template name="xpath.location">
-        <xsl:with-param name="node" select="$node/parent::*"/>
-        <xsl:with-param name="path" select="$next.path"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:text>/</xsl:text>
-      <xsl:value-of select="$next.path"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-<xsl:template name="comment-escape-string">
-  <xsl:param name="string" select="''"/>
-
-  <xsl:if test="starts-with($string, '-')">
-    <xsl:text> </xsl:text>
-  </xsl:if>
-
-  <xsl:call-template name="comment-escape-string.recursive">
-    <xsl:with-param name="string" select="$string"/>
-  </xsl:call-template>
-
-  <xsl:if test="substring($string, string-length($string), 1) = '-'">
-    <xsl:text> </xsl:text>
-  </xsl:if>
-</xsl:template>
-<xsl:template name="comment-escape-string.recursive">
-  <xsl:param name="string" select="''"/>
-  <xsl:choose>
-    <xsl:when test="contains($string, '--')">
-      <xsl:value-of select="substring-before($string, '--')"/>
-      <xsl:value-of select="'- -'"/>
-      <xsl:call-template name="comment-escape-string.recursive">
-        <xsl:with-param name="string" select="substring-after($string, '--')"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$string"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-  <xsl:template name="str.tokenize.keep.delimiters">
-    <xsl:param name="string" select="''"/>
-    <xsl:param name="delimiters" select="' '"/>
-    <xsl:choose>
-      <xsl:when test="not($string)"/>
-      <xsl:when test="not($delimiters)">
-        <xsl:call-template name="str.tokenize.keep.delimiters-characters">
-          <xsl:with-param name="string" select="$string"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="str.tokenize.keep.delimiters-delimiters">
-          <xsl:with-param name="string" select="$string"/>
-          <xsl:with-param name="delimiters" select="$delimiters"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-  <xsl:template name="str.tokenize.keep.delimiters-characters">
-    <xsl:param name="string"/>
-    <xsl:if test="$string">
-      <ssb:token xmlns:ssb="http://sideshowbarker.net/ns"><xsl:value-of select="substring($string, 1, 1)"/></ssb:token>
-      <xsl:call-template name="str.tokenize.keep.delimiters-characters">
-        <xsl:with-param name="string" select="substring($string, 2)"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:template>
-  <xsl:template name="str.tokenize.keep.delimiters-delimiters">
-    <xsl:param name="string"/>
-    <xsl:param name="delimiters"/>
-    <xsl:variable name="delimiter" select="substring($delimiters, 1, 1)"/>
-    <xsl:choose>
-      <xsl:when test="not($delimiter)">
-        <ssb:token xmlns:ssb="http://sideshowbarker.net/ns"><xsl:value-of select="$string"/></ssb:token>
-      </xsl:when>
-      <xsl:when test="contains($string, $delimiter)">
-        <xsl:if test="not(starts-with($string, $delimiter))">
-          <xsl:call-template name="str.tokenize.keep.delimiters-delimiters">
-            <xsl:with-param name="string" select="substring-before($string, $delimiter)"/>
-            <xsl:with-param name="delimiters" select="substring($delimiters, 2)"/>
-          </xsl:call-template>
-        </xsl:if>
-        <!-- output each delimiter -->
-        <xsl:value-of select="$delimiter"/>
-        <xsl:call-template name="str.tokenize.keep.delimiters-delimiters">
-          <xsl:with-param name="string" select="substring-after($string, $delimiter)"/>
-          <xsl:with-param name="delimiters" select="$delimiters"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="str.tokenize.keep.delimiters-delimiters">
-          <xsl:with-param name="string" select="$string"/>
-          <xsl:with-param name="delimiters" select="substring($delimiters, 2)"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-    <xsl:template name="apply-string-subst-map">
-      <xsl:param name="content"/>
-      <xsl:param name="map.contents"/>
-      <xsl:variable name="replaced_text">
-        <xsl:call-template name="string.subst">
-          <xsl:with-param name="string" select="$content"/>
-          <xsl:with-param name="target" select="$map.contents[1]/@oldstring"/>
-          <xsl:with-param name="replacement" select="$map.contents[1]/@newstring"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:choose>
-        <xsl:when test="$map.contents[2]">
-          <xsl:call-template name="apply-string-subst-map">
-            <xsl:with-param name="content" select="$replaced_text"/>
-            <xsl:with-param name="map.contents" select="$map.contents[position() &gt; 1]"/>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="$replaced_text"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:template>
-  
-<xsl:template name="count.uri.path.depth">
-  <xsl:param name="filename" select="''"/>
-  <xsl:param name="count" select="0"/>
-
-  <xsl:choose>
-    <xsl:when test="contains($filename, '/')">
-      <xsl:call-template name="count.uri.path.depth">
-        <xsl:with-param name="filename" select="substring-after($filename, '/')"/>
-        <xsl:with-param name="count" select="$count + 1"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$count"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-<xsl:template name="trim.common.uri.paths">
-  <xsl:param name="uriA" select="''"/>
-  <xsl:param name="uriB" select="''"/>
-  <xsl:param name="return" select="'A'"/>
-
-  <xsl:choose>
-    <xsl:when test="contains($uriA, '/') and contains($uriB, '/')                     and substring-before($uriA, '/') = substring-before($uriB, '/')">
-      <xsl:call-template name="trim.common.uri.paths">
-        <xsl:with-param name="uriA" select="substring-after($uriA, '/')"/>
-        <xsl:with-param name="uriB" select="substring-after($uriB, '/')"/>
-        <xsl:with-param name="return" select="$return"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="$return = 'A'">
-          <xsl:value-of select="$uriA"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="$uriB"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-  <xsl:template name="trim.text">
-    <xsl:param name="contents" select="."/>
-    <xsl:variable name="contents-left-trimmed">
-      <xsl:call-template name="trim-left">
-        <xsl:with-param name="contents" select="$contents"/>
-      </xsl:call-template>
-    </xsl:variable>
-    <xsl:variable name="contents-trimmed">
-      <xsl:call-template name="trim-right">
-        <xsl:with-param name="contents" select="$contents-left-trimmed"/>
-      </xsl:call-template>
-    </xsl:variable>
-    <xsl:value-of select="$contents-trimmed"/>
-  </xsl:template>
-
-  <xsl:template name="trim-left">
-    <xsl:param name="contents"/>
-    <xsl:choose>
-      <xsl:when test="starts-with($contents,'&#10;') or                       starts-with($contents,'&#13;') or                       starts-with($contents,' ') or                       starts-with($contents,'&#9;')">
-        <xsl:call-template name="trim-left">
-          <xsl:with-param name="contents" select="substring($contents, 2)"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$contents"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-  <xsl:template name="trim-right">
-    <xsl:param name="contents"/>
-    <xsl:variable name="last-char">
-      <xsl:value-of select="substring($contents, string-length($contents), 1)"/>
-    </xsl:variable>
-    <xsl:choose>
-      <xsl:when test="($last-char = '&#10;') or                       ($last-char = '&#13;') or                       ($last-char = ' ') or                       ($last-char = '&#9;')">
-        <xsl:call-template name="trim-right">
-          <xsl:with-param name="contents" select="substring($contents, 1, string-length($contents) - 1)"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$contents"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/profiling/profile-mode.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/profiling/profile-mode.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,239 +1,0 @@
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:saxon="http://icl.com/saxon"
-                exclude-result-prefixes="saxon"
-                version="1.0">
-
-<!-- Should be base URI for imagedata and so on fixed? -->
-<xsl:param name="profile.baseuri.fixup" select="true()"/>
-
-<!-- Copy all non-element nodes -->
-<xsl:template match="@*|text()|comment()|processing-instruction()" mode="profile">
-  <xsl:copy/>
-</xsl:template>
-
-<!-- Profile elements based on input parameters -->
-<xsl:template match="*" mode="profile">
-
-  <xsl:variable name="arch.content">
-    <xsl:if test="@arch">
-      <xsl:call-template name="cross.compare">
-        <xsl:with-param name="a" select="$profile.arch"/>
-        <xsl:with-param name="b" select="@arch"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:variable>
-  <xsl:variable name="arch.ok" select="not(@arch) or not($profile.arch) or
-                                       $arch.content != '' or @arch = ''"/>
-
-  <xsl:variable name="audience.content">
-    <xsl:if test="@audience">
-      <xsl:call-template name="cross.compare">
-        <xsl:with-param name="a" select="$profile.audience"/>
-        <xsl:with-param name="b" select="@audience"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:variable>
-  <xsl:variable name="audience.ok" 
-                        select="not(@audience) or not($profile.audience) or
-                                $audience.content != '' or @audience = ''"/>
-
-  <xsl:variable name="condition.content">
-    <xsl:if test="@condition">
-      <xsl:call-template name="cross.compare">
-        <xsl:with-param name="a" select="$profile.condition"/>
-        <xsl:with-param name="b" select="@condition"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:variable>
-  <xsl:variable name="condition.ok" select="not(@condition) or not($profile.condition) or
-                                            $condition.content != '' or @condition = ''"/>
-
-  <xsl:variable name="conformance.content">
-    <xsl:if test="@conformance">
-      <xsl:call-template name="cross.compare">
-        <xsl:with-param name="a" select="$profile.conformance"/>
-        <xsl:with-param name="b" select="@conformance"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:variable>
-  <xsl:variable name="conformance.ok" select="not(@conformance) or not($profile.conformance) or
-                                              $conformance.content != '' or @conformance = ''"/>
-
-  <xsl:variable name="lang.content">
-    <xsl:if test="@lang | @xml:lang">
-      <xsl:call-template name="cross.compare">
-        <xsl:with-param name="a" select="$profile.lang"/>
-        <xsl:with-param name="b" select="(@lang | @xml:lang)[1]"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:variable>
-  <xsl:variable name="lang.ok" select="not(@lang | @xml:lang) or not($profile.lang) or
-                                       $lang.content != '' or @lang = '' or @xml:lang = ''"/>
-
-  <xsl:variable name="os.content">
-    <xsl:if test="@os">
-      <xsl:call-template name="cross.compare">
-        <xsl:with-param name="a" select="$profile.os"/>
-        <xsl:with-param name="b" select="@os"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:variable>
-  <xsl:variable name="os.ok" select="not(@os) or not($profile.os) or
-                                     $os.content != '' or @os = ''"/>
-
-  <xsl:variable name="revision.content">
-    <xsl:if test="@revision">
-      <xsl:call-template name="cross.compare">
-        <xsl:with-param name="a" select="$profile.revision"/>
-        <xsl:with-param name="b" select="@revision"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:variable>
-  <xsl:variable name="revision.ok" select="not(@revision) or not($profile.revision) or
-                                           $revision.content != '' or @revision = ''"/>
-
-  <xsl:variable name="revisionflag.content">
-    <xsl:if test="@revisionflag">
-      <xsl:call-template name="cross.compare">
-        <xsl:with-param name="a" select="$profile.revisionflag"/>
-        <xsl:with-param name="b" select="@revisionflag"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:variable>
-  <xsl:variable name="revisionflag.ok" select="not(@revisionflag) or not($profile.revisionflag) or
-                                               $revisionflag.content != '' or @revisionflag = ''"/>
-
-  <xsl:variable name="role.content">
-    <xsl:if test="@role">
-      <xsl:call-template name="cross.compare">
-        <xsl:with-param name="a" select="$profile.role"/>
-        <xsl:with-param name="b" select="@role"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:variable>
-  <xsl:variable name="role.ok" select="not(@role) or not($profile.role) or
-                                       $role.content != '' or @role = ''"/>
-
-  <xsl:variable name="security.content">
-    <xsl:if test="@security">
-      <xsl:call-template name="cross.compare">
-        <xsl:with-param name="a" select="$profile.security"/>
-        <xsl:with-param name="b" select="@security"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:variable>
-  <xsl:variable name="security.ok" select="not(@security) or not($profile.security) or
-                                           $security.content != '' or @security = ''"/>
-
-  <xsl:variable name="status.content">
-    <xsl:if test="@status">
-      <xsl:call-template name="cross.compare">
-        <xsl:with-param name="a" select="$profile.status"/>
-        <xsl:with-param name="b" select="@status"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:variable>
-  <xsl:variable name="status.ok" select="not(@status) or not($profile.status) or
-                                           $status.content != '' or @status = ''"/>
-
-  <xsl:variable name="userlevel.content">
-    <xsl:if test="@userlevel">
-      <xsl:call-template name="cross.compare">
-        <xsl:with-param name="a" select="$profile.userlevel"/>
-        <xsl:with-param name="b" select="@userlevel"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:variable>
-  <xsl:variable name="userlevel.ok" select="not(@userlevel) or not($profile.userlevel) or
-                                            $userlevel.content != '' or @userlevel = ''"/>
-
-  <xsl:variable name="vendor.content">
-    <xsl:if test="@vendor">
-      <xsl:call-template name="cross.compare">
-        <xsl:with-param name="a" select="$profile.vendor"/>
-        <xsl:with-param name="b" select="@vendor"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:variable>
-  <xsl:variable name="vendor.ok" select="not(@vendor) or not($profile.vendor) or
-                                         $vendor.content != '' or @vendor = ''"/>
-
-  <xsl:variable name="wordsize.content">
-    <xsl:if test="@wordsize">
-      <xsl:call-template name="cross.compare">
-        <xsl:with-param name="a" select="$profile.wordsize"/>
-        <xsl:with-param name="b" select="@wordsize"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:variable>
-  <xsl:variable name="wordsize.ok" 
-                        select="not(@wordsize) or not($profile.wordsize) or
-                                $wordsize.content != '' or @wordsize = ''"/>
-
-  <xsl:variable name="attribute.content">
-    <xsl:if test="@*[local-name()=$profile.attribute]">
-      <xsl:call-template name="cross.compare">
-        <xsl:with-param name="a" select="$profile.value"/>
-        <xsl:with-param name="b" select="@*[local-name()=$profile.attribute]"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:variable>
-  <xsl:variable name="attribute.ok" 
-                select="not(@*[local-name()=$profile.attribute]) or 
-                        not($profile.value) or $attribute.content != '' or 
-                        @*[local-name()=$profile.attribute] = '' or 
-                        not($profile.attribute)"/>
-
-  <xsl:if test="$arch.ok and 
-                $audience.ok and 
-                $condition.ok and 
-                $conformance.ok and 
-                $lang.ok and 
-                $os.ok and 
-                $revision.ok and 
-                $revisionflag.ok and 
-                $role.ok and 
-                $security.ok and 
-                $status.ok and 
-                $userlevel.ok and 
-                $vendor.ok and 
-                $wordsize.ok and 
-                $attribute.ok">
-    <xsl:copy>
-      <xsl:copy-of select="@*"/>
-
-      <!-- Entity references must be replaced with filereferences for temporary tree -->
-      <xsl:if test="@entityref and $profile.baseuri.fixup">
-        <xsl:attribute name="fileref">
-          <xsl:value-of select="unparsed-entity-uri(@entityref)"/>
-        </xsl:attribute>
-      </xsl:if>
-
-      <!-- xml:base is eventually added to the root element -->
-      <xsl:if test="not(../..) and $profile.baseuri.fixup">
-        <xsl:call-template name="add-xml-base"/>
-      </xsl:if>
-
-      <xsl:apply-templates select="node()" mode="profile"/>
-    </xsl:copy>
-  </xsl:if>
-</xsl:template>
-
-<!-- Returns non-empty string if list in $b contains one ore more values from list $a -->
-<xsl:template name="cross.compare">
-  <xsl:param name="a"/>
-  <xsl:param name="b"/>
-  <xsl:param name="sep" select="$profile.separator"/>
-  <xsl:variable name="head" select="substring-before(concat($a, $sep), $sep)"/>
-  <xsl:variable name="tail" select="substring-after($a, $sep)"/>
-  <xsl:if test="contains(concat($sep, $b, $sep), concat($sep, $head, $sep))">1</xsl:if>
-  <xsl:if test="$tail">
-    <xsl:call-template name="cross.compare">
-      <xsl:with-param name="a" select="$tail"/>
-      <xsl:with-param name="b" select="$b"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-</xsl:stylesheet>
-
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/profiling/profile.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/profiling/profile.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,49 +1,0 @@
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version="1.0">
-
-<!-- Include common profiling stylesheet -->
-<xsl:import href="profile-mode.xsl"/>
-
-<!-- This file must be included, because profile-mode is using templates from it -->
-<xsl:import href="../common/stripns.xsl"/>
-
-<!-- In the two pass processing there is no need for base URI fixup -->
-<xsl:param name="profile.baseuri.fixup" select="false()"/>
-
-<!-- If you need to validate profiled content against DTD, 
-     create customization that will import this stylesheet and
-     will use xsl:output (see example bellow) to output reference 
-     to the desired DTD version. --> 
-<!-- Generate DocBook instance with correct DOCTYPE -->
-<!--
-<xsl:output method="xml" 
-            doctype-public="-//OASIS//DTD DocBook XML V4.5//EN"
-            doctype-system="http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"/>
--->
-
-<!-- Profiling parameters -->
-<xsl:param name="profile.arch" select="''"/>
-<xsl:param name="profile.audience" select="''"/>
-<xsl:param name="profile.condition" select="''"/>
-<xsl:param name="profile.conformance" select="''"/>
-<xsl:param name="profile.lang" select="''"/>
-<xsl:param name="profile.os" select="''"/>
-<xsl:param name="profile.revision" select="''"/>
-<xsl:param name="profile.revisionflag" select="''"/>
-<xsl:param name="profile.role" select="''"/>
-<xsl:param name="profile.security" select="''"/>
-<xsl:param name="profile.status" select="''"/>
-<xsl:param name="profile.userlevel" select="''"/>
-<xsl:param name="profile.vendor" select="''"/>
-<xsl:param name="profile.wordsize" select="''"/>
-<xsl:param name="profile.attribute" select="''"/>
-<xsl:param name="profile.value" select="''"/>
-<xsl:param name="profile.separator" select="';'"/>
-
-<!-- Call common profiling mode -->
-<xsl:template match="/">
-  <xsl:apply-templates select="." mode="profile"/>
-</xsl:template>
-
-</xsl:stylesheet>
-
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/profiling/strip-attributes.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/profiling/strip-attributes.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,27 +1,0 @@
-<?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version="1.0">
-
-<xsl:output method="xml"/>
-
-<xsl:param name="attributes" select="''"/>
-
-<xsl:variable name="strip-attributes"
-              select="concat(' ', normalize-space($attributes), ' ')"/>
-
-<xsl:template match="@*|text()|comment()|processing-instruction()">
-  <xsl:copy/>
-</xsl:template>
-
-<xsl:template match="*">
-  <xsl:copy>
-    <xsl:for-each select="@*">
-      <xsl:if test="not(contains($strip-attributes, concat(' ',name(.),' ')))">
-        <xsl:copy-of select="."/>
-      </xsl:if>
-    </xsl:for-each>
-    <xsl:apply-templates select="node()"/>
-  </xsl:copy>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/profiling/xsl2profile.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/profiling/xsl2profile.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,159 +1,0 @@
-<?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:xslo="http://www.w3.org/1999/XSL/TransformAlias"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                exclude-result-prefixes="fo"
-                version="1.0">
-
-<xsl:include href="../lib/lib.xsl"/>
-
-<xsl:output method="xml" encoding="US-ASCII"/>
-
-<xsl:namespace-alias stylesheet-prefix="xslo" result-prefix="xsl"/>
-
-<xsl:preserve-space elements="*"/>
-
-<xsl:template match="/">
-  <xsl:comment>This file was created automatically by xsl2profile</xsl:comment>
-  <xsl:comment>from the DocBook XSL stylesheets.</xsl:comment>
-  <xsl:apply-templates/>
-</xsl:template>
-
-<!-- Make sure we override some templates and parameters appropriately for XHTML -->
-<xsl:template match="xsl:stylesheet">
-  <xsl:copy>
-    <xsl:attribute name="exslt:dummy" xmlns:exslt="http://exslt.org/common">dummy</xsl:attribute>
-    <xsl:attribute name="ng:dummy" xmlns:ng="http://docbook.org/docbook-ng">dummy</xsl:attribute>
-    <xsl:attribute name="db:dummy" xmlns:db="http://docbook.org/ns/docbook">dummy</xsl:attribute>
-    <xsl:if test="not(@extension-element-prefixes)">
-      <xsl:attribute name="extension-element-prefixes">exslt</xsl:attribute>
-    </xsl:if>
-    <xsl:if test="not(@exclude-result-prefixes)">
-      <xsl:attribute name="exclude-result-prefixes">exslt</xsl:attribute>
-    </xsl:if>
-    <xsl:for-each select="@*">
-      <xsl:choose>
-        <xsl:when test="local-name(.) = 'extension-element-prefixes' or
-                        local-name(.) = 'exclude-result-prefixes'">
-          <xsl:attribute name="{local-name(.)}"><xsl:value-of select="concat(., ' exslt')"/></xsl:attribute>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:attribute name="{local-name(.)}"><xsl:value-of select="."/></xsl:attribute>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:for-each>
-    <xsl:apply-templates/>
-  </xsl:copy>
-</xsl:template>
-
-<xsl:template match="*">
-  <xsl:copy>
-    <xsl:copy-of select="@*"/>
-    <xsl:apply-templates/>
-  </xsl:copy>
-</xsl:template>
-
-<xsl:template match="comment()|processing-instruction()|text()">
-  <xsl:copy/>
-</xsl:template>
-
-<xsl:template match="xsl:template[@match='/']">
-  <xslo:include href="../profiling/profile-mode.xsl"/>
-  <xslo:variable name="profiled-content">
-    <xslo:choose>
-      <xslo:when test="*/self::ng:* or */self::db:*">
-        <xslo:message>Note: namesp. cut : stripped namespace before processing</xslo:message>
-        <xslo:variable name="stripped-content">
-          <xslo:apply-templates select="/" mode="stripNS"/>
-        </xslo:variable>
-        <xslo:message>Note: namesp. cut : processing stripped document</xslo:message>
-        <xslo:apply-templates select="exslt:node-set($stripped-content)" mode="profile"/>
-      </xslo:when>
-      <xslo:otherwise>
-        <xslo:apply-templates select="/" mode="profile"/>
-      </xslo:otherwise>
-    </xslo:choose>
-  </xslo:variable>
-  <xslo:variable name="profiled-nodes" select="exslt:node-set($profiled-content)"/>
-  <xsl:copy>
-    <xsl:copy-of select="@*"/>
-    <xsl:apply-templates mode="correct"/>
-  </xsl:copy>
-</xsl:template>
-
-<xsl:template match="xsl:template[@name='hhc-main' or @name='hhp-main' or @name='etoc'] | xsl:variable[@name='raw.help.title']">
-  <xsl:copy>
-    <xsl:copy-of select="@*"/>
-    <xsl:apply-templates mode="correct"/>
-  </xsl:copy>
-</xsl:template>
-
-<xsl:template match="*[starts-with(@select, '/')]" mode="correct">
-  <xsl:copy>
-    <xsl:for-each select="@*">
-      <xsl:choose>
-        <xsl:when test="local-name(.) = 'select' and string(.) =  '/'">
-          <xsl:attribute name="{local-name(.)}">$profiled-nodes</xsl:attribute>
-        </xsl:when>
-        <xsl:when test="local-name(.) = 'select' and starts-with(., '/')">
-          <xsl:attribute name="{local-name(.)}">$profiled-nodes<xsl:value-of select="."/></xsl:attribute>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:attribute name="{local-name(.)}"><xsl:value-of select="."/></xsl:attribute>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:for-each>
-    <xsl:apply-templates mode="correct"/>
-  </xsl:copy>
-</xsl:template>
-
-<xsl:template match='*[contains(@*, "key(&apos;id&apos;,$rootid)")]' mode="correct" priority="2">
-  <xsl:copy>
-    <xsl:for-each select="@*">
-      <xsl:choose>
-        <xsl:when test='contains(., "key(&apos;id&apos;,$rootid)")'>
-          <xsl:attribute name="{local-name(.)}">
-            <xsl:call-template name="string.subst">
-              <xsl:with-param name="string" select="."/>
-              <xsl:with-param name="target">key('id',$rootid)</xsl:with-param>
-              <xsl:with-param name="replacement">$profiled-nodes//*[@id=$rootid]</xsl:with-param>
-            </xsl:call-template>
-          </xsl:attribute>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:attribute name="{local-name(.)}"><xsl:value-of select="."/></xsl:attribute>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:for-each>
-    <xsl:apply-templates mode="correct"/>
-  </xsl:copy>
-</xsl:template>
-
-<!-- FO stylesheet has apply-templates without select, we must detect it by context -->
-<xsl:template match="fo:root//xsl:apply-templates" mode="correct">
-  <xsl:copy>
-    <xsl:copy-of select="@*"/>
-    <xsl:attribute name="select">$profiled-nodes/node()</xsl:attribute>
-    <xsl:apply-templates mode="correct"/>
-  </xsl:copy>
-</xsl:template>
-
-<!-- DB5 namespace stripping is already done  -->
-<xsl:template match="xsl:when[contains(@test, 'self::db')]" mode="correct">
-  <xsl:copy>
-    <xsl:attribute name="test">false()</xsl:attribute>
-  </xsl:copy>
-</xsl:template>
-
-<xsl:template match="*" mode="correct">
-  <xsl:copy>
-    <xsl:copy-of select="@*"/>
-    <xsl:apply-templates mode="correct"/>
-  </xsl:copy>
-</xsl:template>
-
-<xsl:template match="comment()|processing-instruction()|text()" mode="correct">
-  <xsl:copy/>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/admon.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/admon.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,133 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<xsl:template match="*" mode="admon.graphic.width">
-  <xsl:param name="node" select="."/>
-  <xsl:text>25</xsl:text>
-</xsl:template>
-
-<xsl:template match="note|important|warning|caution|tip">
-  <xsl:choose>
-    <xsl:when test="$admon.graphics != 0">
-      <xsl:call-template name="graphical.admonition"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="nongraphical.admonition"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="admon.graphic">
-  <xsl:param name="node" select="."/>
-  <xsl:value-of select="$admon.graphics.path"/>
-  <xsl:choose>
-    <xsl:when test="local-name($node)='note'">note</xsl:when>
-    <xsl:when test="local-name($node)='warning'">warning</xsl:when>
-    <xsl:when test="local-name($node)='caution'">caution</xsl:when>
-    <xsl:when test="local-name($node)='tip'">tip</xsl:when>
-    <xsl:when test="local-name($node)='important'">important</xsl:when>
-    <xsl:otherwise>note</xsl:otherwise>
-  </xsl:choose>
-  <xsl:value-of select="$admon.graphics.extension"/>
-</xsl:template>
-
-<xsl:template name="graphical.admonition">
-  <xsl:variable name="admon.type">
-    <xsl:choose>
-      <xsl:when test="local-name(.)='note'">Note</xsl:when>
-      <xsl:when test="local-name(.)='warning'">Warning</xsl:when>
-      <xsl:when test="local-name(.)='caution'">Caution</xsl:when>
-      <xsl:when test="local-name(.)='tip'">Tip</xsl:when>
-      <xsl:when test="local-name(.)='important'">Important</xsl:when>
-      <xsl:otherwise>Note</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="alt">
-    <xsl:call-template name="gentext">
-      <xsl:with-param name="key" select="$admon.type"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:if test="$admon.style != ''">
-      <xsl:attribute name="style">
-        <xsl:value-of select="$admon.style"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <table border="0">
-      <xsl:attribute name="summary">
-        <xsl:value-of select="$admon.type"/>
-        <xsl:if test="title|info/title">
-          <xsl:text>: </xsl:text>
-          <xsl:value-of select="(title|info/title)[1]"/>
-        </xsl:if>
-      </xsl:attribute>
-      <tr>
-        <td rowspan="2" align="center" valign="top">
-          <xsl:attribute name="width">
-            <xsl:apply-templates select="." mode="admon.graphic.width"/>
-          </xsl:attribute>
-          <img alt="[{$alt}]">
-            <xsl:attribute name="src">
-              <xsl:call-template name="admon.graphic"/>
-            </xsl:attribute>
-          </img>
-        </td>
-        <th align="left">
-          <xsl:call-template name="anchor"/>
-          <xsl:if test="$admon.textlabel != 0 or title or info/title">
-            <xsl:apply-templates select="." mode="object.title.markup"/>
-          </xsl:if>
-        </th>
-      </tr>
-      <tr>
-        <td align="left" valign="top">
-          <xsl:apply-templates/>
-        </td>
-      </tr>
-    </table>
-  </div>
-</xsl:template>
-
-<xsl:template name="nongraphical.admonition">
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:if test="$admon.style">
-      <xsl:attribute name="style">
-        <xsl:value-of select="$admon.style"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:if test="$admon.textlabel != 0 or title or info/title">
-      <h3 class="title">
-        <xsl:call-template name="anchor"/>
-        <xsl:apply-templates select="." mode="object.title.markup"/>
-      </h3>
-    </xsl:if>
-
-    <xsl:apply-templates/>
-  </div>
-</xsl:template>
-
-<xsl:template match="note/title"/>
-<xsl:template match="important/title"/>
-<xsl:template match="warning/title"/>
-<xsl:template match="caution/title"/>
-<xsl:template match="tip/title"/>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/annotations.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/annotations.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,158 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
-
-<xsl:template name="add.annotation.links">
-  <xsl:param name="scripts" select="normalize-space($annotation.js)"/>
-  <xsl:choose>
-    <xsl:when test="contains($scripts, ' ')">
-      <script type="text/javascript" src="{substring-before($scripts, ' ')}"/>
-      <xsl:call-template name="add.annotation.links">
-        <xsl:with-param name="scripts" select="substring-after($scripts, ' ')"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <script type="text/javascript" src="{$scripts}"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="annotation"/>
-
-<xsl:template name="apply-annotations">
-  <xsl:if test="$annotation.support != 0">
-  <!-- do any annotations apply to the context node? -->
-  <xsl:variable name="id" select="(@id|@xml:id)[1]"/>
-
-  <xsl:variable name="aids">
-    <xsl:for-each select="//annotation">
-      <xsl:if test="@annotates=$id                     or starts-with(@annotates, concat($id, ' '))                     or contains(@annotates, concat(' ', $id, ' '))                     or substring(@annotates, string-length(@annotates)-3)                        = concat(' ', $id)">
-        <xsl:value-of select="generate-id()"/>
-        <xsl:text> </xsl:text>
-      </xsl:if>
-    </xsl:for-each>
-    <xsl:if test="normalize-space(@annotations) != ''">
-      <xsl:call-template name="annotations-pointed-to">
-        <xsl:with-param name="annotations" select="normalize-space(@annotations)"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:if test="$aids != ''">
-    <xsl:call-template name="apply-annotations-by-gid">
-      <xsl:with-param name="gids" select="normalize-space($aids)"/>
-    </xsl:call-template>
-  </xsl:if>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="annotations-pointed-to">
-  <xsl:param name="annotations"/>
-  <xsl:choose>
-    <xsl:when test="contains($annotations, ' ')">
-      <xsl:variable name="a" select="key('id', substring-before($annotations, ' '))"/>
-      <xsl:if test="$a">
-        <xsl:value-of select="generate-id($a)"/>
-        <xsl:text> </xsl:text>
-      </xsl:if>
-      <xsl:call-template name="annotations-pointed-to">
-        <xsl:with-param name="annotations" select="substring-after($annotations, ' ')"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:variable name="a" select="key('id', $annotations)"/>
-      <xsl:if test="$a">
-        <xsl:value-of select="generate-id($a)"/>
-        <xsl:text> </xsl:text>
-      </xsl:if>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="apply-annotations-by-gid">
-  <xsl:param name="gids"/>
-
-  <xsl:choose>
-    <xsl:when test="contains($gids, ' ')">
-      <xsl:variable name="gid" select="substring-before($gids, ' ')"/>
-      <xsl:apply-templates select="key('gid', $gid)" mode="annotation-inline"/>
-      <xsl:call-template name="apply-annotations-by-gid">
-        <xsl:with-param name="gids" select="substring-after($gids, ' ')"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates select="key('gid', $gids)" mode="annotation-inline"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="annotation" mode="annotation-inline">
-  <xsl:variable name="title">
-    <xsl:choose>
-      <xsl:when test="title">
-        <xsl:value-of select="title"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:text>[Annotation #</xsl:text>
-        <xsl:number count="annotation" level="any" format="1"/>
-        <xsl:text>]</xsl:text>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <a id="anch-{generate-id(.)}" href="#annot-{generate-id(.)}" title="{$title}">
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:attribute name="onClick">
-      <xsl:text>popup_</xsl:text>
-      <xsl:value-of select="generate-id(.)"/>
-      <xsl:text>.showPopup('anch-</xsl:text>
-      <xsl:value-of select="generate-id(.)"/>
-      <xsl:text>'); return false;</xsl:text>
-    </xsl:attribute>
-    <img src="{$annotation.graphic.open}" border="0" alt="{$title}"/>
-  </a>
-</xsl:template>
-
-<xsl:template match="annotation" mode="annotation-popup">
-  <div class="annotation-nocss">
-    <p>
-      <a id="annot-{generate-id(.)}"/>
-      <xsl:text>Annotation #</xsl:text>
-      <xsl:number count="annotation" level="any" format="1"/>
-      <xsl:text>:</xsl:text>
-    </p>
-  </div>
-
-  <div id="popup-{generate-id(.)}" class="annotation-popup">
-    <xsl:if test="string-length(.) &gt; 300">
-      <xsl:attribute name="style">width:400px</xsl:attribute>
-    </xsl:if>
-
-    <xsl:call-template name="annotation-title"/>
-    <div class="annotation-body">
-      <xsl:apply-templates select="*[local-name(.) != 'title']"/>
-    </div>
-    <div class="annotation-close">
-      <a href="#" onclick="popup_{generate-id(.)}.hidePopup();return false;">
-        <xsl:apply-templates select="." mode="class.attribute"/>
-        <img src="{$annotation.graphic.close}" alt="X" border="0"/>
-      </a>
-    </div>
-  </div>
-</xsl:template>
-
-<xsl:template name="annotation-title">
-  <div class="annotation-title">
-    <xsl:choose>
-      <xsl:when test="title">
-        <xsl:apply-templates select="title/node()"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:text>Annotation</xsl:text>
-      </xsl:otherwise>
-    </xsl:choose>
-  </div>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/autoidx-kimber.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/autoidx-kimber.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,139 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:k="http://www.isogen.com/functions/com.isogen.saxoni18n.Saxoni18nService" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="k" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-<!-- The "kimber" method contributed by Eliot Kimber of Innodata Isogen.  -->
-<!-- ==================================================================== -->
-<!--   *** THIS MODULE ONLY WORKS WITH SAXON 6 OR SAXON 8 ***             -->
-<!-- ==================================================================== -->
-
-
-<xsl:include href="../common/autoidx-kimber.xsl"/>
-
-<!-- Java sort apparently works only on lang part, not country -->
-<xsl:param name="sort.lang">
-  <xsl:choose>
-    <xsl:when test="contains(concat(/*/@lang, /*/@xml:lang), '-')">
-      <xsl:value-of select="substring-before(concat(/*/@lang, /*/@xml:lang), '-')"/>
-    </xsl:when>
-    <xsl:when test="contains(concat(/*/@lang, /*/@xml:lang), '_')">
-      <xsl:value-of select="substring-before(concat(/*/@lang, /*/@xml:lang), '_')"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="concat(/*/@lang, /*/@xml:lang)"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:param>
-
-<xsl:template name="generate-kimber-index">
-  <xsl:param name="scope" select="NOTANODE"/>
-
-  <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
-  <xsl:if test="not(contains($vendor, 'SAXON '))">
-    <xsl:message terminate="yes">
-      <xsl:text>ERROR: the 'kimber' index method requires the </xsl:text>
-      <xsl:text>Saxon version 6 or 8 XSLT processor.</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:if test="not(function-available('k:getIndexGroupKey'))">
-    <xsl:message terminate="yes">
-      <xsl:text>ERROR: the 'kimber' index method requires the </xsl:text>
-      <xsl:text>Innodata Isogen 
-Java extensions for </xsl:text>
-      <xsl:text>internationalized indexes. 
-Install those </xsl:text>
-      <xsl:text>extensions, or use a different index method.
-</xsl:text>
-      <xsl:text>For more information, see:
-</xsl:text>
-      <xsl:text>http://www.innodata-isogen.com/knowledge_center/tools_downloads/i18nsupport</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:variable name="role">
-    <xsl:if test="$index.on.role != 0">
-      <xsl:value-of select="@role"/>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="type">
-    <xsl:if test="$index.on.type != 0">
-      <xsl:value-of select="@type"/>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="terms" select="//indexterm[count(.|key('k-group', k:getIndexGroupKey(concat(/*/@lang, /*/@xml:lang), normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;]))))[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1]) = 1 and not(@class = 'endofrange')]"/>
-
-  <xsl:variable name="alphabetical" select="$terms[not(starts-with(                 k:getIndexGroupKey(concat(/*/@lang, /*/@xml:lang), normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;]))),                 '#NUMERIC'                 ))]"/>
-
-  <xsl:variable name="others" select="$terms[starts-with(                 k:getIndexGroupKey(concat(/*/@lang, /*/@xml:lang), normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;]))),                 '#NUMERIC'                 )]"/>
-
-  <div class="index">
-    <xsl:if test="$others">
-      <div class="indexdev">
-        <h3>
-          <xsl:call-template name="gentext">
-            <xsl:with-param name="key" select="'index symbols'"/>
-          </xsl:call-template>
-        </h3>
-        <dl>
-          <xsl:apply-templates select="$others" mode="index-symbol-div">
-            <xsl:with-param name="scope" select="$scope"/>
-            <xsl:with-param name="role" select="$role"/>
-            <xsl:with-param name="type" select="$type"/>
-            <xsl:sort lang="{$sort.lang}" select="k:getIndexGroupSortKey(concat(/*/@lang, /*/@xml:lang),                         k:getIndexGroupKey(concat(/*/@lang, /*/@xml:lang), normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;]))))"/>
-          </xsl:apply-templates>
-        </dl>
-      </div>
-    </xsl:if>
-
-    <xsl:apply-templates select="$alphabetical" mode="index-div-kimber">
-      <xsl:with-param name="scope" select="$scope"/>
-      <xsl:with-param name="role" select="$role"/>
-      <xsl:with-param name="type" select="$type"/>
-      <xsl:sort lang="{$sort.lang}" select="k:getIndexGroupSortKey(concat(/*/@lang, /*/@xml:lang),                      k:getIndexGroupKey(concat(/*/@lang, /*/@xml:lang), normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;]))))"/>
-    </xsl:apply-templates>
-  </div>
-
-</xsl:template>
-
-<xsl:template match="indexterm" mode="index-div-kimber">
-  <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-
-  <xsl:variable name="key" select="k:getIndexGroupKey(concat(/*/@lang, /*/@xml:lang), normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])))"/>
-
-  <xsl:variable name="label" select="k:getIndexGroupLabel(concat(/*/@lang, /*/@xml:lang), $key)"/>
-
-  <xsl:if test="key('k-group', $label)[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][count(.|key('primary', normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])))[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1]) = 1]">
-    <div class="indexdiv">
-      <h3>
-        <xsl:value-of select="$label"/>
-      </h3>
-      <dl>
-        <xsl:apply-templates select="key('k-group', $key)[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))]                             [count(.|key('primary', normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])))[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))]                             [1])=1]" mode="index-primary">
-          <xsl:sort select="normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;]))" lang="{$sort.lang}"/>
-          <xsl:with-param name="scope" select="$scope"/>
-          <xsl:with-param name="role" select="$role"/>
-          <xsl:with-param name="type" select="$type"/>
-        </xsl:apply-templates>
-      </dl>
-    </div>
-  </xsl:if>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/autoidx-kosek.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/autoidx-kosek.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,109 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:i="urn:cz-kosek:functions:index" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:func="http://exslt.org/functions" xmlns:k="http://www.isogen.com/functions/com.isogen.saxoni18n.Saxoni18nService" xmlns:exslt="http://exslt.org/common" xmlns="http://www.w3.org/1999/xhtml" extension-element-prefixes="func exslt" exclude-result-prefixes="func exslt i l k" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-<!-- The "kosek" method contributed by Jirka Kosek. -->
-
-<xsl:include href="../common/autoidx-kosek.xsl"/>
-
-<xsl:template name="generate-kosek-index">
-  <xsl:param name="scope" select="(ancestor::book|/)[last()]"/>
-
-  <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
-  <xsl:if test="contains($vendor, 'libxslt')">
-    <xsl:message terminate="yes">
-      <xsl:text>ERROR: the 'kosek' index method does not </xsl:text>
-      <xsl:text>work with the xsltproc XSLT processor.</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:if test="contains($vendor, 'Saxonica')">
-    <xsl:message terminate="yes">
-      <xsl:text>ERROR: the 'kosek' index method does not </xsl:text>
-      <xsl:text>work with the Saxon 8 XSLT processor.</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:if test="not(function-available('exslt:node-set') or                     function-available('exslt:nodeSet'))">
-    <xsl:message terminate="yes">
-      <xsl:text>ERROR: the 'kosek' index method requires the </xsl:text>
-      <xsl:text>exslt:node-set() function. Use a processor that </xsl:text>
-      <xsl:text>has it, or use a different index method.</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:if test="not(function-available('i:group-index'))">
-    <xsl:message terminate="yes">
-      <xsl:text>ERROR: the 'kosek' index method requires the
-</xsl:text>
-      <xsl:text>index extension functions be imported:
-</xsl:text>
-      <xsl:text>  xsl:import href="common/autoidx-kosek.xsl"</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:variable name="role">
-    <xsl:if test="$index.on.role != 0">
-      <xsl:value-of select="@role"/>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="type">
-    <xsl:if test="$index.on.type != 0">
-      <xsl:value-of select="@type"/>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="terms" select="//indexterm[count(.|key('group-code', i:group-index(normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;]))))[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1]) = 1 and not(@class = 'endofrange')]"/>
-
-  <div class="index">
-    <xsl:apply-templates select="$terms" mode="index-div-kosek">
-      <xsl:with-param name="scope" select="$scope"/>
-      <xsl:with-param name="role" select="$role"/>
-      <xsl:with-param name="type" select="$type"/>
-      <xsl:sort select="i:group-index(normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])))" data-type="number"/>
-    </xsl:apply-templates>
-  </div>
-</xsl:template>
-
-<xsl:template match="indexterm" mode="index-div-kosek">
-  <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-
-  <xsl:variable name="key" select="i:group-index(normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])))"/>
-
-  <xsl:variable name="lang">
-    <xsl:call-template name="l10n.language"/>
-  </xsl:variable>
-
-  <xsl:if test="key('group-code', $key)[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][count(.|key('primary', normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])))[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1]) = 1]">
-    <div class="indexdiv">
-      <h3>
-        <xsl:value-of select="i:group-letter($key)"/>
-      </h3>
-      <dl>
-        <xsl:apply-templates select="key('group-code', $key)[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][count(.|key('primary', normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])))[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1])=1]" mode="index-primary">
-          <xsl:sort select="normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;]))" lang="{$lang}"/>
-          <xsl:with-param name="scope" select="$scope"/>
-          <xsl:with-param name="role" select="$role"/>
-          <xsl:with-param name="type" select="$type"/>
-        </xsl:apply-templates>
-      </dl>
-    </div>
-  </xsl:if>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/autoidx-ng.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/autoidx-ng.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,21 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the DocBook XSL Stylesheet distribution.
-     See ../README or http://docbook.sf.net/ for copyright
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- You should have this directly in your customization file. -->
-<!-- This file is there only to retain backward compatibility. -->
-<xsl:import href="autoidx-kosek.xsl"/>
-<xsl:param name="index.method">kosek</xsl:param>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/autoidx.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/autoidx.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,588 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exslt="http://exslt.org/common" xmlns="http://www.w3.org/1999/xhtml" extension-element-prefixes="exslt" exclude-result-prefixes="exslt" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-<!-- The "basic" method derived from Jeni Tennison's work. -->
-<!-- The "kosek" method contributed by Jirka Kosek. -->
-<!-- The "kimber" method contributed by Eliot Kimber of Innodata Isogen. -->
-
-<xsl:variable name="kimber.imported" select="0"/>
-<xsl:variable name="kosek.imported" select="0"/>
-
-<xsl:key name="letter" match="indexterm" use="translate(substring(normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])), 1, 1),'Aa&#192;&#224;&#193;&#225;&#194;&#226;&#195;&#227;&#196;&#228;&#197;&#229;&#256;&#257;&#258;&#259;&#260;&#261;&#461;&#462;&#478;&#479;&#480;&#481;&#506;&#507;&#512;&#513;&#514;&#515;&#550;&#551;&#7680;&#7681;&#7834;&#7840;&#7841;&#7842;&#7843;&#7844;&#7845;&#7846;&#7847;&#7848;&#7849;&#7850;&#7851;&#7852;&#7853;&#7854;&#7855;&#7856;&#7857;&#7858;&#7859;&#7860;&#7861;&#7862;&#7863;Bb&#384;&#385;&#595;&#386;&#387;&#7682;&#7683;&#7684;&#7685;&#7686;&#7687;Cc&#199;&#231;&#262;&#263;&#264;&#265;&#266;&#267;&#268;&#269;&#391;&#392;&#597;&#7688;&#7689;Dd&#270;&#271;&#272;&#273;&#394;&#599;&#395;&#396;&#453;&#498;&#545;&#598;&#7690;&#7691;&#7692;&#7693;&#7694;&#7695;&#7696;&#7697;&#7698;&#7699;Ee&#200;&#232;&#201;&#233;&#202;&#234;&#203;&#235;&#274;&#275;&#276;&#277;&#278;&#279;&#280;&#281;&#282;&#283;&#516;&#517;&#518;&#519;&#552;&#553;&#7700;&#7701;&#7702;&#7703;&#7704;&#7705;&#7706;&#7707;&#7708;&#7709;&#7864;&#7865;&#7866;&#7867;&#7868;&#7869;&#7870;&#7871;&#7872;&#7873;&#7874;&#7875;&#7876;&#7877;&#7878;&#7879;Ff&#401;&#402;&#7710;&#7711;Gg&#284;&#285;&#286;&#287;&#288;&#289;&#290;&#291;&#403;&#608;&#484;&#485;&#486;&#487;&#500;&#501;&#7712;&#7713;Hh&#292;&#293;&#294;&#295;&#542;&#543;&#614;&#7714;&#7715;&#7716;&#7717;&#7718;&#7719;&#7720;&#7721;&#7722;&#7723;&#7830;Ii&#204;&#236;&#205;&#237;&#206;&#238;&#207;&#239;&#296;&#297;&#298;&#299;&#300;&#301;&#302;&#303;&#304;&#407;&#616;&#463;&#464;&#520;&#521;&#522;&#523;&#7724;&#7725;&#7726;&#7727;&#7880;&#7881;&#7882;&#7883;Jj&#308;&#309;&#496;&#669;Kk&#310;&#311;&#408;&#409;&#488;&#489;&#7728;&#7729;&#7730;&#7731;&#7732;&#7733;Ll&#313;&#314;&#315;&#316;&#317;&#318;&#319;&#320;&#321;&#322;&#410;&#456;&#564;&#619;&#620;&#621;&#7734;&#7735;&#7736;&#7737;&#7738;&#7739;&#7740;&#7741;Mm&#625;&#7742;&#7743;&#7744;&#7745;&#7746;&#7747;Nn&#209;&#241;&#323;&#324;&#325;&#326;&#327;&#328;&#413;&#626;&#414;&#544;&#459;&#504;&#505;&#565;&#627;&#7748;&#7749;&#7750;&#7751;&#7752;&#7753;&#7754;&#7755;Oo&#210;&#242;&#211;&#243;&#212;&#244;&#213;&#245;&#214;&#246;&#216;&#248;&#332;&#333;&#334;&#335;&#336;&#337;&#415;&#416;&#417;&#465;&#466;&#490;&#491;&#492;&#493;&#510;&#511;&#524;&#525;&#526;&#527;&#554;&#555;&#556;&#557;&#558;&#559;&#560;&#561;&#7756;&#7757;&#7758;&#7759;&#7760;&#7761;&#7762;&#7763;&#7884;&#7885;&#7886;&#7887;&#7888;&#7889;&#7890;&#7891;&#7892;&#7893;&#7894;&#7895;&#7896;&#7897;&#7898;&#7899;&#7900;&#7901;&#7902;&#7903;&#7904;&#7905;&#7906;&#7907;Pp&#420;&#421;&#7764;&#7765;&#7766;&#7767;Qq&#672;Rr&#340;&#341;&#342;&#343;&#344;&#345;&#528;&#529;&#530;&#531;&#636;&#637;&#638;&#7768;&#7769;&#7770;&#7771;&#7772;&#7773;&#7774;&#7775;Ss&#346;&#347;&#348;&#349;&#350;&#351;&#352;&#353;&#536;&#537;&#642;&#7776;&#7777;&#7778;&#7779;&#7780;&#7781;&#7782;&#7783;&#7784;&#7785;Tt&#354;&#355;&#356;&#357;&#358;&#359;&#427;&#428;&#429;&#430;&#648;&#538;&#539;&#566;&#7786;&#7787;&#7788;&#7789;&#7790;&#7791;&#7792;&#7793;&#7831;Uu&#217;&#249;&#218;&#250;&#219;&#251;&#220;&#252;&#360;&#361;&#362;&#363;&#364;&#365;&#366;&#367;&#368;&#369;&#370;&#371;&#431;&#432;&#467;&#468;&#469;&#470;&#471;&#472;&#473;&#474;&#475;&#476;&#532;&#533;&#534;&#535;&#7794;&#7795;&#7796;&#7797;&#7798;&#7799;&#7800;&#7801;&#7802;&#7803;&#7908;&#7909;&#7910;&#7911;&#7912;&#7913;&#7914;&#7915;&#7916;&#7917;&#7918;&#7919;&#7920;&#7921;Vv&#434;&#651;&#7804;&#7805;&#7806;&#7807;Ww&#372;&#373;&#7808;&#7809;&#7810;&#7811;&#7812;&#7813;&#7814;&#7815;&#7816;&#7817;&#7832;Xx&#7818;&#7819;&#7820;&#7821;Yy&#221;&#253;&#255;&#376;&#374;&#375;&#435;&#436;&#562;&#563;&#7822;&#7823;&#7833;&#7922;&#7923;&#7924;&#7925;&#7926;&#7927;&#7928;&#7929;Zz&#377;&#378;&#379;&#380;&#381;&#382;&#437;&#438;&#548;&#549;&#656;&#657;&#7824;&#7825;&#7826;&#7827;&#7828;&#7829;&#7829;','AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ')"/>
-
-<xsl:key name="primary" match="indexterm" use="normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;]))"/>
-
-<xsl:key name="secondary" match="indexterm" use="concat(normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])), &quot; &quot;, normalize-space(concat(secondary/@sortas, secondary[not(@sortas) or @sortas = &quot;&quot;])))"/>
-
-<xsl:key name="tertiary" match="indexterm" use="concat(normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])), &quot; &quot;, normalize-space(concat(secondary/@sortas, secondary[not(@sortas) or @sortas = &quot;&quot;])), &quot; &quot;, normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas) or @sortas = &quot;&quot;])))"/>
-
-<xsl:key name="endofrange" match="indexterm[@class='endofrange']" use="@startref"/>
-
-<xsl:key name="primary-section" match="indexterm[not(secondary) and not(see)]" use="concat(normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])), &quot; &quot;, generate-id((ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage)[last()]))"/>
-
-<xsl:key name="secondary-section" match="indexterm[not(tertiary) and not(see)]" use="concat(normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])), &quot; &quot;, normalize-space(concat(secondary/@sortas, secondary[not(@sortas) or @sortas = &quot;&quot;])), &quot; &quot;, generate-id((ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage)[last()]))"/>
-
-<xsl:key name="tertiary-section" match="indexterm[not(see)]" use="concat(normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])), &quot; &quot;, normalize-space(concat(secondary/@sortas, secondary[not(@sortas) or @sortas = &quot;&quot;])), &quot; &quot;, normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas) or @sortas = &quot;&quot;])), &quot; &quot;, generate-id((ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage)[last()]))"/>
-
-<xsl:key name="see-also" match="indexterm[seealso]" use="concat(normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])), &quot; &quot;, normalize-space(concat(secondary/@sortas, secondary[not(@sortas) or @sortas = &quot;&quot;])), &quot; &quot;, normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas) or @sortas = &quot;&quot;])), &quot; &quot;, seealso)"/>
-
-<xsl:key name="see" match="indexterm[see]" use="concat(normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])), &quot; &quot;, normalize-space(concat(secondary/@sortas, secondary[not(@sortas) or @sortas = &quot;&quot;])), &quot; &quot;, normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas) or @sortas = &quot;&quot;])), &quot; &quot;, see)"/>
-
-<xsl:key name="sections" match="*[@id or @xml:id]" use="@id|@xml:id"/>
-
-
-<xsl:template name="generate-index">
-  <xsl:param name="scope" select="(ancestor::book|/)[last()]"/>
-
-  <xsl:choose>
-    <xsl:when test="$index.method = 'kosek'">
-      <xsl:call-template name="generate-kosek-index">
-        <xsl:with-param name="scope" select="$scope"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="$index.method = 'kimber'">
-      <xsl:call-template name="generate-kimber-index">
-        <xsl:with-param name="scope" select="$scope"/>
-      </xsl:call-template>
-    </xsl:when>
-
-    <xsl:otherwise>
-      <xsl:call-template name="generate-basic-index">
-        <xsl:with-param name="scope" select="$scope"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-      
-<xsl:template name="generate-basic-index">
-  <xsl:param name="scope" select="NOTANODE"/>
-
-  <xsl:variable name="role">
-    <xsl:if test="$index.on.role != 0">
-      <xsl:value-of select="@role"/>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="type">
-    <xsl:if test="$index.on.type != 0">
-      <xsl:value-of select="@type"/>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="terms" select="//indexterm                         [count(.|key('letter',                           translate(substring(normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])), 1, 1),                              'Aa&#192;&#224;&#193;&#225;&#194;&#226;&#195;&#227;&#196;&#228;&#197;&#229;&#256;&#257;&#258;&#259;&#260;&#261;&#461;&#462;&#478;&#479;&#480;&#481;&#506;&#507;&#512;&#513;&#514;&#515;&#550;&#551;&#7680;&#7681;&#7834;&#7840;&#7841;&#7842;&#7843;&#7844;&#7845;&#7846;&#7847;&#7848;&#7849;&#7850;&#7851;&#7852;&#7853;&#7854;&#7855;&#7856;&#7857;&#7858;&#7859;&#7860;&#7861;&#7862;&#7863;Bb&#384;&#385;&#595;&#386;&#387;&#7682;&#7683;&#7684;&#7685;&#7686;&#7687;Cc&#199;&#231;&#262;&#263;&#264;&#265;&#266;&#267;&#268;&#269;&#391;&#392;&#597;&#7688;&#7689;Dd&#270;&#271;&#272;&#273;&#394;&#599;&#395;&#396;&#453;&#498;&#545;&#598;&#7690;&#7691;&#7692;&#7693;&#7694;&#7695;&#7696;&#7697;&#7698;&#7699;Ee&#200;&#232;&#201;&#233;&#202;&#234;&#203;&#235;&#274;&#275;&#276;&#277;&#278;&#279;&#280;&#281;&#282;&#283;&#516;&#517;&#518;&#519;&#552;&#553;&#7700;&#7701;&#7702;&#7703;&#7704;&#7705;&#7706;&#7707;&#7708;&#7709;&#7864;&#7865;&#7866;&#7867;&#7868;&#7869;&#7870;&#7871;&#7872;&#7873;&#7874;&#7875;&#7876;&#7877;&#7878;&#7879;Ff&#401;&#402;&#7710;&#7711;Gg&#284;&#285;&#286;&#287;&#288;&#289;&#290;&#291;&#403;&#608;&#484;&#485;&#486;&#487;&#500;&#501;&#7712;&#7713;Hh&#292;&#293;&#294;&#295;&#542;&#543;&#614;&#7714;&#7715;&#7716;&#7717;&#7718;&#7719;&#7720;&#7721;&#7722;&#7723;&#7830;Ii&#204;&#236;&#205;&#237;&#206;&#238;&#207;&#239;&#296;&#297;&#298;&#299;&#300;&#301;&#302;&#303;&#304;&#407;&#616;&#463;&#464;&#520;&#521;&#522;&#523;&#7724;&#7725;&#7726;&#7727;&#7880;&#7881;&#7882;&#7883;Jj&#308;&#309;&#496;&#669;Kk&#310;&#311;&#408;&#409;&#488;&#489;&#7728;&#7729;&#7730;&#7731;&#7732;&#7733;Ll&#313;&#314;&#315;&#316;&#317;&#318;&#319;&#320;&#321;&#322;&#410;&#456;&#564;&#619;&#620;&#621;&#7734;&#7735;&#7736;&#7737;&#7738;&#7739;&#7740;&#7741;Mm&#625;&#7742;&#7743;&#7744;&#7745;&#7746;&#7747;Nn&#209;&#241;&#323;&#324;&#325;&#326;&#327;&#328;&#413;&#626;&#414;&#544;&#459;&#504;&#505;&#565;&#627;&#7748;&#7749;&#7750;&#7751;&#7752;&#7753;&#7754;&#7755;Oo&#210;&#242;&#211;&#243;&#212;&#244;&#213;&#245;&#214;&#246;&#216;&#248;&#332;&#333;&#334;&#335;&#336;&#337;&#415;&#416;&#417;&#465;&#466;&#490;&#491;&#492;&#493;&#510;&#511;&#524;&#525;&#526;&#527;&#554;&#555;&#556;&#557;&#558;&#559;&#560;&#561;&#7756;&#7757;&#7758;&#7759;&#7760;&#7761;&#7762;&#7763;&#7884;&#7885;&#7886;&#7887;&#7888;&#7889;&#7890;&#7891;&#7892;&#7893;&#7894;&#7895;&#7896;&#7897;&#7898;&#7899;&#7900;&#7901;&#7902;&#7903;&#7904;&#7905;&#7906;&#7907;Pp&#420;&#421;&#7764;&#7765;&#7766;&#7767;Qq&#672;Rr&#340;&#341;&#342;&#343;&#344;&#345;&#528;&#529;&#530;&#531;&#636;&#637;&#638;&#7768;&#7769;&#7770;&#7771;&#7772;&#7773;&#7774;&#7775;Ss&#346;&#347;&#348;&#349;&#350;&#351;&#352;&#353;&#536;&#537;&#642;&#7776;&#7777;&#7778;&#7779;&#7780;&#7781;&#7782;&#7783;&#7784;&#7785;Tt&#354;&#355;&#356;&#357;&#358;&#359;&#427;&#428;&#429;&#430;&#648;&#538;&#539;&#566;&#7786;&#7787;&#7788;&#7789;&#7790;&#7791;&#7792;&#7793;&#7831;Uu&#217;&#249;&#218;&#250;&#219;&#251;&#220;&#252;&#360;&#361;&#362;&#363;&#364;&#365;&#366;&#367;&#368;&#369;&#370;&#371;&#431;&#432;&#467;&#468;&#469;&#470;&#471;&#472;&#473;&#474;&#475;&#476;&#532;&#533;&#534;&#535;&#7794;&#7795;&#7796;&#7797;&#7798;&#7799;&#7800;&#7801;&#7802;&#7803;&#7908;&#7909;&#7910;&#7911;&#7912;&#7913;&#7914;&#7915;&#7916;&#7917;&#7918;&#7919;&#7920;&#7921;Vv&#434;&#651;&#7804;&#7805;&#7806;&#7807;Ww&#372;&#373;&#7808;&#7809;&#7810;&#7811;&#7812;&#7813;&#7814;&#7815;&#7816;&#7817;&#7832;Xx&#7818;&#7819;&#7820;&#7821;Yy&#221;&#253;&#255;&#376;&#374;&#375;&#435;&#436;&#562;&#563;&#7822;&#7823;&#7833;&#7922;&#7923;&#7924;&#7925;&#7926;&#7927;&#7928;&#7929;Zz&#377;&#378;&#379;&#380;&#381;&#382;&#437;&#438;&#548;&#549;&#656;&#657;&#7824;&#7825;&#7826;&#7827;&#7828;&#7829;&#7829;',                              'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ'))                           [count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1]) = 1                           and not(@class = 'endofrange')]"/>
-
-  <xsl:variable name="alphabetical" select="$terms[contains(concat('Aa&#192;&#224;&#193;&#225;&#194;&#226;&#195;&#227;&#196;&#228;&#197;&#229;&#256;&#257;&#258;&#259;&#260;&#261;&#461;&#462;&#478;&#479;&#480;&#481;&#506;&#507;&#512;&#513;&#514;&#515;&#550;&#551;&#7680;&#7681;&#7834;&#7840;&#7841;&#7842;&#7843;&#7844;&#7845;&#7846;&#7847;&#7848;&#7849;&#7850;&#7851;&#7852;&#7853;&#7854;&#7855;&#7856;&#7857;&#7858;&#7859;&#7860;&#7861;&#7862;&#7863;Bb&#384;&#385;&#595;&#386;&#387;&#7682;&#7683;&#7684;&#7685;&#7686;&#7687;Cc&#199;&#231;&#262;&#263;&#264;&#265;&#266;&#267;&#268;&#269;&#391;&#392;&#597;&#7688;&#7689;Dd&#270;&#271;&#272;&#273;&#394;&#599;&#395;&#396;&#453;&#498;&#545;&#598;&#7690;&#7691;&#7692;&#7693;&#7694;&#7695;&#7696;&#7697;&#7698;&#7699;Ee&#200;&#232;&#201;&#233;&#202;&#234;&#203;&#235;&#274;&#275;&#276;&#277;&#278;&#279;&#280;&#281;&#282;&#283;&#516;&#517;&#518;&#519;&#552;&#553;&#7700;&#7701;&#7702;&#7703;&#7704;&#7705;&#7706;&#7707;&#7708;&#7709;&#7864;&#7865;&#7866;&#7867;&#7868;&#7869;&#7870;&#7871;&#7872;&#7873;&#7874;&#7875;&#7876;&#7877;&#7878;&#7879;Ff&#401;&#402;&#7710;&#7711;Gg&#284;&#285;&#286;&#287;&#288;&#289;&#290;&#291;&#403;&#608;&#484;&#485;&#486;&#487;&#500;&#501;&#7712;&#7713;Hh&#292;&#293;&#294;&#295;&#542;&#543;&#614;&#7714;&#7715;&#7716;&#7717;&#7718;&#7719;&#7720;&#7721;&#7722;&#7723;&#7830;Ii&#204;&#236;&#205;&#237;&#206;&#238;&#207;&#239;&#296;&#297;&#298;&#299;&#300;&#301;&#302;&#303;&#304;&#407;&#616;&#463;&#464;&#520;&#521;&#522;&#523;&#7724;&#7725;&#7726;&#7727;&#7880;&#7881;&#7882;&#7883;Jj&#308;&#309;&#496;&#669;Kk&#310;&#311;&#408;&#409;&#488;&#489;&#7728;&#7729;&#7730;&#7731;&#7732;&#7733;Ll&#313;&#314;&#315;&#316;&#317;&#318;&#319;&#320;&#321;&#322;&#410;&#456;&#564;&#619;&#620;&#621;&#7734;&#7735;&#7736;&#7737;&#7738;&#7739;&#7740;&#7741;Mm&#625;&#7742;&#7743;&#7744;&#7745;&#7746;&#7747;Nn&#209;&#241;&#323;&#324;&#325;&#326;&#327;&#328;&#413;&#626;&#414;&#544;&#459;&#504;&#505;&#565;&#627;&#7748;&#7749;&#7750;&#7751;&#7752;&#7753;&#7754;&#7755;Oo&#210;&#242;&#211;&#243;&#212;&#244;&#213;&#245;&#214;&#246;&#216;&#248;&#332;&#333;&#334;&#335;&#336;&#337;&#415;&#416;&#417;&#465;&#466;&#490;&#491;&#492;&#493;&#510;&#511;&#524;&#525;&#526;&#527;&#554;&#555;&#556;&#557;&#558;&#559;&#560;&#561;&#7756;&#7757;&#7758;&#7759;&#7760;&#7761;&#7762;&#7763;&#7884;&#7885;&#7886;&#7887;&#7888;&#7889;&#7890;&#7891;&#7892;&#7893;&#7894;&#7895;&#7896;&#7897;&#7898;&#7899;&#7900;&#7901;&#7902;&#7903;&#7904;&#7905;&#7906;&#7907;Pp&#420;&#421;&#7764;&#7765;&#7766;&#7767;Qq&#672;Rr&#340;&#341;&#342;&#343;&#344;&#345;&#528;&#529;&#530;&#531;&#636;&#637;&#638;&#7768;&#7769;&#7770;&#7771;&#7772;&#7773;&#7774;&#7775;Ss&#346;&#347;&#348;&#349;&#350;&#351;&#352;&#353;&#536;&#537;&#642;&#7776;&#7777;&#7778;&#7779;&#7780;&#7781;&#7782;&#7783;&#7784;&#7785;Tt&#354;&#355;&#356;&#357;&#358;&#359;&#427;&#428;&#429;&#430;&#648;&#538;&#539;&#566;&#7786;&#7787;&#7788;&#7789;&#7790;&#7791;&#7792;&#7793;&#7831;Uu&#217;&#249;&#218;&#250;&#219;&#251;&#220;&#252;&#360;&#361;&#362;&#363;&#364;&#365;&#366;&#367;&#368;&#369;&#370;&#371;&#431;&#432;&#467;&#468;&#469;&#470;&#471;&#472;&#473;&#474;&#475;&#476;&#532;&#533;&#534;&#535;&#7794;&#7795;&#7796;&#7797;&#7798;&#7799;&#7800;&#7801;&#7802;&#7803;&#7908;&#7909;&#7910;&#7911;&#7912;&#7913;&#7914;&#7915;&#7916;&#7917;&#7918;&#7919;&#7920;&#7921;Vv&#434;&#651;&#7804;&#7805;&#7806;&#7807;Ww&#372;&#373;&#7808;&#7809;&#7810;&#7811;&#7812;&#7813;&#7814;&#7815;&#7816;&#7817;&#7832;Xx&#7818;&#7819;&#7820;&#7821;Yy&#221;&#253;&#255;&#376;&#374;&#375;&#435;&#436;&#562;&#563;&#7822;&#7823;&#7833;&#7922;&#7923;&#7924;&#7925;&#7926;&#7927;&#7928;&#7929;Zz&#377;&#378;&#379;&#380;&#381;&#382;&#437;&#438;&#548;&#549;&#656;&#657;&#7824;&#7825;&#7826;&#7827;&#7828;&#7829;&#7829;', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ'),                                         substring(normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])), 1, 1))]"/>
-
-  <xsl:variable name="others" select="$terms[not(contains(concat('Aa&#192;&#224;&#193;&#225;&#194;&#226;&#195;&#227;&#196;&#228;&#197;&#229;&#256;&#257;&#258;&#259;&#260;&#261;&#461;&#462;&#478;&#479;&#480;&#481;&#506;&#507;&#512;&#513;&#514;&#515;&#550;&#551;&#7680;&#7681;&#7834;&#7840;&#7841;&#7842;&#7843;&#7844;&#7845;&#7846;&#7847;&#7848;&#7849;&#7850;&#7851;&#7852;&#7853;&#7854;&#7855;&#7856;&#7857;&#7858;&#7859;&#7860;&#7861;&#7862;&#7863;Bb&#384;&#385;&#595;&#386;&#387;&#7682;&#7683;&#7684;&#7685;&#7686;&#7687;Cc&#199;&#231;&#262;&#263;&#264;&#265;&#266;&#267;&#268;&#269;&#391;&#392;&#597;&#7688;&#7689;Dd&#270;&#271;&#272;&#273;&#394;&#599;&#395;&#396;&#453;&#498;&#545;&#598;&#7690;&#7691;&#7692;&#7693;&#7694;&#7695;&#7696;&#7697;&#7698;&#7699;Ee&#200;&#232;&#201;&#233;&#202;&#234;&#203;&#235;&#274;&#275;&#276;&#277;&#278;&#279;&#280;&#281;&#282;&#283;&#516;&#517;&#518;&#519;&#552;&#553;&#7700;&#7701;&#7702;&#7703;&#7704;&#7705;&#7706;&#7707;&#7708;&#7709;&#7864;&#7865;&#7866;&#7867;&#7868;&#7869;&#7870;&#7871;&#7872;&#7873;&#7874;&#7875;&#7876;&#7877;&#7878;&#7879;Ff&#401;&#402;&#7710;&#7711;Gg&#284;&#285;&#286;&#287;&#288;&#289;&#290;&#291;&#403;&#608;&#484;&#485;&#486;&#487;&#500;&#501;&#7712;&#7713;Hh&#292;&#293;&#294;&#295;&#542;&#543;&#614;&#7714;&#7715;&#7716;&#7717;&#7718;&#7719;&#7720;&#7721;&#7722;&#7723;&#7830;Ii&#204;&#236;&#205;&#237;&#206;&#238;&#207;&#239;&#296;&#297;&#298;&#299;&#300;&#301;&#302;&#303;&#304;&#407;&#616;&#463;&#464;&#520;&#521;&#522;&#523;&#7724;&#7725;&#7726;&#7727;&#7880;&#7881;&#7882;&#7883;Jj&#308;&#309;&#496;&#669;Kk&#310;&#311;&#408;&#409;&#488;&#489;&#7728;&#7729;&#7730;&#7731;&#7732;&#7733;Ll&#313;&#314;&#315;&#316;&#317;&#318;&#319;&#320;&#321;&#322;&#410;&#456;&#564;&#619;&#620;&#621;&#7734;&#7735;&#7736;&#7737;&#7738;&#7739;&#7740;&#7741;Mm&#625;&#7742;&#7743;&#7744;&#7745;&#7746;&#7747;Nn&#209;&#241;&#323;&#324;&#325;&#326;&#327;&#328;&#413;&#626;&#414;&#544;&#459;&#504;&#505;&#565;&#627;&#7748;&#7749;&#7750;&#7751;&#7752;&#7753;&#7754;&#7755;Oo&#210;&#242;&#211;&#243;&#212;&#244;&#213;&#245;&#214;&#246;&#216;&#248;&#332;&#333;&#334;&#335;&#336;&#337;&#415;&#416;&#417;&#465;&#466;&#490;&#491;&#492;&#493;&#510;&#511;&#524;&#525;&#526;&#527;&#554;&#555;&#556;&#557;&#558;&#559;&#560;&#561;&#7756;&#7757;&#7758;&#7759;&#7760;&#7761;&#7762;&#7763;&#7884;&#7885;&#7886;&#7887;&#7888;&#7889;&#7890;&#7891;&#7892;&#7893;&#7894;&#7895;&#7896;&#7897;&#7898;&#7899;&#7900;&#7901;&#7902;&#7903;&#7904;&#7905;&#7906;&#7907;Pp&#420;&#421;&#7764;&#7765;&#7766;&#7767;Qq&#672;Rr&#340;&#341;&#342;&#343;&#344;&#345;&#528;&#529;&#530;&#531;&#636;&#637;&#638;&#7768;&#7769;&#7770;&#7771;&#7772;&#7773;&#7774;&#7775;Ss&#346;&#347;&#348;&#349;&#350;&#351;&#352;&#353;&#536;&#537;&#642;&#7776;&#7777;&#7778;&#7779;&#7780;&#7781;&#7782;&#7783;&#7784;&#7785;Tt&#354;&#355;&#356;&#357;&#358;&#359;&#427;&#428;&#429;&#430;&#648;&#538;&#539;&#566;&#7786;&#7787;&#7788;&#7789;&#7790;&#7791;&#7792;&#7793;&#7831;Uu&#217;&#249;&#218;&#250;&#219;&#251;&#220;&#252;&#360;&#361;&#362;&#363;&#364;&#365;&#366;&#367;&#368;&#369;&#370;&#371;&#431;&#432;&#467;&#468;&#469;&#470;&#471;&#472;&#473;&#474;&#475;&#476;&#532;&#533;&#534;&#535;&#7794;&#7795;&#7796;&#7797;&#7798;&#7799;&#7800;&#7801;&#7802;&#7803;&#7908;&#7909;&#7910;&#7911;&#7912;&#7913;&#7914;&#7915;&#7916;&#7917;&#7918;&#7919;&#7920;&#7921;Vv&#434;&#651;&#7804;&#7805;&#7806;&#7807;Ww&#372;&#373;&#7808;&#7809;&#7810;&#7811;&#7812;&#7813;&#7814;&#7815;&#7816;&#7817;&#7832;Xx&#7818;&#7819;&#7820;&#7821;Yy&#221;&#253;&#255;&#376;&#374;&#375;&#435;&#436;&#562;&#563;&#7822;&#7823;&#7833;&#7922;&#7923;&#7924;&#7925;&#7926;&#7927;&#7928;&#7929;Zz&#377;&#378;&#379;&#380;&#381;&#382;&#437;&#438;&#548;&#549;&#656;&#657;&#7824;&#7825;&#7826;&#7827;&#7828;&#7829;&#7829;',                                                  'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ'),                                              substring(normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])), 1, 1)))]"/>
-  <div class="index">
-    <xsl:if test="$others">
-      <div class="indexdiv">
-        <h3>
-          <xsl:call-template name="gentext">
-            <xsl:with-param name="key" select="'index symbols'"/>
-          </xsl:call-template>
-        </h3>
-        <dl>
-          <xsl:apply-templates select="$others[count(.|key('primary',                                        normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])))[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1]) = 1]" mode="index-symbol-div">
-            <xsl:with-param name="position" select="position()"/>                                
-            <xsl:with-param name="scope" select="$scope"/>
-            <xsl:with-param name="role" select="$role"/>
-            <xsl:with-param name="type" select="$type"/>
-            <xsl:sort select="translate(normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])), 'Aa&#192;&#224;&#193;&#225;&#194;&#226;&#195;&#227;&#196;&#228;&#197;&#229;&#256;&#257;&#258;&#259;&#260;&#261;&#461;&#462;&#478;&#479;&#480;&#481;&#506;&#507;&#512;&#513;&#514;&#515;&#550;&#551;&#7680;&#7681;&#7834;&#7840;&#7841;&#7842;&#7843;&#7844;&#7845;&#7846;&#7847;&#7848;&#7849;&#7850;&#7851;&#7852;&#7853;&#7854;&#7855;&#7856;&#7857;&#7858;&#7859;&#7860;&#7861;&#7862;&#7863;Bb&#384;&#385;&#595;&#386;&#387;&#7682;&#7683;&#7684;&#7685;&#7686;&#7687;Cc&#199;&#231;&#262;&#263;&#264;&#265;&#266;&#267;&#268;&#269;&#391;&#392;&#597;&#7688;&#7689;Dd&#270;&#271;&#272;&#273;&#394;&#599;&#395;&#396;&#453;&#498;&#545;&#598;&#7690;&#7691;&#7692;&#7693;&#7694;&#7695;&#7696;&#7697;&#7698;&#7699;Ee&#200;&#232;&#201;&#233;&#202;&#234;&#203;&#235;&#274;&#275;&#276;&#277;&#278;&#279;&#280;&#281;&#282;&#283;&#516;&#517;&#518;&#519;&#552;&#553;&#7700;&#7701;&#7702;&#7703;&#7704;&#7705;&#7706;&#7707;&#7708;&#7709;&#7864;&#7865;&#7866;&#7867;&#7868;&#7869;&#7870;&#7871;&#7872;&#7873;&#7874;&#7875;&#7876;&#7877;&#7878;&#7879;Ff&#401;&#402;&#7710;&#7711;Gg&#284;&#285;&#286;&#287;&#288;&#289;&#290;&#291;&#403;&#608;&#484;&#485;&#486;&#487;&#500;&#501;&#7712;&#7713;Hh&#292;&#293;&#294;&#295;&#542;&#543;&#614;&#7714;&#7715;&#7716;&#7717;&#7718;&#7719;&#7720;&#7721;&#7722;&#7723;&#7830;Ii&#204;&#236;&#205;&#237;&#206;&#238;&#207;&#239;&#296;&#297;&#298;&#299;&#300;&#301;&#302;&#303;&#304;&#407;&#616;&#463;&#464;&#520;&#521;&#522;&#523;&#7724;&#7725;&#7726;&#7727;&#7880;&#7881;&#7882;&#7883;Jj&#308;&#309;&#496;&#669;Kk&#310;&#311;&#408;&#409;&#488;&#489;&#7728;&#7729;&#7730;&#7731;&#7732;&#7733;Ll&#313;&#314;&#315;&#316;&#317;&#318;&#319;&#320;&#321;&#322;&#410;&#456;&#564;&#619;&#620;&#621;&#7734;&#7735;&#7736;&#7737;&#7738;&#7739;&#7740;&#7741;Mm&#625;&#7742;&#7743;&#7744;&#7745;&#7746;&#7747;Nn&#209;&#241;&#323;&#324;&#325;&#326;&#327;&#328;&#413;&#626;&#414;&#544;&#459;&#504;&#505;&#565;&#627;&#7748;&#7749;&#7750;&#7751;&#7752;&#7753;&#7754;&#7755;Oo&#210;&#242;&#211;&#243;&#212;&#244;&#213;&#245;&#214;&#246;&#216;&#248;&#332;&#333;&#334;&#335;&#336;&#337;&#415;&#416;&#417;&#465;&#466;&#490;&#491;&#492;&#493;&#510;&#511;&#524;&#525;&#526;&#527;&#554;&#555;&#556;&#557;&#558;&#559;&#560;&#561;&#7756;&#7757;&#7758;&#7759;&#7760;&#7761;&#7762;&#7763;&#7884;&#7885;&#7886;&#7887;&#7888;&#7889;&#7890;&#7891;&#7892;&#7893;&#7894;&#7895;&#7896;&#7897;&#7898;&#7899;&#7900;&#7901;&#7902;&#7903;&#7904;&#7905;&#7906;&#7907;Pp&#420;&#421;&#7764;&#7765;&#7766;&#7767;Qq&#672;Rr&#340;&#341;&#342;&#343;&#344;&#345;&#528;&#529;&#530;&#531;&#636;&#637;&#638;&#7768;&#7769;&#7770;&#7771;&#7772;&#7773;&#7774;&#7775;Ss&#346;&#347;&#348;&#349;&#350;&#351;&#352;&#353;&#536;&#537;&#642;&#7776;&#7777;&#7778;&#7779;&#7780;&#7781;&#7782;&#7783;&#7784;&#7785;Tt&#354;&#355;&#356;&#357;&#358;&#359;&#427;&#428;&#429;&#430;&#648;&#538;&#539;&#566;&#7786;&#7787;&#7788;&#7789;&#7790;&#7791;&#7792;&#7793;&#7831;Uu&#217;&#249;&#218;&#250;&#219;&#251;&#220;&#252;&#360;&#361;&#362;&#363;&#364;&#365;&#366;&#367;&#368;&#369;&#370;&#371;&#431;&#432;&#467;&#468;&#469;&#470;&#471;&#472;&#473;&#474;&#475;&#476;&#532;&#533;&#534;&#535;&#7794;&#7795;&#7796;&#7797;&#7798;&#7799;&#7800;&#7801;&#7802;&#7803;&#7908;&#7909;&#7910;&#7911;&#7912;&#7913;&#7914;&#7915;&#7916;&#7917;&#7918;&#7919;&#7920;&#7921;Vv&#434;&#651;&#7804;&#7805;&#7806;&#7807;Ww&#372;&#373;&#7808;&#7809;&#7810;&#7811;&#7812;&#7813;&#7814;&#7815;&#7816;&#7817;&#7832;Xx&#7818;&#7819;&#7820;&#7821;Yy&#221;&#253;&#255;&#376;&#374;&#375;&#435;&#436;&#562;&#563;&#7822;&#7823;&#7833;&#7922;&#7923;&#7924;&#7925;&#7926;&#7927;&#7928;&#7929;Zz&#377;&#378;&#379;&#380;&#381;&#382;&#437;&#438;&#548;&#549;&#656;&#657;&#7824;&#7825;&#7826;&#7827;&#7828;&#7829;&#7829;', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ')"/>
-          </xsl:apply-templates>
-        </dl>
-      </div>
-    </xsl:if>
-
-    <xsl:apply-templates select="$alphabetical[count(.|key('letter',                                  translate(substring(normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])), 1, 1),                                            'Aa&#192;&#224;&#193;&#225;&#194;&#226;&#195;&#227;&#196;&#228;&#197;&#229;&#256;&#257;&#258;&#259;&#260;&#261;&#461;&#462;&#478;&#479;&#480;&#481;&#506;&#507;&#512;&#513;&#514;&#515;&#550;&#551;&#7680;&#7681;&#7834;&#7840;&#7841;&#7842;&#7843;&#7844;&#7845;&#7846;&#7847;&#7848;&#7849;&#7850;&#7851;&#7852;&#7853;&#7854;&#7855;&#7856;&#7857;&#7858;&#7859;&#7860;&#7861;&#7862;&#7863;Bb&#384;&#385;&#595;&#386;&#387;&#7682;&#7683;&#7684;&#7685;&#7686;&#7687;Cc&#199;&#231;&#262;&#263;&#264;&#265;&#266;&#267;&#268;&#269;&#391;&#392;&#597;&#7688;&#7689;Dd&#270;&#271;&#272;&#273;&#394;&#599;&#395;&#396;&#453;&#498;&#545;&#598;&#7690;&#7691;&#7692;&#7693;&#7694;&#7695;&#7696;&#7697;&#7698;&#7699;Ee&#200;&#232;&#201;&#233;&#202;&#234;&#203;&#235;&#274;&#275;&#276;&#277;&#278;&#279;&#280;&#281;&#282;&#283;&#516;&#517;&#518;&#519;&#552;&#553;&#7700;&#7701;&#7702;&#7703;&#7704;&#7705;&#7706;&#7707;&#7708;&#7709;&#7864;&#7865;&#7866;&#7867;&#7868;&#7869;&#7870;&#7871;&#7872;&#7873;&#7874;&#7875;&#7876;&#7877;&#7878;&#7879;Ff&#401;&#402;&#7710;&#7711;Gg&#284;&#285;&#286;&#287;&#288;&#289;&#290;&#291;&#403;&#608;&#484;&#485;&#486;&#487;&#500;&#501;&#7712;&#7713;Hh&#292;&#293;&#294;&#295;&#542;&#543;&#614;&#7714;&#7715;&#7716;&#7717;&#7718;&#7719;&#7720;&#7721;&#7722;&#7723;&#7830;Ii&#204;&#236;&#205;&#237;&#206;&#238;&#207;&#239;&#296;&#297;&#298;&#299;&#300;&#301;&#302;&#303;&#304;&#407;&#616;&#463;&#464;&#520;&#521;&#522;&#523;&#7724;&#7725;&#7726;&#7727;&#7880;&#7881;&#7882;&#7883;Jj&#308;&#309;&#496;&#669;Kk&#310;&#311;&#408;&#409;&#488;&#489;&#7728;&#7729;&#7730;&#7731;&#7732;&#7733;Ll&#313;&#314;&#315;&#316;&#317;&#318;&#319;&#320;&#321;&#322;&#410;&#456;&#564;&#619;&#620;&#621;&#7734;&#7735;&#7736;&#7737;&#7738;&#7739;&#7740;&#7741;Mm&#625;&#7742;&#7743;&#7744;&#7745;&#7746;&#7747;Nn&#209;&#241;&#323;&#324;&#325;&#326;&#327;&#328;&#413;&#626;&#414;&#544;&#459;&#504;&#505;&#565;&#627;&#7748;&#7749;&#7750;&#7751;&#7752;&#7753;&#7754;&#7755;Oo&#210;&#242;&#211;&#243;&#212;&#244;&#213;&#245;&#214;&#246;&#216;&#248;&#332;&#333;&#334;&#335;&#336;&#337;&#415;&#416;&#417;&#465;&#466;&#490;&#491;&#492;&#493;&#510;&#511;&#524;&#525;&#526;&#527;&#554;&#555;&#556;&#557;&#558;&#559;&#560;&#561;&#7756;&#7757;&#7758;&#7759;&#7760;&#7761;&#7762;&#7763;&#7884;&#7885;&#7886;&#7887;&#7888;&#7889;&#7890;&#7891;&#7892;&#7893;&#7894;&#7895;&#7896;&#7897;&#7898;&#7899;&#7900;&#7901;&#7902;&#7903;&#7904;&#7905;&#7906;&#7907;Pp&#420;&#421;&#7764;&#7765;&#7766;&#7767;Qq&#672;Rr&#340;&#341;&#342;&#343;&#344;&#345;&#528;&#529;&#530;&#531;&#636;&#637;&#638;&#7768;&#7769;&#7770;&#7771;&#7772;&#7773;&#7774;&#7775;Ss&#346;&#347;&#348;&#349;&#350;&#351;&#352;&#353;&#536;&#537;&#642;&#7776;&#7777;&#7778;&#7779;&#7780;&#7781;&#7782;&#7783;&#7784;&#7785;Tt&#354;&#355;&#356;&#357;&#358;&#359;&#427;&#428;&#429;&#430;&#648;&#538;&#539;&#566;&#7786;&#7787;&#7788;&#7789;&#7790;&#7791;&#7792;&#7793;&#7831;Uu&#217;&#249;&#218;&#250;&#219;&#251;&#220;&#252;&#360;&#361;&#362;&#363;&#364;&#365;&#366;&#367;&#368;&#369;&#370;&#371;&#431;&#432;&#467;&#468;&#469;&#470;&#471;&#472;&#473;&#474;&#475;&#476;&#532;&#533;&#534;&#535;&#7794;&#7795;&#7796;&#7797;&#7798;&#7799;&#7800;&#7801;&#7802;&#7803;&#7908;&#7909;&#7910;&#7911;&#7912;&#7913;&#7914;&#7915;&#7916;&#7917;&#7918;&#7919;&#7920;&#7921;Vv&#434;&#651;&#7804;&#7805;&#7806;&#7807;Ww&#372;&#373;&#7808;&#7809;&#7810;&#7811;&#7812;&#7813;&#7814;&#7815;&#7816;&#7817;&#7832;Xx&#7818;&#7819;&#7820;&#7821;Yy&#221;&#253;&#255;&#376;&#374;&#375;&#435;&#436;&#562;&#563;&#7822;&#7823;&#7833;&#7922;&#7923;&#7924;&#7925;&#7926;&#7927;&#7928;&#7929;Zz&#377;&#378;&#379;&#380;&#381;&#382;&#437;&#438;&#548;&#549;&#656;&#657;&#7824;&#7825;&#7826;&#7827;&#7828;&#7829;&#7829;','AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ'))[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1]) = 1]" mode="index-div-basic">
-      <xsl:with-param name="position" select="position()"/>
-      <xsl:with-param name="scope" select="$scope"/>
-      <xsl:with-param name="role" select="$role"/>
-      <xsl:with-param name="type" select="$type"/>
-      <xsl:sort select="translate(normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])), 'Aa&#192;&#224;&#193;&#225;&#194;&#226;&#195;&#227;&#196;&#228;&#197;&#229;&#256;&#257;&#258;&#259;&#260;&#261;&#461;&#462;&#478;&#479;&#480;&#481;&#506;&#507;&#512;&#513;&#514;&#515;&#550;&#551;&#7680;&#7681;&#7834;&#7840;&#7841;&#7842;&#7843;&#7844;&#7845;&#7846;&#7847;&#7848;&#7849;&#7850;&#7851;&#7852;&#7853;&#7854;&#7855;&#7856;&#7857;&#7858;&#7859;&#7860;&#7861;&#7862;&#7863;Bb&#384;&#385;&#595;&#386;&#387;&#7682;&#7683;&#7684;&#7685;&#7686;&#7687;Cc&#199;&#231;&#262;&#263;&#264;&#265;&#266;&#267;&#268;&#269;&#391;&#392;&#597;&#7688;&#7689;Dd&#270;&#271;&#272;&#273;&#394;&#599;&#395;&#396;&#453;&#498;&#545;&#598;&#7690;&#7691;&#7692;&#7693;&#7694;&#7695;&#7696;&#7697;&#7698;&#7699;Ee&#200;&#232;&#201;&#233;&#202;&#234;&#203;&#235;&#274;&#275;&#276;&#277;&#278;&#279;&#280;&#281;&#282;&#283;&#516;&#517;&#518;&#519;&#552;&#553;&#7700;&#7701;&#7702;&#7703;&#7704;&#7705;&#7706;&#7707;&#7708;&#7709;&#7864;&#7865;&#7866;&#7867;&#7868;&#7869;&#7870;&#7871;&#7872;&#7873;&#7874;&#7875;&#7876;&#7877;&#7878;&#7879;Ff&#401;&#402;&#7710;&#7711;Gg&#284;&#285;&#286;&#287;&#288;&#289;&#290;&#291;&#403;&#608;&#484;&#485;&#486;&#487;&#500;&#501;&#7712;&#7713;Hh&#292;&#293;&#294;&#295;&#542;&#543;&#614;&#7714;&#7715;&#7716;&#7717;&#7718;&#7719;&#7720;&#7721;&#7722;&#7723;&#7830;Ii&#204;&#236;&#205;&#237;&#206;&#238;&#207;&#239;&#296;&#297;&#298;&#299;&#300;&#301;&#302;&#303;&#304;&#407;&#616;&#463;&#464;&#520;&#521;&#522;&#523;&#7724;&#7725;&#7726;&#7727;&#7880;&#7881;&#7882;&#7883;Jj&#308;&#309;&#496;&#669;Kk&#310;&#311;&#408;&#409;&#488;&#489;&#7728;&#7729;&#7730;&#7731;&#7732;&#7733;Ll&#313;&#314;&#315;&#316;&#317;&#318;&#319;&#320;&#321;&#322;&#410;&#456;&#564;&#619;&#620;&#621;&#7734;&#7735;&#7736;&#7737;&#7738;&#7739;&#7740;&#7741;Mm&#625;&#7742;&#7743;&#7744;&#7745;&#7746;&#7747;Nn&#209;&#241;&#323;&#324;&#325;&#326;&#327;&#328;&#413;&#626;&#414;&#544;&#459;&#504;&#505;&#565;&#627;&#7748;&#7749;&#7750;&#7751;&#7752;&#7753;&#7754;&#7755;Oo&#210;&#242;&#211;&#243;&#212;&#244;&#213;&#245;&#214;&#246;&#216;&#248;&#332;&#333;&#334;&#335;&#336;&#337;&#415;&#416;&#417;&#465;&#466;&#490;&#491;&#492;&#493;&#510;&#511;&#524;&#525;&#526;&#527;&#554;&#555;&#556;&#557;&#558;&#559;&#560;&#561;&#7756;&#7757;&#7758;&#7759;&#7760;&#7761;&#7762;&#7763;&#7884;&#7885;&#7886;&#7887;&#7888;&#7889;&#7890;&#7891;&#7892;&#7893;&#7894;&#7895;&#7896;&#7897;&#7898;&#7899;&#7900;&#7901;&#7902;&#7903;&#7904;&#7905;&#7906;&#7907;Pp&#420;&#421;&#7764;&#7765;&#7766;&#7767;Qq&#672;Rr&#340;&#341;&#342;&#343;&#344;&#345;&#528;&#529;&#530;&#531;&#636;&#637;&#638;&#7768;&#7769;&#7770;&#7771;&#7772;&#7773;&#7774;&#7775;Ss&#346;&#347;&#348;&#349;&#350;&#351;&#352;&#353;&#536;&#537;&#642;&#7776;&#7777;&#7778;&#7779;&#7780;&#7781;&#7782;&#7783;&#7784;&#7785;Tt&#354;&#355;&#356;&#357;&#358;&#359;&#427;&#428;&#429;&#430;&#648;&#538;&#539;&#566;&#7786;&#7787;&#7788;&#7789;&#7790;&#7791;&#7792;&#7793;&#7831;Uu&#217;&#249;&#218;&#250;&#219;&#251;&#220;&#252;&#360;&#361;&#362;&#363;&#364;&#365;&#366;&#367;&#368;&#369;&#370;&#371;&#431;&#432;&#467;&#468;&#469;&#470;&#471;&#472;&#473;&#474;&#475;&#476;&#532;&#533;&#534;&#535;&#7794;&#7795;&#7796;&#7797;&#7798;&#7799;&#7800;&#7801;&#7802;&#7803;&#7908;&#7909;&#7910;&#7911;&#7912;&#7913;&#7914;&#7915;&#7916;&#7917;&#7918;&#7919;&#7920;&#7921;Vv&#434;&#651;&#7804;&#7805;&#7806;&#7807;Ww&#372;&#373;&#7808;&#7809;&#7810;&#7811;&#7812;&#7813;&#7814;&#7815;&#7816;&#7817;&#7832;Xx&#7818;&#7819;&#7820;&#7821;Yy&#221;&#253;&#255;&#376;&#374;&#375;&#435;&#436;&#562;&#563;&#7822;&#7823;&#7833;&#7922;&#7923;&#7924;&#7925;&#7926;&#7927;&#7928;&#7929;Zz&#377;&#378;&#379;&#380;&#381;&#382;&#437;&#438;&#548;&#549;&#656;&#657;&#7824;&#7825;&#7826;&#7827;&#7828;&#7829;&#7829;', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ')"/>
-    </xsl:apply-templates>
-  </div>
-</xsl:template>
-
-<!-- This template not used if html/autoidx-kosek.xsl is imported -->
-<xsl:template name="generate-kosek-index">
-  <xsl:param name="scope" select="NOTANODE"/>
-
-  <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
-  <xsl:if test="contains($vendor, 'libxslt')">
-    <xsl:message terminate="yes">
-      <xsl:text>ERROR: the 'kosek' index method does not </xsl:text>
-      <xsl:text>work with the xsltproc XSLT processor.</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-
-  <xsl:if test="not(function-available('exslt:node-set') or                     function-available('exslt:nodeSet'))">
-    <xsl:message terminate="yes">
-      <xsl:text>ERROR: the 'kosek' index method requires the </xsl:text>
-      <xsl:text>exslt:node-set() function. Use a processor that </xsl:text>
-      <xsl:text>has it, or use a different index method.</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:if test="$kosek.imported = 0">
-    <xsl:message terminate="yes">
-      <xsl:text>ERROR: the 'kosek' index method requires the
-</xsl:text>
-      <xsl:text>kosek index extensions be imported:
-</xsl:text>
-      <xsl:text>  xsl:import href="html/autoidx-kosek.xsl"</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-</xsl:template>
-
-<!-- This template not used if html/autoidx-kimber.xsl is imported -->
-<xsl:template name="generate-kimber-index">
-  <xsl:param name="scope" select="NOTANODE"/>
-
-  <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
-  <xsl:if test="not(contains($vendor, 'SAXON '))">
-    <xsl:message terminate="yes">
-      <xsl:text>ERROR: the 'kimber' index method requires the </xsl:text>
-      <xsl:text>Saxon version 6 or 8 XSLT processor.</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:if test="$kimber.imported = 0">
-    <xsl:message terminate="yes">
-      <xsl:text>ERROR: the 'kimber' index method requires the
-</xsl:text>
-      <xsl:text>kimber index extensions be imported:
-</xsl:text>
-      <xsl:text>  xsl:import href="html/autoidx-kimber.xsl"</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-</xsl:template>
-
-<xsl:template match="indexterm" mode="index-div-basic">
-  <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-
-  <xsl:variable name="key" select="translate(substring(normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])), 1, 1),                          'Aa&#192;&#224;&#193;&#225;&#194;&#226;&#195;&#227;&#196;&#228;&#197;&#229;&#256;&#257;&#258;&#259;&#260;&#261;&#461;&#462;&#478;&#479;&#480;&#481;&#506;&#507;&#512;&#513;&#514;&#515;&#550;&#551;&#7680;&#7681;&#7834;&#7840;&#7841;&#7842;&#7843;&#7844;&#7845;&#7846;&#7847;&#7848;&#7849;&#7850;&#7851;&#7852;&#7853;&#7854;&#7855;&#7856;&#7857;&#7858;&#7859;&#7860;&#7861;&#7862;&#7863;Bb&#384;&#385;&#595;&#386;&#387;&#7682;&#7683;&#7684;&#7685;&#7686;&#7687;Cc&#199;&#231;&#262;&#263;&#264;&#265;&#266;&#267;&#268;&#269;&#391;&#392;&#597;&#7688;&#7689;Dd&#270;&#271;&#272;&#273;&#394;&#599;&#395;&#396;&#453;&#498;&#545;&#598;&#7690;&#7691;&#7692;&#7693;&#7694;&#7695;&#7696;&#7697;&#7698;&#7699;Ee&#200;&#232;&#201;&#233;&#202;&#234;&#203;&#235;&#274;&#275;&#276;&#277;&#278;&#279;&#280;&#281;&#282;&#283;&#516;&#517;&#518;&#519;&#552;&#553;&#7700;&#7701;&#7702;&#7703;&#7704;&#7705;&#7706;&#7707;&#7708;&#7709;&#7864;&#7865;&#7866;&#7867;&#7868;&#7869;&#7870;&#7871;&#7872;&#7873;&#7874;&#7875;&#7876;&#7877;&#7878;&#7879;Ff&#401;&#402;&#7710;&#7711;Gg&#284;&#285;&#286;&#287;&#288;&#289;&#290;&#291;&#403;&#608;&#484;&#485;&#486;&#487;&#500;&#501;&#7712;&#7713;Hh&#292;&#293;&#294;&#295;&#542;&#543;&#614;&#7714;&#7715;&#7716;&#7717;&#7718;&#7719;&#7720;&#7721;&#7722;&#7723;&#7830;Ii&#204;&#236;&#205;&#237;&#206;&#238;&#207;&#239;&#296;&#297;&#298;&#299;&#300;&#301;&#302;&#303;&#304;&#407;&#616;&#463;&#464;&#520;&#521;&#522;&#523;&#7724;&#7725;&#7726;&#7727;&#7880;&#7881;&#7882;&#7883;Jj&#308;&#309;&#496;&#669;Kk&#310;&#311;&#408;&#409;&#488;&#489;&#7728;&#7729;&#7730;&#7731;&#7732;&#7733;Ll&#313;&#314;&#315;&#316;&#317;&#318;&#319;&#320;&#321;&#322;&#410;&#456;&#564;&#619;&#620;&#621;&#7734;&#7735;&#7736;&#7737;&#7738;&#7739;&#7740;&#7741;Mm&#625;&#7742;&#7743;&#7744;&#7745;&#7746;&#7747;Nn&#209;&#241;&#323;&#324;&#325;&#326;&#327;&#328;&#413;&#626;&#414;&#544;&#459;&#504;&#505;&#565;&#627;&#7748;&#7749;&#7750;&#7751;&#7752;&#7753;&#7754;&#7755;Oo&#210;&#242;&#211;&#243;&#212;&#244;&#213;&#245;&#214;&#246;&#216;&#248;&#332;&#333;&#334;&#335;&#336;&#337;&#415;&#416;&#417;&#465;&#466;&#490;&#491;&#492;&#493;&#510;&#511;&#524;&#525;&#526;&#527;&#554;&#555;&#556;&#557;&#558;&#559;&#560;&#561;&#7756;&#7757;&#7758;&#7759;&#7760;&#7761;&#7762;&#7763;&#7884;&#7885;&#7886;&#7887;&#7888;&#7889;&#7890;&#7891;&#7892;&#7893;&#7894;&#7895;&#7896;&#7897;&#7898;&#7899;&#7900;&#7901;&#7902;&#7903;&#7904;&#7905;&#7906;&#7907;Pp&#420;&#421;&#7764;&#7765;&#7766;&#7767;Qq&#672;Rr&#340;&#341;&#342;&#343;&#344;&#345;&#528;&#529;&#530;&#531;&#636;&#637;&#638;&#7768;&#7769;&#7770;&#7771;&#7772;&#7773;&#7774;&#7775;Ss&#346;&#347;&#348;&#349;&#350;&#351;&#352;&#353;&#536;&#537;&#642;&#7776;&#7777;&#7778;&#7779;&#7780;&#7781;&#7782;&#7783;&#7784;&#7785;Tt&#354;&#355;&#356;&#357;&#358;&#359;&#427;&#428;&#429;&#430;&#648;&#538;&#539;&#566;&#7786;&#7787;&#7788;&#7789;&#7790;&#7791;&#7792;&#7793;&#7831;Uu&#217;&#249;&#218;&#250;&#219;&#251;&#220;&#252;&#360;&#361;&#362;&#363;&#364;&#365;&#366;&#367;&#368;&#369;&#370;&#371;&#431;&#432;&#467;&#468;&#469;&#470;&#471;&#472;&#473;&#474;&#475;&#476;&#532;&#533;&#534;&#535;&#7794;&#7795;&#7796;&#7797;&#7798;&#7799;&#7800;&#7801;&#7802;&#7803;&#7908;&#7909;&#7910;&#7911;&#7912;&#7913;&#7914;&#7915;&#7916;&#7917;&#7918;&#7919;&#7920;&#7921;Vv&#434;&#651;&#7804;&#7805;&#7806;&#7807;Ww&#372;&#373;&#7808;&#7809;&#7810;&#7811;&#7812;&#7813;&#7814;&#7815;&#7816;&#7817;&#7832;Xx&#7818;&#7819;&#7820;&#7821;Yy&#221;&#253;&#255;&#376;&#374;&#375;&#435;&#436;&#562;&#563;&#7822;&#7823;&#7833;&#7922;&#7923;&#7924;&#7925;&#7926;&#7927;&#7928;&#7929;Zz&#377;&#378;&#379;&#380;&#381;&#382;&#437;&#438;&#548;&#549;&#656;&#657;&#7824;&#7825;&#7826;&#7827;&#7828;&#7829;&#7829;','AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ')"/>
-
-  <xsl:if test="key('letter', $key)[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))]                 [count(.|key('primary', normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])))[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1]) = 1]">
-    <div class="indexdiv">
-      <xsl:if test="contains(concat('Aa&#192;&#224;&#193;&#225;&#194;&#226;&#195;&#227;&#196;&#228;&#197;&#229;&#256;&#257;&#258;&#259;&#260;&#261;&#461;&#462;&#478;&#479;&#480;&#481;&#506;&#507;&#512;&#513;&#514;&#515;&#550;&#551;&#7680;&#7681;&#7834;&#7840;&#7841;&#7842;&#7843;&#7844;&#7845;&#7846;&#7847;&#7848;&#7849;&#7850;&#7851;&#7852;&#7853;&#7854;&#7855;&#7856;&#7857;&#7858;&#7859;&#7860;&#7861;&#7862;&#7863;Bb&#384;&#385;&#595;&#386;&#387;&#7682;&#7683;&#7684;&#7685;&#7686;&#7687;Cc&#199;&#231;&#262;&#263;&#264;&#265;&#266;&#267;&#268;&#269;&#391;&#392;&#597;&#7688;&#7689;Dd&#270;&#271;&#272;&#273;&#394;&#599;&#395;&#396;&#453;&#498;&#545;&#598;&#7690;&#7691;&#7692;&#7693;&#7694;&#7695;&#7696;&#7697;&#7698;&#7699;Ee&#200;&#232;&#201;&#233;&#202;&#234;&#203;&#235;&#274;&#275;&#276;&#277;&#278;&#279;&#280;&#281;&#282;&#283;&#516;&#517;&#518;&#519;&#552;&#553;&#7700;&#7701;&#7702;&#7703;&#7704;&#7705;&#7706;&#7707;&#7708;&#7709;&#7864;&#7865;&#7866;&#7867;&#7868;&#7869;&#7870;&#7871;&#7872;&#7873;&#7874;&#7875;&#7876;&#7877;&#7878;&#7879;Ff&#401;&#402;&#7710;&#7711;Gg&#284;&#285;&#286;&#287;&#288;&#289;&#290;&#291;&#403;&#608;&#484;&#485;&#486;&#487;&#500;&#501;&#7712;&#7713;Hh&#292;&#293;&#294;&#295;&#542;&#543;&#614;&#7714;&#7715;&#7716;&#7717;&#7718;&#7719;&#7720;&#7721;&#7722;&#7723;&#7830;Ii&#204;&#236;&#205;&#237;&#206;&#238;&#207;&#239;&#296;&#297;&#298;&#299;&#300;&#301;&#302;&#303;&#304;&#407;&#616;&#463;&#464;&#520;&#521;&#522;&#523;&#7724;&#7725;&#7726;&#7727;&#7880;&#7881;&#7882;&#7883;Jj&#308;&#309;&#496;&#669;Kk&#310;&#311;&#408;&#409;&#488;&#489;&#7728;&#7729;&#7730;&#7731;&#7732;&#7733;Ll&#313;&#314;&#315;&#316;&#317;&#318;&#319;&#320;&#321;&#322;&#410;&#456;&#564;&#619;&#620;&#621;&#7734;&#7735;&#7736;&#7737;&#7738;&#7739;&#7740;&#7741;Mm&#625;&#7742;&#7743;&#7744;&#7745;&#7746;&#7747;Nn&#209;&#241;&#323;&#324;&#325;&#326;&#327;&#328;&#413;&#626;&#414;&#544;&#459;&#504;&#505;&#565;&#627;&#7748;&#7749;&#7750;&#7751;&#7752;&#7753;&#7754;&#7755;Oo&#210;&#242;&#211;&#243;&#212;&#244;&#213;&#245;&#214;&#246;&#216;&#248;&#332;&#333;&#334;&#335;&#336;&#337;&#415;&#416;&#417;&#465;&#466;&#490;&#491;&#492;&#493;&#510;&#511;&#524;&#525;&#526;&#527;&#554;&#555;&#556;&#557;&#558;&#559;&#560;&#561;&#7756;&#7757;&#7758;&#7759;&#7760;&#7761;&#7762;&#7763;&#7884;&#7885;&#7886;&#7887;&#7888;&#7889;&#7890;&#7891;&#7892;&#7893;&#7894;&#7895;&#7896;&#7897;&#7898;&#7899;&#7900;&#7901;&#7902;&#7903;&#7904;&#7905;&#7906;&#7907;Pp&#420;&#421;&#7764;&#7765;&#7766;&#7767;Qq&#672;Rr&#340;&#341;&#342;&#343;&#344;&#345;&#528;&#529;&#530;&#531;&#636;&#637;&#638;&#7768;&#7769;&#7770;&#7771;&#7772;&#7773;&#7774;&#7775;Ss&#346;&#347;&#348;&#349;&#350;&#351;&#352;&#353;&#536;&#537;&#642;&#7776;&#7777;&#7778;&#7779;&#7780;&#7781;&#7782;&#7783;&#7784;&#7785;Tt&#354;&#355;&#356;&#357;&#358;&#359;&#427;&#428;&#429;&#430;&#648;&#538;&#539;&#566;&#7786;&#7787;&#7788;&#7789;&#7790;&#7791;&#7792;&#7793;&#7831;Uu&#217;&#249;&#218;&#250;&#219;&#251;&#220;&#252;&#360;&#361;&#362;&#363;&#364;&#365;&#366;&#367;&#368;&#369;&#370;&#371;&#431;&#432;&#467;&#468;&#469;&#470;&#471;&#472;&#473;&#474;&#475;&#476;&#532;&#533;&#534;&#535;&#7794;&#7795;&#7796;&#7797;&#7798;&#7799;&#7800;&#7801;&#7802;&#7803;&#7908;&#7909;&#7910;&#7911;&#7912;&#7913;&#7914;&#7915;&#7916;&#7917;&#7918;&#7919;&#7920;&#7921;Vv&#434;&#651;&#7804;&#7805;&#7806;&#7807;Ww&#372;&#373;&#7808;&#7809;&#7810;&#7811;&#7812;&#7813;&#7814;&#7815;&#7816;&#7817;&#7832;Xx&#7818;&#7819;&#7820;&#7821;Yy&#221;&#253;&#255;&#376;&#374;&#375;&#435;&#436;&#562;&#563;&#7822;&#7823;&#7833;&#7922;&#7923;&#7924;&#7925;&#7926;&#7927;&#7928;&#7929;Zz&#377;&#378;&#379;&#380;&#381;&#382;&#437;&#438;&#548;&#549;&#656;&#657;&#7824;&#7825;&#7826;&#7827;&#7828;&#7829;&#7829;', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ'), $key)">
-        <h3>
-          <xsl:value-of select="translate($key, 'Aa&#192;&#224;&#193;&#225;&#194;&#226;&#195;&#227;&#196;&#228;&#197;&#229;&#256;&#257;&#258;&#259;&#260;&#261;&#461;&#462;&#478;&#479;&#480;&#481;&#506;&#507;&#512;&#513;&#514;&#515;&#550;&#551;&#7680;&#7681;&#7834;&#7840;&#7841;&#7842;&#7843;&#7844;&#7845;&#7846;&#7847;&#7848;&#7849;&#7850;&#7851;&#7852;&#7853;&#7854;&#7855;&#7856;&#7857;&#7858;&#7859;&#7860;&#7861;&#7862;&#7863;Bb&#384;&#385;&#595;&#386;&#387;&#7682;&#7683;&#7684;&#7685;&#7686;&#7687;Cc&#199;&#231;&#262;&#263;&#264;&#265;&#266;&#267;&#268;&#269;&#391;&#392;&#597;&#7688;&#7689;Dd&#270;&#271;&#272;&#273;&#394;&#599;&#395;&#396;&#453;&#498;&#545;&#598;&#7690;&#7691;&#7692;&#7693;&#7694;&#7695;&#7696;&#7697;&#7698;&#7699;Ee&#200;&#232;&#201;&#233;&#202;&#234;&#203;&#235;&#274;&#275;&#276;&#277;&#278;&#279;&#280;&#281;&#282;&#283;&#516;&#517;&#518;&#519;&#552;&#553;&#7700;&#7701;&#7702;&#7703;&#7704;&#7705;&#7706;&#7707;&#7708;&#7709;&#7864;&#7865;&#7866;&#7867;&#7868;&#7869;&#7870;&#7871;&#7872;&#7873;&#7874;&#7875;&#7876;&#7877;&#7878;&#7879;Ff&#401;&#402;&#7710;&#7711;Gg&#284;&#285;&#286;&#287;&#288;&#289;&#290;&#291;&#403;&#608;&#484;&#485;&#486;&#487;&#500;&#501;&#7712;&#7713;Hh&#292;&#293;&#294;&#295;&#542;&#543;&#614;&#7714;&#7715;&#7716;&#7717;&#7718;&#7719;&#7720;&#7721;&#7722;&#7723;&#7830;Ii&#204;&#236;&#205;&#237;&#206;&#238;&#207;&#239;&#296;&#297;&#298;&#299;&#300;&#301;&#302;&#303;&#304;&#407;&#616;&#463;&#464;&#520;&#521;&#522;&#523;&#7724;&#7725;&#7726;&#7727;&#7880;&#7881;&#7882;&#7883;Jj&#308;&#309;&#496;&#669;Kk&#310;&#311;&#408;&#409;&#488;&#489;&#7728;&#7729;&#7730;&#7731;&#7732;&#7733;Ll&#313;&#314;&#315;&#316;&#317;&#318;&#319;&#320;&#321;&#322;&#410;&#456;&#564;&#619;&#620;&#621;&#7734;&#7735;&#7736;&#7737;&#7738;&#7739;&#7740;&#7741;Mm&#625;&#7742;&#7743;&#7744;&#7745;&#7746;&#7747;Nn&#209;&#241;&#323;&#324;&#325;&#326;&#327;&#328;&#413;&#626;&#414;&#544;&#459;&#504;&#505;&#565;&#627;&#7748;&#7749;&#7750;&#7751;&#7752;&#7753;&#7754;&#7755;Oo&#210;&#242;&#211;&#243;&#212;&#244;&#213;&#245;&#214;&#246;&#216;&#248;&#332;&#333;&#334;&#335;&#336;&#337;&#415;&#416;&#417;&#465;&#466;&#490;&#491;&#492;&#493;&#510;&#511;&#524;&#525;&#526;&#527;&#554;&#555;&#556;&#557;&#558;&#559;&#560;&#561;&#7756;&#7757;&#7758;&#7759;&#7760;&#7761;&#7762;&#7763;&#7884;&#7885;&#7886;&#7887;&#7888;&#7889;&#7890;&#7891;&#7892;&#7893;&#7894;&#7895;&#7896;&#7897;&#7898;&#7899;&#7900;&#7901;&#7902;&#7903;&#7904;&#7905;&#7906;&#7907;Pp&#420;&#421;&#7764;&#7765;&#7766;&#7767;Qq&#672;Rr&#340;&#341;&#342;&#343;&#344;&#345;&#528;&#529;&#530;&#531;&#636;&#637;&#638;&#7768;&#7769;&#7770;&#7771;&#7772;&#7773;&#7774;&#7775;Ss&#346;&#347;&#348;&#349;&#350;&#351;&#352;&#353;&#536;&#537;&#642;&#7776;&#7777;&#7778;&#7779;&#7780;&#7781;&#7782;&#7783;&#7784;&#7785;Tt&#354;&#355;&#356;&#357;&#358;&#359;&#427;&#428;&#429;&#430;&#648;&#538;&#539;&#566;&#7786;&#7787;&#7788;&#7789;&#7790;&#7791;&#7792;&#7793;&#7831;Uu&#217;&#249;&#218;&#250;&#219;&#251;&#220;&#252;&#360;&#361;&#362;&#363;&#364;&#365;&#366;&#367;&#368;&#369;&#370;&#371;&#431;&#432;&#467;&#468;&#469;&#470;&#471;&#472;&#473;&#474;&#475;&#476;&#532;&#533;&#534;&#535;&#7794;&#7795;&#7796;&#7797;&#7798;&#7799;&#7800;&#7801;&#7802;&#7803;&#7908;&#7909;&#7910;&#7911;&#7912;&#7913;&#7914;&#7915;&#7916;&#7917;&#7918;&#7919;&#7920;&#7921;Vv&#434;&#651;&#7804;&#7805;&#7806;&#7807;Ww&#372;&#373;&#7808;&#7809;&#7810;&#7811;&#7812;&#7813;&#7814;&#7815;&#7816;&#7817;&#7832;Xx&#7818;&#7819;&#7820;&#7821;Yy&#221;&#253;&#255;&#376;&#374;&#375;&#435;&#436;&#562;&#563;&#7822;&#7823;&#7833;&#7922;&#7923;&#7924;&#7925;&#7926;&#7927;&#7928;&#7929;Zz&#377;&#378;&#379;&#380;&#381;&#382;&#437;&#438;&#548;&#549;&#656;&#657;&#7824;&#7825;&#7826;&#7827;&#7828;&#7829;&#7829;', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ')"/>
-        </h3>
-      </xsl:if>
-      <dl>
-        <xsl:apply-templates select="key('letter', $key)[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))]                                      [count(.|key('primary', normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])))                                      [count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1])=1]" mode="index-primary">
-          <xsl:with-param name="position" select="position()"/>
-          <xsl:with-param name="scope" select="$scope"/>
-          <xsl:with-param name="role" select="$role"/>
-          <xsl:with-param name="type" select="$type"/>
-          <xsl:sort select="translate(normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])), 'Aa&#192;&#224;&#193;&#225;&#194;&#226;&#195;&#227;&#196;&#228;&#197;&#229;&#256;&#257;&#258;&#259;&#260;&#261;&#461;&#462;&#478;&#479;&#480;&#481;&#506;&#507;&#512;&#513;&#514;&#515;&#550;&#551;&#7680;&#7681;&#7834;&#7840;&#7841;&#7842;&#7843;&#7844;&#7845;&#7846;&#7847;&#7848;&#7849;&#7850;&#7851;&#7852;&#7853;&#7854;&#7855;&#7856;&#7857;&#7858;&#7859;&#7860;&#7861;&#7862;&#7863;Bb&#384;&#385;&#595;&#386;&#387;&#7682;&#7683;&#7684;&#7685;&#7686;&#7687;Cc&#199;&#231;&#262;&#263;&#264;&#265;&#266;&#267;&#268;&#269;&#391;&#392;&#597;&#7688;&#7689;Dd&#270;&#271;&#272;&#273;&#394;&#599;&#395;&#396;&#453;&#498;&#545;&#598;&#7690;&#7691;&#7692;&#7693;&#7694;&#7695;&#7696;&#7697;&#7698;&#7699;Ee&#200;&#232;&#201;&#233;&#202;&#234;&#203;&#235;&#274;&#275;&#276;&#277;&#278;&#279;&#280;&#281;&#282;&#283;&#516;&#517;&#518;&#519;&#552;&#553;&#7700;&#7701;&#7702;&#7703;&#7704;&#7705;&#7706;&#7707;&#7708;&#7709;&#7864;&#7865;&#7866;&#7867;&#7868;&#7869;&#7870;&#7871;&#7872;&#7873;&#7874;&#7875;&#7876;&#7877;&#7878;&#7879;Ff&#401;&#402;&#7710;&#7711;Gg&#284;&#285;&#286;&#287;&#288;&#289;&#290;&#291;&#403;&#608;&#484;&#485;&#486;&#487;&#500;&#501;&#7712;&#7713;Hh&#292;&#293;&#294;&#295;&#542;&#543;&#614;&#7714;&#7715;&#7716;&#7717;&#7718;&#7719;&#7720;&#7721;&#7722;&#7723;&#7830;Ii&#204;&#236;&#205;&#237;&#206;&#238;&#207;&#239;&#296;&#297;&#298;&#299;&#300;&#301;&#302;&#303;&#304;&#407;&#616;&#463;&#464;&#520;&#521;&#522;&#523;&#7724;&#7725;&#7726;&#7727;&#7880;&#7881;&#7882;&#7883;Jj&#308;&#309;&#496;&#669;Kk&#310;&#311;&#408;&#409;&#488;&#489;&#7728;&#7729;&#7730;&#7731;&#7732;&#7733;Ll&#313;&#314;&#315;&#316;&#317;&#318;&#319;&#320;&#321;&#322;&#410;&#456;&#564;&#619;&#620;&#621;&#7734;&#7735;&#7736;&#7737;&#7738;&#7739;&#7740;&#7741;Mm&#625;&#7742;&#7743;&#7744;&#7745;&#7746;&#7747;Nn&#209;&#241;&#323;&#324;&#325;&#326;&#327;&#328;&#413;&#626;&#414;&#544;&#459;&#504;&#505;&#565;&#627;&#7748;&#7749;&#7750;&#7751;&#7752;&#7753;&#7754;&#7755;Oo&#210;&#242;&#211;&#243;&#212;&#244;&#213;&#245;&#214;&#246;&#216;&#248;&#332;&#333;&#334;&#335;&#336;&#337;&#415;&#416;&#417;&#465;&#466;&#490;&#491;&#492;&#493;&#510;&#511;&#524;&#525;&#526;&#527;&#554;&#555;&#556;&#557;&#558;&#559;&#560;&#561;&#7756;&#7757;&#7758;&#7759;&#7760;&#7761;&#7762;&#7763;&#7884;&#7885;&#7886;&#7887;&#7888;&#7889;&#7890;&#7891;&#7892;&#7893;&#7894;&#7895;&#7896;&#7897;&#7898;&#7899;&#7900;&#7901;&#7902;&#7903;&#7904;&#7905;&#7906;&#7907;Pp&#420;&#421;&#7764;&#7765;&#7766;&#7767;Qq&#672;Rr&#340;&#341;&#342;&#343;&#344;&#345;&#528;&#529;&#530;&#531;&#636;&#637;&#638;&#7768;&#7769;&#7770;&#7771;&#7772;&#7773;&#7774;&#7775;Ss&#346;&#347;&#348;&#349;&#350;&#351;&#352;&#353;&#536;&#537;&#642;&#7776;&#7777;&#7778;&#7779;&#7780;&#7781;&#7782;&#7783;&#7784;&#7785;Tt&#354;&#355;&#356;&#357;&#358;&#359;&#427;&#428;&#429;&#430;&#648;&#538;&#539;&#566;&#7786;&#7787;&#7788;&#7789;&#7790;&#7791;&#7792;&#7793;&#7831;Uu&#217;&#249;&#218;&#250;&#219;&#251;&#220;&#252;&#360;&#361;&#362;&#363;&#364;&#365;&#366;&#367;&#368;&#369;&#370;&#371;&#431;&#432;&#467;&#468;&#469;&#470;&#471;&#472;&#473;&#474;&#475;&#476;&#532;&#533;&#534;&#535;&#7794;&#7795;&#7796;&#7797;&#7798;&#7799;&#7800;&#7801;&#7802;&#7803;&#7908;&#7909;&#7910;&#7911;&#7912;&#7913;&#7914;&#7915;&#7916;&#7917;&#7918;&#7919;&#7920;&#7921;Vv&#434;&#651;&#7804;&#7805;&#7806;&#7807;Ww&#372;&#373;&#7808;&#7809;&#7810;&#7811;&#7812;&#7813;&#7814;&#7815;&#7816;&#7817;&#7832;Xx&#7818;&#7819;&#7820;&#7821;Yy&#221;&#253;&#255;&#376;&#374;&#375;&#435;&#436;&#562;&#563;&#7822;&#7823;&#7833;&#7922;&#7923;&#7924;&#7925;&#7926;&#7927;&#7928;&#7929;Zz&#377;&#378;&#379;&#380;&#381;&#382;&#437;&#438;&#548;&#549;&#656;&#657;&#7824;&#7825;&#7826;&#7827;&#7828;&#7829;&#7829;', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ')"/>
-        </xsl:apply-templates>
-      </dl>
-    </div>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="indexterm" mode="index-symbol-div">
-  <xsl:param name="scope" select="/"/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-
-  <xsl:variable name="key" select="translate(substring(normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])), 1, 1),                                              'Aa&#192;&#224;&#193;&#225;&#194;&#226;&#195;&#227;&#196;&#228;&#197;&#229;&#256;&#257;&#258;&#259;&#260;&#261;&#461;&#462;&#478;&#479;&#480;&#481;&#506;&#507;&#512;&#513;&#514;&#515;&#550;&#551;&#7680;&#7681;&#7834;&#7840;&#7841;&#7842;&#7843;&#7844;&#7845;&#7846;&#7847;&#7848;&#7849;&#7850;&#7851;&#7852;&#7853;&#7854;&#7855;&#7856;&#7857;&#7858;&#7859;&#7860;&#7861;&#7862;&#7863;Bb&#384;&#385;&#595;&#386;&#387;&#7682;&#7683;&#7684;&#7685;&#7686;&#7687;Cc&#199;&#231;&#262;&#263;&#264;&#265;&#266;&#267;&#268;&#269;&#391;&#392;&#597;&#7688;&#7689;Dd&#270;&#271;&#272;&#273;&#394;&#599;&#395;&#396;&#453;&#498;&#545;&#598;&#7690;&#7691;&#7692;&#7693;&#7694;&#7695;&#7696;&#7697;&#7698;&#7699;Ee&#200;&#232;&#201;&#233;&#202;&#234;&#203;&#235;&#274;&#275;&#276;&#277;&#278;&#279;&#280;&#281;&#282;&#283;&#516;&#517;&#518;&#519;&#552;&#553;&#7700;&#7701;&#7702;&#7703;&#7704;&#7705;&#7706;&#7707;&#7708;&#7709;&#7864;&#7865;&#7866;&#7867;&#7868;&#7869;&#7870;&#7871;&#7872;&#7873;&#7874;&#7875;&#7876;&#7877;&#7878;&#7879;Ff&#401;&#402;&#7710;&#7711;Gg&#284;&#285;&#286;&#287;&#288;&#289;&#290;&#291;&#403;&#608;&#484;&#485;&#486;&#487;&#500;&#501;&#7712;&#7713;Hh&#292;&#293;&#294;&#295;&#542;&#543;&#614;&#7714;&#7715;&#7716;&#7717;&#7718;&#7719;&#7720;&#7721;&#7722;&#7723;&#7830;Ii&#204;&#236;&#205;&#237;&#206;&#238;&#207;&#239;&#296;&#297;&#298;&#299;&#300;&#301;&#302;&#303;&#304;&#407;&#616;&#463;&#464;&#520;&#521;&#522;&#523;&#7724;&#7725;&#7726;&#7727;&#7880;&#7881;&#7882;&#7883;Jj&#308;&#309;&#496;&#669;Kk&#310;&#311;&#408;&#409;&#488;&#489;&#7728;&#7729;&#7730;&#7731;&#7732;&#7733;Ll&#313;&#314;&#315;&#316;&#317;&#318;&#319;&#320;&#321;&#322;&#410;&#456;&#564;&#619;&#620;&#621;&#7734;&#7735;&#7736;&#7737;&#7738;&#7739;&#7740;&#7741;Mm&#625;&#7742;&#7743;&#7744;&#7745;&#7746;&#7747;Nn&#209;&#241;&#323;&#324;&#325;&#326;&#327;&#328;&#413;&#626;&#414;&#544;&#459;&#504;&#505;&#565;&#627;&#7748;&#7749;&#7750;&#7751;&#7752;&#7753;&#7754;&#7755;Oo&#210;&#242;&#211;&#243;&#212;&#244;&#213;&#245;&#214;&#246;&#216;&#248;&#332;&#333;&#334;&#335;&#336;&#337;&#415;&#416;&#417;&#465;&#466;&#490;&#491;&#492;&#493;&#510;&#511;&#524;&#525;&#526;&#527;&#554;&#555;&#556;&#557;&#558;&#559;&#560;&#561;&#7756;&#7757;&#7758;&#7759;&#7760;&#7761;&#7762;&#7763;&#7884;&#7885;&#7886;&#7887;&#7888;&#7889;&#7890;&#7891;&#7892;&#7893;&#7894;&#7895;&#7896;&#7897;&#7898;&#7899;&#7900;&#7901;&#7902;&#7903;&#7904;&#7905;&#7906;&#7907;Pp&#420;&#421;&#7764;&#7765;&#7766;&#7767;Qq&#672;Rr&#340;&#341;&#342;&#343;&#344;&#345;&#528;&#529;&#530;&#531;&#636;&#637;&#638;&#7768;&#7769;&#7770;&#7771;&#7772;&#7773;&#7774;&#7775;Ss&#346;&#347;&#348;&#349;&#350;&#351;&#352;&#353;&#536;&#537;&#642;&#7776;&#7777;&#7778;&#7779;&#7780;&#7781;&#7782;&#7783;&#7784;&#7785;Tt&#354;&#355;&#356;&#357;&#358;&#359;&#427;&#428;&#429;&#430;&#648;&#538;&#539;&#566;&#7786;&#7787;&#7788;&#7789;&#7790;&#7791;&#7792;&#7793;&#7831;Uu&#217;&#249;&#218;&#250;&#219;&#251;&#220;&#252;&#360;&#361;&#362;&#363;&#364;&#365;&#366;&#367;&#368;&#369;&#370;&#371;&#431;&#432;&#467;&#468;&#469;&#470;&#471;&#472;&#473;&#474;&#475;&#476;&#532;&#533;&#534;&#535;&#7794;&#7795;&#7796;&#7797;&#7798;&#7799;&#7800;&#7801;&#7802;&#7803;&#7908;&#7909;&#7910;&#7911;&#7912;&#7913;&#7914;&#7915;&#7916;&#7917;&#7918;&#7919;&#7920;&#7921;Vv&#434;&#651;&#7804;&#7805;&#7806;&#7807;Ww&#372;&#373;&#7808;&#7809;&#7810;&#7811;&#7812;&#7813;&#7814;&#7815;&#7816;&#7817;&#7832;Xx&#7818;&#7819;&#7820;&#7821;Yy&#221;&#253;&#255;&#376;&#374;&#375;&#435;&#436;&#562;&#563;&#7822;&#7823;&#7833;&#7922;&#7923;&#7924;&#7925;&#7926;&#7927;&#7928;&#7929;Zz&#377;&#378;&#379;&#380;&#381;&#382;&#437;&#438;&#548;&#549;&#656;&#657;&#7824;&#7825;&#7826;&#7827;&#7828;&#7829;&#7829;','AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ')"/>
-
-  <xsl:apply-templates select="key('letter', $key)                                [count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][count(.|key('primary', normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])))[1]) = 1]" mode="index-primary">
-    <xsl:with-param name="position" select="position()"/>
-    <xsl:with-param name="scope" select="$scope"/>
-    <xsl:with-param name="role" select="$role"/>
-    <xsl:with-param name="type" select="$type"/>
-    <xsl:sort select="translate(normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])), 'Aa&#192;&#224;&#193;&#225;&#194;&#226;&#195;&#227;&#196;&#228;&#197;&#229;&#256;&#257;&#258;&#259;&#260;&#261;&#461;&#462;&#478;&#479;&#480;&#481;&#506;&#507;&#512;&#513;&#514;&#515;&#550;&#551;&#7680;&#7681;&#7834;&#7840;&#7841;&#7842;&#7843;&#7844;&#7845;&#7846;&#7847;&#7848;&#7849;&#7850;&#7851;&#7852;&#7853;&#7854;&#7855;&#7856;&#7857;&#7858;&#7859;&#7860;&#7861;&#7862;&#7863;Bb&#384;&#385;&#595;&#386;&#387;&#7682;&#7683;&#7684;&#7685;&#7686;&#7687;Cc&#199;&#231;&#262;&#263;&#264;&#265;&#266;&#267;&#268;&#269;&#391;&#392;&#597;&#7688;&#7689;Dd&#270;&#271;&#272;&#273;&#394;&#599;&#395;&#396;&#453;&#498;&#545;&#598;&#7690;&#7691;&#7692;&#7693;&#7694;&#7695;&#7696;&#7697;&#7698;&#7699;Ee&#200;&#232;&#201;&#233;&#202;&#234;&#203;&#235;&#274;&#275;&#276;&#277;&#278;&#279;&#280;&#281;&#282;&#283;&#516;&#517;&#518;&#519;&#552;&#553;&#7700;&#7701;&#7702;&#7703;&#7704;&#7705;&#7706;&#7707;&#7708;&#7709;&#7864;&#7865;&#7866;&#7867;&#7868;&#7869;&#7870;&#7871;&#7872;&#7873;&#7874;&#7875;&#7876;&#7877;&#7878;&#7879;Ff&#401;&#402;&#7710;&#7711;Gg&#284;&#285;&#286;&#287;&#288;&#289;&#290;&#291;&#403;&#608;&#484;&#485;&#486;&#487;&#500;&#501;&#7712;&#7713;Hh&#292;&#293;&#294;&#295;&#542;&#543;&#614;&#7714;&#7715;&#7716;&#7717;&#7718;&#7719;&#7720;&#7721;&#7722;&#7723;&#7830;Ii&#204;&#236;&#205;&#237;&#206;&#238;&#207;&#239;&#296;&#297;&#298;&#299;&#300;&#301;&#302;&#303;&#304;&#407;&#616;&#463;&#464;&#520;&#521;&#522;&#523;&#7724;&#7725;&#7726;&#7727;&#7880;&#7881;&#7882;&#7883;Jj&#308;&#309;&#496;&#669;Kk&#310;&#311;&#408;&#409;&#488;&#489;&#7728;&#7729;&#7730;&#7731;&#7732;&#7733;Ll&#313;&#314;&#315;&#316;&#317;&#318;&#319;&#320;&#321;&#322;&#410;&#456;&#564;&#619;&#620;&#621;&#7734;&#7735;&#7736;&#7737;&#7738;&#7739;&#7740;&#7741;Mm&#625;&#7742;&#7743;&#7744;&#7745;&#7746;&#7747;Nn&#209;&#241;&#323;&#324;&#325;&#326;&#327;&#328;&#413;&#626;&#414;&#544;&#459;&#504;&#505;&#565;&#627;&#7748;&#7749;&#7750;&#7751;&#7752;&#7753;&#7754;&#7755;Oo&#210;&#242;&#211;&#243;&#212;&#244;&#213;&#245;&#214;&#246;&#216;&#248;&#332;&#333;&#334;&#335;&#336;&#337;&#415;&#416;&#417;&#465;&#466;&#490;&#491;&#492;&#493;&#510;&#511;&#524;&#525;&#526;&#527;&#554;&#555;&#556;&#557;&#558;&#559;&#560;&#561;&#7756;&#7757;&#7758;&#7759;&#7760;&#7761;&#7762;&#7763;&#7884;&#7885;&#7886;&#7887;&#7888;&#7889;&#7890;&#7891;&#7892;&#7893;&#7894;&#7895;&#7896;&#7897;&#7898;&#7899;&#7900;&#7901;&#7902;&#7903;&#7904;&#7905;&#7906;&#7907;Pp&#420;&#421;&#7764;&#7765;&#7766;&#7767;Qq&#672;Rr&#340;&#341;&#342;&#343;&#344;&#345;&#528;&#529;&#530;&#531;&#636;&#637;&#638;&#7768;&#7769;&#7770;&#7771;&#7772;&#7773;&#7774;&#7775;Ss&#346;&#347;&#348;&#349;&#350;&#351;&#352;&#353;&#536;&#537;&#642;&#7776;&#7777;&#7778;&#7779;&#7780;&#7781;&#7782;&#7783;&#7784;&#7785;Tt&#354;&#355;&#356;&#357;&#358;&#359;&#427;&#428;&#429;&#430;&#648;&#538;&#539;&#566;&#7786;&#7787;&#7788;&#7789;&#7790;&#7791;&#7792;&#7793;&#7831;Uu&#217;&#249;&#218;&#250;&#219;&#251;&#220;&#252;&#360;&#361;&#362;&#363;&#364;&#365;&#366;&#367;&#368;&#369;&#370;&#371;&#431;&#432;&#467;&#468;&#469;&#470;&#471;&#472;&#473;&#474;&#475;&#476;&#532;&#533;&#534;&#535;&#7794;&#7795;&#7796;&#7797;&#7798;&#7799;&#7800;&#7801;&#7802;&#7803;&#7908;&#7909;&#7910;&#7911;&#7912;&#7913;&#7914;&#7915;&#7916;&#7917;&#7918;&#7919;&#7920;&#7921;Vv&#434;&#651;&#7804;&#7805;&#7806;&#7807;Ww&#372;&#373;&#7808;&#7809;&#7810;&#7811;&#7812;&#7813;&#7814;&#7815;&#7816;&#7817;&#7832;Xx&#7818;&#7819;&#7820;&#7821;Yy&#221;&#253;&#255;&#376;&#374;&#375;&#435;&#436;&#562;&#563;&#7822;&#7823;&#7833;&#7922;&#7923;&#7924;&#7925;&#7926;&#7927;&#7928;&#7929;Zz&#377;&#378;&#379;&#380;&#381;&#382;&#437;&#438;&#548;&#549;&#656;&#657;&#7824;&#7825;&#7826;&#7827;&#7828;&#7829;&#7829;', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ')"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="indexterm" mode="index-primary">
-  <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-
-  <xsl:variable name="key" select="normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;]))"/>
-  <xsl:variable name="refs" select="key('primary', $key)[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))]"/>
-  <dt>
-    <xsl:value-of select="primary"/>
-    <xsl:for-each select="$refs[generate-id() = generate-id(key('primary-section', concat($key, &quot; &quot;, generate-id((ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage)[last()])))[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1])]">
-      <xsl:apply-templates select="." mode="reference">
-        <xsl:with-param name="position" select="position()"/>
-        <xsl:with-param name="scope" select="$scope"/>
-        <xsl:with-param name="role" select="$role"/>
-        <xsl:with-param name="type" select="$type"/>
-      </xsl:apply-templates>
-    </xsl:for-each>
-
-    <xsl:if test="$refs[not(secondary)]/*[self::see]">
-      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])), &quot; &quot;, &quot; &quot;, &quot; &quot;, see))[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1])]" mode="index-see">
-        <xsl:with-param name="position" select="position()"/>
-        <xsl:with-param name="scope" select="$scope"/>
-        <xsl:with-param name="role" select="$role"/>
-        <xsl:with-param name="type" select="$type"/>
-        <xsl:sort select="translate(see, 'Aa&#192;&#224;&#193;&#225;&#194;&#226;&#195;&#227;&#196;&#228;&#197;&#229;&#256;&#257;&#258;&#259;&#260;&#261;&#461;&#462;&#478;&#479;&#480;&#481;&#506;&#507;&#512;&#513;&#514;&#515;&#550;&#551;&#7680;&#7681;&#7834;&#7840;&#7841;&#7842;&#7843;&#7844;&#7845;&#7846;&#7847;&#7848;&#7849;&#7850;&#7851;&#7852;&#7853;&#7854;&#7855;&#7856;&#7857;&#7858;&#7859;&#7860;&#7861;&#7862;&#7863;Bb&#384;&#385;&#595;&#386;&#387;&#7682;&#7683;&#7684;&#7685;&#7686;&#7687;Cc&#199;&#231;&#262;&#263;&#264;&#265;&#266;&#267;&#268;&#269;&#391;&#392;&#597;&#7688;&#7689;Dd&#270;&#271;&#272;&#273;&#394;&#599;&#395;&#396;&#453;&#498;&#545;&#598;&#7690;&#7691;&#7692;&#7693;&#7694;&#7695;&#7696;&#7697;&#7698;&#7699;Ee&#200;&#232;&#201;&#233;&#202;&#234;&#203;&#235;&#274;&#275;&#276;&#277;&#278;&#279;&#280;&#281;&#282;&#283;&#516;&#517;&#518;&#519;&#552;&#553;&#7700;&#7701;&#7702;&#7703;&#7704;&#7705;&#7706;&#7707;&#7708;&#7709;&#7864;&#7865;&#7866;&#7867;&#7868;&#7869;&#7870;&#7871;&#7872;&#7873;&#7874;&#7875;&#7876;&#7877;&#7878;&#7879;Ff&#401;&#402;&#7710;&#7711;Gg&#284;&#285;&#286;&#287;&#288;&#289;&#290;&#291;&#403;&#608;&#484;&#485;&#486;&#487;&#500;&#501;&#7712;&#7713;Hh&#292;&#293;&#294;&#295;&#542;&#543;&#614;&#7714;&#7715;&#7716;&#7717;&#7718;&#7719;&#7720;&#7721;&#7722;&#7723;&#7830;Ii&#204;&#236;&#205;&#237;&#206;&#238;&#207;&#239;&#296;&#297;&#298;&#299;&#300;&#301;&#302;&#303;&#304;&#407;&#616;&#463;&#464;&#520;&#521;&#522;&#523;&#7724;&#7725;&#7726;&#7727;&#7880;&#7881;&#7882;&#7883;Jj&#308;&#309;&#496;&#669;Kk&#310;&#311;&#408;&#409;&#488;&#489;&#7728;&#7729;&#7730;&#7731;&#7732;&#7733;Ll&#313;&#314;&#315;&#316;&#317;&#318;&#319;&#320;&#321;&#322;&#410;&#456;&#564;&#619;&#620;&#621;&#7734;&#7735;&#7736;&#7737;&#7738;&#7739;&#7740;&#7741;Mm&#625;&#7742;&#7743;&#7744;&#7745;&#7746;&#7747;Nn&#209;&#241;&#323;&#324;&#325;&#326;&#327;&#328;&#413;&#626;&#414;&#544;&#459;&#504;&#505;&#565;&#627;&#7748;&#7749;&#7750;&#7751;&#7752;&#7753;&#7754;&#7755;Oo&#210;&#242;&#211;&#243;&#212;&#244;&#213;&#245;&#214;&#246;&#216;&#248;&#332;&#333;&#334;&#335;&#336;&#337;&#415;&#416;&#417;&#465;&#466;&#490;&#491;&#492;&#493;&#510;&#511;&#524;&#525;&#526;&#527;&#554;&#555;&#556;&#557;&#558;&#559;&#560;&#561;&#7756;&#7757;&#7758;&#7759;&#7760;&#7761;&#7762;&#7763;&#7884;&#7885;&#7886;&#7887;&#7888;&#7889;&#7890;&#7891;&#7892;&#7893;&#7894;&#7895;&#7896;&#7897;&#7898;&#7899;&#7900;&#7901;&#7902;&#7903;&#7904;&#7905;&#7906;&#7907;Pp&#420;&#421;&#7764;&#7765;&#7766;&#7767;Qq&#672;Rr&#340;&#341;&#342;&#343;&#344;&#345;&#528;&#529;&#530;&#531;&#636;&#637;&#638;&#7768;&#7769;&#7770;&#7771;&#7772;&#7773;&#7774;&#7775;Ss&#346;&#347;&#348;&#349;&#350;&#351;&#352;&#353;&#536;&#537;&#642;&#7776;&#7777;&#7778;&#7779;&#7780;&#7781;&#7782;&#7783;&#7784;&#7785;Tt&#354;&#355;&#356;&#357;&#358;&#359;&#427;&#428;&#429;&#430;&#648;&#538;&#539;&#566;&#7786;&#7787;&#7788;&#7789;&#7790;&#7791;&#7792;&#7793;&#7831;Uu&#217;&#249;&#218;&#250;&#219;&#251;&#220;&#252;&#360;&#361;&#362;&#363;&#364;&#365;&#366;&#367;&#368;&#369;&#370;&#371;&#431;&#432;&#467;&#468;&#469;&#470;&#471;&#472;&#473;&#474;&#475;&#476;&#532;&#533;&#534;&#535;&#7794;&#7795;&#7796;&#7797;&#7798;&#7799;&#7800;&#7801;&#7802;&#7803;&#7908;&#7909;&#7910;&#7911;&#7912;&#7913;&#7914;&#7915;&#7916;&#7917;&#7918;&#7919;&#7920;&#7921;Vv&#434;&#651;&#7804;&#7805;&#7806;&#7807;Ww&#372;&#373;&#7808;&#7809;&#7810;&#7811;&#7812;&#7813;&#7814;&#7815;&#7816;&#7817;&#7832;Xx&#7818;&#7819;&#7820;&#7821;Yy&#221;&#253;&#255;&#376;&#374;&#375;&#435;&#436;&#562;&#563;&#7822;&#7823;&#7833;&#7922;&#7923;&#7924;&#7925;&#7926;&#7927;&#7928;&#7929;Zz&#377;&#378;&#379;&#380;&#381;&#382;&#437;&#438;&#548;&#549;&#656;&#657;&#7824;&#7825;&#7826;&#7827;&#7828;&#7829;&#7829;', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ')"/>
-      </xsl:apply-templates>
-    </xsl:if>
-  </dt>
-  <xsl:if test="$refs/secondary or $refs[not(secondary)]/*[self::seealso]">
-    <dd>
-      <dl>
-        <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])), &quot; &quot;, &quot; &quot;, &quot; &quot;, seealso))[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1])]" mode="index-seealso">
-          <xsl:with-param name="position" select="position()"/>
-          <xsl:with-param name="scope" select="$scope"/>
-          <xsl:with-param name="role" select="$role"/>
-          <xsl:with-param name="type" select="$type"/>
-          <xsl:sort select="translate(seealso, 'Aa&#192;&#224;&#193;&#225;&#194;&#226;&#195;&#227;&#196;&#228;&#197;&#229;&#256;&#257;&#258;&#259;&#260;&#261;&#461;&#462;&#478;&#479;&#480;&#481;&#506;&#507;&#512;&#513;&#514;&#515;&#550;&#551;&#7680;&#7681;&#7834;&#7840;&#7841;&#7842;&#7843;&#7844;&#7845;&#7846;&#7847;&#7848;&#7849;&#7850;&#7851;&#7852;&#7853;&#7854;&#7855;&#7856;&#7857;&#7858;&#7859;&#7860;&#7861;&#7862;&#7863;Bb&#384;&#385;&#595;&#386;&#387;&#7682;&#7683;&#7684;&#7685;&#7686;&#7687;Cc&#199;&#231;&#262;&#263;&#264;&#265;&#266;&#267;&#268;&#269;&#391;&#392;&#597;&#7688;&#7689;Dd&#270;&#271;&#272;&#273;&#394;&#599;&#395;&#396;&#453;&#498;&#545;&#598;&#7690;&#7691;&#7692;&#7693;&#7694;&#7695;&#7696;&#7697;&#7698;&#7699;Ee&#200;&#232;&#201;&#233;&#202;&#234;&#203;&#235;&#274;&#275;&#276;&#277;&#278;&#279;&#280;&#281;&#282;&#283;&#516;&#517;&#518;&#519;&#552;&#553;&#7700;&#7701;&#7702;&#7703;&#7704;&#7705;&#7706;&#7707;&#7708;&#7709;&#7864;&#7865;&#7866;&#7867;&#7868;&#7869;&#7870;&#7871;&#7872;&#7873;&#7874;&#7875;&#7876;&#7877;&#7878;&#7879;Ff&#401;&#402;&#7710;&#7711;Gg&#284;&#285;&#286;&#287;&#288;&#289;&#290;&#291;&#403;&#608;&#484;&#485;&#486;&#487;&#500;&#501;&#7712;&#7713;Hh&#292;&#293;&#294;&#295;&#542;&#543;&#614;&#7714;&#7715;&#7716;&#7717;&#7718;&#7719;&#7720;&#7721;&#7722;&#7723;&#7830;Ii&#204;&#236;&#205;&#237;&#206;&#238;&#207;&#239;&#296;&#297;&#298;&#299;&#300;&#301;&#302;&#303;&#304;&#407;&#616;&#463;&#464;&#520;&#521;&#522;&#523;&#7724;&#7725;&#7726;&#7727;&#7880;&#7881;&#7882;&#7883;Jj&#308;&#309;&#496;&#669;Kk&#310;&#311;&#408;&#409;&#488;&#489;&#7728;&#7729;&#7730;&#7731;&#7732;&#7733;Ll&#313;&#314;&#315;&#316;&#317;&#318;&#319;&#320;&#321;&#322;&#410;&#456;&#564;&#619;&#620;&#621;&#7734;&#7735;&#7736;&#7737;&#7738;&#7739;&#7740;&#7741;Mm&#625;&#7742;&#7743;&#7744;&#7745;&#7746;&#7747;Nn&#209;&#241;&#323;&#324;&#325;&#326;&#327;&#328;&#413;&#626;&#414;&#544;&#459;&#504;&#505;&#565;&#627;&#7748;&#7749;&#7750;&#7751;&#7752;&#7753;&#7754;&#7755;Oo&#210;&#242;&#211;&#243;&#212;&#244;&#213;&#245;&#214;&#246;&#216;&#248;&#332;&#333;&#334;&#335;&#336;&#337;&#415;&#416;&#417;&#465;&#466;&#490;&#491;&#492;&#493;&#510;&#511;&#524;&#525;&#526;&#527;&#554;&#555;&#556;&#557;&#558;&#559;&#560;&#561;&#7756;&#7757;&#7758;&#7759;&#7760;&#7761;&#7762;&#7763;&#7884;&#7885;&#7886;&#7887;&#7888;&#7889;&#7890;&#7891;&#7892;&#7893;&#7894;&#7895;&#7896;&#7897;&#7898;&#7899;&#7900;&#7901;&#7902;&#7903;&#7904;&#7905;&#7906;&#7907;Pp&#420;&#421;&#7764;&#7765;&#7766;&#7767;Qq&#672;Rr&#340;&#341;&#342;&#343;&#344;&#345;&#528;&#529;&#530;&#531;&#636;&#637;&#638;&#7768;&#7769;&#7770;&#7771;&#7772;&#7773;&#7774;&#7775;Ss&#346;&#347;&#348;&#349;&#350;&#351;&#352;&#353;&#536;&#537;&#642;&#7776;&#7777;&#7778;&#7779;&#7780;&#7781;&#7782;&#7783;&#7784;&#7785;Tt&#354;&#355;&#356;&#357;&#358;&#359;&#427;&#428;&#429;&#430;&#648;&#538;&#539;&#566;&#7786;&#7787;&#7788;&#7789;&#7790;&#7791;&#7792;&#7793;&#7831;Uu&#217;&#249;&#218;&#250;&#219;&#251;&#220;&#252;&#360;&#361;&#362;&#363;&#364;&#365;&#366;&#367;&#368;&#369;&#370;&#371;&#431;&#432;&#467;&#468;&#469;&#470;&#471;&#472;&#473;&#474;&#475;&#476;&#532;&#533;&#534;&#535;&#7794;&#7795;&#7796;&#7797;&#7798;&#7799;&#7800;&#7801;&#7802;&#7803;&#7908;&#7909;&#7910;&#7911;&#7912;&#7913;&#7914;&#7915;&#7916;&#7917;&#7918;&#7919;&#7920;&#7921;Vv&#434;&#651;&#7804;&#7805;&#7806;&#7807;Ww&#372;&#373;&#7808;&#7809;&#7810;&#7811;&#7812;&#7813;&#7814;&#7815;&#7816;&#7817;&#7832;Xx&#7818;&#7819;&#7820;&#7821;Yy&#221;&#253;&#255;&#376;&#374;&#375;&#435;&#436;&#562;&#563;&#7822;&#7823;&#7833;&#7922;&#7923;&#7924;&#7925;&#7926;&#7927;&#7928;&#7929;Zz&#377;&#378;&#379;&#380;&#381;&#382;&#437;&#438;&#548;&#549;&#656;&#657;&#7824;&#7825;&#7826;&#7827;&#7828;&#7829;&#7829;', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ')"/>
-        </xsl:apply-templates>
-        <xsl:apply-templates select="$refs[secondary and count(.|key('secondary', concat($key, &quot; &quot;, normalize-space(concat(secondary/@sortas, secondary[not(@sortas) or @sortas = &quot;&quot;]))))[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1]) = 1]" mode="index-secondary">
-          <xsl:with-param name="position" select="position()"/>
-          <xsl:with-param name="scope" select="$scope"/>
-          <xsl:with-param name="role" select="$role"/>
-          <xsl:with-param name="type" select="$type"/>
-          <xsl:sort select="translate(normalize-space(concat(secondary/@sortas, secondary[not(@sortas) or @sortas = &quot;&quot;])), 'Aa&#192;&#224;&#193;&#225;&#194;&#226;&#195;&#227;&#196;&#228;&#197;&#229;&#256;&#257;&#258;&#259;&#260;&#261;&#461;&#462;&#478;&#479;&#480;&#481;&#506;&#507;&#512;&#513;&#514;&#515;&#550;&#551;&#7680;&#7681;&#7834;&#7840;&#7841;&#7842;&#7843;&#7844;&#7845;&#7846;&#7847;&#7848;&#7849;&#7850;&#7851;&#7852;&#7853;&#7854;&#7855;&#7856;&#7857;&#7858;&#7859;&#7860;&#7861;&#7862;&#7863;Bb&#384;&#385;&#595;&#386;&#387;&#7682;&#7683;&#7684;&#7685;&#7686;&#7687;Cc&#199;&#231;&#262;&#263;&#264;&#265;&#266;&#267;&#268;&#269;&#391;&#392;&#597;&#7688;&#7689;Dd&#270;&#271;&#272;&#273;&#394;&#599;&#395;&#396;&#453;&#498;&#545;&#598;&#7690;&#7691;&#7692;&#7693;&#7694;&#7695;&#7696;&#7697;&#7698;&#7699;Ee&#200;&#232;&#201;&#233;&#202;&#234;&#203;&#235;&#274;&#275;&#276;&#277;&#278;&#279;&#280;&#281;&#282;&#283;&#516;&#517;&#518;&#519;&#552;&#553;&#7700;&#7701;&#7702;&#7703;&#7704;&#7705;&#7706;&#7707;&#7708;&#7709;&#7864;&#7865;&#7866;&#7867;&#7868;&#7869;&#7870;&#7871;&#7872;&#7873;&#7874;&#7875;&#7876;&#7877;&#7878;&#7879;Ff&#401;&#402;&#7710;&#7711;Gg&#284;&#285;&#286;&#287;&#288;&#289;&#290;&#291;&#403;&#608;&#484;&#485;&#486;&#487;&#500;&#501;&#7712;&#7713;Hh&#292;&#293;&#294;&#295;&#542;&#543;&#614;&#7714;&#7715;&#7716;&#7717;&#7718;&#7719;&#7720;&#7721;&#7722;&#7723;&#7830;Ii&#204;&#236;&#205;&#237;&#206;&#238;&#207;&#239;&#296;&#297;&#298;&#299;&#300;&#301;&#302;&#303;&#304;&#407;&#616;&#463;&#464;&#520;&#521;&#522;&#523;&#7724;&#7725;&#7726;&#7727;&#7880;&#7881;&#7882;&#7883;Jj&#308;&#309;&#496;&#669;Kk&#310;&#311;&#408;&#409;&#488;&#489;&#7728;&#7729;&#7730;&#7731;&#7732;&#7733;Ll&#313;&#314;&#315;&#316;&#317;&#318;&#319;&#320;&#321;&#322;&#410;&#456;&#564;&#619;&#620;&#621;&#7734;&#7735;&#7736;&#7737;&#7738;&#7739;&#7740;&#7741;Mm&#625;&#7742;&#7743;&#7744;&#7745;&#7746;&#7747;Nn&#209;&#241;&#323;&#324;&#325;&#326;&#327;&#328;&#413;&#626;&#414;&#544;&#459;&#504;&#505;&#565;&#627;&#7748;&#7749;&#7750;&#7751;&#7752;&#7753;&#7754;&#7755;Oo&#210;&#242;&#211;&#243;&#212;&#244;&#213;&#245;&#214;&#246;&#216;&#248;&#332;&#333;&#334;&#335;&#336;&#337;&#415;&#416;&#417;&#465;&#466;&#490;&#491;&#492;&#493;&#510;&#511;&#524;&#525;&#526;&#527;&#554;&#555;&#556;&#557;&#558;&#559;&#560;&#561;&#7756;&#7757;&#7758;&#7759;&#7760;&#7761;&#7762;&#7763;&#7884;&#7885;&#7886;&#7887;&#7888;&#7889;&#7890;&#7891;&#7892;&#7893;&#7894;&#7895;&#7896;&#7897;&#7898;&#7899;&#7900;&#7901;&#7902;&#7903;&#7904;&#7905;&#7906;&#7907;Pp&#420;&#421;&#7764;&#7765;&#7766;&#7767;Qq&#672;Rr&#340;&#341;&#342;&#343;&#344;&#345;&#528;&#529;&#530;&#531;&#636;&#637;&#638;&#7768;&#7769;&#7770;&#7771;&#7772;&#7773;&#7774;&#7775;Ss&#346;&#347;&#348;&#349;&#350;&#351;&#352;&#353;&#536;&#537;&#642;&#7776;&#7777;&#7778;&#7779;&#7780;&#7781;&#7782;&#7783;&#7784;&#7785;Tt&#354;&#355;&#356;&#357;&#358;&#359;&#427;&#428;&#429;&#430;&#648;&#538;&#539;&#566;&#7786;&#7787;&#7788;&#7789;&#7790;&#7791;&#7792;&#7793;&#7831;Uu&#217;&#249;&#218;&#250;&#219;&#251;&#220;&#252;&#360;&#361;&#362;&#363;&#364;&#365;&#366;&#367;&#368;&#369;&#370;&#371;&#431;&#432;&#467;&#468;&#469;&#470;&#471;&#472;&#473;&#474;&#475;&#476;&#532;&#533;&#534;&#535;&#7794;&#7795;&#7796;&#7797;&#7798;&#7799;&#7800;&#7801;&#7802;&#7803;&#7908;&#7909;&#7910;&#7911;&#7912;&#7913;&#7914;&#7915;&#7916;&#7917;&#7918;&#7919;&#7920;&#7921;Vv&#434;&#651;&#7804;&#7805;&#7806;&#7807;Ww&#372;&#373;&#7808;&#7809;&#7810;&#7811;&#7812;&#7813;&#7814;&#7815;&#7816;&#7817;&#7832;Xx&#7818;&#7819;&#7820;&#7821;Yy&#221;&#253;&#255;&#376;&#374;&#375;&#435;&#436;&#562;&#563;&#7822;&#7823;&#7833;&#7922;&#7923;&#7924;&#7925;&#7926;&#7927;&#7928;&#7929;Zz&#377;&#378;&#379;&#380;&#381;&#382;&#437;&#438;&#548;&#549;&#656;&#657;&#7824;&#7825;&#7826;&#7827;&#7828;&#7829;&#7829;', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ')"/>
-        </xsl:apply-templates>
-      </dl>
-    </dd>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="indexterm" mode="index-secondary">
-  <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-
-  <xsl:variable name="key" select="concat(normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])), &quot; &quot;, normalize-space(concat(secondary/@sortas, secondary[not(@sortas) or @sortas = &quot;&quot;])))"/>
-  <xsl:variable name="refs" select="key('secondary', $key)[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))]"/>
-  <dt>
-    <xsl:value-of select="secondary"/>
-    <xsl:for-each select="$refs[generate-id() = generate-id(key('secondary-section', concat($key, &quot; &quot;, generate-id((ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage)[last()])))[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1])]">
-      <xsl:apply-templates select="." mode="reference">
-        <xsl:with-param name="position" select="position()"/>
-        <xsl:with-param name="scope" select="$scope"/>
-        <xsl:with-param name="role" select="$role"/>
-        <xsl:with-param name="type" select="$type"/>
-      </xsl:apply-templates>
-    </xsl:for-each>
-
-    <xsl:if test="$refs[not(tertiary)]/*[self::see]">
-      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])), &quot; &quot;, normalize-space(concat(secondary/@sortas, secondary[not(@sortas) or @sortas = &quot;&quot;])), &quot; &quot;, &quot; &quot;, see))[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1])]" mode="index-see">
-        <xsl:with-param name="position" select="position()"/>
-        <xsl:with-param name="scope" select="$scope"/>
-        <xsl:with-param name="role" select="$role"/>
-        <xsl:with-param name="type" select="$type"/>
-        <xsl:sort select="translate(see, 'Aa&#192;&#224;&#193;&#225;&#194;&#226;&#195;&#227;&#196;&#228;&#197;&#229;&#256;&#257;&#258;&#259;&#260;&#261;&#461;&#462;&#478;&#479;&#480;&#481;&#506;&#507;&#512;&#513;&#514;&#515;&#550;&#551;&#7680;&#7681;&#7834;&#7840;&#7841;&#7842;&#7843;&#7844;&#7845;&#7846;&#7847;&#7848;&#7849;&#7850;&#7851;&#7852;&#7853;&#7854;&#7855;&#7856;&#7857;&#7858;&#7859;&#7860;&#7861;&#7862;&#7863;Bb&#384;&#385;&#595;&#386;&#387;&#7682;&#7683;&#7684;&#7685;&#7686;&#7687;Cc&#199;&#231;&#262;&#263;&#264;&#265;&#266;&#267;&#268;&#269;&#391;&#392;&#597;&#7688;&#7689;Dd&#270;&#271;&#272;&#273;&#394;&#599;&#395;&#396;&#453;&#498;&#545;&#598;&#7690;&#7691;&#7692;&#7693;&#7694;&#7695;&#7696;&#7697;&#7698;&#7699;Ee&#200;&#232;&#201;&#233;&#202;&#234;&#203;&#235;&#274;&#275;&#276;&#277;&#278;&#279;&#280;&#281;&#282;&#283;&#516;&#517;&#518;&#519;&#552;&#553;&#7700;&#7701;&#7702;&#7703;&#7704;&#7705;&#7706;&#7707;&#7708;&#7709;&#7864;&#7865;&#7866;&#7867;&#7868;&#7869;&#7870;&#7871;&#7872;&#7873;&#7874;&#7875;&#7876;&#7877;&#7878;&#7879;Ff&#401;&#402;&#7710;&#7711;Gg&#284;&#285;&#286;&#287;&#288;&#289;&#290;&#291;&#403;&#608;&#484;&#485;&#486;&#487;&#500;&#501;&#7712;&#7713;Hh&#292;&#293;&#294;&#295;&#542;&#543;&#614;&#7714;&#7715;&#7716;&#7717;&#7718;&#7719;&#7720;&#7721;&#7722;&#7723;&#7830;Ii&#204;&#236;&#205;&#237;&#206;&#238;&#207;&#239;&#296;&#297;&#298;&#299;&#300;&#301;&#302;&#303;&#304;&#407;&#616;&#463;&#464;&#520;&#521;&#522;&#523;&#7724;&#7725;&#7726;&#7727;&#7880;&#7881;&#7882;&#7883;Jj&#308;&#309;&#496;&#669;Kk&#310;&#311;&#408;&#409;&#488;&#489;&#7728;&#7729;&#7730;&#7731;&#7732;&#7733;Ll&#313;&#314;&#315;&#316;&#317;&#318;&#319;&#320;&#321;&#322;&#410;&#456;&#564;&#619;&#620;&#621;&#7734;&#7735;&#7736;&#7737;&#7738;&#7739;&#7740;&#7741;Mm&#625;&#7742;&#7743;&#7744;&#7745;&#7746;&#7747;Nn&#209;&#241;&#323;&#324;&#325;&#326;&#327;&#328;&#413;&#626;&#414;&#544;&#459;&#504;&#505;&#565;&#627;&#7748;&#7749;&#7750;&#7751;&#7752;&#7753;&#7754;&#7755;Oo&#210;&#242;&#211;&#243;&#212;&#244;&#213;&#245;&#214;&#246;&#216;&#248;&#332;&#333;&#334;&#335;&#336;&#337;&#415;&#416;&#417;&#465;&#466;&#490;&#491;&#492;&#493;&#510;&#511;&#524;&#525;&#526;&#527;&#554;&#555;&#556;&#557;&#558;&#559;&#560;&#561;&#7756;&#7757;&#7758;&#7759;&#7760;&#7761;&#7762;&#7763;&#7884;&#7885;&#7886;&#7887;&#7888;&#7889;&#7890;&#7891;&#7892;&#7893;&#7894;&#7895;&#7896;&#7897;&#7898;&#7899;&#7900;&#7901;&#7902;&#7903;&#7904;&#7905;&#7906;&#7907;Pp&#420;&#421;&#7764;&#7765;&#7766;&#7767;Qq&#672;Rr&#340;&#341;&#342;&#343;&#344;&#345;&#528;&#529;&#530;&#531;&#636;&#637;&#638;&#7768;&#7769;&#7770;&#7771;&#7772;&#7773;&#7774;&#7775;Ss&#346;&#347;&#348;&#349;&#350;&#351;&#352;&#353;&#536;&#537;&#642;&#7776;&#7777;&#7778;&#7779;&#7780;&#7781;&#7782;&#7783;&#7784;&#7785;Tt&#354;&#355;&#356;&#357;&#358;&#359;&#427;&#428;&#429;&#430;&#648;&#538;&#539;&#566;&#7786;&#7787;&#7788;&#7789;&#7790;&#7791;&#7792;&#7793;&#7831;Uu&#217;&#249;&#218;&#250;&#219;&#251;&#220;&#252;&#360;&#361;&#362;&#363;&#364;&#365;&#366;&#367;&#368;&#369;&#370;&#371;&#431;&#432;&#467;&#468;&#469;&#470;&#471;&#472;&#473;&#474;&#475;&#476;&#532;&#533;&#534;&#535;&#7794;&#7795;&#7796;&#7797;&#7798;&#7799;&#7800;&#7801;&#7802;&#7803;&#7908;&#7909;&#7910;&#7911;&#7912;&#7913;&#7914;&#7915;&#7916;&#7917;&#7918;&#7919;&#7920;&#7921;Vv&#434;&#651;&#7804;&#7805;&#7806;&#7807;Ww&#372;&#373;&#7808;&#7809;&#7810;&#7811;&#7812;&#7813;&#7814;&#7815;&#7816;&#7817;&#7832;Xx&#7818;&#7819;&#7820;&#7821;Yy&#221;&#253;&#255;&#376;&#374;&#375;&#435;&#436;&#562;&#563;&#7822;&#7823;&#7833;&#7922;&#7923;&#7924;&#7925;&#7926;&#7927;&#7928;&#7929;Zz&#377;&#378;&#379;&#380;&#381;&#382;&#437;&#438;&#548;&#549;&#656;&#657;&#7824;&#7825;&#7826;&#7827;&#7828;&#7829;&#7829;', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ')"/>
-      </xsl:apply-templates>
-    </xsl:if>
-  </dt>
-  <xsl:if test="$refs/tertiary or $refs[not(tertiary)]/*[self::seealso]">
-    <dd>
-      <dl>
-        <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])), &quot; &quot;, normalize-space(concat(secondary/@sortas, secondary[not(@sortas) or @sortas = &quot;&quot;])), &quot; &quot;, &quot; &quot;, seealso))[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1])]" mode="index-seealso">
-          <xsl:with-param name="position" select="position()"/>
-          <xsl:with-param name="scope" select="$scope"/>
-          <xsl:with-param name="role" select="$role"/>
-          <xsl:with-param name="type" select="$type"/>
-          <xsl:sort select="translate(seealso, 'Aa&#192;&#224;&#193;&#225;&#194;&#226;&#195;&#227;&#196;&#228;&#197;&#229;&#256;&#257;&#258;&#259;&#260;&#261;&#461;&#462;&#478;&#479;&#480;&#481;&#506;&#507;&#512;&#513;&#514;&#515;&#550;&#551;&#7680;&#7681;&#7834;&#7840;&#7841;&#7842;&#7843;&#7844;&#7845;&#7846;&#7847;&#7848;&#7849;&#7850;&#7851;&#7852;&#7853;&#7854;&#7855;&#7856;&#7857;&#7858;&#7859;&#7860;&#7861;&#7862;&#7863;Bb&#384;&#385;&#595;&#386;&#387;&#7682;&#7683;&#7684;&#7685;&#7686;&#7687;Cc&#199;&#231;&#262;&#263;&#264;&#265;&#266;&#267;&#268;&#269;&#391;&#392;&#597;&#7688;&#7689;Dd&#270;&#271;&#272;&#273;&#394;&#599;&#395;&#396;&#453;&#498;&#545;&#598;&#7690;&#7691;&#7692;&#7693;&#7694;&#7695;&#7696;&#7697;&#7698;&#7699;Ee&#200;&#232;&#201;&#233;&#202;&#234;&#203;&#235;&#274;&#275;&#276;&#277;&#278;&#279;&#280;&#281;&#282;&#283;&#516;&#517;&#518;&#519;&#552;&#553;&#7700;&#7701;&#7702;&#7703;&#7704;&#7705;&#7706;&#7707;&#7708;&#7709;&#7864;&#7865;&#7866;&#7867;&#7868;&#7869;&#7870;&#7871;&#7872;&#7873;&#7874;&#7875;&#7876;&#7877;&#7878;&#7879;Ff&#401;&#402;&#7710;&#7711;Gg&#284;&#285;&#286;&#287;&#288;&#289;&#290;&#291;&#403;&#608;&#484;&#485;&#486;&#487;&#500;&#501;&#7712;&#7713;Hh&#292;&#293;&#294;&#295;&#542;&#543;&#614;&#7714;&#7715;&#7716;&#7717;&#7718;&#7719;&#7720;&#7721;&#7722;&#7723;&#7830;Ii&#204;&#236;&#205;&#237;&#206;&#238;&#207;&#239;&#296;&#297;&#298;&#299;&#300;&#301;&#302;&#303;&#304;&#407;&#616;&#463;&#464;&#520;&#521;&#522;&#523;&#7724;&#7725;&#7726;&#7727;&#7880;&#7881;&#7882;&#7883;Jj&#308;&#309;&#496;&#669;Kk&#310;&#311;&#408;&#409;&#488;&#489;&#7728;&#7729;&#7730;&#7731;&#7732;&#7733;Ll&#313;&#314;&#315;&#316;&#317;&#318;&#319;&#320;&#321;&#322;&#410;&#456;&#564;&#619;&#620;&#621;&#7734;&#7735;&#7736;&#7737;&#7738;&#7739;&#7740;&#7741;Mm&#625;&#7742;&#7743;&#7744;&#7745;&#7746;&#7747;Nn&#209;&#241;&#323;&#324;&#325;&#326;&#327;&#328;&#413;&#626;&#414;&#544;&#459;&#504;&#505;&#565;&#627;&#7748;&#7749;&#7750;&#7751;&#7752;&#7753;&#7754;&#7755;Oo&#210;&#242;&#211;&#243;&#212;&#244;&#213;&#245;&#214;&#246;&#216;&#248;&#332;&#333;&#334;&#335;&#336;&#337;&#415;&#416;&#417;&#465;&#466;&#490;&#491;&#492;&#493;&#510;&#511;&#524;&#525;&#526;&#527;&#554;&#555;&#556;&#557;&#558;&#559;&#560;&#561;&#7756;&#7757;&#7758;&#7759;&#7760;&#7761;&#7762;&#7763;&#7884;&#7885;&#7886;&#7887;&#7888;&#7889;&#7890;&#7891;&#7892;&#7893;&#7894;&#7895;&#7896;&#7897;&#7898;&#7899;&#7900;&#7901;&#7902;&#7903;&#7904;&#7905;&#7906;&#7907;Pp&#420;&#421;&#7764;&#7765;&#7766;&#7767;Qq&#672;Rr&#340;&#341;&#342;&#343;&#344;&#345;&#528;&#529;&#530;&#531;&#636;&#637;&#638;&#7768;&#7769;&#7770;&#7771;&#7772;&#7773;&#7774;&#7775;Ss&#346;&#347;&#348;&#349;&#350;&#351;&#352;&#353;&#536;&#537;&#642;&#7776;&#7777;&#7778;&#7779;&#7780;&#7781;&#7782;&#7783;&#7784;&#7785;Tt&#354;&#355;&#356;&#357;&#358;&#359;&#427;&#428;&#429;&#430;&#648;&#538;&#539;&#566;&#7786;&#7787;&#7788;&#7789;&#7790;&#7791;&#7792;&#7793;&#7831;Uu&#217;&#249;&#218;&#250;&#219;&#251;&#220;&#252;&#360;&#361;&#362;&#363;&#364;&#365;&#366;&#367;&#368;&#369;&#370;&#371;&#431;&#432;&#467;&#468;&#469;&#470;&#471;&#472;&#473;&#474;&#475;&#476;&#532;&#533;&#534;&#535;&#7794;&#7795;&#7796;&#7797;&#7798;&#7799;&#7800;&#7801;&#7802;&#7803;&#7908;&#7909;&#7910;&#7911;&#7912;&#7913;&#7914;&#7915;&#7916;&#7917;&#7918;&#7919;&#7920;&#7921;Vv&#434;&#651;&#7804;&#7805;&#7806;&#7807;Ww&#372;&#373;&#7808;&#7809;&#7810;&#7811;&#7812;&#7813;&#7814;&#7815;&#7816;&#7817;&#7832;Xx&#7818;&#7819;&#7820;&#7821;Yy&#221;&#253;&#255;&#376;&#374;&#375;&#435;&#436;&#562;&#563;&#7822;&#7823;&#7833;&#7922;&#7923;&#7924;&#7925;&#7926;&#7927;&#7928;&#7929;Zz&#377;&#378;&#379;&#380;&#381;&#382;&#437;&#438;&#548;&#549;&#656;&#657;&#7824;&#7825;&#7826;&#7827;&#7828;&#7829;&#7829;', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ')"/>
-        </xsl:apply-templates>
-        <xsl:apply-templates select="$refs[tertiary and count(.|key('tertiary', concat($key, &quot; &quot;, normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas) or @sortas = &quot;&quot;]))))[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1]) = 1]" mode="index-tertiary">
-          <xsl:with-param name="position" select="position()"/>
-          <xsl:with-param name="scope" select="$scope"/>
-          <xsl:with-param name="role" select="$role"/>
-          <xsl:with-param name="type" select="$type"/>
-          <xsl:sort select="translate(normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas) or @sortas = &quot;&quot;])), 'Aa&#192;&#224;&#193;&#225;&#194;&#226;&#195;&#227;&#196;&#228;&#197;&#229;&#256;&#257;&#258;&#259;&#260;&#261;&#461;&#462;&#478;&#479;&#480;&#481;&#506;&#507;&#512;&#513;&#514;&#515;&#550;&#551;&#7680;&#7681;&#7834;&#7840;&#7841;&#7842;&#7843;&#7844;&#7845;&#7846;&#7847;&#7848;&#7849;&#7850;&#7851;&#7852;&#7853;&#7854;&#7855;&#7856;&#7857;&#7858;&#7859;&#7860;&#7861;&#7862;&#7863;Bb&#384;&#385;&#595;&#386;&#387;&#7682;&#7683;&#7684;&#7685;&#7686;&#7687;Cc&#199;&#231;&#262;&#263;&#264;&#265;&#266;&#267;&#268;&#269;&#391;&#392;&#597;&#7688;&#7689;Dd&#270;&#271;&#272;&#273;&#394;&#599;&#395;&#396;&#453;&#498;&#545;&#598;&#7690;&#7691;&#7692;&#7693;&#7694;&#7695;&#7696;&#7697;&#7698;&#7699;Ee&#200;&#232;&#201;&#233;&#202;&#234;&#203;&#235;&#274;&#275;&#276;&#277;&#278;&#279;&#280;&#281;&#282;&#283;&#516;&#517;&#518;&#519;&#552;&#553;&#7700;&#7701;&#7702;&#7703;&#7704;&#7705;&#7706;&#7707;&#7708;&#7709;&#7864;&#7865;&#7866;&#7867;&#7868;&#7869;&#7870;&#7871;&#7872;&#7873;&#7874;&#7875;&#7876;&#7877;&#7878;&#7879;Ff&#401;&#402;&#7710;&#7711;Gg&#284;&#285;&#286;&#287;&#288;&#289;&#290;&#291;&#403;&#608;&#484;&#485;&#486;&#487;&#500;&#501;&#7712;&#7713;Hh&#292;&#293;&#294;&#295;&#542;&#543;&#614;&#7714;&#7715;&#7716;&#7717;&#7718;&#7719;&#7720;&#7721;&#7722;&#7723;&#7830;Ii&#204;&#236;&#205;&#237;&#206;&#238;&#207;&#239;&#296;&#297;&#298;&#299;&#300;&#301;&#302;&#303;&#304;&#407;&#616;&#463;&#464;&#520;&#521;&#522;&#523;&#7724;&#7725;&#7726;&#7727;&#7880;&#7881;&#7882;&#7883;Jj&#308;&#309;&#496;&#669;Kk&#310;&#311;&#408;&#409;&#488;&#489;&#7728;&#7729;&#7730;&#7731;&#7732;&#7733;Ll&#313;&#314;&#315;&#316;&#317;&#318;&#319;&#320;&#321;&#322;&#410;&#456;&#564;&#619;&#620;&#621;&#7734;&#7735;&#7736;&#7737;&#7738;&#7739;&#7740;&#7741;Mm&#625;&#7742;&#7743;&#7744;&#7745;&#7746;&#7747;Nn&#209;&#241;&#323;&#324;&#325;&#326;&#327;&#328;&#413;&#626;&#414;&#544;&#459;&#504;&#505;&#565;&#627;&#7748;&#7749;&#7750;&#7751;&#7752;&#7753;&#7754;&#7755;Oo&#210;&#242;&#211;&#243;&#212;&#244;&#213;&#245;&#214;&#246;&#216;&#248;&#332;&#333;&#334;&#335;&#336;&#337;&#415;&#416;&#417;&#465;&#466;&#490;&#491;&#492;&#493;&#510;&#511;&#524;&#525;&#526;&#527;&#554;&#555;&#556;&#557;&#558;&#559;&#560;&#561;&#7756;&#7757;&#7758;&#7759;&#7760;&#7761;&#7762;&#7763;&#7884;&#7885;&#7886;&#7887;&#7888;&#7889;&#7890;&#7891;&#7892;&#7893;&#7894;&#7895;&#7896;&#7897;&#7898;&#7899;&#7900;&#7901;&#7902;&#7903;&#7904;&#7905;&#7906;&#7907;Pp&#420;&#421;&#7764;&#7765;&#7766;&#7767;Qq&#672;Rr&#340;&#341;&#342;&#343;&#344;&#345;&#528;&#529;&#530;&#531;&#636;&#637;&#638;&#7768;&#7769;&#7770;&#7771;&#7772;&#7773;&#7774;&#7775;Ss&#346;&#347;&#348;&#349;&#350;&#351;&#352;&#353;&#536;&#537;&#642;&#7776;&#7777;&#7778;&#7779;&#7780;&#7781;&#7782;&#7783;&#7784;&#7785;Tt&#354;&#355;&#356;&#357;&#358;&#359;&#427;&#428;&#429;&#430;&#648;&#538;&#539;&#566;&#7786;&#7787;&#7788;&#7789;&#7790;&#7791;&#7792;&#7793;&#7831;Uu&#217;&#249;&#218;&#250;&#219;&#251;&#220;&#252;&#360;&#361;&#362;&#363;&#364;&#365;&#366;&#367;&#368;&#369;&#370;&#371;&#431;&#432;&#467;&#468;&#469;&#470;&#471;&#472;&#473;&#474;&#475;&#476;&#532;&#533;&#534;&#535;&#7794;&#7795;&#7796;&#7797;&#7798;&#7799;&#7800;&#7801;&#7802;&#7803;&#7908;&#7909;&#7910;&#7911;&#7912;&#7913;&#7914;&#7915;&#7916;&#7917;&#7918;&#7919;&#7920;&#7921;Vv&#434;&#651;&#7804;&#7805;&#7806;&#7807;Ww&#372;&#373;&#7808;&#7809;&#7810;&#7811;&#7812;&#7813;&#7814;&#7815;&#7816;&#7817;&#7832;Xx&#7818;&#7819;&#7820;&#7821;Yy&#221;&#253;&#255;&#376;&#374;&#375;&#435;&#436;&#562;&#563;&#7822;&#7823;&#7833;&#7922;&#7923;&#7924;&#7925;&#7926;&#7927;&#7928;&#7929;Zz&#377;&#378;&#379;&#380;&#381;&#382;&#437;&#438;&#548;&#549;&#656;&#657;&#7824;&#7825;&#7826;&#7827;&#7828;&#7829;&#7829;', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ')"/>
-        </xsl:apply-templates>
-      </dl>
-    </dd>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="indexterm" mode="index-tertiary">
-  <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-
-  <xsl:variable name="key" select="concat(normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])), &quot; &quot;, normalize-space(concat(secondary/@sortas, secondary[not(@sortas) or @sortas = &quot;&quot;])), &quot; &quot;, normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas) or @sortas = &quot;&quot;])))"/>
-  <xsl:variable name="refs" select="key('tertiary', $key)[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))]"/>
-  <dt>
-    <xsl:value-of select="tertiary"/>
-    <xsl:for-each select="$refs[generate-id() = generate-id(key('tertiary-section', concat($key, &quot; &quot;, generate-id((ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage)[last()])))[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1])]">
-      <xsl:apply-templates select="." mode="reference">
-        <xsl:with-param name="position" select="position()"/>
-        <xsl:with-param name="scope" select="$scope"/>
-        <xsl:with-param name="role" select="$role"/>
-        <xsl:with-param name="type" select="$type"/>
-      </xsl:apply-templates>
-    </xsl:for-each>
-
-    <xsl:if test="$refs/see">
-      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])), &quot; &quot;, normalize-space(concat(secondary/@sortas, secondary[not(@sortas) or @sortas = &quot;&quot;])), &quot; &quot;, normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas) or @sortas = &quot;&quot;])), &quot; &quot;, see))[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1])]" mode="index-see">
-        <xsl:with-param name="position" select="position()"/>
-        <xsl:with-param name="scope" select="$scope"/>
-        <xsl:with-param name="role" select="$role"/>
-        <xsl:with-param name="type" select="$type"/>
-        <xsl:sort select="translate(see, 'Aa&#192;&#224;&#193;&#225;&#194;&#226;&#195;&#227;&#196;&#228;&#197;&#229;&#256;&#257;&#258;&#259;&#260;&#261;&#461;&#462;&#478;&#479;&#480;&#481;&#506;&#507;&#512;&#513;&#514;&#515;&#550;&#551;&#7680;&#7681;&#7834;&#7840;&#7841;&#7842;&#7843;&#7844;&#7845;&#7846;&#7847;&#7848;&#7849;&#7850;&#7851;&#7852;&#7853;&#7854;&#7855;&#7856;&#7857;&#7858;&#7859;&#7860;&#7861;&#7862;&#7863;Bb&#384;&#385;&#595;&#386;&#387;&#7682;&#7683;&#7684;&#7685;&#7686;&#7687;Cc&#199;&#231;&#262;&#263;&#264;&#265;&#266;&#267;&#268;&#269;&#391;&#392;&#597;&#7688;&#7689;Dd&#270;&#271;&#272;&#273;&#394;&#599;&#395;&#396;&#453;&#498;&#545;&#598;&#7690;&#7691;&#7692;&#7693;&#7694;&#7695;&#7696;&#7697;&#7698;&#7699;Ee&#200;&#232;&#201;&#233;&#202;&#234;&#203;&#235;&#274;&#275;&#276;&#277;&#278;&#279;&#280;&#281;&#282;&#283;&#516;&#517;&#518;&#519;&#552;&#553;&#7700;&#7701;&#7702;&#7703;&#7704;&#7705;&#7706;&#7707;&#7708;&#7709;&#7864;&#7865;&#7866;&#7867;&#7868;&#7869;&#7870;&#7871;&#7872;&#7873;&#7874;&#7875;&#7876;&#7877;&#7878;&#7879;Ff&#401;&#402;&#7710;&#7711;Gg&#284;&#285;&#286;&#287;&#288;&#289;&#290;&#291;&#403;&#608;&#484;&#485;&#486;&#487;&#500;&#501;&#7712;&#7713;Hh&#292;&#293;&#294;&#295;&#542;&#543;&#614;&#7714;&#7715;&#7716;&#7717;&#7718;&#7719;&#7720;&#7721;&#7722;&#7723;&#7830;Ii&#204;&#236;&#205;&#237;&#206;&#238;&#207;&#239;&#296;&#297;&#298;&#299;&#300;&#301;&#302;&#303;&#304;&#407;&#616;&#463;&#464;&#520;&#521;&#522;&#523;&#7724;&#7725;&#7726;&#7727;&#7880;&#7881;&#7882;&#7883;Jj&#308;&#309;&#496;&#669;Kk&#310;&#311;&#408;&#409;&#488;&#489;&#7728;&#7729;&#7730;&#7731;&#7732;&#7733;Ll&#313;&#314;&#315;&#316;&#317;&#318;&#319;&#320;&#321;&#322;&#410;&#456;&#564;&#619;&#620;&#621;&#7734;&#7735;&#7736;&#7737;&#7738;&#7739;&#7740;&#7741;Mm&#625;&#7742;&#7743;&#7744;&#7745;&#7746;&#7747;Nn&#209;&#241;&#323;&#324;&#325;&#326;&#327;&#328;&#413;&#626;&#414;&#544;&#459;&#504;&#505;&#565;&#627;&#7748;&#7749;&#7750;&#7751;&#7752;&#7753;&#7754;&#7755;Oo&#210;&#242;&#211;&#243;&#212;&#244;&#213;&#245;&#214;&#246;&#216;&#248;&#332;&#333;&#334;&#335;&#336;&#337;&#415;&#416;&#417;&#465;&#466;&#490;&#491;&#492;&#493;&#510;&#511;&#524;&#525;&#526;&#527;&#554;&#555;&#556;&#557;&#558;&#559;&#560;&#561;&#7756;&#7757;&#7758;&#7759;&#7760;&#7761;&#7762;&#7763;&#7884;&#7885;&#7886;&#7887;&#7888;&#7889;&#7890;&#7891;&#7892;&#7893;&#7894;&#7895;&#7896;&#7897;&#7898;&#7899;&#7900;&#7901;&#7902;&#7903;&#7904;&#7905;&#7906;&#7907;Pp&#420;&#421;&#7764;&#7765;&#7766;&#7767;Qq&#672;Rr&#340;&#341;&#342;&#343;&#344;&#345;&#528;&#529;&#530;&#531;&#636;&#637;&#638;&#7768;&#7769;&#7770;&#7771;&#7772;&#7773;&#7774;&#7775;Ss&#346;&#347;&#348;&#349;&#350;&#351;&#352;&#353;&#536;&#537;&#642;&#7776;&#7777;&#7778;&#7779;&#7780;&#7781;&#7782;&#7783;&#7784;&#7785;Tt&#354;&#355;&#356;&#357;&#358;&#359;&#427;&#428;&#429;&#430;&#648;&#538;&#539;&#566;&#7786;&#7787;&#7788;&#7789;&#7790;&#7791;&#7792;&#7793;&#7831;Uu&#217;&#249;&#218;&#250;&#219;&#251;&#220;&#252;&#360;&#361;&#362;&#363;&#364;&#365;&#366;&#367;&#368;&#369;&#370;&#371;&#431;&#432;&#467;&#468;&#469;&#470;&#471;&#472;&#473;&#474;&#475;&#476;&#532;&#533;&#534;&#535;&#7794;&#7795;&#7796;&#7797;&#7798;&#7799;&#7800;&#7801;&#7802;&#7803;&#7908;&#7909;&#7910;&#7911;&#7912;&#7913;&#7914;&#7915;&#7916;&#7917;&#7918;&#7919;&#7920;&#7921;Vv&#434;&#651;&#7804;&#7805;&#7806;&#7807;Ww&#372;&#373;&#7808;&#7809;&#7810;&#7811;&#7812;&#7813;&#7814;&#7815;&#7816;&#7817;&#7832;Xx&#7818;&#7819;&#7820;&#7821;Yy&#221;&#253;&#255;&#376;&#374;&#375;&#435;&#436;&#562;&#563;&#7822;&#7823;&#7833;&#7922;&#7923;&#7924;&#7925;&#7926;&#7927;&#7928;&#7929;Zz&#377;&#378;&#379;&#380;&#381;&#382;&#437;&#438;&#548;&#549;&#656;&#657;&#7824;&#7825;&#7826;&#7827;&#7828;&#7829;&#7829;', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ')"/>
-      </xsl:apply-templates>
-    </xsl:if>
-  </dt>
-  <xsl:if test="$refs/seealso">
-    <dd>
-      <dl>
-        <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = &quot;&quot;])), &quot; &quot;, normalize-space(concat(secondary/@sortas, secondary[not(@sortas) or @sortas = &quot;&quot;])), &quot; &quot;, normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas) or @sortas = &quot;&quot;])), &quot; &quot;, seealso))[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1])]" mode="index-seealso">
-          <xsl:with-param name="position" select="position()"/>
-          <xsl:with-param name="scope" select="$scope"/>
-          <xsl:with-param name="role" select="$role"/>
-          <xsl:with-param name="type" select="$type"/>
-          <xsl:sort select="translate(seealso, 'Aa&#192;&#224;&#193;&#225;&#194;&#226;&#195;&#227;&#196;&#228;&#197;&#229;&#256;&#257;&#258;&#259;&#260;&#261;&#461;&#462;&#478;&#479;&#480;&#481;&#506;&#507;&#512;&#513;&#514;&#515;&#550;&#551;&#7680;&#7681;&#7834;&#7840;&#7841;&#7842;&#7843;&#7844;&#7845;&#7846;&#7847;&#7848;&#7849;&#7850;&#7851;&#7852;&#7853;&#7854;&#7855;&#7856;&#7857;&#7858;&#7859;&#7860;&#7861;&#7862;&#7863;Bb&#384;&#385;&#595;&#386;&#387;&#7682;&#7683;&#7684;&#7685;&#7686;&#7687;Cc&#199;&#231;&#262;&#263;&#264;&#265;&#266;&#267;&#268;&#269;&#391;&#392;&#597;&#7688;&#7689;Dd&#270;&#271;&#272;&#273;&#394;&#599;&#395;&#396;&#453;&#498;&#545;&#598;&#7690;&#7691;&#7692;&#7693;&#7694;&#7695;&#7696;&#7697;&#7698;&#7699;Ee&#200;&#232;&#201;&#233;&#202;&#234;&#203;&#235;&#274;&#275;&#276;&#277;&#278;&#279;&#280;&#281;&#282;&#283;&#516;&#517;&#518;&#519;&#552;&#553;&#7700;&#7701;&#7702;&#7703;&#7704;&#7705;&#7706;&#7707;&#7708;&#7709;&#7864;&#7865;&#7866;&#7867;&#7868;&#7869;&#7870;&#7871;&#7872;&#7873;&#7874;&#7875;&#7876;&#7877;&#7878;&#7879;Ff&#401;&#402;&#7710;&#7711;Gg&#284;&#285;&#286;&#287;&#288;&#289;&#290;&#291;&#403;&#608;&#484;&#485;&#486;&#487;&#500;&#501;&#7712;&#7713;Hh&#292;&#293;&#294;&#295;&#542;&#543;&#614;&#7714;&#7715;&#7716;&#7717;&#7718;&#7719;&#7720;&#7721;&#7722;&#7723;&#7830;Ii&#204;&#236;&#205;&#237;&#206;&#238;&#207;&#239;&#296;&#297;&#298;&#299;&#300;&#301;&#302;&#303;&#304;&#407;&#616;&#463;&#464;&#520;&#521;&#522;&#523;&#7724;&#7725;&#7726;&#7727;&#7880;&#7881;&#7882;&#7883;Jj&#308;&#309;&#496;&#669;Kk&#310;&#311;&#408;&#409;&#488;&#489;&#7728;&#7729;&#7730;&#7731;&#7732;&#7733;Ll&#313;&#314;&#315;&#316;&#317;&#318;&#319;&#320;&#321;&#322;&#410;&#456;&#564;&#619;&#620;&#621;&#7734;&#7735;&#7736;&#7737;&#7738;&#7739;&#7740;&#7741;Mm&#625;&#7742;&#7743;&#7744;&#7745;&#7746;&#7747;Nn&#209;&#241;&#323;&#324;&#325;&#326;&#327;&#328;&#413;&#626;&#414;&#544;&#459;&#504;&#505;&#565;&#627;&#7748;&#7749;&#7750;&#7751;&#7752;&#7753;&#7754;&#7755;Oo&#210;&#242;&#211;&#243;&#212;&#244;&#213;&#245;&#214;&#246;&#216;&#248;&#332;&#333;&#334;&#335;&#336;&#337;&#415;&#416;&#417;&#465;&#466;&#490;&#491;&#492;&#493;&#510;&#511;&#524;&#525;&#526;&#527;&#554;&#555;&#556;&#557;&#558;&#559;&#560;&#561;&#7756;&#7757;&#7758;&#7759;&#7760;&#7761;&#7762;&#7763;&#7884;&#7885;&#7886;&#7887;&#7888;&#7889;&#7890;&#7891;&#7892;&#7893;&#7894;&#7895;&#7896;&#7897;&#7898;&#7899;&#7900;&#7901;&#7902;&#7903;&#7904;&#7905;&#7906;&#7907;Pp&#420;&#421;&#7764;&#7765;&#7766;&#7767;Qq&#672;Rr&#340;&#341;&#342;&#343;&#344;&#345;&#528;&#529;&#530;&#531;&#636;&#637;&#638;&#7768;&#7769;&#7770;&#7771;&#7772;&#7773;&#7774;&#7775;Ss&#346;&#347;&#348;&#349;&#350;&#351;&#352;&#353;&#536;&#537;&#642;&#7776;&#7777;&#7778;&#7779;&#7780;&#7781;&#7782;&#7783;&#7784;&#7785;Tt&#354;&#355;&#356;&#357;&#358;&#359;&#427;&#428;&#429;&#430;&#648;&#538;&#539;&#566;&#7786;&#7787;&#7788;&#7789;&#7790;&#7791;&#7792;&#7793;&#7831;Uu&#217;&#249;&#218;&#250;&#219;&#251;&#220;&#252;&#360;&#361;&#362;&#363;&#364;&#365;&#366;&#367;&#368;&#369;&#370;&#371;&#431;&#432;&#467;&#468;&#469;&#470;&#471;&#472;&#473;&#474;&#475;&#476;&#532;&#533;&#534;&#535;&#7794;&#7795;&#7796;&#7797;&#7798;&#7799;&#7800;&#7801;&#7802;&#7803;&#7908;&#7909;&#7910;&#7911;&#7912;&#7913;&#7914;&#7915;&#7916;&#7917;&#7918;&#7919;&#7920;&#7921;Vv&#434;&#651;&#7804;&#7805;&#7806;&#7807;Ww&#372;&#373;&#7808;&#7809;&#7810;&#7811;&#7812;&#7813;&#7814;&#7815;&#7816;&#7817;&#7832;Xx&#7818;&#7819;&#7820;&#7821;Yy&#221;&#253;&#255;&#376;&#374;&#375;&#435;&#436;&#562;&#563;&#7822;&#7823;&#7833;&#7922;&#7923;&#7924;&#7925;&#7926;&#7927;&#7928;&#7929;Zz&#377;&#378;&#379;&#380;&#381;&#382;&#437;&#438;&#548;&#549;&#656;&#657;&#7824;&#7825;&#7826;&#7827;&#7828;&#7829;&#7829;', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ')"/>
-        </xsl:apply-templates>
-      </dl>
-    </dd>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="indexterm" mode="reference">
-  <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-  <xsl:param name="position"/>
-  
-  <xsl:variable name="term.separator">
-    <xsl:call-template name="index.separator">
-      <xsl:with-param name="key" select="'index.term.separator'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="number.separator">
-    <xsl:call-template name="index.separator">
-      <xsl:with-param name="key" select="'index.number.separator'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="range.separator">
-    <xsl:call-template name="index.separator">
-      <xsl:with-param name="key" select="'index.range.separator'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$position = 1">
-      <xsl:value-of select="$term.separator"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$number.separator"/>
-    </xsl:otherwise>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="@zone and string(@zone)">
-      <xsl:call-template name="reference">
-        <xsl:with-param name="zones" select="normalize-space(@zone)"/>
-        <xsl:with-param name="position" select="position()"/>
-        <xsl:with-param name="scope" select="$scope"/>
-        <xsl:with-param name="role" select="$role"/>
-        <xsl:with-param name="type" select="$type"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <a>
-        <xsl:apply-templates select="." mode="class.attribute"/>
-        <xsl:variable name="title">
-          <xsl:choose>
-            <xsl:when test="(ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage)[last()]/titleabbrev and $index.prefer.titleabbrev != 0">
-              <xsl:apply-templates select="(ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage)[last()]" mode="titleabbrev.markup"/>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:apply-templates select="(ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage)[last()]" mode="title.markup"/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:variable>
-
-        <xsl:attribute name="href">
-          <xsl:call-template name="href.target">
-            <xsl:with-param name="object" select="(ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage)[last()]"/>
-            <xsl:with-param name="context" select="//index[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1]"/>
-          </xsl:call-template>
-        </xsl:attribute>
-
-        <xsl:value-of select="$title"/> <!-- text only -->
-      </a>
-
-      <xsl:variable name="id" select="(@id|@xml:id)[1]"/>
-      <xsl:if test="key('endofrange', $id)[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))]">
-        <xsl:apply-templates select="key('endofrange', $id)[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][last()]" mode="reference">
-          <xsl:with-param name="position" select="position()"/>
-          <xsl:with-param name="scope" select="$scope"/>
-          <xsl:with-param name="role" select="$role"/>
-          <xsl:with-param name="type" select="$type"/>
-          <xsl:with-param name="separator" select="$range.separator"/>
-        </xsl:apply-templates>
-      </xsl:if>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="reference">
-  <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-  <xsl:param name="zones"/>
-
-  <xsl:choose>
-    <xsl:when test="contains($zones, ' ')">
-      <xsl:variable name="zone" select="substring-before($zones, ' ')"/>
-      <xsl:variable name="target" select="key('sections', $zone)[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))]"/>
-
-      <a>
-        <xsl:apply-templates select="." mode="class.attribute"/>
-        <xsl:attribute name="href">
-          <xsl:call-template name="href.target">
-            <xsl:with-param name="object" select="$target[1]"/>
-            <xsl:with-param name="context" select="//index[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1]"/>
-          </xsl:call-template>
-        </xsl:attribute>
-        <xsl:apply-templates select="$target[1]" mode="index-title-content"/>
-      </a>
-      <xsl:text>, </xsl:text>
-      <xsl:call-template name="reference">
-        <xsl:with-param name="zones" select="substring-after($zones, ' ')"/>
-        <xsl:with-param name="position" select="position()"/>
-        <xsl:with-param name="scope" select="$scope"/>
-        <xsl:with-param name="role" select="$role"/>
-        <xsl:with-param name="type" select="$type"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:variable name="zone" select="$zones"/>
-      <xsl:variable name="target" select="key('sections', $zone)[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))]"/>
-
-      <a>
-        <xsl:apply-templates select="." mode="class.attribute"/>
-        <xsl:attribute name="href">
-          <xsl:call-template name="href.target">
-            <xsl:with-param name="object" select="$target[1]"/>
-            <xsl:with-param name="context" select="//index[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1]"/>
-          </xsl:call-template>
-        </xsl:attribute>
-        <xsl:apply-templates select="$target[1]" mode="index-title-content"/>
-      </a>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="indexterm" mode="index-see">
-  <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-
-  <xsl:text> (</xsl:text>
-  <xsl:call-template name="gentext">
-    <xsl:with-param name="key" select="'see'"/>
-  </xsl:call-template>
-  <xsl:text> </xsl:text>
-  <xsl:value-of select="see"/>
-  <xsl:text>)</xsl:text>
-</xsl:template>
-
-<xsl:template match="indexterm" mode="index-seealso">
-  <xsl:param name="scope" select="."/>
-  <xsl:param name="role" select="''"/>
-  <xsl:param name="type" select="''"/>
-
-  <xsl:for-each select="seealso">
-    <xsl:sort select="translate(., 'Aa&#192;&#224;&#193;&#225;&#194;&#226;&#195;&#227;&#196;&#228;&#197;&#229;&#256;&#257;&#258;&#259;&#260;&#261;&#461;&#462;&#478;&#479;&#480;&#481;&#506;&#507;&#512;&#513;&#514;&#515;&#550;&#551;&#7680;&#7681;&#7834;&#7840;&#7841;&#7842;&#7843;&#7844;&#7845;&#7846;&#7847;&#7848;&#7849;&#7850;&#7851;&#7852;&#7853;&#7854;&#7855;&#7856;&#7857;&#7858;&#7859;&#7860;&#7861;&#7862;&#7863;Bb&#384;&#385;&#595;&#386;&#387;&#7682;&#7683;&#7684;&#7685;&#7686;&#7687;Cc&#199;&#231;&#262;&#263;&#264;&#265;&#266;&#267;&#268;&#269;&#391;&#392;&#597;&#7688;&#7689;Dd&#270;&#271;&#272;&#273;&#394;&#599;&#395;&#396;&#453;&#498;&#545;&#598;&#7690;&#7691;&#7692;&#7693;&#7694;&#7695;&#7696;&#7697;&#7698;&#7699;Ee&#200;&#232;&#201;&#233;&#202;&#234;&#203;&#235;&#274;&#275;&#276;&#277;&#278;&#279;&#280;&#281;&#282;&#283;&#516;&#517;&#518;&#519;&#552;&#553;&#7700;&#7701;&#7702;&#7703;&#7704;&#7705;&#7706;&#7707;&#7708;&#7709;&#7864;&#7865;&#7866;&#7867;&#7868;&#7869;&#7870;&#7871;&#7872;&#7873;&#7874;&#7875;&#7876;&#7877;&#7878;&#7879;Ff&#401;&#402;&#7710;&#7711;Gg&#284;&#285;&#286;&#287;&#288;&#289;&#290;&#291;&#403;&#608;&#484;&#485;&#486;&#487;&#500;&#501;&#7712;&#7713;Hh&#292;&#293;&#294;&#295;&#542;&#543;&#614;&#7714;&#7715;&#7716;&#7717;&#7718;&#7719;&#7720;&#7721;&#7722;&#7723;&#7830;Ii&#204;&#236;&#205;&#237;&#206;&#238;&#207;&#239;&#296;&#297;&#298;&#299;&#300;&#301;&#302;&#303;&#304;&#407;&#616;&#463;&#464;&#520;&#521;&#522;&#523;&#7724;&#7725;&#7726;&#7727;&#7880;&#7881;&#7882;&#7883;Jj&#308;&#309;&#496;&#669;Kk&#310;&#311;&#408;&#409;&#488;&#489;&#7728;&#7729;&#7730;&#7731;&#7732;&#7733;Ll&#313;&#314;&#315;&#316;&#317;&#318;&#319;&#320;&#321;&#322;&#410;&#456;&#564;&#619;&#620;&#621;&#7734;&#7735;&#7736;&#7737;&#7738;&#7739;&#7740;&#7741;Mm&#625;&#7742;&#7743;&#7744;&#7745;&#7746;&#7747;Nn&#209;&#241;&#323;&#324;&#325;&#326;&#327;&#328;&#413;&#626;&#414;&#544;&#459;&#504;&#505;&#565;&#627;&#7748;&#7749;&#7750;&#7751;&#7752;&#7753;&#7754;&#7755;Oo&#210;&#242;&#211;&#243;&#212;&#244;&#213;&#245;&#214;&#246;&#216;&#248;&#332;&#333;&#334;&#335;&#336;&#337;&#415;&#416;&#417;&#465;&#466;&#490;&#491;&#492;&#493;&#510;&#511;&#524;&#525;&#526;&#527;&#554;&#555;&#556;&#557;&#558;&#559;&#560;&#561;&#7756;&#7757;&#7758;&#7759;&#7760;&#7761;&#7762;&#7763;&#7884;&#7885;&#7886;&#7887;&#7888;&#7889;&#7890;&#7891;&#7892;&#7893;&#7894;&#7895;&#7896;&#7897;&#7898;&#7899;&#7900;&#7901;&#7902;&#7903;&#7904;&#7905;&#7906;&#7907;Pp&#420;&#421;&#7764;&#7765;&#7766;&#7767;Qq&#672;Rr&#340;&#341;&#342;&#343;&#344;&#345;&#528;&#529;&#530;&#531;&#636;&#637;&#638;&#7768;&#7769;&#7770;&#7771;&#7772;&#7773;&#7774;&#7775;Ss&#346;&#347;&#348;&#349;&#350;&#351;&#352;&#353;&#536;&#537;&#642;&#7776;&#7777;&#7778;&#7779;&#7780;&#7781;&#7782;&#7783;&#7784;&#7785;Tt&#354;&#355;&#356;&#357;&#358;&#359;&#427;&#428;&#429;&#430;&#648;&#538;&#539;&#566;&#7786;&#7787;&#7788;&#7789;&#7790;&#7791;&#7792;&#7793;&#7831;Uu&#217;&#249;&#218;&#250;&#219;&#251;&#220;&#252;&#360;&#361;&#362;&#363;&#364;&#365;&#366;&#367;&#368;&#369;&#370;&#371;&#431;&#432;&#467;&#468;&#469;&#470;&#471;&#472;&#473;&#474;&#475;&#476;&#532;&#533;&#534;&#535;&#7794;&#7795;&#7796;&#7797;&#7798;&#7799;&#7800;&#7801;&#7802;&#7803;&#7908;&#7909;&#7910;&#7911;&#7912;&#7913;&#7914;&#7915;&#7916;&#7917;&#7918;&#7919;&#7920;&#7921;Vv&#434;&#651;&#7804;&#7805;&#7806;&#7807;Ww&#372;&#373;&#7808;&#7809;&#7810;&#7811;&#7812;&#7813;&#7814;&#7815;&#7816;&#7817;&#7832;Xx&#7818;&#7819;&#7820;&#7821;Yy&#221;&#253;&#255;&#376;&#374;&#375;&#435;&#436;&#562;&#563;&#7822;&#7823;&#7833;&#7922;&#7923;&#7924;&#7925;&#7926;&#7927;&#7928;&#7929;Zz&#377;&#378;&#379;&#380;&#381;&#382;&#437;&#438;&#548;&#549;&#656;&#657;&#7824;&#7825;&#7826;&#7827;&#7828;&#7829;&#7829;', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ')"/>
-    <dt>
-    <xsl:text>(</xsl:text>
-    <xsl:call-template name="gentext">
-      <xsl:with-param name="key" select="'seealso'"/>
-    </xsl:call-template>
-    <xsl:text> </xsl:text>
-    <xsl:value-of select="."/>
-    <xsl:text>)</xsl:text>
-    </dt>
-  </xsl:for-each>
-</xsl:template>
-
-<xsl:template match="*" mode="index-title-content">
-  <xsl:variable name="title">
-    <xsl:apply-templates select="(ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage)[last()]" mode="title.markup"/>
-  </xsl:variable>
-
-  <xsl:value-of select="$title"/>
-</xsl:template>
-
-<xsl:template name="index.separator">
-  <xsl:param name="key" select="''"/>
-  <xsl:param name="lang">
-    <xsl:call-template name="l10n.language"/>
-  </xsl:param>
-
-  <xsl:choose>
-    <xsl:when test="$key = 'index.term.separator'">
-      <xsl:choose>
-        <!-- Use the override if not blank -->
-        <xsl:when test="$index.term.separator != ''">
-          <xsl:copy-of select="$index.term.separator"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="gentext.template">
-            <xsl:with-param name="lang" select="$lang"/>
-            <xsl:with-param name="context">index</xsl:with-param>
-            <xsl:with-param name="name">term-separator</xsl:with-param>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:when test="$key = 'index.number.separator'">
-      <xsl:choose>
-        <!-- Use the override if not blank -->
-        <xsl:when test="$index.number.separator != ''">
-          <xsl:copy-of select="$index.number.separator"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="gentext.template">
-            <xsl:with-param name="lang" select="$lang"/>
-            <xsl:with-param name="context">index</xsl:with-param>
-            <xsl:with-param name="name">number-separator</xsl:with-param>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:when test="$key = 'index.range.separator'">
-      <xsl:choose>
-        <!-- Use the override if not blank -->
-        <xsl:when test="$index.range.separator != ''">
-          <xsl:copy-of select="$index.range.separator"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="gentext.template">
-            <xsl:with-param name="lang" select="$lang"/>
-            <xsl:with-param name="context">index</xsl:with-param>
-            <xsl:with-param name="name">range-separator</xsl:with-param>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/autotoc.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/autotoc.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,632 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<xsl:variable name="toc.listitem.type">
-  <xsl:choose>
-    <xsl:when test="$toc.list.type = 'dl'">dt</xsl:when>
-    <xsl:otherwise>li</xsl:otherwise>
-  </xsl:choose>
-</xsl:variable>
-
-<!-- this is just hack because dl and ul aren't completely isomorphic -->
-<xsl:variable name="toc.dd.type">
-  <xsl:choose>
-    <xsl:when test="$toc.list.type = 'dl'">dd</xsl:when>
-    <xsl:otherwise/>
-  </xsl:choose>
-</xsl:variable>
-
-<xsl:template name="make.toc">
-  <xsl:param name="toc-context" select="."/>
-  <xsl:param name="toc.title.p" select="true()"/>
-  <xsl:param name="nodes" select="/NOT-AN-ELEMENT"/>
-
-  <xsl:variable name="nodes.plus" select="$nodes | qandaset"/>
-
-  <xsl:variable name="toc.title">
-    <xsl:if test="$toc.title.p">
-      <p>
-        <b>
-          <xsl:call-template name="gentext">
-            <xsl:with-param name="key">TableofContents</xsl:with-param>
-          </xsl:call-template>
-        </b>
-      </p>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$manual.toc != ''">
-      <xsl:variable name="id">
-        <xsl:call-template name="object.id"/>
-      </xsl:variable>
-      <xsl:variable name="toc" select="document($manual.toc, .)"/>
-      <xsl:variable name="tocentry" select="$toc//tocentry[@linkend=$id]"/>
-      <xsl:if test="$tocentry and $tocentry/*">
-        <div class="toc">
-          <xsl:copy-of select="$toc.title"/>
-          <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml">
-            <xsl:call-template name="manual-toc">
-              <xsl:with-param name="tocentry" select="$tocentry/*[1]"/>
-            </xsl:call-template>
-          </xsl:element>
-        </div>
-      </xsl:if>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="$qanda.in.toc != 0">
-          <xsl:if test="$nodes.plus">
-            <div class="toc">
-              <xsl:copy-of select="$toc.title"/>
-              <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml">
-                <xsl:apply-templates select="$nodes.plus" mode="toc">
-                  <xsl:with-param name="toc-context" select="$toc-context"/>
-                </xsl:apply-templates>
-              </xsl:element>
-            </div>
-          </xsl:if>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:if test="$nodes">
-            <div class="toc">
-              <xsl:copy-of select="$toc.title"/>
-              <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml">
-                <xsl:apply-templates select="$nodes" mode="toc">
-                  <xsl:with-param name="toc-context" select="$toc-context"/>
-                </xsl:apply-templates>
-              </xsl:element>
-            </div>
-          </xsl:if>
-        </xsl:otherwise>
-      </xsl:choose>
-
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="make.lots">
-  <xsl:param name="toc.params" select="''"/>
-  <xsl:param name="toc"/>
-
-  <xsl:if test="contains($toc.params, 'toc')">
-    <xsl:copy-of select="$toc"/>
-  </xsl:if>
-
-  <xsl:if test="contains($toc.params, 'figure')">
-    <xsl:call-template name="list.of.titles">
-      <xsl:with-param name="titles" select="'figure'"/>
-      <xsl:with-param name="nodes" select=".//figure"/>
-    </xsl:call-template>
-  </xsl:if>
-
-  <xsl:if test="contains($toc.params, 'table')">
-    <xsl:call-template name="list.of.titles">
-      <xsl:with-param name="titles" select="'table'"/>
-      <xsl:with-param name="nodes" select=".//table"/>
-    </xsl:call-template>
-  </xsl:if>
-
-  <xsl:if test="contains($toc.params, 'example')">
-    <xsl:call-template name="list.of.titles">
-      <xsl:with-param name="titles" select="'example'"/>
-      <xsl:with-param name="nodes" select=".//example"/>
-    </xsl:call-template>
-  </xsl:if>
-
-  <xsl:if test="contains($toc.params, 'equation')">
-    <xsl:call-template name="list.of.titles">
-      <xsl:with-param name="titles" select="'equation'"/>
-      <xsl:with-param name="nodes" select=".//equation[title or info/title]"/>
-    </xsl:call-template>
-  </xsl:if>
-
-  <xsl:if test="contains($toc.params, 'procedure')">
-    <xsl:call-template name="list.of.titles">
-      <xsl:with-param name="titles" select="'procedure'"/>
-      <xsl:with-param name="nodes" select=".//procedure[title]"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<!-- ====================================================================== -->
-
-<xsl:template name="set.toc">
-  <xsl:param name="toc-context" select="."/>
-  <xsl:param name="toc.title.p" select="true()"/>
-
-  <xsl:call-template name="make.toc">
-    <xsl:with-param name="toc-context" select="$toc-context"/>
-    <xsl:with-param name="toc.title.p" select="$toc.title.p"/>
-    <xsl:with-param name="nodes" select="book|setindex"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="division.toc">
-  <xsl:param name="toc-context" select="."/>
-  <xsl:param name="toc.title.p" select="true()"/>
-
-  <xsl:call-template name="make.toc">
-    <xsl:with-param name="toc-context" select="$toc-context"/>
-    <xsl:with-param name="toc.title.p" select="$toc.title.p"/>
-    <xsl:with-param name="nodes" select="part|reference                                          |preface|chapter|appendix                                          |article                                          |bibliography|glossary|index                                          |refentry                                          |bridgehead[$bridgehead.in.toc != 0]"/>
-
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="component.toc">
-  <xsl:param name="toc-context" select="."/>
-  <xsl:param name="toc.title.p" select="true()"/>
-
-  <xsl:call-template name="make.toc">
-    <xsl:with-param name="toc-context" select="$toc-context"/>
-    <xsl:with-param name="toc.title.p" select="$toc.title.p"/>
-    <xsl:with-param name="nodes" select="section|sect1                                          |simplesect[$simplesect.in.toc != 0]                                          |refentry                                          |article|bibliography|glossary                                          |appendix|index                                          |bridgehead[not(@renderas)                                                      and $bridgehead.in.toc != 0]                                          |.//bridgehead[@renderas='sect1'                                                         and $bridgehead.in.toc != 0]"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="component.toc.separator">
-  <!-- Customize to output something between
-       component.toc and first output -->
-</xsl:template>
-
-<xsl:template name="section.toc">
-  <xsl:param name="toc-context" select="."/>
-  <xsl:param name="toc.title.p" select="true()"/>
-
-  <xsl:call-template name="make.toc">
-    <xsl:with-param name="toc-context" select="$toc-context"/>
-    <xsl:with-param name="toc.title.p" select="$toc.title.p"/>
-    <xsl:with-param name="nodes" select="section|sect1|sect2|sect3|sect4|sect5|refentry                            |bridgehead[$bridgehead.in.toc != 0]"/>
-
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="section.toc.separator">
-  <!-- Customize to output something between
-       section.toc and first output -->
-</xsl:template>
-<!-- ==================================================================== -->
-
-<xsl:template name="subtoc">
-  <xsl:param name="toc-context" select="."/>
-  <xsl:param name="nodes" select="NOT-AN-ELEMENT"/>
-
-  <xsl:variable name="nodes.plus" select="$nodes | qandaset"/>
-
-  <xsl:variable name="subtoc">
-    <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml">
-      <xsl:choose>
-        <xsl:when test="$qanda.in.toc != 0">
-          <xsl:apply-templates mode="toc" select="$nodes.plus">
-            <xsl:with-param name="toc-context" select="$toc-context"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates mode="toc" select="$nodes">
-            <xsl:with-param name="toc-context" select="$toc-context"/>
-          </xsl:apply-templates>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:element>
-  </xsl:variable>
-
-  <xsl:variable name="depth">
-    <xsl:choose>
-      <xsl:when test="local-name(.) = 'section'">
-        <xsl:value-of select="count(ancestor::section) + 1"/>
-      </xsl:when>
-      <xsl:when test="local-name(.) = 'sect1'">1</xsl:when>
-      <xsl:when test="local-name(.) = 'sect2'">2</xsl:when>
-      <xsl:when test="local-name(.) = 'sect3'">3</xsl:when>
-      <xsl:when test="local-name(.) = 'sect4'">4</xsl:when>
-      <xsl:when test="local-name(.) = 'sect5'">5</xsl:when>
-      <xsl:when test="local-name(.) = 'refsect1'">1</xsl:when>
-      <xsl:when test="local-name(.) = 'refsect2'">2</xsl:when>
-      <xsl:when test="local-name(.) = 'refsect3'">3</xsl:when>
-      <xsl:when test="local-name(.) = 'simplesect'">
-        <!-- sigh... -->
-        <xsl:choose>
-          <xsl:when test="local-name(..) = 'section'">
-            <xsl:value-of select="count(ancestor::section)"/>
-          </xsl:when>
-          <xsl:when test="local-name(..) = 'sect1'">2</xsl:when>
-          <xsl:when test="local-name(..) = 'sect2'">3</xsl:when>
-          <xsl:when test="local-name(..) = 'sect3'">4</xsl:when>
-          <xsl:when test="local-name(..) = 'sect4'">5</xsl:when>
-          <xsl:when test="local-name(..) = 'sect5'">6</xsl:when>
-          <xsl:when test="local-name(..) = 'refsect1'">2</xsl:when>
-          <xsl:when test="local-name(..) = 'refsect2'">3</xsl:when>
-          <xsl:when test="local-name(..) = 'refsect3'">4</xsl:when>
-          <xsl:otherwise>1</xsl:otherwise>
-        </xsl:choose>
-      </xsl:when>
-      <xsl:otherwise>0</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
-
-  <xsl:variable name="subtoc.list">
-    <xsl:choose>
-      <xsl:when test="$toc.dd.type = ''">
-        <xsl:copy-of select="$subtoc"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:element name="{$toc.dd.type}" namespace="http://www.w3.org/1999/xhtml">
-          <xsl:copy-of select="$subtoc"/>
-        </xsl:element>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:element name="{$toc.listitem.type}" namespace="http://www.w3.org/1999/xhtml">
-    <xsl:call-template name="toc.line">
-      <xsl:with-param name="toc-context" select="$toc-context"/>
-    </xsl:call-template>
-    <xsl:if test="$toc.listitem.type = 'li'                   and $toc.section.depth &gt; $depth and                    ( ($qanda.in.toc = 0 and count($nodes)&gt;0) or                     ($qanda.in.toc != 0 and count($nodes.plus)&gt;0) )                   and $toc.max.depth &gt; $depth.from.context">
-      <xsl:copy-of select="$subtoc.list"/>
-    </xsl:if>
-  </xsl:element>
-  <xsl:if test="$toc.listitem.type != 'li'                 and $toc.section.depth &gt; $depth and                  ( ($qanda.in.toc = 0 and count($nodes)&gt;0) or                   ($qanda.in.toc != 0 and count($nodes.plus)&gt;0) )                 and $toc.max.depth &gt; $depth.from.context">
-    <xsl:copy-of select="$subtoc.list"/>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="toc.line">
-  <xsl:param name="toc-context" select="."/>
-  <xsl:param name="depth" select="1"/>
-  <xsl:param name="depth.from.context" select="8"/>
-
- <span>
-  <xsl:attribute name="class"><xsl:value-of select="local-name(.)"/></xsl:attribute>
-
-  <!-- * if $autotoc.label.in.hyperlink is zero, then output the label -->
-  <!-- * before the hyperlinked title (as the DSSSL stylesheet does) -->
-  <xsl:if test="$autotoc.label.in.hyperlink = 0">
-    <xsl:variable name="label">
-      <xsl:apply-templates select="." mode="label.markup"/>
-    </xsl:variable>
-    <xsl:copy-of select="$label"/>
-    <xsl:if test="$label != ''">
-      <xsl:value-of select="$autotoc.label.separator"/>
-    </xsl:if>
-  </xsl:if>
-
-  <a>
-    <xsl:attribute name="href">
-      <xsl:call-template name="href.target">
-        <xsl:with-param name="context" select="$toc-context"/>
-        <xsl:with-param name="toc-context" select="$toc-context"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    
-  <!-- * if $autotoc.label.in.hyperlink is non-zero, then output the label -->
-  <!-- * as part of the hyperlinked title -->
-  <xsl:if test="not($autotoc.label.in.hyperlink = 0)">
-    <xsl:variable name="label">
-      <xsl:apply-templates select="." mode="label.markup"/>
-    </xsl:variable>
-    <xsl:copy-of select="$label"/>
-    <xsl:if test="$label != ''">
-      <xsl:value-of select="$autotoc.label.separator"/>
-    </xsl:if>
-  </xsl:if>
-
-    <xsl:apply-templates select="." mode="titleabbrev.markup"/>
-  </a>
-  </span>
-</xsl:template>
-
-<xsl:template match="book" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <xsl:call-template name="subtoc">
-    <xsl:with-param name="toc-context" select="$toc-context"/>
-    <xsl:with-param name="nodes" select="part|reference                                          |preface|chapter|appendix                                          |article                                          |bibliography|glossary|index                                          |refentry                                          |bridgehead[$bridgehead.in.toc != 0]"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="setindex" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <!-- If the setindex tag is not empty, it should be it in the TOC -->
-  <xsl:if test="* or $generate.index != 0">
-    <xsl:call-template name="subtoc">
-      <xsl:with-param name="toc-context" select="$toc-context"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="part|reference" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <xsl:call-template name="subtoc">
-    <xsl:with-param name="toc-context" select="$toc-context"/>
-    <xsl:with-param name="nodes" select="appendix|chapter|article                                          |index|glossary|bibliography                                          |preface|reference|refentry                                          |bridgehead[$bridgehead.in.toc != 0]"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="preface|chapter|appendix|article" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <xsl:call-template name="subtoc">
-    <xsl:with-param name="toc-context" select="$toc-context"/>
-    <xsl:with-param name="nodes" select="section|sect1                                          |simplesect[$simplesect.in.toc != 0]                                          |refentry                                          |glossary|bibliography|index                                          |bridgehead[$bridgehead.in.toc != 0]"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="sect1" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-  <xsl:call-template name="subtoc">
-    <xsl:with-param name="toc-context" select="$toc-context"/>
-    <xsl:with-param name="nodes" select="sect2                                          |bridgehead[$bridgehead.in.toc != 0]"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="sect2" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <xsl:call-template name="subtoc">
-    <xsl:with-param name="toc-context" select="$toc-context"/>
-    <xsl:with-param name="nodes" select="sect3                                          |bridgehead[$bridgehead.in.toc != 0]"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="sect3" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <xsl:call-template name="subtoc">
-    <xsl:with-param name="toc-context" select="$toc-context"/>
-    <xsl:with-param name="nodes" select="sect4                                          |bridgehead[$bridgehead.in.toc != 0]"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="sect4" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <xsl:call-template name="subtoc">
-    <xsl:with-param name="toc-context" select="$toc-context"/>
-    <xsl:with-param name="nodes" select="sect5                                          |bridgehead[$bridgehead.in.toc != 0]"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="sect5" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <xsl:call-template name="subtoc">
-    <xsl:with-param name="toc-context" select="$toc-context"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="simplesect" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <xsl:call-template name="subtoc">
-    <xsl:with-param name="toc-context" select="$toc-context"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="section" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <xsl:call-template name="subtoc">
-    <xsl:with-param name="toc-context" select="$toc-context"/>
-    <xsl:with-param name="nodes" select="section                                          |bridgehead[$bridgehead.in.toc != 0]"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="bridgehead" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <xsl:if test="$bridgehead.in.toc != 0">
-    <xsl:call-template name="subtoc">
-      <xsl:with-param name="toc-context" select="$toc-context"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="bibliography|glossary" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <xsl:call-template name="subtoc">
-    <xsl:with-param name="toc-context" select="$toc-context"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="index" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <!-- If the index tag is not empty, it should be it in the TOC -->
-  <xsl:if test="* or $generate.index != 0">
-    <xsl:call-template name="subtoc">
-      <xsl:with-param name="toc-context" select="$toc-context"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="refentry" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <xsl:variable name="refmeta" select=".//refmeta"/>
-  <xsl:variable name="refentrytitle" select="$refmeta//refentrytitle"/>
-  <xsl:variable name="refnamediv" select=".//refnamediv"/>
-  <xsl:variable name="refname" select="$refnamediv//refname"/>
-  <xsl:variable name="refdesc" select="$refnamediv//refdescriptor"/>
-  <xsl:variable name="title">
-    <xsl:choose>
-      <xsl:when test="$refentrytitle">
-        <xsl:apply-templates select="$refentrytitle[1]" mode="titleabbrev.markup"/>
-      </xsl:when>
-      <xsl:when test="$refdesc">
-        <xsl:apply-templates select="$refdesc" mode="titleabbrev.markup"/>
-      </xsl:when>
-      <xsl:when test="$refname">
-        <xsl:apply-templates select="$refname[1]" mode="titleabbrev.markup"/>
-      </xsl:when>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:element name="{$toc.listitem.type}" namespace="http://www.w3.org/1999/xhtml">
-    <span class="refentrytitle">
-      <a>
-        <xsl:attribute name="href">
-          <xsl:call-template name="href.target">
-            <xsl:with-param name="toc-context" select="$toc-context"/>
-          </xsl:call-template>
-        </xsl:attribute>
-        <xsl:copy-of select="$title"/>
-      </a>
-    </span>
-    <span class="refpurpose">
-      <xsl:if test="$annotate.toc != 0">
-        <!-- * DocBook 5 says inlinemediaobject (among other things) -->
-        <!-- * is allowed in refpurpose; so we need to run -->
-        <!-- * apply-templates on refpurpose here, instead of value-of  -->
-        <xsl:apply-templates select="refnamediv/refpurpose"/>
-      </xsl:if>
-    </span>
-  </xsl:element>
-</xsl:template>
-
-<xsl:template match="title" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <a>
-    <xsl:attribute name="href">
-      <xsl:call-template name="href.target">
-        <xsl:with-param name="object" select=".."/>
-        <xsl:with-param name="toc-context" select="$toc-context"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:apply-templates/>
-  </a>
-</xsl:template>
-
-<xsl:template name="manual-toc">
-  <xsl:param name="toc-context" select="."/>
-  <xsl:param name="tocentry"/>
-
-  <!-- be careful, we don't want to change the current document to the other tree! -->
-
-  <xsl:if test="$tocentry">
-    <xsl:variable name="node" select="key('id', $tocentry/@linkend)"/>
-
-    <xsl:element name="{$toc.listitem.type}" namespace="http://www.w3.org/1999/xhtml">
-      <xsl:variable name="label">
-        <xsl:apply-templates select="$node" mode="label.markup"/>
-      </xsl:variable>
-      <xsl:copy-of select="$label"/>
-      <xsl:if test="$label != ''">
-        <xsl:value-of select="$autotoc.label.separator"/>
-      </xsl:if>
-      <a>
-        <xsl:attribute name="href">
-          <xsl:call-template name="href.target">
-            <xsl:with-param name="object" select="$node"/>
-            <xsl:with-param name="toc-context" select="$toc-context"/>
-          </xsl:call-template>
-        </xsl:attribute>
-        <xsl:apply-templates select="$node" mode="titleabbrev.markup"/>
-      </a>
-    </xsl:element>
-
-    <xsl:if test="$tocentry/*">
-      <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml">
-        <xsl:call-template name="manual-toc">
-          <xsl:with-param name="tocentry" select="$tocentry/*[1]"/>
-        </xsl:call-template>
-      </xsl:element>
-    </xsl:if>
-
-    <xsl:if test="$tocentry/following-sibling::*">
-      <xsl:call-template name="manual-toc">
-        <xsl:with-param name="tocentry" select="$tocentry/following-sibling::*[1]"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:if>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="list.of.titles">
-  <xsl:param name="toc-context" select="."/>
-  <xsl:param name="titles" select="'table'"/>
-  <xsl:param name="nodes" select=".//table"/>
-
-  <xsl:if test="$nodes">
-    <div class="list-of-{$titles}s">
-      <p>
-        <b>
-          <xsl:call-template name="gentext">
-            <xsl:with-param name="key">
-              <xsl:choose>
-                <xsl:when test="$titles='table'">ListofTables</xsl:when>
-                <xsl:when test="$titles='figure'">ListofFigures</xsl:when>
-                <xsl:when test="$titles='equation'">ListofEquations</xsl:when>
-                <xsl:when test="$titles='example'">ListofExamples</xsl:when>
-                <xsl:when test="$titles='procedure'">ListofProcedures</xsl:when>
-                <xsl:otherwise>ListofUnknown</xsl:otherwise>
-              </xsl:choose>
-            </xsl:with-param>
-          </xsl:call-template>
-        </b>
-      </p>
-
-      <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml">
-        <xsl:apply-templates select="$nodes" mode="toc">
-          <xsl:with-param name="toc-context" select="$toc-context"/>
-        </xsl:apply-templates>
-      </xsl:element>
-    </div>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="figure|table|example|equation|procedure" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <xsl:element name="{$toc.listitem.type}" namespace="http://www.w3.org/1999/xhtml">
-    <xsl:variable name="label">
-      <xsl:apply-templates select="." mode="label.markup"/>
-    </xsl:variable>
-    <xsl:copy-of select="$label"/>
-    <xsl:if test="$label != ''">
-      <xsl:value-of select="$autotoc.label.separator"/>
-    </xsl:if>
-    <a>
-      <xsl:attribute name="href">
-        <xsl:call-template name="href.target">
-          <xsl:with-param name="toc-context" select="$toc-context"/>
-        </xsl:call-template>
-      </xsl:attribute>
-      <xsl:apply-templates select="." mode="titleabbrev.markup"/>
-    </a>
-  </xsl:element>
-</xsl:template>
-
-<!-- Used only if qanda.in.toc parameter is non-zero -->
-<xsl:template match="qandaset" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-  <xsl:call-template name="subtoc">
-    <xsl:with-param name="toc-context" select="$toc-context"/>
-    <xsl:with-param name="nodes" select="qandadiv | qandaentry"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="qandadiv|qandaentry" mode="toc">
-  <xsl:apply-templates select="." mode="qandatoc.mode"/>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/biblio-iso690.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/biblio-iso690.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,1300 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
-
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     The original code for processing bibliography in ISO690 style
-     was provided by Jana Dvorakova <jana4u@seznam.cz>
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<!-- if biblioentry.alt.primary.seps is set to nonzero value then use alternative separators for primary responsibility - $alt.person.two.sep, $alt.person.last.sep, $alt.person.more.sep  -->
-<xsl:param name="biblioentry.alt.primary.seps" select="0"/>
-
-<!-- how many authors will be printed if there is more than three authors - set to number 1 (default value), 2 or 3 -->
-<xsl:param name="biblioentry.primary.count" select="1"/>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="iso690.makecitation">
-<!-- Types of resources -->
-  <xsl:choose>
-
-    <!-- SYSTEMS OF ELECTRONIC COMMUNICATION : ENTIRE MESSAGE SYSTEM -->
-    <!-- same as Monographs -->
-    <xsl:when test="./@role='messagesystem'">
-      <xsl:call-template name="iso690.monogr"/>
-    </xsl:when>
-
-    <!-- SYSTEMS OF ELECTRONIC COMMUNICATION : ELECTRONIC MESSAGES -->
-    <!-- same as Contributions to Monographs -->
-    <xsl:when test="./@role='message'">
-      <xsl:call-template name="iso690.paper.mon"/>
-    </xsl:when>
-
-    <!-- SERIALS -->
-    <xsl:when test="./@role='serial' or ./biblioid/@class='issn' or ./issn">
-      <xsl:call-template name="iso690.serial"/>
-    </xsl:when>
-
-    <!-- PARTS OF MONOGRAPHS -->
-    <xsl:when test="./@role='part' or (./bibliomisc[@role='secnum']|./bibliomisc[@role='sectitle'])">
-      <xsl:call-template name="iso690.monogr.part"/>
-    </xsl:when>
-
-    <!-- CONTRIBUTIONS TO MONOGRAPHS -->
-    <xsl:when test="./@role='contribution' or (./biblioset/@relation='part' and ./biblioset/@relation='book')">
-      <xsl:call-template name="iso690.paper.mon"/>
-    </xsl:when>
-
-    <!-- ARTICLES, ETC., IN SERIALS -->
-    <xsl:when test="./@role='article' or (./biblioset/@relation='journal' and ./biblioset/@relation='article')">
-      <xsl:call-template name="iso690.article"/>
-    </xsl:when>
-
-    <!-- PATENT DOCUMENTS -->
-    <xsl:when test="./@role='patent' or (./bibliomisc[@role='patenttype'] and ./bibliomisc[@role='patentnum'])">
-      <xsl:call-template name="iso690.patent"/>
-    </xsl:when>
-
-    <!-- MONOGRAPHS -->
-    <xsl:otherwise>
-      <xsl:call-template name="iso690.monogr"/>
-    </xsl:otherwise>
-
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<!-- MONOGRAPHS -->
-<xsl:template name="iso690.monogr">
-  <!-- Primary responsibility -->
-  <xsl:call-template name="iso690.primary"/>
-  <!-- Title and Type of medium -->
-  <xsl:call-template name="iso690.title"/>
-  <!-- Subordinate responsibility -->
-  <xsl:call-template name="iso690.secondary"/>
-  <!-- Edition -->
-  <xsl:call-template name="iso690.edition"/>
-  <!-- Place of publication, Publisher, Year/Date of publication, Date of update/revision, Date of citation -->
-  <xsl:call-template name="iso690.pub"/>
-  <!-- Extent -->
-  <xsl:call-template name="iso690.extent"/>
-  <!-- Series -->
-  <xsl:call-template name="iso690.serie"/>
-  <!-- Notes -->
-  <xsl:call-template name="iso690.notice"/>
-  <!-- Avaibility and access -->
-  <xsl:call-template name="iso690.access"/>
-  <!-- Standard number -->
-  <xsl:call-template name="iso690.isbn"/>
-</xsl:template>
-
-<!-- SERIALS -->
-<xsl:template name="iso690.serial">
-  <!-- Title and Type of medium -->
-  <xsl:call-template name="iso690.title"/>
-  <!-- Responsibility [nonEL] -->
-  <xsl:if test="not(./bibliomisc[@role='medium'])">
-    <xsl:call-template name="iso690.secondary"/>
-  </xsl:if>
-  <!-- Edition -->
-  <xsl:call-template name="iso690.edition">
-    <xsl:with-param name="after" select="./bibliomisc[@role='issuing']"/>
-  </xsl:call-template>
-  <!-- Issue designation (date and/or num) [nonEL] -->
-  <xsl:if test="not(./bibliomisc[@role='medium'])">
-    <xsl:call-template name="iso690.issuing"/>
-  </xsl:if>
-  <!-- Place of publication, Publisher, Year/Date of publication, Date of update/revision, Date of citation -->
-  <xsl:call-template name="iso690.pub"/>
-  <!-- Series -->
-  <xsl:call-template name="iso690.serie"/>
-  <!-- Notes -->
-  <xsl:call-template name="iso690.notice"/>
-  <!-- Avaibility and access -->
-  <xsl:call-template name="iso690.access"/>
-  <!-- Standard number -->
-  <xsl:call-template name="iso690.issn"/>
-</xsl:template>
-
-<!-- PARTS OF MONOGRAPHS -->
-<xsl:template name="iso690.monogr.part">
-  <!-- Primary responsibility of host document -->
-  <xsl:call-template name="iso690.primary"/>
-  <!-- Title and Type of medium of host document -->
-  <xsl:call-template name="iso690.title"/>
-  <!-- Subordinate responsibility of host document [EL] -->
-  <xsl:if test="./bibliomisc[@role='medium']">
-    <xsl:call-template name="iso690.secondary"/>
-  </xsl:if>
-  <!-- Edition -->
-  <xsl:call-template name="iso690.edition">
-    <xsl:with-param name="after" select="./volumenum"/>
-  </xsl:call-template>
-  <!-- Numeration of the part [nonEL]-->
-  <xsl:if test="not(./bibliomisc[@role='medium'])">
-    <xsl:call-template name="iso690.partnr"/>
-  <!-- Subordinate responsibility [nonEL] -->
-    <xsl:call-template name="iso690.secondary"/>
-  </xsl:if>
-  <!-- Place of publication, Publisher, Year/Date of publication, Date of update/revision, Date of citation -->
-  <xsl:call-template name="iso690.pub"/>
-  <!-- Location within host -->
-  <xsl:call-template name="iso690.part.location"/>
-  <xsl:if test="./bibliomisc[@role='medium']">
-  <!-- Numeration within host document [EL] -->
-  <!-- Notes [EL] -->
-    <xsl:call-template name="iso690.notice"/>
-  <!-- Avaibility and access [EL] -->
-    <xsl:call-template name="iso690.access"/>
-  <!-- Standard number [EL] -->
-    <xsl:call-template name="iso690.isbn"/>
-  </xsl:if>
-</xsl:template>
-
-<!-- CONTRIBUTIONS TO MONOGRAPHS -->
-<xsl:template name="iso690.paper.mon">
-<!-- Contribution -->
-  <xsl:apply-templates mode="iso690.paper.part" select="./biblioset[@relation='part']"/>
-<!-- In -->
-  <xsl:text>In </xsl:text>
-<!-- Host -->
-  <xsl:apply-templates mode="iso690.paper.book" select="./biblioset[@relation='book']"/>
-</xsl:template>
-
-<xsl:template match="biblioset" mode="iso690.paper.part">
-<!-- Contribution -->
-  <!-- Primary responsibility -->
-  <xsl:call-template name="iso690.primary"/>
-  <!-- Title -->
-  <xsl:call-template name="iso690.title">
-    <xsl:with-param name="italic" select="0"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="biblioset" mode="iso690.paper.book">
-<!-- Host -->
-  <!-- Primary responsibility -->
-  <xsl:call-template name="iso690.primary"/>
-  <!-- Title and Type of medium -->
-  <xsl:call-template name="iso690.title"/>
-  <!-- Subordinate responsibility [EL] -->
-  <xsl:if test="./bibliomisc[@role='medium']">
-    <xsl:call-template name="iso690.secondary"/>
-  </xsl:if>
-  <!-- Edition -->
-  <xsl:call-template name="iso690.edition"/>
-  <!-- Place of publication, Publisher, Year/Date of publication, Date of update/revision, Date of citation -->
-  <xsl:call-template name="iso690.paper.pub"/>
-  <!-- Numeration within host document [EL] -->
-  <!-- Location within host -->
-  <xsl:call-template name="iso690.location"/>
-  <xsl:if test="./bibliomisc[@role='medium']">
-  <!-- Notes [EL] -->
-    <xsl:call-template name="iso690.notice"/>
-  <!-- Avaibility and access [EL] -->
-    <xsl:call-template name="iso690.access"/>
-  <!-- Standard number [EL] -->
-    <xsl:call-template name="iso690.isbn"/>
-  </xsl:if>
-</xsl:template>
-
-<!-- ARTICLES, ETC., IN SERIALS -->
-<xsl:template name="iso690.article">
-<!-- Article -->
-  <xsl:apply-templates mode="iso690.article.art" select="./biblioset[@relation='article']"/>
-<!-- Serial -->
-  <xsl:apply-templates mode="iso690.article.jour" select="./biblioset[@relation='journal']"/>
-</xsl:template>
-
-<xsl:template match="biblioset" mode="iso690.article.art">
-<!-- Article -->
-  <!-- Primary responsibility -->
-  <xsl:call-template name="iso690.primary"/>
-  <!-- Title -->
-  <xsl:call-template name="iso690.title">
-    <xsl:with-param name="italic" select="0"/>
-  </xsl:call-template>
-  <!-- Subordinate responsibility [nonEL] -->
-  <xsl:if test="not(../*/bibliomisc[@role='medium'])">
-    <xsl:call-template name="iso690.secondary"/>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="biblioset" mode="iso690.article.jour">
-<!-- Serial -->
-  <!-- Title and Type of medium -->
-  <xsl:call-template name="iso690.title"/>
-  <!-- Edition -->
-  <xsl:call-template name="iso690.edition">
-    <xsl:with-param name="after" select="./pubdate[not(@role='issuing')]|./volumenum|./issuenum|./pagenums"/>
-  </xsl:call-template>
-  <!-- Number designation [EL] -->
-  <!-- Location within host -->
-  <xsl:call-template name="iso690.article.location"/>
-  <xsl:if test="./bibliomisc[@role='medium']">
-  <!-- Notes [EL] -->
-    <xsl:call-template name="iso690.notice"/>
-  <!-- Avaibility and access [EL] -->
-    <xsl:call-template name="iso690.access"/>
-  <!-- Standard number [EL] -->
-    <xsl:call-template name="iso690.issn"/>
-  </xsl:if>
-</xsl:template>
-
-<!-- PATENT DOCUMENTS -->
-<xsl:template name="iso690.patent">
-  <!-- Primary responsibility (applicant) -->
-  <xsl:call-template name="iso690.primary"/>
-  <!-- Title of the invention -->
-  <xsl:call-template name="iso690.title"/>
-  <!-- Subordinate responsibility -->
-  <xsl:call-template name="iso690.secondary"/>
-  <!-- Notes -->
-  <xsl:call-template name="iso690.notice"/>
-  <!-- Identification -->
-  <xsl:call-template name="iso690.pat.ident"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-<!-- Elements -->
-
-<!-- Primary responsibility -->
-<xsl:template name="iso690.primary">
-  <xsl:param name="primary.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'primary.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:choose>
-    <xsl:when test="./authorgroup/author|./author">
-      <xsl:call-template name="iso690.author.list">
-        <xsl:with-param name="person.list" select=".//authorgroup/author|.//author"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="./authorgroup/editor|./editor">
-      <xsl:call-template name="iso690.author.list">
-        <xsl:with-param name="person.list" select=".//authorgroup/editor|.//editor"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="./authorgroup/corpauthor|./corpauthor">
-      <xsl:call-template name="iso690.author.list">
-        <xsl:with-param name="person.list" select=".//authorgroup/corpauthor|.//corpauthor"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:if test="(./firstname)and(./surname)">
-        <xsl:call-template name="iso690.author"/>
-        <xsl:call-template name="iso690.endsep">
-          <xsl:with-param name="text" select="string(./firstname[1])"/>
-          <xsl:with-param name="sep" select="$primary.sep"/>
-        </xsl:call-template>
-      </xsl:if>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="iso690.author.list">
-  <xsl:param name="person.list" select="author|corpauthor|editor"/>
-  <xsl:param name="person.count" select="count($person.list)"/>
-  <xsl:param name="count" select="1"/>
-  <xsl:param name="group" select="./authorgroup[@role='many']"/>
-  <xsl:param name="many" select="0"/>
-
-  <xsl:param name="primary.many">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'primary.many'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="primary.editor">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'primary.editor'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="primary.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'primary.sep'"/></xsl:call-template>
-  </xsl:param>
-
-  <xsl:choose>
-    <xsl:when test="$count &gt; $person.count"/>
-    <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="$person.count &lt; 4 and not($group)">
-          <xsl:call-template name="iso690.author">
-            <xsl:with-param name="node" select="$person.list[position()=$count]"/>
-          </xsl:call-template>
-          <xsl:choose>
-            <xsl:when test="$person.count = 2 and $count = 1 and $biblioentry.alt.primary.seps != 0">
-              <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'alt.person.two.sep'"/></xsl:call-template>
-            </xsl:when>
-            <xsl:when test="$person.count = 2 and $count = 1">
-              <xsl:call-template name="gentext.template">
-                <xsl:with-param name="context" select="'authorgroup'"/>
-                <xsl:with-param name="name" select="'sep2'"/>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:when test="$person.count &gt; 2 and $count+1 = $person.count and $biblioentry.alt.primary.seps != 0">
-              <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'alt.person.last.sep'"/></xsl:call-template>
-            </xsl:when>
-            <xsl:when test="$person.count &gt; 2 and $count+1 = $person.count">
-              <xsl:call-template name="gentext.template">
-                <xsl:with-param name="context" select="'authorgroup'"/>
-                <xsl:with-param name="name" select="'seplast'"/>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:when test="$count &lt; $person.count and $biblioentry.alt.primary.seps != 0">
-              <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'alt.person.more.sep'"/></xsl:call-template>
-            </xsl:when>
-            <xsl:when test="$count &lt; $person.count">
-              <xsl:call-template name="gentext.template">
-                <xsl:with-param name="context" select="'authorgroup'"/>
-                <xsl:with-param name="name" select="'sep'"/>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:when test="($count = $person.count)">
-              <xsl:choose>
-                <xsl:when test="$many!=0">
-                  <xsl:if test="name($person.list[position()=$count])='editor'">
-                    <xsl:value-of select="$primary.editor"/>
-                  </xsl:if>
-                  <xsl:value-of select="$primary.many"/>
-                  <xsl:call-template name="iso690.endsep">
-                    <xsl:with-param name="text" select="$primary.many"/>
-                    <xsl:with-param name="sep" select="$primary.sep"/>
-                  </xsl:call-template>
-                </xsl:when>
-                <xsl:when test="name($person.list[position()=$count])='editor'">
-                  <xsl:value-of select="$primary.editor"/>
-                  <xsl:value-of select="$primary.sep"/>
-                </xsl:when>
-                <xsl:when test="name($person.list[position()=$count])='corpauthor'">
-                  <xsl:call-template name="iso690.endsep">
-                    <xsl:with-param name="text" select="string($person.list[position()=$count])"/>
-                    <xsl:with-param name="sep" select="$primary.sep"/>
-                  </xsl:call-template>
-                </xsl:when>
-                <xsl:otherwise>
-                  <xsl:call-template name="iso690.endsep">
-                    <xsl:with-param name="text" select="string($person.list[position()=$count]//firstname[1])"/>
-                    <xsl:with-param name="sep" select="$primary.sep"/>
-                  </xsl:call-template>
-                </xsl:otherwise>
-              </xsl:choose>
-            </xsl:when>
-          </xsl:choose>
-
-          <xsl:call-template name="iso690.author.list">
-            <xsl:with-param name="person.list" select="$person.list"/>
-            <xsl:with-param name="person.count" select="$person.count"/>
-            <xsl:with-param name="count" select="$count+1"/>
-            <xsl:with-param name="many" select="$many"/>
-            <xsl:with-param name="group"/>
-          </xsl:call-template>
-        </xsl:when>
-
-        <xsl:otherwise>
-          <xsl:choose>
-            <xsl:when test="($biblioentry.primary.count&gt;=3) and ($person.count&gt;=3)">
-              <xsl:call-template name="iso690.author.list">
-                <xsl:with-param name="person.list" select="$person.list[1]|$person.list[2]|$person.list[3]"/>
-                <xsl:with-param name="person.count" select="3"/>
-                <xsl:with-param name="count" select="1"/>
-                <xsl:with-param name="many" select="1"/>
-                <xsl:with-param name="group"/>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:when test="($biblioentry.primary.count&gt;1) and  ($person.count&gt;1)">
-              <xsl:call-template name="iso690.author.list">
-                <xsl:with-param name="person.list" select="$person.list[1]|$person.list[2]"/>
-                <xsl:with-param name="person.count" select="2"/>
-                <xsl:with-param name="count" select="1"/>
-                <xsl:with-param name="many" select="1"/>
-                <xsl:with-param name="group"/>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:call-template name="iso690.author.list">
-                <xsl:with-param name="person.list" select="$person.list[1]"/>
-                <xsl:with-param name="person.count" select="1"/>
-                <xsl:with-param name="count" select="1"/>
-                <xsl:with-param name="many" select="1"/>
-                <xsl:with-param name="group"/>
-              </xsl:call-template>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="iso690.author">
-  <xsl:param name="node" select="."/>
-  <xsl:param name="lastfirst.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'lastfirst.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:choose>
-    <xsl:when test="name($node)!='corpauthor'">
-      <span style="text-transform:uppercase">
-        <xsl:apply-templates mode="iso690.mode" select="$node//surname[1]"/>
-      </span>
-      <xsl:if test="$node//surname and $node//firstname">
-        <xsl:value-of select="$lastfirst.sep"/>
-      </xsl:if>
-      <xsl:apply-templates mode="iso690.mode" select="$node//firstname[1]"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <span style="text-transform:uppercase">
-        <xsl:apply-templates mode="iso690.mode" select="$node"/>
-      </span>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="corpauthor|firstname|surname" mode="iso690.mode">
-  <xsl:apply-templates mode="iso690.mode"/>
-</xsl:template>
-
-<!-- Title and Type of medium -->
-<xsl:template name="iso690.title">
-  <xsl:param name="medium" select="./bibliomisc[@role='medium']"/>
-  <xsl:param name="italic" select="1"/>
-  <xsl:param name="sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'title.sep'"/></xsl:call-template>
-  </xsl:param>
-
-  <xsl:apply-templates mode="iso690.mode" select="./title">
-    <xsl:with-param name="medium" select="$medium"/>
-    <xsl:with-param name="italic" select="$italic"/>
-    <xsl:with-param name="sep" select="$sep"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="title" mode="iso690.mode">
-  <xsl:param name="medium"/>
-  <xsl:param name="italic" select="1"/>
-  <xsl:param name="sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'title.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="medium1">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'medium1'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="medium2">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'medium2'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:choose>
-    <xsl:when test="$italic=1">
-      <xsl:call-template name="iso690.italic.title"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="iso690.make.title"/>
-    </xsl:otherwise>
-  </xsl:choose>
-  <xsl:if test="$medium">
-    <xsl:value-of select="$medium1"/>
-    <xsl:apply-templates mode="iso690.mode" select="$medium"/>
-    <xsl:value-of select="$medium2"/>
-  </xsl:if>
-  <xsl:call-template name="iso690.endsep">
-    <xsl:with-param name="text" select="concat(string(.),string(../subtitle))"/>
-    <xsl:with-param name="sep" select="$sep"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="iso690.italic.title">
-  <i>
-    <xsl:call-template name="iso690.make.title"/>
-  </i>
-</xsl:template>
-
-<xsl:template name="iso690.make.title">
-  <xsl:param name="submaintitle.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'submaintitle.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:apply-templates mode="iso690.mode"/>
-  <xsl:if test="../subtitle">
-    <xsl:value-of select="$submaintitle.sep"/>
-    <xsl:apply-templates mode="iso690.mode" select="../subtitle"/>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="iso690.mode">
-  <xsl:apply-templates mode="iso690.mode"/>
-</xsl:template>
-
-<xsl:template match="bibliomisc[@role='medium']" mode="iso690.mode">
-  <xsl:apply-templates mode="iso690.mode"/>
-</xsl:template>
-
-<!-- Subordinate responsibility -->
-<xsl:template name="iso690.secondary">
-  <xsl:param name="secondary.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'secondary.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="secondary.person.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'secondary.person.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:for-each select="./bibliomisc[@role='secondary']">
-    <xsl:apply-templates mode="iso690.mode" select="."/>
-    <xsl:choose>
-      <xsl:when test="position()=count(../bibliomisc[@role='secondary'])">
-        <xsl:call-template name="iso690.endsep">
-          <xsl:with-param name="text" select="string(.)"/>
-          <xsl:with-param name="sep" select="$secondary.sep"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$secondary.person.sep"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:for-each>
-</xsl:template>
-
-<xsl:template match="bibliomisc[@role='secondary']" mode="iso690.mode">
-  <xsl:apply-templates mode="iso690.mode"/>
-</xsl:template>
-
-<!-- Edition -->
-<xsl:template name="iso690.edition">
-  <xsl:param name="after"/>
-  <xsl:param name="edition.serial.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'edition.serial.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:choose>
-    <xsl:when test="string($after)!=''">
-      <xsl:apply-templates mode="iso690.mode" select="./edition">
-        <xsl:with-param name="sep" select="$edition.serial.sep"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates mode="iso690.mode" select="./edition"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="edition" mode="iso690.mode">
-  <xsl:param name="sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'edition.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:apply-templates mode="iso690.mode"/>
-  <xsl:call-template name="iso690.endsep">
-    <xsl:with-param name="text" select="string(.)"/>
-    <xsl:with-param name="sep" select="$sep"/>
-  </xsl:call-template>
-</xsl:template>
-
-<!-- Issue designation (date and/or num) -->
-<xsl:template name="iso690.issuing">
-  <xsl:param name="issuing.div">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.div'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="issuing.range">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.range'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="issuing.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:choose>
-    <xsl:when test="./pubdate[@role='issuing'] and ./volumenum[2] and ./issuenum[2]">
-      <xsl:call-template name="iso690.issuedate"/>
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum[1]">
-        <xsl:with-param name="sep" select="$issuing.div"/>
-      </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./issuenum[1]">
-        <xsl:with-param name="sep" select="$issuing.range"/>
-      </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum[2]">
-        <xsl:with-param name="sep" select="$issuing.div"/>
-      </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./issuenum[2]">
-        <xsl:with-param name="sep" select="$issuing.sep"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:when test="./pubdate[@role='issuing'] and ./volumenum[2]">
-      <xsl:call-template name="iso690.issuedate"/>
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum[1]">
-        <xsl:with-param name="sep" select="$issuing.range"/>
-      </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum[2]">
-        <xsl:with-param name="sep" select="$issuing.sep"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:when test="./pubdate[@role='issuing'] and ./volumenum and ./issuenum">
-      <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing']">
-        <xsl:with-param name="sep" select="$issuing.div"/>
-      </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum">
-        <xsl:with-param name="sep" select="$issuing.div"/>
-      </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./issuenum">
-        <xsl:with-param name="sep" select="$issuing.sep"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:when test="./pubdate[@role='issuing']">
-      <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing']">
-        <xsl:with-param name="sep" select="$issuing.sep"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:when test="./volumenum">
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum">
-        <xsl:with-param name="sep" select="$issuing.sep"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:when test="./issuenum">
-      <xsl:apply-templates mode="iso690.mode" select="./issuenum">
-        <xsl:with-param name="sep" select="$issuing.sep"/>
-      </xsl:apply-templates>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="iso690.issuedate">
-  <xsl:param name="issuing.div">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.div'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="issuing.range">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.range'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="issuing.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:choose>
-    <xsl:when test="./pubdate[@role='issuing'][2]">
-      <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing'][1]">
-        <xsl:with-param name="sep" select="$issuing.range"/>
-      </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing'][2]">
-        <xsl:with-param name="sep" select="$issuing.div"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing']">
-        <xsl:with-param name="sep" select="$issuing.div"/>
-      </xsl:apply-templates>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="pubdate[@role='issuing']" mode="iso690.mode">
-  <xsl:param name="sep"/>
-  <xsl:variable name="substr" select="substring(string(.),string-length(string(.)))"/>
-  <xsl:apply-templates mode="iso690.mode"/>
-  <xsl:call-template name="iso690.space">
-    <xsl:with-param name="text" select="$substr"/>
-  </xsl:call-template>
-  <xsl:choose>
-    <xsl:when test="$substr='-'">
-      <xsl:call-template name="iso690.endsep">
-        <xsl:with-param name="text" select="' '"/>
-        <xsl:with-param name="sep" select="$sep"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="iso690.endsep">
-        <xsl:with-param name="text" select="string(.)"/>
-        <xsl:with-param name="sep" select="$sep"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- Numeration of the part -->
-<xsl:template name="iso690.partnr">
-  <xsl:param name="partnr.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'partnr.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:apply-templates mode="iso690.mode" select="./volumenum">
-    <xsl:with-param name="sep" select="$partnr.sep"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<!-- Place of publication, Publisher, Year/Date of publication, Date of update/revision, Date of citation -->
-<xsl:template name="iso690.pub">
-  <xsl:param name="onlydate" select="0"/>
-  <xsl:param name="placesep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'placepubl.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="pubsep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'publyear.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="endsep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'pubinfo.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:choose>
-    <xsl:when test="(./publisher/publishername|./publishername|./publisher/address/city)and($onlydate=0)and(./pubdate[not(@role='issuing')]|./copyright/year|./date[@role='upd']|./date[@role='upd'])">
-      <xsl:apply-templates mode="iso690.mode" select="./publisher/address/city">
-        <xsl:with-param name="sep" select="$placesep"/>
-      </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./publisher/publishername|./publishername">
-        <xsl:with-param name="sep" select="$pubsep"/>
-      </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]|./copyright/year">
-        <xsl:with-param name="sep" select="$endsep"/>
-      </xsl:apply-templates>
-      <xsl:if test="not(./pubdate[not(@role='issuing')]|./copyright/year)">
-        <xsl:call-template name="iso690.data">
-          <xsl:with-param name="sep" select="$endsep"/>
-        </xsl:call-template>
-      </xsl:if>
-    </xsl:when>
-    <xsl:when test="(./publisher/publishername|./publishername)and(./publisher/address/city)and($onlydate=0)">
-      <xsl:apply-templates mode="iso690.mode" select="./publisher/address/city">
-        <xsl:with-param name="sep" select="$placesep"/>
-      </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./publisher/publishername|./publishername">
-        <xsl:with-param name="sep" select="$endsep"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:when test="($onlydate=1)or(./pubdate[not(@role='issuing')]|./copyright/year)">
-      <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]|./copyright/year">
-        <xsl:with-param name="sep" select="$endsep"/>
-      </xsl:apply-templates>
-      <xsl:if test="$onlydate=1">
-        <xsl:call-template name="iso690.location">
-          <xsl:with-param name="onlypages" select="1"/>
-        </xsl:call-template>
-      </xsl:if>
-    </xsl:when>
-    <xsl:when test="not(./pubdate[not(@role='issuing')]|./copyright/year)">
-      <xsl:call-template name="iso690.data">
-        <xsl:with-param name="sep" select="$endsep"/>
-      </xsl:call-template>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="iso690.paper.pub">
-  <xsl:param name="spec.pubinfo.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'spec.pubinfo.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:choose>
-    <xsl:when test="./volumnum|./issuenum|./pagenums">
-      <xsl:call-template name="iso690.pub">
-        <xsl:with-param name="endsep" select="$spec.pubinfo.sep"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="iso690.pub"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="iso690.data">
-  <xsl:param name="sep"/>
-  <xsl:param name="datecit2">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'datecit2'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:apply-templates mode="iso690.mode" select="./date[@role='upd']">
-    <xsl:with-param name="sep"/>
-  </xsl:apply-templates>
-  <xsl:apply-templates mode="iso690.mode" select="./date[@role='cit']"/>
-  <xsl:choose>
-    <xsl:when test="./date[@role='cit']">
-      <xsl:call-template name="iso690.endsep">
-        <xsl:with-param name="text" select="$datecit2"/>
-        <xsl:with-param name="sep" select="$sep"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="./date[@role='upd']">
-      <xsl:call-template name="iso690.endsep">
-        <xsl:with-param name="text" select="string(./date[@role='upd'])"/>
-        <xsl:with-param name="sep" select="$sep"/>
-      </xsl:call-template>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="publisher/address/city|publishername" mode="iso690.mode">
-  <xsl:param name="sep"/>
-  <xsl:param name="upd" select="0"/>
-  <xsl:apply-templates mode="iso690.mode"/>
-  <xsl:call-template name="iso690.endsep">
-    <xsl:with-param name="text" select="string(.)"/>
-    <xsl:with-param name="sep" select="$sep"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="pubdate|copyright/year" mode="iso690.mode">
-  <xsl:param name="sep"/>
-  <xsl:param name="upd" select="1"/>
-  <xsl:param name="datecit2">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'datecit2'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:variable name="substr" select="substring(string(.),string-length(string(.)))"/>
-  <xsl:if test="name(.)!='pubdate'">
-    <xsl:value-of select="'&#169;'"/><!-- copyright -->
-  </xsl:if>
-  <xsl:apply-templates mode="iso690.mode"/>
-  <xsl:call-template name="iso690.space">
-    <xsl:with-param name="text" select="$substr"/>
-  </xsl:call-template>
-  <xsl:if test="$upd!=0">
-    <xsl:choose>
-      <xsl:when test="name(.)='pubdate'">
-        <xsl:apply-templates mode="iso690.mode" select="../date[@role='upd']"/>
-        <xsl:apply-templates mode="iso690.mode" select="../date[@role='cit']"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:apply-templates mode="iso690.mode" select="../../date[@role='upd']"/>
-        <xsl:apply-templates mode="iso690.mode" select="../../date[@role='cit']"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:if>
-  <xsl:choose>
-    <xsl:when test="../date[@role='cit']|../../date[@role='cit'] and $upd!=0">
-      <xsl:call-template name="iso690.endsep">
-        <xsl:with-param name="text" select="$datecit2"/>
-        <xsl:with-param name="sep" select="$sep"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="../date[@role='upd']|../../date[@role='upd'] and $upd!=0">
-      <xsl:call-template name="iso690.endsep">
-        <xsl:with-param name="text" select="string(../date[@role='upd'])"/>
-        <xsl:with-param name="sep" select="$sep"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="$substr='-'">
-      <xsl:call-template name="iso690.endsep">
-        <xsl:with-param name="text" select="' '"/>
-        <xsl:with-param name="sep" select="$sep"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="iso690.endsep">
-        <xsl:with-param name="text" select="string(.)"/>
-        <xsl:with-param name="sep" select="$sep"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="iso690.space">
-  <xsl:param name="text" select="substring(string(.),string-length(string(.)))"/>
-  <xsl:if test="$text='-'">
-    <xsl:value-of select="' '"/>
-  </xsl:if>
-</xsl:template>
-
-<!-- Date of update/revision -->
-<xsl:template match="date[@role='upd']" mode="iso690.mode">
-  <xsl:param name="sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'upd.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:value-of select="$sep"/>
-  <xsl:apply-templates mode="iso690.mode"/>
-</xsl:template>
-
-<!-- Date of citation -->
-<xsl:template match="date[@role='cit']" mode="iso690.mode">
-  <xsl:param name="datecit1">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'datecit1'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="datecit2">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'datecit2'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:value-of select="$datecit1"/>
-  <xsl:apply-templates mode="iso690.mode"/>
-  <xsl:value-of select="$datecit2"/>
-</xsl:template>
-
-<!-- Extent -->
-<xsl:template name="iso690.extent">
-  <xsl:param name="extent.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'extent.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:apply-templates mode="iso690.mode" select="./pagenums">
-    <xsl:with-param name="sep" select="$extent.sep"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<!-- Location within host -->
-<xsl:template name="iso690.part.location">
-  <xsl:param name="location.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'location.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:choose>
-    <xsl:when test="./pagenums">
-      <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='secnum']"/>
-      <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='sectitle']"/>
-      <xsl:apply-templates mode="iso690.mode" select="./pagenums"/>
-    </xsl:when>
-    <xsl:when test="./bibliomisc[@role='sectitle']">
-      <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='secnum']"/>
-      <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='sectitle']">
-        <xsl:with-param name="sep" select="$location.sep"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='secnum']">
-        <xsl:with-param name="sep" select="$location.sep"/>
-      </xsl:apply-templates>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="iso690.article.location">
-  <xsl:param name="location.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'location.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="locs.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'locs.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:choose>
-    <xsl:when test="not(./date[@role='upd']|./date[@role='cit'])">
-      <xsl:choose>
-        <xsl:when test="./volumenum|./issuenum|./pagenums">
-          <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]">
-            <xsl:with-param name="upd" select="0"/>
-            <xsl:with-param name="sep" select="$locs.sep"/>
-          </xsl:apply-templates>
-          <xsl:call-template name="iso690.location"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]">
-            <xsl:with-param name="sep" select="$location.sep"/>
-          </xsl:apply-templates>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="./volumenum|./issuenum|./pagenums">
-          <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]">
-            <xsl:with-param name="upd" select="0"/>
-            <xsl:with-param name="sep" select="$locs.sep"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]">
-            <xsl:with-param name="upd" select="0"/>
-            <xsl:with-param name="sep" select="$location.sep"/>
-          </xsl:apply-templates>
-        </xsl:otherwise>
-      </xsl:choose>
-      <xsl:choose>
-        <xsl:when test="./issuenum">
-          <xsl:apply-templates mode="iso690.mode" select="./volumenum"/>
-          <xsl:apply-templates mode="iso690.mode" select="./issuenum">
-            <xsl:with-param name="sep"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates mode="iso690.mode" select="./volumenum">
-            <xsl:with-param name="sep"/>
-          </xsl:apply-templates>
-        </xsl:otherwise>
-      </xsl:choose>
-      <xsl:choose>
-        <xsl:when test="./pagenums">
-          <xsl:call-template name="iso690.data">
-            <xsl:with-param name="sep" select="$locs.sep"/>
-          </xsl:call-template>
-          <xsl:apply-templates mode="iso690.mode" select="./pagenums"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="iso690.data">
-            <xsl:with-param name="sep" select="$location.sep"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="iso690.location">
-  <xsl:param name="location.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'location.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:choose>
-    <xsl:when test="./volumenum and not(./issuenum) and not(./pagenums)">
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum">
-        <xsl:with-param name="sep" select="$location.sep"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:when test="./issuenum and not(./pagenums)">
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum"/>
-      <xsl:apply-templates mode="iso690.mode" select="./issuenum">
-        <xsl:with-param name="sep" select="$location.sep"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:when test="./pagenums">
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum"/>
-      <xsl:apply-templates mode="iso690.mode" select="./issuenum"/>
-      <xsl:apply-templates mode="iso690.mode" select="./pagenums"/>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="bibliomisc[@role='secnum']|bibliomisc[@role='sectitle']" mode="iso690.mode">
-  <xsl:param name="sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'locs.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:apply-templates mode="iso690.mode"/>
-  <xsl:call-template name="iso690.endsep">
-    <xsl:with-param name="text" select="string(.)"/>
-    <xsl:with-param name="sep" select="$sep"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="volumenum|issuenum" mode="iso690.mode">
-  <xsl:param name="sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'locs.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:apply-templates mode="iso690.mode"/>
-  <xsl:call-template name="iso690.endsep">
-    <xsl:with-param name="text" select="string(.)"/>
-    <xsl:with-param name="sep" select="$sep"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="pagenums" mode="iso690.mode">
-  <xsl:param name="sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'location.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:apply-templates mode="iso690.mode"/>
-  <xsl:call-template name="iso690.endsep">
-    <xsl:with-param name="text" select="string(.)"/>
-    <xsl:with-param name="sep" select="$sep"/>
-  </xsl:call-template>
-</xsl:template>
-
-<!-- Series -->
-<xsl:template name="iso690.serie">
-  <xsl:apply-templates mode="iso690.mode" select=".//bibliomisc[@role='serie']"/>
-</xsl:template>
-
-<!-- Notes -->
-<xsl:template name="iso690.notice">
-  <xsl:apply-templates mode="iso690.mode" select=".//bibliomisc[not(@role)]"/>
-</xsl:template>
-
-<xsl:template match="bibliomisc[not(@role)]|bibliomisc[@role='serie']" mode="iso690.mode">
-  <xsl:param name="notice.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'notice.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:apply-templates mode="iso690.mode"/>
-  <xsl:call-template name="iso690.endsep">
-    <xsl:with-param name="text" select="string(.)"/>
-    <xsl:with-param name="sep" select="$notice.sep"/>
-  </xsl:call-template>
-</xsl:template>
-
-<!-- Avaibility and access -->
-<xsl:template name="iso690.access">
-  <xsl:for-each select="./biblioid[@class='uri']|./bibliomisc[@role='access']">
-    <xsl:choose>
-      <xsl:when test="position()=1">
-        <xsl:apply-templates mode="iso690.mode" select="."/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:apply-templates mode="iso690.mode" select=".">
-          <xsl:with-param name="firstacc" select="0"/>
-        </xsl:apply-templates>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:for-each>
-</xsl:template>
-
-<xsl:template match="biblioid[@class='uri']/ulink|bibliomisc[@role='access']/ulink" mode="iso690.mode">
-  <xsl:param name="link1">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'link1'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="link2">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'link2'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:value-of select="$link1"/>
-  <xsl:call-template name="ulink"/>
-  <xsl:value-of select="$link2"/>
-</xsl:template>
-
-<xsl:template match="biblioid[@class='uri']|bibliomisc[@role='access']" mode="iso690.mode">
-  <xsl:param name="firstacc" select="1"/>
-  <xsl:param name="access">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'access'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="acctoo">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'acctoo'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="onwww">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'onwww'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="oninet">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'oninet'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="access.end">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'access.end'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="access.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'access.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:choose>
-    <xsl:when test="$firstacc=1">
-      <xsl:value-of select="$access"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$acctoo"/>
-    </xsl:otherwise>
-  </xsl:choose>
-  <xsl:choose>
-    <xsl:when test="(./ulink)and(string(./ulink)=string(.))">
-      <xsl:choose>
-        <xsl:when test="(starts-with(./ulink/@url,'http://')or(starts-with(./ulink/@url,'https://')))">
-          <xsl:value-of select="$onwww"/>
-          <xsl:value-of select="$access.end"/>
-          <xsl:apply-templates mode="iso690.mode" select="./ulink"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="$oninet"/>
-          <xsl:value-of select="$access.end"/>
-          <xsl:apply-templates mode="iso690.mode" select="./ulink"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:when test="(./ulink)and(string(./ulink)!=string(.))">
-      <xsl:value-of select="text()[1]"/>
-      <xsl:call-template name="iso690.endsep">
-        <xsl:with-param name="text" select="text()[1]"/>
-        <xsl:with-param name="sep" select="$access.end"/>
-      </xsl:call-template>
-      <xsl:apply-templates mode="iso690.mode" select="./ulink"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates mode="iso690.mode"/>
-    </xsl:otherwise>
-  </xsl:choose>
-  <xsl:value-of select="$access.sep"/>
-</xsl:template>
-
-<!-- Standard number - ISBN -->
-<xsl:template name="iso690.isbn">
-  <xsl:choose>
-    <xsl:when test="./biblioid/@class='isbn'">
-      <xsl:apply-templates mode="iso690.mode" select="./biblioid[@class='isbn']"/>
-    </xsl:when>
-    <xsl:when test="./isbn">
-      <xsl:apply-templates mode="iso690.mode" select="./isbn"/>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="isbn|biblioid[@class='isbn']" mode="iso690.mode">
-  <xsl:param name="isbn">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'isbn'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="stdnum.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'stdnum.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:value-of select="$isbn"/>
-  <xsl:apply-templates mode="iso690.mode"/>
-  <xsl:value-of select="$stdnum.sep"/>
-</xsl:template>
-
-<!-- Standard number - ISSN -->
-<xsl:template name="iso690.issn">
-  <xsl:choose>
-    <xsl:when test="./biblioid/@class='issn'">
-      <xsl:apply-templates mode="iso690.mode" select="./biblioid[@class='issn']"/>
-    </xsl:when>
-    <xsl:when test="./issn">
-      <xsl:apply-templates mode="iso690.mode" select="./issn"/>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="issn|biblioid[@class='issn']" mode="iso690.mode">
-  <xsl:param name="issn">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issn'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:param name="stdnum.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'stdnum.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:value-of select="$issn"/>
-  <xsl:apply-templates mode="iso690.mode"/>
-  <xsl:value-of select="$stdnum.sep"/>
-</xsl:template>
-
-<!-- Identification of patent document -->
-<xsl:template name="iso690.pat.ident">
-  <xsl:param name="patdate.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'patdate.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:apply-templates mode="iso690.mode" select="./address/country"/>
-  <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='patenttype']"/>
-  <xsl:choose>
-    <xsl:when test="./biblioid[@class='other' and @otherclass='patentnum']">
-      <xsl:apply-templates mode="iso690.mode" select="./biblioid[@class='other' and @otherclass='patentnum']"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='patentnum']"/>
-    </xsl:otherwise>
-  </xsl:choose>
-  <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]">
-    <xsl:with-param name="sep" select="$patdate.sep"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<!-- Country or issuing office -->
-<xsl:template match="address/country" mode="iso690.mode">
-  <xsl:param name="patcountry.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'patcountry.sep'"/></xsl:call-template>
-  </xsl:param>
-  <i>
-    <xsl:apply-templates mode="iso690.mode"/>
-  </i>
-  <xsl:value-of select="$patcountry.sep"/>
-</xsl:template>
-
-<!-- Kind of patent document -->
-<xsl:template match="bibliomisc[@role='patenttype']" mode="iso690.mode">
-  <xsl:param name="pattype.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'pattype.sep'"/></xsl:call-template>
-  </xsl:param>
-  <i>
-    <xsl:apply-templates mode="iso690.mode"/>
-  </i>
-  <xsl:value-of select="$pattype.sep"/>
-</xsl:template>
-
-<!-- Number -->
-<xsl:template match="biblioid[@class='other' and @otherclass='patentnum']|bibliomisc[@role='patentnum']" mode="iso690.mode">
-  <xsl:param name="patnum.sep">
-    <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'patnum.sep'"/></xsl:call-template>
-  </xsl:param>
-  <xsl:apply-templates mode="iso690.mode"/>
-  <xsl:value-of select="$patnum.sep"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-<!-- Supplementary templates -->
-
-<xsl:template name="iso690.endsep">
-  <xsl:param name="text"/>
-  <xsl:param name="sep" select=". "/>
-  <xsl:choose>
-    <xsl:when test="substring($text,string-length($text))!=substring($sep,1,1)">
-      <xsl:value-of select="$sep"/>
-    </xsl:when>
-    <xsl:when test="substring($text,string-length($text))=' '">
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="' '"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="*" mode="iso690.mode">
-  <xsl:apply-templates select="."/><!-- try the default mode -->
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/biblio.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/biblio.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,1217 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:template match="bibliography">
-  <xsl:call-template name="id.warning"/>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:if test="$generate.id.attributes != 0">
-      <xsl:attribute name="id">
-        <xsl:call-template name="object.id"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:call-template name="bibliography.titlepage"/>
-
-    <xsl:apply-templates/>
-
-    <xsl:if test="not(parent::article)">
-      <xsl:call-template name="process.footnotes"/>
-    </xsl:if>
-  </div>
-</xsl:template>
-
-<xsl:template match="bibliography/bibliographyinfo"/>
-<xsl:template match="bibliography/info"/>
-<xsl:template match="bibliography/title"/>
-<xsl:template match="bibliography/subtitle"/>
-<xsl:template match="bibliography/titleabbrev"/>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="bibliodiv">
-  <xsl:call-template name="id.warning"/>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates/>
-  </div>
-</xsl:template>
-
-<xsl:template match="bibliodiv/title">
-  <h3>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="anchor">
-      <xsl:with-param name="node" select=".."/>
-    </xsl:call-template>
-    <xsl:apply-templates/>
-  </h3>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="bibliolist">
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="anchor"/>
-    <xsl:if test="blockinfo/title|info/title|title">
-      <xsl:call-template name="formal.object.heading"/>
-    </xsl:if>
-    <xsl:apply-templates select="*[not(self::blockinfo)                                    and not(self::info)                                    and not(self::title)                                    and not(self::titleabbrev)                                    and not(self::biblioentry)                                    and not(self::bibliomixed)]"/>
-    <xsl:apply-templates select="biblioentry|bibliomixed"/>
-  </div>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="biblioentry">
-  <xsl:param name="label">
-    <xsl:call-template name="biblioentry.label"/>
-  </xsl:param>
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="string(.) = ''">
-      <xsl:variable name="bib" select="document($bibliography.collection,.)"/>
-      <xsl:variable name="entry" select="$bib/bibliography/                                          *[@id=$id or @xml:id=$id][1]"/>
-      <xsl:choose>
-        <xsl:when test="$entry">
-          <xsl:choose>
-            <xsl:when test="$bibliography.numbered != 0">
-              <xsl:apply-templates select="$entry">
-                <xsl:with-param name="label" select="$label"/>
-              </xsl:apply-templates>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:apply-templates select="$entry"/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:message>
-            <xsl:text>No bibliography entry: </xsl:text>
-            <xsl:value-of select="$id"/>
-            <xsl:text> found in </xsl:text>
-            <xsl:value-of select="$bibliography.collection"/>
-          </xsl:message>
-          <div>
-            <xsl:apply-templates select="." mode="class.attribute"/>
-            <xsl:call-template name="anchor"/>
-            <p>
-              <xsl:copy-of select="$label"/>
-              <xsl:text>Error: no bibliography entry: </xsl:text>
-              <xsl:value-of select="$id"/>
-              <xsl:text> found in </xsl:text>
-              <xsl:value-of select="$bibliography.collection"/>
-            </p>
-          </div>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <div>
-        <xsl:apply-templates select="." mode="class.attribute"/>
-        <xsl:call-template name="anchor">
-          <xsl:with-param name="conditional" select="0"/>
-        </xsl:call-template>
-        <p>
-          <xsl:copy-of select="$label"/>
-	  <xsl:choose>
-	    <xsl:when test="$bibliography.style = 'iso690'">
-	      <xsl:call-template name="iso690.makecitation"/>
-	    </xsl:when>
-	    <xsl:otherwise>
-	      <xsl:apply-templates mode="bibliography.mode"/>
-	    </xsl:otherwise>
-	  </xsl:choose>
-        </p>
-      </div>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="bibliomixed">
-  <xsl:param name="label">
-    <xsl:call-template name="biblioentry.label"/>
-  </xsl:param>
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="string(.) = ''">
-      <xsl:variable name="bib" select="document($bibliography.collection,.)"/>
-      <xsl:variable name="entry" select="$bib/bibliography/                                          *[@id=$id or @xml:id=$id][1]"/>
-      <xsl:choose>
-        <xsl:when test="$entry">
-          <xsl:choose>
-            <xsl:when test="$bibliography.numbered != 0">
-              <xsl:apply-templates select="$entry">
-                <xsl:with-param name="label" select="$label"/>
-              </xsl:apply-templates>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:apply-templates select="$entry"/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:message>
-            <xsl:text>No bibliography entry: </xsl:text>
-            <xsl:value-of select="$id"/>
-            <xsl:text> found in </xsl:text>
-            <xsl:value-of select="$bibliography.collection"/>
-          </xsl:message>
-          <div>
-            <xsl:apply-templates select="." mode="class.attribute"/>
-            <xsl:call-template name="anchor"/>
-            <p>
-              <xsl:copy-of select="$label"/>
-              <xsl:text>Error: no bibliography entry: </xsl:text>
-              <xsl:value-of select="$id"/>
-              <xsl:text> found in </xsl:text>
-              <xsl:value-of select="$bibliography.collection"/>
-            </p>
-          </div>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <div>
-        <xsl:apply-templates select="." mode="class.attribute"/>
-        <xsl:call-template name="anchor">
-          <xsl:with-param name="conditional" select="0"/>
-        </xsl:call-template>
-        <p>
-          <xsl:apply-templates select="." mode="class.attribute"/>
-          <xsl:copy-of select="$label"/>
-          <xsl:apply-templates mode="bibliomixed.mode"/>
-        </p>
-      </div>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="biblioentry.label">
-  <xsl:param name="node" select="."/>
-
-  <xsl:choose>
-    <xsl:when test="$bibliography.numbered != 0">
-      <xsl:text>[</xsl:text>
-      <xsl:number from="bibliography" count="biblioentry|bibliomixed" level="any" format="1"/>
-      <xsl:text>] </xsl:text>
-    </xsl:when>
-    <xsl:when test="local-name($node/child::*[1]) = 'abbrev'">
-      <xsl:text>[</xsl:text>
-      <xsl:apply-templates select="$node/abbrev[1]"/>
-      <xsl:text>] </xsl:text>
-    </xsl:when>
-    <xsl:when test="$node/@xreflabel">
-      <xsl:text>[</xsl:text>
-      <xsl:value-of select="$node/@xreflabel"/>
-      <xsl:text>] </xsl:text>
-    </xsl:when>
-    <xsl:when test="$node/@id">
-      <xsl:text>[</xsl:text>
-      <xsl:value-of select="$node/@id"/>
-      <xsl:text>] </xsl:text>
-    </xsl:when>
-    <xsl:when test="$node/@xml:id">
-      <xsl:text>[</xsl:text>
-      <xsl:value-of select="$node/@xml:id"/>
-      <xsl:text>] </xsl:text>
-    </xsl:when>
-    <xsl:otherwise><!-- nop --></xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="*" mode="bibliography.mode">
-  <xsl:apply-templates select="."/><!-- try the default mode -->
-</xsl:template>
-
-<xsl:template match="abbrev" mode="bibliography.mode">
-  <xsl:if test="preceding-sibling::*">
-    <xsl:apply-templates mode="bibliography.mode"/>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="abstract" mode="bibliography.mode">
-  <!-- suppressed -->
-</xsl:template>
-
-<xsl:template match="address" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="affiliation" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="shortaffil" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="jobtitle" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="artheader|articleinfo|info" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="artpagenums" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="author" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="person.name"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="authorblurb|personblurb" mode="bibliography.mode">
-  <!-- suppressed -->
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="person.name.list"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="authorinitials" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="bibliomisc" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="bibliomset" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<!-- ================================================== -->
-
-<xsl:template match="biblioset" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="biblioset/title|biblioset/citetitle" mode="bibliography.mode">
-  <xsl:variable name="relation" select="../@relation"/>
-  <xsl:choose>
-    <xsl:when test="$relation='article' or @pubwork='article'">
-      <xsl:call-template name="gentext.startquote"/>
-      <xsl:apply-templates/>
-      <xsl:call-template name="gentext.endquote"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <i><xsl:apply-templates/></i>
-    </xsl:otherwise>
-  </xsl:choose>
-  <xsl:copy-of select="$biblioentry.item.separator"/>
-</xsl:template>
-
-<!-- ================================================== -->
-
-<xsl:template match="bookbiblio" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="citetitle" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:choose>
-      <xsl:when test="@pubwork = 'article'">
-        <xsl:call-template name="gentext.startquote"/>
-        <xsl:call-template name="inline.charseq"/>
-        <xsl:call-template name="gentext.endquote"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="inline.italicseq"/>
-      </xsl:otherwise>
-    </xsl:choose>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="collab" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="collabname" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="confgroup" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="confdates" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="conftitle" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="confnum" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="confsponsor" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="contractnum" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="contractsponsor" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="contrib" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<!-- ================================================== -->
-
-<xsl:template match="copyright" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="gentext">
-      <xsl:with-param name="key" select="'Copyright'"/>
-    </xsl:call-template>
-    <xsl:call-template name="gentext.space"/>
-    <xsl:call-template name="dingbat">
-      <xsl:with-param name="dingbat">copyright</xsl:with-param>
-    </xsl:call-template>
-    <xsl:call-template name="gentext.space"/>
-    <xsl:apply-templates select="year" mode="bibliography.mode"/>
-    <xsl:if test="holder">
-      <xsl:call-template name="gentext.space"/>
-      <xsl:apply-templates select="holder" mode="bibliography.mode"/>
-    </xsl:if>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="year" mode="bibliography.mode">
-  <xsl:apply-templates/><xsl:text>, </xsl:text>
-</xsl:template>
-
-<xsl:template match="year[position()=last()]" mode="bibliography.mode">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="holder" mode="bibliography.mode">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<!-- ================================================== -->
-
-<xsl:template match="corpauthor" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="corpcredit" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="corpname" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="date" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="edition" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="editor" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="person.name"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="firstname" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="honorific" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="indexterm" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="invpartnumber" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="isbn" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="issn" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="issuenum" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="lineage" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="orgname" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="orgdiv" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="othername" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="pagenums" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="printhistory" mode="bibliography.mode">
-  <!-- suppressed -->
-</xsl:template>
-
-<xsl:template match="productname" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="productnumber" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="publisher" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="publishername" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="pubsnumber" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="bibliography.mode">
-  <!-- suppressed; how could this be represented? -->
-</xsl:template>
-
-<xsl:template match="seriesinfo" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="seriesvolnums" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="surname" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="title" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <i><xsl:apply-templates mode="bibliography.mode"/></i>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="titleabbrev" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="volumenum" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="bibliocoverage|biblioid|bibliorelation|bibliosource" mode="bibliography.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliography.mode"/>
-    <xsl:copy-of select="$biblioentry.item.separator"/>
-  </span>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="*" mode="bibliomixed.mode">
-  <xsl:apply-templates select="."/><!-- try the default mode -->
-</xsl:template>
-
-<xsl:template match="abbrev" mode="bibliomixed.mode">
-  <xsl:if test="preceding-sibling::*">
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="abstract" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="address" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="affiliation" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="shortaffil" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="jobtitle" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="artpagenums" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="author" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="authorblurb|personblurb" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="authorinitials" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="bibliomisc" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<!-- ================================================== -->
-
-<xsl:template match="bibliomset" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="bibliomset/title|bibliomset/citetitle" mode="bibliomixed.mode">
-  <xsl:variable name="relation" select="../@relation"/>
-  <xsl:choose>
-    <xsl:when test="$relation='article' or @pubwork='article'">
-      <xsl:call-template name="gentext.startquote"/>
-      <xsl:apply-templates/>
-      <xsl:call-template name="gentext.endquote"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <i><xsl:apply-templates/></i>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ================================================== -->
-
-<xsl:template match="biblioset" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="citetitle" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:choose>
-      <xsl:when test="@pubwork = 'article'">
-        <xsl:call-template name="gentext.startquote"/>
-        <xsl:call-template name="inline.charseq"/>
-        <xsl:call-template name="gentext.endquote"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="inline.italicseq"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </span>
-</xsl:template>
-
-
-<xsl:template match="collab" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="confgroup" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="contractnum" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="contractsponsor" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="contrib" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="copyright" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="corpcredit" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="corpname" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="date" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="edition" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="editor" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="firstname" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="honorific" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="indexterm" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="invpartnumber" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="isbn" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="issn" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="issuenum" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="lineage" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="orgname" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="othername" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="pagenums" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="printhistory" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="productname" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="productnumber" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="publisher" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="publishername" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="pubsnumber" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="bibliomixed.mode">
-  <!-- suppressed; how could this be represented? -->
-</xsl:template>
-
-<xsl:template match="seriesvolnums" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="surname" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="title" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="titleabbrev" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="volumenum" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="bibliocoverage|biblioid|bibliorelation|bibliosource" mode="bibliomixed.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="bibliomixed.mode"/>
-  </span>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/block.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/block.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,432 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-<!-- What should we do about styling blockinfo? -->
-
-<xsl:template match="blockinfo|info">
-  <!-- suppress -->
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="block.object">
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="anchor"/>
-    <xsl:apply-templates/>
-  </div>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="para">
-  <xsl:call-template name="paragraph">
-    <xsl:with-param name="class">
-      <xsl:if test="@role and $para.propagates.style != 0">
-        <xsl:value-of select="@role"/>
-      </xsl:if>
-    </xsl:with-param>
-    <xsl:with-param name="content">
-      <xsl:if test="position() = 1 and parent::listitem">
-        <xsl:call-template name="anchor">
-          <xsl:with-param name="node" select="parent::listitem"/>
-        </xsl:call-template>
-      </xsl:if>
-
-      <xsl:call-template name="anchor"/>
-      <xsl:apply-templates/>
-    </xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="paragraph">
-  <xsl:param name="class" select="''"/>
-  <xsl:param name="content"/>
-
-  <xsl:variable name="p">
-    <p>
-      <xsl:call-template name="dir"/>
-      <xsl:if test="$class != ''">
-        <xsl:apply-templates select="." mode="class.attribute">
-          <xsl:with-param name="class" select="$class"/>
-        </xsl:apply-templates>
-      </xsl:if>
-      <xsl:copy-of select="$content"/>
-    </p>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$html.cleanup != 0">
-      <xsl:call-template name="unwrap.p">
-        <xsl:with-param name="p" select="$p"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy-of select="$p"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="simpara">
-  <!-- see also listitem/simpara in lists.xsl -->
-  <p>
-    <xsl:if test="@role and $para.propagates.style != 0">
-      <xsl:apply-templates select="." mode="class.attribute">
-        <xsl:with-param name="class" select="@role"/>
-      </xsl:apply-templates>
-    </xsl:if>
-
-    <xsl:call-template name="anchor"/>
-    <xsl:apply-templates/>
-  </p>
-</xsl:template>
-
-<xsl:template match="formalpara">
-  <xsl:call-template name="paragraph">
-    <xsl:with-param name="class">
-      <xsl:if test="@role and $para.propagates.style != 0">
-        <xsl:value-of select="@role"/>
-      </xsl:if>
-    </xsl:with-param>
-    <xsl:with-param name="content">
-      <xsl:call-template name="anchor"/>
-      <xsl:apply-templates/>
-    </xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<!-- Only use title from info -->
-<xsl:template match="formalpara/info">
-  <xsl:apply-templates select="title"/>
-</xsl:template>
-
-<xsl:template match="formalpara/title|formalpara/info/title">
-  <xsl:variable name="titleStr">
-      <xsl:apply-templates/>
-  </xsl:variable>
-  <xsl:variable name="lastChar">
-    <xsl:if test="$titleStr != ''">
-      <xsl:value-of select="substring($titleStr,string-length($titleStr),1)"/>
-    </xsl:if>
-  </xsl:variable>
-
-  <b>
-    <xsl:copy-of select="$titleStr"/>
-    <xsl:if test="$lastChar != ''                   and not(contains($runinhead.title.end.punct, $lastChar))">
-      <xsl:value-of select="$runinhead.default.title.end.punct"/>
-    </xsl:if>
-    <xsl:text>&#160;</xsl:text>
-  </b>
-</xsl:template>
-
-<xsl:template match="formalpara/para">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="blockquote">
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:if test="@lang or @xml:lang">
-      <xsl:call-template name="language.attribute"/>
-    </xsl:if>
-    <xsl:call-template name="anchor"/>
-
-    <xsl:choose>
-      <xsl:when test="attribution">
-        <table border="0" width="100%" cellspacing="0" cellpadding="0" class="blockquote" summary="Block quote">
-          <tr>
-            <td width="10%" valign="top">&#160;</td>
-            <td width="80%" valign="top">
-              <xsl:apply-templates select="child::*[local-name(.)!='attribution']"/>
-            </td>
-            <td width="10%" valign="top">&#160;</td>
-          </tr>
-          <tr>
-            <td width="10%" valign="top">&#160;</td>
-            <td colspan="2" align="right" valign="top">
-              <xsl:text>--</xsl:text>
-              <xsl:apply-templates select="attribution"/>
-            </td>
-          </tr>
-        </table>
-      </xsl:when>
-      <xsl:otherwise>
-        <blockquote>
-          <xsl:apply-templates select="." mode="class.attribute"/>
-          <xsl:apply-templates/>
-        </blockquote>
-      </xsl:otherwise>
-    </xsl:choose>
-  </div>
-</xsl:template>
-
-<xsl:template match="blockquote/title|blockquote/info/title">
-  <div class="blockquote-title">
-    <p>
-      <b>
-        <xsl:apply-templates/>
-      </b>
-    </p>
-  </div>
-</xsl:template>
-
-<xsl:template match="epigraph">
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-      <xsl:apply-templates select="para|simpara|formalpara|literallayout"/>
-      <xsl:if test="attribution">
-        <div class="attribution">
-          <span>--<xsl:apply-templates select="attribution"/></span>
-        </div>
-      </xsl:if>
-  </div>
-</xsl:template>
-
-<xsl:template match="attribution">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates/>
-  </span>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="abstract|sidebar">
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="anchor"/>
-    <xsl:call-template name="formal.object.heading">
-      <xsl:with-param name="title">
-        <xsl:apply-templates select="." mode="title.markup">
-          <xsl:with-param name="allow-anchors" select="'1'"/>
-        </xsl:apply-templates>
-      </xsl:with-param>
-    </xsl:call-template>
-    <xsl:apply-templates/>
-  </div>
-</xsl:template>
-
-<xsl:template match="abstract/title|sidebar/title">
-</xsl:template>
-
-<xsl:template match="sidebar/sidebarinfo|sidebar/info"/>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="msgset">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="msgentry">
-  <xsl:call-template name="block.object"/>
-</xsl:template>
-
-<xsl:template match="simplemsgentry">
-  <xsl:call-template name="block.object"/>
-</xsl:template>
-
-<xsl:template match="msg">
-  <xsl:call-template name="block.object"/>
-</xsl:template>
-
-<xsl:template match="msgmain">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="msgmain/title">
-  <b><xsl:apply-templates/></b>
-</xsl:template>
-
-<xsl:template match="msgsub">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="msgsub/title">
-  <b><xsl:apply-templates/></b>
-</xsl:template>
-
-<xsl:template match="msgrel">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="msgrel/title">
-  <b><xsl:apply-templates/></b>
-</xsl:template>
-
-<xsl:template match="msgtext">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="msginfo">
-  <xsl:call-template name="block.object"/>
-</xsl:template>
-
-<xsl:template match="msglevel">
-  <p>
-    <b>
-      <xsl:call-template name="gentext.template">
-        <xsl:with-param name="context" select="'msgset'"/>
-        <xsl:with-param name="name" select="'MsgLevel'"/>
-      </xsl:call-template>
-    </b>
-    <xsl:apply-templates/>
-  </p>
-</xsl:template>
-
-<xsl:template match="msgorig">
-  <p>
-    <b>
-      <xsl:call-template name="gentext.template">
-        <xsl:with-param name="context" select="'msgset'"/>
-        <xsl:with-param name="name" select="'MsgOrig'"/>
-      </xsl:call-template>
-    </b>
-    <xsl:apply-templates/>
-  </p>
-</xsl:template>
-
-<xsl:template match="msgaud">
-  <p>
-    <b>
-      <xsl:call-template name="gentext.template">
-        <xsl:with-param name="context" select="'msgset'"/>
-        <xsl:with-param name="name" select="'MsgAud'"/>
-      </xsl:call-template>
-    </b>
-    <xsl:apply-templates/>
-  </p>
-</xsl:template>
-
-<xsl:template match="msgexplan">
-  <xsl:call-template name="block.object"/>
-</xsl:template>
-
-<xsl:template match="msgexplan/title">
-  <p><b><xsl:apply-templates/></b></p>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="revhistory">
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <table border="0" width="100%" summary="Revision history">
-      <tr>
-        <th align="left" valign="top" colspan="3">
-          <b>
-            <xsl:call-template name="gentext">
-              <xsl:with-param name="key" select="'RevHistory'"/>
-            </xsl:call-template>
-          </b>
-        </th>
-      </tr>
-      <xsl:apply-templates/>
-    </table>
-  </div>
-</xsl:template>
-
-<xsl:template match="revhistory/revision">
-  <xsl:variable name="revnumber" select="revnumber"/>
-  <xsl:variable name="revdate" select="date"/>
-  <xsl:variable name="revauthor" select="authorinitials|author"/>
-  <xsl:variable name="revremark" select="revremark|revdescription"/>
-  <tr>
-    <td align="left">
-      <xsl:if test="$revnumber">
-        <xsl:call-template name="gentext">
-          <xsl:with-param name="key" select="'Revision'"/>
-        </xsl:call-template>
-        <xsl:call-template name="gentext.space"/>
-        <xsl:apply-templates select="$revnumber"/>
-      </xsl:if>
-    </td>
-    <td align="left">
-      <xsl:apply-templates select="$revdate"/>
-    </td>
-    <xsl:choose>
-      <xsl:when test="count($revauthor)=0">
-        <td align="left">
-          <xsl:call-template name="dingbat">
-            <xsl:with-param name="dingbat">nbsp</xsl:with-param>
-          </xsl:call-template>
-        </td>
-      </xsl:when>
-      <xsl:otherwise>
-        <td align="left">
-          <xsl:for-each select="$revauthor">
-            <xsl:apply-templates select="."/>
-            <xsl:if test="position() != last()">
-              <xsl:text>, </xsl:text>
-            </xsl:if>
-          </xsl:for-each>
-        </td>
-      </xsl:otherwise>
-    </xsl:choose>
-  </tr>
-  <xsl:if test="$revremark">
-    <tr>
-      <td align="left" colspan="3">
-        <xsl:apply-templates select="$revremark"/>
-      </td>
-    </tr>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="revision/revnumber">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="revision/date">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="revision/authorinitials">
-  <xsl:text>, </xsl:text>
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="revision/authorinitials[1]" priority="2">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="revision/revremark">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="revision/revdescription">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="ackno">
-  <p>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates/>
-  </p>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="highlights">
-  <xsl:call-template name="block.object"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/callout.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/callout.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,188 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sverb="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Verbatim" xmlns:xverb="xalan://com.nwalsh.xalan.Verbatim" xmlns:lxslt="http://xml.apache.org/xslt" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="sverb xverb lxslt" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<lxslt:component prefix="xverb" functions="insertCallouts"/>
-
-<xsl:template match="programlistingco|screenco">
-  <xsl:variable name="verbatim" select="programlisting|screen"/>
-
-  <xsl:choose>
-    <xsl:when test="$use.extensions != '0'                     and $callouts.extension != '0'">
-      <xsl:variable name="rtf">
-        <xsl:apply-templates select="$verbatim">
-          <xsl:with-param name="suppress-numbers" select="'1'"/>
-        </xsl:apply-templates>
-      </xsl:variable>
-
-      <xsl:variable name="rtf-with-callouts">
-        <xsl:choose>
-          <xsl:when test="function-available('sverb:insertCallouts')">
-            <xsl:copy-of select="sverb:insertCallouts(areaspec,$rtf)"/>
-          </xsl:when>
-          <xsl:when test="function-available('xverb:insertCallouts')">
-            <xsl:copy-of select="xverb:insertCallouts(areaspec,$rtf)"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:message terminate="yes">
-              <xsl:text>No insertCallouts function is available.</xsl:text>
-            </xsl:message>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:variable>
-
-      <xsl:choose>
-        <xsl:when test="$verbatim/@linenumbering = 'numbered'                         and $linenumbering.extension != '0'">
-          <div>
-            <xsl:apply-templates select="." mode="class.attribute"/>
-            <xsl:call-template name="number.rtf.lines">
-              <xsl:with-param name="rtf" select="$rtf-with-callouts"/>
-              <xsl:with-param name="pi.context" select="programlisting|screen"/>
-            </xsl:call-template>
-            <xsl:apply-templates select="calloutlist"/>
-          </div>
-        </xsl:when>
-        <xsl:otherwise>
-          <div>
-            <xsl:apply-templates select="." mode="class.attribute"/>
-            <xsl:copy-of select="$rtf-with-callouts"/>
-            <xsl:apply-templates select="calloutlist"/>
-          </div>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <div>
-        <xsl:apply-templates select="." mode="class.attribute"/>
-        <xsl:apply-templates/>
-      </div>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="areaspec|areaset|area">
-</xsl:template>
-
-<xsl:template match="areaset" mode="conumber">
-  <xsl:number count="area|areaset" format="1"/>
-</xsl:template>
-
-<xsl:template match="area" mode="conumber">
-  <xsl:number count="area|areaset" format="1"/>
-</xsl:template>
-
-<xsl:template match="co" name="co">
-  <!-- Support a single linkend in HTML -->
-  <xsl:variable name="targets" select="key('id', @linkends)"/>
-  <xsl:variable name="target" select="$targets[1]"/>
-  <xsl:choose>
-    <xsl:when test="$target">
-      <a>
-        <xsl:apply-templates select="." mode="class.attribute"/>
-        <xsl:if test="@id or @xml:id">
-          <xsl:attribute name="id">
-            <xsl:value-of select="(@id|@xml:id)[1]"/>
-          </xsl:attribute>
-        </xsl:if>
-        <xsl:attribute name="href">
-          <xsl:call-template name="href.target">
-            <xsl:with-param name="object" select="$target"/>
-          </xsl:call-template>
-        </xsl:attribute>
-        <xsl:apply-templates select="." mode="callout-bug"/>
-      </a>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="anchor"/>
-      <xsl:apply-templates select="." mode="callout-bug"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="coref">
-  <!-- tricky; this relies on the fact that we can process the "co" that's -->
-  <!-- "over there" as if it were "right here" -->
-
-  <xsl:variable name="co" select="key('id', @linkend)"/>
-  <xsl:choose>
-    <xsl:when test="not($co)">
-      <xsl:message>
-        <xsl:text>Error: coref link is broken: </xsl:text>
-        <xsl:value-of select="@linkend"/>
-      </xsl:message>
-    </xsl:when>
-    <xsl:when test="local-name($co) != 'co'">
-      <xsl:message>
-        <xsl:text>Error: coref doesn't point to a co: </xsl:text>
-        <xsl:value-of select="@linkend"/>
-      </xsl:message>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates select="$co"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="co" mode="callout-bug">
-  <xsl:call-template name="callout-bug">
-    <xsl:with-param name="conum">
-      <xsl:number count="co" level="any" from="programlisting|screen|literallayout|synopsis" format="1"/>
-    </xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="callout-bug">
-  <xsl:param name="conum" select="1"/>
-
-  <xsl:choose>
-    <xsl:when test="$callout.graphics != 0                     and $conum &lt;= $callout.graphics.number.limit">
-      <img src="{$callout.graphics.path}{$conum}{$callout.graphics.extension}" alt="{$conum}" border="0"/>
-    </xsl:when>
-    <xsl:when test="$callout.unicode != 0                     and $conum &lt;= $callout.unicode.number.limit">
-      <xsl:choose>
-        <xsl:when test="$callout.unicode.start.character = 10102">
-          <xsl:choose>
-            <xsl:when test="$conum = 1">&#10102;</xsl:when>
-            <xsl:when test="$conum = 2">&#10103;</xsl:when>
-            <xsl:when test="$conum = 3">&#10104;</xsl:when>
-            <xsl:when test="$conum = 4">&#10105;</xsl:when>
-            <xsl:when test="$conum = 5">&#10106;</xsl:when>
-            <xsl:when test="$conum = 6">&#10107;</xsl:when>
-            <xsl:when test="$conum = 7">&#10108;</xsl:when>
-            <xsl:when test="$conum = 8">&#10109;</xsl:when>
-            <xsl:when test="$conum = 9">&#10110;</xsl:when>
-            <xsl:when test="$conum = 10">&#10111;</xsl:when>
-          </xsl:choose>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:message>
-            <xsl:text>Don't know how to generate Unicode callouts </xsl:text>
-            <xsl:text>when $callout.unicode.start.character is </xsl:text>
-            <xsl:value-of select="$callout.unicode.start.character"/>
-          </xsl:message>
-          <xsl:text>(</xsl:text>
-          <xsl:value-of select="$conum"/>
-          <xsl:text>)</xsl:text>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:text>(</xsl:text>
-      <xsl:value-of select="$conum"/>
-      <xsl:text>)</xsl:text>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/changebars.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/changebars.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,72 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-<xsl:import href="docbook.xsl"/>
-
-<xsl:param name="show.revisionflag" select="'1'"/>
-
-<xsl:template name="system.head.content">
-<xsl:param name="node" select="."/>
-
-<style type="text/css">
-<xsl:text>
-div.added    { background-color: #ffff99; 
-               text-decoration: underline; }
-div.deleted  { text-decoration: line-through;
-               background-color: #FF7F7F; }
-div.changed  { background-color: #99ff99; }
-div.off      {  }
-
-span.added   { background-color: #ffff99; 
-               text-decoration: underline; }
-span.deleted { text-decoration: line-through;
-               background-color: #FF7F7F; }
-span.changed { background-color: #99ff99; }
-span.off     {  }
-</xsl:text>
-</style>
-</xsl:template>
-
-<xsl:template match="*[@revisionflag]">
-  <xsl:choose>
-    <xsl:when test="local-name(.) = 'para'                     or local-name(.) = 'simpara'                     or local-name(.) = 'formalpara'                     or local-name(.) = 'section'                     or local-name(.) = 'sect1'                     or local-name(.) = 'sect2'                     or local-name(.) = 'sect3'                     or local-name(.) = 'sect4'                     or local-name(.) = 'sect5'                     or local-name(.) = 'chapter'                     or local-name(.) = 'preface'                     or local-name(.) = 'itemizedlist'                     or local-name(.) = 'varlistentry'                     or local-name(.) = 'glossary'                     or local-name(.) = 'bibliography'                     or local-name(.) = 'index'                     or local-name(.) = 'appendix'">
-      <div class="{@revisionflag}">
-	<xsl:apply-imports/>
-      </div>
-    </xsl:when>
-    <xsl:when test="local-name(.) = 'phrase'                     or local-name(.) = 'ulink'                     or local-name(.) = 'link'                     or local-name(.) = 'filename'                     or local-name(.) = 'literal'                     or local-name(.) = 'member'                     or local-name(.) = 'glossterm'                     or local-name(.) = 'sgmltag'                     or local-name(.) = 'quote'                     or local-name(.) = 'emphasis'                     or local-name(.) = 'command'                     or local-name(.) = 'xref'">
-      <span class="{@revisionflag}">
-	<xsl:apply-imports/>
-      </span>
-    </xsl:when>
-    <xsl:when test="local-name(.) = 'listitem'                     or local-name(.) = 'entry'                     or local-name(.) = 'title'">
-      <!-- nop; these are handled directly in the stylesheet -->
-      <xsl:apply-imports/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:message>
-	<xsl:text>Revisionflag on unexpected element: </xsl:text>
-	<xsl:value-of select="local-name(.)"/>
-	<xsl:text> (Assuming block)</xsl:text>
-      </xsl:message>
-      <div class="{@revisionflag}">
-	<xsl:apply-imports/>
-      </div>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/chunk-code.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/chunk-code.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,639 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:cf="http://docbook.sourceforge.net/xmlns/chunkfast/1.0" xmlns:ng="http://docbook.org/docbook-ng" xmlns:db="http://docbook.org/ns/docbook" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="exsl cf ng db" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-
-<xsl:template match="*" mode="chunk-filename">
-  <!-- returns the filename of a chunk -->
-  <xsl:variable name="ischunk">
-    <xsl:call-template name="chunk"/>
-  </xsl:variable>
-
-  <xsl:variable name="fn">
-    <xsl:apply-templates select="." mode="recursive-chunk-filename"/>
-  </xsl:variable>
-
-  <!--
-  <xsl:message>
-    <xsl:value-of select="$ischunk"/>
-    <xsl:text> (</xsl:text>
-    <xsl:value-of select="local-name(.)"/>
-    <xsl:text>) </xsl:text>
-    <xsl:value-of select="$fn"/>
-    <xsl:text>, </xsl:text>
-    <xsl:call-template name="dbhtml-dir"/>
-  </xsl:message>
-  -->
-
-  <!-- 2003-11-25 by ndw:
-       The following test used to read test="$ischunk != 0 and $fn != ''"
-       I've removed the ischunk part of the test so that href.to.uri and
-       href.from.uri will be fully qualified even if the source or target
-       isn't a chunk. I *think* that if $fn != '' then it's appropriate
-       to put the directory on the front, even if the element isn't a
-       chunk. I could be wrong. -->
-
-  <xsl:if test="$fn != ''">
-    <xsl:call-template name="dbhtml-dir"/>
-  </xsl:if>
-
-  <xsl:value-of select="$fn"/>
-  <!-- You can't add the html.ext here because dbhtml filename= may already -->
-  <!-- have added it. It really does have to be handled in the recursive template -->
-</xsl:template>
-
-<xsl:template match="*" mode="recursive-chunk-filename">
-  <xsl:param name="recursive" select="false()"/>
-
-  <!-- returns the filename of a chunk -->
-  <xsl:variable name="ischunk">
-    <xsl:call-template name="chunk"/>
-  </xsl:variable>
-
-  <xsl:variable name="dbhtml-filename">
-    <xsl:call-template name="pi.dbhtml_filename"/>
-  </xsl:variable>
-
-  <xsl:variable name="filename">
-    <xsl:choose>
-      <xsl:when test="$dbhtml-filename != ''">
-        <xsl:value-of select="$dbhtml-filename"/>
-      </xsl:when>
-      <!-- if this is the root element, use the root.filename -->
-      <xsl:when test="not(parent::*) and $root.filename != ''">
-        <xsl:value-of select="$root.filename"/>
-        <xsl:value-of select="$html.ext"/>
-      </xsl:when>
-      <!-- Special case -->
-      <xsl:when test="self::legalnotice and not($generate.legalnotice.link = 0)">
-        <xsl:choose>
-          <xsl:when test="(@id or @xml:id) and not($use.id.as.filename = 0)">
-            <!-- * if this legalnotice has an ID, then go ahead and use -->
-            <!-- * just the value of that ID as the basename for the file -->
-            <!-- * (that is, without prepending an "ln-" too it) -->
-            <xsl:value-of select="(@id|@xml:id)[1]"/>
-            <xsl:value-of select="$html.ext"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <!-- * otherwise, if this legalnotice does not have an ID, -->
-            <!-- * then we generate an ID... -->
-            <xsl:variable name="id">
-              <xsl:call-template name="object.id"/>
-            </xsl:variable>
-            <!-- * ...and then we take that generated ID, prepend an -->
-            <!-- * "ln-" to it, and use that as the basename for the file -->
-            <xsl:value-of select="concat('ln-',$id,$html.ext)"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:when>
-      <!-- if there's no dbhtml filename, and if we're to use IDs as -->
-      <!-- filenames, then use the ID to generate the filename. -->
-      <xsl:when test="(@id or @xml:id) and $use.id.as.filename != 0">
-        <xsl:value-of select="(@id|@xml:id)[1]"/>
-        <xsl:value-of select="$html.ext"/>
-      </xsl:when>
-      <xsl:otherwise/>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$ischunk='0'">
-      <!-- if called on something that isn't a chunk, walk up... -->
-      <xsl:choose>
-        <xsl:when test="count(parent::*)&gt;0">
-          <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
-            <xsl:with-param name="recursive" select="$recursive"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <!-- unless there is no up, in which case return "" -->
-        <xsl:otherwise/>
-      </xsl:choose>
-    </xsl:when>
-
-    <xsl:when test="not($recursive) and $filename != ''">
-      <!-- if this chunk has an explicit name, use it -->
-      <xsl:value-of select="$filename"/>
-    </xsl:when>
-
-    <xsl:when test="self::set">
-      <xsl:value-of select="$root.filename"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:when>
-
-    <xsl:when test="self::book">
-      <xsl:text>bk</xsl:text>
-      <xsl:number level="any" format="01"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:when>
-
-    <xsl:when test="self::article">
-      <xsl:if test="/set">
-        <!-- in a set, make sure we inherit the right book info... -->
-        <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
-          <xsl:with-param name="recursive" select="true()"/>
-        </xsl:apply-templates>
-      </xsl:if>
-
-      <xsl:text>ar</xsl:text>
-      <xsl:number level="any" format="01" from="book"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:when>
-
-    <xsl:when test="self::preface">
-      <xsl:if test="/set">
-        <!-- in a set, make sure we inherit the right book info... -->
-        <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
-          <xsl:with-param name="recursive" select="true()"/>
-        </xsl:apply-templates>
-      </xsl:if>
-
-      <xsl:text>pr</xsl:text>
-      <xsl:number level="any" format="01" from="book"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:when>
-
-    <xsl:when test="self::chapter">
-      <xsl:if test="/set">
-        <!-- in a set, make sure we inherit the right book info... -->
-        <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
-          <xsl:with-param name="recursive" select="true()"/>
-        </xsl:apply-templates>
-      </xsl:if>
-
-      <xsl:text>ch</xsl:text>
-      <xsl:number level="any" format="01" from="book"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:when>
-
-    <xsl:when test="self::appendix">
-      <xsl:if test="/set">
-        <!-- in a set, make sure we inherit the right book info... -->
-        <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
-          <xsl:with-param name="recursive" select="true()"/>
-        </xsl:apply-templates>
-      </xsl:if>
-
-      <xsl:text>ap</xsl:text>
-      <xsl:number level="any" format="a" from="book"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:when>
-
-    <xsl:when test="self::part">
-      <xsl:choose>
-        <xsl:when test="/set">
-          <!-- in a set, make sure we inherit the right book info... -->
-          <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
-            <xsl:with-param name="recursive" select="true()"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-        </xsl:otherwise>
-      </xsl:choose>
-
-      <xsl:text>pt</xsl:text>
-      <xsl:number level="any" format="01" from="book"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:when>
-
-    <xsl:when test="self::reference">
-      <xsl:choose>
-        <xsl:when test="/set">
-          <!-- in a set, make sure we inherit the right book info... -->
-          <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
-            <xsl:with-param name="recursive" select="true()"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-        </xsl:otherwise>
-      </xsl:choose>
-
-      <xsl:text>rn</xsl:text>
-      <xsl:number level="any" format="01" from="book"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:when>
-
-    <xsl:when test="self::refentry">
-      <xsl:choose>
-        <xsl:when test="parent::reference">
-          <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
-            <xsl:with-param name="recursive" select="true()"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-        </xsl:otherwise>
-      </xsl:choose>
-
-      <xsl:text>re</xsl:text>
-      <xsl:number level="any" format="01" from="book"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:when>
-
-    <xsl:when test="self::colophon">
-      <xsl:choose>
-        <xsl:when test="/set">
-          <!-- in a set, make sure we inherit the right book info... -->
-          <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
-            <xsl:with-param name="recursive" select="true()"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-        </xsl:otherwise>
-      </xsl:choose>
-
-      <xsl:text>co</xsl:text>
-      <xsl:number level="any" format="01" from="book"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:when>
-
-    <xsl:when test="self::sect1                     or self::sect2                     or self::sect3                     or self::sect4                     or self::sect5                     or self::section">
-      <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
-        <xsl:with-param name="recursive" select="true()"/>
-      </xsl:apply-templates>
-      <xsl:text>s</xsl:text>
-      <xsl:number format="01"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:when>
-
-    <xsl:when test="self::bibliography">
-      <xsl:choose>
-        <xsl:when test="/set">
-          <!-- in a set, make sure we inherit the right book info... -->
-          <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
-            <xsl:with-param name="recursive" select="true()"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-        </xsl:otherwise>
-      </xsl:choose>
-
-      <xsl:text>bi</xsl:text>
-      <xsl:number level="any" format="01" from="book"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:when>
-
-    <xsl:when test="self::glossary">
-      <xsl:choose>
-        <xsl:when test="/set">
-          <!-- in a set, make sure we inherit the right book info... -->
-          <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
-            <xsl:with-param name="recursive" select="true()"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-        </xsl:otherwise>
-      </xsl:choose>
-
-      <xsl:text>go</xsl:text>
-      <xsl:number level="any" format="01" from="book"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:when>
-
-    <xsl:when test="self::index">
-      <xsl:choose>
-        <xsl:when test="/set">
-          <!-- in a set, make sure we inherit the right book info... -->
-          <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
-            <xsl:with-param name="recursive" select="true()"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-        </xsl:otherwise>
-      </xsl:choose>
-
-      <xsl:text>ix</xsl:text>
-      <xsl:number level="any" format="01" from="book"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:when>
-
-    <xsl:when test="self::setindex">
-      <xsl:text>si</xsl:text>
-      <xsl:number level="any" format="01" from="set"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:when>
-
-    <xsl:otherwise>
-      <xsl:text>chunk-filename-error-</xsl:text>
-      <xsl:value-of select="name(.)"/>
-      <xsl:number level="any" format="01" from="set"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-
-
-<xsl:template match="processing-instruction('dbhtml')">
-  <!-- nop -->
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-
-<xsl:template match="*" mode="find.chunks">
-  <xsl:variable name="chunk">
-    <xsl:call-template name="chunk"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$chunk != 0">
-      <cf:div id="{generate-id()}">
-        <xsl:apply-templates select="." mode="class.attribute"/>
-        <xsl:apply-templates select="*" mode="find.chunks"/>
-      </cf:div>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates select="*" mode="find.chunks"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="/">
-  <!-- * Get a title for current doc so that we let the user -->
-  <!-- * know what document we are processing at this point. -->
-  <xsl:variable name="doc.title">
-    <xsl:call-template name="get.doc.title"/>
-  </xsl:variable>
-  <xsl:choose>
-    <!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document,
-         toss the namespace and continue.  Use the docbook5 namespaced
-	 stylesheets for DocBook5 if you don't want to use this feature.-->
-    <!-- include extra test for Xalan quirk -->
-    <xsl:when test="(function-available('exsl:node-set') or                      contains(system-property('xsl:vendor'),                        'Apache Software Foundation'))                     and (*/self::ng:* or */self::db:*)">
-      <xsl:call-template name="log.message">
-        <xsl:with-param name="level">Note</xsl:with-param>
-        <xsl:with-param name="source" select="$doc.title"/>
-        <xsl:with-param name="context-desc">
-          <xsl:text>namesp. cut</xsl:text>
-        </xsl:with-param>
-        <xsl:with-param name="message">
-          <xsl:text>stripped namespace before processing</xsl:text>
-        </xsl:with-param>
-      </xsl:call-template>
-      <xsl:variable name="nons">
-        <xsl:apply-templates mode="stripNS"/>
-      </xsl:variable>
-      <xsl:call-template name="log.message">
-        <xsl:with-param name="level">Note</xsl:with-param>
-        <xsl:with-param name="source" select="$doc.title"/>
-        <xsl:with-param name="context-desc">
-          <xsl:text>namesp. cut</xsl:text>
-        </xsl:with-param>
-        <xsl:with-param name="message">
-          <xsl:text>processing stripped document</xsl:text>
-        </xsl:with-param>
-      </xsl:call-template>
-      <xsl:apply-templates select="exsl:node-set($nons)"/>
-    </xsl:when>
-    <!-- Can't process unless namespace removed -->
-    <xsl:when test="*/self::ng:* or */self::db:*">
-      <xsl:message terminate="yes">
-        <xsl:text>Unable to strip the namespace from DB5 document,</xsl:text>
-        <xsl:text> cannot proceed.</xsl:text>
-      </xsl:message>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="$rootid != ''">
-          <xsl:choose>
-            <xsl:when test="count(key('id',$rootid)) = 0">
-              <xsl:message terminate="yes">
-                <xsl:text>ID '</xsl:text>
-                <xsl:value-of select="$rootid"/>
-                <xsl:text>' not found in document.</xsl:text>
-              </xsl:message>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:if test="$collect.xref.targets = 'yes' or                             $collect.xref.targets = 'only'">
-                <xsl:apply-templates select="key('id', $rootid)" mode="collect.targets"/>
-              </xsl:if>
-              <xsl:if test="$collect.xref.targets != 'only'">
-                <xsl:apply-templates select="key('id',$rootid)" mode="process.root"/>
-                <xsl:if test="$tex.math.in.alt != ''">
-                  <xsl:apply-templates select="key('id',$rootid)" mode="collect.tex.math"/>
-                </xsl:if>
-                <xsl:if test="$generate.manifest != 0">
-                  <xsl:call-template name="generate.manifest">
-                    <xsl:with-param name="node" select="key('id',$rootid)"/>
-                  </xsl:call-template>
-                </xsl:if>
-              </xsl:if>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:if test="$collect.xref.targets = 'yes' or                         $collect.xref.targets = 'only'">
-            <xsl:apply-templates select="/" mode="collect.targets"/>
-          </xsl:if>
-          <xsl:if test="$collect.xref.targets != 'only'">
-            <xsl:apply-templates select="/" mode="process.root"/>
-            <xsl:if test="$tex.math.in.alt != ''">
-              <xsl:apply-templates select="/" mode="collect.tex.math"/>
-            </xsl:if>
-            <xsl:if test="$generate.manifest != 0">
-              <xsl:call-template name="generate.manifest">
-                <xsl:with-param name="node" select="/"/>
-              </xsl:call-template>
-            </xsl:if>
-          </xsl:if>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="*" mode="process.root">
-  <xsl:apply-templates select="."/>
-</xsl:template>
-
-<!-- ====================================================================== -->
-
-<xsl:template match="set|book|part|preface|chapter|appendix                      |article                      |reference|refentry                      |book/glossary|article/glossary|part/glossary                      |book/bibliography|article/bibliography|part/bibliography                      |colophon">
-  <xsl:choose>
-    <xsl:when test="$onechunk != 0 and parent::*">
-      <xsl:apply-imports/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="process-chunk-element"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="sect1|sect2|sect3|sect4|sect5|section">
-  <xsl:variable name="ischunk">
-    <xsl:call-template name="chunk"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="not(parent::*)">
-      <xsl:call-template name="process-chunk-element"/>
-    </xsl:when>
-    <xsl:when test="$ischunk = 0">
-      <xsl:apply-imports/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="process-chunk-element"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="setindex                      |book/index                      |article/index                      |part/index">
-  <!-- some implementations use completely empty index tags to indicate -->
-  <!-- where an automatically generated index should be inserted. so -->
-  <!-- if the index is completely empty, skip it. -->
-  <xsl:if test="count(*)&gt;0 or $generate.index != '0'">
-    <xsl:call-template name="process-chunk-element"/>
-  </xsl:if>
-</xsl:template>
-
-<!-- Resolve xml:base attributes -->
-<xsl:template match="@fileref">
-  <!-- need a check for absolute urls -->
-  <xsl:choose>
-    <xsl:when test="contains(., ':')">
-      <!-- it has a uri scheme so it is an absolute uri -->
-      <xsl:value-of select="."/>
-    </xsl:when>
-    <xsl:when test="$keep.relative.image.uris != 0">
-      <!-- leave it alone -->
-      <xsl:value-of select="."/>
-    </xsl:when>
-    <xsl:otherwise>
-      <!-- its a relative uri -->
-      <xsl:call-template name="relative-uri">
-        <xsl:with-param name="destdir">
-          <xsl:call-template name="dbhtml-dir">
-            <xsl:with-param name="context" select=".."/>
-          </xsl:call-template>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-<xsl:template match="set|book|part|preface|chapter|appendix                      |article                      |reference|refentry                      |sect1|sect2|sect3|sect4|sect5                      |section                      |book/glossary|article/glossary|part/glossary                      |book/bibliography|article/bibliography|part/bibliography                      |colophon" mode="enumerate-files">
-  <xsl:variable name="ischunk"><xsl:call-template name="chunk"/></xsl:variable>
-  <xsl:if test="$ischunk='1'">
-    <xsl:call-template name="make-relative-filename">
-      <xsl:with-param name="base.dir">
-        <xsl:if test="$manifest.in.base.dir = 0">
-          <xsl:value-of select="$base.dir"/>
-        </xsl:if>
-      </xsl:with-param>
-      <xsl:with-param name="base.name">
-        <xsl:apply-templates mode="chunk-filename" select="."/>
-      </xsl:with-param>
-    </xsl:call-template>
-    <xsl:text>
-</xsl:text>
-  </xsl:if>
-  <xsl:apply-templates select="*" mode="enumerate-files"/>
-</xsl:template>
-
-<xsl:template match="book/index|article/index|part/index" mode="enumerate-files">
-  <xsl:if test="$htmlhelp.output != 1">
-    <xsl:variable name="ischunk"><xsl:call-template name="chunk"/></xsl:variable>
-    <xsl:if test="$ischunk='1'">
-      <xsl:call-template name="make-relative-filename">
-        <xsl:with-param name="base.dir">
-          <xsl:if test="$manifest.in.base.dir = 0">
-            <xsl:value-of select="$base.dir"/>
-          </xsl:if>
-        </xsl:with-param>
-        <xsl:with-param name="base.name">
-          <xsl:apply-templates mode="chunk-filename" select="."/>
-        </xsl:with-param>
-      </xsl:call-template>
-      <xsl:text>
-</xsl:text>
-    </xsl:if>
-    <xsl:apply-templates select="*" mode="enumerate-files"/>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="enumerate-files">
-  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
-  <xsl:if test="$generate.legalnotice.link != 0">
-    <xsl:call-template name="make-relative-filename">
-      <xsl:with-param name="base.dir">
-        <xsl:if test="$manifest.in.base.dir = 0">
-          <xsl:value-of select="$base.dir"/>
-        </xsl:if>
-      </xsl:with-param>
-      <xsl:with-param name="base.name">
-        <xsl:apply-templates mode="chunk-filename" select="."/>
-      </xsl:with-param>
-    </xsl:call-template>
-    <xsl:text>
-</xsl:text>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="mediaobject[imageobject] | inlinemediaobject[imageobject]" mode="enumerate-files">
-  <xsl:variable name="longdesc.uri">
-    <xsl:call-template name="longdesc.uri">
-      <xsl:with-param name="mediaobject" select="."/>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:variable name="mediaobject" select="."/>
-
-  <xsl:if test="$html.longdesc != 0 and $mediaobject/textobject[not(phrase)]">
-    <xsl:call-template name="longdesc.uri">
-      <xsl:with-param name="mediaobject" select="$mediaobject"/>
-    </xsl:call-template>
-    <xsl:text>
-</xsl:text>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="text()" mode="enumerate-files">
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/chunk-common.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/chunk-common.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,1545 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:cf="http://docbook.sourceforge.net/xmlns/chunkfast/1.0" xmlns:ng="http://docbook.org/docbook-ng" xmlns:db="http://docbook.org/ns/docbook" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="exsl cf ng db">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:param name="onechunk" select="0"/>
-<xsl:param name="refentry.separator" select="0"/>
-<xsl:param name="chunk.fast" select="0"/>
-
-<xsl:key name="genid" match="*" use="generate-id()"/>
-
-<!-- ==================================================================== -->
-
-<xsl:variable name="chunk.hierarchy">
-  <xsl:if test="$chunk.fast != 0">
-    <xsl:choose>
-      <xsl:when test="function-available('exsl:node-set')">
-        <xsl:message>Computing chunks...</xsl:message>
-        <xsl:apply-templates select="/*" mode="find.chunks"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:message>
-          <xsl:text>Fast chunking requires exsl:node-set(). </xsl:text>
-          <xsl:text>Using "slow" chunking.</xsl:text>
-        </xsl:message>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:if>
-</xsl:variable>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="process-chunk-element">
-  <xsl:param name="content">
-    <xsl:apply-imports/>
-  </xsl:param>
-
-  <xsl:choose>
-    <xsl:when test="$chunk.fast != 0 and function-available('exsl:node-set')">
-      <xsl:variable name="chunks" select="exsl:node-set($chunk.hierarchy)//cf:div"/>
-      <xsl:variable name="genid" select="generate-id()"/>
-
-      <xsl:variable name="div" select="$chunks[@id=$genid or @xml:id=$genid]"/>
-
-      <xsl:variable name="prevdiv" select="($div/preceding-sibling::cf:div|$div/preceding::cf:div|$div/parent::cf:div)[last()]"/>
-      <xsl:variable name="prev" select="key('genid', ($prevdiv/@id|$prevdiv/@xml:id)[1])"/>
-
-      <xsl:variable name="nextdiv" select="($div/following-sibling::cf:div|$div/following::cf:div|$div/cf:div)[1]"/>
-      <xsl:variable name="next" select="key('genid', ($nextdiv/@id|$nextdiv/@xml:id)[1])"/>
-
-      <xsl:choose>
-        <xsl:when test="$onechunk != 0 and parent::*">
-          <xsl:copy-of select="$content"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="process-chunk">
-            <xsl:with-param name="prev" select="$prev"/>
-            <xsl:with-param name="next" select="$next"/>
-            <xsl:with-param name="content" select="$content"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="$onechunk != 0 and not(parent::*)">
-          <xsl:call-template name="chunk-all-sections">
-            <xsl:with-param name="content" select="$content"/>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:when test="$onechunk != 0">
-          <xsl:copy-of select="$content"/>
-        </xsl:when>
-        <xsl:when test="$chunk.first.sections = 0">
-          <xsl:call-template name="chunk-first-section-with-parent">
-            <xsl:with-param name="content" select="$content"/>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="chunk-all-sections">
-            <xsl:with-param name="content" select="$content"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="process-chunk">
-  <xsl:param name="prev" select="."/>
-  <xsl:param name="next" select="."/>
-  <xsl:param name="content">
-    <xsl:apply-imports/>
-  </xsl:param>
-
-  <xsl:variable name="ischunk">
-    <xsl:call-template name="chunk"/>
-  </xsl:variable>
-
-  <xsl:variable name="chunkfn">
-    <xsl:if test="$ischunk='1'">
-      <xsl:apply-templates mode="chunk-filename" select="."/>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:if test="$ischunk='0'">
-    <xsl:message>
-      <xsl:text>Error </xsl:text>
-      <xsl:value-of select="name(.)"/>
-      <xsl:text> is not a chunk!</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:variable name="filename">
-    <xsl:call-template name="make-relative-filename">
-      <xsl:with-param name="base.dir" select="$base.dir"/>
-      <xsl:with-param name="base.name" select="$chunkfn"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:call-template name="write.chunk">
-    <xsl:with-param name="filename" select="$filename"/>
-    <xsl:with-param name="content">
-      <xsl:call-template name="chunk-element-content">
-        <xsl:with-param name="prev" select="$prev"/>
-        <xsl:with-param name="next" select="$next"/>
-        <xsl:with-param name="content" select="$content"/>
-      </xsl:call-template>
-    </xsl:with-param>
-    <xsl:with-param name="quiet" select="$chunk.quietly"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="chunk-first-section-with-parent">
-  <xsl:param name="content">
-    <xsl:apply-imports/>
-  </xsl:param>
-
-  <!-- These xpath expressions are really hairy. The trick is to pick sections -->
-  <!-- that are not first children and are not the children of first children -->
-
-  <!-- Break these variables into pieces to work around
-       http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6063 -->
-
-  <xsl:variable name="prev-v1" select="(ancestor::sect1[$chunk.section.depth &gt; 0                                and preceding-sibling::sect1][1]               |ancestor::sect2[$chunk.section.depth &gt; 1                                and preceding-sibling::sect2                                and parent::sect1[preceding-sibling::sect1]][1]               |ancestor::sect3[$chunk.section.depth &gt; 2                                and preceding-sibling::sect3                                and parent::sect2[preceding-sibling::sect2]                                and ancestor::sect1[preceding-sibling::sect1]][1]               |ancestor::sect4[$chunk.section.depth &gt; 3                                and preceding-sibling::sect4                                and parent::sect3[preceding-sibling::sect3]                                and ancestor::sect2[preceding-sibling::sect2]                                and ancestor::sect1[preceding-sibling::sect1]][1]               |ancestor::sect5[$chunk.section.depth &gt; 4                                and preceding-sibling::sect5                                and parent::sect4[preceding-sibling::sect4]                                and ancestor::sect3[preceding-sibling::sect3]                                and ancestor::sect2[preceding-sibling::sect2]                                and ancestor::sect1[preceding-sibling::sect1]][1]               |ancestor::section[$chunk.section.depth &gt; count(ancestor::section)                                 and not(ancestor::section[not(preceding-sibling::section)])][1])[last()]"/>
-
-  <xsl:variable name="prev-v2" select="(preceding::sect1[$chunk.section.depth &gt; 0                                and preceding-sibling::sect1][1]               |preceding::sect2[$chunk.section.depth &gt; 1                                and preceding-sibling::sect2                                and parent::sect1[preceding-sibling::sect1]][1]               |preceding::sect3[$chunk.section.depth &gt; 2                                and preceding-sibling::sect3                                and parent::sect2[preceding-sibling::sect2]                                and ancestor::sect1[preceding-sibling::sect1]][1]               |preceding::sect4[$chunk.section.depth &gt; 3                                and preceding-sibling::sect4                                and parent::sect3[preceding-sibling::sect3]                                and ancestor::sect2[preceding-sibling::sect2]                                and ancestor::sect1[preceding-sibling::sect1]][1]               |preceding::sect5[$chunk.section.depth &gt; 4                                and preceding-sibling::sect5                                and parent::sect4[preceding-sibling::sect4]                                and ancestor::sect3[preceding-sibling::sect3]                                and ancestor::sect2[preceding-sibling::sect2]                                and ancestor::sect1[preceding-sibling::sect1]][1]               |preceding::section[$chunk.section.depth &gt; count(ancestor::section)                                  and preceding-sibling::section                                  and not(ancestor::section[not(preceding-sibling::section)])][1])[last()]"/>
-
-  <xsl:variable name="prev" select="(preceding::book[1]              |preceding::preface[1]              |preceding::chapter[1]              |preceding::appendix[1]              |preceding::part[1]              |preceding::reference[1]              |preceding::refentry[1]              |preceding::colophon[1]              |preceding::article[1]              |preceding::bibliography[parent::article or parent::book or parent::part][1]              |preceding::glossary[parent::article or parent::book or parent::part][1]              |preceding::index[$generate.index != 0]                                [parent::article or parent::book or parent::part][1]              |preceding::setindex[$generate.index != 0][1]              |ancestor::set              |ancestor::book[1]              |ancestor::preface[1]              |ancestor::chapter[1]              |ancestor::appendix[1]              |ancestor::part[1]              |ancestor::reference[1]              |ancestor::article[1]              |$prev-v1              |$prev-v2)[last()]"/>
-
-  <xsl:variable name="next-v1" select="(following::sect1[$chunk.section.depth &gt; 0                                and preceding-sibling::sect1][1]               |following::sect2[$chunk.section.depth &gt; 1                                and preceding-sibling::sect2                                and parent::sect1[preceding-sibling::sect1]][1]               |following::sect3[$chunk.section.depth &gt; 2                                and preceding-sibling::sect3                                and parent::sect2[preceding-sibling::sect2]                                and ancestor::sect1[preceding-sibling::sect1]][1]               |following::sect4[$chunk.section.depth &gt; 3                                and preceding-sibling::sect4                                and parent::sect3[preceding-sibling::sect3]                                and ancestor::sect2[preceding-sibling::sect2]                                and ancestor::sect1[preceding-sibling::sect1]][1]               |following::sect5[$chunk.section.depth &gt; 4                                and preceding-sibling::sect5                                and parent::sect4[preceding-sibling::sect4]                                and ancestor::sect3[preceding-sibling::sect3]                                and ancestor::sect2[preceding-sibling::sect2]                                and ancestor::sect1[preceding-sibling::sect1]][1]               |following::section[$chunk.section.depth &gt; count(ancestor::section)                                  and preceding-sibling::section                                  and not(ancestor::section[not(preceding-sibling::section)])][1])[1]"/>
-
-  <xsl:variable name="next-v2" select="(descendant::sect1[$chunk.section.depth &gt; 0                                and preceding-sibling::sect1][1]               |descendant::sect2[$chunk.section.depth &gt; 1                                and preceding-sibling::sect2                                and parent::sect1[preceding-sibling::sect1]][1]               |descendant::sect3[$chunk.section.depth &gt; 2                                and preceding-sibling::sect3                                and parent::sect2[preceding-sibling::sect2]                                and ancestor::sect1[preceding-sibling::sect1]][1]               |descendant::sect4[$chunk.section.depth &gt; 3                                and preceding-sibling::sect4                                and parent::sect3[preceding-sibling::sect3]                                and ancestor::sect2[preceding-sibling::sect2]                                and ancestor::sect1[preceding-sibling::sect1]][1]               |descendant::sect5[$chunk.section.depth &gt; 4                                and preceding-sibling::sect5                                and parent::sect4[preceding-sibling::sect4]                                and ancestor::sect3[preceding-sibling::sect3]                                and ancestor::sect2[preceding-sibling::sect2]                                and ancestor::sect1[preceding-sibling::sect1]][1]               |descendant::section[$chunk.section.depth &gt; count(ancestor::section)                                  and preceding-sibling::section                                  and not(ancestor::section[not(preceding-sibling::section)])])[1]"/>
-
-  <xsl:variable name="next" select="(following::book[1]              |following::preface[1]              |following::chapter[1]              |following::appendix[1]              |following::part[1]              |following::reference[1]              |following::refentry[1]              |following::colophon[1]              |following::bibliography[parent::article or parent::book or parent::part][1]              |following::glossary[parent::article or parent::book or parent::part][1]              |following::index[$generate.index != 0]                                [parent::article or parent::book or parent::part][1]              |following::article[1]              |following::setindex[$generate.index != 0][1]              |descendant::book[1]              |descendant::preface[1]              |descendant::chapter[1]              |descendant::appendix[1]              |descendant::article[1]              |descendant::bibliography[parent::article or parent::book or parent::part][1]              |descendant::glossary[parent::article or parent::book or parent::part][1]              |descendant::index[$generate.index != 0]                                [parent::article or parent::book or parent::part][1]              |descendant::colophon[1]              |descendant::setindex[$generate.index != 0][1]              |descendant::part[1]              |descendant::reference[1]              |descendant::refentry[1]              |$next-v1              |$next-v2)[1]"/>
-
-  <xsl:call-template name="process-chunk">
-    <xsl:with-param name="prev" select="$prev"/>
-    <xsl:with-param name="next" select="$next"/>
-    <xsl:with-param name="content" select="$content"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="chunk-all-sections">
-  <xsl:param name="content">
-    <xsl:apply-imports/>
-  </xsl:param>
-
-  <xsl:variable name="prev-v1" select="(preceding::sect1[$chunk.section.depth &gt; 0][1]              |preceding::sect2[$chunk.section.depth &gt; 1][1]              |preceding::sect3[$chunk.section.depth &gt; 2][1]              |preceding::sect4[$chunk.section.depth &gt; 3][1]              |preceding::sect5[$chunk.section.depth &gt; 4][1]              |preceding::section[$chunk.section.depth &gt; count(ancestor::section)][1])[last()]"/>
-
-  <xsl:variable name="prev-v2" select="(ancestor::sect1[$chunk.section.depth &gt; 0][1]              |ancestor::sect2[$chunk.section.depth &gt; 1][1]              |ancestor::sect3[$chunk.section.depth &gt; 2][1]              |ancestor::sect4[$chunk.section.depth &gt; 3][1]              |ancestor::sect5[$chunk.section.depth &gt; 4][1]              |ancestor::section[$chunk.section.depth &gt; count(ancestor::section)][1])[last()]"/>
-
-  <xsl:variable name="prev" select="(preceding::book[1]              |preceding::preface[1]              |preceding::chapter[1]              |preceding::appendix[1]              |preceding::part[1]              |preceding::reference[1]              |preceding::refentry[1]              |preceding::colophon[1]              |preceding::article[1]              |preceding::bibliography[parent::article or parent::book or parent::part][1]              |preceding::glossary[parent::article or parent::book or parent::part][1]              |preceding::index[$generate.index != 0]                                [parent::article or parent::book or parent::part][1]              |preceding::setindex[$generate.index != 0][1]              |ancestor::set              |ancestor::book[1]              |ancestor::preface[1]              |ancestor::chapter[1]              |ancestor::appendix[1]              |ancestor::part[1]              |ancestor::reference[1]              |ancestor::article[1]              |$prev-v1              |$prev-v2)[last()]"/>
-
-  <xsl:variable name="next-v1" select="(following::sect1[$chunk.section.depth &gt; 0][1]              |following::sect2[$chunk.section.depth &gt; 1][1]              |following::sect3[$chunk.section.depth &gt; 2][1]              |following::sect4[$chunk.section.depth &gt; 3][1]              |following::sect5[$chunk.section.depth &gt; 4][1]              |following::section[$chunk.section.depth &gt; count(ancestor::section)][1])[1]"/>
-
-  <xsl:variable name="next-v2" select="(descendant::sect1[$chunk.section.depth &gt; 0][1]              |descendant::sect2[$chunk.section.depth &gt; 1][1]              |descendant::sect3[$chunk.section.depth &gt; 2][1]              |descendant::sect4[$chunk.section.depth &gt; 3][1]              |descendant::sect5[$chunk.section.depth &gt; 4][1]              |descendant::section[$chunk.section.depth                                    &gt; count(ancestor::section)][1])[1]"/>
-
-  <xsl:variable name="next" select="(following::book[1]              |following::preface[1]              |following::chapter[1]              |following::appendix[1]              |following::part[1]              |following::reference[1]              |following::refentry[1]              |following::colophon[1]              |following::bibliography[parent::article or parent::book or parent::part][1]              |following::glossary[parent::article or parent::book or parent::part][1]              |following::index[$generate.index != 0]                                [parent::article or parent::book][1]              |following::article[1]              |following::setindex[$generate.index != 0][1]              |descendant::book[1]              |descendant::preface[1]              |descendant::chapter[1]              |descendant::appendix[1]              |descendant::article[1]              |descendant::bibliography[parent::article or parent::book][1]              |descendant::glossary[parent::article or parent::book or parent::part][1]              |descendant::index[$generate.index != 0]                                [parent::article or parent::book][1]              |descendant::colophon[1]              |descendant::setindex[$generate.index != 0][1]              |descendant::part[1]              |descendant::reference[1]              |descendant::refentry[1]              |$next-v1              |$next-v2)[1]"/>
-
-  <xsl:call-template name="process-chunk">
-    <xsl:with-param name="prev" select="$prev"/>
-    <xsl:with-param name="next" select="$next"/>
-    <xsl:with-param name="content" select="$content"/>
-  </xsl:call-template>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<!-- ==================================================================== -->
-
-<xsl:template name="make.lots">
-  <xsl:param name="toc.params" select="''"/>
-  <xsl:param name="toc"/>
-
-  <xsl:variable name="lots">
-    <xsl:if test="contains($toc.params, 'toc')">
-      <xsl:copy-of select="$toc"/>
-    </xsl:if>
-
-    <xsl:if test="contains($toc.params, 'figure')">
-      <xsl:choose>
-        <xsl:when test="$chunk.separate.lots != '0'">
-          <xsl:call-template name="make.lot.chunk">
-            <xsl:with-param name="type" select="'figure'"/>
-            <xsl:with-param name="lot">
-              <xsl:call-template name="list.of.titles">
-                <xsl:with-param name="titles" select="'figure'"/>
-                <xsl:with-param name="nodes" select=".//figure"/>
-              </xsl:call-template>
-            </xsl:with-param>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="list.of.titles">
-            <xsl:with-param name="titles" select="'figure'"/>
-            <xsl:with-param name="nodes" select=".//figure"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:if>
-
-    <xsl:if test="contains($toc.params, 'table')">
-      <xsl:choose>
-        <xsl:when test="$chunk.separate.lots != '0'">
-          <xsl:call-template name="make.lot.chunk">
-            <xsl:with-param name="type" select="'table'"/>
-            <xsl:with-param name="lot">
-              <xsl:call-template name="list.of.titles">
-                <xsl:with-param name="titles" select="'table'"/>
-                <xsl:with-param name="nodes" select=".//table"/>
-              </xsl:call-template>
-            </xsl:with-param>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="list.of.titles">
-            <xsl:with-param name="titles" select="'table'"/>
-            <xsl:with-param name="nodes" select=".//table"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:if>
-
-    <xsl:if test="contains($toc.params, 'example')">
-      <xsl:choose>
-        <xsl:when test="$chunk.separate.lots != '0'">
-          <xsl:call-template name="make.lot.chunk">
-            <xsl:with-param name="type" select="'example'"/>
-            <xsl:with-param name="lot">
-              <xsl:call-template name="list.of.titles">
-                <xsl:with-param name="titles" select="'example'"/>
-                <xsl:with-param name="nodes" select=".//example"/>
-              </xsl:call-template>
-            </xsl:with-param>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="list.of.titles">
-            <xsl:with-param name="titles" select="'example'"/>
-            <xsl:with-param name="nodes" select=".//example"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:if>
-
-    <xsl:if test="contains($toc.params, 'equation')">
-      <xsl:choose>
-        <xsl:when test="$chunk.separate.lots != '0'">
-          <xsl:call-template name="make.lot.chunk">
-            <xsl:with-param name="type" select="'equation'"/>
-            <xsl:with-param name="lot">
-              <xsl:call-template name="list.of.titles">
-                <xsl:with-param name="titles" select="'equation'"/>
-                <xsl:with-param name="nodes" select=".//equation"/>
-              </xsl:call-template>
-            </xsl:with-param>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="list.of.titles">
-            <xsl:with-param name="titles" select="'equation'"/>
-            <xsl:with-param name="nodes" select=".//equation"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:if>
-
-    <xsl:if test="contains($toc.params, 'procedure')">
-      <xsl:choose>
-        <xsl:when test="$chunk.separate.lots != '0'">
-          <xsl:call-template name="make.lot.chunk">
-            <xsl:with-param name="type" select="'procedure'"/>
-            <xsl:with-param name="lot">
-              <xsl:call-template name="list.of.titles">
-                <xsl:with-param name="titles" select="'procedure'"/>
-                <xsl:with-param name="nodes" select=".//procedure[title]"/>
-              </xsl:call-template>
-            </xsl:with-param>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="list.of.titles">
-            <xsl:with-param name="titles" select="'procedure'"/>
-            <xsl:with-param name="nodes" select=".//procedure[title]"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:if test="string($lots) != ''">
-    <xsl:choose>
-      <xsl:when test="$chunk.tocs.and.lots != 0 and not(parent::*)">
-        <xsl:call-template name="write.chunk">
-          <xsl:with-param name="filename">
-            <xsl:call-template name="make-relative-filename">
-              <xsl:with-param name="base.dir" select="$base.dir"/>
-              <xsl:with-param name="base.name">
-                <xsl:call-template name="dbhtml-dir"/>
-                <xsl:apply-templates select="." mode="recursive-chunk-filename">
-                  <xsl:with-param name="recursive" select="true()"/>
-                </xsl:apply-templates>
-                <xsl:text>-toc</xsl:text>
-                <xsl:value-of select="$html.ext"/>
-              </xsl:with-param>
-            </xsl:call-template>
-          </xsl:with-param>
-          <xsl:with-param name="content">
-            <xsl:call-template name="chunk-element-content">
-              <xsl:with-param name="prev" select="/foo"/>
-              <xsl:with-param name="next" select="/foo"/>
-              <xsl:with-param name="nav.context" select="'toc'"/>
-              <xsl:with-param name="content">
-                <xsl:if test="$chunk.tocs.and.lots.has.title != 0">
-                  <h1>
-                    <xsl:apply-templates select="." mode="object.title.markup"/>
-                  </h1>
-                </xsl:if>
-                <xsl:copy-of select="$lots"/>
-              </xsl:with-param>
-            </xsl:call-template>
-          </xsl:with-param>
-          <xsl:with-param name="quiet" select="$chunk.quietly"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:copy-of select="$lots"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="make.lot.chunk">
-  <xsl:param name="type" select="''"/>
-  <xsl:param name="lot"/>
-
-  <xsl:if test="string($lot) != ''">
-    <xsl:variable name="filename">
-      <xsl:call-template name="make-relative-filename">
-        <xsl:with-param name="base.dir" select="$base.dir"/>
-        <xsl:with-param name="base.name">
-          <xsl:call-template name="dbhtml-dir"/>
-          <xsl:value-of select="$type"/>
-          <xsl:text>-toc</xsl:text>
-          <xsl:value-of select="$html.ext"/>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:variable>
-
-    <xsl:variable name="href">
-      <xsl:call-template name="make-relative-filename">
-        <xsl:with-param name="base.name">
-          <xsl:call-template name="dbhtml-dir"/>
-          <xsl:value-of select="$type"/>
-          <xsl:text>-toc</xsl:text>
-          <xsl:value-of select="$html.ext"/>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:variable>
-
-    <xsl:call-template name="write.chunk">
-      <xsl:with-param name="filename" select="$filename"/>
-      <xsl:with-param name="content">
-        <xsl:call-template name="chunk-element-content">
-          <xsl:with-param name="prev" select="/foo"/>
-          <xsl:with-param name="next" select="/foo"/>
-          <xsl:with-param name="nav.context" select="'toc'"/>
-          <xsl:with-param name="content">
-            <xsl:copy-of select="$lot"/>
-          </xsl:with-param>
-        </xsl:call-template>
-      </xsl:with-param>
-      <xsl:with-param name="quiet" select="$chunk.quietly"/>
-    </xsl:call-template>
-    <!-- And output a link to this file -->
-    <div>
-      <xsl:attribute name="class">
-        <xsl:text>ListofTitles</xsl:text>
-      </xsl:attribute>
-      <a href="{$href}">
-        <xsl:call-template name="gentext">
-          <xsl:with-param name="key">
-            <xsl:choose>
-              <xsl:when test="$type='table'">ListofTables</xsl:when>
-              <xsl:when test="$type='figure'">ListofFigures</xsl:when>
-              <xsl:when test="$type='equation'">ListofEquations</xsl:when>
-              <xsl:when test="$type='example'">ListofExamples</xsl:when>
-              <xsl:when test="$type='procedure'">ListofProcedures</xsl:when>
-              <xsl:otherwise>ListofUnknown</xsl:otherwise>
-            </xsl:choose>
-          </xsl:with-param>
-        </xsl:call-template>
-      </a>
-    </div>
-  </xsl:if>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="in.other.chunk">
-  <xsl:param name="chunk" select="."/>
-  <xsl:param name="node" select="."/>
-
-  <xsl:variable name="is.chunk">
-    <xsl:call-template name="chunk">
-      <xsl:with-param name="node" select="$node"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-<!--
-  <xsl:message>
-    <xsl:text>in.other.chunk: </xsl:text>
-    <xsl:value-of select="name($chunk)"/>
-    <xsl:text> </xsl:text>
-    <xsl:value-of select="name($node)"/>
-    <xsl:text> </xsl:text>
-    <xsl:value-of select="$chunk = $node"/>
-    <xsl:text> </xsl:text>
-    <xsl:value-of select="$is.chunk"/>
-  </xsl:message>
--->
-
-  <xsl:choose>
-    <xsl:when test="$chunk = $node">0</xsl:when>
-    <xsl:when test="$is.chunk = 1">1</xsl:when>
-    <xsl:when test="count($node) = 0">0</xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="in.other.chunk">
-        <xsl:with-param name="chunk" select="$chunk"/>
-        <xsl:with-param name="node" select="$node/parent::*"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="count.footnotes.in.this.chunk">
-  <xsl:param name="node" select="."/>
-  <xsl:param name="footnotes" select="$node//footnote"/>
-  <xsl:param name="count" select="0"/>
-
-<!--
-  <xsl:message>
-    <xsl:text>count.footnotes.in.this.chunk: </xsl:text>
-    <xsl:value-of select="name($node)"/>
-  </xsl:message>
--->
-
-  <xsl:variable name="in.other.chunk">
-    <xsl:call-template name="in.other.chunk">
-      <xsl:with-param name="chunk" select="$node"/>
-      <xsl:with-param name="node" select="$footnotes[1]"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="count($footnotes) = 0">
-      <xsl:value-of select="$count"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="$in.other.chunk != 0">
-          <xsl:call-template name="count.footnotes.in.this.chunk">
-            <xsl:with-param name="node" select="$node"/>
-            <xsl:with-param name="footnotes" select="$footnotes[position() &gt; 1]"/>
-            <xsl:with-param name="count" select="$count"/>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:when test="$footnotes[1]/ancestor::table                         |$footnotes[1]/ancestor::informaltable">
-          <xsl:call-template name="count.footnotes.in.this.chunk">
-            <xsl:with-param name="node" select="$node"/>
-            <xsl:with-param name="footnotes" select="$footnotes[position() &gt; 1]"/>
-            <xsl:with-param name="count" select="$count"/>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="count.footnotes.in.this.chunk">
-            <xsl:with-param name="node" select="$node"/>
-            <xsl:with-param name="footnotes" select="$footnotes[position() &gt; 1]"/>
-            <xsl:with-param name="count" select="$count + 1"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="process.footnotes.in.this.chunk">
-  <xsl:param name="node" select="."/>
-  <xsl:param name="footnotes" select="$node//footnote"/>
-
-<!--
-  <xsl:message>process.footnotes.in.this.chunk</xsl:message>
--->
-
-  <xsl:variable name="in.other.chunk">
-    <xsl:call-template name="in.other.chunk">
-      <xsl:with-param name="chunk" select="$node"/>
-      <xsl:with-param name="node" select="$footnotes[1]"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="count($footnotes) = 0">
-      <!-- nop -->
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="$in.other.chunk != 0">
-          <xsl:call-template name="process.footnotes.in.this.chunk">
-            <xsl:with-param name="node" select="$node"/>
-            <xsl:with-param name="footnotes" select="$footnotes[position() &gt; 1]"/>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:when test="$footnotes[1]/ancestor::table                         |$footnotes[1]/ancestor::informaltable">
-          <xsl:call-template name="process.footnotes.in.this.chunk">
-            <xsl:with-param name="node" select="$node"/>
-            <xsl:with-param name="footnotes" select="$footnotes[position() &gt; 1]"/>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates select="$footnotes[1]" mode="process.footnote.mode"/>
-          <xsl:call-template name="process.footnotes.in.this.chunk">
-            <xsl:with-param name="node" select="$node"/>
-            <xsl:with-param name="footnotes" select="$footnotes[position() &gt; 1]"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="process.footnotes">
-  <xsl:variable name="footnotes" select=".//footnote"/>
-  <xsl:variable name="fcount">
-    <xsl:call-template name="count.footnotes.in.this.chunk">
-      <xsl:with-param name="node" select="."/>
-      <xsl:with-param name="footnotes" select="$footnotes"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-<!--
-  <xsl:message>
-    <xsl:value-of select="name(.)"/>
-    <xsl:text> fcount: </xsl:text>
-    <xsl:value-of select="$fcount"/>
-  </xsl:message>
--->
-
-  <!-- Only bother to do this if there's at least one non-table footnote -->
-  <xsl:if test="$fcount &gt; 0">
-    <div class="footnotes">
-      <br/>
-      <hr width="100" align="left"/>
-      <xsl:call-template name="process.footnotes.in.this.chunk">
-        <xsl:with-param name="node" select="."/>
-        <xsl:with-param name="footnotes" select="$footnotes"/>
-      </xsl:call-template>
-    </div>
-  </xsl:if>
-
-  <!-- FIXME: When chunking, only the annotations actually used
-              in this chunk should be referenced. I don't think it
-              does any harm to reference them all, but it adds
-              unnecessary bloat to each chunk. -->
-  <xsl:if test="$annotation.support != 0 and //annotation">
-    <div class="annotation-list">
-      <div class="annotation-nocss">
-        <p>The following annotations are from this essay. You are seeing
-        them here because your browser doesn&#8217;t support the user-interface
-        techniques used to make them appear as &#8216;popups&#8217; on modern browsers.</p>
-      </div>
-
-      <xsl:apply-templates select="//annotation" mode="annotation-popup"/>
-    </div>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="process.chunk.footnotes">
-  <xsl:variable name="is.chunk">
-    <xsl:call-template name="chunk"/>
-  </xsl:variable>
-  <xsl:if test="$is.chunk = 1">
-    <xsl:call-template name="process.footnotes"/>
-  </xsl:if>
-</xsl:template>
-
-<!-- ====================================================================== -->
-
-<xsl:template name="chunk">
-  <xsl:param name="node" select="."/>
-  <!-- returns 1 if $node is a chunk -->
-
-  <!-- ==================================================================== -->
-  <!-- What's a chunk?
-
-       The root element
-       appendix
-       article
-       bibliography  in article or part or book
-       book
-       chapter
-       colophon
-       glossary      in article or part or book
-       index         in article or part or book
-       part
-       preface
-       refentry
-       reference
-       sect{1,2,3,4,5}  if position()>1 && depth < chunk.section.depth
-       section          if position()>1 && depth < chunk.section.depth
-       set
-       setindex
-                                                                            -->
-  <!-- ==================================================================== -->
-
-<!--
-  <xsl:message>
-    <xsl:text>chunk: </xsl:text>
-    <xsl:value-of select="name($node)"/>
-    <xsl:text>(</xsl:text>
-    <xsl:value-of select="$node/@id"/>
-    <xsl:text>)</xsl:text>
-    <xsl:text> csd: </xsl:text>
-    <xsl:value-of select="$chunk.section.depth"/>
-    <xsl:text> cfs: </xsl:text>
-    <xsl:value-of select="$chunk.first.sections"/>
-    <xsl:text> ps: </xsl:text>
-    <xsl:value-of select="count($node/parent::section)"/>
-    <xsl:text> prs: </xsl:text>
-    <xsl:value-of select="count($node/preceding-sibling::section)"/>
-  </xsl:message>
--->
-
-  <xsl:choose>
-    <xsl:when test="not($node/parent::*)">1</xsl:when>
-
-    <xsl:when test="local-name($node) = 'sect1'                     and $chunk.section.depth &gt;= 1                     and ($chunk.first.sections != 0                          or count($node/preceding-sibling::sect1) &gt; 0)">
-      <xsl:text>1</xsl:text>
-    </xsl:when>
-    <xsl:when test="local-name($node) = 'sect2'                     and $chunk.section.depth &gt;= 2                     and ($chunk.first.sections != 0                          or count($node/preceding-sibling::sect2) &gt; 0)">
-      <xsl:call-template name="chunk">
-        <xsl:with-param name="node" select="$node/parent::*"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="local-name($node) = 'sect3'                     and $chunk.section.depth &gt;= 3                     and ($chunk.first.sections != 0                          or count($node/preceding-sibling::sect3) &gt; 0)">
-      <xsl:call-template name="chunk">
-        <xsl:with-param name="node" select="$node/parent::*"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="local-name($node) = 'sect4'                     and $chunk.section.depth &gt;= 4                     and ($chunk.first.sections != 0                          or count($node/preceding-sibling::sect4) &gt; 0)">
-      <xsl:call-template name="chunk">
-        <xsl:with-param name="node" select="$node/parent::*"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="local-name($node) = 'sect5'                     and $chunk.section.depth &gt;= 5                     and ($chunk.first.sections != 0                          or count($node/preceding-sibling::sect5) &gt; 0)">
-      <xsl:call-template name="chunk">
-        <xsl:with-param name="node" select="$node/parent::*"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="local-name($node) = 'section'                     and $chunk.section.depth &gt;= count($node/ancestor::section)+1                     and ($chunk.first.sections != 0                          or count($node/preceding-sibling::section) &gt; 0)">
-      <xsl:call-template name="chunk">
-        <xsl:with-param name="node" select="$node/parent::*"/>
-      </xsl:call-template>
-    </xsl:when>
-
-    <xsl:when test="local-name($node)='preface'">1</xsl:when>
-    <xsl:when test="local-name($node)='chapter'">1</xsl:when>
-    <xsl:when test="local-name($node)='appendix'">1</xsl:when>
-    <xsl:when test="local-name($node)='article'">1</xsl:when>
-    <xsl:when test="local-name($node)='part'">1</xsl:when>
-    <xsl:when test="local-name($node)='reference'">1</xsl:when>
-    <xsl:when test="local-name($node)='refentry'">1</xsl:when>
-    <xsl:when test="local-name($node)='index' and ($generate.index != 0 or count($node/*) &gt; 0)                     and (local-name($node/parent::*) = 'article'                     or local-name($node/parent::*) = 'book'                     or local-name($node/parent::*) = 'part'                     )">1</xsl:when>
-    <xsl:when test="local-name($node)='bibliography'                     and (local-name($node/parent::*) = 'article'                     or local-name($node/parent::*) = 'book'                     or local-name($node/parent::*) = 'part'                     )">1</xsl:when>
-    <xsl:when test="local-name($node)='glossary'                     and (local-name($node/parent::*) = 'article'                     or local-name($node/parent::*) = 'book'                     or local-name($node/parent::*) = 'part'                     )">1</xsl:when>
-    <xsl:when test="local-name($node)='colophon'">1</xsl:when>
-    <xsl:when test="local-name($node)='book'">1</xsl:when>
-    <xsl:when test="local-name($node)='set'">1</xsl:when>
-    <xsl:when test="local-name($node)='setindex'">1</xsl:when>
-    <xsl:when test="local-name($node)='legalnotice'                     and $generate.legalnotice.link != 0">1</xsl:when>
-    <xsl:otherwise>0</xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-<xsl:template name="href.target.uri">
-  <xsl:param name="object" select="."/>
-  <xsl:variable name="ischunk">
-    <xsl:call-template name="chunk">
-      <xsl:with-param name="node" select="$object"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:apply-templates mode="chunk-filename" select="$object"/>
-
-  <xsl:if test="$ischunk='0'">
-    <xsl:text>#</xsl:text>
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="$object"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="href.target">
-  <xsl:param name="context" select="."/>
-  <xsl:param name="object" select="."/>
-  <xsl:param name="toc-context" select="."/>
-  <!-- * If $toc-context contains some node other than the current node, -->
-  <!-- * it means we're processing a link in a TOC. In that case, to -->
-  <!-- * ensure the link will work correctly, we need to take a look at -->
-  <!-- * where the file containing the TOC will get written, and where -->
-  <!-- * the file that's being linked to will get written. -->
-  <xsl:variable name="toc-output-dir">
-    <xsl:if test="not($toc-context = .)">
-      <!-- * Get the $toc-context node and all its ancestors, look down -->
-      <!-- * through them to find the last/closest node to the -->
-      <!-- * toc-context node that has a "dbhtml dir" PI, and get the -->
-      <!-- * directory name from that. That's the name of the directory -->
-      <!-- * to which the current toc output file will get written. -->
-      <xsl:call-template name="dbhtml-dir">
-        <xsl:with-param name="context" select="$toc-context/ancestor-or-self::*[processing-instruction('dbhtml')[contains(.,'dir')]][last()]"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:variable>
-  <xsl:variable name="linked-file-output-dir">
-    <xsl:if test="not($toc-context = .)">
-      <!-- * Get the current node and all its ancestors, look down -->
-      <!-- * through them to find the last/closest node to the current -->
-      <!-- * node that has a "dbhtml dir" PI, and get the directory name -->
-      <!-- * from that.  That's the name of the directory to which the -->
-      <!-- * file that's being linked to will get written. -->
-      <xsl:call-template name="dbhtml-dir">
-        <xsl:with-param name="context" select="ancestor-or-self::*[processing-instruction('dbhtml')[contains(.,'dir')]][last()]"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:variable>
-  <xsl:variable name="href.to.uri">
-    <xsl:call-template name="href.target.uri">
-      <xsl:with-param name="object" select="$object"/>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:variable name="href.from.uri">
-    <xsl:call-template name="href.target.uri">
-      <xsl:with-param name="object" select="$context"/>
-    </xsl:call-template>
-  </xsl:variable>
-  <!-- * <xsl:message>toc-context: <xsl:value-of select="local-name($toc-context)"/></xsl:message> -->
-  <!-- * <xsl:message>node: <xsl:value-of select="local-name(.)"/></xsl:message> -->
-  <!-- * <xsl:message>context: <xsl:value-of select="local-name($context)"/></xsl:message> -->
-  <!-- * <xsl:message>object: <xsl:value-of select="local-name($object)"/></xsl:message> -->
-  <!-- * <xsl:message>toc-output-dir: <xsl:value-of select="$toc-output-dir"/></xsl:message> -->
-  <!-- * <xsl:message>linked-file-output-dir: <xsl:value-of select="$linked-file-output-dir"/></xsl:message> -->
-  <!-- * <xsl:message>href.to.uri: <xsl:value-of select="$href.to.uri"/></xsl:message> -->
-  <!-- * <xsl:message>href.from.uri: <xsl:value-of select="$href.from.uri"/></xsl:message> -->
-  <xsl:variable name="href.to">
-    <xsl:choose>
-      <!-- * 2007-07-19, MikeSmith: Added the following conditional to -->
-      <!-- * deal with a problem case for links in TOCs. It checks to see -->
-      <!-- * if the output dir that a TOC will get written to is -->
-      <!-- * different from the output dir of the file being linked to. -->
-      <!-- * If it is different, we do not call trim.common.uri.paths. -->
-      <!-- *  -->
-      <!-- * Reason why I added that conditional is: I ran into a bug for -->
-      <!-- * this case: -->
-      <!-- *  -->
-      <!-- * 1. we are chunking into separate dirs -->
-      <!-- *  -->
-      <!-- * 2. output for the TOC is written to current dir, but the file -->
-      <!-- *    being linked to is written to some subdir "foo". -->
-      <!-- *  -->
-      <!-- * For that case, links to that file in that TOC did not show -->
-      <!-- * the correct path - they omitted the "foo". -->
-      <!-- *  -->
-      <!-- * The cause of that problem was that the trim.common.uri.paths -->
-      <!-- * template[1] was being called under all conditions. But it's -->
-      <!-- * apparent that we don't want to call trim.common.uri.paths in -->
-      <!-- * the case where a linked file is being written to a different -->
-      <!-- * directory than the TOC that contains the link, because doing -->
-      <!-- * so will cause a necessary (not redundant) directory-name -->
-      <!-- * part of the link to get inadvertently trimmed, resulting in -->
-      <!-- * a broken link to that file. Thus, added the conditional. -->
-      <!-- *  -->
-      <!-- * [1] The purpose of the trim.common.uri.paths template is to -->
-      <!-- * prevent cases where, if we didn't call it, we end up with -->
-      <!-- * unnecessary, redundant directory names getting output; for -->
-      <!-- * example, "foo/foo/refname.html". -->
-      <xsl:when test="not($toc-output-dir = $linked-file-output-dir)">
-        <xsl:value-of select="$href.to.uri"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="trim.common.uri.paths">
-          <xsl:with-param name="uriA" select="$href.to.uri"/>
-          <xsl:with-param name="uriB" select="$href.from.uri"/>
-          <xsl:with-param name="return" select="'A'"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-  <xsl:variable name="href.from">
-    <xsl:call-template name="trim.common.uri.paths">
-      <xsl:with-param name="uriA" select="$href.to.uri"/>
-      <xsl:with-param name="uriB" select="$href.from.uri"/>
-      <xsl:with-param name="return" select="'B'"/>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:variable name="depth">
-    <xsl:call-template name="count.uri.path.depth">
-      <xsl:with-param name="filename" select="$href.from"/>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:variable name="href">
-    <xsl:call-template name="copy-string">
-      <xsl:with-param name="string" select="'../'"/>
-      <xsl:with-param name="count" select="$depth"/>
-    </xsl:call-template>
-    <xsl:value-of select="$href.to"/>
-  </xsl:variable>
-  <!--
-  <xsl:message>
-    <xsl:text>In </xsl:text>
-    <xsl:value-of select="name(.)"/>
-    <xsl:text> (</xsl:text>
-    <xsl:value-of select="$href.from"/>
-    <xsl:text>,</xsl:text>
-    <xsl:value-of select="$depth"/>
-    <xsl:text>) </xsl:text>
-    <xsl:value-of select="name($object)"/>
-    <xsl:text> href=</xsl:text>
-    <xsl:value-of select="$href"/>
-  </xsl:message>
-  -->
-  <xsl:value-of select="$href"/>
-</xsl:template>
-
-<!-- Returns the complete olink href value if found -->
-<!-- Must take into account any dbhtml dir of the chunk containing the olink -->
-<xsl:template name="make.olink.href">
-  <xsl:param name="olink.key" select="''"/>
-  <xsl:param name="target.database"/>
-
-  <xsl:if test="$olink.key != ''">
-    <xsl:variable name="target.href">
-      <xsl:for-each select="$target.database">
-        <xsl:value-of select="key('targetptr-key', $olink.key)/@href"/>
-      </xsl:for-each>
-    </xsl:variable>
-  
-    <!-- an olink starting point may be in a subdirectory, so need
-         the "from" reference point to compute a relative path -->
-
-    <xsl:variable name="from.href">
-      <xsl:call-template name="olink.from.uri">
-        <xsl:with-param name="target.database" select="$target.database"/>
-        <xsl:with-param name="object" select="."/>
-        <xsl:with-param name="object.targetdoc" select="$current.docid"/>
-      </xsl:call-template>
-    </xsl:variable>
-
-    <!-- If the from.href has directory path, then must "../" upward
-         to document level -->
-    <xsl:variable name="upward.from.path">
-      <xsl:call-template name="upward.path">
-        <xsl:with-param name="path" select="$from.href"/>
-      </xsl:call-template>
-    </xsl:variable>
-
-    <xsl:variable name="targetdoc">
-      <xsl:value-of select="substring-before($olink.key, '/')"/>
-    </xsl:variable>
-  
-    <!-- Does the target database use a sitemap? -->
-    <xsl:variable name="use.sitemap">
-      <xsl:choose>
-        <xsl:when test="$target.database//sitemap">1</xsl:when>
-        <xsl:otherwise>0</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-  
-  
-    <!-- Get the baseuri for this targetptr -->
-    <xsl:variable name="baseuri">
-      <xsl:choose>
-        <!-- Does the database use a sitemap? -->
-        <xsl:when test="$use.sitemap != 0">
-          <xsl:choose>
-            <!-- Was current.docid parameter set? -->
-            <xsl:when test="$current.docid != ''">
-              <!-- Was it found in the database? -->
-              <xsl:variable name="currentdoc.key">
-                <xsl:for-each select="$target.database">
-                  <xsl:value-of select="key('targetdoc-key',                                         $current.docid)/@targetdoc"/>
-                </xsl:for-each>
-              </xsl:variable>
-              <xsl:choose>
-                <xsl:when test="$currentdoc.key != ''">
-                  <xsl:for-each select="$target.database">
-                    <xsl:call-template name="targetpath">
-                      <xsl:with-param name="dirnode" select="key('targetdoc-key', $current.docid)/parent::dir"/>
-                      <xsl:with-param name="targetdoc" select="$targetdoc"/>
-                    </xsl:call-template>
-                  </xsl:for-each>
-                </xsl:when>
-                <xsl:otherwise>
-                  <xsl:message>
-                    <xsl:text>Olink error: cannot compute relative </xsl:text>
-                    <xsl:text>sitemap path because $current.docid '</xsl:text>
-                    <xsl:value-of select="$current.docid"/>
-                    <xsl:text>' not found in target database.</xsl:text>
-                  </xsl:message>
-                </xsl:otherwise>
-              </xsl:choose>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:message>
-                <xsl:text>Olink warning: cannot compute relative </xsl:text>
-                <xsl:text>sitemap path without $current.docid parameter</xsl:text>
-              </xsl:message>
-            </xsl:otherwise>
-          </xsl:choose> 
-          <!-- In either case, add baseuri from its document entry-->
-          <xsl:variable name="docbaseuri">
-            <xsl:for-each select="$target.database">
-              <xsl:value-of select="key('targetdoc-key', $targetdoc)/@baseuri"/>
-            </xsl:for-each>
-          </xsl:variable>
-          <xsl:if test="$docbaseuri != ''">
-            <xsl:value-of select="$docbaseuri"/>
-          </xsl:if>
-        </xsl:when>
-        <!-- No database sitemap in use -->
-        <xsl:otherwise>
-          <!-- Just use any baseuri from its document entry -->
-          <xsl:variable name="docbaseuri">
-            <xsl:for-each select="$target.database">
-              <xsl:value-of select="key('targetdoc-key', $targetdoc)/@baseuri"/>
-            </xsl:for-each>
-          </xsl:variable>
-          <xsl:if test="$docbaseuri != ''">
-            <xsl:value-of select="$docbaseuri"/>
-          </xsl:if>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-  
-    <!-- Form the href information -->
-    <xsl:if test="not(contains($baseuri, ':'))">
-      <!-- if not an absolute uri, add upward path from olink chunk -->
-      <xsl:value-of select="$upward.from.path"/>
-    </xsl:if>
-
-    <xsl:if test="$baseuri != ''">
-      <xsl:value-of select="$baseuri"/>
-      <xsl:if test="substring($target.href,1,1) != '#'">
-        <!--xsl:text>/</xsl:text-->
-      </xsl:if>
-    </xsl:if>
-    <!-- optionally turn off frag for PDF references -->
-    <xsl:if test="not($insert.olink.pdf.frag = 0 and           translate(substring($baseuri, string-length($baseuri) - 3),                     'PDF', 'pdf') = '.pdf'           and starts-with($target.href, '#') )">
-      <xsl:value-of select="$target.href"/>
-    </xsl:if>
-  </xsl:if>
-</xsl:template>
-
-<!-- Computes "../" to reach top -->
-<xsl:template name="upward.path">
-  <xsl:param name="path" select="''"/>
-  <xsl:choose> 
-    <!-- Don't bother with absolute uris -->
-    <xsl:when test="contains($path, ':')"/>
-    <xsl:when test="starts-with($path, '/')"/>
-    <xsl:when test="contains($path, '/')">
-      <xsl:text>../</xsl:text>
-      <xsl:call-template name="upward.path">
-        <xsl:with-param name="path" select="substring-after($path, '/')"/>
-      </xsl:call-template>
-    </xsl:when>
-  </xsl:choose>
-
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="html.head">
-  <xsl:param name="prev" select="/foo"/>
-  <xsl:param name="next" select="/foo"/>
-  <xsl:variable name="this" select="."/>
-  <xsl:variable name="home" select="/*[1]"/>
-  <xsl:variable name="up" select="parent::*"/>
-
-  <head>
-    <xsl:call-template name="system.head.content"/>
-    <xsl:call-template name="head.content"/>
-
-    <xsl:if test="$home">
-      <link rel="start">
-        <xsl:attribute name="href">
-          <xsl:call-template name="href.target">
-            <xsl:with-param name="object" select="$home"/>
-          </xsl:call-template>
-        </xsl:attribute>
-        <xsl:attribute name="title">
-          <xsl:apply-templates select="$home" mode="object.title.markup.textonly"/>
-        </xsl:attribute>
-      </link>
-    </xsl:if>
-
-    <xsl:if test="$up">
-      <link rel="up">
-        <xsl:attribute name="href">
-          <xsl:call-template name="href.target">
-            <xsl:with-param name="object" select="$up"/>
-          </xsl:call-template>
-        </xsl:attribute>
-        <xsl:attribute name="title">
-          <xsl:apply-templates select="$up" mode="object.title.markup.textonly"/>
-        </xsl:attribute>
-      </link>
-    </xsl:if>
-
-    <xsl:if test="$prev">
-      <link rel="prev">
-        <xsl:attribute name="href">
-          <xsl:call-template name="href.target">
-            <xsl:with-param name="object" select="$prev"/>
-          </xsl:call-template>
-        </xsl:attribute>
-        <xsl:attribute name="title">
-          <xsl:apply-templates select="$prev" mode="object.title.markup.textonly"/>
-        </xsl:attribute>
-      </link>
-    </xsl:if>
-
-    <xsl:if test="$next">
-      <link rel="next">
-        <xsl:attribute name="href">
-          <xsl:call-template name="href.target">
-            <xsl:with-param name="object" select="$next"/>
-          </xsl:call-template>
-        </xsl:attribute>
-        <xsl:attribute name="title">
-          <xsl:apply-templates select="$next" mode="object.title.markup.textonly"/>
-        </xsl:attribute>
-      </link>
-    </xsl:if>
-
-    <xsl:if test="$html.extra.head.links != 0">
-      <xsl:for-each select="//part                             |//reference                             |//preface                             |//chapter                             |//article                             |//refentry                             |//appendix[not(parent::article)]|appendix                             |//glossary[not(parent::article)]|glossary                             |//index[not(parent::article)]|index">
-        <link rel="{local-name(.)}">
-          <xsl:attribute name="href">
-            <xsl:call-template name="href.target">
-              <xsl:with-param name="context" select="$this"/>
-              <xsl:with-param name="object" select="."/>
-            </xsl:call-template>
-          </xsl:attribute>
-          <xsl:attribute name="title">
-            <xsl:apply-templates select="." mode="object.title.markup.textonly"/>
-          </xsl:attribute>
-        </link>
-      </xsl:for-each>
-
-      <xsl:for-each select="section|sect1|refsection|refsect1">
-        <link>
-          <xsl:attribute name="rel">
-            <xsl:choose>
-              <xsl:when test="local-name($this) = 'section'                               or local-name($this) = 'refsection'">
-                <xsl:value-of select="'subsection'"/>
-              </xsl:when>
-              <xsl:otherwise>
-                <xsl:value-of select="'section'"/>
-              </xsl:otherwise>
-            </xsl:choose>
-          </xsl:attribute>
-          <xsl:attribute name="href">
-            <xsl:call-template name="href.target">
-              <xsl:with-param name="context" select="$this"/>
-              <xsl:with-param name="object" select="."/>
-            </xsl:call-template>
-          </xsl:attribute>
-          <xsl:attribute name="title">
-            <xsl:apply-templates select="." mode="object.title.markup.textonly"/>
-          </xsl:attribute>
-        </link>
-      </xsl:for-each>
-
-      <xsl:for-each select="sect2|sect3|sect4|sect5|refsect2|refsect3">
-        <link rel="subsection">
-          <xsl:attribute name="href">
-            <xsl:call-template name="href.target">
-              <xsl:with-param name="context" select="$this"/>
-              <xsl:with-param name="object" select="."/>
-            </xsl:call-template>
-          </xsl:attribute>
-          <xsl:attribute name="title">
-            <xsl:apply-templates select="." mode="object.title.markup.textonly"/>
-          </xsl:attribute>
-        </link>
-      </xsl:for-each>
-    </xsl:if>
-
-    <!-- * if we have a legalnotice and user wants it output as a -->
-    <!-- * separate page and $html.head.legalnotice.link.types is -->
-    <!-- * non-empty, we generate a link or links for each value in -->
-    <!-- * $html.head.legalnotice.link.types -->
-    <xsl:if test="//legalnotice                   and not($generate.legalnotice.link = 0)                   and not($html.head.legalnotice.link.types = '')">
-      <xsl:call-template name="make.legalnotice.head.links"/>
-    </xsl:if>
-
-    <xsl:call-template name="user.head.content"/>
-  </head>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="header.navigation">
-  <xsl:param name="prev" select="/foo"/>
-  <xsl:param name="next" select="/foo"/>
-  <xsl:param name="nav.context"/>
-
-  <xsl:variable name="home" select="/*[1]"/>
-  <xsl:variable name="up" select="parent::*"/>
-
-  <xsl:variable name="row1" select="$navig.showtitles != 0"/>
-  <xsl:variable name="row2" select="count($prev) &gt; 0                                     or (count($up) &gt; 0                                          and generate-id($up) != generate-id($home)                                         and $navig.showtitles != 0)                                     or count($next) &gt; 0"/>
-
-  <xsl:if test="$suppress.navigation = '0' and $suppress.header.navigation = '0'">
-    <div class="navheader">
-      <xsl:if test="$row1 or $row2">
-        <table width="100%" summary="Navigation header">
-          <xsl:if test="$row1">
-            <tr>
-              <th colspan="3" align="center">
-                <xsl:apply-templates select="." mode="object.title.markup"/>
-              </th>
-            </tr>
-          </xsl:if>
-
-          <xsl:if test="$row2">
-            <tr>
-              <td width="20%" align="left">
-                <xsl:if test="count($prev)&gt;0">
-                  <a accesskey="p">
-                    <xsl:attribute name="href">
-                      <xsl:call-template name="href.target">
-                        <xsl:with-param name="object" select="$prev"/>
-                      </xsl:call-template>
-                    </xsl:attribute>
-                    <xsl:call-template name="navig.content">
-                      <xsl:with-param name="direction" select="'prev'"/>
-                    </xsl:call-template>
-                  </a>
-                </xsl:if>
-                <xsl:text>&#160;</xsl:text>
-              </td>
-              <th width="60%" align="center">
-                <xsl:choose>
-                  <xsl:when test="count($up) &gt; 0                                   and generate-id($up) != generate-id($home)                                   and $navig.showtitles != 0">
-                    <xsl:apply-templates select="$up" mode="object.title.markup"/>
-                  </xsl:when>
-                  <xsl:otherwise>&#160;</xsl:otherwise>
-                </xsl:choose>
-              </th>
-              <td width="20%" align="right">
-                <xsl:text>&#160;</xsl:text>
-                <xsl:if test="count($next)&gt;0">
-                  <a accesskey="n">
-                    <xsl:attribute name="href">
-                      <xsl:call-template name="href.target">
-                        <xsl:with-param name="object" select="$next"/>
-                      </xsl:call-template>
-                    </xsl:attribute>
-                    <xsl:call-template name="navig.content">
-                      <xsl:with-param name="direction" select="'next'"/>
-                    </xsl:call-template>
-                  </a>
-                </xsl:if>
-              </td>
-            </tr>
-          </xsl:if>
-        </table>
-      </xsl:if>
-      <xsl:if test="$header.rule != 0">
-        <hr/>
-      </xsl:if>
-    </div>
-  </xsl:if>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="footer.navigation">
-  <xsl:param name="prev" select="/foo"/>
-  <xsl:param name="next" select="/foo"/>
-  <xsl:param name="nav.context"/>
-
-  <xsl:variable name="home" select="/*[1]"/>
-  <xsl:variable name="up" select="parent::*"/>
-
-  <xsl:variable name="row1" select="count($prev) &gt; 0                                     or count($up) &gt; 0                                     or count($next) &gt; 0"/>
-
-  <xsl:variable name="row2" select="($prev and $navig.showtitles != 0)                                     or (generate-id($home) != generate-id(.)                                         or $nav.context = 'toc')                                     or ($chunk.tocs.and.lots != 0                                         and $nav.context != 'toc')                                     or ($next and $navig.showtitles != 0)"/>
-
-  <xsl:if test="$suppress.navigation = '0' and $suppress.footer.navigation = '0'">
-    <div class="navfooter">
-      <xsl:if test="$footer.rule != 0">
-        <hr/>
-      </xsl:if>
-
-      <xsl:if test="$row1 or $row2">
-        <table width="100%" summary="Navigation footer">
-          <xsl:if test="$row1">
-            <tr>
-              <td width="40%" align="left">
-                <xsl:if test="count($prev)&gt;0">
-                  <a accesskey="p">
-                    <xsl:attribute name="href">
-                      <xsl:call-template name="href.target">
-                        <xsl:with-param name="object" select="$prev"/>
-                      </xsl:call-template>
-                    </xsl:attribute>
-                    <xsl:call-template name="navig.content">
-                      <xsl:with-param name="direction" select="'prev'"/>
-                    </xsl:call-template>
-                  </a>
-                </xsl:if>
-                <xsl:text>&#160;</xsl:text>
-              </td>
-              <td width="20%" align="center">
-                <xsl:choose>
-                  <xsl:when test="count($up)&gt;0                                   and generate-id($up) != generate-id($home)">
-                    <a accesskey="u">
-                      <xsl:attribute name="href">
-                        <xsl:call-template name="href.target">
-                          <xsl:with-param name="object" select="$up"/>
-                        </xsl:call-template>
-                      </xsl:attribute>
-                      <xsl:call-template name="navig.content">
-                        <xsl:with-param name="direction" select="'up'"/>
-                      </xsl:call-template>
-                    </a>
-                  </xsl:when>
-                  <xsl:otherwise>&#160;</xsl:otherwise>
-                </xsl:choose>
-              </td>
-              <td width="40%" align="right">
-                <xsl:text>&#160;</xsl:text>
-                <xsl:if test="count($next)&gt;0">
-                  <a accesskey="n">
-                    <xsl:attribute name="href">
-                      <xsl:call-template name="href.target">
-                        <xsl:with-param name="object" select="$next"/>
-                      </xsl:call-template>
-                    </xsl:attribute>
-                    <xsl:call-template name="navig.content">
-                      <xsl:with-param name="direction" select="'next'"/>
-                    </xsl:call-template>
-                  </a>
-                </xsl:if>
-              </td>
-            </tr>
-          </xsl:if>
-
-          <xsl:if test="$row2">
-            <tr>
-              <td width="40%" align="left" valign="top">
-                <xsl:if test="$navig.showtitles != 0">
-                  <xsl:apply-templates select="$prev" mode="object.title.markup"/>
-                </xsl:if>
-                <xsl:text>&#160;</xsl:text>
-              </td>
-              <td width="20%" align="center">
-                <xsl:choose>
-                  <xsl:when test="$home != . or $nav.context = 'toc'">
-                    <a accesskey="h">
-                      <xsl:attribute name="href">
-                        <xsl:call-template name="href.target">
-                          <xsl:with-param name="object" select="$home"/>
-                        </xsl:call-template>
-                      </xsl:attribute>
-                      <xsl:call-template name="navig.content">
-                        <xsl:with-param name="direction" select="'home'"/>
-                      </xsl:call-template>
-                    </a>
-                    <xsl:if test="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
-                      <xsl:text>&#160;|&#160;</xsl:text>
-                    </xsl:if>
-                  </xsl:when>
-                  <xsl:otherwise>&#160;</xsl:otherwise>
-                </xsl:choose>
-
-                <xsl:if test="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
-                  <a accesskey="t">
-                    <xsl:attribute name="href">
-                      <xsl:apply-templates select="/*[1]" mode="recursive-chunk-filename">
-                        <xsl:with-param name="recursive" select="true()"/>
-                      </xsl:apply-templates>
-                      <xsl:text>-toc</xsl:text>
-                      <xsl:value-of select="$html.ext"/>
-                    </xsl:attribute>
-                    <xsl:call-template name="gentext">
-                      <xsl:with-param name="key" select="'nav-toc'"/>
-                    </xsl:call-template>
-                  </a>
-                </xsl:if>
-              </td>
-              <td width="40%" align="right" valign="top">
-                <xsl:text>&#160;</xsl:text>
-                <xsl:if test="$navig.showtitles != 0">
-                  <xsl:apply-templates select="$next" mode="object.title.markup"/>
-                </xsl:if>
-              </td>
-            </tr>
-          </xsl:if>
-        </table>
-      </xsl:if>
-    </div>
-  </xsl:if>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="navig.content">
-    <xsl:param name="direction" select="next"/>
-    <xsl:variable name="navtext">
-        <xsl:choose>
-            <xsl:when test="$direction = 'prev'">
-                <xsl:call-template name="gentext.nav.prev"/>
-            </xsl:when>
-            <xsl:when test="$direction = 'next'">
-                <xsl:call-template name="gentext.nav.next"/>
-            </xsl:when>
-            <xsl:when test="$direction = 'up'">
-                <xsl:call-template name="gentext.nav.up"/>
-            </xsl:when>
-            <xsl:when test="$direction = 'home'">
-                <xsl:call-template name="gentext.nav.home"/>
-            </xsl:when>
-            <xsl:otherwise>
-                <xsl:text>xxx</xsl:text>
-            </xsl:otherwise>
-        </xsl:choose>
-    </xsl:variable>
-
-    <xsl:choose>
-        <xsl:when test="$navig.graphics != 0">
-            <img>
-                <xsl:attribute name="src">
-                    <xsl:value-of select="$navig.graphics.path"/>
-                    <xsl:value-of select="$direction"/>
-                    <xsl:value-of select="$navig.graphics.extension"/>
-                </xsl:attribute>
-                <xsl:attribute name="alt">
-                    <xsl:value-of select="$navtext"/>
-                </xsl:attribute>
-            </img>
-        </xsl:when>
-        <xsl:otherwise>
-            <xsl:value-of select="$navtext"/>
-        </xsl:otherwise>
-    </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<!-- * The following template assumes that the first legalnotice -->
-<!-- * instance found in a document applies to the contents of the -->
-<!-- * entire document. It generates an HTML link in each chunk, back -->
-<!-- * to the file containing the contents of the first legalnotice. -->
-<!-- * -->
-<!-- * Actually, it may generate multiple link instances in each chunk, -->
-<!-- * because it walks through the space-separated list of link -->
-<!-- * types specified in the $html.head.legalnotice.link.types param, -->
-<!-- * popping off link types and generating links for them until it -->
-<!-- * depletes the list. -->
-  
-<xsl:template name="make.legalnotice.head.links">
-  <!-- * the following ID is used as part of the legalnotice filename; -->
-  <!-- * we need it in order to construct the filename for use in the -->
-  <!-- * value of the href attribute on the link -->
-  <xsl:param name="id">
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="(//legalnotice)[1]"/>
-    </xsl:call-template>
-  </xsl:param>
-  <xsl:param name="linktype">
-    <xsl:choose>
-      <xsl:when test="contains($html.head.legalnotice.link.types, ' ')">
-        <xsl:value-of select="normalize-space(                     substring-before($html.head.legalnotice.link.types, ' '))"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$html.head.legalnotice.link.types"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:param>
-  <xsl:param name="remaining.linktypes" select="concat(               normalize-space(               substring-after($html.head.legalnotice.link.types, ' ')),' ')"/>
-  <xsl:if test="not($linktype = '')">
-    <link rel="{$linktype}">
-      <xsl:attribute name="href">
-        <xsl:value-of select="concat('ln-',$id,$html.ext)"/>
-      </xsl:attribute>
-      <xsl:attribute name="title">
-        <xsl:apply-templates select="(//legalnotice)[1]" mode="object.title.markup.textonly"/>
-      </xsl:attribute>
-    </link>
-    <xsl:call-template name="make.legalnotice.head.links">
-      <!-- * pop the next value off the list of link types -->
-      <xsl:with-param name="linktype" select="substring-before($remaining.linktypes, ' ')"/>
-      <!-- * remove the link type from the list of remaining link types -->
-      <xsl:with-param name="remaining.linktypes" select="substring-after($remaining.linktypes, ' ')"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<!-- ==================================================================== -->
-<xsl:template name="chunk-element-content">
-  <xsl:param name="prev"/>
-  <xsl:param name="next"/>
-  <xsl:param name="nav.context"/>
-  <xsl:param name="content">
-    <xsl:apply-imports/>
-  </xsl:param>
-
-  <xsl:call-template name="user.preroot"/>
-
-  <html>
-    <xsl:call-template name="html.head">
-      <xsl:with-param name="prev" select="$prev"/>
-      <xsl:with-param name="next" select="$next"/>
-    </xsl:call-template>
-
-    <body>
-      <xsl:call-template name="body.attributes"/>
-      <xsl:call-template name="user.header.navigation"/>
-
-      <xsl:call-template name="header.navigation">
-        <xsl:with-param name="prev" select="$prev"/>
-        <xsl:with-param name="next" select="$next"/>
-        <xsl:with-param name="nav.context" select="$nav.context"/>
-      </xsl:call-template>
-
-      <xsl:call-template name="user.header.content"/>
-
-      <xsl:copy-of select="$content"/>
-
-      <xsl:call-template name="user.footer.content"/>
-
-      <xsl:call-template name="footer.navigation">
-        <xsl:with-param name="prev" select="$prev"/>
-        <xsl:with-param name="next" select="$next"/>
-        <xsl:with-param name="nav.context" select="$nav.context"/>
-      </xsl:call-template>
-
-      <xsl:call-template name="user.footer.navigation"/>
-    </body>
-  </html>
-  <xsl:value-of select="$chunk.append"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-<xsl:template name="generate.manifest">
-  <xsl:param name="node" select="/"/>
-  <xsl:call-template name="write.text.chunk">
-    <xsl:with-param name="filename">
-      <xsl:if test="$manifest.in.base.dir != 0">
-        <xsl:value-of select="$base.dir"/>
-      </xsl:if>
-      <xsl:value-of select="$manifest"/>
-    </xsl:with-param>
-    <xsl:with-param name="method" select="'text'"/>
-    <xsl:with-param name="content">
-      <xsl:apply-templates select="$node" mode="enumerate-files"/>
-    </xsl:with-param>
-    <xsl:with-param name="encoding" select="$chunker.output.encoding"/>
-  </xsl:call-template>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="dbhtml-dir">
-  <xsl:param name="context" select="."/>
-  <!-- directories are now inherited from previous levels -->
-  <xsl:variable name="ppath">
-    <xsl:if test="$context/parent::*">
-      <xsl:call-template name="dbhtml-dir">
-        <xsl:with-param name="context" select="$context/parent::*"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:variable>
-  <xsl:variable name="path">
-    <xsl:call-template name="pi.dbhtml_dir">
-      <xsl:with-param name="node" select="$context"/>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:choose>
-    <xsl:when test="$path = ''">
-      <xsl:if test="$ppath != ''">
-        <xsl:value-of select="$ppath"/>
-      </xsl:if>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:if test="$ppath != ''">
-        <xsl:value-of select="$ppath"/>
-        <xsl:if test="substring($ppath, string-length($ppath), 1) != '/'">
-          <xsl:text>/</xsl:text>
-        </xsl:if>
-      </xsl:if>
-      <xsl:value-of select="$path"/>
-      <xsl:text>/</xsl:text>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/chunk.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/chunk.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,52 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="exsl">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<!-- First import the non-chunking templates that format elements
-     within each chunk file. In a customization, you should
-     create a separate non-chunking customization layer such
-     as mydocbook.xsl that imports the original docbook.xsl and
-     customizes any presentation templates. Then your chunking
-     customization should import mydocbook.xsl instead of
-     docbook.xsl.  -->
-<xsl:import href="docbook.xsl"/>
-
-<!-- chunk-common.xsl contains all the named templates for chunking.
-     In a customization file, you import chunk-common.xsl, then
-     add any customized chunking templates of the same name. 
-     They will have import precedence over the original 
-     chunking templates in chunk-common.xsl. -->
-<xsl:import href="chunk-common.xsl"/>
-
-<!-- The manifest.xsl module is no longer imported because its
-     templates were moved into chunk-common and chunk-code -->
-
-<!-- chunk-code.xsl contains all the chunking templates that use
-     a match attribute.  In a customization it should be referenced
-     using <xsl:include> instead of <xsl:import>, and then add
-     any customized chunking templates with match attributes. But be sure
-     to add a priority="1" to such customized templates to resolve
-     its conflict with the original, since they have the
-     same import precedence.
-     
-     Using xsl:include prevents adding another layer
-     of import precedence, which would cause any
-     customizations that use xsl:apply-imports to wrongly
-     apply the chunking version instead of the original
-     non-chunking version to format an element.  -->
-<xsl:include href="chunk-code.xsl"/>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/chunker.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/chunker.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,302 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saxon="http://icl.com/saxon" xmlns:lxslt="http://xml.apache.org/xslt" xmlns:redirect="http://xml.apache.org/xalan/redirect" xmlns:exsl="http://exslt.org/common" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="doc" extension-element-prefixes="saxon redirect lxslt exsl">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<!-- This stylesheet works with XSLT implementations that support -->
-<!-- exsl:document, saxon:output, or Xalan's redirect:write -->
-<!-- Note: Only Saxon 6.4.2 or later is supported. -->
-
-<xsl:param name="chunker.output.method" select="'xml'"/>
-<xsl:param name="chunker.output.encoding" select="'UTF-8'"/>
-<xsl:param name="chunker.output.indent" select="'no'"/>
-<xsl:param name="chunker.output.omit-xml-declaration" select="'no'"/>
-<xsl:param name="chunker.output.standalone" select="'no'"/>
-<xsl:param name="chunker.output.doctype-public" select="'-//W3C//DTD XHTML 1.0 Transitional//EN'"/>
-<xsl:param name="chunker.output.doctype-system" select="'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'"/>
-<xsl:param name="chunker.output.media-type" select="''"/>
-<xsl:param name="chunker.output.cdata-section-elements" select="''"/>
-<xsl:param name="chunker.output.quiet" select="0"/>
-
-<xsl:param name="saxon.character.representation" select="'entity;decimal'"/>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="make-relative-filename">
-  <xsl:param name="base.dir" select="'./'"/>
-  <xsl:param name="base.name" select="''"/>
-
-  <xsl:choose>
-    <!-- put Saxon first to work around a bug in libxslt -->
-    <xsl:when test="element-available('saxon:output')">
-      <!-- Saxon doesn't make the chunks relative -->
-      <xsl:value-of select="concat($base.dir,$base.name)"/>
-    </xsl:when>
-    <xsl:when test="element-available('exsl:document')">
-      <!-- EXSL document does make the chunks relative, I think -->
-      <xsl:choose>
-        <xsl:when test="count(parent::*) = 0">
-          <xsl:value-of select="concat($base.dir,$base.name)"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="$base.name"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:when test="element-available('redirect:write')">
-      <!-- Xalan doesn't make the chunks relative -->
-      <xsl:value-of select="concat($base.dir,$base.name)"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:message terminate="yes">
-        <xsl:text>Don't know how to chunk with </xsl:text>
-        <xsl:value-of select="system-property('xsl:vendor')"/>
-      </xsl:message>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="write.chunk">
-  <xsl:param name="filename" select="''"/>
-  <xsl:param name="quiet" select="$chunker.output.quiet"/>
-  <xsl:param name="suppress-context-node-name" select="0"/>
-  <xsl:param name="message-prolog"/>
-  <xsl:param name="message-epilog"/>
-
-  <xsl:param name="method" select="$chunker.output.method"/>
-  <xsl:param name="encoding" select="$chunker.output.encoding"/>
-  <xsl:param name="indent" select="$chunker.output.indent"/>
-  <xsl:param name="omit-xml-declaration" select="$chunker.output.omit-xml-declaration"/>
-  <xsl:param name="standalone" select="$chunker.output.standalone"/>
-  <xsl:param name="doctype-public" select="$chunker.output.doctype-public"/>
-  <xsl:param name="doctype-system" select="$chunker.output.doctype-system"/>
-  <xsl:param name="media-type" select="$chunker.output.media-type"/>
-  <xsl:param name="cdata-section-elements" select="$chunker.output.cdata-section-elements"/>
-
-  <xsl:param name="content"/>
-
-  <xsl:if test="$quiet = 0">
-    <xsl:message>
-      <xsl:if test="not($message-prolog = '')">
-        <xsl:value-of select="$message-prolog"/>
-      </xsl:if>
-      <xsl:text>Writing </xsl:text>
-      <xsl:value-of select="$filename"/>
-      <xsl:if test="name(.) != '' and $suppress-context-node-name = 0">
-        <xsl:text> for </xsl:text>
-        <xsl:value-of select="name(.)"/>
-        <xsl:if test="@id or @xml:id">
-          <xsl:text>(</xsl:text>
-          <xsl:value-of select="(@id|@xml:id)[1]"/>
-          <xsl:text>)</xsl:text>
-        </xsl:if>
-      </xsl:if>
-      <xsl:if test="not($message-epilog = '')">
-        <xsl:value-of select="$message-epilog"/>
-      </xsl:if>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:choose>
-    <xsl:when test="element-available('exsl:document')">
-      <xsl:choose>
-        <!-- Handle the permutations ... -->
-        <xsl:when test="$media-type != ''">
-          <xsl:choose>
-            <xsl:when test="$doctype-public != '' and $doctype-system != ''">
-              <exsl:document href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" media-type="{$media-type}" doctype-public="{$doctype-public}" doctype-system="{$doctype-system}" standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </exsl:document>
-            </xsl:when>
-            <xsl:when test="$doctype-public != '' and $doctype-system = ''">
-              <exsl:document href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" media-type="{$media-type}" doctype-public="{$doctype-public}" standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </exsl:document>
-            </xsl:when>
-            <xsl:when test="$doctype-public = '' and $doctype-system != ''">
-              <exsl:document href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" media-type="{$media-type}" doctype-system="{$doctype-system}" standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </exsl:document>
-            </xsl:when>
-            <xsl:otherwise><!-- $doctype-public = '' and $doctype-system = ''"> -->
-              <exsl:document href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" media-type="{$media-type}" standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </exsl:document>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:choose>
-            <xsl:when test="$doctype-public != '' and $doctype-system != ''">
-              <exsl:document href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" doctype-public="{$doctype-public}" doctype-system="{$doctype-system}" standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </exsl:document>
-            </xsl:when>
-            <xsl:when test="$doctype-public != '' and $doctype-system = ''">
-              <exsl:document href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" doctype-public="{$doctype-public}" standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </exsl:document>
-            </xsl:when>
-            <xsl:when test="$doctype-public = '' and $doctype-system != ''">
-              <exsl:document href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" doctype-system="{$doctype-system}" standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </exsl:document>
-            </xsl:when>
-            <xsl:otherwise><!-- $doctype-public = '' and $doctype-system = ''"> -->
-              <exsl:document href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </exsl:document>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-
-    <xsl:when test="element-available('saxon:output')">
-      <xsl:choose>
-        <!-- Handle the permutations ... -->
-        <xsl:when test="$media-type != ''">
-          <xsl:choose>
-            <xsl:when test="$doctype-public != '' and $doctype-system != ''">
-              <saxon:output saxon:character-representation="{$saxon.character.representation}" href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" media-type="{$media-type}" doctype-public="{$doctype-public}" doctype-system="{$doctype-system}" standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </saxon:output>
-            </xsl:when>
-            <xsl:when test="$doctype-public != '' and $doctype-system = ''">
-              <saxon:output saxon:character-representation="{$saxon.character.representation}" href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" media-type="{$media-type}" doctype-public="{$doctype-public}" standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </saxon:output>
-            </xsl:when>
-            <xsl:when test="$doctype-public = '' and $doctype-system != ''">
-              <saxon:output saxon:character-representation="{$saxon.character.representation}" href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" media-type="{$media-type}" doctype-system="{$doctype-system}" standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </saxon:output>
-            </xsl:when>
-            <xsl:otherwise><!-- $doctype-public = '' and $doctype-system = ''"> -->
-              <saxon:output saxon:character-representation="{$saxon.character.representation}" href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" media-type="{$media-type}" standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </saxon:output>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:choose>
-            <xsl:when test="$doctype-public != '' and $doctype-system != ''">
-              <saxon:output saxon:character-representation="{$saxon.character.representation}" href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" doctype-public="{$doctype-public}" doctype-system="{$doctype-system}" standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </saxon:output>
-            </xsl:when>
-            <xsl:when test="$doctype-public != '' and $doctype-system = ''">
-              <saxon:output saxon:character-representation="{$saxon.character.representation}" href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" doctype-public="{$doctype-public}" standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </saxon:output>
-            </xsl:when>
-            <xsl:when test="$doctype-public = '' and $doctype-system != ''">
-              <saxon:output saxon:character-representation="{$saxon.character.representation}" href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" doctype-system="{$doctype-system}" standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </saxon:output>
-            </xsl:when>
-            <xsl:otherwise><!-- $doctype-public = '' and $doctype-system = ''"> -->
-              <saxon:output saxon:character-representation="{$saxon.character.representation}" href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" standalone="{$standalone}">
-                <xsl:copy-of select="$content"/>
-              </saxon:output>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-
-    <xsl:when test="element-available('redirect:write')">
-      <!-- Xalan uses redirect -->
-      <redirect:write file="{$filename}">
-        <xsl:copy-of select="$content"/>
-      </redirect:write>
-    </xsl:when>
-
-    <xsl:otherwise>
-      <!-- it doesn't matter since we won't be making chunks... -->
-      <xsl:message terminate="yes">
-        <xsl:text>Can't make chunks with </xsl:text>
-        <xsl:value-of select="system-property('xsl:vendor')"/>
-        <xsl:text>'s processor.</xsl:text>
-      </xsl:message>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="write.chunk.with.doctype">
-  <xsl:param name="filename" select="''"/>
-  <xsl:param name="quiet" select="$chunker.output.quiet"/>
-
-  <xsl:param name="method" select="$chunker.output.method"/>
-  <xsl:param name="encoding" select="$chunker.output.encoding"/>
-  <xsl:param name="indent" select="$chunker.output.indent"/>
-  <xsl:param name="omit-xml-declaration" select="$chunker.output.omit-xml-declaration"/>
-  <xsl:param name="standalone" select="$chunker.output.standalone"/>
-  <xsl:param name="doctype-public" select="$chunker.output.doctype-public"/>
-  <xsl:param name="doctype-system" select="$chunker.output.doctype-system"/>
-  <xsl:param name="media-type" select="$chunker.output.media-type"/>
-  <xsl:param name="cdata-section-elements" select="$chunker.output.cdata-section-elements"/>
-
-  <xsl:param name="content"/>
-
-  <xsl:call-template name="write.chunk">
-    <xsl:with-param name="filename" select="$filename"/>
-    <xsl:with-param name="quiet" select="$quiet"/>
-    <xsl:with-param name="method" select="$method"/>
-    <xsl:with-param name="encoding" select="$encoding"/>
-    <xsl:with-param name="indent" select="$indent"/>
-    <xsl:with-param name="omit-xml-declaration" select="$omit-xml-declaration"/>
-    <xsl:with-param name="standalone" select="$standalone"/>
-    <xsl:with-param name="doctype-public" select="$doctype-public"/>
-    <xsl:with-param name="doctype-system" select="$doctype-system"/>
-    <xsl:with-param name="media-type" select="$media-type"/>
-    <xsl:with-param name="cdata-section-elements" select="$cdata-section-elements"/>
-    <xsl:with-param name="content" select="$content"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="write.text.chunk">
-  <xsl:param name="filename" select="''"/>
-  <xsl:param name="quiet" select="$chunker.output.quiet"/>
-  <xsl:param name="suppress-context-node-name" select="0"/>
-  <xsl:param name="message-prolog"/>
-  <xsl:param name="message-epilog"/>
-  <xsl:param name="method" select="'text'"/>
-  <xsl:param name="encoding" select="$chunker.output.encoding"/>
-  <xsl:param name="media-type" select="$chunker.output.media-type"/>
-  <xsl:param name="content"/>
-
-  <xsl:call-template name="write.chunk">
-    <xsl:with-param name="filename" select="$filename"/>
-    <xsl:with-param name="quiet" select="$quiet"/>
-    <xsl:with-param name="suppress-context-node-name" select="$suppress-context-node-name"/>
-    <xsl:with-param name="message-prolog" select="$message-prolog"/>
-    <xsl:with-param name="message-epilog" select="$message-epilog"/>
-    <xsl:with-param name="method" select="$method"/>
-    <xsl:with-param name="encoding" select="$encoding"/>
-    <xsl:with-param name="indent" select="'no'"/>
-    <xsl:with-param name="omit-xml-declaration" select="'no'"/>
-    <xsl:with-param name="standalone" select="'no'"/>
-    <xsl:with-param name="doctype-public"/>
-    <xsl:with-param name="doctype-system"/>
-    <xsl:with-param name="media-type" select="$media-type"/>
-    <xsl:with-param name="cdata-section-elements"/>
-    <xsl:with-param name="content" select="$content"/>
-  </xsl:call-template>
-</xsl:template>
-
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/chunkfast.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/chunkfast.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,69 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:cf="http://docbook.sourceforge.net/xmlns/chunkfast/1.0" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="cf exsl">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:import href="chunk.xsl"/>
-<xsl:param name="chunk.fast" select="1"/>
-
-<xsl:variable name="chunks" select="exsl:node-set($chunk.hierarchy)//cf:div"/>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="process-chunk-element">
-  <xsl:choose>
-    <xsl:when test="$chunk.fast != 0 and function-available('exsl:node-set')">
-      <xsl:variable name="genid" select="generate-id()"/>
-
-      <xsl:variable name="div" select="$chunks[@id=$genid or @xml:id=$genid]"/>
-
-      <xsl:variable name="prevdiv" select="($div/preceding-sibling::cf:div|$div/preceding::cf:div|$div/parent::cf:div)[last()]"/>
-      <xsl:variable name="prev" select="key('genid', ($prevdiv/@id|$prevdiv/@xml:id)[1])"/>
-
-      <xsl:variable name="nextdiv" select="($div/following-sibling::cf:div|$div/following::cf:div|$div/cf:div)[1]"/>
-      <xsl:variable name="next" select="key('genid', ($nextdiv/@id|$nextdiv/@xml:id)[1])"/>
-
-      <xsl:choose>
-        <xsl:when test="$onechunk != 0 and parent::*">
-          <xsl:apply-imports/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="process-chunk">
-            <xsl:with-param name="prev" select="$prev"/>
-            <xsl:with-param name="next" select="$next"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="$onechunk != 0 and not(parent::*)">
-          <xsl:call-template name="chunk-all-sections"/>
-        </xsl:when>
-        <xsl:when test="$onechunk != 0">
-          <xsl:apply-imports/>
-        </xsl:when>
-        <xsl:when test="$chunk.first.sections = 0">
-          <xsl:call-template name="chunk-first-section-with-parent"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="chunk-all-sections"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/chunktoc.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/chunktoc.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,462 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="doc">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:import href="docbook.xsl"/>
-<xsl:import href="chunk-common.xsl"/>
-
-<xsl:template name="chunk">
-  <xsl:param name="node" select="."/>
-  <!-- returns 1 if $node is a chunk -->
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="$node"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="chunks" select="document($chunk.toc,/)"/>
-
-  <xsl:choose>
-    <xsl:when test="$chunks//tocentry[@linkend=$id]">1</xsl:when>
-    <xsl:otherwise>0</xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="*" mode="chunk-filename">
-  <!-- returns the filename of a chunk -->
-
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="chunks" select="document($chunk.toc,/)"/>
-
-  <xsl:variable name="chunk" select="$chunks//tocentry[@linkend=$id]"/>
-  <xsl:variable name="filename">
-    <xsl:call-template name="pi.dbhtml_filename">
-      <xsl:with-param name="node" select="$chunk"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$chunk">
-      <xsl:value-of select="$filename"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates select="parent::*" mode="chunk-filename"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="process-chunk">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:variable name="chunks" select="document($chunk.toc,/)"/>
-
-  <xsl:variable name="chunk" select="$chunks//tocentry[@linkend=$id]"/>
-  <xsl:variable name="prev-id" select="($chunk/preceding::tocentry                          |$chunk/ancestor::tocentry)[last()]/@linkend"/>
-  <xsl:variable name="next-id" select="($chunk/following::tocentry                          |$chunk/child::tocentry)[1]/@linkend"/>
-
-  <xsl:variable name="prev" select="key('id',$prev-id)"/>
-  <xsl:variable name="next" select="key('id',$next-id)"/>
-
-  <xsl:variable name="ischunk">
-    <xsl:call-template name="chunk"/>
-  </xsl:variable>
-
-  <xsl:variable name="chunkfn">
-    <xsl:if test="$ischunk='1'">
-      <xsl:apply-templates mode="chunk-filename" select="."/>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="filename">
-    <xsl:call-template name="make-relative-filename">
-      <xsl:with-param name="base.dir" select="$base.dir"/>
-      <xsl:with-param name="base.name" select="$chunkfn"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$ischunk = 0">
-      <xsl:apply-imports/>
-    </xsl:when>
-
-    <xsl:otherwise>
-      <xsl:call-template name="write.chunk">
-        <xsl:with-param name="filename" select="$filename"/>
-        <xsl:with-param name="content">
-          <xsl:call-template name="chunk-element-content">
-            <xsl:with-param name="prev" select="$prev"/>
-            <xsl:with-param name="next" select="$next"/>
-          </xsl:call-template>
-        </xsl:with-param>
-        <xsl:with-param name="quiet" select="$chunk.quietly"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="set">
-  <xsl:call-template name="process-chunk"/>
-</xsl:template>
-
-<xsl:template match="book">
-  <xsl:call-template name="process-chunk"/>
-</xsl:template>
-
-<xsl:template match="book/appendix">
-  <xsl:call-template name="process-chunk"/>
-</xsl:template>
-
-<xsl:template match="book/glossary">
-  <xsl:call-template name="process-chunk"/>
-</xsl:template>
-
-<xsl:template match="book/bibliography">
-  <xsl:call-template name="process-chunk"/>
-</xsl:template>
-
-<xsl:template match="dedication" mode="dedication">
-  <xsl:call-template name="process-chunk"/>
-</xsl:template>
-
-<xsl:template match="preface|chapter">
-  <xsl:call-template name="process-chunk"/>
-</xsl:template>
-
-<xsl:template match="part|reference">
-  <xsl:call-template name="process-chunk"/>
-</xsl:template>
-
-<xsl:template match="refentry">
-  <xsl:call-template name="process-chunk"/>
-</xsl:template>
-
-<xsl:template match="colophon">
-  <xsl:call-template name="process-chunk"/>
-</xsl:template>
-
-<xsl:template match="article">
-  <xsl:call-template name="process-chunk"/>
-</xsl:template>
-
-<xsl:template match="article/appendix">
-  <xsl:call-template name="process-chunk"/>
-</xsl:template>
-
-<xsl:template match="article/glossary">
-  <xsl:call-template name="process-chunk"/>
-</xsl:template>
-
-<xsl:template match="article/bibliography">
-  <xsl:call-template name="process-chunk"/>
-</xsl:template>
-
-<xsl:template match="sect1|sect2|sect3|sect4|sect5|section">
-  <xsl:variable name="ischunk">
-    <xsl:call-template name="chunk"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$ischunk != 0">
-      <xsl:call-template name="process-chunk"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-imports/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="setindex                      |book/index                      |article/index">
-  <!-- some implementations use completely empty index tags to indicate -->
-  <!-- where an automatically generated index should be inserted. so -->
-  <!-- if the index is completely empty, skip it. -->
-  <xsl:if test="count(*)&gt;0 or $generate.index != '0'">
-    <xsl:call-template name="process-chunk"/>
-  </xsl:if>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="/">
-  <xsl:choose>
-    <xsl:when test="$chunk.toc = ''">
-      <xsl:message terminate="yes">
-        <xsl:text>The chunk.toc file is not set.</xsl:text>
-      </xsl:message>
-    </xsl:when>
-
-    <xsl:when test="$rootid != ''">
-      <xsl:choose>
-        <xsl:when test="count(key('id',$rootid)) = 0">
-          <xsl:message terminate="yes">
-            <xsl:text>ID '</xsl:text>
-            <xsl:value-of select="$rootid"/>
-            <xsl:text>' not found in document.</xsl:text>
-          </xsl:message>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates select="key('id',$rootid)"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-
-    <xsl:otherwise>
-      <xsl:apply-templates select="/" mode="process.root"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="*" mode="process.root">
-  <xsl:apply-templates select="."/>
-</xsl:template>
-
-<xsl:template name="make.lots">
-  <xsl:param name="toc.params" select="''"/>
-  <xsl:param name="toc"/>
-
-  <xsl:variable name="lots">
-    <xsl:if test="contains($toc.params, 'toc')">
-      <xsl:copy-of select="$toc"/>
-    </xsl:if>
-
-    <xsl:if test="contains($toc.params, 'figure')">
-      <xsl:choose>
-        <xsl:when test="$chunk.separate.lots != '0'">
-          <xsl:call-template name="make.lot.chunk">
-            <xsl:with-param name="type" select="'figure'"/>
-            <xsl:with-param name="lot">
-              <xsl:call-template name="list.of.titles">
-                <xsl:with-param name="titles" select="'figure'"/>
-                <xsl:with-param name="nodes" select=".//figure"/>
-              </xsl:call-template>
-            </xsl:with-param>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="list.of.titles">
-            <xsl:with-param name="titles" select="'figure'"/>
-            <xsl:with-param name="nodes" select=".//figure"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:if>
-
-    <xsl:if test="contains($toc.params, 'table')">
-      <xsl:choose>
-        <xsl:when test="$chunk.separate.lots != '0'">
-          <xsl:call-template name="make.lot.chunk">
-            <xsl:with-param name="type" select="'table'"/>
-            <xsl:with-param name="lot">
-              <xsl:call-template name="list.of.titles">
-                <xsl:with-param name="titles" select="'table'"/>
-                <xsl:with-param name="nodes" select=".//table"/>
-              </xsl:call-template>
-            </xsl:with-param>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="list.of.titles">
-            <xsl:with-param name="titles" select="'table'"/>
-            <xsl:with-param name="nodes" select=".//table"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:if>
-
-    <xsl:if test="contains($toc.params, 'example')">
-      <xsl:choose>
-        <xsl:when test="$chunk.separate.lots != '0'">
-          <xsl:call-template name="make.lot.chunk">
-            <xsl:with-param name="type" select="'example'"/>
-            <xsl:with-param name="lot">
-              <xsl:call-template name="list.of.titles">
-                <xsl:with-param name="titles" select="'example'"/>
-                <xsl:with-param name="nodes" select=".//example"/>
-              </xsl:call-template>
-            </xsl:with-param>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="list.of.titles">
-            <xsl:with-param name="titles" select="'example'"/>
-            <xsl:with-param name="nodes" select=".//example"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:if>
-
-    <xsl:if test="contains($toc.params, 'equation')">
-      <xsl:choose>
-        <xsl:when test="$chunk.separate.lots != '0'">
-          <xsl:call-template name="make.lot.chunk">
-            <xsl:with-param name="type" select="'equation'"/>
-            <xsl:with-param name="lot">
-              <xsl:call-template name="list.of.titles">
-                <xsl:with-param name="titles" select="'equation'"/>
-                <xsl:with-param name="nodes" select=".//equation"/>
-              </xsl:call-template>
-            </xsl:with-param>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="list.of.titles">
-            <xsl:with-param name="titles" select="'equation'"/>
-            <xsl:with-param name="nodes" select=".//equation"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:if>
-
-    <xsl:if test="contains($toc.params, 'procedure')">
-      <xsl:choose>
-        <xsl:when test="$chunk.separate.lots != '0'">
-          <xsl:call-template name="make.lot.chunk">
-            <xsl:with-param name="type" select="'procedure'"/>
-            <xsl:with-param name="lot">
-              <xsl:call-template name="list.of.titles">
-                <xsl:with-param name="titles" select="'procedure'"/>
-                <xsl:with-param name="nodes" select=".//procedure[title]"/>
-              </xsl:call-template>
-            </xsl:with-param>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="list.of.titles">
-            <xsl:with-param name="titles" select="'procedure'"/>
-            <xsl:with-param name="nodes" select=".//procedure[title]"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:if test="string($lots) != ''">
-    <xsl:choose>
-      <xsl:when test="$chunk.tocs.and.lots != 0 and not(parent::*)">
-        <xsl:call-template name="write.chunk">
-          <xsl:with-param name="filename">
-            <xsl:call-template name="make-relative-filename">
-              <xsl:with-param name="base.dir" select="$base.dir"/>
-              <xsl:with-param name="base.name">
-                <xsl:call-template name="dbhtml-dir"/>
-                <xsl:apply-templates select="." mode="recursive-chunk-filename">
-                  <xsl:with-param name="recursive" select="true()"/>
-                </xsl:apply-templates>
-                <xsl:text>-toc</xsl:text>
-                <xsl:value-of select="$html.ext"/>
-              </xsl:with-param>
-            </xsl:call-template>
-          </xsl:with-param>
-          <xsl:with-param name="content">
-            <xsl:call-template name="chunk-element-content">
-              <xsl:with-param name="prev" select="/foo"/>
-              <xsl:with-param name="next" select="/foo"/>
-              <xsl:with-param name="nav.context" select="'toc'"/>
-              <xsl:with-param name="content">
-                <h1>
-                  <xsl:apply-templates select="." mode="object.title.markup"/>
-                </h1>
-                <xsl:copy-of select="$lots"/>
-              </xsl:with-param>
-            </xsl:call-template>
-          </xsl:with-param>
-          <xsl:with-param name="quiet" select="$chunk.quietly"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:copy-of select="$lots"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="make.lot.chunk">
-  <xsl:param name="type" select="''"/>
-  <xsl:param name="lot"/>
-
-  <xsl:if test="string($lot) != ''">
-    <xsl:variable name="filename">
-      <xsl:call-template name="make-relative-filename">
-        <xsl:with-param name="base.dir" select="$base.dir"/>
-        <xsl:with-param name="base.name">
-          <xsl:call-template name="dbhtml-dir"/>
-          <xsl:value-of select="$type"/>
-          <xsl:text>-toc</xsl:text>
-          <xsl:value-of select="$html.ext"/>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:variable>
-
-    <xsl:variable name="href">
-      <xsl:call-template name="make-relative-filename">
-        <xsl:with-param name="base.name">
-          <xsl:call-template name="dbhtml-dir"/>
-          <xsl:value-of select="$type"/>
-          <xsl:text>-toc</xsl:text>
-          <xsl:value-of select="$html.ext"/>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:variable>
-
-    <xsl:call-template name="write.chunk">
-      <xsl:with-param name="filename" select="$filename"/>
-      <xsl:with-param name="content">
-        <xsl:call-template name="chunk-element-content">
-          <xsl:with-param name="prev" select="/foo"/>
-          <xsl:with-param name="next" select="/foo"/>
-          <xsl:with-param name="nav.context" select="'toc'"/>
-          <xsl:with-param name="content">
-            <xsl:copy-of select="$lot"/>
-          </xsl:with-param>
-        </xsl:call-template>
-      </xsl:with-param>
-      <xsl:with-param name="quiet" select="$chunk.quietly"/>
-    </xsl:call-template>
-    <!-- And output a link to this file -->
-    <div>
-      <xsl:attribute name="class">
-        <xsl:text>ListofTitles</xsl:text>
-      </xsl:attribute>
-      <a href="{$href}">
-        <xsl:call-template name="gentext">
-          <xsl:with-param name="key">
-            <xsl:choose>
-              <xsl:when test="$type='table'">ListofTables</xsl:when>
-              <xsl:when test="$type='figure'">ListofFigures</xsl:when>
-              <xsl:when test="$type='equation'">ListofEquations</xsl:when>
-              <xsl:when test="$type='example'">ListofExamples</xsl:when>
-              <xsl:when test="$type='procedure'">ListofProcedures</xsl:when>
-              <xsl:otherwise>ListofUnknown</xsl:otherwise>
-            </xsl:choose>
-          </xsl:with-param>
-        </xsl:call-template>
-      </a>
-    </div>
-  </xsl:if>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/component.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/component.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,375 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:template name="component.title">
-  <xsl:param name="node" select="."/>
-
-  <xsl:variable name="level">
-    <xsl:choose>
-      <xsl:when test="ancestor::section">
-        <xsl:value-of select="count(ancestor::section)+1"/>
-      </xsl:when>
-      <xsl:when test="ancestor::sect5">6</xsl:when>
-      <xsl:when test="ancestor::sect4">5</xsl:when>
-      <xsl:when test="ancestor::sect3">4</xsl:when>
-      <xsl:when test="ancestor::sect2">3</xsl:when>
-      <xsl:when test="ancestor::sect1">2</xsl:when>
-      <xsl:otherwise>1</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <!-- Let's handle the case where a component (bibliography, for example)
-       occurs inside a section; will we need parameters for this? -->
-
-  <xsl:element name="h{$level+1}" namespace="http://www.w3.org/1999/xhtml">
-    <xsl:attribute name="class">title</xsl:attribute>
-    <xsl:if test="$generate.id.attributes = 0">
-      <xsl:call-template name="anchor">
-	<xsl:with-param name="node" select="$node"/>
-	<xsl:with-param name="conditional" select="0"/>
-      </xsl:call-template>
-    </xsl:if>
-      <xsl:apply-templates select="$node" mode="object.title.markup">
-      <xsl:with-param name="allow-anchors" select="1"/>
-    </xsl:apply-templates>
-  </xsl:element>
-</xsl:template>
-
-<xsl:template name="component.subtitle">
-  <xsl:param name="node" select="."/>
-  <xsl:variable name="subtitle" select="($node/docinfo/subtitle                         |$node/info/subtitle                         |$node/prefaceinfo/subtitle                         |$node/chapterinfo/subtitle                         |$node/appendixinfo/subtitle                         |$node/articleinfo/subtitle                         |$node/artheader/subtitle                         |$node/subtitle)[1]"/>
-
-  <xsl:if test="$subtitle">
-    <h3 class="subtitle">
-      <i>
-        <xsl:apply-templates select="$node" mode="object.subtitle.markup"/>
-      </i>
-    </h3>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="component.separator">
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="dedication" mode="dedication">
-  <xsl:call-template name="id.warning"/>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="dir">
-      <xsl:with-param name="inherit" select="1"/>
-    </xsl:call-template>
-    <xsl:call-template name="language.attribute"/>
-    <xsl:call-template name="dedication.titlepage"/>
-    <xsl:apply-templates/>
-    <xsl:call-template name="process.footnotes"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="dedication/title|dedication/info/title" mode="titlepage.mode" priority="2">
-  <xsl:call-template name="component.title">
-    <xsl:with-param name="node" select="ancestor::dedication[1]"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="dedication/subtitle|dedication/info/subtitle" mode="titlepage.mode" priority="2">
-  <xsl:call-template name="component.subtitle">
-    <xsl:with-param name="node" select="ancestor::dedication[1]"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="dedication"/> <!-- see mode="dedication" -->
-<xsl:template match="dedication/title"/>
-<xsl:template match="dedication/subtitle"/>
-<xsl:template match="dedication/titleabbrev"/>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="colophon">
-  <xsl:call-template name="id.warning"/>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="dir">
-      <xsl:with-param name="inherit" select="1"/>
-    </xsl:call-template>
-    <xsl:call-template name="language.attribute"/>
-    <xsl:if test="$generate.id.attributes != 0">
-      <xsl:attribute name="id">
-        <xsl:call-template name="object.id"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:call-template name="component.separator"/>
-    <xsl:call-template name="component.title"/>
-    <xsl:call-template name="component.subtitle"/>
-
-    <xsl:apply-templates/>
-    <xsl:call-template name="process.footnotes"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="colophon/title"/>
-<xsl:template match="colophon/subtitle"/>
-<xsl:template match="colophon/titleabbrev"/>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="preface">
-  <xsl:call-template name="id.warning"/>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="dir">
-      <xsl:with-param name="inherit" select="1"/>
-    </xsl:call-template>
-    <xsl:call-template name="language.attribute"/>
-    <xsl:if test="$generate.id.attributes != 0">
-      <xsl:attribute name="id">
-        <xsl:call-template name="object.id"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:call-template name="component.separator"/>
-    <xsl:call-template name="preface.titlepage"/>
-
-    <xsl:variable name="toc.params">
-      <xsl:call-template name="find.path.params">
-        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-      </xsl:call-template>
-    </xsl:variable>
-
-    <xsl:if test="contains($toc.params, 'toc')">
-      <xsl:call-template name="component.toc">
-        <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
-      </xsl:call-template>
-      <xsl:call-template name="component.toc.separator"/>
-    </xsl:if>
-    <xsl:apply-templates/>
-    <xsl:call-template name="process.footnotes"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="preface/title" mode="titlepage.mode" priority="2">
-  <xsl:call-template name="component.title">
-    <xsl:with-param name="node" select="ancestor::preface[1]"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="preface/subtitle                      |preface/prefaceinfo/subtitle                      |preface/info/subtitle                      |preface/docinfo/subtitle" mode="titlepage.mode" priority="2">
-  <xsl:call-template name="component.subtitle">
-    <xsl:with-param name="node" select="ancestor::preface[1]"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="preface/docinfo|prefaceinfo"/>
-<xsl:template match="preface/info"/>
-<xsl:template match="preface/title"/>
-<xsl:template match="preface/titleabbrev"/>
-<xsl:template match="preface/subtitle"/>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="chapter">
-  <xsl:call-template name="id.warning"/>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="dir">
-      <xsl:with-param name="inherit" select="1"/>
-    </xsl:call-template>
-    <xsl:call-template name="language.attribute"/>
-    <xsl:if test="$generate.id.attributes != 0">
-      <xsl:attribute name="id">
-        <xsl:call-template name="object.id"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:call-template name="component.separator"/>
-    <xsl:call-template name="chapter.titlepage"/>
-
-    <xsl:variable name="toc.params">
-      <xsl:call-template name="find.path.params">
-        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-      </xsl:call-template>
-    </xsl:variable>
-    <xsl:if test="contains($toc.params, 'toc')">
-      <xsl:call-template name="component.toc">
-        <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
-      </xsl:call-template>
-      <xsl:call-template name="component.toc.separator"/>
-    </xsl:if>
-    <xsl:apply-templates/>
-    <xsl:call-template name="process.footnotes"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="chapter/title" mode="titlepage.mode" priority="2">
-  <xsl:call-template name="component.title">
-    <xsl:with-param name="node" select="ancestor::chapter[1]"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="chapter/subtitle                      |chapter/chapterinfo/subtitle                      |chapter/info/subtitle                      |chapter/docinfo/subtitle" mode="titlepage.mode" priority="2">
-  <xsl:call-template name="component.subtitle">
-    <xsl:with-param name="node" select="ancestor::chapter[1]"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="chapter/docinfo|chapterinfo"/>
-<xsl:template match="chapter/info"/>
-<xsl:template match="chapter/title"/>
-<xsl:template match="chapter/titleabbrev"/>
-<xsl:template match="chapter/subtitle"/>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="appendix">
-  <xsl:variable name="ischunk">
-    <xsl:call-template name="chunk"/>
-  </xsl:variable>
-
-  <xsl:call-template name="id.warning"/>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="dir">
-      <xsl:with-param name="inherit" select="1"/>
-    </xsl:call-template>
-    <xsl:call-template name="language.attribute"/>
-    <xsl:if test="$generate.id.attributes != 0">
-      <xsl:attribute name="id">
-        <xsl:call-template name="object.id"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:choose>
-      <xsl:when test="parent::article and $ischunk = 0">
-        <xsl:call-template name="section.heading">
-          <xsl:with-param name="level" select="1"/>
-          <xsl:with-param name="title">
-            <xsl:apply-templates select="." mode="object.title.markup"/>
-          </xsl:with-param>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="component.separator"/>
-        <xsl:call-template name="appendix.titlepage"/>
-      </xsl:otherwise>
-    </xsl:choose>
-
-    <xsl:variable name="toc.params">
-      <xsl:call-template name="find.path.params">
-        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-      </xsl:call-template>
-    </xsl:variable>
-
-    <xsl:if test="contains($toc.params, 'toc')">
-      <xsl:call-template name="component.toc">
-        <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
-      </xsl:call-template>
-      <xsl:call-template name="component.toc.separator"/>
-    </xsl:if>
-
-    <xsl:apply-templates/>
-
-    <xsl:if test="not(parent::article) or $ischunk != 0">
-      <xsl:call-template name="process.footnotes"/>
-    </xsl:if>
-  </div>
-</xsl:template>
-
-<xsl:template match="appendix/title" mode="titlepage.mode" priority="2">
-  <xsl:call-template name="component.title">
-    <xsl:with-param name="node" select="ancestor::appendix[1]"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="appendix/subtitle                      |appendix/appendixinfo/subtitle                      |appendix/info/subtitle                      |appendix/docinfo/subtitle" mode="titlepage.mode" priority="2">
-  <xsl:call-template name="component.subtitle">
-    <xsl:with-param name="node" select="ancestor::appendix[1]"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="appendix/docinfo|appendixinfo"/>
-<xsl:template match="appendix/info"/>
-<xsl:template match="appendix/title"/>
-<xsl:template match="appendix/titleabbrev"/>
-<xsl:template match="appendix/subtitle"/>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="article">
-  <xsl:call-template name="id.warning"/>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="dir">
-      <xsl:with-param name="inherit" select="1"/>
-    </xsl:call-template>
-    <xsl:call-template name="language.attribute"/>
-    <xsl:if test="$generate.id.attributes != 0">
-      <xsl:attribute name="id">
-        <xsl:call-template name="object.id"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:call-template name="article.titlepage"/>
-
-    <xsl:variable name="toc.params">
-      <xsl:call-template name="find.path.params">
-        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-      </xsl:call-template>
-    </xsl:variable>
-
-    <xsl:call-template name="make.lots">
-      <xsl:with-param name="toc.params" select="$toc.params"/>
-      <xsl:with-param name="toc">
-        <xsl:call-template name="component.toc">
-          <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
-        </xsl:call-template>
-      </xsl:with-param>
-    </xsl:call-template>
-
-    <xsl:apply-templates/>
-    <xsl:call-template name="process.footnotes"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="article/title|article/articleinfo/title" mode="titlepage.mode" priority="2">
-  <xsl:call-template name="component.title">
-    <xsl:with-param name="node" select="ancestor::article[1]"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="article/subtitle                      |article/articleinfo/subtitle                      |article/info/subtitle                      |article/artheader/subtitle" mode="titlepage.mode" priority="2">
-  <xsl:call-template name="component.subtitle">
-    <xsl:with-param name="node" select="ancestor::article[1]"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="article/artheader|article/articleinfo"/>
-<xsl:template match="article/info"/>
-<xsl:template match="article/title"/>
-<xsl:template match="article/titleabbrev"/>
-<xsl:template match="article/subtitle"/>
-
-<!-- ==================================================================== -->
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/division.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/division.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,228 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:template match="set">
-  <xsl:call-template name="id.warning"/>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="dir">
-      <xsl:with-param name="inherit" select="1"/>
-    </xsl:call-template>
-    <xsl:call-template name="language.attribute"/>
-    <xsl:if test="$generate.id.attributes != 0">
-      <xsl:attribute name="id">
-        <xsl:call-template name="object.id"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:call-template name="set.titlepage"/>
-
-    <xsl:variable name="toc.params">
-      <xsl:call-template name="find.path.params">
-        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-      </xsl:call-template>
-    </xsl:variable>
-
-    <xsl:call-template name="make.lots">
-      <xsl:with-param name="toc.params" select="$toc.params"/>
-      <xsl:with-param name="toc">
-        <xsl:call-template name="set.toc">
-          <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
-        </xsl:call-template>
-      </xsl:with-param>
-    </xsl:call-template>
-
-    <xsl:apply-templates/>
-  </div>
-</xsl:template>
-
-<xsl:template match="set/setinfo"/>
-<xsl:template match="set/title"/>
-<xsl:template match="set/titleabbrev"/>
-<xsl:template match="set/subtitle"/>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="book">
-  <xsl:call-template name="id.warning"/>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="dir">
-      <xsl:with-param name="inherit" select="1"/>
-    </xsl:call-template>
-    <xsl:call-template name="language.attribute"/>
-    <xsl:if test="$generate.id.attributes != 0">
-      <xsl:attribute name="id">
-        <xsl:call-template name="object.id"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:call-template name="book.titlepage"/>
-
-    <xsl:apply-templates select="dedication" mode="dedication"/>
-
-    <xsl:variable name="toc.params">
-      <xsl:call-template name="find.path.params">
-        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-      </xsl:call-template>
-    </xsl:variable>
-
-    <xsl:call-template name="make.lots">
-      <xsl:with-param name="toc.params" select="$toc.params"/>
-      <xsl:with-param name="toc">
-        <xsl:call-template name="division.toc">
-          <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
-        </xsl:call-template>
-      </xsl:with-param>
-    </xsl:call-template>
-
-    <xsl:apply-templates/>
-  </div>
-</xsl:template>
-
-<xsl:template match="book/bookinfo"/>
-<xsl:template match="book/info"/>
-<xsl:template match="book/title"/>
-<xsl:template match="book/titleabbrev"/>
-<xsl:template match="book/subtitle"/>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="part">
-  <xsl:call-template name="id.warning"/>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="dir">
-      <xsl:with-param name="inherit" select="1"/>
-    </xsl:call-template>
-    <xsl:call-template name="language.attribute"/>
-    <xsl:if test="$generate.id.attributes != 0">
-      <xsl:attribute name="id">
-        <xsl:call-template name="object.id"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:call-template name="part.titlepage"/>
-
-    <xsl:variable name="toc.params">
-      <xsl:call-template name="find.path.params">
-        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-      </xsl:call-template>
-    </xsl:variable>
-    <xsl:if test="not(partintro) and contains($toc.params, 'toc')">
-      <xsl:call-template name="division.toc"/>
-    </xsl:if>
-    <xsl:apply-templates/>
-  </div>
-</xsl:template>
-
-<xsl:template match="part" mode="make.part.toc">
-  <xsl:call-template name="division.toc"/>
-</xsl:template>
-
-<xsl:template match="reference" mode="make.part.toc">
-  <xsl:call-template name="division.toc"/>
-</xsl:template>
-
-<xsl:template match="part/docinfo"/>
-<xsl:template match="part/partinfo"/>
-<xsl:template match="part/info"/>
-<xsl:template match="part/title"/>
-<xsl:template match="part/titleabbrev"/>
-<xsl:template match="part/subtitle"/>
-
-<xsl:template match="partintro">
-  <xsl:call-template name="id.warning"/>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="dir">
-      <xsl:with-param name="inherit" select="1"/>
-    </xsl:call-template>
-    <xsl:call-template name="language.attribute"/>
-    <xsl:if test="$generate.id.attributes != 0">
-      <xsl:attribute name="id">
-        <xsl:call-template name="object.id"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:call-template name="partintro.titlepage"/>
-    <xsl:apply-templates/>
-
-    <xsl:variable name="toc.params">
-      <xsl:call-template name="find.path.params">
-        <xsl:with-param name="node" select="parent::*"/>
-        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-      </xsl:call-template>
-    </xsl:variable>
-    <xsl:if test="contains($toc.params, 'toc')">
-      <!-- not ancestor::part because partintro appears in reference -->
-      <xsl:apply-templates select="parent::*" mode="make.part.toc"/>
-    </xsl:if>
-    <xsl:call-template name="process.footnotes"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="partintro/title"/>
-<xsl:template match="partintro/titleabbrev"/>
-<xsl:template match="partintro/subtitle"/>
-
-<xsl:template match="partintro/title" mode="partintro.title.mode">
-  <h2>
-    <xsl:apply-templates/>
-  </h2>
-</xsl:template>
-
-<xsl:template match="partintro/subtitle" mode="partintro.title.mode">
-  <h3>
-    <i><xsl:apply-templates/></i>
-  </h3>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="book" mode="division.number">
-  <xsl:number from="set" count="book" format="1."/>
-</xsl:template>
-
-<xsl:template match="part" mode="division.number">
-  <xsl:number from="book" count="part" format="I."/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="division.title">
-  <xsl:param name="node" select="."/>
-
-  <h1>
-    <xsl:attribute name="class">title</xsl:attribute>
-    <xsl:if test="$generate.id.attributes = 0">
-      <xsl:call-template name="anchor">
-	<xsl:with-param name="node" select="$node"/>
-	<xsl:with-param name="conditional" select="0"/>
-      </xsl:call-template>
-    </xsl:if>
-      <xsl:apply-templates select="$node" mode="object.title.markup">
-      <xsl:with-param name="allow-anchors" select="1"/>
-    </xsl:apply-templates>
-  </h1>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/docbook.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/docbook.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,447 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ng="http://docbook.org/docbook-ng" xmlns:db="http://docbook.org/ns/docbook" xmlns:exsl="http://exslt.org/common" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="db ng exsl" version="1.0">
-
-<xsl:output method="xml" encoding="UTF-8" indent="no" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:include href="../VERSION"/>
-<xsl:include href="param.xsl"/>
-<xsl:include href="../lib/lib.xsl"/>
-<xsl:include href="../common/l10n.xsl"/>
-<xsl:include href="../common/common.xsl"/>
-<xsl:include href="../common/utility.xsl"/>
-<xsl:include href="../common/labels.xsl"/>
-<xsl:include href="../common/titles.xsl"/>
-<xsl:include href="../common/subtitles.xsl"/>
-<xsl:include href="../common/gentext.xsl"/>
-<xsl:include href="../common/targets.xsl"/>
-<xsl:include href="../common/olink.xsl"/>
-<xsl:include href="../common/pi.xsl"/>
-<xsl:include href="autotoc.xsl"/>
-<xsl:include href="autoidx.xsl"/>
-<xsl:include href="lists.xsl"/>
-<xsl:include href="callout.xsl"/>
-<xsl:include href="verbatim.xsl"/>
-<xsl:include href="graphics.xsl"/>
-<xsl:include href="xref.xsl"/>
-<xsl:include href="formal.xsl"/>
-<xsl:include href="table.xsl"/>
-<xsl:include href="htmltbl.xsl"/>
-<xsl:include href="sections.xsl"/>
-<xsl:include href="inline.xsl"/>
-<xsl:include href="footnote.xsl"/>
-<xsl:include href="html.xsl"/>
-<xsl:include href="info.xsl"/>
-<xsl:include href="keywords.xsl"/>
-<xsl:include href="division.xsl"/>
-<xsl:include href="toc.xsl"/>
-<xsl:include href="index.xsl"/>
-<xsl:include href="refentry.xsl"/>
-<xsl:include href="math.xsl"/>
-<xsl:include href="admon.xsl"/>
-<xsl:include href="component.xsl"/>
-<xsl:include href="biblio.xsl"/>
-<xsl:include href="biblio-iso690.xsl"/>
-<xsl:include href="glossary.xsl"/>
-<xsl:include href="block.xsl"/>
-<xsl:include href="task.xsl"/>
-<xsl:include href="qandaset.xsl"/>
-<xsl:include href="synop.xsl"/>
-<xsl:include href="titlepage.xsl"/>
-<xsl:include href="titlepage.templates.xsl"/>
-<xsl:include href="pi.xsl"/>
-<xsl:include href="ebnf.xsl"/>
-<xsl:include href="chunker.xsl"/>
-<xsl:include href="html-rtf.xsl"/>
-<xsl:include href="annotations.xsl"/>
-<xsl:include href="../common/stripns.xsl"/>
-
-<xsl:param name="stylesheet.result.type" select="'xhtml'"/>
-<xsl:param name="htmlhelp.output" select="0"/>
-
-<!-- ==================================================================== -->
-
-<xsl:key name="id" match="*" use="@id|@xml:id"/>
-<xsl:key name="gid" match="*" use="generate-id()"/>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="*">
-  <xsl:message>
-    <xsl:text>Element </xsl:text>
-    <xsl:value-of select="local-name(.)"/>
-    <xsl:text> in namespace '</xsl:text>
-    <xsl:value-of select="namespace-uri(.)"/>
-    <xsl:text>' encountered</xsl:text>
-    <xsl:if test="parent::*">
-      <xsl:text> in </xsl:text>
-      <xsl:value-of select="name(parent::*)"/>
-    </xsl:if>
-    <xsl:text>, but no template matches.</xsl:text>
-  </xsl:message>
-
-  <span style="color: red">
-    <xsl:text>&lt;</xsl:text>
-    <xsl:value-of select="name(.)"/>
-    <xsl:text>&gt;</xsl:text>
-    <xsl:apply-templates/>
-    <xsl:text>&lt;/</xsl:text>
-    <xsl:value-of select="name(.)"/>
-    <xsl:text>&gt;</xsl:text>
-  </span>
-</xsl:template>
-
-<xsl:template match="text()">
-  <xsl:value-of select="."/>
-</xsl:template>
-
-<xsl:template name="body.attributes">
-<!-- no apply-templates; make it empty -->
-</xsl:template>
-
-<xsl:template name="head.content">
-  <xsl:param name="node" select="."/>
-  <xsl:param name="title">
-    <xsl:apply-templates select="$node" mode="object.title.markup.textonly"/>
-  </xsl:param>
-
-  <title>
-    <xsl:copy-of select="$title"/>
-  </title>
-
-  <xsl:if test="$html.stylesheet != ''">
-    <xsl:call-template name="output.html.stylesheets">
-      <xsl:with-param name="stylesheets" select="normalize-space($html.stylesheet)"/>
-    </xsl:call-template>
-  </xsl:if>
-
-  <xsl:if test="$link.mailto.url != ''">
-    <link rev="made" href="{$link.mailto.url}"/>
-  </xsl:if>
-
-  <xsl:if test="$html.base != ''">
-    <base href="{$html.base}"/>
-  </xsl:if>
-
-  <meta name="generator" content="DocBook {$DistroTitle} V{$VERSION}"/>
-
-  <xsl:if test="$generate.meta.abstract != 0">
-    <xsl:variable name="info" select="(articleinfo                                       |bookinfo                                       |prefaceinfo                                       |chapterinfo                                       |appendixinfo                                       |sectioninfo                                       |sect1info                                       |sect2info                                       |sect3info                                       |sect4info                                       |sect5info                                       |referenceinfo                                       |refentryinfo                                       |partinfo                                       |info                                       |docinfo)[1]"/>
-    <xsl:if test="$info and $info/abstract">
-      <meta name="description">
-        <xsl:attribute name="content">
-          <xsl:for-each select="$info/abstract[1]/*">
-            <xsl:value-of select="normalize-space(.)"/>
-            <xsl:if test="position() &lt; last()">
-              <xsl:text> </xsl:text>
-            </xsl:if>
-          </xsl:for-each>
-        </xsl:attribute>
-      </meta>
-    </xsl:if>
-  </xsl:if>
-
-  <xsl:if test="($draft.mode = 'yes' or                 ($draft.mode = 'maybe' and                 ancestor-or-self::*[@status][1]/@status = 'draft'))                 and $draft.watermark.image != ''">
-    <style type="text/css"><xsl:text>
-body { background-image: url('</xsl:text>
-<xsl:value-of select="$draft.watermark.image"/><xsl:text>');
-       background-repeat: no-repeat;
-       background-position: top left;
-       /* The following properties make the watermark "fixed" on the page. */
-       /* I think that's just a bit too distracting for the reader... */
-       /* background-attachment: fixed; */
-       /* background-position: center center; */
-     }</xsl:text>
-    </style>
-  </xsl:if>
-  <xsl:apply-templates select="." mode="head.keywords.content"/>
-</xsl:template>
-
-<xsl:template name="output.html.stylesheets">
-  <xsl:param name="stylesheets" select="''"/>
-
-  <xsl:choose>
-    <xsl:when test="contains($stylesheets, ' ')">
-      <link rel="stylesheet" href="{substring-before($stylesheets, ' ')}">
-        <xsl:if test="$html.stylesheet.type != ''">
-          <xsl:attribute name="type">
-            <xsl:value-of select="$html.stylesheet.type"/>
-          </xsl:attribute>
-        </xsl:if>
-      </link>
-      <xsl:call-template name="output.html.stylesheets">
-        <xsl:with-param name="stylesheets" select="substring-after($stylesheets, ' ')"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="$stylesheets != ''">
-      <link rel="stylesheet" href="{$stylesheets}">
-        <xsl:if test="$html.stylesheet.type != ''">
-          <xsl:attribute name="type">
-            <xsl:value-of select="$html.stylesheet.type"/>
-          </xsl:attribute>
-        </xsl:if>
-      </link>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ============================================================ -->
-
-<xsl:template match="*" mode="head.keywords.content">
-  <xsl:apply-templates select="chapterinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="appendixinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="prefaceinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="bookinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="setinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="articleinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="artheader/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="sect1info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="sect2info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="sect3info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="sect4info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="sect5info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="sectioninfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="refsect1info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="refsect2info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="refsect3info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="bibliographyinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="glossaryinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="indexinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="refentryinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="partinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="referenceinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="docinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="info/keywordset" mode="html.header"/>
-
-  <xsl:if test="$inherit.keywords != 0                 and parent::*">
-    <xsl:apply-templates select="parent::*" mode="head.keywords.content"/>
-  </xsl:if>
-</xsl:template>
-
-<!-- ============================================================ -->
-
-<xsl:template name="system.head.content">
-  <xsl:param name="node" select="."/>
-
-  <!-- FIXME: When chunking, only the annotations actually used
-              in this chunk should be referenced. I don't think it
-              does any harm to reference them all, but it adds
-              unnecessary bloat to each chunk. -->
-  <xsl:if test="$annotation.support != 0 and //annotation">
-    <xsl:call-template name="add.annotation.links"/>
-    <script type="text/javascript">
-      <xsl:text>
-// Create PopupWindow objects</xsl:text>
-      <xsl:for-each select="//annotation">
-        <xsl:text>
-var popup_</xsl:text>
-        <xsl:value-of select="generate-id(.)"/>
-        <xsl:text> = new PopupWindow("popup-</xsl:text>
-        <xsl:value-of select="generate-id(.)"/>
-        <xsl:text>");
-</xsl:text>
-        <xsl:text>popup_</xsl:text>
-        <xsl:value-of select="generate-id(.)"/>
-        <xsl:text>.offsetY = 15;
-</xsl:text>
-        <xsl:text>popup_</xsl:text>
-        <xsl:value-of select="generate-id(.)"/>
-        <xsl:text>.autoHide();
-</xsl:text>
-      </xsl:for-each>
-    </script>
-
-    <style type="text/css">
-      <xsl:value-of select="$annotation.css"/>
-    </style>
-  </xsl:if>
-
-  <!-- system.head.content is like user.head.content, except that
-       it is called before head.content. This is important because it
-       means, for example, that <style> elements output by system.head.content
-       have a lower CSS precedence than the users stylesheet. -->
-</xsl:template>
-
-<!-- ============================================================ -->
-
-<xsl:template name="user.preroot">
-  <!-- Pre-root output, can be used to output comments and PIs. -->
-  <!-- This must not output any element content! -->
-</xsl:template>
-
-<xsl:template name="user.head.content">
-  <xsl:param name="node" select="."/>
-</xsl:template>
-
-<xsl:template name="user.header.navigation">
-  <xsl:param name="node" select="."/>
-</xsl:template>
-
-<xsl:template name="user.header.content">
-  <xsl:param name="node" select="."/>
-</xsl:template>
-
-<xsl:template name="user.footer.content">
-  <xsl:param name="node" select="."/>
-</xsl:template>
-
-<xsl:template name="user.footer.navigation">
-  <xsl:param name="node" select="."/>
-</xsl:template>
-
-<xsl:template match="/">
-  <!-- * Get a title for current doc so that we let the user -->
-  <!-- * know what document we are processing at this point. -->
-  <xsl:variable name="doc.title">
-    <xsl:call-template name="get.doc.title"/>
-  </xsl:variable>
-  <xsl:choose>
-    <!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document,
-         toss the namespace and continue.  Use the docbook5 namespaced
-         stylesheets for DocBook5 if you don't want to use this feature.-->
-    <!-- include extra test for Xalan quirk -->
-    <xsl:when test="(function-available('exsl:node-set') or                      contains(system-property('xsl:vendor'),                        'Apache Software Foundation'))                     and (*/self::ng:* or */self::db:*)">
-      <xsl:call-template name="log.message">
-        <xsl:with-param name="level">Note</xsl:with-param>
-        <xsl:with-param name="source" select="$doc.title"/>
-        <xsl:with-param name="context-desc">
-          <xsl:text>namesp. cut</xsl:text>
-        </xsl:with-param>
-        <xsl:with-param name="message">
-          <xsl:text>stripped namespace before processing</xsl:text>
-        </xsl:with-param>
-      </xsl:call-template>
-      <xsl:variable name="nons">
-        <xsl:apply-templates mode="stripNS"/>
-      </xsl:variable>
-      <!--
-      <xsl:message>Saving stripped document.</xsl:message>
-      <xsl:call-template name="write.chunk">
-        <xsl:with-param name="filename" select="'/tmp/stripped.xml'"/>
-        <xsl:with-param name="method" select="'xml'"/>
-        <xsl:with-param name="content">
-          <xsl:copy-of select="exsl:node-set($nons)"/>
-        </xsl:with-param>
-      </xsl:call-template>
-      -->
-      <xsl:call-template name="log.message">
-        <xsl:with-param name="level">Note</xsl:with-param>
-        <xsl:with-param name="source" select="$doc.title"/>
-        <xsl:with-param name="context-desc">
-          <xsl:text>namesp. cut</xsl:text>
-        </xsl:with-param>
-        <xsl:with-param name="message">
-          <xsl:text>processing stripped document</xsl:text>
-        </xsl:with-param>
-      </xsl:call-template>
-      <xsl:apply-templates select="exsl:node-set($nons)"/>
-    </xsl:when>
-    <!-- Can't process unless namespace removed -->
-    <xsl:when test="*/self::ng:* or */self::db:*">
-      <xsl:message terminate="yes">
-        <xsl:text>Unable to strip the namespace from DB5 document,</xsl:text>
-        <xsl:text> cannot proceed.</xsl:text>
-      </xsl:message>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="$rootid != ''">
-          <xsl:choose>
-            <xsl:when test="count(key('id',$rootid)) = 0">
-              <xsl:message terminate="yes">
-                <xsl:text>ID '</xsl:text>
-                <xsl:value-of select="$rootid"/>
-                <xsl:text>' not found in document.</xsl:text>
-              </xsl:message>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:if test="$collect.xref.targets = 'yes' or                             $collect.xref.targets = 'only'">
-                <xsl:apply-templates select="key('id', $rootid)" mode="collect.targets"/>
-              </xsl:if>
-              <xsl:if test="$collect.xref.targets != 'only'">
-                <xsl:apply-templates select="key('id',$rootid)" mode="process.root"/>
-                <xsl:if test="$tex.math.in.alt != ''">
-                  <xsl:apply-templates select="key('id',$rootid)" mode="collect.tex.math"/>
-                </xsl:if>
-              </xsl:if>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:if test="$collect.xref.targets = 'yes' or                         $collect.xref.targets = 'only'">
-            <xsl:apply-templates select="/" mode="collect.targets"/>
-          </xsl:if>
-          <xsl:if test="$collect.xref.targets != 'only'">
-            <xsl:apply-templates select="/" mode="process.root"/>
-            <xsl:if test="$tex.math.in.alt != ''">
-              <xsl:apply-templates select="/" mode="collect.tex.math"/>
-            </xsl:if>
-          </xsl:if>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="*" mode="process.root">
-  <xsl:variable name="doc" select="self::*"/>
-
-  <xsl:call-template name="user.preroot"/>
-  <xsl:call-template name="root.messages"/>
-
-  <html>
-    <head>
-      <xsl:call-template name="system.head.content">
-        <xsl:with-param name="node" select="$doc"/>
-      </xsl:call-template>
-      <xsl:call-template name="head.content">
-        <xsl:with-param name="node" select="$doc"/>
-      </xsl:call-template>
-      <xsl:call-template name="user.head.content">
-        <xsl:with-param name="node" select="$doc"/>
-      </xsl:call-template>
-    </head>
-    <body>
-      <xsl:call-template name="body.attributes"/>
-      <xsl:call-template name="user.header.content">
-        <xsl:with-param name="node" select="$doc"/>
-      </xsl:call-template>
-      <xsl:apply-templates select="."/>
-      <xsl:call-template name="user.footer.content">
-        <xsl:with-param name="node" select="$doc"/>
-      </xsl:call-template>
-    </body>
-  </html>
-  <xsl:value-of select="$html.append"/>
-</xsl:template>
-
-<xsl:template name="root.messages">
-  <!-- redefine this any way you'd like to output messages -->
-  <!-- DO NOT OUTPUT ANYTHING FROM THIS TEMPLATE -->
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="chunk">
-  <xsl:param name="node" select="."/>
-
-  <!-- The default is that we are not chunking... -->
-  <xsl:text>0</xsl:text>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/ebnf.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/ebnf.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,328 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="doc" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<doc:reference xmlns="">
-<referenceinfo xmlns="http://www.w3.org/1999/xhtml">
-<releaseinfo role="meta">
-$Id$
-</releaseinfo>
-<author><surname>Walsh</surname>
-<firstname>Norman</firstname></author>
-<copyright><year>1999</year><year>2000</year>
-<holder>Norman Walsh</holder>
-</copyright>
-</referenceinfo>
-<title xmlns="http://www.w3.org/1999/xhtml">HTML EBNF Reference</title>
-
-<partintro xmlns="http://www.w3.org/1999/xhtml">
-<section><title>Introduction</title>
-
-<para>This is technical reference documentation for the DocBook XSL
-Stylesheets; it documents (some of) the parameters, templates, and
-other elements of the stylesheets.</para>
-
-<para>This reference describes the templates and parameters relevant
-to formatting EBNF markup.</para>
-
-<para>This is not intended to be <quote>user</quote> documentation.
-It is provided for developers writing customization layers for the
-stylesheets, and for anyone who's interested in <quote>how it
-works</quote>.</para>
-
-<para>Although I am trying to be thorough, this documentation is known
-to be incomplete. Don't forget to read the source, too :-)</para>
-</section>
-</partintro>
-</doc:reference>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="productionset">
-  <table width="100%" cellpadding="5">
-    <xsl:if test="$ebnf.table.bgcolor != ''">
-      <xsl:attribute name="bgcolor">
-        <xsl:value-of select="$ebnf.table.bgcolor"/>
-      </xsl:attribute>
-    </xsl:if>
-    <xsl:if test="$ebnf.table.border != 0">
-      <xsl:attribute name="border">1</xsl:attribute>
-    </xsl:if>
-    <xsl:attribute name="class">
-      <xsl:value-of select="local-name(.)"/>
-    </xsl:attribute>
-    <xsl:attribute name="summary">
-      <xsl:text>EBNF</xsl:text>
-      <xsl:if test="title">
-        <xsl:text> for </xsl:text>
-        <xsl:value-of select="title"/>
-      </xsl:if>
-    </xsl:attribute>
-
-    <xsl:if test="title">
-      <tr>
-        <th align="left" valign="top">
-          <xsl:apply-templates select="." mode="class.attribute"/>
-          <xsl:apply-templates select="title"/>
-        </th>
-      </tr>
-    </xsl:if>
-    <tr>
-      <td>
-        <table border="0" width="99%" cellpadding="0">
-          <xsl:if test="$ebnf.table.bgcolor != ''">
-            <xsl:attribute name="bgcolor">
-              <xsl:value-of select="$ebnf.table.bgcolor"/>
-            </xsl:attribute>
-          </xsl:if>
-          <xsl:attribute name="class">
-            <xsl:value-of select="local-name(.)"/>
-          </xsl:attribute>
-          <xsl:attribute name="summary">EBNF productions</xsl:attribute>
-          <xsl:apply-templates select="production|productionrecap"/>
-        </table>
-      </td>
-    </tr>
-  </table>
-</xsl:template>
-
-<xsl:template match="productionset/title">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="production">
-  <xsl:param name="recap" select="false()"/>
-  <tr>
-    <td align="left" valign="top" width="3%">
-      <xsl:text>[</xsl:text>
-      <xsl:number count="production" level="any"/>
-      <xsl:text>]</xsl:text>
-    </td>
-    <td align="right" valign="top" width="10%">
-      <xsl:choose>
-        <xsl:when test="$recap">
-          <a>
-            <xsl:attribute name="href">
-              <xsl:call-template name="href.target">
-                <xsl:with-param name="object" select="."/>
-              </xsl:call-template>
-            </xsl:attribute>
-            <xsl:apply-templates select="lhs"/>
-          </a>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="anchor"/>
-          <xsl:apply-templates select="lhs"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </td>
-    <td valign="top" width="5%" align="center">
-      <xsl:copy-of select="$ebnf.assignment"/>
-    </td>
-    <td valign="top" width="52%">
-      <xsl:apply-templates select="rhs"/>
-      <xsl:copy-of select="$ebnf.statement.terminator"/>
-    </td>
-    <td align="left" valign="top" width="30%">
-      <xsl:choose>
-        <xsl:when test="rhs/lineannotation|constraint">
-          <xsl:apply-templates select="rhs/lineannotation" mode="rhslo"/>
-          <xsl:apply-templates select="constraint"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:text>&#160;</xsl:text>
-        </xsl:otherwise>
-      </xsl:choose>
-    </td>
-  </tr>
-</xsl:template>
-
-<xsl:template match="productionrecap">
-  <xsl:variable name="targets" select="key('id',@linkend)"/>
-  <xsl:variable name="target" select="$targets[1]"/>
-
-  <xsl:if test="count($targets)=0">
-    <xsl:message>
-      <xsl:text>Error: no ID for productionrecap linkend: </xsl:text>
-      <xsl:value-of select="@linkend"/>
-      <xsl:text>.</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:if test="count($targets)&gt;1">
-    <xsl:message>
-      <xsl:text>Warning: multiple "IDs" for productionrecap linkend: </xsl:text>
-      <xsl:value-of select="@linkend"/>
-      <xsl:text>.</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:apply-templates select="$target">
-    <xsl:with-param name="recap" select="true()"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="lhs">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="rhs">
-  <xsl:apply-templates/>
-  <xsl:if test="following-sibling::rhs">
-    <xsl:text> |</xsl:text>
-    <br/>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="nonterminal">
-  <xsl:variable name="linkend">
-    <xsl:call-template name="xpointer.idref">
-      <xsl:with-param name="xpointer" select="@def"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:call-template name="check.id.unique">
-    <xsl:with-param name="linkend" select="$linkend"/>
-  </xsl:call-template>
-
-  <xsl:call-template name="check.idref.targets">
-    <xsl:with-param name="linkend" select="$linkend"/>
-    <xsl:with-param name="element-list">production</xsl:with-param>
-  </xsl:call-template>
-
-  <!-- If you don't provide content, you can't point outside this doc. -->
-  <xsl:choose>
-    <xsl:when test="*|text()"><!--nop--></xsl:when>
-    <xsl:otherwise>
-      <xsl:if test="$linkend = ''">
-        <xsl:message>
-          <xsl:text>Non-terminals with no content must point to </xsl:text>
-          <xsl:text>production elements in the current document.</xsl:text>
-        </xsl:message>
-        <xsl:message>
-          <xsl:text>Invalid xpointer for empty nt: </xsl:text>
-          <xsl:value-of select="@def"/>
-        </xsl:message>
-      </xsl:if>
-    </xsl:otherwise>
-  </xsl:choose>
-
-  <xsl:variable name="href">
-    <xsl:choose>
-      <xsl:when test="$linkend != ''">
-        <xsl:variable name="targets" select="key('id',$linkend)"/>
-        <xsl:variable name="target" select="$targets[1]"/>
-        <xsl:call-template name="href.target">
-          <xsl:with-param name="object" select="$target"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="@def"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <a href="{$href}">
-    <xsl:choose>
-      <xsl:when test="*|text()">
-        <xsl:apply-templates/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:choose>
-          <xsl:when test="$linkend != ''">
-            <xsl:variable name="targets" select="key('id',$linkend)"/>
-            <xsl:variable name="target" select="$targets[1]"/>
-            <xsl:apply-templates select="$target/lhs"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:text>???</xsl:text>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:otherwise>
-    </xsl:choose>
-  </a>
-</xsl:template>
-
-<xsl:template match="rhs/lineannotation">
-  <!--nop-->
-</xsl:template>
-
-<xsl:template match="rhs/lineannotation" mode="rhslo">
-  <xsl:text>/*&#160;</xsl:text>
-  <xsl:apply-templates/>
-  <xsl:text>&#160;*/</xsl:text>
-  <br/>
-</xsl:template>
-
-<xsl:template match="constraint">
-  <xsl:call-template name="check.id.unique">
-    <xsl:with-param name="linkend" select="@linkend"/>
-  </xsl:call-template>
-
-  <xsl:call-template name="check.idref.targets">
-    <xsl:with-param name="linkend" select="@linkend"/>
-    <xsl:with-param name="element-list">constraintdef</xsl:with-param>
-  </xsl:call-template>
-
-  <xsl:variable name="href">
-    <xsl:variable name="targets" select="key('id',@linkend)"/>
-    <xsl:variable name="target" select="$targets[1]"/>
-    <xsl:call-template name="href.target">
-      <xsl:with-param name="object" select="$target"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:text>[&#160;</xsl:text>
-
-  <xsl:choose>
-    <xsl:when test="@role">
-      <xsl:value-of select="@role"/>
-      <xsl:text>: </xsl:text>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:variable name="targets" select="key('id',@linkend)"/>
-      <xsl:variable name="target" select="$targets[1]"/>
-      <xsl:if test="$target/@role">
-        <xsl:value-of select="$target/@role"/>
-        <xsl:text>: </xsl:text>
-      </xsl:if>
-    </xsl:otherwise>
-  </xsl:choose>
-
-  <a href="{$href}">
-    <xsl:variable name="targets" select="key('id',@linkend)"/>
-    <xsl:variable name="target" select="$targets[1]"/>
-    <xsl:apply-templates select="$target" mode="title.markup"/>
-  </a>
-  <xsl:text>&#160;]</xsl:text>
-  <xsl:if test="following-sibling::constraint">
-    <br/>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="constraintdef">
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="anchor"/>
-    <xsl:apply-templates/>
-  </div>
-</xsl:template>
-
-<xsl:template match="constraintdef/title">
-  <p><b><xsl:apply-templates/></b></p>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/footnote.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/footnote.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,292 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="exsl" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<xsl:template match="footnote">
-  <xsl:variable name="name">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-  <xsl:variable name="href">
-    <xsl:text>#ftn.</xsl:text>
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="ancestor::tgroup">
-      <sup>
-        <xsl:text>[</xsl:text>
-        <a id="{$name}" href="{$href}">
-          <xsl:apply-templates select="." mode="class.attribute"/>
-          <xsl:apply-templates select="." mode="footnote.number"/>
-        </a>
-        <xsl:text>]</xsl:text>
-      </sup>
-    </xsl:when>
-    <xsl:otherwise>
-      <sup>
-        <xsl:text>[</xsl:text>
-        <a id="{$name}" href="{$href}">
-          <xsl:apply-templates select="." mode="class.attribute"/>
-          <xsl:apply-templates select="." mode="footnote.number"/>
-        </a>
-        <xsl:text>]</xsl:text>
-      </sup>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="footnoteref">
-  <xsl:variable name="targets" select="key('id',@linkend)"/>
-  <xsl:variable name="footnote" select="$targets[1]"/>
-
-  <xsl:variable name="target.href">
-    <xsl:call-template name="href.target">
-      <xsl:with-param name="object" select="$footnote"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="href">
-    <xsl:value-of select="substring-before($target.href, '#')"/>
-    <xsl:text>#ftn.</xsl:text>
-    <xsl:value-of select="substring-after($target.href, '#')"/>
-  </xsl:variable>
-
-  <sup>
-    <xsl:text>[</xsl:text>
-    <a href="{$href}">
-      <xsl:apply-templates select="." mode="class.attribute"/>
-      <xsl:apply-templates select="$footnote" mode="footnote.number"/>
-    </a>
-    <xsl:text>]</xsl:text>
-  </sup>
-</xsl:template>
-
-<xsl:template match="footnote" mode="footnote.number">
-  <xsl:choose>
-    <xsl:when test="string-length(@label) != 0">
-      <xsl:value-of select="@label"/>
-    </xsl:when>
-    <xsl:when test="ancestor::tgroup">
-      <xsl:variable name="tfnum">
-        <xsl:number level="any" from="table|informaltable" format="1"/>
-      </xsl:variable>
-
-      <xsl:choose>
-        <xsl:when test="string-length($table.footnote.number.symbols) &gt;= $tfnum">
-          <xsl:value-of select="substring($table.footnote.number.symbols, $tfnum, 1)"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:number level="any" from="tgroup" format="{$table.footnote.number.format}"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:variable name="pfoot" select="preceding::footnote[not(@label)]"/>
-      <xsl:variable name="ptfoot" select="preceding::tgroup//footnote"/>
-      <xsl:variable name="fnum" select="count($pfoot) - count($ptfoot) + 1"/>
-
-      <xsl:choose>
-        <xsl:when test="string-length($footnote.number.symbols) &gt;= $fnum">
-          <xsl:value-of select="substring($footnote.number.symbols, $fnum, 1)"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:number value="$fnum" format="{$footnote.number.format}"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="footnote/para[1]|footnote/simpara[1]" priority="2">
-  <!-- this only works if the first thing in a footnote is a para, -->
-  <!-- which is ok, because it usually is. -->
-  <xsl:variable name="name">
-    <xsl:text>ftn.</xsl:text>
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="ancestor::footnote"/>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:variable name="href">
-    <xsl:text>#</xsl:text>
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="ancestor::footnote"/>
-    </xsl:call-template>
-  </xsl:variable>
-  <p>
-    <xsl:if test="@role and $para.propagates.style != 0">
-      <xsl:apply-templates select="." mode="class.attribute">
-        <xsl:with-param name="class" select="@role"/>
-      </xsl:apply-templates>
-    </xsl:if>
-    <sup>
-      <xsl:text>[</xsl:text>
-      <a id="{$name}" href="{$href}">
-        <xsl:apply-templates select="." mode="class.attribute"/>
-        <xsl:apply-templates select="ancestor::footnote" mode="footnote.number"/>
-      </a>
-      <xsl:text>] </xsl:text>
-    </sup>
-    <xsl:apply-templates/>
-  </p>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="*" mode="footnote.body.number">
-  <xsl:variable name="name">
-    <xsl:text>ftn.</xsl:text>
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="ancestor::footnote"/>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:variable name="href">
-    <xsl:text>#</xsl:text>
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="ancestor::footnote"/>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:variable name="footnote.mark">
-    <sup>
-      <xsl:text>[</xsl:text>
-      <a id="{$name}" href="{$href}">
-        <xsl:apply-templates select="." mode="class.attribute"/>
-        <xsl:apply-templates select="ancestor::footnote" mode="footnote.number"/>
-      </a>
-      <xsl:text>] </xsl:text>
-    </sup>
-  </xsl:variable>
-
-  <xsl:variable name="html">
-    <xsl:apply-templates select="."/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="function-available('exsl:node-set')">
-      <xsl:variable name="html-nodes" select="exsl:node-set($html)"/>
-      <xsl:choose>
-        <xsl:when test="$html-nodes//p">
-          <xsl:apply-templates select="$html-nodes" mode="insert.html.p">
-            <xsl:with-param name="mark" select="$footnote.mark"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates select="$html-nodes" mode="insert.html.text">
-            <xsl:with-param name="mark" select="$footnote.mark"/>
-          </xsl:apply-templates>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy-of select="$html"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<!--
-<xsl:template name="count-element-from">
-  <xsl:param name="from" select=".."/>
-  <xsl:param name="to" select="."/>
-  <xsl:param name="count" select="0"/>
-  <xsl:param name="list" select="$from/following::*[local-name(.)=local-name($to)]
-                                 |$from/descendant-or-self::*[local-name(.)=local-name($to)]"/>
-
-  <xsl:choose>
-    <xsl:when test="not($list)">
-      <xsl:text>-1</xsl:text>
-    </xsl:when>
-    <xsl:when test="$list[1] = $to">
-      <xsl:value-of select="$count + 1"/>
-    </xsl:when>
-    <xsl:otherwise>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
--->
-
-<!-- ==================================================================== -->
-
-<xsl:template name="process.footnotes">
-  <xsl:variable name="footnotes" select=".//footnote"/>
-  <xsl:variable name="table.footnotes" select=".//tgroup//footnote"/>
-
-  <!-- Only bother to do this if there's at least one non-table footnote -->
-  <xsl:if test="count($footnotes)&gt;count($table.footnotes)">
-    <div class="footnotes">
-      <br/>
-      <hr width="100" align="left"/>
-      <xsl:apply-templates select="$footnotes" mode="process.footnote.mode"/>
-    </div>
-  </xsl:if>
-
-  <xsl:if test="$annotation.support != 0 and //annotation">
-    <div class="annotation-list">
-      <div class="annotation-nocss">
-	<p>The following annotations are from this essay. You are seeing
-	them here because your browser doesn&#8217;t support the user-interface
-	techniques used to make them appear as &#8216;popups&#8217; on modern browsers.</p>
-      </div>
-
-      <xsl:apply-templates select="//annotation" mode="annotation-popup"/>
-    </div>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="process.chunk.footnotes">
-  <!-- nop -->
-</xsl:template>
-
-<xsl:template match="footnote" name="process.footnote" mode="process.footnote.mode">
-  <xsl:choose>
-    <xsl:when test="local-name(*[1]) = 'para' or local-name(*[1]) = 'simpara'">
-      <div>
-        <xsl:apply-templates select="." mode="class.attribute"/>
-        <xsl:apply-templates/>
-      </div>
-    </xsl:when>
-
-    <xsl:when test="$html.cleanup != 0 and function-available('exsl:node-set')">
-      <div>
-        <xsl:apply-templates select="." mode="class.attribute"/>
-        <xsl:apply-templates select="*[1]" mode="footnote.body.number"/>
-        <xsl:apply-templates select="*[position() &gt; 1]"/>
-      </div>
-    </xsl:when>
-
-    <xsl:otherwise>
-      <xsl:message>
-        <xsl:text>Warning: footnote number may not be generated </xsl:text>
-        <xsl:text>correctly; </xsl:text>
-        <xsl:value-of select="local-name(*[1])"/>
-        <xsl:text> unexpected as first child of footnote.</xsl:text>
-      </xsl:message>
-      <div>
-        <xsl:apply-templates select="." mode="class.attribute"/>
-        <xsl:apply-templates/>
-      </div>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="tgroup//footnote" mode="process.footnote.mode">
-</xsl:template>
-
-<xsl:template match="footnote" mode="table.footnote.mode">
-  <xsl:call-template name="process.footnote"/>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/formal.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/formal.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,386 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<xsl:param name="formal.object.break.after">1</xsl:param>
-
-<xsl:template name="formal.object">
-  <xsl:param name="placement" select="'before'"/>
-  <xsl:param name="class">
-    <xsl:apply-templates select="." mode="class.value"/>
-  </xsl:param>
-
-  <xsl:call-template name="id.warning"/>
-
-  <xsl:variable name="content">
-    <div class="{$class}">
-      <xsl:call-template name="anchor">
-        <xsl:with-param name="conditional" select="0"/>
-      </xsl:call-template>
-    
-      <xsl:choose>
-        <xsl:when test="$placement = 'before'">
-          <xsl:call-template name="formal.object.heading"/>
-          <div class="{$class}-contents">
-            <xsl:apply-templates/>
-          </div>
-          <!-- HACK: This doesn't belong inside formal.object; it 
-               should be done by the table template, but I want 
-               the link to be inside the DIV, so... -->
-          <xsl:if test="local-name(.) = 'table'">
-            <xsl:call-template name="table.longdesc"/>
-          </xsl:if>
-    
-          <xsl:if test="$spacing.paras != 0"><p/></xsl:if>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:if test="$spacing.paras != 0"><p/></xsl:if>
-          <div class="{$class}-contents"><xsl:apply-templates/></div>
-          <!-- HACK: This doesn't belong inside formal.object; it 
-               should be done by the table template, but I want 
-               the link to be inside the DIV, so... -->
-          <xsl:if test="local-name(.) = 'table'">
-            <xsl:call-template name="table.longdesc"/>
-          </xsl:if>
-    
-          <xsl:call-template name="formal.object.heading"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </div>
-    <xsl:if test="not($formal.object.break.after = '0')">
-      <br class="{$class}-break"/>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="floatstyle">
-    <xsl:call-template name="floatstyle"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$floatstyle != ''">
-      <xsl:call-template name="floater">
-        <xsl:with-param name="class"><xsl:value-of select="$class"/>-float</xsl:with-param>
-        <xsl:with-param name="floatstyle" select="$floatstyle"/>
-        <xsl:with-param name="content" select="$content"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy-of select="$content"/>
-    </xsl:otherwise>
-  </xsl:choose>
-
-</xsl:template>
-
-<xsl:template name="formal.object.heading">
-  <xsl:param name="object" select="."/>
-  <xsl:param name="title">
-    <xsl:apply-templates select="$object" mode="object.title.markup">
-      <xsl:with-param name="allow-anchors" select="1"/>
-    </xsl:apply-templates>
-  </xsl:param>
-
-  <p class="title">
-    <b>
-      <xsl:copy-of select="$title"/>
-    </b>
-  </p>
-</xsl:template>
-
-<xsl:template name="informal.object">
-  <xsl:param name="class" select="local-name(.)"/>
-
-  <xsl:variable name="content">
-    <div class="{$class}">
-      <xsl:if test="$spacing.paras != 0"><p/></xsl:if>
-      <xsl:call-template name="anchor"/>
-      <xsl:apply-templates/>
-  
-      <!-- HACK: This doesn't belong inside formal.object; it 
-           should be done by the table template, but I want 
-           the link to be inside the DIV, so... -->
-      <xsl:if test="local-name(.) = 'informaltable'">
-        <xsl:call-template name="table.longdesc"/>
-      </xsl:if>
-  
-      <xsl:if test="$spacing.paras != 0"><p/></xsl:if>
-    </div>
-  </xsl:variable>
-
-  <xsl:variable name="floatstyle">
-    <xsl:call-template name="floatstyle"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$floatstyle != ''">
-      <xsl:call-template name="floater">
-        <xsl:with-param name="class"><xsl:value-of select="$class"/>-float</xsl:with-param>
-        <xsl:with-param name="floatstyle" select="$floatstyle"/>
-        <xsl:with-param name="content" select="$content"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy-of select="$content"/>
-    </xsl:otherwise>
-  </xsl:choose>
-
-</xsl:template>
-
-<xsl:template name="semiformal.object">
-  <xsl:param name="placement" select="'before'"/>
-  <xsl:param name="class" select="local-name(.)"/>
-
-  <xsl:choose>
-    <xsl:when test="title">
-      <xsl:call-template name="formal.object">
-        <xsl:with-param name="placement" select="$placement"/>
-        <xsl:with-param name="class" select="$class"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="informal.object">
-        <xsl:with-param name="class" select="$class"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="figure">
-  <xsl:variable name="param.placement" select="substring-after(normalize-space($formal.title.placement),                                         concat(local-name(.), ' '))"/>
-
-  <xsl:variable name="placement">
-    <xsl:choose>
-      <xsl:when test="contains($param.placement, ' ')">
-        <xsl:value-of select="substring-before($param.placement, ' ')"/>
-      </xsl:when>
-      <xsl:when test="$param.placement = ''">before</xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$param.placement"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:call-template name="formal.object">
-    <xsl:with-param name="placement" select="$placement"/>
-  </xsl:call-template>
-
-</xsl:template>
-
-<xsl:template match="table">
-  <xsl:choose>
-    <xsl:when test="tgroup|mediaobject|graphic">
-      <xsl:call-template name="calsTable"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy>
-        <xsl:copy-of select="@*[not(local-name()='id')]"/>
-        <xsl:attribute name="id">
-          <xsl:call-template name="object.id"/>
-        </xsl:attribute>
-        <xsl:call-template name="htmlTable"/>
-      </xsl:copy>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="calsTable">
-  <xsl:if test="tgroup/tbody/tr                 |tgroup/thead/tr                 |tgroup/tfoot/tr">
-    <xsl:message terminate="yes">Broken table: tr descendent of CALS Table.</xsl:message>
-  </xsl:if>
-
-  <xsl:variable name="param.placement" select="substring-after(normalize-space($formal.title.placement),                                         concat(local-name(.), ' '))"/>
-
-  <xsl:variable name="placement">
-    <xsl:choose>
-      <xsl:when test="contains($param.placement, ' ')">
-        <xsl:value-of select="substring-before($param.placement, ' ')"/>
-      </xsl:when>
-      <xsl:when test="$param.placement = ''">before</xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$param.placement"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:call-template name="formal.object">
-    <xsl:with-param name="placement" select="$placement"/>
-    <xsl:with-param name="class">
-      <xsl:choose>
-        <xsl:when test="@tabstyle">
-          <!-- hack, this will only ever occur on table, not example -->
-          <xsl:value-of select="@tabstyle"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="local-name(.)"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="htmlTable">
-  <xsl:if test="tgroup/tbody/row                 |tgroup/thead/row                 |tgroup/tfoot/row">
-    <xsl:message terminate="yes">Broken table: row descendent of HTML table.</xsl:message>
-  </xsl:if>
-
-  <xsl:apply-templates mode="htmlTable"/>
-</xsl:template>
-
-<xsl:template match="example">
-  <xsl:variable name="param.placement" select="substring-after(normalize-space($formal.title.placement),                      concat(local-name(.), ' '))"/>
-
-  <xsl:variable name="placement">
-    <xsl:choose>
-      <xsl:when test="contains($param.placement, ' ')">
-        <xsl:value-of select="substring-before($param.placement, ' ')"/>
-      </xsl:when>
-      <xsl:when test="$param.placement = ''">before</xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$param.placement"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:call-template name="formal.object">
-    <xsl:with-param name="placement" select="$placement"/>
-  </xsl:call-template>
-
-</xsl:template>
-
-<xsl:template match="equation">
-  <xsl:variable name="param.placement" select="substring-after(normalize-space($formal.title.placement),                                       concat(local-name(.), ' '))"/>
-
-  <xsl:variable name="placement">
-    <xsl:choose>
-      <xsl:when test="contains($param.placement, ' ')">
-        <xsl:value-of select="substring-before($param.placement, ' ')"/>
-      </xsl:when>
-      <xsl:when test="$param.placement = ''">before</xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$param.placement"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:call-template name="formal.object">
-    <xsl:with-param name="placement" select="$placement"/>
-  </xsl:call-template>
-
-</xsl:template>
-
-<xsl:template match="figure/title"/>
-<xsl:template match="figure/titleabbrev"/>
-<xsl:template match="table/title"/>
-<xsl:template match="table/titleabbrev"/>
-<xsl:template match="table/textobject"/>
-<xsl:template match="example/title"/>
-<xsl:template match="example/titleabbrev"/>
-<xsl:template match="equation/title"/>
-<xsl:template match="equation/titleabbrev"/>
-
-<xsl:template match="informalfigure">
-  <xsl:call-template name="informal.object"/>
-</xsl:template>
-
-<xsl:template match="informalexample">
-  <xsl:call-template name="informal.object"/>
-</xsl:template>
-
-<xsl:template match="informaltable">
-  <xsl:choose>
-    <xsl:when test="tgroup|mediaobject|graphic">
-      <xsl:call-template name="informal.object">
-        <xsl:with-param name="class">
-          <xsl:choose>
-            <xsl:when test="@tabstyle">
-              <xsl:value-of select="@tabstyle"/>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:value-of select="local-name(.)"/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <table>
-        <xsl:copy-of select="@*"/>
-        <xsl:call-template name="htmlTable"/>
-      </table>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="informaltable/textobject"/>
-
-<xsl:template name="table.longdesc">
-  <!-- HACK: This doesn't belong inside formal.objectt; it should be done by -->
-  <!-- the table template, but I want the link to be inside the DIV, so... -->
-  <xsl:variable name="longdesc.uri">
-    <xsl:call-template name="longdesc.uri">
-      <xsl:with-param name="mediaobject" select="."/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="irrelevant">
-    <!-- write.longdesc returns the filename ... -->
-    <xsl:call-template name="write.longdesc">
-      <xsl:with-param name="mediaobject" select="."/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:if test="$html.longdesc != 0 and $html.longdesc.link != 0                 and textobject[not(phrase)]">
-    <xsl:call-template name="longdesc.link">
-      <xsl:with-param name="longdesc.uri" select="$longdesc.uri"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="informalequation">
-  <xsl:call-template name="informal.object"/>
-</xsl:template>
-
-<xsl:template name="floatstyle">
-  <xsl:if test="(@float and @float != '0') or @floatstyle != ''">
-    <xsl:choose>
-      <xsl:when test="@floatstyle != ''">
-        <xsl:value-of select="@floatstyle"/>
-      </xsl:when>
-      <xsl:when test="@float = '1'">
-        <xsl:value-of select="$default.float.class"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="@float"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="floater">
-  <xsl:param name="content"/>
-  <xsl:param name="class" select="'float'"/>
-  <xsl:param name="floatstyle" select="'left'"/>
-
-  <div class="{$class}">
-    <xsl:if test="$floatstyle = 'left' or $floatstyle = 'right'">
-      <xsl:attribute name="style">
-        <xsl:text>float: </xsl:text>
-        <xsl:value-of select="$floatstyle"/>
-        <xsl:text>;</xsl:text>
-      </xsl:attribute>
-    </xsl:if>
-    <xsl:copy-of select="$content"/>
-  </div>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/glossary.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/glossary.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,548 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:template match="glossary">
-  
-<xsl:variable name="language">
-  <xsl:call-template name="l10n.language"/>
-</xsl:variable>
-
-<xsl:variable name="lowercase">
-  <xsl:call-template name="gentext">
-    <xsl:with-param name="key">normalize.sort.input</xsl:with-param>
-  </xsl:call-template>
-</xsl:variable>
-
-<xsl:variable name="uppercase">
-  <xsl:call-template name="gentext">
-    <xsl:with-param name="key">normalize.sort.output</xsl:with-param>
-  </xsl:call-template>
-</xsl:variable>
-
-  <xsl:call-template name="id.warning"/>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:if test="$generate.id.attributes != 0">
-      <xsl:attribute name="id">
-        <xsl:call-template name="object.id"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:call-template name="glossary.titlepage"/>
-
-    <xsl:choose>
-      <xsl:when test="glossdiv">
-        <xsl:apply-templates select="(glossdiv[1]/preceding-sibling::*)"/>
-      </xsl:when>
-      <xsl:when test="glossentry">
-        <xsl:apply-templates select="(glossentry[1]/preceding-sibling::*)"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:apply-templates/>
-      </xsl:otherwise>
-    </xsl:choose>
-
-    <xsl:choose>
-      <xsl:when test="glossdiv">
-        <xsl:apply-templates select="glossdiv"/>
-      </xsl:when>
-      <xsl:when test="glossentry">
-        <dl>
-          <xsl:choose>
-            <xsl:when test="$glossary.sort != 0">
-              <xsl:apply-templates select="glossentry">
-                <xsl:sort lang="{$language}" select="translate(glossterm, $lowercase,                                              $uppercase)"/>
-              </xsl:apply-templates>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:apply-templates select="glossentry"/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </dl>
-      </xsl:when>
-      <xsl:otherwise>
-        <!-- empty glossary -->
-      </xsl:otherwise>
-    </xsl:choose>
-
-    <xsl:if test="not(parent::article)">
-      <xsl:call-template name="process.footnotes"/>
-    </xsl:if>
-  </div>
-</xsl:template>
-
-<xsl:template match="glossary/glossaryinfo"/>
-<xsl:template match="glossary/info"/>
-<xsl:template match="glossary/title"/>
-<xsl:template match="glossary/subtitle"/>
-<xsl:template match="glossary/titleabbrev"/>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="glosslist">
-  
-<xsl:variable name="language">
-  <xsl:call-template name="l10n.language"/>
-</xsl:variable>
-
-<xsl:variable name="lowercase">
-  <xsl:call-template name="gentext">
-    <xsl:with-param name="key">normalize.sort.input</xsl:with-param>
-  </xsl:call-template>
-</xsl:variable>
-
-<xsl:variable name="uppercase">
-  <xsl:call-template name="gentext">
-    <xsl:with-param name="key">normalize.sort.output</xsl:with-param>
-  </xsl:call-template>
-</xsl:variable>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="anchor"/>
-    <xsl:if test="blockinfo/title|info/title|title">
-      <xsl:call-template name="formal.object.heading"/>
-    </xsl:if>
-    <dl>
-      <xsl:choose>
-        <xsl:when test="$glossary.sort != 0">
-          <xsl:apply-templates select="glossentry">
-            <xsl:sort lang="{$language}" select="translate(glossterm, $lowercase,                                          $uppercase)"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates select="glossentry"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </dl>
-  </div>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="glossdiv">
-  
-<xsl:variable name="language">
-  <xsl:call-template name="l10n.language"/>
-</xsl:variable>
-
-<xsl:variable name="lowercase">
-  <xsl:call-template name="gentext">
-    <xsl:with-param name="key">normalize.sort.input</xsl:with-param>
-  </xsl:call-template>
-</xsl:variable>
-
-<xsl:variable name="uppercase">
-  <xsl:call-template name="gentext">
-    <xsl:with-param name="key">normalize.sort.output</xsl:with-param>
-  </xsl:call-template>
-</xsl:variable>
-
-  <xsl:call-template name="id.warning"/>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates select="(glossentry[1]/preceding-sibling::*)"/>
-
-    <dl>
-      <xsl:choose>
-        <xsl:when test="$glossary.sort != 0">
-          <xsl:apply-templates select="glossentry">
-            <xsl:sort lang="{$language}" select="translate(glossterm, $lowercase,                                          $uppercase)"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates select="glossentry"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </dl>
-  </div>
-</xsl:template>
-
-<xsl:template match="glossdiv/title">
-  <h3>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates/>
-  </h3>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<!--
-GlossEntry ::=
-  GlossTerm, Acronym?, Abbrev?,
-  (IndexTerm)*,
-  RevHistory?,
-  (GlossSee | GlossDef+)
--->
-
-<xsl:template match="glossentry">
-  <xsl:choose>
-    <xsl:when test="$glossentry.show.acronym = 'primary'">
-      <dt>
-        <xsl:call-template name="anchor">
-          <xsl:with-param name="conditional">
-            <xsl:choose>
-              <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
-              <xsl:otherwise>1</xsl:otherwise>
-            </xsl:choose>
-          </xsl:with-param>
-        </xsl:call-template>
-
-        <xsl:choose>
-          <xsl:when test="acronym|abbrev">
-            <xsl:apply-templates select="acronym|abbrev"/>
-            <xsl:text> (</xsl:text>
-            <xsl:apply-templates select="glossterm"/>
-            <xsl:text>)</xsl:text>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:apply-templates select="glossterm"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </dt>
-    </xsl:when>
-    <xsl:when test="$glossentry.show.acronym = 'yes'">
-      <dt>
-        <xsl:call-template name="anchor">
-          <xsl:with-param name="conditional">
-            <xsl:choose>
-              <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
-              <xsl:otherwise>1</xsl:otherwise>
-            </xsl:choose>
-          </xsl:with-param>
-        </xsl:call-template>
-
-        <xsl:apply-templates select="glossterm"/>
-
-        <xsl:if test="acronym|abbrev">
-          <xsl:text> (</xsl:text>
-          <xsl:apply-templates select="acronym|abbrev"/>
-          <xsl:text>)</xsl:text>
-        </xsl:if>
-      </dt>
-    </xsl:when>
-    <xsl:otherwise>
-      <dt>
-        <xsl:call-template name="anchor">
-          <xsl:with-param name="conditional">
-            <xsl:choose>
-              <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
-              <xsl:otherwise>1</xsl:otherwise>
-            </xsl:choose>
-          </xsl:with-param>
-        </xsl:call-template>
-
-        <xsl:apply-templates select="glossterm"/>
-      </dt>
-    </xsl:otherwise>
-  </xsl:choose>
-
-  <xsl:apply-templates select="indexterm|revhistory|glosssee|glossdef"/>
-</xsl:template>
-
-<xsl:template match="glossentry/glossterm">
-  <xsl:apply-templates/>
-  <xsl:if test="following-sibling::glossterm">, </xsl:if>
-</xsl:template>
-
-<xsl:template match="glossentry/acronym">
-  <xsl:apply-templates/>
-  <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if>
-</xsl:template>
-
-<xsl:template match="glossentry/abbrev">
-  <xsl:apply-templates/>
-  <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if>
-</xsl:template>
-
-<xsl:template match="glossentry/revhistory">
-</xsl:template>
-
-<xsl:template match="glossentry/glosssee">
-  <xsl:variable name="otherterm" select="@otherterm"/>
-  <xsl:variable name="targets" select="key('id', $otherterm)"/>
-  <xsl:variable name="target" select="$targets[1]"/>
-
-  <dd>
-    <p>
-      <xsl:variable name="template">
-        <xsl:call-template name="gentext.template">
-          <xsl:with-param name="context" select="'glossary'"/>
-          <xsl:with-param name="name" select="'see'"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <xsl:variable name="title">
-        <xsl:choose>
-          <xsl:when test="$target">
-            <a>
-              <xsl:apply-templates select="." mode="class.attribute"/>
-              <xsl:attribute name="href">
-                <xsl:call-template name="href.target">
-                  <xsl:with-param name="object" select="$target"/>
-                </xsl:call-template>
-              </xsl:attribute>
-              <xsl:apply-templates select="$target" mode="xref-to"/>
-            </a>
-          </xsl:when>
-          <xsl:when test="$otherterm != '' and not($target)">
-            <xsl:message>
-              <xsl:text>Warning: glosssee @otherterm reference not found: </xsl:text>
-              <xsl:value-of select="$otherterm"/>
-            </xsl:message>
-            <xsl:apply-templates/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:apply-templates/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:variable>
-
-      <xsl:call-template name="substitute-markup">
-        <xsl:with-param name="template" select="$template"/>
-        <xsl:with-param name="title" select="$title"/>
-      </xsl:call-template>
-      <xsl:text>.</xsl:text>
-    </p>
-  </dd>
-</xsl:template>
-
-<xsl:template match="glossentry/glossdef">
-  <dd>
-    <xsl:apply-templates select="*[local-name(.) != 'glossseealso']"/>
-    <xsl:if test="glossseealso">
-      <p>
-        <xsl:variable name="template">
-          <xsl:call-template name="gentext.template">
-            <xsl:with-param name="context" select="'glossary'"/>
-            <xsl:with-param name="name" select="'seealso'"/>
-          </xsl:call-template>
-        </xsl:variable>
-        <xsl:variable name="title">
-          <xsl:apply-templates select="glossseealso"/>
-        </xsl:variable>
-        <xsl:call-template name="substitute-markup">
-          <xsl:with-param name="template" select="$template"/>
-          <xsl:with-param name="title" select="$title"/>
-        </xsl:call-template>
-      </p>
-    </xsl:if>
-  </dd>
-</xsl:template>
-
-<xsl:template match="glossseealso">
-  <xsl:variable name="otherterm" select="@otherterm"/>
-  <xsl:variable name="targets" select="key('id', $otherterm)"/>
-  <xsl:variable name="target" select="$targets[1]"/>
-
-  <xsl:choose>
-    <xsl:when test="$target">
-      <a>
-        <xsl:apply-templates select="." mode="class.attribute"/>
-        <xsl:attribute name="href">
-          <xsl:call-template name="href.target">
-            <xsl:with-param name="object" select="$target"/>
-          </xsl:call-template>
-        </xsl:attribute>
-        <xsl:apply-templates select="$target" mode="xref-to"/>
-      </a>
-    </xsl:when>
-    <xsl:when test="$otherterm != '' and not($target)">
-      <xsl:message>
-        <xsl:text>Warning: glossseealso @otherterm reference not found: </xsl:text>
-        <xsl:value-of select="$otherterm"/>
-      </xsl:message>
-      <xsl:apply-templates/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates/>
-    </xsl:otherwise>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="position() = last()">
-      <xsl:text>.</xsl:text>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:text>, </xsl:text>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<!-- Glossary collection -->
-
-<xsl:template match="glossary[@role='auto']" priority="2">
-  
-<xsl:variable name="language">
-  <xsl:call-template name="l10n.language"/>
-</xsl:variable>
-
-<xsl:variable name="lowercase">
-  <xsl:call-template name="gentext">
-    <xsl:with-param name="key">normalize.sort.input</xsl:with-param>
-  </xsl:call-template>
-</xsl:variable>
-
-<xsl:variable name="uppercase">
-  <xsl:call-template name="gentext">
-    <xsl:with-param name="key">normalize.sort.output</xsl:with-param>
-  </xsl:call-template>
-</xsl:variable>
-
-  <xsl:variable name="terms" select="//glossterm[not(parent::glossdef)]|//firstterm"/>
-  <xsl:variable name="collection" select="document($glossary.collection, .)"/>
-
-  <xsl:call-template name="id.warning"/>
-
-  <xsl:if test="$glossary.collection = ''">
-    <xsl:message>
-      <xsl:text>Warning: processing automatic glossary </xsl:text>
-      <xsl:text>without a glossary.collection file.</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:if test="not($collection) and $glossary.collection != ''">
-    <xsl:message>
-      <xsl:text>Warning: processing automatic glossary but unable to </xsl:text>
-      <xsl:text>open glossary.collection file '</xsl:text>
-      <xsl:value-of select="$glossary.collection"/>
-      <xsl:text>'</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:if test="$generate.id.attributes != 0">
-      <xsl:attribute name="id">
-        <xsl:call-template name="object.id"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:call-template name="glossary.titlepage"/>
-
-    <xsl:choose>
-      <xsl:when test="glossdiv and $collection//glossdiv">
-        <xsl:for-each select="$collection//glossdiv">
-          <!-- first see if there are any in this div -->
-          <xsl:variable name="exist.test">
-            <xsl:for-each select="glossentry">
-              <xsl:variable name="cterm" select="glossterm"/>
-              <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
-                <xsl:value-of select="glossterm"/>
-              </xsl:if>
-            </xsl:for-each>
-          </xsl:variable>
-
-          <xsl:if test="$exist.test != ''">
-            <xsl:apply-templates select="." mode="auto-glossary">
-              <xsl:with-param name="terms" select="$terms"/>
-            </xsl:apply-templates>
-          </xsl:if>
-        </xsl:for-each>
-      </xsl:when>
-      <xsl:otherwise>
-        <dl>
-          <xsl:choose>
-            <xsl:when test="$glossary.sort != 0">
-              <xsl:for-each select="$collection//glossentry">
-                <xsl:sort lang="{$language}" select="translate(glossterm, $lowercase,                                              $uppercase)"/>
-                <xsl:variable name="cterm" select="glossterm"/>
-                <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
-                  <xsl:apply-templates select="." mode="auto-glossary"/>
-                </xsl:if>
-              </xsl:for-each>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:for-each select="$collection//glossentry">
-                <xsl:variable name="cterm" select="glossterm"/>
-                <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
-                  <xsl:apply-templates select="." mode="auto-glossary"/>
-                </xsl:if>
-              </xsl:for-each>
-            </xsl:otherwise>
-          </xsl:choose>
-        </dl>
-      </xsl:otherwise>
-    </xsl:choose>
-
-    <xsl:if test="not(parent::article)">
-      <xsl:call-template name="process.footnotes"/>
-    </xsl:if>
-  </div>
-</xsl:template>
-
-<xsl:template match="*" mode="auto-glossary">
-  <!-- pop back out to the default mode for most elements -->
-  <xsl:apply-templates select="."/>
-</xsl:template>
-
-<xsl:template match="glossdiv" mode="auto-glossary">
-  <xsl:param name="terms" select="."/>
-
-  
-<xsl:variable name="language">
-  <xsl:call-template name="l10n.language"/>
-</xsl:variable>
-
-<xsl:variable name="lowercase">
-  <xsl:call-template name="gentext">
-    <xsl:with-param name="key">normalize.sort.input</xsl:with-param>
-  </xsl:call-template>
-</xsl:variable>
-
-<xsl:variable name="uppercase">
-  <xsl:call-template name="gentext">
-    <xsl:with-param name="key">normalize.sort.output</xsl:with-param>
-  </xsl:call-template>
-</xsl:variable>
-
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates select="(glossentry[1]/preceding-sibling::*)"/>
-
-    <dl>
-      <xsl:choose>
-        <xsl:when test="$glossary.sort != 0">
-          <xsl:for-each select="glossentry">
-            <xsl:sort lang="{$language}" select="translate(glossterm, $lowercase,                                          $uppercase)"/>
-            <xsl:variable name="cterm" select="glossterm"/>
-            <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
-              <xsl:apply-templates select="." mode="auto-glossary"/>
-            </xsl:if>
-          </xsl:for-each>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:for-each select="glossentry">
-            <xsl:variable name="cterm" select="glossterm"/>
-            <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
-              <xsl:apply-templates select="." mode="auto-glossary"/>
-            </xsl:if>
-          </xsl:for-each>
-        </xsl:otherwise>
-      </xsl:choose>
-    </dl>
-  </div>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/graphics.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/graphics.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,1414 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:stext="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.TextFactory" xmlns:simg="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.ImageIntrinsics" xmlns:ximg="xalan://com.nwalsh.xalan.ImageIntrinsics" xmlns:xtext="xalan://com.nwalsh.xalan.Text" xmlns:lxslt="http://xml.apache.org/xslt" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xlink stext xtext lxslt simg ximg" extension-element-prefixes="stext xtext" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     Contributors:
-     Colin Paul Adams, <colin@colina.demon.co.uk>
-
-     ******************************************************************** -->
-
-<lxslt:component prefix="xtext" elements="insertfile"/>
-<lxslt:component prefix="ximg" functions="new getWidth getDepth"/>
-
-<!-- ==================================================================== -->
-<!-- Graphic format tests for the HTML backend -->
-
-<xsl:template name="is.graphic.format">
-  <xsl:param name="format"/>
-  <xsl:if test="$format = 'SVG'                 or $format = 'PNG'                 or $format = 'JPG'                 or $format = 'JPEG'                 or $format = 'linespecific'                 or $format = 'GIF'                 or $format = 'GIF87a'                 or $format = 'GIF89a'                 or $format = 'BMP'">1</xsl:if>
-</xsl:template>
-
-<xsl:template name="is.graphic.extension">
-  <xsl:param name="ext"/>
-  <xsl:variable name="lcext" select="translate($ext,                                        'ABCDEFGHIJKLMNOPQRSTUVWXYZ',                                        'abcdefghijklmnopqrstuvwxyz')"/>
-  <xsl:if test="$lcext = 'svg'              or $lcext = 'png'              or $lcext = 'jpeg'              or $lcext = 'jpg'              or $lcext = 'avi'              or $lcext = 'mpg'              or $lcext = 'mpeg'              or $lcext = 'qt'              or $lcext = 'gif'              or $lcext = 'bmp'">1</xsl:if>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="screenshot">
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates/>
-  </div>
-</xsl:template>
-
-<xsl:template match="screeninfo">
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="process.image">
-  <!-- When this template is called, the current node should be  -->
-  <!-- a graphic, inlinegraphic, imagedata, or videodata. All    -->
-  <!-- those elements have the same set of attributes, so we can -->
-  <!-- handle them all in one place.                             -->
-  <xsl:param name="tag" select="'img'"/>
-  <xsl:param name="alt"/>
-  <xsl:param name="longdesc"/>
-
-  <!-- The HTML img element only supports the notion of content-area
-       scaling; it doesn't support the distinction between a
-       content-area and a viewport-area, so we have to make some
-       compromises.
-
-       1. If only the content-area is specified, everything is fine.
-          (If you ask for a three inch image, that's what you'll get.)
-
-       2. If only the viewport-area is provided:
-          - If scalefit=1, treat it as both the content-area and
-            the viewport-area. (If you ask for an image in a five inch
-            area, we'll make the image five inches to fill that area.)
-          - If scalefit=0, ignore the viewport-area specification.
-
-          Note: this is not quite the right semantic and has the additional
-          problem that it can result in anamorphic scaling, which scalefit
-          should never cause.
-
-       3. If both the content-area and the viewport-area is specified
-          on a graphic element, ignore the viewport-area.
-          (If you ask for a three inch image in a five inch area, we'll assume
-           it's better to give you a three inch image in an unspecified area
-           than a five inch image in a five inch area.
-
-       Relative units also cause problems. As a general rule, the stylesheets
-       are operating too early and too loosely coupled with the rendering engine
-       to know things like the current font size or the actual dimensions of
-       an image. Therefore:
-
-       1. We use a fixed size for pixels, $pixels.per.inch
-
-       2. We use a fixed size for "em"s, $points.per.em
-
-       Percentages are problematic. In the following discussion, we speak
-       of width and contentwidth, but the same issues apply to depth and
-       contentdepth
-
-       1. A width of 50% means "half of the available space for the image."
-          That's fine. But note that in HTML, this is a dynamic property and
-          the image size will vary if the browser window is resized.
-
-       2. A contentwidth of 50% means "half of the actual image width". But
-          the stylesheets have no way to assess the image's actual size. Treating
-          this as a width of 50% is one possibility, but it produces behavior
-          (dynamic scaling) that seems entirely out of character with the
-          meaning.
-
-          Instead, the stylesheets define a $nominal.image.width
-          and convert percentages to actual values based on that nominal size.
-
-       Scale can be problematic. Scale applies to the contentwidth, so
-       a scale of 50 when a contentwidth is not specified is analagous to a
-       width of 50%. (If a contentwidth is specified, the scaling factor can
-       be applied to that value and no problem exists.)
-
-       If scale is specified but contentwidth is not supplied, the
-       nominal.image.width is used to calculate a base size
-       for scaling.
-
-       Warning: as a consequence of these decisions, unless the aspect ratio
-       of your image happens to be exactly the same as (nominal width / nominal height),
-       specifying contentwidth="50%" and contentdepth="50%" is NOT going to
-       scale the way you expect (or really, the way it should).
-
-       Don't do that. In fact, a percentage value is not recommended for content
-       size at all. Use scale instead.
-
-       Finally, align and valign are troublesome. Horizontal alignment is now
-       supported by wrapping the image in a <div align="{@align}"> (in block
-       contexts!). I can't think of anything (practical) to do about vertical
-       alignment.
-  -->
-
-  <xsl:variable name="width-units">
-    <xsl:choose>
-      <xsl:when test="$ignore.image.scaling != 0"/>
-      <xsl:when test="@width">
-        <xsl:call-template name="length-units">
-          <xsl:with-param name="length" select="@width"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:when test="not(@depth) and $default.image.width != ''">
-        <xsl:call-template name="length-units">
-          <xsl:with-param name="length" select="$default.image.width"/>
-        </xsl:call-template>
-      </xsl:when>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="width">
-    <xsl:choose>
-      <xsl:when test="$ignore.image.scaling != 0"/>
-      <xsl:when test="@width">
-        <xsl:choose>
-          <xsl:when test="$width-units = '%'">
-            <xsl:value-of select="@width"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:call-template name="length-spec">
-              <xsl:with-param name="length" select="@width"/>
-            </xsl:call-template>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:when>
-      <xsl:when test="not(@depth) and $default.image.width != ''">
-        <xsl:value-of select="$default.image.width"/>
-      </xsl:when>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="scalefit">
-    <xsl:choose>
-      <xsl:when test="$ignore.image.scaling != 0">0</xsl:when>
-      <xsl:when test="@contentwidth or @contentdepth">0</xsl:when>
-      <xsl:when test="@scale">0</xsl:when>
-      <xsl:when test="@scalefit"><xsl:value-of select="@scalefit"/></xsl:when>
-      <xsl:when test="$width != '' or @depth">1</xsl:when>
-      <xsl:otherwise>0</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="scale">
-    <xsl:choose>
-      <xsl:when test="$ignore.image.scaling != 0">1.0</xsl:when>
-      <xsl:when test="@contentwidth or @contentdepth">1.0</xsl:when>
-      <xsl:when test="@scale">
-        <xsl:value-of select="@scale div 100.0"/>
-      </xsl:when>
-      <xsl:otherwise>1.0</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="filename">
-    <xsl:choose>
-      <xsl:when test="local-name(.) = 'graphic'                       or local-name(.) = 'inlinegraphic'">
-        <!-- handle legacy graphic and inlinegraphic by new template --> 
-        <xsl:call-template name="mediaobject.filename">
-          <xsl:with-param name="object" select="."/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <!-- imagedata, videodata, audiodata -->
-        <xsl:call-template name="mediaobject.filename">
-          <xsl:with-param name="object" select=".."/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="output_filename">
-    <xsl:choose>
-      <xsl:when test="@entityref">
-        <xsl:value-of select="$filename"/>
-      </xsl:when>
-      <!--
-        Moved test for $keep.relative.image.uris to template below:
-            <xsl:template match="@fileref">
-      -->
-      <xsl:otherwise>
-        <xsl:value-of select="$filename"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="img.src.path.pi">
-    <xsl:call-template name="pi.dbhtml_img.src.path">
-      <xsl:with-param name="node" select=".."/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="filename.for.graphicsize">
-    <xsl:choose>
-      <xsl:when test="$img.src.path.pi != ''">
-        <xsl:value-of select="concat($img.src.path.pi, $filename)"/>
-      </xsl:when>
-      <xsl:when test="$img.src.path != '' and                       $graphicsize.use.img.src.path != 0 and                       $tag = 'img' and                       not(starts-with($filename, '/')) and                       not(contains($filename, '://'))">
-        <xsl:value-of select="concat($img.src.path, $filename)"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$filename"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="realintrinsicwidth">
-    <!-- This funny compound test works around a bug in XSLTC -->
-    <xsl:choose>
-      <xsl:when test="$use.extensions != 0 and $graphicsize.extension != 0">
-        <xsl:choose>
-          <xsl:when test="function-available('simg:getWidth')">
-            <xsl:value-of select="simg:getWidth(simg:new($filename.for.graphicsize),                                                 $nominal.image.width)"/>
-          </xsl:when>
-          <xsl:when test="function-available('ximg:getWidth')">
-            <xsl:value-of select="ximg:getWidth(ximg:new($filename.for.graphicsize),                                                 $nominal.image.width)"/>
-          </xsl:when>
-          <xsl:otherwise>
-           <xsl:value-of select="0"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="0"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="intrinsicwidth">
-    <xsl:choose>
-      <xsl:when test="$realintrinsicwidth = 0">
-       <xsl:value-of select="$nominal.image.width"/>
-      </xsl:when>
-      <xsl:otherwise>
-       <xsl:value-of select="$realintrinsicwidth"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="intrinsicdepth">
-    <!-- This funny compound test works around a bug in XSLTC -->
-    <xsl:choose>
-      <xsl:when test="$use.extensions != 0 and $graphicsize.extension != 0">
-        <xsl:choose>
-          <xsl:when test="function-available('simg:getDepth')">
-            <xsl:value-of select="simg:getDepth(simg:new($filename.for.graphicsize),                                                 $nominal.image.depth)"/>
-          </xsl:when>
-          <xsl:when test="function-available('ximg:getDepth')">
-            <xsl:value-of select="ximg:getDepth(ximg:new($filename.for.graphicsize),                                                 $nominal.image.depth)"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="$nominal.image.depth"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$nominal.image.depth"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="contentwidth">
-    <xsl:choose>
-      <xsl:when test="$ignore.image.scaling != 0"/>
-      <xsl:when test="@contentwidth">
-        <xsl:variable name="units">
-          <xsl:call-template name="length-units">
-            <xsl:with-param name="length" select="@contentwidth"/>
-          </xsl:call-template>
-        </xsl:variable>
-
-        <xsl:choose>
-          <xsl:when test="$units = '%'">
-            <xsl:variable name="cmagnitude">
-              <xsl:call-template name="length-magnitude">
-                <xsl:with-param name="length" select="@contentwidth"/>
-              </xsl:call-template>
-            </xsl:variable>
-            <xsl:value-of select="$intrinsicwidth * $cmagnitude div 100.0"/>
-            <xsl:text>px</xsl:text>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:call-template name="length-spec">
-              <xsl:with-param name="length" select="@contentwidth"/>
-            </xsl:call-template>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$intrinsicwidth"/>
-        <xsl:text>px</xsl:text>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="scaled.contentwidth">
-    <xsl:if test="$contentwidth != ''">
-      <xsl:variable name="cwidth.in.points">
-        <xsl:call-template name="length-in-points">
-          <xsl:with-param name="length" select="$contentwidth"/>
-          <xsl:with-param name="pixels.per.inch" select="$pixels.per.inch"/>
-          <xsl:with-param name="em.size" select="$points.per.em"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:value-of select="$cwidth.in.points div 72.0 * $pixels.per.inch * $scale"/>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="html.width">
-    <xsl:choose>
-      <xsl:when test="$ignore.image.scaling != 0"/>
-      <xsl:when test="$width-units = '%'">
-        <xsl:value-of select="$width"/>
-      </xsl:when>
-      <xsl:when test="$width != ''">
-        <xsl:variable name="width.in.points">
-          <xsl:call-template name="length-in-points">
-            <xsl:with-param name="length" select="$width"/>
-            <xsl:with-param name="pixels.per.inch" select="$pixels.per.inch"/>
-            <xsl:with-param name="em.size" select="$points.per.em"/>
-          </xsl:call-template>
-        </xsl:variable>
-        <xsl:value-of select="round($width.in.points div 72.0 * $pixels.per.inch)"/>
-      </xsl:when>
-      <xsl:otherwise/>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="contentdepth">
-    <xsl:choose>
-      <xsl:when test="$ignore.image.scaling != 0"/>
-      <xsl:when test="@contentdepth">
-        <xsl:variable name="units">
-          <xsl:call-template name="length-units">
-            <xsl:with-param name="length" select="@contentdepth"/>
-          </xsl:call-template>
-        </xsl:variable>
-
-        <xsl:choose>
-          <xsl:when test="$units = '%'">
-            <xsl:variable name="cmagnitude">
-              <xsl:call-template name="length-magnitude">
-                <xsl:with-param name="length" select="@contentdepth"/>
-              </xsl:call-template>
-            </xsl:variable>
-            <xsl:value-of select="$intrinsicdepth * $cmagnitude div 100.0"/>
-            <xsl:text>px</xsl:text>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:call-template name="length-spec">
-              <xsl:with-param name="length" select="@contentdepth"/>
-            </xsl:call-template>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$intrinsicdepth"/>
-        <xsl:text>px</xsl:text>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="scaled.contentdepth">
-    <xsl:if test="$contentdepth != ''">
-      <xsl:variable name="cdepth.in.points">
-        <xsl:call-template name="length-in-points">
-          <xsl:with-param name="length" select="$contentdepth"/>
-          <xsl:with-param name="pixels.per.inch" select="$pixels.per.inch"/>
-          <xsl:with-param name="em.size" select="$points.per.em"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:value-of select="$cdepth.in.points div 72.0 * $pixels.per.inch * $scale"/>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="depth-units">
-    <xsl:if test="@depth">
-      <xsl:call-template name="length-units">
-        <xsl:with-param name="length" select="@depth"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="depth">
-    <xsl:if test="@depth">
-      <xsl:choose>
-        <xsl:when test="$depth-units = '%'">
-          <xsl:value-of select="@depth"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="length-spec">
-            <xsl:with-param name="length" select="@depth"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="html.depth">
-    <xsl:choose>
-      <xsl:when test="$ignore.image.scaling != 0"/>
-      <xsl:when test="$depth-units = '%'">
-        <xsl:value-of select="$depth"/>
-      </xsl:when>
-      <xsl:when test="@depth and @depth != ''">
-        <xsl:variable name="depth.in.points">
-          <xsl:call-template name="length-in-points">
-            <xsl:with-param name="length" select="$depth"/>
-            <xsl:with-param name="pixels.per.inch" select="$pixels.per.inch"/>
-            <xsl:with-param name="em.size" select="$points.per.em"/>
-          </xsl:call-template>
-        </xsl:variable>
-        <xsl:value-of select="round($depth.in.points div 72.0 * $pixels.per.inch)"/>
-      </xsl:when>
-      <xsl:otherwise/>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="viewport">
-    <xsl:choose>
-      <xsl:when test="$ignore.image.scaling != 0">0</xsl:when>
-      <xsl:when test="local-name(.) = 'inlinegraphic'                       or ancestor::inlinemediaobject                       or ancestor::inlineequation">0</xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$make.graphic.viewport"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-<!--
-  <xsl:message>=====================================
-scale: <xsl:value-of select="$scale"/>, <xsl:value-of select="$scalefit"/>
-@contentwidth <xsl:value-of select="@contentwidth"/>
-$contentwidth <xsl:value-of select="$contentwidth"/>
-scaled.contentwidth: <xsl:value-of select="$scaled.contentwidth"/>
-@width: <xsl:value-of select="@width"/>
-width: <xsl:value-of select="$width"/>
-html.width: <xsl:value-of select="$html.width"/>
-@contentdepth <xsl:value-of select="@contentdepth"/>
-$contentdepth <xsl:value-of select="$contentdepth"/>
-scaled.contentdepth: <xsl:value-of select="$scaled.contentdepth"/>
-@depth: <xsl:value-of select="@depth"/>
-depth: <xsl:value-of select="$depth"/>
-html.depth: <xsl:value-of select="$html.depth"/>
-align: <xsl:value-of select="@align"/>
-valign: <xsl:value-of select="@valign"/></xsl:message>
--->
-
-  <xsl:variable name="scaled" select="@width|@depth|@contentwidth|@contentdepth                         |@scale|@scalefit"/>
-
-  <xsl:variable name="img">
-    <xsl:choose>
-      <xsl:when test="@format = 'SVG'">
-        <object data="{$output_filename}" type="image/svg+xml">
-          <xsl:call-template name="process.image.attributes">
-            <!--xsl:with-param name="alt" select="$alt"/ there's no alt here-->
-            <xsl:with-param name="html.depth" select="$html.depth"/>
-            <xsl:with-param name="html.width" select="$html.width"/>
-            <xsl:with-param name="longdesc" select="$longdesc"/>
-            <xsl:with-param name="scale" select="$scale"/>
-            <xsl:with-param name="scalefit" select="$scalefit"/>
-            <xsl:with-param name="scaled.contentdepth" select="$scaled.contentdepth"/>
-            <xsl:with-param name="scaled.contentwidth" select="$scaled.contentwidth"/>
-            <xsl:with-param name="viewport" select="$viewport"/>
-          </xsl:call-template>
-          <xsl:if test="@align">
-            <xsl:attribute name="align">
-                <xsl:choose>
-                  <xsl:when test="@align = 'center'">middle</xsl:when>
-                  <xsl:otherwise>
-                    <xsl:value-of select="@align"/>
-                  </xsl:otherwise>
-                </xsl:choose>
-            </xsl:attribute>
-          </xsl:if>
-          <xsl:if test="$use.embed.for.svg != 0">
-            <embed src="{$output_filename}" type="image/svg+xml">
-              <xsl:call-template name="process.image.attributes">
-                <!--xsl:with-param name="alt" select="$alt"/ there's no alt here -->
-                <xsl:with-param name="html.depth" select="$html.depth"/>
-                <xsl:with-param name="html.width" select="$html.width"/>
-                <xsl:with-param name="longdesc" select="$longdesc"/>
-                <xsl:with-param name="scale" select="$scale"/>
-                <xsl:with-param name="scalefit" select="$scalefit"/>
-                <xsl:with-param name="scaled.contentdepth" select="$scaled.contentdepth"/>
-                <xsl:with-param name="scaled.contentwidth" select="$scaled.contentwidth"/>
-                <xsl:with-param name="viewport" select="$viewport"/>
-              </xsl:call-template>
-            </embed>
-          </xsl:if>
-        </object>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:element name="{$tag}" namespace="http://www.w3.org/1999/xhtml">
-         <xsl:if test="$tag = 'img' and ../../self::imageobjectco">
-           <xsl:variable name="mapname">
-             <xsl:call-template name="object.id">
-               <xsl:with-param name="object" select="../../areaspec"/>
-             </xsl:call-template>
-           </xsl:variable>
-           <xsl:choose>
-             <xsl:when test="$scaled">
-              <!-- It might be possible to handle some scaling; needs -->
-              <!-- more investigation -->
-              <xsl:message>
-                <xsl:text>Warning: imagemaps not supported </xsl:text>
-                <xsl:text>on scaled images</xsl:text>
-              </xsl:message>
-             </xsl:when>
-             <xsl:otherwise>
-              <xsl:attribute name="border">0</xsl:attribute>
-              <xsl:attribute name="usemap">
-                <xsl:value-of select="concat('#', $mapname)"/>
-              </xsl:attribute>
-             </xsl:otherwise>
-           </xsl:choose>
-         </xsl:if>
-
-          <xsl:attribute name="src">
-           <xsl:choose>
-             <xsl:when test="$img.src.path != '' and                            $tag = 'img' and                              not(starts-with($output_filename, '/')) and                            not(contains($output_filename, '://'))">
-               <xsl:value-of select="$img.src.path"/>
-             </xsl:when>
-           </xsl:choose>
-            <xsl:value-of select="$output_filename"/>
-          </xsl:attribute>
-
-          <xsl:if test="@align">
-            <xsl:attribute name="align">
-              <xsl:choose>
-                <xsl:when test="@align = 'center'">middle</xsl:when>
-                <xsl:otherwise>
-                  <xsl:value-of select="@align"/>
-                </xsl:otherwise>
-              </xsl:choose>
-            </xsl:attribute>
-          </xsl:if>
-
-          <xsl:call-template name="process.image.attributes">
-            <xsl:with-param name="alt">
-              <xsl:choose>
-                <xsl:when test="$alt != ''">
-                  <xsl:copy-of select="$alt"/>
-                </xsl:when>
-                <xsl:when test="ancestor::figure">
-                  <xsl:value-of select="normalize-space(ancestor::figure/title)"/>
-                </xsl:when>
-              </xsl:choose>
-            </xsl:with-param>
-            <xsl:with-param name="html.depth" select="$html.depth"/>
-            <xsl:with-param name="html.width" select="$html.width"/>
-            <xsl:with-param name="longdesc" select="$longdesc"/>
-            <xsl:with-param name="scale" select="$scale"/>
-            <xsl:with-param name="scalefit" select="$scalefit"/>
-            <xsl:with-param name="scaled.contentdepth" select="$scaled.contentdepth"/>
-            <xsl:with-param name="scaled.contentwidth" select="$scaled.contentwidth"/>
-            <xsl:with-param name="viewport" select="$viewport"/>
-          </xsl:call-template>
-        </xsl:element>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="bgcolor">
-    <xsl:call-template name="pi.dbhtml_background-color">
-      <xsl:with-param name="node" select=".."/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="use.viewport" select="$viewport != 0                         and ($html.width != ''                              or ($html.depth != '' and $depth-units != '%')                              or $bgcolor != ''                              or @valign)"/>
-
-  <xsl:choose>
-    <xsl:when test="$use.viewport">
-      <table border="0" summary="manufactured viewport for HTML img" cellspacing="0" cellpadding="0">
-        <xsl:if test="$html.width != ''">
-          <xsl:attribute name="width">
-            <xsl:value-of select="$html.width"/>
-          </xsl:attribute>
-        </xsl:if>
-        <tr>
-          <xsl:if test="$html.depth != '' and $depth-units != '%'">
-            <!-- don't do this for percentages because browsers get confused -->
-            <xsl:choose>
-              <xsl:when test="$css.decoration != 0">
-                <xsl:attribute name="style">
-                  <xsl:text>height: </xsl:text>
-                  <xsl:value-of select="$html.depth"/>
-                  <xsl:text>px</xsl:text>
-                </xsl:attribute>
-              </xsl:when>
-              <xsl:otherwise>
-                <xsl:attribute name="height">
-                  <xsl:value-of select="$html.depth"/>
-                </xsl:attribute>
-              </xsl:otherwise>
-            </xsl:choose>
-          </xsl:if>
-          <td>
-            <xsl:if test="$bgcolor != ''">
-              <xsl:choose>
-                <xsl:when test="$css.decoration != 0">
-                  <xsl:attribute name="style">
-                    <xsl:text>background-color: </xsl:text>
-                    <xsl:value-of select="$bgcolor"/>
-                  </xsl:attribute>
-                </xsl:when>
-                <xsl:otherwise>
-                  <xsl:attribute name="bgcolor">
-                    <xsl:value-of select="$bgcolor"/>
-                  </xsl:attribute>
-                </xsl:otherwise>
-              </xsl:choose>
-            </xsl:if>
-            <xsl:if test="@align">
-              <xsl:attribute name="align">
-                <xsl:value-of select="@align"/>
-              </xsl:attribute>
-            </xsl:if>
-            <xsl:if test="@valign">
-              <xsl:attribute name="valign">
-                <xsl:value-of select="@valign"/>
-              </xsl:attribute>
-            </xsl:if>
-            <xsl:copy-of select="$img"/>
-          </td>
-        </tr>
-      </table>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy-of select="$img"/>
-    </xsl:otherwise>
-  </xsl:choose>
-
-  <xsl:if test="$tag = 'img' and ../../self::imageobjectco and not($scaled)">
-    <xsl:variable name="mapname">
-      <xsl:call-template name="object.id">
-        <xsl:with-param name="object" select="../../areaspec"/>
-      </xsl:call-template>
-    </xsl:variable>
-
-    <map name="{$mapname}">
-      <xsl:for-each select="../../areaspec//area">
-        <xsl:variable name="units">
-          <xsl:choose>
-            <xsl:when test="@units = 'other' and @otherunits">
-              <xsl:value-of select="@otherunits"/>
-            </xsl:when>
-            <xsl:when test="@units">
-              <xsl:value-of select="@units"/>
-            </xsl:when>
-            <!-- areaspec|areaset/area -->
-            <xsl:when test="../@units = 'other' and ../@otherunits">
-              <xsl:value-of select="../@otherunits"/>
-            </xsl:when>
-            <xsl:when test="../@units">
-              <xsl:value-of select="../@units"/>
-            </xsl:when>
-            <!-- areaspec/areaset/area -->
-            <xsl:when test="../../@units = 'other' and ../../@otherunits">
-              <xsl:value-of select="../@otherunits"/>
-            </xsl:when>
-            <xsl:when test="../../@units">
-              <xsl:value-of select="../../@units"/>
-            </xsl:when>
-            <xsl:otherwise>calspair</xsl:otherwise>
-          </xsl:choose>
-        </xsl:variable>
- 
-        <xsl:choose>
-          <xsl:when test="$units = 'calspair' or                           $units = 'imagemap'">
-            <xsl:variable name="coords" select="normalize-space(@coords)"/>
-
-            <area shape="rect">
-              <xsl:variable name="linkends">
-                <xsl:choose>
-                  <xsl:when test="@linkends">
-                    <xsl:value-of select="normalize-space(@linkends)"/>
-                  </xsl:when>
-                  <xsl:otherwise>
-                    <xsl:value-of select="normalize-space(../@linkends)"/>
-                  </xsl:otherwise>
-                </xsl:choose>
-              </xsl:variable>
- 
-              <xsl:variable name="href">
-                <xsl:choose>
-                  <xsl:when test="@xlink:href">
-                    <xsl:value-of select="@xlink:href"/>
-                  </xsl:when>
-                  <xsl:otherwise>
-                    <xsl:value-of select="../@xlink:href"/>
-                  </xsl:otherwise>
-                </xsl:choose>
-              </xsl:variable>
- 
-              <xsl:choose>
-                <xsl:when test="$linkends != ''">
-                  <xsl:variable name="linkend">
-                    <xsl:choose>
-                      <xsl:when test="contains($linkends, ' ')">
-                        <xsl:value-of select="substring-before($linkends, ' ')"/>
-                      </xsl:when>
-                      <xsl:otherwise>
-                        <xsl:value-of select="$linkends"/>
-                      </xsl:otherwise>
-                    </xsl:choose>
-                  </xsl:variable>
-                  
-                  <xsl:variable name="target" select="key('id', $linkend)[1]"/>
-                 
-                  <xsl:if test="$target">
-                    <xsl:attribute name="href">
-                      <xsl:call-template name="href.target">
-                        <xsl:with-param name="object" select="$target"/>
-                      </xsl:call-template>
-                    </xsl:attribute>
-                  </xsl:if>
-                </xsl:when>
-                <xsl:when test="$href != ''">
-                  <xsl:attribute name="href">
-                    <xsl:value-of select="$href"/>
-                  </xsl:attribute>
-                </xsl:when>
-              </xsl:choose>
- 
-              <xsl:if test="alt">
-                <xsl:attribute name="alt">
-                  <xsl:value-of select="alt[1]"/>
-                </xsl:attribute>
-              </xsl:if>
- 
-              <xsl:attribute name="coords">
-                <xsl:choose>
-                  <xsl:when test="$units = 'calspair'">
-
-                    <xsl:variable name="p1" select="substring-before($coords, ' ')"/>
-                    <xsl:variable name="p2" select="substring-after($coords, ' ')"/>
-         
-                    <xsl:variable name="x1" select="substring-before($p1,',')"/>
-                    <xsl:variable name="y1" select="substring-after($p1,',')"/>
-                    <xsl:variable name="x2" select="substring-before($p2,',')"/>
-                    <xsl:variable name="y2" select="substring-after($p2,',')"/>
-         
-                    <xsl:variable name="x1p" select="$x1 div 100.0"/>
-                    <xsl:variable name="y1p" select="$y1 div 100.0"/>
-                    <xsl:variable name="x2p" select="$x2 div 100.0"/>
-                    <xsl:variable name="y2p" select="$y2 div 100.0"/>
-         
-         <!--
-                    <xsl:message>
-                      <xsl:text>units: </xsl:text>
-                      <xsl:value-of select="$units"/>
-                      <xsl:text> </xsl:text>
-                      <xsl:value-of select="$x1p"/><xsl:text>, </xsl:text>
-                      <xsl:value-of select="$y1p"/><xsl:text>, </xsl:text>
-                      <xsl:value-of select="$x2p"/><xsl:text>, </xsl:text>
-                      <xsl:value-of select="$y2p"/><xsl:text>, </xsl:text>
-                    </xsl:message>
-         
-                    <xsl:message>
-                      <xsl:text>      </xsl:text>
-                      <xsl:value-of select="$intrinsicwidth"/>
-                      <xsl:text>, </xsl:text>
-                      <xsl:value-of select="$intrinsicdepth"/>
-                    </xsl:message>
-         
-                    <xsl:message>
-                      <xsl:text>      </xsl:text>
-                      <xsl:value-of select="$units"/>
-                      <xsl:text> </xsl:text>
-                      <xsl:value-of 
-                            select="round($x1p * $intrinsicwidth div 100.0)"/>
-                      <xsl:text>,</xsl:text>
-                      <xsl:value-of select="round($intrinsicdepth
-                                       - ($y2p * $intrinsicdepth div 100.0))"/>
-                      <xsl:text>,</xsl:text>
-                      <xsl:value-of select="round($x2p * 
-                                            $intrinsicwidth div 100.0)"/>
-                      <xsl:text>,</xsl:text>
-                      <xsl:value-of select="round($intrinsicdepth
-                                       - ($y1p * $intrinsicdepth div 100.0))"/>
-                    </xsl:message>
-         -->
-                    <xsl:value-of select="round($x1p * $intrinsicwidth div 100.0)"/>
-                    <xsl:text>,</xsl:text>
-                    <xsl:value-of select="round($intrinsicdepth                                         - ($y2p * $intrinsicdepth div 100.0))"/>
-                    <xsl:text>,</xsl:text>
-                    <xsl:value-of select="round($x2p * $intrinsicwidth div 100.0)"/>
-                    <xsl:text>,</xsl:text>
-                    <xsl:value-of select="round($intrinsicdepth                                       - ($y1p * $intrinsicdepth div 100.0))"/>
-                  </xsl:when>
-                  <xsl:otherwise>
-                    <xsl:copy-of select="$coords"/>
-                  </xsl:otherwise>
-                </xsl:choose>
-              </xsl:attribute>
-            </area>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:message>
-              <xsl:text>Warning: only calspair or </xsl:text>
-              <xsl:text>otherunits='imagemap' supported </xsl:text>
-              <xsl:text>in imageobjectco</xsl:text>
-            </xsl:message>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:for-each>
-    </map>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="process.image.attributes">
-  <xsl:param name="alt"/>
-  <xsl:param name="html.width"/>
-  <xsl:param name="html.depth"/>
-  <xsl:param name="longdesc"/>
-  <xsl:param name="scale"/>
-  <xsl:param name="scalefit"/>
-  <xsl:param name="scaled.contentdepth"/>
-  <xsl:param name="scaled.contentwidth"/>
-  <xsl:param name="viewport"/>
-
-  <xsl:choose>
-    <xsl:when test="@contentwidth or @contentdepth">
-      <!-- ignore @width/@depth, @scale, and @scalefit if specified -->
-      <xsl:if test="@contentwidth and $scaled.contentwidth != ''">
-        <xsl:attribute name="width">
-          <xsl:value-of select="$scaled.contentwidth"/>
-        </xsl:attribute>
-      </xsl:if>
-      <xsl:if test="@contentdepth and $scaled.contentdepth != ''">
-        <xsl:attribute name="height">
-          <xsl:value-of select="$scaled.contentdepth"/>
-        </xsl:attribute>
-      </xsl:if>
-    </xsl:when>
-
-    <xsl:when test="number($scale) != 1.0">
-      <!-- scaling is always uniform, so we only have to specify one dimension -->
-      <!-- ignore @scalefit if specified -->
-      <xsl:attribute name="width">
-        <xsl:value-of select="$scaled.contentwidth"/>
-      </xsl:attribute>
-    </xsl:when>
-
-    <xsl:when test="$scalefit != 0">
-      <xsl:choose>
-        <xsl:when test="contains($html.width, '%')">
-          <xsl:choose>
-            <xsl:when test="$viewport != 0">
-              <!-- The *viewport* will be scaled, so use 100% here! -->
-              <xsl:attribute name="width">
-                <xsl:value-of select="'100%'"/>
-              </xsl:attribute>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:attribute name="width">
-                <xsl:value-of select="$html.width"/>
-              </xsl:attribute>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-
-        <xsl:when test="contains($html.depth, '%')">
-          <!-- HTML doesn't deal with this case very well...do nothing -->
-        </xsl:when>
-
-        <xsl:when test="$scaled.contentwidth != '' and $html.width != ''                         and $scaled.contentdepth != '' and $html.depth != ''">
-          <!-- scalefit should not be anamorphic; figure out which direction -->
-          <!-- has the limiting scale factor and scale in that direction -->
-          <xsl:choose>
-            <xsl:when test="$html.width div $scaled.contentwidth &gt;                             $html.depth div $scaled.contentdepth">
-              <xsl:attribute name="height">
-                <xsl:value-of select="$html.depth"/>
-              </xsl:attribute>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:attribute name="width">
-                <xsl:value-of select="$html.width"/>
-              </xsl:attribute>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-
-        <xsl:when test="$scaled.contentwidth != '' and $html.width != ''">
-          <xsl:attribute name="width">
-            <xsl:value-of select="$html.width"/>
-          </xsl:attribute>
-        </xsl:when>
-
-        <xsl:when test="$scaled.contentdepth != '' and $html.depth != ''">
-          <xsl:attribute name="height">
-            <xsl:value-of select="$html.depth"/>
-          </xsl:attribute>
-        </xsl:when>
-      </xsl:choose>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:if test="$alt != ''">
-    <xsl:attribute name="alt">
-      <xsl:value-of select="normalize-space($alt)"/>
-    </xsl:attribute>
-  </xsl:if>
-
-  <xsl:if test="$longdesc != ''">
-    <xsl:attribute name="longdesc">
-      <xsl:value-of select="$longdesc"/>
-    </xsl:attribute>
-  </xsl:if>
-
-  <xsl:if test="@align and $viewport = 0">
-    <xsl:attribute name="align">
-      <xsl:choose>
-        <xsl:when test="@align = 'center'">middle</xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="@align"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:attribute>
-  </xsl:if>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="graphic">
-  <xsl:choose>
-    <xsl:when test="parent::inlineequation">
-      <xsl:call-template name="anchor"/>
-      <xsl:call-template name="process.image"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <div>
-        <xsl:if test="@align">
-          <xsl:attribute name="align">
-            <xsl:value-of select="@align"/>
-          </xsl:attribute>
-        </xsl:if>
-        <xsl:call-template name="anchor"/>
-        <xsl:call-template name="process.image"/>
-      </div>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="inlinegraphic">
-  <xsl:variable name="filename">
-    <xsl:choose>
-      <xsl:when test="@entityref">
-        <xsl:value-of select="unparsed-entity-uri(@entityref)"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:apply-templates select="@fileref"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:call-template name="anchor"/>
-
-  <xsl:choose>
-    <xsl:when test="@format='linespecific'">
-      <xsl:choose>
-        <xsl:when test="$use.extensions != '0'                         and $textinsert.extension != '0'">
-          <xsl:choose>
-            <xsl:when test="element-available('stext:insertfile')">
-              <stext:insertfile href="{$filename}" encoding="{$textdata.default.encoding}"/>
-            </xsl:when>
-            <xsl:when test="element-available('xtext:insertfile')">
-              <xtext:insertfile href="{$filename}"/>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:message terminate="yes">
-                <xsl:text>No insertfile extension available.</xsl:text>
-              </xsl:message>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-        <xsl:otherwise>
-          <a xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" href="{$filename}"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="process.image"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="mediaobject|mediaobjectco">
-
-  <xsl:variable name="olist" select="imageobject|imageobjectco                      |videoobject|audioobject                      |textobject"/>
-
-  <xsl:variable name="object.index">
-    <xsl:call-template name="select.mediaobject.index">
-      <xsl:with-param name="olist" select="$olist"/>
-      <xsl:with-param name="count" select="1"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="object" select="$olist[position() = $object.index]"/>
-
-  <xsl:variable name="align">
-    <xsl:value-of select="$object/descendant::imagedata[@align][1]/@align"/>
-  </xsl:variable>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:if test="$align != '' ">
-      <xsl:attribute name="align">
-        <xsl:value-of select="$align"/>
-      </xsl:attribute>
-    </xsl:if>
-    <xsl:call-template name="anchor"/>
-
-    <xsl:apply-templates select="$object"/>
-    <xsl:apply-templates select="caption"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="inlinemediaobject">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="anchor"/>
-    <xsl:call-template name="select.mediaobject"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="programlisting/inlinemediaobject                      |screen/inlinemediaobject" priority="2">
-  <!-- the additional span causes problems in some cases -->
-  <xsl:call-template name="select.mediaobject"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="imageobjectco">
-  <xsl:call-template name="anchor"/>
-  <xsl:apply-templates select="imageobject"/>
-  <xsl:apply-templates select="calloutlist"/>
-</xsl:template>
-
-<xsl:template match="imageobject">
-  <xsl:apply-templates select="imagedata"/>
-</xsl:template>
-
-<xsl:template match="imagedata">
-  <xsl:variable name="filename">
-    <xsl:call-template name="mediaobject.filename">
-      <xsl:with-param name="object" select=".."/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:choose>
-    <!-- Handle MathML and SVG markup in imagedata -->
-    <xsl:when xmlns:mml="http://www.w3.org/1998/Math/MathML" test="mml:*">
-      <xsl:apply-templates/>
-    </xsl:when>
-    
-    <xsl:when xmlns:svg="http://www.w3.org/2000/svg" test="svg:*">
-      <xsl:apply-templates/>
-    </xsl:when>
-
-    <xsl:when test="@format='linespecific'">
-      <xsl:choose>
-        <xsl:when test="$use.extensions != '0'                         and $textinsert.extension != '0'">
-          <xsl:choose>
-            <xsl:when test="element-available('stext:insertfile')">
-              <stext:insertfile href="{$filename}" encoding="{$textdata.default.encoding}"/>
-            </xsl:when>
-            <xsl:when test="element-available('xtext:insertfile')">
-              <xtext:insertfile href="{$filename}"/>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:message terminate="yes">
-                <xsl:text>No insertfile extension available.</xsl:text>
-              </xsl:message>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-        <xsl:otherwise>
-          <a xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" href="{$filename}"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:variable name="longdesc.uri">
-        <xsl:call-template name="longdesc.uri">
-          <xsl:with-param name="mediaobject" select="ancestor::imageobject/parent::*"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <xsl:variable name="phrases" select="ancestor::mediaobject/textobject[phrase]                             |ancestor::inlinemediaobject/textobject[phrase]                             |ancestor::mediaobjectco/textobject[phrase]"/>
-
-      <xsl:call-template name="process.image">
-        <xsl:with-param name="alt">
-          <xsl:apply-templates select="$phrases[not(@role) or @role!='tex'][1]"/>
-        </xsl:with-param>
-        <xsl:with-param name="longdesc">
-          <xsl:call-template name="write.longdesc">
-            <xsl:with-param name="mediaobject" select="ancestor::imageobject/parent::*"/>
-          </xsl:call-template>
-        </xsl:with-param>
-      </xsl:call-template>
-
-      <xsl:if test="$html.longdesc != 0 and $html.longdesc.link != 0                     and ancestor::imageobject/parent::*/textobject[not(phrase)]">
-        <xsl:call-template name="longdesc.link">
-          <xsl:with-param name="longdesc.uri" select="$longdesc.uri"/>
-        </xsl:call-template>
-      </xsl:if>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="longdesc.uri">
-  <xsl:param name="mediaobject" select="."/>
-  <xsl:if test="$html.longdesc">
-    <xsl:if test="$mediaobject/textobject[not(phrase)]">
-      <xsl:variable name="dbhtml.dir">
-        <xsl:call-template name="dbhtml-dir"/>
-      </xsl:variable>
-      <xsl:variable name="filename">
-        <xsl:call-template name="make-relative-filename">
-          <xsl:with-param name="base.dir">
-            <xsl:choose>
-              <xsl:when test="$dbhtml.dir != ''">
-                <xsl:value-of select="$dbhtml.dir"/>
-              </xsl:when>
-              <xsl:otherwise>
-                <xsl:value-of select="$base.dir"/>
-              </xsl:otherwise>
-            </xsl:choose>
-          </xsl:with-param>
-          <xsl:with-param name="base.name">
-            <xsl:choose>
-              <xsl:when test="                 $mediaobject/@*[local-name() = 'id']                 and not($use.id.as.filename = 0)">
-                <!-- * if this mediaobject has an ID, then we use the -->
-                <!-- * value of that ID as basename for the "longdesc" -->
-                <!-- * file (that is, without prepending an "ld-" too it) -->
-                <xsl:value-of select="$mediaobject/@*[local-name() = 'id']"/>
-                <xsl:value-of select="$html.ext"/>
-              </xsl:when>
-              <xsl:otherwise>
-                <!-- * otherwise, if this mediaobject does not have an -->
-                <!-- * ID, then we generate an ID... -->
-                <xsl:variable name="image-id">
-                  <xsl:call-template name="object.id">
-                    <xsl:with-param name="object" select="$mediaobject"/>
-                  </xsl:call-template>
-                </xsl:variable>
-                <!-- * ...and then we take that generated ID, prepend an -->
-                <!-- * "ld-" to it, and use that as the basename for the file -->
-                <xsl:value-of select="concat('ld-',$image-id,$html.ext)"/>
-              </xsl:otherwise>
-            </xsl:choose>
-          </xsl:with-param>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <xsl:value-of select="$filename"/>
-    </xsl:if>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="write.longdesc">
-  <xsl:param name="mediaobject" select="."/>
-  <xsl:if test="$html.longdesc != 0 and $mediaobject/textobject[not(phrase)]">
-    <xsl:variable name="filename">
-      <xsl:call-template name="longdesc.uri">
-        <xsl:with-param name="mediaobject" select="$mediaobject"/>
-      </xsl:call-template>
-    </xsl:variable>
-
-    <xsl:value-of select="$filename"/>
-
-    <xsl:call-template name="write.chunk">
-      <xsl:with-param name="filename" select="$filename"/>
-      <xsl:with-param name="quiet" select="$chunk.quietly"/>
-      <xsl:with-param name="content">
-      <xsl:call-template name="user.preroot"/>
-        <html>
-          <head>
-            <xsl:call-template name="system.head.content"/>
-            <xsl:call-template name="head.content">
-              <xsl:with-param name="title" select="'Long Description'"/>
-            </xsl:call-template>
-            <xsl:call-template name="user.head.content"/>
-          </head>
-          <body>
-            <xsl:call-template name="body.attributes"/>
-            <xsl:for-each select="$mediaobject/textobject[not(phrase)]">
-              <xsl:apply-templates select="./*"/>
-            </xsl:for-each>
-          </body>
-        </html>
-        <xsl:value-of select="$chunk.append"/>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="longdesc.link">
-  <xsl:param name="longdesc.uri" select="''"/>
-
-  <xsl:variable name="this.uri">
-    <xsl:call-template name="make-relative-filename">
-      <xsl:with-param name="base.dir" select="$base.dir"/>
-      <xsl:with-param name="base.name">
-        <xsl:call-template name="href.target.uri"/>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="href.to">
-    <xsl:call-template name="trim.common.uri.paths">
-      <xsl:with-param name="uriA" select="$longdesc.uri"/>
-      <xsl:with-param name="uriB" select="$this.uri"/>
-      <xsl:with-param name="return" select="'A'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <div class="longdesc-link" align="right">
-    <br clear="all"/>
-    <span class="longdesc-link">
-      <xsl:text>[</xsl:text>
-      <a href="{$href.to}" target="longdesc">D</a>
-      <xsl:text>]</xsl:text>
-    </span>
-  </div>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="videoobject">
-  <xsl:apply-templates select="videodata"/>
-</xsl:template>
-
-<xsl:template match="videodata">
-  <xsl:call-template name="process.image">
-    <xsl:with-param name="tag" select="'embed'"/>
-    <xsl:with-param name="alt">
-      <xsl:apply-templates select="(../../textobject/phrase)[1]"/>
-    </xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="audioobject">
-  <xsl:apply-templates select="audiodata"/>
-</xsl:template>
-
-<xsl:template match="audiodata">
-  <xsl:call-template name="process.image">
-    <xsl:with-param name="tag" select="'embed'"/>
-    <xsl:with-param name="alt">
-      <xsl:apply-templates select="(../../textobject/phrase)[1]"/>
-    </xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="textobject">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="textdata">
-  <xsl:variable name="filename">
-    <xsl:choose>
-      <xsl:when test="@entityref">
-        <xsl:value-of select="unparsed-entity-uri(@entityref)"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:apply-templates select="@fileref"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="encoding">
-    <xsl:choose>
-      <xsl:when test="@encoding">
-        <xsl:value-of select="@encoding"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$textdata.default.encoding"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$use.extensions != '0'                     and $textinsert.extension != '0'">
-      <xsl:choose>
-        <xsl:when test="element-available('stext:insertfile')">
-          <stext:insertfile href="{$filename}" encoding="{$encoding}"/>
-        </xsl:when>
-        <xsl:when test="element-available('xtext:insertfile')">
-          <xtext:insertfile href="{$filename}"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:message terminate="yes">
-            <xsl:text>No insertfile extension available.</xsl:text>
-          </xsl:message>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <a xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" href="{$filename}"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="caption">
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:if test="@align = 'right' or @align = 'left' or @align='center'">
-      <xsl:attribute name="align"><xsl:value-of select="@align"/></xsl:attribute>
-    </xsl:if>
-    <xsl:apply-templates/>
-  </div>
-</xsl:template>
-
-<!-- ==================================================================== -->
-<!-- "Support" for SVG -->
-
-<xsl:template xmlns:svg="http://www.w3.org/2000/svg" match="svg:*">
-  <xsl:copy>
-    <xsl:copy-of select="@*"/>
-    <xsl:apply-templates/>
-  </xsl:copy>
-</xsl:template>
-
-
-<!-- The following works sometimes, but needs to take into account
-             1. When there is no /*/@xml:base
-             2. When the chunks are going somewhere else
-<xsl:variable name="relpath">
-  <xsl:call-template name="relative-uri">
-    <xsl:with-param name="filename" select="@fileref"/>
-  </xsl:call-template>
-</xsl:variable>
-
-<xsl:choose>
-  <xsl:when test="/*/@xml:base
-                  and starts-with($relpath,/*/@xml:base)">
-    <xsl:value-of select="substring-after($relpath,/*/@xml:base)"/>
-  </xsl:when>
-  <xsl:otherwise>
-    <xsl:value-of select="@fileref"/>
-  </xsl:otherwise>
-</xsl:choose>
-<xsl:value-of select="@fileref"/>
-      </xsl:when>
--->
-<!-- Resolve xml:base attributes -->
-<xsl:template match="@fileref">
-  <!-- need a check for absolute urls -->
-  <xsl:choose>
-    <xsl:when test="contains(., ':')">
-      <!-- it has a uri scheme so it is an absolute uri -->
-      <xsl:value-of select="."/>
-    </xsl:when>
-    <xsl:when test="$keep.relative.image.uris != 0">
-      <!-- leave it alone -->
-      <xsl:value-of select="."/>
-    </xsl:when>
-    <xsl:otherwise>
-      <!-- its a relative uri that needs xml:base processing -->
-      <xsl:call-template name="relative-uri">
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/highlight.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/highlight.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,52 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xslthl="http://xslthl.sf.net" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xslthl" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     and other information.
-
-     ******************************************************************** -->
-
-<xsl:template match="xslthl:keyword">
-  <b class="hl-keyword"><xsl:apply-templates/></b>
-</xsl:template>
-
-<xsl:template match="xslthl:string">
-  <b class="hl-string"><i style="color:red"><xsl:apply-templates/></i></b>
-</xsl:template>
-
-<xsl:template match="xslthl:comment">
-  <i class="hl-comment" style="color: silver"><xsl:apply-templates/></i>
-</xsl:template>
-
-<xsl:template match="xslthl:tag">
-  <b class="hl-tag" style="color: blue"><xsl:apply-templates/></b>
-</xsl:template>
-
-<xsl:template match="xslthl:attribute">
-  <span class="hl-attribute" style="color: blue"><xsl:apply-templates/></span>
-</xsl:template>
-
-<xsl:template match="xslthl:value">
-  <span class="hl-value" style="color: blue"><xsl:apply-templates/></span>
-</xsl:template>
-
-<xsl:template match="xslthl:html">
-  <b><i style="color: red"><xsl:apply-templates/></i></b>
-</xsl:template>
-
-<xsl:template match="xslthl:xslt">
-  <b style="color: blue"><xsl:apply-templates/></b>
-</xsl:template>
-
-<xsl:template match="xslthl:section">
-  <b><xsl:apply-templates/></b>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/html-rtf.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/html-rtf.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,321 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:set="http://exslt.org/sets" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="exsl set" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<!-- This module contains templates that match against HTML nodes. It is used
-     to post-process result tree fragments for some sorts of cleanup.
-     These templates can only ever be fired by a processor that supports
-     exslt:node-set(). -->
-
-<!-- ==================================================================== -->
-
-<!-- insert.html.p mode templates insert a particular RTF at the beginning
-     of the first paragraph in the primary RTF. -->
-
-<xsl:template match="/" mode="insert.html.p">
-  <xsl:param name="mark" select="'?'"/>
-  <xsl:apply-templates mode="insert.html.p">
-    <xsl:with-param name="mark" select="$mark"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="*" mode="insert.html.p">
-  <xsl:param name="mark" select="'?'"/>
-  <xsl:copy>
-    <xsl:copy-of select="@*"/>
-    <xsl:apply-templates mode="insert.html.p">
-      <xsl:with-param name="mark" select="$mark"/>
-    </xsl:apply-templates>
-  </xsl:copy>
-</xsl:template>
-
-<xsl:template xmlns:html="http://www.w3.org/1999/xhtml" match="html:p|p" mode="insert.html.p">
-  <xsl:param name="mark" select="'?'"/>
-  <xsl:copy>
-    <xsl:copy-of select="@*"/>
-    <xsl:if test="not(preceding::p|preceding::html:p)">
-      <xsl:copy-of select="$mark"/>
-    </xsl:if>
-    <xsl:apply-templates mode="insert.html.p">
-      <xsl:with-param name="mark" select="$mark"/>
-    </xsl:apply-templates>
-  </xsl:copy>
-</xsl:template>
-
-<xsl:template match="text()|processing-instruction()|comment()" mode="insert.html.p">
-  <xsl:param name="mark" select="'?'"/>
-  <xsl:copy/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<!-- insert.html.text mode templates insert a particular RTF at the beginning
-     of the first text-node in the primary RTF. -->
-
-<xsl:template match="/" mode="insert.html.text">
-  <xsl:param name="mark" select="'?'"/>
-  <xsl:apply-templates mode="insert.html.text">
-    <xsl:with-param name="mark" select="$mark"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="*" mode="insert.html.text">
-  <xsl:param name="mark" select="'?'"/>
-  <xsl:copy>
-    <xsl:copy-of select="@*"/>
-    <xsl:apply-templates mode="insert.html.text">
-      <xsl:with-param name="mark" select="$mark"/>
-    </xsl:apply-templates>
-  </xsl:copy>
-</xsl:template>
-
-<xsl:template match="text()|processing-instruction()|comment()" mode="insert.html.text">
-  <xsl:param name="mark" select="'?'"/>
-
-  <xsl:if test="not(preceding::text())">
-    <xsl:copy-of select="$mark"/>
-  </xsl:if>
-
-  <xsl:copy/>
-</xsl:template>
-
-<xsl:template match="processing-instruction()|comment()" mode="insert.html.text">
-  <xsl:param name="mark" select="'?'"/>
-  <xsl:copy/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<!-- unwrap.p mode templates remove blocks from HTML p elements (and
-     other places where blocks aren't allowed) -->
-
-<xsl:template name="unwrap.p">
-  <xsl:param name="p"/>
-  <xsl:choose>
-    <xsl:when test="function-available('exsl:node-set')                     and function-available('set:leading')                     and function-available('set:trailing')">
-      <xsl:apply-templates select="exsl:node-set($p)" mode="unwrap.p"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy-of select="$p"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template xmlns:html="http://www.w3.org/1999/xhtml" match="html:p|p" mode="unwrap.p">
-  <!-- xmlns:html is necessary for the xhtml stylesheet case -->
-  <xsl:variable name="blocks" select="address|blockquote|div|hr|h1|h2|h3|h4|h5|h6                         |layer|p|pre|table|dl|menu|ol|ul|form                         |html:address|html:blockquote|html:div|html:hr                         |html:h1|html:h2|html:h3|html:h4|html:h5|html:h6                         |html:layer|html:p|html:pre|html:table|html:dl                         |html:menu|html:ol|html:ul|html:form"/>
-  <xsl:choose>
-    <xsl:when test="$blocks">
-      <xsl:call-template name="unwrap.p.nodes">
-        <xsl:with-param name="wrap" select="."/>
-        <xsl:with-param name="first" select="1"/>
-        <xsl:with-param name="nodes" select="node()"/>
-        <xsl:with-param name="blocks" select="$blocks"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy>
-        <xsl:copy-of select="@*"/>
-        <xsl:apply-templates mode="unwrap.p"/>
-      </xsl:copy>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="*" mode="unwrap.p">
-  <xsl:copy>
-    <xsl:copy-of select="@*"/>
-    <xsl:apply-templates mode="unwrap.p"/>
-  </xsl:copy>
-</xsl:template>
-
-<xsl:template match="text()|processing-instruction()|comment()" mode="unwrap.p">
-  <xsl:copy/>
-</xsl:template>
-
-<xsl:template name="unwrap.p.nodes">
-  <xsl:param name="wrap" select="."/>
-  <xsl:param name="first" select="0"/>
-  <xsl:param name="nodes"/>
-  <xsl:param name="blocks"/>
-  <xsl:variable name="block" select="$blocks[1]"/>
-
-  <!-- This template should never get called if these functions aren't available -->
-  <!-- but this test is still necessary so that processors don't choke on the -->
-  <!-- function calls if they don't support the set: functions -->
-  <xsl:if test="function-available('set:leading')                 and function-available('set:trailing')">
-    <xsl:choose>
-      <xsl:when test="$blocks">
-        <xsl:variable name="leading" select="set:leading($nodes,$block)"/>
-        <xsl:variable name="trailing" select="set:trailing($nodes,$block)"/>
-
-        <xsl:if test="(($wrap/@id or $wrap/@xml:id)                          and $first = 1) or $leading">
-          <xsl:element name="{local-name($wrap)}" namespace="http://www.w3.org/1999/xhtml">
-            <xsl:for-each select="$wrap/@*">
-              <xsl:if test="$first != 0 or local-name(.) != 'id'">
-                <xsl:copy/>
-              </xsl:if>
-            </xsl:for-each>
-            <xsl:apply-templates select="$leading" mode="unwrap.p"/>
-          </xsl:element>
-        </xsl:if>
-
-        <xsl:apply-templates select="$block" mode="unwrap.p"/>
-
-        <xsl:if test="$trailing">
-          <xsl:call-template name="unwrap.p.nodes">
-            <xsl:with-param name="wrap" select="$wrap"/>
-            <xsl:with-param name="nodes" select="$trailing"/>
-            <xsl:with-param name="blocks" select="$blocks[position() &gt; 1]"/>
-          </xsl:call-template>
-        </xsl:if>
-      </xsl:when>
-
-      <xsl:otherwise>
-        <xsl:if test="(($wrap/@id or $wrap/@xml:id) and $first = 1) or $nodes">
-          <xsl:element name="{local-name($wrap)}" namespace="http://www.w3.org/1999/xhtml">
-            <xsl:for-each select="$wrap/@*">
-              <xsl:if test="$first != 0 or local-name(.) != 'id'">
-                <xsl:copy/>
-              </xsl:if>
-            </xsl:for-each>
-            <xsl:apply-templates select="$nodes" mode="unwrap.p"/>
-          </xsl:element>
-        </xsl:if>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:if>
-</xsl:template>
-
-<!-- ==================================================================== -->
-<!-- make.verbatim.mode replaces spaces and newlines -->
-
-<xsl:template match="/" mode="make.verbatim.mode">
-  <xsl:apply-templates mode="make.verbatim.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="make.verbatim.mode">
-  <xsl:copy>
-    <xsl:copy-of select="@*"/>
-    <xsl:apply-templates mode="make.verbatim.mode"/>
-  </xsl:copy>
-</xsl:template>
-
-<xsl:template match="processing-instruction()|comment()" mode="make.verbatim.mode">
-  <xsl:copy/>
-</xsl:template>
-
-<xsl:template match="text()" mode="make.verbatim.mode">
-  <xsl:variable name="text" select="translate(., ' ', '&#160;')"/>
-
-  <xsl:choose>
-    <xsl:when test="not(contains($text, '&#10;'))">
-      <xsl:value-of select="$text"/>
-    </xsl:when>
-
-    <xsl:otherwise>
-      <xsl:variable name="len" select="string-length($text)"/>
-
-      <xsl:choose>
-        <xsl:when test="$len = 1">
-          <br/><xsl:text>
-</xsl:text>
-        </xsl:when>
-
-        <xsl:otherwise>
-          <xsl:variable name="half" select="$len div 2"/>
-          <xsl:call-template name="make-verbatim-recursive">
-            <xsl:with-param name="text" select="substring($text, 1, $half)"/>
-          </xsl:call-template>
-          <xsl:call-template name="make-verbatim-recursive">
-            <xsl:with-param name="text" select="substring($text, ($half + 1), $len)"/>
-          </xsl:call-template>
-    	</xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="make-verbatim-recursive">
-  <xsl:param name="text" select="''"/>
-
-  <xsl:choose>
-    <xsl:when test="not(contains($text, '&#10;'))">
-      <xsl:value-of select="$text"/>
-    </xsl:when>
-
-    <xsl:otherwise>
-      <xsl:variable name="len" select="string-length($text)"/>
-
-      <xsl:choose>
-        <xsl:when test="$len = 1">
-          <br/><xsl:text>
-</xsl:text>
-        </xsl:when>
-
-        <xsl:otherwise>
-    	  <xsl:variable name="half" select="$len div 2"/>
-          <xsl:call-template name="make-verbatim-recursive">
-    	    <xsl:with-param name="text" select="substring($text, 1, $half)"/>
-    	  </xsl:call-template>
-    	  <xsl:call-template name="make-verbatim-recursive">
-    	    <xsl:with-param name="text" select="substring($text, ($half + 1), $len)"/>
-    	  </xsl:call-template>
-    	</xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<!-- remove.empty.div mode templates remove empty blocks -->
-
-<xsl:template name="remove.empty.div">
-  <xsl:param name="div"/>
-  <xsl:choose>
-    <xsl:when test="function-available('exsl:node-set')">
-      <xsl:apply-templates select="exsl:node-set($div)" mode="remove.empty.div"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy-of select="$div"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template xmlns:html="http://www.w3.org/1999/xhtml" match="html:p|p|html:div|div" mode="remove.empty.div">
-  <xsl:if test="node()">
-    <xsl:copy>
-      <xsl:copy-of select="@*"/>
-      <xsl:apply-templates mode="remove.empty.div"/>
-    </xsl:copy>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="*" mode="remove.empty.div">
-  <xsl:copy>
-    <xsl:copy-of select="@*"/>
-    <xsl:apply-templates mode="remove.empty.div"/>
-  </xsl:copy>
-</xsl:template>
-
-<xsl:template match="text()|processing-instruction()|comment()" mode="remove.empty.div">
-  <xsl:copy/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/html.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/html.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,236 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- The generate.html.title template is currently used for generating HTML -->
-<!-- "title" attributes for some inline elements only, but not for any -->
-<!-- block elements. It is called in eleven places in the inline.xsl -->
-<!-- file. But it's called by all the inline.* templates (e.g., -->
-<!-- inline.boldseq), which in turn are called by other (element) -->
-<!-- templates, so it results, currently, in supporting generation of the -->
-<!-- HTML "title" attribute for a total of about 92 elements. -->
-<!-- You can use mode="html.title.attribute" to get a title for -->
-<!-- an element specified by a param, including targets of cross references. -->
-<xsl:template name="generate.html.title">
-  <xsl:apply-templates select="." mode="html.title.attribute"/>
-</xsl:template>
-
-<!-- Generate a title attribute for the context node -->
-<xsl:template match="*" mode="html.title.attribute">
-  <xsl:variable name="is.title">
-    <xsl:call-template name="gentext.template.exists">
-      <xsl:with-param name="context" select="'title'"/>
-      <xsl:with-param name="name" select="local-name(.)"/>
-      <xsl:with-param name="lang">
-        <xsl:call-template name="l10n.language"/>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="is.title-numbered">
-    <xsl:call-template name="gentext.template.exists">
-      <xsl:with-param name="context" select="'title-numbered'"/>
-      <xsl:with-param name="name" select="local-name(.)"/>
-      <xsl:with-param name="lang">
-        <xsl:call-template name="l10n.language"/>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="is.title-unnumbered">
-    <xsl:call-template name="gentext.template.exists">
-      <xsl:with-param name="context" select="'title-unnumbered'"/>
-      <xsl:with-param name="name" select="local-name(.)"/>
-      <xsl:with-param name="lang">
-        <xsl:call-template name="l10n.language"/>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="gentext.title">
-    <xsl:if test="$is.title != 0 or                   $is.title-numbered != 0 or                   $is.title-unnumbered != 0">
-      <xsl:apply-templates select="." mode="object.title.markup.textonly"/>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="string-length($gentext.title) != 0">
-      <xsl:attribute name="title">
-        <xsl:value-of select="$gentext.title"/>
-      </xsl:attribute>
-    </xsl:when>
-    <!-- Fall back to alt if available -->
-    <xsl:when test="alt">
-      <xsl:attribute name="title">
-        <xsl:value-of select="normalize-space(alt)"/>
-      </xsl:attribute>
-    </xsl:when>
-  </xsl:choose>
-
-</xsl:template>
-
-<xsl:template name="dir">
-  <xsl:param name="inherit" select="0"/>
-
-  <xsl:variable name="dir">
-    <xsl:choose>
-      <xsl:when test="@dir">
-        <xsl:value-of select="@dir"/>
-      </xsl:when>
-      <xsl:when test="$inherit != 0">
-        <xsl:value-of select="ancestor::*/@dir[1]"/>
-      </xsl:when>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:if test="$dir != ''">
-    <xsl:attribute name="dir">
-      <xsl:value-of select="$dir"/>
-    </xsl:attribute>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="anchor">
-  <xsl:param name="node" select="."/>
-  <xsl:param name="conditional" select="1"/>
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="$node"/>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:if test="$conditional = 0 or $node/@id or $node/@xml:id">
-    <a id="{$id}"/>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="href.target.uri">
-  <xsl:param name="context" select="."/>
-  <xsl:param name="object" select="."/>
-  <xsl:text>#</xsl:text>
-  <xsl:call-template name="object.id">
-    <xsl:with-param name="object" select="$object"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="href.target">
-  <xsl:param name="context" select="."/>
-  <xsl:param name="object" select="."/>
-  <xsl:text>#</xsl:text>
-  <xsl:call-template name="object.id">
-    <xsl:with-param name="object" select="$object"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="href.target.with.base.dir">
-  <xsl:param name="context" select="."/>
-  <xsl:param name="object" select="."/>
-  <xsl:if test="$manifest.in.base.dir = 0">
-    <xsl:value-of select="$base.dir"/>
-  </xsl:if>
-  <xsl:call-template name="href.target">
-    <xsl:with-param name="context" select="$context"/>
-    <xsl:with-param name="object" select="$object"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="dingbat">
-  <xsl:param name="dingbat">bullet</xsl:param>
-  <xsl:call-template name="dingbat.characters">
-    <xsl:with-param name="dingbat" select="$dingbat"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="dingbat.characters">
-  <!-- now that I'm using the real serializer, all that dingbat malarky -->
-  <!-- isn't necessary anymore... -->
-  <xsl:param name="dingbat">bullet</xsl:param>
-  <xsl:choose>
-    <xsl:when test="$dingbat='bullet'">&#8226;</xsl:when>
-    <xsl:when test="$dingbat='copyright'">&#169;</xsl:when>
-    <xsl:when test="$dingbat='trademark'">&#8482;</xsl:when>
-    <xsl:when test="$dingbat='trade'">&#8482;</xsl:when>
-    <xsl:when test="$dingbat='registered'">&#174;</xsl:when>
-    <xsl:when test="$dingbat='service'">(SM)</xsl:when>
-    <xsl:when test="$dingbat='nbsp'">&#160;</xsl:when>
-    <xsl:when test="$dingbat='ldquo'">&#8220;</xsl:when>
-    <xsl:when test="$dingbat='rdquo'">&#8221;</xsl:when>
-    <xsl:when test="$dingbat='lsquo'">&#8216;</xsl:when>
-    <xsl:when test="$dingbat='rsquo'">&#8217;</xsl:when>
-    <xsl:when test="$dingbat='em-dash'">&#8212;</xsl:when>
-    <xsl:when test="$dingbat='mdash'">&#8212;</xsl:when>
-    <xsl:when test="$dingbat='en-dash'">&#8211;</xsl:when>
-    <xsl:when test="$dingbat='ndash'">&#8211;</xsl:when>
-    <xsl:otherwise>
-      <xsl:text>&#8226;</xsl:text>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="id.warning">
-  <xsl:if test="$id.warnings != 0 and not(@id) and not(@xml:id) and parent::*">
-    <xsl:variable name="title">
-      <xsl:choose>
-        <xsl:when test="title">
-          <xsl:value-of select="title[1]"/>
-        </xsl:when>
-        <xsl:when test="substring(local-name(*[1]),                                   string-length(local-name(*[1])-3) = 'info')                         and *[1]/title">
-          <xsl:value-of select="*[1]/title[1]"/>
-        </xsl:when>
-        <xsl:when test="refmeta/refentrytitle">
-          <xsl:value-of select="refmeta/refentrytitle"/>
-        </xsl:when>
-        <xsl:when test="refnamediv/refname">
-          <xsl:value-of select="refnamediv/refname[1]"/>
-        </xsl:when>
-      </xsl:choose>
-    </xsl:variable>
-
-    <xsl:message>
-      <xsl:text>ID recommended on </xsl:text>
-      <xsl:value-of select="local-name(.)"/>
-      <xsl:if test="$title != ''">
-        <xsl:text>: </xsl:text>
-        <xsl:choose>
-          <xsl:when test="string-length($title) &gt; 40">
-            <xsl:value-of select="substring($title,1,40)"/>
-            <xsl:text>...</xsl:text>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="$title"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:if>
-    </xsl:message>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="*" mode="class.attribute">
-  <xsl:param name="class" select="local-name(.)"/>
-  <!-- permit customization of class attributes -->
-  <!-- Use element name by default -->
-  <xsl:attribute name="class">
-    <xsl:apply-templates select="." mode="class.value">
-      <xsl:with-param name="class" select="$class"/>
-    </xsl:apply-templates>
-  </xsl:attribute>
-</xsl:template>
-
-<xsl:template match="*" mode="class.value">
-  <xsl:param name="class" select="local-name(.)"/>
-  <!-- permit customization of class value only -->
-  <!-- Use element name by default -->
-  <xsl:value-of select="$class"/>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/htmltbl.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/htmltbl.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,56 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:template match="colgroup" mode="htmlTable">
-  <xsl:copy>
-    <xsl:copy-of select="@*"/>
-    <xsl:apply-templates mode="htmlTable"/>
-  </xsl:copy>
-</xsl:template>
-
-<xsl:template match="col" mode="htmlTable">
-  <xsl:copy>
-    <xsl:copy-of select="@*"/>
-  </xsl:copy>
-</xsl:template>
-
-<xsl:template match="caption" mode="htmlTable">
-  <xsl:copy>
-    <xsl:copy-of select="@*"/>
-
-    <xsl:apply-templates select=".." mode="object.title.markup">
-      <xsl:with-param name="allow-anchors" select="1"/>
-    </xsl:apply-templates>
-
-  </xsl:copy>
-</xsl:template>
-
-<xsl:template match="thead|tbody|tgroup|tr" mode="htmlTable">
-  <xsl:copy>
-    <xsl:copy-of select="@*"/>
-    <xsl:apply-templates mode="htmlTable"/>
-  </xsl:copy>
-</xsl:template>
-
-<xsl:template match="th|td" mode="htmlTable">
-  <xsl:copy>
-    <xsl:copy-of select="@*"/>
-    <xsl:apply-templates/> <!-- *not* mode=htmlTable -->
-  </xsl:copy>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/index.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/index.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,224 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:template match="index">
-  <!-- some implementations use completely empty index tags to indicate -->
-  <!-- where an automatically generated index should be inserted. so -->
-  <!-- if the index is completely empty, skip it. Unless generate.index -->
-  <!-- is non-zero, in which case, this is where the automatically -->
-  <!-- generated index should go. -->
-
-  <xsl:call-template name="id.warning"/>
-
-  <xsl:if test="count(*)&gt;0 or $generate.index != '0'">
-    <div>
-      <xsl:apply-templates select="." mode="class.attribute"/>
-      <xsl:if test="$generate.id.attributes != 0">
-        <xsl:attribute name="id">
-          <xsl:call-template name="object.id"/>
-        </xsl:attribute>
-      </xsl:if>
-
-      <xsl:call-template name="index.titlepage"/>
-      <xsl:choose>
-	<xsl:when test="indexdiv">
-	  <xsl:apply-templates/>
-	</xsl:when>
-	<xsl:otherwise>
-	  <xsl:apply-templates select="*[not(self::indexentry)]"/>
-	  <!-- Because it's actually valid for Index to have neither any -->
-	  <!-- Indexdivs nor any Indexentries, we need to check and make -->
-	  <!-- sure that at least one Indexentry exists, and generate a -->
-	  <!-- wrapper dl if there is at least one; otherwise, do nothing. -->
-	  <xsl:if test="indexentry">
-	    <!-- The indexentry template assumes a parent dl wrapper has -->
-	    <!-- been generated; for Indexes that have Indexdivs, the dl -->
-	    <!-- wrapper is generated by the indexdiv template; however, -->
-	    <!-- for Indexes that lack Indexdivs, if we don't generate a -->
-	    <!-- dl here, HTML output will not be valid. -->
-	    <dl>
-	      <xsl:apply-templates select="indexentry"/>
-	    </dl>
-	  </xsl:if>
-	</xsl:otherwise>
-      </xsl:choose>
-
-      <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0">
-        <xsl:call-template name="generate-index">
-          <xsl:with-param name="scope" select="(ancestor::book|/)[last()]"/>
-        </xsl:call-template>
-      </xsl:if>
-
-      <xsl:if test="not(parent::article)">
-        <xsl:call-template name="process.footnotes"/>
-      </xsl:if>
-    </div>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="setindex">
-  <!-- some implementations use completely empty index tags to indicate -->
-  <!-- where an automatically generated index should be inserted. so -->
-  <!-- if the index is completely empty, skip it. Unless generate.index -->
-  <!-- is non-zero, in which case, this is where the automatically -->
-  <!-- generated index should go. -->
-
-  <xsl:call-template name="id.warning"/>
-
-  <xsl:if test="count(*)&gt;0 or $generate.index != '0'">
-    <div>
-      <xsl:apply-templates select="." mode="class.attribute"/>
-      <xsl:if test="$generate.id.attributes != 0">
-        <xsl:attribute name="id">
-          <xsl:call-template name="object.id"/>
-        </xsl:attribute>
-      </xsl:if>
-
-      <xsl:call-template name="setindex.titlepage"/>
-      <xsl:apply-templates/>
-
-      <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0">
-        <xsl:call-template name="generate-index">
-          <xsl:with-param name="scope" select="/"/>
-        </xsl:call-template>
-      </xsl:if>
-
-      <xsl:if test="not(parent::article)">
-        <xsl:call-template name="process.footnotes"/>
-      </xsl:if>
-    </div>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="index/indexinfo"/>
-<xsl:template match="index/info"/>
-<xsl:template match="index/title"/>
-<xsl:template match="index/subtitle"/>
-<xsl:template match="index/titleabbrev"/>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="indexdiv">
-  <xsl:call-template name="id.warning"/>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:if test="$generate.id.attributes != 0">
-      <xsl:attribute name="id">
-        <xsl:call-template name="object.id"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:call-template name="anchor"/>
-    <xsl:apply-templates select="*[not(self::indexentry)]"/>
-    <dl>
-      <xsl:apply-templates select="indexentry"/>
-    </dl>
-  </div>
-</xsl:template>
-
-<xsl:template match="indexdiv/title">
-  <h3>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates/>
-  </h3>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="indexterm">
-  <!-- this one must have a name, even if it doesn't have an ID -->
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <a id="{$id}" class="indexterm"/>
-</xsl:template>
-
-<xsl:template match="primary|secondary|tertiary|see|seealso">
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="indexentry">
-  <xsl:apply-templates select="primaryie"/>
-</xsl:template>
-
-<xsl:template match="primaryie">
-  <dt>
-    <xsl:apply-templates/>
-  </dt>
-  <xsl:choose>
-    <xsl:when test="following-sibling::secondaryie">
-      <dd>
-        <dl>
-          <xsl:apply-templates select="following-sibling::secondaryie"/>
-        </dl>
-      </dd>
-    </xsl:when>
-    <xsl:when test="following-sibling::seeie                     |following-sibling::seealsoie">
-      <dd>
-        <dl>
-          <xsl:apply-templates select="following-sibling::seeie                                        |following-sibling::seealsoie"/>
-        </dl>
-      </dd>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="secondaryie">
-  <dt>
-    <xsl:apply-templates/>
-  </dt>
-  <xsl:choose>
-    <xsl:when test="following-sibling::tertiaryie">
-      <dd>
-        <dl>
-          <xsl:apply-templates select="following-sibling::tertiaryie"/>
-        </dl>
-      </dd>
-    </xsl:when>
-    <xsl:when test="following-sibling::seeie                     |following-sibling::seealsoie">
-      <dd>
-        <dl>
-          <xsl:apply-templates select="following-sibling::seeie                                        |following-sibling::seealsoie"/>
-        </dl>
-      </dd>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="tertiaryie">
-  <dt>
-    <xsl:apply-templates/>
-  </dt>
-  <xsl:if test="following-sibling::seeie                 |following-sibling::seealsoie">
-    <dd>
-      <dl>
-        <xsl:apply-templates select="following-sibling::seeie                                      |following-sibling::seealsoie"/>
-      </dl>
-    </dd>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="seeie|seealsoie">
-  <dt>
-    <xsl:apply-templates/>
-  </dt>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/info.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/info.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,44 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- These templates define the "default behavior" for info
-     elements.  Even if you don't process the *info wrappers,
-     some of these elements are needed because the elements are
-     processed from named templates that are called with modes.
-     Since modes aren't sticky, these rules apply. 
-     (TODO: clarify this comment) -->
-
-<!-- ==================================================================== -->
-<!-- called from named templates in a given mode -->
-
-<xsl:template match="corpauthor">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates/>
-  </span>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="jobtitle">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates/>
-  </span>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/inline.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/inline.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,1404 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:suwl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.UnwrapLinks" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xlink suwl" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-<xsl:template name="simple.xlink">
-  <xsl:param name="node" select="."/>
-  <xsl:param name="content">
-    <xsl:apply-templates/>
-  </xsl:param>
-  <xsl:param name="a.target"/>
-  <xsl:param name="linkend" select="$node/@linkend"/>
-  <xsl:param name="xhref" select="$node/@xlink:href"/>
-
-  <xsl:variable name="link">
-    <xsl:choose>
-      <xsl:when test="$xhref and                        (not($node/@xlink:type) or                             $node/@xlink:type='simple')">
-
-        <!-- Is it a local idref or a uri? -->
-        <xsl:variable name="is.idref">
-          <xsl:choose>
-            <!-- if the href starts with # and does not contain an "(" -->
-            <!-- or if the href starts with #xpointer(id(, it's just an ID -->
-            <xsl:when test="starts-with($xhref,'#')                             and (not(contains($xhref,'('))                             or starts-with($xhref,                                        '#xpointer(id('))">1</xsl:when>
-            <xsl:otherwise>0</xsl:otherwise>
-          </xsl:choose>
-        </xsl:variable>
-
-        <!-- Is it an olink ? -->
-        <xsl:variable name="is.olink">
-          <xsl:choose>
-	    <!-- If xlink:role="http://docbook.org/xlink/role/olink" -->
-            <!-- and if the href contains # -->
-            <xsl:when test="contains($xhref,'#') and           @xlink:role = $xolink.role">1</xsl:when>
-            <xsl:otherwise>0</xsl:otherwise>
-          </xsl:choose>
-        </xsl:variable>
-
-        <xsl:choose>
-          <xsl:when test="$is.idref = 1">
-
-            <xsl:variable name="idref">
-              <xsl:call-template name="xpointer.idref">
-                <xsl:with-param name="xpointer" select="$xhref"/>
-              </xsl:call-template>
-            </xsl:variable>
-
-            <xsl:variable name="targets" select="key('id',$idref)"/>
-            <xsl:variable name="target" select="$targets[1]"/>
-
-            <xsl:call-template name="check.id.unique">
-              <xsl:with-param name="linkend" select="$idref"/>
-            </xsl:call-template>
-
-            <xsl:choose>
-              <xsl:when test="count($target) = 0">
-                <xsl:message>
-                  <xsl:text>XLink to nonexistent id: </xsl:text>
-                  <xsl:value-of select="$idref"/>
-                </xsl:message>
-                <xsl:copy-of select="$content"/>
-              </xsl:when>
-
-              <xsl:otherwise>
-                <a>
-                  <xsl:apply-templates select="." mode="class.attribute"/>
-
-                  <xsl:attribute name="href">
-                    <xsl:call-template name="href.target">
-                      <xsl:with-param name="object" select="$target"/>
-                    </xsl:call-template>
-                  </xsl:attribute>
-
-                  <xsl:choose>
-                    <xsl:when test="$node/@xlink:title">
-                      <xsl:attribute name="title">
-                        <xsl:value-of select="$node/@xlink:title"/>
-                      </xsl:attribute>
-                    </xsl:when>
-                    <xsl:otherwise>
-                      <xsl:apply-templates select="$target" mode="html.title.attribute"/>
-                    </xsl:otherwise>
-                  </xsl:choose>
-
-                  <xsl:if test="$a.target">
-                    <xsl:attribute name="target">
-                      <xsl:value-of select="$a.target"/>
-                    </xsl:attribute>
-                  </xsl:if>
-
-                  <xsl:copy-of select="$content"/>
-
-                </a>
-              </xsl:otherwise>
-            </xsl:choose>
-          </xsl:when>
-
-          <xsl:when test="$is.olink = 1">
-	    <xsl:call-template name="olink">
-	      <xsl:with-param name="content" select="$content"/>
-	    </xsl:call-template>
-          </xsl:when>
-
-          <!-- otherwise it's a URI -->
-          <xsl:otherwise>
-            <a>
-              <xsl:apply-templates select="." mode="class.attribute"/>
-              <xsl:attribute name="href">
-                <xsl:value-of select="$xhref"/>
-              </xsl:attribute>
-              <xsl:if test="$node/@xlink:title">
-                <xsl:attribute name="title">
-                  <xsl:value-of select="$node/@xlink:title"/>
-                </xsl:attribute>
-              </xsl:if>
-              <xsl:copy-of select="$content"/>
-            </a>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:when>
-
-      <xsl:when test="$linkend">
-        <xsl:variable name="targets" select="key('id',$linkend)"/>
-        <xsl:variable name="target" select="$targets[1]"/>
-
-        <xsl:call-template name="check.id.unique">
-          <xsl:with-param name="linkend" select="$linkend"/>
-        </xsl:call-template>
-
-        <a>
-          <xsl:apply-templates select="." mode="class.attribute"/>
-          <xsl:attribute name="href">
-            <xsl:call-template name="href.target">
-              <xsl:with-param name="object" select="$target"/>
-            </xsl:call-template>
-          </xsl:attribute>
-
-          <xsl:apply-templates select="$target" mode="html.title.attribute"/>
-
-          <xsl:copy-of select="$content"/>
-          
-        </a>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:copy-of select="$content"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="function-available('suwl:unwrapLinks')">
-      <xsl:copy-of select="suwl:unwrapLinks($link)"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy-of select="$link"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="inline.charseq">
-  <xsl:param name="content">
-    <xsl:call-template name="anchor"/>
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content">
-        <xsl:apply-templates/>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:param>
-  <!-- * if you want output from the inline.charseq template wrapped in -->
-  <!-- * something other than a Span, call the template with some value -->
-  <!-- * for the 'wrapper-name' param -->
-  <xsl:param name="wrapper-name">span</xsl:param>
-  <xsl:element name="{$wrapper-name}" namespace="http://www.w3.org/1999/xhtml">
-    <xsl:attribute name="class">
-      <xsl:value-of select="local-name(.)"/>
-    </xsl:attribute>
-    <xsl:call-template name="dir"/>
-    <xsl:call-template name="generate.html.title"/>
-    <xsl:copy-of select="$content"/>
-    <xsl:call-template name="apply-annotations"/>
-  </xsl:element>
-</xsl:template>
-
-<xsl:template name="inline.monoseq">
-  <xsl:param name="content">
-    <xsl:call-template name="anchor"/>
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content">
-        <xsl:apply-templates/>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:param>
-  <code>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="dir"/>
-    <xsl:call-template name="generate.html.title"/>
-    <xsl:copy-of select="$content"/>
-    <xsl:call-template name="apply-annotations"/>
-  </code>
-</xsl:template>
-
-<xsl:template name="inline.boldseq">
-  <xsl:param name="content">
-    <xsl:call-template name="anchor"/>
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content">
-        <xsl:apply-templates/>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:param>
-
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="generate.html.title"/>
-    <xsl:call-template name="dir"/>
-
-    <!-- don't put <strong> inside figure, example, or table titles -->
-    <xsl:choose>
-      <xsl:when test="local-name(..) = 'title'                       and (local-name(../..) = 'figure'                       or local-name(../..) = 'example'                       or local-name(../..) = 'table')">
-        <xsl:copy-of select="$content"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <strong>
-          <xsl:copy-of select="$content"/>
-        </strong>
-      </xsl:otherwise>
-    </xsl:choose>
-    <xsl:call-template name="apply-annotations"/>
-  </span>
-</xsl:template>
-
-<xsl:template name="inline.italicseq">
-  <xsl:param name="content">
-    <xsl:call-template name="anchor"/>
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content">
-        <xsl:apply-templates/>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:param>
-  <em>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="generate.html.title"/>
-    <xsl:call-template name="dir"/>
-    <xsl:copy-of select="$content"/>
-    <xsl:call-template name="apply-annotations"/>
-  </em>
-</xsl:template>
-
-<xsl:template name="inline.boldmonoseq">
-  <xsl:param name="content">
-    <xsl:call-template name="anchor"/>
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content">
-        <xsl:apply-templates/>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:param>
-  <!-- don't put <strong> inside figure, example, or table titles -->
-  <!-- or other titles that may already be represented with <strong>'s. -->
-  <xsl:choose>
-    <xsl:when test="local-name(..) = 'title'                     and (local-name(../..) = 'figure'                          or local-name(../..) = 'example'                          or local-name(../..) = 'table'                          or local-name(../..) = 'formalpara')">
-      <code>
-        <xsl:apply-templates select="." mode="class.attribute"/>
-        <xsl:call-template name="generate.html.title"/>
-        <xsl:call-template name="dir"/>
-        <xsl:copy-of select="$content"/>
-        <xsl:call-template name="apply-annotations"/>
-      </code>
-    </xsl:when>
-    <xsl:otherwise>
-      <strong>
-        <xsl:apply-templates select="." mode="class.attribute"/>
-        <code>
-          <xsl:call-template name="generate.html.title"/>
-          <xsl:call-template name="dir"/>
-          <xsl:copy-of select="$content"/>
-        </code>
-        <xsl:call-template name="apply-annotations"/>
-      </strong>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="inline.italicmonoseq">
-  <xsl:param name="content">
-    <xsl:call-template name="anchor"/>
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content">
-        <xsl:apply-templates/>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:param>
-  <em>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <code>
-      <xsl:call-template name="generate.html.title"/>
-      <xsl:call-template name="dir"/>
-      <xsl:copy-of select="$content"/>
-      <xsl:call-template name="apply-annotations"/>
-    </code>
-  </em>
-</xsl:template>
-
-<xsl:template name="inline.superscriptseq">
-  <xsl:param name="content">
-    <xsl:call-template name="anchor"/>
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content">
-        <xsl:apply-templates/>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:param>
-  <sup>
-    <xsl:call-template name="generate.html.title"/>
-    <xsl:call-template name="dir"/>
-    <xsl:copy-of select="$content"/>
-    <xsl:call-template name="apply-annotations"/>
-  </sup>
-</xsl:template>
-
-<xsl:template name="inline.subscriptseq">
-  <xsl:param name="content">
-    <xsl:call-template name="anchor"/>
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content">
-        <xsl:apply-templates/>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:param>
-  <sub>
-    <xsl:call-template name="generate.html.title"/>
-    <xsl:call-template name="dir"/>
-    <xsl:copy-of select="$content"/>
-    <xsl:call-template name="apply-annotations"/>
-  </sub>
-</xsl:template>
-
-<!-- ==================================================================== -->
-<!-- some special cases -->
-
-<xsl:template match="author">
-  <xsl:param name="content">
-    <xsl:call-template name="anchor"/>
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content">
-        <xsl:call-template name="person.name"/>
-      </xsl:with-param>
-    </xsl:call-template>
-    <xsl:call-template name="apply-annotations"/>
-  </xsl:param>
-
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:copy-of select="$content"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="editor">
-  <xsl:param name="content">
-    <xsl:call-template name="anchor"/>
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content">
-        <xsl:call-template name="person.name"/>
-      </xsl:with-param>
-    </xsl:call-template>
-    <xsl:call-template name="apply-annotations"/>
-  </xsl:param>
-
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:copy-of select="$content"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="othercredit">
-  <xsl:param name="content">
-    <xsl:call-template name="anchor"/>
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content">
-        <xsl:call-template name="person.name"/>
-      </xsl:with-param>
-    </xsl:call-template>
-    <xsl:call-template name="apply-annotations"/>
-  </xsl:param>
-
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:copy-of select="$content"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="authorinitials">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="accel">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="action">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="application">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="classname">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:template match="exceptionname">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:template match="interfacename">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:template match="methodname">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:template match="command">
-  <xsl:call-template name="inline.boldseq"/>
-</xsl:template>
-
-<xsl:template match="computeroutput">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:template match="constant">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:template match="database">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="date">
-  <!-- should this support locale-specific formatting? how? -->
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="errorcode">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="errorname">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="errortype">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="errortext">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="envar">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:template match="filename">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:template match="function">
-  <xsl:choose>
-    <xsl:when test="$function.parens != '0'                     and (parameter or function or replaceable)">
-      <xsl:variable name="nodes" select="text()|*"/>
-      <xsl:call-template name="inline.monoseq">
-        <xsl:with-param name="content">
-          <xsl:call-template name="simple.xlink">
-            <xsl:with-param name="content">
-              <xsl:apply-templates select="$nodes[1]"/>
-            </xsl:with-param>
-          </xsl:call-template>
-        </xsl:with-param>
-      </xsl:call-template>
-      <xsl:text>(</xsl:text>
-      <xsl:apply-templates select="$nodes[position()&gt;1]"/>
-      <xsl:text>)</xsl:text>
-    </xsl:when>
-    <xsl:otherwise>
-     <xsl:call-template name="inline.monoseq"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="function/parameter" priority="2">
-  <xsl:call-template name="inline.italicmonoseq"/>
-  <xsl:if test="following-sibling::*">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="function/replaceable" priority="2">
-  <xsl:call-template name="inline.italicmonoseq"/>
-  <xsl:if test="following-sibling::*">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="guibutton">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="guiicon">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="guilabel">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="guimenu">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="guimenuitem">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="guisubmenu">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="hardware">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="interface">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="interfacedefinition">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="keycap">
-  <xsl:call-template name="inline.boldseq"/>
-</xsl:template>
-
-<xsl:template match="keycode">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="keysym">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="literal">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:template match="code">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:template match="medialabel">
-  <xsl:call-template name="inline.italicseq"/>
-</xsl:template>
-
-<xsl:template match="shortcut">
-  <xsl:call-template name="inline.boldseq"/>
-</xsl:template>
-
-<xsl:template match="mousebutton">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="option">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:template match="package">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="parameter">
-  <xsl:call-template name="inline.italicmonoseq"/>
-</xsl:template>
-
-<xsl:template match="property">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="prompt">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:template match="replaceable" priority="1">
-  <xsl:call-template name="inline.italicmonoseq"/>
-</xsl:template>
-
-<xsl:template match="returnvalue">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="structfield">
-  <xsl:call-template name="inline.italicmonoseq"/>
-</xsl:template>
-
-<xsl:template match="structname">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="symbol">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="systemitem">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:template match="token">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="type">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="userinput">
-  <xsl:call-template name="inline.boldmonoseq"/>
-</xsl:template>
-
-<xsl:template match="abbrev">
-  <xsl:call-template name="inline.charseq">
-    <xsl:with-param name="wrapper-name">abbr</xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="acronym">
-  <xsl:call-template name="inline.charseq">
-    <xsl:with-param name="wrapper-name">acronym</xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="citerefentry">
-  <xsl:choose>
-    <xsl:when test="$citerefentry.link != '0'">
-      <a>
-        <xsl:apply-templates select="." mode="class.attribute"/>
-        <xsl:attribute name="href">
-          <xsl:call-template name="generate.citerefentry.link"/>
-        </xsl:attribute>
-        <xsl:call-template name="inline.charseq"/>
-      </a>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="inline.charseq"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="generate.citerefentry.link">
-  <!-- nop -->
-</xsl:template>
-
-<xsl:template name="x.generate.citerefentry.link">
-  <xsl:text>http://example.com/cgi-bin/man.cgi?</xsl:text>
-  <xsl:value-of select="refentrytitle"/>
-  <xsl:text>(</xsl:text>
-  <xsl:value-of select="manvolnum"/>
-  <xsl:text>)</xsl:text>
-</xsl:template>
-
-<xsl:template match="citetitle">
-  <xsl:choose>
-    <xsl:when test="@pubwork = 'article'">
-      <xsl:call-template name="gentext.startquote"/>
-      <xsl:call-template name="inline.charseq"/>
-      <xsl:call-template name="gentext.endquote"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="inline.italicseq"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="emphasis">
-  <span>
-    <xsl:choose>
-      <xsl:when test="@role and $emphasis.propagates.style != 0">
-        <xsl:apply-templates select="." mode="class.attribute">
-          <xsl:with-param name="class" select="@role"/>
-        </xsl:apply-templates>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:apply-templates select="." mode="class.attribute"/>
-      </xsl:otherwise>
-    </xsl:choose>
-    <xsl:call-template name="anchor"/>
-
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content">
-        <xsl:choose>
-          <xsl:when test="@role = 'bold' or @role='strong'">
-            <!-- backwards compatibility: make bold into b elements, but -->
-            <!-- don't put bold inside figure, example, or table titles -->
-            <xsl:choose>
-              <xsl:when test="local-name(..) = 'title'                               and (local-name(../..) = 'figure'                               or local-name(../..) = 'example'                               or local-name(../..) = 'table')">
-                <xsl:apply-templates/>
-              </xsl:when>
-              <xsl:otherwise>
-                <strong><xsl:apply-templates/></strong>
-              </xsl:otherwise>
-            </xsl:choose>
-          </xsl:when>
-          <xsl:when test="@role and $emphasis.propagates.style != 0">
-            <xsl:apply-templates/>
-          </xsl:when>
-          <xsl:otherwise>
-            <em><xsl:apply-templates/></em>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:with-param>
-    </xsl:call-template>
-  </span>
-</xsl:template>
-
-<xsl:template match="foreignphrase">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:if test="@lang or @xml:lang">
-      <xsl:call-template name="language.attribute"/>
-    </xsl:if>
-    <xsl:call-template name="inline.italicseq"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="markup">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="phrase">
-  <span>
-    <xsl:call-template name="generate.html.title"/>
-    <xsl:if test="@lang or @xml:lang">
-      <xsl:call-template name="language.attribute"/>
-    </xsl:if>
-    <xsl:if test="@role and $phrase.propagates.style != 0">
-      <xsl:apply-templates select="." mode="class.attribute">
-        <xsl:with-param name="class" select="@role"/>
-      </xsl:apply-templates>
-    </xsl:if>
-    <xsl:call-template name="dir"/>
-    <xsl:call-template name="anchor"/>
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content">
-        <xsl:apply-templates/>
-      </xsl:with-param>
-    </xsl:call-template>
-    <xsl:call-template name="apply-annotations"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="quote">
-  <xsl:variable name="depth">
-    <xsl:call-template name="dot.count">
-      <xsl:with-param name="string">
-        <xsl:number level="multiple"/>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:choose>
-    <xsl:when test="$depth mod 2 = 0">
-      <xsl:call-template name="gentext.startquote"/>
-      <xsl:call-template name="inline.charseq"/>
-      <xsl:call-template name="gentext.endquote"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="gentext.nestedstartquote"/>
-      <xsl:call-template name="inline.charseq"/>
-      <xsl:call-template name="gentext.nestedendquote"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="varname">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:template match="wordasword">
-  <xsl:call-template name="inline.italicseq"/>
-</xsl:template>
-
-<xsl:template match="lineannotation">
-  <em>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="inline.charseq"/>
-  </em>
-</xsl:template>
-
-<xsl:template match="superscript">
-  <xsl:call-template name="inline.superscriptseq"/>
-</xsl:template>
-
-<xsl:template match="subscript">
-  <xsl:call-template name="inline.subscriptseq"/>
-</xsl:template>
-
-<xsl:template match="trademark">
-  <xsl:call-template name="inline.charseq"/>
-  <xsl:choose>
-    <xsl:when test="@class = 'copyright'                     or @class = 'registered'">
-      <xsl:call-template name="dingbat">
-        <xsl:with-param name="dingbat" select="@class"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="@class = 'service'">
-      <sup>SM</sup>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="dingbat">
-        <xsl:with-param name="dingbat" select="'trademark'"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="firstterm">
-  <xsl:call-template name="glossterm">
-    <xsl:with-param name="firstterm" select="1"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="glossterm" name="glossterm">
-  <xsl:param name="firstterm" select="0"/>
-
-  <!-- To avoid extra <a name=""> anchor from inline.italicseq -->
-  <xsl:variable name="content">
-    <xsl:apply-templates/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="($firstterm.only.link = 0 or $firstterm = 1) and @linkend">
-      <xsl:variable name="targets" select="key('id',@linkend)"/>
-      <xsl:variable name="target" select="$targets[1]"/>
-
-      <xsl:call-template name="check.id.unique">
-        <xsl:with-param name="linkend" select="@linkend"/>
-      </xsl:call-template>
-
-      <xsl:choose>
-        <xsl:when test="$target">
-          <a>
-            <xsl:apply-templates select="." mode="class.attribute"/>
-            <xsl:if test="@id or @xml:id">
-              <xsl:attribute name="id">
-                <xsl:value-of select="(@id|@xml:id)[1]"/>
-              </xsl:attribute>
-            </xsl:if>
-
-            <xsl:attribute name="href">
-              <xsl:call-template name="href.target">
-                <xsl:with-param name="object" select="$target"/>
-              </xsl:call-template>
-            </xsl:attribute>
-
-            <xsl:call-template name="inline.italicseq">
-              <xsl:with-param name="content" select="$content"/>
-            </xsl:call-template>
-          </a>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="inline.italicseq">
-            <xsl:with-param name="content" select="$content"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-
-    <xsl:when test="not(@linkend)                     and ($firstterm.only.link = 0 or $firstterm = 1)                     and ($glossterm.auto.link != 0)                     and $glossary.collection != ''">
-      <xsl:variable name="term">
-        <xsl:choose>
-          <xsl:when test="@baseform"><xsl:value-of select="@baseform"/></xsl:when>
-          <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
-        </xsl:choose>
-      </xsl:variable>
-
-      <xsl:variable name="cterm" select="(document($glossary.collection,.)//glossentry[glossterm=$term])[1]"/>
-
-      <!-- HACK HACK HACK! But it works... -->
-      <!-- You'd need to do more work if you wanted to chunk on glossdiv, though -->
-
-      <xsl:variable name="glossary" select="//glossary[@role='auto']"/>
-
-      <xsl:if test="count($glossary) != 1">
-        <xsl:message>
-          <xsl:text>Warning: glossary.collection specified, but there are </xsl:text>
-          <xsl:value-of select="count($glossary)"/>
-          <xsl:text> automatic glossaries</xsl:text>
-        </xsl:message>
-      </xsl:if>
-
-      <xsl:variable name="glosschunk">
-        <xsl:call-template name="href.target">
-          <xsl:with-param name="object" select="$glossary"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <xsl:variable name="chunkbase">
-        <xsl:choose>
-          <xsl:when test="contains($glosschunk, '#')">
-            <xsl:value-of select="substring-before($glosschunk, '#')"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="$glosschunk"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:variable>
-
-      <xsl:choose>
-        <xsl:when test="not($cterm)">
-          <xsl:message>
-            <xsl:text>There's no entry for </xsl:text>
-            <xsl:value-of select="$term"/>
-            <xsl:text> in </xsl:text>
-            <xsl:value-of select="$glossary.collection"/>
-          </xsl:message>
-          <xsl:call-template name="inline.italicseq"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:variable name="id">
-            <xsl:call-template name="object.id">
-              <xsl:with-param name="object" select="$cterm"/>
-            </xsl:call-template>
-          </xsl:variable>
-          <a href="{$chunkbase}#{$id}">
-            <xsl:apply-templates select="." mode="class.attribute"/>
-            <xsl:call-template name="inline.italicseq">
-              <xsl:with-param name="content" select="$content"/>
-            </xsl:call-template>
-          </a>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-
-    <xsl:when test="not(@linkend)                     and ($firstterm.only.link = 0 or $firstterm = 1)                     and $glossterm.auto.link != 0">
-      <xsl:variable name="term">
-        <xsl:choose>
-          <xsl:when test="@baseform">
-            <xsl:value-of select="normalize-space(@baseform)"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="normalize-space(.)"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:variable>
-      <xsl:variable name="targets" select="//glossentry[normalize-space(glossterm)=$term                               or normalize-space(glossterm/@baseform)=$term]"/>
-      <xsl:variable name="target" select="$targets[1]"/>
-
-      <xsl:choose>
-        <xsl:when test="count($targets)=0">
-          <xsl:message>
-            <xsl:text>Error: no glossentry for glossterm: </xsl:text>
-            <xsl:value-of select="."/>
-            <xsl:text>.</xsl:text>
-          </xsl:message>
-          <xsl:call-template name="inline.italicseq"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <a>
-            <xsl:apply-templates select="." mode="class.attribute"/>
-            <xsl:if test="@id or @xml:id">
-              <xsl:attribute name="id">
-                <xsl:value-of select="(@id|@xml:id)[1]"/>
-              </xsl:attribute>
-            </xsl:if>
-
-            <xsl:attribute name="href">
-              <xsl:call-template name="href.target">
-                <xsl:with-param name="object" select="$target"/>
-              </xsl:call-template>
-            </xsl:attribute>
-
-            <xsl:call-template name="inline.italicseq">
-              <xsl:with-param name="content" select="$content"/>
-            </xsl:call-template>
-          </a>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-
-    <xsl:otherwise>
-      <xsl:call-template name="inline.italicseq"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="termdef">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="generate.html.title"/>
-    <xsl:call-template name="gentext.template">
-      <xsl:with-param name="context" select="'termdef'"/>
-      <xsl:with-param name="name" select="'prefix'"/>
-    </xsl:call-template>
-    <xsl:apply-templates/>
-    <xsl:call-template name="gentext.template">
-      <xsl:with-param name="context" select="'termdef'"/>
-      <xsl:with-param name="name" select="'suffix'"/>
-    </xsl:call-template>
-  </span>
-</xsl:template>
-
-<xsl:template match="sgmltag|tag">
-  <xsl:call-template name="format.sgmltag"/>
-</xsl:template>
-
-<xsl:template name="format.sgmltag">
-  <xsl:param name="class">
-    <xsl:choose>
-      <xsl:when test="@class">
-        <xsl:value-of select="@class"/>
-      </xsl:when>
-      <xsl:otherwise>element</xsl:otherwise>
-    </xsl:choose>
-  </xsl:param>
-
-  <xsl:variable name="content">
-    <xsl:choose>
-      <xsl:when test="$class='attribute'">
-        <xsl:apply-templates/>
-      </xsl:when>
-      <xsl:when test="$class='attvalue'">
-        <xsl:apply-templates/>
-      </xsl:when>
-      <xsl:when test="$class='element'">
-        <xsl:apply-templates/>
-      </xsl:when>
-      <xsl:when test="$class='endtag'">
-        <xsl:text>&lt;/</xsl:text>
-        <xsl:apply-templates/>
-        <xsl:text>&gt;</xsl:text>
-      </xsl:when>
-      <xsl:when test="$class='genentity'">
-        <xsl:text>&amp;</xsl:text>
-        <xsl:apply-templates/>
-        <xsl:text>;</xsl:text>
-      </xsl:when>
-      <xsl:when test="$class='numcharref'">
-        <xsl:text>&amp;#</xsl:text>
-        <xsl:apply-templates/>
-        <xsl:text>;</xsl:text>
-      </xsl:when>
-      <xsl:when test="$class='paramentity'">
-        <xsl:text>%</xsl:text>
-        <xsl:apply-templates/>
-        <xsl:text>;</xsl:text>
-      </xsl:when>
-      <xsl:when test="$class='pi'">
-        <xsl:text>&lt;?</xsl:text>
-        <xsl:apply-templates/>
-        <xsl:text>&gt;</xsl:text>
-      </xsl:when>
-      <xsl:when test="$class='xmlpi'">
-        <xsl:text>&lt;?</xsl:text>
-        <xsl:apply-templates/>
-        <xsl:text>?&gt;</xsl:text>
-      </xsl:when>
-      <xsl:when test="$class='starttag'">
-        <xsl:text>&lt;</xsl:text>
-        <xsl:apply-templates/>
-        <xsl:text>&gt;</xsl:text>
-      </xsl:when>
-      <xsl:when test="$class='emptytag'">
-        <xsl:text>&lt;</xsl:text>
-        <xsl:apply-templates/>
-        <xsl:text>/&gt;</xsl:text>
-      </xsl:when>
-      <xsl:when test="$class='sgmlcomment' or $class='comment'">
-        <xsl:text>&lt;!--</xsl:text>
-        <xsl:apply-templates/>
-        <xsl:text>--&gt;</xsl:text>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:apply-templates/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <code>
-    <xsl:apply-templates select="." mode="class.attribute">
-      <xsl:with-param name="class" select="concat('sgmltag-', $class)"/>
-    </xsl:apply-templates>
-    <xsl:call-template name="generate.html.title"/>
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content" select="$content"/>
-    </xsl:call-template>
-  </code>
-</xsl:template>
-
-<xsl:template match="email">
-  <xsl:call-template name="inline.monoseq">
-    <xsl:with-param name="content">
-      <xsl:if test="not($email.delimiters.enabled = 0)">
-        <xsl:text>&lt;</xsl:text>
-      </xsl:if>
-      <a>
-        <xsl:apply-templates select="." mode="class.attribute"/>
-        <xsl:attribute name="href">
-          <xsl:text>mailto:</xsl:text>
-          <xsl:value-of select="."/>
-        </xsl:attribute>
-        <xsl:apply-templates/>
-      </a>
-      <xsl:if test="not($email.delimiters.enabled = 0)">
-        <xsl:text>&gt;</xsl:text>
-      </xsl:if>
-    </xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="keycombo">
-  <xsl:variable name="action" select="@action"/>
-  <xsl:variable name="joinchar">
-    <xsl:choose>
-      <xsl:when test="$action='seq'"><xsl:text> </xsl:text></xsl:when>
-      <xsl:when test="$action='simul'">+</xsl:when>
-      <xsl:when test="$action='press'">-</xsl:when>
-      <xsl:when test="$action='click'">-</xsl:when>
-      <xsl:when test="$action='double-click'">-</xsl:when>
-      <xsl:when test="$action='other'"/>
-      <xsl:otherwise>+</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-  <xsl:for-each select="*">
-    <xsl:if test="position()&gt;1"><xsl:value-of select="$joinchar"/></xsl:if>
-    <xsl:apply-templates select="."/>
-  </xsl:for-each>
-</xsl:template>
-
-<xsl:template match="uri">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="menuchoice">
-  <xsl:variable name="shortcut" select="./shortcut"/>
-  <xsl:call-template name="process.menuchoice"/>
-  <xsl:if test="$shortcut">
-    <xsl:text> (</xsl:text>
-    <xsl:apply-templates select="$shortcut"/>
-    <xsl:text>)</xsl:text>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="process.menuchoice">
-  <xsl:param name="nodelist" select="guibutton|guiicon|guilabel|guimenu|guimenuitem|guisubmenu|interface"/><!-- not(shortcut) -->
-  <xsl:param name="count" select="1"/>
-
-  <xsl:choose>
-    <xsl:when test="$count&gt;count($nodelist)"/>
-    <xsl:when test="$count=1">
-      <xsl:apply-templates select="$nodelist[$count=position()]"/>
-      <xsl:call-template name="process.menuchoice">
-        <xsl:with-param name="nodelist" select="$nodelist"/>
-        <xsl:with-param name="count" select="$count+1"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:variable name="node" select="$nodelist[$count=position()]"/>
-      <xsl:choose>
-        <xsl:when test="local-name($node)='guimenuitem'                         or local-name($node)='guisubmenu'">
-          <xsl:value-of select="$menuchoice.menu.separator"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="$menuchoice.separator"/>
-        </xsl:otherwise>
-      </xsl:choose>
-      <xsl:apply-templates select="$node"/>
-      <xsl:call-template name="process.menuchoice">
-        <xsl:with-param name="nodelist" select="$nodelist"/>
-        <xsl:with-param name="count" select="$count+1"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="optional">
-  <xsl:value-of select="$arg.choice.opt.open.str"/>
-  <xsl:call-template name="inline.charseq"/>
-  <xsl:value-of select="$arg.choice.opt.close.str"/>
-</xsl:template>
-
-<xsl:template match="citation">
-  <!-- todo: integrate with bibliography collection -->
-  <xsl:variable name="targets" select="(//biblioentry | //bibliomixed)[abbrev = string(current())]"/>
-  <xsl:variable name="target" select="$targets[1]"/>
-
-  <xsl:choose>
-    <!-- try automatic linking based on match to abbrev -->
-    <xsl:when test="$target and not(xref) and not(link)">
-
-      <xsl:text>[</xsl:text>
-      <a>
-        <xsl:apply-templates select="." mode="class.attribute"/>
-        <xsl:attribute name="href">
-          <xsl:call-template name="href.target">
-            <xsl:with-param name="object" select="$target"/>
-          </xsl:call-template>
-        </xsl:attribute>
-
-	<xsl:choose>
-	  <xsl:when test="$bibliography.numbered != 0">
-	    <xsl:apply-templates select="$target" mode="citation"/>
-	  </xsl:when>
-	  <xsl:otherwise>
-	    <xsl:call-template name="inline.charseq"/>
-	  </xsl:otherwise>
-	</xsl:choose>
-
-      </a>
-      <xsl:text>]</xsl:text>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:text>[</xsl:text>
-      <xsl:call-template name="inline.charseq"/>
-      <xsl:text>]</xsl:text>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="biblioentry|bibliomixed" mode="citation">
-  <xsl:number from="bibliography" count="biblioentry|bibliomixed" level="any" format="1"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="comment[parent::answer|parent::appendix|parent::article|parent::bibliodiv|parent::bibliography|parent::blockquote|parent::caution|parent::chapter|parent::glossary|parent::glossdiv|parent::important|parent::index|parent::indexdiv|parent::listitem|parent::note|parent::orderedlist|parent::partintro|parent::preface|parent::procedure|parent::qandadiv|parent::qandaset|parent::question|parent::refentry|parent::refnamediv|parent::refsect1|parent::refsect2|parent::refsect3|parent::refsection|parent::refsynopsisdiv|parent::sect1|parent::sect2|parent::sect3|parent::sect4|parent::sect5|parent::section|parent::setindex|parent::sidebar|parent::simplesect|parent::taskprerequisites|parent::taskrelated|parent::tasksummary|parent::warning]|remark[parent::answer|parent::appendix|parent::article|parent::bibliodiv|parent::bibliography|parent::blockquote|parent::caution|parent::chapter|parent::glossary|parent::glossdiv|parent::important|parent::index|parent::indexdiv|parent::listitem|parent::note|parent::orderedlist|parent::partintro|parent::preface|parent::procedure|parent::qandadiv|parent::qandaset|parent::question|parent::refentry|parent::refnamediv|parent::refsect1|parent::refsect2|parent::refsect3|parent::refsection|parent::refsynopsisdiv|parent::sect1|parent::sect2|parent::sect3|parent::sect4|parent::sect5|parent::section|parent::setindex|parent::sidebar|parent::simplesect|parent::taskprerequisites|parent::taskrelated|parent::tasksummary|parent::warning]">
-  <xsl:if test="$show.comments != 0">
-    <p class="remark"><i><xsl:call-template name="inline.charseq"/></i></p>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="comment|remark">
-  <xsl:if test="$show.comments != 0">
-    <em><xsl:call-template name="inline.charseq"/></em>
-  </xsl:if>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="productname">
-  <xsl:call-template name="inline.charseq"/>
-  <xsl:if test="@class">
-    <xsl:call-template name="dingbat">
-      <xsl:with-param name="dingbat" select="@class"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="productnumber">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="pob|street|city|state|postcode|country|otheraddr">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="phone|fax">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<!-- in Addresses, for example -->
-<xsl:template match="honorific|firstname|surname|lineage|othername">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="person">
-  <xsl:param name="content">
-    <xsl:call-template name="anchor"/>
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content">
-        <xsl:apply-templates select="personname"/>
-      </xsl:with-param>
-    </xsl:call-template>
-    <xsl:call-template name="apply-annotations"/>
-  </xsl:param>
-
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:copy-of select="$content"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="personname">
-  <xsl:param name="content">
-    <xsl:call-template name="anchor"/>
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content">
-        <xsl:call-template name="person.name"/>
-      </xsl:with-param>
-    </xsl:call-template>
-    <xsl:call-template name="apply-annotations"/>
-  </xsl:param>
-
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:copy-of select="$content"/>
-  </span>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="org">
-  <xsl:param name="content">
-    <xsl:call-template name="anchor"/>
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content">
-        <xsl:apply-templates/>
-      </xsl:with-param>
-    </xsl:call-template>
-    <xsl:call-template name="apply-annotations"/>
-  </xsl:param>
-
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:copy-of select="$content"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="orgname">
-  <xsl:param name="content">
-    <xsl:call-template name="anchor"/>
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content">
-        <xsl:apply-templates/>
-      </xsl:with-param>
-    </xsl:call-template>
-    <xsl:call-template name="apply-annotations"/>
-  </xsl:param>
-
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:copy-of select="$content"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="orgdiv">
-  <xsl:param name="content">
-    <xsl:call-template name="anchor"/>
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content">
-        <xsl:apply-templates/>
-      </xsl:with-param>
-    </xsl:call-template>
-    <xsl:call-template name="apply-annotations"/>
-  </xsl:param>
-
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:copy-of select="$content"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="affiliation">
-  <xsl:param name="content">
-    <xsl:call-template name="anchor"/>
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content">
-        <xsl:call-template name="person.name"/>
-      </xsl:with-param>
-    </xsl:call-template>
-    <xsl:call-template name="apply-annotations"/>
-  </xsl:param>
-
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:copy-of select="$content"/>
-  </span>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="beginpage">
-  <!-- does nothing; this *is not* markup to force a page break. -->
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/keywords.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/keywords.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,36 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<xsl:template match="keywordset"/>
-<xsl:template match="subjectset"/>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="keywordset" mode="html.header">
-  <meta name="keywords">
-    <xsl:attribute name="content">
-      <xsl:apply-templates select="keyword" mode="html.header"/>
-    </xsl:attribute>
-  </meta>
-</xsl:template>
-
-<xsl:template match="keyword" mode="html.header">
-  <xsl:apply-templates/>
-  <xsl:if test="following-sibling::keyword">, </xsl:if>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/lists.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/lists.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,1045 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:template match="itemizedlist">
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="anchor"/>
-    <xsl:if test="title">
-      <xsl:call-template name="formal.object.heading"/>
-    </xsl:if>
-
-    <!-- Preserve order of PIs and comments -->
-    <xsl:apply-templates select="*[not(self::listitem                   or self::title                   or self::titleabbrev)]                 |comment()[not(preceding-sibling::listitem)]                 |processing-instruction()[not(preceding-sibling::listitem)]"/>
-
-    <ul>
-      <xsl:if test="$css.decoration != 0">
-        <xsl:attribute name="type">
-          <xsl:call-template name="list.itemsymbol"/>
-        </xsl:attribute>
-      </xsl:if>
-
-      <xsl:if test="@spacing='compact'">
-        <xsl:attribute name="compact">
-          <xsl:value-of select="@spacing"/>
-        </xsl:attribute>
-      </xsl:if>
-      <xsl:apply-templates select="listitem                     |comment()[preceding-sibling::listitem]                     |processing-instruction()[preceding-sibling::listitem]"/>
-    </ul>
-  </div>
-</xsl:template>
-
-<xsl:template match="itemizedlist/title">
-  <!-- nop -->
-</xsl:template>
-
-<xsl:template match="itemizedlist/listitem">
-  <xsl:variable name="mark" select="../@mark"/>
-  <xsl:variable name="override" select="@override"/>
-
-  <xsl:variable name="usemark">
-    <xsl:choose>
-      <xsl:when test="$override != ''">
-        <xsl:value-of select="$override"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$mark"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="cssmark">
-    <xsl:choose>
-      <xsl:when test="$usemark = 'opencircle'">circle</xsl:when>
-      <xsl:when test="$usemark = 'bullet'">disc</xsl:when>
-      <xsl:when test="$usemark = 'box'">square</xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$usemark"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <li>
-    <xsl:if test="$css.decoration = '1' and $cssmark != ''">
-      <xsl:attribute name="style">
-        <xsl:text>list-style-type: </xsl:text>
-        <xsl:value-of select="$cssmark"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <!-- we can't just drop the anchor in since some browsers (Opera)
-         get confused about line breaks if we do. So if the first child
-         is a para, assume the para will put in the anchor. Otherwise,
-         put the anchor in anyway. -->
-    <xsl:if test="local-name(child::*[1]) != 'para'">
-      <xsl:call-template name="anchor"/>
-    </xsl:if>
-
-    <xsl:choose>
-      <xsl:when test="$show.revisionflag != 0 and @revisionflag">
-        <div class="{@revisionflag}">
-          <xsl:apply-templates/>
-        </div>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:apply-templates/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </li>
-</xsl:template>
-
-<xsl:template match="orderedlist">
-  <xsl:variable name="start">
-    <xsl:call-template name="orderedlist-starting-number"/>
-  </xsl:variable>
-
-  <xsl:variable name="numeration">
-    <xsl:call-template name="list.numeration"/>
-  </xsl:variable>
-
-  <xsl:variable name="type">
-    <xsl:choose>
-      <xsl:when test="$numeration='arabic'">1</xsl:when>
-      <xsl:when test="$numeration='loweralpha'">a</xsl:when>
-      <xsl:when test="$numeration='lowerroman'">i</xsl:when>
-      <xsl:when test="$numeration='upperalpha'">A</xsl:when>
-      <xsl:when test="$numeration='upperroman'">I</xsl:when>
-      <!-- What!? This should never happen -->
-      <xsl:otherwise>
-        <xsl:message>
-          <xsl:text>Unexpected numeration: </xsl:text>
-          <xsl:value-of select="$numeration"/>
-        </xsl:message>
-        <xsl:value-of select="1"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="anchor"/>
-
-    <xsl:if test="title">
-      <xsl:call-template name="formal.object.heading"/>
-    </xsl:if>
-
-    <!-- Preserve order of PIs and comments -->
-    <xsl:apply-templates select="*[not(self::listitem                   or self::title                   or self::titleabbrev)]                 |comment()[not(preceding-sibling::listitem)]                 |processing-instruction()[not(preceding-sibling::listitem)]"/>
-
-    <ol>
-      <xsl:if test="$start != '1'">
-        <xsl:attribute name="start">
-          <xsl:value-of select="$start"/>
-        </xsl:attribute>
-      </xsl:if>
-      <xsl:if test="$numeration != ''">
-        <xsl:attribute name="type">
-          <xsl:value-of select="$type"/>
-        </xsl:attribute>
-      </xsl:if>
-      <xsl:if test="@spacing='compact'">
-        <xsl:attribute name="compact">
-          <xsl:value-of select="@spacing"/>
-        </xsl:attribute>
-      </xsl:if>
-      <xsl:apply-templates select="listitem                     |comment()[preceding-sibling::listitem]                     |processing-instruction()[preceding-sibling::listitem]"/>
-    </ol>
-  </div>
-</xsl:template>
-
-<xsl:template match="orderedlist/title">
-  <!-- nop -->
-</xsl:template>
-
-<xsl:template match="orderedlist/listitem">
-  <li>
-    <xsl:if test="@override">
-      <xsl:attribute name="value">
-        <xsl:value-of select="@override"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <!-- we can't just drop the anchor in since some browsers (Opera)
-         get confused about line breaks if we do. So if the first child
-         is a para, assume the para will put in the anchor. Otherwise,
-         put the anchor in anyway. -->
-    <xsl:if test="local-name(child::*[1]) != 'para'">
-      <xsl:call-template name="anchor"/>
-    </xsl:if>
-
-    <xsl:choose>
-      <xsl:when test="$show.revisionflag != 0 and @revisionflag">
-        <div class="{@revisionflag}">
-          <xsl:apply-templates/>
-        </div>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:apply-templates/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </li>
-</xsl:template>
-
-<xsl:template match="variablelist">
-  <xsl:variable name="pi-presentation">
-    <xsl:call-template name="pi.dbhtml_list-presentation"/>
-  </xsl:variable>
-
-  <xsl:variable name="presentation">
-    <xsl:choose>
-      <xsl:when test="$pi-presentation != ''">
-        <xsl:value-of select="$pi-presentation"/>
-      </xsl:when>
-      <xsl:when test="$variablelist.as.table != 0">
-        <xsl:value-of select="'table'"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="'list'"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="list-width">
-    <xsl:call-template name="pi.dbhtml_list-width"/>
-  </xsl:variable>
-
-  <xsl:variable name="term-width">
-    <xsl:call-template name="pi.dbhtml_term-width"/>
-  </xsl:variable>
-
-  <xsl:variable name="table-summary">
-    <xsl:call-template name="pi.dbhtml_table-summary"/>
-  </xsl:variable>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="anchor"/>
-    <xsl:if test="title">
-      <xsl:call-template name="formal.object.heading"/>
-    </xsl:if>
-
-    <xsl:choose>
-      <xsl:when test="$presentation = 'table'">
-        <!-- Preserve order of PIs and comments -->
-        <xsl:apply-templates select="*[not(self::varlistentry                     or self::title                     or self::titleabbrev)]                   |comment()[not(preceding-sibling::varlistentry)]                   |processing-instruction()[not(preceding-sibling::varlistentry)]"/>
-        <table border="0">
-          <xsl:if test="$list-width != ''">
-            <xsl:attribute name="width">
-              <xsl:value-of select="$list-width"/>
-            </xsl:attribute>
-          </xsl:if>
-          <xsl:if test="$table-summary != ''">
-            <xsl:attribute name="summary">
-              <xsl:value-of select="$table-summary"/>
-            </xsl:attribute>
-          </xsl:if>
-          <col align="left" valign="top">
-            <xsl:if test="$term-width != ''">
-              <xsl:attribute name="width">
-                <xsl:value-of select="$term-width"/>
-              </xsl:attribute>
-            </xsl:if>
-          </col>
-          <tbody>
-            <xsl:apply-templates mode="varlist-table" select="varlistentry                       |comment()[preceding-sibling::varlistentry]                       |processing-instruction()[preceding-sibling::varlistentry]"/>
-          </tbody>
-        </table>
-      </xsl:when>
-      <xsl:otherwise>
-        <!-- Preserve order of PIs and comments -->
-        <xsl:apply-templates select="*[not(self::varlistentry                     or self::title                     or self::titleabbrev)]                   |comment()[not(preceding-sibling::varlistentry)]                   |processing-instruction()[not(preceding-sibling::varlistentry)]"/>
-        <dl>
-          <xsl:apply-templates select="varlistentry                       |comment()[preceding-sibling::varlistentry]                       |processing-instruction()[preceding-sibling::varlistentry]"/>
-        </dl>
-      </xsl:otherwise>
-    </xsl:choose>
-  </div>
-</xsl:template>
-
-<xsl:template match="variablelist/title">
-  <!-- nop -->
-</xsl:template>
-
-<xsl:template match="itemizedlist/titleabbrev|orderedlist/titleabbrev">
-  <!--nop-->
-</xsl:template>
-
-<xsl:template match="variablelist/titleabbrev">
-  <!--nop-->
-</xsl:template>
-
-<xsl:template match="listitem" mode="xref">
-  <xsl:number format="1"/>
-</xsl:template>
-
-<xsl:template match="listitem/simpara" priority="2">
-  <!-- If a listitem contains only a single simpara, don't output
-       the <p> wrapper; this has the effect of creating an li
-       with simple text content. -->
-  <xsl:choose>
-    <xsl:when test="not(preceding-sibling::*)                     and not (following-sibling::*)">
-      <xsl:call-template name="anchor"/>
-      <xsl:apply-templates/>
-    </xsl:when>
-    <xsl:otherwise>
-      <p>
-        <xsl:if test="@role and $para.propagates.style != 0">
-           <xsl:apply-templates select="." mode="class.attribute">
-             <xsl:with-param name="class" select="@role"/>
-           </xsl:apply-templates>
-        </xsl:if>
-
-        <xsl:call-template name="anchor"/>
-        <xsl:apply-templates/>
-      </p>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="varlistentry">
-  <dt>
-    <xsl:call-template name="anchor"/>
-    <xsl:apply-templates select="term"/>
-  </dt>
-  <dd>
-    <xsl:apply-templates select="listitem"/>
-  </dd>
-</xsl:template>
-
-<xsl:template match="varlistentry" mode="varlist-table">
-  <xsl:variable name="presentation">
-    <xsl:call-template name="pi.dbhtml_term-presentation">
-      <xsl:with-param name="node" select=".."/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="separator">
-    <xsl:call-template name="pi.dbhtml_term-separator">
-      <xsl:with-param name="node" select=".."/>
-    </xsl:call-template>
-  </xsl:variable>
-  <tr>
-    <xsl:call-template name="tr.attributes">
-      <xsl:with-param name="rownum">
-        <xsl:number from="variablelist" count="varlistentry"/>
-      </xsl:with-param>
-    </xsl:call-template>
-
-    <td>
-      <p>
-      <xsl:call-template name="anchor"/>
-      <xsl:choose>
-        <xsl:when test="$presentation = 'bold'">
-          <b>
-            <xsl:apply-templates select="term"/>
-            <xsl:value-of select="$separator"/>
-          </b>
-        </xsl:when>
-        <xsl:when test="$presentation = 'italic'">
-          <i>
-            <xsl:apply-templates select="term"/>
-            <xsl:value-of select="$separator"/>
-          </i>
-        </xsl:when>
-        <xsl:when test="$presentation = 'bold-italic'">
-          <b>
-            <i>
-              <xsl:apply-templates select="term"/>
-              <xsl:value-of select="$separator"/>
-            </i>
-          </b>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates select="term"/>
-          <xsl:value-of select="$separator"/>
-        </xsl:otherwise>
-      </xsl:choose>
-      </p>
-    </td>
-    <td>
-      <xsl:apply-templates select="listitem"/>
-    </td>
-  </tr>
-</xsl:template>
-
-<xsl:template match="varlistentry/term">
-  <span class="term">
-    <xsl:call-template name="anchor"/>
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content">
-        <xsl:apply-templates/>
-      </xsl:with-param>
-    </xsl:call-template>
-    <xsl:choose>
-      <xsl:when test="position() = last()"/> <!-- do nothing -->
-      <xsl:otherwise>
-        <!-- * if we have multiple terms in the same varlistentry, generate -->
-        <!-- * a separator (", " by default) and/or an additional line -->
-        <!-- * break after each one except the last -->
-        <xsl:value-of select="$variablelist.term.separator"/>
-        <xsl:if test="not($variablelist.term.break.after = '0')">
-          <br/>
-        </xsl:if>
-      </xsl:otherwise>
-    </xsl:choose>
-  </span>
-</xsl:template>
-
-<xsl:template match="varlistentry/listitem">
-  <!-- we can't just drop the anchor in since some browsers (Opera)
-       get confused about line breaks if we do. So if the first child
-       is a para, assume the para will put in the anchor. Otherwise,
-       put the anchor in anyway. -->
-  <xsl:if test="local-name(child::*[1]) != 'para'">
-    <xsl:call-template name="anchor"/>
-  </xsl:if>
-
-  <xsl:choose>
-    <xsl:when test="$show.revisionflag != 0 and @revisionflag">
-      <div class="{@revisionflag}">
-        <xsl:apply-templates/>
-      </div>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="simplelist">
-  <!-- with no type specified, the default is 'vert' -->
-  <xsl:call-template name="anchor"/>
-  <table class="simplelist" border="0" summary="Simple list">
-    <xsl:call-template name="simplelist.vert">
-      <xsl:with-param name="cols">
-        <xsl:choose>
-          <xsl:when test="@columns">
-            <xsl:value-of select="@columns"/>
-          </xsl:when>
-          <xsl:otherwise>1</xsl:otherwise>
-        </xsl:choose>
-      </xsl:with-param>
-    </xsl:call-template>
-  </table>
-</xsl:template>
-
-<xsl:template match="simplelist[@type='inline']">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-  <!-- if dbchoice PI exists, use that to determine the choice separator -->
-  <!-- (that is, equivalent of "and" or "or" in current locale), or literal -->
-  <!-- value of "choice" otherwise -->
-  <xsl:variable name="localized-choice-separator">
-    <xsl:choose>
-      <xsl:when test="processing-instruction('dbchoice')">
-        <xsl:call-template name="select.choice.separator"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <!-- empty -->
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:for-each select="member">
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content">
-        <xsl:apply-templates/>
-      </xsl:with-param>
-    </xsl:call-template>
-    <xsl:choose>
-      <xsl:when test="position() = last()"/> <!-- do nothing -->
-      <xsl:otherwise>
-	<xsl:text>, </xsl:text>
-	<xsl:if test="position() = last() - 1">
-	  <xsl:if test="$localized-choice-separator != ''">
-	    <xsl:value-of select="$localized-choice-separator"/>
-	    <xsl:text> </xsl:text>
-	  </xsl:if>
-	</xsl:if>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:for-each>
-  </span>
-</xsl:template>
-
-<xsl:template match="simplelist[@type='horiz']">
-  <xsl:call-template name="anchor"/>
-  <table class="simplelist" border="0" summary="Simple list">
-    <xsl:call-template name="simplelist.horiz">
-      <xsl:with-param name="cols">
-        <xsl:choose>
-          <xsl:when test="@columns">
-            <xsl:value-of select="@columns"/>
-          </xsl:when>
-          <xsl:otherwise>1</xsl:otherwise>
-        </xsl:choose>
-      </xsl:with-param>
-    </xsl:call-template>
-  </table>
-</xsl:template>
-
-<xsl:template match="simplelist[@type='vert']">
-  <xsl:call-template name="anchor"/>
-  <table class="simplelist" border="0" summary="Simple list">
-    <xsl:call-template name="simplelist.vert">
-      <xsl:with-param name="cols">
-        <xsl:choose>
-          <xsl:when test="@columns">
-            <xsl:value-of select="@columns"/>
-          </xsl:when>
-          <xsl:otherwise>1</xsl:otherwise>
-        </xsl:choose>
-      </xsl:with-param>
-    </xsl:call-template>
-  </table>
-</xsl:template>
-
-<xsl:template name="simplelist.horiz">
-  <xsl:param name="cols">1</xsl:param>
-  <xsl:param name="cell">1</xsl:param>
-  <xsl:param name="members" select="./member"/>
-
-  <xsl:if test="$cell &lt;= count($members)">
-    <tr>
-      <xsl:call-template name="tr.attributes">
-        <xsl:with-param name="row" select="$members[1]"/>
-        <xsl:with-param name="rownum" select="(($cell - 1) div $cols) + 1"/>
-      </xsl:call-template>
-
-      <xsl:call-template name="simplelist.horiz.row">
-        <xsl:with-param name="cols" select="$cols"/>
-        <xsl:with-param name="cell" select="$cell"/>
-        <xsl:with-param name="members" select="$members"/>
-      </xsl:call-template>
-   </tr>
-    <xsl:call-template name="simplelist.horiz">
-      <xsl:with-param name="cols" select="$cols"/>
-      <xsl:with-param name="cell" select="$cell + $cols"/>
-      <xsl:with-param name="members" select="$members"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="simplelist.horiz.row">
-  <xsl:param name="cols">1</xsl:param>
-  <xsl:param name="cell">1</xsl:param>
-  <xsl:param name="members" select="./member"/>
-  <xsl:param name="curcol">1</xsl:param>
-
-  <xsl:if test="$curcol &lt;= $cols">
-    <td>
-      <xsl:choose>
-        <xsl:when test="$members[position()=$cell]">
-          <xsl:apply-templates select="$members[position()=$cell]"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:text>&#160;</xsl:text>
-        </xsl:otherwise>
-      </xsl:choose>
-    </td>
-    <xsl:call-template name="simplelist.horiz.row">
-      <xsl:with-param name="cols" select="$cols"/>
-      <xsl:with-param name="cell" select="$cell+1"/>
-      <xsl:with-param name="members" select="$members"/>
-      <xsl:with-param name="curcol" select="$curcol+1"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="simplelist.vert">
-  <xsl:param name="cols">1</xsl:param>
-  <xsl:param name="cell">1</xsl:param>
-  <xsl:param name="members" select="./member"/>
-  <xsl:param name="rows" select="floor((count($members)+$cols - 1) div $cols)"/>
-
-  <xsl:if test="$cell &lt;= $rows">
-    <tr>
-      <xsl:call-template name="tr.attributes">
-        <xsl:with-param name="row" select="$members[1]"/>
-        <xsl:with-param name="rownum" select="$cell"/>
-      </xsl:call-template>
-
-      <xsl:call-template name="simplelist.vert.row">
-        <xsl:with-param name="cols" select="$cols"/>
-        <xsl:with-param name="rows" select="$rows"/>
-        <xsl:with-param name="cell" select="$cell"/>
-        <xsl:with-param name="members" select="$members"/>
-      </xsl:call-template>
-    </tr>
-    <xsl:call-template name="simplelist.vert">
-      <xsl:with-param name="cols" select="$cols"/>
-      <xsl:with-param name="cell" select="$cell+1"/>
-      <xsl:with-param name="members" select="$members"/>
-      <xsl:with-param name="rows" select="$rows"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="simplelist.vert.row">
-  <xsl:param name="cols">1</xsl:param>
-  <xsl:param name="rows">1</xsl:param>
-  <xsl:param name="cell">1</xsl:param>
-  <xsl:param name="members" select="./member"/>
-  <xsl:param name="curcol">1</xsl:param>
-
-  <xsl:if test="$curcol &lt;= $cols">
-    <td>
-      <xsl:choose>
-        <xsl:when test="$members[position()=$cell]">
-          <xsl:apply-templates select="$members[position()=$cell]"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:text>&#160;</xsl:text>
-        </xsl:otherwise>
-      </xsl:choose>
-    </td>
-    <xsl:call-template name="simplelist.vert.row">
-      <xsl:with-param name="cols" select="$cols"/>
-      <xsl:with-param name="rows" select="$rows"/>
-      <xsl:with-param name="cell" select="$cell+$rows"/>
-      <xsl:with-param name="members" select="$members"/>
-      <xsl:with-param name="curcol" select="$curcol+1"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="member">
-  <xsl:call-template name="anchor"/>
-  <xsl:call-template name="simple.xlink">
-    <xsl:with-param name="content">
-      <xsl:apply-templates/>
-    </xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="procedure">
-  <xsl:variable name="param.placement" select="substring-after(normalize-space($formal.title.placement),                                         concat(local-name(.), ' '))"/>
-
-  <xsl:variable name="placement">
-    <xsl:choose>
-      <xsl:when test="contains($param.placement, ' ')">
-        <xsl:value-of select="substring-before($param.placement, ' ')"/>
-      </xsl:when>
-      <xsl:when test="$param.placement = ''">before</xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$param.placement"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <!-- Preserve order of PIs and comments -->
-  <xsl:variable name="preamble" select="*[not(self::step                   or self::title                   or self::titleabbrev)]                 |comment()[not(preceding-sibling::step)]                 |processing-instruction()[not(preceding-sibling::step)]"/>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="anchor">
-      <xsl:with-param name="conditional">
-        <xsl:choose>
-	  <xsl:when test="title">0</xsl:when>
-	  <xsl:otherwise>1</xsl:otherwise>
-	</xsl:choose>
-      </xsl:with-param>
-    </xsl:call-template>
-
-    <xsl:if test="title and $placement = 'before'">
-      <xsl:call-template name="formal.object.heading"/>
-    </xsl:if>
-
-    <xsl:apply-templates select="$preamble"/>
-
-    <xsl:choose>
-      <xsl:when test="count(step) = 1">
-        <ul>
-          <xsl:apply-templates select="step                     |comment()[preceding-sibling::step]                     |processing-instruction()[preceding-sibling::step]"/>
-        </ul>
-      </xsl:when>
-      <xsl:otherwise>
-        <ol>
-          <xsl:attribute name="type">
-            <xsl:value-of select="substring($procedure.step.numeration.formats,1,1)"/>
-          </xsl:attribute>
-          <xsl:apply-templates select="step                     |comment()[preceding-sibling::step]                     |processing-instruction()[preceding-sibling::step]"/>
-        </ol>
-      </xsl:otherwise>
-    </xsl:choose>
-
-    <xsl:if test="title and $placement != 'before'">
-      <xsl:call-template name="formal.object.heading"/>
-    </xsl:if>
-  </div>
-</xsl:template>
-
-<xsl:template match="procedure/title">
-  <!-- nop -->
-</xsl:template>
-
-<xsl:template match="substeps">
-  <xsl:variable name="numeration">
-    <xsl:call-template name="procedure.step.numeration"/>
-  </xsl:variable>
-
-  <xsl:call-template name="anchor"/>
-
-  <ol type="{$numeration}">
-    <xsl:apply-templates/>
-  </ol>
-</xsl:template>
-
-<xsl:template match="step">
-  <li>
-    <xsl:call-template name="anchor"/>
-    <xsl:apply-templates/>
-  </li>
-</xsl:template>
-
-<xsl:template match="stepalternatives">
-  <xsl:call-template name="anchor"/>
-  <ul>
-    <xsl:apply-templates/>
-  </ul>
-</xsl:template>
-
-<xsl:template match="step/title">
-  <p class="title">
-    <b>
-      <xsl:apply-templates/>
-    </b>
-  </p>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="segmentedlist">
-  <xsl:variable name="presentation">
-    <xsl:call-template name="pi.dbhtml_list-presentation"/>
-  </xsl:variable>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="anchor"/>
-
-    <xsl:choose>
-      <xsl:when test="$presentation = 'table'">
-        <xsl:apply-templates select="." mode="seglist-table"/>
-      </xsl:when>
-      <xsl:when test="$presentation = 'list'">
-        <xsl:apply-templates/>
-      </xsl:when>
-      <xsl:when test="$segmentedlist.as.table != 0">
-        <xsl:apply-templates select="." mode="seglist-table"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:apply-templates/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </div>
-</xsl:template>
-
-<xsl:template match="segmentedlist/title">
-  <div class="title">
-    <strong><span class="title"><xsl:apply-templates/></span></strong>
-  </div>
-</xsl:template>
-
-<xsl:template match="segtitle">
-</xsl:template>
-
-<xsl:template match="segtitle" mode="segtitle-in-seg">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="seglistitem">
-  <div class="seglistitem">
-    <xsl:call-template name="anchor"/>
-    <xsl:apply-templates/>
-  </div>
-</xsl:template>
-
-<xsl:template match="seg">
-  <xsl:variable name="segnum" select="count(preceding-sibling::seg)+1"/>
-  <xsl:variable name="seglist" select="ancestor::segmentedlist"/>
-  <xsl:variable name="segtitles" select="$seglist/segtitle"/>
-
-  <!--
-     Note: segtitle is only going to be the right thing in a well formed
-     SegmentedList.  If there are too many Segs or too few SegTitles,
-     you'll get something odd...maybe an error
-  -->
-
-  <div class="seg">
-    <strong>
-      <span class="segtitle">
-        <xsl:apply-templates select="$segtitles[$segnum=position()]" mode="segtitle-in-seg"/>
-        <xsl:text>: </xsl:text>
-      </span>
-    </strong>
-    <xsl:apply-templates/>
-  </div>
-</xsl:template>
-
-<xsl:template match="segmentedlist" mode="seglist-table">
-  <xsl:variable name="table-summary">
-    <xsl:call-template name="pi.dbhtml_table-summary"/>
-  </xsl:variable>
-
-  <xsl:variable name="list-width">
-    <xsl:call-template name="pi.dbhtml_list-width"/>
-  </xsl:variable>
-
-  <xsl:apply-templates select="title"/>
-
-  <table border="0">
-    <xsl:if test="$list-width != ''">
-      <xsl:attribute name="width">
-        <xsl:value-of select="$list-width"/>
-      </xsl:attribute>
-    </xsl:if>
-    <xsl:if test="$table-summary != ''">
-      <xsl:attribute name="summary">
-        <xsl:value-of select="$table-summary"/>
-      </xsl:attribute>
-    </xsl:if>
-    <thead>
-      <tr class="segtitle">
-        <xsl:call-template name="tr.attributes">
-          <xsl:with-param name="row" select="segtitle[1]"/>
-          <xsl:with-param name="rownum" select="1"/>
-        </xsl:call-template>
-        <xsl:apply-templates select="segtitle" mode="seglist-table"/>
-      </tr>
-    </thead>
-    <tbody>
-      <xsl:apply-templates select="seglistitem" mode="seglist-table"/>
-    </tbody>
-  </table>
-</xsl:template>
-
-<xsl:template match="segtitle" mode="seglist-table">
-  <th><xsl:apply-templates/></th>
-</xsl:template>
-
-<xsl:template match="seglistitem" mode="seglist-table">
-  <xsl:variable name="seglinum">
-    <xsl:number from="segmentedlist" count="seglistitem"/>
-  </xsl:variable>
-
-  <tr class="seglistitem">
-    <xsl:call-template name="tr.attributes">
-      <xsl:with-param name="rownum" select="$seglinum + 1"/>
-    </xsl:call-template>
-    <xsl:apply-templates mode="seglist-table"/>
-  </tr>
-</xsl:template>
-
-<xsl:template match="seg" mode="seglist-table">
-  <td class="seg"><xsl:apply-templates/></td>
-</xsl:template>
-
-<xsl:template match="seg[1]" mode="seglist-table">
-  <td class="seg">
-    <xsl:call-template name="anchor">
-      <xsl:with-param name="node" select="ancestor::seglistitem"/>
-    </xsl:call-template>
-    <xsl:apply-templates/>
-  </td>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="calloutlist">
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="anchor"/>
-    <xsl:if test="title|info/title">
-      <xsl:call-template name="formal.object.heading"/>
-    </xsl:if>
-
-    <!-- Preserve order of PIs and comments -->
-    <xsl:apply-templates select="*[not(self::callout or self::title or self::titleabbrev)]                    |comment()[not(preceding-sibling::callout)]      |processing-instruction()[not(preceding-sibling::callout)]"/>
-
-    <xsl:choose>
-      <xsl:when test="$callout.list.table != 0">
-        <table border="0" summary="Callout list">
-	  <xsl:apply-templates select="callout            |comment()[preceding-sibling::callout]     |processing-instruction()[preceding-sibling::callout]"/>
-	</table>
-      </xsl:when>
-      <xsl:otherwise>
-	<dl compact="compact">
-	  <xsl:apply-templates select="callout            |comment()[preceding-sibling::callout]     |processing-instruction()[preceding-sibling::callout]"/>
-	</dl>
-      </xsl:otherwise>
-    </xsl:choose>
-  </div>
-</xsl:template>
-
-<xsl:template match="calloutlist/title">
-</xsl:template>
-
-<xsl:template match="callout">
-  <xsl:choose>
-    <xsl:when test="$callout.list.table != 0">
-      <tr>
-        <xsl:call-template name="tr.attributes">
-          <xsl:with-param name="rownum">
-            <xsl:number from="calloutlist" count="callout"/>
-          </xsl:with-param>
-        </xsl:call-template>
-
-        <td width="5%" valign="top" align="left">
-          <p>
-            <xsl:call-template name="anchor"/>
-            <xsl:call-template name="callout.arearefs">
-              <xsl:with-param name="arearefs" select="@arearefs"/>
-            </xsl:call-template>
-          </p>
-        </td>
-        <td valign="top" align="left">
-          <xsl:apply-templates/>
-        </td>
-      </tr>
-    </xsl:when>
-    <xsl:otherwise>
-      <dt>
-        <xsl:call-template name="anchor"/>
-        <xsl:call-template name="callout.arearefs">
-          <xsl:with-param name="arearefs" select="@arearefs"/>
-        </xsl:call-template>
-      </dt>
-      <dd><xsl:apply-templates/></dd>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="callout/simpara" priority="2">
-  <!-- If a callout contains only a single simpara, don't output
-       the <p> wrapper; this has the effect of creating an li
-       with simple text content. -->
-  <xsl:choose>
-    <xsl:when test="not(preceding-sibling::*)                     and not (following-sibling::*)">
-      <xsl:call-template name="anchor"/>
-      <xsl:apply-templates/>
-    </xsl:when>
-    <xsl:otherwise>
-      <p>
-        <xsl:if test="@role and $para.propagates.style != 0">
-          <xsl:apply-templates select="." mode="class.attribute">
-            <xsl:with-param name="class" select="@role"/>
-          </xsl:apply-templates>
-        </xsl:if>
-
-        <xsl:call-template name="anchor"/>
-        <xsl:apply-templates/>
-      </p>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="callout.arearefs">
-  <xsl:param name="arearefs"/>
-  <xsl:if test="$arearefs!=''">
-    <xsl:choose>
-      <xsl:when test="substring-before($arearefs,' ')=''">
-        <xsl:call-template name="callout.arearef">
-          <xsl:with-param name="arearef" select="$arearefs"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="callout.arearef">
-          <xsl:with-param name="arearef" select="substring-before($arearefs,' ')"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-    <xsl:call-template name="callout.arearefs">
-      <xsl:with-param name="arearefs" select="substring-after($arearefs,' ')"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="callout.arearef">
-  <xsl:param name="arearef"/>
-  <xsl:variable name="targets" select="key('id',$arearef)"/>
-  <xsl:variable name="target" select="$targets[1]"/>
-
-  <xsl:call-template name="check.id.unique">
-    <xsl:with-param name="linkend" select="$arearef"/>
-  </xsl:call-template>
-
-  <xsl:choose>
-    <xsl:when test="count($target)=0">
-      <xsl:text>???</xsl:text>
-    </xsl:when>
-    <xsl:when test="local-name($target)='co'">
-      <a>
-        <xsl:attribute name="href">
-          <xsl:text>#</xsl:text>
-          <xsl:value-of select="$arearef"/>
-        </xsl:attribute>
-        <xsl:apply-templates select="$target" mode="callout-bug"/>
-      </a>
-      <xsl:text> </xsl:text>
-    </xsl:when>
-    <xsl:when test="local-name($target)='areaset'">
-      <xsl:call-template name="callout-bug">
-        <xsl:with-param name="conum">
-          <xsl:apply-templates select="$target" mode="conumber"/>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="local-name($target)='area'">
-      <xsl:choose>
-        <xsl:when test="$target/parent::areaset">
-          <xsl:call-template name="callout-bug">
-            <xsl:with-param name="conum">
-              <xsl:apply-templates select="$target/parent::areaset" mode="conumber"/>
-            </xsl:with-param>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="callout-bug">
-            <xsl:with-param name="conum">
-              <xsl:apply-templates select="$target" mode="conumber"/>
-            </xsl:with-param>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:text>???</xsl:text>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="orderedlist-starting-number">
-  <xsl:param name="list" select="."/>
-  <xsl:variable name="pi-start">
-    <xsl:call-template name="pi.dbhtml_start">
-      <xsl:with-param name="node" select="$list"/>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:call-template name="output-orderedlist-starting-number">
-    <xsl:with-param name="list" select="$list"/>
-    <xsl:with-param name="pi-start" select="$pi-start"/>
-  </xsl:call-template>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/maketoc.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/maketoc.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,91 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="doc">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:import href="docbook.xsl"/>
-<xsl:import href="chunk.xsl"/>
-
-<xsl:output method="xml" indent="no" encoding="UTF-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
-
-<xsl:param name="toc.list.type" select="'tocentry'"/>
-
-<!-- refentry in autotoc.xsl does not use subtoc, so must
-     handle it explicitly here. -->
-<xsl:template match="refentry" mode="toc">
-  <xsl:param name="toc-context" select="."/>
-
-  <xsl:call-template name="subtoc">
-    <xsl:with-param name="toc-context" select="$toc-context"/>
-  </xsl:call-template>
-</xsl:template>
-
-
-<xsl:template name="subtoc">
-  <xsl:param name="nodes" select="NOT-AN-ELEMENT"/>
-  <xsl:variable name="filename">
-    <xsl:apply-templates select="." mode="chunk-filename"/>
-  </xsl:variable>
-
-  <xsl:variable name="chunk">
-    <xsl:call-template name="chunk"/>
-  </xsl:variable>
-
-  <xsl:if test="$chunk != 0">
-    <xsl:call-template name="indent-spaces"/>
-    <xsl:variable name="id">
-      <xsl:call-template name="object.id"/>
-    </xsl:variable>
-    <tocentry linkend="{$id}">
-      <xsl:processing-instruction name="dbhtml">
-        <xsl:text>filename="</xsl:text>
-        <xsl:value-of select="$filename"/>
-        <xsl:text>"</xsl:text>
-      </xsl:processing-instruction>
-      <xsl:text>
-</xsl:text>
-      <xsl:apply-templates mode="toc" select="$nodes"/>
-      <xsl:call-template name="indent-spaces"/>
-    </tocentry>
-    <xsl:text>
-</xsl:text>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="indent-spaces">
-  <xsl:param name="node" select="."/>
-  <xsl:text>  </xsl:text>
-  <xsl:if test="$node/parent::*">
-    <xsl:call-template name="indent-spaces">
-      <xsl:with-param name="node" select="$node/parent::*"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="/" priority="-1">
-  <xsl:text>
-</xsl:text>
-  <toc role="chunk-toc">
-    <xsl:text>
-</xsl:text>
-    <xsl:apply-templates select="/" mode="toc"/>
-  </toc>
-  <xsl:text>
-</xsl:text>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/manifest.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/manifest.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,22 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="doc">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-<!-- OBSOLETE. The templates from this file were moved to                 -->
-<!-- chunk-common.xsl and chunk-code.xsl.                                 -->
-<!-- ==================================================================== -->
-
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/math.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/math.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,284 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="mml" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<xsl:template match="inlineequation">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="alt">
-</xsl:template>
-
-<xsl:template match="mathphrase">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates/>
-  </span>
-</xsl:template>
-
-<!-- "Support" for MathML -->
-
-<xsl:template match="mml:*">
-  <xsl:copy>
-    <xsl:copy-of select="@*"/>
-    <xsl:apply-templates/>
-  </xsl:copy>
-</xsl:template>
-
-<!-- Support for TeX math in alt -->
-
-<xsl:template match="*" mode="collect.tex.math">
-  <xsl:call-template name="write.text.chunk">
-    <xsl:with-param name="filename" select="$tex.math.file"/>
-    <xsl:with-param name="method" select="'text'"/>
-    <xsl:with-param name="content">
-      <xsl:choose>
-        <xsl:when test="$tex.math.in.alt = 'plain'">
-          <xsl:call-template name="tex.math.plain.head"/>
-          <xsl:apply-templates select="." mode="collect.tex.math.plain"/>
-          <xsl:call-template name="tex.math.plain.tail"/>
-        </xsl:when>
-        <xsl:when test="$tex.math.in.alt = 'latex'">
-          <xsl:call-template name="tex.math.latex.head"/>
-          <xsl:apply-templates select="." mode="collect.tex.math.latex"/>
-          <xsl:call-template name="tex.math.latex.tail"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:message>
-            Unsupported TeX math notation: 
-            <xsl:value-of select="$tex.math.in.alt"/>
-          </xsl:message>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:with-param>
-    <xsl:with-param name="encoding" select="$chunker.output.encoding"/>
-  </xsl:call-template>
-</xsl:template>
-
-<!-- PlainTeX -->
-
-<xsl:template name="tex.math.plain.head">
-  <xsl:text>\nopagenumbers 
-</xsl:text>
-</xsl:template>
-
-<xsl:template name="tex.math.plain.tail">
-  <xsl:text>\bye 
-</xsl:text>
-</xsl:template>
-
-<xsl:template match="inlineequation" mode="collect.tex.math.plain">
-  <xsl:variable name="filename">
-    <xsl:choose>
-      <xsl:when test="graphic">
-        <xsl:call-template name="mediaobject.filename">
-          <xsl:with-param name="object" select="graphic"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="select.mediaobject.filename">
-          <xsl:with-param name="olist" select="inlinemediaobject/*"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-  <xsl:variable name="output.delims">
-    <xsl:call-template name="tex.math.output.delims"/>
-  </xsl:variable>
-  <xsl:variable name="tex" select="alt[@role='tex'] | inlinemediaobject/textobject[@role='tex']"/>
-  <xsl:if test="$tex">
-    <xsl:text>\special{dvi2bitmap outputfile </xsl:text>
-    <xsl:value-of select="$filename"/>
-    <xsl:text>} 
-</xsl:text>
-    <xsl:if test="$output.delims != 0">
-      <xsl:text>$</xsl:text>
-    </xsl:if>
-    <xsl:value-of select="$tex"/>
-    <xsl:if test="$output.delims != 0">
-      <xsl:text>$ 
-</xsl:text>
-    </xsl:if>
-    <xsl:text>\vfill\eject 
-</xsl:text>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="equation|informalequation" mode="collect.tex.math.plain">
-  <xsl:variable name="filename">
-    <xsl:choose>
-      <xsl:when test="graphic">
-        <xsl:call-template name="mediaobject.filename">
-          <xsl:with-param name="object" select="graphic"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="select.mediaobject.filename">
-          <xsl:with-param name="olist" select="mediaobject/*"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-  <xsl:variable name="output.delims">
-    <xsl:call-template name="tex.math.output.delims"/>
-  </xsl:variable>
-  <xsl:variable name="tex" select="alt[@role='tex'] | mediaobject/textobject[@role='tex']"/>
-  <xsl:if test="$tex">
-    <xsl:text>\special{dvi2bitmap outputfile </xsl:text>
-    <xsl:value-of select="$filename"/>
-    <xsl:text>} 
-</xsl:text>
-    <xsl:if test="$output.delims != 0">
-      <xsl:text>$$</xsl:text>
-    </xsl:if>
-    <xsl:value-of select="$tex"/>
-    <xsl:if test="$output.delims != 0">
-      <xsl:text>$$ 
-</xsl:text>
-    </xsl:if>
-    <xsl:text>\vfill\eject 
-</xsl:text>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="text()" mode="collect.tex.math.plain"/>
-
-<!-- LaTeX -->
-
-<xsl:template name="tex.math.latex.head">
-  <xsl:text>\documentclass{article} 
-</xsl:text>
-  <xsl:text>\pagestyle{empty} 
-</xsl:text>
-  <xsl:text>\begin{document} 
-</xsl:text>
-</xsl:template>
-
-<xsl:template name="tex.math.latex.tail">
-  <xsl:text>\end{document} 
-</xsl:text>
-</xsl:template>
-
-<xsl:template match="inlineequation" mode="collect.tex.math.latex">
-  <xsl:variable name="filename">
-    <xsl:choose>
-      <xsl:when test="graphic">
-        <xsl:call-template name="mediaobject.filename">
-          <xsl:with-param name="object" select="graphic"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="select.mediaobject.filename">
-          <xsl:with-param name="olist" select="inlinemediaobject/*"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-  <xsl:variable name="output.delims">
-    <xsl:call-template name="tex.math.output.delims"/>
-  </xsl:variable>
-  <xsl:variable name="tex" select="alt[@role='tex'] | inlinemediaobject/textobject[@role='tex']"/>
-  <xsl:if test="$tex">
-    <xsl:text>\special{dvi2bitmap outputfile </xsl:text>
-    <xsl:value-of select="$filename"/>
-    <xsl:text>} 
-</xsl:text>
-    <xsl:if test="$output.delims != 0">  
-      <xsl:text>$</xsl:text>
-    </xsl:if>
-    <xsl:value-of select="$tex"/>
-    <xsl:if test="$output.delims != 0">  
-      <xsl:text>$ 
-</xsl:text>
-    </xsl:if>
-    <xsl:text>\newpage 
-</xsl:text>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="equation|informalequation" mode="collect.tex.math.latex">
-  <xsl:variable name="filename">
-    <xsl:choose>
-      <xsl:when test="graphic">
-        <xsl:call-template name="mediaobject.filename">
-          <xsl:with-param name="object" select="graphic"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="select.mediaobject.filename">
-          <xsl:with-param name="olist" select="mediaobject/*"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-  <xsl:variable name="output.delims">
-    <xsl:call-template name="tex.math.output.delims"/>
-  </xsl:variable>
-  <xsl:variable name="tex" select="alt[@role='tex'] | mediaobject/textobject[@role='tex']"/>
-  <xsl:if test="$tex">
-    <xsl:text>\special{dvi2bitmap outputfile </xsl:text>
-    <xsl:value-of select="$filename"/>
-    <xsl:text>} 
-</xsl:text>
-    <xsl:if test="$output.delims != 0">
-      <xsl:text>$$</xsl:text>
-    </xsl:if>
-    <xsl:value-of select="$tex"/>
-    <xsl:if test="$output.delims != 0">
-      <xsl:text>$$ 
-</xsl:text>
-    </xsl:if>
-    <xsl:text>\newpage 
-</xsl:text>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="text()" mode="collect.tex.math.latex"/>
-
-<!-- Extracting image filename from mediaobject and graphic elements -->
-
-<xsl:template name="select.mediaobject.filename">
-  <xsl:param name="olist" select="imageobject|imageobjectco                      |videoobject|audioobject|textobject"/>
-
-  <xsl:variable name="mediaobject.index">
-    <xsl:call-template name="select.mediaobject.index">
-      <xsl:with-param name="olist" select="$olist"/>
-      <xsl:with-param name="count" select="1"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:if test="$mediaobject.index != ''">
-    <xsl:call-template name="mediaobject.filename">
-      <xsl:with-param name="object" select="$olist[position() = $mediaobject.index]"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template name="tex.math.output.delims">
-  <xsl:variable name="pi.delims">
-    <xsl:call-template name="pi.dbtex_delims">
-      <xsl:with-param name="node" select="descendant-or-self::*"/>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:variable name="result">
-    <xsl:choose>
-      <xsl:when test="$pi.delims = 'no'">0</xsl:when>
-      <xsl:when test="$pi.delims = '' and $tex.math.delims = 0">0</xsl:when>
-      <xsl:otherwise>1</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-  <xsl:value-of select="$result"/>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/oldchunker.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/oldchunker.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,176 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saxon="http://icl.com/saxon" xmlns:lxslt="http://xml.apache.org/xslt" xmlns:redirect="http://xml.apache.org/xalan/redirect" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" xmlns="http://www.w3.org/1999/xhtml" version="1.1" exclude-result-prefixes="doc" extension-element-prefixes="saxon redirect lxslt">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<!-- This stylesheet works with Saxon and Xalan; for XT use xtchunker.xsl -->
-
-<!-- ==================================================================== -->
-
-<xsl:param name="default.encoding" select="'ISO-8859-1'" doc:type="string"/>
-
-<doc:param xmlns="" name="default.encoding">
-<refpurpose xmlns="http://www.w3.org/1999/xhtml">Encoding used in generated HTML pages</refpurpose>
-<refdescription xmlns="http://www.w3.org/1999/xhtml">
-<para>This encoding is used in files generated by chunking stylesheet. Currently
-only Saxon is able to change output encoding.
-</para>
-</refdescription>
-</doc:param>
-
-<!-- ==================================================================== -->
-
-<xsl:param name="saxon.character.representation" select="'entity;decimal'" doc:type="string"/>
-
-<doc:param xmlns="" name="saxon.character.representation">
-<refpurpose xmlns="http://www.w3.org/1999/xhtml">Saxon character representation used in generated HTML pages</refpurpose>
-<refdescription xmlns="http://www.w3.org/1999/xhtml">
-<para>This character representation is used in files generated by chunking stylesheet. If
-you want to suppress entity references for characters with direct representation 
-in default.encoding, set this parameter to value <literal>native</literal>. 
-</para>
-</refdescription>
-</doc:param>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="make-relative-filename">
-  <xsl:param name="base.dir" select="'./'"/>
-  <xsl:param name="base.name" select="''"/>
-
-  <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
-
-  <xsl:choose>
-    <xsl:when test="contains($vendor, 'SAXON')">
-      <!-- Saxon doesn't make the chunks relative -->
-      <xsl:value-of select="concat($base.dir,$base.name)"/>
-    </xsl:when>
-    <xsl:when test="contains($vendor, 'Apache')">
-      <!-- Xalan doesn't make the chunks relative -->
-      <xsl:value-of select="concat($base.dir,$base.name)"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:message terminate="yes">
-        <xsl:text>Chunking isn't supported with </xsl:text>
-        <xsl:value-of select="$vendor"/>
-      </xsl:message>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="write.chunk">
-  <xsl:param name="filename" select="''"/>
-  <xsl:param name="method" select="'html'"/>
-  <xsl:param name="encoding" select="$default.encoding"/>
-  <xsl:param name="indent" select="'no'"/>
-  <xsl:param name="content" select="''"/>
-
-  <xsl:message>
-    <xsl:text>Writing </xsl:text>
-    <xsl:value-of select="$filename"/>
-    <xsl:if test="name(.) != ''">
-      <xsl:text> for </xsl:text>
-      <xsl:value-of select="name(.)"/>
-      <xsl:if test="@id">
-        <xsl:text>(</xsl:text>
-        <xsl:value-of select="@id"/>
-        <xsl:text>)</xsl:text>
-      </xsl:if>
-    </xsl:if>
-  </xsl:message>
-
-  <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
-
-  <xsl:choose>
-    <xsl:when test="contains($vendor, 'SAXON 6.2')">
-      <!-- Saxon 6.2.x uses xsl:document -->
-      <xsl:document href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" saxon:character-representation="{$saxon.character.representation}">
-        <xsl:copy-of select="$content"/>
-      </xsl:document>
-    </xsl:when>
-    <xsl:when test="contains($vendor, 'SAXON')">
-      <!-- Saxon uses saxon:output -->
-      <saxon:output file="{$filename}" href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" saxon:character-representation="{$saxon.character.representation}">
-        <xsl:copy-of select="$content"/>
-      </saxon:output>
-    </xsl:when>
-    <xsl:when test="contains($vendor, 'Apache')">
-      <!-- Xalan uses redirect -->
-      <redirect:write file="{$filename}">
-        <xsl:copy-of select="$content"/>
-      </redirect:write>
-    </xsl:when>
-    <xsl:otherwise>
-      <!-- it doesn't matter since we won't be making chunks... -->
-      <xsl:message terminate="yes">
-        <xsl:text>Can't make chunks with </xsl:text>
-        <xsl:value-of select="$vendor"/>
-        <xsl:text>'s processor.</xsl:text>
-      </xsl:message>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="write.chunk.with.doctype">
-  <xsl:param name="filename" select="''"/>
-  <xsl:param name="method" select="'html'"/>
-  <xsl:param name="encoding" select="$default.encoding"/>
-  <xsl:param name="indent" select="'no'"/>
-  <xsl:param name="doctype-public" select="''"/>
-  <xsl:param name="doctype-system" select="''"/>
-  <xsl:param name="content" select="''"/>
-
-  <xsl:message>
-    <xsl:text>Writing </xsl:text>
-    <xsl:value-of select="$filename"/>
-    <xsl:if test="name(.) != ''">
-      <xsl:text> for </xsl:text>
-      <xsl:value-of select="name(.)"/>
-    </xsl:if>
-  </xsl:message>
-
-  <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
-
-  <xsl:choose>
-    <xsl:when test="contains($vendor, 'SAXON 6.2')">
-      <!-- Saxon 6.2.x uses xsl:document -->
-      <xsl:document href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" doctype-public="{$doctype-public}" doctype-system="{$doctype-system}" saxon:character-representation="{$saxon.character.representation}">
-        <xsl:copy-of select="$content"/>
-      </xsl:document>
-    </xsl:when>
-    <xsl:when test="contains($vendor, 'SAXON')">
-      <!-- Saxon uses saxon:output -->
-      <saxon:output file="{$filename}" href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" doctype-public="{$doctype-public}" doctype-system="{$doctype-system}" saxon:character-representation="{$saxon.character.representation}">
-        <xsl:copy-of select="$content"/>
-      </saxon:output>
-    </xsl:when>
-    <xsl:when test="contains($vendor, 'Apache')">
-      <!-- Xalan uses redirect -->
-      <redirect:write file="{$filename}">
-        <xsl:copy-of select="$content"/>
-      </redirect:write>
-    </xsl:when>
-    <xsl:otherwise>
-      <!-- it doesn't matter since we won't be making chunks... -->
-      <xsl:message terminate="yes">
-        <xsl:text>Can't make chunks with </xsl:text>
-        <xsl:value-of select="$vendor"/>
-        <xsl:text>'s processor.</xsl:text>
-      </xsl:message>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/onechunk.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/onechunk.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,36 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="doc">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:import href="chunk.xsl"/>
-
-<!-- Ok, using the onechunk parameter makes this all work again. -->
-<!-- It does have the disadvantage that it only works for documents that have -->
-<!-- a root element that is considered a chunk by the chunk.xsl stylesheet. -->
-<!-- Ideally, onechunk would let anything be a chunk. But not today. -->
-
-<xsl:param name="onechunk" select="1"/>
-<xsl:param name="suppress.navigation">1</xsl:param>
-
-<xsl:template name="href.target.uri">
-  <xsl:param name="object" select="."/>
-  <xsl:text>#</xsl:text>
-  <xsl:call-template name="object.id">
-    <xsl:with-param name="object" select="$object"/>
-  </xsl:call-template>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/param.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/param.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,414 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<!-- This file is generated from param.xweb -->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<xsl:param name="admon.graphics.extension">.png</xsl:param>
-<xsl:param name="admon.graphics" select="0"/>
-<xsl:param name="admon.graphics.path">images/</xsl:param>
-<xsl:param name="admon.style">
-  <xsl:text>margin-left: 0.5in; margin-right: 0.5in;</xsl:text>
-</xsl:param>
-<xsl:param name="admon.textlabel" select="1"/>
-<xsl:param name="annotate.toc" select="1"/>
-<xsl:param name="annotation.css">
-/* ======================================================================
-   Annotations
-*/
-
-div.annotation-list  { visibility: hidden;
-                     }
-
-div.annotation-nocss { position: absolute;
-                       visibility: hidden;
-                     }
-
-div.annotation-popup { position: absolute;
-                       z-index: 4;
-                       visibility: hidden;
-                       padding: 0px;
-                       margin: 2px;
-                       border-style: solid;
-                       border-width: 1px;
-                       width: 200px;
-		       background-color: white;
-                     }
-
-div.annotation-title { padding: 1px;
-                       font-weight: bold;
-                       border-bottom-style: solid;
-                       border-bottom-width: 1px;
-		       color: white;
-		       background-color: black;
-                     }
-
-div.annotation-body  { padding: 2px;
-                     }
-
-div.annotation-body p { margin-top: 0px;
-                        padding-top: 0px;
-                      }
-
-div.annotation-close { position: absolute;
-                       top: 2px;
-                       right: 2px;
-                     }
-</xsl:param>
-
-<xsl:param name="annotation.js">
-<xsl:text>http://docbook.sourceforge.net/release/script/AnchorPosition.js http://docbook.sourceforge.net/release/script/PopupWindow.js</xsl:text></xsl:param>
-
-<xsl:param name="annotation.graphic.open">http://docbook.sourceforge.net/release/images/annot-open.png</xsl:param>
-<xsl:param name="annotation.graphic.close">
-http://docbook.sourceforge.net/release/images/annot-close.png</xsl:param>
-<xsl:param name="annotation.support" select="0"/>
-<xsl:param name="appendix.autolabel">A</xsl:param>
-<xsl:param name="author.othername.in.middle" select="1"/>
-<xsl:param name="autotoc.label.separator">. </xsl:param>
-<xsl:param name="autotoc.label.in.hyperlink" select="1"/>
-<xsl:param name="base.dir"/>
-<xsl:param name="biblioentry.item.separator">. </xsl:param>
-<xsl:param name="bibliography.collection">http://docbook.sourceforge.net/release/bibliography/bibliography.xml</xsl:param>
-
-<xsl:param name="bibliography.numbered" select="0"/>
-<xsl:param name="bibliography.style">normal</xsl:param>
-<xsl:param name="blurb.on.titlepage.enabled" select="0"/>
-<xsl:param name="bridgehead.in.toc" select="0"/>
-<xsl:param name="callout.defaultcolumn">60</xsl:param>
-<xsl:param name="callout.graphics.extension">.png</xsl:param>
-
-<xsl:param name="callout.graphics" select="1"/>
-<xsl:param name="callout.graphics.number.limit">15</xsl:param>
-
-<xsl:param name="callout.graphics.path">images/callouts/</xsl:param>
-<xsl:param name="callout.list.table" select="1"/>
-<xsl:param name="callout.unicode" select="0"/>
-<xsl:param name="callout.unicode.number.limit">10</xsl:param>
-<xsl:param name="callout.unicode.start.character">10102</xsl:param>
-<xsl:param name="callouts.extension" select="1"/>
-<xsl:param name="chapter.autolabel" select="1"/>
-<xsl:param name="chunk.append"/>
-<xsl:param name="chunk.first.sections" select="0"/>
-<xsl:param name="chunk.quietly" select="0"/>
-<xsl:param name="chunk.section.depth" select="1"/>
-<xsl:param name="chunk.toc"/>
-<xsl:param name="chunk.tocs.and.lots" select="0"/>
-<xsl:param name="chunk.tocs.and.lots.has.title" select="1"/>
-<xsl:param name="chunk.separate.lots" select="0"/>
-<xsl:param name="citerefentry.link" select="0"/>
-<xsl:param name="collect.xref.targets">no</xsl:param>
-<xsl:param name="component.label.includes.part.label" select="0"/>
-<xsl:param name="contrib.inline.enabled">1</xsl:param>
-<xsl:param name="css.decoration" select="1"/>
-<xsl:param name="current.docid"/>
-<xsl:param name="default.float.class">
-  <xsl:choose>
-    <xsl:when test="contains($stylesheet.result.type,'html')">left</xsl:when>
-    <xsl:otherwise>before</xsl:otherwise>
-  </xsl:choose>
-</xsl:param>
-<xsl:param name="default.image.width"/>
-<xsl:param name="default.table.width"/>
-<xsl:param name="default.table.frame">all</xsl:param>
-<xsl:param name="draft.mode">maybe</xsl:param>
-<xsl:param name="draft.watermark.image">http://docbook.sourceforge.net/release/images/draft.png</xsl:param>
-<xsl:param name="ebnf.table.bgcolor">#F5DCB3</xsl:param>
-<xsl:param name="ebnf.table.border" select="1"/>
-<xsl:param name="ebnf.assignment">
-<code>::=</code>
-</xsl:param>
-
-<xsl:param name="ebnf.statement.terminator"/>
-
-<xsl:param name="eclipse.autolabel" select="0"/>
-<xsl:param name="eclipse.plugin.name">DocBook Online Help Sample</xsl:param>
-<xsl:param name="eclipse.plugin.id">com.example.help</xsl:param>
-<xsl:param name="eclipse.plugin.provider">Example provider</xsl:param>
-<xsl:param name="editedby.enabled">1</xsl:param>
-<xsl:param name="email.delimiters.enabled" select="1"/>
-<xsl:param name="emphasis.propagates.style" select="1"/>
-<xsl:param name="entry.propagates.style" select="1"/>
-<xsl:param name="firstterm.only.link" select="0"/>
-<xsl:param name="footer.rule" select="1"/>
-<xsl:param name="footnote.number.format">1</xsl:param>
-<xsl:param name="footnote.number.symbols"/>
-<xsl:param name="formal.procedures" select="1"/>
-<xsl:param name="formal.title.placement">
-figure before
-example before
-equation before
-table before
-procedure before
-task before
-</xsl:param>
-<xsl:param name="funcsynopsis.decoration" select="1"/>
-<xsl:param name="funcsynopsis.style">kr</xsl:param>
-<xsl:param name="funcsynopsis.tabular.threshold">40</xsl:param>
-<xsl:param name="function.parens" select="0"/>
-<xsl:param name="generate.id.attributes" select="0"/>
-<xsl:param name="generate.index" select="1"/>
-<xsl:param name="generate.legalnotice.link" select="0"/>
-<xsl:param name="generate.revhistory.link" select="0"/>
-<xsl:param name="generate.manifest" select="0"/>
-<xsl:param name="generate.meta.abstract" select="1"/>
-<xsl:param name="generate.section.toc.level" select="0"/>
-<xsl:param name="generate.toc">
-appendix  toc,title
-article/appendix  nop
-article   toc,title
-book      toc,title,figure,table,example,equation
-chapter   toc,title
-part      toc,title
-preface   toc,title
-qandadiv  toc
-qandaset  toc
-reference toc,title
-sect1     toc
-sect2     toc
-sect3     toc
-sect4     toc
-sect5     toc
-section   toc
-set       toc,title
-</xsl:param>
-
-<xsl:param name="glossary.collection"/>
-<xsl:param name="glossary.sort" select="0"/>
-<xsl:param name="glossentry.show.acronym">no</xsl:param>
-<xsl:param name="glossterm.auto.link" select="0"/>
-<xsl:param name="graphic.default.extension"/>
-<xsl:param name="graphicsize.extension" select="1"/>
-<xsl:param name="graphicsize.use.img.src.path" select="0"/>
-<xsl:param name="header.rule" select="1"/>
-<xsl:param name="highlight.default.language"/>
-<xsl:param name="highlight.source" select="0"/>
-<xsl:param name="html.append"/>
-<xsl:param name="html.base"/>
-<xsl:param name="html.cellpadding"/>
-<xsl:param name="html.cellspacing"/>
-<xsl:param name="html.cleanup" select="1"/>
-<xsl:param name="html.ext">.html</xsl:param>
-<xsl:param name="html.extra.head.links" select="0"/>
-<xsl:param name="html.head.legalnotice.link.types">copyright</xsl:param>
-<xsl:param name="html.head.legalnotice.link.multiple" select="1"/>
-<xsl:param name="html.longdesc" select="1"/>
-<xsl:param name="html.longdesc.link" select="$html.longdesc"/>
-<xsl:param name="html.stylesheet"/>
-<xsl:param name="html.stylesheet.type">text/css</xsl:param>
-<xsl:param name="htmlhelp.alias.file">alias.h</xsl:param>
-<xsl:param name="htmlhelp.autolabel" select="0"/>
-<xsl:param name="htmlhelp.button.back" select="1"/>
-<xsl:param name="htmlhelp.button.forward" select="0"/>
-<xsl:param name="htmlhelp.button.hideshow" select="1"/>
-<xsl:param name="htmlhelp.button.home" select="0"/>
-<xsl:param name="htmlhelp.button.home.url"/>
-<xsl:param name="htmlhelp.button.jump1" select="0"/>
-<xsl:param name="htmlhelp.button.jump1.title">User1</xsl:param>
-<xsl:param name="htmlhelp.button.jump1.url"/>
-<xsl:param name="htmlhelp.button.jump2" select="0"/>
-<xsl:param name="htmlhelp.button.jump2.title">User2</xsl:param>
-<xsl:param name="htmlhelp.button.jump2.url"/>
-<xsl:param name="htmlhelp.button.locate" select="0"/>
-<xsl:param name="htmlhelp.button.next" select="1"/>
-<xsl:param name="htmlhelp.button.options" select="1"/>
-<xsl:param name="htmlhelp.button.prev" select="1"/>
-<xsl:param name="htmlhelp.button.print" select="1"/>
-<xsl:param name="htmlhelp.button.refresh" select="0"/>
-<xsl:param name="htmlhelp.button.stop" select="0"/>
-<xsl:param name="htmlhelp.button.zoom" select="0"/>
-<xsl:param name="htmlhelp.chm">htmlhelp.chm</xsl:param>
-<xsl:param name="htmlhelp.default.topic"/>
-<xsl:param name="htmlhelp.display.progress" select="1"/>
-<xsl:param name="htmlhelp.encoding">iso-8859-1</xsl:param>
-<xsl:param name="htmlhelp.enhanced.decompilation" select="0"/>
-<xsl:param name="htmlhelp.enumerate.images" select="0"/>
-<xsl:param name="htmlhelp.force.map.and.alias" select="0"/>
-<xsl:param name="htmlhelp.hhc.binary" select="1"/>
-<xsl:param name="htmlhelp.hhc.folders.instead.books" select="1"/>
-<xsl:param name="htmlhelp.hhc">toc.hhc</xsl:param>
-<xsl:param name="htmlhelp.hhc.section.depth">5</xsl:param>
-<xsl:param name="htmlhelp.hhc.show.root" select="1"/>
-<xsl:param name="htmlhelp.hhc.width"/>
-<xsl:param name="htmlhelp.hhk">index.hhk</xsl:param>
-<xsl:param name="htmlhelp.hhp">htmlhelp.hhp</xsl:param>
-<xsl:param name="htmlhelp.hhp.tail"/>
-<xsl:param name="htmlhelp.hhp.window">Main</xsl:param>
-<xsl:param name="htmlhelp.hhp.windows"/>
-<xsl:param name="htmlhelp.map.file">context.h</xsl:param>
-<xsl:param name="htmlhelp.only" select="0"/>
-<xsl:param name="htmlhelp.remember.window.position" select="0"/>
-<xsl:param name="htmlhelp.show.advanced.search" select="0"/>
-<xsl:param name="htmlhelp.show.favorities" select="0"/>
-<xsl:param name="htmlhelp.show.menu" select="0"/>
-<xsl:param name="htmlhelp.show.toolbar.text" select="1"/>
-<xsl:param name="htmlhelp.title"/>
-<xsl:param name="htmlhelp.use.hhk" select="0"/>
-<xsl:param name="htmlhelp.window.geometry"/>
-<xsl:param name="img.src.path"/>
-<xsl:param name="id.warnings" select="0"/>
-<xsl:param name="index.method">basic</xsl:param>
-<xsl:param name="index.on.role" select="0"/>
-<xsl:param name="index.on.type" select="0"/>
-<xsl:param name="index.number.separator"/>
-<xsl:param name="index.term.separator"/>
-<xsl:param name="index.range.separator"/>
-<xsl:param name="index.prefer.titleabbrev" select="0"/>
-<xsl:param name="ignore.image.scaling" select="0"/>
-<xsl:param name="inherit.keywords" select="1"/>
-<xsl:param name="insert.xref.page.number">no</xsl:param>
-<xsl:param name="javahelp.encoding">iso-8859-1</xsl:param>
-<xsl:param name="keep.relative.image.uris" select="1"/>
-
-<xsl:param name="l10n.gentext.default.language">en</xsl:param>
-<xsl:param name="l10n.gentext.language"/>
-<xsl:param name="l10n.gentext.use.xref.language" select="0"/>
-<xsl:param name="l10n.lang.value.rfc.compliant" select="1"/>
-<xsl:param name="label.from.part" select="0"/>
-<xsl:param name="linenumbering.everyNth">5</xsl:param>
-<xsl:param name="linenumbering.extension" select="1"/>
-<xsl:param name="linenumbering.separator"><xsl:text> </xsl:text></xsl:param>
-<xsl:param name="linenumbering.width">3</xsl:param>
-<xsl:param name="link.mailto.url"/>
-<xsl:param name="make.graphic.viewport" select="1"/>
-<xsl:param name="make.single.year.ranges" select="0"/>
-<xsl:param name="make.valid.html" select="1"/>
-<xsl:param name="make.year.ranges" select="0"/>
-    <xsl:param name="manifest">HTML.manifest</xsl:param>
-    
-<xsl:param name="manifest.in.base.dir" select="0"/>
-<xsl:param name="manual.toc"/>
-<xsl:param name="menuchoice.menu.separator"> &#8594; </xsl:param>
-<xsl:param name="menuchoice.separator">+</xsl:param>
-<xsl:param name="navig.graphics.extension">.gif</xsl:param>
-<xsl:param name="navig.graphics" select="0"/>
-<xsl:param name="navig.graphics.path">images/</xsl:param>
-<xsl:param name="navig.showtitles">1</xsl:param>
-<xsl:param name="nominal.image.depth" select="4 * $pixels.per.inch"/>
-<xsl:param name="nominal.image.width" select="6 * $pixels.per.inch"/>
-<xsl:param name="nominal.table.width">6in</xsl:param>
-<xsl:param name="olink.base.uri"/>
-<xsl:param name="olink.debug" select="0"/>
-<xsl:attribute-set name="olink.properties">
-  <xsl:attribute name="show-destination">replace</xsl:attribute>
-</xsl:attribute-set>
-<xsl:param name="insert.olink.page.number">no</xsl:param>
-<xsl:param name="insert.olink.pdf.frag" select="0"/>
-<xsl:param name="prefer.internal.olink" select="0"/>
-<xsl:param name="olink.lang.fallback.sequence"/>
-<xsl:param name="olink.doctitle">no</xsl:param> 
-<xsl:param name="olink.fragid">fragid=</xsl:param>
-<xsl:param name="olink.outline.ext">.olink</xsl:param>
-<xsl:param name="olink.pubid">pubid</xsl:param>
-  <xsl:param name="olink.resolver">/cgi-bin/olink</xsl:param>
-<xsl:param name="olink.sysid">sysid</xsl:param>
-<xsl:param name="abstract.notitle.enabled" select="0"/>
-<xsl:param name="othercredit.like.author.enabled">0</xsl:param>
-<xsl:param name="para.propagates.style" select="1"/>
-<xsl:param name="part.autolabel">I</xsl:param>
-<xsl:param name="phrase.propagates.style" select="1"/>
-<xsl:param name="pixels.per.inch">90</xsl:param>
-<xsl:param name="points.per.em">10</xsl:param>
-<xsl:param name="preface.autolabel" select="0"/>
-<xsl:param name="preferred.mediaobject.role"/>
-<xsl:param name="process.empty.source.toc" select="0"/>
-<xsl:param name="process.source.toc" select="0"/>
-<xsl:param name="profile.arch"/>
-<xsl:param name="profile.audience"/>
-<xsl:param name="profile.attribute"/>
-<xsl:param name="profile.condition"/>
-<xsl:param name="profile.conformance"/>
-<xsl:param name="profile.lang"/>
-<xsl:param name="profile.os"/>
-<xsl:param name="profile.revision"/>
-<xsl:param name="profile.revisionflag"/>
-<xsl:param name="profile.role"/>
-<xsl:param name="profile.security"/>
-<xsl:param name="profile.separator">;</xsl:param>
-<xsl:param name="profile.status"/>
-<xsl:param name="profile.userlevel"/>
-<xsl:param name="profile.value"/>
-<xsl:param name="profile.vendor"/>
-<xsl:param name="profile.wordsize"/>
-<xsl:param name="punct.honorific">.</xsl:param>
-<xsl:param name="qanda.defaultlabel">number</xsl:param>
-<xsl:param name="qanda.inherit.numeration" select="1"/>
-<xsl:param name="qanda.in.toc" select="0"/>
-<xsl:param name="qanda.nested.in.toc" select="0"/>
-<xsl:param name="qandadiv.autolabel" select="1"/>
-<xsl:param name="refentry.generate.name" select="1"/>
-<xsl:param name="refentry.generate.title" select="0"/>
-<xsl:param name="refentry.separator" select="1"/>
-<xsl:param name="refentry.xref.manvolnum" select="1"/>
-  <xsl:param name="reference.autolabel">I</xsl:param>
-<xsl:param name="refclass.suppress" select="0"/>
-<xsl:param name="root.filename">index</xsl:param>
-<xsl:param name="rootid"/>
-<xsl:param name="runinhead.default.title.end.punct">.</xsl:param>
-<xsl:param name="runinhead.title.end.punct">.!?:</xsl:param>
-<xsl:param name="section.autolabel" select="0"/>
-<xsl:param name="section.autolabel.max.depth">8</xsl:param>
-<xsl:param name="section.label.includes.component.label" select="0"/>
-<xsl:param name="segmentedlist.as.table" select="0"/>
-<xsl:param name="shade.verbatim" select="0"/>
-<xsl:attribute-set name="shade.verbatim.style">
-  <xsl:attribute name="border">0</xsl:attribute>
-  <xsl:attribute name="bgcolor">#E0E0E0</xsl:attribute>
-</xsl:attribute-set>
-
-<xsl:param name="show.comments" select="1"/>
-<xsl:param name="show.revisionflag" select="0"/>
-<xsl:param name="simplesect.in.toc" select="0"/>
-<xsl:param name="spacing.paras" select="0"/>
-<xsl:param name="suppress.footer.navigation">0</xsl:param>
-<xsl:param name="suppress.header.navigation" select="0"/>
-<xsl:param name="suppress.navigation" select="0"/>
-<xsl:param name="table.borders.with.css" select="0"/>
-<xsl:param name="table.cell.border.color"/>
-
-<xsl:param name="table.cell.border.style">solid</xsl:param>
-<xsl:param name="table.cell.border.thickness">0.5pt</xsl:param>
-<xsl:param name="table.footnote.number.format">a</xsl:param>
-<xsl:param name="table.footnote.number.symbols"/>
-<xsl:param name="table.frame.border.color"/>
-
-<xsl:param name="table.frame.border.style">solid</xsl:param>
-<xsl:param name="table.frame.border.thickness">0.5pt</xsl:param>
-<xsl:param name="tablecolumns.extension" select="1"/>
- <xsl:param name="target.database.document">olinkdb.xml</xsl:param>
-<xsl:param name="targets.filename">target.db</xsl:param>
-<xsl:param name="textdata.default.encoding"/>
-<xsl:param name="tex.math.delims" select="1"/>
-<xsl:param name="tex.math.file">tex-math-equations.tex</xsl:param>
-<xsl:param name="tex.math.in.alt"/>
-  <xsl:param name="textinsert.extension" select="1"/>
-<xsl:param name="toc.list.type">dl</xsl:param>
-<xsl:param name="toc.section.depth">2</xsl:param>
-<xsl:param name="toc.max.depth">8</xsl:param>
-<xsl:param name="ulink.target">_top</xsl:param>
-<xsl:param name="use.embed.for.svg" select="0"/>
-<xsl:param name="use.extensions" select="0"/>
-<xsl:param name="use.id.as.filename" select="0"/>
-<xsl:param name="use.local.olink.style" select="0"/> 
-<xsl:param name="use.role.as.xrefstyle" select="1"/>
-<xsl:param name="use.role.for.mediaobject" select="1"/>
-<xsl:param name="use.svg" select="1"/>
-<xsl:param name="variablelist.as.table" select="0"/>
-<xsl:param name="variablelist.term.separator">, </xsl:param>
-<xsl:param name="variablelist.term.break.after">0</xsl:param>
-<xsl:param name="xref.with.number.and.title" select="1"/>
-<xsl:param name="xref.label-title.separator">: </xsl:param>
-<xsl:param name="xref.label-page.separator"><xsl:text> </xsl:text></xsl:param>
-<xsl:param name="xref.title-page.separator"><xsl:text> </xsl:text></xsl:param>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/pi.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/pi.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,1182 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="doc" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<doc:reference xmlns=""><info xmlns="http://www.w3.org/1999/xhtml"><title>HTML Processing Instruction Reference</title>
-    <releaseinfo role="meta">
-      $Id$
-    </releaseinfo>
-  </info>
-  <partintro xmlns="http://www.w3.org/1999/xhtml" xml:id="partintro">
-    <title>Introduction</title>
-    <para>This is generated reference documentation for all
-      user-specifiable processing instructions (PIs) in the DocBook
-      XSL stylesheets for HTML output.
-      <note>
-        <para>You add these PIs at particular points in a document to
-          cause specific &#8220;exceptions&#8221; to formatting/output behavior. To
-          make global changes in formatting/output behavior across an
-          entire document, it&#8217;s better to do it by setting an
-          appropriate stylesheet parameter (if there is one).</para>
-      </note>
-    </para>
-  </partintro>
-</doc:reference>
-
-<!-- ==================================================================== -->
-
-<doc:pi xmlns="" name="dbhtml_background-color">
-  <refpurpose xmlns="http://www.w3.org/1999/xhtml">Sets background color for an image</refpurpose>
-  <refdescription xmlns="http://www.w3.org/1999/xhtml">
-    <para>Use the <tag class="xmlpi">dbhtml background-color</tag> PI before or
-      after an image (<tag>graphic</tag>, <tag>inlinegraphic</tag>,
-      <tag>imagedata</tag>, or <tag>videodata</tag> element) as a
-      sibling to the element, to set a background color for the
-      image.</para>
-  </refdescription>
-  <refsynopsisdiv xmlns="http://www.w3.org/1999/xhtml">
-    <synopsis><tag class="xmlpi">dbhtml background-color="<replaceable>color</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter xmlns="http://www.w3.org/1999/xhtml">
-    <variablelist>
-      <varlistentry><term>background-color="<replaceable>color</replaceable>"</term>
-        <listitem>
-          <para>An HTML color value</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="tcg">
-    <para><link role="tcg" xlink:href="BGcolor.html">Background color</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbhtml_background-color">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbhtml-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
-    <xsl:with-param name="attribute" select="'background-color'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi xmlns="" name="dbhtml_bgcolor">
-  <refpurpose xmlns="http://www.w3.org/1999/xhtml">Sets background color on a table row or table cell</refpurpose>
-  <refdescription xmlns="http://www.w3.org/1999/xhtml">
-    <para>Use the <tag class="xmlpi">dbhtml bgcolor</tag> PI as child of a table row
-      or cell to set a background color for that table row or cell.</para>
-  </refdescription>
-  <refsynopsisdiv xmlns="http://www.w3.org/1999/xhtml">
-    <synopsis><tag class="xmlpi">dbhtml bgcolor="<replaceable>color</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter xmlns="http://www.w3.org/1999/xhtml">
-    <variablelist>
-      <varlistentry><term>bgcolor="<replaceable>color</replaceable>"</term>
-        <listitem>
-          <para>An HTML color value</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="tcg">
-    <para><link role="tcg" xlink:href="BGtableColor.html#CellBGColor">Cell background color</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbhtml_bgcolor">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbhtml-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
-    <xsl:with-param name="attribute" select="'bgcolor'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi xmlns="" name="dbhtml_cellpadding">
-  <refpurpose xmlns="http://www.w3.org/1999/xhtml">Specifies cellpadding in table or qandaset output</refpurpose>
-  <refdescription xmlns="http://www.w3.org/1999/xhtml">
-    <para>Use the <tag class="xmlpi">dbhtml cellpadding</tag> PI as a child of a
-      <tag>table</tag> or <tag>qandaset</tag> to specify the value
-      for the HTML <literal>cellpadding</literal> attribute in the
-      output HTML table.</para>
-  </refdescription>
-  <refsynopsisdiv xmlns="http://www.w3.org/1999/xhtml">
-    <synopsis><tag class="xmlpi">dbhtml cellpadding="<replaceable>number</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter xmlns="http://www.w3.org/1999/xhtml">
-    <variablelist>
-      <varlistentry><term>cellpadding="<replaceable>number</replaceable>"</term>
-        <listitem>
-          <para>Specifies the cellpadding</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="params">
-    <para><parameter>html.cellpadding</parameter></para>
-  </refsee>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="tcg">
-    <para><link role="tcg" xlink:href="CellSpacing.html">Cell spacing and cell padding</link>,
-      <link role="tcg" xlink:href="QandAformat.html">Q and A formatting</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbhtml_cellpadding">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbhtml-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
-    <xsl:with-param name="attribute" select="'cellpadding'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi xmlns="" name="dbhtml_cellspacing">
-  <refpurpose xmlns="http://www.w3.org/1999/xhtml">Specifies cellspacing in table or qandaset output</refpurpose>
-  <refdescription xmlns="http://www.w3.org/1999/xhtml">
-    <para>Use the <tag class="xmlpi">dbhtml cellspacing</tag> PI as a child of a
-      <tag>table</tag> or <tag>qandaset</tag> to specify the value
-      for the HTML <literal>cellspacing</literal> attribute in the
-      output HTML table.</para>
-  </refdescription>
-  <refsynopsisdiv xmlns="http://www.w3.org/1999/xhtml">
-    <synopsis><tag class="xmlpi">dbhtml cellspacing="<replaceable>number</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter xmlns="http://www.w3.org/1999/xhtml">
-    <variablelist>
-      <varlistentry><term>cellspacing="<replaceable>number</replaceable>"</term>
-        <listitem>
-          <para>Specifies the cellspacing</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="params">
-    <para><parameter>html.cellspacing</parameter></para>
-  </refsee>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="tcg">
-    <para><link role="tcg" xlink:href="CellSpacing.html">Cell spacing and cell padding</link>,
-      <link role="tcg" xlink:href="QandAformat.html">Q and A formatting</link></para>
-    </refsee>
-</doc:pi>
-<xsl:template name="pi.dbhtml_cellspacing">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbhtml-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
-    <xsl:with-param name="attribute" select="'cellspacing'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi xmlns="" name="dbhtml_class">
-  <refpurpose xmlns="http://www.w3.org/1999/xhtml">Set value of the class attribute for a table row</refpurpose>
-  <refdescription xmlns="http://www.w3.org/1999/xhtml">
-    <para>Use the <tag class="xmlpi">dbhtml class</tag> PI as a child of a
-      <tag>row</tag> to specify a <literal>class</literal>
-      attribute and value in the HTML output for that row.</para>
-  </refdescription>
-  <refsynopsisdiv xmlns="http://www.w3.org/1999/xhtml">
-    <synopsis><tag class="xmlpi">dbhtml class="<replaceable>name</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter xmlns="http://www.w3.org/1999/xhtml">
-    <variablelist>
-      <varlistentry><term>class="<replaceable>name</replaceable>"</term>
-        <listitem>
-          <para>Specifies the class name</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="tcg">
-    <para><link role="tcg" xlink:href="CSSTableCells.html">Table styles in HTML output</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbhtml_class">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbhtml-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
-    <xsl:with-param name="attribute" select="'class'"/>
-  </xsl:call-template>
-</xsl:template> 
-
-<doc:pi xmlns="" name="dbhtml_dir">
-  <refpurpose xmlns="http://www.w3.org/1999/xhtml">Specifies a directory name in which to write files</refpurpose>
-  <refdescription xmlns="http://www.w3.org/1999/xhtml">
-    <para>When chunking output, use the <tag class="xmlpi">dbhtml dir</tag> PI
-      as a child of a chunk source to cause the output of that
-      chunk to be written to the specified directory; also, use it
-      as a child of a <tag>mediaobject</tag> to specify a
-      directory into which any long-description files for that
-      <tag>mediaobject</tag> will be written.</para>
-  </refdescription>
-  <refsynopsisdiv xmlns="http://www.w3.org/1999/xhtml">
-    <synopsis><tag class="xmlpi">dbhtml dir="<replaceable>path</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter xmlns="http://www.w3.org/1999/xhtml">
-    <variablelist>
-      <varlistentry><term>dir="<replaceable>path</replaceable>"</term>
-        <listitem>
-          <para>Specifies the pathname for the directory</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="params">
-    <para><parameter>base.dir</parameter></para>
-  </refsee>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="tcg">
-    <para><link role="tcg" xlink:href="Chunking.html#dbhtmlDirPI">dbhtml dir processing instruction</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbhtml_dir">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbhtml-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
-    <xsl:with-param name="attribute" select="'dir'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi xmlns="" name="dbhtml_filename">
-  <refpurpose xmlns="http://www.w3.org/1999/xhtml">Specifies a filename for a chunk</refpurpose>
-  <refdescription xmlns="http://www.w3.org/1999/xhtml">
-    <para>When chunking output, use the <tag class="xmlpi">dbhtml filename</tag>
-      PI as a child of a chunk source to specify a filename for
-      the output file for that chunk.</para>
-  </refdescription>
-  <refsynopsisdiv xmlns="http://www.w3.org/1999/xhtml">
-    <synopsis><tag class="xmlpi">dbhtml filename="<replaceable>filename</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter xmlns="http://www.w3.org/1999/xhtml">
-    <variablelist>
-      <varlistentry><term>filename="<replaceable>path</replaceable>"</term>
-        <listitem>
-          <para>Specifies the filename for the file</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="params">
-    <para><parameter>use.id.as.filename</parameter></para>
-  </refsee>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="tcg">
-    <para><link role="tcg" xlink:href="Chunking.html#DbhtmlFilenames">dbhtml filenames</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbhtml_filename">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbhtml-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
-    <xsl:with-param name="attribute" select="'filename'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi xmlns="" name="dbhtml_funcsynopsis-style">
-  <refpurpose xmlns="http://www.w3.org/1999/xhtml">Specifies presentation style for a funcsynopsis</refpurpose>
-  <refdescription xmlns="http://www.w3.org/1999/xhtml">
-    <para>Use the <tag class="xmlpi">dbhtml funcsynopsis-style</tag> PI as a child of
-      a <tag>funcprototype</tag> or anywhere within a funcprototype
-      control the presentation style for the <tag>funcsynopsis</tag>
-      in output.</para>
-  </refdescription>
-  <refsynopsisdiv xmlns="http://www.w3.org/1999/xhtml">
-    <synopsis><tag class="xmlpi">dbhtml funcsynopsis-style="kr"|"ansi"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter xmlns="http://www.w3.org/1999/xhtml">
-    <variablelist>
-      <varlistentry><term>funcsynopsis-style="kr"</term>
-        <listitem>
-          <para>Displays the <tag>funcprototype</tag> in K&amp;R style</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry><term>funcsynopsis-style="ansi"</term>
-        <listitem>
-          <para>Displays the <tag>funcprototype</tag> in ANSI style</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="params">
-    <para><parameter>funcsynopsis.style</parameter></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbhtml_funcsynopsis-style">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbhtml-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
-    <xsl:with-param name="attribute" select="'funcsynopsis-style'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi xmlns="" name="dbhtml_img.src.path">
-  <refpurpose xmlns="http://www.w3.org/1999/xhtml">Specifies a path to the location of an image file</refpurpose>
-  <refdescription xmlns="http://www.w3.org/1999/xhtml">
-    <para>Use the <tag class="xmlpi">dbhtml img.src.path</tag> PI before or
-      after an image (<tag>graphic</tag>,
-      <tag>inlinegraphic</tag>, <tag>imagedata</tag>, or
-      <tag>videodata</tag> element) as a sibling to the element,
-      to specify a path to the location of the image; in HTML
-      output, the value specified for the
-      <code>img.src.path</code> attribute is prepended to the
-      filename.</para>
-  </refdescription>
-  <refsynopsisdiv xmlns="http://www.w3.org/1999/xhtml">
-    <synopsis><tag class="xmlpi">dbhtml img.src.path="<replaceable>path</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter xmlns="http://www.w3.org/1999/xhtml">
-    <variablelist>
-      <varlistentry><term>img.src.path="<replaceable>path</replaceable>"</term>
-        <listitem>
-          <para>Specifies the pathname to prepend to the name of the image file</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="params">
-    <para><parameter>img.src.path</parameter></para>
-  </refsee>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="tcg">
-    <para><link role="tcg" xlink:href="GraphicsLocations.html#UsingFileref">Using fileref</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbhtml_img.src.path">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbhtml-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
-    <xsl:with-param name="attribute" select="'img.src.path'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi xmlns="" name="dbhtml_label-width">
-  <refpurpose xmlns="http://www.w3.org/1999/xhtml">Specifies the label width for a qandaset</refpurpose>
-  <refdescription xmlns="http://www.w3.org/1999/xhtml">
-    <para>Use the <tag class="xmlpi">dbhtml label-width</tag> PI as a child of a
-      <tag>qandaset</tag> to specify the width of labels.</para>
-  </refdescription>
-  <refsynopsisdiv xmlns="http://www.w3.org/1999/xhtml">
-    <synopsis><tag class="xmlpi">dbhtml label-width="<replaceable>width</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter xmlns="http://www.w3.org/1999/xhtml">
-    <variablelist>
-      <varlistentry><term>label-width="<replaceable>width</replaceable>"</term>
-        <listitem>
-          <para>Specifies the label width (including units)</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="tcg">
-    <para><link role="tcg" xlink:href="QandAformat.html">Q and A formatting</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbhtml_label-width">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbhtml-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
-    <xsl:with-param name="attribute" select="'label-width'"/>
-  </xsl:call-template>
-</xsl:template> 
-
-<doc:pi xmlns="" name="dbhtml_linenumbering.everyNth">
-  <refpurpose xmlns="http://www.w3.org/1999/xhtml">Specifies interval for lines numbers in verbatims</refpurpose>
-  <refdescription xmlns="http://www.w3.org/1999/xhtml">
-    <para>Use the <tag class="xmlpi">dbhtml linenumbering.everyNth</tag> PI as a child
-      of a &#8220;verbatim&#8221; element &#8211; <tag>programlisting</tag>,
-      <tag>screen</tag>, <tag>synopsis</tag> &#8212; to specify
-      the interval at which lines are numbered.</para>
-  </refdescription>
-  <refsynopsisdiv xmlns="http://www.w3.org/1999/xhtml">
-    <synopsis><tag class="xmlpi">dbhtml linenumbering.everyNth="<replaceable>N</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter xmlns="http://www.w3.org/1999/xhtml">
-    <variablelist>
-      <varlistentry><term>linenumbering.everyNth="<replaceable>N</replaceable>"</term>
-        <listitem>
-          <para>Specifies numbering interval; a number is output
-            before every <replaceable>N</replaceable>th line</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="params">
-    <para><parameter>linenumbering.everyNth</parameter></para>
-  </refsee>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="tcg">
-    <para><link role="tcg" xlink:href="AnnotateListing.html#LineNumbering">Line numbering</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbhtml_linenumbering.everyNth">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbhtml-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
-    <xsl:with-param name="attribute" select="'linenumbering.everyNth'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi xmlns="" name="dbhtml_linenumbering.separator">
-  <refpurpose xmlns="http://www.w3.org/1999/xhtml">Specifies separator text for line numbers in verbatims</refpurpose>
-  <refdescription xmlns="http://www.w3.org/1999/xhtml">
-    <para>Use the <tag class="xmlpi">dbhtml linenumbering.separator</tag> PI as a child
-      of a &#8220;verbatim&#8221; element &#8211; <tag>programlisting</tag>,
-      <tag>screen</tag>, <tag>synopsis</tag> &#8212; to specify
-      the separator text output between the line numbers and content.</para>
-  </refdescription>
-  <refsynopsisdiv xmlns="http://www.w3.org/1999/xhtml">
-    <synopsis><tag class="xmlpi">dbhtml linenumbering.separator="<replaceable>text</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter xmlns="http://www.w3.org/1999/xhtml">
-    <variablelist>
-      <varlistentry><term>linenumbering.separator="<replaceable>text</replaceable>"</term>
-        <listitem>
-          <para>Specifies the text (zero or more characters)</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="params">
-    <para><parameter>linenumbering.separator</parameter></para>
-  </refsee>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="tcg">
-    <para><link role="tcg" xlink:href="AnnotateListing.html#LineNumbering">Line numbering</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbhtml_linenumbering.separator">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbhtml-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
-    <xsl:with-param name="attribute" select="'linenumbering.separator'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi xmlns="" name="dbhtml_linenumbering.width">
-  <refpurpose xmlns="http://www.w3.org/1999/xhtml">Specifies width for line numbers in verbatims</refpurpose>
-  <refdescription xmlns="http://www.w3.org/1999/xhtml">
-    <para>Use the <tag class="xmlpi">dbhtml linenumbering.width</tag> PI as a child
-      of a &#8220;verbatim&#8221; element &#8211; <tag>programlisting</tag>,
-      <tag>screen</tag>, <tag>synopsis</tag> &#8212; to specify
-      the width set aside for line numbers.</para>
-  </refdescription>
-  <refsynopsisdiv xmlns="http://www.w3.org/1999/xhtml">
-    <synopsis><tag class="xmlpi">dbhtml linenumbering.width="<replaceable>width</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter xmlns="http://www.w3.org/1999/xhtml">
-    <variablelist>
-      <varlistentry><term>linenumbering.width="<replaceable>width</replaceable>"</term>
-        <listitem>
-          <para>Specifies the width (inluding units)</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="params">
-    <para><parameter>linenumbering.width</parameter></para>
-  </refsee>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="tcg">
-    <para><link role="tcg" xlink:href="AnnotateListing.html#LineNumbering">Line numbering</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbhtml_linenumbering.width">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbhtml-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
-    <xsl:with-param name="attribute" select="'linenumbering.width'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi xmlns="" name="dbhtml_list-presentation">
-  <refpurpose xmlns="http://www.w3.org/1999/xhtml">Specifies presentation style for a variablelist or
-    segmentedlist</refpurpose>
-  <refdescription xmlns="http://www.w3.org/1999/xhtml">
-    <para>Use the <tag class="xmlpi">dbhtml list-presentation</tag> PI as a child of
-      a <tag>variablelist</tag> or <tag>segmentedlist</tag> to
-      control the presentation style for the list (to cause it, for
-      example, to be displayed as a table).</para>
-  </refdescription>
-  <refsynopsisdiv xmlns="http://www.w3.org/1999/xhtml">
-    <synopsis><tag class="xmlpi">dbhtml list-presentation="list"|"table"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter xmlns="http://www.w3.org/1999/xhtml">
-    <variablelist>
-      <varlistentry><term>list-presentation="list"</term>
-        <listitem>
-          <para>Displays the list as a list</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry><term>list-presentation="table"</term>
-        <listitem>
-          <para>Displays the list as a table</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="params">
-    <itemizedlist>
-      <listitem>
-        <para><parameter>variablelist.as.table</parameter></para>
-      </listitem>
-      <listitem>
-        <para><parameter>segmentedlist.as.table</parameter></para>
-      </listitem>
-    </itemizedlist>
-  </refsee>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="tcg">
-    <para><link role="tcg" xlink:href="Variablelists.html#VarListFormatting">Variable list formatting in HTML</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbhtml_list-presentation">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbhtml-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
-    <xsl:with-param name="attribute" select="'list-presentation'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi xmlns="" name="dbhtml_list-width">
-  <refpurpose xmlns="http://www.w3.org/1999/xhtml">Specifies the width of a variablelist or simplelist</refpurpose>
-  <refdescription xmlns="http://www.w3.org/1999/xhtml">
-    <para>Use the <tag class="xmlpi">dbhtml list-width</tag> PI as a child of a
-      <tag>variablelist</tag> or a <tag>simplelist</tag> presented
-      as a table, to specify the output width.</para>
-  </refdescription>
-  <refsynopsisdiv xmlns="http://www.w3.org/1999/xhtml">
-    <synopsis><tag class="xmlpi">dbhtml list-width="<replaceable>width</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter xmlns="http://www.w3.org/1999/xhtml">
-    <variablelist>
-      <varlistentry><term>list-width="<replaceable>width</replaceable>"</term>
-        <listitem>
-          <para>Specifies the output width (including units)</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="tcg">
-    <para><link role="tcg" xlink:href="Variablelists.html#VarListFormatting">Variable list formatting in HTML</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbhtml_list-width">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbhtml-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
-    <xsl:with-param name="attribute" select="'list-width'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi xmlns="" name="dbhtml_row-height">
-  <refpurpose xmlns="http://www.w3.org/1999/xhtml">Specifies the height for a table row</refpurpose>
-  <refdescription xmlns="http://www.w3.org/1999/xhtml">
-    <para>Use the <tag class="xmlpi">dbhtml row-height</tag> PI as a child of a
-      <tag>row</tag> to specify the height of the row.</para>
-  </refdescription>
-  <refsynopsisdiv xmlns="http://www.w3.org/1999/xhtml">
-    <synopsis><tag class="xmlpi">dbhtml row-height="<replaceable>height</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter xmlns="http://www.w3.org/1999/xhtml">
-    <variablelist>
-      <varlistentry><term>row-height="<replaceable>height</replaceable>"</term>
-        <listitem>
-          <para>Specifies the label height (including units)</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="tcg">
-    <para><link role="tcg" xlink:href="RowHeight.html">Row height</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbhtml_row-height">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbhtml-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
-    <xsl:with-param name="attribute" select="'row-height'"/>
-  </xsl:call-template>
-</xsl:template> 
-
-<doc:pi xmlns="" name="dbhtml_start">
-  <refpurpose xmlns="http://www.w3.org/1999/xhtml">(obsolete) Sets the starting number on an ordered list</refpurpose>
-  <refdescription xmlns="http://www.w3.org/1999/xhtml">
-    <para><emphasis>This PI is obsolete</emphasis>. The intent of
-      this PI was to provide a means for setting a specific starting
-      number for an ordered list. Instead of this PI, set a value
-      for the <literal>override</literal> attribute on the first
-      <tag>listitem</tag> in the list; that will have the same
-      effect as what this PI was intended for.</para>
-  </refdescription>
-  <refsynopsisdiv xmlns="http://www.w3.org/1999/xhtml">
-    <synopsis><tag class="xmlpi">dbhtml start="<replaceable>character</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter xmlns="http://www.w3.org/1999/xhtml">
-    <variablelist>
-      <varlistentry><term>start="<replaceable>character</replaceable>"</term>
-        <listitem>
-          <para>Specifies the character to use as the starting
-            number; use 0-9, a-z, A-Z, or lowercase or uppercase
-            Roman numerals</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="tcg">
-    <para><link role="tcg" xlink:href="Orderedlists.html#ListStartNum">List starting number</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbhtml_start">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="pi-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
-    <xsl:with-param name="attribute" select="'start'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi xmlns="" name="dbhtml_table-summary">
-  <refpurpose xmlns="http://www.w3.org/1999/xhtml">Specifies summary for table, variablelist, segmentedlist, or qandaset output</refpurpose>
-  <refdescription xmlns="http://www.w3.org/1999/xhtml">
-    <para>Use the <tag class="xmlpi">dbhtml table-summary</tag> PI as a child of
-      a <tag>table</tag>, <tag>variablelist</tag>,
-      <tag>segmentedlist</tag>, or <tag>qandaset</tag> to specify
-      the text for the HTML <literal>summary</literal> attribute
-      in the output HTML table.</para>
-  </refdescription>
-  <refsynopsisdiv xmlns="http://www.w3.org/1999/xhtml">
-    <synopsis><tag class="xmlpi">dbhtml table-summary="<replaceable>text</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter xmlns="http://www.w3.org/1999/xhtml">
-    <variablelist>
-      <varlistentry><term>table-summary="<replaceable>text</replaceable>"</term>
-        <listitem>
-          <para>Specifies the summary text (zero or more characters)</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="tcg">
-    <para><link role="tcg" xlink:href="Variablelists.html#VarListFormatting">Variable list formatting in HTML</link>,
-      <link role="tcg" xlink:href="TableSummary.html">Table summary text</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbhtml_table-summary">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbhtml-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
-    <xsl:with-param name="attribute" select="'table-summary'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi xmlns="" name="dbhtml_table-width">
-  <refpurpose xmlns="http://www.w3.org/1999/xhtml">Specifies the width for a table</refpurpose>
-  <refdescription xmlns="http://www.w3.org/1999/xhtml">
-    <para>Use the <tag class="xmlpi">dbhtml table-width</tag> PI as a child of a
-      <tag>table</tag> to specify the width of the table in
-      output.</para>
-  </refdescription>
-  <refsynopsisdiv xmlns="http://www.w3.org/1999/xhtml">
-    <synopsis><tag class="xmlpi">dbhtml table-width="<replaceable>width</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter xmlns="http://www.w3.org/1999/xhtml">
-    <variablelist>
-      <varlistentry><term>table-width="<replaceable>width</replaceable>"</term>
-        <listitem>
-          <para>Specifies the table width (including units or as a percentage)</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="params">
-    <para><parameter>default.table.width</parameter></para>
-  </refsee>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="tcg">
-    <para><link role="tcg" xlink:href="Tables.html#TableWidth">Table width</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbhtml_table-width">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbhtml-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
-    <xsl:with-param name="attribute" select="'table-width'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi xmlns="" name="dbhtml_term-presentation">
-  <refpurpose xmlns="http://www.w3.org/1999/xhtml">Sets character formatting for terms in a variablelist</refpurpose>
-  <refdescription xmlns="http://www.w3.org/1999/xhtml">
-    <para>Use the <tag class="xmlpi">dbhtml term-presentation</tag> PI as a child
-      of a <tag>variablelist</tag> to set character formatting for
-      the <tag>term</tag> output of the list.</para>
-  </refdescription>
-  <refsynopsisdiv xmlns="http://www.w3.org/1999/xhtml">
-    <synopsis><tag class="xmlpi">dbhtml term-presentation="bold"|"italic"|"bold-italic"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter xmlns="http://www.w3.org/1999/xhtml">
-    <variablelist>
-      <varlistentry><term>term-presentation="<replaceable>bold</replaceable>"</term>
-        <listitem>
-          <para>Specifies that terms are displayed in bold</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry><term>term-presentation="<replaceable>italic</replaceable>"</term>
-        <listitem>
-          <para>Specifies that terms are displayed in italic</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry><term>term-presentation="<replaceable>bold-italic</replaceable>"</term>
-        <listitem>
-          <para>Specifies that terms are displayed in bold-italic</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="tcg">
-    <para><link role="tcg" xlink:href="Variablelists.html#VarListFormatting">Variable list formatting in HTML</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbhtml_term-presentation">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbhtml-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
-    <xsl:with-param name="attribute" select="'term-presentation'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi xmlns="" name="dbhtml_term-separator">
-  <refpurpose xmlns="http://www.w3.org/1999/xhtml">Specifies separator text among terms in a varlistentry</refpurpose>
-  <refdescription xmlns="http://www.w3.org/1999/xhtml">
-    <para>Use the <tag class="xmlpi">dbhtml term-separator</tag> PI as a child
-      of a <tag>variablelist</tag> to specify the separator text
-      among <tag>term</tag> instances.</para>
-  </refdescription>
-  <refsynopsisdiv xmlns="http://www.w3.org/1999/xhtml">
-    <synopsis><tag class="xmlpi">dbhtml term-separator="<replaceable>text</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter xmlns="http://www.w3.org/1999/xhtml">
-    <variablelist>
-      <varlistentry><term>term-separator="<replaceable>text</replaceable>"</term>
-        <listitem>
-          <para>Specifies the text (zero or more characters)</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="params">
-    <para><parameter>variablelist.term.separator</parameter></para>
-  </refsee>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="tcg">
-    <para><link role="tcg" xlink:href="Variablelists.html#VarListFormatting">Variable list formatting in HTML</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbhtml_term-separator">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbhtml-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
-    <xsl:with-param name="attribute" select="'term-separator'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi xmlns="" name="dbhtml_term-width">
-  <refpurpose xmlns="http://www.w3.org/1999/xhtml">Specifies the term width for a variablelist</refpurpose>
-  <refdescription xmlns="http://www.w3.org/1999/xhtml">
-    <para>Use the <tag class="xmlpi">dbhtml term-width</tag> PI as a child of a
-      <tag>variablelist</tag> to specify the width for
-      <tag>term</tag> output.</para>
-  </refdescription>
-  <refsynopsisdiv xmlns="http://www.w3.org/1999/xhtml">
-    <synopsis><tag class="xmlpi">dbhtml term-width="<replaceable>width</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter xmlns="http://www.w3.org/1999/xhtml">
-    <variablelist>
-      <varlistentry><term>term-width="<replaceable>width</replaceable>"</term>
-        <listitem>
-          <para>Specifies the term width (including units)</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="tcg">
-    <para><link role="tcg" xlink:href="Variablelists.html#VarListFormatting">Variable list formatting in HTML</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbhtml_term-width">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbhtml-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
-    <xsl:with-param name="attribute" select="'term-width'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi xmlns="" name="dbhtml_toc">
-  <refpurpose xmlns="http://www.w3.org/1999/xhtml">Specifies whether a TOC should be generated for a qandaset</refpurpose>
-  <refdescription xmlns="http://www.w3.org/1999/xhtml">
-    <para>Use the <tag class="xmlpi">dbhtml toc</tag> PI as a child of a
-      <tag>qandaset</tag> to specify whether a table of contents
-      (TOC) is generated for the <tag>qandaset</tag>.</para>
-  </refdescription>
-  <refsynopsisdiv xmlns="http://www.w3.org/1999/xhtml">
-    <synopsis><tag class="xmlpi">dbhtml toc="0"|"1"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter xmlns="http://www.w3.org/1999/xhtml">
-    <variablelist>
-      <varlistentry><term>toc="0"</term>
-        <listitem>
-          <para>If zero, no TOC is generated</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry><term>toc="1"</term>
-        <listitem>
-          <para>If <code>1</code> (or any non-zero value),
-            a TOC is generated</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="tcg">
-    <para><link role="tcg" xlink:href="QandAtoc.html">Q and A list of questions</link>,
-      <link role="tcg" xlink:href="QandAformat.html">Q and A formatting</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbhtml_toc">
-  <xsl:param name="node" select="."/>
-  <xsl:call-template name="dbhtml-attribute">
-    <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
-    <xsl:with-param name="attribute" select="'toc'"/>
-  </xsl:call-template>
-</xsl:template>
-
-<doc:pi xmlns="" name="dbcmdlist">
-  <refpurpose xmlns="http://www.w3.org/1999/xhtml">Generates a hyperlinked list of commands</refpurpose>
-  <refdescription xmlns="http://www.w3.org/1999/xhtml">
-    <para>Use the <tag class="xmlpi">dbcmdlist</tag> PI as the child of any
-      element (for example, <tag>refsynopsisdiv</tag>) containing multiple
-      <tag>cmdsynopsis</tag> instances; a hyperlinked navigational
-      &#8220;command list&#8221; will be generated at the top of output for that
-      element, enabling users to quickly jump
-      to each command synopsis.</para>
-  </refdescription>
-  <refsynopsisdiv xmlns="http://www.w3.org/1999/xhtml">
-    <synopsis><tag class="xmlpi">dbcmdlist</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter xmlns="http://www.w3.org/1999/xhtml">
-    <para>[No parameters]</para>
-  </refparameter>
-</doc:pi>
-<xsl:template name="pi.dbcmdlist">
-  <xsl:variable name="cmdsynopses" select="..//cmdsynopsis"/>
-  <xsl:if test="count($cmdsynopses)&lt;1">
-    <xsl:message><xsl:text>No cmdsynopsis elements matched dbcmdlist PI, perhaps it's nested too deep?</xsl:text>
-    </xsl:message>
-  </xsl:if>
-  <dl>
-    <xsl:call-template name="process.cmdsynopsis.list">
-      <xsl:with-param name="cmdsynopses" select="$cmdsynopses"/>
-    </xsl:call-template>
-  </dl>
-</xsl:template>
-
-<doc:pi xmlns="" name="dbfunclist">
-  <refpurpose xmlns="http://www.w3.org/1999/xhtml">Generates a hyperlinked list of functions</refpurpose>
-  <refdescription xmlns="http://www.w3.org/1999/xhtml">
-    <para>Use the <tag class="xmlpi">dbfunclist</tag> PI as the child of any
-      element (for example, <tag>refsynopsisdiv</tag>) containing multiple
-      <tag>funcsynopsis</tag> instances; a hyperlinked
-      navigational &#8220;function list&#8221; will be generated at the top of
-      output for that element, enabling users to quickly
-      jump to to each function synopsis.</para>
-  </refdescription>
-  <refsynopsisdiv xmlns="http://www.w3.org/1999/xhtml">
-    <synopsis><tag class="xmlpi">dbfunclist</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter xmlns="http://www.w3.org/1999/xhtml">
-    <para>[No parameters]</para>
-  </refparameter>
-</doc:pi>
-<xsl:template name="pi.dbfunclist">
-  <xsl:variable name="funcsynopses" select="..//funcsynopsis"/>
-  <xsl:if test="count($funcsynopses)&lt;1">
-    <xsl:message><xsl:text>No funcsynopsis elements matched dbfunclist PI, perhaps it's nested too deep?</xsl:text>
-    </xsl:message>
-  </xsl:if>
-  <dl>
-    <xsl:call-template name="process.funcsynopsis.list">
-      <xsl:with-param name="funcsynopses" select="$funcsynopses"/>
-    </xsl:call-template>
-  </dl>
-</xsl:template>
-
-<doc:pi xmlns="" name="dbhtml-include_href">
-  <refpurpose xmlns="http://www.w3.org/1999/xhtml">Copies an external well-formed HTML/XML file into current doc</refpurpose>
-  <refdescription xmlns="http://www.w3.org/1999/xhtml">
-    <para>Use the <tag class="xmlpi">dbhtml-include href</tag> PI anywhere in a
-      document to cause the contents of the file referenced by the
-      <code>href</code> pseudo-attribute to be copied/inserted &#8220;as
-      is&#8221; into your HTML output at the point in document order
-      where the PI occurs in the source.</para>
-    <note>
-      <para>The referenced file may contain plain text (as long as
-        it is &#8220;wrapped&#8221; in an <tag>html</tag> element &#8212; see the
-        note below) or markup in any arbitrary vocabulary,
-        including HTML &#8212; but it must conform to XML
-        well-formedness constraints (because the feature in XSLT
-        1.0 for opening external files, the
-        <function>document()</function> function, can only handle
-        files that meet XML well-formedness constraints).</para>
-      <para>Among other things, XML well-formedness constraints
-        require a document to have <emphasis>a single root
-          element</emphasis>. So if the content you want to
-        include is plain text or is markup that does
-        <emphasis>not</emphasis> have a single root element,
-        <emphasis role="strong">wrap the content in an
-          <tag>html</tag> element</emphasis>. The stylesheets will
-        strip out that surrounding <tag>html</tag> &#8220;wrapper&#8221; when
-        they find it, leaving just the content you want to
-        insert.</para>
-    </note>
-  </refdescription>
-  <refsynopsisdiv xmlns="http://www.w3.org/1999/xhtml">
-    <synopsis><tag class="xmlpi">dbhtml-include href="<replaceable>URI</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter xmlns="http://www.w3.org/1999/xhtml">
-    <variablelist>
-      <varlistentry><term>href="<replaceable>URI</replaceable>"</term>
-        <listitem>
-          <para>Specifies the URI for the file to include; the URI
-            can be, for example, a remote <literal>http:</literal>
-            URI, or a local filesystem <literal>file:</literal>
-            URI</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="params">
-    <para><parameter>textinsert.extension</parameter></para>
-  </refsee>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="tcg">
-    <para><link role="tcg" xlink:href="InsertExtHtml.html">Inserting external HTML code</link>,
-      <link xlink:href="ExternalCode.html">External code files</link></para>
-  </refsee>
-</doc:pi>
-<xsl:template name="pi.dbhtml-include">
-  <xsl:param name="href">
-    <xsl:call-template name="dbhtml-attribute">
-      <xsl:with-param name="pis" select="."/>
-      <xsl:with-param name="attribute">href</xsl:with-param>
-    </xsl:call-template>
-  </xsl:param>
-  <xsl:choose>
-    <xsl:when test="$href != ''">
-      <xsl:variable name="content" select="document($href,/)"/>
-      <xsl:choose>
-        <xsl:when test="$content/*">
-          <xsl:choose>
-            <xsl:when test="$content/*[1][self::html]">
-              <!-- include just the children of html wrapper -->
-              <xsl:copy-of select="$content/*[1]/node()"/>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:copy-of select="$content"/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:message>
-            <xsl:text>ERROR: dbhtml-include processing instruction </xsl:text>
-            <xsl:text>href has no content.</xsl:text>
-          </xsl:message>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:message>
-        <xsl:text>ERROR: dbhtml-include processing instruction has </xsl:text>
-        <xsl:text>missing or empty href value.</xsl:text>
-      </xsl:message>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="dbhtml-attribute">
-  <!-- * dbhtml-attribute is an interal utility template for retrieving -->
-  <!-- * pseudo-attributes/parameters from PIs -->
-  <xsl:param name="pis" select="processing-instruction('dbhtml')"/>
-  <xsl:param name="attribute">filename</xsl:param>
-  <xsl:call-template name="pi-attribute">
-    <xsl:with-param name="pis" select="$pis"/>
-    <xsl:with-param name="attribute" select="$attribute"/>
-  </xsl:call-template>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="processing-instruction()">
-</xsl:template>
-
-<xsl:template match="processing-instruction('dbhtml')">
-  <!-- nop -->
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="processing-instruction('dbcmdlist')">
-  <xsl:call-template name="pi.dbcmdlist"/>
-</xsl:template>
-<xsl:template name="process.cmdsynopsis.list">
-  <xsl:param name="cmdsynopses"/><!-- empty node list by default -->
-  <xsl:param name="count" select="1"/>
-
-  <xsl:choose>
-    <xsl:when test="$count&gt;count($cmdsynopses)"/>
-    <xsl:otherwise>
-      <xsl:variable name="cmdsyn" select="$cmdsynopses[$count]"/>
-
-       <dt>
-       <a>
-         <xsl:attribute name="href">
-           <xsl:text>#</xsl:text>
-           <xsl:call-template name="object.id">
-             <xsl:with-param name="object" select="$cmdsyn"/>
-           </xsl:call-template>
-         </xsl:attribute>
-
-         <xsl:choose>
-           <xsl:when test="$cmdsyn/@xreflabel">
-             <xsl:call-template name="xref.xreflabel">
-               <xsl:with-param name="target" select="$cmdsyn"/>
-             </xsl:call-template>
-           </xsl:when>
-           <xsl:otherwise>
-             <xsl:apply-templates select="$cmdsyn" mode="xref-to">
-               <xsl:with-param name="target" select="$cmdsyn"/>
-             </xsl:apply-templates>
-           </xsl:otherwise>
-         </xsl:choose>
-       </a>
-       </dt>
-
-        <xsl:call-template name="process.cmdsynopsis.list">
-          <xsl:with-param name="cmdsynopses" select="$cmdsynopses"/>
-          <xsl:with-param name="count" select="$count+1"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="processing-instruction('dbfunclist')">
-  <xsl:call-template name="pi.dbfunclist"/>
-</xsl:template>
-<xsl:template name="process.funcsynopsis.list">
-  <xsl:param name="funcsynopses"/><!-- empty node list by default -->
-  <xsl:param name="count" select="1"/>
-
-  <xsl:choose>
-    <xsl:when test="$count&gt;count($funcsynopses)"/>
-    <xsl:otherwise>
-      <xsl:variable name="cmdsyn" select="$funcsynopses[$count]"/>
-
-       <dt>
-       <a>
-         <xsl:attribute name="href">
-           <xsl:text>#</xsl:text>
-           <xsl:call-template name="object.id">
-             <xsl:with-param name="object" select="$cmdsyn"/>
-           </xsl:call-template>
-         </xsl:attribute>
-
-         <xsl:choose>
-           <xsl:when test="$cmdsyn/@xreflabel">
-             <xsl:call-template name="xref.xreflabel">
-               <xsl:with-param name="target" select="$cmdsyn"/>
-             </xsl:call-template>
-           </xsl:when>
-           <xsl:otherwise>
-              <xsl:apply-templates select="$cmdsyn" mode="xref-to">
-                <xsl:with-param name="target" select="$cmdsyn"/>
-              </xsl:apply-templates>
-           </xsl:otherwise>
-         </xsl:choose>
-       </a>
-       </dt>
-
-        <xsl:call-template name="process.funcsynopsis.list">
-          <xsl:with-param name="funcsynopses" select="$funcsynopses"/>
-          <xsl:with-param name="count" select="$count+1"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="processing-instruction('dbhtml-include')">
-  <xsl:call-template name="pi.dbhtml-include"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="dbhtml-dir">
-  <xsl:param name="context" select="."/>
-  <!-- directories are now inherited from previous levels -->
-  <xsl:variable name="ppath">
-    <xsl:if test="$context/parent::*">
-      <xsl:call-template name="dbhtml-dir">
-        <xsl:with-param name="context" select="$context/parent::*"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:variable>
-  <xsl:variable name="path">
-    <xsl:call-template name="pi.dbhtml_dir">
-      <xsl:with-param name="node" select="$context"/>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:choose>
-    <xsl:when test="$path = ''">
-      <xsl:if test="$ppath != ''">
-        <xsl:value-of select="$ppath"/>
-      </xsl:if>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:if test="$ppath != ''">
-        <xsl:value-of select="$ppath"/>
-        <xsl:if test="substring($ppath, string-length($ppath), 1) != '/'">
-          <xsl:text>/</xsl:text>
-        </xsl:if>
-      </xsl:if>
-      <xsl:value-of select="$path"/>
-      <xsl:text>/</xsl:text>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- There are two templates matching this PI in htmlhelp-common.xsl -->
-<doc:pi xmlns="" name="dbhh">
-  <refpurpose xmlns="http://www.w3.org/1999/xhtml">Sets topic name and topic id for context-sensitive HTML Help</refpurpose>
-  <refdescription xmlns="http://www.w3.org/1999/xhtml">
-    <para>Use the <tag class="xmlpi">dbhh</tag> PI as a child of components
-      that should be used as targets for context-sensitive help requests.</para>
-  </refdescription>
-  <refsynopsisdiv xmlns="http://www.w3.org/1999/xhtml">
-    <synopsis><tag class="xmlpi">dbhh topicname="<replaceable>name</replaceable>" topicid="<replaceable>id</replaceable>"</tag></synopsis>
-  </refsynopsisdiv>
-  <refparameter xmlns="http://www.w3.org/1999/xhtml">
-    <variablelist>
-      <varlistentry><term>topicname="<replaceable>name</replaceable>"</term>
-        <listitem>
-          <para>Specifies a unique string constant that identifies a help topic</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry><term>topicid="<replaceable>id</replaceable>"</term>
-        <listitem>
-          <para>Specifies a unique integer value for the <literal>topicname</literal> string</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refsee xmlns="http://www.w3.org/1999/xhtml" role="tcg">
-    <para><link role="tcg" xlink:href="HtmlHelp.html#HHContextHelp">Context-sensitive help</link></para>
-  </refsee>
-</doc:pi>
-
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/profile-chunk-code.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/profile-chunk-code.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,611 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<!--This file was created automatically by xsl2profile-->
-<!--from the DocBook XSL stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:cf="http://docbook.sourceforge.net/xmlns/chunkfast/1.0" xmlns:ng="http://docbook.org/docbook-ng" xmlns:db="http://docbook.org/ns/docbook" xmlns:exslt="http://exslt.org/common" xmlns="http://www.w3.org/1999/xhtml" exslt:dummy="dummy" ng:dummy="dummy" db:dummy="dummy" extension-element-prefixes="exslt" exclude-result-prefixes="exsl cf ng db exslt" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-
-<xsl:template match="*" mode="chunk-filename">
-  <!-- returns the filename of a chunk -->
-  <xsl:variable name="ischunk">
-    <xsl:call-template name="chunk"/>
-  </xsl:variable>
-
-  <xsl:variable name="fn">
-    <xsl:apply-templates select="." mode="recursive-chunk-filename"/>
-  </xsl:variable>
-
-  <!--
-  <xsl:message>
-    <xsl:value-of select="$ischunk"/>
-    <xsl:text> (</xsl:text>
-    <xsl:value-of select="local-name(.)"/>
-    <xsl:text>) </xsl:text>
-    <xsl:value-of select="$fn"/>
-    <xsl:text>, </xsl:text>
-    <xsl:call-template name="dbhtml-dir"/>
-  </xsl:message>
-  -->
-
-  <!-- 2003-11-25 by ndw:
-       The following test used to read test="$ischunk != 0 and $fn != ''"
-       I've removed the ischunk part of the test so that href.to.uri and
-       href.from.uri will be fully qualified even if the source or target
-       isn't a chunk. I *think* that if $fn != '' then it's appropriate
-       to put the directory on the front, even if the element isn't a
-       chunk. I could be wrong. -->
-
-  <xsl:if test="$fn != ''">
-    <xsl:call-template name="dbhtml-dir"/>
-  </xsl:if>
-
-  <xsl:value-of select="$fn"/>
-  <!-- You can't add the html.ext here because dbhtml filename= may already -->
-  <!-- have added it. It really does have to be handled in the recursive template -->
-</xsl:template>
-
-<xsl:template match="*" mode="recursive-chunk-filename">
-  <xsl:param name="recursive" select="false()"/>
-
-  <!-- returns the filename of a chunk -->
-  <xsl:variable name="ischunk">
-    <xsl:call-template name="chunk"/>
-  </xsl:variable>
-
-  <xsl:variable name="dbhtml-filename">
-    <xsl:call-template name="pi.dbhtml_filename"/>
-  </xsl:variable>
-
-  <xsl:variable name="filename">
-    <xsl:choose>
-      <xsl:when test="$dbhtml-filename != ''">
-        <xsl:value-of select="$dbhtml-filename"/>
-      </xsl:when>
-      <!-- if this is the root element, use the root.filename -->
-      <xsl:when test="not(parent::*) and $root.filename != ''">
-        <xsl:value-of select="$root.filename"/>
-        <xsl:value-of select="$html.ext"/>
-      </xsl:when>
-      <!-- Special case -->
-      <xsl:when test="self::legalnotice and not($generate.legalnotice.link = 0)">
-        <xsl:choose>
-          <xsl:when test="(@id or @xml:id) and not($use.id.as.filename = 0)">
-            <!-- * if this legalnotice has an ID, then go ahead and use -->
-            <!-- * just the value of that ID as the basename for the file -->
-            <!-- * (that is, without prepending an "ln-" too it) -->
-            <xsl:value-of select="(@id|@xml:id)[1]"/>
-            <xsl:value-of select="$html.ext"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <!-- * otherwise, if this legalnotice does not have an ID, -->
-            <!-- * then we generate an ID... -->
-            <xsl:variable name="id">
-              <xsl:call-template name="object.id"/>
-            </xsl:variable>
-            <!-- * ...and then we take that generated ID, prepend an -->
-            <!-- * "ln-" to it, and use that as the basename for the file -->
-            <xsl:value-of select="concat('ln-',$id,$html.ext)"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:when>
-      <!-- if there's no dbhtml filename, and if we're to use IDs as -->
-      <!-- filenames, then use the ID to generate the filename. -->
-      <xsl:when test="(@id or @xml:id) and $use.id.as.filename != 0">
-        <xsl:value-of select="(@id|@xml:id)[1]"/>
-        <xsl:value-of select="$html.ext"/>
-      </xsl:when>
-      <xsl:otherwise/>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$ischunk='0'">
-      <!-- if called on something that isn't a chunk, walk up... -->
-      <xsl:choose>
-        <xsl:when test="count(parent::*)&gt;0">
-          <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
-            <xsl:with-param name="recursive" select="$recursive"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <!-- unless there is no up, in which case return "" -->
-        <xsl:otherwise/>
-      </xsl:choose>
-    </xsl:when>
-
-    <xsl:when test="not($recursive) and $filename != ''">
-      <!-- if this chunk has an explicit name, use it -->
-      <xsl:value-of select="$filename"/>
-    </xsl:when>
-
-    <xsl:when test="self::set">
-      <xsl:value-of select="$root.filename"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:when>
-
-    <xsl:when test="self::book">
-      <xsl:text>bk</xsl:text>
-      <xsl:number level="any" format="01"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:when>
-
-    <xsl:when test="self::article">
-      <xsl:if test="/set">
-        <!-- in a set, make sure we inherit the right book info... -->
-        <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
-          <xsl:with-param name="recursive" select="true()"/>
-        </xsl:apply-templates>
-      </xsl:if>
-
-      <xsl:text>ar</xsl:text>
-      <xsl:number level="any" format="01" from="book"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:when>
-
-    <xsl:when test="self::preface">
-      <xsl:if test="/set">
-        <!-- in a set, make sure we inherit the right book info... -->
-        <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
-          <xsl:with-param name="recursive" select="true()"/>
-        </xsl:apply-templates>
-      </xsl:if>
-
-      <xsl:text>pr</xsl:text>
-      <xsl:number level="any" format="01" from="book"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:when>
-
-    <xsl:when test="self::chapter">
-      <xsl:if test="/set">
-        <!-- in a set, make sure we inherit the right book info... -->
-        <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
-          <xsl:with-param name="recursive" select="true()"/>
-        </xsl:apply-templates>
-      </xsl:if>
-
-      <xsl:text>ch</xsl:text>
-      <xsl:number level="any" format="01" from="book"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:when>
-
-    <xsl:when test="self::appendix">
-      <xsl:if test="/set">
-        <!-- in a set, make sure we inherit the right book info... -->
-        <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
-          <xsl:with-param name="recursive" select="true()"/>
-        </xsl:apply-templates>
-      </xsl:if>
-
-      <xsl:text>ap</xsl:text>
-      <xsl:number level="any" format="a" from="book"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:when>
-
-    <xsl:when test="self::part">
-      <xsl:choose>
-        <xsl:when test="/set">
-          <!-- in a set, make sure we inherit the right book info... -->
-          <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
-            <xsl:with-param name="recursive" select="true()"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-        </xsl:otherwise>
-      </xsl:choose>
-
-      <xsl:text>pt</xsl:text>
-      <xsl:number level="any" format="01" from="book"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:when>
-
-    <xsl:when test="self::reference">
-      <xsl:choose>
-        <xsl:when test="/set">
-          <!-- in a set, make sure we inherit the right book info... -->
-          <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
-            <xsl:with-param name="recursive" select="true()"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-        </xsl:otherwise>
-      </xsl:choose>
-
-      <xsl:text>rn</xsl:text>
-      <xsl:number level="any" format="01" from="book"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:when>
-
-    <xsl:when test="self::refentry">
-      <xsl:choose>
-        <xsl:when test="parent::reference">
-          <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
-            <xsl:with-param name="recursive" select="true()"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-        </xsl:otherwise>
-      </xsl:choose>
-
-      <xsl:text>re</xsl:text>
-      <xsl:number level="any" format="01" from="book"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:when>
-
-    <xsl:when test="self::colophon">
-      <xsl:choose>
-        <xsl:when test="/set">
-          <!-- in a set, make sure we inherit the right book info... -->
-          <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
-            <xsl:with-param name="recursive" select="true()"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-        </xsl:otherwise>
-      </xsl:choose>
-
-      <xsl:text>co</xsl:text>
-      <xsl:number level="any" format="01" from="book"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:when>
-
-    <xsl:when test="self::sect1                     or self::sect2                     or self::sect3                     or self::sect4                     or self::sect5                     or self::section">
-      <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
-        <xsl:with-param name="recursive" select="true()"/>
-      </xsl:apply-templates>
-      <xsl:text>s</xsl:text>
-      <xsl:number format="01"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:when>
-
-    <xsl:when test="self::bibliography">
-      <xsl:choose>
-        <xsl:when test="/set">
-          <!-- in a set, make sure we inherit the right book info... -->
-          <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
-            <xsl:with-param name="recursive" select="true()"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-        </xsl:otherwise>
-      </xsl:choose>
-
-      <xsl:text>bi</xsl:text>
-      <xsl:number level="any" format="01" from="book"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:when>
-
-    <xsl:when test="self::glossary">
-      <xsl:choose>
-        <xsl:when test="/set">
-          <!-- in a set, make sure we inherit the right book info... -->
-          <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
-            <xsl:with-param name="recursive" select="true()"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-        </xsl:otherwise>
-      </xsl:choose>
-
-      <xsl:text>go</xsl:text>
-      <xsl:number level="any" format="01" from="book"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:when>
-
-    <xsl:when test="self::index">
-      <xsl:choose>
-        <xsl:when test="/set">
-          <!-- in a set, make sure we inherit the right book info... -->
-          <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
-            <xsl:with-param name="recursive" select="true()"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-        </xsl:otherwise>
-      </xsl:choose>
-
-      <xsl:text>ix</xsl:text>
-      <xsl:number level="any" format="01" from="book"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:when>
-
-    <xsl:when test="self::setindex">
-      <xsl:text>si</xsl:text>
-      <xsl:number level="any" format="01" from="set"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:when>
-
-    <xsl:otherwise>
-      <xsl:text>chunk-filename-error-</xsl:text>
-      <xsl:value-of select="name(.)"/>
-      <xsl:number level="any" format="01" from="set"/>
-      <xsl:if test="not($recursive)">
-        <xsl:value-of select="$html.ext"/>
-      </xsl:if>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-
-
-<xsl:template match="processing-instruction('dbhtml')">
-  <!-- nop -->
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-
-<xsl:template match="*" mode="find.chunks">
-  <xsl:variable name="chunk">
-    <xsl:call-template name="chunk"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$chunk != 0">
-      <cf:div id="{generate-id()}">
-        <xsl:apply-templates select="." mode="class.attribute"/>
-        <xsl:apply-templates select="*" mode="find.chunks"/>
-      </cf:div>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates select="*" mode="find.chunks"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xslo:include xmlns:xslo="http://www.w3.org/1999/XSL/Transform" href="../profiling/profile-mode.xsl"/><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-content"><xslo:choose><xslo:when test="*/self::ng:* or */self::db:*"><xslo:message>Note: namesp. cut : stripped namespace before processing</xslo:message><xslo:variable name="stripped-content"><xslo:apply-templates select="/" mode="stripNS"/></xslo:variable><xslo:message>Note: namesp. cut : processing stripped document</xslo:message><xslo:apply-templates select="exslt:node-set($stripped-content)" mode="profile"/></xslo:when><xslo:otherwise><xslo:apply-templates select="/" mode="profile"/></xslo:otherwise></xslo:choose></xslo:variable><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-nodes" select="exslt:node-set($profiled-content)"/><xsl:template match="/">
-  <!-- * Get a title for current doc so that we let the user -->
-  <!-- * know what document we are processing at this point. -->
-  <xsl:variable name="doc.title">
-    <xsl:call-template name="get.doc.title"/>
-  </xsl:variable>
-  <xsl:choose>
-    <!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document,
-         toss the namespace and continue.  Use the docbook5 namespaced
-	 stylesheets for DocBook5 if you don't want to use this feature.-->
-    <!-- include extra test for Xalan quirk -->
-    <xsl:when test="false()"/>
-    <!-- Can't process unless namespace removed -->
-    <xsl:when test="false()"/>
-    <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="$rootid != ''">
-          <xsl:choose>
-            <xsl:when test="count($profiled-nodes//*[@id=$rootid]) = 0">
-              <xsl:message terminate="yes">
-                <xsl:text>ID '</xsl:text>
-                <xsl:value-of select="$rootid"/>
-                <xsl:text>' not found in document.</xsl:text>
-              </xsl:message>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:if test="$collect.xref.targets = 'yes' or                             $collect.xref.targets = 'only'">
-                <xsl:apply-templates select="key('id', $rootid)" mode="collect.targets"/>
-              </xsl:if>
-              <xsl:if test="$collect.xref.targets != 'only'">
-                <xsl:apply-templates select="$profiled-nodes//*[@id=$rootid]" mode="process.root"/>
-                <xsl:if test="$tex.math.in.alt != ''">
-                  <xsl:apply-templates select="$profiled-nodes//*[@id=$rootid]" mode="collect.tex.math"/>
-                </xsl:if>
-                <xsl:if test="$generate.manifest != 0">
-                  <xsl:call-template name="generate.manifest">
-                    <xsl:with-param name="node" select="key('id',$rootid)"/>
-                  </xsl:call-template>
-                </xsl:if>
-              </xsl:if>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:if test="$collect.xref.targets = 'yes' or                         $collect.xref.targets = 'only'">
-            <xsl:apply-templates select="$profiled-nodes" mode="collect.targets"/>
-          </xsl:if>
-          <xsl:if test="$collect.xref.targets != 'only'">
-            <xsl:apply-templates select="$profiled-nodes" mode="process.root"/>
-            <xsl:if test="$tex.math.in.alt != ''">
-              <xsl:apply-templates select="$profiled-nodes" mode="collect.tex.math"/>
-            </xsl:if>
-            <xsl:if test="$generate.manifest != 0">
-              <xsl:call-template name="generate.manifest">
-                <xsl:with-param name="node" select="$profiled-nodes"/>
-              </xsl:call-template>
-            </xsl:if>
-          </xsl:if>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="*" mode="process.root">
-  <xsl:apply-templates select="."/>
-</xsl:template>
-
-<!-- ====================================================================== -->
-
-<xsl:template match="set|book|part|preface|chapter|appendix                      |article                      |reference|refentry                      |book/glossary|article/glossary|part/glossary                      |book/bibliography|article/bibliography|part/bibliography                      |colophon">
-  <xsl:choose>
-    <xsl:when test="$onechunk != 0 and parent::*">
-      <xsl:apply-imports/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="process-chunk-element"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="sect1|sect2|sect3|sect4|sect5|section">
-  <xsl:variable name="ischunk">
-    <xsl:call-template name="chunk"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="not(parent::*)">
-      <xsl:call-template name="process-chunk-element"/>
-    </xsl:when>
-    <xsl:when test="$ischunk = 0">
-      <xsl:apply-imports/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="process-chunk-element"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="setindex                      |book/index                      |article/index                      |part/index">
-  <!-- some implementations use completely empty index tags to indicate -->
-  <!-- where an automatically generated index should be inserted. so -->
-  <!-- if the index is completely empty, skip it. -->
-  <xsl:if test="count(*)&gt;0 or $generate.index != '0'">
-    <xsl:call-template name="process-chunk-element"/>
-  </xsl:if>
-</xsl:template>
-
-<!-- Resolve xml:base attributes -->
-<xsl:template match="@fileref">
-  <!-- need a check for absolute urls -->
-  <xsl:choose>
-    <xsl:when test="contains(., ':')">
-      <!-- it has a uri scheme so it is an absolute uri -->
-      <xsl:value-of select="."/>
-    </xsl:when>
-    <xsl:when test="$keep.relative.image.uris != 0">
-      <!-- leave it alone -->
-      <xsl:value-of select="."/>
-    </xsl:when>
-    <xsl:otherwise>
-      <!-- its a relative uri -->
-      <xsl:call-template name="relative-uri">
-        <xsl:with-param name="destdir">
-          <xsl:call-template name="dbhtml-dir">
-            <xsl:with-param name="context" select=".."/>
-          </xsl:call-template>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-<xsl:template match="set|book|part|preface|chapter|appendix                      |article                      |reference|refentry                      |sect1|sect2|sect3|sect4|sect5                      |section                      |book/glossary|article/glossary|part/glossary                      |book/bibliography|article/bibliography|part/bibliography                      |colophon" mode="enumerate-files">
-  <xsl:variable name="ischunk"><xsl:call-template name="chunk"/></xsl:variable>
-  <xsl:if test="$ischunk='1'">
-    <xsl:call-template name="make-relative-filename">
-      <xsl:with-param name="base.dir">
-        <xsl:if test="$manifest.in.base.dir = 0">
-          <xsl:value-of select="$base.dir"/>
-        </xsl:if>
-      </xsl:with-param>
-      <xsl:with-param name="base.name">
-        <xsl:apply-templates mode="chunk-filename" select="."/>
-      </xsl:with-param>
-    </xsl:call-template>
-    <xsl:text>
-</xsl:text>
-  </xsl:if>
-  <xsl:apply-templates select="*" mode="enumerate-files"/>
-</xsl:template>
-
-<xsl:template match="book/index|article/index|part/index" mode="enumerate-files">
-  <xsl:if test="$htmlhelp.output != 1">
-    <xsl:variable name="ischunk"><xsl:call-template name="chunk"/></xsl:variable>
-    <xsl:if test="$ischunk='1'">
-      <xsl:call-template name="make-relative-filename">
-        <xsl:with-param name="base.dir">
-          <xsl:if test="$manifest.in.base.dir = 0">
-            <xsl:value-of select="$base.dir"/>
-          </xsl:if>
-        </xsl:with-param>
-        <xsl:with-param name="base.name">
-          <xsl:apply-templates mode="chunk-filename" select="."/>
-        </xsl:with-param>
-      </xsl:call-template>
-      <xsl:text>
-</xsl:text>
-    </xsl:if>
-    <xsl:apply-templates select="*" mode="enumerate-files"/>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="enumerate-files">
-  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
-  <xsl:if test="$generate.legalnotice.link != 0">
-    <xsl:call-template name="make-relative-filename">
-      <xsl:with-param name="base.dir">
-        <xsl:if test="$manifest.in.base.dir = 0">
-          <xsl:value-of select="$base.dir"/>
-        </xsl:if>
-      </xsl:with-param>
-      <xsl:with-param name="base.name">
-        <xsl:apply-templates mode="chunk-filename" select="."/>
-      </xsl:with-param>
-    </xsl:call-template>
-    <xsl:text>
-</xsl:text>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="mediaobject[imageobject] | inlinemediaobject[imageobject]" mode="enumerate-files">
-  <xsl:variable name="longdesc.uri">
-    <xsl:call-template name="longdesc.uri">
-      <xsl:with-param name="mediaobject" select="."/>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:variable name="mediaobject" select="."/>
-
-  <xsl:if test="$html.longdesc != 0 and $mediaobject/textobject[not(phrase)]">
-    <xsl:call-template name="longdesc.uri">
-      <xsl:with-param name="mediaobject" select="$mediaobject"/>
-    </xsl:call-template>
-    <xsl:text>
-</xsl:text>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="text()" mode="enumerate-files">
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/profile-chunk.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/profile-chunk.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,52 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="exsl">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<!-- First import the non-chunking templates that format elements
-     within each chunk file. In a customization, you should
-     create a separate non-chunking customization layer such
-     as mydocbook.xsl that imports the original docbook.xsl and
-     customizes any presentation templates. Then your chunking
-     customization should import mydocbook.xsl instead of
-     docbook.xsl.  -->
-<xsl:import href="docbook.xsl"/>
-
-<!-- chunk-common.xsl contains all the named templates for chunking.
-     In a customization file, you import chunk-common.xsl, then
-     add any customized chunking templates of the same name. 
-     They will have import precedence over the original 
-     chunking templates in chunk-common.xsl. -->
-<xsl:import href="chunk-common.xsl"/>
-
-<!-- The manifest.xsl module is no longer imported because its
-     templates were moved into chunk-common and chunk-code -->
-
-<!-- chunk-code.xsl contains all the chunking templates that use
-     a match attribute.  In a customization it should be referenced
-     using <xsl:include> instead of <xsl:import>, and then add
-     any customized chunking templates with match attributes. But be sure
-     to add a priority="1" to such customized templates to resolve
-     its conflict with the original, since they have the
-     same import precedence.
-     
-     Using xsl:include prevents adding another layer
-     of import precedence, which would cause any
-     customizations that use xsl:apply-imports to wrongly
-     apply the chunking version instead of the original
-     non-chunking version to format an element.  -->
-<xsl:include href="profile-chunk-code.xsl"/>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/profile-docbook.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/profile-docbook.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,409 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<!--This file was created automatically by xsl2profile-->
-<!--from the DocBook XSL stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ng="http://docbook.org/docbook-ng" xmlns:db="http://docbook.org/ns/docbook" xmlns:exsl="http://exslt.org/common" xmlns:exslt="http://exslt.org/common" xmlns="http://www.w3.org/1999/xhtml" exslt:dummy="dummy" ng:dummy="dummy" db:dummy="dummy" extension-element-prefixes="exslt" exclude-result-prefixes="db ng exsl exslt" version="1.0">
-
-<xsl:output method="xml" encoding="UTF-8" indent="no" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:include href="../VERSION"/>
-<xsl:include href="param.xsl"/>
-<xsl:include href="../lib/lib.xsl"/>
-<xsl:include href="../common/l10n.xsl"/>
-<xsl:include href="../common/common.xsl"/>
-<xsl:include href="../common/utility.xsl"/>
-<xsl:include href="../common/labels.xsl"/>
-<xsl:include href="../common/titles.xsl"/>
-<xsl:include href="../common/subtitles.xsl"/>
-<xsl:include href="../common/gentext.xsl"/>
-<xsl:include href="../common/targets.xsl"/>
-<xsl:include href="../common/olink.xsl"/>
-<xsl:include href="../common/pi.xsl"/>
-<xsl:include href="autotoc.xsl"/>
-<xsl:include href="autoidx.xsl"/>
-<xsl:include href="lists.xsl"/>
-<xsl:include href="callout.xsl"/>
-<xsl:include href="verbatim.xsl"/>
-<xsl:include href="graphics.xsl"/>
-<xsl:include href="xref.xsl"/>
-<xsl:include href="formal.xsl"/>
-<xsl:include href="table.xsl"/>
-<xsl:include href="htmltbl.xsl"/>
-<xsl:include href="sections.xsl"/>
-<xsl:include href="inline.xsl"/>
-<xsl:include href="footnote.xsl"/>
-<xsl:include href="html.xsl"/>
-<xsl:include href="info.xsl"/>
-<xsl:include href="keywords.xsl"/>
-<xsl:include href="division.xsl"/>
-<xsl:include href="toc.xsl"/>
-<xsl:include href="index.xsl"/>
-<xsl:include href="refentry.xsl"/>
-<xsl:include href="math.xsl"/>
-<xsl:include href="admon.xsl"/>
-<xsl:include href="component.xsl"/>
-<xsl:include href="biblio.xsl"/>
-<xsl:include href="biblio-iso690.xsl"/>
-<xsl:include href="glossary.xsl"/>
-<xsl:include href="block.xsl"/>
-<xsl:include href="task.xsl"/>
-<xsl:include href="qandaset.xsl"/>
-<xsl:include href="synop.xsl"/>
-<xsl:include href="titlepage.xsl"/>
-<xsl:include href="titlepage.templates.xsl"/>
-<xsl:include href="pi.xsl"/>
-<xsl:include href="ebnf.xsl"/>
-<xsl:include href="chunker.xsl"/>
-<xsl:include href="html-rtf.xsl"/>
-<xsl:include href="annotations.xsl"/>
-<xsl:include href="../common/stripns.xsl"/>
-
-<xsl:param name="stylesheet.result.type" select="'xhtml'"/>
-<xsl:param name="htmlhelp.output" select="0"/>
-
-<!-- ==================================================================== -->
-
-<xsl:key name="id" match="*" use="@id|@xml:id"/>
-<xsl:key name="gid" match="*" use="generate-id()"/>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="*">
-  <xsl:message>
-    <xsl:text>Element </xsl:text>
-    <xsl:value-of select="local-name(.)"/>
-    <xsl:text> in namespace '</xsl:text>
-    <xsl:value-of select="namespace-uri(.)"/>
-    <xsl:text>' encountered</xsl:text>
-    <xsl:if test="parent::*">
-      <xsl:text> in </xsl:text>
-      <xsl:value-of select="name(parent::*)"/>
-    </xsl:if>
-    <xsl:text>, but no template matches.</xsl:text>
-  </xsl:message>
-
-  <span style="color: red">
-    <xsl:text>&lt;</xsl:text>
-    <xsl:value-of select="name(.)"/>
-    <xsl:text>&gt;</xsl:text>
-    <xsl:apply-templates/>
-    <xsl:text>&lt;/</xsl:text>
-    <xsl:value-of select="name(.)"/>
-    <xsl:text>&gt;</xsl:text>
-  </span>
-</xsl:template>
-
-<xsl:template match="text()">
-  <xsl:value-of select="."/>
-</xsl:template>
-
-<xsl:template name="body.attributes">
-<!-- no apply-templates; make it empty -->
-</xsl:template>
-
-<xsl:template name="head.content">
-  <xsl:param name="node" select="."/>
-  <xsl:param name="title">
-    <xsl:apply-templates select="$node" mode="object.title.markup.textonly"/>
-  </xsl:param>
-
-  <title>
-    <xsl:copy-of select="$title"/>
-  </title>
-
-  <xsl:if test="$html.stylesheet != ''">
-    <xsl:call-template name="output.html.stylesheets">
-      <xsl:with-param name="stylesheets" select="normalize-space($html.stylesheet)"/>
-    </xsl:call-template>
-  </xsl:if>
-
-  <xsl:if test="$link.mailto.url != ''">
-    <link rev="made" href="{$link.mailto.url}"/>
-  </xsl:if>
-
-  <xsl:if test="$html.base != ''">
-    <base href="{$html.base}"/>
-  </xsl:if>
-
-  <meta name="generator" content="DocBook {$DistroTitle} V{$VERSION}"/>
-
-  <xsl:if test="$generate.meta.abstract != 0">
-    <xsl:variable name="info" select="(articleinfo                                       |bookinfo                                       |prefaceinfo                                       |chapterinfo                                       |appendixinfo                                       |sectioninfo                                       |sect1info                                       |sect2info                                       |sect3info                                       |sect4info                                       |sect5info                                       |referenceinfo                                       |refentryinfo                                       |partinfo                                       |info                                       |docinfo)[1]"/>
-    <xsl:if test="$info and $info/abstract">
-      <meta name="description">
-        <xsl:attribute name="content">
-          <xsl:for-each select="$info/abstract[1]/*">
-            <xsl:value-of select="normalize-space(.)"/>
-            <xsl:if test="position() &lt; last()">
-              <xsl:text> </xsl:text>
-            </xsl:if>
-          </xsl:for-each>
-        </xsl:attribute>
-      </meta>
-    </xsl:if>
-  </xsl:if>
-
-  <xsl:if test="($draft.mode = 'yes' or                 ($draft.mode = 'maybe' and                 ancestor-or-self::*[@status][1]/@status = 'draft'))                 and $draft.watermark.image != ''">
-    <style type="text/css"><xsl:text>
-body { background-image: url('</xsl:text>
-<xsl:value-of select="$draft.watermark.image"/><xsl:text>');
-       background-repeat: no-repeat;
-       background-position: top left;
-       /* The following properties make the watermark "fixed" on the page. */
-       /* I think that's just a bit too distracting for the reader... */
-       /* background-attachment: fixed; */
-       /* background-position: center center; */
-     }</xsl:text>
-    </style>
-  </xsl:if>
-  <xsl:apply-templates select="." mode="head.keywords.content"/>
-</xsl:template>
-
-<xsl:template name="output.html.stylesheets">
-  <xsl:param name="stylesheets" select="''"/>
-
-  <xsl:choose>
-    <xsl:when test="contains($stylesheets, ' ')">
-      <link rel="stylesheet" href="{substring-before($stylesheets, ' ')}">
-        <xsl:if test="$html.stylesheet.type != ''">
-          <xsl:attribute name="type">
-            <xsl:value-of select="$html.stylesheet.type"/>
-          </xsl:attribute>
-        </xsl:if>
-      </link>
-      <xsl:call-template name="output.html.stylesheets">
-        <xsl:with-param name="stylesheets" select="substring-after($stylesheets, ' ')"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="$stylesheets != ''">
-      <link rel="stylesheet" href="{$stylesheets}">
-        <xsl:if test="$html.stylesheet.type != ''">
-          <xsl:attribute name="type">
-            <xsl:value-of select="$html.stylesheet.type"/>
-          </xsl:attribute>
-        </xsl:if>
-      </link>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ============================================================ -->
-
-<xsl:template match="*" mode="head.keywords.content">
-  <xsl:apply-templates select="chapterinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="appendixinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="prefaceinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="bookinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="setinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="articleinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="artheader/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="sect1info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="sect2info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="sect3info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="sect4info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="sect5info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="sectioninfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="refsect1info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="refsect2info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="refsect3info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="bibliographyinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="glossaryinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="indexinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="refentryinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="partinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="referenceinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="docinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="info/keywordset" mode="html.header"/>
-
-  <xsl:if test="$inherit.keywords != 0                 and parent::*">
-    <xsl:apply-templates select="parent::*" mode="head.keywords.content"/>
-  </xsl:if>
-</xsl:template>
-
-<!-- ============================================================ -->
-
-<xsl:template name="system.head.content">
-  <xsl:param name="node" select="."/>
-
-  <!-- FIXME: When chunking, only the annotations actually used
-              in this chunk should be referenced. I don't think it
-              does any harm to reference them all, but it adds
-              unnecessary bloat to each chunk. -->
-  <xsl:if test="$annotation.support != 0 and //annotation">
-    <xsl:call-template name="add.annotation.links"/>
-    <script type="text/javascript">
-      <xsl:text>
-// Create PopupWindow objects</xsl:text>
-      <xsl:for-each select="//annotation">
-        <xsl:text>
-var popup_</xsl:text>
-        <xsl:value-of select="generate-id(.)"/>
-        <xsl:text> = new PopupWindow("popup-</xsl:text>
-        <xsl:value-of select="generate-id(.)"/>
-        <xsl:text>");
-</xsl:text>
-        <xsl:text>popup_</xsl:text>
-        <xsl:value-of select="generate-id(.)"/>
-        <xsl:text>.offsetY = 15;
-</xsl:text>
-        <xsl:text>popup_</xsl:text>
-        <xsl:value-of select="generate-id(.)"/>
-        <xsl:text>.autoHide();
-</xsl:text>
-      </xsl:for-each>
-    </script>
-
-    <style type="text/css">
-      <xsl:value-of select="$annotation.css"/>
-    </style>
-  </xsl:if>
-
-  <!-- system.head.content is like user.head.content, except that
-       it is called before head.content. This is important because it
-       means, for example, that <style> elements output by system.head.content
-       have a lower CSS precedence than the users stylesheet. -->
-</xsl:template>
-
-<!-- ============================================================ -->
-
-<xsl:template name="user.preroot">
-  <!-- Pre-root output, can be used to output comments and PIs. -->
-  <!-- This must not output any element content! -->
-</xsl:template>
-
-<xsl:template name="user.head.content">
-  <xsl:param name="node" select="."/>
-</xsl:template>
-
-<xsl:template name="user.header.navigation">
-  <xsl:param name="node" select="."/>
-</xsl:template>
-
-<xsl:template name="user.header.content">
-  <xsl:param name="node" select="."/>
-</xsl:template>
-
-<xsl:template name="user.footer.content">
-  <xsl:param name="node" select="."/>
-</xsl:template>
-
-<xsl:template name="user.footer.navigation">
-  <xsl:param name="node" select="."/>
-</xsl:template>
-
-<xslo:include xmlns:xslo="http://www.w3.org/1999/XSL/Transform" href="../profiling/profile-mode.xsl"/><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-content"><xslo:choose><xslo:when test="*/self::ng:* or */self::db:*"><xslo:message>Note: namesp. cut : stripped namespace before processing</xslo:message><xslo:variable name="stripped-content"><xslo:apply-templates select="/" mode="stripNS"/></xslo:variable><xslo:message>Note: namesp. cut : processing stripped document</xslo:message><xslo:apply-templates select="exslt:node-set($stripped-content)" mode="profile"/></xslo:when><xslo:otherwise><xslo:apply-templates select="/" mode="profile"/></xslo:otherwise></xslo:choose></xslo:variable><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-nodes" select="exslt:node-set($profiled-content)"/><xsl:template match="/">
-  <!-- * Get a title for current doc so that we let the user -->
-  <!-- * know what document we are processing at this point. -->
-  <xsl:variable name="doc.title">
-    <xsl:call-template name="get.doc.title"/>
-  </xsl:variable>
-  <xsl:choose>
-    <!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document,
-         toss the namespace and continue.  Use the docbook5 namespaced
-         stylesheets for DocBook5 if you don't want to use this feature.-->
-    <!-- include extra test for Xalan quirk -->
-    <xsl:when test="false()"/>
-    <!-- Can't process unless namespace removed -->
-    <xsl:when test="false()"/>
-    <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="$rootid != ''">
-          <xsl:choose>
-            <xsl:when test="count($profiled-nodes//*[@id=$rootid]) = 0">
-              <xsl:message terminate="yes">
-                <xsl:text>ID '</xsl:text>
-                <xsl:value-of select="$rootid"/>
-                <xsl:text>' not found in document.</xsl:text>
-              </xsl:message>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:if test="$collect.xref.targets = 'yes' or                             $collect.xref.targets = 'only'">
-                <xsl:apply-templates select="key('id', $rootid)" mode="collect.targets"/>
-              </xsl:if>
-              <xsl:if test="$collect.xref.targets != 'only'">
-                <xsl:apply-templates select="$profiled-nodes//*[@id=$rootid]" mode="process.root"/>
-                <xsl:if test="$tex.math.in.alt != ''">
-                  <xsl:apply-templates select="$profiled-nodes//*[@id=$rootid]" mode="collect.tex.math"/>
-                </xsl:if>
-              </xsl:if>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:if test="$collect.xref.targets = 'yes' or                         $collect.xref.targets = 'only'">
-            <xsl:apply-templates select="$profiled-nodes" mode="collect.targets"/>
-          </xsl:if>
-          <xsl:if test="$collect.xref.targets != 'only'">
-            <xsl:apply-templates select="$profiled-nodes" mode="process.root"/>
-            <xsl:if test="$tex.math.in.alt != ''">
-              <xsl:apply-templates select="$profiled-nodes" mode="collect.tex.math"/>
-            </xsl:if>
-          </xsl:if>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="*" mode="process.root">
-  <xsl:variable name="doc" select="self::*"/>
-
-  <xsl:call-template name="user.preroot"/>
-  <xsl:call-template name="root.messages"/>
-
-  <html>
-    <head>
-      <xsl:call-template name="system.head.content">
-        <xsl:with-param name="node" select="$doc"/>
-      </xsl:call-template>
-      <xsl:call-template name="head.content">
-        <xsl:with-param name="node" select="$doc"/>
-      </xsl:call-template>
-      <xsl:call-template name="user.head.content">
-        <xsl:with-param name="node" select="$doc"/>
-      </xsl:call-template>
-    </head>
-    <body>
-      <xsl:call-template name="body.attributes"/>
-      <xsl:call-template name="user.header.content">
-        <xsl:with-param name="node" select="$doc"/>
-      </xsl:call-template>
-      <xsl:apply-templates select="."/>
-      <xsl:call-template name="user.footer.content">
-        <xsl:with-param name="node" select="$doc"/>
-      </xsl:call-template>
-    </body>
-  </html>
-  <xsl:value-of select="$html.append"/>
-</xsl:template>
-
-<xsl:template name="root.messages">
-  <!-- redefine this any way you'd like to output messages -->
-  <!-- DO NOT OUTPUT ANYTHING FROM THIS TEMPLATE -->
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="chunk">
-  <xsl:param name="node" select="."/>
-
-  <!-- The default is that we are not chunking... -->
-  <xsl:text>0</xsl:text>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/profile-onechunk.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/profile-onechunk.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,36 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="doc">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:import href="profile-chunk.xsl"/>
-
-<!-- Ok, using the onechunk parameter makes this all work again. -->
-<!-- It does have the disadvantage that it only works for documents that have -->
-<!-- a root element that is considered a chunk by the chunk.xsl stylesheet. -->
-<!-- Ideally, onechunk would let anything be a chunk. But not today. -->
-
-<xsl:param name="onechunk" select="1"/>
-<xsl:param name="suppress.navigation">1</xsl:param>
-
-<xsl:template name="href.target.uri">
-  <xsl:param name="object" select="."/>
-  <xsl:text>#</xsl:text>
-  <xsl:call-template name="object.id">
-    <xsl:with-param name="object" select="$object"/>
-  </xsl:call-template>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/qandaset.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/qandaset.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,371 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="doc" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:template match="qandaset">
-  <xsl:variable name="title" select="(blockinfo/title|info/title|title)[1]"/>
-  <xsl:variable name="preamble" select="*[local-name(.) != 'title'                                           and local-name(.) != 'titleabbrev'                                           and local-name(.) != 'qandadiv'                                           and local-name(.) != 'qandaentry']"/>
-  <xsl:variable name="toc">
-    <xsl:call-template name="pi.dbhtml_toc"/>
-  </xsl:variable>
-
-  <xsl:variable name="toc.params">
-    <xsl:call-template name="find.path.params">
-      <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates select="$title"/>
-    <xsl:if test="((contains($toc.params, 'toc') and $toc != '0') or $toc = '1')                   and not(ancestor::answer and not($qanda.nested.in.toc=0))">
-      <xsl:call-template name="process.qanda.toc"/>
-    </xsl:if>
-    <xsl:apply-templates select="$preamble"/>
-    <xsl:call-template name="process.qandaset"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="qandaset/blockinfo/title|                      qandaset/info/title|                      qandaset/title">
-  <xsl:variable name="qalevel">
-    <xsl:call-template name="qanda.section.level"/>
-  </xsl:variable>
-  <xsl:element name="h{string(number($qalevel)+1)}" namespace="http://www.w3.org/1999/xhtml">
-    <xsl:attribute name="class">
-      <xsl:value-of select="local-name(.)"/>
-    </xsl:attribute>
-    <xsl:call-template name="anchor">
-      <xsl:with-param name="node" select=".."/>
-      <xsl:with-param name="conditional" select="0"/>
-    </xsl:call-template>
-    <xsl:apply-templates/>
-  </xsl:element>
-</xsl:template>
-
-<xsl:template match="qandaset/blockinfo|qandaset/info">
-  <!-- what should this template really do? -->
-  <xsl:apply-templates select="legalnotice" mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="qandadiv">
-  <xsl:variable name="preamble" select="*[local-name(.) != 'title'                                           and local-name(.) != 'titleabbrev'                                           and local-name(.) != 'qandadiv'                                           and local-name(.) != 'qandaentry']"/>
-
-  <xsl:if test="blockinfo/title|info/title|title">
-    <tr class="qandadiv">
-      <td align="left" valign="top" colspan="2">
-        <xsl:apply-templates select="(blockinfo/title|info/title|title)[1]"/>
-      </td>
-    </tr>
-  </xsl:if>
-
-  <xsl:variable name="toc">
-    <xsl:call-template name="pi.dbhtml_toc"/>
-  </xsl:variable>
-
-  <xsl:variable name="toc.params">
-    <xsl:call-template name="find.path.params">
-      <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:if test="(contains($toc.params, 'toc') and $toc != '0') or $toc = '1'">
-    <tr class="toc">
-      <td align="left" valign="top" colspan="2">
-        <xsl:call-template name="process.qanda.toc"/>
-      </td>
-    </tr>
-  </xsl:if>
-  <xsl:if test="$preamble">
-    <tr class="toc">
-      <td align="left" valign="top" colspan="2">
-        <xsl:apply-templates select="$preamble"/>
-      </td>
-    </tr>
-  </xsl:if>
-  <xsl:apply-templates select="qandadiv|qandaentry"/>
-</xsl:template>
-
-<xsl:template match="qandadiv/blockinfo/title|                      qandadiv/info/title|                      qandadiv/title">
-  <xsl:variable name="qalevel">
-    <xsl:call-template name="qandadiv.section.level"/>
-  </xsl:variable>
-
-  <xsl:element name="h{string(number($qalevel)+1)}" namespace="http://www.w3.org/1999/xhtml">
-    <xsl:attribute name="class">
-      <xsl:value-of select="local-name(.)"/>
-    </xsl:attribute>
-    <xsl:call-template name="anchor">
-      <xsl:with-param name="node" select=".."/>
-      <xsl:with-param name="conditional" select="0"/>
-    </xsl:call-template>
-    <xsl:apply-templates select="parent::qandadiv" mode="label.markup"/>
-    <xsl:if test="$qandadiv.autolabel != 0">
-      <xsl:apply-templates select="." mode="intralabel.punctuation"/>
-      <xsl:text> </xsl:text>
-    </xsl:if>
-    <xsl:apply-templates/>
-  </xsl:element>
-</xsl:template>
-
-<xsl:template match="qandaentry">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="question">
-  <xsl:variable name="deflabel">
-    <xsl:choose>
-      <xsl:when test="ancestor-or-self::*[@defaultlabel]">
-        <xsl:value-of select="(ancestor-or-self::*[@defaultlabel])[last()]                               /@defaultlabel"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$qanda.defaultlabel"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <tr>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <td align="left" valign="top">
-      <xsl:call-template name="anchor">
-        <xsl:with-param name="node" select=".."/>
-        <xsl:with-param name="conditional" select="0"/>
-      </xsl:call-template>
-      <xsl:call-template name="anchor">
-        <xsl:with-param name="conditional" select="0"/>
-      </xsl:call-template>
-
-      <xsl:variable name="label.content">
-        <xsl:apply-templates select="." mode="label.markup"/>
-        <xsl:if test="$deflabel = 'number' and not(label)">
-          <xsl:apply-templates select="." mode="intralabel.punctuation"/>
-        </xsl:if>
-      </xsl:variable>
-
-      <xsl:if test="string-length($label.content) &gt; 0">
-        <p><b>
-          <xsl:copy-of select="$label.content"/>
-        </b></p>
-      </xsl:if>
-    </td>
-    <td align="left" valign="top">
-      <xsl:choose>
-        <xsl:when test="$deflabel = 'none' and not(label)">
-          <b><xsl:apply-templates select="*[local-name(.) != 'label']"/></b>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates select="*[local-name(.) != 'label']"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </td>
-  </tr>
-</xsl:template>
-
-<xsl:template match="answer">
-  <xsl:variable name="deflabel">
-    <xsl:choose>
-      <xsl:when test="ancestor-or-self::*[@defaultlabel]">
-        <xsl:value-of select="(ancestor-or-self::*[@defaultlabel])[last()]                               /@defaultlabel"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$qanda.defaultlabel"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <tr class="{local-name(.)}">
-    <td align="left" valign="top">
-      <xsl:call-template name="anchor"/>
-      <xsl:variable name="answer.label">
-        <xsl:apply-templates select="." mode="label.markup"/>
-      </xsl:variable>
-      <xsl:if test="string-length($answer.label) &gt; 0">
-        <p><b>
-          <xsl:copy-of select="$answer.label"/>
-        </b></p>
-      </xsl:if>
-    </td>
-    <td align="left" valign="top">
-      <xsl:apply-templates select="*[local-name(.) != 'label'         and local-name(.) != 'qandaentry']"/>
-      <!-- * handle nested answer/qandaentry instances -->
-      <!-- * (bug 1509043 from Daniel Leidert) -->
-      <xsl:if test="descendant::question">
-        <xsl:call-template name="process.qandaset"/>
-      </xsl:if>
-    </td>
-  </tr>
-</xsl:template>
-
-<xsl:template match="label">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="process.qanda.toc">
-  <!-- * if user wants nested qandaset and qandaentry in main Qandaset TOC, -->
-  <!-- * then don't also include the nested stuff in the sub TOCs -->
-  <dl>
-    <xsl:apply-templates select="qandadiv" mode="qandatoc.mode"/>
-    <xsl:apply-templates select="qandaset|qandaentry" mode="qandatoc.mode"/>
-  </dl>
-</xsl:template>
-
-<xsl:template match="qandadiv" mode="qandatoc.mode">
-  <dt><xsl:apply-templates select="title" mode="qandatoc.mode"/></dt>
-  <dd><xsl:call-template name="process.qanda.toc"/></dd>
-</xsl:template>
-
-<xsl:template match="qandadiv/blockinfo/title|                      qandadiv/info/title|                      qandadiv/title" mode="qandatoc.mode">
-  <xsl:variable name="qalevel">
-    <xsl:call-template name="qandadiv.section.level"/>
-  </xsl:variable>
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="parent::*"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:apply-templates select="parent::qandadiv" mode="label.markup"/>
-  <xsl:value-of select="$autotoc.label.separator"/>
-  <xsl:text> </xsl:text>
-  <a>
-    <xsl:attribute name="href">
-      <xsl:call-template name="href.target">
-        <xsl:with-param name="object" select="parent::*"/>
-      </xsl:call-template>
-    </xsl:attribute>
-    <xsl:apply-templates/>
-  </a>
-</xsl:template>
-
-<xsl:template match="qandaset" mode="qandatoc.mode">
-  <xsl:for-each select="qandaentry">
-    <xsl:apply-templates select="." mode="qandatoc.mode"/>
-  </xsl:for-each>
-</xsl:template>
-
-<xsl:template match="qandaentry" mode="qandatoc.mode">
-  <xsl:apply-templates select="question" mode="qandatoc.mode"/>
-</xsl:template>
-
-<xsl:template match="question" mode="qandatoc.mode">
-  <xsl:variable name="firstch">
-    <xsl:apply-templates select="(*[local-name(.)!='label'])[1]"/>
-  </xsl:variable>
-  <xsl:variable name="deflabel">
-    <xsl:choose>
-      <xsl:when test="ancestor-or-self::*[@defaultlabel]">
-        <xsl:value-of select="(ancestor-or-self::*[@defaultlabel])[last()]                               /@defaultlabel"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$qanda.defaultlabel"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <dt>
-    <xsl:apply-templates select="." mode="label.markup"/>
-    <xsl:if test="$deflabel = 'number' and not(label)">
-      <xsl:apply-templates select="." mode="intralabel.punctuation"/>
-    </xsl:if>
-    <xsl:text> </xsl:text>
-    <a>
-      <xsl:attribute name="href">
-        <xsl:call-template name="href.target">
-          <xsl:with-param name="object" select=".."/>
-        </xsl:call-template>
-      </xsl:attribute>
-      <xsl:value-of select="$firstch"/>
-    </a>
-  </dt>
-  <!-- * include nested qandaset/qandaentry in TOC if user wants it -->
-  <xsl:if test="not($qanda.nested.in.toc = 0)">
-    <xsl:apply-templates select="following-sibling::answer" mode="qandatoc.mode"/>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="answer" mode="qandatoc.mode">
-  <xsl:if test="descendant::question">
-    <dd>
-      <xsl:call-template name="process.qanda.toc"/>
-    </dd>
-  </xsl:if>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="process.qandaset">
-
-  <xsl:variable name="label-width">
-    <xsl:call-template name="pi.dbhtml_label-width"/>
-  </xsl:variable>
-
-  <xsl:variable name="table-summary">
-    <xsl:call-template name="pi.dbhtml_table-summary"/>
-  </xsl:variable>
-
-  <xsl:variable name="cellpadding">
-    <xsl:call-template name="pi.dbhtml_cellpadding"/>
-  </xsl:variable>
-
-  <xsl:variable name="cellspacing">
-    <xsl:call-template name="pi.dbhtml_cellspacing"/>
-  </xsl:variable>
-
-  <table border="0" summary="Q and A Set">
-    <xsl:if test="$table-summary != ''">
-      <xsl:attribute name="summary">
-        <xsl:value-of select="$table-summary"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:if test="$cellpadding != ''">
-      <xsl:attribute name="cellpadding">
-        <xsl:value-of select="$cellpadding"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:if test="$cellspacing != ''">
-      <xsl:attribute name="cellspacing">
-        <xsl:value-of select="$cellspacing"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <col align="left">
-      <xsl:attribute name="width">
-        <xsl:choose>
-          <xsl:when test="$label-width != ''">
-            <xsl:value-of select="$label-width"/>
-          </xsl:when>
-          <xsl:otherwise>1%</xsl:otherwise>
-        </xsl:choose>
-      </xsl:attribute>
-    </col>
-    <tbody>
-      <xsl:apply-templates select="qandaentry|qandadiv"/>
-    </tbody>
-  </table>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="*" mode="no.wrapper.mode">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/refentry.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/refentry.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,309 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:template match="reference">
-  <xsl:call-template name="id.warning"/>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="dir">
-      <xsl:with-param name="inherit" select="1"/>
-    </xsl:call-template>
-    <xsl:call-template name="language.attribute"/>
-    <xsl:if test="$generate.id.attributes != 0">
-      <xsl:attribute name="id">
-        <xsl:call-template name="object.id"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:call-template name="reference.titlepage"/>
-
-    <xsl:variable name="toc.params">
-      <xsl:call-template name="find.path.params">
-        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-      </xsl:call-template>
-    </xsl:variable>
-
-    <xsl:if test="not(partintro) and contains($toc.params, 'toc')">
-      <xsl:call-template name="division.toc"/>
-    </xsl:if>
-    <xsl:apply-templates/>
-  </div>
-</xsl:template>
-
-<xsl:template match="reference" mode="division.number">
-  <xsl:number from="book" count="reference" format="I."/>
-</xsl:template>
-
-<xsl:template match="reference/docinfo"/>
-<xsl:template match="reference/referenceinfo"/>
-<xsl:template match="reference/title"/>
-<xsl:template match="reference/subtitle"/>
-<xsl:template match="reference/titleabbrev"/>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="refentry.title">
-  <xsl:param name="node" select="."/>
-  <xsl:variable name="refmeta" select="$node//refmeta"/>
-  <xsl:variable name="refentrytitle" select="$refmeta//refentrytitle"/>
-  <xsl:variable name="refnamediv" select="$node//refnamediv"/>
-  <xsl:variable name="refname" select="$refnamediv//refname"/>
-  <xsl:variable name="refdesc" select="$refnamediv//refdescriptor"/>
-  <xsl:variable name="title">
-    <xsl:choose>
-      <xsl:when test="$refentrytitle">
-        <xsl:apply-templates select="$refentrytitle[1]" mode="title"/>
-      </xsl:when>
-      <xsl:when test="$refdesc">
-	<xsl:apply-templates select="$refdesc[1]" mode="title"/>
-      </xsl:when>
-      <xsl:when test="$refname">
-        <xsl:apply-templates select="$refname[1]" mode="title"/>
-      </xsl:when>
-      <xsl:otherwise/>
-    </xsl:choose>
-  </xsl:variable>
-
-  <h1 class="title">
-    <xsl:copy-of select="$title"/>
-  </h1>
-</xsl:template>
-
-<xsl:template match="refentry">
-  <xsl:call-template name="id.warning"/>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="dir">
-      <xsl:with-param name="inherit" select="1"/>
-    </xsl:call-template>
-    <xsl:call-template name="language.attribute"/>
-    <xsl:if test="$refentry.separator != 0 and preceding-sibling::refentry">
-      <div class="refentry.separator">
-        <hr/>
-      </div>
-    </xsl:if>
-    <xsl:call-template name="anchor">
-      <xsl:with-param name="conditional" select="0"/>
-    </xsl:call-template>
-    <xsl:call-template name="refentry.titlepage"/>
-    <xsl:apply-templates/>
-    <xsl:call-template name="process.footnotes"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="refentry/docinfo|refentry/refentryinfo"/>
-<xsl:template match="refentry/info"/>
-
-<xsl:template match="refentrytitle|refname|refdescriptor" mode="title">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="refmeta">
-</xsl:template>
-
-<xsl:template match="manvolnum">
-  <xsl:if test="$refentry.xref.manvolnum != 0">
-    <xsl:text>(</xsl:text>
-    <xsl:apply-templates/>
-    <xsl:text>)</xsl:text>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="refmiscinfo">
-</xsl:template>
-
-<xsl:template match="refentrytitle">
-  <xsl:call-template name="inline.charseq"/>
-</xsl:template>
-
-<xsl:template match="refnamediv">
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="dir">
-      <xsl:with-param name="inherit" select="1"/>
-    </xsl:call-template>
-    <xsl:call-template name="anchor"/>
-
-    <xsl:choose>
-      <xsl:when test="preceding-sibling::refnamediv">
-	<!-- no title on secondary refnamedivs! -->
-      </xsl:when>
-      <xsl:when test="$refentry.generate.name != 0">
-        <h2>
-          <xsl:call-template name="gentext">
-            <xsl:with-param name="key" select="'RefName'"/>
-          </xsl:call-template>
-        </h2>
-      </xsl:when>
-      <xsl:when test="$refentry.generate.title != 0">
-        <h2>
-          <xsl:choose>
-            <xsl:when test="../refmeta/refentrytitle">
-              <xsl:apply-templates select="../refmeta/refentrytitle"/>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:apply-templates select="refname[1]"/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </h2>
-      </xsl:when>
-    </xsl:choose>
-
-    <p>
-      <xsl:apply-templates/>
-    </p>
-  </div>
-</xsl:template>
-
-<xsl:template match="refname">
-  <xsl:if test="not(preceding-sibling::refdescriptor)">
-    <xsl:apply-templates/>
-    <xsl:if test="following-sibling::refname">
-      <xsl:text>, </xsl:text>
-    </xsl:if>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="refpurpose">
-  <xsl:if test="node()">
-    <xsl:text> </xsl:text>
-    <xsl:call-template name="dingbat">
-      <xsl:with-param name="dingbat">em-dash</xsl:with-param>
-    </xsl:call-template>
-    <xsl:text> </xsl:text>
-    <xsl:apply-templates/>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="refdescriptor">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="refclass">
-  <xsl:if test="$refclass.suppress = 0">
-  <p>
-    <b>
-      <xsl:if test="@role">
-        <xsl:value-of select="@role"/>
-        <xsl:text>: </xsl:text>
-      </xsl:if>
-      <xsl:apply-templates/>
-    </b>
-  </p>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="refsynopsisdiv">
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="dir">
-      <xsl:with-param name="inherit" select="1"/>
-    </xsl:call-template>
-    <xsl:call-template name="anchor"/>
-    <h2>
-      <xsl:choose>
-        <xsl:when test="refsynopsisdiv/title|title">
-          <xsl:apply-templates select="(refsynopsisdiv/title|title)[1]" mode="titlepage.mode"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="gentext">
-            <xsl:with-param name="key" select="'RefSynopsisDiv'"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </h2>
-    <xsl:apply-templates/>
-  </div>
-</xsl:template>
-
-<xsl:template match="refsynopsisdivinfo"/>
-
-<xsl:template match="refsynopsisdiv/title">
-</xsl:template>
-
-<xsl:template match="refsynopsisdiv/title" mode="titlepage.mode">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="refsection|refsect1|refsect2|refsect3">
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="dir">
-      <xsl:with-param name="inherit" select="1"/>
-    </xsl:call-template>
-    <xsl:call-template name="language.attribute"/>
-    <xsl:call-template name="anchor">
-      <xsl:with-param name="conditional" select="0"/>
-    </xsl:call-template>
-    <!-- pick up info title -->
-    <xsl:apply-templates select="(title|info/title)[1]"/>
-    <xsl:apply-templates select="node()[not(self::title) and not(self::info)]"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="refsection/title|refsection/info/title">
-  <!-- the ID is output in the block.object call for refsect1 -->
-  <xsl:variable name="level" select="count(ancestor-or-self::refsection)"/>
-  <xsl:variable name="refsynopsisdiv">
-    <xsl:text>0</xsl:text>
-    <xsl:if test="ancestor::refsynopsisdiv">1</xsl:if>
-  </xsl:variable>
-  <xsl:variable name="hlevel">
-    <xsl:choose>
-      <xsl:when test="$level+$refsynopsisdiv &gt; 5">6</xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$level+1+$refsynopsisdiv"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-  <xsl:element name="h{$hlevel}" namespace="http://www.w3.org/1999/xhtml">
-    <xsl:apply-templates/>
-  </xsl:element>
-</xsl:template>
-
-<xsl:template match="refsect1/title|refsect1/info/title">
-  <!-- the ID is output in the block.object call for refsect1 -->
-  <h2>
-    <xsl:apply-templates/>
-  </h2>
-</xsl:template>
-
-<xsl:template match="refsect2/title|refsect2/info/title">
-  <!-- the ID is output in the block.object call for refsect2 -->
-  <h3>
-    <xsl:apply-templates/>
-  </h3>
-</xsl:template>
-
-<xsl:template match="refsect3/title|refsect3/info/title">
-  <!-- the ID is output in the block.object call for refsect3 -->
-  <h4>
-    <xsl:apply-templates/>
-  </h4>
-</xsl:template>
-
-<xsl:template match="refsectioninfo|refsection/info"/>
-<xsl:template match="refsect1info|refsect1/info"/>
-<xsl:template match="refsect2info|refsect2/info"/>
-<xsl:template match="refsect3info|refsect3/info"/>
-
-
-<!-- ==================================================================== -->
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/sections.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/sections.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,548 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:template match="section">
-  <xsl:variable name="depth" select="count(ancestor::section)+1"/>
-
-  <xsl:call-template name="id.warning"/>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="dir">
-      <xsl:with-param name="inherit" select="1"/>
-    </xsl:call-template>
-    <xsl:call-template name="language.attribute"/>
-    <xsl:call-template name="section.titlepage"/>
-
-    <xsl:variable name="toc.params">
-      <xsl:call-template name="find.path.params">
-        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-      </xsl:call-template>
-    </xsl:variable>
-
-    <xsl:if test="contains($toc.params, 'toc')                   and $depth &lt;= $generate.section.toc.level">
-      <xsl:call-template name="section.toc">
-        <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
-      </xsl:call-template>
-      <xsl:call-template name="section.toc.separator"/>
-    </xsl:if>
-    <xsl:apply-templates/>
-    <xsl:call-template name="process.chunk.footnotes"/>
-  </div>
-</xsl:template>
-
-<xsl:template name="section.title">
-  <!-- the context node should be the title of a section when called -->
-  <xsl:variable name="section" select="(ancestor::section                                         |ancestor::simplesect                                         |ancestor::sect1                                         |ancestor::sect2                                         |ancestor::sect3                                         |ancestor::sect4                                         |ancestor::sect5)[last()]"/>
-
-  <xsl:variable name="renderas">
-    <xsl:choose>
-      <xsl:when test="$section/@renderas = 'sect1'">1</xsl:when>
-      <xsl:when test="$section/@renderas = 'sect2'">2</xsl:when>
-      <xsl:when test="$section/@renderas = 'sect3'">3</xsl:when>
-      <xsl:when test="$section/@renderas = 'sect4'">4</xsl:when>
-      <xsl:when test="$section/@renderas = 'sect5'">5</xsl:when>
-      <xsl:otherwise><xsl:value-of select="''"/></xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="level">
-    <xsl:choose>
-      <xsl:when test="$renderas != ''">
-        <xsl:value-of select="$renderas"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="section.level">
-          <xsl:with-param name="node" select="$section"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:call-template name="section.heading">
-    <xsl:with-param name="section" select="$section"/>
-    <xsl:with-param name="level" select="$level"/>
-    <xsl:with-param name="title">
-      <xsl:apply-templates select="$section" mode="object.title.markup">
-        <xsl:with-param name="allow-anchors" select="1"/>
-      </xsl:apply-templates>
-    </xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="section/title                     |section/info/title                     |sectioninfo/title" mode="titlepage.mode" priority="2">
-  <xsl:call-template name="section.title"/>
-</xsl:template>
-
-<xsl:template match="sect1">
-  <xsl:call-template name="id.warning"/>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="dir">
-      <xsl:with-param name="inherit" select="1"/>
-    </xsl:call-template>
-    <xsl:call-template name="language.attribute"/>
-
-    <xsl:choose>
-      <xsl:when test="@renderas = 'sect2'">
-        <xsl:call-template name="sect2.titlepage"/>
-      </xsl:when>
-      <xsl:when test="@renderas = 'sect3'">
-        <xsl:call-template name="sect3.titlepage"/>
-      </xsl:when>
-      <xsl:when test="@renderas = 'sect4'">
-        <xsl:call-template name="sect4.titlepage"/>
-      </xsl:when>
-      <xsl:when test="@renderas = 'sect5'">
-        <xsl:call-template name="sect5.titlepage"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="sect1.titlepage"/>
-      </xsl:otherwise>
-    </xsl:choose>
-
-    <xsl:variable name="toc.params">
-      <xsl:call-template name="find.path.params">
-        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-      </xsl:call-template>
-    </xsl:variable>
-
-    <xsl:if test="contains($toc.params, 'toc')                   and $generate.section.toc.level &gt;= 1">
-      <xsl:call-template name="section.toc">
-        <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
-      </xsl:call-template>
-      <xsl:call-template name="section.toc.separator"/>
-    </xsl:if>
-    <xsl:apply-templates/>
-    <xsl:call-template name="process.chunk.footnotes"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="sect1/title                     |sect1/info/title                     |sect1info/title" mode="titlepage.mode" priority="2">
-  <xsl:call-template name="section.title"/>
-</xsl:template>
-
-<xsl:template match="sect2">
-  <xsl:call-template name="id.warning"/>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="dir">
-      <xsl:with-param name="inherit" select="1"/>
-    </xsl:call-template>
-    <xsl:call-template name="language.attribute"/>
-
-    <xsl:choose>
-      <xsl:when test="@renderas = 'sect1'">
-        <xsl:call-template name="sect1.titlepage"/>
-      </xsl:when>
-      <xsl:when test="@renderas = 'sect3'">
-        <xsl:call-template name="sect3.titlepage"/>
-      </xsl:when>
-      <xsl:when test="@renderas = 'sect4'">
-        <xsl:call-template name="sect4.titlepage"/>
-      </xsl:when>
-      <xsl:when test="@renderas = 'sect5'">
-        <xsl:call-template name="sect5.titlepage"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="sect2.titlepage"/>
-      </xsl:otherwise>
-    </xsl:choose>
-
-    <xsl:variable name="toc.params">
-      <xsl:call-template name="find.path.params">
-        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-      </xsl:call-template>
-    </xsl:variable>
-
-    <xsl:if test="contains($toc.params, 'toc')                   and $generate.section.toc.level &gt;= 2">
-      <xsl:call-template name="section.toc">
-        <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
-      </xsl:call-template>
-      <xsl:call-template name="section.toc.separator"/>
-    </xsl:if>
-    <xsl:apply-templates/>
-    <xsl:call-template name="process.chunk.footnotes"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="sect2/title                     |sect2/info/title                     |sect2info/title" mode="titlepage.mode" priority="2">
-  <xsl:call-template name="section.title"/>
-</xsl:template>
-
-<xsl:template match="sect3">
-  <xsl:call-template name="id.warning"/>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="dir">
-      <xsl:with-param name="inherit" select="1"/>
-    </xsl:call-template>
-    <xsl:call-template name="language.attribute"/>
-
-    <xsl:choose>
-      <xsl:when test="@renderas = 'sect1'">
-        <xsl:call-template name="sect1.titlepage"/>
-      </xsl:when>
-      <xsl:when test="@renderas = 'sect2'">
-        <xsl:call-template name="sect2.titlepage"/>
-      </xsl:when>
-      <xsl:when test="@renderas = 'sect4'">
-        <xsl:call-template name="sect4.titlepage"/>
-      </xsl:when>
-      <xsl:when test="@renderas = 'sect5'">
-        <xsl:call-template name="sect5.titlepage"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="sect3.titlepage"/>
-      </xsl:otherwise>
-    </xsl:choose>
-
-    <xsl:variable name="toc.params">
-      <xsl:call-template name="find.path.params">
-        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-      </xsl:call-template>
-    </xsl:variable>
-
-    <xsl:if test="contains($toc.params, 'toc')                   and $generate.section.toc.level &gt;= 3">
-      <xsl:call-template name="section.toc">
-        <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
-      </xsl:call-template>
-      <xsl:call-template name="section.toc.separator"/>
-    </xsl:if>
-    <xsl:apply-templates/>
-    <xsl:call-template name="process.chunk.footnotes"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="sect3/title                     |sect3/info/title                     |sect3info/title" mode="titlepage.mode" priority="2">
-  <xsl:call-template name="section.title"/>
-</xsl:template>
-
-<xsl:template match="sect4">
-  <xsl:call-template name="id.warning"/>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="dir">
-      <xsl:with-param name="inherit" select="1"/>
-    </xsl:call-template>
-    <xsl:call-template name="language.attribute"/>
-
-    <xsl:choose>
-      <xsl:when test="@renderas = 'sect1'">
-        <xsl:call-template name="sect1.titlepage"/>
-      </xsl:when>
-      <xsl:when test="@renderas = 'sect2'">
-        <xsl:call-template name="sect2.titlepage"/>
-      </xsl:when>
-      <xsl:when test="@renderas = 'sect3'">
-        <xsl:call-template name="sect3.titlepage"/>
-      </xsl:when>
-      <xsl:when test="@renderas = 'sect5'">
-        <xsl:call-template name="sect5.titlepage"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="sect4.titlepage"/>
-      </xsl:otherwise>
-    </xsl:choose>
-
-    <xsl:variable name="toc.params">
-      <xsl:call-template name="find.path.params">
-        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-      </xsl:call-template>
-    </xsl:variable>
-
-    <xsl:if test="contains($toc.params, 'toc')                   and $generate.section.toc.level &gt;= 4">
-      <xsl:call-template name="section.toc">
-        <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
-      </xsl:call-template>
-      <xsl:call-template name="section.toc.separator"/>
-    </xsl:if>
-    <xsl:apply-templates/>
-    <xsl:call-template name="process.chunk.footnotes"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="sect4/title                     |sect4/info/title                     |sect4info/title" mode="titlepage.mode" priority="2">
-  <xsl:call-template name="section.title"/>
-</xsl:template>
-
-<xsl:template match="sect5">
-  <xsl:call-template name="id.warning"/>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="dir">
-      <xsl:with-param name="inherit" select="1"/>
-    </xsl:call-template>
-    <xsl:call-template name="language.attribute"/>
-
-    <xsl:choose>
-      <xsl:when test="@renderas = 'sect1'">
-        <xsl:call-template name="sect1.titlepage"/>
-      </xsl:when>
-      <xsl:when test="@renderas = 'sect2'">
-        <xsl:call-template name="sect2.titlepage"/>
-      </xsl:when>
-      <xsl:when test="@renderas = 'sect3'">
-        <xsl:call-template name="sect3.titlepage"/>
-      </xsl:when>
-      <xsl:when test="@renderas = 'sect4'">
-        <xsl:call-template name="sect4.titlepage"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="sect5.titlepage"/>
-      </xsl:otherwise>
-    </xsl:choose>
-
-    <xsl:variable name="toc.params">
-      <xsl:call-template name="find.path.params">
-        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-      </xsl:call-template>
-    </xsl:variable>
-
-    <xsl:if test="contains($toc.params, 'toc')                   and $generate.section.toc.level &gt;= 5">
-      <xsl:call-template name="section.toc">
-        <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
-      </xsl:call-template>
-      <xsl:call-template name="section.toc.separator"/>
-    </xsl:if>
-    <xsl:apply-templates/>
-    <xsl:call-template name="process.chunk.footnotes"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="sect5/title                     |sect5/info/title                     |sect5info/title" mode="titlepage.mode" priority="2">
-  <xsl:call-template name="section.title"/>
-</xsl:template>
-
-<xsl:template match="simplesect">
-  <xsl:call-template name="id.warning"/>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="dir">
-      <xsl:with-param name="inherit" select="1"/>
-    </xsl:call-template>
-    <xsl:call-template name="language.attribute"/>
-    <xsl:call-template name="simplesect.titlepage"/>
-    <xsl:apply-templates/>
-  </div>
-</xsl:template>
-
-<xsl:template match="simplesect/title|simplesect/info/title" mode="titlepage.mode" priority="2">
-  <xsl:call-template name="section.title"/>
-</xsl:template>
-
-<xsl:template match="section/title"/>
-<xsl:template match="section/titleabbrev"/>
-<xsl:template match="section/subtitle"/>
-<xsl:template match="sectioninfo"/>
-<xsl:template match="section/info"/>
-
-<xsl:template match="sect1/title"/>
-<xsl:template match="sect1/titleabbrev"/>
-<xsl:template match="sect1/subtitle"/>
-<xsl:template match="sect1info"/>
-<xsl:template match="sect1/info"/>
-
-<xsl:template match="sect2/title"/>
-<xsl:template match="sect2/subtitle"/>
-<xsl:template match="sect2/titleabbrev"/>
-<xsl:template match="sect2info"/>
-<xsl:template match="sect2/info"/>
-
-<xsl:template match="sect3/title"/>
-<xsl:template match="sect3/subtitle"/>
-<xsl:template match="sect3/titleabbrev"/>
-<xsl:template match="sect3info"/>
-<xsl:template match="sect3/info"/>
-
-<xsl:template match="sect4/title"/>
-<xsl:template match="sect4/subtitle"/>
-<xsl:template match="sect4/titleabbrev"/>
-<xsl:template match="sect4info"/>
-<xsl:template match="sect4/info"/>
-
-<xsl:template match="sect5/title"/>
-<xsl:template match="sect5/subtitle"/>
-<xsl:template match="sect5/titleabbrev"/>
-<xsl:template match="sect5info"/>
-<xsl:template match="sect5/info"/>
-
-<xsl:template match="simplesect/title"/>
-<xsl:template match="simplesect/subtitle"/>
-<xsl:template match="simplesect/titleabbrev"/>
-<xsl:template match="simplesect/info"/>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="section.heading">
-  <xsl:param name="section" select="."/>
-  <xsl:param name="level" select="1"/>
-  <xsl:param name="allow-anchors" select="1"/>
-  <xsl:param name="title"/>
-  <xsl:param name="class" select="'title'"/>
-
-  <xsl:variable name="id">
-    <xsl:choose>
-      <!-- if title is in an *info wrapper, get the grandparent -->
-      <xsl:when test="contains(local-name(..), 'info')">
-        <xsl:call-template name="object.id">
-          <xsl:with-param name="object" select="../.."/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="object.id">
-          <xsl:with-param name="object" select=".."/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <!-- HTML H level is one higher than section level -->
-  <xsl:variable name="hlevel">
-    <xsl:choose>
-      <!-- highest valid HTML H level is H6; so anything nested deeper
-           than 5 levels down just becomes H6 -->
-      <xsl:when test="$level &gt; 5">6</xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$level + 1"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-  <xsl:element name="h{$hlevel}" namespace="http://www.w3.org/1999/xhtml">
-    <xsl:attribute name="class"><xsl:value-of select="$class"/></xsl:attribute>
-    <xsl:if test="$css.decoration != '0'">
-      <xsl:if test="$hlevel&lt;3">
-        <xsl:attribute name="style">clear: both</xsl:attribute>
-      </xsl:if>
-    </xsl:if>
-    <xsl:if test="$allow-anchors != 0 and $generate.id.attributes = 0">
-      <xsl:call-template name="anchor">
-        <xsl:with-param name="node" select="$section"/>
-        <xsl:with-param name="conditional" select="0"/>
-      </xsl:call-template>
-    </xsl:if>
-    <xsl:if test="$generate.id.attributes != 0 and not(local-name(.) = 'appendix')">
-      <xsl:attribute name="id"><xsl:value-of select="$id"/></xsl:attribute>
-    </xsl:if>
-    <xsl:copy-of select="$title"/>
-  </xsl:element>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="bridgehead">
-  <xsl:variable name="container" select="(ancestor::appendix                         |ancestor::article                         |ancestor::bibliography                         |ancestor::chapter                         |ancestor::glossary                         |ancestor::glossdiv                         |ancestor::index                         |ancestor::partintro                         |ancestor::preface                         |ancestor::refsect1                         |ancestor::refsect2                         |ancestor::refsect3                         |ancestor::sect1                         |ancestor::sect2                         |ancestor::sect3                         |ancestor::sect4                         |ancestor::sect5                         |ancestor::section                         |ancestor::setindex                         |ancestor::simplesect)[last()]"/>
-
-  <xsl:variable name="clevel">
-    <xsl:choose>
-      <xsl:when test="local-name($container) = 'appendix'                       or local-name($container) = 'chapter'                       or local-name($container) = 'article'                       or local-name($container) = 'bibliography'                       or local-name($container) = 'glossary'                       or local-name($container) = 'index'                       or local-name($container) = 'partintro'                       or local-name($container) = 'preface'                       or local-name($container) = 'setindex'">1</xsl:when>
-      <xsl:when test="local-name($container) = 'glossdiv'">
-        <xsl:value-of select="count(ancestor::glossdiv)+1"/>
-      </xsl:when>
-      <xsl:when test="local-name($container) = 'sect1'                       or local-name($container) = 'sect2'                       or local-name($container) = 'sect3'                       or local-name($container) = 'sect4'                       or local-name($container) = 'sect5'                       or local-name($container) = 'refsect1'                       or local-name($container) = 'refsect2'                       or local-name($container) = 'refsect3'                       or local-name($container) = 'section'                       or local-name($container) = 'simplesect'">
-        <xsl:variable name="slevel">
-          <xsl:call-template name="section.level">
-            <xsl:with-param name="node" select="$container"/>
-          </xsl:call-template>
-        </xsl:variable>
-        <xsl:value-of select="$slevel + 1"/>
-      </xsl:when>
-      <xsl:otherwise>1</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <!-- HTML H level is one higher than section level -->
-  <xsl:variable name="hlevel">
-    <xsl:choose>
-      <xsl:when test="@renderas = 'sect1'">2</xsl:when>
-      <xsl:when test="@renderas = 'sect2'">3</xsl:when>
-      <xsl:when test="@renderas = 'sect3'">4</xsl:when>
-      <xsl:when test="@renderas = 'sect4'">5</xsl:when>
-      <xsl:when test="@renderas = 'sect5'">6</xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$clevel + 1"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:element name="h{$hlevel}" namespace="http://www.w3.org/1999/xhtml">
-    <xsl:call-template name="anchor">
-      <xsl:with-param name="conditional" select="0"/>
-    </xsl:call-template>
-    <xsl:apply-templates/>
-  </xsl:element>
-</xsl:template>
-
-<xsl:template match="section/subtitle" mode="titlepage.mode" priority="2">
-  <xsl:call-template name="section.subtitle"/>
-</xsl:template>
-
-<xsl:template match="simplesect/subtitle" mode="titlepage.mode" priority="2">
-  <xsl:call-template name="section.subtitle"/>
-</xsl:template>
-
-<xsl:template match="sect1/subtitle" mode="titlepage.mode" priority="2">
-  <xsl:call-template name="section.subtitle"/>
-</xsl:template>
-
-<xsl:template match="sect2/subtitle" mode="titlepage.mode" priority="2">
-  <xsl:call-template name="section.subtitle"/>
-</xsl:template>
-
-<xsl:template match="sect3/subtitle" mode="titlepage.mode" priority="2">
-  <xsl:call-template name="section.subtitle"/>
-</xsl:template>
-
-<xsl:template match="sect4/subtitle" mode="titlepage.mode" priority="2">
-  <xsl:call-template name="section.subtitle"/>
-</xsl:template>
-
-<xsl:template match="sect5/subtitle" mode="titlepage.mode" priority="2">
-  <xsl:call-template name="section.subtitle"/>
-</xsl:template>
-
-<xsl:template name="section.subtitle">
-  <!-- the context node should be the subtitle of a section when called -->
-  <xsl:variable name="section" select="(ancestor::section                                         |ancestor::simplesect                                         |ancestor::sect1                                         |ancestor::sect2                                         |ancestor::sect3                                         |ancestor::sect4                                         |ancestor::sect5)[last()]"/>
-
-  <xsl:variable name="level">
-    <xsl:call-template name="section.level">
-      <xsl:with-param name="node" select="$section"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:call-template name="section.heading">
-    <xsl:with-param name="section" select=".."/>
-    <xsl:with-param name="allow-anchors" select="0"/>
-    <!-- subtitle heading level one higher than section level -->
-    <xsl:with-param name="level" select="$level + 1"/>
-    <xsl:with-param name="class" select="'subtitle'"/>
-    <xsl:with-param name="title">
-      <xsl:apply-templates select="$section" mode="object.subtitle.markup">
-        <xsl:with-param name="allow-anchors" select="0"/>
-      </xsl:apply-templates>
-    </xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/synop.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/synop.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,1551 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<!-- synopsis is in verbatim -->
-
-<!-- ==================================================================== -->
-
-<xsl:template match="cmdsynopsis">
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <p>
-      <xsl:if test="..//processing-instruction('dbcmdlist')">
-        <!-- * Placing a dbcmdlist PI as a child of a particular element -->
-        <!-- * creates a hyperlinked list of all cmdsynopsis instances -->
-        <!-- * that are descendants of that element; so for any -->
-        <!-- * cmdsynopsis that is a descendant of an element containing -->
-        <!-- * a dbcmdlist PI, we need to output an a@id instance so that -->
-        <!-- * we will have something to link to -->
-        <xsl:call-template name="anchor">
-          <xsl:with-param name="conditional" select="0"/>
-        </xsl:call-template>
-      </xsl:if>
-      <xsl:apply-templates/>
-    </p>
-  </div>
-</xsl:template>
-
-<xsl:template match="cmdsynopsis/command">
-  <br/>
-  <xsl:call-template name="inline.monoseq"/>
-  <xsl:text> </xsl:text>
-</xsl:template>
-
-<xsl:template match="cmdsynopsis/command[1]" priority="2">
-  <xsl:call-template name="inline.monoseq"/>
-  <xsl:text> </xsl:text>
-</xsl:template>
-
-<xsl:template match="group|arg" name="group-or-arg">
-  <xsl:variable name="choice" select="@choice"/>
-  <xsl:variable name="rep" select="@rep"/>
-  <xsl:variable name="sepchar">
-    <xsl:choose>
-      <xsl:when test="ancestor-or-self::*/@sepchar">
-        <xsl:value-of select="ancestor-or-self::*/@sepchar"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:text> </xsl:text>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:if test="preceding-sibling::*">
-    <xsl:value-of select="$sepchar"/>
-  </xsl:if>
-  <xsl:choose>
-    <xsl:when test="$choice='plain'">
-      <xsl:value-of select="$arg.choice.plain.open.str"/>
-    </xsl:when>
-    <xsl:when test="$choice='req'">
-      <xsl:value-of select="$arg.choice.req.open.str"/>
-    </xsl:when>
-    <xsl:when test="$choice='opt'">
-      <xsl:value-of select="$arg.choice.opt.open.str"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$arg.choice.def.open.str"/>
-    </xsl:otherwise>
-  </xsl:choose>
-  <xsl:apply-templates/>
-  <xsl:choose>
-    <xsl:when test="$rep='repeat'">
-      <xsl:value-of select="$arg.rep.repeat.str"/>
-    </xsl:when>
-    <xsl:when test="$rep='norepeat'">
-      <xsl:value-of select="$arg.rep.norepeat.str"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$arg.rep.def.str"/>
-    </xsl:otherwise>
-  </xsl:choose>
-  <xsl:choose>
-    <xsl:when test="$choice='plain'">
-      <xsl:value-of select="$arg.choice.plain.close.str"/>
-    </xsl:when>
-    <xsl:when test="$choice='req'">
-      <xsl:value-of select="$arg.choice.req.close.str"/>
-    </xsl:when>
-    <xsl:when test="$choice='opt'">
-      <xsl:value-of select="$arg.choice.opt.close.str"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$arg.choice.def.close.str"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="group/arg">
-  <xsl:variable name="choice" select="@choice"/>
-  <xsl:variable name="rep" select="@rep"/>
-  <xsl:if test="preceding-sibling::*">
-    <xsl:value-of select="$arg.or.sep"/>
-  </xsl:if>
-  <xsl:call-template name="group-or-arg"/>
-</xsl:template>
-
-<xsl:template match="sbr">
-  <br/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="synopfragmentref">
-  <xsl:variable name="target" select="key('id',@linkend)"/>
-  <xsl:variable name="snum">
-    <xsl:apply-templates select="$target" mode="synopfragment.number"/>
-  </xsl:variable>
-  <i>
-    <a href="#{@linkend}">
-      <xsl:text>(</xsl:text>
-      <xsl:value-of select="$snum"/>
-      <xsl:text>)</xsl:text>
-    </a>
-    <xsl:text>&#160;</xsl:text>
-    <xsl:apply-templates/>
-  </i>
-</xsl:template>
-
-<xsl:template match="synopfragment" mode="synopfragment.number">
-  <xsl:number format="1"/>
-</xsl:template>
-
-<xsl:template match="synopfragment">
-  <xsl:variable name="snum">
-    <xsl:apply-templates select="." mode="synopfragment.number"/>
-  </xsl:variable>
-  <p>
-    <xsl:variable name="id">
-      <xsl:call-template name="object.id"/>
-    </xsl:variable>
-    <a id="{$id}">
-      <xsl:text>(</xsl:text>
-      <xsl:value-of select="$snum"/>
-      <xsl:text>)</xsl:text>
-    </a>
-    <xsl:text> </xsl:text>
-    <xsl:apply-templates/>
-  </p>
-</xsl:template>
-
-<xsl:template match="funcsynopsis">
-  <xsl:if test="..//processing-instruction('dbfunclist')">
-    <!-- * Placing a dbfunclist PI as a child of a particular element -->
-    <!-- * creates a hyperlinked list of all funcsynopsis instances that -->
-    <!-- * are descendants of that element; so for any funcsynopsis that is -->
-    <!-- * a descendant of an element containing a dbfunclist PI, we need -->
-    <!-- * to output an a@id instance so that we will have something to -->
-    <!-- * link to -->
-    <xsl:call-template name="anchor">
-      <xsl:with-param name="conditional" select="0"/>
-    </xsl:call-template>
-  </xsl:if>
-  <xsl:call-template name="informal.object"/>
-</xsl:template>
-
-<xsl:template match="funcsynopsisinfo">
-  <pre>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates/>
-  </pre>
-</xsl:template>
-
-<!-- ====================================================================== -->
-<!-- funcprototype -->
-<!--
-
-funcprototype ::= (funcdef,
-                   (void|varargs|paramdef+))
-
-funcdef       ::= (#PCDATA|type|replaceable|function)*
-
-paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
--->
-
-<xsl:template match="funcprototype">
-  <xsl:variable name="html-style">
-    <xsl:call-template name="pi.dbhtml_funcsynopsis-style">
-      <xsl:with-param name="node" select="ancestor::funcsynopsis/descendant-or-self::*"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="style">
-    <xsl:choose>
-      <xsl:when test="$html-style != ''">
-        <xsl:value-of select="$html-style"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$funcsynopsis.style"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-<!--
-  <xsl:variable name="tabular-p"
-                select="$funcsynopsis.tabular.threshold &gt; 0
-                        and string-length(.) &gt; $funcsynopsis.tabular.threshold"/>
--->
-
-  <xsl:variable name="tabular-p" select="true()"/>
-
-  <xsl:choose>
-    <xsl:when test="$style = 'kr' and $tabular-p">
-      <xsl:apply-templates select="." mode="kr-tabular"/>
-    </xsl:when>
-    <xsl:when test="$style = 'kr'">
-      <xsl:apply-templates select="." mode="kr-nontabular"/>
-    </xsl:when>
-    <xsl:when test="$style = 'ansi' and $tabular-p">
-      <xsl:apply-templates select="." mode="ansi-tabular"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates select="." mode="ansi-nontabular"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ====================================================================== -->
-<!-- funcprototype: kr, non-tabular -->
-
-<xsl:template match="funcprototype" mode="kr-nontabular">
-  <p>
-    <xsl:apply-templates mode="kr-nontabular"/>
-    <xsl:if test="paramdef">
-      <br/>
-      <xsl:apply-templates select="paramdef" mode="kr-funcsynopsis-mode"/>
-    </xsl:if>
-  </p>
-</xsl:template>
-
-<xsl:template match="funcdef" mode="kr-nontabular">
-  <code>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="kr-nontabular"/>
-    <xsl:text>(</xsl:text>
-  </code>
-</xsl:template>
-
-<xsl:template match="funcdef/function" mode="kr-nontabular">
-  <xsl:choose>
-    <xsl:when test="$funcsynopsis.decoration != 0">
-      <b class="fsfunc"><xsl:apply-templates mode="kr-nontabular"/></b>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates mode="kr-nontabular"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="void" mode="kr-nontabular">
-  <code>)</code>
-  <xsl:text>;</xsl:text>
-</xsl:template>
-
-<xsl:template match="varargs" mode="kr-nontabular">
-  <xsl:text>...</xsl:text>
-  <code>)</code>
-  <xsl:text>;</xsl:text>
-</xsl:template>
-
-<xsl:template match="paramdef" mode="kr-nontabular">
-  <xsl:apply-templates select="parameter" mode="kr-nontabular"/>
-  <xsl:choose>
-    <xsl:when test="following-sibling::*">
-      <xsl:text>, </xsl:text>
-    </xsl:when>
-    <xsl:otherwise>
-      <code>)</code>
-      <xsl:text>;</xsl:text>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="paramdef/parameter" mode="kr-nontabular">
-  <xsl:choose>
-    <xsl:when test="$funcsynopsis.decoration != 0">
-      <var class="pdparam">
-        <xsl:apply-templates mode="kr-nontabular"/>
-      </var>
-    </xsl:when>
-    <xsl:otherwise>
-      <code>
-	<xsl:apply-templates mode="kr-nontabular"/>
-      </code>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="paramdef" mode="kr-funcsynopsis-mode">
-  <xsl:if test="preceding-sibling::paramdef"><br/></xsl:if>
-  <code>
-    <xsl:apply-templates mode="kr-funcsynopsis-mode"/>
-  </code>
-  <xsl:text>;</xsl:text>
-</xsl:template>
-
-<xsl:template match="paramdef/parameter" mode="kr-funcsynopsis-mode">
-  <xsl:choose>
-    <xsl:when test="$funcsynopsis.decoration != 0">
-      <var class="pdparam">
-        <xsl:apply-templates mode="kr-funcsynopsis-mode"/>
-      </var>
-    </xsl:when>
-    <xsl:otherwise>
-      <code>
-	<xsl:apply-templates mode="kr-funcsynopsis-mode"/>
-      </code>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="funcparams" mode="kr-funcsynopsis-mode">
-  <code>(</code>
-  <xsl:apply-templates mode="kr-funcsynopsis-mode"/>
-  <code>)</code>
-</xsl:template>
-
-<!-- ====================================================================== -->
-<!-- funcprototype: kr, tabular -->
-
-<xsl:template match="funcprototype" mode="kr-tabular">
-  <table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
-    <tr>
-      <td>
-        <xsl:apply-templates select="funcdef" mode="kr-tabular"/>
-      </td>
-      <xsl:apply-templates select="(void|varargs|paramdef)[1]" mode="kr-tabular"/>
-    </tr>
-    <xsl:for-each select="(void|varargs|paramdef)[preceding-sibling::*[not(self::funcdef)]]">
-      <tr>
-        <td>&#160;</td>
-        <xsl:apply-templates select="." mode="kr-tabular"/>
-      </tr>
-    </xsl:for-each>
-  </table>
-  <xsl:if test="paramdef">
-    <table border="0" summary="Function argument synopsis" cellspacing="0" cellpadding="0">
-      <xsl:if test="following-sibling::funcprototype">
-        <xsl:attribute name="style">padding-bottom: 1em</xsl:attribute>
-      </xsl:if>
-      <xsl:apply-templates select="paramdef" mode="kr-tabular-funcsynopsis-mode"/>
-    </table>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="funcdef" mode="kr-tabular">
-  <code>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="kr-tabular"/>
-    <xsl:text>(</xsl:text>
-  </code>
-</xsl:template>
-
-<xsl:template match="funcdef/function" mode="kr-tabular">
-  <xsl:choose>
-    <xsl:when test="$funcsynopsis.decoration != 0">
-      <b class="fsfunc"><xsl:apply-templates mode="kr-nontabular"/></b>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates mode="kr-tabular"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="void" mode="kr-tabular">
-  <td>
-    <code>)</code>
-    <xsl:text>;</xsl:text>
-  </td>
-  <td>&#160;</td>
-</xsl:template>
-
-<xsl:template match="varargs" mode="kr-tabular">
-  <td>
-    <xsl:text>...</xsl:text>
-    <code>)</code>
-    <xsl:text>;</xsl:text>
-  </td>
-  <td>&#160;</td>
-</xsl:template>
-
-<xsl:template match="paramdef" mode="kr-tabular">
-  <td>
-    <xsl:apply-templates select="parameter" mode="kr-tabular"/>
-    <xsl:choose>
-      <xsl:when test="following-sibling::*">
-	<xsl:text>, </xsl:text>
-      </xsl:when>
-      <xsl:otherwise>
-	<code>)</code>
-	<xsl:text>;</xsl:text>
-      </xsl:otherwise>
-    </xsl:choose>
-  </td>
-  <td>&#160;</td>
-</xsl:template>
-
-<xsl:template match="paramdef/parameter" mode="kr-tabular">
-  <xsl:choose>
-    <xsl:when test="$funcsynopsis.decoration != 0">
-      <var class="pdparam">
-        <xsl:apply-templates mode="kr-tabular"/>
-      </var>
-    </xsl:when>
-    <xsl:otherwise>
-      <code>
-	<xsl:apply-templates mode="kr-tabular"/>
-      </code>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="paramdef" mode="kr-tabular-funcsynopsis-mode">
-  <xsl:variable name="type">
-    <xsl:choose>
-      <xsl:when test="type">
-	<xsl:apply-templates select="type" mode="kr-tabular-funcsynopsis-mode"/>
-      </xsl:when>
-      <xsl:when test="normalize-space(parameter/preceding-sibling::node()[not(self::parameter)]) != ''">
-	<xsl:copy-of select="parameter/preceding-sibling::node()[not(self::parameter)]"/>
-      </xsl:when>
-    </xsl:choose>
-  </xsl:variable>
-
-  <tr>
-    <xsl:choose>
-      <xsl:when test="$type != '' and funcparams">
-        <td>
-	  <code>
-	    <xsl:copy-of select="$type"/>
-	  </code>
-          <xsl:text>&#160;</xsl:text>
-        </td>
-        <td>
-	  <code>
-	    <xsl:choose>
-	      <xsl:when test="type">
-		<xsl:apply-templates select="type/following-sibling::*" mode="kr-tabular-funcsynopsis-mode"/>
-	      </xsl:when>
-	      <xsl:otherwise>
-		<xsl:apply-templates select="*" mode="kr-tabular-funcsynopsis-mode"/>
-	      </xsl:otherwise>
-	    </xsl:choose>
-	  </code>
-        </td>
-      </xsl:when>
-
-      <xsl:when test="funcparams">
-        <td colspan="2">
-	  <code>
-	    <xsl:apply-templates mode="kr-tabular-funcsynopsis-mode"/>
-	  </code>
-        </td>
-      </xsl:when>
-
-      <xsl:otherwise>
-        <td>
-	  <code>
-	    <xsl:apply-templates select="parameter/preceding-sibling::node()[not(self::parameter)]" mode="kr-tabular-funcsynopsis-mode"/>
-	  </code>
-          <xsl:text>&#160;</xsl:text>
-        </td>
-        <td>
-	  <code>
-	    <xsl:apply-templates select="parameter" mode="kr-tabular"/>
-	    <xsl:apply-templates select="parameter/following-sibling::*[not(self::parameter)]" mode="kr-tabular-funcsynopsis-mode"/>
-	    <xsl:text>;</xsl:text>
-	  </code>
-        </td>
-      </xsl:otherwise>
-    </xsl:choose>
-  </tr>
-</xsl:template>
-
-<xsl:template match="paramdef/parameter" mode="kr-tabular-funcsynopsis-mode">
-  <xsl:choose>
-    <xsl:when test="$funcsynopsis.decoration != 0">
-      <var class="pdparam">
-        <xsl:apply-templates mode="kr-tabular-funcsynopsis-mode"/>
-      </var>
-    </xsl:when>
-    <xsl:otherwise>
-      <code>
-	<xsl:apply-templates mode="kr-tabular-funcsynopsis-mode"/>
-      </code>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="funcparams" mode="kr-tabular-funcsynopsis-mode">
-  <code>(</code>
-  <xsl:apply-templates mode="kr-tabular-funcsynopsis-mode"/>
-  <code>)</code>
-  <xsl:text>;</xsl:text>
-</xsl:template>
-
-<!-- ====================================================================== -->
-<!-- funcprototype: ansi, non-tabular -->
-
-<xsl:template match="funcprototype" mode="ansi-nontabular">
-  <p>
-    <xsl:apply-templates mode="ansi-nontabular"/>
-  </p>
-</xsl:template>
-
-<xsl:template match="funcdef" mode="ansi-nontabular">
-  <code>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="ansi-nontabular"/>
-    <xsl:text>(</xsl:text>
-  </code>
-</xsl:template>
-
-<xsl:template match="funcdef/function" mode="ansi-nontabular">
-  <xsl:choose>
-    <xsl:when test="$funcsynopsis.decoration != 0">
-      <b class="fsfunc"><xsl:apply-templates mode="ansi-nontabular"/></b>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates mode="ansi-nontabular"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="void" mode="ansi-nontabular">
-  <code>void)</code>
-  <xsl:text>;</xsl:text>
-</xsl:template>
-
-<xsl:template match="varargs" mode="ansi-nontabular">
-  <xsl:text>...</xsl:text>
-  <code>)</code>
-  <xsl:text>;</xsl:text>
-</xsl:template>
-
-<xsl:template match="paramdef" mode="ansi-nontabular">
-  <xsl:apply-templates mode="ansi-nontabular"/>
-  <xsl:choose>
-    <xsl:when test="following-sibling::*">
-      <xsl:text>, </xsl:text>
-    </xsl:when>
-    <xsl:otherwise>
-      <code>)</code>
-      <xsl:text>;</xsl:text>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="paramdef/parameter" mode="ansi-nontabular">
-  <xsl:choose>
-    <xsl:when test="$funcsynopsis.decoration != 0">
-      <var class="pdparam">
-        <xsl:apply-templates mode="ansi-nontabular"/>
-      </var>
-    </xsl:when>
-    <xsl:otherwise>
-      <code>
-	<xsl:apply-templates mode="ansi-nontabular"/>
-      </code>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="funcparams" mode="ansi-nontabular">
-  <code>(</code>
-  <xsl:apply-templates mode="ansi-nontabular"/>
-  <code>)</code>
-</xsl:template>
-
-<!-- ====================================================================== -->
-<!-- funcprototype: ansi, tabular -->
-
-<xsl:template match="funcprototype" mode="ansi-tabular">
-  <table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0">
-    <xsl:if test="following-sibling::funcprototype">
-      <xsl:attribute name="style">padding-bottom: 1em</xsl:attribute>
-    </xsl:if>
-    <tr>
-      <td>
-        <xsl:apply-templates select="funcdef" mode="ansi-tabular"/>
-      </td>
-      <xsl:apply-templates select="(void|varargs|paramdef)[1]" mode="ansi-tabular"/>
-    </tr>
-    <xsl:for-each select="(void|varargs|paramdef)[preceding-sibling::*[not(self::funcdef)]]">
-      <tr>
-        <td>&#160;</td>
-        <xsl:apply-templates select="." mode="ansi-tabular"/>
-      </tr>
-    </xsl:for-each>
-  </table>
-</xsl:template>
-
-<xsl:template match="funcdef" mode="ansi-tabular">
-  <code>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="ansi-tabular"/>
-    <xsl:text>(</xsl:text>
-  </code>
-</xsl:template>
-
-<xsl:template match="funcdef/function" mode="ansi-tabular">
-  <xsl:choose>
-    <xsl:when test="$funcsynopsis.decoration != 0">
-      <b class="fsfunc"><xsl:apply-templates mode="ansi-nontabular"/></b>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates mode="kr-tabular"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="void" mode="ansi-tabular">
-  <td>
-    <code>void)</code>
-    <xsl:text>;</xsl:text>
-  </td>
-  <td>&#160;</td>
-</xsl:template>
-
-<xsl:template match="varargs" mode="ansi-tabular">
-  <td>
-    <xsl:text>...</xsl:text>
-    <code>)</code>
-    <xsl:text>;</xsl:text>
-  </td>
-  <td>&#160;</td>
-</xsl:template>
-
-<xsl:template match="paramdef" mode="ansi-tabular">
-  <xsl:variable name="type">
-    <xsl:choose>
-      <xsl:when test="type">
-	<xsl:apply-templates select="type" mode="ansi-tabular"/>
-      </xsl:when>
-      <xsl:when test="normalize-space(parameter/preceding-sibling::node()[not(self::parameter)]) != ''">
-	<xsl:copy-of select="parameter/preceding-sibling::node()[not(self::parameter)]"/>
-      </xsl:when>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$type != '' and funcparams">
-      <td>
-	<xsl:copy-of select="$type"/>
-        <xsl:text>&#160;</xsl:text>
-      </td>
-      <td>
-	<xsl:choose>
-	  <xsl:when test="type">
-	    <xsl:apply-templates select="type/following-sibling::*" mode="ansi-tabular"/>
-	  </xsl:when>
-	  <xsl:otherwise>
-	    <xsl:apply-templates select="*" mode="ansi-tabular"/>
-	  </xsl:otherwise>
-	</xsl:choose>
-        <xsl:choose>
-          <xsl:when test="following-sibling::*">
-            <xsl:text>, </xsl:text>
-          </xsl:when>
-          <xsl:otherwise>
-            <code>)</code>
-            <xsl:text>;</xsl:text>
-          </xsl:otherwise>
-        </xsl:choose>
-      </td>
-    </xsl:when>
-    <xsl:otherwise>
-      <td>
-        <xsl:apply-templates select="parameter/preceding-sibling::node()[not(self::parameter)]" mode="ansi-tabular"/>
-        <xsl:text>&#160;</xsl:text>
-      </td>
-      <td>
-        <xsl:apply-templates select="parameter" mode="ansi-tabular"/>
-        <xsl:apply-templates select="parameter/following-sibling::*[not(self::parameter)]" mode="ansi-tabular"/>
-        <xsl:choose>
-          <xsl:when test="following-sibling::*">
-            <xsl:text>, </xsl:text>
-          </xsl:when>
-          <xsl:otherwise>
-            <code>)</code>
-            <xsl:text>;</xsl:text>
-          </xsl:otherwise>
-        </xsl:choose>
-      </td>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="paramdef/parameter" mode="ansi-tabular">
-  <xsl:choose>
-    <xsl:when test="$funcsynopsis.decoration != 0">
-      <var class="pdparam">
-        <xsl:apply-templates mode="ansi-tabular"/>
-      </var>
-    </xsl:when>
-    <xsl:otherwise>
-      <code>
-	<xsl:apply-templates mode="ansi-tabular"/>
-      </code>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="funcparams" mode="ansi-tabular">
-  <code>(</code>
-  <xsl:apply-templates/>
-  <code>)</code>
-</xsl:template>
-
-<!-- ====================================================================== -->
-
-<xsl:variable name="default-classsynopsis-language">java</xsl:variable>
-
-<xsl:template match="classsynopsis                      |fieldsynopsis                      |methodsynopsis                      |constructorsynopsis                      |destructorsynopsis">
-  <xsl:param name="language">
-    <xsl:choose>
-      <xsl:when test="@language">
-	<xsl:value-of select="@language"/>
-      </xsl:when>
-      <xsl:otherwise>
-	<xsl:value-of select="$default-classsynopsis-language"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:param>
-
-  <xsl:choose>
-    <xsl:when test="$language='java' or $language='Java'">
-      <xsl:apply-templates select="." mode="java"/>
-    </xsl:when>
-    <xsl:when test="$language='perl' or $language='Perl'">
-      <xsl:apply-templates select="." mode="perl"/>
-    </xsl:when>
-    <xsl:when test="$language='idl' or $language='IDL'">
-      <xsl:apply-templates select="." mode="idl"/>
-    </xsl:when>
-    <xsl:when test="$language='cpp' or $language='c++' or $language='C++'">
-      <xsl:apply-templates select="." mode="cpp"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:message>
-	<xsl:text>Unrecognized language on </xsl:text>
-        <xsl:value-of select="local-name(.)"/>
-        <xsl:text>: </xsl:text>
-	<xsl:value-of select="$language"/>
-      </xsl:message>
-      <xsl:apply-templates select=".">
-	<xsl:with-param name="language" select="$default-classsynopsis-language"/>
-      </xsl:apply-templates>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="synop-break">
-  <xsl:if test="parent::classsynopsis                 or (following-sibling::fieldsynopsis                     |following-sibling::methodsynopsis                     |following-sibling::constructorsynopsis                     |following-sibling::destructorsynopsis)">
-    <br/>
-  </xsl:if>
-</xsl:template>
-
-
-<!-- ===== Java ======================================================== -->
-
-<xsl:template match="classsynopsis" mode="java">
-  <pre>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates select="ooclass[1]" mode="java"/>
-    <xsl:if test="ooclass[preceding-sibling::*]">
-      <xsl:text> extends</xsl:text>
-      <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="java"/>
-      <xsl:if test="oointerface|ooexception">
-        <br/>
-	<xsl:text>&#160;&#160;&#160;&#160;</xsl:text>
-      </xsl:if>
-    </xsl:if>
-    <xsl:if test="oointerface">
-      <xsl:text>implements</xsl:text>
-      <xsl:apply-templates select="oointerface" mode="java"/>
-      <xsl:if test="ooexception">
-        <br/>
-	<xsl:text>&#160;&#160;&#160;&#160;</xsl:text>
-      </xsl:if>
-    </xsl:if>
-    <xsl:if test="ooexception">
-      <xsl:text>throws</xsl:text>
-      <xsl:apply-templates select="ooexception" mode="java"/>
-    </xsl:if>
-    <xsl:text>&#160;{</xsl:text>
-    <br/>
-    <xsl:apply-templates select="constructorsynopsis                                  |destructorsynopsis                                  |fieldsynopsis                                  |methodsynopsis                                  |classsynopsisinfo" mode="java"/>
-    <xsl:text>}</xsl:text>
-  </pre>
-</xsl:template>
-
-<xsl:template match="classsynopsisinfo" mode="java">
-  <xsl:apply-templates mode="java"/>
-</xsl:template>
-
-<xsl:template match="ooclass|oointerface|ooexception" mode="java">
-  <xsl:choose>
-    <xsl:when test="preceding-sibling::*">
-      <xsl:text>, </xsl:text>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:text> </xsl:text>
-    </xsl:otherwise>
-  </xsl:choose>
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="java"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="modifier|package" mode="java">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="java"/>
-    <xsl:if test="following-sibling::*">
-      <xsl:text>&#160;</xsl:text>
-    </xsl:if>
-  </span>
-</xsl:template>
-
-<xsl:template match="classname" mode="java">
-  <xsl:if test="local-name(preceding-sibling::*[1]) = 'classname'">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="java"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="interfacename" mode="java">
-  <xsl:if test="local-name(preceding-sibling::*[1]) = 'interfacename'">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="java"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="exceptionname" mode="java">
-  <xsl:if test="local-name(preceding-sibling::*[1]) = 'exceptionname'">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="java"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="fieldsynopsis" mode="java">
-  <code>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:if test="parent::classsynopsis">
-      <xsl:text>&#160;&#160;</xsl:text>
-    </xsl:if>
-    <xsl:apply-templates mode="java"/>
-    <xsl:text>;</xsl:text>
-  </code>
-  <xsl:call-template name="synop-break"/>
-</xsl:template>
-
-<xsl:template match="type" mode="java">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="java"/>
-    <xsl:text>&#160;</xsl:text>
-  </span>
-</xsl:template>
-
-<xsl:template match="varname" mode="java">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="java"/>
-    <xsl:text>&#160;</xsl:text>
-  </span>
-</xsl:template>
-
-<xsl:template match="initializer" mode="java">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:text>=&#160;</xsl:text>
-    <xsl:apply-templates mode="java"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="void" mode="java">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:text>void&#160;</xsl:text>
-  </span>
-</xsl:template>
-
-<xsl:template match="methodname" mode="java">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="java"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="methodparam" mode="java">
-  <xsl:param name="indent">0</xsl:param>
-  <xsl:if test="preceding-sibling::methodparam">
-    <xsl:text>,</xsl:text>
-    <br/>
-    <xsl:if test="$indent &gt; 0">
-      <xsl:call-template name="copy-string">
-	<xsl:with-param name="string">&#160;</xsl:with-param>
-	<xsl:with-param name="count" select="$indent + 1"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:if>
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="java"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="parameter" mode="java">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="java"/>
-  </span>
-</xsl:template>
-
-<xsl:template mode="java" match="constructorsynopsis|destructorsynopsis|methodsynopsis">
-  <xsl:variable name="start-modifiers" select="modifier[following-sibling::*[local-name(.) != 'modifier']]"/>
-  <xsl:variable name="notmod" select="*[local-name(.) != 'modifier']"/>
-  <xsl:variable name="end-modifiers" select="modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/>
-  <xsl:variable name="decl">
-    <xsl:if test="parent::classsynopsis">
-      <xsl:text>&#160;&#160;</xsl:text>
-    </xsl:if>
-    <xsl:apply-templates select="$start-modifiers" mode="java"/>
-
-    <!-- type -->
-    <xsl:if test="local-name($notmod[1]) != 'methodname'">
-      <xsl:apply-templates select="$notmod[1]" mode="java"/>
-    </xsl:if>
-
-    <xsl:apply-templates select="methodname" mode="java"/>
-  </xsl:variable>
-
-  <code>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:copy-of select="$decl"/>
-    <xsl:text>(</xsl:text>
-    <xsl:apply-templates select="methodparam" mode="java">
-      <xsl:with-param name="indent" select="string-length($decl)"/>
-    </xsl:apply-templates>
-    <xsl:text>)</xsl:text>
-    <xsl:if test="exceptionname">
-      <br/>
-      <xsl:text>&#160;&#160;&#160;&#160;throws&#160;</xsl:text>
-      <xsl:apply-templates select="exceptionname" mode="java"/>
-    </xsl:if>
-    <xsl:if test="modifier[preceding-sibling::*[local-name(.) != 'modifier']]">
-      <xsl:text> </xsl:text>
-      <xsl:apply-templates select="$end-modifiers" mode="java"/>
-    </xsl:if>
-    <xsl:text>;</xsl:text>
-  </code>
-  <xsl:call-template name="synop-break"/>
-</xsl:template>
-
-<!-- ===== C++ ========================================================= -->
-
-<xsl:template match="classsynopsis" mode="cpp">
-  <pre>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates select="ooclass[1]" mode="cpp"/>
-    <xsl:if test="ooclass[preceding-sibling::*]">
-      <xsl:text>: </xsl:text>
-      <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="cpp"/>
-      <xsl:if test="oointerface|ooexception">
-        <br/>
-	<xsl:text>&#160;&#160;&#160;&#160;</xsl:text>
-      </xsl:if>
-    </xsl:if>
-    <xsl:if test="oointerface">
-      <xsl:text> implements</xsl:text>
-      <xsl:apply-templates select="oointerface" mode="cpp"/>
-      <xsl:if test="ooexception">
-        <br/>
-	<xsl:text>&#160;&#160;&#160;&#160;</xsl:text>
-      </xsl:if>
-    </xsl:if>
-    <xsl:if test="ooexception">
-      <xsl:text> throws</xsl:text>
-      <xsl:apply-templates select="ooexception" mode="cpp"/>
-    </xsl:if>
-    <xsl:text>&#160;{</xsl:text>
-    <br/>
-    <xsl:apply-templates select="constructorsynopsis                                  |destructorsynopsis                                  |fieldsynopsis                                  |methodsynopsis                                  |classsynopsisinfo" mode="cpp"/>
-    <xsl:text>}</xsl:text>
-  </pre>
-</xsl:template>
-
-<xsl:template match="classsynopsisinfo" mode="cpp">
-  <xsl:apply-templates mode="cpp"/>
-</xsl:template>
-
-<xsl:template match="ooclass|oointerface|ooexception" mode="cpp">
-  <xsl:if test="preceding-sibling::*">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="cpp"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="modifier|package" mode="cpp">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="cpp"/>
-    <xsl:if test="following-sibling::*">
-      <xsl:text>&#160;</xsl:text>
-    </xsl:if>
-  </span>
-</xsl:template>
-
-<xsl:template match="classname" mode="cpp">
-  <xsl:if test="local-name(preceding-sibling::*[1]) = 'classname'">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="cpp"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="interfacename" mode="cpp">
-  <xsl:if test="local-name(preceding-sibling::*[1]) = 'interfacename'">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="cpp"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="exceptionname" mode="cpp">
-  <xsl:if test="local-name(preceding-sibling::*[1]) = 'exceptionname'">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="cpp"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="fieldsynopsis" mode="cpp">
-  <code>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:if test="parent::classsynopsis">
-      <xsl:text>&#160;&#160;</xsl:text>
-    </xsl:if>
-    <xsl:apply-templates mode="cpp"/>
-    <xsl:text>;</xsl:text>
-  </code>
-  <xsl:call-template name="synop-break"/>
-</xsl:template>
-
-<xsl:template match="type" mode="cpp">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="cpp"/>
-    <xsl:text>&#160;</xsl:text>
-  </span>
-</xsl:template>
-
-<xsl:template match="varname" mode="cpp">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="cpp"/>
-    <xsl:text>&#160;</xsl:text>
-  </span>
-</xsl:template>
-
-<xsl:template match="initializer" mode="cpp">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:text>=&#160;</xsl:text>
-    <xsl:apply-templates mode="cpp"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="void" mode="cpp">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:text>void&#160;</xsl:text>
-  </span>
-</xsl:template>
-
-<xsl:template match="methodname" mode="cpp">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="cpp"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="methodparam" mode="cpp">
-  <xsl:if test="preceding-sibling::methodparam">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="cpp"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="parameter" mode="cpp">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="cpp"/>
-  </span>
-</xsl:template>
-
-<xsl:template mode="cpp" match="constructorsynopsis|destructorsynopsis|methodsynopsis">
-  <xsl:variable name="start-modifiers" select="modifier[following-sibling::*[local-name(.) != 'modifier']]"/>
-  <xsl:variable name="notmod" select="*[local-name(.) != 'modifier']"/>
-  <xsl:variable name="end-modifiers" select="modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/>
-
-  <code>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:if test="parent::classsynopsis">
-      <xsl:text>&#160;&#160;</xsl:text>
-    </xsl:if>
-    <xsl:apply-templates select="$start-modifiers" mode="cpp"/>
-
-    <!-- type -->
-    <xsl:if test="local-name($notmod[1]) != 'methodname'">
-      <xsl:apply-templates select="$notmod[1]" mode="cpp"/>
-    </xsl:if>
-
-    <xsl:apply-templates select="methodname" mode="cpp"/>
-    <xsl:text>(</xsl:text>
-    <xsl:apply-templates select="methodparam" mode="cpp"/>
-    <xsl:text>)</xsl:text>
-    <xsl:if test="exceptionname">
-      <br/>
-      <xsl:text>&#160;&#160;&#160;&#160;throws&#160;</xsl:text>
-      <xsl:apply-templates select="exceptionname" mode="cpp"/>
-    </xsl:if>
-    <xsl:if test="modifier[preceding-sibling::*[local-name(.) != 'modifier']]">
-      <xsl:text> </xsl:text>
-      <xsl:apply-templates select="$end-modifiers" mode="cpp"/>
-    </xsl:if>
-    <xsl:text>;</xsl:text>
-  </code>
-  <xsl:call-template name="synop-break"/>
-</xsl:template>
-
-<!-- ===== IDL ========================================================= -->
-
-<xsl:template match="classsynopsis" mode="idl">
-  <pre>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:text>interface </xsl:text>
-    <xsl:apply-templates select="ooclass[1]" mode="idl"/>
-    <xsl:if test="ooclass[preceding-sibling::*]">
-      <xsl:text>: </xsl:text>
-      <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="idl"/>
-      <xsl:if test="oointerface|ooexception">
-        <br/>
-	<xsl:text>&#160;&#160;&#160;&#160;</xsl:text>
-      </xsl:if>
-    </xsl:if>
-    <xsl:if test="oointerface">
-      <xsl:text> implements</xsl:text>
-      <xsl:apply-templates select="oointerface" mode="idl"/>
-      <xsl:if test="ooexception">
-        <br/>
-	<xsl:text>&#160;&#160;&#160;&#160;</xsl:text>
-      </xsl:if>
-    </xsl:if>
-    <xsl:if test="ooexception">
-      <xsl:text> throws</xsl:text>
-      <xsl:apply-templates select="ooexception" mode="idl"/>
-    </xsl:if>
-    <xsl:text>&#160;{</xsl:text>
-    <br/>
-    <xsl:apply-templates select="constructorsynopsis                                  |destructorsynopsis                                  |fieldsynopsis                                  |methodsynopsis                                  |classsynopsisinfo" mode="idl"/>
-    <xsl:text>}</xsl:text>
-  </pre>
-</xsl:template>
-
-<xsl:template match="classsynopsisinfo" mode="idl">
-  <xsl:apply-templates mode="idl"/>
-</xsl:template>
-
-<xsl:template match="ooclass|oointerface|ooexception" mode="idl">
-  <xsl:if test="preceding-sibling::*">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="idl"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="modifier|package" mode="idl">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="idl"/>
-    <xsl:if test="following-sibling::*">
-      <xsl:text>&#160;</xsl:text>
-    </xsl:if>
-  </span>
-</xsl:template>
-
-<xsl:template match="classname" mode="idl">
-  <xsl:if test="local-name(preceding-sibling::*[1]) = 'classname'">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="idl"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="interfacename" mode="idl">
-  <xsl:if test="local-name(preceding-sibling::*[1]) = 'interfacename'">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="idl"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="exceptionname" mode="idl">
-  <xsl:if test="local-name(preceding-sibling::*[1]) = 'exceptionname'">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="idl"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="fieldsynopsis" mode="idl">
-  <code>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:if test="parent::classsynopsis">
-      <xsl:text>&#160;&#160;</xsl:text>
-    </xsl:if>
-    <xsl:apply-templates mode="idl"/>
-    <xsl:text>;</xsl:text>
-  </code>
-  <xsl:call-template name="synop-break"/>
-</xsl:template>
-
-<xsl:template match="type" mode="idl">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="idl"/>
-    <xsl:text>&#160;</xsl:text>
-  </span>
-</xsl:template>
-
-<xsl:template match="varname" mode="idl">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="idl"/>
-    <xsl:text>&#160;</xsl:text>
-  </span>
-</xsl:template>
-
-<xsl:template match="initializer" mode="idl">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:text>=&#160;</xsl:text>
-    <xsl:apply-templates mode="idl"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="void" mode="idl">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:text>void&#160;</xsl:text>
-  </span>
-</xsl:template>
-
-<xsl:template match="methodname" mode="idl">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="idl"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="methodparam" mode="idl">
-  <xsl:if test="preceding-sibling::methodparam">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="idl"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="parameter" mode="idl">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="idl"/>
-  </span>
-</xsl:template>
-
-<xsl:template mode="idl" match="constructorsynopsis|destructorsynopsis|methodsynopsis">
-  <xsl:variable name="start-modifiers" select="modifier[following-sibling::*[local-name(.) != 'modifier']]"/>
-  <xsl:variable name="notmod" select="*[local-name(.) != 'modifier']"/>
-  <xsl:variable name="end-modifiers" select="modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/>
-  <code>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:if test="parent::classsynopsis">
-      <xsl:text>&#160;&#160;</xsl:text>
-    </xsl:if>
-    <xsl:apply-templates select="$start-modifiers" mode="idl"/>
-
-    <!-- type -->
-    <xsl:if test="local-name($notmod[1]) != 'methodname'">
-      <xsl:apply-templates select="$notmod[1]" mode="idl"/>
-    </xsl:if>
-
-    <xsl:apply-templates select="methodname" mode="idl"/>
-    <xsl:text>(</xsl:text>
-    <xsl:apply-templates select="methodparam" mode="idl"/>
-    <xsl:text>)</xsl:text>
-    <xsl:if test="exceptionname">
-      <br/>
-      <xsl:text>&#160;&#160;&#160;&#160;raises(</xsl:text>
-      <xsl:apply-templates select="exceptionname" mode="idl"/>
-      <xsl:text>)</xsl:text>
-    </xsl:if>
-    <xsl:if test="modifier[preceding-sibling::*[local-name(.) != 'modifier']]">
-      <xsl:text> </xsl:text>
-      <xsl:apply-templates select="$end-modifiers" mode="idl"/>
-    </xsl:if>
-    <xsl:text>;</xsl:text>
-  </code>
-  <xsl:call-template name="synop-break"/>
-</xsl:template>
-
-<!-- ===== Perl ======================================================== -->
-
-<xsl:template match="classsynopsis" mode="perl">
-  <pre>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:text>package </xsl:text>
-    <xsl:apply-templates select="ooclass[1]" mode="perl"/>
-    <xsl:text>;</xsl:text>
-    <br/>
-
-    <xsl:if test="ooclass[preceding-sibling::*]">
-      <xsl:text>@ISA = (</xsl:text>
-      <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="perl"/>
-      <xsl:text>);</xsl:text>
-      <br/>
-    </xsl:if>
-
-    <xsl:apply-templates select="constructorsynopsis                                  |destructorsynopsis                                  |fieldsynopsis                                  |methodsynopsis                                  |classsynopsisinfo" mode="perl"/>
-  </pre>
-</xsl:template>
-
-<xsl:template match="classsynopsisinfo" mode="perl">
-  <xsl:apply-templates mode="perl"/>
-</xsl:template>
-
-<xsl:template match="ooclass|oointerface|ooexception" mode="perl">
-  <xsl:if test="preceding-sibling::*">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="perl"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="modifier|package" mode="perl">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="perl"/>
-    <xsl:if test="following-sibling::*">
-      <xsl:text>&#160;</xsl:text>
-    </xsl:if>
-  </span>
-</xsl:template>
-
-<xsl:template match="classname" mode="perl">
-  <xsl:if test="local-name(preceding-sibling::*[1]) = 'classname'">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="perl"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="interfacename" mode="perl">
-  <xsl:if test="local-name(preceding-sibling::*[1]) = 'interfacename'">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="perl"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="exceptionname" mode="perl">
-  <xsl:if test="local-name(preceding-sibling::*[1]) = 'exceptionname'">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="perl"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="fieldsynopsis" mode="perl">
-  <code>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:if test="parent::classsynopsis">
-      <xsl:text>&#160;&#160;</xsl:text>
-    </xsl:if>
-    <xsl:apply-templates mode="perl"/>
-    <xsl:text>;</xsl:text>
-  </code>
-  <xsl:call-template name="synop-break"/>
-</xsl:template>
-
-<xsl:template match="type" mode="perl">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="perl"/>
-    <xsl:text>&#160;</xsl:text>
-  </span>
-</xsl:template>
-
-<xsl:template match="varname" mode="perl">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="perl"/>
-    <xsl:text>&#160;</xsl:text>
-  </span>
-</xsl:template>
-
-<xsl:template match="initializer" mode="perl">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:text>=&#160;</xsl:text>
-    <xsl:apply-templates mode="perl"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="void" mode="perl">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:text>void&#160;</xsl:text>
-  </span>
-</xsl:template>
-
-<xsl:template match="methodname" mode="perl">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="perl"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="methodparam" mode="perl">
-  <xsl:if test="preceding-sibling::methodparam">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="perl"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="parameter" mode="perl">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="perl"/>
-  </span>
-</xsl:template>
-
-<xsl:template mode="perl" match="constructorsynopsis|destructorsynopsis|methodsynopsis">
-  <xsl:variable name="start-modifiers" select="modifier[following-sibling::*[local-name(.) != 'modifier']]"/>
-  <xsl:variable name="notmod" select="*[local-name(.) != 'modifier']"/>
-  <xsl:variable name="end-modifiers" select="modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/>
-
-  <code>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:text>sub </xsl:text>
-
-    <xsl:apply-templates select="methodname" mode="perl"/>
-    <xsl:text> { ... };</xsl:text>
-  </code>
-  <xsl:call-template name="synop-break"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<!-- * DocBook 5 allows linking elements (link, olink, and xref) -->
-<!-- * within the OO *synopsis elements (classsynopsis, fieldsynopsis, -->
-<!-- * methodsynopsis, constructorsynopsis, destructorsynopsis) and -->
-<!-- * their children. So we need to have mode="java|cpp|idl|perl" -->
-<!-- * per-mode matches for those linking elements in order for them -->
-<!-- * to be processed as expected. -->
-
-<xsl:template match="link|olink|xref" mode="java">
-  <xsl:apply-templates select="."/>
-</xsl:template>
-
-<xsl:template match="link|olink|xref" mode="cpp">
-  <xsl:apply-templates select="."/>
-</xsl:template>
-
-<xsl:template match="link|olink|xref" mode="idl">
-  <xsl:apply-templates select="."/>
-</xsl:template>
-
-<xsl:template match="link|olink|xref" mode="perl">
-  <xsl:apply-templates select="."/>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/table.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/table.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,1093 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" xmlns:stbl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Table" xmlns:xtbl="xalan://com.nwalsh.xalan.Table" xmlns:lxslt="http://xml.apache.org/xslt" xmlns:ptbl="http://nwalsh.com/xslt/ext/xsltproc/python/Table" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="doc stbl xtbl lxslt ptbl" version="1.0">
-
-<xsl:include href="../common/table.xsl"/>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<lxslt:component prefix="xtbl" functions="adjustColumnWidths"/>
-
-<xsl:template name="empty.table.cell">
-  <xsl:param name="colnum" select="0"/>
-
-  <xsl:variable name="rowsep">
-    <xsl:choose>
-      <!-- If this is the last row, rowsep never applies. -->
-      <xsl:when test="not(ancestor-or-self::row[1]/following-sibling::row                           or ancestor-or-self::thead/following-sibling::tbody                           or ancestor-or-self::tbody/preceding-sibling::tfoot)">
-        <xsl:value-of select="0"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="inherited.table.attribute">
-          <xsl:with-param name="entry" select="NOT-AN-ELEMENT-NAME"/>
-          <xsl:with-param name="row" select="ancestor-or-self::row[1]"/>
-          <xsl:with-param name="colnum" select="$colnum"/>
-          <xsl:with-param name="attribute" select="'rowsep'"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="colsep">
-    <xsl:choose>
-      <!-- If this is the last column, colsep never applies. -->
-      <xsl:when test="number($colnum) &gt;= ancestor::tgroup/@cols">0</xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="inherited.table.attribute">
-          <xsl:with-param name="entry" select="NOT-AN-ELEMENT-NAME"/>
-          <xsl:with-param name="row" select="ancestor-or-self::row[1]"/>
-          <xsl:with-param name="colnum" select="$colnum"/>
-          <xsl:with-param name="attribute" select="'colsep'"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <td class="auto-generated">
-    <xsl:if test="$table.borders.with.css != 0">
-      <xsl:attribute name="style">
-        <xsl:if test="$colsep &gt; 0">
-          <xsl:call-template name="border">
-            <xsl:with-param name="side" select="'right'"/>
-          </xsl:call-template>
-        </xsl:if>
-        <xsl:if test="$rowsep &gt; 0">
-          <xsl:call-template name="border">
-            <xsl:with-param name="side" select="'bottom'"/>
-          </xsl:call-template>
-        </xsl:if>
-      </xsl:attribute>
-    </xsl:if>
-    <xsl:text>&#160;</xsl:text>
-  </td>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="border">
-  <xsl:param name="side" select="'left'"/>
-  <xsl:param name="padding" select="0"/>
-  <xsl:param name="style" select="$table.cell.border.style"/>
-  <xsl:param name="color" select="$table.cell.border.color"/>
-  <xsl:param name="thickness" select="$table.cell.border.thickness"/>
-
-  <!-- Note: Some browsers (mozilla) require at least a width and style. -->
-
-  <xsl:choose>
-    <xsl:when test="($thickness != ''                      and $style != ''                      and $color != '')                     or ($thickness != ''                         and $style != '')                     or ($thickness != '')">
-      <!-- use the compound property if we can: -->
-      <!-- it saves space and probably works more reliably -->
-      <xsl:text>border-</xsl:text>
-      <xsl:value-of select="$side"/>
-      <xsl:text>: </xsl:text>
-      <xsl:value-of select="$thickness"/>
-      <xsl:text> </xsl:text>
-      <xsl:value-of select="$style"/>
-      <xsl:text> </xsl:text>
-      <xsl:value-of select="$color"/>
-      <xsl:text>; </xsl:text>
-    </xsl:when>
-    <xsl:otherwise>
-      <!-- we need to specify the styles individually -->
-      <xsl:if test="$thickness != ''">
-        <xsl:text>border-</xsl:text>
-        <xsl:value-of select="$side"/>
-        <xsl:text>-width: </xsl:text>
-        <xsl:value-of select="$thickness"/>
-        <xsl:text>; </xsl:text>
-      </xsl:if>
-
-      <xsl:if test="$style != ''">
-        <xsl:text>border-</xsl:text>
-        <xsl:value-of select="$side"/>
-        <xsl:text>-style: </xsl:text>
-        <xsl:value-of select="$style"/>
-        <xsl:text>; </xsl:text>
-      </xsl:if>
-
-      <xsl:if test="$color != ''">
-        <xsl:text>border-</xsl:text>
-        <xsl:value-of select="$side"/>
-        <xsl:text>-color: </xsl:text>
-        <xsl:value-of select="$color"/>
-        <xsl:text>; </xsl:text>
-      </xsl:if>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="tgroup" name="tgroup">
-  <xsl:if test="not(@cols) or @cols = '' or string(number(@cols)) = 'NaN'">
-    <xsl:message terminate="yes">
-      <xsl:text>Error: CALS tables must specify the number of columns.</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:variable name="summary">
-    <xsl:call-template name="pi.dbhtml_table-summary"/>
-  </xsl:variable>
-
-  <xsl:variable name="cellspacing">
-    <xsl:call-template name="pi.dbhtml_cellspacing"/>
-  </xsl:variable>
-
-  <xsl:variable name="cellpadding">
-    <xsl:call-template name="pi.dbhtml_cellpadding"/>
-  </xsl:variable>
-
-  <table>
-    <xsl:choose>
-      <!-- If there's a textobject/phrase for the table summary, use it -->
-      <xsl:when test="../textobject/phrase">
-        <xsl:attribute name="summary">
-          <xsl:value-of select="../textobject/phrase"/>
-        </xsl:attribute>
-      </xsl:when>
-
-      <!-- If there's a <?dbhtml table-summary="foo"?> PI, use it for
-           the HTML table summary attribute -->
-      <xsl:when test="$summary != ''">
-        <xsl:attribute name="summary">
-          <xsl:value-of select="$summary"/>
-        </xsl:attribute>
-      </xsl:when>
-
-      <!-- Otherwise, if there's a title, use that -->
-      <xsl:when test="../title">
-        <xsl:attribute name="summary">
-          <xsl:value-of select="string(../title)"/>
-        </xsl:attribute>
-      </xsl:when>
-
-      <!-- Otherwise, forget the whole idea -->
-      <xsl:otherwise><!-- nevermind --></xsl:otherwise>
-    </xsl:choose>
-
-    <xsl:if test="$cellspacing != '' or $html.cellspacing != ''">
-      <xsl:attribute name="cellspacing">
-        <xsl:choose>
-          <xsl:when test="$cellspacing != ''">
-            <xsl:value-of select="$cellspacing"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="$html.cellspacing"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:if test="$cellpadding != '' or $html.cellpadding != ''">
-      <xsl:attribute name="cellpadding">
-        <xsl:choose>
-          <xsl:when test="$cellpadding != ''">
-            <xsl:value-of select="$cellpadding"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="$html.cellpadding"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:if test="../@pgwide=1 or local-name(.) = 'entrytbl'">
-      <xsl:attribute name="width">100%</xsl:attribute>
-    </xsl:if>
-
-    <xsl:choose>
-      <xsl:when test="$table.borders.with.css != 0">
-        <xsl:choose>
-          <xsl:when test="../@frame='all' or (not(../@frame) and $default.table.frame='all')">
-            <xsl:attribute name="style">
-              <xsl:text>border-collapse: collapse;</xsl:text>
-              <xsl:call-template name="border">
-                <xsl:with-param name="side" select="'top'"/>
-                <xsl:with-param name="style" select="$table.frame.border.style"/>
-                <xsl:with-param name="color" select="$table.frame.border.color"/>
-                <xsl:with-param name="thickness" select="$table.frame.border.thickness"/>
-              </xsl:call-template>
-              <xsl:call-template name="border">
-                <xsl:with-param name="side" select="'bottom'"/>
-                <xsl:with-param name="style" select="$table.frame.border.style"/>
-                <xsl:with-param name="color" select="$table.frame.border.color"/>
-                <xsl:with-param name="thickness" select="$table.frame.border.thickness"/>
-              </xsl:call-template>
-              <xsl:call-template name="border">
-                <xsl:with-param name="side" select="'left'"/>
-                <xsl:with-param name="style" select="$table.frame.border.style"/>
-                <xsl:with-param name="color" select="$table.frame.border.color"/>
-                <xsl:with-param name="thickness" select="$table.frame.border.thickness"/>
-              </xsl:call-template>
-              <xsl:call-template name="border">
-                <xsl:with-param name="side" select="'right'"/>
-                <xsl:with-param name="style" select="$table.frame.border.style"/>
-                <xsl:with-param name="color" select="$table.frame.border.color"/>
-                <xsl:with-param name="thickness" select="$table.frame.border.thickness"/>
-              </xsl:call-template>
-            </xsl:attribute>
-          </xsl:when>
-          <xsl:when test="../@frame='topbot' or (not(../@frame) and $default.table.frame='topbot')">
-            <xsl:attribute name="style">
-              <xsl:text>border-collapse: collapse;</xsl:text>
-              <xsl:call-template name="border">
-                <xsl:with-param name="side" select="'top'"/>
-                <xsl:with-param name="style" select="$table.frame.border.style"/>
-                <xsl:with-param name="color" select="$table.frame.border.color"/>
-                <xsl:with-param name="thickness" select="$table.frame.border.thickness"/>
-              </xsl:call-template>
-              <xsl:call-template name="border">
-                <xsl:with-param name="side" select="'bottom'"/>
-                <xsl:with-param name="style" select="$table.frame.border.style"/>
-                <xsl:with-param name="color" select="$table.frame.border.color"/>
-                <xsl:with-param name="thickness" select="$table.frame.border.thickness"/>
-              </xsl:call-template>
-            </xsl:attribute>
-          </xsl:when>
-          <xsl:when test="../@frame='top' or (not(../@frame) and $default.table.frame='top')">
-            <xsl:attribute name="style">
-              <xsl:text>border-collapse: collapse;</xsl:text>
-              <xsl:call-template name="border">
-                <xsl:with-param name="side" select="'top'"/>
-                <xsl:with-param name="style" select="$table.frame.border.style"/>
-                <xsl:with-param name="color" select="$table.frame.border.color"/>
-                <xsl:with-param name="thickness" select="$table.frame.border.thickness"/>
-              </xsl:call-template>
-            </xsl:attribute>
-          </xsl:when>
-          <xsl:when test="../@frame='bottom' or (not(../@frame) and $default.table.frame='bottom')">
-            <xsl:attribute name="style">
-              <xsl:text>border-collapse: collapse;</xsl:text>
-              <xsl:call-template name="border">
-                <xsl:with-param name="side" select="'bottom'"/>
-                <xsl:with-param name="style" select="$table.frame.border.style"/>
-                <xsl:with-param name="color" select="$table.frame.border.color"/>
-                <xsl:with-param name="thickness" select="$table.frame.border.thickness"/>
-              </xsl:call-template>
-            </xsl:attribute>
-          </xsl:when>
-          <xsl:when test="../@frame='sides' or (not(../@frame) and $default.table.frame='sides')">
-            <xsl:attribute name="style">
-              <xsl:text>border-collapse: collapse;</xsl:text>
-              <xsl:call-template name="border">
-                <xsl:with-param name="side" select="'left'"/>
-                <xsl:with-param name="style" select="$table.frame.border.style"/>
-                <xsl:with-param name="color" select="$table.frame.border.color"/>
-                <xsl:with-param name="thickness" select="$table.frame.border.thickness"/>
-              </xsl:call-template>
-              <xsl:call-template name="border">
-                <xsl:with-param name="side" select="'right'"/>
-                <xsl:with-param name="style" select="$table.frame.border.style"/>
-                <xsl:with-param name="color" select="$table.frame.border.color"/>
-                <xsl:with-param name="thickness" select="$table.frame.border.thickness"/>
-              </xsl:call-template>
-            </xsl:attribute>
-          </xsl:when>
-	  <xsl:when test="../@frame='none'">
-	    <xsl:attribute name="style">
-	      <xsl:text>border: none;</xsl:text>
-	    </xsl:attribute>
-	  </xsl:when>
-          <xsl:otherwise>
-            <xsl:attribute name="style">
-              <xsl:text>border-collapse: collapse;</xsl:text>
-            </xsl:attribute>
-          </xsl:otherwise>
-        </xsl:choose>
-
-      </xsl:when>
-      <xsl:when test="../@frame='none' or (not(../@frame) and $default.table.frame='none') or local-name(.) = 'entrytbl'">
-        <xsl:attribute name="border">0</xsl:attribute>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:attribute name="border">1</xsl:attribute>
-      </xsl:otherwise>
-    </xsl:choose>
-
-    <xsl:variable name="colgroup">
-      <colgroup>
-        <xsl:call-template name="generate.colgroup">
-          <xsl:with-param name="cols" select="@cols"/>
-        </xsl:call-template>
-      </colgroup>
-    </xsl:variable>
-
-    <xsl:variable name="explicit.table.width">
-      <xsl:call-template name="pi.dbhtml_table-width">
-        <xsl:with-param name="node" select=".."/>
-      </xsl:call-template>
-    </xsl:variable>
-
-    <xsl:variable name="table.width">
-      <xsl:choose>
-        <xsl:when test="$explicit.table.width != ''">
-          <xsl:value-of select="$explicit.table.width"/>
-        </xsl:when>
-        <xsl:when test="$default.table.width = ''">
-          <xsl:text>100%</xsl:text>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="$default.table.width"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-
-    <xsl:if test="$default.table.width != ''                   or $explicit.table.width != ''">
-      <xsl:attribute name="width">
-        <xsl:choose>
-          <xsl:when test="contains($table.width, '%')">
-            <xsl:value-of select="$table.width"/>
-          </xsl:when>
-          <xsl:when test="$use.extensions != 0                           and $tablecolumns.extension != 0">
-            <xsl:choose>
-              <xsl:when test="function-available('stbl:convertLength')">
-                <xsl:value-of select="stbl:convertLength($table.width)"/>
-              </xsl:when>
-              <xsl:when test="function-available('xtbl:convertLength')">
-                <xsl:value-of select="xtbl:convertLength($table.width)"/>
-              </xsl:when>
-              <xsl:otherwise>
-                <xsl:message terminate="yes">
-                  <xsl:text>No convertLength function available.</xsl:text>
-                </xsl:message>
-              </xsl:otherwise>
-            </xsl:choose>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="$table.width"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:choose>
-      <xsl:when test="$use.extensions != 0                       and $tablecolumns.extension != 0">
-        <xsl:choose>
-          <xsl:when test="function-available('stbl:adjustColumnWidths')">
-            <xsl:copy-of select="stbl:adjustColumnWidths($colgroup)"/>
-          </xsl:when>
-          <xsl:when test="function-available('xtbl:adjustColumnWidths')">
-            <xsl:copy-of select="xtbl:adjustColumnWidths($colgroup)"/>
-          </xsl:when>
-          <xsl:when test="function-available('ptbl:adjustColumnWidths')">
-            <xsl:copy-of select="ptbl:adjustColumnWidths($colgroup)"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:message terminate="yes">
-              <xsl:text>No adjustColumnWidths function available.</xsl:text>
-            </xsl:message>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:copy-of select="$colgroup"/>
-      </xsl:otherwise>
-    </xsl:choose>
-
-    <xsl:apply-templates select="thead"/>
-    <xsl:apply-templates select="tfoot"/>
-    <xsl:apply-templates select="tbody"/>
-
-    <xsl:if test=".//footnote">
-      <tbody class="footnotes">
-        <tr>
-          <td colspan="{@cols}">
-            <xsl:apply-templates select=".//footnote" mode="table.footnote.mode"/>
-          </td>
-        </tr>
-      </tbody>
-    </xsl:if>
-  </table>
-</xsl:template>
-
-<xsl:template match="tgroup/processing-instruction('dbhtml')">
-  <xsl:variable name="summary">
-    <xsl:call-template name="pi.dbhtml_table-summary"/>
-  </xsl:variable>
-
-  <!-- Suppress the table-summary PI -->
-  <xsl:if test="$summary = ''">
-    <xsl:processing-instruction name="dbhtml">
-      <xsl:value-of select="."/>
-    </xsl:processing-instruction>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="colspec"/>
-
-<xsl:template match="spanspec"/>
-
-<xsl:template match="thead|tfoot">
-  <xsl:element name="{local-name(.)}" namespace="http://www.w3.org/1999/xhtml">
-    <xsl:if test="@align">
-      <xsl:attribute name="align">
-        <xsl:value-of select="@align"/>
-      </xsl:attribute>
-    </xsl:if>
-    <xsl:if test="@char">
-      <xsl:attribute name="char">
-        <xsl:value-of select="@char"/>
-      </xsl:attribute>
-    </xsl:if>
-    <xsl:if test="@charoff">
-      <xsl:attribute name="charoff">
-        <xsl:value-of select="@charoff"/>
-      </xsl:attribute>
-    </xsl:if>
-    <xsl:if test="@valign">
-      <xsl:attribute name="valign">
-        <xsl:value-of select="@valign"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:apply-templates select="row[1]">
-      <xsl:with-param name="spans">
-        <xsl:call-template name="blank.spans">
-          <xsl:with-param name="cols" select="../@cols"/>
-        </xsl:call-template>
-      </xsl:with-param>
-    </xsl:apply-templates>
-
-  </xsl:element>
-</xsl:template>
-
-<xsl:template match="tbody">
-  <tbody>
-    <xsl:if test="@align">
-      <xsl:attribute name="align">
-        <xsl:value-of select="@align"/>
-      </xsl:attribute>
-    </xsl:if>
-    <xsl:if test="@char">
-      <xsl:attribute name="char">
-        <xsl:value-of select="@char"/>
-      </xsl:attribute>
-    </xsl:if>
-    <xsl:if test="@charoff">
-      <xsl:attribute name="charoff">
-        <xsl:value-of select="@charoff"/>
-      </xsl:attribute>
-    </xsl:if>
-    <xsl:if test="@valign">
-      <xsl:attribute name="valign">
-        <xsl:value-of select="@valign"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:apply-templates select="row[1]">
-      <xsl:with-param name="spans">
-        <xsl:call-template name="blank.spans">
-          <xsl:with-param name="cols" select="../@cols"/>
-        </xsl:call-template>
-      </xsl:with-param>
-    </xsl:apply-templates>
-
-  </tbody>
-</xsl:template>
-
-<xsl:template match="row">
-  <xsl:param name="spans"/>
-
-  <xsl:choose>
-    <xsl:when test="contains($spans, '0')">
-      <xsl:call-template name="normal-row">
-	<xsl:with-param name="spans" select="$spans"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <!--
-      <xsl:message>
-	<xsl:text>Ignoring row: </xsl:text>
-	<xsl:value-of select="$spans"/>
-	<xsl:text> = </xsl:text>
-	<xsl:call-template name="consume-row">
-	  <xsl:with-param name="spans" select="$spans"/>
-	</xsl:call-template>
-      </xsl:message>
-      -->
-
-      <xsl:if test="normalize-space(.//text()) != ''">
-	<xsl:message>Warning: overlapped row contains content!</xsl:message>
-      </xsl:if>
-
-      <tr><xsl:comment> This row intentionally left blank </xsl:comment></tr>
-
-      <xsl:apply-templates select="following-sibling::row[1]">
-	<xsl:with-param name="spans">
-	  <xsl:call-template name="consume-row">
-	    <xsl:with-param name="spans" select="$spans"/>
-	  </xsl:call-template>
-	</xsl:with-param>
-      </xsl:apply-templates>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="normal-row">
-  <xsl:param name="spans"/>
-
-  <xsl:variable name="row-height">
-    <xsl:if test="processing-instruction('dbhtml')">
-      <xsl:call-template name="pi.dbhtml_row-height"/>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="bgcolor">
-    <xsl:if test="processing-instruction('dbhtml')">
-      <xsl:call-template name="pi.dbhtml_bgcolor"/>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:variable name="class">
-    <xsl:if test="processing-instruction('dbhtml')">
-      <xsl:call-template name="pi.dbhtml_class"/>
-    </xsl:if>
-  </xsl:variable>
-
-  <tr>
-    <xsl:call-template name="tr.attributes">
-      <xsl:with-param name="rownum">
-        <xsl:number from="tgroup" count="row"/>
-      </xsl:with-param>
-    </xsl:call-template>
-
-    <xsl:if test="$row-height != ''">
-      <xsl:attribute name="height">
-        <xsl:value-of select="$row-height"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:if test="$bgcolor != ''">
-      <xsl:attribute name="bgcolor">
-        <xsl:value-of select="$bgcolor"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:if test="$class != ''">
-      <xsl:attribute name="class">
-        <xsl:value-of select="$class"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:if test="$table.borders.with.css != 0">
-      <xsl:if test="@rowsep = 1 and following-sibling::row">
-        <xsl:attribute name="style">
-          <xsl:call-template name="border">
-            <xsl:with-param name="side" select="'bottom'"/>
-          </xsl:call-template>
-        </xsl:attribute>
-      </xsl:if>
-    </xsl:if>
-
-    <xsl:if test="@align">
-      <xsl:attribute name="align">
-        <xsl:value-of select="@align"/>
-      </xsl:attribute>
-    </xsl:if>
-    <xsl:if test="@char">
-      <xsl:attribute name="char">
-        <xsl:value-of select="@char"/>
-      </xsl:attribute>
-    </xsl:if>
-    <xsl:if test="@charoff">
-      <xsl:attribute name="charoff">
-        <xsl:value-of select="@charoff"/>
-      </xsl:attribute>
-    </xsl:if>
-    <xsl:if test="@valign">
-      <xsl:attribute name="valign">
-        <xsl:value-of select="@valign"/>
-      </xsl:attribute>
-    </xsl:if>
-
-    <xsl:apply-templates select="(entry|entrytbl)[1]">
-      <xsl:with-param name="spans" select="$spans"/>
-    </xsl:apply-templates>
-  </tr>
-
-  <xsl:if test="following-sibling::row">
-    <xsl:variable name="nextspans">
-      <xsl:apply-templates select="(entry|entrytbl)[1]" mode="span">
-        <xsl:with-param name="spans" select="$spans"/>
-      </xsl:apply-templates>
-    </xsl:variable>
-
-    <xsl:apply-templates select="following-sibling::row[1]">
-      <xsl:with-param name="spans" select="$nextspans"/>
-    </xsl:apply-templates>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="entry|entrytbl" name="entry">
-  <xsl:param name="col" select="1"/>
-  <xsl:param name="spans"/>
-
-  <xsl:variable name="cellgi">
-    <xsl:choose>
-      <xsl:when test="ancestor::thead">th</xsl:when>
-      <xsl:when test="ancestor::tfoot">th</xsl:when>
-      <xsl:otherwise>td</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="empty.cell" select="count(node()) = 0"/>
-
-  <xsl:variable name="named.colnum">
-    <xsl:call-template name="entry.colnum"/>
-  </xsl:variable>
-
-  <xsl:variable name="entry.colnum">
-    <xsl:choose>
-      <xsl:when test="$named.colnum &gt; 0">
-        <xsl:value-of select="$named.colnum"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$col"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="entry.colspan">
-    <xsl:choose>
-      <xsl:when test="@spanname or @namest">
-        <xsl:call-template name="calculate.colspan"/>
-      </xsl:when>
-      <xsl:otherwise>1</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="following.spans">
-    <xsl:call-template name="calculate.following.spans">
-      <xsl:with-param name="colspan" select="$entry.colspan"/>
-      <xsl:with-param name="spans" select="$spans"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="rowsep">
-    <xsl:choose>
-      <!-- If this is the last row, rowsep never applies. -->
-      <xsl:when test="ancestor::entrytbl                       and not (ancestor-or-self::row[1]/following-sibling::row)">
-        <xsl:value-of select="0"/>
-      </xsl:when>
-      <xsl:when test="not(ancestor-or-self::row[1]/following-sibling::row                           or ancestor-or-self::thead/following-sibling::tbody                           or ancestor-or-self::tbody/preceding-sibling::tfoot)">
-        <xsl:value-of select="0"/>
-      </xsl:when>
-      <xsl:when test="@morerows and not(@morerows &lt;                   count(ancestor-or-self::row[1]/following-sibling::row))">
-        <xsl:value-of select="0"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="inherited.table.attribute">
-          <xsl:with-param name="entry" select="."/>
-          <xsl:with-param name="colnum" select="$entry.colnum"/>
-          <xsl:with-param name="attribute" select="'rowsep'"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="colsep">
-    <xsl:choose>
-      <!-- If this is the last column, colsep never applies. -->
-      <xsl:when test="$following.spans = ''">0</xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="inherited.table.attribute">
-          <xsl:with-param name="entry" select="."/>
-          <xsl:with-param name="colnum" select="$entry.colnum"/>
-          <xsl:with-param name="attribute" select="'colsep'"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="valign">
-    <xsl:call-template name="inherited.table.attribute">
-      <xsl:with-param name="entry" select="."/>
-      <xsl:with-param name="colnum" select="$entry.colnum"/>
-      <xsl:with-param name="attribute" select="'valign'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="align">
-    <xsl:call-template name="inherited.table.attribute">
-      <xsl:with-param name="entry" select="."/>
-      <xsl:with-param name="colnum" select="$entry.colnum"/>
-      <xsl:with-param name="attribute" select="'align'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="char">
-    <xsl:call-template name="inherited.table.attribute">
-      <xsl:with-param name="entry" select="."/>
-      <xsl:with-param name="colnum" select="$entry.colnum"/>
-      <xsl:with-param name="attribute" select="'char'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="charoff">
-    <xsl:call-template name="inherited.table.attribute">
-      <xsl:with-param name="entry" select="."/>
-      <xsl:with-param name="colnum" select="$entry.colnum"/>
-      <xsl:with-param name="attribute" select="'charoff'"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$spans != '' and not(starts-with($spans,'0:'))">
-      <xsl:call-template name="entry">
-        <xsl:with-param name="col" select="$col+1"/>
-        <xsl:with-param name="spans" select="substring-after($spans,':')"/>
-      </xsl:call-template>
-    </xsl:when>
-
-    <xsl:when test="number($entry.colnum) &gt; $col">
-      <xsl:call-template name="empty.table.cell"/>
-      <xsl:call-template name="entry">
-        <xsl:with-param name="col" select="$col+1"/>
-        <xsl:with-param name="spans" select="substring-after($spans,':')"/>
-      </xsl:call-template>
-    </xsl:when>
-
-    <xsl:otherwise>
-      <xsl:variable name="bgcolor">
-        <xsl:if test="processing-instruction('dbhtml')">
-          <xsl:call-template name="pi.dbhtml_bgcolor"/>
-        </xsl:if>
-      </xsl:variable>
-
-      <xsl:element name="{$cellgi}" namespace="http://www.w3.org/1999/xhtml">
-        <xsl:if test="$bgcolor != ''">
-          <xsl:attribute name="bgcolor">
-            <xsl:value-of select="$bgcolor"/>
-          </xsl:attribute>
-        </xsl:if>
-
-        <xsl:if test="$entry.propagates.style != 0 and @role">
-          <xsl:apply-templates select="." mode="class.attribute">
-            <xsl:with-param name="class" select="@role"/>
-          </xsl:apply-templates>
-        </xsl:if>
-
-        <xsl:if test="$show.revisionflag and @revisionflag">
-          <xsl:attribute name="class">
-            <xsl:value-of select="@revisionflag"/>
-          </xsl:attribute>
-        </xsl:if>
-
-        <xsl:if test="$table.borders.with.css != 0">
-          <xsl:attribute name="style">
-            <xsl:if test="$colsep &gt; 0">
-              <xsl:call-template name="border">
-                <xsl:with-param name="side" select="'right'"/>
-              </xsl:call-template>
-            </xsl:if>
-            <xsl:if test="$rowsep &gt; 0">
-              <xsl:call-template name="border">
-                <xsl:with-param name="side" select="'bottom'"/>
-              </xsl:call-template>
-            </xsl:if>
-          </xsl:attribute>
-        </xsl:if>
-
-        <xsl:if test="@morerows &gt; 0">
-          <xsl:attribute name="rowspan">
-            <xsl:value-of select="1+@morerows"/>
-          </xsl:attribute>
-        </xsl:if>
-
-        <xsl:if test="$entry.colspan &gt; 1">
-          <xsl:attribute name="colspan">
-            <xsl:value-of select="$entry.colspan"/>
-          </xsl:attribute>
-        </xsl:if>
-
-        <xsl:if test="$align != ''">
-          <xsl:attribute name="align">
-            <xsl:value-of select="$align"/>
-          </xsl:attribute>
-        </xsl:if>
-
-        <xsl:if test="$valign != ''">
-          <xsl:attribute name="valign">
-            <xsl:value-of select="$valign"/>
-          </xsl:attribute>
-        </xsl:if>
-
-        <xsl:if test="$char != ''">
-          <xsl:attribute name="char">
-            <xsl:value-of select="$char"/>
-          </xsl:attribute>
-        </xsl:if>
-
-        <xsl:if test="$charoff != ''">
-          <xsl:attribute name="charoff">
-            <xsl:value-of select="$charoff"/>
-          </xsl:attribute>
-        </xsl:if>
-
-        <xsl:if test="not(preceding-sibling::*) and                      (ancestor::row[1]/@id or ancestor::row[1]/@xml:id)">
-          <xsl:call-template name="anchor">
-            <xsl:with-param name="node" select="ancestor::row[1]"/>
-          </xsl:call-template>
-        </xsl:if>
-
-        <xsl:call-template name="anchor"/>
-
-        <xsl:choose>
-          <xsl:when test="$empty.cell">
-            <xsl:text>&#160;</xsl:text>
-          </xsl:when>
-          <xsl:when test="self::entrytbl">
-            <xsl:call-template name="tgroup"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:apply-templates/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:element>
-
-      <xsl:choose>
-        <xsl:when test="following-sibling::entry|following-sibling::entrytbl">
-          <xsl:apply-templates select="(following-sibling::entry                                        |following-sibling::entrytbl)[1]">
-            <xsl:with-param name="col" select="$col+$entry.colspan"/>
-            <xsl:with-param name="spans" select="$following.spans"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="finaltd">
-            <xsl:with-param name="spans" select="$following.spans"/>
-            <xsl:with-param name="col" select="$col+$entry.colspan"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="entry|entrytbl" name="sentry" mode="span">
-  <xsl:param name="col" select="1"/>
-  <xsl:param name="spans"/>
-
-  <xsl:variable name="entry.colnum">
-    <xsl:call-template name="entry.colnum"/>
-  </xsl:variable>
-
-  <xsl:variable name="entry.colspan">
-    <xsl:choose>
-      <xsl:when test="@spanname or @namest">
-        <xsl:call-template name="calculate.colspan"/>
-      </xsl:when>
-      <xsl:otherwise>1</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="following.spans">
-    <xsl:call-template name="calculate.following.spans">
-      <xsl:with-param name="colspan" select="$entry.colspan"/>
-      <xsl:with-param name="spans" select="$spans"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$spans != '' and not(starts-with($spans,'0:'))">
-      <xsl:value-of select="substring-before($spans,':')-1"/>
-      <xsl:text>:</xsl:text>
-      <xsl:call-template name="sentry">
-        <xsl:with-param name="col" select="$col+1"/>
-        <xsl:with-param name="spans" select="substring-after($spans,':')"/>
-      </xsl:call-template>
-    </xsl:when>
-
-    <xsl:when test="number($entry.colnum) &gt; $col">
-      <xsl:text>0:</xsl:text>
-      <xsl:call-template name="sentry">
-        <xsl:with-param name="col" select="$col+$entry.colspan"/>
-        <xsl:with-param name="spans" select="$following.spans"/>
-      </xsl:call-template>
-    </xsl:when>
-
-    <xsl:otherwise>
-      <xsl:call-template name="copy-string">
-        <xsl:with-param name="count" select="$entry.colspan"/>
-        <xsl:with-param name="string">
-          <xsl:choose>
-            <xsl:when test="@morerows">
-              <xsl:value-of select="@morerows"/>
-            </xsl:when>
-            <xsl:otherwise>0</xsl:otherwise>
-          </xsl:choose>
-          <xsl:text>:</xsl:text>
-        </xsl:with-param>
-      </xsl:call-template>
-
-      <xsl:choose>
-        <xsl:when test="following-sibling::entry|following-sibling::entrytbl">
-          <xsl:apply-templates select="(following-sibling::entry                                         |following-sibling::entrytbl)[1]" mode="span">
-            <xsl:with-param name="col" select="$col+$entry.colspan"/>
-            <xsl:with-param name="spans" select="$following.spans"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="sfinaltd">
-            <xsl:with-param name="spans" select="$following.spans"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="generate.colgroup">
-  <xsl:param name="cols" select="1"/>
-  <xsl:param name="count" select="1"/>
-  <xsl:choose>
-    <xsl:when test="$count &gt; $cols"/>
-    <xsl:otherwise>
-      <xsl:call-template name="generate.col">
-        <xsl:with-param name="countcol" select="$count"/>
-      </xsl:call-template>
-      <xsl:call-template name="generate.colgroup">
-        <xsl:with-param name="cols" select="$cols"/>
-        <xsl:with-param name="count" select="$count+1"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="generate.col">
-  <xsl:param name="countcol">1</xsl:param>
-  <xsl:param name="colspecs" select="./colspec"/>
-  <xsl:param name="count">1</xsl:param>
-  <xsl:param name="colnum">1</xsl:param>
-
-  <xsl:choose>
-    <xsl:when test="$count&gt;count($colspecs)">
-      <col/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:variable name="colspec" select="$colspecs[$count=position()]"/>
-      <xsl:variable name="colspec.colnum">
-        <xsl:choose>
-          <xsl:when test="$colspec/@colnum">
-            <xsl:value-of select="$colspec/@colnum"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="$colnum"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:variable>
-
-      <xsl:choose>
-        <xsl:when test="$colspec.colnum=$countcol">
-          <col>
-            <xsl:if test="$colspec/@colwidth                           and $use.extensions != 0                           and $tablecolumns.extension != 0">
-              <xsl:attribute name="width">
-	        <xsl:choose>
-		  <xsl:when test="normalize-space($colspec/@colwidth) = '*'">
-                    <xsl:value-of select="'1*'"/>
-		  </xsl:when>
-		  <xsl:otherwise>
-                    <xsl:value-of select="$colspec/@colwidth"/>
-		  </xsl:otherwise>
-		</xsl:choose>
-              </xsl:attribute>
-            </xsl:if>
-
-            <xsl:choose>
-              <xsl:when test="$colspec/@align">
-                <xsl:attribute name="align">
-                  <xsl:value-of select="$colspec/@align"/>
-                </xsl:attribute>
-              </xsl:when>
-              <!-- Suggested by Pavel ZAMPACH <zampach@nemcb.cz> -->
-              <xsl:when test="$colspecs/ancestor::tgroup/@align">
-                <xsl:attribute name="align">
-                  <xsl:value-of select="$colspecs/ancestor::tgroup/@align"/>
-                </xsl:attribute>
-              </xsl:when>
-            </xsl:choose>
-
-            <xsl:if test="$colspec/@char">
-              <xsl:attribute name="char">
-                <xsl:value-of select="$colspec/@char"/>
-              </xsl:attribute>
-            </xsl:if>
-            <xsl:if test="$colspec/@charoff">
-              <xsl:attribute name="charoff">
-                <xsl:value-of select="$colspec/@charoff"/>
-              </xsl:attribute>
-            </xsl:if>
-          </col>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="generate.col">
-            <xsl:with-param name="countcol" select="$countcol"/>
-            <xsl:with-param name="colspecs" select="$colspecs"/>
-            <xsl:with-param name="count" select="$count+1"/>
-            <xsl:with-param name="colnum">
-              <xsl:choose>
-                <xsl:when test="$colspec/@colnum">
-                  <xsl:value-of select="$colspec/@colnum + 1"/>
-                </xsl:when>
-                <xsl:otherwise>
-                  <xsl:value-of select="$colnum + 1"/>
-                </xsl:otherwise>
-              </xsl:choose>
-            </xsl:with-param>
-           </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="colspec.colwidth">
-  <!-- when this macro is called, the current context must be an entry -->
-  <xsl:param name="colname"/>
-  <!-- .. = row, ../.. = thead|tbody, ../../.. = tgroup -->
-  <xsl:param name="colspecs" select="../../../../tgroup/colspec"/>
-  <xsl:param name="count">1</xsl:param>
-  <xsl:choose>
-    <xsl:when test="$count&gt;count($colspecs)"/>
-    <xsl:otherwise>
-      <xsl:variable name="colspec" select="$colspecs[$count=position()]"/>
-      <xsl:choose>
-        <xsl:when test="$colspec/@colname=$colname">
-          <xsl:value-of select="$colspec/@colwidth"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="colspec.colwidth">
-            <xsl:with-param name="colname" select="$colname"/>
-            <xsl:with-param name="colspecs" select="$colspecs"/>
-            <xsl:with-param name="count" select="$count+1"/>
-          </xsl:call-template>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ====================================================================== -->
-
-<xsl:template name="tr.attributes">
-  <xsl:param name="row" select="."/>
-  <xsl:param name="rownum" select="0"/>
-
-  <!-- by default, do nothing. But you might want to say:
-
-  <xsl:if test="$rownum mod 2 = 0">
-    <xsl:attribute name="class">oddrow</xsl:attribute>
-  </xsl:if>
-
-  -->
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/task.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/task.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,73 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:template match="task">
-  <xsl:variable name="param.placement" select="substring-after(normalize-space($formal.title.placement),                                         concat(local-name(.), ' '))"/>
-
-  <xsl:variable name="placement">
-    <xsl:choose>
-      <xsl:when test="contains($param.placement, ' ')">
-        <xsl:value-of select="substring-before($param.placement, ' ')"/>
-      </xsl:when>
-      <xsl:when test="$param.placement = ''">before</xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$param.placement"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="preamble" select="*[not(self::title                               or self::titleabbrev)]"/>
-
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="anchor"/>
-
-    <xsl:if test="title and $placement = 'before'">
-      <xsl:call-template name="formal.object.heading"/>
-    </xsl:if>
-
-    <xsl:apply-templates select="$preamble"/>
-
-    <xsl:if test="title and $placement != 'before'">
-      <xsl:call-template name="formal.object.heading"/>
-    </xsl:if>
-  </div>
-</xsl:template>
-
-<xsl:template match="task/title">
-  <!-- nop -->
-</xsl:template>
-
-<xsl:template match="tasksummary">
-  <xsl:call-template name="semiformal.object"/>
-</xsl:template>
-
-<xsl:template match="tasksummary/title"/>
-
-<xsl:template match="taskprerequisites">
-  <xsl:call-template name="semiformal.object"/>
-</xsl:template>
-
-<xsl:template match="taskprerequisites/title"/>
-
-<xsl:template match="taskrelated">
-  <xsl:call-template name="semiformal.object"/>
-</xsl:template>
-
-<xsl:template match="taskrelated/title"/>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/titlepage.templates.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/titlepage.templates.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,3622 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="exsl">
-
-<!-- This stylesheet was created by template/titlepage.xsl-->
-
-<xsl:template name="article.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="articleinfo/title">
-      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/title"/>
-    </xsl:when>
-    <xsl:when test="artheader/title">
-      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="articleinfo/subtitle">
-      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="artheader/subtitle">
-      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/corpauthor"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/corpauthor"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/authorgroup"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/authorgroup"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/author"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/author"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/othercredit"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/othercredit"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/releaseinfo"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/releaseinfo"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/copyright"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/copyright"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/legalnotice"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/legalnotice"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/pubdate"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/pubdate"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/revision"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/revision"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/revhistory"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/revhistory"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/revhistory"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/abstract"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/abstract"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
-<xsl:template name="article.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="article.titlepage.separator"><hr/>
-</xsl:template>
-
-<xsl:template name="article.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="article.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="article.titlepage">
-  <div class="titlepage">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="article.titlepage.before.recto"/>
-      <xsl:call-template name="article.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$recto.content"/></div>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="article.titlepage.before.verso"/>
-      <xsl:call-template name="article.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$verso.content"/></div>
-    </xsl:if>
-    <xsl:call-template name="article.titlepage.separator"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="*" mode="article.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="article.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="article.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="article.titlepage.recto.style">
-<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="article.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="article.titlepage.recto.style">
-<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="article.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="article.titlepage.recto.style">
-<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="article.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="article.titlepage.recto.style">
-<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="author" mode="article.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="article.titlepage.recto.style">
-<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="article.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="article.titlepage.recto.style">
-<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="article.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="article.titlepage.recto.style">
-<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="copyright" mode="article.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="article.titlepage.recto.style">
-<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="article.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="article.titlepage.recto.style">
-<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="article.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="article.titlepage.recto.style">
-<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revision" mode="article.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="article.titlepage.recto.style">
-<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="article.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="article.titlepage.recto.style">
-<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="abstract" mode="article.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="article.titlepage.recto.style">
-<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template name="set.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="setinfo/title">
-      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="setinfo/subtitle">
-      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/corpauthor"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/authorgroup"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/author"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/othercredit"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/releaseinfo"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/copyright"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/legalnotice"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/pubdate"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revision"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revhistory"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revhistory"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/abstract"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
-<xsl:template name="set.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="set.titlepage.separator"><hr/>
-</xsl:template>
-
-<xsl:template name="set.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="set.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="set.titlepage">
-  <div class="titlepage">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="set.titlepage.before.recto"/>
-      <xsl:call-template name="set.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$recto.content"/></div>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="set.titlepage.before.verso"/>
-      <xsl:call-template name="set.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$verso.content"/></div>
-    </xsl:if>
-    <xsl:call-template name="set.titlepage.separator"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="*" mode="set.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="set.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="set.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="set.titlepage.recto.style">
-<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="set.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="set.titlepage.recto.style">
-<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="set.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="set.titlepage.recto.style">
-<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="set.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="set.titlepage.recto.style">
-<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="author" mode="set.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="set.titlepage.recto.style">
-<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="set.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="set.titlepage.recto.style">
-<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="set.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="set.titlepage.recto.style">
-<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="copyright" mode="set.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="set.titlepage.recto.style">
-<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="set.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="set.titlepage.recto.style">
-<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="set.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="set.titlepage.recto.style">
-<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revision" mode="set.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="set.titlepage.recto.style">
-<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="set.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="set.titlepage.recto.style">
-<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="abstract" mode="set.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="set.titlepage.recto.style">
-<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template name="book.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="bookinfo/title">
-      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="bookinfo/subtitle">
-      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/corpauthor"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/authorgroup"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/author"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/othercredit"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/releaseinfo"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/copyright"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/legalnotice"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/pubdate"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/revision"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/revhistory"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/revhistory"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/abstract"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
-<xsl:template name="book.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="book.titlepage.separator"><hr/>
-</xsl:template>
-
-<xsl:template name="book.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="book.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="book.titlepage">
-  <div class="titlepage">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="book.titlepage.before.recto"/>
-      <xsl:call-template name="book.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$recto.content"/></div>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="book.titlepage.before.verso"/>
-      <xsl:call-template name="book.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$verso.content"/></div>
-    </xsl:if>
-    <xsl:call-template name="book.titlepage.separator"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="*" mode="book.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="book.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="book.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="book.titlepage.recto.style">
-<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="book.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="book.titlepage.recto.style">
-<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="book.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="book.titlepage.recto.style">
-<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="book.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="book.titlepage.recto.style">
-<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="author" mode="book.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="book.titlepage.recto.style">
-<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="book.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="book.titlepage.recto.style">
-<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="book.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="book.titlepage.recto.style">
-<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="copyright" mode="book.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="book.titlepage.recto.style">
-<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="book.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="book.titlepage.recto.style">
-<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="book.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="book.titlepage.recto.style">
-<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revision" mode="book.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="book.titlepage.recto.style">
-<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="book.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="book.titlepage.recto.style">
-<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="abstract" mode="book.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="book.titlepage.recto.style">
-<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template name="part.titlepage.recto">
-  <div xsl:use-attribute-sets="part.titlepage.recto.style">
-<xsl:call-template name="division.title">
-<xsl:with-param name="node" select="ancestor-or-self::part[1]"/>
-</xsl:call-template></div>
-  <xsl:choose>
-    <xsl:when test="partinfo/subtitle">
-      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/corpauthor"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/authorgroup"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/author"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/author"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/othercredit"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/releaseinfo"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/copyright"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/copyright"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/legalnotice"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/pubdate"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/revision"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/revision"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/revhistory"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/revhistory"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/abstract"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/abstract"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
-<xsl:template name="part.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="part.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="part.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="part.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="part.titlepage">
-  <div class="titlepage">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="part.titlepage.before.recto"/>
-      <xsl:call-template name="part.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$recto.content"/></div>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="part.titlepage.before.verso"/>
-      <xsl:call-template name="part.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$verso.content"/></div>
-    </xsl:if>
-    <xsl:call-template name="part.titlepage.separator"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="*" mode="part.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="part.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="part.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="part.titlepage.recto.style">
-<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="part.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="part.titlepage.recto.style">
-<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="part.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="part.titlepage.recto.style">
-<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="author" mode="part.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="part.titlepage.recto.style">
-<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="part.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="part.titlepage.recto.style">
-<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="part.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="part.titlepage.recto.style">
-<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="copyright" mode="part.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="part.titlepage.recto.style">
-<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="part.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="part.titlepage.recto.style">
-<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="part.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="part.titlepage.recto.style">
-<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revision" mode="part.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="part.titlepage.recto.style">
-<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="part.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="part.titlepage.recto.style">
-<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="abstract" mode="part.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="part.titlepage.recto.style">
-<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template name="partintro.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="partintroinfo/title">
-      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/title"/>
-    </xsl:when>
-    <xsl:when test="docinfo/title">
-      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="partintroinfo/subtitle">
-      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/corpauthor"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/authorgroup"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/author"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/author"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/othercredit"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/releaseinfo"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/copyright"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/copyright"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/legalnotice"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/pubdate"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revision"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revision"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revhistory"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revhistory"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/abstract"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/abstract"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
-<xsl:template name="partintro.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="partintro.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="partintro.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="partintro.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="partintro.titlepage">
-  <div>
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="partintro.titlepage.before.recto"/>
-      <xsl:call-template name="partintro.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$recto.content"/></div>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="partintro.titlepage.before.verso"/>
-      <xsl:call-template name="partintro.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$verso.content"/></div>
-    </xsl:if>
-    <xsl:call-template name="partintro.titlepage.separator"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="*" mode="partintro.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="partintro.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="partintro.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
-<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="partintro.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
-<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="partintro.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
-<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="partintro.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
-<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="author" mode="partintro.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
-<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="partintro.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
-<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="partintro.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
-<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="copyright" mode="partintro.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
-<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="partintro.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
-<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="partintro.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
-<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revision" mode="partintro.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
-<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="partintro.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
-<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="abstract" mode="partintro.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
-<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template name="reference.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="referenceinfo/title">
-      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/title"/>
-    </xsl:when>
-    <xsl:when test="docinfo/title">
-      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="referenceinfo/subtitle">
-      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/corpauthor"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/authorgroup"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/author"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/author"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/othercredit"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/releaseinfo"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/copyright"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/copyright"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/legalnotice"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/pubdate"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revision"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revision"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revhistory"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revhistory"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/abstract"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/abstract"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
-<xsl:template name="reference.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="reference.titlepage.separator"><hr/>
-</xsl:template>
-
-<xsl:template name="reference.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="reference.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="reference.titlepage">
-  <div class="titlepage">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="reference.titlepage.before.recto"/>
-      <xsl:call-template name="reference.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$recto.content"/></div>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="reference.titlepage.before.verso"/>
-      <xsl:call-template name="reference.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$verso.content"/></div>
-    </xsl:if>
-    <xsl:call-template name="reference.titlepage.separator"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="*" mode="reference.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="reference.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="reference.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="reference.titlepage.recto.style">
-<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="reference.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="reference.titlepage.recto.style">
-<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="reference.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="reference.titlepage.recto.style">
-<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="reference.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="reference.titlepage.recto.style">
-<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="author" mode="reference.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="reference.titlepage.recto.style">
-<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="reference.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="reference.titlepage.recto.style">
-<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="reference.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="reference.titlepage.recto.style">
-<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="copyright" mode="reference.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="reference.titlepage.recto.style">
-<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="reference.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="reference.titlepage.recto.style">
-<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="reference.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="reference.titlepage.recto.style">
-<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revision" mode="reference.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="reference.titlepage.recto.style">
-<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="reference.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="reference.titlepage.recto.style">
-<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="abstract" mode="reference.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="reference.titlepage.recto.style">
-<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template name="refentry.titlepage.recto">
-</xsl:template>
-
-<xsl:template name="refentry.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="refentry.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="refentry.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="refentry.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="refentry.titlepage">
-  <div class="titlepage">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="refentry.titlepage.before.recto"/>
-      <xsl:call-template name="refentry.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$recto.content"/></div>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="refentry.titlepage.before.verso"/>
-      <xsl:call-template name="refentry.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$verso.content"/></div>
-    </xsl:if>
-    <xsl:call-template name="refentry.titlepage.separator"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="*" mode="refentry.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="refentry.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template name="dedication.titlepage.recto">
-  <div xsl:use-attribute-sets="dedication.titlepage.recto.style">
-<xsl:call-template name="component.title">
-<xsl:with-param name="node" select="ancestor-or-self::dedication[1]"/>
-</xsl:call-template></div>
-  <xsl:choose>
-    <xsl:when test="dedicationinfo/subtitle">
-      <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="dedicationinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-</xsl:template>
-
-<xsl:template name="dedication.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="dedication.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="dedication.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="dedication.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="dedication.titlepage">
-  <div class="titlepage">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="dedication.titlepage.before.recto"/>
-      <xsl:call-template name="dedication.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$recto.content"/></div>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="dedication.titlepage.before.verso"/>
-      <xsl:call-template name="dedication.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$verso.content"/></div>
-    </xsl:if>
-    <xsl:call-template name="dedication.titlepage.separator"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="*" mode="dedication.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="dedication.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="dedication.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="dedication.titlepage.recto.style">
-<xsl:apply-templates select="." mode="dedication.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template name="preface.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="prefaceinfo/title">
-      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/title"/>
-    </xsl:when>
-    <xsl:when test="docinfo/title">
-      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="prefaceinfo/subtitle">
-      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/corpauthor"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/authorgroup"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/author"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/author"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/othercredit"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/releaseinfo"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/copyright"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/copyright"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/legalnotice"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/pubdate"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revision"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revision"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revhistory"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revhistory"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/abstract"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/abstract"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
-<xsl:template name="preface.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="preface.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="preface.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="preface.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="preface.titlepage">
-  <div class="titlepage">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="preface.titlepage.before.recto"/>
-      <xsl:call-template name="preface.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$recto.content"/></div>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="preface.titlepage.before.verso"/>
-      <xsl:call-template name="preface.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$verso.content"/></div>
-    </xsl:if>
-    <xsl:call-template name="preface.titlepage.separator"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="*" mode="preface.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="preface.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="preface.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="preface.titlepage.recto.style">
-<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="preface.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="preface.titlepage.recto.style">
-<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="preface.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="preface.titlepage.recto.style">
-<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="preface.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="preface.titlepage.recto.style">
-<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="author" mode="preface.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="preface.titlepage.recto.style">
-<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="preface.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="preface.titlepage.recto.style">
-<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="preface.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="preface.titlepage.recto.style">
-<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="copyright" mode="preface.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="preface.titlepage.recto.style">
-<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="preface.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="preface.titlepage.recto.style">
-<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="preface.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="preface.titlepage.recto.style">
-<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revision" mode="preface.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="preface.titlepage.recto.style">
-<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="preface.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="preface.titlepage.recto.style">
-<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="abstract" mode="preface.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="preface.titlepage.recto.style">
-<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template name="chapter.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="chapterinfo/title">
-      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/title"/>
-    </xsl:when>
-    <xsl:when test="docinfo/title">
-      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="chapterinfo/subtitle">
-      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/corpauthor"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/authorgroup"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/author"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/author"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/othercredit"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/releaseinfo"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/copyright"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/copyright"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/legalnotice"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/pubdate"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revision"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revision"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revhistory"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revhistory"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/abstract"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/abstract"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
-<xsl:template name="chapter.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="chapter.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="chapter.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="chapter.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="chapter.titlepage">
-  <div class="titlepage">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="chapter.titlepage.before.recto"/>
-      <xsl:call-template name="chapter.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$recto.content"/></div>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="chapter.titlepage.before.verso"/>
-      <xsl:call-template name="chapter.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$verso.content"/></div>
-    </xsl:if>
-    <xsl:call-template name="chapter.titlepage.separator"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="*" mode="chapter.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="chapter.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
-<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="chapter.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
-<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="chapter.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
-<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="chapter.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
-<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="author" mode="chapter.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
-<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="chapter.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
-<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="chapter.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
-<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="copyright" mode="chapter.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
-<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="chapter.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
-<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="chapter.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
-<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revision" mode="chapter.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
-<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="chapter.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
-<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="abstract" mode="chapter.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
-<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template name="appendix.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="appendixinfo/title">
-      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/title"/>
-    </xsl:when>
-    <xsl:when test="docinfo/title">
-      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="appendixinfo/subtitle">
-      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/corpauthor"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/authorgroup"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/author"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/author"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/othercredit"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/releaseinfo"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/copyright"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/copyright"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/legalnotice"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/pubdate"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revision"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revision"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revhistory"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revhistory"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/abstract"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/abstract"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
-<xsl:template name="appendix.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="appendix.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="appendix.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="appendix.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="appendix.titlepage">
-  <div class="titlepage">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="appendix.titlepage.before.recto"/>
-      <xsl:call-template name="appendix.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$recto.content"/></div>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="appendix.titlepage.before.verso"/>
-      <xsl:call-template name="appendix.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$verso.content"/></div>
-    </xsl:if>
-    <xsl:call-template name="appendix.titlepage.separator"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="*" mode="appendix.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="appendix.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="appendix.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
-<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="appendix.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
-<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="appendix.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
-<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="appendix.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
-<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="author" mode="appendix.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
-<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="appendix.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
-<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="appendix.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
-<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="copyright" mode="appendix.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
-<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="appendix.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
-<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="appendix.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
-<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revision" mode="appendix.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
-<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="appendix.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
-<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="abstract" mode="appendix.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
-<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template name="section.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="sectioninfo/title">
-      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="sectioninfo/subtitle">
-      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/corpauthor"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/authorgroup"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/author"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/othercredit"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/releaseinfo"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/copyright"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/legalnotice"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/pubdate"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revision"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revhistory"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revhistory"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/abstract"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
-<xsl:template name="section.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="section.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
-</xsl:template>
-
-<xsl:template name="section.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="section.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="section.titlepage">
-  <div class="titlepage">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="section.titlepage.before.recto"/>
-      <xsl:call-template name="section.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$recto.content"/></div>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="section.titlepage.before.verso"/>
-      <xsl:call-template name="section.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$verso.content"/></div>
-    </xsl:if>
-    <xsl:call-template name="section.titlepage.separator"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="*" mode="section.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="section.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="section.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="section.titlepage.recto.style">
-<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="section.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="section.titlepage.recto.style">
-<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="section.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="section.titlepage.recto.style">
-<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="section.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="section.titlepage.recto.style">
-<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="author" mode="section.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="section.titlepage.recto.style">
-<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="section.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="section.titlepage.recto.style">
-<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="section.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="section.titlepage.recto.style">
-<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="copyright" mode="section.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="section.titlepage.recto.style">
-<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="section.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="section.titlepage.recto.style">
-<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="section.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="section.titlepage.recto.style">
-<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revision" mode="section.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="section.titlepage.recto.style">
-<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="section.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="section.titlepage.recto.style">
-<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="abstract" mode="section.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="section.titlepage.recto.style">
-<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template name="sect1.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="sect1info/title">
-      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="sect1info/subtitle">
-      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/corpauthor"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/authorgroup"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/author"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/othercredit"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/releaseinfo"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/copyright"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/legalnotice"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/pubdate"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revision"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revhistory"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revhistory"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/abstract"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
-<xsl:template name="sect1.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="sect1.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
-</xsl:template>
-
-<xsl:template name="sect1.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="sect1.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="sect1.titlepage">
-  <div class="titlepage">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="sect1.titlepage.before.recto"/>
-      <xsl:call-template name="sect1.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$recto.content"/></div>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="sect1.titlepage.before.verso"/>
-      <xsl:call-template name="sect1.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$verso.content"/></div>
-    </xsl:if>
-    <xsl:call-template name="sect1.titlepage.separator"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="*" mode="sect1.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="sect1.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="sect1.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="sect1.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="sect1.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="sect1.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="author" mode="sect1.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="sect1.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="sect1.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="copyright" mode="sect1.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="sect1.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="sect1.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revision" mode="sect1.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="sect1.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="abstract" mode="sect1.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template name="sect2.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="sect2info/title">
-      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="sect2info/subtitle">
-      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/corpauthor"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/authorgroup"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/author"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/othercredit"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/releaseinfo"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/copyright"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/legalnotice"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/pubdate"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revision"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revhistory"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revhistory"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/abstract"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
-<xsl:template name="sect2.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="sect2.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
-</xsl:template>
-
-<xsl:template name="sect2.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="sect2.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="sect2.titlepage">
-  <div class="titlepage">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="sect2.titlepage.before.recto"/>
-      <xsl:call-template name="sect2.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$recto.content"/></div>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="sect2.titlepage.before.verso"/>
-      <xsl:call-template name="sect2.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$verso.content"/></div>
-    </xsl:if>
-    <xsl:call-template name="sect2.titlepage.separator"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="*" mode="sect2.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="sect2.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="sect2.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="sect2.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="sect2.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="sect2.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="author" mode="sect2.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="sect2.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="sect2.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="copyright" mode="sect2.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="sect2.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="sect2.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revision" mode="sect2.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="sect2.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="abstract" mode="sect2.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template name="sect3.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="sect3info/title">
-      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="sect3info/subtitle">
-      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/corpauthor"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/authorgroup"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/author"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/othercredit"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/releaseinfo"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/copyright"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/legalnotice"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/pubdate"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revision"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revhistory"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revhistory"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/abstract"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
-<xsl:template name="sect3.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="sect3.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
-</xsl:template>
-
-<xsl:template name="sect3.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="sect3.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="sect3.titlepage">
-  <div class="titlepage">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="sect3.titlepage.before.recto"/>
-      <xsl:call-template name="sect3.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$recto.content"/></div>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="sect3.titlepage.before.verso"/>
-      <xsl:call-template name="sect3.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$verso.content"/></div>
-    </xsl:if>
-    <xsl:call-template name="sect3.titlepage.separator"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="*" mode="sect3.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="sect3.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="sect3.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="sect3.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="sect3.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="sect3.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="author" mode="sect3.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="sect3.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="sect3.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="copyright" mode="sect3.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="sect3.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="sect3.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revision" mode="sect3.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="sect3.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="abstract" mode="sect3.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template name="sect4.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="sect4info/title">
-      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="sect4info/subtitle">
-      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/corpauthor"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/authorgroup"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/author"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/othercredit"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/releaseinfo"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/copyright"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/legalnotice"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/pubdate"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revision"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revhistory"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revhistory"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/abstract"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
-<xsl:template name="sect4.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="sect4.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
-</xsl:template>
-
-<xsl:template name="sect4.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="sect4.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="sect4.titlepage">
-  <div class="titlepage">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="sect4.titlepage.before.recto"/>
-      <xsl:call-template name="sect4.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$recto.content"/></div>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="sect4.titlepage.before.verso"/>
-      <xsl:call-template name="sect4.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$verso.content"/></div>
-    </xsl:if>
-    <xsl:call-template name="sect4.titlepage.separator"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="*" mode="sect4.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="sect4.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="sect4.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="sect4.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="sect4.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="sect4.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="author" mode="sect4.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="sect4.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="sect4.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="copyright" mode="sect4.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="sect4.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="sect4.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revision" mode="sect4.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="sect4.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="abstract" mode="sect4.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template name="sect5.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="sect5info/title">
-      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="sect5info/subtitle">
-      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/corpauthor"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/authorgroup"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/author"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/othercredit"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/releaseinfo"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/copyright"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/legalnotice"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/pubdate"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revision"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revhistory"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revhistory"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/abstract"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
-<xsl:template name="sect5.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="sect5.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
-</xsl:template>
-
-<xsl:template name="sect5.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="sect5.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="sect5.titlepage">
-  <div class="titlepage">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="sect5.titlepage.before.recto"/>
-      <xsl:call-template name="sect5.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$recto.content"/></div>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="sect5.titlepage.before.verso"/>
-      <xsl:call-template name="sect5.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$verso.content"/></div>
-    </xsl:if>
-    <xsl:call-template name="sect5.titlepage.separator"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="*" mode="sect5.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="sect5.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="sect5.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="sect5.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="sect5.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="sect5.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="author" mode="sect5.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="sect5.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="sect5.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="copyright" mode="sect5.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="sect5.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="sect5.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revision" mode="sect5.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="sect5.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="abstract" mode="sect5.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
-<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template name="simplesect.titlepage.recto">
-  <xsl:choose>
-    <xsl:when test="simplesectinfo/title">
-      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/title"/>
-    </xsl:when>
-    <xsl:when test="docinfo/title">
-      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/title"/>
-    </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/title"/>
-    </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="title"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:choose>
-    <xsl:when test="simplesectinfo/subtitle">
-      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/corpauthor"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/authorgroup"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/author"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/author"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/othercredit"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/releaseinfo"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/copyright"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/copyright"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/legalnotice"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/pubdate"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revision"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revision"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revhistory"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revhistory"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/abstract"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/abstract"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
-<xsl:template name="simplesect.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="simplesect.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
-</xsl:template>
-
-<xsl:template name="simplesect.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="simplesect.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="simplesect.titlepage">
-  <div class="titlepage">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="simplesect.titlepage.before.recto"/>
-      <xsl:call-template name="simplesect.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$recto.content"/></div>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="simplesect.titlepage.before.verso"/>
-      <xsl:call-template name="simplesect.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$verso.content"/></div>
-    </xsl:if>
-    <xsl:call-template name="simplesect.titlepage.separator"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="*" mode="simplesect.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="simplesect.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="simplesect.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
-<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="simplesect.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
-<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="simplesect.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
-<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="simplesect.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
-<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="author" mode="simplesect.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
-<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="simplesect.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
-<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="simplesect.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
-<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="copyright" mode="simplesect.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
-<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="simplesect.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
-<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="simplesect.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
-<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revision" mode="simplesect.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
-<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="simplesect.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
-<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template match="abstract" mode="simplesect.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
-<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template name="bibliography.titlepage.recto">
-  <div xsl:use-attribute-sets="bibliography.titlepage.recto.style">
-<xsl:call-template name="component.title">
-<xsl:with-param name="node" select="ancestor-or-self::bibliography[1]"/>
-</xsl:call-template></div>
-  <xsl:choose>
-    <xsl:when test="bibliographyinfo/subtitle">
-      <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="bibliographyinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-</xsl:template>
-
-<xsl:template name="bibliography.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="bibliography.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="bibliography.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="bibliography.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="bibliography.titlepage">
-  <div class="titlepage">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="bibliography.titlepage.before.recto"/>
-      <xsl:call-template name="bibliography.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$recto.content"/></div>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="bibliography.titlepage.before.verso"/>
-      <xsl:call-template name="bibliography.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$verso.content"/></div>
-    </xsl:if>
-    <xsl:call-template name="bibliography.titlepage.separator"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="*" mode="bibliography.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="bibliography.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="bibliography.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="bibliography.titlepage.recto.style">
-<xsl:apply-templates select="." mode="bibliography.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template name="glossary.titlepage.recto">
-  <div xsl:use-attribute-sets="glossary.titlepage.recto.style">
-<xsl:call-template name="component.title">
-<xsl:with-param name="node" select="ancestor-or-self::glossary[1]"/>
-</xsl:call-template></div>
-  <xsl:choose>
-    <xsl:when test="glossaryinfo/subtitle">
-      <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="glossaryinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-</xsl:template>
-
-<xsl:template name="glossary.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="glossary.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="glossary.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="glossary.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="glossary.titlepage">
-  <div class="titlepage">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="glossary.titlepage.before.recto"/>
-      <xsl:call-template name="glossary.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$recto.content"/></div>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="glossary.titlepage.before.verso"/>
-      <xsl:call-template name="glossary.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$verso.content"/></div>
-    </xsl:if>
-    <xsl:call-template name="glossary.titlepage.separator"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="*" mode="glossary.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="glossary.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="glossary.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="glossary.titlepage.recto.style">
-<xsl:apply-templates select="." mode="glossary.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template name="index.titlepage.recto">
-  <div xsl:use-attribute-sets="index.titlepage.recto.style">
-<xsl:call-template name="component.title">
-<xsl:with-param name="node" select="ancestor-or-self::index[1]"/>
-</xsl:call-template></div>
-  <xsl:choose>
-    <xsl:when test="indexinfo/subtitle">
-      <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="indexinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-</xsl:template>
-
-<xsl:template name="index.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="index.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="index.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="index.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="index.titlepage">
-  <div class="titlepage">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="index.titlepage.before.recto"/>
-      <xsl:call-template name="index.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$recto.content"/></div>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="index.titlepage.before.verso"/>
-      <xsl:call-template name="index.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$verso.content"/></div>
-    </xsl:if>
-    <xsl:call-template name="index.titlepage.separator"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="*" mode="index.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="index.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="index.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="index.titlepage.recto.style">
-<xsl:apply-templates select="." mode="index.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-<xsl:template name="setindex.titlepage.recto">
-  <div xsl:use-attribute-sets="setindex.titlepage.recto.style">
-<xsl:call-template name="component.title">
-<xsl:with-param name="node" select="ancestor-or-self::setindex[1]"/>
-</xsl:call-template></div>
-  <xsl:choose>
-    <xsl:when test="setindexinfo/subtitle">
-      <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="setindexinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
-    </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="info/subtitle"/>
-    </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="subtitle"/>
-    </xsl:when>
-  </xsl:choose>
-
-</xsl:template>
-
-<xsl:template name="setindex.titlepage.verso">
-</xsl:template>
-
-<xsl:template name="setindex.titlepage.separator">
-</xsl:template>
-
-<xsl:template name="setindex.titlepage.before.recto">
-</xsl:template>
-
-<xsl:template name="setindex.titlepage.before.verso">
-</xsl:template>
-
-<xsl:template name="setindex.titlepage">
-  <div class="titlepage">
-    <xsl:variable name="recto.content">
-      <xsl:call-template name="setindex.titlepage.before.recto"/>
-      <xsl:call-template name="setindex.titlepage.recto"/>
-    </xsl:variable>
-    <xsl:variable name="recto.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$recto.content"/></div>
-    </xsl:if>
-    <xsl:variable name="verso.content">
-      <xsl:call-template name="setindex.titlepage.before.verso"/>
-      <xsl:call-template name="setindex.titlepage.verso"/>
-    </xsl:variable>
-    <xsl:variable name="verso.elements.count">
-      <xsl:choose>
-        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
-          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
-        <xsl:otherwise>1</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
-      <div><xsl:copy-of select="$verso.content"/></div>
-    </xsl:if>
-    <xsl:call-template name="setindex.titlepage.separator"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="*" mode="setindex.titlepage.recto.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="*" mode="setindex.titlepage.verso.mode">
-  <!-- if an element isn't found in this mode, -->
-  <!-- try the generic titlepage.mode -->
-  <xsl:apply-templates select="." mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="subtitle" mode="setindex.titlepage.recto.auto.mode">
-<div xsl:use-attribute-sets="setindex.titlepage.recto.style">
-<xsl:apply-templates select="." mode="setindex.titlepage.recto.mode"/>
-</div>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/titlepage.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/titlepage.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,960 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:attribute-set name="book.titlepage.recto.style"/>
-<xsl:attribute-set name="book.titlepage.verso.style"/>
-
-<xsl:attribute-set name="article.titlepage.recto.style"/>
-<xsl:attribute-set name="article.titlepage.verso.style"/>
-
-<xsl:attribute-set name="set.titlepage.recto.style"/>
-<xsl:attribute-set name="set.titlepage.verso.style"/>
-
-<xsl:attribute-set name="part.titlepage.recto.style"/>
-<xsl:attribute-set name="part.titlepage.verso.style"/>
-
-<xsl:attribute-set name="partintro.titlepage.recto.style"/>
-<xsl:attribute-set name="partintro.titlepage.verso.style"/>
-
-<xsl:attribute-set name="reference.titlepage.recto.style"/>
-<xsl:attribute-set name="reference.titlepage.verso.style"/>
-
-<xsl:attribute-set name="refentry.titlepage.recto.style"/>
-<xsl:attribute-set name="refentry.titlepage.verso.style"/>
-
-<xsl:attribute-set name="dedication.titlepage.recto.style"/>
-<xsl:attribute-set name="dedication.titlepage.verso.style"/>
-
-<xsl:attribute-set name="preface.titlepage.recto.style"/>
-<xsl:attribute-set name="preface.titlepage.verso.style"/>
-
-<xsl:attribute-set name="chapter.titlepage.recto.style"/>
-<xsl:attribute-set name="chapter.titlepage.verso.style"/>
-
-<xsl:attribute-set name="appendix.titlepage.recto.style"/>
-<xsl:attribute-set name="appendix.titlepage.verso.style"/>
-
-<xsl:attribute-set name="bibliography.titlepage.recto.style"/>
-<xsl:attribute-set name="bibliography.titlepage.verso.style"/>
-
-<xsl:attribute-set name="glossary.titlepage.recto.style"/>
-<xsl:attribute-set name="glossary.titlepage.verso.style"/>
-
-<xsl:attribute-set name="index.titlepage.recto.style"/>
-<xsl:attribute-set name="index.titlepage.verso.style"/>
-
-<xsl:attribute-set name="setindex.titlepage.recto.style"/>
-<xsl:attribute-set name="setindex.titlepage.verso.style"/>
-
-<xsl:attribute-set name="section.titlepage.recto.style"/>
-<xsl:attribute-set name="section.titlepage.verso.style"/>
-
-<xsl:attribute-set name="sect1.titlepage.recto.style" use-attribute-sets="section.titlepage.recto.style"/>
-<xsl:attribute-set name="sect1.titlepage.verso.style" use-attribute-sets="section.titlepage.verso.style"/>
-
-<xsl:attribute-set name="sect2.titlepage.recto.style" use-attribute-sets="section.titlepage.recto.style"/>
-<xsl:attribute-set name="sect2.titlepage.verso.style" use-attribute-sets="section.titlepage.verso.style"/>
-
-<xsl:attribute-set name="sect3.titlepage.recto.style" use-attribute-sets="section.titlepage.recto.style"/>
-<xsl:attribute-set name="sect3.titlepage.verso.style" use-attribute-sets="section.titlepage.verso.style"/>
-
-<xsl:attribute-set name="sect4.titlepage.recto.style" use-attribute-sets="section.titlepage.recto.style"/>
-<xsl:attribute-set name="sect4.titlepage.verso.style" use-attribute-sets="section.titlepage.verso.style"/>
-
-<xsl:attribute-set name="sect5.titlepage.recto.style" use-attribute-sets="section.titlepage.recto.style"/>
-<xsl:attribute-set name="sect5.titlepage.verso.style" use-attribute-sets="section.titlepage.verso.style"/>
-
-<xsl:attribute-set name="simplesect.titlepage.recto.style" use-attribute-sets="section.titlepage.recto.style"/>
-<xsl:attribute-set name="simplesect.titlepage.verso.style" use-attribute-sets="section.titlepage.verso.style"/>
-
-<xsl:attribute-set name="table.of.contents.titlepage.recto.style"/>
-<xsl:attribute-set name="table.of.contents.titlepage.verso.style"/>
-
-<xsl:attribute-set name="list.of.tables.titlepage.recto.style"/>
-<xsl:attribute-set name="list.of.tables.contents.titlepage.verso.style"/>
-
-<xsl:attribute-set name="list.of.figures.titlepage.recto.style"/>
-<xsl:attribute-set name="list.of.figures.contents.titlepage.verso.style"/>
-
-<xsl:attribute-set name="list.of.equations.titlepage.recto.style"/>
-<xsl:attribute-set name="list.of.equations.contents.titlepage.verso.style"/>
-
-<xsl:attribute-set name="list.of.examples.titlepage.recto.style"/>
-<xsl:attribute-set name="list.of.examples.contents.titlepage.verso.style"/>
-
-<xsl:attribute-set name="list.of.unknowns.titlepage.recto.style"/>
-<xsl:attribute-set name="list.of.unknowns.contents.titlepage.verso.style"/>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="*" mode="titlepage.mode">
-  <!-- if an element isn't found in this mode, try the default mode -->
-  <xsl:apply-templates select="."/>
-</xsl:template>
-
-<xsl:template match="abbrev" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="abstract" mode="titlepage.mode">
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="anchor"/>
-    <xsl:if test="$abstract.notitle.enabled = 0">
-      <xsl:call-template name="formal.object.heading">
-        <xsl:with-param name="title">
-          <xsl:apply-templates select="." mode="title.markup"/>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:if>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <xsl:call-template name="process.footnotes"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="abstract/title" mode="titlepage.mode">
-</xsl:template>
-
-<xsl:template match="address" mode="titlepage.mode">
-  <xsl:param name="suppress-numbers" select="'0'"/>
-
-  <xsl:variable name="rtf">
-    <xsl:apply-templates mode="titlepage.mode"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$suppress-numbers = '0'                     and @linenumbering = 'numbered'                     and $use.extensions != '0'                     and $linenumbering.extension != '0'">
-      <div>
-        <xsl:apply-templates select="." mode="class.attribute"/>
-        <xsl:call-template name="paragraph">
-          <xsl:with-param name="content">
-            <xsl:call-template name="number.rtf.lines">
-              <xsl:with-param name="rtf" select="$rtf"/>
-            </xsl:call-template>
-          </xsl:with-param>
-        </xsl:call-template>
-      </div>
-    </xsl:when>
-
-    <xsl:otherwise>
-      <div>
-        <xsl:apply-templates select="." mode="class.attribute"/>
-        <xsl:call-template name="paragraph">
-          <xsl:with-param name="content">
-            <xsl:call-template name="make-verbatim">
-              <xsl:with-param name="rtf" select="$rtf"/>
-            </xsl:call-template>
-          </xsl:with-param>
-        </xsl:call-template>
-      </div>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="affiliation" mode="titlepage.mode">
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="artpagenums" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="author|editor" mode="titlepage.mode">
-  <xsl:call-template name="credits.div"/>
-</xsl:template>
-
-<xsl:template name="credits.div">
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:if test="self::editor[position()=1] and not($editedby.enabled = 0)">
-      <h4 class="editedby"><xsl:call-template name="gentext.edited.by"/></h4>
-    </xsl:if>
-    <h3>
-      <xsl:apply-templates select="." mode="class.attribute"/>
-      <xsl:choose>
-        <xsl:when test="orgname">
-          <xsl:apply-templates/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="person.name"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </h3>
-    <xsl:if test="not($contrib.inline.enabled = 0)">
-      <xsl:apply-templates mode="titlepage.mode" select="contrib"/>
-    </xsl:if>
-    <xsl:apply-templates mode="titlepage.mode" select="affiliation"/>
-    <xsl:apply-templates mode="titlepage.mode" select="email"/>
-    <xsl:if test="not($blurb.on.titlepage.enabled = 0)">
-      <xsl:choose>
-        <xsl:when test="$contrib.inline.enabled = 0">
-          <xsl:apply-templates mode="titlepage.mode" select="contrib|authorblurb|personblurb"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates mode="titlepage.mode" select="authorblurb|personblurb"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:if>
-  </div>
-</xsl:template>
-
-<xsl:template match="authorblurb|personblurb" mode="titlepage.mode">
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="titlepage.mode">
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="anchor"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="authorinitials" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="bibliomisc" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="bibliomset" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="collab" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="collabname" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-  </span>
-</xsl:template>
-
-<xsl:template match="confgroup" mode="titlepage.mode">
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="confdates" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="confsponsor" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="conftitle" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="confnum" mode="titlepage.mode">
-  <!-- suppress -->
-</xsl:template>
-
-<xsl:template match="contractnum" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="contractsponsor" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="contrib" mode="titlepage.mode">
-  <xsl:choose>
-    <xsl:when test="not($contrib.inline.enabled = 0)">
-      <span>
-        <xsl:apply-templates select="." mode="class.attribute"/>
-        <xsl:apply-templates mode="titlepage.mode"/>
-      </span><xsl:text>&#160;</xsl:text>
-    </xsl:when>
-    <xsl:otherwise>
-      <div>
-        <xsl:apply-templates select="." mode="class.attribute"/>
-        <p><xsl:apply-templates mode="titlepage.mode"/></p>
-      </div>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="copyright" mode="titlepage.mode">
-  <p>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:call-template name="gentext">
-      <xsl:with-param name="key" select="'Copyright'"/>
-    </xsl:call-template>
-    <xsl:call-template name="gentext.space"/>
-    <xsl:call-template name="dingbat">
-      <xsl:with-param name="dingbat">copyright</xsl:with-param>
-    </xsl:call-template>
-    <xsl:call-template name="gentext.space"/>
-    <xsl:call-template name="copyright.years">
-      <xsl:with-param name="years" select="year"/>
-      <xsl:with-param name="print.ranges" select="$make.year.ranges"/>
-      <xsl:with-param name="single.year.ranges" select="$make.single.year.ranges"/>
-    </xsl:call-template>
-    <xsl:call-template name="gentext.space"/>
-    <xsl:apply-templates select="holder" mode="titlepage.mode"/>
-  </p>
-</xsl:template>
-
-<xsl:template match="year" mode="titlepage.mode">
-  <xsl:choose>
-    <xsl:when test="$show.revisionflag != 0 and @revisionflag">
-      <span class="{@revisionflag}">
-        <xsl:apply-templates mode="titlepage.mode"/>
-      </span>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates mode="titlepage.mode"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="holder" mode="titlepage.mode">
-  <xsl:choose>
-    <xsl:when test="$show.revisionflag != 0 and @revisionflag">
-      <span class="{@revisionflag}">
-        <xsl:apply-templates mode="titlepage.mode"/>
-      </span>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates mode="titlepage.mode"/>
-    </xsl:otherwise>
-  </xsl:choose>
-  <xsl:if test="position() &lt; last()">
-    <xsl:text>, </xsl:text>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="corpauthor" mode="titlepage.mode">
-  <h3>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-  </h3>
-</xsl:template>
-
-<xsl:template match="corpcredit" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="corpname" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="date" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="edition" mode="titlepage.mode">
-  <p>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <xsl:call-template name="gentext.space"/>
-    <xsl:call-template name="gentext">
-      <xsl:with-param name="key" select="'Edition'"/>
-    </xsl:call-template>
-  </p>
-</xsl:template>
-
-<xsl:template match="email" mode="titlepage.mode">
-  <!-- use the normal e-mail handling code -->
-  <xsl:apply-templates select="."/>
-</xsl:template>
-
-<xsl:template match="firstname" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="graphic" mode="titlepage.mode">
-  <!-- use the normal graphic handling code -->
-  <xsl:apply-templates select="."/>
-</xsl:template>
-
-<xsl:template match="honorific" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="isbn" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="issn" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="biblioid" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="itermset" mode="titlepage.mode">
-</xsl:template>
-
-<xsl:template match="invpartnumber" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="issuenum" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="jobtitle" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="keywordset" mode="titlepage.mode">
-</xsl:template>
-
-<xsl:template match="legalnotice" mode="titlepage.mode">
-  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
-  <xsl:choose>
-    <xsl:when test="$generate.legalnotice.link != 0">
-      <xsl:variable name="filename">
-        <xsl:call-template name="make-relative-filename">
-          <xsl:with-param name="base.dir" select="$base.dir"/>
-	  <xsl:with-param name="base.name" select="concat($id,$html.ext)"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <xsl:variable name="title">
-        <xsl:apply-templates select="." mode="title.markup"/>
-      </xsl:variable>
-
-      <xsl:variable name="href">
-        <xsl:apply-templates mode="chunk-filename" select="."/>
-      </xsl:variable>
-
-      <a href="{$href}">
-        <xsl:copy-of select="$title"/>
-      </a>
-
-      <xsl:call-template name="write.chunk">
-        <xsl:with-param name="filename" select="$filename"/>
-        <xsl:with-param name="quiet" select="$chunk.quietly"/>
-        <xsl:with-param name="content">
-        <xsl:call-template name="user.preroot"/>
-          <html>
-            <head>
-              <xsl:call-template name="system.head.content"/>
-              <xsl:call-template name="head.content"/>
-              <xsl:call-template name="user.head.content"/>
-            </head>
-            <body>
-              <xsl:call-template name="body.attributes"/>
-              <div>
-                <xsl:apply-templates select="." mode="class.attribute"/>
-                <xsl:apply-templates mode="titlepage.mode"/>
-              </div>
-            </body>
-          </html>
-          <xsl:value-of select="$chunk.append"/>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <div>
-        <xsl:apply-templates select="." mode="class.attribute"/>
-        <a id="{$id}"/>
-        <xsl:apply-templates mode="titlepage.mode"/>
-      </div>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="legalnotice/title" mode="titlepage.mode">
-  <p class="legalnotice-title"><b><xsl:apply-templates/></b></p>
-</xsl:template>
-
-<xsl:template match="lineage" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="modespec" mode="titlepage.mode">
-</xsl:template>
-
-<xsl:template match="orgdiv" mode="titlepage.mode">
-  <xsl:if test="preceding-sibling::*[1][self::orgname]">
-    <xsl:text> </xsl:text>
-  </xsl:if>
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="orgname" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="titlepage.mode">
-<xsl:choose>
-  <xsl:when test="not($othercredit.like.author.enabled = 0)">
-  <xsl:variable name="contrib" select="string(contrib)"/>
-  <xsl:choose>
-    <xsl:when test="contrib">
-      <xsl:if test="not(preceding-sibling::othercredit[string(contrib)=$contrib])">
-        <xsl:call-template name="paragraph">
-          <xsl:with-param name="class" select="local-name(.)"/>
-          <xsl:with-param name="content">
-            <xsl:apply-templates mode="titlepage.mode" select="contrib"/>
-            <xsl:text>: </xsl:text>
-            <xsl:call-template name="person.name"/>
-            <xsl:apply-templates mode="titlepage.mode" select="affiliation"/>
-            <xsl:apply-templates select="following-sibling::othercredit[string(contrib)=$contrib]" mode="titlepage.othercredits"/>
-          </xsl:with-param>
-        </xsl:call-template>
-      </xsl:if>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="paragraph">
-        <xsl:with-param name="class" select="local-name(.)"/>
-        <xsl:with-param name="content">
-          <xsl:call-template name="person.name"/>
-        </xsl:with-param>
-      </xsl:call-template>
-      <xsl:apply-templates mode="titlepage.mode" select="affiliation"/>
-    </xsl:otherwise>
-  </xsl:choose>
-  </xsl:when>
-  <xsl:otherwise>
-    <xsl:call-template name="credits.div"/>
-  </xsl:otherwise>
-</xsl:choose>
-</xsl:template>
-
-<xsl:template match="othercredit" mode="titlepage.othercredits">
-  <xsl:text>, </xsl:text>
-  <xsl:call-template name="person.name"/>
-</xsl:template>
-
-<xsl:template match="othername" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="pagenums" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="printhistory" mode="titlepage.mode">
-  <div>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="productname" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="productnumber" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="titlepage.mode">
-  <xsl:call-template name="paragraph">
-    <xsl:with-param name="class" select="local-name(.)"/>
-    <xsl:with-param name="content">
-      <xsl:apply-templates mode="titlepage.mode"/>
-    </xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="publisher" mode="titlepage.mode">
-  <xsl:call-template name="paragraph">
-    <xsl:with-param name="class" select="local-name(.)"/>
-    <xsl:with-param name="content">
-      <xsl:apply-templates mode="titlepage.mode"/>
-    </xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="publishername" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="pubsnumber" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="releaseinfo" mode="titlepage.mode">
-  <xsl:call-template name="paragraph">
-    <xsl:with-param name="class" select="local-name(.)"/>
-    <xsl:with-param name="content">
-      <xsl:apply-templates mode="titlepage.mode"/>
-    </xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="revhistory" mode="titlepage.mode">
-  <xsl:variable name="numcols">
-    <xsl:choose>
-      <xsl:when test=".//authorinitials|.//author">3</xsl:when>
-      <xsl:otherwise>2</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
-
-  <xsl:variable name="title">
-    <xsl:call-template name="gentext">
-      <xsl:with-param name="key">RevHistory</xsl:with-param>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="contents">
-    <div>
-      <xsl:apply-templates select="." mode="class.attribute"/>
-      <table border="1" width="100%" summary="Revision history">
-        <tr>
-          <th align="left" valign="top" colspan="{$numcols}">
-            <b>
-              <xsl:call-template name="gentext">
-                <xsl:with-param name="key" select="'RevHistory'"/>
-              </xsl:call-template>
-            </b>
-          </th>
-        </tr>
-        <xsl:apply-templates mode="titlepage.mode">
-          <xsl:with-param name="numcols" select="$numcols"/>
-        </xsl:apply-templates>
-      </table>
-    </div>
-  </xsl:variable>
-  
-  <xsl:choose>
-    <xsl:when test="$generate.revhistory.link != 0">
-      <xsl:variable name="filename">
-        <xsl:call-template name="make-relative-filename">
-          <xsl:with-param name="base.dir" select="$base.dir"/>
-          <xsl:with-param name="base.name" select="concat($id,$html.ext)"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <a href="{concat($id,$html.ext)}">
-        <xsl:copy-of select="$title"/>
-      </a>
-
-      <xsl:call-template name="write.chunk">
-        <xsl:with-param name="filename" select="$filename"/>
-        <xsl:with-param name="quiet" select="$chunk.quietly"/>
-        <xsl:with-param name="content">
-        <xsl:call-template name="user.preroot"/>
-          <html>
-            <head>
-              <xsl:call-template name="system.head.content"/>
-              <xsl:call-template name="head.content">
-                <xsl:with-param name="title">
-                    <xsl:value-of select="$title"/>
-                    <xsl:if test="../../title">
-                        <xsl:value-of select="concat(' (', ../../title, ')')"/>
-                    </xsl:if>
-                </xsl:with-param>
-              </xsl:call-template>
-              <xsl:call-template name="user.head.content"/>
-            </head>
-            <body>
-              <xsl:call-template name="body.attributes"/>
-              <xsl:copy-of select="$contents"/>
-            </body>
-          </html>
-          <xsl:text>
-</xsl:text>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy-of select="$contents"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="revhistory/revision" mode="titlepage.mode">
-  <xsl:param name="numcols" select="'3'"/>
-  <xsl:variable name="revnumber" select="revnumber"/>
-  <xsl:variable name="revdate" select="date"/>
-  <xsl:variable name="revauthor" select="authorinitials|author"/>
-  <xsl:variable name="revremark" select="revremark|revdescription"/>
-  <tr>
-    <td align="left">
-      <xsl:if test="$revnumber">
-        <xsl:call-template name="gentext">
-          <xsl:with-param name="key" select="'Revision'"/>
-        </xsl:call-template>
-        <xsl:call-template name="gentext.space"/>
-        <xsl:apply-templates select="$revnumber[1]" mode="titlepage.mode"/>
-      </xsl:if>
-    </td>
-    <td align="left">
-      <xsl:apply-templates select="$revdate[1]" mode="titlepage.mode"/>
-    </td>
-    <xsl:choose>
-      <xsl:when test="$revauthor">
-        <td align="left">
-          <xsl:for-each select="$revauthor">
-            <xsl:apply-templates select="." mode="titlepage.mode"/>
-            <xsl:if test="position() != last()">
-	      <xsl:text>, </xsl:text>
-	    </xsl:if>
-	  </xsl:for-each>
-        </td>
-      </xsl:when>
-      <xsl:when test="$numcols &gt; 2">
-        <td>&#160;</td>
-      </xsl:when>
-      <xsl:otherwise/>
-    </xsl:choose>
-  </tr>
-  <xsl:if test="$revremark">
-    <tr>
-      <td align="left" colspan="{$numcols}">
-        <xsl:apply-templates select="$revremark[1]" mode="titlepage.mode"/>
-      </td>
-    </tr>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="revision/revnumber" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="revision/date" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="revision/authorinitials" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="revision/author" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="revision/revremark" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="revision/revdescription" mode="titlepage.mode">
-  <xsl:apply-templates mode="titlepage.mode"/>
-</xsl:template>
-
-<xsl:template match="seriesvolnums" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="shortaffil" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="subjectset" mode="titlepage.mode">
-</xsl:template>
-
-<xsl:template match="subtitle" mode="titlepage.mode">
-  <h2>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-  </h2>
-</xsl:template>
-
-<xsl:template match="surname" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<xsl:template match="title" mode="titlepage.mode">
-  <xsl:variable name="id">
-    <xsl:choose>
-      <!-- if title is in an *info wrapper, get the grandparent -->
-      <xsl:when test="contains(local-name(..), 'info')">
-        <xsl:call-template name="object.id">
-          <xsl:with-param name="object" select="../.."/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="object.id">
-          <xsl:with-param name="object" select=".."/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <h1>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:if test="$generate.id.attributes = 0">
-      <a id="{$id}"/>
-    </xsl:if>
-    <xsl:choose>
-      <xsl:when test="$show.revisionflag != 0 and @revisionflag">
-	<span class="{@revisionflag}">
-	  <xsl:apply-templates mode="titlepage.mode"/>
-	</span>
-      </xsl:when>
-      <xsl:otherwise>
-	<xsl:apply-templates mode="titlepage.mode"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </h1>
-</xsl:template>
-
-<xsl:template match="titleabbrev" mode="titlepage.mode">
-  <!-- nop; title abbreviations don't belong on the title page! -->
-</xsl:template>
-
-<xsl:template match="volumenum" mode="titlepage.mode">
-  <span>
-    <xsl:apply-templates select="." mode="class.attribute"/>
-    <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
-  </span>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/toc.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/toc.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,163 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:template match="toc">
-  <xsl:choose>
-    <xsl:when test="*">
-      <xsl:if test="$process.source.toc != 0">
-        <!-- if the toc isn't empty, process it -->
-        <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml">
-          <xsl:apply-templates/>
-        </xsl:element>
-      </xsl:if>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:if test="$process.empty.source.toc != 0">
-        <xsl:choose>
-          <xsl:when test="parent::section                           or parent::sect1                           or parent::sect2                           or parent::sect3                           or parent::sect4                           or parent::sect5">
-            <xsl:apply-templates select="parent::*" mode="toc.for.section"/>
-          </xsl:when>
-          <xsl:when test="parent::article">
-            <xsl:apply-templates select="parent::*" mode="toc.for.component"/>
-          </xsl:when>
-          <xsl:when test="parent::book                           or parent::part">
-            <xsl:apply-templates select="parent::*" mode="toc.for.division"/>
-          </xsl:when>
-          <xsl:when test="parent::set">
-            <xsl:apply-templates select="parent::*" mode="toc.for.set"/>
-          </xsl:when>
-          <!-- there aren't any other contexts that allow toc -->
-          <xsl:otherwise>
-            <xsl:message>
-              <xsl:text>I don't know how to make a TOC in this context!</xsl:text>
-            </xsl:message>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:if>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="tocpart|tocchap                      |toclevel1|toclevel2|toclevel3|toclevel4|toclevel5">
-  <xsl:variable name="sub-toc">
-    <xsl:if test="tocchap|toclevel1|toclevel2|toclevel3|toclevel4|toclevel5">
-      <xsl:choose>
-        <xsl:when test="$toc.list.type = 'dl'">
-          <dd>
-            <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml">
-              <xsl:apply-templates select="tocchap|toclevel1|toclevel2|toclevel3|toclevel4|toclevel5"/>
-            </xsl:element>
-          </dd>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml">
-            <xsl:apply-templates select="tocchap|toclevel1|toclevel2|toclevel3|toclevel4|toclevel5"/>
-          </xsl:element>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:if>
-  </xsl:variable>
-
-  <xsl:apply-templates select="tocentry[position() != last()]"/>
-
-  <xsl:choose>
-    <xsl:when test="$toc.list.type = 'dl'">
-      <dt>
-        <xsl:apply-templates select="tocentry[position() = last()]"/>
-      </dt>
-      <xsl:copy-of select="$sub-toc"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <li>
-        <xsl:apply-templates select="tocentry[position() = last()]"/>
-        <xsl:copy-of select="$sub-toc"/>
-      </li>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="tocentry|tocfront|tocback">
-  <xsl:choose>
-    <xsl:when test="$toc.list.type = 'dl'">
-      <dt>
-        <xsl:call-template name="tocentry-content"/>
-      </dt>
-    </xsl:when>
-    <xsl:otherwise>
-      <li>
-        <xsl:call-template name="tocentry-content"/>
-      </li>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="tocentry[position() = last()]" priority="2">
-  <xsl:call-template name="tocentry-content"/>
-</xsl:template>
-
-<xsl:template name="tocentry-content">
-  <xsl:variable name="targets" select="key('id',@linkend)"/>
-  <xsl:variable name="target" select="$targets[1]"/>
-
-  <xsl:choose>
-    <xsl:when test="@linkend">
-      <xsl:call-template name="check.id.unique">
-        <xsl:with-param name="linkend" select="@linkend"/>
-      </xsl:call-template>
-      <a>
-        <xsl:attribute name="href">
-          <xsl:call-template name="href.target">
-            <xsl:with-param name="object" select="$target"/>
-          </xsl:call-template>
-        </xsl:attribute>
-        <xsl:apply-templates/>
-      </a>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="*" mode="toc.for.section">
-  <xsl:call-template name="section.toc"/>
-</xsl:template>
-
-<xsl:template match="*" mode="toc.for.component">
-  <xsl:call-template name="component.toc"/>
-</xsl:template>
-
-<xsl:template match="*" mode="toc.for.section">
-  <xsl:call-template name="section.toc"/>
-</xsl:template>
-
-<xsl:template match="*" mode="toc.for.division">
-  <xsl:call-template name="division.toc"/>
-</xsl:template>
-
-<xsl:template match="*" mode="toc.for.set">
-  <xsl:call-template name="set.toc"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="lot|lotentry">
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/verbatim.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/verbatim.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,354 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sverb="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Verbatim" xmlns:xverb="xalan://com.nwalsh.xalan.Verbatim" xmlns:lxslt="http://xml.apache.org/xslt" xmlns:exsl="http://exslt.org/common" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="sverb xverb lxslt exsl" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<xsl:include href="../highlighting/common.xsl"/>
-<xsl:include href="highlight.xsl"/>
-
-<lxslt:component prefix="xverb" functions="numberLines"/>
-
-<xsl:template match="programlisting|screen|synopsis">
-  <xsl:param name="suppress-numbers" select="'0'"/>
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id"/>
-  </xsl:variable>
-
-  <xsl:call-template name="anchor"/>
-
-  <xsl:if test="$shade.verbatim != 0">
-    <xsl:message>
-      <xsl:text>The shade.verbatim parameter is deprecated. </xsl:text>
-      <xsl:text>Use CSS instead,</xsl:text>
-    </xsl:message>
-    <xsl:message>
-      <xsl:text>for example: pre.</xsl:text>
-      <xsl:value-of select="local-name(.)"/>
-      <xsl:text> { background-color: #E0E0E0; }</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:choose>
-    <xsl:when test="$suppress-numbers = '0'       and @linenumbering = 'numbered'       and $use.extensions != '0'       and $linenumbering.extension != '0'">
-      <xsl:variable name="rtf">
-	<xsl:call-template name="apply-highlighting"/>
-      </xsl:variable>
-      <pre>
-        <xsl:apply-templates select="." mode="class.attribute"/>
-	<xsl:call-template name="number.rtf.lines">
-	  <xsl:with-param name="rtf" select="$rtf"/>
-	</xsl:call-template>
-      </pre>
-    </xsl:when>
-    <xsl:otherwise>
-      <pre>
-        <xsl:apply-templates select="." mode="class.attribute"/>
-	<xsl:call-template name="apply-highlighting"/>
-      </pre>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="literallayout">
-  <xsl:param name="suppress-numbers" select="'0'"/>
-
-  <xsl:variable name="rtf">
-    <xsl:apply-templates/>
-  </xsl:variable>
-
-  <xsl:if test="$shade.verbatim != 0 and @class='monospaced'">
-    <xsl:message>
-      <xsl:text>The shade.verbatim parameter is deprecated. </xsl:text>
-      <xsl:text>Use CSS instead,</xsl:text>
-    </xsl:message>
-    <xsl:message>
-      <xsl:text>for example: pre.</xsl:text>
-      <xsl:value-of select="local-name(.)"/>
-      <xsl:text> { background-color: #E0E0E0; }</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
-  <xsl:choose>
-    <xsl:when test="$suppress-numbers = '0'       and @linenumbering = 'numbered'       and $use.extensions != '0'       and $linenumbering.extension != '0'">
-      <xsl:choose>
-	<xsl:when test="@class='monospaced'">
-          <pre>
-            <xsl:apply-templates select="." mode="class.attribute"/>
-	    <xsl:call-template name="number.rtf.lines">
-	      <xsl:with-param name="rtf" select="$rtf"/>
-	    </xsl:call-template>
-	  </pre>
-	</xsl:when>
-	<xsl:otherwise>
-          <div>
-            <xsl:apply-templates select="." mode="class.attribute"/>
-	    <p>
-	      <xsl:call-template name="number.rtf.lines">
-		<xsl:with-param name="rtf" select="$rtf"/>
-	      </xsl:call-template>
-	    </p>
-	  </div>
-	</xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:choose>
-	<xsl:when test="@class='monospaced'">
-          <pre>
-            <xsl:apply-templates select="." mode="class.attribute"/>
-	    <xsl:copy-of select="$rtf"/>
-	  </pre>
-	</xsl:when>
-	<xsl:otherwise>
-          <div>
-            <xsl:apply-templates select="." mode="class.attribute"/>
-	    <p>
-	      <xsl:call-template name="make-verbatim">
-		<xsl:with-param name="rtf" select="$rtf"/>
-	      </xsl:call-template>
-	    </p>
-	  </div>
-	</xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="address">
-  <xsl:param name="suppress-numbers" select="'0'"/>
-
-  <xsl:variable name="rtf">
-    <xsl:apply-templates/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$suppress-numbers = '0'                     and @linenumbering = 'numbered'                     and $use.extensions != '0'                     and $linenumbering.extension != '0'">
-      <div>
-        <xsl:apply-templates select="." mode="class.attribute"/>
-        <p>
-          <xsl:call-template name="number.rtf.lines">
-            <xsl:with-param name="rtf" select="$rtf"/>
-          </xsl:call-template>
-        </p>
-      </div>
-    </xsl:when>
-
-    <xsl:otherwise>
-      <div>
-        <xsl:apply-templates select="." mode="class.attribute"/>
-        <p>
-          <xsl:call-template name="make-verbatim">
-            <xsl:with-param name="rtf" select="$rtf"/>
-          </xsl:call-template>
-        </p>
-      </div>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="number.rtf.lines">
-  <xsl:param name="rtf" select="''"/>
-  <xsl:param name="pi.context" select="."/>
-
-  <!-- Save the global values -->
-  <xsl:variable name="global.linenumbering.everyNth" select="$linenumbering.everyNth"/>
-
-  <xsl:variable name="global.linenumbering.separator" select="$linenumbering.separator"/>
-
-  <xsl:variable name="global.linenumbering.width" select="$linenumbering.width"/>
-
-  <!-- Extract the <?dbhtml linenumbering.*?> PI values -->
-  <xsl:variable name="pi.linenumbering.everyNth">
-    <xsl:call-template name="pi.dbhtml_linenumbering.everyNth">
-      <xsl:with-param name="node" select="$pi.context"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="pi.linenumbering.separator">
-    <xsl:call-template name="pi.dbhtml_linenumbering.separator">
-      <xsl:with-param name="node" select="$pi.context"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:variable name="pi.linenumbering.width">
-    <xsl:call-template name="pi.dbhtml_linenumbering.width">
-      <xsl:with-param name="node" select="$pi.context"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <!-- Construct the 'in-context' values -->
-  <xsl:variable name="linenumbering.everyNth">
-    <xsl:choose>
-      <xsl:when test="$pi.linenumbering.everyNth != ''">
-        <xsl:value-of select="$pi.linenumbering.everyNth"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$global.linenumbering.everyNth"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="linenumbering.separator">
-    <xsl:choose>
-      <xsl:when test="$pi.linenumbering.separator != ''">
-        <xsl:value-of select="$pi.linenumbering.separator"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$global.linenumbering.separator"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="linenumbering.width">
-    <xsl:choose>
-      <xsl:when test="$pi.linenumbering.width != ''">
-        <xsl:value-of select="$pi.linenumbering.width"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$global.linenumbering.width"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="linenumbering.startinglinenumber">
-    <xsl:choose>
-      <xsl:when test="$pi.context/@startinglinenumber">
-        <xsl:value-of select="$pi.context/@startinglinenumber"/>
-      </xsl:when>
-      <xsl:when test="$pi.context/@continuation='continues'">
-        <xsl:variable name="lastLine">
-          <xsl:choose>
-            <xsl:when test="$pi.context/self::programlisting">
-              <xsl:call-template name="lastLineNumber">
-                <xsl:with-param name="listings" select="preceding::programlisting[@linenumbering='numbered']"/>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:when test="$pi.context/self::screen">
-              <xsl:call-template name="lastLineNumber">
-                <xsl:with-param name="listings" select="preceding::screen[@linenumbering='numbered']"/>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:when test="$pi.context/self::literallayout">
-              <xsl:call-template name="lastLineNumber">
-                <xsl:with-param name="listings" select="preceding::literallayout[@linenumbering='numbered']"/>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:when test="$pi.context/self::address">
-              <xsl:call-template name="lastLineNumber">
-                <xsl:with-param name="listings" select="preceding::address[@linenumbering='numbered']"/>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:when test="$pi.context/self::synopsis">
-              <xsl:call-template name="lastLineNumber">
-                <xsl:with-param name="listings" select="preceding::synopsis[@linenumbering='numbered']"/>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:message>
-                <xsl:text>Unexpected verbatim environment: </xsl:text>
-                <xsl:value-of select="local-name($pi.context)"/>
-              </xsl:message>
-              <xsl:value-of select="0"/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:variable>
-
-        <xsl:value-of select="$lastLine + 1"/>
-      </xsl:when>
-      <xsl:otherwise>1</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="function-available('sverb:numberLines')">
-      <xsl:copy-of select="sverb:numberLines($rtf)"/>
-    </xsl:when>
-    <xsl:when test="function-available('xverb:numberLines')">
-      <xsl:copy-of select="xverb:numberLines($rtf)"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:message terminate="yes">
-        <xsl:text>No numberLines function available.</xsl:text>
-      </xsl:message>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="make-verbatim">
-  <xsl:param name="rtf"/>
-
-  <!-- I want to make this RTF verbatim. There are two possibilities: either
-       I have access to the exsl:node-set extension function and I can "do it right"
-       or I have to rely on CSS. -->
-
-  <xsl:choose>
-    <xsl:when test="function-available('exsl:node-set')">
-      <xsl:apply-templates select="exsl:node-set($rtf)" mode="make.verbatim.mode"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <span style="white-space: pre;">
-        <xsl:copy-of select="$rtf"/>
-      </span>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ======================================================================== -->
-
-<xsl:template name="lastLineNumber">
-  <xsl:param name="listings"/>
-  <xsl:param name="number" select="0"/>
-
-  <xsl:variable name="lines">
-    <xsl:call-template name="countLines">
-      <xsl:with-param name="listing" select="string($listings[1])"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="not($listings)">
-      <xsl:value-of select="$number"/>
-    </xsl:when>
-    <xsl:when test="$listings[1]/@startinglinenumber">
-      <xsl:value-of select="$number + $listings[1]/@startinglinenumber + $lines - 1"/>
-    </xsl:when>
-    <xsl:when test="$listings[1]/@continuation='continues'">
-      <xsl:call-template name="lastLineNumber">
-        <xsl:with-param name="listings" select="listings[position() &gt; 1]"/>
-        <xsl:with-param name="number" select="$number + $lines"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$lines"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template name="countLines">
-  <xsl:param name="listing"/>
-  <xsl:param name="count" select="1"/>
-
-  <xsl:choose>
-    <xsl:when test="contains($listing, '&#10;')">
-      <xsl:call-template name="countLines">
-        <xsl:with-param name="listing" select="substring-after($listing, '&#10;')"/>
-        <xsl:with-param name="count" select="$count + 1"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$count"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/xref.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/xref.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,1288 +1,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:suwl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.UnwrapLinks" xmlns:exsl="http://exslt.org/common" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="suwl exsl xlink" version="1.0">
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://docbook.sf.net/release/xsl/current/ for
-     copyright and other information.
-
-     ******************************************************************** -->
-
-<!-- Use internal variable for olink xlink role for consistency -->
-<xsl:variable name="xolink.role">http://docbook.org/xlink/role/olink</xsl:variable>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="anchor">
-  <xsl:call-template name="anchor"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="xref" name="xref">
-  <xsl:param name="xhref" select="@xlink:href"/>
-  <!-- is the @xlink:href a local idref link? -->
-  <xsl:param name="xlink.idref">
-    <xsl:if test="starts-with($xhref,'#')                   and (not(contains($xhref,'('))                   or starts-with($xhref, '#xpointer(id('))">
-      <xsl:call-template name="xpointer.idref">
-        <xsl:with-param name="xpointer" select="$xhref"/>
-      </xsl:call-template>
-   </xsl:if>
-  </xsl:param>
-  <xsl:param name="xlink.targets" select="key('id',$xlink.idref)"/>
-  <xsl:param name="linkend.targets" select="key('id',@linkend)"/>
-  <xsl:param name="target" select="($xlink.targets | $linkend.targets)[1]"/>
-
-  <xsl:variable name="xrefstyle">
-    <xsl:choose>
-      <xsl:when test="@role and not(@xrefstyle)                        and $use.role.as.xrefstyle != 0">
-        <xsl:value-of select="@role"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="@xrefstyle"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:call-template name="anchor"/>
-
-  <xsl:variable name="content">
-    <xsl:choose>
-  
-      <xsl:when test="@endterm">
-        <xsl:variable name="etargets" select="key('id',@endterm)"/>
-        <xsl:variable name="etarget" select="$etargets[1]"/>
-        <xsl:choose>
-          <xsl:when test="count($etarget) = 0">
-            <xsl:message>
-              <xsl:value-of select="count($etargets)"/>
-              <xsl:text>Endterm points to nonexistent ID: </xsl:text>
-              <xsl:value-of select="@endterm"/>
-            </xsl:message>
-            <xsl:text>???</xsl:text>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:apply-templates select="$etarget" mode="endterm"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:when>
-  
-      <xsl:when test="$target/@xreflabel">
-        <xsl:call-template name="xref.xreflabel">
-          <xsl:with-param name="target" select="$target"/>
-        </xsl:call-template>
-      </xsl:when>
-  
-      <xsl:when test="$target">
-        <xsl:if test="not(parent::citation)">
-          <xsl:apply-templates select="$target" mode="xref-to-prefix"/>
-        </xsl:if>
-  
-        <xsl:apply-templates select="$target" mode="xref-to">
-          <xsl:with-param name="referrer" select="."/>
-          <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-        </xsl:apply-templates>
-  
-        <xsl:if test="not(parent::citation)">
-          <xsl:apply-templates select="$target" mode="xref-to-suffix"/>
-        </xsl:if>
-      </xsl:when>
-
-      <xsl:otherwise>
-        <xsl:message>
-          <xsl:text>ERROR: xref linking to </xsl:text>
-          <xsl:value-of select="@linkend|@xlink:href"/>
-          <xsl:text> has no generated link text.</xsl:text>
-        </xsl:message>
-        <xsl:text>???</xsl:text>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:call-template name="simple.xlink">
-    <xsl:with-param name="content" select="$content"/>
-  </xsl:call-template>
-
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<!-- biblioref handled largely like an xref -->
-<!-- To be done: add support for begin, end, and units attributes -->
-<xsl:template match="biblioref">
-  <xsl:variable name="targets" select="key('id',@linkend)"/>
-  <xsl:variable name="target" select="$targets[1]"/>
-  <xsl:variable name="refelem" select="local-name($target)"/>
-
-  <xsl:call-template name="check.id.unique">
-    <xsl:with-param name="linkend" select="@linkend"/>
-  </xsl:call-template>
-
-  <xsl:call-template name="anchor"/>
-
-  <xsl:choose>
-    <xsl:when test="count($target) = 0">
-      <xsl:message>
-        <xsl:text>XRef to nonexistent id: </xsl:text>
-        <xsl:value-of select="@linkend"/>
-      </xsl:message>
-      <xsl:text>???</xsl:text>
-    </xsl:when>
-
-    <xsl:when test="@endterm">
-      <xsl:variable name="href">
-        <xsl:call-template name="href.target">
-          <xsl:with-param name="object" select="$target"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <xsl:variable name="etargets" select="key('id',@endterm)"/>
-      <xsl:variable name="etarget" select="$etargets[1]"/>
-      <xsl:choose>
-        <xsl:when test="count($etarget) = 0">
-          <xsl:message>
-            <xsl:value-of select="count($etargets)"/>
-            <xsl:text>Endterm points to nonexistent ID: </xsl:text>
-            <xsl:value-of select="@endterm"/>
-          </xsl:message>
-          <a href="{$href}">
-            <xsl:apply-templates select="." mode="class.attribute"/>
-            <xsl:text>???</xsl:text>
-          </a>
-        </xsl:when>
-        <xsl:otherwise>
-          <a href="{$href}">
-            <xsl:apply-templates select="." mode="class.attribute"/>
-            <xsl:apply-templates select="$etarget" mode="endterm"/>
-          </a>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-
-    <xsl:when test="$target/@xreflabel">
-      <a>
-        <xsl:apply-templates select="." mode="class.attribute"/>
-        <xsl:attribute name="href">
-          <xsl:call-template name="href.target">
-            <xsl:with-param name="object" select="$target"/>
-          </xsl:call-template>
-        </xsl:attribute>
-        <xsl:call-template name="xref.xreflabel">
-          <xsl:with-param name="target" select="$target"/>
-        </xsl:call-template>
-      </a>
-    </xsl:when>
-
-    <xsl:otherwise>
-      <xsl:variable name="href">
-        <xsl:call-template name="href.target">
-          <xsl:with-param name="object" select="$target"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <xsl:if test="not(parent::citation)">
-        <xsl:apply-templates select="$target" mode="xref-to-prefix"/>
-      </xsl:if>
-
-      <a href="{$href}">
-        <xsl:apply-templates select="." mode="class.attribute"/>
-        <xsl:if test="$target/title or $target/*/title">
-          <xsl:attribute name="title">
-            <xsl:apply-templates select="$target" mode="xref-title"/>
-          </xsl:attribute>
-        </xsl:if>
-        <xsl:apply-templates select="$target" mode="xref-to">
-          <xsl:with-param name="referrer" select="."/>
-          <xsl:with-param name="xrefstyle">
-            <xsl:choose>
-              <xsl:when test="@role and not(@xrefstyle) and $use.role.as.xrefstyle != 0">
-                <xsl:value-of select="@role"/>
-              </xsl:when>
-              <xsl:otherwise>
-                <xsl:value-of select="@xrefstyle"/>
-              </xsl:otherwise>
-            </xsl:choose>
-          </xsl:with-param>
-        </xsl:apply-templates>
-      </a>
-
-      <xsl:if test="not(parent::citation)">
-        <xsl:apply-templates select="$target" mode="xref-to-suffix"/>
-      </xsl:if>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="*" mode="endterm">
-  <!-- Process the children of the endterm element -->
-  <xsl:variable name="endterm">
-    <xsl:apply-templates select="child::node()"/>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="function-available('exsl:node-set')">
-      <xsl:apply-templates select="exsl:node-set($endterm)" mode="remove-ids"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy-of select="$endterm"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="*" mode="remove-ids">
-  <xsl:choose>
-    <!-- handle html or xhtml -->
-    <xsl:when test="local-name(.) = 'a'                     and (namespace-uri(.) = ''                          or namespace-uri(.) = 'http://www.w3.org/1999/xhtml')">
-      <xsl:choose>
-        <xsl:when test="(@name and count(@*) = 1)                         or (@id and count(@*) = 1)                         or (@xml:id and count(@*) = 1)                         or (@xml:id and @name and count(@*) = 2)                         or (@id and @name and count(@*) = 2)">
-          <xsl:message>suppress anchor</xsl:message>
-          <!-- suppress the whole thing -->
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:copy>
-            <xsl:for-each select="@*">
-              <xsl:choose>
-                <xsl:when test="local-name(.) != 'name' and local-name(.) != 'id'">
-                  <xsl:copy/>
-                </xsl:when>
-                <xsl:otherwise>
-                  <xsl:message>removing <xsl:value-of select="local-name(.)"/></xsl:message>
-                </xsl:otherwise>
-              </xsl:choose>
-            </xsl:for-each>
-          </xsl:copy>
-          <xsl:apply-templates mode="remove-ids"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy>
-        <xsl:for-each select="@*">
-          <xsl:choose>
-            <xsl:when test="local-name(.) != 'id'">
-              <xsl:copy/>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:message>removing <xsl:value-of select="local-name(.)"/></xsl:message>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:for-each>
-        <xsl:apply-templates mode="remove-ids"/>
-      </xsl:copy>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="*" mode="xref-to-prefix"/>
-<xsl:template match="*" mode="xref-to-suffix"/>
-
-<xsl:template match="*" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:if test="$verbose">
-    <xsl:message>
-      <xsl:text>Don't know what gentext to create for xref to: "</xsl:text>
-      <xsl:value-of select="name(.)"/>
-      <xsl:text>", ("</xsl:text>
-      <xsl:value-of select="(@id|@xml:id)[1]"/>
-      <xsl:text>")</xsl:text>
-    </xsl:message>
-  </xsl:if>
-  <xsl:text>???</xsl:text>
-</xsl:template>
-
-<xsl:template match="title" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <!-- if you xref to a title, xref to the parent... -->
-  <xsl:choose>
-    <!-- FIXME: how reliable is this? -->
-    <xsl:when test="contains(local-name(parent::*), 'info')">
-      <xsl:apply-templates select="parent::*[2]" mode="xref-to">
-        <xsl:with-param name="referrer" select="$referrer"/>
-        <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-        <xsl:with-param name="verbose" select="$verbose"/>
-      </xsl:apply-templates>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates select="parent::*" mode="xref-to">
-        <xsl:with-param name="referrer" select="$referrer"/>
-        <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-        <xsl:with-param name="verbose" select="$verbose"/>
-      </xsl:apply-templates>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="abstract|authorblurb|personblurb|bibliodiv|bibliomset                      |biblioset|blockquote|calloutlist|caution|colophon                      |constraintdef|formalpara|glossdiv|important|indexdiv                      |itemizedlist|legalnotice|lot|msg|msgexplan|msgmain                      |msgrel|msgset|msgsub|note|orderedlist|partintro                      |productionset|qandadiv|refsynopsisdiv|segmentedlist                      |set|setindex|sidebar|tip|toc|variablelist|warning" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <!-- catch-all for things with (possibly optional) titles -->
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="author|editor|othercredit|personname" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-
-  <xsl:call-template name="person.name"/>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-
-  <xsl:call-template name="person.name.list"/>
-</xsl:template>
-
-<xsl:template match="figure|example|table|equation" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="procedure" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose"/>
-
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="task" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose"/>
-
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="cmdsynopsis" mode="xref-to">
-  <xsl:apply-templates select="(.//command)[1]" mode="xref"/>
-</xsl:template>
-
-<xsl:template match="funcsynopsis" mode="xref-to">
-  <xsl:apply-templates select="(.//function)[1]" mode="xref"/>
-</xsl:template>
-
-<xsl:template match="dedication|preface|chapter|appendix|article" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="bibliography" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="biblioentry|bibliomixed" mode="xref-to-prefix">
-  <xsl:text>[</xsl:text>
-</xsl:template>
-
-<xsl:template match="biblioentry|bibliomixed" mode="xref-to-suffix">
-  <xsl:text>]</xsl:text>
-</xsl:template>
-
-<xsl:template match="biblioentry|bibliomixed" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <!-- handles both biblioentry and bibliomixed -->
-  <xsl:choose>
-    <xsl:when test="string(.) = ''">
-      <xsl:variable name="bib" select="document($bibliography.collection,.)"/>
-      <xsl:variable name="id" select="(@id|@xml:id)[1]"/>
-      <xsl:variable name="entry" select="$bib/bibliography/                                     *[@id=$id or @xml:id=$id][1]"/>
-      <xsl:choose>
-        <xsl:when test="$entry">
-          <xsl:choose>
-            <xsl:when test="$bibliography.numbered != 0">
-              <xsl:number from="bibliography" count="biblioentry|bibliomixed" level="any" format="1"/>
-            </xsl:when>
-            <xsl:when test="local-name($entry/*[1]) = 'abbrev'">
-              <xsl:apply-templates select="$entry/*[1]"/>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:value-of select="(@id|@xml:id)[1]"/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:message>
-            <xsl:text>No bibliography entry: </xsl:text>
-            <xsl:value-of select="$id"/>
-            <xsl:text> found in </xsl:text>
-            <xsl:value-of select="$bibliography.collection"/>
-          </xsl:message>
-          <xsl:value-of select="(@id|@xml:id)[1]"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="$bibliography.numbered != 0">
-          <xsl:number from="bibliography" count="biblioentry|bibliomixed" level="any" format="1"/>
-        </xsl:when>
-        <xsl:when test="local-name(*[1]) = 'abbrev'">
-          <xsl:apply-templates select="*[1]"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="(@id|@xml:id)[1]"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="glossary" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="glossentry" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-  <xsl:choose>
-    <xsl:when test="$glossentry.show.acronym = 'primary'">
-      <xsl:choose>
-        <xsl:when test="acronym|abbrev">
-          <xsl:apply-templates select="(acronym|abbrev)[1]"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates select="glossterm[1]" mode="xref-to">
-            <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-            <xsl:with-param name="referrer" select="$referrer"/>
-            <xsl:with-param name="verbose" select="$verbose"/>
-          </xsl:apply-templates>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates select="glossterm[1]" mode="xref-to">
-        <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-        <xsl:with-param name="referrer" select="$referrer"/>
-        <xsl:with-param name="verbose" select="$verbose"/>
-      </xsl:apply-templates>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="glossterm" mode="xref-to">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="index" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="listitem" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose"/>
-
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="section|simplesect                      |sect1|sect2|sect3|sect4|sect5                      |refsect1|refsect2|refsect3|refsection" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-  <!-- FIXME: What about "in Chapter X"? -->
-</xsl:template>
-
-<xsl:template match="bridgehead" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-  <!-- FIXME: What about "in Chapter X"? -->
-</xsl:template>
-
-<xsl:template match="qandaset" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="qandadiv" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="qandaentry" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="question[1]" mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="question|answer" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="part|reference" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="refentry" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-
-  <xsl:choose>
-    <xsl:when test="refmeta/refentrytitle">
-      <xsl:apply-templates select="refmeta/refentrytitle"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates select="refnamediv/refname[1]"/>
-    </xsl:otherwise>
-  </xsl:choose>
-  <xsl:apply-templates select="refmeta/manvolnum"/>
-</xsl:template>
-
-<xsl:template match="refnamediv" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="refname[1]" mode="xref-to">
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="refname" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates mode="xref-to"/>
-</xsl:template>
-
-<xsl:template match="step" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-
-  <xsl:call-template name="gentext">
-    <xsl:with-param name="key" select="'Step'"/>
-  </xsl:call-template>
-  <xsl:text> </xsl:text>
-  <xsl:apply-templates select="." mode="number"/>
-</xsl:template>
-
-<xsl:template match="varlistentry" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="term[1]" mode="xref-to">
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="varlistentry/term" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-
-  <!-- to avoid the comma that will be generated if there are several terms -->
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="co" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-
-  <xsl:apply-templates select="." mode="callout-bug"/>
-</xsl:template>
-
-<xsl:template match="area|areaset" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-
-  <xsl:call-template name="callout-bug">
-    <xsl:with-param name="conum">
-      <xsl:apply-templates select="." mode="conumber"/>
-    </xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="book" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:apply-templates select="." mode="object.xref.markup">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="para" mode="xref-to">
-  <xsl:param name="referrer"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="verbose" select="1"/>
-
-  <xsl:variable name="context" select="(ancestor::simplesect                                        |ancestor::section                                        |ancestor::sect1                                        |ancestor::sect2                                        |ancestor::sect3                                        |ancestor::sect4                                        |ancestor::sect5                                        |ancestor::refsection                                        |ancestor::refsect1                                        |ancestor::refsect2                                        |ancestor::refsect3                                        |ancestor::chapter                                        |ancestor::appendix                                        |ancestor::preface                                        |ancestor::partintro                                        |ancestor::dedication                                        |ancestor::colophon                                        |ancestor::bibliography                                        |ancestor::index                                        |ancestor::glossary                                        |ancestor::glossentry                                        |ancestor::listitem                                        |ancestor::varlistentry)[last()]"/>
-
-  <xsl:apply-templates select="$context" mode="xref-to">
-    <xsl:with-param name="purpose" select="'xref'"/>
-    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-    <xsl:with-param name="referrer" select="$referrer"/>
-    <xsl:with-param name="verbose" select="$verbose"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="*" mode="xref-title">
-  <xsl:variable name="title">
-    <xsl:apply-templates select="." mode="object.title.markup"/>
-  </xsl:variable>
-
-  <xsl:value-of select="$title"/>
-</xsl:template>
-
-<xsl:template match="author" mode="xref-title">
-  <xsl:variable name="title">
-    <xsl:call-template name="person.name"/>
-  </xsl:variable>
-
-  <xsl:value-of select="$title"/>
-</xsl:template>
-
-<xsl:template match="authorgroup" mode="xref-title">
-  <xsl:variable name="title">
-    <xsl:call-template name="person.name.list"/>
-  </xsl:variable>
-
-  <xsl:value-of select="$title"/>
-</xsl:template>
-
-<xsl:template match="cmdsynopsis" mode="xref-title">
-  <xsl:variable name="title">
-    <xsl:apply-templates select="(.//command)[1]" mode="xref"/>
-  </xsl:variable>
-
-  <xsl:value-of select="$title"/>
-</xsl:template>
-
-<xsl:template match="funcsynopsis" mode="xref-title">
-  <xsl:variable name="title">
-    <xsl:apply-templates select="(.//function)[1]" mode="xref"/>
-  </xsl:variable>
-
-  <xsl:value-of select="$title"/>
-</xsl:template>
-
-<xsl:template match="biblioentry|bibliomixed" mode="xref-title">
-  <!-- handles both biblioentry and bibliomixed -->
-  <xsl:variable name="title">
-    <xsl:text>[</xsl:text>
-    <xsl:choose>
-      <xsl:when test="local-name(*[1]) = 'abbrev'">
-        <xsl:apply-templates select="*[1]"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="(@id|@xml:id)[1]"/>
-      </xsl:otherwise>
-    </xsl:choose>
-    <xsl:text>]</xsl:text>
-  </xsl:variable>
-
-  <xsl:value-of select="$title"/>
-</xsl:template>
-
-<xsl:template match="step" mode="xref-title">
-  <xsl:call-template name="gentext">
-    <xsl:with-param name="key" select="'Step'"/>
-  </xsl:call-template>
-  <xsl:text> </xsl:text>
-  <xsl:apply-templates select="." mode="number"/>
-</xsl:template>
-
-<xsl:template match="step[not(./title)]" mode="title.markup">
-  <xsl:call-template name="gentext">
-    <xsl:with-param name="key" select="'Step'"/>
-  </xsl:call-template>
-  <xsl:text> </xsl:text>
-  <xsl:apply-templates select="." mode="number"/>
-</xsl:template>
-
-<xsl:template match="co" mode="xref-title">
-  <xsl:variable name="title">
-    <xsl:apply-templates select="." mode="callout-bug"/>
-  </xsl:variable>
-
-  <xsl:value-of select="$title"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="link" name="link">
-  <xsl:param name="linkend" select="@linkend"/>
-  <xsl:param name="a.target"/>
-  <xsl:param name="xhref" select="@xlink:href"/>
-
-  <xsl:variable name="content">
-    <xsl:call-template name="anchor"/>
-    <xsl:choose>
-      <xsl:when test="count(child::node()) &gt; 0">
-        <!-- If it has content, use it -->
-        <xsl:apply-templates/>
-      </xsl:when>
-      <!-- else look for an endterm -->
-      <xsl:when test="@endterm">
-        <xsl:variable name="etargets" select="key('id',@endterm)"/>
-        <xsl:variable name="etarget" select="$etargets[1]"/>
-        <xsl:choose>
-          <xsl:when test="count($etarget) = 0">
-            <xsl:message>
-              <xsl:value-of select="count($etargets)"/>
-              <xsl:text>Endterm points to nonexistent ID: </xsl:text>
-              <xsl:value-of select="@endterm"/>
-            </xsl:message>
-            <xsl:text>???</xsl:text>
-          </xsl:when>
-          <xsl:otherwise>
-              <xsl:apply-templates select="$etarget" mode="endterm"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:when>
-      <!-- Use the xlink:href if no other text -->
-      <xsl:when test="@xlink:href">
-        <xsl:value-of select="@xlink:href"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:message>
-          <xsl:text>Link element has no content and no Endterm. </xsl:text>
-          <xsl:text>Nothing to show in the link to </xsl:text>
-          <xsl:value-of select="(@xlink:href|@linkend)[1]"/>
-        </xsl:message>
-        <xsl:text>???</xsl:text>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:call-template name="simple.xlink">
-    <xsl:with-param name="node" select="."/>
-    <xsl:with-param name="linkend" select="$linkend"/>
-    <xsl:with-param name="content" select="$content"/>
-    <xsl:with-param name="a.target" select="$a.target"/>
-    <xsl:with-param name="xhref" select="$xhref"/>
-  </xsl:call-template>
-
-</xsl:template>
-
-<xsl:template match="ulink" name="ulink">
-  <xsl:param name="url" select="@url"/>
-  <xsl:variable name="link">
-    <a>
-      <xsl:apply-templates select="." mode="class.attribute"/>
-      <xsl:if test="@id or @xml:id">
-        <xsl:attribute name="id">
-          <xsl:value-of select="(@id|@xml:id)[1]"/>
-        </xsl:attribute>
-      </xsl:if>
-      <xsl:attribute name="href"><xsl:value-of select="$url"/></xsl:attribute>
-      <xsl:if test="$ulink.target != ''">
-        <xsl:attribute name="target">
-          <xsl:value-of select="$ulink.target"/>
-        </xsl:attribute>
-      </xsl:if>
-      <xsl:choose>
-        <xsl:when test="count(child::node())=0">
-          <xsl:value-of select="$url"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </a>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="function-available('suwl:unwrapLinks')">
-      <xsl:copy-of select="suwl:unwrapLinks($link)"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy-of select="$link"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="olink" name="olink">
-  <!-- olink content may be passed in from xlink olink -->
-  <xsl:param name="content" select="NOTANELEMENT"/>
-
-  <xsl:call-template name="anchor"/>
-
-  <xsl:variable name="localinfo" select="@localinfo"/>
-
-  <xsl:choose>
-    <!-- olinks resolved by stylesheet and target database -->
-    <xsl:when test="@targetdoc or @targetptr or                     (@xlink:role=$xolink.role and                      contains(@xlink:href, '#') )">
-
-      <xsl:variable name="targetdoc.att">
-        <xsl:choose>
-          <xsl:when test="@targetdoc != ''">
-            <xsl:value-of select="@targetdoc"/>
-          </xsl:when>
-          <xsl:when test="@xlink:role=$xolink.role and                        contains(@xlink:href, '#')">
-            <xsl:value-of select="substring-before(@xlink:href, '#')"/>
-          </xsl:when>
-        </xsl:choose>
-      </xsl:variable>
-
-      <xsl:variable name="targetptr.att">
-        <xsl:choose>
-          <xsl:when test="@targetptr != ''">
-            <xsl:value-of select="@targetptr"/>
-          </xsl:when>
-          <xsl:when test="@xlink:role=$xolink.role and                        contains(@xlink:href, '#')">
-            <xsl:value-of select="substring-after(@xlink:href, '#')"/>
-          </xsl:when>
-        </xsl:choose>
-      </xsl:variable>
-
-      <xsl:variable name="olink.lang">
-        <xsl:call-template name="l10n.language">
-          <xsl:with-param name="xref-context" select="true()"/>
-        </xsl:call-template>
-      </xsl:variable>
-    
-      <xsl:variable name="target.database.filename">
-        <xsl:call-template name="select.target.database">
-          <xsl:with-param name="targetdoc.att" select="$targetdoc.att"/>
-          <xsl:with-param name="targetptr.att" select="$targetptr.att"/>
-          <xsl:with-param name="olink.lang" select="$olink.lang"/>
-        </xsl:call-template>
-      </xsl:variable>
-    
-      <xsl:variable name="target.database" select="document($target.database.filename,/)"/>
-    
-      <xsl:if test="$olink.debug != 0">
-        <xsl:message>
-          <xsl:text>Olink debug: root element of target.database '</xsl:text>
-          <xsl:value-of select="$target.database.filename"/>
-          <xsl:text>' is '</xsl:text>
-          <xsl:value-of select="local-name($target.database/*[1])"/>
-          <xsl:text>'.</xsl:text>
-        </xsl:message>
-      </xsl:if>
-    
-      <xsl:variable name="olink.key">
-        <xsl:call-template name="select.olink.key">
-          <xsl:with-param name="targetdoc.att" select="$targetdoc.att"/>
-          <xsl:with-param name="targetptr.att" select="$targetptr.att"/>
-          <xsl:with-param name="olink.lang" select="$olink.lang"/>
-          <xsl:with-param name="target.database" select="$target.database"/>
-        </xsl:call-template>
-      </xsl:variable>
-    
-      <xsl:if test="string-length($olink.key) = 0">
-        <xsl:message>
-          <xsl:text>Error: unresolved olink: </xsl:text>
-          <xsl:text>targetdoc/targetptr = '</xsl:text>
-          <xsl:value-of select="$targetdoc.att"/>
-          <xsl:text>/</xsl:text>
-          <xsl:value-of select="$targetptr.att"/>
-          <xsl:text>'.</xsl:text>
-        </xsl:message>
-      </xsl:if>
-
-      <xsl:variable name="href">
-        <xsl:call-template name="make.olink.href">
-          <xsl:with-param name="olink.key" select="$olink.key"/>
-          <xsl:with-param name="target.database" select="$target.database"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <xsl:variable name="hottext">
-        <xsl:choose>
-          <xsl:when test="$content">
-            <xsl:copy-of select="$content"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:call-template name="olink.hottext">
-              <xsl:with-param name="olink.key" select="$olink.key"/>
-              <xsl:with-param name="olink.lang" select="$olink.lang"/>
-              <xsl:with-param name="target.database" select="$target.database"/>
-            </xsl:call-template>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:variable>
-
-      <xsl:variable name="olink.docname.citation">
-        <xsl:call-template name="olink.document.citation">
-          <xsl:with-param name="olink.key" select="$olink.key"/>
-          <xsl:with-param name="target.database" select="$target.database"/>
-          <xsl:with-param name="olink.lang" select="$olink.lang"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <xsl:variable name="olink.page.citation">
-        <xsl:call-template name="olink.page.citation">
-          <xsl:with-param name="olink.key" select="$olink.key"/>
-          <xsl:with-param name="target.database" select="$target.database"/>
-          <xsl:with-param name="olink.lang" select="$olink.lang"/>
-        </xsl:call-template>
-      </xsl:variable>
-
-      <xsl:choose>
-        <xsl:when test="$href != ''">
-          <a href="{$href}">
-            <xsl:apply-templates select="." mode="class.attribute"/>
-            <xsl:copy-of select="$hottext"/>
-          </a>
-          <xsl:copy-of select="$olink.page.citation"/>
-          <xsl:copy-of select="$olink.docname.citation"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <span class="olink"><xsl:copy-of select="$hottext"/></span>
-          <xsl:copy-of select="$olink.page.citation"/>
-          <xsl:copy-of select="$olink.docname.citation"/>
-        </xsl:otherwise>
-      </xsl:choose>
-
-    </xsl:when>
-
-    <!-- Or use old olink mechanism -->
-    <xsl:otherwise>
-      <xsl:variable name="href">
-        <xsl:choose>
-          <xsl:when test="@linkmode">
-            <!-- use the linkmode to get the base URI, use localinfo as fragid -->
-            <xsl:variable name="modespec" select="key('id',@linkmode)"/>
-            <xsl:if test="count($modespec) != 1                           or local-name($modespec) != 'modespec'">
-              <xsl:message>Warning: olink linkmode pointer is wrong.</xsl:message>
-            </xsl:if>
-            <xsl:value-of select="$modespec"/>
-            <xsl:if test="@localinfo">
-              <xsl:text>#</xsl:text>
-              <xsl:value-of select="@localinfo"/>
-            </xsl:if>
-          </xsl:when>
-          <xsl:when test="@type = 'href'">
-            <xsl:call-template name="olink.outline">
-              <xsl:with-param name="outline.base.uri" select="unparsed-entity-uri(@targetdocent)"/>
-              <xsl:with-param name="localinfo" select="@localinfo"/>
-              <xsl:with-param name="return" select="'href'"/>
-            </xsl:call-template>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="$olink.resolver"/>
-            <xsl:text>?</xsl:text>
-            <xsl:value-of select="$olink.sysid"/>
-            <xsl:value-of select="unparsed-entity-uri(@targetdocent)"/>
-            <!-- XSL gives no access to the public identifier (grumble...) -->
-            <xsl:if test="@localinfo">
-              <xsl:text>&amp;</xsl:text>
-              <xsl:value-of select="$olink.fragid"/>
-              <xsl:value-of select="@localinfo"/>
-            </xsl:if>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:variable>
-    
-      <xsl:choose>
-        <xsl:when test="$href != ''">
-          <a href="{$href}">
-            <xsl:apply-templates select="." mode="class.attribute"/>
-            <xsl:call-template name="olink.hottext"/>
-          </a>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="olink.hottext"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="*" mode="pagenumber.markup">
-  <!-- no-op in HTML -->
-</xsl:template>
-
-
-<xsl:template name="olink.outline">
-  <xsl:param name="outline.base.uri"/>
-  <xsl:param name="localinfo"/>
-  <xsl:param name="return" select="href"/>
-
-  <xsl:variable name="outline-file" select="concat($outline.base.uri,                                $olink.outline.ext)"/>
-
-  <xsl:variable name="outline" select="document($outline-file,.)/div"/>
-
-  <xsl:variable name="node-href">
-    <xsl:choose>
-      <xsl:when test="$localinfo != ''">
-        <xsl:variable name="node" select="$outline//                                    *[@id=$localinfo or @xml:id=$localinfo]"/>
-        <xsl:value-of select="$node/@href"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$outline/@href"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="node-xref">
-    <xsl:choose>
-      <xsl:when test="$localinfo != ''">
-        <xsl:variable name="node" select="$outline//                                *[@id=$localinfo or @xml:id=$localinfo]"/>
-        <xsl:copy-of select="$node/xref"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$outline/xref"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$return = 'href'">
-      <xsl:value-of select="$node-href"/>
-    </xsl:when>
-    <xsl:when test="$return = 'xref'">
-      <xsl:value-of select="$node-xref"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy-of select="$node-xref"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template name="xref.xreflabel">
-  <!-- called to process an xreflabel...you might use this to make  -->
-  <!-- xreflabels come out in the right font for different targets, -->
-  <!-- for example. -->
-  <xsl:param name="target" select="."/>
-  <xsl:value-of select="$target/@xreflabel"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="title" mode="xref">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="command" mode="xref">
-  <xsl:call-template name="inline.boldseq"/>
-</xsl:template>
-
-<xsl:template match="function" mode="xref">
-  <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="*" mode="insert.title.markup">
-  <xsl:param name="purpose"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="title"/>
-
-  <xsl:choose>
-    <!-- FIXME: what about the case where titleabbrev is inside the info? -->
-    <xsl:when test="$purpose = 'xref' and titleabbrev">
-      <xsl:apply-templates select="." mode="titleabbrev.markup"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy-of select="$title"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="chapter|appendix" mode="insert.title.markup">
-  <xsl:param name="purpose"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="title"/>
-
-  <xsl:choose>
-    <xsl:when test="$purpose = 'xref'">
-      <i>
-        <xsl:copy-of select="$title"/>
-      </i>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy-of select="$title"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="*" mode="insert.subtitle.markup">
-  <xsl:param name="purpose"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="subtitle"/>
-
-  <xsl:copy-of select="$subtitle"/>
-</xsl:template>
-
-<xsl:template match="*" mode="insert.label.markup">
-  <xsl:param name="purpose"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="label"/>
-
-  <xsl:copy-of select="$label"/>
-</xsl:template>
-
-<xsl:template match="*" mode="insert.pagenumber.markup">
-  <xsl:param name="purpose"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="pagenumber"/>
-
-  <xsl:copy-of select="$pagenumber"/>
-</xsl:template>
-
-<xsl:template match="*" mode="insert.direction.markup">
-  <xsl:param name="purpose"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="direction"/>
-
-  <xsl:copy-of select="$direction"/>
-</xsl:template>
-
-<xsl:template match="*" mode="insert.olink.docname.markup">
-  <xsl:param name="purpose"/>
-  <xsl:param name="xrefstyle"/>
-  <xsl:param name="docname"/>
-
-  <span class="olinkdocname">
-    <xsl:copy-of select="$docname"/>
-  </span>
-
-</xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/lfs-l10n.xml
===================================================================
--- BOOK/stylesheets/lfs-xsl/lfs-l10n.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,75 +1,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<!--
-$LastChangedBy$
-$Date$
--->
-
-<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
-
-    <!-- Template to add more languages -->
-  <l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"
-          language="xx" english-language-name="xxxxx">
-
-    <l:gentext key="description" text=""/>
-    <l:gentext key="Bootscripts" text=""/>
-    <l:gentext key="Configuration Files" text=""/>
-    <l:gentext key="Kernel Configuration" text=""/>
-    <l:gentext key="Libraries" text=""/>
-    <l:gentext key="Others" text=""/>
-    <l:gentext key="Packages" text=""/>
-    <l:gentext key="Programs" text=""/>
-    <l:gentext key="Scripts" text=""/>
-
-  </l:l10n>
-
-
-    <!-- English -->
-  <l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"
-          language="en" english-language-name="English">
-
-    <l:gentext key="description" text="description"/>
-    <l:gentext key="Bootscripts" text="Bootscripts"/>
-    <l:gentext key="Configuration Files" text="Configuration Files"/>
-    <l:gentext key="Kernel Configuration" text="Kernel Configuration"/>
-    <l:gentext key="Libraries" text="Libraries"/>
-    <l:gentext key="Others" text="Others"/>
-    <l:gentext key="Packages" text="Packages"/>
-    <l:gentext key="Programs" text="Programs"/>
-    <l:gentext key="Scripts" text="Scripts"/>
-
-  </l:l10n>
-
-    <!-- Italian -->
-  <l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"
-          language="it" english-language-name="Italian">
-
-    <l:gentext key="description" text="descrizione"/>
-    <l:gentext key="Bootscripts" text="Script di avvio"/>
-    <l:gentext key="Configuration Files" text="File di configurazione"/>
-    <l:gentext key="Kernel Configuration" text="Configurazione del kernel"/>
-    <l:gentext key="Libraries" text="Librerie"/>
-    <l:gentext key="Others" text="Altri"/>
-    <l:gentext key="Packages" text="Pacchetti"/>
-    <l:gentext key="Programs" text="Programmi"/>
-    <l:gentext key="Scripts" text="Script"/>
-
-  </l:l10n>
-
-    <!-- Spanish -->
-  <l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"
-          language="es" english-language-name="Spanish">
-
-    <l:gentext key="description" text="descripci&#243;n"/>
-    <l:gentext key="Bootscripts" text="Guiones de arranque"/>
-    <l:gentext key="Configuration Files" text="Ficheros de configuraci&#243;n"/>
-    <l:gentext key="Kernel Configuration" text="Configuraci&#243;n del n&#250;cleo"/>
-    <l:gentext key="Libraries" text="Librer&#237;as"/>
-    <l:gentext key="Others" text="Otros"/>
-    <l:gentext key="Packages" text="Paquetes"/>
-    <l:gentext key="Programs" text="Programas"/>
-    <l:gentext key="Scripts" text="Guiones"/>
-
-  </l:l10n>
-
-</l:i18n>
Index: OK/stylesheets/lfs-xsl/lfs-print.css
===================================================================
--- BOOK/stylesheets/lfs-xsl/lfs-print.css	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,9 +1,0 @@
-/*
-$LastChangedBy$
-$Date$
-*/
-@import url(lfs.css);
-
-.navfooter, .headerlinks {
-   display: none;
-}
Index: OK/stylesheets/lfs-xsl/lfs.css
===================================================================
--- BOOK/stylesheets/lfs-xsl/lfs.css	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,602 +1,0 @@
-/*
-$LastChangedBy$
-$Date$
-*/
-/* Global settings */
-body {
-  font-family: verdana, tahoma, helvetica, arial, sans-serif;
-  text-align: left;
-  background: #fff;
-  color: #222;
-  margin: 1em;
-  padding: 0;
-  font-size: 1em;
-  line-height: 1.2em
-}
-
-
-/* Links */
-a:link { color: #22b; }
-a.ulink:link { font-weight: bold; color: #55f; }
-a:visited { color: #7e4988 ! important; }
-a:hover, a:focus { color: #d30e08 ! important; }
-a:active { color: #6b77b1 ! important;}
-
-
-/* Book titlepage */
-.book .titlepage {
-  background: #f5f6f7;
-  margin: 0px auto;
-  padding: 0 1em;
-}
-
-.book hr {
-  background: #dbddec;
-  height: .3em;
-  border: 0px;
-  margin: 0 -1em;
-  padding: 0;
-}
-
-div.dedication {
-  padding-left: 1em;
-}
-
-
-/* Sections */
-div.sect1, div.appendix {
-  padding-left: .3em;
-}
-
-.package, .kernel, .installation, .commands, .testing, .configuration, .content {
-  padding: 0 .5em .2em 0;
-  margin: 0;
-}
-
-.lfs .package {
-  background: #f5f6f7;
-  border-bottom: 0.2em solid #dbddec;
-  padding-top: .1em;
-  margin-top: 0;
-}
-
-.lfs .configuration {
-  background:   #fefefe;
-  border-top: 0.2em solid #dbddec;
-}
-
-.lfs .content {
-  background: #f5f6f7;
-  border-top: 0.2em solid #dbddec;
-  padding-bottom: .1em;
-  margin-bottom: 0;
-}
-
-
-/* Headers */
-h1, h2, h3, h4, h5, h6, b, .strong {
-  color: #000;
-  font-weight: bold;
-  line-height: 1em;
-}
-
-h1 {
-  font-size: 173%;
-  text-align: center;
-}
-
-.book h1 {
-  margin: 0;
-  padding: 0.4em;
-}
-
-.preface h1, .part h1, .chapter h1, .appendix h1, .index h1, .sect1 h1 {
-  background: #f5f6f7;
-  border-bottom: .1em solid #dbddec;
-  margin-bottom: 1em;
-  margin-top: 0;
-  padding: .4em;
-}
-
-.sect1 h1, .appendix h1 {
-  margin-left: -.2em;
-}
-
-.wrap h1 {
-  background: #f5f6f7;
-  margin: 0;
-  padding: .4em;
-}
-
-h1.title sup {
-  font-size: small;
-}
-
-h2 {
-  font-size: 144%;
-}
-
-.book h2.subtitle {
-  text-align: center;
-  background: #dbddec;
-  margin: 0;
-  padding: 0.2em;
-}
-
-.appendix h2 {
-  font-size: 133%;
-  margin-top: .8em;
-  margin-bottom: 0.2em;
-}
-
-h3 {
-  font-size: 120%;
-}
-
-h4 {
-  font-size: 110%;
-}
-
-.package h4, h5, h6 {
-  font-size: 100%;
-  font-style: italic;
-}
-
-
-/* Navigation */
-div.navheader, div.navfooter {
-  background: #ecedef;
-  margin: 0;
-  padding: 0.1em .5em;
-}
-
-div.navheader {
-  border-bottom: 1px solid #dbddec;
-}
-
-div.navfooter {
-  border-top: 1px solid #dbddec;
-}
-
-div.navheader h4 {
-  margin-top: .4em;
-  margin-bottom: 0;
-  text-align: center;
-}
-
-div.navheader h3 {
-  margin-top: .2em;
-  margin-bottom: 0;
-  text-align: center;
-}
-
-div.navheader ul, div.navfooter ul {
-  padding: .2em .5em .5em 0;
-  margin: .5em 0;
-  position: relative;
-  background: #dbddec;
-}
-
-div.navheader ul li, div.navfooter ul li {
-  display: inline;
-  width: 40%;
-}
-
-div.navheader ul li.prev, div.navfooter ul li.prev {
-  position: absolute;
-  display: block;
-  left: 0;
-  text-align: left;
-  padding: 0.2em 1em;
-  margin-left: 6px;
-}
-
-div.navheader ul li.next, div.navfooter ul li.next {
-  position: absolute;
-  display: block;
-  text-align: right;
-  right: 5px;
-  padding: 0.2em 0.5em;
-  margin-right: 7px;
-}
-
-div.navheader ul li.prev p, div.navfooter ul li.prev p,
-div.navheader ul li.next p, div.navfooter ul li.next p {
-  padding: 0;
-  margin: 1px 0px;
-}
-
-div.navheader ul li.home, div.navheader ul li.up,
-div.navfooter ul li.home, div.navfooter ul li.up {
-  text-align: center;
-  padding: 0;
-  margin: 0px auto;
-  display: block;
-  color: #dbddec;
-}
-
-
-/* TOC */
-div.toc ul, div.index ul, div.navheader ul, div.navfooter ul {
-  list-style: none;
-}
-
-div.toc {
-  padding-left: 1em;
-}
-
-li.preface, .part li.appendix {
-  margin-left: 1em;
-}
-
-div.toc h3 {
-  margin: 1em 0 .3em 0;
-}
-
-li.appendix h3, li.glossary h3, li.index h3 {
-  margin: .5em
-}
-
-div.toc h4 {
-  margin: .6em 0 .2em 0;
-}
-
-li.chapter h4 a {
-  display: block;
-  margin-bottom: .4em
-}
-
-.dummy {
-  display: block;
-  font-weight: bold;
-  font-size: 110%;
-  margin: .6em 0 .2em 0;
-}
-
-
-/* Index */
-.item {
-    float: left;
-    margin-right: 1em
-}
-
-.secitem {
-    font-weight: normal;
-    float: left;
-    margin-right: 1em
-}
-
-.indexref {
-    display: block;
-}
-
-.item + .indexref {
-    margin-left: 20em;
-}
-
-.secitem + .indexref {
-    margin-left: 19em;
-}
-
-
-/* Admonitions */
-div.admon img {
-  padding: .3em;
-}
-
-div.admon h3 {
-  display: inline;
-  margin-left: 2em;
-}
-
-div.admon p {
-  margin-left: .5em;
-}
-
-div.admon pre {
-  margin: 0.5em 3em;
-}
-
-div.note, div.tip {
-  background-color: #fffff6;
-  border: 2px solid #dbddec;
-  width: 90%;
-  margin: .5em auto;
-}
-
-div.important, div.warning, div.caution {
-  background-color: #fffff6;
-  border: medium solid #400;
-  width: 90%;
-  margin: .5em auto;
-  color: #600;
-}
-
-div.important h3, div.warning h3, div.caution h3 {
-  color: #900;
-}
-
-div.important em, div.warning em, div.caution em {
-  color: #000;
-  font-weight: bold;
-}
-
-
-/* table */
-.table p.title {
-  text-align: center;
-  margin-top: 0;
-  margin-bottom: .3em;
-}
-
-.table table {
-  margin-left: auto;
-  margin-right: auto;
-}
-
-.table table th, .table table td {
-  padding: 0.2em 2em 0.2em 2em;
-  text-align: left;
-}
-
-.revhistory {
-  padding-left: 1em;
-}
-
-.revhistory th {
-  line-height: 2em;
-  text-align: left;
-}
-
-.revhistory td {
-  padding-right: 1em;
-}
-
-
-/* variablelist as table */
-.variablelist table {
-  width: auto;
-  margin: 0 1em 0 1em;
-}
-
-.variablelist td {
-  vertical-align: top;
-}
-
-.variablelist td span, td p {
-  margin: 0.25em;
-}
-
-
-/* variablelist as list */
-dl {
-  padding-left: 1em
-}
-
-dt {
-  font-weight: bold;
-  margin-left: 1em;
-}
-
-dd {
-  margin-bottom: .6em;
-  margin-left: 1em;
-}
-
-dd p {
-  margin-top: 0;
-  margin-bottom: 0;
-  padding-top: 0;
-  padding-bottom: 0;
-}
-
-div.materials dt {
-  display: list-item;
-}
-
-div.materials dd {
-  margin-left: 0;
-  padding-left: 0;
-}
-
-
-/* segmentedlist */
-.appendix .segmentedlist {
-  padding-left: 1em;
-}
-
-.package .seg {
-  margin-bottom: 0em;
-  margin-top: 0em;
-  clear: left;
-}
-
-.content .seg {
-  margin-bottom: .4em;
-  margin-top: .4em;
-  clear: left;
-}
-
-.segtitle {
-  float: left;
-}
-
-.package .segbody, .appendix .segbody {
-  display: block;
-  padding-left: 14em;
-}
-
-.content .segbody {
-  display: block;
-  padding-left: 12em;
-}
-
-
-/* itemizedlist */
-ul {
-  padding-left: 1em
-}
-
-.itemizedlist ul {
-  margin-left: 1em
-}
-
-.itemizedlist li ul {
-  margin-bottom: 1.2em;
-}
-
-.itemizedlist li ul li p {
-  margin-top: .5em;
-  margin-bottom: .5em;
-}
-
-.itemizedlist li ul li:first-child p:first-child {
-  margin-top: -.6em;
-}
-
-ul.compact {
-  list-style: none;
-}
-
-.blfs ul.compact {
-  list-style: disc;
-}
-
-ul.compact li {
-  margin: 0em;
-  padding: 0em;
-}
-
-ul.compact li p {
-  padding: 0.3em;
-  margin: 0em;
-}
-
-.blfs ul.compact li p {
-  background-color: #f0fff0;
-}
-
-/* orderedlist */
-ol {
-  list-style: decimal;
-}
-
-ol ol {
-  list-style: lower-alpha;
-}
-
-ol ol ol {
-  list-style: lower-roman;
-}
-
-ol.compact li {
-  margin: 0em;
-  padding: 0em;
-}
-
-ol.compact li p {
-  padding: 0.3em;
-  margin: 0em;
-}
-
-
-/* Indented blocks */
-p, blockquote {
-  padding-left: 1em;
-  padding-right: 1em;
-}
-
-
-/* Monospaced elements */
-tt, code, kbd, pre, .command {
-  font-family: monospace;
-}
-
-.systemitem {
-  font-style: italic;
-}
-
-pre {
-  background-color: #e5e5e5;
-  border: 1px solid #050505;
-  padding: .5em 1em;
-  margin: 0 2em .5em 2em;
-  font-weight: bold;
-}
-
-pre.userinput {
-  color: #101310;
-}
-
-pre.root {
-  color: #101310;
-  border: 1px solid #11a;
-}
-
-pre.screen {
-  color: #000;
-  background-color: #e9e9e9;
-  font-weight: normal;
-}
-
-.literal, .prompt {
-  font-weight: normal;
-}
-
-
-/* Mixed tags */
-p.usernotes {
-  margin-left: -1em;
-  font-size: small;
-  font-weight: bold;
-  font-style: italic;
-}
-
-.underlined {
-  text-decoration: underline;
-}
-
-
-/* Last edited info */
-p.updated {
-  font-size: small;
-  font-weight: bold;
-  font-style: italic;
-}
-
-
-/* Special colored blocks */
-  /* OrangeRed4 */
-.feature-ssp {
-  color: #8B2500;
-}
-
-  /* RoyalBlue3 */
-.feature-aslr {
-  color: #3A5FCD;
-}
-
-  /* NavyBlue */
-.feature-pax {
-  color: #000080;
-}
-
-  /* VioletRed */
-.feature-hardened_tmp {
-  color: #d02090;
-}
-
-  /* PaleTurquoise4 */
-.feature-warnings {
-  color: #668b8b;
-}
-
-  /* RosyBrown */
-.feature-misc {
-  color: #bc8f8f;
-}
-
-  /* Sienna*/
-.feature-blowfish {
-  color: #8E6B23
-}
Index: OK/stylesheets/lfs-xsl/nochunks.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/nochunks.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,639 +1,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<!--
-$LastChangedBy$
-$Date$
--->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns="http://www.w3.org/1999/xhtml"
-                version="1.0">
-
-   <!-- Stylesheet for non-chunked XHTML output
-        Replaces {docbook-xsl}/xhtml/profile-docbook.xsl -->
-
-    <!-- Upstream XHTML templates -->
-  <xsl:import href="docbook-xsl-snapshot/xhtml/docbook.xsl"/>
-
-    <!-- Fix encoding issues with default UTF-8 output of the xhtml stylesheet -->
-  <xsl:output method="html" encoding="ISO-8859-1" indent="no" />
-
-   <!-- Including our others customized templates -->
-  <xsl:include href="common.xsl"/>
-  <xsl:include href="xhtml/lfs-index.xsl"/>
-  <xsl:include href="xhtml/lfs-mixed.xsl"/>
-  <xsl:include href="xhtml/lfs-sections.xsl"/>
-  <xsl:include href="xhtml/lfs-toc.xsl"/>
-  <xsl:include href="xhtml/lfs-xref.xsl"/>
-
-    <!-- Control generation of ToCs and LoTs -->
-  <xsl:param name="generate.toc">
-    book      toc,title
-    preface   nop
-    part      nop
-    chapter   nop
-    appendix  nop
-    sect1     nop
-    sect2     nop
-    sect3     nop
-    sect4     nop
-    sect5     nop
-    section   nop
-  </xsl:param>
-
-    <!-- How deep should recursive sections appear in the TOC? -->
-  <xsl:param name="toc.section.depth">1</xsl:param>
-
-    <!-- How maximaly deep should be each TOC? -->
-  <xsl:param name="toc.max.depth">3</xsl:param>
-
-    <!-- Dropping some unwanted style attributes -->
-  <xsl:param name="ulink.target" select="''"></xsl:param>
-  <xsl:param name="css.decoration" select="0"></xsl:param>
-
-    <!-- Don't use graphics in admonitions -->
-  <xsl:param name="admon.graphics" select="0"/>
-
-    <!-- Changing the admonitions output tagging:
-           Removed $admon.style support
-           Hardcoded $admon.textlabel feature -->
-    <!-- The original template is in {docbook-xsl}/xhtml/admon.xsl -->
-  <xsl:template name="nongraphical.admonition">
-    <div class="admon {name(.)}">
-      <h3>
-        <xsl:apply-templates select="." mode="object.title.markup"/>
-      </h3>
-      <xsl:apply-templates/>
-    </div>
-  </xsl:template>
-
-    <!-- sect2.titlepage:
-           Removed a lot of unneeded code.
-           Skip empty titles.
-           No label in preface (actualy, skip the hardcoded dot). -->
-    <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
-  <xsl:template name="sect2.titlepage">
-    <xsl:choose>
-      <xsl:when test="string-length(title) = 0"/>
-      <xsl:otherwise>
-        <h3 class="{name(.)}">
-          <xsl:if test="@id">
-            <a id="{@id}" name="{@id}"/>
-          </xsl:if>
-          <xsl:if test="not(ancestor::preface) and $section.autolabel != 0">
-            <xsl:apply-templates select="." mode="label.markup"/>
-            <xsl:text>. </xsl:text>
-          </xsl:if>
-          <xsl:value-of select="title"/>
-        </h3>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-    <!-- The CSS Stylesheet:
-           Note: there is some diferences with lfs.css code releated
-                 to h* values, admonitions and no navigational code. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/docbook.xsl -->
-  <xsl:template name='user.head.content'>
-    <style type="text/css">
-      <xsl:text>
-/* Global settings */
-body {
-  font-family: verdana, tahoma, helvetica, arial, sans-serif;
-  text-align: left;
-  background: #fff;
-  color: #222;
-  margin: 1em;
-  padding: 0;
-  font-size: 1em;
-  line-height: 1.2em
-}
-
-
-/* Links */
-a:link { color: #22b; }
-a.ulink:link { font-weight: bold; color: #55f; }
-a:visited { color: #7e4988 ! important; }
-a:hover, a:focus { color: #d30e08 ! important; }
-a:active { color: #6b77b1 ! important;}
-
-
-/* Book titlepage */
-.book {
-  margin: 0px auto;
-  padding: 0 1em;
-}
-
-.book h1, .book .authorgroup, .book .copyright, .book .legalnotice .revhistory {
-  background: #f5f6f7;
-  margin: 0px auto;
-  padding: .1em 1em;
-}
-
-.book hr {
-  background: #dbddec;
-  height: .3em;
-  border: 0px;
-  margin: 0;
-  padding: 0;
-}
-
-div.dedication {
-  padding-left: 1em;
-}
-
-
-/* Sections */
-div.sect1, div.appendix {
-  padding-left: .3em;
-}
-
-.package, .kernel, .installation, .commands, .testing, .configuration, .content {
-  padding: 0 .5em .2em 0;
-  margin: 0;
-}
-
-.lfs .package {
-  background: #f5f6f7;
-  border-bottom: 0.2em solid #dbddec;
-  padding-top: .1em;
-  margin-top: 0;
-}
-
-.lfs .configuration {
-  background:   #fefefe;
-  border-top: 0.2em solid #dbddec;
-}
-
-.lfs .content {
-  background: #f5f6f7;
-  border-top: 0.2em solid #dbddec;
-  border-bottom: 0.2em solid #dbddec;
-  padding-bottom: .1em;
-  margin-bottom: 0;
-}
-
-
-/* Headers */
-h1, h2, h3, h4, h5, h6, b, .strong {
-  color: #000;
-  font-weight: bold;
-  line-height: 1em;
-}
-
-h1 {
-  font-size: 173%;
-  text-align: center;
-}
-
-.book h1 {
-  margin: 0;
-  padding: 0.4em;
-}
-
-h1.title sup {
-  font-size: small;
-}
-
-h2 {
-  font-size: 144%;
-}
-
-.preface h2, .part h1, .chapter h2, .appendix h2, .index h1, .sect1 h2 {
-  background: #f5f6f7;
-  border-top: .2em solid #dbddec;
-  border-bottom: .2em solid #dbddec;
-  margin-bottom: 1em;
-  margin-top: 1em;
-  padding: .4em;
-  text-align: center;
-}
-
-.sect1 h2, .appendix h2 {
-  margin-left: -.2em;
-}
-
-.wrap h2 {
-  background: #f5f6f7;
-  border-bottom: 0;
-  margin-top: 1em;
-  margin-bottom: 0;
-  padding-top: .4em;
-}
-
-.book h2.subtitle {
-  text-align: center;
-  background: #dbddec;
-  margin: 0;
-  padding: 0.2em;
-}
-
-h3 {
-  font-size: 120%;
-}
-
-.appendix h3 {
-  font-size: 133%;
-  margin-top: .8em;
-  margin-bottom: 0.2em;
-}
-
-h4 {
-  font-size: 110%;
-}
-
-.package h4, h5, h6 {
-  font-size: 100%;
-  font-style: italic;
-}
-
-
-/* TOC */
-div.toc ul, div.index ul, div.navheader ul, div.navfooter ul {
-  list-style: none;
-}
-
-div.toc {
-  padding-left: 1em;
-}
-
-li.preface, .part li.appendix {
-  margin-left: 1em;
-}
-
-div.toc h3 {
-  margin: 1em 0 .3em 0;
-}
-
-li.appendix h3, li.glossary h3, li.index h3 {
-  margin: .5em
-}
-
-div.toc h4 {
-  margin: .6em 0 .2em 0;
-}
-
-li.chapter h4 a {
-  display: block;
-  margin-bottom: .4em
-}
-
-.dummy {
-  display: block;
-  font-weight: bold;
-  font-size: 110%;
-  margin: .6em 0 .2em 0;
-}
-
-
-/* Index */
-.item {
-    float: left;
-    margin-right: 1em
-}
-
-.secitem {
-    font-weight: normal;
-    float: left;
-    margin-right: 1em
-}
-
-.indexref {
-    display: block;
-}
-
-.item + .indexref {
-    margin-left: 20em;
-}
-
-.secitem + .indexref {
-    margin-left: 19em;
-}
-
-
-/* Admonitions */
-div.admon h3 {
-  padding-left: 2.5em;
-  padding-top: 1em;
-}
-
-div.admon p {
-  margin-left: .5em;
-}
-
-div.admon pre {
-  margin: 0.5em 3em;
-}
-
-div.note, div.tip {
-  background-color: #fffff6;
-  border: 2px solid #dbddec;
-  width: 90%;
-  margin: .5em auto;
-}
-
-div.important, div.warning, div.caution {
-  background-color: #fffff6;
-  border: medium solid #400;
-  width: 90%;
-  margin: .5em auto;
-  color: #600;
-}
-
-div.important h3, div.warning h3, div.caution h3 {
-  color: #900;
-}
-
-div.important em, div.warning em, div.caution em {
-  color: #000;
-  font-weight: bold;
-}
-
-
-/* table */
-.table p.title {
-  text-align: center;
-  margin-top: 0;
-  margin-bottom: .3em;
-}
-
-.table table {
-  margin-left: auto;
-  margin-right: auto;
-}
-
-.table table th, .table table td {
-  padding: 0.2em 2em 0.2em 2em;
-  text-align: left;
-}
-
-.revhistory {
-  padding-left: 1em;
-}
-
-.revhistory th {
-  line-height: 2em;
-  text-align: left;
-}
-
-.revhistory td {
-  padding-right: 1em;
-}
-
-
-/* variablelist as table */
-.variablelist table {
-  width: auto;
-  margin: 0 1em 0 1em;
-}
-
-.variablelist td {
-  vertical-align: top;
-}
-
-.variablelist td span, td p {
-  margin: 0.25em;
-}
-
-.variablelist td p {
-  margin-top: 0;
-}
-
-
-/* variablelist as list */
-dl {
-  padding-left: 1em
-}
-
-dt {
-  font-weight: bold;
-  margin-left: 1em;
-}
-
-dd {
-  margin-bottom: .6em;
-  margin-left: 1em;
-}
-
-dd p {
-  margin-top: 0;
-  margin-bottom: 0;
-  padding-top: 0;
-  padding-bottom: 0;
-}
-
-div.materials dt {
-  display: list-item;
-}
-
-div.materials dd {
-  margin-left: 0;
-  padding-left: 0;
-}
-
-
-/* segmentedlist */
-.appendix .segmentedlist {
-  padding-left: 1em;
-}
-
-.package .seg {
-  margin-bottom: 0em;
-  margin-top: 0em;
-  clear: left;
-}
-
-.content .seg {
-  margin-bottom: .4em;
-  margin-top: .4em;
-  clear: left;
-}
-
-.segtitle {
-  float: left;
-}
-
-.package .segbody, .appendix .segbody {
-  display: block;
-  padding-left: 14em;
-}
-
-.content .segbody {
-  display: block;
-  padding-left: 12em;
-}
-
-
-/* itemizedlist */
-ul {
-  padding-left: 1em
-}
-
-.itemizedlist ul {
-  margin-left: 1em
-}
-
-.itemizedlist li ul {
-  margin-bottom: 1.2em;
-}
-
-.itemizedlist li ul li p {
-  margin-top: .5em;
-  margin-bottom: .5em;
-}
-
-.itemizedlist li ul li:first-child p:first-child {
-  margin-top: -.6em;
-}
-
-ul.compact {
-  list-style: none;
-}
-
-.blfs ul.compact {
-  list-style: disc;
-}
-
-ul.compact li {
-  margin: 0em;
-  padding: 0em;
-}
-
-ul.compact li p {
-  padding: 0.3em;
-  margin: 0em;
-}
-
-.blfs ul.compact li p {
-  background-color: #f0fff0;
-}
-
-/* orderedlist */
-ol {
-  list-style: decimal;
-}
-
-ol ol {
-  list-style: lower-alpha;
-}
-
-ol ol ol {
-  list-style: lower-roman;
-}
-
-ol.compact li {
-  margin: 0em;
-  padding: 0em;
-}
-
-ol.compact li p {
-  padding: 0.3em;
-  margin: 0em;
-}
-
-
-/* Indented blocks */
-p, blockquote {
-  padding-left: 1em;
-  padding-right: 1em;
-}
-
-
-/* Monospaced elements */
-tt, code, kbd, pre, .command {
-  font-family: monospace;
-}
-
-.systemitem {
-  font-style: italic;
-}
-
-pre {
-  background-color: #e5e5e5;
-  border: 1px solid #050505;
-  padding: .5em 1em;
-  margin: 0 2em .5em 2em;
-  font-weight: bold;
-}
-
-pre.userinput {
-  color: #101310;
-}
-
-pre.root {
-  color: #101310;
-  border: 1px solid #11a;
-}
-
-pre.screen {
-  color: #000;
-  background-color: #e9e9e9;
-  font-weight: normal;
-}
-
-.literal, .prompt {
-  font-weight: normal;
-}
-
-
-/* Mixed tags */
-p.usernotes {
-  margin-left: -1em;
-  font-size: small;
-  font-weight: bold;
-  font-style: italic;
-}
-
-.underlined {
-  text-decoration: underline;
-}
-
-
-/* Last edited info */
-p.updated {
-  font-size: small;
-  font-weight: bold;
-  font-style: italic;
-}
-
-
-/* Special colored blocks */
-  /* OrangeRed4 */
-.feature-ssp {
-  color: #8B2500;
-}
-
-  /* RoyalBlue3 */
-.feature-aslr {
-  color: #3A5FCD;
-}
-
-  /* NavyBlue */
-.feature-pax {
-  color: #000080;
-}
-
-  /* VioletRed */
-.feature-hardened_tmp {
-  color: #d02090;
-}
-
-  /* PaleTurquoise4 */
-.feature-warnings {
-  color: #668b8b;
-}
-
-  /* RosyBrown */
-.feature-misc {
-  color: #bc8f8f;
-}
-
-  /* Sienna*/
-.feature-blowfish {
-  color: #8E6B23
-}
-      </xsl:text>
-    </style>
-  </xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/pdf.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/pdf.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,108 +1,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<!--
-$LastChangedBy$
-$Date$
--->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                version="1.0">
-
-   <!-- Stylesheet for FO output used to generate PDF
-        Sets global params and include customization stylesheets. -->
-
-    <!-- Upstream FO templates. Profiled version is not supported by
-         xsltproc, thus pofiling must be done in two steps (see Makefile) -->
-  <xsl:import href="docbook-xsl-snapshot/fo/docbook.xsl"/>
-
-    <!-- Uncomment the next for debugging the raw FO code.
-         Note that FOP will complaints about a lot of paragraph overflows
-         due that verbatim output is also indented.
-         Remember to comment the "rm $(BASEDIR)/lfs-pdf.fo" in
-         the Makefile. -->
-  <!--<xsl:output  encoding="UTF-8" indent="yes" />-->
-
-    <!-- Including our others customized templates. -->
-  <xsl:include href="common.xsl"/>
-  <xsl:include href="pdf/lfs-admon.xsl"/>
-  <xsl:include href="pdf/lfs-index.xsl"/>
-  <xsl:include href="pdf/lfs-lists.xsl"/>
-  <xsl:include href="pdf/lfs-mixed.xsl"/>
-  <xsl:include href="pdf/lfs-pagesetup.xsl"/>
-  <xsl:include href="pdf/lfs-xref.xsl"/>
-
-    <!-- Activating FOP-1 extensions. We use FOP-0.93 as the FO procesor. -->
-  <xsl:param name="fop1.extensions" select="1"/>
-
-    <!-- Desactivate draft mode at all. -->
-  <xsl:param name="draft.mode" select="'no'"/>
-
-   <!-- Paper size -->
-  <xsl:param name="paper.type" select="'USletter'"/>
-
-    <!-- Paper size required by the publisher
-  <xsl:param name="paper.type" select="'Customized'"/>
-  <xsl:param name="page.width">7.25in</xsl:param>
-  <xsl:param name="page.height">9.25in</xsl:param>
-    -->
-
-    <!-- Is the document to be printed double sided? 1 = yes, 0 = no -->
-    <!-- Change "double.sided" to "1" for published versions. -->
-  <xsl:param name="double.sided" select="0"/>
-
-    <!-- Hyphenate? -->
-  <xsl:param name="hyphenate">false</xsl:param>
-
-    <!-- Allow URLs to be automatically hyphenated.
-         We have expanded the support to several inline tags.
-         See pdf/lfs-mixed.xsl -->
-  <xsl:param name="ulink.hyphenate" select="'&#x200B;'"/>
-
-    <!-- List of characters to allow ulink URLs, and supported inline tags,
-         to be automatically hyphenated on.
-         Note: the / character is in the list but FOP-0.93 ignores it. -->
-  <xsl:param name="ulink.hyphenate.chars" select="'/._-'"/>
-
-    <!-- Specify the default text alignment. -->
-  <xsl:param name="alignment">justify</xsl:param>
-
-    <!-- Specifies the default point size for body text.
-         Used for titles size calculation. -->
-  <xsl:param name="body.font.master">9</xsl:param>
-
-    <!-- Specifies the default font size for body text. -->
-  <xsl:param name="body.font.size">12pt</xsl:param>
-
-    <!-- Control generation of ToCs and LoTs -->
-  <xsl:param name="generate.toc">
-    book      toc,title
-    part      nop
-  </xsl:param>
-
-    <!-- How deep should recursive sections appear in the TOC? -->
-  <xsl:param name="toc.section.depth">1</xsl:param>
-
-    <!-- Amount of indentation for TOC entries. -->
-  <xsl:param name="toc.indent.width" select="18"/>
-
-    <!-- Turns page numbers in xrefs on and off. -->
-  <xsl:param name="insert.xref.page.number">no</xsl:param>
-
-    <!-- Display URLs after ulinks? 1 = yes, 0 = no
-         Set to 0 to prevent duplicate e-mails in the Acknowledgments pages. -->
-  <xsl:param name="ulink.show" select="0"/>
-
-    <!-- Processing instruction for hard page breaks.
-         FOP-0.93 supports now @keep-*.*, @orphans, and @widows attributes,
-         that solves several page break issues.
-         It also supports the soft page break procesing instruction included
-         in the DocBook stylesheets.
-         But some times we may need hard page breaks for final book versions. -->
-    <!-- To know how to use all that page break features, see
-         http://www.sagehill.net/docbookxsl/PageBreaking.html -->
-  <xsl:template match="processing-instruction('hard-pagebreak')">
-    <fo:block break-before='page'/>
-  </xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/pdf/lfs-admon.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/pdf/lfs-admon.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,81 +1,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<!--
-$LastChangedBy$
-$Date$
--->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                version="1.0">
-
-  <!-- This stylesheet controls how admonitions are displayed -->
-
-    <!-- Use graphics in admonitions? 1 = yes, 0 = no -->
-  <xsl:param name="admon.graphics" select="1"/>
-
-    <!-- Path to admonition graphics relative to index.xml -->
-  <xsl:param name="admon.graphics.path" select="'images/'"/>
-
-    <!-- Global admonitions properties -->
-  <xsl:attribute-set name="graphical.admonition.properties">
-    <xsl:attribute name="keep-together.within-column">
-      <xsl:variable name="keep.together">
-        <xsl:call-template name="pi.dbfo_keep-together"/>
-      </xsl:variable>
-      <xsl:choose>
-        <xsl:when test="$keep.together != ''">
-          <xsl:value-of select="$keep.together"/>
-        </xsl:when>
-        <xsl:otherwise>always</xsl:otherwise>
-      </xsl:choose>
-    </xsl:attribute>
-    <xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
-    <xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
-    <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
-    <xsl:attribute name="space-after.optimum">0.6em</xsl:attribute>
-    <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute>
-    <xsl:attribute name="space-after.maximum">0.8em</xsl:attribute>
-    <xsl:attribute name="padding-start">5pt</xsl:attribute>
-    <xsl:attribute name="padding-top">5pt</xsl:attribute>
-    <xsl:attribute name="padding-bottom">5pt</xsl:attribute>
-    <xsl:attribute name="border-style">solid</xsl:attribute>
-    <xsl:attribute name="border-width">0.5pt</xsl:attribute>
-    <xsl:attribute name="background-color">#FFFFE6</xsl:attribute>
-    <xsl:attribute name="border-color">
-      <xsl:choose>
-        <xsl:when test="self::note | self::tip">#E0E0E0</xsl:when>
-        <xsl:otherwise>#DCC</xsl:otherwise>
-      </xsl:choose>
-    </xsl:attribute>
-  </xsl:attribute-set>
-
-    <!-- Properties for admonitions titles -->
-  <xsl:attribute-set name="admonition.title.properties">
-    <xsl:attribute name="font-size">14pt</xsl:attribute>
-    <xsl:attribute name="font-weight">bold</xsl:attribute>
-    <xsl:attribute name="hyphenate">false</xsl:attribute>
-    <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
-    <xsl:attribute name="color">
-      <xsl:choose>
-        <xsl:when test="ancestor-or-self::important | ancestor-or-self::warning
-                        | ancestor-or-self::caution">#500</xsl:when>
-        <xsl:otherwise>#000</xsl:otherwise>
-      </xsl:choose>
-    </xsl:attribute>
-  </xsl:attribute-set>
-
-    <!-- Properties for admonitions text -->
-  <xsl:attribute-set name="admonition.properties">
-    <xsl:attribute name="margin-right">5pt</xsl:attribute>
-  </xsl:attribute-set>
-
-    <!-- admon.graphic.width:
-           Making the graphic smaller. -->
-    <!-- The original template is in {docbook-xsl}/fo/admon.xsl -->
-  <xsl:template match="*" mode="admon.graphic.width">
-    <xsl:param name="node" select="."/>
-    <xsl:text>24pt</xsl:text>
-  </xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/pdf/lfs-index.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/pdf/lfs-index.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,140 +1,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<!--
-$LastChangedBy$
-$Date$
--->
-
-<!DOCTYPE xsl:stylesheet [
-<!ENTITY lowercase "'Aa&#192;&#224;&#193;&#225;&#194;&#226;&#195;&#227;&#196;&#228;&#197;&#229;&#256;&#257;&#258;&#259;&#260;&#261;&#461;&#462;&#478;&#479;&#480;&#481;&#506;&#507;&#512;&#513;&#514;&#515;&#550;&#551;&#7680;&#7681;&#7834;&#7840;&#7841;&#7842;&#7843;&#7844;&#7845;&#7846;&#7847;&#7848;&#7849;&#7850;&#7851;&#7852;&#7853;&#7854;&#7855;&#7856;&#7857;&#7858;&#7859;&#7860;&#7861;&#7862;&#7863;Bb&#384;&#385;&#595;&#386;&#387;&#7682;&#7683;&#7684;&#7685;&#7686;&#7687;Cc&#199;&#231;&#262;&#263;&#264;&#265;&#266;&#267;&#268;&#269;&#391;&#392;&#597;&#7688;&#7689;Dd&#270;&#271;&#272;&#273;&#394;&#599;&#395;&#396;&#453;&#498;&#545;&#598;&#7690;&#7691;&#7692;&#7693;&#7694;&#7695;&#7696;&#7697;&#7698;&#7699;Ee&#200;&#232;&#201;&#233;&#202;&#234;&#203;&#235;&#274;&#275;&#276;&#277;&#278;&#279;&#280;&#281;&#282;&#283;&#516;&#517;&#518;&#519;&#552;&#553;&#7700;&#7701;&#7702;&#7703;&#7704;&#7705;&#7706;&#7707;&#7708;&#7709;&#7864;&#7865;&#7866;&#7867;&#7868;&#7869;&#7870;&#7871;&#7872;&#7873;&#7874;&#7875;&#7876;&#7877;&#7878;&#7879;Ff&#401;&#402;&#7710;&#7711;Gg&#284;&#285;&#286;&#287;&#288;&#289;&#290;&#291;&#403;&#608;&#484;&#485;&#486;&#487;&#500;&#501;&#7712;&#7713;Hh&#292;&#293;&#294;&#295;&#542;&#543;&#614;&#7714;&#7715;&#7716;&#7717;&#7718;&#7719;&#7720;&#7721;&#7722;&#7723;&#7830;Ii&#204;&#236;&#205;&#237;&#206;&#238;&#207;&#239;&#296;&#297;&#298;&#299;&#300;&#301;&#302;&#303;&#304;&#407;&#616;&#463;&#464;&#520;&#521;&#522;&#523;&#7724;&#7725;&#7726;&#7727;&#7880;&#7881;&#7882;&#7883;Jj&#308;&#309;&#496;&#669;Kk&#310;&#311;&#408;&#409;&#488;&#489;&#7728;&#7729;&#7730;&#7731;&#7732;&#7733;Ll&#313;&#314;&#315;&#316;&#317;&#318;&#319;&#320;&#321;&#322;&#410;&#456;&#564;&#619;&#620;&#621;&#7734;&#7735;&#7736;&#7737;&#7738;&#7739;&#7740;&#7741;Mm&#625;&#7742;&#7743;&#7744;&#7745;&#7746;&#7747;Nn&#209;&#241;&#323;&#324;&#325;&#326;&#327;&#328;&#413;&#626;&#414;&#544;&#459;&#504;&#505;&#565;&#627;&#7748;&#7749;&#7750;&#7751;&#7752;&#7753;&#7754;&#7755;Oo&#210;&#242;&#211;&#243;&#212;&#244;&#213;&#245;&#214;&#246;&#216;&#248;&#332;&#333;&#334;&#335;&#336;&#337;&#415;&#416;&#417;&#465;&#466;&#490;&#491;&#492;&#493;&#510;&#511;&#524;&#525;&#526;&#527;&#554;&#555;&#556;&#557;&#558;&#559;&#560;&#561;&#7756;&#7757;&#7758;&#7759;&#7760;&#7761;&#7762;&#7763;&#7884;&#7885;&#7886;&#7887;&#7888;&#7889;&#7890;&#7891;&#7892;&#7893;&#7894;&#7895;&#7896;&#7897;&#7898;&#7899;&#7900;&#7901;&#7902;&#7903;&#7904;&#7905;&#7906;&#7907;Pp&#420;&#421;&#7764;&#7765;&#7766;&#7767;Qq&#672;Rr&#340;&#341;&#342;&#343;&#344;&#345;&#528;&#529;&#530;&#531;&#636;&#637;&#638;&#7768;&#7769;&#7770;&#7771;&#7772;&#7773;&#7774;&#7775;Ss&#346;&#347;&#348;&#349;&#350;&#351;&#352;&#353;&#536;&#537;&#642;&#7776;&#7777;&#7778;&#7779;&#7780;&#7781;&#7782;&#7783;&#7784;&#7785;Tt&#354;&#355;&#356;&#357;&#358;&#359;&#427;&#428;&#429;&#430;&#648;&#538;&#539;&#566;&#7786;&#7787;&#7788;&#7789;&#7790;&#7791;&#7792;&#7793;&#7831;Uu&#217;&#249;&#218;&#250;&#219;&#251;&#220;&#252;&#360;&#361;&#362;&#363;&#364;&#365;&#366;&#367;&#368;&#369;&#370;&#371;&#431;&#432;&#467;&#468;&#469;&#470;&#471;&#472;&#473;&#474;&#475;&#476;&#532;&#533;&#534;&#535;&#7794;&#7795;&#7796;&#7797;&#7798;&#7799;&#7800;&#7801;&#7802;&#7803;&#7908;&#7909;&#7910;&#7911;&#7912;&#7913;&#7914;&#7915;&#7916;&#7917;&#7918;&#7919;&#7920;&#7921;Vv&#434;&#651;&#7804;&#7805;&#7806;&#7807;Ww&#372;&#373;&#7808;&#7809;&#7810;&#7811;&#7812;&#7813;&#7814;&#7815;&#7816;&#7817;&#7832;Xx&#7818;&#7819;&#7820;&#7821;Yy&#221;&#253;&#255;&#376;&#374;&#375;&#435;&#436;&#562;&#563;&#7822;&#7823;&#7833;&#7922;&#7923;&#7924;&#7925;&#7926;&#7927;&#7928;&#7929;Zz&#377;&#378;&#379;&#380;&#381;&#382;&#437;&#438;&#548;&#549;&#656;&#657;&#7824;&#7825;&#7826;&#7827;&#7828;&#7829;&#7829;'">
-<!ENTITY uppercase "'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ'">
-<!ENTITY primary   'normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = ""]))'>
-<!ENTITY scope     "count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))">
-]>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                version="1.0">
-
-  <!-- This stylesheet controls how the Index is generated.
-       Entities comes from {docbook-xsl}/common/entities.ent -->
-
-    <!-- Override for punctuation separating an index term from its list
-         of page references. -->
-  <xsl:param name="index.term.separator" select="': '"></xsl:param>
-
-    <!-- Divisions title properties. -->
-  <xsl:attribute-set name="index.div.title.properties">
-    <xsl:attribute name="margin-left">0pt</xsl:attribute>
-    <xsl:attribute name="font-size">14.4pt</xsl:attribute>
-    <xsl:attribute name="font-family">
-      <xsl:value-of select="$title.fontset"/>
-    </xsl:attribute>
-    <xsl:attribute name="font-weight">bold</xsl:attribute>
-    <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
-    <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
-    <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
-    <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
-    <xsl:attribute name="space-after.optimum">0.5em</xsl:attribute>
-    <xsl:attribute name="space-after.minimum">0.3em</xsl:attribute>
-    <xsl:attribute name="space-after.maximum">0.7em</xsl:attribute>
-    <xsl:attribute name="start-indent">0pt</xsl:attribute>
-  </xsl:attribute-set>
-
-    <!-- Properties applied to the block containing entries in an Index. -->
-  <xsl:attribute-set name="index.entry.properties">
-    <xsl:attribute name="start-indent">0.5pc</xsl:attribute>
-  </xsl:attribute-set>
-
-    <!-- Divisions:
-          Translate alphabetical divisons titles to by-type titles. -->
-    <!-- The original template is in {docbook-xsl}/fo/autoidx.xsl -->
-  <xsl:template match="indexterm" mode="index-div-basic">
-    <xsl:param name="scope" select="."/>
-    <xsl:param name="role" select="''"/>
-    <xsl:param name="type" select="''"/>
-    <xsl:variable name="key"
-                  select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/>
-    <xsl:variable name="divtitle" select="translate($key, &lowercase;, &uppercase;)"/>
-    <xsl:if test="key('letter', $key)[&scope;]
-                  [count(.|key('primary', &primary;)[&scope;][1]) = 1]">
-      <fo:block>
-        <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)">
-          <xsl:call-template name="indexdiv.title">
-            <xsl:with-param name="titlecontent">
-              <xsl:choose>
-                <xsl:when test="$divtitle = 'A'">
-                  <xsl:call-template name="gentext">
-                    <xsl:with-param name="key">Packages</xsl:with-param>
-                  </xsl:call-template>
-                </xsl:when>
-                <xsl:when test="$divtitle = 'B'">
-                  <xsl:call-template name="gentext">
-                    <xsl:with-param name="key">Programs</xsl:with-param>
-                  </xsl:call-template>
-                </xsl:when>
-                <xsl:when test="$divtitle = 'C'">
-                  <xsl:call-template name="gentext">
-                    <xsl:with-param name="key">Libraries</xsl:with-param>
-                  </xsl:call-template>
-                </xsl:when>
-                <xsl:when test="$divtitle = 'D'">
-                  <xsl:choose>
-                    <xsl:when test="$book-type = 'blfs'">
-                      <xsl:call-template name="gentext">
-                        <xsl:with-param name="key">Kernel Configuration</xsl:with-param>
-                      </xsl:call-template>
-                    </xsl:when>
-                    <xsl:otherwise>
-                      <xsl:call-template name="gentext">
-                        <xsl:with-param name="key">Scripts</xsl:with-param>
-                      </xsl:call-template>
-                    </xsl:otherwise>
-                  </xsl:choose>
-                </xsl:when>
-                <xsl:when test="$divtitle = 'E'">
-                  <xsl:choose>
-                    <xsl:when test="$book-type = 'blfs'">
-                      <xsl:call-template name="gentext">
-                        <xsl:with-param name="key">Configuration Files</xsl:with-param>
-                      </xsl:call-template>
-                    </xsl:when>
-                    <xsl:otherwise>
-                      <xsl:call-template name="gentext">
-                        <xsl:with-param name="key">Others</xsl:with-param>
-                      </xsl:call-template>
-                    </xsl:otherwise>
-                  </xsl:choose>
-                </xsl:when>
-                <xsl:when test="$divtitle = 'F'">
-                    <xsl:call-template name="gentext">
-                      <xsl:with-param name="key">Bootscripts</xsl:with-param>
-                    </xsl:call-template>
-                </xsl:when>
-                <xsl:when test="$divtitle = 'G'">
-                    <xsl:call-template name="gentext">
-                      <xsl:with-param name="key">Others</xsl:with-param>
-                    </xsl:call-template>
-                </xsl:when>
-                <xsl:otherwise>
-                  <xsl:value-of select="$divtitle"/>
-                </xsl:otherwise>
-              </xsl:choose>
-            </xsl:with-param>
-          </xsl:call-template>
-        </xsl:if>
-        <fo:block xsl:use-attribute-sets="index.entry.properties">
-          <xsl:apply-templates select="key('letter', $key)[&scope;]
-                                      [count(.|key('primary', &primary;)[&scope;][1])=1]"
-                              mode="index-primary">
-            <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
-            <xsl:with-param name="scope" select="$scope"/>
-            <xsl:with-param name="role" select="$role"/>
-            <xsl:with-param name="type" select="$type"/>
-          </xsl:apply-templates>
-        </fo:block>
-      </fo:block>
-    </xsl:if>
-  </xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/pdf/lfs-lists.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/pdf/lfs-lists.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,174 +1,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<!--
-$LastChangedBy$
-$Date$
--->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                version="1.0">
-
-  <!-- This stylesheet controls how list are generated. -->
-
-    <!-- What spacing do you want before and after lists? -->
-  <xsl:attribute-set name="list.block.spacing">
-    <xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
-    <xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
-    <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
-    <xsl:attribute name="space-after.optimum">0.6em</xsl:attribute>
-    <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute>
-    <xsl:attribute name="space-after.maximum">0.8em</xsl:attribute>
-  </xsl:attribute-set>
-
-    <!-- What spacing do you want between list items? -->
-  <xsl:attribute-set name="list.item.spacing">
-    <xsl:attribute name="space-before.optimum">0.4em</xsl:attribute>
-    <xsl:attribute name="space-before.minimum">0.2em</xsl:attribute>
-    <xsl:attribute name="space-before.maximum">0.6em</xsl:attribute>
-  </xsl:attribute-set>
-
-    <!-- Properties that apply to each list-block generated by itemizedlist. -->
-  <xsl:attribute-set name="itemizedlist.properties"
-                     use-attribute-sets="list.block.properties">
-    <xsl:attribute name="text-align">left</xsl:attribute>
-  </xsl:attribute-set>
-
-    <!-- Format variablelists lists as blocks? 1 = yes, 0 = no
-           Default variablelist format. We override it when necesary
-           using the list-presentation processing instruction. -->
-  <xsl:param name="variablelist.as.blocks" select="1"/>
-
-    <!-- Specifies the longest term in variablelists.
-         Used when list-presentation = list -->
-  <xsl:param name="variablelist.max.termlength">35</xsl:param>
-
-    <!-- varlistentry mode block:
-           Addibg a bullet, left alignament, and @kepp-*.* attributes
-           for packages and paches list. -->
-    <!-- The original template is in {docbook-xsl}/fo/list.xsl -->
-  <xsl:template match="varlistentry" mode="vl.as.blocks">
-    <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
-    <xsl:choose>
-      <xsl:when test="ancestor::variablelist/@role = 'materials'">
-        <fo:block id="{$id}" xsl:use-attribute-sets="list.item.spacing"
-                  keep-together.within-column="always" font-weight="bold"
-                  keep-with-next.within-column="always" text-align="left">
-          <xsl:text>&#x2022;   </xsl:text>
-          <xsl:apply-templates select="term"/>
-        </fo:block>
-        <fo:block text-align="left"
-                  keep-together.within-column="always"
-                  keep-with-previous.within-column="always">
-          <xsl:apply-templates select="listitem"/>
-        </fo:block>
-      </xsl:when>
-      <xsl:otherwise>
-        <fo:block id="{$id}" xsl:use-attribute-sets="list.item.spacing"
-                  keep-together.within-column="always"
-                  keep-with-next.within-column="always" margin-left="1em">
-          <xsl:apply-templates select="term"/>
-        </fo:block>
-        <fo:block margin-left="2em">
-          <xsl:apply-templates select="listitem"/>
-        </fo:block>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-    <!-- segmentedlist:
-           Making it an actual FO list to can indent items.
-           Adjust vertical space. -->
-    <!-- The original template is in {docbook-xsl}/fo/list.xsl -->
-  <xsl:template match="segmentedlist">
-    <xsl:variable name="id">
-      <xsl:call-template name="object.id"/>
-    </xsl:variable>
-    <fo:list-block id="{$id}" provisional-distance-between-starts="12em"
-                   provisional-label-separation="1em"
-                   keep-together.within-column="always">
-      <xsl:choose>
-        <xsl:when test="ancestor::appendix[@id='appendixc']">
-          <xsl:attribute name="space-before.optimum">0.2em</xsl:attribute>
-          <xsl:attribute name="space-before.minimum">0em</xsl:attribute>
-          <xsl:attribute name="space-before.maximum">0.4em</xsl:attribute>
-          <xsl:attribute name="space-after.optimum">0.2em</xsl:attribute>
-          <xsl:attribute name="space-after.minimum">0em</xsl:attribute>
-          <xsl:attribute name="space-after.maximum">0.4em</xsl:attribute>
-          <xsl:attribute name="keep-with-previous.within-column">always</xsl:attribute>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:attribute name="space-before.optimum">0.4em</xsl:attribute>
-          <xsl:attribute name="space-before.minimum">0.2em</xsl:attribute>
-          <xsl:attribute name="space-before.maximum">0.6em</xsl:attribute>
-          <xsl:attribute name="space-after.optimum">0.4em</xsl:attribute>
-          <xsl:attribute name="space-after.minimum">0.2em</xsl:attribute>
-          <xsl:attribute name="space-after.maximum">0.6em</xsl:attribute>
-        </xsl:otherwise>
-      </xsl:choose>
-      <xsl:apply-templates select="seglistitem/seg"/>
-    </fo:list-block>
-  </xsl:template>
-
-    <!-- seg:
-           Self-made template based on the original seg template
-           found in {docbook-xsl}/fo/list.xsl
-           Making segmentedlist an actual FO list to can indent items. -->
-  <xsl:template match="seglistitem/seg">
-    <xsl:variable name="id">
-      <xsl:call-template name="object.id"/>
-    </xsl:variable>
-    <xsl:variable name="segnum" select="count(preceding-sibling::seg)+1"/>
-    <xsl:variable name="seglist" select="ancestor::segmentedlist"/>
-    <xsl:variable name="segtitles" select="$seglist/segtitle"/>
-    <fo:list-item xsl:use-attribute-sets="compact.list.item.spacing">
-      <fo:list-item-label end-indent="label-end()" text-align="start">
-        <fo:block>
-          <fo:inline font-weight="bold">
-            <xsl:apply-templates select="$segtitles[$segnum=position()]"
-                                 mode="segtitle-in-seg"/>
-            <xsl:text>:</xsl:text>
-          </fo:inline>
-        </fo:block>
-      </fo:list-item-label>
-      <fo:list-item-body start-indent="body-start()">
-        <fo:block id="{$id}">
-          <xsl:apply-templates/>
-        </fo:block>
-      </fo:list-item-body>
-    </fo:list-item>
-  </xsl:template>
-
-    <!-- simplelist:
-           Self-made template. Wrap it into a fo:block and process member childs.
-           If @type is specified, the original templates will be used.
-           NOTE: when using type='horiz' or type='vert', FOP-0.93 will complaints
-             about not supported table-layout="auto" -->
-  <xsl:template match="simplelist">
-    <fo:block xsl:use-attribute-sets="simplelist.properties">
-      <xsl:apply-templates mode="condensed"/>
-    </fo:block>
-  </xsl:template>
-
-    <!-- member:
-           Self-made template to wrap it into a fo:block using customized
-           properties. -->
-  <xsl:template match="member" mode="condensed">
-    <fo:block xsl:use-attribute-sets="simplelist.properties">
-      <xsl:call-template name="simple.xlink">
-        <xsl:with-param name="content">
-          <xsl:apply-templates/>
-        </xsl:with-param>
-      </xsl:call-template>
-    </fo:block>
-  </xsl:template>
-
-    <!-- Properties associated with our simplelist format. -->
-  <xsl:attribute-set name="simplelist.properties">
-    <xsl:attribute name="keep-with-previous.within-column">always</xsl:attribute>
-    <xsl:attribute name="space-before.optimum">0em</xsl:attribute>
-    <xsl:attribute name="space-before.minimum">0em</xsl:attribute>
-    <xsl:attribute name="space-before.maximum">0.2em</xsl:attribute>
-  </xsl:attribute-set>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/pdf/lfs-mixed.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/pdf/lfs-mixed.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,360 +1,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<!--
-$LastChangedBy$
-$Date$
--->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                version="1.0">
-
-  <!-- This stylesheet contains misc params, attribute sets and templates
-       for output formating.
-       This file is for that templates that don't fit in other files. -->
-
-    <!-- What space do you want between normal paragraphs. -->
-  <xsl:attribute-set name="normal.para.spacing">
-    <xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
-    <xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
-    <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
-    <xsl:attribute name="orphans">3</xsl:attribute>
-    <xsl:attribute name="widows">3</xsl:attribute>
-  </xsl:attribute-set>
-
-    <!-- Properties associated with verbatim text. -->
-  <xsl:attribute-set name="verbatim.properties">
-    <xsl:attribute name="keep-with-previous.within-column">always</xsl:attribute>
-    <xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
-    <xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
-    <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
-    <xsl:attribute name="space-after.optimum">0.6em</xsl:attribute>
-    <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute>
-    <xsl:attribute name="space-after.maximum">0.8em</xsl:attribute>
-    <xsl:attribute name="hyphenate">false</xsl:attribute>
-    <xsl:attribute name="wrap-option">no-wrap</xsl:attribute>
-    <xsl:attribute name="white-space-collapse">false</xsl:attribute>
-    <xsl:attribute name="white-space-treatment">preserve</xsl:attribute>
-    <xsl:attribute name="linefeed-treatment">preserve</xsl:attribute>
-    <xsl:attribute name="text-align">start</xsl:attribute>
-  </xsl:attribute-set>
-
-    <!-- Should verbatim environments be shaded? 1 =yes, 0 = no -->
-  <xsl:param name="shade.verbatim" select="1"/>
-
-    <!-- Properties that specify the style of shaded verbatim listings -->
-  <xsl:attribute-set name="shade.verbatim.style">
-    <xsl:attribute name="background-color">#E9E9E9</xsl:attribute>
-    <xsl:attribute name="border-style">solid</xsl:attribute>
-    <xsl:attribute name="border-width">0.5pt</xsl:attribute>
-    <xsl:attribute name="border-color">#888</xsl:attribute>
-    <xsl:attribute name="padding-start">5pt</xsl:attribute>
-    <xsl:attribute name="padding-top">2pt</xsl:attribute>
-    <xsl:attribute name="padding-bottom">2pt</xsl:attribute>
-  </xsl:attribute-set>
-
-    <!-- para:
-           Skip empty "Home page" in packages.xml.
-           Allow forced line breaks inside paragraphs emulating literallayout.
-           Removed vertical space in variablelist. -->
-    <!-- The original template is in {docbook-xsl}/fo/block.xsl -->
-  <xsl:template match="para">
-    <xsl:choose>
-      <xsl:when test="child::ulink[@url=' ']"/>
-      <xsl:when test="./@remap='verbatim'">
-        <fo:block xsl:use-attribute-sets="verbatim.properties">
-          <xsl:call-template name="anchor"/>
-          <xsl:apply-templates/>
-        </fo:block>
-      </xsl:when>
-      <xsl:when test="ancestor::variablelist">
-        <fo:block>
-          <xsl:attribute name="space-before.optimum">0.1em</xsl:attribute>
-          <xsl:attribute name="space-before.minimum">0em</xsl:attribute>
-          <xsl:attribute name="space-before.maximum">0.2em</xsl:attribute>
-          <xsl:call-template name="anchor"/>
-          <xsl:apply-templates/>
-        </fo:block>
-      </xsl:when>
-      <xsl:otherwise>
-        <fo:block xsl:use-attribute-sets="normal.para.spacing">
-          <xsl:call-template name="anchor"/>
-          <xsl:apply-templates/>
-        </fo:block>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-    <!-- screen, literallayout:
-          Self-made template that creates a fo:block wrapper with keep-together
-          processing instruction support around the output generated by
-          original screen templates. -->
-  <xsl:template match="screen|literallayout">
-    <xsl:variable name="keep.together">
-      <xsl:call-template name="pi.dbfo_keep-together"/>
-    </xsl:variable>
-    <fo:block>
-      <xsl:attribute name="keep-together.within-column">
-        <xsl:choose>
-          <xsl:when test="$keep.together != ''">
-            <xsl:value-of select="$keep.together"/>
-          </xsl:when>
-          <xsl:otherwise>always</xsl:otherwise>
-        </xsl:choose>
-      </xsl:attribute>
-      <xsl:apply-imports/>
-    </fo:block>
-  </xsl:template>
-
-    <!-- literal:
-           Be sure that literal will use allways normal font weight. -->
-    <!-- The original template is in {docbook-xsl}/fo/inline.xsl -->
-  <xsl:template match="literal">
-    <fo:inline  font-weight="normal">
-      <xsl:call-template name="inline.monoseq"/>
-    </fo:inline>
-  </xsl:template>
-
-    <!-- inline.monoseq:
-           Added hyphenate-url support to classname, exceptionname, interfacename,
-           methodname, computeroutput, constant, envar, filename, function, code,
-           literal, option, promt, systemitem, varname, sgmltag, tag, and uri -->
-    <!-- The original template is in {docbook-xsl}/fo/inline.xsl -->
-  <xsl:template name="inline.monoseq">
-    <xsl:param name="content">
-      <xsl:call-template name="simple.xlink">
-        <xsl:with-param name="content">
-          <xsl:choose>
-            <xsl:when test="ancestor::para and not(ancestor::screen)
-                            and not(descendant::ulink)">
-              <xsl:call-template name="hyphenate-url">
-                <xsl:with-param name="url">
-                  <xsl:apply-templates/>
-                </xsl:with-param>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:apply-templates/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:param>
-    <fo:inline xsl:use-attribute-sets="monospace.properties">
-      <xsl:if test="@dir">
-        <xsl:attribute name="direction">
-          <xsl:choose>
-            <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
-            <xsl:otherwise>rtl</xsl:otherwise>
-          </xsl:choose>
-        </xsl:attribute>
-      </xsl:if>
-      <xsl:copy-of select="$content"/>
-    </fo:inline>
-  </xsl:template>
-
-    <!-- inline.italicmonoseq:
-           Added hyphenate-url support to parameter, replaceable, structfield,
-           function/parameter, and function/replaceable -->
-    <!-- The original template is in {docbook-xsl}/fo/inline.xsl -->
-  <xsl:template name="inline.italicmonoseq">
-    <xsl:param name="content">
-      <xsl:call-template name="simple.xlink">
-        <xsl:with-param name="content">
-          <xsl:choose>
-            <xsl:when test="ancestor::para and not(ancestor::screen)
-                            and not(descendant::ulink)">
-              <xsl:call-template name="hyphenate-url">
-                <xsl:with-param name="url">
-                  <xsl:apply-templates/>
-                </xsl:with-param>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:apply-templates/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:param>
-    <fo:inline font-style="italic" xsl:use-attribute-sets="monospace.properties">
-      <xsl:call-template name="anchor"/>
-      <xsl:if test="@dir">
-        <xsl:attribute name="direction">
-          <xsl:choose>
-            <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
-            <xsl:otherwise>rtl</xsl:otherwise>
-          </xsl:choose>
-        </xsl:attribute>
-      </xsl:if>
-      <xsl:copy-of select="$content"/>
-    </fo:inline>
-  </xsl:template>
-
-    <!-- Show external URLs in italic font -->
-  <xsl:attribute-set name="xref.properties">
-    <xsl:attribute name="font-style">
-      <xsl:choose>
-        <xsl:when test="self::ulink">italic</xsl:when>
-        <xsl:otherwise>inherit</xsl:otherwise>
-      </xsl:choose>
-    </xsl:attribute>
-  </xsl:attribute-set>
-
-   <!-- Center table title. -->
-  <xsl:attribute-set name="formal.title.properties">
-    <xsl:attribute name="text-align">
-      <xsl:choose>
-        <xsl:when test="local-name(.) = 'table'">center</xsl:when>
-        <xsl:otherwise>left</xsl:otherwise>
-      </xsl:choose>
-    </xsl:attribute>
-  </xsl:attribute-set>
-
-    <!-- table.layout:
-           We want all tables centered. Based on a hack posted
-           by Ellen Juhlin on docbook-apps mailing list. -->
-    <!-- The original template is in {docbook-xsl}/fo/table.xsl -->
-  <xsl:template name="table.layout">
-    <xsl:param name="table.content" select="NOTANODE"/>
-    <fo:table table-layout="fixed" width="100%">
-      <fo:table-column column-width ="proportional-column-width(1)"/>
-      <fo:table-column>
-        <!-- Set center column width equal to table width -->
-        <xsl:attribute name="column-width">
-          <xsl:call-template name="table.width"/>
-        </xsl:attribute>
-      </fo:table-column>
-      <fo:table-column column-width ="proportional-column-width(1)"/>
-      <fo:table-body>
-        <fo:table-row>
-          <fo:table-cell column-number="2">
-            <xsl:copy-of select="$table.content"/>
-          </fo:table-cell>
-        </fo:table-row>
-      </fo:table-body>
-    </fo:table>
-  </xsl:template>
-
-
-  <!-- Revision History -->
-
-    <!-- revhistory titlepage:
-           Self-made template to add missing support on bookinfo. -->
-  <xsl:template match="revhistory" mode="book.titlepage.verso.auto.mode">
-    <fo:block space-before.optimum="2em"
-              space-before.minimum="1.5em"
-              space-before.maximum="2.5em">
-      <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
-    </fo:block>
-  </xsl:template>
-
-    <!-- revhitory title properties -->
-  <xsl:attribute-set name="revhistory.title.properties">
-    <xsl:attribute name="text-align">center</xsl:attribute>
-    <xsl:attribute name="font-weight">bold</xsl:attribute>
-  </xsl:attribute-set>
-
-    <!-- revhistory/revision mode titlepage.mode:
-           Removed authorinitials | author support placing
-           revremark | revdescription instead on that table-cell. -->
-    <!-- The original template is in {docbook-xsl}/fo/titlepage.xsl -->
-  <xsl:template match="revhistory/revision" mode="titlepage.mode">
-    <xsl:variable name="revnumber" select="revnumber"/>
-    <xsl:variable name="revdate"   select="date"/>
-    <xsl:variable name="revremark" select="revremark|revdescription"/>
-    <fo:table-row>
-      <fo:table-cell xsl:use-attribute-sets="revhistory.table.cell.properties">
-        <fo:block>
-          <xsl:if test="$revnumber">
-            <xsl:call-template name="gentext">
-              <xsl:with-param name="key" select="'Revision'"/>
-            </xsl:call-template>
-            <xsl:call-template name="gentext.space"/>
-            <xsl:apply-templates select="$revnumber[1]" mode="titlepage.mode"/>
-          </xsl:if>
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell xsl:use-attribute-sets="revhistory.table.cell.properties">
-        <fo:block>
-          <xsl:apply-templates select="$revdate[1]"/>
-        </fo:block>
-      </fo:table-cell>
-      <fo:table-cell xsl:use-attribute-sets="revhistory.table.cell.properties">
-        <fo:block>
-          <xsl:apply-templates select="$revremark[1]"/>
-        </fo:block>
-      </fo:table-cell>
-    </fo:table-row>
-  </xsl:template>
-
-
-  <!-- Dummy sect1 -->
-
-    <!-- sect1:
-           Self-made template to skip dummy sect1 pages generation. -->
-  <xsl:template match="sect1">
-    <xsl:choose>
-      <xsl:when test="@role = 'dummy'"/>
-      <xsl:otherwise>
-        <xsl:apply-imports/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-    <!-- sect1 mode fop1.outline:
-           Self-made template to skip dummy sect1 bookmarks generation. -->
-  <xsl:template match="sect1" mode="fop1.outline">
-    <xsl:choose>
-      <xsl:when test="@role = 'dummy'"/>
-      <xsl:otherwise>
-        <xsl:apply-imports/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-    <!-- toc.line:
-           For dummy sect1 output only the title. -->
-    <!-- The original template is in {docbook-xsl}/fo/autotoc.xsl -->
-  <xsl:template name="toc.line">
-    <xsl:param name="toc-context" select="NOTANODE"/>
-    <xsl:variable name="id">
-      <xsl:call-template name="object.id"/>
-    </xsl:variable>
-    <xsl:variable name="label">
-      <xsl:apply-templates select="." mode="label.markup"/>
-    </xsl:variable>
-    <xsl:choose>
-      <xsl:when test="@role = 'dummy'">
-        <fo:block text-align="left">
-          <xsl:apply-templates select="." mode="titleabbrev.markup"/>
-        </fo:block>
-      </xsl:when>
-      <xsl:otherwise>
-        <fo:block xsl:use-attribute-sets="toc.line.properties">
-          <fo:inline keep-with-next.within-line="always">
-            <fo:basic-link internal-destination="{$id}">
-              <xsl:if test="$label != ''">
-                <xsl:copy-of select="$label"/>
-                <xsl:value-of select="$autotoc.label.separator"/>
-              </xsl:if>
-              <xsl:apply-templates select="." mode="titleabbrev.markup"/>
-            </fo:basic-link>
-          </fo:inline>
-          <fo:inline keep-together.within-line="always">
-            <xsl:text> </xsl:text>
-            <fo:leader leader-pattern="dots"
-                       leader-pattern-width="3pt"
-                       leader-alignment="reference-area"
-                       keep-with-next.within-line="always"/>
-            <xsl:text> </xsl:text>
-            <fo:basic-link internal-destination="{$id}">
-              <fo:page-number-citation ref-id="{$id}"/>
-            </fo:basic-link>
-          </fo:inline>
-        </fo:block>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/pdf/lfs-pagesetup.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/pdf/lfs-pagesetup.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,249 +1,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<!--
-$LastChangedBy$
-$Date$
--->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                version="1.0">
-
-  <!-- This stylesheet controls page margins, sections page break,
-       header content and titles size. -->
-
-    <!-- The inner page margin. -->
-  <xsl:param name="page.margin.inner" select="'0.32in'"/>
-
-    <!-- The outer page margin. -->
-  <xsl:param name="page.margin.outer" select="'0.32in'"/>
-
-    <!-- The bottom margin of the page. -->
-  <xsl:param name="page.margin.bottom" select="'0.35in'"/>
-
-    <!-- The top margin of the page. -->
-  <xsl:param name="page.margin.top" select="'0.35in'"/>
-
-    <!-- The bottom margin of the body text. -->
-  <xsl:param name="body.margin.bottom" select="'0.4in'"/>
-
-    <!-- The top margin of the body text. -->
-  <xsl:param name="body.margin.top" select="'0.4in'"/>
-
-    <!-- Specifies the height of the header. -->
-  <xsl:param name="region.before.extent" select="'0.25in'"/>
-
-    <!-- Specifies the height of the footer. -->
-  <xsl:param name="region.after.extent" select="'0.25in'"/>
-
-    <!-- The start-indent for the body text. -->
-  <xsl:param name="body.start.indent" select="'0pc'"/>
-
-    <!-- Adjust the left margin for titles. -->
-  <xsl:param name="title.margin.left">-0.8pc</xsl:param>
-
-    <!-- Default table width on tables that do not specify an alternate
-         width using the dbfo processing instruction.
-         This value is used also on bookinfo/revhistory table. -->
-  <xsl:param name="default.table.width" select="'70%'"/>
-
-    <!-- Properties for component titles -->
-  <xsl:attribute-set name="component.title.properties">
-    <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
-    <xsl:attribute name="space-before.optimum">
-      <xsl:value-of select="concat($body.font.master, 'pt')"/>
-    </xsl:attribute>
-    <xsl:attribute name="space-before.minimum">
-      <xsl:value-of select="concat($body.font.master, 'pt * 0.8')"/>
-    </xsl:attribute>
-    <xsl:attribute name="space-before.maximum">
-      <xsl:value-of select="concat($body.font.master, 'pt * 1.2')"/>
-    </xsl:attribute>
-    <xsl:attribute name="hyphenate">false</xsl:attribute>
-    <xsl:attribute name="text-align">
-      <xsl:choose>
-        <xsl:when test="((parent::article | parent::articleinfo |
-                          parent::info/parent::article)
-                          and not(ancestor::book) and not(self::bibliography))
-                        or (parent::slides | parent::slidesinfo)
-                        or self::index">center</xsl:when>
-        <xsl:otherwise>left</xsl:otherwise>
-      </xsl:choose>
-    </xsl:attribute>
-    <xsl:attribute name="start-indent">
-      <xsl:value-of select="$title.margin.left"/>
-    </xsl:attribute>
-  </xsl:attribute-set>
-
-    <!-- Rule under headers? 1 =yes, 0 = no -->
-  <xsl:param name="header.rule" select="0"/>
-
-    <!-- Rule over footers? 1 =yes, 0 = no -->
-  <xsl:param name="footer.rule" select="0"></xsl:param>
-
-    <!-- Control depth of sections shown in running headers or footers.
-         Be sure that no unneeded fo:marker are generated. -->
-  <xsl:param name="marker.section.level" select="-1"></xsl:param>
-
-     <!-- Force package's sect1 onto a new page -->
-  <xsl:attribute-set name="section.level1.properties">
-    <xsl:attribute name="break-before">
-      <xsl:choose>
-        <!--<xsl:when test="not(. = //*/sect1[1])">
-          <xsl:text>page</xsl:text>
-        </xsl:when>-->
-        <xsl:when test="preceding-sibling::sect1[position()=1]/sect2/@role='package'
-                        or self::sect1/sect2/@role='package'">page</xsl:when>
-        <xsl:otherwise>
-          <xsl:text>auto</xsl:text>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:attribute>
-  </xsl:attribute-set>
-
-    <!-- part/partintro:
-           Be sure that partintro is on a new page. -->
-    <!-- The original template is in {docbook-xsl}/fo/divisions.xsl -->
-  <xsl:template match="part/partintro">
-    <xsl:apply-templates select=".." mode="part.titlepage.mode">
-      <xsl:with-param name="additional.content">
-        <fo:block break-before="page"/>
-        <xsl:if test="title">
-          <xsl:call-template name="partintro.titlepage"/>
-        </xsl:if>
-        <xsl:apply-templates/>
-      </xsl:with-param>
-    </xsl:apply-templates>
-    <xsl:call-template name="generate.part.toc">
-      <xsl:with-param name="part" select=".."/>
-    </xsl:call-template>
-  </xsl:template>
-
-    <!-- book title:
-          Centered the title and removed unused code.
-          Removed book.titlepage.separator. -->
-    <!-- The original template is in {docbook-xsl}/fo/titlepage.templates.xsl -->
-  <xsl:template name="book.titlepage">
-    <fo:block margin-top="3in">
-      <fo:block>
-        <xsl:call-template name="book.titlepage.before.recto"/>
-        <xsl:call-template name="book.titlepage.recto"/>
-      </fo:block>
-      <fo:block>
-        <xsl:call-template name="book.titlepage.before.verso"/>
-        <xsl:call-template name="book.titlepage.verso"/>
-      </fo:block>
-    </fo:block>
-  </xsl:template>
-
-    <!-- book titlepage verso:
-           Added missing bibliosource and revhistory support.
-           Removed unused code. -->
-    <!-- The original template is in {docbook-xsl}/fo/titlepage.templates.xsl -->
-  <xsl:template name="book.titlepage.verso">
-    <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/title"/>
-    <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/corpauthor"/>
-    <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/authorgroup"/>
-    <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/author"/>
-    <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/othercredit"/>
-    <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/releaseinfo"/>
-    <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/pubdate"/>
-    <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/copyright"/>
-    <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/bibliosource"/>
-    <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/abstract"/>
-    <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/revhistory"/>
-    <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/legalnotice"/>
-  </xsl:template>
-
-    <!-- bibliosource:
-           Self-made template to handle bibliosource when inside bookinfo. -->
-  <xsl:template match="bibliosource" mode="book.titlepage.verso.auto.mode">
-    <fo:block font-size="8pt">
-      <xsl:apply-templates/>
-    </fo:block>
-  </xsl:template>
-
-    <!-- part title:
-           Centered the title and removed unused code. -->
-    <!-- The original template is in {docbook-xsl}/fo/titlepage.templates.xsl -->
-  <xsl:template name="part.titlepage">
-    <fo:block>
-      <fo:block margin-top="3.5in">
-        <xsl:call-template name="part.titlepage.before.recto"/>
-        <xsl:call-template name="part.titlepage.recto"/>
-      </fo:block>
-      <fo:block>
-        <xsl:call-template name="part.titlepage.before.verso"/>
-        <xsl:call-template name="part.titlepage.verso"/>
-      </fo:block>
-      <xsl:call-template name="part.titlepage.separator"/>
-    </fo:block>
-  </xsl:template>
-
-    <!-- chapter title:
-           Small font size and left alignament. -->
-    <!-- The original template is in {docbook-xsl}/fo/titlepage.templates.xsl -->
-  <xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">
-    <fo:block xsl:use-attribute-sets="chapter.titlepage.recto.style"
-              font-size="21pt" font-weight="bold" text-align="left">
-      <xsl:call-template name="component.title">
-        <xsl:with-param name="node" select="ancestor-or-self::chapter[1]"/>
-      </xsl:call-template>
-    </fo:block>
-  </xsl:template>
-
-    <!-- sect2 title:
-           Skip sect2.titlepage run when title is empty.
-           Removed unused code. -->
-    <!-- The original template is in {docbook-xsl}/fo/sections.xsl -->
-  <xsl:template match="sect2">
-    <xsl:variable name="id">
-      <xsl:call-template name="object.id"/>
-    </xsl:variable>
-    <fo:block xsl:use-attribute-sets="section.level2.properties">
-      <xsl:attribute name="id">
-        <xsl:value-of select="$id"/>
-      </xsl:attribute>
-      <xsl:if test="not(string-length(title)=0)">
-        <xsl:call-template name="sect2.titlepage"/>
-      </xsl:if>
-      <xsl:apply-templates/>
-    </fo:block>
-  </xsl:template>
-
-   <!-- header.table:
-          Re-made template to not generate a fo:table in the header,
-          allowing a more simple header.content customization. -->
-    <!-- The original template is in {docbook-xsl}/fo/pagesetup.xsl -->
-  <xsl:template name="header.table">
-    <xsl:param name="sequence" select="''"/>
-    <xsl:param name="gentext-key" select="''"/>
-    <xsl:choose>
-      <xsl:when test="$gentext-key = 'book' or $sequence = 'blank'"/>
-      <xsl:otherwise>
-        <xsl:call-template name="header.content">
-          <xsl:with-param name="sequence" select="$sequence"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-    <!-- header.content
-           Re-made template to show the book title and version on all pages. -->
-    <!-- The original template is in {docbook-xsl}/fo/pagesetup.xsl -->
-  <xsl:template name="header.content">
-    <xsl:param name="sequence" select="''"/>
-    <fo:block>
-      <xsl:attribute name="text-align">
-        <xsl:choose>
-          <xsl:when test="$sequence = 'first' or $sequence = 'odd'">right</xsl:when>
-          <xsl:otherwise>left</xsl:otherwise>
-        </xsl:choose>
-      </xsl:attribute>
-      <xsl:value-of select="/book/bookinfo/title"/>
-      <xsl:text> - </xsl:text>
-      <xsl:value-of select="/book/bookinfo/subtitle"/>
-    </fo:block>
-  </xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/pdf/lfs-xref.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/pdf/lfs-xref.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,169 +1,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<!--
-$LastChangedBy$
-$Date$
--->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:xlink="http://www.w3.org/1999/xlink"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                exclude-result-prefixes="xlink"
-                version="1.0">
-
-
-  <!-- This stylesheet fixes English punctuation in xref links
-       (as was requested by the publisher) via adding @role propagation
-       in xref tags.
-       This hack may not work with xref flavours not used in the book.
-       For other languages, just remove the xref @role attributes
-       in the book XML sources and/or comment-out the inclusion of
-       this file in lfs-pdf.xsl -->
-
-     <!--  xref:
-           Added role variable and use it when calling mode xref-to.-->
-    <!-- The original template is in {docbook-xsl}/fo/xref.xsl -->
-  <xsl:template match="xref" name="xref">
-    <xsl:param name="xhref" select="@xlink:href"/>
-    <!-- is the @xlink:href a local idref link? -->
-    <xsl:param name="xlink.idref">
-      <xsl:if test="starts-with($xhref,'#')
-                    and (not(contains($xhref,'&#40;'))
-                    or starts-with($xhref, '#xpointer&#40;id&#40;'))">
-        <xsl:call-template name="xpointer.idref">
-          <xsl:with-param name="xpointer" select="$xhref"/>
-        </xsl:call-template>
-    </xsl:if>
-    </xsl:param>
-    <xsl:param name="xlink.targets" select="key('id',$xlink.idref)"/>
-    <xsl:param name="linkend.targets" select="key('id',@linkend)"/>
-    <xsl:param name="target" select="($xlink.targets | $linkend.targets)[1]"/>
-    <xsl:param name="refelem" select="local-name($target)"/>
-      <!-- Added role variable -->
-    <xsl:variable name="role" select="@role"/>
-    <xsl:variable name="xrefstyle">
-      <xsl:choose>
-        <xsl:when test="@role and not(@xrefstyle)
-                        and $use.role.as.xrefstyle != 0">
-          <xsl:value-of select="@role"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="@xrefstyle"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:variable name="content">
-      <fo:inline xsl:use-attribute-sets="xref.properties">
-        <xsl:choose>
-          <xsl:when test="@endterm">
-            <xsl:variable name="etargets" select="key('id',@endterm)"/>
-            <xsl:variable name="etarget" select="$etargets[1]"/>
-            <xsl:choose>
-              <xsl:when test="count($etarget) = 0">
-                <xsl:message>
-                  <xsl:value-of select="count($etargets)"/>
-                  <xsl:text>Endterm points to nonexistent ID: </xsl:text>
-                  <xsl:value-of select="@endterm"/>
-                </xsl:message>
-                <xsl:text>???</xsl:text>
-              </xsl:when>
-              <xsl:otherwise>
-                <xsl:apply-templates select="$etarget" mode="endterm"/>
-              </xsl:otherwise>
-            </xsl:choose>
-          </xsl:when>
-          <xsl:when test="$target/@xreflabel">
-            <xsl:call-template name="xref.xreflabel">
-              <xsl:with-param name="target" select="$target"/>
-            </xsl:call-template>
-          </xsl:when>
-          <xsl:when test="$target">
-            <xsl:if test="not(parent::citation)">
-              <xsl:apply-templates select="$target" mode="xref-to-prefix"/>
-            </xsl:if>
-            <xsl:apply-templates select="$target" mode="xref-to">
-              <xsl:with-param name="referrer" select="."/>
-              <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-              <!-- Propagate role -->
-              <xsl:with-param name="role" select="$role"/>
-            </xsl:apply-templates>
-            <xsl:if test="not(parent::citation)">
-              <xsl:apply-templates select="$target" mode="xref-to-suffix"/>
-            </xsl:if>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:message>
-              <xsl:text>ERROR: xref linking to </xsl:text>
-              <xsl:value-of select="@linkend|@xlink:href"/>
-              <xsl:text> has no generated link text.</xsl:text>
-            </xsl:message>
-            <xsl:text>???</xsl:text>
-          </xsl:otherwise>
-        </xsl:choose>
-      </fo:inline>
-    </xsl:variable>
-    <!-- Convert it into an active link -->
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content" select="$content"/>
-    </xsl:call-template>
-    <!-- Add standard page reference? -->
-    <xsl:choose>
-      <xsl:when test="not($target)">
-        <!-- page numbers only for local targets -->
-      </xsl:when>
-      <xsl:when test="starts-with(normalize-space($xrefstyle), 'select:')
-                    and contains($xrefstyle, 'nopage')">
-        <!-- negative xrefstyle in instance turns it off -->
-      </xsl:when>
-      <!-- positive xrefstyle already handles it -->
-      <xsl:when test="not(starts-with(normalize-space($xrefstyle), 'select:')
-                    and (contains($xrefstyle, 'page')
-                        or contains($xrefstyle, 'Page')))
-                    and ( $insert.xref.page.number = 'yes'
-                      or $insert.xref.page.number = '1')
-                    or local-name($target) = 'para'">
-        <xsl:apply-templates select="$target" mode="page.citation">
-          <xsl:with-param name="id" select="$target/@id|$target/@xml:id"/>
-        </xsl:apply-templates>
-      </xsl:when>
-    </xsl:choose>
-  </xsl:template>
-
-    <!-- sect* mode xref-to:
-           Propagate role to mode object.xref.markup (see ../lfs-common.xsl) -->
-    <!-- The original template is in {docbook-xsl}/fo/xref.xsl -->
-  <xsl:template match="section|simplesect|sect1|sect2|sect3|sect4|sect5
-                      |refsect1|refsect2|refsect3|refsection" mode="xref-to">
-    <xsl:param name="referrer"/>
-    <xsl:param name="xrefstyle"/>
-    <xsl:param name="verbose" select="1"/>
-    <xsl:param name="role"/>
-    <xsl:apply-templates select="." mode="object.xref.markup">
-      <xsl:with-param name="purpose" select="'xref'"/>
-      <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-      <xsl:with-param name="referrer" select="$referrer"/>
-      <xsl:with-param name="verbose" select="$verbose"/>
-      <xsl:with-param name="role" select="$role"/>
-    </xsl:apply-templates>
-  </xsl:template>
-
-    <!-- insert.title.markup:
-           Apply the role value. -->
-    <!-- The original template is in {docbook-xsl}/fo/xref.xsl -->
-  <xsl:template match="*" mode="insert.title.markup">
-    <xsl:param name="purpose"/>
-    <xsl:param name="xrefstyle"/>
-    <xsl:param name="title"/>
-    <xsl:param name="role"/>
-    <xsl:choose>
-      <xsl:when test="$purpose = 'xref' and titleabbrev">
-        <xsl:apply-templates select="." mode="titleabbrev.markup"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:copy-of select="$title"/>
-        <xsl:value-of select="$role"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/profile.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/profile.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,55 +1,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<!--
-$LastChangedBy$
-$Date$
--->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version="1.0">
-
-  <!-- Stylesheet to create profiled XML output.
-       Replaces {docbook-xsl}/profiling/profile.xsl -->
-
-  <!-- Include common profiling stylesheet -->
-  <xsl:import href="docbook-xsl-snapshot/profiling/profile-mode.xsl"/>
-
-    <!-- This file must be included, because profile-mode is using
-         templates from it -->
-  <xsl:import href="docbook-xsl-snapshot/common/stripns.xsl"/>
-
-    <!-- In the two pass processing there is no need for base URI fixup -->
-  <xsl:param name="profile.baseuri.fixup" select="false()"/>
-
-  <!-- Generate DocBook instance with correct DOCTYPE -->
-  <xsl:output method="xml"
-              doctype-public="-//OASIS//DTD DocBook XML V4.5//EN"
-              doctype-system="http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"/>
-
-  <!-- Profiling parameters:
-         profile.separator changed from ";" to "," to let it work
-         at command line. -->
-  <xsl:param name="profile.arch" select="''"/>
-  <xsl:param name="profile.audience" select="''"/>
-  <xsl:param name="profile.condition" select="''"/>
-  <xsl:param name="profile.conformance" select="''"/>
-  <xsl:param name="profile.lang" select="''"/>
-  <xsl:param name="profile.os" select="''"/>
-  <xsl:param name="profile.revision" select="''"/>
-  <xsl:param name="profile.revisionflag" select="''"/>
-  <xsl:param name="profile.role" select="''"/>
-  <xsl:param name="profile.security" select="''"/>
-  <xsl:param name="profile.status" select="''"/>
-  <xsl:param name="profile.userlevel" select="''"/>
-  <xsl:param name="profile.vendor" select="''"/>
-  <xsl:param name="profile.wordsize" select="''"/>
-  <xsl:param name="profile.attribute" select="''"/>
-  <xsl:param name="profile.value" select="''"/>
-  <xsl:param name="profile.separator" select="','"/>
-
-  <!-- Call common profiling mode -->
-  <xsl:template match="/">
-    <xsl:apply-templates select="." mode="profile"/>
-  </xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/xhtml/lfs-admon.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/xhtml/lfs-admon.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,59 +1,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<!--
-$LastChangedBy$
-$Date$
--->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns="http://www.w3.org/1999/xhtml"
-                version="1.0">
-
-  <!-- This stylesheet controls how admonitions are displayed -->
-
-    <!-- Use graphics in admonitions? 1 = yes, 0 = no -->
-  <xsl:param name="admon.graphics" select="1"/>
-
-    <!-- Relative path to images directory. We set here relative path
-    from sub-dirs HTML files. The path from top-level HTML files (index.html,
-    partX.html, etc) MUST be fixed via a sed in the Makefile. -->
-  <xsl:param name="admon.graphics.path">../images/</xsl:param>
-
-    <!-- The images files extension -->
-  <xsl:param name="admon.graphics.extension" select="'.png'"/>
-
-    <!-- Changing the output tagging:
-           Removed $admon.style support
-           Hardcoded $admon.textlabel feature
-           Changed the output format from table to nested divs -->
-    <!-- The original template is in {docbook-xsl}/xhtml/admon.xsl -->
-  <xsl:template name="graphical.admonition">
-    <xsl:variable name="admon.type">
-      <xsl:choose>
-        <xsl:when test="local-name(.)='note'">Note</xsl:when>
-        <xsl:when test="local-name(.)='warning'">Warning</xsl:when>
-        <xsl:when test="local-name(.)='caution'">Caution</xsl:when>
-        <xsl:when test="local-name(.)='tip'">Tip</xsl:when>
-        <xsl:when test="local-name(.)='important'">Important</xsl:when>
-        <xsl:otherwise>Note</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:variable name="alt">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="$admon.type"/>
-      </xsl:call-template>
-    </xsl:variable>
-    <div class="admon {name(.)}">
-      <img alt="[{$alt}]">
-        <xsl:attribute name="src">
-          <xsl:call-template name="admon.graphic"/>
-        </xsl:attribute>
-      </img>
-      <h3>
-        <xsl:apply-templates select="." mode="object.title.markup"/>
-      </h3>
-      <xsl:apply-templates/>
-    </div>
-  </xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/xhtml/lfs-index.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/xhtml/lfs-index.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,268 +1,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<!--
-$LastChangedBy$
-$Date$
--->
-
-<!DOCTYPE xsl:stylesheet [
-<!ENTITY lowercase "'Aa&#192;&#224;&#193;&#225;&#194;&#226;&#195;&#227;&#196;&#228;&#197;&#229;&#256;&#257;&#258;&#259;&#260;&#261;&#461;&#462;&#478;&#479;&#480;&#481;&#506;&#507;&#512;&#513;&#514;&#515;&#550;&#551;&#7680;&#7681;&#7834;&#7840;&#7841;&#7842;&#7843;&#7844;&#7845;&#7846;&#7847;&#7848;&#7849;&#7850;&#7851;&#7852;&#7853;&#7854;&#7855;&#7856;&#7857;&#7858;&#7859;&#7860;&#7861;&#7862;&#7863;Bb&#384;&#385;&#595;&#386;&#387;&#7682;&#7683;&#7684;&#7685;&#7686;&#7687;Cc&#199;&#231;&#262;&#263;&#264;&#265;&#266;&#267;&#268;&#269;&#391;&#392;&#597;&#7688;&#7689;Dd&#270;&#271;&#272;&#273;&#394;&#599;&#395;&#396;&#453;&#498;&#545;&#598;&#7690;&#7691;&#7692;&#7693;&#7694;&#7695;&#7696;&#7697;&#7698;&#7699;Ee&#200;&#232;&#201;&#233;&#202;&#234;&#203;&#235;&#274;&#275;&#276;&#277;&#278;&#279;&#280;&#281;&#282;&#283;&#516;&#517;&#518;&#519;&#552;&#553;&#7700;&#7701;&#7702;&#7703;&#7704;&#7705;&#7706;&#7707;&#7708;&#7709;&#7864;&#7865;&#7866;&#7867;&#7868;&#7869;&#7870;&#7871;&#7872;&#7873;&#7874;&#7875;&#7876;&#7877;&#7878;&#7879;Ff&#401;&#402;&#7710;&#7711;Gg&#284;&#285;&#286;&#287;&#288;&#289;&#290;&#291;&#403;&#608;&#484;&#485;&#486;&#487;&#500;&#501;&#7712;&#7713;Hh&#292;&#293;&#294;&#295;&#542;&#543;&#614;&#7714;&#7715;&#7716;&#7717;&#7718;&#7719;&#7720;&#7721;&#7722;&#7723;&#7830;Ii&#204;&#236;&#205;&#237;&#206;&#238;&#207;&#239;&#296;&#297;&#298;&#299;&#300;&#301;&#302;&#303;&#304;&#407;&#616;&#463;&#464;&#520;&#521;&#522;&#523;&#7724;&#7725;&#7726;&#7727;&#7880;&#7881;&#7882;&#7883;Jj&#308;&#309;&#496;&#669;Kk&#310;&#311;&#408;&#409;&#488;&#489;&#7728;&#7729;&#7730;&#7731;&#7732;&#7733;Ll&#313;&#314;&#315;&#316;&#317;&#318;&#319;&#320;&#321;&#322;&#410;&#456;&#564;&#619;&#620;&#621;&#7734;&#7735;&#7736;&#7737;&#7738;&#7739;&#7740;&#7741;Mm&#625;&#7742;&#7743;&#7744;&#7745;&#7746;&#7747;Nn&#209;&#241;&#323;&#324;&#325;&#326;&#327;&#328;&#413;&#626;&#414;&#544;&#459;&#504;&#505;&#565;&#627;&#7748;&#7749;&#7750;&#7751;&#7752;&#7753;&#7754;&#7755;Oo&#210;&#242;&#211;&#243;&#212;&#244;&#213;&#245;&#214;&#246;&#216;&#248;&#332;&#333;&#334;&#335;&#336;&#337;&#415;&#416;&#417;&#465;&#466;&#490;&#491;&#492;&#493;&#510;&#511;&#524;&#525;&#526;&#527;&#554;&#555;&#556;&#557;&#558;&#559;&#560;&#561;&#7756;&#7757;&#7758;&#7759;&#7760;&#7761;&#7762;&#7763;&#7884;&#7885;&#7886;&#7887;&#7888;&#7889;&#7890;&#7891;&#7892;&#7893;&#7894;&#7895;&#7896;&#7897;&#7898;&#7899;&#7900;&#7901;&#7902;&#7903;&#7904;&#7905;&#7906;&#7907;Pp&#420;&#421;&#7764;&#7765;&#7766;&#7767;Qq&#672;Rr&#340;&#341;&#342;&#343;&#344;&#345;&#528;&#529;&#530;&#531;&#636;&#637;&#638;&#7768;&#7769;&#7770;&#7771;&#7772;&#7773;&#7774;&#7775;Ss&#346;&#347;&#348;&#349;&#350;&#351;&#352;&#353;&#536;&#537;&#642;&#7776;&#7777;&#7778;&#7779;&#7780;&#7781;&#7782;&#7783;&#7784;&#7785;Tt&#354;&#355;&#356;&#357;&#358;&#359;&#427;&#428;&#429;&#430;&#648;&#538;&#539;&#566;&#7786;&#7787;&#7788;&#7789;&#7790;&#7791;&#7792;&#7793;&#7831;Uu&#217;&#249;&#218;&#250;&#219;&#251;&#220;&#252;&#360;&#361;&#362;&#363;&#364;&#365;&#366;&#367;&#368;&#369;&#370;&#371;&#431;&#432;&#467;&#468;&#469;&#470;&#471;&#472;&#473;&#474;&#475;&#476;&#532;&#533;&#534;&#535;&#7794;&#7795;&#7796;&#7797;&#7798;&#7799;&#7800;&#7801;&#7802;&#7803;&#7908;&#7909;&#7910;&#7911;&#7912;&#7913;&#7914;&#7915;&#7916;&#7917;&#7918;&#7919;&#7920;&#7921;Vv&#434;&#651;&#7804;&#7805;&#7806;&#7807;Ww&#372;&#373;&#7808;&#7809;&#7810;&#7811;&#7812;&#7813;&#7814;&#7815;&#7816;&#7817;&#7832;Xx&#7818;&#7819;&#7820;&#7821;Yy&#221;&#253;&#255;&#376;&#374;&#375;&#435;&#436;&#562;&#563;&#7822;&#7823;&#7833;&#7922;&#7923;&#7924;&#7925;&#7926;&#7927;&#7928;&#7929;Zz&#377;&#378;&#379;&#380;&#381;&#382;&#437;&#438;&#548;&#549;&#656;&#657;&#7824;&#7825;&#7826;&#7827;&#7828;&#7829;&#7829;'">
-<!ENTITY uppercase "'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ'">
-<!ENTITY primary   'normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = ""]))'>
-<!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas) or @sortas = ""]))'>
-<!ENTITY scope     "count(ancestor::node()|$scope) = count(ancestor::node())">
-<!ENTITY section   "(ancestor-or-self::set |ancestor-or-self::book |ancestor-or-self::part |ancestor-or-self::reference |ancestor-or-self::partintro |ancestor-or-self::chapter |ancestor-or-self::appendix |ancestor-or-self::preface |ancestor-or-self::article |ancestor-or-self::section |ancestor-or-self::sect1 |ancestor-or-self::sect2 |ancestor-or-self::sect3 |ancestor-or-self::sect4 |ancestor-or-self::sect5 |ancestor-or-self::refentry |ancestor-or-self::refsect1 |ancestor-or-self::refsect2 |ancestor-or-self::refsect3 |ancestor-or-self::simplesect |ancestor-or-self::bibliography |ancestor-or-self::glossary |ancestor-or-self::index |ancestor-or-self::webpage)[last()]">
-<!ENTITY section.id "generate-id(&section;)">
-<!ENTITY sep '" "'>
-]>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns="http://www.w3.org/1999/xhtml"
-                version="1.0">
-
-  <!-- This stylesheet controls how the Index is generated.
-       Due how they are created, the original XHTML stylesheets don't make
-       use of the entities from {docbook-xsl}/common/entities.ent.
-       We add the relevant ones in the DOCTYPE to have more readable templates.
-       Also, we remove support for @role and @type based Index due that it is
-       broken when used with @zone based cross-references. -->
-
-    <!-- The file name of the Index page.
-         There is no upstream template with match="index", only a global
-         match="*", thus the next template is enought to force the Index
-         filename. -->
-  <xsl:template match="index" mode="recursive-chunk-filename">
-    <xsl:text>longindex.html</xsl:text>
-  </xsl:template>
-
-    <!-- The Index title in the longindex.html page:
-           Removed a lot of code not useful for us.
-           Forced h1 title size. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
-  <xsl:template name="index.titlepage">
-    <h1 class="index">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="$index-title"/>
-      </xsl:call-template>
-    </h1>
-  </xsl:template>
-
-    <!--Divisions:
-          Translate alphabetical divisons titles to by-type titles.
-          Added gentext support to divisions titles.
-          Using h2 for divisions titles.
-          Changed output from dl format to ul format. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/autoidx.xsl -->
-  <xsl:template match="indexterm" mode="index-div-basic">
-    <xsl:param name="scope" select="."/>
-    <xsl:variable name="key" select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/>
-    <xsl:variable name="divtitle" select="translate($key, &lowercase;, &uppercase;)"/>
-      <!-- Make sure that we don't generate a div if there are no terms in scope -->
-    <xsl:if test="key('letter', $key)[&scope;] [count(.|key('primary', &primary;)[&scope;][1]) = 1]">
-      <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)">
-        <h2>
-          <xsl:choose>
-            <xsl:when test="$divtitle = 'A'">
-              <a id="package-index" name="package-index"/>
-              <xsl:call-template name="gentext">
-                <xsl:with-param name="key">Packages</xsl:with-param>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:when test="$divtitle = 'B'">
-              <a id="program-index" name="program-index"/>
-              <xsl:call-template name="gentext">
-                <xsl:with-param name="key">Programs</xsl:with-param>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:when test="$divtitle = 'C'">
-              <a id="library-index" name="library-index"/>
-              <xsl:call-template name="gentext">
-                <xsl:with-param name="key">Libraries</xsl:with-param>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:when test="$divtitle = 'D'">
-              <xsl:choose>
-                <xsl:when test="$book-type = 'blfs'">
-                  <a id="kernel-config-index" name="kernel-config-index"/>
-                  <xsl:call-template name="gentext">
-                    <xsl:with-param name="key">Kernel Configuration</xsl:with-param>
-                  </xsl:call-template>
-                </xsl:when>
-                <xsl:otherwise>
-                  <a id="scripts-index" name="scripts-index"/>
-                  <xsl:call-template name="gentext">
-                    <xsl:with-param name="key">Scripts</xsl:with-param>
-                  </xsl:call-template>
-                </xsl:otherwise>
-              </xsl:choose>
-            </xsl:when>
-            <xsl:when test="$divtitle = 'E'">
-              <xsl:choose>
-                <xsl:when test="$book-type = 'blfs'">
-                  <a id="config-file-index" name="config-file-index"/>
-                  <xsl:call-template name="gentext">
-                    <xsl:with-param name="key">Configuration Files</xsl:with-param>
-                  </xsl:call-template>
-                </xsl:when>
-                <xsl:otherwise>
-                  <a id="other-index" name="other-index"/>
-                  <xsl:call-template name="gentext">
-                    <xsl:with-param name="key">Others</xsl:with-param>
-                  </xsl:call-template>
-                </xsl:otherwise>
-              </xsl:choose>
-            </xsl:when>
-            <xsl:when test="$divtitle = 'F'">
-                <a id="bootscript-index" name="bootscript-index"/>
-                <xsl:call-template name="gentext">
-                  <xsl:with-param name="key">Bootscripts</xsl:with-param>
-                </xsl:call-template>
-            </xsl:when>
-            <xsl:when test="$divtitle = 'G'">
-              <a id="other-index" name="other-index"/>
-              <xsl:call-template name="gentext">
-                <xsl:with-param name="key">Others</xsl:with-param>
-              </xsl:call-template>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:value-of select="$divtitle"/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </h2>
-      </xsl:if>
-      <ul>
-        <xsl:apply-templates select="key('letter', $key)[&scope;] [count(.|key('primary', &primary;)[&scope;][1])=1]"
-                              mode="index-primary">
-          <xsl:with-param name="scope" select="$scope"/>
-          <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
-        </xsl:apply-templates>
-      </ul>
-    </xsl:if>
-  </xsl:template>
-
-    <!-- Dropping $term.separator and $number.separator from here.
-         We add our customized ones in the output flow.
-         As all our indexterm have @zone attributes, removed a lot of
-         unused code. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/autoidx.xsl -->
-  <xsl:template match="indexterm" mode="reference">
-    <xsl:param name="scope" select="."/>
-    <xsl:call-template name="reference">
-      <xsl:with-param name="zones" select="normalize-space(@zone)"/>
-      <xsl:with-param name="scope" select="$scope"/>
-    </xsl:call-template>
-  </xsl:template>
-
-    <!-- Primary items:
-           Changed the output format from dl to ul.
-           Placed the term and separator into strong tags.
-           Placed the target links into a div.
-           Removed code for unused see and sealso childs. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/autoidx.xsl -->
-  <xsl:template match="indexterm" mode="index-primary">
-    <xsl:param name="scope" select="."/>
-    <xsl:variable name="key" select="&primary;"/>
-    <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/>
-    <li>
-      <strong class="item">
-        <xsl:value-of select="primary"/>
-        <xsl:text>: </xsl:text>
-      </strong>
-      <span class='indexref'>
-        <xsl:for-each select="$refs[generate-id() = generate-id(key('primary-section',concat($key, &sep;, &section.id;))[&scope;][1])]">
-          <xsl:apply-templates select="." mode="reference">
-            <xsl:with-param name="scope" select="$scope"/>
-          </xsl:apply-templates>
-        </xsl:for-each>
-      </span>
-      <xsl:if test="$refs/secondary">
-        <ul>
-          <xsl:apply-templates select="$refs[secondary and count(.|key('secondary', concat($key, &sep;, &secondary;))[&scope;][1]) = 1]"
-                               mode="index-secondary">
-            <xsl:with-param name="scope" select="$scope"/>
-            <xsl:sort select="translate(&secondary;, &lowercase;, &uppercase;)"/>
-          </xsl:apply-templates>
-         </ul>
-      </xsl:if>
-    </li>
-  </xsl:template>
-
-    <!-- Secondary items:
-           Changed the output format from dl to ul.
-           Placed the term and separator into strong tags.
-           Placed the target links into a div.
-           Removed code for unused tertiary, see, and sealso childs. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/autoidx.xsl -->
-  <xsl:template match="indexterm" mode="index-secondary">
-    <xsl:param name="scope" select="."/>
-    <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;)"/>
-    <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/>
-    <li>
-      <strong class="secitem">
-        <xsl:value-of select="secondary"/>
-        <xsl:text>: </xsl:text>
-      </strong>
-      <span class='indexref'>
-        <xsl:for-each select="$refs[generate-id() = generate-id(key('secondary-section', concat($key, &sep;, &section.id;))[&scope;][1])]">
-          <xsl:apply-templates select="." mode="reference">
-            <xsl:with-param name="scope" select="$scope"/>
-          </xsl:apply-templates>
-        </xsl:for-each>
-      </span>
-    </li>
-  </xsl:template>
-
-    <!-- The target links:
-           Changed links separator.
-           On the second @zone link, we use a fixed string for the text
-           with gentext support.
-           Assume that there is no more than 2 @zone in a indexterm.
-           Use href.target.uri named template to resolve the links. It is faster
-           than the default href.target named template. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/autoidx.xsl -->
-  <xsl:template name="reference">
-    <xsl:param name="scope" select="."/>
-    <xsl:param name="zones"/>
-    <xsl:choose>
-      <xsl:when test="contains($zones, ' ')">
-        <xsl:variable name="zone" select="substring-before($zones, ' ')"/>
-        <xsl:variable name="zone2" select="substring-after($zones, ' ')"/>
-        <xsl:variable name="target" select="key('sections', $zone)[&scope;]"/>
-        <xsl:variable name="target2" select="key('sections', $zone2)[&scope;]"/>
-        <a>
-          <xsl:attribute name="href">
-            <xsl:call-template name="href.target.uri">
-              <xsl:with-param name="object" select="$target[1]"/>
-            </xsl:call-template>
-          </xsl:attribute>
-          <xsl:apply-templates select="$target[1]" mode="index-title-content"/>
-        </a>
-        <xsl:text> -- </xsl:text>
-        <a>
-          <xsl:attribute name="href">
-            <xsl:call-template name="href.target.uri">
-              <xsl:with-param name="object" select="$target2[1]"/>
-            </xsl:call-template>
-          </xsl:attribute>
-          <xsl:call-template name="gentext">
-            <xsl:with-param name="key">description</xsl:with-param>
-          </xsl:call-template>
-        </a>
-        <br/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:variable name="zone" select="$zones"/>
-        <xsl:variable name="target" select="key('sections', $zone)[&scope;]"/>
-        <a>
-          <xsl:attribute name="href">
-            <xsl:call-template name="href.target.uri">
-              <xsl:with-param name="object" select="$target[1]"/>
-            </xsl:call-template>
-          </xsl:attribute>
-          <xsl:apply-templates select="$target[1]" mode="index-title-content"/>
-        </a>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/xhtml/lfs-legalnotice.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/xhtml/lfs-legalnotice.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,82 +1,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<!--
-$LastChangedBy$
-$Date$
--->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns="http://www.w3.org/1999/xhtml"
-                version="1.0">
-
-  <!-- This stylesheet controls how legalnotice page is created -->
-
-    <!-- Generating the legalnotice page:
-           We are forcing separate legalnotice page generation.
-           Removed the default link to legalnotice page. We want it in Copyright.
-           Added footer navigational link to Home.  -->
-    <!-- The original template is in {docbook-xsl}/xhtml/titlepage.xsl -->
-  <xsl:template match="legalnotice" mode="titlepage.mode">
-    <xsl:variable name="id">
-      <xsl:call-template name="object.id"/>
-    </xsl:variable>
-    <xsl:variable name="filename" select="concat($base.dir, 'legalnotice.html')"/>
-    <xsl:call-template name="write.chunk">
-      <xsl:with-param name="filename" select="$filename"/>
-      <xsl:with-param name="quiet" select="$chunk.quietly"/>
-      <xsl:with-param name="content">
-        <html>
-          <xsl:call-template name="html.head"/>
-          <body>
-            <xsl:call-template name="body.attributes"/>
-            <div class="{local-name(.)}">
-              <xsl:apply-templates mode="titlepage.mode"/>
-            </div>
-            <div class="navfooter">
-              <ul class="footerlinks">
-                <li class="home">
-                  <a accesskey="h" href="index.html">
-                    <xsl:attribute name="title">
-                      <xsl:value-of select="/book/bookinfo/title"/>
-                      <xsl:text> - </xsl:text>
-                      <xsl:value-of select="/book/bookinfo/subtitle"/>
-                    </xsl:attribute>
-                    <xsl:call-template name="navig.content">
-                      <xsl:with-param name="direction" select="'home'"/>
-                    </xsl:call-template>
-                  </a>
-                </li>
-              </ul>
-            </div>
-          </body>
-        </html>
-      </xsl:with-param>
-    </xsl:call-template>
-  </xsl:template>
-
-    <!-- Making the legalnotice link:
-         We make the "Copyright" word a link to legalnotice page. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/titlepage.xsl -->
-  <xsl:template match="copyright" mode="titlepage.mode">
-    <p class="{name(.)}">
-      <a href="legalnotice.html">
-        <xsl:call-template name="gentext">
-          <xsl:with-param name="key" select="'Copyright'"/>
-        </xsl:call-template>
-      </a>
-      <xsl:call-template name="gentext.space"/>
-      <xsl:call-template name="dingbat">
-        <xsl:with-param name="dingbat">copyright</xsl:with-param>
-      </xsl:call-template>
-      <xsl:call-template name="gentext.space"/>
-      <xsl:call-template name="copyright.years">
-        <xsl:with-param name="years" select="year"/>
-        <xsl:with-param name="print.ranges" select="$make.year.ranges"/>
-        <xsl:with-param name="single.year.ranges" select="$make.single.year.ranges"/>
-      </xsl:call-template>
-      <xsl:call-template name="gentext.space"/>
-      <xsl:apply-templates select="holder" mode="titlepage.mode"/>
-    </p>
-  </xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/xhtml/lfs-mixed.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/xhtml/lfs-mixed.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,312 +1,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<!--
-$LastChangedBy$
-$Date$
--->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns="http://www.w3.org/1999/xhtml"
-                version="1.0">
-
-  <!-- This stylesheet contains misc templates for output formating.
-       This file is for that templates that don't fit in other files
-       and that not afect the chunk algorithm. -->
-
-  <!-- Individual elements templates -->
-
-    <!-- para:
-           Added a choose to skip empty "Home page" in packages.xml.
-           Added an if for HLFS features. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/block.xsl -->
-  <xsl:template match="para">
-    <xsl:choose>
-      <xsl:when test="child::ulink[@url=' ']"/>
-      <xsl:otherwise>
-        <xsl:call-template name="paragraph">
-          <xsl:with-param name="class">
-            <xsl:if test="@role">
-              <xsl:if test="$book-type = 'hlfs'">
-                <xsl:if test="contains($hlfs-features,concat(',',@role,','))">
-                  <xsl:text>feature-</xsl:text>
-                </xsl:if>
-              </xsl:if>
-              <xsl:value-of select="@role"/>
-            </xsl:if>
-          </xsl:with-param>
-          <xsl:with-param name="content">
-            <xsl:if test="position() = 1 and parent::listitem">
-              <xsl:call-template name="anchor">
-                <xsl:with-param name="node" select="parent::listitem"/>
-              </xsl:call-template>
-            </xsl:if>
-            <xsl:call-template name="anchor"/>
-            <xsl:apply-templates/>
-          </xsl:with-param>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-    <!-- screen:
-           Changed class attribute asignament to fit our look needs.
-           Removed unused line numbering support. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/verbatim.xsl
-         It match also programlisting and synopsis. The code for that tags
-         is unchanged. -->
-  <xsl:template match="screen">
-    <pre>
-      <xsl:attribute name="class">
-        <xsl:choose>
-          <xsl:when test="@role and not(@role = 'nodump')">
-            <xsl:if test="$book-type = 'hlfs'">
-              <xsl:if test="contains($hlfs-features,concat(',',@role,','))">
-                <xsl:text>feature-</xsl:text>
-              </xsl:if>
-            </xsl:if>
-            <xsl:value-of select="@role"/>
-          </xsl:when>
-          <xsl:when test="child::* = userinput">userinput</xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="name(.)"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:attribute>
-      <xsl:apply-templates/>
-    </pre>
-  </xsl:template>
-
-    <!-- userinput:
-           Using a customized output when inside screen.
-           In other cases, use the original template. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/inline.xsl -->
-  <xsl:template match="userinput">
-    <xsl:choose>
-      <xsl:when test="ancestor::screen">
-        <kbd class="command">
-          <xsl:apply-templates/>
-        </kbd>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:apply-imports/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-    <!-- itemizadlist:
-           @compact is not allowed in XHTML 1.0 Strict DTD. Changing it
-           to @class. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/lists.xsl -->
-  <xsl:template match="itemizedlist">
-    <div>
-      <xsl:apply-templates select="." mode="class.attribute"/>
-      <xsl:call-template name="anchor"/>
-      <xsl:if test="title">
-        <xsl:call-template name="formal.object.heading"/>
-      </xsl:if>
-      <xsl:apply-templates select="*[not(self::listitem or self::title
-                              or self::titleabbrev)]
-                              |comment()[not(preceding-sibling::listitem)]
-                              |processing-instruction()[not(preceding-sibling::listitem)]"/>
-      <ul>
-        <xsl:if test="@spacing='compact'">
-          <xsl:attribute name="class">
-            <xsl:value-of select="@spacing"/>
-          </xsl:attribute>
-        </xsl:if>
-        <xsl:apply-templates select="listitem |comment()[preceding-sibling::listitem]
-                                |processing-instruction()[preceding-sibling::listitem]"/>
-      </ul>
-    </div>
-  </xsl:template>
-
-    <!-- orderedlist:
-           @start, @type, and @compact sre not allowed in XHTML 1.0 Strict DTD.
-           @start and @type can be replaced by CSS code.
-           Changing @compact to @class. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/lists.xsl -->
-  <xsl:template match="orderedlist">
-    <div>
-      <xsl:apply-templates select="." mode="class.attribute"/>
-      <xsl:call-template name="anchor"/>
-      <xsl:if test="title">
-        <xsl:call-template name="formal.object.heading"/>
-      </xsl:if>
-      <xsl:apply-templates select="*[not(self::listitem or self::title
-                              or self::titleabbrev)]
-                              |comment()[not(preceding-sibling::listitem)]
-                              |processing-instruction()[not(preceding-sibling::listitem)]"/>
-       <ol>
-        <xsl:if test="@spacing='compact'">
-          <xsl:attribute name="class">
-            <xsl:value-of select="@spacing"/>
-          </xsl:attribute>
-        </xsl:if>
-        <xsl:apply-templates select="listitem |comment()[preceding-sibling::listitem]
-                                |processing-instruction()[preceding-sibling::listitem]"/>
-      </ol>
-    </div>
-  </xsl:template>
-
-    <!-- seg in segementedlist:
-           Added a span around seg text to can match it with CSS code. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/lists.xsl -->
-  <xsl:template match="seg">
-    <xsl:variable name="segnum" select="count(preceding-sibling::seg)+1"/>
-    <xsl:variable name="seglist" select="ancestor::segmentedlist"/>
-    <xsl:variable name="segtitles" select="$seglist/segtitle"/>
-      <!-- Note: segtitle is only going to be the right thing in a well formed
-      SegmentedList.  If there are too many Segs or too few SegTitles,
-      you'll get something odd...maybe an error -->
-    <div class="seg">
-      <strong class="segtitle">
-        <xsl:apply-templates select="$segtitles[$segnum=position()]"
-                              mode="segtitle-in-seg"/>
-        <xsl:text>: </xsl:text>
-      </strong>
-      <span class="segbody">
-        <xsl:if test="@id">
-          <a id="{@id}" name="{@id}"/>
-        </xsl:if>
-        <xsl:apply-templates/>
-      </span>
-    </div>
-  </xsl:template>
-
-    <!-- variablelist:
-           If it have a role attribute, wrap the default output into a div with
-           a class attribute matching that role attribute.
-           Apply the original template in all cases. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/lists.xsl -->
-  <xsl:template match="variablelist">
-    <xsl:choose>
-      <xsl:when test="@role">
-        <div class="{@role}">
-          <xsl:apply-imports/>
-        </div>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:apply-imports/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-    <!-- para/simplelist:
-           Self-made template. Add a line break and process the childs.
-           If @type is specified, the original templates should be used,
-           but not tested. -->
-  <xsl:template match="para/simplelist">
-    <br/>
-    <xsl:apply-templates mode="condensed"/>
-  </xsl:template>
-
-    <!-- member:
-           Self-made template to process it and add a line break. -->
-  <xsl:template match="member" mode="condensed">
-    <xsl:call-template name="anchor"/>
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content">
-        <xsl:apply-templates/>
-      </xsl:with-param>
-    </xsl:call-template>
-    <br/>
-  </xsl:template>
-
-
-  <!-- Named formating templates -->
-
-    <!-- Body attributes:
-           Add to the body XHTML output tag a class attribute with the book type
-           and a id atribute with the book type and version. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/docbook.xsl -->
-  <xsl:template name="body.attributes">
-    <xsl:attribute name="class">
-      <xsl:value-of select="$book-type"/>
-    </xsl:attribute>
-    <xsl:attribute name="id">
-      <xsl:value-of select="$book-type"/>
-      <xsl:text>-</xsl:text>
-      <xsl:value-of select="substring-after(/book/bookinfo/subtitle, ' ')"/>
-    </xsl:attribute>
-  </xsl:template>
-
-  <!-- Revision History -->
-
-    <!-- revhistory mode titlepage.mode:
-           Removed hardcoded style attributes.
-           Removed support for separate revhistory file. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/titlepage.xsl -->
-  <xsl:template match="revhistory" mode="titlepage.mode">
-    <xsl:variable name="numcols">
-      <xsl:choose>
-        <xsl:when test="//authorinitials">4</xsl:when>
-        <xsl:otherwise>3</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:variable name="title">
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key">RevHistory</xsl:with-param>
-      </xsl:call-template>
-    </xsl:variable>
-    <xsl:variable name="contents">
-      <table summary="{$title}" class="{name(.)}">
-        <tr>
-          <th colspan="{$numcols}">
-            <b>
-              <xsl:value-of select="$title"/>
-            </b>
-          </th>
-        </tr>
-        <xsl:apply-templates mode="titlepage.mode">
-          <xsl:with-param name="numcols" select="$numcols"/>
-        </xsl:apply-templates>
-      </table>
-    </xsl:variable>
-    <xsl:copy-of select="$contents"/>
-  </xsl:template>
-
-    <!-- revhistory/revision mode titlepage.mode:
-           Removed hardcoded style attributes. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/titlepage.xsl -->
-  <xsl:template match="revhistory/revision" mode="titlepage.mode">
-    <xsl:param name="numcols" select="'3'"/>
-    <xsl:variable name="revnumber" select="revnumber"/>
-    <xsl:variable name="revdate" select="date"/>
-    <xsl:variable name="revauthor" select="authorinitials|author"/>
-    <xsl:variable name="revremark" select="revremark|revdescription"/>
-    <tr>
-      <td>
-        <xsl:if test="$revnumber">
-          <xsl:call-template name="gentext">
-            <xsl:with-param name="key" select="'Revision'"/>
-          </xsl:call-template>
-          <xsl:call-template name="gentext.space"/>
-          <xsl:apply-templates select="$revnumber[1]" mode="titlepage.mode"/>
-        </xsl:if>
-      </td>
-      <td>
-        <xsl:apply-templates select="$revdate[1]" mode="titlepage.mode"/>
-      </td>
-      <xsl:choose>
-        <xsl:when test="$revauthor">
-          <td>
-            <xsl:for-each select="$revauthor">
-              <xsl:apply-templates select="." mode="titlepage.mode"/>
-              <xsl:if test="position() != last()">
-                <xsl:text>, </xsl:text>
-              </xsl:if>
-            </xsl:for-each>
-          </td>
-        </xsl:when>
-        <xsl:when test="$numcols &gt; 3">
-          <td>&#160;</td>
-        </xsl:when>
-        <xsl:otherwise/>
-      </xsl:choose>
-      <td>
-        <xsl:apply-templates select="$revremark[1]" mode="titlepage.mode"/>
-      </td>
-    </tr>
-  </xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/xhtml/lfs-navigational.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/xhtml/lfs-navigational.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,364 +1,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<!--
-$LastChangedBy$
-$Date$
--->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns="http://www.w3.org/1999/xhtml"
-                version="1.0">
-
-  <!-- This stylesheet controls how page header and navigational links
-       are generated. -->
-
-    <!-- html.head:
-           Drop all navigational links from inside head xhtml output. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/chunk-common.xsl -->
-  <xsl:template name="html.head">
-    <head>
-      <xsl:call-template name="system.head.content"/>
-      <xsl:call-template name="head.content"/>
-      <xsl:call-template name="user.head.content"/>
-    </head>
-  </xsl:template>
-
-    <!-- header.navigation:
-           Self-made template that full replaces the original one -->
-    <!-- The original template is in {docbook-xsl}/xhtml/chunk-common.xsl -->
-  <xsl:template name="header.navigation">
-    <xsl:param name="prev" select="/foo"/>
-    <xsl:param name="next" select="/foo"/>
-    <xsl:variable name="up" select="parent::*"/>
-    <xsl:variable name="home" select="/*[1]"/>
-      <!-- Don't generate the header in index.html -->
-    <xsl:if test="$home != .">
-      <div class="navheader">
-          <!-- Book title and version -->
-        <h4>
-          <xsl:apply-templates select="$home" mode="object.title.markup"/>
-          <xsl:text> - </xsl:text>
-          <xsl:apply-templates select="$home" mode="object.subtitle.markup"/>
-        </h4>
-          <!-- Except for preface, part, and index, add the title of the parent -->
-        <xsl:if test="$up != $home">
-          <h3>
-            <xsl:apply-templates select="$up" mode="object.title.markup"/>
-          </h3>
-        </xsl:if>
-          <!-- Create header navigational links -->
-        <xsl:call-template name="navigational.links">
-          <xsl:with-param name="prev" select="$prev"/>
-          <xsl:with-param name="next" select="$next"/>
-          <xsl:with-param name="up" select="$up"/>
-          <xsl:with-param name="home" select="$home"/>
-        </xsl:call-template>
-      </div>
-    </xsl:if>
-  </xsl:template>
-
-    <!-- footer.navigation:
-           Self-made template that full replaces the original one -->
-    <!-- The original template is in {docbook-xsl}/xhtml/chunk-common.xsl -->
-  <xsl:template name="footer.navigation">
-    <xsl:param name="prev" select="/foo"/>
-    <xsl:param name="next" select="/foo"/>
-    <xsl:variable name="up" select="parent::*"/>
-    <xsl:variable name="home" select="/*[1]"/>
-      <!-- Create footer navigational links -->
-    <div class="navfooter">
-      <xsl:call-template name="navigational.links">
-        <xsl:with-param name="prev" select="$prev"/>
-        <xsl:with-param name="next" select="$next"/>
-        <xsl:with-param name="up" select="$up"/>
-        <xsl:with-param name="home" select="$home"/>
-      </xsl:call-template>
-    </div>
-      <!-- In HLFS, add the features.js call -->
-    <xsl:if test="$book-type = 'hlfs'">
-      <script type="text/javascript">
-        <xsl:attribute name="src">
-          <xsl:choose>
-            <xsl:when test="local-name(.)='book' or local-name(.)='part' or
-                            local-name(.)='index'">../features.js</xsl:when>
-            <xsl:otherwise>../../features.js</xsl:otherwise>
-          </xsl:choose>
-        </xsl:attribute>
-      </script>
-    </xsl:if>
-  </xsl:template>
-
-    <!-- navigational.links:
-           Self-made template to generate navigational links.
-           Most of the code come from the original header.navigation and
-           footer.navigation templates, with this changes:
-             Changed the output format from table to ul.
-             Placed the same links on both header and footer.
-             Added a title attribute to the link containing the target title
-               (it content is displayed when placing the mouse over the link)
-             For "Prev" and "Next" links, added the target title under it.
-             When "Next" target is the Index, added gentext support for the
-               Index title.
-             Skip links to dummy sect1. -->
-  <xsl:template name="navigational.links">
-    <xsl:param name="prev"/>
-    <xsl:param name="next"/>
-    <xsl:param name="up"/>
-    <xsl:param name="home"/>
-    <ul>
-        <!-- No prev link when prev is home -->
-      <xsl:if test="count($prev)&gt;0 and $prev != $home">
-        <li class="prev">
-          <xsl:choose>
-
-              <!-- If prev is a dummy sect1 that is the first one in a chapter,
-                   links to the parent chapter.-->
-            <xsl:when test="$prev[@role='dummy'] and
-                            count(preceding-sibling::sect1)=1">
-              <a accesskey="p">
-                <xsl:attribute name="href">
-                  <xsl:call-template name="href.target">
-                    <xsl:with-param name="object" select=".."/>
-                  </xsl:call-template>
-                </xsl:attribute>
-                <xsl:attribute name="title">
-                  <xsl:value-of select="../title"/>
-                </xsl:attribute>
-                <xsl:call-template name="navig.content">
-                  <xsl:with-param name="direction" select="'prev'"/>
-                </xsl:call-template>
-              </a>
-              <p>
-                <xsl:value-of select="../title"/>
-              </p>
-            </xsl:when>
-
-              <!-- If prev is a dummy sect1 that is not the first one in a chapter,
-                   links to the previous sect1.-->
-            <xsl:when test="$prev[@role='dummy'] and
-                            count(preceding-sibling::sect1)&gt;1">
-              <a accesskey="p">
-                <xsl:attribute name="href">
-                  <xsl:call-template name="href.target">
-                    <xsl:with-param name="object" select="preceding-sibling::sect1[position()=2]"/>
-                  </xsl:call-template>
-                </xsl:attribute>
-                <xsl:attribute name="title">
-                  <xsl:value-of select="preceding-sibling::sect1[position()=2]/title"/>
-                </xsl:attribute>
-                <xsl:call-template name="navig.content">
-                  <xsl:with-param name="direction" select="'prev'"/>
-                </xsl:call-template>
-              </a>
-              <p>
-                <xsl:value-of select="preceding-sibling::sect1[position()=2]/title"/>
-              </p>
-            </xsl:when>
-
-              <!-- Code for the "To Boot or To Chroot" CLFS links jumps. -->
-            <xsl:when test="$prev[@id='ch-chroot-devices'] or $prev[@id='ch-boot-whatnext']">
-              <a accesskey="p">
-                <xsl:attribute name="href">
-                  <xsl:call-template name="href.target">
-                    <xsl:with-param name="object" select="//sect1[@id='ch-temp-system-choose']"/>
-                  </xsl:call-template>
-                </xsl:attribute>
-                <xsl:attribute name="title">
-                  <xsl:value-of select="//sect1[@id='ch-temp-system-choose']/title"/>
-                </xsl:attribute>
-                <xsl:call-template name="navig.content">
-                  <xsl:with-param name="direction" select="'prev'"/>
-                </xsl:call-template>
-              </a>
-              <p>
-                <xsl:value-of select="//sect1[@id='ch-temp-system-choose']/title"/>
-              </p>
-            </xsl:when>
-
-              <!-- Normal prev links -->
-            <xsl:otherwise>
-              <a accesskey="p">
-                <xsl:attribute name="href">
-                  <xsl:call-template name="href.target">
-                    <xsl:with-param name="object" select="$prev"/>
-                  </xsl:call-template>
-                </xsl:attribute>
-                <xsl:attribute name="title">
-                  <xsl:value-of select="$prev/title"/>
-                </xsl:attribute>
-                <xsl:call-template name="navig.content">
-                  <xsl:with-param name="direction" select="'prev'"/>
-                </xsl:call-template>
-              </a>
-              <p>
-                <xsl:value-of select="$prev/title"/>
-              </p>
-            </xsl:otherwise>
-          </xsl:choose>
-        </li>
-      </xsl:if>
-
-
-        <!-- Next link except in the last page and in the CLFS "choose" page -->
-      <xsl:if test="count($next)&gt;0 and (not(@id) or @id!='ch-temp-system-choose')">
-        <li class="next">
-          <xsl:choose>
-
-              <!-- Current page is sect1 a next is a dummy sect1, link to the next one -->
-            <xsl:when test="$next[@role='dummy'] and local-name(.) = 'sect1'">
-              <a accesskey="n">
-                <xsl:attribute name="href">
-                  <xsl:call-template name="href.target">
-                    <xsl:with-param name="object" select="following-sibling::sect1[position()=2]"/>
-                  </xsl:call-template>
-                </xsl:attribute>
-                <xsl:attribute name="title">
-                  <xsl:value-of select="following-sibling::sect1[position()=2]/title"/>
-                </xsl:attribute>
-                <xsl:call-template name="navig.content">
-                  <xsl:with-param name="direction" select="'next'"/>
-                </xsl:call-template>
-              </a>
-              <p>
-                <xsl:value-of select="following-sibling::sect1[position()=2]/title"/>
-              </p>
-            </xsl:when>
-
-              <!-- Current page is chapter and next is a dummy sect1, link to the next one -->
-            <xsl:when test="$next[@role='dummy'] and local-name(.) = 'chapter'">
-              <a accesskey="n">
-                <xsl:attribute name="href">
-                  <xsl:call-template name="href.target">
-                    <xsl:with-param name="object" select="descendant::sect1[position()=2]"/>
-                  </xsl:call-template>
-                </xsl:attribute>
-                <xsl:attribute name="title">
-                  <xsl:value-of select="descendant::sect1[position()=2]/title"/>
-                </xsl:attribute>
-                <xsl:call-template name="navig.content">
-                  <xsl:with-param name="direction" select="'next'"/>
-                </xsl:call-template>
-              </a>
-              <p>
-                <xsl:value-of select="descendant::sect1[position()=2]/title"/>
-              </p>
-            </xsl:when>
-
-              <!-- Code for the "To Boot or To Chroot" CLFS links jumps. -->
-            <xsl:when test="$next[@id='chapter-chroot'] or $next[@id='chapter-boot']">
-              <a accesskey="n">
-                <xsl:attribute name="href">
-                  <xsl:call-template name="href.target">
-                    <xsl:with-param name="object" select="//part[@id='part5']"/>
-                  </xsl:call-template>
-                </xsl:attribute>
-                <xsl:attribute name="title">
-                  <xsl:value-of select="//part[@id='part5']/title"/>
-                </xsl:attribute>
-                <xsl:call-template name="navig.content">
-                  <xsl:with-param name="direction" select="'next'"/>
-                </xsl:call-template>
-              </a>
-              <p>
-                <xsl:value-of select="//part[@id='part5']/title"/>
-              </p>
-            </xsl:when>
-
-              <!-- Normal next links. Take care of Index gentext support. -->
-            <xsl:otherwise>
-              <a accesskey="n">
-                <xsl:attribute name="href">
-                  <xsl:call-template name="href.target">
-                    <xsl:with-param name="object" select="$next"/>
-                  </xsl:call-template>
-                </xsl:attribute>
-                <xsl:attribute name="title">
-                  <xsl:choose>
-                    <xsl:when test="local-name($next)='index'">
-                      <xsl:call-template name="gentext">
-                        <xsl:with-param name="key">Index</xsl:with-param>
-                      </xsl:call-template>
-                    </xsl:when>
-                    <xsl:otherwise>
-                      <xsl:value-of select="$next/title"/>
-                    </xsl:otherwise>
-                  </xsl:choose>
-                </xsl:attribute>
-                <xsl:call-template name="navig.content">
-                  <xsl:with-param name="direction" select="'next'"/>
-                </xsl:call-template>
-              </a>
-              <p>
-                <xsl:choose>
-                  <xsl:when test="local-name($next)='index'">
-                    <xsl:call-template name="gentext">
-                      <xsl:with-param name="key">Index</xsl:with-param>
-                    </xsl:call-template>
-                  </xsl:when>
-                  <xsl:otherwise>
-                    <xsl:value-of select="$next/title"/>
-                  </xsl:otherwise>
-                </xsl:choose>
-              </p>
-            </xsl:otherwise>
-          </xsl:choose>
-        </li>
-      </xsl:if>
-
-
-      <li class="up">
-        <xsl:choose>
-            <!-- Up link except if up is home -->
-          <xsl:when test="count($up)&gt;0 and $up != $home">
-            <a accesskey="u">
-              <xsl:attribute name="href">
-                <xsl:call-template name="href.target">
-                  <xsl:with-param name="object" select="$up"/>
-                </xsl:call-template>
-              </xsl:attribute>
-              <xsl:attribute name="title">
-                <xsl:apply-templates select="$up" mode="object.title.markup"/>
-              </xsl:attribute>
-              <xsl:call-template name="navig.content">
-                <xsl:with-param name="direction" select="'up'"/>
-              </xsl:call-template>
-            </a>
-          </xsl:when>
-            <!-- Hack to let the CSS code do its work when there is no up link -->
-          <xsl:otherwise>
-            <xsl:text>.</xsl:text>
-          </xsl:otherwise>
-        </xsl:choose>
-      </li>
-
-
-      <li class="home">
-        <xsl:choose>
-            <!-- No home link in home page -->
-          <xsl:when test="$home != .">
-            <a accesskey="h">
-              <xsl:attribute name="href">
-                <xsl:call-template name="href.target">
-                  <xsl:with-param name="object" select="$home"/>
-                </xsl:call-template>
-              </xsl:attribute>
-              <xsl:attribute name="title">
-                <xsl:value-of select="$home/bookinfo/title"/>
-                <xsl:text> - </xsl:text>
-                <xsl:value-of select="$home/bookinfo/subtitle"/>
-              </xsl:attribute>
-              <xsl:call-template name="navig.content">
-                <xsl:with-param name="direction" select="'home'"/>
-              </xsl:call-template>
-            </a>
-          </xsl:when>
-            <!-- Hack to let the CSS code do its work when there is no home link -->
-          <xsl:otherwise>
-            <xsl:text>.</xsl:text>
-          </xsl:otherwise>
-        </xsl:choose>
-      </li>
-    </ul>
-  </xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/xhtml/lfs-sections.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/xhtml/lfs-sections.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,165 +1,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<!--
-$LastChangedBy$
-$Date$
--->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns="http://www.w3.org/1999/xhtml"
-                version="1.0">
-
-  <!-- This stylesheet controls how preface, chapter, and sections are handled -->
-
-    <!-- Chunk the first top-level section? 1 = yes, 0 = no
-         If preface and chapters TOC are generated, this must be 1. -->
-  <xsl:param name="chunk.first.sections" select="1"/>
-
-    <!-- preface:
-           Output non sect1 child elements before the TOC -->
-    <!-- The original template is in {docbook-xsl}/xhtml/components.xsl -->
-  <xsl:template match="preface">
-    <xsl:call-template name="id.warning"/>
-    <div>
-      <xsl:apply-templates select="." mode="class.attribute"/>
-      <xsl:call-template name="dir">
-        <xsl:with-param name="inherit" select="1"/>
-      </xsl:call-template>
-      <xsl:call-template name="language.attribute"/>
-      <xsl:if test="$generate.id.attributes != 0">
-        <xsl:attribute name="id">
-          <xsl:call-template name="object.id"/>
-        </xsl:attribute>
-      </xsl:if>
-      <xsl:call-template name="component.separator"/>
-      <xsl:call-template name="preface.titlepage"/>
-      <xsl:apply-templates/>
-      <xsl:variable name="toc.params">
-        <xsl:call-template name="find.path.params">
-          <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:if test="contains($toc.params, 'toc')">
-        <xsl:call-template name="component.toc">
-          <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
-        </xsl:call-template>
-        <xsl:call-template name="component.toc.separator"/>
-      </xsl:if>
-      <xsl:call-template name="process.footnotes"/>
-    </div>
-  </xsl:template>
-
-    <!-- chapter:
-           Output non sect1 child elements before the TOC -->
-    <!-- The original template is in {docbook-xsl}/xhtml/components.xsl -->
-  <xsl:template match="chapter">
-    <xsl:call-template name="id.warning"/>
-    <div>
-      <xsl:apply-templates select="." mode="class.attribute"/>
-      <xsl:call-template name="dir">
-        <xsl:with-param name="inherit" select="1"/>
-      </xsl:call-template>
-      <xsl:call-template name="language.attribute"/>
-      <xsl:if test="$generate.id.attributes != 0">
-        <xsl:attribute name="id">
-          <xsl:call-template name="object.id"/>
-        </xsl:attribute>
-      </xsl:if>
-      <xsl:call-template name="component.separator"/>
-      <xsl:call-template name="chapter.titlepage"/>
-      <xsl:apply-templates/>
-      <xsl:variable name="toc.params">
-        <xsl:call-template name="find.path.params">
-          <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <xsl:if test="contains($toc.params, 'toc')">
-        <xsl:call-template name="component.toc">
-          <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
-        </xsl:call-template>
-        <xsl:call-template name="component.toc.separator"/>
-      </xsl:if>
-      <xsl:call-template name="process.footnotes"/>
-    </div>
-  </xsl:template>
-
-    <!-- sect1:
-           When there is a role attibute, use it as the class value.
-           Process the SVN keywords found in sect1info as a footnote.
-           Removed unused code. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/sections.xsl -->
-  <xsl:template match="sect1">
-    <div>
-      <xsl:choose>
-        <xsl:when test="@role">
-          <xsl:attribute name="class">
-            <xsl:value-of select="@role"/>
-          </xsl:attribute>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates select="." mode="class.attribute"/>
-        </xsl:otherwise>
-      </xsl:choose>
-      <xsl:call-template name="language.attribute"/>
-      <xsl:call-template name="sect1.titlepage"/>
-      <xsl:apply-templates/>
-      <xsl:apply-templates select="sect1info" mode="svn-keys"/>
-    </div>
-  </xsl:template>
-
-    <!-- sect2:
-           When there is a role attibute, use it as the class value.
-           Removed unused code. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/sections.xsl -->
-  <xsl:template match="sect2">
-    <div>
-      <xsl:choose>
-        <xsl:when test="@role">
-          <xsl:attribute name="class">
-            <xsl:value-of select="@role"/>
-          </xsl:attribute>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:attribute name="class">
-            <xsl:value-of select="name(.)"/>
-          </xsl:attribute>
-        </xsl:otherwise>
-      </xsl:choose>
-      <xsl:call-template name="language.attribute"/>
-      <xsl:call-template name="sect2.titlepage"/>
-      <xsl:apply-templates/>
-    </div>
-  </xsl:template>
-
-    <!-- sect1info mode svn-keys:
-           Self-made template to process SVN keywords found in sect1info. -->
-  <xsl:template match="sect1info" mode="svn-keys">
-    <p class="updated">Last updated <!-- by
-      <xsl:apply-templates select="othername" mode="svn-keys"/> -->
-      on
-      <xsl:apply-templates select="date" mode="svn-keys"/>
-    </p>
-  </xsl:template>
-
-    <!-- othername mode svn-keys:
-           Self-made template to process the $LastChangedBy SVN keyword. -->
-  <xsl:template match="othername" mode="svn-keys">
-    <xsl:variable name="author">
-      <xsl:value-of select="."/>
-    </xsl:variable>
-    <xsl:variable name="nameonly">
-      <xsl:value-of select="substring($author,16)"/>
-    </xsl:variable>
-    <xsl:value-of select="substring-before($nameonly,'$')"/>
-  </xsl:template>
-
-    <!-- date mode svn-keys:
-           Self-made template to process the $Date SVN keyword. -->
-  <xsl:template match="date" mode="svn-keys">
-    <xsl:variable name="date">
-      <xsl:value-of select="."/>
-    </xsl:variable>
-    <xsl:value-of select="substring($date,7,26)"/>
-  </xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/xhtml/lfs-titles.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/xhtml/lfs-titles.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,197 +1,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<!--
-$LastChangedBy$
-$Date$
--->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns="http://www.w3.org/1999/xhtml"
-                version="1.0">
-
-  <!-- This stylesheet controls the h* xhtml tags used for several titles -->
-
-    <!-- preface.titlepage:
-           Uses h1 and removed a lot of unneeded code.
-           No label in preface. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
-  <xsl:template name="preface.titlepage">
-    <h1 class="{name(.)}">
-      <xsl:if test="@id">
-        <a id="{@id}" name="{@id}"/>
-      </xsl:if>
-      <xsl:value-of select="title"/>
-    </h1>
-  </xsl:template>
-
-    <!-- part.titlepage:
-           Uses h1 and removed a lot of unneeded code.
-           When sections are not labeled, we want the part label in TOC
-           but not in titlepage. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
-  <xsl:template name="part.titlepage">
-    <h1 class="{name(.)}">
-      <xsl:if test="@id">
-        <a id="{@id}" name="{@id}"/>
-      </xsl:if>
-      <xsl:if test="$section.autolabel != 0">
-        <xsl:apply-templates select="." mode="label.markup"/>
-        <xsl:text>. </xsl:text>
-      </xsl:if>
-      <xsl:value-of select="title"/>
-    </h1>
-  </xsl:template>
-
-    <!-- partintro.titlepage:
-           Uses h2 and removed a lot of unneeded code. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
-  <xsl:template name="partintro.titlepage">
-    <xsl:if test="title">
-      <h2 class="{name(.)}">
-        <xsl:if test="@id">
-          <a id="{@id}" name="{@id}"/>
-        </xsl:if>
-        <xsl:value-of select="title"/>
-      </h2>
-    </xsl:if>
-  </xsl:template>
-
-    <!-- appendix.titlepage:
-           Uses h1 and removed a lot of unneeded code.
-           When sections are not labeled, we want the appendix label in TOC
-           but not in titlepage. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
-  <xsl:template name="appendix.titlepage">
-    <h1 class="{name(.)}">
-      <xsl:if test="@id">
-        <a id="{@id}" name="{@id}"/>
-      </xsl:if>
-      <xsl:if test="$section.autolabel != 0">
-        <xsl:apply-templates select="." mode="label.markup"/>
-        <xsl:text>. </xsl:text>
-      </xsl:if>
-      <xsl:value-of select="title"/>
-    </h1>
-  </xsl:template>
-
-    <!-- chapter.titlepage:
-           Uses h1 and removed a lot of unneeded code.
-           When sections are not labeled, we want the chapter label in TOC
-           but not in titlepage. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
-  <xsl:template name="chapter.titlepage">
-    <h1 class="{name(.)}">
-      <xsl:if test="@id">
-        <a id="{@id}" name="{@id}"/>
-      </xsl:if>
-      <xsl:if test="$section.autolabel != 0">
-        <xsl:apply-templates select="." mode="label.markup"/>
-        <xsl:text>. </xsl:text>
-      </xsl:if>
-      <xsl:value-of select="title"/>
-    </h1>
-  </xsl:template>
-
-    <!-- sect1.titlepage:
-           Uses h1 and removed a lot of unneeded code. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
-  <xsl:template name="sect1.titlepage">
-    <h1 class="{name(.)}">
-      <xsl:if test="@id">
-        <a id="{@id}" name="{@id}"/>
-      </xsl:if>
-      <xsl:if test="$section.autolabel != 0">
-        <xsl:apply-templates select="." mode="label.markup"/>
-        <xsl:text>. </xsl:text>
-      </xsl:if>
-      <xsl:value-of select="title"/>
-    </h1>
-  </xsl:template>
-
-    <!-- sect2.titlepage:
-           Uses h2 and removed a lot of unneeded code.
-           Skip empty titles.
-           No label in preface. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
-  <xsl:template name="sect2.titlepage">
-    <xsl:choose>
-      <xsl:when test="string-length(title) = 0"/>
-      <xsl:otherwise>
-        <h2 class="{name(.)}">
-          <xsl:if test="@id">
-            <a id="{@id}" name="{@id}"/>
-          </xsl:if>
-          <xsl:if test="not(ancestor::preface) and $section.autolabel != 0">
-            <xsl:apply-templates select="." mode="label.markup"/>
-            <xsl:text>. </xsl:text>
-          </xsl:if>
-          <xsl:value-of select="title"/>
-        </h2>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-    <!-- sect3.titlepage:
-           Uses h3 and removed a lot of unneeded code. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
-  <xsl:template name="sect3.titlepage">
-    <h3 class="{name(.)}">
-      <xsl:if test="@id">
-        <a id="{@id}" name="{@id}"/>
-      </xsl:if>
-      <xsl:if test="$section.autolabel != 0">
-        <xsl:apply-templates select="." mode="label.markup"/>
-        <xsl:text>. </xsl:text>
-      </xsl:if>
-      <xsl:value-of select="title"/>
-    </h3>
-  </xsl:template>
-
-    <!-- dedication.titlepage:
-           Uses h2 and removed a lot of unneeded code. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
-  <xsl:template name="dedication.titlepage">
-    <h2>
-      <xsl:value-of select="title"/>
-    </h2>
-  </xsl:template>
-
-    <!-- bridgehead:
-           We use always renderas attributes and want the output h* level
-           matching the defined sect* level.
-           Create the anchor only if there is an @id. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/sections.xsl -->
-  <xsl:template match="bridgehead">
-    <xsl:variable name="hlevel">
-      <xsl:choose>
-        <xsl:when test="@renderas = 'sect1'">1</xsl:when>
-        <xsl:when test="@renderas = 'sect2'">2</xsl:when>
-        <xsl:when test="@renderas = 'sect3'">3</xsl:when>
-        <xsl:when test="@renderas = 'sect4'">4</xsl:when>
-        <xsl:when test="@renderas = 'sect5'">5</xsl:when>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:element name="h{$hlevel}" namespace="http://www.w3.org/1999/xhtml">
-      <xsl:if test="@id">
-        <a id="{@id}" name="{@id}"/>
-      </xsl:if>
-      <xsl:apply-templates/>
-    </xsl:element>
-  </xsl:template>
-
-    <!-- book.titlepage.verso:
-           Process bookinfo/bibliosource from here. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
-  <xsl:template name="book.titlepage.verso">
-    <xsl:apply-templates select="bookinfo/bibliosource"/>
-  </xsl:template>
-
-    <!-- bookinfo/bibliosource:
-           Self-made template to handle bibliosource when inside bookinfo. -->
-  <xsl:template match="bookinfo/bibliosource">
-    <p class="copyright">
-      <xsl:apply-templates/>
-    </p>
-  </xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/xhtml/lfs-toc.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/xhtml/lfs-toc.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,194 +1,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<!--
-$LastChangedBy$
-$Date$
--->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns="http://www.w3.org/1999/xhtml"
-                version="1.0">
-
-  <!-- This stylesheet controls how the TOC are generated -->
-
-    <!-- make.toc:
-           Using h3 for TOC title.
-           Using ul for TOC list style.
-           Removed code for $manual.toc and $qanda.in.toc -->
-    <!-- The original template is in {docbook-xsl}/xhtml/autotoc.xsl -->
-  <xsl:template name="make.toc">
-    <xsl:param name="toc-context" select="."/>
-    <xsl:param name="nodes" select="/NOT-AN-ELEMENT"/>
-    <xsl:if test="$nodes">
-      <div class="toc">
-        <h3>
-          <xsl:call-template name="gentext">
-            <xsl:with-param name="key">TableofContents</xsl:with-param>
-          </xsl:call-template>
-        </h3>
-        <ul>
-          <xsl:apply-templates select="$nodes" mode="toc">
-            <xsl:with-param name="toc-context" select="$toc-context"/>
-          </xsl:apply-templates>
-        </ul>
-      </div>
-    </xsl:if>
-  </xsl:template>
-
-    <!-- subtoc:
-           Using ul for TOC list style.
-           Removed code for $qanda.in.toc
-           Removed code for sect* others than sect1 -->
-    <!-- The original template is in {docbook-xsl}/xhtml/autotoc.xsl -->
-  <xsl:template name="subtoc">
-    <xsl:param name="toc-context" select="."/>
-    <xsl:param name="nodes" select="NOT-AN-ELEMENT"/>
-    <xsl:variable name="subtoc">
-      <ul>
-        <xsl:apply-templates mode="toc" select="$nodes">
-          <xsl:with-param name="toc-context" select="$toc-context"/>
-        </xsl:apply-templates>
-      </ul>
-    </xsl:variable>
-    <xsl:variable name="depth">
-      <xsl:choose>
-        <xsl:when test="local-name(.) = 'sect1'">1</xsl:when>
-        <xsl:otherwise>0</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:variable name="depth.from.context"
-                  select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
-    <li class="{name(.)}">
-      <xsl:call-template name="toc.line">
-        <xsl:with-param name="toc-context" select="$toc-context"/>
-      </xsl:call-template>
-      <xsl:if test="$toc.section.depth &gt; $depth and count($nodes)&gt;0
-                    and $toc.max.depth &gt; $depth.from.context">
-        <xsl:copy-of select="$subtoc"/>
-      </xsl:if>
-    </li>
-  </xsl:template>
-
-    <!-- toc.line:
-           Adding the h* tags and dropping unneded links.
-           This template is a full re-made version of the original one. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/autotoc.xsl -->
-  <xsl:template name="toc.line">
-    <xsl:param name="toc-context" select="."/>
-    <xsl:choose>
-        <!-- For non dummy sect1 targets, create a link. -->
-      <xsl:when test="local-name(.) = 'sect1'">
-        <xsl:choose>
-          <xsl:when test="@role='dummy'">
-            <span class="dummy">
-              <xsl:apply-templates select="." mode="titleabbrev.markup"/>
-            </span>
-          </xsl:when>
-          <xsl:otherwise>
-            <a>
-              <xsl:attribute name="href">
-                <xsl:call-template name="href.target">
-                  <xsl:with-param name="context" select="$toc-context"/>
-                </xsl:call-template>
-              </xsl:attribute>
-              <xsl:apply-templates select="." mode="titleabbrev.markup"/>
-            </a>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:when>
-        <!-- For part, preface, and chapter, use hX and add the label.
-             For BLFS, make it a link. -->
-      <xsl:when test="local-name(.) = 'part' or local-name(.) = 'preface'
-                      or local-name(.) = 'chapter'">
-        <xsl:choose>
-          <xsl:when test="$book-type = 'blfs'">
-            <xsl:apply-templates select="." mode="add.hX">
-              <xsl:with-param name="toc-context" select="$toc-context"/>
-              <xsl:with-param name="with-link" select="1"/>
-            </xsl:apply-templates>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:apply-templates select="." mode="add.hX">
-              <xsl:with-param name="toc-context" select="$toc-context"/>
-              <xsl:with-param name="with-link" select="0"/>
-            </xsl:apply-templates>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:when>
-        <!-- For appendix , create a link and add the label.
-             For BLFS, use hX. -->
-      <xsl:when test="local-name(.) = 'appendix'">
-        <xsl:choose>
-          <xsl:when test="$book-type = 'blfs'">
-            <xsl:apply-templates select="." mode="add.hX">
-              <xsl:with-param name="toc-context" select="$toc-context"/>
-              <xsl:with-param name="with-link" select="1"/>
-            </xsl:apply-templates>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:apply-templates select="." mode="add.link">
-              <xsl:with-param name="toc-context" select="$toc-context"/>
-            </xsl:apply-templates>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:when>
-        <!-- For other targets like Index, use hX, create a link, and label it. -->
-      <xsl:otherwise>
-        <xsl:apply-templates select="." mode="add.hX">
-          <xsl:with-param name="toc-context" select="$toc-context"/>
-          <xsl:with-param name="with-link" select="1"/>
-        </xsl:apply-templates>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-    <!-- Self-made template to add hX tags to toc lines. -->
-  <xsl:template match="*" mode="add.hX">
-    <xsl:param name="toc-context" select="."/>
-    <xsl:param name="with-link" select="0"/>
-    <xsl:param name="hlevel">
-      <xsl:choose>
-        <xsl:when test="local-name(.)='chapter' or local-name(.)='preface'">4</xsl:when>
-        <xsl:otherwise>3</xsl:otherwise>
-      </xsl:choose>
-    </xsl:param>
-    <xsl:element name="h{$hlevel}" namespace="http://www.w3.org/1999/xhtml">
-      <xsl:choose>
-        <xsl:when test="$with-link != 0">
-          <xsl:apply-templates select="." mode="add.link">
-            <xsl:with-param name="toc-context" select="$toc-context"/>
-          </xsl:apply-templates>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates select="." mode="label.and.title"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:element>
-  </xsl:template>
-
-    <!-- Self-made template to made toc line a link. -->
-  <xsl:template match="*" mode="add.link">
-    <xsl:param name="toc-context" select="."/>
-    <a>
-      <xsl:attribute name="href">
-        <xsl:call-template name="href.target">
-          <xsl:with-param name="context" select="$toc-context"/>
-        </xsl:call-template>
-      </xsl:attribute>
-      <xsl:apply-templates select="." mode="label.and.title"/>
-    </a>
-  </xsl:template>
-
-    <!-- Self-made template to write the target title and label it. -->
-  <xsl:template match="*" mode="label.and.title">
-    <xsl:variable name="label">
-      <xsl:apply-templates select="." mode="label.markup"/>
-    </xsl:variable>
-    <xsl:copy-of select="$label"/>
-    <xsl:if test="$label != ''">
-      <xsl:value-of select="$autotoc.label.separator"/>
-    </xsl:if>
-    <xsl:apply-templates select="." mode="titleabbrev.markup"/>
-  </xsl:template>
-
-</xsl:stylesheet>
Index: OK/stylesheets/lfs-xsl/xhtml/lfs-xref.xsl
===================================================================
--- BOOK/stylesheets/lfs-xsl/xhtml/lfs-xref.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,142 +1,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<!--
-$LastChangedBy$
-$Date$
--->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:xlink="http://www.w3.org/1999/xlink"
-                xmlns="http://www.w3.org/1999/xhtml"
-                exclude-result-prefixes="xlink"
-                version="1.0">
-
-  <!-- This stylesheet fixes English punctuation in xref links
-       (as was requested by the publisher) via adding @role propagation
-       in xref tags.
-       This hack may not work with xref flavours not used in the book.
-       For other languages, just remove the xref @role attributes
-       in the book XML sources and/or comment-out the inclusion of
-       this file in lfs-chunked2.xsl -->
-
-    <!-- xref:
-           Added role variable and use it when calling mode xref-to.-->
-    <!-- The original template is in {docbook-xsl}/xhtml/xref.xsl -->
-  <xsl:template match="xref" name="xref">
-    <xsl:param name="xhref" select="@xlink:href"/>
-    <!-- is the @xlink:href a local idref link? -->
-    <xsl:param name="xlink.idref">
-      <xsl:if test="starts-with($xhref,'#') and (not(contains($xhref,'('))
-                    or starts-with($xhref, '#xpointer(id('))">
-        <xsl:call-template name="xpointer.idref">
-          <xsl:with-param name="xpointer" select="$xhref"/>
-        </xsl:call-template>
-      </xsl:if>
-    </xsl:param>
-    <xsl:param name="xlink.targets" select="key('id',$xlink.idref)"/>
-    <xsl:param name="linkend.targets" select="key('id',@linkend)"/>
-    <xsl:param name="target" select="($xlink.targets | $linkend.targets)[1]"/>
-      <!-- Added role variable -->
-    <xsl:variable name="role" select="@role"/>
-    <xsl:variable name="xrefstyle">
-      <xsl:choose>
-        <xsl:when test="@role and not(@xrefstyle) and $use.role.as.xrefstyle != 0">
-          <xsl:value-of select="@role"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="@xrefstyle"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:call-template name="anchor"/>
-    <xsl:variable name="content">
-      <xsl:choose>
-        <xsl:when test="@endterm">
-          <xsl:variable name="etargets" select="key('id',@endterm)"/>
-          <xsl:variable name="etarget" select="$etargets[1]"/>
-          <xsl:choose>
-            <xsl:when test="count($etarget) = 0">
-              <xsl:message>
-                <xsl:value-of select="count($etargets)"/>
-                <xsl:text>Endterm points to nonexistent ID: </xsl:text>
-                <xsl:value-of select="@endterm"/>
-              </xsl:message>
-              <xsl:text>???</xsl:text>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:apply-templates select="$etarget" mode="endterm"/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-        <xsl:when test="$target/@xreflabel">
-          <xsl:call-template name="xref.xreflabel">
-            <xsl:with-param name="target" select="$target"/>
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:when test="$target">
-          <xsl:if test="not(parent::citation)">
-            <xsl:apply-templates select="$target" mode="xref-to-prefix"/>
-          </xsl:if>
-          <xsl:apply-templates select="$target" mode="xref-to">
-            <xsl:with-param name="referrer" select="."/>
-            <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-             <!-- Propagate role -->
-            <xsl:with-param name="role" select="$role"/>
-          </xsl:apply-templates>
-          <xsl:if test="not(parent::citation)">
-            <xsl:apply-templates select="$target" mode="xref-to-suffix"/>
-          </xsl:if>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:message>
-            <xsl:text>ERROR: xref linking to </xsl:text>
-            <xsl:value-of select="@linkend|@xlink:href"/>
-            <xsl:text> has no generated link text.</xsl:text>
-          </xsl:message>
-          <xsl:text>???</xsl:text>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:call-template name="simple.xlink">
-      <xsl:with-param name="content" select="$content"/>
-    </xsl:call-template>
-  </xsl:template>
-
-    <!-- sect* mode xref-to:
-           Propagate role to mode object.xref.markup (see ../lfs-common.xsl) -->
-    <!-- The original template is in {docbook-xsl}/xhtml/xref.xsl -->
-  <xsl:template match="section|simplesect|sect1|sect2|sect3|sect4|sect5|refsect1
-                       |refsect2|refsect3|refsection" mode="xref-to">
-    <xsl:param name="referrer"/>
-    <xsl:param name="xrefstyle"/>
-    <xsl:param name="verbose" select="1"/>
-    <xsl:param name="role"/>
-    <xsl:apply-templates select="." mode="object.xref.markup">
-      <xsl:with-param name="purpose" select="'xref'"/>
-      <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
-      <xsl:with-param name="referrer" select="$referrer"/>
-      <xsl:with-param name="verbose" select="$verbose"/>
-      <xsl:with-param name="role" select="$role"/>
-    </xsl:apply-templates>
-  </xsl:template>
-
-    <!-- insert.title.markup:
-           Apply the role value. -->
-    <!-- The original template is in {docbook-xsl}/xhtml/xref.xsl -->
-  <xsl:template match="*" mode="insert.title.markup">
-    <xsl:param name="purpose"/>
-    <xsl:param name="xrefstyle"/>
-    <xsl:param name="title"/>
-    <xsl:param name="role"/>
-    <xsl:choose>
-      <xsl:when test="$purpose = 'xref' and titleabbrev">
-        <xsl:apply-templates select="." mode="titleabbrev.markup"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:copy-of select="$title"/>
-        <xsl:value-of select="$role"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-</xsl:stylesheet>
Index: BOOK/stylesheets/lfs.css
===================================================================
--- BOOK/stylesheets/lfs.css	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/stylesheets/lfs.css	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,412 @@
+/* Global settings */
+body {
+  font-family: sans-serif;
+  text-align: left;
+  background: #fff;
+  color: #333;
+  margin: 1em;
+  padding: 0;
+  font-size: 1em;
+  line-height: 1.2em
+}
+
+a:link { color: #22b; }
+a:visited { color: #7e4988; }
+a:hover, a:focus { color: #d30e08; }
+a:active { color: #6b77b1;}
+
+/* Headers */
+h1, h2, b, strong {
+  color: #000;
+  font-weight: bold;
+}
+
+h3, h4, h5, h6 {
+  color: #222;
+}
+
+h1 { font-size: 173%; text-align: center; line-height: 1.2em; }
+h2 { font-size: 144%; padding-top: 0.2em; margin-top: 0.3em; line-height: 1.2em; }
+h2.subtitle { text-align: center; line-height: 1.2em; }
+h3 { font-size: 120%; line-height: 1.2em; }
+h4 { font-size: 110%; line-height: 1.2em; }
+h5, h6 { font-size: 110%; font-style: italic; line-height: 1.2em; }
+
+/* Navigation */
+div.headertitles h4 {
+  margin-bottom: 2px;
+  text-align: center;
+}
+
+div.headertitles h3 {
+  margin-top: 2px;
+  text-align: center;
+}
+
+div.navheader, div.navfooter {
+  background: #ecedef;
+  padding: 0.1em 1em;
+  border-bottom: 1px solid #dbddec;
+}
+
+div.navfooter {
+  border-bottom: 0;
+  border-top: 1px solid #dbddec;
+}
+
+div.navheader ul, div.navfooter ul {
+  padding: .2em .5em .5em 0;
+  margin-left: 0px;
+  margin-right: 2px;
+  position: relative;
+  background: #dbddec;
+}
+
+div.navheader ul li, div.navfooter ul li {
+  display: inline;
+  width: 40%;
+}
+
+div.navheader ul li.prev, div.navfooter ul li.prev {
+  position: absolute;
+  display: block;
+  left: 0;
+  text-align: left;
+  padding: 0.2em 1em;
+  margin-left: 6px;
+}
+
+div.navheader ul li.next, div.navfooter ul li.next {
+  position: absolute;
+  display: block;
+  text-align: right;
+  right: 5px;
+  padding: 0.2em 0.5em;
+  margin-right: 7px;
+}
+
+div.navheader ul li.prev p, div.navfooter ul li.prev p,
+div.navheader ul li.next p, div.navfooter ul li.next p {
+  padding: 0;
+  margin: 1px 0px;
+}
+
+div.navheader ul li.home, div.navheader ul li.up,
+div.navfooter ul li.home, div.navfooter ul li.up {
+  text-align: center;
+  padding: 0;
+  margin: 0px auto;
+  display: block;
+  color: #dbddec;
+}
+
+/* TOC & Index*/
+
+div.toc ul, div.index ul, div.navheader ul, div.navfooter ul {
+  list-style: none;
+}
+
+div.toc, div.dedication {
+  padding-left: 1em;
+}
+
+li.preface, li.appendix {
+  margin-left: 1em;
+}
+
+div.toc ul li h3, div.toc ul li h4 {
+  margin: .4em;
+}
+
+.item {
+    width: 17em;
+    float: left;
+}
+
+.secitem {
+    font-weight: normal;
+    width: 16em;
+    float: left;
+}
+
+/* Admonitions */
+div.note, div.tip {
+  background-color: #fffff6;
+  border: 2px solid #dbddec;
+  width: 90%;
+  margin: .5em auto;
+}
+
+div.important, div.warning, div.caution {
+  background-color: #fffff6;
+  border: medium solid #400;
+  width: 90%;
+  margin: 1.5em auto;
+  color: #600;
+  font-size: larger;
+}
+
+div.important h3, div.warning h3, div.caution h3 {
+  color: #900;
+}
+
+div.admonhead img {
+  padding: .3em;
+}
+
+div.admonhead h3 {
+  display: inline;
+  margin-left: 1.5em;
+}
+
+div.admonbody {
+  margin: .5em;
+}
+
+div.important em, div.warning em, div.caution em {
+  color: #000;
+  font-weight: bold;
+}
+
+div.important tt, div.warning tt, div.caution tt {
+  font-weight: bold;
+}
+
+div.important tt.literal, div.warning tt.literal, div.caution tt.literal {
+  font-weight: normal;
+}
+
+/* variablelist & segmentedlist */
+dl {
+  margin: 0;
+  padding: 0;
+}
+
+dt {
+  display: list-item;
+  font-weight: bold;
+  margin: .33em 0 0 1em;
+  padding: 0;
+}
+
+dd  {
+  margin: 0 0 1em 3em;
+  padding: 0;
+}
+
+table {
+  width: auto;
+  margin-left: 1em;
+}
+
+td {
+  vertical-align: top;
+}
+
+td span, td p {
+  margin: 0.3em;
+}
+
+span.term {
+  display: block;
+}
+
+div.variablelist dd {
+  margin-bottom: 1em;
+}
+
+div.variablelist dd p {
+  margin-top: 0px;
+  margin-bottom: 0px;
+  padding-top: 0px;
+  padding-bottom: 0px;
+}
+
+div.materials dd {
+  margin-left: 0px;
+}
+
+div.package div.seg {
+  margin-bottom: 0em;
+  margin-top: 0em;
+  clear: left;
+}
+
+div.package span.segtitle, div.appendix span.segtitle {
+  float: left;
+}
+
+div.package span.seg, div.appendix span.seg {
+  display: block;
+  padding-left: 14em;
+}
+
+div.appendix div.segmentedlist {
+  padding-left: 1em;
+}
+
+div.appendix h2 {
+  font-size: 133%;
+  margin-top: 1em;
+  margin-bottom: 0.2em;
+}
+
+div.content div.seg {
+  margin-bottom: 1em;
+  margin-top: 1em;
+  clear: left;
+}
+
+div.content span.segtitle {
+  float: left;
+}
+
+div.content span.seg {
+  display: block;
+  padding-left: 12em;
+}
+
+/* itemizedlist */
+
+div.itemizedlist {
+  margin-left: 1em;
+}
+
+ul[compact="compact"] {
+  list-style: none;
+}
+
+ul[compact="compact"] li {
+  margin: 0em;
+  padding: 0em;
+}
+
+ul[compact="compact"] li p {
+  padding: 0.3em;
+  margin: 0em;
+}
+
+/*table */
+
+div.table {
+  text-align: center;
+}
+
+div.table table {
+  margin-left: auto;
+  margin-right: auto;
+  text-align: center;
+}
+
+div.table table th, div.table table td {
+  padding: 0.2em 2em 0.2em 2em;
+}
+
+/* Indented blocks */
+p, ul, dl, code, blockquote {
+  padding-left: 1em;
+}
+
+/* Monospaced elements */
+tt, code, kbd, pre, .command {
+  font-family: monospace;
+}
+
+tt.systemitem {
+  font-style: italic;
+}
+
+pre.userinput {
+  color: #101310;
+  background-color: #e5e5e5;
+  border: 1px solid #050505;
+  padding: .5em 1em;
+  margin: 0 2em;
+  font-weight: bold;
+}
+
+.literal {
+  font-weight: normal;
+}
+
+pre.screen {
+  color: #000;
+  background-color: #e9e9e9;
+  border: 1px solid #050505;
+  padding: .5em 1em;
+  margin: 0 2em;
+}
+
+/* Sections */
+div.wrap h1 {
+  background: #f5f6f7;
+  padding: 1em 0 0.5em 0;
+  margin: 0px auto;
+}
+
+div.package {
+  background: #f5f6f7;
+  border-bottom: 0.2em solid #dbddec;
+  padding: 0.5em 0.5em 0.3em 0.5em;
+  margin: 0px auto;
+}
+
+div.installation {
+  padding: 0 0.5em 0.3em 0.5em;
+  margin: 0.5em 0 0.5em 0;
+}
+
+div.configuration {
+  background:   #fefefe;
+  border-top: 0.2em solid #dbddec;
+  padding: 0.5em;
+  margin: 0.5em 0 .5em 0;
+}
+
+div.content {
+  background: #f5f6f7;
+  border-top: 0.2em solid #dbddec;
+  padding: 0.5em 0.5em 1em 0.5em;
+  margin: 0.5em 0 .5em 0;
+}
+
+div.installation h2, div.content h2 {
+  padding-top: 0.3em;
+  margin: 0;
+}
+
+div.book, div.preface, div.part, div.chapter, div.sect1, div.appendix, div.index {
+  padding-bottom: 0.5em;
+}
+
+div.preface h1, div.part h1, div.chapter h1, div.sect1 h1, div.appendix h1, div.index h1 {
+  background: #f5f6f7;
+  border-bottom: .1em solid #dbddec;
+  margin: 0px auto;
+  padding: .5em;
+}
+
+div.book h1 {
+  background: #f5f6f7;
+  margin: 0px auto;
+  padding: 0.5em;
+}
+
+div.book h2.subtitle {
+  background: #dbddec;
+  margin: 0px auto;
+  padding: 0.2em;
+}
+div.authorgroup, div p.copyright, div.abstract {
+  background: #f5f6f7;
+  margin: 0px auto;
+  padding:  1em 0.5em;
+}
+
+hr {
+  background: #dbddec;
+  height: .3em;
+  border: 0px;
+  margin: 0px auto;
+  padding: 0;
+}
Index: BOOK/stylesheets/pdf/lfs-admon.xsl
===================================================================
--- BOOK/stylesheets/pdf/lfs-admon.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/stylesheets/pdf/lfs-admon.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,95 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version="1.0">
+
+
+    <!-- Graphics in admonitions -->
+  <xsl:param name="admon.graphics" select="1"/>
+  <xsl:param name="admon.graphics.path"
+    select="'/usr/share/xml/docbook/xsl-stylesheets-1.69.1/images/'"/>
+
+    <!-- Admonition block properties -->
+  <xsl:template match="important|warning|caution">
+    <xsl:choose>
+      <xsl:when test="$admon.graphics != 0">
+        <fo:block space-before.minimum="0.4em" space-before.optimum="0.6em"
+              space-before.maximum="0.8em" border-style="solid" border-width="1pt"
+              border-color="#500" background-color="#FFFFE6">
+        <xsl:call-template name="graphical.admonition"/>
+        </fo:block>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="nongraphical.admonition"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template match="note|tip">
+    <xsl:choose>
+      <xsl:when test="$admon.graphics != 0">
+        <fo:block space-before.minimum="0.4em" space-before.optimum="0.6em"
+              space-before.maximum="0.8em" border-style="solid" border-width="1pt"
+              border-color="#E0E0E0" background-color="#FFFFE6">
+        <xsl:call-template name="graphical.admonition"/>
+        </fo:block>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="nongraphical.admonition"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+    <!-- Admonitions text properties -->
+  <xsl:attribute-set name="admonition.properties">
+    <xsl:attribute name="margin-right">6pt</xsl:attribute>
+  </xsl:attribute-set>
+
+    <!-- Adding left space to the graphics and color to the titles -->
+  <xsl:template name="graphical.admonition">
+    <xsl:variable name="id">
+      <xsl:call-template name="object.id"/>
+    </xsl:variable>
+    <xsl:variable name="graphic.width">
+     <xsl:apply-templates select="." mode="admon.graphic.width"/>
+    </xsl:variable>
+    <fo:block id="{$id}">
+      <fo:list-block provisional-distance-between-starts="{$graphic.width} + 18pt"
+              provisional-label-separation="18pt" xsl:use-attribute-sets="list.block.spacing">
+        <fo:list-item>
+            <fo:list-item-label end-indent="label-end()">
+              <fo:block margin-left="18pt">
+                <fo:external-graphic width="auto" height="auto"
+                        content-width="{$graphic.width}" >
+                  <xsl:attribute name="src">
+                    <xsl:call-template name="admon.graphic"/>
+                  </xsl:attribute>
+                </fo:external-graphic>
+              </fo:block>
+            </fo:list-item-label>
+            <fo:list-item-body start-indent="body-start()">
+              <xsl:if test="$admon.textlabel != 0 or title">
+                <fo:block xsl:use-attribute-sets="admonition.title.properties">
+                  <xsl:if test="ancestor-or-self::important">
+                    <xsl:attribute name="color">#500</xsl:attribute>
+                  </xsl:if>
+                  <xsl:if test="ancestor-or-self::warning">
+                    <xsl:attribute name="color">#500</xsl:attribute>
+                  </xsl:if>
+                  <xsl:if test="ancestor-or-self::caution">
+                    <xsl:attribute name="color">#500</xsl:attribute>
+                  </xsl:if>
+                  <xsl:apply-templates select="." mode="object.title.markup"/>
+                </fo:block>
+              </xsl:if>
+              <fo:block xsl:use-attribute-sets="admonition.properties">
+                <xsl:apply-templates/>
+              </fo:block>
+            </fo:list-item-body>
+        </fo:list-item>
+      </fo:list-block>
+    </fo:block>
+  </xsl:template>
+
+</xsl:stylesheet>
Index: BOOK/stylesheets/pdf/lfs-index.xsl
===================================================================
--- BOOK/stylesheets/pdf/lfs-index.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/stylesheets/pdf/lfs-index.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,147 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY lowercase "'abcdefghijklmnopqrstuvwxyz'">
+<!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'">
+<!ENTITY primary   'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'>
+<!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node())'>
+]>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version="1.0">
+
+    <!--Title-->
+  <xsl:template match="index" mode="title.markup">
+    <xsl:param name="allow-anchors" select="0"/>
+    <xsl:call-template name="gentext">
+      <xsl:with-param name="key">Index</xsl:with-param>
+    </xsl:call-template>
+  </xsl:template>
+
+    <!-- Divisions-->
+  <xsl:template match="indexterm" mode="index-div">
+    <xsl:param name="scope" select="."/>
+    <xsl:variable name="key"
+                  select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/>
+    <xsl:variable name="divtitle" select="translate($key, &lowercase;, &uppercase;)"/>
+    <xsl:if test="key('letter', $key)[&scope;]
+                  [count(.|key('primary', &primary;)[&scope;][1]) = 1]">
+      <fo:block>
+        <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)">
+          <xsl:call-template name="indexdiv.title">
+            <xsl:with-param name="titlecontent">
+              <xsl:choose>
+                <xsl:when test="$divtitle = 'A'">
+                  <xsl:call-template name="gentext">
+                    <xsl:with-param name="key">Packages</xsl:with-param>
+                  </xsl:call-template>
+                </xsl:when>
+                <xsl:when test="$divtitle = 'B'">
+                  <xsl:call-template name="gentext">
+                    <xsl:with-param name="key">Programs</xsl:with-param>
+                  </xsl:call-template>
+                </xsl:when>
+                <xsl:when test="$divtitle = 'C'">
+                  <xsl:call-template name="gentext">
+                    <xsl:with-param name="key">Libraries</xsl:with-param>
+                  </xsl:call-template>
+                </xsl:when>
+                <xsl:when test="$divtitle = 'D'">
+                  <xsl:call-template name="gentext">
+                    <xsl:with-param name="key">Scripts</xsl:with-param>
+                  </xsl:call-template>
+                </xsl:when>
+                <xsl:when test="$divtitle = 'E'">
+                  <xsl:call-template name="gentext">
+                    <xsl:with-param name="key">Others</xsl:with-param>
+                  </xsl:call-template>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:value-of select="$divtitle"/>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:with-param>
+          </xsl:call-template>
+        </xsl:if>
+        <fo:block>
+          <xsl:apply-templates select="key('letter', $key)[&scope;]
+                                      [count(.|key('primary', &primary;)[&scope;][1])=1]"
+                              mode="index-primary">
+            <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
+            <xsl:with-param name="scope" select="$scope"/>
+          </xsl:apply-templates>
+        </fo:block>
+      </fo:block>
+    </xsl:if>
+  </xsl:template>
+
+    <!-- The separator -->
+  <xsl:template match="indexterm" mode="reference">
+    <xsl:param name="scope" select="."/>
+    <xsl:text>:   </xsl:text>
+      <xsl:call-template name="reference">
+        <xsl:with-param name="zones" select="normalize-space(@zone)"/>
+        <xsl:with-param name="scope" select="$scope"/>
+      </xsl:call-template>
+  </xsl:template>
+
+    <!--Bookmarks-->
+  <xsl:template name="reference">
+    <xsl:param name="scope" select="."/>
+    <xsl:param name="zones"/>
+    <xsl:choose>
+      <xsl:when test="contains($zones, ' ')">
+        <xsl:variable name="zone" select="substring-before($zones, ' ')"/>
+        <xsl:variable name="zone2" select="substring-after($zones, ' ')"/>
+        <xsl:variable name="target" select="key('id', $zone)[&scope;]"/>
+        <xsl:variable name="target2" select="key('id', $zone2)[&scope;]"/>
+        <xsl:variable name="id">
+          <xsl:call-template name="object.id">
+            <xsl:with-param name="object" select="$target[1]"/>
+          </xsl:call-template>
+        </xsl:variable>
+        <xsl:variable name="id2">
+          <xsl:call-template name="object.id">
+            <xsl:with-param name="object" select="$target2[1]"/>
+          </xsl:call-template>
+        </xsl:variable>
+        <fo:basic-link internal-destination="{$id}">
+          <xsl:apply-templates select="$target" mode="page.citation">
+            <xsl:with-param name="id" select="$id"/>
+          </xsl:apply-templates>
+        </fo:basic-link>
+          <xsl:text> ,  </xsl:text>
+        <fo:basic-link internal-destination="{$id2}">
+          <xsl:apply-templates select="$target2" mode="page.citation">
+            <xsl:with-param name="id" select="$id2"/>
+          </xsl:apply-templates>
+        </fo:basic-link>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:variable name="zone" select="$zones"/>
+        <xsl:variable name="target" select="key('id', $zone)[&scope;]"/>
+        <xsl:variable name="id">
+          <xsl:call-template name="object.id">
+            <xsl:with-param name="object" select="$target[1]"/>
+          </xsl:call-template>
+        </xsl:variable>
+        <fo:basic-link internal-destination="{$id}">
+          <xsl:apply-templates select="$target" mode="page.citation">
+            <xsl:with-param name="id" select="$id"/>
+          </xsl:apply-templates>
+        </fo:basic-link>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+    <!-- Page number in Index-->
+  <xsl:template match="*" mode="page.citation">
+    <xsl:param name="id" select="'???'"/>
+    <fo:inline keep-together.within-line="always">
+      <!--<xsl:text>[p</xsl:text>-->
+      <fo:page-number-citation ref-id="{$id}"/>
+      <!--<xsl:text>]</xsl:text>-->
+    </fo:inline>
+  </xsl:template>
+
+</xsl:stylesheet>
Index: BOOK/stylesheets/pdf/lfs-mixed.xsl
===================================================================
--- BOOK/stylesheets/pdf/lfs-mixed.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/stylesheets/pdf/lfs-mixed.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,257 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version="1.0">
+
+
+    <!-- This is a hack and isn't correct semantically. Theoretically, the beginpage
+      tags should be placed in the XML source only to render the PDF output and
+      should be removed after it. But there is no a better way and we need this.-->
+  <xsl:template match="beginpage">
+    <fo:block break-after="page"/>
+  </xsl:template>
+
+    <!-- Allow forced line breaks inside paragraphs emulating literallayout
+    and to remove vertical space in pachages and patches pages. -->
+ <xsl:template match="para">
+    <xsl:choose>
+      <xsl:when test="./@remap='verbatim'">
+        <fo:block wrap-option="no-wrap"
+                    white-space-collapse="false"
+                    white-space-treatment="preserve"
+                    text-align="start"
+                    linefeed-treatment="preserve">
+          <xsl:call-template name="anchor"/>
+          <xsl:apply-templates/>
+        </fo:block>
+      </xsl:when>
+      <xsl:when test="ancestor::variablelist/@role = 'materials'">
+        <fo:block>
+          <xsl:attribute name="space-before.optimum">0.1em</xsl:attribute>
+          <xsl:attribute name="space-before.minimum">0em</xsl:attribute>
+          <xsl:attribute name="space-before.maximum">0.2em</xsl:attribute>
+          <xsl:call-template name="anchor"/>
+          <xsl:apply-templates/>
+        </fo:block>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:apply-imports/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+    <!-- Show URLs in italic font -->
+  <xsl:template match="ulink" name="ulink">
+    <fo:inline font-style="italic">
+      <fo:basic-link xsl:use-attribute-sets="xref.properties">
+        <xsl:attribute name="external-destination">
+          <xsl:call-template name="fo-external-image">
+            <xsl:with-param name="filename" select="@url"/>
+          </xsl:call-template>
+        </xsl:attribute>
+        <xsl:choose>
+          <xsl:when test="count(child::node())=0">
+            <xsl:call-template name="hyphenate-url">
+              <xsl:with-param name="url" select="@url"/>
+            </xsl:call-template>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:apply-templates/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </fo:basic-link>
+    </fo:inline>
+    <xsl:if test="count(child::node()) != 0
+                  and string(.) != @url
+                  and $ulink.show != 0">
+      <!-- yes, show the URI -->
+      <xsl:choose>
+        <xsl:when test="$ulink.footnotes != 0 and not(ancestor::footnote)">
+          <xsl:text>&#xA0;</xsl:text>
+          <fo:footnote>
+            <xsl:call-template name="ulink.footnote.number"/>
+            <fo:footnote-body font-family="{$body.fontset}"
+                              font-size="{$footnote.font.size}">
+              <fo:block>
+                <xsl:call-template name="ulink.footnote.number"/>
+                <xsl:text> </xsl:text>
+                <fo:inline>
+                  <xsl:value-of select="@url"/>
+                </fo:inline>
+              </fo:block>
+            </fo:footnote-body>
+          </fo:footnote>
+        </xsl:when>
+        <xsl:otherwise>
+          <fo:inline hyphenate="false">
+            <xsl:text> [</xsl:text>
+            <xsl:call-template name="hyphenate-url">
+              <xsl:with-param name="url" select="@url"/>
+            </xsl:call-template>
+            <xsl:text>]</xsl:text>
+          </fo:inline>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:if>
+  </xsl:template>
+
+    <!-- Split URLs (obsolete, keeped as reference) -->
+  <!--<xsl:template name="hyphenate-url">
+    <xsl:param name="url" select="''"/>
+    <xsl:choose>
+      <xsl:when test="ancestor::varlistentry">
+        <xsl:choose>
+          <xsl:when test="string-length($url) > 90">
+            <xsl:value-of select="substring($url, 1, 50)"/>
+            <xsl:param name="rest" select="substring($url, 51)"/>
+            <xsl:value-of select="substring-before($rest, '/')"/>
+            <xsl:text> /</xsl:text>
+            <xsl:value-of select="substring-after($rest, '/')"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$url"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$url"/>-->
+      <!--  <xsl:value-of select="substring-before($url, '//')"/>
+        <xsl:text>// </xsl:text>
+        <xsl:call-template name="split-url">
+          <xsl:with-param name="url2" select="substring-after($url, '//')"/>
+        </xsl:call-template>-->
+     <!-- </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>-->
+
+  <!--<xsl:template name="split-url">
+    <xsl:choose>
+      <xsl:when test="contains($url2, '/')">
+      <xsl:param name="url2" select="''"/>
+      <xsl:value-of select="substring-before($url2, '/')"/>
+      <xsl:text> /</xsl:text>
+      <xsl:call-template name="split-url">
+        <xsl:with-param name="url2" select="substring-after($url2, '/')"/>
+      </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$url2"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>-->
+
+    <!-- Shade screen -->
+  <xsl:param name="shade.verbatim" select="1"/>
+
+    <!-- How is rendered by default a variablelist -->
+  <xsl:param name="variablelist.as.blocks" select="1"/>
+  <xsl:param name="variablelist.max.termlength">32</xsl:param>
+
+    <!-- Adding space before segmentedlist -->
+  <xsl:template match="segmentedlist">
+    <!--<xsl:variable name="presentation">
+      <xsl:call-template name="pi-attribute">
+        <xsl:with-param name="pis"
+                        select="processing-instruction('dbfo')"/>
+        <xsl:with-param name="attribute" select="'list-presentation'"/>
+      </xsl:call-template>
+    </xsl:variable>
+    <xsl:choose>
+      <xsl:when test="$presentation = 'table'">
+        <xsl:apply-templates select="." mode="seglist-table"/>
+      </xsl:when>
+      <xsl:when test="$presentation = 'list'">
+        <fo:block space-before.minimum="0.4em" space-before.optimum="0.6em"
+                space-before.maximum="0.8em">
+          <xsl:apply-templates/>
+        </fo:block>
+      </xsl:when>
+      <xsl:when test="$segmentedlist.as.table != 0">
+        <xsl:apply-templates select="." mode="seglist-table"/>
+      </xsl:when>
+      <xsl:otherwise>-->
+        <fo:block space-before.minimum="0.4em" space-before.optimum="0.6em"
+                space-before.maximum="0.8em">
+          <xsl:apply-templates/>
+        </fo:block>
+      <!--</xsl:otherwise>
+    </xsl:choose>-->
+  </xsl:template>
+
+    <!-- Presentation of literal tag -->
+  <xsl:template match="literal">
+    <fo:inline  font-weight="normal">
+      <xsl:call-template name="inline.monoseq"/>
+    </fo:inline>
+  </xsl:template>
+
+    <!-- Left alingnament for itemizedlist -->
+  <xsl:template match="itemizedlist">
+    <xsl:variable name="id">
+      <xsl:call-template name="object.id"/>
+    </xsl:variable>
+    <xsl:variable name="label-width">
+      <xsl:call-template name="dbfo-attribute">
+        <xsl:with-param name="pis"
+                        select="processing-instruction('dbfo')"/>
+        <xsl:with-param name="attribute" select="'label-width'"/>
+      </xsl:call-template>
+    </xsl:variable>
+    <xsl:if test="title">
+      <xsl:apply-templates select="title" mode="list.title.mode"/>
+    </xsl:if>
+    <!-- Preserve order of PIs and comments -->
+    <xsl:apply-templates
+        select="*[not(self::listitem
+                  or self::title
+                  or self::titleabbrev)]
+                |comment()[not(preceding-sibling::listitem)]
+                |processing-instruction()[not(preceding-sibling::listitem)]"/>
+    <fo:list-block id="{$id}" xsl:use-attribute-sets="list.block.spacing"
+                  provisional-label-separation="0.2em" text-align="left">
+      <xsl:attribute name="provisional-distance-between-starts">
+        <xsl:choose>
+          <xsl:when test="$label-width != ''">
+            <xsl:value-of select="$label-width"/>
+          </xsl:when>
+          <xsl:otherwise>1.5em</xsl:otherwise>
+        </xsl:choose>
+      </xsl:attribute>
+      <xsl:apply-templates
+            select="listitem
+                    |comment()[preceding-sibling::listitem]
+                    |processing-instruction()[preceding-sibling::listitem]"/>
+    </fo:list-block>
+  </xsl:template>
+
+    <!-- Addibg a bullet, and left alignament, for packages and paches list. -->
+
+  <xsl:template match="varlistentry" mode="vl.as.blocks">
+    <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+    <xsl:choose>
+      <xsl:when test="ancestor::variablelist/@role = 'materials'">
+        <fo:block id="{$id}" xsl:use-attribute-sets="list.item.spacing"
+            keep-together.within-column="always"
+            keep-with-next.within-column="always" text-align="left">
+          <xsl:text>&#x2022;   </xsl:text>
+          <xsl:apply-templates select="term"/>
+        </fo:block>
+        <fo:block margin-left="1.4pc" text-align="left">
+          <xsl:apply-templates select="listitem"/>
+        </fo:block>
+      </xsl:when>
+      <xsl:otherwise>
+        <fo:block id="{$id}" xsl:use-attribute-sets="list.item.spacing"
+            keep-together.within-column="always"
+            keep-with-next.within-column="always">
+          <xsl:apply-templates select="term"/>
+        </fo:block>
+        <fo:block margin-left="0.25in">
+          <xsl:apply-templates select="listitem"/>
+        </fo:block>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+</xsl:stylesheet>
Index: BOOK/stylesheets/pdf/lfs-pagesetup.xsl
===================================================================
--- BOOK/stylesheets/pdf/lfs-pagesetup.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/stylesheets/pdf/lfs-pagesetup.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,116 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version="1.0">
+
+    <!-- Header -->
+  <xsl:template name="header.content">
+    <xsl:param name="sequence" select="''"/>
+    <fo:block>
+      <xsl:attribute name="text-align">
+        <xsl:choose>
+          <xsl:when test="$sequence = 'first' or $sequence = 'odd'">right</xsl:when>
+          <xsl:otherwise>left</xsl:otherwise>
+        </xsl:choose>
+      </xsl:attribute>
+      <xsl:value-of select="/book/bookinfo/title"/>
+      <xsl:text> - </xsl:text>
+      <xsl:value-of select="/book/bookinfo/subtitle"/>
+    </fo:block>
+  </xsl:template>
+
+  <xsl:template name="header.table">
+    <xsl:param name="sequence" select="''"/>
+    <xsl:param name="gentext-key" select="''"/>
+    <xsl:choose>
+      <xsl:when test="$gentext-key = 'book' or $sequence = 'blank'"/>
+      <xsl:otherwise>
+        <xsl:call-template name="header.content">
+          <xsl:with-param name="sequence" select="$sequence"/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+    <!-- Centered titles for book and part -->
+  <xsl:template name="book.titlepage">
+    <fo:block space-before="2in">
+      <fo:block>
+        <xsl:call-template name="book.titlepage.before.recto"/>
+        <xsl:call-template name="book.titlepage.recto"/>
+      </fo:block>
+      <fo:block>
+        <xsl:call-template name="book.titlepage.before.verso"/>
+        <xsl:call-template name="book.titlepage.verso"/>
+      </fo:block>
+      <xsl:call-template name="book.titlepage.separator"/>
+    </fo:block>
+  </xsl:template>
+
+  <xsl:template name="part.titlepage">
+    <fo:block>
+      <fo:block space-before="2.5in">
+        <xsl:call-template name="part.titlepage.before.recto"/>
+        <xsl:call-template name="part.titlepage.recto"/>
+      </fo:block>
+      <fo:block>
+        <xsl:call-template name="part.titlepage.before.verso"/>
+        <xsl:call-template name="part.titlepage.verso"/>
+      </fo:block>
+      <xsl:call-template name="part.titlepage.separator"/>
+    </fo:block>
+  </xsl:template>
+
+    <!-- Font size for chapter title. -->
+  <xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">
+    <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"
+            xsl:use-attribute-sets="chapter.titlepage.recto.style"
+            font-size="21pt" font-weight="bold" text-align="left">
+      <xsl:call-template name="component.title">
+        <xsl:with-param name="node" select="ancestor-or-self::chapter[1]"/>
+      </xsl:call-template>
+    </fo:block>
+  </xsl:template>
+
+    <!-- Margins -->
+  <xsl:param name="page.margin.inner">0.5in</xsl:param>
+  <xsl:param name="page.margin.outer">0.375in</xsl:param>
+  <xsl:param name="body.start.indent" select="'0.7pc'"/>
+  <xsl:param name="title.margin.left">-0.7pc</xsl:param>
+  <xsl:attribute-set name="normal.para.spacing">
+    <xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
+    <xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
+    <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
+  </xsl:attribute-set>
+  <xsl:attribute-set name="list.block.spacing">
+    <xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
+    <xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
+    <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
+    <xsl:attribute name="space-after.optimum">0.6em</xsl:attribute>
+    <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute>
+    <xsl:attribute name="space-after.maximum">0.8em</xsl:attribute>
+  </xsl:attribute-set>
+  <xsl:attribute-set name="list.item.spacing">
+    <xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
+    <xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
+    <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
+  </xsl:attribute-set>
+  <xsl:attribute-set name="verbatim.properties">
+    <xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
+    <xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
+    <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
+    <xsl:attribute name="space-after.optimum">0.6em</xsl:attribute>
+    <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute>
+    <xsl:attribute name="space-after.maximum">0.8em</xsl:attribute>
+  </xsl:attribute-set>
+
+    <!-- Others-->
+  <xsl:param name="header.rule" select="0"></xsl:param>
+  <xsl:param name="footer.rule" select="0"></xsl:param>
+  <xsl:param name="marker.section.level" select="-1"></xsl:param>
+
+    <!-- Dropping a blank page -->
+  <xsl:template name="book.titlepage.separator"/>
+
+</xsl:stylesheet>
Index: BOOK/stylesheets/pdf/lfs-sections.xsl
===================================================================
--- BOOK/stylesheets/pdf/lfs-sections.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/stylesheets/pdf/lfs-sections.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,100 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version="1.0">
+
+     <!-- Force section1's onto a new page -->
+  <xsl:attribute-set name="section.level1.properties">
+    <xsl:attribute name="break-after">
+      <xsl:choose>
+        <xsl:when test="not(position()=last())">
+          <xsl:text>page</xsl:text>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:text>auto</xsl:text>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:attribute>
+  </xsl:attribute-set>
+
+    <!-- Sections numbering -->
+  <xsl:param name="section.autolabel" select="1"/>
+  <xsl:param name="section.label.includes.component.label" select="1"/>
+
+    <!-- Skip numeraration for sections with empty title -->
+  <xsl:template match="sect2|sect3|sect4|sect5" mode="label.markup">
+    <xsl:if test="string-length(title) > 0">
+      <!-- label the parent -->
+      <xsl:variable name="parent.label">
+        <xsl:apply-templates select=".." mode="label.markup"/>
+      </xsl:variable>
+      <xsl:if test="$parent.label != ''">
+        <xsl:apply-templates select=".." mode="label.markup"/>
+      <xsl:apply-templates select=".." mode="intralabel.punctuation"/>
+      </xsl:if>
+      <xsl:choose>
+        <xsl:when test="@label">
+          <xsl:value-of select="@label"/>
+        </xsl:when>
+        <xsl:when test="$section.autolabel != 0">
+          <xsl:choose>
+            <xsl:when test="local-name(.) = 'sect2'">
+              <xsl:choose>
+                <!-- If the first sect2 isn't numbered, renumber the remainig sections -->
+                <xsl:when test="string-length(../sect2[1]/title) = 0">
+                  <xsl:variable name="totalsect2">
+                    <xsl:number count="sect2"/>
+                  </xsl:variable>
+                  <xsl:number value="$totalsect2 - 1"/>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:number count="sect2"/>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:when>
+            <xsl:when test="local-name(.) = 'sect3'">
+              <xsl:number count="sect3"/>
+            </xsl:when>
+            <xsl:when test="local-name(.) = 'sect4'">
+              <xsl:number count="sect4"/>
+            </xsl:when>
+            <xsl:when test="local-name(.) = 'sect5'">
+              <xsl:number count="sect5"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:message>label.markup: this can't happen!</xsl:message>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:when>
+      </xsl:choose>
+    </xsl:if>
+  </xsl:template>
+
+  <!-- Drop the trailing punctuation if title is empty -->
+  <xsl:template match="section|sect1|sect2|sect3|sect4|sect5|simplesect
+                      |bridgehead"
+                mode="object.title.template">
+    <xsl:choose>
+      <xsl:when test="$section.autolabel != 0">
+        <xsl:if test="string-length(title) > 0">
+          <xsl:call-template name="gentext.template">
+            <xsl:with-param name="context" select="'title-numbered'"/>
+            <xsl:with-param name="name">
+              <xsl:call-template name="xpath.location"/>
+            </xsl:with-param>
+          </xsl:call-template>
+        </xsl:if>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="gentext.template">
+          <xsl:with-param name="context" select="'title-unnumbered'"/>
+          <xsl:with-param name="name">
+            <xsl:call-template name="xpath.location"/>
+          </xsl:with-param>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+</xsl:stylesheet>
Index: BOOK/stylesheets/pdf/lfs-xref.xsl
===================================================================
--- BOOK/stylesheets/pdf/lfs-xref.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/stylesheets/pdf/lfs-xref.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,283 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version="1.0">
+
+     <!-- Making a proper punctuation in xref (only for English language).-->
+  <xsl:template match="xref" name="xref">
+    <xsl:variable name="targets" select="key('id',@linkend)"/>
+    <xsl:variable name="target" select="$targets[1]"/>
+    <xsl:variable name="refelem" select="local-name($target)"/>
+    <xsl:variable name="role" select="@role"/>
+    <xsl:call-template name="check.id.unique">
+      <xsl:with-param name="linkend" select="@linkend"/>
+    </xsl:call-template>
+    <xsl:choose>
+      <xsl:when test="$refelem=''">
+        <xsl:message>
+          <xsl:text>XRef to nonexistent id: </xsl:text>
+          <xsl:value-of select="@linkend"/>
+        </xsl:message>
+        <xsl:text>???</xsl:text>
+      </xsl:when>
+      <xsl:when test="$target/@xreflabel">
+        <fo:basic-link internal-destination="{@linkend}"
+                      xsl:use-attribute-sets="xref.properties">
+          <xsl:call-template name="xref.xreflabel">
+            <xsl:with-param name="target" select="$target"/>
+          </xsl:call-template>
+        </fo:basic-link>
+      </xsl:when>
+      <xsl:otherwise>
+        <fo:basic-link internal-destination="{@linkend}"
+                      xsl:use-attribute-sets="xref.properties">
+          <xsl:apply-templates select="$target" mode="xref-to">
+            <xsl:with-param name="referrer" select="."/>
+            <xsl:with-param name="role" select="$role"/>
+            <xsl:with-param name="xrefstyle">
+              <xsl:value-of select="@xrefstyle"/>
+            </xsl:with-param>
+          </xsl:apply-templates>
+        </fo:basic-link>
+      </xsl:otherwise>
+    </xsl:choose>
+    <!-- Add standard page reference? -->
+    <xsl:if test="not(starts-with(normalize-space(@xrefstyle), 'select:') != ''
+                  and (contains(@xrefstyle, 'page')
+                      or contains(@xrefstyle, 'Page')))
+                  and ( $insert.xref.page.number = 'yes'
+        or $insert.xref.page.number = '1')
+                  or local-name($target) = 'para'">
+      <fo:basic-link internal-destination="{@linkend}"
+                    xsl:use-attribute-sets="xref.properties">
+        <xsl:apply-templates select="$target" mode="page.citation">
+          <xsl:with-param name="id" select="@linkend"/>
+        </xsl:apply-templates>
+      </fo:basic-link>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="section|simplesect|sect1|sect2|sect3|sect4|sect5
+                      |refsect1|refsect2|refsect3|refsection" mode="xref-to">
+    <xsl:param name="referrer"/>
+    <xsl:param name="xrefstyle"/>
+    <xsl:param name="role"/>
+    <xsl:apply-templates select="." mode="object.xref.markup">
+      <xsl:with-param name="purpose" select="'xref'"/>
+      <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+      <xsl:with-param name="referrer" select="$referrer"/>
+      <xsl:with-param name="role" select="$role"/>
+    </xsl:apply-templates>
+  </xsl:template>
+
+  <xsl:template match="*" mode="object.xref.markup">
+    <xsl:param name="purpose"/>
+    <xsl:param name="xrefstyle"/>
+    <xsl:param name="referrer"/>
+    <xsl:param name="role"/>
+    <xsl:variable name="template">
+      <xsl:choose>
+        <xsl:when test="starts-with(normalize-space($xrefstyle), 'select:')">
+          <xsl:call-template name="make.gentext.template">
+            <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+            <xsl:with-param name="purpose" select="$purpose"/>
+            <xsl:with-param name="referrer" select="$referrer"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:when test="starts-with(normalize-space($xrefstyle), 'template:')">
+          <xsl:value-of select="substring-after(normalize-space($xrefstyle), 'template:')"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates select="." mode="object.xref.template">
+            <xsl:with-param name="purpose" select="$purpose"/>
+            <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+            <xsl:with-param name="referrer" select="$referrer"/>
+          </xsl:apply-templates>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <xsl:if test="$template = ''">
+      <xsl:message>
+        <xsl:text>object.xref.markup: empty xref template</xsl:text>
+        <xsl:text> for linkend="</xsl:text>
+        <xsl:value-of select="@id"/>
+        <xsl:text>" and @xrefstyle="</xsl:text>
+        <xsl:value-of select="$xrefstyle"/>
+        <xsl:text>"</xsl:text>
+      </xsl:message>
+    </xsl:if>
+    <xsl:call-template name="substitute-markup">
+      <xsl:with-param name="purpose" select="$purpose"/>
+      <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+      <xsl:with-param name="referrer" select="$referrer"/>
+      <xsl:with-param name="template" select="$template"/>
+      <xsl:with-param name="role" select="$role"/>
+    </xsl:call-template>
+  </xsl:template>
+
+  <xsl:template name="substitute-markup">
+    <xsl:param name="template" select="''"/>
+    <xsl:param name="allow-anchors" select="'0'"/>
+    <xsl:param name="title" select="''"/>
+    <xsl:param name="subtitle" select="''"/>
+    <xsl:param name="label" select="''"/>
+    <xsl:param name="pagenumber" select="''"/>
+    <xsl:param name="purpose"/>
+    <xsl:param name="xrefstyle"/>
+    <xsl:param name="referrer"/>
+    <xsl:param name="role"/>
+    <xsl:choose>
+      <xsl:when test="contains($template, '%')">
+        <xsl:value-of select="substring-before($template, '%')"/>
+        <xsl:variable name="candidate"
+              select="substring(substring-after($template, '%'), 1, 1)"/>
+        <xsl:choose>
+          <xsl:when test="$candidate = 't'">
+            <xsl:apply-templates select="." mode="insert.title.markup">
+              <xsl:with-param name="purpose" select="$purpose"/>
+              <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+              <xsl:with-param name="role" select="$role"/>
+              <xsl:with-param name="title">
+                <xsl:choose>
+                  <xsl:when test="$title != ''">
+                    <xsl:copy-of select="$title"/>
+                  </xsl:when>
+                  <xsl:otherwise>
+                    <xsl:apply-templates select="." mode="title.markup">
+                      <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+                    </xsl:apply-templates>
+                  </xsl:otherwise>
+                </xsl:choose>
+              </xsl:with-param>
+            </xsl:apply-templates>
+          </xsl:when>
+          <xsl:when test="$candidate = 's'">
+            <xsl:apply-templates select="." mode="insert.subtitle.markup">
+              <xsl:with-param name="purpose" select="$purpose"/>
+              <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+              <xsl:with-param name="subtitle">
+                <xsl:choose>
+                  <xsl:when test="$subtitle != ''">
+                    <xsl:copy-of select="$subtitle"/>
+                  </xsl:when>
+                  <xsl:otherwise>
+                    <xsl:apply-templates select="." mode="subtitle.markup">
+                      <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+                    </xsl:apply-templates>
+                  </xsl:otherwise>
+                </xsl:choose>
+              </xsl:with-param>
+            </xsl:apply-templates>
+          </xsl:when>
+          <xsl:when test="$candidate = 'n'">
+            <xsl:apply-templates select="." mode="insert.label.markup">
+              <xsl:with-param name="purpose" select="$purpose"/>
+              <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+              <xsl:with-param name="label">
+                <xsl:choose>
+                  <xsl:when test="$label != ''">
+                    <xsl:copy-of select="$label"/>
+                  </xsl:when>
+                  <xsl:otherwise>
+                    <xsl:apply-templates select="." mode="label.markup"/>
+                  </xsl:otherwise>
+                </xsl:choose>
+              </xsl:with-param>
+            </xsl:apply-templates>
+          </xsl:when>
+          <xsl:when test="$candidate = 'p'">
+            <xsl:apply-templates select="." mode="insert.pagenumber.markup">
+              <xsl:with-param name="purpose" select="$purpose"/>
+              <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+              <xsl:with-param name="pagenumber">
+                <xsl:choose>
+                  <xsl:when test="$pagenumber != ''">
+                    <xsl:copy-of select="$pagenumber"/>
+                  </xsl:when>
+                  <xsl:otherwise>
+                    <xsl:apply-templates select="." mode="pagenumber.markup"/>
+                  </xsl:otherwise>
+                </xsl:choose>
+              </xsl:with-param>
+            </xsl:apply-templates>
+          </xsl:when>
+          <xsl:when test="$candidate = 'd'">
+            <xsl:apply-templates select="." mode="insert.direction.markup">
+              <xsl:with-param name="purpose" select="$purpose"/>
+              <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+              <xsl:with-param name="direction">
+                <xsl:choose>
+                  <xsl:when test="$referrer">
+                    <xsl:variable name="referent-is-below">
+                      <xsl:for-each select="preceding::xref">
+                        <xsl:if test="generate-id(.) = generate-id($referrer)">1</xsl:if>
+                      </xsl:for-each>
+                    </xsl:variable>
+                    <xsl:choose>
+                      <xsl:when test="$referent-is-below = ''">
+                        <xsl:call-template name="gentext">
+                          <xsl:with-param name="key" select="'above'"/>
+                        </xsl:call-template>
+                      </xsl:when>
+                      <xsl:otherwise>
+                        <xsl:call-template name="gentext">
+                          <xsl:with-param name="key" select="'below'"/>
+                        </xsl:call-template>
+                      </xsl:otherwise>
+                    </xsl:choose>
+                  </xsl:when>
+                  <xsl:otherwise>
+                    <xsl:message>Attempt to use %d in gentext with no referrer!</xsl:message>
+                  </xsl:otherwise>
+                </xsl:choose>
+              </xsl:with-param>
+            </xsl:apply-templates>
+          </xsl:when>
+          <xsl:when test="$candidate = '%' ">
+            <xsl:text>%</xsl:text>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:text>%</xsl:text><xsl:value-of select="$candidate"/>
+          </xsl:otherwise>
+        </xsl:choose>
+        <!-- recurse with the rest of the template string -->
+        <xsl:variable name="rest"
+              select="substring($template,
+              string-length(substring-before($template, '%'))+3)"/>
+        <xsl:call-template name="substitute-markup">
+          <xsl:with-param name="template" select="$rest"/>
+          <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+          <xsl:with-param name="title" select="$title"/>
+          <xsl:with-param name="subtitle" select="$subtitle"/>
+          <xsl:with-param name="label" select="$label"/>
+          <xsl:with-param name="pagenumber" select="$pagenumber"/>
+          <xsl:with-param name="purpose" select="$purpose"/>
+          <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+          <xsl:with-param name="referrer" select="$referrer"/>
+          <xsl:with-param name="role" select="$role"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$template"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template match="*" mode="insert.title.markup">
+    <xsl:param name="purpose"/>
+    <xsl:param name="xrefstyle"/>
+    <xsl:param name="title"/>
+    <xsl:param name="role"/>
+    <xsl:choose>
+      <xsl:when test="$purpose = 'xref' and titleabbrev">
+        <xsl:apply-templates select="." mode="titleabbrev.markup"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:copy-of select="$title"/>
+        <xsl:value-of select="$role"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+</xsl:stylesheet>
Index: BOOK/stylesheets/top-index.xsl
===================================================================
--- BOOK/stylesheets/top-index.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/stylesheets/top-index.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -15,14 +15,13 @@
       <head>
         <title>
-          Cross-Compiled Linux From Scratch - Sysroot
+          Linux From Scratch
         </title>
         <style type="text/css">
           <xsl:text>
-/* Global settings */
 body {
-  font-family: verdana, tahoma, helvetica, arial, sans-serif;
+  font-family: sans-serif;
   text-align: left;
   background: #fff;
-  color: #222;
+  color: #333;
   margin: 1em;
   padding: 0;
@@ -32,29 +31,36 @@
 
 a:link { color: #22b; }
-a.ulink:link { font-weight: bold; color: #55f; }
-a:visited { color: #7e4988 ! important; }
-a:hover, a:focus { color: #d30e08 ! important; }
-a:active { color: #6b77b1 ! important;}
+a:visited { color: #7e4988; }
+a:hover, a:focus { color: #d30e08; }
+a:active { color: #6b77b1;}
 
-h1, h2 h3, h4 {
+h1, h2 {
   color: #000;
   font-weight: bold;
-  line-height: 1em;
+}
+
+h3, h4, h5, h6 {
+  color: #222;
 }
 
 h1 { font-size: 173%; text-align: center; }
-h2 { font-size: 144%; text-align: center; }
-h3 { font-size: 120%; }
-h4 { font-size: 110%; }
+h2 { font-size: 144%;  text-align: center; }
+h3 { font-size: 120%; padding-top: 0.2em; margin-top: 0.3em; }
+h4 { font-size: 110%;}
 
-.toc {
+div.toc {
   padding-left: 1em;
+  margin-top: 1em;
 }
 
-.toc ul li h3, .toc ul li h4 {
+div.toc ul li h3, div.toc ul li h4 {
   margin: .4em;
 }
 
-.book h1 {
+div.book {
+  padding-bottom: 0.5em;
+}
+
+div.book h1 {
   background: #f5f6f7;
   margin: 0px auto;
@@ -62,13 +68,13 @@
 }
 
-.book h2 {
+div.book h2 {
   background: #dbddec;
   margin: 0px auto;
   padding: 0.2em;
 }
-.author, .copyright {
+div.authorgroup, div p.copyright {
   background: #f5f6f7;
   margin: 0px auto;
-  padding: 0.5em 1em;
+  padding:  1em 0.5em;
 }
 
@@ -97,7 +103,10 @@
       <div class="toc">
         <h3>
-          <xsl:text>32 Bit Builds (Under Development)</xsl:text>
+          <xsl:text>32 Bit Builds</xsl:text>
         </h3>
         <ul>
+	  <h3>
+	    <xsl:text>Under Development.</xsl:text>
+          </h3>
           <li>
             <h4>
@@ -107,31 +116,11 @@
             </h4>
           </li>
-          <li>
-            <h4>
-              <a href="x86">
-                <xsl:text>X86</xsl:text>
-              </a>
-            </h4>
-          </li>
-          <li>
-            <h4>
-              <a href="hppa">
-                <xsl:text>PA-RISC</xsl:text>
-              </a>
-            </h4>
-          </li>
         </ul>
         <h3>
-          <xsl:text>64 Bit Builds (Under Development)</xsl:text>
+          <xsl:text>64 Bit Builds</xsl:text>
         </h3>
-        <ul>
-          <li>
-            <h4>
-              <a href="alpha">
-                <xsl:text>Alpha</xsl:text>
-              </a>
-            </h4>
-          </li>
-        </ul>
+        <h3>
+          <xsl:text>Multilib Builds</xsl:text>
+        </h3>
       </div>
     </div>
@@ -139,35 +128,38 @@
 
   <xsl:template match="title">
-    <h1 class="title">
-      <xsl:value-of select="."/>
-    </h1>
-    <h2 class="subtitle">
-      <xsl:text>Version &version;</xsl:text>
-    </h2>
+    <div>
+      <h1 class="title">
+        <xsl:value-of select="."/>
+      </h1>
+    </div>
+    <div>
+      <h2 class="subtitle">
+        <xsl:text>Version &version;</xsl:text>
+      </h2>
+    </div>
   </xsl:template>
 
   <xsl:template match="authorgroup">
-    <h3 class="author">
-      <xsl:value-of select="author[1]/firstname"/>
-      <xsl:text> </xsl:text>
-      <xsl:value-of select="author[1]/surname"/>
-    </h3>
-    <h3 class="author">
-      <xsl:value-of select="author[2]/firstname"/>
-      <xsl:text> </xsl:text>
-      <xsl:value-of select="author[2]/surname"/>
-    </h3>
-    <h3 class="author">
-      <xsl:value-of select="author[3]/firstname"/>
-      <xsl:text> </xsl:text>
-      <xsl:value-of select="author[3]/surname"/>
-    </h3>
+    <div class="authorgroup">
+      <h3 class="author">
+        <xsl:value-of select="author[1]/firstname"/>
+        <xsl:text> </xsl:text>
+        <xsl:value-of select="author[1]/surname"/>
+      </h3>
+      <h3 class="author">
+        <xsl:value-of select="author[2]/firstname"/>
+        <xsl:text> </xsl:text>
+        <xsl:value-of select="author[2]/surname"/>
+      </h3>
+    </div>
   </xsl:template>
 
   <xsl:template match="copyright">
-    <p class="copyright">
-      <xsl:text>Copyright ©</xsl:text>
-      <xsl:apply-templates/>
-    </p>
+    <div>
+      <p class="copyright">
+        <xsl:text>Copyright (c)</xsl:text>
+        <xsl:apply-templates/>
+      </p>
+    </div>
   </xsl:template>
 
@@ -181,9 +173,11 @@
 
   <xsl:template match="bibliosource">
-    <p class="copyright">
-      <em>
-        <xsl:apply-templates/>
-      </em>
-    </p>
+    <div>
+      <p class="copyright">
+        <em>
+          <xsl:apply-templates/>
+        </em>
+      </p>
+    </div>
   </xsl:template>
 
Index: BOOK/stylesheets/wget.xsl
===================================================================
--- BOOK/stylesheets/wget.xsl	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/stylesheets/wget.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -26,5 +26,5 @@
       <!-- Packages. If some package don't have the string ".tar." in their
       name, the next test must be fixed to match it also. -->
-    <xsl:if test="contains(@url, '.tar.') or contains(@url, '.tgz')">
+    <xsl:if test="contains(@url, '.tar.')">
       <xsl:value-of select="@url"/>
       <xsl:text>&#x0a;</xsl:text>
Index: BOOK/stylesheets/xhtml/lfs-admon.xsl
===================================================================
--- BOOK/stylesheets/xhtml/lfs-admon.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/stylesheets/xhtml/lfs-admon.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,46 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns="http://www.w3.org/1999/xhtml"
+                version="1.0">
+
+    <!-- Use graphics in admonitions -->
+  <xsl:param name="admon.graphics" select="1"/>
+  <xsl:param name="admon.graphics.path">../images/</xsl:param>
+  <xsl:param name="admon.graphics.extension" select="'.png'"/>
+
+    <!-- Changing the output tagging -->
+  <xsl:template name="graphical.admonition">
+    <xsl:variable name="admon.type">
+      <xsl:choose>
+        <xsl:when test="local-name(.)='note'">Note</xsl:when>
+        <xsl:when test="local-name(.)='warning'">Warning</xsl:when>
+        <xsl:when test="local-name(.)='caution'">Caution</xsl:when>
+        <xsl:when test="local-name(.)='tip'">Tip</xsl:when>
+        <xsl:when test="local-name(.)='important'">Important</xsl:when>
+        <xsl:otherwise>Note</xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <xsl:variable name="alt">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="$admon.type"/>
+      </xsl:call-template>
+    </xsl:variable>
+    <div class="{name(.)}">
+      <div class ="admonhead">
+        <img alt="[{$alt}]">
+          <xsl:attribute name="src">
+            <xsl:call-template name="admon.graphic"/>
+          </xsl:attribute>
+        </img>
+        <h3 class="admontitle">
+          <xsl:apply-templates select="." mode="object.title.markup"/>
+        </h3>
+      </div>
+      <div class="admonbody">
+        <xsl:apply-templates/>
+      </div>
+    </div>
+  </xsl:template>
+
+</xsl:stylesheet>
Index: BOOK/stylesheets/xhtml/lfs-index.xsl
===================================================================
--- BOOK/stylesheets/xhtml/lfs-index.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/stylesheets/xhtml/lfs-index.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,202 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY lowercase "'abcdefghijklmnopqrstuvwxyz'">
+<!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'">
+<!ENTITY primary   'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'>
+<!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node())'>
+]>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns="http://www.w3.org/1999/xhtml"
+                version="1.0">
+
+    <!--Filename-->
+  <xsl:template match="index" mode="recursive-chunk-filename">
+    <xsl:text>longindex.html</xsl:text>
+  </xsl:template>
+
+    <!--Title-->
+  <xsl:param name="index-title">Index</xsl:param>
+
+  <xsl:template match="index" mode="title.markup">
+    <xsl:call-template name="gentext">
+      <xsl:with-param name="key" select="$index-title"/>
+    </xsl:call-template>
+  </xsl:template>
+
+  <xsl:template name="index.titlepage">
+    <div class="titlepage">
+      <h1 class="index">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="$index-title"/>
+        </xsl:call-template>
+      </h1>
+    </div>
+  </xsl:template>
+
+    <!--Divisions-->
+  <xsl:template match="indexterm" mode="index-div">
+    <xsl:param name="scope" select="."/>
+    <xsl:variable name="key" select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/>
+    <xsl:variable name="divtitle" select="translate($key, &lowercase;, &uppercase;)"/>
+      <!-- Make sure that we don't generate a div if there are no terms in scope -->
+    <xsl:if test="key('letter', $key)[&scope;] [count(.|key('primary', &primary;)[&scope;][1]) = 1]">
+      <div class="indexdiv">
+        <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)">
+          <h2>
+            <xsl:choose>
+              <xsl:when test="$divtitle = 'A'">
+                <xsl:call-template name="gentext">
+                  <xsl:with-param name="key">Packages</xsl:with-param>
+                </xsl:call-template>
+             </xsl:when>
+             <xsl:when test="$divtitle = 'B'">
+                <xsl:call-template name="gentext">
+                  <xsl:with-param name="key">Programs</xsl:with-param>
+                </xsl:call-template>
+             </xsl:when>
+             <xsl:when test="$divtitle = 'C'">
+                <xsl:call-template name="gentext">
+                  <xsl:with-param name="key">Libraries</xsl:with-param>
+                </xsl:call-template>
+             </xsl:when>
+             <xsl:when test="$divtitle = 'D'">
+                <xsl:call-template name="gentext">
+                  <xsl:with-param name="key">Scripts</xsl:with-param>
+                </xsl:call-template>
+             </xsl:when>
+              <xsl:when test="$divtitle = 'E'">
+                <xsl:call-template name="gentext">
+                  <xsl:with-param name="key">Others</xsl:with-param>
+                </xsl:call-template>
+              </xsl:when>
+             <xsl:otherwise>
+              <xsl:value-of select="$divtitle"/>
+            </xsl:otherwise>
+           </xsl:choose>
+          </h2>
+        </xsl:if>
+        <ul>
+          <xsl:apply-templates select="key('letter', $key)[&scope;]
+                  [count(.|key('primary', &primary;)[&scope;][1])=1]" mode="index-primary">
+            <xsl:with-param name="scope" select="$scope"/>
+            <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
+          </xsl:apply-templates>
+        </ul>
+      </div>
+    </xsl:if>
+  </xsl:template>
+
+    <!-- Dropping the separator from here-->
+  <xsl:template match="indexterm" mode="reference">
+    <xsl:param name="scope" select="."/>
+      <xsl:call-template name="reference">
+        <xsl:with-param name="zones" select="normalize-space(@zone)"/>
+        <xsl:with-param name="scope" select="$scope"/>
+      </xsl:call-template>
+  </xsl:template>
+
+    <!-- Changing the output tags and re-addind the separator-->
+  <xsl:template match="indexterm" mode="index-primary">
+    <xsl:param name="scope" select="."/>
+    <xsl:variable name="key" select="&primary;"/>
+    <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/>
+    <li>
+      <strong class="item">
+        <xsl:value-of select="primary"/>
+        <xsl:text>: </xsl:text>
+      </strong>
+      <xsl:for-each select="$refs[generate-id() = generate-id(key('primary-section',
+              concat($key, &#34; &#34;, generate-id((ancestor-or-self::book |ancestor-or-self::part
+              |ancestor-or-self::chapter |ancestor-or-self::appendix |ancestor-or-self::preface
+              |ancestor-or-self::sect1 |ancestor-or-self::sect2 |ancestor-or-self::sect3
+              |ancestor-or-self::sect4 |ancestor-or-self::sect5 |ancestor-or-self::index)[last()])))[&scope;][1])]">
+        <xsl:apply-templates select="." mode="reference">
+          <xsl:with-param name="scope" select="$scope"/>
+        </xsl:apply-templates>
+      </xsl:for-each>
+      <xsl:if test="$refs/secondary">
+        <ul>
+          <xsl:apply-templates select="$refs[secondary and count(.|key('secondary',
+                  concat($key, &#34; &#34;, normalize-space(concat(secondary/@sortas,
+                  secondary[not(@sortas)]))))[&scope;][1]) = 1]" mode="index-secondary">
+            <xsl:with-param name="scope" select="$scope"/>
+            <xsl:sort select="translate(normalize-space(concat(secondary/@sortas,
+                    secondary[not(@sortas)])), &lowercase;, &uppercase;)"/>
+          </xsl:apply-templates>
+         </ul>
+      </xsl:if>
+    </li>
+  </xsl:template>
+
+  <xsl:template match="indexterm" mode="index-secondary">
+    <xsl:param name="scope" select="."/>
+    <xsl:variable name="key" select="concat(&primary;, &#34; &#34;,
+            normalize-space(concat(secondary/@sortas, secondary[not(@sortas)])))"/>
+    <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/>
+    <li>
+      <strong class="secitem">
+        <xsl:value-of select="secondary"/>
+        <xsl:text>: </xsl:text>
+      </strong>
+      <xsl:for-each select="$refs[generate-id() = generate-id(key('secondary-section',
+              concat($key, &#34; &#34;, generate-id((ancestor-or-self::book |ancestor-or-self::part
+              |ancestor-or-self::chapter |ancestor-or-self::appendix |ancestor-or-self::preface
+              |ancestor-or-self::sect1 |ancestor-or-self::sect2 |ancestor-or-self::sect3
+              |ancestor-or-self::sect4 |ancestor-or-self::sect5 |ancestor-or-self::index)[last()])))[&scope;][1])]">
+        <xsl:apply-templates select="." mode="reference">
+          <xsl:with-param name="scope" select="$scope"/>
+        </xsl:apply-templates>
+      </xsl:for-each>
+    </li>
+  </xsl:template>
+
+    <!--Links (This template also fix a bug in the original code)-->
+  <xsl:template name="reference">
+    <xsl:param name="scope" select="."/>
+    <xsl:param name="zones"/>
+    <xsl:choose>
+      <xsl:when test="contains($zones, ' ')">
+        <xsl:variable name="zone" select="substring-before($zones, ' ')"/>
+        <xsl:variable name="zone2" select="substring-after($zones, ' ')"/>
+        <xsl:variable name="target" select="key('sections', $zone)[&scope;]"/>
+        <xsl:variable name="target2" select="key('sections', $zone2)[&scope;]"/>
+        <a>
+          <xsl:attribute name="href">
+            <xsl:call-template name="href.target.uri">
+              <xsl:with-param name="object" select="$target[1]"/>
+            </xsl:call-template>
+          </xsl:attribute>
+          <xsl:apply-templates select="$target[1]" mode="index-title-content"/>
+        </a>
+        <xsl:text> -- </xsl:text>
+        <a>
+          <xsl:attribute name="href">
+            <xsl:call-template name="href.target.uri">
+              <xsl:with-param name="object" select="$target2[1]"/>
+            </xsl:call-template>
+          </xsl:attribute>
+          <xsl:call-template name="gentext">
+            <xsl:with-param name="key">description</xsl:with-param>
+          </xsl:call-template>
+        </a>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:variable name="zone" select="$zones"/>
+        <xsl:variable name="target" select="key('sections', $zone)[&scope;]"/>
+        <a>
+          <xsl:attribute name="href">
+            <xsl:call-template name="href.target.uri">
+              <xsl:with-param name="object" select="$target[1]"/>
+            </xsl:call-template>
+          </xsl:attribute>
+          <xsl:apply-templates select="$target[1]" mode="index-title-content"/>
+        </a>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+    <!-- Dropping unneeded anchors -->
+  <xsl:template match="indexterm"/>
+
+</xsl:stylesheet>
Index: BOOK/stylesheets/xhtml/lfs-legalnotice.xsl
===================================================================
--- BOOK/stylesheets/xhtml/lfs-legalnotice.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/stylesheets/xhtml/lfs-legalnotice.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,80 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns="http://www.w3.org/1999/xhtml"
+                version="1.0">
+
+    <!-- Generating the page -->
+  <xsl:template match="legalnotice" mode="titlepage.mode">
+    <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+      <xsl:variable name="filename" select="concat($base.dir, 'prologue/legalnotice.html')"/>
+    <xsl:variable name="title">
+      <xsl:apply-templates select="." mode="title.markup"/>
+    </xsl:variable>
+    <xsl:call-template name="write.chunk">
+      <xsl:with-param name="filename" select="$filename"/>
+      <xsl:with-param name="quiet" select="$chunk.quietly"/>
+      <xsl:with-param name="content">
+        <html>
+          <head>
+            <xsl:call-template name="system.head.content"/>
+            <xsl:call-template name="head.content"/>
+            <xsl:call-template name="user.head.content"/>
+          </head>
+          <body>
+            <xsl:call-template name="body.attributes"/>
+            <div class="{local-name(.)}">
+              <xsl:apply-templates mode="titlepage.mode"/>
+            </div>
+            <div class="navfooter">
+              <ul class="footerlinks">
+                <li class="home">
+                  <a accesskey="h">
+                    <xsl:attribute name="href">
+                      <xsl:text>../index.html</xsl:text>
+                    </xsl:attribute>
+                    <xsl:attribute name="title">
+                      <xsl:value-of select="/book/bookinfo/title"/>
+                      <xsl:text> - </xsl:text>
+                      <xsl:value-of select="/book/bookinfo/subtitle"/>
+                    </xsl:attribute>
+                    <xsl:call-template name="navig.content">
+                      <xsl:with-param name="direction" select="'home'"/>
+                    </xsl:call-template>
+                  </a>
+                </li>
+              </ul>
+            </div>
+          </body>
+        </html>
+      </xsl:with-param>
+    </xsl:call-template>
+  </xsl:template>
+
+    <!-- Making the link-->
+  <xsl:template match="copyright" mode="titlepage.mode">
+    <p class="{name(.)}">
+      <a>
+        <xsl:attribute name="href">
+          <xsl:value-of select="'prologue/legalnotice.html'"/>
+        </xsl:attribute>
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'Copyright'"/>
+        </xsl:call-template>
+      </a>
+      <xsl:call-template name="gentext.space"/>
+      <xsl:call-template name="dingbat">
+        <xsl:with-param name="dingbat">copyright</xsl:with-param>
+      </xsl:call-template>
+      <xsl:call-template name="gentext.space"/>
+      <xsl:call-template name="copyright.years">
+        <xsl:with-param name="years" select="year"/>
+        <xsl:with-param name="print.ranges" select="$make.year.ranges"/>
+        <xsl:with-param name="single.year.ranges" select="$make.single.year.ranges"/>
+      </xsl:call-template>
+      <xsl:call-template name="gentext.space"/>
+      <xsl:apply-templates select="holder" mode="titlepage.mode"/>
+    </p>
+  </xsl:template>
+
+</xsl:stylesheet>
Index: BOOK/stylesheets/xhtml/lfs-mixed.xsl
===================================================================
--- BOOK/stylesheets/xhtml/lfs-mixed.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/stylesheets/xhtml/lfs-mixed.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,322 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns="http://www.w3.org/1999/xhtml"
+                version="1.0">
+
+    <!-- para -->
+  <xsl:template match="para">
+    <xsl:choose>
+      <xsl:when test="child::ulink[@url=' ']"/>
+      <xsl:otherwise>
+        <xsl:call-template name="paragraph">
+          <xsl:with-param name="class">
+            <xsl:if test="@role and $para.propagates.style != 0">
+              <xsl:value-of select="@role"/>
+            </xsl:if>
+          </xsl:with-param>
+          <xsl:with-param name="content">
+            <xsl:if test="position() = 1 and parent::listitem">
+              <xsl:call-template name="anchor">
+                <xsl:with-param name="node" select="parent::listitem"/>
+              </xsl:call-template>
+            </xsl:if>
+            <xsl:call-template name="anchor"/>
+            <xsl:apply-templates/>
+          </xsl:with-param>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+    <!-- screen -->
+  <xsl:template match="screen">
+    <xsl:choose>
+      <xsl:when test="child::* = userinput">
+        <pre class="userinput">
+            <xsl:apply-templates/>
+        </pre>
+      </xsl:when>
+      <xsl:otherwise>
+        <pre class="{name(.)}">
+          <xsl:apply-templates/>
+        </pre>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template match="userinput">
+    <xsl:choose>
+      <xsl:when test="ancestor::screen">
+        <kbd class="command">
+          <xsl:apply-templates/>
+        </kbd>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:apply-imports/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+    <!-- segementedlist -->
+  <xsl:template match="seg">
+    <xsl:variable name="segnum" select="count(preceding-sibling::seg)+1"/>
+    <xsl:variable name="seglist" select="ancestor::segmentedlist"/>
+    <xsl:variable name="segtitles" select="$seglist/segtitle"/>
+      <!-- Note: segtitle is only going to be the right thing in a well formed
+      SegmentedList.  If there are too many Segs or too few SegTitles,
+      you'll get something odd...maybe an error -->
+      <div class="seg">
+      <strong>
+        <span class="segtitle">
+          <xsl:apply-templates select="$segtitles[$segnum=position()]" mode="segtitle-in-seg"/>
+          <xsl:text>: </xsl:text>
+        </span>
+      </strong>
+      <span class="seg">
+        <xsl:apply-templates/>
+      </span>
+    </div>
+  </xsl:template>
+
+
+  <!-- variablelist -->
+  <xsl:template match="variablelist">
+    <xsl:choose>
+      <xsl:when test="@role">
+        <div class="{@role}">
+          <xsl:apply-imports/>
+        </div>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:apply-imports/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+
+    <!-- Body attributes -->
+  <xsl:template name="body.attributes">
+    <xsl:attribute name="id">
+      <xsl:text>lfs</xsl:text>
+    </xsl:attribute>
+    <xsl:attribute name="class">
+      <xsl:value-of select="substring-after(/book/bookinfo/subtitle, ' ')"/>
+    </xsl:attribute>
+  </xsl:template>
+
+    <!-- External URLs in italic font -->
+  <xsl:template match="ulink" name="ulink">
+    <a>
+      <xsl:if test="@id">
+        <xsl:attribute name="id">
+          <xsl:value-of select="@id"/>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:attribute name="href"><xsl:value-of select="@url"/></xsl:attribute>
+       <i>
+        <xsl:choose>
+          <xsl:when test="count(child::node())=0">
+            <xsl:value-of select="@url"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:apply-templates/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </i>
+    </a>
+  </xsl:template>
+
+    <!-- The <code> xhtml tag have look issues in some browsers, like Konqueror and.
+      isn't semantically correct (a filename isn't a code fragment) We will use <tt> for now. -->
+  <xsl:template name="inline.monoseq">
+    <xsl:param name="content">
+      <xsl:call-template name="anchor"/>
+      <xsl:call-template name="simple.xlink">
+        <xsl:with-param name="content">
+          <xsl:apply-templates/>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:param>
+    <tt class="{local-name(.)}">
+      <xsl:if test="@dir">
+        <xsl:attribute name="dir">
+          <xsl:value-of select="@dir"/>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:copy-of select="$content"/>
+    </tt>
+  </xsl:template>
+
+  <xsl:template name="inline.boldmonoseq">
+    <xsl:param name="content">
+      <xsl:call-template name="anchor"/>
+      <xsl:call-template name="simple.xlink">
+        <xsl:with-param name="content">
+          <xsl:apply-templates/>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:param>
+    <!-- don't put <strong> inside figure, example, or table titles -->
+    <!-- or other titles that may already be represented with <strong>'s. -->
+    <xsl:choose>
+      <xsl:when test="local-name(..) = 'title' and (local-name(../..) = 'figure'
+              or local-name(../..) = 'example' or local-name(../..) = 'table' or local-name(../..) = 'formalpara')">
+        <tt class="{local-name(.)}">
+          <xsl:if test="@dir">
+            <xsl:attribute name="dir">
+              <xsl:value-of select="@dir"/>
+            </xsl:attribute>
+          </xsl:if>
+          <xsl:copy-of select="$content"/>
+        </tt>
+      </xsl:when>
+      <xsl:otherwise>
+        <strong class="{local-name(.)}">
+          <tt>
+            <xsl:if test="@dir">
+              <xsl:attribute name="dir">
+                <xsl:value-of select="@dir"/>
+              </xsl:attribute>
+            </xsl:if>
+            <xsl:copy-of select="$content"/>
+          </tt>
+        </strong>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template name="inline.italicmonoseq">
+    <xsl:param name="content">
+      <xsl:call-template name="anchor"/>
+      <xsl:call-template name="simple.xlink">
+        <xsl:with-param name="content">
+          <xsl:apply-templates/>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:param>
+    <em class="{local-name(.)}">
+      <tt>
+        <xsl:if test="@dir">
+          <xsl:attribute name="dir">
+            <xsl:value-of select="@dir"/>
+          </xsl:attribute>
+        </xsl:if>
+        <xsl:copy-of select="$content"/>
+      </tt>
+    </em>
+  </xsl:template>
+
+  <!-- Adding bibliosource to titlepage -->
+  <xsl:template name="book.titlepage.recto">
+    <xsl:choose>
+      <xsl:when test="bookinfo/title">
+        <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/title"/>
+      </xsl:when>
+      <xsl:when test="info/title">
+        <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/title"/>
+      </xsl:when>
+      <xsl:when test="title">
+        <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="title"/>
+      </xsl:when>
+    </xsl:choose>
+
+    <xsl:choose>
+      <xsl:when test="bookinfo/subtitle">
+        <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/subtitle"/>
+      </xsl:when>
+      <xsl:when test="info/subtitle">
+        <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/subtitle"/>
+      </xsl:when>
+      <xsl:when test="subtitle">
+        <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="subtitle"/>
+      </xsl:when>
+    </xsl:choose>
+
+    <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/corpauthor"/>
+    <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/corpauthor"/>
+    <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/authorgroup"/>
+    <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/authorgroup"/>
+    <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/author"/>
+    <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/author"/>
+    <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/othercredit"/>
+    <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/othercredit"/>
+    <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/releaseinfo"/>
+    <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+    <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/copyright"/>
+    <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/copyright"/>
+    <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/bibliosource"/>
+    <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/legalnotice"/>
+    <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/legalnotice"/>
+    <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/pubdate"/>
+    <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/pubdate"/>
+    <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/revision"/>
+    <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/revision"/>
+    <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/revhistory"/>
+    <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/revhistory"/>
+    <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/abstract"/>
+    <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/abstract"/>
+  </xsl:template>
+
+  <xsl:template match="bibliosource" mode="book.titlepage.recto.auto.mode">
+    <div>
+      <p class="copyright">
+        <xsl:apply-templates/>
+      </p>
+    </div>
+  </xsl:template>
+
+    <!-- Total packages size calculation -->
+  <xsl:template match="returnvalue">
+    <xsl:call-template name="calculation">
+     <xsl:with-param name="scope" select="../../variablelist"/>
+    </xsl:call-template>
+  </xsl:template>
+
+  <xsl:template name="calculation">
+    <xsl:param name="scope"/>
+    <xsl:param name="total">0</xsl:param>
+    <xsl:param name="position">1</xsl:param>
+    <xsl:variable name="tokens" select="count($scope/varlistentry)"/>
+    <xsl:variable name="token" select="$scope/varlistentry[$position]/term/token"/>
+    <xsl:variable name="size" select="substring-before($token,' KB')"/>
+    <xsl:variable name="rawsize">
+      <xsl:choose>
+        <xsl:when test="contains($size,',')">
+          <xsl:value-of select="concat(substring-before($size,','),substring-after($size,','))"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$size"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <xsl:choose>
+      <xsl:when test="$position &lt;= $tokens">
+        <xsl:call-template name="calculation">
+          <xsl:with-param name="scope" select="$scope"/>
+          <xsl:with-param name="position" select="$position +1"/>
+          <xsl:with-param name="total" select="$total + $rawsize"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:choose>
+          <xsl:when test="$total &lt; '1000'">
+            <xsl:value-of select="$total"/>
+            <xsl:text>  KB</xsl:text>
+          </xsl:when>
+          <xsl:when test="$total &gt; '1000' and $total &lt; '5000'">
+            <xsl:value-of select="substring($total,1,1)"/>
+            <xsl:text>,</xsl:text>
+            <xsl:value-of select="substring($total,2)"/>
+            <xsl:text>  KB</xsl:text>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="round($total div 1024)"/>
+            <xsl:text>  MB</xsl:text>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+</xsl:stylesheet>
Index: BOOK/stylesheets/xhtml/lfs-navigational.xsl
===================================================================
--- BOOK/stylesheets/xhtml/lfs-navigational.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/stylesheets/xhtml/lfs-navigational.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,359 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns="http://www.w3.org/1999/xhtml"
+                version="1.0">
+
+    <!-- Dropping the HEAD links -->
+  <xsl:template name="html.head">
+    <head>
+      <xsl:call-template name="system.head.content"/>
+      <xsl:call-template name="head.content"/>
+      <xsl:call-template name="user.head.content"/>
+    </head>
+  </xsl:template>
+
+    <!-- Header Navigation-->
+  <xsl:template name="header.navigation">
+    <xsl:param name="prev" select="/foo"/>
+    <xsl:param name="next" select="/foo"/>
+    <xsl:param name="nav.context"/>
+    <xsl:variable name="home" select="/*[1]"/>
+    <xsl:variable name="up" select="parent::*"/>
+    <xsl:variable name="row" select="count($prev) &gt; 0 or (count($up) &gt; 0
+            and generate-id($up) != generate-id($home)) or count($next) &gt; 0"/>
+    <!--Header titles-->
+    <xsl:if test="$row and $home != .">
+      <div class="navheader">
+        <xsl:if test="$home != .">
+          <div class="headertitles">
+            <h4>
+              <xsl:apply-templates select="$home" mode="object.title.markup"/>
+              <xsl:text> - </xsl:text>
+              <xsl:apply-templates select="$home" mode="object.subtitle.markup"/>
+            </h4>
+            <xsl:if test="$up != $home">
+              <h3>
+                <xsl:apply-templates select="$up" mode="object.title.markup"/>
+              </h3>
+            </xsl:if>
+          </div>
+        </xsl:if>
+        <ul class="headerlinks">
+          <!--Prev-->
+          <xsl:if test="count($prev)&gt;0 and $prev != $home">
+            <li class="prev">
+              <xsl:choose>
+                <xsl:when test="$prev[@id='ch-chroot-devices']
+                        or $prev[@id='ch-boot-whatnext']">
+                  <a accesskey="p">
+                    <xsl:attribute name="href">
+                      <xsl:call-template name="href.target">
+                        <xsl:with-param name="object"
+                                select="//sect1[@id='ch-temp-system-choose']"/>
+                      </xsl:call-template>
+                    </xsl:attribute>
+                    <xsl:attribute name="title">
+                      <xsl:value-of select="//sect1[@id='ch-temp-system-choose']/title"/>
+                    </xsl:attribute>
+                    <xsl:call-template name="navig.content">
+                      <xsl:with-param name="direction" select="'prev'"/>
+                    </xsl:call-template>
+                  </a>
+                  <p>
+                    <xsl:value-of select="//sect1[@id='ch-temp-system-choose']/title"/>
+                  </p>
+                </xsl:when>
+                <xsl:otherwise>
+                  <a accesskey="p">
+                    <xsl:attribute name="href">
+                      <xsl:call-template name="href.target">
+                        <xsl:with-param name="object" select="$prev"/>
+                      </xsl:call-template>
+                    </xsl:attribute>
+                    <xsl:attribute name="title">
+                      <xsl:value-of select="$prev/title"/>
+                    </xsl:attribute>
+                    <xsl:call-template name="navig.content">
+                      <xsl:with-param name="direction" select="'prev'"/>
+                    </xsl:call-template>
+                  </a>
+                  <p>
+                    <xsl:value-of select="$prev/title"/>
+                  </p>
+                </xsl:otherwise>
+              </xsl:choose>
+            </li>
+          </xsl:if>
+          <!--Next-->
+          <xsl:if test="count($next)&gt;0 and @id!='ch-temp-system-choose'">
+            <li class="next">
+              <xsl:choose>
+                <xsl:when test="$next[@id='chapter-chroot'] or
+                        $next[@id='chapter-boot']">
+                  <a accesskey="n">
+                    <xsl:attribute name="href">
+                      <xsl:call-template name="href.target">
+                        <xsl:with-param name="object"
+                                select="//part[@id='part5']"/>
+                      </xsl:call-template>
+                    </xsl:attribute>
+                    <xsl:attribute name="title">
+                      <xsl:value-of select="//part[@id='part5']/title"/>
+                    </xsl:attribute>
+                    <xsl:call-template name="navig.content">
+                      <xsl:with-param name="direction" select="'next'"/>
+                    </xsl:call-template>
+                  </a>
+                  <p>
+                    <xsl:value-of select="//part[@id='part5']/title"/>
+                  </p>
+                </xsl:when>
+                <xsl:otherwise>
+                  <a accesskey="n">
+                    <xsl:attribute name="href">
+                      <xsl:call-template name="href.target">
+                        <xsl:with-param name="object" select="$next"/>
+                      </xsl:call-template>
+                    </xsl:attribute>
+                    <xsl:attribute name="title">
+                      <xsl:choose>
+                        <xsl:when test="local-name($next)='index'">
+                          <xsl:call-template name="gentext">
+                            <xsl:with-param name="key">Index</xsl:with-param>
+                          </xsl:call-template>
+                        </xsl:when>
+                        <xsl:otherwise>
+                          <xsl:value-of select="$next/title"/>
+                        </xsl:otherwise>
+                      </xsl:choose>
+                    </xsl:attribute>
+                    <xsl:call-template name="navig.content">
+                      <xsl:with-param name="direction" select="'next'"/>
+                    </xsl:call-template>
+                  </a>
+                  <p>
+                    <xsl:choose>
+                      <xsl:when test="local-name($next)='index'">
+                        <xsl:call-template name="gentext">
+                          <xsl:with-param name="key">Index</xsl:with-param>
+                        </xsl:call-template>
+                      </xsl:when>
+                      <xsl:otherwise>
+                        <xsl:value-of select="$next/title"/>
+                      </xsl:otherwise>
+                    </xsl:choose>
+                  </p>
+                </xsl:otherwise>
+              </xsl:choose>
+            </li>
+          </xsl:if>
+          <!--Up-->
+          <li class="up">
+            <xsl:if test="count($up)&gt;0 and $up != $home">
+              <a accesskey="u">
+                <xsl:attribute name="href">
+                  <xsl:call-template name="href.target">
+                    <xsl:with-param name="object" select="$up"/>
+                  </xsl:call-template>
+                </xsl:attribute>
+                <xsl:attribute name="title">
+                  <xsl:apply-templates select="$up" mode="object.title.markup"/>
+                </xsl:attribute>
+                <xsl:call-template name="navig.content">
+                  <xsl:with-param name="direction" select="'up'"/>
+                </xsl:call-template>
+              </a>
+            </xsl:if>
+            <xsl:text>.</xsl:text>
+          </li>
+          <!--Home-->
+          <li class="home">
+            <a accesskey="h">
+              <xsl:attribute name="href">
+                <xsl:call-template name="href.target">
+                  <xsl:with-param name="object" select="$home"/>
+                </xsl:call-template>
+              </xsl:attribute>
+                <xsl:attribute name="title">
+                  <xsl:value-of select="$home/bookinfo/title"/>
+                  <xsl:text> - </xsl:text>
+                  <xsl:value-of select="$home/bookinfo/subtitle"/>
+                </xsl:attribute>
+                <xsl:call-template name="navig.content">
+                  <xsl:with-param name="direction" select="'home'"/>
+                </xsl:call-template>
+            </a>
+          </li>
+        </ul>
+      </div>
+    </xsl:if>
+  </xsl:template>
+
+    <!-- Footer Navigation-->
+  <xsl:template name="footer.navigation">
+    <xsl:param name="prev" select="/foo"/>
+    <xsl:param name="next" select="/foo"/>
+    <xsl:param name="nav.context"/>
+    <xsl:variable name="home" select="/*[1]"/>
+    <xsl:variable name="up" select="parent::*"/>
+    <xsl:variable name="row" select="count($prev) &gt; 0 or count($up) &gt; 0
+            or count($next) &gt; 0 or generate-id($home) != generate-id(.)"/>
+    <xsl:if test="$row">
+      <div class="navfooter">
+        <ul>
+          <!--Prev-->
+          <xsl:if test="count($prev)&gt;0 and $prev != $home">
+            <li class="prev">
+              <xsl:choose>
+                <xsl:when test="$prev[@id='ch-chroot-devices']
+                        or $prev[@id='ch-boot-whatnext']">
+                  <a accesskey="p">
+                    <xsl:attribute name="href">
+                      <xsl:call-template name="href.target">
+                        <xsl:with-param name="object"
+                                select="//sect1[@id='ch-temp-system-choose']"/>
+                      </xsl:call-template>
+                    </xsl:attribute>
+                    <xsl:attribute name="title">
+                      <xsl:value-of select="//sect1[@id='ch-temp-system-choose']/title"/>
+                    </xsl:attribute>
+                    <xsl:call-template name="navig.content">
+                      <xsl:with-param name="direction" select="'prev'"/>
+                    </xsl:call-template>
+                  </a>
+                  <p>
+                    <xsl:value-of select="//sect1[@id='ch-temp-system-choose']/title"/>
+                  </p>
+                </xsl:when>
+                <xsl:otherwise>
+                  <a accesskey="p">
+                    <xsl:attribute name="href">
+                      <xsl:call-template name="href.target">
+                        <xsl:with-param name="object" select="$prev"/>
+                      </xsl:call-template>
+                    </xsl:attribute>
+                    <xsl:attribute name="title">
+                      <xsl:value-of select="$prev/title"/>
+                    </xsl:attribute>
+                    <xsl:call-template name="navig.content">
+                      <xsl:with-param name="direction" select="'prev'"/>
+                    </xsl:call-template>
+                  </a>
+                  <p>
+                    <xsl:value-of select="$prev/title"/>
+                  </p>
+                </xsl:otherwise>
+              </xsl:choose>
+            </li>
+          </xsl:if>
+          <!--Next-->
+          <xsl:if test="(count($next)&gt;0 and @id!='ch-temp-system-choose')
+                  or generate-id($home) = generate-id(.)">
+            <li class="next">
+              <xsl:choose>
+                <xsl:when test="$next[@id='chapter-chroot'] or
+                        $next[@id='chapter-boot']">
+                  <a accesskey="n">
+                    <xsl:attribute name="href">
+                      <xsl:call-template name="href.target">
+                        <xsl:with-param name="object"
+                                select="//part[@id='part5']"/>
+                      </xsl:call-template>
+                    </xsl:attribute>
+                    <xsl:attribute name="title">
+                      <xsl:value-of select="//part[@id='part5']/title"/>
+                    </xsl:attribute>
+                    <xsl:call-template name="navig.content">
+                      <xsl:with-param name="direction" select="'next'"/>
+                    </xsl:call-template>
+                  </a>
+                  <p>
+                    <xsl:value-of select="//part[@id='part5']/title"/>
+                  </p>
+                </xsl:when>
+                <xsl:otherwise>
+                  <a accesskey="n">
+                    <xsl:attribute name="href">
+                      <xsl:call-template name="href.target">
+                        <xsl:with-param name="object" select="$next"/>
+                      </xsl:call-template>
+                    </xsl:attribute>
+                    <xsl:attribute name="title">
+                      <xsl:choose>
+                        <xsl:when test="local-name($next)='index'">
+                          <xsl:call-template name="gentext">
+                            <xsl:with-param name="key">Index</xsl:with-param>
+                          </xsl:call-template>
+                        </xsl:when>
+                        <xsl:otherwise>
+                          <xsl:value-of select="$next/title"/>
+                        </xsl:otherwise>
+                      </xsl:choose>
+                    </xsl:attribute>
+                    <xsl:call-template name="navig.content">
+                      <xsl:with-param name="direction" select="'next'"/>
+                    </xsl:call-template>
+                  </a>
+                  <p>
+                    <xsl:choose>
+                      <xsl:when test="local-name($next)='index'">
+                        <xsl:call-template name="gentext">
+                          <xsl:with-param name="key">Index</xsl:with-param>
+                        </xsl:call-template>
+                      </xsl:when>
+                      <xsl:otherwise>
+                        <xsl:value-of select="$next/title"/>
+                      </xsl:otherwise>
+                    </xsl:choose>
+                  </p>
+                </xsl:otherwise>
+              </xsl:choose>
+            </li>
+          </xsl:if>
+          <!--Up-->
+          <li class="up">
+            <xsl:if test="count($up)&gt;0 and $up != $home">
+              <a accesskey="u">
+                <xsl:attribute name="href">
+                  <xsl:call-template name="href.target">
+                    <xsl:with-param name="object" select="$up"/>
+                  </xsl:call-template>
+                </xsl:attribute>
+                <xsl:attribute name="title">
+                  <xsl:apply-templates select="$up" mode="object.title.markup"/>
+                </xsl:attribute>
+                <xsl:call-template name="navig.content">
+                  <xsl:with-param name="direction" select="'up'"/>
+                </xsl:call-template>
+              </a>
+            </xsl:if>
+            <xsl:text>.</xsl:text>
+          </li>
+          <!--Home-->
+          <li class="home">
+            <xsl:if  test="$home != .">
+              <a accesskey="h">
+                <xsl:attribute name="href">
+                  <xsl:call-template name="href.target">
+                    <xsl:with-param name="object" select="$home"/>
+                  </xsl:call-template>
+                </xsl:attribute>
+                <xsl:attribute name="title">
+                  <xsl:value-of select="$home/bookinfo/title"/>
+                  <xsl:text> - </xsl:text>
+                  <xsl:value-of select="$home/bookinfo/subtitle"/>
+                </xsl:attribute>
+                <xsl:call-template name="navig.content">
+                  <xsl:with-param name="direction" select="'home'"/>
+                </xsl:call-template>
+              </a>
+            </xsl:if>
+            <xsl:text>.</xsl:text>
+          </li>
+        </ul>
+      </div>
+    </xsl:if>
+  </xsl:template>
+
+</xsl:stylesheet>
Index: BOOK/stylesheets/xhtml/lfs-sections.xsl
===================================================================
--- BOOK/stylesheets/xhtml/lfs-sections.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/stylesheets/xhtml/lfs-sections.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,143 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns="http://www.w3.org/1999/xhtml"
+                version="1.0">
+
+
+   <!-- Sect1 attributes -->
+  <xsl:template match="sect1">
+    <div>
+      <xsl:choose>
+        <xsl:when test="@role">
+          <xsl:attribute name="class">
+            <xsl:value-of select="@role"/>
+          </xsl:attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:attribute name="class">
+            <xsl:value-of select="name(.)"/>
+          </xsl:attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+      <xsl:call-template name="language.attribute"/>
+      <xsl:call-template name="sect1.titlepage"/>
+      <xsl:apply-templates/>
+      <xsl:call-template name="process.chunk.footnotes"/>
+    </div>
+  </xsl:template>
+
+    <!-- Sect2 attributes -->
+  <xsl:template match="sect2">
+    <div>
+      <xsl:choose>
+        <xsl:when test="@role">
+          <xsl:attribute name="class">
+            <xsl:value-of select="@role"/>
+          </xsl:attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:attribute name="class">
+            <xsl:value-of select="name(.)"/>
+          </xsl:attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+      <xsl:call-template name="language.attribute"/>
+      <xsl:call-template name="sect2.titlepage"/>
+      <xsl:apply-templates/>
+      <xsl:call-template name="process.chunk.footnotes"/>
+    </div>
+  </xsl:template>
+
+    <!-- Sections numbering -->
+  <xsl:param name="section.autolabel" select="1"/>
+  <xsl:param name="section.label.includes.component.label" select="1"/>
+
+    <!-- Use lowercase roman numbers for sect1 in preface -->
+  <xsl:template match="sect1" mode="label.markup">
+    <!-- if the parent is a component, maybe label that too -->
+    <xsl:variable name="parent.is.component">
+      <xsl:call-template name="is.component">
+        <xsl:with-param name="node" select=".."/>
+      </xsl:call-template>
+    </xsl:variable>
+    <xsl:variable name="component.label">
+      <xsl:if test="$section.label.includes.component.label != 0
+                    and $parent.is.component != 0">
+        <xsl:variable name="parent.label">
+          <xsl:apply-templates select=".." mode="label.markup"/>
+        </xsl:variable>
+        <xsl:if test="$parent.label != ''">
+          <xsl:apply-templates select=".." mode="label.markup"/>
+          <xsl:apply-templates select=".." mode="intralabel.punctuation"/>
+        </xsl:if>
+      </xsl:if>
+    </xsl:variable>
+    <xsl:choose>
+      <xsl:when test="@label">
+        <xsl:value-of select="@label"/>
+      </xsl:when>
+      <xsl:when test="$section.autolabel != 0">
+        <xsl:copy-of select="$component.label"/>
+        <xsl:choose>
+          <xsl:when test="ancestor::preface">
+            <xsl:number format="i" count="sect1"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:number format="1" count="sect1"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+    </xsl:choose>
+  </xsl:template>
+
+    <!-- Skip numeration for sect2 with empty title -->
+  <xsl:template match="sect2|sect3|sect4|sect5" mode="label.markup">
+    <xsl:if test="string-length(title) > 0">
+      <!-- label the parent -->
+      <xsl:variable name="parent.label">
+        <xsl:apply-templates select=".." mode="label.markup"/>
+      </xsl:variable>
+      <xsl:if test="$parent.label != ''">
+        <xsl:apply-templates select=".." mode="label.markup"/>
+      <xsl:apply-templates select=".." mode="intralabel.punctuation"/>
+      </xsl:if>
+      <xsl:choose>
+        <xsl:when test="@label">
+          <xsl:value-of select="@label"/>
+        </xsl:when>
+        <xsl:when test="$section.autolabel != 0">
+          <xsl:choose>
+            <xsl:when test="local-name(.) = 'sect2'">
+              <xsl:choose>
+                <!-- If the first sect2 isn't numbered, renumber the remainig sections -->
+                <xsl:when test="string-length(../sect2[1]/title) = 0">
+                  <xsl:variable name="totalsect2">
+                    <xsl:number count="sect2"/>
+                  </xsl:variable>
+                  <xsl:number value="$totalsect2 - 1"/>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:number count="sect2"/>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:when>
+            <xsl:when test="local-name(.) = 'sect3'">
+              <xsl:number count="sect3"/>
+            </xsl:when>
+            <xsl:when test="local-name(.) = 'sect4'">
+              <xsl:number count="sect4"/>
+            </xsl:when>
+            <xsl:when test="local-name(.) = 'sect5'">
+              <xsl:number count="sect5"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:message>label.markup: this can't happen!</xsl:message>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:when>
+      </xsl:choose>
+    </xsl:if>
+  </xsl:template>
+
+</xsl:stylesheet>
Index: BOOK/stylesheets/xhtml/lfs-titles.xsl
===================================================================
--- BOOK/stylesheets/xhtml/lfs-titles.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/stylesheets/xhtml/lfs-titles.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,117 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns="http://www.w3.org/1999/xhtml"
+                version="1.0">
+
+  <xsl:template name="part.titlepage">
+    <div class="titlepage">
+      <h1 class="{name(.)}">
+        <xsl:apply-templates select="." mode="label.markup"/>
+        <xsl:text>. </xsl:text>
+        <xsl:value-of select="title"/>
+      </h1>
+    </div>
+  </xsl:template>
+
+  <xsl:template name="chapter.titlepage">
+    <div class="titlepage">
+      <h1 class="{name(.)}">
+        <xsl:apply-templates select="." mode="label.markup"/>
+        <xsl:text>. </xsl:text>
+        <xsl:value-of select="title"/>
+      </h1>
+    </div>
+  </xsl:template>
+
+  <xsl:template name="preface.titlepage">
+    <div class="titlepage">
+      <h1 class="{name(.)}">
+        <xsl:value-of select="title"/>
+      </h1>
+    </div>
+  </xsl:template>
+
+  <xsl:template name="appendix.titlepage">
+    <div class="titlepage">
+      <h1 class="{name(.)}">
+        <xsl:apply-templates select="." mode="label.markup"/>
+        <xsl:text>. </xsl:text>
+        <xsl:value-of select="title"/>
+      </h1>
+    </div>
+  </xsl:template>
+
+  <xsl:template name="sect1.titlepage">
+    <xsl:choose>
+        <!-- I should find a better test -->
+      <xsl:when test="position() = 4">
+        <div class="titlepage">
+          <xsl:if test="@id">
+            <a id="{@id}" name="{@id}"/>
+          </xsl:if>
+          <h2 class="{name(.)}">
+            <xsl:apply-templates select="." mode="label.markup"/>
+            <xsl:text>. </xsl:text>
+            <xsl:value-of select="title"/>
+          </h2>
+        </div>
+      </xsl:when>
+      <xsl:otherwise>
+        <div class="titlepage">
+          <h1 class="{name(.)}">
+            <xsl:apply-templates select="." mode="label.markup"/>
+            <xsl:text>. </xsl:text>
+            <xsl:value-of select="title"/>
+          </h1>
+        </div>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template name="sect2.titlepage">
+    <xsl:choose>
+      <xsl:when test="string-length(title) = 0"/>
+      <xsl:otherwise>
+        <div class="titlepage">
+          <xsl:if test="@id">
+            <a id="{@id}" name="{@id}"/>
+          </xsl:if>
+          <h2 class="{name(.)}">
+            <xsl:if test="not(ancestor::preface)">
+              <xsl:apply-templates select="." mode="label.markup"/>
+              <xsl:text>. </xsl:text>
+            </xsl:if>
+            <xsl:value-of select="title"/>
+          </h2>
+        </div>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template name="dedication.titlepage">
+    <div class="titlepage">
+      <h2 class="{name(.)}">
+        <xsl:value-of select="title"/>
+      </h2>
+    </div>
+  </xsl:template>
+
+    <!-- Added the role param for proper punctuation in xref calls. -->
+  <xsl:template match="*" mode="insert.title.markup">
+    <xsl:param name="purpose"/>
+    <xsl:param name="xrefstyle"/>
+    <xsl:param name="title"/>
+    <xsl:param name="role"/>
+    <xsl:choose>
+      <xsl:when test="$purpose = 'xref' and titleabbrev">
+        <xsl:apply-templates select="." mode="titleabbrev.markup"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:copy-of select="$title"/>
+        <xsl:value-of select="$role"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+</xsl:stylesheet>
Index: BOOK/stylesheets/xhtml/lfs-toc.xsl
===================================================================
--- BOOK/stylesheets/xhtml/lfs-toc.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/stylesheets/xhtml/lfs-toc.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,159 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns="http://www.w3.org/1999/xhtml"
+                version="1.0">
+
+    <!-- General settings -->
+  <xsl:param name="generate.toc">
+    appendix  nop
+    book      toc,title
+    chapter   nop
+    part      toc
+    preface   nop
+    qandadiv  nop
+    qandaset  nop
+    reference nop
+    sect1     nop
+    sect2     nop
+    sect3     nop
+    sect4     nop
+    sect5     nop
+    section   nop
+    set       nop
+  </xsl:param>
+
+  <xsl:param name="toc.section.depth">1</xsl:param>
+
+  <xsl:param name="toc.max.depth">3</xsl:param>
+
+    <!-- Making the TOC -->
+  <xsl:template name="make.toc">
+    <xsl:param name="toc-context" select="."/>
+    <xsl:param name="nodes" select="/NOT-AN-ELEMENT"/>
+    <xsl:if test="$nodes">
+      <div class="toc">
+        <h3>
+          <xsl:call-template name="gentext">
+            <xsl:with-param name="key">TableofContents</xsl:with-param>
+          </xsl:call-template>
+        </h3>
+        <ul>
+          <xsl:apply-templates select="$nodes" mode="toc">
+            <xsl:with-param name="toc-context" select="$toc-context"/>
+          </xsl:apply-templates>
+        </ul>
+      </div>
+    </xsl:if>
+  </xsl:template>
+
+    <!-- Making the subtocs -->
+  <xsl:template name="subtoc">
+    <xsl:param name="toc-context" select="."/>
+    <xsl:param name="nodes" select="NOT-AN-ELEMENT"/>
+    <xsl:variable name="subtoc">
+      <ul>
+        <xsl:apply-templates mode="toc" select="$nodes">
+          <xsl:with-param name="toc-context" select="$toc-context"/>
+        </xsl:apply-templates>
+      </ul>
+    </xsl:variable>
+    <xsl:variable name="depth">
+      <xsl:choose>
+        <xsl:when test="local-name(.) = 'sect1'">1</xsl:when>
+        <xsl:otherwise>0</xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <xsl:variable name="depth.from.context"
+            select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
+    <li class="{name(.)}">
+      <xsl:call-template name="toc.line">
+        <xsl:with-param name="toc-context" select="$toc-context"/>
+      </xsl:call-template>
+      <xsl:if test="$toc.section.depth &gt; $depth and count($nodes)&gt;0
+              and $toc.max.depth &gt; $depth.from.context">
+        <xsl:copy-of select="$subtoc"/>
+      </xsl:if>
+    </li>
+  </xsl:template>
+
+    <!--Adding the h* tags and dropping redundats links-->
+  <xsl:template name="toc.line">
+    <xsl:param name="toc-context" select="."/>
+    <xsl:param name="depth" select="1"/>
+    <xsl:param name="depth.from.context" select="8"/>
+    <xsl:choose>
+      <xsl:when test="local-name(.) = 'sect1'">
+        <a>
+          <xsl:attribute name="href">
+            <xsl:call-template name="href.target">
+              <xsl:with-param name="context" select="$toc-context"/>
+            </xsl:call-template>
+          </xsl:attribute>
+          <xsl:apply-templates select="." mode="titleabbrev.markup"/>
+        </a>
+      </xsl:when>
+      <xsl:when test="local-name(.) = 'appendix'">
+        <a>
+          <xsl:attribute name="href">
+            <xsl:call-template name="href.target">
+              <xsl:with-param name="context" select="$toc-context"/>
+            </xsl:call-template>
+          </xsl:attribute>
+          <xsl:variable name="label">
+            <xsl:apply-templates select="." mode="label.markup"/>
+          </xsl:variable>
+          <xsl:copy-of select="$label"/>
+          <xsl:if test="$label != ''">
+            <xsl:value-of select="$autotoc.label.separator"/>
+          </xsl:if>
+          <xsl:apply-templates select="." mode="titleabbrev.markup"/>
+        </a>
+      </xsl:when>
+      <xsl:when test="local-name(.) = 'chapter' or local-name(.) = 'preface'">
+        <h4>
+          <xsl:variable name="label">
+            <xsl:apply-templates select="." mode="label.markup"/>
+          </xsl:variable>
+          <xsl:copy-of select="$label"/>
+          <xsl:if test="$label != ''">
+            <xsl:value-of select="$autotoc.label.separator"/>
+          </xsl:if>
+          <xsl:apply-templates select="." mode="titleabbrev.markup"/>
+        </h4>
+      </xsl:when>
+      <xsl:when test="local-name(.) = 'part'">
+        <h3>
+          <xsl:variable name="label">
+            <xsl:apply-templates select="." mode="label.markup"/>
+          </xsl:variable>
+          <xsl:copy-of select="$label"/>
+          <xsl:if test="$label != ''">
+            <xsl:value-of select="$autotoc.label.separator"/>
+          </xsl:if>
+          <xsl:apply-templates select="." mode="titleabbrev.markup"/>
+        </h3>
+      </xsl:when>
+      <xsl:otherwise>
+        <h3>
+          <a>
+            <xsl:attribute name="href">
+              <xsl:call-template name="href.target">
+                <xsl:with-param name="context" select="$toc-context"/>
+              </xsl:call-template>
+            </xsl:attribute>
+            <xsl:variable name="label">
+              <xsl:apply-templates select="." mode="label.markup"/>
+            </xsl:variable>
+            <xsl:copy-of select="$label"/>
+            <xsl:if test="$label != ''">
+              <xsl:value-of select="$autotoc.label.separator"/>
+            </xsl:if>
+            <xsl:apply-templates select="." mode="titleabbrev.markup"/>
+          </a>
+        </h3>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+</xsl:stylesheet>
Index: BOOK/stylesheets/xhtml/lfs-xref.xsl
===================================================================
--- BOOK/stylesheets/xhtml/lfs-xref.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/stylesheets/xhtml/lfs-xref.xsl	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,270 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns="http://www.w3.org/1999/xhtml"
+                version="1.0">
+
+     <!-- Making a proper punctuation in xref (only for English language).-->
+  <xsl:template match="xref" name="xref">
+    <xsl:variable name="targets" select="key('id',@linkend)"/>
+    <xsl:variable name="target" select="$targets[1]"/>
+    <xsl:variable name="refelem" select="local-name($target)"/>
+    <xsl:variable name="role" select="@role"/>
+    <xsl:call-template name="check.id.unique">
+      <xsl:with-param name="linkend" select="@linkend"/>
+    </xsl:call-template>
+    <xsl:call-template name="anchor"/>
+    <xsl:choose>
+      <xsl:when test="count($target) = 0">
+        <xsl:message>
+          <xsl:text>XRef to nonexistent id: </xsl:text>
+          <xsl:value-of select="@linkend"/>
+        </xsl:message>
+        <xsl:text>???</xsl:text>
+      </xsl:when>
+      <xsl:when test="$target/@xreflabel">
+        <a>
+          <xsl:attribute name="href">
+            <xsl:call-template name="href.target">
+              <xsl:with-param name="object" select="$target"/>
+            </xsl:call-template>
+          </xsl:attribute>
+          <xsl:call-template name="xref.xreflabel">
+            <xsl:with-param name="target" select="$target"/>
+          </xsl:call-template>
+        </a>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:variable name="href">
+          <xsl:call-template name="href.target">
+            <xsl:with-param name="object" select="$target"/>
+          </xsl:call-template>
+        </xsl:variable>
+        <xsl:apply-templates select="$target" mode="xref-to-prefix"/>
+        <a href="{$href}">
+          <xsl:if test="$target/title or $target/*/title">
+            <xsl:attribute name="title">
+              <xsl:apply-templates select="$target" mode="xref-title"/>
+            </xsl:attribute>
+          </xsl:if>
+          <xsl:apply-templates select="$target" mode="xref-to">
+            <xsl:with-param name="referrer" select="."/>
+            <xsl:with-param name="role" select="$role"/>
+            <xsl:with-param name="xrefstyle">
+              <xsl:value-of select="@xrefstyle"/>
+            </xsl:with-param>
+          </xsl:apply-templates>
+        </a>
+        <xsl:apply-templates select="$target" mode="xref-to-suffix"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template match="section|simplesect|sect1|sect2|sect3|sect4|sect5|refsect1
+          |refsect2|refsect3|refsection" mode="xref-to">
+    <xsl:param name="referrer"/>
+    <xsl:param name="xrefstyle"/>
+    <xsl:param name="role"/>
+    <xsl:apply-templates select="." mode="object.xref.markup">
+      <xsl:with-param name="purpose" select="'xref'"/>
+      <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+      <xsl:with-param name="referrer" select="$referrer"/>
+      <xsl:with-param name="role" select="$role"/>
+    </xsl:apply-templates>
+  </xsl:template>
+
+
+  <xsl:template match="*" mode="object.xref.markup">
+    <xsl:param name="purpose"/>
+    <xsl:param name="xrefstyle"/>
+    <xsl:param name="referrer"/>
+    <xsl:param name="role"/>
+    <xsl:variable name="template">
+      <xsl:choose>
+        <xsl:when test="starts-with(normalize-space($xrefstyle), 'select:')">
+          <xsl:call-template name="make.gentext.template">
+            <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+            <xsl:with-param name="purpose" select="$purpose"/>
+            <xsl:with-param name="referrer" select="$referrer"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:when test="starts-with(normalize-space($xrefstyle), 'template:')">
+          <xsl:value-of select="substring-after(normalize-space($xrefstyle), 'template:')"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates select="." mode="object.xref.template">
+            <xsl:with-param name="purpose" select="$purpose"/>
+            <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+            <xsl:with-param name="referrer" select="$referrer"/>
+          </xsl:apply-templates>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <xsl:if test="$template = ''">
+      <xsl:message>
+        <xsl:text>object.xref.markup: empty xref template</xsl:text>
+        <xsl:text> for linkend="</xsl:text>
+        <xsl:value-of select="@id"/>
+        <xsl:text>" and @xrefstyle="</xsl:text>
+        <xsl:value-of select="$xrefstyle"/>
+        <xsl:text>"</xsl:text>
+      </xsl:message>
+    </xsl:if>
+    <xsl:call-template name="substitute-markup">
+      <xsl:with-param name="purpose" select="$purpose"/>
+      <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+      <xsl:with-param name="referrer" select="$referrer"/>
+      <xsl:with-param name="template" select="$template"/>
+      <xsl:with-param name="role" select="$role"/>
+    </xsl:call-template>
+  </xsl:template>
+
+  <xsl:template name="substitute-markup">
+    <xsl:param name="template" select="''"/>
+    <xsl:param name="allow-anchors" select="'0'"/>
+    <xsl:param name="title" select="''"/>
+    <xsl:param name="subtitle" select="''"/>
+    <xsl:param name="label" select="''"/>
+    <xsl:param name="pagenumber" select="''"/>
+    <xsl:param name="purpose"/>
+    <xsl:param name="xrefstyle"/>
+    <xsl:param name="referrer"/>
+    <xsl:param name="role"/>
+    <xsl:choose>
+      <xsl:when test="contains($template, '%')">
+        <xsl:value-of select="substring-before($template, '%')"/>
+        <xsl:variable name="candidate"
+              select="substring(substring-after($template, '%'), 1, 1)"/>
+        <xsl:choose>
+          <xsl:when test="$candidate = 't'">
+            <xsl:apply-templates select="." mode="insert.title.markup">
+              <xsl:with-param name="purpose" select="$purpose"/>
+              <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+              <xsl:with-param name="role" select="$role"/>
+              <xsl:with-param name="title">
+                <xsl:choose>
+                  <xsl:when test="$title != ''">
+                    <xsl:copy-of select="$title"/>
+                  </xsl:when>
+                  <xsl:otherwise>
+                    <xsl:apply-templates select="." mode="title.markup">
+                      <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+                    </xsl:apply-templates>
+                  </xsl:otherwise>
+                </xsl:choose>
+              </xsl:with-param>
+            </xsl:apply-templates>
+          </xsl:when>
+          <xsl:when test="$candidate = 's'">
+            <xsl:apply-templates select="." mode="insert.subtitle.markup">
+              <xsl:with-param name="purpose" select="$purpose"/>
+              <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+              <xsl:with-param name="subtitle">
+                <xsl:choose>
+                  <xsl:when test="$subtitle != ''">
+                    <xsl:copy-of select="$subtitle"/>
+                  </xsl:when>
+                  <xsl:otherwise>
+                    <xsl:apply-templates select="." mode="subtitle.markup">
+                      <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+                    </xsl:apply-templates>
+                  </xsl:otherwise>
+                </xsl:choose>
+              </xsl:with-param>
+            </xsl:apply-templates>
+          </xsl:when>
+          <xsl:when test="$candidate = 'n'">
+            <xsl:apply-templates select="." mode="insert.label.markup">
+              <xsl:with-param name="purpose" select="$purpose"/>
+              <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+              <xsl:with-param name="label">
+                <xsl:choose>
+                  <xsl:when test="$label != ''">
+                    <xsl:copy-of select="$label"/>
+                  </xsl:when>
+                  <xsl:otherwise>
+                    <xsl:apply-templates select="." mode="label.markup"/>
+                  </xsl:otherwise>
+                </xsl:choose>
+              </xsl:with-param>
+            </xsl:apply-templates>
+          </xsl:when>
+          <xsl:when test="$candidate = 'p'">
+            <xsl:apply-templates select="." mode="insert.pagenumber.markup">
+              <xsl:with-param name="purpose" select="$purpose"/>
+              <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+              <xsl:with-param name="pagenumber">
+                <xsl:choose>
+                  <xsl:when test="$pagenumber != ''">
+                    <xsl:copy-of select="$pagenumber"/>
+                  </xsl:when>
+                  <xsl:otherwise>
+                    <xsl:apply-templates select="." mode="pagenumber.markup"/>
+                  </xsl:otherwise>
+                </xsl:choose>
+              </xsl:with-param>
+            </xsl:apply-templates>
+          </xsl:when>
+          <xsl:when test="$candidate = 'd'">
+            <xsl:apply-templates select="." mode="insert.direction.markup">
+              <xsl:with-param name="purpose" select="$purpose"/>
+              <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+              <xsl:with-param name="direction">
+                <xsl:choose>
+                  <xsl:when test="$referrer">
+                    <xsl:variable name="referent-is-below">
+                      <xsl:for-each select="preceding::xref">
+                        <xsl:if test="generate-id(.) = generate-id($referrer)">1</xsl:if>
+                      </xsl:for-each>
+                    </xsl:variable>
+                    <xsl:choose>
+                      <xsl:when test="$referent-is-below = ''">
+                        <xsl:call-template name="gentext">
+                          <xsl:with-param name="key" select="'above'"/>
+                        </xsl:call-template>
+                      </xsl:when>
+                      <xsl:otherwise>
+                        <xsl:call-template name="gentext">
+                          <xsl:with-param name="key" select="'below'"/>
+                        </xsl:call-template>
+                      </xsl:otherwise>
+                    </xsl:choose>
+                  </xsl:when>
+                  <xsl:otherwise>
+                    <xsl:message>Attempt to use %d in gentext with no referrer!</xsl:message>
+                  </xsl:otherwise>
+                </xsl:choose>
+              </xsl:with-param>
+            </xsl:apply-templates>
+          </xsl:when>
+          <xsl:when test="$candidate = '%' ">
+            <xsl:text>%</xsl:text>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:text>%</xsl:text><xsl:value-of select="$candidate"/>
+          </xsl:otherwise>
+        </xsl:choose>
+        <!-- recurse with the rest of the template string -->
+        <xsl:variable name="rest"
+              select="substring($template,
+              string-length(substring-before($template, '%'))+3)"/>
+        <xsl:call-template name="substitute-markup">
+          <xsl:with-param name="template" select="$rest"/>
+          <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+          <xsl:with-param name="title" select="$title"/>
+          <xsl:with-param name="subtitle" select="$subtitle"/>
+          <xsl:with-param name="label" select="$label"/>
+          <xsl:with-param name="pagenumber" select="$pagenumber"/>
+          <xsl:with-param name="purpose" select="$purpose"/>
+          <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+          <xsl:with-param name="referrer" select="$referrer"/>
+          <xsl:with-param name="role" select="$role"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$template"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+</xsl:stylesheet>
Index: BOOK/the-end/chapter.xml
===================================================================
--- BOOK/the-end/chapter.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/the-end/chapter.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../general.ent">
   %general-entities;
@@ -13,4 +13,5 @@
 
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="theend.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="getcounted.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="reboot.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="whatnow.xml"/>
Index: BOOK/the-end/getcounted.xml
===================================================================
--- BOOK/the-end/getcounted.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
+++ BOOK/the-end/getcounted.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-finish-getcounted">
+  <?dbhtml filename="getcounted.html"?>
+
+  <title>Get Counted</title>
+
+  <para>Now that you have finished the book, do you want to be counted
+  as an LFS user? Head over to <ulink
+  url="&lfs-root;cgi-bin/lfscounter.cgi"/> and register as an LFS user
+  by entering your name and the first LFS version you have used.</para>
+
+  <para>Let's reboot into LFS now.</para>
+
+</sect1>
Index: BOOK/the-end/reboot.xml
===================================================================
--- BOOK/the-end/reboot.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/the-end/reboot.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../general.ent">
   %general-entities;
@@ -11,4 +11,9 @@
   <title>Rebooting the System</title>
 
+  <para>If you built your final system using the boot method, just run
+  <command>shutdown -r now</command> to reboot again, using your newly-built
+  kernel instead of the miminal one currently in use. If you chrooted,
+  there are a few more steps.</para>
+
   <para>The system you have created in this book is quite minimal, and most
   likely will not have the functionality you would need to be able to
@@ -16,5 +21,5 @@
   book while still in our current chroot environment, you can leave
   yourself in a much better position to continue on once you reboot
-  into your new CLFS installation. Installing a text mode web browser,
+  into your new LFS installation. Installing a text mode web browser,
   such as Lynx, you can easily view the BLFS book in one virtual terminal,
   while building packages in another. The GPM package will also allow you
@@ -25,5 +30,29 @@
 
   <para>Now that we have said that, lets move on to booting our shiny
-  new CLFS installation for the first time! Reboot the system with:</para>
+  new LFS installation for the first time! First exit from the chroot
+  environment:</para>
+
+<screen><userinput>logout</userinput></screen>
+
+  <para>Then unmount the virtual file systems:</para>
+
+<screen><userinput>umount $LFS/dev/pts
+umount $LFS/dev/shm
+umount $LFS/dev
+umount $LFS/proc
+umount $LFS/sys</userinput></screen>
+
+  <para>Unmount the LFS file system itself:</para>
+
+<screen><userinput>umount $LFS</userinput></screen>
+
+  <para>If multiple partitions were created, unmount the other
+  partitions before unmounting the main one, like this:</para>
+
+<screen><userinput>umount $LFS/usr
+umount $LFS/home
+umount $LFS</userinput></screen>
+
+  <para>Now, reboot the system with:</para>
 
 <screen><userinput>shutdown -r now</userinput></screen>
@@ -32,5 +61,5 @@
   <emphasis>CLFS &version;</emphasis> will boot automatically.</para>
 
-  <para>When the reboot is complete, the CLFS system is ready for use and
+  <para>When the reboot is complete, the LFS system is ready for use and
   more software may be added to suit your needs.</para>
 
Index: BOOK/the-end/theend.xml
===================================================================
--- BOOK/the-end/theend.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/the-end/theend.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../general.ent">
   %general-entities;
@@ -24,7 +24,5 @@
   Create this file by running:</para>
 
-<screen><userinput>cat &gt; ${CLFS}/etc/clfs-release &lt;&lt; EOF
-CLFS-Sysroot-&version;
-EOF</userinput></screen>
+<screen><userinput>echo &version; &gt; /etc/clfs-release</userinput></screen>
 
 </sect1>
Index: BOOK/the-end/whatnow.xml
===================================================================
--- BOOK/the-end/whatnow.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ BOOK/the-end/whatnow.xml	(revision 02095ae2677b1a04865e7362509b6a5c1647e4e2)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../general.ent">
   %general-entities;
@@ -11,9 +11,9 @@
   <title>What Now?</title>
 
-  <para>Thank you for reading this CLFS book. We hope that you have
+  <para>Thank you for reading this LFS book. We hope that you have
   found this book helpful and have learned more about the system
   creation process.</para>
 
-  <para>Now that the CLFS system is installed, you may be wondering
+  <para>Now that the LFS system is installed, you may be wondering
   <quote>What next?</quote> To answer that question, we have compiled
   a list of resources for you.</para>
@@ -25,5 +25,5 @@
 
       <para>Bugs and security notices are reported regularly for all software.
-      Since an CLFS system is compiled from source, it is up to you to keep
+      Since an LFS system is compiled from source, it is up to you to keep
       abreast of such reports.  There are several online resources that track
       such reports, some of which are shown below:</para>
@@ -62,12 +62,9 @@
 
     <listitem>
-      <para>Community Driven Beyond Linux From Scratch</para>
+      <para>Beyond Linux From Scratch</para>
 
-      <para>The Community Driven Beyond Linux From Scratch wiki covers installation
-      procedures for a wide range of software beyond the scope of the CLFS
-      Book. CBLFS is designed specifically to work with the CLFS book, and has all
-      the necessary information to continue the builds in the same manner that CLFS
-      uses. This is a community driven project, which means anyone can contribute and
-      provide updates. The CBLFS project is located at <ulink url="&cblfs-root;"/>.</para>
+      <para>The Beyond Linux From Scratch book covers installation
+      procedures for a wide range of software beyond the scope of the LFS
+      Book. The BLFS project is located at <ulink url="&blfs-root;"/>.</para>
     </listitem>
 
Index: OK/tidy.sh
===================================================================
--- BOOK/tidy.sh	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,23 +1,0 @@
-#!/bin/sh
-# Written By: Joe Ciccone <jciccone@gmail.com>
-
-if test -z "$1"; then
-  echo "Usage: $0 path"
-  exit 1
-fi
-
-TOP=`dirname $0`
-
-if test -d "$1"; then
-  find "$1" -type f -name \*.html | while read file; do
-    tidy -config "${TOP}/tidy.conf" "$file"
-    bash "${TOP}/obfuscate.sh" "$file"
-    sed -i -e "s@text/html@application/xhtml+xml@g" "$file"
-  done
-else
-  tidy -config "${TOP}/tidy.conf" "$1"
-    bash "${TOP}/obfuscate.sh" "$1"
-    sed -i -e "s@text/html@application/xhtml+xml@g" "$1"
-fi
-
-exit $?
Index: OK/users_groups.ent
===================================================================
--- BOOK/users_groups.ent	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,41 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<!-- User IDs for use throught the book -->
-
-<!ENTITY uid-root "0">
-<!ENTITY uid-bin "1">
-<!ENTITY uid-daemon "2">
-<!ENTITY uid-adm "3">
-<!ENTITY uid-lp "10">
-<!ENTITY uid-mail "30">
-<!ENTITY uid-news "31">
-<!ENTITY uid-operator "50">
-<!ENTITY uid-postmaster "51">
-<!ENTITY uid-nobody "65534">
-
-<!-- Group IDs for use throught the book -->
-
-<!ENTITY gid-root "0">
-<!ENTITY gid-bin "1">
-<!ENTITY gid-sys "2">
-<!ENTITY gid-kmem "3">
-<!ENTITY gid-tty "4">
-<!ENTITY gid-tape "5">
-<!ENTITY gid-daemon "6">
-<!ENTITY gid-floppy "7">
-<!ENTITY gid-disk "8">
-<!ENTITY gid-lp "9">
-<!ENTITY gid-dialout "10">
-<!ENTITY gid-audio "11">
-<!ENTITY gid-video "12">
-<!ENTITY gid-utmp "13">
-<!ENTITY gid-usb "14">
-<!ENTITY gid-cdrom "15">
-<!ENTITY gid-adm "16">
-<!ENTITY gid-console "17">
-<!ENTITY gid-cdrw "18">
-<!ENTITY gid-mail "30">
-<!ENTITY gid-news "31">
-<!ENTITY gid-users "1000">
-<!ENTITY gid-nogroup "65533">
-<!ENTITY gid-nobody "65534">
Index: OK/x86-index.xml
===================================================================
--- BOOK/x86-index.xml	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,72 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "general.ent">
-  %general-entities;
-]>
-
-<book>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="prologue/x86/bookinfo.xml"/>
-  <!--
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="prologue/dedication.xml"/>
-  -->
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="prologue/preface.xml"/>
-
-  <part id="part1">
-    <?dbhtml filename="part1.html"?>
-
-    <title>Introduction</title>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="introduction/x86-chapter.xml"/>
-
-  </part>
-
-  <part id="part2">
-    <?dbhtml filename="part2.html"?>
-
-    <title>Preparing for the Build</title>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="partitioning/x86-chapter.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="materials/x86-chapter.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="final-preps/chapter.xml"/>
-
-  </part>
-
-  <part id="part3">
-    <?dbhtml filename="part3.html"?>
-
-    <title>Make the Cross-Compile Tools</title>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="cross-tools/x86-chapter.xml"/>
-
-  </part>
-
-  <part id="part4">
-    <?dbhtml filename="part4.html"?>
-
-    <title>Building the CLFS System</title>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="final-system/x86-chapter.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bootscripts/x86-chapter.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="network/x86-chapter.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bootable/x86-chapter.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="the-end/chapter.xml"/>
-
-  </part>
-
-  <part id="part5">
-    <?dbhtml filename="part5.html"?>
-
-    <title>Appendices</title>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="appendices/acronymlist.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="appendices/dependencies/common.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="appendices/dependencies/x86.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="appendices/license.xml"/>
-
-  </part>
-
-  <index/>
-
-</book>
Index: tches/bash-4.0-branch_update-6.patch
===================================================================
--- patches/bash-4.0-branch_update-6.patch	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,1211 +1,0 @@
-Submitted By: Jim Gifford (jim at cross-lfs dot org)
-Date: 07-22-2009
-Initial Package Version: 4.0
-Origin: Upstream
-Upstream Status: Applied
-Description: Contains all upstream patches up to 4.0-028
-
-diff -Naur bash-4.0.orig/arrayfunc.c bash-4.0/arrayfunc.c
---- bash-4.0.orig/arrayfunc.c	2009-01-04 11:32:21.000000000 -0800
-+++ bash-4.0/arrayfunc.c	2009-07-22 15:31:16.000000000 -0700
-@@ -604,64 +604,7 @@
-     }
- }
- 
--/* This function assumes s[i] == '['; returns with s[ret] == ']' if
--   an array subscript is correctly parsed. */
--int
--skipsubscript (s, i)
--     const char *s;
--     int i;
--{
--  int count, c;
--#if defined (HANDLE_MULTIBYTE)
--  mbstate_t state, state_bak;
--  size_t slength, mblength;
--#endif
--
--#if defined (HANDLE_MULTIBYTE)
--  memset (&state, '\0', sizeof (mbstate_t));
--  slength = strlen (s + i);
--#endif
--  
--  count = 1;
--  while (count)
--    {
--      /* Advance one (possibly multibyte) character in S starting at I. */
--#if defined (HANDLE_MULTIBYTE)
--      if (MB_CUR_MAX > 1)
--	{
--	  state_bak = state;
--	  mblength = mbrlen (s + i, slength, &state);
--
--	  if (MB_INVALIDCH (mblength))
--	    {
--	      state = state_bak;
--	      i++;
--	      slength--;
--	    }
--	  else if (MB_NULLWCH (mblength))
--	    return i;
--	  else
--	    {
--	      i += mblength;
--	      slength -= mblength;
--	    }
--	}
--      else
--#endif
--      ++i;
--
--      c = s[i];
--
--      if (c == 0)
--	break;
--      else if (c == '[')
--	count++;
--      else if (c == ']')
--	count--;
--    }
--
--  return i;
--}
-+/* skipsubscript moved to subst.c to use private functions. 2009/02/24. */
- 
- /* This function is called with SUB pointing to just after the beginning
-    `[' of an array subscript and removes the array element to which SUB
-diff -Naur bash-4.0.orig/builtins/declare.def bash-4.0/builtins/declare.def
---- bash-4.0.orig/builtins/declare.def	2009-01-04 11:32:22.000000000 -0800
-+++ bash-4.0/builtins/declare.def	2009-07-22 15:31:12.000000000 -0700
-@@ -295,6 +295,13 @@
-       subscript_start = (char *)NULL;
-       if (t = strchr (name, '['))	/* ] */
- 	{
-+	  /* If offset != 0 we have already validated any array reference */
-+	  if (offset == 0 && valid_array_reference (name) == 0)
-+	    {
-+	      sh_invalidid (name);
-+	      assign_error++;
-+	      NEXT_VARIABLE ();
-+	    }
- 	  subscript_start = t;
- 	  *t = '\0';
- 	  making_array_special = 1;
-@@ -484,7 +491,7 @@
- 	    }
- 	  /* declare -a name[[n]] or declare name[n] makes name an indexed
- 	     array variable. */
--	  else if ((making_array_special || (flags_on & att_array)) && array_p (var) == 0)
-+	  else if ((making_array_special || (flags_on & att_array)) && array_p (var) == 0 && assoc_p (var) == 0)
- 	    var = convert_var_to_array (var);
- #endif /* ARRAY_VARS */
- 
-diff -Naur bash-4.0.orig/builtins/exit.def bash-4.0/builtins/exit.def
---- bash-4.0.orig/builtins/exit.def	2009-01-04 11:32:22.000000000 -0800
-+++ bash-4.0/builtins/exit.def	2009-07-22 15:31:11.000000000 -0700
-@@ -113,7 +113,7 @@
-       for (i = stopmsg = 0; i < js.j_jobslots; i++)
- 	if (jobs[i] && STOPPED (i))
- 	  stopmsg = JSTOPPED;
--	else if (check_jobs_at_exit && stopmsg == 0 && RUNNING (i))
-+	else if (check_jobs_at_exit && stopmsg == 0 && jobs[i] && RUNNING (i))
- 	  stopmsg = JRUNNING;
- 
-       if (stopmsg == JSTOPPED)
-diff -Naur bash-4.0.orig/builtins/fc.def bash-4.0/builtins/fc.def
---- bash-4.0.orig/builtins/fc.def	2009-01-04 11:32:22.000000000 -0800
-+++ bash-4.0/builtins/fc.def	2009-07-22 15:31:26.000000000 -0700
-@@ -88,6 +88,7 @@
- extern int current_command_line_count;
- extern int literal_history;
- extern int posixly_correct;
-+extern int subshell_environment, interactive_shell;
- 
- extern int unlink __P((const char *));
- 
-@@ -172,7 +173,7 @@
-   register int i;
-   register char *sep;
-   int numbering, reverse, listing, execute;
--  int histbeg, histend, last_hist, retval, opt;
-+  int histbeg, histend, last_hist, retval, opt, rh;
-   FILE *stream;
-   REPL *rlist, *rl;
-   char *ename, *command, *newcom, *fcedit;
-@@ -275,6 +276,8 @@
- 
-       fprintf (stderr, "%s\n", command);
-       fc_replhist (command);	/* replace `fc -s' with command */
-+      /* Posix says that the re-executed commands should be entered into the
-+	 history. */
-       return (parse_and_execute (command, "fc", SEVAL_NOHIST));
-     }
- 
-@@ -293,7 +296,12 @@
-      line was actually added (HISTIGNORE may have caused it to not be),
-      so we check hist_last_line_added. */
- 
--  last_hist = i - remember_on_history - hist_last_line_added;
-+  /* Even though command substitution through parse_and_execute turns off
-+     remember_on_history, command substitution in a shell when set -o history
-+     has been enabled (interactive or not) should use it in the last_hist
-+     calculation as if it were on. */
-+  rh = remember_on_history || ((subshell_environment & SUBSHELL_COMSUB) && enable_history_list);
-+  last_hist = i - rh - hist_last_line_added;
- 
-   if (list)
-     {
-@@ -456,7 +464,7 @@
-      char *command;
-      HIST_ENTRY **hlist;
- {
--  int sign, n, clen;
-+  int sign, n, clen, rh;
-   register int i, j;
-   register char *s;
- 
-@@ -472,7 +480,12 @@
-      line was actually added (HISTIGNORE may have caused it to not be),
-      so we check hist_last_line_added.  This needs to agree with the
-      calculation of last_hist in fc_builtin above. */
--  i -= remember_on_history + hist_last_line_added;
-+  /* Even though command substitution through parse_and_execute turns off
-+     remember_on_history, command substitution in a shell when set -o history
-+     has been enabled (interactive or not) should use it in the last_hist
-+     calculation as if it were on. */
-+  rh = remember_on_history || ((subshell_environment & SUBSHELL_COMSUB) && enable_history_list);
-+  i -= rh + hist_last_line_added;
- 
-   /* No specification defaults to most recent command. */
-   if (command == NULL)
-diff -Naur bash-4.0.orig/builtins/read.def bash-4.0/builtins/read.def
---- bash-4.0.orig/builtins/read.def	2009-01-15 20:11:21.000000000 -0800
-+++ bash-4.0/builtins/read.def	2009-07-22 15:31:19.000000000 -0700
-@@ -369,14 +369,14 @@
-       code = setjmp (alrmbuf);
-       if (code)
- 	{
--#if 0
-+	  /* Tricky.  The top of the unwind-protect stack is the free of
-+	     input_string.  We want to run all the rest and use input_string,
-+	     so we have to remove it from the stack. */
-+	  remove_unwind_protect ();
- 	  run_unwind_frame ("read_builtin");
--	  return (EXECUTION_FAILURE);
--#else
- 	  input_string[i] = '\0';	/* make sure it's terminated */
--	  retval = 128+SIGALRM;;
-+	  retval = 128+SIGALRM;
- 	  goto assign_vars;
--#endif
- 	}
-       old_alrm = set_signal_handler (SIGALRM, sigalrm);
-       add_unwind_protect (reset_alarm, (char *)NULL);
-diff -Naur bash-4.0.orig/doc/bash.1 bash-4.0/doc/bash.1
---- bash-4.0.orig/doc/bash.1	2009-02-18 12:13:56.000000000 -0800
-+++ bash-4.0/doc/bash.1	2009-07-22 15:31:48.000000000 -0700
-@@ -8257,9 +8257,10 @@
- Exit after reading and executing one command.
- .TP 8
- .B \-u
--Treat unset variables as an error when performing
-+Treat unset variables and parameters other than the special
-+parameters "@" and "*" as an error when performing
- parameter expansion.  If expansion is attempted on an
--unset variable, the shell prints an error message, and,
-+unset variable or parameter, the shell prints an error message, and,
- if not interactive, exits with a non-zero status.
- .TP 8
- .B \-v
-diff -Naur bash-4.0.orig/doc/bashref.texi bash-4.0/doc/bashref.texi
---- bash-4.0.orig/doc/bashref.texi	2009-02-18 12:14:43.000000000 -0800
-+++ bash-4.0/doc/bashref.texi	2009-07-22 15:31:48.000000000 -0700
-@@ -4138,7 +4138,8 @@
- Exit after reading and executing one command.
- 
- @item -u
--Treat unset variables as an error when performing parameter expansion.
-+Treat unset variables and parameters other than the special parameters
-+@samp{@@} or @samp{*} as an error when performing parameter expansion.
- An error message will be written to the standard error, and a non-interactive
- shell will exit.
- 
-diff -Naur bash-4.0.orig/execute_cmd.c bash-4.0/execute_cmd.c
---- bash-4.0.orig/execute_cmd.c	2009-02-13 13:41:41.000000000 -0800
-+++ bash-4.0/execute_cmd.c	2009-07-22 15:31:29.000000000 -0700
-@@ -568,6 +568,7 @@
- 
-       /* Fork a subshell, turn off the subshell bit, turn off job
- 	 control and call execute_command () on the command again. */
-+      line_number_for_err_trap = line_number;
-       paren_pid = make_child (savestring (make_command_string (command)),
- 			      asynchronous);
-       if (paren_pid == 0)
-@@ -610,7 +611,10 @@
- 	      if (user_subshell && was_error_trap && ignore_return == 0 && invert == 0 && exec_result != EXECUTION_SUCCESS)
- 		{
- 		  last_command_exit_value = exec_result;
-+		  save_line_number = line_number;
-+		  line_number = line_number_for_err_trap;
- 		  run_error_trap ();
-+		  line_number = save_line_number;
- 		}
- 
- 	      if (user_subshell && ignore_return == 0 && invert == 0 && exit_immediately_on_error && exec_result != EXECUTION_SUCCESS)
-@@ -766,7 +770,9 @@
-       if (was_error_trap && ignore_return == 0 && invert == 0 && pipe_in == NO_PIPE && pipe_out == NO_PIPE && exec_result != EXECUTION_SUCCESS)
- 	{
- 	  last_command_exit_value = exec_result;
-+	  line_number = line_number_for_err_trap;
- 	  run_error_trap ();
-+	  line_number = save_line_number;
- 	}
- 
-       if (ignore_return == 0 && invert == 0 &&
-@@ -2105,6 +2111,7 @@
-   REDIRECT *rp;
-   COMMAND *tc, *second;
-   int ignore_return, exec_result, was_error_trap, invert;
-+  volatile int save_line_number;
- 
-   ignore_return = (command->flags & CMD_IGNORE_RETURN) != 0;
- 
-@@ -2174,12 +2181,16 @@
-       invert = (command->flags & CMD_INVERT_RETURN) != 0;
-       ignore_return = (command->flags & CMD_IGNORE_RETURN) != 0;
- 
-+      line_number_for_err_trap = line_number;
-       exec_result = execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close);
- 
-       if (was_error_trap && ignore_return == 0 && invert == 0 && exec_result != EXECUTION_SUCCESS)
- 	{
- 	  last_command_exit_value = exec_result;
-+	  save_line_number = line_number;
-+	  line_number = line_number_for_err_trap;
- 	  run_error_trap ();
-+	  line_number = save_line_number;
- 	}
- 
-       if (ignore_return == 0 && invert == 0 && exit_immediately_on_error && exec_result != EXECUTION_SUCCESS)
-@@ -2930,7 +2941,7 @@
- 		  retval = execute_command (clauses->action);
- 		}
- 	      while ((clauses->flags & CASEPAT_FALLTHROUGH) && (clauses = clauses->next));
--	      if ((clauses->flags & CASEPAT_TESTNEXT) == 0)
-+	      if (clauses == 0 || (clauses->flags & CASEPAT_TESTNEXT) == 0)
- 		EXIT_CASE ();
- 	      else
- 		break;
-diff -Naur bash-4.0.orig/externs.h bash-4.0/externs.h
---- bash-4.0.orig/externs.h	2009-01-18 15:29:29.000000000 -0800
-+++ bash-4.0/externs.h	2009-07-22 15:31:45.000000000 -0700
-@@ -192,6 +192,8 @@
- extern char *fmtumax __P((uintmax_t, int, char *, size_t, int));
- 
- /* Declarations for functions defined in lib/sh/fpurge.c */
-+
-+#if defined NEED_FPURGE_DECL
- #if !HAVE_DECL_FPURGE
- 
- #if HAVE_FPURGE
-@@ -200,7 +202,7 @@
- extern int fpurge __P((FILE *stream));
- 
- #endif /* HAVE_DECL_FPURGE */
--
-+#endif /* NEED_FPURGE_DECL */
- 
- /* Declarations for functions defined in lib/sh/getcwd.c */
- #if !defined (HAVE_GETCWD)
-diff -Naur bash-4.0.orig/jobs.c bash-4.0/jobs.c
---- bash-4.0.orig/jobs.c	2009-01-29 14:09:49.000000000 -0800
-+++ bash-4.0/jobs.c	2009-07-22 15:31:34.000000000 -0700
-@@ -442,7 +442,7 @@
-   old_pipeline = the_pipeline;
-   the_pipeline = saved_pipeline;
-   already_making_children = saved_already_making_children;
--  if (discard)
-+  if (discard && old_pipeline)
-     discard_pipeline (old_pipeline);
- }
- 
-@@ -4202,4 +4202,23 @@
-   sh_closepipe (pgrp_pipe);
- }
- 
-+void
-+save_pgrp_pipe (p, clear)
-+     int *p;
-+     int clear;
-+{
-+  p[0] = pgrp_pipe[0];
-+  p[1] = pgrp_pipe[1];
-+  if (clear)
-+    pgrp_pipe[0] = pgrp_pipe[1] = -1;
-+}
-+
-+void
-+restore_pgrp_pipe (p)
-+     int *p;
-+{
-+  pgrp_pipe[0] = p[0];
-+  pgrp_pipe[1] = p[1];
-+}
-+
- #endif /* PGRP_PIPE */
-diff -Naur bash-4.0.orig/jobs.h bash-4.0/jobs.h
---- bash-4.0.orig/jobs.h	2009-01-04 11:32:29.000000000 -0800
-+++ bash-4.0/jobs.h	2009-07-22 15:31:34.000000000 -0700
-@@ -235,6 +235,8 @@
- extern void init_job_stats __P((void));
- 
- extern void close_pgrp_pipe __P((void));
-+extern void save_pgrp_pipe __P((int *, int));
-+extern void restore_pgrp_pipe __P((int *));
- 
- #if defined (JOB_CONTROL)
- extern int job_control;
-diff -Naur bash-4.0.orig/lib/glob/glob.c bash-4.0/lib/glob/glob.c
---- bash-4.0.orig/lib/glob/glob.c	2009-01-04 11:32:30.000000000 -0800
-+++ bash-4.0/lib/glob/glob.c	2009-07-22 15:31:43.000000000 -0700
-@@ -356,7 +356,7 @@
- 	*np = 0;
-       if (ep)
-         *ep = 0;
--      if (r)
-+      if (r && r != &glob_error_return)
- 	free (r);
-       return (struct globval *)0;
-     }
-@@ -665,7 +665,9 @@
-       (void) closedir (d);
-     }
- 
--  /* compat: if GX_ALLDIRS, add the passed directory also */
-+  /* compat: if GX_ADDCURDIR, add the passed directory also.  Add an empty
-+     directory name as a placeholder if GX_NULLDIR (in which case the passed
-+     directory name is "."). */
-   if (add_current)
-     {
-       sdlen = strlen (dir);
-@@ -942,7 +944,12 @@
- 	      char **array;
- 	      register unsigned int l;
- 
--	      array = glob_dir_to_array (directories[i], temp_results, flags);
-+	      /* If we're expanding **, we don't need to glue the directory
-+		 name to the results; we've already done it in glob_vector */
-+	      if ((dflags & GX_ALLDIRS) && filename[0] == '*' && filename[1] == '*' && filename[2] == '\0')
-+		array = temp_results;
-+	      else
-+		array = glob_dir_to_array (directories[i], temp_results, flags);
- 	      l = 0;
- 	      while (array[l] != NULL)
- 		++l;
-@@ -959,7 +966,8 @@
- 	      result[result_size - 1] = NULL;
- 
- 	      /* Note that the elements of ARRAY are not freed.  */
--	      free ((char *) array);
-+	      if (array != temp_results)
-+		free ((char *) array);
- 	    }
- 	}
-       /* Free the directories.  */
-@@ -1003,11 +1011,24 @@
- 
-       /* Just return what glob_vector () returns appended to the
- 	 directory name. */
-+      /* If flags & GX_ALLDIRS, we're called recursively */
-       dflags = flags & ~GX_MARKDIRS;
-       if (directory_len == 0)
- 	dflags |= GX_NULLDIR;
-       if ((flags & GX_GLOBSTAR) && filename[0] == '*' && filename[1] == '*' && filename[2] == '\0')
--	dflags |= GX_ALLDIRS|GX_ADDCURDIR;
-+	{
-+	  dflags |= GX_ALLDIRS|GX_ADDCURDIR;
-+#if 0
-+	  /* If we want all directories (dflags & GX_ALLDIRS) and we're not
-+	     being called recursively as something like `echo **/*.o'
-+	     ((flags & GX_ALLDIRS) == 0), we want to prevent glob_vector from
-+	     adding a null directory name to the front of the temp_results
-+	     array.  We turn off ADDCURDIR if not called recursively and
-+	     dlen == 0 */
-+#endif
-+	  if (directory_len == 0 && (flags & GX_ALLDIRS) == 0)
-+	    dflags &= ~GX_ADDCURDIR;
-+	}
-       temp_results = glob_vector (filename,
- 				  (directory_len == 0 ? "." : directory_name),
- 				  dflags);
-diff -Naur bash-4.0.orig/lib/readline/display.c bash-4.0/lib/readline/display.c
---- bash-4.0.orig/lib/readline/display.c	2009-01-04 11:32:32.000000000 -0800
-+++ bash-4.0/lib/readline/display.c	2009-07-22 15:31:46.000000000 -0700
-@@ -512,6 +512,7 @@
-   /* Block keyboard interrupts because this function manipulates global
-      data structures. */
-   _rl_block_sigint ();  
-+  RL_SETSTATE (RL_STATE_REDISPLAYING);
- 
-   if (!rl_display_prompt)
-     rl_display_prompt = "";
-@@ -1188,9 +1189,11 @@
-       if (t < out)
- 	line[t - 1] = '>';
- 
--      if (!rl_display_fixed || forced_display || lmargin != last_lmargin)
-+      if (rl_display_fixed == 0 || forced_display || lmargin != last_lmargin)
- 	{
- 	  forced_display = 0;
-+	  o_cpos = _rl_last_c_pos;
-+	  cpos_adjusted = 0;
- 	  update_line (&visible_line[last_lmargin],
- 		       &invisible_line[lmargin],
- 		       0,
-@@ -1198,6 +1201,13 @@
- 		       _rl_screenwidth + (lmargin ? 0 : wrap_offset),
- 		       0);
- 
-+	  if ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) &&
-+	      cpos_adjusted == 0 &&
-+	      _rl_last_c_pos != o_cpos &&
-+	      _rl_last_c_pos > wrap_offset &&
-+	      o_cpos < prompt_last_invisible)
-+		_rl_last_c_pos -= prompt_invis_chars_first_line;	/* XXX - was wrap_offset */
-+
- 	  /* If the visible new line is shorter than the old, but the number
- 	     of invisible characters is greater, and we are at the end of
- 	     the new line, we need to clear to eol. */
-@@ -1236,6 +1246,7 @@
-       visible_wrap_offset = wrap_offset;
-   }
- 
-+  RL_UNSETSTATE (RL_STATE_REDISPLAYING);
-   _rl_release_sigint ();
- }
- 
-@@ -1772,7 +1783,7 @@
- 	     space_to_eol will insert too many spaces.  XXX - maybe we should
- 	     adjust col_lendiff based on the difference between _rl_last_c_pos
- 	     and _rl_screenwidth */
--	  if (col_lendiff && (_rl_last_c_pos < _rl_screenwidth))
-+	  if (col_lendiff && ((MB_CUR_MAX == 1 || rl_byte_oriented) || (_rl_last_c_pos < _rl_screenwidth)))
- #endif
- 	    {	  
- 	      if (_rl_term_autowrap && current_line < inv_botlin)
-@@ -1892,6 +1903,10 @@
- 
-   woff = WRAP_OFFSET (_rl_last_v_pos, wrap_offset);
-   cpos = _rl_last_c_pos;
-+
-+  if (cpos == 0 && cpos == new)
-+    return;
-+
- #if defined (HANDLE_MULTIBYTE)
-   /* If we have multibyte characters, NEW is indexed by the buffer point in
-      a multibyte string, but _rl_last_c_pos is the display position.  In
-@@ -1905,9 +1920,9 @@
- 	 prompt string, since they're both buffer indices and DPOS is a
- 	 desired display position. */
-       if ((new > prompt_last_invisible) ||		/* XXX - don't use woff here */
--	  (prompt_physical_chars > _rl_screenwidth &&
-+	  (prompt_physical_chars >= _rl_screenwidth &&
- 	   _rl_last_v_pos == prompt_last_screen_line &&
--	   wrap_offset >= woff &&
-+	   wrap_offset >= woff && dpos >= woff &&
- 	   new > (prompt_last_invisible-(_rl_screenwidth*_rl_last_v_pos)-wrap_offset)))
- 	   /* XXX last comparison might need to be >= */
- 	{
-diff -Naur bash-4.0.orig/lib/readline/readline.h bash-4.0/lib/readline/readline.h
---- bash-4.0.orig/lib/readline/readline.h	2009-01-04 11:32:33.000000000 -0800
-+++ bash-4.0/lib/readline/readline.h	2009-07-22 15:31:36.000000000 -0700
-@@ -814,8 +814,9 @@
- #define RL_STATE_VIMOTION	0x100000	/* reading vi motion arg */
- #define RL_STATE_MULTIKEY	0x200000	/* reading multiple-key command */
- #define RL_STATE_VICMDONCE	0x400000	/* entered vi command mode at least once */
-+#define RL_STATE_REDISPLAYING	0x800000	/* updating terminal display */
- 
--#define RL_STATE_DONE		0x800000	/* done; accepted line */
-+#define RL_STATE_DONE		0x1000000	/* done; accepted line */
- 
- #define RL_SETSTATE(x)		(rl_readline_state |= (x))
- #define RL_UNSETSTATE(x)	(rl_readline_state &= ~(x))
-diff -Naur bash-4.0.orig/lib/readline/terminal.c bash-4.0/lib/readline/terminal.c
---- bash-4.0.orig/lib/readline/terminal.c	2009-01-04 11:32:34.000000000 -0800
-+++ bash-4.0/lib/readline/terminal.c	2009-07-22 15:31:36.000000000 -0700
-@@ -355,7 +355,7 @@
-       _rl_get_screen_size (fileno (rl_instream), 1);
-       if (CUSTOM_REDISPLAY_FUNC ())
- 	rl_forced_update_display ();
--      else
-+      else if (RL_ISSTATE(RL_STATE_REDISPLAYING) == 0)
- 	_rl_redisplay_after_sigwinch ();
-     }
- }
-diff -Naur bash-4.0.orig/lib/sh/winsize.c bash-4.0/lib/sh/winsize.c
---- bash-4.0.orig/lib/sh/winsize.c	2008-08-12 10:53:51.000000000 -0700
-+++ bash-4.0/lib/sh/winsize.c	2009-07-22 15:31:33.000000000 -0700
-@@ -30,16 +30,29 @@
- 
- #include <sys/ioctl.h>
- 
--#if !defined (STRUCT_WINSIZE_IN_SYS_IOCTL)
--/* For struct winsize on SCO */
--/*   sys/ptem.h has winsize but needs mblk_t from sys/stream.h */
--#  if defined (HAVE_SYS_PTEM_H) && defined (TIOCGWINSZ) && defined (SIGWINCH)
--#    if defined (HAVE_SYS_STREAM_H)
--#      include <sys/stream.h>
--#    endif
-+/* Try to find the definitions of `struct winsize' and TIOGCWINSZ */
-+
-+#if defined (GWINSZ_IN_SYS_IOCTL) && !defined (TIOCGWINSZ)
-+#  include <sys/ioctl.h>
-+#endif /* GWINSZ_IN_SYS_IOCTL && !TIOCGWINSZ */
-+
-+#if defined (STRUCT_WINSIZE_IN_TERMIOS) && !defined (STRUCT_WINSIZE_IN_SYS_IOCTL)
-+#  include <termios.h>
-+#endif /* STRUCT_WINSIZE_IN_TERMIOS && !STRUCT_WINSIZE_IN_SYS_IOCTL */
-+
-+/* Not in either of the standard places, look around. */
-+#if !defined (STRUCT_WINSIZE_IN_TERMIOS) && !defined (STRUCT_WINSIZE_IN_SYS_IOCTL)
-+#  if defined (HAVE_SYS_STREAM_H)
-+#    include <sys/stream.h>
-+#  endif /* HAVE_SYS_STREAM_H */
-+#  if defined (HAVE_SYS_PTEM_H) /* SVR4.2, at least, has it here */
- #    include <sys/ptem.h>
--#  endif /* HAVE_SYS_PTEM_H && TIOCGWINSZ && SIGWINCH */
--#endif /* !STRUCT_WINSIZE_IN_SYS_IOCTL */
-+#    define _IO_PTEM_H          /* work around SVR4.2 1.1.4 bug */
-+#  endif /* HAVE_SYS_PTEM_H */
-+#  if defined (HAVE_SYS_PTE_H)  /* ??? */
-+#    include <sys/pte.h>
-+#  endif /* HAVE_SYS_PTE_H */
-+#endif /* !STRUCT_WINSIZE_IN_TERMIOS && !STRUCT_WINSIZE_IN_SYS_IOCTL */
- 
- #include <stdio.h>
- 
-diff -Naur bash-4.0.orig/parse.y bash-4.0/parse.y
---- bash-4.0.orig/parse.y	2009-01-08 05:29:12.000000000 -0800
-+++ bash-4.0/parse.y	2009-07-22 15:31:39.000000000 -0700
-@@ -1122,7 +1122,7 @@
- 			  REDIRECTEE rd;
- 			  REDIRECT *r;
- 
--			  tc = $1;
-+			  tc = $1->type == cm_simple ? (COMMAND *)$1->value.Simple : $1;
- 			  rd.dest = 1;
- 			  r = make_redirection (2, r_duplicating_output, rd);
- 			  if (tc->redirects)
-@@ -1615,10 +1615,11 @@
- {
-   int *ret;
- 
--  ret = (int *)xmalloc (3 * sizeof (int));
-+  ret = (int *)xmalloc (4 * sizeof (int));
-   ret[0] = last_read_token;
-   ret[1] = token_before_that;
-   ret[2] = two_tokens_ago;
-+  ret[3] = current_token;
-   return ret;
- }
- 
-@@ -1631,6 +1632,7 @@
-   last_read_token = ts[0];
-   token_before_that = ts[1];
-   two_tokens_ago = ts[2];
-+  current_token = ts[3];
- }
- 
- /*
-@@ -1877,7 +1879,7 @@
-     prompt_again ();
-   ret = read_a_line (remove_quoted_newline);
- #if defined (HISTORY)
--  if (remember_on_history && (parser_state & PST_HEREDOC))
-+  if (ret && remember_on_history && (parser_state & PST_HEREDOC))
-     {
-       /* To make adding the the here-document body right, we need to rely
- 	 on history_delimiting_chars() returning \n for the first line of
-@@ -2668,6 +2670,7 @@
-   FREE (word_desc_to_read);
-   word_desc_to_read = (WORD_DESC *)NULL;
- 
-+  current_token = '\n';		/* XXX */
-   last_read_token = '\n';
-   token_to_read = '\n';
- }
-@@ -2915,6 +2918,7 @@
- #define P_DQUOTE	0x04
- #define P_COMMAND	0x08	/* parsing a command, so look for comments */
- #define P_BACKQUOTE	0x10	/* parsing a backquoted command substitution */
-+#define P_ARRAYSUB	0x20	/* parsing a [...] array subscript for assignment */
- 
- /* Lexical state while parsing a grouping construct or $(...). */
- #define LEX_WASDOL	0x001
-@@ -2927,6 +2931,7 @@
- #define LEX_INHEREDOC	0x080
- #define LEX_HEREDELIM	0x100		/* reading here-doc delimiter */
- #define LEX_STRIPDOC	0x200		/* <<- strip tabs from here doc delim */
-+#define LEX_INWORD	0x400
- 
- #define COMSUB_META(ch)		((ch) == ';' || (ch) == '&' || (ch) == '|')
- 
-@@ -3129,6 +3134,8 @@
- 	      APPEND_NESTRET ();
- 	      FREE (nestret);
- 	    }
-+	  else if ((flags & P_ARRAYSUB) && (tflags & LEX_WASDOL) && (ch == '(' || ch == '{' || ch == '['))	/* ) } ] */
-+	    goto parse_dollar_word;
- 	}
-       /* Parse an old-style command substitution within double quotes as a
- 	 single word. */
-@@ -3145,6 +3152,7 @@
-       else if MBTEST(open != '`' && (tflags & LEX_WASDOL) && (ch == '(' || ch == '{' || ch == '['))	/* ) } ] */
- 	/* check for $(), $[], or ${} inside quoted string. */
- 	{
-+parse_dollar_word:
- 	  if (open == ch)	/* undo previous increment */
- 	    count--;
- 	  if (ch == '(')		/* ) */
-@@ -3179,7 +3187,7 @@
-      int open, close;
-      int *lenp, flags;
- {
--  int count, ch, peekc, tflags, lex_rwlen, lex_firstind;
-+  int count, ch, peekc, tflags, lex_rwlen, lex_wlen, lex_firstind;
-   int nestlen, ttranslen, start_lineno;
-   char *ret, *nestret, *ttrans, *heredelim;
-   int retind, retsize, rflags, hdlen;
-@@ -3200,7 +3208,7 @@
-   retind = 0;
- 
-   start_lineno = line_number;
--  lex_rwlen = 0;
-+  lex_rwlen = lex_wlen = 0;
- 
-   heredelim = 0;
-   lex_firstind = -1;
-@@ -3267,6 +3275,46 @@
- 	  continue;
- 	}
- 
-+      if (tflags & LEX_PASSNEXT)		/* last char was backslash */
-+	{
-+/*itrace("parse_comsub:%d: lex_passnext -> 0 ch = `%c' (%d)", line_number, ch, __LINE__);*/
-+	  tflags &= ~LEX_PASSNEXT;
-+	  if (qc != '\'' && ch == '\n')	/* double-quoted \<newline> disappears. */
-+	    {
-+	      if (retind > 0)
-+		retind--;	/* swallow previously-added backslash */
-+	      continue;
-+	    }
-+
-+	  RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64);
-+	  if MBTEST(ch == CTLESC || ch == CTLNUL)
-+	    ret[retind++] = CTLESC;
-+	  ret[retind++] = ch;
-+	  continue;
-+	}
-+
-+      /* If this is a shell break character, we are not in a word.  If not,
-+	 we either start or continue a word. */
-+      if MBTEST(shellbreak (ch))
-+	{
-+	  tflags &= ~LEX_INWORD;
-+/*itrace("parse_comsub:%d: lex_inword -> 0 ch = `%c' (%d)", line_number, ch, __LINE__);*/
-+	}
-+      else
-+	{
-+	  if (tflags & LEX_INWORD)
-+	    {
-+	      lex_wlen++;
-+/*itrace("parse_comsub:%d: lex_inword == 1 ch = `%c' lex_wlen = %d (%d)", line_number, ch, lex_wlen, __LINE__);*/
-+	    }	      
-+	  else
-+	    {
-+/*itrace("parse_comsub:%d: lex_inword -> 1 ch = `%c' (%d)", line_number, ch, __LINE__);*/
-+	      tflags |= LEX_INWORD;
-+	      lex_wlen = 0;
-+	    }
-+	}
-+
-       /* Skip whitespace */
-       if MBTEST(shellblank (ch) && lex_rwlen == 0)
-         {
-@@ -3306,7 +3354,7 @@
- 	}
- 
-       /* Meta-characters that can introduce a reserved word.  Not perfect yet. */
--      if MBTEST((tflags & LEX_RESWDOK) == 0 && (tflags & LEX_CKCASE) && (tflags & LEX_INCOMMENT) == 0 && shellmeta(ch))
-+      if MBTEST((tflags & LEX_RESWDOK) == 0 && (tflags & LEX_CKCASE) && (tflags & LEX_INCOMMENT) == 0 && (shellmeta(ch) || ch == '\n'))
- 	{
- 	  /* Add this character. */
- 	  RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
-@@ -3364,9 +3412,21 @@
- }	        
- 	      tflags &= ~LEX_RESWDOK;
- 	    }
--	  else if (shellbreak (ch) == 0)
-+	  else if MBTEST((tflags & LEX_CKCOMMENT) && ch == '#' && (lex_rwlen == 0 || ((tflags & LEX_INWORD) && lex_wlen == 0)))
-+	    ;	/* don't modify LEX_RESWDOK if we're starting a comment */
-+	  else if MBTEST((tflags & LEX_INCASE) && ch != '\n')
-+	    /* If we can read a reserved word and we're in case, we're at the
-+	       point where we can read a new pattern list or an esac.  We
-+	       handle the esac case above.  If we read a newline, we want to
-+	       leave LEX_RESWDOK alone.  If we read anything else, we want to
-+	       turn off LEX_RESWDOK, since we're going to read a pattern list. */
- {
--	      tflags &= ~LEX_RESWDOK;
-+	    tflags &= ~LEX_RESWDOK;
-+/*itrace("parse_comsub:%d: lex_incase == 1 found `%c', lex_reswordok -> 0", line_number, ch);*/
-+}
-+	  else if MBTEST(shellbreak (ch) == 0)
-+{
-+	    tflags &= ~LEX_RESWDOK;
- /*itrace("parse_comsub:%d: found `%c', lex_reswordok -> 0", line_number, ch);*/
- }
- 	}
-@@ -3394,36 +3454,23 @@
- 		}
- 	      else
- 		shell_ungetc (peekc);
--	      tflags |= LEX_HEREDELIM;
--	      lex_firstind = -1;
-+	      if (peekc != '<')
-+		{
-+		  tflags |= LEX_HEREDELIM;
-+		  lex_firstind = -1;
-+		}
- 	      continue;
- 	    }
- 	  else
--	    ch = peekc;		/* fall through and continue XXX - this skips comments if peekc == '#' */
-+	    ch = peekc;		/* fall through and continue XXX */
- 	}
--      /* Not exactly right yet, should handle shell metacharacters, too.  If
--	 any changes are made to this test, make analogous changes to subst.c:
--	 extract_delimited_string(). */
--      else if MBTEST((tflags & LEX_CKCOMMENT) && (tflags & LEX_INCOMMENT) == 0 && ch == '#' && (retind == 0 || ret[retind-1] == '\n' || shellblank (ret[retind - 1])))
-+      else if MBTEST((tflags & LEX_CKCOMMENT) && (tflags & LEX_INCOMMENT) == 0 && ch == '#' && (((tflags & LEX_RESWDOK) && lex_rwlen == 0) || ((tflags & LEX_INWORD) && lex_wlen == 0)))
-+{
-+/*itrace("parse_comsub:%d: lex_incomment -> 1 (%d)", line_number, __LINE__);*/
- 	tflags |= LEX_INCOMMENT;
-+}
- 
--      if (tflags & LEX_PASSNEXT)		/* last char was backslash */
--	{
--	  tflags &= ~LEX_PASSNEXT;
--	  if (qc != '\'' && ch == '\n')	/* double-quoted \<newline> disappears. */
--	    {
--	      if (retind > 0)
--		retind--;	/* swallow previously-added backslash */
--	      continue;
--	    }
--
--	  RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64);
--	  if MBTEST(ch == CTLESC || ch == CTLNUL)
--	    ret[retind++] = CTLESC;
--	  ret[retind++] = ch;
--	  continue;
--	}
--      else if MBTEST(ch == CTLESC || ch == CTLNUL)	/* special shell escapes */
-+      if MBTEST(ch == CTLESC || ch == CTLNUL)	/* special shell escapes */
- 	{
- 	  RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64);
- 	  ret[retind++] = CTLESC;
-@@ -4248,7 +4295,7 @@
- 		     ((token_index > 0 && assignment_acceptable (last_read_token) && token_is_ident (token, token_index)) ||
- 		      (token_index == 0 && (parser_state&PST_COMPASSIGN))))
-         {
--	  ttok = parse_matched_pair (cd, '[', ']', &ttoklen, 0);
-+	  ttok = parse_matched_pair (cd, '[', ']', &ttoklen, P_ARRAYSUB);
- 	  if (ttok == &matched_pair_error)
- 	    return -1;		/* Bail immediately. */
- 	  RESIZE_MALLOCED_BUFFER (token, token_index, ttoklen + 2,
-@@ -4449,6 +4496,7 @@
-     case '}':		/* XXX */
-     case AND_AND:
-     case BANG:
-+    case BAR_AND:
-     case DO:
-     case DONE:
-     case ELIF:
-diff -Naur bash-4.0.orig/patchlevel.h bash-4.0/patchlevel.h
---- bash-4.0.orig/patchlevel.h	2009-01-04 11:32:40.000000000 -0800
-+++ bash-4.0/patchlevel.h	2009-07-22 15:31:48.000000000 -0700
-@@ -25,6 +25,6 @@
-    regexp `^#define[ 	]*PATCHLEVEL', since that's what support/mkversion.sh
-    looks for to find the patch level (for the sccs version string). */
- 
--#define PATCHLEVEL 0
-+#define PATCHLEVEL 28
- 
- #endif /* _PATCHLEVEL_H_ */
-diff -Naur bash-4.0.orig/pcomplete.c bash-4.0/pcomplete.c
---- bash-4.0.orig/pcomplete.c	2009-02-01 14:12:31.000000000 -0800
-+++ bash-4.0/pcomplete.c	2009-07-22 15:31:08.000000000 -0700
-@@ -1032,6 +1032,7 @@
-   cmdlist = build_arg_list (funcname, text, lwords, cw);
- 
-   pps = &ps;
-+  save_parser_state (pps);
-   begin_unwind_frame ("gen-shell-function-matches");
-   add_unwind_protect (restore_parser_state, (char *)pps);
-   add_unwind_protect (dispose_words, (char *)cmdlist);
-diff -Naur bash-4.0.orig/sig.c bash-4.0/sig.c
---- bash-4.0.orig/sig.c	2009-01-04 11:32:41.000000000 -0800
-+++ bash-4.0/sig.c	2009-07-22 15:31:28.000000000 -0700
-@@ -448,6 +448,48 @@
- termsig_sighandler (sig)
-      int sig;
- {
-+  /* If we get called twice with the same signal before handling it,
-+     terminate right away. */
-+  if (
-+#ifdef SIGHUP
-+    sig != SIGHUP &&
-+#endif
-+#ifdef SIGINT
-+    sig != SIGINT &&
-+#endif
-+#ifdef SIGDANGER
-+    sig != SIGDANGER &&
-+#endif
-+#ifdef SIGPIPE
-+    sig != SIGPIPE &&
-+#endif
-+#ifdef SIGALRM
-+    sig != SIGALRM &&
-+#endif
-+#ifdef SIGTERM
-+    sig != SIGTERM &&
-+#endif
-+#ifdef SIGXCPU
-+    sig != SIGXCPU &&
-+#endif
-+#ifdef SIGXFSZ
-+    sig != SIGXFSZ &&
-+#endif
-+#ifdef SIGVTALRM
-+    sig != SIGVTALRM &&
-+#endif
-+#ifdef SIGLOST
-+    sig != SIGLOST &&
-+#endif
-+#ifdef SIGUSR1
-+    sig != SIGUSR1 &&
-+#endif
-+#ifdef SIGUSR2
-+   sig != SIGUSR2 &&
-+#endif
-+   sig == terminating_signal)
-+    terminate_immediately = 1;
-+
-   terminating_signal = sig;
- 
-   /* XXX - should this also trigger when interrupt_immediately is set? */
-diff -Naur bash-4.0.orig/subst.c bash-4.0/subst.c
---- bash-4.0.orig/subst.c	2009-01-28 11:34:12.000000000 -0800
-+++ bash-4.0/subst.c	2009-07-22 15:31:48.000000000 -0700
-@@ -85,6 +85,7 @@
- 
- /* Flags for the `pflags' argument to param_expand() */
- #define PF_NOCOMSUB	0x01	/* Do not perform command substitution */
-+#define PF_IGNUNBOUND	0x02	/* ignore unbound vars even if -u set */
- 
- /* These defs make it easier to use the editor. */
- #define LBRACE		'{'
-@@ -222,6 +223,7 @@
- static int skip_double_quoted __P((char *, size_t, int));
- static char *extract_delimited_string __P((char *, int *, char *, char *, char *, int));
- static char *extract_dollar_brace_string __P((char *, int *, int, int));
-+static int skip_matched_pair __P((const char *, int, int, int, int));
- 
- static char *pos_params __P((char *, int, int, int));
- 
-@@ -262,7 +264,7 @@
- static int chk_atstar __P((char *, int, int *, int *));
- static int chk_arithsub __P((const char *, int));
- 
--static WORD_DESC *parameter_brace_expand_word __P((char *, int, int));
-+static WORD_DESC *parameter_brace_expand_word __P((char *, int, int, int));
- static WORD_DESC *parameter_brace_expand_indir __P((char *, int, int, int *, int *));
- static WORD_DESC *parameter_brace_expand_rhs __P((char *, char *, int, int, int *, int *));
- static void parameter_brace_expand_error __P((char *, char *));
-@@ -1374,6 +1376,107 @@
- 
- #define CQ_RETURN(x) do { no_longjmp_on_fatal_error = 0; return (x); } while (0)
- 
-+/* This function assumes s[i] == open; returns with s[ret] == close; used to
-+   parse array subscripts.  FLAGS currently unused. */
-+static int
-+skip_matched_pair (string, start, open, close, flags)
-+     const char *string;
-+     int start, open, close, flags;
-+{
-+  int i, pass_next, backq, si, c, count;
-+  size_t slen;
-+  char *temp, *ss;
-+  DECLARE_MBSTATE;
-+
-+  slen = strlen (string + start) + start;
-+  no_longjmp_on_fatal_error = 1;
-+
-+  i = start + 1;		/* skip over leading bracket */
-+  count = 1;
-+  pass_next = backq = 0;
-+  ss = (char *)string;
-+  while (c = string[i])
-+    {
-+      if (pass_next)
-+	{
-+	  pass_next = 0;
-+	  if (c == 0)
-+	    CQ_RETURN(i);
-+	  ADVANCE_CHAR (string, slen, i);
-+	  continue;
-+	}
-+      else if (c == '\\')
-+	{
-+	  pass_next = 1;
-+	  i++;
-+	  continue;
-+	}
-+      else if (backq)
-+	{
-+	  if (c == '`')
-+	    backq = 0;
-+	  ADVANCE_CHAR (string, slen, i);
-+	  continue;
-+	}
-+      else if (c == '`')
-+	{
-+	  backq = 1;
-+	  i++;
-+	  continue;
-+	}
-+      else if (c == open)
-+	{
-+	  count++;
-+	  i++;
-+	  continue;
-+	}
-+      else if (c == close)
-+	{
-+	  count--;
-+	  if (count == 0)
-+	    break;
-+	  i++;
-+	  continue;
-+	}
-+      else if (c == '\'' || c == '"')
-+	{
-+	  i = (c == '\'') ? skip_single_quoted (ss, slen, ++i)
-+			  : skip_double_quoted (ss, slen, ++i);
-+	  /* no increment, the skip functions increment past the closing quote. */
-+	}
-+      else if (c == '$' && (string[i+1] == LPAREN || string[i+1] == LBRACE))
-+	{
-+	  si = i + 2;
-+	  if (string[si] == '\0')
-+	    CQ_RETURN(si);
-+
-+	  if (string[i+1] == LPAREN)
-+	    temp = extract_delimited_string (ss, &si, "$(", "(", ")", SX_NOALLOC|SX_COMMAND); /* ) */
-+	  else
-+	    temp = extract_dollar_brace_string (ss, &si, 0, SX_NOALLOC);
-+	  i = si;
-+	  if (string[i] == '\0')	/* don't increment i past EOS in loop */
-+	    break;
-+	  i++;
-+	  continue;
-+	}
-+      else
-+	ADVANCE_CHAR (string, slen, i);
-+    }
-+
-+  CQ_RETURN(i);
-+}
-+
-+#if defined (ARRAY_VARS)
-+int
-+skipsubscript (string, start)
-+     const char *string;
-+     int start;
-+{
-+  return (skip_matched_pair (string, start, '[', ']', 0));
-+}
-+#endif
-+
- /* Skip characters in STRING until we find a character in DELIMS, and return
-    the index of that character.  START is the index into string at which we
-    begin.  This is similar in spirit to strpbrk, but it returns an index into
-@@ -5093,9 +5196,9 @@
-    the shell, e.g., "@", "$", "*", etc.  QUOTED, if non-zero, means that
-    NAME was found inside of a double-quoted expression. */
- static WORD_DESC *
--parameter_brace_expand_word (name, var_is_special, quoted)
-+parameter_brace_expand_word (name, var_is_special, quoted, pflags)
-      char *name;
--     int var_is_special, quoted;
-+     int var_is_special, quoted, pflags;
- {
-   WORD_DESC *ret;
-   char *temp, *tt;
-@@ -5127,7 +5230,7 @@
-       strcpy (tt + 1, name);
- 
-       ret = param_expand (tt, &sindex, quoted, (int *)NULL, (int *)NULL,
--			  (int *)NULL, (int *)NULL, 0);
-+			  (int *)NULL, (int *)NULL, pflags);
-       free (tt);
-     }
- #if defined (ARRAY_VARS)
-@@ -5188,7 +5291,7 @@
-   char *temp, *t;
-   WORD_DESC *w;
- 
--  w = parameter_brace_expand_word (name, var_is_special, quoted);
-+  w = parameter_brace_expand_word (name, var_is_special, quoted, PF_IGNUNBOUND);
-   t = w->word;
-   /* Have to dequote here if necessary */
-   if (t)
-@@ -5205,7 +5308,7 @@
-   if (t == 0)
-     return (WORD_DESC *)NULL;
- 
--  w = parameter_brace_expand_word (t, SPECIAL_VAR(t, 0), quoted);
-+  w = parameter_brace_expand_word (t, SPECIAL_VAR(t, 0), quoted, 0);
-   free (t);
- 
-   return w;
-@@ -6556,7 +6659,7 @@
-   if (want_indir)
-     tdesc = parameter_brace_expand_indir (name + 1, var_is_special, quoted, quoted_dollar_atp, contains_dollar_at);
-   else
--    tdesc = parameter_brace_expand_word (name, var_is_special, quoted);
-+    tdesc = parameter_brace_expand_word (name, var_is_special, quoted, PF_IGNUNBOUND);
- 
-   if (tdesc)
-     {
-@@ -6664,13 +6767,13 @@
-       return &expand_wdesc_error;
- 
-     case RBRACE:
--      if (var_is_set == 0 && unbound_vars_is_error)
-+      if (var_is_set == 0 && unbound_vars_is_error && ((name[0] != '@' && name[0] != '*') || name[1]))
- 	{
-+	  last_command_exit_value = EXECUTION_FAILURE;
- 	  err_unboundvar (name);
- 	  FREE (value);
- 	  FREE (temp);
- 	  free (name);
--	  last_command_exit_value = EXECUTION_FAILURE;
- 	  return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal);
- 	}
-       break;
-@@ -6887,15 +6990,25 @@
-     case '*':		/* `$*' */
-       list = list_rest_of_args ();
- 
--      if (list == 0 && unbound_vars_is_error)
-+#if 0
-+      /* According to austin-group posix proposal by Geoff Clare in
-+	 <20090505091501.GA10097@squonk.masqnet> of 5 May 2009:
-+
-+ 	"The shell shall write a message to standard error and
-+ 	 immediately exit when it tries to expand an unset parameter
-+ 	 other than the '@' and '*' special parameters."
-+      */
-+
-+      if (list == 0 && unbound_vars_is_error && (pflags & PF_IGNUNBOUND) == 0)
- 	{
- 	  uerror[0] = '$';
- 	  uerror[1] = '*';
- 	  uerror[2] = '\0';
--	  err_unboundvar (uerror);
- 	  last_command_exit_value = EXECUTION_FAILURE;
-+	  err_unboundvar (uerror);
- 	  return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal);
- 	}
-+#endif
- 
-       /* If there are no command-line arguments, this should just
- 	 disappear if there are other characters in the expansion,
-@@ -6949,15 +7062,25 @@
-     case '@':		/* `$@' */
-       list = list_rest_of_args ();
- 
--      if (list == 0 && unbound_vars_is_error)
-+#if 0
-+      /* According to austin-group posix proposal by Geoff Clare in
-+	 <20090505091501.GA10097@squonk.masqnet> of 5 May 2009:
-+
-+ 	"The shell shall write a message to standard error and
-+ 	 immediately exit when it tries to expand an unset parameter
-+ 	 other than the '@' and '*' special parameters."
-+      */
-+
-+      if (list == 0 && unbound_vars_is_error && (pflags & PF_IGNUNBOUND) == 0)
- 	{
- 	  uerror[0] = '$';
- 	  uerror[1] = '@';
- 	  uerror[2] = '\0';
--	  err_unboundvar (uerror);
- 	  last_command_exit_value = EXECUTION_FAILURE;
-+	  err_unboundvar (uerror);
- 	  return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal);
- 	}
-+#endif
- 
-       /* We want to flag the fact that we saw this.  We can't turn
- 	 off quoting entirely, because other characters in the
-diff -Naur bash-4.0.orig/trap.c bash-4.0/trap.c
---- bash-4.0.orig/trap.c	2009-01-16 14:07:53.000000000 -0800
-+++ bash-4.0/trap.c	2009-07-22 15:31:34.000000000 -0700
-@@ -755,7 +755,7 @@
- 	}
- 
-       flags = SEVAL_NONINT|SEVAL_NOHIST;
--      if (sig != DEBUG_TRAP && sig != RETURN_TRAP)
-+      if (sig != DEBUG_TRAP && sig != RETURN_TRAP && sig != ERROR_TRAP)
- 	flags |= SEVAL_RESETLINE;
-       if (function_code == 0)
- 	parse_and_execute (trap_command, tag, flags);
-@@ -798,12 +798,36 @@
- run_debug_trap ()
- {
-   int trap_exit_value;
-+  pid_t save_pgrp;
-+  int save_pipe[2];
- 
-   /* XXX - question:  should the DEBUG trap inherit the RETURN trap? */
-   trap_exit_value = 0;
-   if ((sigmodes[DEBUG_TRAP] & SIG_TRAPPED) && ((sigmodes[DEBUG_TRAP] & SIG_IGNORED) == 0) && ((sigmodes[DEBUG_TRAP] & SIG_INPROGRESS) == 0))
-     {
-+#if defined (JOB_CONTROL)
-+      save_pgrp = pipeline_pgrp;
-+      pipeline_pgrp = 0;
-+      save_pipeline (1);
-+#  if defined (PGRP_PIPE)
-+      save_pgrp_pipe (save_pipe, 1);
-+#  endif
-+      stop_making_children ();
-+#endif
-+
-       trap_exit_value = _run_trap_internal (DEBUG_TRAP, "debug trap");
-+
-+#if defined (JOB_CONTROL)
-+      pipeline_pgrp = save_pgrp;
-+      restore_pipeline (1);
-+#  if defined (PGRP_PIPE)
-+      close_pgrp_pipe ();
-+      restore_pgrp_pipe (save_pipe);
-+#  endif
-+      if (pipeline_pgrp > 0)
-+	give_terminal_to (pipeline_pgrp, 1);
-+      notify_and_cleanup ();
-+#endif
-       
- #if defined (DEBUGGER)
-       /* If we're in the debugger and the DEBUG trap returns 2 while we're in
Index: tches/binutils-2.19.1-branch_update-5.patch
===================================================================
--- patches/binutils-2.19.1-branch_update-5.patch	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,12473 +1,0 @@
-Submitted By: Jim Gifford (jim at cross-lfs dot org)
-Date: 07-07-2009
-Initial Package Version: 2.19.1
-Origin: Upstream
-Upstream Status: Applied
-Description: This is a branch update for binutils-2.19.1, and should be
-             rechecked periodically.
-
-This patch was created on 20090707
-
-diff -Naur binutils-2.19.1.orig/bfd/ChangeLog binutils-2.19.1/bfd/ChangeLog
---- binutils-2.19.1.orig/bfd/ChangeLog	2009-02-02 02:44:39.000000000 -0800
-+++ binutils-2.19.1/bfd/ChangeLog	2009-03-02 05:55:19.000000000 -0800
-@@ -1,3 +1,108 @@
-+2009-03-02  Alan Modra  <amodra@bigpond.net.au>
-+
-+	2009-02-15  Alan Modra  <amodra@bigpond.net.au>
-+	* elf64-ppc.c (struct _ppc64_elf_section_data): Delete t_symndx,
-+	add toc.symndx and toc.add.
-+	(ppc64_elf_check_relocs): Don't set htab->tls_get_addr here.
-+	Set up toc.add.
-+	(get_tls_mask): Add toc_addend param, set from toc.add.  Adjust all
-+	callers.
-+	(ppc64_elf_tls_setup): Set htab->tls_get_addr and tls_get_addr_fd.
-+	(branch_reloc_hash_match): New function, extracted from..
-+	(ppc64_elf_tls_optimize): ..here.
-+	(ppc64_elf_relocate_section): Properly set addends when optimizing
-+	tls sequences.  Avoid unnecessary reading and writing of insns.
-+	Only redo reloc when symbol changed.  Bypass symbol checks when
-+	using tlsld_got.
-+	* elf32-ppc.c (ppc_elf_tls_setup): Correct comment.
-+	(branch_reloc_hash_match): New function, extracted from..
-+	(ppc_elf_tls_optimize): ..here.
-+	(ppc_elf_relocate_section): Avoid unnecessary reading of insns.
-+	Don't clear addend on zapped __tls_get_addr reloc.
-+
-+	2009-02-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
-+	* elf-eh-frame.c (REQUIRE_CLEARED_RELOCS) Remove.
-+	(_bfd_elf_parse_eh_frame): Do not check relocations for removed FDEs.
-+
-+	2009-01-26  Nathan Sidwell  <nathan@codesourcery.com>
-+	* elf32-ppc.c (ppc_elf_relax_section): Add space for relocs
-+	describing the trampolines.
-+	(ppc_elf_relocate_section): Update relocs to describe the
-+	trampolines.
-+
-+	2009-01-22  Alan Modra  <amodra@bigpond.net.au>
-+	PR 6832
-+	* dwarf2.c (find_line): Don't update stash->sec_info_ptr until
-+	after comp_unit_find_line call.
-+
-+	2009-01-14  Alan Modra  <amodra@bigpond.net.au>
-+	PR 9735
-+	* syms.c (_bfd_stab_section_find_nearest_line): Don't free
-+	saved filename, use bfd_alloc rather than bfd_malloc for it.
-+
-+	2009-01-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
-+	* elflink.c (_bfd_elf_section_already_linked): Handle g++-3.4
-+	relocations in `.gnu.linkonce.r.*' referencing its `.gnu.linkonce.t.*'.
-+
-+	2008-12-11  Alan Modra  <amodra@bigpond.net.au>
-+	PR 7041
-+	* elf64-ppc.c (func_desc_adjust): Correct logic making fake function
-+	descriptors.  Similarly correct making function descriptors dynamic.
-+
-+	2008-11-14  Nathan Sidwell  <nathan@codesourcery.com>
-+	* elf.c (assign_file_positions_for_load_sections): Use header_size
-+	to avoid moving the load address of file headers.
-+	(assign_file_positions_for_load_sections): Set header_size for
-+	segments containing the file header.
-+
-+	2008-11-13  Hans-Peter Nilsson  <hp@axis.com>
-+	PR ld/7028
-+	* elf.c (assign_file_positions_for_load_sections): Allocate phrds
-+	with bfd_zalloc2 instead of bfd_alloc2.  For the amount, use
-+	the possibly-preset header-size, not the computed one.
-+
-+	2008-11-13  Alan Modra  <amodra@bigpond.net.au>
-+	PR 7023
-+	* elf.c (bfd_section_from_shdr <SHT_SYMTAB>): Fail on invalid sh_info.
-+
-+	2008-11-11  Alan Modra  <amodra@bigpond.net.au>
-+	PR 7012
-+	* dwarf2.c (find_line): Don't keep stale pointers into realloc'd
-+	memory.  Return on errors.  Fix memory leak.
-+	(_bfd_dwarf2_cleanup_debug_info): Free dwarf_str_buffer.
-+
-+	2008-10-10  Nathan Froyd  <froydnj@codesourcery.com>
-+	* elf32-ppc.c (ppc_elf_merge_obj_attributes): Merge
-+	Tag_GNU_Power_ABI_Struct_Return.
-+
-+	2008-10-03  Alan Modra  <amodra@bigpond.net.au>
-+	* elf.c (bfd_elf_set_group_contents): Assign sh_info for ld -r when
-+	the signature symbol is global.
-+	* elflink.c (elf_link_input_bfd): Ensure group signature symbol
-+	is output when ld -r.  Set group sh_info when local.
-+	* linker.c (default_indirect_link_order): Handle group sections
-+	specially.
-+
-+	2008-09-28  Alan Modra  <amodra@bigpond.net.au>
-+	* elf.c (_bfd_elf_init_private_section_data): Tweak union copy.
-+	(bfd_section_from_shdr): Don't change SHT_GROUP section name.
-+	* elflink.c (section_signature): New function.
-+	(_bfd_elf_section_already_linked): Use it.
-+
-+2009-02-15  Bjoern Haase  <bjoern.m.haase@web.de>
-+
-+	PR 9841
-+	* elf32-avr.c: Handle case where no local symbos exist correctly.
-+
-+2009-02-04  Eric B. Weddington  <eric.weddington@atmel.com>
-+
-+	* elf32-avr.c (avr_final_link_relocate): Allow avr25 to wraparound.
-+
-+2009-02-03  Tristan Gingold  <gingold@adacore.com>
-+
-+	* Makefile.am (RELEASE): Unset.
-+	* Makefile.in: Regenerated.
-+
- 2009-02-02  Tristan Gingold  <gingold@adacore.com>
- 
- 	* configure.in: Bump version to 2.19.1
-diff -Naur binutils-2.19.1.orig/bfd/dwarf2.c binutils-2.19.1/bfd/dwarf2.c
---- binutils-2.19.1.orig/bfd/dwarf2.c	2008-10-02 01:07:16.000000000 -0700
-+++ binutils-2.19.1/bfd/dwarf2.c	2009-03-02 05:50:55.000000000 -0800
-@@ -1,6 +1,6 @@
- /* DWARF 2 support.
-    Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
--   2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-+   2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
- 
-    Adapted from gdb/dwarf2read.c by Gavin Koch of Cygnus Solutions
-    (gavin@cygnus.com).
-@@ -2989,8 +2989,6 @@
- 			      symbols, 0,
- 			      &stash->info_ptr_memory, &total_size))
- 	    goto done;
--	  stash->info_ptr = stash->info_ptr_memory;
--	  stash->info_ptr_end = stash->info_ptr + total_size;
- 	}
-       else
- 	{
-@@ -3008,63 +3006,64 @@
- 	      if (stash->info_ptr_memory == NULL)
- 		goto done;
- 
--	      stash->info_ptr = stash->info_ptr_memory;
--	      stash->info_ptr_end = stash->info_ptr;
--
-+	      total_size = 0;
- 	      for (msec = find_debug_info (debug_bfd, NULL);
- 		   msec;
- 		   msec = find_debug_info (debug_bfd, msec))
- 		{
- 		  bfd_size_type size;
--		  bfd_size_type start;
- 
- 		  size = msec->size;
- 		  if (size == 0)
- 		    continue;
- 
--		  start = stash->info_ptr_end - stash->info_ptr;
--
--		  if ((bfd_simple_get_relocated_section_contents
--		       (debug_bfd, msec, stash->info_ptr + start, symbols))
--		      == NULL)
--		    continue;
-+		  if (!(bfd_simple_get_relocated_section_contents
-+			(debug_bfd, msec, stash->info_ptr_memory + total_size,
-+			 symbols)))
-+		    goto done;
- 
--		  stash->info_ptr_end = stash->info_ptr + start + size;
-+		  total_size += size;
- 		}
--
--	      BFD_ASSERT (stash->info_ptr_end == stash->info_ptr + total_size);
- 	    }
- 	  else
- 	    {
- 	      /* Case 3: multiple sections, some or all compressed.  */
--	      stash->info_ptr_memory = bfd_malloc (1);
--	      stash->info_ptr = stash->info_ptr_memory;
--	      stash->info_ptr_end = stash->info_ptr;
-+	      stash->info_ptr_memory = NULL;
-+	      total_size = 0;
- 	      for (msec = find_debug_info (debug_bfd, NULL);
- 		   msec;
- 		   msec = find_debug_info (debug_bfd, msec))
- 		{
- 		  bfd_size_type size = msec->size;
--		  bfd_byte* buffer
--		      = (bfd_simple_get_relocated_section_contents
--			 (debug_bfd, msec, NULL, symbols));
--		  if (! buffer)
-+		  bfd_byte* buffer;
-+
-+		  if (size == 0)
- 		    continue;
-+
-+		  buffer = (bfd_simple_get_relocated_section_contents
-+			    (debug_bfd, msec, NULL, symbols));
-+		  if (! buffer)
-+		    goto done;
-+
- 		  if (strcmp (msec->name, DWARF2_COMPRESSED_DEBUG_INFO) == 0)
- 		    {
- 		      if (! bfd_uncompress_section_contents (&buffer, &size))
--			continue;
-+			{
-+			  free (buffer);
-+			  goto done;
-+			}
- 		    }
--		  stash->info_ptr = bfd_realloc (stash->info_ptr,
--						 stash->info_ptr_end
--						 - stash->info_ptr + size);
--		  memcpy (stash->info_ptr_end, buffer, size);
-+		  stash->info_ptr_memory = bfd_realloc (stash->info_ptr_memory,
-+							total_size + size);
-+		  memcpy (stash->info_ptr_memory + total_size, buffer, size);
- 		  free (buffer);
--		  stash->info_ptr_end += size;
-+		  total_size += size;
- 		}
- 	    }
- 	}
- 
-+      stash->info_ptr = stash->info_ptr_memory;
-+      stash->info_ptr_end = stash->info_ptr + total_size;
-       stash->sec = find_debug_info (debug_bfd, NULL);
-       stash->sec_info_ptr = stash->info_ptr;
-       stash->syms = symbols;
-@@ -3187,13 +3186,6 @@
- 	    break;
- 	  stash->info_ptr += length;
- 
--	  if ((bfd_vma) (stash->info_ptr - stash->sec_info_ptr)
--	      == stash->sec->size)
--	    {
--	      stash->sec = find_debug_info (stash->bfd, stash->sec);
--	      stash->sec_info_ptr = stash->info_ptr;
--	    }
--
- 	  if (stash->all_comp_units)
- 	    stash->all_comp_units->prev_unit = each;
- 	  else
-@@ -3223,6 +3215,14 @@
- 						     functionname_ptr,
- 						     linenumber_ptr,
- 						     stash));
-+
-+	  if ((bfd_vma) (stash->info_ptr - stash->sec_info_ptr)
-+	      == stash->sec->size)
-+	    {
-+	      stash->sec = find_debug_info (stash->bfd, stash->sec);
-+	      stash->sec_info_ptr = stash->info_ptr;
-+	    }
-+
- 	  if (found)
- 	    goto done;
- 	}
-@@ -3364,8 +3364,14 @@
- 	}
-     }
- 
--  free (stash->dwarf_abbrev_buffer);
--  free (stash->dwarf_line_buffer);
--  free (stash->dwarf_ranges_buffer);
--  free (stash->info_ptr_memory);
-+  if (stash->dwarf_abbrev_buffer)
-+    free (stash->dwarf_abbrev_buffer);
-+  if (stash->dwarf_line_buffer)
-+    free (stash->dwarf_line_buffer);
-+  if (stash->dwarf_str_buffer)
-+    free (stash->dwarf_str_buffer);
-+  if (stash->dwarf_ranges_buffer)
-+    free (stash->dwarf_ranges_buffer);
-+  if (stash->info_ptr_memory)
-+    free (stash->info_ptr_memory);
- }
-diff -Naur binutils-2.19.1.orig/bfd/elf32-avr.c binutils-2.19.1/bfd/elf32-avr.c
---- binutils-2.19.1.orig/bfd/elf32-avr.c	2008-12-23 05:54:49.000000000 -0800
-+++ binutils-2.19.1/bfd/elf32-avr.c	2009-02-19 09:53:10.000000000 -0800
-@@ -854,10 +854,11 @@
- 	{
-           /* Relative distance is too large.  */
- 
--	  /* Always apply WRAPAROUND for avr2 and avr4.  */
-+	  /* Always apply WRAPAROUND for avr2, avr25, and avr4.  */
- 	  switch (bfd_get_mach (input_bfd))
- 	    {
- 	    case bfd_mach_avr2:
-+	    case bfd_mach_avr25:
- 	    case bfd_mach_avr4:
- 	      break;
- 
-@@ -1553,7 +1554,8 @@
-   /* Adjust the local symbols defined in this section.  */
-   isym = (Elf_Internal_Sym *) symtab_hdr->contents;
-   isymend = isym + symtab_hdr->sh_info;
--  for (; isym < isymend; isym++)
-+  /* Fix PR 9841, there may be no local symbols.  */ 
-+  for (; isym != NULL && isym < isymend; isym++)
-     {
-       if (isym->st_shndx == sec_shndx
-           && isym->st_value > addr
-diff -Naur binutils-2.19.1.orig/bfd/elf32-ppc.c binutils-2.19.1/bfd/elf32-ppc.c
---- binutils-2.19.1.orig/bfd/elf32-ppc.c	2008-12-23 05:54:49.000000000 -0800
-+++ binutils-2.19.1/bfd/elf32-ppc.c	2009-03-02 05:55:19.000000000 -0800
-@@ -1,6 +1,6 @@
- /* PowerPC-specific support for 32-bit ELF
-    Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
--   2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-+   2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-    Written by Ian Lance Taylor, Cygnus Support.
- 
-    This file is part of BFD, the Binary File Descriptor library.
-@@ -3964,6 +3964,33 @@
- 	   ibfd, obfd, in_abi, out_abi);
-     }
- 
-+  /* Check for conflicting Tag_GNU_Power_ABI_Struct_Return attributes
-+     and merge non-conflicting ones.  */
-+  in_attr = &in_attrs[Tag_GNU_Power_ABI_Struct_Return];
-+  out_attr = &out_attrs[Tag_GNU_Power_ABI_Struct_Return];
-+  if (in_attr->i != out_attr->i)
-+    {
-+      out_attr->type = 1;
-+      if (out_attr->i == 0)
-+       out_attr->i = in_attr->i;
-+      else if (in_attr->i == 0)
-+       ;
-+      else if (out_attr->i == 1 && in_attr->i == 2)
-+       _bfd_error_handler
-+         (_("Warning: %B uses r3/r4 for small structure returns, %B uses memory"), obfd, ibfd);
-+      else if (out_attr->i == 2 && in_attr->i == 1)
-+       _bfd_error_handler
-+         (_("Warning: %B uses r3/r4 for small structure returns, %B uses memory"), ibfd, obfd);
-+      else if (in_attr->i > 2)
-+       _bfd_error_handler
-+         (_("Warning: %B uses unknown small structure return convention %d"), ibfd,
-+          in_attr->i);
-+      else
-+       _bfd_error_handler
-+         (_("Warning: %B uses unknown small structure return convention %d"), obfd,
-+          out_attr->i);
-+    }
-+
-   /* Merge Tag_compatibility attributes and any common GNU ones.  */
-   _bfd_elf_merge_object_attributes (ibfd, obfd);
- 
-@@ -4298,7 +4325,8 @@
-   return TRUE;
- }
- 
-
--/* Set htab->tls_get_addr and call the generic ELF tls_setup function.  */
-+/* Set plt output section type, htab->tls_get_addr, and call the
-+   generic ELF tls_setup function.  */
- 
- asection *
- ppc_elf_tls_setup (bfd *obfd, struct bfd_link_info *info)
-@@ -4319,6 +4347,43 @@
-   return _bfd_elf_tls_setup (obfd, info);
- }
- 
-+/* Return TRUE iff REL is a branch reloc with a global symbol matching
-+   HASH.  */
-+
-+static bfd_boolean
-+branch_reloc_hash_match (const bfd *ibfd,
-+			 const Elf_Internal_Rela *rel,
-+			 const struct elf_link_hash_entry *hash)
-+{
-+  Elf_Internal_Shdr *symtab_hdr = &elf_symtab_hdr (ibfd);
-+  enum elf_ppc_reloc_type r_type = ELF32_R_TYPE (rel->r_info);
-+  unsigned int r_symndx = ELF32_R_SYM (rel->r_info);
-+
-+  if (r_symndx >= symtab_hdr->sh_info
-+      && (r_type == R_PPC_PLTREL24
-+	  || r_type == R_PPC_LOCAL24PC
-+	  || r_type == R_PPC_REL14
-+	  || r_type == R_PPC_REL14_BRTAKEN
-+	  || r_type == R_PPC_REL14_BRNTAKEN
-+	  || r_type == R_PPC_REL24
-+	  || r_type == R_PPC_ADDR24
-+	  || r_type == R_PPC_ADDR14
-+	  || r_type == R_PPC_ADDR14_BRTAKEN
-+	  || r_type == R_PPC_ADDR14_BRNTAKEN))
-+    {
-+      struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (ibfd);
-+      struct elf_link_hash_entry *h;
-+
-+      h = sym_hashes[r_symndx - symtab_hdr->sh_info];
-+      while (h->root.type == bfd_link_hash_indirect
-+	     || h->root.type == bfd_link_hash_warning)
-+	h = (struct elf_link_hash_entry *) h->root.u.i.link;
-+      if (h == hash)
-+	return TRUE;
-+    }
-+  return FALSE;
-+}
-+
- /* Run through all the TLS relocs looking for optimization
-    opportunities.  */
- 
-@@ -4446,35 +4511,10 @@
- 		      if (!expecting_tls_get_addr)
- 			continue;
- 
--		      if (rel + 1 < relend)
--			{
--			  enum elf_ppc_reloc_type r_type2;
--			  unsigned long r_symndx2;
--			  struct elf_link_hash_entry *h2;
--
--			  /* The next instruction should be a call to
--			     __tls_get_addr.  Peek at the reloc to be sure.  */
--			  r_type2 = ELF32_R_TYPE (rel[1].r_info);
--			  r_symndx2 = ELF32_R_SYM (rel[1].r_info);
--			  if (r_symndx2 >= symtab_hdr->sh_info
--			      && (r_type2 == R_PPC_REL14
--				  || r_type2 == R_PPC_REL14_BRTAKEN
--				  || r_type2 == R_PPC_REL14_BRNTAKEN
--				  || r_type2 == R_PPC_REL24
--				  || r_type2 == R_PPC_PLTREL24))
--			    {
--			      struct elf_link_hash_entry **sym_hashes;
--
--			      sym_hashes = elf_sym_hashes (ibfd);
--			      h2 = sym_hashes[r_symndx2 - symtab_hdr->sh_info];
--			      while (h2->root.type == bfd_link_hash_indirect
--				     || h2->root.type == bfd_link_hash_warning)
--				h2 = ((struct elf_link_hash_entry *)
--				      h2->root.u.i.link);
--			      if (h2 == htab->tls_get_addr)
--				continue;
--			    }
--			}
-+		      if (rel + 1 < relend
-+			  && branch_reloc_hash_match (ibfd, rel + 1,
-+						      htab->tls_get_addr))
-+			continue;
- 
- 		      /* Uh oh, we didn't find the expected call.  We
- 			 could just mark this symbol to exclude it
-@@ -5573,7 +5613,7 @@
-   Elf_Internal_Rela *internal_relocs = NULL;
-   Elf_Internal_Rela *irel, *irelend;
-   struct one_fixup *fixups = NULL;
--  bfd_boolean changed;
-+  unsigned changes = 0;
-   struct ppc_elf_link_hash_table *htab;
-   bfd_size_type trampoff;
-   asection *got2;
-@@ -5820,6 +5860,7 @@
- 	  fixups = f;
- 
- 	  trampoff += size;
-+	  changes++;
- 	}
-       else
- 	{
-@@ -5870,7 +5911,6 @@
-     }
- 
-   /* Write out the trampolines.  */
--  changed = fixups != NULL;
-   if (fixups != NULL)
-     {
-       const int *stub;
-@@ -5936,7 +5976,7 @@
-   if (contents != NULL
-       && elf_section_data (isec)->this_hdr.contents != contents)
-     {
--      if (!changed && !link_info->keep_memory)
-+      if (!changes && !link_info->keep_memory)
- 	free (contents);
-       else
- 	{
-@@ -5945,15 +5985,35 @@
- 	}
-     }
- 
--  if (elf_section_data (isec)->relocs != internal_relocs)
-+  if (changes != 0)
-     {
--      if (!changed)
-+      /* Append sufficient NOP relocs so we can write out relocation
-+	 information for the trampolines.  */
-+      Elf_Internal_Rela *new_relocs = bfd_malloc ((changes + isec->reloc_count)
-+						  * sizeof (*new_relocs));
-+      unsigned ix;
-+      
-+      if (!new_relocs)
-+	goto error_return;
-+      memcpy (new_relocs, internal_relocs,
-+	      isec->reloc_count * sizeof (*new_relocs));
-+      for (ix = changes; ix--;)
-+	{
-+	  irel = new_relocs + ix + isec->reloc_count;
-+
-+	  irel->r_info = ELF32_R_INFO (0, R_PPC_NONE);
-+	}
-+      if (internal_relocs != elf_section_data (isec)->relocs)
- 	free (internal_relocs);
--      else
--	elf_section_data (isec)->relocs = internal_relocs;
-+      elf_section_data (isec)->relocs = new_relocs;
-+      isec->reloc_count += changes;
-+      elf_section_data (isec)->rel_hdr.sh_size
-+	+= changes * elf_section_data (isec)->rel_hdr.sh_entsize;
-     }
-+  else if (elf_section_data (isec)->relocs != internal_relocs)
-+    free (internal_relocs);
- 
--  *again = changed;
-+  *again = changes != 0;
-   return TRUE;
- 
-  error_return:
-@@ -6321,22 +6381,21 @@
- 	case R_PPC_GOT_TLSLD16_LO:
- 	  if (tls_mask != 0 && (tls_mask & TLS_LD) == 0)
- 	    {
--	      bfd_vma insn1, insn2;
-+	      unsigned int insn1, insn2;
- 	      bfd_vma offset;
- 
- 	    tls_ldgd_opt:
- 	      offset = rel[1].r_offset;
--	      insn1 = bfd_get_32 (output_bfd,
--				  contents + rel->r_offset - d_offset);
- 	      if ((tls_mask & tls_gd) != 0)
- 		{
- 		  /* IE */
-+		  insn1 = bfd_get_32 (output_bfd,
-+				      contents + rel->r_offset - d_offset);
- 		  insn1 &= (1 << 26) - 1;
- 		  insn1 |= 32 << 26;	/* lwz */
- 		  insn2 = 0x7c631214;	/* add 3,3,2 */
- 		  rel[1].r_info
- 		    = ELF32_R_INFO (ELF32_R_SYM (rel[1].r_info), R_PPC_NONE);
--		  rel[1].r_addend = 0;
- 		  r_type = (((r_type - (R_PPC_GOT_TLSGD16 & 3)) & 3)
- 			    + R_PPC_GOT_TPREL16);
- 		  rel->r_info = ELF32_R_INFO (r_symndx, r_type);
-@@ -6959,6 +7018,17 @@
- 
- 	    bfd_put_32 (output_bfd, t0, contents + rel->r_offset);
- 	    bfd_put_32 (output_bfd, t1, contents + rel->r_offset + 4);
-+
-+	    /* Rewrite the reloc and convert one of the trailing nop
-+	       relocs to describe this relocation.  */
-+	    BFD_ASSERT (ELF32_R_TYPE (relend[-1].r_info) == R_PPC_NONE);
-+	    /* The relocs are at the bottom 2 bytes */
-+	    rel[0].r_offset += 2;
-+	    memmove (rel + 1, rel, (relend - rel - 1) * sizeof (*rel));
-+	    rel[0].r_info = ELF32_R_INFO (r_symndx, R_PPC_ADDR16_HA);
-+	    rel[1].r_offset += 4;
-+	    rel[1].r_info = ELF32_R_INFO (r_symndx, R_PPC_ADDR16_LO);
-+	    rel++;
- 	  }
- 	  continue;
- 
-diff -Naur binutils-2.19.1.orig/bfd/elf64-ppc.c binutils-2.19.1/bfd/elf64-ppc.c
---- binutils-2.19.1.orig/bfd/elf64-ppc.c	2008-10-09 05:18:24.000000000 -0700
-+++ binutils-2.19.1/bfd/elf64-ppc.c	2009-03-02 05:55:19.000000000 -0800
-@@ -1,6 +1,6 @@
- /* PowerPC64-specific support for 64-bit ELF.
--   Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
--   Free Software Foundation, Inc.
-+   Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-+   2009 Free Software Foundation, Inc.
-    Written by Linus Nordberg, Swox AB <info@swox.com>,
-    based on elf32-ppc.c by Ian Lance Taylor.
-    Largely rewritten by Alan Modra <amodra@bigpond.net.au>
-@@ -2608,9 +2608,15 @@
-       long *adjust;
-     } opd;
- 
--    /* An array for toc sections, indexed by offset/8.
--       Specifies the relocation symbol index used at a given toc offset.  */
--    unsigned *t_symndx;
-+    /* An array for toc sections, indexed by offset/8.  */
-+    struct _toc_sec_data
-+    {
-+      /* Specifies the relocation symbol index used at a given toc offset.  */
-+      unsigned *symndx;
-+
-+      /* And the relocation addend.  */
-+      bfd_vma *add;
-+    } toc;
-   } u;
- 
-   enum _ppc64_sec_type sec_type:2;
-@@ -4578,6 +4584,7 @@
-   const Elf_Internal_Rela *rel_end;
-   asection *sreloc;
-   asection **opd_sym_map;
-+  struct elf_link_hash_entry *tga, *dottga;
- 
-   if (info->relocatable)
-     return TRUE;
-@@ -4594,6 +4601,10 @@
-   BFD_ASSERT (is_ppc64_elf (abfd));
- 
-   htab = ppc_hash_table (info);
-+  tga = elf_link_hash_lookup (&htab->elf, "__tls_get_addr",
-+			      FALSE, FALSE, TRUE);
-+  dottga = elf_link_hash_lookup (&htab->elf, ".__tls_get_addr",
-+				 FALSE, FALSE, TRUE);
-   symtab_hdr = &elf_symtab_hdr (abfd);
- 
-   sym_hashes = elf_sym_hashes (abfd);
-@@ -4829,25 +4840,8 @@
- 	      if (!update_plt_info (abfd, (struct ppc_link_hash_entry *) h,
- 				    rel->r_addend))
- 		return FALSE;
--	      if (h == &htab->tls_get_addr->elf
--		  || h == &htab->tls_get_addr_fd->elf)
-+	      if (h == tga || h == dottga)
- 		sec->has_tls_reloc = 1;
--	      else if (htab->tls_get_addr == NULL
--		       && CONST_STRNEQ (h->root.root.string, ".__tls_get_addr")
--		       && (h->root.root.string[15] == 0
--			   || h->root.root.string[15] == '@'))
--		{
--		  htab->tls_get_addr = (struct ppc_link_hash_entry *) h;
--		  sec->has_tls_reloc = 1;
--		}
--	      else if (htab->tls_get_addr_fd == NULL
--		       && CONST_STRNEQ (h->root.root.string, "__tls_get_addr")
--		       && (h->root.root.string[14] == 0
--			   || h->root.root.string[14] == '@'))
--		{
--		  htab->tls_get_addr_fd = (struct ppc_link_hash_entry *) h;
--		  sec->has_tls_reloc = 1;
--		}
- 	    }
- 	  break;
- 
-@@ -4891,23 +4885,30 @@
- 	  ppc64_sec = ppc64_elf_section_data (sec);
- 	  if (ppc64_sec->sec_type != sec_toc)
- 	    {
-+	      bfd_size_type amt;
-+
- 	      /* One extra to simplify get_tls_mask.  */
--	      bfd_size_type amt = sec->size * sizeof (unsigned) / 8 + 1;
--	      ppc64_sec->u.t_symndx = bfd_zalloc (abfd, amt);
--	      if (ppc64_sec->u.t_symndx == NULL)
-+	      amt = sec->size * sizeof (unsigned) / 8 + sizeof (unsigned);
-+	      ppc64_sec->u.toc.symndx = bfd_zalloc (abfd, amt);
-+	      if (ppc64_sec->u.toc.symndx == NULL)
-+		return FALSE;
-+	      amt = sec->size * sizeof (bfd_vma) / 8;
-+	      ppc64_sec->u.toc.add = bfd_zalloc (abfd, amt);
-+	      if (ppc64_sec->u.toc.add == NULL)
- 		return FALSE;
- 	      BFD_ASSERT (ppc64_sec->sec_type == sec_normal);
- 	      ppc64_sec->sec_type = sec_toc;
- 	    }
- 	  BFD_ASSERT (rel->r_offset % 8 == 0);
--	  ppc64_sec->u.t_symndx[rel->r_offset / 8] = r_symndx;
-+	  ppc64_sec->u.toc.symndx[rel->r_offset / 8] = r_symndx;
-+	  ppc64_sec->u.toc.add[rel->r_offset / 8] = rel->r_addend;
- 
- 	  /* Mark the second slot of a GD or LD entry.
- 	     -1 to indicate GD and -2 to indicate LD.  */
- 	  if (tls_type == (TLS_EXPLICIT | TLS_TLS | TLS_GD))
--	    ppc64_sec->u.t_symndx[rel->r_offset / 8 + 1] = -1;
-+	    ppc64_sec->u.toc.symndx[rel->r_offset / 8 + 1] = -1;
- 	  else if (tls_type == (TLS_EXPLICIT | TLS_TLS | TLS_LD))
--	    ppc64_sec->u.t_symndx[rel->r_offset / 8 + 1] = -2;
-+	    ppc64_sec->u.toc.symndx[rel->r_offset / 8 + 1] = -2;
- 	  goto dodyn;
- 
- 	case R_PPC64_TPREL16:
-@@ -5847,7 +5848,7 @@
-       fdh = (struct ppc_link_hash_entry *) fdh->elf.root.u.i.link;
- 
-   if (fdh == NULL
--      && info->shared
-+      && !info->executable
-       && (fh->elf.root.type == bfd_link_hash_undefined
- 	  || fh->elf.root.type == bfd_link_hash_undefweak))
-     {
-@@ -5880,7 +5881,7 @@
- 
-   if (fdh != NULL
-       && !fdh->elf.forced_local
--      && (info->shared
-+      && (!info->executable
- 	  || fdh->elf.def_dynamic
- 	  || fdh->elf.ref_dynamic
- 	  || (fdh->elf.root.type == bfd_link_hash_undefweak
-@@ -6258,9 +6259,12 @@
-    type suitable for optimization, and 1 otherwise.  */
- 
- static int
--get_tls_mask (char **tls_maskp, unsigned long *toc_symndx,
-+get_tls_mask (char **tls_maskp,
-+	      unsigned long *toc_symndx,
-+	      bfd_vma *toc_addend,
- 	      Elf_Internal_Sym **locsymsp,
--	      const Elf_Internal_Rela *rel, bfd *ibfd)
-+	      const Elf_Internal_Rela *rel,
-+	      bfd *ibfd)
- {
-   unsigned long r_symndx;
-   int next_r;
-@@ -6288,12 +6292,14 @@
-     off = sym->st_value;
-   off += rel->r_addend;
-   BFD_ASSERT (off % 8 == 0);
--  r_symndx = ppc64_elf_section_data (sec)->u.t_symndx[off / 8];
--  next_r = ppc64_elf_section_data (sec)->u.t_symndx[off / 8 + 1];
--  if (!get_sym_h (&h, &sym, &sec, tls_maskp, locsymsp, r_symndx, ibfd))
--    return 0;
-+  r_symndx = ppc64_elf_section_data (sec)->u.toc.symndx[off / 8];
-+  next_r = ppc64_elf_section_data (sec)->u.toc.symndx[off / 8 + 1];
-   if (toc_symndx != NULL)
-     *toc_symndx = r_symndx;
-+  if (toc_addend != NULL)
-+    *toc_addend = ppc64_elf_section_data (sec)->u.toc.add[off / 8];
-+  if (!get_sym_h (&h, &sym, &sec, tls_maskp, locsymsp, r_symndx, ibfd))
-+    return 0;
-   if ((h == NULL
-        || ((h->root.type == bfd_link_hash_defined
- 	    || h->root.type == bfd_link_hash_defweak)
-@@ -6898,36 +6904,49 @@
-   struct ppc_link_hash_table *htab;
- 
-   htab = ppc_hash_table (info);
--  if (htab->tls_get_addr != NULL)
--    {
--      struct ppc_link_hash_entry *h = htab->tls_get_addr;
--
--      while (h->elf.root.type == bfd_link_hash_indirect
--	     || h->elf.root.type == bfd_link_hash_warning)
--	h = (struct ppc_link_hash_entry *) h->elf.root.u.i.link;
-+  htab->tls_get_addr = ((struct ppc_link_hash_entry *)
-+			elf_link_hash_lookup (&htab->elf, ".__tls_get_addr",
-+					      FALSE, FALSE, TRUE));
-+  htab->tls_get_addr_fd = ((struct ppc_link_hash_entry *)
-+			   elf_link_hash_lookup (&htab->elf, "__tls_get_addr",
-+						 FALSE, FALSE, TRUE));
-+  return _bfd_elf_tls_setup (obfd, info);
-+}
- 
--      htab->tls_get_addr = h;
-+/* Return TRUE iff REL is a branch reloc with a global symbol matching
-+   HASH1 or HASH2.  */
- 
--      if (htab->tls_get_addr_fd == NULL
--	  && h->oh != NULL
--	  && h->oh->is_func_descriptor
--	  && (h->oh->elf.root.type == bfd_link_hash_defined
--	      || h->oh->elf.root.type == bfd_link_hash_defweak))
--	htab->tls_get_addr_fd = h->oh;
--    }
-+static bfd_boolean
-+branch_reloc_hash_match (const bfd *ibfd,
-+			 const Elf_Internal_Rela *rel,
-+			 const struct ppc_link_hash_entry *hash1,
-+			 const struct ppc_link_hash_entry *hash2)
-+{
-+  Elf_Internal_Shdr *symtab_hdr = &elf_symtab_hdr (ibfd);
-+  enum elf_ppc64_reloc_type r_type = ELF64_R_TYPE (rel->r_info);
-+  unsigned int r_symndx = ELF64_R_SYM (rel->r_info);
- 
--  if (htab->tls_get_addr_fd != NULL)
-+  if (r_symndx >= symtab_hdr->sh_info
-+      && (r_type == R_PPC64_REL24
-+	  || r_type == R_PPC64_REL14
-+	  || r_type == R_PPC64_REL14_BRTAKEN
-+	  || r_type == R_PPC64_REL14_BRNTAKEN
-+	  || r_type == R_PPC64_ADDR24
-+	  || r_type == R_PPC64_ADDR14
-+	  || r_type == R_PPC64_ADDR14_BRTAKEN
-+	  || r_type == R_PPC64_ADDR14_BRNTAKEN))
-     {
--      struct ppc_link_hash_entry *h = htab->tls_get_addr_fd;
--
--      while (h->elf.root.type == bfd_link_hash_indirect
--	     || h->elf.root.type == bfd_link_hash_warning)
--	h = (struct ppc_link_hash_entry *) h->elf.root.u.i.link;
-+      struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (ibfd);
-+      struct elf_link_hash_entry *h;
- 
--      htab->tls_get_addr_fd = h;
-+      h = sym_hashes[r_symndx - symtab_hdr->sh_info];
-+      while (h->root.type == bfd_link_hash_indirect
-+	     || h->root.type == bfd_link_hash_warning)
-+	h = (struct elf_link_hash_entry *) h->root.u.i.link;
-+      if (h == &hash1->elf || h == &hash2->elf)
-+	return TRUE;
-     }
--
--  return _bfd_elf_tls_setup (obfd, info);
-+  return FALSE;
- }
- 
- /* Run through all the TLS relocs looking for optimization
-@@ -7173,55 +7192,26 @@
- 		      if (!expecting_tls_get_addr)
- 			continue;
- 
--		      if (rel + 1 < relend)
-+		      if (rel + 1 < relend
-+			  && branch_reloc_hash_match (ibfd, rel + 1,
-+						      htab->tls_get_addr,
-+						      htab->tls_get_addr_fd))
- 			{
--			  Elf_Internal_Shdr *symtab_hdr;
--			  enum elf_ppc64_reloc_type r_type2;
--			  unsigned long r_symndx2;
--			  struct elf_link_hash_entry *h2;
--
--			  symtab_hdr = &elf_symtab_hdr (ibfd);
--
--			  /* The next instruction should be a call to
--			     __tls_get_addr.  Peek at the reloc to be sure.  */
--			  r_type2 = ELF64_R_TYPE (rel[1].r_info);
--			  r_symndx2 = ELF64_R_SYM (rel[1].r_info);
--			  if (r_symndx2 >= symtab_hdr->sh_info
--			      && (r_type2 == R_PPC64_REL14
--				  || r_type2 == R_PPC64_REL14_BRTAKEN
--				  || r_type2 == R_PPC64_REL14_BRNTAKEN
--				  || r_type2 == R_PPC64_REL24))
-+			  if (expecting_tls_get_addr == 2)
- 			    {
--			      struct elf_link_hash_entry **sym_hashes;
--
--			      sym_hashes = elf_sym_hashes (ibfd);
--
--			      h2 = sym_hashes[r_symndx2 - symtab_hdr->sh_info];
--			      while (h2->root.type == bfd_link_hash_indirect
--				     || h2->root.type == bfd_link_hash_warning)
--				h2 = ((struct elf_link_hash_entry *)
--				      h2->root.u.i.link);
--			      if (h2 != NULL
--				  && (h2 == &htab->tls_get_addr->elf
--				      || h2 == &htab->tls_get_addr_fd->elf))
--				{
--				  if (expecting_tls_get_addr == 2)
--				    {
--				      /* Check for toc tls entries.  */
--				      char *toc_tls;
--				      int retval;
--
--				      retval = get_tls_mask (&toc_tls, NULL,
--							     &locsyms,
--							     rel, ibfd);
--				      if (retval == 0)
--					goto err_free_rel;
--				      if (retval > 1 && toc_tls != NULL)
--					toc_ref[toc_ref_index] = 1;
--				    }
--				  continue;
--				}
-+			      /* Check for toc tls entries.  */
-+			      char *toc_tls;
-+			      int retval;
-+
-+			      retval = get_tls_mask (&toc_tls, NULL, NULL,
-+						     &locsyms,
-+						     rel, ibfd);
-+			      if (retval == 0)
-+				goto err_free_rel;
-+			      if (retval > 1 && toc_tls != NULL)
-+				toc_ref[toc_ref_index] = 1;
- 			    }
-+			  continue;
- 			}
- 
- 		      if (expecting_tls_get_addr != 1)
-@@ -9744,7 +9734,7 @@
- 		      /* Get tls info.  */
- 		      char *tls_mask;
- 
--		      if (!get_tls_mask (&tls_mask, NULL, &local_syms,
-+		      if (!get_tls_mask (&tls_mask, NULL, NULL, &local_syms,
- 					 irela - 1, input_bfd))
- 			goto error_ret_free_internal;
- 		      if (*tls_mask != 0)
-@@ -10236,6 +10226,7 @@
-       struct ppc_link_hash_entry *fdh;
-       const char *sym_name;
-       unsigned long r_symndx, toc_symndx;
-+      bfd_vma toc_addend;
-       char tls_mask, tls_gd, tls_type;
-       char sym_type;
-       bfd_vma relocation;
-@@ -10344,8 +10335,8 @@
- 	      /* Check for toc tls entries.  */
- 	      char *toc_tls;
- 
--	      if (!get_tls_mask (&toc_tls, &toc_symndx, &local_syms,
--				 rel, input_bfd))
-+	      if (!get_tls_mask (&toc_tls, &toc_symndx, &toc_addend,
-+				 &local_syms, rel, input_bfd))
- 		return FALSE;
- 
- 	      if (toc_tls)
-@@ -10407,8 +10398,8 @@
- 	    char *toc_tls;
- 	    int retval;
- 
--	    retval = get_tls_mask (&toc_tls, &toc_symndx, &local_syms,
--				   rel, input_bfd);
-+	    retval = get_tls_mask (&toc_tls, &toc_symndx, &toc_addend,
-+				   &local_syms, rel, input_bfd);
- 	    if (retval == 0)
- 	      return FALSE;
- 
-@@ -10456,6 +10447,7 @@
- 	      if (toc_symndx != 0)
- 		{
- 		  rel->r_info = ELF64_R_INFO (toc_symndx, r_type);
-+		  rel->r_addend = toc_addend;
- 		  /* We changed the symbol.  Start over in order to
- 		     get h, sym, sec etc. right.  */
- 		  rel--;
-@@ -10509,6 +10501,7 @@
- 	      if (toc_symndx != 0)
- 		{
- 		  rel->r_info = ELF64_R_INFO (toc_symndx, r_type);
-+		  rel->r_addend = toc_addend;
- 		  /* We changed the symbol.  Start over in order to
- 		     get h, sym, sec etc. right.  */
- 		  rel--;
-@@ -10555,20 +10548,18 @@
- 	case R_PPC64_GOT_TLSLD16_LO:
- 	  if (tls_mask != 0 && (tls_mask & TLS_LD) == 0)
- 	    {
--	      bfd_vma insn1, insn2, insn3;
-+	      unsigned int insn1, insn2, insn3;
- 	      bfd_vma offset;
- 
- 	    tls_ldgd_opt:
- 	      /* We know that the next reloc is on a tls_get_addr
- 		 call, since ppc64_elf_tls_optimize checks this.  */
- 	      offset = rel[1].r_offset;
--	      insn1 = bfd_get_32 (output_bfd,
--				  contents + rel->r_offset - d_offset);
--	      insn3 = bfd_get_32 (output_bfd,
--				  contents + offset + 4);
- 	      if ((tls_mask & tls_gd) != 0)
- 		{
- 		  /* IE */
-+		  insn1 = bfd_get_32 (output_bfd,
-+				      contents + rel->r_offset - d_offset);
- 		  insn1 &= (1 << 26) - (1 << 2);
- 		  insn1 |= 58 << 26;	/* ld */
- 		  insn2 = 0x7c636a14;	/* add 3,3,13 */
-@@ -10603,28 +10594,33 @@
- 			rel->r_addend -= (local_syms[r_symndx].st_value
- 					  + sec->output_offset
- 					  + sec->output_section->vma);
--		      rel[1].r_addend = rel->r_addend;
- 		    }
- 		  else if (toc_symndx != 0)
--		    r_symndx = toc_symndx;
-+		    {
-+		      r_symndx = toc_symndx;
-+		      rel->r_addend = toc_addend;
-+		    }
- 		  r_type = R_PPC64_TPREL16_HA;
- 		  rel->r_info = ELF64_R_INFO (r_symndx, r_type);
- 		  rel[1].r_info = ELF64_R_INFO (r_symndx,
- 						R_PPC64_TPREL16_LO);
- 		  rel[1].r_offset += d_offset;
-+		  rel[1].r_addend = rel->r_addend;
- 		}
-+	      bfd_put_32 (output_bfd, insn1,
-+			  contents + rel->r_offset - d_offset);
-+	      insn3 = bfd_get_32 (output_bfd,
-+				  contents + offset + 4);
- 	      if (insn3 == NOP
- 		  || insn3 == CROR_151515 || insn3 == CROR_313131)
- 		{
--		  insn3 = insn2;
--		  insn2 = NOP;
- 		  rel[1].r_offset += 4;
-+		  bfd_put_32 (output_bfd, insn2, contents + offset + 4);
-+		  insn2 = NOP;
- 		}
--	      bfd_put_32 (output_bfd, insn1,
--			  contents + rel->r_offset - d_offset);
- 	      bfd_put_32 (output_bfd, insn2, contents + offset);
--	      bfd_put_32 (output_bfd, insn3, contents + offset + 4);
--	      if (tls_gd == 0 || toc_symndx != 0)
-+	      if ((tls_mask & tls_gd) == 0
-+		  && (tls_gd == 0 || toc_symndx != 0))
- 		{
- 		  /* We changed the symbol.  Start over in order
- 		     to get h, sym, sec etc. right.  */
-@@ -11001,7 +10997,8 @@
- 
- 		*offp = off | 1;
- 		if ((info->shared || indx != 0)
--		    && (h == NULL
-+		    && (offp == &ppc64_tlsld_got (input_bfd)->offset
-+			|| h == NULL
- 			|| ELF_ST_VISIBILITY (h->elf.other) == STV_DEFAULT
- 			|| h->elf.root.type != bfd_link_hash_undefweak))
- 		  {
-diff -Naur binutils-2.19.1.orig/bfd/elf.c binutils-2.19.1/bfd/elf.c
---- binutils-2.19.1.orig/bfd/elf.c	2008-12-23 05:54:48.000000000 -0800
-+++ binutils-2.19.1/bfd/elf.c	2009-03-02 05:41:07.000000000 -0800
-@@ -1608,6 +1608,8 @@
- 
-       if (hdr->sh_entsize != bed->s->sizeof_sym)
- 	return FALSE;
-+      if (hdr->sh_info * hdr->sh_entsize > hdr->sh_size)
-+	return FALSE;
-       BFD_ASSERT (elf_onesymtab (abfd) == 0);
-       elf_onesymtab (abfd) = shindex;
-       elf_tdata (abfd)->symtab_hdr = *hdr;
-@@ -1863,14 +1865,8 @@
-       return TRUE;
- 
-     case SHT_GROUP:
--      /* We need a BFD section for objcopy and relocatable linking,
--	 and it's handy to have the signature available as the section
--	 name.  */
-       if (! IS_VALID_GROUP_SECTION_HEADER (hdr))
- 	return FALSE;
--      name = group_signature (abfd, hdr);
--      if (name == NULL)
--	return FALSE;
-       if (!_bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex))
- 	return FALSE;
-       if (hdr->contents != NULL)
-@@ -2687,13 +2683,15 @@
-     *failedptr = TRUE;
- }
- 
--/* Fill in the contents of a SHT_GROUP section.  */
-+/* Fill in the contents of a SHT_GROUP section.  Called from
-+   _bfd_elf_compute_section_file_positions for gas, objcopy, and
-+   when ELF targets use the generic linker, ld.  Called for ld -r
-+   from bfd_elf_final_link.  */
- 
- void
- bfd_elf_set_group_contents (bfd *abfd, asection *sec, void *failedptrarg)
- {
-   bfd_boolean *failedptr = failedptrarg;
--  unsigned long symindx;
-   asection *elt, *first;
-   unsigned char *loc;
-   bfd_boolean gas;
-@@ -2704,20 +2702,49 @@
-       || *failedptr)
-     return;
- 
--  symindx = 0;
--  if (elf_group_id (sec) != NULL)
--    symindx = elf_group_id (sec)->udata.i;
--
--  if (symindx == 0)
--    {
--      /* If called from the assembler, swap_out_syms will have set up
--	 elf_section_syms;  If called for "ld -r", use target_index.  */
--      if (elf_section_syms (abfd) != NULL)
--	symindx = elf_section_syms (abfd)[sec->index]->udata.i;
--      else
--	symindx = sec->target_index;
-+  if (elf_section_data (sec)->this_hdr.sh_info == 0)
-+    {
-+      unsigned long symindx = 0;
-+
-+      /* elf_group_id will have been set up by objcopy and the
-+	 generic linker.  */
-+      if (elf_group_id (sec) != NULL)
-+	symindx = elf_group_id (sec)->udata.i;
-+
-+      if (symindx == 0)
-+	{
-+	  /* If called from the assembler, swap_out_syms will have set up
-+	     elf_section_syms.  */
-+	  BFD_ASSERT (elf_section_syms (abfd) != NULL);
-+	  symindx = elf_section_syms (abfd)[sec->index]->udata.i;
-+	}
-+      elf_section_data (sec)->this_hdr.sh_info = symindx;
-+    }
-+  else if (elf_section_data (sec)->this_hdr.sh_info == (unsigned int) -2)
-+    {
-+      /* The ELF backend linker sets sh_info to -2 when the group
-+	 signature symbol is global, and thus the index can't be
-+	 set until all local symbols are output.  */
-+      asection *igroup = elf_sec_group (elf_next_in_group (sec));
-+      struct bfd_elf_section_data *sec_data = elf_section_data (igroup);
-+      unsigned long symndx = sec_data->this_hdr.sh_info;
-+      unsigned long extsymoff = 0;
-+      struct elf_link_hash_entry *h;
-+
-+      if (!elf_bad_symtab (igroup->owner))
-+	{
-+	  Elf_Internal_Shdr *symtab_hdr;
-+
-+	  symtab_hdr = &elf_tdata (igroup->owner)->symtab_hdr;
-+	  extsymoff = symtab_hdr->sh_info;
-+	}
-+      h = elf_sym_hashes (igroup->owner)[symndx - extsymoff];
-+      while (h->root.type == bfd_link_hash_indirect
-+	     || h->root.type == bfd_link_hash_warning)
-+	h = (struct elf_link_hash_entry *) h->root.u.i.link;
-+
-+      elf_section_data (sec)->this_hdr.sh_info = h->indx;
-     }
--  elf_section_data (sec)->this_hdr.sh_info = symindx;
- 
-   /* The contents won't be allocated for "ld -r" or objcopy.  */
-   gas = TRUE;
-@@ -4131,6 +4158,7 @@
-   bfd_size_type maxpagesize;
-   unsigned int alloc;
-   unsigned int i, j;
-+  bfd_vma header_pad = 0;
- 
-   if (link_info == NULL
-       && !_bfd_elf_map_sections_to_segments (abfd, link_info))
-@@ -4138,7 +4166,11 @@
- 
-   alloc = 0;
-   for (m = elf_tdata (abfd)->segment_map; m != NULL; m = m->next)
--    ++alloc;
-+    {
-+      ++alloc;
-+      if (m->header_size)
-+	header_pad = m->header_size;
-+    }
- 
-   elf_elfheader (abfd)->e_phoff = bed->s->sizeof_ehdr;
-   elf_elfheader (abfd)->e_phentsize = bed->s->sizeof_phdr;
-@@ -4156,7 +4188,21 @@
-       return TRUE;
-     }
- 
--  phdrs = bfd_alloc2 (abfd, alloc, sizeof (Elf_Internal_Phdr));
-+  /* We're writing the size in elf_tdata (abfd)->program_header_size,
-+     see assign_file_positions_except_relocs, so make sure we have
-+     that amount allocated, with trailing space cleared.
-+     The variable alloc contains the computed need, while elf_tdata
-+     (abfd)->program_header_size contains the size used for the
-+     layout.
-+     See ld/emultempl/elf-generic.em:gld${EMULATION_NAME}_map_segments
-+     where the layout is forced to according to a larger size in the
-+     last iterations for the testcase ld-elf/header.  */
-+  BFD_ASSERT (elf_tdata (abfd)->program_header_size % bed->s->sizeof_phdr
-+	      == 0);
-+  phdrs = bfd_zalloc2 (abfd,
-+		       (elf_tdata (abfd)->program_header_size
-+			/ bed->s->sizeof_phdr),
-+		       sizeof (Elf_Internal_Phdr));
-   elf_tdata (abfd)->phdr = phdrs;
-   if (phdrs == NULL)
-     return FALSE;
-@@ -4167,6 +4213,11 @@
- 
-   off = bed->s->sizeof_ehdr;
-   off += alloc * bed->s->sizeof_phdr;
-+  if (header_pad < (bfd_vma) off)
-+    header_pad = 0;
-+  else
-+    header_pad -= off;
-+  off += header_pad;
- 
-   for (m = elf_tdata (abfd)->segment_map, p = phdrs, j = 0;
-        m != NULL;
-@@ -4354,6 +4405,11 @@
- 
- 	  p->p_filesz += alloc * bed->s->sizeof_phdr;
- 	  p->p_memsz += alloc * bed->s->sizeof_phdr;
-+	  if (m->count)
-+	    {
-+	      p->p_filesz += header_pad;
-+	      p->p_memsz += header_pad;
-+	    }
- 	}
- 
-       if (p->p_type == PT_LOAD
-@@ -5836,6 +5892,10 @@
- 	    phdr_included = TRUE;
- 	}
- 
-+      if (map->includes_filehdr && first_section)
-+	/* We need to keep the space used by the headers fixed.  */
-+	map->header_size = first_section->vma - segment->p_vaddr;
-+      
-       if (!map->includes_phdrs
- 	  && !map->includes_filehdr
- 	  && map->p_paddr_valid)
-@@ -6004,7 +6064,7 @@
- 	  if (elf_section_flags (isec) & SHF_GROUP)
- 	    elf_section_flags (osec) |= SHF_GROUP;
- 	  elf_next_in_group (osec) = elf_next_in_group (isec);
--	  elf_group_name (osec) = elf_group_name (isec);
-+	  elf_section_data (osec)->group = elf_section_data (isec)->group;
- 	}
-     }
- 
-diff -Naur binutils-2.19.1.orig/bfd/elf-eh-frame.c binutils-2.19.1/bfd/elf-eh-frame.c
---- binutils-2.19.1.orig/bfd/elf-eh-frame.c	2008-09-17 02:00:44.000000000 -0700
-+++ binutils-2.19.1/bfd/elf-eh-frame.c	2009-03-02 05:53:31.000000000 -0800
-@@ -549,16 +549,6 @@
- 	     < (bfd_size_type) ((buf) - ehbuf)))	\
-     cookie->rel++
- 
--#define REQUIRE_CLEARED_RELOCS(buf)			\
--  while (cookie->rel < cookie->relend			\
--	 && (cookie->rel->r_offset			\
--	     < (bfd_size_type) ((buf) - ehbuf)))	\
--    {							\
--      REQUIRE (cookie->rel->r_info == 0);		\
--      REQUIRE (cookie->rel->r_addend == 0);		\
--      cookie->rel++;					\
--    }
--
- #define GET_RELOC(buf)					\
-   ((cookie->rel < cookie->relend			\
-     && (cookie->rel->r_offset				\
-@@ -817,16 +807,16 @@
- 
- 	  buf = last_fde + 4 + hdr_length;
- 
--	  /* Cleared FDE?  The instructions will not be cleared but verify all
--	     the relocation entries for them are cleared.  */
--	  if (rsec == NULL)
--	    {
--	      REQUIRE_CLEARED_RELOCS (buf);
--	    }
--	  else
--	    {
--	      SKIP_RELOCS (buf);
--	    }
-+	  /* For NULL RSEC (cleared FDE belonging to a discarded section)
-+	     the relocations are commonly cleared.  We do not sanity check if
-+	     all these relocations are cleared as (1) relocations to
-+	     .gcc_except_table will remain uncleared (they will get dropped
-+	     with the drop of this unused FDE) and (2) BFD already safely drops
-+	     relocations of any type to .eh_frame by
-+	     elf_section_ignore_discarded_relocs.
-+	     TODO: The .gcc_except_table entries should be also filtered as
-+	     .eh_frame entries; or GCC could rather use COMDAT for them.  */
-+	  SKIP_RELOCS (buf);
- 	}
- 
-       /* Try to interpret the CFA instructions and find the first
-diff -Naur binutils-2.19.1.orig/bfd/elflink.c binutils-2.19.1/bfd/elflink.c
---- binutils-2.19.1.orig/bfd/elflink.c	2008-08-22 01:32:39.000000000 -0700
-+++ binutils-2.19.1/bfd/elflink.c	2009-03-02 05:48:42.000000000 -0800
-@@ -9046,6 +9046,63 @@
- 	  continue;
- 	}
- 
-+      if (finfo->info->relocatable
-+	  && (o->flags & (SEC_LINKER_CREATED | SEC_GROUP)) == SEC_GROUP)
-+	{
-+	  /* Deal with the group signature symbol.  */
-+	  struct bfd_elf_section_data *sec_data = elf_section_data (o);
-+	  unsigned long symndx = sec_data->this_hdr.sh_info;
-+	  asection *osec = o->output_section;
-+
-+	  if (symndx >= locsymcount
-+	      || (elf_bad_symtab (input_bfd)
-+		  && finfo->sections[symndx] == NULL))
-+	    {
-+	      struct elf_link_hash_entry *h = sym_hashes[symndx - extsymoff];
-+	      while (h->root.type == bfd_link_hash_indirect
-+		     || h->root.type == bfd_link_hash_warning)
-+		h = (struct elf_link_hash_entry *) h->root.u.i.link;
-+	      /* Arrange for symbol to be output.  */
-+	      h->indx = -2;
-+	      elf_section_data (osec)->this_hdr.sh_info = -2;
-+	    }
-+	  else if (ELF_ST_TYPE (isymbuf[symndx].st_info) == STT_SECTION)
-+	    {
-+	      /* We'll use the output section target_index.  */
-+	      asection *sec = finfo->sections[symndx]->output_section;
-+	      elf_section_data (osec)->this_hdr.sh_info = sec->target_index;
-+	    }
-+	  else
-+	    {
-+	      if (finfo->indices[symndx] == -1)
-+		{
-+		  /* Otherwise output the local symbol now.  */
-+		  Elf_Internal_Sym sym = isymbuf[symndx];
-+		  asection *sec = finfo->sections[symndx]->output_section;
-+		  const char *name;
-+
-+		  name = bfd_elf_string_from_elf_section (input_bfd,
-+							  symtab_hdr->sh_link,
-+							  sym.st_name);
-+		  if (name == NULL)
-+		    return FALSE;
-+
-+		  sym.st_shndx = _bfd_elf_section_from_bfd_section (output_bfd,
-+								    sec);
-+		  if (sym.st_shndx == SHN_BAD)
-+		    return FALSE;
-+
-+		  sym.st_value += o->output_offset;
-+
-+		  finfo->indices[symndx] = bfd_get_symcount (output_bfd);
-+		  if (! elf_link_output_sym (finfo, name, &sym, o, NULL))
-+		    return FALSE;
-+		}
-+	      elf_section_data (osec)->this_hdr.sh_info
-+		= finfo->indices[symndx];
-+	    }
-+	}
-+
-       if ((o->flags & SEC_HAS_CONTENTS) == 0
- 	  || (o->size == 0 && (o->flags & SEC_RELOC) == 0))
- 	continue;
-@@ -11982,8 +12039,21 @@
-   return ret;
- }
- 
-+/* For a SHT_GROUP section, return the group signature.  For other
-+   sections, return the normal section name.  */
-+
-+static const char *
-+section_signature (asection *sec)
-+{
-+  if ((sec->flags & SEC_GROUP) != 0
-+      && elf_next_in_group (sec) != NULL
-+      && elf_group_name (elf_next_in_group (sec)) != NULL)
-+    return elf_group_name (elf_next_in_group (sec));
-+  return sec->name;
-+}
-+
- void
--_bfd_elf_section_already_linked (bfd *abfd, struct bfd_section *sec,
-+_bfd_elf_section_already_linked (bfd *abfd, asection *sec,
- 				 struct bfd_link_info *info)
- {
-   flagword flags;
-@@ -12023,7 +12093,7 @@
-      causes trouble for MIPS ELF, which relies on link once semantics
-      to handle the .reginfo section correctly.  */
- 
--  name = bfd_get_section_name (abfd, sec);
-+  name = section_signature (sec);
- 
-   if (CONST_STRNEQ (name, ".gnu.linkonce.")
-       && (p = strchr (name + sizeof (".gnu.linkonce.") - 1, '.')) != NULL)
-@@ -12038,7 +12108,7 @@
-       /* We may have 2 different types of sections on the list: group
- 	 sections and linkonce sections.  Match like sections.  */
-       if ((flags & SEC_GROUP) == (l->sec->flags & SEC_GROUP)
--	  && strcmp (name, l->sec->name) == 0
-+	  && strcmp (name, section_signature (l->sec)) == 0
- 	  && bfd_coff_get_comdat_section (l->sec->owner, l->sec) == NULL)
- 	{
- 	  /* The section has already been linked.  See if we should
-@@ -12161,6 +12231,28 @@
- 	    }
- 	}
- 
-+  /* Do not complain on unresolved relocations in `.gnu.linkonce.r.F'
-+     referencing its discarded `.gnu.linkonce.t.F' counterpart - g++-3.4
-+     specific as g++-4.x is using COMDAT groups (without the `.gnu.linkonce'
-+     prefix) instead.  `.gnu.linkonce.r.*' were the `.rodata' part of its
-+     matching `.gnu.linkonce.t.*'.  If `.gnu.linkonce.r.F' is not discarded
-+     but its `.gnu.linkonce.t.F' is discarded means we chose one-only
-+     `.gnu.linkonce.t.F' section from a different bfd not requiring any
-+     `.gnu.linkonce.r.F'.  Thus `.gnu.linkonce.r.F' should be discarded.
-+     The reverse order cannot happen as there is never a bfd with only the
-+     `.gnu.linkonce.r.F' section.  The order of sections in a bfd does not
-+     matter as here were are looking only for cross-bfd sections.  */
-+
-+  if ((flags & SEC_GROUP) == 0 && CONST_STRNEQ (name, ".gnu.linkonce.r."))
-+    for (l = already_linked_list->entry; l != NULL; l = l->next)
-+      if ((l->sec->flags & SEC_GROUP) == 0
-+	  && CONST_STRNEQ (l->sec->name, ".gnu.linkonce.t."))
-+	{
-+	  if (abfd != l->sec->owner)
-+	    sec->output_section = bfd_abs_section_ptr;
-+	  break;
-+	}
-+
-   /* This is the first section with this name.  Record it.  */
-   if (! bfd_section_already_linked_table_insert (already_linked_list, sec))
-     info->callbacks->einfo (_("%F%P: already_linked_table: %E"));
-diff -Naur binutils-2.19.1.orig/bfd/linker.c binutils-2.19.1/bfd/linker.c
---- binutils-2.19.1.orig/bfd/linker.c	2008-08-16 20:12:49.000000000 -0700
-+++ binutils-2.19.1/bfd/linker.c	2009-03-02 05:32:54.000000000 -0800
-@@ -2796,18 +2796,36 @@
- 	}
-     }
- 
--  /* Get and relocate the section contents.  */
--  sec_size = (input_section->rawsize > input_section->size
--	      ? input_section->rawsize
--	      : input_section->size);
--  contents = bfd_malloc (sec_size);
--  if (contents == NULL && sec_size != 0)
--    goto error_return;
--  new_contents = (bfd_get_relocated_section_contents
--		  (output_bfd, info, link_order, contents, info->relocatable,
--		   _bfd_generic_link_get_symbols (input_bfd)));
--  if (!new_contents)
--    goto error_return;
-+  if ((output_section->flags & (SEC_GROUP | SEC_LINKER_CREATED)) == SEC_GROUP
-+      && input_section->size != 0)
-+    {
-+      /* Group section contents are set by bfd_elf_set_group_contents.  */
-+      if (!output_bfd->output_has_begun)
-+	{
-+	  /* FIXME: This hack ensures bfd_elf_set_group_contents is called.  */
-+	  if (!bfd_set_section_contents (output_bfd, output_section, "", 0, 1))
-+	    goto error_return;
-+	}
-+      new_contents = output_section->contents;
-+      BFD_ASSERT (new_contents != NULL);
-+      BFD_ASSERT (input_section->output_offset == 0);
-+    }
-+  else
-+    {
-+      /* Get and relocate the section contents.  */
-+      sec_size = (input_section->rawsize > input_section->size
-+		  ? input_section->rawsize
-+		  : input_section->size);
-+      contents = bfd_malloc (sec_size);
-+      if (contents == NULL && sec_size != 0)
-+	goto error_return;
-+      new_contents = (bfd_get_relocated_section_contents
-+		      (output_bfd, info, link_order, contents,
-+		       info->relocatable,
-+		       _bfd_generic_link_get_symbols (input_bfd)));
-+      if (!new_contents)
-+	goto error_return;
-+    }
- 
-   /* Output the section contents.  */
-   loc = input_section->output_offset * bfd_octets_per_byte (output_bfd);
-diff -Naur binutils-2.19.1.orig/bfd/Makefile.in binutils-2.19.1/bfd/Makefile.in
---- binutils-2.19.1.orig/bfd/Makefile.in	2009-02-02 02:44:39.000000000 -0800
-+++ binutils-2.19.1/bfd/Makefile.in	2009-07-07 08:52:14.000000000 -0700
-@@ -190,7 +190,7 @@
- PACKAGE_TARNAME = @PACKAGE_TARNAME@
- PACKAGE_VERSION = @PACKAGE_VERSION@
- PATH_SEPARATOR = @PATH_SEPARATOR@
--PKGVERSION = @PKGVERSION@
-+PKGVERSION = (GNU Binutils for Cross-LFS - Retrieved on 20090707) 
- POSUB = @POSUB@
- RANLIB = @RANLIB@
- REPORT_BUGS_TEXI = @REPORT_BUGS_TEXI@
-@@ -271,7 +271,7 @@
- ACLOCAL_AMFLAGS = -I . -I .. -I ../config
- 
- # Uncomment the following line when doing a release.
--RELEASE = y
-+RELEASE=y
- INCDIR = $(srcdir)/../include
- CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
- MKDEP = gcc -MM
-diff -Naur binutils-2.19.1.orig/bfd/syms.c binutils-2.19.1/bfd/syms.c
---- binutils-2.19.1.orig/bfd/syms.c	2008-06-30 13:51:58.000000000 -0700
-+++ binutils-2.19.1/bfd/syms.c	2009-03-02 05:49:22.000000000 -0800
-@@ -1,6 +1,6 @@
- /* Generic symbol-table support for the BFD library.
-    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
--   2000, 2001, 2002, 2003, 2004, 2007
-+   2000, 2001, 2002, 2003, 2004, 2007, 2008, 2009
-    Free Software Foundation, Inc.
-    Written by Cygnus Support.
- 
-@@ -1379,10 +1379,11 @@
- 	{
- 	  size_t len;
- 
--	  if (info->filename != NULL)
--	    free (info->filename);
-+	  /* Don't free info->filename here.  objdump and other
-+	     apps keep a copy of a previously returned file name
-+	     pointer.  */
- 	  len = strlen (file_name) + 1;
--	  info->filename = bfd_malloc (dirlen + len);
-+	  info->filename = bfd_alloc (abfd, dirlen + len);
- 	  if (info->filename == NULL)
- 	    return FALSE;
- 	  memcpy (info->filename, directory_name, dirlen);
-diff -Naur binutils-2.19.1.orig/bfd/version.h binutils-2.19.1/bfd/version.h
---- binutils-2.19.1.orig/bfd/version.h	2009-02-02 02:09:26.000000000 -0800
-+++ binutils-2.19.1/bfd/version.h	2009-07-06 17:00:10.000000000 -0700
-@@ -1,4 +1,4 @@
--#define BFD_VERSION_DATE 20090202
-+#define BFD_VERSION_DATE 20090707
- #define BFD_VERSION @bfd_version@
- #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
- #define REPORT_BUGS_TO @report_bugs_to@
-diff -Naur binutils-2.19.1.orig/binutils/ChangeLog binutils-2.19.1/binutils/ChangeLog
---- binutils-2.19.1.orig/binutils/ChangeLog	2008-12-23 05:54:49.000000000 -0800
-+++ binutils-2.19.1/binutils/ChangeLog	2009-03-02 05:43:13.000000000 -0800
-@@ -1,3 +1,16 @@
-+2009-03-02  Alan Modra  <amodra@bigpond.net.au>
-+
-+	2008-12-04  Ben Elliston  <bje@au.ibm.com>
-+	* doc/binutils.texi (objdump): Update booke documentation.
-+	* NEWS: Document user-visible changes to command line options.
-+
-+	2008-10-10  Nathan Froyd  <froydnj@codesourcery.com>
-+	* readelf.c (display_power_gnu_attribute): Decode
-+	Tag_GNU_Power_ABI_Struct_Return.
-+
-+	2008-09-28  Alan Modra  <amodra@bigpond.net.au>
-+	* objcopy.c (setup_section): Set elf_group_id.
-+
- 2008-12-23  Nick Clifton  <nickc@redhat.com>
- 
- 	* windmc.c (main): Use correct type for file length.
-diff -Naur binutils-2.19.1.orig/binutils/doc/binutils.texi binutils-2.19.1/binutils/doc/binutils.texi
---- binutils-2.19.1.orig/binutils/doc/binutils.texi	2008-08-05 17:42:17.000000000 -0700
-+++ binutils-2.19.1/binutils/doc/binutils.texi	2009-03-02 05:43:13.000000000 -0800
-@@ -1843,12 +1843,12 @@
- instructs the disassembler to print a mnemonic suffix even when the
- suffix could be inferred by the operands.
- 
--For PPC, @option{booke}, @option{booke32} and @option{booke64} select
--disassembly of BookE instructions.  @option{32} and @option{64} select
--PowerPC and PowerPC64 disassembly, respectively.  @option{e300}
--selects disassembly for the e300 family.  @option{440} selects
--disassembly for the PowerPC 440.  @option{ppcps} selects disassembly
--for the paired single instructions of the PPC750CL.
-+For PowerPC, @option{booke} controls the disassembly of BookE
-+instructions.  @option{32} and @option{64} select PowerPC and
-+PowerPC64 disassembly, respectively.  @option{e300} selects
-+disassembly for the e300 family.  @option{440} selects disassembly for
-+the PowerPC 440.  @option{ppcps} selects disassembly for the paired
-+single instructions of the PPC750CL.
- 
- For MIPS, this option controls the printing of instruction mnemonic
- names and register names in disassembled instructions.  Multiple
-diff -Naur binutils-2.19.1.orig/binutils/NEWS binutils-2.19.1/binutils/NEWS
---- binutils-2.19.1.orig/binutils/NEWS	2008-09-08 01:56:56.000000000 -0700
-+++ binutils-2.19.1/binutils/NEWS	2009-03-02 05:43:13.000000000 -0800
-@@ -1,5 +1,9 @@
- -*- text -*-
- 
-+* Support for PowerPC booke64 instructions has been removed.  The assembler no
-+  longer accepts -mbooke32 or -mbooke64 and the disassembler no longer accepts
-+  -Mbooke32 or -Mbooke64.  Instead, -mbooke and -Mbooke should be used.
-+
- Changes in 2.19:
- 
- * Added -wL switch to dump decoded contents of .debug_line.
-diff -Naur binutils-2.19.1.orig/binutils/objcopy.c binutils-2.19.1/binutils/objcopy.c
---- binutils-2.19.1.orig/binutils/objcopy.c	2008-08-05 17:42:17.000000000 -0700
-+++ binutils-2.19.1/binutils/objcopy.c	2009-03-02 05:31:14.000000000 -0800
-@@ -2344,6 +2344,18 @@
-   if (extract_symbol)
-     return;
- 
-+  if ((isection->flags & SEC_GROUP) != 0)
-+    {
-+      asymbol *gsym = group_signature (isection);
-+
-+      if (gsym != NULL)
-+	{
-+	  gsym->flags |= BSF_KEEP;
-+	  if (ibfd->xvec->flavour == bfd_target_elf_flavour)
-+	    elf_group_id (isection) = gsym;
-+	}
-+    }
-+
-   /* Allow the BFD backend to copy any private data it understands
-      from the input section to the output section.  */
-   if (!bfd_copy_private_section_data (ibfd, isection, obfd, osection))
-@@ -2351,13 +2363,6 @@
-       err = _("failed to copy private data");
-       goto loser;
-     }
--  else if ((isection->flags & SEC_GROUP) != 0)
--    {
--      asymbol *gsym = group_signature (isection);
--
--      if (gsym != NULL)
--	gsym->flags |= BSF_KEEP;
--    }
- 
-   /* All went well.  */
-   return;
-diff -Naur binutils-2.19.1.orig/binutils/readelf.c binutils-2.19.1/binutils/readelf.c
---- binutils-2.19.1.orig/binutils/readelf.c	2008-09-17 02:00:44.000000000 -0700
-+++ binutils-2.19.1/binutils/readelf.c	2009-03-02 05:35:24.000000000 -0800
-@@ -9062,6 +9062,29 @@
-       return p;
-    }
- 
-+  if (tag == Tag_GNU_Power_ABI_Struct_Return)
-+    {
-+      val = read_uleb128 (p, &len);
-+      p += len;
-+      printf ("  Tag_GNU_Power_ABI_Struct_Return: ");
-+      switch (val)
-+       {
-+       case 0:
-+         printf ("Any\n");
-+         break;
-+       case 1:
-+         printf ("r3/r4\n");
-+         break;
-+       case 2:
-+         printf ("Memory\n");
-+         break;
-+       default:
-+         printf ("??? (%d)\n", val);
-+         break;
-+       }
-+      return p;
-+    }
-+
-   if (tag & 1)
-     type = 1; /* String.  */
-   else
-diff -Naur binutils-2.19.1.orig/configure.ac binutils-2.19.1/configure.ac
---- binutils-2.19.1.orig/configure.ac	2009-02-02 03:54:49.000000000 -0800
-+++ binutils-2.19.1/configure.ac	2008-09-03 19:18:16.000000000 -0700
-@@ -166,7 +166,7 @@
- # binutils, gas and ld appear in that order because it makes sense to run
- # "make check" in that particular order.
- # If --enable-gold is used, "gold" will replace "ld".
--host_tools="byacc flex bison binutils gas ld fixincludes gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools"
-+host_tools="texinfo byacc flex bison binutils gas ld fixincludes gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools"
- 
- # libgcj represents the runtime libraries only used by gcj.
- libgcj="target-libffi \
-diff -Naur binutils-2.19.1.orig/gas/ChangeLog binutils-2.19.1/gas/ChangeLog
---- binutils-2.19.1.orig/gas/ChangeLog	2009-01-14 00:51:14.000000000 -0800
-+++ binutils-2.19.1/gas/ChangeLog	2009-04-01 08:47:36.000000000 -0700
-@@ -1,3 +1,39 @@
-+2009-04-01  Nick Clifton  <nickc@redhat.com>
-+
-+	* Import this patch:
-+
-+	2008-11-14  Peter Jansen  <pwjansen@yahoo.com>
-+
-+	PR 7026
-+	* config/tc-arm.c: Ensure that all uses of as_bad have a
-+	formatting string.
-+
-+2009-03-04  Alan Modra  <amodra@bigpond.net.au>
-+
-+	* config/tc-ppc.c (md_assemble): APUinfo only for e500.
-+
-+2009-03-02  Alan Modra  <amodra@bigpond.net.au>
-+
-+	2009-02-26  Peter Bergner  <bergner@vnet.ibm.com>
-+	* config/tc-ppc.c (pre_defined_registers): Add "f32" to "f63",
-+	"f.32" to "f.63", "vs0" to "vs63" and "vs.0" to "vs.63".
-+	(parse_cpu): Extend -mpower7 to accept power7 and isel instructions.
-+
-+	2009-01-09  Peter Bergner  <bergner@vnet.ibm.com>
-+	* config/tc-ppc.c (ppc_setup_opcodes): Remove PPC_OPCODE_NOPOWER4 test.
-+	Test the new "deprecated" opcode field.
-+
-+	2008-12-04  Ben Elliston  <bje@au.ibm.com>
-+	* config/tc-ppc.c (parse_cpu): Remove booke64 support. Update
-+	usage strings.
-+	(ppc_setup_opcodes): Likewise, remove booke64 support.
-+	* doc/c-ppc.texi (PowerPC-Opts): Remove -mbooke32 and -mbooke64.
-+	* doc/as.texinfo (Overview): Likewise.
-+
-+	2008-09-09  Peter Bergner  <bergner@vnet.ibm.com>
-+	* config/tc-ppc.c (ppc_setup_opcodes): Simplify POWER4/NOPOWER4 test.
-+	Remove POWER5 and POWER6 tests.
-+
- 2009-01-14  Jakub Jelinek  <jakub@redhat.com>
- 
- 	* Makefile.am (ehopt.o): Add struc-symbol.h.
-@@ -132,7 +168,7 @@
- 	targets.
- 	* doc/c-i386.texi (i386-Directives): New node.  Used to document
- 	the .lcomm directive.
--	
-+
- 2008-08-30  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
- 
- 	* config/tc-hppa.h: Don't define DWARF2_EH_FRAME_READ_ONLY on Linux
-diff -Naur binutils-2.19.1.orig/gas/config/tc-arm.c binutils-2.19.1/gas/config/tc-arm.c
---- binutils-2.19.1.orig/gas/config/tc-arm.c	2008-08-12 16:39:30.000000000 -0700
-+++ binutils-2.19.1/gas/config/tc-arm.c	2009-04-01 08:47:37.000000000 -0700
-@@ -3456,7 +3456,7 @@
- 
-       if (reg == FAIL)
- 	{
--	  as_bad (_(reg_expected_msgs[REG_TYPE_MMXWR]));
-+	  as_bad ("%s", _(reg_expected_msgs[REG_TYPE_MMXWR]));
- 	  goto error;
- 	}
- 
-@@ -3470,7 +3470,7 @@
- 	  hi_reg = arm_reg_parse (&input_line_pointer, REG_TYPE_MMXWR);
- 	  if (hi_reg == FAIL)
- 	    {
--	      as_bad (_(reg_expected_msgs[REG_TYPE_MMXWR]));
-+	      as_bad ("%s", _(reg_expected_msgs[REG_TYPE_MMXWR]));
- 	      goto error;
- 	    }
- 	  else if (reg >= hi_reg)
-@@ -3588,7 +3588,7 @@
- 
-       if (reg == FAIL)
- 	{
--	  as_bad (_(reg_expected_msgs[REG_TYPE_MMXWCG]));
-+	  as_bad ("%s", _(reg_expected_msgs[REG_TYPE_MMXWCG]));
- 	  goto error;
- 	}
- 
-@@ -3603,7 +3603,7 @@
- 	  hi_reg = arm_reg_parse (&input_line_pointer, REG_TYPE_MMXWCG);
- 	  if (hi_reg == FAIL)
- 	    {
--	      as_bad (_(reg_expected_msgs[REG_TYPE_MMXWCG]));
-+	      as_bad ("%s", _(reg_expected_msgs[REG_TYPE_MMXWCG]));
- 	      goto error;
- 	    }
- 	  else if (reg >= hi_reg)
-@@ -3709,7 +3709,7 @@
-   reg = arm_reg_parse (&input_line_pointer, REG_TYPE_RN);
-   if (reg == FAIL)
-     {
--      as_bad (_(reg_expected_msgs[REG_TYPE_RN]));
-+      as_bad ("%s", _(reg_expected_msgs[REG_TYPE_RN]));
-       ignore_rest_of_line ();
-       return;
-     }
-diff -Naur binutils-2.19.1.orig/gas/config/tc-ppc.c binutils-2.19.1/gas/config/tc-ppc.c
---- binutils-2.19.1.orig/gas/config/tc-ppc.c	2008-08-01 21:38:50.000000000 -0700
-+++ binutils-2.19.1/gas/config/tc-ppc.c	2009-03-03 15:16:02.000000000 -0800
-@@ -1,6 +1,6 @@
- /* tc-ppc.c -- Assemble for the PowerPC or POWER (RS/6000)
-    Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
--   2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-+   2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-    Written by Ian Lance Taylor, Cygnus Support.
- 
-    This file is part of GAS, the GNU Assembler.
-@@ -358,9 +358,42 @@
-   { "f.3", 3 },
-   { "f.30", 30 },
-   { "f.31", 31 },
-+
-+  { "f.32", 32 },    /* Extended floating point scalar registers (ISA 2.06).  */
-+  { "f.33", 33 },
-+  { "f.34", 34 },
-+  { "f.35", 35 },
-+  { "f.36", 36 },
-+  { "f.37", 37 },
-+  { "f.38", 38 },
-+  { "f.39", 39 },
-   { "f.4", 4 },
-+  { "f.40", 40 },
-+  { "f.41", 41 },
-+  { "f.42", 42 },
-+  { "f.43", 43 },
-+  { "f.44", 44 },
-+  { "f.45", 45 },
-+  { "f.46", 46 },
-+  { "f.47", 47 },
-+  { "f.48", 48 },
-+  { "f.49", 49 },
-   { "f.5", 5 },
-+  { "f.50", 50 },
-+  { "f.51", 51 },
-+  { "f.52", 52 },
-+  { "f.53", 53 },
-+  { "f.54", 54 },
-+  { "f.55", 55 },
-+  { "f.56", 56 },
-+  { "f.57", 57 },
-+  { "f.58", 58 },
-+  { "f.59", 59 },
-   { "f.6", 6 },
-+  { "f.60", 60 },
-+  { "f.61", 61 },
-+  { "f.62", 62 },
-+  { "f.63", 63 },
-   { "f.7", 7 },
-   { "f.8", 8 },
-   { "f.9", 9 },
-@@ -391,9 +424,42 @@
-   { "f3", 3 },
-   { "f30", 30 },
-   { "f31", 31 },
-+
-+  { "f32", 32 },    /* Extended floating point scalar registers (ISA 2.06).  */
-+  { "f33", 33 },
-+  { "f34", 34 },
-+  { "f35", 35 },
-+  { "f36", 36 },
-+  { "f37", 37 },
-+  { "f38", 38 },
-+  { "f39", 39 },
-   { "f4", 4 },
-+  { "f40", 40 },
-+  { "f41", 41 },
-+  { "f42", 42 },
-+  { "f43", 43 },
-+  { "f44", 44 },
-+  { "f45", 45 },
-+  { "f46", 46 },
-+  { "f47", 47 },
-+  { "f48", 48 },
-+  { "f49", 49 },
-   { "f5", 5 },
-+  { "f50", 50 },
-+  { "f51", 51 },
-+  { "f52", 52 },
-+  { "f53", 53 },
-+  { "f54", 54 },
-+  { "f55", 55 },
-+  { "f56", 56 },
-+  { "f57", 57 },
-+  { "f58", 58 },
-+  { "f59", 59 },
-   { "f6", 6 },
-+  { "f60", 60 },
-+  { "f61", 61 },
-+  { "f62", 62 },
-+  { "f63", 63 },
-   { "f7", 7 },
-   { "f8", 8 },
-   { "f9", 9 },
-@@ -501,7 +567,7 @@
-   { "srr0", 26 }, /* Machine Status Save/Restore Register 0 */
-   { "srr1", 27 }, /* Machine Status Save/Restore Register 1 */
- 
--  { "v.0", 0 },     /* Vector registers */
-+  { "v.0", 0 },     /* Vector (Altivec/VMX) registers */
-   { "v.1", 1 },
-   { "v.10", 10 },
-   { "v.11", 11 },
-@@ -567,6 +633,136 @@
-   { "v8", 8 },
-   { "v9", 9 },
- 
-+  { "vs.0", 0 },     /* Vector Scalar (VSX) registers (ISA 2.06).  */
-+  { "vs.1", 1 },
-+  { "vs.10", 10 },
-+  { "vs.11", 11 },
-+  { "vs.12", 12 },
-+  { "vs.13", 13 },
-+  { "vs.14", 14 },
-+  { "vs.15", 15 },
-+  { "vs.16", 16 },
-+  { "vs.17", 17 },
-+  { "vs.18", 18 },
-+  { "vs.19", 19 },
-+  { "vs.2", 2 },
-+  { "vs.20", 20 },
-+  { "vs.21", 21 },
-+  { "vs.22", 22 },
-+  { "vs.23", 23 },
-+  { "vs.24", 24 },
-+  { "vs.25", 25 },
-+  { "vs.26", 26 },
-+  { "vs.27", 27 },
-+  { "vs.28", 28 },
-+  { "vs.29", 29 },
-+  { "vs.3", 3 },
-+  { "vs.30", 30 },
-+  { "vs.31", 31 },
-+  { "vs.32", 32 },
-+  { "vs.33", 33 },
-+  { "vs.34", 34 },
-+  { "vs.35", 35 },
-+  { "vs.36", 36 },
-+  { "vs.37", 37 },
-+  { "vs.38", 38 },
-+  { "vs.39", 39 },
-+  { "vs.4", 4 },
-+  { "vs.40", 40 },
-+  { "vs.41", 41 },
-+  { "vs.42", 42 },
-+  { "vs.43", 43 },
-+  { "vs.44", 44 },
-+  { "vs.45", 45 },
-+  { "vs.46", 46 },
-+  { "vs.47", 47 },
-+  { "vs.48", 48 },
-+  { "vs.49", 49 },
-+  { "vs.5", 5 },
-+  { "vs.50", 50 },
-+  { "vs.51", 51 },
-+  { "vs.52", 52 },
-+  { "vs.53", 53 },
-+  { "vs.54", 54 },
-+  { "vs.55", 55 },
-+  { "vs.56", 56 },
-+  { "vs.57", 57 },
-+  { "vs.58", 58 },
-+  { "vs.59", 59 },
-+  { "vs.6", 6 },
-+  { "vs.60", 60 },
-+  { "vs.61", 61 },
-+  { "vs.62", 62 },
-+  { "vs.63", 63 },
-+  { "vs.7", 7 },
-+  { "vs.8", 8 },
-+  { "vs.9", 9 },
-+
-+  { "vs0", 0 },
-+  { "vs1", 1 },
-+  { "vs10", 10 },
-+  { "vs11", 11 },
-+  { "vs12", 12 },
-+  { "vs13", 13 },
-+  { "vs14", 14 },
-+  { "vs15", 15 },
-+  { "vs16", 16 },
-+  { "vs17", 17 },
-+  { "vs18", 18 },
-+  { "vs19", 19 },
-+  { "vs2", 2 },
-+  { "vs20", 20 },
-+  { "vs21", 21 },
-+  { "vs22", 22 },
-+  { "vs23", 23 },
-+  { "vs24", 24 },
-+  { "vs25", 25 },
-+  { "vs26", 26 },
-+  { "vs27", 27 },
-+  { "vs28", 28 },
-+  { "vs29", 29 },
-+  { "vs3", 3 },
-+  { "vs30", 30 },
-+  { "vs31", 31 },
-+  { "vs32", 32 },
-+  { "vs33", 33 },
-+  { "vs34", 34 },
-+  { "vs35", 35 },
-+  { "vs36", 36 },
-+  { "vs37", 37 },
-+  { "vs38", 38 },
-+  { "vs39", 39 },
-+  { "vs4", 4 },
-+  { "vs40", 40 },
-+  { "vs41", 41 },
-+  { "vs42", 42 },
-+  { "vs43", 43 },
-+  { "vs44", 44 },
-+  { "vs45", 45 },
-+  { "vs46", 46 },
-+  { "vs47", 47 },
-+  { "vs48", 48 },
-+  { "vs49", 49 },
-+  { "vs5", 5 },
-+  { "vs50", 50 },
-+  { "vs51", 51 },
-+  { "vs52", 52 },
-+  { "vs53", 53 },
-+  { "vs54", 54 },
-+  { "vs55", 55 },
-+  { "vs56", 56 },
-+  { "vs57", 57 },
-+  { "vs58", 58 },
-+  { "vs59", 59 },
-+  { "vs6", 6 },
-+  { "vs60", 60 },
-+  { "vs61", 61 },
-+  { "vs62", 62 },
-+  { "vs63", 63 },
-+  { "vs7", 7 },
-+  { "vs8", 8 },
-+  { "vs9", 9 },
-+
-   { "xer", 1 },
- 
- };
-@@ -919,12 +1115,6 @@
-     {
-       ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_32;
-     }
--  /* -mbooke64 means enable 64-bit BookE support.  */
--  else if (strcmp (arg, "booke64") == 0)
--    {
--      ppc_cpu = (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE
--		 | PPC_OPCODE_BOOKE64 | PPC_OPCODE_64);
--    }
-   else if (strcmp (arg, "power4") == 0)
-     {
-       ppc_cpu = (PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC
-@@ -946,8 +1136,9 @@
-   else if (strcmp (arg, "power7") == 0)
-     {
-       ppc_cpu = (PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC
--		 | PPC_OPCODE_64 | PPC_OPCODE_POWER4
--		 | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6
-+		 | PPC_OPCODE_ISEL | PPC_OPCODE_64
-+		 | PPC_OPCODE_POWER4 | PPC_OPCODE_POWER5
-+		 | PPC_OPCODE_POWER6 | PPC_OPCODE_POWER7
- 		 | PPC_OPCODE_ALTIVEC | PPC_OPCODE_VSX);
-     }
-   else if (strcmp (arg, "cell") == 0)
-@@ -1149,8 +1340,7 @@
-   fprintf (stream, _("\
- -mppc64, -m620		generate code for PowerPC 620/625/630\n\
- -mppc64bridge		generate code for PowerPC 64, including bridge insns\n\
---mbooke64		generate code for 64-bit PowerPC BookE\n\
---mbooke, mbooke32	generate code for 32-bit PowerPC BookE\n\
-+-mbooke			generate code for 32-bit PowerPC BookE\n\
- -mpower4		generate code for Power4 architecture\n\
- -mpower5		generate code for Power5 architecture\n\
- -mpower6		generate code for Power6 architecture\n\
-@@ -1359,8 +1549,7 @@
- 
- 		 There are also cases where the table needs to be out
- 		 of order to disassemble the correct instruction for
--		 processor variants.  eg. "lhae" booke64 insn must be
--		 found before "ld" ppc64 insn.  */
-+		 processor variants.  */
- 	      else if (0)
- 		{
- 		  unsigned long t1 = op[0].opcode;
-@@ -1420,23 +1609,7 @@
- 	      || ((op->flags & (PPC_OPCODE_32 | PPC_OPCODE_64))
- 		  == (ppc_cpu & (PPC_OPCODE_32 | PPC_OPCODE_64)))
- 	      || (ppc_cpu & PPC_OPCODE_64_BRIDGE) != 0)
--	  /* Certain instructions (eg: extsw) do not exist in the
--	     32-bit BookE instruction set, but they do exist in the
--	     64-bit BookE instruction set, and other PPC instruction
--	     sets.  Check to see if the opcode has the BOOKE64 flag set.
--	     If it does make sure that the target CPU is not the BookE32.  */
--	  && ((op->flags & PPC_OPCODE_BOOKE64) == 0
--	      || (ppc_cpu & PPC_OPCODE_BOOKE64) == PPC_OPCODE_BOOKE64
--	      || (ppc_cpu & PPC_OPCODE_BOOKE) == 0)
--	  && ((op->flags & (PPC_OPCODE_POWER4 | PPC_OPCODE_NOPOWER4)) == 0
--	      || ((op->flags & PPC_OPCODE_POWER4)
--		  == (ppc_cpu & PPC_OPCODE_POWER4)))
--	  && ((op->flags & PPC_OPCODE_POWER5) == 0
--	      || ((op->flags & PPC_OPCODE_POWER5)
--		  == (ppc_cpu & PPC_OPCODE_POWER5)))
--	  && ((op->flags & PPC_OPCODE_POWER6) == 0
--	      || ((op->flags & PPC_OPCODE_POWER6)
--		  == (ppc_cpu & PPC_OPCODE_POWER6))))
-+	  && !(ppc_cpu & op->deprecated))
- 	{
- 	  const char *retval;
- 
-@@ -2792,10 +2965,7 @@
- 
- #ifdef OBJ_ELF
-   /* Do we need/want a APUinfo section? */
--  if (ppc_cpu & (PPC_OPCODE_SPE
--   	       | PPC_OPCODE_ISEL | PPC_OPCODE_EFS
--	       | PPC_OPCODE_BRLOCK | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK
--	       | PPC_OPCODE_RFMCI))
-+  if ((ppc_cpu & PPC_OPCODE_E500MC) != 0)
-     {
-       /* These are all version "1".  */
-       if (opcode->flags & PPC_OPCODE_SPE)
-diff -Naur binutils-2.19.1.orig/gas/doc/as.texinfo binutils-2.19.1/gas/doc/as.texinfo
---- binutils-2.19.1.orig/gas/doc/as.texinfo	2008-10-02 01:07:17.000000000 -0700
-+++ binutils-2.19.1/gas/doc/as.texinfo	2009-03-02 05:43:14.000000000 -0800
-@@ -409,8 +409,7 @@
- 
- @emph{Target PowerPC options:}
-    [@b{-mpwrx}|@b{-mpwr2}|@b{-mpwr}|@b{-m601}|@b{-mppc}|@b{-mppc32}|@b{-m603}|@b{-m604}|
--    @b{-m403}|@b{-m405}|@b{-mppc64}|@b{-m620}|@b{-mppc64bridge}|@b{-mbooke}|
--    @b{-mbooke32}|@b{-mbooke64}]
-+    @b{-m403}|@b{-m405}|@b{-mppc64}|@b{-m620}|@b{-mppc64bridge}|@b{-mbooke}]
-    [@b{-mcom}|@b{-many}|@b{-maltivec}|@b{-mvsx}] [@b{-memb}]
-    [@b{-mregnames}|@b{-mno-regnames}]
-    [@b{-mrelocatable}|@b{-mrelocatable-lib}]
-diff -Naur binutils-2.19.1.orig/gas/doc/c-ppc.texi binutils-2.19.1/gas/doc/c-ppc.texi
---- binutils-2.19.1.orig/gas/doc/c-ppc.texi	2008-08-01 21:38:50.000000000 -0700
-+++ binutils-2.19.1/gas/doc/c-ppc.texi	2009-03-02 05:43:14.000000000 -0800
-@@ -70,10 +70,7 @@
- @item -mppc64bridge
- Generate code for PowerPC 64, including bridge insns.
- 
--@item -mbooke64
--Generate code for 64-bit BookE.
--
--@item -mbooke, mbooke32
-+@item -mbooke
- Generate code for 32-bit BookE.
- 
- @item -me300
-diff -Naur binutils-2.19.1.orig/gas/testsuite/ChangeLog binutils-2.19.1/gas/testsuite/ChangeLog
---- binutils-2.19.1.orig/gas/testsuite/ChangeLog	2009-01-14 00:49:59.000000000 -0800
-+++ binutils-2.19.1/gas/testsuite/ChangeLog	2009-03-02 05:59:36.000000000 -0800
-@@ -1,3 +1,56 @@
-+2009-03-02  Alan Modra  <amodra@bigpond.net.au>
-+
-+	2009-02-26  Peter Bergner  <bergner@vnet.ibm.com>
-+	* gas/ppc/e500mc.d ("wait", "waitsrv", "waitimpl"): Add tests.
-+	* gas/ppc/e500mc.s: Likewise.
-+	* gas/ppc/power6.d ("cdtbcd", "cbcdtd", "addg6s"): Add tests.
-+	* gas/ppc/power6.s: Likewise.
-+	* gas/ppc/power7.d ("lfdpx", "mffgpr", "mftgpr"): Remove invalid tests.
-+	("wait", "waitsrv", "waitimpl", "divwe", "divwe.", "divweo", "divweo.",
-+	"divweu", "divweu.", "divweuo", "divweuo.", "bpermd", "popcntw",
-+	"popcntd", "ldbrx", "stdbrx", "lfiwzx", "lfiwzx", "fcfids", "fcfids.",
-+	"fcfidus", "fcfidus.", "fctiwu", "fctiwu.", "fctiwuz", "fctiwuz.",
-+	"fctidu", "fctidu.", "fctiduz", "fctiduz.", "fcfidu", "fcfidu.",
-+	"ftdiv", "ftdiv", "ftsqrt", "ftsqrt", "dcbtt", "dcbtstt", "dcffix",
-+	"dcffix.", "lbarx", "lbarx", "lbarx", "lharx", "lharx", "lharx",
-+	"stbcx.", "sthcx.", "fre", "fre.", "fres", "fres.", "frsqrte",
-+	"frsqrte.", "frsqrtes", "frsqrtes.", "isel"): Add tests.
-+	* gas/ppc/power7.s: Likewise.
-+	* gas/ppc/vsx.d: New test.
-+	* gas/ppc/vsx.s: Likewise.
-+	* gas/ppc/ppc.exp: Run it.
-+
-+	2009-02-19  Peter Bergner  <bergner@vnet.ibm.com>
-+	* gas/ppc/e500mc.d ("lfdepx", "stfdepx"): Fix tests to expect a
-+	floating point register.
-+
-+	2009-02-05  Peter Bergner  <bergner@vnet.ibm.com>
-+	* gas/ppc/booke.s ("dcbt", "dcbtst"): New tests.
-+	* gas/ppc/booke.d: Likewise.
-+	* gas/ppc/power4_32.s: Likewise.
-+	* gas/ppc/power4_32.d: Likewise.
-+
-+	2009-01-14  Peter Bergner  <bergner@vnet.ibm.com>
-+	* gas/ppc/power6.s ("mtfsf", "mtfsf.", "mtfsfi", "mtfsfi."): Add tests.
-+	* gas/ppc/power6.d: Likewise.
-+
-+	2008-12-04  Ben Elliston  <bje@au.ibm.com>
-+	* gas/ppc/booke.s: Remove booke64 instructions.
-+	* gas/ppc/booke.d: Update expected disassembly output.
-+	* gas/ppc/booke_xcoff.s: Use -mbooke/-Mbooke.
-+	* gas/ppc/booke_xcoff.d: Likewise.
-+	* gas/ppc/booke_xcoff64.d: Likewise.
-+	* gas/ppc/booke_xcoff64.s: Likewise.
-+
-+	2008-09-09  Peter Bergner  <bergner@vnet.ibm.com>
-+	* gas/ppc/common.s: New test.
-+	* gas/ppc/common.d: Likewise.
-+	* gas/ppc/power4_32.s: Likewise.
-+	* gas/ppc/power4_32.d: Likewise.
-+	* gas/ppc/power6.s: Add attn, mtcr, mtcrf, mfcr, dcbz.
-+	* gas/ppc/power6.d: Likewise.
-+	* gas/ppc/ppc.exp: Run power4_32 test.
-+
- 2009-01-08  Adam Nemet  <anemet@caviumnetworks.com>
- 
- 	* gas/mips/mips1-fp.s, gas/mips/mips1-fp.d, gas/mips/mips1-fp.l:
-diff -Naur binutils-2.19.1.orig/gas/testsuite/gas/ppc/booke.d binutils-2.19.1/gas/testsuite/gas/ppc/booke.d
---- binutils-2.19.1.orig/gas/testsuite/gas/ppc/booke.d	2007-04-18 16:58:12.000000000 -0700
-+++ binutils-2.19.1/gas/testsuite/gas/ppc/booke.d	2009-03-02 05:54:22.000000000 -0800
-@@ -1,4 +1,4 @@
--#as: -mbooke64
-+#as: -mbooke
- #objdump: -dr -Mbooke
- #name: BookE tests
- 
-@@ -6,151 +6,38 @@
- 
- Disassembly of section \.text:
- 
--0+0000000 <start>:
--   0:	24 25 00 30 	bce     1,4\*cr1\+gt,30 <branch_target_1>
--   4:	24 46 00 3d 	bcel    2,4\*cr1\+eq,40 <branch_target_2>
--   8:	24 67 00 52 	bcea    3,4\*cr1\+so,50 <branch_target_3>
--			8: R_PPC(64)?_ADDR14	\.text\+0x50
--   c:	24 88 00 73 	bcela   4,4\*cr2\+lt,70 <branch_target_4>
--			c: R_PPC(64)?_ADDR14	\.text\+0x70
--  10:	4c a9 00 22 	bclre   5,4\*cr2\+gt
--  14:	4c aa 00 23 	bclrel  5,4\*cr2\+eq
--  18:	4d 0b 04 22 	bcctre  8,4\*cr2\+so
--  1c:	4d 0c 04 23 	bcctrel 8,4\*cr3\+lt
--  20:	58 00 00 74 	be      94 <branch_target_5>
--  24:	58 00 00 89 	bel     ac <branch_target_6>
--  28:	58 00 00 f6 	bea     f4 <branch_target_7>
--			28: R_PPC(64)?_ADDR24	\.text\+0xf4
--  2c:	58 00 01 2b 	bela    128 <branch_target_8>
--			2c: R_PPC(64)?_ADDR24	\.text\+0x128
--
--0+0000030 <branch_target_1>:
--  30:	e9 09 00 80 	lbze    r8,8\(r9\)
--  34:	e9 8f 00 41 	lbzue   r12,4\(r15\)
--  38:	7c 86 40 fe 	lbzuxe  r4,r6,r8
--  3c:	7c 65 38 be 	lbzxe   r3,r5,r7
--
--0+0000040 <branch_target_2>:
--  40:	f8 a6 06 40 	lde     r5,400\(r6\)
--  44:	f8 c7 07 11 	ldue    r6,452\(r7\)
--  48:	7c e8 4e 3e 	ldxe    r7,r8,r9
--  4c:	7d 4b 66 7e 	lduxe   r10,r11,r12
--
--0+0000050 <branch_target_3>:
--  50:	f9 81 02 06 	lfde    f12,128\(r1\)
--  54:	f8 25 00 47 	lfdue   f1,16\(r5\)
--  58:	7c a1 1c be 	lfdxe   f5,r1,r3
--  5c:	7c c2 24 fe 	lfduxe  f6,r2,r4
--  60:	f9 09 00 c4 	lfse    f8,48\(r9\)
--  64:	f9 2a 01 15 	lfsue   f9,68\(r10\)
--  68:	7d 44 44 7e 	lfsuxe  f10,r4,r8
--  6c:	7d 23 3c 3e 	lfsxe   f9,r3,r7
--
--0+0000070 <branch_target_4>:
--  70:	e9 45 03 24 	lhae    r10,50\(r5\)
--  74:	e8 23 00 55 	lhaue   r1,5\(r3\)
--  78:	7c a1 1a fe 	lhauxe  r5,r1,r3
--  7c:	7f be fa be 	lhaxe   r29,r30,r31
--  80:	7c 22 1e 3c 	lhbrxe  r1,r2,r3
--  84:	e8 83 01 22 	lhze    r4,18\(r3\)
--  88:	e8 c9 01 43 	lhzue   r6,20\(r9\)
--  8c:	7c a7 4a 7e 	lhzuxe  r5,r7,r9
--  90:	7d 27 2a 3e 	lhzxe   r9,r7,r5
--
--0+0000094 <branch_target_5>:
--  94:	7d 4f a0 fc 	lwarxe  r10,r15,r20
--  98:	7c aa 94 3c 	lwbrxe  r5,r10,r18
--  9c:	eb 9d 00 46 	lwze    r28,4\(r29\)
--  a0:	e9 0a 02 87 	lwzue   r8,40\(r10\)
--  a4:	7c 66 48 7e 	lwzuxe  r3,r6,r9
--  a8:	7f dd e0 3e 	lwzxe   r30,r29,r28
--
--0+00000ac <branch_target_6>:
--  ac:	7c 06 3d fc 	dcbae   r6,r7
--  b0:	7c 08 48 bc 	dcbfe   r8,r9
--  b4:	7c 0a 5b bc 	dcbie   r10,r11
--  b8:	7c 08 f0 7c 	dcbste  r8,r30
--  bc:	7c c3 0a 3c 	dcbte   6,r3,r1
--  c0:	7c a4 11 fa 	dcbtste 5,r4,r2
--  c4:	7c 0f 77 fc 	dcbze   r15,r14
--  c8:	7c 03 27 bc 	icbie   r3,r4
--  cc:	7c a8 48 2c 	icbt    5,r8,r9
--  d0:	7c ca 78 3c 	icbte   6,r10,r15
--  d4:	7c a6 02 26 	mfapidi r5,r6
--  d8:	7c 07 46 24 	tlbivax r7,r8
--  dc:	7c 09 56 26 	tlbivaxe r9,r10
--  e0:	7c 0b 67 24 	tlbsx   r11,r12
--  e4:	7c 0d 77 26 	tlbsxe  r13,r14
--  e8:	7c 00 07 a4 	tlbwe   
--  ec:	7c 00 07 a4 	tlbwe   
--  f0:	7c 21 0f a4 	tlbwe   r1,r1,1
--
--0+00000f4 <branch_target_7>:
--  f4:	7c 22 1b 14 	adde64  r1,r2,r3
--  f8:	7c 85 37 14 	adde64o r4,r5,r6
--  fc:	7c e8 03 d4 	addme64 r7,r8
-- 100:	7d 2a 07 d4 	addme64o r9,r10
-- 104:	7d 6c 03 94 	addze64 r11,r12
-- 108:	7d ae 07 94 	addze64o r13,r14
-- 10c:	7e 80 04 40 	mcrxr64 cr5
-- 110:	7d f0 8b 10 	subfe64 r15,r16,r17
-- 114:	7e 53 a7 10 	subfe64o r18,r19,r20
-- 118:	7e b6 03 d0 	subfme64 r21,r22
-- 11c:	7e f8 07 d0 	subfme64o r23,r24
-- 120:	7f 3a 03 90 	subfze64 r25,r26
-- 124:	7f 7c 07 90 	subfze64o r27,r28
--
--0+0000128 <branch_target_8>:
-- 128:	e8 22 03 28 	stbe    r1,50\(r2\)
-- 12c:	e8 64 02 89 	stbue   r3,40\(r4\)
-- 130:	7c a6 39 fe 	stbuxe  r5,r6,r7
-- 134:	7d 09 51 be 	stbxe   r8,r9,r10
-- 138:	7d 6c 6b ff 	stdcxe\. r11,r12,r13
-- 13c:	f9 cf 00 78 	stde    r14,28\(r15\)
-- 140:	fa 11 00 59 	stdue   r16,20\(r17\)
-- 144:	7e 53 a7 3e 	stdxe   r18,r19,r20
-- 148:	7e b6 bf 7e 	stduxe  r21,r22,r23
-- 14c:	f8 38 00 3e 	stfde   f1,12\(r24\)
-- 150:	f8 59 00 0f 	stfdue  f2,0\(r25\)
-- 154:	7c 7a dd be 	stfdxe  f3,r26,r27
-- 158:	7c 9c ed fe 	stfduxe f4,r28,r29
-- 15c:	7c be ff be 	stfiwxe f5,r30,r31
-- 160:	f8 de 00 6c 	stfse   f6,24\(r30\)
-- 164:	f8 fd 00 5d 	stfsue  f7,20\(r29\)
-- 168:	7d 1c dd 3e 	stfsxe  f8,r28,r27
-- 16c:	7d 3a cd 7e 	stfsuxe f9,r26,r25
-- 170:	7f 17 b7 3c 	sthbrxe r24,r23,r22
-- 174:	ea b4 01 ea 	sthe    r21,30\(r20\)
-- 178:	ea 72 02 8b 	sthue   r19,40\(r18\)
-- 17c:	7e 30 7b 7e 	sthuxe  r17,r16,r15
-- 180:	7d cd 63 3e 	sthxe   r14,r13,r12
-- 184:	7d 6a 4d 3c 	stwbrxe r11,r10,r9
-- 188:	7d 07 31 3d 	stwcxe\. r8,r7,r6
-- 18c:	e8 a4 03 2e 	stwe    r5,50\(r4\)
-- 190:	e8 62 02 8f 	stwue   r3,40\(r2\)
-- 194:	7c 22 19 7e 	stwuxe  r1,r2,r3
-- 198:	7c 85 31 3e 	stwxe   r4,r5,r6
-- 19c:	4c 00 00 66 	rfci
-- 1a0:	7c 60 01 06 	wrtee   r3
-- 1a4:	7c 00 81 46 	wrteei  1
-- 1a8:	7c 85 02 06 	mfdcrx  r4,r5
-- 1ac:	7c aa 3a 86 	mfdcr   r5,234
-- 1b0:	7c e6 03 06 	mtdcrx  r6,r7
-- 1b4:	7d 10 6b 86 	mtdcr   432,r8
-- 1b8:	7c 00 04 ac 	msync
-- 1bc:	7c 09 55 ec 	dcba    r9,r10
-- 1c0:	7c 00 06 ac 	mbar    
-- 1c4:	7c 00 06 ac 	mbar    
-- 1c8:	7c 20 06 ac 	mbar    1
-- 1cc:	7d 8d 77 24 	tlbsx   r12,r13,r14
-- 1d0:	7d 8d 77 25 	tlbsx\.  r12,r13,r14
-- 1d4:	7d 8d 77 26 	tlbsxe  r12,r13,r14
-- 1d8:	7d 8d 77 27 	tlbsxe\. r12,r13,r14
-- 1dc:	7c 12 42 a6 	mfsprg  r0,2
-- 1e0:	7c 12 42 a6 	mfsprg  r0,2
-- 1e4:	7c 12 43 a6 	mtsprg  2,r0
-- 1e8:	7c 12 43 a6 	mtsprg  2,r0
-- 1ec:	7c 07 42 a6 	mfsprg  r0,7
-- 1f0:	7c 07 42 a6 	mfsprg  r0,7
-- 1f4:	7c 17 43 a6 	mtsprg  7,r0
-- 1f8:	7c 17 43 a6 	mtsprg  7,r0
-+0+0000000 <branch_target_1>:
-+   0:	7c a8 48 2c 	icbt    5,r8,r9
-+   4:	7c a6 02 26 	mfapidi r5,r6
-+   8:	7c 07 46 24 	tlbivax r7,r8
-+   c:	7c 0b 67 24 	tlbsx   r11,r12
-+  10:	7c 00 07 a4 	tlbwe   
-+  14:	7c 00 07 a4 	tlbwe   
-+  18:	7c 21 0f a4 	tlbwe   r1,r1,1
-+
-+0+000001c <branch_target_2>:
-+  1c:	4c 00 00 66 	rfci
-+  20:	7c 60 01 06 	wrtee   r3
-+  24:	7c 00 81 46 	wrteei  1
-+  28:	7c 85 02 06 	mfdcrx  r4,r5
-+  2c:	7c aa 3a 86 	mfdcr   r5,234
-+  30:	7c e6 03 06 	mtdcrx  r6,r7
-+  34:	7d 10 6b 86 	mtdcr   432,r8
-+  38:	7c 00 04 ac 	msync
-+  3c:	7c 09 55 ec 	dcba    r9,r10
-+  40:	7c 00 06 ac 	mbar    
-+  44:	7c 00 06 ac 	mbar    
-+  48:	7c 20 06 ac 	mbar    1
-+  4c:	7d 8d 77 24 	tlbsx   r12,r13,r14
-+  50:	7d 8d 77 25 	tlbsx\.  r12,r13,r14
-+  54:	7c 12 42 a6 	mfsprg  r0,2
-+  58:	7c 12 42 a6 	mfsprg  r0,2
-+  5c:	7c 12 43 a6 	mtsprg  2,r0
-+  60:	7c 12 43 a6 	mtsprg  2,r0
-+  64:	7c 07 42 a6 	mfsprg  r0,7
-+  68:	7c 07 42 a6 	mfsprg  r0,7
-+  6c:	7c 17 43 a6 	mtsprg  7,r0
-+  70:	7c 17 43 a6 	mtsprg  7,r0
-+  74:	7c 05 32 2c 	dcbt    r5,r6
-+  78:	7c 05 32 2c 	dcbt    r5,r6
-+  7c:	7d 05 32 2c 	dcbt    8,r5,r6
-diff -Naur binutils-2.19.1.orig/gas/testsuite/gas/ppc/booke.s binutils-2.19.1/gas/testsuite/gas/ppc/booke.s
---- binutils-2.19.1.orig/gas/testsuite/gas/ppc/booke.s	2007-04-18 16:58:12.000000000 -0700
-+++ binutils-2.19.1/gas/testsuite/gas/ppc/booke.s	2009-03-02 05:54:22.000000000 -0800
-@@ -1,127 +1,17 @@
- # Motorola PowerPC BookE tests
--#as: -mbooke32
-+#as: -mbooke
- 	.section ".text"
--start:
--	bce	1, 5, branch_target_1
--	bcel	2, 6, branch_target_2
--	bcea	3, 7, branch_target_3
--	bcela	4, 8, branch_target_4
--	bclre	5, 9
--	bclrel	5, 10
--	bcctre	8, 11
--	bcctrel	8, 12
--	be	branch_target_5
--	bel	branch_target_6
--	bea	branch_target_7
--	bela	branch_target_8
- 
--branch_target_1:
--	lbze	8, 8(9)
--	lbzue	12, 4(15)
--	lbzuxe	4, 6, 8
--	lbzxe	3, 5, 7
--
--branch_target_2:
--	lde	5, 400(6)
--	ldue	6, 452(7)
--	ldxe	7, 8, 9
--	lduxe	10, 11, 12
--
--branch_target_3:
--	lfde	12, 128(1)
--	lfdue	1, 16(5)
--	lfdxe	5, 1, 3
--	lfduxe	6, 2, 4
--	lfse	8, 48(9)
--	lfsue	9, 68(10)
--	lfsuxe	10, 4, 8
--	lfsxe	9, 3, 7
--
--branch_target_4:
--	lhae	10, 50(5)
--	lhaue	1, 5(3)	
--	lhauxe	5, 1, 3
--	lhaxe	29, 30, 31
--	lhbrxe	1, 2, 3
--	lhze	4, 18(3)
--	lhzue	6, 20(9)
--	lhzuxe	5, 7, 9
--	lhzxe	9, 7, 5
--
--branch_target_5:
--	lwarxe	10, 15, 20
--	lwbrxe	5, 10, 18
--	lwze	28, 4(29)
--	lwzue	8, 40(10)
--	lwzuxe	3, 6, 9
--	lwzxe	30, 29, 28
--
--branch_target_6:
--	dcbae	6, 7
--	dcbfe	8, 9
--	dcbie	10, 11
--	dcbste	8, 30
--	dcbte	6, 3, 1
--	dcbtste	5, 4, 2
--	dcbze	15, 14
--	icbie	3, 4
-+branch_target_1:	
- 	icbt	5, 8, 9	
--	icbte	6, 10, 15
- 	mfapidi	5, 6
- 	tlbivax	7, 8
--	tlbivaxe 9, 10	
- 	tlbsx	11, 12
--	tlbsxe	13, 14
- 	tlbwe
- 	tlbwe	0,0,0
- 	tlbwe	1,1,1
- 
--branch_target_7:
--	adde64	1, 2, 3
--	adde64o	4, 5, 6
--	addme64 7, 8
--	addme64o 9, 10
--	addze64 11, 12
--	addze64o 13, 14
--	mcrxr64 5
--	subfe64 15, 16, 17
--	subfe64o 18, 19, 20
--	subfme64 21, 22
--	subfme64o 23, 24
--	subfze64 25, 26
--	subfze64o 27, 28
--
--branch_target_8:
--	stbe	1, 50(2)
--	stbue	3, 40(4)
--	stbuxe	5, 6, 7
--	stbxe	8, 9, 10
--	stdcxe.	11, 12, 13
--	stde	14, 28(15)
--	stdue	16, 20(17)
--	stdxe	18, 19, 20
--	stduxe	21, 22, 23
--	stfde	1, 12(24)
--	stfdue	2, 0(25)
--	stfdxe	3, 26, 27
--	stfduxe 4, 28, 29
--	stfiwxe	5, 30, 31
--	stfse	6, 24(30)
--	stfsue	7, 20(29)
--	stfsxe	8, 28, 27
--	stfsuxe	9, 26, 25
--	sthbrxe	24, 23, 22
--	sthe	21, 30(20)
--	sthue	19, 40(18)
--	sthuxe	17, 16, 15
--	sthxe	14, 13, 12
--	stwbrxe	11, 10, 9
--	stwcxe.	8, 7, 6
--	stwe	5, 50(4)
--	stwue	3, 40(2)
--	stwuxe	1, 2, 3
--	stwxe	4, 5, 6
--
-+branch_target_2:	
- 	rfci
- 	wrtee	3
- 	wrteei	1
-@@ -137,8 +27,6 @@
- 
- 	tlbsx	12, 13, 14
- 	tlbsx.	12, 13, 14
--	tlbsxe	12, 13, 14
--	tlbsxe.	12, 13, 14
- 
- 	mfsprg 0, 2
- 	mfsprg2 0
-@@ -148,3 +36,7 @@
- 	mfsprg7 0
- 	mtsprg 7, 0
- 	mtsprg7 0
-+
-+	dcbt 5,6
-+	dcbt 0,5,6
-+	dcbt 8,5,6
-diff -Naur binutils-2.19.1.orig/gas/testsuite/gas/ppc/booke_xcoff64.d binutils-2.19.1/gas/testsuite/gas/ppc/booke_xcoff64.d
---- binutils-2.19.1.orig/gas/testsuite/gas/ppc/booke_xcoff64.d	2007-10-01 09:24:40.000000000 -0700
-+++ binutils-2.19.1/gas/testsuite/gas/ppc/booke_xcoff64.d	2009-03-02 05:43:14.000000000 -0800
-@@ -1,5 +1,5 @@
--#as: -a64 -mppc64 -mbooke64
--#objdump: -dr -Mbooke64
-+#as: -a64 -mppc64 -mbooke
-+#objdump: -dr -Mbooke
- #name: xcoff64 BookE tests
- 
- .*:     file format aix5?coff64-rs6000
-diff -Naur binutils-2.19.1.orig/gas/testsuite/gas/ppc/booke_xcoff64.s binutils-2.19.1/gas/testsuite/gas/ppc/booke_xcoff64.s
---- binutils-2.19.1.orig/gas/testsuite/gas/ppc/booke_xcoff64.s	2007-10-01 09:24:40.000000000 -0700
-+++ binutils-2.19.1/gas/testsuite/gas/ppc/booke_xcoff64.s	2009-03-02 05:43:15.000000000 -0800
-@@ -1,5 +1,5 @@
- # Motorola PowerPC BookE tests
--#as: -a64 -mppc64 -mbooke64
-+#as: -a64 -mppc64 -mbooke
- 	.csect .text[PR]
- 	.csect main[DS]
- main:
-diff -Naur binutils-2.19.1.orig/gas/testsuite/gas/ppc/booke_xcoff.d binutils-2.19.1/gas/testsuite/gas/ppc/booke_xcoff.d
---- binutils-2.19.1.orig/gas/testsuite/gas/ppc/booke_xcoff.d	2007-10-01 09:24:40.000000000 -0700
-+++ binutils-2.19.1/gas/testsuite/gas/ppc/booke_xcoff.d	2009-03-02 05:43:14.000000000 -0800
-@@ -1,5 +1,5 @@
--#as: -mppc32 -mbooke32
--#objdump: -mpowerpc -dr -Mbooke32
-+#as: -mppc32 -mbooke
-+#objdump: -mpowerpc -dr -Mbooke
- #name: xcoff BookE tests
- 
- .*:     file format aixcoff-rs6000
-diff -Naur binutils-2.19.1.orig/gas/testsuite/gas/ppc/booke_xcoff.s binutils-2.19.1/gas/testsuite/gas/ppc/booke_xcoff.s
---- binutils-2.19.1.orig/gas/testsuite/gas/ppc/booke_xcoff.s	2007-10-01 09:24:40.000000000 -0700
-+++ binutils-2.19.1/gas/testsuite/gas/ppc/booke_xcoff.s	2009-03-02 05:43:14.000000000 -0800
-@@ -1,5 +1,5 @@
- # Motorola PowerPC BookE tests
--#as: -mbooke32
-+#as: -mbooke
- 	.csect .text[PR]
- 	.csect main[DS]
- main:
-diff -Naur binutils-2.19.1.orig/gas/testsuite/gas/ppc/common.d binutils-2.19.1/gas/testsuite/gas/ppc/common.d
---- binutils-2.19.1.orig/gas/testsuite/gas/ppc/common.d	1969-12-31 16:00:00.000000000 -0800
-+++ binutils-2.19.1/gas/testsuite/gas/ppc/common.d	2009-03-02 05:37:44.000000000 -0800
-@@ -0,0 +1,190 @@
-+#objdump: -d -Mcom
-+#as: -a32 -mcom
-+#name: PowerPC COMMON instructions
-+
-+.*: +file format elf32-powerpc.*
-+
-+Disassembly of section \.text:
-+
-+0+00 <start>:
-+
-+   0:	7c 83 28 39 	and.    r3,r4,r5
-+   4:	7c 83 28 38 	and     r3,r4,r5
-+   8:	7d cd 78 78 	andc    r13,r14,r15
-+   c:	7e 30 90 79 	andc.   r16,r17,r18
-+  10:	48 00 00 02 	ba      0 <start>
-+  14:	40 01 00 00 	bdnzf-  gt,14 <start\+0x14>
-+  18:	40 85 00 02 	blea-   cr1,0 <start>
-+  1c:	40 43 00 01 	bdzfl-  so,1c <start\+0x1c>
-+  20:	41 47 00 03 	bdztla- 4\*cr1\+so,0 <start>
-+  24:	4e 80 04 20 	bctr
-+  28:	4e 80 04 21 	bctrl
-+  2c:	42 40 00 02 	bdza-   0 <start>
-+  30:	42 40 00 00 	bdz-    30 <start\+0x30>
-+  34:	42 40 00 03 	bdzla-  0 <start>
-+  38:	42 40 00 01 	bdzl-   38 <start\+0x38>
-+  3c:	41 82 00 00 	beq-    3c <start\+0x3c>
-+  40:	41 8a 00 02 	beqa-   cr2,0 <start>
-+  44:	41 86 00 01 	beql-   cr1,44 <start\+0x44>
-+  48:	41 8e 00 03 	beqla-  cr3,0 <start>
-+  4c:	40 80 00 00 	bge-    4c <start\+0x4c>
-+  50:	40 90 00 02 	bgea-   cr4,0 <start>
-+  54:	40 88 00 01 	bgel-   cr2,54 <start\+0x54>
-+  58:	40 98 00 03 	bgela-  cr6,0 <start>
-+  5c:	41 91 00 00 	bgt-    cr4,5c <start\+0x5c>
-+  60:	41 99 00 02 	bgta-   cr6,0 <start>
-+  64:	41 95 00 01 	bgtl-   cr5,64 <start\+0x64>
-+  68:	41 9d 00 03 	bgtla-  cr7,0 <start>
-+  6c:	48 00 00 00 	b       6c <start\+0x6c>
-+  70:	48 00 00 03 	bla     0 <start>
-+  74:	40 81 00 00 	ble-    74 <start\+0x74>
-+  78:	40 91 00 02 	blea-   cr4,0 <start>
-+  7c:	40 89 00 01 	blel-   cr2,7c <start\+0x7c>
-+  80:	40 99 00 03 	blela-  cr6,0 <start>
-+  84:	48 00 00 01 	bl      84 <start\+0x84>
-+  88:	41 80 00 00 	blt-    88 <start\+0x88>
-+  8c:	41 88 00 02 	blta-   cr2,0 <start>
-+  90:	41 84 00 01 	bltl-   cr1,90 <start\+0x90>
-+  94:	41 8c 00 03 	bltla-  cr3,0 <start>
-+  98:	40 82 00 00 	bne-    98 <start\+0x98>
-+  9c:	40 8a 00 02 	bnea-   cr2,0 <start>
-+  a0:	40 86 00 01 	bnel-   cr1,a0 <start\+0xa0>
-+  a4:	40 8e 00 03 	bnela-  cr3,0 <start>
-+  a8:	40 85 00 00 	ble-    cr1,a8 <start\+0xa8>
-+  ac:	40 95 00 02 	blea-   cr5,0 <start>
-+  b0:	40 8d 00 01 	blel-   cr3,b0 <start\+0xb0>
-+  b4:	40 9d 00 03 	blela-  cr7,0 <start>
-+  b8:	40 84 00 00 	bge-    cr1,b8 <start\+0xb8>
-+  bc:	40 94 00 02 	bgea-   cr5,0 <start>
-+  c0:	40 8c 00 01 	bgel-   cr3,c0 <start\+0xc0>
-+  c4:	40 9c 00 03 	bgela-  cr7,0 <start>
-+  c8:	40 93 00 00 	bns-    cr4,c8 <start\+0xc8>
-+  cc:	40 9b 00 02 	bnsa-   cr6,0 <start>
-+  d0:	40 97 00 01 	bnsl-   cr5,d0 <start\+0xd0>
-+  d4:	40 9f 00 03 	bnsla-  cr7,0 <start>
-+  d8:	41 93 00 00 	bso-    cr4,d8 <start\+0xd8>
-+  dc:	41 9b 00 02 	bsoa-   cr6,0 <start>
-+  e0:	41 97 00 01 	bsol-   cr5,e0 <start\+0xe0>
-+  e4:	41 9f 00 03 	bsola-  cr7,0 <start>
-+  e8:	4c 85 32 02 	crand   4\*cr1\+lt,4\*cr1\+gt,4\*cr1\+eq
-+  ec:	4c 64 29 02 	crandc  so,4\*cr1\+lt,4\*cr1\+gt
-+  f0:	4c e0 0a 42 	creqv   4\*cr1\+so,lt,gt
-+  f4:	4c 22 19 c2 	crnand  gt,eq,so
-+  f8:	4c 01 10 42 	crnor   lt,gt,eq
-+  fc:	4c a6 3b 82 	cror    4\*cr1\+gt,4\*cr1\+eq,4\*cr1\+so
-+ 100:	4c 43 23 42 	crorc   eq,so,4\*cr1\+lt
-+ 104:	4c c7 01 82 	crxor   4\*cr1\+eq,4\*cr1\+so,lt
-+ 108:	7d 6a 62 39 	eqv.    r10,r11,r12
-+ 10c:	7d 6a 62 38 	eqv     r10,r11,r12
-+ 110:	fe a0 fa 11 	fabs.   f21,f31
-+ 114:	fe a0 fa 10 	fabs    f21,f31
-+ 118:	fd 8a 58 40 	fcmpo   cr3,f10,f11
-+ 11c:	fd 84 28 00 	fcmpu   cr3,f4,f5
-+ 120:	fc 60 20 91 	fmr.    f3,f4
-+ 124:	fc 60 20 90 	fmr     f3,f4
-+ 128:	fe 80 f1 11 	fnabs.  f20,f30
-+ 12c:	fe 80 f1 10 	fnabs   f20,f30
-+ 130:	fc 60 20 51 	fneg.   f3,f4
-+ 134:	fc 60 20 50 	fneg    f3,f4
-+ 138:	fc c0 38 18 	frsp    f6,f7
-+ 13c:	fd 00 48 19 	frsp.   f8,f9
-+ 140:	89 21 00 00 	lbz     r9,0\(r1\)
-+ 144:	8d 41 00 01 	lbzu    r10,1\(r1\)
-+ 148:	7e 95 b0 ee 	lbzux   r20,r21,r22
-+ 14c:	7c 64 28 ae 	lbzx    r3,r4,r5
-+ 150:	ca a1 00 08 	lfd     f21,8\(r1\)
-+ 154:	ce c1 00 10 	lfdu    f22,16\(r1\)
-+ 158:	7e 95 b4 ee 	lfdux   f20,r21,r22
-+ 15c:	7d ae 7c ae 	lfdx    f13,r14,r15
-+ 160:	c2 61 00 00 	lfs     f19,0\(r1\)
-+ 164:	c6 81 00 04 	lfsu    f20,4\(r1\)
-+ 168:	7d 4b 64 6e 	lfsux   f10,r11,r12
-+ 16c:	7d 4b 64 2e 	lfsx    f10,r11,r12
-+ 170:	a9 e1 00 06 	lha     r15,6\(r1\)
-+ 174:	ae 01 00 08 	lhau    r16,8\(r1\)
-+ 178:	7d 2a 5a ee 	lhaux   r9,r10,r11
-+ 17c:	7d 2a 5a ae 	lhax    r9,r10,r11
-+ 180:	7c 64 2e 2c 	lhbrx   r3,r4,r5
-+ 184:	a1 a1 00 00 	lhz     r13,0\(r1\)
-+ 188:	a5 c1 00 02 	lhzu    r14,2\(r1\)
-+ 18c:	7e 96 c2 6e 	lhzux   r20,r22,r24
-+ 190:	7e f8 ca 2e 	lhzx    r23,r24,r25
-+ 194:	4c 04 00 00 	mcrf    cr0,cr1
-+ 198:	fd 90 00 80 	mcrfs   cr3,cr4
-+ 19c:	7d 80 04 00 	mcrxr   cr3
-+ 1a0:	7c 60 00 26 	mfcr    r3
-+ 1a4:	7c 69 02 a6 	mfctr   r3
-+ 1a8:	7c b3 02 a6 	mfdar   r5
-+ 1ac:	7c 92 02 a6 	mfdsisr r4
-+ 1b0:	ff c0 04 8e 	mffs    f30
-+ 1b4:	ff e0 04 8f 	mffs.   f31
-+ 1b8:	7c 48 02 a6 	mflr    r2
-+ 1bc:	7e 60 00 a6 	mfmsr   r19
-+ 1c0:	7c 78 00 26 	mfocrf  r3,128
-+ 1c4:	7c 25 02 a6 	mfrtcl  r1
-+ 1c8:	7c 04 02 a6 	mfrtcu  r0
-+ 1cc:	7c d9 02 a6 	mfsdr1  r6
-+ 1d0:	7c 60 22 a6 	mfspr   r3,128
-+ 1d4:	7c fa 02 a6 	mfsrr0  r7
-+ 1d8:	7d 1b 02 a6 	mfsrr1  r8
-+ 1dc:	7f c1 02 a6 	mfxer   r30
-+ 1e0:	7f fe fb 79 	mr.     r30,r31
-+ 1e4:	7f fe fb 78 	mr      r30,r31
-+ 1e8:	7c 6f f1 20 	mtcr    r3
-+ 1ec:	7c 68 01 20 	mtcrf   128,r3
-+ 1f0:	7e 69 03 a6 	mtctr   r19
-+ 1f4:	7e b3 03 a6 	mtdar   r21
-+ 1f8:	7f 16 03 a6 	mtdec   r24
-+ 1fc:	7e 92 03 a6 	mtdsisr r20
-+ 200:	fc 60 00 8d 	mtfsb0. so
-+ 204:	fc 60 00 8c 	mtfsb0  so
-+ 208:	fc 60 00 4d 	mtfsb1. so
-+ 20c:	fc 60 00 4c 	mtfsb1  so
-+ 210:	fc 0c 55 8e 	mtfsf   6,f10
-+ 214:	fc 0c 5d 8f 	mtfsf.  6,f11
-+ 218:	ff 00 01 0c 	mtfsfi  6,0
-+ 21c:	ff 00 f1 0d 	mtfsfi. 6,15
-+ 220:	7e 48 03 a6 	mtlr    r18
-+ 224:	7d 40 01 24 	mtmsr   r10
-+ 228:	7c 78 01 20 	mtocrf  128,r3
-+ 22c:	7e f5 03 a6 	mtrtcl  r23
-+ 230:	7e d4 03 a6 	mtrtcu  r22
-+ 234:	7f 39 03 a6 	mtsdr1  r25
-+ 238:	7c 60 23 a6 	mtspr   128,r3
-+ 23c:	7f 5a 03 a6 	mtsrr0  r26
-+ 240:	7f 7b 03 a6 	mtsrr1  r27
-+ 244:	7e 21 03 a6 	mtxer   r17
-+ 248:	7f bc f3 b9 	nand.   r28,r29,r30
-+ 24c:	7f bc f3 b8 	nand    r28,r29,r30
-+ 250:	7c 64 00 d1 	neg.    r3,r4
-+ 254:	7c 64 00 d0 	neg     r3,r4
-+ 258:	7e 11 04 d0 	nego    r16,r17
-+ 25c:	7e 53 04 d1 	nego.   r18,r19
-+ 260:	7e b4 b0 f9 	nor.    r20,r21,r22
-+ 264:	7e b4 b0 f8 	nor     r20,r21,r22
-+ 268:	7e b4 a8 f9 	not.    r20,r21
-+ 26c:	7e b4 a8 f8 	not     r20,r21
-+ 270:	7c 40 23 78 	or      r0,r2,r4
-+ 274:	7d cc 83 79 	or.     r12,r14,r16
-+ 278:	7e 0f 8b 38 	orc     r15,r16,r17
-+ 27c:	7e 72 a3 39 	orc.    r18,r19,r20
-+ 280:	4c 00 00 64 	rfi
-+ 284:	99 61 00 02 	stb     r11,2\(r1\)
-+ 288:	9d 81 00 03 	stbu    r12,3\(r1\)
-+ 28c:	7d ae 79 ee 	stbux   r13,r14,r15
-+ 290:	7c 64 29 ae 	stbx    r3,r4,r5
-+ 294:	db 21 00 20 	stfd    f25,32\(r1\)
-+ 298:	df 41 00 28 	stfdu   f26,40\(r1\)
-+ 29c:	7c 01 15 ee 	stfdux  f0,r1,r2
-+ 2a0:	7f be fd ae 	stfdx   f29,r30,r31
-+ 2a4:	d2 e1 00 14 	stfs    f23,20\(r1\)
-+ 2a8:	d7 01 00 18 	stfsu   f24,24\(r1\)
-+ 2ac:	7f 5b e5 6e 	stfsux  f26,r27,r28
-+ 2b0:	7e f8 cd 2e 	stfsx   f23,r24,r25
-+ 2b4:	b2 21 00 0a 	sth     r17,10\(r1\)
-+ 2b8:	7c c7 47 2c 	sthbrx  r6,r7,r8
-+ 2bc:	b6 41 00 0c 	sthu    r18,12\(r1\)
-+ 2c0:	7e b6 bb 6e 	sthux   r21,r22,r23
-+ 2c4:	7d 8d 73 2e 	sthx    r12,r13,r14
-+ 2c8:	7f dd fa 79 	xor.    r29,r30,r31
-+ 2cc:	7f dd fa 78 	xor     r29,r30,r31
-diff -Naur binutils-2.19.1.orig/gas/testsuite/gas/ppc/common.s binutils-2.19.1/gas/testsuite/gas/ppc/common.s
---- binutils-2.19.1.orig/gas/testsuite/gas/ppc/common.s	1969-12-31 16:00:00.000000000 -0800
-+++ binutils-2.19.1/gas/testsuite/gas/ppc/common.s	2009-03-02 05:37:44.000000000 -0800
-@@ -0,0 +1,182 @@
-+	.section ".text"
-+start:
-+	and.	3,4,5
-+	and	3,4,5
-+	andc	13,14,15
-+	andc.	16,17,18
-+	ba	label_abs
-+	bc	0,1,foo
-+	bca	4,5,foo_abs
-+	bcl	2,3,foo
-+	bcla	10,7,foo_abs
-+	bctr
-+	bctrl
-+	bdza	foo_abs
-+	bdz	foo
-+	bdzla	foo_abs
-+	bdzl	foo
-+	beq	0,foo
-+	beqa	2,foo_abs
-+	beql	1,foo
-+	beqla	3,foo_abs
-+	bge	0,foo
-+	bgea	4,foo_abs
-+	bgel	2,foo
-+	bgela	6,foo_abs
-+	bgt	4,foo
-+	bgta	6,foo_abs
-+	bgtl	5,foo
-+	bgtla	7,foo_abs
-+	b	label
-+	bla	label_abs
-+	ble	0,foo
-+	blea	4,foo
-+	blel	2,foo
-+	blela	6,foo_abs
-+	bl	label
-+	blt	0,foo
-+	blta	2,foo_abs
-+	bltl	1,foo
-+	bltla	3,foo_abs
-+	bne	0,foo
-+	bnea	2,foo
-+	bnel	1,foo
-+	bnela	3,foo_abs
-+	bng	1,foo
-+	bnga	5,foo_abs
-+	bngl	3,foo
-+	bngla	7,foo_abs
-+	bnl	1,foo
-+	bnla	5,foo_abs
-+	bnll	3,foo
-+	bnlla	7,foo_abs
-+	bns	4,foo
-+	bnsa	6,foo_abs
-+	bnsl	5,foo
-+	bnsla	7,foo_abs
-+	bso	4,foo
-+	bsoa	6,foo_abs
-+	bsol	5,foo
-+	bsola	7,foo_abs
-+	crand	4,5,6
-+	crandc	3,4,5
-+	creqv	7,0,1
-+	crnand	1,2,3
-+	crnor	0,1,2
-+	cror	5,6,7
-+	crorc	2,3,4
-+	crxor	6,7,0
-+	eqv.	10,11,12
-+	eqv	10,11,12
-+	fabs.	21,31
-+	fabs	21,31
-+	fcmpo	3,10,11
-+	fcmpu	3,4,5
-+	fmr.	3,4
-+	fmr	3,4
-+	fnabs.	20,30
-+	fnabs	20,30
-+	fneg.	3,4
-+	fneg	3,4
-+	frsp	6,7
-+	frsp.	8,9
-+	lbz	9,0(1)
-+	lbzu	10,1(1)
-+	lbzux	20,21,22
-+	lbzx	3,4,5
-+	lfd	21,8(1)
-+	lfdu	22,16(1)
-+	lfdux	20,21,22
-+	lfdx	13,14,15
-+	lfs	19,0(1)
-+	lfsu	20,4(1)
-+	lfsux	10,11,12
-+	lfsx	10,11,12
-+	lha	15,6(1)
-+	lhau	16,8(1)
-+	lhaux	9,10,11
-+	lhax	9,10,11
-+	lhbrx	3,4,5
-+	lhz	13,0(1)
-+	lhzu	14,2(1)
-+	lhzux	20,22,24
-+	lhzx	23,24,25
-+	mcrf	0,1
-+	mcrfs	3,4
-+	mcrxr	3
-+	mfcr	3
-+	mfctr	3
-+	mfdar	5
-+	mfdsisr	4
-+	mffs	30
-+	mffs.	31
-+	mflr	2
-+	mfmsr	19
-+	mfocrf	3,0x80
-+	mfrtcl	1
-+	mfrtcu	0
-+	mfsdr1	6
-+	mfspr	3,0x80
-+	mfsrr0	7
-+	mfsrr1	8
-+	mfxer	30
-+	mr.	30,31
-+	mr	30,31
-+	mtcr	3
-+	mtcrf	0x80,3
-+	mtctr	19
-+	mtdar	21
-+	mtdec	24
-+	mtdsisr	20
-+	mtfsb0.	3
-+	mtfsb0	3
-+	mtfsb1.	3
-+	mtfsb1	3
-+	mtfsf	6,10
-+	mtfsf.	6,11
-+	mtfsfi	6,0
-+	mtfsfi.	6,15
-+	mtlr	18
-+	mtmsr	10
-+	mtocrf	0x80,3
-+	mtrtcl	23
-+	mtrtcu	22
-+	mtsdr1	25
-+	mtspr	0x80,3
-+	mtsrr0	26
-+	mtsrr1	27
-+	mtxer	17
-+	nand.	28,29,30
-+	nand	28,29,30
-+	neg.	3,4
-+	neg	3,4
-+	nego	16,17
-+	nego.	18,19
-+	nor.	20,21,22
-+	nor	20,21,22
-+	not.	20,21
-+	not	20,21
-+	or	0,2,4
-+	or.	12,14,16
-+	orc	15,16,17
-+	orc.	18,19,20
-+	rfi
-+	stb	11,2(1)
-+	stbu	12,3(1)
-+	stbux	13,14,15
-+	stbx	3,4,5
-+	stfd	25,32(1)
-+	stfdu	26,40(1)
-+	stfdux	0,1,2
-+	stfdx	29,30,31
-+	stfs	23,20(1)
-+	stfsu	24,24(1)
-+	stfsux	26,27,28
-+	stfsx	23,24,25
-+	sth	17,10(1)
-+	sthbrx	6,7,8
-+	sthu	18,12(1)
-+	sthux	21,22,23
-+	sthx	12,13,14
-+	xor.	29,30,31
-+	xor	29,30,31
-diff -Naur binutils-2.19.1.orig/gas/testsuite/gas/ppc/e500mc.d binutils-2.19.1/gas/testsuite/gas/ppc/e500mc.d
---- binutils-2.19.1.orig/gas/testsuite/gas/ppc/e500mc.d	2008-04-14 04:01:38.000000000 -0700
-+++ binutils-2.19.1/gas/testsuite/gas/ppc/e500mc.d	2009-03-02 05:59:36.000000000 -0800
-@@ -6,7 +6,7 @@
- 
- Disassembly of section \.text:
- 
--0+0000000 <start>:
-+0+00 <start>:
-    0:	4c 00 00 4e 	rfdi
-    4:	4c 00 00 cc 	rfgi
-    8:	4c 1f f9 8c 	dnh     0,1023
-@@ -14,38 +14,43 @@
-   10:	7c 09 57 be 	icbiep  r9,r10
-   14:	7c 00 69 dc 	msgclr  r13
-   18:	7c 00 71 9c 	msgsnd  r14
--  1c:	7c 00 00 7c 	wait
--  20:	7f 9c e3 78 	mdors
--  24:	7c 00 02 1c 	ehpriv
--  28:	7c 18 cb c6 	dsn     r24,r25
--  2c:	7c 22 18 be 	lbepx   r1,r2,r3
--  30:	7c 85 32 3e 	lhepx   r4,r5,r6
--  34:	7c e8 48 3e 	lwepx   r7,r8,r9
--  38:	7d 4b 60 3a 	ldepx   r10,r11,r12
--  3c:	7d ae 7c be 	lfdepx  r13,r14,r15
--  40:	7e 11 91 be 	stbepx  r16,r17,r18
--  44:	7e 74 ab 3e 	sthepx  r19,r20,r21
--  48:	7e d7 c1 3e 	stwepx  r22,r23,r24
--  4c:	7f 3a d9 3a 	stdepx  r25,r26,r27
--  50:	7f 9d f5 be 	stfdepx r28,r29,r30
--  54:	7c 01 14 06 	lbdx    r0,r1,r2
--  58:	7d 8d 74 46 	lhdx    r12,r13,r14
--  5c:	7c 64 2c 86 	lwdx    r3,r4,r5
--  60:	7f 5b e6 46 	lfddx   f26,r27,r28
--  64:	7d f0 8c c6 	lddx    r15,r16,r17
--  68:	7c c7 45 06 	stbdx   r6,r7,r8
--  6c:	7e 53 a5 46 	sthdx   r18,r19,r20
--  70:	7d 2a 5d 86 	stwdx   r9,r10,r11
--  74:	7f be ff 46 	stfddx  f29,r30,r31
--  78:	7e b6 bd c6 	stddx   r21,r22,r23
--  7c:	7c 20 0d ec 	dcbal   r0,r1
--  80:	7c 26 3f ec 	dcbzl   r6,r7
--  84:	7c 1f 00 7e 	dcbstep r31,r0
--  88:	7c 01 10 fe 	dcbfep  r1,r2
--  8c:	7c 64 29 fe 	dcbtstep r3,r4,r5
--  90:	7c c7 42 7e 	dcbtep  r6,r7,r8
--  94:	7c 0b 67 fe 	dcbzep  r11,r12
--  98:	7c 00 06 26 	tlbilx  0,0,r0
--  9c:	7c 20 06 26 	tlbilx  1,0,r0
--  a0:	7c 62 1e 26 	tlbilx  3,r2,r3
--  a4:	7c 64 2e 26 	tlbilx  3,r4,r5
-+  1c:	7c 00 00 7c 	wait    
-+  20:	7c 00 00 7c 	wait    
-+  24:	7c 20 00 7c 	waitrsv
-+  28:	7c 20 00 7c 	waitrsv
-+  2c:	7c 40 00 7c 	waitimpl
-+  30:	7c 40 00 7c 	waitimpl
-+  34:	7f 9c e3 78 	mdors
-+  38:	7c 00 02 1c 	ehpriv
-+  3c:	7c 18 cb c6 	dsn     r24,r25
-+  40:	7c 22 18 be 	lbepx   r1,r2,r3
-+  44:	7c 85 32 3e 	lhepx   r4,r5,r6
-+  48:	7c e8 48 3e 	lwepx   r7,r8,r9
-+  4c:	7d 4b 60 3a 	ldepx   r10,r11,r12
-+  50:	7d ae 7c be 	lfdepx  f13,r14,r15
-+  54:	7e 11 91 be 	stbepx  r16,r17,r18
-+  58:	7e 74 ab 3e 	sthepx  r19,r20,r21
-+  5c:	7e d7 c1 3e 	stwepx  r22,r23,r24
-+  60:	7f 3a d9 3a 	stdepx  r25,r26,r27
-+  64:	7f 9d f5 be 	stfdepx f28,r29,r30
-+  68:	7c 01 14 06 	lbdx    r0,r1,r2
-+  6c:	7d 8d 74 46 	lhdx    r12,r13,r14
-+  70:	7c 64 2c 86 	lwdx    r3,r4,r5
-+  74:	7f 5b e6 46 	lfddx   f26,r27,r28
-+  78:	7d f0 8c c6 	lddx    r15,r16,r17
-+  7c:	7c c7 45 06 	stbdx   r6,r7,r8
-+  80:	7e 53 a5 46 	sthdx   r18,r19,r20
-+  84:	7d 2a 5d 86 	stwdx   r9,r10,r11
-+  88:	7f be ff 46 	stfddx  f29,r30,r31
-+  8c:	7e b6 bd c6 	stddx   r21,r22,r23
-+  90:	7c 20 0d ec 	dcbal   r0,r1
-+  94:	7c 26 3f ec 	dcbzl   r6,r7
-+  98:	7c 1f 00 7e 	dcbstep r31,r0
-+  9c:	7c 01 10 fe 	dcbfep  r1,r2
-+  a0:	7c 64 29 fe 	dcbtstep r3,r4,r5
-+  a4:	7c c7 42 7e 	dcbtep  r6,r7,r8
-+  a8:	7c 0b 67 fe 	dcbzep  r11,r12
-+  ac:	7c 00 06 26 	tlbilx  0,0,r0
-+  b0:	7c 20 06 26 	tlbilx  1,0,r0
-+  b4:	7c 62 1e 26 	tlbilx  3,r2,r3
-+  b8:	7c 64 2e 26 	tlbilx  3,r4,r5
-diff -Naur binutils-2.19.1.orig/gas/testsuite/gas/ppc/e500mc.s binutils-2.19.1/gas/testsuite/gas/ppc/e500mc.s
---- binutils-2.19.1.orig/gas/testsuite/gas/ppc/e500mc.s	2008-04-14 04:01:38.000000000 -0700
-+++ binutils-2.19.1/gas/testsuite/gas/ppc/e500mc.s	2009-03-02 05:59:36.000000000 -0800
-@@ -9,6 +9,11 @@
- 	msgclr	13
- 	msgsnd	14
- 	wait
-+	wait 0
-+	waitrsv
-+	wait 1
-+	waitimpl
-+	wait 2
- 	mdors
- 	ehpriv
- 	dsn	24, 25
-diff -Naur binutils-2.19.1.orig/gas/testsuite/gas/ppc/power4_32.d binutils-2.19.1/gas/testsuite/gas/ppc/power4_32.d
---- binutils-2.19.1.orig/gas/testsuite/gas/ppc/power4_32.d	1969-12-31 16:00:00.000000000 -0800
-+++ binutils-2.19.1/gas/testsuite/gas/ppc/power4_32.d	2009-03-02 05:54:22.000000000 -0800
-@@ -0,0 +1,46 @@
-+#objdump: -d -Mpower4
-+#as: -a32 -mpower4
-+#name: Power4 instructions
-+
-+.*: +file format elf32-powerpc.*
-+
-+Disassembly of section \.text:
-+
-+0+00 <start>:
-+   0:	80 c7 00 00 	lwz     r6,0\(r7\)
-+   4:	80 c7 00 10 	lwz     r6,16\(r7\)
-+   8:	80 c7 ff f0 	lwz     r6,-16\(r7\)
-+   c:	80 c7 80 00 	lwz     r6,-32768\(r7\)
-+  10:	80 c7 7f f0 	lwz     r6,32752\(r7\)
-+  14:	90 c7 00 00 	stw     r6,0\(r7\)
-+  18:	90 c7 00 10 	stw     r6,16\(r7\)
-+  1c:	90 c7 ff f0 	stw     r6,-16\(r7\)
-+  20:	90 c7 80 00 	stw     r6,-32768\(r7\)
-+  24:	90 c7 7f f0 	stw     r6,32752\(r7\)
-+  28:	00 00 02 00 	attn
-+  2c:	7c 6f f1 20 	mtcr    r3
-+  30:	7c 6f f1 20 	mtcr    r3
-+  34:	7c 68 11 20 	mtcrf   129,r3
-+  38:	7c 70 11 20 	mtocrf  1,r3
-+  3c:	7c 70 21 20 	mtocrf  2,r3
-+  40:	7c 70 41 20 	mtocrf  4,r3
-+  44:	7c 70 81 20 	mtocrf  8,r3
-+  48:	7c 71 01 20 	mtocrf  16,r3
-+  4c:	7c 72 01 20 	mtocrf  32,r3
-+  50:	7c 74 01 20 	mtocrf  64,r3
-+  54:	7c 78 01 20 	mtocrf  128,r3
-+  58:	7c 60 00 26 	mfcr    r3
-+  5c:	7c 70 10 26 	mfocrf  r3,1
-+  60:	7c 70 20 26 	mfocrf  r3,2
-+  64:	7c 70 40 26 	mfocrf  r3,4
-+  68:	7c 70 80 26 	mfocrf  r3,8
-+  6c:	7c 71 00 26 	mfocrf  r3,16
-+  70:	7c 72 00 26 	mfocrf  r3,32
-+  74:	7c 74 00 26 	mfocrf  r3,64
-+  78:	7c 78 00 26 	mfocrf  r3,128
-+  7c:	7c 01 17 ec 	dcbz    r1,r2
-+  80:	7c 23 27 ec 	dcbzl   r3,r4
-+  84:	7c 05 37 ec 	dcbz    r5,r6
-+  88:	7c 05 32 2c 	dcbt    r5,r6
-+  8c:	7c 05 32 2c 	dcbt    r5,r6
-+  90:	7d 05 32 2c 	dcbt    r5,r6,8
-diff -Naur binutils-2.19.1.orig/gas/testsuite/gas/ppc/power4_32.s binutils-2.19.1/gas/testsuite/gas/ppc/power4_32.s
---- binutils-2.19.1.orig/gas/testsuite/gas/ppc/power4_32.s	1969-12-31 16:00:00.000000000 -0800
-+++ binutils-2.19.1/gas/testsuite/gas/ppc/power4_32.s	2009-03-02 05:54:22.000000000 -0800
-@@ -0,0 +1,39 @@
-+	.section ".text"
-+start:
-+	lwz	6,0(7)
-+	lwz	6,16(7)
-+	lwz	6,-16(7)
-+	lwz	6,-32768(7)
-+	lwz	6,32752(7)
-+	stw	6,0(7)
-+	stw	6,16(7)
-+	stw	6,-16(7)
-+	stw	6,-32768(7)
-+	stw	6,32752(7)
-+	attn
-+	mtcr	3
-+	mtcrf	0xff,3
-+	mtcrf	0x81,3
-+	mtcrf	0x01,3
-+	mtcrf	0x02,3
-+	mtcrf	0x04,3
-+	mtcrf	0x08,3
-+	mtcrf	0x10,3
-+	mtcrf	0x20,3
-+	mtcrf	0x40,3
-+	mtcrf	0x80,3
-+	mfcr	3
-+	mfcr	3,0x01
-+	mfcr	3,0x02
-+	mfcr	3,0x04
-+	mfcr	3,0x08
-+	mfcr	3,0x10
-+	mfcr	3,0x20
-+	mfcr	3,0x40
-+	mfcr	3,0x80
-+	dcbz    1, 2
-+	dcbzl   3, 4
-+	dcbz    5, 6
-+	dcbt    5,6
-+	dcbt    5,6,0
-+	dcbt    5,6,8
-diff -Naur binutils-2.19.1.orig/gas/testsuite/gas/ppc/power6.d binutils-2.19.1/gas/testsuite/gas/ppc/power6.d
---- binutils-2.19.1.orig/gas/testsuite/gas/ppc/power6.d	2008-07-31 19:44:12.000000000 -0700
-+++ binutils-2.19.1/gas/testsuite/gas/ppc/power6.d	2009-03-02 05:59:36.000000000 -0800
-@@ -28,4 +28,44 @@
-   48:	7e 08 3a ac 	dstt    r8,r7,0
-   4c:	7c 65 32 ec 	dstst   r5,r6,3
-   50:	7e 44 2a ec 	dststt  r4,r5,2
--
-+  54:	00 00 02 00 	attn
-+  58:	7c 6f f1 20 	mtcr    r3
-+  5c:	7c 6f f1 20 	mtcr    r3
-+  60:	7c 68 11 20 	mtcrf   129,r3
-+  64:	7c 70 11 20 	mtocrf  1,r3
-+  68:	7c 70 21 20 	mtocrf  2,r3
-+  6c:	7c 70 41 20 	mtocrf  4,r3
-+  70:	7c 70 81 20 	mtocrf  8,r3
-+  74:	7c 71 01 20 	mtocrf  16,r3
-+  78:	7c 72 01 20 	mtocrf  32,r3
-+  7c:	7c 74 01 20 	mtocrf  64,r3
-+  80:	7c 78 01 20 	mtocrf  128,r3
-+  84:	7c 60 00 26 	mfcr    r3
-+  88:	7c 70 10 26 	mfocrf  r3,1
-+  8c:	7c 70 20 26 	mfocrf  r3,2
-+  90:	7c 70 40 26 	mfocrf  r3,4
-+  94:	7c 70 80 26 	mfocrf  r3,8
-+  98:	7c 71 00 26 	mfocrf  r3,16
-+  9c:	7c 72 00 26 	mfocrf  r3,32
-+  a0:	7c 74 00 26 	mfocrf  r3,64
-+  a4:	7c 78 00 26 	mfocrf  r3,128
-+  a8:	7c 01 17 ec 	dcbz    r1,r2
-+  ac:	7c 23 27 ec 	dcbzl   r3,r4
-+  b0:	7c 05 37 ec 	dcbz    r5,r6
-+  b4:	fc 0c 55 8e 	mtfsf   6,f10
-+  b8:	fc 0c 5d 8f 	mtfsf.  6,f11
-+  bc:	fc 0c 55 8e 	mtfsf   6,f10
-+  c0:	fc 0c 5d 8f 	mtfsf.  6,f11
-+  c4:	fc 0d 55 8e 	mtfsf   6,f10,0,1
-+  c8:	fc 0d 5d 8f 	mtfsf.  6,f11,0,1
-+  cc:	fe 0c 55 8e 	mtfsf   6,f10,1,0
-+  d0:	fe 0c 5d 8f 	mtfsf.  6,f11,1,0
-+  d4:	ff 00 01 0c 	mtfsfi  6,0
-+  d8:	ff 00 f1 0d 	mtfsfi. 6,15
-+  dc:	ff 00 01 0c 	mtfsfi  6,0
-+  e0:	ff 00 f1 0d 	mtfsfi. 6,15
-+  e4:	ff 01 01 0c 	mtfsfi  6,0,1
-+  e8:	ff 01 f1 0d 	mtfsfi. 6,15,1
-+  ec:	7d 6a 02 74 	cbcdtd  r10,r11
-+  f0:	7d 6a 02 34 	cdtbcd  r10,r11
-+  f4:	7d 4b 60 94 	addg6s  r10,r11,r12
-diff -Naur binutils-2.19.1.orig/gas/testsuite/gas/ppc/power6.s binutils-2.19.1/gas/testsuite/gas/ppc/power6.s
---- binutils-2.19.1.orig/gas/testsuite/gas/ppc/power6.s	2008-07-31 19:44:12.000000000 -0700
-+++ binutils-2.19.1/gas/testsuite/gas/ppc/power6.s	2009-03-02 05:59:36.000000000 -0800
-@@ -23,3 +23,44 @@
- 	dstt	8,7,0
- 	dstst	5,6,3
- 	dststt	4,5,2
-+	attn
-+	mtcr    3
-+	mtcrf   0xff,3
-+	mtcrf   0x81,3
-+	mtcrf   0x01,3
-+	mtcrf   0x02,3
-+	mtcrf   0x04,3
-+	mtcrf   0x08,3
-+	mtcrf   0x10,3
-+	mtcrf   0x20,3
-+	mtcrf   0x40,3
-+	mtcrf   0x80,3
-+	mfcr    3
-+	mfcr    3,0x01
-+	mfcr    3,0x02
-+	mfcr    3,0x04
-+	mfcr    3,0x08
-+	mfcr    3,0x10
-+	mfcr    3,0x20
-+	mfcr    3,0x40
-+	mfcr    3,0x80
-+	dcbz    1, 2
-+	dcbzl   3, 4
-+	dcbz    5, 6
-+	mtfsf   6,10
-+	mtfsf.  6,11
-+	mtfsf   6,10,0,0
-+	mtfsf.  6,11,0,0
-+	mtfsf   6,10,0,1
-+	mtfsf.  6,11,0,1
-+	mtfsf   6,10,1,0
-+	mtfsf.  6,11,1,0
-+	mtfsfi  6,0
-+	mtfsfi. 6,15
-+	mtfsfi  6,0,0
-+	mtfsfi. 6,15,0
-+	mtfsfi  6,0,1
-+	mtfsfi. 6,15,1
-+	cbcdtd  10,11
-+	cdtbcd  10,11
-+	addg6s  10,11,12
-diff -Naur binutils-2.19.1.orig/gas/testsuite/gas/ppc/power7.d binutils-2.19.1/gas/testsuite/gas/ppc/power7.d
---- binutils-2.19.1.orig/gas/testsuite/gas/ppc/power7.d	2008-08-01 21:38:51.000000000 -0700
-+++ binutils-2.19.1/gas/testsuite/gas/ppc/power7.d	2009-03-02 05:59:36.000000000 -0800
-@@ -1,8 +1,8 @@
--#as: -a32 -mpower7
-+#as: -mpower7
- #objdump: -dr -Mpower7
- #name: POWER7 tests (includes DFP, Altivec and VSX)
- 
--.*: +file format elf32-powerpc.*
-+.*: +file format elf(32)?(64)?-powerpc.*
- 
- Disassembly of section \.text:
- 
-@@ -33,25 +33,81 @@
-   5c:	f1 6c 67 87 	xvmovdp vs43,vs44
-   60:	f0 64 2f 80 	xvcpsgndp vs3,vs4,vs5
-   64:	f1 6c 6f 87 	xvcpsgndp vs43,vs44,vs45
--  68:	4c 00 03 24 	doze
--  6c:	4c 00 03 64 	nap
--  70:	4c 00 03 a4 	sleep
--  74:	4c 00 03 e4 	rvwinkle
--  78:	7c 83 01 34 	prtyw   r3,r4
--  7c:	7d cd 01 74 	prtyd   r13,r14
--  80:	7d 5c 02 a6 	mfcfar  r10
--  84:	7d 7c 03 a6 	mtcfar  r11
--  88:	7c 83 2b f8 	cmpb    r3,r4,r5
--  8c:	7c c0 3c be 	mffgpr  f6,r7
--  90:	7d 00 4d be 	mftgpr  r8,f9
--  94:	7d 4b 66 2a 	lwzcix  r10,r11,r12
--  98:	7d ae 7e 2e 	lfdpx   f13,r14,r15
--  9c:	ee 11 90 04 	dadd    f16,f17,f18
--  a0:	fe 96 c0 04 	daddq   f20,f22,f24
--  a4:	7c 60 06 6c 	dss     3
--  a8:	7e 00 06 6c 	dssall
--  ac:	7c 25 22 ac 	dst     r5,r4,1
--  b0:	7e 08 3a ac 	dstt    r8,r7,0
--  b4:	7c 65 32 ec 	dstst   r5,r6,3
--  b8:	7e 44 2a ec 	dststt  r4,r5,2
--  bc:	4e 80 00 20 	blr
-+  68:	7c 00 00 7c 	wait    
-+  6c:	7c 00 00 7c 	wait    
-+  70:	7c 20 00 7c 	waitrsv
-+  74:	7c 20 00 7c 	waitrsv
-+  78:	7c 40 00 7c 	waitimpl
-+  7c:	7c 40 00 7c 	waitimpl
-+  80:	4c 00 03 24 	doze
-+  84:	4c 00 03 64 	nap
-+  88:	4c 00 03 a4 	sleep
-+  8c:	4c 00 03 e4 	rvwinkle
-+  90:	7c 83 01 34 	prtyw   r3,r4
-+  94:	7d cd 01 74 	prtyd   r13,r14
-+  98:	7d 5c 02 a6 	mfcfar  r10
-+  9c:	7d 7c 03 a6 	mtcfar  r11
-+  a0:	7c 83 2b f8 	cmpb    r3,r4,r5
-+  a4:	7d 4b 66 2a 	lwzcix  r10,r11,r12
-+  a8:	ee 11 90 04 	dadd    f16,f17,f18
-+  ac:	fe 96 c0 04 	daddq   f20,f22,f24
-+  b0:	7c 60 06 6c 	dss     3
-+  b4:	7e 00 06 6c 	dssall
-+  b8:	7c 25 22 ac 	dst     r5,r4,1
-+  bc:	7e 08 3a ac 	dstt    r8,r7,0
-+  c0:	7c 65 32 ec 	dstst   r5,r6,3
-+  c4:	7e 44 2a ec 	dststt  r4,r5,2
-+  c8:	7d 4b 63 56 	divwe   r10,r11,r12
-+  cc:	7d 6c 6b 57 	divwe\.  r11,r12,r13
-+  d0:	7d 8d 77 56 	divweo  r12,r13,r14
-+  d4:	7d ae 7f 57 	divweo\. r13,r14,r15
-+  d8:	7d 4b 63 16 	divweu  r10,r11,r12
-+  dc:	7d 6c 6b 17 	divweu\. r11,r12,r13
-+  e0:	7d 8d 77 16 	divweuo r12,r13,r14
-+  e4:	7d ae 7f 17 	divweuo\. r13,r14,r15
-+  e8:	7e 27 d9 f8 	bpermd  r7,r17,r27
-+  ec:	7e 8a 02 f4 	popcntw r10,r20
-+  f0:	7e 8a 03 f4 	popcntd r10,r20
-+  f4:	7e 95 b4 28 	ldbrx   r20,r21,r22
-+  f8:	7e 95 b5 28 	stdbrx  r20,r21,r22
-+  fc:	7d 40 56 ee 	lfiwzx  f10,0,r10
-+ 100:	7d 49 56 ee 	lfiwzx  f10,r9,r10
-+ 104:	ec 80 2e 9c 	fcfids  f4,f5
-+ 108:	ec 80 2e 9d 	fcfids\. f4,f5
-+ 10c:	ec 80 2f 9c 	fcfidus f4,f5
-+ 110:	ec 80 2f 9d 	fcfidus\. f4,f5
-+ 114:	fc 80 29 1c 	fctiwu  f4,f5
-+ 118:	fc 80 29 1d 	fctiwu\. f4,f5
-+ 11c:	fc 80 29 1e 	fctiwuz f4,f5
-+ 120:	fc 80 29 1f 	fctiwuz\. f4,f5
-+ 124:	fc 80 2f 5c 	fctidu  f4,f5
-+ 128:	fc 80 2f 5d 	fctidu\. f4,f5
-+ 12c:	fc 80 2f 5e 	fctiduz f4,f5
-+ 130:	fc 80 2f 5f 	fctiduz\. f4,f5
-+ 134:	fc 80 2f 9c 	fcfidu  f4,f5
-+ 138:	fc 80 2f 9d 	fcfidu\. f4,f5
-+ 13c:	fc 0a 59 00 	ftdiv   cr0,f10,f11
-+ 140:	ff 8a 59 00 	ftdiv   cr7,f10,f11
-+ 144:	fc 00 51 40 	ftsqrt  cr0,f10
-+ 148:	ff 80 51 40 	ftsqrt  cr7,f10
-+ 14c:	7e 08 4a 2c 	dcbtt   r8,r9
-+ 150:	7e 08 49 ec 	dcbtstt r8,r9
-+ 154:	ed 40 66 44 	dcffix  f10,f12
-+ 158:	ee 80 b6 45 	dcffix\. f20,f22
-+ 15c:	7d 4b 60 68 	lbarx   r10,r11,r12
-+ 160:	7d 4b 60 68 	lbarx   r10,r11,r12
-+ 164:	7d 4b 60 69 	lbarx   r10,r11,r12,1
-+ 168:	7e 95 b0 e8 	lharx   r20,r21,r22
-+ 16c:	7e 95 b0 e8 	lharx   r20,r21,r22
-+ 170:	7e 95 b0 e9 	lharx   r20,r21,r22,1
-+ 174:	7d 4b 65 6d 	stbcx\.  r10,r11,r12
-+ 178:	7d 4b 65 ad 	sthcx\.  r10,r11,r12
-+ 17c:	fd c0 78 30 	fre     f14,f15
-+ 180:	fd c0 78 31 	fre\.    f14,f15
-+ 184:	ed c0 78 30 	fres    f14,f15
-+ 188:	ed c0 78 31 	fres\.   f14,f15
-+ 18c:	fd c0 78 34 	frsqrte f14,f15
-+ 190:	fd c0 78 35 	frsqrte\. f14,f15
-+ 194:	ed c0 78 34 	frsqrtes f14,f15
-+ 198:	ed c0 78 35 	frsqrtes\. f14,f15
-+ 19c:	7c 43 27 1e 	isel    r2,r3,r4,28
-diff -Naur binutils-2.19.1.orig/gas/testsuite/gas/ppc/power7.s binutils-2.19.1/gas/testsuite/gas/ppc/power7.s
---- binutils-2.19.1.orig/gas/testsuite/gas/ppc/power7.s	2008-08-01 21:38:51.000000000 -0700
-+++ binutils-2.19.1/gas/testsuite/gas/ppc/power7.s	2009-03-02 05:59:36.000000000 -0800
-@@ -1,9 +1,4 @@
--	.file	"power7.c"
- 	.section	".text"
--	.align 2
--	.p2align 4,,15
--	.globl power7
--	.type	power7, @function
- power7:
- 	lxvd2x    3,4,5
- 	lxvd2ux   3,4,5
-@@ -31,6 +26,12 @@
- 	xvcpsgndp 43,44,44
- 	xvcpsgndp 3,4,5
- 	xvcpsgndp 43,44,45
-+	wait
-+	wait 0
-+	waitrsv
-+	wait 1
-+	waitimpl
-+	wait 2
- 	doze
- 	nap
- 	sleep
-@@ -40,10 +41,7 @@
- 	mfcfar    10
- 	mtcfar    11
- 	cmpb      3,4,5
--	mffgpr    6,7
--	mftgpr    8,9
- 	lwzcix    10,11,12
--	lfdpx     13,14,15
- 	dadd      16,17,18
- 	daddq     20,22,24
- 	dss       3
-@@ -52,7 +50,57 @@
- 	dstt      8,7,0
- 	dstst     5,6,3
- 	dststt    4,5,2
--	blr
--	.size	power7,.-power7
--	.ident	"GCC: (GNU) 4.1.2 20070115 (prerelease) (SUSE Linux)"
--	.section	.note.GNU-stack,"",@progbits
-+	divwe	  10,11,12
-+	divwe.	  11,12,13
-+	divweo	  12,13,14
-+	divweo.	  13,14,15
-+	divweu	  10,11,12
-+	divweu.	  11,12,13
-+	divweuo	  12,13,14
-+	divweuo.  13,14,15
-+	bpermd    7,17,27
-+	popcntw   10,20
-+	popcntd   10,20
-+	ldbrx     20,21,22
-+	stdbrx    20,21,22
-+	lfiwzx	  10,0,10
-+	lfiwzx	  10,9,10
-+	fcfids    4,5
-+	fcfids.   4,5
-+	fcfidus   4,5
-+	fcfidus.  4,5
-+	fctiwu    4,5
-+	fctiwu.   4,5
-+	fctiwuz   4,5
-+	fctiwuz.  4,5
-+	fctidu    4,5
-+	fctidu.   4,5
-+	fctiduz   4,5
-+	fctiduz.  4,5
-+	fcfidu    4,5
-+	fcfidu.   4,5
-+	ftdiv     0,10,11
-+	ftdiv     7,10,11
-+	ftsqrt    0,10
-+	ftsqrt    7,10
-+	dcbtt     8,9
-+	dcbtstt   8,9
-+	dcffix    10,12
-+	dcffix.   20,22
-+	lbarx     10,11,12
-+	lbarx     10,11,12,0
-+	lbarx     10,11,12,1
-+	lharx     20,21,22
-+	lharx     20,21,22,0
-+	lharx     20,21,22,1
-+	stbcx.    10,11,12
-+	sthcx.    10,11,12
-+	fre       14,15
-+	fre.      14,15
-+	fres      14,15
-+	fres.     14,15
-+	frsqrte   14,15
-+	frsqrte.  14,15
-+	frsqrtes  14,15
-+	frsqrtes. 14,15
-+	isel	  2,3,4,28
-diff -Naur binutils-2.19.1.orig/gas/testsuite/gas/ppc/ppc.exp binutils-2.19.1/gas/testsuite/gas/ppc/ppc.exp
---- binutils-2.19.1.orig/gas/testsuite/gas/ppc/ppc.exp	2008-08-01 21:38:51.000000000 -0700
-+++ binutils-2.19.1/gas/testsuite/gas/ppc/ppc.exp	2009-03-02 05:59:36.000000000 -0800
-@@ -45,7 +45,10 @@
- 	run_dump_test "ppc750ps"
- 	run_dump_test "e500mc"
- 	run_dump_test "cell"
-+	run_dump_test "common"
-+	run_dump_test "power4_32"
- 	run_dump_test "power6"
- 	run_dump_test "power7"
-+	run_dump_test "vsx"
-     }
- }
-diff -Naur binutils-2.19.1.orig/gas/testsuite/gas/ppc/vsx.d binutils-2.19.1/gas/testsuite/gas/ppc/vsx.d
---- binutils-2.19.1.orig/gas/testsuite/gas/ppc/vsx.d	1969-12-31 16:00:00.000000000 -0800
-+++ binutils-2.19.1/gas/testsuite/gas/ppc/vsx.d	2009-03-02 05:59:36.000000000 -0800
-@@ -0,0 +1,174 @@
-+#as: -mvsx
-+#objdump: -d -Mvsx
-+#name: VSX tests
-+
-+.*: +file format elf(32)?(64)?-powerpc.*
-+
-+
-+Disassembly of section \.text:
-+
-+0+00 <start>:
-+   0:	7d 0a a4 99 	lxsdx   vs40,r10,r20
-+   4:	7d 0a a4 d9 	lxsdux  vs40,r10,r20
-+   8:	7d 0a a6 99 	lxvd2x  vs40,r10,r20
-+   c:	7d 0a a6 d9 	lxvd2ux vs40,r10,r20
-+  10:	7d 0a a2 99 	lxvdsx  vs40,r10,r20
-+  14:	7d 0a a6 19 	lxvw4x  vs40,r10,r20
-+  18:	7d 0a a6 59 	lxvw4ux vs40,r10,r20
-+  1c:	7d 0a a5 99 	stxsdx  vs40,r10,r20
-+  20:	7d 0a a5 d9 	stxsdux vs40,r10,r20
-+  24:	7d 0a a7 99 	stxvd2x vs40,r10,r20
-+  28:	7d 0a a7 d9 	stxvd2ux vs40,r10,r20
-+  2c:	7d 0a a7 19 	stxvw4x vs40,r10,r20
-+  30:	7d 0a a7 59 	stxvw4ux vs40,r10,r20
-+  34:	f1 00 e5 67 	xsabsdp vs40,vs60
-+  38:	f1 12 e1 07 	xsadddp vs40,vs50,vs60
-+  3c:	f0 92 e1 5e 	xscmpodp cr1,vs50,vs60
-+  40:	f0 92 e1 1e 	xscmpudp cr1,vs50,vs60
-+  44:	f1 12 e5 87 	xscpsgndp vs40,vs50,vs60
-+  48:	f1 00 e4 27 	xscvdpsp vs40,vs60
-+  4c:	f1 00 e5 63 	xscvdpsxds vs40,vs60
-+  50:	f1 00 e1 63 	xscvdpsxws vs40,vs60
-+  54:	f1 00 e5 23 	xscvdpuxds vs40,vs60
-+  58:	f1 00 e1 23 	xscvdpuxws vs40,vs60
-+  5c:	f1 00 e5 27 	xscvspdp vs40,vs60
-+  60:	f1 00 e5 e3 	xscvsxddp vs40,vs60
-+  64:	f1 00 e5 a3 	xscvuxddp vs40,vs60
-+  68:	f1 12 e1 c7 	xsdivdp vs40,vs50,vs60
-+  6c:	f1 12 e1 0f 	xsmaddadp vs40,vs50,vs60
-+  70:	f1 12 e1 4f 	xsmaddmdp vs40,vs50,vs60
-+  74:	f1 12 e5 07 	xsmaxdp vs40,vs50,vs60
-+  78:	f1 12 e5 47 	xsmindp vs40,vs50,vs60
-+  7c:	f1 12 e1 8f 	xsmsubadp vs40,vs50,vs60
-+  80:	f1 12 e1 cf 	xsmsubmdp vs40,vs50,vs60
-+  84:	f1 12 e1 87 	xsmuldp vs40,vs50,vs60
-+  88:	f1 00 e5 a7 	xsnabsdp vs40,vs60
-+  8c:	f1 00 e5 e7 	xsnegdp vs40,vs60
-+  90:	f1 12 e5 0f 	xsnmaddadp vs40,vs50,vs60
-+  94:	f1 12 e5 4f 	xsnmaddmdp vs40,vs50,vs60
-+  98:	f1 12 e5 8f 	xsnmsubadp vs40,vs50,vs60
-+  9c:	f1 12 e5 cf 	xsnmsubmdp vs40,vs50,vs60
-+  a0:	f1 00 e1 27 	xsrdpi  vs40,vs60
-+  a4:	f1 00 e1 af 	xsrdpic vs40,vs60
-+  a8:	f1 00 e1 e7 	xsrdpim vs40,vs60
-+  ac:	f1 00 e1 a7 	xsrdpip vs40,vs60
-+  b0:	f1 00 e1 67 	xsrdpiz vs40,vs60
-+  b4:	f1 00 e1 6b 	xsredp  vs40,vs60
-+  b8:	f1 00 e1 2b 	xsrsqrtedp vs40,vs60
-+  bc:	f1 00 e1 2f 	xssqrtdp vs40,vs60
-+  c0:	f1 12 e1 47 	xssubdp vs40,vs50,vs60
-+  c4:	f0 92 e1 ee 	xstdivdp cr1,vs50,vs60
-+  c8:	f0 80 e1 aa 	xstsqrtdp cr1,vs60
-+  cc:	f1 00 e7 67 	xvabsdp vs40,vs60
-+  d0:	f1 00 e6 67 	xvabssp vs40,vs60
-+  d4:	f1 12 e3 07 	xvadddp vs40,vs50,vs60
-+  d8:	f1 12 e2 07 	xvaddsp vs40,vs50,vs60
-+  dc:	f1 12 e3 1f 	xvcmpeqdp vs40,vs50,vs60
-+  e0:	f1 12 e7 1f 	xvcmpeqdp. vs40,vs50,vs60
-+  e4:	f1 12 e2 1f 	xvcmpeqsp vs40,vs50,vs60
-+  e8:	f1 12 e6 1f 	xvcmpeqsp. vs40,vs50,vs60
-+  ec:	f1 12 e3 9f 	xvcmpgedp vs40,vs50,vs60
-+  f0:	f1 12 e7 9f 	xvcmpgedp. vs40,vs50,vs60
-+  f4:	f1 12 e2 9f 	xvcmpgesp vs40,vs50,vs60
-+  f8:	f1 12 e6 9f 	xvcmpgesp. vs40,vs50,vs60
-+  fc:	f1 12 e3 5f 	xvcmpgtdp vs40,vs50,vs60
-+ 100:	f1 12 e7 5f 	xvcmpgtdp. vs40,vs50,vs60
-+ 104:	f1 12 e2 5f 	xvcmpgtsp vs40,vs50,vs60
-+ 108:	f1 12 e6 5f 	xvcmpgtsp. vs40,vs50,vs60
-+ 10c:	f1 12 e7 87 	xvcpsgndp vs40,vs50,vs60
-+ 110:	f1 1c e7 87 	xvmovdp vs40,vs60
-+ 114:	f1 1c e7 87 	xvmovdp vs40,vs60
-+ 118:	f1 12 e6 87 	xvcpsgnsp vs40,vs50,vs60
-+ 11c:	f1 1c e6 87 	xvmovsp vs40,vs60
-+ 120:	f1 1c e6 87 	xvmovsp vs40,vs60
-+ 124:	f1 00 e6 27 	xvcvdpsp vs40,vs60
-+ 128:	f1 00 e7 63 	xvcvdpsxds vs40,vs60
-+ 12c:	f1 00 e3 63 	xvcvdpsxws vs40,vs60
-+ 130:	f1 00 e7 23 	xvcvdpuxds vs40,vs60
-+ 134:	f1 00 e3 23 	xvcvdpuxws vs40,vs60
-+ 138:	f1 00 e7 27 	xvcvspdp vs40,vs60
-+ 13c:	f1 00 e6 63 	xvcvspsxds vs40,vs60
-+ 140:	f1 00 e2 63 	xvcvspsxws vs40,vs60
-+ 144:	f1 00 e6 23 	xvcvspuxds vs40,vs60
-+ 148:	f1 00 e2 23 	xvcvspuxws vs40,vs60
-+ 14c:	f1 00 e7 e3 	xvcvsxddp vs40,vs60
-+ 150:	f1 00 e6 e3 	xvcvsxdsp vs40,vs60
-+ 154:	f1 00 e3 e3 	xvcvsxwdp vs40,vs60
-+ 158:	f1 00 e2 e3 	xvcvsxwsp vs40,vs60
-+ 15c:	f1 00 e7 a3 	xvcvuxddp vs40,vs60
-+ 160:	f1 00 e6 a3 	xvcvuxdsp vs40,vs60
-+ 164:	f1 00 e3 a3 	xvcvuxwdp vs40,vs60
-+ 168:	f1 00 e2 a3 	xvcvuxwsp vs40,vs60
-+ 16c:	f1 12 e3 c7 	xvdivdp vs40,vs50,vs60
-+ 170:	f1 12 e2 c7 	xvdivsp vs40,vs50,vs60
-+ 174:	f1 12 e3 0f 	xvmaddadp vs40,vs50,vs60
-+ 178:	f1 12 e3 4f 	xvmaddmdp vs40,vs50,vs60
-+ 17c:	f1 12 e2 0f 	xvmaddasp vs40,vs50,vs60
-+ 180:	f1 12 e2 4f 	xvmaddmsp vs40,vs50,vs60
-+ 184:	f1 12 e7 07 	xvmaxdp vs40,vs50,vs60
-+ 188:	f1 12 e6 07 	xvmaxsp vs40,vs50,vs60
-+ 18c:	f1 12 e7 47 	xvmindp vs40,vs50,vs60
-+ 190:	f1 12 e6 47 	xvminsp vs40,vs50,vs60
-+ 194:	f1 12 e3 8f 	xvmsubadp vs40,vs50,vs60
-+ 198:	f1 12 e3 cf 	xvmsubmdp vs40,vs50,vs60
-+ 19c:	f1 12 e2 8f 	xvmsubasp vs40,vs50,vs60
-+ 1a0:	f1 12 e2 cf 	xvmsubmsp vs40,vs50,vs60
-+ 1a4:	f1 12 e3 87 	xvmuldp vs40,vs50,vs60
-+ 1a8:	f1 12 e2 87 	xvmulsp vs40,vs50,vs60
-+ 1ac:	f1 00 e7 a7 	xvnabsdp vs40,vs60
-+ 1b0:	f1 00 e6 a7 	xvnabssp vs40,vs60
-+ 1b4:	f1 00 e7 e7 	xvnegdp vs40,vs60
-+ 1b8:	f1 00 e6 e7 	xvnegsp vs40,vs60
-+ 1bc:	f1 12 e7 0f 	xvnmaddadp vs40,vs50,vs60
-+ 1c0:	f1 12 e7 4f 	xvnmaddmdp vs40,vs50,vs60
-+ 1c4:	f1 12 e6 0f 	xvnmaddasp vs40,vs50,vs60
-+ 1c8:	f1 12 e6 4f 	xvnmaddmsp vs40,vs50,vs60
-+ 1cc:	f1 12 e7 8f 	xvnmsubadp vs40,vs50,vs60
-+ 1d0:	f1 12 e7 cf 	xvnmsubmdp vs40,vs50,vs60
-+ 1d4:	f1 12 e6 8f 	xvnmsubasp vs40,vs50,vs60
-+ 1d8:	f1 12 e6 cf 	xvnmsubmsp vs40,vs50,vs60
-+ 1dc:	f1 00 e3 27 	xvrdpi  vs40,vs60
-+ 1e0:	f1 00 e3 af 	xvrdpic vs40,vs60
-+ 1e4:	f1 00 e3 e7 	xvrdpim vs40,vs60
-+ 1e8:	f1 00 e3 a7 	xvrdpip vs40,vs60
-+ 1ec:	f1 00 e3 67 	xvrdpiz vs40,vs60
-+ 1f0:	f1 00 e3 6b 	xvredp  vs40,vs60
-+ 1f4:	f1 00 e2 6b 	xvresp  vs40,vs60
-+ 1f8:	f1 00 e2 27 	xvrspi  vs40,vs60
-+ 1fc:	f1 00 e2 af 	xvrspic vs40,vs60
-+ 200:	f1 00 e2 e7 	xvrspim vs40,vs60
-+ 204:	f1 00 e2 a7 	xvrspip vs40,vs60
-+ 208:	f1 00 e2 67 	xvrspiz vs40,vs60
-+ 20c:	f1 00 e3 2b 	xvrsqrtedp vs40,vs60
-+ 210:	f1 00 e2 2b 	xvrsqrtesp vs40,vs60
-+ 214:	f1 00 e3 2f 	xvsqrtdp vs40,vs60
-+ 218:	f1 00 e2 2f 	xvsqrtsp vs40,vs60
-+ 21c:	f1 12 e3 47 	xvsubdp vs40,vs50,vs60
-+ 220:	f1 12 e2 47 	xvsubsp vs40,vs50,vs60
-+ 224:	f0 92 e3 ee 	xvtdivdp cr1,vs50,vs60
-+ 228:	f0 92 e2 ee 	xvtdivsp cr1,vs50,vs60
-+ 22c:	f0 80 e3 aa 	xvtsqrtdp cr1,vs60
-+ 230:	f0 80 e2 aa 	xvtsqrtsp cr1,vs60
-+ 234:	f1 12 e4 17 	xxland  vs40,vs50,vs60
-+ 238:	f1 12 e4 57 	xxlandc vs40,vs50,vs60
-+ 23c:	f1 12 e5 17 	xxlnor  vs40,vs50,vs60
-+ 240:	f1 12 e4 97 	xxlor   vs40,vs50,vs60
-+ 244:	f1 12 e4 d7 	xxlxor  vs40,vs50,vs60
-+ 248:	f1 12 e0 97 	xxmrghw vs40,vs50,vs60
-+ 24c:	f1 12 e1 97 	xxmrglw vs40,vs50,vs60
-+ 250:	f1 12 e0 57 	xxmrghd vs40,vs50,vs60
-+ 254:	f1 12 e1 57 	xxpermdi vs40,vs50,vs60,1
-+ 258:	f1 12 e2 57 	xxpermdi vs40,vs50,vs60,2
-+ 25c:	f1 12 e3 57 	xxmrgld vs40,vs50,vs60
-+ 260:	f1 12 90 57 	xxspltd vs40,vs50,0
-+ 264:	f1 12 90 57 	xxspltd vs40,vs50,0
-+ 268:	f1 12 93 57 	xxspltd vs40,vs50,1
-+ 26c:	f1 12 93 57 	xxspltd vs40,vs50,1
-+ 270:	f1 12 e0 57 	xxmrghd vs40,vs50,vs60
-+ 274:	f1 12 e0 57 	xxmrghd vs40,vs50,vs60
-+ 278:	f1 12 e3 57 	xxmrgld vs40,vs50,vs60
-+ 27c:	f1 12 92 57 	xxswapd vs40,vs50
-+ 280:	f1 12 92 57 	xxswapd vs40,vs50
-+ 284:	f1 12 e7 bf 	xxsel   vs40,vs50,vs60,vs62
-+ 288:	f1 12 e2 17 	xxsldwi vs40,vs50,vs60,2
-+ 28c:	f1 02 e2 93 	xxspltw vs40,vs60,2
-diff -Naur binutils-2.19.1.orig/gas/testsuite/gas/ppc/vsx.s binutils-2.19.1/gas/testsuite/gas/ppc/vsx.s
---- binutils-2.19.1.orig/gas/testsuite/gas/ppc/vsx.s	1969-12-31 16:00:00.000000000 -0800
-+++ binutils-2.19.1/gas/testsuite/gas/ppc/vsx.s	2009-03-02 05:59:36.000000000 -0800
-@@ -0,0 +1,166 @@
-+	.section	".text"
-+start:
-+	lxsdx      40,10,20
-+	lxsdux     40,10,20
-+	lxvd2x     40,10,20
-+	lxvd2ux    40,10,20
-+	lxvdsx     40,10,20
-+	lxvw4x     40,10,20
-+	lxvw4ux    40,10,20
-+	stxsdx     40,10,20
-+	stxsdux    40,10,20
-+	stxvd2x    40,10,20
-+	stxvd2ux   40,10,20
-+	stxvw4x    40,10,20
-+	stxvw4ux   40,10,20
-+	xsabsdp    40,60
-+	xsadddp    40,50,60
-+	xscmpodp   1,50,60
-+	xscmpudp   1,50,60
-+	xscpsgndp  40,50,60
-+	xscvdpsp   40,60
-+	xscvdpsxds 40,60
-+	xscvdpsxws 40,60
-+	xscvdpuxds 40,60
-+	xscvdpuxws 40,60
-+	xscvspdp   40,60
-+	xscvsxddp  40,60
-+	xscvuxddp  40,60
-+	xsdivdp    40,50,60
-+	xsmaddadp  40,50,60
-+	xsmaddmdp  40,50,60
-+	xsmaxdp	   40,50,60
-+	xsmindp	   40,50,60
-+	xsmsubadp  40,50,60
-+	xsmsubmdp  40,50,60
-+	xsmuldp	   40,50,60
-+	xsnabsdp   40,60
-+	xsnegdp    40,60
-+	xsnmaddadp 40,50,60
-+	xsnmaddmdp 40,50,60
-+	xsnmsubadp 40,50,60
-+	xsnmsubmdp 40,50,60
-+	xsrdpi     40,60
-+	xsrdpic    40,60
-+	xsrdpim    40,60
-+	xsrdpip    40,60
-+	xsrdpiz    40,60
-+	xsredp     40,60
-+	xsrsqrtedp 40,60
-+	xssqrtdp   40,60
-+	xssubdp    40,50,60
-+	xstdivdp   1,50,60
-+	xstsqrtdp  1,60
-+	xvabsdp    40,60
-+	xvabssp    40,60
-+	xvadddp    40,50,60
-+	xvaddsp    40,50,60
-+	xvcmpeqdp  40,50,60
-+	xvcmpeqdp. 40,50,60
-+	xvcmpeqsp  40,50,60
-+	xvcmpeqsp. 40,50,60
-+	xvcmpgedp  40,50,60
-+	xvcmpgedp. 40,50,60
-+	xvcmpgesp  40,50,60
-+	xvcmpgesp. 40,50,60
-+	xvcmpgtdp  40,50,60
-+	xvcmpgtdp. 40,50,60
-+	xvcmpgtsp  40,50,60
-+	xvcmpgtsp. 40,50,60
-+	xvcpsgndp  40,50,60
-+	xvmovdp    40,60
-+	xvcpsgndp  40,60,60
-+	xvcpsgnsp  40,50,60
-+	xvmovsp    40,60
-+	xvcpsgnsp  40,60,60
-+	xvcvdpsp   40,60
-+	xvcvdpsxds 40,60
-+	xvcvdpsxws 40,60
-+	xvcvdpuxds 40,60
-+	xvcvdpuxws 40,60
-+	xvcvspdp   40,60
-+	xvcvspsxds 40,60
-+	xvcvspsxws 40,60
-+	xvcvspuxds 40,60
-+	xvcvspuxws 40,60
-+	xvcvsxddp  40,60
-+	xvcvsxdsp  40,60
-+	xvcvsxwdp  40,60
-+	xvcvsxwsp  40,60
-+	xvcvuxddp  40,60
-+	xvcvuxdsp  40,60
-+	xvcvuxwdp  40,60
-+	xvcvuxwsp  40,60
-+	xvdivdp    40,50,60
-+	xvdivsp    40,50,60
-+	xvmaddadp  40,50,60
-+	xvmaddmdp  40,50,60
-+	xvmaddasp  40,50,60
-+	xvmaddmsp  40,50,60
-+	xvmaxdp    40,50,60
-+	xvmaxsp    40,50,60
-+	xvmindp    40,50,60
-+	xvminsp    40,50,60
-+	xvmsubadp  40,50,60
-+	xvmsubmdp  40,50,60
-+	xvmsubasp  40,50,60
-+	xvmsubmsp  40,50,60
-+	xvmuldp    40,50,60
-+	xvmulsp    40,50,60
-+	xvnabsdp   40,60
-+	xvnabssp   40,60
-+	xvnegdp    40,60
-+	xvnegsp    40,60
-+	xvnmaddadp 40,50,60
-+	xvnmaddmdp 40,50,60
-+	xvnmaddasp 40,50,60
-+	xvnmaddmsp 40,50,60
-+	xvnmsubadp 40,50,60
-+	xvnmsubmdp 40,50,60
-+	xvnmsubasp 40,50,60
-+	xvnmsubmsp 40,50,60
-+	xvrdpi     40,60
-+	xvrdpic    40,60
-+	xvrdpim    40,60
-+	xvrdpip    40,60
-+	xvrdpiz    40,60
-+	xvredp     40,60
-+	xvresp     40,60
-+	xvrspi     40,60
-+	xvrspic    40,60
-+	xvrspim    40,60
-+	xvrspip    40,60
-+	xvrspiz    40,60
-+	xvrsqrtedp 40,60
-+	xvrsqrtesp 40,60
-+	xvsqrtdp   40,60
-+	xvsqrtsp   40,60
-+	xvsubdp    40,50,60
-+	xvsubsp    40,50,60
-+	xvtdivdp   1,50,60
-+	xvtdivsp   1,50,60
-+	xvtsqrtdp  1,60
-+	xvtsqrtsp  1,60
-+	xxland     40,50,60
-+	xxlandc    40,50,60
-+	xxlnor     40,50,60
-+	xxlor      40,50,60
-+	xxlxor     40,50,60
-+	xxmrghw    40,50,60
-+	xxmrglw    40,50,60
-+	xxpermdi   40,50,60,0b00
-+	xxpermdi   40,50,60,0b01
-+	xxpermdi   40,50,60,0b10
-+	xxpermdi   40,50,60,0b11
-+	xxspltd    40,50,0
-+	xxpermdi   40,50,50,0b00
-+	xxspltd    40,50,1
-+	xxpermdi   40,50,50,0b11
-+	xxmrghd    40,50,60
-+	xxpermdi   40,50,60,0b00
-+	xxmrgld    40,50,60
-+	xxpermdi   40,50,50,0b10
-+	xxswapd    40,50
-+	xxsel      40,50,60,62
-+	xxsldwi    40,50,60,2
-+	xxspltw    40,60,2
-diff -Naur binutils-2.19.1.orig/include/elf/ChangeLog binutils-2.19.1/include/elf/ChangeLog
---- binutils-2.19.1.orig/include/elf/ChangeLog	2008-08-20 16:28:58.000000000 -0700
-+++ binutils-2.19.1/include/elf/ChangeLog	2009-03-02 05:41:07.000000000 -0800
-@@ -1,3 +1,11 @@
-+2009-03-02  Alan Modra  <amodra@bigpond.net.au>
-+
-+	2008-11-14  Nathan Sidwell  <nathan@codesourcery.com>
-+	* internal.h (struct elf_segment_map): Add header_size field.
-+ 
-+	2008-10-10  Nathan Froyd  <froydnj@codesourcery.com>
-+	* ppc.h: Add Tag_GNU_Power_ABI_Struct_Return.
-+
- 2008-08-20  Bob Wilson  <bob.wilson@acm.org>
- 
- 	* xtensa.h (R_XTENSA_TLSDESC_FN, R_XTENSA_TLSDESC_ARG)
-diff -Naur binutils-2.19.1.orig/include/elf/internal.h binutils-2.19.1/include/elf/internal.h
---- binutils-2.19.1.orig/include/elf/internal.h	2008-03-12 22:27:41.000000000 -0700
-+++ binutils-2.19.1/include/elf/internal.h	2009-03-02 05:41:07.000000000 -0800
-@@ -266,6 +266,8 @@
-   bfd_vma p_align;
-   /* Segment size in file and memory */
-   bfd_vma p_size;
-+  /* Required size of filehdr + phdrs, if non-zero */
-+  bfd_vma header_size;
-   /* Whether the p_flags field is valid; if not, the flags are based
-      on the section flags.  */
-   unsigned int p_flags_valid : 1;
-diff -Naur binutils-2.19.1.orig/include/elf/ppc.h binutils-2.19.1/include/elf/ppc.h
---- binutils-2.19.1.orig/include/elf/ppc.h	2008-07-26 06:10:47.000000000 -0700
-+++ binutils-2.19.1/include/elf/ppc.h	2009-03-02 05:35:25.000000000 -0800
-@@ -186,6 +186,11 @@
-      registers, 3 for SPE registers; 0 for not tagged or not using any
-      ABIs affected by the differences.  */
-   Tag_GNU_Power_ABI_Vector = 8,
-+
-+  /* Value 1 for ABIs using r3/r4 for returning structures <= 8 bytes,
-+     2 for ABIs using memory; 0 for not tagged or not using any ABIs
-+     affected by the differences.  */
-+  Tag_GNU_Power_ABI_Struct_Return = 12
- };
- 
- #endif /* _ELF_PPC_H */
-diff -Naur binutils-2.19.1.orig/include/opcode/ChangeLog binutils-2.19.1/include/opcode/ChangeLog
---- binutils-2.19.1.orig/include/opcode/ChangeLog	2008-08-28 07:07:48.000000000 -0700
-+++ binutils-2.19.1/include/opcode/ChangeLog	2009-03-02 05:59:36.000000000 -0800
-@@ -1,3 +1,12 @@
-+2009-03-02  Alan Modra  <amodra@bigpond.net.au>
-+
-+	2009-02-26  Peter Bergner  <bergner@vnet.ibm.com>
-+	* ppc.h (PPC_OPCODE_POWER7): New.
-+
-+	2009-01-09  Peter Bergner  <bergner@vnet.ibm.com>
-+	* ppc.h (struct powerpc_opcode): New field "deprecated".
-+	(PPC_OPCODE_NOPOWER4): Delete.
-+
- 2008-08-28  H.J. Lu  <hongjiu.lu@intel.com>
- 
- 	* ia64.h (ia64_resource_specifier): Add IA64_RS_CR_IIB.  Update
-diff -Naur binutils-2.19.1.orig/include/opcode/ppc.h binutils-2.19.1/include/opcode/ppc.h
---- binutils-2.19.1.orig/include/opcode/ppc.h	2008-08-01 21:38:51.000000000 -0700
-+++ binutils-2.19.1/include/opcode/ppc.h	2009-03-02 05:59:36.000000000 -0800
-@@ -46,6 +46,11 @@
-      are listed below.  */
-   ppc_cpu_t flags;
- 
-+  /* One bit flags for the opcode.  These are used to indicate which
-+     specific processors no longer support the instructions.  The defined
-+     values are listed below.  */
-+  ppc_cpu_t deprecated;
-+
-   /* An array of operand codes.  Each code is an index into the
-      operand table.  They appear in the order which the operands must
-      appear in assembly code, and are terminated by a zero.  */
-@@ -109,8 +114,8 @@
- /* Opcode is only supported by Power4 architecture.  */
- #define PPC_OPCODE_POWER4	    0x4000
- 
--/* Opcode isn't supported by Power4 architecture.  */
--#define PPC_OPCODE_NOPOWER4	    0x8000
-+/* Opcode is only supported by Power7 architecture.  */
-+#define PPC_OPCODE_POWER7	    0x8000
- 
- /* Opcode is only supported by POWERPC Classic architecture.  */
- #define PPC_OPCODE_CLASSIC	   0x10000
-diff -Naur binutils-2.19.1.orig/ld/ChangeLog binutils-2.19.1/ld/ChangeLog
---- binutils-2.19.1.orig/ld/ChangeLog	2009-02-02 02:31:31.000000000 -0800
-+++ binutils-2.19.1/ld/ChangeLog	2009-03-02 05:56:19.000000000 -0800
-@@ -1,3 +1,65 @@
-+2009-03-02  Alan Modra  <amodra@bigpond.net.au>
-+
-+	2009-02-16  Alan Modra  <amodra@bigpond.net.au>
-+	* ldlang.c (push_stat_ptr, pop_stat_ptr): New functions.
-+	(stat_save, stat_save_ptr): New variables.
-+	(lang_insert_orphan): Use push_stat_ptr and pop_stat_ptr.
-+	(load_symbols): Likewise.  Delete dead "bad_load" code.
-+	(open_input_bfds): Warn on script containing output sections.
-+	(lang_enter_output_section_statement): Use push_stat_ptr.
-+	(lang_enter_group): Likewise.
-+	(lang_leave_output_section_statement): Use pop_stat_ptr.
-+	(lang_leave_group): Likewise.
-+	* ldlang.h (push_stat_ptr, pop_stat_ptr): Declare.
-+	* ldctor.c (ldctor_build_sets): Use push_stat_ptr and pop_stat_ptr.
-+	* emultempl/beos.em (gld_${EMULATION_NAME}_set_symbols): Likewise.
-+	* emultempl/pe.em (gld_${EMULATION_NAME}_set_symbols): Likewise.
-+	* emultempl/pep.em (gld_${EMULATION_NAME}_set_symbols): Likewise.
-+	* emultempl/xtensaelf.em (ld_xtensa_insert_page_offsets): Likewise.
-+
-+	2008-10-04  Alan Modra  <amodra@bigpond.net.au>
-+	PR 6931
-+	* ldemul.c (ldemul_place_orphan): Add "constraint" param.
-+	* ldemul.h (ldemul_place_orphan): Update prototype.
-+	(struct ld_emulation_xfer_struct <place_orphan>): Likewise add param.
-+	* ldlang.c (unique_section_p): Make static.
-+	(lang_output_section_statement_lookup): Optimise creation of SPECIAL
-+	sections.
-+	(lang_insert_orphan): Add "constraint" param.  Pass to
-+	lang_enter_output_section_statement.
-+	(init_os): Don't use an existing bfd section for SPECIAL sections.
-+	(lang_place_orphans): Don't rename unique output sections, instead
-+	mark their output section statements SPECIAL.
-+	* ldlang.h (lang_insert_orphan): Update prototype.
-+	(unique_section_p): Delete.
-+	* emultempl/beos.em (place_orphan): Add "constraint" param.
-+	* emultempl/elf32.em (place_orphan): Likewise.  Don't match existing
-+	output sections if set.
-+	* emultempl/pe.em (place_orphan): Likewise.
-+	* emultempl/pep.em (place_orphan): Likewise.
-+	* emultempl/mmo.em (mmo_place_orphan): Update.
-+	* emultempl/spuelf.em (spu_place_special_section): Update.
-+
-+	2008-10-03  Alan Modra  <amodra@bigpond.net.au>
-+	PR 6931
-+	* ldemul.c (ldemul_place_orphan): Add "name" param.
-+	* ldemul.h (ldemul_place_orphan): Update prototype.
-+	(struct ld_emulation_xfer_struct <place_orphan>): Likewise.
-+	* ldlang.c (lang_place_orphans): Generate unique section names here..
-+	* emultempl/elf32.em (place_orphan): ..rather than here.  Don't
-+	directly use an existing output section statement that has no
-+	bfd section.
-+	* emultempl/pe.em (place_orphan): Likewise.
-+	* emultempl/pep.em (place_orphan): Likewise.
-+	* emultempl/beos.em (place_orphan): Adjust.
-+	* emultempl/spuelf.em (spu_place_special_section): Adjust
-+	place_orphan call.
-+	* emultempl/genelf.em (gld${EMULATION_NAME}_after_open): New function.
-+	(LDEMUL_AFTER_OPEN): Define.
-+
-+	2008-09-25  Alan Modra  <amodra@bigpond.net.au>
-+	* ldexp.c (fold_binary): Evaluate rhs when lhs not valid.
-+
- 2009-02-02  Tristan Gingold  <gingold@adacore.com>
- 
- 	* deffilep.c: Add autogenerated file.
-diff -Naur binutils-2.19.1.orig/ld/emultempl/beos.em binutils-2.19.1/ld/emultempl/beos.em
---- binutils-2.19.1.orig/ld/emultempl/beos.em	2008-09-08 17:10:16.000000000 -0700
-+++ binutils-2.19.1/ld/emultempl/beos.em	2009-03-02 05:56:19.000000000 -0800
-@@ -8,7 +8,7 @@
- fragment <<EOF
- /* This file is part of GLD, the Gnu Linker.
-    Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
--   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-+   2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
- 
-    This file is part of the GNU Binutils.
- 
-@@ -330,7 +330,6 @@
-   /* Run through and invent symbols for all the
-      names and insert the defaults. */
-   int j;
--  lang_statement_list_type *save;
- 
-   if (!init[IMAGEBASEOFF].inited)
-     {
-@@ -347,9 +346,7 @@
-     return;
- 
-   /* Glue the assignments into the abs section */
--  save = stat_ptr;
--
--  stat_ptr = &(abs_output_section->children);
-+  push_stat_ptr (&abs_output_section->children);
- 
-   for (j = 0; init[j].ptr; j++)
-     {
-@@ -367,7 +364,7 @@
-       else	abort();
-     }
-   /* Restore the pointer. */
--  stat_ptr = save;
-+  pop_stat_ptr ();
- 
-   if (pe.FileAlignment >
-       pe.SectionAlignment)
-@@ -609,8 +606,6 @@
- static void
- gld_${EMULATION_NAME}_before_allocation (void)
- {
--  extern lang_statement_list_type *stat_ptr;
--
- #ifdef TARGET_IS_ppcpe
-   /* Here we rummage through the found bfds to collect toc information */
-   {
-@@ -665,9 +660,10 @@
-    which are not mentioned in the linker script.  */
- 
- static bfd_boolean
--gld${EMULATION_NAME}_place_orphan (asection *s)
-+gld${EMULATION_NAME}_place_orphan (asection *s,
-+				   const char *secname,
-+				   int constraint)
- {
--  const char *secname;
-   char *output_secname, *ps;
-   lang_output_section_statement_type *os;
-   lang_statement_union_type *l;
-@@ -682,8 +678,6 @@
-   if (link_info.relocatable)
-     return FALSE;
- 
--  secname = bfd_get_section_name (s->owner, s);
--
-   /* Everything from the '\$' on gets deleted so don't allow '\$' as the
-      first character.  */
-   if (*secname == '\$')
-@@ -697,7 +691,7 @@
-   output_secname = xstrdup (secname);
-   ps = strchr (output_secname + 1, '\$');
-   *ps = 0;
--  os = lang_output_section_statement_lookup (output_secname, 0, TRUE);
-+  os = lang_output_section_statement_lookup (output_secname, constraint, TRUE);
- 
-   /* Find the '\$' wild statement for this section.  We currently require the
-      linker script to explicitly mention "*(.foo\$)".
-diff -Naur binutils-2.19.1.orig/ld/emultempl/elf32.em binutils-2.19.1/ld/emultempl/elf32.em
---- binutils-2.19.1.orig/ld/emultempl/elf32.em	2008-09-06 21:02:31.000000000 -0700
-+++ binutils-2.19.1/ld/emultempl/elf32.em	2009-03-02 05:34:03.000000000 -0800
-@@ -62,7 +62,8 @@
- static void gld${EMULATION_NAME}_before_parse (void);
- static void gld${EMULATION_NAME}_after_open (void);
- static void gld${EMULATION_NAME}_before_allocation (void);
--static bfd_boolean gld${EMULATION_NAME}_place_orphan (asection *s);
-+static bfd_boolean gld${EMULATION_NAME}_place_orphan
-+  (asection *, const char *, int);
- static void gld${EMULATION_NAME}_finish (void);
- 
- EOF
-@@ -1635,7 +1636,9 @@
-    sections in the right segment.  */
- 
- static bfd_boolean
--gld${EMULATION_NAME}_place_orphan (asection *s)
-+gld${EMULATION_NAME}_place_orphan (asection *s,
-+				   const char *secname,
-+				   int constraint)
- {
-   static struct orphan_save hold[] =
-     {
-@@ -1673,15 +1676,12 @@
-     };
-   static int orphan_init_done = 0;
-   struct orphan_save *place;
--  const char *secname;
-   lang_output_section_statement_type *after;
-   lang_output_section_statement_type *os;
-   int isdyn = 0;
-   int iself = s->owner->xvec->flavour == bfd_target_elf_flavour;
-   unsigned int sh_type = iself ? elf_section_type (s) : SHT_NULL;
- 
--  secname = bfd_get_section_name (s->owner, s);
--
-   if (! link_info.relocatable
-       && link_info.combreloc
-       && (s->flags & SEC_ALLOC))
-@@ -1707,28 +1707,23 @@
- 	}
-     }
- 
--  if (isdyn || (!config.unique_orphan_sections && !unique_section_p (s)))
--    {
--      /* Look through the script to see where to place this section.  */
--      os = lang_output_section_find (secname);
--
--      if (os != NULL
--	  && (os->bfd_section == NULL
--	      || os->bfd_section->flags == 0
--	      || (_bfd_elf_match_sections_by_type (link_info.output_bfd,
--						   os->bfd_section,
--						   s->owner, s)
--		  && ((s->flags ^ os->bfd_section->flags)
--		      & (SEC_LOAD | SEC_ALLOC)) == 0)))
--	{
--	  /* We already have an output section statement with this
--	     name, and its bfd section, if any, has compatible flags.
--	     If the section already exists but does not have any flags
--	     set, then it has been created by the linker, probably as a
--	     result of a --section-start command line switch.  */
--	  lang_add_section (&os->children, s, os);
--	  return TRUE;
--	}
-+  /* Look through the script to see where to place this section.  */
-+  if (constraint == 0
-+      && (os = lang_output_section_find (secname)) != NULL
-+      && os->bfd_section != NULL
-+      && (os->bfd_section->flags == 0
-+	  || (_bfd_elf_match_sections_by_type (link_info.output_bfd,
-+					       os->bfd_section, s->owner, s)
-+	      && ((s->flags ^ os->bfd_section->flags)
-+		  & (SEC_LOAD | SEC_ALLOC)) == 0)))
-+    {
-+      /* We already have an output section statement with this
-+	 name, and its bfd section has compatible flags.
-+	 If the section already exists but does not have any flags
-+	 set, then it has been created by the linker, probably as a
-+	 result of a --section-start command line switch.  */
-+      lang_add_section (&os->children, s, os);
-+      return TRUE;
-     }
- 
-   if (!orphan_init_done)
-@@ -1748,7 +1743,7 @@
-      sections into the .text section to get them out of the way.  */
-   if (link_info.executable
-       && ! link_info.relocatable
--      && CONST_STRNEQ (secname, ".gnu.warning.")
-+      && CONST_STRNEQ (s->name, ".gnu.warning.")
-       && hold[orphan_text].os != NULL)
-     {
-       lang_add_section (&hold[orphan_text].os->children, s,
-@@ -1803,19 +1798,7 @@
- 	after = &lang_output_section_statement.head->output_section_statement;
-     }
- 
--  /* Choose a unique name for the section.  This will be needed if the
--     same section name appears in the input file with different
--     loadable or allocatable characteristics.  */
--  if (bfd_get_section_by_name (link_info.output_bfd, secname) != NULL)
--    {
--      static int count = 1;
--      secname = bfd_get_unique_section_name (link_info.output_bfd,
--					     secname, &count);
--      if (secname == NULL)
--	einfo ("%F%P: place_orphan failed: %E\n");
--    }
--
--  lang_insert_orphan (s, secname, after, place, NULL, NULL);
-+  lang_insert_orphan (s, secname, constraint, after, place, NULL, NULL);
- 
-   return TRUE;
- }
-diff -Naur binutils-2.19.1.orig/ld/emultempl/genelf.em binutils-2.19.1/ld/emultempl/genelf.em
---- binutils-2.19.1.orig/ld/emultempl/genelf.em	2007-07-19 12:56:10.000000000 -0700
-+++ binutils-2.19.1/ld/emultempl/genelf.em	2009-03-02 05:32:55.000000000 -0800
-@@ -34,7 +34,27 @@
-   gld${EMULATION_NAME}_map_segments (FALSE);
-   finish_default ();
- }
-+
-+static void
-+gld${EMULATION_NAME}_after_open (void)
-+{
-+  bfd *ibfd;
-+  asection *sec;
-+  asymbol **syms;
-+
-+  if (link_info.relocatable)
-+    for (ibfd = link_info.input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
-+      if ((syms = bfd_get_outsymbols (ibfd)) != NULL
-+	  && bfd_get_flavour (ibfd) == bfd_target_elf_flavour)
-+	for (sec = ibfd->sections; sec != NULL; sec = sec->next)
-+	  if ((sec->flags & (SEC_GROUP | SEC_LINKER_CREATED)) == SEC_GROUP)
-+	    {
-+	      struct bfd_elf_section_data *sec_data = elf_section_data (sec);
-+	      elf_group_id (sec) = syms[sec_data->this_hdr.sh_info - 1];
-+	    }
-+}
- EOF
- # Put these extra routines in ld_${EMULATION_NAME}_emulation
- #
- LDEMUL_FINISH=gld${EMULATION_NAME}_finish
-+LDEMUL_AFTER_OPEN=gld${EMULATION_NAME}_after_open
-diff -Naur binutils-2.19.1.orig/ld/emultempl/mmo.em binutils-2.19.1/ld/emultempl/mmo.em
---- binutils-2.19.1.orig/ld/emultempl/mmo.em	2008-02-14 19:35:53.000000000 -0800
-+++ binutils-2.19.1/ld/emultempl/mmo.em	2009-03-02 05:34:03.000000000 -0800
-@@ -47,7 +47,9 @@
-    from elf32.em.  */
- 
- static bfd_boolean
--mmo_place_orphan (asection *s)
-+mmo_place_orphan (asection *s,
-+		  const char *secname,
-+		  int constraint ATTRIBUTE_UNUSED)
- {
-   static struct orphan_save hold_text =
-     {
-@@ -56,7 +58,6 @@
-       0, 0, 0, 0
-     };
-   struct orphan_save *place;
--  const char *secname;
-   lang_output_section_statement_type *after;
-   lang_output_section_statement_type *os;
- 
-@@ -66,7 +67,6 @@
-     return FALSE;
- 
-   /* Only care for sections we're going to load.  */
--  secname = s->name;
-   os = lang_output_section_find (secname);
- 
-   /* We have an output section by this name.  Place the section inside it
-@@ -93,7 +93,7 @@
- 
-   /* If there's an output section by this name, we'll use it, regardless
-      of section flags, in contrast to what's done in elf32.em.  */
--  os = lang_insert_orphan (s, secname, after, place, NULL, NULL);
-+  os = lang_insert_orphan (s, secname, 0, after, place, NULL, NULL);
- 
-   /* We need an output section for .text as a root, so if there was none
-      (might happen with a peculiar linker script such as in "map
-diff -Naur binutils-2.19.1.orig/ld/emultempl/pe.em binutils-2.19.1/ld/emultempl/pe.em
---- binutils-2.19.1.orig/ld/emultempl/pe.em	2008-09-09 02:49:56.000000000 -0700
-+++ binutils-2.19.1/ld/emultempl/pe.em	2009-03-02 05:56:19.000000000 -0800
-@@ -10,7 +10,7 @@
- (echo;echo;echo;echo;echo)>e${EMULATION_NAME}.c # there, now line numbers match ;-)
- fragment <<EOF
- /* Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
--   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-+   2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
- 
-    This file is part of the GNU Binutils.
- 
-@@ -697,7 +697,6 @@
-   /* Run through and invent symbols for all the
-      names and insert the defaults.  */
-   int j;
--  lang_statement_list_type *save;
- 
-   if (!init[IMAGEBASEOFF].inited)
-     {
-@@ -720,9 +719,7 @@
-     return;
- 
-   /* Glue the assignments into the abs section.  */
--  save = stat_ptr;
--
--  stat_ptr = &(abs_output_section->children);
-+  push_stat_ptr (&abs_output_section->children);
- 
-   for (j = 0; init[j].ptr; j++)
-     {
-@@ -744,7 +741,7 @@
- 	image_base_statement = rv;
-     }
-   /* Restore the pointer.  */
--  stat_ptr = save;
-+  pop_stat_ptr ();
- 
-   if (pe.FileAlignment >
-       pe.SectionAlignment)
-@@ -1613,40 +1610,37 @@
-    sort_sections.  */
- 
- static bfd_boolean
--gld_${EMULATION_NAME}_place_orphan (asection *s)
-+gld_${EMULATION_NAME}_place_orphan (asection *s,
-+				    const char *secname,
-+				    int constraint)
- {
--  const char *secname;
--  const char *orig_secname;
-+  const char *orig_secname = secname;
-   char *dollar = NULL;
-   lang_output_section_statement_type *os;
-   lang_statement_list_type add_child;
- 
--  secname = bfd_get_section_name (s->owner, s);
--
-   /* Look through the script to see where to place this section.  */
--  orig_secname = secname;
-   if (!link_info.relocatable
-       && (dollar = strchr (secname, '$')) != NULL)
-     {
--      size_t len = dollar - orig_secname;
-+      size_t len = dollar - secname;
-       char *newname = xmalloc (len + 1);
--      memcpy (newname, orig_secname, len);
-+      memcpy (newname, secname, len);
-       newname[len] = '\0';
-       secname = newname;
-     }
- 
--  os = lang_output_section_find (secname);
--
-   lang_list_init (&add_child);
- 
--  if (os != NULL
--      && (os->bfd_section == NULL
--	  || os->bfd_section->flags == 0
-+  if (constraint == 0
-+      && (os = lang_output_section_find (secname)) != NULL
-+      && os->bfd_section != NULL
-+      && (os->bfd_section->flags == 0
- 	  || ((s->flags ^ os->bfd_section->flags)
- 	      & (SEC_LOAD | SEC_ALLOC)) == 0))
-     {
-       /* We already have an output section statement with this
--	 name, and its bfd section, if any, has compatible flags.
-+	 name, and its bfd section has compatible flags.
- 	 If the section already exists but does not have any flags set,
- 	 then it has been created by the linker, probably as a result of
- 	 a --section-start command line switch.  */
-@@ -1723,21 +1717,10 @@
- 		     ->output_section_statement);
- 	}
- 
--      /* Choose a unique name for the section.  This will be needed if the
--	 same section name appears in the input file with different
--	 loadable or allocatable characteristics.  */
--      if (bfd_get_section_by_name (link_info.output_bfd, secname) != NULL)
--	{
--	  static int count = 1;
--	  secname = bfd_get_unique_section_name (link_info.output_bfd,
--						 secname, &count);
--	  if (secname == NULL)
--	    einfo ("%F%P: place_orphan failed: %E\n");
--	}
--
-       /* All sections in an executable must be aligned to a page boundary.  */
-       address = exp_unop (ALIGN_K, exp_nameop (NAME, "__section_alignment__"));
--      os = lang_insert_orphan (s, secname, after, place, address, &add_child);
-+      os = lang_insert_orphan (s, secname, constraint, after, place, address,
-+			       &add_child);
-     }
- 
-   {
-diff -Naur binutils-2.19.1.orig/ld/emultempl/pep.em binutils-2.19.1/ld/emultempl/pep.em
---- binutils-2.19.1.orig/ld/emultempl/pep.em	2008-09-09 02:49:56.000000000 -0700
-+++ binutils-2.19.1/ld/emultempl/pep.em	2009-03-02 05:56:19.000000000 -0800
-@@ -9,7 +9,7 @@
- rm -f e${EMULATION_NAME}.c
- (echo;echo;echo;echo;echo)>e${EMULATION_NAME}.c # there, now line numbers match ;-)
- fragment <<EOF
--/* Copyright 2006, 2007, 2008 Free Software Foundation, Inc.
-+/* Copyright 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-    Written by Kai Tietz, OneVision Software GmbH&CoKg.
- 
-    This file is part of the GNU Binutils.
-@@ -657,7 +657,6 @@
-   /* Run through and invent symbols for all the
-      names and insert the defaults.  */
-   int j;
--  lang_statement_list_type *save;
- 
-   if (!init[IMAGEBASEOFF].inited)
-     {
-@@ -680,9 +679,7 @@
-     return;
- 
-   /* Glue the assignments into the abs section.  */
--  save = stat_ptr;
--
--  stat_ptr = &(abs_output_section->children);
-+  push_stat_ptr (&abs_output_section->children);
- 
-   for (j = 0; init[j].ptr; j++)
-     {
-@@ -704,7 +701,7 @@
- 	image_base_statement = rv;
-     }
-   /* Restore the pointer.  */
--  stat_ptr = save;
-+  pop_stat_ptr ();
- 
-   if (pep.FileAlignment > pep.SectionAlignment)
-     {
-@@ -1372,40 +1369,37 @@
-    sort_sections.  */
- 
- static bfd_boolean
--gld_${EMULATION_NAME}_place_orphan (asection *s)
-+gld_${EMULATION_NAME}_place_orphan (asection *s,
-+				    const char *secname,
-+				    int constraint)
- {
--  const char *secname;
--  const char *orig_secname;
-+  const char *orig_secname = secname;
-   char *dollar = NULL;
-   lang_output_section_statement_type *os;
-   lang_statement_list_type add_child;
- 
--  secname = bfd_get_section_name (s->owner, s);
--
-   /* Look through the script to see where to place this section.  */
--  orig_secname = secname;
-   if (!link_info.relocatable
-       && (dollar = strchr (secname, '$')) != NULL)
-     {
--      size_t len = dollar - orig_secname;
-+      size_t len = dollar - secname;
-       char *newname = xmalloc (len + 1);
--      memcpy (newname, orig_secname, len);
-+      memcpy (newname, secname, len);
-       newname[len] = '\0';
-       secname = newname;
-     }
- 
--  os = lang_output_section_find (secname);
--
-   lang_list_init (&add_child);
- 
--  if (os != NULL
--      && (os->bfd_section == NULL
--	  || os->bfd_section->flags == 0
-+  if (constraint == 0
-+      && (os = lang_output_section_find (secname)) != NULL
-+      && os->bfd_section != NULL
-+      && (os->bfd_section->flags == 0
- 	  || ((s->flags ^ os->bfd_section->flags)
- 	      & (SEC_LOAD | SEC_ALLOC)) == 0))
-     {
-       /* We already have an output section statement with this
--	 name, and its bfd section, if any, has compatible flags.
-+	 name, and its bfd section has compatible flags.
- 	 If the section already exists but does not have any flags set,
- 	 then it has been created by the linker, probably as a result of
- 	 a --section-start command line switch.  */
-@@ -1482,21 +1476,10 @@
- 		     ->output_section_statement);
- 	}
- 
--      /* Choose a unique name for the section.  This will be needed if the
--	 same section name appears in the input file with different
--	 loadable or allocatable characteristics.  */
--      if (bfd_get_section_by_name (link_info.output_bfd, secname) != NULL)
--	{
--	  static int count = 1;
--	  secname = bfd_get_unique_section_name (link_info.output_bfd,
--						 secname, &count);
--	  if (secname == NULL)
--	    einfo ("%F%P: place_orphan failed: %E\n");
--	}
--
-       /* All sections in an executable must be aligned to a page boundary.  */
-       address = exp_unop (ALIGN_K, exp_nameop (NAME, "__section_alignment__"));
--      os = lang_insert_orphan (s, secname, after, place, address, &add_child);
-+      os = lang_insert_orphan (s, secname, constraint, after, place, address,
-+			       &add_child);
-     }
- 
-   {
-diff -Naur binutils-2.19.1.orig/ld/emultempl/spuelf.em binutils-2.19.1/ld/emultempl/spuelf.em
---- binutils-2.19.1.orig/ld/emultempl/spuelf.em	2008-08-02 09:25:44.000000000 -0700
-+++ binutils-2.19.1/ld/emultempl/spuelf.em	2009-03-02 05:34:03.000000000 -0800
-@@ -114,12 +114,7 @@
- 
-   os = lang_output_section_find (o != NULL ? o->name : output_name);
-   if (os == NULL)
--    {
--      const char *save = s->name;
--      s->name = output_name;
--      gld${EMULATION_NAME}_place_orphan (s);
--      s->name = save;
--    }
-+    gld${EMULATION_NAME}_place_orphan (s, output_name, 0);
-   else if (o != NULL && os->children.head != NULL)
-     {
-       lang_statement_list_type add;
-diff -Naur binutils-2.19.1.orig/ld/emultempl/xtensaelf.em binutils-2.19.1/ld/emultempl/xtensaelf.em
---- binutils-2.19.1.orig/ld/emultempl/xtensaelf.em	2008-02-14 19:35:53.000000000 -0800
-+++ binutils-2.19.1/ld/emultempl/xtensaelf.em	2009-03-02 05:56:19.000000000 -0800
-@@ -1,5 +1,5 @@
- # This shell script emits a C file. -*- C -*-
--#   Copyright 2003, 2004, 2005, 2006, 2007, 2008
-+#   Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009
- #   Free Software Foundation, Inc.
- #
- # This file is part of the GNU Binutils.
-@@ -1951,20 +1951,17 @@
- 		lang_assignment_statement_type *assign_stmt;
- 		lang_statement_union_type *assign_union;
- 		lang_statement_list_type tmplist;
--		lang_statement_list_type *old_stat_ptr = stat_ptr;
- 
- 		/* There is hidden state in "lang_add_assignment".  It
- 		   appends the new assignment statement to the stat_ptr
- 		   list.  Thus, we swap it before and after the call.  */
- 
--		tmplist.head = NULL;
--		tmplist.tail = &tmplist.head;
--
--		stat_ptr = &tmplist;
-+		lang_list_init (&tmplist);
-+		push_stat_ptr (&tmplist);
- 		/* Warning: side effect; statement appended to stat_ptr.  */
- 		assign_stmt = lang_add_assignment (assign_op);
- 		assign_union = (lang_statement_union_type *) assign_stmt;
--		stat_ptr = old_stat_ptr;
-+		pop_stat_ptr ();
- 
- 		assign_union->header.next = l;
- 		*(*stack_p)->iterloc.loc = assign_union;
-diff -Naur binutils-2.19.1.orig/ld/ldctor.c binutils-2.19.1/ld/ldctor.c
---- binutils-2.19.1.orig/ld/ldctor.c	2008-02-14 19:35:53.000000000 -0800
-+++ binutils-2.19.1/ld/ldctor.c	2009-03-02 05:56:19.000000000 -0800
-@@ -1,6 +1,7 @@
- /* ldctor.c -- constructor support routines
-    Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
--   2002, 2003, 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
-+   2002, 2003, 2004, 2006, 2007, 2008, 2009
-+   Free Software Foundation, Inc.
-    By Steve Chamberlain <sac@cygnus.com>
- 
-    This file is part of the GNU Binutils.
-@@ -198,7 +199,6 @@
- ldctor_build_sets (void)
- {
-   static bfd_boolean called;
--  lang_statement_list_type *old;
-   bfd_boolean header_printed;
-   struct set_info *p;
- 
-@@ -244,10 +244,8 @@
- 	}
-     }
- 
--  old = stat_ptr;
--  stat_ptr = &constructor_list;
--
--  lang_list_init (stat_ptr);
-+  lang_list_init (&constructor_list);
-+  push_stat_ptr (&constructor_list);
- 
-   header_printed = FALSE;
-   for (p = sets; p != NULL; p = p->next)
-@@ -372,5 +370,5 @@
-       lang_add_data (size, exp_intop (0));
-     }
- 
--  stat_ptr = old;
-+  pop_stat_ptr ();
- }
-diff -Naur binutils-2.19.1.orig/ld/ldemul.c binutils-2.19.1/ld/ldemul.c
---- binutils-2.19.1.orig/ld/ldemul.c	2008-02-14 19:35:53.000000000 -0800
-+++ binutils-2.19.1/ld/ldemul.c	2009-03-02 05:34:02.000000000 -0800
-@@ -120,10 +120,10 @@
- }
- 
- bfd_boolean
--ldemul_place_orphan (asection *s)
-+ldemul_place_orphan (asection *s, const char *name, int constraint)
- {
-   if (ld_emulation->place_orphan)
--    return (*ld_emulation->place_orphan) (s);
-+    return (*ld_emulation->place_orphan) (s, name, constraint);
-   return FALSE;
- }
- 
-diff -Naur binutils-2.19.1.orig/ld/ldemul.h binutils-2.19.1/ld/ldemul.h
---- binutils-2.19.1.orig/ld/ldemul.h	2007-07-06 07:09:41.000000000 -0700
-+++ binutils-2.19.1/ld/ldemul.h	2009-03-02 05:34:02.000000000 -0800
-@@ -59,7 +59,7 @@
- extern void ldemul_create_output_section_statements
-   (void);
- extern bfd_boolean ldemul_place_orphan
--  (asection *);
-+  (asection *, const char *, int);
- extern bfd_boolean ldemul_parse_args
-   (int, char **);
- extern void ldemul_add_options
-@@ -152,7 +152,7 @@
-      the default action should be taken.  This field may be NULL, in
-      which case the default action will always be taken.  */
-   bfd_boolean (*place_orphan)
--    (asection *);
-+    (asection *, const char *, int);
- 
-   /* Run after assigning parsing with the args, but before
-      reading the script.  Used to initialize symbols used in the script.  */
-diff -Naur binutils-2.19.1.orig/ld/ldexp.c binutils-2.19.1/ld/ldexp.c
---- binutils-2.19.1.orig/ld/ldexp.c	2008-08-21 06:10:54.000000000 -0700
-+++ binutils-2.19.1/ld/ldexp.c	2009-03-02 05:29:32.000000000 -0800
-@@ -282,6 +282,7 @@
- static void
- fold_binary (etree_type *tree)
- {
-+  etree_value_type lhs;
-   exp_fold_tree_1 (tree->binary.lhs);
- 
-   /* The SEGMENT_START operator is special because its first
-@@ -304,169 +305,167 @@
- 	    expld.result.section = expld.section;
- 	    break;
- 	  }
-+      return;
-     }
--  else if (expld.result.valid_p)
--    {
--      etree_value_type lhs = expld.result;
- 
--      exp_fold_tree_1 (tree->binary.rhs);
--      if (expld.result.valid_p)
--	{
--	  /* If the values are from different sections, or this is an
--	     absolute expression, make both the source arguments
--	     absolute.  However, adding or subtracting an absolute
--	     value from a relative value is meaningful, and is an
--	     exception.  */
--	  if (expld.section != bfd_abs_section_ptr
--	      && lhs.section == bfd_abs_section_ptr
--	      && tree->type.node_code == '+')
--	    {
--	      /* Keep the section of the rhs term.  */
--	      expld.result.value = lhs.value + expld.result.value;
--	      return;
--	    }
--	  else if (expld.section != bfd_abs_section_ptr
--		   && expld.result.section == bfd_abs_section_ptr
--		   && (tree->type.node_code == '+'
--		       || tree->type.node_code == '-'))
--	    {
--	      /* Keep the section of the lhs term.  */
--	      expld.result.section = lhs.section;
--	    }
--	  else if (expld.result.section != lhs.section
--		   || expld.section == bfd_abs_section_ptr)
--	    {
--	      make_abs ();
--	      lhs.value += lhs.section->vma;
--	    }
--
--	  switch (tree->type.node_code)
--	    {
--	    case '%':
--	      if (expld.result.value != 0)
--		expld.result.value = ((bfd_signed_vma) lhs.value
--				      % (bfd_signed_vma) expld.result.value);
--	      else if (expld.phase != lang_mark_phase_enum)
--		einfo (_("%F%S %% by zero\n"));
--	      break;
-+  lhs = expld.result;
-+  exp_fold_tree_1 (tree->binary.rhs);
-+  expld.result.valid_p &= lhs.valid_p;
- 
--	    case '/':
--	      if (expld.result.value != 0)
--		expld.result.value = ((bfd_signed_vma) lhs.value
--				      / (bfd_signed_vma) expld.result.value);
--	      else if (expld.phase != lang_mark_phase_enum)
--		einfo (_("%F%S / by zero\n"));
--	      break;
-+  if (expld.result.valid_p)
-+    {
-+      /* If the values are from different sections, or this is an
-+	 absolute expression, make both the source arguments
-+	 absolute.  However, adding or subtracting an absolute
-+	 value from a relative value is meaningful, and is an
-+	 exception.  */
-+      if (expld.section != bfd_abs_section_ptr
-+	  && lhs.section == bfd_abs_section_ptr
-+	  && tree->type.node_code == '+')
-+	{
-+	  /* Keep the section of the rhs term.  */
-+	  expld.result.value = lhs.value + expld.result.value;
-+	  return;
-+	}
-+      else if (expld.section != bfd_abs_section_ptr
-+	       && expld.result.section == bfd_abs_section_ptr
-+	       && (tree->type.node_code == '+'
-+		   || tree->type.node_code == '-'))
-+	{
-+	  /* Keep the section of the lhs term.  */
-+	  expld.result.section = lhs.section;
-+	}
-+      else if (expld.result.section != lhs.section
-+	       || expld.section == bfd_abs_section_ptr)
-+	{
-+	  make_abs ();
-+	  lhs.value += lhs.section->vma;
-+	}
-+
-+      switch (tree->type.node_code)
-+	{
-+	case '%':
-+	  if (expld.result.value != 0)
-+	    expld.result.value = ((bfd_signed_vma) lhs.value
-+				  % (bfd_signed_vma) expld.result.value);
-+	  else if (expld.phase != lang_mark_phase_enum)
-+	    einfo (_("%F%S %% by zero\n"));
-+	  break;
-+
-+	case '/':
-+	  if (expld.result.value != 0)
-+	    expld.result.value = ((bfd_signed_vma) lhs.value
-+				  / (bfd_signed_vma) expld.result.value);
-+	  else if (expld.phase != lang_mark_phase_enum)
-+	    einfo (_("%F%S / by zero\n"));
-+	  break;
- 
- #define BOP(x, y) \
- 	    case x:							\
- 	      expld.result.value = lhs.value y expld.result.value;	\
- 	      break;
- 
--	      BOP ('+', +);
--	      BOP ('*', *);
--	      BOP ('-', -);
--	      BOP (LSHIFT, <<);
--	      BOP (RSHIFT, >>);
--	      BOP (EQ, ==);
--	      BOP (NE, !=);
--	      BOP ('<', <);
--	      BOP ('>', >);
--	      BOP (LE, <=);
--	      BOP (GE, >=);
--	      BOP ('&', &);
--	      BOP ('^', ^);
--	      BOP ('|', |);
--	      BOP (ANDAND, &&);
--	      BOP (OROR, ||);
--
--	    case MAX_K:
--	      if (lhs.value > expld.result.value)
--		expld.result.value = lhs.value;
--	      break;
--
--	    case MIN_K:
--	      if (lhs.value < expld.result.value)
--		expld.result.value = lhs.value;
--	      break;
--
--	    case ALIGN_K:
--	      expld.result.value = align_n (lhs.value, expld.result.value);
--	      break;
--
--	    case DATA_SEGMENT_ALIGN:
--	      expld.dataseg.relro = exp_dataseg_relro_start;
--	      if (expld.phase != lang_first_phase_enum
--		  && expld.section == bfd_abs_section_ptr
--		  && (expld.dataseg.phase == exp_dataseg_none
--		      || expld.dataseg.phase == exp_dataseg_adjust
--		      || expld.dataseg.phase == exp_dataseg_relro_adjust
--		      || expld.phase == lang_final_phase_enum))
-+	  BOP ('+', +);
-+	  BOP ('*', *);
-+	  BOP ('-', -);
-+	  BOP (LSHIFT, <<);
-+	  BOP (RSHIFT, >>);
-+	  BOP (EQ, ==);
-+	  BOP (NE, !=);
-+	  BOP ('<', <);
-+	  BOP ('>', >);
-+	  BOP (LE, <=);
-+	  BOP (GE, >=);
-+	  BOP ('&', &);
-+	  BOP ('^', ^);
-+	  BOP ('|', |);
-+	  BOP (ANDAND, &&);
-+	  BOP (OROR, ||);
-+
-+	case MAX_K:
-+	  if (lhs.value > expld.result.value)
-+	    expld.result.value = lhs.value;
-+	  break;
-+
-+	case MIN_K:
-+	  if (lhs.value < expld.result.value)
-+	    expld.result.value = lhs.value;
-+	  break;
-+
-+	case ALIGN_K:
-+	  expld.result.value = align_n (lhs.value, expld.result.value);
-+	  break;
-+
-+	case DATA_SEGMENT_ALIGN:
-+	  expld.dataseg.relro = exp_dataseg_relro_start;
-+	  if (expld.phase != lang_first_phase_enum
-+	      && expld.section == bfd_abs_section_ptr
-+	      && (expld.dataseg.phase == exp_dataseg_none
-+		  || expld.dataseg.phase == exp_dataseg_adjust
-+		  || expld.dataseg.phase == exp_dataseg_relro_adjust
-+		  || expld.phase == lang_final_phase_enum))
-+	    {
-+	      bfd_vma maxpage = lhs.value;
-+	      bfd_vma commonpage = expld.result.value;
-+
-+	      expld.result.value = align_n (expld.dot, maxpage);
-+	      if (expld.dataseg.phase == exp_dataseg_relro_adjust)
-+		expld.result.value = expld.dataseg.base;
-+	      else if (expld.dataseg.phase != exp_dataseg_adjust)
- 		{
--		  bfd_vma maxpage = lhs.value;
--		  bfd_vma commonpage = expld.result.value;
--
--		  expld.result.value = align_n (expld.dot, maxpage);
--		  if (expld.dataseg.phase == exp_dataseg_relro_adjust)
--		    expld.result.value = expld.dataseg.base;
--		  else if (expld.dataseg.phase != exp_dataseg_adjust)
-+		  expld.result.value += expld.dot & (maxpage - 1);
-+		  if (expld.phase == lang_allocating_phase_enum)
- 		    {
--		      expld.result.value += expld.dot & (maxpage - 1);
--		      if (expld.phase == lang_allocating_phase_enum)
--			{
--			  expld.dataseg.phase = exp_dataseg_align_seen;
--			  expld.dataseg.min_base = expld.dot;
--			  expld.dataseg.base = expld.result.value;
--			  expld.dataseg.pagesize = commonpage;
--			  expld.dataseg.maxpagesize = maxpage;
--			  expld.dataseg.relro_end = 0;
--			}
-+		      expld.dataseg.phase = exp_dataseg_align_seen;
-+		      expld.dataseg.min_base = expld.dot;
-+		      expld.dataseg.base = expld.result.value;
-+		      expld.dataseg.pagesize = commonpage;
-+		      expld.dataseg.maxpagesize = maxpage;
-+		      expld.dataseg.relro_end = 0;
- 		    }
--		  else if (commonpage < maxpage)
--		    expld.result.value += ((expld.dot + commonpage - 1)
--					   & (maxpage - commonpage));
- 		}
--	      else
--		expld.result.valid_p = FALSE;
--	      break;
-+	      else if (commonpage < maxpage)
-+		expld.result.value += ((expld.dot + commonpage - 1)
-+				       & (maxpage - commonpage));
-+	    }
-+	  else
-+	    expld.result.valid_p = FALSE;
-+	  break;
- 
--	    case DATA_SEGMENT_RELRO_END:
--	      expld.dataseg.relro = exp_dataseg_relro_end;
--	      if (expld.phase != lang_first_phase_enum
--		  && (expld.dataseg.phase == exp_dataseg_align_seen
--		      || expld.dataseg.phase == exp_dataseg_adjust
--		      || expld.dataseg.phase == exp_dataseg_relro_adjust
--		      || expld.phase == lang_final_phase_enum))
-+	case DATA_SEGMENT_RELRO_END:
-+	  expld.dataseg.relro = exp_dataseg_relro_end;
-+	  if (expld.phase != lang_first_phase_enum
-+	      && (expld.dataseg.phase == exp_dataseg_align_seen
-+		  || expld.dataseg.phase == exp_dataseg_adjust
-+		  || expld.dataseg.phase == exp_dataseg_relro_adjust
-+		  || expld.phase == lang_final_phase_enum))
-+	    {
-+	      if (expld.dataseg.phase == exp_dataseg_align_seen
-+		  || expld.dataseg.phase == exp_dataseg_relro_adjust)
-+		expld.dataseg.relro_end = lhs.value + expld.result.value;
-+
-+	      if (expld.dataseg.phase == exp_dataseg_relro_adjust
-+		  && (expld.dataseg.relro_end
-+		      & (expld.dataseg.pagesize - 1)))
- 		{
--		  if (expld.dataseg.phase == exp_dataseg_align_seen
--		      || expld.dataseg.phase == exp_dataseg_relro_adjust)
--		    expld.dataseg.relro_end = lhs.value + expld.result.value;
--
--		  if (expld.dataseg.phase == exp_dataseg_relro_adjust
--		      && (expld.dataseg.relro_end
--			  & (expld.dataseg.pagesize - 1)))
--		    {
--		      expld.dataseg.relro_end += expld.dataseg.pagesize - 1;
--		      expld.dataseg.relro_end &= ~(expld.dataseg.pagesize - 1);
--		      expld.result.value = (expld.dataseg.relro_end
--					    - expld.result.value);
--		    }
--		  else
--		    expld.result.value = lhs.value;
--
--		  if (expld.dataseg.phase == exp_dataseg_align_seen)
--		    expld.dataseg.phase = exp_dataseg_relro_seen;
-+		  expld.dataseg.relro_end += expld.dataseg.pagesize - 1;
-+		  expld.dataseg.relro_end &= ~(expld.dataseg.pagesize - 1);
-+		  expld.result.value = (expld.dataseg.relro_end
-+					- expld.result.value);
- 		}
- 	      else
--		expld.result.valid_p = FALSE;
--	      break;
-+		expld.result.value = lhs.value;
- 
--	    default:
--	      FAIL ();
-+	      if (expld.dataseg.phase == exp_dataseg_align_seen)
-+		expld.dataseg.phase = exp_dataseg_relro_seen;
- 	    }
-+	  else
-+	    expld.result.valid_p = FALSE;
-+	  break;
-+
-+	default:
-+	  FAIL ();
- 	}
--      else
--	expld.result.valid_p = FALSE;
-     }
- }
- 
-diff -Naur binutils-2.19.1.orig/ld/ldlang.c binutils-2.19.1/ld/ldlang.c
---- binutils-2.19.1.orig/ld/ldlang.c	2008-09-06 21:02:30.000000000 -0700
-+++ binutils-2.19.1/ld/ldlang.c	2009-03-02 05:56:19.000000000 -0800
-@@ -1,6 +1,6 @@
- /* Linker command language support.
-    Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
--   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
-+   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-    Free Software Foundation, Inc.
- 
-    This file is part of the GNU Binutils.
-@@ -64,6 +64,8 @@
- static const char *output_target;
- static lang_statement_list_type statement_list;
- static struct bfd_hash_table lang_definedness_table;
-+static lang_statement_list_type *stat_save[10];
-+static lang_statement_list_type **stat_save_ptr = &stat_save[0];
- 
- /* Forward declarations.  */
- static void exp_init_os (etree_type *);
-@@ -193,7 +195,7 @@
-   return match;
- }
- 
--bfd_boolean
-+static bfd_boolean
- unique_section_p (const asection *sec)
- {
-   struct unique_sections *unam;
-@@ -925,6 +927,23 @@
-   list->tail = &list->head;
- }
- 
-+void
-+push_stat_ptr (lang_statement_list_type *new_ptr)
-+{
-+  if (stat_save_ptr >= stat_save + sizeof (stat_save) / sizeof (stat_save[0]))
-+    abort ();
-+  *stat_save_ptr++ = stat_ptr;
-+  stat_ptr = new_ptr;
-+}
-+
-+void
-+pop_stat_ptr (void)
-+{
-+  if (stat_save_ptr <= stat_save)
-+    abort ();
-+  stat_ptr = *--stat_save_ptr;
-+}
-+
- /* Build a new statement node for the parse tree.  */
- 
- static lang_statement_union_type *
-@@ -1278,19 +1297,25 @@
-       struct out_section_hash_entry *last_ent;
-       unsigned long hash = entry->root.hash;
- 
--      do
--	{
--	  if (entry->s.output_section_statement.constraint >= 0
--	      && (constraint == 0
--		  || (constraint == entry->s.output_section_statement.constraint
--		      && constraint != SPECIAL)))
--	    return &entry->s.output_section_statement;
--	  last_ent = entry;
--	  entry = (struct out_section_hash_entry *) entry->root.next;
--	}
--      while (entry != NULL
--	     && entry->root.hash == hash
--	     && strcmp (name, entry->s.output_section_statement.name) == 0);
-+      if (create && constraint == SPECIAL)
-+	/* Not traversing to the end reverses the order of the second
-+	   and subsequent SPECIAL sections in the hash table chain,
-+	   but that shouldn't matter.  */
-+	last_ent = entry;
-+      else
-+	do
-+	  {
-+	    if (entry->s.output_section_statement.constraint >= 0
-+		&& (constraint == 0
-+		    || (constraint
-+			== entry->s.output_section_statement.constraint)))
-+	      return &entry->s.output_section_statement;
-+	    last_ent = entry;
-+	    entry = (struct out_section_hash_entry *) entry->root.next;
-+	  }
-+	while (entry != NULL
-+	       && entry->root.hash == hash
-+	       && strcmp (name, entry->s.output_section_statement.name) == 0);
- 
-       if (!create)
- 	return NULL;
-@@ -1556,28 +1581,24 @@
- lang_output_section_statement_type *
- lang_insert_orphan (asection *s,
- 		    const char *secname,
-+		    int constraint,
- 		    lang_output_section_statement_type *after,
- 		    struct orphan_save *place,
- 		    etree_type *address,
- 		    lang_statement_list_type *add_child)
- {
--  lang_statement_list_type *old;
-   lang_statement_list_type add;
-   const char *ps;
-   lang_output_section_statement_type *os;
-   lang_output_section_statement_type **os_tail;
- 
--  /* Start building a list of statements for this section.
--     First save the current statement pointer.  */
--  old = stat_ptr;
--
-   /* If we have found an appropriate place for the output section
-      statements for this orphan, add them to our own private list,
-      inserting them later into the global statement list.  */
-   if (after != NULL)
-     {
--      stat_ptr = &add;
--      lang_list_init (stat_ptr);
-+      lang_list_init (&add);
-+      push_stat_ptr (&add);
-     }
- 
-   ps = NULL;
-@@ -1611,7 +1632,7 @@
-   os_tail = ((lang_output_section_statement_type **)
- 	     lang_output_section_statement.tail);
-   os = lang_enter_output_section_statement (secname, address, 0, NULL, NULL,
--					    NULL, 0);
-+					    NULL, constraint);
- 
-   if (add_child == NULL)
-     add_child = &os->children;
-@@ -1623,11 +1644,6 @@
-     {
-       char *symname;
- 
--      /* lang_leave_ouput_section_statement resets stat_ptr.
--	 Put stat_ptr back where we want it.  */
--      if (after != NULL)
--	stat_ptr = &add;
--
-       symname = (char *) xmalloc (ps - secname + sizeof "__stop_" + 1);
-       symname[0] = bfd_get_symbol_leading_char (link_info.output_bfd);
-       sprintf (symname + (symname[0] != 0), "__stop_%s", secname);
-@@ -1638,7 +1654,7 @@
- 
-   /* Restore the global list pointer.  */
-   if (after != NULL)
--    stat_ptr = old;
-+    pop_stat_ptr ();
- 
-   if (after != NULL && os->bfd_section != NULL)
-     {
-@@ -1724,8 +1740,8 @@
- 
- 	  /* Fix the global list pointer if we happened to tack our
- 	     new list at the tail.  */
--	  if (*old->tail == add.head)
--	    old->tail = add.tail;
-+	  if (*stat_ptr->tail == add.head)
-+	    stat_ptr->tail = add.tail;
- 
- 	  /* Save the end of this list.  */
- 	  place->stmt = add.tail;
-@@ -1914,10 +1930,11 @@
-   if (strcmp (s->name, DISCARD_SECTION_NAME) == 0)
-     einfo (_("%P%F: Illegal use of `%s' section\n"), DISCARD_SECTION_NAME);
- 
--  s->bfd_section = bfd_get_section_by_name (link_info.output_bfd, s->name);
-+  if (s->constraint != SPECIAL)
-+    s->bfd_section = bfd_get_section_by_name (link_info.output_bfd, s->name);
-   if (s->bfd_section == NULL)
--    s->bfd_section = bfd_make_section_with_flags (link_info.output_bfd,
--						  s->name, flags);
-+    s->bfd_section = bfd_make_section_anyway_with_flags (link_info.output_bfd,
-+							 s->name, flags);
-   if (s->bfd_section == NULL)
-     {
-       einfo (_("%P%F: output format %s cannot represent section called %s\n"),
-@@ -2455,8 +2472,6 @@
-       && ! bfd_check_format_matches (entry->the_bfd, bfd_object, &matching))
-     {
-       bfd_error_type err;
--      lang_statement_list_type *hold;
--      bfd_boolean bad_load = TRUE;
-       bfd_boolean save_ldlang_sysrooted_script;
-       bfd_boolean save_as_needed, save_add_needed;
- 
-@@ -2479,8 +2494,6 @@
-       else if (err != bfd_error_file_not_recognized
- 	       || place == NULL)
- 	einfo (_("%F%B: file not recognized: %E\n"), entry->the_bfd);
--      else
--	bad_load = FALSE;
- 
-       bfd_close (entry->the_bfd);
-       entry->the_bfd = NULL;
-@@ -2488,8 +2501,7 @@
-       /* Try to interpret the file as a linker script.  */
-       ldfile_open_command_file (entry->filename);
- 
--      hold = stat_ptr;
--      stat_ptr = place;
-+      push_stat_ptr (place);
-       save_ldlang_sysrooted_script = ldlang_sysrooted_script;
-       ldlang_sysrooted_script = entry->sysrooted;
-       save_as_needed = as_needed;
-@@ -2508,9 +2520,9 @@
-       ldlang_sysrooted_script = save_ldlang_sysrooted_script;
-       as_needed = save_as_needed;
-       add_needed = save_add_needed;
--      stat_ptr = hold;
-+      pop_stat_ptr ();
- 
--      return ! bad_load;
-+      return TRUE;
-     }
- 
-   if (ldemul_recognized_file (entry))
-@@ -2982,6 +2994,7 @@
- 	case lang_input_statement_enum:
- 	  if (s->input_statement.real)
- 	    {
-+	      lang_statement_union_type **os_tail;
- 	      lang_statement_list_type add;
- 
- 	      s->input_statement.target = current_target;
-@@ -2997,6 +3010,7 @@
- 				       bfd_archive))
- 		s->input_statement.loaded = FALSE;
- 
-+	      os_tail = lang_output_section_statement.tail;
- 	      lang_list_init (&add);
- 
- 	      if (! load_symbols (&s->input_statement, &add))
-@@ -3004,8 +3018,25 @@
- 
- 	      if (add.head != NULL)
- 		{
--		  *add.tail = s->header.next;
--		  s->header.next = add.head;
-+		  /* If this was a script with output sections then
-+		     tack any added statements on to the end of the
-+		     list.  This avoids having to reorder the output
-+		     section statement list.  Very likely the user
-+		     forgot -T, and whatever we do here will not meet
-+		     naive user expectations.  */
-+		  if (os_tail != lang_output_section_statement.tail)
-+		    {
-+		      einfo (_("%P: warning: %s contains output sections;"
-+			       " did you forget -T?\n"),
-+			     s->input_statement.filename);
-+		      *stat_ptr->tail = add.head;
-+		      stat_ptr->tail = add.tail;
-+		    }
-+		  else
-+		    {
-+		      *add.tail = s->header.next;
-+		      s->header.next = add.head;
-+		    }
- 		}
- 	    }
- 	  break;
-@@ -5652,14 +5683,22 @@
- 					default_common_section);
- 		    }
- 		}
--	      else if (ldemul_place_orphan (s))
--		;
- 	      else
- 		{
--		  lang_output_section_statement_type *os;
-+		  const char *name = s->name;
-+		  int constraint = 0;
- 
--		  os = lang_output_section_statement_lookup (s->name, 0, TRUE);
--		  lang_add_section (&os->children, s, os);
-+		  if (config.unique_orphan_sections || unique_section_p (s))
-+		    constraint = SPECIAL;
-+
-+		  if (!ldemul_place_orphan (s, name, constraint))
-+		    {
-+		      lang_output_section_statement_type *os;
-+		      os = lang_output_section_statement_lookup (name,
-+								 constraint,
-+								 TRUE);
-+		      lang_add_section (&os->children, s, os);
-+		    }
- 		}
- 	    }
- 	}
-@@ -5821,7 +5860,7 @@
-   os->block_value = 1;
- 
-   /* Make next things chain into subchain of this.  */
--  stat_ptr = &os->children;
-+  push_stat_ptr (&os->children);
- 
-   os->subsection_alignment =
-     topower (exp_get_value_int (subalign, -1, "subsection alignment"));
-@@ -6430,7 +6469,7 @@
- 		    current_section->addr_tree != NULL);
-   current_section->fill = fill;
-   current_section->phdrs = phdrs;
--  stat_ptr = &statement_list;
-+  pop_stat_ptr ();
- }
- 
- /* Create an absolute symbol with the given name with the value of the
-@@ -6547,7 +6586,7 @@
- 
-   g = new_stat (lang_group_statement, stat_ptr);
-   lang_list_init (&g->children);
--  stat_ptr = &g->children;
-+  push_stat_ptr (&g->children);
- }
- 
- /* Leave a group.  This just resets stat_ptr to start writing to the
-@@ -6558,7 +6597,7 @@
- void
- lang_leave_group (void)
- {
--  stat_ptr = &statement_list;
-+  pop_stat_ptr ();
- }
- 
- /* Add a new program header.  This is called for each entry in a PHDRS
-diff -Naur binutils-2.19.1.orig/ld/ldlang.h binutils-2.19.1/ld/ldlang.h
---- binutils-2.19.1.orig/ld/ldlang.h	2008-09-06 21:02:30.000000000 -0700
-+++ binutils-2.19.1/ld/ldlang.h	2009-03-02 05:56:19.000000000 -0800
-@@ -1,6 +1,6 @@
- /* ldlang.h - linker command language support
-    Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
--   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
-+   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-    Free Software Foundation, Inc.
- 
-    This file is part of the GNU Binutils.
-@@ -536,7 +536,7 @@
-   (const asection *, lang_output_section_statement_type **,
-    lang_match_sec_type_func);
- extern lang_output_section_statement_type *lang_insert_orphan
--  (asection *, const char *, lang_output_section_statement_type *,
-+  (asection *, const char *, int, lang_output_section_statement_type *,
-    struct orphan_save *, etree_type *, lang_statement_list_type *);
- extern lang_input_statement_type *lang_add_input_file
-   (const char *, lang_input_file_enum_type, const char *);
-@@ -550,6 +550,10 @@
-   (const char *, const char *, const char *, int);
- extern void lang_list_init
-   (lang_statement_list_type *);
-+extern void push_stat_ptr
-+  (lang_statement_list_type *);
-+extern void pop_stat_ptr
-+  (void);
- extern void lang_add_data
-   (int type, union etree_union *);
- extern void lang_add_reloc
-@@ -604,8 +608,6 @@
- extern void lang_append_dynamic_list (struct bfd_elf_version_expr *);
- extern void lang_append_dynamic_list_cpp_typeinfo (void);
- extern void lang_append_dynamic_list_cpp_new (void);
--bfd_boolean unique_section_p
--  (const asection *);
- extern void lang_add_unique
-   (const char *);
- extern const char *lang_get_output_target
-diff -Naur binutils-2.19.1.orig/ld/testsuite/ChangeLog binutils-2.19.1/ld/testsuite/ChangeLog
---- binutils-2.19.1.orig/ld/testsuite/ChangeLog	2009-01-14 01:04:14.000000000 -0800
-+++ binutils-2.19.1/ld/testsuite/ChangeLog	2009-03-02 05:53:31.000000000 -0800
-@@ -1,3 +1,26 @@
-+2009-03-02  Alan Modra  <amodra@bigpond.net.au>
-+
-+	2009-02-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
-+	* ld-elf/eh-group2.s: New `.cfi_lsda' referencing `.gcc_except_table'.
-+	* ld-elf/eh-group.exp: New test and conditional defininiton of `ELF64'.
-+
-+	2009-01-26  Nathan Sidwell  <nathan@codesourcery.com>
-+	* ld-powerpc/powerpc.exp: Add vxworks relax testcase.
-+	* ld-powerpc/vxworks-relax.s, ld-powerpc/vxworks-relax.rd: New.
-+	* ld-powerpc/vxworks1.ld: Add .pad and .far input sections.
-+	* ld-powerpc/vxworks1.rd: Correct regexp for undefined symbols.
-+
-+	2009-01-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
-+	* ld-elf/linkoncerdiff.d, ld-elf/linkoncerdiff1.s,
-+	ld-elf/linkoncerdiff2.s: New.
-+
-+	2008-10-10  Nathan Froyd  <froydnj@codesourcery.com>
-+	* ld-powerpc/attr-gnu-12-1.s: New file.
-+	* ld-powerpc/attr-gnu-12-2.s: New file.
-+	* ld-powerpc/attr-gnu-12-11.d: New file.
-+	* ld-powerpc/attr-gnu-12-21.d: New file.
-+	* ld-powerpc/powerpc.exp: Run new dump tests.
-+
- 2009-01-14  Joseph Myers  <joseph@codesourcery.com>
- 
- 	* ld-arm/thumb2-bl-undefweak.d, ld-arm/thumb2-bl-undefweak.s: New.
-diff -Naur binutils-2.19.1.orig/ld/testsuite/ld-elf/eh-group2.s binutils-2.19.1/ld/testsuite/ld-elf/eh-group2.s
---- binutils-2.19.1.orig/ld/testsuite/ld-elf/eh-group2.s	2008-10-02 03:10:26.000000000 -0700
-+++ binutils-2.19.1/ld/testsuite/ld-elf/eh-group2.s	2009-03-02 05:53:31.000000000 -0800
-@@ -1,4 +1,15 @@
- 	.section	sect, "axG", %progbits, sectgroup, comdat
- 	.cfi_startproc
-+# Test intention is that LSDA must be provided by the discarded FDE.
-+# DW_EH_PE_udata8 = 4
-+# DW_EH_PE_udata4 = 3
-+	.ifdef		ELF64
-+	.cfi_lsda 4, lsda
-+	.else
-+	.cfi_lsda 3, lsda
-+	.endif
- 	.skip 16
- 	.cfi_endproc
-+
-+	.section	.gcc_except_table, "a", %progbits
-+lsda:
-diff -Naur binutils-2.19.1.orig/ld/testsuite/ld-elf/eh-group.exp binutils-2.19.1/ld/testsuite/ld-elf/eh-group.exp
---- binutils-2.19.1.orig/ld/testsuite/ld-elf/eh-group.exp	2008-10-02 03:10:26.000000000 -0700
-+++ binutils-2.19.1/ld/testsuite/ld-elf/eh-group.exp	2009-03-02 05:53:31.000000000 -0800
-@@ -35,12 +35,28 @@
-     return
- }
- 
--set build_tests_ld {
--  {"Build eh-group1.o"
--   "-r" ""
--   {eh-group1.s eh-group2.s} {} "eh-group.o"}
-+# alpha-linux-gnu does not support 64-bit relocations:
-+#   relocation truncated to fit: REFLONG against `.gcc_except_table'
-+# arm-eabi does not support 64-bit relocations:
-+#   bad relocation fixup type (1)
-+set testname "Guess the target size from eh-group1size.o"
-+if [ld_assemble $as "$srcdir/$subdir/eh-group1.s" "tmpdir/eh-group1size.o"] {
-+    pass $testname
-+} else {
-+    fail $testname
- }
- 
-+set as_options ""
-+if [is_elf64 "tmpdir/eh-group1size.o"] {
-+    set as_options "$as_options --defsym ELF64=1"
-+}
-+
-+set build_tests_ld [list			\
-+  [list "Build eh-group1.o"			\
-+   "-r" "$as_options"				\
-+   {eh-group1.s eh-group2.s} {} "eh-group.o"]	\
-+]
-+
- run_ld_link_tests $build_tests_ld
- 
- set testname "Link eh-group.o to eh-group"
-diff -Naur binutils-2.19.1.orig/ld/testsuite/ld-elf/linkoncerdiff1.s binutils-2.19.1/ld/testsuite/ld-elf/linkoncerdiff1.s
---- binutils-2.19.1.orig/ld/testsuite/ld-elf/linkoncerdiff1.s	1969-12-31 16:00:00.000000000 -0800
-+++ binutils-2.19.1/ld/testsuite/ld-elf/linkoncerdiff1.s	2009-03-02 05:48:42.000000000 -0800
-@@ -0,0 +1,7 @@
-+	.section	.gnu.linkonce.t.foo, "a", %progbits
-+	.globl	symfoo
-+symfoo:
-+
-+	.section	.gnu.linkonce.t.bar, "a", %progbits
-+	.globl	symbar
-+symbar:
-diff -Naur binutils-2.19.1.orig/ld/testsuite/ld-elf/linkoncerdiff2.s binutils-2.19.1/ld/testsuite/ld-elf/linkoncerdiff2.s
---- binutils-2.19.1.orig/ld/testsuite/ld-elf/linkoncerdiff2.s	1969-12-31 16:00:00.000000000 -0800
-+++ binutils-2.19.1/ld/testsuite/ld-elf/linkoncerdiff2.s	2009-03-02 05:48:42.000000000 -0800
-@@ -0,0 +1,22 @@
-+	.section	.gnu.linkonce.t.foo, "a", %progbits
-+1:
-+	.globl	symfoo
-+symfoo:
-+	.long	0
-+
-+	.section	.gnu.linkonce.t.bar, "a", %progbits
-+2:
-+	.globl	symbar
-+symbar:
-+	.long	0
-+
-+	.section	.gnu.linkonce.r.foo, "a", %progbits
-+	.long	1b
-+	.long	symfoo
-+/* ld currently incorrectly silently discards this relocation.  Just such
-+   relocations are never produced by g++-3.4 so this suppressed error message
-+   is not a problem:
-+   #error: `.gnu.linkonce.t.bar' referenced in section `.gnu.linkonce.r.foo' of tmpdir/dump1.o: defined in discarded section `.gnu.linkonce.t.bar' of tmpdir/dump1.o
-+   */
-+	.long	2b
-+	.long	symbar
-diff -Naur binutils-2.19.1.orig/ld/testsuite/ld-elf/linkoncerdiff.d binutils-2.19.1/ld/testsuite/ld-elf/linkoncerdiff.d
---- binutils-2.19.1.orig/ld/testsuite/ld-elf/linkoncerdiff.d	1969-12-31 16:00:00.000000000 -0800
-+++ binutils-2.19.1/ld/testsuite/ld-elf/linkoncerdiff.d	2009-03-02 05:48:42.000000000 -0800
-@@ -0,0 +1,6 @@
-+#source: linkoncerdiff1.s
-+#source: linkoncerdiff2.s
-+#ld: -r
-+#readelf: -r
-+There are no relocations in this file.
-+#pass
-diff -Naur binutils-2.19.1.orig/ld/testsuite/ld-powerpc/attr-gnu-12-11.d binutils-2.19.1/ld/testsuite/ld-powerpc/attr-gnu-12-11.d
---- binutils-2.19.1.orig/ld/testsuite/ld-powerpc/attr-gnu-12-11.d	1969-12-31 16:00:00.000000000 -0800
-+++ binutils-2.19.1/ld/testsuite/ld-powerpc/attr-gnu-12-11.d	2009-03-02 05:37:44.000000000 -0800
-@@ -0,0 +1,10 @@
-+#source: attr-gnu-12-1.s
-+#source: attr-gnu-12-1.s
-+#as: -a32
-+#ld: -r -melf32ppc
-+#readelf: -A
-+#target: powerpc*-*-*
-+
-+Attribute Section: gnu
-+File Attributes
-+  Tag_GNU_Power_ABI_Struct_Return: r3/r4
-diff -Naur binutils-2.19.1.orig/ld/testsuite/ld-powerpc/attr-gnu-12-1.s binutils-2.19.1/ld/testsuite/ld-powerpc/attr-gnu-12-1.s
---- binutils-2.19.1.orig/ld/testsuite/ld-powerpc/attr-gnu-12-1.s	1969-12-31 16:00:00.000000000 -0800
-+++ binutils-2.19.1/ld/testsuite/ld-powerpc/attr-gnu-12-1.s	2009-03-02 05:37:44.000000000 -0800
-@@ -0,0 +1 @@
-+.gnu_attribute 12,1
-diff -Naur binutils-2.19.1.orig/ld/testsuite/ld-powerpc/attr-gnu-12-21.d binutils-2.19.1/ld/testsuite/ld-powerpc/attr-gnu-12-21.d
---- binutils-2.19.1.orig/ld/testsuite/ld-powerpc/attr-gnu-12-21.d	1969-12-31 16:00:00.000000000 -0800
-+++ binutils-2.19.1/ld/testsuite/ld-powerpc/attr-gnu-12-21.d	2009-03-02 05:37:44.000000000 -0800
-@@ -0,0 +1,6 @@
-+#source: attr-gnu-12-2.s
-+#source: attr-gnu-12-1.s
-+#as: -a32
-+#ld: -r -melf32ppc
-+#warning: Warning: .* uses r3/r4 for small structure returns, .* uses memory
-+#target: powerpc*-*-*
-diff -Naur binutils-2.19.1.orig/ld/testsuite/ld-powerpc/attr-gnu-12-2.s binutils-2.19.1/ld/testsuite/ld-powerpc/attr-gnu-12-2.s
---- binutils-2.19.1.orig/ld/testsuite/ld-powerpc/attr-gnu-12-2.s	1969-12-31 16:00:00.000000000 -0800
-+++ binutils-2.19.1/ld/testsuite/ld-powerpc/attr-gnu-12-2.s	2009-03-02 05:37:44.000000000 -0800
-@@ -0,0 +1 @@
-+.gnu_attribute 12,2
-diff -Naur binutils-2.19.1.orig/ld/testsuite/ld-powerpc/powerpc.exp binutils-2.19.1/ld/testsuite/ld-powerpc/powerpc.exp
---- binutils-2.19.1.orig/ld/testsuite/ld-powerpc/powerpc.exp	2008-07-26 06:10:48.000000000 -0700
-+++ binutils-2.19.1/ld/testsuite/ld-powerpc/powerpc.exp	2009-03-02 05:52:34.000000000 -0800
-@@ -49,6 +49,11 @@
- 	 "-mregnames" {vxworks2.s}
- 	 {{readelf --segments vxworks2-static.sd}}
- 	 "vxworks2"}
-+	{"VxWorks relax test"
-+	 "-Tvxworks1.ld --relax -q"
-+	 "-mregnames" {vxworks-relax.s}
-+	 {{readelf --relocs vxworks-relax.rd}}
-+	 "vxworks-relax"}
-     }
-     run_ld_link_tests $ppcvxtests
-     run_dump_test "vxworks1-static"
-@@ -177,3 +182,6 @@
- run_dump_test "attr-gnu-8-11"
- run_dump_test "attr-gnu-8-23"
- run_dump_test "attr-gnu-8-31"
-+
-+run_dump_test "attr-gnu-12-11"
-+run_dump_test "attr-gnu-12-21"
-diff -Naur binutils-2.19.1.orig/ld/testsuite/ld-powerpc/vxworks1.ld binutils-2.19.1/ld/testsuite/ld-powerpc/vxworks1.ld
---- binutils-2.19.1.orig/ld/testsuite/ld-powerpc/vxworks1.ld	2007-05-15 05:22:34.000000000 -0700
-+++ binutils-2.19.1/ld/testsuite/ld-powerpc/vxworks1.ld	2009-03-02 05:52:34.000000000 -0800
-@@ -14,7 +14,7 @@
-   .plt : { *(.plt) }
- 
-   . = ALIGN (0x400);
--  .text : { *(.text) }
-+  .text : { *(.text) *(.pad) *(.far) }
- 
-   . = ALIGN (0x10000);
-   .dynamic : { *(.dynamic) }
-diff -Naur binutils-2.19.1.orig/ld/testsuite/ld-powerpc/vxworks1.rd binutils-2.19.1/ld/testsuite/ld-powerpc/vxworks1.rd
---- binutils-2.19.1.orig/ld/testsuite/ld-powerpc/vxworks1.rd	2006-03-02 07:16:27.000000000 -0800
-+++ binutils-2.19.1/ld/testsuite/ld-powerpc/vxworks1.rd	2009-03-02 05:52:34.000000000 -0800
-@@ -1,8 +1,8 @@
- 
- Relocation section '\.rela\.plt' at offset .* contains 2 entries:
-  Offset     Info    Type            Sym\.Value  Sym\. Name \+ Addend
--0009040c  .*15 R_PPC_JMP_SLOT    00080820   sglobal \+ 0
--00090410  .*15 R_PPC_JMP_SLOT    00080840   foo \+ 0
-+0009040c  .*15 R_PPC_JMP_SLOT    00000000   sglobal \+ 0
-+00090410  .*15 R_PPC_JMP_SLOT    00000000   foo \+ 0
- 
- Relocation section '\.rela\.text' at offset .* contains 3 entries:
-  Offset     Info    Type            Sym\.Value  Sym\. Name \+ Addend
-diff -Naur binutils-2.19.1.orig/ld/testsuite/ld-powerpc/vxworks-relax.rd binutils-2.19.1/ld/testsuite/ld-powerpc/vxworks-relax.rd
---- binutils-2.19.1.orig/ld/testsuite/ld-powerpc/vxworks-relax.rd	1969-12-31 16:00:00.000000000 -0800
-+++ binutils-2.19.1/ld/testsuite/ld-powerpc/vxworks-relax.rd	2009-03-02 05:52:34.000000000 -0800
-@@ -0,0 +1,9 @@
-+
-+Relocation section '.rela.text' at offset 0x4010150 contains 6 entries:
-+ Offset     Info    Type            Sym.Value  Sym. Name \+ Addend
-+00080012  00000106 R_PPC_ADDR16_HA   00080000   .text \+ 4000020
-+00080016  00000104 R_PPC_ADDR16_LO   00080000   .text \+ 4000020
-+00080006  00000106 R_PPC_ADDR16_HA   00080000   .text \+ 4000020
-+0008000a  00000104 R_PPC_ADDR16_LO   00080000   .text \+ 4000020
-+0408002a  00000306 R_PPC_ADDR16_HA   00080000   _start \+ 0
-+0408002e  00000304 R_PPC_ADDR16_LO   00080000   _start \+ 0
-diff -Naur binutils-2.19.1.orig/ld/testsuite/ld-powerpc/vxworks-relax.s binutils-2.19.1/ld/testsuite/ld-powerpc/vxworks-relax.s
---- binutils-2.19.1.orig/ld/testsuite/ld-powerpc/vxworks-relax.s	1969-12-31 16:00:00.000000000 -0800
-+++ binutils-2.19.1/ld/testsuite/ld-powerpc/vxworks-relax.s	2009-03-02 05:52:34.000000000 -0800
-@@ -0,0 +1,13 @@
-+	.globl	_start
-+_start:
-+	bl	elsewhere
-+	lis 9,elsewhere@ha
-+        la 0,elsewhere@l(9)
-+
-+
-+	.section .far,"ax",@progbits
-+elsewhere:
-+	bl	_start
-+
-+	.section .pad
-+	.space 0x4000000
-diff -Naur binutils-2.19.1.orig/opcodes/ChangeLog binutils-2.19.1/opcodes/ChangeLog
---- binutils-2.19.1.orig/opcodes/ChangeLog	2008-12-23 05:54:52.000000000 -0800
-+++ binutils-2.19.1/opcodes/ChangeLog	2009-03-03 17:08:22.000000000 -0800
-@@ -1,3 +1,93 @@
-+2009-03-03  Peter Bergner  <bergner@vnet.ibm.com>
-+
-+	* ppc-opc.c (powerpc_opcodes): Reorder the opcode table so that
-+	instructions from newer processors are listed before older ones.
-+
-+2009-03-02  Alan Modra  <amodra@bigpond.net.au>
-+
-+	2009-02-26  Peter Bergner  <bergner@vnet.ibm.com>
-+	* ppc-dis.c (powerpc_init_dialect): Extend -Mpower7 to disassemble
-+	the power7 and the isel instructions.
-+	* ppc-opc.c (insert_xc6, extract_xc6): New static functions.
-+	(insert_dm, extract_dm): Likewise.
-+	(XB6): Update comment to include XX2 form.
-+	(WC, XC6, SHW, DMEX, UIM, XX2, XX3RC, XX4, XX2_MASK, XX2UIM_MASK,
-+	XX2BF_MASK, XX3BF_MASK, XX3SHW_MASK, XX4_MASK, XWC_MASK, POWER7): New.
-+	(RemoveXX3DM): Delete.
-+	(powerpc_opcodes): <"lfdp", "lfdpx", "mcrxr", "mftb", "mffgpr",
-+	"mftgpr">: Deprecate for POWER7.
-+	<"fres", "fres.", "frsqrtes", "frsqrtes.", "fre", "fre.", "frsqrte",
-+	"frsqrte.">: Deprecate the three operand form and enable the two
-+	operand form for POWER7 and later.
-+	<"wait">: Extend to accept optional parameter.  Enable for POWER7.
-+	<"waitsrv", "waitimpl">: Add extended opcodes.
-+	<"ldbrx", "stdbrx">: Enable for POWER7.
-+	<"cdtbcd", "cbcdtd", "addg6s">: Add POWER6 opcodes.
-+	<"bpermd", "dcbtstt", "dcbtt", "dcffix.", "dcffix", "divde.", "divde",
-+	"divdeo.", "divdeo", "divdeu.", "divdeu", "divdeuo.", "divdeuo",
-+	"divwe.", "divwe", "divweo.", "divweo", "divweu.", "divweu", "divweuo.",
-+	"divweuo", "fcfids.", "fcfids", "fcfidu.", "fcfidu", "fcfidus.",
-+	"fcfidus", "fctidu.", "fctidu", "fctiduz.", "fctiduz", "fctiwu.",
-+	"fctiwu", "fctiwuz.", "fctiwuz", "ftdiv", "ftsqrt", "lbarx", "lfiwzx",
-+	"lharx", "popcntd", "popcntw", "stbcx.", "sthcx.">: Add POWER7 opcodes.
-+	<"lxsdux", "lxsdx", "lxvdsx", "lxvw4ux", "lxvw4x", "stxsdux", "stxsdx",
-+	"stxvw4ux", "stxvw4x", "xsabsdp", "xsadddp", "xscmpodp", "xscmpudp",
-+	"xscpsgndp", "xscvdpsp", "xscvdpsxds", "xscvdpsxws", "xscvdpuxds",
-+	"xscvdpuxws", "xscvspdp", "xscvsxddp", "xscvuxddp", "xsdivdp",
-+	"xsmaddadp", "xsmaddmdp", "xsmaxdp", "xsmindp", "xsmsubadp",
-+	"xsmsubmdp", "xsmuldp", "xsnabsdp", "xsnegdp", "xsnmaddadp",
-+	"xsnmaddmdp", "xsnmsubadp", "xsnmsubmdp", "xsrdpi", "xsrdpic",
-+	"xsrdpim", "xsrdpip", "xsrdpiz", "xsredp", "xsrsqrtedp", "xssqrtdp",
-+	"xssubdp", "xstdivdp", "xstsqrtdp", "xvabsdp", "xvabssp", "xvadddp",
-+	"xvaddsp", "xvcmpeqdp.", "xvcmpeqdp", "xvcmpeqsp.", "xvcmpeqsp",
-+	"xvcmpgedp.", "xvcmpgedp", "xvcmpgesp.", "xvcmpgesp", "xvcmpgtdp.",
-+	"xvcmpgtdp", "xvcmpgtsp.", "xvcmpgtsp", "xvcpsgnsp", "xvcvdpsp",
-+	"xvcvdpsxds", "xvcvdpsxws", "xvcvdpuxds", "xvcvdpuxws", "xvcvspdp",
-+	"xvcvspsxds", "xvcvspsxws", "xvcvspuxds", "xvcvspuxws", "xvcvsxddp",
-+	"xvcvsxdsp", "xvcvsxwdp", "xvcvsxwsp", "xvcvuxddp", "xvcvuxdsp",
-+	"xvcvuxwdp", "xvcvuxwsp", "xvdivdp", "xvdivsp", "xvmaddadp",
-+	"xvmaddasp", "xvmaddmdp", "xvmaddmsp", "xvmaxdp", "xvmaxsp",
-+	"xvmindp", "xvminsp", "xvmovsp", "xvmsubadp", "xvmsubasp", "xvmsubmdp",
-+	"xvmsubmsp", "xvmuldp", "xvmulsp", "xvnabsdp", "xvnabssp", "xvnegdp",
-+	"xvnegsp", "xvnmaddadp", "xvnmaddasp", "xvnmaddmdp", "xvnmaddmsp",
-+	"xvnmsubadp", "xvnmsubasp", "xvnmsubmdp", "xvnmsubmsp", "xvrdpi",
-+	"xvrdpic", "xvrdpim", "xvrdpip", "xvrdpiz", "xvredp", "xvresp",
-+	"xvrspi", "xvrspic", "xvrspim", "xvrspip", "xvrspiz", "xvrsqrtedp",
-+	"xvrsqrtesp", "xvsqrtdp", "xvsqrtsp", "xvsubdp", "xvsubsp", "xvtdivdp",
-+	"xvtdivsp", "xvtsqrtdp", "xvtsqrtsp", "xxland", "xxlandc", "xxlnor",
-+	"xxlor", "xxlxor", "xxmrghw", "xxmrglw", "xxsel", "xxsldwi", "xxspltd",
-+	"xxspltw", "xxswapd">: Add VSX opcodes.
-+
-+	2009-02-19  Peter Bergner  <bergner@vnet.ibm.com>
-+	* ppc-opc.c (powerpc_opcodes) <"lfdepx", "stfdepx">: Fix the first
-+	operand to be a float point register (FRT/FRS).
-+
-+	2009-02-05  Peter Bergner  <bergner@vnet.ibm.com>
-+	* ppc-opc.c: Update copyright year.
-+	(powerpc_opcodes) <"dcbt", "dcbtst">: Deprecate the Embedded operand
-+	ordering for POWER4 and later and use the correct Server ordering.
-+
-+	2009-01-14  Peter Bergner  <bergner@vnet.ibm.com>
-+	* ppc-dis.c (print_insn_powerpc): Skip insn if it is deprecated.
-+	* ppc-opc.c (powerpc_opcodes) <mtfsf, mtfsf.>: Deprecate the two
-+	operand form and enable the four operand form for POWER6 and later.
-+	<mtfsfi, mtfsfi.>: Deprecate the two operand form and enable the
-+	three operand form for POWER6 and later.
-+
-+	2009-01-09  Peter Bergner  <bergner@vnet.ibm.com>
-+	* ppc-opc.c (PPCNONE): Define.
-+	(NOPOWER4): Delete.
-+	(powerpc_opcodes): Initialize the new "deprecated" field.
-+
-+	2008-12-04  Ben Elliston  <bje@au.ibm.com>
-+	* ppc-dis.c (powerpc_init_dialect): Do not set PPC_OPCODE_BOOKE
-+	for -Mbooke.
-+	(print_ppc_disassembler_options): Update usage.
-+	* ppc-opc.c (DE, DES, DEO, DE_MASK): Remove.
-+	(BOOKE64): Remove.
-+	(PPCCHLK64): Likewise.
-+	(powerpc_opcodes): Remove all BOOKE64 instructions.
-+
- 2008-11-27  Alan Modra  <amodra@bigpond.net.au>
- 
- 	* ppc-opc.c (extract_sprg): Correct operand range check.
-diff -Naur binutils-2.19.1.orig/opcodes/ppc-dis.c binutils-2.19.1/opcodes/ppc-dis.c
---- binutils-2.19.1.orig/opcodes/ppc-dis.c	2008-08-01 21:38:51.000000000 -0700
-+++ binutils-2.19.1/opcodes/ppc-dis.c	2009-03-02 05:59:36.000000000 -0800
-@@ -63,7 +63,7 @@
-     dialect |= PPC_OPCODE_PPCPS;
-   else if (info->disassembler_options
-       && strstr (info->disassembler_options, "booke") != NULL)
--    dialect |= PPC_OPCODE_BOOKE | PPC_OPCODE_BOOKE64;
-+    dialect |= PPC_OPCODE_BOOKE;
-   else if ((info->mach == bfd_mach_ppc_e500mc)
- 	   || (info->disassembler_options
- 	       && strstr (info->disassembler_options, "e500mc") != NULL))
-@@ -112,8 +112,9 @@
- 
-   if (info->disassembler_options
-       && strstr (info->disassembler_options, "power7") != NULL)
--    dialect |= PPC_OPCODE_POWER4 | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6
--	       | PPC_OPCODE_ALTIVEC | PPC_OPCODE_VSX;
-+    dialect |= PPC_OPCODE_POWER4 | PPC_OPCODE_POWER5
-+	       | PPC_OPCODE_POWER6 | PPC_OPCODE_POWER7
-+	       | PPC_OPCODE_ISEL | PPC_OPCODE_ALTIVEC | PPC_OPCODE_VSX;
- 
-   if (info->disassembler_options
-       && strstr (info->disassembler_options, "vsx") != NULL)
-@@ -266,7 +267,8 @@
- 	continue;
- 
-       if ((insn & opcode->mask) != opcode->opcode
--	  || (opcode->flags & dialect) == 0)
-+	  || (opcode->flags & dialect) == 0
-+	  || (opcode->deprecated & dialect) != 0)
- 	continue;
- 
-       /* Make two passes over the operands.  First see if any of them
-@@ -402,7 +404,7 @@
- The following PPC specific disassembler options are supported for use with\n\
- the -M switch:\n");
- 
--  fprintf (stream, "  booke|booke32|booke64    Disassemble the BookE instructions\n");
-+  fprintf (stream, "  booke                    Disassemble the BookE instructions\n");
-   fprintf (stream, "  e300                     Disassemble the e300 instructions\n");
-   fprintf (stream, "  e500|e500x2              Disassemble the e500 instructions\n");
-   fprintf (stream, "  e500mc                   Disassemble the e500mc instructions\n");
-diff -Naur binutils-2.19.1.orig/opcodes/ppc-opc.c binutils-2.19.1/opcodes/ppc-opc.c
---- binutils-2.19.1.orig/opcodes/ppc-opc.c	2008-12-23 05:54:52.000000000 -0800
-+++ binutils-2.19.1/opcodes/ppc-opc.c	2009-03-03 17:08:22.000000000 -0800
-@@ -1,6 +1,6 @@
- /* ppc-opc.c -- PowerPC opcode list
-    Copyright 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004,
--   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-+   2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-    Written by Ian Lance Taylor, Cygnus Support
- 
-    This file is part of the GNU opcodes library.
-@@ -81,6 +81,10 @@
- static long extract_xb6 (unsigned long, ppc_cpu_t, int *);
- static unsigned long insert_xb6s (unsigned long, long, ppc_cpu_t, const char **);
- static long extract_xb6s (unsigned long, ppc_cpu_t, int *);
-+static unsigned long insert_xc6 (unsigned long, long, ppc_cpu_t, const char **);
-+static long extract_xc6 (unsigned long, ppc_cpu_t, int *);
-+static unsigned long insert_dm (unsigned long, long, ppc_cpu_t, const char **);
-+static long extract_dm (unsigned long, ppc_cpu_t, int *);
- 
-
- /* The operands table.
- 
-@@ -223,19 +227,9 @@
- #define D CT + 1
-   { 0xffff, 0, NULL, NULL, PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED },
- 
--  /* The DE field in a DE form instruction.  This is like D, but is 12
--     bits only.  */
--#define DE D + 1
--  { 0xfff, 4, NULL, NULL, PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED },
--
--  /* The DES field in a DES form instruction.  This is like DS, but is 14
--     bits only (12 stored.)  */
--#define DES DE + 1
--  { 0x3ffc, 2, NULL, NULL, PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED },
--
-   /* The DQ field in a DQ form instruction.  This is like D, but the
-      lower four bits are forced to zero. */
--#define DQ DES + 1
-+#define DQ D + 1
-   { 0xfff0, 0, NULL, NULL,
-     PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED | PPC_OPERAND_DQ },
- 
-@@ -320,8 +314,9 @@
- #define LIA LI + 1
-   { 0x3fffffc, 0, NULL, NULL, PPC_OPERAND_ABSOLUTE | PPC_OPERAND_SIGNED },
- 
--  /* The LS field in an X (sync) form instruction.  */
-+  /* The LS or WC field in an X (sync or wait) form instruction.  */
- #define LS LIA + 1
-+#define WC LS
-   { 0x3, 21, NULL, NULL, PPC_OPERAND_OPTIONAL },
- 
-   /* The ME field in an M form instruction.  */
-@@ -617,7 +612,7 @@
- #define XA6 XT6 + 1
-   { 0x3f, -1, insert_xa6, extract_xa6, PPC_OPERAND_VSR },
- 
--  /* The XB field in an XX3 form instruction.  This is split.  */
-+  /* The XB field in an XX2 or XX3 form instruction.  This is split.  */
- #define XB6 XA6 + 1
-   { 0x3f, -1, insert_xb6, extract_xb6, PPC_OPERAND_VSR },
- 
-@@ -627,9 +622,22 @@
- #define XB6S XB6 + 1
-   { 0x3f, -1, insert_xb6s, extract_xb6s, PPC_OPERAND_FAKE },
- 
--  /* The DM field in an XX3 form instruction.  */
--#define DM XB6S + 1
-+  /* The XC field in an XX4 form instruction.  This is split.  */
-+#define XC6 XB6S + 1
-+  { 0x3f, -1, insert_xc6, extract_xc6, PPC_OPERAND_VSR },
-+
-+  /* The DM or SHW field in an XX3 form instruction.  */
-+#define DM XC6 + 1
-+#define SHW DM
-   { 0x3, 8, NULL, NULL, 0 },
-+
-+  /* The DM field in an extended mnemonic XX3 form instruction.  */
-+#define DMEX DM + 1
-+  { 0x3, 8, insert_dm, extract_dm, 0 },
-+
-+  /* The UIM field in an XX2 form instruction.  */
-+#define UIM DMEX + 1
-+  { 0x3, 16, NULL, NULL, 0 },
- };
- 
- const unsigned int num_powerpc_operands = (sizeof (powerpc_operands)
-@@ -1405,6 +1413,49 @@
-     *invalid = 1;
-   return 0;
- }
-+
-+/* The XC field in an XX4 form instruction.  This is split.  */
-+
-+static unsigned long
-+insert_xc6 (unsigned long insn,
-+	    long value,
-+	    ppc_cpu_t dialect ATTRIBUTE_UNUSED,
-+	    const char **errmsg ATTRIBUTE_UNUSED)
-+{
-+  return insn | ((value & 0x1f) << 6) | ((value & 0x20) >> 2);
-+}
-+
-+static long
-+extract_xc6 (unsigned long insn,
-+	     ppc_cpu_t dialect ATTRIBUTE_UNUSED,
-+	     int *invalid ATTRIBUTE_UNUSED)
-+{
-+  return ((insn << 2) & 0x20) | ((insn >> 6) & 0x1f);
-+}
-+
-+static unsigned long
-+insert_dm (unsigned long insn,
-+	   long value,
-+	   ppc_cpu_t dialect ATTRIBUTE_UNUSED,
-+	   const char **errmsg)
-+{
-+  if (value != 0 && value != 1)
-+    *errmsg = _("invalid constant");
-+  return insn | (((value) ? 3 : 0) << 8);
-+}
-+
-+static long
-+extract_dm (unsigned long insn,
-+	    ppc_cpu_t dialect ATTRIBUTE_UNUSED,
-+	    int *invalid)
-+{
-+  long value;
-+
-+  value = (insn >> 8) & 3;
-+  if (value != 0 && value != 3)
-+    *invalid = 1;
-+  return (value) ? 1 : 0;
-+}
- 
-
- /* Macros used to form opcodes.  */
- 
-@@ -1487,10 +1538,6 @@
- #define DSO(op, xop) (OP (op) | ((xop) & 0x3))
- #define DS_MASK DSO (0x3f, 3)
- 
--/* A DE form instruction.  */
--#define DEO(op, xop) (OP (op) | ((xop) & 0xf))
--#define DE_MASK DEO (0x3e, 0xf)
--
- /* An EVSEL form instruction.  */
- #define EVSEL(op, xop) (OP (op) | (((unsigned long)(xop)) & 0xff) << 3)
- #define EVSEL_MASK EVSEL(0x3f, 0xff)
-@@ -1550,11 +1597,17 @@
- /* An X form instruction.  */
- #define X(op, xop) (OP (op) | ((((unsigned long)(xop)) & 0x3ff) << 1))
- 
-+/* An XX2 form instruction.  */
-+#define XX2(op, xop) (OP (op) | ((((unsigned long)(xop)) & 0x1ff) << 2))
-+
- /* An XX3 form instruction.  */
- #define XX3(op, xop) (OP (op) | ((((unsigned long)(xop)) & 0xff) << 3))
- 
--#define XX3DM(op, xop, dm) (XX3 (op, ((unsigned long)(xop) & 0x1f)) \
--  | ((((unsigned long)(dm)) & 0x3) << 8))
-+/* An XX3 form instruction with the RC bit specified.  */
-+#define XX3RC(op, xop, rc) (OP (op) | (((rc) & 1) << 10) | ((((unsigned long)(xop)) & 0x7f) << 3))
-+
-+/* An XX4 form instruction.  */
-+#define XX4(op, xop) (OP (op) | ((((unsigned long)(xop)) & 0x3) << 4))
- 
- /* A Z form instruction.  */
- #define Z(op, xop) (OP (op) | ((((unsigned long)(xop)) & 0x1ff) << 1))
-@@ -1571,11 +1624,30 @@
- /* The mask for an XX1 form instruction.  */
- #define XX1_MASK X (0x3f, 0x3ff)
- 
-+/* The mask for an XX2 form instruction.  */
-+#define XX2_MASK (XX2 (0x3f, 0x1ff) | (0x1f << 16))
-+
-+/* The mask for an XX2 form instruction with the UIM bits specified.  */
-+#define XX2UIM_MASK (XX2 (0x3f, 0x1ff) | (7 << 18))
-+
-+/* The mask for an XX2 form instruction with the BF bits specified.  */
-+#define XX2BF_MASK (XX2_MASK | (3 << 21) | (1))
-+
- /* The mask for an XX3 form instruction.  */
- #define XX3_MASK XX3 (0x3f, 0xff)
- 
--/* The mask for an XX3 form instruction with the DM bits specified.  */
-+/* The mask for an XX3 form instruction with the BF bits specified.  */
-+#define XX3BF_MASK (XX3 (0x3f, 0xff) | (3 << 21) | (1))
-+
-+/* The mask for an XX3 form instruction with the DM or SHW bits specified.  */
- #define XX3DM_MASK (XX3 (0x3f, 0x1f) | (1 << 10))
-+#define XX3SHW_MASK XX3DM_MASK
-+
-+/* The mask for an XX4 form instruction.  */
-+#define XX4_MASK XX4 (0x3f, 0x3)
-+
-+/* An X form wait instruction with everything filled in except the WC field.  */
-+#define XWC_MASK (XRC (0x3f, 0x3ff, 1) | (7 << 23) | RA_MASK | RB_MASK)
- 
- /* The mask for a Z form instruction.  */
- #define Z_MASK ZRC (0x3f, 0x1ff, 1)
-@@ -1810,13 +1882,14 @@
- 
-
- /* Smaller names for the flags so each entry in the opcodes table will
-    fit on a single line.  */
-+#define PPCNONE	0
- #undef	PPC
- #define PPC	PPC_OPCODE_PPC
- #define PPCCOM	PPC_OPCODE_PPC | PPC_OPCODE_COMMON
--#define NOPOWER4 PPC_OPCODE_NOPOWER4 | PPCCOM
- #define POWER4	PPC_OPCODE_POWER4
- #define POWER5	PPC_OPCODE_POWER5
- #define POWER6	PPC_OPCODE_POWER6
-+#define POWER7	PPC_OPCODE_POWER7
- #define CELL	PPC_OPCODE_CELL
- #define PPC32	PPC_OPCODE_32 | PPC_OPCODE_PPC
- #define PPC64	PPC_OPCODE_64 | PPC_OPCODE_PPC
-@@ -1841,7 +1914,6 @@
- #define MFDEC1	PPC_OPCODE_POWER
- #define MFDEC2	PPC_OPCODE_PPC | PPC_OPCODE_601 | PPC_OPCODE_BOOKE
- #define BOOKE	PPC_OPCODE_BOOKE
--#define BOOKE64 PPC_OPCODE_BOOKE64
- #define CLASSIC PPC_OPCODE_CLASSIC
- #define PPCE300 PPC_OPCODE_E300
- #define PPCSPE	PPC_OPCODE_SPE
-@@ -1850,7 +1922,6 @@
- #define PPCBRLK PPC_OPCODE_BRLOCK
- #define PPCPMR	PPC_OPCODE_PMR
- #define PPCCHLK PPC_OPCODE_CACHELCK
--#define PPCCHLK64	PPC_OPCODE_CACHELCK | PPC_OPCODE_BOOKE64
- #define PPCRFMCI	PPC_OPCODE_RFMCI
- #define E500MC  PPC_OPCODE_E500MC
- 
-
-@@ -1876,3253 +1947,3347 @@
-    constrained otherwise by disassembler operation.  */
- 
- const struct powerpc_opcode powerpc_opcodes[] = {
--{"attn",	X(0,256),	X_MASK,      POWER4,	{0}},
--{"tdlgti",	OPTO(2,TOLGT),	OPTO_MASK,   PPC64,	{RA, SI}},
--{"tdllti",	OPTO(2,TOLLT),	OPTO_MASK,   PPC64,	{RA, SI}},
--{"tdeqi",	OPTO(2,TOEQ),	OPTO_MASK,   PPC64,	{RA, SI}},
--{"tdlgei",	OPTO(2,TOLGE),	OPTO_MASK,   PPC64,	{RA, SI}},
--{"tdlnli",	OPTO(2,TOLNL),	OPTO_MASK,   PPC64,	{RA, SI}},
--{"tdllei",	OPTO(2,TOLLE),	OPTO_MASK,   PPC64,	{RA, SI}},
--{"tdlngi",	OPTO(2,TOLNG),	OPTO_MASK,   PPC64,	{RA, SI}},
--{"tdgti",	OPTO(2,TOGT),	OPTO_MASK,   PPC64,	{RA, SI}},
--{"tdgei",	OPTO(2,TOGE),	OPTO_MASK,   PPC64,	{RA, SI}},
--{"tdnli",	OPTO(2,TONL),	OPTO_MASK,   PPC64,	{RA, SI}},
--{"tdlti",	OPTO(2,TOLT),	OPTO_MASK,   PPC64,	{RA, SI}},
--{"tdlei",	OPTO(2,TOLE),	OPTO_MASK,   PPC64,	{RA, SI}},
--{"tdngi",	OPTO(2,TONG),	OPTO_MASK,   PPC64,	{RA, SI}},
--{"tdnei",	OPTO(2,TONE),	OPTO_MASK,   PPC64,	{RA, SI}},
--{"tdi",		OP(2),		OP_MASK,     PPC64,	{TO, RA, SI}},
--
--{"twlgti",	OPTO(3,TOLGT),	OPTO_MASK,   PPCCOM,	{RA, SI}},
--{"tlgti",	OPTO(3,TOLGT),	OPTO_MASK,   PWRCOM,	{RA, SI}},
--{"twllti",	OPTO(3,TOLLT),	OPTO_MASK,   PPCCOM,	{RA, SI}},
--{"tllti",	OPTO(3,TOLLT),	OPTO_MASK,   PWRCOM,	{RA, SI}},
--{"tweqi",	OPTO(3,TOEQ),	OPTO_MASK,   PPCCOM,	{RA, SI}},
--{"teqi",	OPTO(3,TOEQ),	OPTO_MASK,   PWRCOM,	{RA, SI}},
--{"twlgei",	OPTO(3,TOLGE),	OPTO_MASK,   PPCCOM,	{RA, SI}},
--{"tlgei",	OPTO(3,TOLGE),	OPTO_MASK,   PWRCOM,	{RA, SI}},
--{"twlnli",	OPTO(3,TOLNL),	OPTO_MASK,   PPCCOM,	{RA, SI}},
--{"tlnli",	OPTO(3,TOLNL),	OPTO_MASK,   PWRCOM,	{RA, SI}},
--{"twllei",	OPTO(3,TOLLE),	OPTO_MASK,   PPCCOM,	{RA, SI}},
--{"tllei",	OPTO(3,TOLLE),	OPTO_MASK,   PWRCOM,	{RA, SI}},
--{"twlngi",	OPTO(3,TOLNG),	OPTO_MASK,   PPCCOM,	{RA, SI}},
--{"tlngi",	OPTO(3,TOLNG),	OPTO_MASK,   PWRCOM,	{RA, SI}},
--{"twgti",	OPTO(3,TOGT),	OPTO_MASK,   PPCCOM,	{RA, SI}},
--{"tgti",	OPTO(3,TOGT),	OPTO_MASK,   PWRCOM,	{RA, SI}},
--{"twgei",	OPTO(3,TOGE),	OPTO_MASK,   PPCCOM,	{RA, SI}},
--{"tgei",	OPTO(3,TOGE),	OPTO_MASK,   PWRCOM,	{RA, SI}},
--{"twnli",	OPTO(3,TONL),	OPTO_MASK,   PPCCOM,	{RA, SI}},
--{"tnli",	OPTO(3,TONL),	OPTO_MASK,   PWRCOM,	{RA, SI}},
--{"twlti",	OPTO(3,TOLT),	OPTO_MASK,   PPCCOM,	{RA, SI}},
--{"tlti",	OPTO(3,TOLT),	OPTO_MASK,   PWRCOM,	{RA, SI}},
--{"twlei",	OPTO(3,TOLE),	OPTO_MASK,   PPCCOM,	{RA, SI}},
--{"tlei",	OPTO(3,TOLE),	OPTO_MASK,   PWRCOM,	{RA, SI}},
--{"twngi",	OPTO(3,TONG),	OPTO_MASK,   PPCCOM,	{RA, SI}},
--{"tngi",	OPTO(3,TONG),	OPTO_MASK,   PWRCOM,	{RA, SI}},
--{"twnei",	OPTO(3,TONE),	OPTO_MASK,   PPCCOM,	{RA, SI}},
--{"tnei",	OPTO(3,TONE),	OPTO_MASK,   PWRCOM,	{RA, SI}},
--{"twi",		OP(3),		OP_MASK,     PPCCOM,	{TO, RA, SI}},
--{"ti",		OP(3),		OP_MASK,     PWRCOM,	{TO, RA, SI}},
--
--{"ps_cmpu0",	X  (4,	 0), X_MASK|(3<<21), PPCPS,	{BF, FRA, FRB}},
--{"vaddubm",	VX (4,	 0),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vmaxub",	VX (4,	 2),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vrlb",	VX (4,	 4),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vcmpequb",	VXR(4,	 6,0),	VXR_MASK,    PPCVEC,	{VD, VA, VB}},
--{"vmuloub",	VX (4,	 8),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vaddfp",	VX (4,	10),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"psq_lx",	XW (4,	 6,0),	XW_MASK,     PPCPS,	{FRT,RA,RB,PSWM,PSQM}},
--{"vmrghb",	VX (4,	12),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"psq_stx",	XW (4,	 7,0),	XW_MASK,     PPCPS,	{FRS,RA,RB,PSWM,PSQM}},
--{"vpkuhum",	VX (4,	14),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"mulhhwu",	XRC(4,	 8,0),	X_MASK,  PPC405|PPC440,	{RT, RA, RB}},
--{"mulhhwu.",	XRC(4,	 8,1),	X_MASK,  PPC405|PPC440,	{RT, RA, RB}},
--{"ps_sum0",	A  (4,	10,0),	A_MASK,      PPCPS,	{FRT, FRA, FRC, FRB}},
--{"ps_sum0.",	A  (4,	10,1),	A_MASK,      PPCPS,	{FRT, FRA, FRC, FRB}},
--{"ps_sum1",	A  (4,	11,0),	A_MASK,      PPCPS,	{FRT, FRA, FRC, FRB}},
--{"ps_sum1.",	A  (4,	11,1),	A_MASK,      PPCPS,	{FRT, FRA, FRC, FRB}},
--{"ps_muls0",	A  (4,	12,0),	AFRB_MASK,   PPCPS,	{FRT, FRA, FRC}},
--{"machhwu",	XO (4,	12,0,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"ps_muls0.",	A  (4,	12,1),	AFRB_MASK,   PPCPS,	{FRT, FRA, FRC}},
--{"machhwu.",	XO (4,	12,0,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"ps_muls1",	A  (4,	13,0),	AFRB_MASK,   PPCPS,	{FRT, FRA, FRC}},
--{"ps_muls1.",	A  (4,	13,1),	AFRB_MASK,   PPCPS,	{FRT, FRA, FRC}},
--{"ps_madds0",	A  (4,	14,0),	A_MASK,      PPCPS,	{FRT, FRA, FRC, FRB}},
--{"ps_madds0.",	A  (4,	14,1),	A_MASK,      PPCPS,	{FRT, FRA, FRC, FRB}},
--{"ps_madds1",	A  (4,	15,0),	A_MASK,      PPCPS,	{FRT, FRA, FRC, FRB}},
--{"ps_madds1.",	A  (4,	15,1),	A_MASK,      PPCPS,	{FRT, FRA, FRC, FRB}},
--{"vmhaddshs",	VXA(4,	32),	VXA_MASK,    PPCVEC,	{VD, VA, VB, VC}},
--{"vmhraddshs",	VXA(4,	33),	VXA_MASK,    PPCVEC,	{VD, VA, VB, VC}},
--{"vmladduhm",	VXA(4,	34),	VXA_MASK,    PPCVEC,	{VD, VA, VB, VC}},
--{"ps_div",	A  (4,	18,0),	AFRC_MASK,   PPCPS,	{FRT, FRA, FRB}},
--{"vmsumubm",	VXA(4,	36),	VXA_MASK,    PPCVEC,	{VD, VA, VB, VC}},
--{"ps_div.",	A  (4,	18,1),	AFRC_MASK,   PPCPS,	{FRT, FRA, FRB}},
--{"vmsummbm",	VXA(4,	37),	VXA_MASK,    PPCVEC,	{VD, VA, VB, VC}},
--{"vmsumuhm",	VXA(4,	38),	VXA_MASK,    PPCVEC,	{VD, VA, VB, VC}},
--{"vmsumuhs",	VXA(4,	39),	VXA_MASK,    PPCVEC,	{VD, VA, VB, VC}},
--{"ps_sub",	A  (4,	20,0),	AFRC_MASK,   PPCPS,	{FRT, FRA, FRB}},
--{"vmsumshm",	VXA(4,	40),	VXA_MASK,    PPCVEC,	{VD, VA, VB, VC}},
--{"ps_sub.",	A  (4,	20,1),	AFRC_MASK,   PPCPS,	{FRT, FRA, FRB}},
--{"vmsumshs",	VXA(4,	41),	VXA_MASK,    PPCVEC,	{VD, VA, VB, VC}},
--{"ps_add",	A  (4,	21,0),	AFRC_MASK,   PPCPS,	{FRT, FRA, FRB}},
--{"vsel",	VXA(4,	42),	VXA_MASK,    PPCVEC,	{VD, VA, VB, VC}},
--{"ps_add.",	A  (4,	21,1),	AFRC_MASK,   PPCPS,	{FRT, FRA, FRB}},
--{"vperm",	VXA(4,	43),	VXA_MASK,    PPCVEC,	{VD, VA, VB, VC}},
--{"vsldoi",	VXA(4,	44),	VXA_MASK,    PPCVEC,	{VD, VA, VB, SHB}},
--{"ps_sel",	A  (4,	23,0),	A_MASK,      PPCPS,	{FRT, FRA, FRC, FRB}},
--{"vmaddfp",	VXA(4,	46),	VXA_MASK,    PPCVEC,	{VD, VA, VC, VB}},
--{"ps_sel.",	A  (4,	23,1),	A_MASK,      PPCPS,	{FRT, FRA, FRC, FRB}},
--{"vnmsubfp",	VXA(4,	47),	VXA_MASK,    PPCVEC,	{VD, VA, VC, VB}},
--{"ps_res",	A  (4,	24,0), AFRAFRC_MASK, PPCPS,	{FRT, FRB}},
--{"ps_res.",	A  (4,	24,1), AFRAFRC_MASK, PPCPS,	{FRT, FRB}},
--{"ps_mul",	A  (4,	25,0), AFRB_MASK,    PPCPS,	{FRT, FRA, FRC}},
--{"ps_mul.",	A  (4,	25,1),	AFRB_MASK,   PPCPS,	{FRT, FRA, FRC}},
--{"ps_rsqrte",	A  (4,	26,0), AFRAFRC_MASK, PPCPS,	{FRT, FRB}},
--{"ps_rsqrte.",	A  (4,	26,1), AFRAFRC_MASK, PPCPS,	{FRT, FRB}},
--{"ps_msub",	A  (4,	28,0),	A_MASK,      PPCPS,	{FRT, FRA, FRC, FRB}},
--{"ps_msub.",	A  (4,	28,1),	A_MASK,      PPCPS,	{FRT, FRA, FRC, FRB}},
--{"ps_madd",	A  (4,	29,0),	A_MASK,      PPCPS,	{FRT, FRA, FRC, FRB}},
--{"ps_madd.",	A  (4,	29,1),	A_MASK,      PPCPS,	{FRT, FRA, FRC, FRB}},
--{"ps_nmsub",	A  (4,	30,0),	A_MASK,      PPCPS,	{FRT, FRA, FRC, FRB}},
--{"ps_nmsub.",	A  (4,	30,1),	A_MASK,      PPCPS,	{FRT, FRA, FRC, FRB}},
--{"ps_nmadd",	A  (4,	31,0),	A_MASK,      PPCPS,	{FRT, FRA, FRC, FRB}},
--{"ps_nmadd.",	A  (4,	31,1),	A_MASK,      PPCPS,	{FRT, FRA, FRC, FRB}},
--{"ps_cmpo0",	X  (4,	32), X_MASK|(3<<21), PPCPS,	{BF, FRA, FRB}},
--{"vadduhm",	VX (4,	64),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vmaxuh",	VX (4,	66),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vrlh",	VX (4,	68),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vcmpequh",	VXR(4,	70,0),	VXR_MASK,    PPCVEC,	{VD, VA, VB}},
--{"vmulouh",	VX (4,	72),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vsubfp",	VX (4,	74),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"psq_lux",	XW (4,	38,0),	XW_MASK,     PPCPS,	{FRT,RA,RB,PSWM,PSQM}},
--{"vmrghh",	VX (4,	76),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"psq_stux",	XW (4,	39,0),	XW_MASK,     PPCPS,	{FRS,RA,RB,PSWM,PSQM}},
--{"vpkuwum",	VX (4,	78),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"ps_neg",	XRC(4,	40,0),	XRA_MASK,    PPCPS,	{FRT, FRB}},
--{"mulhhw",	XRC(4,	40,0),	X_MASK,  PPC405|PPC440,	{RT, RA, RB}},
--{"ps_neg.",	XRC(4,	40,1),	XRA_MASK,    PPCPS,	{FRT, FRB}},
--{"mulhhw.",	XRC(4,	40,1),	X_MASK,  PPC405|PPC440,	{RT, RA, RB}},
--{"machhw",	XO (4,	44,0,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"machhw.",	XO (4,	44,0,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"nmachhw",	XO (4,	46,0,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"nmachhw.",	XO (4,	46,0,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"ps_cmpu1",	X  (4,	64), X_MASK|(3<<21), PPCPS,	{BF, FRA, FRB}},
--{"vadduwm",	VX (4,	128),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vmaxuw",	VX (4,	130),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vrlw",	VX (4,	132),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vcmpequw",	VXR(4,	134,0), VXR_MASK,    PPCVEC,	{VD, VA, VB}},
--{"vmrghw",	VX (4,	140),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vpkuhus",	VX (4,	142),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"ps_mr",	XRC(4,	72,0),	XRA_MASK,    PPCPS,	{FRT, FRB}},
--{"ps_mr.",	XRC(4,	72,1),	XRA_MASK,    PPCPS,	{FRT, FRB}},
--{"machhwsu",	XO (4,	76,0,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"machhwsu.",	XO (4,	76,0,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"ps_cmpo1",	X  (4,	96), X_MASK|(3<<21), PPCPS,	{BF, FRA, FRB}},
--{"vcmpeqfp",	VXR(4, 198,0),	VXR_MASK,    PPCVEC,	{VD, VA, VB}},
--{"vpkuwus",	VX (4, 206),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"machhws",	XO (4, 108,0,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"machhws.",	XO (4, 108,0,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"nmachhws",	XO (4, 110,0,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"nmachhws.",	XO (4, 110,0,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"vmaxsb",	VX (4, 258),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vslb",	VX (4, 260),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vmulosb",	VX (4, 264),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vrefp",	VX (4, 266),	VX_MASK,     PPCVEC,	{VD, VB}},
--{"vmrglb",	VX (4, 268),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vpkshus",	VX (4, 270),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"ps_nabs",	XRC(4, 136,0),	XRA_MASK,    PPCPS,	{FRT, FRB}},
--{"mulchwu",	XRC(4, 136,0),	X_MASK,  PPC405|PPC440,	{RT, RA, RB}},
--{"ps_nabs.",	XRC(4, 136,1),	XRA_MASK,    PPCPS,	{FRT, FRB}},
--{"mulchwu.",	XRC(4, 136,1),	X_MASK,  PPC405|PPC440,	{RT, RA, RB}},
--{"macchwu",	XO (4, 140,0,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"macchwu.",	XO (4, 140,0,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"vmaxsh",	VX (4, 322),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vslh",	VX (4, 324),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vmulosh",	VX (4, 328),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vrsqrtefp",	VX (4, 330),	VX_MASK,     PPCVEC,	{VD, VB}},
--{"vmrglh",	VX (4, 332),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vpkswus",	VX (4, 334),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"mulchw",	XRC(4, 168,0),	X_MASK,  PPC405|PPC440,	{RT, RA, RB}},
--{"mulchw.",	XRC(4, 168,1),	X_MASK,  PPC405|PPC440,	{RT, RA, RB}},
--{"macchw",	XO (4, 172,0,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"macchw.",	XO (4, 172,0,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"nmacchw",	XO (4, 174,0,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"nmacchw.",	XO (4, 174,0,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"vaddcuw",	VX (4, 384),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vmaxsw",	VX (4, 386),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vslw",	VX (4, 388),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vexptefp",	VX (4, 394),	VX_MASK,     PPCVEC,	{VD, VB}},
--{"vmrglw",	VX (4, 396),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vpkshss",	VX (4, 398),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"macchwsu",	XO (4, 204,0,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"macchwsu.",	XO (4, 204,0,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"vsl",		VX (4, 452),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vcmpgefp",	VXR(4, 454,0),	VXR_MASK,    PPCVEC,	{VD, VA, VB}},
--{"vlogefp",	VX (4, 458),	VX_MASK,     PPCVEC,	{VD, VB}},
--{"vpkswss",	VX (4, 462),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"macchws",	XO (4, 236,0,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"macchws.",	XO (4, 236,0,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"nmacchws",	XO (4, 238,0,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"nmacchws.",	XO (4, 238,0,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"evaddw",	VX (4, 512),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"vaddubs",	VX (4, 512),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"evaddiw",	VX (4, 514),	VX_MASK,     PPCSPE,	{RS, RB, UIMM}},
--{"vminub",	VX (4, 514),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"evsubfw",	VX (4, 516),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evsubw",	VX (4, 516),	VX_MASK,     PPCSPE,	{RS, RB, RA}},
--{"vsrb",	VX (4, 516),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"evsubifw",	VX (4, 518),	VX_MASK,     PPCSPE,	{RS, UIMM, RB}},
--{"evsubiw",	VX (4, 518),	VX_MASK,     PPCSPE,	{RS, RB, UIMM}},
--{"vcmpgtub",	VXR(4, 518,0),	VXR_MASK,    PPCVEC,	{VD, VA, VB}},
--{"evabs",	VX (4, 520),	VX_MASK,     PPCSPE,	{RS, RA}},
--{"vmuleub",	VX (4, 520),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"evneg",	VX (4, 521),	VX_MASK,     PPCSPE,	{RS, RA}},
--{"evextsb",	VX (4, 522),	VX_MASK,     PPCSPE,	{RS, RA}},
--{"vrfin",	VX (4, 522),	VX_MASK,     PPCVEC,	{VD, VB}},
--{"evextsh",	VX (4, 523),	VX_MASK,     PPCSPE,	{RS, RA}},
--{"evrndw",	VX (4, 524),	VX_MASK,     PPCSPE,	{RS, RA}},
--{"vspltb",	VX (4, 524),	VX_MASK,     PPCVEC,	{VD, VB, UIMM}},
--{"evcntlzw",	VX (4, 525),	VX_MASK,     PPCSPE,	{RS, RA}},
--{"evcntlsw",	VX (4, 526),	VX_MASK,     PPCSPE,	{RS, RA}},
--{"vupkhsb",	VX (4, 526),	VX_MASK,     PPCVEC,	{VD, VB}},
--{"brinc",	VX (4, 527),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"ps_abs",	XRC(4, 264,0),	XRA_MASK,    PPCPS,	{FRT, FRB}},
--{"ps_abs.",	XRC(4, 264,1),	XRA_MASK,    PPCPS,	{FRT, FRB}},
--{"evand",	VX (4, 529),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evandc",	VX (4, 530),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evxor",	VX (4, 534),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmr",	VX (4, 535),	VX_MASK,     PPCSPE,	{RS, RA, BBA}},
--{"evor",	VX (4, 535),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evnor",	VX (4, 536),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evnot",	VX (4, 536),	VX_MASK,     PPCSPE,	{RS, RA, BBA}},
--{"get",		APU(4, 268,0),	APU_RA_MASK, PPC405,	{RT, FSL}},
--{"eveqv",	VX (4, 537),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evorc",	VX (4, 539),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evnand",	VX (4, 542),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evsrwu",	VX (4, 544),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evsrws",	VX (4, 545),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evsrwiu",	VX (4, 546),	VX_MASK,     PPCSPE,	{RS, RA, EVUIMM}},
--{"evsrwis",	VX (4, 547),	VX_MASK,     PPCSPE,	{RS, RA, EVUIMM}},
--{"evslw",	VX (4, 548),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evslwi",	VX (4, 550),	VX_MASK,     PPCSPE,	{RS, RA, EVUIMM}},
--{"evrlw",	VX (4, 552),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evsplati",	VX (4, 553),	VX_MASK,     PPCSPE,	{RS, SIMM}},
--{"evrlwi",	VX (4, 554),	VX_MASK,     PPCSPE,	{RS, RA, EVUIMM}},
--{"evsplatfi",	VX (4, 555),	VX_MASK,     PPCSPE,	{RS, SIMM}},
--{"evmergehi",	VX (4, 556),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmergelo",	VX (4, 557),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmergehilo",	VX (4, 558),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmergelohi",	VX (4, 559),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evcmpgtu",	VX (4, 560),	VX_MASK,     PPCSPE,	{CRFD, RA, RB}},
--{"evcmpgts",	VX (4, 561),	VX_MASK,     PPCSPE,	{CRFD, RA, RB}},
--{"evcmpltu",	VX (4, 562),	VX_MASK,     PPCSPE,	{CRFD, RA, RB}},
--{"evcmplts",	VX (4, 563),	VX_MASK,     PPCSPE,	{CRFD, RA, RB}},
--{"evcmpeq",	VX (4, 564),	VX_MASK,     PPCSPE,	{CRFD, RA, RB}},
--{"cget",	APU(4, 284,0),	APU_RA_MASK, PPC405,	{RT, FSL}},
--{"vadduhs",	VX (4, 576),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vminuh",	VX (4, 578),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vsrh",	VX (4, 580),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vcmpgtuh",	VXR(4, 582,0),	VXR_MASK,    PPCVEC,	{VD, VA, VB}},
--{"vmuleuh",	VX (4, 584),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vrfiz",	VX (4, 586),	VX_MASK,     PPCVEC,	{VD, VB}},
--{"vsplth",	VX (4, 588),	VX_MASK,     PPCVEC,	{VD, VB, UIMM}},
--{"vupkhsh",	VX (4, 590),	VX_MASK,     PPCVEC,	{VD, VB}},
--{"nget",	APU(4, 300,0),	APU_RA_MASK, PPC405,	{RT, FSL}},
--{"evsel",	EVSEL(4,79),	EVSEL_MASK,  PPCSPE,	{RS, RA, RB, CRFS}},
--{"ncget",	APU(4, 316,0),	APU_RA_MASK, PPC405,	{RT, FSL}},
--{"evfsadd",	VX (4, 640),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"vadduws",	VX (4, 640),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"evfssub",	VX (4, 641),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"vminuw",	VX (4, 642),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"evfsabs",	VX (4, 644),	VX_MASK,     PPCSPE,	{RS, RA}},
--{"vsrw",	VX (4, 644),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"evfsnabs",	VX (4, 645),	VX_MASK,     PPCSPE,	{RS, RA}},
--{"evfsneg",	VX (4, 646),	VX_MASK,     PPCSPE,	{RS, RA}},
--{"vcmpgtuw",	VXR(4, 646,0),	VXR_MASK,    PPCVEC,	{VD, VA, VB}},
--{"evfsmul",	VX (4, 648),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evfsdiv",	VX (4, 649),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"vrfip",	VX (4, 650),	VX_MASK,     PPCVEC,	{VD, VB}},
--{"evfscmpgt",	VX (4, 652),	VX_MASK,     PPCSPE,	{CRFD, RA, RB}},
--{"vspltw",	VX (4, 652),	VX_MASK,     PPCVEC,	{VD, VB, UIMM}},
--{"evfscmplt",	VX (4, 653),	VX_MASK,     PPCSPE,	{CRFD, RA, RB}},
--{"evfscmpeq",	VX (4, 654),	VX_MASK,     PPCSPE,	{CRFD, RA, RB}},
--{"vupklsb",	VX (4, 654),	VX_MASK,     PPCVEC,	{VD, VB}},
--{"evfscfui",	VX (4, 656),	VX_MASK,     PPCSPE,	{RS, RB}},
--{"evfscfsi",	VX (4, 657),	VX_MASK,     PPCSPE,	{RS, RB}},
--{"evfscfuf",	VX (4, 658),	VX_MASK,     PPCSPE,	{RS, RB}},
--{"evfscfsf",	VX (4, 659),	VX_MASK,     PPCSPE,	{RS, RB}},
--{"evfsctui",	VX (4, 660),	VX_MASK,     PPCSPE,	{RS, RB}},
--{"evfsctsi",	VX (4, 661),	VX_MASK,     PPCSPE,	{RS, RB}},
--{"evfsctuf",	VX (4, 662),	VX_MASK,     PPCSPE,	{RS, RB}},
--{"evfsctsf",	VX (4, 663),	VX_MASK,     PPCSPE,	{RS, RB}},
--{"evfsctuiz",	VX (4, 664),	VX_MASK,     PPCSPE,	{RS, RB}},
--{"put",		APU(4, 332,0),	APU_RT_MASK, PPC405,	{RA, FSL}},
--{"evfsctsiz",	VX (4, 666),	VX_MASK,     PPCSPE,	{RS, RB}},
--{"evfststgt",	VX (4, 668),	VX_MASK,     PPCSPE,	{CRFD, RA, RB}},
--{"evfststlt",	VX (4, 669),	VX_MASK,     PPCSPE,	{CRFD, RA, RB}},
--{"evfststeq",	VX (4, 670),	VX_MASK,     PPCSPE,	{CRFD, RA, RB}},
--{"cput",	APU(4, 348,0),	APU_RT_MASK, PPC405,	{RA, FSL}},
--{"efsadd",	VX (4, 704),	VX_MASK,     PPCEFS,	{RS, RA, RB}},
--{"efssub",	VX (4, 705),	VX_MASK,     PPCEFS,	{RS, RA, RB}},
--{"efsabs",	VX (4, 708),	VX_MASK,     PPCEFS,	{RS, RA}},
--{"vsr",		VX (4, 708),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"efsnabs",	VX (4, 709),	VX_MASK,     PPCEFS,	{RS, RA}},
--{"efsneg",	VX (4, 710),	VX_MASK,     PPCEFS,	{RS, RA}},
--{"vcmpgtfp",	VXR(4, 710,0),	VXR_MASK,    PPCVEC,	{VD, VA, VB}},
--{"efsmul",	VX (4, 712),	VX_MASK,     PPCEFS,	{RS, RA, RB}},
--{"efsdiv",	VX (4, 713),	VX_MASK,     PPCEFS,	{RS, RA, RB}},
--{"vrfim",	VX (4, 714),	VX_MASK,     PPCVEC,	{VD, VB}},
--{"efscmpgt",	VX (4, 716),	VX_MASK,     PPCEFS,	{CRFD, RA, RB}},
--{"efscmplt",	VX (4, 717),	VX_MASK,     PPCEFS,	{CRFD, RA, RB}},
--{"efscmpeq",	VX (4, 718),	VX_MASK,     PPCEFS,	{CRFD, RA, RB}},
--{"vupklsh",	VX (4, 718),	VX_MASK,     PPCVEC,	{VD, VB}},
--{"efscfd",	VX (4, 719),	VX_MASK,     PPCEFS,	{RS, RB}},
--{"efscfui",	VX (4, 720),	VX_MASK,     PPCEFS,	{RS, RB}},
--{"efscfsi",	VX (4, 721),	VX_MASK,     PPCEFS,	{RS, RB}},
--{"efscfuf",	VX (4, 722),	VX_MASK,     PPCEFS,	{RS, RB}},
--{"efscfsf",	VX (4, 723),	VX_MASK,     PPCEFS,	{RS, RB}},
--{"efsctui",	VX (4, 724),	VX_MASK,     PPCEFS,	{RS, RB}},
--{"efsctsi",	VX (4, 725),	VX_MASK,     PPCEFS,	{RS, RB}},
--{"efsctuf",	VX (4, 726),	VX_MASK,     PPCEFS,	{RS, RB}},
--{"efsctsf",	VX (4, 727),	VX_MASK,     PPCEFS,	{RS, RB}},
--{"efsctuiz",	VX (4, 728),	VX_MASK,     PPCEFS,	{RS, RB}},
--{"nput",	APU(4, 364,0),	APU_RT_MASK, PPC405,	{RA, FSL}},
--{"efsctsiz",	VX (4, 730),	VX_MASK,     PPCEFS,	{RS, RB}},
--{"efststgt",	VX (4, 732),	VX_MASK,     PPCEFS,	{CRFD, RA, RB}},
--{"efststlt",	VX (4, 733),	VX_MASK,     PPCEFS,	{CRFD, RA, RB}},
--{"efststeq",	VX (4, 734),	VX_MASK,     PPCEFS,	{CRFD, RA, RB}},
--{"efdadd",	VX (4, 736),	VX_MASK,     PPCEFS,	{RS, RA, RB}},
--{"efdsub",	VX (4, 737),	VX_MASK,     PPCEFS,	{RS, RA, RB}},
--{"efdcfuid",	VX (4, 738),	VX_MASK,     PPCEFS,	{RS, RB}},
--{"efdcfsid",	VX (4, 739),	VX_MASK,     PPCEFS,	{RS, RB}},
--{"efdabs",	VX (4, 740),	VX_MASK,     PPCEFS,	{RS, RA}},
--{"efdnabs",	VX (4, 741),	VX_MASK,     PPCEFS,	{RS, RA}},
--{"efdneg",	VX (4, 742),	VX_MASK,     PPCEFS,	{RS, RA}},
--{"efdmul",	VX (4, 744),	VX_MASK,     PPCEFS,	{RS, RA, RB}},
--{"efddiv",	VX (4, 745),	VX_MASK,     PPCEFS,	{RS, RA, RB}},
--{"efdctuidz",	VX (4, 746),	VX_MASK,     PPCEFS,	{RS, RB}},
--{"efdctsidz",	VX (4, 747),	VX_MASK,     PPCEFS,	{RS, RB}},
--{"efdcmpgt",	VX (4, 748),	VX_MASK,     PPCEFS,	{CRFD, RA, RB}},
--{"efdcmplt",	VX (4, 749),	VX_MASK,     PPCEFS,	{CRFD, RA, RB}},
--{"efdcmpeq",	VX (4, 750),	VX_MASK,     PPCEFS,	{CRFD, RA, RB}},
--{"efdcfs",	VX (4, 751),	VX_MASK,     PPCEFS,	{RS, RB}},
--{"efdcfui",	VX (4, 752),	VX_MASK,     PPCEFS,	{RS, RB}},
--{"efdcfsi",	VX (4, 753),	VX_MASK,     PPCEFS,	{RS, RB}},
--{"efdcfuf",	VX (4, 754),	VX_MASK,     PPCEFS,	{RS, RB}},
--{"efdcfsf",	VX (4, 755),	VX_MASK,     PPCEFS,	{RS, RB}},
--{"efdctui",	VX (4, 756),	VX_MASK,     PPCEFS,	{RS, RB}},
--{"efdctsi",	VX (4, 757),	VX_MASK,     PPCEFS,	{RS, RB}},
--{"efdctuf",	VX (4, 758),	VX_MASK,     PPCEFS,	{RS, RB}},
--{"efdctsf",	VX (4, 759),	VX_MASK,     PPCEFS,	{RS, RB}},
--{"efdctuiz",	VX (4, 760),	VX_MASK,     PPCEFS,	{RS, RB}},
--{"ncput",	APU(4, 380,0),	APU_RT_MASK, PPC405,	{RA, FSL}},
--{"efdctsiz",	VX (4, 762),	VX_MASK,     PPCEFS,	{RS, RB}},
--{"efdtstgt",	VX (4, 764),	VX_MASK,     PPCEFS,	{CRFD, RA, RB}},
--{"efdtstlt",	VX (4, 765),	VX_MASK,     PPCEFS,	{CRFD, RA, RB}},
--{"efdtsteq",	VX (4, 766),	VX_MASK,     PPCEFS,	{CRFD, RA, RB}},
--{"evlddx",	VX (4, 768),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"vaddsbs",	VX (4, 768),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"evldd",	VX (4, 769),	VX_MASK,     PPCSPE,	{RS, EVUIMM_8, RA}},
--{"evldwx",	VX (4, 770),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"vminsb",	VX (4, 770),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"evldw",	VX (4, 771),	VX_MASK,     PPCSPE,	{RS, EVUIMM_8, RA}},
--{"evldhx",	VX (4, 772),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"vsrab",	VX (4, 772),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"evldh",	VX (4, 773),	VX_MASK,     PPCSPE,	{RS, EVUIMM_8, RA}},
--{"vcmpgtsb",	VXR(4, 774,0),	VXR_MASK,    PPCVEC,	{VD, VA, VB}},
--{"evlhhesplatx",VX (4, 776),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"vmulesb",	VX (4, 776),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"evlhhesplat",	VX (4, 777),	VX_MASK,     PPCSPE,	{RS, EVUIMM_2, RA}},
--{"vcfux",	VX (4, 778),	VX_MASK,     PPCVEC,	{VD, VB, UIMM}},
--{"evlhhousplatx",VX(4, 780),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"vspltisb",	VX (4, 780),	VX_MASK,     PPCVEC,	{VD, SIMM}},
--{"evlhhousplat",VX (4, 781),	VX_MASK,     PPCSPE,	{RS, EVUIMM_2, RA}},
--{"evlhhossplatx",VX(4, 782),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"vpkpx",	VX (4, 782),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"evlhhossplat",VX (4, 783),	VX_MASK,     PPCSPE,	{RS, EVUIMM_2, RA}},
--{"mullhwu",	XRC(4, 392,0),	X_MASK,  PPC405|PPC440,	{RT, RA, RB}},
--{"evlwhex",	VX (4, 784),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"mullhwu.",	XRC(4, 392,1),	X_MASK,  PPC405|PPC440,	{RT, RA, RB}},
--{"evlwhe",	VX (4, 785),	VX_MASK,     PPCSPE,	{RS, EVUIMM_4, RA}},
--{"evlwhoux",	VX (4, 788),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evlwhou",	VX (4, 789),	VX_MASK,     PPCSPE,	{RS, EVUIMM_4, RA}},
--{"evlwhosx",	VX (4, 790),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evlwhos",	VX (4, 791),	VX_MASK,     PPCSPE,	{RS, EVUIMM_4, RA}},
--{"maclhwu",	XO (4, 396,0,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"evlwwsplatx",	VX (4, 792),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"maclhwu.",	XO (4, 396,0,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"evlwwsplat",	VX (4, 793),	VX_MASK,     PPCSPE,	{RS, EVUIMM_4, RA}},
--{"evlwhsplatx",	VX (4, 796),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evlwhsplat",	VX (4, 797),	VX_MASK,     PPCSPE,	{RS, EVUIMM_4, RA}},
--{"evstddx",	VX (4, 800),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evstdd",	VX (4, 801),	VX_MASK,     PPCSPE,	{RS, EVUIMM_8, RA}},
--{"evstdwx",	VX (4, 802),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evstdw",	VX (4, 803),	VX_MASK,     PPCSPE,	{RS, EVUIMM_8, RA}},
--{"evstdhx",	VX (4, 804),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evstdh",	VX (4, 805),	VX_MASK,     PPCSPE,	{RS, EVUIMM_8, RA}},
--{"evstwhex",	VX (4, 816),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evstwhe",	VX (4, 817),	VX_MASK,     PPCSPE,	{RS, EVUIMM_4, RA}},
--{"evstwhox",	VX (4, 820),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evstwho",	VX (4, 821),	VX_MASK,     PPCSPE,	{RS, EVUIMM_4, RA}},
--{"evstwwex",	VX (4, 824),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evstwwe",	VX (4, 825),	VX_MASK,     PPCSPE,	{RS, EVUIMM_4, RA}},
--{"evstwwox",	VX (4, 828),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evstwwo",	VX (4, 829),	VX_MASK,     PPCSPE,	{RS, EVUIMM_4, RA}},
--{"vaddshs",	VX (4, 832),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vminsh",	VX (4, 834),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vsrah",	VX (4, 836),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vcmpgtsh",	VXR(4, 838,0),	VXR_MASK,    PPCVEC,	{VD, VA, VB}},
--{"vmulesh",	VX (4, 840),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vcfsx",	VX (4, 842),	VX_MASK,     PPCVEC,	{VD, VB, UIMM}},
--{"vspltish",	VX (4, 844),	VX_MASK,     PPCVEC,	{VD, SIMM}},
--{"vupkhpx",	VX (4, 846),	VX_MASK,     PPCVEC,	{VD, VB}},
--{"mullhw",	XRC(4, 424,0),	X_MASK,  PPC405|PPC440,	{RT, RA, RB}},
--{"mullhw.",	XRC(4, 424,1),	X_MASK,  PPC405|PPC440,	{RT, RA, RB}},
--{"maclhw",	XO (4, 428,0,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"maclhw.",	XO (4, 428,0,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"nmaclhw",	XO (4, 430,0,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"nmaclhw.",	XO (4, 430,0,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"vaddsws",	VX (4, 896),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vminsw",	VX (4, 898),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vsraw",	VX (4, 900),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vcmpgtsw",	VXR(4, 902,0),	VXR_MASK,    PPCVEC,	{VD, VA, VB}},
--{"vctuxs",	VX (4, 906),	VX_MASK,     PPCVEC,	{VD, VB, UIMM}},
--{"vspltisw",	VX (4, 908),	VX_MASK,     PPCVEC,	{VD, SIMM}},
--{"maclhwsu",	XO (4, 460,0,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"maclhwsu.",	XO (4, 460,0,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"vcmpbfp",	VXR(4, 966,0),	VXR_MASK,    PPCVEC,	{VD, VA, VB}},
--{"vctsxs",	VX (4, 970),	VX_MASK,     PPCVEC,	{VD, VB, UIMM}},
--{"vupklpx",	VX (4, 974),	VX_MASK,     PPCVEC,	{VD, VB}},
--{"maclhws",	XO (4, 492,0,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"maclhws.",	XO (4, 492,0,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"nmaclhws",	XO (4, 494,0,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"nmaclhws.",	XO (4, 494,0,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"vsububm",	VX (4,1024),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vavgub",	VX (4,1026),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"evmhessf",	VX (4,1027),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"vand",	VX (4,1028),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vcmpequb.",	VXR(4,	 6,1),	VXR_MASK,    PPCVEC,	{VD, VA, VB}},
--{"udi0fcm.",	APU(4, 515,0), APU_MASK, PPC405|PPC440, {URT, URA, URB}},
--{"udi0fcm",	APU(4, 515,1), APU_MASK, PPC405|PPC440, {URT, URA, URB}},
--{"evmhossf",	VX (4,1031),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmheumi",	VX (4,1032),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhesmi",	VX (4,1033),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"vmaxfp",	VX (4,1034),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"evmhesmf",	VX (4,1035),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhoumi",	VX (4,1036),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"vslo",	VX (4,1036),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"evmhosmi",	VX (4,1037),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhosmf",	VX (4,1039),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"machhwuo",	XO (4,	12,1,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"machhwuo.",	XO (4,	12,1,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"ps_merge00",	XOPS(4,528,0),	XOPS_MASK,   PPCPS,	{FRT, FRA, FRB}},
--{"ps_merge00.",	XOPS(4,528,1),	XOPS_MASK,   PPCPS,	{FRT, FRA, FRB}},
--{"evmhessfa",	VX (4,1059),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhossfa",	VX (4,1063),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmheumia",	VX (4,1064),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhesmia",	VX (4,1065),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhesmfa",	VX (4,1067),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhoumia",	VX (4,1068),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhosmia",	VX (4,1069),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhosmfa",	VX (4,1071),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"vsubuhm",	VX (4,1088),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vavguh",	VX (4,1090),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vandc",	VX (4,1092),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vcmpequh.",	VXR(4,	70,1),	VXR_MASK,    PPCVEC,	{VD, VA, VB}},
--{"udi1fcm.",	APU(4, 547,0), APU_MASK, PPC405|PPC440, {URT, URA, URB}},
--{"udi1fcm",	APU(4, 547,1), APU_MASK, PPC405|PPC440, {URT, URA, URB}},   
--{"evmwhssf",	VX (4,1095),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmwlumi",	VX (4,1096),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"vminfp",	VX (4,1098),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"evmwhumi",	VX (4,1100),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"vsro",	VX (4,1100),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"evmwhsmi",	VX (4,1101),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmwhsmf",	VX (4,1103),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmwssf",	VX (4,1107),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"machhwo",	XO (4,	44,1,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"evmwumi",	VX (4,1112),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"machhwo.",	XO (4,	44,1,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"evmwsmi",	VX (4,1113),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmwsmf",	VX (4,1115),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"nmachhwo",	XO (4,	46,1,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"nmachhwo.",	XO (4,	46,1,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"ps_merge01",	XOPS(4,560,0),	XOPS_MASK,   PPCPS,	{FRT, FRA, FRB}},
--{"ps_merge01.",	XOPS(4,560,1),	XOPS_MASK,   PPCPS,	{FRT, FRA, FRB}},
--{"evmwhssfa",	VX (4,1127),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmwlumia",	VX (4,1128),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmwhumia",	VX (4,1132),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmwhsmia",	VX (4,1133),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmwhsmfa",	VX (4,1135),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmwssfa",	VX (4,1139),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmwumia",	VX (4,1144),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmwsmia",	VX (4,1145),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmwsmfa",	VX (4,1147),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"vsubuwm",	VX (4,1152),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vavguw",	VX (4,1154),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vor",		VX (4,1156),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vcmpequw.",	VXR(4, 134,1),	VXR_MASK,    PPCVEC,	{VD, VA, VB}},
--{"udi2fcm.",	APU(4, 579,0), APU_MASK, PPC405|PPC440, {URT, URA, URB}},
--{"udi2fcm",	APU(4, 579,1), APU_MASK, PPC405|PPC440, {URT, URA, URB}},   
--{"machhwsuo",	XO (4,	76,1,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"machhwsuo.",	XO (4,	76,1,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"ps_merge10",	XOPS(4,592,0),	XOPS_MASK,   PPCPS,	{FRT, FRA, FRB}},
--{"ps_merge10.",	XOPS(4,592,1),	XOPS_MASK,   PPCPS,	{FRT, FRA, FRB}},
--{"evaddusiaaw",	VX (4,1216),	VX_MASK,     PPCSPE,	{RS, RA}},
--{"evaddssiaaw",	VX (4,1217),	VX_MASK,     PPCSPE,	{RS, RA}},
--{"evsubfusiaaw",VX (4,1218),	VX_MASK,     PPCSPE,	{RS, RA}},
--{"evsubfssiaaw",VX (4,1219),	VX_MASK,     PPCSPE,	{RS, RA}},
--{"evmra",	VX (4,1220),	VX_MASK,     PPCSPE,	{RS, RA}},
--{"vxor",	VX (4,1220),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"evdivws",	VX (4,1222),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"vcmpeqfp.",	VXR(4, 198,1),	VXR_MASK,    PPCVEC,	{VD, VA, VB}},
--{"udi3fcm.",	APU(4, 611,0), APU_MASK, PPC405|PPC440, {URT, URA, URB}},
--{"udi3fcm",	APU(4, 611,1), APU_MASK, PPC405|PPC440, {URT, URA, URB}},   
--{"evdivwu",	VX (4,1223),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evaddumiaaw",	VX (4,1224),	VX_MASK,     PPCSPE,	{RS, RA}},
--{"evaddsmiaaw",	VX (4,1225),	VX_MASK,     PPCSPE,	{RS, RA}},
--{"evsubfumiaaw",VX (4,1226),	VX_MASK,     PPCSPE,	{RS, RA}},
--{"evsubfsmiaaw",VX (4,1227),	VX_MASK,     PPCSPE,	{RS, RA}},
--{"machhwso",	XO (4, 108,1,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"machhwso.",	XO (4, 108,1,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"nmachhwso",	XO (4, 110,1,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"nmachhwso.",	XO (4, 110,1,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"ps_merge11",	XOPS(4,624,0),	XOPS_MASK,   PPCPS,	{FRT, FRA, FRB}},
--{"ps_merge11.",	XOPS(4,624,1),	XOPS_MASK,   PPCPS,	{FRT, FRA, FRB}},
--{"evmheusiaaw",	VX (4,1280),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhessiaaw",	VX (4,1281),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"vavgsb",	VX (4,1282),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"evmhessfaaw",	VX (4,1283),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhousiaaw",	VX (4,1284),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"vnor",	VX (4,1284),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"evmhossiaaw",	VX (4,1285),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"udi4fcm.",	APU(4, 643,0), APU_MASK, PPC405|PPC440, {URT, URA, URB}},
--{"udi4fcm",	APU(4, 643,1), APU_MASK, PPC405|PPC440, {URT, URA, URB}},
--{"evmhossfaaw",	VX (4,1287),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmheumiaaw",	VX (4,1288),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhesmiaaw",	VX (4,1289),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhesmfaaw",	VX (4,1291),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhoumiaaw",	VX (4,1292),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhosmiaaw",	VX (4,1293),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhosmfaaw",	VX (4,1295),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"macchwuo",	XO (4, 140,1,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"macchwuo.",	XO (4, 140,1,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"evmhegumiaa",	VX (4,1320),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhegsmiaa",	VX (4,1321),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhegsmfaa",	VX (4,1323),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhogumiaa",	VX (4,1324),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhogsmiaa",	VX (4,1325),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhogsmfaa",	VX (4,1327),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmwlusiaaw",	VX (4,1344),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmwlssiaaw",	VX (4,1345),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"vavgsh",	VX (4,1346),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"udi5fcm.",	APU(4, 675,0), APU_MASK, PPC405|PPC440, {URT, URA, URB}},
--{"udi5fcm",	APU(4, 675,1), APU_MASK, PPC405|PPC440, {URT, URA, URB}},
--{"evmwlumiaaw",	VX (4,1352),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmwlsmiaaw",	VX (4,1353),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmwssfaa",	VX (4,1363),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"macchwo",	XO (4, 172,1,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"evmwumiaa",	VX (4,1368),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"macchwo.",	XO (4, 172,1,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"evmwsmiaa",	VX (4,1369),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmwsmfaa",	VX (4,1371),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"nmacchwo",	XO (4, 174,1,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"nmacchwo.",	XO (4, 174,1,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"evmheusianw",	VX (4,1408),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"vsubcuw",	VX (4,1408),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"evmhessianw",	VX (4,1409),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"vavgsw",	VX (4,1410),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"evmhessfanw",	VX (4,1411),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhousianw",	VX (4,1412),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhossianw",	VX (4,1413),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"udi6fcm.",	APU(4, 707,0), APU_MASK, PPC405|PPC440, {URT, URA, URB}},
--{"udi6fcm",	APU(4, 707,1), APU_MASK, PPC405|PPC440, {URT, URA, URB}},
--{"evmhossfanw",	VX (4,1415),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmheumianw",	VX (4,1416),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhesmianw",	VX (4,1417),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhesmfanw",	VX (4,1419),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhoumianw",	VX (4,1420),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhosmianw",	VX (4,1421),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhosmfanw",	VX (4,1423),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"macchwsuo",	XO (4, 204,1,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"macchwsuo.",	XO (4, 204,1,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"evmhegumian",	VX (4,1448),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhegsmian",	VX (4,1449),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhegsmfan",	VX (4,1451),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhogumian",	VX (4,1452),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhogsmian",	VX (4,1453),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmhogsmfan",	VX (4,1455),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmwlusianw",	VX (4,1472),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmwlssianw",	VX (4,1473),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"vcmpgefp.",	VXR(4, 454,1),	VXR_MASK,    PPCVEC,	{VD, VA, VB}},
--{"udi7fcm.",	APU(4, 739,0), APU_MASK, PPC405|PPC440, {URT, URA, URB}},
--{"udi7fcm",	APU(4, 739,1), APU_MASK, PPC405|PPC440, {URT, URA, URB}},
--{"evmwlumianw",	VX (4,1480),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmwlsmianw",	VX (4,1481),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmwssfan",	VX (4,1491),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"macchwso",	XO (4, 236,1,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"evmwumian",	VX (4,1496),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"macchwso.",	XO (4, 236,1,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"evmwsmian",	VX (4,1497),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"evmwsmfan",	VX (4,1499),	VX_MASK,     PPCSPE,	{RS, RA, RB}},
--{"nmacchwso",	XO (4, 238,1,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"nmacchwso.",	XO (4, 238,1,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"vsububs",	VX (4,1536),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"mfvscr",	VX (4,1540),	VX_MASK,     PPCVEC,	{VD}},
--{"vcmpgtub.",	VXR(4, 518,1),	VXR_MASK,    PPCVEC,	{VD, VA, VB}},
--{"udi8fcm.",	APU(4, 771,0),	APU_MASK,    PPC440,	{URT, URA, URB}},
--{"udi8fcm",	APU(4, 771,1),	APU_MASK,    PPC440,	{URT, URA, URB}},
--{"vsum4ubs",	VX (4,1544),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vsubuhs",	VX (4,1600),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"mtvscr",	VX (4,1604),	VX_MASK,     PPCVEC,	{VB}},
--{"vcmpgtuh.",	VXR(4, 582,1),	VXR_MASK,    PPCVEC,	{VD, VA, VB}},
--{"vsum4shs",	VX (4,1608),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"udi9fcm.",	APU(4, 804,0),	APU_MASK,    PPC440,	{URT, URA, URB}},
--{"udi9fcm",	APU(4, 804,1),	APU_MASK,    PPC440,	{URT, URA, URB}},
--{"vsubuws",	VX (4,1664),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vcmpgtuw.",	VXR(4, 646,1),	VXR_MASK,    PPCVEC,	{VD, VA, VB}},
--{"udi10fcm.",	APU(4, 835,0),	APU_MASK,    PPC440,	{URT, URA, URB}},
--{"udi10fcm",	APU(4, 835,1),	APU_MASK,    PPC440,	{URT, URA, URB}},
--{"vsum2sws",	VX (4,1672),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vcmpgtfp.",	VXR(4, 710,1),	VXR_MASK,    PPCVEC,	{VD, VA, VB}},
--{"udi11fcm.",	APU(4, 867,0),	APU_MASK,    PPC440,	{URT, URA, URB}},
--{"udi11fcm",	APU(4, 867,1),	APU_MASK,    PPC440,	{URT, URA, URB}},
--{"vsubsbs",	VX (4,1792),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vcmpgtsb.",	VXR(4, 774,1),	VXR_MASK,    PPCVEC,	{VD, VA, VB}},
--{"udi12fcm.",	APU(4, 899,0),	APU_MASK,    PPC440,	{URT, URA, URB}},
--{"udi12fcm",	APU(4, 899,1),	APU_MASK,    PPC440,	{URT, URA, URB}},
--{"vsum4sbs",	VX (4,1800),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"maclhwuo",	XO (4, 396,1,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"maclhwuo.",	XO (4, 396,1,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"vsubshs",	VX (4,1856),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vcmpgtsh.",	VXR(4, 838,1),	VXR_MASK,    PPCVEC,	{VD, VA, VB}},
--{"udi13fcm.",	APU(4, 931,0),	APU_MASK,    PPC440,	{URT, URA, URB}},
--{"udi13fcm",	APU(4, 931,1),	APU_MASK,    PPC440,	{URT, URA, URB}},
--{"maclhwo",	XO (4, 428,1,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"maclhwo.",	XO (4, 428,1,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"nmaclhwo",	XO (4, 430,1,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"nmaclhwo.",	XO (4, 430,1,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"vsubsws",	VX (4,1920),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"vcmpgtsw.",	VXR(4, 902,1),	VXR_MASK,    PPCVEC,	{VD, VA, VB}},
--{"udi14fcm.",	APU(4, 963,0),	APU_MASK,    PPC440,	{URT, URA, URB}},
--{"udi14fcm",	APU(4, 963,1),	APU_MASK,    PPC440,	{URT, URA, URB}},
--{"vsumsws",	VX (4,1928),	VX_MASK,     PPCVEC,	{VD, VA, VB}},
--{"maclhwsuo",	XO (4, 460,1,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"maclhwsuo.",	XO (4, 460,1,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"vcmpbfp.",	VXR(4, 966,1),	VXR_MASK,    PPCVEC,	{VD, VA, VB}},
--{"udi15fcm.",	APU(4, 995,0),	APU_MASK,    PPC440,	{URT, URA, URB}},
--{"udi15fcm",	APU(4, 995,1),	APU_MASK,    PPC440,	{URT, URA, URB}},
--{"maclhwso",	XO (4, 492,1,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"maclhwso.",	XO (4, 492,1,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"nmaclhwso",	XO (4, 494,1,0),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"nmaclhwso.",	XO (4, 494,1,1),XO_MASK, PPC405|PPC440,	{RT, RA, RB}},
--{"dcbz_l",	X  (4,1014),	XRT_MASK,    PPCPS,	{RA, RB}},
--
--{"mulli",	OP(7),		OP_MASK,     PPCCOM,	{RT, RA, SI}},
--{"muli",	OP(7),		OP_MASK,     PWRCOM,	{RT, RA, SI}},
--
--{"subfic",	OP(8),		OP_MASK,     PPCCOM,	{RT, RA, SI}},
--{"sfi",		OP(8),		OP_MASK,     PWRCOM,	{RT, RA, SI}},
--
--{"dozi",	OP(9),		OP_MASK,     M601,	{RT, RA, SI}},
--
--{"bce",		B(9,0,0),	B_MASK,      BOOKE64,	{BO, BI, BD}},
--{"bcel",	B(9,0,1),	B_MASK,      BOOKE64,	{BO, BI, BD}},
--{"bcea",	B(9,1,0),	B_MASK,      BOOKE64,	{BO, BI, BDA}},
--{"bcela",	B(9,1,1),	B_MASK,      BOOKE64,	{BO, BI, BDA}},
--
--{"cmplwi",	OPL(10,0),	OPL_MASK,    PPCCOM,	{OBF, RA, UI}},
--{"cmpldi",	OPL(10,1),	OPL_MASK,    PPC64,	{OBF, RA, UI}},
--{"cmpli",	OP(10),		OP_MASK,     PPC,	{BF, L, RA, UI}},
--{"cmpli",	OP(10),		OP_MASK,     PWRCOM,	{BF, RA, UI}},
--
--{"cmpwi",	OPL(11,0),	OPL_MASK,    PPCCOM,	{OBF, RA, SI}},
--{"cmpdi",	OPL(11,1),	OPL_MASK,    PPC64,	{OBF, RA, SI}},
--{"cmpi",	OP(11),		OP_MASK,     PPC,	{BF, L, RA, SI}},
--{"cmpi",	OP(11),		OP_MASK,     PWRCOM,	{BF, RA, SI}},
--
--{"addic",	OP(12),		OP_MASK,     PPCCOM,	{RT, RA, SI}},
--{"ai",		OP(12),		OP_MASK,     PWRCOM,	{RT, RA, SI}},
--{"subic",	OP(12),		OP_MASK,     PPCCOM,	{RT, RA, NSI}},
--
--{"addic.",	OP(13),		OP_MASK,     PPCCOM,	{RT, RA, SI}},
--{"ai.",		OP(13),		OP_MASK,     PWRCOM,	{RT, RA, SI}},
--{"subic.",	OP(13),		OP_MASK,     PPCCOM,	{RT, RA, NSI}},
--
--{"li",		OP(14),		DRA_MASK,    PPCCOM,	{RT, SI}},
--{"lil",		OP(14),		DRA_MASK,    PWRCOM,	{RT, SI}},
--{"addi",	OP(14),		OP_MASK,     PPCCOM,	{RT, RA0, SI}},
--{"cal",		OP(14),		OP_MASK,     PWRCOM,	{RT, D, RA0}},
--{"subi",	OP(14),		OP_MASK,     PPCCOM,	{RT, RA0, NSI}},
--{"la",		OP(14),		OP_MASK,     PPCCOM,	{RT, D, RA0}},
--
--{"lis",		OP(15),		DRA_MASK,    PPCCOM,	{RT, SISIGNOPT}},
--{"liu",		OP(15),		DRA_MASK,    PWRCOM,	{RT, SISIGNOPT}},
--{"addis",	OP(15),		OP_MASK,     PPCCOM,	{RT, RA0, SISIGNOPT}},
--{"cau",		OP(15),		OP_MASK,     PWRCOM,	{RT, RA0, SISIGNOPT}},
--{"subis",	OP(15),		OP_MASK,     PPCCOM,	{RT, RA0, NSI}},
--
--{"bdnz-",    BBO(16,BODNZ,0,0),		BBOATBI_MASK,  PPCCOM,	 {BDM}},
--{"bdnz+",    BBO(16,BODNZ,0,0),		BBOATBI_MASK,  PPCCOM,	 {BDP}},
--{"bdnz",     BBO(16,BODNZ,0,0),		BBOATBI_MASK,  PPCCOM,	 {BD}},
--{"bdn",      BBO(16,BODNZ,0,0),		BBOATBI_MASK,  PWRCOM,	 {BD}},
--{"bdnzl-",   BBO(16,BODNZ,0,1),		BBOATBI_MASK,  PPCCOM,	 {BDM}},
--{"bdnzl+",   BBO(16,BODNZ,0,1),		BBOATBI_MASK,  PPCCOM,	 {BDP}},
--{"bdnzl",    BBO(16,BODNZ,0,1),		BBOATBI_MASK,  PPCCOM,	 {BD}},
--{"bdnl",     BBO(16,BODNZ,0,1),		BBOATBI_MASK,  PWRCOM,	 {BD}},
--{"bdnza-",   BBO(16,BODNZ,1,0),		BBOATBI_MASK,  PPCCOM,	 {BDMA}},
--{"bdnza+",   BBO(16,BODNZ,1,0),		BBOATBI_MASK,  PPCCOM,	 {BDPA}},
--{"bdnza",    BBO(16,BODNZ,1,0),		BBOATBI_MASK,  PPCCOM,	 {BDA}},
--{"bdna",     BBO(16,BODNZ,1,0),		BBOATBI_MASK,  PWRCOM,	 {BDA}},
--{"bdnzla-",  BBO(16,BODNZ,1,1),		BBOATBI_MASK,  PPCCOM,	 {BDMA}},
--{"bdnzla+",  BBO(16,BODNZ,1,1),		BBOATBI_MASK,  PPCCOM,	 {BDPA}},
--{"bdnzla",   BBO(16,BODNZ,1,1),		BBOATBI_MASK,  PPCCOM,	 {BDA}},
--{"bdnla",    BBO(16,BODNZ,1,1),		BBOATBI_MASK,  PWRCOM,	 {BDA}},
--{"bdz-",     BBO(16,BODZ,0,0),		BBOATBI_MASK,  PPCCOM,	 {BDM}},
--{"bdz+",     BBO(16,BODZ,0,0),		BBOATBI_MASK,  PPCCOM,	 {BDP}},
--{"bdz",      BBO(16,BODZ,0,0),		BBOATBI_MASK,  COM,	 {BD}},
--{"bdzl-",    BBO(16,BODZ,0,1),		BBOATBI_MASK,  PPCCOM,	 {BDM}},
--{"bdzl+",    BBO(16,BODZ,0,1),		BBOATBI_MASK,  PPCCOM,	 {BDP}},
--{"bdzl",     BBO(16,BODZ,0,1),		BBOATBI_MASK,  COM,	 {BD}},
--{"bdza-",    BBO(16,BODZ,1,0),		BBOATBI_MASK,  PPCCOM,	 {BDMA}},
--{"bdza+",    BBO(16,BODZ,1,0),		BBOATBI_MASK,  PPCCOM,	 {BDPA}},
--{"bdza",     BBO(16,BODZ,1,0),		BBOATBI_MASK,  COM,	 {BDA}},
--{"bdzla-",   BBO(16,BODZ,1,1),		BBOATBI_MASK,  PPCCOM,	 {BDMA}},
--{"bdzla+",   BBO(16,BODZ,1,1),		BBOATBI_MASK,  PPCCOM,	 {BDPA}},
--{"bdzla",    BBO(16,BODZ,1,1),		BBOATBI_MASK,  COM,	 {BDA}},
--
--{"bge-",     BBOCB(16,BOF,CBLT,0,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDM}},
--{"bge+",     BBOCB(16,BOF,CBLT,0,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDP}},
--{"bge",      BBOCB(16,BOF,CBLT,0,0),	BBOATCB_MASK,  COM,	 {CR, BD}},
--{"bnl-",     BBOCB(16,BOF,CBLT,0,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDM}},
--{"bnl+",     BBOCB(16,BOF,CBLT,0,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDP}},
--{"bnl",      BBOCB(16,BOF,CBLT,0,0),	BBOATCB_MASK,  COM,	 {CR, BD}},
--{"bgel-",    BBOCB(16,BOF,CBLT,0,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDM}},
--{"bgel+",    BBOCB(16,BOF,CBLT,0,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDP}},
--{"bgel",     BBOCB(16,BOF,CBLT,0,1),	BBOATCB_MASK,  COM,	 {CR, BD}},
--{"bnll-",    BBOCB(16,BOF,CBLT,0,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDM}},
--{"bnll+",    BBOCB(16,BOF,CBLT,0,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDP}},
--{"bnll",     BBOCB(16,BOF,CBLT,0,1),	BBOATCB_MASK,  COM,	 {CR, BD}},
--{"bgea-",    BBOCB(16,BOF,CBLT,1,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDMA}},
--{"bgea+",    BBOCB(16,BOF,CBLT,1,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDPA}},
--{"bgea",     BBOCB(16,BOF,CBLT,1,0),	BBOATCB_MASK,  COM,	 {CR, BDA}},
--{"bnla-",    BBOCB(16,BOF,CBLT,1,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDMA}},
--{"bnla+",    BBOCB(16,BOF,CBLT,1,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDPA}},
--{"bnla",     BBOCB(16,BOF,CBLT,1,0),	BBOATCB_MASK,  COM,	 {CR, BDA}},
--{"bgela-",   BBOCB(16,BOF,CBLT,1,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDMA}},
--{"bgela+",   BBOCB(16,BOF,CBLT,1,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDPA}},
--{"bgela",    BBOCB(16,BOF,CBLT,1,1),	BBOATCB_MASK,  COM,	 {CR, BDA}},
--{"bnlla-",   BBOCB(16,BOF,CBLT,1,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDMA}},
--{"bnlla+",   BBOCB(16,BOF,CBLT,1,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDPA}},
--{"bnlla",    BBOCB(16,BOF,CBLT,1,1),	BBOATCB_MASK,  COM,	 {CR, BDA}},
--{"ble-",     BBOCB(16,BOF,CBGT,0,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDM}},
--{"ble+",     BBOCB(16,BOF,CBGT,0,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDP}},
--{"ble",      BBOCB(16,BOF,CBGT,0,0),	BBOATCB_MASK,  COM,	 {CR, BD}},
--{"bng-",     BBOCB(16,BOF,CBGT,0,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDM}},
--{"bng+",     BBOCB(16,BOF,CBGT,0,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDP}},
--{"bng",      BBOCB(16,BOF,CBGT,0,0),	BBOATCB_MASK,  COM,	 {CR, BD}},
--{"blel-",    BBOCB(16,BOF,CBGT,0,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDM}},
--{"blel+",    BBOCB(16,BOF,CBGT,0,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDP}},
--{"blel",     BBOCB(16,BOF,CBGT,0,1),	BBOATCB_MASK,  COM,	 {CR, BD}},
--{"bngl-",    BBOCB(16,BOF,CBGT,0,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDM}},
--{"bngl+",    BBOCB(16,BOF,CBGT,0,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDP}},
--{"bngl",     BBOCB(16,BOF,CBGT,0,1),	BBOATCB_MASK,  COM,	 {CR, BD}},
--{"blea-",    BBOCB(16,BOF,CBGT,1,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDMA}},
--{"blea+",    BBOCB(16,BOF,CBGT,1,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDPA}},
--{"blea",     BBOCB(16,BOF,CBGT,1,0),	BBOATCB_MASK,  COM,	 {CR, BDA}},
--{"bnga-",    BBOCB(16,BOF,CBGT,1,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDMA}},
--{"bnga+",    BBOCB(16,BOF,CBGT,1,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDPA}},
--{"bnga",     BBOCB(16,BOF,CBGT,1,0),	BBOATCB_MASK,  COM,	 {CR, BDA}},
--{"blela-",   BBOCB(16,BOF,CBGT,1,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDMA}},
--{"blela+",   BBOCB(16,BOF,CBGT,1,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDPA}},
--{"blela",    BBOCB(16,BOF,CBGT,1,1),	BBOATCB_MASK,  COM,	 {CR, BDA}},
--{"bngla-",   BBOCB(16,BOF,CBGT,1,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDMA}},
--{"bngla+",   BBOCB(16,BOF,CBGT,1,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDPA}},
--{"bngla",    BBOCB(16,BOF,CBGT,1,1),	BBOATCB_MASK,  COM,	 {CR, BDA}},
--{"bne-",     BBOCB(16,BOF,CBEQ,0,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDM}},
--{"bne+",     BBOCB(16,BOF,CBEQ,0,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDP}},
--{"bne",      BBOCB(16,BOF,CBEQ,0,0),	BBOATCB_MASK,  COM,	 {CR, BD}},
--{"bnel-",    BBOCB(16,BOF,CBEQ,0,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDM}},
--{"bnel+",    BBOCB(16,BOF,CBEQ,0,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDP}},
--{"bnel",     BBOCB(16,BOF,CBEQ,0,1),	BBOATCB_MASK,  COM,	 {CR, BD}},
--{"bnea-",    BBOCB(16,BOF,CBEQ,1,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDMA}},
--{"bnea+",    BBOCB(16,BOF,CBEQ,1,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDPA}},
--{"bnea",     BBOCB(16,BOF,CBEQ,1,0),	BBOATCB_MASK,  COM,	 {CR, BDA}},
--{"bnela-",   BBOCB(16,BOF,CBEQ,1,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDMA}},
--{"bnela+",   BBOCB(16,BOF,CBEQ,1,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDPA}},
--{"bnela",    BBOCB(16,BOF,CBEQ,1,1),	BBOATCB_MASK,  COM,	 {CR, BDA}},
--{"bns-",     BBOCB(16,BOF,CBSO,0,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDM}},
--{"bns+",     BBOCB(16,BOF,CBSO,0,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDP}},
--{"bns",      BBOCB(16,BOF,CBSO,0,0),	BBOATCB_MASK,  COM,	 {CR, BD}},
--{"bnu-",     BBOCB(16,BOF,CBSO,0,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDM}},
--{"bnu+",     BBOCB(16,BOF,CBSO,0,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDP}},
--{"bnu",      BBOCB(16,BOF,CBSO,0,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BD}},
--{"bnsl-",    BBOCB(16,BOF,CBSO,0,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDM}},
--{"bnsl+",    BBOCB(16,BOF,CBSO,0,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDP}},
--{"bnsl",     BBOCB(16,BOF,CBSO,0,1),	BBOATCB_MASK,  COM,	 {CR, BD}},
--{"bnul-",    BBOCB(16,BOF,CBSO,0,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDM}},
--{"bnul+",    BBOCB(16,BOF,CBSO,0,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDP}},
--{"bnul",     BBOCB(16,BOF,CBSO,0,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BD}},
--{"bnsa-",    BBOCB(16,BOF,CBSO,1,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDMA}},
--{"bnsa+",    BBOCB(16,BOF,CBSO,1,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDPA}},
--{"bnsa",     BBOCB(16,BOF,CBSO,1,0),	BBOATCB_MASK,  COM,	 {CR, BDA}},
--{"bnua-",    BBOCB(16,BOF,CBSO,1,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDMA}},
--{"bnua+",    BBOCB(16,BOF,CBSO,1,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDPA}},
--{"bnua",     BBOCB(16,BOF,CBSO,1,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDA}},
--{"bnsla-",   BBOCB(16,BOF,CBSO,1,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDMA}},
--{"bnsla+",   BBOCB(16,BOF,CBSO,1,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDPA}},
--{"bnsla",    BBOCB(16,BOF,CBSO,1,1),	BBOATCB_MASK,  COM,	 {CR, BDA}},
--{"bnula-",   BBOCB(16,BOF,CBSO,1,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDMA}},
--{"bnula+",   BBOCB(16,BOF,CBSO,1,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDPA}},
--{"bnula",    BBOCB(16,BOF,CBSO,1,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDA}},
--
--{"blt-",     BBOCB(16,BOT,CBLT,0,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDM}},
--{"blt+",     BBOCB(16,BOT,CBLT,0,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDP}},
--{"blt",      BBOCB(16,BOT,CBLT,0,0),	BBOATCB_MASK,  COM,	 {CR, BD}},
--{"bltl-",    BBOCB(16,BOT,CBLT,0,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDM}},
--{"bltl+",    BBOCB(16,BOT,CBLT,0,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDP}},
--{"bltl",     BBOCB(16,BOT,CBLT,0,1),	BBOATCB_MASK,  COM,	 {CR, BD}},
--{"blta-",    BBOCB(16,BOT,CBLT,1,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDMA}},
--{"blta+",    BBOCB(16,BOT,CBLT,1,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDPA}},
--{"blta",     BBOCB(16,BOT,CBLT,1,0),	BBOATCB_MASK,  COM,	 {CR, BDA}},
--{"bltla-",   BBOCB(16,BOT,CBLT,1,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDMA}},
--{"bltla+",   BBOCB(16,BOT,CBLT,1,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDPA}},
--{"bltla",    BBOCB(16,BOT,CBLT,1,1),	BBOATCB_MASK,  COM,	 {CR, BDA}},
--{"bgt-",     BBOCB(16,BOT,CBGT,0,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDM}},
--{"bgt+",     BBOCB(16,BOT,CBGT,0,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDP}},
--{"bgt",      BBOCB(16,BOT,CBGT,0,0),	BBOATCB_MASK,  COM,	 {CR, BD}},
--{"bgtl-",    BBOCB(16,BOT,CBGT,0,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDM}},
--{"bgtl+",    BBOCB(16,BOT,CBGT,0,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDP}},
--{"bgtl",     BBOCB(16,BOT,CBGT,0,1),	BBOATCB_MASK,  COM,	 {CR, BD}},
--{"bgta-",    BBOCB(16,BOT,CBGT,1,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDMA}},
--{"bgta+",    BBOCB(16,BOT,CBGT,1,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDPA}},
--{"bgta",     BBOCB(16,BOT,CBGT,1,0),	BBOATCB_MASK,  COM,	 {CR, BDA}},
--{"bgtla-",   BBOCB(16,BOT,CBGT,1,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDMA}},
--{"bgtla+",   BBOCB(16,BOT,CBGT,1,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDPA}},
--{"bgtla",    BBOCB(16,BOT,CBGT,1,1),	BBOATCB_MASK,  COM,	 {CR, BDA}},
--{"beq-",     BBOCB(16,BOT,CBEQ,0,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDM}},
--{"beq+",     BBOCB(16,BOT,CBEQ,0,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDP}},
--{"beq",      BBOCB(16,BOT,CBEQ,0,0),	BBOATCB_MASK,  COM,	 {CR, BD}},
--{"beql-",    BBOCB(16,BOT,CBEQ,0,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDM}},
--{"beql+",    BBOCB(16,BOT,CBEQ,0,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDP}},
--{"beql",     BBOCB(16,BOT,CBEQ,0,1),	BBOATCB_MASK,  COM,	 {CR, BD}},
--{"beqa-",    BBOCB(16,BOT,CBEQ,1,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDMA}},
--{"beqa+",    BBOCB(16,BOT,CBEQ,1,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDPA}},
--{"beqa",     BBOCB(16,BOT,CBEQ,1,0),	BBOATCB_MASK,  COM,	 {CR, BDA}},
--{"beqla-",   BBOCB(16,BOT,CBEQ,1,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDMA}},
--{"beqla+",   BBOCB(16,BOT,CBEQ,1,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDPA}},
--{"beqla",    BBOCB(16,BOT,CBEQ,1,1),	BBOATCB_MASK,  COM,	 {CR, BDA}},
--{"bso-",     BBOCB(16,BOT,CBSO,0,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDM}},
--{"bso+",     BBOCB(16,BOT,CBSO,0,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDP}},
--{"bso",      BBOCB(16,BOT,CBSO,0,0),	BBOATCB_MASK,  COM,	 {CR, BD}},
--{"bun-",     BBOCB(16,BOT,CBSO,0,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDM}},
--{"bun+",     BBOCB(16,BOT,CBSO,0,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDP}},
--{"bun",      BBOCB(16,BOT,CBSO,0,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BD}},
--{"bsol-",    BBOCB(16,BOT,CBSO,0,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDM}},
--{"bsol+",    BBOCB(16,BOT,CBSO,0,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDP}},
--{"bsol",     BBOCB(16,BOT,CBSO,0,1),	BBOATCB_MASK,  COM,	 {CR, BD}},
--{"bunl-",    BBOCB(16,BOT,CBSO,0,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDM}},
--{"bunl+",    BBOCB(16,BOT,CBSO,0,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDP}},
--{"bunl",     BBOCB(16,BOT,CBSO,0,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BD}},
--{"bsoa-",    BBOCB(16,BOT,CBSO,1,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDMA}},
--{"bsoa+",    BBOCB(16,BOT,CBSO,1,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDPA}},
--{"bsoa",     BBOCB(16,BOT,CBSO,1,0),	BBOATCB_MASK,  COM,	 {CR, BDA}},
--{"buna-",    BBOCB(16,BOT,CBSO,1,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDMA}},
--{"buna+",    BBOCB(16,BOT,CBSO,1,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDPA}},
--{"buna",     BBOCB(16,BOT,CBSO,1,0),	BBOATCB_MASK,  PPCCOM,	 {CR, BDA}},
--{"bsola-",   BBOCB(16,BOT,CBSO,1,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDMA}},
--{"bsola+",   BBOCB(16,BOT,CBSO,1,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDPA}},
--{"bsola",    BBOCB(16,BOT,CBSO,1,1),	BBOATCB_MASK,  COM,	 {CR, BDA}},
--{"bunla-",   BBOCB(16,BOT,CBSO,1,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDMA}},
--{"bunla+",   BBOCB(16,BOT,CBSO,1,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDPA}},
--{"bunla",    BBOCB(16,BOT,CBSO,1,1),	BBOATCB_MASK,  PPCCOM,	 {CR, BDA}},
--
--{"bdnzf-",   BBO(16,BODNZF,0,0),	BBOY_MASK,     NOPOWER4, {BI, BDM}},
--{"bdnzf+",   BBO(16,BODNZF,0,0),	BBOY_MASK,     NOPOWER4, {BI, BDP}},
--{"bdnzf",    BBO(16,BODNZF,0,0),	BBOY_MASK,     PPCCOM,	 {BI, BD}},
--{"bdnzfl-",  BBO(16,BODNZF,0,1),	BBOY_MASK,     NOPOWER4, {BI, BDM}},
--{"bdnzfl+",  BBO(16,BODNZF,0,1),	BBOY_MASK,     NOPOWER4, {BI, BDP}},
--{"bdnzfl",   BBO(16,BODNZF,0,1),	BBOY_MASK,     PPCCOM,	 {BI, BD}},
--{"bdnzfa-",  BBO(16,BODNZF,1,0),	BBOY_MASK,     NOPOWER4, {BI, BDMA}},
--{"bdnzfa+",  BBO(16,BODNZF,1,0),	BBOY_MASK,     NOPOWER4, {BI, BDPA}},
--{"bdnzfa",   BBO(16,BODNZF,1,0),	BBOY_MASK,     PPCCOM,	 {BI, BDA}},
--{"bdnzfla-", BBO(16,BODNZF,1,1),	BBOY_MASK,     NOPOWER4, {BI, BDMA}},
--{"bdnzfla+", BBO(16,BODNZF,1,1),	BBOY_MASK,     NOPOWER4, {BI, BDPA}},
--{"bdnzfla",  BBO(16,BODNZF,1,1),	BBOY_MASK,     PPCCOM,	 {BI, BDA}},
--{"bdzf-",    BBO(16,BODZF,0,0),		BBOY_MASK,     NOPOWER4, {BI, BDM}},
--{"bdzf+",    BBO(16,BODZF,0,0),		BBOY_MASK,     NOPOWER4, {BI, BDP}},
--{"bdzf",     BBO(16,BODZF,0,0),		BBOY_MASK,     PPCCOM,	 {BI, BD}},
--{"bdzfl-",   BBO(16,BODZF,0,1),		BBOY_MASK,     NOPOWER4, {BI, BDM}},
--{"bdzfl+",   BBO(16,BODZF,0,1),		BBOY_MASK,     NOPOWER4, {BI, BDP}},
--{"bdzfl",    BBO(16,BODZF,0,1),		BBOY_MASK,     PPCCOM,	 {BI, BD}},
--{"bdzfa-",   BBO(16,BODZF,1,0),		BBOY_MASK,     NOPOWER4, {BI, BDMA}},
--{"bdzfa+",   BBO(16,BODZF,1,0),		BBOY_MASK,     NOPOWER4, {BI, BDPA}},
--{"bdzfa",    BBO(16,BODZF,1,0),		BBOY_MASK,     PPCCOM,	 {BI, BDA}},
--{"bdzfla-",  BBO(16,BODZF,1,1),		BBOY_MASK,     NOPOWER4, {BI, BDMA}},
--{"bdzfla+",  BBO(16,BODZF,1,1),		BBOY_MASK,     NOPOWER4, {BI, BDPA}},
--{"bdzfla",   BBO(16,BODZF,1,1),		BBOY_MASK,     PPCCOM,	 {BI, BDA}},
--
--{"bf-",      BBO(16,BOF,0,0),		BBOAT_MASK,    PPCCOM,	 {BI, BDM}},
--{"bf+",      BBO(16,BOF,0,0),		BBOAT_MASK,    PPCCOM,	 {BI, BDP}},
--{"bf",	     BBO(16,BOF,0,0),		BBOAT_MASK,    PPCCOM,	 {BI, BD}},
--{"bbf",      BBO(16,BOF,0,0),		BBOAT_MASK,    PWRCOM,	 {BI, BD}},
--{"bfl-",     BBO(16,BOF,0,1),		BBOAT_MASK,    PPCCOM,	 {BI, BDM}},
--{"bfl+",     BBO(16,BOF,0,1),		BBOAT_MASK,    PPCCOM,	 {BI, BDP}},
--{"bfl",      BBO(16,BOF,0,1),		BBOAT_MASK,    PPCCOM,	 {BI, BD}},
--{"bbfl",     BBO(16,BOF,0,1),		BBOAT_MASK,    PWRCOM,	 {BI, BD}},
--{"bfa-",     BBO(16,BOF,1,0),		BBOAT_MASK,    PPCCOM,	 {BI, BDMA}},
--{"bfa+",     BBO(16,BOF,1,0),		BBOAT_MASK,    PPCCOM,	 {BI, BDPA}},
--{"bfa",      BBO(16,BOF,1,0),		BBOAT_MASK,    PPCCOM,	 {BI, BDA}},
--{"bbfa",     BBO(16,BOF,1,0),		BBOAT_MASK,    PWRCOM,	 {BI, BDA}},
--{"bfla-",    BBO(16,BOF,1,1),		BBOAT_MASK,    PPCCOM,	 {BI, BDMA}},
--{"bfla+",    BBO(16,BOF,1,1),		BBOAT_MASK,    PPCCOM,	 {BI, BDPA}},
--{"bfla",     BBO(16,BOF,1,1),		BBOAT_MASK,    PPCCOM,	 {BI, BDA}},
--{"bbfla",    BBO(16,BOF,1,1),		BBOAT_MASK,    PWRCOM,	 {BI, BDA}},
--
--{"bdnzt-",   BBO(16,BODNZT,0,0),	BBOY_MASK,     NOPOWER4, {BI, BDM}},
--{"bdnzt+",   BBO(16,BODNZT,0,0),	BBOY_MASK,     NOPOWER4, {BI, BDP}},
--{"bdnzt",    BBO(16,BODNZT,0,0),	BBOY_MASK,     PPCCOM,	 {BI, BD}},
--{"bdnztl-",  BBO(16,BODNZT,0,1),	BBOY_MASK,     NOPOWER4, {BI, BDM}},
--{"bdnztl+",  BBO(16,BODNZT,0,1),	BBOY_MASK,     NOPOWER4, {BI, BDP}},
--{"bdnztl",   BBO(16,BODNZT,0,1),	BBOY_MASK,     PPCCOM,	 {BI, BD}},
--{"bdnzta-",  BBO(16,BODNZT,1,0),	BBOY_MASK,     NOPOWER4, {BI, BDMA}},
--{"bdnzta+",  BBO(16,BODNZT,1,0),	BBOY_MASK,     NOPOWER4, {BI, BDPA}},
--{"bdnzta",   BBO(16,BODNZT,1,0),	BBOY_MASK,     PPCCOM,	 {BI, BDA}},
--{"bdnztla-", BBO(16,BODNZT,1,1),	BBOY_MASK,     NOPOWER4, {BI, BDMA}},
--{"bdnztla+", BBO(16,BODNZT,1,1),	BBOY_MASK,     NOPOWER4, {BI, BDPA}},
--{"bdnztla",  BBO(16,BODNZT,1,1),	BBOY_MASK,     PPCCOM,	 {BI, BDA}},
--{"bdzt-",    BBO(16,BODZT,0,0),		BBOY_MASK,     NOPOWER4, {BI, BDM}},
--{"bdzt+",    BBO(16,BODZT,0,0),		BBOY_MASK,     NOPOWER4, {BI, BDP}},
--{"bdzt",     BBO(16,BODZT,0,0),		BBOY_MASK,     PPCCOM,	 {BI, BD}},
--{"bdztl-",   BBO(16,BODZT,0,1),		BBOY_MASK,     NOPOWER4, {BI, BDM}},
--{"bdztl+",   BBO(16,BODZT,0,1),		BBOY_MASK,     NOPOWER4, {BI, BDP}},
--{"bdztl",    BBO(16,BODZT,0,1),		BBOY_MASK,     PPCCOM,	 {BI, BD}},
--{"bdzta-",   BBO(16,BODZT,1,0),		BBOY_MASK,     NOPOWER4, {BI, BDMA}},
--{"bdzta+",   BBO(16,BODZT,1,0),		BBOY_MASK,     NOPOWER4, {BI, BDPA}},
--{"bdzta",    BBO(16,BODZT,1,0),		BBOY_MASK,     PPCCOM,	 {BI, BDA}},
--{"bdztla-",  BBO(16,BODZT,1,1),		BBOY_MASK,     NOPOWER4, {BI, BDMA}},
--{"bdztla+",  BBO(16,BODZT,1,1),		BBOY_MASK,     NOPOWER4, {BI, BDPA}},
--{"bdztla",   BBO(16,BODZT,1,1),		BBOY_MASK,     PPCCOM,	 {BI, BDA}},
--
--{"bt-",      BBO(16,BOT,0,0),		BBOAT_MASK,    PPCCOM,	 {BI, BDM}},
--{"bt+",      BBO(16,BOT,0,0),		BBOAT_MASK,    PPCCOM,	 {BI, BDP}},
--{"bt",	     BBO(16,BOT,0,0),		BBOAT_MASK,    PPCCOM,	 {BI, BD}},
--{"bbt",      BBO(16,BOT,0,0),		BBOAT_MASK,    PWRCOM,	 {BI, BD}},
--{"btl-",     BBO(16,BOT,0,1),		BBOAT_MASK,    PPCCOM,	 {BI, BDM}},
--{"btl+",     BBO(16,BOT,0,1),		BBOAT_MASK,    PPCCOM,	 {BI, BDP}},
--{"btl",      BBO(16,BOT,0,1),		BBOAT_MASK,    PPCCOM,	 {BI, BD}},
--{"bbtl",     BBO(16,BOT,0,1),		BBOAT_MASK,    PWRCOM,	 {BI, BD}},
--{"bta-",     BBO(16,BOT,1,0),		BBOAT_MASK,    PPCCOM,	 {BI, BDMA}},
--{"bta+",     BBO(16,BOT,1,0),		BBOAT_MASK,    PPCCOM,	 {BI, BDPA}},
--{"bta",      BBO(16,BOT,1,0),		BBOAT_MASK,    PPCCOM,	 {BI, BDA}},
--{"bbta",     BBO(16,BOT,1,0),		BBOAT_MASK,    PWRCOM,	 {BI, BDA}},
--{"btla-",    BBO(16,BOT,1,1),		BBOAT_MASK,    PPCCOM,	 {BI, BDMA}},
--{"btla+",    BBO(16,BOT,1,1),		BBOAT_MASK,    PPCCOM,	 {BI, BDPA}},
--{"btla",     BBO(16,BOT,1,1),		BBOAT_MASK,    PPCCOM,	 {BI, BDA}},
--{"bbtla",    BBO(16,BOT,1,1),		BBOAT_MASK,    PWRCOM,	 {BI, BDA}},
--
--{"bc-",		B(16,0,0),	B_MASK,      PPCCOM,	{BOE, BI, BDM}},
--{"bc+",		B(16,0,0),	B_MASK,      PPCCOM,	{BOE, BI, BDP}},
--{"bc",		B(16,0,0),	B_MASK,      COM,	{BO, BI, BD}},
--{"bcl-",	B(16,0,1),	B_MASK,      PPCCOM,	{BOE, BI, BDM}},
--{"bcl+",	B(16,0,1),	B_MASK,      PPCCOM,	{BOE, BI, BDP}},
--{"bcl",		B(16,0,1),	B_MASK,      COM,	{BO, BI, BD}},
--{"bca-",	B(16,1,0),	B_MASK,      PPCCOM,	{BOE, BI, BDMA}},
--{"bca+",	B(16,1,0),	B_MASK,      PPCCOM,	{BOE, BI, BDPA}},
--{"bca",		B(16,1,0),	B_MASK,      COM,	{BO, BI, BDA}},
--{"bcla-",	B(16,1,1),	B_MASK,      PPCCOM,	{BOE, BI, BDMA}},
--{"bcla+",	B(16,1,1),	B_MASK,      PPCCOM,	{BOE, BI, BDPA}},
--{"bcla",	B(16,1,1),	B_MASK,      COM,	{BO, BI, BDA}},
--
--{"svc",		SC(17,0,0),	SC_MASK,     POWER,	{SVC_LEV, FL1, FL2}},
--{"svcl",	SC(17,0,1),	SC_MASK,     POWER,	{SVC_LEV, FL1, FL2}},
--{"sc",		SC(17,1,0),	SC_MASK,     PPC,	{LEV}},
--{"svca",	SC(17,1,0),	SC_MASK,     PWRCOM,	{SV}},
--{"svcla",	SC(17,1,1),	SC_MASK,     POWER,	{SV}},
--
--{"b",		B(18,0,0),	B_MASK,      COM,	{LI}},
--{"bl",		B(18,0,1),	B_MASK,      COM,	{LI}},
--{"ba",		B(18,1,0),	B_MASK,      COM,	{LIA}},
--{"bla",		B(18,1,1),	B_MASK,      COM,	{LIA}},
--
--{"mcrf",      XL(19,0), XLBB_MASK|(3<<21)|(3<<16), COM,	{BF, BFA}},
--
--{"bdnzlr",   XLO(19,BODNZ,16,0),	XLBOBIBB_MASK, PPCCOM,	 {0}},
--{"bdnzlr-",  XLO(19,BODNZ,16,0),	XLBOBIBB_MASK, NOPOWER4, {0}},
--{"bdnzlrl",  XLO(19,BODNZ,16,1),	XLBOBIBB_MASK, PPCCOM,	 {0}},
--{"bdnzlrl-", XLO(19,BODNZ,16,1),	XLBOBIBB_MASK, NOPOWER4, {0}},
--{"bdnzlr+",  XLO(19,BODNZP,16,0),	XLBOBIBB_MASK, NOPOWER4, {0}},
--{"bdnzlrl+", XLO(19,BODNZP,16,1),	XLBOBIBB_MASK, NOPOWER4, {0}},
--{"bdzlr",    XLO(19,BODZ,16,0),		XLBOBIBB_MASK, PPCCOM,	 {0}},
--{"bdzlr-",   XLO(19,BODZ,16,0),		XLBOBIBB_MASK, NOPOWER4, {0}},
--{"bdzlrl",   XLO(19,BODZ,16,1),		XLBOBIBB_MASK, PPCCOM,	 {0}},
--{"bdzlrl-",  XLO(19,BODZ,16,1),		XLBOBIBB_MASK, NOPOWER4, {0}},
--{"bdzlr+",   XLO(19,BODZP,16,0),	XLBOBIBB_MASK, NOPOWER4, {0}},
--{"bdzlrl+",  XLO(19,BODZP,16,1),	XLBOBIBB_MASK, NOPOWER4, {0}},
--{"blr",      XLO(19,BOU,16,0),		XLBOBIBB_MASK, PPCCOM,	 {0}},
--{"br",	     XLO(19,BOU,16,0),		XLBOBIBB_MASK, PWRCOM,	 {0}},
--{"blrl",     XLO(19,BOU,16,1),		XLBOBIBB_MASK, PPCCOM,	 {0}},
--{"brl",      XLO(19,BOU,16,1),		XLBOBIBB_MASK, PWRCOM,	 {0}},
--{"bdnzlr-",  XLO(19,BODNZM4,16,0),	XLBOBIBB_MASK, POWER4,	 {0}},
--{"bdnzlrl-", XLO(19,BODNZM4,16,1),	XLBOBIBB_MASK, POWER4,	 {0}},
--{"bdnzlr+",  XLO(19,BODNZP4,16,0),	XLBOBIBB_MASK, POWER4,	 {0}},
--{"bdnzlrl+", XLO(19,BODNZP4,16,1),	XLBOBIBB_MASK, POWER4,	 {0}},
--{"bdzlr-",   XLO(19,BODZM4,16,0),	XLBOBIBB_MASK, POWER4,	 {0}},
--{"bdzlrl-",  XLO(19,BODZM4,16,1),	XLBOBIBB_MASK, POWER4,	 {0}},
--{"bdzlr+",   XLO(19,BODZP4,16,0),	XLBOBIBB_MASK, POWER4,	 {0}},
--{"bdzlrl+",  XLO(19,BODZP4,16,1),	XLBOBIBB_MASK, POWER4,	 {0}},
--
--{"bgelr",    XLOCB(19,BOF,CBLT,16,0),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bgelr-",   XLOCB(19,BOF,CBLT,16,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bger",     XLOCB(19,BOF,CBLT,16,0),	XLBOCBBB_MASK, PWRCOM,	 {CR}},
--{"bnllr",    XLOCB(19,BOF,CBLT,16,0),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bnllr-",   XLOCB(19,BOF,CBLT,16,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnlr",     XLOCB(19,BOF,CBLT,16,0),	XLBOCBBB_MASK, PWRCOM,	 {CR}},
--{"bgelrl",   XLOCB(19,BOF,CBLT,16,1),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bgelrl-",  XLOCB(19,BOF,CBLT,16,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bgerl",    XLOCB(19,BOF,CBLT,16,1),	XLBOCBBB_MASK, PWRCOM,	 {CR}},
--{"bnllrl",   XLOCB(19,BOF,CBLT,16,1),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bnllrl-",  XLOCB(19,BOF,CBLT,16,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnlrl",    XLOCB(19,BOF,CBLT,16,1),	XLBOCBBB_MASK, PWRCOM,	 {CR}},
--{"blelr",    XLOCB(19,BOF,CBGT,16,0),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"blelr-",   XLOCB(19,BOF,CBGT,16,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bler",     XLOCB(19,BOF,CBGT,16,0),	XLBOCBBB_MASK, PWRCOM,	 {CR}},
--{"bnglr",    XLOCB(19,BOF,CBGT,16,0),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bnglr-",   XLOCB(19,BOF,CBGT,16,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bngr",     XLOCB(19,BOF,CBGT,16,0),	XLBOCBBB_MASK, PWRCOM,	 {CR}},
--{"blelrl",   XLOCB(19,BOF,CBGT,16,1),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"blelrl-",  XLOCB(19,BOF,CBGT,16,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"blerl",    XLOCB(19,BOF,CBGT,16,1),	XLBOCBBB_MASK, PWRCOM,	 {CR}},
--{"bnglrl",   XLOCB(19,BOF,CBGT,16,1),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bnglrl-",  XLOCB(19,BOF,CBGT,16,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bngrl",    XLOCB(19,BOF,CBGT,16,1),	XLBOCBBB_MASK, PWRCOM,	 {CR}},
--{"bnelr",    XLOCB(19,BOF,CBEQ,16,0),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bnelr-",   XLOCB(19,BOF,CBEQ,16,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bner",     XLOCB(19,BOF,CBEQ,16,0),	XLBOCBBB_MASK, PWRCOM,	 {CR}},
--{"bnelrl",   XLOCB(19,BOF,CBEQ,16,1),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bnelrl-",  XLOCB(19,BOF,CBEQ,16,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnerl",    XLOCB(19,BOF,CBEQ,16,1),	XLBOCBBB_MASK, PWRCOM,	 {CR}},
--{"bnslr",    XLOCB(19,BOF,CBSO,16,0),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bnslr-",   XLOCB(19,BOF,CBSO,16,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnsr",     XLOCB(19,BOF,CBSO,16,0),	XLBOCBBB_MASK, PWRCOM,	 {CR}},
--{"bnulr",    XLOCB(19,BOF,CBSO,16,0),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bnulr-",   XLOCB(19,BOF,CBSO,16,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnslrl",   XLOCB(19,BOF,CBSO,16,1),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bnslrl-",  XLOCB(19,BOF,CBSO,16,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnsrl",    XLOCB(19,BOF,CBSO,16,1),	XLBOCBBB_MASK, PWRCOM,	 {CR}},
--{"bnulrl",   XLOCB(19,BOF,CBSO,16,1),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bnulrl-",  XLOCB(19,BOF,CBSO,16,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bgelr+",   XLOCB(19,BOFP,CBLT,16,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnllr+",   XLOCB(19,BOFP,CBLT,16,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bgelrl+",  XLOCB(19,BOFP,CBLT,16,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnllrl+",  XLOCB(19,BOFP,CBLT,16,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"blelr+",   XLOCB(19,BOFP,CBGT,16,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnglr+",   XLOCB(19,BOFP,CBGT,16,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"blelrl+",  XLOCB(19,BOFP,CBGT,16,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnglrl+",  XLOCB(19,BOFP,CBGT,16,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnelr+",   XLOCB(19,BOFP,CBEQ,16,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnelrl+",  XLOCB(19,BOFP,CBEQ,16,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnslr+",   XLOCB(19,BOFP,CBSO,16,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnulr+",   XLOCB(19,BOFP,CBSO,16,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnslrl+",  XLOCB(19,BOFP,CBSO,16,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnulrl+",  XLOCB(19,BOFP,CBSO,16,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bgelr-",   XLOCB(19,BOFM4,CBLT,16,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnllr-",   XLOCB(19,BOFM4,CBLT,16,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bgelrl-",  XLOCB(19,BOFM4,CBLT,16,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnllrl-",  XLOCB(19,BOFM4,CBLT,16,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"blelr-",   XLOCB(19,BOFM4,CBGT,16,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnglr-",   XLOCB(19,BOFM4,CBGT,16,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"blelrl-",  XLOCB(19,BOFM4,CBGT,16,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnglrl-",  XLOCB(19,BOFM4,CBGT,16,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnelr-",   XLOCB(19,BOFM4,CBEQ,16,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnelrl-",  XLOCB(19,BOFM4,CBEQ,16,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnslr-",   XLOCB(19,BOFM4,CBSO,16,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnulr-",   XLOCB(19,BOFM4,CBSO,16,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnslrl-",  XLOCB(19,BOFM4,CBSO,16,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnulrl-",  XLOCB(19,BOFM4,CBSO,16,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bgelr+",   XLOCB(19,BOFP4,CBLT,16,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnllr+",   XLOCB(19,BOFP4,CBLT,16,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bgelrl+",  XLOCB(19,BOFP4,CBLT,16,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnllrl+",  XLOCB(19,BOFP4,CBLT,16,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"blelr+",   XLOCB(19,BOFP4,CBGT,16,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnglr+",   XLOCB(19,BOFP4,CBGT,16,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"blelrl+",  XLOCB(19,BOFP4,CBGT,16,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnglrl+",  XLOCB(19,BOFP4,CBGT,16,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnelr+",   XLOCB(19,BOFP4,CBEQ,16,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnelrl+",  XLOCB(19,BOFP4,CBEQ,16,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnslr+",   XLOCB(19,BOFP4,CBSO,16,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnulr+",   XLOCB(19,BOFP4,CBSO,16,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnslrl+",  XLOCB(19,BOFP4,CBSO,16,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnulrl+",  XLOCB(19,BOFP4,CBSO,16,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bltlr",    XLOCB(19,BOT,CBLT,16,0),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bltlr-",   XLOCB(19,BOT,CBLT,16,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bltr",     XLOCB(19,BOT,CBLT,16,0),	XLBOCBBB_MASK, PWRCOM,	 {CR}},
--{"bltlrl",   XLOCB(19,BOT,CBLT,16,1),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bltlrl-",  XLOCB(19,BOT,CBLT,16,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bltrl",    XLOCB(19,BOT,CBLT,16,1),	XLBOCBBB_MASK, PWRCOM,	 {CR}},
--{"bgtlr",    XLOCB(19,BOT,CBGT,16,0),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bgtlr-",   XLOCB(19,BOT,CBGT,16,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bgtr",     XLOCB(19,BOT,CBGT,16,0),	XLBOCBBB_MASK, PWRCOM,	 {CR}},
--{"bgtlrl",   XLOCB(19,BOT,CBGT,16,1),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bgtlrl-",  XLOCB(19,BOT,CBGT,16,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bgtrl",    XLOCB(19,BOT,CBGT,16,1),	XLBOCBBB_MASK, PWRCOM,	 {CR}},
--{"beqlr",    XLOCB(19,BOT,CBEQ,16,0),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"beqlr-",   XLOCB(19,BOT,CBEQ,16,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"beqr",     XLOCB(19,BOT,CBEQ,16,0),	XLBOCBBB_MASK, PWRCOM,	 {CR}},
--{"beqlrl",   XLOCB(19,BOT,CBEQ,16,1),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"beqlrl-",  XLOCB(19,BOT,CBEQ,16,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"beqrl",    XLOCB(19,BOT,CBEQ,16,1),	XLBOCBBB_MASK, PWRCOM,	 {CR}},
--{"bsolr",    XLOCB(19,BOT,CBSO,16,0),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bsolr-",   XLOCB(19,BOT,CBSO,16,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bsor",     XLOCB(19,BOT,CBSO,16,0),	XLBOCBBB_MASK, PWRCOM,	 {CR}},
--{"bunlr",    XLOCB(19,BOT,CBSO,16,0),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bunlr-",   XLOCB(19,BOT,CBSO,16,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bsolrl",   XLOCB(19,BOT,CBSO,16,1),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bsolrl-",  XLOCB(19,BOT,CBSO,16,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bsorl",    XLOCB(19,BOT,CBSO,16,1),	XLBOCBBB_MASK, PWRCOM,	 {CR}},
--{"bunlrl",   XLOCB(19,BOT,CBSO,16,1),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bunlrl-",  XLOCB(19,BOT,CBSO,16,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bltlr+",   XLOCB(19,BOTP,CBLT,16,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bltlrl+",  XLOCB(19,BOTP,CBLT,16,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bgtlr+",   XLOCB(19,BOTP,CBGT,16,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bgtlrl+",  XLOCB(19,BOTP,CBGT,16,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"beqlr+",   XLOCB(19,BOTP,CBEQ,16,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"beqlrl+",  XLOCB(19,BOTP,CBEQ,16,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bsolr+",   XLOCB(19,BOTP,CBSO,16,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bunlr+",   XLOCB(19,BOTP,CBSO,16,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bsolrl+",  XLOCB(19,BOTP,CBSO,16,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bunlrl+",  XLOCB(19,BOTP,CBSO,16,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bltlr-",   XLOCB(19,BOTM4,CBLT,16,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bltlrl-",  XLOCB(19,BOTM4,CBLT,16,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bgtlr-",   XLOCB(19,BOTM4,CBGT,16,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bgtlrl-",  XLOCB(19,BOTM4,CBGT,16,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"beqlr-",   XLOCB(19,BOTM4,CBEQ,16,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"beqlrl-",  XLOCB(19,BOTM4,CBEQ,16,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bsolr-",   XLOCB(19,BOTM4,CBSO,16,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bunlr-",   XLOCB(19,BOTM4,CBSO,16,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bsolrl-",  XLOCB(19,BOTM4,CBSO,16,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bunlrl-",  XLOCB(19,BOTM4,CBSO,16,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bltlr+",   XLOCB(19,BOTP4,CBLT,16,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bltlrl+",  XLOCB(19,BOTP4,CBLT,16,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bgtlr+",   XLOCB(19,BOTP4,CBGT,16,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bgtlrl+",  XLOCB(19,BOTP4,CBGT,16,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"beqlr+",   XLOCB(19,BOTP4,CBEQ,16,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"beqlrl+",  XLOCB(19,BOTP4,CBEQ,16,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bsolr+",   XLOCB(19,BOTP4,CBSO,16,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bunlr+",   XLOCB(19,BOTP4,CBSO,16,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bsolrl+",  XLOCB(19,BOTP4,CBSO,16,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bunlrl+",  XLOCB(19,BOTP4,CBSO,16,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--
--{"bdnzflr",  XLO(19,BODNZF,16,0),	XLBOBB_MASK,   PPCCOM,	 {BI}},
--{"bdnzflr-", XLO(19,BODNZF,16,0),	XLBOBB_MASK,   NOPOWER4, {BI}},
--{"bdnzflrl", XLO(19,BODNZF,16,1),	XLBOBB_MASK,   PPCCOM,	 {BI}},
--{"bdnzflrl-",XLO(19,BODNZF,16,1),	XLBOBB_MASK,   NOPOWER4, {BI}},
--{"bdnzflr+", XLO(19,BODNZFP,16,0),	XLBOBB_MASK,   NOPOWER4, {BI}},
--{"bdnzflrl+",XLO(19,BODNZFP,16,1),	XLBOBB_MASK,   NOPOWER4, {BI}},
--{"bdzflr",   XLO(19,BODZF,16,0),	XLBOBB_MASK,   PPCCOM,	 {BI}},
--{"bdzflr-",  XLO(19,BODZF,16,0),	XLBOBB_MASK,   NOPOWER4, {BI}},
--{"bdzflrl",  XLO(19,BODZF,16,1),	XLBOBB_MASK,   PPCCOM,	 {BI}},
--{"bdzflrl-", XLO(19,BODZF,16,1),	XLBOBB_MASK,   NOPOWER4, {BI}},
--{"bdzflr+",  XLO(19,BODZFP,16,0),	XLBOBB_MASK,   NOPOWER4, {BI}},
--{"bdzflrl+", XLO(19,BODZFP,16,1),	XLBOBB_MASK,   NOPOWER4, {BI}},
--{"bflr",     XLO(19,BOF,16,0),		XLBOBB_MASK,   PPCCOM,	 {BI}},
--{"bflr-",    XLO(19,BOF,16,0),		XLBOBB_MASK,   NOPOWER4, {BI}},
--{"bbfr",     XLO(19,BOF,16,0),		XLBOBB_MASK,   PWRCOM,	 {BI}},
--{"bflrl",    XLO(19,BOF,16,1),		XLBOBB_MASK,   PPCCOM,	 {BI}},
--{"bflrl-",   XLO(19,BOF,16,1),		XLBOBB_MASK,   NOPOWER4, {BI}},
--{"bbfrl",    XLO(19,BOF,16,1),		XLBOBB_MASK,   PWRCOM,	 {BI}},
--{"bflr+",    XLO(19,BOFP,16,0),		XLBOBB_MASK,   NOPOWER4, {BI}},
--{"bflrl+",   XLO(19,BOFP,16,1),		XLBOBB_MASK,   NOPOWER4, {BI}},
--{"bflr-",    XLO(19,BOFM4,16,0),	XLBOBB_MASK,   POWER4,	 {BI}},
--{"bflrl-",   XLO(19,BOFM4,16,1),	XLBOBB_MASK,   POWER4,	 {BI}},
--{"bflr+",    XLO(19,BOFP4,16,0),	XLBOBB_MASK,   POWER4,	 {BI}},
--{"bflrl+",   XLO(19,BOFP4,16,1),	XLBOBB_MASK,   POWER4,	 {BI}},
--{"bdnztlr",  XLO(19,BODNZT,16,0),	XLBOBB_MASK,   PPCCOM,	 {BI}},
--{"bdnztlr-", XLO(19,BODNZT,16,0),	XLBOBB_MASK,   NOPOWER4, {BI}},
--{"bdnztlrl", XLO(19,BODNZT,16,1),	XLBOBB_MASK,   PPCCOM,	 {BI}},
--{"bdnztlrl-",XLO(19,BODNZT,16,1),	XLBOBB_MASK,   NOPOWER4, {BI}},
--{"bdnztlr+", XLO(19,BODNZTP,16,0),	XLBOBB_MASK,   NOPOWER4, {BI}},
--{"bdnztlrl+",XLO(19,BODNZTP,16,1),	XLBOBB_MASK,   NOPOWER4, {BI}},
--{"bdztlr",   XLO(19,BODZT,16,0),	XLBOBB_MASK,   PPCCOM,	 {BI}},
--{"bdztlr-",  XLO(19,BODZT,16,0),	XLBOBB_MASK,   NOPOWER4, {BI}},
--{"bdztlrl",  XLO(19,BODZT,16,1),	XLBOBB_MASK,   PPCCOM,	 {BI}},
--{"bdztlrl-", XLO(19,BODZT,16,1),	XLBOBB_MASK,   NOPOWER4, {BI}},
--{"bdztlr+",  XLO(19,BODZTP,16,0),	XLBOBB_MASK,   NOPOWER4, {BI}},
--{"bdztlrl+", XLO(19,BODZTP,16,1),	XLBOBB_MASK,   NOPOWER4, {BI}},
--{"btlr",     XLO(19,BOT,16,0),		XLBOBB_MASK,   PPCCOM,	 {BI}},
--{"btlr-",    XLO(19,BOT,16,0),		XLBOBB_MASK,   NOPOWER4, {BI}},
--{"bbtr",     XLO(19,BOT,16,0),		XLBOBB_MASK,   PWRCOM,	 {BI}},
--{"btlrl",    XLO(19,BOT,16,1),		XLBOBB_MASK,   PPCCOM,	 {BI}},
--{"btlrl-",   XLO(19,BOT,16,1),		XLBOBB_MASK,   NOPOWER4, {BI}},
--{"bbtrl",    XLO(19,BOT,16,1),		XLBOBB_MASK,   PWRCOM,	 {BI}},
--{"btlr+",    XLO(19,BOTP,16,0),		XLBOBB_MASK,   NOPOWER4, {BI}},
--{"btlrl+",   XLO(19,BOTP,16,1),		XLBOBB_MASK,   NOPOWER4, {BI}},
--{"btlr-",    XLO(19,BOTM4,16,0),	XLBOBB_MASK,   POWER4,	 {BI}},
--{"btlrl-",   XLO(19,BOTM4,16,1),	XLBOBB_MASK,   POWER4,	 {BI}},
--{"btlr+",    XLO(19,BOTP4,16,0),	XLBOBB_MASK,   POWER4,	 {BI}},
--{"btlrl+",   XLO(19,BOTP4,16,1),	XLBOBB_MASK,   POWER4,	 {BI}},
--
--{"bclr-",    XLYLK(19,16,0,0),		XLYBB_MASK,    PPCCOM,	 {BOE, BI}},
--{"bclrl-",   XLYLK(19,16,0,1),		XLYBB_MASK,    PPCCOM,	 {BOE, BI}},
--{"bclr+",    XLYLK(19,16,1,0),		XLYBB_MASK,    PPCCOM,	 {BOE, BI}},
--{"bclrl+",   XLYLK(19,16,1,1),		XLYBB_MASK,    PPCCOM,	 {BOE, BI}},
--{"bclr",     XLLK(19,16,0),		XLBH_MASK,     PPCCOM,	 {BO, BI, BH}},
--{"bcr",      XLLK(19,16,0),		XLBB_MASK,     PWRCOM,	 {BO, BI}},
--{"bclrl",    XLLK(19,16,1),		XLBH_MASK,     PPCCOM,	 {BO, BI, BH}},
--{"bcrl",     XLLK(19,16,1),		XLBB_MASK,     PWRCOM,	 {BO, BI}},
--
--{"bclre",    XLLK(19,17,0),		XLBB_MASK,     BOOKE64,	 {BO, BI}},
--{"bclrel",   XLLK(19,17,1),		XLBB_MASK,     BOOKE64,	 {BO, BI}},
--
--{"rfid",	XL(19,18),	0xffffffff,  PPC64,	{0}},
--
--{"crnot",	XL(19,33),	XL_MASK,     PPCCOM,	{BT, BA, BBA}},
--{"crnor",	XL(19,33),	XL_MASK,     COM,	{BT, BA, BB}},
--{"rfmci",	X(19,38),	0xffffffff,  PPCRFMCI,	{0}},
--
--{"rfdi",	XL(19,39),	0xffffffff,  E500MC,	{0}},
--{"rfi",		XL(19,50),	0xffffffff,  COM,	{0}},
--{"rfci",	XL(19,51), 0xffffffff, PPC403|BOOKE|PPCE300, {0}},
--
--{"rfsvc",	XL(19,82),	0xffffffff,  POWER,	{0}},
--
--{"rfgi",	XL(19,102),	0xffffffff,  E500MC,	{0}},
--
--{"crandc",	XL(19,129),	XL_MASK,     COM,	{BT, BA, BB}},
--
--{"isync",	XL(19,150),	0xffffffff,  PPCCOM,	{0}},
--{"ics",		XL(19,150),	0xffffffff,  PWRCOM,	{0}},
--
--{"crclr",	XL(19,193),	XL_MASK,     PPCCOM,	{BT, BAT, BBA}},
--{"crxor",	XL(19,193),	XL_MASK,     COM,	{BT, BA, BB}},
--
--{"dnh",		X(19,198),	X_MASK,      E500MC,	{DUI, DUIS}},
--
--{"crnand",	XL(19,225),	XL_MASK,     COM,	{BT, BA, BB}},
--
--{"crand",	XL(19,257),	XL_MASK,     COM,	{BT, BA, BB}},
--
--{"hrfid",	XL(19,274),	0xffffffff, POWER5|CELL, {0}},
--
--{"crset",	XL(19,289),	XL_MASK,     PPCCOM,	{BT, BAT, BBA}},
--{"creqv",	XL(19,289),	XL_MASK,     COM,	{BT, BA, BB}},
--
--{"doze",	XL(19,402),	0xffffffff,  POWER6,	{0}},
--
--{"crorc",	XL(19,417),	XL_MASK,     COM,	{BT, BA, BB}},
--
--{"nap",		XL(19,434),	0xffffffff,  POWER6,	{0}},
--
--{"crmove",	XL(19,449),	XL_MASK,     PPCCOM,	{BT, BA, BBA}},
--{"cror",	XL(19,449),	XL_MASK,     COM,	{BT, BA, BB}},
--
--{"sleep",	XL(19,466),	0xffffffff,  POWER6,	{0}},
--{"rvwinkle",	XL(19,498),	0xffffffff,  POWER6,	{0}},
--
--{"bctr",    XLO(19,BOU,528,0),		XLBOBIBB_MASK, COM,	 {0}},
--{"bctrl",   XLO(19,BOU,528,1),		XLBOBIBB_MASK, COM,	 {0}},
--
--{"bgectr",  XLOCB(19,BOF,CBLT,528,0),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bgectr-", XLOCB(19,BOF,CBLT,528,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnlctr",  XLOCB(19,BOF,CBLT,528,0),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bnlctr-", XLOCB(19,BOF,CBLT,528,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bgectrl", XLOCB(19,BOF,CBLT,528,1),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bgectrl-",XLOCB(19,BOF,CBLT,528,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnlctrl", XLOCB(19,BOF,CBLT,528,1),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bnlctrl-",XLOCB(19,BOF,CBLT,528,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"blectr",  XLOCB(19,BOF,CBGT,528,0),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"blectr-", XLOCB(19,BOF,CBGT,528,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bngctr",  XLOCB(19,BOF,CBGT,528,0),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bngctr-", XLOCB(19,BOF,CBGT,528,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"blectrl", XLOCB(19,BOF,CBGT,528,1),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"blectrl-",XLOCB(19,BOF,CBGT,528,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bngctrl", XLOCB(19,BOF,CBGT,528,1),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bngctrl-",XLOCB(19,BOF,CBGT,528,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnectr",  XLOCB(19,BOF,CBEQ,528,0),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bnectr-", XLOCB(19,BOF,CBEQ,528,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnectrl", XLOCB(19,BOF,CBEQ,528,1),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bnectrl-",XLOCB(19,BOF,CBEQ,528,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnsctr",  XLOCB(19,BOF,CBSO,528,0),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bnsctr-", XLOCB(19,BOF,CBSO,528,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnuctr",  XLOCB(19,BOF,CBSO,528,0),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bnuctr-", XLOCB(19,BOF,CBSO,528,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnsctrl", XLOCB(19,BOF,CBSO,528,1),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bnsctrl-",XLOCB(19,BOF,CBSO,528,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnuctrl", XLOCB(19,BOF,CBSO,528,1),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bnuctrl-",XLOCB(19,BOF,CBSO,528,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bgectr+", XLOCB(19,BOFP,CBLT,528,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnlctr+", XLOCB(19,BOFP,CBLT,528,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bgectrl+",XLOCB(19,BOFP,CBLT,528,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnlctrl+",XLOCB(19,BOFP,CBLT,528,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"blectr+", XLOCB(19,BOFP,CBGT,528,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bngctr+", XLOCB(19,BOFP,CBGT,528,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"blectrl+",XLOCB(19,BOFP,CBGT,528,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bngctrl+",XLOCB(19,BOFP,CBGT,528,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnectr+", XLOCB(19,BOFP,CBEQ,528,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnectrl+",XLOCB(19,BOFP,CBEQ,528,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnsctr+", XLOCB(19,BOFP,CBSO,528,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnuctr+", XLOCB(19,BOFP,CBSO,528,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnsctrl+",XLOCB(19,BOFP,CBSO,528,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bnuctrl+",XLOCB(19,BOFP,CBSO,528,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bgectr-", XLOCB(19,BOFM4,CBLT,528,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnlctr-", XLOCB(19,BOFM4,CBLT,528,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bgectrl-",XLOCB(19,BOFM4,CBLT,528,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnlctrl-",XLOCB(19,BOFM4,CBLT,528,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"blectr-", XLOCB(19,BOFM4,CBGT,528,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bngctr-", XLOCB(19,BOFM4,CBGT,528,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"blectrl-",XLOCB(19,BOFM4,CBGT,528,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bngctrl-",XLOCB(19,BOFM4,CBGT,528,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnectr-", XLOCB(19,BOFM4,CBEQ,528,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnectrl-",XLOCB(19,BOFM4,CBEQ,528,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnsctr-", XLOCB(19,BOFM4,CBSO,528,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnuctr-", XLOCB(19,BOFM4,CBSO,528,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnsctrl-",XLOCB(19,BOFM4,CBSO,528,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnuctrl-",XLOCB(19,BOFM4,CBSO,528,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bgectr+", XLOCB(19,BOFP4,CBLT,528,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnlctr+", XLOCB(19,BOFP4,CBLT,528,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bgectrl+",XLOCB(19,BOFP4,CBLT,528,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnlctrl+",XLOCB(19,BOFP4,CBLT,528,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"blectr+", XLOCB(19,BOFP4,CBGT,528,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bngctr+", XLOCB(19,BOFP4,CBGT,528,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"blectrl+",XLOCB(19,BOFP4,CBGT,528,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bngctrl+",XLOCB(19,BOFP4,CBGT,528,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnectr+", XLOCB(19,BOFP4,CBEQ,528,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnectrl+",XLOCB(19,BOFP4,CBEQ,528,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnsctr+", XLOCB(19,BOFP4,CBSO,528,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnuctr+", XLOCB(19,BOFP4,CBSO,528,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnsctrl+",XLOCB(19,BOFP4,CBSO,528,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bnuctrl+",XLOCB(19,BOFP4,CBSO,528,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bltctr",  XLOCB(19,BOT,CBLT,528,0),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bltctr-", XLOCB(19,BOT,CBLT,528,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bltctrl", XLOCB(19,BOT,CBLT,528,1),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bltctrl-",XLOCB(19,BOT,CBLT,528,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bgtctr",  XLOCB(19,BOT,CBGT,528,0),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bgtctr-", XLOCB(19,BOT,CBGT,528,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bgtctrl", XLOCB(19,BOT,CBGT,528,1),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bgtctrl-",XLOCB(19,BOT,CBGT,528,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"beqctr",  XLOCB(19,BOT,CBEQ,528,0),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"beqctr-", XLOCB(19,BOT,CBEQ,528,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"beqctrl", XLOCB(19,BOT,CBEQ,528,1),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"beqctrl-",XLOCB(19,BOT,CBEQ,528,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bsoctr",  XLOCB(19,BOT,CBSO,528,0),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bsoctr-", XLOCB(19,BOT,CBSO,528,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bunctr",  XLOCB(19,BOT,CBSO,528,0),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bunctr-", XLOCB(19,BOT,CBSO,528,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bsoctrl", XLOCB(19,BOT,CBSO,528,1),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bsoctrl-",XLOCB(19,BOT,CBSO,528,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bunctrl", XLOCB(19,BOT,CBSO,528,1),	XLBOCBBB_MASK, PPCCOM,	 {CR}},
--{"bunctrl-",XLOCB(19,BOT,CBSO,528,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bltctr+", XLOCB(19,BOTP,CBLT,528,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bltctrl+",XLOCB(19,BOTP,CBLT,528,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bgtctr+", XLOCB(19,BOTP,CBGT,528,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bgtctrl+",XLOCB(19,BOTP,CBGT,528,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"beqctr+", XLOCB(19,BOTP,CBEQ,528,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"beqctrl+",XLOCB(19,BOTP,CBEQ,528,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bsoctr+", XLOCB(19,BOTP,CBSO,528,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bunctr+", XLOCB(19,BOTP,CBSO,528,0),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bsoctrl+",XLOCB(19,BOTP,CBSO,528,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bunctrl+",XLOCB(19,BOTP,CBSO,528,1),	XLBOCBBB_MASK, NOPOWER4, {CR}},
--{"bltctr-", XLOCB(19,BOTM4,CBLT,528,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bltctrl-",XLOCB(19,BOTM4,CBLT,528,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bgtctr-", XLOCB(19,BOTM4,CBGT,528,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bgtctrl-",XLOCB(19,BOTM4,CBGT,528,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"beqctr-", XLOCB(19,BOTM4,CBEQ,528,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"beqctrl-",XLOCB(19,BOTM4,CBEQ,528,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bsoctr-", XLOCB(19,BOTM4,CBSO,528,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bunctr-", XLOCB(19,BOTM4,CBSO,528,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bsoctrl-",XLOCB(19,BOTM4,CBSO,528,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bunctrl-",XLOCB(19,BOTM4,CBSO,528,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bltctr+", XLOCB(19,BOTP4,CBLT,528,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bltctrl+",XLOCB(19,BOTP4,CBLT,528,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bgtctr+", XLOCB(19,BOTP4,CBGT,528,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bgtctrl+",XLOCB(19,BOTP4,CBGT,528,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"beqctr+", XLOCB(19,BOTP4,CBEQ,528,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"beqctrl+",XLOCB(19,BOTP4,CBEQ,528,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bsoctr+", XLOCB(19,BOTP4,CBSO,528,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bunctr+", XLOCB(19,BOTP4,CBSO,528,0),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bsoctrl+",XLOCB(19,BOTP4,CBSO,528,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--{"bunctrl+",XLOCB(19,BOTP4,CBSO,528,1),	XLBOCBBB_MASK, POWER4,	 {CR}},
--
--{"bfctr",   XLO(19,BOF,528,0),		XLBOBB_MASK,   PPCCOM,	 {BI}},
--{"bfctr-",  XLO(19,BOF,528,0),		XLBOBB_MASK,   NOPOWER4, {BI}},
--{"bfctrl",  XLO(19,BOF,528,1),		XLBOBB_MASK,   PPCCOM,	 {BI}},
--{"bfctrl-", XLO(19,BOF,528,1),		XLBOBB_MASK,   NOPOWER4, {BI}},
--{"bfctr+",  XLO(19,BOFP,528,0),		XLBOBB_MASK,   NOPOWER4, {BI}},
--{"bfctrl+", XLO(19,BOFP,528,1),		XLBOBB_MASK,   NOPOWER4, {BI}},
--{"bfctr-",  XLO(19,BOFM4,528,0),	XLBOBB_MASK,   POWER4,	 {BI}},
--{"bfctrl-", XLO(19,BOFM4,528,1),	XLBOBB_MASK,   POWER4,	 {BI}},
--{"bfctr+",  XLO(19,BOFP4,528,0),	XLBOBB_MASK,   POWER4,	 {BI}},
--{"bfctrl+", XLO(19,BOFP4,528,1),	XLBOBB_MASK,   POWER4,	 {BI}},
--{"btctr",   XLO(19,BOT,528,0),		XLBOBB_MASK,   PPCCOM,	 {BI}},
--{"btctr-",  XLO(19,BOT,528,0),		XLBOBB_MASK,   NOPOWER4, {BI}},
--{"btctrl",  XLO(19,BOT,528,1),		XLBOBB_MASK,   PPCCOM,	 {BI}},
--{"btctrl-", XLO(19,BOT,528,1),		XLBOBB_MASK,   NOPOWER4, {BI}},
--{"btctr+",  XLO(19,BOTP,528,0),		XLBOBB_MASK,   NOPOWER4, {BI}},
--{"btctrl+", XLO(19,BOTP,528,1),		XLBOBB_MASK,   NOPOWER4, {BI}},
--{"btctr-",  XLO(19,BOTM4,528,0),	XLBOBB_MASK,   POWER4,	 {BI}},
--{"btctrl-", XLO(19,BOTM4,528,1),	XLBOBB_MASK,   POWER4,	 {BI}},
--{"btctr+",  XLO(19,BOTP4,528,0),	XLBOBB_MASK,   POWER4,	 {BI}},
--{"btctrl+", XLO(19,BOTP4,528,1),	XLBOBB_MASK,   POWER4,	 {BI}},
--
--{"bcctr-",  XLYLK(19,528,0,0),		XLYBB_MASK,    PPCCOM,	 {BOE, BI}},
--{"bcctrl-", XLYLK(19,528,0,1),		XLYBB_MASK,    PPCCOM,	 {BOE, BI}},
--{"bcctr+",  XLYLK(19,528,1,0),		XLYBB_MASK,    PPCCOM,	 {BOE, BI}},
--{"bcctrl+", XLYLK(19,528,1,1),		XLYBB_MASK,    PPCCOM,	 {BOE, BI}},
--{"bcctr",   XLLK(19,528,0),		XLBH_MASK,     PPCCOM,	 {BO, BI, BH}},
--{"bcc",     XLLK(19,528,0),		XLBB_MASK,     PWRCOM,	 {BO, BI}},
--{"bcctrl",  XLLK(19,528,1),		XLBH_MASK,     PPCCOM,	 {BO, BI, BH}},
--{"bccl",    XLLK(19,528,1),		XLBB_MASK,     PWRCOM,	 {BO, BI}},
--
--{"bcctre",  XLLK(19,529,0),		XLBB_MASK,     BOOKE64,	 {BO, BI}},
--{"bcctrel", XLLK(19,529,1),		XLBB_MASK,     BOOKE64,	 {BO, BI}},
--
--{"rlwimi",	M(20,0),	M_MASK,      PPCCOM,	{RA, RS, SH, MBE, ME}},
--{"rlimi",	M(20,0),	M_MASK,      PWRCOM,	{RA, RS, SH, MBE, ME}},
--
--{"rlwimi.",	M(20,1),	M_MASK,      PPCCOM,	{RA, RS, SH, MBE, ME}},
--{"rlimi.",	M(20,1),	M_MASK,      PWRCOM,	{RA, RS, SH, MBE, ME}},
--
--{"rotlwi",	MME(21,31,0),	MMBME_MASK,  PPCCOM,	{RA, RS, SH}},
--{"clrlwi",	MME(21,31,0),	MSHME_MASK,  PPCCOM,	{RA, RS, MB}},
--{"rlwinm",	M(21,0),	M_MASK,      PPCCOM,	{RA, RS, SH, MBE, ME}},
--{"rlinm",	M(21,0),	M_MASK,      PWRCOM,	{RA, RS, SH, MBE, ME}},
--{"rotlwi.",	MME(21,31,1),	MMBME_MASK,  PPCCOM,	{RA, RS, SH}},
--{"clrlwi.",	MME(21,31,1),	MSHME_MASK,  PPCCOM,	{RA, RS, MB}},
--{"rlwinm.",	M(21,1),	M_MASK,      PPCCOM,	{RA, RS, SH, MBE, ME}},
--{"rlinm.",	M(21,1),	M_MASK,      PWRCOM,	{RA, RS, SH, MBE, ME}},
--
--{"rlmi",	M(22,0),	M_MASK,      M601,	{RA, RS, RB, MBE, ME}},
--{"be",		B(22,0,0),	B_MASK,      BOOKE64,	{LI}},
--{"bel",		B(22,0,1),	B_MASK,      BOOKE64,	{LI}},
--{"rlmi.",	M(22,1),	M_MASK,      M601,	{RA, RS, RB, MBE, ME}},
--{"bea",		B(22,1,0),	B_MASK,      BOOKE64,	{LIA}},
--{"bela",	B(22,1,1),	B_MASK,      BOOKE64,	{LIA}},
--
--{"rotlw",	MME(23,31,0),	MMBME_MASK,  PPCCOM,	{RA, RS, RB}},
--{"rlwnm",	M(23,0),	M_MASK,      PPCCOM,	{RA, RS, RB, MBE, ME}},
--{"rlnm",	M(23,0),	M_MASK,      PWRCOM,	{RA, RS, RB, MBE, ME}},
--{"rotlw.",	MME(23,31,1),	MMBME_MASK,  PPCCOM,	{RA, RS, RB}},
--{"rlwnm.",	M(23,1),	M_MASK,      PPCCOM,	{RA, RS, RB, MBE, ME}},
--{"rlnm.",	M(23,1),	M_MASK,      PWRCOM,	{RA, RS, RB, MBE, ME}},
--
--{"nop",		OP(24),		0xffffffff,  PPCCOM,	{0}},
--{"ori",		OP(24),		OP_MASK,     PPCCOM,	{RA, RS, UI}},
--{"oril",	OP(24),		OP_MASK,     PWRCOM,	{RA, RS, UI}},
--
--{"oris",	OP(25),		OP_MASK,     PPCCOM,	{RA, RS, UI}},
--{"oriu",	OP(25),		OP_MASK,     PWRCOM,	{RA, RS, UI}},
--
--{"xori",	OP(26),		OP_MASK,     PPCCOM,	{RA, RS, UI}},
--{"xoril",	OP(26),		OP_MASK,     PWRCOM,	{RA, RS, UI}},
--
--{"xoris",	OP(27),		OP_MASK,     PPCCOM,	{RA, RS, UI}},
--{"xoriu",	OP(27),		OP_MASK,     PWRCOM,	{RA, RS, UI}},
--
--{"andi.",	OP(28),		OP_MASK,     PPCCOM,	{RA, RS, UI}},
--{"andil.",	OP(28),		OP_MASK,     PWRCOM,	{RA, RS, UI}},
--
--{"andis.",	OP(29),		OP_MASK,     PPCCOM,	{RA, RS, UI}},
--{"andiu.",	OP(29),		OP_MASK,     PWRCOM,	{RA, RS, UI}},
--
--{"rotldi",	MD(30,0,0),	MDMB_MASK,   PPC64,	{RA, RS, SH6}},
--{"clrldi",	MD(30,0,0),	MDSH_MASK,   PPC64,	{RA, RS, MB6}},
--{"rldicl",	MD(30,0,0),	MD_MASK,     PPC64,	{RA, RS, SH6, MB6}},
--{"rotldi.",	MD(30,0,1),	MDMB_MASK,   PPC64,	{RA, RS, SH6}},
--{"clrldi.",	MD(30,0,1),	MDSH_MASK,   PPC64,	{RA, RS, MB6}},
--{"rldicl.",	MD(30,0,1),	MD_MASK,     PPC64,	{RA, RS, SH6, MB6}},
--
--{"rldicr",	MD(30,1,0),	MD_MASK,     PPC64,	{RA, RS, SH6, ME6}},
--{"rldicr.",	MD(30,1,1),	MD_MASK,     PPC64,	{RA, RS, SH6, ME6}},
--
--{"rldic",	MD(30,2,0),	MD_MASK,     PPC64,	{RA, RS, SH6, MB6}},
--{"rldic.",	MD(30,2,1),	MD_MASK,     PPC64,	{RA, RS, SH6, MB6}},
--
--{"rldimi",	MD(30,3,0),	MD_MASK,     PPC64,	{RA, RS, SH6, MB6}},
--{"rldimi.",	MD(30,3,1),	MD_MASK,     PPC64,	{RA, RS, SH6, MB6}},
--
--{"rotld",	MDS(30,8,0),	MDSMB_MASK,  PPC64,	{RA, RS, RB}},
--{"rldcl",	MDS(30,8,0),	MDS_MASK,    PPC64,	{RA, RS, RB, MB6}},
--{"rotld.",	MDS(30,8,1),	MDSMB_MASK,  PPC64,	{RA, RS, RB}},
--{"rldcl.",	MDS(30,8,1),	MDS_MASK,    PPC64,	{RA, RS, RB, MB6}},
--
--{"rldcr",	MDS(30,9,0),	MDS_MASK,    PPC64,	{RA, RS, RB, ME6}},
--{"rldcr.",	MDS(30,9,1),	MDS_MASK,    PPC64,	{RA, RS, RB, ME6}},
--
--{"cmpw",	XOPL(31,0,0),	XCMPL_MASK,  PPCCOM,	{OBF, RA, RB}},
--{"cmpd",	XOPL(31,0,1),	XCMPL_MASK,  PPC64,	{OBF, RA, RB}},
--{"cmp",		X(31,0),	XCMP_MASK,   PPC,	{BF, L, RA, RB}},
--{"cmp",		X(31,0),	XCMPL_MASK,  PWRCOM,	{BF, RA, RB}},
--
--{"twlgt",	XTO(31,4,TOLGT), XTO_MASK,   PPCCOM,	{RA, RB}},
--{"tlgt",	XTO(31,4,TOLGT), XTO_MASK,   PWRCOM,	{RA, RB}},
--{"twllt",	XTO(31,4,TOLLT), XTO_MASK,   PPCCOM,	{RA, RB}},
--{"tllt",	XTO(31,4,TOLLT), XTO_MASK,   PWRCOM,	{RA, RB}},
--{"tweq",	XTO(31,4,TOEQ),	 XTO_MASK,   PPCCOM,	{RA, RB}},
--{"teq",		XTO(31,4,TOEQ),	 XTO_MASK,   PWRCOM,	{RA, RB}},
--{"twlge",	XTO(31,4,TOLGE), XTO_MASK,   PPCCOM,	{RA, RB}},
--{"tlge",	XTO(31,4,TOLGE), XTO_MASK,   PWRCOM,	{RA, RB}},
--{"twlnl",	XTO(31,4,TOLNL), XTO_MASK,   PPCCOM,	{RA, RB}},
--{"tlnl",	XTO(31,4,TOLNL), XTO_MASK,   PWRCOM,	{RA, RB}},
--{"twlle",	XTO(31,4,TOLLE), XTO_MASK,   PPCCOM,	{RA, RB}},
--{"tlle",	XTO(31,4,TOLLE), XTO_MASK,   PWRCOM,	{RA, RB}},
--{"twlng",	XTO(31,4,TOLNG), XTO_MASK,   PPCCOM,	{RA, RB}},
--{"tlng",	XTO(31,4,TOLNG), XTO_MASK,   PWRCOM,	{RA, RB}},
--{"twgt",	XTO(31,4,TOGT),	 XTO_MASK,   PPCCOM,	{RA, RB}},
--{"tgt",		XTO(31,4,TOGT),	 XTO_MASK,   PWRCOM,	{RA, RB}},
--{"twge",	XTO(31,4,TOGE),	 XTO_MASK,   PPCCOM,	{RA, RB}},
--{"tge",		XTO(31,4,TOGE),	 XTO_MASK,   PWRCOM,	{RA, RB}},
--{"twnl",	XTO(31,4,TONL),	 XTO_MASK,   PPCCOM,	{RA, RB}},
--{"tnl",		XTO(31,4,TONL),	 XTO_MASK,   PWRCOM,	{RA, RB}},
--{"twlt",	XTO(31,4,TOLT),	 XTO_MASK,   PPCCOM,	{RA, RB}},
--{"tlt",		XTO(31,4,TOLT),	 XTO_MASK,   PWRCOM,	{RA, RB}},
--{"twle",	XTO(31,4,TOLE),	 XTO_MASK,   PPCCOM,	{RA, RB}},
--{"tle",		XTO(31,4,TOLE),	 XTO_MASK,   PWRCOM,	{RA, RB}},
--{"twng",	XTO(31,4,TONG),	 XTO_MASK,   PPCCOM,	{RA, RB}},
--{"tng",		XTO(31,4,TONG),	 XTO_MASK,   PWRCOM,	{RA, RB}},
--{"twne",	XTO(31,4,TONE),	 XTO_MASK,   PPCCOM,	{RA, RB}},
--{"tne",		XTO(31,4,TONE),	 XTO_MASK,   PWRCOM,	{RA, RB}},
--{"trap",	XTO(31,4,TOU),	 0xffffffff, PPCCOM,	{0}},
--{"tw",		X(31,4),	 X_MASK,     PPCCOM,	{TO, RA, RB}},
--{"t",		X(31,4),	 X_MASK,     PWRCOM,	{TO, RA, RB}},
--
--{"lvsl",	X(31,6),	X_MASK,      PPCVEC,	{VD, RA, RB}},
--{"lvebx",	X(31,7),	X_MASK,      PPCVEC,	{VD, RA, RB}},
--{"lbfcmx",	APU(31,7,0), 	APU_MASK,    PPC405,	{FCRT, RA, RB}},
--
--{"subfc",	XO(31,8,0,0),	XO_MASK,     PPCCOM,	{RT, RA, RB}},
--{"sf",		XO(31,8,0,0),	XO_MASK,     PWRCOM,	{RT, RA, RB}},
--{"subc",	XO(31,8,0,0),	XO_MASK,     PPC,	{RT, RB, RA}},
--{"subfc.",	XO(31,8,0,1),	XO_MASK,     PPCCOM,	{RT, RA, RB}},
--{"sf.",		XO(31,8,0,1),	XO_MASK,     PWRCOM,	{RT, RA, RB}},
--{"subc.",	XO(31,8,0,1),	XO_MASK,     PPCCOM,	{RT, RB, RA}},
--
--{"mulhdu",	XO(31,9,0,0),	XO_MASK,     PPC64,	{RT, RA, RB}},
--{"mulhdu.",	XO(31,9,0,1),	XO_MASK,     PPC64,	{RT, RA, RB}},
--
--{"addc",	XO(31,10,0,0),	XO_MASK,     PPCCOM,	{RT, RA, RB}},
--{"a",		XO(31,10,0,0),	XO_MASK,     PWRCOM,	{RT, RA, RB}},
--{"addc.",	XO(31,10,0,1),	XO_MASK,     PPCCOM,	{RT, RA, RB}},
--{"a.",		XO(31,10,0,1),	XO_MASK,     PWRCOM,	{RT, RA, RB}},
--
--{"mulhwu",	XO(31,11,0,0),	XO_MASK,     PPC,	{RT, RA, RB}},
--{"mulhwu.",	XO(31,11,0,1),	XO_MASK,     PPC,	{RT, RA, RB}},
--
--{"isellt",	X(31,15),	X_MASK,      PPCISEL,	{RT, RA, RB}},
--
--{"mfcr",	XFXM(31,19,0,0), XRARB_MASK, NOPOWER4|COM, {RT}},
--{"mfcr",	XFXM(31,19,0,0), XFXFXM_MASK, POWER4,	{RT, FXM4}},
--{"mfocrf",	XFXM(31,19,0,1), XFXFXM_MASK, COM,	{RT, FXM}},
--
--{"lwarx",	X(31,20),	XEH_MASK,    PPC,	{RT, RA0, RB, EH}},
--
--{"ldx",		X(31,21),	X_MASK,      PPC64,	{RT, RA0, RB}},
--
--{"icbt",	X(31,22),	X_MASK,  BOOKE|PPCE300,	{CT, RA, RB}},
--
--{"lwzx",	X(31,23),	X_MASK,      PPCCOM,	{RT, RA0, RB}},
--{"lx",		X(31,23),	X_MASK,      PWRCOM,	{RT, RA, RB}},
--
--{"slw",		XRC(31,24,0),	X_MASK,      PPCCOM,	{RA, RS, RB}},
--{"sl",		XRC(31,24,0),	X_MASK,      PWRCOM,	{RA, RS, RB}},
--{"slw.",	XRC(31,24,1),	X_MASK,      PPCCOM,	{RA, RS, RB}},
--{"sl.",		XRC(31,24,1),	X_MASK,      PWRCOM,	{RA, RS, RB}},
--
--{"cntlzw",	XRC(31,26,0),	XRB_MASK,    PPCCOM,	{RA, RS}},
--{"cntlz",	XRC(31,26,0),	XRB_MASK,    PWRCOM,	{RA, RS}},
--{"cntlzw.",	XRC(31,26,1),	XRB_MASK,    PPCCOM,	{RA, RS}},
--{"cntlz.",	XRC(31,26,1),	XRB_MASK,    PWRCOM,	{RA, RS}},
--
--{"sld",		XRC(31,27,0),	X_MASK,      PPC64,	{RA, RS, RB}},
--{"sld.",	XRC(31,27,1),	X_MASK,      PPC64,	{RA, RS, RB}},
--
--{"and",		XRC(31,28,0),	X_MASK,      COM,	{RA, RS, RB}},
--{"and.",	XRC(31,28,1),	X_MASK,      COM,	{RA, RS, RB}},
--
--{"maskg",	XRC(31,29,0),	X_MASK,      M601,	{RA, RS, RB}},
--{"maskg.",	XRC(31,29,1),	X_MASK,      M601,	{RA, RS, RB}},
--
--{"ldepx",	X(31,29),	X_MASK,      E500MC,	{RT, RA, RB}},
--
--{"icbte",	X(31,30),	X_MASK,      BOOKE64,	{CT, RA, RB}},
--
--{"lwzxe",	X(31,31),	X_MASK,      BOOKE64,	{RT, RA0, RB}},
--{"lwepx",	X(31,31),	X_MASK,      E500MC,	{RT, RA, RB}},
--
--{"cmplw",	XOPL(31,32,0),	XCMPL_MASK,  PPCCOM,	{OBF, RA, RB}},
--{"cmpld",	XOPL(31,32,1),	XCMPL_MASK,  PPC64,	{OBF, RA, RB}},
--{"cmpl",	X(31,32),	XCMP_MASK,   PPC,	{BF, L, RA, RB}},
--{"cmpl",	X(31,32),	XCMPL_MASK,  PWRCOM,	{BF, RA, RB}},
--
--{"lvsr",	X(31,38),	X_MASK,      PPCVEC,	{VD, RA, RB}},
--{"lvehx",	X(31,39),	X_MASK,      PPCVEC,	{VD, RA, RB}},
--{"lhfcmx",	APU(31,39,0), 	APU_MASK,    PPC405,	{FCRT, RA, RB}},
--
--{"iselgt",	X(31,47),	X_MASK,      PPCISEL,	{RT, RA, RB}},
--
--{"lvewx",	X(31,71),	X_MASK,      PPCVEC,	{VD, RA, RB}},
--
--{"iseleq",	X(31,79),	X_MASK,      PPCISEL,	{RT, RA, RB}},
--
--{"isel",	XISEL(31,15),	XISEL_MASK,  PPCISEL,	{RT, RA, RB, CRB}},
--
--{"subf",	XO(31,40,0,0),	XO_MASK,     PPC,	{RT, RA, RB}},
--{"sub",		XO(31,40,0,0),	XO_MASK,     PPC,	{RT, RB, RA}},
--{"subf.",	XO(31,40,0,1),	XO_MASK,     PPC,	{RT, RA, RB}},
--{"sub.",	XO(31,40,0,1),	XO_MASK,     PPC,	{RT, RB, RA}},
--
--{"ldux",	X(31,53),	X_MASK,      PPC64,	{RT, RAL, RB}},
--
--{"dcbst",	X(31,54),	XRT_MASK,    PPC,	{RA, RB}},
--
--{"lwzux",	X(31,55),	X_MASK,      PPCCOM,	{RT, RAL, RB}},
--{"lux",		X(31,55),	X_MASK,      PWRCOM,	{RT, RA, RB}},
--
--{"cntlzd",	XRC(31,58,0),	XRB_MASK,    PPC64,	{RA, RS}},
--{"cntlzd.",	XRC(31,58,1),	XRB_MASK,    PPC64,	{RA, RS}},
--
--{"andc",	XRC(31,60,0),	X_MASK,      COM,	{RA, RS, RB}},
--{"andc.",	XRC(31,60,1),	X_MASK,      COM,	{RA, RS, RB}},
--
--{"dcbste",	X(31,62),	XRT_MASK,    BOOKE64,	{RA, RB}},
--
--{"wait",	X(31,62),	0xffffffff,  E500MC,	{0}},
--
--{"lwzuxe",	X(31,63),	X_MASK,      BOOKE64,	{RT, RAL, RB}},
--
--{"dcbstep",	XRT(31,63,0),	XRT_MASK,    E500MC,	{RA, RB}},
--
--{"tdlgt",	XTO(31,68,TOLGT), XTO_MASK,  PPC64,	{RA, RB}},
--{"tdllt",	XTO(31,68,TOLLT), XTO_MASK,  PPC64,	{RA, RB}},
--{"tdeq",	XTO(31,68,TOEQ),  XTO_MASK,  PPC64,	{RA, RB}},
--{"tdlge",	XTO(31,68,TOLGE), XTO_MASK,  PPC64,	{RA, RB}},
--{"tdlnl",	XTO(31,68,TOLNL), XTO_MASK,  PPC64,	{RA, RB}},
--{"tdlle",	XTO(31,68,TOLLE), XTO_MASK,  PPC64,	{RA, RB}},
--{"tdlng",	XTO(31,68,TOLNG), XTO_MASK,  PPC64,	{RA, RB}},
--{"tdgt",	XTO(31,68,TOGT),  XTO_MASK,  PPC64,	{RA, RB}},
--{"tdge",	XTO(31,68,TOGE),  XTO_MASK,  PPC64,	{RA, RB}},
--{"tdnl",	XTO(31,68,TONL),  XTO_MASK,  PPC64,	{RA, RB}},
--{"tdlt",	XTO(31,68,TOLT),  XTO_MASK,  PPC64,	{RA, RB}},
--{"tdle",	XTO(31,68,TOLE),  XTO_MASK,  PPC64,	{RA, RB}},
--{"tdng",	XTO(31,68,TONG),  XTO_MASK,  PPC64,	{RA, RB}},
--{"tdne",	XTO(31,68,TONE),  XTO_MASK,  PPC64,	{RA, RB}},
--{"td",		X(31,68),	X_MASK,      PPC64,	{TO, RA, RB}},
--
--{"lwfcmx",	APU(31,71,0), 	APU_MASK,    PPC405,	{FCRT, RA, RB}},
--{"mulhd",	XO(31,73,0,0),	XO_MASK,     PPC64,	{RT, RA, RB}},
--{"mulhd.",	XO(31,73,0,1),	XO_MASK,     PPC64,	{RT, RA, RB}},
--
--{"mulhw",	XO(31,75,0,0),	XO_MASK,     PPC,	{RT, RA, RB}},
--{"mulhw.",	XO(31,75,0,1),	XO_MASK,     PPC,	{RT, RA, RB}},
--
--{"dlmzb",	XRC(31,78,0),	X_MASK,  PPC403|PPC440,	{RA, RS, RB}},
--{"dlmzb.",	XRC(31,78,1),	X_MASK,  PPC403|PPC440,	{RA, RS, RB}},
--
--{"mtsrd",	X(31,82),  XRB_MASK|(1<<20), PPC64,	{SR, RS}},
--
--{"mfmsr",	X(31,83),	XRARB_MASK,  COM,	{RT}},
--
--{"ldarx",	X(31,84),	XEH_MASK,    PPC64,	{RT, RA0, RB, EH}},
--
--{"dcbfl",	XOPL(31,86,1),	XRT_MASK,    POWER5,	{RA, RB}},
--{"dcbf",	X(31,86),	XLRT_MASK,   PPC,	{RA, RB, L}},
--
--{"lbzx",	X(31,87),	X_MASK,      COM,	{RT, RA0, RB}},
--
--{"dcbfe",	X(31,94),	XRT_MASK,    BOOKE64,	{RA, RB}},
--
--{"lbzxe",	X(31,95),	X_MASK,      BOOKE64,	{RT, RA0, RB}},
--{"lbepx",	X(31,95),	X_MASK,      E500MC,	{RT, RA, RB}},
--
--{"lvx",		X(31,103),	X_MASK,      PPCVEC,	{VD, RA, RB}},
--{"lqfcmx",	APU(31,103,0), 	APU_MASK,    PPC405,	{FCRT, RA, RB}},
--
--{"neg",		XO(31,104,0,0),	XORB_MASK,   COM,	{RT, RA}},
--{"neg.",	XO(31,104,0,1),	XORB_MASK,   COM,	{RT, RA}},
--
--{"mul",		XO(31,107,0,0),	XO_MASK,     M601,	{RT, RA, RB}},
--{"mul.",	XO(31,107,0,1),	XO_MASK,     M601,	{RT, RA, RB}},
--
--{"mtsrdin",	X(31,114),	XRA_MASK,    PPC64,	{RS, RB}},
--
--{"clf",		X(31,118),	XTO_MASK,    POWER,	{RA, RB}},
--
--{"lbzux",	X(31,119),	X_MASK,      COM,	{RT, RAL, RB}},
--
--{"popcntb",	X(31,122),	XRB_MASK,    POWER5,	{RA, RS}},
--
--{"not",		XRC(31,124,0),	X_MASK,      COM,	{RA, RS, RBS}},
--{"nor",		XRC(31,124,0),	X_MASK,      COM,	{RA, RS, RB}},
--{"not.",	XRC(31,124,1),	X_MASK,      COM,	{RA, RS, RBS}},
--{"nor.",	XRC(31,124,1),	X_MASK,      COM,	{RA, RS, RB}},
--
--{"lwarxe",	X(31,126),	X_MASK,      BOOKE64,	{RT, RA0, RB}},
--
--{"lbzuxe",	X(31,127),	X_MASK,      BOOKE64,	{RT, RAL, RB}},
--
--{"dcbfep",	XRT(31,127,0),	XRT_MASK,    E500MC,	{RA, RB}},
--
--{"wrtee",	X(31,131),	XRARB_MASK, PPC403|BOOKE, {RS}},
--
--{"dcbtstls",	X(31,134),	X_MASK,      PPCCHLK,	{CT, RA, RB}},
--
--{"stvebx",	X(31,135),	X_MASK,      PPCVEC,	{VS, RA, RB}},
--{"stbfcmx",	APU(31,135,0), 	APU_MASK,    PPC405,	{FCRT, RA, RB}},
--
--{"subfe",	XO(31,136,0,0),	XO_MASK,     PPCCOM,	{RT, RA, RB}},
--{"sfe",		XO(31,136,0,0),	XO_MASK,     PWRCOM,	{RT, RA, RB}},
--{"subfe.",	XO(31,136,0,1),	XO_MASK,     PPCCOM,	{RT, RA, RB}},
--{"sfe.",	XO(31,136,0,1),	XO_MASK,     PWRCOM,	{RT, RA, RB}},
--
--{"adde",	XO(31,138,0,0),	XO_MASK,     PPCCOM,	{RT, RA, RB}},
--{"ae",		XO(31,138,0,0),	XO_MASK,     PWRCOM,	{RT, RA, RB}},
--{"adde.",	XO(31,138,0,1),	XO_MASK,     PPCCOM,	{RT, RA, RB}},
--{"ae.",		XO(31,138,0,1),	XO_MASK,     PWRCOM,	{RT, RA, RB}},
--
--{"dcbtstlse",	X(31,142),	X_MASK,      PPCCHLK64,	{CT, RA, RB}},
--
--{"mtcr",	XFXM(31,144,0xff,0), XRARB_MASK, COM,	{RS}},
--{"mtcrf",	XFXM(31,144,0,0), XFXFXM_MASK, COM,	{FXM, RS}},
--{"mtocrf",	XFXM(31,144,0,1), XFXFXM_MASK, COM,	{FXM, RS}},
--
--{"mtmsr",	X(31,146),	XRLARB_MASK, COM,	{RS, A_L}},
--
--{"stdx",	X(31,149),	X_MASK,      PPC64,	{RS, RA0, RB}},
--
--{"stwcx.",	XRC(31,150,1),	X_MASK,      PPC,	{RS, RA0, RB}},
--
--{"stwx",	X(31,151),	X_MASK,      PPCCOM,	{RS, RA0, RB}},
--{"stx",		X(31,151),	X_MASK,      PWRCOM,	{RS, RA, RB}},
--
--{"slq",		XRC(31,152,0),	X_MASK,      M601,	{RA, RS, RB}},
--{"slq.",	XRC(31,152,1),	X_MASK,      M601,	{RA, RS, RB}},
--
--{"sle",		XRC(31,153,0),	X_MASK,      M601,	{RA, RS, RB}},
--{"sle.",	XRC(31,153,1),	X_MASK,      M601,	{RA, RS, RB}},
--
--{"prtyw",	X(31,154),	XRB_MASK,    POWER6,	{RA, RS}},
--
--{"stdepx",	X(31,157),	X_MASK,      E500MC,	{RS, RA, RB}},
--
--{"stwcxe.",	XRC(31,158,1),	X_MASK,      BOOKE64,	{RS, RA0, RB}},
--
--{"stwxe",	X(31,159),	X_MASK,      BOOKE64,	{RS, RA0, RB}},
--{"stwepx",	X(31,159),	X_MASK,      E500MC,	{RS, RA, RB}},
--
--{"wrteei",	X(31,163),	XE_MASK,  PPC403|BOOKE,	{E}},
--
--{"dcbtls",	X(31,166),	X_MASK,      PPCCHLK,	{CT, RA, RB}},
--
--{"stvehx",	X(31,167),	X_MASK,      PPCVEC,	{VS, RA, RB}},
--{"sthfcmx",	APU(31,167,0), 	APU_MASK,    PPC405,	{FCRT, RA, RB}},
--
--{"dcbtlse",	X(31,174),	X_MASK,      PPCCHLK64,	{CT, RA, RB}},
--
--{"mtmsrd",	X(31,178),	XRLARB_MASK, PPC64,	{RS, A_L}},
--
--{"stdux",	X(31,181),	X_MASK,      PPC64,	{RS, RAS, RB}},
--
--{"stwux",	X(31,183),	X_MASK,      PPCCOM,	{RS, RAS, RB}},
--{"stux",	X(31,183),	X_MASK,      PWRCOM,	{RS, RA0, RB}},
--
--{"sliq",	XRC(31,184,0),	X_MASK,      M601,	{RA, RS, SH}},
--{"sliq.",	XRC(31,184,1),	X_MASK,      M601,	{RA, RS, SH}},
--
--{"prtyd",	X(31,186),	XRB_MASK,    POWER6,	{RA, RS}},
--
--{"stwuxe",	X(31,191),	X_MASK,      BOOKE64,	{RS, RAS, RB}},
--
--{"stvewx",	X(31,199),	X_MASK,      PPCVEC,	{VS, RA, RB}},
--{"stwfcmx",	APU(31,199,0), 	APU_MASK,    PPC405,	{FCRT, RA, RB}},
--
--{"subfze",	XO(31,200,0,0),	XORB_MASK,   PPCCOM,	{RT, RA}},
--{"sfze",	XO(31,200,0,0),	XORB_MASK,   PWRCOM,	{RT, RA}},
--{"subfze.",	XO(31,200,0,1),	XORB_MASK,   PPCCOM,	{RT, RA}},
--{"sfze.",	XO(31,200,0,1),	XORB_MASK,   PWRCOM,	{RT, RA}},
--
--{"addze",	XO(31,202,0,0),	XORB_MASK,   PPCCOM,	{RT, RA}},
--{"aze",		XO(31,202,0,0),	XORB_MASK,   PWRCOM,	{RT, RA}},
--{"addze.",	XO(31,202,0,1),	XORB_MASK,   PPCCOM,	{RT, RA}},
--{"aze.",	XO(31,202,0,1),	XORB_MASK,   PWRCOM,	{RT, RA}},
--
--{"msgsnd",	XRTRA(31,206,0,0),XRTRA_MASK,E500MC,	{RB}},
--
--{"mtsr",	X(31,210), XRB_MASK|(1<<20), COM32,	{SR, RS}},
--
--{"stdcx.",	XRC(31,214,1),	X_MASK,      PPC64,	{RS, RA0, RB}},
--
--{"stbx",	X(31,215),	X_MASK,      COM,	{RS, RA0, RB}},
--
--{"sllq",	XRC(31,216,0),	X_MASK,      M601,	{RA, RS, RB}},
--{"sllq.",	XRC(31,216,1),	X_MASK,      M601,	{RA, RS, RB}},
--
--{"sleq",	XRC(31,217,0),	X_MASK,      M601,	{RA, RS, RB}},
--{"sleq.",	XRC(31,217,1),	X_MASK,      M601,	{RA, RS, RB}},
--
--{"stbxe",	X(31,223),	X_MASK,      BOOKE64,	{RS, RA0, RB}},
--{"stbepx",	X(31,223),	X_MASK,      E500MC,	{RS, RA, RB}},
--
--{"icblc",	X(31,230),	X_MASK,      PPCCHLK,	{CT, RA, RB}},
--
--{"stvx",	X(31,231),	X_MASK,      PPCVEC,	{VS, RA, RB}},
--{"stqfcmx",	APU(31,231,0), 	APU_MASK,    PPC405,	{FCRT, RA, RB}},
--
--{"subfme",	XO(31,232,0,0),	XORB_MASK,   PPCCOM,	{RT, RA}},
--{"sfme",	XO(31,232,0,0),	XORB_MASK,   PWRCOM,	{RT, RA}},
--{"subfme.",	XO(31,232,0,1),	XORB_MASK,   PPCCOM,	{RT, RA}},
--{"sfme.",	XO(31,232,0,1),	XORB_MASK,   PWRCOM,	{RT, RA}},
--
--{"mulld",	XO(31,233,0,0),	XO_MASK,     PPC64,	{RT, RA, RB}},
--{"mulld.",	XO(31,233,0,1),	XO_MASK,     PPC64,	{RT, RA, RB}},
--
--{"addme",	XO(31,234,0,0),	XORB_MASK,   PPCCOM,	{RT, RA}},
--{"ame",		XO(31,234,0,0),	XORB_MASK,   PWRCOM,	{RT, RA}},
--{"addme.",	XO(31,234,0,1),	XORB_MASK,   PPCCOM,	{RT, RA}},
--{"ame.",	XO(31,234,0,1),	XORB_MASK,   PWRCOM,	{RT, RA}},
--
--{"mullw",	XO(31,235,0,0),	XO_MASK,     PPCCOM,	{RT, RA, RB}},
--{"muls",	XO(31,235,0,0),	XO_MASK,     PWRCOM,	{RT, RA, RB}},
--{"mullw.",	XO(31,235,0,1),	XO_MASK,     PPCCOM,	{RT, RA, RB}},
--{"muls.",	XO(31,235,0,1),	XO_MASK,     PWRCOM,	{RT, RA, RB}},
--
--{"msgclr",	XRTRA(31,238,0,0),XRTRA_MASK,E500MC,	{RB}},
--{"icblce",	X(31,238),	X_MASK,      PPCCHLK64,	{CT, RA, RB}},
--{"mtsrin",	X(31,242),	XRA_MASK,    PPC32,	{RS, RB}},
--{"mtsri",	X(31,242),	XRA_MASK,    POWER32,	{RS, RB}},
--
--{"dcbtst",	X(31,246),	X_MASK,      PPC,	{CT, RA, RB}},
--
--{"stbux",	X(31,247),	X_MASK,      COM,	{RS, RAS, RB}},
--
--{"slliq",	XRC(31,248,0),	X_MASK,      M601,	{RA, RS, SH}},
--{"slliq.",	XRC(31,248,1),	X_MASK,      M601,	{RA, RS, SH}},
--
--{"dcbtste",	X(31,253),	X_MASK,      BOOKE64,	{CT, RA, RB}},
--
--{"stbuxe",	X(31,255),	X_MASK,      BOOKE64,	{RS, RAS, RB}},
--
--{"dcbtstep",	XRT(31,255,0),	X_MASK,      E500MC,	{RT, RA, RB}},
--
--{"mfdcrx",	X(31,259),	X_MASK,      BOOKE,	{RS, RA}},
--
--{"icbt",	X(31,262),	XRT_MASK,    PPC403,	{RA, RB}},
--
--{"ldfcmx",	APU(31,263,0), 	APU_MASK,    PPC405,	{FCRT, RA, RB}},
--{"doz",		XO(31,264,0,0),	XO_MASK,     M601,	{RT, RA, RB}},
--{"doz.",	XO(31,264,0,1),	XO_MASK,     M601,	{RT, RA, RB}},
--
--{"add",		XO(31,266,0,0),	XO_MASK,     PPCCOM,	{RT, RA, RB}},
--{"cax",		XO(31,266,0,0),	XO_MASK,     PWRCOM,	{RT, RA, RB}},
--{"add.",	XO(31,266,0,1),	XO_MASK,     PPCCOM,	{RT, RA, RB}},
--{"cax.",	XO(31,266,0,1),	XO_MASK,     PWRCOM,	{RT, RA, RB}},
--
--{"ehpriv",	X(31,270),	0xffffffff,  E500MC,	{0}},
--
--{"tlbiel",	X(31,274),	XRTLRA_MASK, POWER4,	{RB, L}},
--
--{"mfapidi",	X(31,275),	X_MASK,      BOOKE,	{RT, RA}},
--
--{"lscbx",	XRC(31,277,0),	X_MASK,      M601,	{RT, RA, RB}},
--{"lscbx.",	XRC(31,277,1),	X_MASK,      M601,	{RT, RA, RB}},
--
--{"dcbt",	X(31,278),	X_MASK,      PPC,	{CT, RA, RB}},
--
--{"lhzx",	X(31,279),	X_MASK,      COM,	{RT, RA0, RB}},
--
--{"eqv",		XRC(31,284,0),	X_MASK,      COM,	{RA, RS, RB}},
--{"eqv.",	XRC(31,284,1),	X_MASK,      COM,	{RA, RS, RB}},
--
--{"dcbte",	X(31,286),	X_MASK,      BOOKE64,	{CT, RA, RB}},
--
--{"lhzxe",	X(31,287),	X_MASK,      BOOKE64,	{RT, RA0, RB}},
--{"lhepx",	X(31,287),	X_MASK,      E500MC,	{RT, RA, RB}},
--
--{"mfdcrux",	X(31,291),	X_MASK,      PPC464,	{RS, RA}},
--
--{"tlbie",	X(31,306),	XRTLRA_MASK, PPC,	{RB, L}},
--{"tlbi",	X(31,306),	XRT_MASK,    POWER,	{RA0, RB}},
--
--{"eciwx",	X(31,310),	X_MASK,      PPC,	{RT, RA, RB}},
--
--{"lhzux",	X(31,311),	X_MASK,      COM,	{RT, RAL, RB}},
--
--{"xor",		XRC(31,316,0),	X_MASK,      COM,	{RA, RS, RB}},
--{"xor.",	XRC(31,316,1),	X_MASK,      COM,	{RA, RS, RB}},
--
--{"lhzuxe",	X(31,319),	X_MASK,      BOOKE64,	{RT, RAL, RB}},
--
--{"dcbtep",	XRT(31,319,0),	X_MASK,      E500MC,	{RT, RA, RB}},
--
--{"mfexisr",	XSPR(31,323, 64), XSPR_MASK, PPC403,	{RT}},
--{"mfexier",	XSPR(31,323, 66), XSPR_MASK, PPC403,	{RT}},
--{"mfbr0",	XSPR(31,323,128), XSPR_MASK, PPC403,	{RT}},
--{"mfbr1",	XSPR(31,323,129), XSPR_MASK, PPC403,	{RT}},
--{"mfbr2",	XSPR(31,323,130), XSPR_MASK, PPC403,	{RT}},
--{"mfbr3",	XSPR(31,323,131), XSPR_MASK, PPC403,	{RT}},
--{"mfbr4",	XSPR(31,323,132), XSPR_MASK, PPC403,	{RT}},
--{"mfbr5",	XSPR(31,323,133), XSPR_MASK, PPC403,	{RT}},
--{"mfbr6",	XSPR(31,323,134), XSPR_MASK, PPC403,	{RT}},
--{"mfbr7",	XSPR(31,323,135), XSPR_MASK, PPC403,	{RT}},
--{"mfbear",	XSPR(31,323,144), XSPR_MASK, PPC403,	{RT}},
--{"mfbesr",	XSPR(31,323,145), XSPR_MASK, PPC403,	{RT}},
--{"mfiocr",	XSPR(31,323,160), XSPR_MASK, PPC403,	{RT}},
--{"mfdmacr0",	XSPR(31,323,192), XSPR_MASK, PPC403,	{RT}},
--{"mfdmact0",	XSPR(31,323,193), XSPR_MASK, PPC403,	{RT}},
--{"mfdmada0",	XSPR(31,323,194), XSPR_MASK, PPC403,	{RT}},
--{"mfdmasa0",	XSPR(31,323,195), XSPR_MASK, PPC403,	{RT}},
--{"mfdmacc0",	XSPR(31,323,196), XSPR_MASK, PPC403,	{RT}},
--{"mfdmacr1",	XSPR(31,323,200), XSPR_MASK, PPC403,	{RT}},
--{"mfdmact1",	XSPR(31,323,201), XSPR_MASK, PPC403,	{RT}},
--{"mfdmada1",	XSPR(31,323,202), XSPR_MASK, PPC403,	{RT}},
--{"mfdmasa1",	XSPR(31,323,203), XSPR_MASK, PPC403,	{RT}},
--{"mfdmacc1",	XSPR(31,323,204), XSPR_MASK, PPC403,	{RT}},
--{"mfdmacr2",	XSPR(31,323,208), XSPR_MASK, PPC403,	{RT}},
--{"mfdmact2",	XSPR(31,323,209), XSPR_MASK, PPC403,	{RT}},
--{"mfdmada2",	XSPR(31,323,210), XSPR_MASK, PPC403,	{RT}},
--{"mfdmasa2",	XSPR(31,323,211), XSPR_MASK, PPC403,	{RT}},
--{"mfdmacc2",	XSPR(31,323,212), XSPR_MASK, PPC403,	{RT}},
--{"mfdmacr3",	XSPR(31,323,216), XSPR_MASK, PPC403,	{RT}},
--{"mfdmact3",	XSPR(31,323,217), XSPR_MASK, PPC403,	{RT}},
--{"mfdmada3",	XSPR(31,323,218), XSPR_MASK, PPC403,	{RT}},
--{"mfdmasa3",	XSPR(31,323,219), XSPR_MASK, PPC403,	{RT}},
--{"mfdmacc3",	XSPR(31,323,220), XSPR_MASK, PPC403,	{RT}},
--{"mfdmasr",	XSPR(31,323,224), XSPR_MASK, PPC403,	{RT}},
--{"mfdcr",	X(31,323),	X_MASK,   PPC403|BOOKE,	{RT, SPR}},
--
--{"div",		XO(31,331,0,0),	XO_MASK,     M601,	{RT, RA, RB}},
--{"div.",	XO(31,331,0,1),	XO_MASK,     M601,	{RT, RA, RB}},
--
--{"mfpmr",	X(31,334),	X_MASK, PPCPMR|PPCE300,	{RT, PMR}},
--
--{"mfmq",	XSPR(31,339,  0), XSPR_MASK, M601,	{RT}},
--{"mfxer",	XSPR(31,339,  1), XSPR_MASK, COM,	{RT}},
--{"mfrtcu",	XSPR(31,339,  4), XSPR_MASK, COM,	{RT}},
--{"mfrtcl",	XSPR(31,339,  5), XSPR_MASK, COM,	{RT}},
--{"mfdec",	XSPR(31,339,  6), XSPR_MASK, MFDEC1,	{RT}},
--{"mflr",	XSPR(31,339,  8), XSPR_MASK, COM,	{RT}},
--{"mfctr",	XSPR(31,339,  9), XSPR_MASK, COM,	{RT}},
--{"mftid",	XSPR(31,339, 17), XSPR_MASK, POWER,	{RT}},
--{"mfdsisr",	XSPR(31,339, 18), XSPR_MASK, COM,	{RT}},
--{"mfdar",	XSPR(31,339, 19), XSPR_MASK, COM,	{RT}},
--{"mfdec",	XSPR(31,339, 22), XSPR_MASK, MFDEC2,	{RT}},
--{"mfsdr0",	XSPR(31,339, 24), XSPR_MASK, POWER,	{RT}},
--{"mfsdr1",	XSPR(31,339, 25), XSPR_MASK, COM,	{RT}},
--{"mfsrr0",	XSPR(31,339, 26), XSPR_MASK, COM,	{RT}},
--{"mfsrr1",	XSPR(31,339, 27), XSPR_MASK, COM,	{RT}},
--{"mfcfar",	XSPR(31,339, 28), XSPR_MASK, POWER6,	{RT}},
--{"mfpid",	XSPR(31,339, 48), XSPR_MASK, BOOKE,	{RT}},
--{"mfcsrr0",	XSPR(31,339, 58), XSPR_MASK, BOOKE,	{RT}},
--{"mfcsrr1",	XSPR(31,339, 59), XSPR_MASK, BOOKE,	{RT}},
--{"mfdear",	XSPR(31,339, 61), XSPR_MASK, BOOKE,	{RT}},
--{"mfesr",	XSPR(31,339, 62), XSPR_MASK, BOOKE,	{RT}},
--{"mfivpr",	XSPR(31,339, 63), XSPR_MASK, BOOKE,	{RT}},
--{"mfcmpa",	XSPR(31,339,144), XSPR_MASK, PPC860,	{RT}},
--{"mfcmpb",	XSPR(31,339,145), XSPR_MASK, PPC860,	{RT}},
--{"mfcmpc",	XSPR(31,339,146), XSPR_MASK, PPC860,	{RT}},
--{"mfcmpd",	XSPR(31,339,147), XSPR_MASK, PPC860,	{RT}},
--{"mficr",	XSPR(31,339,148), XSPR_MASK, PPC860,	{RT}},
--{"mfder",	XSPR(31,339,149), XSPR_MASK, PPC860,	{RT}},
--{"mfcounta",	XSPR(31,339,150), XSPR_MASK, PPC860,	{RT}},
--{"mfcountb",	XSPR(31,339,151), XSPR_MASK, PPC860,	{RT}},
--{"mfcmpe",	XSPR(31,339,152), XSPR_MASK, PPC860,	{RT}},
--{"mfcmpf",	XSPR(31,339,153), XSPR_MASK, PPC860,	{RT}},
--{"mfcmpg",	XSPR(31,339,154), XSPR_MASK, PPC860,	{RT}},
--{"mfcmph",	XSPR(31,339,155), XSPR_MASK, PPC860,	{RT}},
--{"mflctrl1",	XSPR(31,339,156), XSPR_MASK, PPC860,	{RT}},
--{"mflctrl2",	XSPR(31,339,157), XSPR_MASK, PPC860,	{RT}},
--{"mfictrl",	XSPR(31,339,158), XSPR_MASK, PPC860,	{RT}},
--{"mfbar",	XSPR(31,339,159), XSPR_MASK, PPC860,	{RT}},
--{"mfvrsave",	XSPR(31,339,256), XSPR_MASK, PPCVEC,	{RT}},
--{"mfusprg0",	XSPR(31,339,256), XSPR_MASK, BOOKE,	{RT}},
--{"mfsprg",	XSPR(31,339,256), XSPRG_MASK, PPC,	{RT, SPRG}},
--{"mfsprg4",	XSPR(31,339,260), XSPR_MASK, PPC405|BOOKE, {RT}},
--{"mfsprg5",	XSPR(31,339,261), XSPR_MASK, PPC405|BOOKE, {RT}},
--{"mfsprg6",	XSPR(31,339,262), XSPR_MASK, PPC405|BOOKE, {RT}},
--{"mfsprg7",	XSPR(31,339,263), XSPR_MASK, PPC405|BOOKE, {RT}},
--{"mftb",	XSPR(31,339,268), XSPR_MASK, BOOKE,	{RT}},
--{"mftbl",	XSPR(31,339,268), XSPR_MASK, BOOKE,	{RT}},
--{"mftbu",	XSPR(31,339,269), XSPR_MASK, BOOKE,	{RT}},
--{"mfsprg0",	XSPR(31,339,272), XSPR_MASK, PPC,	{RT}},
--{"mfsprg1",	XSPR(31,339,273), XSPR_MASK, PPC,	{RT}},
--{"mfsprg2",	XSPR(31,339,274), XSPR_MASK, PPC,	{RT}},
--{"mfsprg3",	XSPR(31,339,275), XSPR_MASK, PPC,	{RT}},
--{"mfasr",	XSPR(31,339,280), XSPR_MASK, PPC64,	{RT}},
--{"mfear",	XSPR(31,339,282), XSPR_MASK, PPC,	{RT}},
--{"mfpir",	XSPR(31,339,286), XSPR_MASK, BOOKE,	{RT}},
--{"mfpvr",	XSPR(31,339,287), XSPR_MASK, PPC,	{RT}},
--{"mfdbsr",	XSPR(31,339,304), XSPR_MASK, BOOKE,	{RT}},
--{"mfdbcr0",	XSPR(31,339,308), XSPR_MASK, BOOKE,	{RT}},
--{"mfdbcr1",	XSPR(31,339,309), XSPR_MASK, BOOKE,	{RT}},
--{"mfdbcr2",	XSPR(31,339,310), XSPR_MASK, BOOKE,	{RT}},
--{"mfiac1",	XSPR(31,339,312), XSPR_MASK, BOOKE,	{RT}},
--{"mfiac2",	XSPR(31,339,313), XSPR_MASK, BOOKE,	{RT}},
--{"mfiac3",	XSPR(31,339,314), XSPR_MASK, BOOKE,	{RT}},
--{"mfiac4",	XSPR(31,339,315), XSPR_MASK, BOOKE,	{RT}},
--{"mfdac1",	XSPR(31,339,316), XSPR_MASK, BOOKE,	{RT}},
--{"mfdac2",	XSPR(31,339,317), XSPR_MASK, BOOKE,	{RT}},
--{"mfdvc1",	XSPR(31,339,318), XSPR_MASK, BOOKE,	{RT}},
--{"mfdvc2",	XSPR(31,339,319), XSPR_MASK, BOOKE,	{RT}},
--{"mftsr",	XSPR(31,339,336), XSPR_MASK, BOOKE,	{RT}},
--{"mftcr",	XSPR(31,339,340), XSPR_MASK, BOOKE,	{RT}},
--{"mfivor0",	XSPR(31,339,400), XSPR_MASK, BOOKE,	{RT}},
--{"mfivor1",	XSPR(31,339,401), XSPR_MASK, BOOKE,	{RT}},
--{"mfivor2",	XSPR(31,339,402), XSPR_MASK, BOOKE,	{RT}},
--{"mfivor3",	XSPR(31,339,403), XSPR_MASK, BOOKE,	{RT}},
--{"mfivor4",	XSPR(31,339,404), XSPR_MASK, BOOKE,	{RT}},
--{"mfivor5",	XSPR(31,339,405), XSPR_MASK, BOOKE,	{RT}},
--{"mfivor6",	XSPR(31,339,406), XSPR_MASK, BOOKE,	{RT}},
--{"mfivor7",	XSPR(31,339,407), XSPR_MASK, BOOKE,	{RT}},
--{"mfivor8",	XSPR(31,339,408), XSPR_MASK, BOOKE,	{RT}},
--{"mfivor9",	XSPR(31,339,409), XSPR_MASK, BOOKE,	{RT}},
--{"mfivor10",	XSPR(31,339,410), XSPR_MASK, BOOKE,	{RT}},
--{"mfivor11",	XSPR(31,339,411), XSPR_MASK, BOOKE,	{RT}},
--{"mfivor12",	XSPR(31,339,412), XSPR_MASK, BOOKE,	{RT}},
--{"mfivor13",	XSPR(31,339,413), XSPR_MASK, BOOKE,	{RT}},
--{"mfivor14",	XSPR(31,339,414), XSPR_MASK, BOOKE,	{RT}},
--{"mfivor15",	XSPR(31,339,415), XSPR_MASK, BOOKE,	{RT}},
--{"mfspefscr",	XSPR(31,339,512), XSPR_MASK, PPCSPE,	{RT}},
--{"mfbbear",	XSPR(31,339,513), XSPR_MASK, PPCBRLK,	{RT}},
--{"mfbbtar",	XSPR(31,339,514), XSPR_MASK, PPCBRLK,	{RT}},
--{"mfivor32",	XSPR(31,339,528), XSPR_MASK, PPCSPE,	{RT}},
--{"mfibatu",	XSPR(31,339,528), XSPRBAT_MASK, PPC,	{RT, SPRBAT}},
--{"mfivor33",	XSPR(31,339,529), XSPR_MASK, PPCSPE,	{RT}},
--{"mfibatl",	XSPR(31,339,529), XSPRBAT_MASK, PPC,	{RT, SPRBAT}},
--{"mfivor34",	XSPR(31,339,530), XSPR_MASK, PPCSPE,	{RT}},
--{"mfivor35",	XSPR(31,339,531), XSPR_MASK, PPCPMR,	{RT}},
--{"mfdbatu",	XSPR(31,339,536), XSPRBAT_MASK, PPC,	{RT, SPRBAT}},
--{"mfdbatl",	XSPR(31,339,537), XSPRBAT_MASK, PPC,	{RT, SPRBAT}},
--{"mfic_cst",	XSPR(31,339,560), XSPR_MASK, PPC860,	{RT}},
--{"mfic_adr",	XSPR(31,339,561), XSPR_MASK, PPC860,	{RT}},
--{"mfic_dat",	XSPR(31,339,562), XSPR_MASK, PPC860,	{RT}},
--{"mfdc_cst",	XSPR(31,339,568), XSPR_MASK, PPC860,	{RT}},
--{"mfdc_adr",	XSPR(31,339,569), XSPR_MASK, PPC860,	{RT}},
--{"mfdc_dat",	XSPR(31,339,570), XSPR_MASK, PPC860,	{RT}},
--{"mfmcsrr0",	XSPR(31,339,570), XSPR_MASK, PPCRFMCI,	{RT}},
--{"mfmcsrr1",	XSPR(31,339,571), XSPR_MASK, PPCRFMCI,	{RT}},
--{"mfmcsr",	XSPR(31,339,572), XSPR_MASK, PPCRFMCI,	{RT}},
--{"mfmcar",	XSPR(31,339,573), XSPR_MASK, PPCRFMCI,	{RT}},
--{"mfdpdr",	XSPR(31,339,630), XSPR_MASK, PPC860,	{RT}},
--{"mfdpir",	XSPR(31,339,631), XSPR_MASK, PPC860,	{RT}},
--{"mfimmr",	XSPR(31,339,638), XSPR_MASK, PPC860,	{RT}},
--{"mfmi_ctr",	XSPR(31,339,784), XSPR_MASK, PPC860,	{RT}},
--{"mfmi_ap",	XSPR(31,339,786), XSPR_MASK, PPC860,	{RT}},
--{"mfmi_epn",	XSPR(31,339,787), XSPR_MASK, PPC860,	{RT}},
--{"mfmi_twc",	XSPR(31,339,789), XSPR_MASK, PPC860,	{RT}},
--{"mfmi_rpn",	XSPR(31,339,790), XSPR_MASK, PPC860,	{RT}},
--{"mfmd_ctr",	XSPR(31,339,792), XSPR_MASK, PPC860,	{RT}},
--{"mfm_casid",	XSPR(31,339,793), XSPR_MASK, PPC860,	{RT}},
--{"mfmd_ap",	XSPR(31,339,794), XSPR_MASK, PPC860,	{RT}},
--{"mfmd_epn",	XSPR(31,339,795), XSPR_MASK, PPC860,	{RT}},
--{"mfmd_twb",	XSPR(31,339,796), XSPR_MASK, PPC860,	{RT}},
--{"mfmd_twc",	XSPR(31,339,797), XSPR_MASK, PPC860,	{RT}},
--{"mfmd_rpn",	XSPR(31,339,798), XSPR_MASK, PPC860,	{RT}},
--{"mfm_tw",	XSPR(31,339,799), XSPR_MASK, PPC860,	{RT}},
--{"mfmi_dbcam",	XSPR(31,339,816), XSPR_MASK, PPC860,	{RT}},
--{"mfmi_dbram0",	XSPR(31,339,817), XSPR_MASK, PPC860,	{RT}},
--{"mfmi_dbram1",	XSPR(31,339,818), XSPR_MASK, PPC860,	{RT}},
--{"mfmd_dbcam",	XSPR(31,339,824), XSPR_MASK, PPC860,	{RT}},
--{"mfmd_dbram0",	XSPR(31,339,825), XSPR_MASK, PPC860,	{RT}},
--{"mfmd_dbram1",	XSPR(31,339,826), XSPR_MASK, PPC860,	{RT}},
--{"mfummcr0",	XSPR(31,339,936), XSPR_MASK, PPC750,	{RT}},
--{"mfupmc1",	XSPR(31,339,937), XSPR_MASK, PPC750,	{RT}},
--{"mfupmc2",	XSPR(31,339,938), XSPR_MASK, PPC750,	{RT}},
--{"mfusia",	XSPR(31,339,939), XSPR_MASK, PPC750,	{RT}},
--{"mfummcr1",	XSPR(31,339,940), XSPR_MASK, PPC750,	{RT}},
--{"mfupmc3",	XSPR(31,339,941), XSPR_MASK, PPC750,	{RT}},
--{"mfupmc4",	XSPR(31,339,942), XSPR_MASK, PPC750,	{RT}},
--{"mfzpr",	XSPR(31,339,944), XSPR_MASK, PPC403,	{RT}},
--{"mfpid",	XSPR(31,339,945), XSPR_MASK, PPC403,	{RT}},
--{"mfccr0",	XSPR(31,339,947), XSPR_MASK, PPC405,	{RT}},
--{"mfiac3",	XSPR(31,339,948), XSPR_MASK, PPC405,	{RT}},
--{"mfiac4",	XSPR(31,339,949), XSPR_MASK, PPC405,	{RT}},
--{"mfdvc1",	XSPR(31,339,950), XSPR_MASK, PPC405,	{RT}},
--{"mfdvc2",	XSPR(31,339,951), XSPR_MASK, PPC405,	{RT}},
--{"mfmmcr0",	XSPR(31,339,952), XSPR_MASK, PPC750,	{RT}},
--{"mfpmc1",	XSPR(31,339,953), XSPR_MASK, PPC750,	{RT}},
--{"mfsgr",	XSPR(31,339,953), XSPR_MASK, PPC403,	{RT}},
--{"mfdcwr",	XSPR(31,339,954), XSPR_MASK, PPC403,	{RT}},
--{"mfpmc2",	XSPR(31,339,954), XSPR_MASK, PPC750,	{RT}},
--{"mfsia",	XSPR(31,339,955), XSPR_MASK, PPC750,	{RT}},
--{"mfsler",	XSPR(31,339,955), XSPR_MASK, PPC405,	{RT}},
--{"mfmmcr1",	XSPR(31,339,956), XSPR_MASK, PPC750,	{RT}},
--{"mfsu0r",	XSPR(31,339,956), XSPR_MASK, PPC405,	{RT}},
--{"mfdbcr1",	XSPR(31,339,957), XSPR_MASK, PPC405,	{RT}},
--{"mfpmc3",	XSPR(31,339,957), XSPR_MASK, PPC750,	{RT}},
--{"mfpmc4",	XSPR(31,339,958), XSPR_MASK, PPC750,	{RT}},
--{"mficdbdr",	XSPR(31,339,979), XSPR_MASK, PPC403,	{RT}},
--{"mfesr",	XSPR(31,339,980), XSPR_MASK, PPC403,	{RT}},
--{"mfdear",	XSPR(31,339,981), XSPR_MASK, PPC403,	{RT}},
--{"mfevpr",	XSPR(31,339,982), XSPR_MASK, PPC403,	{RT}},
--{"mfcdbcr",	XSPR(31,339,983), XSPR_MASK, PPC403,	{RT}},
--{"mftsr",	XSPR(31,339,984), XSPR_MASK, PPC403,	{RT}},
--{"mftcr",	XSPR(31,339,986), XSPR_MASK, PPC403,	{RT}},
--{"mfpit",	XSPR(31,339,987), XSPR_MASK, PPC403,	{RT}},
--{"mftbhi",	XSPR(31,339,988), XSPR_MASK, PPC403,	{RT}},
--{"mftblo",	XSPR(31,339,989), XSPR_MASK, PPC403,	{RT}},
--{"mfsrr2",	XSPR(31,339,990), XSPR_MASK, PPC403,	{RT}},
--{"mfsrr3",	XSPR(31,339,991), XSPR_MASK, PPC403,	{RT}},
--{"mfdbsr",	XSPR(31,339,1008), XSPR_MASK, PPC403,	{RT}},
--{"mfdbcr0",	XSPR(31,339,1010), XSPR_MASK, PPC405,	{RT}},
--{"mfiac1",	XSPR(31,339,1012), XSPR_MASK, PPC403,	{RT}},
--{"mfiac2",	XSPR(31,339,1013), XSPR_MASK, PPC403,	{RT}},
--{"mfdac1",	XSPR(31,339,1014), XSPR_MASK, PPC403,	{RT}},
--{"mfdac2",	XSPR(31,339,1015), XSPR_MASK, PPC403,	{RT}},
--{"mfl2cr",	XSPR(31,339,1017), XSPR_MASK, PPC750,	{RT}},
--{"mfdccr",	XSPR(31,339,1018), XSPR_MASK, PPC403,	{RT}},
--{"mficcr",	XSPR(31,339,1019), XSPR_MASK, PPC403,	{RT}},
--{"mfictc",	XSPR(31,339,1019), XSPR_MASK, PPC750,	{RT}},
--{"mfpbl1",	XSPR(31,339,1020), XSPR_MASK, PPC403,	{RT}},
--{"mfthrm1",	XSPR(31,339,1020), XSPR_MASK, PPC750,	{RT}},
--{"mfpbu1",	XSPR(31,339,1021), XSPR_MASK, PPC403,	{RT}},
--{"mfthrm2",	XSPR(31,339,1021), XSPR_MASK, PPC750,	{RT}},
--{"mfpbl2",	XSPR(31,339,1022), XSPR_MASK, PPC403,	{RT}},
--{"mfthrm3",	XSPR(31,339,1022), XSPR_MASK, PPC750,	{RT}},
--{"mfpbu2",	XSPR(31,339,1023), XSPR_MASK, PPC403,	{RT}},
--{"mfspr",	X(31,339),	X_MASK,      COM,	{RT, SPR}},
--
--{"lwax",	X(31,341),	X_MASK,      PPC64,	{RT, RA0, RB}},
--
--{"dst",		XDSS(31,342,0),	XDSS_MASK,   PPCVEC,	{RA, RB, STRM}},
--
--{"lhax",	X(31,343),	X_MASK,      COM,	{RT, RA0, RB}},
--
--{"lhaxe",	X(31,351),	X_MASK,      BOOKE64,	{RT, RA0, RB}},
--
--{"lvxl",	X(31,359),	X_MASK,      PPCVEC,	{VD, RA, RB}},
--
--{"abs",		XO(31,360,0,0),	XORB_MASK,   M601,	{RT, RA}},
--{"abs.",	XO(31,360,0,1),	XORB_MASK,   M601,	{RT, RA}},
--
--{"divs",	XO(31,363,0,0),	XO_MASK,     M601,	{RT, RA, RB}},
--{"divs.",	XO(31,363,0,1),	XO_MASK,     M601,	{RT, RA, RB}},
--
--{"tlbia",	X(31,370),	0xffffffff,  PPC,	{0}},
--
--{"mftbl",	XSPR(31,371,268), XSPR_MASK, CLASSIC,	{RT}},
--{"mftbu",	XSPR(31,371,269), XSPR_MASK, CLASSIC,	{RT}},
--{"mftb",	X(31,371),	X_MASK,      CLASSIC,	{RT, TBR}},
--
--{"lwaux",	X(31,373),	X_MASK,      PPC64,	{RT, RAL, RB}},
--
--{"dstst",	XDSS(31,374,0),	XDSS_MASK,   PPCVEC,	{RA, RB, STRM}},
--
--{"lhaux",	X(31,375),	X_MASK,      COM,	{RT, RAL, RB}},
--
--{"lhauxe",	X(31,383),	X_MASK,      BOOKE64,	{RT, RAL, RB}},
--
--{"mtdcrx",	X(31,387),	X_MASK,      BOOKE,	{RA, RS}},
--
--{"dcblc",	X(31,390),	X_MASK,      PPCCHLK,	{CT, RA, RB}},
--{"stdfcmx",	APU(31,391,0), 	APU_MASK,    PPC405,	{FCRT, RA, RB}},
--
--{"subfe64",	XO(31,392,0,0),	XO_MASK,     BOOKE64,	{RT, RA, RB}},
--
--{"adde64",	XO(31,394,0,0),	XO_MASK,     BOOKE64,	{RT, RA, RB}},
--
--{"dcblce",	X(31,398),	X_MASK,      PPCCHLK64,	{CT, RA, RB}},
--
--{"slbmte",	X(31,402),	XRA_MASK,    PPC64,	{RS, RB}},
--
--{"sthx",	X(31,407),	X_MASK,      COM,	{RS, RA0, RB}},
--
--{"orc",		XRC(31,412,0),	X_MASK,      COM,	{RA, RS, RB}},
--{"orc.",	XRC(31,412,1),	X_MASK,      COM,	{RA, RS, RB}},
--
--{"sthxe",	X(31,415),	X_MASK,      BOOKE64,	{RS, RA0, RB}},
--{"sthepx",	X(31,415),	X_MASK,      E500MC,	{RS, RA, RB}},
--
--{"mtdcrux",	X(31,419),	X_MASK,      PPC464,	{RA, RS}},
--
--{"slbie",	X(31,434),	XRTRA_MASK,  PPC64,	{RB}},
--
--{"ecowx",	X(31,438),	X_MASK,      PPC,	{RT, RA, RB}},
--
--{"sthux",	X(31,439),	X_MASK,      COM,	{RS, RAS, RB}},
--
--{"mdors",	0x7f9ce378,	0xffffffff,  E500MC,	{0}},
--
--{"mr",		XRC(31,444,0),	X_MASK,      COM,	{RA, RS, RBS}},
--{"or",		XRC(31,444,0),	X_MASK,      COM,	{RA, RS, RB}},
--{"mr.",		XRC(31,444,1),	X_MASK,      COM,	{RA, RS, RBS}},
--{"or.",		XRC(31,444,1),	X_MASK,      COM,	{RA, RS, RB}},
--
--{"sthuxe",	X(31,447),	X_MASK,      BOOKE64,	{RS, RAS, RB}},
--
--{"mtexisr",	XSPR(31,451, 64), XSPR_MASK, PPC403,	{RS}},
--{"mtexier",	XSPR(31,451, 66), XSPR_MASK, PPC403,	{RS}},
--{"mtbr0",	XSPR(31,451,128), XSPR_MASK, PPC403,	{RS}},
--{"mtbr1",	XSPR(31,451,129), XSPR_MASK, PPC403,	{RS}},
--{"mtbr2",	XSPR(31,451,130), XSPR_MASK, PPC403,	{RS}},
--{"mtbr3",	XSPR(31,451,131), XSPR_MASK, PPC403,	{RS}},
--{"mtbr4",	XSPR(31,451,132), XSPR_MASK, PPC403,	{RS}},
--{"mtbr5",	XSPR(31,451,133), XSPR_MASK, PPC403,	{RS}},
--{"mtbr6",	XSPR(31,451,134), XSPR_MASK, PPC403,	{RS}},
--{"mtbr7",	XSPR(31,451,135), XSPR_MASK, PPC403,	{RS}},
--{"mtbear",	XSPR(31,451,144), XSPR_MASK, PPC403,	{RS}},
--{"mtbesr",	XSPR(31,451,145), XSPR_MASK, PPC403,	{RS}},
--{"mtiocr",	XSPR(31,451,160), XSPR_MASK, PPC403,	{RS}},
--{"mtdmacr0",	XSPR(31,451,192), XSPR_MASK, PPC403,	{RS}},
--{"mtdmact0",	XSPR(31,451,193), XSPR_MASK, PPC403,	{RS}},
--{"mtdmada0",	XSPR(31,451,194), XSPR_MASK, PPC403,	{RS}},
--{"mtdmasa0",	XSPR(31,451,195), XSPR_MASK, PPC403,	{RS}},
--{"mtdmacc0",	XSPR(31,451,196), XSPR_MASK, PPC403,	{RS}},
--{"mtdmacr1",	XSPR(31,451,200), XSPR_MASK, PPC403,	{RS}},
--{"mtdmact1",	XSPR(31,451,201), XSPR_MASK, PPC403,	{RS}},
--{"mtdmada1",	XSPR(31,451,202), XSPR_MASK, PPC403,	{RS}},
--{"mtdmasa1",	XSPR(31,451,203), XSPR_MASK, PPC403,	{RS}},
--{"mtdmacc1",	XSPR(31,451,204), XSPR_MASK, PPC403,	{RS}},
--{"mtdmacr2",	XSPR(31,451,208), XSPR_MASK, PPC403,	{RS}},
--{"mtdmact2",	XSPR(31,451,209), XSPR_MASK, PPC403,	{RS}},
--{"mtdmada2",	XSPR(31,451,210), XSPR_MASK, PPC403,	{RS}},
--{"mtdmasa2",	XSPR(31,451,211), XSPR_MASK, PPC403,	{RS}},
--{"mtdmacc2",	XSPR(31,451,212), XSPR_MASK, PPC403,	{RS}},
--{"mtdmacr3",	XSPR(31,451,216), XSPR_MASK, PPC403,	{RS}},
--{"mtdmact3",	XSPR(31,451,217), XSPR_MASK, PPC403,	{RS}},
--{"mtdmada3",	XSPR(31,451,218), XSPR_MASK, PPC403,	{RS}},
--{"mtdmasa3",	XSPR(31,451,219), XSPR_MASK, PPC403,	{RS}},
--{"mtdmacc3",	XSPR(31,451,220), XSPR_MASK, PPC403,	{RS}},
--{"mtdmasr",	XSPR(31,451,224), XSPR_MASK, PPC403,	{RS}},
--{"mtdcr",	X(31,451),	X_MASK,   PPC403|BOOKE,	{SPR, RS}},
--
--{"dccci",	X(31,454),     XRT_MASK, PPC403|PPC440,	{RA, RB}},
--
--{"subfze64",	XO(31,456,0,0),	XORB_MASK,   BOOKE64,	{RT, RA}},
--
--{"divdu",	XO(31,457,0,0),	XO_MASK,     PPC64,	{RT, RA, RB}},
--{"divdu.",	XO(31,457,0,1),	XO_MASK,     PPC64,	{RT, RA, RB}},
--
--{"addze64",	XO(31,458,0,0),	XORB_MASK,   BOOKE64,	{RT, RA}},
--
--{"divwu",	XO(31,459,0,0),	XO_MASK,     PPC,	{RT, RA, RB}},
--{"divwu.",	XO(31,459,0,1),	XO_MASK,     PPC,	{RT, RA, RB}},
--
--{"mtpmr",	X(31,462),	X_MASK, PPCPMR|PPCE300,	{PMR, RS}},
--
--{"mtmq",	XSPR(31,467,  0), XSPR_MASK, M601,	{RS}},
--{"mtxer",	XSPR(31,467,  1), XSPR_MASK, COM,	{RS}},
--{"mtlr",	XSPR(31,467,  8), XSPR_MASK, COM,	{RS}},
--{"mtctr",	XSPR(31,467,  9), XSPR_MASK, COM,	{RS}},
--{"mttid",	XSPR(31,467, 17), XSPR_MASK, POWER,	{RS}},
--{"mtdsisr",	XSPR(31,467, 18), XSPR_MASK, COM,	{RS}},
--{"mtdar",	XSPR(31,467, 19), XSPR_MASK, COM,	{RS}},
--{"mtrtcu",	XSPR(31,467, 20), XSPR_MASK, COM,	{RS}},
--{"mtrtcl",	XSPR(31,467, 21), XSPR_MASK, COM,	{RS}},
--{"mtdec",	XSPR(31,467, 22), XSPR_MASK, COM,	{RS}},
--{"mtsdr0",	XSPR(31,467, 24), XSPR_MASK, POWER,	{RS}},
--{"mtsdr1",	XSPR(31,467, 25), XSPR_MASK, COM,	{RS}},
--{"mtsrr0",	XSPR(31,467, 26), XSPR_MASK, COM,	{RS}},
--{"mtsrr1",	XSPR(31,467, 27), XSPR_MASK, COM,	{RS}},
--{"mtcfar",	XSPR(31,467, 28), XSPR_MASK, POWER6,	{RS}},
--{"mtpid",	XSPR(31,467, 48), XSPR_MASK, BOOKE,	{RS}},
--{"mtdecar",	XSPR(31,467, 54), XSPR_MASK, BOOKE,	{RS}},
--{"mtcsrr0",	XSPR(31,467, 58), XSPR_MASK, BOOKE,	{RS}},
--{"mtcsrr1",	XSPR(31,467, 59), XSPR_MASK, BOOKE,	{RS}},
--{"mtdear",	XSPR(31,467, 61), XSPR_MASK, BOOKE,	{RS}},
--{"mtesr",	XSPR(31,467, 62), XSPR_MASK, BOOKE,	{RS}},
--{"mtivpr",	XSPR(31,467, 63), XSPR_MASK, BOOKE,	{RS}},
--{"mtcmpa",	XSPR(31,467,144), XSPR_MASK, PPC860,	{RS}},
--{"mtcmpb",	XSPR(31,467,145), XSPR_MASK, PPC860,	{RS}},
--{"mtcmpc",	XSPR(31,467,146), XSPR_MASK, PPC860,	{RS}},
--{"mtcmpd",	XSPR(31,467,147), XSPR_MASK, PPC860,	{RS}},
--{"mticr",	XSPR(31,467,148), XSPR_MASK, PPC860,	{RS}},
--{"mtder",	XSPR(31,467,149), XSPR_MASK, PPC860,	{RS}},
--{"mtcounta",	XSPR(31,467,150), XSPR_MASK, PPC860,	{RS}},
--{"mtcountb",	XSPR(31,467,151), XSPR_MASK, PPC860,	{RS}},
--{"mtcmpe",	XSPR(31,467,152), XSPR_MASK, PPC860,	{RS}},
--{"mtcmpf",	XSPR(31,467,153), XSPR_MASK, PPC860,	{RS}},
--{"mtcmpg",	XSPR(31,467,154), XSPR_MASK, PPC860,	{RS}},
--{"mtcmph",	XSPR(31,467,155), XSPR_MASK, PPC860,	{RS}},
--{"mtlctrl1",	XSPR(31,467,156), XSPR_MASK, PPC860,	{RS}},
--{"mtlctrl2",	XSPR(31,467,157), XSPR_MASK, PPC860,	{RS}},
--{"mtictrl",	XSPR(31,467,158), XSPR_MASK, PPC860,	{RS}},
--{"mtbar",	XSPR(31,467,159), XSPR_MASK, PPC860,	{RS}},
--{"mtvrsave",	XSPR(31,467,256), XSPR_MASK, PPCVEC,	{RS}},
--{"mtusprg0",	XSPR(31,467,256), XSPR_MASK, BOOKE,	{RS}},
--{"mtsprg",	XSPR(31,467,256), XSPRG_MASK,PPC,	{SPRG, RS}},
--{"mtsprg0",	XSPR(31,467,272), XSPR_MASK, PPC,	{RS}},
--{"mtsprg1",	XSPR(31,467,273), XSPR_MASK, PPC,	{RS}},
--{"mtsprg2",	XSPR(31,467,274), XSPR_MASK, PPC,	{RS}},
--{"mtsprg3",	XSPR(31,467,275), XSPR_MASK, PPC,	{RS}},
--{"mtsprg4",	XSPR(31,467,276), XSPR_MASK, PPC405|BOOKE, {RS}},
--{"mtsprg5",	XSPR(31,467,277), XSPR_MASK, PPC405|BOOKE, {RS}},
--{"mtsprg6",	XSPR(31,467,278), XSPR_MASK, PPC405|BOOKE, {RS}},
--{"mtsprg7",	XSPR(31,467,279), XSPR_MASK, PPC405|BOOKE, {RS}},
--{"mtasr",	XSPR(31,467,280), XSPR_MASK, PPC64,	{RS}},
--{"mtear",	XSPR(31,467,282), XSPR_MASK, PPC,	{RS}},
--{"mttbl",	XSPR(31,467,284), XSPR_MASK, PPC,	{RS}},
--{"mttbu",	XSPR(31,467,285), XSPR_MASK, PPC,	{RS}},
--{"mtdbsr",	XSPR(31,467,304), XSPR_MASK, BOOKE,	{RS}},
--{"mtdbcr0",	XSPR(31,467,308), XSPR_MASK, BOOKE,	{RS}},
--{"mtdbcr1",	XSPR(31,467,309), XSPR_MASK, BOOKE,	{RS}},
--{"mtdbcr2",	XSPR(31,467,310), XSPR_MASK, BOOKE,	{RS}},
--{"mtiac1",	XSPR(31,467,312), XSPR_MASK, BOOKE,	{RS}},
--{"mtiac2",	XSPR(31,467,313), XSPR_MASK, BOOKE,	{RS}},
--{"mtiac3",	XSPR(31,467,314), XSPR_MASK, BOOKE,	{RS}},
--{"mtiac4",	XSPR(31,467,315), XSPR_MASK, BOOKE,	{RS}},
--{"mtdac1",	XSPR(31,467,316), XSPR_MASK, BOOKE,	{RS}},
--{"mtdac2",	XSPR(31,467,317), XSPR_MASK, BOOKE,	{RS}},
--{"mtdvc1",	XSPR(31,467,318), XSPR_MASK, BOOKE,	{RS}},
--{"mtdvc2",	XSPR(31,467,319), XSPR_MASK, BOOKE,	{RS}},
--{"mttsr",	XSPR(31,467,336), XSPR_MASK, BOOKE,	{RS}},
--{"mttcr",	XSPR(31,467,340), XSPR_MASK, BOOKE,	{RS}},
--{"mtivor0",	XSPR(31,467,400), XSPR_MASK, BOOKE,	{RS}},
--{"mtivor1",	XSPR(31,467,401), XSPR_MASK, BOOKE,	{RS}},
--{"mtivor2",	XSPR(31,467,402), XSPR_MASK, BOOKE,	{RS}},
--{"mtivor3",	XSPR(31,467,403), XSPR_MASK, BOOKE,	{RS}},
--{"mtivor4",	XSPR(31,467,404), XSPR_MASK, BOOKE,	{RS}},
--{"mtivor5",	XSPR(31,467,405), XSPR_MASK, BOOKE,	{RS}},
--{"mtivor6",	XSPR(31,467,406), XSPR_MASK, BOOKE,	{RS}},
--{"mtivor7",	XSPR(31,467,407), XSPR_MASK, BOOKE,	{RS}},
--{"mtivor8",	XSPR(31,467,408), XSPR_MASK, BOOKE,	{RS}},
--{"mtivor9",	XSPR(31,467,409), XSPR_MASK, BOOKE,	{RS}},
--{"mtivor10",	XSPR(31,467,410), XSPR_MASK, BOOKE,	{RS}},
--{"mtivor11",	XSPR(31,467,411), XSPR_MASK, BOOKE,	{RS}},
--{"mtivor12",	XSPR(31,467,412), XSPR_MASK, BOOKE,	{RS}},
--{"mtivor13",	XSPR(31,467,413), XSPR_MASK, BOOKE,	{RS}},
--{"mtivor14",	XSPR(31,467,414), XSPR_MASK, BOOKE,	{RS}},
--{"mtivor15",	XSPR(31,467,415), XSPR_MASK, BOOKE,	{RS}},
--{"mtspefscr",	XSPR(31,467,512), XSPR_MASK, PPCSPE,	{RS}},
--{"mtbbear",	XSPR(31,467,513), XSPR_MASK, PPCBRLK,	{RS}},
--{"mtbbtar",	XSPR(31,467,514), XSPR_MASK, PPCBRLK,	{RS}},
--{"mtivor32",	XSPR(31,467,528), XSPR_MASK, PPCSPE,	{RS}},
--{"mtibatu",	XSPR(31,467,528), XSPRBAT_MASK, PPC,	{SPRBAT, RS}},
--{"mtivor33",	XSPR(31,467,529), XSPR_MASK, PPCSPE,	{RS}},
--{"mtibatl",	XSPR(31,467,529), XSPRBAT_MASK, PPC,	{SPRBAT, RS}},
--{"mtivor34",	XSPR(31,467,530), XSPR_MASK, PPCSPE,	{RS}},
--{"mtivor35",	XSPR(31,467,531), XSPR_MASK, PPCPMR,	{RS}},
--{"mtdbatu",	XSPR(31,467,536), XSPRBAT_MASK, PPC,	{SPRBAT, RS}},
--{"mtdbatl",	XSPR(31,467,537), XSPRBAT_MASK, PPC,	{SPRBAT, RS}},
--{"mtmcsrr0",	XSPR(31,467,570), XSPR_MASK, PPCRFMCI,	{RS}},
--{"mtmcsrr1",	XSPR(31,467,571), XSPR_MASK, PPCRFMCI,	{RS}},
--{"mtmcsr",	XSPR(31,467,572), XSPR_MASK, PPCRFMCI,	{RS}},
--{"mtummcr0",	XSPR(31,467,936), XSPR_MASK, PPC750,	{RS}},
--{"mtupmc1",	XSPR(31,467,937), XSPR_MASK, PPC750,	{RS}},
--{"mtupmc2",	XSPR(31,467,938), XSPR_MASK, PPC750,	{RS}},
--{"mtusia",	XSPR(31,467,939), XSPR_MASK, PPC750,	{RS}},
--{"mtummcr1",	XSPR(31,467,940), XSPR_MASK, PPC750,	{RS}},
--{"mtupmc3",	XSPR(31,467,941), XSPR_MASK, PPC750,	{RS}},
--{"mtupmc4",	XSPR(31,467,942), XSPR_MASK, PPC750,	{RS}},
--{"mtzpr",	XSPR(31,467,944), XSPR_MASK, PPC403,	{RS}},
--{"mtpid",	XSPR(31,467,945), XSPR_MASK, PPC403,	{RS}},
--{"mtccr0",	XSPR(31,467,947), XSPR_MASK, PPC405,	{RS}},
--{"mtiac3",	XSPR(31,467,948), XSPR_MASK, PPC405,	{RS}},
--{"mtiac4",	XSPR(31,467,949), XSPR_MASK, PPC405,	{RS}},
--{"mtdvc1",	XSPR(31,467,950), XSPR_MASK, PPC405,	{RS}},
--{"mtdvc2",	XSPR(31,467,951), XSPR_MASK, PPC405,	{RS}},
--{"mtmmcr0",	XSPR(31,467,952), XSPR_MASK, PPC750,	{RS}},
--{"mtpmc1",	XSPR(31,467,953), XSPR_MASK, PPC750,	{RS}},
--{"mtsgr",	XSPR(31,467,953), XSPR_MASK, PPC403,	{RS}},
--{"mtdcwr",	XSPR(31,467,954), XSPR_MASK, PPC403,	{RS}},
--{"mtpmc2",	XSPR(31,467,954), XSPR_MASK, PPC750,	{RS}},
--{"mtsia",	XSPR(31,467,955), XSPR_MASK, PPC750,	{RS}},
--{"mtsler",	XSPR(31,467,955), XSPR_MASK, PPC405,	{RS}},
--{"mtmmcr1",	XSPR(31,467,956), XSPR_MASK, PPC750,	{RS}},
--{"mtsu0r",	XSPR(31,467,956), XSPR_MASK, PPC405,	{RS}},
--{"mtdbcr1",	XSPR(31,467,957), XSPR_MASK, PPC405,	{RS}},
--{"mtpmc3",	XSPR(31,467,957), XSPR_MASK, PPC750,	{RS}},
--{"mtpmc4",	XSPR(31,467,958), XSPR_MASK, PPC750,	{RS}},
--{"mticdbdr",	XSPR(31,467,979), XSPR_MASK, PPC403,	{RS}},
--{"mtesr",	XSPR(31,467,980), XSPR_MASK, PPC403,	{RS}},
--{"mtdear",	XSPR(31,467,981), XSPR_MASK, PPC403,	{RS}},
--{"mtevpr",	XSPR(31,467,982), XSPR_MASK, PPC403,	{RS}},
--{"mtcdbcr",	XSPR(31,467,983), XSPR_MASK, PPC403,	{RS}},
--{"mttsr",	XSPR(31,467,984), XSPR_MASK, PPC403,	{RS}},
--{"mttcr",	XSPR(31,467,986), XSPR_MASK, PPC403,	{RS}},
--{"mtpit",	XSPR(31,467,987), XSPR_MASK, PPC403,	{RS}},
--{"mttbhi",	XSPR(31,467,988), XSPR_MASK, PPC403,	{RS}},
--{"mttblo",	XSPR(31,467,989), XSPR_MASK, PPC403,	{RS}},
--{"mtsrr2",	XSPR(31,467,990), XSPR_MASK, PPC403,	{RS}},
--{"mtsrr3",	XSPR(31,467,991), XSPR_MASK, PPC403,	{RS}},
--{"mtdbsr",	XSPR(31,467,1008), XSPR_MASK, PPC403,	{RS}},
--{"mtdbcr0",	XSPR(31,467,1010), XSPR_MASK, PPC405,	{RS}},
--{"mtiac1",	XSPR(31,467,1012), XSPR_MASK, PPC403,	{RS}},
--{"mtiac2",	XSPR(31,467,1013), XSPR_MASK, PPC403,	{RS}},
--{"mtdac1",	XSPR(31,467,1014), XSPR_MASK, PPC403,	{RS}},
--{"mtdac2",	XSPR(31,467,1015), XSPR_MASK, PPC403,	{RS}},
--{"mtl2cr",	XSPR(31,467,1017), XSPR_MASK, PPC750,	{RS}},
--{"mtdccr",	XSPR(31,467,1018), XSPR_MASK, PPC403,	{RS}},
--{"mticcr",	XSPR(31,467,1019), XSPR_MASK, PPC403,	{RS}},
--{"mtictc",	XSPR(31,467,1019), XSPR_MASK, PPC750,	{RS}},
--{"mtpbl1",	XSPR(31,467,1020), XSPR_MASK, PPC403,	{RS}},
--{"mtthrm1",	XSPR(31,467,1020), XSPR_MASK, PPC750,	{RS}},
--{"mtpbu1",	XSPR(31,467,1021), XSPR_MASK, PPC403,	{RS}},
--{"mtthrm2",	XSPR(31,467,1021), XSPR_MASK, PPC750,	{RS}},
--{"mtpbl2",	XSPR(31,467,1022), XSPR_MASK, PPC403,	{RS}},
--{"mtthrm3",	XSPR(31,467,1022), XSPR_MASK, PPC750,	{RS}},
--{"mtpbu2",	XSPR(31,467,1023), XSPR_MASK, PPC403,	{RS}},
--{"mtspr",	X(31,467),	  X_MASK,    COM,	{SPR, RS}},
--
--{"dcbi",	X(31,470),	XRT_MASK,    PPC,	{RA, RB}},
--
--{"nand",	XRC(31,476,0),	X_MASK,      COM,	{RA, RS, RB}},
--{"nand.",	XRC(31,476,1),	X_MASK,      COM,	{RA, RS, RB}},
--
--{"dcbie",	X(31,478),	XRT_MASK,    BOOKE64,	{RA, RB}},
--
--{"dsn", 	X(31,483),	XRT_MASK,    E500MC,	{RA, RB}},
--
--{"dcread",	X(31,486),	X_MASK,  PPC403|PPC440,	{RT, RA, RB}},
--
--{"icbtls",	X(31,486),	X_MASK,      PPCCHLK,	{CT, RA, RB}},
--
--{"stvxl",	X(31,487),	X_MASK,      PPCVEC,	{VS, RA, RB}},
--
--{"nabs",	XO(31,488,0,0),	XORB_MASK,   M601,	{RT, RA}},
--{"subfme64",	XO(31,488,0,0),	XORB_MASK,   BOOKE64,	{RT, RA}},
--{"nabs.",	XO(31,488,0,1),	XORB_MASK,   M601,	{RT, RA}},
--
--{"divd",	XO(31,489,0,0),	XO_MASK,     PPC64,	{RT, RA, RB}},
--{"divd.",	XO(31,489,0,1),	XO_MASK,     PPC64,	{RT, RA, RB}},
--
--{"addme64",	XO(31,490,0,0),	XORB_MASK,   BOOKE64,	{RT, RA}},
--
--{"divw",	XO(31,491,0,0),	XO_MASK,     PPC,	{RT, RA, RB}},
--{"divw.",	XO(31,491,0,1),	XO_MASK,     PPC,	{RT, RA, RB}},
--
--{"icbtlse",	X(31,494),	X_MASK,      PPCCHLK64,	{CT, RA, RB}},
--
--{"slbia",	X(31,498),	0xffffffff,  PPC64,	{0}},
--
--{"cli",		X(31,502),	XRB_MASK,    POWER,	{RT, RA}},
--
--{"cmpb",	X(31,508),	X_MASK,      POWER6,	{RA, RS, RB}},
--
--{"stdcxe.",	XRC(31,511,1),	X_MASK,      BOOKE64,	{RS, RA, RB}},
--
--{"mcrxr",	X(31,512), XRARB_MASK|(3<<21), COM,	{BF}},
--
--{"lbdx",	X(31,515),	X_MASK,      E500MC,	{RT, RA, RB}},
--
--{"bblels",	X(31,518),	X_MASK,      PPCBRLK,	{0}},
--
--{"lvlx",	X(31,519),	X_MASK,      CELL,	{VD, RA0, RB}},
--{"lbfcmux",	APU(31,519,0), 	APU_MASK,    PPC405,	{FCRT, RA, RB}},
--
--{"subfco",	XO(31,8,1,0),	XO_MASK,     PPCCOM,	{RT, RA, RB}},
--{"sfo",		XO(31,8,1,0),	XO_MASK,     PWRCOM,	{RT, RA, RB}},
--{"subco",	XO(31,8,1,0),	XO_MASK,     PPC,	{RT, RB, RA}},
--{"subfco.",	XO(31,8,1,1),	XO_MASK,     PPCCOM,	{RT, RA, RB}},
--{"sfo.",	XO(31,8,1,1),	XO_MASK,     PWRCOM,	{RT, RA, RB}},
--{"subco.",	XO(31,8,1,1),	XO_MASK,     PPC,	{RT, RB, RA}},
--
--{"addco",	XO(31,10,1,0),	XO_MASK,     PPCCOM,	{RT, RA, RB}},
--{"ao",		XO(31,10,1,0),	XO_MASK,     PWRCOM,	{RT, RA, RB}},
--{"addco.",	XO(31,10,1,1),	XO_MASK,     PPCCOM,	{RT, RA, RB}},
--{"ao.",		XO(31,10,1,1),	XO_MASK,     PWRCOM,	{RT, RA, RB}},
--
--{"clcs",	X(31,531),	XRB_MASK,    M601,	{RT, RA}},
--
--{"ldbrx",	X(31,532),	X_MASK,      CELL,	{RT, RA0, RB}},
--
--{"lswx",	X(31,533),	X_MASK,      PPCCOM,	{RT, RA0, RB}},
--{"lsx",		X(31,533),	X_MASK,      PWRCOM,	{RT, RA, RB}},
--
--{"lwbrx",	X(31,534),	X_MASK,      PPCCOM,	{RT, RA0, RB}},
--{"lbrx",	X(31,534),	X_MASK,      PWRCOM,	{RT, RA, RB}},
--
--{"lfsx",	X(31,535),	X_MASK,      COM,	{FRT, RA0, RB}},
--
--{"srw",		XRC(31,536,0),	X_MASK,      PPCCOM,	{RA, RS, RB}},
--{"sr",		XRC(31,536,0),	X_MASK,      PWRCOM,	{RA, RS, RB}},
--{"srw.",	XRC(31,536,1),	X_MASK,      PPCCOM,	{RA, RS, RB}},
--{"sr.",		XRC(31,536,1),	X_MASK,      PWRCOM,	{RA, RS, RB}},
--
--{"rrib",	XRC(31,537,0),	X_MASK,      M601,	{RA, RS, RB}},
--{"rrib.",	XRC(31,537,1),	X_MASK,      M601,	{RA, RS, RB}},
--
--{"srd",		XRC(31,539,0),	X_MASK,      PPC64,	{RA, RS, RB}},
--{"srd.",	XRC(31,539,1),	X_MASK,      PPC64,	{RA, RS, RB}},
--
--{"maskir",	XRC(31,541,0),	X_MASK,      M601,	{RA, RS, RB}},
--{"maskir.",	XRC(31,541,1),	X_MASK,      M601,	{RA, RS, RB}},
--
--{"lwbrxe",	X(31,542),	X_MASK,      BOOKE64,	{RT, RA0, RB}},
--
--{"lfsxe",	X(31,543),	X_MASK,      BOOKE64,	{FRT, RA0, RB}},
--
--{"mcrxr64",	X(31,544), XRARB_MASK|(3<<21), BOOKE64,	{BF}},
--
--{"lhdx",	X(31,547),	X_MASK,      E500MC,	{RT, RA, RB}},
--
--{"bbelr",	X(31,550),	X_MASK,      PPCBRLK,	{0}},
--
--{"lvrx",	X(31,551),	X_MASK,      CELL,	{VD, RA0, RB}},
--{"lhfcmux",	APU(31,551,0), 	APU_MASK,    PPC405,	{FCRT, RA, RB}},
--
--{"subfo",	XO(31,40,1,0),	XO_MASK,     PPC,	{RT, RA, RB}},
--{"subo",	XO(31,40,1,0),	XO_MASK,     PPC,	{RT, RB, RA}},
--{"subfo.",	XO(31,40,1,1),	XO_MASK,     PPC,	{RT, RA, RB}},
--{"subo.",	XO(31,40,1,1),	XO_MASK,     PPC,	{RT, RB, RA}},
--
--{"tlbsync",	X(31,566),	0xffffffff,  PPC,	{0}},
--
--{"lfsux",	X(31,567),	X_MASK,      COM,	{FRT, RAS, RB}},
--
--{"lfsuxe",	X(31,575),	X_MASK,      BOOKE64,	{FRT, RAS, RB}},
--
--{"lwdx",	X(31,579),	X_MASK,      E500MC,	{RT, RA, RB}},
--
--{"lwfcmux",	APU(31,583,0), 	APU_MASK,    PPC405,	{FCRT, RA, RB}},
--
--{"mfsr",	X(31,595), XRB_MASK|(1<<20), COM32,	{RT, SR}},
--
--{"lswi",	X(31,597),	X_MASK,      PPCCOM,	{RT, RA0, NB}},
--{"lsi",		X(31,597),	X_MASK,      PWRCOM,	{RT, RA0, NB}},
--
--{"msync",	X(31,598),	0xffffffff,  BOOKE,	{0}},
--{"lwsync",	XSYNC(31,598,1), 0xffffffff, PPC,	{0}},
--{"ptesync",	XSYNC(31,598,2), 0xffffffff, PPC64,	{0}},
--{"sync",	X(31,598),	XSYNC_MASK,  PPCCOM,	{LS}},
--{"dcs",		X(31,598),	0xffffffff,  PWRCOM,	{0}},
--
--{"lfdx",	X(31,599),	X_MASK,      COM,	{FRT, RA0, RB}},
--
--{"lfdxe",	X(31,607),	X_MASK,      BOOKE64,	{FRT, RA0, RB}},
--{"lfdepx",	X(31,607),	X_MASK,      E500MC,	{RT, RA, RB}},
--{"mffgpr",	XRC(31,607,0),	XRA_MASK,    POWER6,	{FRT, RB}},
--
--{"lddx",	X(31,611),	X_MASK,      E500MC,	{RT, RA, RB}},
--
--{"lqfcmux",	APU(31,615,0), 	APU_MASK,    PPC405,	{FCRT, RA, RB}},
--
--{"nego",	XO(31,104,1,0),	XORB_MASK,   COM,	{RT, RA}},
--{"nego.",	XO(31,104,1,1),	XORB_MASK,   COM,	{RT, RA}},
--
--{"mulo",	XO(31,107,1,0),	XO_MASK,     M601,	{RT, RA, RB}},
--{"mulo.",	XO(31,107,1,1),	XO_MASK,     M601,	{RT, RA, RB}},
--
--{"mfsri",	X(31,627),	X_MASK,      PWRCOM,	{RT, RA, RB}},
--
--{"dclst",	X(31,630),	XRB_MASK,    PWRCOM,	{RS, RA}},
--
--{"lfdux",	X(31,631),	X_MASK,      COM,	{FRT, RAS, RB}},
--
--{"lfduxe",	X(31,639),	X_MASK,      BOOKE64,	{FRT, RAS, RB}},
--
--{"stbdx",	X(31,643),	X_MASK,      E500MC,	{RS, RA, RB}},
--
--{"stvlx",	X(31,647),	X_MASK,      CELL,	{VS, RA0, RB}},
--{"stbfcmux",	APU(31,647,0), 	APU_MASK,    PPC405,	{FCRT, RA, RB}},
--
--{"subfeo",	XO(31,136,1,0),	XO_MASK,     PPCCOM,	{RT, RA, RB}},
--{"sfeo",	XO(31,136,1,0),	XO_MASK,     PWRCOM,	{RT, RA, RB}},
--{"subfeo.",	XO(31,136,1,1),	XO_MASK,     PPCCOM,	{RT, RA, RB}},
--{"sfeo.",	XO(31,136,1,1),	XO_MASK,     PWRCOM,	{RT, RA, RB}},
--
--{"addeo",	XO(31,138,1,0),	XO_MASK,     PPCCOM,	{RT, RA, RB}},
--{"aeo",		XO(31,138,1,0),	XO_MASK,     PWRCOM,	{RT, RA, RB}},
--{"addeo.",	XO(31,138,1,1),	XO_MASK,     PPCCOM,	{RT, RA, RB}},
--{"aeo.",	XO(31,138,1,1),	XO_MASK,     PWRCOM,	{RT, RA, RB}},
--
--{"mfsrin",	X(31,659),	XRA_MASK,    PPC32,	{RT, RB}},
--
--{"stdbrx",	X(31,660),	X_MASK,      CELL,	{RS, RA0, RB}},
--
--{"stswx",	X(31,661),	X_MASK,      PPCCOM,	{RS, RA0, RB}},
--{"stsx",	X(31,661),	X_MASK,      PWRCOM,	{RS, RA0, RB}},
--
--{"stwbrx",	X(31,662),	X_MASK,      PPCCOM,	{RS, RA0, RB}},
--{"stbrx",	X(31,662),	X_MASK,      PWRCOM,	{RS, RA0, RB}},
--
--{"stfsx",	X(31,663),	X_MASK,      COM,	{FRS, RA0, RB}},
--
--{"srq",		XRC(31,664,0),	X_MASK,      M601,	{RA, RS, RB}},
--{"srq.",	XRC(31,664,1),	X_MASK,      M601,	{RA, RS, RB}},
--
--{"sre",		XRC(31,665,0),	X_MASK,      M601,	{RA, RS, RB}},
--{"sre.",	XRC(31,665,1),	X_MASK,      M601,	{RA, RS, RB}},
--
--{"stwbrxe",	X(31,670),	X_MASK,      BOOKE64,	{RS, RA0, RB}},
--
--{"stfsxe",	X(31,671),	X_MASK,      BOOKE64,	{FRS, RA0, RB}},
--
--{"sthdx",	X(31,675),	X_MASK,      E500MC,	{RS, RA, RB}},
--
--{"stvrx",	X(31,679),	X_MASK,      CELL,	{VS, RA0, RB}},
--{"sthfcmux",	APU(31,679,0), 	APU_MASK,    PPC405,	{FCRT, RA, RB}},
--
--{"stfsux",	X(31,695),	X_MASK,      COM,	{FRS, RAS, RB}},
--
--{"sriq",	XRC(31,696,0),	X_MASK,      M601,	{RA, RS, SH}},
--{"sriq.",	XRC(31,696,1),	X_MASK,      M601,	{RA, RS, SH}},
--
--{"stfsuxe",	X(31,703),	X_MASK,      BOOKE64,	{FRS, RAS, RB}},
--
--{"stwdx",	X(31,707),	X_MASK,      E500MC,	{RS, RA, RB}},
--
--{"stwfcmux",	APU(31,711,0), 	APU_MASK,    PPC405,	{FCRT, RA, RB}},
--
--{"subfzeo",	XO(31,200,1,0),	XORB_MASK,   PPCCOM,	{RT, RA}},
--{"sfzeo",	XO(31,200,1,0),	XORB_MASK,   PWRCOM,	{RT, RA}},
--{"subfzeo.",	XO(31,200,1,1),	XORB_MASK,   PPCCOM,	{RT, RA}},
--{"sfzeo.",	XO(31,200,1,1),	XORB_MASK,   PWRCOM,	{RT, RA}},
--
--{"addzeo",	XO(31,202,1,0),	XORB_MASK,   PPCCOM,	{RT, RA}},
--{"azeo",	XO(31,202,1,0),	XORB_MASK,   PWRCOM,	{RT, RA}},
--{"addzeo.",	XO(31,202,1,1),	XORB_MASK,   PPCCOM,	{RT, RA}},
--{"azeo.",	XO(31,202,1,1),	XORB_MASK,   PWRCOM,	{RT, RA}},
--
--{"stswi",	X(31,725),	X_MASK,      PPCCOM,	{RS, RA0, NB}},
--{"stsi",	X(31,725),	X_MASK,      PWRCOM,	{RS, RA0, NB}},
--
--{"stfdx",	X(31,727),	X_MASK,      COM,	{FRS, RA0, RB}},
--
--{"srlq",	XRC(31,728,0),	X_MASK,      M601,	{RA, RS, RB}},
--{"srlq.",	XRC(31,728,1),	X_MASK,      M601,	{RA, RS, RB}},
--
--{"sreq",	XRC(31,729,0),	X_MASK,      M601,	{RA, RS, RB}},
--{"sreq.",	XRC(31,729,1),	X_MASK,      M601,	{RA, RS, RB}},
--
--{"stfdxe",	X(31,735),	X_MASK,      BOOKE64,	{FRS, RA0, RB}},
--{"stfdepx",	X(31,735),	X_MASK,      E500MC,	{RS, RA, RB}},
--{"mftgpr",	XRC(31,735,0),	XRA_MASK,    POWER6,	{RT, FRB}},
--
--{"stddx",	X(31,739),	X_MASK,      E500MC,	{RS, RA, RB}},
--
--{"stqfcmux",	APU(31,743,0), 	APU_MASK,    PPC405,	{FCRT, RA, RB}},
--
--{"subfmeo",	XO(31,232,1,0),	XORB_MASK,   PPCCOM,	{RT, RA}},
--{"sfmeo",	XO(31,232,1,0),	XORB_MASK,   PWRCOM,	{RT, RA}},
--{"subfmeo.",	XO(31,232,1,1),	XORB_MASK,   PPCCOM,	{RT, RA}},
--{"sfmeo.",	XO(31,232,1,1),	XORB_MASK,   PWRCOM,	{RT, RA}},
--
--{"mulldo",	XO(31,233,1,0),	XO_MASK,     PPC64,	{RT, RA, RB}},
--{"mulldo.",	XO(31,233,1,1),	XO_MASK,     PPC64,	{RT, RA, RB}},
--
--{"addmeo",	XO(31,234,1,0),	XORB_MASK,   PPCCOM,	{RT, RA}},
--{"ameo",	XO(31,234,1,0),	XORB_MASK,   PWRCOM,	{RT, RA}},
--{"addmeo.",	XO(31,234,1,1),	XORB_MASK,   PPCCOM,	{RT, RA}},
--{"ameo.",	XO(31,234,1,1),	XORB_MASK,   PWRCOM,	{RT, RA}},
--
--{"mullwo",	XO(31,235,1,0),	XO_MASK,     PPCCOM,	{RT, RA, RB}},
--{"mulso",	XO(31,235,1,0),	XO_MASK,     PWRCOM,	{RT, RA, RB}},
--{"mullwo.",	XO(31,235,1,1),	XO_MASK,     PPCCOM,	{RT, RA, RB}},
--{"mulso.",	XO(31,235,1,1),	XO_MASK,     PWRCOM,	{RT, RA, RB}},
--
--{"dcba",	X(31,758), XRT_MASK, PPC405|PPC7450|BOOKE, {RA, RB}},
--{"dcbal",	XOPL(31,758,1), XRT_MASK,    E500MC,	{RA, RB}},
--
--{"stfdux",	X(31,759),	X_MASK,      COM,	{FRS, RAS, RB}},
--
--{"srliq",	XRC(31,760,0),	X_MASK,      M601,	{RA, RS, SH}},
--{"srliq.",	XRC(31,760,1),	X_MASK,      M601,	{RA, RS, SH}},
--
--{"dcbae",	X(31,766),	XRT_MASK,    BOOKE64,	{RA, RB}},
--
--{"stfduxe",	X(31,767),	X_MASK,      BOOKE64,	{FRS, RAS, RB}},
--
--{"lvlxl",	X(31,775),	X_MASK,      CELL,	{VD, RA0, RB}},
--{"ldfcmux",	APU(31,775,0), 	APU_MASK,    PPC405,	{FCRT, RA, RB}},
--
--{"dozo",	XO(31,264,1,0),	XO_MASK,     M601,	{RT, RA, RB}},
--{"dozo.",	XO(31,264,1,1),	XO_MASK,     M601,	{RT, RA, RB}},
--
--{"addo",	XO(31,266,1,0),	XO_MASK,     PPCCOM,	{RT, RA, RB}},
--{"caxo",	XO(31,266,1,0),	XO_MASK,     PWRCOM,	{RT, RA, RB}},
--{"addo.",	XO(31,266,1,1),	XO_MASK,     PPCCOM,	{RT, RA, RB}},
--{"caxo.",	XO(31,266,1,1),	XO_MASK,     PWRCOM,	{RT, RA, RB}},
--
--{"tlbivax",	X(31,786),	XRT_MASK,    BOOKE,	{RA, RB}},
--{"tlbivaxe",	X(31,787),	XRT_MASK,    BOOKE64,	{RA, RB}},
--{"tlbilx",	X(31,787),	X_MASK,      E500MC,	{T, RA0, RB}},
--{"tlbilxlpid",	XTO(31,787,0),	XTO_MASK,    E500MC,	{0}},
--{"tlbilxpid",	XTO(31,787,1),	XTO_MASK,    E500MC,	{0}},
--{"tlbilxva",	XTO(31,787,3),	XTO_MASK,    E500MC,	{RA0, RB}},
--
--{"lwzcix",	X(31,789),	X_MASK,      POWER6,	{RT, RA0, RB}},
--
--{"lhbrx",	X(31,790),	X_MASK,      COM,	{RT, RA0, RB}},
--
--{"lfqx",	X(31,791),	X_MASK,      POWER2,	{FRT, RA, RB}},
--{"lfdpx",	X(31,791),	X_MASK,      POWER6,	{FRT, RA, RB}},
--
--{"sraw",	XRC(31,792,0),	X_MASK,      PPCCOM,	{RA, RS, RB}},
--{"sra",		XRC(31,792,0),	X_MASK,      PWRCOM,	{RA, RS, RB}},
--{"sraw.",	XRC(31,792,1),	X_MASK,      PPCCOM,	{RA, RS, RB}},
--{"sra.",	XRC(31,792,1),	X_MASK,      PWRCOM,	{RA, RS, RB}},
--
--{"srad",	XRC(31,794,0),	X_MASK,      PPC64,	{RA, RS, RB}},
--{"srad.",	XRC(31,794,1),	X_MASK,      PPC64,	{RA, RS, RB}},
--
--{"lhbrxe",	X(31,798),	X_MASK,      BOOKE64,	{RT, RA0, RB}},
--
--{"ldxe",	X(31,799),	X_MASK,      BOOKE64,	{RT, RA0, RB}},
--
--{"lfddx",	X(31,803),	X_MASK,      E500MC,	{FRT, RA, RB}},
--
--{"lvrxl",	X(31,807),	X_MASK,      CELL,	{VD, RA0, RB}},
--
--{"rac",		X(31,818),	X_MASK,      PWRCOM,	{RT, RA, RB}},
--
--{"lhzcix",	X(31,821),	X_MASK,      POWER6,	{RT, RA0, RB}},
--
--{"dss",		XDSS(31,822,0),	XDSS_MASK,   PPCVEC,	{STRM}},
--
--{"lfqux",	X(31,823),	X_MASK,      POWER2,	{FRT, RA, RB}},
--
--{"srawi",	XRC(31,824,0),	X_MASK,      PPCCOM,	{RA, RS, SH}},
--{"srai",	XRC(31,824,0),	X_MASK,      PWRCOM,	{RA, RS, SH}},
--{"srawi.",	XRC(31,824,1),	X_MASK,      PPCCOM,	{RA, RS, SH}},
--{"srai.",	XRC(31,824,1),	X_MASK,      PWRCOM,	{RA, RS, SH}},
--
--{"sradi",	XS(31,413,0),	XS_MASK,     PPC64,	{RA, RS, SH6}},
--{"sradi.",	XS(31,413,1),	XS_MASK,     PPC64,	{RA, RS, SH6}},
--
--{"divo",	XO(31,331,1,0),	XO_MASK,     M601,	{RT, RA, RB}},
--{"divo.",	XO(31,331,1,1),	XO_MASK,     M601,	{RT, RA, RB}},
--{"lduxe",	X(31,831),	X_MASK,      BOOKE64,	{RT, RA0, RB}},
--
--{"lxvd2x",	X(31,844),	XX1_MASK,    PPCVSX,	{XT6, RA, RB}},
--
--{"slbmfev",	X(31,851),	XRA_MASK,    PPC64,	{RT, RB}},
--
--{"lbzcix",	X(31,853),	X_MASK,      POWER6,	{RT, RA0, RB}},
--
--{"mbar",	X(31,854),	X_MASK,      BOOKE,	{MO}},
--{"eieio",	X(31,854),	0xffffffff,  PPC,	{0}},
--
--{"lfiwax",	X(31,855),	X_MASK,      POWER6,	{FRT, RA0, RB}},
--
--{"abso",	XO(31,360,1,0),	XORB_MASK,   M601,	{RT, RA}},
--{"abso.",	XO(31,360,1,1),	XORB_MASK,   M601,	{RT, RA}},
--
--{"divso",	XO(31,363,1,0),	XO_MASK,     M601,	{RT, RA, RB}},
--{"divso.",	XO(31,363,1,1),	XO_MASK,     M601,	{RT, RA, RB}},
--
--{"lxvd2ux",	X(31,876),	XX1_MASK,    PPCVSX,	{XT6, RA, RB}},
--
--{"ldcix",	X(31,885),	X_MASK,      POWER6,	{RT, RA0, RB}},
--
--{"stvlxl",	X(31,903),	X_MASK,      CELL,	{VS, RA0, RB}},
--{"stdfcmux",	APU(31,903,0), 	APU_MASK,    PPC405,	{FCRT, RA, RB}},
--
--{"subfe64o",	XO(31,392,1,0),	XO_MASK,     BOOKE64,	{RT, RA, RB}},
--
--{"adde64o",	XO(31,394,1,0),	XO_MASK,     BOOKE64,	{RT, RA, RB}},
--
--{"tlbsx",	XRC(31,914,0),	X_MASK,   PPC403|BOOKE,	{RTO, RA, RB}},
--{"tlbsx.",	XRC(31,914,1),	X_MASK,   PPC403|BOOKE,	{RTO, RA, RB}},
--
--{"tlbsxe",	XRC(31,915,0),	X_MASK,      BOOKE64,	{RTO, RA, RB}},
--{"tlbsxe.",	XRC(31,915,1),	X_MASK,      BOOKE64,	{RTO, RA, RB}},
--{"slbmfee",	X(31,915),	XRA_MASK,    PPC64,	{RT, RB}},
--
--{"stwcix",	X(31,917),	X_MASK,      POWER6,	{RS, RA0, RB}},
--
--{"sthbrx",	X(31,918),	X_MASK,      COM,	{RS, RA0, RB}},
--
--{"stfqx",	X(31,919),	X_MASK,      POWER2,	{FRS, RA, RB}},
--{"stfdpx",	X(31,919),	X_MASK,      POWER6,	{FRS, RA, RB}},
--
--{"sraq",	XRC(31,920,0),	X_MASK,      M601,	{RA, RS, RB}},
--{"sraq.",	XRC(31,920,1),	X_MASK,      M601,	{RA, RS, RB}},
--
--{"srea",	XRC(31,921,0),	X_MASK,      M601,	{RA, RS, RB}},
--{"srea.",	XRC(31,921,1),	X_MASK,      M601,	{RA, RS, RB}},
--
--{"extsh",	XRC(31,922,0),	XRB_MASK,    PPCCOM,	{RA, RS}},
--{"exts",	XRC(31,922,0),	XRB_MASK,    PWRCOM,	{RA, RS}},
--{"extsh.",	XRC(31,922,1),	XRB_MASK,    PPCCOM,	{RA, RS}},
--{"exts.",	XRC(31,922,1),	XRB_MASK,    PWRCOM,	{RA, RS}},
--
--{"sthbrxe",	X(31,926),	X_MASK,      BOOKE64,	{RS, RA0, RB}},
--
--{"stdxe",	X(31,927),	X_MASK,      BOOKE64,	{RS, RA0, RB}},
--
--{"stfddx",	X(31,931),	X_MASK,      E500MC,	{FRS, RA, RB}},
--
--{"stvrxl",	X(31,935),	X_MASK,      CELL,	{VS, RA0, RB}},
--
--{"tlbrehi",	XTLB(31,946,0),	XTLB_MASK,   PPC403,	{RT, RA}},
--{"tlbrelo",	XTLB(31,946,1),	XTLB_MASK,   PPC403,	{RT, RA}},
--{"tlbre",	X(31,946),	X_MASK,   PPC403|BOOKE,	{RSO, RAOPT, SHO}},
--
--{"sthcix",	X(31,949),	X_MASK,      POWER6,	{RS, RA0, RB}},
--
--{"stfqux",	X(31,951),	X_MASK,      POWER2,	{FRS, RA, RB}},
--
--{"sraiq",	XRC(31,952,0),	X_MASK,      M601,	{RA, RS, SH}},
--{"sraiq.",	XRC(31,952,1),	X_MASK,      M601,	{RA, RS, SH}},
--
--{"extsb",	XRC(31,954,0),	XRB_MASK,    PPC,	{RA, RS}},
--{"extsb.",	XRC(31,954,1),	XRB_MASK,    PPC,	{RA, RS}},
--
--{"stduxe",	X(31,959),	X_MASK,      BOOKE64,	{RS, RAS, RB}},
--
--{"iccci",	X(31,966),     XRT_MASK, PPC403|PPC440,	{RA, RB}},
--
--{"subfze64o",	XO(31,456,1,0),	XORB_MASK,   BOOKE64,	{RT, RA}},
--
--{"divduo",	XO(31,457,1,0),	XO_MASK,     PPC64,	{RT, RA, RB}},
--{"divduo.",	XO(31,457,1,1),	XO_MASK,     PPC64,	{RT, RA, RB}},
--
--{"addze64o",	XO(31,458,1,0),	XORB_MASK,   BOOKE64,	{RT, RA}},
--
--{"divwuo",	XO(31,459,1,0),	XO_MASK,     PPC,	{RT, RA, RB}},
--{"divwuo.",	XO(31,459,1,1),	XO_MASK,     PPC,	{RT, RA, RB}},
--
--{"stxvd2x",	X(31,972),	XX1_MASK,    PPCVSX,	{XS6, RA, RB}},
--
--{"tlbwehi",	XTLB(31,978,0),	XTLB_MASK,   PPC403,	{RT, RA}},
--{"tlbwelo",	XTLB(31,978,1),	XTLB_MASK,   PPC403,	{RT, RA}},
--{"tlbwe",	X(31,978),	X_MASK,   PPC403|BOOKE,	{RSO, RAOPT, SHO}},
--{"tlbld",	X(31,978),	XRTRA_MASK,  PPC,	{RB}},
--
--{"stbcix",	X(31,981),	X_MASK,      POWER6,	{RS, RA0, RB}},
--
--{"icbi",	X(31,982),	XRT_MASK,    PPC,	{RA, RB}},
--
--{"stfiwx",	X(31,983),	X_MASK,      PPC,	{FRS, RA0, RB}},
--
--{"extsw",	XRC(31,986,0), XRB_MASK, PPC64|BOOKE64,	{RA, RS}},
--{"extsw.",	XRC(31,986,1),	XRB_MASK,    PPC64,	{RA, RS}},
--
--{"icbie",	X(31,990),	XRT_MASK,    BOOKE64,	{RA, RB}},
--{"stfiwxe",	X(31,991),	X_MASK,      BOOKE64,	{FRS, RA0, RB}},
--
--{"icbiep",	XRT(31,991,0),	XRT_MASK,    E500MC,	{RA, RB}},
--
--{"icread",	X(31,998),     XRT_MASK, PPC403|PPC440,	{RA, RB}},
--
--{"nabso",	XO(31,488,1,0),	XORB_MASK,   M601,	{RT, RA}},
--{"subfme64o",	XO(31,488,1,0),	XORB_MASK,   BOOKE64,	{RT, RA}},
--{"nabso.",	XO(31,488,1,1),	XORB_MASK,   M601,	{RT, RA}},
--
--{"divdo",	XO(31,489,1,0),	XO_MASK,     PPC64,	{RT, RA, RB}},
--{"divdo.",	XO(31,489,1,1),	XO_MASK,     PPC64,	{RT, RA, RB}},
--
--{"addme64o",	XO(31,490,1,0),	XORB_MASK,   BOOKE64,	{RT, RA}},
--
--{"divwo",	XO(31,491,1,0),	XO_MASK,     PPC,	{RT, RA, RB}},
--{"divwo.",	XO(31,491,1,1),	XO_MASK,     PPC,	{RT, RA, RB}},
--
--{"stxvd2ux",	X(31,1004),	XX1_MASK,    PPCVSX,	{XS6, RA, RB}},
--
--{"tlbli",	X(31,1010),	XRTRA_MASK,  PPC,	{RB}},
--
--{"stdcix",	X(31,1013),	X_MASK,      POWER6,	{RS, RA0, RB}},
--
--{"dcbz",	X(31,1014),	XRT_MASK,    PPC,	{RA, RB}},
--{"dclz",	X(31,1014),	XRT_MASK,    PPC,	{RA, RB}},
--
--{"dcbze",	X(31,1022),	XRT_MASK,    BOOKE64,	{RA, RB}},
--{"dcbzep",	XRT(31,1023,0),	XRT_MASK,    E500MC,	{RA, RB}},
--
--{"dcbzl",	XOPL(31,1014,1), XRT_MASK,   POWER4,	{RA, RB}},
--{"dcbzl",	XOPL(31,1014,1), XRT_MASK,   NOPOWER4|E500MC,{RA, RB}},
--
--{"cctpl",	0x7c210b78,	0xffffffff,  CELL,	{0}},
--{"cctpm",	0x7c421378,	0xffffffff,  CELL,	{0}},
--{"cctph",	0x7c631b78,	0xffffffff,  CELL,	{0}},
--
--{"dstt",	XDSS(31,342,1),	XDSS_MASK,   PPCVEC,	{RA, RB, STRM}},
--{"dststt",	XDSS(31,374,1),	XDSS_MASK,   PPCVEC,	{RA, RB, STRM}},
--{"dssall",	XDSS(31,822,1),	XDSS_MASK,   PPCVEC,	{0}},
--
--{"db8cyc",	0x7f9ce378,	0xffffffff,  CELL,	{0}},
--{"db10cyc",	0x7fbdeb78,	0xffffffff,  CELL,	{0}},
--{"db12cyc",	0x7fdef378,	0xffffffff,  CELL,	{0}},
--{"db16cyc",	0x7ffffb78,	0xffffffff,  CELL,	{0}},
--
--{"lwz",		OP(32),		OP_MASK,     PPCCOM,	{RT, D, RA0}},
--{"l",		OP(32),		OP_MASK,     PWRCOM,	{RT, D, RA0}},
--
--{"lwzu",	OP(33),		OP_MASK,     PPCCOM,	{RT, D, RAL}},
--{"lu",		OP(33),		OP_MASK,     PWRCOM,	{RT, D, RA0}},
--
--{"lbz",		OP(34),		OP_MASK,     COM,	{RT, D, RA0}},
--
--{"lbzu",	OP(35),		OP_MASK,     COM,	{RT, D, RAL}},
--
--{"stw",		OP(36),		OP_MASK,     PPCCOM,	{RS, D, RA0}},
--{"st",		OP(36),		OP_MASK,     PWRCOM,	{RS, D, RA0}},
--
--{"stwu",	OP(37),		OP_MASK,     PPCCOM,	{RS, D, RAS}},
--{"stu",		OP(37),		OP_MASK,     PWRCOM,	{RS, D, RA0}},
--
--{"stb",		OP(38),		OP_MASK,     COM,	{RS, D, RA0}},
--
--{"stbu",	OP(39),		OP_MASK,     COM,	{RS, D, RAS}},
--
--{"lhz",		OP(40),		OP_MASK,     COM,	{RT, D, RA0}},
--
--{"lhzu",	OP(41),		OP_MASK,     COM,	{RT, D, RAL}},
--
--{"lha",		OP(42),		OP_MASK,     COM,	{RT, D, RA0}},
--
--{"lhau",	OP(43),		OP_MASK,     COM,	{RT, D, RAL}},
--
--{"sth",		OP(44),		OP_MASK,     COM,	{RS, D, RA0}},
--
--{"sthu",	OP(45),		OP_MASK,     COM,	{RS, D, RAS}},
--
--{"lmw",		OP(46),		OP_MASK,     PPCCOM,	{RT, D, RAM}},
--{"lm",		OP(46),		OP_MASK,     PWRCOM,	{RT, D, RA0}},
--
--{"stmw",	OP(47),		OP_MASK,     PPCCOM,	{RS, D, RA0}},
--{"stm",		OP(47),		OP_MASK,     PWRCOM,	{RS, D, RA0}},
--
--{"lfs",		OP(48),		OP_MASK,     COM,	{FRT, D, RA0}},
--
--{"lfsu",	OP(49),		OP_MASK,     COM,	{FRT, D, RAS}},
--
--{"lfd",		OP(50),		OP_MASK,     COM,	{FRT, D, RA0}},
--
--{"lfdu",	OP(51),		OP_MASK,     COM,	{FRT, D, RAS}},
--
--{"stfs",	OP(52),		OP_MASK,     COM,	{FRS, D, RA0}},
--
--{"stfsu",	OP(53),		OP_MASK,     COM,	{FRS, D, RAS}},
--
--{"stfd",	OP(54),		OP_MASK,     COM,	{FRS, D, RA0}},
--
--{"stfdu",	OP(55),		OP_MASK,     COM,	{FRS, D, RAS}},
--
--{"lq",		OP(56),		OP_MASK,     POWER4,	{RTQ, DQ, RAQ}},
--
--{"lfq",		OP(56),		OP_MASK,     POWER2,	{FRT, D, RA0}},
--
--{"psq_l",	OP(56),		OP_MASK,     PPCPS,	{FRT,PSD,RA,PSW,PSQ}},
--
--{"lfqu",	OP(57),		OP_MASK,     POWER2,	{FRT, D, RA0}},
--
--{"psq_lu",	OP(57),		OP_MASK,     PPCPS,	{FRT,PSD,RA,PSW,PSQ}},
--
--{"lfdp",	OP(57),		OP_MASK,     POWER6,	{FRT, D, RA0}},
--
--{"lbze",	DEO(58,0),	DE_MASK,     BOOKE64,	{RT, DE, RA0}},
--{"lbzue",	DEO(58,1),	DE_MASK,     BOOKE64,	{RT, DE, RAL}},
--{"lhze",	DEO(58,2),	DE_MASK,     BOOKE64,	{RT, DE, RA0}},
--{"lhzue",	DEO(58,3),	DE_MASK,     BOOKE64,	{RT, DE, RAL}},
--{"lhae",	DEO(58,4),	DE_MASK,     BOOKE64,	{RT, DE, RA0}},
--{"lhaue",	DEO(58,5),	DE_MASK,     BOOKE64,	{RT, DE, RAL}},
--{"lwze",	DEO(58,6),	DE_MASK,     BOOKE64,	{RT, DE, RA0}},
--{"lwzue",	DEO(58,7),	DE_MASK,     BOOKE64,	{RT, DE, RAL}},
--{"stbe",	DEO(58,8),	DE_MASK,     BOOKE64,	{RS, DE, RA0}},
--{"stbue",	DEO(58,9),	DE_MASK,     BOOKE64,	{RS, DE, RAS}},
--{"sthe",	DEO(58,10),	DE_MASK,     BOOKE64,	{RS, DE, RA0}},
--{"sthue",	DEO(58,11),	DE_MASK,     BOOKE64,	{RS, DE, RAS}},
--{"stwe",	DEO(58,14),	DE_MASK,     BOOKE64,	{RS, DE, RA0}},
--{"stwue",	DEO(58,15),	DE_MASK,     BOOKE64,	{RS, DE, RAS}},
--
--{"ld",		DSO(58,0),	DS_MASK,     PPC64,	{RT, DS, RA0}},
--{"ldu",		DSO(58,1),	DS_MASK,     PPC64,	{RT, DS, RAL}},
--{"lwa",		DSO(58,2),	DS_MASK,     PPC64,	{RT, DS, RA0}},
--
--{"dadd",	XRC(59,2,0),	X_MASK,      POWER6,	{FRT, FRA, FRB}},
--{"dadd.",	XRC(59,2,1),	X_MASK,      POWER6,	{FRT, FRA, FRB}},
--
--{"dqua",	ZRC(59,3,0),	Z2_MASK,     POWER6,	{FRT,FRA,FRB,RMC}},
--{"dqua.",	ZRC(59,3,1),	Z2_MASK,     POWER6,	{FRT,FRA,FRB,RMC}},
--
--{"fdivs",	A(59,18,0),	AFRC_MASK,   PPC,	{FRT, FRA, FRB}},
--{"fdivs.",	A(59,18,1),	AFRC_MASK,   PPC,	{FRT, FRA, FRB}},
--
--{"fsubs",	A(59,20,0),	AFRC_MASK,   PPC,	{FRT, FRA, FRB}},
--{"fsubs.",	A(59,20,1),	AFRC_MASK,   PPC,	{FRT, FRA, FRB}},
--
--{"fadds",	A(59,21,0),	AFRC_MASK,   PPC,	{FRT, FRA, FRB}},
--{"fadds.",	A(59,21,1),	AFRC_MASK,   PPC,	{FRT, FRA, FRB}},
--
--{"fsqrts",	A(59,22,0),    AFRAFRC_MASK, PPC,	{FRT, FRB}},
--{"fsqrts.",	A(59,22,1),    AFRAFRC_MASK, PPC,	{FRT, FRB}},
--
--{"fres",	A(59,24,0),   AFRALFRC_MASK, PPC,	{FRT, FRB, A_L}},
--{"fres.",	A(59,24,1),   AFRALFRC_MASK, PPC,	{FRT, FRB, A_L}},
--
--{"fmuls",	A(59,25,0),	AFRB_MASK,   PPC,	{FRT, FRA, FRC}},
--{"fmuls.",	A(59,25,1),	AFRB_MASK,   PPC,	{FRT, FRA, FRC}},
--
--{"frsqrtes",	A(59,26,0),   AFRALFRC_MASK, POWER5,	{FRT, FRB, A_L}},
--{"frsqrtes.",	A(59,26,1),   AFRALFRC_MASK, POWER5,	{FRT, FRB, A_L}},
--
--{"fmsubs",	A(59,28,0),	A_MASK,      PPC,	{FRT, FRA, FRC, FRB}},
--{"fmsubs.",	A(59,28,1),	A_MASK,      PPC,	{FRT, FRA, FRC, FRB}},
--
--{"fmadds",	A(59,29,0),	A_MASK,      PPC,	{FRT, FRA, FRC, FRB}},
--{"fmadds.",	A(59,29,1),	A_MASK,      PPC,	{FRT, FRA, FRC, FRB}},
--
--{"fnmsubs",	A(59,30,0),	A_MASK,      PPC,	{FRT, FRA, FRC, FRB}},
--{"fnmsubs.",	A(59,30,1),	A_MASK,      PPC,	{FRT, FRA, FRC, FRB}},
--
--{"fnmadds",	A(59,31,0),	A_MASK,      PPC,	{FRT, FRA, FRC, FRB}},
--{"fnmadds.",	A(59,31,1),	A_MASK,      PPC,	{FRT, FRA, FRC, FRB}},
--
--{"dmul",	XRC(59,34,0),	X_MASK,      POWER6,	{FRT, FRA, FRB}},
--{"dmul.",	XRC(59,34,1),	X_MASK,      POWER6,	{FRT, FRA, FRB}},
--
--{"drrnd",	ZRC(59,35,0),	Z2_MASK,     POWER6,	{FRT, FRA, FRB, RMC}},
--{"drrnd.",	ZRC(59,35,1),	Z2_MASK,     POWER6,	{FRT, FRA, FRB, RMC}},
--
--{"dscli",	ZRC(59,66,0),	Z_MASK,      POWER6,	{FRT, FRA, SH16}},
--{"dscli.",	ZRC(59,66,1),	Z_MASK,      POWER6,	{FRT, FRA, SH16}},
--
--{"dquai",	ZRC(59,67,0),	Z2_MASK,     POWER6,	{TE, FRT,FRB,RMC}},
--{"dquai.",	ZRC(59,67,1),	Z2_MASK,     POWER6,	{TE, FRT,FRB,RMC}},
--
--{"dscri",	ZRC(59,98,0),	Z_MASK,      POWER6,	{FRT, FRA, SH16}},
--{"dscri.",	ZRC(59,98,1),	Z_MASK,      POWER6,	{FRT, FRA, SH16}},
--
--{"drintx",	ZRC(59,99,0),	Z2_MASK,     POWER6,	{R, FRT, FRB, RMC}},
--{"drintx.",	ZRC(59,99,1),	Z2_MASK,     POWER6,	{R, FRT, FRB, RMC}},
--
--{"dcmpo",	X(59,130),	X_MASK,      POWER6,	{BF,  FRA, FRB}},
--
--{"dtstex",	X(59,162),	X_MASK,      POWER6,	{BF,  FRA, FRB}},
--{"dtstdc",	Z(59,194),	Z_MASK,      POWER6,	{BF,  FRA, DCM}},
--{"dtstdg",	Z(59,226),	Z_MASK,      POWER6,	{BF,  FRA, DGM}},
--
--{"drintn",	ZRC(59,227,0),	Z2_MASK,     POWER6,	{R, FRT, FRB, RMC}},
--{"drintn.",	ZRC(59,227,1),	Z2_MASK,     POWER6,	{R, FRT, FRB, RMC}},
--
--{"dctdp",	XRC(59,258,0),	X_MASK,      POWER6,	{FRT, FRB}},
--{"dctdp.",	XRC(59,258,1),	X_MASK,      POWER6,	{FRT, FRB}},
--
--{"dctfix",	XRC(59,290,0),	X_MASK,      POWER6,	{FRT, FRB}},
--{"dctfix.",	XRC(59,290,1),	X_MASK,      POWER6,	{FRT, FRB}},
--
--{"ddedpd",	XRC(59,322,0),	X_MASK,      POWER6,	{SP, FRT, FRB}}, 
--{"ddedpd.",	XRC(59,322,1),	X_MASK,      POWER6,	{SP, FRT, FRB}}, 
--
--{"dxex",	XRC(59,354,0),	X_MASK,      POWER6,	{FRT, FRB}},
--{"dxex.",	XRC(59,354,1),	X_MASK,      POWER6,	{FRT, FRB}},
--
--{"dsub",	XRC(59,514,0),	X_MASK,      POWER6,	{FRT, FRA, FRB}},
--{"dsub.",	XRC(59,514,1),	X_MASK,      POWER6,	{FRT, FRA, FRB}},
--
--{"ddiv",	XRC(59,546,0),	X_MASK,      POWER6,	{FRT, FRA, FRB}},
--{"ddiv.",	XRC(59,546,1),	X_MASK,      POWER6,	{FRT, FRA, FRB}},
--
--{"dcmpu",	X(59,642),	X_MASK,      POWER6,	{BF,  FRA, FRB}},
--
--{"dtstsf",	X(59,674),	X_MASK,      POWER6,	{BF,  FRA, FRB}},
--
--{"drsp",	XRC(59,770,0),	X_MASK,      POWER6,	{FRT, FRB}},
--{"drsp.",	XRC(59,770,1),	X_MASK,      POWER6,	{FRT, FRB}},
--
--{"denbcd",	XRC(59,834,0),	X_MASK,      POWER6,	{S, FRT, FRB}},
--{"denbcd.",	XRC(59,834,1),	X_MASK,      POWER6,	{S, FRT, FRB}},
--
--{"diex",	XRC(59,866,0),	X_MASK,      POWER6,	{FRT, FRA, FRB}},
--{"diex.",	XRC(59,866,1),	X_MASK,      POWER6,	{FRT, FRA, FRB}},
--
--{"stfq",	OP(60),		OP_MASK,     POWER2,	{FRS, D, RA}},
--
--{"psq_st",	OP(60),		OP_MASK,     PPCPS,	{FRS,PSD,RA,PSW,PSQ}},
--
--{"xxmrghd",	XX3(60,10),	XX3_MASK,    PPCVSX,	{XT6, XA6, XB6}},
--{"xxmrgld",	XX3(60,10)|(3<<8), XX3_MASK, PPCVSX,	{XT6, XA6, XB6}},
--{"xxpermdi",	XX3(60,10),	XX3DM_MASK,  PPCVSX,	{XT6, XA6, XB6, DM}},
--{"xvmovdp",	XX3(60,240),	XX3_MASK,    PPCVSX,	{XT6, XA6, XB6S}},
--{"xvcpsgndp",	XX3(60,240),	XX3_MASK,    PPCVSX,	{XT6, XA6, XB6}},
--
--{"psq_stu",	OP(61),		OP_MASK,     PPCPS,	{FRS,PSD,RA,PSW,PSQ}},
--
--{"stfqu",	OP(61),		OP_MASK,     POWER2,	{FRS, D, RA}},
--
--{"stfdp",	OP(61),		OP_MASK,     POWER6,	{FRT, D, RA0}},
--
--{"lde",		DEO(62,0),	DE_MASK,     BOOKE64,	{RT, DES, RA0}},
--{"ldue",	DEO(62,1),	DE_MASK,     BOOKE64,	{RT, DES, RA0}},
--{"lfse",	DEO(62,4),	DE_MASK,     BOOKE64,	{FRT, DES, RA0}},
--{"lfsue",	DEO(62,5),	DE_MASK,     BOOKE64,	{FRT, DES, RAS}},
--{"lfde",	DEO(62,6),	DE_MASK,     BOOKE64,	{FRT, DES, RA0}},
--{"lfdue",	DEO(62,7),	DE_MASK,     BOOKE64,	{FRT, DES, RAS}},
--{"stde",	DEO(62,8),	DE_MASK,     BOOKE64,	{RS, DES, RA0}},
--{"stdue",	DEO(62,9),	DE_MASK,     BOOKE64,	{RS, DES, RAS}},
--{"stfse",	DEO(62,12),	DE_MASK,     BOOKE64,	{FRS, DES, RA0}},
--{"stfsue",	DEO(62,13),	DE_MASK,     BOOKE64,	{FRS, DES, RAS}},
--{"stfde",	DEO(62,14),	DE_MASK,     BOOKE64,	{FRS, DES, RA0}},
--{"stfdue",	DEO(62,15),	DE_MASK,     BOOKE64,	{FRS, DES, RAS}},
--
--{"std",		DSO(62,0),	DS_MASK,     PPC64,	{RS, DS, RA0}},
--{"stdu",	DSO(62,1),	DS_MASK,     PPC64,	{RS, DS, RAS}},
--{"stq",		DSO(62,2),	DS_MASK,     POWER4,	{RSQ, DS, RA0}},
--
--{"fcmpu",	X(63,0),     X_MASK|(3<<21), COM,	{BF, FRA, FRB}},
--
--{"daddq",	XRC(63,2,0),	X_MASK,      POWER6,	{FRT, FRA, FRB}},
--{"daddq.",	XRC(63,2,1),	X_MASK,      POWER6,	{FRT, FRA, FRB}},
--
--{"dquaq",	ZRC(63,3,0),	Z2_MASK,     POWER6,	{FRT, FRA, FRB, RMC}},
--{"dquaq.",	ZRC(63,3,1),	Z2_MASK,     POWER6,	{FRT, FRA, FRB, RMC}},
--
--{"fcpsgn",	XRC(63,8,0),	X_MASK,      POWER6,	{FRT, FRA, FRB}},
--{"fcpsgn.",	XRC(63,8,1),	X_MASK,      POWER6,	{FRT, FRA, FRB}},
--
--{"frsp",	XRC(63,12,0),	XRA_MASK,    COM,	{FRT, FRB}},
--{"frsp.",	XRC(63,12,1),	XRA_MASK,    COM,	{FRT, FRB}},
--
--{"fctiw",	XRC(63,14,0),	XRA_MASK,    PPCCOM,	{FRT, FRB}},
--{"fcir",	XRC(63,14,0),	XRA_MASK,    POWER2,	{FRT, FRB}},
--{"fctiw.",	XRC(63,14,1),	XRA_MASK,    PPCCOM,	{FRT, FRB}},
--{"fcir.",	XRC(63,14,1),	XRA_MASK,    POWER2,	{FRT, FRB}},
--
--{"fctiwz",	XRC(63,15,0),	XRA_MASK,    PPCCOM,	{FRT, FRB}},
--{"fcirz",	XRC(63,15,0),	XRA_MASK,    POWER2,	{FRT, FRB}},
--{"fctiwz.",	XRC(63,15,1),	XRA_MASK,    PPCCOM,	{FRT, FRB}},
--{"fcirz.",	XRC(63,15,1),	XRA_MASK,    POWER2,	{FRT, FRB}},
--
--{"fdiv",	A(63,18,0),	AFRC_MASK,   PPCCOM,	{FRT, FRA, FRB}},
--{"fd",		A(63,18,0),	AFRC_MASK,   PWRCOM,	{FRT, FRA, FRB}},
--{"fdiv.",	A(63,18,1),	AFRC_MASK,   PPCCOM,	{FRT, FRA, FRB}},
--{"fd.",		A(63,18,1),	AFRC_MASK,   PWRCOM,	{FRT, FRA, FRB}},
--
--{"fsub",	A(63,20,0),	AFRC_MASK,   PPCCOM,	{FRT, FRA, FRB}},
--{"fs",		A(63,20,0),	AFRC_MASK,   PWRCOM,	{FRT, FRA, FRB}},
--{"fsub.",	A(63,20,1),	AFRC_MASK,   PPCCOM,	{FRT, FRA, FRB}},
--{"fs.",		A(63,20,1),	AFRC_MASK,   PWRCOM,	{FRT, FRA, FRB}},
--
--{"fadd",	A(63,21,0),	AFRC_MASK,   PPCCOM,	{FRT, FRA, FRB}},
--{"fa",		A(63,21,0),	AFRC_MASK,   PWRCOM,	{FRT, FRA, FRB}},
--{"fadd.",	A(63,21,1),	AFRC_MASK,   PPCCOM,	{FRT, FRA, FRB}},
--{"fa.",		A(63,21,1),	AFRC_MASK,   PWRCOM,	{FRT, FRA, FRB}},
--
--{"fsqrt",	A(63,22,0),    AFRAFRC_MASK, PPCPWR2,	{FRT, FRB}},
--{"fsqrt.",	A(63,22,1),    AFRAFRC_MASK, PPCPWR2,	{FRT, FRB}},
--
--{"fsel",	A(63,23,0),	A_MASK,      PPC,	{FRT, FRA, FRC, FRB}},
--{"fsel.",	A(63,23,1),	A_MASK,      PPC,	{FRT, FRA, FRC, FRB}},
--
--{"fre",		A(63,24,0),   AFRALFRC_MASK, POWER5,	{FRT, FRB, A_L}},
--{"fre.",	A(63,24,1),   AFRALFRC_MASK, POWER5,	{FRT, FRB, A_L}},
--
--{"fmul",	A(63,25,0),	AFRB_MASK,   PPCCOM,	{FRT, FRA, FRC}},
--{"fm",		A(63,25,0),	AFRB_MASK,   PWRCOM,	{FRT, FRA, FRC}},
--{"fmul.",	A(63,25,1),	AFRB_MASK,   PPCCOM,	{FRT, FRA, FRC}},
--{"fm.",		A(63,25,1),	AFRB_MASK,   PWRCOM,	{FRT, FRA, FRC}},
--
--{"frsqrte",	A(63,26,0),   AFRALFRC_MASK, PPC,	{FRT, FRB, A_L}},
--{"frsqrte.",	A(63,26,1),   AFRALFRC_MASK, PPC,	{FRT, FRB, A_L}},
--
--{"fmsub",	A(63,28,0),	A_MASK,      PPCCOM,	{FRT, FRA, FRC, FRB}},
--{"fms",		A(63,28,0),	A_MASK,      PWRCOM,	{FRT, FRA, FRC, FRB}},
--{"fmsub.",	A(63,28,1),	A_MASK,      PPCCOM,	{FRT, FRA, FRC, FRB}},
--{"fms.",	A(63,28,1),	A_MASK,      PWRCOM,	{FRT, FRA, FRC, FRB}},
--
--{"fmadd",	A(63,29,0),	A_MASK,      PPCCOM,	{FRT, FRA, FRC, FRB}},
--{"fma",		A(63,29,0),	A_MASK,      PWRCOM,	{FRT, FRA, FRC, FRB}},
--{"fmadd.",	A(63,29,1),	A_MASK,      PPCCOM,	{FRT, FRA, FRC, FRB}},
--{"fma.",	A(63,29,1),	A_MASK,      PWRCOM,	{FRT, FRA, FRC, FRB}},
--
--{"fnmsub",	A(63,30,0),	A_MASK,      PPCCOM,	{FRT, FRA, FRC, FRB}},
--{"fnms",	A(63,30,0),	A_MASK,      PWRCOM,	{FRT, FRA, FRC, FRB}},
--{"fnmsub.",	A(63,30,1),	A_MASK,      PPCCOM,	{FRT, FRA, FRC, FRB}},
--{"fnms.",	A(63,30,1),	A_MASK,      PWRCOM,	{FRT, FRA, FRC, FRB}},
--
--{"fnmadd",	A(63,31,0),	A_MASK,      PPCCOM,	{FRT, FRA, FRC, FRB}},
--{"fnma",	A(63,31,0),	A_MASK,      PWRCOM,	{FRT, FRA, FRC, FRB}},
--{"fnmadd.",	A(63,31,1),	A_MASK,      PPCCOM,	{FRT, FRA, FRC, FRB}},
--{"fnma.",	A(63,31,1),	A_MASK,      PWRCOM,	{FRT, FRA, FRC, FRB}},
--
--{"fcmpo",	X(63,32),    X_MASK|(3<<21), COM,	{BF, FRA, FRB}},
--
--{"dmulq",	XRC(63,34,0),	X_MASK,      POWER6,	{FRT, FRA, FRB}},
--{"dmulq.",	XRC(63,34,1),	X_MASK,      POWER6,	{FRT, FRA, FRB}},
--
--{"drrndq",	ZRC(63,35,0),	Z2_MASK,     POWER6,	{FRT, FRA, FRB, RMC}},
--{"drrndq.",	ZRC(63,35,1),	Z2_MASK,     POWER6,	{FRT, FRA, FRB, RMC}},
--
--{"mtfsb1",	XRC(63,38,0),	XRARB_MASK,  COM,	{BT}},
--{"mtfsb1.",	XRC(63,38,1),	XRARB_MASK,  COM,	{BT}},
--
--{"fneg",	XRC(63,40,0),	XRA_MASK,    COM,	{FRT, FRB}},
--{"fneg.",	XRC(63,40,1),	XRA_MASK,    COM,	{FRT, FRB}},
--
--{"mcrfs",      X(63,64), XRB_MASK|(3<<21)|(3<<16), COM,	{BF, BFA}},
--
--{"dscliq",	ZRC(63,66,0),	Z_MASK,      POWER6,	{FRT, FRA, SH16}},
--{"dscliq.",	ZRC(63,66,1),	Z_MASK,      POWER6,	{FRT, FRA, SH16}},
--
--{"dquaiq",	ZRC(63,67,0),	Z2_MASK,     POWER6,	{TE, FRT, FRB, RMC}},
--{"dquaiq.",	ZRC(63,67,1),	Z2_MASK,     POWER6,	{TE, FRT, FRB, RMC}},
--
--{"mtfsb0",	XRC(63,70,0),	XRARB_MASK,  COM,	{BT}},
--{"mtfsb0.",	XRC(63,70,1),	XRARB_MASK,  COM,	{BT}},
--
--{"fmr",		XRC(63,72,0),	XRA_MASK,    COM,	{FRT, FRB}},
--{"fmr.",	XRC(63,72,1),	XRA_MASK,    COM,	{FRT, FRB}},
--
--{"dscriq",	ZRC(63,98,0),	Z_MASK,      POWER6,	{FRT, FRA, SH16}},
--{"dscriq.",	ZRC(63,98,1),	Z_MASK,      POWER6,	{FRT, FRA, SH16}},
--
--{"drintxq",	ZRC(63,99,0),	Z2_MASK,     POWER6,	{R, FRT, FRB, RMC}},
--{"drintxq.",	ZRC(63,99,1),	Z2_MASK,     POWER6,	{R, FRT, FRB, RMC}},
--
--{"dcmpoq",	X(63,130),	X_MASK,      POWER6,	{BF, FRA, FRB}},
--
--{"mtfsfi",  XRC(63,134,0), XWRA_MASK|(3<<21)|(1<<11), COM, {BFF, U, W}},
--{"mtfsfi.", XRC(63,134,1), XWRA_MASK|(3<<21)|(1<<11), COM, {BFF, U, W}},
--
--{"fnabs",	XRC(63,136,0),	XRA_MASK,    COM,	{FRT, FRB}},
--{"fnabs.",	XRC(63,136,1),	XRA_MASK,    COM,	{FRT, FRB}},
--
--{"dtstexq",	X(63,162),	X_MASK,      POWER6,	{BF, FRA, FRB}},
--{"dtstdcq",	Z(63,194),	Z_MASK,      POWER6,	{BF, FRA, DCM}},
--{"dtstdgq",	Z(63,226),	Z_MASK,      POWER6,	{BF, FRA, DGM}},
--
--{"drintnq",	ZRC(63,227,0),	Z2_MASK,     POWER6,	{R, FRT, FRB, RMC}},
--{"drintnq.",	ZRC(63,227,1),	Z2_MASK,     POWER6,	{R, FRT, FRB, RMC}},
--
--{"dctqpq",	XRC(63,258,0),	X_MASK,      POWER6,	{FRT, FRB}},
--{"dctqpq.",	XRC(63,258,1),	X_MASK,      POWER6,	{FRT, FRB}},
--
--{"fabs",	XRC(63,264,0),	XRA_MASK,    COM,	{FRT, FRB}},
--{"fabs.",	XRC(63,264,1),	XRA_MASK,    COM,	{FRT, FRB}},
--
--{"dctfixq",	XRC(63,290,0),	X_MASK,      POWER6,	{FRT, FRB}},
--{"dctfixq.",	XRC(63,290,1),	X_MASK,      POWER6,	{FRT, FRB}},
--
--{"ddedpdq",	XRC(63,322,0),	X_MASK,      POWER6,	{SP, FRT, FRB}},
--{"ddedpdq.",	XRC(63,322,1),	X_MASK,      POWER6,	{SP, FRT, FRB}},
--
--{"dxexq",	XRC(63,354,0),	X_MASK,      POWER6,	{FRT, FRB}},
--{"dxexq.",	XRC(63,354,1),	X_MASK,      POWER6,	{FRT, FRB}},
--
--{"frin",	XRC(63,392,0),	XRA_MASK,    POWER5,	{FRT, FRB}},
--{"frin.",	XRC(63,392,1),	XRA_MASK,    POWER5,	{FRT, FRB}},
--{"friz",	XRC(63,424,0),	XRA_MASK,    POWER5,	{FRT, FRB}},
--{"friz.",	XRC(63,424,1),	XRA_MASK,    POWER5,	{FRT, FRB}},
--{"frip",	XRC(63,456,0),	XRA_MASK,    POWER5,	{FRT, FRB}},
--{"frip.",	XRC(63,456,1),	XRA_MASK,    POWER5,	{FRT, FRB}},
--{"frim",	XRC(63,488,0),	XRA_MASK,    POWER5,	{FRT, FRB}},
--{"frim.",	XRC(63,488,1),	XRA_MASK,    POWER5,	{FRT, FRB}},
--
--{"dsubq",	XRC(63,514,0),	X_MASK,      POWER6,	{FRT, FRA, FRB}},
--{"dsubq.",	XRC(63,514,1),	X_MASK,      POWER6,	{FRT, FRA, FRB}},
--
--{"ddivq",	XRC(63,546,0),	X_MASK,      POWER6,	{FRT, FRA, FRB}},
--{"ddivq.",	XRC(63,546,1),	X_MASK,      POWER6,	{FRT, FRA, FRB}},
--
--{"mffs",	XRC(63,583,0),	XRARB_MASK,  COM,	{FRT}},
--{"mffs.",	XRC(63,583,1),	XRARB_MASK,  COM,	{FRT}},
--
--{"dcmpuq",	X(63,642),	X_MASK,      POWER6,	{BF, FRA, FRB}},
--
--{"dtstsfq",	X(63,674),	X_MASK,      POWER6,	{BF, FRA, FRB}},
--
--{"mtfsf",	XFL(63,711,0),	XFL_MASK,    COM,	{FLM, FRB, XFL_L, W}},
--{"mtfsf.",	XFL(63,711,1),	XFL_MASK,    COM,	{FLM, FRB, XFL_L, W}},
--
--{"drdpq",	XRC(63,770,0),	X_MASK,      POWER6,	{FRT, FRB}},
--{"drdpq.",	XRC(63,770,1),	X_MASK,      POWER6,	{FRT, FRB}},
--
--{"dcffixq",	XRC(63,802,0),	X_MASK,      POWER6,	{FRT, FRB}},
--{"dcffixq.",	XRC(63,802,1),	X_MASK,      POWER6,	{FRT, FRB}},
--
--{"fctid",	XRC(63,814,0),	XRA_MASK,    PPC64,	{FRT, FRB}},
--{"fctid.",	XRC(63,814,1),	XRA_MASK,    PPC64,	{FRT, FRB}},
--
--{"fctidz",	XRC(63,815,0),	XRA_MASK,    PPC64,	{FRT, FRB}},
--{"fctidz.",	XRC(63,815,1),	XRA_MASK,    PPC64,	{FRT, FRB}},
--
--{"denbcdq",	XRC(63,834,0),	X_MASK,      POWER6,	{S, FRT, FRB}},
--{"denbcdq.",	XRC(63,834,1),	X_MASK,      POWER6,	{S, FRT, FRB}},
-+{"attn",	X(0,256),	X_MASK,      POWER4,	PPCNONE,	{0}},
-+{"tdlgti",	OPTO(2,TOLGT),	OPTO_MASK,   PPC64,	PPCNONE,	{RA, SI}},
-+{"tdllti",	OPTO(2,TOLLT),	OPTO_MASK,   PPC64,	PPCNONE,	{RA, SI}},
-+{"tdeqi",	OPTO(2,TOEQ),	OPTO_MASK,   PPC64,	PPCNONE,	{RA, SI}},
-+{"tdlgei",	OPTO(2,TOLGE),	OPTO_MASK,   PPC64,	PPCNONE,	{RA, SI}},
-+{"tdlnli",	OPTO(2,TOLNL),	OPTO_MASK,   PPC64,	PPCNONE,	{RA, SI}},
-+{"tdllei",	OPTO(2,TOLLE),	OPTO_MASK,   PPC64,	PPCNONE,	{RA, SI}},
-+{"tdlngi",	OPTO(2,TOLNG),	OPTO_MASK,   PPC64,	PPCNONE,	{RA, SI}},
-+{"tdgti",	OPTO(2,TOGT),	OPTO_MASK,   PPC64,	PPCNONE,	{RA, SI}},
-+{"tdgei",	OPTO(2,TOGE),	OPTO_MASK,   PPC64,	PPCNONE,	{RA, SI}},
-+{"tdnli",	OPTO(2,TONL),	OPTO_MASK,   PPC64,	PPCNONE,	{RA, SI}},
-+{"tdlti",	OPTO(2,TOLT),	OPTO_MASK,   PPC64,	PPCNONE,	{RA, SI}},
-+{"tdlei",	OPTO(2,TOLE),	OPTO_MASK,   PPC64,	PPCNONE,	{RA, SI}},
-+{"tdngi",	OPTO(2,TONG),	OPTO_MASK,   PPC64,	PPCNONE,	{RA, SI}},
-+{"tdnei",	OPTO(2,TONE),	OPTO_MASK,   PPC64,	PPCNONE,	{RA, SI}},
-+{"tdi",		OP(2),		OP_MASK,     PPC64,	PPCNONE,	{TO, RA, SI}},
-+
-+{"twlgti",	OPTO(3,TOLGT),	OPTO_MASK,   PPCCOM,	PPCNONE,	{RA, SI}},
-+{"tlgti",	OPTO(3,TOLGT),	OPTO_MASK,   PWRCOM,	PPCNONE,	{RA, SI}},
-+{"twllti",	OPTO(3,TOLLT),	OPTO_MASK,   PPCCOM,	PPCNONE,	{RA, SI}},
-+{"tllti",	OPTO(3,TOLLT),	OPTO_MASK,   PWRCOM,	PPCNONE,	{RA, SI}},
-+{"tweqi",	OPTO(3,TOEQ),	OPTO_MASK,   PPCCOM,	PPCNONE,	{RA, SI}},
-+{"teqi",	OPTO(3,TOEQ),	OPTO_MASK,   PWRCOM,	PPCNONE,	{RA, SI}},
-+{"twlgei",	OPTO(3,TOLGE),	OPTO_MASK,   PPCCOM,	PPCNONE,	{RA, SI}},
-+{"tlgei",	OPTO(3,TOLGE),	OPTO_MASK,   PWRCOM,	PPCNONE,	{RA, SI}},
-+{"twlnli",	OPTO(3,TOLNL),	OPTO_MASK,   PPCCOM,	PPCNONE,	{RA, SI}},
-+{"tlnli",	OPTO(3,TOLNL),	OPTO_MASK,   PWRCOM,	PPCNONE,	{RA, SI}},
-+{"twllei",	OPTO(3,TOLLE),	OPTO_MASK,   PPCCOM,	PPCNONE,	{RA, SI}},
-+{"tllei",	OPTO(3,TOLLE),	OPTO_MASK,   PWRCOM,	PPCNONE,	{RA, SI}},
-+{"twlngi",	OPTO(3,TOLNG),	OPTO_MASK,   PPCCOM,	PPCNONE,	{RA, SI}},
-+{"tlngi",	OPTO(3,TOLNG),	OPTO_MASK,   PWRCOM,	PPCNONE,	{RA, SI}},
-+{"twgti",	OPTO(3,TOGT),	OPTO_MASK,   PPCCOM,	PPCNONE,	{RA, SI}},
-+{"tgti",	OPTO(3,TOGT),	OPTO_MASK,   PWRCOM,	PPCNONE,	{RA, SI}},
-+{"twgei",	OPTO(3,TOGE),	OPTO_MASK,   PPCCOM,	PPCNONE,	{RA, SI}},
-+{"tgei",	OPTO(3,TOGE),	OPTO_MASK,   PWRCOM,	PPCNONE,	{RA, SI}},
-+{"twnli",	OPTO(3,TONL),	OPTO_MASK,   PPCCOM,	PPCNONE,	{RA, SI}},
-+{"tnli",	OPTO(3,TONL),	OPTO_MASK,   PWRCOM,	PPCNONE,	{RA, SI}},
-+{"twlti",	OPTO(3,TOLT),	OPTO_MASK,   PPCCOM,	PPCNONE,	{RA, SI}},
-+{"tlti",	OPTO(3,TOLT),	OPTO_MASK,   PWRCOM,	PPCNONE,	{RA, SI}},
-+{"twlei",	OPTO(3,TOLE),	OPTO_MASK,   PPCCOM,	PPCNONE,	{RA, SI}},
-+{"tlei",	OPTO(3,TOLE),	OPTO_MASK,   PWRCOM,	PPCNONE,	{RA, SI}},
-+{"twngi",	OPTO(3,TONG),	OPTO_MASK,   PPCCOM,	PPCNONE,	{RA, SI}},
-+{"tngi",	OPTO(3,TONG),	OPTO_MASK,   PWRCOM,	PPCNONE,	{RA, SI}},
-+{"twnei",	OPTO(3,TONE),	OPTO_MASK,   PPCCOM,	PPCNONE,	{RA, SI}},
-+{"tnei",	OPTO(3,TONE),	OPTO_MASK,   PWRCOM,	PPCNONE,	{RA, SI}},
-+{"twi",		OP(3),		OP_MASK,     PPCCOM,	PPCNONE,	{TO, RA, SI}},
-+{"ti",		OP(3),		OP_MASK,     PWRCOM,	PPCNONE,	{TO, RA, SI}},
-+
-+{"ps_cmpu0",	X  (4,	 0), X_MASK|(3<<21), PPCPS,	PPCNONE,	{BF, FRA, FRB}},
-+{"vaddubm",	VX (4,	 0),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vmaxub",	VX (4,	 2),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vrlb",	VX (4,	 4),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vcmpequb",	VXR(4,	 6,0),	VXR_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vmuloub",	VX (4,	 8),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vaddfp",	VX (4,	10),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"psq_lx",	XW (4,	 6,0),	XW_MASK,     PPCPS,	PPCNONE,	{FRT,RA,RB,PSWM,PSQM}},
-+{"vmrghb",	VX (4,	12),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"psq_stx",	XW (4,	 7,0),	XW_MASK,     PPCPS,	PPCNONE,	{FRS,RA,RB,PSWM,PSQM}},
-+{"vpkuhum",	VX (4,	14),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"mulhhwu",	XRC(4,	 8,0),	X_MASK,  PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"mulhhwu.",	XRC(4,	 8,1),	X_MASK,  PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"ps_sum0",	A  (4,	10,0),	A_MASK,      PPCPS,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"ps_sum0.",	A  (4,	10,1),	A_MASK,      PPCPS,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"ps_sum1",	A  (4,	11,0),	A_MASK,      PPCPS,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"ps_sum1.",	A  (4,	11,1),	A_MASK,      PPCPS,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"ps_muls0",	A  (4,	12,0),	AFRB_MASK,   PPCPS,	PPCNONE,	{FRT, FRA, FRC}},
-+{"machhwu",	XO (4,	12,0,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"ps_muls0.",	A  (4,	12,1),	AFRB_MASK,   PPCPS,	PPCNONE,	{FRT, FRA, FRC}},
-+{"machhwu.",	XO (4,	12,0,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"ps_muls1",	A  (4,	13,0),	AFRB_MASK,   PPCPS,	PPCNONE,	{FRT, FRA, FRC}},
-+{"ps_muls1.",	A  (4,	13,1),	AFRB_MASK,   PPCPS,	PPCNONE,	{FRT, FRA, FRC}},
-+{"ps_madds0",	A  (4,	14,0),	A_MASK,      PPCPS,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"ps_madds0.",	A  (4,	14,1),	A_MASK,      PPCPS,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"ps_madds1",	A  (4,	15,0),	A_MASK,      PPCPS,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"ps_madds1.",	A  (4,	15,1),	A_MASK,      PPCPS,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"vmhaddshs",	VXA(4,	32),	VXA_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB, VC}},
-+{"vmhraddshs",	VXA(4,	33),	VXA_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB, VC}},
-+{"vmladduhm",	VXA(4,	34),	VXA_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB, VC}},
-+{"ps_div",	A  (4,	18,0),	AFRC_MASK,   PPCPS,	PPCNONE,	{FRT, FRA, FRB}},
-+{"vmsumubm",	VXA(4,	36),	VXA_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB, VC}},
-+{"ps_div.",	A  (4,	18,1),	AFRC_MASK,   PPCPS,	PPCNONE,	{FRT, FRA, FRB}},
-+{"vmsummbm",	VXA(4,	37),	VXA_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB, VC}},
-+{"vmsumuhm",	VXA(4,	38),	VXA_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB, VC}},
-+{"vmsumuhs",	VXA(4,	39),	VXA_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB, VC}},
-+{"ps_sub",	A  (4,	20,0),	AFRC_MASK,   PPCPS,	PPCNONE,	{FRT, FRA, FRB}},
-+{"vmsumshm",	VXA(4,	40),	VXA_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB, VC}},
-+{"ps_sub.",	A  (4,	20,1),	AFRC_MASK,   PPCPS,	PPCNONE,	{FRT, FRA, FRB}},
-+{"vmsumshs",	VXA(4,	41),	VXA_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB, VC}},
-+{"ps_add",	A  (4,	21,0),	AFRC_MASK,   PPCPS,	PPCNONE,	{FRT, FRA, FRB}},
-+{"vsel",	VXA(4,	42),	VXA_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB, VC}},
-+{"ps_add.",	A  (4,	21,1),	AFRC_MASK,   PPCPS,	PPCNONE,	{FRT, FRA, FRB}},
-+{"vperm",	VXA(4,	43),	VXA_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB, VC}},
-+{"vsldoi",	VXA(4,	44),	VXA_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB, SHB}},
-+{"ps_sel",	A  (4,	23,0),	A_MASK,      PPCPS,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"vmaddfp",	VXA(4,	46),	VXA_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VC, VB}},
-+{"ps_sel.",	A  (4,	23,1),	A_MASK,      PPCPS,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"vnmsubfp",	VXA(4,	47),	VXA_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VC, VB}},
-+{"ps_res",	A  (4,	24,0), AFRAFRC_MASK, PPCPS,	PPCNONE,	{FRT, FRB}},
-+{"ps_res.",	A  (4,	24,1), AFRAFRC_MASK, PPCPS,	PPCNONE,	{FRT, FRB}},
-+{"ps_mul",	A  (4,	25,0), AFRB_MASK,    PPCPS,	PPCNONE,	{FRT, FRA, FRC}},
-+{"ps_mul.",	A  (4,	25,1),	AFRB_MASK,   PPCPS,	PPCNONE,	{FRT, FRA, FRC}},
-+{"ps_rsqrte",	A  (4,	26,0), AFRAFRC_MASK, PPCPS,	PPCNONE,	{FRT, FRB}},
-+{"ps_rsqrte.",	A  (4,	26,1), AFRAFRC_MASK, PPCPS,	PPCNONE,	{FRT, FRB}},
-+{"ps_msub",	A  (4,	28,0),	A_MASK,      PPCPS,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"ps_msub.",	A  (4,	28,1),	A_MASK,      PPCPS,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"ps_madd",	A  (4,	29,0),	A_MASK,      PPCPS,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"ps_madd.",	A  (4,	29,1),	A_MASK,      PPCPS,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"ps_nmsub",	A  (4,	30,0),	A_MASK,      PPCPS,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"ps_nmsub.",	A  (4,	30,1),	A_MASK,      PPCPS,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"ps_nmadd",	A  (4,	31,0),	A_MASK,      PPCPS,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"ps_nmadd.",	A  (4,	31,1),	A_MASK,      PPCPS,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"ps_cmpo0",	X  (4,	32), X_MASK|(3<<21), PPCPS,	PPCNONE,	{BF, FRA, FRB}},
-+{"vadduhm",	VX (4,	64),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vmaxuh",	VX (4,	66),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vrlh",	VX (4,	68),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vcmpequh",	VXR(4,	70,0),	VXR_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vmulouh",	VX (4,	72),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vsubfp",	VX (4,	74),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"psq_lux",	XW (4,	38,0),	XW_MASK,     PPCPS,	PPCNONE,	{FRT,RA,RB,PSWM,PSQM}},
-+{"vmrghh",	VX (4,	76),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"psq_stux",	XW (4,	39,0),	XW_MASK,     PPCPS,	PPCNONE,	{FRS,RA,RB,PSWM,PSQM}},
-+{"vpkuwum",	VX (4,	78),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"ps_neg",	XRC(4,	40,0),	XRA_MASK,    PPCPS,	PPCNONE,	{FRT, FRB}},
-+{"mulhhw",	XRC(4,	40,0),	X_MASK,  PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"ps_neg.",	XRC(4,	40,1),	XRA_MASK,    PPCPS,	PPCNONE,	{FRT, FRB}},
-+{"mulhhw.",	XRC(4,	40,1),	X_MASK,  PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"machhw",	XO (4,	44,0,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"machhw.",	XO (4,	44,0,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"nmachhw",	XO (4,	46,0,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"nmachhw.",	XO (4,	46,0,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"ps_cmpu1",	X  (4,	64), X_MASK|(3<<21), PPCPS,	PPCNONE,	{BF, FRA, FRB}},
-+{"vadduwm",	VX (4,	128),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vmaxuw",	VX (4,	130),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vrlw",	VX (4,	132),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vcmpequw",	VXR(4,	134,0), VXR_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vmrghw",	VX (4,	140),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vpkuhus",	VX (4,	142),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"ps_mr",	XRC(4,	72,0),	XRA_MASK,    PPCPS,	PPCNONE,	{FRT, FRB}},
-+{"ps_mr.",	XRC(4,	72,1),	XRA_MASK,    PPCPS,	PPCNONE,	{FRT, FRB}},
-+{"machhwsu",	XO (4,	76,0,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"machhwsu.",	XO (4,	76,0,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"ps_cmpo1",	X  (4,	96), X_MASK|(3<<21), PPCPS,	PPCNONE,	{BF, FRA, FRB}},
-+{"vcmpeqfp",	VXR(4, 198,0),	VXR_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vpkuwus",	VX (4, 206),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"machhws",	XO (4, 108,0,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"machhws.",	XO (4, 108,0,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"nmachhws",	XO (4, 110,0,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"nmachhws.",	XO (4, 110,0,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"vmaxsb",	VX (4, 258),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vslb",	VX (4, 260),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vmulosb",	VX (4, 264),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vrefp",	VX (4, 266),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VB}},
-+{"vmrglb",	VX (4, 268),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vpkshus",	VX (4, 270),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"ps_nabs",	XRC(4, 136,0),	XRA_MASK,    PPCPS,	PPCNONE,	{FRT, FRB}},
-+{"mulchwu",	XRC(4, 136,0),	X_MASK,  PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"ps_nabs.",	XRC(4, 136,1),	XRA_MASK,    PPCPS,	PPCNONE,	{FRT, FRB}},
-+{"mulchwu.",	XRC(4, 136,1),	X_MASK,  PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"macchwu",	XO (4, 140,0,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"macchwu.",	XO (4, 140,0,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"vmaxsh",	VX (4, 322),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vslh",	VX (4, 324),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vmulosh",	VX (4, 328),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vrsqrtefp",	VX (4, 330),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VB}},
-+{"vmrglh",	VX (4, 332),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vpkswus",	VX (4, 334),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"mulchw",	XRC(4, 168,0),	X_MASK,  PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"mulchw.",	XRC(4, 168,1),	X_MASK,  PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"macchw",	XO (4, 172,0,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"macchw.",	XO (4, 172,0,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"nmacchw",	XO (4, 174,0,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"nmacchw.",	XO (4, 174,0,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"vaddcuw",	VX (4, 384),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vmaxsw",	VX (4, 386),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vslw",	VX (4, 388),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vexptefp",	VX (4, 394),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VB}},
-+{"vmrglw",	VX (4, 396),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vpkshss",	VX (4, 398),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"macchwsu",	XO (4, 204,0,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"macchwsu.",	XO (4, 204,0,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"vsl",		VX (4, 452),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vcmpgefp",	VXR(4, 454,0),	VXR_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vlogefp",	VX (4, 458),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VB}},
-+{"vpkswss",	VX (4, 462),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"macchws",	XO (4, 236,0,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"macchws.",	XO (4, 236,0,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"nmacchws",	XO (4, 238,0,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"nmacchws.",	XO (4, 238,0,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"evaddw",	VX (4, 512),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"vaddubs",	VX (4, 512),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"evaddiw",	VX (4, 514),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RB, UIMM}},
-+{"vminub",	VX (4, 514),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"evsubfw",	VX (4, 516),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evsubw",	VX (4, 516),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RB, RA}},
-+{"vsrb",	VX (4, 516),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"evsubifw",	VX (4, 518),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, UIMM, RB}},
-+{"evsubiw",	VX (4, 518),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RB, UIMM}},
-+{"vcmpgtub",	VXR(4, 518,0),	VXR_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"evabs",	VX (4, 520),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA}},
-+{"vmuleub",	VX (4, 520),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"evneg",	VX (4, 521),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA}},
-+{"evextsb",	VX (4, 522),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA}},
-+{"vrfin",	VX (4, 522),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VB}},
-+{"evextsh",	VX (4, 523),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA}},
-+{"evrndw",	VX (4, 524),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA}},
-+{"vspltb",	VX (4, 524),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VB, UIMM}},
-+{"evcntlzw",	VX (4, 525),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA}},
-+{"evcntlsw",	VX (4, 526),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA}},
-+{"vupkhsb",	VX (4, 526),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VB}},
-+{"brinc",	VX (4, 527),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"ps_abs",	XRC(4, 264,0),	XRA_MASK,    PPCPS,	PPCNONE,	{FRT, FRB}},
-+{"ps_abs.",	XRC(4, 264,1),	XRA_MASK,    PPCPS,	PPCNONE,	{FRT, FRB}},
-+{"evand",	VX (4, 529),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evandc",	VX (4, 530),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evxor",	VX (4, 534),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmr",	VX (4, 535),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, BBA}},
-+{"evor",	VX (4, 535),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evnor",	VX (4, 536),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evnot",	VX (4, 536),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, BBA}},
-+{"get",		APU(4, 268,0),	APU_RA_MASK, PPC405,	PPCNONE,	{RT, FSL}},
-+{"eveqv",	VX (4, 537),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evorc",	VX (4, 539),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evnand",	VX (4, 542),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evsrwu",	VX (4, 544),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evsrws",	VX (4, 545),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evsrwiu",	VX (4, 546),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, EVUIMM}},
-+{"evsrwis",	VX (4, 547),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, EVUIMM}},
-+{"evslw",	VX (4, 548),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evslwi",	VX (4, 550),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, EVUIMM}},
-+{"evrlw",	VX (4, 552),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evsplati",	VX (4, 553),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, SIMM}},
-+{"evrlwi",	VX (4, 554),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, EVUIMM}},
-+{"evsplatfi",	VX (4, 555),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, SIMM}},
-+{"evmergehi",	VX (4, 556),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmergelo",	VX (4, 557),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmergehilo",	VX (4, 558),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmergelohi",	VX (4, 559),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evcmpgtu",	VX (4, 560),	VX_MASK,     PPCSPE,	PPCNONE,	{CRFD, RA, RB}},
-+{"evcmpgts",	VX (4, 561),	VX_MASK,     PPCSPE,	PPCNONE,	{CRFD, RA, RB}},
-+{"evcmpltu",	VX (4, 562),	VX_MASK,     PPCSPE,	PPCNONE,	{CRFD, RA, RB}},
-+{"evcmplts",	VX (4, 563),	VX_MASK,     PPCSPE,	PPCNONE,	{CRFD, RA, RB}},
-+{"evcmpeq",	VX (4, 564),	VX_MASK,     PPCSPE,	PPCNONE,	{CRFD, RA, RB}},
-+{"cget",	APU(4, 284,0),	APU_RA_MASK, PPC405,	PPCNONE,	{RT, FSL}},
-+{"vadduhs",	VX (4, 576),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vminuh",	VX (4, 578),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vsrh",	VX (4, 580),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vcmpgtuh",	VXR(4, 582,0),	VXR_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vmuleuh",	VX (4, 584),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vrfiz",	VX (4, 586),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VB}},
-+{"vsplth",	VX (4, 588),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VB, UIMM}},
-+{"vupkhsh",	VX (4, 590),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VB}},
-+{"nget",	APU(4, 300,0),	APU_RA_MASK, PPC405,	PPCNONE,	{RT, FSL}},
-+{"evsel",	EVSEL(4,79),	EVSEL_MASK,  PPCSPE,	PPCNONE,	{RS, RA, RB, CRFS}},
-+{"ncget",	APU(4, 316,0),	APU_RA_MASK, PPC405,	PPCNONE,	{RT, FSL}},
-+{"evfsadd",	VX (4, 640),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"vadduws",	VX (4, 640),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"evfssub",	VX (4, 641),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"vminuw",	VX (4, 642),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"evfsabs",	VX (4, 644),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA}},
-+{"vsrw",	VX (4, 644),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"evfsnabs",	VX (4, 645),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA}},
-+{"evfsneg",	VX (4, 646),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA}},
-+{"vcmpgtuw",	VXR(4, 646,0),	VXR_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"evfsmul",	VX (4, 648),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evfsdiv",	VX (4, 649),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"vrfip",	VX (4, 650),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VB}},
-+{"evfscmpgt",	VX (4, 652),	VX_MASK,     PPCSPE,	PPCNONE,	{CRFD, RA, RB}},
-+{"vspltw",	VX (4, 652),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VB, UIMM}},
-+{"evfscmplt",	VX (4, 653),	VX_MASK,     PPCSPE,	PPCNONE,	{CRFD, RA, RB}},
-+{"evfscmpeq",	VX (4, 654),	VX_MASK,     PPCSPE,	PPCNONE,	{CRFD, RA, RB}},
-+{"vupklsb",	VX (4, 654),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VB}},
-+{"evfscfui",	VX (4, 656),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RB}},
-+{"evfscfsi",	VX (4, 657),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RB}},
-+{"evfscfuf",	VX (4, 658),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RB}},
-+{"evfscfsf",	VX (4, 659),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RB}},
-+{"evfsctui",	VX (4, 660),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RB}},
-+{"evfsctsi",	VX (4, 661),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RB}},
-+{"evfsctuf",	VX (4, 662),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RB}},
-+{"evfsctsf",	VX (4, 663),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RB}},
-+{"evfsctuiz",	VX (4, 664),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RB}},
-+{"put",		APU(4, 332,0),	APU_RT_MASK, PPC405,	PPCNONE,	{RA, FSL}},
-+{"evfsctsiz",	VX (4, 666),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RB}},
-+{"evfststgt",	VX (4, 668),	VX_MASK,     PPCSPE,	PPCNONE,	{CRFD, RA, RB}},
-+{"evfststlt",	VX (4, 669),	VX_MASK,     PPCSPE,	PPCNONE,	{CRFD, RA, RB}},
-+{"evfststeq",	VX (4, 670),	VX_MASK,     PPCSPE,	PPCNONE,	{CRFD, RA, RB}},
-+{"cput",	APU(4, 348,0),	APU_RT_MASK, PPC405,	PPCNONE,	{RA, FSL}},
-+{"efsadd",	VX (4, 704),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RA, RB}},
-+{"efssub",	VX (4, 705),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RA, RB}},
-+{"efsabs",	VX (4, 708),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RA}},
-+{"vsr",		VX (4, 708),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"efsnabs",	VX (4, 709),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RA}},
-+{"efsneg",	VX (4, 710),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RA}},
-+{"vcmpgtfp",	VXR(4, 710,0),	VXR_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"efsmul",	VX (4, 712),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RA, RB}},
-+{"efsdiv",	VX (4, 713),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RA, RB}},
-+{"vrfim",	VX (4, 714),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VB}},
-+{"efscmpgt",	VX (4, 716),	VX_MASK,     PPCEFS,	PPCNONE,	{CRFD, RA, RB}},
-+{"efscmplt",	VX (4, 717),	VX_MASK,     PPCEFS,	PPCNONE,	{CRFD, RA, RB}},
-+{"efscmpeq",	VX (4, 718),	VX_MASK,     PPCEFS,	PPCNONE,	{CRFD, RA, RB}},
-+{"vupklsh",	VX (4, 718),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VB}},
-+{"efscfd",	VX (4, 719),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RB}},
-+{"efscfui",	VX (4, 720),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RB}},
-+{"efscfsi",	VX (4, 721),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RB}},
-+{"efscfuf",	VX (4, 722),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RB}},
-+{"efscfsf",	VX (4, 723),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RB}},
-+{"efsctui",	VX (4, 724),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RB}},
-+{"efsctsi",	VX (4, 725),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RB}},
-+{"efsctuf",	VX (4, 726),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RB}},
-+{"efsctsf",	VX (4, 727),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RB}},
-+{"efsctuiz",	VX (4, 728),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RB}},
-+{"nput",	APU(4, 364,0),	APU_RT_MASK, PPC405,	PPCNONE,	{RA, FSL}},
-+{"efsctsiz",	VX (4, 730),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RB}},
-+{"efststgt",	VX (4, 732),	VX_MASK,     PPCEFS,	PPCNONE,	{CRFD, RA, RB}},
-+{"efststlt",	VX (4, 733),	VX_MASK,     PPCEFS,	PPCNONE,	{CRFD, RA, RB}},
-+{"efststeq",	VX (4, 734),	VX_MASK,     PPCEFS,	PPCNONE,	{CRFD, RA, RB}},
-+{"efdadd",	VX (4, 736),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RA, RB}},
-+{"efdsub",	VX (4, 737),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RA, RB}},
-+{"efdcfuid",	VX (4, 738),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RB}},
-+{"efdcfsid",	VX (4, 739),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RB}},
-+{"efdabs",	VX (4, 740),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RA}},
-+{"efdnabs",	VX (4, 741),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RA}},
-+{"efdneg",	VX (4, 742),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RA}},
-+{"efdmul",	VX (4, 744),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RA, RB}},
-+{"efddiv",	VX (4, 745),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RA, RB}},
-+{"efdctuidz",	VX (4, 746),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RB}},
-+{"efdctsidz",	VX (4, 747),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RB}},
-+{"efdcmpgt",	VX (4, 748),	VX_MASK,     PPCEFS,	PPCNONE,	{CRFD, RA, RB}},
-+{"efdcmplt",	VX (4, 749),	VX_MASK,     PPCEFS,	PPCNONE,	{CRFD, RA, RB}},
-+{"efdcmpeq",	VX (4, 750),	VX_MASK,     PPCEFS,	PPCNONE,	{CRFD, RA, RB}},
-+{"efdcfs",	VX (4, 751),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RB}},
-+{"efdcfui",	VX (4, 752),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RB}},
-+{"efdcfsi",	VX (4, 753),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RB}},
-+{"efdcfuf",	VX (4, 754),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RB}},
-+{"efdcfsf",	VX (4, 755),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RB}},
-+{"efdctui",	VX (4, 756),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RB}},
-+{"efdctsi",	VX (4, 757),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RB}},
-+{"efdctuf",	VX (4, 758),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RB}},
-+{"efdctsf",	VX (4, 759),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RB}},
-+{"efdctuiz",	VX (4, 760),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RB}},
-+{"ncput",	APU(4, 380,0),	APU_RT_MASK, PPC405,	PPCNONE,	{RA, FSL}},
-+{"efdctsiz",	VX (4, 762),	VX_MASK,     PPCEFS,	PPCNONE,	{RS, RB}},
-+{"efdtstgt",	VX (4, 764),	VX_MASK,     PPCEFS,	PPCNONE,	{CRFD, RA, RB}},
-+{"efdtstlt",	VX (4, 765),	VX_MASK,     PPCEFS,	PPCNONE,	{CRFD, RA, RB}},
-+{"efdtsteq",	VX (4, 766),	VX_MASK,     PPCEFS,	PPCNONE,	{CRFD, RA, RB}},
-+{"evlddx",	VX (4, 768),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"vaddsbs",	VX (4, 768),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"evldd",	VX (4, 769),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, EVUIMM_8, RA}},
-+{"evldwx",	VX (4, 770),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"vminsb",	VX (4, 770),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"evldw",	VX (4, 771),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, EVUIMM_8, RA}},
-+{"evldhx",	VX (4, 772),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"vsrab",	VX (4, 772),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"evldh",	VX (4, 773),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, EVUIMM_8, RA}},
-+{"vcmpgtsb",	VXR(4, 774,0),	VXR_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"evlhhesplatx",VX (4, 776),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"vmulesb",	VX (4, 776),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"evlhhesplat",	VX (4, 777),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, EVUIMM_2, RA}},
-+{"vcfux",	VX (4, 778),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VB, UIMM}},
-+{"evlhhousplatx",VX(4, 780),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"vspltisb",	VX (4, 780),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, SIMM}},
-+{"evlhhousplat",VX (4, 781),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, EVUIMM_2, RA}},
-+{"evlhhossplatx",VX(4, 782),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"vpkpx",	VX (4, 782),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"evlhhossplat",VX (4, 783),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, EVUIMM_2, RA}},
-+{"mullhwu",	XRC(4, 392,0),	X_MASK,  PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"evlwhex",	VX (4, 784),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"mullhwu.",	XRC(4, 392,1),	X_MASK,  PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"evlwhe",	VX (4, 785),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, EVUIMM_4, RA}},
-+{"evlwhoux",	VX (4, 788),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evlwhou",	VX (4, 789),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, EVUIMM_4, RA}},
-+{"evlwhosx",	VX (4, 790),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evlwhos",	VX (4, 791),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, EVUIMM_4, RA}},
-+{"maclhwu",	XO (4, 396,0,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"evlwwsplatx",	VX (4, 792),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"maclhwu.",	XO (4, 396,0,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"evlwwsplat",	VX (4, 793),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, EVUIMM_4, RA}},
-+{"evlwhsplatx",	VX (4, 796),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evlwhsplat",	VX (4, 797),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, EVUIMM_4, RA}},
-+{"evstddx",	VX (4, 800),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evstdd",	VX (4, 801),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, EVUIMM_8, RA}},
-+{"evstdwx",	VX (4, 802),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evstdw",	VX (4, 803),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, EVUIMM_8, RA}},
-+{"evstdhx",	VX (4, 804),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evstdh",	VX (4, 805),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, EVUIMM_8, RA}},
-+{"evstwhex",	VX (4, 816),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evstwhe",	VX (4, 817),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, EVUIMM_4, RA}},
-+{"evstwhox",	VX (4, 820),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evstwho",	VX (4, 821),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, EVUIMM_4, RA}},
-+{"evstwwex",	VX (4, 824),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evstwwe",	VX (4, 825),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, EVUIMM_4, RA}},
-+{"evstwwox",	VX (4, 828),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evstwwo",	VX (4, 829),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, EVUIMM_4, RA}},
-+{"vaddshs",	VX (4, 832),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vminsh",	VX (4, 834),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vsrah",	VX (4, 836),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vcmpgtsh",	VXR(4, 838,0),	VXR_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vmulesh",	VX (4, 840),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vcfsx",	VX (4, 842),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VB, UIMM}},
-+{"vspltish",	VX (4, 844),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, SIMM}},
-+{"vupkhpx",	VX (4, 846),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VB}},
-+{"mullhw",	XRC(4, 424,0),	X_MASK,  PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"mullhw.",	XRC(4, 424,1),	X_MASK,  PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"maclhw",	XO (4, 428,0,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"maclhw.",	XO (4, 428,0,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"nmaclhw",	XO (4, 430,0,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"nmaclhw.",	XO (4, 430,0,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"vaddsws",	VX (4, 896),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vminsw",	VX (4, 898),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vsraw",	VX (4, 900),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vcmpgtsw",	VXR(4, 902,0),	VXR_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vctuxs",	VX (4, 906),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VB, UIMM}},
-+{"vspltisw",	VX (4, 908),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, SIMM}},
-+{"maclhwsu",	XO (4, 460,0,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"maclhwsu.",	XO (4, 460,0,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"vcmpbfp",	VXR(4, 966,0),	VXR_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vctsxs",	VX (4, 970),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VB, UIMM}},
-+{"vupklpx",	VX (4, 974),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VB}},
-+{"maclhws",	XO (4, 492,0,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"maclhws.",	XO (4, 492,0,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"nmaclhws",	XO (4, 494,0,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"nmaclhws.",	XO (4, 494,0,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"vsububm",	VX (4,1024),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vavgub",	VX (4,1026),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"evmhessf",	VX (4,1027),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"vand",	VX (4,1028),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vcmpequb.",	VXR(4,	 6,1),	VXR_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"udi0fcm.",	APU(4, 515,0), APU_MASK, PPC405|PPC440, PPCNONE,	{URT, URA, URB}},
-+{"udi0fcm",	APU(4, 515,1), APU_MASK, PPC405|PPC440, PPCNONE,	{URT, URA, URB}},
-+{"evmhossf",	VX (4,1031),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmheumi",	VX (4,1032),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhesmi",	VX (4,1033),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"vmaxfp",	VX (4,1034),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"evmhesmf",	VX (4,1035),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhoumi",	VX (4,1036),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"vslo",	VX (4,1036),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"evmhosmi",	VX (4,1037),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhosmf",	VX (4,1039),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"machhwuo",	XO (4,	12,1,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"machhwuo.",	XO (4,	12,1,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"ps_merge00",	XOPS(4,528,0),	XOPS_MASK,   PPCPS,	PPCNONE,	{FRT, FRA, FRB}},
-+{"ps_merge00.",	XOPS(4,528,1),	XOPS_MASK,   PPCPS,	PPCNONE,	{FRT, FRA, FRB}},
-+{"evmhessfa",	VX (4,1059),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhossfa",	VX (4,1063),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmheumia",	VX (4,1064),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhesmia",	VX (4,1065),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhesmfa",	VX (4,1067),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhoumia",	VX (4,1068),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhosmia",	VX (4,1069),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhosmfa",	VX (4,1071),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"vsubuhm",	VX (4,1088),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vavguh",	VX (4,1090),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vandc",	VX (4,1092),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vcmpequh.",	VXR(4,	70,1),	VXR_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"udi1fcm.",	APU(4, 547,0), APU_MASK, PPC405|PPC440, PPCNONE,	{URT, URA, URB}},
-+{"udi1fcm",	APU(4, 547,1), APU_MASK, PPC405|PPC440, PPCNONE,	{URT, URA, URB}},   
-+{"evmwhssf",	VX (4,1095),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmwlumi",	VX (4,1096),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"vminfp",	VX (4,1098),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"evmwhumi",	VX (4,1100),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"vsro",	VX (4,1100),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"evmwhsmi",	VX (4,1101),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmwhsmf",	VX (4,1103),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmwssf",	VX (4,1107),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"machhwo",	XO (4,	44,1,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"evmwumi",	VX (4,1112),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"machhwo.",	XO (4,	44,1,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"evmwsmi",	VX (4,1113),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmwsmf",	VX (4,1115),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"nmachhwo",	XO (4,	46,1,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"nmachhwo.",	XO (4,	46,1,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"ps_merge01",	XOPS(4,560,0),	XOPS_MASK,   PPCPS,	PPCNONE,	{FRT, FRA, FRB}},
-+{"ps_merge01.",	XOPS(4,560,1),	XOPS_MASK,   PPCPS,	PPCNONE,	{FRT, FRA, FRB}},
-+{"evmwhssfa",	VX (4,1127),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmwlumia",	VX (4,1128),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmwhumia",	VX (4,1132),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmwhsmia",	VX (4,1133),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmwhsmfa",	VX (4,1135),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmwssfa",	VX (4,1139),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmwumia",	VX (4,1144),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmwsmia",	VX (4,1145),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmwsmfa",	VX (4,1147),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"vsubuwm",	VX (4,1152),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vavguw",	VX (4,1154),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vor",		VX (4,1156),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vcmpequw.",	VXR(4, 134,1),	VXR_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"udi2fcm.",	APU(4, 579,0), APU_MASK, PPC405|PPC440, PPCNONE,	{URT, URA, URB}},
-+{"udi2fcm",	APU(4, 579,1), APU_MASK, PPC405|PPC440, PPCNONE,	{URT, URA, URB}},   
-+{"machhwsuo",	XO (4,	76,1,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"machhwsuo.",	XO (4,	76,1,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"ps_merge10",	XOPS(4,592,0),	XOPS_MASK,   PPCPS,	PPCNONE,	{FRT, FRA, FRB}},
-+{"ps_merge10.",	XOPS(4,592,1),	XOPS_MASK,   PPCPS,	PPCNONE,	{FRT, FRA, FRB}},
-+{"evaddusiaaw",	VX (4,1216),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA}},
-+{"evaddssiaaw",	VX (4,1217),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA}},
-+{"evsubfusiaaw",VX (4,1218),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA}},
-+{"evsubfssiaaw",VX (4,1219),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA}},
-+{"evmra",	VX (4,1220),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA}},
-+{"vxor",	VX (4,1220),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"evdivws",	VX (4,1222),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"vcmpeqfp.",	VXR(4, 198,1),	VXR_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"udi3fcm.",	APU(4, 611,0), APU_MASK, PPC405|PPC440, PPCNONE,	{URT, URA, URB}},
-+{"udi3fcm",	APU(4, 611,1), APU_MASK, PPC405|PPC440, PPCNONE,	{URT, URA, URB}},   
-+{"evdivwu",	VX (4,1223),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evaddumiaaw",	VX (4,1224),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA}},
-+{"evaddsmiaaw",	VX (4,1225),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA}},
-+{"evsubfumiaaw",VX (4,1226),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA}},
-+{"evsubfsmiaaw",VX (4,1227),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA}},
-+{"machhwso",	XO (4, 108,1,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"machhwso.",	XO (4, 108,1,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"nmachhwso",	XO (4, 110,1,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"nmachhwso.",	XO (4, 110,1,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"ps_merge11",	XOPS(4,624,0),	XOPS_MASK,   PPCPS,	PPCNONE,	{FRT, FRA, FRB}},
-+{"ps_merge11.",	XOPS(4,624,1),	XOPS_MASK,   PPCPS,	PPCNONE,	{FRT, FRA, FRB}},
-+{"evmheusiaaw",	VX (4,1280),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhessiaaw",	VX (4,1281),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"vavgsb",	VX (4,1282),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"evmhessfaaw",	VX (4,1283),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhousiaaw",	VX (4,1284),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"vnor",	VX (4,1284),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"evmhossiaaw",	VX (4,1285),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"udi4fcm.",	APU(4, 643,0), APU_MASK, PPC405|PPC440, PPCNONE,	{URT, URA, URB}},
-+{"udi4fcm",	APU(4, 643,1), APU_MASK, PPC405|PPC440, PPCNONE,	{URT, URA, URB}},
-+{"evmhossfaaw",	VX (4,1287),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmheumiaaw",	VX (4,1288),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhesmiaaw",	VX (4,1289),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhesmfaaw",	VX (4,1291),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhoumiaaw",	VX (4,1292),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhosmiaaw",	VX (4,1293),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhosmfaaw",	VX (4,1295),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"macchwuo",	XO (4, 140,1,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"macchwuo.",	XO (4, 140,1,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"evmhegumiaa",	VX (4,1320),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhegsmiaa",	VX (4,1321),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhegsmfaa",	VX (4,1323),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhogumiaa",	VX (4,1324),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhogsmiaa",	VX (4,1325),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhogsmfaa",	VX (4,1327),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmwlusiaaw",	VX (4,1344),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmwlssiaaw",	VX (4,1345),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"vavgsh",	VX (4,1346),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"udi5fcm.",	APU(4, 675,0), APU_MASK, PPC405|PPC440, PPCNONE,	{URT, URA, URB}},
-+{"udi5fcm",	APU(4, 675,1), APU_MASK, PPC405|PPC440, PPCNONE,	{URT, URA, URB}},
-+{"evmwlumiaaw",	VX (4,1352),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmwlsmiaaw",	VX (4,1353),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmwssfaa",	VX (4,1363),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"macchwo",	XO (4, 172,1,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"evmwumiaa",	VX (4,1368),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"macchwo.",	XO (4, 172,1,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"evmwsmiaa",	VX (4,1369),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmwsmfaa",	VX (4,1371),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"nmacchwo",	XO (4, 174,1,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"nmacchwo.",	XO (4, 174,1,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"evmheusianw",	VX (4,1408),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"vsubcuw",	VX (4,1408),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"evmhessianw",	VX (4,1409),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"vavgsw",	VX (4,1410),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"evmhessfanw",	VX (4,1411),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhousianw",	VX (4,1412),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhossianw",	VX (4,1413),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"udi6fcm.",	APU(4, 707,0), APU_MASK, PPC405|PPC440, PPCNONE,	{URT, URA, URB}},
-+{"udi6fcm",	APU(4, 707,1), APU_MASK, PPC405|PPC440, PPCNONE,	{URT, URA, URB}},
-+{"evmhossfanw",	VX (4,1415),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmheumianw",	VX (4,1416),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhesmianw",	VX (4,1417),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhesmfanw",	VX (4,1419),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhoumianw",	VX (4,1420),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhosmianw",	VX (4,1421),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhosmfanw",	VX (4,1423),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"macchwsuo",	XO (4, 204,1,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"macchwsuo.",	XO (4, 204,1,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"evmhegumian",	VX (4,1448),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhegsmian",	VX (4,1449),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhegsmfan",	VX (4,1451),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhogumian",	VX (4,1452),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhogsmian",	VX (4,1453),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmhogsmfan",	VX (4,1455),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmwlusianw",	VX (4,1472),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmwlssianw",	VX (4,1473),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"vcmpgefp.",	VXR(4, 454,1),	VXR_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"udi7fcm.",	APU(4, 739,0), APU_MASK, PPC405|PPC440, PPCNONE,	{URT, URA, URB}},
-+{"udi7fcm",	APU(4, 739,1), APU_MASK, PPC405|PPC440, PPCNONE,	{URT, URA, URB}},
-+{"evmwlumianw",	VX (4,1480),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmwlsmianw",	VX (4,1481),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmwssfan",	VX (4,1491),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"macchwso",	XO (4, 236,1,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"evmwumian",	VX (4,1496),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"macchwso.",	XO (4, 236,1,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"evmwsmian",	VX (4,1497),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"evmwsmfan",	VX (4,1499),	VX_MASK,     PPCSPE,	PPCNONE,	{RS, RA, RB}},
-+{"nmacchwso",	XO (4, 238,1,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"nmacchwso.",	XO (4, 238,1,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"vsububs",	VX (4,1536),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"mfvscr",	VX (4,1540),	VX_MASK,     PPCVEC,	PPCNONE,	{VD}},
-+{"vcmpgtub.",	VXR(4, 518,1),	VXR_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"udi8fcm.",	APU(4, 771,0),	APU_MASK,    PPC440,	PPCNONE,	{URT, URA, URB}},
-+{"udi8fcm",	APU(4, 771,1),	APU_MASK,    PPC440,	PPCNONE,	{URT, URA, URB}},
-+{"vsum4ubs",	VX (4,1544),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vsubuhs",	VX (4,1600),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"mtvscr",	VX (4,1604),	VX_MASK,     PPCVEC,	PPCNONE,	{VB}},
-+{"vcmpgtuh.",	VXR(4, 582,1),	VXR_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vsum4shs",	VX (4,1608),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"udi9fcm.",	APU(4, 804,0),	APU_MASK,    PPC440,	PPCNONE,	{URT, URA, URB}},
-+{"udi9fcm",	APU(4, 804,1),	APU_MASK,    PPC440,	PPCNONE,	{URT, URA, URB}},
-+{"vsubuws",	VX (4,1664),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vcmpgtuw.",	VXR(4, 646,1),	VXR_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"udi10fcm.",	APU(4, 835,0),	APU_MASK,    PPC440,	PPCNONE,	{URT, URA, URB}},
-+{"udi10fcm",	APU(4, 835,1),	APU_MASK,    PPC440,	PPCNONE,	{URT, URA, URB}},
-+{"vsum2sws",	VX (4,1672),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vcmpgtfp.",	VXR(4, 710,1),	VXR_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"udi11fcm.",	APU(4, 867,0),	APU_MASK,    PPC440,	PPCNONE,	{URT, URA, URB}},
-+{"udi11fcm",	APU(4, 867,1),	APU_MASK,    PPC440,	PPCNONE,	{URT, URA, URB}},
-+{"vsubsbs",	VX (4,1792),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vcmpgtsb.",	VXR(4, 774,1),	VXR_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"udi12fcm.",	APU(4, 899,0),	APU_MASK,    PPC440,	PPCNONE,	{URT, URA, URB}},
-+{"udi12fcm",	APU(4, 899,1),	APU_MASK,    PPC440,	PPCNONE,	{URT, URA, URB}},
-+{"vsum4sbs",	VX (4,1800),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"maclhwuo",	XO (4, 396,1,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"maclhwuo.",	XO (4, 396,1,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"vsubshs",	VX (4,1856),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vcmpgtsh.",	VXR(4, 838,1),	VXR_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"udi13fcm.",	APU(4, 931,0),	APU_MASK,    PPC440,	PPCNONE,	{URT, URA, URB}},
-+{"udi13fcm",	APU(4, 931,1),	APU_MASK,    PPC440,	PPCNONE,	{URT, URA, URB}},
-+{"maclhwo",	XO (4, 428,1,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"maclhwo.",	XO (4, 428,1,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"nmaclhwo",	XO (4, 430,1,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"nmaclhwo.",	XO (4, 430,1,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"vsubsws",	VX (4,1920),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"vcmpgtsw.",	VXR(4, 902,1),	VXR_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"udi14fcm.",	APU(4, 963,0),	APU_MASK,    PPC440,	PPCNONE,	{URT, URA, URB}},
-+{"udi14fcm",	APU(4, 963,1),	APU_MASK,    PPC440,	PPCNONE,	{URT, URA, URB}},
-+{"vsumsws",	VX (4,1928),	VX_MASK,     PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"maclhwsuo",	XO (4, 460,1,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"maclhwsuo.",	XO (4, 460,1,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"vcmpbfp.",	VXR(4, 966,1),	VXR_MASK,    PPCVEC,	PPCNONE,	{VD, VA, VB}},
-+{"udi15fcm.",	APU(4, 995,0),	APU_MASK,    PPC440,	PPCNONE,	{URT, URA, URB}},
-+{"udi15fcm",	APU(4, 995,1),	APU_MASK,    PPC440,	PPCNONE,	{URT, URA, URB}},
-+{"maclhwso",	XO (4, 492,1,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"maclhwso.",	XO (4, 492,1,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"nmaclhwso",	XO (4, 494,1,0),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"nmaclhwso.",	XO (4, 494,1,1),XO_MASK, PPC405|PPC440,	PPCNONE,	{RT, RA, RB}},
-+{"dcbz_l",	X  (4,1014),	XRT_MASK,    PPCPS,	PPCNONE,	{RA, RB}},
-+
-+{"mulli",	OP(7),		OP_MASK,     PPCCOM,	PPCNONE,	{RT, RA, SI}},
-+{"muli",	OP(7),		OP_MASK,     PWRCOM,	PPCNONE,	{RT, RA, SI}},
-+
-+{"subfic",	OP(8),		OP_MASK,     PPCCOM,	PPCNONE,	{RT, RA, SI}},
-+{"sfi",		OP(8),		OP_MASK,     PWRCOM,	PPCNONE,	{RT, RA, SI}},
-+
-+{"dozi",	OP(9),		OP_MASK,     M601,	PPCNONE,	{RT, RA, SI}},
-+
-+{"cmplwi",	OPL(10,0),	OPL_MASK,    PPCCOM,	PPCNONE,	{OBF, RA, UI}},
-+{"cmpldi",	OPL(10,1),	OPL_MASK,    PPC64,	PPCNONE,	{OBF, RA, UI}},
-+{"cmpli",	OP(10),		OP_MASK,     PPC,	PPCNONE,	{BF, L, RA, UI}},
-+{"cmpli",	OP(10),		OP_MASK,     PWRCOM,	PPCNONE,	{BF, RA, UI}},
-+
-+{"cmpwi",	OPL(11,0),	OPL_MASK,    PPCCOM,	PPCNONE,	{OBF, RA, SI}},
-+{"cmpdi",	OPL(11,1),	OPL_MASK,    PPC64,	PPCNONE,	{OBF, RA, SI}},
-+{"cmpi",	OP(11),		OP_MASK,     PPC,	PPCNONE,	{BF, L, RA, SI}},
-+{"cmpi",	OP(11),		OP_MASK,     PWRCOM,	PPCNONE,	{BF, RA, SI}},
-+
-+{"addic",	OP(12),		OP_MASK,     PPCCOM,	PPCNONE,	{RT, RA, SI}},
-+{"ai",		OP(12),		OP_MASK,     PWRCOM,	PPCNONE,	{RT, RA, SI}},
-+{"subic",	OP(12),		OP_MASK,     PPCCOM,	PPCNONE,	{RT, RA, NSI}},
-+
-+{"addic.",	OP(13),		OP_MASK,     PPCCOM,	PPCNONE,	{RT, RA, SI}},
-+{"ai.",		OP(13),		OP_MASK,     PWRCOM,	PPCNONE,	{RT, RA, SI}},
-+{"subic.",	OP(13),		OP_MASK,     PPCCOM,	PPCNONE,	{RT, RA, NSI}},
-+
-+{"li",		OP(14),		DRA_MASK,    PPCCOM,	PPCNONE,	{RT, SI}},
-+{"lil",		OP(14),		DRA_MASK,    PWRCOM,	PPCNONE,	{RT, SI}},
-+{"addi",	OP(14),		OP_MASK,     PPCCOM,	PPCNONE,	{RT, RA0, SI}},
-+{"cal",		OP(14),		OP_MASK,     PWRCOM,	PPCNONE,	{RT, D, RA0}},
-+{"subi",	OP(14),		OP_MASK,     PPCCOM,	PPCNONE,	{RT, RA0, NSI}},
-+{"la",		OP(14),		OP_MASK,     PPCCOM,	PPCNONE,	{RT, D, RA0}},
-+
-+{"lis",		OP(15),		DRA_MASK,    PPCCOM,	PPCNONE,	{RT, SISIGNOPT}},
-+{"liu",		OP(15),		DRA_MASK,    PWRCOM,	PPCNONE,	{RT, SISIGNOPT}},
-+{"addis",	OP(15),		OP_MASK,     PPCCOM,	PPCNONE,	{RT, RA0, SISIGNOPT}},
-+{"cau",		OP(15),		OP_MASK,     PWRCOM,	PPCNONE,	{RT, RA0, SISIGNOPT}},
-+{"subis",	OP(15),		OP_MASK,     PPCCOM,	PPCNONE,	{RT, RA0, NSI}},
-+
-+{"bdnz-",    BBO(16,BODNZ,0,0),		BBOATBI_MASK,  PPCCOM,	 PPCNONE,	{BDM}},
-+{"bdnz+",    BBO(16,BODNZ,0,0),		BBOATBI_MASK,  PPCCOM,	 PPCNONE,	{BDP}},
-+{"bdnz",     BBO(16,BODNZ,0,0),		BBOATBI_MASK,  PPCCOM,	 PPCNONE,	{BD}},
-+{"bdn",      BBO(16,BODNZ,0,0),		BBOATBI_MASK,  PWRCOM,	 PPCNONE,	{BD}},
-+{"bdnzl-",   BBO(16,BODNZ,0,1),		BBOATBI_MASK,  PPCCOM,	 PPCNONE,	{BDM}},
-+{"bdnzl+",   BBO(16,BODNZ,0,1),		BBOATBI_MASK,  PPCCOM,	 PPCNONE,	{BDP}},
-+{"bdnzl",    BBO(16,BODNZ,0,1),		BBOATBI_MASK,  PPCCOM,	 PPCNONE,	{BD}},
-+{"bdnl",     BBO(16,BODNZ,0,1),		BBOATBI_MASK,  PWRCOM,	 PPCNONE,	{BD}},
-+{"bdnza-",   BBO(16,BODNZ,1,0),		BBOATBI_MASK,  PPCCOM,	 PPCNONE,	{BDMA}},
-+{"bdnza+",   BBO(16,BODNZ,1,0),		BBOATBI_MASK,  PPCCOM,	 PPCNONE,	{BDPA}},
-+{"bdnza",    BBO(16,BODNZ,1,0),		BBOATBI_MASK,  PPCCOM,	 PPCNONE,	{BDA}},
-+{"bdna",     BBO(16,BODNZ,1,0),		BBOATBI_MASK,  PWRCOM,	 PPCNONE,	{BDA}},
-+{"bdnzla-",  BBO(16,BODNZ,1,1),		BBOATBI_MASK,  PPCCOM,	 PPCNONE,	{BDMA}},
-+{"bdnzla+",  BBO(16,BODNZ,1,1),		BBOATBI_MASK,  PPCCOM,	 PPCNONE,	{BDPA}},
-+{"bdnzla",   BBO(16,BODNZ,1,1),		BBOATBI_MASK,  PPCCOM,	 PPCNONE,	{BDA}},
-+{"bdnla",    BBO(16,BODNZ,1,1),		BBOATBI_MASK,  PWRCOM,	 PPCNONE,	{BDA}},
-+{"bdz-",     BBO(16,BODZ,0,0),		BBOATBI_MASK,  PPCCOM,	 PPCNONE,	{BDM}},
-+{"bdz+",     BBO(16,BODZ,0,0),		BBOATBI_MASK,  PPCCOM,	 PPCNONE,	{BDP}},
-+{"bdz",      BBO(16,BODZ,0,0),		BBOATBI_MASK,  COM,	 PPCNONE,	{BD}},
-+{"bdzl-",    BBO(16,BODZ,0,1),		BBOATBI_MASK,  PPCCOM,	 PPCNONE,	{BDM}},
-+{"bdzl+",    BBO(16,BODZ,0,1),		BBOATBI_MASK,  PPCCOM,	 PPCNONE,	{BDP}},
-+{"bdzl",     BBO(16,BODZ,0,1),		BBOATBI_MASK,  COM,	 PPCNONE,	{BD}},
-+{"bdza-",    BBO(16,BODZ,1,0),		BBOATBI_MASK,  PPCCOM,	 PPCNONE,	{BDMA}},
-+{"bdza+",    BBO(16,BODZ,1,0),		BBOATBI_MASK,  PPCCOM,	 PPCNONE,	{BDPA}},
-+{"bdza",     BBO(16,BODZ,1,0),		BBOATBI_MASK,  COM,	 PPCNONE,	{BDA}},
-+{"bdzla-",   BBO(16,BODZ,1,1),		BBOATBI_MASK,  PPCCOM,	 PPCNONE,	{BDMA}},
-+{"bdzla+",   BBO(16,BODZ,1,1),		BBOATBI_MASK,  PPCCOM,	 PPCNONE,	{BDPA}},
-+{"bdzla",    BBO(16,BODZ,1,1),		BBOATBI_MASK,  COM,	 PPCNONE,	{BDA}},
-+
-+{"bge-",     BBOCB(16,BOF,CBLT,0,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDM}},
-+{"bge+",     BBOCB(16,BOF,CBLT,0,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDP}},
-+{"bge",      BBOCB(16,BOF,CBLT,0,0),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BD}},
-+{"bnl-",     BBOCB(16,BOF,CBLT,0,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDM}},
-+{"bnl+",     BBOCB(16,BOF,CBLT,0,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDP}},
-+{"bnl",      BBOCB(16,BOF,CBLT,0,0),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BD}},
-+{"bgel-",    BBOCB(16,BOF,CBLT,0,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDM}},
-+{"bgel+",    BBOCB(16,BOF,CBLT,0,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDP}},
-+{"bgel",     BBOCB(16,BOF,CBLT,0,1),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BD}},
-+{"bnll-",    BBOCB(16,BOF,CBLT,0,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDM}},
-+{"bnll+",    BBOCB(16,BOF,CBLT,0,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDP}},
-+{"bnll",     BBOCB(16,BOF,CBLT,0,1),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BD}},
-+{"bgea-",    BBOCB(16,BOF,CBLT,1,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDMA}},
-+{"bgea+",    BBOCB(16,BOF,CBLT,1,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDPA}},
-+{"bgea",     BBOCB(16,BOF,CBLT,1,0),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BDA}},
-+{"bnla-",    BBOCB(16,BOF,CBLT,1,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDMA}},
-+{"bnla+",    BBOCB(16,BOF,CBLT,1,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDPA}},
-+{"bnla",     BBOCB(16,BOF,CBLT,1,0),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BDA}},
-+{"bgela-",   BBOCB(16,BOF,CBLT,1,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDMA}},
-+{"bgela+",   BBOCB(16,BOF,CBLT,1,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDPA}},
-+{"bgela",    BBOCB(16,BOF,CBLT,1,1),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BDA}},
-+{"bnlla-",   BBOCB(16,BOF,CBLT,1,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDMA}},
-+{"bnlla+",   BBOCB(16,BOF,CBLT,1,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDPA}},
-+{"bnlla",    BBOCB(16,BOF,CBLT,1,1),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BDA}},
-+{"ble-",     BBOCB(16,BOF,CBGT,0,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDM}},
-+{"ble+",     BBOCB(16,BOF,CBGT,0,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDP}},
-+{"ble",      BBOCB(16,BOF,CBGT,0,0),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BD}},
-+{"bng-",     BBOCB(16,BOF,CBGT,0,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDM}},
-+{"bng+",     BBOCB(16,BOF,CBGT,0,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDP}},
-+{"bng",      BBOCB(16,BOF,CBGT,0,0),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BD}},
-+{"blel-",    BBOCB(16,BOF,CBGT,0,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDM}},
-+{"blel+",    BBOCB(16,BOF,CBGT,0,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDP}},
-+{"blel",     BBOCB(16,BOF,CBGT,0,1),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BD}},
-+{"bngl-",    BBOCB(16,BOF,CBGT,0,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDM}},
-+{"bngl+",    BBOCB(16,BOF,CBGT,0,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDP}},
-+{"bngl",     BBOCB(16,BOF,CBGT,0,1),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BD}},
-+{"blea-",    BBOCB(16,BOF,CBGT,1,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDMA}},
-+{"blea+",    BBOCB(16,BOF,CBGT,1,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDPA}},
-+{"blea",     BBOCB(16,BOF,CBGT,1,0),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BDA}},
-+{"bnga-",    BBOCB(16,BOF,CBGT,1,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDMA}},
-+{"bnga+",    BBOCB(16,BOF,CBGT,1,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDPA}},
-+{"bnga",     BBOCB(16,BOF,CBGT,1,0),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BDA}},
-+{"blela-",   BBOCB(16,BOF,CBGT,1,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDMA}},
-+{"blela+",   BBOCB(16,BOF,CBGT,1,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDPA}},
-+{"blela",    BBOCB(16,BOF,CBGT,1,1),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BDA}},
-+{"bngla-",   BBOCB(16,BOF,CBGT,1,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDMA}},
-+{"bngla+",   BBOCB(16,BOF,CBGT,1,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDPA}},
-+{"bngla",    BBOCB(16,BOF,CBGT,1,1),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BDA}},
-+{"bne-",     BBOCB(16,BOF,CBEQ,0,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDM}},
-+{"bne+",     BBOCB(16,BOF,CBEQ,0,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDP}},
-+{"bne",      BBOCB(16,BOF,CBEQ,0,0),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BD}},
-+{"bnel-",    BBOCB(16,BOF,CBEQ,0,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDM}},
-+{"bnel+",    BBOCB(16,BOF,CBEQ,0,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDP}},
-+{"bnel",     BBOCB(16,BOF,CBEQ,0,1),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BD}},
-+{"bnea-",    BBOCB(16,BOF,CBEQ,1,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDMA}},
-+{"bnea+",    BBOCB(16,BOF,CBEQ,1,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDPA}},
-+{"bnea",     BBOCB(16,BOF,CBEQ,1,0),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BDA}},
-+{"bnela-",   BBOCB(16,BOF,CBEQ,1,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDMA}},
-+{"bnela+",   BBOCB(16,BOF,CBEQ,1,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDPA}},
-+{"bnela",    BBOCB(16,BOF,CBEQ,1,1),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BDA}},
-+{"bns-",     BBOCB(16,BOF,CBSO,0,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDM}},
-+{"bns+",     BBOCB(16,BOF,CBSO,0,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDP}},
-+{"bns",      BBOCB(16,BOF,CBSO,0,0),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BD}},
-+{"bnu-",     BBOCB(16,BOF,CBSO,0,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDM}},
-+{"bnu+",     BBOCB(16,BOF,CBSO,0,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDP}},
-+{"bnu",      BBOCB(16,BOF,CBSO,0,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BD}},
-+{"bnsl-",    BBOCB(16,BOF,CBSO,0,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDM}},
-+{"bnsl+",    BBOCB(16,BOF,CBSO,0,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDP}},
-+{"bnsl",     BBOCB(16,BOF,CBSO,0,1),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BD}},
-+{"bnul-",    BBOCB(16,BOF,CBSO,0,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDM}},
-+{"bnul+",    BBOCB(16,BOF,CBSO,0,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDP}},
-+{"bnul",     BBOCB(16,BOF,CBSO,0,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BD}},
-+{"bnsa-",    BBOCB(16,BOF,CBSO,1,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDMA}},
-+{"bnsa+",    BBOCB(16,BOF,CBSO,1,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDPA}},
-+{"bnsa",     BBOCB(16,BOF,CBSO,1,0),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BDA}},
-+{"bnua-",    BBOCB(16,BOF,CBSO,1,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDMA}},
-+{"bnua+",    BBOCB(16,BOF,CBSO,1,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDPA}},
-+{"bnua",     BBOCB(16,BOF,CBSO,1,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDA}},
-+{"bnsla-",   BBOCB(16,BOF,CBSO,1,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDMA}},
-+{"bnsla+",   BBOCB(16,BOF,CBSO,1,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDPA}},
-+{"bnsla",    BBOCB(16,BOF,CBSO,1,1),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BDA}},
-+{"bnula-",   BBOCB(16,BOF,CBSO,1,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDMA}},
-+{"bnula+",   BBOCB(16,BOF,CBSO,1,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDPA}},
-+{"bnula",    BBOCB(16,BOF,CBSO,1,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDA}},
-+
-+{"blt-",     BBOCB(16,BOT,CBLT,0,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDM}},
-+{"blt+",     BBOCB(16,BOT,CBLT,0,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDP}},
-+{"blt",      BBOCB(16,BOT,CBLT,0,0),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BD}},
-+{"bltl-",    BBOCB(16,BOT,CBLT,0,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDM}},
-+{"bltl+",    BBOCB(16,BOT,CBLT,0,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDP}},
-+{"bltl",     BBOCB(16,BOT,CBLT,0,1),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BD}},
-+{"blta-",    BBOCB(16,BOT,CBLT,1,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDMA}},
-+{"blta+",    BBOCB(16,BOT,CBLT,1,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDPA}},
-+{"blta",     BBOCB(16,BOT,CBLT,1,0),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BDA}},
-+{"bltla-",   BBOCB(16,BOT,CBLT,1,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDMA}},
-+{"bltla+",   BBOCB(16,BOT,CBLT,1,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDPA}},
-+{"bltla",    BBOCB(16,BOT,CBLT,1,1),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BDA}},
-+{"bgt-",     BBOCB(16,BOT,CBGT,0,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDM}},
-+{"bgt+",     BBOCB(16,BOT,CBGT,0,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDP}},
-+{"bgt",      BBOCB(16,BOT,CBGT,0,0),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BD}},
-+{"bgtl-",    BBOCB(16,BOT,CBGT,0,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDM}},
-+{"bgtl+",    BBOCB(16,BOT,CBGT,0,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDP}},
-+{"bgtl",     BBOCB(16,BOT,CBGT,0,1),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BD}},
-+{"bgta-",    BBOCB(16,BOT,CBGT,1,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDMA}},
-+{"bgta+",    BBOCB(16,BOT,CBGT,1,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDPA}},
-+{"bgta",     BBOCB(16,BOT,CBGT,1,0),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BDA}},
-+{"bgtla-",   BBOCB(16,BOT,CBGT,1,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDMA}},
-+{"bgtla+",   BBOCB(16,BOT,CBGT,1,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDPA}},
-+{"bgtla",    BBOCB(16,BOT,CBGT,1,1),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BDA}},
-+{"beq-",     BBOCB(16,BOT,CBEQ,0,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDM}},
-+{"beq+",     BBOCB(16,BOT,CBEQ,0,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDP}},
-+{"beq",      BBOCB(16,BOT,CBEQ,0,0),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BD}},
-+{"beql-",    BBOCB(16,BOT,CBEQ,0,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDM}},
-+{"beql+",    BBOCB(16,BOT,CBEQ,0,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDP}},
-+{"beql",     BBOCB(16,BOT,CBEQ,0,1),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BD}},
-+{"beqa-",    BBOCB(16,BOT,CBEQ,1,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDMA}},
-+{"beqa+",    BBOCB(16,BOT,CBEQ,1,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDPA}},
-+{"beqa",     BBOCB(16,BOT,CBEQ,1,0),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BDA}},
-+{"beqla-",   BBOCB(16,BOT,CBEQ,1,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDMA}},
-+{"beqla+",   BBOCB(16,BOT,CBEQ,1,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDPA}},
-+{"beqla",    BBOCB(16,BOT,CBEQ,1,1),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BDA}},
-+{"bso-",     BBOCB(16,BOT,CBSO,0,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDM}},
-+{"bso+",     BBOCB(16,BOT,CBSO,0,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDP}},
-+{"bso",      BBOCB(16,BOT,CBSO,0,0),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BD}},
-+{"bun-",     BBOCB(16,BOT,CBSO,0,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDM}},
-+{"bun+",     BBOCB(16,BOT,CBSO,0,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDP}},
-+{"bun",      BBOCB(16,BOT,CBSO,0,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BD}},
-+{"bsol-",    BBOCB(16,BOT,CBSO,0,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDM}},
-+{"bsol+",    BBOCB(16,BOT,CBSO,0,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDP}},
-+{"bsol",     BBOCB(16,BOT,CBSO,0,1),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BD}},
-+{"bunl-",    BBOCB(16,BOT,CBSO,0,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDM}},
-+{"bunl+",    BBOCB(16,BOT,CBSO,0,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDP}},
-+{"bunl",     BBOCB(16,BOT,CBSO,0,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BD}},
-+{"bsoa-",    BBOCB(16,BOT,CBSO,1,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDMA}},
-+{"bsoa+",    BBOCB(16,BOT,CBSO,1,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDPA}},
-+{"bsoa",     BBOCB(16,BOT,CBSO,1,0),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BDA}},
-+{"buna-",    BBOCB(16,BOT,CBSO,1,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDMA}},
-+{"buna+",    BBOCB(16,BOT,CBSO,1,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDPA}},
-+{"buna",     BBOCB(16,BOT,CBSO,1,0),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDA}},
-+{"bsola-",   BBOCB(16,BOT,CBSO,1,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDMA}},
-+{"bsola+",   BBOCB(16,BOT,CBSO,1,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDPA}},
-+{"bsola",    BBOCB(16,BOT,CBSO,1,1),	BBOATCB_MASK,  COM,	 PPCNONE,	{CR, BDA}},
-+{"bunla-",   BBOCB(16,BOT,CBSO,1,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDMA}},
-+{"bunla+",   BBOCB(16,BOT,CBSO,1,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDPA}},
-+{"bunla",    BBOCB(16,BOT,CBSO,1,1),	BBOATCB_MASK,  PPCCOM,	 PPCNONE,	{CR, BDA}},
-+
-+{"bdnzf-",   BBO(16,BODNZF,0,0),	BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDM}},
-+{"bdnzf+",   BBO(16,BODNZF,0,0),	BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDP}},
-+{"bdnzf",    BBO(16,BODNZF,0,0),	BBOY_MASK,     PPCCOM,	 PPCNONE,	{BI, BD}},
-+{"bdnzfl-",  BBO(16,BODNZF,0,1),	BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDM}},
-+{"bdnzfl+",  BBO(16,BODNZF,0,1),	BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDP}},
-+{"bdnzfl",   BBO(16,BODNZF,0,1),	BBOY_MASK,     PPCCOM,	 PPCNONE,	{BI, BD}},
-+{"bdnzfa-",  BBO(16,BODNZF,1,0),	BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDMA}},
-+{"bdnzfa+",  BBO(16,BODNZF,1,0),	BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDPA}},
-+{"bdnzfa",   BBO(16,BODNZF,1,0),	BBOY_MASK,     PPCCOM,	 PPCNONE,	{BI, BDA}},
-+{"bdnzfla-", BBO(16,BODNZF,1,1),	BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDMA}},
-+{"bdnzfla+", BBO(16,BODNZF,1,1),	BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDPA}},
-+{"bdnzfla",  BBO(16,BODNZF,1,1),	BBOY_MASK,     PPCCOM,	 PPCNONE,	{BI, BDA}},
-+{"bdzf-",    BBO(16,BODZF,0,0),		BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDM}},
-+{"bdzf+",    BBO(16,BODZF,0,0),		BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDP}},
-+{"bdzf",     BBO(16,BODZF,0,0),		BBOY_MASK,     PPCCOM,	 PPCNONE,	{BI, BD}},
-+{"bdzfl-",   BBO(16,BODZF,0,1),		BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDM}},
-+{"bdzfl+",   BBO(16,BODZF,0,1),		BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDP}},
-+{"bdzfl",    BBO(16,BODZF,0,1),		BBOY_MASK,     PPCCOM,	 PPCNONE,	{BI, BD}},
-+{"bdzfa-",   BBO(16,BODZF,1,0),		BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDMA}},
-+{"bdzfa+",   BBO(16,BODZF,1,0),		BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDPA}},
-+{"bdzfa",    BBO(16,BODZF,1,0),		BBOY_MASK,     PPCCOM,	 PPCNONE,	{BI, BDA}},
-+{"bdzfla-",  BBO(16,BODZF,1,1),		BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDMA}},
-+{"bdzfla+",  BBO(16,BODZF,1,1),		BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDPA}},
-+{"bdzfla",   BBO(16,BODZF,1,1),		BBOY_MASK,     PPCCOM,	 PPCNONE,	{BI, BDA}},
-+
-+{"bf-",      BBO(16,BOF,0,0),		BBOAT_MASK,    PPCCOM,	 PPCNONE,	{BI, BDM}},
-+{"bf+",      BBO(16,BOF,0,0),		BBOAT_MASK,    PPCCOM,	 PPCNONE,	{BI, BDP}},
-+{"bf",	     BBO(16,BOF,0,0),		BBOAT_MASK,    PPCCOM,	 PPCNONE,	{BI, BD}},
-+{"bbf",      BBO(16,BOF,0,0),		BBOAT_MASK,    PWRCOM,	 PPCNONE,	{BI, BD}},
-+{"bfl-",     BBO(16,BOF,0,1),		BBOAT_MASK,    PPCCOM,	 PPCNONE,	{BI, BDM}},
-+{"bfl+",     BBO(16,BOF,0,1),		BBOAT_MASK,    PPCCOM,	 PPCNONE,	{BI, BDP}},
-+{"bfl",      BBO(16,BOF,0,1),		BBOAT_MASK,    PPCCOM,	 PPCNONE,	{BI, BD}},
-+{"bbfl",     BBO(16,BOF,0,1),		BBOAT_MASK,    PWRCOM,	 PPCNONE,	{BI, BD}},
-+{"bfa-",     BBO(16,BOF,1,0),		BBOAT_MASK,    PPCCOM,	 PPCNONE,	{BI, BDMA}},
-+{"bfa+",     BBO(16,BOF,1,0),		BBOAT_MASK,    PPCCOM,	 PPCNONE,	{BI, BDPA}},
-+{"bfa",      BBO(16,BOF,1,0),		BBOAT_MASK,    PPCCOM,	 PPCNONE,	{BI, BDA}},
-+{"bbfa",     BBO(16,BOF,1,0),		BBOAT_MASK,    PWRCOM,	 PPCNONE,	{BI, BDA}},
-+{"bfla-",    BBO(16,BOF,1,1),		BBOAT_MASK,    PPCCOM,	 PPCNONE,	{BI, BDMA}},
-+{"bfla+",    BBO(16,BOF,1,1),		BBOAT_MASK,    PPCCOM,	 PPCNONE,	{BI, BDPA}},
-+{"bfla",     BBO(16,BOF,1,1),		BBOAT_MASK,    PPCCOM,	 PPCNONE,	{BI, BDA}},
-+{"bbfla",    BBO(16,BOF,1,1),		BBOAT_MASK,    PWRCOM,	 PPCNONE,	{BI, BDA}},
-+
-+{"bdnzt-",   BBO(16,BODNZT,0,0),	BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDM}},
-+{"bdnzt+",   BBO(16,BODNZT,0,0),	BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDP}},
-+{"bdnzt",    BBO(16,BODNZT,0,0),	BBOY_MASK,     PPCCOM,	 PPCNONE,	{BI, BD}},
-+{"bdnztl-",  BBO(16,BODNZT,0,1),	BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDM}},
-+{"bdnztl+",  BBO(16,BODNZT,0,1),	BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDP}},
-+{"bdnztl",   BBO(16,BODNZT,0,1),	BBOY_MASK,     PPCCOM,	 PPCNONE,	{BI, BD}},
-+{"bdnzta-",  BBO(16,BODNZT,1,0),	BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDMA}},
-+{"bdnzta+",  BBO(16,BODNZT,1,0),	BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDPA}},
-+{"bdnzta",   BBO(16,BODNZT,1,0),	BBOY_MASK,     PPCCOM,	 PPCNONE,	{BI, BDA}},
-+{"bdnztla-", BBO(16,BODNZT,1,1),	BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDMA}},
-+{"bdnztla+", BBO(16,BODNZT,1,1),	BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDPA}},
-+{"bdnztla",  BBO(16,BODNZT,1,1),	BBOY_MASK,     PPCCOM,	 PPCNONE,	{BI, BDA}},
-+{"bdzt-",    BBO(16,BODZT,0,0),		BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDM}},
-+{"bdzt+",    BBO(16,BODZT,0,0),		BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDP}},
-+{"bdzt",     BBO(16,BODZT,0,0),		BBOY_MASK,     PPCCOM,	 PPCNONE,	{BI, BD}},
-+{"bdztl-",   BBO(16,BODZT,0,1),		BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDM}},
-+{"bdztl+",   BBO(16,BODZT,0,1),		BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDP}},
-+{"bdztl",    BBO(16,BODZT,0,1),		BBOY_MASK,     PPCCOM,	 PPCNONE,	{BI, BD}},
-+{"bdzta-",   BBO(16,BODZT,1,0),		BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDMA}},
-+{"bdzta+",   BBO(16,BODZT,1,0),		BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDPA}},
-+{"bdzta",    BBO(16,BODZT,1,0),		BBOY_MASK,     PPCCOM,	 PPCNONE,	{BI, BDA}},
-+{"bdztla-",  BBO(16,BODZT,1,1),		BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDMA}},
-+{"bdztla+",  BBO(16,BODZT,1,1),		BBOY_MASK,     PPCCOM,   POWER4,	{BI, BDPA}},
-+{"bdztla",   BBO(16,BODZT,1,1),		BBOY_MASK,     PPCCOM,	 PPCNONE,	{BI, BDA}},
-+
-+{"bt-",      BBO(16,BOT,0,0),		BBOAT_MASK,    PPCCOM,	 PPCNONE,	{BI, BDM}},
-+{"bt+",      BBO(16,BOT,0,0),		BBOAT_MASK,    PPCCOM,	 PPCNONE,	{BI, BDP}},
-+{"bt",	     BBO(16,BOT,0,0),		BBOAT_MASK,    PPCCOM,	 PPCNONE,	{BI, BD}},
-+{"bbt",      BBO(16,BOT,0,0),		BBOAT_MASK,    PWRCOM,	 PPCNONE,	{BI, BD}},
-+{"btl-",     BBO(16,BOT,0,1),		BBOAT_MASK,    PPCCOM,	 PPCNONE,	{BI, BDM}},
-+{"btl+",     BBO(16,BOT,0,1),		BBOAT_MASK,    PPCCOM,	 PPCNONE,	{BI, BDP}},
-+{"btl",      BBO(16,BOT,0,1),		BBOAT_MASK,    PPCCOM,	 PPCNONE,	{BI, BD}},
-+{"bbtl",     BBO(16,BOT,0,1),		BBOAT_MASK,    PWRCOM,	 PPCNONE,	{BI, BD}},
-+{"bta-",     BBO(16,BOT,1,0),		BBOAT_MASK,    PPCCOM,	 PPCNONE,	{BI, BDMA}},
-+{"bta+",     BBO(16,BOT,1,0),		BBOAT_MASK,    PPCCOM,	 PPCNONE,	{BI, BDPA}},
-+{"bta",      BBO(16,BOT,1,0),		BBOAT_MASK,    PPCCOM,	 PPCNONE,	{BI, BDA}},
-+{"bbta",     BBO(16,BOT,1,0),		BBOAT_MASK,    PWRCOM,	 PPCNONE,	{BI, BDA}},
-+{"btla-",    BBO(16,BOT,1,1),		BBOAT_MASK,    PPCCOM,	 PPCNONE,	{BI, BDMA}},
-+{"btla+",    BBO(16,BOT,1,1),		BBOAT_MASK,    PPCCOM,	 PPCNONE,	{BI, BDPA}},
-+{"btla",     BBO(16,BOT,1,1),		BBOAT_MASK,    PPCCOM,	 PPCNONE,	{BI, BDA}},
-+{"bbtla",    BBO(16,BOT,1,1),		BBOAT_MASK,    PWRCOM,	 PPCNONE,	{BI, BDA}},
-+
-+{"bc-",		B(16,0,0),	B_MASK,      PPCCOM,	PPCNONE,	{BOE, BI, BDM}},
-+{"bc+",		B(16,0,0),	B_MASK,      PPCCOM,	PPCNONE,	{BOE, BI, BDP}},
-+{"bc",		B(16,0,0),	B_MASK,      COM,	PPCNONE,	{BO, BI, BD}},
-+{"bcl-",	B(16,0,1),	B_MASK,      PPCCOM,	PPCNONE,	{BOE, BI, BDM}},
-+{"bcl+",	B(16,0,1),	B_MASK,      PPCCOM,	PPCNONE,	{BOE, BI, BDP}},
-+{"bcl",		B(16,0,1),	B_MASK,      COM,	PPCNONE,	{BO, BI, BD}},
-+{"bca-",	B(16,1,0),	B_MASK,      PPCCOM,	PPCNONE,	{BOE, BI, BDMA}},
-+{"bca+",	B(16,1,0),	B_MASK,      PPCCOM,	PPCNONE,	{BOE, BI, BDPA}},
-+{"bca",		B(16,1,0),	B_MASK,      COM,	PPCNONE,	{BO, BI, BDA}},
-+{"bcla-",	B(16,1,1),	B_MASK,      PPCCOM,	PPCNONE,	{BOE, BI, BDMA}},
-+{"bcla+",	B(16,1,1),	B_MASK,      PPCCOM,	PPCNONE,	{BOE, BI, BDPA}},
-+{"bcla",	B(16,1,1),	B_MASK,      COM,	PPCNONE,	{BO, BI, BDA}},
-+
-+{"svc",		SC(17,0,0),	SC_MASK,     POWER,	PPCNONE,	{SVC_LEV, FL1, FL2}},
-+{"svcl",	SC(17,0,1),	SC_MASK,     POWER,	PPCNONE,	{SVC_LEV, FL1, FL2}},
-+{"sc",		SC(17,1,0),	SC_MASK,     PPC,	PPCNONE,	{LEV}},
-+{"svca",	SC(17,1,0),	SC_MASK,     PWRCOM,	PPCNONE,	{SV}},
-+{"svcla",	SC(17,1,1),	SC_MASK,     POWER,	PPCNONE,	{SV}},
-+
-+{"b",		B(18,0,0),	B_MASK,      COM,	PPCNONE,	{LI}},
-+{"bl",		B(18,0,1),	B_MASK,      COM,	PPCNONE,	{LI}},
-+{"ba",		B(18,1,0),	B_MASK,      COM,	PPCNONE,	{LIA}},
-+{"bla",		B(18,1,1),	B_MASK,      COM,	PPCNONE,	{LIA}},
-+
-+{"mcrf",      XL(19,0), XLBB_MASK|(3<<21)|(3<<16), COM,	PPCNONE,	{BF, BFA}},
-+
-+{"bdnzlr",   XLO(19,BODNZ,16,0),	XLBOBIBB_MASK, PPCCOM,	 PPCNONE,	{0}},
-+{"bdnzlr-",  XLO(19,BODNZ,16,0),	XLBOBIBB_MASK, PPCCOM,   POWER4,	{0}},
-+{"bdnzlrl",  XLO(19,BODNZ,16,1),	XLBOBIBB_MASK, PPCCOM,	 PPCNONE,	{0}},
-+{"bdnzlrl-", XLO(19,BODNZ,16,1),	XLBOBIBB_MASK, PPCCOM,   POWER4,	{0}},
-+{"bdnzlr+",  XLO(19,BODNZP,16,0),	XLBOBIBB_MASK, PPCCOM,   POWER4,	{0}},
-+{"bdnzlrl+", XLO(19,BODNZP,16,1),	XLBOBIBB_MASK, PPCCOM,   POWER4,	{0}},
-+{"bdzlr",    XLO(19,BODZ,16,0),		XLBOBIBB_MASK, PPCCOM,	 PPCNONE,	{0}},
-+{"bdzlr-",   XLO(19,BODZ,16,0),		XLBOBIBB_MASK, PPCCOM,   POWER4,	{0}},
-+{"bdzlrl",   XLO(19,BODZ,16,1),		XLBOBIBB_MASK, PPCCOM,	 PPCNONE,	{0}},
-+{"bdzlrl-",  XLO(19,BODZ,16,1),		XLBOBIBB_MASK, PPCCOM,   POWER4,	{0}},
-+{"bdzlr+",   XLO(19,BODZP,16,0),	XLBOBIBB_MASK, PPCCOM,   POWER4,	{0}},
-+{"bdzlrl+",  XLO(19,BODZP,16,1),	XLBOBIBB_MASK, PPCCOM,   POWER4,	{0}},
-+{"blr",      XLO(19,BOU,16,0),		XLBOBIBB_MASK, PPCCOM,	 PPCNONE,	{0}},
-+{"br",	     XLO(19,BOU,16,0),		XLBOBIBB_MASK, PWRCOM,	 PPCNONE,	{0}},
-+{"blrl",     XLO(19,BOU,16,1),		XLBOBIBB_MASK, PPCCOM,	 PPCNONE,	{0}},
-+{"brl",      XLO(19,BOU,16,1),		XLBOBIBB_MASK, PWRCOM,	 PPCNONE,	{0}},
-+{"bdnzlr-",  XLO(19,BODNZM4,16,0),	XLBOBIBB_MASK, POWER4,	 PPCNONE,	{0}},
-+{"bdnzlrl-", XLO(19,BODNZM4,16,1),	XLBOBIBB_MASK, POWER4,	 PPCNONE,	{0}},
-+{"bdnzlr+",  XLO(19,BODNZP4,16,0),	XLBOBIBB_MASK, POWER4,	 PPCNONE,	{0}},
-+{"bdnzlrl+", XLO(19,BODNZP4,16,1),	XLBOBIBB_MASK, POWER4,	 PPCNONE,	{0}},
-+{"bdzlr-",   XLO(19,BODZM4,16,0),	XLBOBIBB_MASK, POWER4,	 PPCNONE,	{0}},
-+{"bdzlrl-",  XLO(19,BODZM4,16,1),	XLBOBIBB_MASK, POWER4,	 PPCNONE,	{0}},
-+{"bdzlr+",   XLO(19,BODZP4,16,0),	XLBOBIBB_MASK, POWER4,	 PPCNONE,	{0}},
-+{"bdzlrl+",  XLO(19,BODZP4,16,1),	XLBOBIBB_MASK, POWER4,	 PPCNONE,	{0}},
-+
-+{"bgelr",    XLOCB(19,BOF,CBLT,16,0),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bgelr-",   XLOCB(19,BOF,CBLT,16,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bger",     XLOCB(19,BOF,CBLT,16,0),	XLBOCBBB_MASK, PWRCOM,	 PPCNONE,	{CR}},
-+{"bnllr",    XLOCB(19,BOF,CBLT,16,0),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bnllr-",   XLOCB(19,BOF,CBLT,16,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnlr",     XLOCB(19,BOF,CBLT,16,0),	XLBOCBBB_MASK, PWRCOM,	 PPCNONE,	{CR}},
-+{"bgelrl",   XLOCB(19,BOF,CBLT,16,1),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bgelrl-",  XLOCB(19,BOF,CBLT,16,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bgerl",    XLOCB(19,BOF,CBLT,16,1),	XLBOCBBB_MASK, PWRCOM,	 PPCNONE,	{CR}},
-+{"bnllrl",   XLOCB(19,BOF,CBLT,16,1),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bnllrl-",  XLOCB(19,BOF,CBLT,16,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnlrl",    XLOCB(19,BOF,CBLT,16,1),	XLBOCBBB_MASK, PWRCOM,	 PPCNONE,	{CR}},
-+{"blelr",    XLOCB(19,BOF,CBGT,16,0),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"blelr-",   XLOCB(19,BOF,CBGT,16,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bler",     XLOCB(19,BOF,CBGT,16,0),	XLBOCBBB_MASK, PWRCOM,	 PPCNONE,	{CR}},
-+{"bnglr",    XLOCB(19,BOF,CBGT,16,0),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bnglr-",   XLOCB(19,BOF,CBGT,16,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bngr",     XLOCB(19,BOF,CBGT,16,0),	XLBOCBBB_MASK, PWRCOM,	 PPCNONE,	{CR}},
-+{"blelrl",   XLOCB(19,BOF,CBGT,16,1),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"blelrl-",  XLOCB(19,BOF,CBGT,16,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"blerl",    XLOCB(19,BOF,CBGT,16,1),	XLBOCBBB_MASK, PWRCOM,	 PPCNONE,	{CR}},
-+{"bnglrl",   XLOCB(19,BOF,CBGT,16,1),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bnglrl-",  XLOCB(19,BOF,CBGT,16,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bngrl",    XLOCB(19,BOF,CBGT,16,1),	XLBOCBBB_MASK, PWRCOM,	 PPCNONE,	{CR}},
-+{"bnelr",    XLOCB(19,BOF,CBEQ,16,0),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bnelr-",   XLOCB(19,BOF,CBEQ,16,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bner",     XLOCB(19,BOF,CBEQ,16,0),	XLBOCBBB_MASK, PWRCOM,	 PPCNONE,	{CR}},
-+{"bnelrl",   XLOCB(19,BOF,CBEQ,16,1),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bnelrl-",  XLOCB(19,BOF,CBEQ,16,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnerl",    XLOCB(19,BOF,CBEQ,16,1),	XLBOCBBB_MASK, PWRCOM,	 PPCNONE,	{CR}},
-+{"bnslr",    XLOCB(19,BOF,CBSO,16,0),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bnslr-",   XLOCB(19,BOF,CBSO,16,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnsr",     XLOCB(19,BOF,CBSO,16,0),	XLBOCBBB_MASK, PWRCOM,	 PPCNONE,	{CR}},
-+{"bnulr",    XLOCB(19,BOF,CBSO,16,0),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bnulr-",   XLOCB(19,BOF,CBSO,16,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnslrl",   XLOCB(19,BOF,CBSO,16,1),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bnslrl-",  XLOCB(19,BOF,CBSO,16,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnsrl",    XLOCB(19,BOF,CBSO,16,1),	XLBOCBBB_MASK, PWRCOM,	 PPCNONE,	{CR}},
-+{"bnulrl",   XLOCB(19,BOF,CBSO,16,1),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bnulrl-",  XLOCB(19,BOF,CBSO,16,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bgelr+",   XLOCB(19,BOFP,CBLT,16,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnllr+",   XLOCB(19,BOFP,CBLT,16,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bgelrl+",  XLOCB(19,BOFP,CBLT,16,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnllrl+",  XLOCB(19,BOFP,CBLT,16,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"blelr+",   XLOCB(19,BOFP,CBGT,16,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnglr+",   XLOCB(19,BOFP,CBGT,16,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"blelrl+",  XLOCB(19,BOFP,CBGT,16,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnglrl+",  XLOCB(19,BOFP,CBGT,16,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnelr+",   XLOCB(19,BOFP,CBEQ,16,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnelrl+",  XLOCB(19,BOFP,CBEQ,16,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnslr+",   XLOCB(19,BOFP,CBSO,16,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnulr+",   XLOCB(19,BOFP,CBSO,16,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnslrl+",  XLOCB(19,BOFP,CBSO,16,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnulrl+",  XLOCB(19,BOFP,CBSO,16,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bgelr-",   XLOCB(19,BOFM4,CBLT,16,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnllr-",   XLOCB(19,BOFM4,CBLT,16,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bgelrl-",  XLOCB(19,BOFM4,CBLT,16,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnllrl-",  XLOCB(19,BOFM4,CBLT,16,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"blelr-",   XLOCB(19,BOFM4,CBGT,16,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnglr-",   XLOCB(19,BOFM4,CBGT,16,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"blelrl-",  XLOCB(19,BOFM4,CBGT,16,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnglrl-",  XLOCB(19,BOFM4,CBGT,16,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnelr-",   XLOCB(19,BOFM4,CBEQ,16,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnelrl-",  XLOCB(19,BOFM4,CBEQ,16,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnslr-",   XLOCB(19,BOFM4,CBSO,16,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnulr-",   XLOCB(19,BOFM4,CBSO,16,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnslrl-",  XLOCB(19,BOFM4,CBSO,16,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnulrl-",  XLOCB(19,BOFM4,CBSO,16,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bgelr+",   XLOCB(19,BOFP4,CBLT,16,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnllr+",   XLOCB(19,BOFP4,CBLT,16,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bgelrl+",  XLOCB(19,BOFP4,CBLT,16,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnllrl+",  XLOCB(19,BOFP4,CBLT,16,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"blelr+",   XLOCB(19,BOFP4,CBGT,16,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnglr+",   XLOCB(19,BOFP4,CBGT,16,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"blelrl+",  XLOCB(19,BOFP4,CBGT,16,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnglrl+",  XLOCB(19,BOFP4,CBGT,16,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnelr+",   XLOCB(19,BOFP4,CBEQ,16,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnelrl+",  XLOCB(19,BOFP4,CBEQ,16,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnslr+",   XLOCB(19,BOFP4,CBSO,16,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnulr+",   XLOCB(19,BOFP4,CBSO,16,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnslrl+",  XLOCB(19,BOFP4,CBSO,16,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnulrl+",  XLOCB(19,BOFP4,CBSO,16,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bltlr",    XLOCB(19,BOT,CBLT,16,0),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bltlr-",   XLOCB(19,BOT,CBLT,16,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bltr",     XLOCB(19,BOT,CBLT,16,0),	XLBOCBBB_MASK, PWRCOM,	 PPCNONE,	{CR}},
-+{"bltlrl",   XLOCB(19,BOT,CBLT,16,1),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bltlrl-",  XLOCB(19,BOT,CBLT,16,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bltrl",    XLOCB(19,BOT,CBLT,16,1),	XLBOCBBB_MASK, PWRCOM,	 PPCNONE,	{CR}},
-+{"bgtlr",    XLOCB(19,BOT,CBGT,16,0),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bgtlr-",   XLOCB(19,BOT,CBGT,16,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bgtr",     XLOCB(19,BOT,CBGT,16,0),	XLBOCBBB_MASK, PWRCOM,	 PPCNONE,	{CR}},
-+{"bgtlrl",   XLOCB(19,BOT,CBGT,16,1),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bgtlrl-",  XLOCB(19,BOT,CBGT,16,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bgtrl",    XLOCB(19,BOT,CBGT,16,1),	XLBOCBBB_MASK, PWRCOM,	 PPCNONE,	{CR}},
-+{"beqlr",    XLOCB(19,BOT,CBEQ,16,0),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"beqlr-",   XLOCB(19,BOT,CBEQ,16,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"beqr",     XLOCB(19,BOT,CBEQ,16,0),	XLBOCBBB_MASK, PWRCOM,	 PPCNONE,	{CR}},
-+{"beqlrl",   XLOCB(19,BOT,CBEQ,16,1),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"beqlrl-",  XLOCB(19,BOT,CBEQ,16,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"beqrl",    XLOCB(19,BOT,CBEQ,16,1),	XLBOCBBB_MASK, PWRCOM,	 PPCNONE,	{CR}},
-+{"bsolr",    XLOCB(19,BOT,CBSO,16,0),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bsolr-",   XLOCB(19,BOT,CBSO,16,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bsor",     XLOCB(19,BOT,CBSO,16,0),	XLBOCBBB_MASK, PWRCOM,	 PPCNONE,	{CR}},
-+{"bunlr",    XLOCB(19,BOT,CBSO,16,0),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bunlr-",   XLOCB(19,BOT,CBSO,16,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bsolrl",   XLOCB(19,BOT,CBSO,16,1),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bsolrl-",  XLOCB(19,BOT,CBSO,16,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bsorl",    XLOCB(19,BOT,CBSO,16,1),	XLBOCBBB_MASK, PWRCOM,	 PPCNONE,	{CR}},
-+{"bunlrl",   XLOCB(19,BOT,CBSO,16,1),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bunlrl-",  XLOCB(19,BOT,CBSO,16,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bltlr+",   XLOCB(19,BOTP,CBLT,16,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bltlrl+",  XLOCB(19,BOTP,CBLT,16,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bgtlr+",   XLOCB(19,BOTP,CBGT,16,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bgtlrl+",  XLOCB(19,BOTP,CBGT,16,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"beqlr+",   XLOCB(19,BOTP,CBEQ,16,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"beqlrl+",  XLOCB(19,BOTP,CBEQ,16,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bsolr+",   XLOCB(19,BOTP,CBSO,16,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bunlr+",   XLOCB(19,BOTP,CBSO,16,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bsolrl+",  XLOCB(19,BOTP,CBSO,16,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bunlrl+",  XLOCB(19,BOTP,CBSO,16,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bltlr-",   XLOCB(19,BOTM4,CBLT,16,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bltlrl-",  XLOCB(19,BOTM4,CBLT,16,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bgtlr-",   XLOCB(19,BOTM4,CBGT,16,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bgtlrl-",  XLOCB(19,BOTM4,CBGT,16,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"beqlr-",   XLOCB(19,BOTM4,CBEQ,16,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"beqlrl-",  XLOCB(19,BOTM4,CBEQ,16,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bsolr-",   XLOCB(19,BOTM4,CBSO,16,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bunlr-",   XLOCB(19,BOTM4,CBSO,16,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bsolrl-",  XLOCB(19,BOTM4,CBSO,16,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bunlrl-",  XLOCB(19,BOTM4,CBSO,16,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bltlr+",   XLOCB(19,BOTP4,CBLT,16,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bltlrl+",  XLOCB(19,BOTP4,CBLT,16,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bgtlr+",   XLOCB(19,BOTP4,CBGT,16,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bgtlrl+",  XLOCB(19,BOTP4,CBGT,16,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"beqlr+",   XLOCB(19,BOTP4,CBEQ,16,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"beqlrl+",  XLOCB(19,BOTP4,CBEQ,16,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bsolr+",   XLOCB(19,BOTP4,CBSO,16,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bunlr+",   XLOCB(19,BOTP4,CBSO,16,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bsolrl+",  XLOCB(19,BOTP4,CBSO,16,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bunlrl+",  XLOCB(19,BOTP4,CBSO,16,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+
-+{"bdnzflr",  XLO(19,BODNZF,16,0),	XLBOBB_MASK,   PPCCOM,	 PPCNONE,	{BI}},
-+{"bdnzflr-", XLO(19,BODNZF,16,0),	XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"bdnzflrl", XLO(19,BODNZF,16,1),	XLBOBB_MASK,   PPCCOM,	 PPCNONE,	{BI}},
-+{"bdnzflrl-",XLO(19,BODNZF,16,1),	XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"bdnzflr+", XLO(19,BODNZFP,16,0),	XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"bdnzflrl+",XLO(19,BODNZFP,16,1),	XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"bdzflr",   XLO(19,BODZF,16,0),	XLBOBB_MASK,   PPCCOM,	 PPCNONE,	{BI}},
-+{"bdzflr-",  XLO(19,BODZF,16,0),	XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"bdzflrl",  XLO(19,BODZF,16,1),	XLBOBB_MASK,   PPCCOM,	 PPCNONE,	{BI}},
-+{"bdzflrl-", XLO(19,BODZF,16,1),	XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"bdzflr+",  XLO(19,BODZFP,16,0),	XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"bdzflrl+", XLO(19,BODZFP,16,1),	XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"bflr",     XLO(19,BOF,16,0),		XLBOBB_MASK,   PPCCOM,	 PPCNONE,	{BI}},
-+{"bflr-",    XLO(19,BOF,16,0),		XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"bbfr",     XLO(19,BOF,16,0),		XLBOBB_MASK,   PWRCOM,	 PPCNONE,	{BI}},
-+{"bflrl",    XLO(19,BOF,16,1),		XLBOBB_MASK,   PPCCOM,	 PPCNONE,	{BI}},
-+{"bflrl-",   XLO(19,BOF,16,1),		XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"bbfrl",    XLO(19,BOF,16,1),		XLBOBB_MASK,   PWRCOM,	 PPCNONE,	{BI}},
-+{"bflr+",    XLO(19,BOFP,16,0),		XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"bflrl+",   XLO(19,BOFP,16,1),		XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"bflr-",    XLO(19,BOFM4,16,0),	XLBOBB_MASK,   POWER4,	 PPCNONE,	{BI}},
-+{"bflrl-",   XLO(19,BOFM4,16,1),	XLBOBB_MASK,   POWER4,	 PPCNONE,	{BI}},
-+{"bflr+",    XLO(19,BOFP4,16,0),	XLBOBB_MASK,   POWER4,	 PPCNONE,	{BI}},
-+{"bflrl+",   XLO(19,BOFP4,16,1),	XLBOBB_MASK,   POWER4,	 PPCNONE,	{BI}},
-+{"bdnztlr",  XLO(19,BODNZT,16,0),	XLBOBB_MASK,   PPCCOM,	 PPCNONE,	{BI}},
-+{"bdnztlr-", XLO(19,BODNZT,16,0),	XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"bdnztlrl", XLO(19,BODNZT,16,1),	XLBOBB_MASK,   PPCCOM,	 PPCNONE,	{BI}},
-+{"bdnztlrl-",XLO(19,BODNZT,16,1),	XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"bdnztlr+", XLO(19,BODNZTP,16,0),	XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"bdnztlrl+",XLO(19,BODNZTP,16,1),	XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"bdztlr",   XLO(19,BODZT,16,0),	XLBOBB_MASK,   PPCCOM,	 PPCNONE,	{BI}},
-+{"bdztlr-",  XLO(19,BODZT,16,0),	XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"bdztlrl",  XLO(19,BODZT,16,1),	XLBOBB_MASK,   PPCCOM,	 PPCNONE,	{BI}},
-+{"bdztlrl-", XLO(19,BODZT,16,1),	XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"bdztlr+",  XLO(19,BODZTP,16,0),	XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"bdztlrl+", XLO(19,BODZTP,16,1),	XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"btlr",     XLO(19,BOT,16,0),		XLBOBB_MASK,   PPCCOM,	 PPCNONE,	{BI}},
-+{"btlr-",    XLO(19,BOT,16,0),		XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"bbtr",     XLO(19,BOT,16,0),		XLBOBB_MASK,   PWRCOM,	 PPCNONE,	{BI}},
-+{"btlrl",    XLO(19,BOT,16,1),		XLBOBB_MASK,   PPCCOM,	 PPCNONE,	{BI}},
-+{"btlrl-",   XLO(19,BOT,16,1),		XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"bbtrl",    XLO(19,BOT,16,1),		XLBOBB_MASK,   PWRCOM,	 PPCNONE,	{BI}},
-+{"btlr+",    XLO(19,BOTP,16,0),		XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"btlrl+",   XLO(19,BOTP,16,1),		XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"btlr-",    XLO(19,BOTM4,16,0),	XLBOBB_MASK,   POWER4,	 PPCNONE,	{BI}},
-+{"btlrl-",   XLO(19,BOTM4,16,1),	XLBOBB_MASK,   POWER4,	 PPCNONE,	{BI}},
-+{"btlr+",    XLO(19,BOTP4,16,0),	XLBOBB_MASK,   POWER4,	 PPCNONE,	{BI}},
-+{"btlrl+",   XLO(19,BOTP4,16,1),	XLBOBB_MASK,   POWER4,	 PPCNONE,	{BI}},
-+
-+{"bclr-",    XLYLK(19,16,0,0),		XLYBB_MASK,    PPCCOM,	 PPCNONE,	{BOE, BI}},
-+{"bclrl-",   XLYLK(19,16,0,1),		XLYBB_MASK,    PPCCOM,	 PPCNONE,	{BOE, BI}},
-+{"bclr+",    XLYLK(19,16,1,0),		XLYBB_MASK,    PPCCOM,	 PPCNONE,	{BOE, BI}},
-+{"bclrl+",   XLYLK(19,16,1,1),		XLYBB_MASK,    PPCCOM,	 PPCNONE,	{BOE, BI}},
-+{"bclr",     XLLK(19,16,0),		XLBH_MASK,     PPCCOM,	 PPCNONE,	{BO, BI, BH}},
-+{"bcr",      XLLK(19,16,0),		XLBB_MASK,     PWRCOM,	 PPCNONE,	{BO, BI}},
-+{"bclrl",    XLLK(19,16,1),		XLBH_MASK,     PPCCOM,	 PPCNONE,	{BO, BI, BH}},
-+{"bcrl",     XLLK(19,16,1),		XLBB_MASK,     PWRCOM,	 PPCNONE,	{BO, BI}},
-+
-+{"rfid",	XL(19,18),	0xffffffff,  PPC64,	PPCNONE,	{0}},
-+
-+{"crnot",	XL(19,33),	XL_MASK,     PPCCOM,	PPCNONE,	{BT, BA, BBA}},
-+{"crnor",	XL(19,33),	XL_MASK,     COM,	PPCNONE,	{BT, BA, BB}},
-+{"rfmci",	X(19,38),	0xffffffff,  PPCRFMCI,	PPCNONE,	{0}},
-+
-+{"rfdi",	XL(19,39),	0xffffffff,  E500MC,	PPCNONE,	{0}},
-+{"rfi",		XL(19,50),	0xffffffff,  COM,	PPCNONE,	{0}},
-+{"rfci",	XL(19,51), 0xffffffff, PPC403|BOOKE|PPCE300, PPCNONE,	{0}},
-+
-+{"rfsvc",	XL(19,82),	0xffffffff,  POWER,	PPCNONE,	{0}},
-+
-+{"rfgi",	XL(19,102),	0xffffffff,  E500MC,	PPCNONE,	{0}},
-+
-+{"crandc",	XL(19,129),	XL_MASK,     COM,	PPCNONE,	{BT, BA, BB}},
-+
-+{"isync",	XL(19,150),	0xffffffff,  PPCCOM,	PPCNONE,	{0}},
-+{"ics",		XL(19,150),	0xffffffff,  PWRCOM,	PPCNONE,	{0}},
-+
-+{"crclr",	XL(19,193),	XL_MASK,     PPCCOM,	PPCNONE,	{BT, BAT, BBA}},
-+{"crxor",	XL(19,193),	XL_MASK,     COM,	PPCNONE,	{BT, BA, BB}},
-+
-+{"dnh",		X(19,198),	X_MASK,      E500MC,	PPCNONE,	{DUI, DUIS}},
-+
-+{"crnand",	XL(19,225),	XL_MASK,     COM,	PPCNONE,	{BT, BA, BB}},
-+
-+{"crand",	XL(19,257),	XL_MASK,     COM,	PPCNONE,	{BT, BA, BB}},
-+
-+{"hrfid",	XL(19,274),	0xffffffff, POWER5|CELL, PPCNONE,	{0}},
-+
-+{"crset",	XL(19,289),	XL_MASK,     PPCCOM,	PPCNONE,	{BT, BAT, BBA}},
-+{"creqv",	XL(19,289),	XL_MASK,     COM,	PPCNONE,	{BT, BA, BB}},
-+
-+{"doze",	XL(19,402),	0xffffffff,  POWER6,	PPCNONE,	{0}},
-+
-+{"crorc",	XL(19,417),	XL_MASK,     COM,	PPCNONE,	{BT, BA, BB}},
-+
-+{"nap",		XL(19,434),	0xffffffff,  POWER6,	PPCNONE,	{0}},
-+
-+{"crmove",	XL(19,449),	XL_MASK,     PPCCOM,	PPCNONE,	{BT, BA, BBA}},
-+{"cror",	XL(19,449),	XL_MASK,     COM,	PPCNONE,	{BT, BA, BB}},
-+
-+{"sleep",	XL(19,466),	0xffffffff,  POWER6,	PPCNONE,	{0}},
-+{"rvwinkle",	XL(19,498),	0xffffffff,  POWER6,	PPCNONE,	{0}},
-+
-+{"bctr",    XLO(19,BOU,528,0),		XLBOBIBB_MASK, COM,	 PPCNONE,	{0}},
-+{"bctrl",   XLO(19,BOU,528,1),		XLBOBIBB_MASK, COM,	 PPCNONE,	{0}},
-+
-+{"bgectr",  XLOCB(19,BOF,CBLT,528,0),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bgectr-", XLOCB(19,BOF,CBLT,528,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnlctr",  XLOCB(19,BOF,CBLT,528,0),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bnlctr-", XLOCB(19,BOF,CBLT,528,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bgectrl", XLOCB(19,BOF,CBLT,528,1),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bgectrl-",XLOCB(19,BOF,CBLT,528,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnlctrl", XLOCB(19,BOF,CBLT,528,1),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bnlctrl-",XLOCB(19,BOF,CBLT,528,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"blectr",  XLOCB(19,BOF,CBGT,528,0),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"blectr-", XLOCB(19,BOF,CBGT,528,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bngctr",  XLOCB(19,BOF,CBGT,528,0),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bngctr-", XLOCB(19,BOF,CBGT,528,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"blectrl", XLOCB(19,BOF,CBGT,528,1),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"blectrl-",XLOCB(19,BOF,CBGT,528,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bngctrl", XLOCB(19,BOF,CBGT,528,1),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bngctrl-",XLOCB(19,BOF,CBGT,528,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnectr",  XLOCB(19,BOF,CBEQ,528,0),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bnectr-", XLOCB(19,BOF,CBEQ,528,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnectrl", XLOCB(19,BOF,CBEQ,528,1),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bnectrl-",XLOCB(19,BOF,CBEQ,528,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnsctr",  XLOCB(19,BOF,CBSO,528,0),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bnsctr-", XLOCB(19,BOF,CBSO,528,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnuctr",  XLOCB(19,BOF,CBSO,528,0),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bnuctr-", XLOCB(19,BOF,CBSO,528,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnsctrl", XLOCB(19,BOF,CBSO,528,1),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bnsctrl-",XLOCB(19,BOF,CBSO,528,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnuctrl", XLOCB(19,BOF,CBSO,528,1),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bnuctrl-",XLOCB(19,BOF,CBSO,528,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bgectr+", XLOCB(19,BOFP,CBLT,528,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnlctr+", XLOCB(19,BOFP,CBLT,528,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bgectrl+",XLOCB(19,BOFP,CBLT,528,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnlctrl+",XLOCB(19,BOFP,CBLT,528,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"blectr+", XLOCB(19,BOFP,CBGT,528,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bngctr+", XLOCB(19,BOFP,CBGT,528,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"blectrl+",XLOCB(19,BOFP,CBGT,528,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bngctrl+",XLOCB(19,BOFP,CBGT,528,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnectr+", XLOCB(19,BOFP,CBEQ,528,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnectrl+",XLOCB(19,BOFP,CBEQ,528,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnsctr+", XLOCB(19,BOFP,CBSO,528,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnuctr+", XLOCB(19,BOFP,CBSO,528,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnsctrl+",XLOCB(19,BOFP,CBSO,528,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bnuctrl+",XLOCB(19,BOFP,CBSO,528,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bgectr-", XLOCB(19,BOFM4,CBLT,528,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnlctr-", XLOCB(19,BOFM4,CBLT,528,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bgectrl-",XLOCB(19,BOFM4,CBLT,528,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnlctrl-",XLOCB(19,BOFM4,CBLT,528,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"blectr-", XLOCB(19,BOFM4,CBGT,528,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bngctr-", XLOCB(19,BOFM4,CBGT,528,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"blectrl-",XLOCB(19,BOFM4,CBGT,528,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bngctrl-",XLOCB(19,BOFM4,CBGT,528,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnectr-", XLOCB(19,BOFM4,CBEQ,528,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnectrl-",XLOCB(19,BOFM4,CBEQ,528,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnsctr-", XLOCB(19,BOFM4,CBSO,528,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnuctr-", XLOCB(19,BOFM4,CBSO,528,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnsctrl-",XLOCB(19,BOFM4,CBSO,528,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnuctrl-",XLOCB(19,BOFM4,CBSO,528,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bgectr+", XLOCB(19,BOFP4,CBLT,528,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnlctr+", XLOCB(19,BOFP4,CBLT,528,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bgectrl+",XLOCB(19,BOFP4,CBLT,528,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnlctrl+",XLOCB(19,BOFP4,CBLT,528,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"blectr+", XLOCB(19,BOFP4,CBGT,528,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bngctr+", XLOCB(19,BOFP4,CBGT,528,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"blectrl+",XLOCB(19,BOFP4,CBGT,528,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bngctrl+",XLOCB(19,BOFP4,CBGT,528,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnectr+", XLOCB(19,BOFP4,CBEQ,528,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnectrl+",XLOCB(19,BOFP4,CBEQ,528,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnsctr+", XLOCB(19,BOFP4,CBSO,528,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnuctr+", XLOCB(19,BOFP4,CBSO,528,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnsctrl+",XLOCB(19,BOFP4,CBSO,528,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bnuctrl+",XLOCB(19,BOFP4,CBSO,528,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bltctr",  XLOCB(19,BOT,CBLT,528,0),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bltctr-", XLOCB(19,BOT,CBLT,528,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bltctrl", XLOCB(19,BOT,CBLT,528,1),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bltctrl-",XLOCB(19,BOT,CBLT,528,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bgtctr",  XLOCB(19,BOT,CBGT,528,0),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bgtctr-", XLOCB(19,BOT,CBGT,528,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bgtctrl", XLOCB(19,BOT,CBGT,528,1),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bgtctrl-",XLOCB(19,BOT,CBGT,528,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"beqctr",  XLOCB(19,BOT,CBEQ,528,0),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"beqctr-", XLOCB(19,BOT,CBEQ,528,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"beqctrl", XLOCB(19,BOT,CBEQ,528,1),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"beqctrl-",XLOCB(19,BOT,CBEQ,528,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bsoctr",  XLOCB(19,BOT,CBSO,528,0),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bsoctr-", XLOCB(19,BOT,CBSO,528,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bunctr",  XLOCB(19,BOT,CBSO,528,0),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bunctr-", XLOCB(19,BOT,CBSO,528,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bsoctrl", XLOCB(19,BOT,CBSO,528,1),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bsoctrl-",XLOCB(19,BOT,CBSO,528,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bunctrl", XLOCB(19,BOT,CBSO,528,1),	XLBOCBBB_MASK, PPCCOM,	 PPCNONE,	{CR}},
-+{"bunctrl-",XLOCB(19,BOT,CBSO,528,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bltctr+", XLOCB(19,BOTP,CBLT,528,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bltctrl+",XLOCB(19,BOTP,CBLT,528,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bgtctr+", XLOCB(19,BOTP,CBGT,528,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bgtctrl+",XLOCB(19,BOTP,CBGT,528,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"beqctr+", XLOCB(19,BOTP,CBEQ,528,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"beqctrl+",XLOCB(19,BOTP,CBEQ,528,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bsoctr+", XLOCB(19,BOTP,CBSO,528,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bunctr+", XLOCB(19,BOTP,CBSO,528,0),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bsoctrl+",XLOCB(19,BOTP,CBSO,528,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bunctrl+",XLOCB(19,BOTP,CBSO,528,1),	XLBOCBBB_MASK, PPCCOM,   POWER4,	{CR}},
-+{"bltctr-", XLOCB(19,BOTM4,CBLT,528,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bltctrl-",XLOCB(19,BOTM4,CBLT,528,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bgtctr-", XLOCB(19,BOTM4,CBGT,528,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bgtctrl-",XLOCB(19,BOTM4,CBGT,528,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"beqctr-", XLOCB(19,BOTM4,CBEQ,528,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"beqctrl-",XLOCB(19,BOTM4,CBEQ,528,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bsoctr-", XLOCB(19,BOTM4,CBSO,528,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bunctr-", XLOCB(19,BOTM4,CBSO,528,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bsoctrl-",XLOCB(19,BOTM4,CBSO,528,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bunctrl-",XLOCB(19,BOTM4,CBSO,528,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bltctr+", XLOCB(19,BOTP4,CBLT,528,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bltctrl+",XLOCB(19,BOTP4,CBLT,528,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bgtctr+", XLOCB(19,BOTP4,CBGT,528,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bgtctrl+",XLOCB(19,BOTP4,CBGT,528,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"beqctr+", XLOCB(19,BOTP4,CBEQ,528,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"beqctrl+",XLOCB(19,BOTP4,CBEQ,528,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bsoctr+", XLOCB(19,BOTP4,CBSO,528,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bunctr+", XLOCB(19,BOTP4,CBSO,528,0),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bsoctrl+",XLOCB(19,BOTP4,CBSO,528,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+{"bunctrl+",XLOCB(19,BOTP4,CBSO,528,1),	XLBOCBBB_MASK, POWER4,	 PPCNONE,	{CR}},
-+
-+{"bfctr",   XLO(19,BOF,528,0),		XLBOBB_MASK,   PPCCOM,	 PPCNONE,	{BI}},
-+{"bfctr-",  XLO(19,BOF,528,0),		XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"bfctrl",  XLO(19,BOF,528,1),		XLBOBB_MASK,   PPCCOM,	 PPCNONE,	{BI}},
-+{"bfctrl-", XLO(19,BOF,528,1),		XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"bfctr+",  XLO(19,BOFP,528,0),		XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"bfctrl+", XLO(19,BOFP,528,1),		XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"bfctr-",  XLO(19,BOFM4,528,0),	XLBOBB_MASK,   POWER4,	 PPCNONE,	{BI}},
-+{"bfctrl-", XLO(19,BOFM4,528,1),	XLBOBB_MASK,   POWER4,	 PPCNONE,	{BI}},
-+{"bfctr+",  XLO(19,BOFP4,528,0),	XLBOBB_MASK,   POWER4,	 PPCNONE,	{BI}},
-+{"bfctrl+", XLO(19,BOFP4,528,1),	XLBOBB_MASK,   POWER4,	 PPCNONE,	{BI}},
-+{"btctr",   XLO(19,BOT,528,0),		XLBOBB_MASK,   PPCCOM,	 PPCNONE,	{BI}},
-+{"btctr-",  XLO(19,BOT,528,0),		XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"btctrl",  XLO(19,BOT,528,1),		XLBOBB_MASK,   PPCCOM,	 PPCNONE,	{BI}},
-+{"btctrl-", XLO(19,BOT,528,1),		XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"btctr+",  XLO(19,BOTP,528,0),		XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"btctrl+", XLO(19,BOTP,528,1),		XLBOBB_MASK,   PPCCOM,   POWER4,	{BI}},
-+{"btctr-",  XLO(19,BOTM4,528,0),	XLBOBB_MASK,   POWER4,	 PPCNONE,	{BI}},
-+{"btctrl-", XLO(19,BOTM4,528,1),	XLBOBB_MASK,   POWER4,	 PPCNONE,	{BI}},
-+{"btctr+",  XLO(19,BOTP4,528,0),	XLBOBB_MASK,   POWER4,	 PPCNONE,	{BI}},
-+{"btctrl+", XLO(19,BOTP4,528,1),	XLBOBB_MASK,   POWER4,	 PPCNONE,	{BI}},
-+
-+{"bcctr-",  XLYLK(19,528,0,0),		XLYBB_MASK,    PPCCOM,	 PPCNONE,	{BOE, BI}},
-+{"bcctrl-", XLYLK(19,528,0,1),		XLYBB_MASK,    PPCCOM,	 PPCNONE,	{BOE, BI}},
-+{"bcctr+",  XLYLK(19,528,1,0),		XLYBB_MASK,    PPCCOM,	 PPCNONE,	{BOE, BI}},
-+{"bcctrl+", XLYLK(19,528,1,1),		XLYBB_MASK,    PPCCOM,	 PPCNONE,	{BOE, BI}},
-+{"bcctr",   XLLK(19,528,0),		XLBH_MASK,     PPCCOM,	 PPCNONE,	{BO, BI, BH}},
-+{"bcc",     XLLK(19,528,0),		XLBB_MASK,     PWRCOM,	 PPCNONE,	{BO, BI}},
-+{"bcctrl",  XLLK(19,528,1),		XLBH_MASK,     PPCCOM,	 PPCNONE,	{BO, BI, BH}},
-+{"bccl",    XLLK(19,528,1),		XLBB_MASK,     PWRCOM,	 PPCNONE,	{BO, BI}},
-+
-+{"rlwimi",	M(20,0),	M_MASK,      PPCCOM,	PPCNONE,	{RA, RS, SH, MBE, ME}},
-+{"rlimi",	M(20,0),	M_MASK,      PWRCOM,	PPCNONE,	{RA, RS, SH, MBE, ME}},
-+
-+{"rlwimi.",	M(20,1),	M_MASK,      PPCCOM,	PPCNONE,	{RA, RS, SH, MBE, ME}},
-+{"rlimi.",	M(20,1),	M_MASK,      PWRCOM,	PPCNONE,	{RA, RS, SH, MBE, ME}},
-+
-+{"rotlwi",	MME(21,31,0),	MMBME_MASK,  PPCCOM,	PPCNONE,	{RA, RS, SH}},
-+{"clrlwi",	MME(21,31,0),	MSHME_MASK,  PPCCOM,	PPCNONE,	{RA, RS, MB}},
-+{"rlwinm",	M(21,0),	M_MASK,      PPCCOM,	PPCNONE,	{RA, RS, SH, MBE, ME}},
-+{"rlinm",	M(21,0),	M_MASK,      PWRCOM,	PPCNONE,	{RA, RS, SH, MBE, ME}},
-+{"rotlwi.",	MME(21,31,1),	MMBME_MASK,  PPCCOM,	PPCNONE,	{RA, RS, SH}},
-+{"clrlwi.",	MME(21,31,1),	MSHME_MASK,  PPCCOM,	PPCNONE,	{RA, RS, MB}},
-+{"rlwinm.",	M(21,1),	M_MASK,      PPCCOM,	PPCNONE,	{RA, RS, SH, MBE, ME}},
-+{"rlinm.",	M(21,1),	M_MASK,      PWRCOM,	PPCNONE,	{RA, RS, SH, MBE, ME}},
-+
-+{"rlmi",	M(22,0),	M_MASK,      M601,	PPCNONE,	{RA, RS, RB, MBE, ME}},
-+{"rlmi.",	M(22,1),	M_MASK,      M601,	PPCNONE,	{RA, RS, RB, MBE, ME}},
-+
-+{"rotlw",	MME(23,31,0),	MMBME_MASK,  PPCCOM,	PPCNONE,	{RA, RS, RB}},
-+{"rlwnm",	M(23,0),	M_MASK,      PPCCOM,	PPCNONE,	{RA, RS, RB, MBE, ME}},
-+{"rlnm",	M(23,0),	M_MASK,      PWRCOM,	PPCNONE,	{RA, RS, RB, MBE, ME}},
-+{"rotlw.",	MME(23,31,1),	MMBME_MASK,  PPCCOM,	PPCNONE,	{RA, RS, RB}},
-+{"rlwnm.",	M(23,1),	M_MASK,      PPCCOM,	PPCNONE,	{RA, RS, RB, MBE, ME}},
-+{"rlnm.",	M(23,1),	M_MASK,      PWRCOM,	PPCNONE,	{RA, RS, RB, MBE, ME}},
-+
-+{"nop",		OP(24),		0xffffffff,  PPCCOM,	PPCNONE,	{0}},
-+{"ori",		OP(24),		OP_MASK,     PPCCOM,	PPCNONE,	{RA, RS, UI}},
-+{"oril",	OP(24),		OP_MASK,     PWRCOM,	PPCNONE,	{RA, RS, UI}},
-+
-+{"oris",	OP(25),		OP_MASK,     PPCCOM,	PPCNONE,	{RA, RS, UI}},
-+{"oriu",	OP(25),		OP_MASK,     PWRCOM,	PPCNONE,	{RA, RS, UI}},
-+
-+{"xori",	OP(26),		OP_MASK,     PPCCOM,	PPCNONE,	{RA, RS, UI}},
-+{"xoril",	OP(26),		OP_MASK,     PWRCOM,	PPCNONE,	{RA, RS, UI}},
-+
-+{"xoris",	OP(27),		OP_MASK,     PPCCOM,	PPCNONE,	{RA, RS, UI}},
-+{"xoriu",	OP(27),		OP_MASK,     PWRCOM,	PPCNONE,	{RA, RS, UI}},
-+
-+{"andi.",	OP(28),		OP_MASK,     PPCCOM,	PPCNONE,	{RA, RS, UI}},
-+{"andil.",	OP(28),		OP_MASK,     PWRCOM,	PPCNONE,	{RA, RS, UI}},
-+
-+{"andis.",	OP(29),		OP_MASK,     PPCCOM,	PPCNONE,	{RA, RS, UI}},
-+{"andiu.",	OP(29),		OP_MASK,     PWRCOM,	PPCNONE,	{RA, RS, UI}},
-+
-+{"rotldi",	MD(30,0,0),	MDMB_MASK,   PPC64,	PPCNONE,	{RA, RS, SH6}},
-+{"clrldi",	MD(30,0,0),	MDSH_MASK,   PPC64,	PPCNONE,	{RA, RS, MB6}},
-+{"rldicl",	MD(30,0,0),	MD_MASK,     PPC64,	PPCNONE,	{RA, RS, SH6, MB6}},
-+{"rotldi.",	MD(30,0,1),	MDMB_MASK,   PPC64,	PPCNONE,	{RA, RS, SH6}},
-+{"clrldi.",	MD(30,0,1),	MDSH_MASK,   PPC64,	PPCNONE,	{RA, RS, MB6}},
-+{"rldicl.",	MD(30,0,1),	MD_MASK,     PPC64,	PPCNONE,	{RA, RS, SH6, MB6}},
-+
-+{"rldicr",	MD(30,1,0),	MD_MASK,     PPC64,	PPCNONE,	{RA, RS, SH6, ME6}},
-+{"rldicr.",	MD(30,1,1),	MD_MASK,     PPC64,	PPCNONE,	{RA, RS, SH6, ME6}},
-+
-+{"rldic",	MD(30,2,0),	MD_MASK,     PPC64,	PPCNONE,	{RA, RS, SH6, MB6}},
-+{"rldic.",	MD(30,2,1),	MD_MASK,     PPC64,	PPCNONE,	{RA, RS, SH6, MB6}},
-+
-+{"rldimi",	MD(30,3,0),	MD_MASK,     PPC64,	PPCNONE,	{RA, RS, SH6, MB6}},
-+{"rldimi.",	MD(30,3,1),	MD_MASK,     PPC64,	PPCNONE,	{RA, RS, SH6, MB6}},
-+
-+{"rotld",	MDS(30,8,0),	MDSMB_MASK,  PPC64,	PPCNONE,	{RA, RS, RB}},
-+{"rldcl",	MDS(30,8,0),	MDS_MASK,    PPC64,	PPCNONE,	{RA, RS, RB, MB6}},
-+{"rotld.",	MDS(30,8,1),	MDSMB_MASK,  PPC64,	PPCNONE,	{RA, RS, RB}},
-+{"rldcl.",	MDS(30,8,1),	MDS_MASK,    PPC64,	PPCNONE,	{RA, RS, RB, MB6}},
-+
-+{"rldcr",	MDS(30,9,0),	MDS_MASK,    PPC64,	PPCNONE,	{RA, RS, RB, ME6}},
-+{"rldcr.",	MDS(30,9,1),	MDS_MASK,    PPC64,	PPCNONE,	{RA, RS, RB, ME6}},
-+
-+{"cmpw",	XOPL(31,0,0),	XCMPL_MASK,  PPCCOM,	PPCNONE,	{OBF, RA, RB}},
-+{"cmpd",	XOPL(31,0,1),	XCMPL_MASK,  PPC64,	PPCNONE,	{OBF, RA, RB}},
-+{"cmp",		X(31,0),	XCMP_MASK,   PPC,	PPCNONE,	{BF, L, RA, RB}},
-+{"cmp",		X(31,0),	XCMPL_MASK,  PWRCOM,	PPCNONE,	{BF, RA, RB}},
-+
-+{"twlgt",	XTO(31,4,TOLGT), XTO_MASK,   PPCCOM,	PPCNONE,	{RA, RB}},
-+{"tlgt",	XTO(31,4,TOLGT), XTO_MASK,   PWRCOM,	PPCNONE,	{RA, RB}},
-+{"twllt",	XTO(31,4,TOLLT), XTO_MASK,   PPCCOM,	PPCNONE,	{RA, RB}},
-+{"tllt",	XTO(31,4,TOLLT), XTO_MASK,   PWRCOM,	PPCNONE,	{RA, RB}},
-+{"tweq",	XTO(31,4,TOEQ),	 XTO_MASK,   PPCCOM,	PPCNONE,	{RA, RB}},
-+{"teq",		XTO(31,4,TOEQ),	 XTO_MASK,   PWRCOM,	PPCNONE,	{RA, RB}},
-+{"twlge",	XTO(31,4,TOLGE), XTO_MASK,   PPCCOM,	PPCNONE,	{RA, RB}},
-+{"tlge",	XTO(31,4,TOLGE), XTO_MASK,   PWRCOM,	PPCNONE,	{RA, RB}},
-+{"twlnl",	XTO(31,4,TOLNL), XTO_MASK,   PPCCOM,	PPCNONE,	{RA, RB}},
-+{"tlnl",	XTO(31,4,TOLNL), XTO_MASK,   PWRCOM,	PPCNONE,	{RA, RB}},
-+{"twlle",	XTO(31,4,TOLLE), XTO_MASK,   PPCCOM,	PPCNONE,	{RA, RB}},
-+{"tlle",	XTO(31,4,TOLLE), XTO_MASK,   PWRCOM,	PPCNONE,	{RA, RB}},
-+{"twlng",	XTO(31,4,TOLNG), XTO_MASK,   PPCCOM,	PPCNONE,	{RA, RB}},
-+{"tlng",	XTO(31,4,TOLNG), XTO_MASK,   PWRCOM,	PPCNONE,	{RA, RB}},
-+{"twgt",	XTO(31,4,TOGT),	 XTO_MASK,   PPCCOM,	PPCNONE,	{RA, RB}},
-+{"tgt",		XTO(31,4,TOGT),	 XTO_MASK,   PWRCOM,	PPCNONE,	{RA, RB}},
-+{"twge",	XTO(31,4,TOGE),	 XTO_MASK,   PPCCOM,	PPCNONE,	{RA, RB}},
-+{"tge",		XTO(31,4,TOGE),	 XTO_MASK,   PWRCOM,	PPCNONE,	{RA, RB}},
-+{"twnl",	XTO(31,4,TONL),	 XTO_MASK,   PPCCOM,	PPCNONE,	{RA, RB}},
-+{"tnl",		XTO(31,4,TONL),	 XTO_MASK,   PWRCOM,	PPCNONE,	{RA, RB}},
-+{"twlt",	XTO(31,4,TOLT),	 XTO_MASK,   PPCCOM,	PPCNONE,	{RA, RB}},
-+{"tlt",		XTO(31,4,TOLT),	 XTO_MASK,   PWRCOM,	PPCNONE,	{RA, RB}},
-+{"twle",	XTO(31,4,TOLE),	 XTO_MASK,   PPCCOM,	PPCNONE,	{RA, RB}},
-+{"tle",		XTO(31,4,TOLE),	 XTO_MASK,   PWRCOM,	PPCNONE,	{RA, RB}},
-+{"twng",	XTO(31,4,TONG),	 XTO_MASK,   PPCCOM,	PPCNONE,	{RA, RB}},
-+{"tng",		XTO(31,4,TONG),	 XTO_MASK,   PWRCOM,	PPCNONE,	{RA, RB}},
-+{"twne",	XTO(31,4,TONE),	 XTO_MASK,   PPCCOM,	PPCNONE,	{RA, RB}},
-+{"tne",		XTO(31,4,TONE),	 XTO_MASK,   PWRCOM,	PPCNONE,	{RA, RB}},
-+{"trap",	XTO(31,4,TOU),	 0xffffffff, PPCCOM,	PPCNONE,	{0}},
-+{"tw",		X(31,4),	 X_MASK,     PPCCOM,	PPCNONE,	{TO, RA, RB}},
-+{"t",		X(31,4),	 X_MASK,     PWRCOM,	PPCNONE,	{TO, RA, RB}},
-+
-+{"lvsl",	X(31,6),	X_MASK,      PPCVEC,	PPCNONE,	{VD, RA, RB}},
-+{"lvebx",	X(31,7),	X_MASK,      PPCVEC,	PPCNONE,	{VD, RA, RB}},
-+{"lbfcmx",	APU(31,7,0), 	APU_MASK,    PPC405,	PPCNONE,	{FCRT, RA, RB}},
-+
-+{"subfc",	XO(31,8,0,0),	XO_MASK,     PPCCOM,	PPCNONE,	{RT, RA, RB}},
-+{"sf",		XO(31,8,0,0),	XO_MASK,     PWRCOM,	PPCNONE,	{RT, RA, RB}},
-+{"subc",	XO(31,8,0,0),	XO_MASK,     PPC,	PPCNONE,	{RT, RB, RA}},
-+{"subfc.",	XO(31,8,0,1),	XO_MASK,     PPCCOM,	PPCNONE,	{RT, RA, RB}},
-+{"sf.",		XO(31,8,0,1),	XO_MASK,     PWRCOM,	PPCNONE,	{RT, RA, RB}},
-+{"subc.",	XO(31,8,0,1),	XO_MASK,     PPCCOM,	PPCNONE,	{RT, RB, RA}},
-+
-+{"mulhdu",	XO(31,9,0,0),	XO_MASK,     PPC64,	PPCNONE,	{RT, RA, RB}},
-+{"mulhdu.",	XO(31,9,0,1),	XO_MASK,     PPC64,	PPCNONE,	{RT, RA, RB}},
-+
-+{"addc",	XO(31,10,0,0),	XO_MASK,     PPCCOM,	PPCNONE,	{RT, RA, RB}},
-+{"a",		XO(31,10,0,0),	XO_MASK,     PWRCOM,	PPCNONE,	{RT, RA, RB}},
-+{"addc.",	XO(31,10,0,1),	XO_MASK,     PPCCOM,	PPCNONE,	{RT, RA, RB}},
-+{"a.",		XO(31,10,0,1),	XO_MASK,     PWRCOM,	PPCNONE,	{RT, RA, RB}},
-+
-+{"mulhwu",	XO(31,11,0,0),	XO_MASK,     PPC,	PPCNONE,	{RT, RA, RB}},
-+{"mulhwu.",	XO(31,11,0,1),	XO_MASK,     PPC,	PPCNONE,	{RT, RA, RB}},
-+
-+{"isellt",	X(31,15),	X_MASK,      PPCISEL,	PPCNONE,	{RT, RA, RB}},
-+
-+{"mfcr",	XFXM(31,19,0,0), XRARB_MASK, COM,	POWER4,		{RT}},
-+{"mfcr",	XFXM(31,19,0,0), XFXFXM_MASK, POWER4,	PPCNONE,	{RT, FXM4}},
-+{"mfocrf",	XFXM(31,19,0,1), XFXFXM_MASK, COM,	PPCNONE,	{RT, FXM}},
-+
-+{"lwarx",	X(31,20),	XEH_MASK,    PPC,	PPCNONE,	{RT, RA0, RB, EH}},
-+
-+{"ldx",		X(31,21),	X_MASK,      PPC64,	PPCNONE,	{RT, RA0, RB}},
-+
-+{"icbt",	X(31,22),	X_MASK,  BOOKE|PPCE300,	PPCNONE,	{CT, RA, RB}},
-+
-+{"lwzx",	X(31,23),	X_MASK,      PPCCOM,	PPCNONE,	{RT, RA0, RB}},
-+{"lx",		X(31,23),	X_MASK,      PWRCOM,	PPCNONE,	{RT, RA, RB}},
-+
-+{"slw",		XRC(31,24,0),	X_MASK,      PPCCOM,	PPCNONE,	{RA, RS, RB}},
-+{"sl",		XRC(31,24,0),	X_MASK,      PWRCOM,	PPCNONE,	{RA, RS, RB}},
-+{"slw.",	XRC(31,24,1),	X_MASK,      PPCCOM,	PPCNONE,	{RA, RS, RB}},
-+{"sl.",		XRC(31,24,1),	X_MASK,      PWRCOM,	PPCNONE,	{RA, RS, RB}},
-+
-+{"cntlzw",	XRC(31,26,0),	XRB_MASK,    PPCCOM,	PPCNONE,	{RA, RS}},
-+{"cntlz",	XRC(31,26,0),	XRB_MASK,    PWRCOM,	PPCNONE,	{RA, RS}},
-+{"cntlzw.",	XRC(31,26,1),	XRB_MASK,    PPCCOM,	PPCNONE,	{RA, RS}},
-+{"cntlz.",	XRC(31,26,1),	XRB_MASK,    PWRCOM,	PPCNONE,	{RA, RS}},
-+
-+{"sld",		XRC(31,27,0),	X_MASK,      PPC64,	PPCNONE,	{RA, RS, RB}},
-+{"sld.",	XRC(31,27,1),	X_MASK,      PPC64,	PPCNONE,	{RA, RS, RB}},
-+
-+{"and",		XRC(31,28,0),	X_MASK,      COM,	PPCNONE,	{RA, RS, RB}},
-+{"and.",	XRC(31,28,1),	X_MASK,      COM,	PPCNONE,	{RA, RS, RB}},
-+
-+{"maskg",	XRC(31,29,0),	X_MASK,      M601,	PPCNONE,	{RA, RS, RB}},
-+{"maskg.",	XRC(31,29,1),	X_MASK,      M601,	PPCNONE,	{RA, RS, RB}},
-+
-+{"ldepx",	X(31,29),	X_MASK,      E500MC,	PPCNONE,	{RT, RA, RB}},
-+{"lwepx",	X(31,31),	X_MASK,      E500MC,	PPCNONE,	{RT, RA, RB}},
-+
-+{"cmplw",	XOPL(31,32,0),	XCMPL_MASK,  PPCCOM,	PPCNONE,	{OBF, RA, RB}},
-+{"cmpld",	XOPL(31,32,1),	XCMPL_MASK,  PPC64,	PPCNONE,	{OBF, RA, RB}},
-+{"cmpl",	X(31,32),	XCMP_MASK,   PPC,	PPCNONE,	{BF, L, RA, RB}},
-+{"cmpl",	X(31,32),	XCMPL_MASK,  PWRCOM,	PPCNONE,	{BF, RA, RB}},
-+
-+{"lvsr",	X(31,38),	X_MASK,      PPCVEC,	PPCNONE,	{VD, RA, RB}},
-+{"lvehx",	X(31,39),	X_MASK,      PPCVEC,	PPCNONE,	{VD, RA, RB}},
-+{"lhfcmx",	APU(31,39,0), 	APU_MASK,    PPC405,	PPCNONE,	{FCRT, RA, RB}},
-+
-+{"iselgt",	X(31,47),	X_MASK,      PPCISEL,	PPCNONE,	{RT, RA, RB}},
-+
-+{"lvewx",	X(31,71),	X_MASK,      PPCVEC,	PPCNONE,	{VD, RA, RB}},
-+
-+{"addg6s",	XO(31,74,0,0),	XO_MASK,     POWER6,	PPCNONE,	{RT, RA, RB}},
-+
-+{"iseleq",	X(31,79),	X_MASK,      PPCISEL,	PPCNONE,	{RT, RA, RB}},
-+
-+{"isel",	XISEL(31,15),	XISEL_MASK,  PPCISEL,	PPCNONE,	{RT, RA, RB, CRB}},
-+
-+{"subf",	XO(31,40,0,0),	XO_MASK,     PPC,	PPCNONE,	{RT, RA, RB}},
-+{"sub",		XO(31,40,0,0),	XO_MASK,     PPC,	PPCNONE,	{RT, RB, RA}},
-+{"subf.",	XO(31,40,0,1),	XO_MASK,     PPC,	PPCNONE,	{RT, RA, RB}},
-+{"sub.",	XO(31,40,0,1),	XO_MASK,     PPC,	PPCNONE,	{RT, RB, RA}},
-+
-+{"lbarx",	X(31,52),	XEH_MASK,    POWER7,	PPCNONE,	{RT, RA0, RB, EH}},
-+
-+{"ldux",	X(31,53),	X_MASK,      PPC64,	PPCNONE,	{RT, RAL, RB}},
-+
-+{"dcbst",	X(31,54),	XRT_MASK,    PPC,	PPCNONE,	{RA, RB}},
-+
-+{"lwzux",	X(31,55),	X_MASK,      PPCCOM,	PPCNONE,	{RT, RAL, RB}},
-+{"lux",		X(31,55),	X_MASK,      PWRCOM,	PPCNONE,	{RT, RA, RB}},
-+
-+{"cntlzd",	XRC(31,58,0),	XRB_MASK,    PPC64,	PPCNONE,	{RA, RS}},
-+{"cntlzd.",	XRC(31,58,1),	XRB_MASK,    PPC64,	PPCNONE,	{RA, RS}},
-+
-+{"andc",	XRC(31,60,0),	X_MASK,      COM,	PPCNONE,	{RA, RS, RB}},
-+{"andc.",	XRC(31,60,1),	X_MASK,      COM,	PPCNONE,	{RA, RS, RB}},
-+
-+{"waitrsv",	X(31,62)|(1<<21), 0xffffffff, POWER7|E500MC, PPCNONE,	{0}},
-+{"waitimpl",	X(31,62)|(2<<21), 0xffffffff, POWER7|E500MC, PPCNONE,	{0}},
-+{"wait",	X(31,62),	XWC_MASK, POWER7|E500MC, PPCNONE,	{WC}},
-+
-+{"dcbstep",	XRT(31,63,0),	XRT_MASK,    E500MC,	PPCNONE,	{RA, RB}},
-+
-+{"tdlgt",	XTO(31,68,TOLGT), XTO_MASK,  PPC64,	PPCNONE,	{RA, RB}},
-+{"tdllt",	XTO(31,68,TOLLT), XTO_MASK,  PPC64,	PPCNONE,	{RA, RB}},
-+{"tdeq",	XTO(31,68,TOEQ),  XTO_MASK,  PPC64,	PPCNONE,	{RA, RB}},
-+{"tdlge",	XTO(31,68,TOLGE), XTO_MASK,  PPC64,	PPCNONE,	{RA, RB}},
-+{"tdlnl",	XTO(31,68,TOLNL), XTO_MASK,  PPC64,	PPCNONE,	{RA, RB}},
-+{"tdlle",	XTO(31,68,TOLLE), XTO_MASK,  PPC64,	PPCNONE,	{RA, RB}},
-+{"tdlng",	XTO(31,68,TOLNG), XTO_MASK,  PPC64,	PPCNONE,	{RA, RB}},
-+{"tdgt",	XTO(31,68,TOGT),  XTO_MASK,  PPC64,	PPCNONE,	{RA, RB}},
-+{"tdge",	XTO(31,68,TOGE),  XTO_MASK,  PPC64,	PPCNONE,	{RA, RB}},
-+{"tdnl",	XTO(31,68,TONL),  XTO_MASK,  PPC64,	PPCNONE,	{RA, RB}},
-+{"tdlt",	XTO(31,68,TOLT),  XTO_MASK,  PPC64,	PPCNONE,	{RA, RB}},
-+{"tdle",	XTO(31,68,TOLE),  XTO_MASK,  PPC64,	PPCNONE,	{RA, RB}},
-+{"tdng",	XTO(31,68,TONG),  XTO_MASK,  PPC64,	PPCNONE,	{RA, RB}},
-+{"tdne",	XTO(31,68,TONE),  XTO_MASK,  PPC64,	PPCNONE,	{RA, RB}},
-+{"td",		X(31,68),	X_MASK,      PPC64,	PPCNONE,	{TO, RA, RB}},
-+
-+{"lwfcmx",	APU(31,71,0), 	APU_MASK,    PPC405,	PPCNONE,	{FCRT, RA, RB}},
-+{"mulhd",	XO(31,73,0,0),	XO_MASK,     PPC64,	PPCNONE,	{RT, RA, RB}},
-+{"mulhd.",	XO(31,73,0,1),	XO_MASK,     PPC64,	PPCNONE,	{RT, RA, RB}},
-+
-+{"mulhw",	XO(31,75,0,0),	XO_MASK,     PPC,	PPCNONE,	{RT, RA, RB}},
-+{"mulhw.",	XO(31,75,0,1),	XO_MASK,     PPC,	PPCNONE,	{RT, RA, RB}},
-+
-+{"dlmzb",	XRC(31,78,0),	X_MASK,  PPC403|PPC440,	PPCNONE,	{RA, RS, RB}},
-+{"dlmzb.",	XRC(31,78,1),	X_MASK,  PPC403|PPC440,	PPCNONE,	{RA, RS, RB}},
-+
-+{"mtsrd",	X(31,82),  XRB_MASK|(1<<20), PPC64,	PPCNONE,	{SR, RS}},
-+
-+{"mfmsr",	X(31,83),	XRARB_MASK,  COM,	PPCNONE,	{RT}},
-+
-+{"ldarx",	X(31,84),	XEH_MASK,    PPC64,	PPCNONE,	{RT, RA0, RB, EH}},
-+
-+{"dcbfl",	XOPL(31,86,1),	XRT_MASK,    POWER5,	PPCNONE,	{RA, RB}},
-+{"dcbf",	X(31,86),	XLRT_MASK,   PPC,	PPCNONE,	{RA, RB, L}},
-+
-+{"lbzx",	X(31,87),	X_MASK,      COM,	PPCNONE,	{RT, RA0, RB}},
-+
-+{"lbepx",	X(31,95),	X_MASK,      E500MC,	PPCNONE,	{RT, RA, RB}},
-+
-+{"lvx",		X(31,103),	X_MASK,      PPCVEC,	PPCNONE,	{VD, RA, RB}},
-+{"lqfcmx",	APU(31,103,0), 	APU_MASK,    PPC405,	PPCNONE,	{FCRT, RA, RB}},
-+
-+{"neg",		XO(31,104,0,0),	XORB_MASK,   COM,	PPCNONE,	{RT, RA}},
-+{"neg.",	XO(31,104,0,1),	XORB_MASK,   COM,	PPCNONE,	{RT, RA}},
-+
-+{"mul",		XO(31,107,0,0),	XO_MASK,     M601,	PPCNONE,	{RT, RA, RB}},
-+{"mul.",	XO(31,107,0,1),	XO_MASK,     M601,	PPCNONE,	{RT, RA, RB}},
-+
-+{"mtsrdin",	X(31,114),	XRA_MASK,    PPC64,	PPCNONE,	{RS, RB}},
-+
-+{"lharx",	X(31,116),	XEH_MASK,    POWER7,	PPCNONE,	{RT, RA0, RB, EH}},
-+
-+{"clf",		X(31,118),	XTO_MASK,    POWER,	PPCNONE,	{RA, RB}},
-+
-+{"lbzux",	X(31,119),	X_MASK,      COM,	PPCNONE,	{RT, RAL, RB}},
-+
-+{"popcntb",	X(31,122),	XRB_MASK,    POWER5,	PPCNONE,	{RA, RS}},
-+
-+{"not",		XRC(31,124,0),	X_MASK,      COM,	PPCNONE,	{RA, RS, RBS}},
-+{"nor",		XRC(31,124,0),	X_MASK,      COM,	PPCNONE,	{RA, RS, RB}},
-+{"not.",	XRC(31,124,1),	X_MASK,      COM,	PPCNONE,	{RA, RS, RBS}},
-+{"nor.",	XRC(31,124,1),	X_MASK,      COM,	PPCNONE,	{RA, RS, RB}},
-+
-+{"dcbfep",	XRT(31,127,0),	XRT_MASK,    E500MC,	PPCNONE,	{RA, RB}},
-+
-+{"wrtee",	X(31,131),	XRARB_MASK, PPC403|BOOKE, PPCNONE,	{RS}},
-+
-+{"dcbtstls",	X(31,134),	X_MASK,      PPCCHLK,	PPCNONE,	{CT, RA, RB}},
-+
-+{"stvebx",	X(31,135),	X_MASK,      PPCVEC,	PPCNONE,	{VS, RA, RB}},
-+{"stbfcmx",	APU(31,135,0), 	APU_MASK,    PPC405,	PPCNONE,	{FCRT, RA, RB}},
-+
-+{"subfe",	XO(31,136,0,0),	XO_MASK,     PPCCOM,	PPCNONE,	{RT, RA, RB}},
-+{"sfe",		XO(31,136,0,0),	XO_MASK,     PWRCOM,	PPCNONE,	{RT, RA, RB}},
-+{"subfe.",	XO(31,136,0,1),	XO_MASK,     PPCCOM,	PPCNONE,	{RT, RA, RB}},
-+{"sfe.",	XO(31,136,0,1),	XO_MASK,     PWRCOM,	PPCNONE,	{RT, RA, RB}},
-+
-+{"adde",	XO(31,138,0,0),	XO_MASK,     PPCCOM,	PPCNONE,	{RT, RA, RB}},
-+{"ae",		XO(31,138,0,0),	XO_MASK,     PWRCOM,	PPCNONE,	{RT, RA, RB}},
-+{"adde.",	XO(31,138,0,1),	XO_MASK,     PPCCOM,	PPCNONE,	{RT, RA, RB}},
-+{"ae.",		XO(31,138,0,1),	XO_MASK,     PWRCOM,	PPCNONE,	{RT, RA, RB}},
-+
-+{"dcbtstlse",	X(31,142),	X_MASK,      PPCCHLK,	PPCNONE,	{CT, RA, RB}},
-+
-+{"mtcr",	XFXM(31,144,0xff,0), XRARB_MASK, COM,	PPCNONE,	{RS}},
-+{"mtcrf",	XFXM(31,144,0,0), XFXFXM_MASK, COM,	PPCNONE,	{FXM, RS}},
-+{"mtocrf",	XFXM(31,144,0,1), XFXFXM_MASK, COM,	PPCNONE,	{FXM, RS}},
-+
-+{"mtmsr",	X(31,146),	XRLARB_MASK, COM,	PPCNONE,	{RS, A_L}},
-+
-+{"stdx",	X(31,149),	X_MASK,      PPC64,	PPCNONE,	{RS, RA0, RB}},
-+
-+{"stwcx.",	XRC(31,150,1),	X_MASK,      PPC,	PPCNONE,	{RS, RA0, RB}},
-+
-+{"stwx",	X(31,151),	X_MASK,      PPCCOM,	PPCNONE,	{RS, RA0, RB}},
-+{"stx",		X(31,151),	X_MASK,      PWRCOM,	PPCNONE,	{RS, RA, RB}},
-+
-+{"slq",		XRC(31,152,0),	X_MASK,      M601,	PPCNONE,	{RA, RS, RB}},
-+{"slq.",	XRC(31,152,1),	X_MASK,      M601,	PPCNONE,	{RA, RS, RB}},
-+
-+{"sle",		XRC(31,153,0),	X_MASK,      M601,	PPCNONE,	{RA, RS, RB}},
-+{"sle.",	XRC(31,153,1),	X_MASK,      M601,	PPCNONE,	{RA, RS, RB}},
-+
-+{"prtyw",	X(31,154),	XRB_MASK,    POWER6,	PPCNONE,	{RA, RS}},
-+
-+{"stdepx",	X(31,157),	X_MASK,      E500MC,	PPCNONE,	{RS, RA, RB}},
-+
-+{"stwepx",	X(31,159),	X_MASK,      E500MC,	PPCNONE,	{RS, RA, RB}},
-+
-+{"wrteei",	X(31,163),	XE_MASK,  PPC403|BOOKE,	PPCNONE,	{E}},
-+
-+{"dcbtls",	X(31,166),	X_MASK,      PPCCHLK,	PPCNONE,	{CT, RA, RB}},
-+
-+{"stvehx",	X(31,167),	X_MASK,      PPCVEC,	PPCNONE,	{VS, RA, RB}},
-+{"sthfcmx",	APU(31,167,0), 	APU_MASK,    PPC405,	PPCNONE,	{FCRT, RA, RB}},
-+
-+{"dcbtlse",	X(31,174),	X_MASK,      PPCCHLK,	PPCNONE,	{CT, RA, RB}},
-+
-+{"mtmsrd",	X(31,178),	XRLARB_MASK, PPC64,	PPCNONE,	{RS, A_L}},
-+
-+{"stdux",	X(31,181),	X_MASK,      PPC64,	PPCNONE,	{RS, RAS, RB}},
-+
-+{"stwux",	X(31,183),	X_MASK,      PPCCOM,	PPCNONE,	{RS, RAS, RB}},
-+{"stux",	X(31,183),	X_MASK,      PWRCOM,	PPCNONE,	{RS, RA0, RB}},
-+
-+{"sliq",	XRC(31,184,0),	X_MASK,      M601,	PPCNONE,	{RA, RS, SH}},
-+{"sliq.",	XRC(31,184,1),	X_MASK,      M601,	PPCNONE,	{RA, RS, SH}},
-+
-+{"prtyd",	X(31,186),	XRB_MASK,    POWER6,	PPCNONE,	{RA, RS}},
-+
-+{"stvewx",	X(31,199),	X_MASK,      PPCVEC,	PPCNONE,	{VS, RA, RB}},
-+{"stwfcmx",	APU(31,199,0), 	APU_MASK,    PPC405,	PPCNONE,	{FCRT, RA, RB}},
-+
-+{"subfze",	XO(31,200,0,0),	XORB_MASK,   PPCCOM,	PPCNONE,	{RT, RA}},
-+{"sfze",	XO(31,200,0,0),	XORB_MASK,   PWRCOM,	PPCNONE,	{RT, RA}},
-+{"subfze.",	XO(31,200,0,1),	XORB_MASK,   PPCCOM,	PPCNONE,	{RT, RA}},
-+{"sfze.",	XO(31,200,0,1),	XORB_MASK,   PWRCOM,	PPCNONE,	{RT, RA}},
-+
-+{"addze",	XO(31,202,0,0),	XORB_MASK,   PPCCOM,	PPCNONE,	{RT, RA}},
-+{"aze",		XO(31,202,0,0),	XORB_MASK,   PWRCOM,	PPCNONE,	{RT, RA}},
-+{"addze.",	XO(31,202,0,1),	XORB_MASK,   PPCCOM,	PPCNONE,	{RT, RA}},
-+{"aze.",	XO(31,202,0,1),	XORB_MASK,   PWRCOM,	PPCNONE,	{RT, RA}},
-+
-+{"msgsnd",	XRTRA(31,206,0,0),XRTRA_MASK,E500MC,	PPCNONE,	{RB}},
-+
-+{"mtsr",	X(31,210), XRB_MASK|(1<<20), COM32,	PPCNONE,	{SR, RS}},
-+
-+{"stdcx.",	XRC(31,214,1),	X_MASK,      PPC64,	PPCNONE,	{RS, RA0, RB}},
-+
-+{"stbx",	X(31,215),	X_MASK,      COM,	PPCNONE,	{RS, RA0, RB}},
-+
-+{"sllq",	XRC(31,216,0),	X_MASK,      M601,	PPCNONE,	{RA, RS, RB}},
-+{"sllq.",	XRC(31,216,1),	X_MASK,      M601,	PPCNONE,	{RA, RS, RB}},
-+
-+{"sleq",	XRC(31,217,0),	X_MASK,      M601,	PPCNONE,	{RA, RS, RB}},
-+{"sleq.",	XRC(31,217,1),	X_MASK,      M601,	PPCNONE,	{RA, RS, RB}},
-+
-+{"stbepx",	X(31,223),	X_MASK,      E500MC,	PPCNONE,	{RS, RA, RB}},
-+
-+{"icblc",	X(31,230),	X_MASK,      PPCCHLK,	PPCNONE,	{CT, RA, RB}},
-+
-+{"stvx",	X(31,231),	X_MASK,      PPCVEC,	PPCNONE,	{VS, RA, RB}},
-+{"stqfcmx",	APU(31,231,0), 	APU_MASK,    PPC405,	PPCNONE,	{FCRT, RA, RB}},
-+
-+{"subfme",	XO(31,232,0,0),	XORB_MASK,   PPCCOM,	PPCNONE,	{RT, RA}},
-+{"sfme",	XO(31,232,0,0),	XORB_MASK,   PWRCOM,	PPCNONE,	{RT, RA}},
-+{"subfme.",	XO(31,232,0,1),	XORB_MASK,   PPCCOM,	PPCNONE,	{RT, RA}},
-+{"sfme.",	XO(31,232,0,1),	XORB_MASK,   PWRCOM,	PPCNONE,	{RT, RA}},
-+
-+{"mulld",	XO(31,233,0,0),	XO_MASK,     PPC64,	PPCNONE,	{RT, RA, RB}},
-+{"mulld.",	XO(31,233,0,1),	XO_MASK,     PPC64,	PPCNONE,	{RT, RA, RB}},
-+
-+{"addme",	XO(31,234,0,0),	XORB_MASK,   PPCCOM,	PPCNONE,	{RT, RA}},
-+{"ame",		XO(31,234,0,0),	XORB_MASK,   PWRCOM,	PPCNONE,	{RT, RA}},
-+{"addme.",	XO(31,234,0,1),	XORB_MASK,   PPCCOM,	PPCNONE,	{RT, RA}},
-+{"ame.",	XO(31,234,0,1),	XORB_MASK,   PWRCOM,	PPCNONE,	{RT, RA}},
-+
-+{"mullw",	XO(31,235,0,0),	XO_MASK,     PPCCOM,	PPCNONE,	{RT, RA, RB}},
-+{"muls",	XO(31,235,0,0),	XO_MASK,     PWRCOM,	PPCNONE,	{RT, RA, RB}},
-+{"mullw.",	XO(31,235,0,1),	XO_MASK,     PPCCOM,	PPCNONE,	{RT, RA, RB}},
-+{"muls.",	XO(31,235,0,1),	XO_MASK,     PWRCOM,	PPCNONE,	{RT, RA, RB}},
-+
-+{"msgclr",	XRTRA(31,238,0,0),XRTRA_MASK,E500MC,	PPCNONE,	{RB}},
-+{"icblce",	X(31,238),	X_MASK,      PPCCHLK,	PPCNONE,	{CT, RA, RB}},
-+{"mtsrin",	X(31,242),	XRA_MASK,    PPC32,	PPCNONE,	{RS, RB}},
-+{"mtsri",	X(31,242),	XRA_MASK,    POWER32,	PPCNONE,	{RS, RB}},
-+
-+{"dcbtstt",	XRT(31,246,0x10), XRT_MASK,  POWER7,	PPCNONE,	{RA, RB}},
-+{"dcbtst",	X(31,246),	X_MASK,      PPC,	POWER4,		{CT, RA, RB}},
-+{"dcbtst",	X(31,246),	X_MASK,      POWER4,	PPCNONE,	{RA, RB, CT}},
-+
-+{"stbux",	X(31,247),	X_MASK,      COM,	PPCNONE,	{RS, RAS, RB}},
-+
-+{"slliq",	XRC(31,248,0),	X_MASK,      M601,	PPCNONE,	{RA, RS, SH}},
-+{"slliq.",	XRC(31,248,1),	X_MASK,      M601,	PPCNONE,	{RA, RS, SH}},
-+
-+{"bpermd",	X(31,252),	X_MASK,      POWER7,	PPCNONE,	{RA, RS, RB}},
-+
-+{"dcbtstep",	XRT(31,255,0),	X_MASK,      E500MC,	PPCNONE,	{RT, RA, RB}},
-+
-+{"mfdcrx",	X(31,259),	X_MASK,      BOOKE,	PPCNONE,	{RS, RA}},
-+
-+{"icbt",	X(31,262),	XRT_MASK,    PPC403,	PPCNONE,	{RA, RB}},
-+
-+{"ldfcmx",	APU(31,263,0), 	APU_MASK,    PPC405,	PPCNONE,	{FCRT, RA, RB}},
-+{"doz",		XO(31,264,0,0),	XO_MASK,     M601,	PPCNONE,	{RT, RA, RB}},
-+{"doz.",	XO(31,264,0,1),	XO_MASK,     M601,	PPCNONE,	{RT, RA, RB}},
-+
-+{"add",		XO(31,266,0,0),	XO_MASK,     PPCCOM,	PPCNONE,	{RT, RA, RB}},
-+{"cax",		XO(31,266,0,0),	XO_MASK,     PWRCOM,	PPCNONE,	{RT, RA, RB}},
-+{"add.",	XO(31,266,0,1),	XO_MASK,     PPCCOM,	PPCNONE,	{RT, RA, RB}},
-+{"cax.",	XO(31,266,0,1),	XO_MASK,     PWRCOM,	PPCNONE,	{RT, RA, RB}},
-+
-+{"ehpriv",	X(31,270),	0xffffffff,  E500MC,	PPCNONE,	{0}},
-+
-+{"tlbiel",	X(31,274),	XRTLRA_MASK, POWER4,	PPCNONE,	{RB, L}},
-+
-+{"mfapidi",	X(31,275),	X_MASK,      BOOKE,	PPCNONE,	{RT, RA}},
-+
-+{"lscbx",	XRC(31,277,0),	X_MASK,      M601,	PPCNONE,	{RT, RA, RB}},
-+{"lscbx.",	XRC(31,277,1),	X_MASK,      M601,	PPCNONE,	{RT, RA, RB}},
-+
-+{"dcbtt",	XRT(31,278,0x10), XRT_MASK,  POWER7,	PPCNONE,	{RA, RB}},
-+{"dcbt",	X(31,278),	X_MASK,      PPC,	POWER4,		{CT, RA, RB}},
-+{"dcbt",	X(31,278),	X_MASK,      POWER4,	PPCNONE,	{RA, RB, CT}},
-+
-+{"lhzx",	X(31,279),	X_MASK,      COM,	PPCNONE,	{RT, RA0, RB}},
-+
-+{"cdtbcd",	X(31,282),	XRB_MASK,    POWER6,	PPCNONE,	{RA, RS}},
-+
-+{"eqv",		XRC(31,284,0),	X_MASK,      COM,	PPCNONE,	{RA, RS, RB}},
-+{"eqv.",	XRC(31,284,1),	X_MASK,      COM,	PPCNONE,	{RA, RS, RB}},
-+
-+{"lhepx",	X(31,287),	X_MASK,      E500MC,	PPCNONE,	{RT, RA, RB}},
-+
-+{"mfdcrux",	X(31,291),	X_MASK,      PPC464,	PPCNONE,	{RS, RA}},
-+
-+{"tlbie",	X(31,306),	XRTLRA_MASK, PPC,	PPCNONE,	{RB, L}},
-+{"tlbi",	X(31,306),	XRT_MASK,    POWER,	PPCNONE,	{RA0, RB}},
-+
-+{"eciwx",	X(31,310),	X_MASK,      PPC,	PPCNONE,	{RT, RA, RB}},
-+
-+{"lhzux",	X(31,311),	X_MASK,      COM,	PPCNONE,	{RT, RAL, RB}},
-+
-+{"cbcdtd",	X(31,314),	XRB_MASK,    POWER6,	PPCNONE,	{RA, RS}},
-+
-+{"xor",		XRC(31,316,0),	X_MASK,      COM,	PPCNONE,	{RA, RS, RB}},
-+{"xor.",	XRC(31,316,1),	X_MASK,      COM,	PPCNONE,	{RA, RS, RB}},
-+
-+{"dcbtep",	XRT(31,319,0),	X_MASK,      E500MC,	PPCNONE,	{RT, RA, RB}},
-+
-+{"mfexisr",	XSPR(31,323, 64), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfexier",	XSPR(31,323, 66), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfbr0",	XSPR(31,323,128), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfbr1",	XSPR(31,323,129), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfbr2",	XSPR(31,323,130), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfbr3",	XSPR(31,323,131), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfbr4",	XSPR(31,323,132), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfbr5",	XSPR(31,323,133), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfbr6",	XSPR(31,323,134), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfbr7",	XSPR(31,323,135), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfbear",	XSPR(31,323,144), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfbesr",	XSPR(31,323,145), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfiocr",	XSPR(31,323,160), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfdmacr0",	XSPR(31,323,192), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfdmact0",	XSPR(31,323,193), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfdmada0",	XSPR(31,323,194), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfdmasa0",	XSPR(31,323,195), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfdmacc0",	XSPR(31,323,196), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfdmacr1",	XSPR(31,323,200), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfdmact1",	XSPR(31,323,201), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfdmada1",	XSPR(31,323,202), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfdmasa1",	XSPR(31,323,203), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfdmacc1",	XSPR(31,323,204), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfdmacr2",	XSPR(31,323,208), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfdmact2",	XSPR(31,323,209), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfdmada2",	XSPR(31,323,210), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfdmasa2",	XSPR(31,323,211), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfdmacc2",	XSPR(31,323,212), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfdmacr3",	XSPR(31,323,216), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfdmact3",	XSPR(31,323,217), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfdmada3",	XSPR(31,323,218), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfdmasa3",	XSPR(31,323,219), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfdmacc3",	XSPR(31,323,220), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfdmasr",	XSPR(31,323,224), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfdcr",	X(31,323),	X_MASK,   PPC403|BOOKE,	PPCNONE,	{RT, SPR}},
-+
-+{"div",		XO(31,331,0,0),	XO_MASK,     M601,	PPCNONE,	{RT, RA, RB}},
-+{"div.",	XO(31,331,0,1),	XO_MASK,     M601,	PPCNONE,	{RT, RA, RB}},
-+
-+{"lxvdsx",	X(31,332),	XX1_MASK,    PPCVSX,	PPCNONE,	{XT6, RA, RB}},
-+
-+{"mfpmr",	X(31,334),	X_MASK, PPCPMR|PPCE300,	PPCNONE,	{RT, PMR}},
-+
-+{"mfmq",	XSPR(31,339,  0), XSPR_MASK, M601,	PPCNONE,	{RT}},
-+{"mfxer",	XSPR(31,339,  1), XSPR_MASK, COM,	PPCNONE,	{RT}},
-+{"mfrtcu",	XSPR(31,339,  4), XSPR_MASK, COM,	PPCNONE,	{RT}},
-+{"mfrtcl",	XSPR(31,339,  5), XSPR_MASK, COM,	PPCNONE,	{RT}},
-+{"mfdec",	XSPR(31,339,  6), XSPR_MASK, MFDEC1,	PPCNONE,	{RT}},
-+{"mflr",	XSPR(31,339,  8), XSPR_MASK, COM,	PPCNONE,	{RT}},
-+{"mfctr",	XSPR(31,339,  9), XSPR_MASK, COM,	PPCNONE,	{RT}},
-+{"mftid",	XSPR(31,339, 17), XSPR_MASK, POWER,	PPCNONE,	{RT}},
-+{"mfdsisr",	XSPR(31,339, 18), XSPR_MASK, COM,	PPCNONE,	{RT}},
-+{"mfdar",	XSPR(31,339, 19), XSPR_MASK, COM,	PPCNONE,	{RT}},
-+{"mfdec",	XSPR(31,339, 22), XSPR_MASK, MFDEC2,	PPCNONE,	{RT}},
-+{"mfsdr0",	XSPR(31,339, 24), XSPR_MASK, POWER,	PPCNONE,	{RT}},
-+{"mfsdr1",	XSPR(31,339, 25), XSPR_MASK, COM,	PPCNONE,	{RT}},
-+{"mfsrr0",	XSPR(31,339, 26), XSPR_MASK, COM,	PPCNONE,	{RT}},
-+{"mfsrr1",	XSPR(31,339, 27), XSPR_MASK, COM,	PPCNONE,	{RT}},
-+{"mfcfar",	XSPR(31,339, 28), XSPR_MASK, POWER6,	PPCNONE,	{RT}},
-+{"mfpid",	XSPR(31,339, 48), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfcsrr0",	XSPR(31,339, 58), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfcsrr1",	XSPR(31,339, 59), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfdear",	XSPR(31,339, 61), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfesr",	XSPR(31,339, 62), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfivpr",	XSPR(31,339, 63), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfcmpa",	XSPR(31,339,144), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfcmpb",	XSPR(31,339,145), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfcmpc",	XSPR(31,339,146), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfcmpd",	XSPR(31,339,147), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mficr",	XSPR(31,339,148), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfder",	XSPR(31,339,149), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfcounta",	XSPR(31,339,150), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfcountb",	XSPR(31,339,151), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfcmpe",	XSPR(31,339,152), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfcmpf",	XSPR(31,339,153), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfcmpg",	XSPR(31,339,154), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfcmph",	XSPR(31,339,155), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mflctrl1",	XSPR(31,339,156), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mflctrl2",	XSPR(31,339,157), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfictrl",	XSPR(31,339,158), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfbar",	XSPR(31,339,159), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfvrsave",	XSPR(31,339,256), XSPR_MASK, PPCVEC,	PPCNONE,	{RT}},
-+{"mfusprg0",	XSPR(31,339,256), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfsprg",	XSPR(31,339,256), XSPRG_MASK, PPC,	PPCNONE,	{RT, SPRG}},
-+{"mfsprg4",	XSPR(31,339,260), XSPR_MASK, PPC405|BOOKE, PPCNONE,	{RT}},
-+{"mfsprg5",	XSPR(31,339,261), XSPR_MASK, PPC405|BOOKE, PPCNONE,	{RT}},
-+{"mfsprg6",	XSPR(31,339,262), XSPR_MASK, PPC405|BOOKE, PPCNONE,	{RT}},
-+{"mfsprg7",	XSPR(31,339,263), XSPR_MASK, PPC405|BOOKE, PPCNONE,	{RT}},
-+{"mftb",	XSPR(31,339,268), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mftbl",	XSPR(31,339,268), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mftbu",	XSPR(31,339,269), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfsprg0",	XSPR(31,339,272), XSPR_MASK, PPC,	PPCNONE,	{RT}},
-+{"mfsprg1",	XSPR(31,339,273), XSPR_MASK, PPC,	PPCNONE,	{RT}},
-+{"mfsprg2",	XSPR(31,339,274), XSPR_MASK, PPC,	PPCNONE,	{RT}},
-+{"mfsprg3",	XSPR(31,339,275), XSPR_MASK, PPC,	PPCNONE,	{RT}},
-+{"mfasr",	XSPR(31,339,280), XSPR_MASK, PPC64,	PPCNONE,	{RT}},
-+{"mfear",	XSPR(31,339,282), XSPR_MASK, PPC,	PPCNONE,	{RT}},
-+{"mfpir",	XSPR(31,339,286), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfpvr",	XSPR(31,339,287), XSPR_MASK, PPC,	PPCNONE,	{RT}},
-+{"mfdbsr",	XSPR(31,339,304), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfdbcr0",	XSPR(31,339,308), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfdbcr1",	XSPR(31,339,309), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfdbcr2",	XSPR(31,339,310), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfiac1",	XSPR(31,339,312), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfiac2",	XSPR(31,339,313), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfiac3",	XSPR(31,339,314), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfiac4",	XSPR(31,339,315), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfdac1",	XSPR(31,339,316), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfdac2",	XSPR(31,339,317), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfdvc1",	XSPR(31,339,318), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfdvc2",	XSPR(31,339,319), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mftsr",	XSPR(31,339,336), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mftcr",	XSPR(31,339,340), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfivor0",	XSPR(31,339,400), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfivor1",	XSPR(31,339,401), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfivor2",	XSPR(31,339,402), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfivor3",	XSPR(31,339,403), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfivor4",	XSPR(31,339,404), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfivor5",	XSPR(31,339,405), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfivor6",	XSPR(31,339,406), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfivor7",	XSPR(31,339,407), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfivor8",	XSPR(31,339,408), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfivor9",	XSPR(31,339,409), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfivor10",	XSPR(31,339,410), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfivor11",	XSPR(31,339,411), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfivor12",	XSPR(31,339,412), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfivor13",	XSPR(31,339,413), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfivor14",	XSPR(31,339,414), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfivor15",	XSPR(31,339,415), XSPR_MASK, BOOKE,	PPCNONE,	{RT}},
-+{"mfspefscr",	XSPR(31,339,512), XSPR_MASK, PPCSPE,	PPCNONE,	{RT}},
-+{"mfbbear",	XSPR(31,339,513), XSPR_MASK, PPCBRLK,	PPCNONE,	{RT}},
-+{"mfbbtar",	XSPR(31,339,514), XSPR_MASK, PPCBRLK,	PPCNONE,	{RT}},
-+{"mfivor32",	XSPR(31,339,528), XSPR_MASK, PPCSPE,	PPCNONE,	{RT}},
-+{"mfibatu",	XSPR(31,339,528), XSPRBAT_MASK, PPC,	PPCNONE,	{RT, SPRBAT}},
-+{"mfivor33",	XSPR(31,339,529), XSPR_MASK, PPCSPE,	PPCNONE,	{RT}},
-+{"mfibatl",	XSPR(31,339,529), XSPRBAT_MASK, PPC,	PPCNONE,	{RT, SPRBAT}},
-+{"mfivor34",	XSPR(31,339,530), XSPR_MASK, PPCSPE,	PPCNONE,	{RT}},
-+{"mfivor35",	XSPR(31,339,531), XSPR_MASK, PPCPMR,	PPCNONE,	{RT}},
-+{"mfdbatu",	XSPR(31,339,536), XSPRBAT_MASK, PPC,	PPCNONE,	{RT, SPRBAT}},
-+{"mfdbatl",	XSPR(31,339,537), XSPRBAT_MASK, PPC,	PPCNONE,	{RT, SPRBAT}},
-+{"mfic_cst",	XSPR(31,339,560), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfic_adr",	XSPR(31,339,561), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfic_dat",	XSPR(31,339,562), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfdc_cst",	XSPR(31,339,568), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfdc_adr",	XSPR(31,339,569), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfdc_dat",	XSPR(31,339,570), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfmcsrr0",	XSPR(31,339,570), XSPR_MASK, PPCRFMCI,	PPCNONE,	{RT}},
-+{"mfmcsrr1",	XSPR(31,339,571), XSPR_MASK, PPCRFMCI,	PPCNONE,	{RT}},
-+{"mfmcsr",	XSPR(31,339,572), XSPR_MASK, PPCRFMCI,	PPCNONE,	{RT}},
-+{"mfmcar",	XSPR(31,339,573), XSPR_MASK, PPCRFMCI,	PPCNONE,	{RT}},
-+{"mfdpdr",	XSPR(31,339,630), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfdpir",	XSPR(31,339,631), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfimmr",	XSPR(31,339,638), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfmi_ctr",	XSPR(31,339,784), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfmi_ap",	XSPR(31,339,786), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfmi_epn",	XSPR(31,339,787), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfmi_twc",	XSPR(31,339,789), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfmi_rpn",	XSPR(31,339,790), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfmd_ctr",	XSPR(31,339,792), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfm_casid",	XSPR(31,339,793), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfmd_ap",	XSPR(31,339,794), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfmd_epn",	XSPR(31,339,795), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfmd_twb",	XSPR(31,339,796), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfmd_twc",	XSPR(31,339,797), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfmd_rpn",	XSPR(31,339,798), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfm_tw",	XSPR(31,339,799), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfmi_dbcam",	XSPR(31,339,816), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfmi_dbram0",	XSPR(31,339,817), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfmi_dbram1",	XSPR(31,339,818), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfmd_dbcam",	XSPR(31,339,824), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfmd_dbram0",	XSPR(31,339,825), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfmd_dbram1",	XSPR(31,339,826), XSPR_MASK, PPC860,	PPCNONE,	{RT}},
-+{"mfummcr0",	XSPR(31,339,936), XSPR_MASK, PPC750,	PPCNONE,	{RT}},
-+{"mfupmc1",	XSPR(31,339,937), XSPR_MASK, PPC750,	PPCNONE,	{RT}},
-+{"mfupmc2",	XSPR(31,339,938), XSPR_MASK, PPC750,	PPCNONE,	{RT}},
-+{"mfusia",	XSPR(31,339,939), XSPR_MASK, PPC750,	PPCNONE,	{RT}},
-+{"mfummcr1",	XSPR(31,339,940), XSPR_MASK, PPC750,	PPCNONE,	{RT}},
-+{"mfupmc3",	XSPR(31,339,941), XSPR_MASK, PPC750,	PPCNONE,	{RT}},
-+{"mfupmc4",	XSPR(31,339,942), XSPR_MASK, PPC750,	PPCNONE,	{RT}},
-+{"mfzpr",	XSPR(31,339,944), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfpid",	XSPR(31,339,945), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfccr0",	XSPR(31,339,947), XSPR_MASK, PPC405,	PPCNONE,	{RT}},
-+{"mfiac3",	XSPR(31,339,948), XSPR_MASK, PPC405,	PPCNONE,	{RT}},
-+{"mfiac4",	XSPR(31,339,949), XSPR_MASK, PPC405,	PPCNONE,	{RT}},
-+{"mfdvc1",	XSPR(31,339,950), XSPR_MASK, PPC405,	PPCNONE,	{RT}},
-+{"mfdvc2",	XSPR(31,339,951), XSPR_MASK, PPC405,	PPCNONE,	{RT}},
-+{"mfmmcr0",	XSPR(31,339,952), XSPR_MASK, PPC750,	PPCNONE,	{RT}},
-+{"mfpmc1",	XSPR(31,339,953), XSPR_MASK, PPC750,	PPCNONE,	{RT}},
-+{"mfsgr",	XSPR(31,339,953), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfdcwr",	XSPR(31,339,954), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfpmc2",	XSPR(31,339,954), XSPR_MASK, PPC750,	PPCNONE,	{RT}},
-+{"mfsia",	XSPR(31,339,955), XSPR_MASK, PPC750,	PPCNONE,	{RT}},
-+{"mfsler",	XSPR(31,339,955), XSPR_MASK, PPC405,	PPCNONE,	{RT}},
-+{"mfmmcr1",	XSPR(31,339,956), XSPR_MASK, PPC750,	PPCNONE,	{RT}},
-+{"mfsu0r",	XSPR(31,339,956), XSPR_MASK, PPC405,	PPCNONE,	{RT}},
-+{"mfdbcr1",	XSPR(31,339,957), XSPR_MASK, PPC405,	PPCNONE,	{RT}},
-+{"mfpmc3",	XSPR(31,339,957), XSPR_MASK, PPC750,	PPCNONE,	{RT}},
-+{"mfpmc4",	XSPR(31,339,958), XSPR_MASK, PPC750,	PPCNONE,	{RT}},
-+{"mficdbdr",	XSPR(31,339,979), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfesr",	XSPR(31,339,980), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfdear",	XSPR(31,339,981), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfevpr",	XSPR(31,339,982), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfcdbcr",	XSPR(31,339,983), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mftsr",	XSPR(31,339,984), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mftcr",	XSPR(31,339,986), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfpit",	XSPR(31,339,987), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mftbhi",	XSPR(31,339,988), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mftblo",	XSPR(31,339,989), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfsrr2",	XSPR(31,339,990), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfsrr3",	XSPR(31,339,991), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfdbsr",	XSPR(31,339,1008), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfdbcr0",	XSPR(31,339,1010), XSPR_MASK, PPC405,	PPCNONE,	{RT}},
-+{"mfiac1",	XSPR(31,339,1012), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfiac2",	XSPR(31,339,1013), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfdac1",	XSPR(31,339,1014), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfdac2",	XSPR(31,339,1015), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfl2cr",	XSPR(31,339,1017), XSPR_MASK, PPC750,	PPCNONE,	{RT}},
-+{"mfdccr",	XSPR(31,339,1018), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mficcr",	XSPR(31,339,1019), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfictc",	XSPR(31,339,1019), XSPR_MASK, PPC750,	PPCNONE,	{RT}},
-+{"mfpbl1",	XSPR(31,339,1020), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfthrm1",	XSPR(31,339,1020), XSPR_MASK, PPC750,	PPCNONE,	{RT}},
-+{"mfpbu1",	XSPR(31,339,1021), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfthrm2",	XSPR(31,339,1021), XSPR_MASK, PPC750,	PPCNONE,	{RT}},
-+{"mfpbl2",	XSPR(31,339,1022), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfthrm3",	XSPR(31,339,1022), XSPR_MASK, PPC750,	PPCNONE,	{RT}},
-+{"mfpbu2",	XSPR(31,339,1023), XSPR_MASK, PPC403,	PPCNONE,	{RT}},
-+{"mfspr",	X(31,339),	X_MASK,      COM,	PPCNONE,	{RT, SPR}},
-+
-+{"lwax",	X(31,341),	X_MASK,      PPC64,	PPCNONE,	{RT, RA0, RB}},
-+
-+{"dst",		XDSS(31,342,0),	XDSS_MASK,   PPCVEC,	PPCNONE,	{RA, RB, STRM}},
-+
-+{"lhax",	X(31,343),	X_MASK,      COM,	PPCNONE,	{RT, RA0, RB}},
-+
-+{"lvxl",	X(31,359),	X_MASK,      PPCVEC,	PPCNONE,	{VD, RA, RB}},
-+
-+{"abs",		XO(31,360,0,0),	XORB_MASK,   M601,	PPCNONE,	{RT, RA}},
-+{"abs.",	XO(31,360,0,1),	XORB_MASK,   M601,	PPCNONE,	{RT, RA}},
-+
-+{"divs",	XO(31,363,0,0),	XO_MASK,     M601,	PPCNONE,	{RT, RA, RB}},
-+{"divs.",	XO(31,363,0,1),	XO_MASK,     M601,	PPCNONE,	{RT, RA, RB}},
-+
-+{"tlbia",	X(31,370),	0xffffffff,  PPC,	PPCNONE,	{0}},
-+
-+{"mftbl",	XSPR(31,371,268), XSPR_MASK, CLASSIC,	PPCNONE,	{RT}},
-+{"mftbu",	XSPR(31,371,269), XSPR_MASK, CLASSIC,	PPCNONE,	{RT}},
-+{"mftb",	X(31,371),	X_MASK,      CLASSIC,	POWER7,		{RT, TBR}},
-+
-+{"lwaux",	X(31,373),	X_MASK,      PPC64,	PPCNONE,	{RT, RAL, RB}},
-+
-+{"dstst",	XDSS(31,374,0),	XDSS_MASK,   PPCVEC,	PPCNONE,	{RA, RB, STRM}},
-+
-+{"lhaux",	X(31,375),	X_MASK,      COM,	PPCNONE,	{RT, RAL, RB}},
-+
-+{"popcntw",	X(31,378),	XRB_MASK,    POWER7,	PPCNONE,	{RA, RS}},
-+
-+{"mtdcrx",	X(31,387),	X_MASK,      BOOKE,	PPCNONE,	{RA, RS}},
-+
-+{"dcblc",	X(31,390),	X_MASK,      PPCCHLK,	PPCNONE,	{CT, RA, RB}},
-+{"stdfcmx",	APU(31,391,0), 	APU_MASK,    PPC405,	PPCNONE,	{FCRT, RA, RB}},
-+
-+{"divdeu",	XO(31,393,0,0),	XO_MASK,     POWER7,	PPCNONE,	{RT, RA, RB}},
-+{"divdeu.",	XO(31,393,0,1),	XO_MASK,     POWER7,	PPCNONE,	{RT, RA, RB}},
-+{"divweu",	XO(31,395,0,0),	XO_MASK,     POWER7,	PPCNONE,	{RT, RA, RB}},
-+{"divweu.",	XO(31,395,0,1),	XO_MASK,     POWER7,	PPCNONE,	{RT, RA, RB}},
-+
-+{"dcblce",	X(31,398),	X_MASK,      PPCCHLK,	PPCNONE,	{CT, RA, RB}},
-+
-+{"slbmte",	X(31,402),	XRA_MASK,    PPC64,	PPCNONE,	{RS, RB}},
-+
-+{"sthx",	X(31,407),	X_MASK,      COM,	PPCNONE,	{RS, RA0, RB}},
-+
-+{"orc",		XRC(31,412,0),	X_MASK,      COM,	PPCNONE,	{RA, RS, RB}},
-+{"orc.",	XRC(31,412,1),	X_MASK,      COM,	PPCNONE,	{RA, RS, RB}},
-+
-+{"sthepx",	X(31,415),	X_MASK,      E500MC,	PPCNONE,	{RS, RA, RB}},
-+
-+{"mtdcrux",	X(31,419),	X_MASK,      PPC464,	PPCNONE,	{RA, RS}},
-+
-+{"divde",	XO(31,425,0,0),	XO_MASK,     POWER7,	PPCNONE,	{RT, RA, RB}},
-+{"divde.",	XO(31,425,0,1),	XO_MASK,     POWER7,	PPCNONE,	{RT, RA, RB}},
-+{"divwe",	XO(31,427,0,0),	XO_MASK,     POWER7,	PPCNONE,	{RT, RA, RB}},
-+{"divwe.",	XO(31,427,0,1),	XO_MASK,     POWER7,	PPCNONE,	{RT, RA, RB}},
-+
-+{"slbie",	X(31,434),	XRTRA_MASK,  PPC64,	PPCNONE,	{RB}},
-+
-+{"ecowx",	X(31,438),	X_MASK,      PPC,	PPCNONE,	{RT, RA, RB}},
-+
-+{"sthux",	X(31,439),	X_MASK,      COM,	PPCNONE,	{RS, RAS, RB}},
-+
-+{"mdors",	0x7f9ce378,	0xffffffff,  E500MC,	PPCNONE,	{0}},
-+
-+{"mr",		XRC(31,444,0),	X_MASK,      COM,	PPCNONE,	{RA, RS, RBS}},
-+{"or",		XRC(31,444,0),	X_MASK,      COM,	PPCNONE,	{RA, RS, RB}},
-+{"mr.",		XRC(31,444,1),	X_MASK,      COM,	PPCNONE,	{RA, RS, RBS}},
-+{"or.",		XRC(31,444,1),	X_MASK,      COM,	PPCNONE,	{RA, RS, RB}},
-+
-+{"mtexisr",	XSPR(31,451, 64), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtexier",	XSPR(31,451, 66), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtbr0",	XSPR(31,451,128), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtbr1",	XSPR(31,451,129), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtbr2",	XSPR(31,451,130), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtbr3",	XSPR(31,451,131), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtbr4",	XSPR(31,451,132), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtbr5",	XSPR(31,451,133), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtbr6",	XSPR(31,451,134), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtbr7",	XSPR(31,451,135), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtbear",	XSPR(31,451,144), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtbesr",	XSPR(31,451,145), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtiocr",	XSPR(31,451,160), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtdmacr0",	XSPR(31,451,192), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtdmact0",	XSPR(31,451,193), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtdmada0",	XSPR(31,451,194), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtdmasa0",	XSPR(31,451,195), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtdmacc0",	XSPR(31,451,196), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtdmacr1",	XSPR(31,451,200), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtdmact1",	XSPR(31,451,201), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtdmada1",	XSPR(31,451,202), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtdmasa1",	XSPR(31,451,203), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtdmacc1",	XSPR(31,451,204), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtdmacr2",	XSPR(31,451,208), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtdmact2",	XSPR(31,451,209), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtdmada2",	XSPR(31,451,210), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtdmasa2",	XSPR(31,451,211), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtdmacc2",	XSPR(31,451,212), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtdmacr3",	XSPR(31,451,216), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtdmact3",	XSPR(31,451,217), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtdmada3",	XSPR(31,451,218), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtdmasa3",	XSPR(31,451,219), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtdmacc3",	XSPR(31,451,220), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtdmasr",	XSPR(31,451,224), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtdcr",	X(31,451),	X_MASK,   PPC403|BOOKE,	PPCNONE,	{SPR, RS}},
-+
-+{"dccci",	X(31,454),     XRT_MASK, PPC403|PPC440,	PPCNONE,	{RA, RB}},
-+
-+{"divdu",	XO(31,457,0,0),	XO_MASK,     PPC64,	PPCNONE,	{RT, RA, RB}},
-+{"divdu.",	XO(31,457,0,1),	XO_MASK,     PPC64,	PPCNONE,	{RT, RA, RB}},
-+
-+{"divwu",	XO(31,459,0,0),	XO_MASK,     PPC,	PPCNONE,	{RT, RA, RB}},
-+{"divwu.",	XO(31,459,0,1),	XO_MASK,     PPC,	PPCNONE,	{RT, RA, RB}},
-+
-+{"mtpmr",	X(31,462),	X_MASK, PPCPMR|PPCE300,	PPCNONE,	{PMR, RS}},
-+
-+{"mtmq",	XSPR(31,467,  0), XSPR_MASK, M601,	PPCNONE,	{RS}},
-+{"mtxer",	XSPR(31,467,  1), XSPR_MASK, COM,	PPCNONE,	{RS}},
-+{"mtlr",	XSPR(31,467,  8), XSPR_MASK, COM,	PPCNONE,	{RS}},
-+{"mtctr",	XSPR(31,467,  9), XSPR_MASK, COM,	PPCNONE,	{RS}},
-+{"mttid",	XSPR(31,467, 17), XSPR_MASK, POWER,	PPCNONE,	{RS}},
-+{"mtdsisr",	XSPR(31,467, 18), XSPR_MASK, COM,	PPCNONE,	{RS}},
-+{"mtdar",	XSPR(31,467, 19), XSPR_MASK, COM,	PPCNONE,	{RS}},
-+{"mtrtcu",	XSPR(31,467, 20), XSPR_MASK, COM,	PPCNONE,	{RS}},
-+{"mtrtcl",	XSPR(31,467, 21), XSPR_MASK, COM,	PPCNONE,	{RS}},
-+{"mtdec",	XSPR(31,467, 22), XSPR_MASK, COM,	PPCNONE,	{RS}},
-+{"mtsdr0",	XSPR(31,467, 24), XSPR_MASK, POWER,	PPCNONE,	{RS}},
-+{"mtsdr1",	XSPR(31,467, 25), XSPR_MASK, COM,	PPCNONE,	{RS}},
-+{"mtsrr0",	XSPR(31,467, 26), XSPR_MASK, COM,	PPCNONE,	{RS}},
-+{"mtsrr1",	XSPR(31,467, 27), XSPR_MASK, COM,	PPCNONE,	{RS}},
-+{"mtcfar",	XSPR(31,467, 28), XSPR_MASK, POWER6,	PPCNONE,	{RS}},
-+{"mtpid",	XSPR(31,467, 48), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtdecar",	XSPR(31,467, 54), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtcsrr0",	XSPR(31,467, 58), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtcsrr1",	XSPR(31,467, 59), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtdear",	XSPR(31,467, 61), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtesr",	XSPR(31,467, 62), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtivpr",	XSPR(31,467, 63), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtcmpa",	XSPR(31,467,144), XSPR_MASK, PPC860,	PPCNONE,	{RS}},
-+{"mtcmpb",	XSPR(31,467,145), XSPR_MASK, PPC860,	PPCNONE,	{RS}},
-+{"mtcmpc",	XSPR(31,467,146), XSPR_MASK, PPC860,	PPCNONE,	{RS}},
-+{"mtcmpd",	XSPR(31,467,147), XSPR_MASK, PPC860,	PPCNONE,	{RS}},
-+{"mticr",	XSPR(31,467,148), XSPR_MASK, PPC860,	PPCNONE,	{RS}},
-+{"mtder",	XSPR(31,467,149), XSPR_MASK, PPC860,	PPCNONE,	{RS}},
-+{"mtcounta",	XSPR(31,467,150), XSPR_MASK, PPC860,	PPCNONE,	{RS}},
-+{"mtcountb",	XSPR(31,467,151), XSPR_MASK, PPC860,	PPCNONE,	{RS}},
-+{"mtcmpe",	XSPR(31,467,152), XSPR_MASK, PPC860,	PPCNONE,	{RS}},
-+{"mtcmpf",	XSPR(31,467,153), XSPR_MASK, PPC860,	PPCNONE,	{RS}},
-+{"mtcmpg",	XSPR(31,467,154), XSPR_MASK, PPC860,	PPCNONE,	{RS}},
-+{"mtcmph",	XSPR(31,467,155), XSPR_MASK, PPC860,	PPCNONE,	{RS}},
-+{"mtlctrl1",	XSPR(31,467,156), XSPR_MASK, PPC860,	PPCNONE,	{RS}},
-+{"mtlctrl2",	XSPR(31,467,157), XSPR_MASK, PPC860,	PPCNONE,	{RS}},
-+{"mtictrl",	XSPR(31,467,158), XSPR_MASK, PPC860,	PPCNONE,	{RS}},
-+{"mtbar",	XSPR(31,467,159), XSPR_MASK, PPC860,	PPCNONE,	{RS}},
-+{"mtvrsave",	XSPR(31,467,256), XSPR_MASK, PPCVEC,	PPCNONE,	{RS}},
-+{"mtusprg0",	XSPR(31,467,256), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtsprg",	XSPR(31,467,256), XSPRG_MASK,PPC,	PPCNONE,	{SPRG, RS}},
-+{"mtsprg0",	XSPR(31,467,272), XSPR_MASK, PPC,	PPCNONE,	{RS}},
-+{"mtsprg1",	XSPR(31,467,273), XSPR_MASK, PPC,	PPCNONE,	{RS}},
-+{"mtsprg2",	XSPR(31,467,274), XSPR_MASK, PPC,	PPCNONE,	{RS}},
-+{"mtsprg3",	XSPR(31,467,275), XSPR_MASK, PPC,	PPCNONE,	{RS}},
-+{"mtsprg4",	XSPR(31,467,276), XSPR_MASK, PPC405|BOOKE, PPCNONE,	{RS}},
-+{"mtsprg5",	XSPR(31,467,277), XSPR_MASK, PPC405|BOOKE, PPCNONE,	{RS}},
-+{"mtsprg6",	XSPR(31,467,278), XSPR_MASK, PPC405|BOOKE, PPCNONE,	{RS}},
-+{"mtsprg7",	XSPR(31,467,279), XSPR_MASK, PPC405|BOOKE, PPCNONE,	{RS}},
-+{"mtasr",	XSPR(31,467,280), XSPR_MASK, PPC64,	PPCNONE,	{RS}},
-+{"mtear",	XSPR(31,467,282), XSPR_MASK, PPC,	PPCNONE,	{RS}},
-+{"mttbl",	XSPR(31,467,284), XSPR_MASK, PPC,	PPCNONE,	{RS}},
-+{"mttbu",	XSPR(31,467,285), XSPR_MASK, PPC,	PPCNONE,	{RS}},
-+{"mtdbsr",	XSPR(31,467,304), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtdbcr0",	XSPR(31,467,308), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtdbcr1",	XSPR(31,467,309), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtdbcr2",	XSPR(31,467,310), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtiac1",	XSPR(31,467,312), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtiac2",	XSPR(31,467,313), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtiac3",	XSPR(31,467,314), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtiac4",	XSPR(31,467,315), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtdac1",	XSPR(31,467,316), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtdac2",	XSPR(31,467,317), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtdvc1",	XSPR(31,467,318), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtdvc2",	XSPR(31,467,319), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mttsr",	XSPR(31,467,336), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mttcr",	XSPR(31,467,340), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtivor0",	XSPR(31,467,400), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtivor1",	XSPR(31,467,401), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtivor2",	XSPR(31,467,402), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtivor3",	XSPR(31,467,403), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtivor4",	XSPR(31,467,404), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtivor5",	XSPR(31,467,405), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtivor6",	XSPR(31,467,406), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtivor7",	XSPR(31,467,407), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtivor8",	XSPR(31,467,408), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtivor9",	XSPR(31,467,409), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtivor10",	XSPR(31,467,410), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtivor11",	XSPR(31,467,411), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtivor12",	XSPR(31,467,412), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtivor13",	XSPR(31,467,413), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtivor14",	XSPR(31,467,414), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtivor15",	XSPR(31,467,415), XSPR_MASK, BOOKE,	PPCNONE,	{RS}},
-+{"mtspefscr",	XSPR(31,467,512), XSPR_MASK, PPCSPE,	PPCNONE,	{RS}},
-+{"mtbbear",	XSPR(31,467,513), XSPR_MASK, PPCBRLK,	PPCNONE,	{RS}},
-+{"mtbbtar",	XSPR(31,467,514), XSPR_MASK, PPCBRLK,	PPCNONE,	{RS}},
-+{"mtivor32",	XSPR(31,467,528), XSPR_MASK, PPCSPE,	PPCNONE,	{RS}},
-+{"mtibatu",	XSPR(31,467,528), XSPRBAT_MASK, PPC,	PPCNONE,	{SPRBAT, RS}},
-+{"mtivor33",	XSPR(31,467,529), XSPR_MASK, PPCSPE,	PPCNONE,	{RS}},
-+{"mtibatl",	XSPR(31,467,529), XSPRBAT_MASK, PPC,	PPCNONE,	{SPRBAT, RS}},
-+{"mtivor34",	XSPR(31,467,530), XSPR_MASK, PPCSPE,	PPCNONE,	{RS}},
-+{"mtivor35",	XSPR(31,467,531), XSPR_MASK, PPCPMR,	PPCNONE,	{RS}},
-+{"mtdbatu",	XSPR(31,467,536), XSPRBAT_MASK, PPC,	PPCNONE,	{SPRBAT, RS}},
-+{"mtdbatl",	XSPR(31,467,537), XSPRBAT_MASK, PPC,	PPCNONE,	{SPRBAT, RS}},
-+{"mtmcsrr0",	XSPR(31,467,570), XSPR_MASK, PPCRFMCI,	PPCNONE,	{RS}},
-+{"mtmcsrr1",	XSPR(31,467,571), XSPR_MASK, PPCRFMCI,	PPCNONE,	{RS}},
-+{"mtmcsr",	XSPR(31,467,572), XSPR_MASK, PPCRFMCI,	PPCNONE,	{RS}},
-+{"mtummcr0",	XSPR(31,467,936), XSPR_MASK, PPC750,	PPCNONE,	{RS}},
-+{"mtupmc1",	XSPR(31,467,937), XSPR_MASK, PPC750,	PPCNONE,	{RS}},
-+{"mtupmc2",	XSPR(31,467,938), XSPR_MASK, PPC750,	PPCNONE,	{RS}},
-+{"mtusia",	XSPR(31,467,939), XSPR_MASK, PPC750,	PPCNONE,	{RS}},
-+{"mtummcr1",	XSPR(31,467,940), XSPR_MASK, PPC750,	PPCNONE,	{RS}},
-+{"mtupmc3",	XSPR(31,467,941), XSPR_MASK, PPC750,	PPCNONE,	{RS}},
-+{"mtupmc4",	XSPR(31,467,942), XSPR_MASK, PPC750,	PPCNONE,	{RS}},
-+{"mtzpr",	XSPR(31,467,944), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtpid",	XSPR(31,467,945), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtccr0",	XSPR(31,467,947), XSPR_MASK, PPC405,	PPCNONE,	{RS}},
-+{"mtiac3",	XSPR(31,467,948), XSPR_MASK, PPC405,	PPCNONE,	{RS}},
-+{"mtiac4",	XSPR(31,467,949), XSPR_MASK, PPC405,	PPCNONE,	{RS}},
-+{"mtdvc1",	XSPR(31,467,950), XSPR_MASK, PPC405,	PPCNONE,	{RS}},
-+{"mtdvc2",	XSPR(31,467,951), XSPR_MASK, PPC405,	PPCNONE,	{RS}},
-+{"mtmmcr0",	XSPR(31,467,952), XSPR_MASK, PPC750,	PPCNONE,	{RS}},
-+{"mtpmc1",	XSPR(31,467,953), XSPR_MASK, PPC750,	PPCNONE,	{RS}},
-+{"mtsgr",	XSPR(31,467,953), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtdcwr",	XSPR(31,467,954), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtpmc2",	XSPR(31,467,954), XSPR_MASK, PPC750,	PPCNONE,	{RS}},
-+{"mtsia",	XSPR(31,467,955), XSPR_MASK, PPC750,	PPCNONE,	{RS}},
-+{"mtsler",	XSPR(31,467,955), XSPR_MASK, PPC405,	PPCNONE,	{RS}},
-+{"mtmmcr1",	XSPR(31,467,956), XSPR_MASK, PPC750,	PPCNONE,	{RS}},
-+{"mtsu0r",	XSPR(31,467,956), XSPR_MASK, PPC405,	PPCNONE,	{RS}},
-+{"mtdbcr1",	XSPR(31,467,957), XSPR_MASK, PPC405,	PPCNONE,	{RS}},
-+{"mtpmc3",	XSPR(31,467,957), XSPR_MASK, PPC750,	PPCNONE,	{RS}},
-+{"mtpmc4",	XSPR(31,467,958), XSPR_MASK, PPC750,	PPCNONE,	{RS}},
-+{"mticdbdr",	XSPR(31,467,979), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtesr",	XSPR(31,467,980), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtdear",	XSPR(31,467,981), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtevpr",	XSPR(31,467,982), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtcdbcr",	XSPR(31,467,983), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mttsr",	XSPR(31,467,984), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mttcr",	XSPR(31,467,986), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtpit",	XSPR(31,467,987), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mttbhi",	XSPR(31,467,988), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mttblo",	XSPR(31,467,989), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtsrr2",	XSPR(31,467,990), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtsrr3",	XSPR(31,467,991), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtdbsr",	XSPR(31,467,1008), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtdbcr0",	XSPR(31,467,1010), XSPR_MASK, PPC405,	PPCNONE,	{RS}},
-+{"mtiac1",	XSPR(31,467,1012), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtiac2",	XSPR(31,467,1013), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtdac1",	XSPR(31,467,1014), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtdac2",	XSPR(31,467,1015), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtl2cr",	XSPR(31,467,1017), XSPR_MASK, PPC750,	PPCNONE,	{RS}},
-+{"mtdccr",	XSPR(31,467,1018), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mticcr",	XSPR(31,467,1019), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtictc",	XSPR(31,467,1019), XSPR_MASK, PPC750,	PPCNONE,	{RS}},
-+{"mtpbl1",	XSPR(31,467,1020), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtthrm1",	XSPR(31,467,1020), XSPR_MASK, PPC750,	PPCNONE,	{RS}},
-+{"mtpbu1",	XSPR(31,467,1021), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtthrm2",	XSPR(31,467,1021), XSPR_MASK, PPC750,	PPCNONE,	{RS}},
-+{"mtpbl2",	XSPR(31,467,1022), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtthrm3",	XSPR(31,467,1022), XSPR_MASK, PPC750,	PPCNONE,	{RS}},
-+{"mtpbu2",	XSPR(31,467,1023), XSPR_MASK, PPC403,	PPCNONE,	{RS}},
-+{"mtspr",	X(31,467),	  X_MASK,    COM,	PPCNONE,	{SPR, RS}},
-+
-+{"dcbi",	X(31,470),	XRT_MASK,    PPC,	PPCNONE,	{RA, RB}},
-+
-+{"nand",	XRC(31,476,0),	X_MASK,      COM,	PPCNONE,	{RA, RS, RB}},
-+{"nand.",	XRC(31,476,1),	X_MASK,      COM,	PPCNONE,	{RA, RS, RB}},
-+
-+{"dsn", 	X(31,483),	XRT_MASK,    E500MC,	PPCNONE,	{RA, RB}},
-+
-+{"dcread",	X(31,486),	X_MASK,  PPC403|PPC440,	PPCNONE,	{RT, RA, RB}},
-+
-+{"icbtls",	X(31,486),	X_MASK,      PPCCHLK,	PPCNONE,	{CT, RA, RB}},
-+
-+{"stvxl",	X(31,487),	X_MASK,      PPCVEC,	PPCNONE,	{VS, RA, RB}},
-+
-+{"nabs",	XO(31,488,0,0),	XORB_MASK,   M601,	PPCNONE,	{RT, RA}},
-+{"nabs.",	XO(31,488,0,1),	XORB_MASK,   M601,	PPCNONE,	{RT, RA}},
-+
-+{"divd",	XO(31,489,0,0),	XO_MASK,     PPC64,	PPCNONE,	{RT, RA, RB}},
-+{"divd.",	XO(31,489,0,1),	XO_MASK,     PPC64,	PPCNONE,	{RT, RA, RB}},
-+
-+{"divw",	XO(31,491,0,0),	XO_MASK,     PPC,	PPCNONE,	{RT, RA, RB}},
-+{"divw.",	XO(31,491,0,1),	XO_MASK,     PPC,	PPCNONE,	{RT, RA, RB}},
-+
-+{"icbtlse",	X(31,494),	X_MASK,      PPCCHLK,	PPCNONE,	{CT, RA, RB}},
-+
-+{"slbia",	X(31,498),	0xffffffff,  PPC64,	PPCNONE,	{0}},
-+
-+{"cli",		X(31,502),	XRB_MASK,    POWER,	PPCNONE,	{RT, RA}},
-+
-+{"popcntd",	X(31,506),	XRB_MASK,    POWER7,	PPCNONE,	{RA, RS}},
-+
-+{"cmpb",	X(31,508),	X_MASK,      POWER6,	PPCNONE,	{RA, RS, RB}},
-+
-+{"mcrxr",	X(31,512), XRARB_MASK|(3<<21), COM,	POWER7,		{BF}},
-+
-+{"lbdx",	X(31,515),	X_MASK,      E500MC,	PPCNONE,	{RT, RA, RB}},
-+
-+{"bblels",	X(31,518),	X_MASK,      PPCBRLK,	PPCNONE,	{0}},
-+
-+{"lvlx",	X(31,519),	X_MASK,      CELL,	PPCNONE,	{VD, RA0, RB}},
-+{"lbfcmux",	APU(31,519,0), 	APU_MASK,    PPC405,	PPCNONE,	{FCRT, RA, RB}},
-+
-+{"subfco",	XO(31,8,1,0),	XO_MASK,     PPCCOM,	PPCNONE,	{RT, RA, RB}},
-+{"sfo",		XO(31,8,1,0),	XO_MASK,     PWRCOM,	PPCNONE,	{RT, RA, RB}},
-+{"subco",	XO(31,8,1,0),	XO_MASK,     PPC,	PPCNONE,	{RT, RB, RA}},
-+{"subfco.",	XO(31,8,1,1),	XO_MASK,     PPCCOM,	PPCNONE,	{RT, RA, RB}},
-+{"sfo.",	XO(31,8,1,1),	XO_MASK,     PWRCOM,	PPCNONE,	{RT, RA, RB}},
-+{"subco.",	XO(31,8,1,1),	XO_MASK,     PPC,	PPCNONE,	{RT, RB, RA}},
-+
-+{"addco",	XO(31,10,1,0),	XO_MASK,     PPCCOM,	PPCNONE,	{RT, RA, RB}},
-+{"ao",		XO(31,10,1,0),	XO_MASK,     PWRCOM,	PPCNONE,	{RT, RA, RB}},
-+{"addco.",	XO(31,10,1,1),	XO_MASK,     PPCCOM,	PPCNONE,	{RT, RA, RB}},
-+{"ao.",		XO(31,10,1,1),	XO_MASK,     PWRCOM,	PPCNONE,	{RT, RA, RB}},
-+
-+{"clcs",	X(31,531),	XRB_MASK,    M601,	PPCNONE,	{RT, RA}},
-+
-+{"ldbrx",	X(31,532),	X_MASK,    CELL|POWER7,	PPCNONE,	{RT, RA0, RB}},
-+
-+{"lswx",	X(31,533),	X_MASK,      PPCCOM,	PPCNONE,	{RT, RA0, RB}},
-+{"lsx",		X(31,533),	X_MASK,      PWRCOM,	PPCNONE,	{RT, RA, RB}},
-+
-+{"lwbrx",	X(31,534),	X_MASK,      PPCCOM,	PPCNONE,	{RT, RA0, RB}},
-+{"lbrx",	X(31,534),	X_MASK,      PWRCOM,	PPCNONE,	{RT, RA, RB}},
-+
-+{"lfsx",	X(31,535),	X_MASK,      COM,	PPCNONE,	{FRT, RA0, RB}},
-+
-+{"srw",		XRC(31,536,0),	X_MASK,      PPCCOM,	PPCNONE,	{RA, RS, RB}},
-+{"sr",		XRC(31,536,0),	X_MASK,      PWRCOM,	PPCNONE,	{RA, RS, RB}},
-+{"srw.",	XRC(31,536,1),	X_MASK,      PPCCOM,	PPCNONE,	{RA, RS, RB}},
-+{"sr.",		XRC(31,536,1),	X_MASK,      PWRCOM,	PPCNONE,	{RA, RS, RB}},
-+
-+{"rrib",	XRC(31,537,0),	X_MASK,      M601,	PPCNONE,	{RA, RS, RB}},
-+{"rrib.",	XRC(31,537,1),	X_MASK,      M601,	PPCNONE,	{RA, RS, RB}},
-+
-+{"srd",		XRC(31,539,0),	X_MASK,      PPC64,	PPCNONE,	{RA, RS, RB}},
-+{"srd.",	XRC(31,539,1),	X_MASK,      PPC64,	PPCNONE,	{RA, RS, RB}},
-+
-+{"maskir",	XRC(31,541,0),	X_MASK,      M601,	PPCNONE,	{RA, RS, RB}},
-+{"maskir.",	XRC(31,541,1),	X_MASK,      M601,	PPCNONE,	{RA, RS, RB}},
-+
-+{"lhdx",	X(31,547),	X_MASK,      E500MC,	PPCNONE,	{RT, RA, RB}},
-+
-+{"bbelr",	X(31,550),	X_MASK,      PPCBRLK,	PPCNONE,	{0}},
-+
-+{"lvrx",	X(31,551),	X_MASK,      CELL,	PPCNONE,	{VD, RA0, RB}},
-+{"lhfcmux",	APU(31,551,0), 	APU_MASK,    PPC405,	PPCNONE,	{FCRT, RA, RB}},
-+
-+{"subfo",	XO(31,40,1,0),	XO_MASK,     PPC,	PPCNONE,	{RT, RA, RB}},
-+{"subo",	XO(31,40,1,0),	XO_MASK,     PPC,	PPCNONE,	{RT, RB, RA}},
-+{"subfo.",	XO(31,40,1,1),	XO_MASK,     PPC,	PPCNONE,	{RT, RA, RB}},
-+{"subo.",	XO(31,40,1,1),	XO_MASK,     PPC,	PPCNONE,	{RT, RB, RA}},
-+
-+{"tlbsync",	X(31,566),	0xffffffff,  PPC,	PPCNONE,	{0}},
-+
-+{"lfsux",	X(31,567),	X_MASK,      COM,	PPCNONE,	{FRT, RAS, RB}},
-+
-+{"lwdx",	X(31,579),	X_MASK,      E500MC,	PPCNONE,	{RT, RA, RB}},
-+
-+{"lwfcmux",	APU(31,583,0), 	APU_MASK,    PPC405,	PPCNONE,	{FCRT, RA, RB}},
-+
-+{"lxsdx",	X(31,588),	XX1_MASK,    PPCVSX,	PPCNONE,	{XT6, RA, RB}},
-+
-+{"mfsr",	X(31,595), XRB_MASK|(1<<20), COM32,	PPCNONE,	{RT, SR}},
-+
-+{"lswi",	X(31,597),	X_MASK,      PPCCOM,	PPCNONE,	{RT, RA0, NB}},
-+{"lsi",		X(31,597),	X_MASK,      PWRCOM,	PPCNONE,	{RT, RA0, NB}},
-+
-+{"msync",	X(31,598),	0xffffffff,  BOOKE,	PPCNONE,	{0}},
-+{"lwsync",	XSYNC(31,598,1), 0xffffffff, PPC,	PPCNONE,	{0}},
-+{"ptesync",	XSYNC(31,598,2), 0xffffffff, PPC64,	PPCNONE,	{0}},
-+{"sync",	X(31,598),	XSYNC_MASK,  PPCCOM,	PPCNONE,	{LS}},
-+{"dcs",		X(31,598),	0xffffffff,  PWRCOM,	PPCNONE,	{0}},
-+
-+{"lfdx",	X(31,599),	X_MASK,      COM,	PPCNONE,	{FRT, RA0, RB}},
-+
-+{"lfdepx",	X(31,607),	X_MASK,      E500MC,	PPCNONE,	{FRT, RA, RB}},
-+{"mffgpr",	XRC(31,607,0),	XRA_MASK,    POWER6,	POWER7,		{FRT, RB}},
-+
-+{"lddx",	X(31,611),	X_MASK,      E500MC,	PPCNONE,	{RT, RA, RB}},
-+
-+{"lqfcmux",	APU(31,615,0), 	APU_MASK,    PPC405,	PPCNONE,	{FCRT, RA, RB}},
-+
-+{"nego",	XO(31,104,1,0),	XORB_MASK,   COM,	PPCNONE,	{RT, RA}},
-+{"nego.",	XO(31,104,1,1),	XORB_MASK,   COM,	PPCNONE,	{RT, RA}},
-+
-+{"mulo",	XO(31,107,1,0),	XO_MASK,     M601,	PPCNONE,	{RT, RA, RB}},
-+{"mulo.",	XO(31,107,1,1),	XO_MASK,     M601,	PPCNONE,	{RT, RA, RB}},
-+
-+{"lxsdux",	X(31,620),	XX1_MASK,    PPCVSX,	PPCNONE,	{XT6, RA, RB}},
-+
-+{"mfsri",	X(31,627),	X_MASK,      PWRCOM,	PPCNONE,	{RT, RA, RB}},
-+
-+{"dclst",	X(31,630),	XRB_MASK,    PWRCOM,	PPCNONE,	{RS, RA}},
-+
-+{"lfdux",	X(31,631),	X_MASK,      COM,	PPCNONE,	{FRT, RAS, RB}},
-+
-+{"stbdx",	X(31,643),	X_MASK,      E500MC,	PPCNONE,	{RS, RA, RB}},
-+
-+{"stvlx",	X(31,647),	X_MASK,      CELL,	PPCNONE,	{VS, RA0, RB}},
-+{"stbfcmux",	APU(31,647,0), 	APU_MASK,    PPC405,	PPCNONE,	{FCRT, RA, RB}},
-+
-+{"subfeo",	XO(31,136,1,0),	XO_MASK,     PPCCOM,	PPCNONE,	{RT, RA, RB}},
-+{"sfeo",	XO(31,136,1,0),	XO_MASK,     PWRCOM,	PPCNONE,	{RT, RA, RB}},
-+{"subfeo.",	XO(31,136,1,1),	XO_MASK,     PPCCOM,	PPCNONE,	{RT, RA, RB}},
-+{"sfeo.",	XO(31,136,1,1),	XO_MASK,     PWRCOM,	PPCNONE,	{RT, RA, RB}},
-+
-+{"addeo",	XO(31,138,1,0),	XO_MASK,     PPCCOM,	PPCNONE,	{RT, RA, RB}},
-+{"aeo",		XO(31,138,1,0),	XO_MASK,     PWRCOM,	PPCNONE,	{RT, RA, RB}},
-+{"addeo.",	XO(31,138,1,1),	XO_MASK,     PPCCOM,	PPCNONE,	{RT, RA, RB}},
-+{"aeo.",	XO(31,138,1,1),	XO_MASK,     PWRCOM,	PPCNONE,	{RT, RA, RB}},
-+
-+{"mfsrin",	X(31,659),	XRA_MASK,    PPC32,	PPCNONE,	{RT, RB}},
-+
-+{"stdbrx",	X(31,660),	X_MASK,    CELL|POWER7,	PPCNONE,	{RS, RA0, RB}},
-+
-+{"stswx",	X(31,661),	X_MASK,      PPCCOM,	PPCNONE,	{RS, RA0, RB}},
-+{"stsx",	X(31,661),	X_MASK,      PWRCOM,	PPCNONE,	{RS, RA0, RB}},
-+
-+{"stwbrx",	X(31,662),	X_MASK,      PPCCOM,	PPCNONE,	{RS, RA0, RB}},
-+{"stbrx",	X(31,662),	X_MASK,      PWRCOM,	PPCNONE,	{RS, RA0, RB}},
-+
-+{"stfsx",	X(31,663),	X_MASK,      COM,	PPCNONE,	{FRS, RA0, RB}},
-+
-+{"srq",		XRC(31,664,0),	X_MASK,      M601,	PPCNONE,	{RA, RS, RB}},
-+{"srq.",	XRC(31,664,1),	X_MASK,      M601,	PPCNONE,	{RA, RS, RB}},
-+
-+{"sre",		XRC(31,665,0),	X_MASK,      M601,	PPCNONE,	{RA, RS, RB}},
-+{"sre.",	XRC(31,665,1),	X_MASK,      M601,	PPCNONE,	{RA, RS, RB}},
-+
-+{"sthdx",	X(31,675),	X_MASK,      E500MC,	PPCNONE,	{RS, RA, RB}},
-+
-+{"stvrx",	X(31,679),	X_MASK,      CELL,	PPCNONE,	{VS, RA0, RB}},
-+{"sthfcmux",	APU(31,679,0), 	APU_MASK,    PPC405,	PPCNONE,	{FCRT, RA, RB}},
-+
-+{"stbcx.",	XRC(31,694,1),	X_MASK,      POWER7,	PPCNONE,	{RS, RA0, RB}},
-+
-+{"stfsux",	X(31,695),	X_MASK,      COM,	PPCNONE,	{FRS, RAS, RB}},
-+
-+{"sriq",	XRC(31,696,0),	X_MASK,      M601,	PPCNONE,	{RA, RS, SH}},
-+{"sriq.",	XRC(31,696,1),	X_MASK,      M601,	PPCNONE,	{RA, RS, SH}},
-+
-+{"stwdx",	X(31,707),	X_MASK,      E500MC,	PPCNONE,	{RS, RA, RB}},
-+
-+{"stwfcmux",	APU(31,711,0), 	APU_MASK,    PPC405,	PPCNONE,	{FCRT, RA, RB}},
-+
-+{"stxsdx",	X(31,716),	XX1_MASK,    PPCVSX,	PPCNONE,	{XS6, RA, RB}},
-+
-+{"subfzeo",	XO(31,200,1,0),	XORB_MASK,   PPCCOM,	PPCNONE,	{RT, RA}},
-+{"sfzeo",	XO(31,200,1,0),	XORB_MASK,   PWRCOM,	PPCNONE,	{RT, RA}},
-+{"subfzeo.",	XO(31,200,1,1),	XORB_MASK,   PPCCOM,	PPCNONE,	{RT, RA}},
-+{"sfzeo.",	XO(31,200,1,1),	XORB_MASK,   PWRCOM,	PPCNONE,	{RT, RA}},
-+
-+{"addzeo",	XO(31,202,1,0),	XORB_MASK,   PPCCOM,	PPCNONE,	{RT, RA}},
-+{"azeo",	XO(31,202,1,0),	XORB_MASK,   PWRCOM,	PPCNONE,	{RT, RA}},
-+{"addzeo.",	XO(31,202,1,1),	XORB_MASK,   PPCCOM,	PPCNONE,	{RT, RA}},
-+{"azeo.",	XO(31,202,1,1),	XORB_MASK,   PWRCOM,	PPCNONE,	{RT, RA}},
-+
-+{"stswi",	X(31,725),	X_MASK,      PPCCOM,	PPCNONE,	{RS, RA0, NB}},
-+{"stsi",	X(31,725),	X_MASK,      PWRCOM,	PPCNONE,	{RS, RA0, NB}},
-+
-+{"sthcx.",	XRC(31,726,1),	X_MASK,      POWER7,	PPCNONE,	{RS, RA0, RB}},
-+
-+{"stfdx",	X(31,727),	X_MASK,      COM,	PPCNONE,	{FRS, RA0, RB}},
-+
-+{"srlq",	XRC(31,728,0),	X_MASK,      M601,	PPCNONE,	{RA, RS, RB}},
-+{"srlq.",	XRC(31,728,1),	X_MASK,      M601,	PPCNONE,	{RA, RS, RB}},
-+
-+{"sreq",	XRC(31,729,0),	X_MASK,      M601,	PPCNONE,	{RA, RS, RB}},
-+{"sreq.",	XRC(31,729,1),	X_MASK,      M601,	PPCNONE,	{RA, RS, RB}},
-+
-+{"stfdepx",	X(31,735),	X_MASK,      E500MC,	PPCNONE,	{FRS, RA, RB}},
-+{"mftgpr",	XRC(31,735,0),	XRA_MASK,    POWER6,	POWER7,		{RT, FRB}},
-+
-+{"stddx",	X(31,739),	X_MASK,      E500MC,	PPCNONE,	{RS, RA, RB}},
-+
-+{"stqfcmux",	APU(31,743,0), 	APU_MASK,    PPC405,	PPCNONE,	{FCRT, RA, RB}},
-+
-+{"stxsdux",	X(31,748),	XX1_MASK,    PPCVSX,	PPCNONE,	{XS6, RA, RB}},
-+
-+{"subfmeo",	XO(31,232,1,0),	XORB_MASK,   PPCCOM,	PPCNONE,	{RT, RA}},
-+{"sfmeo",	XO(31,232,1,0),	XORB_MASK,   PWRCOM,	PPCNONE,	{RT, RA}},
-+{"subfmeo.",	XO(31,232,1,1),	XORB_MASK,   PPCCOM,	PPCNONE,	{RT, RA}},
-+{"sfmeo.",	XO(31,232,1,1),	XORB_MASK,   PWRCOM,	PPCNONE,	{RT, RA}},
-+
-+{"mulldo",	XO(31,233,1,0),	XO_MASK,     PPC64,	PPCNONE,	{RT, RA, RB}},
-+{"mulldo.",	XO(31,233,1,1),	XO_MASK,     PPC64,	PPCNONE,	{RT, RA, RB}},
-+
-+{"addmeo",	XO(31,234,1,0),	XORB_MASK,   PPCCOM,	PPCNONE,	{RT, RA}},
-+{"ameo",	XO(31,234,1,0),	XORB_MASK,   PWRCOM,	PPCNONE,	{RT, RA}},
-+{"addmeo.",	XO(31,234,1,1),	XORB_MASK,   PPCCOM,	PPCNONE,	{RT, RA}},
-+{"ameo.",	XO(31,234,1,1),	XORB_MASK,   PWRCOM,	PPCNONE,	{RT, RA}},
-+
-+{"mullwo",	XO(31,235,1,0),	XO_MASK,     PPCCOM,	PPCNONE,	{RT, RA, RB}},
-+{"mulso",	XO(31,235,1,0),	XO_MASK,     PWRCOM,	PPCNONE,	{RT, RA, RB}},
-+{"mullwo.",	XO(31,235,1,1),	XO_MASK,     PPCCOM,	PPCNONE,	{RT, RA, RB}},
-+{"mulso.",	XO(31,235,1,1),	XO_MASK,     PWRCOM,	PPCNONE,	{RT, RA, RB}},
-+
-+{"dcba",	X(31,758), XRT_MASK, PPC405|PPC7450|BOOKE, PPCNONE,	{RA, RB}},
-+{"dcbal",	XOPL(31,758,1), XRT_MASK,    E500MC,	PPCNONE,	{RA, RB}},
-+
-+{"stfdux",	X(31,759),	X_MASK,      COM,	PPCNONE,	{FRS, RAS, RB}},
-+
-+{"srliq",	XRC(31,760,0),	X_MASK,      M601,	PPCNONE,	{RA, RS, SH}},
-+{"srliq.",	XRC(31,760,1),	X_MASK,      M601,	PPCNONE,	{RA, RS, SH}},
-+
-+{"lvlxl",	X(31,775),	X_MASK,      CELL,	PPCNONE,	{VD, RA0, RB}},
-+{"ldfcmux",	APU(31,775,0), 	APU_MASK,    PPC405,	PPCNONE,	{FCRT, RA, RB}},
-+
-+{"dozo",	XO(31,264,1,0),	XO_MASK,     M601,	PPCNONE,	{RT, RA, RB}},
-+{"dozo.",	XO(31,264,1,1),	XO_MASK,     M601,	PPCNONE,	{RT, RA, RB}},
-+
-+{"addo",	XO(31,266,1,0),	XO_MASK,     PPCCOM,	PPCNONE,	{RT, RA, RB}},
-+{"caxo",	XO(31,266,1,0),	XO_MASK,     PWRCOM,	PPCNONE,	{RT, RA, RB}},
-+{"addo.",	XO(31,266,1,1),	XO_MASK,     PPCCOM,	PPCNONE,	{RT, RA, RB}},
-+{"caxo.",	XO(31,266,1,1),	XO_MASK,     PWRCOM,	PPCNONE,	{RT, RA, RB}},
-+
-+{"lxvw4x",	X(31,780),	XX1_MASK,    PPCVSX,	PPCNONE,	{XT6, RA, RB}},
-+
-+{"tlbivax",	X(31,786),	XRT_MASK,    BOOKE,	PPCNONE,	{RA, RB}},
-+{"tlbilx",	X(31,787),	X_MASK,      E500MC,	PPCNONE,	{T, RA0, RB}},
-+{"tlbilxlpid",	XTO(31,787,0),	XTO_MASK,    E500MC,	PPCNONE,	{0}},
-+{"tlbilxpid",	XTO(31,787,1),	XTO_MASK,    E500MC,	PPCNONE,	{0}},
-+{"tlbilxva",	XTO(31,787,3),	XTO_MASK,    E500MC,	PPCNONE,	{RA0, RB}},
-+
-+{"lwzcix",	X(31,789),	X_MASK,      POWER6,	PPCNONE,	{RT, RA0, RB}},
-+
-+{"lhbrx",	X(31,790),	X_MASK,      COM,	PPCNONE,	{RT, RA0, RB}},
-+
-+{"lfdpx",	X(31,791),	X_MASK,      POWER6,	POWER7,		{FRT, RA, RB}},
-+{"lfqx",	X(31,791),	X_MASK,      POWER2,	PPCNONE,	{FRT, RA, RB}},
-+
-+{"sraw",	XRC(31,792,0),	X_MASK,      PPCCOM,	PPCNONE,	{RA, RS, RB}},
-+{"sra",		XRC(31,792,0),	X_MASK,      PWRCOM,	PPCNONE,	{RA, RS, RB}},
-+{"sraw.",	XRC(31,792,1),	X_MASK,      PPCCOM,	PPCNONE,	{RA, RS, RB}},
-+{"sra.",	XRC(31,792,1),	X_MASK,      PWRCOM,	PPCNONE,	{RA, RS, RB}},
-+
-+{"srad",	XRC(31,794,0),	X_MASK,      PPC64,	PPCNONE,	{RA, RS, RB}},
-+{"srad.",	XRC(31,794,1),	X_MASK,      PPC64,	PPCNONE,	{RA, RS, RB}},
-+
-+{"lfddx",	X(31,803),	X_MASK,      E500MC,	PPCNONE,	{FRT, RA, RB}},
-+
-+{"lvrxl",	X(31,807),	X_MASK,      CELL,	PPCNONE,	{VD, RA0, RB}},
-+
-+{"lxvw4ux",	X(31,812),	XX1_MASK,    PPCVSX,	PPCNONE,	{XT6, RA, RB}},
-+
-+{"rac",		X(31,818),	X_MASK,      PWRCOM,	PPCNONE,	{RT, RA, RB}},
-+
-+{"lhzcix",	X(31,821),	X_MASK,      POWER6,	PPCNONE,	{RT, RA0, RB}},
-+
-+{"dss",		XDSS(31,822,0),	XDSS_MASK,   PPCVEC,	PPCNONE,	{STRM}},
-+
-+{"lfqux",	X(31,823),	X_MASK,      POWER2,	PPCNONE,	{FRT, RA, RB}},
-+
-+{"srawi",	XRC(31,824,0),	X_MASK,      PPCCOM,	PPCNONE,	{RA, RS, SH}},
-+{"srai",	XRC(31,824,0),	X_MASK,      PWRCOM,	PPCNONE,	{RA, RS, SH}},
-+{"srawi.",	XRC(31,824,1),	X_MASK,      PPCCOM,	PPCNONE,	{RA, RS, SH}},
-+{"srai.",	XRC(31,824,1),	X_MASK,      PWRCOM,	PPCNONE,	{RA, RS, SH}},
-+
-+{"sradi",	XS(31,413,0),	XS_MASK,     PPC64,	PPCNONE,	{RA, RS, SH6}},
-+{"sradi.",	XS(31,413,1),	XS_MASK,     PPC64,	PPCNONE,	{RA, RS, SH6}},
-+
-+{"divo",	XO(31,331,1,0),	XO_MASK,     M601,	PPCNONE,	{RT, RA, RB}},
-+{"divo.",	XO(31,331,1,1),	XO_MASK,     M601,	PPCNONE,	{RT, RA, RB}},
-+
-+{"lxvd2x",	X(31,844),	XX1_MASK,    PPCVSX,	PPCNONE,	{XT6, RA, RB}},
-+
-+{"slbmfev",	X(31,851),	XRA_MASK,    PPC64,	PPCNONE,	{RT, RB}},
-+
-+{"lbzcix",	X(31,853),	X_MASK,      POWER6,	PPCNONE,	{RT, RA0, RB}},
-+
-+{"mbar",	X(31,854),	X_MASK,      BOOKE,	PPCNONE,	{MO}},
-+{"eieio",	X(31,854),	0xffffffff,  PPC,	PPCNONE,	{0}},
-+
-+{"lfiwax",	X(31,855),	X_MASK,      POWER6,	PPCNONE,	{FRT, RA0, RB}},
-+
-+{"abso",	XO(31,360,1,0),	XORB_MASK,   M601,	PPCNONE,	{RT, RA}},
-+{"abso.",	XO(31,360,1,1),	XORB_MASK,   M601,	PPCNONE,	{RT, RA}},
-+
-+{"divso",	XO(31,363,1,0),	XO_MASK,     M601,	PPCNONE,	{RT, RA, RB}},
-+{"divso.",	XO(31,363,1,1),	XO_MASK,     M601,	PPCNONE,	{RT, RA, RB}},
-+
-+{"lxvd2ux",	X(31,876),	XX1_MASK,    PPCVSX,	PPCNONE,	{XT6, RA, RB}},
-+
-+{"ldcix",	X(31,885),	X_MASK,      POWER6,	PPCNONE,	{RT, RA0, RB}},
-+
-+{"lfiwzx",	X(31,887),	X_MASK,      POWER7,	PPCNONE,	{FRT, RA0, RB}},
-+
-+{"stvlxl",	X(31,903),	X_MASK,      CELL,	PPCNONE,	{VS, RA0, RB}},
-+{"stdfcmux",	APU(31,903,0), 	APU_MASK,    PPC405,	PPCNONE,	{FCRT, RA, RB}},
-+
-+{"divdeuo",	XO(31,393,1,0),	XO_MASK,     POWER7,	PPCNONE,	{RT, RA, RB}},
-+{"divdeuo.",	XO(31,393,1,1),	XO_MASK,     POWER7,	PPCNONE,	{RT, RA, RB}},
-+{"divweuo",	XO(31,395,1,0),	XO_MASK,     POWER7,	PPCNONE,	{RT, RA, RB}},
-+{"divweuo.",	XO(31,395,1,1),	XO_MASK,     POWER7,	PPCNONE,	{RT, RA, RB}},
-+
-+{"stxvw4x",	X(31,908),	XX1_MASK,    PPCVSX,	PPCNONE,	{XS6, RA, RB}},
-+
-+{"tlbsx",	XRC(31,914,0),	X_MASK,   PPC403|BOOKE,	PPCNONE,	{RTO, RA, RB}},
-+{"tlbsx.",	XRC(31,914,1),	X_MASK,   PPC403|BOOKE,	PPCNONE,	{RTO, RA, RB}},
-+
-+{"slbmfee",	X(31,915),	XRA_MASK,    PPC64,	PPCNONE,	{RT, RB}},
-+
-+{"stwcix",	X(31,917),	X_MASK,      POWER6,	PPCNONE,	{RS, RA0, RB}},
-+
-+{"sthbrx",	X(31,918),	X_MASK,      COM,	PPCNONE,	{RS, RA0, RB}},
-+
-+{"stfdpx",	X(31,919),	X_MASK,      POWER6,	PPCNONE,	{FRS, RA, RB}},
-+{"stfqx",	X(31,919),	X_MASK,      POWER2,	PPCNONE,	{FRS, RA, RB}},
-+
-+{"sraq",	XRC(31,920,0),	X_MASK,      M601,	PPCNONE,	{RA, RS, RB}},
-+{"sraq.",	XRC(31,920,1),	X_MASK,      M601,	PPCNONE,	{RA, RS, RB}},
-+
-+{"srea",	XRC(31,921,0),	X_MASK,      M601,	PPCNONE,	{RA, RS, RB}},
-+{"srea.",	XRC(31,921,1),	X_MASK,      M601,	PPCNONE,	{RA, RS, RB}},
-+
-+{"extsh",	XRC(31,922,0),	XRB_MASK,    PPCCOM,	PPCNONE,	{RA, RS}},
-+{"exts",	XRC(31,922,0),	XRB_MASK,    PWRCOM,	PPCNONE,	{RA, RS}},
-+{"extsh.",	XRC(31,922,1),	XRB_MASK,    PPCCOM,	PPCNONE,	{RA, RS}},
-+{"exts.",	XRC(31,922,1),	XRB_MASK,    PWRCOM,	PPCNONE,	{RA, RS}},
-+
-+{"stfddx",	X(31,931),	X_MASK,      E500MC,	PPCNONE,	{FRS, RA, RB}},
-+
-+{"stvrxl",	X(31,935),	X_MASK,      CELL,	PPCNONE,	{VS, RA0, RB}},
-+
-+{"divdeo",	XO(31,425,1,0),	XO_MASK,     POWER7,	PPCNONE,	{RT, RA, RB}},
-+{"divdeo.",	XO(31,425,1,1),	XO_MASK,     POWER7,	PPCNONE,	{RT, RA, RB}},
-+{"divweo",	XO(31,427,1,0),	XO_MASK,     POWER7,	PPCNONE,	{RT, RA, RB}},
-+{"divweo.",	XO(31,427,1,1),	XO_MASK,     POWER7,	PPCNONE,	{RT, RA, RB}},
-+
-+{"stxvw4ux",	X(31,940),	XX1_MASK,    PPCVSX,	PPCNONE,	{XS6, RA, RB}},
-+
-+{"tlbrehi",	XTLB(31,946,0),	XTLB_MASK,   PPC403,	PPCNONE,	{RT, RA}},
-+{"tlbrelo",	XTLB(31,946,1),	XTLB_MASK,   PPC403,	PPCNONE,	{RT, RA}},
-+{"tlbre",	X(31,946),	X_MASK,   PPC403|BOOKE,	PPCNONE,	{RSO, RAOPT, SHO}},
-+
-+{"sthcix",	X(31,949),	X_MASK,      POWER6,	PPCNONE,	{RS, RA0, RB}},
-+
-+{"stfqux",	X(31,951),	X_MASK,      POWER2,	PPCNONE,	{FRS, RA, RB}},
-+
-+{"sraiq",	XRC(31,952,0),	X_MASK,      M601,	PPCNONE,	{RA, RS, SH}},
-+{"sraiq.",	XRC(31,952,1),	X_MASK,      M601,	PPCNONE,	{RA, RS, SH}},
-+
-+{"extsb",	XRC(31,954,0),	XRB_MASK,    PPC,	PPCNONE,	{RA, RS}},
-+{"extsb.",	XRC(31,954,1),	XRB_MASK,    PPC,	PPCNONE,	{RA, RS}},
-+
-+{"iccci",	X(31,966),     XRT_MASK, PPC403|PPC440,	PPCNONE,	{RA, RB}},
-+
-+{"divduo",	XO(31,457,1,0),	XO_MASK,     PPC64,	PPCNONE,	{RT, RA, RB}},
-+{"divduo.",	XO(31,457,1,1),	XO_MASK,     PPC64,	PPCNONE,	{RT, RA, RB}},
-+
-+{"divwuo",	XO(31,459,1,0),	XO_MASK,     PPC,	PPCNONE,	{RT, RA, RB}},
-+{"divwuo.",	XO(31,459,1,1),	XO_MASK,     PPC,	PPCNONE,	{RT, RA, RB}},
-+
-+{"stxvd2x",	X(31,972),	XX1_MASK,    PPCVSX,	PPCNONE,	{XS6, RA, RB}},
-+
-+{"tlbwehi",	XTLB(31,978,0),	XTLB_MASK,   PPC403,	PPCNONE,	{RT, RA}},
-+{"tlbwelo",	XTLB(31,978,1),	XTLB_MASK,   PPC403,	PPCNONE,	{RT, RA}},
-+{"tlbwe",	X(31,978),	X_MASK,   PPC403|BOOKE,	PPCNONE,	{RSO, RAOPT, SHO}},
-+{"tlbld",	X(31,978),	XRTRA_MASK,  PPC,	PPCNONE,	{RB}},
-+
-+{"stbcix",	X(31,981),	X_MASK,      POWER6,	PPCNONE,	{RS, RA0, RB}},
-+
-+{"icbi",	X(31,982),	XRT_MASK,    PPC,	PPCNONE,	{RA, RB}},
-+
-+{"stfiwx",	X(31,983),	X_MASK,      PPC,	PPCNONE,	{FRS, RA0, RB}},
-+
-+{"extsw",	XRC(31,986,0),  XRB_MASK,    PPC64,	PPCNONE,	{RA, RS}},
-+{"extsw.",	XRC(31,986,1),	XRB_MASK,    PPC64,	PPCNONE,	{RA, RS}},
-+
-+{"icbiep",	XRT(31,991,0),	XRT_MASK,    E500MC,	PPCNONE,	{RA, RB}},
-+
-+{"icread",	X(31,998),     XRT_MASK, PPC403|PPC440,	PPCNONE,	{RA, RB}},
-+
-+{"nabso",	XO(31,488,1,0),	XORB_MASK,   M601,	PPCNONE,	{RT, RA}},
-+{"nabso.",	XO(31,488,1,1),	XORB_MASK,   M601,	PPCNONE,	{RT, RA}},
-+
-+{"divdo",	XO(31,489,1,0),	XO_MASK,     PPC64,	PPCNONE,	{RT, RA, RB}},
-+{"divdo.",	XO(31,489,1,1),	XO_MASK,     PPC64,	PPCNONE,	{RT, RA, RB}},
-+
-+{"divwo",	XO(31,491,1,0),	XO_MASK,     PPC,	PPCNONE,	{RT, RA, RB}},
-+{"divwo.",	XO(31,491,1,1),	XO_MASK,     PPC,	PPCNONE,	{RT, RA, RB}},
-+
-+{"stxvd2ux",	X(31,1004),	XX1_MASK,    PPCVSX,	PPCNONE,	{XS6, RA, RB}},
-+
-+{"tlbli",	X(31,1010),	XRTRA_MASK,  PPC,	PPCNONE,	{RB}},
-+
-+{"stdcix",	X(31,1013),	X_MASK,      POWER6,	PPCNONE,	{RS, RA0, RB}},
-+
-+{"dcbz",	X(31,1014),	XRT_MASK,    PPC,	PPCNONE,	{RA, RB}},
-+{"dclz",	X(31,1014),	XRT_MASK,    PPC,	PPCNONE,	{RA, RB}},
-+
-+{"dcbzep",	XRT(31,1023,0),	XRT_MASK,    E500MC,	PPCNONE,	{RA, RB}},
-+
-+{"dcbzl",	XOPL(31,1014,1), XRT_MASK,   POWER4,	PPCNONE,	{RA, RB}},
-+{"dcbzl",	XOPL(31,1014,1), XRT_MASK,   PPCCOM|E500MC,POWER4,	{RA, RB}},
-+
-+{"cctpl",	0x7c210b78,	0xffffffff,  CELL,	PPCNONE,	{0}},
-+{"cctpm",	0x7c421378,	0xffffffff,  CELL,	PPCNONE,	{0}},
-+{"cctph",	0x7c631b78,	0xffffffff,  CELL,	PPCNONE,	{0}},
-+
-+{"dstt",	XDSS(31,342,1),	XDSS_MASK,   PPCVEC,	PPCNONE,	{RA, RB, STRM}},
-+{"dststt",	XDSS(31,374,1),	XDSS_MASK,   PPCVEC,	PPCNONE,	{RA, RB, STRM}},
-+{"dssall",	XDSS(31,822,1),	XDSS_MASK,   PPCVEC,	PPCNONE,	{0}},
-+
-+{"db8cyc",	0x7f9ce378,	0xffffffff,  CELL,	PPCNONE,	{0}},
-+{"db10cyc",	0x7fbdeb78,	0xffffffff,  CELL,	PPCNONE,	{0}},
-+{"db12cyc",	0x7fdef378,	0xffffffff,  CELL,	PPCNONE,	{0}},
-+{"db16cyc",	0x7ffffb78,	0xffffffff,  CELL,	PPCNONE,	{0}},
-+
-+{"lwz",		OP(32),		OP_MASK,     PPCCOM,	PPCNONE,	{RT, D, RA0}},
-+{"l",		OP(32),		OP_MASK,     PWRCOM,	PPCNONE,	{RT, D, RA0}},
-+
-+{"lwzu",	OP(33),		OP_MASK,     PPCCOM,	PPCNONE,	{RT, D, RAL}},
-+{"lu",		OP(33),		OP_MASK,     PWRCOM,	PPCNONE,	{RT, D, RA0}},
-+
-+{"lbz",		OP(34),		OP_MASK,     COM,	PPCNONE,	{RT, D, RA0}},
-+
-+{"lbzu",	OP(35),		OP_MASK,     COM,	PPCNONE,	{RT, D, RAL}},
-+
-+{"stw",		OP(36),		OP_MASK,     PPCCOM,	PPCNONE,	{RS, D, RA0}},
-+{"st",		OP(36),		OP_MASK,     PWRCOM,	PPCNONE,	{RS, D, RA0}},
-+
-+{"stwu",	OP(37),		OP_MASK,     PPCCOM,	PPCNONE,	{RS, D, RAS}},
-+{"stu",		OP(37),		OP_MASK,     PWRCOM,	PPCNONE,	{RS, D, RA0}},
-+
-+{"stb",		OP(38),		OP_MASK,     COM,	PPCNONE,	{RS, D, RA0}},
-+
-+{"stbu",	OP(39),		OP_MASK,     COM,	PPCNONE,	{RS, D, RAS}},
-+
-+{"lhz",		OP(40),		OP_MASK,     COM,	PPCNONE,	{RT, D, RA0}},
-+
-+{"lhzu",	OP(41),		OP_MASK,     COM,	PPCNONE,	{RT, D, RAL}},
-+
-+{"lha",		OP(42),		OP_MASK,     COM,	PPCNONE,	{RT, D, RA0}},
-+
-+{"lhau",	OP(43),		OP_MASK,     COM,	PPCNONE,	{RT, D, RAL}},
-+
-+{"sth",		OP(44),		OP_MASK,     COM,	PPCNONE,	{RS, D, RA0}},
-+
-+{"sthu",	OP(45),		OP_MASK,     COM,	PPCNONE,	{RS, D, RAS}},
-+
-+{"lmw",		OP(46),		OP_MASK,     PPCCOM,	PPCNONE,	{RT, D, RAM}},
-+{"lm",		OP(46),		OP_MASK,     PWRCOM,	PPCNONE,	{RT, D, RA0}},
-+
-+{"stmw",	OP(47),		OP_MASK,     PPCCOM,	PPCNONE,	{RS, D, RA0}},
-+{"stm",		OP(47),		OP_MASK,     PWRCOM,	PPCNONE,	{RS, D, RA0}},
-+
-+{"lfs",		OP(48),		OP_MASK,     COM,	PPCNONE,	{FRT, D, RA0}},
-+
-+{"lfsu",	OP(49),		OP_MASK,     COM,	PPCNONE,	{FRT, D, RAS}},
-+
-+{"lfd",		OP(50),		OP_MASK,     COM,	PPCNONE,	{FRT, D, RA0}},
-+
-+{"lfdu",	OP(51),		OP_MASK,     COM,	PPCNONE,	{FRT, D, RAS}},
-+
-+{"stfs",	OP(52),		OP_MASK,     COM,	PPCNONE,	{FRS, D, RA0}},
-+
-+{"stfsu",	OP(53),		OP_MASK,     COM,	PPCNONE,	{FRS, D, RAS}},
-+
-+{"stfd",	OP(54),		OP_MASK,     COM,	PPCNONE,	{FRS, D, RA0}},
-+
-+{"stfdu",	OP(55),		OP_MASK,     COM,	PPCNONE,	{FRS, D, RAS}},
-+
-+{"lq",		OP(56),		OP_MASK,     POWER4,	PPCNONE,	{RTQ, DQ, RAQ}},
-+
-+{"lfq",		OP(56),		OP_MASK,     POWER2,	PPCNONE,	{FRT, D, RA0}},
-+
-+{"psq_l",	OP(56),		OP_MASK,     PPCPS,	PPCNONE,	{FRT,PSD,RA,PSW,PSQ}},
-+
-+{"lfdp",	OP(57),		OP_MASK,     POWER6,	POWER7,		{FRT, D, RA0}},
-+
-+{"lfqu",	OP(57),		OP_MASK,     POWER2,	PPCNONE,	{FRT, D, RA0}},
-+
-+{"psq_lu",	OP(57),		OP_MASK,     PPCPS,	PPCNONE,	{FRT,PSD,RA,PSW,PSQ}},
-+
-+{"ld",		DSO(58,0),	DS_MASK,     PPC64,	PPCNONE,	{RT, DS, RA0}},
-+{"ldu",		DSO(58,1),	DS_MASK,     PPC64,	PPCNONE,	{RT, DS, RAL}},
-+{"lwa",		DSO(58,2),	DS_MASK,     PPC64,	PPCNONE,	{RT, DS, RA0}},
-+
-+{"dadd",	XRC(59,2,0),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRA, FRB}},
-+{"dadd.",	XRC(59,2,1),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRA, FRB}},
-+
-+{"dqua",	ZRC(59,3,0),	Z2_MASK,     POWER6,	PPCNONE,	{FRT,FRA,FRB,RMC}},
-+{"dqua.",	ZRC(59,3,1),	Z2_MASK,     POWER6,	PPCNONE,	{FRT,FRA,FRB,RMC}},
-+
-+{"fdivs",	A(59,18,0),	AFRC_MASK,   PPC,	PPCNONE,	{FRT, FRA, FRB}},
-+{"fdivs.",	A(59,18,1),	AFRC_MASK,   PPC,	PPCNONE,	{FRT, FRA, FRB}},
-+
-+{"fsubs",	A(59,20,0),	AFRC_MASK,   PPC,	PPCNONE,	{FRT, FRA, FRB}},
-+{"fsubs.",	A(59,20,1),	AFRC_MASK,   PPC,	PPCNONE,	{FRT, FRA, FRB}},
-+
-+{"fadds",	A(59,21,0),	AFRC_MASK,   PPC,	PPCNONE,	{FRT, FRA, FRB}},
-+{"fadds.",	A(59,21,1),	AFRC_MASK,   PPC,	PPCNONE,	{FRT, FRA, FRB}},
-+
-+{"fsqrts",	A(59,22,0),    AFRAFRC_MASK, PPC,	PPCNONE,	{FRT, FRB}},
-+{"fsqrts.",	A(59,22,1),    AFRAFRC_MASK, PPC,	PPCNONE,	{FRT, FRB}},
-+
-+{"fres",	A(59,24,0),   AFRALFRC_MASK, PPC,	POWER7,		{FRT, FRB, A_L}},
-+{"fres.",	A(59,24,1),   AFRALFRC_MASK, PPC,	POWER7,		{FRT, FRB, A_L}},
-+{"fres",	A(59,24,0),   AFRAFRC_MASK,  POWER7,	PPCNONE,	{FRT, FRB}},
-+{"fres.",	A(59,24,1),   AFRAFRC_MASK,  POWER7,	PPCNONE,	{FRT, FRB}},
-+
-+{"fmuls",	A(59,25,0),	AFRB_MASK,   PPC,	PPCNONE,	{FRT, FRA, FRC}},
-+{"fmuls.",	A(59,25,1),	AFRB_MASK,   PPC,	PPCNONE,	{FRT, FRA, FRC}},
-+
-+{"frsqrtes",	A(59,26,0),   AFRALFRC_MASK, POWER5,	POWER7,		{FRT, FRB, A_L}},
-+{"frsqrtes.",	A(59,26,1),   AFRALFRC_MASK, POWER5,	POWER7,		{FRT, FRB, A_L}},
-+{"frsqrtes",	A(59,26,0),   AFRAFRC_MASK,  POWER7,	PPCNONE,	{FRT, FRB}},
-+{"frsqrtes.",	A(59,26,1),   AFRAFRC_MASK,  POWER7,	PPCNONE,	{FRT, FRB}},
-+
-+{"fmsubs",	A(59,28,0),	A_MASK,      PPC,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"fmsubs.",	A(59,28,1),	A_MASK,      PPC,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+
-+{"fmadds",	A(59,29,0),	A_MASK,      PPC,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"fmadds.",	A(59,29,1),	A_MASK,      PPC,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+
-+{"fnmsubs",	A(59,30,0),	A_MASK,      PPC,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"fnmsubs.",	A(59,30,1),	A_MASK,      PPC,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+
-+{"fnmadds",	A(59,31,0),	A_MASK,      PPC,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"fnmadds.",	A(59,31,1),	A_MASK,      PPC,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+
-+{"dmul",	XRC(59,34,0),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRA, FRB}},
-+{"dmul.",	XRC(59,34,1),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRA, FRB}},
-+
-+{"drrnd",	ZRC(59,35,0),	Z2_MASK,     POWER6,	PPCNONE,	{FRT, FRA, FRB, RMC}},
-+{"drrnd.",	ZRC(59,35,1),	Z2_MASK,     POWER6,	PPCNONE,	{FRT, FRA, FRB, RMC}},
-+
-+{"dscli",	ZRC(59,66,0),	Z_MASK,      POWER6,	PPCNONE,	{FRT, FRA, SH16}},
-+{"dscli.",	ZRC(59,66,1),	Z_MASK,      POWER6,	PPCNONE,	{FRT, FRA, SH16}},
-+
-+{"dquai",	ZRC(59,67,0),	Z2_MASK,     POWER6,	PPCNONE,	{TE, FRT,FRB,RMC}},
-+{"dquai.",	ZRC(59,67,1),	Z2_MASK,     POWER6,	PPCNONE,	{TE, FRT,FRB,RMC}},
-+
-+{"dscri",	ZRC(59,98,0),	Z_MASK,      POWER6,	PPCNONE,	{FRT, FRA, SH16}},
-+{"dscri.",	ZRC(59,98,1),	Z_MASK,      POWER6,	PPCNONE,	{FRT, FRA, SH16}},
-+
-+{"drintx",	ZRC(59,99,0),	Z2_MASK,     POWER6,	PPCNONE,	{R, FRT, FRB, RMC}},
-+{"drintx.",	ZRC(59,99,1),	Z2_MASK,     POWER6,	PPCNONE,	{R, FRT, FRB, RMC}},
-+
-+{"dcmpo",	X(59,130),	X_MASK,      POWER6,	PPCNONE,	{BF,  FRA, FRB}},
-+
-+{"dtstex",	X(59,162),	X_MASK,      POWER6,	PPCNONE,	{BF,  FRA, FRB}},
-+{"dtstdc",	Z(59,194),	Z_MASK,      POWER6,	PPCNONE,	{BF,  FRA, DCM}},
-+{"dtstdg",	Z(59,226),	Z_MASK,      POWER6,	PPCNONE,	{BF,  FRA, DGM}},
-+
-+{"drintn",	ZRC(59,227,0),	Z2_MASK,     POWER6,	PPCNONE,	{R, FRT, FRB, RMC}},
-+{"drintn.",	ZRC(59,227,1),	Z2_MASK,     POWER6,	PPCNONE,	{R, FRT, FRB, RMC}},
-+
-+{"dctdp",	XRC(59,258,0),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRB}},
-+{"dctdp.",	XRC(59,258,1),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRB}},
-+
-+{"dctfix",	XRC(59,290,0),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRB}},
-+{"dctfix.",	XRC(59,290,1),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRB}},
-+
-+{"ddedpd",	XRC(59,322,0),	X_MASK,      POWER6,	PPCNONE,	{SP, FRT, FRB}}, 
-+{"ddedpd.",	XRC(59,322,1),	X_MASK,      POWER6,	PPCNONE,	{SP, FRT, FRB}}, 
-+
-+{"dxex",	XRC(59,354,0),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRB}},
-+{"dxex.",	XRC(59,354,1),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRB}},
-+
-+{"dsub",	XRC(59,514,0),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRA, FRB}},
-+{"dsub.",	XRC(59,514,1),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRA, FRB}},
-+
-+{"ddiv",	XRC(59,546,0),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRA, FRB}},
-+{"ddiv.",	XRC(59,546,1),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRA, FRB}},
-+
-+{"dcmpu",	X(59,642),	X_MASK,      POWER6,	PPCNONE,	{BF,  FRA, FRB}},
-+
-+{"dtstsf",	X(59,674),	X_MASK,      POWER6,	PPCNONE,	{BF,  FRA, FRB}},
-+
-+{"drsp",	XRC(59,770,0),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRB}},
-+{"drsp.",	XRC(59,770,1),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRB}},
-+
-+{"dcffix",	XRC(59,802,0), X_MASK|FRA_MASK, POWER7,	PPCNONE,	{FRT, FRB}},
-+{"dcffix.",	XRC(59,802,1), X_MASK|FRA_MASK, POWER7,	PPCNONE,	{FRT, FRB}},
-+
-+{"denbcd",	XRC(59,834,0),	X_MASK,      POWER6,	PPCNONE,	{S, FRT, FRB}},
-+{"denbcd.",	XRC(59,834,1),	X_MASK,      POWER6,	PPCNONE,	{S, FRT, FRB}},
-+
-+{"fcfids",	XRC(59,846,0),	XRA_MASK,    POWER7,	PPCNONE,	{FRT, FRB}},
-+{"fcfids.",	XRC(59,846,1),	XRA_MASK,    POWER7,	PPCNONE,	{FRT, FRB}},
-+
-+{"diex",	XRC(59,866,0),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRA, FRB}},
-+{"diex.",	XRC(59,866,1),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRA, FRB}},
-+
-+{"fcfidus",	XRC(59,974,0),	XRA_MASK,    POWER7,	PPCNONE,	{FRT, FRB}},
-+{"fcfidus.",	XRC(59,974,1),	XRA_MASK,    POWER7,	PPCNONE,	{FRT, FRB}},
-+
-+{"xxsldwi",	XX3(60,2),	XX3SHW_MASK, PPCVSX,	PPCNONE,	{XT6, XA6, XB6, SHW}},
-+{"xxsel",	XX4(60,3),	XX4_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6, XC6}},
-+{"xxspltd",	XX3(60,10),	XX3DM_MASK,  PPCVSX,	PPCNONE,	{XT6, XA6, XB6S, DMEX}},
-+{"xxmrghd",	XX3(60,10),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xxswapd",	XX3(60,10)|(2<<8), XX3_MASK, PPCVSX,	PPCNONE,	{XT6, XA6, XB6S}},
-+{"xxmrgld",	XX3(60,10)|(3<<8), XX3_MASK, PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xxpermdi",	XX3(60,10),	XX3DM_MASK,  PPCVSX,	PPCNONE,	{XT6, XA6, XB6, DM}},
-+{"xxmrghw",	XX3(60,18),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xsadddp",	XX3(60,32),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xsmaddadp",	XX3(60,33),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xscmpudp",	XX3(60,35),	XX3BF_MASK,  PPCVSX,	PPCNONE,	{BF, XA6, XB6}},
-+{"xssubdp",	XX3(60,40),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xsmaddmdp",	XX3(60,41),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xscmpodp",	XX3(60,43),	XX3BF_MASK,  PPCVSX,	PPCNONE,	{BF, XA6, XB6}},
-+{"xsmuldp",	XX3(60,48),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xsmsubadp",	XX3(60,49),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xxmrglw",	XX3(60,50),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xsdivdp",	XX3(60,56),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xsmsubmdp",	XX3(60,57),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xstdivdp",	XX3(60,61),	XX3BF_MASK,  PPCVSX,	PPCNONE,	{BF, XA6, XB6}},
-+{"xvaddsp",	XX3(60,64),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvmaddasp",	XX3(60,65),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvcmpeqsp",	XX3RC(60,67,0),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvcmpeqsp.",	XX3RC(60,67,1),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvsubsp",	XX3(60,72),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xscvdpuxws",	XX2(60,72),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvmaddmsp",	XX3(60,73),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xsrdpi",	XX2(60,73),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xsrsqrtedp",	XX2(60,74),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xssqrtdp",	XX2(60,75),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvcmpgtsp",	XX3RC(60,75,0),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvcmpgtsp.",	XX3RC(60,75,1),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvmulsp",	XX3(60,80),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvmsubasp",	XX3(60,81),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvcmpgesp",	XX3RC(60,83,0),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvcmpgesp.",	XX3RC(60,83,1),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvdivsp",	XX3(60,88),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xscvdpsxws",	XX2(60,88),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvmsubmsp",	XX3(60,89),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xsrdpiz",	XX2(60,89),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xsredp",	XX2(60,90),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvtdivsp",	XX3(60,93),	XX3BF_MASK,  PPCVSX,	PPCNONE,	{BF, XA6, XB6}},
-+{"xvadddp",	XX3(60,96),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvmaddadp",	XX3(60,97),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvcmpeqdp",	XX3RC(60,99,0),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvcmpeqdp.",	XX3RC(60,99,1),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvsubdp",	XX3(60,104),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvmaddmdp",	XX3(60,105),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xsrdpip",	XX2(60,105),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xstsqrtdp",	XX2(60,106),	XX2BF_MASK,  PPCVSX,	PPCNONE,	{BF, XB6}},
-+{"xsrdpic",	XX2(60,107),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvcmpgtdp",	XX3RC(60,107,0), XX3_MASK,   PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvcmpgtdp.",	XX3RC(60,107,1), XX3_MASK,   PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvmuldp",	XX3(60,112),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvmsubadp",	XX3(60,113),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvcmpgedp",	XX3RC(60,115,0), XX3_MASK,   PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvcmpgedp.",	XX3RC(60,115,1), XX3_MASK,   PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvdivdp",	XX3(60,120),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvmsubmdp",	XX3(60,121),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xsrdpim",	XX2(60,121),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvtdivdp",	XX3(60,125),	XX3BF_MASK,  PPCVSX,	PPCNONE,	{BF, XA6, XB6}},
-+{"xxland",	XX3(60,130),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvcvspuxws",	XX2(60,136),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvrspi",	XX2(60,137),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xxlandc",	XX3(60,138),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvrsqrtesp",	XX2(60,138),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvsqrtsp",	XX2(60,139),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xxlor",	XX3(60,146),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvcvspsxws",	XX2(60,152),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvrspiz",	XX2(60,153),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xxlxor",	XX3(60,154),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvresp",	XX2(60,154),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xsmaxdp",	XX3(60,160),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xsnmaddadp",	XX3(60,161),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xxlnor",	XX3(60,162),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xxspltw",	XX2(60,164),	XX2UIM_MASK, PPCVSX,	PPCNONE,	{XT6, XB6, UIM}},
-+{"xsmindp",	XX3(60,168),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvcvuxwsp",	XX2(60,168),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xsnmaddmdp",	XX3(60,169),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvrspip",	XX2(60,169),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvtsqrtsp",	XX2(60,170),	XX2BF_MASK,  PPCVSX,	PPCNONE,	{BF, XB6}},
-+{"xvrspic",	XX2(60,171),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xscpsgndp",	XX3(60,176),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xsnmsubadp",	XX3(60,177),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvcvsxwsp",	XX2(60,184),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xsnmsubmdp",	XX3(60,185),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvrspim",	XX2(60,185),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvmaxsp",	XX3(60,192),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvnmaddasp",	XX3(60,193),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvminsp",	XX3(60,200),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvcvdpuxws",	XX2(60,200),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvnmaddmsp",	XX3(60,201),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvrdpi",	XX2(60,201),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvrsqrtedp",	XX2(60,202),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvsqrtdp",	XX2(60,203),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvmovsp",	XX3(60,208),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6S}},
-+{"xvcpsgnsp",	XX3(60,208),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvnmsubasp",	XX3(60,209),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvcvdpsxws",	XX2(60,216),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvnmsubmsp",	XX3(60,217),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvrdpiz",	XX2(60,217),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvredp",	XX2(60,218),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvmaxdp",	XX3(60,224),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvnmaddadp",	XX3(60,225),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvmindp",	XX3(60,232),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvnmaddmdp",	XX3(60,233),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvcvuxwdp",	XX2(60,232),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvrdpip",	XX2(60,233),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvtsqrtdp",	XX2(60,234),	XX2BF_MASK,  PPCVSX,	PPCNONE,	{BF, XB6}},
-+{"xvrdpic",	XX2(60,235),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvmovdp",	XX3(60,240),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6S}},
-+{"xvcpsgndp",	XX3(60,240),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvnmsubadp",	XX3(60,241),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvcvsxwdp",	XX2(60,248),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvnmsubmdp",	XX3(60,249),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
-+{"xvrdpim",	XX2(60,249),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xscvdpsp",	XX2(60,265),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xscvdpuxds",	XX2(60,328),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xscvspdp",	XX2(60,329),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xscvdpsxds",	XX2(60,344),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xsabsdp",	XX2(60,345),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xscvuxddp",	XX2(60,360),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xsnabsdp",	XX2(60,361),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xscvsxddp",	XX2(60,376),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xsnegdp",	XX2(60,377),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvcvspuxds",	XX2(60,392),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvcvdpsp",	XX2(60,393),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvcvspsxds",	XX2(60,408),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvabssp",	XX2(60,409),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvcvuxdsp",	XX2(60,424),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvnabssp",	XX2(60,425),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvcvsxdsp",	XX2(60,440),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvnegsp",	XX2(60,441),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvcvdpuxds",	XX2(60,456),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvcvspdp",	XX2(60,457),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvcvdpsxds",	XX2(60,472),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvabsdp",	XX2(60,473),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvcvuxddp",	XX2(60,488),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvnabsdp",	XX2(60,489),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvcvsxddp",	XX2(60,504),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+{"xvnegdp",	XX2(60,505),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
-+
-+{"stfq",	OP(60),		OP_MASK,     POWER2,	PPCNONE,	{FRS, D, RA}},
-+
-+{"psq_st",	OP(60),		OP_MASK,     PPCPS,	PPCNONE,	{FRS,PSD,RA,PSW,PSQ}},
-+
-+{"stfdp",	OP(61),		OP_MASK,     POWER6,	PPCNONE,	{FRT, D, RA0}},
-+
-+{"stfqu",	OP(61),		OP_MASK,     POWER2,	PPCNONE,	{FRS, D, RA}},
-+
-+{"psq_stu",	OP(61),		OP_MASK,     PPCPS,	PPCNONE,	{FRS,PSD,RA,PSW,PSQ}},
-+
-+{"std",		DSO(62,0),	DS_MASK,     PPC64,	PPCNONE,	{RS, DS, RA0}},
-+{"stdu",	DSO(62,1),	DS_MASK,     PPC64,	PPCNONE,	{RS, DS, RAS}},
-+{"stq",		DSO(62,2),	DS_MASK,     POWER4,	PPCNONE,	{RSQ, DS, RA0}},
-+
-+{"fcmpu",	X(63,0),     X_MASK|(3<<21), COM,	PPCNONE,	{BF, FRA, FRB}},
-+
-+{"daddq",	XRC(63,2,0),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRA, FRB}},
-+{"daddq.",	XRC(63,2,1),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRA, FRB}},
-+
-+{"dquaq",	ZRC(63,3,0),	Z2_MASK,     POWER6,	PPCNONE,	{FRT, FRA, FRB, RMC}},
-+{"dquaq.",	ZRC(63,3,1),	Z2_MASK,     POWER6,	PPCNONE,	{FRT, FRA, FRB, RMC}},
-+
-+{"fcpsgn",	XRC(63,8,0),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRA, FRB}},
-+{"fcpsgn.",	XRC(63,8,1),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRA, FRB}},
-+
-+{"frsp",	XRC(63,12,0),	XRA_MASK,    COM,	PPCNONE,	{FRT, FRB}},
-+{"frsp.",	XRC(63,12,1),	XRA_MASK,    COM,	PPCNONE,	{FRT, FRB}},
-+
-+{"fctiw",	XRC(63,14,0),	XRA_MASK,    PPCCOM,	PPCNONE,	{FRT, FRB}},
-+{"fcir",	XRC(63,14,0),	XRA_MASK,    POWER2,	PPCNONE,	{FRT, FRB}},
-+{"fctiw.",	XRC(63,14,1),	XRA_MASK,    PPCCOM,	PPCNONE,	{FRT, FRB}},
-+{"fcir.",	XRC(63,14,1),	XRA_MASK,    POWER2,	PPCNONE,	{FRT, FRB}},
-+
-+{"fctiwz",	XRC(63,15,0),	XRA_MASK,    PPCCOM,	PPCNONE,	{FRT, FRB}},
-+{"fcirz",	XRC(63,15,0),	XRA_MASK,    POWER2,	PPCNONE,	{FRT, FRB}},
-+{"fctiwz.",	XRC(63,15,1),	XRA_MASK,    PPCCOM,	PPCNONE,	{FRT, FRB}},
-+{"fcirz.",	XRC(63,15,1),	XRA_MASK,    POWER2,	PPCNONE,	{FRT, FRB}},
-+
-+{"fdiv",	A(63,18,0),	AFRC_MASK,   PPCCOM,	PPCNONE,	{FRT, FRA, FRB}},
-+{"fd",		A(63,18,0),	AFRC_MASK,   PWRCOM,	PPCNONE,	{FRT, FRA, FRB}},
-+{"fdiv.",	A(63,18,1),	AFRC_MASK,   PPCCOM,	PPCNONE,	{FRT, FRA, FRB}},
-+{"fd.",		A(63,18,1),	AFRC_MASK,   PWRCOM,	PPCNONE,	{FRT, FRA, FRB}},
-+
-+{"fsub",	A(63,20,0),	AFRC_MASK,   PPCCOM,	PPCNONE,	{FRT, FRA, FRB}},
-+{"fs",		A(63,20,0),	AFRC_MASK,   PWRCOM,	PPCNONE,	{FRT, FRA, FRB}},
-+{"fsub.",	A(63,20,1),	AFRC_MASK,   PPCCOM,	PPCNONE,	{FRT, FRA, FRB}},
-+{"fs.",		A(63,20,1),	AFRC_MASK,   PWRCOM,	PPCNONE,	{FRT, FRA, FRB}},
-+
-+{"fadd",	A(63,21,0),	AFRC_MASK,   PPCCOM,	PPCNONE,	{FRT, FRA, FRB}},
-+{"fa",		A(63,21,0),	AFRC_MASK,   PWRCOM,	PPCNONE,	{FRT, FRA, FRB}},
-+{"fadd.",	A(63,21,1),	AFRC_MASK,   PPCCOM,	PPCNONE,	{FRT, FRA, FRB}},
-+{"fa.",		A(63,21,1),	AFRC_MASK,   PWRCOM,	PPCNONE,	{FRT, FRA, FRB}},
-+
-+{"fsqrt",	A(63,22,0),    AFRAFRC_MASK, PPCPWR2,	PPCNONE,	{FRT, FRB}},
-+{"fsqrt.",	A(63,22,1),    AFRAFRC_MASK, PPCPWR2,	PPCNONE,	{FRT, FRB}},
-+
-+{"fsel",	A(63,23,0),	A_MASK,      PPC,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"fsel.",	A(63,23,1),	A_MASK,      PPC,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+
-+{"fre",		A(63,24,0),   AFRALFRC_MASK, POWER5,	POWER7,		{FRT, FRB, A_L}},
-+{"fre.",	A(63,24,1),   AFRALFRC_MASK, POWER5,	POWER7,		{FRT, FRB, A_L}},
-+{"fre",		A(63,24,0),   AFRAFRC_MASK,  POWER7,	PPCNONE,	{FRT, FRB}},
-+{"fre.",	A(63,24,1),   AFRAFRC_MASK,  POWER7,	PPCNONE,	{FRT, FRB}},
-+
-+{"fmul",	A(63,25,0),	AFRB_MASK,   PPCCOM,	PPCNONE,	{FRT, FRA, FRC}},
-+{"fm",		A(63,25,0),	AFRB_MASK,   PWRCOM,	PPCNONE,	{FRT, FRA, FRC}},
-+{"fmul.",	A(63,25,1),	AFRB_MASK,   PPCCOM,	PPCNONE,	{FRT, FRA, FRC}},
-+{"fm.",		A(63,25,1),	AFRB_MASK,   PWRCOM,	PPCNONE,	{FRT, FRA, FRC}},
-+
-+{"frsqrte",	A(63,26,0),   AFRALFRC_MASK, PPC,	POWER7,		{FRT, FRB, A_L}},
-+{"frsqrte.",	A(63,26,1),   AFRALFRC_MASK, PPC,	POWER7,		{FRT, FRB, A_L}},
-+{"frsqrte",	A(63,26,0),   AFRAFRC_MASK,  POWER7,	PPCNONE,	{FRT, FRB}},
-+{"frsqrte.",	A(63,26,1),   AFRAFRC_MASK,  POWER7,	PPCNONE,	{FRT, FRB}},
-+
-+{"fmsub",	A(63,28,0),	A_MASK,      PPCCOM,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"fms",		A(63,28,0),	A_MASK,      PWRCOM,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"fmsub.",	A(63,28,1),	A_MASK,      PPCCOM,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"fms.",	A(63,28,1),	A_MASK,      PWRCOM,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+
-+{"fmadd",	A(63,29,0),	A_MASK,      PPCCOM,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"fma",		A(63,29,0),	A_MASK,      PWRCOM,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"fmadd.",	A(63,29,1),	A_MASK,      PPCCOM,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"fma.",	A(63,29,1),	A_MASK,      PWRCOM,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+
-+{"fnmsub",	A(63,30,0),	A_MASK,      PPCCOM,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"fnms",	A(63,30,0),	A_MASK,      PWRCOM,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"fnmsub.",	A(63,30,1),	A_MASK,      PPCCOM,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"fnms.",	A(63,30,1),	A_MASK,      PWRCOM,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+
-+{"fnmadd",	A(63,31,0),	A_MASK,      PPCCOM,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"fnma",	A(63,31,0),	A_MASK,      PWRCOM,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"fnmadd.",	A(63,31,1),	A_MASK,      PPCCOM,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+{"fnma.",	A(63,31,1),	A_MASK,      PWRCOM,	PPCNONE,	{FRT, FRA, FRC, FRB}},
-+
-+{"fcmpo",	X(63,32),    X_MASK|(3<<21), COM,	PPCNONE,	{BF, FRA, FRB}},
-+
-+{"dmulq",	XRC(63,34,0),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRA, FRB}},
-+{"dmulq.",	XRC(63,34,1),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRA, FRB}},
-+
-+{"drrndq",	ZRC(63,35,0),	Z2_MASK,     POWER6,	PPCNONE,	{FRT, FRA, FRB, RMC}},
-+{"drrndq.",	ZRC(63,35,1),	Z2_MASK,     POWER6,	PPCNONE,	{FRT, FRA, FRB, RMC}},
-+
-+{"mtfsb1",	XRC(63,38,0),	XRARB_MASK,  COM,	PPCNONE,	{BT}},
-+{"mtfsb1.",	XRC(63,38,1),	XRARB_MASK,  COM,	PPCNONE,	{BT}},
-+
-+{"fneg",	XRC(63,40,0),	XRA_MASK,    COM,	PPCNONE,	{FRT, FRB}},
-+{"fneg.",	XRC(63,40,1),	XRA_MASK,    COM,	PPCNONE,	{FRT, FRB}},
-+
-+{"mcrfs",      X(63,64), XRB_MASK|(3<<21)|(3<<16), COM,	PPCNONE,	{BF, BFA}},
-+
-+{"dscliq",	ZRC(63,66,0),	Z_MASK,      POWER6,	PPCNONE,	{FRT, FRA, SH16}},
-+{"dscliq.",	ZRC(63,66,1),	Z_MASK,      POWER6,	PPCNONE,	{FRT, FRA, SH16}},
-+
-+{"dquaiq",	ZRC(63,67,0),	Z2_MASK,     POWER6,	PPCNONE,	{TE, FRT, FRB, RMC}},
-+{"dquaiq.",	ZRC(63,67,1),	Z2_MASK,     POWER6,	PPCNONE,	{TE, FRT, FRB, RMC}},
-+
-+{"mtfsb0",	XRC(63,70,0),	XRARB_MASK,  COM,	PPCNONE,	{BT}},
-+{"mtfsb0.",	XRC(63,70,1),	XRARB_MASK,  COM,	PPCNONE,	{BT}},
-+
-+{"fmr",		XRC(63,72,0),	XRA_MASK,    COM,	PPCNONE,	{FRT, FRB}},
-+{"fmr.",	XRC(63,72,1),	XRA_MASK,    COM,	PPCNONE,	{FRT, FRB}},
-+
-+{"dscriq",	ZRC(63,98,0),	Z_MASK,      POWER6,	PPCNONE,	{FRT, FRA, SH16}},
-+{"dscriq.",	ZRC(63,98,1),	Z_MASK,      POWER6,	PPCNONE,	{FRT, FRA, SH16}},
-+
-+{"drintxq",	ZRC(63,99,0),	Z2_MASK,     POWER6,	PPCNONE,	{R, FRT, FRB, RMC}},
-+{"drintxq.",	ZRC(63,99,1),	Z2_MASK,     POWER6,	PPCNONE,	{R, FRT, FRB, RMC}},
-+
-+{"ftdiv",	X(63,128),   X_MASK|(3<<21), POWER7,	PPCNONE,	{BF, FRA, FRB}},
-+
-+{"dcmpoq",	X(63,130),	X_MASK,      POWER6,	PPCNONE,	{BF, FRA, FRB}},
-+
-+{"mtfsfi",  XRC(63,134,0), XRA_MASK|(3<<21)|(1<<11), COM, POWER6,	{BFF, U}},
-+{"mtfsfi",  XRC(63,134,0), XWRA_MASK|(3<<21)|(1<<11), POWER6, PPCNONE,	{BFF, U, W}},
-+{"mtfsfi.", XRC(63,134,1), XRA_MASK|(3<<21)|(1<<11), COM, POWER6,	{BFF, U}},
-+{"mtfsfi.", XRC(63,134,1), XWRA_MASK|(3<<21)|(1<<11), POWER6, PPCNONE,	{BFF, U, W}},
-+
-+{"fnabs",	XRC(63,136,0),	XRA_MASK,    COM,	PPCNONE,	{FRT, FRB}},
-+{"fnabs.",	XRC(63,136,1),	XRA_MASK,    COM,	PPCNONE,	{FRT, FRB}},
-+
-+{"fctiwu",	XRC(63,142,0),	XRA_MASK,    POWER7,	PPCNONE,	{FRT, FRB}},
-+{"fctiwu.",	XRC(63,142,1),	XRA_MASK,    POWER7,	PPCNONE,	{FRT, FRB}},
-+{"fctiwuz",	XRC(63,143,0),	XRA_MASK,    POWER7,	PPCNONE,	{FRT, FRB}},
-+{"fctiwuz.",	XRC(63,143,1),	XRA_MASK,    POWER7,	PPCNONE,	{FRT, FRB}},
-+
-+{"ftsqrt",	X(63,160), X_MASK|(3<<21|FRA_MASK), POWER7, PPCNONE,	{BF, FRB}},
-+
-+{"dtstexq",	X(63,162),	X_MASK,      POWER6,	PPCNONE,	{BF, FRA, FRB}},
-+{"dtstdcq",	Z(63,194),	Z_MASK,      POWER6,	PPCNONE,	{BF, FRA, DCM}},
-+{"dtstdgq",	Z(63,226),	Z_MASK,      POWER6,	PPCNONE,	{BF, FRA, DGM}},
-+
-+{"drintnq",	ZRC(63,227,0),	Z2_MASK,     POWER6,	PPCNONE,	{R, FRT, FRB, RMC}},
-+{"drintnq.",	ZRC(63,227,1),	Z2_MASK,     POWER6,	PPCNONE,	{R, FRT, FRB, RMC}},
-+
-+{"dctqpq",	XRC(63,258,0),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRB}},
-+{"dctqpq.",	XRC(63,258,1),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRB}},
-+
-+{"fabs",	XRC(63,264,0),	XRA_MASK,    COM,	PPCNONE,	{FRT, FRB}},
-+{"fabs.",	XRC(63,264,1),	XRA_MASK,    COM,	PPCNONE,	{FRT, FRB}},
-+
-+{"dctfixq",	XRC(63,290,0),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRB}},
-+{"dctfixq.",	XRC(63,290,1),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRB}},
-+
-+{"ddedpdq",	XRC(63,322,0),	X_MASK,      POWER6,	PPCNONE,	{SP, FRT, FRB}},
-+{"ddedpdq.",	XRC(63,322,1),	X_MASK,      POWER6,	PPCNONE,	{SP, FRT, FRB}},
-+
-+{"dxexq",	XRC(63,354,0),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRB}},
-+{"dxexq.",	XRC(63,354,1),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRB}},
-+
-+{"frin",	XRC(63,392,0),	XRA_MASK,    POWER5,	PPCNONE,	{FRT, FRB}},
-+{"frin.",	XRC(63,392,1),	XRA_MASK,    POWER5,	PPCNONE,	{FRT, FRB}},
-+{"friz",	XRC(63,424,0),	XRA_MASK,    POWER5,	PPCNONE,	{FRT, FRB}},
-+{"friz.",	XRC(63,424,1),	XRA_MASK,    POWER5,	PPCNONE,	{FRT, FRB}},
-+{"frip",	XRC(63,456,0),	XRA_MASK,    POWER5,	PPCNONE,	{FRT, FRB}},
-+{"frip.",	XRC(63,456,1),	XRA_MASK,    POWER5,	PPCNONE,	{FRT, FRB}},
-+{"frim",	XRC(63,488,0),	XRA_MASK,    POWER5,	PPCNONE,	{FRT, FRB}},
-+{"frim.",	XRC(63,488,1),	XRA_MASK,    POWER5,	PPCNONE,	{FRT, FRB}},
-+
-+{"dsubq",	XRC(63,514,0),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRA, FRB}},
-+{"dsubq.",	XRC(63,514,1),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRA, FRB}},
-+
-+{"ddivq",	XRC(63,546,0),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRA, FRB}},
-+{"ddivq.",	XRC(63,546,1),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRA, FRB}},
-+
-+{"mffs",	XRC(63,583,0),	XRARB_MASK,  COM,	PPCNONE,	{FRT}},
-+{"mffs.",	XRC(63,583,1),	XRARB_MASK,  COM,	PPCNONE,	{FRT}},
-+
-+{"dcmpuq",	X(63,642),	X_MASK,      POWER6,	PPCNONE,	{BF, FRA, FRB}},
-+
-+{"dtstsfq",	X(63,674),	X_MASK,      POWER6,	PPCNONE,	{BF, FRA, FRB}},
-+
-+{"mtfsf",	XFL(63,711,0),	XFL_MASK,    COM,	POWER6,		{FLM, FRB}},
-+{"mtfsf",	XFL(63,711,0),	XFL_MASK,    POWER6,	PPCNONE,	{FLM, FRB, XFL_L, W}},
-+{"mtfsf.",	XFL(63,711,1),	XFL_MASK,    COM,	POWER6,		{FLM, FRB}},
-+{"mtfsf.",	XFL(63,711,1),	XFL_MASK,    POWER6,	PPCNONE,	{FLM, FRB, XFL_L, W}},
-+
-+{"drdpq",	XRC(63,770,0),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRB}},
-+{"drdpq.",	XRC(63,770,1),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRB}},
-+
-+{"dcffixq",	XRC(63,802,0),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRB}},
-+{"dcffixq.",	XRC(63,802,1),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRB}},
-+
-+{"fctid",	XRC(63,814,0),	XRA_MASK,    PPC64,	PPCNONE,	{FRT, FRB}},
-+{"fctid.",	XRC(63,814,1),	XRA_MASK,    PPC64,	PPCNONE,	{FRT, FRB}},
-+
-+{"fctidz",	XRC(63,815,0),	XRA_MASK,    PPC64,	PPCNONE,	{FRT, FRB}},
-+{"fctidz.",	XRC(63,815,1),	XRA_MASK,    PPC64,	PPCNONE,	{FRT, FRB}},
-+
-+{"denbcdq",	XRC(63,834,0),	X_MASK,      POWER6,	PPCNONE,	{S, FRT, FRB}},
-+{"denbcdq.",	XRC(63,834,1),	X_MASK,      POWER6,	PPCNONE,	{S, FRT, FRB}},
-+
-+{"fcfid",	XRC(63,846,0),	XRA_MASK,    PPC64,	PPCNONE,	{FRT, FRB}},
-+{"fcfid.",	XRC(63,846,1),	XRA_MASK,    PPC64,	PPCNONE,	{FRT, FRB}},
-+
-+{"diexq",	XRC(63,866,0),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRA, FRB}},
-+{"diexq.",	XRC(63,866,1),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRA, FRB}},
- 
--{"fcfid",	XRC(63,846,0),	XRA_MASK,    PPC64,	{FRT, FRB}},
--{"fcfid.",	XRC(63,846,1),	XRA_MASK,    PPC64,	{FRT, FRB}},
-+{"fctidu",	XRC(63,942,0),	XRA_MASK,    POWER7,	PPCNONE,	{FRT, FRB}},
-+{"fctidu.",	XRC(63,942,1),	XRA_MASK,    POWER7,	PPCNONE,	{FRT, FRB}},
- 
--{"diexq",	XRC(63,866,0),	X_MASK,      POWER6,	{FRT, FRA, FRB}},
--{"diexq.",	XRC(63,866,1),	X_MASK,      POWER6,	{FRT, FRA, FRB}},
-+{"fctiduz",	XRC(63,943,0),	XRA_MASK,    POWER7,	PPCNONE,	{FRT, FRB}},
-+{"fctiduz.",	XRC(63,943,1),	XRA_MASK,    POWER7,	PPCNONE,	{FRT, FRB}},
- 
-+{"fcfidu",	XRC(63,974,0),	XRA_MASK,    POWER7,	PPCNONE,	{FRT, FRB}},
-+{"fcfidu.",	XRC(63,974,1),	XRA_MASK,    POWER7,	PPCNONE,	{FRT, FRB}},
- };
- 
- const int powerpc_num_opcodes =
Index: tches/coreutils-7.4-uname-1.patch
===================================================================
--- patches/coreutils-7.4-uname-1.patch	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,173 +1,0 @@
-Submitted By: Jim Gifford <jim at cross-lfs dot org>
-Date: 2009-02-21
-Initial Package Version: 7.1
-Upstream Status: Not Accepted
-Origin: Gentoo - http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/coreutils
-Description: Display CPU Information from /proc/cpuinfo or /proc/sysinfo
-
-Rediffed for 7.1 by Jim Gifford
-Original Patch by - Matthew Burgess and Scot McPherson
-
-diff -Naur coreutils-7.1.orig/src/uname.c coreutils-7.1/src/uname.c
---- coreutils-7.1.orig/src/uname.c	2008-09-18 00:06:57.000000000 -0700
-+++ coreutils-7.1/src/uname.c	2009-02-21 21:48:22.417139823 -0800
-@@ -50,6 +50,11 @@
- # include <mach-o/arch.h>
- #endif
- 
-+#if defined (__linux__)
-+# define USE_PROCINFO
-+# define UNAME_HARDWARE_PLATFORM
-+#endif
-+
- #include "system.h"
- #include "error.h"
- #include "quote.h"
-@@ -155,6 +160,117 @@
-   exit (status);
- }
- 
-+#if defined(USE_PROCINFO)
-+
-+# if defined(__s390__) || defined(__s390x__)
-+#  define CPUINFO_FILE    "/proc/sysinfo"
-+#  define CPUINFO_FORMAT  "%64[^\t :]%*[ :]%256[^\n]%c"
-+# else
-+#  define CPUINFO_FILE    "/proc/cpuinfo"
-+#  define CPUINFO_FORMAT  "%64[^\t:]\t:%256[^\n]%c"
-+# endif
-+
-+# define PROCINFO_PROCESSOR      0
-+# define PROCINFO_HARDWARE_PLATFORM 1
-+
-+static void __eat_cpuinfo_space(char *buf)
-+{
-+	/* first eat trailing space */
-+	char *tmp = buf + strlen(buf) - 1;
-+	while (tmp > buf && isspace(*tmp))
-+		*tmp-- = '\0';
-+	/* then eat leading space */
-+	tmp = buf;
-+	while (*tmp && isspace(*tmp))
-+		tmp++;
-+	if (tmp != buf)
-+		memmove(buf, tmp, strlen(tmp)+1);
-+	/* finally collapse whitespace */
-+	tmp = buf;
-+	while (tmp[0] && tmp[1]) {
-+		if (isspace(tmp[0]) && isspace(tmp[1])) {
-+			memmove(tmp, tmp+1, strlen(tmp));
-+			continue;
-+		}
-+		++tmp;
-+	}
-+}
-+
-+static int __linux_procinfo (int x, char *fstr, size_t s)
-+{
-+	FILE *fp;
-+
-+	char *procinfo_keys[] = {
-+		/* --processor --hardware-platform */
-+		#if defined(__alpha__)
-+			"cpu model", "system type"
-+		#elif defined(__arm__)
-+			"Processor", "Hardware"
-+		#elif defined(__avr32__)
-+			"processor", "cpu family"
-+		#elif defined(__bfin__)
-+			"CPU", "BOARD Name"
-+		#elif defined(__cris__)
-+			"cpu", "cpu model"
-+		#elif defined(__frv__)
-+			"CPU-Core", "System"
-+		#elif defined(__i386__) || defined(__x86_64__)
-+			"model name", "vendor_id"
-+		#elif defined(__ia64__)
-+			"family", "vendor"
-+		#elif defined(__hppa__)
-+			"cpu", "model"
-+		#elif defined(__m68k__)
-+			"CPU", "MMU"
-+		#elif defined(__mips__)
-+			"cpu model", "system type"
-+		#elif defined(__powerpc__) || defined(__powerpc64__)
-+			"cpu", "machine"
-+		#elif defined(__s390__) || defined(__s390x__)
-+			"Type", "Manufacturer"
-+		#elif defined(__sh__)
-+			"cpu type", "machine"
-+		#elif defined(sparc) || defined(__sparc__)
-+			"type", "cpu"
-+		#elif defined(__vax__)
-+			"cpu type", "cpu"
-+		#else
-+			"unknown", "unknown"
-+		#endif
-+	};
-+
-+	if ((fp = fopen(CPUINFO_FILE, "r")) != NULL) {
-+		char key[65], value[257], eol, *ret = NULL;
-+
-+		while (fscanf(fp, CPUINFO_FORMAT, key, value, &eol) != EOF) {
-+			__eat_cpuinfo_space(key);
-+			if (!strcmp(key, procinfo_keys[x])) {
-+				__eat_cpuinfo_space(value);
-+				ret = value;
-+				break;
-+			}
-+			if (eol != '\n') {
-+				/* we need two fscanf's here in case the previous
-+				 * length limit caused us to read right up to the
-+				 * newline ... doing "%*[^\n]\n" wont eat the newline
-+				 */
-+				fscanf(fp, "%*[^\n]");
-+				fscanf(fp, "\n");
-+			}
-+		}
-+		fclose(fp);
-+
-+		if (ret) {
-+			strncpy(fstr, ret, s);
-+			return 0;
-+		}
-+	}
-+
-+	return -1;
-+}
-+
-+#endif
-+
- /* Print ELEMENT, preceded by a space if something has already been
-    printed.  */
- 
-@@ -302,10 +418,14 @@
-   if (toprint & PRINT_PROCESSOR)
-     {
-       char const *element = unknown;
--#if HAVE_SYSINFO && defined SI_ARCHITECTURE
-+#if ( HAVE_SYSINFO && defined SI_ARCHITECTURE ) || defined(USE_PROCINFO)
-       {
- 	static char processor[257];
-+#if defined(USE_PROCINFO)
-+	if (0 <= __linux_procinfo (PROCINFO_PROCESSOR, processor, sizeof processor))
-+#else
- 	if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor))
-+#endif
- 	  element = processor;
-       }
- #endif
-@@ -358,9 +478,13 @@
-       if (element == unknown)
- 	{
- 	  static char hardware_platform[257];
-+#if defined(USE_PROCINFO)
-+	  if (0 <= __linux_procinfo (PROCINFO_HARDWARE_PLATFORM, hardware_platform, sizeof hardware_platform))
-+#else
- 	  size_t s = sizeof hardware_platform;
- 	  static int mib[] = { CTL_HW, UNAME_HARDWARE_PLATFORM };
- 	  if (sysctl (mib, 2, hardware_platform, &s, 0, 0) >= 0)
-+#endif
- 	    element = hardware_platform;
- 	}
- #endif
Index: tches/diffutils-2.8.7-i18n-1.patch
===================================================================
--- patches/diffutils-2.8.7-i18n-1.patch	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,809 +1,0 @@
-Submitted By: Jim Gifford <jim at cross-lfs dot org>
-Date: 2009-01-08
-Initial Package Version: 2.8.7
-Upstream Status: Unkown
-Origin: Mandriva
-Description: i18n Updates
-
-diff -Naur diffutils-2.8.7.orig/src/diff.c diffutils-2.8.7/src/diff.c
---- diffutils-2.8.7.orig/src/diff.c	2004-04-12 00:44:35.000000000 -0700
-+++ diffutils-2.8.7/src/diff.c	2009-01-08 13:26:42.000000000 -0800
-@@ -273,6 +273,13 @@
-   re_set_syntax (RE_SYNTAX_GREP | RE_NO_POSIX_BACKTRACKING);
-   excluded = new_exclude ();
- 
-+#ifdef HANDLE_MULTIBYTE
-+  if (MB_CUR_MAX > 1)
-+    lines_differ = lines_differ_multibyte;
-+  else
-+#endif
-+    lines_differ = lines_differ_singlebyte;
-+
-   /* Decode the options.  */
- 
-   while ((c = getopt_long (argc, argv, shortopts, longopts, 0)) != -1)
-diff -Naur diffutils-2.8.7.orig/src/diff.h diffutils-2.8.7/src/diff.h
---- diffutils-2.8.7.orig/src/diff.h	2004-04-12 00:44:35.000000000 -0700
-+++ diffutils-2.8.7/src/diff.h	2009-01-08 13:26:42.000000000 -0800
-@@ -25,6 +25,19 @@
- #include <stdio.h>
- #include <unlocked-io.h>
- 
-+/* For platform which support the ISO C amendement 1 functionality we
-+   support user defined character classes.  */
-+#if defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H
-+/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>.  */
-+# include <wchar.h>
-+# include <wctype.h>
-+/* # if defined (HAVE_MBRTOWC) */
-+#  define HANDLE_MULTIBYTE      1
-+/* # endif */
-+#endif
-+
-+#define TAB_WIDTH 8
-+
- /* What kind of changes a hunk contains.  */
- enum changes
- {
-@@ -352,7 +365,13 @@
- extern char const pr_program[];
- char *concat (char const *, char const *, char const *);
- char *dir_file_pathname (char const *, char const *);
--bool lines_differ (char const *, char const *);
-+
-+bool (*lines_differ) (char const *, char const *);
-+bool lines_differ_singlebyte (char const *, char const *);
-+#ifdef HANDLE_MULTIBYTE
-+bool lines_differ_multibyte (char const *, char const *);
-+#endif
-+
- lin translate_line_number (struct file_data const *, lin);
- struct change *find_change (struct change *);
- struct change *find_reverse_change (struct change *);
-diff -Naur diffutils-2.8.7.orig/src/io.c diffutils-2.8.7/src/io.c
---- diffutils-2.8.7.orig/src/io.c	2004-04-12 00:44:35.000000000 -0700
-+++ diffutils-2.8.7/src/io.c	2009-01-08 13:26:42.000000000 -0800
-@@ -25,6 +25,7 @@
- #include <file-type.h>
- #include <setmode.h>
- #include <xalloc.h>
-+#include <assert.h>
- 
- /* Rotate an unsigned value to the left.  */
- #define ROL(v, n) ((v) << (n) | (v) >> (sizeof (v) * CHAR_BIT - (n)))
-@@ -212,6 +213,28 @@
- 
-
- /* Split the file into lines, simultaneously computing the equivalence
-    class for each line.  */
-+#ifdef HANDLE_MULTIBYTE
-+# define MBC2WC(P, END, MBLENGTH, WC, STATE, CONVFAIL)			\
-+do									\
-+{									\
-+    mbstate_t state_bak = STATE;					\
-+									\
-+    CONVFAIL = 0;							\
-+    MBLENGTH = mbrtowc (&WC, P, END - (char const *)P, &STATE);		\
-+									\
-+    switch (MBLENGTH)							\
-+      {									\
-+      case (size_t)-2:							\
-+      case (size_t)-1:							\
-+	STATE = state_bak;						\
-+	++CONVFAIL;							\
-+	  /* Fall through. */						\
-+      case 0:								\
-+	MBLENGTH = 1;							\
-+      }									\
-+}									\
-+while (0)
-+#endif
- 
- static void
- find_and_hash_each_line (struct file_data *current)
-@@ -238,12 +261,280 @@
-   bool same_length_diff_contents_compare_anyway =
-     diff_length_compare_anyway | ignore_case;
- 
-+#ifdef HANDLE_MULTIBYTE
-+  wchar_t   wc;
-+  size_t    mblength;
-+  mbstate_t state;
-+  int       convfail;
-+  
-+  memset (&state, '\0', sizeof (mbstate_t));
-+#endif
-+
-   while (p < suffix_begin)
-     {
-       char const *ip = p;
- 
-       h = 0;
-+#ifdef HANDLE_MULTIBYTE
-+      if (MB_CUR_MAX > 1)
-+	{
-+	  wchar_t   lo_wc;
-+	  char	    mbc[MB_LEN_MAX];
-+	  mbstate_t state_wc;
-+
-+	  /* Hash this line until we find a newline.  */
-+	  switch (ignore_white_space)
-+	    {
-+	    case IGNORE_ALL_SPACE:
-+	      while (1)
-+		{
-+		  if (*p == '\n')
-+		    {
-+		      ++p;
-+		      break;
-+		    }
-+
-+		  MBC2WC (p, suffix_begin, mblength, wc, state, convfail);
-+
-+		  if (convfail)
-+		    mbc[0] = *p++;
-+		  else if (!iswspace (wc))
-+		    {
-+		      bool flag = 0;
-+
-+		      if (ignore_case)
-+			{
-+			  lo_wc = towlower (wc);
-+			  if (lo_wc != wc)
-+			    {
-+			      flag = 1;
-+
-+			      p += mblength;
-+			      memset (&state_wc, '\0', sizeof(mbstate_t));
-+			      mblength = wcrtomb (mbc, lo_wc, &state_wc);
-+
-+			      assert (mblength != (size_t)-1 &&
-+				  mblength != (size_t)-2);
-+
-+			      mblength = (mblength < 1) ? 1 : mblength;
-+			    }
-+			}
-+
-+		      if (!flag)
-+			{
-+			  for (i = 0; i < mblength; i++)
-+			    mbc[i] =  *p++;
-+			}
-+		    }
-+		  else
-+		    {
-+		      p += mblength;
-+		      continue;
-+		    }
-+
-+		  for (i = 0; i < mblength; i++)
-+		    h = HASH (h, mbc[i]);
-+		}
-+	      break;
-+
-+	    case IGNORE_SPACE_CHANGE:
-+	      while (1)
-+		{
-+		  if (*p == '\n')
-+		    {
-+		      ++p;
-+		      break;
-+		    }
- 
-+		  MBC2WC (p, suffix_begin, mblength, wc, state, convfail);
-+
-+		  if (!convfail && iswspace (wc))
-+		    {
-+		      while (1)
-+			{
-+			  if (*p == '\n')
-+			    {
-+			      ++p;
-+			      goto hashing_done;
-+			    }
-+
-+			  p += mblength;
-+			  MBC2WC (p, suffix_begin, mblength, wc, state, convfail);
-+			  if (convfail || (!convfail && !iswspace (wc)))
-+			    break;
-+			}
-+		      h = HASH (h, ' ');
-+		    }
-+
-+		  /* WC is now the first non-space.  */
-+		  if (convfail)
-+		    mbc[0] = *p++;
-+		  else
-+		    {
-+		      bool flag = 0;
-+
-+		      if (ignore_case)
-+			{
-+			  lo_wc = towlower (wc);
-+			  if (lo_wc != wc)
-+			    {
-+			      flag = 1;
-+
-+			      p += mblength;
-+			      memset (&state_wc, '\0', sizeof(mbstate_t));
-+			      mblength = wcrtomb (mbc, lo_wc, &state_wc);
-+
-+			      assert (mblength != (size_t)-1 &&
-+				  mblength != (size_t)-2);
-+
-+			      mblength = (mblength < 1) ? 1 : mblength;
-+			    }
-+			}
-+
-+		      if (!flag)
-+			{
-+			  for (i = 0; i < mblength; i++)
-+			    mbc[i] = *p++;
-+			}
-+		    }
-+
-+		  for (i = 0; i < mblength; i++)
-+		    h = HASH (h, mbc[i]);
-+		}
-+	      break;
-+
-+	    case IGNORE_TAB_EXPANSION:
-+		{
-+		  size_t column = 0;
-+
-+		  while (1)
-+		    {
-+		      if (*p == '\n')
-+			{
-+			  ++p;
-+			  break;
-+			}
-+
-+		      MBC2WC (p, suffix_begin, mblength, wc, state, convfail);
-+
-+		      if (convfail)
-+			{
-+			  h = HASH (h, *p++);
-+			  ++column;
-+			}
-+		      else
-+			{
-+			  bool flag;
-+
-+			  switch (wc)
-+			    {
-+			    case L'\b':
-+			      column -= 0 < column;
-+			      h = HASH (h, '\b');
-+			      ++p;
-+			      break;
-+
-+			    case L'\t':
-+				{
-+				  int repetitions;
-+
-+				  repetitions = TAB_WIDTH - column % TAB_WIDTH;
-+				  column += repetitions;
-+				  do
-+				    h = HASH (h, ' ');
-+				  while (--repetitions != 0);
-+				  ++p;
-+				}
-+			      break;
-+
-+			    case L'\r':
-+			      column = 0;
-+			      h = HASH (h, '\r');
-+			      ++p;
-+			      break;
-+
-+			    default:
-+			      flag = 0;
-+			      column += wcwidth (wc);
-+			      if (ignore_case)
-+				{
-+				  lo_wc = towlower (wc);
-+				  if (lo_wc != wc)
-+				    {
-+				      flag = 1;
-+				      p += mblength;
-+				      memset (&state_wc, '\0', sizeof(mbstate_t));
-+				      mblength = wcrtomb (mbc, lo_wc, &state_wc);
-+
-+				      assert (mblength != (size_t)-1 &&
-+					  mblength != (size_t)-2);
-+
-+				      mblength = (mblength < 1) ? 1 : mblength;
-+				    }
-+				}
-+
-+			      if (!flag)
-+				{
-+				  for (i = 0; i < mblength; i++)
-+				    mbc[i] = *p++;
-+				}
-+
-+			      for (i = 0; i < mblength; i++)
-+				h = HASH (h, mbc[i]);
-+			    }
-+			}
-+		    }
-+		}
-+	      break;
-+
-+	    default:
-+	      while (1)
-+		{
-+		  if (*p == '\n')
-+		    {
-+		      ++p;
-+		      break;
-+		    }
-+
-+		  MBC2WC (p, suffix_begin, mblength, wc, state, convfail);
-+
-+		  if (convfail)
-+		    mbc[0] = *p++;
-+		  else
-+		    {
-+		      int flag = 0;
-+
-+		      if (ignore_case)
-+			{
-+			  lo_wc = towlower (wc);
-+			  if (lo_wc != wc)
-+			    {
-+			      flag = 1;
-+			      p += mblength;
-+			      memset (&state_wc, '\0', sizeof(mbstate_t));
-+			      mblength = wcrtomb (mbc, lo_wc, &state_wc);
-+
-+			      assert (mblength != (size_t)-1 &&
-+				  mblength != (size_t)-2);
-+
-+			      mblength = (mblength < 1) ? 1 : mblength;
-+			    }
-+			}
-+
-+		      if (!flag)
-+			{
-+			  for (i = 0; i < mblength; i++)
-+			    mbc[i] = *p++;
-+			}
-+		    }
-+
-+		  for (i = 0; i < mblength; i++)
-+		    h = HASH (h, mbc[i]);
-+		}
-+	    }
-+	}
-+      else
-+#endif
-       /* Hash this line until we find a newline.  */
-       if (ignore_case)
- 	switch (ignore_white_space)
-diff -Naur diffutils-2.8.7.orig/src/side.c diffutils-2.8.7/src/side.c
---- diffutils-2.8.7.orig/src/side.c	2004-04-12 00:44:35.000000000 -0700
-+++ diffutils-2.8.7/src/side.c	2009-01-08 13:26:42.000000000 -0800
-@@ -73,11 +73,72 @@
-   register size_t out_position = 0;
-   register char const *text_pointer = line[0];
-   register char const *text_limit = line[1];
-+#if defined HAVE_WCHAR_H && defined HAVE_WCTYPE_H
-+  unsigned char mbc[MB_LEN_MAX];
-+  wchar_t wc;
-+  mbstate_t state, state_bak;
-+  size_t mbc_pos, mblength;
-+  int mbc_loading_flag = 0;
-+  int wc_width;
-+
-+  memset (&state, '\0', sizeof (mbstate_t));
-+#endif
- 
-   while (text_pointer < text_limit)
-     {
-       register unsigned char c = *text_pointer++;
- 
-+#if defined HAVE_WCHAR_H && defined HAVE_WCTYPE_H
-+      if (MB_CUR_MAX > 1 && mbc_loading_flag)
-+	{
-+	  mbc_loading_flag = 0;
-+	  state_bak = state;
-+	  mbc[mbc_pos++] = c;
-+
-+process_mbc:
-+	  mblength = mbrtowc (&wc, mbc, mbc_pos, &state);
-+
-+	  switch (mblength)
-+	    {
-+	    case (size_t)-2:	/* Incomplete multibyte character. */
-+	      mbc_loading_flag = 1;
-+	      state = state_bak;
-+	      break;
-+
-+	    case (size_t)-1:	/* Invalid as a multibyte character. */
-+	      if (in_position++ < out_bound)
-+		{
-+		  out_position = in_position;
-+		  putc (mbc[0], out);
-+		}
-+	      memmove (mbc, mbc + 1, --mbc_pos);
-+	      if (mbc_pos > 0)
-+		{
-+		  mbc[mbc_pos] = '\0';
-+		  goto process_mbc;
-+		}
-+	      break;
-+
-+	    default:
-+	      wc_width = wcwidth (wc);
-+	      if (wc_width < 1)	/* Unprintable multibyte character. */
-+		{
-+		  if (in_position <= out_bound)
-+		    fprintf (out, "%lc", (wint_t)wc);
-+		}
-+	      else		/* Printable multibyte character. */
-+		{
-+		  in_position += wc_width;
-+		  if (in_position <= out_bound)
-+		    {
-+		      out_position = in_position;
-+		      fprintf (out, "%lc", (wint_t)wc);
-+		    }
-+		}
-+	    }
-+	  continue;
-+	}
-+#endif
-       switch (c)
- 	{
- 	case '\t':
-@@ -135,8 +196,39 @@
- 	  break;
- 
- 	default:
--	  if (! isprint (c))
--	    goto control_char;
-+#if defined HAVE_WCHAR_H && defined HAVE_WCTYPE_H
-+	  if (MB_CUR_MAX > 1)
-+	    {
-+	      memset (mbc, '\0', MB_LEN_MAX);
-+	      mbc_pos = 0;
-+	      mbc[mbc_pos++] = c;
-+	      state_bak = state;
-+
-+	      mblength = mbrtowc (&wc, mbc, mbc_pos, &state);
-+
-+	      /* The value of mblength is always less than 2 here. */
-+	      switch (mblength)
-+		{
-+		case (size_t)-2:	/* Incomplete multibyte character. */
-+		  state = state_bak;
-+		  mbc_loading_flag = 1;
-+		  continue;
-+
-+		case (size_t)-1:	/* Invalid as a multibyte character. */
-+		  state = state_bak;
-+		  break;
-+
-+		default:
-+		  if (! iswprint (wc))
-+		    goto control_char;
-+		}
-+	    }
-+	  else
-+#endif
-+	    {
-+	      if (! isprint (c))
-+		goto control_char;
-+	    }
- 	  /* falls through */
- 	case ' ':
- 	  if (in_position++ < out_bound)
-diff -Naur diffutils-2.8.7.orig/src/util.c diffutils-2.8.7/src/util.c
---- diffutils-2.8.7.orig/src/util.c	2004-04-12 00:44:35.000000000 -0700
-+++ diffutils-2.8.7/src/util.c	2009-01-08 13:26:42.000000000 -0800
-@@ -319,7 +319,7 @@
-    Return nonzero if the lines differ.  */
- 
- bool
--lines_differ (char const *s1, char const *s2)
-+lines_differ_singlebyte (char const *s1, char const *s2)
- {
-   register char const *t1 = s1;
-   register char const *t2 = s2;
-@@ -458,6 +458,293 @@
-   return start;
- }
- 
-+#ifdef HANDLE_MULTIBYTE
-+# define MBC2WC(T, END, MBLENGTH, WC, STATE, CONVFAIL)			\
-+do									\
-+{									\
-+    mbstate_t bak = STATE;						\
-+									\
-+    CONVFAIL = 0;							\
-+    MBLENGTH = mbrtowc (&WC, T, END - T, &STATE);			\
-+									\
-+    switch (MBLENGTH)							\
-+      {									\
-+      case (size_t)-2:							\
-+      case (size_t)-1:							\
-+	STATE = bak;							\
-+	++CONVFAIL;							\
-+	  /* Fall through. */						\
-+      case 0:								\
-+	MBLENGTH = 1;							\
-+      }									\
-+}									\
-+while (0)
-+
-+bool
-+lines_differ_multibyte (char const *s1, char const *s2)
-+{
-+  unsigned char const *end1, *end2;
-+  unsigned char c1, c2;
-+  wchar_t wc1, wc2, wc1_bak, wc2_bak;
-+  size_t mblen1, mblen2;
-+  mbstate_t state1, state2, state1_bak, state2_bak;
-+  int convfail1, convfail2, convfail1_bak, convfail2_bak;
-+  
-+  unsigned char const *t1 = (unsigned char const *) s1;
-+  unsigned char const *t2 = (unsigned char const *) s2;
-+  unsigned char const *t1_bak, *t2_bak;
-+  size_t column = 0;
-+
-+  if (ignore_white_space == IGNORE_NO_WHITE_SPACE  && !ignore_case)
-+    {
-+      while (*t1 != '\n')
-+	if (*t1++ != * t2++)
-+	  return 1;
-+      return 0;
-+    }
-+
-+  memset (&state1, '\0', sizeof (mbstate_t));
-+  memset (&state2, '\0', sizeof (mbstate_t));
-+
-+  end1 = s1 + strlen (s1);
-+  end2 = s2 + strlen (s2);
-+
-+  while (1)
-+    {
-+      c1 = *t1;
-+      c2 = *t2;
-+      MBC2WC (t1, end1, mblen1, wc1, state1, convfail1);
-+      MBC2WC (t2, end2, mblen2, wc2, state2, convfail2);
-+
-+      /* Test for exact char equality first, since it's a common case.  */
-+      if (convfail1 ^ convfail2)
-+	break;
-+      else if (convfail1 && convfail2 && c1 != c2)
-+	break;
-+      else if (!convfail1 && !convfail2 && wc1 != wc2)
-+	{
-+	  switch (ignore_white_space)
-+	    {
-+	    case IGNORE_ALL_SPACE:
-+	      /* For -w, just skip past any white space.  */
-+	      while (1)
-+		{
-+		  if (convfail1)
-+		    break;
-+		  else if (wc1 == L'\n' || !iswspace (wc1))
-+		    break;
-+
-+		  t1 += mblen1;
-+		  c1 = *t1;
-+		  MBC2WC (t1, end1, mblen1, wc1, state1, convfail1);
-+		}
-+
-+	      while (1)
-+		{
-+		  if (convfail2)
-+		    break;
-+		  else if (wc2 == L'\n' || !iswspace (wc2))
-+		    break;
-+
-+		  t2 += mblen2;
-+		  c2 = *t2;
-+		  MBC2WC (t2, end2, mblen2, wc2, state2, convfail2);
-+		}
-+	      t1 += mblen1;
-+	      t2 += mblen2;
-+	      break;
-+
-+	    case IGNORE_SPACE_CHANGE:
-+	      /* For -b, advance past any sequence of white space in
-+		 line 1 and consider it just one space, or nothing at
-+		 all if it is at the end of the line.  */
-+	      if (wc1 != L'\n' && iswspace (wc1))
-+		{
-+		  size_t mblen_bak;
-+		  mbstate_t state_bak;
-+
-+		  do
-+		    {
-+		      t1 += mblen1;
-+		      mblen_bak = mblen1;
-+		      state_bak = state1;
-+		      MBC2WC (t1, end1, mblen1, wc1, state1, convfail1);
-+		    }
-+		  while (!convfail1 && (wc1 != L'\n' && iswspace (wc1)));
-+
-+		  state1 = state_bak;
-+		  mblen1 = mblen_bak;
-+		  t1 -= mblen1;
-+		  convfail1 = 0;
-+		  wc1 = L' ';
-+		}
-+
-+	      /* Likewise for line 2.  */
-+	      if (wc2 != L'\n' && iswspace (wc2))
-+		{
-+		  size_t mblen_bak;
-+		  mbstate_t state_bak;
-+
-+		  do
-+		    {
-+		      t2 += mblen2;
-+		      mblen_bak = mblen2;
-+		      state_bak = state2;
-+		      MBC2WC (t2, end2, mblen2, wc2, state2, convfail2);
-+		    }
-+		  while (!convfail2 && (wc2 != L'\n' && iswspace (wc2)));
-+
-+		  state2 = state_bak;
-+		  mblen2 = mblen_bak;
-+		  t2 -= mblen2;
-+		  convfail2 = 0;
-+		  wc2 = L' ';
-+		}
-+
-+	      if (wc1 != wc2)
-+		{
-+		  if (wc2 == L' ' && wc1 != L'\n' &&
-+		      t1 > (unsigned char const *)s1 &&
-+		      !convfail1_bak && iswspace (wc1_bak))
-+		    {
-+		      t1 = t1_bak;
-+		      wc1 = wc1_bak;
-+		      state1 = state1_bak;
-+		      convfail1 = convfail1_bak;
-+		      continue;
-+		    }
-+		  if (wc1 == L' ' && wc2 != L'\n'
-+		      && t2 > (unsigned char const *)s2
-+		      && !convfail2_bak && iswspace (wc2_bak))
-+		    {
-+		      t2 = t2_bak;
-+		      wc2 = wc2_bak;
-+		      state2 = state2_bak;
-+		      convfail2 = convfail2_bak;
-+		      continue;
-+		    }
-+		}
-+
-+	      t1_bak = t1;		  t2_bak = t2;
-+	      wc1_bak = wc1;		  wc2_bak = wc2;
-+	      state1_bak = state1;	  state2_bak = state2;
-+	      convfail1_bak = convfail1;  convfail2_bak = convfail2;
-+
-+	      if (wc1 == L'\n')
-+		wc1 = L' ';
-+	      else
-+		t1 += mblen1;
-+
-+	      if (wc2 == L'\n')
-+		wc2 = L' ';
-+	      else
-+		t2 += mblen2;
-+
-+	      break;
-+
-+	    case IGNORE_TAB_EXPANSION:
-+	      if ((wc1 == L' ' && wc2 == L'\t')
-+		  || (wc1 == L'\t' && wc2 == L' '))
-+		{
-+		  size_t column2 = column;
-+
-+		  while (1)
-+		    {
-+		      if (convfail1)
-+			{
-+			  ++t1;
-+			  break;
-+			}
-+		      else if (wc1 == L' ')
-+			column++;
-+		      else if (wc1 == L'\t')
-+			column += TAB_WIDTH - column % TAB_WIDTH;
-+		      else
-+			{
-+			  t1 += mblen1;
-+			  break;
-+			}
-+
-+		      t1 += mblen1;
-+		      c1 = *t1;
-+		      MBC2WC (t1, end1, mblen1, wc1, state1, convfail1);
-+		    }
-+
-+		  while (1)
-+		    {
-+		      if (convfail2)
-+			{
-+			  ++t2;
-+			  break;
-+			}
-+		      else if (wc2 == L' ')
-+			column2++;
-+		      else if (wc2 == L'\t')
-+			column2 += TAB_WIDTH - column2 % TAB_WIDTH;
-+		      else
-+			{
-+			  t2 += mblen2;
-+			  break;
-+			}
-+
-+		      t2 += mblen2;
-+		      c2 = *t2;
-+		      MBC2WC (t2, end2, mblen2, wc2, state2, convfail2);
-+		    }
-+
-+		  if (column != column2)
-+		    return 1;
-+		}
-+	      else
-+		{
-+		  t1 += mblen1;
-+		  t2 += mblen2;
-+		}
-+	      break;
-+
-+	    case IGNORE_NO_WHITE_SPACE:
-+	      t1 += mblen1;
-+	      t2 += mblen2;
-+	      break;
-+	    }
-+
-+	  /* Lowercase all letters if -i is specified.  */
-+	  if (ignore_case)
-+	    {
-+	      if (!convfail1)
-+		wc1 = towlower (wc1);
-+	      if (!convfail2)
-+		wc2 = towlower (wc2);
-+	    }
-+
-+	  if (convfail1 ^ convfail2)
-+	    break;
-+	  else if (convfail1 && convfail2 && c1 != c2)
-+	    break;
-+	  else if (!convfail1 && !convfail2 && wc1 != wc2)
-+	    break;
-+	}
-+      else
-+	{
-+	  t1_bak = t1;			t2_bak = t2;
-+	  wc1_bak = wc1;		wc2_bak = wc2;
-+	  state1_bak = state1;		state2_bak = state2;
-+	  convfail1_bak = convfail1;	convfail2_bak = convfail2;
-+
-+	  t1 += mblen1;			t2 += mblen2;
-+	}
-+      
-+      if (!convfail1 && wc1 == L'\n')
-+	return 0;
-+
-+      column += convfail1 ? 1 :
-+	(wc1 == L'\t') ? TAB_WIDTH - column % TAB_WIDTH : wcwidth (wc1);
-+    }
-+
-+  return 1;
-+}
-+#endif
-+
- struct change *
- find_reverse_change (struct change *start)
- {
-
Index: tches/eglibc-2.10.1-fixes-2.patch
===================================================================
--- patches/eglibc-2.10.1-fixes-2.patch	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,62 +1,0 @@
-Submitted By: Jim Gifford (jim at cross-lfs dot org)
-Date: 07-26-2009
-Initial Package Version: 2.10.1
-Origin: Upstream
-Upstream Status: Applied
-Description: These are fixes eglibc-2.10.1, and should be
-             rechecked periodically.
-
-diff -Naur libc.orig/elf/ldd.bash.in libc/elf/ldd.bash.in
---- libc.orig/elf/ldd.bash.in	2009-02-13 13:31:14.533608000 -0500
-+++ libc/elf/ldd.bash.in	2009-07-26 17:57:12.160403278 -0400
-@@ -1,4 +1,4 @@
--#! @BASH@
-+#! /bin/bash
- # Copyright (C) 1996-2008, 2009 Free Software Foundation, Inc.
- # This file is part of the GNU C Library.
- 
-diff -Naur libc.orig/libio/Makefile libc/libio/Makefile
---- libc.orig/libio/Makefile	2009-07-02 16:03:14.096441000 -0400
-+++ libc/libio/Makefile	2009-07-26 17:57:12.160403278 -0400
-@@ -170,6 +170,7 @@
- tst-fopenloc-ENV = LOCPATH=$(common-objpfx)localedata \
- 		   MALLOC_TRACE=$(objpfx)tst-fopenloc.mtrace
- tst-fgetws-ENV = LOCPATH=$(common-objpfx)localedata
-+tst-fgetwc-ENV = LOCPATH=$(common-objpfx)localedata
- tst-ungetwc1-ENV = LOCPATH=$(common-objpfx)localedata
- tst-ungetwc2-ENV = LOCPATH=$(common-objpfx)localedata
- bug-ungetwc2-ENV = LOCPATH=$(common-objpfx)localedata
-diff -Naur libc.orig/sunrpc/Makefile libc/sunrpc/Makefile
---- libc.orig/sunrpc/Makefile	2008-04-25 07:12:05.875033000 -0400
-+++ libc/sunrpc/Makefile	2009-07-26 17:57:12.157073385 -0400
-@@ -144,11 +144,11 @@
- 	$(+link)
- 
- $(addprefix $(objpfx)cross-,$(rpcgen-objs)): $(objpfx)cross-%.o: %.c
--	gcc $< -c -D_RPC_THREAD_SAFE_ -D_CROSS_RPCGEN_ \
-+	$(BUILD_CC) $< -c -D_RPC_THREAD_SAFE_ -D_CROSS_RPCGEN_ \
- 		$(OUTPUT_OPTION) $(compile-mkdep-flags)
- 
- $(objpfx)cross-rpcgen: $(addprefix $(objpfx)cross-,$(rpcgen-objs))
--	gcc $^ -o $@
-+	$(BUILD_CC) $^ -o $@
- 
- # This makes sure -DNOT_IN_libc is passed for all these modules.
- cpp-srcs-left := $(rpcgen-objs:.o=.c)
-diff -Naur libc.orig/timezone/Makefile libc/timezone/Makefile
---- libc.orig/timezone/Makefile	2009-03-03 08:14:09.770962000 -0500
-+++ libc/timezone/Makefile	2009-07-26 17:57:12.157073385 -0400
-@@ -181,11 +181,11 @@
- $(objpfx)zic: $(addprefix $(objpfx), $(zic-objs))
- 
- $(addprefix $(objpfx)cross-,$(zic-objs)): $(objpfx)cross-%.o: %.c
--	gcc $< -c $(OUTPUT_OPTION) $(CFLAGS-$*.c) $(CPPFLAGS-$*) \
-+	$(BUILD_CC) $< -c $(OUTPUT_OPTION) $(CFLAGS-$*.c) $(CPPFLAGS-$*) \
- 		-DCROSS_ZIC $(compile-mkdep-flags)
- 
- $(objpfx)cross-zic: $(addprefix $(objpfx)cross-,$(zic-objs))
--	gcc $(addprefix $(objpfx)cross-,$(zic-objs)) -o $@
-+	$(BUILD_CC) $(addprefix $(objpfx)cross-,$(zic-objs)) -o $@
- 
- tz-cflags = -DTZDIR='"$(zonedir)"' \
- 	    -DTZDEFAULT='"$(localtime-file)"' \
Index: tches/file-5.03-cross_compile-1.patch
===================================================================
--- patches/file-5.03-cross_compile-1.patch	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,31 +1,0 @@
-Submitted By: Jim Gifford (jim at cross-lfs dot org)
-Date: 2009-01-05
-Initial Package Version: 4.26
-Origin: T2 Project
-Upstream Status: Unknown
-Description: When Cross Compiling magic.mgc doesn't get generated
-	     properly. This patch corrects the issue
- 
-diff -Naur file-4.26.orig/magic/Makefile.am file-4.26/magic/Makefile.am
---- file-4.26.orig/magic/Makefile.am	2008-08-08 01:24:06.000000000 -0700
-+++ file-4.26/magic/Makefile.am	2009-01-05 09:59:19.000000000 -0800
-@@ -231,6 +231,6 @@
- FILE_COMPILE_DEP = $(FILE_COMPILE)
- endif
- 
--${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE_DEP)
-+${MAGIC}: $(EXTRA_DIST)
- 	$(FILE_COMPILE) -C -m $(MAGIC_FRAGMENT_DIR)
- 	@mv $(MAGIC_FRAGMENT_BASE).mgc $@
-diff -Naur file-4.26.orig/magic/Makefile.in file-4.26/magic/Makefile.in
---- file-4.26.orig/magic/Makefile.in	2008-08-30 03:01:42.000000000 -0700
-+++ file-4.26/magic/Makefile.in	2009-01-05 09:59:20.000000000 -0800
-@@ -578,7 +578,7 @@
- 	uninstall uninstall-am uninstall-pkgdataDATA
- 
- 
--${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE_DEP)
-+${MAGIC}: $(EXTRA_DIST)
- 	$(FILE_COMPILE) -C -m $(MAGIC_FRAGMENT_DIR)
- 	@mv $(MAGIC_FRAGMENT_BASE).mgc $@
- # Tell versions [3.59,3.63) of GNU make to not export all variables.
Index: tches/gcc-4.4.1-branch_update-1.patch
===================================================================
--- patches/gcc-4.4.1-branch_update-1.patch	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,184 +1,0 @@
-Submitted By: Jim Gifford (jim at cross-lfs dot org)
-Date: 07-22-2009
-Initial Package Version: 4.4.1
-Origin: Upstream
-Upstream Status: Applied
-Description: This is a branch update for gcc-4.4.1, and should be
-             rechecked periodically.
-
-This patch was made from Revision # 149965.
-
-diff -Naur gcc-4.4.1.orig/gcc/resource.c gcc-4.4.1/gcc/resource.c
---- gcc-4.4.1.orig/gcc/resource.c	2009-05-21 16:17:37.000000000 -0700
-+++ gcc-4.4.1/gcc/resource.c	2009-07-22 16:22:24.000000000 -0700
-@@ -945,10 +945,11 @@
- 
-   /* If we found a basic block, get the live registers from it and update
-      them with anything set or killed between its start and the insn before
--     TARGET.  Otherwise, we must assume everything is live.  */
-+     TARGET; this custom life analysis is really about registers so we need
-+     to use the LR problem.  Otherwise, we must assume everything is live.  */
-   if (b != -1)
-     {
--      regset regs_live = df_get_live_in (BASIC_BLOCK (b));
-+      regset regs_live = DF_LR_IN (BASIC_BLOCK (b));
-       rtx start_insn, stop_insn;
- 
-       /* Compute hard regs live at start of block.  */
-@@ -1052,7 +1053,7 @@
- 		{
- 		  HARD_REG_SET extra_live;
- 
--		  REG_SET_TO_HARD_REG_SET (extra_live, df_get_live_in (bb));
-+		  REG_SET_TO_HARD_REG_SET (extra_live, DF_LR_IN (bb));
- 		  IOR_HARD_REG_SET (current_live_regs, extra_live);
- 		}
- 	    }
-diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.c-torture/compile/pr40321.c gcc-4.4.1/gcc/testsuite/gcc.c-torture/compile/pr40321.c
---- gcc-4.4.1.orig/gcc/testsuite/gcc.c-torture/compile/pr40321.c	1969-12-31 16:00:00.000000000 -0800
-+++ gcc-4.4.1/gcc/testsuite/gcc.c-torture/compile/pr40321.c	2009-07-22 07:45:21.000000000 -0700
-@@ -0,0 +1,12 @@
-+struct X { int flag; int pos; };
-+int foo(struct X *a, struct X *b)
-+{
-+  while (1)
-+    {
-+      if (a->flag)
-+	break;
-+      ({ struct X *tmp = a; a = b; b = tmp; });
-+    }
-+
-+  return a->pos + b->pos;
-+}
-diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.dg/torture/pr40321.C gcc-4.4.1/gcc/testsuite/g++.dg/torture/pr40321.C
---- gcc-4.4.1.orig/gcc/testsuite/g++.dg/torture/pr40321.C	1969-12-31 16:00:00.000000000 -0800
-+++ gcc-4.4.1/gcc/testsuite/g++.dg/torture/pr40321.C	2009-07-22 07:45:21.000000000 -0700
-@@ -0,0 +1,25 @@
-+/* { dg-do compile } */
-+
-+struct VectorD2
-+{
-+  VectorD2() : x(0), y(0) { }
-+  VectorD2(int _x, int _y) : x(_x), y(_y) { }
-+  int x, y;
-+  int GetLength2() const { return x*x + y*y; };
-+  VectorD2 operator+(const VectorD2 vec) const {
-+      return VectorD2(x+vec.x,y+vec.y);
-+  }
-+};
-+struct Shape
-+{
-+  enum Type { ST_RECT, ST_CIRCLE } type;
-+  VectorD2 pos;
-+  VectorD2 radius;
-+  bool CollisionWith(const Shape& s) const;
-+};
-+bool Shape::CollisionWith(const Shape& s) const
-+{
-+  if(type == ST_CIRCLE && s.type == ST_RECT)
-+    return s.CollisionWith(*this);
-+  return (pos + s.pos).GetLength2() < (radius + s.radius).GetLength2();
-+}
-diff -Naur gcc-4.4.1.orig/gcc/tree-ssa-pre.c gcc-4.4.1/gcc/tree-ssa-pre.c
---- gcc-4.4.1.orig/gcc/tree-ssa-pre.c	2009-02-20 07:20:38.000000000 -0800
-+++ gcc-4.4.1/gcc/tree-ssa-pre.c	2009-07-22 07:45:21.000000000 -0700
-@@ -3507,11 +3507,7 @@
- }
- 
- 
--/* Add OP to EXP_GEN (block), and possibly to the maximal set if it is
--   not defined by a phi node.
--   PHI nodes can't go in the maximal sets because they are not in
--   TMP_GEN, so it is possible to get into non-monotonic situations
--   during ANTIC calculation, because it will *add* bits.  */
-+/* Add OP to EXP_GEN (block), and possibly to the maximal set.  */
- 
- static void
- add_to_exp_gen (basic_block block, tree op)
-@@ -3523,9 +3519,7 @@
- 	return;
-       result = get_or_alloc_expr_for_name (op);
-       bitmap_value_insert_into_set (EXP_GEN (block), result);
--      if (TREE_CODE (op) != SSA_NAME
--	  || gimple_code (SSA_NAME_DEF_STMT (op)) != GIMPLE_PHI)
--	bitmap_value_insert_into_set (maximal_set, result);
-+      bitmap_value_insert_into_set (maximal_set, result);
-     }
- }
- 
-@@ -3544,6 +3538,20 @@
-       add_to_value (get_expr_value_id (e), e);
-       bitmap_insert_into_set (PHI_GEN (block), e);
-       bitmap_value_insert_into_set (AVAIL_OUT (block), e);
-+      if (!in_fre)
-+	{
-+	  unsigned i;
-+	  for (i = 0; i < gimple_phi_num_args (phi); ++i)
-+	    {
-+	      tree arg = gimple_phi_arg_def (phi, i);
-+	      if (TREE_CODE (arg) == SSA_NAME)
-+		{
-+		  e = get_or_alloc_expr_for_name (arg);
-+		  add_to_value (get_expr_value_id (e), e);
-+		  bitmap_value_insert_into_set (maximal_set, e);
-+		}
-+	    }
-+	}
-     }
- }
- 
-@@ -4254,11 +4262,12 @@
-       FOR_ALL_BB (bb)
- 	{
- 	  print_bitmap_set (dump_file, EXP_GEN (bb), "exp_gen", bb->index);
--	  print_bitmap_set (dump_file, TMP_GEN (bb), "tmp_gen",
--				  bb->index);
--	  print_bitmap_set (dump_file, AVAIL_OUT (bb), "avail_out",
--				  bb->index);
-+	  print_bitmap_set (dump_file, PHI_GEN (bb), "phi_gen", bb->index);
-+	  print_bitmap_set (dump_file, TMP_GEN (bb), "tmp_gen", bb->index);
-+	  print_bitmap_set (dump_file, AVAIL_OUT (bb), "avail_out", bb->index);
- 	}
-+
-+      print_bitmap_set (dump_file, maximal_set, "maximal", 0);
-     }
- 
-   /* Insert can get quite slow on an incredibly large number of basic
-diff -Naur gcc-4.4.1.orig/gcc/version.c gcc-4.4.1/gcc/version.c
---- gcc-4.4.1.orig/gcc/version.c	2007-08-21 08:35:30.000000000 -0700
-+++ gcc-4.4.1/gcc/version.c	2009-07-22 17:04:03.000000000 -0700
-@@ -14,4 +14,4 @@
-    Makefile.  */
- 
- const char version_string[] = BASEVER DATESTAMP DEVPHASE REVISION;
--const char pkgversion_string[] = PKGVERSION;
-+const char pkgversion_string[] = "(GCC for Cross-LFS 4.4.1.20090722) ";
-diff -Naur gcc-4.4.1.orig/libstdc++-v3/include/std/valarray gcc-4.4.1/libstdc++-v3/include/std/valarray
---- gcc-4.4.1.orig/libstdc++-v3/include/std/valarray	2009-04-09 16:23:07.000000000 -0700
-+++ gcc-4.4.1/libstdc++-v3/include/std/valarray	2009-07-22 03:25:53.000000000 -0700
-@@ -1,7 +1,7 @@
- // The template and inlines for the -*- C++ -*- valarray class.
- 
- // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
--// 2006, 2007, 2009
-+// 2006, 2007, 2008, 2009
- // Free Software Foundation, Inc.
- //
- // This file is part of the GNU ISO C++ Library.  This library is free
-@@ -647,7 +647,7 @@
-   template<typename _Tp>
-     inline
-     valarray<_Tp>::valarray(initializer_list<_Tp> __l)
--      : _M_size(__l.size()), _M_data(__valarray_get_storage<_Tp>(__l.size()))
-+    : _M_size(__l.size()), _M_data(__valarray_get_storage<_Tp>(__l.size()))
-     { std::__valarray_copy_construct (__l.begin(), __l.end(), _M_data); }
- #endif
- 
-@@ -681,6 +681,7 @@
-     {
-       _GLIBCXX_DEBUG_ASSERT(_M_size == __l.size());
-       std::__valarray_copy(__l.begin(), __l.size(), _M_data);
-+      return *this;
-     }
- #endif
- 
Index: tches/grep-2.5.4-i18n-1.patch
===================================================================
--- patches/grep-2.5.4-i18n-1.patch	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,1109 +1,0 @@
-Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
-Date: 2008-02-19
-Initial Package Version: 2.5.3
-Upstream Status: uncertain
-Origin: from debian.
-Description: Various fixes, particularly speed improvements for UTF-8 locales.
-Also adds a 'standard input' marker into the results for certain obscure uses.
-
-diff -Naur grep-2.5.3.orig/lib/posix/regex.h grep-2.5.3.lfs/lib/posix/regex.h
---- grep-2.5.3.orig/lib/posix/regex.h	2007-06-28 19:57:18.000000000 +0100
-+++ grep-2.5.3.lfs/lib/posix/regex.h	2008-02-10 18:56:07.000000000 +0000
-@@ -165,6 +165,10 @@
-    treated as 'a\{1'.  */
- #define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1)
- 
-+/* If this bit is set, then ignore case when matching.
-+   If not set, then case is significant.  */
-+#define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1)
-+
- /* This global variable defines the particular regexp syntax to use (for
-    some interfaces).  When a regexp is compiled, the syntax used is
-    stored in the pattern buffer, so changing this does not affect
-diff -Naur grep-2.5.3.orig/src/dfa.c grep-2.5.3.lfs/src/dfa.c
---- grep-2.5.3.orig/src/dfa.c	2007-06-28 19:57:19.000000000 +0100
-+++ grep-2.5.3.lfs/src/dfa.c	2008-02-10 18:55:29.000000000 +0000
-@@ -594,6 +594,17 @@
- 		/* build character class.  */
- 		{
- 		  wctype_t wt;
-+		  /* NOTE:
-+		   * when case_fold, character class [:upper:] and [:lower:]
-+		   * should be treated as [:alpha:], this is the same way
-+		   * of glibc/posix/regcomp.c:build_charclass().
-+		   * reported by Bug#276202
-+		   * - fixed by Fumitoshi UKAI
-+		   */
-+		  if (case_fold 
-+		      && (strcmp (str, "upper") == 0 || strcmp (str, "lower") == 0)) 
-+		      strcpy (str, "alpha");
-+
- 		  /* Query the character class as wctype_t.  */
- 		  wt = wctype (str);
- 
-@@ -681,6 +692,29 @@
- 	  REALLOC_IF_NECESSARY(work_mbc->range_ends, wchar_t,
- 			       range_ends_al, work_mbc->nranges + 1);
- 	  work_mbc->range_ends[work_mbc->nranges++] = (wchar_t)wc2;
-+	  if (case_fold 
-+	      && (iswlower((wint_t)wc) || iswupper((wint_t)wc))
-+	      && (iswlower((wint_t)wc2) || iswupper((wint_t)wc2))) {
-+	    wint_t altcase;
-+	    altcase = wc;
-+	    if (iswlower((wint_t)wc))
-+	      altcase = towupper((wint_t)wc);
-+	    else
-+	      altcase = towlower((wint_t)wc);
-+	    REALLOC_IF_NECESSARY(work_mbc->range_sts, wchar_t,
-+				 range_sts_al, work_mbc->nranges + 1);
-+	    work_mbc->range_sts[work_mbc->nranges] = (wchar_t)altcase;
-+	    
-+	    altcase = wc2;
-+	    if (iswlower((wint_t)wc2))
-+	      altcase = towupper((wint_t)wc2);
-+	    else
-+	      altcase = towlower((wint_t)wc2);
-+	    REALLOC_IF_NECESSARY(work_mbc->range_ends, wchar_t,
-+				 range_ends_al, work_mbc->nranges + 1);
-+	    work_mbc->range_ends[work_mbc->nranges++] = (wchar_t)altcase;
-+	    
-+	  }
- 	}
-       else if (wc != WEOF)
- 	/* build normal characters.  */
-@@ -688,6 +722,20 @@
- 	  REALLOC_IF_NECESSARY(work_mbc->chars, wchar_t, chars_al,
- 			       work_mbc->nchars + 1);
- 	  work_mbc->chars[work_mbc->nchars++] = (wchar_t)wc;
-+	  if (case_fold && (iswlower((wint_t) wc) || iswupper((wint_t) wc)))
-+	    {
-+		wint_t altcase;
-+
-+		altcase = wc;		/* keeps compiler happy */
-+		if (iswlower((wint_t) wc))
-+		  altcase = towupper((wint_t) wc);
-+		else if (iswupper((wint_t) wc))
-+		  altcase = towlower((wint_t) wc);
-+
-+		REALLOC_IF_NECESSARY(work_mbc->chars, wchar_t, chars_al,
-+			       work_mbc->nchars + 1);
-+		work_mbc->chars[work_mbc->nchars++] = (wchar_t) altcase;
-+	    }
- 	}
-     }
-   while ((wc = wc1) != L']');
-diff -Naur grep-2.5.3.orig/src/grep.c grep-2.5.3.lfs/src/grep.c
---- grep-2.5.3.orig/src/grep.c	2007-06-28 19:57:19.000000000 +0100
-+++ grep-2.5.3.lfs/src/grep.c	2008-02-10 18:54:53.000000000 +0000
-@@ -274,6 +274,12 @@
- #endif
- ;
- 
-+/* Default for `file_list' if no files are given on the command line. */
-+static char *stdin_argv[] =
-+{
-+  "-", NULL
-+};
-+
- /* Non-boolean long options that have no corresponding short equivalents.  */
- enum
- {
-@@ -534,7 +540,16 @@
- 	 for byte sentinels fore and aft.  */
-       newalloc = newsize + pagesize + 1;
- 
--      newbuf = bufalloc < newalloc ? xmalloc (bufalloc = newalloc) : buffer;
-+      newbuf = bufalloc < newalloc ? malloc (bufalloc = newalloc) : buffer;
-+      if (newbuf == NULL)
-+	{
-+	  int saved_errno = errno;
-+	  free (buffer);
-+	  bufalloc = ALIGN_TO (INITIAL_BUFSIZE, pagesize) + pagesize + 1;
-+	  buffer = xmalloc (bufalloc);
-+	  errno = saved_errno;
-+	  return 0;
-+	}
-       readbuf = ALIGN_TO (newbuf + 1 + save, pagesize);
-       bufbeg = readbuf - save;
-       memmove (bufbeg, buffer + saved_offset, save);
-@@ -1825,6 +1840,7 @@
-   FILE *fp;
-   extern char *optarg;
-   extern int optind;
-+  char **file_list;
- 
-   initialize_main (&argc, &argv);
-   program_name = argv[0];
-@@ -2244,29 +2260,29 @@
-   if (max_count == 0)
-     exit (1);
- 
--  if (optind < argc)
-+  file_list = (optind == argc ? stdin_argv : &argv[optind]);
-+
-+  status = 1;
-+  while (1)
-     {
--	status = 1;
--	do
-+      char *file = *file_list++;
-+
-+      if (file == NULL)
-+	break;
-+
-+      if ((included_patterns || excluded_patterns)
-+	  && !isdir (file))
- 	{
--	  char *file = argv[optind];
--	  if ((included_patterns || excluded_patterns)
--	      && !isdir (file))
--	    {
--	      if (included_patterns &&
--		  ! excluded_filename (included_patterns, file, 0))
--		continue;
--	      if (excluded_patterns &&
--		  excluded_filename (excluded_patterns, file, 0))
--		continue;
--	    }
--	  status &= grepfile (strcmp (file, "-") == 0 ? (char *) NULL : file,
--			      &stats_base);
-+	  if (included_patterns &&
-+	      ! excluded_filename (included_patterns, file, 0))
-+	    continue;
-+	  if (excluded_patterns &&
-+	      excluded_filename (excluded_patterns, file, 0))
-+	    continue;
- 	}
--	while ( ++optind < argc);
-+      status &= grepfile (strcmp (file, "-") == 0
-+			  ? (char *) NULL : file, &stats_base);
-     }
--  else
--    status = grepfile ((char *) NULL, &stats_base);
- 
-   /* We register via atexit() to test stdout.  */
-   exit (errseen ? 2 : status);
-diff -Naur grep-2.5.3.orig/src/search.c grep-2.5.3.lfs/src/search.c
---- grep-2.5.3.orig/src/search.c	2007-06-28 19:57:19.000000000 +0100
-+++ grep-2.5.3.lfs/src/search.c	2008-02-10 18:56:18.000000000 +0000
-@@ -18,10 +18,15 @@
- 
- /* Written August 1992 by Mike Haertel. */
- 
-+#ifndef _GNU_SOURCE
-+# define _GNU_SOURCE 1
-+#endif
- #ifdef HAVE_CONFIG_H
- # include <config.h>
- #endif
- 
-+#include <assert.h>
-+
- #include <sys/types.h>
- 
- #include "mbsupport.h"
-@@ -43,6 +48,9 @@
- #ifdef HAVE_LIBPCRE
- # include <pcre.h>
- #endif
-+#ifdef HAVE_LANGINFO_CODESET
-+# include <langinfo.h>
-+#endif
- 
- #define NCHAR (UCHAR_MAX + 1)
- 
-@@ -68,6 +76,19 @@
-     error (2, 0, _("memory exhausted"));
- }
- 
-+/* UTF-8 encoding allows some optimizations that we can't otherwise
-+   assume in a multibyte encoding. */
-+static int using_utf8;
-+
-+void
-+check_utf8 (void)
-+{
-+#ifdef HAVE_LANGINFO_CODESET
-+  if (strcmp (nl_langinfo (CODESET), "UTF-8") == 0)
-+    using_utf8 = 1;
-+#endif
-+}
-+
- #ifndef FGREP_PROGRAM
- /* DFA compiled regexp. */
- static struct dfa dfa;
-@@ -134,49 +155,6 @@
- }
- #endif /* !FGREP_PROGRAM */
- 
--#ifdef MBS_SUPPORT
--/* This function allocate the array which correspond to "buf".
--   Then this check multibyte string and mark on the positions which
--   are not single byte character nor the first byte of a multibyte
--   character.  Caller must free the array.  */
--static char*
--check_multibyte_string(char const *buf, size_t size)
--{
--  char *mb_properties = xmalloc(size);
--  mbstate_t cur_state;
--  wchar_t wc;
--  int i;
--
--  memset(&cur_state, 0, sizeof(mbstate_t));
--  memset(mb_properties, 0, sizeof(char)*size);
--
--  for (i = 0; i < size ;)
--    {
--      size_t mbclen;
--      mbclen = mbrtowc(&wc, buf + i, size - i, &cur_state);
--
--      if (mbclen == (size_t) -1 || mbclen == (size_t) -2 || mbclen == 0)
--	{
--	  /* An invalid sequence, or a truncated multibyte character.
--	     We treat it as a single byte character.  */
--	  mbclen = 1;
--	}
--      else if (match_icase)
--	{
--	  if (iswupper((wint_t)wc))
--	    {
--	      wc = towlower((wint_t)wc);
--	      wcrtomb(buf + i, wc, &cur_state);
--	    }
--	}
--      mb_properties[i] = mbclen;
--      i += mbclen;
--    }
--
--  return mb_properties;
--}
--#endif /* MBS_SUPPORT */
--
- #if defined(GREP_PROGRAM) || defined(EGREP_PROGRAM)
- #ifdef EGREP_PROGRAM
- COMPILE_FCT(Ecompile)
-@@ -193,10 +171,9 @@
-   size_t total = size;
-   char const *motif = pattern;
- 
--#if 0
-+  check_utf8 ();
-   if (match_icase)
-     syntax_bits |= RE_ICASE;
--#endif
-   re_set_syntax (syntax_bits);
-   dfasyntax (syntax_bits, match_icase, eolbyte);
- 
-@@ -301,23 +278,35 @@
-   char eol = eolbyte;
-   int backref, start, len, best_len;
-   struct kwsmatch kwsm;
-+  static int use_dfa;
-+  static int use_dfa_checked = 0;
-   size_t i, ret_val;
- #ifdef MBS_SUPPORT
--  char *mb_properties = NULL;
--  if (MB_CUR_MAX > 1)
-+  const char *last_char = NULL;
-+  int mb_cur_max = MB_CUR_MAX;
-+  mbstate_t mbs;
-+  memset (&mbs, '\0', sizeof (mbstate_t));
-+#endif /* MBS_SUPPORT */
-+
-+  if (!use_dfa_checked)
-     {
--      if (match_icase)
--        {
--          char *case_buf = xmalloc(size);
--          memcpy(case_buf, buf, size);
--	  if (start_ptr)
--	    start_ptr = case_buf + (start_ptr - buf);
--          buf = case_buf;
--        }
--      if (kwset)
--        mb_properties = check_multibyte_string(buf, size);
--    }
-+      char *grep_use_dfa = getenv ("GREP_USE_DFA");
-+      if (!grep_use_dfa)
-+	{
-+#ifdef MBS_SUPPORT
-+	  /* Turn off DFA when processing multibyte input. */
-+	  use_dfa = (MB_CUR_MAX == 1);
-+#else
-+	  use_dfa = 1;
- #endif /* MBS_SUPPORT */
-+	}
-+      else
-+	{
-+	  use_dfa = atoi (grep_use_dfa);
-+	}
-+
-+      use_dfa_checked = 1;
-+    }
- 
-   buflim = buf + size;
- 
-@@ -329,40 +318,123 @@
- 	  if (kwset)
- 	    {
- 	      /* Find a possible match using the KWset matcher. */
--	      size_t offset = kwsexec (kwset, beg, buflim - beg, &kwsm);
-+#ifdef MBS_SUPPORT
-+	      size_t bytes_left = 0;
-+#endif /* MBS_SUPPORT */
-+	      size_t offset;
-+#ifdef MBS_SUPPORT
-+	      /* kwsexec doesn't work with match_icase and multibyte input. */
-+	      if (match_icase && mb_cur_max > 1)
-+		/* Avoid kwset */
-+		offset = 0;
-+	      else
-+#endif /* MBS_SUPPORT */
-+	      offset = kwsexec (kwset, beg, buflim - beg, &kwsm);
- 	      if (offset == (size_t) -1)
--		goto failure;
-+		return (size_t)-1;
-+#ifdef MBS_SUPPORT
-+	      if (mb_cur_max > 1 && !using_utf8)
-+		{
-+		  bytes_left = offset;
-+		  while (bytes_left)
-+		    {
-+		      size_t mlen = mbrlen (beg, bytes_left, &mbs);
-+
-+		      last_char = beg;
-+		      if (mlen == (size_t) -1 || mlen == 0)
-+			{
-+			  /* Incomplete character: treat as single-byte. */
-+			  memset (&mbs, '\0', sizeof (mbstate_t));
-+			  beg++;
-+			  bytes_left--;
-+			  continue;
-+			}
-+
-+		      if (mlen == (size_t) -2)
-+			/* Offset points inside multibyte character:
-+			 * no good. */
-+			break;
-+
-+		      beg += mlen;
-+		      bytes_left -= mlen;
-+		    }
-+		}
-+	      else
-+#endif /* MBS_SUPPORT */
- 	      beg += offset;
- 	      /* Narrow down to the line containing the candidate, and
- 		 run it through DFA. */
- 	      end = memchr(beg, eol, buflim - beg);
- 	      end++;
- #ifdef MBS_SUPPORT
--	      if (MB_CUR_MAX > 1 && mb_properties[beg - buf] == 0)
-+	      if (mb_cur_max > 1 && bytes_left)
- 		continue;
- #endif
- 	      while (beg > buf && beg[-1] != eol)
- 		--beg;
--	      if (kwsm.index < kwset_exact_matches)
-+	      if (
-+#ifdef MBS_SUPPORT
-+		  !(match_icase && mb_cur_max > 1) &&
-+#endif /* MBS_SUPPORT */
-+		  (kwsm.index < kwset_exact_matches))
- 		goto success;
--	      if (dfaexec (&dfa, beg, end - beg, &backref) == (size_t) -1)
-+	      if (use_dfa &&
-+		  dfaexec (&dfa, beg, end - beg, &backref) == (size_t) -1)
- 		continue;
- 	    }
- 	  else
- 	    {
- 	      /* No good fixed strings; start with DFA. */
--	      size_t offset = dfaexec (&dfa, beg, buflim - beg, &backref);
-+#ifdef MBS_SUPPORT
-+	      size_t bytes_left = 0;
-+#endif /* MBS_SUPPORT */
-+	      size_t offset = 0;
-+	      if (use_dfa)
-+		offset = dfaexec (&dfa, beg, buflim - beg, &backref);
- 	      if (offset == (size_t) -1)
- 		break;
- 	      /* Narrow down to the line we've found. */
-+#ifdef MBS_SUPPORT
-+	      if (mb_cur_max > 1 && !using_utf8)
-+		{
-+		  bytes_left = offset;
-+		  while (bytes_left)
-+		    {
-+		      size_t mlen = mbrlen (beg, bytes_left, &mbs);
-+
-+		      last_char = beg;
-+		      if (mlen == (size_t) -1 || mlen == 0)
-+			{
-+			  /* Incomplete character: treat as single-byte. */
-+			  memset (&mbs, '\0', sizeof (mbstate_t));
-+			  beg++;
-+			  bytes_left--;
-+			  continue;
-+			}
-+
-+		      if (mlen == (size_t) -2)
-+			/* Offset points inside multibyte character:
-+			 * no good. */
-+			break;
-+
-+		      beg += mlen;
-+		      bytes_left -= mlen;
-+		    }
-+		}
-+	      else
-+#endif /* MBS_SUPPORT */
- 	      beg += offset;
- 	      end = memchr (beg, eol, buflim - beg);
- 	      end++;
-+#ifdef MBS_SUPPORT
-+	      if (mb_cur_max > 1 && bytes_left)
-+		continue;
-+#endif /* MBS_SUPPORT */
- 	      while (beg > buf && beg[-1] != eol)
- 		--beg;
- 	    }
- 	  /* Successful, no backreferences encountered! */
--	  if (!backref)
-+	  if (use_dfa && !backref)
- 	    goto success;
- 	}
-       else
-@@ -408,10 +480,84 @@
- 	      if (match_words)
- 		while (match <= best_match)
- 		  {
--		    if ((match == buf || !WCHAR ((unsigned char) match[-1]))
--			&& (len == end - beg - 1
--			    || !WCHAR ((unsigned char) match[len])))
--		      goto assess_pattern_match;
-+		    int lword_match = 0;
-+		    if (match == buf)
-+		      lword_match = 1;
-+		    else
-+		      {
-+			assert (start > 0);
-+#ifdef MBS_SUPPORT
-+			if (mb_cur_max > 1)
-+			  {
-+			    const char *s;
-+			    int mr;
-+			    wchar_t pwc;
-+			    if (using_utf8)
-+			      {
-+				s = match - 1;
-+				while (s > buf
-+				       && (unsigned char) *s >= 0x80
-+				       && (unsigned char) *s <= 0xbf)
-+				  --s;
-+			      }
-+			    else
-+			      s = last_char;
-+			    mr = mbtowc (&pwc, s, match - s);
-+			    if (mr <= 0)
-+			      {
-+				memset (&mbs, '\0', sizeof (mbstate_t));
-+				lword_match = 1;
-+			      }
-+			    else if (!(iswalnum (pwc) || pwc == L'_')
-+				     && mr == (int) (match - s))
-+			      lword_match = 1;
-+			  }
-+			else
-+#endif /* MBS_SUPPORT */
-+			if (!WCHAR ((unsigned char) match[-1]))
-+			  lword_match = 1;
-+		      }
-+
-+		    if (lword_match)
-+		      {
-+			int rword_match = 0;
-+			if (start + len == end - beg - 1)
-+			  rword_match = 1;
-+			else
-+			  {
-+#ifdef MBS_SUPPORT
-+			    if (mb_cur_max > 1)
-+			      {
-+				wchar_t nwc;
-+				int mr;
-+
-+				mr = mbtowc (&nwc, buf + start + len,
-+					     end - buf - start - len - 1);
-+				if (mr <= 0)
-+				  {
-+				    memset (&mbs, '\0', sizeof (mbstate_t));
-+				    rword_match = 1;
-+				  }
-+				else if (!iswalnum (nwc) && nwc != L'_')
-+				  rword_match = 1;
-+			      }
-+			    else
-+#endif /* MBS_SUPPORT */
-+			    if (!WCHAR ((unsigned char) match[len]))
-+			      rword_match = 1;
-+			  }
-+
-+			if (rword_match)
-+			  {
-+			    if (!start_ptr)
-+			      /* Returns the whole line. */
-+			      goto success;
-+			    else
-+			      {
-+				goto assess_pattern_match;
-+			      }
-+			  }
-+		      }
- 		    if (len > 0)
- 		      {
- 			/* Try a shorter length anchored at the same place. */
-@@ -475,24 +621,144 @@
-   *match_size = len;
-   ret_val = beg - buf;
-  out:
--#ifdef MBS_SUPPORT
--  if (MB_CUR_MAX > 1)
--    {
--      if (match_icase)
--        free((char*)buf);
--      if (mb_properties)
--        free(mb_properties);
--    }
--#endif /* MBS_SUPPORT */
-   return ret_val;
- }
- #endif /* defined(GREP_PROGRAM) || defined(EGREP_PROGRAM) */
- 
-+#ifdef MBS_SUPPORT
-+static int f_i_multibyte; /* whether we're using the new -Fi MB method */
-+static struct
-+{
-+  wchar_t **patterns;
-+  size_t count, maxlen;
-+  unsigned char *match;
-+} Fimb;
-+#endif
-+
- #if defined(GREP_PROGRAM) || defined(FGREP_PROGRAM)
- COMPILE_FCT(Fcompile)
- {
-+  int mb_cur_max = MB_CUR_MAX;
-   char const *beg, *lim, *err;
- 
-+  check_utf8 ();
-+#ifdef MBS_SUPPORT
-+  /* Support -F -i for UTF-8 input. */
-+  if (match_icase && mb_cur_max > 1)
-+    {
-+      mbstate_t mbs;
-+      wchar_t *wcpattern = xmalloc ((size + 1) * sizeof (wchar_t));
-+      const char *patternend = pattern;
-+      size_t wcsize;
-+      kwset_t fimb_kwset = NULL;
-+      char *starts = NULL;
-+      wchar_t *wcbeg, *wclim;
-+      size_t allocated = 0;
-+
-+      memset (&mbs, '\0', sizeof (mbs));
-+# ifdef __GNU_LIBRARY__
-+      wcsize = mbsnrtowcs (wcpattern, &patternend, size, size, &mbs);
-+      if (patternend != pattern + size)
-+	wcsize = (size_t) -1;
-+# else
-+      {
-+	char *patterncopy = xmalloc (size + 1);
-+
-+	memcpy (patterncopy, pattern, size);
-+	patterncopy[size] = '\0';
-+	patternend = patterncopy;
-+	wcsize = mbsrtowcs (wcpattern, &patternend, size, &mbs);
-+	if (patternend != patterncopy + size)
-+	  wcsize = (size_t) -1;
-+	free (patterncopy);
-+      }
-+# endif
-+      if (wcsize + 2 <= 2)
-+	{
-+fimb_fail:
-+	  free (wcpattern);
-+	  free (starts);
-+	  if (fimb_kwset)
-+	    kwsfree (fimb_kwset);
-+	  free (Fimb.patterns);
-+	  Fimb.patterns = NULL;
-+	}
-+      else
-+	{
-+	  if (!(fimb_kwset = kwsalloc (NULL)))
-+	    error (2, 0, _("memory exhausted"));
-+
-+	  starts = xmalloc (mb_cur_max * 3);
-+	  wcbeg = wcpattern;
-+	  do
-+	    {
-+	      int i;
-+	      size_t wclen;
-+
-+	      if (Fimb.count >= allocated)
-+		{
-+		  if (allocated == 0)
-+		    allocated = 128;
-+		  else
-+		    allocated *= 2;
-+		  Fimb.patterns = xrealloc (Fimb.patterns,
-+					    sizeof (wchar_t *) * allocated);
-+		}
-+	      Fimb.patterns[Fimb.count++] = wcbeg;
-+	      for (wclim = wcbeg;
-+		   wclim < wcpattern + wcsize && *wclim != L'\n'; ++wclim)
-+		*wclim = towlower (*wclim);
-+	      *wclim = L'\0';
-+	      wclen = wclim - wcbeg;
-+	      if (wclen > Fimb.maxlen)
-+		Fimb.maxlen = wclen;
-+	      if (wclen > 3)
-+		wclen = 3;
-+	      if (wclen == 0)
-+		{
-+		  if ((err = kwsincr (fimb_kwset, "", 0)) != 0)
-+		    error (2, 0, err);
-+		}
-+	      else
-+		for (i = 0; i < (1 << wclen); i++)
-+		  {
-+		    char *p = starts;
-+		    int j, k;
-+
-+		    for (j = 0; j < wclen; ++j)
-+		      {
-+			wchar_t wc = wcbeg[j];
-+			if (i & (1 << j))
-+			  {
-+			    wc = towupper (wc);
-+			    if (wc == wcbeg[j])
-+			      continue;
-+			  }
-+			k = wctomb (p, wc);
-+			if (k <= 0)
-+			  goto fimb_fail;
-+			p += k;
-+		      }
-+		    if ((err = kwsincr (fimb_kwset, starts, p - starts)) != 0)
-+		      error (2, 0, err);
-+		  }
-+	      if (wclim < wcpattern + wcsize)
-+		++wclim;
-+	      wcbeg = wclim;
-+	    }
-+	  while (wcbeg < wcpattern + wcsize);
-+	  f_i_multibyte = 1;
-+	  kwset = fimb_kwset;
-+	  free (starts);
-+	  Fimb.match = xmalloc (Fimb.count);
-+	  if ((err = kwsprep (kwset)) != 0)
-+	    error (2, 0, err);
-+	  return;
-+	}
-+    }
-+#endif /* MBS_SUPPORT */
-+
-+
-   kwsinit ();
-   beg = pattern;
-   do
-@@ -511,6 +777,76 @@
-     error (2, 0, err);
- }
- 
-+#ifdef MBS_SUPPORT
-+static int
-+Fimbexec (const char *buf, size_t size, size_t *plen, int exact)
-+{
-+  size_t len, letter, i;
-+  int ret = -1;
-+  mbstate_t mbs;
-+  wchar_t wc;
-+  int patterns_left;
-+
-+  assert (match_icase && f_i_multibyte == 1);
-+  assert (MB_CUR_MAX > 1);
-+
-+  memset (&mbs, '\0', sizeof (mbs));
-+  memset (Fimb.match, '\1', Fimb.count);
-+  letter = len = 0;
-+  patterns_left = 1;
-+  while (patterns_left && len <= size)
-+    {
-+      size_t c;
-+
-+      patterns_left = 0;
-+      if (len < size)
-+	{
-+	  c = mbrtowc (&wc, buf + len, size - len, &mbs);
-+	  if (c + 2 <= 2)
-+	    return ret;
-+
-+	  wc = towlower (wc);
-+	}
-+      else
-+	{
-+	  c = 1;
-+	  wc = L'\0';
-+	}
-+
-+      for (i = 0; i < Fimb.count; i++)
-+	{
-+	  if (Fimb.match[i])
-+	    {
-+	      if (Fimb.patterns[i][letter] == L'\0')
-+		{
-+		  /* Found a match. */
-+		  *plen = len;
-+		  if (!exact && !match_words)
-+		    return 0;
-+		  else
-+		    {
-+		      /* For -w or exact look for longest match.  */
-+		      ret = 0;
-+		      Fimb.match[i] = '\0';
-+		      continue;
-+		    }
-+		}
-+
-+	      if (Fimb.patterns[i][letter] == wc)
-+		patterns_left = 1;
-+	      else
-+		Fimb.match[i] = '\0';
-+	    }
-+	}
-+
-+      len += c;
-+      letter++;
-+    }
-+
-+  return ret;
-+}
-+#endif /* MBS_SUPPORT */
-+
- EXECUTE_FCT(Fexecute)
- {
-   register char const *beg, *try, *end;
-@@ -519,69 +855,256 @@
-   struct kwsmatch kwsmatch;
-   size_t ret_val;
- #ifdef MBS_SUPPORT
--  char *mb_properties = NULL;
--  if (MB_CUR_MAX > 1)
--    {
--      if (match_icase)
--        {
--          char *case_buf = xmalloc(size);
--          memcpy(case_buf, buf, size);
--	  if (start_ptr)
--	    start_ptr = case_buf + (start_ptr - buf);
--          buf = case_buf;
--        }
--      mb_properties = check_multibyte_string(buf, size);
--    }
-+  int mb_cur_max = MB_CUR_MAX;
-+  mbstate_t mbs;
-+  memset (&mbs, '\0', sizeof (mbstate_t));
-+  const char *last_char = NULL;
- #endif /* MBS_SUPPORT */
- 
-   for (beg = start_ptr ? start_ptr : buf; beg <= buf + size; beg++)
-     {
-       size_t offset = kwsexec (kwset, beg, buf + size - beg, &kwsmatch);
-       if (offset == (size_t) -1)
--	goto failure;
-+	return offset;
- #ifdef MBS_SUPPORT
--      if (MB_CUR_MAX > 1 && mb_properties[offset+beg-buf] == 0)
--	continue; /* It is a part of multibyte character.  */
-+      if (mb_cur_max > 1 && !using_utf8)
-+	{
-+	  size_t bytes_left = offset;
-+	  while (bytes_left)
-+	    {
-+	      size_t mlen = mbrlen (beg, bytes_left, &mbs);
-+
-+	      last_char = beg;
-+	      if (mlen == (size_t) -1 || mlen == 0)
-+		{
-+		  /* Incomplete character: treat as single-byte. */
-+		  memset (&mbs, '\0', sizeof (mbstate_t));
-+		  beg++;
-+		  bytes_left--;
-+		  continue;
-+		}
-+
-+	      if (mlen == (size_t) -2)
-+		/* Offset points inside multibyte character: no good. */
-+		break;
-+
-+	      beg += mlen;
-+	      bytes_left -= mlen;
-+	    }
-+
-+	  if (bytes_left)
-+	    continue;
-+	}
-+      else
- #endif /* MBS_SUPPORT */
-       beg += offset;
-+#ifdef MBS_SUPPORT
-+      /* For f_i_multibyte, the string at beg now matches first 3 chars of
-+	 one of the search strings (less if there are shorter search strings).
-+	 See if this is a real match.  */
-+      if (f_i_multibyte
-+	  && Fimbexec (beg, buf + size - beg, &kwsmatch.size[0], start_ptr == NULL))
-+	goto next_char;
-+#endif /* MBS_SUPPORT */
-       len = kwsmatch.size[0];
-       if (start_ptr && !match_words)
- 	goto success_in_beg_and_len;
-       if (match_lines)
- 	{
- 	  if (beg > buf && beg[-1] != eol)
--	    continue;
-+	    goto next_char;
- 	  if (beg + len < buf + size && beg[len] != eol)
--	    continue;
-+	    goto next_char;
- 	  goto success;
- 	}
-       else if (match_words)
--	for (try = beg; len; )
--	  {
--	    if (try > buf && WCHAR((unsigned char) try[-1]))
--	      break;
--	    if (try + len < buf + size && WCHAR((unsigned char) try[len]))
--	      {
--		offset = kwsexec (kwset, beg, --len, &kwsmatch);
--		if (offset == (size_t) -1)
--		  break;
--		try = beg + offset;
--		len = kwsmatch.size[0];
--	      }
--	    else if (!start_ptr)
--	      goto success;
--	    else
--	      goto success_in_beg_and_len;
--	  } /* for (try) */
--      else
-+	{
-+	  while (len)
-+	    {
-+	      int word_match = 0;
-+	      if (beg > buf)
-+		{
-+#ifdef MBS_SUPPORT
-+		  if (mb_cur_max > 1)
-+		    {
-+		      const char *s;
-+		      int mr;
-+		      wchar_t pwc;
-+
-+		      if (using_utf8)
-+			{
-+			  s = beg - 1;
-+			  while (s > buf
-+				 && (unsigned char) *s >= 0x80
-+				 && (unsigned char) *s <= 0xbf)
-+			    --s;
-+			}
-+		      else
-+			s = last_char;
-+		      mr = mbtowc (&pwc, s, beg - s);
-+		      if (mr <= 0)
-+			memset (&mbs, '\0', sizeof (mbstate_t));
-+		      else if ((iswalnum (pwc) || pwc == L'_')
-+			       && mr == (int) (beg - s))
-+			goto next_char;
-+		    }
-+		  else
-+#endif /* MBS_SUPPORT */
-+		  if (WCHAR ((unsigned char) beg[-1]))
-+		    goto next_char;
-+		}
-+#ifdef MBS_SUPPORT
-+	      if (mb_cur_max > 1)
-+		{
-+		  wchar_t nwc;
-+		  int mr;
-+
-+		  mr = mbtowc (&nwc, beg + len, buf + size - beg - len);
-+		  if (mr <= 0)
-+		    {
-+		      memset (&mbs, '\0', sizeof (mbstate_t));
-+		      word_match = 1;
-+		    }
-+		  else if (!iswalnum (nwc) && nwc != L'_')
-+		    word_match = 1;
-+		}
-+	      else
-+#endif /* MBS_SUPPORT */
-+		if (beg + len >= buf + size || !WCHAR ((unsigned char) beg[len]))
-+		  word_match = 1;
-+	      if (word_match)
-+		{
-+		  if (start_ptr == NULL)
-+		    /* Returns the whole line now we know there's a word match. */
-+		    goto success;
-+		  else {
-+		    /* Returns just this word match. */
-+		    *match_size = len;
-+		    return beg - buf;
-+		  }
-+		}
-+	      if (len > 0)
-+		{
-+		  /* Try a shorter length anchored at the same place. */
-+		  --len;
-+		  offset = kwsexec (kwset, beg, len, &kwsmatch);
-+
-+		  if (offset == -1)
-+		    goto next_char; /* Try a different anchor. */
-+#ifdef MBS_SUPPORT
-+
-+		  if (mb_cur_max > 1 && !using_utf8)
-+		    {
-+		      size_t bytes_left = offset;
-+		      while (bytes_left)
-+			{
-+			  size_t mlen = mbrlen (beg, bytes_left, &mbs);
-+
-+			  last_char = beg;
-+			  if (mlen == (size_t) -1 || mlen == 0)
-+			    {
-+			      /* Incomplete character: treat as single-byte. */
-+			      memset (&mbs, '\0', sizeof (mbstate_t));
-+			      beg++;
-+			      bytes_left--;
-+			      continue;
-+			    }
-+
-+			  if (mlen == (size_t) -2)
-+			    {
-+			      /* Offset points inside multibyte character:
-+			       * no good. */
-+			      break;
-+			    }
-+
-+			  beg += mlen;
-+			  bytes_left -= mlen;
-+			}
-+
-+		      if (bytes_left)
-+			{
-+			  memset (&mbs, '\0', sizeof (mbstate_t));
-+			  goto next_char; /* Try a different anchor. */
-+			}
-+		    }
-+		  else
-+#endif /* MBS_SUPPORT */
-+		  beg += offset;
-+#ifdef MBS_SUPPORT
-+		  /* The string at beg now matches first 3 chars of one of
-+		     the search strings (less if there are shorter search
-+		     strings).  See if this is a real match.  */
-+		  if (f_i_multibyte
-+		      && Fimbexec (beg, len - offset, &kwsmatch.size[0],
-+				   start_ptr == NULL))
-+		    goto next_char;
-+#endif /* MBS_SUPPORT */
-+		  len = kwsmatch.size[0];
-+		}
-+	    }
-+	}
-+       else
- 	goto success;
--    } /* for (beg in buf) */
-+next_char:;
-+#ifdef MBS_SUPPORT
-+      /* Advance to next character.  For MB_CUR_MAX == 1 case this is handled
-+	 by ++beg above.  */
-+      if (mb_cur_max > 1)
-+	{
-+	  if (using_utf8)
-+	    {
-+	      unsigned char c = *beg;
-+	      if (c >= 0xc2)
-+		{
-+		  if (c < 0xe0)
-+		    ++beg;
-+		  else if (c < 0xf0)
-+		    beg += 2;
-+		  else if (c < 0xf8)
-+		    beg += 3;
-+		  else if (c < 0xfc)
-+		    beg += 4;
-+		  else if (c < 0xfe)
-+		    beg += 5;
-+		}
-+	    }
-+	  else
-+	    {
-+	      size_t l = mbrlen (beg, buf + size - beg, &mbs);
- 
-- failure:
--  ret_val = -1;
--  goto out;
-+	      last_char = beg;
-+	      if (l + 2 >= 2)
-+		beg += l - 1;
-+	      else
-+		memset (&mbs, '\0', sizeof (mbstate_t));
-+	    }
-+	}
-+#endif /* MBS_SUPPORT */
-+    }
-+
-+  return -1;
- 
-  success:
-+#ifdef MBS_SUPPORT
-+  if (mb_cur_max > 1 && !using_utf8)
-+    {
-+      end = beg + len;
-+      while (end < buf + size)
-+	{
-+	  size_t mlen = mbrlen (end, buf + size - end, &mbs);
-+	  if (mlen == (size_t) -1 || mlen == (size_t) -2 || mlen == 0)
-+	    {
-+	      memset (&mbs, '\0', sizeof (mbstate_t));
-+	      mlen = 1;
-+	    }
-+	  if (mlen == 1 && *end == eol)
-+	    break;
-+
-+	  end += mlen;
-+	}
-+     }
-+  else
-+ #endif /* MBS_SUPPORT */
-   end = memchr (beg + len, eol, (buf + size) - (beg + len));
-   end++;
-   while (buf < beg && beg[-1] != eol)
-@@ -591,15 +1114,6 @@
-   *match_size = len;
-   ret_val = beg - buf;
-  out:
--#ifdef MBS_SUPPORT
--  if (MB_CUR_MAX > 1)
--    {
--      if (match_icase)
--        free((char*)buf);
--      if (mb_properties)
--        free(mb_properties);
--    }
--#endif /* MBS_SUPPORT */
-   return ret_val;
- }
- #endif /* defined(GREP_PROGRAM) || defined(FGREP_PROGRAM) */
Index: tches/inetutils-1.6-no_server_man_pages-1.patch
===================================================================
--- patches/inetutils-1.6-no_server_man_pages-1.patch	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,48 +1,0 @@
-Submitted By: Matthew Burgess <matthew at linuxfromscratch dot org>
-Resubmitted By: Joe Ciccone <jciccone at linuxfromscratch dot org>
-Redone By: Jim Gifford <jim at cross-lfs dot org>
-Date: 2008-12-29
-Initial Package Version: 1.6
-Origin: Greg Schafer
-Description: Prevent installation of unwanted server man pages.
-
-diff -Naur inetutils-1.6.orig/Makefile.am inetutils-1.6/Makefile.am
---- inetutils-1.6.orig/Makefile.am	2008-09-27 01:16:31.000000000 -0700
-+++ inetutils-1.6/Makefile.am	2008-12-29 13:05:03.000000000 -0800
-@@ -23,9 +23,13 @@
- EXTRA_DIST = README-alpha paths ChangeLog.0
- 
- SUBDIRS = lib headers libinetutils libtelnet \
--	hostname inetd telnetd libls ftpd rshd rlogind uucpd rexecd syslogd \
--	tftpd talkd telnet ftp rsh rcp rlogin tftp logger gwhois talk \
--	libicmp ping doc ifconfig traceroute tests
-+	hostname $(inetd_BUILD) $(telnetd_BUILD) \
-+        libls $(ftpd_BUILD) $(rshd_BUILD) $(rlogin_BUILD) \
-+	$(uucpd_BUILD) $(rexecd_BUILD) $(syslogd_BUILD) \
-+	$(tftpd_BUILD) $(talkd_BUILD) $(telnet_BUILD) \
-+	$(ftp_BUILD) $(rsh_BUILD) $(rcp_BUILD) $(rlogin_BUILD) \
-+	$(tftp_BUILD) $(logger_BUILD) $(gwhois_BUILD) $(talk_BUILD) \
-+	libicmp $(ping_BUILD) doc $(ifconfig_BUILD) $(traceroute_BUILD) tests
- 
- DISTCLEANFILES = pathdefs.make paths.defs
- 
-diff -Naur inetutils-1.6.orig/Makefile.in inetutils-1.6/Makefile.in
---- inetutils-1.6.orig/Makefile.in	2008-12-27 12:52:31.000000000 -0800
-+++ inetutils-1.6/Makefile.in	2008-12-29 13:07:32.000000000 -0800
-@@ -648,9 +648,13 @@
- ACLOCAL_AMFLAGS = -I m4
- EXTRA_DIST = README-alpha paths ChangeLog.0
- SUBDIRS = lib headers libinetutils libtelnet \
--	hostname inetd telnetd libls ftpd rshd rlogind uucpd rexecd syslogd \
--	tftpd talkd telnet ftp rsh rcp rlogin tftp logger gwhois talk \
--	libicmp ping doc ifconfig traceroute tests
-+	hostname $(inetd_BUILD) $(telnetd_BUILD) \
-+        libls $(ftpd_BUILD) $(rshd_BUILD) $(rlogin_BUILD) \
-+	$(uucpd_BUILD) $(rexecd_BUILD) $(syslogd_BUILD) \
-+	$(tftpd_BUILD) $(talkd_BUILD) $(telnet_BUILD) \
-+	$(ftp_BUILD) $(rsh_BUILD) $(rcp_BUILD) $(rlogin_BUILD) \
-+	$(tftp_BUILD) $(logger_BUILD) $(gwhois_BUILD) $(talk_BUILD) \
-+	libicmp $(ping_BUILD) doc $(ifconfig_BUILD) $(traceroute_BUILD) tests
- 
- DISTCLEANFILES = pathdefs.make paths.defs
- all: config.h
Index: tches/iputils-s20071127-fixes-2.patch
===================================================================
--- patches/iputils-s20071127-fixes-2.patch	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,235 +1,0 @@
-Submitted By: Jim Gifford (jim at cross-lfs dot org)
-Date: 02-18-2009
-Initial Package Version: s20071127
-Origin: Debian and Fedora
-Upstream Status: Unknown
-Description: Fixes Various Issues
-
-diff -Naur iputils-s20071127.orig/arping.c iputils-s20071127/arping.c
---- iputils-s20071127.orig/arping.c	2007-11-26 16:57:27.000000000 -0800
-+++ iputils-s20071127/arping.c	2009-02-18 23:18:09.239954184 -0800
-@@ -168,12 +168,17 @@
- 	if (start.tv_sec==0)
- 		start = tv;
- 
--	if (count-- == 0 || (timeout && MS_TDIFF(tv,start) > timeout*1000 + 500))
--		finish();
-+	if (timeout && MS_TDIFF(tv,start) > timeout*1000 + 500)
-+ 		finish();
- 
--	if (last.tv_sec==0 || MS_TDIFF(tv,last) > 500) {
-+	if ((!timeout) && (count == 0))
-+		finish();
-+ 
-+	if ( count!=0  && (last.tv_sec==0 || MS_TDIFF(tv,last) > 500 ) ) {
- 		send_pack(s, src, dst, &me, &he);
--		if (count == 0 && unsolicited)
-+		if (count >= 0)
-+			count--;
-+		if (count==0 && unsolicited)
- 			finish();
- 	}
- 	alarm(1);
-diff -Naur iputils-s20071127.orig/doc/docbook2man-spec.pl iputils-s20071127/doc/docbook2man-spec.pl
---- iputils-s20071127.orig/doc/docbook2man-spec.pl	2007-11-26 16:57:27.000000000 -0800
-+++ iputils-s20071127/doc/docbook2man-spec.pl	2009-02-18 23:18:09.239954184 -0800
-@@ -428,7 +428,7 @@
- 	output ' ';
- 
- 	if($_[0]->attribute('CHOICE')->value =~ /opt/i) {
--		output '[ ';
-+		output '[';
- 	}
- 	bold_on();
- }
-@@ -441,7 +441,7 @@
- 		font_off();
- 	}
- 	if($_[0]->attribute('CHOICE')->value =~ /opt/i) {
--		output '] ';
-+		output ']';
- 	}
- }
- 
-diff -Naur iputils-s20071127.orig/doc/Makefile iputils-s20071127/doc/Makefile
---- iputils-s20071127.orig/doc/Makefile	2007-11-26 16:57:27.000000000 -0800
-+++ iputils-s20071127/doc/Makefile	2009-02-18 23:18:09.239954184 -0800
-@@ -6,7 +6,7 @@
- 
- html: $(HTMLFILES) iputils.html
- 
--man: $(MANFILES)
-+man: $(MANFILES) fix_sgml2man
- 
- # docbook scripts are incredibly dirty in the sense that they leak
- # lots of some strange temporary junk directories and files.
-@@ -33,6 +33,9 @@
- 	@set -e; cd tmp.db2man; nsgmls ../$< | sgmlspl ../docbook2man-spec.pl ;	mv $@ ..
- 	@-rm -rf tmp.db2man
- 
-+fix_sgml2man:
-+	@sed -i -e 's!\\fB\\fIdestination\\fB\\fR \[\\fB/\\fIport\\fB\\fR\]!\\fB\\fIdestination\\fB\\fR[\\fB/\\fIport\\fB\\fR]!g' tracepath.8
-+
- clean:
- 	@rm -rf $(MANFILES) $(HTMLFILES) iputils.html tmp.db2html tmp.db2man
- 
-diff -Naur iputils-s20071127.orig/Makefile iputils-s20071127/Makefile
---- iputils-s20071127.orig/Makefile	2007-11-26 16:57:27.000000000 -0800
-+++ iputils-s20071127/Makefile	2009-02-18 23:18:09.239954184 -0800
-@@ -16,7 +16,7 @@
- CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g
- CFLAGS=$(CCOPT) $(GLIBCFIX) $(DEFINES) 
- 
--IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd
-+IPV4_TARGETS=tracepath ping clockdiff rdisc arping
- IPV6_TARGETS=tracepath6 traceroute6 ping6
- TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS)
- 
-@@ -25,7 +25,6 @@
- 
- all: $(TARGETS)
- 
--
- tftpd: tftpd.o tftpsubs.o
- ping: ping.o ping_common.o
- ping6: ping6.o ping_common.o
-@@ -37,7 +36,6 @@
- rdisc_srv.o: rdisc.c
- 	$(CC) $(CFLAGS) -DRDISC_SERVER -o rdisc_srv.o rdisc.c
- 
--
- check-kernel:
- ifeq ($(KERNEL_INCLUDE),)
- 	@echo "Please, set correct KERNEL_INCLUDE"; false
-diff -Naur iputils-s20071127.orig/ping6.c iputils-s20071127/ping6.c
---- iputils-s20071127.orig/ping6.c	2007-11-26 16:57:27.000000000 -0800
-+++ iputils-s20071127/ping6.c	2009-02-18 23:18:09.239954184 -0800
-@@ -414,7 +414,7 @@
- 			fprintf(stderr, "ping: unknown iface %s\n", device);
- 			exit(2);
- 		}
--		cmsg = (struct cmsghdr*)cmsgbuf;
-+		cmsg = (struct cmsghdr*)(cmsgbuf+cmsglen);
- 		cmsglen += CMSG_SPACE(sizeof(*ipi));
- 		cmsg->cmsg_len = CMSG_LEN(sizeof(*ipi));
- 		cmsg->cmsg_level = SOL_IPV6;
-@@ -486,7 +486,6 @@
- 	/*
- 	 *	select icmp echo reply as icmp type to receive
- 	 */
--
- 	ICMP6_FILTER_SETBLOCKALL(&filter);
- 
- 	if (!working_recverr) {
-diff -Naur iputils-s20071127.orig/ping.c iputils-s20071127/ping.c
---- iputils-s20071127.orig/ping.c	2007-11-26 16:57:27.000000000 -0800
-+++ iputils-s20071127/ping.c	2009-02-18 23:18:09.239954184 -0800
-@@ -249,7 +249,7 @@
- 			if (argc == 1)
- 				options |= F_NUMERIC;
- 		} else {
--			hp = gethostbyname(target);
-+			hp = gethostbyname2(target, AF_INET);
- 			if (!hp) {
- 				fprintf(stderr, "ping: unknown host %s\n", target);
- 				exit(2);
-@@ -865,9 +865,36 @@
- 		case ICMP_SR_FAILED:
- 			printf("Source Route Failed\n");
- 			break;
-+		case ICMP_NET_UNKNOWN:
-+			printf("Destination Net Unknown\n");
-+			break;
-+		case ICMP_HOST_UNKNOWN:
-+			printf("Destination Host Unknown\n");
-+			break;
-+		case ICMP_HOST_ISOLATED:
-+			printf("Source Host Isolated\n");
-+			break;
-+		case ICMP_NET_ANO:
-+			printf("Destination Net Prohibited\n");
-+			break;
-+		case ICMP_HOST_ANO:
-+			printf("Destination Host Prohibited\n");
-+			break;
-+		case ICMP_NET_UNR_TOS:
-+			printf("Destination Net Unreachable for Type of Service\n");
-+			break;
-+		case ICMP_HOST_UNR_TOS:
-+			printf("Destination Host Unreachable for Type of Service\n");
-+			break;
- 		case ICMP_PKT_FILTERED:
- 			printf("Packet filtered\n");
- 			break;
-+		case ICMP_PREC_VIOLATION:
-+			printf("Precedence Violation\n");
-+			break;
-+		case ICMP_PREC_CUTOFF:
-+			printf("Precedence Cutoff\n");
-+			break;
- 		default:
- 			printf("Dest Unreachable, Bad Code: %d\n", code);
- 			break;
-diff -Naur iputils-s20071127.orig/ping_common.c iputils-s20071127/ping_common.c
---- iputils-s20071127.orig/ping_common.c	2007-11-26 16:57:27.000000000 -0800
-+++ iputils-s20071127/ping_common.c	2009-02-18 23:18:09.239954184 -0800
-@@ -818,7 +818,8 @@
- 	}
- 	if (pipesize > 1)
- 		printf(", pipe %d", pipesize);
--	if (ntransmitted > 1 && (!interval || (options&(F_FLOOD|F_ADAPTIVE)))) {
-+	if (ntransmitted > 1 && nreceived && 
-+			(!interval || (options&(F_FLOOD|F_ADAPTIVE)))) {
- 		int ipg = (1000000*(long long)tv.tv_sec+tv.tv_usec)/(ntransmitted-1);
- 		printf(", ipg/ewma %d.%03d/%d.%03d ms",
- 		       ipg/1000, ipg%1000, rtt/8000, (rtt/8)%1000);
-@@ -852,4 +853,3 @@
- 	}
- 	fprintf(stderr, "\n");
- }
--
-diff -Naur iputils-s20071127.orig/rdisc.c iputils-s20071127/rdisc.c
---- iputils-s20071127.orig/rdisc.c	2007-11-26 16:57:27.000000000 -0800
-+++ iputils-s20071127/rdisc.c	2009-02-18 23:18:31.745396284 -0800
-@@ -240,14 +240,25 @@
- {
- 	int t;
- 	pid_t pid;
-+	long open_max;
- 
- 	if (trace)
- 		return;
-+	if ((open_max = sysconf(_SC_OPEN_MAX)) == -1) {
-+		if (errno == 0) {
-+			(void) fprintf(stderr, "OPEN_MAX is not supported\n");
-+		} 
-+		else {
-+			(void) fprintf(stderr, "sysconf() error\n");
-+		}
-+		exit(1);
-+	}
-+
- 
- 	if ((pid=fork()) != 0)
- 		exit(0);
- 
--	for (t = 0; t < OPEN_MAX; t++)
-+	for (t = 0; t < open_max; t++)
- 		if (t != s)
- 			close(t);
- 
-diff -Naur iputils-s20071127.orig/tracepath.c iputils-s20071127/tracepath.c
---- iputils-s20071127.orig/tracepath.c	2007-11-26 16:57:27.000000000 -0800
-+++ iputils-s20071127/tracepath.c	2009-02-18 23:18:09.239954184 -0800
-@@ -318,9 +318,9 @@
- 		base_port = atoi(p+1);
- 	} else
- 		base_port = 44444;
--	he = gethostbyname(argv[0]);
-+	he = gethostbyname2(argv[0], AF_INET);
- 	if (he == NULL) {
--		herror("gethostbyname");
-+		herror("gethostbyname2");
- 		exit(1);
- 	}
- 	memcpy(&target.sin_addr, he->h_addr, 4);
Index: tches/iputils-s20071127-manpages-2.patch
===================================================================
--- patches/iputils-s20071127-manpages-2.patch	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,803 +1,0 @@
-Submitted By: Jim Gifford <jim at cross-lfs dot org>
-Date: 2009-02-18
-Initial Package Version: s20071127
-Upstream Status: Unknown
-Origin: Jim Gifford
-Description: Provides the man pages (adding docbook2man with all its
-             dependencies would be a major addition to the book, so I built it
-             -once- on a completed system and saved the data).
-
-diff -Naur doc/arping.8 doc/arping.8
---- doc/arping.8	1969-12-31 16:00:00.000000000 -0800
-+++ doc/arping.8	2009-02-18 23:20:33.249183964 -0800
-@@ -0,0 +1,110 @@
-+.\" This manpage has been automatically generated by docbook2man 
-+.\" from a DocBook document.  This tool can be found at:
-+.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
-+.\" Please send any bug reports, improvements, comments, patches, 
-+.\" etc. to Steve Cheng <steve@ggi-project.org>.
-+.TH "ARPING" "8" "18 February 2009" "iputils-071127" "System Manager's Manual: iputils"
-+.SH NAME
-+arping \- send ARP REQUEST to a neighbour host
-+.SH SYNOPSIS
-+
-+\fBarping\fR [\fB-AbDfhqUV\fR] [\fB-c \fIcount\fB\fR] [\fB-w \fIdeadline\fB\fR] [\fB-s \fIsource\fB\fR] \fB-I \fIinterface\fB\fR \fB\fIdestination\fB\fR
-+
-+.SH "DESCRIPTION"
-+.PP
-+Ping \fIdestination\fR on device \fIinterface\fR by ARP packets,
-+using source address \fIsource\fR.
-+.SH "OPTIONS"
-+.TP
-+\fB-A\fR
-+The same as \fB-U\fR, but ARP REPLY packets used instead
-+of ARP REQUEST.
-+.TP
-+\fB-b\fR
-+Send only MAC level broadcasts. Normally \fBarping\fR starts
-+from sending broadcast, and switch to unicast after reply received.
-+.TP
-+\fB-c \fIcount\fB\fR
-+Stop after sending \fIcount\fR ARP REQUEST
-+packets. With 
-+\fIdeadline\fR
-+option, \fBarping\fR waits for
-+\fIcount\fR ARP REPLY packets, until the timeout expires.
-+.TP
-+\fB-D\fR
-+Duplicate address detection mode (DAD). See 
-+RFC2131, 4.4.1.
-+Returns 0, if DAD succeeded i.e. no replies are received
-+.TP
-+\fB-f\fR
-+Finish after the first reply confirming that target is alive.
-+.TP
-+\fB-I \fIinterface\fB\fR
-+Name of network device where to send ARP REQUEST packets. This option
-+is required.
-+.TP
-+\fB-h\fR
-+Print help page and exit.
-+.TP
-+\fB-q\fR
-+Quiet output. Nothing is displayed.
-+.TP
-+\fB-s \fIsource\fB\fR
-+IP source address to use in ARP packets.
-+If this option is absent, source address is:
-+.RS
-+.TP 0.2i
-+\(bu
-+In DAD mode (with option \fB-D\fR) set to 0.0.0.0.
-+.TP 0.2i
-+\(bu
-+In Unsolicited ARP mode (with options \fB-U\fR or \fB-A\fR)
-+set to \fIdestination\fR.
-+.TP 0.2i
-+\(bu
-+Otherwise, it is calculated from routing tables.
-+.RE
-+.TP
-+\fB-U\fR
-+Unsolicited ARP mode to update neighbours' ARP caches.
-+No replies are expected.
-+.TP
-+\fB-V\fR
-+Print version of the program and exit.
-+.TP
-+\fB-w \fIdeadline\fB\fR
-+Specify a timeout, in seconds, before
-+\fBarping\fR
-+exits regardless of how many
-+packets have been sent or received. In this case
-+\fBarping\fR
-+does not stop after
-+\fIcount\fR
-+packet are sent, it waits either for
-+\fIdeadline\fR
-+expire or until
-+\fIcount\fR
-+probes are answered.
-+.SH "SEE ALSO"
-+.PP
-+\fBping\fR(8),
-+\fBclockdiff\fR(8),
-+\fBtracepath\fR(8).
-+.SH "AUTHOR"
-+.PP
-+\fBarping\fR was written by
-+Alexey Kuznetsov
-+<kuznet@ms2.inr.ac.ru>.
-+It is now maintained by
-+YOSHIFUJI Hideaki
-+<yoshfuji@skbuff.net>.
-+.SH "SECURITY"
-+.PP
-+\fBarping\fR requires CAP_NET_RAWIO capability
-+to be executed. It is not recommended to be used as set-uid root,
-+because it allows user to modify ARP caches of neighbour hosts.
-+.SH "AVAILABILITY"
-+.PP
-+\fBarping\fR is part of \fIiputils\fR package
-+and the latest versions are  available in source form at
-+http://www.skbuff.net/iputils/iputils-current.tar.bz2.
-diff -Naur doc/clockdiff.8 doc/clockdiff.8
---- doc/clockdiff.8	1969-12-31 16:00:00.000000000 -0800
-+++ doc/clockdiff.8	2009-02-18 23:20:33.249183964 -0800
-@@ -0,0 +1,81 @@
-+.\" This manpage has been automatically generated by docbook2man 
-+.\" from a DocBook document.  This tool can be found at:
-+.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
-+.\" Please send any bug reports, improvements, comments, patches, 
-+.\" etc. to Steve Cheng <steve@ggi-project.org>.
-+.TH "CLOCKDIFF" "8" "18 February 2009" "iputils-071127" "System Manager's Manual: iputils"
-+.SH NAME
-+clockdiff \- measure clock difference between hosts
-+.SH SYNOPSIS
-+
-+\fBclockdiff\fR [\fB-o\fR] [\fB-o1\fR] \fB\fIdestination\fB\fR
-+
-+.SH "DESCRIPTION"
-+.PP
-+\fBclockdiff\fR Measures clock difference between us and
-+\fIdestination\fR with 1 msec resolution using ICMP TIMESTAMP
-+[2]
-+packets or, optionally, IP TIMESTAMP option
-+[3]
-+option added to ICMP ECHO.
-+[1]
-+.SH "OPTIONS"
-+.TP
-+\fB-o\fR
-+Use IP TIMESTAMP with ICMP ECHO instead of ICMP TIMESTAMP
-+messages. It is useful with some destinations, which do not support
-+ICMP TIMESTAMP (f.e. Solaris <2.4).
-+.TP
-+\fB-o1\fR
-+Slightly different form of \fB-o\fR, namely it uses three-term
-+IP TIMESTAMP with prespecified hop addresses instead of four term one.
-+What flavor works better depends on target host. Particularly,
-+\fB-o\fR is better for Linux.
-+.SH "WARNINGS"
-+.TP 0.2i
-+\(bu
-+Some nodes (Cisco) use non-standard timestamps, which is allowed
-+by RFC, but makes timestamps mostly useless.
-+.TP 0.2i
-+\(bu
-+Some nodes generate messed timestamps (Solaris>2.4), when
-+run \fBxntpd\fR. Seems, its IP stack uses a corrupted clock source,
-+which is synchronized to time-of-day clock periodically and jumps
-+randomly making timestamps mostly useless. Good news is that you can
-+use NTP in this case, which is even better.
-+.TP 0.2i
-+\(bu
-+\fBclockdiff\fR shows difference in time modulo 24 days.
-+.SH "SEE ALSO"
-+.PP
-+\fBping\fR(8),
-+\fBarping\fR(8),
-+\fBtracepath\fR(8).
-+.SH "REFERENCES"
-+.PP
-+[1] ICMP ECHO,
-+RFC0792, page 14.
-+.PP
-+[2] ICMP TIMESTAMP,
-+RFC0792, page 16.
-+.PP
-+[3] IP TIMESTAMP option,
-+RFC0791, 3.1, page 16.
-+.SH "AUTHOR"
-+.PP
-+\fBclockdiff\fR was compiled by
-+Alexey Kuznetsov
-+<kuznet@ms2.inr.ac.ru>. It was based on code borrowed
-+from BSD \fBtimed\fR daemon.
-+It is now maintained by
-+YOSHIFUJI Hideaki
-+<yoshfuji@skbuff.net>.
-+.SH "SECURITY"
-+.PP
-+\fBclockdiff\fR requires CAP_NET_RAWIO capability
-+to be executed. It is safe to be used as set-uid root.
-+.SH "AVAILABILITY"
-+.PP
-+\fBclockdiff\fR is part of \fIiputils\fR package
-+and the latest versions are  available in source form at
-+http://www.skbuff.net/iputils/iputils-current.tar.bz2.
-diff -Naur doc/ping.8 doc/ping.8
---- doc/ping.8	1969-12-31 16:00:00.000000000 -0800
-+++ doc/ping.8	2009-02-18 23:20:33.249183964 -0800
-@@ -0,0 +1,332 @@
-+.\" This manpage has been automatically generated by docbook2man 
-+.\" from a DocBook document.  This tool can be found at:
-+.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
-+.\" Please send any bug reports, improvements, comments, patches, 
-+.\" etc. to Steve Cheng <steve@ggi-project.org>.
-+.TH "PING" "8" "18 February 2009" "iputils-071127" "System Manager's Manual: iputils"
-+.SH NAME
-+ping, ping6 \- send ICMP ECHO_REQUEST to network hosts
-+.SH SYNOPSIS
-+
-+\fBping\fR [\fB-LRUbdfnqrvVaAB\fR] [\fB-c \fIcount\fB\fR] [\fB-i \fIinterval\fB\fR] [\fB-l \fIpreload\fB\fR] [\fB-p \fIpattern\fB\fR] [\fB-s \fIpacketsize\fB\fR] [\fB-t \fIttl\fB\fR] [\fB-w \fIdeadline\fB\fR] [\fB-F \fIflowlabel\fB\fR] [\fB-I \fIinterface\fB\fR] [\fB-M \fIhint\fB\fR] [\fB-Q \fItos\fB\fR] [\fB-S \fIsndbuf\fB\fR] [\fB-T \fItimestamp option\fB\fR] [\fB-W \fItimeout\fB\fR] [\fB\fIhop\fB\fR\fI ...\fR] \fB\fIdestination\fB\fR
-+
-+.SH "DESCRIPTION"
-+.PP
-+\fBping\fR uses the ICMP protocol's mandatory ECHO_REQUEST
-+datagram to elicit an ICMP ECHO_RESPONSE from a host or gateway.
-+ECHO_REQUEST datagrams (``pings'') have an IP and ICMP
-+header, followed by a struct timeval and then an arbitrary
-+number of ``pad'' bytes used to fill out the packet.
-+.SH "OPTIONS"
-+.TP
-+\fB-a\fR
-+Audible ping.
-+.TP
-+\fB-A\fR
-+Adaptive ping. Interpacket interval adapts to round-trip time, so that
-+effectively not more than one (or more, if preload is set) unanswered probes
-+present in the network. Minimal interval is 200msec for not super-user.
-+On networks with low rtt this mode is essentially equivalent to flood mode.  
-+.TP
-+\fB-b\fR
-+Allow pinging a broadcast address.
-+.TP
-+\fB-B\fR
-+Do not allow \fBping\fR to change source address of probes.
-+The address is bound to one selected when \fBping\fR starts.
-+.TP
-+\fB-c \fIcount\fB\fR
-+Stop after sending \fIcount\fR ECHO_REQUEST
-+packets. With 
-+\fIdeadline\fR
-+option, \fBping\fR waits for
-+\fIcount\fR ECHO_REPLY packets, until the timeout expires.
-+.TP
-+\fB-d\fR
-+Set the SO_DEBUG option on the socket being used.
-+Essentially, this socket option is not used by Linux kernel. 
-+.TP
-+\fB-F \fIflow label\fB\fR
-+Allocate and set 20 bit flow label on echo request packets.
-+(Only \fBping6\fR). If value is zero, kernel allocates random flow label.
-+.TP
-+\fB-f\fR
-+Flood ping. For every ECHO_REQUEST sent a period ``.'' is printed,
-+while for ever ECHO_REPLY received a backspace is printed.
-+This provides a rapid display of how many packets are being dropped.
-+If interval is not given, it sets interval to zero and
-+outputs packets as fast as they come back or one hundred times per second,
-+whichever is more.
-+Only the super-user may use this option with zero interval.
-+.TP
-+\fB-i \fIinterval\fB\fR
-+Wait \fIinterval\fR seconds between sending each packet.
-+The default is to wait for one second between each packet normally,
-+or not to wait in flood mode. Only super-user may set interval
-+to values less 0.2 seconds.
-+.TP
-+\fB-I \fIinterface address\fB\fR
-+Set source address to specified interface address. Argument
-+may be numeric IP address or name of device. When pinging IPv6
-+link-local address this option is required.
-+.TP
-+\fB-l \fIpreload\fB\fR
-+If \fIpreload\fR is specified,
-+\fBping\fR sends that many packets not waiting for reply.
-+Only the super-user may select preload more than 3.
-+.TP
-+\fB-L\fR
-+Suppress loopback of multicast packets.  This flag only applies if the ping
-+destination is a multicast address.
-+.TP
-+\fB-n\fR
-+Numeric output only.
-+No attempt will be made to lookup symbolic names for host addresses.
-+.TP
-+\fB-p \fIpattern\fB\fR
-+You may specify up to 16 ``pad'' bytes to fill out the packet you send.
-+This is useful for diagnosing data-dependent problems in a network.
-+For example, \fB-p ff\fR will cause the sent packet
-+to be filled with all ones.
-+.TP
-+\fB-Q \fItos\fB\fR
-+Set Quality of Service -related bits in ICMP datagrams.  
-+\fItos\fR can be either decimal or hex number.
-+Traditionally (RFC1349), these have been interpreted as: 0 for reserved
-+(currently being redefined as congestion control), 1-4 for Type of Service
-+and 5-7 for Precedence.
-+Possible settings for Type of Service are: minimal cost: 0x02, 
-+reliability: 0x04, throughput: 0x08, low delay: 0x10.  Multiple TOS bits
-+should not be set simultaneously.  Possible settings for
-+special Precedence range from priority (0x20) to net control (0xe0).  You
-+must be root (CAP_NET_ADMIN capability) to use Critical or
-+higher precedence value.  You cannot set
-+bit 0x01 (reserved) unless ECN has been enabled in the kernel.
-+In RFC2474, these fields has been redefined as 8-bit Differentiated
-+Services (DS), consisting of: bits 0-1 of separate data (ECN will be used,
-+here), and bits 2-7 of Differentiated Services Codepoint (DSCP).
-+.TP
-+\fB-q\fR
-+Quiet output.
-+Nothing is displayed except the summary lines at startup time and
-+when finished.
-+.TP
-+\fB-R\fR
-+Record route.
-+Includes the RECORD_ROUTE option in the ECHO_REQUEST
-+packet and displays the route buffer on returned packets.
-+Note that the IP header is only large enough for nine such routes.
-+Many hosts ignore or discard this option.
-+.TP
-+\fB-r\fR
-+Bypass the normal routing tables and send directly to a host on an attached
-+interface.
-+If the host is not on a directly-attached network, an error is returned.
-+This option can be used to ping a local host through an interface
-+that has no route through it provided the option \fB-I\fR is also
-+used.
-+.TP
-+\fB-s \fIpacketsize\fB\fR
-+Specifies the number of data bytes to be sent.  
-+The default is 56, which translates into 64 ICMP
-+data bytes when combined with the 8 bytes of ICMP header data.
-+.TP
-+\fB-S \fIsndbuf\fB\fR
-+Set socket sndbuf. If not specified, it is selected to buffer
-+not more than one packet.
-+.TP
-+\fB-t \fIttl\fB\fR
-+Set the IP Time to Live.
-+.TP
-+\fB-T \fItimestamp option\fB\fR
-+Set special IP timestamp options.
-+\fItimestamp option\fR may be either 
-+\fItsonly\fR (only timestamps), 
-+\fItsandaddr\fR (timestamps and addresses) or 
-+\fItsprespec host1 [host2 [host3 [host4]]]\fR
-+(timestamp prespecified hops).
-+.TP
-+\fB-M \fIhint\fB\fR
-+Select Path MTU Discovery strategy.
-+\fIhint\fR may be either \fIdo\fR
-+(prohibit fragmentation, even local one), 
-+\fIwant\fR (do PMTU discovery, fragment locally when packet size
-+is large), or \fIdont\fR (do not set DF flag).
-+.TP
-+\fB-U\fR
-+Print full user-to-user latency (the old behaviour). Normally
-+\fBping\fR
-+prints network round trip time, which can be different
-+f.e. due to DNS failures. 
-+.TP
-+\fB-v\fR
-+Verbose output.
-+.TP
-+\fB-V\fR
-+Show version and exit.
-+.TP
-+\fB-w \fIdeadline\fB\fR
-+Specify a timeout, in seconds, before
-+\fBping\fR
-+exits regardless of how many
-+packets have been sent or received. In this case
-+\fBping\fR
-+does not stop after
-+\fIcount\fR
-+packet are sent, it waits either for
-+\fIdeadline\fR
-+expire or until
-+\fIcount\fR
-+probes are answered or for some error notification from network.   
-+.TP
-+\fB-W \fItimeout\fB\fR
-+Time to wait for a response, in seconds. The option affects only timeout
-+in absense of any responses, otherwise \fBping\fR waits for two RTTs.
-+.PP
-+When using \fBping\fR for fault isolation, it should first be run
-+on the local host, to verify that the local network interface is up
-+and running. Then, hosts and gateways further and further away should be
-+``pinged''. Round-trip times and packet loss statistics are computed.
-+If duplicate packets are received, they are not included in the packet
-+loss calculation, although the round trip time of these packets is used
-+in calculating the minimum/average/maximum round-trip time numbers.
-+When the specified number of packets have been sent (and received) or
-+if the program is terminated with a
-+SIGINT, a brief summary is displayed. Shorter current statistics
-+can be obtained without termination of process with signal
-+SIGQUIT.
-+.PP
-+If \fBping\fR does not receive any reply packets at all it will
-+exit with code 1. If a packet 
-+\fIcount\fR
-+and
-+\fIdeadline\fR
-+are both specified, and fewer than
-+\fIcount\fR
-+packets are received by the time the
-+\fIdeadline\fR
-+has arrived, it will also exit with code 1. 
-+On other error it exits with code 2. Otherwise it exits with code 0. This
-+makes it possible to use the exit code to see if a host is alive or
-+not.
-+.PP
-+This program is intended for use in network testing, measurement and
-+management.
-+Because of the load it can impose on the network, it is unwise to use
-+\fBping\fR during normal operations or from automated scripts.
-+.SH "ICMP PACKET DETAILS"
-+.PP
-+An IP header without options is 20 bytes.
-+An ICMP ECHO_REQUEST packet contains an additional 8 bytes worth
-+of ICMP header followed by an arbitrary amount of data.
-+When a \fIpacketsize\fR is given, this indicated the size of this
-+extra piece of data (the default is 56). Thus the amount of data received
-+inside of an IP packet of type ICMP ECHO_REPLY will always be 8 bytes
-+more than the requested data space (the ICMP header).
-+.PP
-+If the data space is at least of size of struct timeval
-+\fBping\fR uses the beginning bytes of this space to include
-+a timestamp which it uses in the computation of round trip times.
-+If the data space is shorter, no round trip times are given.
-+.SH "DUPLICATE AND DAMAGED PACKETS"
-+.PP
-+\fBping\fR will report duplicate and damaged packets.
-+Duplicate packets should never occur, and seem to be caused by
-+inappropriate link-level retransmissions.
-+Duplicates may occur in many situations and are rarely (if ever) a
-+good sign, although the presence of low levels of duplicates may not
-+always be cause for alarm.
-+.PP
-+Damaged packets are obviously serious cause for alarm and often
-+indicate broken hardware somewhere in the
-+\fBping\fR packet's path (in the network or in the hosts).
-+.SH "TRYING DIFFERENT DATA PATTERNS"
-+.PP
-+The (inter)network layer should never treat packets differently depending
-+on the data contained in the data portion.
-+Unfortunately, data-dependent problems have been known to sneak into
-+networks and remain undetected for long periods of time.
-+In many cases the particular pattern that will have problems is something
-+that doesn't have sufficient ``transitions'', such as all ones or all
-+zeros, or a pattern right at the edge, such as almost all zeros.
-+It isn't necessarily enough to specify a data pattern of all zeros (for
-+example) on the command line because the pattern that is of interest is
-+at the data link level, and the relationship between what you type and
-+what the controllers transmit can be complicated.
-+.PP
-+This means that if you have a data-dependent problem you will probably
-+have to do a lot of testing to find it.
-+If you are lucky, you may manage to find a file that either can't be sent
-+across your network or that takes much longer to transfer than other
-+similar length files.
-+You can then examine this file for repeated patterns that you can test
-+using the \fB-p\fR option of \fBping\fR.
-+.SH "TTL DETAILS"
-+.PP
-+The TTL value of an IP packet represents the maximum number of IP routers
-+that the packet can go through before being thrown away.
-+In current practice you can expect each router in the Internet to decrement
-+the TTL field by exactly one.
-+.PP
-+The TCP/IP specification states that the TTL field for TCP
-+packets should be set to 60, but many systems use smaller values
-+(4.3 BSD uses 30, 4.2 used 15).
-+.PP
-+The maximum possible value of this field is 255, and most Unix systems set
-+the TTL field of ICMP ECHO_REQUEST packets to 255.
-+This is why you will find you can ``ping'' some hosts, but not reach them
-+with
-+\fBtelnet\fR(1)
-+or
-+\fBftp\fR(1).
-+.PP
-+In normal operation ping prints the ttl value from the packet it receives.
-+When a remote system receives a ping packet, it can do one of three things
-+with the TTL field in its response:
-+.TP 0.2i
-+\(bu
-+Not change it; this is what Berkeley Unix systems did before the
-+4.3BSD Tahoe release. In this case the TTL value in the received packet
-+will be 255 minus the number of routers in the round-trip path.
-+.TP 0.2i
-+\(bu
-+Set it to 255; this is what current Berkeley Unix systems do.
-+In this case the TTL value in the received packet will be 255 minus the
-+number of routers in the path \fBfrom\fR
-+the remote system \fBto\fR the \fBping\fRing host.
-+.TP 0.2i
-+\(bu
-+Set it to some other value. Some machines use the same value for
-+ICMP packets that they use for TCP packets, for example either 30 or 60.
-+Others may use completely wild values.
-+.SH "BUGS"
-+.TP 0.2i
-+\(bu
-+Many Hosts and Gateways ignore the RECORD_ROUTE option.
-+.TP 0.2i
-+\(bu
-+The maximum IP header length is too small for options like
-+RECORD_ROUTE to be completely useful.
-+There's not much that that can be done about this, however.
-+.TP 0.2i
-+\(bu
-+Flood pinging is not recommended in general, and flood pinging the
-+broadcast address should only be done under very controlled conditions.
-+.SH "SEE ALSO"
-+.PP
-+\fBnetstat\fR(1),
-+\fBifconfig\fR(8).
-+.SH "HISTORY"
-+.PP
-+The \fBping\fR command appeared in 4.3BSD.
-+.PP
-+The version described here is its descendant specific to Linux.
-+.SH "SECURITY"
-+.PP
-+\fBping\fR requires CAP_NET_RAWIO capability
-+to be executed. It may be used as set-uid root.
-+.SH "AVAILABILITY"
-+.PP
-+\fBping\fR is part of \fIiputils\fR package
-+and the latest versions are  available in source form at
-+http://www.skbuff.net/iputils/iputils-current.tar.bz2.
-diff -Naur doc/rdisc.8 doc/rdisc.8
---- doc/rdisc.8	1969-12-31 16:00:00.000000000 -0800
-+++ doc/rdisc.8	2009-02-18 23:20:33.249183964 -0800
-@@ -0,0 +1,110 @@
-+.\" This manpage has been automatically generated by docbook2man 
-+.\" from a DocBook document.  This tool can be found at:
-+.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
-+.\" Please send any bug reports, improvements, comments, patches, 
-+.\" etc. to Steve Cheng <steve@ggi-project.org>.
-+.TH "RDISC" "8" "18 February 2009" "iputils-071127" "System Manager's Manual: iputils"
-+.SH NAME
-+rdisc \- network router discovery daemon
-+.SH SYNOPSIS
-+
-+\fBrdisc\fR [\fB-abdfstvV\fR] [\fB\fIsend_address\fB\fR] [\fB\fIreceive_address\fB\fR]
-+
-+.SH "DESCRIPTION"
-+.PP
-+\fBrdisc\fR implements client side of the ICMP router discover protocol.
-+\fBrdisc\fR is invoked at boot time to populate the network
-+routing tables with default routes. 
-+.PP
-+\fBrdisc\fR listens on the ALL_HOSTS (224.0.0.1) multicast address
-+(or \fIreceive_address\fR provided it is given) 
-+for ROUTER_ADVERTISE messages from routers. The received
-+messages are handled by first ignoring those listed router addresses
-+with which the host does not share a network. Among the remaining addresses
-+the ones with the highest preference are selected as default routers
-+and a default route is entered in the kernel routing table
-+for each one of them.
-+.PP
-+Optionally, \fBrdisc\fR can avoid waiting for routers to announce 
-+themselves by sending out a few ROUTER_SOLICITATION messages
-+to the ALL_ROUTERS (224.0.0.2) multicast address 
-+(or \fIsend_address\fR provided it is given) 
-+when it is started.
-+.PP
-+A timer is associated with each router address and the address will
-+no longer be considered for inclusion in the the routing tables if the 
-+timer expires before a new 
-+\fBadvertise\fR message is received from the router.
-+The address will also be excluded from consideration if the host receives an 
-+\fBadvertise\fR
-+message with the preference being maximally negative.
-+.PP
-+Server side of router discovery protocol is supported by Cisco IOS
-+and by any more or less complete UNIX routing daemon, f.e \fBgated\fR.
-+.SH "OPTIONS"
-+.TP
-+\fB-a\fR
-+Accept all routers independently of the preference they have in their 
-+\fBadvertise\fR messages.
-+Normally \fBrdisc\fR only accepts (and enters in the kernel routing
-+tables) the router or routers with the highest preference.
-+.TP
-+\fB-b\fR
-+Opposite to \fB-a\fR, i.e. install only router with the best
-+preference value. It is default behaviour.
-+.TP
-+\fB-d\fR
-+Send debugging messages to syslog.
-+.TP
-+\fB-f\fR
-+Run \fBrdisc\fR forever even if no routers are found.
-+Normally \fBrdisc\fR gives up if it has not received any 
-+\fBadvertise\fR message after after soliciting three times,
-+in which case it exits with a non-zero exit code.
-+If \fB-f\fR is not specified in the first form then 
-+\fB-s\fR must be specified.
-+.TP
-+\fB-s\fR
-+Send three \fBsolicitation\fR messages initially to quickly discover
-+the routers when the system is booted.
-+When \fB-s\fR is specified \fBrdisc\fR
-+exits with a non-zero exit code if it can not find any routers.
-+This can be overridden with the \fB-f\fR option.
-+.TP
-+\fB-t\fR
-+Test mode. Do not go to background.
-+.TP
-+\fB-v\fR
-+Be verbose i.e. send lots of debugging messages to syslog.
-+.TP
-+\fB-V\fR
-+Print version and exit.
-+.SH "HISTORY"
-+.PP
-+This program was developed by Sun Microsystems (see copyright
-+notice in source file). It was ported to Linux by
-+Alexey Kuznetsov
-+<kuznet@ms2.inr.ac.ru>.
-+It is now maintained by
-+YOSHIFUJI Hideaki
-+<yoshfuji@skbuff.net>.
-+.SH "SEE ALSO"
-+.PP
-+\fBicmp\fR(7),
-+\fBinet\fR(7),
-+\fBping\fR(8).
-+.SH "REFERENCES"
-+.PP
-+Deering, S.E.,ed "ICMP Router Discovery Messages",
-+RFC1256, Network Information Center, SRI International,
-+Menlo Park, Calif., September 1991.
-+.SH "SECURITY"
-+.PP
-+\fBrdisc\fR requires CAP_NET_RAWIO to listen
-+and send ICMP messages and capability CAP_NET_ADMIN
-+to update routing tables. 
-+.SH "AVAILABILITY"
-+.PP
-+\fBrdisc\fR is part of \fIiputils\fR package
-+and the latest versions are  available in source form at
-+http://www.skbuff.net/iputils/iputils-current.tar.bz2.
-diff -Naur doc/tracepath.8 doc/tracepath.8
---- doc/tracepath.8	1969-12-31 16:00:00.000000000 -0800
-+++ doc/tracepath.8	2009-02-18 23:21:37.765316105 -0800
-@@ -0,0 +1,94 @@
-+.\" This manpage has been automatically generated by docbook2man 
-+.\" from a DocBook document.  This tool can be found at:
-+.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
-+.\" Please send any bug reports, improvements, comments, patches, 
-+.\" etc. to Steve Cheng <steve@ggi-project.org>.
-+.TH "TRACEPATH" "8" "18 February 2009" "iputils-071127" "System Manager's Manual: iputils"
-+.SH NAME
-+tracepath, tracepath6 \- traces path to a network host discovering MTU along this path
-+.SH SYNOPSIS
-+
-+\fBtracepath\fR [\fB-n\fR] [\fB-l \fIpktlen\fB\fR] \fB\fIdestination\fB\fR [\fB\fIport\fB\fR]
-+
-+.SH "DESCRIPTION"
-+.PP
-+It traces path to \fIdestination\fR discovering MTU along this path.
-+It uses UDP port \fIport\fR or some random port.
-+It is similar to \fBtraceroute\fR, only does not not require superuser
-+privileges and has no fancy options.
-+.PP
-+\fBtracepath6\fR is good replacement for \fBtraceroute6\fR
-+and classic example of application of Linux error queues.
-+The situation with \fBtracepath\fR is worse, because commercial
-+IP routers do not return enough information in icmp error messages.
-+Probably, it will change, when they will be updated.
-+For now it uses Van Jacobson's trick, sweeping a range
-+of UDP ports to maintain trace history.
-+.SH "OPTIONS"
-+.TP
-+\fB-n\fR
-+Do not look up host names.  Only print IP addresses numerically.
-+.TP
-+\fB-l\fR
-+Sets the initial packet length to \fIpktlen\fR instead of
-+65536 for \fBtracepath\fR or 128000 for \fBtracepath6\fR.
-+.SH "OUTPUT"
-+.PP
-+
-+.nf
-+root@mops:~ # tracepath6 3ffe:2400:0:109::2
-+ 1?: [LOCALHOST]                              pmtu 1500
-+ 1:  dust.inr.ac.ru                   0.411ms
-+ 2:  dust.inr.ac.ru        asymm  1   0.390ms pmtu 1480
-+ 2:  3ffe:2400:0:109::2               463.514ms reached
-+     Resume: pmtu 1480 hops 2 back 2
-+.fi
-+.PP
-+The first column shows TTL of the probe, followed by colon.
-+Usually value of TTL is obtained from reply from network,
-+but sometimes reply does not contain necessary information and
-+we have to guess it. In this case the number is followed by ?.
-+.PP
-+The second column shows the network hop, which replied to the probe.
-+It is either address of router or word [LOCALHOST], if
-+the probe was not sent to the network.
-+.PP
-+The rest of line shows miscellaneous information about path to
-+the correspinding hetwork hop. As rule it contains value of RTT.
-+Additionally, it can show Path MTU, when it changes.
-+If the path is asymmetric
-+or the probe finishes before it reach prescribed hop, difference
-+between number of hops in forward and backward direction is shown
-+folloing keyword async. This information is not reliable.
-+F.e. the third line shows asymmetry of 1, it is because the first probe
-+with TTL of 2 was rejected at the first hop due to Path MTU Discovery.
-+.PP
-+The last line summarizes information about all the path to the destination,
-+it shows detected Path MTU, amount of hops to the destination and our
-+guess about amount of hops from the destination to us, which can be
-+different when the path is asymmetric.
-+.SH "SEE ALSO"
-+.PP
-+\fBtraceroute\fR(8),
-+\fBtraceroute6\fR(8),
-+\fBping\fR(8).
-+.SH "AUTHOR"
-+.PP
-+\fBtracepath\fR was written by
-+Alexey Kuznetsov
-+<kuznet@ms2.inr.ac.ru>.
-+.SH "SECURITY"
-+.PP
-+No security issues.
-+.PP
-+This lapidary deserves to be elaborated.
-+\fBtracepath\fR is not a privileged program, unlike
-+\fBtraceroute\fR, \fBping\fR and other beasts of this kind.
-+\fBtracepath\fR may be executed by everyone who has some access
-+to network, enough to send UDP datagrams to investigated destination
-+using given port.
-+.SH "AVAILABILITY"
-+.PP
-+\fBtracepath\fR is part of \fIiputils\fR package
-+and the latest versions are  available in source form at
-+http://www.skbuff.net/iputils/iputils-current.tar.bz2.
-diff -Naur doc/traceroute6.8 doc/traceroute6.8
---- doc/traceroute6.8	1969-12-31 16:00:00.000000000 -0800
-+++ doc/traceroute6.8	2009-02-18 23:20:33.249183964 -0800
-@@ -0,0 +1,42 @@
-+.\" This manpage has been automatically generated by docbook2man 
-+.\" from a DocBook document.  This tool can be found at:
-+.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
-+.\" Please send any bug reports, improvements, comments, patches, 
-+.\" etc. to Steve Cheng <steve@ggi-project.org>.
-+.TH "TRACEROUTE6" "8" "18 February 2009" "iputils-071127" "System Manager's Manual: iputils"
-+.SH NAME
-+traceroute6 \- traces path to a network host
-+.SH SYNOPSIS
-+
-+\fBtraceroute6\fR [\fB-dnrvV\fR] [\fB-i \fIinterface\fB\fR] [\fB-m \fImax_ttl\fB\fR] [\fB-p \fIport\fB\fR] [\fB-q \fImax_probes\fB\fR] [\fB-s \fIsource\fB\fR] [\fB-w \fIwait time\fB\fR] \fB\fIdestination\fB\fR [\fB\fIsize\fB\fR]
-+
-+.SH "DESCRIPTION"
-+.PP
-+Description can be found in 
-+\fBtraceroute\fR(8),
-+all the references to IP replaced to IPv6. It is needless to copy
-+the description from there.
-+.SH "SEE ALSO"
-+.PP
-+\fBtraceroute\fR(8),
-+\fBtracepath\fR(8),
-+\fBping\fR(8).
-+.SH "HISTORY"
-+.PP
-+This program has long history. Author of \fBtraceroute\fR
-+is Van Jacobson and it first appeared in 1988. This clone is
-+based on a port of \fBtraceroute\fR to IPv6 published
-+in NRL IPv6 distribution in 1996. In turn, it was ported
-+to Linux by Pedro Roque. After this it was kept in sync by    
-+Alexey Kuznetsov
-+<kuznet@ms2.inr.ac.ru>. And eventually entered
-+\fBiputils\fR package.
-+.SH "SECURITY"
-+.PP
-+\fBtracepath6\fR requires CAP_NET_RAWIO capability
-+to be executed. It is safe to be used as set-uid root.
-+.SH "AVAILABILITY"
-+.PP
-+\fBtraceroute6\fR is part of \fIiputils\fR package
-+and the latest versions are  available in source form at
-+http://www.skbuff.net/iputils/iputils-current.tar.bz2.
-
Index: tches/man-1.6f-i18n-1.patch
===================================================================
--- patches/man-1.6f-i18n-1.patch	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,334 +1,0 @@
-Submitted By: Jim Gifford <jim at cross-lfs dot org>
-Date: 2009-01-08
-Initial Package Version: 1.6f
-Upstream Status: Unkown
-Origin: Mandriva
-Description: i18n Updates
-
-diff -Naur man-1.6f.orig/catopen/catopen.c man-1.6f/catopen/catopen.c
---- man-1.6f.orig/catopen/catopen.c	2005-08-20 16:26:06.000000000 -0700
-+++ man-1.6f/catopen/catopen.c	2009-01-08 22:01:17.000000000 -0800
-@@ -9,22 +9,63 @@
- extern char *index (const char *, int);         /* not always in <string.h> */
- extern char *my_malloc(int);	/* in util.c */
- 
-+/* if the program has sgid/suid privileges then getenv doesn't return
-+ * NLSPATH; so we set here a good default value.
-+ */
- #ifndef DEFAULT_NLSPATH
- # if __GLIBC__ >= 2
--#  define DEFAULT_NLSPATH "/usr/share/locale/%L/%N"
-+#  define DEFAULT_NLSPATH "/usr/share/locale/%L/%N:/usr/share/locale/%l_%t/%N:/usr/share/locale/%l/%N"
- # else
- #  define DEFAULT_NLSPATH "/usr/lib/locale/%N/%L"
- # endif
- #endif
- 
--static nl_catd my_catopenpath(char *name, char *path);
-+static nl_catd my_catopenpath(char *name, char *path, char *lang);
- 
- static				/* this source included in gripes.c */
- nl_catd
- my_catopen(char *name, int oflag) {
--  nl_catd fd;
-+  nl_catd fd = (nl_catd) -1;
-+
-+  /* using first the my_catopenpath, which looks with LANGUAGE
-+   * and only if it fails ressort to catopen, it gives better i18n
-+   */
-+  {
-+    char *nlspath, *lang, *s;
- 
--  fd = catopen(name, oflag);
-+    /*
-+     * "If NLSPATH does not exist in the environment, or if a
-+     * message catalog cannot be opened in any of the paths specified
-+     * by NLSPATH, then an implementation defined default path is used"
-+     */
-+    nlspath = getenv("NLSPATH");
-+    if (!nlspath)
-+      nlspath = DEFAULT_NLSPATH;
-+ 
-+    lang = getenv("LANGUAGE");
-+    if (!lang)
-+      lang = getenv("LC_ALL");
-+    if (!lang)
-+      lang = getenv("LC_MESSAGES");
-+    if (!lang)
-+      lang = getenv("LANG");
-+    if (!lang)
-+      lang = "";
-+ 
-+    while(*lang && (fd == (nl_catd) -1)) {
-+      s = index(lang, ':');
-+      if (s) *s = 0;
-+        fd = my_catopenpath(name, nlspath, lang);
-+      if (s) lang=s+1;
-+      else lang = "";
-+    }
-+    if (fd == (nl_catd) -1)
-+      fd = my_catopenpath(name, nlspath, "en");
-+  }
-+
-+  /* still not found, use the system catopen */
-+  if (fd == (nl_catd) -1)
-+    fd = catopen(name, oflag);
- 
-   if (fd == (nl_catd) -1 && oflag) {
-     oflag = 0;
-@@ -32,8 +73,6 @@
-   }
- 
-   if (fd == (nl_catd) -1) {
--    char *nlspath;
--
-     /* The libc catopen fails - let us see if we can do better */
-     /* The quotes below are from X/Open, XPG 1987, Vol. 3. */
- 
-@@ -58,17 +97,6 @@
- #endif
-     }
- 
--    /*
--     * "If NLSPATH does not exist in the environment, or if a
--     * message catalog cannot be opened in any of the paths specified
--     * by NLSPATH, then an implementation defined default path is used"
--     */
--
--    nlspath = getenv("NLSPATH");
--    if (nlspath)
--      fd = my_catopenpath(name, nlspath);
--    if (fd == (nl_catd) -1)
--      fd = my_catopenpath(name, DEFAULT_NLSPATH);
-   }
-   return fd;
- }
-@@ -90,15 +118,13 @@
-  *
-  */
- static nl_catd
--my_catopenpath(char *name, char *nlspath) {
--  int fd;
-+my_catopenpath(char *name, char *nlspath, char *lang) {
-   nl_catd cfd = (nl_catd) -1;
--  char *path0, *path, *s, *file, *lang, *lang_l, *lang_t, *lang_c;
-+  char *path0, *path, *s, *file, *lang_l, *lang_t, *lang_c;
-   int langsz, namesz, sz, lang_l_sz, lang_t_sz, lang_c_sz;
- 
-   namesz = strlen(name);
- 
--  lang = getenv("LANG");
-   if (!lang)
-     lang = "";
-   langsz = strlen(lang);
-@@ -194,14 +220,9 @@
-       path = s+1;
-     } else
-       path = 0;
--    fd = open(file, O_RDONLY);
--    if (fd != -1) {
--      /* we found the right catalog - but we don't know the
--	 type of nl_catd, so close it again and ask libc */
--      close(fd);
--      cfd = catopen(file, 0);
--      break;
--    }
-+	cfd = catopen(file, 0);
-+	if (cfd != (nl_catd) -1)
-+			break;
-   }
- 
-   free(path0);
-diff -Naur man-1.6f.orig/configure man-1.6f/configure
---- man-1.6f.orig/configure	2007-08-20 21:15:21.000000000 -0700
-+++ man-1.6f/configure	2009-01-08 22:29:17.000000000 -0800
-@@ -412,9 +412,9 @@
-       fi
-     done
-   done
--  troff=""
--  nroff=""
--  jnroff=""
-+  troff=/usr/bin/troff
-+  nroff=/usr/bin/nroff
-+  jnroff=/usr/bin/nroff
-   eqn=""
-   neqn=""
-   jneqn=""
-@@ -472,29 +472,32 @@
-   done
- # -Tlatin1 is bad when utf8 is used, but needed for groff, not for nroff
- # Hmm - also needed for nroff, to prevent double conversion on uxterm
-+  Fgroff=/usr/bin/groff
-+  Fnroff=/usr/bin/nroff
-+  Fjnroff=/usr/bin/nroff
-   if test $Fgroff = "missing"
-   then
-     if test $Fnroff = "missing"
-     then
--      nroff="nroff -Tlatin1 -mandoc"
-+      nroff="nroff -Tutf8 -mandoc"
-     else
--      nroff="$Fnroff -Tlatin1 -mandoc"
-+      nroff="$Fnroff -Tutf8 -mandoc"
-     fi
-     troff="troff -mandoc"
-     echo "Warning: could not find groff"
-   else
-     if test $Fnroff = "missing"
-     then
--      nroff="$Fgroff -Tlatin1 -mandoc"
-+      nroff="$Fgroff -Tutf8 -mandoc"
-     else
--      nroff="$Fnroff -Tlatin1 -mandoc"
-+      nroff="$Fnroff -Tutf8 -mandoc"
-     fi
-     troff="$Fgroff -Tps -mandoc"
--    jnroff="$Fgroff -Tnippon -mandocj"
-+    jnroff="$Fjnroff -Tutf8 -mandocj"
-   fi
-   eqn="$Fgeqn -Tps"
--  neqn="$Fgeqn -Tlatin1"
--  jneqn="$Fgeqn -Tnippon"
-+  neqn="$Fgeqn -Tutf8"
-+  jneqn="$Fgeqn -Tutf8"
-   tbl="$Fgtbl"
-   col="$Fcol"
-   vgrind="$Fvgrind"
-@@ -960,7 +963,7 @@
- 
- # What sections do we anticipate?
- 
--tmpsections="1 1p 8 2 3 3p 4 5 6 7 9 0p tcl n l p o"
-+tmpsections="1 1p 8 2 3 3p 3pm 4 5 6 7 9 0p tcl n l p o"
- 
- if [ x$default = x ]; then
-   echo ""
-diff -Naur man-1.6f.orig/msgs/inst.sh man-1.6f/msgs/inst.sh
---- man-1.6f.orig/msgs/inst.sh	2005-08-20 16:26:06.000000000 -0700
-+++ man-1.6f/msgs/inst.sh	2009-01-08 22:01:46.000000000 -0800
-@@ -27,8 +27,7 @@
- for j in $M; do
-   if [ -f $j ]; then
-     i=`echo $j | sed -e 's/mess.//; s/.cat//'`
--    dest=`echo $locdir | sed -e "s/%N/man/; s/%L/$i/"`
--    dest=${PREFIX}$dest
-+    dest=${PREFIX}/`echo $locdir | sed -e "s/%N/man/; s/%L/$i/"`
-     echo "mkdir -p `dirname $dest`"
-     mkdir -p `dirname $dest`;
-     echo "install -c -m 644 $j $dest"
-diff -Naur man-1.6f.orig/src/apropos.sh man-1.6f/src/apropos.sh
---- man-1.6f.orig/src/apropos.sh	2005-08-20 16:26:06.000000000 -0700
-+++ man-1.6f/src/apropos.sh	2009-01-08 22:02:47.000000000 -0800
-@@ -60,16 +60,56 @@
-     esac
- done
- 
-+# list of languages to look for
-+LANG_LIST=`echo $LANGUAGE:$LC_ALL:$LC_MESSAGES:$LANG | tr ':' ' '`
-+DIR_LIST=""
-+for d in /var/cache/man $manpath /usr/lib
-+do
-+    for l in $LANG_LIST
-+    do
-+        if [ -d $d/$l ]
-+        then
-+            # check that the path is not already in the list
-+            if ! echo "$DIR_LIST" | grep " $d/$l\b" > /dev/null
-+            then
-+                DIR_LIST="$DIR_LIST $d/$l"
-+            fi
-+        fi
-+    done
-+    DIR_LIST="$DIR_LIST $d"
-+    # check that the path is not already in the list
-+    if ! echo "$DIR_LIST" | grep " $d\b" > /dev/null
-+    then
-+        DIR_LIST="$DIR_LIST $d/$l"
-+    fi
-+done
-+
- while [ "$1" != "" ]
- do
-     found=0
--    for d in /var/cache/man $manpath /usr/lib
-+    # in order not to display lines in more than one language for
-+    # a same man page; we check that a given man page name
-+    # hasn't already been displayed
-+    BAZ=""
-+    for d in $DIR_LIST
-     do
-         if [ -f $d/whatis ]
-         then
--            if grep -"$grepopt1" "$grepopt2""$1" $d/whatis
-+            if FOO=`grep -"$grepopt1" "$grepopt2""$1" $d/whatis`
-             then
--                found=1
-+                # the LC_ALL=C is needed in case the text is
-+                # in a different encoding than the locale
-+                BAR=`echo -e "$FOO" | LC_ALL=C sed 's/ - .*$//' | tr ' []' '_' | sort -u`
-+                for i in $BAR
-+                do
-+                    if ! echo "$BAZ" | grep "$i" > /dev/null
-+                    then
-+                        BAZ="$BAZ $i"
-+                        i="^`echo $i | sed 's:_\+:\\\(\[_ \]\\\|\\\[\\\|\\\]\\\)\\\+:g'`"
-+                        echo -e "$FOO" | grep "$i"
-+                        found=1
-+                    fi
-+                done
- # Some people are satisfied with a single occurrence
- # But it is better to give all
- #               break
-diff -Naur man-1.6f.orig/src/makewhatis.sh man-1.6f/src/makewhatis.sh
---- man-1.6f.orig/src/makewhatis.sh	2007-09-17 11:35:14.000000000 -0700
-+++ man-1.6f/src/makewhatis.sh	2009-01-08 22:02:47.000000000 -0800
-@@ -55,6 +55,9 @@
- dc=
- for d in /usr/man/preformat /usr/man /usr/share/man/preformat /usr/share/man
- do
-+    if [ -n "$LANG" -a -d "$d/$LANG" ]; then
-+	if [ x$dc = x ]; then dm="$d/$LANG"; else dm=$dc:"$d/$LANG"; fi
-+    fi
-     if [ -d $d ]; then
- 	if [ x$dc = x ]; then dc=$d; else dc=$dc:$d; fi
-     fi
-@@ -227,7 +230,7 @@
- 	    section=$i
- 	    curdir=$mandir/${pages}$i
- 	    export section verbose curdir
--	    find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | $AWK '
-+	    find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | LC_ALL=C $AWK -v MAN_NAME="$MAN_NAME" -v MAN_DESCRIPTION="$MAN_DESCRIPTION" '
- 
- 	    function readline() {
-               if (use_zcat || use_bzcat || use_lzcat) {
-@@ -315,6 +318,7 @@
- 		  if ($1 ~ /^\.[Ss][HhYS]/ ||
- 		    (pages == "cat" &&
- 		    ($1 ~ /^S[yYeE]/ || $1 ~ /^DESCRIPTION/ ||
-+		     $1 ~ MAN_DESCRIPTION ||
- 		     $1 ~ /^COMMAND/ || $1 ~ /^OVERVIEW/ ||
- 		     $1 ~ /^STRUCTURES/ || $1 ~ /^INTRODUCTION/ ||
- 		     $0 ~ /^[^ ]/))) {
-diff -Naur man-1.6f.orig/src/manpath.c man-1.6f/src/manpath.c
---- man-1.6f.orig/src/manpath.c	2006-08-03 14:18:33.000000000 -0700
-+++ man-1.6f/src/manpath.c	2009-01-08 22:01:17.000000000 -0800
-@@ -282,13 +282,14 @@
- 		/* We cannot use "lang = setlocale(LC_MESSAGES, NULL)" or so:
- 		   the return value of setlocale is an opaque string. */
- 		/* POSIX prescribes the order: LC_ALL, LC_MESSAGES, LANG */
--		if((lang = getenv("LC_ALL")) != NULL)
-+	        /* LANGUAGE is GNU/Linux and overrules all */
-+		if((lang = getenv("LANGUAGE")) != NULL)
- 			split2(dir, lang, add_to_mandirlist_x, perrs);
--		if((lang = getenv("LC_MESSAGES")) != NULL)
-+		else if((lang = getenv("LC_ALL")) != NULL)
- 			split2(dir, lang, add_to_mandirlist_x, perrs);
--		if((lang = getenv("LANG")) != NULL)
-+		else if((lang = getenv("LC_MESSAGES")) != NULL)
- 			split2(dir, lang, add_to_mandirlist_x, perrs);
--		if((lang = getenv("LANGUAGE")) != NULL)
-+		else if((lang = getenv("LANG")) != NULL)
- 			split2(dir, lang, add_to_mandirlist_x, perrs);
- 		add_to_mandirlist_x(dir, 0, perrs);
- 	}
Index: tches/man-1.6f-new_compressors-1.patch
===================================================================
--- patches/man-1.6f-new_compressors-1.patch	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,100 +1,0 @@
-Submitted By: Jim Gifford <jim at cross-lfs dot org>
-Date: 2009-02-21
-Initial Package Version: 1.6f
-Upstream Status: Unknown
-Origin: Jim Gifford
-Description: For using lzip compression
-             For using xz compression
-
-diff -Naur man-1.6f.orig/configure man-1.6f/configure
---- man-1.6f.orig/configure	2007-08-20 21:15:21.000000000 -0700
-+++ man-1.6f/configure	2009-02-22 19:30:14.602512641 -0800
-@@ -1015,7 +1015,7 @@
-   then
-     DO_COMPRESSION=true
-     compress=
--    for i in lzma bzip2 gzip bzip tzip pack compress freeze yabba
-+    for i in xz lzip lzma bzip2 gzip bzip tzip pack compress freeze yabba
-     do
-       eval F$i=missing
-       for j in $DEFPATH
-@@ -1068,6 +1068,8 @@
-     fi
- 
-     case $compress in
-+      *xz*) ext=".xz" ;;
-+      *lzip*) ext=".lz" ;;
-       *lzma*) ext=".lzma" ;;
-       *bzip2*) ext=".bz2" ;;
-       *gzip*) ext=".gz" ;;
-@@ -1111,7 +1113,7 @@
- fi
- 
- # unconditionally handle uncompression
--UNCOMPRESSORS="unlzma gunzip bzip2 pcat zcat fcat unyabba"
-+UNCOMPRESSORS="unxz lzip unlzma gunzip bzip2 pcat zcat fcat unyabba"
- for i in $UNCOMPRESSORS
- do
-   eval F$i=missing
-@@ -1132,10 +1134,18 @@
- if [ $Fbzip2 != missing ]; then
-   bzip2="$Fbzip2 -c -d"
- fi
-+unxz=missing
-+if [ $Funxz != missing ]; then
-+  unxz="$Funxz -c -d"
-+fi
- unlzma=missing
- if [ $Funlzma != missing ]; then
-   unlzma="$Funlzma -c -d"
- fi
-+lzip=missing
-+if [ $Flzip != missing ]; then
-+  lzip="$Flzip -c -d"
-+fi
- pcat="$Fpcat"
- zcat="$Fzcat"
- fcat="$Ffcat"
-@@ -1164,6 +1174,12 @@
- 	bzip2)
- 	  echo "Command to use for .bz2 files (standard bzip2)"
- 	  echo $n "[`eval echo \\$$filter`] $c" ;;
-+	xz)
-+	  echo "Command to use for .xz files (standard xz)"
-+	  echo $n "[`eval echo \\$$filter`] $c" ;;
-+	lzip)
-+	  echo "Command to use for .lz files (standard lzip)"
-+	  echo $n "[`eval echo \\$$filter`] $c" ;;
- 	lzma)
- 	  echo "Command to use for .lzma files (standard lzma)"
- 	  echo $n "[`eval echo \\$$filter`] $c" ;;
-@@ -1228,6 +1244,8 @@
- case $compress_ext in
-   .gz) decompress=$gunzip ;;
-   .bz2) decompress=$bzip2 ;;
-+  .xz) decompress=$unxz ;;
-+  .lz) decompress=$lzip ;;
-   .lzma) decompress=$unlzma ;;
-   .z) decompress=$pcat ;;
-   .Z) decompress=$zcat ;;
-@@ -1321,6 +1339,8 @@
- s,@zcat@,$zcat,
- s,@gunzip@,$gunzip,
- s,@bzip2@,$bzip2,
-+s,@lzip@,$lzip,
-+s,@unxz@,$unxz,
- s,@unlzma@,$unlzma,
- s,@unyabba@,$unyabba,
- s,@compress@,$compress,
-diff -Naur man-1.6f.orig/src/man.conf.in man-1.6f/src/man.conf.in
---- man-1.6f.orig/src/man.conf.in	2007-08-20 21:15:21.000000000 -0700
-+++ man-1.6f/src/man.conf.in	2009-02-22 19:30:38.916070400 -0800
-@@ -132,6 +132,8 @@
- #
- .gz		@gunzip@
- .bz2		@bzip2@
-+.xz		@unxz@
-+.lz		@lzip@
- .lzma		@unlzma@
- .z		@pcat@
- .Z		@zcat@
Index: tches/mpfr-2.4.1-branch_update-2.patch
===================================================================
--- patches/mpfr-2.4.1-branch_update-2.patch	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,196 +1,0 @@
-Submitted By: Jim Gifford (jim at cross-lfs dot org)
-Date: 2009-04-15
-Initial Package Version: 2.4.1
-Origin: MPFR Website
-Upstream Status: Fixed
-Description: See http://www.mpfr.org Website Under Bugs
-
-diff -Naur mpfr-2.4.1.orig/mpfr-gmp.c mpfr-2.4.1/mpfr-gmp.c
---- mpfr-2.4.1.orig/mpfr-gmp.c	2009-02-20 01:43:17.000000000 -0800
-+++ mpfr-2.4.1/mpfr-gmp.c	2009-04-15 08:27:58.199729850 -0700
-@@ -301,7 +301,7 @@
-       if (linenum != -1)
-         fprintf (stderr, "%d: ", linenum);
-     }
--  fprintf (stderr, " assertion failed: %s\n", expr);
-+  fprintf (stderr, "MPFR assertion failed: %s\n", expr);
-   abort();
- }
- 
-diff -Naur mpfr-2.4.1.orig/mpfr.h mpfr-2.4.1/mpfr.h
---- mpfr-2.4.1.orig/mpfr.h	2009-02-25 08:16:08.000000000 -0800
-+++ mpfr-2.4.1/mpfr.h	2009-04-15 08:27:58.203729291 -0700
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 2
- #define MPFR_VERSION_MINOR 4
- #define MPFR_VERSION_PATCHLEVEL 1
--#define MPFR_VERSION_STRING "2.4.1"
-+#define MPFR_VERSION_STRING "2.4.1-p5"
- 
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naur mpfr-2.4.1.orig/PATCHES mpfr-2.4.1/PATCHES
---- mpfr-2.4.1.orig/PATCHES	2009-02-20 01:43:17.000000000 -0800
-+++ mpfr-2.4.1/PATCHES	2009-04-15 08:27:58.203729291 -0700
-@@ -0,0 +1,4 @@
-+zeta_ui-shift
-+vasprintf-mp_limb_t
-+assert
-+remainder-neg
-diff -Naur mpfr-2.4.1.orig/rem1.c mpfr-2.4.1/rem1.c
---- mpfr-2.4.1.orig/rem1.c	2009-02-20 01:43:17.000000000 -0800
-+++ mpfr-2.4.1/rem1.c	2009-04-15 08:27:58.199729850 -0700
-@@ -170,7 +170,12 @@
-     }
- 
-   if (mpz_cmp_ui (r, 0) == 0)
--    inex = mpfr_set_ui (rem, 0, GMP_RNDN);
-+    {
-+      inex = mpfr_set_ui (rem, 0, GMP_RNDN);
-+      /* take into account sign of x */
-+      if (signx < 0)
-+        mpfr_neg (rem, rem, GMP_RNDN);
-+    }
-   else
-     {
-       if (rnd_q == GMP_RNDN)
-@@ -190,6 +195,9 @@
-                 *quo += 1;
-             }
-         }
-+      /* take into account sign of x */
-+      if (signx < 0)
-+        mpz_neg (r, r);
-       inex = mpfr_set_z (rem, r, rnd);
-       /* if ex > ey, rem should be multiplied by 2^ey, else by 2^ex */
-       MPFR_EXP (rem) += (ex > ey) ? ey : ex;
-@@ -198,13 +206,6 @@
-   if (quo)
-     *quo *= sign;
- 
--  /* take into account sign of x */
--  if (signx < 0)
--    {
--      mpfr_neg (rem, rem, GMP_RNDN);
--      inex = -inex;
--    }
--
-   mpz_clear (mx);
-   mpz_clear (my);
-   mpz_clear (r);
-diff -Naur mpfr-2.4.1.orig/tests/tfprintf.c mpfr-2.4.1/tests/tfprintf.c
---- mpfr-2.4.1.orig/tests/tfprintf.c	2009-02-20 01:43:15.000000000 -0800
-+++ mpfr-2.4.1/tests/tfprintf.c	2009-04-15 08:27:58.199729850 -0700
-@@ -195,7 +195,7 @@
-   check_vfprintf (fout, "a. %Pu, b. %c, c. %Zi%Zn", prec, ch, mpz, &mpz);
-   check_length_with_cmp (6, mpz, 17, mpz_cmp_ui (mpz, 17), Zi);
-   check_vfprintf (fout, "%% a. %#.0RNg, b. %Qx%Rn, c. %p", mpfr, mpq, &mpfr,
--                  &i);
-+                  (void *) &i);
-   check_length_with_cmp (7, mpfr, 16, mpfr_cmp_ui (mpfr, 16), Rg);
- 
- #ifndef NPRINTF_T
-diff -Naur mpfr-2.4.1.orig/tests/tprintf.c mpfr-2.4.1/tests/tprintf.c
---- mpfr-2.4.1.orig/tests/tprintf.c	2009-02-20 01:43:15.000000000 -0800
-+++ mpfr-2.4.1/tests/tprintf.c	2009-04-15 08:27:58.203729291 -0700
-@@ -191,7 +191,8 @@
-   check_length (5, sz, 34, zu);
-   check_vprintf ("a. %Pu, b. %c, c. %RUG, d. %Zi%Zn", prec, ch, mpfr, mpz, &mpz);
-   check_length_with_cmp (6, mpz, 24, mpz_cmp_ui (mpz, 24), Zi);
--  check_vprintf ("%% a. %#.0RNg, b. %Qx%Rn c. %p", mpfr, mpq, &mpfr, &i);
-+  check_vprintf ("%% a. %#.0RNg, b. %Qx%Rn c. %p",
-+                 mpfr, mpq, &mpfr, (void *) &i);
-   check_length_with_cmp (7, mpfr, 16, mpfr_cmp_ui (mpfr, 16), Rg);
- 
- #ifndef NPRINTF_T
-diff -Naur mpfr-2.4.1.orig/tests/tremquo.c mpfr-2.4.1/tests/tremquo.c
---- mpfr-2.4.1.orig/tests/tremquo.c	2009-02-20 01:43:15.000000000 -0800
-+++ mpfr-2.4.1/tests/tremquo.c	2009-04-15 08:27:58.199729850 -0700
-@@ -25,6 +25,36 @@
- 
- #include "mpfr-test.h"
- 
-+static void
-+bug20090227 (void)
-+{
-+  mpfr_t x, y, r1, r2;
-+  int inex1, inex2;
-+
-+  mpfr_init2 (x, 118);
-+  mpfr_init2 (y, 181);
-+  mpfr_init2 (r1, 140);
-+  mpfr_init2 (r2, 140);
-+  mpfr_set_si (x, -1, GMP_RNDN);
-+  mpfr_set_str_binary (y, "1.100100100001111110110101010001000100001011010001100001000110100110001001100011001100010100010111000000011011100000111001101000100101001000000100100111000001000100010100110011111010");
-+  inex1 = mpfr_remainder (r1, x, y, GMP_RNDU);
-+  /* since the quotient is -1, r1 is the rounding of x+y */
-+  inex2 = mpfr_add (r2, x, y, GMP_RNDU);
-+  if (mpfr_cmp (r1, r2))
-+    {
-+      printf ("Error in mpfr_remainder (bug20090227)\n");
-+      printf ("Expected ");
-+      mpfr_dump (r2);
-+      printf ("Got      ");
-+      mpfr_dump (r1);
-+      exit (1);
-+    }
-+  mpfr_clear (x);
-+  mpfr_clear (y);
-+  mpfr_clear (r1);
-+  mpfr_clear (r2);
-+}
-+
- int
- main (int argc, char *argv[])
- {
-@@ -50,6 +80,8 @@
- 
-   tests_start_mpfr ();
- 
-+  bug20090227 ();
-+
-   mpfr_init (x);
-   mpfr_init (y);
-   mpfr_init (r);
-diff -Naur mpfr-2.4.1.orig/vasprintf.c mpfr-2.4.1/vasprintf.c
---- mpfr-2.4.1.orig/vasprintf.c	2009-02-20 01:43:17.000000000 -0800
-+++ mpfr-2.4.1/vasprintf.c	2009-04-15 08:27:58.203729291 -0700
-@@ -398,7 +398,7 @@
-         (void) va_arg ((ap), mpq_srcptr);       \
-         break;                                  \
-       case MP_LIMB_ARG:                         \
--        (void) va_arg ((ap), mp_ptr);           \
-+        (void) va_arg ((ap), mp_limb_t);        \
-         break;                                  \
-       case MP_LIMB_ARRAY_ARG:                   \
-         (void) va_arg ((ap), mp_ptr);           \
-diff -Naur mpfr-2.4.1.orig/VERSION mpfr-2.4.1/VERSION
---- mpfr-2.4.1.orig/VERSION	2009-02-25 08:16:08.000000000 -0800
-+++ mpfr-2.4.1/VERSION	2009-04-15 08:27:58.203729291 -0700
-@@ -1 +1 @@
--2.4.1
-+2.4.1-p5
-diff -Naur mpfr-2.4.1.orig/version.c mpfr-2.4.1/version.c
---- mpfr-2.4.1.orig/version.c	2009-02-25 08:16:08.000000000 -0800
-+++ mpfr-2.4.1/version.c	2009-04-15 08:27:58.203729291 -0700
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
--  return "2.4.1";
-+  return "2.4.1-p5";
- }
-diff -Naur mpfr-2.4.1.orig/zeta_ui.c mpfr-2.4.1/zeta_ui.c
---- mpfr-2.4.1.orig/zeta_ui.c	2009-02-20 01:43:17.000000000 -0800
-+++ mpfr-2.4.1/zeta_ui.c	2009-04-15 08:27:58.203729291 -0700
-@@ -177,7 +177,9 @@
-                   mpz_mul_ui (t, t, 2 * k - 1);
-                 }
-               mpz_div_2exp (t, t, 1);
--              if (n < 1UL << (BITS_PER_MP_LIMB / 2))
-+              /* Warning: the test below assumes that an unsigned long
-+                 has no padding bits. */
-+              if (n < 1UL << ((sizeof(unsigned long) * CHAR_BIT) / 2))
-                 /* (n - k + 1) * (n + k - 1) < n^2 */
-                 mpz_divexact_ui (t, t, (n - k + 1) * (n + k - 1));
-               else
Index: tches/ncurses-5.7-bash_fix-1.patch
===================================================================
--- patches/ncurses-5.7-bash_fix-1.patch	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,21 +1,0 @@
-Submitted by: Jim Gifford (patches at jg555 dot com)
-Date: 2007-02-15
-Initial Package Version: 5.6
-Upstream Status: Sent
-Origin: Jim Gifford
-Description: Fixes Ncurses to utilize a buggy version of Bash
-
-diff -Naur ncurses-5.6.orig/include/MKhashsize.sh ncurses-5.6/include/MKhashsize.sh
---- ncurses-5.6.orig/include/MKhashsize.sh	2006-10-21 17:45:39.000000000 -0700
-+++ ncurses-5.6/include/MKhashsize.sh	2007-02-15 07:16:46.000000000 -0800
-@@ -35,7 +35,7 @@
- echo " */"
- 
- CAPS="${1-Caps}"
--TABSIZE=`grep -v '^[ #]' $CAPS | grep -v "^$" | grep -v "^capalias"| grep -v "^infoalias" | wc -l`
-+TABSIZE=$(grep -v '^[ #]' $CAPS | grep -v "^$" | grep -v "^capalias"| grep -v "^infoalias" | wc -l)
- 
- echo ""
- echo "#define CAPTABSIZE	${TABSIZE}"
-
-
Index: tches/ncurses-5.7-branch_update-18.patch
===================================================================
--- patches/ncurses-5.7-branch_update-18.patch	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,61754 +1,0 @@
-Submitted By: Jim Gifford (jim at cross-lfs dot org)
-Date: 07-19-2009
-Initial Package Version: 5.7
-Origin: Upstream
-Upstream Status: Applied
-Description: This is a branch update for NCurses-5.7, and should be
-             rechecked periodically. This patch covers up to 5.7-20090718.
-
-diff -Naur ncurses-5.7.orig/aclocal.m4 ncurses-5.7/aclocal.m4
---- ncurses-5.7.orig/aclocal.m4	2008-10-25 15:15:32.000000000 -0700
-+++ ncurses-5.7/aclocal.m4	2009-07-19 15:04:17.000000000 -0700
-@@ -1,5 +1,5 @@
- dnl***************************************************************************
--dnl Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+dnl Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
- dnl                                                                          *
- dnl Permission is hereby granted, free of charge, to any person obtaining a  *
- dnl copy of this software and associated documentation files (the            *
-@@ -28,7 +28,7 @@
- dnl
- dnl Author: Thomas E. Dickey 1995-on
- dnl
--dnl $Id: aclocal.m4,v 1.470 2008/10/25 22:15:32 tom Exp $
-+dnl $Id: aclocal.m4,v 1.488 2009/07/17 09:14:49 tom Exp $
- dnl Macros used in NCURSES auto-configuration script.
- dnl
- dnl These macros are maintained separately from NCURSES.  The copyright on
-@@ -86,7 +86,7 @@
- AC_SUBST(ACPPFLAGS)
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_ADD_CFLAGS version: 7 updated: 2004/04/25 17:48:30
-+dnl CF_ADD_CFLAGS version: 8 updated: 2009/01/06 19:33:30
- dnl -------------
- dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS
- dnl The second parameter if given makes this macro verbose.
-@@ -156,7 +156,7 @@
- 
- if test -n "$cf_new_cppflags" ; then
- 	ifelse($2,,,[CF_VERBOSE(add to \$CPPFLAGS $cf_new_cppflags)])
--	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
-+	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
- fi
- 
- if test -n "$cf_new_extra_cppflags" ; then
-@@ -168,7 +168,7 @@
- 
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_ADD_INCDIR version: 9 updated: 2008/02/09 13:15:34
-+dnl CF_ADD_INCDIR version: 12 updated: 2009/01/18 10:00:47
- dnl -------------
- dnl Add an include-directory to $CPPFLAGS.  Don't add /usr/include, since it's
- dnl redundant.  We don't normally need to add -I/usr/local/include for gcc,
-@@ -195,7 +195,7 @@
- 		fi
- 
- 		if test "$cf_have_incdir" = no ; then
--          if test "$cf_add_incdir" = /usr/local/include ; then
-+		  if test "$cf_add_incdir" = /usr/local/include ; then
- 			if test "$GCC" = yes
- 			then
- 			  cf_save_CPPFLAGS=$CPPFLAGS
-@@ -211,11 +211,11 @@
- 
- 		if test "$cf_have_incdir" = no ; then
- 		  CF_VERBOSE(adding $cf_add_incdir to include-path)
--		  ifelse($2,,CPPFLAGS,$2)="-I$cf_add_incdir $ifelse($2,,CPPFLAGS,[$]$2)"
-+		  ifelse($2,,CPPFLAGS,$2)="$ifelse($2,,CPPFLAGS,$2) -I$cf_add_incdir"
- 
--          cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
--          test "$cf_top_incdir" = "$cf_add_incdir" && break
--          cf_add_incdir="$cf_top_incdir"
-+		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
-+		  test "$cf_top_incdir" = "$cf_add_incdir" && break
-+		  cf_add_incdir="$cf_top_incdir"
- 		else
- 		  break
- 		fi
-@@ -225,7 +225,7 @@
- fi
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_ADD_LIBDIR version: 6 updated: 2008/02/09 13:15:34
-+dnl CF_ADD_LIBDIR version: 8 updated: 2009/01/18 10:01:08
- dnl -------------
- dnl	Adds to the library-path
- dnl
-@@ -254,7 +254,7 @@
-       fi
-       if test "$cf_have_libdir" = no ; then
-         CF_VERBOSE(adding $cf_add_libdir to library-path)
--        ifelse($2,,LDFLAGS,$2)="-L$cf_add_libdir $ifelse($2,,LDFLAGS,[$]$2)"
-+        ifelse($2,,LDFLAGS,$2)="-L$cf_add_libdir $ifelse($2,,LDFLAGS,$2)"
-       fi
-     fi
-   done
-@@ -353,7 +353,41 @@
- fi
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_AWK_BIG_PRINTF version: 2 updated: 2008/10/04 17:16:18
-+dnl CF_AR_FLAGS version: 4 updated: 2009/02/07 13:42:23
-+dnl -----------
-+dnl Check for suitable "ar" (archiver) options for updating an archive.
-+AC_DEFUN([CF_AR_FLAGS],[
-+AC_REQUIRE([CF_PROG_AR])
-+
-+AC_CACHE_CHECK(for options to update archives, cf_cv_ar_flags,[
-+	cf_cv_ar_flags=unknown
-+	for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
-+	do
-+		rm -f conftest.$ac_cv_objext
-+		rm -f conftest.a
-+
-+		cat >conftest.$ac_ext <<EOF
-+#line __oline__ "configure"
-+int	testdata[[3]] = { 123, 456, 789 };
-+EOF
-+		if AC_TRY_EVAL(ac_compile) ; then
-+			$AR $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&AC_FD_CC 1>/dev/null
-+			if test -f conftest.a ; then
-+				cf_cv_ar_flags=$cf_ar_flags
-+				break
-+			fi
-+		else
-+			CF_VERBOSE(cannot compile test-program)
-+			break
-+		fi
-+	done
-+	rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
-+])
-+test -z "$ARFLAGS" && ARFLAGS=$cf_cv_ar_flags
-+AC_SUBST(ARFLAGS,$cf_cv_ar_flags)
-+])
-+dnl ---------------------------------------------------------------------------
-+dnl CF_AWK_BIG_PRINTF version: 3 updated: 2008/12/27 12:30:03
- dnl -----------------
- dnl Check if awk can handle big strings using printf.  Some older versions of
- dnl awk choke on large strings passed via "%s".
-@@ -362,19 +396,19 @@
- dnl $2 = variable to set with result
- AC_DEFUN([CF_AWK_BIG_PRINTF],
- [
--    case x$AWK in #(vi
--    x)
--        eval $2=no
--        ;;
--    *) #(vi
--        if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < $1) { xx = xx "x"; }; printf("%s\n", xx); }' \
--            | $AWK '{ printf "%d\n", length([$]0); }' | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ([$]0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then
--            eval $2=yes
--        else
--            eval $2=no
--        fi
--        ;;
--    esac
-+	case x$AWK in #(vi
-+	x)
-+		eval $2=no
-+		;;
-+	*) #(vi
-+		if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < $1) { xx = xx "x"; }; printf("%s\n", xx); }' \
-+			| $AWK '{ printf "%d\n", length([$]0); }' | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ([$]0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then
-+			eval $2=yes
-+		else
-+			eval $2=no
-+		fi
-+		;;
-+	esac
- ])dnl
- dnl ---------------------------------------------------------------------------
- dnl CF_BOOL_DECL version: 8 updated: 2004/01/30 15:51:18
-@@ -1019,7 +1053,7 @@
- CXXFLAGS="$cf_save_CXXFLAGS"
- ])
- dnl ---------------------------------------------------------------------------
--dnl CF_FIND_LINKAGE version: 12 updated: 2007/07/29 20:13:53
-+dnl CF_FIND_LINKAGE version: 13 updated: 2008/12/24 07:59:55
- dnl ---------------
- dnl Find a library (specifically the linkage used in the code fragment),
- dnl searching for it if it is not already in the library path.
-@@ -1052,6 +1086,7 @@
-     cf_cv_find_linkage_$3=yes,[
-     cf_cv_find_linkage_$3=no
- 
-+    CF_VERBOSE(find linkage for $3 library)
-     CF_MSG_LOG([Searching for headers in [FIND_LINKAGE]($3,$6)])
- 
-     cf_save_CPPFLAGS="$CPPFLAGS"
-@@ -1451,7 +1486,7 @@
- fi
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_GCC_WARNINGS version: 23 updated: 2008/07/26 17:54:02
-+dnl CF_GCC_WARNINGS version: 24 updated: 2009/02/01 15:21:00
- dnl ---------------
- dnl Check if the compiler supports useful warning options.  There's a few that
- dnl we don't use, simply because they're too noisy:
-@@ -1484,7 +1519,6 @@
- then
- # The "-wdXXX" options suppress warnings:
- # remark #1419: external declaration in primary source file
--# remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
- # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
- # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
- # remark #193: zero used for undefined preprocessing identifier
-@@ -1492,19 +1526,18 @@
- # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
- # remark #869: parameter "tw" was never referenced
- # remark #981: operands are evaluated in unspecified order
--# warning #269: invalid format string conversion
-+# warning #279: controlling expression is constant
- 
- 	AC_CHECKING([for $CC warning options])
- 	cf_save_CFLAGS="$CFLAGS"
- 	EXTRA_CFLAGS="-Wall"
- 	for cf_opt in \
- 		wd1419 \
--		wd1682 \
- 		wd1683 \
- 		wd1684 \
- 		wd193 \
--		wd279 \
- 		wd593 \
-+		wd279 \
- 		wd810 \
- 		wd869 \
- 		wd981
-@@ -1998,11 +2031,31 @@
- ])
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_HEADER_PATH version: 8 updated: 2002/11/10 14:46:59
-+dnl CF_HEADER_PATH version: 9 updated: 2008/12/07 19:38:31
- dnl --------------
--dnl Construct a search-list for a nonstandard header-file
-+dnl Construct a search-list of directories for a nonstandard header-file
-+dnl
-+dnl Parameters
-+dnl	$1 = the variable to return as result
-+dnl	$2 = the package name
- AC_DEFUN([CF_HEADER_PATH],
--[CF_SUBDIR_PATH($1,$2,include)
-+[
-+cf_header_path_list=""
-+if test -n "${CFLAGS}${CPPFLAGS}" ; then
-+	for cf_header_path in $CPPFLAGS $CFLAGS
-+	do
-+		case $cf_header_path in #(vi
-+		-I*)
-+			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
-+			CF_ADD_SUBDIR_PATH($1,$2,include,$cf_header_path,NONE)
-+			cf_header_path_list="$cf_header_path_list [$]$1"
-+			;;
-+		esac
-+	done
-+fi
-+
-+CF_SUBDIR_PATH($1,$2,include)
-+
- test "$includedir" != NONE && \
- test "$includedir" != "/usr/include" && \
- test -d "$includedir" && {
-@@ -2017,6 +2070,7 @@
- 	test -d $oldincludedir/$2 && $1="[$]$1 $oldincludedir/$2"
- }
- 
-+$1="$cf_header_path_list [$]$1"
- ])dnl
- dnl ---------------------------------------------------------------------------
- dnl CF_HELP_MESSAGE version: 3 updated: 1998/01/14 10:56:23
-@@ -2026,7 +2080,7 @@
- [AC_DIVERT_HELP([$1])dnl
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_INCLUDE_DIRS version: 5 updated: 2006/10/14 15:23:15
-+dnl CF_INCLUDE_DIRS version: 6 updated: 2009/01/06 19:37:40
- dnl ---------------
- dnl Construct the list of include-options according to whether we're building
- dnl in the source directory or using '--srcdir=DIR' option.  If we're building
-@@ -2034,9 +2088,9 @@
- dnl since that usually breaks gcc's shadow-includes.
- AC_DEFUN([CF_INCLUDE_DIRS],
- [
--CPPFLAGS="-I. -I../include $CPPFLAGS"
-+CPPFLAGS="$CPPFLAGS -I. -I../include"
- if test "$srcdir" != "."; then
--	CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
-+	CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
- fi
- if test "$GCC" != yes; then
- 	CPPFLAGS="$CPPFLAGS -I\${includedir}"
-@@ -2143,7 +2197,7 @@
- ])
- ])
- dnl ---------------------------------------------------------------------------
--dnl CF_LDFLAGS_STATIC version: 4 updated: 2008/10/18 17:58:20
-+dnl CF_LDFLAGS_STATIC version: 7 updated: 2009/04/04 18:31:04
- dnl -----------------
- dnl Check for compiler/linker flags used to temporarily force usage of static
- dnl libraries.  This depends on the compiler and platform.  Use this to help
-@@ -2153,7 +2207,7 @@
- 
- if test "$GCC" = yes ; then
- 	case $cf_cv_system_name in #(
--	OS/2*|os2*|aix[[45]]*) 	#( vi
-+	OS/2*|os2*|aix[[4]]*|solaris2.1[[0-9]]|darwin*) 	#( vi
- 		LDFLAGS_STATIC=
- 		LDFLAGS_SHARED=
- 		;;
-@@ -2164,7 +2218,7 @@
-     esac
- else
- 	case $cf_cv_system_name in #(
--	aix[[45]]*) 	#( from ld manpage
-+	aix[[456]]*) 	#( from ld manpage
- 		LDFLAGS_STATIC=-bstatic
- 		LDFLAGS_SHARED=-bdynamic
- 		;;
-@@ -2179,7 +2233,7 @@
- 		;;
- 	osf[[45]]*)	#( from ld manpage osf4.0d, osf5.1
- 		# alternative "-oldstyle_liblookup" (not in cc manpage)
--		LDFLAGS_STATIC=-noso 
-+		LDFLAGS_STATIC=-noso
- 		LDFLAGS_SHARED=-so_archive
- 		;;
- 	solaris2*)
-@@ -2193,11 +2247,33 @@
- AC_SUBST(LDFLAGS_SHARED)
- ])
- dnl ---------------------------------------------------------------------------
--dnl CF_LIBRARY_PATH version: 7 updated: 2002/11/10 14:46:59
-+dnl CF_LIBRARY_PATH version: 8 updated: 2008/12/07 19:38:31
- dnl ---------------
--dnl Construct a search-list for a nonstandard library-file
-+dnl Construct a search-list of directories for a nonstandard library-file
-+dnl
-+dnl Parameters
-+dnl	$1 = the variable to return as result
-+dnl	$2 = the package name
- AC_DEFUN([CF_LIBRARY_PATH],
--[CF_SUBDIR_PATH($1,$2,lib)])dnl
-+[
-+cf_library_path_list=""
-+if test -n "${LDFLAGS}${LIBS}" ; then
-+	for cf_library_path in $LDFLAGS $LIBS
-+	do
-+		case $cf_library_path in #(vi
-+		-L*)
-+			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
-+			CF_ADD_SUBDIR_PATH($1,$2,lib,$cf_library_path,NONE)
-+			cf_library_path_list="$cf_library_path_list [$]$1"
-+			;;
-+		esac
-+	done
-+fi
-+
-+CF_SUBDIR_PATH($1,$2,lib)
-+
-+$1="$cf_library_path_list [$]$1"
-+])dnl
- dnl ---------------------------------------------------------------------------
- dnl CF_LIB_PREFIX version: 8 updated: 2008/09/13 11:34:16
- dnl -------------
-@@ -2216,7 +2292,7 @@
- 	AC_SUBST(LIB_PREFIX)
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_LIB_RULES version: 53 updated: 2008/09/20 19:51:59
-+dnl CF_LIB_RULES version: 55 updated: 2008/12/13 16:17:38
- dnl ------------
- dnl Append definitions and rules for the given models to the subdirectory
- dnl Makefiles, and the recursion rule for the top-level Makefile.  If the
-@@ -2504,18 +2580,28 @@
- install.libs uninstall.libs \\
- install.data uninstall.data ::
- $MAKE_TERMINFO	cd misc && \${MAKE} \${CF_MFLAGS} \[$]@
-+CF_EOF
-+
-+if test "x$cf_with_manpages" = xyes; then
-+cat >> Makefile <<CF_EOF
- 
- install.man \\
- uninstall.man ::
- 	cd man && \${MAKE} \${CF_MFLAGS} \[$]@
-+CF_EOF
-+fi
-+
-+cat >> Makefile <<CF_EOF
- 
- distclean ::
- 	rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
- 	rm -f headers.sh headers.sed mk_shared_lib.sh
-+	rm -f edit_man.* man_alias.*
- 	rm -rf \${DIRS_TO_MAKE}
- CF_EOF
- 
- # Special case: tack's manpage lives in its own directory.
-+if test "x$cf_with_manpages" = xyes; then
- if test -d tack ; then
- if test -f $srcdir/$tack.h; then
- cat >> Makefile <<CF_EOF
-@@ -2526,6 +2612,7 @@
- CF_EOF
- fi
- fi
-+fi
- 
- dnl If we're installing into a subdirectory of /usr/include, etc., we should
- dnl prepend the subdirectory's name to the "#include" paths.  It won't hurt
-@@ -2679,7 +2766,7 @@
- ])
- ])
- dnl ---------------------------------------------------------------------------
--dnl CF_LIB_SUFFIX version: 15 updated: 2008/09/13 11:54:48
-+dnl CF_LIB_SUFFIX version: 16 updated: 2008/12/27 12:30:03
- dnl -------------
- dnl Compute the library file-suffix from the given model name
- dnl $1 = model name
-@@ -2689,40 +2776,44 @@
- AC_DEFUN([CF_LIB_SUFFIX],
- [
- 	AC_REQUIRE([CF_SUBST_NCURSES_VERSION])
--	case $1 in
--	libtool)
-+	case $1 in #(vi
-+	libtool) #(vi
- 		$2='.la'
- 		$3=[$]$2
- 		;;
--	normal)
-+	normal) #(vi
- 		$2='.a'
- 		$3=[$]$2
- 		;;
--	debug)
-+	debug) #(vi
- 		$2='_g.a'
- 		$3=[$]$2
- 		;;
--	profile)
-+	profile) #(vi
- 		$2='_p.a'
- 		$3=[$]$2
- 		;;
--	shared)
-+	shared) #(vi
- 		case $cf_cv_system_name in
--		cygwin*)
-+		aix[[56]]*) #(vi
-+			$2='.a'
-+			$3=[$]$2
-+			;;
-+		cygwin*) #(vi
- 			$2='.dll'
- 			$3='.dll.a'
- 			;;
--		darwin*)
-+		darwin*) #(vi
- 			$2='.dylib'
- 			$3=[$]$2
- 			;;
--		hpux*)
-+		hpux*) #(vi
- 			case $target in
--			ia64*)
-+			ia64*) #(vi
- 				$2='.so'
- 				$3=[$]$2
- 				;;
--			*)
-+			*) #(vi
- 				$2='.sl'
- 				$3=[$]$2
- 				;;
-@@ -2755,7 +2846,7 @@
- 	test -n "$LIB_SUFFIX" && $2="${LIB_SUFFIX}[$]{$2}"
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_LINK_DATAONLY version: 8 updated: 2006/12/16 12:33:30
-+dnl CF_LINK_DATAONLY version: 9 updated: 2009/01/01 20:21:38
- dnl ----------------
- dnl Some systems have a non-ANSI linker that doesn't pull in modules that have
- dnl only data (i.e., no functions), for example NeXT.  On those systems we'll
-@@ -2772,7 +2863,7 @@
- EOF
- 	if AC_TRY_EVAL(ac_compile) ; then
- 		mv conftest.o data.o && \
--		( $AR $AR_OPTS conftest.a data.o ) 2>&AC_FD_CC 1>/dev/null
-+		( $AR $ARFLAGS conftest.a data.o ) 2>&AC_FD_CC 1>/dev/null
- 	fi
- 	rm -f conftest.$ac_ext data.o
- 	cat >conftest.$ac_ext <<EOF
-@@ -2791,7 +2882,7 @@
- EOF
- 	if AC_TRY_EVAL(ac_compile); then
- 		mv conftest.o func.o && \
--		( $AR $AR_OPTS conftest.a func.o ) 2>&AC_FD_CC 1>/dev/null
-+		( $AR $ARFLAGS conftest.a func.o ) 2>&AC_FD_CC 1>/dev/null
- 	fi
- 	rm -f conftest.$ac_ext func.o
- 	( eval $RANLIB conftest.a ) 2>&AC_FD_CC >/dev/null
-@@ -2956,7 +3047,7 @@
- AC_SUBST(MAKE_LOWER_TAGS)
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_MANPAGE_FORMAT version: 7 updated: 2003/12/20 19:30:34
-+dnl CF_MANPAGE_FORMAT version: 8 updated: 2009/01/11 20:30:50
- dnl -----------------
- dnl Option to allow user to override automatic configuration of manpage format.
- dnl There are several special cases:
-@@ -2998,7 +3089,7 @@
-   cf_catonly=yes
-   cf_example=date
- 
--  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
-+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
-   for cf_dir in $MANPATH; do
-     test -z "$cf_dir" && cf_dir=/usr/man
-     for cf_name in $cf_dir/man*/$cf_example.[[01]]* $cf_dir/cat*/$cf_example.[[01]]* $cf_dir/man*/$cf_example $cf_dir/cat*/$cf_example
-@@ -3687,17 +3778,17 @@
- 	esac
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_PATHSEP version: 3 updated: 2001/01/12 01:23:53
-+dnl CF_PATHSEP version: 4 updated: 2009/01/11 20:30:23
- dnl ----------
- dnl Provide a value for the $PATH and similar separator
- AC_DEFUN([CF_PATHSEP],
- [
- 	case $cf_cv_system_name in
--	os2*)	PATHSEP=';'  ;;
--	*)	PATHSEP=':'  ;;
-+	os2*)	PATH_SEPARATOR=';'  ;;
-+	*)	PATH_SEPARATOR=':'  ;;
- 	esac
--ifelse($1,,,[$1=$PATHSEP])
--	AC_SUBST(PATHSEP)
-+ifelse($1,,,[$1=$PATH_SEPARATOR])
-+	AC_SUBST(PATH_SEPARATOR)
- ])dnl
- dnl ---------------------------------------------------------------------------
- dnl CF_PATH_SYNTAX version: 12 updated: 2008/03/23 14:45:59
-@@ -3737,6 +3828,38 @@
- esac
- ])dnl
- dnl ---------------------------------------------------------------------------
-+dnl CF_PKG_CONFIG version: 3 updated: 2009/01/25 10:55:09
-+dnl -------------
-+dnl Check for the package-config program, unless disabled by command-line.
-+AC_DEFUN([CF_PKG_CONFIG],
-+[
-+AC_MSG_CHECKING(if you want to use pkg-config)
-+AC_ARG_WITH(pkg-config,
-+	[  --with-pkg-config{=path} enable/disable use of pkg-config],
-+	[cf_pkg_config=$withval],
-+	[cf_pkg_config=yes])
-+AC_MSG_RESULT($cf_pkg_config)
-+
-+case $cf_pkg_config in #(vi
-+no) #(vi
-+	PKG_CONFIG=none
-+	;;
-+yes) #(vi
-+	AC_PATH_PROG(PKG_CONFIG, pkg-config, none)
-+	;;
-+*)
-+	PKG_CONFIG=$withval
-+	;;
-+esac
-+
-+test -z "$PKG_CONFIG" && PKG_CONFIG=none
-+if test "$PKG_CONFIG" != none ; then
-+	CF_PATH_SYNTAX(PKG_CONFIG)
-+fi
-+
-+AC_SUBST(PKG_CONFIG)
-+])dnl
-+dnl ---------------------------------------------------------------------------
- dnl CF_POSIX_C_SOURCE version: 6 updated: 2005/07/14 20:25:10
- dnl -----------------
- dnl Define _POSIX_C_SOURCE to the given level, and _POSIX_SOURCE if needed.
-@@ -3872,6 +3995,13 @@
- 
- ])dnl
- dnl ---------------------------------------------------------------------------
-+dnl CF_PROG_AR version: 1 updated: 2009/01/01 20:15:22
-+dnl ----------
-+dnl Check for archiver "ar".
-+AC_DEFUN([CF_PROG_AR],[
-+AC_CHECK_TOOL(AR, ar, ar)
-+])
-+dnl ---------------------------------------------------------------------------
- dnl CF_PROG_AWK version: 1 updated: 2006/09/16 11:40:59
- dnl -----------
- dnl Check for awk, ensure that the check found something.
-@@ -4003,7 +4133,7 @@
- esac
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_PROG_LDCONFIG version: 1 updated: 2003/09/20 17:07:55
-+dnl CF_PROG_LDCONFIG version: 2 updated: 2008/12/13 14:08:40
- dnl ----------------
- dnl Check for ldconfig, needed to fixup shared libraries that would be built
- dnl and then used in the install.
-@@ -4012,7 +4142,7 @@
-   LDCONFIG=:
- else
- case "$cf_cv_system_name" in #(vi
--freebsd*) #(vi
-+dragonfly*|freebsd*) #(vi
-   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
-   ;;
- *) LDPATH=$PATH:/sbin:/usr/sbin
-@@ -4147,7 +4277,7 @@
- fi
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_SHARED_OPTS version: 53 updated: 2008/10/25 18:14:20
-+dnl CF_SHARED_OPTS version: 57 updated: 2009/01/17 16:10:05
- dnl --------------
- dnl --------------
- dnl Attempt to determine the appropriate CC/LD options for creating a shared
-@@ -4176,6 +4306,7 @@
- 	AC_REQUIRE([CF_SUBST_NCURSES_VERSION])
- 	LOCAL_LDFLAGS=
- 	LOCAL_LDFLAGS2=
-+	LD_RPATH_OPT=
- 	LD_SHARED_OPTS=
- 	INSTALL_LIB="-m 644"
- 
-@@ -4219,6 +4350,12 @@
- 	cf_cv_shlib_version_infix=no
- 
- 	case $cf_cv_system_name in
-+	aix[[56]]*)
-+		if test "$GCC" = yes; then
-+			CC_SHARED_OPTS=
-+			MK_SHARED_LIB="$(CC) -shared"
-+		fi
-+		;;
- 	beos*)
- 		MK_SHARED_LIB='${CC} ${CFLAGS} -o $[@] -Xlinker -soname=`basename $[@]` -nostart -e 0'
- 		;;
-@@ -4239,7 +4376,7 @@
- EOF
- 		exec \[$]* -shared -Wl,--out-implib=../lib/\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\[$]{SHARED_LIB}
- CF_EOF
--		chmod +x mk_shared_lib.sh 
-+		chmod +x mk_shared_lib.sh
- 		;;
- 	darwin*)
- 		EXTRA_CFLAGS="-no-cpp-precomp"
-@@ -4272,10 +4409,10 @@
- 	irix*)
- 		if test "$cf_cv_ld_rpath" = yes ; then
- 			if test "$GCC" = yes; then
--				cf_ld_rpath_opt="-Wl,-rpath,"
-+				LD_RPATH_OPT="-Wl,-rpath,"
- 				EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
- 			else
--				cf_ld_rpath_opt="-rpath "
-+				LD_RPATH_OPT="-rpath "
- 				EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
- 			fi
- 		fi
-@@ -4294,7 +4431,7 @@
- 			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
- 		fi
- 		if test "$cf_cv_ld_rpath" = yes ; then
--			cf_ld_rpath_opt="-Wl,-rpath,"
-+			LD_RPATH_OPT="-Wl,-rpath,"
- 			EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
- 		fi
- 		CF_SHARED_SONAME
-@@ -4306,12 +4443,12 @@
- 			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
- 		fi
- 		if test "$cf_cv_ld_rpath" = yes ; then
--			cf_ld_rpath_opt="-Wl,-rpath,"
-+			LD_RPATH_OPT="-Wl,-rpath,"
- 			EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
- 		fi
- 		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
- 		CF_SHARED_SONAME
--		MK_SHARED_LIB='${CC} ${CFLAGS} -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]'
-+		MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]'
- 		;;
- 	nto-qnx*|openbsd*|freebsd[[12]].*)
- 		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
-@@ -4323,15 +4460,15 @@
- 		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
- 			LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
- 			LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
--			cf_ld_rpath_opt="-rpath "
-+			LD_RPATH_OPT="-rpath "
- 			EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
- 		fi
- 		CF_SHARED_SONAME
--		MK_SHARED_LIB='${LD} -Bshareable -soname=`basename $[@]` -o $[@]'
-+		MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $[@]` -o $[@]'
- 		;;
- 	netbsd*)
- 		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
--		test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
-+		test "$cf_cv_ld_rpath" = yes && LD_RPATH_OPT="-Wl,-rpath,"
- 		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
- 			LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
- 			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
-@@ -4346,7 +4483,7 @@
- 			CF_SHARED_SONAME
- 			MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $[@]'
- 		else
--			MK_SHARED_LIB='${LD} -Bshareable -o $[@]'
-+			MK_SHARED_LIB='${LD} -shared -Bshareable -o $[@]'
- 		fi
- 		;;
- 	osf*|mls+*)
-@@ -4365,7 +4502,7 @@
- 			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
- 		fi
- 		if test "$cf_cv_ld_rpath" = yes ; then
--			cf_ld_rpath_opt="-rpath"
-+			LD_RPATH_OPT="-rpath"
- 			# EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
- 		fi
- 		cf_cv_rm_so_locs=yes
-@@ -4400,12 +4537,19 @@
- 			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
- 		fi
- 		if test "$cf_cv_ld_rpath" = yes ; then
--			cf_ld_rpath_opt="-R"
-+			LD_RPATH_OPT="-R"
- 			EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
- 		fi
- 		CF_SHARED_SONAME
- 		if test "$GCC" != yes; then
--			CC_SHARED_OPTS='-xcode=pic32'
-+			cf_save_CFLAGS="$CFLAGS"
-+			for cf_shared_opts in -xcode=pic13 -xcode=pic32 -Kpic -KPIC -O
-+			do
-+				CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
-+				AC_TRY_COMPILE([#include <stdio.h>],[printf("Hello\n");],[break])
-+			done
-+			CFLAGS="$cf_save_CFLAGS"
-+			CC_SHARED_OPTS=$cf_shared_opts
- 			MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $[@]'
- 		else
- 			MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $[@]'
-@@ -4438,18 +4582,19 @@
- 		;;
- 	esac
- 
--	if test -n "$cf_ld_rpath_opt" ; then
-+	if test -n "$LD_RPATH_OPT" ; then
- 		AC_MSG_CHECKING(if we need a space after rpath option)
- 		cf_save_LIBS="$LIBS"
--		LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
-+		LIBS="$LIBS ${LD_RPATH_OPT}$libdir"
- 		AC_TRY_LINK(, , cf_rpath_space=no, cf_rpath_space=yes)
- 		LIBS="$cf_save_LIBS"
- 		AC_MSG_RESULT($cf_rpath_space)
--		test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
--		MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
-+		test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
-+		MK_SHARED_LIB="$MK_SHARED_LIB $LD_RPATH_OPT\${libdir}"
- 	fi
- 
- 	AC_SUBST(CC_SHARED_OPTS)
-+	AC_SUBST(LD_RPATH_OPT)
- 	AC_SUBST(LD_SHARED_OPTS)
- 	AC_SUBST(MK_SHARED_LIB)
- 	AC_SUBST(LINK_PROGS)
-@@ -4642,7 +4787,7 @@
- fi
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_SRC_MODULES version: 18 updated: 2005/05/28 12:58:54
-+dnl CF_SRC_MODULES version: 20 updated: 2008/12/27 12:30:03
- dnl --------------
- dnl For each parameter, test if the source-directory exists, and if it contains
- dnl a 'modules' file.  If so, add to the list $cf_cv_src_modules which we'll
-@@ -4717,7 +4862,11 @@
- AC_SUBST(TEST_ARG2)
- AC_SUBST(TEST_DEP2)
- 
--SRC_SUBDIRS="man include"
-+SRC_SUBDIRS=
-+if test "x$cf_with_manpages" != xno ; then
-+	SRC_SUBDIRS="$SRC_SUBDIRS man"
-+fi
-+SRC_SUBDIRS="$SRC_SUBDIRS include"
- for cf_dir in $cf_cv_src_modules
- do
- 	SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
-@@ -4728,8 +4877,8 @@
- 
- ADA_SUBDIRS=
- if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
--   SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
--   ADA_SUBDIRS="gen src samples"
-+	SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
-+	ADA_SUBDIRS="gen src samples"
- fi
- 
- SUB_MAKEFILES=
-@@ -4739,11 +4888,11 @@
- done
- 
- if test -n "$ADA_SUBDIRS"; then
--   for cf_dir in $ADA_SUBDIRS
--   do
--      SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
--   done
--   AC_SUBST(ADA_SUBDIRS)
-+	for cf_dir in $ADA_SUBDIRS
-+	do
-+		SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
-+	done
-+	AC_SUBST(ADA_SUBDIRS)
- fi
- ])dnl
- dnl ---------------------------------------------------------------------------
-@@ -5241,7 +5390,7 @@
- fi
- ])
- dnl ---------------------------------------------------------------------------
--dnl CF_WITH_LIBTOOL version: 19 updated: 2008/03/29 15:46:43
-+dnl CF_WITH_LIBTOOL version: 23 updated: 2009/03/28 14:26:27
- dnl ---------------
- dnl Provide a configure option to incorporate libtool.  Define several useful
- dnl symbols for the makefile rules.
-@@ -5261,18 +5410,18 @@
- dnl		echo cannot find libtool.m4 file
- dnl		exit 1
- dnl	fi
--dnl	
-+dnl
- dnl	LOCAL=aclocal.m4
- dnl	ORIG=aclocal.m4.orig
--dnl	
-+dnl
- dnl	trap "mv $ORIG $LOCAL" 0 1 2 5 15
- dnl	rm -f $ORIG
- dnl	mv $LOCAL $ORIG
--dnl	
-+dnl
- dnl	# sed the LIBTOOL= assignment to omit the current directory?
- dnl	sed -e 's/^LIBTOOL=.*/LIBTOOL=${LIBTOOL-libtool}/' $ACLOCAL/libtool.m4 >>$LOCAL
- dnl	cat $ORIG >>$LOCAL
--dnl	
-+dnl
- dnl	autoconf-257 $*
- dnl
- AC_DEFUN([CF_WITH_LIBTOOL],
-@@ -5306,17 +5455,17 @@
- 	AC_PROG_LIBTOOL
- 	# missing_content_AC_PROG_LIBTOOL}}
- ],[
-- 	if test "$with_libtool" != "yes" ; then
-+	if test "$with_libtool" != "yes" ; then
- 		CF_PATH_SYNTAX(with_libtool)
- 		LIBTOOL=$with_libtool
- 	else
-- 		AC_PATH_PROG(LIBTOOL,libtool)
-- 	fi
-- 	if test -z "$LIBTOOL" ; then
-- 		AC_MSG_ERROR(Cannot find libtool)
-- 	fi
-+		AC_PATH_PROG(LIBTOOL,libtool)
-+	fi
-+	if test -z "$LIBTOOL" ; then
-+		AC_MSG_ERROR(Cannot find libtool)
-+	fi
- ])dnl
--	LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o'
-+	LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} -o'
- 	LIB_OBJECT='${OBJECTS:.o=.lo}'
- 	LIB_SUFFIX=.la
- 	LIB_CLEAN='${LIBTOOL} --mode=clean'
-@@ -5331,16 +5480,25 @@
- 
- 	# Save the version in a cache variable - this is not entirely a good
- 	# thing, but the version string from libtool is very ugly, and for
--	# bug reports it might be useful to have the original string.
-+	# bug reports it might be useful to have the original string. "("
- 	cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([[^)]]*)//g' -e 's/^[[^1-9]]*//' -e 's/[[^0-9.]].*//'`
- 	AC_MSG_RESULT($cf_cv_libtool_version)
- 	if test -z "$cf_cv_libtool_version" ; then
- 		AC_MSG_ERROR(This is not GNU libtool)
- 	fi
- 
-+	# special hack to add -no-undefined (which libtool should do for itself)
-+	LT_UNDEF=
-+	case "$cf_cv_system_name" in #(vi
-+	cygwin*|mingw32*|uwin*|aix[[456]]) #(vi
-+		LT_UNDEF=-no-undefined
-+		;;
-+	esac
-+	AC_SUBST([LT_UNDEF])
-+
- 	# special hack to add --tag option for C++ compiler
--	case $cf_cv_libtool_version in
--	1.[[5-9]]*|[[2-9]]*)
-+	case $cf_cv_libtool_version in #(vi
-+	1.[[5-9]]*|[[2-9]].[[0-9.a-z]]*) #(vi
- 		LIBTOOL_CXX="$LIBTOOL --tag=CXX"
- 		LIBTOOL="$LIBTOOL --tag=CC"
- 		;;
-@@ -5393,7 +5551,7 @@
- AC_SUBST($3)dnl
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_WITH_PATHLIST version: 5 updated: 2001/12/10 01:28:30
-+dnl CF_WITH_PATHLIST version: 6 updated: 2009/01/11 20:30:23
- dnl ----------------
- dnl Process an option specifying a list of colon-separated paths.
- dnl
-@@ -5409,7 +5567,7 @@
- AC_ARG_WITH($1,[$2 ](default: ifelse($4,,empty,$4)),,
- ifelse($4,,[withval=${$3}],[withval=${$3-ifelse($5,,$4,$5)}]))dnl
- 
--IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
-+IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
- cf_dst_path=
- for cf_src_path in $withval
- do
-@@ -5535,7 +5693,7 @@
- 	[USE_VALGRIND])
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_XOPEN_SOURCE version: 26 updated: 2008/07/27 11:26:57
-+dnl CF_XOPEN_SOURCE version: 29 updated: 2009/07/16 21:07:04
- dnl ---------------
- dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
- dnl or adapt to the vendor's definitions to get equivalent functionality,
-@@ -5552,7 +5710,7 @@
- cf_POSIX_C_SOURCE=ifelse($2,,199506L,$2)
- 
- case $host_os in #(vi
--aix[[45]]*) #(vi
-+aix[[456]]*) #(vi
- 	CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
- 	;;
- freebsd*|dragonfly*) #(vi
-@@ -5563,13 +5721,16 @@
- 	cf_XOPEN_SOURCE=600
- 	CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
- 	;;
-+hpux11*) #(vi
-+	CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
-+	;;
- hpux*) #(vi
- 	CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
- 	;;
- irix[[56]].*) #(vi
- 	CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
- 	;;
--linux*|gnu*|k*bsd*-gnu) #(vi
-+linux*|gnu*|mint*|k*bsd*-gnu) #(vi
- 	CF_GNU_SOURCE
- 	;;
- mirbsd*) #(vi
-diff -Naur ncurses-5.7.orig/Ada95/gen/adacurses-config.in ncurses-5.7/Ada95/gen/adacurses-config.in
---- ncurses-5.7.orig/Ada95/gen/adacurses-config.in	2007-04-07 14:06:50.000000000 -0700
-+++ ncurses-5.7/Ada95/gen/adacurses-config.in	2009-07-19 15:02:13.000000000 -0700
-@@ -1,18 +1,47 @@
- #! /bin/sh
--# $Id: adacurses-config.in,v 1.2 2007/04/07 21:06:50 tom Exp $
--#
--# This script will return the option to add to `gnatmake' for using
--# AdaCurses.
-+# $Id: adacurses-config.in,v 1.5 2009/01/11 00:08:19 tom Exp $
-+##############################################################################
-+# Copyright (c) 2007,2009 Free Software Foundation, Inc.                     #
-+#                                                                            #
-+# Permission is hereby granted, free of charge, to any person obtaining a    #
-+# copy of this software and associated documentation files (the "Software"), #
-+# to deal in the Software without restriction, including without limitation  #
-+# the rights to use, copy, modify, merge, publish, distribute, distribute    #
-+# with modifications, sublicense, and/or sell copies of the Software, and to #
-+# permit persons to whom the Software is furnished to do so, subject to the  #
-+# following conditions:                                                      #
-+#                                                                            #
-+# The above copyright notice and this permission notice shall be included in #
-+# all copies or substantial portions of the Software.                        #
-+#                                                                            #
-+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
-+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,   #
-+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL    #
-+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER      #
-+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING    #
-+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER        #
-+# DEALINGS IN THE SOFTWARE.                                                  #
-+#                                                                            #
-+# Except as contained in this notice, the name(s) of the above copyright     #
-+# holders shall not be used in advertising or otherwise to promote the sale, #
-+# use or other dealings in this Software without prior written               #
-+# authorization.                                                             #
-+##############################################################################
- #
-+# This script returns the options to add to `gnatmake' for using AdaCurses.
-+
-+DESTDIR=@DESTDIR@
-+prefix=@prefix@
-+exec_prefix=@exec_prefix@
-+libdir=@libdir@
- 
--prefix="@prefix@"
--exec_prefix="@exec_prefix@"
--libdir="@libdir@"
-+ADA_INCLUDE=@ADA_INCLUDE@
-+ADA_OBJECTS=@ADA_OBJECTS@
- 
--VERSION="@NCURSES_MAJOR@.@NCURSES_MINOR@.@NCURSES_PATCH@"
-+VERSION=@NCURSES_MAJOR@.@NCURSES_MINOR@.@NCURSES_PATCH@
- 
--CFLAGS="-I$libdir/adacurses -L$libdir/adacurses"
--LIBS="-L$prefix/lib -lAdaCurses"
-+CFLAGS="-I$ADA_INCLUDE -aO$ADA_OBJECTS"
-+LIBS="-L$ADA_OBJECTS -lAdaCurses"
- 
- case "x$1" in
-     x--version)
-@@ -26,10 +55,10 @@
-         ;;
-     x)
-     	# if no parameter is given, give what gnatmake needs
--        echo $CFLAGS -largs $LIBS
-+        echo "$CFLAGS -i -largs $LIBS"
-         ;;
-     *)
--        echo 'Usage: adacurses-config [--version | --cflags | --libs]' >&2
-+        echo 'Usage: adacurses@DFT_ARG_SUFFIX@-config [--version | --cflags | --libs]' >&2
-         exit 1
-         ;;
- esac
-diff -Naur ncurses-5.7.orig/Ada95/gen/gen.c ncurses-5.7/Ada95/gen/gen.c
---- ncurses-5.7.orig/Ada95/gen/gen.c	2008-10-04 14:59:37.000000000 -0700
-+++ ncurses-5.7/Ada95/gen/gen.c	2009-07-19 15:03:45.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998,2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998,2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -32,7 +32,7 @@
- 
- /*
-     Version Control
--    $Id: gen.c,v 1.49 2008/10/04 21:59:37 tom Exp $
-+    $Id: gen.c,v 1.50 2009/03/21 21:34:20 tom Exp $
-   --------------------------------------------------------------------------*/
- /*
-   This program generates various record structures and constants from the
-@@ -778,7 +778,9 @@
- #if USE_REENTRANT || BROKEN_LINKER
-   printf("   type C_ACS_Ptr is access C_ACS_Map;\n");
-   printf("   function ACS_Map return C_ACS_Ptr;\n");
--  printf("   pragma Import (C, ACS_Map, \"_nc_acs_map\");\n");
-+  printf("   pragma Import (C, ACS_Map, \""
-+	 NCURSES_WRAP_PREFIX
-+	 "acs_map\");\n");
- #else
-   printf("   ACS_Map : C_ACS_Map;\n");
-   printf("   pragma Import (C, ACS_Map, \"acs_map\");\n");
-@@ -1034,7 +1036,7 @@
-   printf("   function %s return %s\n", ada_func, ada_type);
-   printf("   is\n");
-   printf("      function Result return %s;\n", c_type);
--  printf("      pragma Import (C, Result, \"_nc_%s\");\n", c_var);
-+  printf("      pragma Import (C, Result, \"" NCURSES_WRAP_PREFIX "%s\");\n", c_var);
-   printf("   begin\n");
-   if (strcmp(c_type, ada_type))
-     printf("      return %s (Result);\n", ada_type);
-diff -Naur ncurses-5.7.orig/Ada95/gen/Makefile.in ncurses-5.7/Ada95/gen/Makefile.in
---- ncurses-5.7.orig/Ada95/gen/Makefile.in	2008-10-04 15:58:31.000000000 -0700
-+++ ncurses-5.7/Ada95/gen/Makefile.in	2009-07-19 15:02:13.000000000 -0700
-@@ -1,5 +1,5 @@
- ##############################################################################
--# Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.                #
-+# Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.                #
- #                                                                            #
- # Permission is hereby granted, free of charge, to any person obtaining a    #
- # copy of this software and associated documentation files (the "Software"), #
-@@ -28,7 +28,7 @@
- #
- #  Author:  Juergen Pfeifer, 1996
- #
--#  $Id: Makefile.in,v 1.61 2008/10/04 22:58:31 tom Exp $
-+#  $Id: Makefile.in,v 1.63 2009/01/11 01:11:35 tom Exp $
- #
- .SUFFIXES:
- 
-@@ -81,7 +81,7 @@
- M4		= m4
- M4FLAGS		= -DNCURSES_EXT_FUNCS=@NCURSES_EXT_FUNCS@
- 
--ADACURSES_CONFIG = adacurses-config
-+ADACURSES_CONFIG = adacurses@DFT_ARG_SUFFIX@-config
- 
- WRAPPER		= sh $(top_srcdir)/misc/shlib
- GENERATE	= ./gen$x '@DFT_ARG_SUFFIX@'
-@@ -166,6 +166,7 @@
- 
- sources:
- 
-+$(DESTDIR)$(bindir) \
- $(ADA_INCLUDE) \
- $(ADA_OBJECTS) :
- 	sh $(top_srcdir)/mkdirs.sh $@
-@@ -187,8 +188,8 @@
- 	@-chmod u+x $(ADA_SRCDIR)/*.ali
- 
- install \
--install.libs :: $(DESTDIR)$(bindir) adacurses-config
--	$(INSTALL_PROG) adacurses-config $(DESTDIR)$(bindir)/$(ADACURSES_CONFIG)
-+install.libs :: $(DESTDIR)$(bindir) $(ADACURSES_CONFIG)
-+	$(INSTALL_PROG) $(ADACURSES_CONFIG) $(DESTDIR)$(bindir)/$(ADACURSES_CONFIG)
- 
- uninstall \
- uninstall.libs ::
-@@ -398,7 +399,7 @@
- 	-rm -f $(GEN_TARGETS) instab.tmp *.ad[bs] *.html *.ali *.tmp
- 
- distclean :: clean
--	-rm -f adacurses-config
-+	-rm -f $(ADACURSES_CONFIG)
- 	-rm -f Makefile
- 
- realclean :: distclean
-diff -Naur ncurses-5.7.orig/Ada95/samples/Makefile.in ncurses-5.7/Ada95/samples/Makefile.in
---- ncurses-5.7.orig/Ada95/samples/Makefile.in	2006-12-17 08:45:02.000000000 -0800
-+++ ncurses-5.7/Ada95/samples/Makefile.in	2009-07-19 15:02:13.000000000 -0700
-@@ -1,5 +1,5 @@
- ##############################################################################
--# Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.                #
-+# Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.                #
- #                                                                            #
- # Permission is hereby granted, free of charge, to any person obtaining a    #
- # copy of this software and associated documentation files (the "Software"), #
-@@ -28,7 +28,7 @@
- #
- #  Author:  Juergen Pfeifer, 1996
- #
--#  $Id: Makefile.in,v 1.34 2006/12/17 16:45:02 tom Exp $
-+#  $Id: Makefile.in,v 1.36 2009/01/11 01:11:54 tom Exp $
- #
- .SUFFIXES:
- 
-@@ -88,8 +88,8 @@
- 
- CARGS        =-cargs $(ADAFLAGS)
- LARGS        =-largs @TEST_ARG2@ $(LD_FLAGS) -lAdaCurses
-- 
--PROGS        = tour rain ncurses 
-+
-+PROGS        = tour rain ncurses
- 
- TOUR_OBJS    =	tour.o sample.o sample-curses_demo.o sample-explanation.o 	\
- 		sample-form_demo.o sample-function_key_setting.o 		\
-@@ -145,7 +145,7 @@
- 
- clean :: mostlyclean
- 	rm -f *.o *.ali b_t*.* *.s $(PROGS) a.out core b_*_test.c *.xr[bs] \
--	explain.msg trace screendump 
-+	explain.msg trace screendump b~*.ad[bs]
- 
- distclean :: clean
- 	rm -f Makefile
-diff -Naur ncurses-5.7.orig/Ada95/src/Makefile.in ncurses-5.7/Ada95/src/Makefile.in
---- ncurses-5.7.orig/Ada95/src/Makefile.in	2007-09-15 11:22:24.000000000 -0700
-+++ ncurses-5.7/Ada95/src/Makefile.in	2009-07-19 15:02:13.000000000 -0700
-@@ -1,5 +1,5 @@
- ##############################################################################
--# Copyright (c) 1998-2003,2004 Free Software Foundation, Inc.                #
-+# Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.                #
- #                                                                            #
- # Permission is hereby granted, free of charge, to any person obtaining a    #
- # copy of this software and associated documentation files (the "Software"), #
-@@ -28,7 +28,7 @@
- #
- #  Author:  Juergen Pfeifer, 1996
- #
--#  $Id: Makefile.in,v 1.31 2007/09/15 18:22:24 tom Exp $
-+#  $Id: Makefile.in,v 1.34 2009/01/11 01:11:44 tom Exp $
- #
- .SUFFIXES:
- 
-@@ -36,17 +36,22 @@
- THIS		= Makefile
- 
- MODEL		= ../../@DFT_OBJ_SUBDIR@
-+
- DESTDIR		= @DESTDIR@
-+
-+top_srcdir	= @top_srcdir@
- srcdir		= @srcdir@
- prefix		= @prefix@
- exec_prefix	= @exec_prefix@
--ADA_INCLUDE	= @ADA_INCLUDE@
-+
-+ADA_INCLUDE	= $(DESTDIR)@ADA_INCLUDE@
-+ADA_OBJECTS	= $(DESTDIR)@ADA_OBJECTS@
- 
- INSTALL		= @INSTALL@
--INSTALL_DATA	= @INSTALL_DATA@
-+INSTALL_LIB	= @INSTALL@ @INSTALL_LIB@
- 
- AR		= @AR@
--AR_OPTS		= @AR_OPTS@
-+ARFLAGS		= @ARFLAGS@
- AWK		= @AWK@
- LN_S		= @LN_S@
- 
-@@ -75,11 +80,12 @@
- ADAFLAGS        = @ADAFLAGS@ -I. -I$(srcdir)
- 
- ADAMAKE         = @cf_ada_make@
--ADAMAKEFLAGS    = 
-+ADAMAKEFLAGS    =
- 
- CARGS           = -cargs $(ADAFLAGS)
- LARGS           =
- 
-+LIBRARY_FILE	= libAdaCurses.a
- ALIB            = @cf_ada_package@
- ABASE           = $(ALIB)-curses
- 
-@@ -164,21 +170,25 @@
- 	$(ABASE)-text_io-complex_io.o
- 
- 
--all ::  libAdaCurses.a
-+all ::  $(LIBRARY_FILE)
- 	@echo done
- 
--libAdaCurses.a :: dotouch $(LIBOBJS) @cf_generic_objects@
--	$(AR) $(AR_OPTS) $@ $(LIBOBJS) @cf_generic_objects@
--
--dotouch :
--	@sh -c 'for f in $(LIBALIS) $(GENALIS); do test -f $$f || touch $$f; done'
-+$(LIBRARY_FILE) :: $(LIBOBJS) @cf_generic_objects@
-+	$(AR) $(ARFLAGS) $@ $(LIBOBJS) @cf_generic_objects@
- 
- sources :
- 	@echo made $@
- 
- libs \
- install \
--install.libs \
-+install.libs :: $(LIBRARY_FILE)
-+	@echo made $(LIBRARY_FILE)
-+
-+install \
-+install.libs :: $(LIBRARY_FILE)
-+	@$(top_srcdir)/tar-copy.sh $(LIBRARY_FILE) . $(ADA_OBJECTS)
-+	@echo made $@
-+
- uninstall \
- uninstall.libs ::
- 	@echo made $@
-diff -Naur ncurses-5.7.orig/Ada95/src/terminal_interface-curses-mouse.adb ncurses-5.7/Ada95/src/terminal_interface-curses-mouse.adb
---- ncurses-5.7.orig/Ada95/src/terminal_interface-curses-mouse.adb	2008-07-26 11:51:11.000000000 -0700
-+++ ncurses-5.7/Ada95/src/terminal_interface-curses-mouse.adb	2009-07-19 15:01:57.000000000 -0700
-@@ -35,8 +35,8 @@
- ------------------------------------------------------------------------------
- --  Author:  Juergen Pfeifer, 1996
- --  Version Control:
----  $Revision: 1.22 $
----  $Date: 2008/07/26 18:51:11 $
-+--  $Revision: 1.23 $
-+--  $Date: 2008/11/16 00:19:59 $
- --  Binding Version 01.00
- ------------------------------------------------------------------------------
- with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
-@@ -50,7 +50,7 @@
-    function Has_Mouse return Boolean
-    is
-       function Mouse_Avail return C_Int;
--      pragma Import (C, Mouse_Avail, "_nc_has_mouse");
-+      pragma Import (C, Mouse_Avail, "has_mouse");
-    begin
-       if Has_Key (Key_Mouse) or else Mouse_Avail /= 0 then
-          return True;
-diff -Naur ncurses-5.7.orig/c++/cursesw.cc ncurses-5.7/c++/cursesw.cc
---- ncurses-5.7.orig/c++/cursesw.cc	2007-12-15 15:01:57.000000000 -0800
-+++ ncurses-5.7/c++/cursesw.cc	2009-07-19 15:03:48.000000000 -0700
-@@ -1,6 +1,6 @@
- // * this is for making emacs happy: -*-Mode: C++;-*-
- /****************************************************************************
-- * Copyright (c) 2007 Free Software Foundation, Inc.                        *
-+ * Copyright (c) 2007-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -42,7 +42,7 @@
- #include "internal.h"
- #include "cursesw.h"
- 
--MODULE_ID("$Id: cursesw.cc,v 1.49 2007/12/15 23:01:57 tom Exp $")
-+MODULE_ID("$Id: cursesw.cc,v 1.51 2009/03/28 21:31:37 tom Exp $")
- 
- #define COLORS_NEED_INITIALIZATION  -1
- #define COLORS_NOT_INITIALIZED       0
-@@ -287,7 +287,6 @@
- {
-     initialize();
-     w = win;
--    assert((w->_maxx +1 ) == ncols);
- }
- 
- int _nc_xx_ripoff_init(WINDOW *w, int ncols)
-@@ -296,8 +295,7 @@
- 
-     RIPOFFINIT init = *prip++;
-     if (init) {
--	NCursesWindow* W = new NCursesWindow(w,ncols);
--	res = init(*W);
-+	res = init(*(new NCursesWindow(w,ncols)));
-     }
-     return res;
- }
-@@ -464,7 +462,7 @@
- #if HAVE_HAS_KEY
- bool NCursesWindow::has_mouse() const
- {
--    return ((::has_key(KEY_MOUSE) || ::_nc_has_mouse())
-+    return ((::has_key(KEY_MOUSE) || ::has_mouse())
- 	     ? TRUE : FALSE);
- }
- #endif
-diff -Naur ncurses-5.7.orig/c++/demo.cc ncurses-5.7/c++/demo.cc
---- ncurses-5.7.orig/c++/demo.cc	2008-08-04 10:16:57.000000000 -0700
-+++ ncurses-5.7/c++/demo.cc	2009-07-19 15:03:58.000000000 -0700
-@@ -35,7 +35,7 @@
-  *   Demo code for NCursesMenu and NCursesForm written by
-  *   Juergen Pfeifer
-  *
-- * $Id: demo.cc,v 1.38 2008/08/04 17:16:57 tom Exp $
-+ * $Id: demo.cc,v 1.39 2008/12/07 02:07:34 juergen Exp $
-  */
- 
- #include "internal.h"
-@@ -43,7 +43,13 @@
- #include "cursesm.h"
- #include "cursesf.h"
- 
-+#ifdef __MINGW32__
-+#undef KEY_EVENT
-+#endif
-+
-+#ifndef __MINGW32__
- extern "C" unsigned int sleep(unsigned int);
-+#endif
- 
- #undef index // needed for NeXT
- 
-diff -Naur ncurses-5.7.orig/c++/internal.h ncurses-5.7/c++/internal.h
---- ncurses-5.7.orig/c++/internal.h	2008-10-25 14:35:44.000000000 -0700
-+++ ncurses-5.7/c++/internal.h	2009-07-19 15:03:58.000000000 -0700
-@@ -31,7 +31,7 @@
-  *   Author: Juergen Pfeifer, 1997                                          *
-  ****************************************************************************/
- 
--// $Id: internal.h,v 1.16 2008/10/25 21:35:44 tom Exp $
-+// $Id: internal.h,v 1.17 2008/12/07 02:07:34 juergen Exp $
- 
- #ifndef NCURSES_CPLUS_INTERNAL_H
- #define NCURSES_CPLUS_INTERNAL_H 1
-@@ -44,6 +44,11 @@
- #define MODULE_ID(id) /*nothing*/
- #endif
- 
-+#ifdef __MINGW32__
-+#include <nc_mingw.h>
-+#undef KEY_EVENT
-+#endif
-+
- #ifndef _QNX_SOURCE
- #include <stdlib.h>
- #include <string.h>
-diff -Naur ncurses-5.7.orig/c++/Makefile.in ncurses-5.7/c++/Makefile.in
---- ncurses-5.7.orig/c++/Makefile.in	2007-04-28 08:29:12.000000000 -0700
-+++ ncurses-5.7/c++/Makefile.in	2009-07-19 15:03:48.000000000 -0700
-@@ -1,6 +1,6 @@
--# $Id: Makefile.in,v 1.84 2007/04/28 15:29:12 tom Exp $
-+# $Id: Makefile.in,v 1.87 2009/03/28 18:22:39 Charles.Wilson Exp $
- ##############################################################################
--# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.                #
-+# Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.                #
- #                                                                            #
- # Permission is hereby granted, free of charge, to any person obtaining a    #
- # copy of this software and associated documentation files (the "Software"), #
-@@ -55,16 +55,17 @@
- LIBTOOL_LINK	= @LIB_LINK@
- LIBTOOL_INSTALL	= @LIB_INSTALL@
- LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
-+LT_UNDEF	= @LT_UNDEF@
- 
- INSTALL		= @INSTALL@
- INSTALL_LIB	= @INSTALL@ @INSTALL_LIB@
- INSTALL_DATA	= @INSTALL_DATA@
- 
- AR		= @AR@
--AR_OPTS		= @AR_OPTS@
-+ARFLAGS		= @ARFLAGS@
- 
- CXX_AR		= @CXX_AR@
--CXX_AR_OPTS	= @CXX_AR_OPTS@
-+CXX_ARFLAGS	= @CXX_ARFLAGS@
- RANLIB		= @LIB_PREP@
- 
- CXX		= @CXX@
-@@ -95,7 +96,7 @@
- 
- LINK		= @LINK_PROGS@ $(LIBTOOL_LINK) @CXXLDFLAGS@
- SHLIB_DIRS	= -L../lib
--SHLIB_LIST	= $(SHLIB_DIRS) -lncurses@LIB_SUFFIX@ @SHLIB_LIST@
-+SHLIB_LIST	= $(SHLIB_DIRS) -lform@LIB_SUFFIX@ -lmenu@LIB_SUFFIX@ -lpanel@LIB_SUFFIX@ -lncurses@LIB_SUFFIX@ @SHLIB_LIST@
- 
- LIBROOT		= ncurses++
- 
-@@ -153,14 +154,14 @@
- 	$(MODEL)/cursesmain$o
- 
- ../lib/$(LIBNAME_NORMAL) : $(LIB_OBJS)
--	$(CXX_AR) $(CXX_AR_OPTS) $@ $?
-+	$(CXX_AR) $(CXX_ARFLAGS) $@ $?
- 	$(RANLIB) $@
- 
- ../lib/$(LIBNAME_LIBTOOL) : $(LIB_OBJS)
- 	cd ../lib && $(LIBTOOL_LINK) $(CXX) $(CXXFLAGS) \
- 		-o $(LIBNAME) $(LIB_OBJS:$o=.lo) \
- 		-rpath $(INSTALL_PREFIX)$(libdir) \
--		-version-info $(NCURSES_MAJOR):$(NCURSES_MINOR) $(SHLIB_LIST)
-+		-version-info $(NCURSES_MAJOR):$(NCURSES_MINOR) $(LT_UNDEF) $(SHLIB_LIST)
- 
- OBJS_DEMO = $(MODEL)/demo$o
- 
-diff -Naur ncurses-5.7.orig/config.guess ncurses-5.7/config.guess
---- ncurses-5.7.orig/config.guess	2008-08-30 13:25:07.000000000 -0700
-+++ ncurses-5.7/config.guess	2009-07-19 15:02:08.000000000 -0700
-@@ -4,7 +4,7 @@
- #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
- #   Free Software Foundation, Inc.
- 
--timestamp='2008-04-14'
-+timestamp='2008-12-19'
- 
- # This file is free software; you can redistribute it and/or modify it
- # under the terms of the GNU General Public License as published by
-@@ -331,7 +331,20 @@
- 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- 	exit ;;
-     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
--	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-+	eval $set_cc_for_build
-+	SUN_ARCH="i386"
-+	# If there is a compiler, see if it is configured for 64-bit objects.
-+	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
-+	# This test works for both compilers.
-+	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
-+	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
-+		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
-+		grep IS_64BIT_ARCH >/dev/null
-+	    then
-+		SUN_ARCH="x86_64"
-+	    fi
-+	fi
-+	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- 	exit ;;
-     sun4*:SunOS:6*:*)
- 	# According to config.sub, this is the proper way to canonicalize
-@@ -796,7 +809,7 @@
- 	    x86)
- 		echo i586-pc-interix${UNAME_RELEASE}
- 		exit ;;
--	    EM64T | authenticamd)
-+	    EM64T | authenticamd | genuineintel)
- 		echo x86_64-unknown-interix${UNAME_RELEASE}
- 		exit ;;
- 	    IA64)
-@@ -935,6 +948,9 @@
- 	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- 	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- 	exit ;;
-+    padre:Linux:*:*)
-+	echo sparc-unknown-linux-gnu
-+	exit ;;
-     parisc:Linux:*:* | hppa:Linux:*:*)
- 	# Look for CPU level
- 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-@@ -1138,6 +1154,16 @@
-     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-         /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-           && { echo i486-ncr-sysv4; exit; } ;;
-+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
-+	OS_REL='.3'
-+	test -r /etc/.relid \
-+	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-+	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
-+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
-+	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
-+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
-     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
- 	echo m68k-unknown-lynxos${UNAME_RELEASE}
- 	exit ;;
-diff -Naur ncurses-5.7.orig/config.sub ncurses-5.7/config.sub
---- ncurses-5.7.orig/config.sub	2008-08-30 13:25:02.000000000 -0700
-+++ ncurses-5.7/config.sub	2009-07-19 15:02:08.000000000 -0700
-@@ -4,7 +4,7 @@
- #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
- #   Free Software Foundation, Inc.
- 
--timestamp='2008-06-16'
-+timestamp='2008-12-11'
- 
- # This file is (in principle) common to ALL GNU software.
- # The presence of a machine in this file suggests that SOME GNU software
-@@ -249,6 +249,7 @@
- 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
- 	| i370 | i860 | i960 | ia64 \
- 	| ip2k | iq2000 \
-+	| lm32 \
- 	| m32c | m32r | m32rle | m68000 | m68k | m88k \
- 	| maxq | mb | microblaze | mcore | mep | metag \
- 	| mips | mipsbe | mipseb | mipsel | mipsle \
-@@ -279,7 +280,7 @@
- 	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
- 	| pyramid \
- 	| score \
--	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
-+	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
- 	| sh64 | sh64le \
- 	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
- 	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
-@@ -288,7 +289,7 @@
- 	| v850 | v850e \
- 	| we32k \
- 	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
--	| z8k)
-+	| z8k | z80)
- 		basic_machine=$basic_machine-unknown
- 		;;
- 	m6811 | m68hc11 | m6812 | m68hc12)
-@@ -331,6 +332,7 @@
- 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
- 	| i*86-* | i860-* | i960-* | ia64-* \
- 	| ip2k-* | iq2000-* \
-+	| lm32-* \
- 	| m32c-* | m32r-* | m32rle-* \
- 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- 	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
-@@ -362,7 +364,7 @@
- 	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
- 	| pyramid-* \
- 	| romp-* | rs6000-* \
--	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
-+	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
- 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- 	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
- 	| sparclite-* \
-@@ -375,7 +377,7 @@
- 	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
- 	| xstormy16-* | xtensa*-* \
- 	| ymp-* \
--	| z8k-*)
-+	| z8k-* | z80-*)
- 		;;
- 	# Recognize the basic CPU types without company name, with glob match.
- 	xtensa*)
-@@ -1140,6 +1142,10 @@
- 		basic_machine=z8k-unknown
- 		os=-sim
- 		;;
-+	z80-*-coff)
-+		basic_machine=z80-unknown
-+		os=-sim
-+		;;
- 	none)
- 		basic_machine=none-none
- 		os=-none
-@@ -1178,7 +1184,7 @@
- 	we32k)
- 		basic_machine=we32k-att
- 		;;
--	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
-+	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
- 		basic_machine=sh-unknown
- 		;;
- 	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
-diff -Naur ncurses-5.7.orig/configure ncurses-5.7/configure
---- ncurses-5.7.orig/configure	2008-10-25 17:04:38.000000000 -0700
-+++ ncurses-5.7/configure	2009-07-19 15:04:17.000000000 -0700
-@@ -1,7 +1,7 @@
- #! /bin/sh
--# From configure.in Revision: 1.454 .
-+# From configure.in Revision: 1.472 .
- # Guess values for system-dependent variables and create Makefiles.
--# Generated by Autoconf 2.52.20080325.
-+# Generated by Autoconf 2.52.20081225.
- #
- # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
- # Free Software Foundation, Inc.
-@@ -697,8 +697,11 @@
-   --without-cxx           do not adjust ncurses bool to match C++
-   --without-cxx-binding   do not build C++ binding and demo
-   --without-ada           suppress check for Ada95, don't build demo
-+  --without-manpages      suppress install of manpages
-   --without-progs         suppress build with programs (e.g., tic)
-   --without-curses-h      install curses.h as ncurses.h only
-+  --with-pkg-config{=path} enable/disable use of pkg-config
-+  --enable-pc-files       generate and install .pc files for pkg-config
-   --enable-mixed-case     tic should assume mixed-case filenames
-   --with-install-prefix   prefixes actual install-location ($DESTDIR)
- Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
-@@ -752,6 +755,7 @@
-   --with-chtype=TYPE      override type of chtype
-   --with-ospeed=TYPE      override type of ospeed variable
-   --with-mmask-t=TYPE     override type of mmask_t
-+  --with-ccharw-max=XXX   override size CCHARW_MAX
-   --with-rcs-ids          compile-in RCS identifiers
- Options to Specify How Manpages are Installed:
-   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
-@@ -762,6 +766,7 @@
-   --with-manpage-tbl      specify manpage processing with tbl
- Extensions:
-   --disable-ext-funcs     disable function-extensions
-+  --enable-sp-funcs       disable experimental SCREEN-extensions
-   --enable-const          compile with extra/non-standard const
-   --enable-ext-colors     compile for 256-color support
-   --enable-ext-mouse      compile for extended mouse-encoding
-@@ -780,6 +785,7 @@
-   --with-pthread          use POSIX thread library
-   --enable-weak-symbols   enable weak-symbols for pthreads
-   --enable-reentrant      compile with experimental reentrant code
-+  --with-wrap-prefix=XXX  override prefix used for public variables
-   --enable-safe-sprintf   compile with experimental safe-sprintf code
-   --disable-scroll-hints  compile without scroll-hints code
-   --enable-wgetch-events  compile with experimental wgetch-events code
-@@ -870,7 +876,7 @@
- running configure, to aid debugging if configure makes a mistake.
- 
- It was created by $as_me, which was
--generated by GNU Autoconf 2.52.20080325.  Invocation command line was
-+generated by GNU Autoconf 2.52.20081225.  Invocation command line was
- 
-   $ $0 $@
- 
-@@ -994,7 +1000,7 @@
- fi
- for ac_site_file in $CONFIG_SITE; do
-   if test -r "$ac_site_file"; then
--    { echo "$as_me:997: loading site script $ac_site_file" >&5
-+    { echo "$as_me:1003: loading site script $ac_site_file" >&5
- echo "$as_me: loading site script $ac_site_file" >&6;}
-     cat "$ac_site_file" >&5
-     . "$ac_site_file"
-@@ -1005,7 +1011,7 @@
-   # Some versions of bash will fail to source /dev/null (special
-   # files actually), so we avoid doing that.
-   if test -f "$cache_file"; then
--    { echo "$as_me:1008: loading cache $cache_file" >&5
-+    { echo "$as_me:1014: loading cache $cache_file" >&5
- echo "$as_me: loading cache $cache_file" >&6;}
-     case $cache_file in
-       [\\/]* | ?:[\\/]* ) . $cache_file;;
-@@ -1013,7 +1019,7 @@
-     esac
-   fi
- else
--  { echo "$as_me:1016: creating cache $cache_file" >&5
-+  { echo "$as_me:1022: creating cache $cache_file" >&5
- echo "$as_me: creating cache $cache_file" >&6;}
-   >$cache_file
- fi
-@@ -1029,21 +1035,21 @@
-   eval ac_new_val="\$ac_env_${ac_var}_value"
-   case $ac_old_set,$ac_new_set in
-     set,)
--      { echo "$as_me:1032: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-+      { echo "$as_me:1038: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
- echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
-       ac_cache_corrupted=: ;;
-     ,set)
--      { echo "$as_me:1036: error: \`$ac_var' was not set in the previous run" >&5
-+      { echo "$as_me:1042: error: \`$ac_var' was not set in the previous run" >&5
- echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
-       ac_cache_corrupted=: ;;
-     ,);;
-     *)
-       if test "x$ac_old_val" != "x$ac_new_val"; then
--        { echo "$as_me:1042: error: \`$ac_var' has changed since the previous run:" >&5
-+        { echo "$as_me:1048: error: \`$ac_var' has changed since the previous run:" >&5
- echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
--        { echo "$as_me:1044:   former value:  $ac_old_val" >&5
-+        { echo "$as_me:1050:   former value:  $ac_old_val" >&5
- echo "$as_me:   former value:  $ac_old_val" >&2;}
--        { echo "$as_me:1046:   current value: $ac_new_val" >&5
-+        { echo "$as_me:1052:   current value: $ac_new_val" >&5
- echo "$as_me:   current value: $ac_new_val" >&2;}
-         ac_cache_corrupted=:
-       fi;;
-@@ -1062,9 +1068,9 @@
-   fi
- done
- if $ac_cache_corrupted; then
--  { echo "$as_me:1065: error: changes in the environment can compromise the build" >&5
-+  { echo "$as_me:1071: error: changes in the environment can compromise the build" >&5
- echo "$as_me: error: changes in the environment can compromise the build" >&2;}
--  { { echo "$as_me:1067: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-+  { { echo "$as_me:1073: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
- echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
-    { (exit 1); exit 1; }; }
- fi
-@@ -1085,10 +1091,10 @@
- echo "#! $SHELL" >conftest.sh
- echo  "exit 0"   >>conftest.sh
- chmod +x conftest.sh
--if { (echo "$as_me:1088: PATH=\".;.\"; conftest.sh") >&5
-+if { (echo "$as_me:1094: PATH=\".;.\"; conftest.sh") >&5
-   (PATH=".;."; conftest.sh) 2>&5
-   ac_status=$?
--  echo "$as_me:1091: \$? = $ac_status" >&5
-+  echo "$as_me:1097: \$? = $ac_status" >&5
-   (exit $ac_status); }; then
-   ac_path_separator=';'
- else
-@@ -1101,7 +1107,7 @@
- 
- top_builddir=`pwd`
- 
--echo "$as_me:1104: checking for egrep" >&5
-+echo "$as_me:1110: checking for egrep" >&5
- echo $ECHO_N "checking for egrep... $ECHO_C" >&6
- if test "${ac_cv_prog_egrep+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -1111,11 +1117,11 @@
-     else ac_cv_prog_egrep='egrep'
-     fi
- fi
--echo "$as_me:1114: result: $ac_cv_prog_egrep" >&5
-+echo "$as_me:1120: result: $ac_cv_prog_egrep" >&5
- echo "${ECHO_T}$ac_cv_prog_egrep" >&6
-  EGREP=$ac_cv_prog_egrep
- 
--test -z "$EGREP" && { { echo "$as_me:1118: error: No egrep program found" >&5
-+test -z "$EGREP" && { { echo "$as_me:1124: error: No egrep program found" >&5
- echo "$as_me: error: No egrep program found" >&2;}
-    { (exit 1); exit 1; }; }
- 
-@@ -1125,7 +1131,7 @@
- cf_cv_abi_version=${NCURSES_MAJOR}
- cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
- cf_cv_timestamp=`date`
--echo "$as_me:1128: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
-+echo "$as_me:1134: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
- echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
- 
- test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
-@@ -1133,7 +1139,7 @@
- # Check whether --with-rel-version or --without-rel-version was given.
- if test "${with_rel_version+set}" = set; then
-   withval="$with_rel_version"
--  { echo "$as_me:1136: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
-+  { echo "$as_me:1142: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
- echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
-  cf_cv_rel_version=$withval
- fi;
-@@ -1146,13 +1152,13 @@
-   [0-9]*) #(vi
-  	;;
-   *)
--	{ { echo "$as_me:1149: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
-+	{ { echo "$as_me:1155: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
- echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
-    { (exit 1); exit 1; }; }
-  	;;
-   esac
- else
--  { { echo "$as_me:1155: error: Release major-version value is empty" >&5
-+  { { echo "$as_me:1161: error: Release major-version value is empty" >&5
- echo "$as_me: error: Release major-version value is empty" >&2;}
-    { (exit 1); exit 1; }; }
- fi
-@@ -1162,13 +1168,13 @@
-   [0-9]*) #(vi
-  	;;
-   *)
--	{ { echo "$as_me:1165: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
-+	{ { echo "$as_me:1171: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
- echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
-    { (exit 1); exit 1; }; }
-  	;;
-   esac
- else
--  { { echo "$as_me:1171: error: Release minor-version value is empty" >&5
-+  { { echo "$as_me:1177: error: Release minor-version value is empty" >&5
- echo "$as_me: error: Release minor-version value is empty" >&2;}
-    { (exit 1); exit 1; }; }
- fi
-@@ -1178,7 +1184,7 @@
- # Check whether --with-abi-version or --without-abi-version was given.
- if test "${with_abi_version+set}" = set; then
-   withval="$with_abi_version"
--  { echo "$as_me:1181: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
-+  { echo "$as_me:1187: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
- echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
-  cf_cv_abi_version=$withval
- fi;
-@@ -1188,13 +1194,13 @@
-   [0-9]*) #(vi
-  	;;
-   *)
--	{ { echo "$as_me:1191: error: ABI version is not a number: $cf_cv_abi_version" >&5
-+	{ { echo "$as_me:1197: error: ABI version is not a number: $cf_cv_abi_version" >&5
- echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
-    { (exit 1); exit 1; }; }
-  	;;
-   esac
- else
--  { { echo "$as_me:1197: error: ABI version value is empty" >&5
-+  { { echo "$as_me:1203: error: ABI version value is empty" >&5
- echo "$as_me: error: ABI version value is empty" >&2;}
-    { (exit 1); exit 1; }; }
- fi
-@@ -1216,7 +1222,7 @@
-   fi
- done
- if test -z "$ac_aux_dir"; then
--  { { echo "$as_me:1219: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
-+  { { echo "$as_me:1225: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
- echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
-    { (exit 1); exit 1; }; }
- fi
-@@ -1226,11 +1232,11 @@
- 
- # Make sure we can run config.sub.
- $ac_config_sub sun4 >/dev/null 2>&1 ||
--  { { echo "$as_me:1229: error: cannot run $ac_config_sub" >&5
-+  { { echo "$as_me:1235: error: cannot run $ac_config_sub" >&5
- echo "$as_me: error: cannot run $ac_config_sub" >&2;}
-    { (exit 1); exit 1; }; }
- 
--echo "$as_me:1233: checking build system type" >&5
-+echo "$as_me:1239: checking build system type" >&5
- echo $ECHO_N "checking build system type... $ECHO_C" >&6
- if test "${ac_cv_build+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -1239,23 +1245,23 @@
- test -z "$ac_cv_build_alias" &&
-   ac_cv_build_alias=`$ac_config_guess`
- test -z "$ac_cv_build_alias" &&
--  { { echo "$as_me:1242: error: cannot guess build type; you must specify one" >&5
-+  { { echo "$as_me:1248: error: cannot guess build type; you must specify one" >&5
- echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
-    { (exit 1); exit 1; }; }
- ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
--  { { echo "$as_me:1246: error: $ac_config_sub $ac_cv_build_alias failed." >&5
-+  { { echo "$as_me:1252: error: $ac_config_sub $ac_cv_build_alias failed." >&5
- echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
-    { (exit 1); exit 1; }; }
- 
- fi
--echo "$as_me:1251: result: $ac_cv_build" >&5
-+echo "$as_me:1257: result: $ac_cv_build" >&5
- echo "${ECHO_T}$ac_cv_build" >&6
- build=$ac_cv_build
- build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
- build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
- build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
- 
--echo "$as_me:1258: checking host system type" >&5
-+echo "$as_me:1264: checking host system type" >&5
- echo $ECHO_N "checking host system type... $ECHO_C" >&6
- if test "${ac_cv_host+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -1264,12 +1270,12 @@
- test -z "$ac_cv_host_alias" &&
-   ac_cv_host_alias=$ac_cv_build_alias
- ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
--  { { echo "$as_me:1267: error: $ac_config_sub $ac_cv_host_alias failed" >&5
-+  { { echo "$as_me:1273: error: $ac_config_sub $ac_cv_host_alias failed" >&5
- echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
-    { (exit 1); exit 1; }; }
- 
- fi
--echo "$as_me:1272: result: $ac_cv_host" >&5
-+echo "$as_me:1278: result: $ac_cv_host" >&5
- echo "${ECHO_T}$ac_cv_host" >&6
- host=$ac_cv_host
- host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-@@ -1277,7 +1283,7 @@
- host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
- 
- if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
--	echo "$as_me:1280: checking target system type" >&5
-+	echo "$as_me:1286: checking target system type" >&5
- echo $ECHO_N "checking target system type... $ECHO_C" >&6
- if test "${ac_cv_target+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -1286,12 +1292,12 @@
- test "x$ac_cv_target_alias" = "x" &&
-   ac_cv_target_alias=$ac_cv_host_alias
- ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
--  { { echo "$as_me:1289: error: $ac_config_sub $ac_cv_target_alias failed" >&5
-+  { { echo "$as_me:1295: error: $ac_config_sub $ac_cv_target_alias failed" >&5
- echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
-    { (exit 1); exit 1; }; }
- 
- fi
--echo "$as_me:1294: result: $ac_cv_target" >&5
-+echo "$as_me:1300: result: $ac_cv_target" >&5
- echo "${ECHO_T}$ac_cv_target" >&6
- target=$ac_cv_target
- target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-@@ -1322,13 +1328,13 @@
- fi
- 
- test -z "$system_name" && system_name="$cf_cv_system_name"
--test -n "$cf_cv_system_name" && echo "$as_me:1325: result: Configuring for $cf_cv_system_name" >&5
-+test -n "$cf_cv_system_name" && echo "$as_me:1331: result: Configuring for $cf_cv_system_name" >&5
- echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
- 
- if test ".$system_name" != ".$cf_cv_system_name" ; then
--	echo "$as_me:1329: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
-+	echo "$as_me:1335: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
- echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
--	{ { echo "$as_me:1331: error: \"Please remove config.cache and try again.\"" >&5
-+	{ { echo "$as_me:1337: error: \"Please remove config.cache and try again.\"" >&5
- echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
-    { (exit 1); exit 1; }; }
- fi
-@@ -1336,7 +1342,7 @@
- # Check whether --with-system-type or --without-system-type was given.
- if test "${with_system_type+set}" = set; then
-   withval="$with_system_type"
--  { echo "$as_me:1339: WARNING: overriding system type to $withval" >&5
-+  { echo "$as_me:1345: WARNING: overriding system type to $withval" >&5
- echo "$as_me: WARNING: overriding system type to $withval" >&2;}
-  cf_cv_system_name=$withval
- fi;
-@@ -1346,7 +1352,7 @@
- 
- ###	Default install-location
- 
--echo "$as_me:1349: checking for prefix" >&5
-+echo "$as_me:1355: checking for prefix" >&5
- echo $ECHO_N "checking for prefix... $ECHO_C" >&6
- if test "x$prefix" = "xNONE" ; then
- 	case "$cf_cv_system_name" in
-@@ -1358,11 +1364,11 @@
- 		;;
- 	esac
- fi
--echo "$as_me:1361: result: $prefix" >&5
-+echo "$as_me:1367: result: $prefix" >&5
- echo "${ECHO_T}$prefix" >&6
- 
- if test "x$prefix" = "xNONE" ; then
--echo "$as_me:1365: checking for default include-directory" >&5
-+echo "$as_me:1371: checking for default include-directory" >&5
- echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
- test -n "$verbose" && echo 1>&6
- for cf_symbol in \
-@@ -1385,7 +1391,7 @@
- 	fi
- 	test -n "$verbose"  && echo "	tested $cf_dir" 1>&6
- done
--echo "$as_me:1388: result: $includedir" >&5
-+echo "$as_me:1394: result: $includedir" >&5
- echo "${ECHO_T}$includedir" >&6
- fi
- 
-@@ -1399,7 +1405,7 @@
- if test -n "$ac_tool_prefix"; then
-   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
- set dummy ${ac_tool_prefix}gcc; ac_word=$2
--echo "$as_me:1402: checking for $ac_word" >&5
-+echo "$as_me:1408: checking for $ac_word" >&5
- echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- if test "${ac_cv_prog_CC+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -1414,7 +1420,7 @@
-   test -z "$ac_dir" && ac_dir=.
-   $as_executable_p "$ac_dir/$ac_word" || continue
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
--echo "$as_me:1417: found $ac_dir/$ac_word" >&5
-+echo "$as_me:1423: found $ac_dir/$ac_word" >&5
- break
- done
- 
-@@ -1422,10 +1428,10 @@
- fi
- CC=$ac_cv_prog_CC
- if test -n "$CC"; then
--  echo "$as_me:1425: result: $CC" >&5
-+  echo "$as_me:1431: result: $CC" >&5
- echo "${ECHO_T}$CC" >&6
- else
--  echo "$as_me:1428: result: no" >&5
-+  echo "$as_me:1434: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
-@@ -1434,7 +1440,7 @@
-   ac_ct_CC=$CC
-   # Extract the first word of "gcc", so it can be a program name with args.
- set dummy gcc; ac_word=$2
--echo "$as_me:1437: checking for $ac_word" >&5
-+echo "$as_me:1443: checking for $ac_word" >&5
- echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -1449,7 +1455,7 @@
-   test -z "$ac_dir" && ac_dir=.
-   $as_executable_p "$ac_dir/$ac_word" || continue
- ac_cv_prog_ac_ct_CC="gcc"
--echo "$as_me:1452: found $ac_dir/$ac_word" >&5
-+echo "$as_me:1458: found $ac_dir/$ac_word" >&5
- break
- done
- 
-@@ -1457,10 +1463,10 @@
- fi
- ac_ct_CC=$ac_cv_prog_ac_ct_CC
- if test -n "$ac_ct_CC"; then
--  echo "$as_me:1460: result: $ac_ct_CC" >&5
-+  echo "$as_me:1466: result: $ac_ct_CC" >&5
- echo "${ECHO_T}$ac_ct_CC" >&6
- else
--  echo "$as_me:1463: result: no" >&5
-+  echo "$as_me:1469: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
-@@ -1473,7 +1479,7 @@
-   if test -n "$ac_tool_prefix"; then
-   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
- set dummy ${ac_tool_prefix}cc; ac_word=$2
--echo "$as_me:1476: checking for $ac_word" >&5
-+echo "$as_me:1482: checking for $ac_word" >&5
- echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- if test "${ac_cv_prog_CC+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -1488,7 +1494,7 @@
-   test -z "$ac_dir" && ac_dir=.
-   $as_executable_p "$ac_dir/$ac_word" || continue
- ac_cv_prog_CC="${ac_tool_prefix}cc"
--echo "$as_me:1491: found $ac_dir/$ac_word" >&5
-+echo "$as_me:1497: found $ac_dir/$ac_word" >&5
- break
- done
- 
-@@ -1496,10 +1502,10 @@
- fi
- CC=$ac_cv_prog_CC
- if test -n "$CC"; then
--  echo "$as_me:1499: result: $CC" >&5
-+  echo "$as_me:1505: result: $CC" >&5
- echo "${ECHO_T}$CC" >&6
- else
--  echo "$as_me:1502: result: no" >&5
-+  echo "$as_me:1508: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
-@@ -1508,7 +1514,7 @@
-   ac_ct_CC=$CC
-   # Extract the first word of "cc", so it can be a program name with args.
- set dummy cc; ac_word=$2
--echo "$as_me:1511: checking for $ac_word" >&5
-+echo "$as_me:1517: checking for $ac_word" >&5
- echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -1523,7 +1529,7 @@
-   test -z "$ac_dir" && ac_dir=.
-   $as_executable_p "$ac_dir/$ac_word" || continue
- ac_cv_prog_ac_ct_CC="cc"
--echo "$as_me:1526: found $ac_dir/$ac_word" >&5
-+echo "$as_me:1532: found $ac_dir/$ac_word" >&5
- break
- done
- 
-@@ -1531,10 +1537,10 @@
- fi
- ac_ct_CC=$ac_cv_prog_ac_ct_CC
- if test -n "$ac_ct_CC"; then
--  echo "$as_me:1534: result: $ac_ct_CC" >&5
-+  echo "$as_me:1540: result: $ac_ct_CC" >&5
- echo "${ECHO_T}$ac_ct_CC" >&6
- else
--  echo "$as_me:1537: result: no" >&5
-+  echo "$as_me:1543: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
-@@ -1547,7 +1553,7 @@
- if test -z "$CC"; then
-   # Extract the first word of "cc", so it can be a program name with args.
- set dummy cc; ac_word=$2
--echo "$as_me:1550: checking for $ac_word" >&5
-+echo "$as_me:1556: checking for $ac_word" >&5
- echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- if test "${ac_cv_prog_CC+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -1567,7 +1573,7 @@
-   continue
- fi
- ac_cv_prog_CC="cc"
--echo "$as_me:1570: found $ac_dir/$ac_word" >&5
-+echo "$as_me:1576: found $ac_dir/$ac_word" >&5
- break
- done
- 
-@@ -1589,10 +1595,10 @@
- fi
- CC=$ac_cv_prog_CC
- if test -n "$CC"; then
--  echo "$as_me:1592: result: $CC" >&5
-+  echo "$as_me:1598: result: $CC" >&5
- echo "${ECHO_T}$CC" >&6
- else
--  echo "$as_me:1595: result: no" >&5
-+  echo "$as_me:1601: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
-@@ -1603,7 +1609,7 @@
-   do
-     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
- set dummy $ac_tool_prefix$ac_prog; ac_word=$2
--echo "$as_me:1606: checking for $ac_word" >&5
-+echo "$as_me:1612: checking for $ac_word" >&5
- echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- if test "${ac_cv_prog_CC+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -1618,7 +1624,7 @@
-   test -z "$ac_dir" && ac_dir=.
-   $as_executable_p "$ac_dir/$ac_word" || continue
- ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
--echo "$as_me:1621: found $ac_dir/$ac_word" >&5
-+echo "$as_me:1627: found $ac_dir/$ac_word" >&5
- break
- done
- 
-@@ -1626,10 +1632,10 @@
- fi
- CC=$ac_cv_prog_CC
- if test -n "$CC"; then
--  echo "$as_me:1629: result: $CC" >&5
-+  echo "$as_me:1635: result: $CC" >&5
- echo "${ECHO_T}$CC" >&6
- else
--  echo "$as_me:1632: result: no" >&5
-+  echo "$as_me:1638: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
-@@ -1642,7 +1648,7 @@
- do
-   # Extract the first word of "$ac_prog", so it can be a program name with args.
- set dummy $ac_prog; ac_word=$2
--echo "$as_me:1645: checking for $ac_word" >&5
-+echo "$as_me:1651: checking for $ac_word" >&5
- echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -1657,7 +1663,7 @@
-   test -z "$ac_dir" && ac_dir=.
-   $as_executable_p "$ac_dir/$ac_word" || continue
- ac_cv_prog_ac_ct_CC="$ac_prog"
--echo "$as_me:1660: found $ac_dir/$ac_word" >&5
-+echo "$as_me:1666: found $ac_dir/$ac_word" >&5
- break
- done
- 
-@@ -1665,10 +1671,10 @@
- fi
- ac_ct_CC=$ac_cv_prog_ac_ct_CC
- if test -n "$ac_ct_CC"; then
--  echo "$as_me:1668: result: $ac_ct_CC" >&5
-+  echo "$as_me:1674: result: $ac_ct_CC" >&5
- echo "${ECHO_T}$ac_ct_CC" >&6
- else
--  echo "$as_me:1671: result: no" >&5
-+  echo "$as_me:1677: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
-@@ -1680,32 +1686,32 @@
- 
- fi
- 
--test -z "$CC" && { { echo "$as_me:1683: error: no acceptable cc found in \$PATH" >&5
-+test -z "$CC" && { { echo "$as_me:1689: error: no acceptable cc found in \$PATH" >&5
- echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
-    { (exit 1); exit 1; }; }
- 
- # Provide some information about the compiler.
--echo "$as_me:1688:" \
-+echo "$as_me:1694:" \
-      "checking for C compiler version" >&5
- ac_compiler=`set X $ac_compile; echo $2`
--{ (eval echo "$as_me:1691: \"$ac_compiler --version </dev/null >&5\"") >&5
-+{ (eval echo "$as_me:1697: \"$ac_compiler --version </dev/null >&5\"") >&5
-   (eval $ac_compiler --version </dev/null >&5) 2>&5
-   ac_status=$?
--  echo "$as_me:1694: \$? = $ac_status" >&5
-+  echo "$as_me:1700: \$? = $ac_status" >&5
-   (exit $ac_status); }
--{ (eval echo "$as_me:1696: \"$ac_compiler -v </dev/null >&5\"") >&5
-+{ (eval echo "$as_me:1702: \"$ac_compiler -v </dev/null >&5\"") >&5
-   (eval $ac_compiler -v </dev/null >&5) 2>&5
-   ac_status=$?
--  echo "$as_me:1699: \$? = $ac_status" >&5
-+  echo "$as_me:1705: \$? = $ac_status" >&5
-   (exit $ac_status); }
--{ (eval echo "$as_me:1701: \"$ac_compiler -V </dev/null >&5\"") >&5
-+{ (eval echo "$as_me:1707: \"$ac_compiler -V </dev/null >&5\"") >&5
-   (eval $ac_compiler -V </dev/null >&5) 2>&5
-   ac_status=$?
--  echo "$as_me:1704: \$? = $ac_status" >&5
-+  echo "$as_me:1710: \$? = $ac_status" >&5
-   (exit $ac_status); }
- 
- cat >conftest.$ac_ext <<_ACEOF
--#line 1708 "configure"
-+#line 1714 "configure"
- #include "confdefs.h"
- 
- int
-@@ -1721,13 +1727,13 @@
- # Try to create an executable without -o first, disregard a.out.
- # It will help us diagnose broken compilers, and finding out an intuition
- # of exeext.
--echo "$as_me:1724: checking for C compiler default output" >&5
-+echo "$as_me:1730: checking for C compiler default output" >&5
- echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
- ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
--if { (eval echo "$as_me:1727: \"$ac_link_default\"") >&5
-+if { (eval echo "$as_me:1733: \"$ac_link_default\"") >&5
-   (eval $ac_link_default) 2>&5
-   ac_status=$?
--  echo "$as_me:1730: \$? = $ac_status" >&5
-+  echo "$as_me:1736: \$? = $ac_status" >&5
-   (exit $ac_status); }; then
-   # Find the output, starting from the most likely.  This scheme is
- # not robust to junk in `.', hence go to wildcards (a.*) only as a last
-@@ -1736,7 +1742,7 @@
-                 ls a.out conftest 2>/dev/null;
-                 ls a.* conftest.* 2>/dev/null`; do
-   case $ac_file in
--    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
-+    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
-     a.out ) # We found the default executable, but exeext='' is most
-             # certainly right.
-             break;;
-@@ -1750,34 +1756,34 @@
- else
-   echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
--{ { echo "$as_me:1753: error: C compiler cannot create executables" >&5
-+{ { echo "$as_me:1759: error: C compiler cannot create executables" >&5
- echo "$as_me: error: C compiler cannot create executables" >&2;}
-    { (exit 77); exit 77; }; }
- fi
- 
- ac_exeext=$ac_cv_exeext
--echo "$as_me:1759: result: $ac_file" >&5
-+echo "$as_me:1765: result: $ac_file" >&5
- echo "${ECHO_T}$ac_file" >&6
- 
- # Check the compiler produces executables we can run.  If not, either
- # the compiler is broken, or we cross compile.
--echo "$as_me:1764: checking whether the C compiler works" >&5
-+echo "$as_me:1770: checking whether the C compiler works" >&5
- echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
- # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
- # If not cross compiling, check that we can run a simple program.
- if test "$cross_compiling" != yes; then
-   if { ac_try='./$ac_file'
--  { (eval echo "$as_me:1770: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:1776: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:1773: \$? = $ac_status" >&5
-+  echo "$as_me:1779: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-     cross_compiling=no
-   else
-     if test "$cross_compiling" = maybe; then
- 	cross_compiling=yes
-     else
--	{ { echo "$as_me:1780: error: cannot run C compiled programs.
-+	{ { echo "$as_me:1786: error: cannot run C compiled programs.
- If you meant to cross compile, use \`--host'." >&5
- echo "$as_me: error: cannot run C compiled programs.
- If you meant to cross compile, use \`--host'." >&2;}
-@@ -1785,24 +1791,24 @@
-     fi
-   fi
- fi
--echo "$as_me:1788: result: yes" >&5
-+echo "$as_me:1794: result: yes" >&5
- echo "${ECHO_T}yes" >&6
- 
- rm -f a.out a.exe conftest$ac_cv_exeext
- ac_clean_files=$ac_clean_files_save
- # Check the compiler produces executables we can run.  If not, either
- # the compiler is broken, or we cross compile.
--echo "$as_me:1795: checking whether we are cross compiling" >&5
-+echo "$as_me:1801: checking whether we are cross compiling" >&5
- echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
--echo "$as_me:1797: result: $cross_compiling" >&5
-+echo "$as_me:1803: result: $cross_compiling" >&5
- echo "${ECHO_T}$cross_compiling" >&6
- 
--echo "$as_me:1800: checking for executable suffix" >&5
-+echo "$as_me:1806: checking for executable suffix" >&5
- echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
--if { (eval echo "$as_me:1802: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:1808: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:1805: \$? = $ac_status" >&5
-+  echo "$as_me:1811: \$? = $ac_status" >&5
-   (exit $ac_status); }; then
-   # If both `conftest.exe' and `conftest' are `present' (well, observable)
- # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
-@@ -1810,7 +1816,7 @@
- # `rm'.
- for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
-   case $ac_file in
--    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
-+    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
-     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-           export ac_cv_exeext
-           break;;
-@@ -1818,25 +1824,25 @@
-   esac
- done
- else
--  { { echo "$as_me:1821: error: cannot compute EXEEXT: cannot compile and link" >&5
-+  { { echo "$as_me:1827: error: cannot compute EXEEXT: cannot compile and link" >&5
- echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
-    { (exit 1); exit 1; }; }
- fi
- 
- rm -f conftest$ac_cv_exeext
--echo "$as_me:1827: result: $ac_cv_exeext" >&5
-+echo "$as_me:1833: result: $ac_cv_exeext" >&5
- echo "${ECHO_T}$ac_cv_exeext" >&6
- 
- rm -f conftest.$ac_ext
- EXEEXT=$ac_cv_exeext
- ac_exeext=$EXEEXT
--echo "$as_me:1833: checking for object suffix" >&5
-+echo "$as_me:1839: checking for object suffix" >&5
- echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
- if test "${ac_cv_objext+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 1839 "configure"
-+#line 1845 "configure"
- #include "confdefs.h"
- 
- int
-@@ -1848,14 +1854,14 @@
- }
- _ACEOF
- rm -f conftest.o conftest.obj
--if { (eval echo "$as_me:1851: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:1857: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:1854: \$? = $ac_status" >&5
-+  echo "$as_me:1860: \$? = $ac_status" >&5
-   (exit $ac_status); }; then
-   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
-   case $ac_file in
--    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
-+    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
-     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
-        break;;
-   esac
-@@ -1863,24 +1869,24 @@
- else
-   echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
--{ { echo "$as_me:1866: error: cannot compute OBJEXT: cannot compile" >&5
-+{ { echo "$as_me:1872: error: cannot compute OBJEXT: cannot compile" >&5
- echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
-    { (exit 1); exit 1; }; }
- fi
- 
- rm -f conftest.$ac_cv_objext conftest.$ac_ext
- fi
--echo "$as_me:1873: result: $ac_cv_objext" >&5
-+echo "$as_me:1879: result: $ac_cv_objext" >&5
- echo "${ECHO_T}$ac_cv_objext" >&6
- OBJEXT=$ac_cv_objext
- ac_objext=$OBJEXT
--echo "$as_me:1877: checking whether we are using the GNU C compiler" >&5
-+echo "$as_me:1883: checking whether we are using the GNU C compiler" >&5
- echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
- if test "${ac_cv_c_compiler_gnu+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 1883 "configure"
-+#line 1889 "configure"
- #include "confdefs.h"
- 
- int
-@@ -1895,16 +1901,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:1898: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:1904: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:1901: \$? = $ac_status" >&5
-+  echo "$as_me:1907: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:1904: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:1910: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:1907: \$? = $ac_status" >&5
-+  echo "$as_me:1913: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_compiler_gnu=yes
- else
-@@ -1916,19 +1922,19 @@
- ac_cv_c_compiler_gnu=$ac_compiler_gnu
- 
- fi
--echo "$as_me:1919: result: $ac_cv_c_compiler_gnu" >&5
-+echo "$as_me:1925: result: $ac_cv_c_compiler_gnu" >&5
- echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
- GCC=`test $ac_compiler_gnu = yes && echo yes`
- ac_test_CFLAGS=${CFLAGS+set}
- ac_save_CFLAGS=$CFLAGS
- CFLAGS="-g"
--echo "$as_me:1925: checking whether $CC accepts -g" >&5
-+echo "$as_me:1931: checking whether $CC accepts -g" >&5
- echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
- if test "${ac_cv_prog_cc_g+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 1931 "configure"
-+#line 1937 "configure"
- #include "confdefs.h"
- 
- int
-@@ -1940,16 +1946,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:1943: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:1949: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:1946: \$? = $ac_status" >&5
-+  echo "$as_me:1952: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:1949: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:1955: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:1952: \$? = $ac_status" >&5
-+  echo "$as_me:1958: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_prog_cc_g=yes
- else
-@@ -1959,7 +1965,7 @@
- fi
- rm -f conftest.$ac_objext conftest.$ac_ext
- fi
--echo "$as_me:1962: result: $ac_cv_prog_cc_g" >&5
-+echo "$as_me:1968: result: $ac_cv_prog_cc_g" >&5
- echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
- if test "$ac_test_CFLAGS" = set; then
-   CFLAGS=$ac_save_CFLAGS
-@@ -1986,16 +1992,16 @@
- #endif
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:1989: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:1995: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:1992: \$? = $ac_status" >&5
-+  echo "$as_me:1998: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:1995: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:2001: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:1998: \$? = $ac_status" >&5
-+  echo "$as_me:2004: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   for ac_declaration in \
-    ''\
-@@ -2007,7 +2013,7 @@
-    'void exit (int);'
- do
-   cat >conftest.$ac_ext <<_ACEOF
--#line 2010 "configure"
-+#line 2016 "configure"
- #include "confdefs.h"
- #include <stdlib.h>
- $ac_declaration
-@@ -2020,16 +2026,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:2023: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:2029: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:2026: \$? = $ac_status" >&5
-+  echo "$as_me:2032: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:2029: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:2035: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:2032: \$? = $ac_status" >&5
-+  echo "$as_me:2038: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   :
- else
-@@ -2039,7 +2045,7 @@
- fi
- rm -f conftest.$ac_objext conftest.$ac_ext
-   cat >conftest.$ac_ext <<_ACEOF
--#line 2042 "configure"
-+#line 2048 "configure"
- #include "confdefs.h"
- $ac_declaration
- int
-@@ -2051,16 +2057,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:2054: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:2060: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:2057: \$? = $ac_status" >&5
-+  echo "$as_me:2063: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:2060: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:2066: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:2063: \$? = $ac_status" >&5
-+  echo "$as_me:2069: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   break
- else
-@@ -2090,11 +2096,11 @@
- 
- GCC_VERSION=none
- if test "$GCC" = yes ; then
--	echo "$as_me:2093: checking version of $CC" >&5
-+	echo "$as_me:2099: checking version of $CC" >&5
- echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
- 	GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
- 	test -z "$GCC_VERSION" && GCC_VERSION=unknown
--	echo "$as_me:2097: result: $GCC_VERSION" >&5
-+	echo "$as_me:2103: result: $GCC_VERSION" >&5
- echo "${ECHO_T}$GCC_VERSION" >&6
- fi
- 
-@@ -2104,7 +2110,7 @@
- ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- ac_compiler_gnu=$ac_cv_c_compiler_gnu
- ac_main_return=return
--echo "$as_me:2107: checking how to run the C preprocessor" >&5
-+echo "$as_me:2113: checking how to run the C preprocessor" >&5
- echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
- # On Suns, sometimes $CPP names a directory.
- if test -n "$CPP" && test -d "$CPP"; then
-@@ -2125,18 +2131,18 @@
-   # On the NeXT, cc -E runs the code through the compiler's parser,
-   # not just through cpp. "Syntax error" is here to catch this case.
-   cat >conftest.$ac_ext <<_ACEOF
--#line 2128 "configure"
-+#line 2134 "configure"
- #include "confdefs.h"
- #include <assert.h>
-                      Syntax error
- _ACEOF
--if { (eval echo "$as_me:2133: \"$ac_cpp conftest.$ac_ext\"") >&5
-+if { (eval echo "$as_me:2139: \"$ac_cpp conftest.$ac_ext\"") >&5
-   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-   ac_status=$?
-   egrep -v '^ *\+' conftest.er1 >conftest.err
-   rm -f conftest.er1
-   cat conftest.err >&5
--  echo "$as_me:2139: \$? = $ac_status" >&5
-+  echo "$as_me:2145: \$? = $ac_status" >&5
-   (exit $ac_status); } >/dev/null; then
-   if test -s conftest.err; then
-     ac_cpp_err=$ac_c_preproc_warn_flag
-@@ -2159,17 +2165,17 @@
-   # OK, works on sane cases.  Now check whether non-existent headers
-   # can be detected and how.
-   cat >conftest.$ac_ext <<_ACEOF
--#line 2162 "configure"
-+#line 2168 "configure"
- #include "confdefs.h"
- #include <ac_nonexistent.h>
- _ACEOF
--if { (eval echo "$as_me:2166: \"$ac_cpp conftest.$ac_ext\"") >&5
-+if { (eval echo "$as_me:2172: \"$ac_cpp conftest.$ac_ext\"") >&5
-   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-   ac_status=$?
-   egrep -v '^ *\+' conftest.er1 >conftest.err
-   rm -f conftest.er1
-   cat conftest.err >&5
--  echo "$as_me:2172: \$? = $ac_status" >&5
-+  echo "$as_me:2178: \$? = $ac_status" >&5
-   (exit $ac_status); } >/dev/null; then
-   if test -s conftest.err; then
-     ac_cpp_err=$ac_c_preproc_warn_flag
-@@ -2206,7 +2212,7 @@
- else
-   ac_cv_prog_CPP=$CPP
- fi
--echo "$as_me:2209: result: $CPP" >&5
-+echo "$as_me:2215: result: $CPP" >&5
- echo "${ECHO_T}$CPP" >&6
- ac_preproc_ok=false
- for ac_c_preproc_warn_flag in '' yes
-@@ -2216,18 +2222,18 @@
-   # On the NeXT, cc -E runs the code through the compiler's parser,
-   # not just through cpp. "Syntax error" is here to catch this case.
-   cat >conftest.$ac_ext <<_ACEOF
--#line 2219 "configure"
-+#line 2225 "configure"
- #include "confdefs.h"
- #include <assert.h>
-                      Syntax error
- _ACEOF
--if { (eval echo "$as_me:2224: \"$ac_cpp conftest.$ac_ext\"") >&5
-+if { (eval echo "$as_me:2230: \"$ac_cpp conftest.$ac_ext\"") >&5
-   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-   ac_status=$?
-   egrep -v '^ *\+' conftest.er1 >conftest.err
-   rm -f conftest.er1
-   cat conftest.err >&5
--  echo "$as_me:2230: \$? = $ac_status" >&5
-+  echo "$as_me:2236: \$? = $ac_status" >&5
-   (exit $ac_status); } >/dev/null; then
-   if test -s conftest.err; then
-     ac_cpp_err=$ac_c_preproc_warn_flag
-@@ -2250,17 +2256,17 @@
-   # OK, works on sane cases.  Now check whether non-existent headers
-   # can be detected and how.
-   cat >conftest.$ac_ext <<_ACEOF
--#line 2253 "configure"
-+#line 2259 "configure"
- #include "confdefs.h"
- #include <ac_nonexistent.h>
- _ACEOF
--if { (eval echo "$as_me:2257: \"$ac_cpp conftest.$ac_ext\"") >&5
-+if { (eval echo "$as_me:2263: \"$ac_cpp conftest.$ac_ext\"") >&5
-   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-   ac_status=$?
-   egrep -v '^ *\+' conftest.er1 >conftest.err
-   rm -f conftest.er1
-   cat conftest.err >&5
--  echo "$as_me:2263: \$? = $ac_status" >&5
-+  echo "$as_me:2269: \$? = $ac_status" >&5
-   (exit $ac_status); } >/dev/null; then
-   if test -s conftest.err; then
-     ac_cpp_err=$ac_c_preproc_warn_flag
-@@ -2288,7 +2294,7 @@
- if $ac_preproc_ok; then
-   :
- else
--  { { echo "$as_me:2291: error: C preprocessor \"$CPP\" fails sanity check" >&5
-+  { { echo "$as_me:2297: error: C preprocessor \"$CPP\" fails sanity check" >&5
- echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
-    { (exit 1); exit 1; }; }
- fi
-@@ -2301,14 +2307,14 @@
- ac_main_return=return
- 
- if test $ac_cv_c_compiler_gnu = yes; then
--    echo "$as_me:2304: checking whether $CC needs -traditional" >&5
-+    echo "$as_me:2310: checking whether $CC needs -traditional" >&5
- echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
- if test "${ac_cv_prog_gcc_traditional+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-     ac_pattern="Autoconf.*'x'"
-   cat >conftest.$ac_ext <<_ACEOF
--#line 2311 "configure"
-+#line 2317 "configure"
- #include "confdefs.h"
- #include <sgtty.h>
- int Autoconf = TIOCGETP;
-@@ -2323,7 +2329,7 @@
- 
-   if test $ac_cv_prog_gcc_traditional = no; then
-     cat >conftest.$ac_ext <<_ACEOF
--#line 2326 "configure"
-+#line 2332 "configure"
- #include "confdefs.h"
- #include <termio.h>
- int Autoconf = TCGETA;
-@@ -2336,14 +2342,14 @@
- 
-   fi
- fi
--echo "$as_me:2339: result: $ac_cv_prog_gcc_traditional" >&5
-+echo "$as_me:2345: result: $ac_cv_prog_gcc_traditional" >&5
- echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
-   if test $ac_cv_prog_gcc_traditional = yes; then
-     CC="$CC -traditional"
-   fi
- fi
- 
--echo "$as_me:2346: checking whether $CC understands -c and -o together" >&5
-+echo "$as_me:2352: checking whether $CC understands -c and -o together" >&5
- echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
- if test "${cf_cv_prog_CC_c_o+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -2359,15 +2365,15 @@
- # We do the test twice because some compilers refuse to overwrite an
- # existing .o file with -o, though they will create one.
- ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
--if { (eval echo "$as_me:2362: \"$ac_try\"") >&5
-+if { (eval echo "$as_me:2368: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:2365: \$? = $ac_status" >&5
-+  echo "$as_me:2371: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
--  test -f conftest2.$ac_objext && { (eval echo "$as_me:2367: \"$ac_try\"") >&5
-+  test -f conftest2.$ac_objext && { (eval echo "$as_me:2373: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:2370: \$? = $ac_status" >&5
-+  echo "$as_me:2376: \$? = $ac_status" >&5
-   (exit $ac_status); };
- then
-   eval cf_cv_prog_CC_c_o=yes
-@@ -2378,19 +2384,19 @@
- 
- fi
- if test $cf_cv_prog_CC_c_o = yes; then
--  echo "$as_me:2381: result: yes" >&5
-+  echo "$as_me:2387: result: yes" >&5
- echo "${ECHO_T}yes" >&6
- else
--  echo "$as_me:2384: result: no" >&5
-+  echo "$as_me:2390: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
--echo "$as_me:2388: checking for POSIXized ISC" >&5
-+echo "$as_me:2394: checking for POSIXized ISC" >&5
- echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
- if test -d /etc/conf/kconfig.d &&
-    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
- then
--  echo "$as_me:2393: result: yes" >&5
-+  echo "$as_me:2399: result: yes" >&5
- echo "${ECHO_T}yes" >&6
-   ISC=yes # If later tests want to check for ISC.
- 
-@@ -2404,12 +2410,12 @@
-     CC="$CC -Xp"
-   fi
- else
--  echo "$as_me:2407: result: no" >&5
-+  echo "$as_me:2413: result: no" >&5
- echo "${ECHO_T}no" >&6
-   ISC=
- fi
- 
--echo "$as_me:2412: checking for ${CC-cc} option to accept ANSI C" >&5
-+echo "$as_me:2418: checking for ${CC-cc} option to accept ANSI C" >&5
- echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
- if test "${cf_cv_ansi_cc+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -2494,7 +2500,7 @@
- 
- if test -n "$cf_new_cppflags" ; then
- 
--	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
-+	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
- fi
- 
- if test -n "$cf_new_extra_cppflags" ; then
-@@ -2503,7 +2509,7 @@
- fi
- 
- 	cat >conftest.$ac_ext <<_ACEOF
--#line 2506 "configure"
-+#line 2512 "configure"
- #include "confdefs.h"
- 
- #ifndef CC_HAS_PROTOS
-@@ -2524,16 +2530,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:2527: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:2533: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:2530: \$? = $ac_status" >&5
-+  echo "$as_me:2536: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:2533: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:2539: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:2536: \$? = $ac_status" >&5
-+  echo "$as_me:2542: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_ansi_cc="$cf_arg"; break
- else
-@@ -2546,7 +2552,7 @@
- CPPFLAGS="$cf_save_CPPFLAGS"
- 
- fi
--echo "$as_me:2549: result: $cf_cv_ansi_cc" >&5
-+echo "$as_me:2555: result: $cf_cv_ansi_cc" >&5
- echo "${ECHO_T}$cf_cv_ansi_cc" >&6
- 
- if test "$cf_cv_ansi_cc" != "no"; then
-@@ -2612,7 +2618,7 @@
- 
- if test -n "$cf_new_cppflags" ; then
- 
--	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
-+	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
- fi
- 
- if test -n "$cf_new_extra_cppflags" ; then
-@@ -2629,7 +2635,7 @@
- fi
- 
- if test "$cf_cv_ansi_cc" = "no"; then
--	{ { echo "$as_me:2632: error: Your compiler does not appear to recognize prototypes.
-+	{ { echo "$as_me:2638: error: Your compiler does not appear to recognize prototypes.
- You have the following choices:
- 	a. adjust your compiler options
- 	b. get an up-to-date compiler
-@@ -2663,13 +2669,13 @@
-   LDCONFIG=:
- else
- case "$cf_cv_system_name" in #(vi
--freebsd*) #(vi
-+dragonfly*|freebsd*) #(vi
-   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
-   ;;
- *) LDPATH=$PATH:/sbin:/usr/sbin
-   # Extract the first word of "ldconfig", so it can be a program name with args.
- set dummy ldconfig; ac_word=$2
--echo "$as_me:2672: checking for $ac_word" >&5
-+echo "$as_me:2678: checking for $ac_word" >&5
- echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- if test "${ac_cv_path_LDCONFIG+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -2686,7 +2692,7 @@
-   test -z "$ac_dir" && ac_dir=.
-   if $as_executable_p "$ac_dir/$ac_word"; then
-    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
--   echo "$as_me:2689: found $ac_dir/$ac_word" >&5
-+   echo "$as_me:2695: found $ac_dir/$ac_word" >&5
-    break
- fi
- done
-@@ -2697,10 +2703,10 @@
- LDCONFIG=$ac_cv_path_LDCONFIG
- 
- if test -n "$LDCONFIG"; then
--  echo "$as_me:2700: result: $LDCONFIG" >&5
-+  echo "$as_me:2706: result: $LDCONFIG" >&5
- echo "${ECHO_T}$LDCONFIG" >&6
- else
--  echo "$as_me:2703: result: no" >&5
-+  echo "$as_me:2709: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
-@@ -2708,7 +2714,7 @@
- esac
- fi
- 
--echo "$as_me:2711: checking if you want to ensure bool is consistent with C++" >&5
-+echo "$as_me:2717: checking if you want to ensure bool is consistent with C++" >&5
- echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
- 
- # Check whether --with-cxx or --without-cxx was given.
-@@ -2718,7 +2724,7 @@
- else
-   cf_with_cxx=yes
- fi;
--echo "$as_me:2721: result: $cf_with_cxx" >&5
-+echo "$as_me:2727: result: $cf_with_cxx" >&5
- echo "${ECHO_T}$cf_with_cxx" >&6
- if test "X$cf_with_cxx" = Xno ; then
- 	CXX=""
-@@ -2736,7 +2742,7 @@
-   do
-     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
- set dummy $ac_tool_prefix$ac_prog; ac_word=$2
--echo "$as_me:2739: checking for $ac_word" >&5
-+echo "$as_me:2745: checking for $ac_word" >&5
- echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- if test "${ac_cv_prog_CXX+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -2751,7 +2757,7 @@
-   test -z "$ac_dir" && ac_dir=.
-   $as_executable_p "$ac_dir/$ac_word" || continue
- ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
--echo "$as_me:2754: found $ac_dir/$ac_word" >&5
-+echo "$as_me:2760: found $ac_dir/$ac_word" >&5
- break
- done
- 
-@@ -2759,10 +2765,10 @@
- fi
- CXX=$ac_cv_prog_CXX
- if test -n "$CXX"; then
--  echo "$as_me:2762: result: $CXX" >&5
-+  echo "$as_me:2768: result: $CXX" >&5
- echo "${ECHO_T}$CXX" >&6
- else
--  echo "$as_me:2765: result: no" >&5
-+  echo "$as_me:2771: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
-@@ -2775,7 +2781,7 @@
- do
-   # Extract the first word of "$ac_prog", so it can be a program name with args.
- set dummy $ac_prog; ac_word=$2
--echo "$as_me:2778: checking for $ac_word" >&5
-+echo "$as_me:2784: checking for $ac_word" >&5
- echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -2790,7 +2796,7 @@
-   test -z "$ac_dir" && ac_dir=.
-   $as_executable_p "$ac_dir/$ac_word" || continue
- ac_cv_prog_ac_ct_CXX="$ac_prog"
--echo "$as_me:2793: found $ac_dir/$ac_word" >&5
-+echo "$as_me:2799: found $ac_dir/$ac_word" >&5
- break
- done
- 
-@@ -2798,10 +2804,10 @@
- fi
- ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
- if test -n "$ac_ct_CXX"; then
--  echo "$as_me:2801: result: $ac_ct_CXX" >&5
-+  echo "$as_me:2807: result: $ac_ct_CXX" >&5
- echo "${ECHO_T}$ac_ct_CXX" >&6
- else
--  echo "$as_me:2804: result: no" >&5
-+  echo "$as_me:2810: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
-@@ -2813,32 +2819,32 @@
- fi
- 
- # Provide some information about the compiler.
--echo "$as_me:2816:" \
-+echo "$as_me:2822:" \
-      "checking for C++ compiler version" >&5
- ac_compiler=`set X $ac_compile; echo $2`
--{ (eval echo "$as_me:2819: \"$ac_compiler --version </dev/null >&5\"") >&5
-+{ (eval echo "$as_me:2825: \"$ac_compiler --version </dev/null >&5\"") >&5
-   (eval $ac_compiler --version </dev/null >&5) 2>&5
-   ac_status=$?
--  echo "$as_me:2822: \$? = $ac_status" >&5
-+  echo "$as_me:2828: \$? = $ac_status" >&5
-   (exit $ac_status); }
--{ (eval echo "$as_me:2824: \"$ac_compiler -v </dev/null >&5\"") >&5
-+{ (eval echo "$as_me:2830: \"$ac_compiler -v </dev/null >&5\"") >&5
-   (eval $ac_compiler -v </dev/null >&5) 2>&5
-   ac_status=$?
--  echo "$as_me:2827: \$? = $ac_status" >&5
-+  echo "$as_me:2833: \$? = $ac_status" >&5
-   (exit $ac_status); }
--{ (eval echo "$as_me:2829: \"$ac_compiler -V </dev/null >&5\"") >&5
-+{ (eval echo "$as_me:2835: \"$ac_compiler -V </dev/null >&5\"") >&5
-   (eval $ac_compiler -V </dev/null >&5) 2>&5
-   ac_status=$?
--  echo "$as_me:2832: \$? = $ac_status" >&5
-+  echo "$as_me:2838: \$? = $ac_status" >&5
-   (exit $ac_status); }
- 
--echo "$as_me:2835: checking whether we are using the GNU C++ compiler" >&5
-+echo "$as_me:2841: checking whether we are using the GNU C++ compiler" >&5
- echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
- if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 2841 "configure"
-+#line 2847 "configure"
- #include "confdefs.h"
- 
- int
-@@ -2853,16 +2859,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:2856: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:2862: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:2859: \$? = $ac_status" >&5
-+  echo "$as_me:2865: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:2862: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:2868: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:2865: \$? = $ac_status" >&5
-+  echo "$as_me:2871: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_compiler_gnu=yes
- else
-@@ -2874,19 +2880,19 @@
- ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
- 
- fi
--echo "$as_me:2877: result: $ac_cv_cxx_compiler_gnu" >&5
-+echo "$as_me:2883: result: $ac_cv_cxx_compiler_gnu" >&5
- echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
- GXX=`test $ac_compiler_gnu = yes && echo yes`
- ac_test_CXXFLAGS=${CXXFLAGS+set}
- ac_save_CXXFLAGS=$CXXFLAGS
- CXXFLAGS="-g"
--echo "$as_me:2883: checking whether $CXX accepts -g" >&5
-+echo "$as_me:2889: checking whether $CXX accepts -g" >&5
- echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
- if test "${ac_cv_prog_cxx_g+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 2889 "configure"
-+#line 2895 "configure"
- #include "confdefs.h"
- 
- int
-@@ -2898,16 +2904,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:2901: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:2907: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:2904: \$? = $ac_status" >&5
-+  echo "$as_me:2910: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:2907: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:2913: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:2910: \$? = $ac_status" >&5
-+  echo "$as_me:2916: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_prog_cxx_g=yes
- else
-@@ -2917,7 +2923,7 @@
- fi
- rm -f conftest.$ac_objext conftest.$ac_ext
- fi
--echo "$as_me:2920: result: $ac_cv_prog_cxx_g" >&5
-+echo "$as_me:2926: result: $ac_cv_prog_cxx_g" >&5
- echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
- if test "$ac_test_CXXFLAGS" = set; then
-   CXXFLAGS=$ac_save_CXXFLAGS
-@@ -2944,7 +2950,7 @@
-    'void exit (int);'
- do
-   cat >conftest.$ac_ext <<_ACEOF
--#line 2947 "configure"
-+#line 2953 "configure"
- #include "confdefs.h"
- #include <stdlib.h>
- $ac_declaration
-@@ -2957,16 +2963,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:2960: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:2966: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:2963: \$? = $ac_status" >&5
-+  echo "$as_me:2969: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:2966: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:2972: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:2969: \$? = $ac_status" >&5
-+  echo "$as_me:2975: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   :
- else
-@@ -2976,7 +2982,7 @@
- fi
- rm -f conftest.$ac_objext conftest.$ac_ext
-   cat >conftest.$ac_ext <<_ACEOF
--#line 2979 "configure"
-+#line 2985 "configure"
- #include "confdefs.h"
- $ac_declaration
- int
-@@ -2988,16 +2994,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:2991: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:2997: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:2994: \$? = $ac_status" >&5
-+  echo "$as_me:3000: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:2997: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:3003: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:3000: \$? = $ac_status" >&5
-+  echo "$as_me:3006: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   break
- else
-@@ -3024,7 +3030,7 @@
- 	if test "$CXX" = "g++" ; then
- 		# Extract the first word of "g++", so it can be a program name with args.
- set dummy g++; ac_word=$2
--echo "$as_me:3027: checking for $ac_word" >&5
-+echo "$as_me:3033: checking for $ac_word" >&5
- echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- if test "${ac_cv_path_CXX+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -3041,7 +3047,7 @@
-   test -z "$ac_dir" && ac_dir=.
-   if $as_executable_p "$ac_dir/$ac_word"; then
-    ac_cv_path_CXX="$ac_dir/$ac_word"
--   echo "$as_me:3044: found $ac_dir/$ac_word" >&5
-+   echo "$as_me:3050: found $ac_dir/$ac_word" >&5
-    break
- fi
- done
-@@ -3052,16 +3058,16 @@
- CXX=$ac_cv_path_CXX
- 
- if test -n "$CXX"; then
--  echo "$as_me:3055: result: $CXX" >&5
-+  echo "$as_me:3061: result: $CXX" >&5
- echo "${ECHO_T}$CXX" >&6
- else
--  echo "$as_me:3058: result: no" >&5
-+  echo "$as_me:3064: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
- 	fi
- 	if test "$CXX" = "g++" ; then
--		{ echo "$as_me:3064: WARNING: ignoring hardcoded g++" >&5
-+		{ echo "$as_me:3070: WARNING: ignoring hardcoded g++" >&5
- echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
- 		cf_with_cxx=no; CXX=""; GXX="";
- 	fi
-@@ -3069,11 +3075,11 @@
- 
- GXX_VERSION=none
- if test "$GXX" = yes; then
--	echo "$as_me:3072: checking version of g++" >&5
-+	echo "$as_me:3078: checking version of g++" >&5
- echo $ECHO_N "checking version of g++... $ECHO_C" >&6
- 	GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
- 	test -z "$GXX_VERSION" && GXX_VERSION=unknown
--	echo "$as_me:3076: result: $GXX_VERSION" >&5
-+	echo "$as_me:3082: result: $GXX_VERSION" >&5
- echo "${ECHO_T}$GXX_VERSION" >&6
- fi
- 
-@@ -3081,12 +3087,12 @@
- 1*|2.[0-6]*)
- 	# GXX=""; CXX=""; ac_cv_prog_gxx=no
- 	# cf_cxx_library=no
--	{ echo "$as_me:3084: WARNING: templates do not work" >&5
-+	{ echo "$as_me:3090: WARNING: templates do not work" >&5
- echo "$as_me: WARNING: templates do not work" >&2;}
- 	;;
- esac
- 
--echo "$as_me:3089: checking if you want to build C++ binding and demo" >&5
-+echo "$as_me:3095: checking if you want to build C++ binding and demo" >&5
- echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
- 
- # Check whether --with-cxx-binding or --without-cxx-binding was given.
-@@ -3096,10 +3102,10 @@
- else
-   cf_with_cxx_binding=$cf_with_cxx
- fi;
--echo "$as_me:3099: result: $cf_with_cxx_binding" >&5
-+echo "$as_me:3105: result: $cf_with_cxx_binding" >&5
- echo "${ECHO_T}$cf_with_cxx_binding" >&6
- 
--echo "$as_me:3102: checking if you want to build with Ada95" >&5
-+echo "$as_me:3108: checking if you want to build with Ada95" >&5
- echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
- 
- # Check whether --with-ada or --without-ada was given.
-@@ -3109,10 +3115,23 @@
- else
-   cf_with_ada=yes
- fi;
--echo "$as_me:3112: result: $cf_with_ada" >&5
-+echo "$as_me:3118: result: $cf_with_ada" >&5
- echo "${ECHO_T}$cf_with_ada" >&6
- 
--echo "$as_me:3115: checking if you want to build programs such as tic" >&5
-+echo "$as_me:3121: checking if you want to install manpages" >&5
-+echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
-+
-+# Check whether --with-manpages or --without-manpages was given.
-+if test "${with_manpages+set}" = set; then
-+  withval="$with_manpages"
-+  cf_with_manpages=$withval
-+else
-+  cf_with_manpages=yes
-+fi;
-+echo "$as_me:3131: result: $cf_with_manpages" >&5
-+echo "${ECHO_T}$cf_with_manpages" >&6
-+
-+echo "$as_me:3134: checking if you want to build programs such as tic" >&5
- echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
- 
- # Check whether --with-progs or --without-progs was given.
-@@ -3122,10 +3141,10 @@
- else
-   cf_with_progs=yes
- fi;
--echo "$as_me:3125: result: $cf_with_progs" >&5
-+echo "$as_me:3144: result: $cf_with_progs" >&5
- echo "${ECHO_T}$cf_with_progs" >&6
- 
--echo "$as_me:3128: checking if you wish to install curses.h" >&5
-+echo "$as_me:3147: checking if you wish to install curses.h" >&5
- echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
- 
- # Check whether --with-curses-h or --without-curses-h was given.
-@@ -3135,7 +3154,7 @@
- else
-   with_curses_h=yes
- fi;
--echo "$as_me:3138: result: $with_curses_h" >&5
-+echo "$as_me:3157: result: $with_curses_h" >&5
- echo "${ECHO_T}$with_curses_h" >&6
- 
- modules_to_build="ncurses"
-@@ -3161,7 +3180,7 @@
- do
-   # Extract the first word of "$ac_prog", so it can be a program name with args.
- set dummy $ac_prog; ac_word=$2
--echo "$as_me:3164: checking for $ac_word" >&5
-+echo "$as_me:3183: checking for $ac_word" >&5
- echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- if test "${ac_cv_prog_AWK+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -3176,7 +3195,7 @@
-   test -z "$ac_dir" && ac_dir=.
-   $as_executable_p "$ac_dir/$ac_word" || continue
- ac_cv_prog_AWK="$ac_prog"
--echo "$as_me:3179: found $ac_dir/$ac_word" >&5
-+echo "$as_me:3198: found $ac_dir/$ac_word" >&5
- break
- done
- 
-@@ -3184,21 +3203,21 @@
- fi
- AWK=$ac_cv_prog_AWK
- if test -n "$AWK"; then
--  echo "$as_me:3187: result: $AWK" >&5
-+  echo "$as_me:3206: result: $AWK" >&5
- echo "${ECHO_T}$AWK" >&6
- else
--  echo "$as_me:3190: result: no" >&5
-+  echo "$as_me:3209: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
-   test -n "$AWK" && break
- done
- 
--test -z "$AWK" && { { echo "$as_me:3197: error: No awk program found" >&5
-+test -z "$AWK" && { { echo "$as_me:3216: error: No awk program found" >&5
- echo "$as_me: error: No awk program found" >&2;}
-    { (exit 1); exit 1; }; }
- 
--echo "$as_me:3201: checking for egrep" >&5
-+echo "$as_me:3220: checking for egrep" >&5
- echo $ECHO_N "checking for egrep... $ECHO_C" >&6
- if test "${ac_cv_prog_egrep+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -3208,11 +3227,11 @@
-     else ac_cv_prog_egrep='egrep'
-     fi
- fi
--echo "$as_me:3211: result: $ac_cv_prog_egrep" >&5
-+echo "$as_me:3230: result: $ac_cv_prog_egrep" >&5
- echo "${ECHO_T}$ac_cv_prog_egrep" >&6
-  EGREP=$ac_cv_prog_egrep
- 
--test -z "$EGREP" && { { echo "$as_me:3215: error: No egrep program found" >&5
-+test -z "$EGREP" && { { echo "$as_me:3234: error: No egrep program found" >&5
- echo "$as_me: error: No egrep program found" >&2;}
-    { (exit 1); exit 1; }; }
- 
-@@ -3228,7 +3247,7 @@
- # AFS /usr/afsws/bin/install, which mishandles nonexistent args
- # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
- # ./install, which can be erroneously created by make from ./install.sh.
--echo "$as_me:3231: checking for a BSD compatible install" >&5
-+echo "$as_me:3250: checking for a BSD compatible install" >&5
- echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
- if test -z "$INSTALL"; then
- if test "${ac_cv_path_install+set}" = set; then
-@@ -3277,7 +3296,7 @@
-     INSTALL=$ac_install_sh
-   fi
- fi
--echo "$as_me:3280: result: $INSTALL" >&5
-+echo "$as_me:3299: result: $INSTALL" >&5
- echo "${ECHO_T}$INSTALL" >&6
- 
- # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-@@ -3302,7 +3321,7 @@
- do
-   # Extract the first word of "$ac_prog", so it can be a program name with args.
- set dummy $ac_prog; ac_word=$2
--echo "$as_me:3305: checking for $ac_word" >&5
-+echo "$as_me:3324: checking for $ac_word" >&5
- echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- if test "${ac_cv_prog_LINT+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -3317,7 +3336,7 @@
-   test -z "$ac_dir" && ac_dir=.
-   $as_executable_p "$ac_dir/$ac_word" || continue
- ac_cv_prog_LINT="$ac_prog"
--echo "$as_me:3320: found $ac_dir/$ac_word" >&5
-+echo "$as_me:3339: found $ac_dir/$ac_word" >&5
- break
- done
- 
-@@ -3325,28 +3344,28 @@
- fi
- LINT=$ac_cv_prog_LINT
- if test -n "$LINT"; then
--  echo "$as_me:3328: result: $LINT" >&5
-+  echo "$as_me:3347: result: $LINT" >&5
- echo "${ECHO_T}$LINT" >&6
- else
--  echo "$as_me:3331: result: no" >&5
-+  echo "$as_me:3350: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
-   test -n "$LINT" && break
- done
- 
--echo "$as_me:3338: checking whether ln -s works" >&5
-+echo "$as_me:3357: checking whether ln -s works" >&5
- echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
- LN_S=$as_ln_s
- if test "$LN_S" = "ln -s"; then
--  echo "$as_me:3342: result: yes" >&5
-+  echo "$as_me:3361: result: yes" >&5
- echo "${ECHO_T}yes" >&6
- else
--  echo "$as_me:3345: result: no, using $LN_S" >&5
-+  echo "$as_me:3364: result: no, using $LN_S" >&5
- echo "${ECHO_T}no, using $LN_S" >&6
- fi
- 
--echo "$as_me:3349: checking for long file names" >&5
-+echo "$as_me:3368: checking for long file names" >&5
- echo $ECHO_N "checking for long file names... $ECHO_C" >&6
- if test "${ac_cv_sys_long_file_names+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -3385,7 +3404,7 @@
-   rm -rf $ac_xdir 2>/dev/null
- done
- fi
--echo "$as_me:3388: result: $ac_cv_sys_long_file_names" >&5
-+echo "$as_me:3407: result: $ac_cv_sys_long_file_names" >&5
- echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
- if test $ac_cv_sys_long_file_names = yes; then
- 
-@@ -3395,7 +3414,136 @@
- 
- fi
- 
--echo "$as_me:3398: checking if we should assume mixed-case filenames" >&5
-+# if we find pkg-config, check if we should install the ".pc" files.
-+
-+echo "$as_me:3419: checking if you want to use pkg-config" >&5
-+echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
-+
-+# Check whether --with-pkg-config or --without-pkg-config was given.
-+if test "${with_pkg_config+set}" = set; then
-+  withval="$with_pkg_config"
-+  cf_pkg_config=$withval
-+else
-+  cf_pkg_config=yes
-+fi;
-+echo "$as_me:3429: result: $cf_pkg_config" >&5
-+echo "${ECHO_T}$cf_pkg_config" >&6
-+
-+case $cf_pkg_config in #(vi
-+no) #(vi
-+	PKG_CONFIG=none
-+	;;
-+yes) #(vi
-+	# Extract the first word of "pkg-config", so it can be a program name with args.
-+set dummy pkg-config; ac_word=$2
-+echo "$as_me:3439: checking for $ac_word" >&5
-+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
-+  echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+  case $PKG_CONFIG in
-+  [\\/]* | ?:[\\/]*)
-+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
-+  ;;
-+  *)
-+  ac_save_IFS=$IFS; IFS=$ac_path_separator
-+ac_dummy="$PATH"
-+for ac_dir in $ac_dummy; do
-+  IFS=$ac_save_IFS
-+  test -z "$ac_dir" && ac_dir=.
-+  if $as_executable_p "$ac_dir/$ac_word"; then
-+   ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
-+   echo "$as_me:3456: found $ac_dir/$ac_word" >&5
-+   break
-+fi
-+done
-+
-+  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="none"
-+  ;;
-+esac
-+fi
-+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-+
-+if test -n "$PKG_CONFIG"; then
-+  echo "$as_me:3468: result: $PKG_CONFIG" >&5
-+echo "${ECHO_T}$PKG_CONFIG" >&6
-+else
-+  echo "$as_me:3471: result: no" >&5
-+echo "${ECHO_T}no" >&6
-+fi
-+
-+	;;
-+*)
-+	PKG_CONFIG=$withval
-+	;;
-+esac
-+
-+test -z "$PKG_CONFIG" && PKG_CONFIG=none
-+if test "$PKG_CONFIG" != none ; then
-+
-+if test "x$prefix" != xNONE; then
-+  cf_path_syntax="$prefix"
-+else
-+  cf_path_syntax="$ac_default_prefix"
-+fi
-+
-+case ".$PKG_CONFIG" in #(vi
-+.\$\(*\)*|.\'*\'*) #(vi
-+  ;;
-+..|./*|.\\*) #(vi
-+  ;;
-+.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
-+  ;;
-+.\${*prefix}*) #(vi
-+  eval PKG_CONFIG="$PKG_CONFIG"
-+  case ".$PKG_CONFIG" in #(vi
-+  .NONE/*)
-+    PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
-+    ;;
-+  esac
-+  ;; #(vi
-+.no|.NONE/*)
-+  PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
-+  ;;
-+*)
-+  { { echo "$as_me:3509: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
-+echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
-+   { (exit 1); exit 1; }; }
-+  ;;
-+esac
-+
-+fi
-+
-+if test "$PKG_CONFIG" != no ; then
-+	echo "$as_me:3518: checking if we should install .pc files for $PKG_CONFIG" >&5
-+echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
-+
-+	# Leave this as something that can be overridden in the environment.
-+	if test -z "$PKG_CONFIG_LIBDIR" ; then
-+		PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
-+	fi
-+
-+	if test -d "$PKG_CONFIG_LIBDIR" ; then
-+
-+# Check whether --enable-pc-files or --disable-pc-files was given.
-+if test "${enable_pc_files+set}" = set; then
-+  enableval="$enable_pc_files"
-+  enable_pc_files=$enableval
-+else
-+  enable_pc_files=no
-+fi;
-+		echo "$as_me:3535: result: $enable_pc_files" >&5
-+echo "${ECHO_T}$enable_pc_files" >&6
-+	else
-+		echo "$as_me:3538: result: no" >&5
-+echo "${ECHO_T}no" >&6
-+		{ echo "$as_me:3540: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
-+echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
-+		enable_pc_files=no
-+	fi
-+fi
-+
-+echo "$as_me:3546: checking if we should assume mixed-case filenames" >&5
- echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
- 
- # Check whether --enable-mixed-case or --disable-mixed-case was given.
-@@ -3405,11 +3553,11 @@
- else
-   enable_mixedcase=auto
- fi;
--echo "$as_me:3408: result: $enable_mixedcase" >&5
-+echo "$as_me:3556: result: $enable_mixedcase" >&5
- echo "${ECHO_T}$enable_mixedcase" >&6
- if test "$enable_mixedcase" = "auto" ; then
- 
--echo "$as_me:3412: checking if filesystem supports mixed-case filenames" >&5
-+echo "$as_me:3560: checking if filesystem supports mixed-case filenames" >&5
- echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
- if test "${cf_cv_mixedcase+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -3436,7 +3584,7 @@
- fi
- 
- fi
--echo "$as_me:3439: result: $cf_cv_mixedcase" >&5
-+echo "$as_me:3587: result: $cf_cv_mixedcase" >&5
- echo "${ECHO_T}$cf_cv_mixedcase" >&6
- test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
- #define MIXEDCASE_FILENAMES 1
-@@ -3453,7 +3601,7 @@
- fi
- 
- # do this after mixed-case option (tags/TAGS is not as important as tic).
--echo "$as_me:3456: checking whether ${MAKE-make} sets \${MAKE}" >&5
-+echo "$as_me:3604: checking whether ${MAKE-make} sets \${MAKE}" >&5
- echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
- set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
- if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
-@@ -3473,18 +3621,18 @@
- rm -f conftest.make
- fi
- if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
--  echo "$as_me:3476: result: yes" >&5
-+  echo "$as_me:3624: result: yes" >&5
- echo "${ECHO_T}yes" >&6
-   SET_MAKE=
- else
--  echo "$as_me:3480: result: no" >&5
-+  echo "$as_me:3628: result: no" >&5
- echo "${ECHO_T}no" >&6
-   SET_MAKE="MAKE=${MAKE-make}"
- fi
- 
- # Extract the first word of "ctags", so it can be a program name with args.
- set dummy ctags; ac_word=$2
--echo "$as_me:3487: checking for $ac_word" >&5
-+echo "$as_me:3635: checking for $ac_word" >&5
- echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -3499,7 +3647,7 @@
-   test -z "$ac_dir" && ac_dir=.
-   $as_executable_p "$ac_dir/$ac_word" || continue
- ac_cv_prog_MAKE_LOWER_TAGS="yes"
--echo "$as_me:3502: found $ac_dir/$ac_word" >&5
-+echo "$as_me:3650: found $ac_dir/$ac_word" >&5
- break
- done
- 
-@@ -3508,17 +3656,17 @@
- fi
- MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
- if test -n "$MAKE_LOWER_TAGS"; then
--  echo "$as_me:3511: result: $MAKE_LOWER_TAGS" >&5
-+  echo "$as_me:3659: result: $MAKE_LOWER_TAGS" >&5
- echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
- else
--  echo "$as_me:3514: result: no" >&5
-+  echo "$as_me:3662: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
- if test "$cf_cv_mixedcase" = yes ; then
- 	# Extract the first word of "etags", so it can be a program name with args.
- set dummy etags; ac_word=$2
--echo "$as_me:3521: checking for $ac_word" >&5
-+echo "$as_me:3669: checking for $ac_word" >&5
- echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -3533,7 +3681,7 @@
-   test -z "$ac_dir" && ac_dir=.
-   $as_executable_p "$ac_dir/$ac_word" || continue
- ac_cv_prog_MAKE_UPPER_TAGS="yes"
--echo "$as_me:3536: found $ac_dir/$ac_word" >&5
-+echo "$as_me:3684: found $ac_dir/$ac_word" >&5
- break
- done
- 
-@@ -3542,10 +3690,10 @@
- fi
- MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
- if test -n "$MAKE_UPPER_TAGS"; then
--  echo "$as_me:3545: result: $MAKE_UPPER_TAGS" >&5
-+  echo "$as_me:3693: result: $MAKE_UPPER_TAGS" >&5
- echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
- else
--  echo "$as_me:3548: result: no" >&5
-+  echo "$as_me:3696: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
-@@ -3565,7 +3713,7 @@
- 	MAKE_LOWER_TAGS="#"
- fi
- 
--echo "$as_me:3568: checking for makeflags variable" >&5
-+echo "$as_me:3716: checking for makeflags variable" >&5
- echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
- if test "${cf_cv_makeflags+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -3599,13 +3747,13 @@
- 	rm -f cf_makeflags.tmp
- 
- fi
--echo "$as_me:3602: result: $cf_cv_makeflags" >&5
-+echo "$as_me:3750: result: $cf_cv_makeflags" >&5
- echo "${ECHO_T}$cf_cv_makeflags" >&6
- 
- if test -n "$ac_tool_prefix"; then
-   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
- set dummy ${ac_tool_prefix}ranlib; ac_word=$2
--echo "$as_me:3608: checking for $ac_word" >&5
-+echo "$as_me:3756: checking for $ac_word" >&5
- echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- if test "${ac_cv_prog_RANLIB+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -3620,7 +3768,7 @@
-   test -z "$ac_dir" && ac_dir=.
-   $as_executable_p "$ac_dir/$ac_word" || continue
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
--echo "$as_me:3623: found $ac_dir/$ac_word" >&5
-+echo "$as_me:3771: found $ac_dir/$ac_word" >&5
- break
- done
- 
-@@ -3628,10 +3776,10 @@
- fi
- RANLIB=$ac_cv_prog_RANLIB
- if test -n "$RANLIB"; then
--  echo "$as_me:3631: result: $RANLIB" >&5
-+  echo "$as_me:3779: result: $RANLIB" >&5
- echo "${ECHO_T}$RANLIB" >&6
- else
--  echo "$as_me:3634: result: no" >&5
-+  echo "$as_me:3782: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
-@@ -3640,7 +3788,7 @@
-   ac_ct_RANLIB=$RANLIB
-   # Extract the first word of "ranlib", so it can be a program name with args.
- set dummy ranlib; ac_word=$2
--echo "$as_me:3643: checking for $ac_word" >&5
-+echo "$as_me:3791: checking for $ac_word" >&5
- echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -3655,7 +3803,7 @@
-   test -z "$ac_dir" && ac_dir=.
-   $as_executable_p "$ac_dir/$ac_word" || continue
- ac_cv_prog_ac_ct_RANLIB="ranlib"
--echo "$as_me:3658: found $ac_dir/$ac_word" >&5
-+echo "$as_me:3806: found $ac_dir/$ac_word" >&5
- break
- done
- 
-@@ -3664,10 +3812,10 @@
- fi
- ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
- if test -n "$ac_ct_RANLIB"; then
--  echo "$as_me:3667: result: $ac_ct_RANLIB" >&5
-+  echo "$as_me:3815: result: $ac_ct_RANLIB" >&5
- echo "${ECHO_T}$ac_ct_RANLIB" >&6
- else
--  echo "$as_me:3670: result: no" >&5
-+  echo "$as_me:3818: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
-@@ -3679,7 +3827,7 @@
- if test -n "$ac_tool_prefix"; then
-   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
- set dummy ${ac_tool_prefix}ld; ac_word=$2
--echo "$as_me:3682: checking for $ac_word" >&5
-+echo "$as_me:3830: checking for $ac_word" >&5
- echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- if test "${ac_cv_prog_LD+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -3694,7 +3842,7 @@
-   test -z "$ac_dir" && ac_dir=.
-   $as_executable_p "$ac_dir/$ac_word" || continue
- ac_cv_prog_LD="${ac_tool_prefix}ld"
--echo "$as_me:3697: found $ac_dir/$ac_word" >&5
-+echo "$as_me:3845: found $ac_dir/$ac_word" >&5
- break
- done
- 
-@@ -3702,10 +3850,10 @@
- fi
- LD=$ac_cv_prog_LD
- if test -n "$LD"; then
--  echo "$as_me:3705: result: $LD" >&5
-+  echo "$as_me:3853: result: $LD" >&5
- echo "${ECHO_T}$LD" >&6
- else
--  echo "$as_me:3708: result: no" >&5
-+  echo "$as_me:3856: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
-@@ -3714,7 +3862,7 @@
-   ac_ct_LD=$LD
-   # Extract the first word of "ld", so it can be a program name with args.
- set dummy ld; ac_word=$2
--echo "$as_me:3717: checking for $ac_word" >&5
-+echo "$as_me:3865: checking for $ac_word" >&5
- echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -3729,7 +3877,7 @@
-   test -z "$ac_dir" && ac_dir=.
-   $as_executable_p "$ac_dir/$ac_word" || continue
- ac_cv_prog_ac_ct_LD="ld"
--echo "$as_me:3732: found $ac_dir/$ac_word" >&5
-+echo "$as_me:3880: found $ac_dir/$ac_word" >&5
- break
- done
- 
-@@ -3738,10 +3886,10 @@
- fi
- ac_ct_LD=$ac_cv_prog_ac_ct_LD
- if test -n "$ac_ct_LD"; then
--  echo "$as_me:3741: result: $ac_ct_LD" >&5
-+  echo "$as_me:3889: result: $ac_ct_LD" >&5
- echo "${ECHO_T}$ac_ct_LD" >&6
- else
--  echo "$as_me:3744: result: no" >&5
-+  echo "$as_me:3892: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
-@@ -3753,7 +3901,7 @@
- if test -n "$ac_tool_prefix"; then
-   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
- set dummy ${ac_tool_prefix}ar; ac_word=$2
--echo "$as_me:3756: checking for $ac_word" >&5
-+echo "$as_me:3904: checking for $ac_word" >&5
- echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- if test "${ac_cv_prog_AR+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -3768,7 +3916,7 @@
-   test -z "$ac_dir" && ac_dir=.
-   $as_executable_p "$ac_dir/$ac_word" || continue
- ac_cv_prog_AR="${ac_tool_prefix}ar"
--echo "$as_me:3771: found $ac_dir/$ac_word" >&5
-+echo "$as_me:3919: found $ac_dir/$ac_word" >&5
- break
- done
- 
-@@ -3776,10 +3924,10 @@
- fi
- AR=$ac_cv_prog_AR
- if test -n "$AR"; then
--  echo "$as_me:3779: result: $AR" >&5
-+  echo "$as_me:3927: result: $AR" >&5
- echo "${ECHO_T}$AR" >&6
- else
--  echo "$as_me:3782: result: no" >&5
-+  echo "$as_me:3930: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
-@@ -3788,7 +3936,7 @@
-   ac_ct_AR=$AR
-   # Extract the first word of "ar", so it can be a program name with args.
- set dummy ar; ac_word=$2
--echo "$as_me:3791: checking for $ac_word" >&5
-+echo "$as_me:3939: checking for $ac_word" >&5
- echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -3803,7 +3951,7 @@
-   test -z "$ac_dir" && ac_dir=.
-   $as_executable_p "$ac_dir/$ac_word" || continue
- ac_cv_prog_ac_ct_AR="ar"
--echo "$as_me:3806: found $ac_dir/$ac_word" >&5
-+echo "$as_me:3954: found $ac_dir/$ac_word" >&5
- break
- done
- 
-@@ -3812,10 +3960,10 @@
- fi
- ac_ct_AR=$ac_cv_prog_ac_ct_AR
- if test -n "$ac_ct_AR"; then
--  echo "$as_me:3815: result: $ac_ct_AR" >&5
-+  echo "$as_me:3963: result: $ac_ct_AR" >&5
- echo "${ECHO_T}$ac_ct_AR" >&6
- else
--  echo "$as_me:3818: result: no" >&5
-+  echo "$as_me:3966: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
-@@ -3824,25 +3972,123 @@
-   AR="$ac_cv_prog_AR"
- fi
- 
--if test "${cf_cv_subst_AR_OPTS+set}" = set; then
-+if test -n "$ac_tool_prefix"; then
-+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-+set dummy ${ac_tool_prefix}ar; ac_word=$2
-+echo "$as_me:3978: checking for $ac_word" >&5
-+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-+if test "${ac_cv_prog_AR+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-+  if test -n "$AR"; then
-+  ac_cv_prog_AR="$AR" # Let the user override the test.
-+else
-+  ac_save_IFS=$IFS; IFS=$ac_path_separator
-+ac_dummy="$PATH"
-+for ac_dir in $ac_dummy; do
-+  IFS=$ac_save_IFS
-+  test -z "$ac_dir" && ac_dir=.
-+  $as_executable_p "$ac_dir/$ac_word" || continue
-+ac_cv_prog_AR="${ac_tool_prefix}ar"
-+echo "$as_me:3993: found $ac_dir/$ac_word" >&5
-+break
-+done
- 
--echo "$as_me:3831: checking for archiver options (symbol AR_OPTS)" >&5
--echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
-+fi
-+fi
-+AR=$ac_cv_prog_AR
-+if test -n "$AR"; then
-+  echo "$as_me:4001: result: $AR" >&5
-+echo "${ECHO_T}$AR" >&6
-+else
-+  echo "$as_me:4004: result: no" >&5
-+echo "${ECHO_T}no" >&6
-+fi
- 
--if test -z "$AR_OPTS" ; then
--	AR_OPTS=rv
-+fi
-+if test -z "$ac_cv_prog_AR"; then
-+  ac_ct_AR=$AR
-+  # Extract the first word of "ar", so it can be a program name with args.
-+set dummy ar; ac_word=$2
-+echo "$as_me:4013: checking for $ac_word" >&5
-+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
-+  echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+  if test -n "$ac_ct_AR"; then
-+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
-+else
-+  ac_save_IFS=$IFS; IFS=$ac_path_separator
-+ac_dummy="$PATH"
-+for ac_dir in $ac_dummy; do
-+  IFS=$ac_save_IFS
-+  test -z "$ac_dir" && ac_dir=.
-+  $as_executable_p "$ac_dir/$ac_word" || continue
-+ac_cv_prog_ac_ct_AR="ar"
-+echo "$as_me:4028: found $ac_dir/$ac_word" >&5
-+break
-+done
- 
-+  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
-+fi
- fi
-+ac_ct_AR=$ac_cv_prog_ac_ct_AR
-+if test -n "$ac_ct_AR"; then
-+  echo "$as_me:4037: result: $ac_ct_AR" >&5
-+echo "${ECHO_T}$ac_ct_AR" >&6
-+else
-+  echo "$as_me:4040: result: no" >&5
-+echo "${ECHO_T}no" >&6
-+fi
-+
-+  AR=$ac_ct_AR
-+else
-+  AR="$ac_cv_prog_AR"
-+fi
-+
-+echo "$as_me:4049: checking for options to update archives" >&5
-+echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
-+if test "${cf_cv_ar_flags+set}" = set; then
-+  echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+
-+	cf_cv_ar_flags=unknown
-+	for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
-+	do
-+		rm -f conftest.$ac_cv_objext
-+		rm -f conftest.a
-+
-+		cat >conftest.$ac_ext <<EOF
-+#line 4062 "configure"
-+int	testdata[3] = { 123, 456, 789 };
-+EOF
-+		if { (eval echo "$as_me:4065: \"$ac_compile\"") >&5
-+  (eval $ac_compile) 2>&5
-+  ac_status=$?
-+  echo "$as_me:4068: \$? = $ac_status" >&5
-+  (exit $ac_status); } ; then
-+			$AR $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
-+			if test -f conftest.a ; then
-+				cf_cv_ar_flags=$cf_ar_flags
-+				break
-+			fi
-+		else
-+			test -n "$verbose" && echo "	cannot compile test-program" 1>&6
- 
--cf_cv_subst_AR_OPTS=$AR_OPTS
--echo "$as_me:3840: result: $AR_OPTS" >&5
--echo "${ECHO_T}$AR_OPTS" >&6
-+echo "${as_me-configure}:4078: testing cannot compile test-program ..." 1>&5
-+
-+			break
-+		fi
-+	done
-+	rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
- 
- fi
-+echo "$as_me:4086: result: $cf_cv_ar_flags" >&5
-+echo "${ECHO_T}$cf_cv_ar_flags" >&6
-+test -z "$ARFLAGS" && ARFLAGS=$cf_cv_ar_flags
-+ARFLAGS=$cf_cv_ar_flags
- 
--echo "$as_me:3845: checking if you have specified an install-prefix" >&5
-+echo "$as_me:4091: checking if you have specified an install-prefix" >&5
- echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
- 
- # Check whether --with-install-prefix or --without-install-prefix was given.
-@@ -3855,7 +4101,7 @@
- 		;;
- 	esac
- fi;
--echo "$as_me:3858: result: $DESTDIR" >&5
-+echo "$as_me:4104: result: $DESTDIR" >&5
- echo "${ECHO_T}$DESTDIR" >&6
- 
- ###############################################################################
-@@ -3883,7 +4129,7 @@
- do
-   # Extract the first word of "$ac_prog", so it can be a program name with args.
- set dummy $ac_prog; ac_word=$2
--echo "$as_me:3886: checking for $ac_word" >&5
-+echo "$as_me:4132: checking for $ac_word" >&5
- echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- if test "${ac_cv_prog_BUILD_CC+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -3898,7 +4144,7 @@
-   test -z "$ac_dir" && ac_dir=.
-   $as_executable_p "$ac_dir/$ac_word" || continue
- ac_cv_prog_BUILD_CC="$ac_prog"
--echo "$as_me:3901: found $ac_dir/$ac_word" >&5
-+echo "$as_me:4147: found $ac_dir/$ac_word" >&5
- break
- done
- 
-@@ -3906,10 +4152,10 @@
- fi
- BUILD_CC=$ac_cv_prog_BUILD_CC
- if test -n "$BUILD_CC"; then
--  echo "$as_me:3909: result: $BUILD_CC" >&5
-+  echo "$as_me:4155: result: $BUILD_CC" >&5
- echo "${ECHO_T}$BUILD_CC" >&6
- else
--  echo "$as_me:3912: result: no" >&5
-+  echo "$as_me:4158: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
-@@ -3917,12 +4163,12 @@
- done
- 
- fi;
--	echo "$as_me:3920: checking for native build C compiler" >&5
-+	echo "$as_me:4166: checking for native build C compiler" >&5
- echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
--	echo "$as_me:3922: result: $BUILD_CC" >&5
-+	echo "$as_me:4168: result: $BUILD_CC" >&5
- echo "${ECHO_T}$BUILD_CC" >&6
- 
--	echo "$as_me:3925: checking for native build C preprocessor" >&5
-+	echo "$as_me:4171: checking for native build C preprocessor" >&5
- echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
- 
- # Check whether --with-build-cpp or --without-build-cpp was given.
-@@ -3932,10 +4178,10 @@
- else
-   BUILD_CPP='${BUILD_CC} -E'
- fi;
--	echo "$as_me:3935: result: $BUILD_CPP" >&5
-+	echo "$as_me:4181: result: $BUILD_CPP" >&5
- echo "${ECHO_T}$BUILD_CPP" >&6
- 
--	echo "$as_me:3938: checking for native build C flags" >&5
-+	echo "$as_me:4184: checking for native build C flags" >&5
- echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
- 
- # Check whether --with-build-cflags or --without-build-cflags was given.
-@@ -3943,10 +4189,10 @@
-   withval="$with_build_cflags"
-   BUILD_CFLAGS="$withval"
- fi;
--	echo "$as_me:3946: result: $BUILD_CFLAGS" >&5
-+	echo "$as_me:4192: result: $BUILD_CFLAGS" >&5
- echo "${ECHO_T}$BUILD_CFLAGS" >&6
- 
--	echo "$as_me:3949: checking for native build C preprocessor-flags" >&5
-+	echo "$as_me:4195: checking for native build C preprocessor-flags" >&5
- echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
- 
- # Check whether --with-build-cppflags or --without-build-cppflags was given.
-@@ -3954,10 +4200,10 @@
-   withval="$with_build_cppflags"
-   BUILD_CPPFLAGS="$withval"
- fi;
--	echo "$as_me:3957: result: $BUILD_CPPFLAGS" >&5
-+	echo "$as_me:4203: result: $BUILD_CPPFLAGS" >&5
- echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
- 
--	echo "$as_me:3960: checking for native build linker-flags" >&5
-+	echo "$as_me:4206: checking for native build linker-flags" >&5
- echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
- 
- # Check whether --with-build-ldflags or --without-build-ldflags was given.
-@@ -3965,10 +4211,10 @@
-   withval="$with_build_ldflags"
-   BUILD_LDFLAGS="$withval"
- fi;
--	echo "$as_me:3968: result: $BUILD_LDFLAGS" >&5
-+	echo "$as_me:4214: result: $BUILD_LDFLAGS" >&5
- echo "${ECHO_T}$BUILD_LDFLAGS" >&6
- 
--	echo "$as_me:3971: checking for native build linker-libraries" >&5
-+	echo "$as_me:4217: checking for native build linker-libraries" >&5
- echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
- 
- # Check whether --with-build-libs or --without-build-libs was given.
-@@ -3976,7 +4222,7 @@
-   withval="$with_build_libs"
-   BUILD_LIBS="$withval"
- fi;
--	echo "$as_me:3979: result: $BUILD_LIBS" >&5
-+	echo "$as_me:4225: result: $BUILD_LIBS" >&5
- echo "${ECHO_T}$BUILD_LIBS" >&6
- 
- 	# this assumes we're on Unix.
-@@ -3986,7 +4232,7 @@
- 	: ${BUILD_CC:='${CC}'}
- 
- 	if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
--		{ { echo "$as_me:3989: error: Cross-build requires two compilers.
-+		{ { echo "$as_me:4235: error: Cross-build requires two compilers.
- Use --with-build-cc to specify the native compiler." >&5
- echo "$as_me: error: Cross-build requires two compilers.
- Use --with-build-cc to specify the native compiler." >&2;}
-@@ -4027,7 +4273,7 @@
- LIB_INSTALL=
- LIB_UNINSTALL=
- 
--echo "$as_me:4030: checking if you want to build libraries with libtool" >&5
-+echo "$as_me:4276: checking if you want to build libraries with libtool" >&5
- echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
- 
- # Check whether --with-libtool or --without-libtool was given.
-@@ -4037,11 +4283,11 @@
- else
-   with_libtool=no
- fi;
--echo "$as_me:4040: result: $with_libtool" >&5
-+echo "$as_me:4286: result: $with_libtool" >&5
- echo "${ECHO_T}$with_libtool" >&6
- if test "$with_libtool" != "no"; then
- 
-- 	if test "$with_libtool" != "yes" ; then
-+	if test "$with_libtool" != "yes" ; then
- 
- if test "x$prefix" != xNONE; then
-   cf_path_syntax="$prefix"
-@@ -4068,7 +4314,7 @@
-   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
-   ;;
- *)
--  { { echo "$as_me:4071: error: expected a pathname, not \"$with_libtool\"" >&5
-+  { { echo "$as_me:4317: error: expected a pathname, not \"$with_libtool\"" >&5
- echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
-    { (exit 1); exit 1; }; }
-   ;;
-@@ -4076,9 +4322,9 @@
- 
- 		LIBTOOL=$with_libtool
- 	else
-- 		# Extract the first word of "libtool", so it can be a program name with args.
-+		# Extract the first word of "libtool", so it can be a program name with args.
- set dummy libtool; ac_word=$2
--echo "$as_me:4081: checking for $ac_word" >&5
-+echo "$as_me:4327: checking for $ac_word" >&5
- echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- if test "${ac_cv_path_LIBTOOL+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -4095,7 +4341,7 @@
-   test -z "$ac_dir" && ac_dir=.
-   if $as_executable_p "$ac_dir/$ac_word"; then
-    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
--   echo "$as_me:4098: found $ac_dir/$ac_word" >&5
-+   echo "$as_me:4344: found $ac_dir/$ac_word" >&5
-    break
- fi
- done
-@@ -4106,20 +4352,20 @@
- LIBTOOL=$ac_cv_path_LIBTOOL
- 
- if test -n "$LIBTOOL"; then
--  echo "$as_me:4109: result: $LIBTOOL" >&5
-+  echo "$as_me:4355: result: $LIBTOOL" >&5
- echo "${ECHO_T}$LIBTOOL" >&6
- else
--  echo "$as_me:4112: result: no" >&5
-+  echo "$as_me:4358: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
-- 	fi
-- 	if test -z "$LIBTOOL" ; then
-- 		{ { echo "$as_me:4118: error: Cannot find libtool" >&5
-+	fi
-+	if test -z "$LIBTOOL" ; then
-+		{ { echo "$as_me:4364: error: Cannot find libtool" >&5
- echo "$as_me: error: Cannot find libtool" >&2;}
-    { (exit 1); exit 1; }; }
-- 	fi
--	LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o'
-+	fi
-+	LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} -o'
- 	LIB_OBJECT='${OBJECTS:.o=.lo}'
- 	LIB_SUFFIX=.la
- 	LIB_CLEAN='${LIBTOOL} --mode=clean'
-@@ -4130,24 +4376,32 @@
- 	LIB_PREP=:
- 
- 	# Show the version of libtool
--	echo "$as_me:4133: checking version of libtool" >&5
-+	echo "$as_me:4379: checking version of libtool" >&5
- echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
- 
- 	# Save the version in a cache variable - this is not entirely a good
- 	# thing, but the version string from libtool is very ugly, and for
--	# bug reports it might be useful to have the original string.
-+	# bug reports it might be useful to have the original string. "("
- 	cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
--	echo "$as_me:4140: result: $cf_cv_libtool_version" >&5
-+	echo "$as_me:4386: result: $cf_cv_libtool_version" >&5
- echo "${ECHO_T}$cf_cv_libtool_version" >&6
- 	if test -z "$cf_cv_libtool_version" ; then
--		{ { echo "$as_me:4143: error: This is not GNU libtool" >&5
-+		{ { echo "$as_me:4389: error: This is not GNU libtool" >&5
- echo "$as_me: error: This is not GNU libtool" >&2;}
-    { (exit 1); exit 1; }; }
- 	fi
- 
-+	# special hack to add -no-undefined (which libtool should do for itself)
-+	LT_UNDEF=
-+	case "$cf_cv_system_name" in #(vi
-+	cygwin*|mingw32*|uwin*|aix[456]) #(vi
-+		LT_UNDEF=-no-undefined
-+		;;
-+	esac
-+
- 	# special hack to add --tag option for C++ compiler
--	case $cf_cv_libtool_version in
--	1.[5-9]*|[2-9]*)
-+	case $cf_cv_libtool_version in #(vi
-+	1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
- 		LIBTOOL_CXX="$LIBTOOL --tag=CXX"
- 		LIBTOOL="$LIBTOOL --tag=CC"
- 		;;
-@@ -4168,7 +4422,7 @@
- 
- else
- 
--echo "$as_me:4171: checking if you want to build shared libraries" >&5
-+echo "$as_me:4425: checking if you want to build shared libraries" >&5
- echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
- 
- # Check whether --with-shared or --without-shared was given.
-@@ -4178,11 +4432,11 @@
- else
-   with_shared=no
- fi;
--echo "$as_me:4181: result: $with_shared" >&5
-+echo "$as_me:4435: result: $with_shared" >&5
- echo "${ECHO_T}$with_shared" >&6
- test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
- 
--echo "$as_me:4185: checking if you want to build static libraries" >&5
-+echo "$as_me:4439: checking if you want to build static libraries" >&5
- echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
- 
- # Check whether --with-normal or --without-normal was given.
-@@ -4192,11 +4446,11 @@
- else
-   with_normal=yes
- fi;
--echo "$as_me:4195: result: $with_normal" >&5
-+echo "$as_me:4449: result: $with_normal" >&5
- echo "${ECHO_T}$with_normal" >&6
- test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
- 
--echo "$as_me:4199: checking if you want to build debug libraries" >&5
-+echo "$as_me:4453: checking if you want to build debug libraries" >&5
- echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
- 
- # Check whether --with-debug or --without-debug was given.
-@@ -4206,11 +4460,11 @@
- else
-   with_debug=yes
- fi;
--echo "$as_me:4209: result: $with_debug" >&5
-+echo "$as_me:4463: result: $with_debug" >&5
- echo "${ECHO_T}$with_debug" >&6
- test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
- 
--echo "$as_me:4213: checking if you want to build profiling libraries" >&5
-+echo "$as_me:4467: checking if you want to build profiling libraries" >&5
- echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
- 
- # Check whether --with-profile or --without-profile was given.
-@@ -4220,7 +4474,7 @@
- else
-   with_profile=no
- fi;
--echo "$as_me:4223: result: $with_profile" >&5
-+echo "$as_me:4477: result: $with_profile" >&5
- echo "${ECHO_T}$with_profile" >&6
- test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
- 
-@@ -4228,19 +4482,19 @@
- 
- ###############################################################################
- 
--echo "$as_me:4231: checking for specified models" >&5
-+echo "$as_me:4485: checking for specified models" >&5
- echo $ECHO_N "checking for specified models... $ECHO_C" >&6
- test -z "$cf_list_models" && cf_list_models=normal
- test "$with_libtool" != "no" && cf_list_models=libtool
--echo "$as_me:4235: result: $cf_list_models" >&5
-+echo "$as_me:4489: result: $cf_list_models" >&5
- echo "${ECHO_T}$cf_list_models" >&6
- 
- ### Use the first model as the default, and save its suffix for use in building
- ### up test-applications.
--echo "$as_me:4240: checking for default model" >&5
-+echo "$as_me:4494: checking for default model" >&5
- echo $ECHO_N "checking for default model... $ECHO_C" >&6
- DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
--echo "$as_me:4243: result: $DFT_LWR_MODEL" >&5
-+echo "$as_me:4497: result: $DFT_LWR_MODEL" >&5
- echo "${ECHO_T}$DFT_LWR_MODEL" >&6
- 
- DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
-@@ -4269,7 +4523,7 @@
- 
- ###############################################################################
- 
--echo "$as_me:4272: checking if you want to build a separate terminfo library" >&5
-+echo "$as_me:4526: checking if you want to build a separate terminfo library" >&5
- echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
- 
- # Check whether --with-termlib or --without-termlib was given.
-@@ -4279,10 +4533,10 @@
- else
-   with_termlib=no
- fi;
--echo "$as_me:4282: result: $with_termlib" >&5
-+echo "$as_me:4536: result: $with_termlib" >&5
- echo "${ECHO_T}$with_termlib" >&6
- 
--echo "$as_me:4285: checking if you want to build a separate tic library" >&5
-+echo "$as_me:4539: checking if you want to build a separate tic library" >&5
- echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
- 
- # Check whether --with-ticlib or --without-ticlib was given.
-@@ -4292,13 +4546,13 @@
- else
-   with_ticlib=no
- fi;
--echo "$as_me:4295: result: $with_ticlib" >&5
-+echo "$as_me:4549: result: $with_ticlib" >&5
- echo "${ECHO_T}$with_ticlib" >&6
- 
- ### Checks for special libraries, must be done up-front.
- SHLIB_LIST=""
- 
--echo "$as_me:4301: checking if you want to link with the GPM mouse library" >&5
-+echo "$as_me:4555: checking if you want to link with the GPM mouse library" >&5
- echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
- 
- # Check whether --with-gpm or --without-gpm was given.
-@@ -4308,27 +4562,27 @@
- else
-   with_gpm=maybe
- fi;
--echo "$as_me:4311: result: $with_gpm" >&5
-+echo "$as_me:4565: result: $with_gpm" >&5
- echo "${ECHO_T}$with_gpm" >&6
- 
- if test "$with_gpm" != no ; then
--	echo "$as_me:4315: checking for gpm.h" >&5
-+	echo "$as_me:4569: checking for gpm.h" >&5
- echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
- if test "${ac_cv_header_gpm_h+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 4321 "configure"
-+#line 4575 "configure"
- #include "confdefs.h"
- #include <gpm.h>
- _ACEOF
--if { (eval echo "$as_me:4325: \"$ac_cpp conftest.$ac_ext\"") >&5
-+if { (eval echo "$as_me:4579: \"$ac_cpp conftest.$ac_ext\"") >&5
-   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-   ac_status=$?
-   egrep -v '^ *\+' conftest.er1 >conftest.err
-   rm -f conftest.er1
-   cat conftest.err >&5
--  echo "$as_me:4331: \$? = $ac_status" >&5
-+  echo "$as_me:4585: \$? = $ac_status" >&5
-   (exit $ac_status); } >/dev/null; then
-   if test -s conftest.err; then
-     ac_cpp_err=$ac_c_preproc_warn_flag
-@@ -4347,7 +4601,7 @@
- fi
- rm -f conftest.err conftest.$ac_ext
- fi
--echo "$as_me:4350: result: $ac_cv_header_gpm_h" >&5
-+echo "$as_me:4604: result: $ac_cv_header_gpm_h" >&5
- echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
- if test $ac_cv_header_gpm_h = yes; then
- 
-@@ -4358,14 +4612,14 @@
- 		if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
- 			test -n "$verbose" && echo "	assuming we really have GPM library" 1>&6
- 
--echo "${as_me-configure}:4361: testing assuming we really have GPM library ..." 1>&5
-+echo "${as_me-configure}:4615: testing assuming we really have GPM library ..." 1>&5
- 
- 			cat >>confdefs.h <<\EOF
- #define HAVE_LIBGPM 1
- EOF
- 
- 		else
--			echo "$as_me:4368: checking for Gpm_Open in -lgpm" >&5
-+			echo "$as_me:4622: checking for Gpm_Open in -lgpm" >&5
- echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
- if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -4373,7 +4627,7 @@
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lgpm  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
--#line 4376 "configure"
-+#line 4630 "configure"
- #include "confdefs.h"
- 
- /* Override any gcc2 internal prototype to avoid an error.  */
-@@ -4392,16 +4646,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:4395: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:4649: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:4398: \$? = $ac_status" >&5
-+  echo "$as_me:4652: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:4401: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:4655: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:4404: \$? = $ac_status" >&5
-+  echo "$as_me:4658: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_lib_gpm_Gpm_Open=yes
- else
-@@ -4412,13 +4666,13 @@
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
- fi
--echo "$as_me:4415: result: $ac_cv_lib_gpm_Gpm_Open" >&5
-+echo "$as_me:4669: result: $ac_cv_lib_gpm_Gpm_Open" >&5
- echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
- if test $ac_cv_lib_gpm_Gpm_Open = yes; then
-   :
- else
- 
--				{ { echo "$as_me:4421: error: Cannot link with GPM library" >&5
-+				{ { echo "$as_me:4675: error: Cannot link with GPM library" >&5
- echo "$as_me: error: Cannot link with GPM library" >&2;}
-    { (exit 1); exit 1; }; }
- 		fi
-@@ -4428,7 +4682,7 @@
- 
- else
- 
--		test "$with_gpm" != maybe && { echo "$as_me:4431: WARNING: Cannot find GPM header" >&5
-+		test "$with_gpm" != maybe && { echo "$as_me:4685: WARNING: Cannot find GPM header" >&5
- echo "$as_me: WARNING: Cannot find GPM header" >&2;}
- 		with_gpm=no
- 
-@@ -4437,7 +4691,7 @@
- fi
- 
- if test "$with_gpm" != no ; then
--	echo "$as_me:4440: checking if you want to load GPM dynamically" >&5
-+	echo "$as_me:4694: checking if you want to load GPM dynamically" >&5
- echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
- 
- # Check whether --with-dlsym or --without-dlsym was given.
-@@ -4447,18 +4701,18 @@
- else
-   with_dlsym=yes
- fi;
--	echo "$as_me:4450: result: $with_dlsym" >&5
-+	echo "$as_me:4704: result: $with_dlsym" >&5
- echo "${ECHO_T}$with_dlsym" >&6
- 	if test "$with_dlsym" = yes ; then
- 
- cf_have_dlsym=no
--echo "$as_me:4455: checking for dlsym" >&5
-+echo "$as_me:4709: checking for dlsym" >&5
- echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
- if test "${ac_cv_func_dlsym+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 4461 "configure"
-+#line 4715 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
-     which can conflict with char dlsym (); below.  */
-@@ -4489,16 +4743,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:4492: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:4746: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:4495: \$? = $ac_status" >&5
-+  echo "$as_me:4749: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:4498: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:4752: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:4501: \$? = $ac_status" >&5
-+  echo "$as_me:4755: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_func_dlsym=yes
- else
-@@ -4508,14 +4762,14 @@
- fi
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- fi
--echo "$as_me:4511: result: $ac_cv_func_dlsym" >&5
-+echo "$as_me:4765: result: $ac_cv_func_dlsym" >&5
- echo "${ECHO_T}$ac_cv_func_dlsym" >&6
- if test $ac_cv_func_dlsym = yes; then
-   cf_have_dlsym=yes
- else
- 
- cf_have_libdl=no
--echo "$as_me:4518: checking for dlsym in -ldl" >&5
-+echo "$as_me:4772: checking for dlsym in -ldl" >&5
- echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
- if test "${ac_cv_lib_dl_dlsym+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -4523,7 +4777,7 @@
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-ldl  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
--#line 4526 "configure"
-+#line 4780 "configure"
- #include "confdefs.h"
- 
- /* Override any gcc2 internal prototype to avoid an error.  */
-@@ -4542,16 +4796,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:4545: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:4799: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:4548: \$? = $ac_status" >&5
-+  echo "$as_me:4802: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:4551: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:4805: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:4554: \$? = $ac_status" >&5
-+  echo "$as_me:4808: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_lib_dl_dlsym=yes
- else
-@@ -4562,7 +4816,7 @@
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
- fi
--echo "$as_me:4565: result: $ac_cv_lib_dl_dlsym" >&5
-+echo "$as_me:4819: result: $ac_cv_lib_dl_dlsym" >&5
- echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
- if test $ac_cv_lib_dl_dlsym = yes; then
- 
-@@ -4575,10 +4829,10 @@
- if test "$cf_have_dlsym" = yes ; then
- 	test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
- 
--	echo "$as_me:4578: checking whether able to link to dl*() functions" >&5
-+	echo "$as_me:4832: checking whether able to link to dl*() functions" >&5
- echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
- 	cat >conftest.$ac_ext <<_ACEOF
--#line 4581 "configure"
-+#line 4835 "configure"
- #include "confdefs.h"
- #include <dlfcn.h>
- int
-@@ -4596,16 +4850,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:4599: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:4853: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:4602: \$? = $ac_status" >&5
-+  echo "$as_me:4856: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:4605: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:4859: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:4608: \$? = $ac_status" >&5
-+  echo "$as_me:4862: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
- 
- 		cat >>confdefs.h <<\EOF
-@@ -4616,15 +4870,15 @@
-   echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- 
--		{ { echo "$as_me:4619: error: Cannot link test program for libdl" >&5
-+		{ { echo "$as_me:4873: error: Cannot link test program for libdl" >&5
- echo "$as_me: error: Cannot link test program for libdl" >&2;}
-    { (exit 1); exit 1; }; }
- fi
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
--	echo "$as_me:4624: result: ok" >&5
-+	echo "$as_me:4878: result: ok" >&5
- echo "${ECHO_T}ok" >&6
- else
--	{ { echo "$as_me:4627: error: Cannot find dlsym function" >&5
-+	{ { echo "$as_me:4881: error: Cannot find dlsym function" >&5
- echo "$as_me: error: Cannot find dlsym function" >&2;}
-    { (exit 1); exit 1; }; }
- fi
-@@ -4632,12 +4886,12 @@
- 		if test "$with_gpm" != yes ; then
- 			test -n "$verbose" && echo "	assuming soname for gpm is $with_gpm" 1>&6
- 
--echo "${as_me-configure}:4635: testing assuming soname for gpm is $with_gpm ..." 1>&5
-+echo "${as_me-configure}:4889: testing assuming soname for gpm is $with_gpm ..." 1>&5
- 
- 			cf_cv_gpm_soname="$with_gpm"
- 		else
- 
--echo "$as_me:4640: checking for soname of gpm library" >&5
-+echo "$as_me:4894: checking for soname of gpm library" >&5
- echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
- if test "${cf_cv_gpm_soname+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -4655,15 +4909,15 @@
- CF_EOF
- cf_save_LIBS="$LIBS"
- 	LIBS="-lgpm $LIBS"
--	if { (eval echo "$as_me:4658: \"$ac_compile\"") >&5
-+	if { (eval echo "$as_me:4912: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:4661: \$? = $ac_status" >&5
-+  echo "$as_me:4915: \$? = $ac_status" >&5
-   (exit $ac_status); } ; then
--		if { (eval echo "$as_me:4663: \"$ac_link\"") >&5
-+		if { (eval echo "$as_me:4917: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:4666: \$? = $ac_status" >&5
-+  echo "$as_me:4920: \$? = $ac_status" >&5
-   (exit $ac_status); } ; then
- 			cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
- 			test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
-@@ -4674,7 +4928,7 @@
- fi
- 
- fi
--echo "$as_me:4677: result: $cf_cv_gpm_soname" >&5
-+echo "$as_me:4931: result: $cf_cv_gpm_soname" >&5
- echo "${ECHO_T}$cf_cv_gpm_soname" >&6
- 
- 		fi
-@@ -4690,7 +4944,7 @@
- #define HAVE_LIBGPM 1
- EOF
- 
--echo "$as_me:4693: checking for Gpm_Wgetch in -lgpm" >&5
-+echo "$as_me:4947: checking for Gpm_Wgetch in -lgpm" >&5
- echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
- if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -4698,7 +4952,7 @@
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lgpm  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
--#line 4701 "configure"
-+#line 4955 "configure"
- #include "confdefs.h"
- 
- /* Override any gcc2 internal prototype to avoid an error.  */
-@@ -4717,16 +4971,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:4720: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:4974: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:4723: \$? = $ac_status" >&5
-+  echo "$as_me:4977: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:4726: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:4980: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:4729: \$? = $ac_status" >&5
-+  echo "$as_me:4983: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_lib_gpm_Gpm_Wgetch=yes
- else
-@@ -4737,11 +4991,11 @@
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
- fi
--echo "$as_me:4740: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
-+echo "$as_me:4994: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
- echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
- if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
- 
--echo "$as_me:4744: checking if GPM is weakly bound to curses library" >&5
-+echo "$as_me:4998: checking if GPM is weakly bound to curses library" >&5
- echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
- if test "${cf_cv_check_gpm_wgetch+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -4765,15 +5019,15 @@
- 	# to rely on the static library, noting that some packagers may not
- 	# include it.
- 	LIBS="-static -lgpm -dynamic $LIBS"
--	if { (eval echo "$as_me:4768: \"$ac_compile\"") >&5
-+	if { (eval echo "$as_me:5022: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:4771: \$? = $ac_status" >&5
-+  echo "$as_me:5025: \$? = $ac_status" >&5
-   (exit $ac_status); } ; then
--		if { (eval echo "$as_me:4773: \"$ac_link\"") >&5
-+		if { (eval echo "$as_me:5027: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:4776: \$? = $ac_status" >&5
-+  echo "$as_me:5030: \$? = $ac_status" >&5
-   (exit $ac_status); } ; then
- 			cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
- 			test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
-@@ -4785,11 +5039,11 @@
- fi
- 
- fi
--echo "$as_me:4788: result: $cf_cv_check_gpm_wgetch" >&5
-+echo "$as_me:5042: result: $cf_cv_check_gpm_wgetch" >&5
- echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
- 
- if test "$cf_cv_check_gpm_wgetch" != yes ; then
--	{ echo "$as_me:4792: WARNING: GPM library is already linked with curses - read the FAQ" >&5
-+	{ echo "$as_me:5046: WARNING: GPM library is already linked with curses - read the FAQ" >&5
- echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
- fi
- 
-@@ -4799,7 +5053,7 @@
- 
- # not everyone has "test -c"
- if test -c /dev/sysmouse 2>/dev/null ; then
--echo "$as_me:4802: checking if you want to use sysmouse" >&5
-+echo "$as_me:5056: checking if you want to use sysmouse" >&5
- echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
- 
- # Check whether --with-sysmouse or --without-sysmouse was given.
-@@ -4811,7 +5065,7 @@
- fi;
- 	if test "$cf_with_sysmouse" != no ; then
- 	cat >conftest.$ac_ext <<_ACEOF
--#line 4814 "configure"
-+#line 5068 "configure"
- #include "confdefs.h"
- 
- #include <osreldate.h>
-@@ -4834,16 +5088,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:4837: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:5091: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:4840: \$? = $ac_status" >&5
-+  echo "$as_me:5094: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:4843: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:5097: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:4846: \$? = $ac_status" >&5
-+  echo "$as_me:5100: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_with_sysmouse=yes
- else
-@@ -4853,7 +5107,7 @@
- fi
- rm -f conftest.$ac_objext conftest.$ac_ext
- 	fi
--echo "$as_me:4856: result: $cf_with_sysmouse" >&5
-+echo "$as_me:5110: result: $cf_with_sysmouse" >&5
- echo "${ECHO_T}$cf_with_sysmouse" >&6
- test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
- #define USE_SYSMOUSE 1
-@@ -4871,7 +5125,7 @@
- 	test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
- fi
- 
--echo "$as_me:4874: checking for default loader flags" >&5
-+echo "$as_me:5128: checking for default loader flags" >&5
- echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
- case $DFT_LWR_MODEL in
- libtool) LD_MODEL=''   ;;
-@@ -4880,13 +5134,13 @@
- profile) LD_MODEL='-pg';;
- shared)  LD_MODEL=''   ;;
- esac
--echo "$as_me:4883: result: $LD_MODEL" >&5
-+echo "$as_me:5137: result: $LD_MODEL" >&5
- echo "${ECHO_T}$LD_MODEL" >&6
- 
- case $DFT_LWR_MODEL in
- shared)
- 
--echo "$as_me:4889: checking if rpath option should be used" >&5
-+echo "$as_me:5143: checking if rpath option should be used" >&5
- echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
- 
- # Check whether --enable-rpath or --disable-rpath was given.
-@@ -4896,10 +5150,10 @@
- else
-   cf_cv_ld_rpath=no
- fi;
--echo "$as_me:4899: result: $cf_cv_ld_rpath" >&5
-+echo "$as_me:5153: result: $cf_cv_ld_rpath" >&5
- echo "${ECHO_T}$cf_cv_ld_rpath" >&6
- 
--echo "$as_me:4902: checking if shared libraries should be relinked during install" >&5
-+echo "$as_me:5156: checking if shared libraries should be relinked during install" >&5
- echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
- 
- # Check whether --enable-relink or --disable-relink was given.
-@@ -4909,19 +5163,20 @@
- else
-   cf_cv_do_relink=yes
- fi;
--echo "$as_me:4912: result: $cf_cv_do_relink" >&5
-+echo "$as_me:5166: result: $cf_cv_do_relink" >&5
- echo "${ECHO_T}$cf_cv_do_relink" >&6
- 	;;
- esac
- 
- 	LOCAL_LDFLAGS=
- 	LOCAL_LDFLAGS2=
-+	LD_RPATH_OPT=
- 	LD_SHARED_OPTS=
- 	INSTALL_LIB="-m 644"
- 
- 	cf_cv_do_symlinks=no
- 
--	echo "$as_me:4924: checking if release/abi version should be used for shared libs" >&5
-+	echo "$as_me:5179: checking if release/abi version should be used for shared libs" >&5
- echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
- 
- # Check whether --with-shlib-version or --without-shlib-version was given.
-@@ -4936,7 +5191,7 @@
- 		cf_cv_shlib_version=$withval
- 		;;
- 	*)
--		{ { echo "$as_me:4939: error: option value must be one of: rel, abi, auto or no" >&5
-+		{ { echo "$as_me:5194: error: option value must be one of: rel, abi, auto or no" >&5
- echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
-    { (exit 1); exit 1; }; }
- 		;;
-@@ -4945,7 +5200,7 @@
- else
-   cf_cv_shlib_version=auto
- fi;
--	echo "$as_me:4948: result: $cf_cv_shlib_version" >&5
-+	echo "$as_me:5203: result: $cf_cv_shlib_version" >&5
- echo "${ECHO_T}$cf_cv_shlib_version" >&6
- 
- 	cf_cv_rm_so_locs=no
-@@ -4954,14 +5209,14 @@
- 	CC_SHARED_OPTS=
- 	if test "$GCC" = yes
- 	then
--		echo "$as_me:4957: checking which $CC option to use" >&5
-+		echo "$as_me:5212: checking which $CC option to use" >&5
- echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
- 		cf_save_CFLAGS="$CFLAGS"
- 		for CC_SHARED_OPTS in -fPIC -fpic ''
- 		do
- 			CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
- 			cat >conftest.$ac_ext <<_ACEOF
--#line 4964 "configure"
-+#line 5219 "configure"
- #include "confdefs.h"
- #include <stdio.h>
- int
-@@ -4973,16 +5228,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:4976: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:5231: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:4979: \$? = $ac_status" >&5
-+  echo "$as_me:5234: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:4982: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:5237: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:4985: \$? = $ac_status" >&5
-+  echo "$as_me:5240: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   break
- else
-@@ -4991,7 +5246,7 @@
- fi
- rm -f conftest.$ac_objext conftest.$ac_ext
- 		done
--		echo "$as_me:4994: result: $CC_SHARED_OPTS" >&5
-+		echo "$as_me:5249: result: $CC_SHARED_OPTS" >&5
- echo "${ECHO_T}$CC_SHARED_OPTS" >&6
- 		CFLAGS="$cf_save_CFLAGS"
- 	fi
-@@ -4999,6 +5254,12 @@
- 	cf_cv_shlib_version_infix=no
- 
- 	case $cf_cv_system_name in
-+	aix[56]*)
-+		if test "$GCC" = yes; then
-+			CC_SHARED_OPTS=
-+			MK_SHARED_LIB="$(CC) -shared"
-+		fi
-+		;;
- 	beos*)
- 		MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
- 		;;
-@@ -5027,7 +5288,7 @@
- 		MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
- 		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
- 		cf_cv_shlib_version_infix=yes
--		echo "$as_me:5030: checking if ld -search_paths_first works" >&5
-+		echo "$as_me:5291: checking if ld -search_paths_first works" >&5
- echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
- if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -5036,7 +5297,7 @@
- 			cf_save_LDFLAGS=$LDFLAGS
- 			LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
- 			cat >conftest.$ac_ext <<_ACEOF
--#line 5039 "configure"
-+#line 5300 "configure"
- #include "confdefs.h"
- 
- int
-@@ -5048,16 +5309,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:5051: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:5312: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:5054: \$? = $ac_status" >&5
-+  echo "$as_me:5315: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:5057: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:5318: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:5060: \$? = $ac_status" >&5
-+  echo "$as_me:5321: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_ldflags_search_paths_first=yes
- else
-@@ -5068,7 +5329,7 @@
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- 				LDFLAGS=$cf_save_LDFLAGS
- fi
--echo "$as_me:5071: result: $cf_cv_ldflags_search_paths_first" >&5
-+echo "$as_me:5332: result: $cf_cv_ldflags_search_paths_first" >&5
- echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
- 		if test $cf_cv_ldflags_search_paths_first = yes; then
- 			LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
-@@ -5090,10 +5351,10 @@
- 	irix*)
- 		if test "$cf_cv_ld_rpath" = yes ; then
- 			if test "$GCC" = yes; then
--				cf_ld_rpath_opt="-Wl,-rpath,"
-+				LD_RPATH_OPT="-Wl,-rpath,"
- 				EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
- 			else
--				cf_ld_rpath_opt="-rpath "
-+				LD_RPATH_OPT="-rpath "
- 				EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
- 			fi
- 		fi
-@@ -5112,7 +5373,7 @@
- 			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
- 		fi
- 		if test "$cf_cv_ld_rpath" = yes ; then
--			cf_ld_rpath_opt="-Wl,-rpath,"
-+			LD_RPATH_OPT="-Wl,-rpath,"
- 			EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
- 		fi
- 
-@@ -5131,7 +5392,7 @@
- 			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
- 		fi
- 		if test "$cf_cv_ld_rpath" = yes ; then
--			cf_ld_rpath_opt="-Wl,-rpath,"
-+			LD_RPATH_OPT="-Wl,-rpath,"
- 			EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
- 		fi
- 		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
-@@ -5143,7 +5404,7 @@
- 		cf_cv_shared_soname='`basename $@`'
- 	fi
- 
--		MK_SHARED_LIB='${CC} ${CFLAGS} -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
-+		MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
- 		;;
- 	nto-qnx*|openbsd*|freebsd[12].*)
- 		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
-@@ -5155,7 +5416,7 @@
- 		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
- 			LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
- 			LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
--			cf_ld_rpath_opt="-rpath "
-+			LD_RPATH_OPT="-rpath "
- 			EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
- 		fi
- 
-@@ -5166,11 +5427,11 @@
- 		cf_cv_shared_soname='`basename $@`'
- 	fi
- 
--		MK_SHARED_LIB='${LD} -Bshareable -soname=`basename $@` -o $@'
-+		MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
- 		;;
- 	netbsd*)
- 		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
--		test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
-+		test "$cf_cv_ld_rpath" = yes && LD_RPATH_OPT="-Wl,-rpath,"
- 		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
- 			LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
- 			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
-@@ -5192,7 +5453,7 @@
- 
- 			MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
- 		else
--			MK_SHARED_LIB='${LD} -Bshareable -o $@'
-+			MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
- 		fi
- 		;;
- 	osf*|mls+*)
-@@ -5211,7 +5472,7 @@
- 			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
- 		fi
- 		if test "$cf_cv_ld_rpath" = yes ; then
--			cf_ld_rpath_opt="-rpath"
-+			LD_RPATH_OPT="-rpath"
- 			# EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
- 		fi
- 		cf_cv_rm_so_locs=yes
-@@ -5246,7 +5507,7 @@
- 			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
- 		fi
- 		if test "$cf_cv_ld_rpath" = yes ; then
--			cf_ld_rpath_opt="-R"
-+			LD_RPATH_OPT="-R"
- 			EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
- 		fi
- 
-@@ -5258,7 +5519,43 @@
- 	fi
- 
- 		if test "$GCC" != yes; then
--			CC_SHARED_OPTS='-xcode=pic32'
-+			cf_save_CFLAGS="$CFLAGS"
-+			for cf_shared_opts in -xcode=pic13 -xcode=pic32 -Kpic -KPIC -O
-+			do
-+				CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
-+				cat >conftest.$ac_ext <<_ACEOF
-+#line 5527 "configure"
-+#include "confdefs.h"
-+#include <stdio.h>
-+int
-+main ()
-+{
-+printf("Hello\n");
-+  ;
-+  return 0;
-+}
-+_ACEOF
-+rm -f conftest.$ac_objext
-+if { (eval echo "$as_me:5539: \"$ac_compile\"") >&5
-+  (eval $ac_compile) 2>&5
-+  ac_status=$?
-+  echo "$as_me:5542: \$? = $ac_status" >&5
-+  (exit $ac_status); } &&
-+         { ac_try='test -s conftest.$ac_objext'
-+  { (eval echo "$as_me:5545: \"$ac_try\"") >&5
-+  (eval $ac_try) 2>&5
-+  ac_status=$?
-+  echo "$as_me:5548: \$? = $ac_status" >&5
-+  (exit $ac_status); }; }; then
-+  break
-+else
-+  echo "$as_me: failed program was:" >&5
-+cat conftest.$ac_ext >&5
-+fi
-+rm -f conftest.$ac_objext conftest.$ac_ext
-+			done
-+			CFLAGS="$cf_save_CFLAGS"
-+			CC_SHARED_OPTS=$cf_shared_opts
- 			MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
- 		else
- 			MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
-@@ -5285,20 +5582,20 @@
- 			test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
- 			;;
- 		*)
--			{ echo "$as_me:5288: WARNING: ignored --with-shlib-version" >&5
-+			{ echo "$as_me:5585: WARNING: ignored --with-shlib-version" >&5
- echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
- 			;;
- 		esac
- 		;;
- 	esac
- 
--	if test -n "$cf_ld_rpath_opt" ; then
--		echo "$as_me:5296: checking if we need a space after rpath option" >&5
-+	if test -n "$LD_RPATH_OPT" ; then
-+		echo "$as_me:5593: checking if we need a space after rpath option" >&5
- echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
- 		cf_save_LIBS="$LIBS"
--		LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
-+		LIBS="$LIBS ${LD_RPATH_OPT}$libdir"
- 		cat >conftest.$ac_ext <<_ACEOF
--#line 5301 "configure"
-+#line 5598 "configure"
- #include "confdefs.h"
- 
- int
-@@ -5310,16 +5607,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:5313: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:5610: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:5316: \$? = $ac_status" >&5
-+  echo "$as_me:5613: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:5319: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:5616: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:5322: \$? = $ac_status" >&5
-+  echo "$as_me:5619: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_rpath_space=no
- else
-@@ -5329,16 +5626,16 @@
- fi
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- 		LIBS="$cf_save_LIBS"
--		echo "$as_me:5332: result: $cf_rpath_space" >&5
-+		echo "$as_me:5629: result: $cf_rpath_space" >&5
- echo "${ECHO_T}$cf_rpath_space" >&6
--		test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
--		MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
-+		test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
-+		MK_SHARED_LIB="$MK_SHARED_LIB $LD_RPATH_OPT\${libdir}"
- 	fi
- 
- if test "$CC_SHARED_OPTS" = "unknown"; then
- 	for model in $cf_list_models; do
- 		if test "$model" = "shared"; then
--			{ { echo "$as_me:5341: error: Shared libraries are not supported in this version" >&5
-+			{ { echo "$as_me:5638: error: Shared libraries are not supported in this version" >&5
- echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
-    { (exit 1); exit 1; }; }
- 		fi
-@@ -5348,7 +5645,7 @@
- ###############################################################################
- 
- ###	use option --disable-overwrite to leave out the link to -lcurses
--echo "$as_me:5351: checking if you wish to install ncurses overwriting curses" >&5
-+echo "$as_me:5648: checking if you wish to install ncurses overwriting curses" >&5
- echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
- 
- # Check whether --enable-overwrite or --disable-overwrite was given.
-@@ -5358,10 +5655,10 @@
- else
-   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
- fi;
--echo "$as_me:5361: result: $with_overwrite" >&5
-+echo "$as_me:5658: result: $with_overwrite" >&5
- echo "${ECHO_T}$with_overwrite" >&6
- 
--echo "$as_me:5364: checking if external terminfo-database is used" >&5
-+echo "$as_me:5661: checking if external terminfo-database is used" >&5
- echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
- 
- # Check whether --enable-database or --disable-database was given.
-@@ -5371,7 +5668,7 @@
- else
-   use_database=yes
- fi;
--echo "$as_me:5374: result: $use_database" >&5
-+echo "$as_me:5671: result: $use_database" >&5
- echo "${ECHO_T}$use_database" >&6
- 
- case $host_os in #(vi
-@@ -5384,8 +5681,8 @@
- esac
- 
- 	case $cf_cv_system_name in
--	os2*)	PATHSEP=';'  ;;
--	*)	PATHSEP=':'  ;;
-+	os2*)	PATH_SEPARATOR=';'  ;;
-+	*)	PATH_SEPARATOR=':'  ;;
- 	esac
- 
- if test "$use_database" != no ; then
-@@ -5393,7 +5690,7 @@
- #define USE_DATABASE 1
- EOF
- 
--	echo "$as_me:5396: checking which terminfo source-file will be installed" >&5
-+	echo "$as_me:5693: checking which terminfo source-file will be installed" >&5
- echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
- 
- # Check whether --enable-database or --disable-database was given.
-@@ -5401,10 +5698,10 @@
-   enableval="$enable_database"
-   TERMINFO_SRC=$withval
- fi;
--	echo "$as_me:5404: result: $TERMINFO_SRC" >&5
-+	echo "$as_me:5701: result: $TERMINFO_SRC" >&5
- echo "${ECHO_T}$TERMINFO_SRC" >&6
- 
--	echo "$as_me:5407: checking whether to use hashed database instead of directory/tree" >&5
-+	echo "$as_me:5704: checking whether to use hashed database instead of directory/tree" >&5
- echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
- 
- # Check whether --with-hashed-db or --without-hashed-db was given.
-@@ -5414,13 +5711,13 @@
- else
-   with_hashed_db=no
- fi;
--	echo "$as_me:5417: result: $with_hashed_db" >&5
-+	echo "$as_me:5714: result: $with_hashed_db" >&5
- echo "${ECHO_T}$with_hashed_db" >&6
- else
- 	with_hashed_db=no
- fi
- 
--echo "$as_me:5423: checking for list of fallback descriptions" >&5
-+echo "$as_me:5720: checking for list of fallback descriptions" >&5
- echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
- 
- # Check whether --with-fallbacks or --without-fallbacks was given.
-@@ -5430,11 +5727,11 @@
- else
-   with_fallback=
- fi;
--echo "$as_me:5433: result: $with_fallback" >&5
-+echo "$as_me:5730: result: $with_fallback" >&5
- echo "${ECHO_T}$with_fallback" >&6
- FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
- 
--echo "$as_me:5437: checking if you want modern xterm or antique" >&5
-+echo "$as_me:5734: checking if you want modern xterm or antique" >&5
- echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
- 
- # Check whether --with-xterm-new or --without-xterm-new was given.
-@@ -5448,7 +5745,7 @@
- no)	with_xterm_new=xterm-old;;
- *)	with_xterm_new=xterm-new;;
- esac
--echo "$as_me:5451: result: $with_xterm_new" >&5
-+echo "$as_me:5748: result: $with_xterm_new" >&5
- echo "${ECHO_T}$with_xterm_new" >&6
- WHICH_XTERM=$with_xterm_new
- 
-@@ -5458,7 +5755,7 @@
- 	MAKE_TERMINFO="#"
- else
- 
--echo "$as_me:5461: checking for list of terminfo directories" >&5
-+echo "$as_me:5758: checking for list of terminfo directories" >&5
- echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
- 
- # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
-@@ -5468,7 +5765,7 @@
- else
-   withval=${TERMINFO_DIRS-${datadir}/terminfo}
- fi;
--IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
-+IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
- cf_dst_path=
- for cf_src_path in $withval
- do
-@@ -5498,7 +5795,7 @@
-   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
-   ;;
- *)
--  { { echo "$as_me:5501: error: expected a pathname, not \"$cf_src_path\"" >&5
-+  { { echo "$as_me:5798: error: expected a pathname, not \"$cf_src_path\"" >&5
- echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
-    { (exit 1); exit 1; }; }
-   ;;
-@@ -5511,13 +5808,13 @@
- 
- eval 'TERMINFO_DIRS="$cf_dst_path"'
- 
--echo "$as_me:5514: result: $TERMINFO_DIRS" >&5
-+echo "$as_me:5811: result: $TERMINFO_DIRS" >&5
- echo "${ECHO_T}$TERMINFO_DIRS" >&6
- test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
- #define TERMINFO_DIRS "$TERMINFO_DIRS"
- EOF
- 
--echo "$as_me:5520: checking for default terminfo directory" >&5
-+echo "$as_me:5817: checking for default terminfo directory" >&5
- echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
- 
- # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
-@@ -5553,7 +5850,7 @@
-   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
-   ;;
- *)
--  { { echo "$as_me:5556: error: expected a pathname, not \"$withval\"" >&5
-+  { { echo "$as_me:5853: error: expected a pathname, not \"$withval\"" >&5
- echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
-    { (exit 1); exit 1; }; }
-   ;;
-@@ -5562,7 +5859,7 @@
- fi
- TERMINFO="$withval"
- 
--echo "$as_me:5565: result: $TERMINFO" >&5
-+echo "$as_me:5862: result: $TERMINFO" >&5
- echo "${ECHO_T}$TERMINFO" >&6
- cat >>confdefs.h <<EOF
- #define TERMINFO "$TERMINFO"
-@@ -5572,7 +5869,7 @@
- 
- ###	use option --disable-big-core to make tic run on small machines
- ###	We need 4Mb, check if we can allocate 50% more than that.
--echo "$as_me:5575: checking if big-core option selected" >&5
-+echo "$as_me:5872: checking if big-core option selected" >&5
- echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
- 
- # Check whether --enable-big-core or --disable-big-core was given.
-@@ -5584,7 +5881,7 @@
-   with_big_core=no
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 5587 "configure"
-+#line 5884 "configure"
- #include "confdefs.h"
- 
- #include <stdlib.h>
-@@ -5598,15 +5895,15 @@
- }
- _ACEOF
- rm -f conftest$ac_exeext
--if { (eval echo "$as_me:5601: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:5898: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:5604: \$? = $ac_status" >&5
-+  echo "$as_me:5901: \$? = $ac_status" >&5
-   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
--  { (eval echo "$as_me:5606: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:5903: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:5609: \$? = $ac_status" >&5
-+  echo "$as_me:5906: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   with_big_core=yes
- else
-@@ -5618,7 +5915,7 @@
- rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
- fi
- fi;
--echo "$as_me:5621: result: $with_big_core" >&5
-+echo "$as_me:5918: result: $with_big_core" >&5
- echo "${ECHO_T}$with_big_core" >&6
- test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
- #define HAVE_BIG_CORE 1
-@@ -5627,7 +5924,7 @@
- ### ISO C only guarantees 512-char strings, we have tables which load faster
- ### when constructed using "big" strings.  More than the C compiler, the awk
- ### program is a limit on most vendor UNIX systems.  Check that we can build.
--echo "$as_me:5630: checking if big-strings option selected" >&5
-+echo "$as_me:5927: checking if big-strings option selected" >&5
- echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
- 
- # Check whether --enable-big-strings or --disable-big-strings was given.
-@@ -5636,29 +5933,29 @@
-   with_big_strings=$enableval
- else
- 
--    case x$AWK in #(vi
--    x)
--        eval with_big_strings=no
--        ;;
--    *) #(vi
--        if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
--            | $AWK '{ printf "%d\n", length($0); }' | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ($0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then
--            eval with_big_strings=yes
--        else
--            eval with_big_strings=no
--        fi
--        ;;
--    esac
-+	case x$AWK in #(vi
-+	x)
-+		eval with_big_strings=no
-+		;;
-+	*) #(vi
-+		if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
-+			| $AWK '{ printf "%d\n", length($0); }' | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ($0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then
-+			eval with_big_strings=yes
-+		else
-+			eval with_big_strings=no
-+		fi
-+		;;
-+	esac
- 
- fi;
--echo "$as_me:5654: result: $with_big_strings" >&5
-+echo "$as_me:5951: result: $with_big_strings" >&5
- echo "${ECHO_T}$with_big_strings" >&6
- 
- USE_BIG_STRINGS=0
- test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
- 
- ###	use option --enable-termcap to compile in the termcap fallback support
--echo "$as_me:5661: checking if you want termcap-fallback support" >&5
-+echo "$as_me:5958: checking if you want termcap-fallback support" >&5
- echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
- 
- # Check whether --enable-termcap or --disable-termcap was given.
-@@ -5668,13 +5965,13 @@
- else
-   with_termcap=no
- fi;
--echo "$as_me:5671: result: $with_termcap" >&5
-+echo "$as_me:5968: result: $with_termcap" >&5
- echo "${ECHO_T}$with_termcap" >&6
- 
- if test "$with_termcap" != "yes" ; then
- 	if test "$use_database" = no ; then
- 		if test -z "$with_fallback" ; then
--			{ { echo "$as_me:5677: error: You have disabled the database w/o specifying fallbacks" >&5
-+			{ { echo "$as_me:5974: error: You have disabled the database w/o specifying fallbacks" >&5
- echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
-    { (exit 1); exit 1; }; }
- 		fi
-@@ -5686,7 +5983,7 @@
- else
- 
- if test "$with_ticlib" != no ; then
--	{ { echo "$as_me:5689: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
-+	{ { echo "$as_me:5986: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
- echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
-    { (exit 1); exit 1; }; }
- fi
-@@ -5695,7 +5992,7 @@
- #define USE_TERMCAP 1
- EOF
- 
--echo "$as_me:5698: checking for list of termcap files" >&5
-+echo "$as_me:5995: checking for list of termcap files" >&5
- echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
- 
- # Check whether --with-termpath or --without-termpath was given.
-@@ -5705,7 +6002,7 @@
- else
-   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
- fi;
--IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
-+IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
- cf_dst_path=
- for cf_src_path in $withval
- do
-@@ -5735,7 +6032,7 @@
-   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
-   ;;
- *)
--  { { echo "$as_me:5738: error: expected a pathname, not \"$cf_src_path\"" >&5
-+  { { echo "$as_me:6035: error: expected a pathname, not \"$cf_src_path\"" >&5
- echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
-    { (exit 1); exit 1; }; }
-   ;;
-@@ -5748,14 +6045,14 @@
- 
- eval 'TERMPATH="$cf_dst_path"'
- 
--echo "$as_me:5751: result: $TERMPATH" >&5
-+echo "$as_me:6048: result: $TERMPATH" >&5
- echo "${ECHO_T}$TERMPATH" >&6
- test -n "$TERMPATH" && cat >>confdefs.h <<EOF
- #define TERMPATH "$TERMPATH"
- EOF
- 
- ###	use option --enable-getcap to use a hacked getcap for reading termcaps
--echo "$as_me:5758: checking if fast termcap-loader is needed" >&5
-+echo "$as_me:6055: checking if fast termcap-loader is needed" >&5
- echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
- 
- # Check whether --enable-getcap or --disable-getcap was given.
-@@ -5765,13 +6062,13 @@
- else
-   with_getcap=no
- fi;
--echo "$as_me:5768: result: $with_getcap" >&5
-+echo "$as_me:6065: result: $with_getcap" >&5
- echo "${ECHO_T}$with_getcap" >&6
- test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
- #define USE_GETCAP 1
- EOF
- 
--echo "$as_me:5774: checking if translated termcaps will be cached in ~/.terminfo" >&5
-+echo "$as_me:6071: checking if translated termcaps will be cached in ~/.terminfo" >&5
- echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
- 
- # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
-@@ -5781,7 +6078,7 @@
- else
-   with_getcap_cache=no
- fi;
--echo "$as_me:5784: result: $with_getcap_cache" >&5
-+echo "$as_me:6081: result: $with_getcap_cache" >&5
- echo "${ECHO_T}$with_getcap_cache" >&6
- test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
- #define USE_GETCAP_CACHE 1
-@@ -5790,7 +6087,7 @@
- fi
- 
- ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
--echo "$as_me:5793: checking if ~/.terminfo is wanted" >&5
-+echo "$as_me:6090: checking if ~/.terminfo is wanted" >&5
- echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
- 
- # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
-@@ -5800,13 +6097,13 @@
- else
-   with_home_terminfo=yes
- fi;
--echo "$as_me:5803: result: $with_home_terminfo" >&5
-+echo "$as_me:6100: result: $with_home_terminfo" >&5
- echo "${ECHO_T}$with_home_terminfo" >&6
- test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
- #define USE_HOME_TERMINFO 1
- EOF
- 
--echo "$as_me:5809: checking if you want to use restricted environment when running as root" >&5
-+echo "$as_me:6106: checking if you want to use restricted environment when running as root" >&5
- echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
- 
- # Check whether --enable-root-environ or --disable-root-environ was given.
-@@ -5816,7 +6113,7 @@
- else
-   with_root_environ=yes
- fi;
--echo "$as_me:5819: result: $with_root_environ" >&5
-+echo "$as_me:6116: result: $with_root_environ" >&5
- echo "${ECHO_T}$with_root_environ" >&6
- test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
- #define USE_ROOT_ENVIRON 1
-@@ -5830,13 +6127,13 @@
- 	unlink
- do
- as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
--echo "$as_me:5833: checking for $ac_func" >&5
-+echo "$as_me:6130: checking for $ac_func" >&5
- echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
- if eval "test \"\${$as_ac_var+set}\" = set"; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 5839 "configure"
-+#line 6136 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
-     which can conflict with char $ac_func (); below.  */
-@@ -5867,16 +6164,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:5870: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:6167: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:5873: \$? = $ac_status" >&5
-+  echo "$as_me:6170: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:5876: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:6173: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:5879: \$? = $ac_status" >&5
-+  echo "$as_me:6176: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   eval "$as_ac_var=yes"
- else
-@@ -5886,7 +6183,7 @@
- fi
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- fi
--echo "$as_me:5889: result: `eval echo '${'$as_ac_var'}'`" >&5
-+echo "$as_me:6186: result: `eval echo '${'$as_ac_var'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
- if test `eval echo '${'$as_ac_var'}'` = yes; then
-   cat >>confdefs.h <<EOF
-@@ -5903,13 +6200,13 @@
- 		symlink
- do
- as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
--echo "$as_me:5906: checking for $ac_func" >&5
-+echo "$as_me:6203: checking for $ac_func" >&5
- echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
- if eval "test \"\${$as_ac_var+set}\" = set"; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 5912 "configure"
-+#line 6209 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
-     which can conflict with char $ac_func (); below.  */
-@@ -5940,16 +6237,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:5943: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:6240: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:5946: \$? = $ac_status" >&5
-+  echo "$as_me:6243: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:5949: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:6246: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:5952: \$? = $ac_status" >&5
-+  echo "$as_me:6249: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   eval "$as_ac_var=yes"
- else
-@@ -5959,7 +6256,7 @@
- fi
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- fi
--echo "$as_me:5962: result: `eval echo '${'$as_ac_var'}'`" >&5
-+echo "$as_me:6259: result: `eval echo '${'$as_ac_var'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
- if test `eval echo '${'$as_ac_var'}'` = yes; then
-   cat >>confdefs.h <<EOF
-@@ -5970,7 +6267,7 @@
- done
- 
- else
--	echo "$as_me:5973: checking if link/symlink functions work" >&5
-+	echo "$as_me:6270: checking if link/symlink functions work" >&5
- echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
- if test "${cf_cv_link_funcs+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -5983,7 +6280,7 @@
- 			eval 'ac_cv_func_'$cf_func'=error'
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 5986 "configure"
-+#line 6283 "configure"
- #include "confdefs.h"
- 
- #include <sys/types.h>
-@@ -6013,15 +6310,15 @@
- 
- _ACEOF
- rm -f conftest$ac_exeext
--if { (eval echo "$as_me:6016: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:6313: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:6019: \$? = $ac_status" >&5
-+  echo "$as_me:6316: \$? = $ac_status" >&5
-   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
--  { (eval echo "$as_me:6021: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:6318: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:6024: \$? = $ac_status" >&5
-+  echo "$as_me:6321: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
- 
- 			cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
-@@ -6039,7 +6336,7 @@
- 		test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
- 
- fi
--echo "$as_me:6042: result: $cf_cv_link_funcs" >&5
-+echo "$as_me:6339: result: $cf_cv_link_funcs" >&5
- echo "${ECHO_T}$cf_cv_link_funcs" >&6
- 	test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
- #define HAVE_LINK 1
-@@ -6057,7 +6354,7 @@
- # soft links (symbolic links) are useful for some systems where hard links do
- # not work, or to make it simpler to copy terminfo trees around.
- if test "$ac_cv_func_symlink" = yes ; then
--    echo "$as_me:6060: checking if tic should use symbolic links" >&5
-+    echo "$as_me:6357: checking if tic should use symbolic links" >&5
- echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
- 
- # Check whether --enable-symlinks or --disable-symlinks was given.
-@@ -6067,21 +6364,21 @@
- else
-   with_symlinks=no
- fi;
--    echo "$as_me:6070: result: $with_symlinks" >&5
-+    echo "$as_me:6367: result: $with_symlinks" >&5
- echo "${ECHO_T}$with_symlinks" >&6
- fi
- 
- # If we have hard links and did not choose to use soft links instead, there is
- # no reason to make this choice optional - use the hard links.
- if test "$with_symlinks" = no ; then
--    echo "$as_me:6077: checking if tic should use hard links" >&5
-+    echo "$as_me:6374: checking if tic should use hard links" >&5
- echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
-     if test "$ac_cv_func_link" = yes ; then
- 	with_links=yes
-     else
- 	with_links=no
-     fi
--    echo "$as_me:6084: result: $with_links" >&5
-+    echo "$as_me:6381: result: $with_links" >&5
- echo "${ECHO_T}$with_links" >&6
- fi
- 
-@@ -6094,7 +6391,7 @@
- EOF
- 
- ###   use option --enable-broken-linker to force on use of broken-linker support
--echo "$as_me:6097: checking if you want broken-linker support code" >&5
-+echo "$as_me:6394: checking if you want broken-linker support code" >&5
- echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
- 
- # Check whether --enable-broken_linker or --disable-broken_linker was given.
-@@ -6104,7 +6401,7 @@
- else
-   with_broken_linker=${BROKEN_LINKER-no}
- fi;
--echo "$as_me:6107: result: $with_broken_linker" >&5
-+echo "$as_me:6404: result: $with_broken_linker" >&5
- echo "${ECHO_T}$with_broken_linker" >&6
- 
- BROKEN_LINKER=0
-@@ -6124,14 +6421,14 @@
- 		BROKEN_LINKER=1
- 		test -n "$verbose" && echo "	cygwin linker is broken anyway" 1>&6
- 
--echo "${as_me-configure}:6127: testing cygwin linker is broken anyway ..." 1>&5
-+echo "${as_me-configure}:6424: testing cygwin linker is broken anyway ..." 1>&5
- 
- 		;;
- 	esac
- fi
- 
- ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
--echo "$as_me:6134: checking if tputs should process BSD-style prefix padding" >&5
-+echo "$as_me:6431: checking if tputs should process BSD-style prefix padding" >&5
- echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
- 
- # Check whether --enable-bsdpad or --disable-bsdpad was given.
-@@ -6141,7 +6438,7 @@
- else
-   with_bsdpad=no
- fi;
--echo "$as_me:6144: result: $with_bsdpad" >&5
-+echo "$as_me:6441: result: $with_bsdpad" >&5
- echo "${ECHO_T}$with_bsdpad" >&6
- test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
- #define BSD_TPUTS 1
-@@ -6158,7 +6455,7 @@
- 
- # Check to define _XOPEN_SOURCE "automatically"
- 
--echo "$as_me:6161: checking if $CC -U and -D options work together" >&5
-+echo "$as_me:6458: checking if $CC -U and -D options work together" >&5
- echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
- if test "${cf_cv_cc_u_d_options+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -6167,7 +6464,7 @@
- 	cf_save_CPPFLAGS="$CPPFLAGS"
- 	CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
- 	cat >conftest.$ac_ext <<_ACEOF
--#line 6170 "configure"
-+#line 6467 "configure"
- #include "confdefs.h"
- 
- int
-@@ -6186,16 +6483,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:6189: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:6486: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:6192: \$? = $ac_status" >&5
-+  echo "$as_me:6489: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:6195: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:6492: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:6198: \$? = $ac_status" >&5
-+  echo "$as_me:6495: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
- 
- 	cf_cv_cc_u_d_options=yes
-@@ -6209,14 +6506,14 @@
- 	CPPFLAGS="$cf_save_CPPFLAGS"
- 
- fi
--echo "$as_me:6212: result: $cf_cv_cc_u_d_options" >&5
-+echo "$as_me:6509: result: $cf_cv_cc_u_d_options" >&5
- echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
- 
- cf_XOPEN_SOURCE=500
- cf_POSIX_C_SOURCE=199506L
- 
- case $host_os in #(vi
--aix[45]*) #(vi
-+aix[456]*) #(vi
- 	CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
- 	;;
- freebsd*|dragonfly*) #(vi
-@@ -6227,22 +6524,25 @@
- 	cf_XOPEN_SOURCE=600
- 	CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
- 	;;
-+hpux11*) #(vi
-+	CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
-+	;;
- hpux*) #(vi
- 	CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
- 	;;
- irix[56].*) #(vi
- 	CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
- 	;;
--linux*|gnu*|k*bsd*-gnu) #(vi
-+linux*|gnu*|mint*|k*bsd*-gnu) #(vi
- 
--echo "$as_me:6238: checking if we must define _GNU_SOURCE" >&5
-+echo "$as_me:6538: checking if we must define _GNU_SOURCE" >&5
- echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
- if test "${cf_cv_gnu_source+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- 
- cat >conftest.$ac_ext <<_ACEOF
--#line 6245 "configure"
-+#line 6545 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- int
-@@ -6257,16 +6557,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:6260: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:6560: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:6263: \$? = $ac_status" >&5
-+  echo "$as_me:6563: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:6266: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:6566: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:6269: \$? = $ac_status" >&5
-+  echo "$as_me:6569: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_gnu_source=no
- else
-@@ -6275,7 +6575,7 @@
- cf_save="$CPPFLAGS"
- 	 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
- 	 cat >conftest.$ac_ext <<_ACEOF
--#line 6278 "configure"
-+#line 6578 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- int
-@@ -6290,16 +6590,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:6293: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:6593: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:6296: \$? = $ac_status" >&5
-+  echo "$as_me:6596: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:6299: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:6599: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:6302: \$? = $ac_status" >&5
-+  echo "$as_me:6602: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_gnu_source=no
- else
-@@ -6314,7 +6614,7 @@
- rm -f conftest.$ac_objext conftest.$ac_ext
- 
- fi
--echo "$as_me:6317: result: $cf_cv_gnu_source" >&5
-+echo "$as_me:6617: result: $cf_cv_gnu_source" >&5
- echo "${ECHO_T}$cf_cv_gnu_source" >&6
- test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
- 
-@@ -6341,14 +6641,14 @@
- 	CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
- 	;;
- *)
--	echo "$as_me:6344: checking if we should define _XOPEN_SOURCE" >&5
-+	echo "$as_me:6644: checking if we should define _XOPEN_SOURCE" >&5
- echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
- if test "${cf_cv_xopen_source+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- 
- 	cat >conftest.$ac_ext <<_ACEOF
--#line 6351 "configure"
-+#line 6651 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- int
-@@ -6363,16 +6663,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:6366: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:6666: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:6369: \$? = $ac_status" >&5
-+  echo "$as_me:6669: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:6372: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:6672: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:6375: \$? = $ac_status" >&5
-+  echo "$as_me:6675: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_xopen_source=no
- else
-@@ -6381,7 +6681,7 @@
- cf_save="$CPPFLAGS"
- 	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
- 	 cat >conftest.$ac_ext <<_ACEOF
--#line 6384 "configure"
-+#line 6684 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- int
-@@ -6396,16 +6696,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:6399: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:6699: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:6402: \$? = $ac_status" >&5
-+  echo "$as_me:6702: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:6405: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:6705: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:6408: \$? = $ac_status" >&5
-+  echo "$as_me:6708: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_xopen_source=no
- else
-@@ -6420,7 +6720,7 @@
- rm -f conftest.$ac_objext conftest.$ac_ext
- 
- fi
--echo "$as_me:6423: result: $cf_cv_xopen_source" >&5
-+echo "$as_me:6723: result: $cf_cv_xopen_source" >&5
- echo "${ECHO_T}$cf_cv_xopen_source" >&6
- 	if test "$cf_cv_xopen_source" != no ; then
- 
-@@ -6454,16 +6754,16 @@
- 	sed	-e 's/-[UD]_POSIX_C_SOURCE\(=[^ 	]*\)\?[ 	]/ /g' \
- 		-e 's/-[UD]_POSIX_C_SOURCE\(=[^ 	]*\)\?$//g'`
- 
--echo "$as_me:6457: checking if we should define _POSIX_C_SOURCE" >&5
-+echo "$as_me:6757: checking if we should define _POSIX_C_SOURCE" >&5
- echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
- if test "${cf_cv_posix_c_source+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- 
--echo "${as_me-configure}:6463: testing if the symbol is already defined go no further ..." 1>&5
-+echo "${as_me-configure}:6763: testing if the symbol is already defined go no further ..." 1>&5
- 
- 	cat >conftest.$ac_ext <<_ACEOF
--#line 6466 "configure"
-+#line 6766 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- int
-@@ -6478,16 +6778,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:6481: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:6781: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:6484: \$? = $ac_status" >&5
-+  echo "$as_me:6784: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:6487: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:6787: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:6490: \$? = $ac_status" >&5
-+  echo "$as_me:6790: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_posix_c_source=no
- else
-@@ -6508,7 +6808,7 @@
- 	 esac
- 	 if test "$cf_want_posix_source" = yes ; then
- 		cat >conftest.$ac_ext <<_ACEOF
--#line 6511 "configure"
-+#line 6811 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- int
-@@ -6523,16 +6823,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:6526: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:6826: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:6529: \$? = $ac_status" >&5
-+  echo "$as_me:6829: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:6532: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:6832: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:6535: \$? = $ac_status" >&5
-+  echo "$as_me:6835: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   :
- else
-@@ -6543,15 +6843,15 @@
- rm -f conftest.$ac_objext conftest.$ac_ext
- 	 fi
- 
--echo "${as_me-configure}:6546: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
-+echo "${as_me-configure}:6846: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
- 
- 	 CFLAGS="$cf_trim_CFLAGS"
- 	 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
- 
--echo "${as_me-configure}:6551: testing if the second compile does not leave our definition intact error ..." 1>&5
-+echo "${as_me-configure}:6851: testing if the second compile does not leave our definition intact error ..." 1>&5
- 
- 	 cat >conftest.$ac_ext <<_ACEOF
--#line 6554 "configure"
-+#line 6854 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- int
-@@ -6566,16 +6866,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:6569: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:6869: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:6572: \$? = $ac_status" >&5
-+  echo "$as_me:6872: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:6575: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:6875: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:6578: \$? = $ac_status" >&5
-+  echo "$as_me:6878: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   :
- else
-@@ -6591,7 +6891,7 @@
- rm -f conftest.$ac_objext conftest.$ac_ext
- 
- fi
--echo "$as_me:6594: result: $cf_cv_posix_c_source" >&5
-+echo "$as_me:6894: result: $cf_cv_posix_c_source" >&5
- echo "${ECHO_T}$cf_cv_posix_c_source" >&6
- 
- if test "$cf_cv_posix_c_source" != no ; then
-@@ -6610,14 +6910,14 @@
- 
- # Work around breakage on OS X
- 
--echo "$as_me:6613: checking if SIGWINCH is defined" >&5
-+echo "$as_me:6913: checking if SIGWINCH is defined" >&5
- echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
- if test "${cf_cv_define_sigwinch+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- 
- 	cat >conftest.$ac_ext <<_ACEOF
--#line 6620 "configure"
-+#line 6920 "configure"
- #include "confdefs.h"
- 
- #include <sys/types.h>
-@@ -6632,23 +6932,23 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:6635: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:6935: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:6638: \$? = $ac_status" >&5
-+  echo "$as_me:6938: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:6641: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:6941: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:6644: \$? = $ac_status" >&5
-+  echo "$as_me:6944: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_define_sigwinch=yes
- else
-   echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- cat >conftest.$ac_ext <<_ACEOF
--#line 6651 "configure"
-+#line 6951 "configure"
- #include "confdefs.h"
- 
- #undef _XOPEN_SOURCE
-@@ -6666,16 +6966,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:6669: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:6969: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:6672: \$? = $ac_status" >&5
-+  echo "$as_me:6972: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:6675: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:6975: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:6678: \$? = $ac_status" >&5
-+  echo "$as_me:6978: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_define_sigwinch=maybe
- else
-@@ -6689,11 +6989,11 @@
- rm -f conftest.$ac_objext conftest.$ac_ext
- 
- fi
--echo "$as_me:6692: result: $cf_cv_define_sigwinch" >&5
-+echo "$as_me:6992: result: $cf_cv_define_sigwinch" >&5
- echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
- 
- if test "$cf_cv_define_sigwinch" = maybe ; then
--echo "$as_me:6696: checking for actual SIGWINCH definition" >&5
-+echo "$as_me:6996: checking for actual SIGWINCH definition" >&5
- echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
- if test "${cf_cv_fixup_sigwinch+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -6704,7 +7004,7 @@
- while test $cf_sigwinch != 1
- do
- 	cat >conftest.$ac_ext <<_ACEOF
--#line 6707 "configure"
-+#line 7007 "configure"
- #include "confdefs.h"
- 
- #undef _XOPEN_SOURCE
-@@ -6726,16 +7026,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:6729: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:7029: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:6732: \$? = $ac_status" >&5
-+  echo "$as_me:7032: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:6735: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:7035: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:6738: \$? = $ac_status" >&5
-+  echo "$as_me:7038: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_fixup_sigwinch=$cf_sigwinch
- 	 break
-@@ -6749,7 +7049,7 @@
- done
- 
- fi
--echo "$as_me:6752: result: $cf_cv_fixup_sigwinch" >&5
-+echo "$as_me:7052: result: $cf_cv_fixup_sigwinch" >&5
- echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
- 
- 	if test "$cf_cv_fixup_sigwinch" != unknown ; then
-@@ -6759,13 +7059,13 @@
- 
- # Checks for CODESET support.
- 
--  echo "$as_me:6762: checking for nl_langinfo and CODESET" >&5
-+  echo "$as_me:7062: checking for nl_langinfo and CODESET" >&5
- echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
- if test "${am_cv_langinfo_codeset+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 6768 "configure"
-+#line 7068 "configure"
- #include "confdefs.h"
- #include <langinfo.h>
- int
-@@ -6777,16 +7077,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:6780: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:7080: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:6783: \$? = $ac_status" >&5
-+  echo "$as_me:7083: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:6786: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:7086: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:6789: \$? = $ac_status" >&5
-+  echo "$as_me:7089: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   am_cv_langinfo_codeset=yes
- else
-@@ -6797,7 +7097,7 @@
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- 
- fi
--echo "$as_me:6800: result: $am_cv_langinfo_codeset" >&5
-+echo "$as_me:7100: result: $am_cv_langinfo_codeset" >&5
- echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
-   if test $am_cv_langinfo_codeset = yes; then
- 
-@@ -6811,7 +7111,7 @@
- NCURSES_OK_WCHAR_T=
- NCURSES_OK_WINT_T=
- 
--echo "$as_me:6814: checking if you want wide-character code" >&5
-+echo "$as_me:7114: checking if you want wide-character code" >&5
- echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
- 
- # Check whether --enable-widec or --disable-widec was given.
-@@ -6821,7 +7121,7 @@
- else
-   with_widec=no
- fi;
--echo "$as_me:6824: result: $with_widec" >&5
-+echo "$as_me:7124: result: $with_widec" >&5
- echo "${ECHO_T}$with_widec" >&6
- if test "$with_widec" = yes ; then
- 	LIB_SUFFIX="w${LIB_SUFFIX}"
-@@ -6829,10 +7129,10 @@
- #define USE_WIDEC_SUPPORT 1
- EOF
- 
--echo "$as_me:6832: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
-+echo "$as_me:7132: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
- echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line 6835 "configure"
-+#line 7135 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- 
-@@ -6848,16 +7148,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:6851: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:7151: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:6854: \$? = $ac_status" >&5
-+  echo "$as_me:7154: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:6857: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:7157: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:6860: \$? = $ac_status" >&5
-+  echo "$as_me:7160: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_result=no
- else
-@@ -6866,16 +7166,16 @@
- cf_result=yes
- fi
- rm -f conftest.$ac_objext conftest.$ac_ext
--echo "$as_me:6869: result: $cf_result" >&5
-+echo "$as_me:7169: result: $cf_result" >&5
- echo "${ECHO_T}$cf_result" >&6
- 
- if test "$cf_result" = yes ; then
- 	CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
- elif test "x" != "x" ; then
--	echo "$as_me:6875: checking checking for compatible value versus " >&5
-+	echo "$as_me:7175: checking checking for compatible value versus " >&5
- echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
- 	cat >conftest.$ac_ext <<_ACEOF
--#line 6878 "configure"
-+#line 7178 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- 
-@@ -6891,16 +7191,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:6894: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:7194: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:6897: \$? = $ac_status" >&5
-+  echo "$as_me:7197: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:6900: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:7200: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:6903: \$? = $ac_status" >&5
-+  echo "$as_me:7203: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_result=yes
- else
-@@ -6909,7 +7209,7 @@
- cf_result=no
- fi
- rm -f conftest.$ac_objext conftest.$ac_ext
--	echo "$as_me:6912: result: $cf_result" >&5
-+	echo "$as_me:7212: result: $cf_result" >&5
- echo "${ECHO_T}$cf_result" >&6
- 	if test "$cf_result" = no ; then
- 		# perhaps we can override it - try...
-@@ -6923,13 +7223,13 @@
- for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
- do
- as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
--echo "$as_me:6926: checking for $ac_func" >&5
-+echo "$as_me:7226: checking for $ac_func" >&5
- echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
- if eval "test \"\${$as_ac_var+set}\" = set"; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 6932 "configure"
-+#line 7232 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
-     which can conflict with char $ac_func (); below.  */
-@@ -6960,16 +7260,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:6963: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:7263: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:6966: \$? = $ac_status" >&5
-+  echo "$as_me:7266: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:6969: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:7269: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:6972: \$? = $ac_status" >&5
-+  echo "$as_me:7272: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   eval "$as_ac_var=yes"
- else
-@@ -6979,7 +7279,7 @@
- fi
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- fi
--echo "$as_me:6982: result: `eval echo '${'$as_ac_var'}'`" >&5
-+echo "$as_me:7282: result: `eval echo '${'$as_ac_var'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
- if test `eval echo '${'$as_ac_var'}'` = yes; then
-   cat >>confdefs.h <<EOF
-@@ -6991,7 +7291,7 @@
- 
- 	if test "$ac_cv_func_putwc" != yes ; then
- 
--echo "$as_me:6994: checking for multibyte character support" >&5
-+echo "$as_me:7294: checking for multibyte character support" >&5
- echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
- if test "${cf_cv_utf8_lib+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -6999,7 +7299,7 @@
- 
- 	cf_save_LIBS="$LIBS"
- 	cat >conftest.$ac_ext <<_ACEOF
--#line 7002 "configure"
-+#line 7302 "configure"
- #include "confdefs.h"
- 
- #include <stdlib.h>
-@@ -7012,16 +7312,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:7015: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:7315: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:7018: \$? = $ac_status" >&5
-+  echo "$as_me:7318: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:7021: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:7321: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:7024: \$? = $ac_status" >&5
-+  echo "$as_me:7324: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_utf8_lib=yes
- else
-@@ -7033,10 +7333,10 @@
- cf_cv_header_path_utf8=
- cf_cv_library_path_utf8=
- 
--echo "${as_me-configure}:7036: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
-+echo "${as_me-configure}:7336: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
- 
- cat >conftest.$ac_ext <<_ACEOF
--#line 7039 "configure"
-+#line 7339 "configure"
- #include "confdefs.h"
- 
- #include <libutf8.h>
-@@ -7049,16 +7349,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:7052: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:7352: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:7055: \$? = $ac_status" >&5
-+  echo "$as_me:7355: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:7058: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:7358: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:7061: \$? = $ac_status" >&5
-+  echo "$as_me:7361: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_find_linkage_utf8=yes
- else
-@@ -7067,12 +7367,41 @@
- 
-     cf_cv_find_linkage_utf8=no
- 
--echo "${as_me-configure}:7070: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
-+    test -n "$verbose" && echo "	find linkage for utf8 library" 1>&6
-+
-+echo "${as_me-configure}:7372: testing find linkage for utf8 library ..." 1>&5
-+
-+echo "${as_me-configure}:7374: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
- 
-     cf_save_CPPFLAGS="$CPPFLAGS"
-     cf_test_CPPFLAGS="$CPPFLAGS"
- 
--    cf_search=""
-+cf_header_path_list=""
-+if test -n "${CFLAGS}${CPPFLAGS}" ; then
-+	for cf_header_path in $CPPFLAGS $CFLAGS
-+	do
-+		case $cf_header_path in #(vi
-+		-I*)
-+			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
-+
-+test "$cf_header_path" != "NONE" && \
-+test -d "$cf_header_path" && \
-+ {
-+	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
-+	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
-+	test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
-+	test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
-+	test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
-+	test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
-+}
-+
-+			cf_header_path_list="$cf_header_path_list $cf_search"
-+			;;
-+		esac
-+	done
-+fi
-+
-+cf_search=""
- 
- test "/usr" != "$prefix" && \
- test -d "/usr" && \
-@@ -7143,16 +7472,18 @@
- 	test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
- }
- 
-+cf_search="$cf_header_path_list $cf_search"
-+
-     for cf_cv_header_path_utf8 in $cf_search
-     do
-       if test -d $cf_cv_header_path_utf8 ; then
-         test -n "$verbose" && echo "	... testing $cf_cv_header_path_utf8" 1>&6
- 
--echo "${as_me-configure}:7151: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
-+echo "${as_me-configure}:7482: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
- 
-         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
-         cat >conftest.$ac_ext <<_ACEOF
--#line 7155 "configure"
-+#line 7486 "configure"
- #include "confdefs.h"
- 
- #include <libutf8.h>
-@@ -7165,21 +7496,21 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:7168: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:7499: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:7171: \$? = $ac_status" >&5
-+  echo "$as_me:7502: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:7174: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:7505: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:7177: \$? = $ac_status" >&5
-+  echo "$as_me:7508: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
- 
-             test -n "$verbose" && echo "	... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
- 
--echo "${as_me-configure}:7182: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
-+echo "${as_me-configure}:7513: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
- 
-             cf_cv_find_linkage_utf8=maybe
-             cf_test_CPPFLAGS="$CPPFLAGS"
-@@ -7197,13 +7528,39 @@
- 
-     if test "$cf_cv_find_linkage_utf8" = maybe ; then
- 
--echo "${as_me-configure}:7200: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
-+echo "${as_me-configure}:7531: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
- 
-       cf_save_LIBS="$LIBS"
-       cf_save_LDFLAGS="$LDFLAGS"
- 
-       if test "$cf_cv_find_linkage_utf8" != yes ; then
--        cf_search=""
-+
-+cf_library_path_list=""
-+if test -n "${LDFLAGS}${LIBS}" ; then
-+	for cf_library_path in $LDFLAGS $LIBS
-+	do
-+		case $cf_library_path in #(vi
-+		-L*)
-+			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
-+
-+test "$cf_library_path" != "NONE" && \
-+test -d "$cf_library_path" && \
-+ {
-+	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
-+	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
-+	test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
-+	test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
-+	test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
-+	test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
-+}
-+
-+			cf_library_path_list="$cf_library_path_list $cf_search"
-+			;;
-+		esac
-+	done
-+fi
-+
-+cf_search=""
- 
- test "/usr" != "$prefix" && \
- test -d "/usr" && \
-@@ -7260,18 +7617,20 @@
- 	test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
- }
- 
-+cf_search="$cf_library_path_list $cf_search"
-+
-         for cf_cv_library_path_utf8 in $cf_search
-         do
-           if test -d $cf_cv_library_path_utf8 ; then
-             test -n "$verbose" && echo "	... testing $cf_cv_library_path_utf8" 1>&6
- 
--echo "${as_me-configure}:7268: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
-+echo "${as_me-configure}:7627: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
- 
-             CPPFLAGS="$cf_test_CPPFLAGS"
-             LIBS="-lutf8  $cf_save_LIBS"
-             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
-             cat >conftest.$ac_ext <<_ACEOF
--#line 7274 "configure"
-+#line 7633 "configure"
- #include "confdefs.h"
- 
- #include <libutf8.h>
-@@ -7284,21 +7643,21 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:7287: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:7646: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:7290: \$? = $ac_status" >&5
-+  echo "$as_me:7649: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:7293: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:7652: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:7296: \$? = $ac_status" >&5
-+  echo "$as_me:7655: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
- 
-                 test -n "$verbose" && echo "	... found utf8 library in $cf_cv_library_path_utf8" 1>&6
- 
--echo "${as_me-configure}:7301: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
-+echo "${as_me-configure}:7660: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
- 
-                 cf_cv_find_linkage_utf8=yes
-                 cf_cv_library_file_utf8="-lutf8"
-@@ -7336,7 +7695,7 @@
- fi
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- fi
--echo "$as_me:7339: result: $cf_cv_utf8_lib" >&5
-+echo "$as_me:7698: result: $cf_cv_utf8_lib" >&5
- echo "${ECHO_T}$cf_cv_utf8_lib" >&6
- 
- # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
-@@ -7364,13 +7723,13 @@
- 		fi
- 
- 		if test "$cf_have_incdir" = no ; then
--          if test "$cf_add_incdir" = /usr/local/include ; then
-+		  if test "$cf_add_incdir" = /usr/local/include ; then
- 			if test "$GCC" = yes
- 			then
- 			  cf_save_CPPFLAGS=$CPPFLAGS
- 			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
- 			  cat >conftest.$ac_ext <<_ACEOF
--#line 7373 "configure"
-+#line 7732 "configure"
- #include "confdefs.h"
- #include <stdio.h>
- int
-@@ -7382,16 +7741,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:7385: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:7744: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:7388: \$? = $ac_status" >&5
-+  echo "$as_me:7747: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:7391: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:7750: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:7394: \$? = $ac_status" >&5
-+  echo "$as_me:7753: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   :
- else
-@@ -7408,13 +7767,13 @@
- 		if test "$cf_have_incdir" = no ; then
- 		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
- 
--echo "${as_me-configure}:7411: testing adding $cf_add_incdir to include-path ..." 1>&5
-+echo "${as_me-configure}:7770: testing adding $cf_add_incdir to include-path ..." 1>&5
- 
--		  CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
-+		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
- 
--          cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
--          test "$cf_top_incdir" = "$cf_add_incdir" && break
--          cf_add_incdir="$cf_top_incdir"
-+		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
-+		  test "$cf_top_incdir" = "$cf_add_incdir" && break
-+		  cf_add_incdir="$cf_top_incdir"
- 		else
- 		  break
- 		fi
-@@ -7442,7 +7801,7 @@
-       if test "$cf_have_libdir" = no ; then
-         test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
- 
--echo "${as_me-configure}:7445: testing adding $cf_add_libdir to library-path ..." 1>&5
-+echo "${as_me-configure}:7804: testing adding $cf_add_libdir to library-path ..." 1>&5
- 
-         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
-       fi
-@@ -7459,14 +7818,14 @@
- 	fi
- 
- # This is needed on Tru64 5.0 to declare mbstate_t
--echo "$as_me:7462: checking if we must include wchar.h to declare mbstate_t" >&5
-+echo "$as_me:7821: checking if we must include wchar.h to declare mbstate_t" >&5
- echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
- if test "${cf_cv_mbstate_t+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- 
- cat >conftest.$ac_ext <<_ACEOF
--#line 7469 "configure"
-+#line 7828 "configure"
- #include "confdefs.h"
- 
- #include <stdlib.h>
-@@ -7484,23 +7843,23 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:7487: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:7846: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:7490: \$? = $ac_status" >&5
-+  echo "$as_me:7849: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:7493: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:7852: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:7496: \$? = $ac_status" >&5
-+  echo "$as_me:7855: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_mbstate_t=no
- else
-   echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- cat >conftest.$ac_ext <<_ACEOF
--#line 7503 "configure"
-+#line 7862 "configure"
- #include "confdefs.h"
- 
- #include <stdlib.h>
-@@ -7519,16 +7878,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:7522: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:7881: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:7525: \$? = $ac_status" >&5
-+  echo "$as_me:7884: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:7528: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:7887: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:7531: \$? = $ac_status" >&5
-+  echo "$as_me:7890: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_mbstate_t=yes
- else
-@@ -7540,7 +7899,7 @@
- fi
- rm -f conftest.$ac_objext conftest.$ac_ext
- fi
--echo "$as_me:7543: result: $cf_cv_mbstate_t" >&5
-+echo "$as_me:7902: result: $cf_cv_mbstate_t" >&5
- echo "${ECHO_T}$cf_cv_mbstate_t" >&6
- 
- if test "$cf_cv_mbstate_t" = yes ; then
-@@ -7557,14 +7916,14 @@
- fi
- 
- # This is needed on Tru64 5.0 to declare wchar_t
--echo "$as_me:7560: checking if we must include wchar.h to declare wchar_t" >&5
-+echo "$as_me:7919: checking if we must include wchar.h to declare wchar_t" >&5
- echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
- if test "${cf_cv_wchar_t+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- 
- cat >conftest.$ac_ext <<_ACEOF
--#line 7567 "configure"
-+#line 7926 "configure"
- #include "confdefs.h"
- 
- #include <stdlib.h>
-@@ -7582,23 +7941,23 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:7585: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:7944: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:7588: \$? = $ac_status" >&5
-+  echo "$as_me:7947: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:7591: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:7950: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:7594: \$? = $ac_status" >&5
-+  echo "$as_me:7953: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_wchar_t=no
- else
-   echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- cat >conftest.$ac_ext <<_ACEOF
--#line 7601 "configure"
-+#line 7960 "configure"
- #include "confdefs.h"
- 
- #include <stdlib.h>
-@@ -7617,16 +7976,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:7620: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:7979: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:7623: \$? = $ac_status" >&5
-+  echo "$as_me:7982: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:7626: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:7985: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:7629: \$? = $ac_status" >&5
-+  echo "$as_me:7988: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_wchar_t=yes
- else
-@@ -7638,7 +7997,7 @@
- fi
- rm -f conftest.$ac_objext conftest.$ac_ext
- fi
--echo "$as_me:7641: result: $cf_cv_wchar_t" >&5
-+echo "$as_me:8000: result: $cf_cv_wchar_t" >&5
- echo "${ECHO_T}$cf_cv_wchar_t" >&6
- 
- if test "$cf_cv_wchar_t" = yes ; then
-@@ -7660,14 +8019,14 @@
- fi
- 
- # This is needed on Tru64 5.0 to declare wint_t
--echo "$as_me:7663: checking if we must include wchar.h to declare wint_t" >&5
-+echo "$as_me:8022: checking if we must include wchar.h to declare wint_t" >&5
- echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
- if test "${cf_cv_wint_t+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- 
- cat >conftest.$ac_ext <<_ACEOF
--#line 7670 "configure"
-+#line 8029 "configure"
- #include "confdefs.h"
- 
- #include <stdlib.h>
-@@ -7685,23 +8044,23 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:7688: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:8047: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:7691: \$? = $ac_status" >&5
-+  echo "$as_me:8050: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:7694: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:8053: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:7697: \$? = $ac_status" >&5
-+  echo "$as_me:8056: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_wint_t=no
- else
-   echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- cat >conftest.$ac_ext <<_ACEOF
--#line 7704 "configure"
-+#line 8063 "configure"
- #include "confdefs.h"
- 
- #include <stdlib.h>
-@@ -7720,16 +8079,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:7723: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:8082: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:7726: \$? = $ac_status" >&5
-+  echo "$as_me:8085: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:7729: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:8088: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:7732: \$? = $ac_status" >&5
-+  echo "$as_me:8091: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_wint_t=yes
- else
-@@ -7741,7 +8100,7 @@
- fi
- rm -f conftest.$ac_objext conftest.$ac_ext
- fi
--echo "$as_me:7744: result: $cf_cv_wint_t" >&5
-+echo "$as_me:8103: result: $cf_cv_wint_t" >&5
- echo "${ECHO_T}$cf_cv_wint_t" >&6
- 
- if test "$cf_cv_wint_t" = yes ; then
-@@ -7780,7 +8139,7 @@
- 	;;
- esac
- 
--echo "$as_me:7783: checking whether to enable _LP64 definition in curses.h" >&5
-+echo "$as_me:8142: checking whether to enable _LP64 definition in curses.h" >&5
- echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
- 
- # Check whether --enable-lp64 or --disable-lp64 was given.
-@@ -7790,7 +8149,7 @@
- else
-   with_lp64=$default_with_lp64
- fi;
--echo "$as_me:7793: result: $with_lp64" >&5
-+echo "$as_me:8152: result: $with_lp64" >&5
- echo "${ECHO_T}$with_lp64" >&6
- 
- if test "$with_lp64" = yes ; then
-@@ -7806,7 +8165,7 @@
- fi;
- if test "$enable_largefile" != no; then
- 
--  echo "$as_me:7809: checking for special C compiler options needed for large files" >&5
-+  echo "$as_me:8168: checking for special C compiler options needed for large files" >&5
- echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
- if test "${ac_cv_sys_largefile_CC+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -7818,7 +8177,7 @@
-      	 # IRIX 6.2 and later do not support large files by default,
-      	 # so use the C compiler's -n32 option if that helps.
-          cat >conftest.$ac_ext <<_ACEOF
--#line 7821 "configure"
-+#line 8180 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
-  /* Check that off_t can represent 2**63 - 1 correctly.
-@@ -7838,16 +8197,16 @@
- }
- _ACEOF
-      	 rm -f conftest.$ac_objext
--if { (eval echo "$as_me:7841: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:8200: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:7844: \$? = $ac_status" >&5
-+  echo "$as_me:8203: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:7847: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:8206: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:7850: \$? = $ac_status" >&5
-+  echo "$as_me:8209: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   break
- else
-@@ -7857,16 +8216,16 @@
- rm -f conftest.$ac_objext
-      	 CC="$CC -n32"
-      	 rm -f conftest.$ac_objext
--if { (eval echo "$as_me:7860: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:8219: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:7863: \$? = $ac_status" >&5
-+  echo "$as_me:8222: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:7866: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:8225: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:7869: \$? = $ac_status" >&5
-+  echo "$as_me:8228: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_sys_largefile_CC=' -n32'; break
- else
-@@ -7880,13 +8239,13 @@
-        rm -f conftest.$ac_ext
-     fi
- fi
--echo "$as_me:7883: result: $ac_cv_sys_largefile_CC" >&5
-+echo "$as_me:8242: result: $ac_cv_sys_largefile_CC" >&5
- echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
-   if test "$ac_cv_sys_largefile_CC" != no; then
-     CC=$CC$ac_cv_sys_largefile_CC
-   fi
- 
--  echo "$as_me:7889: checking for _FILE_OFFSET_BITS value needed for large files" >&5
-+  echo "$as_me:8248: checking for _FILE_OFFSET_BITS value needed for large files" >&5
- echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
- if test "${ac_cv_sys_file_offset_bits+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -7894,7 +8253,7 @@
-   while :; do
-   ac_cv_sys_file_offset_bits=no
-   cat >conftest.$ac_ext <<_ACEOF
--#line 7897 "configure"
-+#line 8256 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
-  /* Check that off_t can represent 2**63 - 1 correctly.
-@@ -7914,16 +8273,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:7917: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:8276: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:7920: \$? = $ac_status" >&5
-+  echo "$as_me:8279: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:7923: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:8282: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:7926: \$? = $ac_status" >&5
-+  echo "$as_me:8285: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   break
- else
-@@ -7932,7 +8291,7 @@
- fi
- rm -f conftest.$ac_objext conftest.$ac_ext
-   cat >conftest.$ac_ext <<_ACEOF
--#line 7935 "configure"
-+#line 8294 "configure"
- #include "confdefs.h"
- #define _FILE_OFFSET_BITS 64
- #include <sys/types.h>
-@@ -7953,16 +8312,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:7956: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:8315: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:7959: \$? = $ac_status" >&5
-+  echo "$as_me:8318: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:7962: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:8321: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:7965: \$? = $ac_status" >&5
-+  echo "$as_me:8324: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_sys_file_offset_bits=64; break
- else
-@@ -7973,7 +8332,7 @@
-   break
- done
- fi
--echo "$as_me:7976: result: $ac_cv_sys_file_offset_bits" >&5
-+echo "$as_me:8335: result: $ac_cv_sys_file_offset_bits" >&5
- echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
- if test "$ac_cv_sys_file_offset_bits" != no; then
- 
-@@ -7983,7 +8342,7 @@
- 
- fi
- rm -f conftest*
--  echo "$as_me:7986: checking for _LARGE_FILES value needed for large files" >&5
-+  echo "$as_me:8345: checking for _LARGE_FILES value needed for large files" >&5
- echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
- if test "${ac_cv_sys_large_files+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -7991,7 +8350,7 @@
-   while :; do
-   ac_cv_sys_large_files=no
-   cat >conftest.$ac_ext <<_ACEOF
--#line 7994 "configure"
-+#line 8353 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
-  /* Check that off_t can represent 2**63 - 1 correctly.
-@@ -8011,16 +8370,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:8014: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:8373: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:8017: \$? = $ac_status" >&5
-+  echo "$as_me:8376: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:8020: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:8379: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:8023: \$? = $ac_status" >&5
-+  echo "$as_me:8382: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   break
- else
-@@ -8029,7 +8388,7 @@
- fi
- rm -f conftest.$ac_objext conftest.$ac_ext
-   cat >conftest.$ac_ext <<_ACEOF
--#line 8032 "configure"
-+#line 8391 "configure"
- #include "confdefs.h"
- #define _LARGE_FILES 1
- #include <sys/types.h>
-@@ -8050,16 +8409,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:8053: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:8412: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:8056: \$? = $ac_status" >&5
-+  echo "$as_me:8415: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:8059: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:8418: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:8062: \$? = $ac_status" >&5
-+  echo "$as_me:8421: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_sys_large_files=1; break
- else
-@@ -8070,7 +8429,7 @@
-   break
- done
- fi
--echo "$as_me:8073: result: $ac_cv_sys_large_files" >&5
-+echo "$as_me:8432: result: $ac_cv_sys_large_files" >&5
- echo "${ECHO_T}$ac_cv_sys_large_files" >&6
- if test "$ac_cv_sys_large_files" != no; then
- 
-@@ -8083,7 +8442,7 @@
- fi
- 
-     if test "$enable_largefile" != no ; then
--	echo "$as_me:8086: checking for _LARGEFILE_SOURCE value needed for large files" >&5
-+	echo "$as_me:8445: checking for _LARGEFILE_SOURCE value needed for large files" >&5
- echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
- if test "${ac_cv_sys_largefile_source+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -8091,7 +8450,7 @@
-   while :; do
-   ac_cv_sys_largefile_source=no
-   cat >conftest.$ac_ext <<_ACEOF
--#line 8094 "configure"
-+#line 8453 "configure"
- #include "confdefs.h"
- #include <stdio.h>
- int
-@@ -8103,16 +8462,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:8106: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:8465: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:8109: \$? = $ac_status" >&5
-+  echo "$as_me:8468: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:8112: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:8471: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:8115: \$? = $ac_status" >&5
-+  echo "$as_me:8474: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   break
- else
-@@ -8121,7 +8480,7 @@
- fi
- rm -f conftest.$ac_objext conftest.$ac_ext
-   cat >conftest.$ac_ext <<_ACEOF
--#line 8124 "configure"
-+#line 8483 "configure"
- #include "confdefs.h"
- #define _LARGEFILE_SOURCE 1
- #include <stdio.h>
-@@ -8134,16 +8493,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:8137: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:8496: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:8140: \$? = $ac_status" >&5
-+  echo "$as_me:8499: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:8143: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:8502: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:8146: \$? = $ac_status" >&5
-+  echo "$as_me:8505: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_sys_largefile_source=1; break
- else
-@@ -8154,7 +8513,7 @@
-   break
- done
- fi
--echo "$as_me:8157: result: $ac_cv_sys_largefile_source" >&5
-+echo "$as_me:8516: result: $ac_cv_sys_largefile_source" >&5
- echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
- if test "$ac_cv_sys_largefile_source" != no; then
- 
-@@ -8168,13 +8527,13 @@
- # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
- # in glibc 2.1.3, but that breaks too many other things.
- # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
--echo "$as_me:8171: checking for fseeko" >&5
-+echo "$as_me:8530: checking for fseeko" >&5
- echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
- if test "${ac_cv_func_fseeko+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 8177 "configure"
-+#line 8536 "configure"
- #include "confdefs.h"
- #include <stdio.h>
- int
-@@ -8186,16 +8545,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:8189: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:8548: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:8192: \$? = $ac_status" >&5
-+  echo "$as_me:8551: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:8195: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:8554: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:8198: \$? = $ac_status" >&5
-+  echo "$as_me:8557: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_func_fseeko=yes
- else
-@@ -8205,7 +8564,7 @@
- fi
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- fi
--echo "$as_me:8208: result: $ac_cv_func_fseeko" >&5
-+echo "$as_me:8567: result: $ac_cv_func_fseeko" >&5
- echo "${ECHO_T}$ac_cv_func_fseeko" >&6
- if test $ac_cv_func_fseeko = yes; then
- 
-@@ -8226,14 +8585,14 @@
- 	test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
- 	test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
- 
--	echo "$as_me:8229: checking whether to use struct dirent64" >&5
-+	echo "$as_me:8588: checking whether to use struct dirent64" >&5
- echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
- if test "${cf_cv_struct_dirent64+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- 
- 		cat >conftest.$ac_ext <<_ACEOF
--#line 8236 "configure"
-+#line 8595 "configure"
- #include "confdefs.h"
- 
- #include <sys/types.h>
-@@ -8254,16 +8613,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:8257: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:8616: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:8260: \$? = $ac_status" >&5
-+  echo "$as_me:8619: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:8263: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:8622: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:8266: \$? = $ac_status" >&5
-+  echo "$as_me:8625: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_struct_dirent64=yes
- else
-@@ -8274,7 +8633,7 @@
- rm -f conftest.$ac_objext conftest.$ac_ext
- 
- fi
--echo "$as_me:8277: result: $cf_cv_struct_dirent64" >&5
-+echo "$as_me:8636: result: $cf_cv_struct_dirent64" >&5
- echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
- 	test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
- #define HAVE_STRUCT_DIRENT64 1
-@@ -8283,7 +8642,7 @@
-     fi
- 
- ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
--echo "$as_me:8286: checking if you want tparm not to use X/Open fixed-parameter list" >&5
-+echo "$as_me:8645: checking if you want tparm not to use X/Open fixed-parameter list" >&5
- echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
- 
- # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
-@@ -8293,14 +8652,14 @@
- else
-   with_tparm_varargs=yes
- fi;
--echo "$as_me:8296: result: $with_tparm_varargs" >&5
-+echo "$as_me:8655: result: $with_tparm_varargs" >&5
- echo "${ECHO_T}$with_tparm_varargs" >&6
- NCURSES_TPARM_VARARGS=0
- test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
- 
- ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
- if test "$with_ticlib" != no ; then
--echo "$as_me:8303: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
-+echo "$as_me:8662: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
- echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
- 
- # Check whether --enable-tic-depends or --disable-tic-depends was given.
-@@ -8310,14 +8669,14 @@
- else
-   with_tic_depends=yes
- fi;
--echo "$as_me:8313: result: $with_tic_depends" >&5
-+echo "$as_me:8672: result: $with_tic_depends" >&5
- echo "${ECHO_T}$with_tic_depends" >&6
- else
- 	with_tic_depends=no
- fi
- 
- ###   use option --with-bool to override bool's type
--echo "$as_me:8320: checking for type of bool" >&5
-+echo "$as_me:8679: checking for type of bool" >&5
- echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
- 
- # Check whether --with-bool or --without-bool was given.
-@@ -8327,10 +8686,10 @@
- else
-   NCURSES_BOOL=auto
- fi;
--echo "$as_me:8330: result: $NCURSES_BOOL" >&5
-+echo "$as_me:8689: result: $NCURSES_BOOL" >&5
- echo "${ECHO_T}$NCURSES_BOOL" >&6
- 
--echo "$as_me:8333: checking for alternate terminal capabilities file" >&5
-+echo "$as_me:8692: checking for alternate terminal capabilities file" >&5
- echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
- 
- # Check whether --with-caps or --without-caps was given.
-@@ -8341,11 +8700,11 @@
-   TERMINFO_CAPS=Caps
- fi;
- test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
--echo "$as_me:8344: result: $TERMINFO_CAPS" >&5
-+echo "$as_me:8703: result: $TERMINFO_CAPS" >&5
- echo "${ECHO_T}$TERMINFO_CAPS" >&6
- 
- ###   use option --with-chtype to override chtype's type
--echo "$as_me:8348: checking for type of chtype" >&5
-+echo "$as_me:8707: checking for type of chtype" >&5
- echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
- 
- # Check whether --with-chtype or --without-chtype was given.
-@@ -8355,11 +8714,11 @@
- else
-   NCURSES_CHTYPE=auto
- fi;
--echo "$as_me:8358: result: $NCURSES_CHTYPE" >&5
-+echo "$as_me:8717: result: $NCURSES_CHTYPE" >&5
- echo "${ECHO_T}$NCURSES_CHTYPE" >&6
- 
- ###   use option --with-ospeed to override ospeed's type
--echo "$as_me:8362: checking for type of ospeed" >&5
-+echo "$as_me:8721: checking for type of ospeed" >&5
- echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
- 
- # Check whether --with-ospeed or --without-ospeed was given.
-@@ -8369,11 +8728,11 @@
- else
-   NCURSES_OSPEED=short
- fi;
--echo "$as_me:8372: result: $NCURSES_OSPEED" >&5
-+echo "$as_me:8731: result: $NCURSES_OSPEED" >&5
- echo "${ECHO_T}$NCURSES_OSPEED" >&6
- 
- ###   use option --with-mmask-t to override mmask_t's type
--echo "$as_me:8376: checking for type of mmask_t" >&5
-+echo "$as_me:8735: checking for type of mmask_t" >&5
- echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
- 
- # Check whether --with-mmask-t or --without-mmask-t was given.
-@@ -8383,11 +8742,25 @@
- else
-   NCURSES_MMASK_T=auto
- fi;
--echo "$as_me:8386: result: $NCURSES_MMASK_T" >&5
-+echo "$as_me:8745: result: $NCURSES_MMASK_T" >&5
- echo "${ECHO_T}$NCURSES_MMASK_T" >&6
- 
-+###   use option --with-ccharw-max to override CCHARW_MAX size
-+echo "$as_me:8749: checking for size CCHARW_MAX" >&5
-+echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
-+
-+# Check whether --with-ccharw-max or --without-ccharw-max was given.
-+if test "${with_ccharw_max+set}" = set; then
-+  withval="$with_ccharw_max"
-+  NCURSES_CCHARW_MAX="$withval"
-+else
-+  NCURSES_CCHARW_MAX=5
-+fi;
-+echo "$as_me:8759: result: $NCURSES_CCHARW_MAX" >&5
-+echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
-+
- ### Enable compiling-in rcs id's
--echo "$as_me:8390: checking if RCS identifiers should be compiled-in" >&5
-+echo "$as_me:8763: checking if RCS identifiers should be compiled-in" >&5
- echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
- 
- # Check whether --with-rcs-ids or --without-rcs-ids was given.
-@@ -8397,7 +8770,7 @@
- else
-   with_rcs_ids=no
- fi;
--echo "$as_me:8400: result: $with_rcs_ids" >&5
-+echo "$as_me:8773: result: $with_rcs_ids" >&5
- echo "${ECHO_T}$with_rcs_ids" >&6
- test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
- #define USE_RCS_IDS 1
-@@ -8405,7 +8778,7 @@
- 
- ###############################################################################
- 
--echo "$as_me:8408: checking format of man-pages" >&5
-+echo "$as_me:8781: checking format of man-pages" >&5
- echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
- 
- # Check whether --with-manpage-format or --without-manpage-format was given.
-@@ -8433,7 +8806,7 @@
-   cf_catonly=yes
-   cf_example=date
- 
--  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
-+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
-   for cf_dir in $MANPATH; do
-     test -z "$cf_dir" && cf_dir=/usr/man
-     for cf_name in $cf_dir/man*/$cf_example.[01]* $cf_dir/cat*/$cf_example.[01]* $cf_dir/man*/$cf_example $cf_dir/cat*/$cf_example
-@@ -8494,14 +8867,14 @@
-   ;;
- esac
- 
--echo "$as_me:8497: result: $MANPAGE_FORMAT" >&5
-+echo "$as_me:8870: result: $MANPAGE_FORMAT" >&5
- echo "${ECHO_T}$MANPAGE_FORMAT" >&6
- if test -n "$cf_unknown" ; then
--  { echo "$as_me:8500: WARNING: Unexpected manpage-format $cf_unknown" >&5
-+  { echo "$as_me:8873: WARNING: Unexpected manpage-format $cf_unknown" >&5
- echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
- fi
- 
--echo "$as_me:8504: checking for manpage renaming" >&5
-+echo "$as_me:8877: checking for manpage renaming" >&5
- echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
- 
- # Check whether --with-manpage-renames or --without-manpage-renames was given.
-@@ -8529,7 +8902,7 @@
-   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
-     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
-   elif test ! -f $MANPAGE_RENAMES ; then
--    { { echo "$as_me:8532: error: not a filename: $MANPAGE_RENAMES" >&5
-+    { { echo "$as_me:8905: error: not a filename: $MANPAGE_RENAMES" >&5
- echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
-    { (exit 1); exit 1; }; }
-   fi
-@@ -8543,10 +8916,10 @@
-   fi
- fi
- 
--echo "$as_me:8546: result: $MANPAGE_RENAMES" >&5
-+echo "$as_me:8919: result: $MANPAGE_RENAMES" >&5
- echo "${ECHO_T}$MANPAGE_RENAMES" >&6
- 
--echo "$as_me:8549: checking if manpage aliases will be installed" >&5
-+echo "$as_me:8922: checking if manpage aliases will be installed" >&5
- echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
- 
- # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
-@@ -8557,7 +8930,7 @@
-   MANPAGE_ALIASES=yes
- fi;
- 
--echo "$as_me:8560: result: $MANPAGE_ALIASES" >&5
-+echo "$as_me:8933: result: $MANPAGE_ALIASES" >&5
- echo "${ECHO_T}$MANPAGE_ALIASES" >&6
- 
- if test "$LN_S" = "ln -s"; then
-@@ -8568,7 +8941,7 @@
- 
- MANPAGE_SYMLINKS=no
- if test "$MANPAGE_ALIASES" = yes ; then
--echo "$as_me:8571: checking if manpage symlinks should be used" >&5
-+echo "$as_me:8944: checking if manpage symlinks should be used" >&5
- echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
- 
- # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
-@@ -8581,17 +8954,17 @@
- 
- if test "$$cf_use_symlinks" = no; then
- if test "$MANPAGE_SYMLINKS" = yes ; then
--	{ echo "$as_me:8584: WARNING: cannot make symlinks" >&5
-+	{ echo "$as_me:8957: WARNING: cannot make symlinks" >&5
- echo "$as_me: WARNING: cannot make symlinks" >&2;}
- 	MANPAGE_SYMLINKS=no
- fi
- fi
- 
--echo "$as_me:8590: result: $MANPAGE_SYMLINKS" >&5
-+echo "$as_me:8963: result: $MANPAGE_SYMLINKS" >&5
- echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
- fi
- 
--echo "$as_me:8594: checking for manpage tbl" >&5
-+echo "$as_me:8967: checking for manpage tbl" >&5
- echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
- 
- # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
-@@ -8602,7 +8975,7 @@
-   MANPAGE_TBL=no
- fi;
- 
--echo "$as_me:8605: result: $MANPAGE_TBL" >&5
-+echo "$as_me:8978: result: $MANPAGE_TBL" >&5
- echo "${ECHO_T}$MANPAGE_TBL" >&6
- 
-   if test "$prefix" = "NONE" ; then
-@@ -8718,7 +9091,7 @@
- 		s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
- CF_EOF
- 
--	for cf_name in  captoinfo clear infocmp infotocap tic toe tput
-+	for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
- 	do
- 		cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
- 		cf_name=`echo $cf_name|sed "$program_transform_name"`
-@@ -8913,7 +9286,7 @@
- ###############################################################################
- 
- ### Note that some functions (such as const) are normally disabled anyway.
--echo "$as_me:8916: checking if you want to build with function extensions" >&5
-+echo "$as_me:9289: checking if you want to build with function extensions" >&5
- echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
- 
- # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
-@@ -8923,7 +9296,7 @@
- else
-   with_ext_funcs=yes
- fi;
--echo "$as_me:8926: result: $with_ext_funcs" >&5
-+echo "$as_me:9299: result: $with_ext_funcs" >&5
- echo "${ECHO_T}$with_ext_funcs" >&6
- if test "$with_ext_funcs" = yes ; then
- 	NCURSES_EXT_FUNCS=1
-@@ -8955,12 +9328,38 @@
- #define NCURSES_EXT_FUNCS 1
- EOF
- 
-+	GENERATED_EXT_FUNCS=generated
- else
- 	NCURSES_EXT_FUNCS=0
-+	GENERATED_EXT_FUNCS=
-+fi
-+
-+echo "$as_me:9337: checking if you want to build with experimental SCREEN extensions" >&5
-+echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
-+
-+# Check whether --enable-sp-funcs or --disable-sp-funcs was given.
-+if test "${enable_sp_funcs+set}" = set; then
-+  enableval="$enable_sp_funcs"
-+  with_sp_funcs=$enableval
-+else
-+  with_sp_funcs=no
-+fi;
-+echo "$as_me:9347: result: $with_sp_funcs" >&5
-+echo "${ECHO_T}$with_sp_funcs" >&6
-+if test "$with_sp_funcs" = yes ; then
-+	NCURSES_SP_FUNCS=1
-+	cat >>confdefs.h <<\EOF
-+#define NCURSES_SP_FUNCS 1
-+EOF
-+
-+	GENERATED_SP_FUNCS=generated
-+else
-+	NCURSES_SP_FUNCS=0
-+	GENERATED_SP_FUNCS=
- fi
- 
- ###   use option --enable-const to turn on use of const beyond that in XSI.
--echo "$as_me:8963: checking for extended use of const keyword" >&5
-+echo "$as_me:9362: checking for extended use of const keyword" >&5
- echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
- 
- # Check whether --enable-const or --disable-const was given.
-@@ -8970,7 +9369,7 @@
- else
-   with_ext_const=no
- fi;
--echo "$as_me:8973: result: $with_ext_const" >&5
-+echo "$as_me:9372: result: $with_ext_const" >&5
- echo "${ECHO_T}$with_ext_const" >&6
- NCURSES_CONST='/*nothing*/'
- if test "$with_ext_const" = yes ; then
-@@ -8978,7 +9377,7 @@
- fi
- 
- ###   use option --enable-ext-colors to turn on use of colors beyond 16.
--echo "$as_me:8981: checking if you want to use extended colors" >&5
-+echo "$as_me:9380: checking if you want to use extended colors" >&5
- echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
- 
- # Check whether --enable-ext-colors or --disable-ext-colors was given.
-@@ -8988,12 +9387,12 @@
- else
-   with_ext_colors=no
- fi;
--echo "$as_me:8991: result: $with_ext_colors" >&5
-+echo "$as_me:9390: result: $with_ext_colors" >&5
- echo "${ECHO_T}$with_ext_colors" >&6
- NCURSES_EXT_COLORS=0
- if test "$with_ext_colors" = yes ; then
- 	if test "$with_widec" != yes ; then
--		{ { echo "$as_me:8996: error: This option applies only to wide-character library" >&5
-+		{ { echo "$as_me:9395: error: This option applies only to wide-character library" >&5
- echo "$as_me: error: This option applies only to wide-character library" >&2;}
-    { (exit 1); exit 1; }; }
- 	else
-@@ -9004,7 +9403,7 @@
- 	5.*)
- 		cf_cv_rel_version=6.0
- 		cf_cv_abi_version=6
--		{ echo "$as_me:9007: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
-+		{ echo "$as_me:9406: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
- echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
- 		;;
- 	esac
-@@ -9019,7 +9418,7 @@
- fi
- 
- ###   use option --enable-ext-mouse to modify coding to support 5-button mice
--echo "$as_me:9022: checking if you want to use extended mouse encoding" >&5
-+echo "$as_me:9421: checking if you want to use extended mouse encoding" >&5
- echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
- 
- # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
-@@ -9029,7 +9428,7 @@
- else
-   with_ext_mouse=no
- fi;
--echo "$as_me:9032: result: $with_ext_mouse" >&5
-+echo "$as_me:9431: result: $with_ext_mouse" >&5
- echo "${ECHO_T}$with_ext_mouse" >&6
- NCURSES_MOUSE_VERSION=1
- if test "$with_ext_mouse" = yes ; then
-@@ -9040,7 +9439,7 @@
- 	5.*)
- 		cf_cv_rel_version=6.0
- 		cf_cv_abi_version=6
--		{ echo "$as_me:9043: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
-+		{ echo "$as_me:9442: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
- echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
- 		;;
- 	esac
-@@ -9048,7 +9447,7 @@
- 
- fi
- 
--echo "$as_me:9051: checking if you want \$NCURSES_NO_PADDING code" >&5
-+echo "$as_me:9450: checking if you want \$NCURSES_NO_PADDING code" >&5
- echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
- 
- # Check whether --enable-no-padding or --disable-no-padding was given.
-@@ -9058,19 +9457,19 @@
- else
-   with_no_padding=$with_ext_funcs
- fi;
--echo "$as_me:9061: result: $with_no_padding" >&5
-+echo "$as_me:9460: result: $with_no_padding" >&5
- echo "${ECHO_T}$with_no_padding" >&6
- test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
- #define NCURSES_NO_PADDING 1
- EOF
- 
--echo "$as_me:9067: checking for ANSI C header files" >&5
-+echo "$as_me:9466: checking for ANSI C header files" >&5
- echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
- if test "${ac_cv_header_stdc+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 9073 "configure"
-+#line 9472 "configure"
- #include "confdefs.h"
- #include <stdlib.h>
- #include <stdarg.h>
-@@ -9078,13 +9477,13 @@
- #include <float.h>
- 
- _ACEOF
--if { (eval echo "$as_me:9081: \"$ac_cpp conftest.$ac_ext\"") >&5
-+if { (eval echo "$as_me:9480: \"$ac_cpp conftest.$ac_ext\"") >&5
-   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-   ac_status=$?
-   egrep -v '^ *\+' conftest.er1 >conftest.err
-   rm -f conftest.er1
-   cat conftest.err >&5
--  echo "$as_me:9087: \$? = $ac_status" >&5
-+  echo "$as_me:9486: \$? = $ac_status" >&5
-   (exit $ac_status); } >/dev/null; then
-   if test -s conftest.err; then
-     ac_cpp_err=$ac_c_preproc_warn_flag
-@@ -9106,7 +9505,7 @@
- if test $ac_cv_header_stdc = yes; then
-   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-   cat >conftest.$ac_ext <<_ACEOF
--#line 9109 "configure"
-+#line 9508 "configure"
- #include "confdefs.h"
- #include <string.h>
- 
-@@ -9124,7 +9523,7 @@
- if test $ac_cv_header_stdc = yes; then
-   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-   cat >conftest.$ac_ext <<_ACEOF
--#line 9127 "configure"
-+#line 9526 "configure"
- #include "confdefs.h"
- #include <stdlib.h>
- 
-@@ -9145,7 +9544,7 @@
-   :
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 9148 "configure"
-+#line 9547 "configure"
- #include "confdefs.h"
- #include <ctype.h>
- #if ((' ' & 0x0FF) == 0x020)
-@@ -9171,15 +9570,15 @@
- }
- _ACEOF
- rm -f conftest$ac_exeext
--if { (eval echo "$as_me:9174: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:9573: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:9177: \$? = $ac_status" >&5
-+  echo "$as_me:9576: \$? = $ac_status" >&5
-   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
--  { (eval echo "$as_me:9179: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:9578: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:9182: \$? = $ac_status" >&5
-+  echo "$as_me:9581: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   :
- else
-@@ -9192,7 +9591,7 @@
- fi
- fi
- fi
--echo "$as_me:9195: result: $ac_cv_header_stdc" >&5
-+echo "$as_me:9594: result: $ac_cv_header_stdc" >&5
- echo "${ECHO_T}$ac_cv_header_stdc" >&6
- if test $ac_cv_header_stdc = yes; then
- 
-@@ -9208,28 +9607,28 @@
-                   inttypes.h stdint.h unistd.h
- do
- as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
--echo "$as_me:9211: checking for $ac_header" >&5
-+echo "$as_me:9610: checking for $ac_header" >&5
- echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
- if eval "test \"\${$as_ac_Header+set}\" = set"; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 9217 "configure"
-+#line 9616 "configure"
- #include "confdefs.h"
- $ac_includes_default
- #include <$ac_header>
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:9223: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:9622: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:9226: \$? = $ac_status" >&5
-+  echo "$as_me:9625: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:9229: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:9628: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:9232: \$? = $ac_status" >&5
-+  echo "$as_me:9631: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   eval "$as_ac_Header=yes"
- else
-@@ -9239,7 +9638,7 @@
- fi
- rm -f conftest.$ac_objext conftest.$ac_ext
- fi
--echo "$as_me:9242: result: `eval echo '${'$as_ac_Header'}'`" >&5
-+echo "$as_me:9641: result: `eval echo '${'$as_ac_Header'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
- if test `eval echo '${'$as_ac_Header'}'` = yes; then
-   cat >>confdefs.h <<EOF
-@@ -9249,13 +9648,13 @@
- fi
- done
- 
--echo "$as_me:9252: checking for signed char" >&5
-+echo "$as_me:9651: checking for signed char" >&5
- echo $ECHO_N "checking for signed char... $ECHO_C" >&6
- if test "${ac_cv_type_signed_char+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 9258 "configure"
-+#line 9657 "configure"
- #include "confdefs.h"
- $ac_includes_default
- int
-@@ -9270,16 +9669,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:9273: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:9672: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:9276: \$? = $ac_status" >&5
-+  echo "$as_me:9675: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:9279: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:9678: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:9282: \$? = $ac_status" >&5
-+  echo "$as_me:9681: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_type_signed_char=yes
- else
-@@ -9289,10 +9688,10 @@
- fi
- rm -f conftest.$ac_objext conftest.$ac_ext
- fi
--echo "$as_me:9292: result: $ac_cv_type_signed_char" >&5
-+echo "$as_me:9691: result: $ac_cv_type_signed_char" >&5
- echo "${ECHO_T}$ac_cv_type_signed_char" >&6
- 
--echo "$as_me:9295: checking size of signed char" >&5
-+echo "$as_me:9694: checking size of signed char" >&5
- echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
- if test "${ac_cv_sizeof_signed_char+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -9301,7 +9700,7 @@
-   if test "$cross_compiling" = yes; then
-   # Depending upon the size, compute the lo and hi bounds.
- cat >conftest.$ac_ext <<_ACEOF
--#line 9304 "configure"
-+#line 9703 "configure"
- #include "confdefs.h"
- $ac_includes_default
- int
-@@ -9313,21 +9712,21 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:9316: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:9715: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:9319: \$? = $ac_status" >&5
-+  echo "$as_me:9718: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:9322: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:9721: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:9325: \$? = $ac_status" >&5
-+  echo "$as_me:9724: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_lo=0 ac_mid=0
-   while :; do
-     cat >conftest.$ac_ext <<_ACEOF
--#line 9330 "configure"
-+#line 9729 "configure"
- #include "confdefs.h"
- $ac_includes_default
- int
-@@ -9339,16 +9738,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:9342: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:9741: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:9345: \$? = $ac_status" >&5
-+  echo "$as_me:9744: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:9348: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:9747: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:9351: \$? = $ac_status" >&5
-+  echo "$as_me:9750: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_hi=$ac_mid; break
- else
-@@ -9364,7 +9763,7 @@
- ac_hi=-1 ac_mid=-1
-   while :; do
-     cat >conftest.$ac_ext <<_ACEOF
--#line 9367 "configure"
-+#line 9766 "configure"
- #include "confdefs.h"
- $ac_includes_default
- int
-@@ -9376,16 +9775,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:9379: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:9778: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:9382: \$? = $ac_status" >&5
-+  echo "$as_me:9781: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:9385: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:9784: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:9388: \$? = $ac_status" >&5
-+  echo "$as_me:9787: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_lo=$ac_mid; break
- else
-@@ -9401,7 +9800,7 @@
- while test "x$ac_lo" != "x$ac_hi"; do
-   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
-   cat >conftest.$ac_ext <<_ACEOF
--#line 9404 "configure"
-+#line 9803 "configure"
- #include "confdefs.h"
- $ac_includes_default
- int
-@@ -9413,16 +9812,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:9416: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:9815: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:9419: \$? = $ac_status" >&5
-+  echo "$as_me:9818: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:9422: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:9821: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:9425: \$? = $ac_status" >&5
-+  echo "$as_me:9824: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_hi=$ac_mid
- else
-@@ -9435,12 +9834,12 @@
- ac_cv_sizeof_signed_char=$ac_lo
- else
-   if test "$cross_compiling" = yes; then
--  { { echo "$as_me:9438: error: cannot run test program while cross compiling" >&5
-+  { { echo "$as_me:9837: error: cannot run test program while cross compiling" >&5
- echo "$as_me: error: cannot run test program while cross compiling" >&2;}
-    { (exit 1); exit 1; }; }
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 9443 "configure"
-+#line 9842 "configure"
- #include "confdefs.h"
- $ac_includes_default
- int
-@@ -9456,15 +9855,15 @@
- }
- _ACEOF
- rm -f conftest$ac_exeext
--if { (eval echo "$as_me:9459: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:9858: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:9462: \$? = $ac_status" >&5
-+  echo "$as_me:9861: \$? = $ac_status" >&5
-   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
--  { (eval echo "$as_me:9464: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:9863: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:9467: \$? = $ac_status" >&5
-+  echo "$as_me:9866: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_sizeof_signed_char=`cat conftest.val`
- else
-@@ -9480,7 +9879,7 @@
-   ac_cv_sizeof_signed_char=0
- fi
- fi
--echo "$as_me:9483: result: $ac_cv_sizeof_signed_char" >&5
-+echo "$as_me:9882: result: $ac_cv_sizeof_signed_char" >&5
- echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
- cat >>confdefs.h <<EOF
- #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
-@@ -9491,7 +9890,7 @@
- else
- 	NCURSES_SBOOL="char"
- fi
--echo "$as_me:9494: checking if you want to use signed Boolean array in term.h" >&5
-+echo "$as_me:9893: checking if you want to use signed Boolean array in term.h" >&5
- echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
- 
- # Check whether --enable-signed-char or --disable-signed-char was given.
-@@ -9501,12 +9900,12 @@
- else
-   with_signed_char=no
- fi;
--echo "$as_me:9504: result: $with_signed_char" >&5
-+echo "$as_me:9903: result: $with_signed_char" >&5
- echo "${ECHO_T}$with_signed_char" >&6
- test "$with_signed_char" != yes && NCURSES_SBOOL="char"
- 
- ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
--echo "$as_me:9509: checking if you want SIGWINCH handler" >&5
-+echo "$as_me:9908: checking if you want SIGWINCH handler" >&5
- echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
- 
- # Check whether --enable-sigwinch or --disable-sigwinch was given.
-@@ -9516,14 +9915,14 @@
- else
-   with_sigwinch=$with_ext_funcs
- fi;
--echo "$as_me:9519: result: $with_sigwinch" >&5
-+echo "$as_me:9918: result: $with_sigwinch" >&5
- echo "${ECHO_T}$with_sigwinch" >&6
- test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
- #define USE_SIGWINCH 1
- EOF
- 
- ###   use option --enable-tcap-names to allow user to define new capabilities
--echo "$as_me:9526: checking if you want user-definable terminal capabilities like termcap" >&5
-+echo "$as_me:9925: checking if you want user-definable terminal capabilities like termcap" >&5
- echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
- 
- # Check whether --enable-tcap-names or --disable-tcap-names was given.
-@@ -9533,7 +9932,7 @@
- else
-   with_tcap_names=$with_ext_funcs
- fi;
--echo "$as_me:9536: result: $with_tcap_names" >&5
-+echo "$as_me:9935: result: $with_tcap_names" >&5
- echo "${ECHO_T}$with_tcap_names" >&6
- NCURSES_XNAMES=0
- test "$with_tcap_names" = yes && NCURSES_XNAMES=1
-@@ -9541,7 +9940,7 @@
- ###############################################################################
- # These options are relatively safe to experiment with.
- 
--echo "$as_me:9544: checking if you want all development code" >&5
-+echo "$as_me:9943: checking if you want all development code" >&5
- echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
- 
- # Check whether --with-develop or --without-develop was given.
-@@ -9551,11 +9950,11 @@
- else
-   with_develop=no
- fi;
--echo "$as_me:9554: result: $with_develop" >&5
-+echo "$as_me:9953: result: $with_develop" >&5
- echo "${ECHO_T}$with_develop" >&6
- 
- ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
--echo "$as_me:9558: checking if you want hard-tabs code" >&5
-+echo "$as_me:9957: checking if you want hard-tabs code" >&5
- echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
- 
- # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
-@@ -9565,14 +9964,14 @@
- else
-   enable_hard_tabs=$with_develop
- fi;
--echo "$as_me:9568: result: $enable_hard_tabs" >&5
-+echo "$as_me:9967: result: $enable_hard_tabs" >&5
- echo "${ECHO_T}$enable_hard_tabs" >&6
- test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
- #define USE_HARD_TABS 1
- EOF
- 
- ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
--echo "$as_me:9575: checking if you want limited support for xmc" >&5
-+echo "$as_me:9974: checking if you want limited support for xmc" >&5
- echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
- 
- # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
-@@ -9582,7 +9981,7 @@
- else
-   enable_xmc_glitch=$with_develop
- fi;
--echo "$as_me:9585: result: $enable_xmc_glitch" >&5
-+echo "$as_me:9984: result: $enable_xmc_glitch" >&5
- echo "${ECHO_T}$enable_xmc_glitch" >&6
- test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
- #define USE_XMC_SUPPORT 1
-@@ -9591,7 +9990,7 @@
- ###############################################################################
- # These are just experimental, probably should not be in a package:
- 
--echo "$as_me:9594: checking if you do not want to assume colors are white-on-black" >&5
-+echo "$as_me:9993: checking if you do not want to assume colors are white-on-black" >&5
- echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
- 
- # Check whether --enable-assumed-color or --disable-assumed-color was given.
-@@ -9601,14 +10000,14 @@
- else
-   with_assumed_color=yes
- fi;
--echo "$as_me:9604: result: $with_assumed_color" >&5
-+echo "$as_me:10003: result: $with_assumed_color" >&5
- echo "${ECHO_T}$with_assumed_color" >&6
- test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
- #define USE_ASSUMED_COLOR 1
- EOF
- 
- ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
--echo "$as_me:9611: checking if you want hashmap scrolling-optimization code" >&5
-+echo "$as_me:10010: checking if you want hashmap scrolling-optimization code" >&5
- echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
- 
- # Check whether --enable-hashmap or --disable-hashmap was given.
-@@ -9618,14 +10017,14 @@
- else
-   with_hashmap=yes
- fi;
--echo "$as_me:9621: result: $with_hashmap" >&5
-+echo "$as_me:10020: result: $with_hashmap" >&5
- echo "${ECHO_T}$with_hashmap" >&6
- test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
- #define USE_HASHMAP 1
- EOF
- 
- ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
--echo "$as_me:9628: checking if you want colorfgbg code" >&5
-+echo "$as_me:10027: checking if you want colorfgbg code" >&5
- echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
- 
- # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
-@@ -9635,7 +10034,7 @@
- else
-   with_colorfgbg=no
- fi;
--echo "$as_me:9638: result: $with_colorfgbg" >&5
-+echo "$as_me:10037: result: $with_colorfgbg" >&5
- echo "${ECHO_T}$with_colorfgbg" >&6
- test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
- #define USE_COLORFGBG 1
-@@ -9644,7 +10043,7 @@
- # This is still experimental (20080329), but should ultimately be moved to
- # the script-block --with-normal, etc.
- 
--echo "$as_me:9647: checking if you want to link with the pthread library" >&5
-+echo "$as_me:10046: checking if you want to link with the pthread library" >&5
- echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
- 
- # Check whether --with-pthread or --without-pthread was given.
-@@ -9654,27 +10053,27 @@
- else
-   with_pthread=no
- fi;
--echo "$as_me:9657: result: $with_pthread" >&5
-+echo "$as_me:10056: result: $with_pthread" >&5
- echo "${ECHO_T}$with_pthread" >&6
- 
- if test "$with_pthread" != no ; then
--    echo "$as_me:9661: checking for pthread.h" >&5
-+    echo "$as_me:10060: checking for pthread.h" >&5
- echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
- if test "${ac_cv_header_pthread_h+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 9667 "configure"
-+#line 10066 "configure"
- #include "confdefs.h"
- #include <pthread.h>
- _ACEOF
--if { (eval echo "$as_me:9671: \"$ac_cpp conftest.$ac_ext\"") >&5
-+if { (eval echo "$as_me:10070: \"$ac_cpp conftest.$ac_ext\"") >&5
-   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-   ac_status=$?
-   egrep -v '^ *\+' conftest.er1 >conftest.err
-   rm -f conftest.er1
-   cat conftest.err >&5
--  echo "$as_me:9677: \$? = $ac_status" >&5
-+  echo "$as_me:10076: \$? = $ac_status" >&5
-   (exit $ac_status); } >/dev/null; then
-   if test -s conftest.err; then
-     ac_cpp_err=$ac_c_preproc_warn_flag
-@@ -9693,7 +10092,7 @@
- fi
- rm -f conftest.err conftest.$ac_ext
- fi
--echo "$as_me:9696: result: $ac_cv_header_pthread_h" >&5
-+echo "$as_me:10095: result: $ac_cv_header_pthread_h" >&5
- echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
- if test $ac_cv_header_pthread_h = yes; then
- 
-@@ -9701,12 +10100,12 @@
- #define HAVE_PTHREADS_H 1
- EOF
- 
--        echo "$as_me:9704: checking if we can link with the pthread library" >&5
-+        echo "$as_me:10103: checking if we can link with the pthread library" >&5
- echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
-         cf_save_LIBS="$LIBS"
-         LIBS="-lpthread $LIBS"
-         cat >conftest.$ac_ext <<_ACEOF
--#line 9709 "configure"
-+#line 10108 "configure"
- #include "confdefs.h"
- 
- #include <pthread.h>
-@@ -9722,16 +10121,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:9725: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:10124: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:9728: \$? = $ac_status" >&5
-+  echo "$as_me:10127: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:9731: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:10130: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:9734: \$? = $ac_status" >&5
-+  echo "$as_me:10133: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   with_pthread=yes
- else
-@@ -9741,7 +10140,7 @@
- fi
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-         LIBS="$cf_save_LIBS"
--        echo "$as_me:9744: result: $with_pthread" >&5
-+        echo "$as_me:10143: result: $with_pthread" >&5
- echo "${ECHO_T}$with_pthread" >&6
- 
-         if test "$with_pthread" = yes ; then
-@@ -9751,7 +10150,7 @@
- EOF
- 
-         else
--            { { echo "$as_me:9754: error: Cannot link with pthread library" >&5
-+            { { echo "$as_me:10153: error: Cannot link with pthread library" >&5
- echo "$as_me: error: Cannot link with pthread library" >&2;}
-    { (exit 1); exit 1; }; }
-         fi
-@@ -9760,7 +10159,7 @@
- 
- fi
- 
--echo "$as_me:9763: checking if you want to use weak-symbols for pthreads" >&5
-+echo "$as_me:10162: checking if you want to use weak-symbols for pthreads" >&5
- echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
- 
- # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
-@@ -9770,18 +10169,18 @@
- else
-   use_weak_symbols=no
- fi;
--echo "$as_me:9773: result: $use_weak_symbols" >&5
-+echo "$as_me:10172: result: $use_weak_symbols" >&5
- echo "${ECHO_T}$use_weak_symbols" >&6
- if test "$use_weak_symbols" = yes ; then
- 
--echo "$as_me:9777: checking if $CC supports weak symbols" >&5
-+echo "$as_me:10176: checking if $CC supports weak symbols" >&5
- echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
- if test "${cf_cv_weak_symbols+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- 
- cat >conftest.$ac_ext <<_ACEOF
--#line 9784 "configure"
-+#line 10183 "configure"
- #include "confdefs.h"
- 
- #include <stdio.h>
-@@ -9807,16 +10206,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:9810: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:10209: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:9813: \$? = $ac_status" >&5
-+  echo "$as_me:10212: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:9816: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:10215: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:9819: \$? = $ac_status" >&5
-+  echo "$as_me:10218: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_weak_symbols=yes
- else
-@@ -9827,7 +10226,7 @@
- rm -f conftest.$ac_objext conftest.$ac_ext
- 
- fi
--echo "$as_me:9830: result: $cf_cv_weak_symbols" >&5
-+echo "$as_me:10229: result: $cf_cv_weak_symbols" >&5
- echo "${ECHO_T}$cf_cv_weak_symbols" >&6
- 
- else
-@@ -9857,7 +10256,7 @@
- # opaque outside of that, so there is no --enable-opaque option.  We can use
- # this option without --with-pthreads, but this will be always set for
- # pthreads.
--echo "$as_me:9860: checking if you want experimental reentrant code" >&5
-+echo "$as_me:10259: checking if you want experimental reentrant code" >&5
- echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
- 
- # Check whether --enable-reentrant or --disable-reentrant was given.
-@@ -9867,21 +10266,21 @@
- else
-   with_reentrant=no
- fi;
--echo "$as_me:9870: result: $with_reentrant" >&5
-+echo "$as_me:10269: result: $with_reentrant" >&5
- echo "${ECHO_T}$with_reentrant" >&6
- if test "$with_reentrant" = yes ; then
- 	cf_cv_enable_reentrant=1
- 	cf_cv_enable_opaque="NCURSES_INTERNALS"
- 	NCURSES_OPAQUE=1
- 	NCURSES_SIZE_T=int
--    if test $cf_cv_weak_symbols = yes ; then
-+	if test $cf_cv_weak_symbols = yes ; then
- 
- # remove pthread library from $LIBS
- LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ 	]//g' -e 's/-lpthread$//'`
- 
--    else
--        LIB_SUFFIX="t${LIB_SUFFIX}"
--    fi
-+	else
-+		LIB_SUFFIX="t${LIB_SUFFIX}"
-+	fi
- 	cat >>confdefs.h <<\EOF
- #define USE_REENTRANT 1
- EOF
-@@ -9891,7 +10290,7 @@
- 	5.*)
- 		cf_cv_rel_version=6.0
- 		cf_cv_abi_version=6
--		{ echo "$as_me:9894: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
-+		{ echo "$as_me:10293: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
- echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
- 		;;
- 	esac
-@@ -9904,7 +10303,29 @@
- 	NCURSES_SIZE_T=short
- fi
- 
--echo "$as_me:9907: checking if you want experimental safe-sprintf code" >&5
-+### Allow using a different wrap-prefix
-+if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
-+	echo "$as_me:10308: checking for prefix used to wrap public variables" >&5
-+echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
-+
-+# Check whether --with-wrap-prefix or --without-wrap-prefix was given.
-+if test "${with_wrap_prefix+set}" = set; then
-+  withval="$with_wrap_prefix"
-+  NCURSES_WRAP_PREFIX=$withval
-+else
-+  NCURSES_WRAP_PREFIX=_nc_
-+fi;
-+	echo "$as_me:10318: result: $NCURSES_WRAP_PREFIX" >&5
-+echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
-+else
-+	NCURSES_WRAP_PREFIX=_nc_
-+fi
-+
-+cat >>confdefs.h <<EOF
-+#define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
-+EOF
-+
-+echo "$as_me:10328: checking if you want experimental safe-sprintf code" >&5
- echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
- 
- # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
-@@ -9914,7 +10335,7 @@
- else
-   with_safe_sprintf=no
- fi;
--echo "$as_me:9917: result: $with_safe_sprintf" >&5
-+echo "$as_me:10338: result: $with_safe_sprintf" >&5
- echo "${ECHO_T}$with_safe_sprintf" >&6
- test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
- #define USE_SAFE_SPRINTF 1
-@@ -9923,7 +10344,7 @@
- ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
- # when hashmap is used scroll hints are useless
- if test "$with_hashmap" = no ; then
--echo "$as_me:9926: checking if you want to experiment without scrolling-hints code" >&5
-+echo "$as_me:10347: checking if you want to experiment without scrolling-hints code" >&5
- echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
- 
- # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
-@@ -9933,7 +10354,7 @@
- else
-   with_scroll_hints=yes
- fi;
--echo "$as_me:9936: result: $with_scroll_hints" >&5
-+echo "$as_me:10357: result: $with_scroll_hints" >&5
- echo "${ECHO_T}$with_scroll_hints" >&6
- test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
- #define USE_SCROLL_HINTS 1
-@@ -9941,7 +10362,7 @@
- 
- fi
- 
--echo "$as_me:9944: checking if you want experimental wgetch-events code" >&5
-+echo "$as_me:10365: checking if you want experimental wgetch-events code" >&5
- echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
- 
- # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
-@@ -9951,7 +10372,7 @@
- else
-   with_wgetch_events=no
- fi;
--echo "$as_me:9954: result: $with_wgetch_events" >&5
-+echo "$as_me:10375: result: $with_wgetch_events" >&5
- echo "${ECHO_T}$with_wgetch_events" >&6
- test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
- #define NCURSES_WGETCH_EVENTS 1
-@@ -9960,7 +10381,7 @@
- ###############################################################################
- 
- ###	use option --disable-echo to suppress full display compiling commands
--echo "$as_me:9963: checking if you want to display full commands during build" >&5
-+echo "$as_me:10384: checking if you want to display full commands during build" >&5
- echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
- 
- # Check whether --enable-echo or --disable-echo was given.
-@@ -9977,11 +10398,11 @@
- 	test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
- 	test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
- fi
--echo "$as_me:9980: result: $with_echo" >&5
-+echo "$as_me:10401: result: $with_echo" >&5
- echo "${ECHO_T}$with_echo" >&6
- 
- ###	use option --enable-warnings to turn on all gcc warnings
--echo "$as_me:9984: checking if you want to see compiler warnings" >&5
-+echo "$as_me:10405: checking if you want to see compiler warnings" >&5
- echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
- 
- # Check whether --enable-warnings or --disable-warnings was given.
-@@ -9989,7 +10410,7 @@
-   enableval="$enable_warnings"
-   with_warnings=$enableval
- fi;
--echo "$as_me:9992: result: $with_warnings" >&5
-+echo "$as_me:10413: result: $with_warnings" >&5
- echo "${ECHO_T}$with_warnings" >&6
- 
- if test "x$with_warnings" = "xyes"; then
-@@ -10000,12 +10421,12 @@
- if test "$GCC" = yes ; then
- 	case $host_os in
- 	linux*|gnu*)
--		echo "$as_me:10003: checking if this is really Intel C compiler" >&5
-+		echo "$as_me:10424: checking if this is really Intel C compiler" >&5
- echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
- 		cf_save_CFLAGS="$CFLAGS"
- 		CFLAGS="$CFLAGS -no-gcc"
- 		cat >conftest.$ac_ext <<_ACEOF
--#line 10008 "configure"
-+#line 10429 "configure"
- #include "confdefs.h"
- 
- int
-@@ -10022,16 +10443,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:10025: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:10446: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:10028: \$? = $ac_status" >&5
-+  echo "$as_me:10449: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:10031: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:10452: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:10034: \$? = $ac_status" >&5
-+  echo "$as_me:10455: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   INTEL_COMPILER=yes
- cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
-@@ -10042,14 +10463,14 @@
- fi
- rm -f conftest.$ac_objext conftest.$ac_ext
- 		CFLAGS="$cf_save_CFLAGS"
--		echo "$as_me:10045: result: $INTEL_COMPILER" >&5
-+		echo "$as_me:10466: result: $INTEL_COMPILER" >&5
- echo "${ECHO_T}$INTEL_COMPILER" >&6
- 		;;
- 	esac
- fi
- 
- cat > conftest.$ac_ext <<EOF
--#line 10052 "${as_me-configure}"
-+#line 10473 "${as_me-configure}"
- int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
- EOF
- 
-@@ -10057,7 +10478,6 @@
- then
- # The "-wdXXX" options suppress warnings:
- # remark #1419: external declaration in primary source file
--# remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
- # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
- # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
- # remark #193: zero used for undefined preprocessing identifier
-@@ -10065,31 +10485,30 @@
- # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
- # remark #869: parameter "tw" was never referenced
- # remark #981: operands are evaluated in unspecified order
--# warning #269: invalid format string conversion
-+# warning #279: controlling expression is constant
- 
--	{ echo "$as_me:10070: checking for $CC warning options..." >&5
-+	{ echo "$as_me:10490: checking for $CC warning options..." >&5
- echo "$as_me: checking for $CC warning options..." >&6;}
- 	cf_save_CFLAGS="$CFLAGS"
- 	EXTRA_CFLAGS="-Wall"
- 	for cf_opt in \
- 		wd1419 \
--		wd1682 \
- 		wd1683 \
- 		wd1684 \
- 		wd193 \
--		wd279 \
- 		wd593 \
-+		wd279 \
- 		wd810 \
- 		wd869 \
- 		wd981
- 	do
- 		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
--		if { (eval echo "$as_me:10087: \"$ac_compile\"") >&5
-+		if { (eval echo "$as_me:10506: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:10090: \$? = $ac_status" >&5
-+  echo "$as_me:10509: \$? = $ac_status" >&5
-   (exit $ac_status); }; then
--			test -n "$verbose" && echo "$as_me:10092: result: ... -$cf_opt" >&5
-+			test -n "$verbose" && echo "$as_me:10511: result: ... -$cf_opt" >&5
- echo "${ECHO_T}... -$cf_opt" >&6
- 			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
- 		fi
-@@ -10098,7 +10517,7 @@
- 
- elif test "$GCC" = yes
- then
--	{ echo "$as_me:10101: checking for $CC warning options..." >&5
-+	{ echo "$as_me:10520: checking for $CC warning options..." >&5
- echo "$as_me: checking for $CC warning options..." >&6;}
- 	cf_save_CFLAGS="$CFLAGS"
- 	EXTRA_CFLAGS="-W -Wall"
-@@ -10118,12 +10537,12 @@
- 		Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
- 	do
- 		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
--		if { (eval echo "$as_me:10121: \"$ac_compile\"") >&5
-+		if { (eval echo "$as_me:10540: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:10124: \$? = $ac_status" >&5
-+  echo "$as_me:10543: \$? = $ac_status" >&5
-   (exit $ac_status); }; then
--			test -n "$verbose" && echo "$as_me:10126: result: ... -$cf_opt" >&5
-+			test -n "$verbose" && echo "$as_me:10545: result: ... -$cf_opt" >&5
- echo "${ECHO_T}... -$cf_opt" >&6
- 			case $cf_opt in #(vi
- 			Wcast-qual) #(vi
-@@ -10134,7 +10553,7 @@
- 				[34].*)
- 					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
- 
--echo "${as_me-configure}:10137: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
-+echo "${as_me-configure}:10556: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
- 
- 					continue;;
- 				esac
-@@ -10154,12 +10573,12 @@
- if test "$GCC" = yes ; then
- 	case $host_os in
- 	linux*|gnu*)
--		echo "$as_me:10157: checking if this is really Intel C++ compiler" >&5
-+		echo "$as_me:10576: checking if this is really Intel C++ compiler" >&5
- echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
- 		cf_save_CFLAGS="$CXXFLAGS"
- 		CXXFLAGS="$CXXFLAGS -no-gcc"
- 		cat >conftest.$ac_ext <<_ACEOF
--#line 10162 "configure"
-+#line 10581 "configure"
- #include "confdefs.h"
- 
- int
-@@ -10176,16 +10595,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:10179: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:10598: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:10182: \$? = $ac_status" >&5
-+  echo "$as_me:10601: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:10185: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:10604: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:10188: \$? = $ac_status" >&5
-+  echo "$as_me:10607: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   INTEL_CPLUSPLUS=yes
- cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
-@@ -10196,7 +10615,7 @@
- fi
- rm -f conftest.$ac_objext conftest.$ac_ext
- 		CXXFLAGS="$cf_save_CFLAGS"
--		echo "$as_me:10199: result: $INTEL_CPLUSPLUS" >&5
-+		echo "$as_me:10618: result: $INTEL_CPLUSPLUS" >&5
- echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
- 		;;
- 	esac
-@@ -10210,7 +10629,7 @@
- ac_main_return=return
- 
- cat > conftest.$ac_ext <<EOF
--#line 10213 "configure"
-+#line 10632 "configure"
- int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
- EOF
- 
-@@ -10228,7 +10647,7 @@
- # remark #981: operands are evaluated in unspecified order
- # warning #269: invalid format string conversion
- 
--	{ echo "$as_me:10231: checking for $CC warning options..." >&5
-+	{ echo "$as_me:10650: checking for $CC warning options..." >&5
- echo "$as_me: checking for $CC warning options..." >&6;}
- 	cf_save_CXXFLAGS="$CXXFLAGS"
- 	EXTRA_CXXFLAGS="-Wall"
-@@ -10245,12 +10664,12 @@
- 		wd981
- 	do
- 		CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
--		if { (eval echo "$as_me:10248: \"$ac_compile\"") >&5
-+		if { (eval echo "$as_me:10667: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:10251: \$? = $ac_status" >&5
-+  echo "$as_me:10670: \$? = $ac_status" >&5
-   (exit $ac_status); }; then
--			test -n "$verbose" && echo "$as_me:10253: result: ... -$cf_opt" >&5
-+			test -n "$verbose" && echo "$as_me:10672: result: ... -$cf_opt" >&5
- echo "${ECHO_T}... -$cf_opt" >&6
- 			EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
- 		fi
-@@ -10259,7 +10678,7 @@
- 
- elif test "$GXX" = yes
- then
--	{ echo "$as_me:10262: checking for $CXX warning options..." >&5
-+	{ echo "$as_me:10681: checking for $CXX warning options..." >&5
- echo "$as_me: checking for $CXX warning options..." >&6;}
- 	cf_save_CXXFLAGS="$CXXFLAGS"
- 	EXTRA_CXXFLAGS="-W -Wall"
-@@ -10288,16 +10707,16 @@
- 		Wundef $cf_gxx_extra_warnings Wno-unused
- 	do
- 		CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
--		if { (eval echo "$as_me:10291: \"$ac_compile\"") >&5
-+		if { (eval echo "$as_me:10710: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:10294: \$? = $ac_status" >&5
-+  echo "$as_me:10713: \$? = $ac_status" >&5
-   (exit $ac_status); }; then
--			test -n "$verbose" && echo "$as_me:10296: result: ... -$cf_opt" >&5
-+			test -n "$verbose" && echo "$as_me:10715: result: ... -$cf_opt" >&5
- echo "${ECHO_T}... -$cf_opt" >&6
- 			EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
- 		else
--			test -n "$verbose" && echo "$as_me:10300: result: ... no -$cf_opt" >&5
-+			test -n "$verbose" && echo "$as_me:10719: result: ... no -$cf_opt" >&5
- echo "${ECHO_T}... no -$cf_opt" >&6
- 		fi
- 	done
-@@ -10333,10 +10752,10 @@
- EOF
- if test "$GCC" = yes
- then
--	{ echo "$as_me:10336: checking for $CC __attribute__ directives..." >&5
-+	{ echo "$as_me:10755: checking for $CC __attribute__ directives..." >&5
- echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
- cat > conftest.$ac_ext <<EOF
--#line 10339 "${as_me-configure}"
-+#line 10758 "${as_me-configure}"
- #include "confdefs.h"
- #include "conftest.h"
- #include "conftest.i"
-@@ -10374,12 +10793,12 @@
- EOF
- 			;;
- 		esac
--		if { (eval echo "$as_me:10377: \"$ac_compile\"") >&5
-+		if { (eval echo "$as_me:10796: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:10380: \$? = $ac_status" >&5
-+  echo "$as_me:10799: \$? = $ac_status" >&5
-   (exit $ac_status); }; then
--			test -n "$verbose" && echo "$as_me:10382: result: ... $cf_attribute" >&5
-+			test -n "$verbose" && echo "$as_me:10801: result: ... $cf_attribute" >&5
- echo "${ECHO_T}... $cf_attribute" >&6
- 			cat conftest.h >>confdefs.h
- 		fi
-@@ -10391,7 +10810,7 @@
- fi
- 
- ###	use option --enable-assertions to turn on generation of assertion code
--echo "$as_me:10394: checking if you want to enable runtime assertions" >&5
-+echo "$as_me:10813: checking if you want to enable runtime assertions" >&5
- echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
- 
- # Check whether --enable-assertions or --disable-assertions was given.
-@@ -10401,7 +10820,7 @@
- else
-   with_assertions=no
- fi;
--echo "$as_me:10404: result: $with_assertions" >&5
-+echo "$as_me:10823: result: $with_assertions" >&5
- echo "${ECHO_T}$with_assertions" >&6
- if test -n "$GCC"
- then
-@@ -10419,7 +10838,7 @@
- 
- ###	use option --disable-leaks to suppress "permanent" leaks, for testing
- 
--echo "$as_me:10422: checking if you want to use dmalloc for testing" >&5
-+echo "$as_me:10841: checking if you want to use dmalloc for testing" >&5
- echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
- 
- # Check whether --with-dmalloc or --without-dmalloc was given.
-@@ -10435,7 +10854,7 @@
- else
-   with_dmalloc=
- fi;
--echo "$as_me:10438: result: ${with_dmalloc:-no}" >&5
-+echo "$as_me:10857: result: ${with_dmalloc:-no}" >&5
- echo "${ECHO_T}${with_dmalloc:-no}" >&6
- 
- case .$with_cflags in #(vi
-@@ -10505,7 +10924,7 @@
- 
- if test -n "$cf_new_cppflags" ; then
- 
--	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
-+	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
- fi
- 
- if test -n "$cf_new_extra_cppflags" ; then
-@@ -10519,23 +10938,23 @@
- esac
- 
- if test "$with_dmalloc" = yes ; then
--	echo "$as_me:10522: checking for dmalloc.h" >&5
-+	echo "$as_me:10941: checking for dmalloc.h" >&5
- echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
- if test "${ac_cv_header_dmalloc_h+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 10528 "configure"
-+#line 10947 "configure"
- #include "confdefs.h"
- #include <dmalloc.h>
- _ACEOF
--if { (eval echo "$as_me:10532: \"$ac_cpp conftest.$ac_ext\"") >&5
-+if { (eval echo "$as_me:10951: \"$ac_cpp conftest.$ac_ext\"") >&5
-   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-   ac_status=$?
-   egrep -v '^ *\+' conftest.er1 >conftest.err
-   rm -f conftest.er1
-   cat conftest.err >&5
--  echo "$as_me:10538: \$? = $ac_status" >&5
-+  echo "$as_me:10957: \$? = $ac_status" >&5
-   (exit $ac_status); } >/dev/null; then
-   if test -s conftest.err; then
-     ac_cpp_err=$ac_c_preproc_warn_flag
-@@ -10554,11 +10973,11 @@
- fi
- rm -f conftest.err conftest.$ac_ext
- fi
--echo "$as_me:10557: result: $ac_cv_header_dmalloc_h" >&5
-+echo "$as_me:10976: result: $ac_cv_header_dmalloc_h" >&5
- echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
- if test $ac_cv_header_dmalloc_h = yes; then
- 
--echo "$as_me:10561: checking for dmalloc_debug in -ldmalloc" >&5
-+echo "$as_me:10980: checking for dmalloc_debug in -ldmalloc" >&5
- echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
- if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -10566,7 +10985,7 @@
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-ldmalloc  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
--#line 10569 "configure"
-+#line 10988 "configure"
- #include "confdefs.h"
- 
- /* Override any gcc2 internal prototype to avoid an error.  */
-@@ -10585,16 +11004,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:10588: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:11007: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:10591: \$? = $ac_status" >&5
-+  echo "$as_me:11010: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:10594: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:11013: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:10597: \$? = $ac_status" >&5
-+  echo "$as_me:11016: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_lib_dmalloc_dmalloc_debug=yes
- else
-@@ -10605,7 +11024,7 @@
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
- fi
--echo "$as_me:10608: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
-+echo "$as_me:11027: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
- echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
- if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
-   cat >>confdefs.h <<EOF
-@@ -10620,7 +11039,7 @@
- 
- fi
- 
--echo "$as_me:10623: checking if you want to use dbmalloc for testing" >&5
-+echo "$as_me:11042: checking if you want to use dbmalloc for testing" >&5
- echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
- 
- # Check whether --with-dbmalloc or --without-dbmalloc was given.
-@@ -10636,7 +11055,7 @@
- else
-   with_dbmalloc=
- fi;
--echo "$as_me:10639: result: ${with_dbmalloc:-no}" >&5
-+echo "$as_me:11058: result: ${with_dbmalloc:-no}" >&5
- echo "${ECHO_T}${with_dbmalloc:-no}" >&6
- 
- case .$with_cflags in #(vi
-@@ -10706,7 +11125,7 @@
- 
- if test -n "$cf_new_cppflags" ; then
- 
--	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
-+	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
- fi
- 
- if test -n "$cf_new_extra_cppflags" ; then
-@@ -10720,23 +11139,23 @@
- esac
- 
- if test "$with_dbmalloc" = yes ; then
--	echo "$as_me:10723: checking for dbmalloc.h" >&5
-+	echo "$as_me:11142: checking for dbmalloc.h" >&5
- echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
- if test "${ac_cv_header_dbmalloc_h+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 10729 "configure"
-+#line 11148 "configure"
- #include "confdefs.h"
- #include <dbmalloc.h>
- _ACEOF
--if { (eval echo "$as_me:10733: \"$ac_cpp conftest.$ac_ext\"") >&5
-+if { (eval echo "$as_me:11152: \"$ac_cpp conftest.$ac_ext\"") >&5
-   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-   ac_status=$?
-   egrep -v '^ *\+' conftest.er1 >conftest.err
-   rm -f conftest.er1
-   cat conftest.err >&5
--  echo "$as_me:10739: \$? = $ac_status" >&5
-+  echo "$as_me:11158: \$? = $ac_status" >&5
-   (exit $ac_status); } >/dev/null; then
-   if test -s conftest.err; then
-     ac_cpp_err=$ac_c_preproc_warn_flag
-@@ -10755,11 +11174,11 @@
- fi
- rm -f conftest.err conftest.$ac_ext
- fi
--echo "$as_me:10758: result: $ac_cv_header_dbmalloc_h" >&5
-+echo "$as_me:11177: result: $ac_cv_header_dbmalloc_h" >&5
- echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
- if test $ac_cv_header_dbmalloc_h = yes; then
- 
--echo "$as_me:10762: checking for debug_malloc in -ldbmalloc" >&5
-+echo "$as_me:11181: checking for debug_malloc in -ldbmalloc" >&5
- echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
- if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -10767,7 +11186,7 @@
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-ldbmalloc  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
--#line 10770 "configure"
-+#line 11189 "configure"
- #include "confdefs.h"
- 
- /* Override any gcc2 internal prototype to avoid an error.  */
-@@ -10786,16 +11205,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:10789: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:11208: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:10792: \$? = $ac_status" >&5
-+  echo "$as_me:11211: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:10795: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:11214: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:10798: \$? = $ac_status" >&5
-+  echo "$as_me:11217: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_lib_dbmalloc_debug_malloc=yes
- else
-@@ -10806,7 +11225,7 @@
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
- fi
--echo "$as_me:10809: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
-+echo "$as_me:11228: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
- echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
- if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
-   cat >>confdefs.h <<EOF
-@@ -10821,7 +11240,7 @@
- 
- fi
- 
--echo "$as_me:10824: checking if you want to use valgrind for testing" >&5
-+echo "$as_me:11243: checking if you want to use valgrind for testing" >&5
- echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
- 
- # Check whether --with-valgrind or --without-valgrind was given.
-@@ -10837,7 +11256,7 @@
- else
-   with_valgrind=
- fi;
--echo "$as_me:10840: result: ${with_valgrind:-no}" >&5
-+echo "$as_me:11259: result: ${with_valgrind:-no}" >&5
- echo "${ECHO_T}${with_valgrind:-no}" >&6
- 
- case .$with_cflags in #(vi
-@@ -10907,7 +11326,7 @@
- 
- if test -n "$cf_new_cppflags" ; then
- 
--	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
-+	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
- fi
- 
- if test -n "$cf_new_extra_cppflags" ; then
-@@ -10920,7 +11339,7 @@
- 	;;
- esac
- 
--echo "$as_me:10923: checking if you want to perform memory-leak testing" >&5
-+echo "$as_me:11342: checking if you want to perform memory-leak testing" >&5
- echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
- 
- # Check whether --enable-leaks or --disable-leaks was given.
-@@ -10930,7 +11349,7 @@
- else
-   : ${with_no_leaks:=no}
- fi;
--echo "$as_me:10933: result: $with_no_leaks" >&5
-+echo "$as_me:11352: result: $with_no_leaks" >&5
- echo "${ECHO_T}$with_no_leaks" >&6
- 
- if test "$with_no_leaks" = yes ; then
-@@ -10975,7 +11394,7 @@
- 	;;
- esac
- 
--echo "$as_me:10978: checking whether to add trace feature to all models" >&5
-+echo "$as_me:11397: checking whether to add trace feature to all models" >&5
- echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
- 
- # Check whether --with-trace or --without-trace was given.
-@@ -10985,7 +11404,7 @@
- else
-   cf_with_trace=$cf_all_traces
- fi;
--echo "$as_me:10988: result: $cf_with_trace" >&5
-+echo "$as_me:11407: result: $cf_with_trace" >&5
- echo "${ECHO_T}$cf_with_trace" >&6
- 
- if test "$cf_with_trace" = yes ; then
-@@ -11052,7 +11471,7 @@
- 
- if test -n "$cf_new_cppflags" ; then
- 
--	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
-+	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
- fi
- 
- if test -n "$cf_new_extra_cppflags" ; then
-@@ -11066,13 +11485,17 @@
- fi
- 
- ###	Checks for libraries.
--echo "$as_me:11069: checking for gettimeofday" >&5
-+case $cf_cv_system_name in #(vi
-+*mingw32*) #(vi
-+	;;
-+*)
-+echo "$as_me:11492: checking for gettimeofday" >&5
- echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
- if test "${ac_cv_func_gettimeofday+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 11075 "configure"
-+#line 11498 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
-     which can conflict with char gettimeofday (); below.  */
-@@ -11103,16 +11526,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:11106: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:11529: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:11109: \$? = $ac_status" >&5
-+  echo "$as_me:11532: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:11112: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:11535: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:11115: \$? = $ac_status" >&5
-+  echo "$as_me:11538: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_func_gettimeofday=yes
- else
-@@ -11122,7 +11545,7 @@
- fi
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- fi
--echo "$as_me:11125: result: $ac_cv_func_gettimeofday" >&5
-+echo "$as_me:11548: result: $ac_cv_func_gettimeofday" >&5
- echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
- if test $ac_cv_func_gettimeofday = yes; then
-   cat >>confdefs.h <<\EOF
-@@ -11131,7 +11554,7 @@
- 
- else
- 
--echo "$as_me:11134: checking for gettimeofday in -lbsd" >&5
-+echo "$as_me:11557: checking for gettimeofday in -lbsd" >&5
- echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
- if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -11139,7 +11562,7 @@
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lbsd  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
--#line 11142 "configure"
-+#line 11565 "configure"
- #include "confdefs.h"
- 
- /* Override any gcc2 internal prototype to avoid an error.  */
-@@ -11158,16 +11581,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:11161: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:11584: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:11164: \$? = $ac_status" >&5
-+  echo "$as_me:11587: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:11167: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:11590: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:11170: \$? = $ac_status" >&5
-+  echo "$as_me:11593: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_lib_bsd_gettimeofday=yes
- else
-@@ -11178,7 +11601,7 @@
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
- fi
--echo "$as_me:11181: result: $ac_cv_lib_bsd_gettimeofday" >&5
-+echo "$as_me:11604: result: $ac_cv_lib_bsd_gettimeofday" >&5
- echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
- if test $ac_cv_lib_bsd_gettimeofday = yes; then
-   cat >>confdefs.h <<\EOF
-@@ -11189,15 +11612,17 @@
- fi
- 
- fi
-+	;;
-+esac
- 
--echo "$as_me:11193: checking if -lm needed for math functions" >&5
-+echo "$as_me:11618: checking if -lm needed for math functions" >&5
- echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
- if test "${cf_cv_need_libm+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- 
- 	cat >conftest.$ac_ext <<_ACEOF
--#line 11200 "configure"
-+#line 11625 "configure"
- #include "confdefs.h"
- 
- 	#include <stdio.h>
-@@ -11212,16 +11637,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:11215: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:11640: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:11218: \$? = $ac_status" >&5
-+  echo "$as_me:11643: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:11221: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:11646: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:11224: \$? = $ac_status" >&5
-+  echo "$as_me:11649: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_need_libm=no
- else
-@@ -11231,7 +11656,7 @@
- fi
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- fi
--echo "$as_me:11234: result: $cf_cv_need_libm" >&5
-+echo "$as_me:11659: result: $cf_cv_need_libm" >&5
- echo "${ECHO_T}$cf_cv_need_libm" >&6
- if test "$cf_cv_need_libm" = yes
- then
-@@ -11239,13 +11664,13 @@
- fi
- 
- ###	Checks for header files.
--echo "$as_me:11242: checking for ANSI C header files" >&5
-+echo "$as_me:11667: checking for ANSI C header files" >&5
- echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
- if test "${ac_cv_header_stdc+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 11248 "configure"
-+#line 11673 "configure"
- #include "confdefs.h"
- #include <stdlib.h>
- #include <stdarg.h>
-@@ -11253,13 +11678,13 @@
- #include <float.h>
- 
- _ACEOF
--if { (eval echo "$as_me:11256: \"$ac_cpp conftest.$ac_ext\"") >&5
-+if { (eval echo "$as_me:11681: \"$ac_cpp conftest.$ac_ext\"") >&5
-   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-   ac_status=$?
-   egrep -v '^ *\+' conftest.er1 >conftest.err
-   rm -f conftest.er1
-   cat conftest.err >&5
--  echo "$as_me:11262: \$? = $ac_status" >&5
-+  echo "$as_me:11687: \$? = $ac_status" >&5
-   (exit $ac_status); } >/dev/null; then
-   if test -s conftest.err; then
-     ac_cpp_err=$ac_c_preproc_warn_flag
-@@ -11281,7 +11706,7 @@
- if test $ac_cv_header_stdc = yes; then
-   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-   cat >conftest.$ac_ext <<_ACEOF
--#line 11284 "configure"
-+#line 11709 "configure"
- #include "confdefs.h"
- #include <string.h>
- 
-@@ -11299,7 +11724,7 @@
- if test $ac_cv_header_stdc = yes; then
-   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-   cat >conftest.$ac_ext <<_ACEOF
--#line 11302 "configure"
-+#line 11727 "configure"
- #include "confdefs.h"
- #include <stdlib.h>
- 
-@@ -11320,7 +11745,7 @@
-   :
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 11323 "configure"
-+#line 11748 "configure"
- #include "confdefs.h"
- #include <ctype.h>
- #if ((' ' & 0x0FF) == 0x020)
-@@ -11346,15 +11771,15 @@
- }
- _ACEOF
- rm -f conftest$ac_exeext
--if { (eval echo "$as_me:11349: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:11774: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:11352: \$? = $ac_status" >&5
-+  echo "$as_me:11777: \$? = $ac_status" >&5
-   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
--  { (eval echo "$as_me:11354: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:11779: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:11357: \$? = $ac_status" >&5
-+  echo "$as_me:11782: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   :
- else
-@@ -11367,7 +11792,7 @@
- fi
- fi
- fi
--echo "$as_me:11370: result: $ac_cv_header_stdc" >&5
-+echo "$as_me:11795: result: $ac_cv_header_stdc" >&5
- echo "${ECHO_T}$ac_cv_header_stdc" >&6
- if test $ac_cv_header_stdc = yes; then
- 
-@@ -11380,13 +11805,13 @@
- ac_header_dirent=no
- for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
-   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
--echo "$as_me:11383: checking for $ac_hdr that defines DIR" >&5
-+echo "$as_me:11808: checking for $ac_hdr that defines DIR" >&5
- echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
- if eval "test \"\${$as_ac_Header+set}\" = set"; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 11389 "configure"
-+#line 11814 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <$ac_hdr>
-@@ -11401,16 +11826,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:11404: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:11829: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:11407: \$? = $ac_status" >&5
-+  echo "$as_me:11832: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:11410: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:11835: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:11413: \$? = $ac_status" >&5
-+  echo "$as_me:11838: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   eval "$as_ac_Header=yes"
- else
-@@ -11420,7 +11845,7 @@
- fi
- rm -f conftest.$ac_objext conftest.$ac_ext
- fi
--echo "$as_me:11423: result: `eval echo '${'$as_ac_Header'}'`" >&5
-+echo "$as_me:11848: result: `eval echo '${'$as_ac_Header'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
- if test `eval echo '${'$as_ac_Header'}'` = yes; then
-   cat >>confdefs.h <<EOF
-@@ -11433,7 +11858,7 @@
- done
- # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
- if test $ac_header_dirent = dirent.h; then
--  echo "$as_me:11436: checking for opendir in -ldir" >&5
-+  echo "$as_me:11861: checking for opendir in -ldir" >&5
- echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
- if test "${ac_cv_lib_dir_opendir+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -11441,7 +11866,7 @@
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-ldir  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
--#line 11444 "configure"
-+#line 11869 "configure"
- #include "confdefs.h"
- 
- /* Override any gcc2 internal prototype to avoid an error.  */
-@@ -11460,16 +11885,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:11463: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:11888: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:11466: \$? = $ac_status" >&5
-+  echo "$as_me:11891: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:11469: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:11894: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:11472: \$? = $ac_status" >&5
-+  echo "$as_me:11897: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_lib_dir_opendir=yes
- else
-@@ -11480,14 +11905,14 @@
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
- fi
--echo "$as_me:11483: result: $ac_cv_lib_dir_opendir" >&5
-+echo "$as_me:11908: result: $ac_cv_lib_dir_opendir" >&5
- echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
- if test $ac_cv_lib_dir_opendir = yes; then
-   LIBS="$LIBS -ldir"
- fi
- 
- else
--  echo "$as_me:11490: checking for opendir in -lx" >&5
-+  echo "$as_me:11915: checking for opendir in -lx" >&5
- echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
- if test "${ac_cv_lib_x_opendir+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -11495,7 +11920,7 @@
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lx  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
--#line 11498 "configure"
-+#line 11923 "configure"
- #include "confdefs.h"
- 
- /* Override any gcc2 internal prototype to avoid an error.  */
-@@ -11514,16 +11939,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:11517: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:11942: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:11520: \$? = $ac_status" >&5
-+  echo "$as_me:11945: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:11523: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:11948: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:11526: \$? = $ac_status" >&5
-+  echo "$as_me:11951: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_lib_x_opendir=yes
- else
-@@ -11534,7 +11959,7 @@
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
- fi
--echo "$as_me:11537: result: $ac_cv_lib_x_opendir" >&5
-+echo "$as_me:11962: result: $ac_cv_lib_x_opendir" >&5
- echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
- if test $ac_cv_lib_x_opendir = yes; then
-   LIBS="$LIBS -lx"
-@@ -11542,13 +11967,13 @@
- 
- fi
- 
--echo "$as_me:11545: checking whether time.h and sys/time.h may both be included" >&5
-+echo "$as_me:11970: checking whether time.h and sys/time.h may both be included" >&5
- echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
- if test "${ac_cv_header_time+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 11551 "configure"
-+#line 11976 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/time.h>
-@@ -11564,16 +11989,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:11567: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:11992: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:11570: \$? = $ac_status" >&5
-+  echo "$as_me:11995: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:11573: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:11998: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:11576: \$? = $ac_status" >&5
-+  echo "$as_me:12001: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_header_time=yes
- else
-@@ -11583,7 +12008,7 @@
- fi
- rm -f conftest.$ac_objext conftest.$ac_ext
- fi
--echo "$as_me:11586: result: $ac_cv_header_time" >&5
-+echo "$as_me:12011: result: $ac_cv_header_time" >&5
- echo "${ECHO_T}$ac_cv_header_time" >&6
- if test $ac_cv_header_time = yes; then
- 
-@@ -11593,14 +12018,14 @@
- 
- fi
- 
--echo "$as_me:11596: checking for regular-expression headers" >&5
-+echo "$as_me:12021: checking for regular-expression headers" >&5
- echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
- if test "${cf_cv_regex+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- 
- cat >conftest.$ac_ext <<_ACEOF
--#line 11603 "configure"
-+#line 12028 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <regex.h>
-@@ -11618,16 +12043,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:11621: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:12046: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:11624: \$? = $ac_status" >&5
-+  echo "$as_me:12049: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:11627: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:12052: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:11630: \$? = $ac_status" >&5
-+  echo "$as_me:12055: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_regex="regex.h"
- else
-@@ -11635,7 +12060,7 @@
- cat conftest.$ac_ext >&5
- 
- 	cat >conftest.$ac_ext <<_ACEOF
--#line 11638 "configure"
-+#line 12063 "configure"
- #include "confdefs.h"
- #include <regexp.h>
- int
-@@ -11650,16 +12075,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:11653: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:12078: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:11656: \$? = $ac_status" >&5
-+  echo "$as_me:12081: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:11659: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:12084: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:11662: \$? = $ac_status" >&5
-+  echo "$as_me:12087: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_regex="regexp.h"
- else
-@@ -11669,7 +12094,7 @@
- 		cf_save_LIBS="$LIBS"
- 		LIBS="-lgen $LIBS"
- 		cat >conftest.$ac_ext <<_ACEOF
--#line 11672 "configure"
-+#line 12097 "configure"
- #include "confdefs.h"
- #include <regexpr.h>
- int
-@@ -11684,16 +12109,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:11687: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:12112: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:11690: \$? = $ac_status" >&5
-+  echo "$as_me:12115: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:11693: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:12118: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:11696: \$? = $ac_status" >&5
-+  echo "$as_me:12121: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_regex="regexpr.h"
- else
-@@ -11709,7 +12134,7 @@
- 
- fi
- 
--echo "$as_me:11712: result: $cf_cv_regex" >&5
-+echo "$as_me:12137: result: $cf_cv_regex" >&5
- echo "${ECHO_T}$cf_cv_regex" >&6
- case $cf_cv_regex in
- 	regex.h)   cat >>confdefs.h <<\EOF
-@@ -11745,23 +12170,23 @@
- 
- do
- as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
--echo "$as_me:11748: checking for $ac_header" >&5
-+echo "$as_me:12173: checking for $ac_header" >&5
- echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
- if eval "test \"\${$as_ac_Header+set}\" = set"; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 11754 "configure"
-+#line 12179 "configure"
- #include "confdefs.h"
- #include <$ac_header>
- _ACEOF
--if { (eval echo "$as_me:11758: \"$ac_cpp conftest.$ac_ext\"") >&5
-+if { (eval echo "$as_me:12183: \"$ac_cpp conftest.$ac_ext\"") >&5
-   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-   ac_status=$?
-   egrep -v '^ *\+' conftest.er1 >conftest.err
-   rm -f conftest.er1
-   cat conftest.err >&5
--  echo "$as_me:11764: \$? = $ac_status" >&5
-+  echo "$as_me:12189: \$? = $ac_status" >&5
-   (exit $ac_status); } >/dev/null; then
-   if test -s conftest.err; then
-     ac_cpp_err=$ac_c_preproc_warn_flag
-@@ -11780,7 +12205,7 @@
- fi
- rm -f conftest.err conftest.$ac_ext
- fi
--echo "$as_me:11783: result: `eval echo '${'$as_ac_Header'}'`" >&5
-+echo "$as_me:12208: result: `eval echo '${'$as_ac_Header'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
- if test `eval echo '${'$as_ac_Header'}'` = yes; then
-   cat >>confdefs.h <<EOF
-@@ -11794,7 +12219,7 @@
- # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
- if test "$ISC" = yes ; then
- 
--echo "$as_me:11797: checking for main in -lcposix" >&5
-+echo "$as_me:12222: checking for main in -lcposix" >&5
- echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
- if test "${ac_cv_lib_cposix_main+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -11802,7 +12227,7 @@
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lcposix  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
--#line 11805 "configure"
-+#line 12230 "configure"
- #include "confdefs.h"
- 
- int
-@@ -11814,16 +12239,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:11817: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:12242: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:11820: \$? = $ac_status" >&5
-+  echo "$as_me:12245: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:11823: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:12248: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:11826: \$? = $ac_status" >&5
-+  echo "$as_me:12251: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_lib_cposix_main=yes
- else
-@@ -11834,7 +12259,7 @@
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
- fi
--echo "$as_me:11837: result: $ac_cv_lib_cposix_main" >&5
-+echo "$as_me:12262: result: $ac_cv_lib_cposix_main" >&5
- echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
- if test $ac_cv_lib_cposix_main = yes; then
-   cat >>confdefs.h <<EOF
-@@ -11845,7 +12270,7 @@
- 
- fi
- 
--	echo "$as_me:11848: checking for bzero in -linet" >&5
-+	echo "$as_me:12273: checking for bzero in -linet" >&5
- echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
- if test "${ac_cv_lib_inet_bzero+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -11853,7 +12278,7 @@
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-linet  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
--#line 11856 "configure"
-+#line 12281 "configure"
- #include "confdefs.h"
- 
- /* Override any gcc2 internal prototype to avoid an error.  */
-@@ -11872,16 +12297,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:11875: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:12300: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:11878: \$? = $ac_status" >&5
-+  echo "$as_me:12303: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:11881: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:12306: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:11884: \$? = $ac_status" >&5
-+  echo "$as_me:12309: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_lib_inet_bzero=yes
- else
-@@ -11892,21 +12317,21 @@
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
- fi
--echo "$as_me:11895: result: $ac_cv_lib_inet_bzero" >&5
-+echo "$as_me:12320: result: $ac_cv_lib_inet_bzero" >&5
- echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
- if test $ac_cv_lib_inet_bzero = yes; then
-   LIBS="$LIBS -linet"
- fi
- fi
- 
--echo "$as_me:11902: checking if sys/time.h works with sys/select.h" >&5
-+echo "$as_me:12327: checking if sys/time.h works with sys/select.h" >&5
- echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
- if test "${cf_cv_sys_time_select+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- 
- cat >conftest.$ac_ext <<_ACEOF
--#line 11909 "configure"
-+#line 12334 "configure"
- #include "confdefs.h"
- 
- #include <sys/types.h>
-@@ -11926,16 +12351,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:11929: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:12354: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:11932: \$? = $ac_status" >&5
-+  echo "$as_me:12357: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:11935: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:12360: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:11938: \$? = $ac_status" >&5
-+  echo "$as_me:12363: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_sys_time_select=yes
- else
-@@ -11947,7 +12372,7 @@
- 
- fi
- 
--echo "$as_me:11950: result: $cf_cv_sys_time_select" >&5
-+echo "$as_me:12375: result: $cf_cv_sys_time_select" >&5
- echo "${ECHO_T}$cf_cv_sys_time_select" >&6
- test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
- #define HAVE_SYS_TIME_SELECT 1
-@@ -11961,7 +12386,7 @@
- ac_compiler_gnu=$ac_cv_c_compiler_gnu
- ac_main_return=return
- 
--echo "$as_me:11964: checking for $CC option to accept ANSI C" >&5
-+echo "$as_me:12389: checking for $CC option to accept ANSI C" >&5
- echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
- if test "${ac_cv_prog_cc_stdc+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -11969,7 +12394,7 @@
-   ac_cv_prog_cc_stdc=no
- ac_save_CC=$CC
- cat >conftest.$ac_ext <<_ACEOF
--#line 11972 "configure"
-+#line 12397 "configure"
- #include "confdefs.h"
- #include <stdarg.h>
- #include <stdio.h>
-@@ -12018,16 +12443,16 @@
- do
-   CC="$ac_save_CC $ac_arg"
-   rm -f conftest.$ac_objext
--if { (eval echo "$as_me:12021: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:12446: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:12024: \$? = $ac_status" >&5
-+  echo "$as_me:12449: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:12027: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:12452: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:12030: \$? = $ac_status" >&5
-+  echo "$as_me:12455: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_prog_cc_stdc=$ac_arg
- break
-@@ -12044,21 +12469,21 @@
- 
- case "x$ac_cv_prog_cc_stdc" in
-   x|xno)
--    echo "$as_me:12047: result: none needed" >&5
-+    echo "$as_me:12472: result: none needed" >&5
- echo "${ECHO_T}none needed" >&6 ;;
-   *)
--    echo "$as_me:12050: result: $ac_cv_prog_cc_stdc" >&5
-+    echo "$as_me:12475: result: $ac_cv_prog_cc_stdc" >&5
- echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
-     CC="$CC $ac_cv_prog_cc_stdc" ;;
- esac
- 
--echo "$as_me:12055: checking for an ANSI C-conforming const" >&5
-+echo "$as_me:12480: checking for an ANSI C-conforming const" >&5
- echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
- if test "${ac_cv_c_const+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 12061 "configure"
-+#line 12486 "configure"
- #include "confdefs.h"
- 
- int
-@@ -12116,16 +12541,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:12119: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:12544: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:12122: \$? = $ac_status" >&5
-+  echo "$as_me:12547: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:12125: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:12550: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:12128: \$? = $ac_status" >&5
-+  echo "$as_me:12553: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_c_const=yes
- else
-@@ -12135,7 +12560,7 @@
- fi
- rm -f conftest.$ac_objext conftest.$ac_ext
- fi
--echo "$as_me:12138: result: $ac_cv_c_const" >&5
-+echo "$as_me:12563: result: $ac_cv_c_const" >&5
- echo "${ECHO_T}$ac_cv_c_const" >&6
- if test $ac_cv_c_const = no; then
- 
-@@ -12145,7 +12570,7 @@
- 
- fi
- 
--echo "$as_me:12148: checking for inline" >&5
-+echo "$as_me:12573: checking for inline" >&5
- echo $ECHO_N "checking for inline... $ECHO_C" >&6
- if test "${ac_cv_c_inline+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -12153,7 +12578,7 @@
-   ac_cv_c_inline=no
- for ac_kw in inline __inline__ __inline; do
-   cat >conftest.$ac_ext <<_ACEOF
--#line 12156 "configure"
-+#line 12581 "configure"
- #include "confdefs.h"
- #ifndef __cplusplus
- static $ac_kw int static_foo () {return 0; }
-@@ -12162,16 +12587,16 @@
- 
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:12165: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:12590: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:12168: \$? = $ac_status" >&5
-+  echo "$as_me:12593: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:12171: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:12596: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:12174: \$? = $ac_status" >&5
-+  echo "$as_me:12599: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_c_inline=$ac_kw; break
- else
-@@ -12182,7 +12607,7 @@
- done
- 
- fi
--echo "$as_me:12185: result: $ac_cv_c_inline" >&5
-+echo "$as_me:12610: result: $ac_cv_c_inline" >&5
- echo "${ECHO_T}$ac_cv_c_inline" >&6
- case $ac_cv_c_inline in
-   inline | yes) ;;
-@@ -12205,7 +12630,7 @@
-     :
-   elif test "$GCC" = yes
-   then
--    echo "$as_me:12208: checking if gcc supports options to tune inlining" >&5
-+    echo "$as_me:12633: checking if gcc supports options to tune inlining" >&5
- echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
- if test "${cf_cv_gcc_inline+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -12214,7 +12639,7 @@
-       cf_save_CFLAGS=$CFLAGS
-       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
-       cat >conftest.$ac_ext <<_ACEOF
--#line 12217 "configure"
-+#line 12642 "configure"
- #include "confdefs.h"
- inline int foo(void) { return 1; }
- int
-@@ -12226,16 +12651,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:12229: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:12654: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:12232: \$? = $ac_status" >&5
-+  echo "$as_me:12657: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:12235: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:12660: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:12238: \$? = $ac_status" >&5
-+  echo "$as_me:12663: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_gcc_inline=yes
- else
-@@ -12247,7 +12672,7 @@
-       CFLAGS=$cf_save_CFLAGS
- 
- fi
--echo "$as_me:12250: result: $cf_cv_gcc_inline" >&5
-+echo "$as_me:12675: result: $cf_cv_gcc_inline" >&5
- echo "${ECHO_T}$cf_cv_gcc_inline" >&6
-     if test "$cf_cv_gcc_inline" = yes ; then
- 
-@@ -12311,7 +12736,7 @@
- 
- if test -n "$cf_new_cppflags" ; then
- 
--	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
-+	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
- fi
- 
- if test -n "$cf_new_extra_cppflags" ; then
-@@ -12323,7 +12748,7 @@
-   fi
- fi
- 
--echo "$as_me:12326: checking for signal global datatype" >&5
-+echo "$as_me:12751: checking for signal global datatype" >&5
- echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
- if test "${cf_cv_sig_atomic_t+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -12335,7 +12760,7 @@
- 		"int"
- 	do
- 	cat >conftest.$ac_ext <<_ACEOF
--#line 12338 "configure"
-+#line 12763 "configure"
- #include "confdefs.h"
- 
- #include <sys/types.h>
-@@ -12358,16 +12783,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:12361: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:12786: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:12364: \$? = $ac_status" >&5
-+  echo "$as_me:12789: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:12367: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:12792: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:12370: \$? = $ac_status" >&5
-+  echo "$as_me:12795: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_sig_atomic_t=$cf_type
- else
-@@ -12381,7 +12806,7 @@
- 
- fi
- 
--echo "$as_me:12384: result: $cf_cv_sig_atomic_t" >&5
-+echo "$as_me:12809: result: $cf_cv_sig_atomic_t" >&5
- echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
- test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
- #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
-@@ -12389,7 +12814,7 @@
- 
- if test $NCURSES_CHTYPE = auto ; then
- 
--echo "$as_me:12392: checking for type of chtype" >&5
-+echo "$as_me:12817: checking for type of chtype" >&5
- echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
- if test "${cf_cv_typeof_chtype+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -12399,7 +12824,7 @@
-   cf_cv_typeof_chtype=long
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 12402 "configure"
-+#line 12827 "configure"
- #include "confdefs.h"
- 
- #define WANT_BITS 31
-@@ -12434,15 +12859,15 @@
- 
- _ACEOF
- rm -f conftest$ac_exeext
--if { (eval echo "$as_me:12437: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:12862: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:12440: \$? = $ac_status" >&5
-+  echo "$as_me:12865: \$? = $ac_status" >&5
-   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
--  { (eval echo "$as_me:12442: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:12867: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:12445: \$? = $ac_status" >&5
-+  echo "$as_me:12870: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_typeof_chtype=`cat cf_test.out`
- else
-@@ -12457,7 +12882,7 @@
- 
- fi
- 
--echo "$as_me:12460: result: $cf_cv_typeof_chtype" >&5
-+echo "$as_me:12885: result: $cf_cv_typeof_chtype" >&5
- echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
- 
- cat >>confdefs.h <<EOF
-@@ -12469,14 +12894,14 @@
- fi
- test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
- 
--echo "$as_me:12472: checking if unsigned literals are legal" >&5
-+echo "$as_me:12897: checking if unsigned literals are legal" >&5
- echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
- if test "${cf_cv_unsigned_literals+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- 
- 	cat >conftest.$ac_ext <<_ACEOF
--#line 12479 "configure"
-+#line 12904 "configure"
- #include "confdefs.h"
- 
- int
-@@ -12488,16 +12913,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:12491: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:12916: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:12494: \$? = $ac_status" >&5
-+  echo "$as_me:12919: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:12497: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:12922: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:12500: \$? = $ac_status" >&5
-+  echo "$as_me:12925: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_unsigned_literals=yes
- else
-@@ -12509,7 +12934,7 @@
- 
- fi
- 
--echo "$as_me:12512: result: $cf_cv_unsigned_literals" >&5
-+echo "$as_me:12937: result: $cf_cv_unsigned_literals" >&5
- echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
- 
- cf_cv_1UL="1"
-@@ -12525,14 +12950,14 @@
- 
- ###	Checks for external-data
- 
--echo "$as_me:12528: checking if external errno is declared" >&5
-+echo "$as_me:12953: checking if external errno is declared" >&5
- echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
- if test "${cf_cv_dcl_errno+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- 
-     cat >conftest.$ac_ext <<_ACEOF
--#line 12535 "configure"
-+#line 12960 "configure"
- #include "confdefs.h"
- 
- #ifdef HAVE_STDLIB_H
-@@ -12550,16 +12975,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:12553: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:12978: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:12556: \$? = $ac_status" >&5
-+  echo "$as_me:12981: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:12559: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:12984: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:12562: \$? = $ac_status" >&5
-+  echo "$as_me:12987: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_dcl_errno=yes
- else
-@@ -12570,7 +12995,7 @@
- rm -f conftest.$ac_objext conftest.$ac_ext
- 
- fi
--echo "$as_me:12573: result: $cf_cv_dcl_errno" >&5
-+echo "$as_me:12998: result: $cf_cv_dcl_errno" >&5
- echo "${ECHO_T}$cf_cv_dcl_errno" >&6
- 
- if test "$cf_cv_dcl_errno" = no ; then
-@@ -12585,14 +13010,14 @@
- 
- # It's possible (for near-UNIX clones) that the data doesn't exist
- 
--echo "$as_me:12588: checking if external errno exists" >&5
-+echo "$as_me:13013: checking if external errno exists" >&5
- echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
- if test "${cf_cv_have_errno+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- 
-     cat >conftest.$ac_ext <<_ACEOF
--#line 12595 "configure"
-+#line 13020 "configure"
- #include "confdefs.h"
- 
- #undef errno
-@@ -12607,16 +13032,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:12610: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:13035: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:12613: \$? = $ac_status" >&5
-+  echo "$as_me:13038: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:12616: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:13041: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:12619: \$? = $ac_status" >&5
-+  echo "$as_me:13044: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_have_errno=yes
- else
-@@ -12627,7 +13052,7 @@
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- 
- fi
--echo "$as_me:12630: result: $cf_cv_have_errno" >&5
-+echo "$as_me:13055: result: $cf_cv_have_errno" >&5
- echo "${ECHO_T}$cf_cv_have_errno" >&6
- 
- if test "$cf_cv_have_errno" = yes ; then
-@@ -12640,7 +13065,7 @@
- 
- fi
- 
--echo "$as_me:12643: checking if data-only library module links" >&5
-+echo "$as_me:13068: checking if data-only library module links" >&5
- echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
- if test "${cf_cv_link_dataonly+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -12648,20 +13073,20 @@
- 
- 	rm -f conftest.a
- 	cat >conftest.$ac_ext <<EOF
--#line 12651 "configure"
-+#line 13076 "configure"
- int	testdata[3] = { 123, 456, 789 };
- EOF
--	if { (eval echo "$as_me:12654: \"$ac_compile\"") >&5
-+	if { (eval echo "$as_me:13079: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:12657: \$? = $ac_status" >&5
-+  echo "$as_me:13082: \$? = $ac_status" >&5
-   (exit $ac_status); } ; then
- 		mv conftest.o data.o && \
--		( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
-+		( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
- 	fi
- 	rm -f conftest.$ac_ext data.o
- 	cat >conftest.$ac_ext <<EOF
--#line 12664 "configure"
-+#line 13089 "configure"
- int	testfunc()
- {
- #if defined(NeXT)
-@@ -12674,13 +13099,13 @@
- #endif
- }
- EOF
--	if { (eval echo "$as_me:12677: \"$ac_compile\"") >&5
-+	if { (eval echo "$as_me:13102: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:12680: \$? = $ac_status" >&5
-+  echo "$as_me:13105: \$? = $ac_status" >&5
-   (exit $ac_status); }; then
- 		mv conftest.o func.o && \
--		( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
-+		( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
- 	fi
- 	rm -f conftest.$ac_ext func.o
- 	( eval $RANLIB conftest.a ) 2>&5 >/dev/null
-@@ -12690,7 +13115,7 @@
-   cf_cv_link_dataonly=unknown
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 12693 "configure"
-+#line 13118 "configure"
- #include "confdefs.h"
- 
- 	int main()
-@@ -12701,15 +13126,15 @@
- 
- _ACEOF
- rm -f conftest$ac_exeext
--if { (eval echo "$as_me:12704: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:13129: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:12707: \$? = $ac_status" >&5
-+  echo "$as_me:13132: \$? = $ac_status" >&5
-   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
--  { (eval echo "$as_me:12709: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:13134: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:12712: \$? = $ac_status" >&5
-+  echo "$as_me:13137: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_link_dataonly=yes
- else
-@@ -12724,7 +13149,7 @@
- 
- fi
- 
--echo "$as_me:12727: result: $cf_cv_link_dataonly" >&5
-+echo "$as_me:13152: result: $cf_cv_link_dataonly" >&5
- echo "${ECHO_T}$cf_cv_link_dataonly" >&6
- 
- if test "$cf_cv_link_dataonly" = no ; then
-@@ -12759,13 +13184,13 @@
- 
- do
- as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
--echo "$as_me:12762: checking for $ac_func" >&5
-+echo "$as_me:13187: checking for $ac_func" >&5
- echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
- if eval "test \"\${$as_ac_var+set}\" = set"; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 12768 "configure"
-+#line 13193 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
-     which can conflict with char $ac_func (); below.  */
-@@ -12796,16 +13221,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:12799: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:13224: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:12802: \$? = $ac_status" >&5
-+  echo "$as_me:13227: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:12805: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:13230: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:12808: \$? = $ac_status" >&5
-+  echo "$as_me:13233: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   eval "$as_ac_var=yes"
- else
-@@ -12815,7 +13240,7 @@
- fi
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- fi
--echo "$as_me:12818: result: `eval echo '${'$as_ac_var'}'`" >&5
-+echo "$as_me:13243: result: `eval echo '${'$as_ac_var'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
- if test `eval echo '${'$as_ac_var'}'` = yes; then
-   cat >>confdefs.h <<EOF
-@@ -12827,14 +13252,14 @@
- 
- if test "$with_getcap" = "yes" ; then
- 
--echo "$as_me:12830: checking for terminal-capability database functions" >&5
-+echo "$as_me:13255: checking for terminal-capability database functions" >&5
- echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
- if test "${cf_cv_cgetent+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- 
- cat >conftest.$ac_ext <<_ACEOF
--#line 12837 "configure"
-+#line 13262 "configure"
- #include "confdefs.h"
- 
- #include <stdlib.h>
-@@ -12854,16 +13279,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:12857: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:13282: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:12860: \$? = $ac_status" >&5
-+  echo "$as_me:13285: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:12863: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:13288: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:12866: \$? = $ac_status" >&5
-+  echo "$as_me:13291: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_cgetent=yes
- else
-@@ -12875,7 +13300,7 @@
- 
- fi
- 
--echo "$as_me:12878: result: $cf_cv_cgetent" >&5
-+echo "$as_me:13303: result: $cf_cv_cgetent" >&5
- echo "${ECHO_T}$cf_cv_cgetent" >&6
- test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
- #define HAVE_BSD_CGETENT 1
-@@ -12883,14 +13308,14 @@
- 
- fi
- 
--echo "$as_me:12886: checking for isascii" >&5
-+echo "$as_me:13311: checking for isascii" >&5
- echo $ECHO_N "checking for isascii... $ECHO_C" >&6
- if test "${cf_cv_have_isascii+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- 
- 	cat >conftest.$ac_ext <<_ACEOF
--#line 12893 "configure"
-+#line 13318 "configure"
- #include "confdefs.h"
- #include <ctype.h>
- int
-@@ -12902,16 +13327,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:12905: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:13330: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:12908: \$? = $ac_status" >&5
-+  echo "$as_me:13333: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:12911: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:13336: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:12914: \$? = $ac_status" >&5
-+  echo "$as_me:13339: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_have_isascii=yes
- else
-@@ -12922,17 +13347,17 @@
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- 
- fi
--echo "$as_me:12925: result: $cf_cv_have_isascii" >&5
-+echo "$as_me:13350: result: $cf_cv_have_isascii" >&5
- echo "${ECHO_T}$cf_cv_have_isascii" >&6
- test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
- #define HAVE_ISASCII 1
- EOF
- 
- if test "$ac_cv_func_sigaction" = yes; then
--echo "$as_me:12932: checking whether sigaction needs _POSIX_SOURCE" >&5
-+echo "$as_me:13357: checking whether sigaction needs _POSIX_SOURCE" >&5
- echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
--#line 12935 "configure"
-+#line 13360 "configure"
- #include "confdefs.h"
- 
- #include <sys/types.h>
-@@ -12946,16 +13371,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:12949: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:13374: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:12952: \$? = $ac_status" >&5
-+  echo "$as_me:13377: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:12955: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:13380: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:12958: \$? = $ac_status" >&5
-+  echo "$as_me:13383: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   sigact_bad=no
- else
-@@ -12963,7 +13388,7 @@
- cat conftest.$ac_ext >&5
- 
- cat >conftest.$ac_ext <<_ACEOF
--#line 12966 "configure"
-+#line 13391 "configure"
- #include "confdefs.h"
- 
- #define _POSIX_SOURCE
-@@ -12978,16 +13403,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:12981: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:13406: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:12984: \$? = $ac_status" >&5
-+  echo "$as_me:13409: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:12987: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:13412: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:12990: \$? = $ac_status" >&5
-+  echo "$as_me:13415: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   sigact_bad=yes
- 	 cat >>confdefs.h <<\EOF
-@@ -13002,11 +13427,11 @@
- rm -f conftest.$ac_objext conftest.$ac_ext
- fi
- rm -f conftest.$ac_objext conftest.$ac_ext
--echo "$as_me:13005: result: $sigact_bad" >&5
-+echo "$as_me:13430: result: $sigact_bad" >&5
- echo "${ECHO_T}$sigact_bad" >&6
- fi
- 
--echo "$as_me:13009: checking if nanosleep really works" >&5
-+echo "$as_me:13434: checking if nanosleep really works" >&5
- echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
- if test "${cf_cv_func_nanosleep+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -13016,7 +13441,7 @@
-   cf_cv_func_nanosleep=unknown
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 13019 "configure"
-+#line 13444 "configure"
- #include "confdefs.h"
- 
- #include <stdio.h>
-@@ -13041,15 +13466,15 @@
- 
- _ACEOF
- rm -f conftest$ac_exeext
--if { (eval echo "$as_me:13044: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:13469: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:13047: \$? = $ac_status" >&5
-+  echo "$as_me:13472: \$? = $ac_status" >&5
-   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
--  { (eval echo "$as_me:13049: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:13474: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:13052: \$? = $ac_status" >&5
-+  echo "$as_me:13477: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_func_nanosleep=yes
- else
-@@ -13061,7 +13486,7 @@
- rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
- fi
- fi
--echo "$as_me:13064: result: $cf_cv_func_nanosleep" >&5
-+echo "$as_me:13489: result: $cf_cv_func_nanosleep" >&5
- echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
- 
- test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
-@@ -13075,23 +13500,23 @@
- 
- do
- as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
--echo "$as_me:13078: checking for $ac_header" >&5
-+echo "$as_me:13503: checking for $ac_header" >&5
- echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
- if eval "test \"\${$as_ac_Header+set}\" = set"; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 13084 "configure"
-+#line 13509 "configure"
- #include "confdefs.h"
- #include <$ac_header>
- _ACEOF
--if { (eval echo "$as_me:13088: \"$ac_cpp conftest.$ac_ext\"") >&5
-+if { (eval echo "$as_me:13513: \"$ac_cpp conftest.$ac_ext\"") >&5
-   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-   ac_status=$?
-   egrep -v '^ *\+' conftest.er1 >conftest.err
-   rm -f conftest.er1
-   cat conftest.err >&5
--  echo "$as_me:13094: \$? = $ac_status" >&5
-+  echo "$as_me:13519: \$? = $ac_status" >&5
-   (exit $ac_status); } >/dev/null; then
-   if test -s conftest.err; then
-     ac_cpp_err=$ac_c_preproc_warn_flag
-@@ -13110,7 +13535,7 @@
- fi
- rm -f conftest.err conftest.$ac_ext
- fi
--echo "$as_me:13113: result: `eval echo '${'$as_ac_Header'}'`" >&5
-+echo "$as_me:13538: result: `eval echo '${'$as_ac_Header'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
- if test `eval echo '${'$as_ac_Header'}'` = yes; then
-   cat >>confdefs.h <<EOF
-@@ -13125,23 +13550,23 @@
- for ac_header in sys/termio.h
- do
- as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
--echo "$as_me:13128: checking for $ac_header" >&5
-+echo "$as_me:13553: checking for $ac_header" >&5
- echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
- if eval "test \"\${$as_ac_Header+set}\" = set"; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 13134 "configure"
-+#line 13559 "configure"
- #include "confdefs.h"
- #include <$ac_header>
- _ACEOF
--if { (eval echo "$as_me:13138: \"$ac_cpp conftest.$ac_ext\"") >&5
-+if { (eval echo "$as_me:13563: \"$ac_cpp conftest.$ac_ext\"") >&5
-   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-   ac_status=$?
-   egrep -v '^ *\+' conftest.er1 >conftest.err
-   rm -f conftest.er1
-   cat conftest.err >&5
--  echo "$as_me:13144: \$? = $ac_status" >&5
-+  echo "$as_me:13569: \$? = $ac_status" >&5
-   (exit $ac_status); } >/dev/null; then
-   if test -s conftest.err; then
-     ac_cpp_err=$ac_c_preproc_warn_flag
-@@ -13160,7 +13585,7 @@
- fi
- rm -f conftest.err conftest.$ac_ext
- fi
--echo "$as_me:13163: result: `eval echo '${'$as_ac_Header'}'`" >&5
-+echo "$as_me:13588: result: `eval echo '${'$as_ac_Header'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
- if test `eval echo '${'$as_ac_Header'}'` = yes; then
-   cat >>confdefs.h <<EOF
-@@ -13178,10 +13603,10 @@
- 	*)	termios_bad=maybe ;;
- 	esac
- 	if test "$termios_bad" = maybe ; then
--	echo "$as_me:13181: checking whether termios.h needs _POSIX_SOURCE" >&5
-+	echo "$as_me:13606: checking whether termios.h needs _POSIX_SOURCE" >&5
- echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
- 	cat >conftest.$ac_ext <<_ACEOF
--#line 13184 "configure"
-+#line 13609 "configure"
- #include "confdefs.h"
- #include <termios.h>
- int
-@@ -13193,16 +13618,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:13196: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:13621: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:13199: \$? = $ac_status" >&5
-+  echo "$as_me:13624: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:13202: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:13627: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:13205: \$? = $ac_status" >&5
-+  echo "$as_me:13630: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   termios_bad=no
- else
-@@ -13210,7 +13635,7 @@
- cat conftest.$ac_ext >&5
- 
- 		cat >conftest.$ac_ext <<_ACEOF
--#line 13213 "configure"
-+#line 13638 "configure"
- #include "confdefs.h"
- 
- #define _POSIX_SOURCE
-@@ -13224,16 +13649,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:13227: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:13652: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:13230: \$? = $ac_status" >&5
-+  echo "$as_me:13655: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:13233: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:13658: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:13236: \$? = $ac_status" >&5
-+  echo "$as_me:13661: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   termios_bad=unknown
- else
-@@ -13248,19 +13673,19 @@
- 
- fi
- rm -f conftest.$ac_objext conftest.$ac_ext
--	echo "$as_me:13251: result: $termios_bad" >&5
-+	echo "$as_me:13676: result: $termios_bad" >&5
- echo "${ECHO_T}$termios_bad" >&6
- 	fi
- fi
- 
--echo "$as_me:13256: checking for tcgetattr" >&5
-+echo "$as_me:13681: checking for tcgetattr" >&5
- echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
- if test "${cf_cv_have_tcgetattr+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- 
- cat >conftest.$ac_ext <<_ACEOF
--#line 13263 "configure"
-+#line 13688 "configure"
- #include "confdefs.h"
- 
- #include <sys/types.h>
-@@ -13288,16 +13713,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:13291: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:13716: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:13294: \$? = $ac_status" >&5
-+  echo "$as_me:13719: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:13297: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:13722: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:13300: \$? = $ac_status" >&5
-+  echo "$as_me:13725: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_have_tcgetattr=yes
- else
-@@ -13307,20 +13732,20 @@
- fi
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- fi
--echo "$as_me:13310: result: $cf_cv_have_tcgetattr" >&5
-+echo "$as_me:13735: result: $cf_cv_have_tcgetattr" >&5
- echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
- test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
- #define HAVE_TCGETATTR 1
- EOF
- 
--echo "$as_me:13316: checking for vsscanf function or workaround" >&5
-+echo "$as_me:13741: checking for vsscanf function or workaround" >&5
- echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
- if test "${cf_cv_func_vsscanf+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- 
- cat >conftest.$ac_ext <<_ACEOF
--#line 13323 "configure"
-+#line 13748 "configure"
- #include "confdefs.h"
- 
- #include <stdarg.h>
-@@ -13336,16 +13761,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:13339: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:13764: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:13342: \$? = $ac_status" >&5
-+  echo "$as_me:13767: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:13345: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:13770: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:13348: \$? = $ac_status" >&5
-+  echo "$as_me:13773: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_func_vsscanf=vsscanf
- else
-@@ -13353,7 +13778,7 @@
- cat conftest.$ac_ext >&5
- 
- cat >conftest.$ac_ext <<_ACEOF
--#line 13356 "configure"
-+#line 13781 "configure"
- #include "confdefs.h"
- 
- #include <stdarg.h>
-@@ -13375,16 +13800,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:13378: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:13803: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:13381: \$? = $ac_status" >&5
-+  echo "$as_me:13806: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:13384: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:13809: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:13387: \$? = $ac_status" >&5
-+  echo "$as_me:13812: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_func_vsscanf=vfscanf
- else
-@@ -13392,7 +13817,7 @@
- cat conftest.$ac_ext >&5
- 
- cat >conftest.$ac_ext <<_ACEOF
--#line 13395 "configure"
-+#line 13820 "configure"
- #include "confdefs.h"
- 
- #include <stdarg.h>
-@@ -13414,16 +13839,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:13417: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:13842: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:13420: \$? = $ac_status" >&5
-+  echo "$as_me:13845: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:13423: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:13848: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:13426: \$? = $ac_status" >&5
-+  echo "$as_me:13851: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_func_vsscanf=_doscan
- else
-@@ -13438,7 +13863,7 @@
- fi
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- fi
--echo "$as_me:13441: result: $cf_cv_func_vsscanf" >&5
-+echo "$as_me:13866: result: $cf_cv_func_vsscanf" >&5
- echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
- 
- case $cf_cv_func_vsscanf in #(vi
-@@ -13456,7 +13881,7 @@
- ;;
- esac
- 
--echo "$as_me:13459: checking for working mkstemp" >&5
-+echo "$as_me:13884: checking for working mkstemp" >&5
- echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
- if test "${cf_cv_func_mkstemp+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -13464,13 +13889,13 @@
- 
- rm -f conftest*
- if test "$cross_compiling" = yes; then
--  echo "$as_me:13467: checking for mkstemp" >&5
-+  echo "$as_me:13892: checking for mkstemp" >&5
- echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
- if test "${ac_cv_func_mkstemp+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 13473 "configure"
-+#line 13898 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
-     which can conflict with char mkstemp (); below.  */
-@@ -13501,16 +13926,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:13504: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:13929: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:13507: \$? = $ac_status" >&5
-+  echo "$as_me:13932: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:13510: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:13935: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:13513: \$? = $ac_status" >&5
-+  echo "$as_me:13938: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_func_mkstemp=yes
- else
-@@ -13520,12 +13945,12 @@
- fi
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- fi
--echo "$as_me:13523: result: $ac_cv_func_mkstemp" >&5
-+echo "$as_me:13948: result: $ac_cv_func_mkstemp" >&5
- echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
- 
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 13528 "configure"
-+#line 13953 "configure"
- #include "confdefs.h"
- 
- #include <sys/types.h>
-@@ -13563,15 +13988,15 @@
- 
- _ACEOF
- rm -f conftest$ac_exeext
--if { (eval echo "$as_me:13566: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:13991: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:13569: \$? = $ac_status" >&5
-+  echo "$as_me:13994: \$? = $ac_status" >&5
-   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
--  { (eval echo "$as_me:13571: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:13996: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:13574: \$? = $ac_status" >&5
-+  echo "$as_me:13999: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_func_mkstemp=yes
- 
-@@ -13586,7 +14011,7 @@
- fi
- 
- fi
--echo "$as_me:13589: result: $cf_cv_func_mkstemp" >&5
-+echo "$as_me:14014: result: $cf_cv_func_mkstemp" >&5
- echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
- if test "$cf_cv_func_mkstemp" = yes ; then
- 	cat >>confdefs.h <<\EOF
-@@ -13604,21 +14029,21 @@
- fi
- 
- if test "$cross_compiling" = yes ; then
--	{ echo "$as_me:13607: WARNING: cross compiling: assume setvbuf params not reversed" >&5
-+	{ echo "$as_me:14032: WARNING: cross compiling: assume setvbuf params not reversed" >&5
- echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
- else
--	echo "$as_me:13610: checking whether setvbuf arguments are reversed" >&5
-+	echo "$as_me:14035: checking whether setvbuf arguments are reversed" >&5
- echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
- if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   if test "$cross_compiling" = yes; then
--  { { echo "$as_me:13616: error: cannot run test program while cross compiling" >&5
-+  { { echo "$as_me:14041: error: cannot run test program while cross compiling" >&5
- echo "$as_me: error: cannot run test program while cross compiling" >&2;}
-    { (exit 1); exit 1; }; }
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 13621 "configure"
-+#line 14046 "configure"
- #include "confdefs.h"
- #include <stdio.h>
- /* If setvbuf has the reversed format, exit 0. */
-@@ -13635,15 +14060,15 @@
- }
- _ACEOF
- rm -f conftest$ac_exeext
--if { (eval echo "$as_me:13638: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:14063: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:13641: \$? = $ac_status" >&5
-+  echo "$as_me:14066: \$? = $ac_status" >&5
-   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
--  { (eval echo "$as_me:13643: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:14068: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:13646: \$? = $ac_status" >&5
-+  echo "$as_me:14071: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_func_setvbuf_reversed=yes
- else
-@@ -13656,7 +14081,7 @@
- fi
- rm -f core core.* *.core
- fi
--echo "$as_me:13659: result: $ac_cv_func_setvbuf_reversed" >&5
-+echo "$as_me:14084: result: $ac_cv_func_setvbuf_reversed" >&5
- echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
- if test $ac_cv_func_setvbuf_reversed = yes; then
- 
-@@ -13667,13 +14092,13 @@
- fi
- 
- fi
--echo "$as_me:13670: checking return type of signal handlers" >&5
-+echo "$as_me:14095: checking return type of signal handlers" >&5
- echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
- if test "${ac_cv_type_signal+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 13676 "configure"
-+#line 14101 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <signal.h>
-@@ -13695,16 +14120,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:13698: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:14123: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:13701: \$? = $ac_status" >&5
-+  echo "$as_me:14126: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:13704: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:14129: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:13707: \$? = $ac_status" >&5
-+  echo "$as_me:14132: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_type_signal=void
- else
-@@ -13714,21 +14139,21 @@
- fi
- rm -f conftest.$ac_objext conftest.$ac_ext
- fi
--echo "$as_me:13717: result: $ac_cv_type_signal" >&5
-+echo "$as_me:14142: result: $ac_cv_type_signal" >&5
- echo "${ECHO_T}$ac_cv_type_signal" >&6
- 
- cat >>confdefs.h <<EOF
- #define RETSIGTYPE $ac_cv_type_signal
- EOF
- 
--echo "$as_me:13724: checking for type sigaction_t" >&5
-+echo "$as_me:14149: checking for type sigaction_t" >&5
- echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
- if test "${cf_cv_type_sigaction+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- 
- 	cat >conftest.$ac_ext <<_ACEOF
--#line 13731 "configure"
-+#line 14156 "configure"
- #include "confdefs.h"
- 
- #include <signal.h>
-@@ -13741,16 +14166,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:13744: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:14169: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:13747: \$? = $ac_status" >&5
-+  echo "$as_me:14172: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:13750: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:14175: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:13753: \$? = $ac_status" >&5
-+  echo "$as_me:14178: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_type_sigaction=yes
- else
-@@ -13761,13 +14186,13 @@
- rm -f conftest.$ac_objext conftest.$ac_ext
- fi
- 
--echo "$as_me:13764: result: $cf_cv_type_sigaction" >&5
-+echo "$as_me:14189: result: $cf_cv_type_sigaction" >&5
- echo "${ECHO_T}$cf_cv_type_sigaction" >&6
- test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
- #define HAVE_TYPE_SIGACTION 1
- EOF
- 
--echo "$as_me:13770: checking declaration of size-change" >&5
-+echo "$as_me:14195: checking declaration of size-change" >&5
- echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
- if test "${cf_cv_sizechange+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -13782,7 +14207,7 @@
-     CPPFLAGS="$cf_save_CPPFLAGS"
-     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
-     cat >conftest.$ac_ext <<_ACEOF
--#line 13785 "configure"
-+#line 14210 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #ifdef HAVE_TERMIOS_H
-@@ -13826,16 +14251,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:13829: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:14254: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:13832: \$? = $ac_status" >&5
-+  echo "$as_me:14257: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:13835: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:14260: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:13838: \$? = $ac_status" >&5
-+  echo "$as_me:14263: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_sizechange=yes
- else
-@@ -13854,7 +14279,7 @@
- done
- 
- fi
--echo "$as_me:13857: result: $cf_cv_sizechange" >&5
-+echo "$as_me:14282: result: $cf_cv_sizechange" >&5
- echo "${ECHO_T}$cf_cv_sizechange" >&6
- if test "$cf_cv_sizechange" != no ; then
- 	cat >>confdefs.h <<\EOF
-@@ -13871,13 +14296,13 @@
- 	esac
- fi
- 
--echo "$as_me:13874: checking for memmove" >&5
-+echo "$as_me:14299: checking for memmove" >&5
- echo $ECHO_N "checking for memmove... $ECHO_C" >&6
- if test "${ac_cv_func_memmove+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 13880 "configure"
-+#line 14305 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
-     which can conflict with char memmove (); below.  */
-@@ -13908,16 +14333,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:13911: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:14336: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:13914: \$? = $ac_status" >&5
-+  echo "$as_me:14339: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:13917: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:14342: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:13920: \$? = $ac_status" >&5
-+  echo "$as_me:14345: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_func_memmove=yes
- else
-@@ -13927,19 +14352,19 @@
- fi
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- fi
--echo "$as_me:13930: result: $ac_cv_func_memmove" >&5
-+echo "$as_me:14355: result: $ac_cv_func_memmove" >&5
- echo "${ECHO_T}$ac_cv_func_memmove" >&6
- if test $ac_cv_func_memmove = yes; then
-   :
- else
- 
--echo "$as_me:13936: checking for bcopy" >&5
-+echo "$as_me:14361: checking for bcopy" >&5
- echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
- if test "${ac_cv_func_bcopy+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 13942 "configure"
-+#line 14367 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
-     which can conflict with char bcopy (); below.  */
-@@ -13970,16 +14395,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:13973: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:14398: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:13976: \$? = $ac_status" >&5
-+  echo "$as_me:14401: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:13979: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:14404: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:13982: \$? = $ac_status" >&5
-+  echo "$as_me:14407: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_func_bcopy=yes
- else
-@@ -13989,11 +14414,11 @@
- fi
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- fi
--echo "$as_me:13992: result: $ac_cv_func_bcopy" >&5
-+echo "$as_me:14417: result: $ac_cv_func_bcopy" >&5
- echo "${ECHO_T}$ac_cv_func_bcopy" >&6
- if test $ac_cv_func_bcopy = yes; then
- 
--	echo "$as_me:13996: checking if bcopy does overlapping moves" >&5
-+	echo "$as_me:14421: checking if bcopy does overlapping moves" >&5
- echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
- if test "${cf_cv_good_bcopy+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -14003,7 +14428,7 @@
-   cf_cv_good_bcopy=unknown
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 14006 "configure"
-+#line 14431 "configure"
- #include "confdefs.h"
- 
- int main() {
-@@ -14017,15 +14442,15 @@
- 
- _ACEOF
- rm -f conftest$ac_exeext
--if { (eval echo "$as_me:14020: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:14445: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:14023: \$? = $ac_status" >&5
-+  echo "$as_me:14448: \$? = $ac_status" >&5
-   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
--  { (eval echo "$as_me:14025: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:14450: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:14028: \$? = $ac_status" >&5
-+  echo "$as_me:14453: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_good_bcopy=yes
- else
-@@ -14038,7 +14463,7 @@
- fi
- 
- fi
--echo "$as_me:14041: result: $cf_cv_good_bcopy" >&5
-+echo "$as_me:14466: result: $cf_cv_good_bcopy" >&5
- echo "${ECHO_T}$cf_cv_good_bcopy" >&6
- 
- else
-@@ -14059,7 +14484,7 @@
- 
- fi
- 
--echo "$as_me:14062: checking if poll really works" >&5
-+echo "$as_me:14487: checking if poll really works" >&5
- echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
- if test "${cf_cv_working_poll+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -14069,7 +14494,7 @@
-   cf_cv_working_poll=unknown
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 14072 "configure"
-+#line 14497 "configure"
- #include "confdefs.h"
- 
- #include <stdio.h>
-@@ -14090,15 +14515,15 @@
- }
- _ACEOF
- rm -f conftest$ac_exeext
--if { (eval echo "$as_me:14093: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:14518: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:14096: \$? = $ac_status" >&5
-+  echo "$as_me:14521: \$? = $ac_status" >&5
-   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
--  { (eval echo "$as_me:14098: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:14523: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:14101: \$? = $ac_status" >&5
-+  echo "$as_me:14526: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_working_poll=yes
- else
-@@ -14110,7 +14535,7 @@
- rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
- fi
- fi
--echo "$as_me:14113: result: $cf_cv_working_poll" >&5
-+echo "$as_me:14538: result: $cf_cv_working_poll" >&5
- echo "${ECHO_T}$cf_cv_working_poll" >&6
- test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
- #define HAVE_WORKING_POLL 1
-@@ -14118,7 +14543,7 @@
- 
- # special check for test/ditto.c
- 
--echo "$as_me:14121: checking for openpty in -lutil" >&5
-+echo "$as_me:14546: checking for openpty in -lutil" >&5
- echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
- if test "${ac_cv_lib_util_openpty+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -14126,7 +14551,7 @@
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lutil  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
--#line 14129 "configure"
-+#line 14554 "configure"
- #include "confdefs.h"
- 
- /* Override any gcc2 internal prototype to avoid an error.  */
-@@ -14145,16 +14570,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:14148: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:14573: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:14151: \$? = $ac_status" >&5
-+  echo "$as_me:14576: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:14154: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:14579: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:14157: \$? = $ac_status" >&5
-+  echo "$as_me:14582: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   ac_cv_lib_util_openpty=yes
- else
-@@ -14165,7 +14590,7 @@
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
- fi
--echo "$as_me:14168: result: $ac_cv_lib_util_openpty" >&5
-+echo "$as_me:14593: result: $ac_cv_lib_util_openpty" >&5
- echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
- if test $ac_cv_lib_util_openpty = yes; then
-   cf_cv_lib_util=yes
-@@ -14173,7 +14598,7 @@
-   cf_cv_lib_util=no
- fi
- 
--echo "$as_me:14176: checking for openpty header" >&5
-+echo "$as_me:14601: checking for openpty header" >&5
- echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
- if test "${cf_cv_func_openpty+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -14184,7 +14609,7 @@
-     for cf_header in pty.h libutil.h util.h
-     do
-     cat >conftest.$ac_ext <<_ACEOF
--#line 14187 "configure"
-+#line 14612 "configure"
- #include "confdefs.h"
- 
- #include <$cf_header>
-@@ -14201,16 +14626,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:14204: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:14629: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:14207: \$? = $ac_status" >&5
-+  echo "$as_me:14632: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:14210: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:14635: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:14213: \$? = $ac_status" >&5
-+  echo "$as_me:14638: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
- 
-         cf_cv_func_openpty=$cf_header
-@@ -14228,7 +14653,7 @@
-     LIBS="$cf_save_LIBS"
- 
- fi
--echo "$as_me:14231: result: $cf_cv_func_openpty" >&5
-+echo "$as_me:14656: result: $cf_cv_func_openpty" >&5
- echo "${ECHO_T}$cf_cv_func_openpty" >&6
- 
- if test "$cf_cv_func_openpty" != no ; then
-@@ -14274,13 +14699,13 @@
- 		fi
- 
- 		if test "$cf_have_incdir" = no ; then
--          if test "$cf_add_incdir" = /usr/local/include ; then
-+		  if test "$cf_add_incdir" = /usr/local/include ; then
- 			if test "$GCC" = yes
- 			then
- 			  cf_save_CPPFLAGS=$CPPFLAGS
- 			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
- 			  cat >conftest.$ac_ext <<_ACEOF
--#line 14283 "configure"
-+#line 14708 "configure"
- #include "confdefs.h"
- #include <stdio.h>
- int
-@@ -14292,16 +14717,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:14295: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:14720: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:14298: \$? = $ac_status" >&5
-+  echo "$as_me:14723: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:14301: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:14726: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:14304: \$? = $ac_status" >&5
-+  echo "$as_me:14729: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   :
- else
-@@ -14318,13 +14743,13 @@
- 		if test "$cf_have_incdir" = no ; then
- 		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
- 
--echo "${as_me-configure}:14321: testing adding $cf_add_incdir to include-path ..." 1>&5
-+echo "${as_me-configure}:14746: testing adding $cf_add_incdir to include-path ..." 1>&5
- 
--		  CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
-+		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
- 
--          cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
--          test "$cf_top_incdir" = "$cf_add_incdir" && break
--          cf_add_incdir="$cf_top_incdir"
-+		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
-+		  test "$cf_top_incdir" = "$cf_add_incdir" && break
-+		  cf_add_incdir="$cf_top_incdir"
- 		else
- 		  break
- 		fi
-@@ -14352,7 +14777,7 @@
-       if test "$cf_have_libdir" = no ; then
-         test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
- 
--echo "${as_me-configure}:14355: testing adding $cf_add_libdir to library-path ..." 1>&5
-+echo "${as_me-configure}:14780: testing adding $cf_add_libdir to library-path ..." 1>&5
- 
-         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
-       fi
-@@ -14363,23 +14788,23 @@
-     fi
- esac
- 
--echo "$as_me:14366: checking for db.h" >&5
-+echo "$as_me:14791: checking for db.h" >&5
- echo $ECHO_N "checking for db.h... $ECHO_C" >&6
- if test "${ac_cv_header_db_h+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 14372 "configure"
-+#line 14797 "configure"
- #include "confdefs.h"
- #include <db.h>
- _ACEOF
--if { (eval echo "$as_me:14376: \"$ac_cpp conftest.$ac_ext\"") >&5
-+if { (eval echo "$as_me:14801: \"$ac_cpp conftest.$ac_ext\"") >&5
-   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-   ac_status=$?
-   egrep -v '^ *\+' conftest.er1 >conftest.err
-   rm -f conftest.er1
-   cat conftest.err >&5
--  echo "$as_me:14382: \$? = $ac_status" >&5
-+  echo "$as_me:14807: \$? = $ac_status" >&5
-   (exit $ac_status); } >/dev/null; then
-   if test -s conftest.err; then
-     ac_cpp_err=$ac_c_preproc_warn_flag
-@@ -14398,11 +14823,11 @@
- fi
- rm -f conftest.err conftest.$ac_ext
- fi
--echo "$as_me:14401: result: $ac_cv_header_db_h" >&5
-+echo "$as_me:14826: result: $ac_cv_header_db_h" >&5
- echo "${ECHO_T}$ac_cv_header_db_h" >&6
- if test $ac_cv_header_db_h = yes; then
- 
--echo "$as_me:14405: checking for version of db" >&5
-+echo "$as_me:14830: checking for version of db" >&5
- echo $ECHO_N "checking for version of db... $ECHO_C" >&6
- if test "${cf_cv_hashed_db_version+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -14413,10 +14838,10 @@
- for cf_db_version in 1 2 3 4 5
- do
- 
--echo "${as_me-configure}:14416: testing checking for db version $cf_db_version ..." 1>&5
-+echo "${as_me-configure}:14841: testing checking for db version $cf_db_version ..." 1>&5
- 
- 	cat >conftest.$ac_ext <<_ACEOF
--#line 14419 "configure"
-+#line 14844 "configure"
- #include "confdefs.h"
- 
- $ac_includes_default
-@@ -14446,16 +14871,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:14449: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:14874: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:14452: \$? = $ac_status" >&5
-+  echo "$as_me:14877: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:14455: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:14880: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:14458: \$? = $ac_status" >&5
-+  echo "$as_me:14883: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
- 
- 	cf_cv_hashed_db_version=$cf_db_version
-@@ -14469,16 +14894,16 @@
- done
- 
- fi
--echo "$as_me:14472: result: $cf_cv_hashed_db_version" >&5
-+echo "$as_me:14897: result: $cf_cv_hashed_db_version" >&5
- echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
- 
- if test "$cf_cv_hashed_db_version" = unknown ; then
--	{ { echo "$as_me:14476: error: Cannot determine version of db" >&5
-+	{ { echo "$as_me:14901: error: Cannot determine version of db" >&5
- echo "$as_me: error: Cannot determine version of db" >&2;}
-    { (exit 1); exit 1; }; }
- else
- 
--echo "$as_me:14481: checking for db libraries" >&5
-+echo "$as_me:14906: checking for db libraries" >&5
- echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
- if test "${cf_cv_hashed_db_libs+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -14492,10 +14917,10 @@
- 		LIBS="-l$cf_db_libs $LIBS"
- 	fi
- 
--echo "${as_me-configure}:14495: testing checking for library "$cf_db_libs" ..." 1>&5
-+echo "${as_me-configure}:14920: testing checking for library "$cf_db_libs" ..." 1>&5
- 
- 	cat >conftest.$ac_ext <<_ACEOF
--#line 14498 "configure"
-+#line 14923 "configure"
- #include "confdefs.h"
- 
- $ac_includes_default
-@@ -14550,16 +14975,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:14553: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:14978: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:14556: \$? = $ac_status" >&5
-+  echo "$as_me:14981: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:14559: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:14984: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:14562: \$? = $ac_status" >&5
-+  echo "$as_me:14987: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
- 
- 	if test -n "$cf_db_libs" ; then
-@@ -14579,11 +15004,11 @@
- done
- 
- fi
--echo "$as_me:14582: result: $cf_cv_hashed_db_libs" >&5
-+echo "$as_me:15007: result: $cf_cv_hashed_db_libs" >&5
- echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
- 
- 	if test "$cf_cv_hashed_db_libs" = unknown ; then
--		{ { echo "$as_me:14586: error: Cannot determine library for db" >&5
-+		{ { echo "$as_me:15011: error: Cannot determine library for db" >&5
- echo "$as_me: error: Cannot determine library for db" >&2;}
-    { (exit 1); exit 1; }; }
- 	elif test "$cf_cv_hashed_db_libs" != default ; then
-@@ -14593,7 +15018,7 @@
- 
- else
- 
--	{ { echo "$as_me:14596: error: Cannot find db.h" >&5
-+	{ { echo "$as_me:15021: error: Cannot find db.h" >&5
- echo "$as_me: error: Cannot find db.h" >&2;}
-    { (exit 1); exit 1; }; }
- 
-@@ -14608,7 +15033,7 @@
- 
- # Just in case, check if the C compiler has a bool type.
- 
--echo "$as_me:14611: checking if we should include stdbool.h" >&5
-+echo "$as_me:15036: checking if we should include stdbool.h" >&5
- echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
- 
- if test "${cf_cv_header_stdbool_h+set}" = set; then
-@@ -14616,7 +15041,7 @@
- else
- 
- 	cat >conftest.$ac_ext <<_ACEOF
--#line 14619 "configure"
-+#line 15044 "configure"
- #include "confdefs.h"
- 
- int
-@@ -14628,23 +15053,23 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:14631: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:15056: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:14634: \$? = $ac_status" >&5
-+  echo "$as_me:15059: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:14637: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:15062: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:14640: \$? = $ac_status" >&5
-+  echo "$as_me:15065: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_header_stdbool_h=0
- else
-   echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- cat >conftest.$ac_ext <<_ACEOF
--#line 14647 "configure"
-+#line 15072 "configure"
- #include "confdefs.h"
- 
- #ifndef __BEOS__
-@@ -14660,16 +15085,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:14663: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:15088: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:14666: \$? = $ac_status" >&5
-+  echo "$as_me:15091: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:14669: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:15094: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:14672: \$? = $ac_status" >&5
-+  echo "$as_me:15097: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_header_stdbool_h=1
- else
-@@ -14683,13 +15108,13 @@
- fi
- 
- if test "$cf_cv_header_stdbool_h" = 1
--then	echo "$as_me:14686: result: yes" >&5
-+then	echo "$as_me:15111: result: yes" >&5
- echo "${ECHO_T}yes" >&6
--else	echo "$as_me:14688: result: no" >&5
-+else	echo "$as_me:15113: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
--echo "$as_me:14692: checking for builtin bool type" >&5
-+echo "$as_me:15117: checking for builtin bool type" >&5
- echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
- 
- if test "${cf_cv_cc_bool_type+set}" = set; then
-@@ -14697,7 +15122,7 @@
- else
- 
- 	cat >conftest.$ac_ext <<_ACEOF
--#line 14700 "configure"
-+#line 15125 "configure"
- #include "confdefs.h"
- 
- #include <stdio.h>
-@@ -14712,16 +15137,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:14715: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:15140: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:14718: \$? = $ac_status" >&5
-+  echo "$as_me:15143: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:14721: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:15146: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:14724: \$? = $ac_status" >&5
-+  echo "$as_me:15149: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_cc_bool_type=1
- else
-@@ -14734,9 +15159,9 @@
- fi
- 
- if test "$cf_cv_cc_bool_type" = 1
--then	echo "$as_me:14737: result: yes" >&5
-+then	echo "$as_me:15162: result: yes" >&5
- echo "${ECHO_T}yes" >&6
--else	echo "$as_me:14739: result: no" >&5
-+else	echo "$as_me:15164: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
-@@ -14758,7 +15183,7 @@
- 	cf_stdcpp_libname=stdc++
- 	;;
- esac
--echo "$as_me:14761: checking for library $cf_stdcpp_libname" >&5
-+echo "$as_me:15186: checking for library $cf_stdcpp_libname" >&5
- echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
- if test "${cf_cv_libstdcpp+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -14767,7 +15192,7 @@
- 	cf_save="$LIBS"
- 	LIBS="$LIBS -l$cf_stdcpp_libname"
- cat >conftest.$ac_ext <<_ACEOF
--#line 14770 "configure"
-+#line 15195 "configure"
- #include "confdefs.h"
- 
- #include <strstream.h>
-@@ -14783,16 +15208,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:14786: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:15211: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:14789: \$? = $ac_status" >&5
-+  echo "$as_me:15214: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:14792: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:15217: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:14795: \$? = $ac_status" >&5
-+  echo "$as_me:15220: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_libstdcpp=yes
- else
-@@ -14804,12 +15229,12 @@
- 	LIBS="$cf_save"
- 
- fi
--echo "$as_me:14807: result: $cf_cv_libstdcpp" >&5
-+echo "$as_me:15232: result: $cf_cv_libstdcpp" >&5
- echo "${ECHO_T}$cf_cv_libstdcpp" >&6
- test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
- fi
- 
--	echo "$as_me:14812: checking whether $CXX understands -c and -o together" >&5
-+	echo "$as_me:15237: checking whether $CXX understands -c and -o together" >&5
- echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
- if test "${cf_cv_prog_CXX_c_o+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -14825,15 +15250,15 @@
- # We do the test twice because some compilers refuse to overwrite an
- # existing .o file with -o, though they will create one.
- ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
--if { (eval echo "$as_me:14828: \"$ac_try\"") >&5
-+if { (eval echo "$as_me:15253: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:14831: \$? = $ac_status" >&5
-+  echo "$as_me:15256: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
--  test -f conftest2.$ac_objext && { (eval echo "$as_me:14833: \"$ac_try\"") >&5
-+  test -f conftest2.$ac_objext && { (eval echo "$as_me:15258: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:14836: \$? = $ac_status" >&5
-+  echo "$as_me:15261: \$? = $ac_status" >&5
-   (exit $ac_status); };
- then
-   eval cf_cv_prog_CXX_c_o=yes
-@@ -14844,10 +15269,10 @@
- 
- fi
- if test $cf_cv_prog_CXX_c_o = yes; then
--  echo "$as_me:14847: result: yes" >&5
-+  echo "$as_me:15272: result: yes" >&5
- echo "${ECHO_T}yes" >&6
- else
--  echo "$as_me:14850: result: no" >&5
-+  echo "$as_me:15275: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
-@@ -14867,12 +15292,12 @@
- 	;;
- esac
- if test "$GXX" = yes; then
--	echo "$as_me:14870: checking for lib$cf_gpp_libname" >&5
-+	echo "$as_me:15295: checking for lib$cf_gpp_libname" >&5
- echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
- 	cf_save="$LIBS"
- 	LIBS="$LIBS -l$cf_gpp_libname"
- 	cat >conftest.$ac_ext <<_ACEOF
--#line 14875 "configure"
-+#line 15300 "configure"
- #include "confdefs.h"
- 
- #include <$cf_gpp_libname/builtin.h>
-@@ -14886,16 +15311,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:14889: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:15314: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:14892: \$? = $ac_status" >&5
-+  echo "$as_me:15317: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:14895: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:15320: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:14898: \$? = $ac_status" >&5
-+  echo "$as_me:15323: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cxx_library=yes
- 	 CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
-@@ -14914,7 +15339,7 @@
-   echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- cat >conftest.$ac_ext <<_ACEOF
--#line 14917 "configure"
-+#line 15342 "configure"
- #include "confdefs.h"
- 
- #include <builtin.h>
-@@ -14928,16 +15353,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:14931: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:15356: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:14934: \$? = $ac_status" >&5
-+  echo "$as_me:15359: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:14937: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:15362: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:14940: \$? = $ac_status" >&5
-+  echo "$as_me:15365: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cxx_library=yes
- 	 CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
-@@ -14954,7 +15379,7 @@
- fi
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- 	LIBS="$cf_save"
--	echo "$as_me:14957: result: $cf_cxx_library" >&5
-+	echo "$as_me:15382: result: $cf_cxx_library" >&5
- echo "${ECHO_T}$cf_cxx_library" >&6
- fi
- 
-@@ -14970,7 +15395,7 @@
- ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
- ac_main_return=return
--echo "$as_me:14973: checking how to run the C++ preprocessor" >&5
-+echo "$as_me:15398: checking how to run the C++ preprocessor" >&5
- echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
- if test -z "$CXXCPP"; then
-   if test "${ac_cv_prog_CXXCPP+set}" = set; then
-@@ -14987,18 +15412,18 @@
-   # On the NeXT, cc -E runs the code through the compiler's parser,
-   # not just through cpp. "Syntax error" is here to catch this case.
-   cat >conftest.$ac_ext <<_ACEOF
--#line 14990 "configure"
-+#line 15415 "configure"
- #include "confdefs.h"
- #include <assert.h>
-                      Syntax error
- _ACEOF
--if { (eval echo "$as_me:14995: \"$ac_cpp conftest.$ac_ext\"") >&5
-+if { (eval echo "$as_me:15420: \"$ac_cpp conftest.$ac_ext\"") >&5
-   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-   ac_status=$?
-   egrep -v '^ *\+' conftest.er1 >conftest.err
-   rm -f conftest.er1
-   cat conftest.err >&5
--  echo "$as_me:15001: \$? = $ac_status" >&5
-+  echo "$as_me:15426: \$? = $ac_status" >&5
-   (exit $ac_status); } >/dev/null; then
-   if test -s conftest.err; then
-     ac_cpp_err=$ac_cxx_preproc_warn_flag
-@@ -15021,17 +15446,17 @@
-   # OK, works on sane cases.  Now check whether non-existent headers
-   # can be detected and how.
-   cat >conftest.$ac_ext <<_ACEOF
--#line 15024 "configure"
-+#line 15449 "configure"
- #include "confdefs.h"
- #include <ac_nonexistent.h>
- _ACEOF
--if { (eval echo "$as_me:15028: \"$ac_cpp conftest.$ac_ext\"") >&5
-+if { (eval echo "$as_me:15453: \"$ac_cpp conftest.$ac_ext\"") >&5
-   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-   ac_status=$?
-   egrep -v '^ *\+' conftest.er1 >conftest.err
-   rm -f conftest.er1
-   cat conftest.err >&5
--  echo "$as_me:15034: \$? = $ac_status" >&5
-+  echo "$as_me:15459: \$? = $ac_status" >&5
-   (exit $ac_status); } >/dev/null; then
-   if test -s conftest.err; then
-     ac_cpp_err=$ac_cxx_preproc_warn_flag
-@@ -15068,7 +15493,7 @@
- else
-   ac_cv_prog_CXXCPP=$CXXCPP
- fi
--echo "$as_me:15071: result: $CXXCPP" >&5
-+echo "$as_me:15496: result: $CXXCPP" >&5
- echo "${ECHO_T}$CXXCPP" >&6
- ac_preproc_ok=false
- for ac_cxx_preproc_warn_flag in '' yes
-@@ -15078,18 +15503,18 @@
-   # On the NeXT, cc -E runs the code through the compiler's parser,
-   # not just through cpp. "Syntax error" is here to catch this case.
-   cat >conftest.$ac_ext <<_ACEOF
--#line 15081 "configure"
-+#line 15506 "configure"
- #include "confdefs.h"
- #include <assert.h>
-                      Syntax error
- _ACEOF
--if { (eval echo "$as_me:15086: \"$ac_cpp conftest.$ac_ext\"") >&5
-+if { (eval echo "$as_me:15511: \"$ac_cpp conftest.$ac_ext\"") >&5
-   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-   ac_status=$?
-   egrep -v '^ *\+' conftest.er1 >conftest.err
-   rm -f conftest.er1
-   cat conftest.err >&5
--  echo "$as_me:15092: \$? = $ac_status" >&5
-+  echo "$as_me:15517: \$? = $ac_status" >&5
-   (exit $ac_status); } >/dev/null; then
-   if test -s conftest.err; then
-     ac_cpp_err=$ac_cxx_preproc_warn_flag
-@@ -15112,17 +15537,17 @@
-   # OK, works on sane cases.  Now check whether non-existent headers
-   # can be detected and how.
-   cat >conftest.$ac_ext <<_ACEOF
--#line 15115 "configure"
-+#line 15540 "configure"
- #include "confdefs.h"
- #include <ac_nonexistent.h>
- _ACEOF
--if { (eval echo "$as_me:15119: \"$ac_cpp conftest.$ac_ext\"") >&5
-+if { (eval echo "$as_me:15544: \"$ac_cpp conftest.$ac_ext\"") >&5
-   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-   ac_status=$?
-   egrep -v '^ *\+' conftest.er1 >conftest.err
-   rm -f conftest.er1
-   cat conftest.err >&5
--  echo "$as_me:15125: \$? = $ac_status" >&5
-+  echo "$as_me:15550: \$? = $ac_status" >&5
-   (exit $ac_status); } >/dev/null; then
-   if test -s conftest.err; then
-     ac_cpp_err=$ac_cxx_preproc_warn_flag
-@@ -15150,7 +15575,7 @@
- if $ac_preproc_ok; then
-   :
- else
--  { { echo "$as_me:15153: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
-+  { { echo "$as_me:15578: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
- echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
-    { (exit 1); exit 1; }; }
- fi
-@@ -15165,23 +15590,23 @@
- for ac_header in iostream typeinfo
- do
- as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
--echo "$as_me:15168: checking for $ac_header" >&5
-+echo "$as_me:15593: checking for $ac_header" >&5
- echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
- if eval "test \"\${$as_ac_Header+set}\" = set"; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 15174 "configure"
-+#line 15599 "configure"
- #include "confdefs.h"
- #include <$ac_header>
- _ACEOF
--if { (eval echo "$as_me:15178: \"$ac_cpp conftest.$ac_ext\"") >&5
-+if { (eval echo "$as_me:15603: \"$ac_cpp conftest.$ac_ext\"") >&5
-   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-   ac_status=$?
-   egrep -v '^ *\+' conftest.er1 >conftest.err
-   rm -f conftest.er1
-   cat conftest.err >&5
--  echo "$as_me:15184: \$? = $ac_status" >&5
-+  echo "$as_me:15609: \$? = $ac_status" >&5
-   (exit $ac_status); } >/dev/null; then
-   if test -s conftest.err; then
-     ac_cpp_err=$ac_cxx_preproc_warn_flag
-@@ -15200,7 +15625,7 @@
- fi
- rm -f conftest.err conftest.$ac_ext
- fi
--echo "$as_me:15203: result: `eval echo '${'$as_ac_Header'}'`" >&5
-+echo "$as_me:15628: result: `eval echo '${'$as_ac_Header'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
- if test `eval echo '${'$as_ac_Header'}'` = yes; then
-   cat >>confdefs.h <<EOF
-@@ -15211,10 +15636,10 @@
- done
- 
-     if test x"$ac_cv_header_iostream" = xyes ; then
--        echo "$as_me:15214: checking if iostream uses std-namespace" >&5
-+        echo "$as_me:15639: checking if iostream uses std-namespace" >&5
- echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
-         cat >conftest.$ac_ext <<_ACEOF
--#line 15217 "configure"
-+#line 15642 "configure"
- #include "confdefs.h"
- 
- #include <iostream>
-@@ -15231,16 +15656,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:15234: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:15659: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:15237: \$? = $ac_status" >&5
-+  echo "$as_me:15662: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:15240: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:15665: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:15243: \$? = $ac_status" >&5
-+  echo "$as_me:15668: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_iostream_namespace=yes
- else
-@@ -15249,7 +15674,7 @@
- cf_iostream_namespace=no
- fi
- rm -f conftest.$ac_objext conftest.$ac_ext
--        echo "$as_me:15252: result: $cf_iostream_namespace" >&5
-+        echo "$as_me:15677: result: $cf_iostream_namespace" >&5
- echo "${ECHO_T}$cf_iostream_namespace" >&6
-         if test "$cf_iostream_namespace" = yes ; then
-             cat >>confdefs.h <<\EOF
-@@ -15259,7 +15684,7 @@
-         fi
-     fi
- 
--echo "$as_me:15262: checking if we should include stdbool.h" >&5
-+echo "$as_me:15687: checking if we should include stdbool.h" >&5
- echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
- 
- if test "${cf_cv_header_stdbool_h+set}" = set; then
-@@ -15267,7 +15692,7 @@
- else
- 
- 	cat >conftest.$ac_ext <<_ACEOF
--#line 15270 "configure"
-+#line 15695 "configure"
- #include "confdefs.h"
- 
- int
-@@ -15279,23 +15704,23 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:15282: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:15707: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:15285: \$? = $ac_status" >&5
-+  echo "$as_me:15710: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:15288: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:15713: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:15291: \$? = $ac_status" >&5
-+  echo "$as_me:15716: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_header_stdbool_h=0
- else
-   echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- cat >conftest.$ac_ext <<_ACEOF
--#line 15298 "configure"
-+#line 15723 "configure"
- #include "confdefs.h"
- 
- #ifndef __BEOS__
-@@ -15311,16 +15736,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:15314: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:15739: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:15317: \$? = $ac_status" >&5
-+  echo "$as_me:15742: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:15320: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:15745: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:15323: \$? = $ac_status" >&5
-+  echo "$as_me:15748: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_header_stdbool_h=1
- else
-@@ -15334,13 +15759,13 @@
- fi
- 
- if test "$cf_cv_header_stdbool_h" = 1
--then	echo "$as_me:15337: result: yes" >&5
-+then	echo "$as_me:15762: result: yes" >&5
- echo "${ECHO_T}yes" >&6
--else	echo "$as_me:15339: result: no" >&5
-+else	echo "$as_me:15764: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
--echo "$as_me:15343: checking for builtin bool type" >&5
-+echo "$as_me:15768: checking for builtin bool type" >&5
- echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
- 
- if test "${cf_cv_builtin_bool+set}" = set; then
-@@ -15348,7 +15773,7 @@
- else
- 
- 	cat >conftest.$ac_ext <<_ACEOF
--#line 15351 "configure"
-+#line 15776 "configure"
- #include "confdefs.h"
- 
- #include <stdio.h>
-@@ -15363,16 +15788,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:15366: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:15791: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:15369: \$? = $ac_status" >&5
-+  echo "$as_me:15794: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:15372: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:15797: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:15375: \$? = $ac_status" >&5
-+  echo "$as_me:15800: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_builtin_bool=1
- else
-@@ -15385,13 +15810,13 @@
- fi
- 
- if test "$cf_cv_builtin_bool" = 1
--then	echo "$as_me:15388: result: yes" >&5
-+then	echo "$as_me:15813: result: yes" >&5
- echo "${ECHO_T}yes" >&6
--else	echo "$as_me:15390: result: no" >&5
-+else	echo "$as_me:15815: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
--echo "$as_me:15394: checking for size of bool" >&5
-+echo "$as_me:15819: checking for size of bool" >&5
- echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
- if test "${cf_cv_type_of_bool+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -15402,7 +15827,7 @@
-   cf_cv_type_of_bool=unknown
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 15405 "configure"
-+#line 15830 "configure"
- #include "confdefs.h"
- 
- #include <stdlib.h>
-@@ -15444,15 +15869,15 @@
- 
- _ACEOF
- rm -f conftest$ac_exeext
--if { (eval echo "$as_me:15447: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:15872: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:15450: \$? = $ac_status" >&5
-+  echo "$as_me:15875: \$? = $ac_status" >&5
-   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
--  { (eval echo "$as_me:15452: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:15877: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:15455: \$? = $ac_status" >&5
-+  echo "$as_me:15880: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_type_of_bool=`cat cf_test.out`
- 		 if test -z "$cf_cv_type_of_bool"; then
-@@ -15470,18 +15895,18 @@
- fi
- 
- 	rm -f cf_test.out
--echo "$as_me:15473: result: $cf_cv_type_of_bool" >&5
-+echo "$as_me:15898: result: $cf_cv_type_of_bool" >&5
- echo "${ECHO_T}$cf_cv_type_of_bool" >&6
- if test "$cf_cv_type_of_bool" = unknown ; then
- 	case .$NCURSES_BOOL in #(vi
- 	.auto|.) NCURSES_BOOL=unsigned;;
- 	esac
--	{ echo "$as_me:15479: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
-+	{ echo "$as_me:15904: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
- echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
- 	cf_cv_type_of_bool=$NCURSES_BOOL
- fi
- 
--echo "$as_me:15484: checking for special defines needed for etip.h" >&5
-+echo "$as_me:15909: checking for special defines needed for etip.h" >&5
- echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
- cf_save_CXXFLAGS="$CXXFLAGS"
- cf_result="none"
-@@ -15493,7 +15918,7 @@
- 	test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
- 	test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
- cat >conftest.$ac_ext <<_ACEOF
--#line 15496 "configure"
-+#line 15921 "configure"
- #include "confdefs.h"
- 
- #include <etip.h.in>
-@@ -15507,16 +15932,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:15510: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:15935: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:15513: \$? = $ac_status" >&5
-+  echo "$as_me:15938: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:15516: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:15941: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:15519: \$? = $ac_status" >&5
-+  echo "$as_me:15944: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
- 
- 	test -n "$cf_math" && cat >>confdefs.h <<EOF
-@@ -15537,12 +15962,12 @@
- rm -f conftest.$ac_objext conftest.$ac_ext
- done
- done
--echo "$as_me:15540: result: $cf_result" >&5
-+echo "$as_me:15965: result: $cf_result" >&5
- echo "${ECHO_T}$cf_result" >&6
- CXXFLAGS="$cf_save_CXXFLAGS"
- 
- if test -n "$CXX"; then
--echo "$as_me:15545: checking if $CXX accepts parameter initialization" >&5
-+echo "$as_me:15970: checking if $CXX accepts parameter initialization" >&5
- echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
- if test "${cf_cv_cpp_param_init+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -15559,7 +15984,7 @@
-   cf_cv_cpp_param_init=unknown
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 15562 "configure"
-+#line 15987 "configure"
- #include "confdefs.h"
- 
- class TEST {
-@@ -15578,15 +16003,15 @@
- 
- _ACEOF
- rm -f conftest$ac_exeext
--if { (eval echo "$as_me:15581: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:16006: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:15584: \$? = $ac_status" >&5
-+  echo "$as_me:16009: \$? = $ac_status" >&5
-   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
--  { (eval echo "$as_me:15586: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:16011: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:15589: \$? = $ac_status" >&5
-+  echo "$as_me:16014: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_cpp_param_init=yes
- else
-@@ -15605,7 +16030,7 @@
- ac_main_return=return
- 
- fi
--echo "$as_me:15608: result: $cf_cv_cpp_param_init" >&5
-+echo "$as_me:16033: result: $cf_cv_cpp_param_init" >&5
- echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
- fi
- test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
-@@ -15614,7 +16039,7 @@
- 
- if test -n "$CXX"; then
- 
--echo "$as_me:15617: checking if $CXX accepts static_cast" >&5
-+echo "$as_me:16042: checking if $CXX accepts static_cast" >&5
- echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
- if test "${cf_cv_cpp_static_cast+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -15628,7 +16053,7 @@
- ac_main_return=return
- 
- 	cat >conftest.$ac_ext <<_ACEOF
--#line 15631 "configure"
-+#line 16056 "configure"
- #include "confdefs.h"
- 
- class NCursesPanel
-@@ -15672,16 +16097,16 @@
- }
- _ACEOF
- rm -f conftest.$ac_objext
--if { (eval echo "$as_me:15675: \"$ac_compile\"") >&5
-+if { (eval echo "$as_me:16100: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>&5
-   ac_status=$?
--  echo "$as_me:15678: \$? = $ac_status" >&5
-+  echo "$as_me:16103: \$? = $ac_status" >&5
-   (exit $ac_status); } &&
-          { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:15681: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:16106: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:15684: \$? = $ac_status" >&5
-+  echo "$as_me:16109: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_cpp_static_cast=yes
- else
-@@ -15699,7 +16124,7 @@
- ac_main_return=return
- 
- fi
--echo "$as_me:15702: result: $cf_cv_cpp_static_cast" >&5
-+echo "$as_me:16127: result: $cf_cv_cpp_static_cast" >&5
- echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
- 
- fi
-@@ -15709,12 +16134,12 @@
- EOF
- 
- 	CXX_AR='$(AR)'
--	CXX_AR_OPTS='$(AR_OPTS)'
-+	CXX_ARFLAGS='$(ARFLAGS)'
- 	case $cf_cv_system_name in #(vi
- 	irix*) #(vi
- 	    if test "$GXX" != yes ; then
- 		CXX_AR='$(CXX)'
--		CXX_AR_OPTS='-ar -o'
-+		CXX_ARFLAGS='-ar -o'
- 	    fi
- 	    ;;
- 	sco3.2v5*) #(vi
-@@ -15723,7 +16148,7 @@
- 	solaris2*)
- 	    if test "$GXX" != yes ; then
- 		CXX_AR='$(CXX)'
--		CXX_AR_OPTS='-xar -o'
-+		CXX_ARFLAGS='-xar -o'
- 	    fi
- 	    ;;
- 	esac
-@@ -15747,7 +16172,7 @@
- 	else
- 		if test "$cf_cv_header_stdbool_h" = 1 ; then
- 
--echo "$as_me:15750: checking for size of bool" >&5
-+echo "$as_me:16175: checking for size of bool" >&5
- echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
- if test "${cf_cv_type_of_bool+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -15758,7 +16183,7 @@
-   cf_cv_type_of_bool=unknown
- else
-   cat >conftest.$ac_ext <<_ACEOF
--#line 15761 "configure"
-+#line 16186 "configure"
- #include "confdefs.h"
- 
- #include <stdlib.h>
-@@ -15800,15 +16225,15 @@
- 
- _ACEOF
- rm -f conftest$ac_exeext
--if { (eval echo "$as_me:15803: \"$ac_link\"") >&5
-+if { (eval echo "$as_me:16228: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
-   ac_status=$?
--  echo "$as_me:15806: \$? = $ac_status" >&5
-+  echo "$as_me:16231: \$? = $ac_status" >&5
-   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
--  { (eval echo "$as_me:15808: \"$ac_try\"") >&5
-+  { (eval echo "$as_me:16233: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
--  echo "$as_me:15811: \$? = $ac_status" >&5
-+  echo "$as_me:16236: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
-   cf_cv_type_of_bool=`cat cf_test.out`
- 		 if test -z "$cf_cv_type_of_bool"; then
-@@ -15826,25 +16251,25 @@
- fi
- 
- 	rm -f cf_test.out
--echo "$as_me:15829: result: $cf_cv_type_of_bool" >&5
-+echo "$as_me:16254: result: $cf_cv_type_of_bool" >&5
- echo "${ECHO_T}$cf_cv_type_of_bool" >&6
- if test "$cf_cv_type_of_bool" = unknown ; then
- 	case .$NCURSES_BOOL in #(vi
- 	.auto|.) NCURSES_BOOL=unsigned;;
- 	esac
--	{ echo "$as_me:15835: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
-+	{ echo "$as_me:16260: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
- echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
- 	cf_cv_type_of_bool=$NCURSES_BOOL
- fi
- 
- 		else
--			echo "$as_me:15841: checking for fallback type of bool" >&5
-+			echo "$as_me:16266: checking for fallback type of bool" >&5
- echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
- 			case "$host_cpu" in #(vi
- 			i?86)	cf_cv_type_of_bool=char	;; #(vi
- 			*)	cf_cv_type_of_bool=int	;;
- 			esac
--			echo "$as_me:15847: result: $cf_cv_type_of_bool" >&5
-+			echo "$as_me:16272: result: $cf_cv_type_of_bool" >&5
- echo "${ECHO_T}$cf_cv_type_of_bool" >&6
- 		fi
- 	fi
-@@ -15873,7 +16298,7 @@
- 
- if test "$cf_with_ada" != "no" ; then
-     if test "$with_libtool" != "no"; then
--	{ echo "$as_me:15876: WARNING: libtool does not support Ada - disabling feature" >&5
-+	{ echo "$as_me:16301: WARNING: libtool does not support Ada - disabling feature" >&5
- echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
- 	cf_with_ada=no
-     fi
-@@ -15883,7 +16308,7 @@
- cf_ada_make=gnatmake
- # Extract the first word of "$cf_ada_make", so it can be a program name with args.
- set dummy $cf_ada_make; ac_word=$2
--echo "$as_me:15886: checking for $ac_word" >&5
-+echo "$as_me:16311: checking for $ac_word" >&5
- echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- if test "${ac_cv_prog_gnat_exists+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -15898,7 +16323,7 @@
-   test -z "$ac_dir" && ac_dir=.
-   $as_executable_p "$ac_dir/$ac_word" || continue
- ac_cv_prog_gnat_exists="yes"
--echo "$as_me:15901: found $ac_dir/$ac_word" >&5
-+echo "$as_me:16326: found $ac_dir/$ac_word" >&5
- break
- done
- 
-@@ -15907,10 +16332,10 @@
- fi
- gnat_exists=$ac_cv_prog_gnat_exists
- if test -n "$gnat_exists"; then
--  echo "$as_me:15910: result: $gnat_exists" >&5
-+  echo "$as_me:16335: result: $gnat_exists" >&5
- echo "${ECHO_T}$gnat_exists" >&6
- else
--  echo "$as_me:15913: result: no" >&5
-+  echo "$as_me:16338: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
-@@ -15918,11 +16343,11 @@
-    cf_ada_make=
- else
- 
--echo "$as_me:15921: checking for gnat version" >&5
-+echo "$as_me:16346: checking for gnat version" >&5
- echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
- cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
-   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
--echo "$as_me:15925: result: $cf_gnat_version" >&5
-+echo "$as_me:16350: result: $cf_gnat_version" >&5
- echo "${ECHO_T}$cf_gnat_version" >&6
- 
- case $cf_gnat_version in
-@@ -15945,7 +16370,7 @@
- 
-    # Extract the first word of "m4", so it can be a program name with args.
- set dummy m4; ac_word=$2
--echo "$as_me:15948: checking for $ac_word" >&5
-+echo "$as_me:16373: checking for $ac_word" >&5
- echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
- if test "${ac_cv_prog_M4_exists+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
-@@ -15960,7 +16385,7 @@
-   test -z "$ac_dir" && ac_dir=.
-   $as_executable_p "$ac_dir/$ac_word" || continue
- ac_cv_prog_M4_exists="yes"
--echo "$as_me:15963: found $ac_dir/$ac_word" >&5
-+echo "$as_me:16388: found $ac_dir/$ac_word" >&5
- break
- done
- 
-@@ -15969,10 +16394,10 @@
- fi
- M4_exists=$ac_cv_prog_M4_exists
- if test -n "$M4_exists"; then
--  echo "$as_me:15972: result: $M4_exists" >&5
-+  echo "$as_me:16397: result: $M4_exists" >&5
- echo "${ECHO_T}$M4_exists" >&6
- else
--  echo "$as_me:15975: result: no" >&5
-+  echo "$as_me:16400: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
-@@ -15981,7 +16406,7 @@
-       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
-    fi
-    if test "$cf_cv_prog_gnat_correct" = yes; then
--      echo "$as_me:15984: checking if GNAT works" >&5
-+      echo "$as_me:16409: checking if GNAT works" >&5
- echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
- 
- rm -f conftest*
-@@ -16009,14 +16434,14 @@
- fi
- rm -f conftest*
- 
--      echo "$as_me:16012: result: $cf_cv_prog_gnat_correct" >&5
-+      echo "$as_me:16437: result: $cf_cv_prog_gnat_correct" >&5
- echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
-    fi
- fi
- if test	"$cf_cv_prog_gnat_correct" = yes; then
-    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
- 
--   echo "$as_me:16019: checking if GNAT pragma Unreferenced works" >&5
-+   echo "$as_me:16444: checking if GNAT pragma Unreferenced works" >&5
- echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
- 
- rm -f conftest*
-@@ -16043,7 +16468,7 @@
- fi
- rm -f conftest*
- 
--   echo "$as_me:16046: result: $cf_cv_pragma_unreferenced" >&5
-+   echo "$as_me:16471: result: $cf_cv_pragma_unreferenced" >&5
- echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
- 
-    # if the pragma is supported, use it (needed in the Trace code).
-@@ -16096,7 +16521,7 @@
-   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
-   ;;
- *)
--  { { echo "$as_me:16099: error: expected a pathname, not \"$withval\"" >&5
-+  { { echo "$as_me:16524: error: expected a pathname, not \"$withval\"" >&5
- echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
-    { (exit 1); exit 1; }; }
-   ;;
-@@ -16138,7 +16563,7 @@
-   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
-   ;;
- *)
--  { { echo "$as_me:16141: error: expected a pathname, not \"$withval\"" >&5
-+  { { echo "$as_me:16566: error: expected a pathname, not \"$withval\"" >&5
- echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
-    { (exit 1); exit 1; }; }
-   ;;
-@@ -16163,7 +16588,7 @@
- ### chooses to split module lists into libraries.
- ###
- ### (see CF_LIB_RULES).
--echo "$as_me:16166: checking for library subsets" >&5
-+echo "$as_me:16591: checking for library subsets" >&5
- echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
- LIB_SUBSETS=
- 
-@@ -16176,7 +16601,17 @@
- 	fi
- fi
- 
--LIB_SUBSETS="${LIB_SUBSETS}termlib"
-+LIB_SUBSETS="${LIB_SUBSETS}termlib+port_drivers"
-+
-+case $cf_cv_system_name in #(vi
-+*mingw32*) #(vi
-+	LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
-+	;;
-+*) #(vi
-+	LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
-+	;;
-+esac
-+
- test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
- if test "$with_termlib" != no ; then
- 	LIB_SUBSETS="${LIB_SUBSETS} "
-@@ -16185,17 +16620,18 @@
- fi
- 
- LIB_SUBSETS="${LIB_SUBSETS}base"
-+
- test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
- test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
- 
--echo "$as_me:16191: result: $LIB_SUBSETS" >&5
-+echo "$as_me:16627: result: $LIB_SUBSETS" >&5
- echo "${ECHO_T}$LIB_SUBSETS" >&6
- 
- ### Construct the list of include-directories to be generated
- 
--CPPFLAGS="-I. -I../include $CPPFLAGS"
-+CPPFLAGS="$CPPFLAGS -I. -I../include"
- if test "$srcdir" != "."; then
--	CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
-+	CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
- fi
- if test "$GCC" != yes; then
- 	CPPFLAGS="$CPPFLAGS -I\${includedir}"
-@@ -16226,7 +16662,7 @@
- fi
- 
- ### Build up pieces for makefile rules
--echo "$as_me:16229: checking default library suffix" >&5
-+echo "$as_me:16665: checking default library suffix" >&5
- echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
- 
- 	case $DFT_LWR_MODEL in
-@@ -16237,46 +16673,50 @@
- 	shared)  DFT_ARG_SUFFIX=''   ;;
- 	esac
- 	test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
--echo "$as_me:16240: result: $DFT_ARG_SUFFIX" >&5
-+echo "$as_me:16676: result: $DFT_ARG_SUFFIX" >&5
- echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
- 
--echo "$as_me:16243: checking default library-dependency suffix" >&5
-+echo "$as_me:16679: checking default library-dependency suffix" >&5
- echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
- 
--	case $DFT_LWR_MODEL in
--	libtool)
-+	case $DFT_LWR_MODEL in #(vi
-+	libtool) #(vi
- 		DFT_LIB_SUFFIX='.la'
- 		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
- 		;;
--	normal)
-+	normal) #(vi
- 		DFT_LIB_SUFFIX='.a'
- 		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
- 		;;
--	debug)
-+	debug) #(vi
- 		DFT_LIB_SUFFIX='_g.a'
- 		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
- 		;;
--	profile)
-+	profile) #(vi
- 		DFT_LIB_SUFFIX='_p.a'
- 		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
- 		;;
--	shared)
-+	shared) #(vi
- 		case $cf_cv_system_name in
--		cygwin*)
-+		aix[56]*) #(vi
-+			DFT_LIB_SUFFIX='.a'
-+			DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
-+			;;
-+		cygwin*) #(vi
- 			DFT_LIB_SUFFIX='.dll'
- 			DFT_DEP_SUFFIX='.dll.a'
- 			;;
--		darwin*)
-+		darwin*) #(vi
- 			DFT_LIB_SUFFIX='.dylib'
- 			DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
- 			;;
--		hpux*)
-+		hpux*) #(vi
- 			case $target in
--			ia64*)
-+			ia64*) #(vi
- 				DFT_LIB_SUFFIX='.so'
- 				DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
- 				;;
--			*)
-+			*) #(vi
- 				DFT_LIB_SUFFIX='.sl'
- 				DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
- 				;;
-@@ -16289,10 +16729,10 @@
- 	esac
- 	test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
- 	test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
--echo "$as_me:16292: result: $DFT_DEP_SUFFIX" >&5
-+echo "$as_me:16732: result: $DFT_DEP_SUFFIX" >&5
- echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
- 
--echo "$as_me:16295: checking default object directory" >&5
-+echo "$as_me:16735: checking default object directory" >&5
- echo $ECHO_N "checking default object directory... $ECHO_C" >&6
- 
- 	case $DFT_LWR_MODEL in
-@@ -16308,51 +16748,55 @@
- 			DFT_OBJ_SUBDIR='obj_s' ;;
- 		esac
- 	esac
--echo "$as_me:16311: result: $DFT_OBJ_SUBDIR" >&5
-+echo "$as_me:16751: result: $DFT_OBJ_SUBDIR" >&5
- echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
- 
- # libtool thinks it can make c++ shared libraries (perhaps only g++)
- if test "$cf_with_cxx" = yes ; then
--echo "$as_me:16316: checking c++ library-dependency suffix" >&5
-+echo "$as_me:16756: checking c++ library-dependency suffix" >&5
- echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
- if test "$with_libtool" != "no"; then
- 	CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
- else
- 
--	case normal in
--	libtool)
-+	case normal in #(vi
-+	libtool) #(vi
- 		CXX_LIB_SUFFIX='.la'
- 		CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
- 		;;
--	normal)
-+	normal) #(vi
- 		CXX_LIB_SUFFIX='.a'
- 		CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
- 		;;
--	debug)
-+	debug) #(vi
- 		CXX_LIB_SUFFIX='_g.a'
- 		CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
- 		;;
--	profile)
-+	profile) #(vi
- 		CXX_LIB_SUFFIX='_p.a'
- 		CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
- 		;;
--	shared)
-+	shared) #(vi
- 		case $cf_cv_system_name in
--		cygwin*)
-+		aix[56]*) #(vi
-+			CXX_LIB_SUFFIX='.a'
-+			CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
-+			;;
-+		cygwin*) #(vi
- 			CXX_LIB_SUFFIX='.dll'
- 			CXX_DEP_SUFFIX='.dll.a'
- 			;;
--		darwin*)
-+		darwin*) #(vi
- 			CXX_LIB_SUFFIX='.dylib'
- 			CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
- 			;;
--		hpux*)
-+		hpux*) #(vi
- 			case $target in
--			ia64*)
-+			ia64*) #(vi
- 				CXX_LIB_SUFFIX='.so'
- 				CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
- 				;;
--			*)
-+			*) #(vi
- 				CXX_LIB_SUFFIX='.sl'
- 				CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
- 				;;
-@@ -16366,7 +16810,7 @@
- 	test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
- 	test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
- fi
--echo "$as_me:16369: result: $CXX_LIB_SUFFIX" >&5
-+echo "$as_me:16813: result: $CXX_LIB_SUFFIX" >&5
- echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
- 
- fi
-@@ -16431,6 +16875,8 @@
- 		TEST_ARGS="${TEST_DEPS}"
- 		TEST_ARG2="${TEST_DEP2}"
- 		TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
-+		TICS_LIST="$SHLIB_LIST $TEST_ARGS"
-+		SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
- 	else
- 		TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
- 		TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
-@@ -16480,7 +16926,7 @@
- 
- if test "$GCC" = yes ; then
- 	case $cf_cv_system_name in #(
--	OS/2*|os2*|aix[45]*) 	#( vi
-+	OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*) 	#( vi
- 		LDFLAGS_STATIC=
- 		LDFLAGS_SHARED=
- 		;;
-@@ -16491,7 +16937,7 @@
-     esac
- else
- 	case $cf_cv_system_name in #(
--	aix[45]*) 	#( from ld manpage
-+	aix[456]*) 	#( from ld manpage
- 		LDFLAGS_STATIC=-bstatic
- 		LDFLAGS_SHARED=-bdynamic
- 		;;
-@@ -16519,12 +16965,12 @@
- 	;;
- esac
- 
--echo "$as_me:16522: checking where we will install curses.h" >&5
-+echo "$as_me:16968: checking where we will install curses.h" >&5
- echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
- test "$with_overwrite" = no && \
- test "x$includedir" = 'x${prefix}/include' && \
- 	includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
--echo "$as_me:16527: result: $includedir" >&5
-+echo "$as_me:16973: result: $includedir" >&5
- echo "${ECHO_T}$includedir" >&6
- 
- ### Resolve a conflict between normal and wide-curses by forcing applications
-@@ -16532,10 +16978,11 @@
- if test "$with_overwrite" != no ; then
- if test "$NCURSES_LIBUTF8" = 1 ; then
- 	NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
--	{ echo "$as_me:16535: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
-+	{ echo "$as_me:16981: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
- echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
- fi
- fi
-+WITH_OVERWRITE=$with_overwrite
- 
- # used to separate tack out of the tree
- NCURSES_TREE=
-@@ -16548,7 +16995,7 @@
- ### Construct the list of subdirectories for which we'll customize makefiles
- ### with the appropriate compile-rules.
- 
--echo "$as_me:16551: checking for src modules" >&5
-+echo "$as_me:16998: checking for src modules" >&5
- echo $ECHO_N "checking for src modules... $ECHO_C" >&6
- 
- # dependencies and linker-arguments for test-programs
-@@ -16611,13 +17058,17 @@
- 		fi
- 	fi
- done
--echo "$as_me:16614: result: $cf_cv_src_modules" >&5
-+echo "$as_me:17061: result: $cf_cv_src_modules" >&5
- echo "${ECHO_T}$cf_cv_src_modules" >&6
- 
- TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
- TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
- 
--SRC_SUBDIRS="man include"
-+SRC_SUBDIRS=
-+if test "x$cf_with_manpages" != xno ; then
-+	SRC_SUBDIRS="$SRC_SUBDIRS man"
-+fi
-+SRC_SUBDIRS="$SRC_SUBDIRS include"
- for cf_dir in $cf_cv_src_modules
- do
- 	SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
-@@ -16628,8 +17079,8 @@
- 
- ADA_SUBDIRS=
- if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
--   SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
--   ADA_SUBDIRS="gen src samples"
-+	SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
-+	ADA_SUBDIRS="gen src samples"
- fi
- 
- SUB_MAKEFILES=
-@@ -16639,15 +17090,15 @@
- done
- 
- if test -n "$ADA_SUBDIRS"; then
--   for cf_dir in $ADA_SUBDIRS
--   do
--      SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
--   done
-+	for cf_dir in $ADA_SUBDIRS
-+	do
-+		SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
-+	done
- 
- fi
- 
- if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
--   SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses-config"
-+   SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
- fi
- 
- DIRS_TO_MAKE="lib"
-@@ -16680,7 +17131,7 @@
- done
- 
- cat >>confdefs.h <<EOF
--#define NCURSES_PATHSEP '$PATHSEP'
-+#define NCURSES_PATHSEP '$PATH_SEPARATOR'
- EOF
- 
- cat >>confdefs.h <<EOF
-@@ -16749,7 +17200,7 @@
- 
- if test -n "$cf_new_cppflags" ; then
- 
--	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
-+	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
- fi
- 
- if test -n "$cf_new_extra_cppflags" ; then
-@@ -16760,18 +17211,18 @@
- ### If we're building with rpath, try to link non-standard libs that way too.
- if test "$DFT_LWR_MODEL" = "shared"; then
- 
--echo "$as_me:16763: checking for updated LDFLAGS" >&5
-+echo "$as_me:17214: checking for updated LDFLAGS" >&5
- echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
- if test -n "$LDFLAGS" ; then
--echo "$as_me:16766: result: maybe" >&5
-+echo "$as_me:17217: result: maybe" >&5
- echo "${ECHO_T}maybe" >&6
- test -n "$verbose" && echo "	...checking LDFLAGS $LDFLAGS" 1>&6
- 
--echo "${as_me-configure}:16770: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
-+echo "${as_me-configure}:17221: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
- 
- test -n "$verbose" && echo "	...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
- 
--echo "${as_me-configure}:16774: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
-+echo "${as_me-configure}:17225: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
- 
- case "$EXTRA_LDFLAGS" in #(vi
- -Wl,-rpath,*) #(vi
-@@ -16793,7 +17244,7 @@
- 	do
- 		test -n "$verbose" && echo "	Filtering $cf_rpath_src" 1>&6
- 
--echo "${as_me-configure}:16796: testing Filtering $cf_rpath_src ..." 1>&5
-+echo "${as_me-configure}:17247: testing Filtering $cf_rpath_src ..." 1>&5
- 
- 		case $cf_rpath_src in #(vi
- 		-L*) #(vi
-@@ -16804,7 +17255,7 @@
- 			fi
- 			test -n "$verbose" && echo "	...Filter $cf_rpath_tmp" 1>&6
- 
--echo "${as_me-configure}:16807: testing ...Filter $cf_rpath_tmp ..." 1>&5
-+echo "${as_me-configure}:17258: testing ...Filter $cf_rpath_tmp ..." 1>&5
- 
- 			EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
- 			;;
-@@ -16814,15 +17265,15 @@
- 	LDFLAGS=$cf_rpath_dst
- 	test -n "$verbose" && echo "	...checked LDFLAGS $LDFLAGS" 1>&6
- 
--echo "${as_me-configure}:16817: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
-+echo "${as_me-configure}:17268: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
- 
- 	test -n "$verbose" && echo "	...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
- 
--echo "${as_me-configure}:16821: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
-+echo "${as_me-configure}:17272: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
- 
- fi
- else
--echo "$as_me:16825: result: no" >&5
-+echo "$as_me:17276: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
- 
-@@ -16849,9 +17300,19 @@
- fi
- 
- ################################################################################
--test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
-+test "$use_database" = yes && \
-+SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
-+
- SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
--ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/termcap.h include/unctrl.h $SUB_MAKEFILES Makefile"
-+
-+if test x"$enable_pc_files" = xyes ; then \
-+SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
-+MAKE_PC_FILES=
-+else
-+MAKE_PC_FILES="#"
-+fi
-+
-+ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h $SUB_MAKEFILES Makefile"
- ac_config_commands="$ac_config_commands default"
- cat >confcache <<\_ACEOF
- # This file is a shell script that caches the results of configure
-@@ -16932,7 +17393,7 @@
- : ${CONFIG_STATUS=./config.status}
- ac_clean_files_save=$ac_clean_files
- ac_clean_files="$ac_clean_files $CONFIG_STATUS"
--{ echo "$as_me:16935: creating $CONFIG_STATUS" >&5
-+{ echo "$as_me:17396: creating $CONFIG_STATUS" >&5
- echo "$as_me: creating $CONFIG_STATUS" >&6;}
- cat >$CONFIG_STATUS <<_ACEOF
- #! $SHELL
-@@ -17064,7 +17525,7 @@
- cat >>$CONFIG_STATUS <<EOF
- ac_cs_version="\\
- config.status
--configured by $0, generated by GNU Autoconf 2.52.20080325,
-+configured by $0, generated by GNU Autoconf 2.52.20081225,
-   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
- 
- Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
-@@ -17108,7 +17569,7 @@
-     echo "$ac_cs_version"; exit 0 ;;
-   --he | --h)
-     # Conflict between --help and --header
--    { { echo "$as_me:17111: error: ambiguous option: $1
-+    { { echo "$as_me:17572: error: ambiguous option: $1
- Try \`$0 --help' for more information." >&5
- echo "$as_me: error: ambiguous option: $1
- Try \`$0 --help' for more information." >&2;}
-@@ -17127,7 +17588,7 @@
-     ac_need_defaults=false;;
- 
-   # This is an error.
--  -*) { { echo "$as_me:17130: error: unrecognized option: $1
-+  -*) { { echo "$as_me:17591: error: unrecognized option: $1
- Try \`$0 --help' for more information." >&5
- echo "$as_me: error: unrecognized option: $1
- Try \`$0 --help' for more information." >&2;}
-@@ -17146,7 +17607,7 @@
- ## Running config.status.  ##
- ## ----------------------- ##
- 
--This file was extended by $as_me 2.52.20080325, executed with
-+This file was extended by $as_me 2.52.20081225, executed with
-   CONFIG_FILES    = $CONFIG_FILES
-   CONFIG_HEADERS  = $CONFIG_HEADERS
-   CONFIG_LINKS    = $CONFIG_LINKS
-@@ -17181,13 +17642,13 @@
- NCURSES_PATCH="$NCURSES_PATCH"
- SRC_SUBDIRS="$SRC_SUBDIRS"
- TERMINFO="$TERMINFO"
-+TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
-+TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
-+TICS_NAME="$TICS_NAME"
- TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
- TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
- TINFO_NAME="$TINFO_NAME"
- TINFO_SUFFIX="$TINFO_SUFFIX"
--TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
--TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
--TICS_NAME="$TICS_NAME"
- WITH_CURSES_H="$with_curses_h"
- WITH_ECHO="$with_echo"
- WITH_OVERWRITE="$with_overwrite"
-@@ -17206,6 +17667,7 @@
- cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
- cf_cv_system_name="$cf_cv_system_name"
- cf_with_cxx_binding="$cf_with_cxx_binding"
-+cf_with_manpages="$cf_with_manpages"
- host="$host"
- target="$target"
- 
-@@ -17218,13 +17680,14 @@
-   # Handling of arguments.
-   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
-   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
-+  "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
-   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
-   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
-   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
-   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
-   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
--  *) { { echo "$as_me:17227: error: invalid argument: $ac_config_target" >&5
-+  *) { { echo "$as_me:17690: error: invalid argument: $ac_config_target" >&5
- echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
-    { (exit 1); exit 1; }; };;
-   esac
-@@ -17349,6 +17812,8 @@
- s,@LINT@,$LINT,;t t
- s,@LINT_OPTS@,$LINT_OPTS,;t t
- s,@LN_S@,$LN_S,;t t
-+s,@PKG_CONFIG@,$PKG_CONFIG,;t t
-+s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
- s,@SET_MAKE@,$SET_MAKE,;t t
- s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
- s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
-@@ -17359,7 +17824,7 @@
- s,@ac_ct_LD@,$ac_ct_LD,;t t
- s,@AR@,$AR,;t t
- s,@ac_ct_AR@,$ac_ct_AR,;t t
--s,@AR_OPTS@,$AR_OPTS,;t t
-+s,@ARFLAGS@,$ARFLAGS,;t t
- s,@DESTDIR@,$DESTDIR,;t t
- s,@BUILD_CC@,$BUILD_CC,;t t
- s,@BUILD_CPP@,$BUILD_CPP,;t t
-@@ -17371,6 +17836,7 @@
- s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
- s,@cf_list_models@,$cf_list_models,;t t
- s,@LIBTOOL@,$LIBTOOL,;t t
-+s,@LT_UNDEF@,$LT_UNDEF,;t t
- s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
- s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
- s,@LIB_CREATE@,$LIB_CREATE,;t t
-@@ -17392,6 +17858,7 @@
- s,@CXX_G_OPT@,$CXX_G_OPT,;t t
- s,@LD_MODEL@,$LD_MODEL,;t t
- s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
-+s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
- s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
- s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
- s,@LINK_PROGS@,$LINK_PROGS,;t t
-@@ -17401,7 +17868,6 @@
- s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
- s,@INSTALL_LIB@,$INSTALL_LIB,;t t
- s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
--s,@PATHSEP@,$PATHSEP,;t t
- s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
- s,@WHICH_XTERM@,$WHICH_XTERM,;t t
- s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
-@@ -17423,8 +17889,12 @@
- s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
- s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
- s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
-+s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
- s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
- s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
-+s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
-+s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
-+s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
- s,@NCURSES_CONST@,$NCURSES_CONST,;t t
- s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
- s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
-@@ -17435,6 +17905,7 @@
- s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
- s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
- s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
-+s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
- s,@ECHO_LINK@,$ECHO_LINK,;t t
- s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
- s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
-@@ -17449,7 +17920,7 @@
- s,@CXXCPP@,$CXXCPP,;t t
- s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
- s,@CXX_AR@,$CXX_AR,;t t
--s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
-+s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
- s,@CXXLIBS@,$CXXLIBS,;t t
- s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
- s,@gnat_exists@,$gnat_exists,;t t
-@@ -17493,6 +17964,7 @@
- s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
- s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
- s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
-+s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
- CEOF
- 
- EOF
-@@ -17607,7 +18079,7 @@
-   esac
- 
-   if test x"$ac_file" != x-; then
--    { echo "$as_me:17610: creating $ac_file" >&5
-+    { echo "$as_me:18082: creating $ac_file" >&5
- echo "$as_me: creating $ac_file" >&6;}
-     rm -f "$ac_file"
-   fi
-@@ -17625,7 +18097,7 @@
-       -) echo $tmp/stdin ;;
-       [\\/$]*)
-          # Absolute (can't be DOS-style, as IFS=:)
--         test -f "$f" || { { echo "$as_me:17628: error: cannot find input file: $f" >&5
-+         test -f "$f" || { { echo "$as_me:18100: error: cannot find input file: $f" >&5
- echo "$as_me: error: cannot find input file: $f" >&2;}
-    { (exit 1); exit 1; }; }
-          echo $f;;
-@@ -17638,7 +18110,7 @@
-            echo $srcdir/$f
-          else
-            # /dev/null tree
--           { { echo "$as_me:17641: error: cannot find input file: $f" >&5
-+           { { echo "$as_me:18113: error: cannot find input file: $f" >&5
- echo "$as_me: error: cannot find input file: $f" >&2;}
-    { (exit 1); exit 1; }; }
-          fi;;
-@@ -17704,7 +18176,7 @@
-   * )   ac_file_in=$ac_file.in ;;
-   esac
- 
--  test x"$ac_file" != x- && { echo "$as_me:17707: creating $ac_file" >&5
-+  test x"$ac_file" != x- && { echo "$as_me:18179: creating $ac_file" >&5
- echo "$as_me: creating $ac_file" >&6;}
- 
-   # First look for the input files in the build tree, otherwise in the
-@@ -17715,7 +18187,7 @@
-       -) echo $tmp/stdin ;;
-       [\\/$]*)
-          # Absolute (can't be DOS-style, as IFS=:)
--         test -f "$f" || { { echo "$as_me:17718: error: cannot find input file: $f" >&5
-+         test -f "$f" || { { echo "$as_me:18190: error: cannot find input file: $f" >&5
- echo "$as_me: error: cannot find input file: $f" >&2;}
-    { (exit 1); exit 1; }; }
-          echo $f;;
-@@ -17728,7 +18200,7 @@
-            echo $srcdir/$f
-          else
-            # /dev/null tree
--           { { echo "$as_me:17731: error: cannot find input file: $f" >&5
-+           { { echo "$as_me:18203: error: cannot find input file: $f" >&5
- echo "$as_me: error: cannot find input file: $f" >&2;}
-    { (exit 1); exit 1; }; }
-          fi;;
-@@ -17786,7 +18258,7 @@
-   rm -f $tmp/in
-   if test x"$ac_file" != x-; then
-     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
--      { echo "$as_me:17789: $ac_file is unchanged" >&5
-+      { echo "$as_me:18261: $ac_file is unchanged" >&5
- echo "$as_me: $ac_file is unchanged" >&6;}
-     else
-       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-@@ -17873,40 +18345,44 @@
- 		for cf_item in $cf_LIST_MODELS
- 		do
- 
--	case $cf_item in
--	libtool)
-+	case $cf_item in #(vi
-+	libtool) #(vi
- 		cf_suffix='.la'
- 		cf_depsuf=$cf_suffix
- 		;;
--	normal)
-+	normal) #(vi
- 		cf_suffix='.a'
- 		cf_depsuf=$cf_suffix
- 		;;
--	debug)
-+	debug) #(vi
- 		cf_suffix='_g.a'
- 		cf_depsuf=$cf_suffix
- 		;;
--	profile)
-+	profile) #(vi
- 		cf_suffix='_p.a'
- 		cf_depsuf=$cf_suffix
- 		;;
--	shared)
-+	shared) #(vi
- 		case $cf_cv_system_name in
--		cygwin*)
-+		aix[56]*) #(vi
-+			cf_suffix='.a'
-+			cf_depsuf=$cf_suffix
-+			;;
-+		cygwin*) #(vi
- 			cf_suffix='.dll'
- 			cf_depsuf='.dll.a'
- 			;;
--		darwin*)
-+		darwin*) #(vi
- 			cf_suffix='.dylib'
- 			cf_depsuf=$cf_suffix
- 			;;
--		hpux*)
-+		hpux*) #(vi
- 			case $target in
--			ia64*)
-+			ia64*) #(vi
- 				cf_suffix='.so'
- 				cf_depsuf=$cf_suffix
- 				;;
--			*)
-+			*) #(vi
- 				cf_suffix='.sl'
- 				cf_depsuf=$cf_suffix
- 				;;
-@@ -18020,40 +18496,44 @@
- 
- cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
- 
--	case $cf_item in
--	libtool)
-+	case $cf_item in #(vi
-+	libtool) #(vi
- 		cf_suffix='.la'
- 		cf_depsuf=$cf_suffix
- 		;;
--	normal)
-+	normal) #(vi
- 		cf_suffix='.a'
- 		cf_depsuf=$cf_suffix
- 		;;
--	debug)
-+	debug) #(vi
- 		cf_suffix='_g.a'
- 		cf_depsuf=$cf_suffix
- 		;;
--	profile)
-+	profile) #(vi
- 		cf_suffix='_p.a'
- 		cf_depsuf=$cf_suffix
- 		;;
--	shared)
-+	shared) #(vi
- 		case $cf_cv_system_name in
--		cygwin*)
-+		aix[56]*) #(vi
-+			cf_suffix='.a'
-+			cf_depsuf=$cf_suffix
-+			;;
-+		cygwin*) #(vi
- 			cf_suffix='.dll'
- 			cf_depsuf='.dll.a'
- 			;;
--		darwin*)
-+		darwin*) #(vi
- 			cf_suffix='.dylib'
- 			cf_depsuf=$cf_suffix
- 			;;
--		hpux*)
-+		hpux*) #(vi
- 			case $target in
--			ia64*)
-+			ia64*) #(vi
- 				cf_suffix='.so'
- 				cf_depsuf=$cf_suffix
- 				;;
--			*)
-+			*) #(vi
- 				cf_suffix='.sl'
- 				cf_depsuf=$cf_suffix
- 				;;
-@@ -18234,18 +18714,28 @@
- install.libs uninstall.libs \\
- install.data uninstall.data ::
- $MAKE_TERMINFO	cd misc && \${MAKE} \${CF_MFLAGS} \$@
-+CF_EOF
-+
-+if test "x$cf_with_manpages" = xyes; then
-+cat >> Makefile <<CF_EOF
- 
- install.man \\
- uninstall.man ::
- 	cd man && \${MAKE} \${CF_MFLAGS} \$@
-+CF_EOF
-+fi
-+
-+cat >> Makefile <<CF_EOF
- 
- distclean ::
- 	rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
- 	rm -f headers.sh headers.sed mk_shared_lib.sh
-+	rm -f edit_man.* man_alias.*
- 	rm -rf \${DIRS_TO_MAKE}
- CF_EOF
- 
- # Special case: tack's manpage lives in its own directory.
-+if test "x$cf_with_manpages" = xyes; then
- if test -d tack ; then
- if test -f $srcdir/$tack.h; then
- cat >> Makefile <<CF_EOF
-@@ -18256,6 +18746,7 @@
- CF_EOF
- fi
- fi
-+fi
- 
- rm -f headers.sed headers.sh
- 
-diff -Naur ncurses-5.7.orig/configure.in ncurses-5.7/configure.in
---- ncurses-5.7.orig/configure.in	2008-10-18 07:53:32.000000000 -0700
-+++ ncurses-5.7/configure.in	2009-07-19 15:04:17.000000000 -0700
-@@ -1,5 +1,5 @@
- dnl***************************************************************************
--dnl Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+dnl Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
- dnl                                                                          *
- dnl Permission is hereby granted, free of charge, to any person obtaining a  *
- dnl copy of this software and associated documentation files (the            *
-@@ -28,14 +28,14 @@
- dnl
- dnl Author: Thomas E. Dickey 1995-on
- dnl
--dnl $Id: configure.in,v 1.454 2008/10/18 14:53:32 tom Exp $
-+dnl $Id: configure.in,v 1.472 2009/07/18 16:18:30 tom Exp $
- dnl Process this file with autoconf to produce a configure script.
- dnl
- dnl See http://invisible-island.net/autoconf/ for additional information.
- dnl
- dnl ---------------------------------------------------------------------------
- AC_PREREQ(2.13.20020210)
--AC_REVISION($Revision: 1.454 $)
-+AC_REVISION($Revision: 1.472 $)
- AC_INIT(ncurses/base/lib_initscr.c)
- AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
- 
-@@ -122,6 +122,13 @@
- 	[cf_with_ada=yes])
- AC_MSG_RESULT($cf_with_ada)
- 
-+AC_MSG_CHECKING(if you want to install manpages)
-+AC_ARG_WITH(manpages,
-+	[  --without-manpages      suppress install of manpages],
-+	[cf_with_manpages=$withval],
-+	[cf_with_manpages=yes])
-+AC_MSG_RESULT($cf_with_manpages)
-+
- AC_MSG_CHECKING(if you want to build programs such as tic)
- AC_ARG_WITH(progs,
- 	[  --without-progs         suppress build with programs (e.g., tic)],
-@@ -152,6 +159,31 @@
- 
- AC_SYS_LONG_FILE_NAMES
- 
-+# if we find pkg-config, check if we should install the ".pc" files.
-+CF_PKG_CONFIG
-+
-+if test "$PKG_CONFIG" != no ; then
-+	AC_MSG_CHECKING(if we should install .pc files for $PKG_CONFIG)
-+
-+	# Leave this as something that can be overridden in the environment.
-+	if test -z "$PKG_CONFIG_LIBDIR" ; then
-+		PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[[^/]]*/[[^/]]*$,,'`/lib/pkgconfig
-+	fi
-+
-+	if test -d "$PKG_CONFIG_LIBDIR" ; then
-+		AC_ARG_ENABLE(pc-files,
-+			[  --enable-pc-files       generate and install .pc files for pkg-config],
-+			[enable_pc_files=$enableval],
-+			[enable_pc_files=no])
-+		AC_MSG_RESULT($enable_pc_files)
-+	else
-+		AC_MSG_RESULT(no)
-+		AC_MSG_WARN(did not find library $PKG_CONFIG_LIBDIR)
-+		enable_pc_files=no
-+	fi
-+fi
-+AC_SUBST(PKG_CONFIG_LIBDIR)
-+
- AC_MSG_CHECKING(if we should assume mixed-case filenames)
- AC_ARG_ENABLE(mixed-case,
- 	[  --enable-mixed-case     tic should assume mixed-case filenames],
-@@ -176,7 +208,7 @@
- AC_CHECK_TOOL(RANLIB, ranlib, ':')
- AC_CHECK_TOOL(LD, ld, ld)
- AC_CHECK_TOOL(AR, ar, ar)
--CF_SUBST(archiver options,AR_OPTS,rv)
-+CF_AR_FLAGS
- 
- dnl Special option for use by system-builders: the install-prefix is used to
- dnl adjust the location into which the actual install is done, so that an
-@@ -797,6 +829,15 @@
- 	[NCURSES_MMASK_T=auto])
- AC_MSG_RESULT($NCURSES_MMASK_T)
- 
-+###   use option --with-ccharw-max to override CCHARW_MAX size
-+AC_MSG_CHECKING(for size CCHARW_MAX)
-+AC_ARG_WITH(ccharw-max,
-+	[  --with-ccharw-max=XXX   override size CCHARW_MAX],
-+	[NCURSES_CCHARW_MAX="$withval"],
-+	[NCURSES_CCHARW_MAX=5])
-+AC_MSG_RESULT($NCURSES_CCHARW_MAX)
-+AC_SUBST(NCURSES_CCHARW_MAX)
-+
- ### Enable compiling-in rcs id's
- AC_MSG_CHECKING(if RCS identifiers should be compiled-in)
- AC_ARG_WITH(rcs-ids,
-@@ -807,7 +848,7 @@
- test "$with_rcs_ids" = yes && AC_DEFINE(USE_RCS_IDS)
- 
- ###############################################################################
--CF_MAN_PAGES([ captoinfo clear infocmp infotocap tic toe tput ])
-+CF_MAN_PAGES([ captoinfo clear infocmp infotocap tabs tic toe tput tset ])
- 
- ###############################################################################
- CF_HELP_MESSAGE(Extensions:)
-@@ -828,10 +869,30 @@
- 	AC_DEFINE(HAVE_USE_DEFAULT_COLORS)
- 	AC_DEFINE(HAVE_WRESIZE)
- 	AC_DEFINE(NCURSES_EXT_FUNCS)
-+	GENERATED_EXT_FUNCS=generated
- else
- 	NCURSES_EXT_FUNCS=0
-+	GENERATED_EXT_FUNCS=
- fi
- AC_SUBST(NCURSES_EXT_FUNCS)
-+AC_SUBST(GENERATED_EXT_FUNCS)
-+
-+AC_MSG_CHECKING(if you want to build with experimental SCREEN extensions)
-+AC_ARG_ENABLE(sp-funcs,
-+	[  --enable-sp-funcs       disable experimental SCREEN-extensions],
-+	[with_sp_funcs=$enableval],
-+	[with_sp_funcs=no])
-+AC_MSG_RESULT($with_sp_funcs)
-+if test "$with_sp_funcs" = yes ; then
-+	NCURSES_SP_FUNCS=1
-+	AC_DEFINE(NCURSES_SP_FUNCS)
-+	GENERATED_SP_FUNCS=generated
-+else
-+	NCURSES_SP_FUNCS=0
-+	GENERATED_SP_FUNCS=
-+fi
-+AC_SUBST(NCURSES_SP_FUNCS)
-+AC_SUBST(GENERATED_SP_FUNCS)
- 
- ###   use option --enable-const to turn on use of const beyond that in XSI.
- AC_MSG_CHECKING(for extended use of const keyword)
-@@ -1024,11 +1085,11 @@
- 	cf_cv_enable_opaque="NCURSES_INTERNALS"
- 	NCURSES_OPAQUE=1
- 	NCURSES_SIZE_T=int
--    if test $cf_cv_weak_symbols = yes ; then
--        CF_REMOVE_LIB(LIBS,$LIBS,pthread)
--    else
--        LIB_SUFFIX="t${LIB_SUFFIX}"
--    fi
-+	if test $cf_cv_weak_symbols = yes ; then
-+		CF_REMOVE_LIB(LIBS,$LIBS,pthread)
-+	else
-+		LIB_SUFFIX="t${LIB_SUFFIX}"
-+	fi
- 	AC_DEFINE(USE_REENTRANT)
- 	CF_NCURSES_ABI_6
- else
-@@ -1042,6 +1103,20 @@
- AC_SUBST(NCURSES_OPAQUE)
- AC_SUBST(NCURSES_SIZE_T)
- 
-+### Allow using a different wrap-prefix
-+if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
-+	AC_MSG_CHECKING(for prefix used to wrap public variables)
-+	AC_ARG_WITH(wrap-prefix,
-+		[  --with-wrap-prefix=XXX  override prefix used for public variables],
-+		[NCURSES_WRAP_PREFIX=$withval],
-+		[NCURSES_WRAP_PREFIX=_nc_])
-+	AC_MSG_RESULT($NCURSES_WRAP_PREFIX)
-+else
-+	NCURSES_WRAP_PREFIX=_nc_
-+fi
-+AC_SUBST(NCURSES_WRAP_PREFIX)
-+AC_DEFINE_UNQUOTED(NCURSES_WRAP_PREFIX,"$NCURSES_WRAP_PREFIX")
-+
- AC_MSG_CHECKING(if you want experimental safe-sprintf code)
- AC_ARG_ENABLE(safe-sprintf,
- 	[  --enable-safe-sprintf   compile with experimental safe-sprintf code],
-@@ -1165,12 +1240,18 @@
- AC_SUBST(ADA_TRACE)
- 
- ###	Checks for libraries.
-+case $cf_cv_system_name in #(vi
-+*mingw32*) #(vi
-+	;;
-+*)
- AC_CHECK_FUNC(gettimeofday,
- 	AC_DEFINE(HAVE_GETTIMEOFDAY),[
- 
- AC_CHECK_LIB(bsd, gettimeofday,
- 	AC_DEFINE(HAVE_GETTIMEOFDAY)
- 	LIBS="$LIBS -lbsd")])dnl CLIX: bzero, select, gettimeofday
-+	;;
-+esac
- 
- CF_MATH_LIB(MATH_LIB,sin(x))
- AC_SUBST(MATH_LIB)
-@@ -1354,12 +1435,12 @@
- 	CF_CPP_STATIC_CAST
- 
- 	CXX_AR='$(AR)'
--	CXX_AR_OPTS='$(AR_OPTS)'
-+	CXX_ARFLAGS='$(ARFLAGS)'
- 	case $cf_cv_system_name in #(vi
- 	irix*) #(vi
- 	    if test "$GXX" != yes ; then
- 		CXX_AR='$(CXX)'
--		CXX_AR_OPTS='-ar -o'
-+		CXX_ARFLAGS='-ar -o'
- 	    fi
- 	    ;;
- 	sco3.2v5*) #(vi
-@@ -1368,13 +1449,13 @@
- 	solaris2*)
- 	    if test "$GXX" != yes ; then
- 		CXX_AR='$(CXX)'
--		CXX_AR_OPTS='-xar -o'
-+		CXX_ARFLAGS='-xar -o'
- 	    fi
- 	    ;;
- 	esac
- 	AC_SUBST(CXXLDFLAGS)
- 	AC_SUBST(CXX_AR)
--	AC_SUBST(CXX_AR_OPTS)
-+	AC_SUBST(CXX_ARFLAGS)
- else
- 	cf_cxx_library=no
- 	cf_cv_builtin_bool=1
-@@ -1552,7 +1633,17 @@
- 	fi
- fi
- 
--LIB_SUBSETS="${LIB_SUBSETS}termlib"
-+LIB_SUBSETS="${LIB_SUBSETS}termlib+port_drivers"
-+
-+case $cf_cv_system_name in #(vi
-+*mingw32*) #(vi
-+	LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
-+	;;
-+*) #(vi
-+	LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
-+	;;
-+esac
-+
- test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
- if test "$with_termlib" != no ; then
- 	LIB_SUBSETS="${LIB_SUBSETS} "
-@@ -1561,6 +1652,7 @@
- fi
- 
- LIB_SUBSETS="${LIB_SUBSETS}base"
-+
- test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
- test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
- 
-@@ -1656,6 +1748,8 @@
- 		TEST_ARGS="${TEST_DEPS}"
- 		TEST_ARG2="${TEST_DEP2}"
- 		TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
-+		TICS_LIST="$SHLIB_LIST $TEST_ARGS"
-+		SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
- 	else
- 		TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
- 		TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
-@@ -1723,6 +1817,7 @@
- 	AC_MSG_WARN(Wide-character applications must define HAVE_LIBUTF8_H to include curses.h)
- fi
- fi
-+WITH_OVERWRITE=$with_overwrite
- 
- AC_SUBST(WITH_OVERWRITE)
- AC_SUBST(TICS_LIST)
-@@ -1742,12 +1837,12 @@
- CF_SRC_MODULES($modules_to_build)
- 
- if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
--   SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses-config"
-+   SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
- fi
- 
- CF_DIRS_TO_MAKE
- 
--AC_DEFINE_UNQUOTED(NCURSES_PATHSEP,'$PATHSEP')
-+AC_DEFINE_UNQUOTED(NCURSES_PATHSEP,'$PATH_SEPARATOR')
- 
- AC_DEFINE_UNQUOTED(NCURSES_VERSION_STRING, "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}")
- 
-@@ -1765,11 +1860,23 @@
- CF_SUBST_IF(["$ac_cv_header_termios_h" = yes], HAVE_TERMIOS_H, 1, 0)
- 
- ################################################################################
--test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
-+test "$use_database" = yes && \
-+SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
-+
- SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
-+
-+if test x"$enable_pc_files" = xyes ; then \
-+SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
-+MAKE_PC_FILES=
-+else
-+MAKE_PC_FILES="#"
-+fi
-+AC_SUBST(MAKE_PC_FILES)
-+
- AC_OUTPUT( \
- 	include/MKterm.h.awk \
- 	include/curses.head:include/curses.h.in \
-+	include/ncurses_dll.h \
- 	include/termcap.h \
- 	include/unctrl.h \
- 	$SUB_MAKEFILES \
-@@ -1796,13 +1903,13 @@
- NCURSES_PATCH="$NCURSES_PATCH"
- SRC_SUBDIRS="$SRC_SUBDIRS"
- TERMINFO="$TERMINFO"
-+TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
-+TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
-+TICS_NAME="$TICS_NAME"
- TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
- TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
- TINFO_NAME="$TINFO_NAME"
- TINFO_SUFFIX="$TINFO_SUFFIX"
--TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
--TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
--TICS_NAME="$TICS_NAME"
- WITH_CURSES_H="$with_curses_h"
- WITH_ECHO="$with_echo"
- WITH_OVERWRITE="$with_overwrite"
-@@ -1821,6 +1928,7 @@
- cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
- cf_cv_system_name="$cf_cv_system_name"
- cf_with_cxx_binding="$cf_with_cxx_binding"
-+cf_with_manpages="$cf_with_manpages"
- host="$host"
- target="$target"
- 
-diff -Naur ncurses-5.7.orig/dist.mk ncurses-5.7/dist.mk
---- ncurses-5.7.orig/dist.mk	2008-11-01 17:58:38.000000000 -0700
-+++ ncurses-5.7/dist.mk	2009-07-19 15:04:17.000000000 -0700
-@@ -25,7 +25,7 @@
- # use or other dealings in this Software without prior written               #
- # authorization.                                                             #
- ##############################################################################
--# $Id: dist.mk,v 1.671 2008/11/02 00:58:38 tom Exp $
-+# $Id: dist.mk,v 1.709 2009/07/15 23:12:22 tom Exp $
- # Makefile for creating ncurses distributions.
- #
- # This only needs to be used directly as a makefile by developers, but
-@@ -37,7 +37,7 @@
- # These define the major/minor/patch versions of ncurses.
- NCURSES_MAJOR = 5
- NCURSES_MINOR = 7
--NCURSES_PATCH = 20081102
-+NCURSES_PATCH = 20090718
- 
- # We don't append the patch to the version, since this only applies to releases
- VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
-diff -Naur ncurses-5.7.orig/form/fld_def.c ncurses-5.7/form/fld_def.c
---- ncurses-5.7.orig/form/fld_def.c	2007-10-13 12:29:58.000000000 -0700
-+++ ncurses-5.7/form/fld_def.c	2009-07-19 15:02:23.000000000 -0700
-@@ -32,7 +32,7 @@
- 
- #include "form.priv.h"
- 
--MODULE_ID("$Id: fld_def.c,v 1.36 2007/10/13 19:29:58 tom Exp $")
-+MODULE_ID("$Id: fld_def.c,v 1.37 2009/02/28 19:00:51 juergen Exp $")
- 
- /* this can't be readonly */
- static FIELD default_field =
-@@ -252,8 +252,8 @@
-   if (field->type != 0)
-     {
-       field->type->ref--;
-+      _nc_Free_Argument(field->type, (TypeArgument *)(field->arg));
-     }
--  _nc_Free_Argument(field->type, (TypeArgument *)(field->arg));
- }
- 
- /*---------------------------------------------------------------------------
-diff -Naur ncurses-5.7.orig/form/fld_newftyp.c ncurses-5.7/form/fld_newftyp.c
---- ncurses-5.7.orig/form/fld_newftyp.c	2007-10-13 12:30:55.000000000 -0700
-+++ ncurses-5.7/form/fld_newftyp.c	2009-07-19 15:03:51.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2004,2007 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -32,9 +32,9 @@
- 
- #include "form.priv.h"
- 
--MODULE_ID("$Id: fld_newftyp.c,v 1.15 2007/10/13 19:30:55 tom Exp $")
-+MODULE_ID("$Id: fld_newftyp.c,v 1.16 2009/04/11 21:27:33 tom Exp $")
- 
--static FIELDTYPE const default_fieldtype =
-+static FIELDTYPE default_fieldtype =
- {
-   0,				/* status                                      */
-   0L,				/* reference count                             */
-@@ -49,7 +49,7 @@
-   NULL				/* enumerate previous function                 */
- };
- 
--NCURSES_EXPORT_VAR(const FIELDTYPE *)
-+NCURSES_EXPORT_VAR(FIELDTYPE *)
- _nc_Default_FieldType = &default_fieldtype;
- 
- /*---------------------------------------------------------------------------
-diff -Naur ncurses-5.7.orig/form/form.priv.h ncurses-5.7/form/form.priv.h
---- ncurses-5.7.orig/form/form.priv.h	2008-09-08 13:29:05.000000000 -0700
-+++ ncurses-5.7/form/form.priv.h	2009-07-19 15:03:51.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -30,7 +30,7 @@
-  *   Author:  Juergen Pfeifer, 1995,1997                                    *
-  ****************************************************************************/
- 
--/* $Id: form.priv.h,v 0.27 2008/09/08 20:29:05 tom Exp $ */
-+/* $Id: form.priv.h,v 0.28 2009/04/11 21:27:04 tom Exp $ */
- 
- #ifndef FORM_PRIV_H
- #define FORM_PRIV_H 1
-@@ -62,6 +62,13 @@
- 
- #include "form.h"
- 
-+	/***********************
-+	*   Default objects    *
-+	***********************/
-+extern NCURSES_EXPORT_VAR(FORM *)      _nc_Default_Form;
-+extern NCURSES_EXPORT_VAR(FIELD *)     _nc_Default_Field;
-+extern NCURSES_EXPORT_VAR(FIELDTYPE *) _nc_Default_FieldType;
-+
- /* form  status values */
- #define _OVLMODE         (0x04U) /* Form is in overlay mode                */
- #define _WINDOW_MODIFIED (0x10U) /* Current field window has been modified */
-@@ -91,6 +98,11 @@
- #define Normalize_Field(field) \
-   ((field) = (field != 0) ? (field) : _nc_Default_Field)
- 
-+#if NCURSES_SP_FUNCS
-+#define Get_Form_Screen(form) \
-+  ((form)->win ? _nc_screen_of((form->win)):CURRENT_SCREEN)
-+#endif
-+
- /* Retrieve forms window */
- #define Get_Form_Window(form) \
-   ((form)->sub?(form)->sub:((form)->win?(form)->win:stdscr))
-@@ -144,8 +156,6 @@
- 
- #define C_ZEROS '\0'
- 
--extern NCURSES_EXPORT_VAR(const FIELDTYPE *) _nc_Default_FieldType;
--
- extern NCURSES_EXPORT(TypeArgument *) _nc_Make_Argument (const FIELDTYPE*, va_list*, int*);
- extern NCURSES_EXPORT(TypeArgument *) _nc_Copy_Argument (const FIELDTYPE*, const TypeArgument*, int*);
- extern NCURSES_EXPORT(void) _nc_Free_Argument (const FIELDTYPE*, TypeArgument*);
-@@ -176,8 +186,8 @@
- extern NCURSES_EXPORT(FIELD **)	    _nc_retrace_field_ptr (FIELD **);
- extern NCURSES_EXPORT(FIELD *)	    _nc_retrace_field (FIELD *);
- extern NCURSES_EXPORT(FIELDTYPE *)  _nc_retrace_field_type (FIELDTYPE *);
--extern NCURSES_EXPORT(FORM *)  _nc_retrace_form (FORM *);
--extern NCURSES_EXPORT(Form_Hook)  _nc_retrace_form_hook (Form_Hook);
-+extern NCURSES_EXPORT(FORM *)       _nc_retrace_form (FORM *);
-+extern NCURSES_EXPORT(Form_Hook)    _nc_retrace_form_hook (Form_Hook);
- 
- #else /* !TRACE */
- 
-diff -Naur ncurses-5.7.orig/form/frm_driver.c ncurses-5.7/form/frm_driver.c
---- ncurses-5.7.orig/form/frm_driver.c	2008-10-18 09:25:00.000000000 -0700
-+++ ncurses-5.7/form/frm_driver.c	2009-07-19 15:02:00.000000000 -0700
-@@ -32,7 +32,7 @@
- 
- #include "form.priv.h"
- 
--MODULE_ID("$Id: frm_driver.c,v 1.88 2008/10/18 16:25:00 tom Exp $")
-+MODULE_ID("$Id: frm_driver.c,v 1.89 2008/12/06 23:08:12 tom Exp $")
- 
- /*----------------------------------------------------------------------------
-   This is the core module of the form library. It contains the majority
-@@ -4366,6 +4366,7 @@
-       delwin(field->working);
-       field->working = newpad(field->drows, field->dcols);
-     }
-+  len = Buffer_Length(field);
-   wclear(field->working);
-   mvwaddstr(field->working, 0, 0, value);
- 
-diff -Naur ncurses-5.7.orig/form/frm_sub.c ncurses-5.7/form/frm_sub.c
---- ncurses-5.7.orig/form/frm_sub.c	2004-12-11 14:13:39.000000000 -0800
-+++ ncurses-5.7/form/frm_sub.c	2009-07-19 15:03:51.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2004,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -27,12 +27,12 @@
-  ****************************************************************************/
- 
- /****************************************************************************
-- *   Author:  Juergen Pfeifer, 1995,1997                                    *
-+ *   Author:  Juergen Pfeifer, 1995-1997,2009                               *
-  ****************************************************************************/
- 
- #include "form.priv.h"
- 
--MODULE_ID("$Id: frm_sub.c,v 1.9 2004/12/11 22:13:39 tom Exp $")
-+MODULE_ID("$Id: frm_sub.c,v 1.10 2009/04/11 18:32:47 tom Exp $")
- 
- /*---------------------------------------------------------------------------
- |   Facility      :  libnform  
-@@ -50,9 +50,18 @@
- 
-   if (form && (form->status & _POSTED))
-     RETURN(E_POSTED);
--
--  Normalize_Form(form)->sub = win;
--  RETURN(E_OK);
-+  else
-+    {
-+#if NCURSES_SP_FUNCS
-+      FORM *f = Normalize_Form(form);
-+
-+      f->sub = win ? win : Get_Form_Screen(f)->_stdscr;
-+      RETURN(E_OK);
-+#else
-+      Normalize_Form(form)->sub = win;
-+      RETURN(E_OK);
-+#endif
-+    }
- }
- 
- /*---------------------------------------------------------------------------
-diff -Naur ncurses-5.7.orig/form/frm_win.c ncurses-5.7/form/frm_win.c
---- ncurses-5.7.orig/form/frm_win.c	2004-12-11 14:15:27.000000000 -0800
-+++ ncurses-5.7/form/frm_win.c	2009-07-19 15:03:53.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2004,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -32,7 +32,7 @@
- 
- #include "form.priv.h"
- 
--MODULE_ID("$Id: frm_win.c,v 1.13 2004/12/11 22:15:27 tom Exp $")
-+MODULE_ID("$Id: frm_win.c,v 1.14 2009/04/18 18:38:57 tom Exp $")
- 
- /*---------------------------------------------------------------------------
- |   Facility      :  libnform  
-@@ -50,9 +50,18 @@
- 
-   if (form && (form->status & _POSTED))
-     RETURN(E_POSTED);
--
--  Normalize_Form(form)->win = win;
--  RETURN(E_OK);
-+  else
-+    {
-+#if NCURSES_SP_FUNCS
-+      FORM *f = Normalize_Form(form);
-+
-+      f->win = win ? win : Get_Form_Screen(f)->_stdscr;
-+      RETURN(E_OK);
-+#else
-+      Normalize_Form(form)->win = win;
-+      RETURN(E_OK);
-+#endif
-+    }
- }
- 
- /*---------------------------------------------------------------------------
-@@ -66,12 +75,18 @@
- NCURSES_EXPORT(WINDOW *)
- form_win(const FORM *form)
- {
-+  WINDOW *result;
-   const FORM *f;
- 
-   T((T_CALLED("form_win(%p)"), form));
- 
-   f = Normalize_Form(form);
--  returnWin(f->win ? f->win : stdscr);
-+#if NCURSES_SP_FUNCS
-+  result = (f->win ? f->win : Get_Form_Screen(f)->_stdscr);
-+#else
-+  result = (f->win ? f->win : stdscr);
-+#endif
-+  returnWin(result);
- }
- 
- /* frm_win.c ends here */
-diff -Naur ncurses-5.7.orig/form/fty_generic.c ncurses-5.7/form/fty_generic.c
---- ncurses-5.7.orig/form/fty_generic.c	1969-12-31 16:00:00.000000000 -0800
-+++ ncurses-5.7/form/fty_generic.c	2009-07-19 15:04:11.000000000 -0700
-@@ -0,0 +1,287 @@
-+/****************************************************************************
-+ * Copyright (c) 2008 Free Software Foundation, Inc.                        *
-+ *                                                                          *
-+ * Permission is hereby granted, free of charge, to any person obtaining a  *
-+ * copy of this software and associated documentation files (the            *
-+ * "Software"), to deal in the Software without restriction, including      *
-+ * without limitation the rights to use, copy, modify, merge, publish,      *
-+ * distribute, distribute with modifications, sublicense, and/or sell       *
-+ * copies of the Software, and to permit persons to whom the Software is    *
-+ * furnished to do so, subject to the following conditions:                 *
-+ *                                                                          *
-+ * The above copyright notice and this permission notice shall be included  *
-+ * in all copies or substantial portions of the Software.                   *
-+ *                                                                          *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
-+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
-+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
-+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
-+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
-+ *                                                                          *
-+ * Except as contained in this notice, the name(s) of the above copyright   *
-+ * holders shall not be used in advertising or otherwise to promote the     *
-+ * sale, use or other dealings in this Software without prior written       *
-+ * authorization.                                                           *
-+ ****************************************************************************/
-+
-+/***************************************************************************
-+*                                                                          *
-+*  Author : Juergen Pfeifer                                                *
-+*                                                                          *
-+***************************************************************************/
-+
-+#include "form.priv.h"
-+
-+MODULE_ID("$Id: fty_generic.c,v 1.1 2008/11/18 08:50:04 juergen Exp $")
-+
-+/*
-+ * This is not a full implementation of a field type, but adds some
-+ * support for higher level languages with some restrictions to interop
-+ * with C language. Especially the collection of arguments for the
-+ * various fieldtypes is not based on the vararg C mechanism, but on a
-+ * iterator based callback mechanism that allowes the high level language
-+ * to provide the arguments as a structure. Most languages have mechanisms
-+ * to layout structures so that they can be passed to C.
-+ * The languages can register a new generic fieldtype dynamically and store
-+ * a handle (key) to the calling object as an argument. Together with that
-+ * it can register a freearg callback, so that the high level language
-+ * remains in control of the memory management of the arguments they pass.
-+ * The design idea is, that the high-level language - typically a OO
-+ * language like C# or Java, uses it's own dispatching mechanisms
-+ * (polymorphism) to call the proper check routines responsible for the
-+ * argument type. So these language implement typically only one generic
-+ * fieldtype they register with the forms library using this call.
-+ *
-+ * For that purpose we have extended the fieldtype struc by a new element
-+ * that gets the arguments from a single struct passed by the caller. 
-+ * 
-+ */
-+
-+
-+/*---------------------------------------------------------------------------
-+|   Facility      :  libnform  
-+|   Function      :  static void *Generic_This_Type( void * arg )
-+|   
-+|   Description   :  We interpret the passed arg just as a handle the
-+|                    calling language uses to keep track of its allocated
-+|                    argument structures. We can simply copy it back.
-+|
-+|   Return Values :  Pointer to argument structure
-++--------------------------------------------------------------------------*/
-+static void *
-+Generic_This_Type(void *arg)
-+{
-+  return (arg);
-+}
-+
-+/*---------------------------------------------------------------------------
-+|   Facility      :  libnform
-+|   Function      :  FIELDTYPE *_nc_generic_fieldtype(
-+|                       bool (* const field_check)(FIELD *,const void *),
-+|                       bool (* const char_check) (int, const void *),
-+|   		        bool (*const next)(FORM*,FIELD*,const void*),
-+|		        bool (*const prev)(FORM*,FIELD*,const void*),
-+|                       void (*freecallback)(void*))
-+|
-+|   Description   :  Create a new fieldtype. The application programmer must
-+|                    write a field_check and a char_check function and give
-+|                    them as input to this call. A callback to allow the
-+|                    release of the allocated memory must also be provided.
-+|                    For generic field types, we provide some more 
-+|                    information about the field as parameters.
-+|
-+|                    If an error occurs, errno is set to
-+|                       E_BAD_ARGUMENT  - invalid arguments
-+|                       E_SYSTEM_ERROR  - system error (no memory)
-+|
-+|   Return Values :  Fieldtype pointer or NULL if error occurred
-++--------------------------------------------------------------------------*/
-+NCURSES_EXPORT(FIELDTYPE *)
-+_nc_generic_fieldtype(bool (*const field_check) (FORM*, FIELD *, const void *),
-+		      bool (*const char_check)  (int, FORM*, FIELD*, const void *),
-+ 		      bool (*const next)(FORM*, FIELD*,const void*),
-+		      bool (*const prev)(FORM*, FIELD*,const void*),
-+		      void (*freecallback)(void*))
-+{
-+    int code = E_SYSTEM_ERROR;
-+    FIELDTYPE* res = (FIELDTYPE*)0;
-+
-+    T((T_CALLED("_nc_generic_fieldtype(%p,%p,%p,%p,%p)"), 
-+       field_check, char_check, next, prev, freecallback));
-+
-+    if (field_check || char_check)
-+    {
-+      res = typeMalloc(FIELDTYPE,1);
-+      if (res)
-+      {
-+	*res = *_nc_Default_FieldType; 
-+	res->status |= (_HAS_ARGS | _GENERIC);
-+	res->fieldcheck.gfcheck = field_check;
-+	res->charcheck.gccheck  = char_check;
-+	res->genericarg = Generic_This_Type;
-+	res->freearg = freecallback;
-+	res->enum_next.gnext = next;
-+	res->enum_prev.gprev = prev;
-+	code = E_OK;
-+      }
-+    }
-+    else
-+      code = E_BAD_ARGUMENT;
-+
-+    if (E_OK != code)
-+      SET_ERROR(code);
-+
-+    returnFieldType(res);
-+}
-+
-+
-+/*---------------------------------------------------------------------------
-+|   Facility      :  libnform  
-+|   Function      :  static TypeArgument *GenericArgument(
-+|                      const FIELDTYPE* typ,
-+|                      int (*argiterator)(void**),
-+|                      int* err)
-+|   
-+|   Description   :  The iterator callback must browse through all fieldtype
-+|                    parameters that have an argument associated with the
-+|                    type. The iterator returns 1 if the operation to get
-+|                    the next element was successfull, 0 otherwise. If the
-+|                    iterator could move to the next argument, it fills
-+|                    the void* pointer representing the argument into the
-+|                    location provided as argument to the iterator.
-+|                    The err reference is used to keep track of errors.
-+|
-+|   Return Values :  Pointer to argument structure
-++--------------------------------------------------------------------------*/
-+static TypeArgument*
-+GenericArgument(const FIELDTYPE *typ, 
-+		int (*argiterator)(void**), int *err)
-+{
-+  TypeArgument *res = (TypeArgument *)0;
-+
-+  if (typ!=0 && (typ->status & _HAS_ARGS) != 0 && err!=0 && argiterator != 0)
-+  {
-+    if (typ->status & _LINKED_TYPE)
-+    {
-+      /* Composite fieldtypes keep track internally of their own memory */
-+      TypeArgument* p = typeMalloc(TypeArgument,1);
-+      if (p)
-+      {
-+	p->left  = GenericArgument(typ->left,  argiterator, err);
-+	p->right = GenericArgument(typ->right, argiterator, err);
-+	return p;
-+      }
-+      else
-+	*err += 1;
-+    }
-+    else
-+    {
-+      assert(typ->genericarg != (void*)0);
-+      if (typ->genericarg == 0)
-+	*err += 1;
-+      else
-+	{
-+	  void* argp;
-+	  int valid = argiterator(&argp);
-+	  if (valid==0 || argp==0 || 
-+	      !(res = (TypeArgument*)typ->genericarg(argp)))
-+	    {
-+	      *err += 1;
-+	    }
-+	}
-+    }
-+  }
-+  return res;
-+}
-+
-+/*---------------------------------------------------------------------------
-+|   Facility      :  libnform  
-+|   Function      :  int _nc_set_generic_fieldtype(
-+|                      FIELD* field,
-+|                      FIELDTYPE* ftyp,
-+|                      int (*argiterator)(void**))
-+|   
-+|   Description   :  Assign the fieldtype to the field and use the iterator
-+|                    mechanism to get the arguments when a check is 
-+|                    performed.
-+|
-+|   Return Values :  E_OK if all went well
-+|                    E_SYSTEM_ERROR if an error occurred
-++--------------------------------------------------------------------------*/
-+NCURSES_EXPORT(int)
-+_nc_set_generic_fieldtype(FIELD *field,
-+			  FIELDTYPE* ftyp,
-+			  int (*argiterator)(void**))
-+{
-+  int code = E_SYSTEM_ERROR;
-+  int err = 0;
-+
-+  if (field)
-+  {
-+      if (field && field->type)
-+	_nc_Free_Type(field);
-+
-+      field->type = ftyp;
-+      if (ftyp)
-+      {
-+	if (argiterator)
-+	{
-+	  /* The precondition is that the iterator is reset */
-+	  field->arg  = (void*)GenericArgument(field->type,argiterator,&err);
-+	  
-+	  if (err)
-+	    {
-+	      _nc_Free_Argument(field->type, (TypeArgument*)(field->arg));
-+	      field->type = (FIELDTYPE*)0;
-+	      field->arg  = (void*)0;
-+	    }
-+	  else
-+	    {
-+	      code = E_OK;
-+	      if (field->type)
-+		field->type->ref++;
-+	    }
-+	}
-+      }
-+      else
-+      {
-+	field->arg = (void*)0;
-+	code = E_OK;
-+      }
-+    }
-+    return code;
-+}
-+
-+/*---------------------------------------------------------------------------
-+|   Facility      :  libnform  
-+|   Function      :  WINDOW* _nc_form_cursor(
-+|                      FORM* form,
-+|                      int *pRow, int *pCol)
-+|   
-+|   Description   :  Get the current position of the form cursor position
-+|                    We also return the field window
-+|
-+|   Return Values :  The fields Window or NULL on error
-++--------------------------------------------------------------------------*/
-+NCURSES_EXPORT(WINDOW*) 
-+_nc_form_cursor(const FORM* form, int* pRow, int* pCol)
-+{
-+  int code = E_SYSTEM_ERROR;
-+  WINDOW* res = (WINDOW*)0;
-+
-+  if (!(form==0 || pRow==0 || pCol==0))
-+  {
-+      *pRow = form->currow;
-+      *pCol = form->curcol;
-+      res   = form->w;
-+      code  = E_OK;
-+  }
-+  if (code != E_OK)
-+    SET_ERROR(code);
-+  return res;
-+}
-+
-+
-+/* fty_generic.c ends here */
-diff -Naur ncurses-5.7.orig/form/Makefile.in ncurses-5.7/form/Makefile.in
---- ncurses-5.7.orig/form/Makefile.in	2007-04-28 07:56:11.000000000 -0700
-+++ ncurses-5.7/form/Makefile.in	2009-07-19 15:03:48.000000000 -0700
-@@ -1,6 +1,6 @@
--# $Id: Makefile.in,v 1.47 2007/04/28 14:56:11 tom Exp $
-+# $Id: Makefile.in,v 1.49 2009/03/28 18:22:39 Charles.Wilson Exp $
- ##############################################################################
--# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.                #
-+# Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.                #
- #                                                                            #
- # Permission is hereby granted, free of charge, to any person obtaining a    #
- # copy of this software and associated documentation files (the "Software"), #
-@@ -63,6 +63,7 @@
- LIBTOOL_LINK	= @LIB_LINK@
- LIBTOOL_INSTALL	= @LIB_INSTALL@
- LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
-+LT_UNDEF	= @LT_UNDEF@
- 
- INSTALL		= @INSTALL@
- INSTALL_LIB	= @INSTALL@ @INSTALL_LIB@
-@@ -70,7 +71,7 @@
- INSTALL_DATA	= @INSTALL_DATA@
- 
- AR		= @AR@
--AR_OPTS		= @AR_OPTS@
-+ARFLAGS		= @ARFLAGS@
- AWK		= @AWK@
- LD		= @LD@
- LN_S		= @LN_S@
-diff -Naur ncurses-5.7.orig/include/capdefaults.c ncurses-5.7/include/capdefaults.c
---- ncurses-5.7.orig/include/capdefaults.c	2008-08-04 05:33:42.000000000 -0700
-+++ ncurses-5.7/include/capdefaults.c	2009-07-19 15:02:22.000000000 -0700
-@@ -32,7 +32,7 @@
-  *     and: Thomas E. Dickey                        1996-on                 *
-  ****************************************************************************/
- 
--/* $Id: capdefaults.c,v 1.13 2008/08/04 12:33:42 tom Exp $ */
-+/* $Id: capdefaults.c,v 1.14 2008/11/16 00:19:59 juergen Exp $ */
- 
-     /*
-      * Compute obsolete capabilities.  The reason this is an include file is
-@@ -44,11 +44,11 @@
-      * postprocess_termcap().
-      */
- {
--    char *sp;
-+    char *strp;
-     short capval;
- 
- #define EXTRACT_DELAY(str) \
--    	(short) (sp = strchr(str, '*'), sp ? atoi(sp+1) : 0)
-+    	(short) (strp = strchr(str, '*'), strp ? atoi(strp+1) : 0)
- 
-     /* current (4.4BSD) capabilities marked obsolete */
-     if (VALID_STRING(carriage_return)
-diff -Naur ncurses-5.7.orig/include/curses.h.in ncurses-5.7/include/curses.h.in
---- ncurses-5.7.orig/include/curses.h.in	2008-08-30 13:11:29.000000000 -0700
-+++ ncurses-5.7/include/curses.h.in	2009-07-19 15:04:17.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -32,7 +32,7 @@
-  *     and: Thomas E. Dickey                        1996-on                 *
-  ****************************************************************************/
- 
--/* $Id: curses.h.in,v 1.187 2008/08/30 20:11:29 tom Exp $ */
-+/* $Id: curses.h.in,v 1.204 2009/07/18 16:02:07 tom Exp $ */
- 
- #ifndef __NCURSES_H
- #define __NCURSES_H
-@@ -40,12 +40,6 @@
- #define CURSES 1
- #define CURSES_H 1
- 
--/* This should be defined for the enhanced functionality to be visible.
-- * However, some of the wide-character (enhanced) functionality is missing.
-- * So we do not define it (yet).
--#define _XOPEN_CURSES 1
-- */
--
- /* These are defined only in curses.h, and are used for conditional compiles */
- #define NCURSES_VERSION_MAJOR @NCURSES_MAJOR@
- #define NCURSES_VERSION_MINOR @NCURSES_MINOR@
-@@ -110,6 +104,13 @@
- #endif
- 
- /*
-+ * The reentrant code relies on the opaque setting, but adds features.
-+ */
-+#ifndef NCURSES_REENTRANT
-+#define NCURSES_REENTRANT @cf_cv_enable_reentrant@
-+#endif
-+
-+/*
-  * The internal type used for window dimensions.
-  */
- #undef	NCURSES_SIZE_T
-@@ -138,7 +139,6 @@
- #endif
- 
- #include <stdio.h>
--#include <unctrl.h>
- #include <stdarg.h>	/* we need va_list */
- #ifdef _XOPEN_SOURCE_EXTENDED
- #include <stddef.h>	/* we want wchar_t */
-@@ -224,9 +224,9 @@
- 
- /* line graphics */
- 
--#if @BROKEN_LINKER@ || @cf_cv_enable_reentrant@
-+#if @BROKEN_LINKER@ || NCURSES_REENTRANT
- NCURSES_WRAPPED_VAR(chtype*, acs_map);
--#define acs_map (_nc_acs_map())
-+#define acs_map NCURSES_PUBLIC_VAR(acs_map())
- #else
- extern NCURSES_EXPORT_VAR(chtype) acs_map[];
- #endif
-@@ -344,7 +344,13 @@
- typedef unsigned int wint_t@NCURSES_OK_WCHAR_T@;
- #endif
- 
--#define CCHARW_MAX	5
-+/*
-+ * cchar_t stores an array of CCHARW_MAX wide characters.  The first is
-+ * normally a spacing character.  The others are non-spacing.  If those
-+ * (spacing and nonspacing) do not fill the array, a null L'\0' follows. 
-+ * Otherwise, a null is assumed to follow when extracting via getcchar().
-+ */
-+#define CCHARW_MAX	@NCURSES_CCHARW_MAX@
- typedef struct
- {
-     attr_t	attr;
-@@ -511,6 +517,12 @@
- #endif
- 
- /*
-+ * Curses uses a helper function.  Define our type for this to simplify
-+ * extending it for the sp-funcs feature.
-+ */
-+typedef int (*NCURSES_OUTC)(int);
-+
-+/*
-  * Function prototypes.  This is the complete X/Open Curses list of required
-  * functions.  Those marked `generated' will have sources generated from the
-  * macro definitions later in this file, in order to satisfy XPG4.2
-@@ -646,7 +658,7 @@
- extern NCURSES_EXPORT(int) mvwinnstr (WINDOW *, int, int, char *, int);		/* generated */
- extern NCURSES_EXPORT(int) mvwinsch (WINDOW *, int, int, chtype);		/* generated */
- extern NCURSES_EXPORT(int) mvwinsnstr (WINDOW *, int, int, const char *, int);	/* generated */
--extern NCURSES_EXPORT(int) mvwinsstr (WINDOW *, int, int, const char *);		/* generated */
-+extern NCURSES_EXPORT(int) mvwinsstr (WINDOW *, int, int, const char *);	/* generated */
- extern NCURSES_EXPORT(int) mvwinstr (WINDOW *, int, int, char *);		/* generated */
- extern NCURSES_EXPORT(int) mvwprintw (WINDOW*,int,int, const char *,...)	/* implemented */
- 		GCC_PRINTFLIKE(4,5);
-@@ -654,9 +666,9 @@
- 		GCC_SCANFLIKE(4,5);
- extern NCURSES_EXPORT(int) mvwvline (WINDOW *,int, int, chtype, int);	/* generated */
- extern NCURSES_EXPORT(int) napms (int);					/* implemented */
--extern NCURSES_EXPORT(WINDOW *) newpad (int,int);				/* implemented */
-+extern NCURSES_EXPORT(WINDOW *) newpad (int,int);		       	/* implemented */
- extern NCURSES_EXPORT(SCREEN *) newterm (NCURSES_CONST char *,FILE *,FILE *);	/* implemented */
--extern NCURSES_EXPORT(WINDOW *) newwin (int,int,int,int);			/* implemented */
-+extern NCURSES_EXPORT(WINDOW *) newwin (int,int,int,int);	       	/* implemented */
- extern NCURSES_EXPORT(int) nl (void);					/* implemented */
- extern NCURSES_EXPORT(int) nocbreak (void);				/* implemented */
- extern NCURSES_EXPORT(int) nodelay (WINDOW *,bool);			/* implemented */
-@@ -710,7 +722,7 @@
- extern NCURSES_EXPORT(int) slk_refresh (void);				/* implemented */
- extern NCURSES_EXPORT(int) slk_restore (void);				/* implemented */
- extern NCURSES_EXPORT(int) slk_set (int,const char *,int);		/* implemented */
--extern NCURSES_EXPORT(int) slk_touch (void);				/* implemented */
-+extern NCURSES_EXPORT(int) slk_touch (void);	      	       		/* implemented */
- extern NCURSES_EXPORT(int) standout (void);				/* generated */
- extern NCURSES_EXPORT(int) standend (void);				/* generated */
- extern NCURSES_EXPORT(int) start_color (void);				/* implemented */
-@@ -727,7 +739,7 @@
- extern NCURSES_EXPORT(int) untouchwin (WINDOW *);			/* generated */
- extern NCURSES_EXPORT(void) use_env (bool);				/* implemented */
- extern NCURSES_EXPORT(int) vidattr (chtype);				/* implemented */
--extern NCURSES_EXPORT(int) vidputs (chtype, int (*)(int));		/* implemented */
-+extern NCURSES_EXPORT(int) vidputs (chtype, NCURSES_OUTC);		/* implemented */
- extern NCURSES_EXPORT(int) vline (chtype, int);				/* generated */
- extern NCURSES_EXPORT(int) vwprintw (WINDOW *, const char *,va_list);	/* implemented */
- extern NCURSES_EXPORT(int) vw_printw (WINDOW *, const char *,va_list);	/* generated */
-@@ -838,6 +850,7 @@
- extern NCURSES_EXPORT(const char *) curses_version (void);
- extern NCURSES_EXPORT(int) assume_default_colors (int, int);
- extern NCURSES_EXPORT(int) define_key (const char *, int);
-+extern NCURSES_EXPORT(int) get_escdelay (void);
- extern NCURSES_EXPORT(int) key_defined (const char *);
- extern NCURSES_EXPORT(int) keyok (int, bool);
- extern NCURSES_EXPORT(int) resize_term (int, int);
-@@ -856,23 +869,133 @@
-  * These extensions provide access to information stored in the WINDOW even
-  * when NCURSES_OPAQUE is set:
-  */
--extern NCURSES_EXPORT(WINDOW *) wgetparent (const WINDOW *);	/* generated */
--extern NCURSES_EXPORT(bool) is_cleared (const WINDOW *);	/* generated */
--extern NCURSES_EXPORT(bool) is_idcok (const WINDOW *);		/* generated */
--extern NCURSES_EXPORT(bool) is_idlok (const WINDOW *);		/* generated */
--extern NCURSES_EXPORT(bool) is_immedok (const WINDOW *);	/* generated */
--extern NCURSES_EXPORT(bool) is_keypad (const WINDOW *);		/* generated */
--extern NCURSES_EXPORT(bool) is_leaveok (const WINDOW *);	/* generated */
--extern NCURSES_EXPORT(bool) is_nodelay (const WINDOW *);	/* generated */
--extern NCURSES_EXPORT(bool) is_notimeout (const WINDOW *);	/* generated */
--extern NCURSES_EXPORT(bool) is_scrollok (const WINDOW *);	/* generated */
--extern NCURSES_EXPORT(bool) is_syncok (const WINDOW *);		/* generated */
--extern NCURSES_EXPORT(int) wgetscrreg (const WINDOW *, int *, int *); /* generated */
-+extern NCURSES_EXPORT(WINDOW *) wgetparent (const WINDOW *);	/* @GENERATED_EXT_FUNCS@ */
-+extern NCURSES_EXPORT(bool) is_cleared (const WINDOW *);	/* @GENERATED_EXT_FUNCS@ */
-+extern NCURSES_EXPORT(bool) is_idcok (const WINDOW *);		/* @GENERATED_EXT_FUNCS@ */
-+extern NCURSES_EXPORT(bool) is_idlok (const WINDOW *);		/* @GENERATED_EXT_FUNCS@ */
-+extern NCURSES_EXPORT(bool) is_immedok (const WINDOW *);	/* @GENERATED_EXT_FUNCS@ */
-+extern NCURSES_EXPORT(bool) is_keypad (const WINDOW *);		/* @GENERATED_EXT_FUNCS@ */
-+extern NCURSES_EXPORT(bool) is_leaveok (const WINDOW *);	/* @GENERATED_EXT_FUNCS@ */
-+extern NCURSES_EXPORT(bool) is_nodelay (const WINDOW *);	/* @GENERATED_EXT_FUNCS@ */
-+extern NCURSES_EXPORT(bool) is_notimeout (const WINDOW *);	/* @GENERATED_EXT_FUNCS@ */
-+extern NCURSES_EXPORT(bool) is_scrollok (const WINDOW *);	/* @GENERATED_EXT_FUNCS@ */
-+extern NCURSES_EXPORT(bool) is_syncok (const WINDOW *);		/* @GENERATED_EXT_FUNCS@ */
-+extern NCURSES_EXPORT(int) wgetscrreg (const WINDOW *, int *, int *); /* @GENERATED_EXT_FUNCS@ */
- 
- #else
- #define curses_version() NCURSES_VERSION
- #endif
- 
-+/*
-+ * Extra extension-functions, which pass a SCREEN pointer rather than using
-+ * a global variable SP.
-+ */
-+#if @NCURSES_SP_FUNCS@
-+#undef  NCURSES_SP_FUNCS
-+#define NCURSES_SP_FUNCS @NCURSES_PATCH@
-+#define NCURSES_SP_NAME(name) name##_sp
-+
-+/* Define the sp-funcs helper function */
-+#define NCURSES_SP_OUTC NCURSES_SP_NAME(NCURSES_OUTC)
-+typedef int (*NCURSES_SP_OUTC)(SCREEN*, int);
-+
-+extern NCURSES_EXPORT(SCREEN*) new_prescr(void); /* implemented */
-+
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(baudrate) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(beep) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(can_change_color) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(cbreak) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(curs_set) (SCREEN*, int); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(color_content) (SCREEN*, short, short*, short*, short*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(def_prog_mode) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(def_shell_mode) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(delay_output) (SCREEN*, int); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(doupdate) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(echo) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(endwin) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(char) NCURSES_SP_NAME(erasechar) (SCREEN*);/* implemented */
-+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(filter) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(flash) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(flushinp) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(getwin) (SCREEN*, FILE *);			/* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(halfdelay)(SCREEN*, int); /* implemented */
-+extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(has_colors) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(has_ic) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(has_il) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(init_color) (SCREEN*, short, short, short, short); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(init_pair) (SCREEN*, short, short, short); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(intrflush) (SCREEN*, WINDOW*, bool);	/* implemented */
-+extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(isendwin) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(NCURSES_CONST char *) NCURSES_SP_NAME(keyname) (SCREEN*, int); /* implemented */
-+extern NCURSES_EXPORT(char) NCURSES_SP_NAME(killchar) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(longname) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(mvcur) (SCREEN*, int, int, int, int); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(napms) (SCREEN*, int); /* implemented */
-+extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(newpad) (SCREEN*, int, int); /* implemented */
-+extern NCURSES_EXPORT(SCREEN*) NCURSES_SP_NAME(newterm) (SCREEN*, NCURSES_CONST char *, FILE *, FILE *); /* implemented */
-+extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(newwin) (SCREEN*, int, int, int, int); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(nl) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(nocbreak) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(noecho) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(nonl) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(noqiflush) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(noraw) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(pair_content) (SCREEN*, short, short*, short*); /* implemented */
-+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(qiflush) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(raw) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(reset_prog_mode) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(reset_shell_mode) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(resetty) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(ripoffline) (SCREEN*, int, int (*)(WINDOW *, int));	/* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(savetty) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(scr_init) (SCREEN*, const char *); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(scr_restore) (SCREEN*, const char *); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(scr_set) (SCREEN*, const char *); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_attroff) (SCREEN*, const chtype); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_attron) (SCREEN*, const chtype); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_attrset) (SCREEN*, const chtype); /* implemented */
-+extern NCURSES_EXPORT(attr_t) NCURSES_SP_NAME(slk_attr) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_attr_set) (SCREEN*, const attr_t, short, void*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_clear) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_color) (SCREEN*, short); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_init) (SCREEN*, int); /* implemented */
-+extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(slk_label) (SCREEN*, int); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_noutrefresh) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_refresh) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_restore) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_set) (SCREEN*, int, const char *, int); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_touch) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(start_color) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(chtype) NCURSES_SP_NAME(termattrs) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(termname) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(typeahead) (SCREEN*, int); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(ungetch) (SCREEN*, int); /* implemented */
-+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(use_env) (SCREEN*, bool); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vidattr) (SCREEN*, chtype);	/* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vidputs) (SCREEN*, chtype, NCURSES_SP_OUTC); /* implemented */
-+#if @NCURSES_EXT_FUNCS@
-+extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(keybound) (SCREEN*, int, int);
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(assume_default_colors) (SCREEN*, int, int);
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(define_key) (SCREEN*, const char *, int);
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(get_escdelay) (SCREEN*);
-+extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(is_term_resized) (SCREEN*, int, int);
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(key_defined)(SCREEN*, const char *);
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(keyok) (SCREEN*, int, bool);
-+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(nofilter) (SCREEN*); /* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(resize_term) (SCREEN*, int, int);
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(resizeterm) (SCREEN*, int, int);
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(set_escdelay) (SCREEN*, int);
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(set_tabsize) (SCREEN*, int);
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_default_colors) (SCREEN*);
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int);
-+#endif
-+#else
-+#undef  NCURSES_SP_FUNCS
-+#define NCURSES_SP_FUNCS 0
-+#define NCURSES_SP_NAME(name) name
-+#define NCURSES_SP_OUTC NCURSES_OUTC
-+#endif
-+
- /* attributes */
- 
- #define NCURSES_ATTR_SHIFT       8
-@@ -971,9 +1094,9 @@
- #if !NCURSES_OPAQUE
- #if defined(_XOPEN_SOURCE_EXTENDED) && @NCURSES_EXT_COLORS@
- #define wattrset(win,at)	((win)->_color = PAIR_NUMBER(at), \
--				 (win)->_attrs = (at))
-+                                 NCURSES_CAST(int, (win)->_attrs = (at)))
- #else
--#define wattrset(win,at)	((win)->_attrs = (at))
-+#define wattrset(win,at)        NCURSES_CAST(int, (win)->_attrs = (at))
- #endif
- #endif /* NCURSES_OPAQUE */
- 
-@@ -1173,7 +1296,7 @@
-  *	   It gives the ESC expire time in milliseconds.
-  *	b. ttytype is needed for backward compatibility
-  */
--#if @cf_cv_enable_reentrant@
-+#if NCURSES_REENTRANT
- 
- NCURSES_WRAPPED_VAR(WINDOW *, curscr);
- NCURSES_WRAPPED_VAR(WINDOW *, newscr);
-diff -Naur ncurses-5.7.orig/include/curses.tail ncurses-5.7/include/curses.tail
---- ncurses-5.7.orig/include/curses.tail	2008-07-05 13:20:38.000000000 -0700
-+++ ncurses-5.7/include/curses.tail	2009-07-19 15:04:03.000000000 -0700
-@@ -1,4 +1,4 @@
--/* $Id: curses.tail,v 1.16 2008/07/05 20:20:38 tom Exp $ */
-+/* $Id: curses.tail,v 1.19 2009/05/23 19:19:43 tom Exp $ */
- /*
-  * vile:cmode:
-  * This file is part of ncurses, designed to be appended after curses.h.in
-@@ -94,13 +94,22 @@
- }
- MEVENT;
- 
--extern NCURSES_EXPORT(int) getmouse (MEVENT *);
--extern NCURSES_EXPORT(int) ungetmouse (MEVENT *);
-+extern NCURSES_EXPORT(bool)    has_mouse(void);
-+extern NCURSES_EXPORT(int)     getmouse (MEVENT *);
-+extern NCURSES_EXPORT(int)     ungetmouse (MEVENT *);
- extern NCURSES_EXPORT(mmask_t) mousemask (mmask_t, mmask_t *);
--extern NCURSES_EXPORT(bool) wenclose (const WINDOW *, int, int);
--extern NCURSES_EXPORT(int) mouseinterval (int);
--extern NCURSES_EXPORT(bool) wmouse_trafo (const WINDOW*, int*, int*, bool);
--extern NCURSES_EXPORT(bool) mouse_trafo (int*, int*, bool);              /* generated */
-+extern NCURSES_EXPORT(bool)    wenclose (const WINDOW *, int, int);
-+extern NCURSES_EXPORT(int)     mouseinterval (int);
-+extern NCURSES_EXPORT(bool)    wmouse_trafo (const WINDOW*, int*, int*, bool);
-+extern NCURSES_EXPORT(bool)    mouse_trafo (int*, int*, bool);              /* generated */
-+
-+#if NCURSES_SP_FUNCS
-+extern NCURSES_EXPORT(bool)    NCURSES_SP_NAME(has_mouse) (SCREEN*);
-+extern NCURSES_EXPORT(int)     NCURSES_SP_NAME(getmouse) (SCREEN*, MEVENT *);
-+extern NCURSES_EXPORT(int)     NCURSES_SP_NAME(ungetmouse) (SCREEN*,MEVENT *);
-+extern NCURSES_EXPORT(mmask_t) NCURSES_SP_NAME(mousemask) (SCREEN*, mmask_t, mmask_t *);
-+extern NCURSES_EXPORT(int)     NCURSES_SP_NAME(mouseinterval) (SCREEN*, int);
-+#endif
- 
- #define mouse_trafo(y,x,to_screen) wmouse_trafo(stdscr,y,x,to_screen)
- 
-@@ -109,6 +118,11 @@
- extern NCURSES_EXPORT(int) mcprint (char *, int);	/* direct data to printer */
- extern NCURSES_EXPORT(int) has_key (int);		/* do we have given key? */
- 
-+#if NCURSES_SP_FUNCS
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(has_key) (SCREEN*, int);    /* do we have given key? */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(mcprint) (SCREEN*, char *, int);	/* direct data to printer */
-+#endif
-+
- /* Debugging : use with libncurses_g.a */
- 
- extern NCURSES_EXPORT(void) _tracef (const char *, ...) GCC_PRINTFLIKE(1,2);
-@@ -160,6 +174,8 @@
- #define OPTIMIZE_ALL		0xff	/* enable all optimizations (dflt) */
- #endif
- 
-+#include <unctrl.h>
-+
- #ifdef __cplusplus
- 
- #ifndef NCURSES_NOMACROS
-diff -Naur ncurses-5.7.orig/include/curses.wide ncurses-5.7/include/curses.wide
---- ncurses-5.7.orig/include/curses.wide	2007-03-10 09:52:23.000000000 -0800
-+++ ncurses-5.7/include/curses.wide	2009-07-19 15:03:59.000000000 -0700
-@@ -1,9 +1,11 @@
--/* $Id: curses.wide,v 1.34 2007/03/10 17:52:23 tom Exp $ */
-+/* $Id: curses.wide,v 1.39 2009/05/09 15:43:00 tom Exp $ */
- /*
-  * vile:cmode:
-  * This file is part of ncurses, designed to be appended after curses.h.in
-  * (see that file for the relevant copyright).
-  */
-+#define _XOPEN_CURSES 1
-+
- #ifdef _XOPEN_SOURCE_EXTENDED
- 
- extern NCURSES_EXPORT_VAR(cchar_t *) _nc_wacs;
-@@ -138,7 +140,7 @@
- extern NCURSES_EXPORT(attr_t) term_attrs (void);			/* implemented */
- extern NCURSES_EXPORT(int) unget_wch (const wchar_t);			/* implemented */
- extern NCURSES_EXPORT(int) vid_attr (attr_t, short, void *);		/* implemented */
--extern NCURSES_EXPORT(int) vid_puts (attr_t, short, void *, int (*)(int)); /* implemented */
-+extern NCURSES_EXPORT(int) vid_puts (attr_t, short, void *, NCURSES_OUTC); /* implemented */
- extern NCURSES_EXPORT(int) vline_set (const cchar_t *, int);		/* generated:WIDEC */
- extern NCURSES_EXPORT(int) wadd_wch (WINDOW *,const cchar_t *);		/* implemented */
- extern NCURSES_EXPORT(int) wadd_wchnstr (WINDOW *,const cchar_t *,int);	/* implemented */
-@@ -165,6 +167,14 @@
- extern NCURSES_EXPORT(wchar_t*) wunctrl (cchar_t *);			/* implemented */
- extern NCURSES_EXPORT(int) wvline_set (WINDOW *, const cchar_t *, int);	/* implemented */
- 
-+#if NCURSES_SP_FUNCS
-+extern NCURSES_EXPORT(attr_t) NCURSES_SP_NAME(term_attrs) (SCREEN*);		/* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(unget_wch) (SCREEN*, const wchar_t);	/* implemented */
-+extern NCURSES_EXPORT(wchar_t*) NCURSES_SP_NAME(wunctrl) (SCREEN*, cchar_t *);	/* implemented */
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vid_attr) (SCREEN*, attr_t, short, void *);
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vid_puts) (SCREEN*, attr_t, short, void *, NCURSES_SP_OUTC);
-+#endif
-+
- #ifndef NCURSES_NOMACROS
- 
- /*
-diff -Naur ncurses-5.7.orig/include/Makefile.in ncurses-5.7/include/Makefile.in
---- ncurses-5.7.orig/include/Makefile.in	2001-12-08 10:50:06.000000000 -0800
-+++ ncurses-5.7/include/Makefile.in	2009-07-19 15:04:09.000000000 -0700
-@@ -1,4 +1,4 @@
--# $Id: Makefile.in,v 1.35 2001/12/08 18:50:06 tom Exp $
-+# $Id: Makefile.in,v 1.36 2009/06/13 21:42:45 tom Exp $
- ##############################################################################
- # Copyright (c) 1998,2000,2001 Free Software Foundation, Inc.                #
- #                                                                            #
-@@ -72,6 +72,7 @@
- 	curses.h \
- 	hashsize.h \
- 	ncurses_def.h \
-+	ncurses_dll.h \
- 	parametrized.h \
- 	term.h
- 
-diff -Naur ncurses-5.7.orig/include/MKterm.h.awk.in ncurses-5.7/include/MKterm.h.awk.in
---- ncurses-5.7.orig/include/MKterm.h.awk.in	2008-05-24 16:13:59.000000000 -0700
-+++ ncurses-5.7/include/MKterm.h.awk.in	2009-07-19 15:03:59.000000000 -0700
-@@ -1,7 +1,7 @@
- # vile:awkmode
- BEGIN		{
- 		    print  "/****************************************************************************"
--		    print  " * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *"
-+		    print  " * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *"
- 		    print  " *                                                                          *"
- 		    print  " * Permission is hereby granted, free of charge, to any person obtaining a  *"
- 		    print  " * copy of this software and associated documentation files (the            *"
-@@ -34,7 +34,7 @@
- 		    print  "/*    and: Thomas E. Dickey                        1995-on                  */"
- 		    print  "/****************************************************************************/"
- 		    print  ""
--		    print  "/* $Id: MKterm.h.awk.in,v 1.50 2008/05/24 23:13:59 tom Exp $ */"
-+		    print  "/* $Id: MKterm.h.awk.in,v 1.57 2009/05/09 15:54:50 tom Exp $ */"
- 		    print  ""
- 		    print  "/*"
- 		    print  "**	term.h -- Definition of struct term"
-@@ -130,11 +130,15 @@
- 		    print  ""
- 		    print  "#else /* !HAVE_TERMIO_H */"
- 		    print  ""
-+		    print  "#if __MINGW32__"
-+		    print  "#  include <ncurses_mingw.h>"
-+		    print  "#  define TTY struct termios"
-+		    print  "#else"
- 		    print  "#undef TERMIOS"
- 		    print  "#include <sgtty.h>"
- 		    print  "#include <sys/ioctl.h>"
- 		    print  "#define TTY struct sgttyb"
--		    print  ""
-+		    print  "#endif /* MINGW32 */"
- 		    print  "#endif /* HAVE_TERMIO_H */"
- 		    print  ""
- 		    print  "#endif /* HAVE_TERMIOS_H */"
-@@ -228,8 +232,16 @@
- 			print  "    char *      _termname;      /* used for termname() */"
- 			print  "} TERMINAL;"
- 			print  ""
--			print  "#if @BROKEN_LINKER@ || @cf_cv_enable_reentrant@"
-+			print  "#if @BROKEN_LINKER@ && !@cf_cv_enable_reentrant@"
-+			print  "extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;"
-+			print  "#elif @cf_cv_enable_reentrant@"
- 			print  "NCURSES_WRAPPED_VAR(TERMINAL *, cur_term);"
-+			print  "#define cur_term   NCURSES_PUBLIC_VAR(cur_term())"
-+			print  "#else"
-+			print  "extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;"
-+			print  "#endif"
-+			print  ""
-+			print  "#if @BROKEN_LINKER@ || @cf_cv_enable_reentrant@"
- 			print  "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolnames);"
- 			print  "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolcodes);"
- 			print  "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolfnames);"
-@@ -240,7 +252,6 @@
- 			print  "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strcodes);"
- 			print  "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strfnames);"
- 			print  ""
--			print  "#define cur_term   NCURSES_PUBLIC_VAR(cur_term())"
- 			print  "#define boolnames  NCURSES_PUBLIC_VAR(boolnames())"
- 			print  "#define boolcodes  NCURSES_PUBLIC_VAR(boolcodes())"
- 			print  "#define boolfnames NCURSES_PUBLIC_VAR(boolfnames())"
-@@ -253,8 +264,6 @@
- 			print  ""
- 			print  "#else"
- 			print  ""
--			print  "extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;"
--			print  ""
- 			print  "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolnames[];"
- 			print  "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolcodes[];"
- 			print  "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolfnames[];"
-@@ -312,6 +321,37 @@
- 			print  "extern NCURSES_EXPORT(int) tputs (const char *, int, int (*)(int));"
- 			print  "#endif /* NCURSES_TERMCAP_H_incl */"
- 			print  ""
-+			print  "/*"
-+			print  " * Include curses.h before term.h to enable these extensions."
-+			print  " */"
-+			print  "#if defined(NCURSES_SP_FUNCS) && (NCURSES_SP_FUNCS != 0)"
-+			print  ""
-+			print  "extern NCURSES_EXPORT(char *)  NCURSES_SP_NAME(tigetstr) (SCREEN*, NCURSES_CONST char *);"
-+			print  "extern NCURSES_EXPORT(int)     NCURSES_SP_NAME(putp) (SCREEN*, const char *);"
-+			print  "extern NCURSES_EXPORT(int)     NCURSES_SP_NAME(tigetflag) (SCREEN*, NCURSES_CONST char *);"
-+			print  "extern NCURSES_EXPORT(int)     NCURSES_SP_NAME(tigetnum) (SCREEN*, NCURSES_CONST char *);"
-+			print  ""
-+			print  "#if @NCURSES_TPARM_VARARGS@ /* NCURSES_TPARM_VARARGS */"
-+			print  "extern NCURSES_EXPORT(char *)  NCURSES_SP_NAME(tparm) (SCREEN*, NCURSES_CONST char *, ...);	/* special */"
-+			print  "#else"
-+			print  "extern NCURSES_EXPORT(char *)  NCURSES_SP_NAME(tparm) (SCREEN*, NCURSES_CONST char *, long,long,long,long,long,long,long,long,long);	/* special */"
-+			print  "extern NCURSES_EXPORT(char *)  NCURSES_SP_NAME(tparm_varargs) (SCREEN*, NCURSES_CONST char *, ...);	/* special */"
-+			print  "#endif"
-+			print  ""
-+			print  "/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */"
-+			print  "extern NCURSES_EXPORT(char *)  NCURSES_SP_NAME(tgetstr) (SCREEN*, NCURSES_CONST char *, char **);"
-+			print  "extern NCURSES_EXPORT(char *)  NCURSES_SP_NAME(tgoto) (SCREEN*, const char *, int, int);"
-+			print  "extern NCURSES_EXPORT(int)     NCURSES_SP_NAME(tgetent) (SCREEN*, char *, const char *);"
-+			print  "extern NCURSES_EXPORT(int)     NCURSES_SP_NAME(tgetflag) (SCREEN*, NCURSES_CONST char *);"
-+			print  "extern NCURSES_EXPORT(int)     NCURSES_SP_NAME(tgetnum) (SCREEN*, NCURSES_CONST char *);"
-+			print  "extern NCURSES_EXPORT(int)     NCURSES_SP_NAME(tputs) (SCREEN*, const char *, int, NCURSES_SP_OUTC);"
-+			print  ""
-+			print  "extern NCURSES_EXPORT(TERMINAL *) NCURSES_SP_NAME(set_curterm) (SCREEN*, TERMINAL *);"
-+			print  "extern NCURSES_EXPORT(int)     NCURSES_SP_NAME(del_curterm) (SCREEN*, TERMINAL *);"
-+			print  ""
-+			print  "extern NCURSES_EXPORT(int)     NCURSES_SP_NAME(restartterm) (SCREEN*, NCURSES_CONST char *, int, int *);"
-+			print  "#endif /* NCURSES_SP_FUNCS */"
-+			print  ""
- 			print  "#ifdef __cplusplus"
- 			print  "}"
- 			print  "#endif"
-diff -Naur ncurses-5.7.orig/include/nc_alloc.h ncurses-5.7/include/nc_alloc.h
---- ncurses-5.7.orig/include/nc_alloc.h	2008-09-27 15:30:33.000000000 -0700
-+++ ncurses-5.7/include/nc_alloc.h	2009-07-19 15:03:53.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -29,7 +29,7 @@
- /****************************************************************************
-  *  Author: Thomas E. Dickey                    1996-on                     *
-  ****************************************************************************/
--/* $Id: nc_alloc.h,v 1.16 2008/09/27 22:30:33 tom Exp $ */
-+/* $Id: nc_alloc.h,v 1.17 2009/04/18 20:48:19 tom Exp $ */
- 
- #ifndef NC_ALLOC_included
- #define NC_ALLOC_included 1
-@@ -74,9 +74,15 @@
- extern NCURSES_EXPORT(void) _nc_free_tparm(void);
- extern NCURSES_EXPORT(void) _nc_leaks_dump_entry(void);
- extern NCURSES_EXPORT(void) _nc_leaks_tic(void);
--#define ExitProgram(code) _nc_free_and_exit(code)
-+
-+#if NCURSES_SP_FUNCS
-+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_free_and_exit)(SCREEN*, int) GCC_NORETURN;
- #endif
- 
-+#define ExitProgram(code) _nc_free_and_exit(code)
-+
-+#endif /* NO_LEAKS, etc */
-+
- #ifndef HAVE_NC_FREEALL
- #define HAVE_NC_FREEALL 0
- #endif
-diff -Naur ncurses-5.7.orig/include/nc_mingw.h ncurses-5.7/include/nc_mingw.h
---- ncurses-5.7.orig/include/nc_mingw.h	1969-12-31 16:00:00.000000000 -0800
-+++ ncurses-5.7/include/nc_mingw.h	2009-07-19 15:04:11.000000000 -0700
-@@ -0,0 +1,59 @@
-+/****************************************************************************
-+ * Copyright (c) 2008,2009 Free Software Foundation, Inc.                   *
-+ *                                                                          *
-+ * Permission is hereby granted, free of charge, to any person obtaining a  *
-+ * copy of this software and associated documentation files (the            *
-+ * "Software"), to deal in the Software without restriction, including      *
-+ * without limitation the rights to use, copy, modify, merge, publish,      *
-+ * distribute, distribute with modifications, sublicense, and/or sell       *
-+ * copies of the Software, and to permit persons to whom the Software is    *
-+ * furnished to do so, subject to the following conditions:                 *
-+ *                                                                          *
-+ * The above copyright notice and this permission notice shall be included  *
-+ * in all copies or substantial portions of the Software.                   *
-+ *                                                                          *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
-+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
-+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
-+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
-+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
-+ *                                                                          *
-+ * Except as contained in this notice, the name(s) of the above copyright   *
-+ * holders shall not be used in advertising or otherwise to promote the     *
-+ * sale, use or other dealings in this Software without prior written       *
-+ * authorization.                                                           *
-+ ****************************************************************************/
-+
-+/****************************************************************************
-+ * Author: Thomas Dickey, 2008-on                                           * 
-+ *                                                                          *
-+ ****************************************************************************/
-+
-+/* $Id: nc_mingw.h,v 1.1 2009/02/07 23:33:19 tom Exp $ */
-+
-+#ifndef NC_MINGW_H
-+#define NC_MINGW_H 1
-+
-+#define WINVER 0x0501
-+#include <windows.h>
-+
-+#undef sleep
-+#define sleep(n) Sleep((n) * 1000)
-+
-+#undef gettimeofday
-+#define gettimeofday(tv,tz) _nc_gettimeofday(tv,tz)
-+
-+#include <sys/time.h>	/* for struct timeval */
-+
-+extern int _nc_gettimeofday(struct timeval *, void *);
-+
-+#undef HAVE_GETTIMEOFDAY
-+#define HAVE_GETTIMEOFDAY 1
-+
-+#define SIGHUP  1
-+#define SIGKILL 9
-+#define getlogin() "username"
-+
-+#endif /* NC_MINGW_H */
-diff -Naur ncurses-5.7.orig/include/nc_panel.h ncurses-5.7/include/nc_panel.h
---- ncurses-5.7.orig/include/nc_panel.h	2008-08-04 11:26:46.000000000 -0700
-+++ ncurses-5.7/include/nc_panel.h	2009-07-19 15:04:13.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2000,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -31,9 +31,8 @@
-  *     and: Thomas E. Dickey                                                *
-  ****************************************************************************/
- 
--
- /*
-- * $Id: nc_panel.h,v 1.5 2008/08/04 18:26:46 tom Exp $
-+ * $Id: nc_panel.h,v 1.7 2009/07/04 18:20:02 tom Exp $
-  *
-  *	nc_panel.h
-  *
-@@ -45,25 +44,33 @@
- #define NC_PANEL_H 1
- 
- #ifdef __cplusplus
--extern "C" {
-+extern "C"
-+{
- #endif
- 
--struct panel; /* Forward Declaration */
-+  struct panel;			/* Forward Declaration */
- 
--struct panelhook {
--  struct panel*   top_panel;
--  struct panel*   bottom_panel;
--  struct panel*   stdscr_pseudo_panel;
-+  struct panelhook
-+    {
-+      struct panel *top_panel;
-+      struct panel *bottom_panel;
-+      struct panel *stdscr_pseudo_panel;
- #if NO_LEAKS
--  int (*destroy)(struct panel *);
-+      int (*destroy) (struct panel *);
- #endif
--};
-+    };
- 
--/* Retrieve the panelhook of the current screen */
--extern NCURSES_EXPORT(struct panelhook*) _nc_panelhook (void);
-+  struct screen;		/* Forward declaration */
-+/* Retrieve the panelhook of the specified screen */
-+  extern NCURSES_EXPORT(struct panelhook *)
-+    _nc_panelhook (void);
-+#if NCURSES_SP_FUNCS
-+  extern NCURSES_EXPORT(struct panelhook *)
-+    NCURSES_SP_NAME(_nc_panelhook) (SCREEN *);
-+#endif
- 
- #ifdef __cplusplus
- }
- #endif
- 
--#endif /* NC_PANEL_H */
-+#endif				/* NC_PANEL_H */
-diff -Naur ncurses-5.7.orig/include/ncurses_defs ncurses-5.7/include/ncurses_defs
---- ncurses-5.7.orig/include/ncurses_defs	2008-09-06 08:57:41.000000000 -0700
-+++ ncurses-5.7/include/ncurses_defs	2009-07-19 15:03:58.000000000 -0700
-@@ -1,4 +1,4 @@
--# $Id: ncurses_defs,v 1.40 2008/09/06 15:57:41 tom Exp $
-+# $Id: ncurses_defs,v 1.41 2008/11/16 00:19:59 juergen Exp $
- ##############################################################################
- # Copyright (c) 2000-2007,2008 Free Software Foundation, Inc.                #
- #                                                                            #
-@@ -171,7 +171,6 @@
- NCURSES_EXT_FUNCS
- NCURSES_NO_PADDING
- NCURSES_PATHSEP	':'
--NDEBUG
- NEED_PTEM_H
- NO_LEAKS
- PURE_TERMINFO
-diff -Naur ncurses-5.7.orig/include/ncurses_dll.h ncurses-5.7/include/ncurses_dll.h
---- ncurses-5.7.orig/include/ncurses_dll.h	2007-03-10 11:21:49.000000000 -0800
-+++ ncurses-5.7/include/ncurses_dll.h	2009-07-19 15:03:53.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -25,7 +25,7 @@
-  * sale, use or other dealings in this Software without prior written       *
-  * authorization.                                                           *
-  ****************************************************************************/
--/* $Id: ncurses_dll.h,v 1.6 2007/03/10 19:21:49 tom Exp $ */
-+/* $Id: ncurses_dll.h,v 1.8 2009/04/04 22:26:27 tom Exp $ */
- 
- #ifndef NCURSES_DLL_H_incl
- #define NCURSES_DLL_H_incl 1
-@@ -37,7 +37,7 @@
- #undef NCURSES_DLL
- #define NCURSES_STATIC
- 
--#if defined(__CYGWIN__)
-+#if defined(__CYGWIN__) || defined(__MINGW32__)
- #  if defined(NCURSES_DLL)
- #    if defined(NCURSES_STATIC)
- #      undef NCURSES_STATIC
-@@ -76,11 +76,4 @@
- #  define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type
- #endif
- 
--/*
-- * For reentrant code, we map the various global variables into SCREEN by
-- * using functions to access them.
-- */
--#define NCURSES_PUBLIC_VAR(name) _nc_##name
--#define NCURSES_WRAPPED_VAR(type,name) extern type NCURSES_PUBLIC_VAR(name)(void)
--
- #endif /* NCURSES_DLL_H_incl */
-diff -Naur ncurses-5.7.orig/include/ncurses_dll.h.in ncurses-5.7/include/ncurses_dll.h.in
---- ncurses-5.7.orig/include/ncurses_dll.h.in	1969-12-31 16:00:00.000000000 -0800
-+++ ncurses-5.7/include/ncurses_dll.h.in	2009-07-19 15:04:09.000000000 -0700
-@@ -0,0 +1,86 @@
-+/****************************************************************************
-+ * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.              *
-+ *                                                                          *
-+ * Permission is hereby granted, free of charge, to any person obtaining a  *
-+ * copy of this software and associated documentation files (the            *
-+ * "Software"), to deal in the Software without restriction, including      *
-+ * without limitation the rights to use, copy, modify, merge, publish,      *
-+ * distribute, distribute with modifications, sublicense, and/or sell       *
-+ * copies of the Software, and to permit persons to whom the Software is    *
-+ * furnished to do so, subject to the following conditions:                 *
-+ *                                                                          *
-+ * The above copyright notice and this permission notice shall be included  *
-+ * in all copies or substantial portions of the Software.                   *
-+ *                                                                          *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
-+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
-+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
-+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
-+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
-+ *                                                                          *
-+ * Except as contained in this notice, the name(s) of the above copyright   *
-+ * holders shall not be used in advertising or otherwise to promote the     *
-+ * sale, use or other dealings in this Software without prior written       *
-+ * authorization.                                                           *
-+ ****************************************************************************/
-+/* $Id: ncurses_dll.h.in,v 1.8 2009/04/04 22:26:27 tom Exp $ */
-+
-+#ifndef NCURSES_DLL_H_incl
-+#define NCURSES_DLL_H_incl 1
-+
-+/*
-+ * For reentrant code, we map the various global variables into SCREEN by
-+ * using functions to access them.
-+ */
-+#define NCURSES_PUBLIC_VAR(name) @NCURSES_WRAP_PREFIX@##name
-+#define NCURSES_WRAPPED_VAR(type,name) extern type NCURSES_PUBLIC_VAR(name)(void)
-+
-+/* no longer needed on cygwin or mingw, thanks to auto-import       */
-+/* but this structure may be useful at some point for an MSVC build */
-+/* so, for now unconditionally define the important flags           */
-+/* "the right way" for proper static and dll+auto-import behavior   */
-+#undef NCURSES_DLL
-+#define NCURSES_STATIC
-+
-+#if defined(__CYGWIN__) || defined(__MINGW32__)
-+#  if defined(NCURSES_DLL)
-+#    if defined(NCURSES_STATIC)
-+#      undef NCURSES_STATIC
-+#    endif
-+#  endif
-+#  undef NCURSES_IMPEXP
-+#  undef NCURSES_API
-+#  undef NCURSES_EXPORT
-+#  undef NCURSES_EXPORT_VAR
-+#  if defined(NCURSES_DLL)
-+/* building a DLL */
-+#    define NCURSES_IMPEXP __declspec(dllexport)
-+#  elif defined(NCURSES_STATIC)
-+/* building or linking to a static library */
-+#    define NCURSES_IMPEXP /* nothing */
-+#  else
-+/* linking to the DLL */
-+#    define NCURSES_IMPEXP __declspec(dllimport)
-+#  endif
-+#  define NCURSES_API __cdecl
-+#  define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API
-+#  define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type
-+#endif
-+
-+/* Take care of non-cygwin platforms */
-+#if !defined(NCURSES_IMPEXP)
-+#  define NCURSES_IMPEXP /* nothing */
-+#endif
-+#if !defined(NCURSES_API)
-+#  define NCURSES_API /* nothing */
-+#endif
-+#if !defined(NCURSES_EXPORT)
-+#  define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API
-+#endif
-+#if !defined(NCURSES_EXPORT_VAR)
-+#  define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type
-+#endif
-+
-+#endif /* NCURSES_DLL_H_incl */
-diff -Naur ncurses-5.7.orig/include/ncurses_mingw.h ncurses-5.7/include/ncurses_mingw.h
---- ncurses-5.7.orig/include/ncurses_mingw.h	1969-12-31 16:00:00.000000000 -0800
-+++ ncurses-5.7/include/ncurses_mingw.h	2009-07-19 15:04:11.000000000 -0700
-@@ -0,0 +1,164 @@
-+/****************************************************************************
-+ * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ *                                                                          *
-+ * Permission is hereby granted, free of charge, to any person obtaining a  *
-+ * copy of this software and associated documentation files (the            *
-+ * "Software"), to deal in the Software without restriction, including      *
-+ * without limitation the rights to use, copy, modify, merge, publish,      *
-+ * distribute, distribute with modifications, sublicense, and/or sell       *
-+ * copies of the Software, and to permit persons to whom the Software is    *
-+ * furnished to do so, subject to the following conditions:                 *
-+ *                                                                          *
-+ * The above copyright notice and this permission notice shall be included  *
-+ * in all copies or substantial portions of the Software.                   *
-+ *                                                                          *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
-+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
-+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
-+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
-+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
-+ *                                                                          *
-+ * Except as contained in this notice, the name(s) of the above copyright   *
-+ * holders shall not be used in advertising or otherwise to promote the     *
-+ * sale, use or other dealings in this Software without prior written       *
-+ * authorization.                                                           *
-+ ****************************************************************************/
-+
-+/****************************************************************************
-+ * Author: Juergen Pfeifer, 2008-on                                         * 
-+ *                                                                          *
-+ ****************************************************************************/
-+
-+/* $Id: ncurses_mingw.h,v 1.1 2008/12/14 19:22:16 juergen Exp $ */
-+
-+/*
-+ * This is a placholder up to now and describes what needs to be implemented
-+ * to support I/O to external terminals with ncurses on the Windows OS.
-+ */
-+
-+#if __MINGW32__
-+#ifndef _NC_MINGWH
-+#define _NC_MINGWH
-+
-+#define USE_CONSOLE_DRIVER 1
-+
-+#undef  TERMIOS
-+#define TERMIOS 1
-+
-+#define InvalidHandle ((TERM_HANDLE)-1)
-+#define InvalidConsoleHandle(s) ((s)==InvalidHandle)
-+
-+typedef unsigned char cc_t;
-+typedef unsigned int  speed_t;
-+typedef unsigned int  tcflag_t;
-+
-+#define NCCS 32
-+struct termios
-+{
-+  tcflag_t   c_iflag;     /* input mode         */
-+  tcflag_t   c_oflag;     /* output mode        */
-+  tcflag_t   c_cflag;     /* control mode       */
-+  tcflag_t   c_lflag;     /* local mode         */
-+  cc_t       c_line;      /* line discipline    */
-+  cc_t       c_cc[NCCS];  /* control characters */
-+  speed_t    c_ispeed;    /* input speed        */
-+  speed_t    c_ospeed;    /* c_ospeed           */
-+};
-+
-+/* c_cc chars */
-+#define VINTR     0
-+#define VQUIT     1
-+#define VERASE    2
-+#define VKILL     3
-+#define VEOF      4
-+#define VTIME     5
-+#define VMIN      6
-+
-+/* c_iflag bits */
-+#define ISTRIP	0000040
-+#define INLCR	0000100
-+#define IGNCR	0000200
-+#define ICRNL	0000400
-+#define BRKINT	0000002
-+#define PARMRK	0000010
-+#define IXON	0002000
-+#define IGNBRK	0000001
-+#define IGNPAR	0000004
-+#define INPCK	0000020
-+#define IXOFF	0010000
-+
-+/* c_oflag bits */
-+#define OPOST	0000001
-+
-+/* c_cflag bit meaning */
-+#define CBAUD	   0010017
-+#define CSIZE	   0000060
-+#define CS8	   0000060
-+#define B0	   0000000
-+#define B50	   0000001
-+#define B75	   0000002
-+#define B110	   0000003
-+#define B134	   0000004
-+#define B150	   0000005
-+#define B200	   0000006
-+#define B300	   0000007
-+#define B600	   0000010
-+#define B1200	   0000011
-+#define B1800	   0000012
-+#define B2400	   0000013
-+#define B4800	   0000014
-+#define B9600	   0000015
-+#define CLOCAL	   0004000
-+#define CREAD	   0000200
-+#define CSTOPB	   0000100
-+#define HUPCL	   0002000
-+#define PARENB	   0000400
-+#define PARODD	   0001000
-+
-+/* c_lflag bits */
-+#define ECHO	0000010
-+#define ECHONL	0000100
-+#define ISIG	0000001
-+#define IEXTEN	0100000
-+#define ICANON	0000002
-+#define NOFLSH	0000200
-+#define ECHOE	0000020
-+#define ECHOK	0000040
-+
-+/* tcflush() */
-+#define	TCIFLUSH	0
-+
-+/* tcsetattr uses these */
-+#define	TCSADRAIN	1
-+
-+/* ioctls */
-+#define TCGETA		0x5405
-+#define TCFLSH		0x540B
-+#define TIOCGWINSZ	0x5413
-+
-+extern int _nc_mingw_ioctl(int fd, long int request, struct termios* arg);
-+extern void _nc_set_term_driver(void* term);
-+
-+#ifndef cfgetospeed
-+#define cfgetospeed(t) ((t)->c_cflag & CBAUD)
-+#endif
-+
-+#ifndef tcsetattr
-+#define tcsetattr(fd, cmd, arg) _nc_mingw_ioctl(fd, cmd, arg)
-+#endif
-+
-+#ifndef tcgetattr
-+#define tcgetattr(fd, arg) _nc_mingw_ioctl(fd, TCGETA, arg)
-+#endif
-+
-+#ifndef tcflush
-+#define tcflush(fd, arg) _nc_mingw_ioctl(fd, TCFLSH, arg)
-+#endif
-+
-+#undef  ttyname
-+#define ttyname(fd) NULL
-+
-+#endif
-+#endif
-diff -Naur ncurses-5.7.orig/include/term_entry.h ncurses-5.7/include/term_entry.h
---- ncurses-5.7.orig/include/term_entry.h	2008-08-16 09:16:03.000000000 -0700
-+++ ncurses-5.7/include/term_entry.h	2009-07-19 15:04:15.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2005,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -32,7 +32,7 @@
-  *     and: Thomas E. Dickey                        1998-on                 *
-  ****************************************************************************/
- 
--/* $Id: term_entry.h,v 1.35 2008/08/16 16:16:03 tom Exp $ */
-+/* $Id: term_entry.h,v 1.37 2009/07/11 16:52:29 tom Exp $ */
- 
- /*
-  *	term_entry.h -- interface to entry-manipulation code
-@@ -81,12 +81,18 @@
- #define EXT_NAMES(tp,i,limit,index,table) table[i]
- #endif
- 
--#define NUM_EXT_NAMES(tp) ((tp)->ext_Booleans + (tp)->ext_Numbers + (tp)->ext_Strings)
-+#define NUM_EXT_NAMES(tp) (unsigned) ((tp)->ext_Booleans + (tp)->ext_Numbers + (tp)->ext_Strings)
- 
- #define for_each_boolean(n,tp) for(n = 0; n < NUM_BOOLEANS(tp); n++)
- #define for_each_number(n,tp)  for(n = 0; n < NUM_NUMBERS(tp);  n++)
- #define for_each_string(n,tp)  for(n = 0; n < NUM_STRINGS(tp);  n++)
- 
-+#if NCURSES_XNAMES
-+#define for_each_ext_boolean(n,tp) for(n = BOOLCOUNT; n < NUM_BOOLEANS(tp); n++)
-+#define for_each_ext_number(n,tp)  for(n = NUMCOUNT; n < NUM_NUMBERS(tp);  n++)
-+#define for_each_ext_string(n,tp)  for(n = STRCOUNT; n < NUM_STRINGS(tp);  n++)
-+#endif
-+
- #define ExtBoolname(tp,i,names) EXT_NAMES(tp, i, BOOLCOUNT, (i - (tp->num_Booleans - tp->ext_Booleans)), names)
- #define ExtNumname(tp,i,names)  EXT_NAMES(tp, i, NUMCOUNT, (i - (tp->num_Numbers - tp->ext_Numbers)) + tp->ext_Booleans, names)
- #define ExtStrname(tp,i,names)  EXT_NAMES(tp, i, STRCOUNT, (i - (tp->num_Strings - tp->ext_Strings)) + (tp->ext_Numbers + tp->ext_Booleans), names)
-diff -Naur ncurses-5.7.orig/include/tic.h ncurses-5.7/include/tic.h
---- ncurses-5.7.orig/include/tic.h	2007-08-11 09:12:43.000000000 -0700
-+++ ncurses-5.7/include/tic.h	2009-07-19 15:04:15.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -33,7 +33,7 @@
-  ****************************************************************************/
- 
- /*
-- * $Id: tic.h,v 1.62 2007/08/11 16:12:43 tom Exp $
-+ * $Id: tic.h,v 1.63 2009/07/11 18:11:15 tom Exp $
-  *	tic.h - Global variables and structures for the terminfo
-  *			compiler.
-  */
-@@ -246,7 +246,7 @@
- extern NCURSES_EXPORT(struct name_table_entry const *) _nc_find_entry
- 	(const char *, const short *);
- extern NCURSES_EXPORT(struct name_table_entry const *) _nc_find_type_entry
--	(const char *, int, const struct name_table_entry *);
-+	(const char *, int, bool);
- 
- /* comp_scan.c: lexical analysis */
- extern NCURSES_EXPORT(int)  _nc_get_token (bool);
-diff -Naur ncurses-5.7.orig/include/unctrl.h.in ncurses-5.7/include/unctrl.h.in
---- ncurses-5.7.orig/include/unctrl.h.in	2001-03-24 13:53:25.000000000 -0800
-+++ ncurses-5.7/include/unctrl.h.in	2009-07-19 15:03:53.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998,2000 Free Software Foundation, Inc.                   *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -39,7 +39,7 @@
-  * as ^?. Printable characters are displayed as is.
-  */
- 
--/* $Id: unctrl.h.in,v 1.10 2001/03/24 21:53:25 tom Exp $ */
-+/* $Id: unctrl.h.in,v 1.11 2009/04/18 21:00:52 tom Exp $ */
- 
- #ifndef NCURSES_UNCTRL_H_incl
- #define NCURSES_UNCTRL_H_incl	1
-@@ -56,6 +56,10 @@
- #undef unctrl
- NCURSES_EXPORT(NCURSES_CONST char *) unctrl (chtype);
- 
-+#if @NCURSES_SP_FUNCS@
-+NCURSES_EXPORT(NCURSES_CONST char *) NCURSES_SP_NAME(unctrl) (SCREEN*, chtype);
-+#endif
-+
- #ifdef __cplusplus
- }
- #endif
-diff -Naur ncurses-5.7.orig/INSTALL ncurses-5.7/INSTALL
---- ncurses-5.7.orig/INSTALL	2008-11-02 13:13:51.000000000 -0800
-+++ ncurses-5.7/INSTALL	2009-07-19 15:04:17.000000000 -0700
-@@ -1,5 +1,5 @@
- -------------------------------------------------------------------------------
---- Copyright (c) 1998-2006,2008 Free Software Foundation, Inc.               --
-+-- Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.               --
- --                                                                           --
- -- Permission is hereby granted, free of charge, to any person obtaining a   --
- -- copy of this software and associated documentation files (the             --
-@@ -25,7 +25,7 @@
- -- sale, use or other dealings in this Software without prior written        --
- -- authorization.                                                            --
- -------------------------------------------------------------------------------
---- $Id: INSTALL,v 1.135 2008/11/02 21:13:51 tom Exp $
-+-- $Id: INSTALL,v 1.139 2009/07/18 20:50:08 tom Exp $
- ---------------------------------------------------------------------
-              How to install Ncurses/Terminfo on your system
- ---------------------------------------------------------------------
-@@ -525,6 +525,11 @@
- 	terminfo entries.  This is the default, unless you have disabled the
- 	extended functions.
- 
-+    --enable-pc-files
-+	If pkg-config is found (see --with-pkg-config), generate ".pc" files
-+	for each of the libraries, and install them in pkg-config's library
-+	directory.
-+
-     --enable-reentrant
- 	Compile experimental configuration which improves reentrant use of the
- 	library by reducing global and static variables.  This option is also
-@@ -682,6 +687,10 @@
- 	to use a terminfo database which is compatible with the native
- 	applications.
- 
-+    --with-ccharw-max=XXX
-+	Override the size of the wide-character array in cchar_t structures.
-+	Changing this will alter the binary interface.  This defaults to 5.
-+
-     --with-chtype=TYPE
- 	Override type of chtype, which stores the video attributes and (if
- 	--enable-widec is not given) a character.  Prior to ncurses 5.5, this
-@@ -850,6 +859,9 @@
- 	those using termcap, do not use the higher speeds.  Your application
- 	(or system, in general) may or may not.
- 
-+    --with-pkg-config=[DIR]
-+	Check for pkg-config, optionally specifying its path.
-+
-     --with-profile
- 	Generate profile-libraries These are named by adding "_p" to the root,
- 	e.g., libncurses_p.a
-@@ -946,6 +958,17 @@
- 	For testing, compile with debug option.
- 	This also sets the --disable-leaks option.
- 
-+    --with-wrap-prefix=XXX
-+	When using the --enable-reentrant option, ncurses redefines variables
-+	that would be global in curses, e.g., LINES, as a macro that calls a
-+	"wrapping" function which fetches the data from the current SCREEN
-+	structure.  Normally that function is named by prepending "_nc_" to the
-+	variable's name.  The function is technically private (since portable
-+	applications would not refer directly to it).  But according to one
-+	line of reasoning, it is not the same type of "private" as functions
-+	which applications should not call even via a macro.  This configure
-+	option lets you choose the prefix for these wrapped variables.
-+
-     --without-ada
- 	Suppress the configure script's check for Ada95, do not build the
- 	Ada95 binding and related demo.
-@@ -975,6 +998,9 @@
-     --without-dlsym
- 	Do not use dlsym() to load GPM dynamically.
- 
-+    --without-manpages
-+	Tell the configure script to suppress the install of ncurses' manpages.
-+
-     --without-progs
- 	Tell the configure script to suppress the build of ncurses' application
- 	programs (e.g., tic).  The test applications will still be built if you
-diff -Naur ncurses-5.7.orig/Makefile.in ncurses-5.7/Makefile.in
---- ncurses-5.7.orig/Makefile.in	2005-01-29 11:30:06.000000000 -0800
-+++ ncurses-5.7/Makefile.in	2009-07-19 15:04:11.000000000 -0700
-@@ -1,4 +1,4 @@
--# $Id: Makefile.in,v 1.24 2005/01/29 19:30:06 tom Exp $
-+# $Id: Makefile.in,v 1.25 2008/11/16 00:19:59 juergen Exp $
- ##############################################################################
- # Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.                #
- #                                                                            #
-@@ -83,6 +83,9 @@
- 		fgrep NCURSES_VERSION $(includedir)/curses.h >/dev/null || \
- 		echo '** Will overwrite non-ncurses curses.h'
- 
-+dlls:	libs
-+	sh mk-dlls.sh
-+
- # Put the common rules here so that we can easily construct the list of
- # directories to visit.
- all \
-@@ -95,3 +98,4 @@
- tags \
- uninstall \
- install ::
-+
-diff -Naur ncurses-5.7.orig/man/curs_color.3x ncurses-5.7/man/curs_color.3x
---- ncurses-5.7.orig/man/curs_color.3x	2005-12-17 16:00:37.000000000 -0800
-+++ ncurses-5.7/man/curs_color.3x	2009-07-19 15:02:16.000000000 -0700
-@@ -1,5 +1,5 @@
- .\"***************************************************************************
--.\" Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.              *
-+.\" Copyright (c) 1998-2005,2009 Free Software Foundation, Inc.              *
- .\"                                                                          *
- .\" Permission is hereby granted, free of charge, to any person obtaining a  *
- .\" copy of this software and associated documentation files (the            *
-@@ -26,7 +26,7 @@
- .\" authorization.                                                           *
- .\"***************************************************************************
- .\"
--.\" $Id: curs_color.3x,v 1.28 2005/12/18 00:00:37 tom Exp $
-+.\" $Id: curs_color.3x,v 1.29 2009/01/24 23:10:02 tom Exp $
- .TH curs_color 3X ""
- .na
- .hy 0
-@@ -96,7 +96,10 @@
- .TP 5
- -
- The value of the first argument
--must be between \fB1\fR and \fBCOLOR_PAIRS-1\fR.
-+must be between \fB1\fR and \fBCOLOR_PAIRS-1\fR,
-+except that if default colors are used (see \fBuse_default_colors\fP)
-+the upper limit is adjusted to allow for extra pairs which use
-+a default color in foreground and/or background.
- .TP 5
- -
- The value of the second and
-diff -Naur ncurses-5.7.orig/man/curs_getcchar.3x ncurses-5.7/man/curs_getcchar.3x
---- ncurses-5.7.orig/man/curs_getcchar.3x	2008-05-17 12:37:05.000000000 -0700
-+++ ncurses-5.7/man/curs_getcchar.3x	2009-07-19 15:04:17.000000000 -0700
-@@ -1,5 +1,5 @@
- .\"***************************************************************************
--.\" Copyright (c) 2001-2006,2008 Free Software Foundation, Inc.              *
-+.\" Copyright (c) 2001-2008,2009 Free Software Foundation, Inc.              *
- .\"                                                                          *
- .\" Permission is hereby granted, free of charge, to any person obtaining a  *
- .\" copy of this software and associated documentation files (the            *
-@@ -26,7 +26,7 @@
- .\" authorization.                                                           *
- .\"***************************************************************************
- .\"
--.\" $Id: curs_getcchar.3x,v 1.11 2008/05/17 19:37:05 tom Exp $
-+.\" $Id: curs_getcchar.3x,v 1.12 2009/07/18 16:10:56 tom Exp $
- .TH curs_getcchar 3X ""
- .SH NAME
- \fBgetcchar\fP,
-@@ -126,7 +126,8 @@
- .PP
- When \fIwch\fP is a null pointer,
- \fBgetcchar\fP returns the number of wide characters referenced by
--\fIwcval\fP.
-+\fIwcval\fP,
-+including one for a trailing null.
- .PP
- When \fIwch\fP is not a null pointer,
- \fBgetcchar\fP returns \fBOK\fP upon successful completion,
-diff -Naur ncurses-5.7.orig/man/curs_mouse.3x ncurses-5.7/man/curs_mouse.3x
---- ncurses-5.7.orig/man/curs_mouse.3x	2006-12-30 15:43:34.000000000 -0800
-+++ ncurses-5.7/man/curs_mouse.3x	2009-07-19 15:01:57.000000000 -0700
-@@ -1,6 +1,6 @@
- '\" t
- .\"***************************************************************************
--.\" Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
-+.\" Copyright (c) 1998-2006,2008 Free Software Foundation, Inc.              *
- .\"                                                                          *
- .\" Permission is hereby granted, free of charge, to any person obtaining a  *
- .\" copy of this software and associated documentation files (the            *
-@@ -27,11 +27,12 @@
- .\" authorization.                                                           *
- .\"***************************************************************************
- .\"
--.\" $Id: curs_mouse.3x,v 1.30 2006/12/30 23:43:34 tom Exp $
-+.\" $Id: curs_mouse.3x,v 1.31 2008/11/23 00:09:53 tom Exp $
- .TH curs_mouse 3X ""
- .na
- .hy 0
- .SH NAME
-+\fBhas_mouse\fR,
- \fBgetmouse\fR, \fBungetmouse\fR,
- \fBmousemask\fR, \fBwenclose\fR,
- \fBmouse_trafo\fR, \fBwmouse_trafo\fR,
-@@ -53,7 +54,9 @@
- MEVENT;\fR
- .fi
- .br
--\fBint getmouse(MEVENT *event);\fR
-+\fBbool has_mouse(void);\fR
-+.br
-+-\fBint getmouse(MEVENT *event);\fR
- .br
- \fBint ungetmouse(MEVENT *event);\fR
- .br
-@@ -197,6 +200,9 @@
- Use \fBmouseinterval(-1)\fR to obtain the interval without altering it.
- The default is one sixth of a second.
- .PP
-+The \fBhas_mouse\fP function returns TRUE if the mouse driver has been
-+successfully initialized.
-+.PP
- Note that mouse events will be ignored when input is in cooked mode, and will
- cause an error beep when cooked mode is being simulated in a window by a
- function such as \fBgetstr\fR that expects a linefeed for input-loop
-diff -Naur ncurses-5.7.orig/man/form_field_validation.3x ncurses-5.7/man/form_field_validation.3x
---- ncurses-5.7.orig/man/form_field_validation.3x	2006-12-24 08:08:08.000000000 -0800
-+++ ncurses-5.7/man/form_field_validation.3x	2009-07-19 15:03:51.000000000 -0700
-@@ -26,7 +26,7 @@
- .\" authorization.                                                           *
- .\"***************************************************************************
- .\"
--.\" $Id: form_field_validation.3x,v 1.16 2006/12/24 16:08:08 tom Exp $
-+.\" $Id: form_field_validation.3x,v 1.17 2008/12/14 19:22:16 juergen Exp $
- .TH form_field_validation 3X ""
- .SH NAME
- \fBform_field_validation\fR - data type validation for fields
-@@ -70,9 +70,7 @@
- case-sensitivity; and a fifth \fBint\fR flag argument specifying whether a partial
- match must be a unique one (if this flag is off, a prefix matches the first
- of any set of more than one list elements with that prefix). Please notice
--that the string list is not copied, only a reference to it is stored in the
--field. So you should avoid using a list that lives in automatic variables
--on the stack.
-+that the string list is copied. So you may use a list that lives in automatic variables on the stack.
- .TP 5
- TYPE_INTEGER
- Integer data, parsable to an integer by \fBatoi(3)\fR.  Requires a third
-diff -Naur ncurses-5.7.orig/man/keybound.3x ncurses-5.7/man/keybound.3x
---- ncurses-5.7.orig/man/keybound.3x	2006-02-25 13:47:06.000000000 -0800
-+++ ncurses-5.7/man/keybound.3x	2009-07-19 15:02:02.000000000 -0700
-@@ -1,5 +1,5 @@
- .\"***************************************************************************
--.\" Copyright (c) 1999-2003,2006 Free Software Foundation, Inc.              *
-+.\" Copyright (c) 1999-2006,2008 Free Software Foundation, Inc.              *
- .\"                                                                          *
- .\" Permission is hereby granted, free of charge, to any person obtaining a  *
- .\" copy of this software and associated documentation files (the            *
-@@ -28,8 +28,8 @@
- .\"
- .\" Author: Thomas E. Dickey 1999
- .\"
--.\" $Id: keybound.3x,v 1.6 2006/02/25 21:47:06 tom Exp $
--.TH keyok 3X ""
-+.\" $Id: keybound.3x,v 1.7 2008/12/13 18:19:07 Frederic.Culot Exp $
-+.TH keybound 3X ""
- .SH NAME
- \fBkeybound\fP \- return definition of keycode
- .SH SYNOPSIS
-diff -Naur ncurses-5.7.orig/man/tabs.1 ncurses-5.7/man/tabs.1
---- ncurses-5.7.orig/man/tabs.1	1969-12-31 16:00:00.000000000 -0800
-+++ ncurses-5.7/man/tabs.1	2009-07-19 15:01:56.000000000 -0700
-@@ -0,0 +1,143 @@
-+.\"***************************************************************************
-+.\" Copyright (c) 2008 Free Software Foundation, Inc.                        *
-+.\"                                                                          *
-+.\" Permission is hereby granted, free of charge, to any person obtaining a  *
-+.\" copy of this software and associated documentation files (the            *
-+.\" "Software"), to deal in the Software without restriction, including      *
-+.\" without limitation the rights to use, copy, modify, merge, publish,      *
-+.\" distribute, distribute with modifications, sublicense, and/or sell       *
-+.\" copies of the Software, and to permit persons to whom the Software is    *
-+.\" furnished to do so, subject to the following conditions:                 *
-+.\"                                                                          *
-+.\" The above copyright notice and this permission notice shall be included  *
-+.\" in all copies or substantial portions of the Software.                   *
-+.\"                                                                          *
-+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
-+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
-+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
-+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
-+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
-+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
-+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
-+.\"                                                                          *
-+.\" Except as contained in this notice, the name(s) of the above copyright   *
-+.\" holders shall not be used in advertising or otherwise to promote the     *
-+.\" sale, use or other dealings in this Software without prior written       *
-+.\" authorization.                                                           *
-+.\"***************************************************************************
-+.\"
-+.\" $Id: tabs.1,v 1.2 2008/11/15 23:03:45 tom Exp $
-+.TH @TABS@ 1M ""
-+.ds n 5
-+.SH NAME
-+\fBtabs\fR - set tabs on a terminal
-+.SH SYNOPSIS
-+\fBtabs\fR [\fB-v\fR[\fIn\fR]] [\fB-ahuUV\fR] \fIfile...\fR
-+.br
-+.SH DESCRIPTION
-+.PP
-+The \fBtabs\fP program clears and sets tab-stops on the terminal.
-+This uses the terminfo \fIclear_all_tabs\fP and \fIset_tab\fP capabilities.
-+If either is absent, \fBtabs\fP is unable to clear/set tab-stops.
-+The terminal should be configured to use hard tabs, e.g.,
-+.sp
-+.RS
-+stty tab0
-+.RE
-+.SH OPTIONS
-+.SS General Options
-+.TP 5
-+.BI -T "name"
-+Tell \fBtabs\fP which terminal type to use.
-+If this option is not given, \fBtabs\fP will use the \fB$TERM\fP
-+environment variable.
-+If that is not set, it will use the \fIansi+tabs\fP entry.
-+.TP 5
-+.B -d
-+The debugging option shows a ruler line, followed by two data lines.
-+The first data line shows the expected tab-stops marked with asterisks.
-+The second data line shows the actual tab-stops, marked with asterisks.
-+.TP 5
-+.B -n
-+This option tells \fBtabs\fP to check the options and run any debugging
-+option, but not to modify the terminal settings.
-+.PP
-+The \fBtabs\fP program processes a single list of tab stops.
-+The last option to be processed which defines a list is the one that
-+determines the list to be processed.
-+.SS Implicit Lists
-+Use a single number as an option, e.g., "\fB-5\fP" to set tabs at the given
-+interval (in this case 1, 6, 11, 16, 21, etc.).  Tabs are repeated up to
-+the right margin of the screen.
-+.SS Explicit Lists
-+An explicit list can be defined after the options (this does not use a "-").
-+The values in the list must be in increasing numeric order, and greater than
-+zero.  They are separated by a comma or a blank, for example,
-+.sp
-+.RS
-+tabs 1,6,11,16,21
-+.br
-+tabs 1 6 11 16 21
-+.RE
-+Use a '+' to treat a number as an increment relative to the previous value,
-+e.g.,
-+.sp
-+.RS
-+tabs 1,+5,+5,+5,+5
-+.RE
-+which is equivalent to the 1,6,11,16,21 example.
-+.SS Predefined Tab-Stops
-+X/Open defines several predefined lists of tab stops.
-+.TP 5
-+.B -a
-+Assembler, IBM S/370, first format
-+.TP 5
-+.B -a2
-+Assembler, IBM S/370, second format
-+.TP 5
-+.B -c
-+COBOL, normal format
-+.TP 5
-+.B -c2
-+COBOL compact format
-+.TP 5
-+.B -c3
-+COBOL compact format extended
-+.TP 5
-+.B -f
-+FORTRAN
-+.TP 5
-+.B -p
-+PL/I
-+.TP 5
-+.B -s
-+SNOBOL
-+.TP 5
-+.B -u
-+UNIVAC 1100 Assembler
-+.SH PORTABILITY
-+.PP
-+X/Open describes a \fB+m\fP option, to set a terminal's left-margin.
-+None of the entries in the terminal database provide this capability.
-+.PP
-+The \fB-d\fP (debug) and \fB-n\fP (no-op) options are extensions not provided
-+by other implementations.
-+.PP
-+Documentation for other implementations states that there is a limit on the
-+number of tab stops.  While some terminals may not accept an arbitrary number
-+of tab stops, this implementation will attempt to set tab stops up to the
-+right margin of the screen, if the given list happens to be that long.
-+.SH SEE ALSO
-+\fB@TSET@\fR(1),
-+\fB@INFOCMP@\fR(1M),
-+\fBcurses\fR(3X),
-+\fBterminfo\fR(\*n).
-+.PP
-+This describes \fBncurses\fR
-+version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).
-+.\"#
-+.\"# The following sets edit modes for GNU EMACS
-+.\"# Local Variables:
-+.\"# mode:nroff
-+.\"# fill-column:79
-+.\"# End:
-diff -Naur ncurses-5.7.orig/man/tset.1 ncurses-5.7/man/tset.1
---- ncurses-5.7.orig/man/tset.1	2006-12-24 07:00:30.000000000 -0800
-+++ ncurses-5.7/man/tset.1	2009-07-19 15:01:56.000000000 -0700
-@@ -1,5 +1,5 @@
- .\"***************************************************************************
--.\" Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
-+.\" Copyright (c) 1998-2006,2008 Free Software Foundation, Inc.              *
- .\"                                                                          *
- .\" Permission is hereby granted, free of charge, to any person obtaining a  *
- .\" copy of this software and associated documentation files (the            *
-@@ -26,8 +26,8 @@
- .\" authorization.                                                           *
- .\"***************************************************************************
- .\"
--.\" $Id: tset.1,v 1.19 2006/12/24 15:00:30 tom Exp $
--.TH tset 1 ""
-+.\" $Id: tset.1,v 1.20 2008/11/15 23:14:06 tom Exp $
-+.TH @TSET@ 1 ""
- .SH NAME
- \fBtset\fR, \fBreset\fR - terminal initialization
- .SH SYNOPSIS
-diff -Naur ncurses-5.7.orig/MANIFEST ncurses-5.7/MANIFEST
---- ncurses-5.7.orig/MANIFEST	2008-10-25 16:47:24.000000000 -0700
-+++ ncurses-5.7/MANIFEST	2009-07-19 15:04:15.000000000 -0700
-@@ -172,6 +172,7 @@
- ./Makefile.os2
- ./NEWS
- ./README
-+./README.MinGW
- ./README.emx
- ./TO-DO
- ./aclocal.m4
-@@ -479,6 +480,7 @@
- ./form/fty_alnum.c
- ./form/fty_alpha.c
- ./form/fty_enum.c
-+./form/fty_generic.c
- ./form/fty_int.c
- ./form/fty_ipv4.c
- ./form/fty_num.c
-@@ -507,11 +509,13 @@
- ./include/hashed_db.h
- ./include/headers
- ./include/nc_alloc.h
-+./include/nc_mingw.h
- ./include/nc_panel.h
- ./include/nc_tparm.h
- ./include/ncurses_cfg.hin
- ./include/ncurses_defs
--./include/ncurses_dll.h
-+./include/ncurses_dll.h.in
-+./include/ncurses_mingw.h
- ./include/term_entry.h
- ./include/termcap.h.in
- ./include/tic.h
-@@ -640,6 +644,7 @@
- ./man/ncurses.3x
- ./man/panel.3x
- ./man/resizeterm.3x
-+./man/tabs.1
- ./man/term.5
- ./man/term.7
- ./man/terminfo.head
-@@ -694,6 +699,7 @@
- ./misc/emx.src
- ./misc/form.def
- ./misc/form.ref
-+./misc/gen-pkgconfig.in
- ./misc/gen_edit.sh
- ./misc/jpf-indent
- ./misc/makedef.cmd
-@@ -718,6 +724,7 @@
- ./mk-0th.awk
- ./mk-1st.awk
- ./mk-2nd.awk
-+./mk-dlls.sh
- ./mk-hdr.awk
- ./mkdirs.sh
- ./ncurses/Makefile.in
-@@ -748,6 +755,7 @@
- ./ncurses/base/lib_delch.c
- ./ncurses/base/lib_delwin.c
- ./ncurses/base/lib_dft_fgbg.c
-+./ncurses/base/lib_driver.c
- ./ncurses/base/lib_echo.c
- ./ncurses/base/lib_endwin.c
- ./ncurses/base/lib_erase.c
-@@ -817,6 +825,7 @@
- ./ncurses/fifo_defs.h
- ./ncurses/llib-lncurses
- ./ncurses/llib-lncursest
-+./ncurses/llib-lncursestw
- ./ncurses/llib-lncursesw
- ./ncurses/modules
- ./ncurses/tinfo/MKcaptab.awk
-@@ -870,6 +879,7 @@
- ./ncurses/tinfo/read_termcap.c
- ./ncurses/tinfo/setbuf.c
- ./ncurses/tinfo/strings.c
-+./ncurses/tinfo/tinfo_driver.c
- ./ncurses/tinfo/trim_sgr0.c
- ./ncurses/tinfo/use_screen.c
- ./ncurses/tinfo/write_entry.c
-@@ -915,6 +925,8 @@
- ./ncurses/widechar/lib_vline_set.c
- ./ncurses/widechar/lib_wacs.c
- ./ncurses/widechar/lib_wunctrl.c
-+./ncurses/win32con/gettimeofday.c
-+./ncurses/win32con/win_driver.c
- ./panel/Makefile.in
- ./panel/headers
- ./panel/llib-lpanel
-@@ -947,9 +959,11 @@
- ./progs/infocmp.c
- ./progs/modules
- ./progs/progs.priv.h
-+./progs/tabs.c
- ./progs/tic.c
- ./progs/toe.c
- ./progs/tput.c
-+./progs/transform.c
- ./progs/tset.c
- ./tar-copy.sh
- ./test/Makefile.in
-@@ -963,6 +977,7 @@
- ./test/cardfile.c
- ./test/cardfile.dat
- ./test/chgat.c
-+./test/clip_printw.c
- ./test/color_set.c
- ./test/configure
- ./test/configure.in
-@@ -973,6 +988,7 @@
- ./test/demo_menus.c
- ./test/demo_panels.c
- ./test/demo_termcap.c
-+./test/demo_terminfo.c
- ./test/ditto.c
- ./test/dots.c
- ./test/dots_mvcur.c
-@@ -990,6 +1006,7 @@
- ./test/inch_wide.c
- ./test/inchs.c
- ./test/ins_wide.c
-+./test/insdelln.c
- ./test/inserts.c
- ./test/key_names.c
- ./test/keynames.c
-diff -Naur ncurses-5.7.orig/menu/Makefile.in ncurses-5.7/menu/Makefile.in
---- ncurses-5.7.orig/menu/Makefile.in	2007-04-28 07:56:11.000000000 -0700
-+++ ncurses-5.7/menu/Makefile.in	2009-07-19 15:03:48.000000000 -0700
-@@ -1,6 +1,6 @@
--# $Id: Makefile.in,v 1.48 2007/04/28 14:56:11 tom Exp $
-+# $Id: Makefile.in,v 1.50 2009/03/28 18:22:39 Charles.Wilson Exp $
- ##############################################################################
--# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.                #
-+# Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.                #
- #                                                                            #
- # Permission is hereby granted, free of charge, to any person obtaining a    #
- # copy of this software and associated documentation files (the "Software"), #
-@@ -63,6 +63,7 @@
- LIBTOOL_LINK	= @LIB_LINK@
- LIBTOOL_INSTALL	= @LIB_INSTALL@
- LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
-+LT_UNDEF	= @LT_UNDEF@
- 
- INSTALL		= @INSTALL@
- INSTALL_LIB	= @INSTALL@ @INSTALL_LIB@
-@@ -70,7 +71,7 @@
- INSTALL_DATA	= @INSTALL_DATA@
- 
- AR		= @AR@
--AR_OPTS		= @AR_OPTS@
-+ARFLAGS		= @ARFLAGS@
- AWK		= @AWK@
- LD		= @LD@
- LN_S		= @LN_S@
-diff -Naur ncurses-5.7.orig/menu/m_attribs.c ncurses-5.7/menu/m_attribs.c
---- ncurses-5.7.orig/menu/m_attribs.c	2004-12-11 15:29:12.000000000 -0800
-+++ ncurses-5.7/menu/m_attribs.c	2009-07-19 15:03:51.000000000 -0700
-@@ -37,7 +37,7 @@
- 
- #include "menu.priv.h"
- 
--MODULE_ID("$Id: m_attribs.c,v 1.14 2004/12/11 23:29:12 tom Exp $")
-+MODULE_ID("$Id: m_attribs.c,v 1.15 2008/11/16 00:19:59 juergen Exp $")
- 
- /* Macro to redraw menu if it is posted and changed */
- #define Refresh_Menu(menu) \
-@@ -49,9 +49,9 @@
- 
- /* "Template" macro to generate a function to set a menus attribute */
- #define GEN_MENU_ATTR_SET_FCT( name ) \
--NCURSES_IMPEXP int NCURSES_API set_menu_ ## name (MENU * menu, chtype attr)\
-+NCURSES_IMPEXP int NCURSES_API set_menu_ ## name (MENU* menu, chtype attr) \
- {\
--   T((T_CALLED("set_menu_" #name "(%p,%s)"), menu, _traceattr(attr)));\
-+  T((T_CALLED("set_menu_" #name "(%p,%s)"), menu, _traceattr(attr))); \
-    if (!(attr==A_NORMAL || (attr & A_ATTRIBUTES)==attr))\
-       RETURN(E_BAD_ARGUMENT);\
-    if (menu && ( menu -> name != attr))\
-@@ -140,4 +140,5 @@
- |   Return Values :  Attribute value
- +--------------------------------------------------------------------------*/
- GEN_MENU_ATTR_GET_FCT(grey)
-+
- /* m_attribs.c ends here */
-diff -Naur ncurses-5.7.orig/menu/m_cursor.c ncurses-5.7/menu/m_cursor.c
---- ncurses-5.7.orig/menu/m_cursor.c	2005-10-22 16:03:32.000000000 -0700
-+++ ncurses-5.7/menu/m_cursor.c	2009-07-19 15:02:23.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -37,7 +37,7 @@
- 
- #include "menu.priv.h"
- 
--MODULE_ID("$Id: m_cursor.c,v 1.20 2005/10/22 23:03:32 tom Exp $")
-+MODULE_ID("$Id: m_cursor.c,v 1.21 2009/02/28 21:02:46 juergen Exp $")
- 
- /*---------------------------------------------------------------------------
- |   Facility      :  libnmenu
-@@ -90,7 +90,7 @@
- 
-   if (E_OK == err)
-     {
--      win = menu->userwin ? menu->userwin : stdscr;
-+      win = Get_Menu_UserWin(menu);
-       sub = menu->usersub ? menu->usersub : win;
-       assert(win && sub);
- 
-diff -Naur ncurses-5.7.orig/menu/m_driver.c ncurses-5.7/menu/m_driver.c
---- ncurses-5.7.orig/menu/m_driver.c	2008-08-03 15:08:22.000000000 -0700
-+++ ncurses-5.7/menu/m_driver.c	2009-07-19 15:02:23.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2005,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -37,7 +37,7 @@
- 
- #include "menu.priv.h"
- 
--MODULE_ID("$Id: m_driver.c,v 1.27 2008/08/03 22:08:22 tom Exp $")
-+MODULE_ID("$Id: m_driver.c,v 1.28 2009/02/28 21:02:46 juergen Exp $")
- 
- /* Macros */
- 
-@@ -197,7 +197,7 @@
- 
- /*---------------------------------------------------------------------------
- |   Facility      :  libnmenu
--|   Function      :  int menu_driver(MENU *menu, int c)
-+|   Function      :  int menu_driver(MENU* menu, int c)
- |
- |   Description   :  Central dispatcher for the menu. Translates the logical
- |                    request 'c' into a menu action.
-diff -Naur ncurses-5.7.orig/menu/menu.h ncurses-5.7/menu/menu.h
---- ncurses-5.7.orig/menu/menu.h	2007-02-24 09:32:13.000000000 -0800
-+++ ncurses-5.7/menu/menu.h	2009-07-19 15:03:51.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2003,2007 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -30,7 +30,7 @@
-  *   Author:  Juergen Pfeifer, 1995,1997                                    *
-  ****************************************************************************/
- 
--/* $Id: menu.h,v 1.19 2007/02/24 17:32:13 tom Exp $ */
-+/* $Id: menu.h,v 1.20 2009/04/05 00:28:07 tom Exp $ */
- 
- #ifndef ETI_MENU
- #define ETI_MENU
-@@ -249,6 +249,10 @@
- 
- extern NCURSES_EXPORT(void)	menu_format (const MENU *,int *,int *);
- 
-+#if NCURSES_SP_FUNCS
-+extern NCURSES_EXPORT(MENU *)	NCURSES_SP_NAME(new_menu) (SCREEN*, ITEM **);
-+#endif
-+
- #ifdef __cplusplus
-   }
- #endif
-diff -Naur ncurses-5.7.orig/menu/menu.priv.h ncurses-5.7/menu/menu.priv.h
---- ncurses-5.7.orig/menu/menu.priv.h	2005-01-15 17:02:23.000000000 -0800
-+++ ncurses-5.7/menu/menu.priv.h	2009-07-19 15:02:23.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -30,7 +30,7 @@
-  *   Author:  Juergen Pfeifer, 1995,1997                                    *
-  ****************************************************************************/
- 
--/* $Id: menu.priv.h,v 1.22 2005/01/16 01:02:23 tom Exp $ */
-+/* $Id: menu.priv.h,v 1.23 2009/02/28 21:02:57 juergen Exp $ */
- 
- /***************************************************************************
- * Module menu.priv.h                                                       *
-@@ -56,8 +56,12 @@
- /* Normalize menu to default if none was given */
- #define Normalize_Menu( menu ) ((menu)=(menu)?(menu):&_nc_Default_Menu)
- 
-+#define Get_Menu_Screen( menu ) (menu->userwin ? \
-+				 _nc_screen_of(menu->userwin) : CURRENT_SCREEN)
-+
- /* Get the user defined (framing) window of the menu */
--#define Get_Menu_UserWin(menu) ((menu)->userwin ? (menu)->userwin : stdscr)
-+#define Get_Menu_UserWin(menu) ((menu)->userwin ? \
-+    (menu)->userwin : CURRENT_SCREEN->_stdscr)
- 
- /* Normalize menu window */
- #define Get_Menu_Window(  menu ) \
-diff -Naur ncurses-5.7.orig/menu/m_global.c ncurses-5.7/menu/m_global.c
---- ncurses-5.7.orig/menu/m_global.c	2005-12-31 13:51:52.000000000 -0800
-+++ ncurses-5.7/menu/m_global.c	2009-07-19 15:02:23.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -37,7 +37,7 @@
- 
- #include "menu.priv.h"
- 
--MODULE_ID("$Id: m_global.c,v 1.23 2005/12/31 21:51:52 tom Exp $")
-+MODULE_ID("$Id: m_global.c,v 1.24 2009/02/28 21:02:46 juergen Exp $")
- 
- static char mark[] = "-";
- /* *INDENT-OFF* */
-@@ -496,7 +496,7 @@
- 
- /*---------------------------------------------------------------------------
- |   Facility      :  libnmenu  
--|   Function      :  void _nc_Show_Menu(const MENU *menu)
-+|   Function      :  void _nc_Show_Menu(const MENU* menu)
- |   
- |   Description   :  Update the window that is associated with the menu
- |
-@@ -543,8 +543,10 @@
- |   Return Values :  -
- +--------------------------------------------------------------------------*/
- NCURSES_EXPORT(void)
--  _nc_New_TopRow_and_CurrentItem
--  (MENU * menu, int new_toprow, ITEM * new_current_item)
-+_nc_New_TopRow_and_CurrentItem(
-+				MENU * menu,
-+				int new_toprow,
-+				ITEM * new_current_item)
- {
-   ITEM *cur_item;
-   bool mterm_called = FALSE;
-diff -Naur ncurses-5.7.orig/menu/m_new.c ncurses-5.7/menu/m_new.c
---- ncurses-5.7.orig/menu/m_new.c	2006-11-04 11:04:06.000000000 -0800
-+++ ncurses-5.7/menu/m_new.c	2009-07-19 15:03:51.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2004,2006 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -37,11 +37,11 @@
- 
- #include "menu.priv.h"
- 
--MODULE_ID("$Id: m_new.c,v 1.18 2006/11/04 19:04:06 tom Exp $")
-+MODULE_ID("$Id: m_new.c,v 1.19 2009/04/05 00:32:13 tom Exp $")
- 
- /*---------------------------------------------------------------------------
- |   Facility      :  libnmenu  
--|   Function      :  MENU *new_menu(ITEM **items)
-+|   Function      :  MENU* _nc_new_menu(SCREEN*, ITEM **items)
- |   
- |   Description   :  Creates a new menu connected to the item pointer
- |                    array items and returns a pointer to the new menu.
-@@ -51,18 +51,25 @@
- |   Return Values :  NULL on error
- +--------------------------------------------------------------------------*/
- NCURSES_EXPORT(MENU *)
--new_menu(ITEM ** items)
-+NCURSES_SP_NAME(new_menu) (NCURSES_SP_DCLx ITEM ** items)
- {
-   int err = E_SYSTEM_ERROR;
-   MENU *menu = (MENU *) calloc(1, sizeof(MENU));
- 
--  T((T_CALLED("new_menu(%p)"), items));
-+  T((T_CALLED("new_menu(%p,%p)"), SP_PARM, items));
-   if (menu)
-     {
-       *menu = _nc_Default_Menu;
-       menu->status = 0;
-       menu->rows = menu->frows;
-       menu->cols = menu->fcols;
-+#if NCURSES_SP_FUNCS
-+      /* This ensures userwin and usersub are always non-null,
-+         so we can derive always the SCREEN that this menu is
-+         running on. */
-+      menu->userwin = SP_PARM->_stdscr;
-+      menu->usersub = SP_PARM->_stdscr;
-+#endif
-       if (items && *items)
- 	{
- 	  if (!_nc_Connect_Items(menu, items))
-@@ -71,6 +78,8 @@
- 	      free(menu);
- 	      menu = (MENU *) 0;
- 	    }
-+	  else
-+	    err = E_OK;
- 	}
-     }
- 
-@@ -82,6 +91,25 @@
- 
- /*---------------------------------------------------------------------------
- |   Facility      :  libnmenu  
-+|   Function      :  MENU *new_menu(ITEM **items)
-+|   
-+|   Description   :  Creates a new menu connected to the item pointer
-+|                    array items and returns a pointer to the new menu.
-+|                    The new menu is initialized with the values from the
-+|                    default menu.
-+|
-+|   Return Values :  NULL on error
-++--------------------------------------------------------------------------*/
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(MENU *)
-+new_menu(ITEM ** items)
-+{
-+  return NCURSES_SP_NAME(new_menu) (CURRENT_SCREEN, items);
-+}
-+#endif
-+
-+/*---------------------------------------------------------------------------
-+|   Facility      :  libnmenu  
- |   Function      :  int free_menu(MENU *menu)  
- |   
- |   Description   :  Disconnects menu from its associated item pointer 
-diff -Naur ncurses-5.7.orig/menu/m_pad.c ncurses-5.7/menu/m_pad.c
---- ncurses-5.7.orig/menu/m_pad.c	2004-12-25 13:40:58.000000000 -0800
-+++ ncurses-5.7/menu/m_pad.c	2009-07-19 15:03:51.000000000 -0700
-@@ -37,19 +37,19 @@
- 
- #include "menu.priv.h"
- 
--MODULE_ID("$Id: m_pad.c,v 1.10 2004/12/25 21:40:58 tom Exp $")
-+MODULE_ID("$Id: m_pad.c,v 1.11 2009/02/07 23:11:44 tom Exp $")
- 
- /* Macro to redraw menu if it is posted and changed */
- #define Refresh_Menu(menu) \
-    if ( (menu) && ((menu)->status & _POSTED) )\
-    {\
-       _nc_Draw_Menu( menu );\
--      _nc_Show_Menu( menu );\
-+      _nc_Show_Menu( menu ); \
-    }
- 
- /*---------------------------------------------------------------------------
- |   Facility      :  libnmenu  
--|   Function      :  int set_menu_pad(MENU *menu, int pad)
-+|   Function      :  int set_menu_pad(MENU* menu, int pad)
- |   
- |   Description   :  Set the character to be used to separate the item name
- |                    from its description. This must be a printable 
-diff -Naur ncurses-5.7.orig/menu/m_post.c ncurses-5.7/menu/m_post.c
---- ncurses-5.7.orig/menu/m_post.c	2004-12-25 15:57:04.000000000 -0800
-+++ ncurses-5.7/menu/m_post.c	2009-07-19 15:02:23.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2004,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -37,7 +37,7 @@
- 
- #include "menu.priv.h"
- 
--MODULE_ID("$Id: m_post.c,v 1.26 2004/12/25 23:57:04 tom Exp $")
-+MODULE_ID("$Id: m_post.c,v 1.27 2009/02/28 21:02:46 juergen Exp $")
- 
- /*---------------------------------------------------------------------------
- |   Facility      :  libnmenu
-@@ -255,7 +255,7 @@
- 
- /*---------------------------------------------------------------------------
- |   Facility      :  libnmenu
--|   Function      :  int post_menu(MENU *)
-+|   Function      :  int post_menu(MENU* menu)
- |
- |   Description   :  Post a menu to the screen. This makes it visible.
- |
-@@ -329,7 +329,7 @@
- 
- /*---------------------------------------------------------------------------
- |   Facility      :  libnmenu
--|   Function      :  int unpost_menu(MENU *)
-+|   Function      :  int unpost_menu(MENU*)
- |
- |   Description   :  Detach menu from screen
- |
-diff -Naur ncurses-5.7.orig/menu/m_sub.c ncurses-5.7/menu/m_sub.c
---- ncurses-5.7.orig/menu/m_sub.c	2004-12-25 13:38:31.000000000 -0800
-+++ ncurses-5.7/menu/m_sub.c	2009-07-19 15:03:51.000000000 -0700
-@@ -37,7 +37,7 @@
- 
- #include "menu.priv.h"
- 
--MODULE_ID("$Id: m_sub.c,v 1.10 2004/12/25 21:38:31 tom Exp $")
-+MODULE_ID("$Id: m_sub.c,v 1.11 2009/04/05 00:35:51 tom Exp $")
- 
- /*---------------------------------------------------------------------------
- |   Facility      :  libnmenu  
-@@ -57,8 +57,22 @@
-     {
-       if (menu->status & _POSTED)
- 	RETURN(E_POSTED);
--      menu->usersub = win;
--      _nc_Calculate_Item_Length_and_Width(menu);
-+      else
-+#if NCURSES_SP_FUNCS
-+	{
-+	  /* We ensure that usersub is never null. So even if a null
-+	     WINDOW parameter is passed, we store the SCREENS stdscr.
-+	     The only MENU that can have a null usersub is the static
-+	     _nc_default_Menu.
-+	   */
-+	  SCREEN *sp = _nc_screen_of(menu->usersub);
-+
-+	  menu->usersub = win ? win : sp->_stdscr;
-+	  _nc_Calculate_Item_Length_and_Width(menu);
-+	}
-+#else
-+	menu->usersub = win;
-+#endif
-     }
-   else
-     _nc_Default_Menu.usersub = win;
-@@ -68,7 +82,7 @@
- 
- /*---------------------------------------------------------------------------
- |   Facility      :  libnmenu  
--|   Function      :  WINDOW *menu_sub(const MENU *menu)
-+|   Function      :  WINDOW* menu_sub(const MENU *menu)
- |   
- |   Description   :  Returns a pointer to the subwindow of the menu
- |
-diff -Naur ncurses-5.7.orig/menu/m_win.c ncurses-5.7/menu/m_win.c
---- ncurses-5.7.orig/menu/m_win.c	2004-12-25 13:39:20.000000000 -0800
-+++ ncurses-5.7/menu/m_win.c	2009-07-19 15:03:51.000000000 -0700
-@@ -37,7 +37,7 @@
- 
- #include "menu.priv.h"
- 
--MODULE_ID("$Id: m_win.c,v 1.15 2004/12/25 21:39:20 tom Exp $")
-+MODULE_ID("$Id: m_win.c,v 1.16 2009/04/05 00:38:22 tom Exp $")
- 
- /*---------------------------------------------------------------------------
- |   Facility      :  libnmenu  
-@@ -57,8 +57,22 @@
-     {
-       if (menu->status & _POSTED)
- 	RETURN(E_POSTED);
--      menu->userwin = win;
--      _nc_Calculate_Item_Length_and_Width(menu);
-+      else
-+#if NCURSES_SP_FUNCS
-+	{
-+	  /* We ensure that userwin is never null. So even if a null
-+	     WINDOW parameter is passed, we store the SCREENS stdscr.
-+	     The only MENU that can have a null userwin is the static
-+	     _nc_default_Menu.
-+	   */
-+	  SCREEN *sp = _nc_screen_of(menu->userwin);
-+
-+	  menu->userwin = win ? win : sp->_stdscr;
-+	  _nc_Calculate_Item_Length_and_Width(menu);
-+	}
-+#else
-+	menu->userwin = win;
-+#endif
-     }
-   else
-     _nc_Default_Menu.userwin = win;
-@@ -68,7 +82,7 @@
- 
- /*---------------------------------------------------------------------------
- |   Facility      :  libnmenu  
--|   Function      :  WINDOW *menu_win(const MENU *)
-+|   Function      :  WINDOW* menu_win(const MENU*)
- |   
- |   Description   :  Returns pointer to the window of the menu
- |
-@@ -80,7 +94,7 @@
-   const MENU *m = Normalize_Menu(menu);
- 
-   T((T_CALLED("menu_win(%p)"), menu));
--  returnWin(m->userwin ? m->userwin : stdscr);
-+  returnWin(Get_Menu_UserWin(m));
- }
- 
- /* m_win.c ends here */
-diff -Naur ncurses-5.7.orig/misc/gen-pkgconfig.in ncurses-5.7/misc/gen-pkgconfig.in
---- ncurses-5.7.orig/misc/gen-pkgconfig.in	1969-12-31 16:00:00.000000000 -0800
-+++ ncurses-5.7/misc/gen-pkgconfig.in	2009-07-19 15:03:43.000000000 -0700
-@@ -0,0 +1,140 @@
-+#!@SHELL@
-+# $Id: gen-pkgconfig.in,v 1.7 2009/03/14 20:37:54 tom Exp $
-+##############################################################################
-+# Copyright (c) 2009 Free Software Foundation, Inc.                          #
-+#                                                                            #
-+# Permission is hereby granted, free of charge, to any person obtaining a    #
-+# copy of this software and associated documentation files (the "Software"), #
-+# to deal in the Software without restriction, including without limitation  #
-+# the rights to use, copy, modify, merge, publish, distribute, distribute    #
-+# with modifications, sublicense, and/or sell copies of the Software, and to #
-+# permit persons to whom the Software is furnished to do so, subject to the  #
-+# following conditions:                                                      #
-+#                                                                            #
-+# The above copyright notice and this permission notice shall be included in #
-+# all copies or substantial portions of the Software.                        #
-+#                                                                            #
-+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
-+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,   #
-+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL    #
-+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER      #
-+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING    #
-+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER        #
-+# DEALINGS IN THE SOFTWARE.                                                  #
-+#                                                                            #
-+# Except as contained in this notice, the name(s) of the above copyright     #
-+# holders shall not be used in advertising or otherwise to promote the sale, #
-+# use or other dealings in this Software without prior written               #
-+# authorization.                                                             #
-+##############################################################################
-+#
-+# Author: Thomas E. Dickey, 2009
-+#
-+# The complete configure script for ncurses is the ncurses5-config (or similar
-+# name, depending on the flavor, e.g., ncursesw5-config, ncurses6-config, etc).
-+# That provides more information than pkg-config, and is the portable and
-+# recommended solution.
-+#
-+# For each library, generate a ".pc" file which depends on the base ncurses
-+# library, except that the tinfo library does not depend on ncurses.
-+LIB_NAME=@LIB_NAME@
-+TINFO_NAME=@TINFO_NAME@
-+PANEL_NAME=panel # @PANEL_NAME@
-+MENU_NAME=menu # @MENU_NAME@
-+FORM_NAME=form # @FORM_NAME@
-+CXX_NAME=ncurses++ # @CXX_NAME@
-+DFT_DEP_SUFFIX=@DFT_DEP_SUFFIX@
-+CXX_LIB_SUFFIX=@CXX_LIB_SUFFIX@
-+
-+prefix="@prefix@"
-+exec_prefix="@exec_prefix@"
-+includedir="@includedir@"
-+libdir="@libdir@"
-+
-+show_prefix='@prefix@'
-+show_exec_prefix='@exec_prefix@'
-+show_includedir='@includedir@'
-+show_libdir='@libdir@'
-+
-+MAIN_LIBRARY="${LIB_NAME}@DFT_ARG_SUFFIX@"
-+SUB_LIBRARY="${TINFO_NAME}@DFT_ARG_SUFFIX@"
-+PANEL_LIBRARY="${PANEL_NAME}@DFT_ARG_SUFFIX@"
-+MENU_LIBRARY="${MENU_NAME}@DFT_ARG_SUFFIX@"
-+FORM_LIBRARY="${FORM_NAME}@DFT_ARG_SUFFIX@"
-+
-+SUB_LIBRARY_REQ=${SUB_LIBRARY}
-+TINFO_NAME_REQ=${TINFO_NAME}
-+if test $TINFO_NAME = $LIB_NAME ; then
-+	SUB_LIBRARY_REQ=
-+	TINFO_NAME_REQ=
-+fi
-+
-+for lib in ../lib/*
-+do
-+	name=`basename $lib`
-+	if test "$name" = "*" ; then
-+		break
-+	fi
-+
-+	root=`basename $name "$DFT_DEP_SUFFIX"`
-+	if test "$name" = "$root" ; then
-+		root=`basename $name "$CXX_LIB_SUFFIX"`
-+		if test "$name" = "$root" ; then
-+			continue
-+		fi
-+	fi
-+
-+	name=`echo "$name" | sed -e 's/^lib//' -e 's/\..*$//'`
-+
-+	desc="ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@"
-+	if test $name = $MAIN_LIBRARY ; then
-+		reqs=$TINFO_NAME_REQ
-+		desc="$desc library"
-+	elif test $name = $SUB_LIBRARY ; then
-+		reqs=
-+		desc="$desc terminal interface library"
-+	elif expr $name : ".*${CXX_NAME}.*" >/dev/null ; then
-+		reqs="$PANEL_LIBRARY $MENU_LIBRARY $FORM_LIBRARY $MAIN_LIBRARY $SUB_LIBRARY_REQ"
-+		desc="$desc add-on library"
-+	else
-+		reqs="$MAIN_LIBRARY $SUB_LIBRARY_REQ"
-+		desc="$desc add-on library"
-+	fi
-+
-+	if test "$includedir" = "/usr/include" ; then
-+		cflags=
-+	else
-+		cflags="-I\${includedir}"
-+	fi
-+
-+	if test "$libdir" = "/usr/lib" ; then
-+		libs=
-+	else
-+		libs="-L\${libdir}"
-+	fi
-+	libs="$libs -l$name"
-+
-+	# add dependencies that pkg-config cannot guess about
-+	if test -z "$reqs" ; then
-+		libs="$libs @LIBS@"
-+	fi
-+
-+	echo "** creating ${name}.pc"
-+	cat >${name}.pc <<EOF
-+prefix=$show_prefix
-+exec_prefix=$show_exec_prefix
-+libdir=$show_libdir
-+includedir=$show_includedir
-+major_version=@NCURSES_MAJOR@
-+version=@NCURSES_MAJOR@.@NCURSES_MINOR@.@NCURSES_PATCH@
-+
-+Name: $name
-+Description: $desc
-+Version: \${version}
-+Requires: $reqs
-+Libs: $libs
-+Cflags: $cflags
-+EOF
-+	# pr -f ${name}.pc
-+done
-+# vile:shmode
-diff -Naur ncurses-5.7.orig/misc/Makefile.in ncurses-5.7/misc/Makefile.in
---- ncurses-5.7.orig/misc/Makefile.in	2007-03-31 08:54:17.000000000 -0700
-+++ ncurses-5.7/misc/Makefile.in	2009-07-19 15:02:18.000000000 -0700
-@@ -1,6 +1,6 @@
--# $Id: Makefile.in,v 1.43 2007/03/31 15:54:17 tom Exp $
-+# $Id: Makefile.in,v 1.51 2009/02/07 18:17:17 Miroslav.Lichvar Exp $
- ##############################################################################
--# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.                #
-+# Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.                #
- #                                                                            #
- # Permission is hereby granted, free of charge, to any person obtaining a    #
- # copy of this software and associated documentation files (the "Software"), #
-@@ -66,15 +66,17 @@
- source		= @TERMINFO_SRC@
- 
- INSTALL		= @INSTALL@
--INSTALL_PROG	= @INSTALL_PROGRAM@
-+INSTALL_PROG	= @INSTALL_SCRIPT@
- INSTALL_DATA	= @INSTALL_DATA@
- 
-+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-+
- ################################################################################
- all :	terminfo.tmp
- 
- depend :
- 
--sources :
-+sources :: terminfo.tmp 
- 
- install : install.data install.libs
- 
-@@ -103,9 +105,17 @@
- 
- NCURSES_CONFIG	= ncurses@DFT_ARG_SUFFIX@@cf_cv_abi_version@-config
- 
--install.libs : $(DESTDIR)$(bindir) ncurses-config
-+install.libs :: $(DESTDIR)$(bindir) ncurses-config
- 	$(INSTALL_PROG) ncurses-config $(DESTDIR)$(bindir)/$(NCURSES_CONFIG)
- 
-+@MAKE_PC_FILES@install.libs :: pc-files $(DESTDIR)$(PKG_CONFIG_LIBDIR)
-+@MAKE_PC_FILES@	$(SHELL) -c 'for name in *.pc; do $(INSTALL_DATA) $$name $(DESTDIR)$(PKG_CONFIG_LIBDIR)/$$name; done'
-+
-+@MAKE_PC_FILES@sources :: pc-files
-+@MAKE_PC_FILES@pc-files :
-+@MAKE_PC_FILES@	$(SHELL) ./gen-pkgconfig
-+@MAKE_PC_FILES@	touch $@
-+
- terminfo.tmp : run_tic.sed $(source)
- 	echo '** adjusting tabset paths'
- 	sed -f run_tic.sed $(source) >terminfo.tmp
-@@ -118,7 +128,8 @@
- $(DESTDIR)$(bindir) \
- $(DESTDIR)$(libdir) \
- $(DESTDIR)$(datadir) \
--$(DESTDIR)$(tabsetdir) :
-+$(DESTDIR)$(tabsetdir) \
-+$(DESTDIR)$(PKG_CONFIG_LIBDIR) :
- 	$(SHELL) $(top_srcdir)/mkdirs.sh $@
- 
- uninstall : uninstall.data uninstall.libs
-@@ -130,6 +141,7 @@
- 
- uninstall.libs :
- 	-rm -f $(DESTDIR)$(bindir)/$(NCURSES_CONFIG)
-+@MAKE_PC_FILES@	$(SHELL) 'for name in *.pc; do rm -f $(DESTDIR)$(PKG_CONFIG_LIBDIR)/$$name; done'
- 
- tags :
- 
-@@ -138,11 +150,13 @@
- mostlyclean :
- 	-rm -f terminfo.tmp
- 	-rm -f run_tic.sed
-+@MAKE_PC_FILES@	-rm -f *.pc pc-files
- 	-rm -f core tags TAGS *~ *.bak *.ln *.atac trace
- 
- clean :: mostlyclean
- 
- distclean : clean
-+@MAKE_PC_FILES@	-rm -f gen-pkgconfig
- 	-rm -f Makefile run_tic.sh ncurses-config
- 
- realclean : distclean
-diff -Naur ncurses-5.7.orig/misc/ncu-indent ncurses-5.7/misc/ncu-indent
---- ncurses-5.7.orig/misc/ncu-indent	2008-08-03 08:46:44.000000000 -0700
-+++ ncurses-5.7/misc/ncu-indent	2009-07-19 15:02:23.000000000 -0700
-@@ -26,7 +26,7 @@
- #* sale, use or other dealings in this Software without prior written       *
- #* authorization.                                                           *
- #****************************************************************************/
--# $Id: ncu-indent,v 1.17 2008/08/03 15:46:44 tom Exp $
-+# $Id: ncu-indent,v 1.20 2009/02/21 20:56:23 tom Exp $
- NOOP=no
- OPTS='
- --blank-lines-after-procedures
-@@ -44,6 +44,8 @@
- --swallow-optional-blank-lines
- --tab-size8
- 
-+-T NCURSES_SP_ARGx
-+-T NCURSES_SP_DCLx
- -T NCURSES_EXPORT_VAR
- -T NCURSES_INLINE
- -T SCREEN
-@@ -88,11 +90,12 @@
- 		mv "$name" "$save"
- 		sed \
- 			-e '/EMPTY_MODULE(/s/)$/);/' \
-+			-e 's,\(MODULEID(\),//\1,' \
- 			-e '/MODULE_ID(/s/)$/);/' \
- 			-e 's,\<GCC_NORETURN;,;//GCC_NORETURN;,' \
- 			-e 's,\<GCC_PRINTFLIKE(,;//GCC_PRINTFLIKE(,' \
- 			-e 's,\<GCC_SCANFLIKE(,;//GCC_SCANFLIKE(,' \
--			-e 's,\(\<NCURSES_EXPORT_VAR\>\),//\1,' \
-+			-e 's,\(\<NCURSES_EXPORT_VAR\>.*;\),//\1,' \
- 			"$save" >"$test"
- 		cp "$test" "$name"
- 		chmod u+w "$name"
-@@ -100,11 +103,12 @@
- 		${INDENT_PROG-indent} -npro $OPTS "$name"
- 		sed \
- 			-e '/EMPTY_MODULE(/s/);$/)/' \
-+			-e 's,//\(MODULEID(\),\1,' \
- 			-e '/MODULE_ID(/s/);$/)/' \
- 			-e 's,;[ 	]*//GCC_NORETURN;, GCC_NORETURN;,' \
- 			-e 's,;[ 	]*//GCC_PRINTFLIKE(, GCC_PRINTFLIKE(,' \
- 			-e 's,;[ 	]*//GCC_SCANFLIKE(, GCC_SCANFLIKE(,' \
--			-e 's,//\(\<NCURSES_EXPORT_VAR\>\),\1,' \
-+			-e 's,//\(\<NCURSES_EXPORT_VAR\>[ ]*\),\1,' \
- 			"$name" >"$test"
- 		mv "$test" "$name"
- 		rm -f "${name}~"
-diff -Naur ncurses-5.7.orig/misc/ncurses-config.in ncurses-5.7/misc/ncurses-config.in
---- ncurses-5.7.orig/misc/ncurses-config.in	2007-03-17 13:02:19.000000000 -0700
-+++ ncurses-5.7/misc/ncurses-config.in	2009-07-19 15:03:43.000000000 -0700
-@@ -1,7 +1,7 @@
- #!@SHELL@
--# $Id: ncurses-config.in,v 1.12 2007/03/17 20:02:19 tom Exp $
-+# $Id: ncurses-config.in,v 1.23 2009/03/14 19:20:57 Charles.Wilson Exp $
- ##############################################################################
--# Copyright (c) 2006,2007 Free Software Foundation, Inc.                     #
-+# Copyright (c) 2006-2007,2009 Free Software Foundation, Inc.                #
- #                                                                            #
- # Permission is hereby granted, free of charge, to any person obtaining a    #
- # copy of this software and associated documentation files (the "Software"), #
-@@ -28,67 +28,70 @@
- # authorization.                                                             #
- ##############################################################################
- #
--# Author: Thomas E. Dickey, 2006
-+# Author: Thomas E. Dickey, 2006-on
- 
- prefix="@prefix@"
- exec_prefix="@exec_prefix@"
- 
- bindir="@bindir@"
-+includedir="@includedir@"
- libdir="@libdir@"
- datadir="@datadir@"
- mandir="@mandir@"
- 
--THIS="ncurses@DFT_ARG_SUFFIX@"
-+THIS="@LIB_NAME@@DFT_ARG_SUFFIX@"
-+TINFO_LIB="@TINFO_NAME@@DFT_ARG_SUFFIX@"
- 
- LANG=C;		export LANG
- LANGUAGE=C;	export LANGUAGE
- LC_ALL=C;	export LC_ALL
- LC_CTYPE=C;	export LC_CTYPE
- 
--test $# = 0 && exec @SHELL@ $0 --error
--
--while test $# -gt 0; do
--	case "$1" in
--	-*=*)
--		ARG=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'`
--		;;
--	*)
--		ARG=
-+# with --disable-overwrite, we installed into a subdirectory, but transformed
-+# the headers to include like this:
-+#	<ncurses@LIB_SUFFIX@/curses.h>
-+if test x@WITH_OVERWRITE@ = xno ; then
-+	case $includedir in
-+	$prefix/include/ncurses@LIB_SUFFIX@)
-+		includedir=`echo "$includedir" | sed -e 's,/[^/]*$,,'`
- 		;;
- 	esac
-+fi
-+
-+test $# = 0 && exec @SHELL@ $0 --error
- 
-+while test $# -gt 0; do
- 	case "$1" in
- 	# basic configuration
--	--prefix=*)
--		prefix="$ARG"
--		test -z "$exec_prefix" && exec_prefix="$ARG"
--		;;
- 	--prefix)
- 		echo "$prefix"
- 		;;
--	--exec-prefix=*)
--		exec_prefix="$ARG"
--		;;
- 	--exec-prefix)
- 		echo "$exec_prefix"
- 		;;
- 	# compile/link
- 	--cflags)
- 		INCS=
--		if test "${prefix}/include" != /usr/include ; then
--			INCS="-I${prefix}/include"
-+		if test "${includedir}" != /usr/include ; then
-+			INCS="-I${includedir}"
- 		fi
--		if test "@WITH_OVERWRITE@" != no ; then
--			INCS="$INCS -I${prefix}/include/${THIS}"
-+		if test "x@WITH_OVERWRITE@" = xno ; then
-+			INCS="$INCS -I${includedir}/${THIS}"
- 		fi
- 		sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO
- 			$INCS
- ENDECHO
- 		;;
- 	--libs)
-+		if test @TINFO_NAME@ = @LIB_NAME@ ; then
- 		sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO
--			-L${exec_prefix}/lib @EXTRA_LDFLAGS@ -l${THIS} @LIBS@
-+			-L$libdir @EXTRA_LDFLAGS@ -l${THIS} @LIBS@
- ENDECHO
-+		else
-+		sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO
-+			-L$libdir @EXTRA_LDFLAGS@ -l${THIS} -l${TINFO_LIB} @LIBS@
-+ENDECHO
-+		fi
- 		;;
- 	# identification
- 	--version)
-@@ -107,6 +110,9 @@
- 	--datadir)
- 		echo "${datadir}"
- 		;;
-+	--includedir)
-+		echo "${includedir}"
-+		;;
- 	--libdir)
- 		echo "${libdir}"
- 		;;
-@@ -129,9 +135,7 @@
- 
- Options:
-   --prefix           echos the package-prefix of ${THIS}
--  --prefix=ARG       sets the package-prefix of ${THIS}
-   --exec-prefix      echos the executable-prefix of ${THIS}
--  --exec-prefix=ARG  sets the executable-prefix of ${THIS}
- 
-   --cflags           echos the C compiler flags needed to compile with ${THIS}
-   --libs             echos the libraries needed to link with ${THIS}
-@@ -142,6 +146,7 @@
- 
-   --bindir           echos the directory containing ${THIS} programs
-   --datadir          echos the directory containing ${THIS} data
-+  --includedir       echos the directory containing ${THIS} header files
-   --libdir           echos the directory containing ${THIS} libraries
-   --mandir           echos the directory containing ${THIS} manpages
-   --terminfo         echos the \$TERMINFO terminfo database path
-diff -Naur ncurses-5.7.orig/misc/terminfo.src ncurses-5.7/misc/terminfo.src
---- ncurses-5.7.orig/misc/terminfo.src	2008-10-12 16:03:54.000000000 -0700
-+++ ncurses-5.7/misc/terminfo.src	2009-07-19 15:03:58.000000000 -0700
-@@ -6,8 +6,8 @@
- # Report bugs and new terminal descriptions to
- #	bug-ncurses@gnu.org
- #
--#	$Revision: 1.341 $
--#	$Date: 2008/10/12 23:03:54 $
-+#	$Revision: 1.348 $
-+#	$Date: 2009/05/02 22:23:20 $
- #
- # The original header is preserved below for reference.  It is noted that there
- # is a "newer" version which differs in some cosmetic details (but actually
-@@ -340,7 +340,7 @@
- 	cub=\E[%p1%dD, cud=\E[%p1%dB, cuf=\E[%p1%dC,
- 	cuu=\E[%p1%dA, use=ansi+local1,
- ansi+tabs,
--	cbt=\E[Z, ht=^I, hts=\EH, tbc=\E[2g,
-+	cbt=\E[Z, ht=^I, hts=\EH, tbc=\E[3g,
- ansi+inittabs,
- 	it#8, use=ansi+tabs,
- ansi+erase,
-@@ -545,7 +545,7 @@
- 	cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A,
- 	dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ht=^I,
- 	hts=\EH, il1=\E[L, ind=^J, kbs=^H, kcub1=\E[D, kcud1=\E[B,
--	kcuf1=\E[C, kcuu1=\E[A, khome=\E[H, tbc=\E[2g,
-+	kcuf1=\E[C, kcuu1=\E[A, khome=\E[H, tbc=\E[3g,
- 	use=klone+sgr-dumb,
- pcansi-25-m|pcansi25m|ibm-pc terminal programs with 25 lines (mono mode),
- 	lines#25, use=pcansi-m,
-@@ -576,7 +576,7 @@
- 	kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
- 	kich1=\E[L, mc4=\E[4i, mc5=\E[5i, nel=\r\E[S,
- 	rep=%p1%c\E[%p2%{1}%-%db, rin=\E[%p1%dT, s0ds=\E(B,
--	s1ds=\E)B, s2ds=\E*B, s3ds=\E+B, tbc=\E[2g,
-+	s1ds=\E)B, s2ds=\E*B, s3ds=\E+B, tbc=\E[3g,
- 	vpa=\E[%i%p1%dd, use=pcansi-m,
- 
- ansi+enq|ncurses extension for ANSI ENQ,
-@@ -617,11 +617,45 @@
- 	clear=\E[2J, cub1=^H, cud1=\E[B, cuf1=\E[C,
- 	cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, el=\E[k, home=\E[H,
- 	is2=\E[m\E[?7h, kcub1=^H, kcud1=^J, kcuf1=^L, kcuu1=^K,
--	khome=^^, pfkey=\E[0;%p1%{58}%+%d;%p2"%s", rc=\E[u,
-+	khome=^^, pfkey=\E[0;%p1%{58}%+%d;%p2"%s"p, rc=\E[u,
- 	rmam=\E[?7l, sc=\E[s, smam=\E[?7h, u6=\E[%i%d;%dR,
- 	u7=\E[6n, use=klone+color, use=klone+sgr8,
-+
-+# Keypad:	Home=\0G	Up=\0H	PrPag=\0I
-+#		ka1,kh		kcuu1		kpp,ka3
-+#
-+#		Left=\0K	5=\0L		Right=\0M
-+#		kcub1		kb2		kcuf1
-+#
-+#		End=\0O		Down=\0P	NxPag=\0Q
-+#		kc1,kend	kcud1		kc3,knp
-+#
-+#		Ins=\0R		Del=\0S
-+#		kich1		kdch1
-+#
-+# On keyboard with 12 function keys,
-+#	shifted f-keys: F13-F24
-+#	control f-keys: F25-F36
-+#	alt f-keys:     F37-F48
-+# The shift/control/alt keys do not modify each other, but alt overrides both,
-+# and control overrides shift.
-+#
-+# <pfkey> capability for F1-F48 -TD
- ansi.sys|ANSI.SYS 3.1 and later versions,
--	el=\E[K, use=ansi.sys-old,
-+	el=\E[K, ka1=\0G, ka3=\0I, kb2=\0L, kbs=^H, kc1=\0O, kc3=\0Q,
-+	kcbt=\0^O, kcub1=\0K, kcud1=\0P, kcuf1=\0M, kcuu1=\0H,
-+	kdch1=\0S, kend=\0O, kf1=\0;, kf10=\0D, kf11=\0\205,
-+	kf12=\0\206, kf13=\0T, kf14=\0U, kf15=\0V, kf16=\0W,
-+	kf17=\0X, kf18=\0Y, kf19=\0Z, kf2=\0<, kf20=\0[, kf21=\0\\,
-+	kf22=\0], kf23=\0\207, kf24=\0\210, kf25=\0\^, kf26=\0_,
-+	kf27=\0`, kf28=\0a, kf29=\0b, kf3=\0=, kf30=\0c, kf31=\0d,
-+	kf32=\0e, kf33=\0f, kf34=\0g, kf35=\0\211, kf36=\0\212,
-+	kf37=\0h, kf38=\0i, kf39=\0j, kf4=\0>, kf40=\0k, kf41=\0l,
-+	kf42=\0m, kf43=\0n, kf44=\0o, kf45=\0p, kf46=\0q,
-+	kf47=\0\213, kf48=\0\214, kf5=\0?, kf6=\0@, kf7=\0A, kf8=\0B,
-+	kf9=\0C, khome=\0G, kich1=\0R, knp=\0Q, kpp=\0I,
-+	pfkey=\E[0;%?%p1%{11}%<%t%'\:'%e%?%p1%{13}%<%t%'z'%e%?%p1%{23}%<%t%'G'%e%?%p1%{25}%<%t%'p'%e%?%p1%'#'%<%t%'E'%e%?%p1%'%'%<%t%'f'%e%?%p1%'/'%<%t%'C'%e%{92}%;%;%;%;%;%;%;%p1%+%d;%p2"%s"p,
-+	use=ansi.sys-old,
- 
- #
- # Define IBM PC keypad keys for vi as per MS-Kermit while using ANSI.SYS.
-@@ -1005,7 +1039,7 @@
- 	sc=\E7,
- 	sgr=\E[10m\E[0%?%p1%p3%|%t;7%;%?%p2%t;4%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;%?%p9%t;12%e;10%;%?%p7%t;9%;m,
- 	sgr0=\E[0;10m, smacs=\E[12m, smso=\E[7m, smul=\E[4m,
--	tbc=\E[2g, vpa=\E[%i%p1%dd, use=klone+color,
-+	tbc=\E[3g, vpa=\E[%i%p1%dd, use=klone+color,
- # (pc6300plus: removed ":KM=/usr/lib/ua/kmap.s5:"; renamed BO/EE/CI/CV -- esr)
- pc6300plus|AT&T 6300 plus,
- 	OTbs, am, xon,
-@@ -1416,7 +1450,7 @@
- 	setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
- 	sgr=\E[0%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%;%?%p4%t;5%;%?%p3%p1%|%t;7%;%?%p7%t;9%;m%?%p9%t\016%e\017%;,
- 	sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smso=\E[7m,
--	smul=\E[4m, tbc=\E[2g,
-+	smul=\E[4m, tbc=\E[3g,
- 	tsl=\E7\E1;24r\E[?6l\E[25;%i%p1%dH,
- #
- qansi|QNX ansi with console writes,
-@@ -4285,6 +4319,30 @@
- 	smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, u6=\E[%i%d;%dR,
- 	u7=\E[6n, vpa=\E[%i%p1%dd,
- 
-+#### VWM
-+#
-+# vwmterm is a terminal emulator written for the VWM console window manager
-+#
-+vwmterm|(vwm term),
-+	am, bce, ccc, mir, msgr, npc, xenl, xon,
-+	colors#8, pairs#64,
-+	acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
-+	bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l,
-+	clear=\E[H\E[J, cnorm=\E[?25h, cr=^M, cub1=^H,
-+	cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH,
-+	cvvis=\E[?25h, dim=\E[2m, ed=\E[J, el=\E[K, home=\E[H,
-+	il1=\E[L, ind=^J, invis=\E[8m, kcub1=\E[D, kcud1=\E[B,
-+	kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kend=\E[4~, kf1=\E[[A,
-+	kf10=\E[21~, kf11=\E[22~, kf12=\E[23~, kf2=\E[[B,
-+	kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, kf6=\E[17~, kf7=\E[18~,
-+	kf8=\E[19~, kf9=\E[20~, khome=\E[1~, knp=\E[6~, kpp=\E[5~,
-+	rev=\E[7m, rmacs=\E[10m, rmam=\E[?7l, rmcup=\E[?1049l,
-+	rs1=\E[H\E[J\E[m\Ec, setab=\E[4%p1%dm,
-+	setaf=\E[3%p1%dm,
-+	sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;11%;m,
-+	sgr0=\E[0;10m, smacs=\E[11m, smam=\E[?7h,
-+	smcup=\E[?1049h, smso=\E[3m, smul=\E[4m,
-+
- #### MGR
- #
- # MGR is a Bell Labs window system lighter-weight than X.
-@@ -4357,6 +4415,26 @@
- 	sgr0=\E[m, smcup=\E7\E[?47h, smir=\E[4h, smso=\E[7m,
- 	smul=\E[4m,
- 
-+# The codes supported by the term.el terminal emulation in GNU Emacs 22.2
-+eterm-color|Emacs term.el terminal emulator term-protocol-version 0.96,
-+	am, mir, msgr, xenl,
-+	colors#8, cols#80, lines#24, pairs#64,
-+	bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, cr=^M,
-+	csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
-+	cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
-+	cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
-+	dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J,
-+	el=\E[K, el1=\E[1K, home=\E[H, ht=^I, ich=\E[%p1%d@,
-+	il=\E[%p1%dL, il1=\E[L, ind=^J, invis=\E[8m, kbs=\177,
-+	kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
-+	kdch1=\E[3~, kend=\E[4~, khome=\E[1~, kich1=\E[2~,
-+	knp=\E[6~, kpp=\E[5~, op=\E[39;49m, rc=\E8, rev=\E[7m,
-+	ri=\EM, rmir=\E[4l, rmso=\E[27m, rmul=\E[24m, rs1=\Ec,
-+	sc=\E7, setab=\E[%p1%'('%+%dm, setaf=\E[%p1%{30}%+%dm,
-+	sgr=\E[0%?%p1%p3%|%t;7%;%?%p2%t;4%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;m,
-+	sgr0=\E[m, smir=\E[4h, smso=\E[7m, smul=\E[4m,
-+	u6=\E[%i%d;%dR, u7=\E[6n,
-+
- # Entries for use by the `screen' program by Juergen Weigert,
- # Michael Schroeder, Oliver Laumann.  The screen and
- # screen-w entries came with version 3.7.1.  The screen2 and screen3 entries
-@@ -4497,6 +4575,8 @@
- 	cvvis@, flash@, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC,
- 	kcuu1=\EOA, use=screen+fkeys, use=vt100+enq,
- 	use=rxvt+pcfkeys, use=vt220+keypad, use=screen,
-+screen.Eterm|screen in Eterm,
-+	use=screen+fkeys, use=Eterm,
- # fix the backspace key
- screen.linux|screen in linux console,
- 	bw,
-@@ -5042,44 +5122,13 @@
- 
- ### EMX termcap.dat compatibility modes
- #
--# Keypad:	Home=\0G	Up=\0H	PrPag=\0I
--#		ka1,kh		kcuu1		kpp,ka3
--#
--#		Left=\0K	5=\0L		Right=\0M
--#		kcub1		kb2		kcuf1
--#
--#		End=\0O		Down=\0P	NxPag=\0Q
--#		kc1,kend	kcud1		kc3,knp
--#
--#		Ins=\0R		Del=\0S
--#		kich1		kdch1
--#
--# On keyboard with 12 function keys,
--#	shifted f-keys: F13-F24
--#	control f-keys: F25-F36
--#	alt f-keys:     F37-F48
--# The shift/control/alt keys do not modify each other, but alt overrides both,
--# and control overrides shift.
--#
- # Also (possibly only EMX, so we don't put it in ansi.sys, etc): set the
- # no_color_video to inform the application that standout(1), underline(2)
- # reverse(4) and invisible(64) don't work with color.
- emx-base|DOS special keys,
- 	bce, bw,
- 	it#8, ncv#71,
--	bel=^G, ka1=\0G, ka3=\0I, kb2=\0L, kbs=^H, kc1=\0O, kc3=\0Q,
--	kcbt=\0^O, kcub1=\0K, kcud1=\0P, kcuf1=\0M, kcuu1=\0H,
--	kdch1=\0S, kend=\0O, kf1=\0;, kf10=\0D, kf11=\0\205,
--	kf12=\0\206, kf13=\0T, kf14=\0U, kf15=\0V, kf16=\0W,
--	kf17=\0X, kf18=\0Y, kf19=\0Z, kf2=\0<, kf20=\0[, kf21=\0\\,
--	kf22=\0], kf23=\0\207, kf24=\0\210, kf25=\0\^, kf26=\0_,
--	kf27=\0`, kf28=\0a, kf29=\0b, kf3=\0=, kf30=\0c, kf31=\0d,
--	kf32=\0e, kf33=\0f, kf34=\0g, kf35=\0\211, kf36=\0\212,
--	kf37=\0h, kf38=\0i, kf39=\0j, kf4=\0>, kf40=\0k, kf41=\0l,
--	kf42=\0m, kf43=\0n, kf44=\0o, kf45=\0p, kf46=\0q,
--	kf47=\0\213, kf48=\0\214, kf5=\0?, kf6=\0@, kf7=\0A, kf8=\0B,
--	kf9=\0C, khome=\0G, kich1=\0R, knp=\0Q, kpp=\0I,
--	use=ansi.sys,
-+	bel=^G, use=ansi.sys,
- 
- # Except for the "-emx" suffixes, these are as distributed with EMX 0.9b,
- # a Unix-style environment used on OS/2.  (Note that the suffix makes some
-@@ -5247,7 +5296,7 @@
- 	setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
- 	sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;12%;m,
- 	sgr0=\E[0;10m, smacs=\E[11m, smir=\E[4h, smso=\E[7m,
--	smul=\E[4m, tbc=\E[2g, vpa=\E[%i%p1%dd, use=vt102+enq,
-+	smul=\E[4m, tbc=\E[3g, vpa=\E[%i%p1%dd, use=vt102+enq,
- 
- # Key definitions:
- # The encodings for unshifted arrow keys, F1-F12, Home, Insert, etc.  match the
-@@ -11060,7 +11109,7 @@
- 	sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;m,
- 	sgr0=\E[m,
- 	smkx=\EP`>z~[[J`8xz~[[A`4xz~[[D`6xz~[[C`2xz~[[B\E\\,
--	smm=\E[>52h, smso=\E[7m, smul=\E[4m, tbc=\E[2g,
-+	smm=\E[>52h, smso=\E[7m, smul=\E[4m, tbc=\E[3g,
- 	vpa=\E[%p1%{1}%+%dd,
- 
- aaa+rv|ann arbor ambassador in reverse video,
-@@ -12147,7 +12196,7 @@
- 	sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;m,
- 	sgr0=\E[m, smacs=\017$<1>, smcup=\E[=4l\E[1;24w\E2\r,
- 	smir=\E[4h, smkx=\E[1!z\E[0;3u, smso=\E[7m, smul=\E[4m,
--	tbc=\E[2g, vpa=\E[%p1%{1}%+%dd,
-+	tbc=\E[3g, vpa=\E[%p1%{1}%+%dd,
- avt-rv-ns|concept avt in reverse video mode/no status line,
- 	flash=\E[=205l$<200>\E[=205h, is1=\E[=103l\E[=205h,
- 	use=avt-ns,
-@@ -14584,7 +14633,7 @@
- 	sc=\E[%y,
- 	sgr=\E[%{0}%?%p1%p3%|%t%{7}%+%;%?%p2%t%{2}%+%;%?%p4%t%{5}%+%;%?%p6%t%{1}%+%;m%?%p8%t\E[%{32}%+%d%%{%;%?%p9%t\016%e\017%;,
- 	sgr0=\E[0m\017, smir=\E[4h, smso=\E[7m, smul=\E[4m,
--	tbc=\E[2g, tsl=\E[%i%p1%d%%}, vpa=\E[%i%p1%dd,
-+	tbc=\E[3g, tsl=\E[%i%p1%d%%}, vpa=\E[%i%p1%dd,
- 
- # p9-w: Prism-9 in 132 column mode
- # --------------------------------
-@@ -16037,7 +16086,7 @@
- 	rep=%p1%c\E[%p2%{1}%-%db, rev=\E[7m, rmam=\E[?7l,
- 	rmso=\E[m, rmul=\E[m,
- 	sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;m,
--	sgr0=\E[m, smam=\E[?7h, smso=\E[7m, smul=\E[4m, tbc=\E[2g,
-+	sgr0=\E[m, smam=\E[?7h, smso=\E[7m, smul=\E[4m, tbc=\E[3g,
- 	vpa=\E[%p1%{1}%+%dd,
- # The tek4125 emulates a vt100 incorrectly - the scrolling region
- # command is ignored.  The following entry replaces <csr> with the needed
-@@ -17729,7 +17778,7 @@
- 	rmul=\E[m, rs2=\E[?=h\Ec, s0ds=^O, s1ds=^N,
- 	sgr=\E[0%?%p1%p3%|%t;7%;%?%p2%t;4%;%?%p4%t;5%;%?%p5%t;2%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
- 	sgr0=\E[m\017, smacs=^N, smcup=\E[?>h\EPY99\:98\E\\,
--	smir=\E[4h, smso=\E[0;7m, smul=\E[0;4m, tbc=\E[2g,
-+	smir=\E[4h, smso=\E[0;7m, smul=\E[0;4m, tbc=\E[3g,
- 	tsl=\EPY99\:98\E\\\E[0;98v\E[2;7m,
- tws2102-sna|dku7102-sna|BULL Questar tws2102 for SNA,
- 	dsl=\E[0;98v\E[2J\E[v, fsl=\E[v, is3=\Eb, tsl=\E[0;98v,
-@@ -21791,6 +21840,25 @@
- #	* add "aterm" -TD
- #	* add "linux2.6.26" -TD
- #
-+# 2008-11-15
-+#	* change several \E[2g (clear tab at current column) to \E[3g
-+#	  (clear all tabs) to match definition for tbc capability -TD
-+#
-+# 2008-11-29
-+#	* add eterm-color -TD
-+#
-+# 2009-01-10
-+#	* add screen.Eterm -TD
-+#
-+# 2009-03-28
-+#	* correct typo in pfkey of ansi.sys-old
-+#	  (report by Kalle Olavi Niemitalo)
-+#	* move function- and cursor-keys from emx-base to ansi.sys, and create
-+#	  a pfkey capability which handles F1-F48 -TD
-+#
-+# 2009-05-02
-+#	* add vwmterm entry (Bryan Christ)
-+#
- # The following sets edit modes for GNU EMACS.
- # Local Variables:
- # fill-prefix:"\t"
-diff -Naur ncurses-5.7.orig/mk-1st.awk ncurses-5.7/mk-1st.awk
---- ncurses-5.7.orig/mk-1st.awk	2007-03-24 15:10:55.000000000 -0700
-+++ ncurses-5.7/mk-1st.awk	2009-07-19 15:03:48.000000000 -0700
-@@ -1,6 +1,6 @@
--# $Id: mk-1st.awk,v 1.78 2007/03/24 22:10:55 tom Exp $
-+# $Id: mk-1st.awk,v 1.81 2009/03/28 18:59:51 Charles.Wilson Exp $
- ##############################################################################
--# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.                #
-+# Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.                #
- #                                                                            #
- # Permission is hereby granted, free of charge, to any person obtaining a    #
- # copy of this software and associated documentation files (the "Software"), #
-@@ -59,7 +59,7 @@
- 		return ( subset ~ /^ticlib$/ );
- 	}
- function is_termlib() {
--		return ( subset ~ /^(ticlib\+)?termlib(\+ext_tinfo)?$/ );
-+		return ( subset ~ /^(ticlib\+)?termlib((\+[^+ ]+)*\+ext_tinfo)?$/ );
- 	}
- # see lib_name
- function lib_name_of(a_name) {
-@@ -386,7 +386,13 @@
- 				}
- 				end_name = lib_name;
- 				printf "../lib/%s : $(%s_OBJS)\n", lib_name, OBJS
--				printf "\tcd ../lib && $(LIBTOOL_LINK) $(%s) -o %s $(%s_OBJS:$o=.lo) -rpath $(DESTDIR)$(libdir) -version-info $(NCURSES_MAJOR):$(NCURSES_MINOR) $(SHLIB_LIST)\n", compile, lib_name, OBJS
-+				if ( is_ticlib() ) {
-+					printf "\tcd ../lib && $(LIBTOOL_LINK) $(%s) -o %s $(%s_OBJS:$o=.lo) -rpath $(DESTDIR)$(libdir) -version-info $(NCURSES_MAJOR):$(NCURSES_MINOR) $(LT_UNDEF) $(TICS_LIST)\n", compile, lib_name, OBJS
-+				} else if ( is_termlib() ) {
-+					printf "\tcd ../lib && $(LIBTOOL_LINK) $(%s) -o %s $(%s_OBJS:$o=.lo) -rpath $(DESTDIR)$(libdir) -version-info $(NCURSES_MAJOR):$(NCURSES_MINOR) $(LT_UNDEF) $(TINFO_LIST)\n", compile, lib_name, OBJS
-+				} else {
-+					printf "\tcd ../lib && $(LIBTOOL_LINK) $(%s) -o %s $(%s_OBJS:$o=.lo) -rpath $(DESTDIR)$(libdir) -version-info $(NCURSES_MAJOR):$(NCURSES_MINOR) $(LT_UNDEF) $(SHLIB_LIST)\n", compile, lib_name, OBJS
-+				}
- 				print  ""
- 				print  "install \\"
- 				print  "install.libs \\"
-@@ -404,7 +410,7 @@
- 			{
- 				end_name = lib_name;
- 				printf "../lib/%s : $(%s_OBJS)\n", lib_name, OBJS
--				printf "\t$(AR) $(AR_OPTS) $@ $?\n"
-+				printf "\t$(AR) $(ARFLAGS) $@ $?\n"
- 				printf "\t$(RANLIB) $@\n"
- 				if ( host == "vxworks" )
- 				{
-diff -Naur ncurses-5.7.orig/mk-dlls.sh ncurses-5.7/mk-dlls.sh
---- ncurses-5.7.orig/mk-dlls.sh	1969-12-31 16:00:00.000000000 -0800
-+++ ncurses-5.7/mk-dlls.sh	2009-07-19 15:04:11.000000000 -0700
-@@ -0,0 +1,93 @@
-+#!/bin/sh
-+# $Id: mk-dlls.sh,v 1.1 2008/11/18 08:50:04 juergen Exp $
-+##############################################################################
-+# Copyright (c) 2008 Free Software Foundation, Inc.                          #
-+#                                                                            #
-+# Permission is hereby granted, free of charge, to any person obtaining a    #
-+# copy of this software and associated documentation files (the "Software"), #
-+# to deal in the Software without restriction, including without limitation  #
-+# the rights to use, copy, modify, merge, publish, distribute, distribute    #
-+# with modifications, sublicense, and/or sell copies of the Software, and to #
-+# permit persons to whom the Software is furnished to do so, subject to the  #
-+# following conditions:                                                      #
-+#                                                                            #
-+# The above copyright notice and this permission notice shall be included in #
-+# all copies or substantial portions of the Software.                        #
-+#                                                                            #
-+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
-+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,   #
-+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL    #
-+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER      #
-+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING    #
-+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER        #
-+# DEALINGS IN THE SOFTWARE.                                                  #
-+#                                                                            #
-+# Except as contained in this notice, the name(s) of the above copyright     #
-+# holders shall not be used in advertising or otherwise to promote the sale, #
-+# use or other dealings in this Software without prior written               #
-+# authorization.                                                             #
-+##############################################################################
-+#
-+# Author: Juergen Pfeifer
-+#
-+# Build DLLs on MinGW
-+#
-+gcc -v 2>&1 | grep specs | grep mingw
-+if [ $? -eq 1 ]; then
-+  echo "$0 requires a mingw environment" >&2
-+else
-+  if [ -d lib ]; then
-+    cf="-shared"
-+    lf="--enable-auto-import"
-+    pushd lib 2>&1 >/dev/null
-+      for t in "" "t"
-+      do
-+        for m in "" "_g"
-+        do  
-+          if [ -f libncurses${t}${m}.a ]; then
-+            f=libncurses${t}${m}.a
-+            g=`basename $f .a | cut -c 4-`
-+	    gi=libw${g}.a
-+	    td=tmp-${g}
-+	    rm -rf "${td}"
-+	    mkdir "${td}"
-+	    cd "${td}"
-+	      ar x ../${f} `ar t ../${f}`
-+              gcc $cf -o w${g}.dll -Wl,--out-implib,${gi} -Wl,--output-def,w${g}.def -Wl,$lf `ar t ../$f`
-+              lib //NOLOGO /MACHINE:i386 /DEF:w${g}.def
-+              rm -f `ar t ../$f`
-+	      mv w${g}.dll ..
-+	      mv w${g}.lib ..
-+	      mv libw${g}.a ..
-+            cd ..
-+	    rm -rf "${td}"
-+
-+            for l in panel menu form
-+            do
-+              for f in lib${l}${t}${m}.a
-+              do
-+                g=`basename $f .a | cut -c 4-`
-+		td=tmp-${g}
-+	        rm -rf "${td}"
-+	        mkdir "${td}"
-+                echo $g
-+		cd "${td}"
-+	          ar x ../$f `ar t ../$f`
-+                  gcc $cf -o w${g}.dll -Wl,--out-implib,libw${g}.a -Wl,--output-def,w${g}.def -Wl,$lf `ar t ../$f` ../${gi}
-+                  lib //NOLOGO /MACHINE:i386 /DEF:w${g}.def
-+                  rm -f `ar t ../$f`
-+	          mv w${g}.dll ..
-+	          mv w${g}.lib ..
-+		  mv libw${g}.a ..
-+		cd ..  
-+		rm -rf "${td}"
-+              done
-+            done
-+          fi
-+        done
-+      done
-+    popd
-+  else
-+    echo lib has not been build >&2
-+  fi
-+fi
-diff -Naur ncurses-5.7.orig/ncurses/base/define_key.c ncurses-5.7/ncurses/base/define_key.c
---- ncurses-5.7.orig/ncurses/base/define_key.c	2006-12-30 15:23:31.000000000 -0800
-+++ ncurses-5.7/ncurses/base/define_key.c	2009-07-19 15:03:59.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -27,33 +27,34 @@
-  ****************************************************************************/
- 
- /****************************************************************************
-- *  Author: Thomas E. Dickey                    1997-on                     *
-+ *  Author: Thomas E. Dickey                        1997-on                 *
-+ *     and: Juergen Pfeifer                         2009                    *
-  ****************************************************************************/
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: define_key.c,v 1.13 2006/12/30 23:23:31 tom Exp $")
-+MODULE_ID("$Id: define_key.c,v 1.17 2009/05/09 18:30:16 tom Exp $")
- 
- NCURSES_EXPORT(int)
--define_key(const char *str, int keycode)
-+NCURSES_SP_NAME(define_key) (NCURSES_SP_DCLx const char *str, int keycode)
- {
-     int code = ERR;
- 
--    T((T_CALLED("define_key(%s,%d)"), _nc_visbuf(str), keycode));
--    if (SP == 0) {
-+    T((T_CALLED("define_key(%p, %s,%d)"), SP_PARM, _nc_visbuf(str), keycode));
-+    if (SP_PARM == 0 || !HasTInfoTerminal(SP_PARM)) {
- 	code = ERR;
-     } else if (keycode > 0) {
- 	unsigned ukey = (unsigned) keycode;
- 
- 	if (str != 0) {
--	    define_key(str, 0);
--	} else if (has_key(keycode)) {
--	    while (_nc_remove_key(&(SP->_keytry), ukey))
-+	    NCURSES_SP_NAME(define_key) (NCURSES_SP_ARGx str, 0);
-+	} else if (NCURSES_SP_NAME(has_key) (NCURSES_SP_ARGx keycode)) {
-+	    while (_nc_remove_key(&(SP_PARM->_keytry), ukey))
- 		code = OK;
- 	}
- 	if (str != 0) {
--	    if (key_defined(str) == 0) {
--		if (_nc_add_to_try(&(SP->_keytry), str, ukey) == OK) {
-+	    if (NCURSES_SP_NAME(key_defined) (NCURSES_SP_ARGx str) == 0) {
-+		if (_nc_add_to_try(&(SP_PARM->_keytry), str, ukey) == OK) {
- 		    code = OK;
- 		} else {
- 		    code = ERR;
-@@ -63,8 +64,16 @@
- 	    }
- 	}
-     } else {
--	while (_nc_remove_string(&(SP->_keytry), str))
-+	while (_nc_remove_string(&(SP_PARM->_keytry), str))
- 	    code = OK;
-     }
-     returnCode(code);
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+define_key(const char *str, int keycode)
-+{
-+    return NCURSES_SP_NAME(define_key) (CURRENT_SCREEN, str, keycode);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/keybound.c ncurses-5.7/ncurses/base/keybound.c
---- ncurses-5.7.orig/ncurses/base/keybound.c	2006-06-17 11:19:24.000000000 -0700
-+++ ncurses-5.7/ncurses/base/keybound.c	2009-07-19 15:02:22.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1999-2005,2006 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1999-2006,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -27,25 +27,34 @@
-  ****************************************************************************/
- 
- /****************************************************************************
-- *  Author: Thomas E. Dickey                 1999-on                        *
-+ *  Author: Thomas E. Dickey                        1999-on                 *
-+ *     and: Juergen Pfeifer                         2009                    *
-  ****************************************************************************/
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: keybound.c,v 1.7 2006/06/17 18:19:24 tom Exp $")
-+MODULE_ID("$Id: keybound.c,v 1.9 2009/02/21 16:32:34 tom Exp $")
- 
- /*
-  * Returns the count'th string definition which is associated with the
-  * given keycode.  The result is malloc'd, must be freed by the caller.
-  */
- NCURSES_EXPORT(char *)
--keybound(int code, int count)
-+NCURSES_SP_NAME(keybound) (NCURSES_SP_DCLx int code, int count)
- {
-     char *result = 0;
- 
--    T((T_CALLED("keybound(%d,%d)"), code, count));
--    if (SP != 0 && code >= 0) {
--	result = _nc_expand_try(SP->_keytry, (unsigned) code, &count, 0);
-+    T((T_CALLED("keybound(%p, %d,%d)"), SP_PARM, code, count));
-+    if (SP_PARM != 0 && code >= 0) {
-+	result = _nc_expand_try(SP_PARM->_keytry, (unsigned) code, &count, 0);
-     }
-     returnPtr(result);
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(char *)
-+keybound(int code, int count)
-+{
-+    return NCURSES_SP_NAME(keybound) (CURRENT_SCREEN, code, count);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/key_defined.c ncurses-5.7/ncurses/base/key_defined.c
---- ncurses-5.7.orig/ncurses/base/key_defined.c	2006-12-30 15:22:55.000000000 -0800
-+++ ncurses-5.7/ncurses/base/key_defined.c	2009-07-19 15:02:22.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 2003,2006 Free Software Foundation, Inc.                   *
-+ * Copyright (c) 2003-2006,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -32,7 +32,7 @@
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: key_defined.c,v 1.6 2006/12/30 23:22:55 tom Exp $")
-+MODULE_ID("$Id: key_defined.c,v 1.8 2009/02/21 16:24:26 tom Exp $")
- 
- static int
- find_definition(TRIES * tree, const char *str)
-@@ -65,14 +65,22 @@
-  * Otherwise, return the keycode's value (neither OK/ERR).
-  */
- NCURSES_EXPORT(int)
--key_defined(const char *str)
-+NCURSES_SP_NAME(key_defined) (NCURSES_SP_DCLx const char *str)
- {
-     int code = ERR;
- 
--    T((T_CALLED("key_defined(%s)"), _nc_visbuf(str)));
--    if (SP != 0 && str != 0) {
--	code = find_definition(SP->_keytry, str);
-+    T((T_CALLED("key_defined(%p, %s)"), SP_PARM, _nc_visbuf(str)));
-+    if (SP_PARM != 0 && str != 0) {
-+	code = find_definition(SP_PARM->_keytry, str);
-     }
- 
-     returnCode(code);
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+key_defined(const char *str)
-+{
-+    return NCURSES_SP_NAME(key_defined) (CURRENT_SCREEN, str);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/keyok.c ncurses-5.7/ncurses/base/keyok.c
---- ncurses-5.7.orig/ncurses/base/keyok.c	2006-12-30 08:22:33.000000000 -0800
-+++ ncurses-5.7/ncurses/base/keyok.c	2009-07-19 15:04:06.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2000,2006 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -27,12 +27,13 @@
-  ****************************************************************************/
- 
- /****************************************************************************
-- *  Author: Thomas E. Dickey            1997-on                             *
-+ *  Author: Thomas E. Dickey                        1997-on                 *
-+ *     and: Juergen Pfeifer                         2009                    *
-  ****************************************************************************/
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: keyok.c,v 1.7 2006/12/30 16:22:33 tom Exp $")
-+MODULE_ID("$Id: keyok.c,v 1.9 2009/06/06 19:24:57 tom Exp $")
- 
- /*
-  * Enable (or disable) ncurses' interpretation of a keycode by adding (or
-@@ -45,28 +46,33 @@
-  */
- 
- NCURSES_EXPORT(int)
--keyok(int c, bool flag)
-+NCURSES_SP_NAME(keyok) (NCURSES_SP_DCLx int c, bool flag)
- {
-     int code = ERR;
--    int count = 0;
--    char *s;
- 
-+    T((T_CALLED("keyok(%p, %d,%d)"), SP_PARM, c, flag));
-+#ifdef USE_TERM_DRIVER
-+    code = CallDriver_2(sp, kyOk, c, flag);
-+#else
-     T((T_CALLED("keyok(%d,%d)"), c, flag));
-     if (c >= 0) {
-+	int count = 0;
-+	char *s;
- 	unsigned ch = (unsigned) c;
-+
- 	if (flag) {
--	    while ((s = _nc_expand_try(SP->_key_ok, ch, &count, 0)) != 0
--		   && _nc_remove_key(&(SP->_key_ok), ch)) {
--		code = _nc_add_to_try(&(SP->_keytry), s, ch);
-+	    while ((s = _nc_expand_try(SP_PARM->_key_ok, ch, &count, 0)) != 0
-+		   && _nc_remove_key(&(SP_PARM->_key_ok), ch)) {
-+		code = _nc_add_to_try(&(SP_PARM->_keytry), s, ch);
- 		free(s);
- 		count = 0;
- 		if (code != OK)
- 		    break;
- 	    }
- 	} else {
--	    while ((s = _nc_expand_try(SP->_keytry, ch, &count, 0)) != 0
--		   && _nc_remove_key(&(SP->_keytry), ch)) {
--		code = _nc_add_to_try(&(SP->_key_ok), s, ch);
-+	    while ((s = _nc_expand_try(SP_PARM->_keytry, ch, &count, 0)) != 0
-+		   && _nc_remove_key(&(SP_PARM->_keytry), ch)) {
-+		code = _nc_add_to_try(&(SP_PARM->_key_ok), s, ch);
- 		free(s);
- 		count = 0;
- 		if (code != OK)
-@@ -74,5 +80,14 @@
- 	    }
- 	}
-     }
-+#endif
-     returnCode(code);
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+keyok(int c, bool flag)
-+{
-+    return NCURSES_SP_NAME(keyok) (CURRENT_SCREEN, c, flag);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/legacy_coding.c ncurses-5.7/ncurses/base/legacy_coding.c
---- ncurses-5.7.orig/ncurses/base/legacy_coding.c	2005-12-17 15:38:17.000000000 -0800
-+++ ncurses-5.7/ncurses/base/legacy_coding.c	2009-07-19 15:02:22.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 2005 Free Software Foundation, Inc.                        *
-+ * Copyright (c) 2005,2009 Free Software Foundation, Inc.                   *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -27,22 +27,31 @@
-  ****************************************************************************/
- 
- /****************************************************************************
-- *  Author: Thomas E. Dickey                                                *
-+ *  Author: Thomas E. Dickey          2005                                  *
-+ *          Juergen Pfeifer           2009                                  *
-  ****************************************************************************/
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: legacy_coding.c,v 1.2 2005/12/17 23:38:17 tom Exp $")
-+MODULE_ID("$Id: legacy_coding.c,v 1.4 2009/02/21 16:16:38 tom Exp $")
- 
- NCURSES_EXPORT(int)
--use_legacy_coding(int level)
-+NCURSES_SP_NAME(use_legacy_coding) (NCURSES_SP_DCLx int level)
- {
-     int result = ERR;
- 
--    T((T_CALLED("use_legacy_coding(%d)"), level));
--    if (level >= 0 && level <= 2 && SP != 0) {
--	result = SP->_legacy_coding;
--	SP->_legacy_coding = level;
-+    T((T_CALLED("use_legacy_coding(%p,%d)"), SP_PARM, level));
-+    if (level >= 0 && level <= 2 && SP_PARM != 0) {
-+	result = SP_PARM->_legacy_coding;
-+	SP_PARM->_legacy_coding = level;
-     }
-     returnCode(result);
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+use_legacy_coding(int level)
-+{
-+    return NCURSES_SP_NAME(use_legacy_coding) (CURRENT_SCREEN, level);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_addch.c ncurses-5.7/ncurses/base/lib_addch.c
---- ncurses-5.7.orig/ncurses/base/lib_addch.c	2008-08-16 12:20:04.000000000 -0700
-+++ ncurses-5.7/ncurses/base/lib_addch.c	2009-07-19 15:04:01.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -36,7 +36,7 @@
- #include <curses.priv.h>
- #include <ctype.h>
- 
--MODULE_ID("$Id: lib_addch.c,v 1.113 2008/08/16 19:20:04 tom Exp $")
-+MODULE_ID("$Id: lib_addch.c,v 1.119 2009/05/15 23:47:26 tom Exp $")
- 
- static const NCURSES_CH_T blankchar = NewChar(BLANK_TEXT);
- 
-@@ -260,20 +260,37 @@
-     /*
-      * Build up multibyte characters until we have a wide-character.
-      */
-+#if NCURSES_SP_FUNCS
-+#define DeriveSP() SCREEN *sp = _nc_screen_of(win);
-+#else
-+#define DeriveSP() /*nothing*/
-+#endif
-     if_WIDEC({
-+	DeriveSP();
- 	if (WINDOW_EXT(win, addch_used) != 0 || !Charable(ch)) {
- 	    int len = _nc_build_wch(win, CHREF(ch));
- 
- 	    if (len >= -1) {
--		/* handle EILSEQ */
-+		attr_t attr = AttrOf(ch);
-+
-+		/* handle EILSEQ (i.e., when len >= -1) */
- 		if (is8bits(CharOf(ch))) {
--		    const char *s = unctrl((chtype) CharOf(ch));
--		    if (s[1] != 0) {
--			return waddstr(win, s);
-+		    int rc = OK;
-+		    const char *s = NCURSES_SP_NAME(unctrl)
-+		      (NCURSES_SP_ARGx (chtype) CharOf(ch));
-+
-+		    if (s[1] != '\0') {
-+			while (*s != '\0') {
-+			    rc = waddch(win, UChar(*s) | attr);
-+			    if (rc != OK)
-+				break;
-+			    ++s;
-+			}
-+			return rc;
- 		    }
- 		}
- 		if (len == -1)
--		    return waddch(win, ' ');
-+		    return waddch(win, ' ' | attr);
- 	    } else {
- 		return OK;
- 	    }
-@@ -327,6 +344,7 @@
- 		    return ERR;
- 		x = win->_curx;
- 		y = win->_cury;
-+		line = win->_line + y;
- 	    }
- 	    /*
- 	     * Check for cells which are orphaned by adding this character, set
-@@ -394,8 +412,11 @@
- {
-     NCURSES_SIZE_T x, y;
-     chtype t = CharOf(ch);
--    const char *s = unctrl(t);
--
-+#if USE_WIDEC_SUPPORT || NCURSES_SP_FUNCS || USE_REENTRANT
-+    SCREEN *sp = _nc_screen_of(win);
-+#endif
-+    const char *s = NCURSES_SP_NAME(unctrl) (NCURSES_SP_ARGx t);
-+    int tabsize = 8;
-     /*
-      * If we are using the alternate character set, forget about locale.
-      * Otherwise, if unctrl() returns a single-character or the locale
-@@ -404,14 +425,14 @@
-     if ((AttrOf(ch) & A_ALTCHARSET)
- 	|| (
- #if USE_WIDEC_SUPPORT
--	       (SP != 0 && SP->_legacy_coding) &&
-+	       (sp != 0 && sp->_legacy_coding) &&
- #endif
- 	       s[1] == 0
- 	)
- 	|| (
- 	       isprint(t)
- #if USE_WIDEC_SUPPORT
--	       || ((SP == 0 || !SP->_legacy_coding) &&
-+	       || ((sp == 0 || !sp->_legacy_coding) &&
- 		   (WINDOW_EXT(win, addch_used)
- 		    || !_nc_is_charable(CharOf(ch))))
- #endif
-@@ -427,8 +448,12 @@
- 
-     switch (t) {
-     case '\t':
--	x += (TABSIZE - (x % TABSIZE));
--
-+#if USE_REENTRANT
-+	tabsize = sp->_TABSIZE;
-+#else
-+	tabsize = TABSIZE;
-+#endif
-+	x += (tabsize - (x % tabsize));
- 	/*
- 	 * Space-fill the tab on the bottom line so that we'll get the
- 	 * "correct" cursor position.
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_beep.c ncurses-5.7/ncurses/base/lib_beep.c
---- ncurses-5.7.orig/ncurses/base/lib_beep.c	2005-04-09 08:20:04.000000000 -0700
-+++ ncurses-5.7/ncurses/base/lib_beep.c	2009-07-19 15:04:03.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -30,6 +30,7 @@
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-  *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                         2009                    *
-  ****************************************************************************/
- 
- /*
-@@ -40,9 +41,12 @@
-  */
- 
- #include <curses.priv.h>
--#include <term.h>		/* beep, flash */
- 
--MODULE_ID("$Id: lib_beep.c,v 1.10 2005/04/09 15:20:04 tom Exp $")
-+#ifndef CUR
-+#define CUR SP_TERMTYPE
-+#endif
-+
-+MODULE_ID("$Id: lib_beep.c,v 1.14 2009/05/23 19:33:20 tom Exp $")
- 
- /*
-  *	beep()
-@@ -53,12 +57,16 @@
-  */
- 
- NCURSES_EXPORT(int)
--beep(void)
-+NCURSES_SP_NAME(beep) (NCURSES_SP_DCL0)
- {
-     int res = ERR;
- 
--    T((T_CALLED("beep()")));
-+    T((T_CALLED("beep(%p)"), SP_PARM));
- 
-+#ifdef USE_TERM_DRIVER
-+    if (SP_PARM != 0)
-+	res = CallDriver_1(SP_PARM, doBeepOrFlash, TRUE);
-+#else
-     /* FIXME: should make sure that we are not in altchar mode */
-     if (cur_term == 0) {
- 	res = ERR;
-@@ -71,6 +79,15 @@
- 	res = putp(flash_screen);
- 	_nc_flush();
-     }
-+#endif
- 
-     returnCode(res);
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+beep(void)
-+{
-+    return NCURSES_SP_NAME(beep) (CURRENT_SCREEN);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_color.c ncurses-5.7/ncurses/base/lib_color.c
---- ncurses-5.7.orig/ncurses/base/lib_color.c	2007-04-07 10:07:28.000000000 -0700
-+++ ncurses-5.7/ncurses/base/lib_color.c	2009-07-19 15:04:06.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -30,6 +30,7 @@
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-  *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                         2009                    *
-  ****************************************************************************/
- 
- /* lib_color.c
-@@ -42,7 +43,11 @@
- #include <term.h>
- #include <tic.h>
- 
--MODULE_ID("$Id: lib_color.c,v 1.85 2007/04/07 17:07:28 tom Exp $")
-+#ifndef CUR
-+#define CUR SP_TERMTYPE
-+#endif
-+
-+MODULE_ID("$Id: lib_color.c,v 1.92 2009/06/06 20:26:16 tom Exp $")
- 
- /*
-  * These should be screen structure members.  They need to be globals for
-@@ -108,6 +113,13 @@
- };
- /* *INDENT-ON* */
- 
-+/*
-+ * Ensure that we use color pairs only when colors have been started, and also
-+ * that the index is within the limits of the table which we allocated.
-+ */
-+#define ValidPair(pair) \
-+    ((SP != 0) && (pair >= 0) && (pair < SP->_pair_limit) && SP->_coloron)
-+
- #if NCURSES_EXT_FUNCS
- /*
-  * These are called from _nc_do_color(), which in turn is called from
-@@ -147,31 +159,39 @@
- }
- 
- static void
--set_background_color(int bg, int (*outc) (int))
-+set_background_color(NCURSES_SP_DCLx int bg, NCURSES_SP_OUTC outc)
- {
-     if (set_a_background) {
- 	TPUTS_TRACE("set_a_background");
--	tputs(TPARM_1(set_a_background, bg), 1, outc);
-+	NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
-+				TPARM_1(set_a_background, bg),
-+				1, outc);
-     } else {
- 	TPUTS_TRACE("set_background");
--	tputs(TPARM_1(set_background, toggled_colors(bg)), 1, outc);
-+	NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
-+				TPARM_1(set_background, toggled_colors(bg)),
-+				1, outc);
-     }
- }
- 
- static void
--set_foreground_color(int fg, int (*outc) (int))
-+set_foreground_color(NCURSES_SP_DCLx int fg, NCURSES_SP_OUTC outc)
- {
-     if (set_a_foreground) {
- 	TPUTS_TRACE("set_a_foreground");
--	tputs(TPARM_1(set_a_foreground, fg), 1, outc);
-+	NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
-+				TPARM_1(set_a_foreground, fg),
-+				1, outc);
-     } else {
- 	TPUTS_TRACE("set_foreground");
--	tputs(TPARM_1(set_foreground, toggled_colors(fg)), 1, outc);
-+	NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
-+				TPARM_1(set_foreground, toggled_colors(fg)),
-+				1, outc);
-     }
- }
- 
- static void
--init_color_table(void)
-+init_color_table(NCURSES_SP_DCL0)
- {
-     const color_t *tp;
-     int n;
-@@ -179,18 +199,18 @@
-     tp = (hue_lightness_saturation) ? hls_palette : cga_palette;
-     for (n = 0; n < COLORS; n++) {
- 	if (InPalette(n)) {
--	    SP->_color_table[n] = tp[n];
-+	    SP_PARM->_color_table[n] = tp[n];
- 	} else {
--	    SP->_color_table[n] = tp[n % MAX_PALETTE];
-+	    SP_PARM->_color_table[n] = tp[n % MAX_PALETTE];
- 	    if (hue_lightness_saturation) {
--		SP->_color_table[n].green = 100;
-+		SP_PARM->_color_table[n].green = 100;
- 	    } else {
--		if (SP->_color_table[n].red)
--		    SP->_color_table[n].red = 1000;
--		if (SP->_color_table[n].green)
--		    SP->_color_table[n].green = 1000;
--		if (SP->_color_table[n].blue)
--		    SP->_color_table[n].blue = 1000;
-+		if (SP_PARM->_color_table[n].red)
-+		    SP_PARM->_color_table[n].red = 1000;
-+		if (SP_PARM->_color_table[n].green)
-+		    SP_PARM->_color_table[n].green = 1000;
-+		if (SP_PARM->_color_table[n].blue)
-+		    SP_PARM->_color_table[n].blue = 1000;
- 	    }
- 	}
-     }
-@@ -200,7 +220,7 @@
-  * Reset the color pair, e.g., to whatever color pair 0 is.
-  */
- static bool
--reset_color_pair(void)
-+reset_color_pair(NCURSES_SP_DCL0)
- {
-     bool result = FALSE;
- 
-@@ -218,15 +238,14 @@
-  * someone has changed the color definitions.
-  */
- bool
--_nc_reset_colors(void)
--{
-+NCURSES_SP_NAME(_nc_reset_colors) (NCURSES_SP_DCL0) {
-     int result = FALSE;
- 
-     T((T_CALLED("_nc_reset_colors()")));
--    if (SP->_color_defs > 0)
--	SP->_color_defs = -(SP->_color_defs);
-+    if (SP_PARM->_color_defs > 0)
-+	SP_PARM->_color_defs = -(SP_PARM->_color_defs);
- 
--    if (reset_color_pair())
-+    if (reset_color_pair(NCURSES_SP_ARG))
- 	result = TRUE;
-     if (orig_colors != 0) {
- 	TPUTS_TRACE("orig_colors");
-@@ -236,46 +255,69 @@
-     returnBool(result);
- }
- 
-+#if NCURSES_SP_FUNCS
-+bool
-+_nc_reset_colors(void)
-+{
-+    return NCURSES_SP_NAME(_nc_reset_colors) (CURRENT_SCREEN);
-+}
-+#endif
-+
- NCURSES_EXPORT(int)
--start_color(void)
-+NCURSES_SP_NAME(start_color) (NCURSES_SP_DCL0)
- {
-     int result = ERR;
- 
-     T((T_CALLED("start_color()")));
- 
--    if (SP == 0) {
-+    if (SP_PARM == 0) {
- 	result = ERR;
--    } else if (SP->_coloron) {
-+    } else if (SP_PARM->_coloron) {
- 	result = OK;
-     } else {
- 
--	if (reset_color_pair() != TRUE) {
--	    set_foreground_color(default_fg(), _nc_outch);
--	    set_background_color(default_bg(), _nc_outch);
-+	if (reset_color_pair(NCURSES_SP_ARG) != TRUE) {
-+	    set_foreground_color(NCURSES_SP_ARGx
-+				 default_fg(),
-+				 NCURSES_SP_NAME(_nc_outch));
-+	    set_background_color(NCURSES_SP_ARGx
-+				 default_bg(),
-+				 NCURSES_SP_NAME(_nc_outch));
- 	}
- 
- 	if (max_pairs > 0 && max_colors > 0) {
--	    SP->_pair_count = max_pairs;
--	    SP->_color_count = max_colors;
-+	    SP_PARM->_pair_limit = max_pairs;
-+
-+#if NCURSES_EXT_FUNCS
-+	    /*
-+	     * If using default colors, allocate extra space in table to
-+	     * allow for default-color as a component of a color-pair.
-+	     */
-+	    SP_PARM->_pair_limit += (1 + (2 * max_colors));
-+#endif
-+	    SP_PARM->_pair_count = max_pairs;
-+	    SP_PARM->_color_count = max_colors;
- #if !USE_REENTRANT
- 	    COLOR_PAIRS = max_pairs;
- 	    COLORS = max_colors;
- #endif
- 
--	    if ((SP->_color_pairs = TYPE_CALLOC(colorpair_t,
--						max_pairs)) != 0) {
--		if ((SP->_color_table = TYPE_CALLOC(color_t,
--						    max_colors)) != 0) {
--		    SP->_color_pairs[0] = PAIR_OF(default_fg(), default_bg());
--		    init_color_table();
-+	    SP_PARM->_color_pairs = TYPE_CALLOC(colorpair_t,
-+						SP_PARM->_pair_limit);
-+	    if (SP_PARM->_color_pairs != 0) {
-+		SP_PARM->_color_table = TYPE_CALLOC(color_t, max_colors);
-+		if (SP_PARM->_color_table != 0) {
-+		    SP_PARM->_color_pairs[0] = PAIR_OF(default_fg(),
-+						       default_bg());
-+		    init_color_table(NCURSES_SP_ARG);
- 
- 		    T(("started color: COLORS = %d, COLOR_PAIRS = %d",
- 		       COLORS, COLOR_PAIRS));
- 
--		    SP->_coloron = 1;
-+		    SP_PARM->_coloron = 1;
- 		    result = OK;
--		} else if (SP->_color_pairs != 0) {
--		    FreeAndNull(SP->_color_pairs);
-+		} else if (SP_PARM->_color_pairs != 0) {
-+		    FreeAndNull(SP_PARM->_color_pairs);
- 		}
- 	    }
- 	} else {
-@@ -285,6 +327,14 @@
-     returnCode(result);
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+start_color(void)
-+{
-+    return NCURSES_SP_NAME(start_color) (CURRENT_SCREEN);
-+}
-+#endif
-+
- /* This function was originally written by Daniel Weaver <danw@znyx.com> */
- static void
- rgb2hls(short r, short g, short b, short *h, short *l, short *s)
-@@ -328,24 +378,72 @@
-  * values.
-  */
- NCURSES_EXPORT(int)
--init_pair(short pair, short f, short b)
-+NCURSES_SP_NAME(init_pair) (NCURSES_SP_DCLx short pair, short f, short b)
- {
-     colorpair_t result;
-+    colorpair_t previous;
- 
-     T((T_CALLED("init_pair(%d,%d,%d)"), pair, f, b));
- 
--    if ((pair < 0) || (pair >= COLOR_PAIRS) || SP == 0 || !SP->_coloron)
-+    if (!ValidPair(pair))
- 	returnCode(ERR);
-+
-+    previous = SP_PARM->_color_pairs[pair];
- #if NCURSES_EXT_FUNCS
--    if (SP->_default_color) {
--	if (f < 0)
-+    if (SP_PARM->_default_color) {
-+	bool isDefault = FALSE;
-+	bool wasDefault = FALSE;
-+	int default_pairs = SP_PARM->_default_pairs;
-+
-+	/*
-+	 * Map caller's color number, e.g., -1, 0, 1, .., 7, etc., into
-+	 * internal unsigned values which we will store in the _color_pairs[]
-+	 * table.
-+	 */
-+	if (isDefaultColor(f)) {
- 	    f = COLOR_DEFAULT;
--	if (b < 0)
-+	    isDefault = TRUE;
-+	} else if (!OkColorHi(f)) {
-+	    returnCode(ERR);
-+	}
-+
-+	if (isDefaultColor(b)) {
- 	    b = COLOR_DEFAULT;
--	if (!OkColorHi(f) && !isDefaultColor(f))
-+	    isDefault = TRUE;
-+	} else if (!OkColorHi(b)) {
- 	    returnCode(ERR);
--	if (!OkColorHi(b) && !isDefaultColor(b))
-+	}
-+
-+	/*
-+	 * Check if the table entry that we are going to init/update used
-+	 * default colors.
-+	 */
-+	if ((FORE_OF(previous) == COLOR_DEFAULT)
-+	    || (BACK_OF(previous) == COLOR_DEFAULT))
-+	    wasDefault = TRUE;
-+
-+	/*
-+	 * Keep track of the number of entries in the color pair table which
-+	 * used a default color.
-+	 */
-+	if (isDefault && !wasDefault) {
-+	    ++default_pairs;
-+	} else if (wasDefault && !isDefault) {
-+	    --default_pairs;
-+	}
-+
-+	/*
-+	 * As an extension, ncurses allows the pair number to exceed the
-+	 * terminal's color_pairs value for pairs using a default color.
-+	 *
-+	 * Note that updating a pair which used a default color with one
-+	 * that does not will decrement the count - and possibly interfere
-+	 * with sequentially adding new pairs.
-+	 */
-+	if (pair > (SP_PARM->_pair_count + default_pairs)) {
- 	    returnCode(ERR);
-+	}
-+	SP_PARM->_default_pairs = default_pairs;
-     } else
- #endif
-     {
-@@ -361,8 +459,8 @@
-      * pair colors with the new ones).
-      */
-     result = PAIR_OF(f, b);
--    if (SP->_color_pairs[pair] != 0
--	&& SP->_color_pairs[pair] != result) {
-+    if (previous != 0
-+	&& previous != result) {
- 	int y, x;
- 
- 	for (y = 0; y <= curscr->_maxy; y++) {
-@@ -381,9 +479,9 @@
- 		_nc_make_oldhash(y);
- 	}
-     }
--    SP->_color_pairs[pair] = result;
--    if (GET_SCREEN_PAIR(SP) == pair)
--	SET_SCREEN_PAIR(SP, (chtype) (~0));	/* force attribute update */
-+    SP_PARM->_color_pairs[pair] = result;
-+    if (GET_SCREEN_PAIR(SP_PARM) == pair)
-+	SET_SCREEN_PAIR(SP_PARM, (chtype) (~0));	/* force attribute update */
- 
-     if (initialize_pair && InPalette(f) && InPalette(b)) {
- 	const color_t *tp = hue_lightness_saturation ? hls_palette : cga_palette;
-@@ -404,54 +502,79 @@
-     returnCode(OK);
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+init_pair(short pair, short f, short b)
-+{
-+    return NCURSES_SP_NAME(init_pair) (CURRENT_SCREEN, pair, f, b);
-+}
-+#endif
-+
- #define okRGB(n) ((n) >= 0 && (n) <= 1000)
- 
- NCURSES_EXPORT(int)
--init_color(short color, short r, short g, short b)
-+NCURSES_SP_NAME(init_color) (NCURSES_SP_DCLx
-+			     short color, short r, short g, short b)
- {
-     int result = ERR;
- 
-     T((T_CALLED("init_color(%d,%d,%d,%d)"), color, r, g, b));
- 
-     if (initialize_color != NULL
--	&& SP != 0
--	&& SP->_coloron
-+	&& SP_PARM != 0
-+	&& SP_PARM->_coloron
- 	&& (color >= 0 && OkColorHi(color))
- 	&& (okRGB(r) && okRGB(g) && okRGB(b))) {
- 
--	SP->_color_table[color].init = 1;
--	SP->_color_table[color].r = r;
--	SP->_color_table[color].g = g;
--	SP->_color_table[color].b = b;
-+	SP_PARM->_color_table[color].init = 1;
-+	SP_PARM->_color_table[color].r = r;
-+	SP_PARM->_color_table[color].g = g;
-+	SP_PARM->_color_table[color].b = b;
- 
- 	if (hue_lightness_saturation) {
- 	    rgb2hls(r, g, b,
--		    &SP->_color_table[color].red,
--		    &SP->_color_table[color].green,
--		    &SP->_color_table[color].blue);
-+		    &SP_PARM->_color_table[color].red,
-+		    &SP_PARM->_color_table[color].green,
-+		    &SP_PARM->_color_table[color].blue);
- 	} else {
--	    SP->_color_table[color].red = r;
--	    SP->_color_table[color].green = g;
--	    SP->_color_table[color].blue = b;
-+	    SP_PARM->_color_table[color].red = r;
-+	    SP_PARM->_color_table[color].green = g;
-+	    SP_PARM->_color_table[color].blue = b;
- 	}
- 
- 	TPUTS_TRACE("initialize_color");
- 	putp(TPARM_4(initialize_color, color, r, g, b));
--	SP->_color_defs = max(color + 1, SP->_color_defs);
-+	SP_PARM->_color_defs = max(color + 1, SP_PARM->_color_defs);
- 	result = OK;
-     }
-     returnCode(result);
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+init_color(short color, short r, short g, short b)
-+{
-+    return NCURSES_SP_NAME(init_color) (CURRENT_SCREEN, color, r, g, b);
-+}
-+#endif
-+
- NCURSES_EXPORT(bool)
--can_change_color(void)
-+NCURSES_SP_NAME(can_change_color) (NCURSES_SP_DCL0)
- {
-     T((T_CALLED("can_change_color()")));
-     returnCode((can_change != 0) ? TRUE : FALSE);
- }
- 
-+#if NCURSES_SP_FUNCS
- NCURSES_EXPORT(bool)
--has_colors(void)
-+can_change_color(void)
-+{
-+    return NCURSES_SP_NAME(can_change_color) (CURRENT_SCREEN);
-+}
-+#endif
-+
-+NCURSES_EXPORT(bool)
-+NCURSES_SP_NAME(has_colors) (NCURSES_SP_DCL0)
- {
-     T((T_CALLED("has_colors()")));
-     returnCode((VALID_NUMERIC(max_colors) && VALID_NUMERIC(max_pairs)
-@@ -462,18 +585,27 @@
- 		    || set_color_pair)) ? TRUE : FALSE);
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(bool)
-+has_colors(void)
-+{
-+    return NCURSES_SP_NAME(has_colors) (CURRENT_SCREEN);
-+}
-+#endif
-+
- NCURSES_EXPORT(int)
--color_content(short color, short *r, short *g, short *b)
-+NCURSES_SP_NAME(color_content) (NCURSES_SP_DCLx short color, short *r,
-+				short *g, short *b)
- {
-     int result;
- 
-     T((T_CALLED("color_content(%d,%p,%p,%p)"), color, r, g, b));
--    if (color < 0 || !OkColorHi(color) || SP == 0 || !SP->_coloron) {
-+    if (color < 0 || !OkColorHi(color) || SP_PARM == 0 || !SP_PARM->_coloron) {
- 	result = ERR;
-     } else {
--	NCURSES_COLOR_T c_r = SP->_color_table[color].red;
--	NCURSES_COLOR_T c_g = SP->_color_table[color].green;
--	NCURSES_COLOR_T c_b = SP->_color_table[color].blue;
-+	NCURSES_COLOR_T c_r = SP_PARM->_color_table[color].red;
-+	NCURSES_COLOR_T c_g = SP_PARM->_color_table[color].green;
-+	NCURSES_COLOR_T c_b = SP_PARM->_color_table[color].blue;
- 
- 	if (r)
- 	    *r = c_r;
-@@ -489,18 +621,27 @@
-     returnCode(result);
- }
- 
-+#if NCURSES_SP_FUNCS
- NCURSES_EXPORT(int)
--pair_content(short pair, short *f, short *b)
-+color_content(short color, short *r, short *g, short *b)
-+{
-+    return NCURSES_SP_NAME(color_content) (CURRENT_SCREEN, color, r, g, b);
-+}
-+#endif
-+
-+NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(pair_content) (NCURSES_SP_DCLx short pair, short *f,
-+			       short *b)
- {
-     int result;
- 
-     T((T_CALLED("pair_content(%d,%p,%p)"), pair, f, b));
- 
--    if ((pair < 0) || (pair >= COLOR_PAIRS) || SP == 0 || !SP->_coloron) {
-+    if (!ValidPair(pair)) {
- 	result = ERR;
-     } else {
--	NCURSES_COLOR_T fg = ((SP->_color_pairs[pair] >> C_SHIFT) & C_MASK);
--	NCURSES_COLOR_T bg = (SP->_color_pairs[pair] & C_MASK);
-+	NCURSES_COLOR_T fg = FORE_OF(SP_PARM->_color_pairs[pair]);
-+	NCURSES_COLOR_T bg = BACK_OF(SP_PARM->_color_pairs[pair]);
- 
- #if NCURSES_EXT_FUNCS
- 	if (fg == COLOR_DEFAULT)
-@@ -520,27 +661,41 @@
-     returnCode(result);
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+pair_content(short pair, short *f, short *b)
-+{
-+    return NCURSES_SP_NAME(pair_content) (CURRENT_SCREEN, pair, f, b);
-+}
-+#endif
-+
- NCURSES_EXPORT(void)
--_nc_do_color(short old_pair, short pair, bool reverse, int (*outc) (int))
-+NCURSES_SP_NAME(_nc_do_color) (NCURSES_SP_DCLx
-+			       short old_pair,
-+			       short pair,
-+			       bool reverse,
-+			       NCURSES_SP_OUTC outc)
- {
-     NCURSES_COLOR_T fg = COLOR_DEFAULT;
-     NCURSES_COLOR_T bg = COLOR_DEFAULT;
-     NCURSES_COLOR_T old_fg, old_bg;
- 
--    if (pair < 0 || pair >= COLOR_PAIRS) {
-+    if (!ValidPair(pair)) {
- 	return;
-     } else if (pair != 0) {
- 	if (set_color_pair) {
- 	    TPUTS_TRACE("set_color_pair");
--	    tputs(TPARM_1(set_color_pair, pair), 1, outc);
-+	    NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
-+				    TPARM_1(set_color_pair, pair),
-+				    1, outc);
- 	    return;
--	} else if (SP != 0) {
-+	} else if (SP_PARM != 0) {
- 	    pair_content((short) pair, &fg, &bg);
- 	}
-     }
- 
-     if (old_pair >= 0
--	&& SP != 0
-+	&& SP_PARM != 0
- 	&& pair_content(old_pair, &old_fg, &old_bg) != ERR) {
- 	if ((isDefaultColor(fg) && !isDefaultColor(old_fg))
- 	    || (isDefaultColor(bg) && !isDefaultColor(old_bg))) {
-@@ -550,20 +705,20 @@
- 	     * the terminal description, treat it as screen's indicator of ECMA
- 	     * SGR 39 and SGR 49, and assume the two sequences are independent.
- 	     */
--	    if (SP->_has_sgr_39_49
-+	    if (SP_PARM->_has_sgr_39_49
- 		&& isDefaultColor(old_bg)
- 		&& !isDefaultColor(old_fg)) {
--		tputs("\033[39m", 1, outc);
--	    } else if (SP->_has_sgr_39_49
-+		NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx "\033[39m", 1, outc);
-+	    } else if (SP_PARM->_has_sgr_39_49
- 		       && isDefaultColor(old_fg)
- 		       && !isDefaultColor(old_bg)) {
--		tputs("\033[49m", 1, outc);
-+		NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx "\033[49m", 1, outc);
- 	    } else
- #endif
--		reset_color_pair();
-+		reset_color_pair(NCURSES_SP_ARG);
- 	}
-     } else {
--	reset_color_pair();
-+	reset_color_pair(NCURSES_SP_ARG);
- 	if (old_pair < 0)
- 	    return;
-     }
-@@ -585,9 +740,22 @@
- 		     fg, bg));
- 
-     if (!isDefaultColor(fg)) {
--	set_foreground_color(fg, outc);
-+	set_foreground_color(NCURSES_SP_ARGx fg, outc);
-     }
-     if (!isDefaultColor(bg)) {
--	set_background_color(bg, outc);
-+	set_background_color(NCURSES_SP_ARGx bg, outc);
-     }
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(void)
-+_nc_do_color(short old_pair, short pair, bool reverse, NCURSES_OUTC outc)
-+{
-+    SetSafeOutcWrapper(outc);
-+    NCURSES_SP_NAME(_nc_do_color) (CURRENT_SCREEN,
-+				   old_pair,
-+				   pair,
-+				   reverse,
-+				   _nc_outc_wrapper);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_colorset.c ncurses-5.7/ncurses/base/lib_colorset.c
---- ncurses-5.7.orig/ncurses/base/lib_colorset.c	2005-01-29 13:40:51.000000000 -0800
-+++ ncurses-5.7/ncurses/base/lib_colorset.c	2009-07-19 15:02:16.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -28,7 +28,7 @@
- 
- /****************************************************************************
-  *  Author: Juergen Pfeifer,  1998                                          *
-- *     and: Thomas E. Dickey, 2005                                          *
-+ *     and: Thomas E. Dickey, 2005-on                                       *
-  ****************************************************************************/
- 
- /*
-@@ -41,20 +41,23 @@
- #include <curses.priv.h>
- #include <ctype.h>
- 
--MODULE_ID("$Id: lib_colorset.c,v 1.11 2005/01/29 21:40:51 tom Exp $")
-+MODULE_ID("$Id: lib_colorset.c,v 1.12 2009/01/25 00:44:40 tom Exp $")
- 
- NCURSES_EXPORT(int)
- wcolor_set(WINDOW *win, short color_pair_number, void *opts)
- {
-+    int code = ERR;
-+
-     T((T_CALLED("wcolor_set(%p,%d)"), win, color_pair_number));
-     if (win
- 	&& !opts
-+	&& (SP != 0)
- 	&& (color_pair_number >= 0)
--	&& (color_pair_number < COLOR_PAIRS)) {
-+	&& (color_pair_number < SP->_pair_limit)) {
- 	TR(TRACE_ATTRS, ("... current %ld", (long) GET_WINDOW_PAIR(win)));
- 	SET_WINDOW_PAIR(win, color_pair_number);
- 	if_EXT_COLORS(win->_color = color_pair_number);
--	returnCode(OK);
--    } else
--	returnCode(ERR);
-+	code = OK;
-+    }
-+    returnCode(code);
- }
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_delwin.c ncurses-5.7/ncurses/base/lib_delwin.c
---- ncurses-5.7.orig/ncurses/base/lib_delwin.c	2008-06-07 07:10:56.000000000 -0700
-+++ ncurses-5.7/ncurses/base/lib_delwin.c	2009-07-19 15:04:03.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -29,6 +29,8 @@
- /****************************************************************************
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-+ *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                         2008                    *
-  ****************************************************************************/
- 
- /*
-@@ -40,15 +42,18 @@
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_delwin.c,v 1.17 2008/06/07 14:10:56 tom Exp $")
-+MODULE_ID("$Id: lib_delwin.c,v 1.19 2009/05/23 19:56:55 tom Exp $")
- 
- static bool
- cannot_delete(WINDOW *win)
- {
-     WINDOWLIST *p;
-     bool result = TRUE;
-+#ifdef USE_SP_WINDOWLIST
-+    SCREEN *sp = _nc_screen_of(win);
-+#endif
- 
--    for (each_window(p)) {
-+    for (each_window(SP_PARM, p)) {
- 	if (&(p->win) == win) {
- 	    result = FALSE;
- 	} else if ((p->win._flags & _SUBWIN) != 0
-@@ -72,11 +77,13 @@
- 	    || cannot_delete(win)) {
- 	    result = ERR;
- 	} else {
--
-+#if NCURSES_SP_FUNCS
-+	    SCREEN *sp = _nc_screen_of(win);
-+#endif
- 	    if (win->_flags & _SUBWIN)
- 		touchwin(win->_parent);
--	    else if (curscr != 0)
--		touchwin(curscr);
-+	    else if (CurScreen(SP_PARM) != 0)
-+		touchwin(CurScreen(SP_PARM));
- 
- 	    result = _nc_freewin(win);
- 	}
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_dft_fgbg.c ncurses-5.7/ncurses/base/lib_dft_fgbg.c
---- ncurses-5.7.orig/ncurses/base/lib_dft_fgbg.c	2005-11-26 12:03:38.000000000 -0800
-+++ ncurses-5.7/ncurses/base/lib_dft_fgbg.c	2009-07-19 15:04:04.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -27,49 +27,73 @@
-  ****************************************************************************/
- 
- /****************************************************************************
-- *  Author: Thomas E. Dickey                                                *
-+ *  Author: Thomas E. Dickey          1998-on                               *
-+ *          Juergen Pfeifer           2009                                  *
-  ****************************************************************************/
- 
- #include <curses.priv.h>
--#include <term.h>
- 
--MODULE_ID("$Id: lib_dft_fgbg.c,v 1.18 2005/11/26 20:03:38 tom Exp $")
-+#ifndef CUR
-+#define CUR SP_TERMTYPE
-+#endif
-+
-+MODULE_ID("$Id: lib_dft_fgbg.c,v 1.24 2009/05/30 20:00:00 tom Exp $")
- 
- /*
-  * Modify the behavior of color-pair 0 so that the library doesn't assume that
-  * it is white on black.  This is an extension to XSI curses.
-  */
- NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(use_default_colors) (NCURSES_SP_DCL0)
-+{
-+    T((T_CALLED("use_default_colors(%p)"), SP_PARM));
-+    returnCode(NCURSES_SP_NAME(assume_default_colors) (NCURSES_SP_ARGx -1, -1));
-+}
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
- use_default_colors(void)
- {
--    T((T_CALLED("use_default_colors()")));
--    returnCode(assume_default_colors(-1, -1));
-+    return NCURSES_SP_NAME(use_default_colors) (CURRENT_SCREEN);
- }
-+#endif
- 
- /*
-  * Modify the behavior of color-pair 0 so that the library assumes that it
-  * is something specific, possibly not white on black.
-  */
- NCURSES_EXPORT(int)
--assume_default_colors(int fg, int bg)
-+NCURSES_SP_NAME(assume_default_colors) (NCURSES_SP_DCLx int fg, int bg)
- {
--    T((T_CALLED("assume_default_colors(%d,%d)"), fg, bg));
--
--    if (!orig_pair && !orig_colors)
--	returnCode(ERR);
-+    int code = ERR;
- 
--    if (initialize_pair)	/* don't know how to handle this */
--	returnCode(ERR);
--
--    SP->_default_color = isDefaultColor(fg) || isDefaultColor(bg);
--    SP->_has_sgr_39_49 = (tigetflag("AX") == TRUE);
--    SP->_default_fg = isDefaultColor(fg) ? COLOR_DEFAULT : (fg & C_MASK);
--    SP->_default_bg = isDefaultColor(bg) ? COLOR_DEFAULT : (bg & C_MASK);
--    if (SP->_color_pairs != 0) {
--	bool save = SP->_default_color;
--	SP->_default_color = TRUE;
--	init_pair(0, (short) fg, (short) bg);
--	SP->_default_color = save;
-+    T((T_CALLED("assume_default_colors(%p,%d,%d)"), SP_PARM, fg, bg));
-+#ifdef USE_TERM_DRIVER
-+    if (sp != 0)
-+	code = CallDriver_2(sp, defaultcolors, fg, bg);
-+#else
-+    if ((orig_pair || orig_colors) && !initialize_pair) {
-+
-+	SP_PARM->_default_color = isDefaultColor(fg) || isDefaultColor(bg);
-+	SP_PARM->_has_sgr_39_49 = (tigetflag("AX") == TRUE);
-+	SP_PARM->_default_fg = isDefaultColor(fg) ? COLOR_DEFAULT : (fg & C_MASK);
-+	SP_PARM->_default_bg = isDefaultColor(bg) ? COLOR_DEFAULT : (bg & C_MASK);
-+	if (SP_PARM->_color_pairs != 0) {
-+	    bool save = SP_PARM->_default_color;
-+	    SP_PARM->_default_color = TRUE;
-+	    init_pair(0, (short) fg, (short) bg);
-+	    SP_PARM->_default_color = save;
-+	}
-+	code = OK;
-     }
--    returnCode(OK);
-+#endif
-+    returnCode(code);
-+}
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+assume_default_colors(int fg, int bg)
-+{
-+    return NCURSES_SP_NAME(assume_default_colors) (CURRENT_SCREEN, fg, bg);
- }
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_driver.c ncurses-5.7/ncurses/base/lib_driver.c
---- ncurses-5.7.orig/ncurses/base/lib_driver.c	1969-12-31 16:00:00.000000000 -0800
-+++ ncurses-5.7/ncurses/base/lib_driver.c	2009-07-19 15:04:11.000000000 -0700
-@@ -0,0 +1,142 @@
-+/****************************************************************************
-+ * Copyright (c) 2008,2009 Free Software Foundation, Inc.                   *
-+ *                                                                          *
-+ * Permission is hereby granted, free of charge, to any person obtaining a  *
-+ * copy of this software and associated documentation files (the            *
-+ * "Software"), to deal in the Software without restriction, including      *
-+ * without limitation the rights to use, copy, modify, merge, publish,      *
-+ * distribute, distribute with modifications, sublicense, and/or sell       *
-+ * copies of the Software, and to permit persons to whom the Software is    *
-+ * furnished to do so, subject to the following conditions:                 *
-+ *                                                                          *
-+ * The above copyright notice and this permission notice shall be included  *
-+ * in all copies or substantial portions of the Software.                   *
-+ *                                                                          *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
-+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
-+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
-+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
-+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
-+ *                                                                          *
-+ * Except as contained in this notice, the name(s) of the above copyright   *
-+ * holders shall not be used in advertising or otherwise to promote the     *
-+ * sale, use or other dealings in this Software without prior written       *
-+ * authorization.                                                           *
-+ ****************************************************************************/
-+
-+/****************************************************************************
-+ *  Author: Juergen Pfeifer                                                 *
-+ *                                                                          *
-+ ****************************************************************************/
-+
-+#include <curses.priv.h>
-+
-+MODULE_ID("$Id: lib_driver.c,v 1.1 2009/02/21 15:11:29 juergen Exp $")
-+
-+typedef struct DriverEntry {
-+    const char *name;
-+    TERM_DRIVER *driver;
-+} DRIVER_ENTRY;
-+
-+static DRIVER_ENTRY DriverTable[] =
-+{
-+#ifdef __MINGW32__
-+    {"win", &_nc_WIN_DRIVER},
-+#endif
-+    {"tinfo", &_nc_TINFO_DRIVER}
-+};
-+
-+#define NUM_DRIVERS (int)(sizeof(DriverTable)/sizeof(DRIVER_ENTRY))
-+
-+NCURSES_EXPORT(int)
-+_nc_get_driver(TERMINAL_CONTROL_BLOCK * TCB, const char *name, int *errret)
-+{
-+    int code = ERR;
-+    int i;
-+    TERM_DRIVER *res = (TERM_DRIVER *) 0;
-+    TERM_DRIVER *use = 0;
-+
-+    assert(TCB != 0);
-+
-+    for (i = 0; i < NUM_DRIVERS; i++) {
-+	res = DriverTable[i].driver;
-+	if (res->CanHandle(TCB, name, errret)) {
-+	    use = res;
-+	    break;
-+	}
-+    }
-+    if (use != 0) {
-+	TCB->drv = use;
-+	code = OK;
-+    }
-+    return (code);
-+}
-+
-+NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(has_key) (SCREEN *sp, int keycode)
-+{
-+    T((T_CALLED("has_key(%p, %d)"), sp, keycode));
-+    returnCode(IsValidTIScreen(sp) ? CallDriver_1(sp, kyExist, keycode) : FALSE);
-+}
-+
-+NCURSES_EXPORT(int)
-+has_key(int keycode)
-+{
-+    return NCURSES_SP_NAME(has_key) (CURRENT_SCREEN, keycode);
-+}
-+
-+NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(_nc_mcprint) (SCREEN *sp, char *data, int len)
-+{
-+    int code = ERR;
-+
-+    if (0 != TerminalOf(sp))
-+	code = CallDriver_2(sp, print, data, len);
-+    return (code);
-+}
-+
-+NCURSES_EXPORT(int)
-+mcprint(char *data, int len)
-+{
-+    return NCURSES_SP_NAME(_nc_mcprint) (CURRENT_SCREEN, data, len);
-+}
-+
-+NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(doupdate) (SCREEN *sp)
-+{
-+    int code = ERR;
-+
-+    T((T_CALLED("doupdate(%p)"), sp));
-+
-+    if (IsValidScreen(sp))
-+	code = CallDriver(sp, update);
-+
-+    returnCode(code);
-+}
-+
-+NCURSES_EXPORT(int)
-+doupdate(void)
-+{
-+    return NCURSES_SP_NAME(doupdate) (CURRENT_SCREEN);
-+}
-+
-+NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(mvcur) (SCREEN *sp, int yold, int xold, int ynew, int xnew)
-+{
-+    int code = ERR;
-+    TR(TRACE_CALLS | TRACE_MOVE, (T_CALLED("mvcur(%p,%d,%d,%d,%d)"),
-+				  sp, yold, xold, ynew, xnew));
-+    if (HasTerminal(sp)) {
-+	code = CallDriver_4(sp, hwcur, yold, xold, ynew, xnew);
-+    }
-+    returnCode(code);
-+}
-+
-+NCURSES_EXPORT(int)
-+mvcur(int yold, int xold, int ynew, int xnew)
-+/* optimized cursor move from (yold, xold) to (ynew, xnew) */
-+{
-+    return NCURSES_SP_NAME(mvcur) (CURRENT_SCREEN, yold, xold, ynew, xnew);
-+}
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_echo.c ncurses-5.7/ncurses/base/lib_echo.c
---- ncurses-5.7.orig/ncurses/base/lib_echo.c	2000-12-09 18:43:27.000000000 -0800
-+++ ncurses-5.7/ncurses/base/lib_echo.c	2009-07-19 15:02:22.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998,2000 Free Software Foundation, Inc.                   *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -29,6 +29,8 @@
- /****************************************************************************
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-+ *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                         2009                    *
-  ****************************************************************************/
- 
- /*
-@@ -42,20 +44,40 @@
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_echo.c,v 1.5 2000/12/10 02:43:27 tom Exp $")
-+MODULE_ID("$Id: lib_echo.c,v 1.7 2009/02/21 20:20:40 tom Exp $")
- 
- NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(echo) (NCURSES_SP_DCL0)
-+{
-+    T((T_CALLED("echo(%p)"), SP_PARM));
-+    if (0 == SP_PARM)
-+	returnCode(ERR);
-+    SP_PARM->_echo = TRUE;
-+    returnCode(OK);
-+}
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
- echo(void)
- {
--    T((T_CALLED("echo()")));
--    SP->_echo = TRUE;
-+    return NCURSES_SP_NAME(echo) (CURRENT_SCREEN);
-+}
-+#endif
-+
-+NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(noecho) (NCURSES_SP_DCL0)
-+{
-+    T((T_CALLED("noecho(%p)"), SP_PARM));
-+    if (0 == SP_PARM)
-+	returnCode(ERR);
-+    SP_PARM->_echo = FALSE;
-     returnCode(OK);
- }
- 
-+#if NCURSES_SP_FUNCS
- NCURSES_EXPORT(int)
- noecho(void)
- {
--    T((T_CALLED("noecho()")));
--    SP->_echo = FALSE;
--    returnCode(OK);
-+    return NCURSES_SP_NAME(noecho) (CURRENT_SCREEN);
- }
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_endwin.c ncurses-5.7/ncurses/base/lib_endwin.c
---- ncurses-5.7.orig/ncurses/base/lib_endwin.c	2000-12-09 18:43:27.000000000 -0800
-+++ ncurses-5.7/ncurses/base/lib_endwin.c	2009-07-19 15:04:13.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998,2000 Free Software Foundation, Inc.                   *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -29,6 +29,8 @@
- /****************************************************************************
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-+ *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                         2009                    *
-  ****************************************************************************/
- 
- /*
-@@ -39,22 +41,39 @@
- */
- 
- #include <curses.priv.h>
--#include <term.h>
- 
--MODULE_ID("$Id: lib_endwin.c,v 1.19 2000/12/10 02:43:27 tom Exp $")
-+MODULE_ID("$Id: lib_endwin.c,v 1.21 2009/07/04 18:35:43 tom Exp $")
- 
- NCURSES_EXPORT(int)
--endwin(void)
-+NCURSES_SP_NAME(endwin) (NCURSES_SP_DCL0)
- {
--    T((T_CALLED("endwin()")));
-+    int code = ERR;
-+
-+    T((T_CALLED("endwin(%p)"), SP_PARM));
- 
--    if (SP) {
--	SP->_endwin = TRUE;
--	SP->_mouse_wrap(SP);
-+    if (SP_PARM) {
-+#ifdef USE_TERM_DRIVER
-+	TERMINAL_CONTROL_BLOCK *TCB = TCBOf(SP_PARM);
-+
-+	SP_PARM->_endwin = TRUE;
-+	if (TCB && TCB->drv && TCB->drv->scexit)
-+	    TCB->drv->scexit(SP_PARM);
-+#else
-+	SP_PARM->_endwin = TRUE;
-+	SP_PARM->_mouse_wrap(SP_PARM);
- 	_nc_screen_wrap();
- 	_nc_mvcur_wrap();	/* wrap up cursor addressing */
--	returnCode(reset_shell_mode());
-+#endif
-+	code = NCURSES_SP_NAME(reset_shell_mode) (NCURSES_SP_ARG);
-     }
- 
--    returnCode(ERR);
-+    returnCode(code);
-+}
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+endwin(void)
-+{
-+    return NCURSES_SP_NAME(endwin) (CURRENT_SCREEN);
- }
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_flash.c ncurses-5.7/ncurses/base/lib_flash.c
---- ncurses-5.7.orig/ncurses/base/lib_flash.c	2000-12-09 18:43:27.000000000 -0800
-+++ ncurses-5.7/ncurses/base/lib_flash.c	2009-07-19 15:04:03.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998,2000 Free Software Foundation, Inc.                   *
-+ * Copyright (c) 1998-2000,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -29,6 +29,8 @@
- /****************************************************************************
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-+ *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                         2009                    *
-  ****************************************************************************/
- 
- /*
-@@ -39,9 +41,12 @@
-  */
- 
- #include <curses.priv.h>
--#include <term.h>		/* beep, flash */
- 
--MODULE_ID("$Id: lib_flash.c,v 1.6 2000/12/10 02:43:27 tom Exp $")
-+#ifndef CUR
-+#define CUR SP_TERMTYPE
-+#endif
-+
-+MODULE_ID("$Id: lib_flash.c,v 1.10 2009/05/23 19:37:09 tom Exp $")
- 
- /*
-  *	flash()
-@@ -52,12 +57,15 @@
-  */
- 
- NCURSES_EXPORT(int)
--flash(void)
-+NCURSES_SP_NAME(flash) (NCURSES_SP_DCL0)
- {
-     int res = ERR;
- 
--    T((T_CALLED("flash()")));
--
-+    T((T_CALLED("flash(%p)"), SP_PARM));
-+#ifdef USE_TERM_DRIVER
-+    if (SP_PARM != 0)
-+	res = CallDriver_1(SP_PARM, doBeepOrFlash, FALSE);
-+#else
-     /* FIXME: should make sure that we are not in altchar mode */
-     if (flash_screen) {
- 	TPUTS_TRACE("flash_screen");
-@@ -68,6 +76,14 @@
- 	res = putp(bell);
- 	_nc_flush();
-     }
--
-+#endif
-     returnCode(res);
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+flash(void)
-+{
-+    return NCURSES_SP_NAME(flash) (CURRENT_SCREEN);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_freeall.c ncurses-5.7/ncurses/base/lib_freeall.c
---- ncurses-5.7.orig/ncurses/base/lib_freeall.c	2008-09-27 06:09:57.000000000 -0700
-+++ ncurses-5.7/ncurses/base/lib_freeall.c	2009-07-19 15:03:59.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -40,40 +40,40 @@
- extern int malloc_errfd;	/* FIXME */
- #endif
- 
--MODULE_ID("$Id: lib_freeall.c,v 1.54 2008/09/27 13:09:57 tom Exp $")
-+MODULE_ID("$Id: lib_freeall.c,v 1.58 2009/05/09 18:34:30 tom Exp $")
- 
- /*
-  * Free all ncurses data.  This is used for testing only (there's no practical
-  * use for it as an extension).
-  */
- NCURSES_EXPORT(void)
--_nc_freeall(void)
-+NCURSES_SP_NAME(_nc_freeall) (NCURSES_SP_DCL0)
- {
-     WINDOWLIST *p, *q;
-     static va_list empty_va;
- 
-     T((T_CALLED("_nc_freeall()")));
- #if NO_LEAKS
--    if (SP != 0) {
--	if (SP->_oldnum_list != 0) {
--	    FreeAndNull(SP->_oldnum_list);
-+    if (SP_PARM != 0) {
-+	if (SP_PARM->_oldnum_list != 0) {
-+	    FreeAndNull(SP_PARM->_oldnum_list);
- 	}
--	if (SP->_panelHook.destroy != 0) {
--	    SP->_panelHook.destroy(SP->_panelHook.stdscr_pseudo_panel);
-+	if (SP_PARM->_panelHook.destroy != 0) {
-+	    SP_PARM->_panelHook.destroy(SP_PARM->_panelHook.stdscr_pseudo_panel);
- 	}
-     }
- #endif
--    if (SP != 0) {
-+    if (SP_PARM != 0) {
- 	_nc_lock_global(curses);
- 
--	while (_nc_windows != 0) {
-+	while (WindowList(SP_PARM) != 0) {
- 	    bool deleted = FALSE;
- 
- 	    /* Delete only windows that're not a parent */
--	    for (each_window(p)) {
-+	    for (each_window(SP_PARM, p)) {
- 		bool found = FALSE;
- 
--		for (each_window(q)) {
-+		for (each_window(SP_PARM, q)) {
- 		    if ((p != q)
- 			&& (q->win._flags & _SUBWIN)
- 			&& (&(p->win) == q->win._parent)) {
-@@ -95,11 +95,9 @@
- 	    if (!deleted)
- 		break;
- 	}
--	delscreen(SP);
-+	delscreen(SP_PARM);
- 	_nc_unlock_global(curses);
-     }
--    if (cur_term != 0)
--	del_curterm(cur_term);
- 
-     (void) _nc_printf_string(0, empty_va);
- #ifdef TRACE
-@@ -121,12 +119,20 @@
-     returnVoid;
- }
- 
-+#if NCURSES_SP_FUNCS
- NCURSES_EXPORT(void)
--_nc_free_and_exit(int code)
-+_nc_freeall(void)
-+{
-+    NCURSES_SP_NAME(_nc_freeall) (CURRENT_SCREEN);
-+}
-+#endif
-+
-+NCURSES_EXPORT(void)
-+NCURSES_SP_NAME(_nc_free_and_exit) (NCURSES_SP_DCLx int code)
- {
--    char *last_setbuf = (SP != 0) ? SP->_setbuf : 0;
-+    char *last_setbuf = (SP_PARM != 0) ? SP_PARM->_setbuf : 0;
- 
--    _nc_freeall();
-+    NCURSES_SP_NAME(_nc_freeall) (NCURSES_SP_ARG);
- #ifdef TRACE
-     trace(0);			/* close trace file, freeing its setbuf */
-     {
-@@ -146,12 +152,21 @@
- }
- 
- NCURSES_EXPORT(void)
--_nc_free_and_exit(int code)
-+NCURSES_SP_NAME(_nc_free_and_exit) (NCURSES_SP_DCLx int code)
- {
--    if (SP)
--	delscreen(SP);
--    if (cur_term != 0)
--	del_curterm(cur_term);
-+    if (SP_PARM) {
-+	delscreen(SP_PARM);
-+	if (SP_PARM->_term)
-+	    NCURSES_SP_NAME(del_curterm) (NCURSES_SP_ARGx SP_PARM->_term);
-+    }
-     exit(code);
- }
- #endif
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(void)
-+_nc_free_and_exit(int code)
-+{
-+    NCURSES_SP_NAME(_nc_free_and_exit) (CURRENT_SCREEN, code);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_getch.c ncurses-5.7/ncurses/base/lib_getch.c
---- ncurses-5.7.orig/ncurses/base/lib_getch.c	2008-09-20 12:46:13.000000000 -0700
-+++ ncurses-5.7/ncurses/base/lib_getch.c	2009-07-19 15:04:13.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -30,6 +30,7 @@
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-  *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                         2009                    *
-  ****************************************************************************/
- 
- /*
-@@ -41,40 +42,80 @@
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_getch.c,v 1.99 2008/09/20 19:46:13 tom Exp $")
-+MODULE_ID("$Id: lib_getch.c,v 1.104 2009/07/04 20:41:13 tom Exp $")
- 
- #include <fifo_defs.h>
- 
- #if USE_REENTRANT
--#define GetEscdelay(sp) (sp)->_ESCDELAY
-+#define GetEscdelay(sp) *_nc_ptr_Escdelay(sp)
-+NCURSES_EXPORT(int *)
-+_nc_ptr_Escdelay(SCREEN *sp)
-+{
-+    return ptrEscdelay(sp);
-+}
- NCURSES_EXPORT(int)
- NCURSES_PUBLIC_VAR(ESCDELAY) (void)
- {
--    return SP ? GetEscdelay(SP) : 1000;
-+    return *(_nc_ptr_Escdelay(CURRENT_SCREEN));
- }
- #else
- #define GetEscdelay(sp) ESCDELAY
--NCURSES_EXPORT_VAR(int)
--ESCDELAY = 1000;		/* max interval betw. chars in funkeys, in millisecs */
-+NCURSES_EXPORT_VAR (int)
-+  ESCDELAY = 1000;		/* max interval betw. chars in funkeys, in millisecs */
- #endif
- 
- #if NCURSES_EXT_FUNCS
- NCURSES_EXPORT(int)
--set_escdelay(int value)
-+NCURSES_SP_NAME(set_escdelay) (NCURSES_SP_DCLx int value)
- {
-     int code = OK;
- #if USE_REENTRANT
--    if (SP) {
--	SP->_ESCDELAY = value;
-+    if (SP_PARM) {
-+	SET_ESCDELAY(value);
-     } else {
- 	code = ERR;
-     }
- #else
-+    (void) SP_PARM;
-     ESCDELAY = value;
- #endif
-     return code;
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+set_escdelay(int value)
-+{
-+    int code;
-+#if USE_REENTRANT
-+    code = NCURSES_SP_NAME(set_escdelay) (CURRENT_SCREEN, value);
-+#else
-+    ESCDELAY = value;
-+    code = OK;
-+#endif
-+    return code;
-+}
-+#endif
-+#endif /* NCURSES_EXT_FUNCS */
-+
-+#if NCURSES_EXT_FUNCS
-+NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(get_escdelay) (NCURSES_SP_DCL0)
-+{
-+#if !USE_REENTRANT
-+    (void) SP_PARM;
-+#endif
-+    return GetEscdelay(SP_PARM);
-+}
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+get_escdelay (void)
-+{
-+    return NCURSES_SP_NAME(get_escdelay)(CURRENT_SCREEN);
-+}
- #endif
-+#endif /* NCURSES_EXT_FUNCS */
- 
- static int
- _nc_use_meta(WINDOW *win)
-@@ -84,9 +125,9 @@
- }
- 
- #ifdef NCURSES_WGETCH_EVENTS
--#define TWAIT_MASK 7
-+#define TWAIT_MASK (TW_ANY | TW_EVENT)
- #else
--#define TWAIT_MASK 3
-+#define TWAIT_MASK TW_ANY
- #endif
- 
- /*
-@@ -100,16 +141,28 @@
- #if USE_SYSMOUSE
-     if ((sp->_mouse_type == M_SYSMOUSE)
- 	&& (sp->_sysmouse_head < sp->_sysmouse_tail)) {
--	return 2;
-+	return TW_MOUSE;
-     }
- #endif
--    rc = _nc_timed_wait(sp, TWAIT_MASK, delay, (int *) 0 EVENTLIST_2nd(evl));
-+#ifdef USE_TERM_DRIVER
-+    rc = TCBOf(sp)->drv->twait(TCBOf(sp),
-+			       TWAIT_MASK,
-+			       delay,
-+			       (int *) 0
-+			       EVENTLIST_2nd(evl));
-+#else
-+    rc = _nc_timed_wait(sp,
-+			TWAIT_MASK,
-+			delay,
-+			(int *) 0
-+			EVENTLIST_2nd(evl));
-+#endif
- #if USE_SYSMOUSE
-     if ((sp->_mouse_type == M_SYSMOUSE)
- 	&& (sp->_sysmouse_head < sp->_sysmouse_tail)
- 	&& (rc == 0)
- 	&& (errno == EINTR)) {
--	rc |= 2;
-+	rc |= TW_MOUSE;
-     }
- #endif
-     return rc;
-@@ -173,9 +226,9 @@
-     } else
- 	mask = 0;
- 
--    if (mask & 4) {
-+    if (mask & TW_EVENT) {
- 	T(("fifo_push: ungetch KEY_EVENT"));
--	_nc_ungetch(sp, KEY_EVENT);
-+	safe_ungetch(sp, KEY_EVENT);
- 	return KEY_EVENT;
-     }
- #elif USE_GPM_SUPPORT || USE_EMX_MOUSE || USE_SYSMOUSE
-@@ -185,7 +238,7 @@
- #endif
- 
- #if USE_GPM_SUPPORT || USE_EMX_MOUSE
--    if ((sp->_mouse_fd >= 0) && (mask & 2)) {
-+    if ((sp->_mouse_fd >= 0) && (mask & TW_MOUSE)) {
- 	sp->_mouse_event(sp);
- 	ch = KEY_MOUSE;
- 	n = 1;
-@@ -205,9 +258,15 @@
-     } else
- #endif
-     {				/* Can block... */
-+#ifdef USE_TERM_DRIVER
-+	int buf;
-+	n = CallDriver_1(sp, read, &buf);
-+	ch = buf;
-+#else
- 	unsigned char c2 = 0;
- 	n = read(sp->_ifd, &c2, 1);
- 	ch = c2;
-+#endif
-     }
- 
- #ifdef HIDE_EINTR
-@@ -260,12 +319,12 @@
- {
- #ifdef USE_PTHREADS
-     SCREEN *sp = _nc_screen_of(win);
--    if (_nc_use_pthreads && sp != SP) {
-+    if (_nc_use_pthreads && sp != CURRENT_SCREEN) {
- 	SCREEN *save_SP;
- 
- 	/* temporarily switch to the window's screen to check/refresh */
- 	_nc_lock_global(curses);
--	save_SP = SP;
-+	save_SP = CURRENT_SCREEN;
- 	_nc_set_screen(sp);
- 	recur_wrefresh(win);
- 	_nc_set_screen(save_SP);
-@@ -286,12 +345,12 @@
- 
-     if (sp != 0) {
- #ifdef USE_PTHREADS
--	if (_nc_use_pthreads && sp != SP) {
-+	if (_nc_use_pthreads && sp != CURRENT_SCREEN) {
- 	    SCREEN *save_SP;
- 
- 	    /* temporarily switch to the window's screen to get cooked input */
- 	    _nc_lock_global(curses);
--	    save_SP = SP;
-+	    save_SP = CURRENT_SCREEN;
- 	    _nc_set_screen(sp);
- 	    rc = recur_wgetnstr(win, buf);
- 	    _nc_set_screen(save_SP);
-@@ -362,9 +421,9 @@
- #ifdef NCURSES_WGETCH_EVENTS
- 	if (rc != KEY_EVENT)
- #endif
--	    _nc_ungetch(sp, '\n');
-+	    safe_ungetch(sp, '\n');
- 	for (bufp = buf + strlen(buf); bufp > buf; bufp--)
--	    _nc_ungetch(sp, bufp[-1]);
-+	    safe_ungetch(sp, bufp[-1]);
- 
- #ifdef NCURSES_WGETCH_EVENTS
- 	/* Return it first */
-@@ -402,7 +461,7 @@
- 	    rc = check_mouse_activity(sp, delay EVENTLIST_2nd(evl));
- 
- #ifdef NCURSES_WGETCH_EVENTS
--	    if (rc & 4) {
-+	    if (rc & TW_EVENT) {
- 		*result = KEY_EVENT;
- 		returnCode(KEY_CODE_YES);
- 	    }
-@@ -427,7 +486,7 @@
- 	 * increase the wait with mouseinterval().
- 	 */
- 	int runcount = 0;
--	int rc;
-+	int rc = 0;
- 
- 	do {
- 	    ch = kgetch(sp EVENTLIST_2nd(evl));
-@@ -442,11 +501,11 @@
- 	    (ch == KEY_MOUSE
- 	     && (((rc = check_mouse_activity(sp, sp->_maxclick
- 					     EVENTLIST_2nd(evl))) != 0
--		  && !(rc & 4))
-+		  && !(rc & TW_EVENT))
- 		 || !sp->_mouse_parse(sp, runcount)));
- #ifdef NCURSES_WGETCH_EVENTS
--	if ((rc & 4) && !ch == KEY_EVENT) {
--	    _nc_ungetch(sp, ch);
-+	if ((rc & TW_EVENT) && !(ch == KEY_EVENT)) {
-+	    safe_ungetch(sp, ch);
- 	    ch = KEY_EVENT;
- 	}
- #endif
-@@ -454,12 +513,12 @@
- #ifdef NCURSES_WGETCH_EVENTS
- 	    /* mouse event sequence ended by an event, report event */
- 	    if (ch == KEY_EVENT) {
--		_nc_ungetch(sp, KEY_MOUSE);	/* FIXME This interrupts a gesture... */
-+		safe_ungetch(sp, KEY_MOUSE);	/* FIXME This interrupts a gesture... */
- 	    } else
- #endif
- 	    {
- 		/* mouse event sequence ended by keystroke, store keystroke */
--		_nc_ungetch(sp, ch);
-+		safe_ungetch(sp, ch);
- 		ch = KEY_MOUSE;
- 	    }
- 	}
-@@ -645,7 +704,7 @@
- 	    TR(TRACE_IEVENT, ("waiting for rest of sequence"));
- 	    rc = check_mouse_activity(sp, timeleft EVENTLIST_2nd(evl));
- #ifdef NCURSES_WGETCH_EVENTS
--	    if (rc & 4) {
-+	    if (rc & TW_EVENT) {
- 		TR(TRACE_IEVENT, ("interrupted by a user event"));
- 		/* FIXME Should have preserved remainder timeleft for reuse... */
- 		peek = head;	/* Restart interpreting later */
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_getstr.c ncurses-5.7/ncurses/base/lib_getstr.c
---- ncurses-5.7.orig/ncurses/base/lib_getstr.c	2008-08-16 12:20:04.000000000 -0700
-+++ ncurses-5.7/ncurses/base/lib_getstr.c	2009-07-19 15:03:59.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -39,9 +39,8 @@
- */
- 
- #include <curses.priv.h>
--#include <term.h>
- 
--MODULE_ID("$Id: lib_getstr.c,v 1.27 2008/08/16 19:20:04 tom Exp $")
-+MODULE_ID("$Id: lib_getstr.c,v 1.28 2009/05/09 17:02:41 tom Exp $")
- 
- /*
-  * This wipes out the last character, no matter whether it was a tab, control
-@@ -89,19 +88,19 @@
-     if (!win)
- 	returnCode(ERR);
- 
--    _nc_get_tty_mode(&buf);
-+    NCURSES_SP_NAME(_nc_get_tty_mode) (NCURSES_SP_ARGx &buf);
- 
-     oldnl = sp->_nl;
-     oldecho = sp->_echo;
-     oldraw = sp->_raw;
-     oldcbreak = sp->_cbreak;
--    nl();
--    noecho();
--    noraw();
--    cbreak();
-+    NCURSES_SP_NAME(nl) (NCURSES_SP_ARG);
-+    NCURSES_SP_NAME(noecho) (NCURSES_SP_ARG);
-+    NCURSES_SP_NAME(noraw) (NCURSES_SP_ARG);
-+    NCURSES_SP_NAME(cbreak) (NCURSES_SP_ARG);
- 
--    erasec = erasechar();
--    killc = killchar();
-+    erasec = NCURSES_SP_NAME(erasechar) (NCURSES_SP_ARG);
-+    killc = NCURSES_SP_NAME(killchar) (NCURSES_SP_ARG);
- 
-     oldstr = str;
-     getyx(win, y, x);
-@@ -144,7 +143,7 @@
- 	    }
- 	} else if (ch >= KEY_MIN
- 		   || (maxlen >= 0 && str - oldstr >= maxlen)) {
--	    beep();
-+	    NCURSES_SP_NAME(beep) (NCURSES_SP_ARG);
- 	} else {
- 	    *str++ = (char) ch;
- 	    if (oldecho == TRUE) {
-@@ -193,7 +192,7 @@
-     sp->_raw = oldraw;
-     sp->_cbreak = oldcbreak;
- 
--    _nc_set_tty_mode(&buf);
-+    NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx &buf);
- 
-     *str = '\0';
-     if (ch == ERR)
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_initscr.c ncurses-5.7/ncurses/base/lib_initscr.c
---- ncurses-5.7.orig/ncurses/base/lib_initscr.c	2008-08-16 14:20:48.000000000 -0700
-+++ ncurses-5.7/ncurses/base/lib_initscr.c	2009-07-19 15:03:51.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -45,7 +45,7 @@
- #include <sys/termio.h>		/* needed for ISC */
- #endif
- 
--MODULE_ID("$Id: lib_initscr.c,v 1.38 2008/08/16 21:20:48 Werner.Fink Exp $")
-+MODULE_ID("$Id: lib_initscr.c,v 1.39 2009/02/14 20:55:49 tom Exp $")
- 
- NCURSES_EXPORT(WINDOW *)
- initscr(void)
-@@ -90,7 +90,11 @@
- 	}
- 
- 	/* def_shell_mode - done in newterm/_nc_setupscreen */
-+#if NCURSES_SP_FUNCS
-+	NCURSES_SP_NAME(def_prog_mode) (CURRENT_SCREEN);
-+#else
- 	def_prog_mode();
-+#endif
-     }
-     result = stdscr;
-     _nc_unlock_global(curses);
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_insch.c ncurses-5.7/ncurses/base/lib_insch.c
---- ncurses-5.7.orig/ncurses/base/lib_insch.c	2008-02-02 16:14:37.000000000 -0800
-+++ ncurses-5.7/ncurses/base/lib_insch.c	2009-07-19 15:04:04.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2005,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -43,24 +43,31 @@
- #include <curses.priv.h>
- #include <ctype.h>
- 
--MODULE_ID("$Id: lib_insch.c,v 1.25 2008/02/03 00:14:37 tom Exp $")
-+MODULE_ID("$Id: lib_insch.c,v 1.29 2009/05/30 16:45:16 tom Exp $")
- 
- /*
-  * Insert the given character, updating the current location to simplify
-  * inserting a string.
-  */
- NCURSES_EXPORT(int)
--_nc_insert_ch(WINDOW *win, chtype ch)
-+_nc_insert_ch(SCREEN *sp, WINDOW *win, chtype ch)
- {
-     int code = OK;
-     NCURSES_CH_T wch;
-     int count;
-     NCURSES_CONST char *s;
-+    int tabsize =
-+#if USE_REENTRANT
-+    sp->_TABSIZE
-+#else
-+    TABSIZE
-+#endif
-+     ;
- 
-     switch (ch) {
-     case '\t':
--	for (count = (TABSIZE - (win->_curx % TABSIZE)); count > 0; count--) {
--	    if ((code = _nc_insert_ch(win, ' ')) != OK)
-+	for (count = (tabsize - (win->_curx % tabsize)); count > 0; count--) {
-+	    if ((code = _nc_insert_ch(sp, win, ' ')) != OK)
- 		break;
- 	}
- 	break;
-@@ -76,7 +83,9 @@
- 	       WINDOW_EXT(win, addch_used) == 0 &&
- #endif
- 	       is8bits(ChCharOf(ch)) &&
--	       isprint(ChCharOf(ch))) {
-+	       (isprint(ChCharOf(ch)) ||
-+		(ChAttrOf(ch) & A_ALTCHARSET) ||
-+		(sp != 0 && sp->_legacy_coding && !iscntrl(ChCharOf(ch))))) {
- 	    if (win->_curx <= win->_maxx) {
- 		struct ldat *line = &(win->_line[win->_cury]);
- 		NCURSES_CH_T *end = &(line->text[win->_curx]);
-@@ -93,9 +102,9 @@
- 		win->_curx++;
- 	    }
- 	} else if (is8bits(ChCharOf(ch)) && iscntrl(ChCharOf(ch))) {
--	    s = unctrl(ChCharOf(ch));
-+	    s = NCURSES_SP_NAME(unctrl) (NCURSES_SP_ARGx ChCharOf(ch));
- 	    while (*s != '\0') {
--		code = _nc_insert_ch(win, ChAttrOf(ch) | UChar(*s));
-+		code = _nc_insert_ch(sp, win, ChAttrOf(ch) | UChar(*s));
- 		if (code != OK)
- 		    break;
- 		++s;
-@@ -114,12 +123,17 @@
- 	    } else if (count == -1) {
- 		/* handle EILSEQ */
- 		if (is8bits(ch)) {
--		    s = unctrl(ChCharOf(ch));
--		    while (*s != '\0') {
--			code = _nc_insert_ch(win, ChAttrOf(ch) | UChar(*s));
--			if (code != OK)
--			    break;
--			++s;
-+		    s = NCURSES_SP_NAME(unctrl) (NCURSES_SP_ARGx ChCharOf(ch));
-+		    if (strlen(s) > 1) {
-+			while (*s != '\0') {
-+			    code = _nc_insert_ch(sp, win,
-+						 ChAttrOf(ch) | UChar(*s));
-+			    if (code != OK)
-+				break;
-+			    ++s;
-+			}
-+		    } else {
-+			code = ERR;
- 		    }
- 		} else {
- 		    code = ERR;
-@@ -145,7 +159,7 @@
- 	oy = win->_cury;
- 	ox = win->_curx;
- 
--	code = _nc_insert_ch(win, c);
-+	code = _nc_insert_ch(_nc_screen_of(win), win, c);
- 
- 	win->_curx = ox;
- 	win->_cury = oy;
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_insnstr.c ncurses-5.7/ncurses/base/lib_insnstr.c
---- ncurses-5.7.orig/ncurses/base/lib_insnstr.c	2004-02-28 15:44:56.000000000 -0800
-+++ ncurses-5.7/ncurses/base/lib_insnstr.c	2009-07-19 15:04:04.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 2004 Free Software Foundation, Inc.                        *
-+ * Copyright (c) 2004,2009 Free Software Foundation, Inc.                   *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -40,7 +40,7 @@
- #include <curses.priv.h>
- #include <ctype.h>
- 
--MODULE_ID("$Id: lib_insnstr.c,v 1.1 2004/02/28 23:44:56 tom Exp $")
-+MODULE_ID("$Id: lib_insnstr.c,v 1.2 2009/05/30 14:53:49 tom Exp $")
- 
- NCURSES_EXPORT(int)
- winsnstr(WINDOW *win, const char *s, int n)
-@@ -54,10 +54,12 @@
-     T((T_CALLED("winsnstr(%p,%s,%d)"), win, _nc_visbufn(s, n), n));
- 
-     if (win != 0 && str != 0) {
-+	SCREEN *sp = _nc_screen_of(win);
-+
- 	oy = win->_cury;
- 	ox = win->_curx;
- 	for (cp = str; *cp && (n <= 0 || (cp - str) < n); cp++) {
--	    _nc_insert_ch(win, (chtype) UChar(*cp));
-+	    _nc_insert_ch(sp, win, (chtype) UChar(*cp));
- 	}
- 	win->_curx = ox;
- 	win->_cury = oy;
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_isendwin.c ncurses-5.7/ncurses/base/lib_isendwin.c
---- ncurses-5.7.orig/ncurses/base/lib_isendwin.c	2000-12-09 18:43:27.000000000 -0800
-+++ ncurses-5.7/ncurses/base/lib_isendwin.c	2009-07-19 15:02:20.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998,2000 Free Software Foundation, Inc.                   *
-+ * Copyright (c) 1998-2000,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -29,6 +29,8 @@
- /****************************************************************************
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-+ *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                         2009                    *
-  ****************************************************************************/
- 
- /*
-@@ -40,12 +42,20 @@
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_isendwin.c,v 1.6 2000/12/10 02:43:27 tom Exp $")
-+MODULE_ID("$Id: lib_isendwin.c,v 1.7 2009/02/15 00:36:24 tom Exp $")
- 
- NCURSES_EXPORT(bool)
--isendwin(void)
-+NCURSES_SP_NAME(isendwin) (NCURSES_SP_DCL0)
- {
--    if (SP == NULL)
-+    if (SP_PARM == NULL)
- 	return FALSE;
--    return SP->_endwin;
-+    return SP_PARM->_endwin;
-+}
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(bool)
-+isendwin(void)
-+{
-+    return NCURSES_SP_NAME(isendwin) (CURRENT_SCREEN);
- }
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_mouse.c ncurses-5.7/ncurses/base/lib_mouse.c
---- ncurses-5.7.orig/ncurses/base/lib_mouse.c	2008-10-18 14:48:55.000000000 -0700
-+++ ncurses-5.7/ncurses/base/lib_mouse.c	2009-07-19 15:04:13.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -30,6 +30,7 @@
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-  *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                         2008                    *
-  ****************************************************************************/
- 
- /*
-@@ -79,9 +80,12 @@
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_mouse.c,v 1.102 2008/10/18 21:48:55 tom Exp $")
-+#ifndef CUR
-+#define CUR SP_TERMTYPE
-+#endif
-+
-+MODULE_ID("$Id: lib_mouse.c,v 1.108 2009/07/04 19:51:08 tom Exp $")
- 
--#include <term.h>
- #include <tic.h>
- 
- #if USE_GPM_SUPPORT
-@@ -150,7 +154,7 @@
- #define LIBGPM_SONAME "libgpm.so"
- #endif
- 
--#define GET_DLSYM(name) (my_##name = (TYPE_##name) dlsym(SP->_dlopen_gpm, #name))
-+#define GET_DLSYM(name) (my_##name = (TYPE_##name) dlsym(sp->_dlopen_gpm, #name))
- 
- #endif				/* USE_GPM_SUPPORT */
- 
-@@ -164,13 +168,13 @@
- #define LastEV(sp)	((sp)->_mouse_events + EV_MAX - 1)
- 
- #undef  NEXT
--#define NEXT(ep)	((ep >= LastEV(sp)) \
--			 ? FirstEV(sp) \
-+#define NEXT(ep)	((ep >= LastEV(SP_PARM)) \
-+			 ? FirstEV(SP_PARM) \
- 			 : ep + 1)
- 
- #undef  PREV
--#define PREV(ep)	((ep <= FirstEV(sp)) \
--			 ? LastEV(sp) \
-+#define PREV(ep)	((ep <= FirstEV(SP_PARM)) \
-+			 ? LastEV(SP_PARM) \
- 			 : ep - 1)
- 
- #define IndexEV(sp, ep)	(ep - FirstEV(sp))
-@@ -340,10 +344,13 @@
- static void
- handle_sysmouse(int sig GCC_UNUSED)
- {
--    sysmouse_server(SP);
-+    sysmouse_server(CURRENT_SCREEN);
- }
- #endif /* USE_SYSMOUSE */
- 
-+#ifndef USE_TERM_DRIVER
-+#define xterm_kmous "\033[M"
-+
- static void
- init_xterm_mouse(SCREEN *sp)
- {
-@@ -352,6 +359,7 @@
-     if (!VALID_STRING(sp->_mouse_xtermcap))
- 	sp->_mouse_xtermcap = "\033[?1000%?%p1%{1}%=%th%el%;";
- }
-+#endif
- 
- static void
- enable_xterm_mouse(SCREEN *sp, int enable)
-@@ -359,7 +367,9 @@
- #if USE_EMX_MOUSE
-     sp->_emxmouse_activated = enable;
- #else
--    putp(TPARM_1(sp->_mouse_xtermcap, enable));
-+    NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx
-+			       "xterm-mouse",
-+			       TPARM_1(sp->_mouse_xtermcap, enable));
- #endif
-     sp->_mouse_active = enable;
- }
-@@ -398,7 +408,7 @@
- static void
- unload_gpm_library(SCREEN *sp)
- {
--    if (SP->_dlopen_gpm != 0) {
-+    if (sp->_dlopen_gpm != 0) {
- 	T(("unload GPM library"));
- 	sp->_mouse_gpm_loaded = FALSE;
- 	sp->_mouse_fd = -1;
-@@ -478,8 +488,6 @@
- }
- #endif /* USE_GPM_SUPPORT */
- 
--#define xterm_kmous "\033[M"
--
- static void
- initialize_mousetype(SCREEN *sp)
- {
-@@ -514,7 +522,7 @@
-     /* OS/2 VIO */
- #if USE_EMX_MOUSE
-     if (!sp->_emxmouse_thread
--	&& strstr(cur_term->type.term_names, "xterm") == 0
-+	&& strstr(TerminalOf(sp)->type.term_names, "xterm") == 0
- 	&& key_mouse) {
- 	int handles[2];
- 
-@@ -621,16 +629,21 @@
-     }
- #endif /* USE_SYSMOUSE */
- 
-+#ifdef USE_TERM_DRIVER
-+    CallDriver(sp, initmouse);
-+#else
-     /* we know how to recognize mouse events under "xterm" */
-     if (key_mouse != 0) {
- 	if (!strcmp(key_mouse, xterm_kmous)
--	    || strstr(cur_term->type.term_names, "xterm") != 0) {
-+	    || strstr(TerminalOf(sp)->type.term_names, "xterm") != 0) {
- 	    init_xterm_mouse(sp);
- 	}
--    } else if (strstr(cur_term->type.term_names, "xterm") != 0) {
-+    } else if (strstr(TerminalOf(sp)->type.term_names, "xterm") != 0) {
- 	if (_nc_add_to_try(&(sp->_keytry), xterm_kmous, KEY_MOUSE) == OK)
- 	    init_xterm_mouse(sp);
-     }
-+#endif
-+
-     returnVoid;
- }
- 
-@@ -694,11 +707,16 @@
- 
- #if USE_GPM_SUPPORT
-     case M_GPM:
--	{
-+	if (sp->_mouse_fd >= 0) {
- 	    /* query server for event, return TRUE if we find one */
- 	    Gpm_Event ev;
- 
--	    if (my_Gpm_GetEvent(&ev) == 1) {
-+	    switch (my_Gpm_GetEvent(&ev)) {
-+	    case 0:
-+		/* Connection closed, drop the mouse. */
-+		sp->_mouse_fd = -1;
-+		break;
-+	    case 1:
- 		/* there's only one mouse... */
- 		eventp->id = NORMAL_EVENT;
- 
-@@ -731,6 +749,7 @@
- 		/* bump the next-free pointer into the circular list */
- 		sp->_mouse_eventp = eventp = NEXT(eventp);
- 		result = TRUE;
-+		break;
- 	    }
- 	}
- 	break;
-@@ -937,7 +956,7 @@
- 	switch (sp->_mouse_type) {
- 	case M_XTERM:
- #if NCURSES_EXT_FUNCS
--	    keyok(KEY_MOUSE, on);
-+	    NCURSES_SP_NAME(keyok) (NCURSES_SP_ARGx KEY_MOUSE, on);
- #endif
- 	    TPUTS_TRACE("xterm mouse initialization");
- 	    enable_xterm_mouse(sp, 1);
-@@ -989,7 +1008,7 @@
- 	    return;
- 	}
-     }
--    _nc_flush();
-+    NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG);
- }
- 
- /**************************************************************************
-@@ -1264,13 +1283,13 @@
-  *
-  **************************************************************************/
- 
--static int
--_nc_getmouse(SCREEN *sp, MEVENT * aevent)
-+NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(getmouse) (NCURSES_SP_DCLx MEVENT * aevent)
- {
--    T((T_CALLED("getmouse(%p)"), aevent));
-+    T((T_CALLED("getmouse(%p,%p)"), SP_PARM, aevent));
- 
--    if ((aevent != 0) && (sp != 0) && (sp->_mouse_type != M_NONE)) {
--	MEVENT *eventp = sp->_mouse_eventp;
-+    if ((aevent != 0) && (SP_PARM != 0) && (SP_PARM->_mouse_type != M_NONE)) {
-+	MEVENT *eventp = SP_PARM->_mouse_eventp;
- 	/* compute the current-event pointer */
- 	MEVENT *prev = PREV(eventp);
- 
-@@ -1278,8 +1297,8 @@
- 	*aevent = *prev;
- 
- 	TR(TRACE_IEVENT, ("getmouse: returning event %s from slot %ld",
--			  _nc_tracemouse(sp, prev),
--			  (long) IndexEV(sp, prev)));
-+			  _nc_tracemouse(SP_PARM, prev),
-+			  (long) IndexEV(SP_PARM, prev)));
- 
- 	prev->id = INVALID_EVENT;	/* so the queue slot becomes free */
- 	returnCode(OK);
-@@ -1287,57 +1306,61 @@
-     returnCode(ERR);
- }
- 
-+#if NCURSES_SP_FUNCS
- /* grab a copy of the current mouse event */
- NCURSES_EXPORT(int)
- getmouse(MEVENT * aevent)
- {
--    return _nc_getmouse(SP, aevent);
-+    return NCURSES_SP_NAME(getmouse) (CURRENT_SCREEN, aevent);
- }
-+#endif
- 
--static int
--_nc_ungetmouse(SCREEN *sp, MEVENT * aevent)
-+NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(ungetmouse) (NCURSES_SP_DCLx MEVENT * aevent)
- {
-     int result = ERR;
- 
--    T((T_CALLED("ungetmouse(%p)"), aevent));
-+    T((T_CALLED("ungetmouse(%p,%p)"), SP_PARM, aevent));
- 
--    if (aevent != 0 && sp != 0) {
--	MEVENT *eventp = sp->_mouse_eventp;
-+    if (aevent != 0 && SP_PARM != 0) {
-+	MEVENT *eventp = SP_PARM->_mouse_eventp;
- 
- 	/* stick the given event in the next-free slot */
- 	*eventp = *aevent;
- 
- 	/* bump the next-free pointer into the circular list */
--	sp->_mouse_eventp = NEXT(eventp);
-+	SP_PARM->_mouse_eventp = NEXT(eventp);
- 
- 	/* push back the notification event on the keyboard queue */
--	result = _nc_ungetch(sp, KEY_MOUSE);
-+	result = NCURSES_SP_NAME(ungetch) (NCURSES_SP_ARGx KEY_MOUSE);
-     }
-     returnCode(result);
- }
- 
-+#if NCURSES_SP_FUNCS
- /* enqueue a synthesized mouse event to be seen by the next wgetch() */
- NCURSES_EXPORT(int)
- ungetmouse(MEVENT * aevent)
- {
--    return _nc_ungetmouse(SP, aevent);
-+    return NCURSES_SP_NAME(ungetmouse) (CURRENT_SCREEN, aevent);
- }
-+#endif
- 
- NCURSES_EXPORT(mmask_t)
--mousemask(mmask_t newmask, mmask_t * oldmask)
-+NCURSES_SP_NAME(mousemask) (NCURSES_SP_DCLx mmask_t newmask, mmask_t * oldmask)
- /* set the mouse event mask */
- {
-     mmask_t result = 0;
- 
--    T((T_CALLED("mousemask(%#lx,%p)"), (unsigned long) newmask, oldmask));
-+    T((T_CALLED("mousemask(%p,%#lx,%p)"), SP_PARM, (unsigned long) newmask, oldmask));
- 
--    if (SP != 0) {
-+    if (SP_PARM != 0) {
- 	if (oldmask)
--	    *oldmask = SP->_mouse_mask;
-+	    *oldmask = SP_PARM->_mouse_mask;
- 
--	if (newmask || SP->_mouse_initialized) {
--	    _nc_mouse_init(SP);
--	    if (SP->_mouse_type != M_NONE) {
-+	if (newmask || SP_PARM->_mouse_initialized) {
-+	    _nc_mouse_init(SP_PARM);
-+	    if (SP_PARM->_mouse_type != M_NONE) {
- 		result = newmask &
- 		    (REPORT_MOUSE_POSITION
- 		     | BUTTON_ALT
-@@ -1349,15 +1372,23 @@
- 		     | BUTTON_DOUBLE_CLICKED
- 		     | BUTTON_TRIPLE_CLICKED);
- 
--		mouse_activate(SP, (bool) (result != 0));
-+		mouse_activate(SP_PARM, (bool) (result != 0));
- 
--		SP->_mouse_mask = result;
-+		SP_PARM->_mouse_mask = result;
- 	    }
- 	}
-     }
-     returnBits(result);
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(mmask_t)
-+mousemask(mmask_t newmask, mmask_t * oldmask)
-+{
-+    return NCURSES_SP_NAME(mousemask) (CURRENT_SCREEN, newmask, oldmask);
-+}
-+#endif
-+
- NCURSES_EXPORT(bool)
- wenclose(const WINDOW *win, int y, int x)
- /* check to see if given window encloses given screen location */
-@@ -1377,17 +1408,17 @@
- }
- 
- NCURSES_EXPORT(int)
--mouseinterval(int maxclick)
-+NCURSES_SP_NAME(mouseinterval) (NCURSES_SP_DCLx int maxclick)
- /* set the maximum mouse interval within which to recognize a click */
- {
-     int oldval;
- 
--    T((T_CALLED("mouseinterval(%d)"), maxclick));
-+    T((T_CALLED("mouseinterval(%p,%d)"), SP_PARM, maxclick));
- 
--    if (SP != 0) {
--	oldval = SP->_maxclick;
-+    if (SP_PARM != 0) {
-+	oldval = SP_PARM->_maxclick;
- 	if (maxclick >= 0)
--	    SP->_maxclick = maxclick;
-+	    SP_PARM->_maxclick = maxclick;
-     } else {
- 	oldval = DEFAULT_MAXCLICK;
-     }
-@@ -1395,14 +1426,36 @@
-     returnCode(oldval);
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+mouseinterval(int maxclick)
-+{
-+    return NCURSES_SP_NAME(mouseinterval) (CURRENT_SCREEN, maxclick);
-+}
-+#endif
-+
- /* This may be used by other routines to ask for the existence of mouse
-    support */
--NCURSES_EXPORT(int)
--_nc_has_mouse(void)
-+NCURSES_EXPORT(bool)
-+_nc_has_mouse(SCREEN *sp)
-+{
-+    return (((0 == sp) || (sp->_mouse_type == M_NONE)) ? FALSE : TRUE);
-+}
-+
-+NCURSES_EXPORT(bool)
-+NCURSES_SP_NAME(has_mouse) (NCURSES_SP_DCL0)
- {
--    return (SP->_mouse_type == M_NONE ? 0 : 1);
-+    return _nc_has_mouse(SP_PARM);
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(bool)
-+has_mouse(void)
-+{
-+    return _nc_has_mouse(CURRENT_SCREEN);
-+}
-+#endif
-+
- NCURSES_EXPORT(bool)
- wmouse_trafo(const WINDOW *win, int *pY, int *pX, bool to_screen)
- {
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_mvwin.c ncurses-5.7/ncurses/base/lib_mvwin.c
---- ncurses-5.7.orig/ncurses/base/lib_mvwin.c	2006-02-25 14:53:46.000000000 -0800
-+++ ncurses-5.7/ncurses/base/lib_mvwin.c	2009-07-19 15:04:06.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2001,2006 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -29,6 +29,8 @@
- /****************************************************************************
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-+ *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                                                 *
-  ****************************************************************************/
- 
- /*
-@@ -40,11 +42,15 @@
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_mvwin.c,v 1.14 2006/02/25 22:53:46 tom Exp $")
-+MODULE_ID("$Id: lib_mvwin.c,v 1.16 2009/06/06 20:25:07 tom Exp $")
- 
- NCURSES_EXPORT(int)
- mvwin(WINDOW *win, int by, int bx)
- {
-+#if NCURSES_SP_FUNCS
-+    SCREEN *sp = _nc_screen_of(win);
-+#endif
-+
-     T((T_CALLED("mvwin(%p,%d,%d)"), win, by, bx));
- 
-     if (!win || (win->_flags & _ISPAD))
-@@ -96,8 +102,8 @@
-     }
- #endif
- 
--    if (by + win->_maxy > screen_lines - 1
--	|| bx + win->_maxx > screen_columns - 1
-+    if (by + win->_maxy > screen_lines(SP_PARM) - 1
-+	|| bx + win->_maxx > screen_columns(SP_PARM) - 1
- 	|| by < 0
- 	|| bx < 0)
- 	returnCode(ERR);
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_newterm.c ncurses-5.7/ncurses/base/lib_newterm.c
---- ncurses-5.7.orig/ncurses/base/lib_newterm.c	2008-08-16 14:20:48.000000000 -0700
-+++ ncurses-5.7/ncurses/base/lib_newterm.c	2009-07-19 15:03:59.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -30,6 +30,7 @@
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-  *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                         2009                    *
-  ****************************************************************************/
- 
- /*
-@@ -45,10 +46,14 @@
- #define _POSIX_SOURCE
- #endif
- 
-+#ifndef CUR
-+#define CUR SP_TERMTYPE 
-+#endif
-+
- #include <term.h>		/* clear_screen, cup & friends, cur_term */
- #include <tic.h>
- 
--MODULE_ID("$Id: lib_newterm.c,v 1.73 2008/08/16 21:20:48 Werner.Fink Exp $")
-+MODULE_ID("$Id: lib_newterm.c,v 1.77 2009/05/10 00:48:29 tom Exp $")
- 
- #ifndef ONLCR			/* Allows compilation under the QNX 4.2 OS */
- #define ONLCR 0
-@@ -95,7 +100,7 @@
-  * initialized.
-  */
- NCURSES_EXPORT(void)
--filter(void)
-+NCURSES_SP_NAME(filter) (NCURSES_SP_DCL0)
- {
-     START_TRACE();
-     T((T_CALLED("filter")));
-@@ -103,23 +108,42 @@
-     returnVoid;
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(void)
-+filter(void)
-+{
-+    NCURSES_SP_NAME(filter) (CURRENT_SCREEN);
-+}
-+#endif
-+
- #if NCURSES_EXT_FUNCS
- /*
-  * An extension, allowing the application to open a new screen without
-  * requiring it to also be filtered.
-  */
- NCURSES_EXPORT(void)
--nofilter(void)
-+NCURSES_SP_NAME(nofilter) (NCURSES_SP_DCL0)
- {
-     START_TRACE();
-     T((T_CALLED("nofilter")));
-     _nc_prescreen.filter_mode = FALSE;
-     returnVoid;
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(void)
-+nofilter(void)
-+{
-+    NCURSES_SP_NAME(nofilter) (CURRENT_SCREEN);
-+}
- #endif
-+#endif /* NCURSES_EXT_FUNCS */
- 
- NCURSES_EXPORT(SCREEN *)
--newterm(NCURSES_CONST char *name, FILE *ofp, FILE *ifp)
-+NCURSES_SP_NAME(newterm) (NCURSES_SP_DCLx
-+			  NCURSES_CONST char *name,
-+			  FILE *ofp,
-+			  FILE *ifp)
- {
-     int value;
-     int errret;
-@@ -133,8 +157,8 @@
-     _nc_init_pthreads();
-     _nc_lock_global(curses);
- 
--    current = SP;
--    its_term = (SP ? SP->_term : 0);
-+    current = SP_PARM;
-+    its_term = (SP_PARM ? SP_PARM->_term : 0);
- 
-     /* this loads the capability entry, then sets LINES and COLS */
-     if (setupterm(name, fileno(ofp), &errret) != ERR) {
-@@ -159,7 +183,7 @@
- 	    _nc_set_screen(current);
- 	    result = 0;
- 	} else {
--	    assert(SP != 0);
-+	    assert(SP_PARM != 0);
- 	    /*
- 	     * In setupterm() we did a set_curterm(), but it was before we set
- 	     * SP.  So the "current" screen's terminal pointer was overwritten
-@@ -233,3 +257,11 @@
-     _nc_unlock_global(curses);
-     returnSP(result);
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(SCREEN *)
-+newterm(NCURSES_CONST char *name, FILE *ofp, FILE *ifp)
-+{
-+    return NCURSES_SP_NAME(newterm) (CURRENT_SCREEN, name, ofp, ifp);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_newwin.c ncurses-5.7/ncurses/base/lib_newwin.c
---- ncurses-5.7.orig/ncurses/base/lib_newwin.c	2008-06-07 06:58:09.000000000 -0700
-+++ ncurses-5.7/ncurses/base/lib_newwin.c	2009-07-19 15:04:06.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -30,6 +30,7 @@
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-  *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                         2009                    *
-  ****************************************************************************/
- 
- /*
-@@ -42,7 +43,7 @@
- #include <curses.priv.h>
- #include <stddef.h>
- 
--MODULE_ID("$Id: lib_newwin.c,v 1.52 2008/06/07 13:58:09 tom Exp $")
-+MODULE_ID("$Id: lib_newwin.c,v 1.58 2009/06/06 17:53:11 tom Exp $")
- 
- #define window_is(name) ((sp)->_##name == win)
- 
-@@ -87,11 +88,11 @@
-     if (win != 0) {
- 	if (_nc_try_global(curses) == 0) {
- 	    q = 0;
--	    for (each_window(p)) {
-+	    for (each_window(SP, p)) {
- 		if (&(p->win) == win) {
- 		    remove_window_from_screen(win);
- 		    if (q == 0)
--			_nc_windows = p->next;
-+			WindowList(SP) = p->next;
- 		    else
- 			q->next = p->next;
- 
-@@ -115,7 +116,8 @@
- }
- 
- NCURSES_EXPORT(WINDOW *)
--newwin(int num_lines, int num_columns, int begy, int begx)
-+NCURSES_SP_NAME(newwin) (NCURSES_SP_DCLx
-+			 int num_lines, int num_columns, int begy, int begx)
- {
-     WINDOW *win;
-     NCURSES_CH_T *ptr;
-@@ -127,11 +129,13 @@
- 	returnWin(0);
- 
-     if (num_lines == 0)
--	num_lines = SP->_lines_avail - begy;
-+	num_lines = SP_PARM->_lines_avail - begy;
-     if (num_columns == 0)
--	num_columns = screen_columns - begx;
-+	num_columns = screen_columns(SP_PARM) - begx;
- 
--    if ((win = _nc_makenew(num_lines, num_columns, begy, begx, 0)) == 0)
-+    win = NCURSES_SP_NAME(_nc_makenew) (NCURSES_SP_ARGx
-+					num_lines, num_columns, begy, begx, 0);
-+    if (win == 0)
- 	returnWin(0);
- 
-     for (i = 0; i < num_lines; i++) {
-@@ -149,9 +153,22 @@
-     returnWin(win);
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(WINDOW *)
-+newwin(int num_lines, int num_columns, int begy, int begx)
-+{
-+    return NCURSES_SP_NAME(newwin) (CURRENT_SCREEN,
-+				    num_lines, num_columns,
-+				    begy, begx);
-+}
-+#endif
-+
- NCURSES_EXPORT(WINDOW *)
- derwin(WINDOW *orig, int num_lines, int num_columns, int begy, int begx)
- {
-+#if NCURSES_SP_FUNCS
-+    SCREEN *sp = CURRENT_SCREEN;
-+#endif
-     WINDOW *win;
-     int i;
-     int flags = _SUBWIN;
-@@ -177,8 +194,10 @@
-     if (orig->_flags & _ISPAD)
- 	flags |= _ISPAD;
- 
--    if ((win = _nc_makenew(num_lines, num_columns, orig->_begy + begy,
--			   orig->_begx + begx, flags)) == 0)
-+    win = NCURSES_SP_NAME(_nc_makenew) (NCURSES_SP_ARGx num_lines, num_columns,
-+					orig->_begy + begy,
-+					orig->_begx + begx, flags);
-+    if (win == 0)
- 	returnWin(0);
- 
-     win->_pary = begy;
-@@ -211,16 +230,22 @@
- }
- 
- NCURSES_EXPORT(WINDOW *)
--_nc_makenew(int num_lines, int num_columns, int begy, int begx, int flags)
-+NCURSES_SP_NAME(_nc_makenew) (NCURSES_SP_DCLx
-+			      int num_lines,
-+			      int num_columns,
-+			      int begy,
-+			      int begx,
-+			      int flags)
- {
-     int i;
-     WINDOWLIST *wp;
-     WINDOW *win;
-     bool is_pad = (flags & _ISPAD);
- 
--    T((T_CALLED("_nc_makenew(%d,%d,%d,%d)"), num_lines, num_columns, begy, begx));
-+    T((T_CALLED("_nc_makenew(%p,%d,%d,%d,%d)"),
-+       SP_PARM, num_lines, num_columns, begy, begx));
- 
--    if (SP == 0)
-+    if (SP_PARM == 0)
- 	returnWin(0);
- 
-     if (!dimension_limit(num_lines) || !dimension_limit(num_columns))
-@@ -244,14 +269,16 @@
-     win->_maxx = num_columns - 1;
-     win->_begy = begy;
-     win->_begx = begx;
--    win->_yoffset = SP->_topstolen;
-+    win->_yoffset = SP_PARM->_topstolen;
- 
-     win->_flags = flags;
-     WINDOW_ATTRS(win) = A_NORMAL;
-     SetChar(win->_nc_bkgd, BLANK_TEXT, BLANK_ATTR);
- 
--    win->_clear = is_pad ? FALSE : (num_lines == screen_lines
--				    && num_columns == screen_columns);
-+    win->_clear = (is_pad
-+		   ? FALSE
-+		   : (num_lines == screen_lines(SP_PARM)
-+		      && num_columns == screen_columns(SP_PARM)));
-     win->_idlok = FALSE;
-     win->_idcok = TRUE;
-     win->_scroll = FALSE;
-@@ -300,19 +327,19 @@
- 	if_USE_SCROLL_HINTS(win->_line[i].oldindex = i);
-     }
- 
--    if (!is_pad && (begx + num_columns == screen_columns)) {
-+    if (!is_pad && (begx + num_columns == screen_columns(SP_PARM))) {
- 	win->_flags |= _ENDLINE;
- 
--	if (begx == 0 && num_lines == screen_lines && begy == 0)
-+	if (begx == 0 && num_lines == screen_lines(SP_PARM) && begy == 0)
- 	    win->_flags |= _FULLWIN;
- 
--	if (begy + num_lines == screen_lines)
-+	if (begy + num_lines == screen_lines(SP_PARM))
- 	    win->_flags |= _SCROLLWIN;
-     }
- 
--    wp->next = _nc_windows;
--    wp->screen = SP;
--    _nc_windows = wp;
-+    wp->next = WindowList(SP_PARM);
-+    wp->screen = SP_PARM;
-+    WindowList(SP_PARM) = wp;
- 
-     T((T_CREATE("window %p"), win));
- 
-@@ -320,19 +347,37 @@
-     returnWin(win);
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(WINDOW *)
-+_nc_makenew(int num_lines, int num_columns, int begy, int begx, int flags)
-+{
-+    return NCURSES_SP_NAME(_nc_makenew) (CURRENT_SCREEN,
-+					 num_lines, num_columns,
-+					 begy, begx, flags);
-+}
-+#endif
-+
- /*
-  * wgetch() and other functions with a WINDOW* parameter may use a SCREEN*
-  * internally, and it is useful to allow those to be invoked without switching
-  * SCREEN's, e.g., for multi-threaded applications.
-  */
--NCURSES_EXPORT(SCREEN *)
--_nc_screen_of(WINDOW *win)
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(WINDOW *)
-+_nc_curscr_of(SCREEN *sp)
- {
--    SCREEN *sp = 0;
-+    return sp == 0 ? 0 : sp->_curscr;
-+}
- 
--    if (win != 0) {
--	WINDOWLIST *wp = (WINDOWLIST *) win;
--	sp = wp->screen;
--    }
--    return (sp);
-+NCURSES_EXPORT(WINDOW *)
-+_nc_newscr_of(SCREEN *sp)
-+{
-+    return sp == 0 ? 0 : sp->_newscr;
-+}
-+
-+NCURSES_EXPORT(WINDOW *)
-+_nc_stdscr_of(SCREEN *sp)
-+{
-+    return sp == 0 ? 0 : sp->_stdscr;
- }
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_nl.c ncurses-5.7/ncurses/base/lib_nl.c
---- ncurses-5.7.orig/ncurses/base/lib_nl.c	2000-12-09 18:43:27.000000000 -0800
-+++ ncurses-5.7/ncurses/base/lib_nl.c	2009-07-19 15:04:13.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -29,6 +29,8 @@
- /****************************************************************************
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-+ *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                         2009                    *
-  ****************************************************************************/
- 
- /*
-@@ -42,38 +44,52 @@
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_nl.c,v 1.8 2000/12/10 02:43:27 tom Exp $")
-+MODULE_ID("$Id: lib_nl.c,v 1.11 2009/07/04 00:25:53 tom Exp $")
- 
- #ifdef __EMX__
- #include <io.h>
- #endif
- 
- NCURSES_EXPORT(int)
--nl(void)
-+NCURSES_SP_NAME(nl) (NCURSES_SP_DCL0)
- {
--    T((T_CALLED("nl()")));
--
--    SP->_nl = TRUE;
--
-+    T((T_CALLED("nl(%p)"), SP_PARM));
-+    if (0 == SP_PARM)
-+	returnCode(ERR);
-+    SP_PARM->_nl = TRUE;
- #ifdef __EMX__
-     _nc_flush();
--    _fsetmode(NC_OUTPUT, "t");
-+    _fsetmode(NC_OUTPUT(SP_PARM), "t");
- #endif
--
-     returnCode(OK);
- }
- 
-+#if NCURSES_SP_FUNCS
- NCURSES_EXPORT(int)
--nonl(void)
-+nl(void)
- {
--    T((T_CALLED("nonl()")));
--
--    SP->_nl = FALSE;
-+    return NCURSES_SP_NAME(nl) (CURRENT_SCREEN);
-+}
-+#endif
- 
-+NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(nonl) (NCURSES_SP_DCL0)
-+{
-+    T((T_CALLED("nonl(%p)"), SP_PARM));
-+    if (0 == SP_PARM)
-+	returnCode(ERR);
-+    SP_PARM->_nl = FALSE;
- #ifdef __EMX__
-     _nc_flush();
--    _fsetmode(NC_OUTPUT, "b");
-+    _fsetmode(NC_OUTPUT(SP_PARM), "b");
- #endif
--
-     returnCode(OK);
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+nonl(void)
-+{
-+    return NCURSES_SP_NAME(nonl) (CURRENT_SCREEN);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_pad.c ncurses-5.7/ncurses/base/lib_pad.c
---- ncurses-5.7.orig/ncurses/base/lib_pad.c	2006-10-14 13:47:13.000000000 -0700
-+++ ncurses-5.7/ncurses/base/lib_pad.c	2009-07-19 15:04:13.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2004,2006 Free Software Foundation, Inc.                   *
-+ * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -29,6 +29,8 @@
- /****************************************************************************
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-+ *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                         2009                    *
-  ****************************************************************************/
- 
- /*
-@@ -40,21 +42,22 @@
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_pad.c,v 1.41 2006/10/14 20:47:13 tom Exp $")
-+MODULE_ID("$Id: lib_pad.c,v 1.44 2009/07/04 19:45:20 tom Exp $")
- 
- NCURSES_EXPORT(WINDOW *)
--newpad(int l, int c)
-+NCURSES_SP_NAME(newpad) (NCURSES_SP_DCLx int l, int c)
- {
-     WINDOW *win;
-     NCURSES_CH_T *ptr;
-     int i;
- 
--    T((T_CALLED("newpad(%d, %d)"), l, c));
-+    T((T_CALLED("newpad(%p,%d, %d)"), SP_PARM, l, c));
- 
-     if (l <= 0 || c <= 0)
- 	returnWin(0);
- 
--    if ((win = _nc_makenew(l, c, 0, 0, _ISPAD)) == NULL)
-+    win = NCURSES_SP_NAME(_nc_makenew) (NCURSES_SP_ARGx l, c, 0, 0, _ISPAD);
-+    if (win == NULL)
- 	returnWin(0);
- 
-     for (i = 0; i < l; i++) {
-@@ -70,6 +73,14 @@
-     returnWin(win);
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(WINDOW *)
-+newpad(int l, int c)
-+{
-+    return NCURSES_SP_NAME(newpad) (CURRENT_SCREEN, l, c);
-+}
-+#endif
-+
- NCURSES_EXPORT(WINDOW *)
- subpad(WINDOW *orig, int l, int c, int begy, int begx)
- {
-@@ -94,10 +105,14 @@
- 	 int smaxrow,
- 	 int smaxcol)
- {
-+#if NCURSES_SP_FUNCS
-+    SCREEN *sp = _nc_screen_of(win);
-+#endif
-+
-     T((T_CALLED("prefresh()")));
-     if (pnoutrefresh(win, pminrow, pmincol, sminrow, smincol, smaxrow,
- 		     smaxcol) != ERR
--	&& doupdate() != ERR) {
-+	&& NCURSES_SP_NAME(doupdate) (NCURSES_SP_ARG) != ERR) {
- 	returnCode(OK);
-     }
-     returnCode(ERR);
-@@ -116,6 +131,7 @@
-     NCURSES_SIZE_T m, n;
-     NCURSES_SIZE_T pmaxrow;
-     NCURSES_SIZE_T pmaxcol;
-+    SCREEN *sp;
- 
- #if USE_SCROLL_HINTS
-     const int my_len = 2;	/* parameterize the threshold for hardscroll */
-@@ -132,6 +148,8 @@
-     if (!(win->_flags & _ISPAD))
- 	returnCode(ERR);
- 
-+    sp = _nc_screen_of(win);
-+
-     /* negative values are interpreted as zero */
-     if (pminrow < 0)
- 	pminrow = 0;
-@@ -162,8 +180,8 @@
- 	pmaxcol = pmincol + smaxcol - smincol;
-     }
- 
--    if (smaxrow >= screen_lines
--	|| smaxcol >= screen_columns
-+    if (smaxrow >= screen_lines(sp)
-+	|| smaxcol >= screen_columns(sp)
- 	|| sminrow > smaxrow
- 	|| smincol > smaxcol)
- 	returnCode(ERR);
-@@ -194,13 +212,13 @@
-      * merely change the costs of various update cases.
-      */
- #if USE_SCROLL_HINTS
--    wide = (smincol < my_len && smaxcol > (newscr->_maxx - my_len));
-+    wide = (smincol < my_len && smaxcol > (NewScreen(sp)->_maxx - my_len));
- #endif
- 
-     for (i = pminrow, m = sminrow + win->_yoffset;
--	 i <= pmaxrow && m <= newscr->_maxy;
-+	 i <= pmaxrow && m <= NewScreen(sp)->_maxy;
- 	 i++, m++) {
--	register struct ldat *nline = &newscr->_line[m];
-+	register struct ldat *nline = &NewScreen(sp)->_line[m];
- 	register struct ldat *oline = &win->_line[i];
- 	for (j = pmincol, n = smincol; j <= pmaxcol; j++, n++) {
- 	    NCURSES_CH_T ch = oline->text[j];
-@@ -229,9 +247,9 @@
- 		|| nind > smaxrow) {
- 		nind = _NEWINDEX;
- 	    } else if (displaced) {
--		register struct ldat *pline = &curscr->_line[nind];
-+		register struct ldat *pline = &CurScreen(sp)->_line[nind];
- 		for (j = 0; j <= my_len; j++) {
--		    int k = newscr->_maxx - j;
-+		    int k = NewScreen(sp)->_maxx - j;
- 		    if (pline->text[j] != nline->text[j]
- 			|| pline->text[k] != nline->text[k]) {
- 			nind = _NEWINDEX;
-@@ -266,7 +284,7 @@
- 
-     if (win->_clear) {
- 	win->_clear = FALSE;
--	newscr->_clear = TRUE;
-+	NewScreen(sp)->_clear = TRUE;
-     }
- 
-     /*
-@@ -278,10 +296,10 @@
- 	&& win->_curx >= pmincol
- 	&& win->_cury <= pmaxrow
- 	&& win->_curx <= pmaxcol) {
--	newscr->_cury = win->_cury - pminrow + win->_begy + win->_yoffset;
--	newscr->_curx = win->_curx - pmincol + win->_begx;
-+	NewScreen(sp)->_cury = win->_cury - pminrow + win->_begy + win->_yoffset;
-+	NewScreen(sp)->_curx = win->_curx - pmincol + win->_begx;
-     }
--    newscr->_leaveok = win->_leaveok;
-+    NewScreen(sp)->_leaveok = win->_leaveok;
-     win->_flags &= ~_HASMOVED;
- 
-     /*
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_printw.c ncurses-5.7/ncurses/base/lib_printw.c
---- ncurses-5.7.orig/ncurses/base/lib_printw.c	2006-12-17 11:21:39.000000000 -0800
-+++ ncurses-5.7/ncurses/base/lib_printw.c	2009-07-19 15:03:53.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -39,7 +39,7 @@
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_printw.c,v 1.18 2006/12/17 19:21:39 tom Exp $")
-+MODULE_ID("$Id: lib_printw.c,v 1.19 2009/04/18 18:45:55 tom Exp $")
- 
- NCURSES_EXPORT(int)
- printw(const char *fmt,...)
-@@ -128,10 +128,14 @@
- {
-     char *buf;
-     int code = ERR;
-+#if NCURSES_SP_FUNCS
-+    SCREEN *sp = _nc_screen_of(win);
-+#endif
- 
-     T((T_CALLED("vwprintw(%p,%s,va_list)"), win, _nc_visbuf(fmt)));
- 
--    if ((buf = _nc_printf_string(fmt, argp)) != 0) {
-+    buf = NCURSES_SP_NAME(_nc_printf_string) (NCURSES_SP_ARGx fmt, argp);
-+    if (buf != 0) {
- 	code = waddstr(win, buf);
-     }
-     returnCode(code);
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_redrawln.c ncurses-5.7/ncurses/base/lib_redrawln.c
---- ncurses-5.7.orig/ncurses/base/lib_redrawln.c	2007-10-13 13:08:56.000000000 -0700
-+++ ncurses-5.7/ncurses/base/lib_redrawln.c	2009-07-19 15:03:53.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -39,7 +39,7 @@
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_redrawln.c,v 1.12 2007/10/13 20:08:56 tom Exp $")
-+MODULE_ID("$Id: lib_redrawln.c,v 1.13 2009/04/18 18:46:00 tom Exp $")
- 
- NCURSES_EXPORT(int)
- wredrawln(WINDOW *win, int beg, int num)
-@@ -47,37 +47,40 @@
-     int i;
-     int end;
-     size_t len;
-+    SCREEN *sp;
- 
-     T((T_CALLED("wredrawln(%p,%d,%d)"), win, beg, num));
- 
-     if (win == 0)
- 	returnCode(ERR);
- 
-+    sp = _nc_screen_of(win);
-+
-     if (beg < 0)
- 	beg = 0;
- 
-     if (touchline(win, beg, num) == ERR)
- 	returnCode(ERR);
- 
--    if (touchline(curscr, beg + win->_begy, num) == ERR)
-+    if (touchline(sp->_curscr, beg + win->_begy, num) == ERR)
- 	returnCode(ERR);
- 
-     end = beg + num;
--    if (end > curscr->_maxy + 1)
--	end = curscr->_maxy + 1;
-+    if (end > sp->_curscr->_maxy + 1)
-+	end = sp->_curscr->_maxy + 1;
-     if (end > win->_maxy + 1)
- 	end = win->_maxy + 1;
- 
-     len = (win->_maxx + 1);
--    if (len > (size_t) (curscr->_maxx + 1))
--	len = (size_t) (curscr->_maxx + 1);
--    len *= sizeof(curscr->_line[0].text[0]);
-+    if (len > (size_t) (sp->_curscr->_maxx + 1))
-+	len = (size_t) (sp->_curscr->_maxx + 1);
-+    len *= sizeof(sp->_curscr->_line[0].text[0]);
- 
-     for (i = beg; i < end; i++) {
- 	int crow = i + win->_begy;
- 
--	memset(curscr->_line[crow].text + win->_begx, 0, len);
--	_nc_make_oldhash(crow);
-+	memset(sp->_curscr->_line[crow].text + win->_begx, 0, len);
-+	NCURSES_SP_NAME(_nc_make_oldhash) (NCURSES_SP_ARGx crow);
-     }
- 
-     returnCode(OK);
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_refresh.c ncurses-5.7/ncurses/base/lib_refresh.c
---- ncurses-5.7.orig/ncurses/base/lib_refresh.c	2007-09-29 13:39:34.000000000 -0700
-+++ ncurses-5.7/ncurses/base/lib_refresh.c	2009-07-19 15:04:06.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -30,6 +30,7 @@
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-  *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                                                 *
-  ****************************************************************************/
- 
- /*
-@@ -41,24 +42,27 @@
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_refresh.c,v 1.41 2007/09/29 20:39:34 tom Exp $")
-+MODULE_ID("$Id: lib_refresh.c,v 1.42 2009/06/06 20:27:39 tom Exp $")
- 
- NCURSES_EXPORT(int)
- wrefresh(WINDOW *win)
- {
-     int code;
-+#if NCURSES_SP_FUNCS
-+    SCREEN *SP_PARM = _nc_screen_of(win);
-+#endif
- 
-     T((T_CALLED("wrefresh(%p)"), win));
- 
-     if (win == 0) {
- 	code = ERR;
--    } else if (win == curscr) {
--	curscr->_clear = TRUE;
--	code = doupdate();
-+    } else if (win == CurScreen(SP_PARM)) {
-+	CurScreen(SP_PARM)->_clear = TRUE;
-+	code = NCURSES_SP_NAME(doupdate) (NCURSES_SP_ARG);
-     } else if ((code = wnoutrefresh(win)) == OK) {
- 	if (win->_clear)
--	    newscr->_clear = TRUE;
--	code = doupdate();
-+	    NewScreen(SP_PARM)->_clear = TRUE;
-+	code = NCURSES_SP_NAME(doupdate) (NCURSES_SP_ARG);
- 	/*
- 	 * Reset the clearok() flag in case it was set for the special
- 	 * case in hardscroll.c (if we don't reset it here, we'll get 2
-@@ -81,6 +85,9 @@
- #if USE_SCROLL_HINTS
-     bool wide;
- #endif
-+#if NCURSES_SP_FUNCS
-+    SCREEN *SP_PARM = _nc_screen_of(win);
-+#endif
- 
-     T((T_CALLED("wnoutrefresh(%p)"), win));
- #ifdef TRACE
-@@ -101,8 +108,8 @@
-     begx = win->_begx;
-     begy = win->_begy;
- 
--    newscr->_nc_bkgd = win->_nc_bkgd;
--    WINDOW_ATTRS(newscr) = WINDOW_ATTRS(win);
-+    NewScreen(SP_PARM)->_nc_bkgd = win->_nc_bkgd;
-+    WINDOW_ATTRS(NewScreen(SP_PARM)) = WINDOW_ATTRS(win);
- 
-     /* merge in change information from all subwindows of this window */
-     wsyncdown(win);
-@@ -122,7 +129,7 @@
-      * windows).  Note that changing this formula will not break any code,
-      * merely change the costs of various update cases.
-      */
--    wide = (begx <= 1 && win->_maxx >= (newscr->_maxx - 1));
-+    wide = (begx <= 1 && win->_maxx >= (NewScreen(SP_PARM)->_maxx - 1));
- #endif
- 
-     win->_flags &= ~_HASMOVED;
-@@ -137,13 +144,13 @@
-     /* limit(dst_col) */
-     limit_x = win->_maxx;
-     /* limit(src_col) */
--    if (limit_x > newscr->_maxx - begx)
--	limit_x = newscr->_maxx - begx;
-+    if (limit_x > NewScreen(SP_PARM)->_maxx - begx)
-+	limit_x = NewScreen(SP_PARM)->_maxx - begx;
- 
-     for (src_row = 0, dst_row = begy + win->_yoffset;
--	 src_row <= win->_maxy && dst_row <= newscr->_maxy;
-+	 src_row <= win->_maxy && dst_row <= NewScreen(SP_PARM)->_maxy;
- 	 src_row++, dst_row++) {
--	register struct ldat *nline = &newscr->_line[dst_row];
-+	register struct ldat *nline = &(NewScreen(SP_PARM)->_line[dst_row]);
- 	register struct ldat *oline = &win->_line[src_row];
- 
- 	if (oline->firstchar != _NOCHANGE) {
-@@ -225,7 +232,8 @@
- 		     * this character.  Find the end of the character.
- 		     */
- 		    ++j;
--		    while (j <= newscr->_maxx && isWidecExt(nline->text[j])) {
-+		    while (j <= NewScreen(SP_PARM)->_maxx &&
-+			   isWidecExt(nline->text[j])) {
- 			fix_right = j++;
- 		    }
- 		}
-@@ -269,18 +277,18 @@
- 
-     if (win->_clear) {
- 	win->_clear = FALSE;
--	newscr->_clear = TRUE;
-+	NewScreen(SP_PARM)->_clear = TRUE;
-     }
- 
-     if (!win->_leaveok) {
--	newscr->_cury = win->_cury + win->_begy + win->_yoffset;
--	newscr->_curx = win->_curx + win->_begx;
-+	NewScreen(SP_PARM)->_cury = win->_cury + win->_begy + win->_yoffset;
-+	NewScreen(SP_PARM)->_curx = win->_curx + win->_begx;
-     }
--    newscr->_leaveok = win->_leaveok;
-+    NewScreen(SP_PARM)->_leaveok = win->_leaveok;
- 
- #ifdef TRACE
-     if (USE_TRACEF(TRACE_UPDATE)) {
--	_tracedump("newscr", newscr);
-+	_tracedump("newscr", NewScreen(SP_PARM));
- 	_nc_unlock_global(tracef);
-     }
- #endif /* TRACE */
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_restart.c ncurses-5.7/ncurses/base/lib_restart.c
---- ncurses-5.7.orig/ncurses/base/lib_restart.c	2008-06-21 10:31:22.000000000 -0700
-+++ ncurses-5.7/ncurses/base/lib_restart.c	2009-07-19 15:03:58.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -30,6 +30,7 @@
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-  *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                         2008                    *
-  ****************************************************************************/
- 
- /*
-@@ -44,49 +45,52 @@
- #define _POSIX_SOURCE
- #endif
- 
--#include <term.h>		/* lines, columns, cur_term */
--
--MODULE_ID("$Id: lib_restart.c,v 1.10 2008/06/21 17:31:22 tom Exp $")
-+MODULE_ID("$Id: lib_restart.c,v 1.11 2009/05/02 20:47:42 tom Exp $")
- 
- NCURSES_EXPORT(int)
--restartterm(NCURSES_CONST char *termp, int filenum, int *errret)
-+NCURSES_SP_NAME(restartterm) (NCURSES_SP_DCLx
-+			      NCURSES_CONST char *termp,
-+			      int filenum,
-+			      int *errret)
- {
-     int result;
- 
--    T((T_CALLED("restartterm(%s,%d,%p)"), termp, filenum, errret));
-+    T((T_CALLED("restartterm(%p,%s,%d,%p)"), SP_PARM, termp, filenum, errret));
- 
-     if (setupterm(termp, filenum, errret) != OK) {
- 	result = ERR;
--    } else if (SP != 0) {
--	int saveecho = SP->_echo;
--	int savecbreak = SP->_cbreak;
--	int saveraw = SP->_raw;
--	int savenl = SP->_nl;
--
--	if (saveecho)
--	    echo();
--	else
--	    noecho();
-+    } else if (SP_PARM != 0) {
-+	int saveecho = SP_PARM->_echo;
-+	int savecbreak = SP_PARM->_cbreak;
-+	int saveraw = SP_PARM->_raw;
-+	int savenl = SP_PARM->_nl;
-+
-+	if (saveecho) {
-+	    NCURSES_SP_NAME(echo) (NCURSES_SP_ARG);
-+	} else {
-+	    NCURSES_SP_NAME(noecho) (NCURSES_SP_ARG);
-+	}
- 
- 	if (savecbreak) {
--	    cbreak();
--	    noraw();
-+	    NCURSES_SP_NAME(cbreak) (NCURSES_SP_ARG);
-+	    NCURSES_SP_NAME(noraw) (NCURSES_SP_ARG);
- 	} else if (saveraw) {
--	    nocbreak();
--	    raw();
-+	    NCURSES_SP_NAME(nocbreak) (NCURSES_SP_ARG);
-+	    NCURSES_SP_NAME(raw) (NCURSES_SP_ARG);
-+	} else {
-+	    NCURSES_SP_NAME(nocbreak) (NCURSES_SP_ARG);
-+	    NCURSES_SP_NAME(noraw) (NCURSES_SP_ARG);
-+	}
-+	if (savenl) {
-+	    NCURSES_SP_NAME(nl) (NCURSES_SP_ARG);
- 	} else {
--	    nocbreak();
--	    noraw();
-+	    NCURSES_SP_NAME(nonl) (NCURSES_SP_ARG);
- 	}
--	if (savenl)
--	    nl();
--	else
--	    nonl();
- 
--	reset_prog_mode();
-+	NCURSES_SP_NAME(reset_prog_mode) (NCURSES_SP_ARG);
- 
- #if USE_SIZECHANGE
--	_nc_update_screensize(SP);
-+	_nc_update_screensize(SP_PARM);
- #endif
- 
- 	result = OK;
-@@ -95,3 +99,11 @@
-     }
-     returnCode(result);
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+restartterm(NCURSES_CONST char *termp, int filenum, int *errret)
-+{
-+    return NCURSES_SP_NAME(restartterm) (CURRENT_SCREEN, termp, filenum, errret);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_screen.c ncurses-5.7/ncurses/base/lib_screen.c
---- ncurses-5.7.orig/ncurses/base/lib_screen.c	2008-08-16 12:05:37.000000000 -0700
-+++ ncurses-5.7/ncurses/base/lib_screen.c	2009-07-19 15:04:06.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -30,16 +30,21 @@
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-  *     and: Thomas E. Dickey                        1996 on                 *
-+ *     and: Juergen Pfeifer                         2009                    *
-  ****************************************************************************/
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_screen.c,v 1.31 2008/08/16 19:05:37 tom Exp $")
-+#ifndef CUR
-+#define CUR SP_TERMTYPE
-+#endif
-+
-+MODULE_ID("$Id: lib_screen.c,v 1.35 2009/06/06 20:26:17 tom Exp $")
- 
- #define MAX_SIZE 0x3fff		/* 16k is big enough for a window or pad */
- 
- NCURSES_EXPORT(WINDOW *)
--getwin(FILE *filep)
-+NCURSES_SP_NAME(getwin) (NCURSES_SP_DCLx FILE *filep)
- {
-     WINDOW tmp, *nwin;
-     int n;
-@@ -56,9 +61,12 @@
- 	returnWin(0);
- 
-     if (tmp._flags & _ISPAD) {
--	nwin = newpad(tmp._maxy + 1, tmp._maxx + 1);
-+	nwin = NCURSES_SP_NAME(newpad) (NCURSES_SP_ARGx
-+					tmp._maxy + 1, tmp._maxx + 1);
-     } else {
--	nwin = newwin(tmp._maxy + 1, tmp._maxx + 1, 0, 0);
-+	nwin = NCURSES_SP_NAME(newwin) (NCURSES_SP_ARGx
-+					tmp._maxy + 1,
-+					tmp._maxx + 1, 0, 0);
-     }
- 
-     /*
-@@ -112,6 +120,14 @@
-     returnWin(nwin);
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(WINDOW *)
-+getwin(FILE *filep)
-+{
-+    return NCURSES_SP_NAME(getwin) (CURRENT_SCREEN, filep);
-+}
-+#endif
-+
- NCURSES_EXPORT(int)
- putwin(WINDOW *win, FILE *filep)
- {
-@@ -141,26 +157,34 @@
- }
- 
- NCURSES_EXPORT(int)
--scr_restore(const char *file)
-+NCURSES_SP_NAME(scr_restore) (NCURSES_SP_DCLx const char *file)
- {
-     FILE *fp = 0;
- 
--    T((T_CALLED("scr_restore(%s)"), _nc_visbuf(file)));
-+    T((T_CALLED("scr_restore(%p,%s)"), SP_PARM, _nc_visbuf(file)));
- 
-     if (_nc_access(file, R_OK) < 0
- 	|| (fp = fopen(file, "rb")) == 0) {
- 	returnCode(ERR);
-     } else {
--	delwin(newscr);
--	SP->_newscr = getwin(fp);
-+	delwin(NewScreen(SP_PARM));
-+	NewScreen(SP_PARM) = getwin(fp);
- #if !USE_REENTRANT
--	newscr = SP->_newscr;
-+	newscr = NewScreen(SP_PARM);
- #endif
- 	(void) fclose(fp);
- 	returnCode(OK);
-     }
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+scr_restore(const char *file)
-+{
-+    return NCURSES_SP_NAME(scr_restore) (CURRENT_SCREEN, file);
-+}
-+#endif
-+
- NCURSES_EXPORT(int)
- scr_dump(const char *file)
- {
-@@ -179,42 +203,63 @@
- }
- 
- NCURSES_EXPORT(int)
--scr_init(const char *file)
-+NCURSES_SP_NAME(scr_init) (NCURSES_SP_DCLx const char *file)
- {
-     FILE *fp = 0;
-+    int code = ERR;
- 
--    T((T_CALLED("scr_init(%s)"), _nc_visbuf(file)));
-+    T((T_CALLED("scr_init(%p,%s)"), SP_PARM, _nc_visbuf(file)));
- 
--    if (exit_ca_mode && non_rev_rmcup)
--	returnCode(ERR);
--
--    if (_nc_access(file, R_OK) < 0
--	|| (fp = fopen(file, "rb")) == 0) {
--	returnCode(ERR);
--    } else {
--	delwin(curscr);
--	SP->_curscr = getwin(fp);
-+    if (SP_PARM != 0 &&
-+#ifdef USE_TERM_DRIVER
-+	InfoOf(SP_PARM).caninit
-+#else
-+	!(exit_ca_mode && non_rev_rmcup)
-+#endif
-+	) {
-+	if (_nc_access(file, R_OK) >= 0
-+	    && (fp = fopen(file, "rb")) != 0) {
-+	    delwin(CurScreen(SP_PARM));
-+	    CurScreen(SP_PARM) = getwin(fp);
- #if !USE_REENTRANT
--	curscr = SP->_curscr;
-+	    curscr = CurScreen(SP_PARM);
- #endif
--	(void) fclose(fp);
--	returnCode(OK);
-+	    (void) fclose(fp);
-+	    code = OK;
-+	}
-     }
-+    returnCode(code);
- }
- 
-+#if NCURSES_SP_FUNCS
- NCURSES_EXPORT(int)
--scr_set(const char *file)
-+scr_init(const char *file)
- {
--    T((T_CALLED("scr_set(%s)"), _nc_visbuf(file)));
-+    return NCURSES_SP_NAME(scr_init) (CURRENT_SCREEN, file);
-+}
-+#endif
- 
--    if (scr_init(file) == ERR) {
-+NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(scr_set) (NCURSES_SP_DCLx const char *file)
-+{
-+    T((T_CALLED("scr_set(%p,%s)"), SP_PARM, _nc_visbuf(file)));
-+
-+    if (NCURSES_SP_NAME(scr_init) (NCURSES_SP_ARGx file) == ERR) {
- 	returnCode(ERR);
-     } else {
--	delwin(newscr);
--	SP->_newscr = dupwin(curscr);
-+	delwin(NewScreen(SP_PARM));
-+	NewScreen(SP_PARM) = dupwin(curscr);
- #if !USE_REENTRANT
--	newscr = SP->_newscr;
-+	newscr = NewScreen(SP_PARM);
- #endif
- 	returnCode(OK);
-     }
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+scr_set(const char *file)
-+{
-+    return NCURSES_SP_NAME(scr_set) (CURRENT_SCREEN, file);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_set_term.c ncurses-5.7/ncurses/base/lib_set_term.c
---- ncurses-5.7.orig/ncurses/base/lib_set_term.c	2008-08-04 11:11:12.000000000 -0700
-+++ ncurses-5.7/ncurses/base/lib_set_term.c	2009-07-19 15:04:11.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -30,6 +30,7 @@
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-  *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                         2009                    *
-  ****************************************************************************/
- 
- /*
-@@ -44,7 +45,11 @@
- #include <term.h>		/* cur_term */
- #include <tic.h>
- 
--MODULE_ID("$Id: lib_set_term.c,v 1.117 2008/08/04 18:11:12 tom Exp $")
-+#ifndef CUR
-+#define CUR SP_TERMTYPE
-+#endif
-+
-+MODULE_ID("$Id: lib_set_term.c,v 1.124 2009/06/27 21:36:14 tom Exp $")
- 
- NCURSES_EXPORT(SCREEN *)
- set_term(SCREEN *screenp)
-@@ -256,6 +261,9 @@
- 		bool filtered,
- 		int slk_format)
- {
-+#if NCURSES_SP_FUNCS
-+    SCREEN *sp = CURRENT_SCREEN;
-+#endif
-     char *env;
-     int bottom_stolen = 0;
-     bool support_cookies = USE_XMC_SUPPORT;
-@@ -272,6 +280,9 @@
-     }
- 
-     T(("created SP %p", SP));
-+#if NCURSES_SP_FUNCS
-+    sp = SP;			/* fixup so SET_LINES and SET_COLS works */
-+#endif
-     SP->_next_screen = _nc_screen_chain;
-     _nc_screen_chain = SP;
- 
-@@ -546,7 +557,7 @@
-     curscr = SP->_curscr;
- #endif
- #if USE_SIZECHANGE
--    SP->_resize = resizeterm;
-+    SP->_resize = NCURSES_SP_NAME(resizeterm);
- #endif
- 
-     newscr->_clear = TRUE;
-@@ -555,8 +566,8 @@
-     def_shell_mode();
-     def_prog_mode();
- 
--    for (rop = ripoff_stack;
--	 rop != ripoff_sp && (rop - ripoff_stack) < N_RIPS;
-+    for (rop = safe_ripoff_stack;
-+	 rop != safe_ripoff_sp && (rop - safe_ripoff_stack) < N_RIPS;
- 	 rop++) {
- 
- 	/* If we must simulate soft labels, grab off the line to be used.
-@@ -595,7 +606,7 @@
- 	}
-     }
-     /* reset the stack */
--    ripoff_sp = ripoff_stack;
-+    safe_ripoff_sp = safe_ripoff_stack;
- 
-     T(("creating stdscr"));
-     assert((SP->_lines_avail + SP->_topstolen + bottom_stolen) == slines);
-@@ -615,27 +626,39 @@
-  * off from the top or bottom.
-  */
- NCURSES_EXPORT(int)
--_nc_ripoffline(int line, int (*init) (WINDOW *, int))
-+NCURSES_SP_NAME(_nc_ripoffline) (NCURSES_SP_DCLx
-+				 int line,
-+				 int (*init) (WINDOW *, int))
- {
-     T((T_CALLED("_nc_ripoffline(%d, %p)"), line, init));
- 
-     if (line != 0) {
- 
--	if (ripoff_sp == 0)
--	    ripoff_sp = ripoff_stack;
--	if (ripoff_sp >= ripoff_stack + N_RIPS)
-+	if (safe_ripoff_sp == 0)
-+	    safe_ripoff_sp = safe_ripoff_stack;
-+	if (safe_ripoff_sp >= safe_ripoff_stack + N_RIPS)
- 	    returnCode(ERR);
- 
--	ripoff_sp->line = line;
--	ripoff_sp->hook = init;
--	ripoff_sp++;
-+	safe_ripoff_sp->line = line;
-+	safe_ripoff_sp->hook = init;
-+	safe_ripoff_sp++;
-     }
- 
-     returnCode(OK);
- }
- 
-+#if NCURSES_SP_FUNCS
- NCURSES_EXPORT(int)
--ripoffline(int line, int (*init) (WINDOW *, int))
-+_nc_ripoffline(int line, int (*init) (WINDOW *, int))
-+{
-+    return NCURSES_SP_NAME(_nc_ripoffline) (CURRENT_SCREEN, line, init);
-+}
-+#endif
-+
-+NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(ripoffline) (NCURSES_SP_DCLx
-+			     int line,
-+			     int (*init) (WINDOW *, int))
- {
-     START_TRACE();
-     T((T_CALLED("ripoffline(%d,%p)"), line, init));
-@@ -643,5 +666,15 @@
-     if (line == 0)
- 	returnCode(OK);
- 
--    returnCode(_nc_ripoffline((line < 0) ? -1 : 1, init));
-+    returnCode(NCURSES_SP_NAME(_nc_ripoffline) (NCURSES_SP_ARGx
-+						(line < 0) ? -1 : 1,
-+						init));
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+ripoffline(int line, int (*init) (WINDOW *, int))
-+{
-+    return NCURSES_SP_NAME(ripoffline) (CURRENT_SCREEN, line, init);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_slkatrof.c ncurses-5.7/ncurses/base/lib_slkatrof.c
---- ncurses-5.7.orig/ncurses/base/lib_slkatrof.c	2005-01-08 15:01:32.000000000 -0800
-+++ ncurses-5.7/ncurses/base/lib_slkatrof.c	2009-07-19 15:02:22.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -38,21 +38,29 @@
-  */
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_slkatrof.c,v 1.8 2005/01/08 23:01:32 tom Exp $")
-+MODULE_ID("$Id: lib_slkatrof.c,v 1.10 2009/02/21 17:35:28 tom Exp $")
- 
- NCURSES_EXPORT(int)
--slk_attroff(const chtype attr)
-+NCURSES_SP_NAME(slk_attroff) (NCURSES_SP_DCLx const chtype attr)
- {
--    T((T_CALLED("slk_attroff(%s)"), _traceattr(attr)));
-+    T((T_CALLED("slk_attroff(%p,%s)"), SP_PARM, _traceattr(attr)));
- 
--    if (SP != 0 && SP->_slk != 0) {
--	TR(TRACE_ATTRS, ("... current %s", _tracech_t(CHREF(SP->_slk->attr))));
--	RemAttr(SP->_slk->attr, attr);
-+    if (SP_PARM != 0 && SP_PARM->_slk != 0) {
-+	TR(TRACE_ATTRS, ("... current %s", _tracech_t(CHREF(SP_PARM->_slk->attr))));
-+	RemAttr(SP_PARM->_slk->attr, attr);
- 	if ((attr & A_COLOR) != 0) {
--	    SetPair(SP->_slk->attr, 0);
-+	    SetPair(SP_PARM->_slk->attr, 0);
- 	}
--	TR(TRACE_ATTRS, ("new attribute is %s", _tracech_t(CHREF(SP->_slk->attr))));
-+	TR(TRACE_ATTRS, ("new attribute is %s", _tracech_t(CHREF(SP_PARM->_slk->attr))));
- 	returnCode(OK);
-     } else
- 	returnCode(ERR);
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+slk_attroff(const chtype attr)
-+{
-+    return NCURSES_SP_NAME(slk_attroff) (CURRENT_SCREEN, attr);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_slkatron.c ncurses-5.7/ncurses/base/lib_slkatron.c
---- ncurses-5.7.orig/ncurses/base/lib_slkatron.c	2005-01-08 15:02:01.000000000 -0800
-+++ ncurses-5.7/ncurses/base/lib_slkatron.c	2009-07-19 15:02:22.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -38,21 +38,29 @@
-  */
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_slkatron.c,v 1.8 2005/01/08 23:02:01 tom Exp $")
-+MODULE_ID("$Id: lib_slkatron.c,v 1.10 2009/02/21 18:16:04 tom Exp $")
- 
- NCURSES_EXPORT(int)
--slk_attron(const chtype attr)
-+NCURSES_SP_NAME(slk_attron) (NCURSES_SP_DCLx const chtype attr)
- {
--    T((T_CALLED("slk_attron(%s)"), _traceattr(attr)));
-+    T((T_CALLED("slk_attron(%p,%s)"), SP_PARM, _traceattr(attr)));
- 
--    if (SP != 0 && SP->_slk != 0) {
--	TR(TRACE_ATTRS, ("... current %s", _tracech_t(CHREF(SP->_slk->attr))));
--	AddAttr(SP->_slk->attr, attr);
-+    if (SP_PARM != 0 && SP_PARM->_slk != 0) {
-+	TR(TRACE_ATTRS, ("... current %s", _tracech_t(CHREF(SP_PARM->_slk->attr))));
-+	AddAttr(SP_PARM->_slk->attr, attr);
- 	if ((attr & A_COLOR) != 0) {
--	    SetPair(SP->_slk->attr, PAIR_NUMBER(attr));
-+	    SetPair(SP_PARM->_slk->attr, PAIR_NUMBER(attr));
- 	}
--	TR(TRACE_ATTRS, ("new attribute is %s", _tracech_t(CHREF(SP->_slk->attr))));
-+	TR(TRACE_ATTRS, ("new attribute is %s", _tracech_t(CHREF(SP_PARM->_slk->attr))));
- 	returnCode(OK);
-     } else
- 	returnCode(ERR);
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+slk_attron(const chtype attr)
-+{
-+    return NCURSES_SP_NAME(slk_attron) (CURRENT_SCREEN, attr);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_slkatr_set.c ncurses-5.7/ncurses/base/lib_slkatr_set.c
---- ncurses-5.7.orig/ncurses/base/lib_slkatr_set.c	2005-01-28 13:11:53.000000000 -0800
-+++ ncurses-5.7/ncurses/base/lib_slkatr_set.c	2009-07-19 15:02:22.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -28,7 +28,7 @@
- 
- /****************************************************************************
-  *  Author:  Juergen Pfeifer, 1998                                          *
-- *     and:  Thomas E. Dickey 2005                                          *
-+ *     and:  Thomas E. Dickey 2005-on                                       *
-  ****************************************************************************/
- 
- /*
-@@ -38,22 +38,39 @@
-  */
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_slkatr_set.c,v 1.10 2005/01/28 21:11:53 tom Exp $")
-+MODULE_ID("$Id: lib_slkatr_set.c,v 1.13 2009/02/21 17:20:17 tom Exp $")
- 
- NCURSES_EXPORT(int)
--slk_attr_set(const attr_t attr, short color_pair_number, void *opts)
-+NCURSES_SP_NAME(slk_attr_set) (NCURSES_SP_DCLx
-+			       const attr_t attr,
-+			       short color_pair_number,
-+			       void *opts)
- {
--    T((T_CALLED("slk_attr_set(%s,%d)"), _traceattr(attr), color_pair_number));
-+    int code = ERR;
-+
-+    T((T_CALLED("slk_attr_set(%p,%s,%d)"), SP_PARM, _traceattr(attr), color_pair_number));
- 
--    if (SP != 0 && SP->_slk != 0 && !opts &&
--	color_pair_number >= 0 && color_pair_number < COLOR_PAIRS) {
--	TR(TRACE_ATTRS, ("... current %s", _tracech_t(CHREF(SP->_slk->attr))));
--	SetAttr(SP->_slk->attr, attr);
-+    if (SP_PARM != 0
-+	&& SP_PARM->_slk != 0
-+	&& !opts
-+	&& color_pair_number >= 0
-+	&& color_pair_number < SP_PARM->_pair_limit) {
-+	TR(TRACE_ATTRS, ("... current %s", _tracech_t(CHREF(SP_PARM->_slk->attr))));
-+	SetAttr(SP_PARM->_slk->attr, attr);
- 	if (color_pair_number > 0) {
--	    SetPair(SP->_slk->attr, color_pair_number);
-+	    SetPair(SP_PARM->_slk->attr, color_pair_number);
- 	}
--	TR(TRACE_ATTRS, ("new attribute is %s", _tracech_t(CHREF(SP->_slk->attr))));
--	returnCode(OK);
--    } else
--	returnCode(ERR);
-+	TR(TRACE_ATTRS, ("new attribute is %s", _tracech_t(CHREF(SP_PARM->_slk->attr))));
-+	code = OK;
-+    }
-+    returnCode(code);
-+}
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+slk_attr_set(const attr_t attr, short color_pair_number, void *opts)
-+{
-+    return NCURSES_SP_NAME(slk_attr_set) (CURRENT_SCREEN, attr,
-+					  color_pair_number, opts);
- }
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_slkatrset.c ncurses-5.7/ncurses/base/lib_slkatrset.c
---- ncurses-5.7.orig/ncurses/base/lib_slkatrset.c	2005-01-08 13:46:47.000000000 -0800
-+++ ncurses-5.7/ncurses/base/lib_slkatrset.c	2009-07-19 15:02:22.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -38,16 +38,24 @@
-  */
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_slkatrset.c,v 1.7 2005/01/08 21:46:47 tom Exp $")
-+MODULE_ID("$Id: lib_slkatrset.c,v 1.9 2009/02/21 17:49:07 tom Exp $")
- 
- NCURSES_EXPORT(int)
--slk_attrset(const chtype attr)
-+NCURSES_SP_NAME(slk_attrset) (NCURSES_SP_DCLx const chtype attr)
- {
--    T((T_CALLED("slk_attrset(%s)"), _traceattr(attr)));
-+    T((T_CALLED("slk_attrset(%p,%s)"), SP_PARM, _traceattr(attr)));
- 
--    if (SP != 0 && SP->_slk != 0) {
--	SetAttr(SP->_slk->attr, attr);
-+    if (SP_PARM != 0 && SP_PARM->_slk != 0) {
-+	SetAttr(SP_PARM->_slk->attr, attr);
- 	returnCode(OK);
-     } else
- 	returnCode(ERR);
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+slk_attrset(const chtype attr)
-+{
-+    return NCURSES_SP_NAME(slk_attrset) (CURRENT_SCREEN, attr);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_slkattr.c ncurses-5.7/ncurses/base/lib_slkattr.c
---- ncurses-5.7.orig/ncurses/base/lib_slkattr.c	2005-01-08 13:44:28.000000000 -0800
-+++ ncurses-5.7/ncurses/base/lib_slkattr.c	2009-07-19 15:02:22.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998,2000 Free Software Foundation, Inc.                   *
-+ * Copyright (c) 1998-2000,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -38,19 +38,27 @@
-  */
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_slkattr.c,v 1.6 2005/01/08 21:44:28 tom Exp $")
-+MODULE_ID("$Id: lib_slkattr.c,v 1.8 2009/02/21 17:48:14 tom Exp $")
- 
- NCURSES_EXPORT(attr_t)
--slk_attr(void)
-+NCURSES_SP_NAME(slk_attr) (NCURSES_SP_DCL0)
- {
--    T((T_CALLED("slk_attr()")));
-+    T((T_CALLED("slk_attr(%p)"), SP_PARM));
- 
--    if (SP != 0 && SP->_slk != 0) {
--	attr_t result = AttrOf(SP->_slk->attr) & ALL_BUT_COLOR;
--	int pair = GetPair(SP->_slk->attr);
-+    if (SP_PARM != 0 && SP_PARM->_slk != 0) {
-+	attr_t result = AttrOf(SP_PARM->_slk->attr) & ALL_BUT_COLOR;
-+	int pair = GetPair(SP_PARM->_slk->attr);
- 
- 	result |= COLOR_PAIR(pair);
- 	returnAttr(result);
-     } else
- 	returnAttr(0);
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(attr_t)
-+slk_attr(void)
-+{
-+    return NCURSES_SP_NAME(slk_attr) (CURRENT_SCREEN);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_slk.c ncurses-5.7/ncurses/base/lib_slk.c
---- ncurses-5.7.orig/ncurses/base/lib_slk.c	2008-09-27 07:07:33.000000000 -0700
-+++ ncurses-5.7/ncurses/base/lib_slk.c	2009-07-19 15:04:17.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2005,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -41,26 +41,81 @@
-  */
- 
- #include <curses.priv.h>
--
- #include <ctype.h>
--#include <term.h>		/* num_labels, label_*, plab_norm */
- 
--MODULE_ID("$Id: lib_slk.c,v 1.35 2008/09/27 14:07:33 juergen Exp $")
-+#ifndef CUR
-+#define CUR SP_TERMTYPE
-+#endif
-+
-+MODULE_ID("$Id: lib_slk.c,v 1.40 2009/07/19 00:34:07 tom Exp $")
- 
- /*
-  * Free any memory related to soft labels, return an error.
-  */
- static int
--slk_failed(void)
-+slk_failed(NCURSES_SP_DCL0)
- {
--    if (SP->_slk) {
--	FreeIfNeeded(SP->_slk->ent);
--	free(SP->_slk);
--	SP->_slk = (SLK *) 0;
-+    if ((0 != SP_PARM) && SP_PARM->_slk) {
-+	FreeIfNeeded(SP_PARM->_slk->ent);
-+	free(SP_PARM->_slk);
-+	SP_PARM->_slk = (SLK *) 0;
-     }
-     return ERR;
- }
- 
-+NCURSES_EXPORT(int)
-+_nc_format_slks(NCURSES_SP_DCLx int cols)
-+{
-+    int gap, i, x;
-+    unsigned max_length;
-+
-+    if (!SP_PARM || !SP_PARM->_slk)
-+	return ERR;
-+
-+    max_length = SP_PARM->_slk->maxlen;
-+    if (SP_PARM->slk_format >= 3) {	/* PC style */
-+	gap = (cols - 3 * (3 + 4 * max_length)) / 2;
-+
-+	if (gap < 1)
-+	    gap = 1;
-+
-+	for (i = x = 0; i < SP_PARM->_slk->maxlab; i++) {
-+	    SP_PARM->_slk->ent[i].ent_x = x;
-+	    x += max_length;
-+	    x += (i == 3 || i == 7) ? gap : 1;
-+	}
-+    } else {
-+	if (SP_PARM->slk_format == 2) {		/* 4-4 */
-+	    gap = cols - (SP_PARM->_slk->maxlab * max_length) - 6;
-+
-+	    if (gap < 1)
-+		gap = 1;
-+	    for (i = x = 0; i < SP_PARM->_slk->maxlab; i++) {
-+		SP_PARM->_slk->ent[i].ent_x = x;
-+		x += max_length;
-+		x += (i == 3) ? gap : 1;
-+	    }
-+	} else {
-+	    if (SP_PARM->slk_format == 1) {	/* 1 -> 3-2-3 */
-+		gap = (cols - (SP_PARM->_slk->maxlab * max_length) - 5)
-+		    / 2;
-+
-+		if (gap < 1)
-+		    gap = 1;
-+		for (i = x = 0; i < SP_PARM->_slk->maxlab; i++) {
-+		    SP_PARM->_slk->ent[i].ent_x = x;
-+		    x += max_length;
-+		    x += (i == 2 || i == 4) ? gap : 1;
-+		}
-+	    } else
-+		returnCode(slk_failed(NCURSES_SP_ARG));
-+	}
-+    }
-+    SP_PARM->_slk->dirty = TRUE;
-+
-+    return OK;
-+}
-+
- /*
-  * Initialize soft labels.
-  * Called from newterm()
-@@ -68,108 +123,91 @@
- NCURSES_EXPORT(int)
- _nc_slk_initialize(WINDOW *stwin, int cols)
- {
--    int i, x;
-+    int i;
-     int res = OK;
-     unsigned max_length;
-+    SCREEN *sp;
-+    TERMINAL *term;
-+    int numlab;
- 
-     T((T_CALLED("_nc_slk_initialize()")));
- 
--    if (SP->_slk) {		/* we did this already, so simply return */
-+    assert(stwin);
-+
-+    sp = _nc_screen_of(stwin);
-+    if (0 == sp)
-+	returnCode(ERR);
-+
-+    term = TerminalOf(SP_PARM);
-+    assert(term);
-+
-+    numlab = InfoOf(SP_PARM).numlabels;
-+
-+    if (SP_PARM->_slk) {	/* we did this already, so simply return */
- 	returnCode(OK);
--    } else if ((SP->_slk = typeCalloc(SLK, 1)) == 0)
-+    } else if ((SP_PARM->_slk = typeCalloc(SLK, 1)) == 0)
- 	returnCode(ERR);
- 
--    SP->_slk->ent = NULL;
-+    SP_PARM->_slk->hidden = TRUE;
-+    SP_PARM->_slk->ent = NULL;
-+    if (!SP_PARM->slk_format)
-+	SP_PARM->slk_format = _nc_globals.slk_format;
- 
-     /*
-      * If we use colors, vidputs() will suppress video attributes that conflict
-      * with colors.  In that case, we're still guaranteed that "reverse" would
-      * work.
-      */
--    if ((no_color_video & 1) == 0)
--	SetAttr(SP->_slk->attr, A_STANDOUT);
-+    if ((InfoOf(SP_PARM).nocolorvideo & 1) == 0)
-+	SetAttr(SP_PARM->_slk->attr, A_STANDOUT);
-     else
--	SetAttr(SP->_slk->attr, A_REVERSE);
-+	SetAttr(SP_PARM->_slk->attr, A_REVERSE);
- 
--    SP->_slk->maxlab = ((num_labels > 0)
--			? num_labels
--			: MAX_SKEY(_nc_globals.slk_format));
--    SP->_slk->maxlen = ((num_labels > 0)
--			? label_width * label_height
--			: MAX_SKEY_LEN(_nc_globals.slk_format));
--    SP->_slk->labcnt = ((SP->_slk->maxlab < MAX_SKEY(_nc_globals.slk_format))
--			? MAX_SKEY(_nc_globals.slk_format)
--			: SP->_slk->maxlab);
--
--    if (SP->_slk->maxlen <= 0
--	|| SP->_slk->labcnt <= 0
--	|| (SP->_slk->ent = typeCalloc(slk_ent,
--				       (unsigned) SP->_slk->labcnt)) == NULL)
--	returnCode(slk_failed());
-+    SP_PARM->_slk->maxlab = ((numlab > 0)
-+			     ? numlab
-+			     : MAX_SKEY(SP_PARM->slk_format));
-+    SP_PARM->_slk->maxlen = ((numlab > 0)
-+			     ? InfoOf(SP_PARM).labelwidth * InfoOf(SP_PARM).labelheight
-+			     : MAX_SKEY_LEN(SP_PARM->slk_format));
-+    SP_PARM->_slk->labcnt = ((SP_PARM->_slk->maxlab < MAX_SKEY(SP_PARM->slk_format))
-+			     ? MAX_SKEY(SP_PARM->slk_format)
-+			     : SP_PARM->_slk->maxlab);
-+
-+    if (SP_PARM->_slk->maxlen <= 0
-+	|| SP_PARM->_slk->labcnt <= 0
-+	|| (SP_PARM->_slk->ent = typeCalloc(slk_ent,
-+					    (unsigned) SP_PARM->_slk->labcnt))
-+	== NULL)
-+	returnCode(slk_failed(NCURSES_SP_ARG));
- 
--    max_length = SP->_slk->maxlen;
--    for (i = 0; i < SP->_slk->labcnt; i++) {
-+    max_length = SP_PARM->_slk->maxlen;
-+    for (i = 0; i < SP_PARM->_slk->labcnt; i++) {
- 	size_t used = max_length + 1;
- 
--	if ((SP->_slk->ent[i].ent_text = (char *) _nc_doalloc(0, used)) == 0)
--	    returnCode(slk_failed());
--	memset(SP->_slk->ent[i].ent_text, 0, used);
--
--	if ((SP->_slk->ent[i].form_text = (char *) _nc_doalloc(0, used)) == 0)
--	    returnCode(slk_failed());
--	memset(SP->_slk->ent[i].form_text, 0, used);
-+	SP_PARM->_slk->ent[i].ent_text = (char *) _nc_doalloc(0, used);
-+	if (SP_PARM->_slk->ent[i].ent_text == 0)
-+	    returnCode(slk_failed(NCURSES_SP_ARG));
-+	memset(SP_PARM->_slk->ent[i].ent_text, 0, used);
-+
-+	SP_PARM->_slk->ent[i].form_text = (char *) _nc_doalloc(0, used);
-+	if (SP_PARM->_slk->ent[i].form_text == 0)
-+	    returnCode(slk_failed(NCURSES_SP_ARG));
-+	memset(SP_PARM->_slk->ent[i].form_text, 0, used);
- 
--	memset(SP->_slk->ent[i].form_text, ' ', max_length);
--	SP->_slk->ent[i].visible = (char) (i < SP->_slk->maxlab);
-+	memset(SP_PARM->_slk->ent[i].form_text, ' ', max_length);
-+	SP_PARM->_slk->ent[i].visible = (char) (i < SP_PARM->_slk->maxlab);
-     }
--    if (_nc_globals.slk_format >= 3) {	/* PC style */
--	int gap = (cols - 3 * (3 + 4 * max_length)) / 2;
- 
--	if (gap < 1)
--	    gap = 1;
--
--	for (i = x = 0; i < SP->_slk->maxlab; i++) {
--	    SP->_slk->ent[i].ent_x = x;
--	    x += max_length;
--	    x += (i == 3 || i == 7) ? gap : 1;
--	}
--    } else {
--	if (_nc_globals.slk_format == 2) {	/* 4-4 */
--	    int gap = cols - (SP->_slk->maxlab * max_length) - 6;
--
--	    if (gap < 1)
--		gap = 1;
--	    for (i = x = 0; i < SP->_slk->maxlab; i++) {
--		SP->_slk->ent[i].ent_x = x;
--		x += max_length;
--		x += (i == 3) ? gap : 1;
--	    }
--	} else {
--	    if (_nc_globals.slk_format == 1) {	/* 1 -> 3-2-3 */
--		int gap = (cols - (SP->_slk->maxlab * max_length) - 5)
--		/ 2;
-+    res = _nc_format_slks(NCURSES_SP_ARGx cols);
- 
--		if (gap < 1)
--		    gap = 1;
--		for (i = x = 0; i < SP->_slk->maxlab; i++) {
--		    SP->_slk->ent[i].ent_x = x;
--		    x += max_length;
--		    x += (i == 2 || i == 4) ? gap : 1;
--		}
--	    } else
--		returnCode(slk_failed());
--	}
--    }
--    SP->_slk->dirty = TRUE;
--    if ((SP->_slk->win = stwin) == NULL) {
--	returnCode(slk_failed());
-+    if ((SP_PARM->_slk->win = stwin) == NULL) {
-+	returnCode(slk_failed(NCURSES_SP_ARG));
-     }
- 
-     /* We now reset the format so that the next newterm has again
-      * per default no SLK keys and may call slk_init again to
-      * define a new layout. (juergen 03-Mar-1999)
-      */
--    SP->slk_format = _nc_globals.slk_format;
-     _nc_globals.slk_format = 0;
-     returnCode(res);
- }
-@@ -178,14 +216,24 @@
-  * Restore the soft labels on the screen.
-  */
- NCURSES_EXPORT(int)
--slk_restore(void)
-+NCURSES_SP_NAME(slk_restore) (NCURSES_SP_DCL0)
- {
--    T((T_CALLED("slk_restore()")));
-+    T((T_CALLED("slk_restore(%p)"), SP_PARM));
-+
-+    if (0 == SP_PARM)
-+	returnCode(ERR);
-+    if (SP_PARM->_slk == NULL)
-+	returnCode(ERR);
-+    SP_PARM->_slk->hidden = FALSE;
-+    SP_PARM->_slk->dirty = TRUE;
- 
--    if (SP->_slk == NULL)
--	return (ERR);
--    SP->_slk->hidden = FALSE;
--    SP->_slk->dirty = TRUE;
-+    returnCode(NCURSES_SP_NAME(slk_refresh) (NCURSES_SP_ARG));
-+}
- 
--    returnCode(slk_refresh());
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+slk_restore(void)
-+{
-+    return NCURSES_SP_NAME(slk_restore) (CURRENT_SCREEN);
- }
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_slkclear.c ncurses-5.7/ncurses/base/lib_slkclear.c
---- ncurses-5.7.orig/ncurses/base/lib_slkclear.c	2007-12-29 09:51:47.000000000 -0800
-+++ ncurses-5.7/ncurses/base/lib_slkclear.c	2009-07-19 15:02:22.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -40,27 +40,35 @@
-  */
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_slkclear.c,v 1.10 2007/12/29 17:51:47 tom Exp $")
-+MODULE_ID("$Id: lib_slkclear.c,v 1.12 2009/02/21 17:47:14 tom Exp $")
- 
- NCURSES_EXPORT(int)
--slk_clear(void)
-+NCURSES_SP_NAME(slk_clear) (NCURSES_SP_DCL0)
- {
-     int rc = ERR;
- 
--    T((T_CALLED("slk_clear()")));
-+    T((T_CALLED("slk_clear(%p)"), SP_PARM));
- 
--    if (SP != NULL && SP->_slk != NULL) {
--	SP->_slk->hidden = TRUE;
-+    if (SP_PARM != 0 && SP_PARM->_slk != 0) {
-+	SP_PARM->_slk->hidden = TRUE;
- 	/* For simulated SLK's it looks much more natural to
- 	   inherit those attributes from the standard screen */
--	SP->_slk->win->_nc_bkgd = stdscr->_nc_bkgd;
--	WINDOW_ATTRS(SP->_slk->win) = WINDOW_ATTRS(stdscr);
--	if (SP->_slk->win == stdscr) {
-+	SP_PARM->_slk->win->_nc_bkgd = SP_PARM->_stdscr->_nc_bkgd;
-+	WINDOW_ATTRS(SP_PARM->_slk->win) = WINDOW_ATTRS(SP_PARM->_stdscr);
-+	if (SP_PARM->_slk->win == SP_PARM->_stdscr) {
- 	    rc = OK;
- 	} else {
--	    werase(SP->_slk->win);
--	    rc = wrefresh(SP->_slk->win);
-+	    werase(SP_PARM->_slk->win);
-+	    rc = wrefresh(SP_PARM->_slk->win);
- 	}
-     }
-     returnCode(rc);
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+slk_clear(void)
-+{
-+    return NCURSES_SP_NAME(slk_clear) (CURRENT_SCREEN);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_slkcolor.c ncurses-5.7/ncurses/base/lib_slkcolor.c
---- ncurses-5.7.orig/ncurses/base/lib_slkcolor.c	2005-01-28 13:11:53.000000000 -0800
-+++ ncurses-5.7/ncurses/base/lib_slkcolor.c	2009-07-19 15:02:22.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -27,8 +27,8 @@
-  ****************************************************************************/
- 
- /****************************************************************************
-- *  Author:  Juergen Pfeifer, 1998                                          *
-- *     and:  Thomas E. Dickey 2005                                          *
-+ *  Author:  Juergen Pfeifer, 1998,2009                                     *
-+ *     and:  Thomas E. Dickey 2005-on                                       *
-  ****************************************************************************/
- 
- /*
-@@ -38,19 +38,31 @@
-  */
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_slkcolor.c,v 1.12 2005/01/28 21:11:53 tom Exp $")
-+MODULE_ID("$Id: lib_slkcolor.c,v 1.15 2009/02/21 16:59:50 tom Exp $")
- 
- NCURSES_EXPORT(int)
--slk_color(short color_pair_number)
-+NCURSES_SP_NAME(slk_color) (NCURSES_SP_DCLx short color_pair_number)
- {
--    T((T_CALLED("slk_color(%d)"), color_pair_number));
-+    int code = ERR;
-+
-+    T((T_CALLED("slk_color(%p,%d)"), SP_PARM, color_pair_number));
-+
-+    if (SP_PARM != 0
-+	&& SP_PARM->_slk != 0
-+	&& color_pair_number >= 0
-+	&& color_pair_number < SP_PARM->_pair_limit) {
-+	TR(TRACE_ATTRS, ("... current is %s", _tracech_t(CHREF(SP_PARM->_slk->attr))));
-+	SetPair(SP_PARM->_slk->attr, color_pair_number);
-+	TR(TRACE_ATTRS, ("new attribute is %s", _tracech_t(CHREF(SP_PARM->_slk->attr))));
-+	code = OK;
-+    }
-+    returnCode(code);
-+}
- 
--    if (SP != 0 && SP->_slk != 0 &&
--	color_pair_number >= 0 && color_pair_number < COLOR_PAIRS) {
--	TR(TRACE_ATTRS, ("... current is %s", _tracech_t(CHREF(SP->_slk->attr))));
--	SetPair(SP->_slk->attr, color_pair_number);
--	TR(TRACE_ATTRS, ("new attribute is %s", _tracech_t(CHREF(SP->_slk->attr))));
--	returnCode(OK);
--    } else
--	returnCode(ERR);
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+slk_color(short color_pair_number)
-+{
-+    return NCURSES_SP_NAME(slk_color) (CURRENT_SCREEN, color_pair_number);
- }
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_slkinit.c ncurses-5.7/ncurses/base/lib_slkinit.c
---- ncurses-5.7.orig/ncurses/base/lib_slkinit.c	2008-01-12 12:23:39.000000000 -0800
-+++ ncurses-5.7/ncurses/base/lib_slkinit.c	2009-07-19 15:04:03.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -30,6 +30,7 @@
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-  *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                         2009                    *
-  ****************************************************************************/
- 
- /*
-@@ -39,17 +40,40 @@
-  */
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_slkinit.c,v 1.7 2008/01/12 20:23:39 tom Exp $")
-+MODULE_ID("$Id: lib_slkinit.c,v 1.11 2009/05/23 23:32:57 tom Exp $")
-+
-+#ifdef USE_SP_RIPOFF
-+#define SoftkeyFormat SP_PARM->slk_format
-+#else
-+#define SoftkeyFormat _nc_globals.slk_format
-+#endif
- 
- NCURSES_EXPORT(int)
--slk_init(int format)
-+NCURSES_SP_NAME(slk_init) (NCURSES_SP_DCLx int format)
- {
-     int code = ERR;
- 
--    T((T_CALLED("slk_init(%d)"), format));
--    if (format >= 0 && format <= 3 && !_nc_globals.slk_format) {
--	_nc_globals.slk_format = 1 + format;
--	code = _nc_ripoffline(-SLK_LINES(_nc_globals.slk_format), _nc_slk_initialize);
-+    T((T_CALLED("slk_init(%p,%d)"), SP_PARM, format));
-+
-+    if (format >= 0
-+	&& format <= 3
-+#ifdef USE_SP_RIPOFF
-+	&& SP_PARM
-+	&& SP_PARM->_prescreen
-+#endif
-+	&& !SoftkeyFormat) {
-+	SoftkeyFormat = 1 + format;
-+	code = NCURSES_SP_NAME(_nc_ripoffline) (NCURSES_SP_ARGx
-+						-SLK_LINES(SoftkeyFormat),
-+						_nc_slk_initialize);
-     }
-     returnCode(code);
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+slk_init(int format)
-+{
-+    return NCURSES_SP_NAME(slk_init) (CURRENT_SCREEN_PRE, format);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_slklab.c ncurses-5.7/ncurses/base/lib_slklab.c
---- ncurses-5.7.orig/ncurses/base/lib_slklab.c	2003-03-29 14:53:48.000000000 -0800
-+++ ncurses-5.7/ncurses/base/lib_slklab.c	2009-07-19 15:02:22.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2000,2003 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2003,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -29,6 +29,8 @@
- /****************************************************************************
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-+ *     and:  Juergen Pfeifer,                       1998,2009               *
-+ *     and:  Thomas E. Dickey                       1998-on                 *
-  ****************************************************************************/
- 
- /*
-@@ -38,14 +40,22 @@
-  */
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_slklab.c,v 1.7 2003/03/29 22:53:48 tom Exp $")
-+MODULE_ID("$Id: lib_slklab.c,v 1.9 2009/02/21 18:48:42 tom Exp $")
- 
- NCURSES_EXPORT(char *)
--slk_label(int n)
-+NCURSES_SP_NAME(slk_label) (NCURSES_SP_DCLx int n)
- {
--    T((T_CALLED("slk_label(%d)"), n));
-+    T((T_CALLED("slk_label(%p,%d)"), SP_PARM, n));
- 
--    if (SP == NULL || SP->_slk == NULL || n < 1 || n > SP->_slk->labcnt)
-+    if (SP_PARM == 0 || SP_PARM->_slk == 0 || n < 1 || n > SP_PARM->_slk->labcnt)
- 	returnPtr(0);
--    returnPtr(SP->_slk->ent[n - 1].ent_text);
-+    returnPtr(SP_PARM->_slk->ent[n - 1].ent_text);
-+}
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(char *)
-+slk_label(int n)
-+{
-+    return NCURSES_SP_NAME(slk_label) (CURRENT_SCREEN, n);
- }
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_slkrefr.c ncurses-5.7/ncurses/base/lib_slkrefr.c
---- ncurses-5.7.orig/ncurses/base/lib_slkrefr.c	2008-09-27 07:07:53.000000000 -0700
-+++ ncurses-5.7/ncurses/base/lib_slkrefr.c	2009-07-19 15:04:06.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -38,9 +38,12 @@
-  *	Write SLK window to the (virtual) screen.
-  */
- #include <curses.priv.h>
--#include <term.h>		/* num_labels, label_*, plab_norm */
- 
--MODULE_ID("$Id: lib_slkrefr.c,v 1.17 2008/09/27 14:07:53 juergen Exp $")
-+#ifndef CUR
-+#define CUR SP_TERMTYPE
-+#endif
-+
-+MODULE_ID("$Id: lib_slkrefr.c,v 1.21 2009/06/06 20:26:17 tom Exp $")
- 
- /*
-  * Paint the info line for the PC style SLK emulation.
-@@ -66,31 +69,47 @@
-  * Write the soft labels to the soft-key window.
-  */
- static void
--slk_intern_refresh(SLK * slk)
-+slk_intern_refresh(SCREEN *sp)
- {
-     int i;
--    int fmt = SP->slk_format;
-+    int fmt;
-+    SLK *slk;
-+    int numlab;
-+
-+    if (sp == 0)
-+	return;
-+
-+    slk = sp->_slk;
-+    fmt = sp->slk_format;
-+    numlab = InfoOf(sp).numlabels;
-+
-+    if (slk->hidden)
-+	return;
- 
-     for (i = 0; i < slk->labcnt; i++) {
- 	if (slk->dirty || slk->ent[i].dirty) {
- 	    if (slk->ent[i].visible) {
--		if (num_labels > 0 && SLK_STDFMT(fmt)) {
-+		if (numlab > 0 && SLK_STDFMT(fmt)) {
-+#ifdef USE_TERM_DRIVER
-+		    CallDriver_2(sp, hwlabel, i + 1, slk->ent[i].form_text);
-+#else
- 		    if (i < num_labels) {
- 			TPUTS_TRACE("plab_norm");
- 			putp(TPARM_2(plab_norm, i + 1, slk->ent[i].form_text));
- 		    }
-+#endif
- 		} else {
- 		    if (fmt == 4)
- 			slk_paint_info(slk->win);
- 		    wmove(slk->win, SLK_LINES(fmt) - 1, slk->ent[i].ent_x);
--		    if (SP->_slk) {
--			wattrset(slk->win, AttrOf(SP->_slk->attr));
-+		    if (sp->_slk) {
-+			wattrset(slk->win, AttrOf(sp->_slk->attr));
- 		    }
- 		    waddstr(slk->win, slk->ent[i].form_text);
- 		    /* if we simulate SLK's, it's looking much more
- 		       natural to use the current ATTRIBUTE also
- 		       for the label window */
--		    wattrset(slk->win, WINDOW_ATTRS(stdscr));
-+		    wattrset(slk->win, WINDOW_ATTRS(StdScreen(sp)));
- 		}
- 	    }
- 	    slk->ent[i].dirty = FALSE;
-@@ -98,7 +117,10 @@
-     }
-     slk->dirty = FALSE;
- 
--    if (num_labels > 0) {
-+    if (numlab > 0) {
-+#ifdef USE_TERM_DRIVER
-+	CallDriver_1(sp, hwlabelOnOff, slk->hidden ? FALSE : TRUE);
-+#else
- 	if (slk->hidden) {
- 	    TPUTS_TRACE("label_off");
- 	    putp(label_off);
-@@ -106,6 +128,7 @@
- 	    TPUTS_TRACE("label_on");
- 	    putp(label_on);
- 	}
-+#endif
-     }
- }
- 
-@@ -113,32 +136,48 @@
-  * Refresh the soft labels.
-  */
- NCURSES_EXPORT(int)
--slk_noutrefresh(void)
-+NCURSES_SP_NAME(slk_noutrefresh) (NCURSES_SP_DCL0)
- {
--    T((T_CALLED("slk_noutrefresh()")));
-+    T((T_CALLED("slk_noutrefresh(%p)"), SP_PARM));
- 
--    if (SP == NULL || SP->_slk == NULL)
-+    if (SP_PARM == 0 || SP_PARM->_slk == 0)
- 	returnCode(ERR);
--    if (SP->_slk->hidden)
-+    if (SP_PARM->_slk->hidden)
- 	returnCode(OK);
--    slk_intern_refresh(SP->_slk);
-+    slk_intern_refresh(SP_PARM);
- 
--    returnCode(wnoutrefresh(SP->_slk->win));
-+    returnCode(wnoutrefresh(SP_PARM->_slk->win));
-+}
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+slk_noutrefresh(void)
-+{
-+    return NCURSES_SP_NAME(slk_noutrefresh) (CURRENT_SCREEN);
- }
-+#endif
- 
- /*
-  * Refresh the soft labels.
-  */
- NCURSES_EXPORT(int)
--slk_refresh(void)
-+NCURSES_SP_NAME(slk_refresh) (NCURSES_SP_DCL0)
- {
--    T((T_CALLED("slk_refresh()")));
-+    T((T_CALLED("slk_refresh(%p)"), SP_PARM));
- 
--    if (SP == NULL || SP->_slk == NULL)
-+    if (SP_PARM == 0 || SP_PARM->_slk == 0)
- 	returnCode(ERR);
--    if (SP->_slk->hidden)
-+    if (SP_PARM->_slk->hidden)
- 	returnCode(OK);
--    slk_intern_refresh(SP->_slk);
-+    slk_intern_refresh(SP_PARM);
-+
-+    returnCode(wrefresh(SP_PARM->_slk->win));
-+}
- 
--    returnCode(wrefresh(SP->_slk->win));
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+slk_refresh(void)
-+{
-+    return NCURSES_SP_NAME(slk_refresh) (CURRENT_SCREEN);
- }
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_slkset.c ncurses-5.7/ncurses/base/lib_slkset.c
---- ncurses-5.7.orig/ncurses/base/lib_slkset.c	2007-10-13 13:08:46.000000000 -0700
-+++ ncurses-5.7/ncurses/base/lib_slkset.c	2009-07-19 15:02:22.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2005,2007 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -44,10 +44,10 @@
- #endif
- #endif
- 
--MODULE_ID("$Id: lib_slkset.c,v 1.17 2007/10/13 20:08:46 tom Exp $")
-+MODULE_ID("$Id: lib_slkset.c,v 1.19 2009/02/21 17:34:06 tom Exp $")
- 
- NCURSES_EXPORT(int)
--slk_set(int i, const char *astr, int format)
-+NCURSES_SP_NAME(slk_set) (NCURSES_SP_DCLx int i, const char *astr, int format)
- {
-     SLK *slk;
-     int offset;
-@@ -57,20 +57,20 @@
-     const char *str = astr;
-     const char *p;
- 
--    T((T_CALLED("slk_set(%d, \"%s\", %d)"), i, str, format));
-+    T((T_CALLED("slk_set(%p, %d, \"%s\", %d)"), SP_PARM, i, str, format));
- 
--    if (SP == 0
--	|| (slk = SP->_slk) == 0
-+    if (SP_PARM == 0
-+	|| (slk = SP_PARM->_slk) == 0
- 	|| i < 1
- 	|| i > slk->labcnt
- 	|| format < 0
- 	|| format > 2)
- 	returnCode(ERR);
--    if (str == NULL)
-+    if (str == 0)
- 	str = "";
-     --i;			/* Adjust numbering of labels */
- 
--    limit = MAX_SKEY_LEN(SP->slk_format);
-+    limit = MAX_SKEY_LEN(SP_PARM->slk_format);
-     while (isspace(UChar(*str)))
- 	str++;			/* skip over leading spaces  */
-     p = str;
-@@ -147,3 +147,11 @@
-     slk->ent[i].dirty = TRUE;
-     returnCode(OK);
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+slk_set(int i, const char *astr, int format)
-+{
-+    return NCURSES_SP_NAME(slk_set) (CURRENT_SCREEN, i, astr, format);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_slktouch.c ncurses-5.7/ncurses/base/lib_slktouch.c
---- ncurses-5.7.orig/ncurses/base/lib_slktouch.c	2000-12-09 18:43:27.000000000 -0800
-+++ ncurses-5.7/ncurses/base/lib_slktouch.c	2009-07-19 15:02:22.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998,2000 Free Software Foundation, Inc.                   *
-+ * Copyright (c) 1998-2000,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -27,8 +27,8 @@
-  ****************************************************************************/
- 
- /****************************************************************************
-- *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-- *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-+ *  Author: Juergen Pfeifer                         1997,2009               *
-+ *     and: Thomas E. Dickey                        1996-on                 *
-  ****************************************************************************/
- 
- /*
-@@ -38,16 +38,24 @@
-  */
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_slktouch.c,v 1.5 2000/12/10 02:43:27 tom Exp $")
-+MODULE_ID("$Id: lib_slktouch.c,v 1.7 2009/02/21 17:42:59 tom Exp $")
- 
- NCURSES_EXPORT(int)
--slk_touch(void)
-+NCURSES_SP_NAME(slk_touch) (NCURSES_SP_DCL0)
- {
--    T((T_CALLED("slk_touch()")));
-+    T((T_CALLED("slk_touch(%p)"), SP_PARM));
- 
--    if (SP == NULL || SP->_slk == NULL)
-+    if (SP_PARM == 0 || SP_PARM->_slk == 0)
- 	returnCode(ERR);
--    SP->_slk->dirty = TRUE;
-+    SP_PARM->_slk->dirty = TRUE;
- 
-     returnCode(OK);
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+slk_touch(void)
-+{
-+    return NCURSES_SP_NAME(slk_touch) (CURRENT_SCREEN);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_ungetch.c ncurses-5.7/ncurses/base/lib_ungetch.c
---- ncurses-5.7.orig/ncurses/base/lib_ungetch.c	2008-05-31 09:44:54.000000000 -0700
-+++ ncurses-5.7/ncurses/base/lib_ungetch.c	2009-07-19 15:03:53.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -30,6 +30,7 @@
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-  *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                         2009                    *
-  ****************************************************************************/
- 
- /*
-@@ -41,7 +42,7 @@
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_ungetch.c,v 1.11 2008/05/31 16:44:54 tom Exp $")
-+MODULE_ID("$Id: lib_ungetch.c,v 1.13 2009/04/18 20:30:12 tom Exp $")
- 
- #include <fifo_defs.h>
- 
-@@ -57,10 +58,12 @@
- #endif /* TRACE */
- 
- NCURSES_EXPORT(int)
--_nc_ungetch(SCREEN *sp, int ch)
-+safe_ungetch(SCREEN *sp, int ch)
- {
-     int rc = ERR;
- 
-+    T((T_CALLED("ungetch(%p,%s)"), sp, _nc_tracechar(sp, ch)));
-+
-     if (tail != -1) {
- 	if (head == -1) {
- 	    head = 0;
-@@ -79,12 +82,11 @@
- #endif
- 	rc = OK;
-     }
--    return rc;
-+    returnCode(rc);
- }
- 
- NCURSES_EXPORT(int)
- ungetch(int ch)
- {
--    T((T_CALLED("ungetch(%s)"), _nc_tracechar(SP, ch)));
--    returnCode(_nc_ungetch(SP, ch));
-+    return safe_ungetch(CURRENT_SCREEN, ch);
- }
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_winch.c ncurses-5.7/ncurses/base/lib_winch.c
---- ncurses-5.7.orig/ncurses/base/lib_winch.c	2001-06-02 16:42:08.000000000 -0700
-+++ ncurses-5.7/ncurses/base/lib_winch.c	2009-07-19 15:02:22.000000000 -0700
-@@ -39,16 +39,16 @@
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_winch.c,v 1.5 2001/06/02 23:42:08 skimo Exp $")
-+MODULE_ID("$Id: lib_winch.c,v 1.6 2008/11/16 00:19:59 juergen Exp $")
- 
- NCURSES_EXPORT(chtype)
- winch(WINDOW *win)
- {
-     T((T_CALLED("winch(%p)"), win));
-     if (win != 0) {
--	returnChar(CharOf(win->_line[win->_cury].text[win->_curx]) |
--		   AttrOf(win->_line[win->_cury].text[win->_curx]));
-+	returnChtype(CharOf(win->_line[win->_cury].text[win->_curx]) |
-+		     AttrOf(win->_line[win->_cury].text[win->_curx]));
-     } else {
--	returnChar(0);
-+	returnChtype(0);
-     }
- }
-diff -Naur ncurses-5.7.orig/ncurses/base/lib_window.c ncurses-5.7/ncurses/base/lib_window.c
---- ncurses-5.7.orig/ncurses/base/lib_window.c	2008-06-07 07:12:56.000000000 -0700
-+++ ncurses-5.7/ncurses/base/lib_window.c	2009-07-19 15:03:53.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -39,7 +39,7 @@
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_window.c,v 1.25 2008/06/07 14:12:56 tom Exp $")
-+MODULE_ID("$Id: lib_window.c,v 1.26 2009/04/18 18:46:09 tom Exp $")
- 
- NCURSES_EXPORT(void)
- _nc_synchook(WINDOW *win)
-@@ -185,16 +185,20 @@
-     T((T_CALLED("dupwin(%p)"), win));
- 
-     if (win != 0) {
--
-+#if NCURSES_SP_FUNCS
-+	SCREEN *sp = _nc_screen_of(win);
-+#endif
- 	_nc_lock_global(curses);
- 	if (win->_flags & _ISPAD) {
--	    nwin = newpad(win->_maxy + 1,
--			  win->_maxx + 1);
-+	    nwin = NCURSES_SP_NAME(newpad) (NCURSES_SP_ARGx
-+					    win->_maxy + 1,
-+					    win->_maxx + 1);
- 	} else {
--	    nwin = newwin(win->_maxy + 1,
--			  win->_maxx + 1,
--			  win->_begy,
--			  win->_begx);
-+	    nwin = NCURSES_SP_NAME(newwin) (NCURSES_SP_ARGx
-+					    win->_maxy + 1,
-+					    win->_maxx + 1,
-+					    win->_begy,
-+					    win->_begx);
- 	}
- 
- 	if (nwin != 0) {
-diff -Naur ncurses-5.7.orig/ncurses/base/MKkeyname.awk ncurses-5.7/ncurses/base/MKkeyname.awk
---- ncurses-5.7.orig/ncurses/base/MKkeyname.awk	2008-07-12 11:40:00.000000000 -0700
-+++ ncurses-5.7/ncurses/base/MKkeyname.awk	2009-07-19 15:03:59.000000000 -0700
-@@ -1,6 +1,6 @@
--# $Id: MKkeyname.awk,v 1.40 2008/07/12 18:40:00 tom Exp $
-+# $Id: MKkeyname.awk,v 1.43 2009/05/09 19:01:49 tom Exp $
- ##############################################################################
--# Copyright (c) 1999-2007,2008 Free Software Foundation, Inc.                #
-+# Copyright (c) 1999-2008,2009 Free Software Foundation, Inc.                #
- #                                                                            #
- # Permission is hereby granted, free of charge, to any person obtaining a    #
- # copy of this software and associated documentation files (the "Software"), #
-@@ -67,7 +67,8 @@
- 	print "#define SIZEOF_TABLE 256"
- 	print "#define MyTable _nc_globals.keyname_table"
- 	print ""
--	print "NCURSES_EXPORT(NCURSES_CONST char *) _nc_keyname (SCREEN *sp, int c)"
-+	print "NCURSES_EXPORT(NCURSES_CONST char *)"
-+	print "safe_keyname (SCREEN *sp, int c)"
- 	print "{"
- 	print "	int i;"
- 	print "	char name[20];"
-@@ -116,14 +117,14 @@
- 	print "				result = MyTable[c];"
- 	print "			}"
- 	print "#if NCURSES_EXT_FUNCS && NCURSES_XNAMES"
--	print "		} else if (result == 0 && cur_term != 0) {"
-+	print "		} else if (result == 0 && HasTerminal(sp)) {"
- 	print "			int j, k;"
- 	print "			char * bound;"
--	print "			TERMTYPE *tp = &(cur_term->type);"
-+	print "			TERMTYPE *tp = &(TerminalOf(sp)->type);"
- 	print "			int save_trace = _nc_tracing;"
- 	print ""
- 	print "			_nc_tracing = 0;	/* prevent recursion via keybound() */"
--	print "			for (j = 0; (bound = keybound(c, j)) != 0; ++j) {"
-+	print "			for (j = 0; (bound = NCURSES_SP_NAME(keybound)(NCURSES_SP_ARGx c, j)) != 0; ++j) {"
- 	print "				for(k = STRCOUNT; k < (int) NUM_STRINGS(tp);  k++) {"
- 	print "					if (tp->Strings[k] != 0 && !strcmp(bound, tp->Strings[k])) {"
- 	print "						result = ExtStrname(tp, k, strnames);"
-@@ -141,9 +142,10 @@
- 	print "	return result;"
- 	print "}"
- 	print ""
--	print "NCURSES_EXPORT(NCURSES_CONST char *) keyname (int c)"
-+	print "NCURSES_EXPORT(NCURSES_CONST char *)"
-+	print "keyname (int c)"
- 	print "{"
--	print "\treturn _nc_keyname(SP, c);"
-+	print "	return safe_keyname (CURRENT_SCREEN, c);"
- 	print "}"
- 	print ""
- 	print "#if NO_LEAKS"
-diff -Naur ncurses-5.7.orig/ncurses/base/MKlib_gen.sh ncurses-5.7/ncurses/base/MKlib_gen.sh
---- ncurses-5.7.orig/ncurses/base/MKlib_gen.sh	2008-08-30 12:20:50.000000000 -0700
-+++ ncurses-5.7/ncurses/base/MKlib_gen.sh	2009-07-19 15:02:22.000000000 -0700
-@@ -2,7 +2,7 @@
- #
- # MKlib_gen.sh -- generate sources from curses.h macro definitions
- #
--# ($Id: MKlib_gen.sh,v 1.34 2008/08/30 19:20:50 tom Exp $)
-+# ($Id: MKlib_gen.sh,v 1.35 2008/11/16 00:19:59 juergen Exp $)
- #
- ##############################################################################
- # Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.                #
-@@ -199,7 +199,7 @@
- 	}
- 	second = first + 1;
- 	if ( $first == "chtype" ) {
--		returnType = "Char";
-+		returnType = "Chtype";
- 	} else if ( $first == "SCREEN" ) {
- 		returnType = "SP";
- 	} else if ( $first == "WINDOW" ) {
-diff -Naur ncurses-5.7.orig/ncurses/base/MKunctrl.awk ncurses-5.7/ncurses/base/MKunctrl.awk
---- ncurses-5.7.orig/ncurses/base/MKunctrl.awk	2008-10-04 14:40:24.000000000 -0700
-+++ ncurses-5.7/ncurses/base/MKunctrl.awk	2009-07-19 15:04:13.000000000 -0700
-@@ -1,6 +1,6 @@
--# $Id: MKunctrl.awk,v 1.23 2008/10/04 21:40:24 tom Exp $
-+# $Id: MKunctrl.awk,v 1.26 2009/07/04 22:05:15 Clemens.Ladisch Exp $
- ##############################################################################
--# Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.                #
-+# Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.                #
- #                                                                            #
- # Permission is hereby granted, free of charge, to any person obtaining a    #
- # copy of this software and associated documentation files (the "Software"), #
-@@ -36,19 +36,12 @@
- 		print "#include <curses.priv.h>"
- 		print "#include <ctype.h>"
- 		print ""
--		print "#if USE_WIDEC_SUPPORT"
--		print "#if HAVE_WCTYPE_H"
--		print "#include <wctype.h>"
--		print "#endif"
--		print "#endif"
--		print ""
- 		print "#undef unctrl"
- 		print ""
- 	}
- END	{
--		print "NCURSES_EXPORT(NCURSES_CONST char *) _nc_unctrl (SCREEN *sp, chtype ch)"
-+		print "NCURSES_EXPORT(NCURSES_CONST char *) safe_unctrl(SCREEN *sp, chtype ch)"
- 		print "{"
--
- 		blob=""
- 		offset=0
- 		if (bigstrings) {
-@@ -158,16 +151,6 @@
- 		print  "\t\t && (check < 160))"
- 		printf "\t\t\tresult = %s_c1[check - 128];\n", stringname;
- 		print  "\t\telse"
--		print  "#if USE_WIDEC_SUPPORT"
--		print  "\t\tif ((check >= 160)"
--		print  "\t\t && (check < 256)"
--		print  "\t\t && ((sp != 0)"
--		print  "\t\t  && ((sp->_legacy_coding > 0)"
--		print  "\t\t   || (sp->_legacy_coding == 0"
--		print  "\t\t       && (isprint(check) || iswprint(check))))))"
--		printf "\t\t\tresult = %s_c1[check - 128];\n", stringname;
--		print  "\t\telse"
--		print  "#else"
- 		print  "\t\tif ((check >= 160)"
- 		print  "\t\t && (check < 256)"
- 		print  "\t\t && ((sp != 0)"
-@@ -176,7 +159,6 @@
- 		print  "\t\t       && isprint(check)))))"
- 		printf "\t\t\tresult = %s_c1[check - 128];\n", stringname;
- 		print  "\t\telse"
--		print  "#endif /* USE_WIDEC_SUPPORT */"
- 		print  "#endif /* NCURSES_EXT_FUNCS */"
- 		printf "\t\t\tresult = %s_table[check];\n", stringname;
- 		print  "\t} else {"
-@@ -187,6 +169,6 @@
- 		print  ""
- 		print  "NCURSES_EXPORT(NCURSES_CONST char *) unctrl (chtype ch)"
- 		print  "{"
--		print  "\treturn _nc_unctrl(SP, ch);"
-+		print  "\treturn safe_unctrl(CURRENT_SCREEN, ch);"
- 		print  "}"
- 	}
-diff -Naur ncurses-5.7.orig/ncurses/base/nc_panel.c ncurses-5.7/ncurses/base/nc_panel.c
---- ncurses-5.7.orig/ncurses/base/nc_panel.c	2000-12-09 18:43:28.000000000 -0800
-+++ ncurses-5.7/ncurses/base/nc_panel.c	2009-07-19 15:03:51.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998,2000 Free Software Foundation, Inc.                   *
-+ * Copyright (c) 1998-2000,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -32,10 +32,22 @@
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: nc_panel.c,v 1.4 2000/12/10 02:43:28 tom Exp $")
-+MODULE_ID("$Id: nc_panel.c,v 1.5 2009/04/11 21:05:10 tom Exp $")
- 
- NCURSES_EXPORT(struct panelhook *)
-+NCURSES_SP_NAME(_nc_panelhook) (NCURSES_SP_DCL0)
-+{
-+    return (SP_PARM
-+	    ? &(SP_PARM->_panelHook)
-+	    : (CURRENT_SCREEN
-+	       ? &(CURRENT_SCREEN->_panelHook)
-+	       : 0));
-+}
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(struct panelhook *)
- _nc_panelhook(void)
- {
--    return (SP ? &(SP->_panelHook) : NULL);
-+    return NCURSES_SP_NAME(_nc_panelhook) (CURRENT_SCREEN);
- }
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/resizeterm.c ncurses-5.7/ncurses/base/resizeterm.c
---- ncurses-5.7.orig/ncurses/base/resizeterm.c	2008-06-07 06:58:40.000000000 -0700
-+++ ncurses-5.7/ncurses/base/resizeterm.c	2009-07-19 15:04:13.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -28,6 +28,7 @@
- 
- /****************************************************************************
-  *  Author: Thomas E. Dickey                                                *
-+ *     and: Juergen Pfeifer                                                 *
-  ****************************************************************************/
- 
- /*
-@@ -39,11 +40,12 @@
-  */
- 
- #include <curses.priv.h>
--#include <term.h>
- 
--MODULE_ID("$Id: resizeterm.c,v 1.34 2008/06/07 13:58:40 tom Exp $")
-+#ifndef CUR
-+#define CUR SP_TERMTYPE
-+#endif
- 
--#define stolen_lines (screen_lines - SP->_lines_avail)
-+MODULE_ID("$Id: resizeterm.c,v 1.40 2009/07/04 18:38:49 tom Exp $")
- 
- /*
-  * If we're trying to be reentrant, do not want any local statics.
-@@ -64,18 +66,23 @@
- static void
- show_window_sizes(const char *name)
- {
-+    SCREEN *sp;
-     WINDOWLIST *wp;
- 
-     _nc_lock_global(curses);
--    _tracef("%s resizing: %2d x %2d (%2d x %2d)", name, LINES, COLS,
--	    screen_lines, screen_columns);
--    for (each_window(wp)) {
--	_tracef("  window %p is %2ld x %2ld at %2ld,%2ld",
--		&(wp->win),
--		(long) wp->win._maxy + 1,
--		(long) wp->win._maxx + 1,
--		(long) wp->win._begy,
--		(long) wp->win._begx);
-+    for (each_screen(sp)) {
-+	_tracef("%s resizing: %p: %2d x %2d (%2d x %2d)", name, sp,
-+		*(ptrLines(sp)),
-+		*(ptrCols(sp)),
-+		screen_lines(sp), screen_columns(sp));
-+	for (each_window(sp, wp)) {
-+	    _tracef("  window %p is %2ld x %2ld at %2ld,%2ld",
-+		    &(wp->win),
-+		    (long) wp->win._maxy + 1,
-+		    (long) wp->win._maxx + 1,
-+		    (long) wp->win._begy,
-+		    (long) wp->win._begx);
-+	}
-     }
-     _nc_unlock_global(curses);
- }
-@@ -86,15 +93,23 @@
-  * structure's size.
-  */
- NCURSES_EXPORT(bool)
--is_term_resized(int ToLines, int ToCols)
-+NCURSES_SP_NAME(is_term_resized) (NCURSES_SP_DCLx int ToLines, int ToCols)
- {
--    T((T_CALLED("is_term_resized(%d, %d)"), ToLines, ToCols));
-+    T((T_CALLED("is_term_resized(%p, %d, %d)"), SP_PARM, ToLines, ToCols));
-     returnCode(ToLines > 0
- 	       && ToCols > 0
--	       && (ToLines != screen_lines
--		   || ToCols != screen_columns));
-+	       && (ToLines != screen_lines(SP_PARM)
-+		   || ToCols != screen_columns(SP_PARM)));
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(bool)
-+is_term_resized(int ToLines, int ToCols)
-+{
-+    return NCURSES_SP_NAME(is_term_resized) (CURRENT_SCREEN, ToLines, ToCols);
-+}
-+#endif
-+
- /*
-  */
- static ripoff_t *
-@@ -104,6 +119,9 @@
-     ripoff_t *rop;
- 
-     if (win != 0) {
-+#ifdef USE_SP_RIPOFF
-+	SCREEN *sp = _nc_screen_of(win);
-+#endif
- 	for (each_ripoff(rop)) {
- 	    if (rop->win == win && rop->line != 0) {
- 		result = rop;
-@@ -125,6 +143,9 @@
-     ripoff_t *rop;
- 
-     if (win != 0) {
-+#ifdef USE_SP_RIPOFF
-+	SCREEN *sp = _nc_screen_of(win);
-+#endif
- 	for (each_ripoff(rop)) {
- 	    if (rop->line < 0) {
- 		result -= rop->line;
-@@ -146,9 +167,12 @@
-     int depth = 0;
- 
-     if (cmp != 0) {
-+#ifdef USE_SP_WINDOWLIST
-+	SCREEN *sp = _nc_screen_of(cmp);
-+#endif
- 	WINDOWLIST *wp;
- 
--	for (each_window(wp)) {
-+	for (each_window(sp, wp)) {
- 	    WINDOW *tst = &(wp->win);
- 	    if (tst->_parent == cmp) {
- 		depth = 1 + child_depth(tst);
-@@ -184,7 +208,7 @@
- adjust_window(WINDOW *win, int ToLines, int ToCols, int stolen EXTRA_DCLS)
- {
-     int result;
--    int bottom = CurLines + SP->_topstolen - stolen;
-+    int bottom = CurLines + _nc_screen_of(win)->_topstolen - stolen;
-     int myLines = win->_maxy + 1;
-     int myCols = win->_maxx + 1;
-     ripoff_t *rop = ripped_window(win);
-@@ -203,6 +227,12 @@
- 	 * move it to the same relative position.
- 	 */
- 	win->_begy = ToLines - ripped_bottom(win) - 0 - win->_yoffset;
-+	if (rop->hook == _nc_slk_initialize)
-+	    _nc_format_slks(
-+#if NCURSES_SP_FUNCS
-+		_nc_screen_of(win),
-+#endif
-+		ToCols);
-     } else if (win->_begy >= bottom) {
- 	/*
- 	 * If it is below the bottom of the new screen, move up by the same
-@@ -239,19 +269,19 @@
-  * children, decrease those to fit, then decrease the containing window, etc.
-  */
- static int
--decrease_size(int ToLines, int ToCols, int stolen EXTRA_DCLS)
-+decrease_size(NCURSES_SP_DCLx int ToLines, int ToCols, int stolen EXTRA_DCLS)
- {
-     bool found;
-     int depth = 0;
-     WINDOWLIST *wp;
- 
--    T((T_CALLED("decrease_size(%d, %d)"), ToLines, ToCols));
-+    T((T_CALLED("decrease_size(%p, %d, %d)"), SP_PARM, ToLines, ToCols));
- 
-     do {
- 	found = FALSE;
- 	TR(TRACE_UPDATE, ("decreasing size of windows to %dx%d, depth=%d",
- 			  ToLines, ToCols, depth));
--	for (each_window(wp)) {
-+	for (each_window(SP_PARM, wp)) {
- 	    WINDOW *win = &(wp->win);
- 
- 	    if (!(win->_flags & _ISPAD)) {
-@@ -273,19 +303,19 @@
-  * parent, increase those to fit, then increase the contained window, etc.
-  */
- static int
--increase_size(int ToLines, int ToCols, int stolen EXTRA_DCLS)
-+increase_size(NCURSES_SP_DCLx int ToLines, int ToCols, int stolen EXTRA_DCLS)
- {
-     bool found;
-     int depth = 0;
-     WINDOWLIST *wp;
- 
--    T((T_CALLED("increase_size(%d, %d)"), ToLines, ToCols));
-+    T((T_CALLED("increase_size(%p, %d, %d)"), SP_PARM, ToLines, ToCols));
- 
-     do {
- 	found = FALSE;
- 	TR(TRACE_UPDATE, ("increasing size of windows to %dx%d, depth=%d",
- 			  ToLines, ToCols, depth));
--	for (each_window(wp)) {
-+	for (each_window(SP_PARM, wp)) {
- 	    WINDOW *win = &(wp->win);
- 
- 	    if (!(win->_flags & _ISPAD)) {
-@@ -307,25 +337,26 @@
-  * such as ungetch().
-  */
- NCURSES_EXPORT(int)
--resize_term(int ToLines, int ToCols)
-+NCURSES_SP_NAME(resize_term) (NCURSES_SP_DCLx int ToLines, int ToCols)
- {
-     int result = OK EXTRA_ARGS;
-     int was_stolen;
- 
--    T((T_CALLED("resize_term(%d,%d) old(%d,%d)"),
--       ToLines, ToCols,
--       screen_lines, screen_columns));
-+    T((T_CALLED("resize_term(%p,%d,%d) old(%d,%d)"),
-+       SP_PARM, ToLines, ToCols,
-+       SP_PARM == 0 ? -1 : screen_lines(SP_PARM),
-+       SP_PARM == 0 ? -1 : screen_columns(SP_PARM)));
- 
--    if (SP == 0) {
-+    if (SP_PARM == 0) {
- 	returnCode(ERR);
-     }
- 
-     _nc_lock_global(curses);
- 
--    was_stolen = (screen_lines - SP->_lines_avail);
--    if (is_term_resized(ToLines, ToCols)) {
--	int myLines = CurLines = screen_lines;
--	int myCols = CurCols = screen_columns;
-+    was_stolen = (screen_lines(SP_PARM) - SP_PARM->_lines_avail);
-+    if (NCURSES_SP_NAME(is_term_resized) (NCURSES_SP_ARGx ToLines, ToCols)) {
-+	int myLines = CurLines = screen_lines(SP_PARM);
-+	int myCols = CurCols = screen_columns(SP_PARM);
- 
- #ifdef TRACE
- 	if (USE_TRACEF(TRACE_UPDATE)) {
-@@ -333,33 +364,42 @@
- 	    _nc_unlock_global(tracef);
- 	}
- #endif
--	if (ToLines > screen_lines) {
--	    increase_size(myLines = ToLines, myCols, was_stolen EXTRA_ARGS);
-+	if (ToLines > screen_lines(SP_PARM)) {
-+	    increase_size(NCURSES_SP_ARGx
-+			  myLines = ToLines, myCols, was_stolen EXTRA_ARGS);
- 	    CurLines = myLines;
- 	    CurCols = myCols;
- 	}
- 
--	if (ToCols > screen_columns) {
--	    increase_size(myLines, myCols = ToCols, was_stolen EXTRA_ARGS);
-+	if (ToCols > screen_columns(SP_PARM)) {
-+	    increase_size(NCURSES_SP_ARGx
-+			  myLines, myCols = ToCols, was_stolen EXTRA_ARGS);
- 	    CurLines = myLines;
- 	    CurCols = myCols;
- 	}
- 
- 	if (ToLines < myLines ||
- 	    ToCols < myCols) {
--	    decrease_size(ToLines, ToCols, was_stolen EXTRA_ARGS);
-+	    decrease_size(NCURSES_SP_ARGx ToLines, ToCols, was_stolen EXTRA_ARGS);
- 	}
- 
--	screen_lines = lines = ToLines;
--	screen_columns = columns = ToCols;
-+	screen_lines(SP_PARM) = ToLines;
-+	screen_columns(SP_PARM) = ToCols;
-+
-+#ifdef USE_TERM_DRIVER
-+	CallDriver_2(SP_PARM, setsize, ToLines, ToCols);
-+#else
-+	lines = ToLines;
-+	columns = ToCols;
-+#endif
- 
--	SP->_lines_avail = lines - was_stolen;
-+	SP_PARM->_lines_avail = ToLines - was_stolen;
- 
--	if (SP->oldhash) {
--	    FreeAndNull(SP->oldhash);
-+	if (SP_PARM->oldhash) {
-+	    FreeAndNull(SP_PARM->oldhash);
- 	}
--	if (SP->newhash) {
--	    FreeAndNull(SP->newhash);
-+	if (SP_PARM->newhash) {
-+	    FreeAndNull(SP_PARM->newhash);
- 	}
- #ifdef TRACE
- 	if (USE_TRACEF(TRACE_UPDATE)) {
-@@ -383,6 +423,18 @@
-     returnCode(result);
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+resize_term(int ToLines, int ToCols)
-+{
-+    int res = ERR;
-+    _nc_lock_global(curses);
-+    res = NCURSES_SP_NAME(resize_term) (CURRENT_SCREEN, ToLines, ToCols);
-+    _nc_unlock_global(curses);
-+    return (res);
-+}
-+#endif
-+
- /*
-  * This function reallocates NCURSES window structures.  It is invoked in
-  * response to a SIGWINCH interrupt.  Other user-defined windows may also need
-@@ -392,34 +444,34 @@
-  * invoked directly from the signal handler.
-  */
- NCURSES_EXPORT(int)
--resizeterm(int ToLines, int ToCols)
-+NCURSES_SP_NAME(resizeterm) (NCURSES_SP_DCLx int ToLines, int ToCols)
- {
-     int result = ERR;
- 
--    T((T_CALLED("resizeterm(%d,%d) old(%d,%d)"),
--       ToLines, ToCols,
--       screen_lines, screen_columns));
-+    T((T_CALLED("resizeterm(%p, %d,%d) old(%d,%d)"),
-+       SP_PARM, ToLines, ToCols,
-+       SP_PARM == 0 ? -1 : screen_lines(SP_PARM), screen_columns(SP_PARM)));
- 
--    if (SP != 0) {
-+    if (SP_PARM != 0) {
- 	result = OK;
--	SP->_sig_winch = FALSE;
-+	SP_PARM->_sig_winch = FALSE;
- 
--	if (is_term_resized(ToLines, ToCols)) {
-+	if (NCURSES_SP_NAME(is_term_resized) (NCURSES_SP_ARGx ToLines, ToCols)) {
- #if USE_SIGWINCH
- 	    ripoff_t *rop;
--	    bool slk_visible = (SP != 0
--				&& SP->_slk != 0
--				&& !(SP->_slk->hidden));
-+	    bool slk_visible = (SP_PARM != 0
-+				&& SP_PARM->_slk != 0
-+				&& !(SP_PARM->_slk->hidden));
- 
- 	    if (slk_visible) {
- 		slk_clear();
- 	    }
- #endif
--	    result = resize_term(ToLines, ToCols);
-+	    result = NCURSES_SP_NAME(resize_term) (NCURSES_SP_ARGx ToLines, ToCols);
- 
- #if USE_SIGWINCH
--	    _nc_ungetch(SP, KEY_RESIZE);	/* so application can know this */
--	    clearok(curscr, TRUE);	/* screen contents are unknown */
-+	    safe_ungetch(SP_PARM, KEY_RESIZE);	/* so application can know this */
-+	    clearok(CurScreen(SP_PARM), TRUE);	/* screen contents are unknown */
- 
- 	    /* ripped-off lines are a special case: if we did not lengthen
- 	     * them, we haven't moved them either.  repaint them, too.
-@@ -429,7 +481,7 @@
- 	     * not know which are really on top.
- 	     */
- 	    for (each_ripoff(rop)) {
--		if (rop->win != stdscr
-+		if (rop->win != StdScreen(SP_PARM)
- 		    && rop->win != 0
- 		    && rop->line < 0) {
- 
-@@ -442,10 +494,9 @@
- 
- 	    /* soft-keys are a special case: we _know_ how to repaint them */
- 	    if (slk_visible) {
--		slk_restore();
--		slk_touch();
--
--		slk_refresh();
-+		NCURSES_SP_NAME(slk_restore) (NCURSES_SP_ARG);
-+		NCURSES_SP_NAME(slk_touch) (NCURSES_SP_ARG);
-+		NCURSES_SP_NAME(slk_refresh) (NCURSES_SP_ARG);
- 	    }
- #endif
- 	}
-@@ -453,3 +504,11 @@
- 
-     returnCode(result);
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+resizeterm(int ToLines, int ToCols)
-+{
-+    return NCURSES_SP_NAME(resizeterm) (CURRENT_SCREEN, ToLines, ToCols);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/safe_sprintf.c ncurses-5.7/ncurses/base/safe_sprintf.c
---- ncurses-5.7.orig/ncurses/base/safe_sprintf.c	2007-04-21 15:28:06.000000000 -0700
-+++ ncurses-5.7/ncurses/base/safe_sprintf.c	2009-07-19 15:03:53.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2003,2007 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -33,7 +33,7 @@
- #include <curses.priv.h>
- #include <ctype.h>
- 
--MODULE_ID("$Id: safe_sprintf.c,v 1.20 2007/04/21 22:28:06 tom Exp $")
-+MODULE_ID("$Id: safe_sprintf.c,v 1.22 2009/04/18 18:46:46 tom Exp $")
- 
- #if USE_SAFE_SPRINTF
- 
-@@ -111,7 +111,7 @@
- 		    }
- 		    sprintf(fmt_arg, "%d", ival);
- 		    fmt_len += strlen(fmt_arg);
--		    if ((format = realloc(format, fmt_len)) == 0) {
-+		    if ((format = _nc_doalloc(format, fmt_len)) == 0) {
- 			return -1;
- 		    }
- 		    strcpy(&format[--f], fmt_arg);
-@@ -214,7 +214,9 @@
-  * Wrapper for vsprintf that allocates a buffer big enough to hold the result.
-  */
- NCURSES_EXPORT(char *)
--_nc_printf_string(const char *fmt, va_list ap)
-+NCURSES_SP_NAME(_nc_printf_string) (NCURSES_SP_DCLx
-+				    const char *fmt,
-+				    va_list ap)
- {
-     char *result = 0;
- 
-@@ -237,11 +239,11 @@
- #define MyCols _nc_globals.safeprint_cols
- #define MyRows _nc_globals.safeprint_rows
- 
--	if (screen_lines > MyRows || screen_columns > MyCols) {
--	    if (screen_lines > MyRows)
--		MyRows = screen_lines;
--	    if (screen_columns > MyCols)
--		MyCols = screen_columns;
-+	if (screen_lines(SP_PARM) > MyRows || screen_columns(SP_PARM) > MyCols) {
-+	    if (screen_lines(SP_PARM) > MyRows)
-+		MyRows = screen_lines(SP_PARM);
-+	    if (screen_columns(SP_PARM) > MyCols)
-+		MyCols = screen_columns(SP_PARM);
- 	    my_length = (MyRows * (MyCols + 1)) + 1;
- 	    my_buffer = typeRealloc(char, my_length, my_buffer);
- 	}
-@@ -262,3 +264,11 @@
-     }
-     return result;
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(char *)
-+_nc_printf_string(const char *fmt, va_list ap)
-+{
-+    return NCURSES_SP_NAME(_nc_printf_string) (CURRENT_SCREEN, fmt, ap);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/base/tries.c ncurses-5.7/ncurses/base/tries.c
---- ncurses-5.7.orig/ncurses/base/tries.c	2008-08-16 12:22:55.000000000 -0700
-+++ ncurses-5.7/ncurses/base/tries.c	2009-07-19 15:02:22.000000000 -0700
-@@ -39,7 +39,7 @@
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: tries.c,v 1.27 2008/08/16 19:22:55 tom Exp $")
-+MODULE_ID("$Id: tries.c,v 1.28 2008/11/16 00:19:59 juergen Exp $")
- 
- /*
-  * Expand a keycode into the string that it corresponds to, returning null if
-@@ -72,7 +72,9 @@
- 	    *((unsigned char *) (result + len)) = 128;
- #ifdef TRACE
- 	if (len == 0 && USE_TRACEF(TRACE_MAXIMUM)) {
--	    _tracef("expand_key %s %s", _nc_tracechar(SP, code), _nc_visbuf(result));
-+	    _tracef("expand_key %s %s",
-+		    _nc_tracechar(CURRENT_SCREEN, code),
-+		    _nc_visbuf(result));
- 	    _nc_unlock_global(tracef);
- 	}
- #endif
-diff -Naur ncurses-5.7.orig/ncurses/base/wresize.c ncurses-5.7/ncurses/base/wresize.c
---- ncurses-5.7.orig/ncurses/base/wresize.c	2008-06-07 06:59:01.000000000 -0700
-+++ ncurses-5.7/ncurses/base/wresize.c	2009-07-19 15:04:03.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -27,12 +27,13 @@
-  ****************************************************************************/
- 
- /****************************************************************************
-- *  Author: Thomas E. Dickey 1996-2002                                      *
-+ *  Author: Thomas E. Dickey 1996-on                                        *
-+ *     and: Juergen Pfeifer                                                 *
-  ****************************************************************************/
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: wresize.c,v 1.29 2008/06/07 13:59:01 tom Exp $")
-+MODULE_ID("$Id: wresize.c,v 1.31 2009/05/23 19:50:16 tom Exp $")
- 
- static int
- cleanup_lines(struct ldat *data, int length)
-@@ -53,10 +54,13 @@
-     WINDOWLIST *wp;
-     struct ldat *pline = cmp->_line;
-     int row;
-+#ifdef USE_SP_WINDOWLIST
-+    SCREEN *sp = _nc_screen_of(cmp);
-+#endif
- 
-     _nc_lock_global(curses);
- 
--    for (each_window(wp)) {
-+    for (each_window(SP_PARM, wp)) {
- 	WINDOW *tst = &(wp->win);
- 
- 	if (tst->_parent == cmp) {
-diff -Naur ncurses-5.7.orig/ncurses/curses.priv.h ncurses-5.7/ncurses/curses.priv.h
---- ncurses-5.7.orig/ncurses/curses.priv.h	2008-10-04 14:37:45.000000000 -0700
-+++ ncurses-5.7/ncurses/curses.priv.h	2009-07-19 15:04:13.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -30,11 +30,12 @@
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-  *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                                                 *
-  ****************************************************************************/
- 
- 
- /*
-- * $Id: curses.priv.h,v 1.394 2008/10/04 21:37:45 tom Exp $
-+ * $Id: curses.priv.h,v 1.430 2009/07/04 20:40:42 tom Exp $
-  *
-  *	curses.priv.h
-  *
-@@ -97,8 +98,6 @@
- extern int errno;
- #endif
- 
--#include <nc_panel.h>
--
- /* Some systems have a broken 'select()', but workable 'poll()'.  Use that */
- #if HAVE_WORKING_POLL
- #define USE_FUNC_POLL 1
-@@ -195,6 +194,16 @@
- #endif
- 
- /*
-+ * Options for terminal drivers, etc...
-+ */
-+#if 0
-+#define USE_SP_RIPOFF     1
-+#define USE_SP_TERMTYPE   1
-+#define USE_SP_WINDOWLIST 1
-+#define USE_TERM_DRIVER   1
-+#endif
-+
-+/*
-  * Note:  ht/cbt expansion flakes out randomly under Linux 1.1.47, but only
-  * when we're throwing control codes at the screen at high volume.  To see
-  * this, re-enable USE_HARD_TABS and run worm for a while.  Other systems
-@@ -257,8 +266,59 @@
- #define NCURSES_OPAQUE 0
- 
- #include <curses.h>	/* we'll use -Ipath directive to get the right one! */
-+
-+/*
-+ * If curses.h did not expose the SCREEN-functions, then we do not need the
-+ * parameter in the corresponding unextended functions.
-+ */
-+#if NCURSES_SP_FUNCS
-+#define SP_PARM         sp	/* use parameter */
-+#define NCURSES_SP_ARG          SP_PARM
-+#define NCURSES_SP_DCL  SCREEN *NCURSES_SP_ARG
-+#define NCURSES_SP_DCL0 NCURSES_SP_DCL
-+#define NCURSES_SP_ARGx         NCURSES_SP_ARG,
-+#define NCURSES_SP_DCLx SCREEN *NCURSES_SP_ARGx
-+#else
-+#define SP_PARM         SP	/* use global variable */
-+#define NCURSES_SP_ARG
-+#define NCURSES_SP_DCL
-+#define NCURSES_SP_DCL0 void
-+#define NCURSES_SP_ARGx
-+#define NCURSES_SP_DCLx
-+#endif
-+
-+#include <nc_panel.h>
-+
-+#define IsPreScreen(sp)      (((sp) != 0) && sp->_prescreen)
-+#define HasTerminal(sp)      (((sp) != 0) && (0 != ((sp)->_term)))
-+#define IsValidScreen(sp)    (HasTerminal(sp) && !IsPreScreen(sp))
-+
-+#if BROKEN_LINKER || USE_REENTRANT
-+#define CurTerm              _nc_prescreen._cur_term
-+#else
-+#define CurTerm              cur_term
-+#endif
-+
-+#if NCURSES_SP_FUNCS
-+#define TerminalOf(sp)       ((sp) ? ((sp)->_term ? (sp)->_term : CurTerm) : CurTerm)
-+#else
-+#define TerminalOf(sp)       CurTerm
-+#endif
-+
- #include <term.h>
-+
-+/*
-+ * Reduce dependency on cur_term global by using terminfo data from SCREEN's
-+ * pointer to this data.
-+ */
-+#ifdef USE_SP_TERMTYPE
-+#undef CUR
-+#endif
-+
-+#define SP_TERMTYPE TerminalOf(sp)->type.
-+
- #include <term_entry.h>
-+
- #include <nc_tparm.h>
- 
- #if NCURSES_EXT_COLORS && USE_WIDEC_SUPPORT
-@@ -272,8 +332,15 @@
- #define GET_WINDOW_PAIR(w)	(w)->_color
- #define SET_WINDOW_PAIR(w,p)	(w)->_color = (p)
- #define SameAttrOf(a,b)		(AttrOf(a) == AttrOf(b) && GetPair(a) == GetPair(b))
--#define VIDATTR(attr, pair)	vid_attr(attr, pair, 0)
-+
-+#if NCURSES_SP_FUNCS
-+#define VIDATTR(sp,attr,pair)	NCURSES_SP_NAME(vid_attr)(sp, attr, pair, 0)
- #else
-+#define VIDATTR(sp,attr,pair)	vid_attr(attr, pair, 0)
-+#endif
-+
-+#else /* !(NCURSES_EXT_COLORS && USE_WIDEC_SUPPORT) */
-+
- #define if_EXT_COLORS(stmt)	/* nothing */
- #define SetPair(value,p)	RemAttr(value, A_COLOR), \
- 				SetAttr(value, AttrOf(value) | (A_COLOR & COLOR_PAIR(p)))
-@@ -283,13 +350,19 @@
- #define SET_WINDOW_PAIR(w,p)	WINDOW_ATTRS(w) &= ALL_BUT_COLOR, \
- 				WINDOW_ATTRS(w) |= (A_COLOR & COLOR_PAIR(p))
- #define SameAttrOf(a,b)		(AttrOf(a) == AttrOf(b))
--#define VIDATTR(attr, pair)	vidattr(attr)
-+
-+#if NCURSES_SP_FUNCS
-+#define VIDATTR(sp,attr,pair)	NCURSES_SP_NAME(vidattr)(sp, attr)
-+#else
-+#define VIDATTR(sp,attr,pair)	vidattr(attr)
- #endif
- 
-+#endif /* NCURSES_EXT_COLORS && USE_WIDEC_SUPPORT */
-+
- #if NCURSES_NO_PADDING
- #define GetNoPadding(sp)	((sp) ? (sp)->_no_padding : _nc_prescreen._no_padding)
- #define SetNoPadding(sp)	_nc_set_no_padding(sp)
--extern NCURSES_EXPORT(void) _nc_set_no_padding(SCREEN *);
-+extern NCURSES_EXPORT(void)     _nc_set_no_padding(SCREEN *);
- #else
- #define GetNoPadding(sp)	FALSE
- #define SetNoPadding(sp)	/*nothing*/
-@@ -302,17 +375,34 @@
- #define SET_SCREEN_PAIR(s,p)	SetPair(SCREEN_ATTRS(s), p)
- 
- #if USE_REENTRANT
--NCURSES_EXPORT(int *) _nc_ptr_Lines (void);
--NCURSES_EXPORT(int *) _nc_ptr_Cols (void);
--#define ptrLines() (SP ? &(SP->_LINES) : &(_nc_prescreen._LINES))
--#define ptrCols()  (SP ? &(SP->_COLS)  : &(_nc_prescreen._COLS))
--#define SET_LINES(value) *_nc_ptr_Lines() = value
--#define SET_COLS(value)  *_nc_ptr_Cols() = value
--#else
--#define ptrLines() &LINES
--#define ptrCols()  &COLS
--#define SET_LINES(value) LINES = value
--#define SET_COLS(value)  COLS = value
-+
-+NCURSES_EXPORT(int *)        _nc_ptr_Lines (SCREEN *);
-+NCURSES_EXPORT(int *)        _nc_ptr_Cols (SCREEN *);
-+NCURSES_EXPORT(int *)        _nc_ptr_Tabsize (SCREEN *);
-+NCURSES_EXPORT(int *)        _nc_ptr_Escdelay (SCREEN *);
-+
-+#define ptrLines(sp)         (sp ? &(sp->_LINES) : &(_nc_prescreen._LINES))
-+#define ptrCols(sp)          (sp ? &(sp->_COLS) : &(_nc_prescreen._COLS))
-+#define ptrTabsize(sp)       (sp ? &(sp->_TABSIZE) : &(_nc_prescreen._TABSIZE))
-+#define ptrEscdelay(sp)      (sp ? &(sp->_ESCDELAY) : &(_nc_prescreen._ESCDELAY))
-+
-+#define SET_LINES(value)     *_nc_ptr_Lines(SP_PARM) = value
-+#define SET_COLS(value)      *_nc_ptr_Cols(SP_PARM) = value
-+#define SET_TABSIZE(value)   *_nc_ptr_Tabsize(SP_PARM) = value
-+#define SET_ESCDELAY(value)  *_nc_ptr_Escdelay(SP_PARM) = value
-+
-+#else
-+
-+#define ptrLines(sp)         &LINES
-+#define ptrCols(sp)          &COLS
-+#define ptrTabsize(sp)       &TABSIZE
-+#define ptrEscdelay(sp)      &ESCDELAY
-+
-+#define SET_LINES(value)     LINES = value
-+#define SET_COLS(value)      COLS = value
-+#define SET_TABSIZE(value)   TABSIZE = value
-+#define SET_ESCDELAY(value)  ESCDELAY = value
-+
- #endif
- 
- #define TR_MUTEX(data) _tracef("%s@%d: me:%08lX COUNT:%2u/%2d/%6d/%2d/%s%9u: " #data, \
-@@ -404,6 +494,8 @@
- #define C_SHIFT 9		/* we need more bits than there are colors */
- #define C_MASK			((1 << C_SHIFT) - 1)
- #define PAIR_OF(fg, bg)		((((fg) & C_MASK) << C_SHIFT) | ((bg) & C_MASK))
-+#define FORE_OF(c)		(((c) >> C_SHIFT) & C_MASK)
-+#define BACK_OF(c)		((c) & C_MASK)
- #define isDefaultColor(c)	((c) >= COLOR_DEFAULT || (c) < 0)
- 
- #define COLOR_DEFAULT		C_MASK
-@@ -464,13 +556,13 @@
- } slk_ent;
- 
- typedef struct _SLK {
--	char dirty;		/* all labels have changed */
--	char hidden;		/* soft labels are hidden */
--	WINDOW *win;
-+	bool    dirty;		/* all labels have changed */
-+	bool    hidden;		/* soft labels are hidden */
-+	WINDOW  *win;
- 	slk_ent *ent;
--	short  maxlab;		/* number of available labels */
--	short  labcnt;		/* number of allocated labels */
--	short  maxlen;		/* length of labels */
-+	short   maxlab;		/* number of available labels */
-+	short   labcnt;		/* number of allocated labels */
-+	short   maxlen;		/* length of labels */
- 	NCURSES_CH_T attr;	/* soft label attribute */
- } SLK;
- 
-@@ -493,10 +585,10 @@
- typedef int (*TYPE_Gpm_Close) (void);
- typedef int (*TYPE_Gpm_GetEvent) (Gpm_Event *);
- 
--#define my_gpm_fd       SP->_mouse_gpm_fd
--#define my_Gpm_Open     SP->_mouse_Gpm_Open
--#define my_Gpm_Close    SP->_mouse_Gpm_Close
--#define my_Gpm_GetEvent SP->_mouse_Gpm_GetEvent
-+#define my_gpm_fd       SP_PARM->_mouse_gpm_fd
-+#define my_Gpm_Open     SP_PARM->_mouse_Gpm_Open
-+#define my_Gpm_Close    SP_PARM->_mouse_Gpm_Close
-+#define my_Gpm_GetEvent SP_PARM->_mouse_Gpm_GetEvent
- #else
- /* link statically to GPM */
- #define my_gpm_fd       &gpm_fd
-@@ -609,8 +701,10 @@
- 	int		tgetent_index;
- 	long		tgetent_sequence;
- 
-+#ifndef USE_SP_WINDOWLIST
- 	WINDOWLIST	*_nc_windowlist;
--#define _nc_windows	_nc_globals._nc_windowlist
-+#define WindowList(sp)	_nc_globals._nc_windowlist
-+#endif
- 
- #if USE_HOME_TERMINFO
- 	char		*home_terminfo;
-@@ -644,7 +738,9 @@
- 	char		traceatr_color_buf[2][80];
- 	int		traceatr_color_sel;
- 	int		traceatr_color_last;
--
-+#if !defined(USE_PTHREADS) && USE_REENTRANT
-+	int		nested_tracef;
-+#endif
- #endif	/* TRACE */
- 
- #ifdef USE_PTHREADS
-@@ -669,8 +765,10 @@
- 	bool		use_env;
- 	bool		filter_mode;
- 	attr_t		previous_attr;
-+#ifndef USE_SP_RIPOFF
- 	ripoff_t	rippedoff[N_RIPS];
- 	ripoff_t	*rsp;
-+#endif
- 	TPARM_STATE	tparm_state;
- 	TTY		*saved_tty;	/* savetty/resetty information	    */
- #if NCURSES_NO_PADDING
-@@ -680,6 +778,8 @@
- 	chtype		*real_acs_map;
- 	int		_LINES;
- 	int		_COLS;
-+	int		_TABSIZE;
-+	int		_ESCDELAY;
- 	TERMINAL	*_cur_term;
- #ifdef TRACE
- 	long		_outchars;
-@@ -688,8 +788,16 @@
- #endif
- } NCURSES_PRESCREEN;
- 
--#define ripoff_sp	_nc_prescreen.rsp
--#define ripoff_stack	_nc_prescreen.rippedoff
-+/*
-+ * Use screen-specific ripoff data (for softkeys) rather than global.
-+ */
-+#ifdef USE_SP_RIPOFF
-+#define safe_ripoff_sp     (sp)->rsp
-+#define safe_ripoff_stack  (sp)->rippedoff
-+#else
-+#define safe_ripoff_sp	   _nc_prescreen.rsp
-+#define safe_ripoff_stack  _nc_prescreen.rippedoff
-+#endif
- 
- extern NCURSES_EXPORT_VAR(NCURSES_PRESCREEN) _nc_prescreen;
- 
-@@ -703,6 +811,8 @@
- 	char		*_setbuf;	/* buffered I/O for output	    */
- 	bool		_filtered;	/* filter() was called		    */
- 	bool		_buffered;	/* setvbuf uses _setbuf data	    */
-+	bool		_prescreen;	/* is in prescreen phase	    */
-+	bool		_use_env;	/* LINES & COLS from environment?   */
- 	int		_checkfd;	/* filedesc for typeahead check	    */
- 	TERMINAL	*_term;		/* terminal type information	    */
- 	TTY		_saved_tty;	/* savetty/resetty information	    */
-@@ -716,6 +826,10 @@
- 	WINDOW		*_newscr;	/* virtual screen to be updated to  */
- 	WINDOW		*_stdscr;	/* screen's full-window context	    */
- 
-+#define CurScreen(sp)  (sp)->_curscr
-+#define NewScreen(sp)  (sp)->_newscr
-+#define StdScreen(sp)  (sp)->_stdscr
-+
- 	TRIES		*_keytry;	/* "Try" for use with keypad mode   */
- 	TRIES		*_key_ok;	/* Disabled keys via keyok(,FALSE)  */
- 	bool		_tried;		/* keypad mode was initialized	    */
-@@ -794,11 +908,13 @@
- 	int		_color_count;	/* count of colors in palette	     */
- 	colorpair_t	*_color_pairs;	/* screen's color pair list	     */
- 	int		_pair_count;	/* count of color pairs		     */
-+	int		_pair_limit;	/* actual limit of color-pairs       */
- #if NCURSES_EXT_FUNCS
- 	bool		_default_color; /* use default colors		     */
- 	bool		_has_sgr_39_49; /* has ECMA default color support    */
- 	int		_default_fg;	/* assumed default foreground	     */
- 	int		_default_bg;	/* assumed default background	     */
-+	int		_default_pairs;	/* count pairs using default color   */
- #endif
- 	chtype		_ok_attributes; /* valid attributes for terminal     */
- 	chtype		_xmc_suppress;	/* attributes to suppress if xmc     */
-@@ -820,8 +936,9 @@
- 	 */
- 	bool		_nc_sp_idlok;
- 	bool		_nc_sp_idcok;
--#define _nc_idlok SP->_nc_sp_idlok
--#define _nc_idcok SP->_nc_sp_idcok
-+
-+#define _nc_idlok SP_PARM->_nc_sp_idlok
-+#define _nc_idcok SP_PARM->_nc_sp_idcok
- 
- 	/*
- 	 * These are the data that support the mouse interface.
-@@ -875,7 +992,7 @@
- 	 * This supports automatic resizing
- 	 */
- #if USE_SIZECHANGE
--	int		(*_resize)(int,int);
-+	int		(*_resize)(NCURSES_SP_DCLx int y, int x);
- #endif
- 
- 	/*
-@@ -895,7 +1012,7 @@
- 	int		_oldnum_size;
- 
- 	bool		_cleanup;	/* cleanup after int/quit signal */
--	int		(*_outch)(int); /* output handler if not putc */
-+	NCURSES_SP_OUTC	_outch;		/* output handler if not putc */
- 
- 	int		_legacy_coding;	/* see use_legacy_coding() */
- 
-@@ -915,6 +1032,15 @@
- 	char		tracechr_buf[40];
- 	char		tracemse_buf[TRACEMSE_MAX];
- #endif
-+#ifdef USE_SP_WINDOWLIST
-+	WINDOWLIST*	_windowlist;
-+#define WindowList(sp)  (sp)->_windowlist
-+#endif
-+	NCURSES_OUTC	jump;
-+
-+	ripoff_t	rippedoff[N_RIPS];
-+	ripoff_t	*rsp;
-+
- 	/*
- 	 * ncurses/ncursesw are the same up to this point.
- 	 */
-@@ -943,6 +1069,20 @@
- 
- #define WINDOW_EXT(win,field) (((WINDOWLIST *)(win))->field)
- 
-+#define SP_PRE_INIT(sp)                         \
-+    sp->_cursrow = -1;                          \
-+    sp->_curscol = -1;                          \
-+    sp->_nl = TRUE;                             \
-+    sp->_raw = FALSE;                           \
-+    sp->_cbreak = 0;                            \
-+    sp->_echo = TRUE;                           \
-+    sp->_fifohead = -1;                         \
-+    sp->_endwin = TRUE;                         \
-+    sp->_cursor = -1;                           \
-+    WindowList(sp) = 0;                         \
-+    sp->_outch = NCURSES_SP_NAME(_nc_outch);    \
-+    sp->jump = 0                                \
-+
- /* usually in <limits.h> */
- #ifndef UCHAR_MAX
- #define UCHAR_MAX 255
-@@ -1112,7 +1252,7 @@
- 				AttrOf(dst) |= (ext + 1)
- 
- #define if_WIDEC(code)  code
--#define Charable(ch)	((SP != 0 && SP->_legacy_coding)		\
-+#define Charable(ch)	((SP_PARM != 0 && SP_PARM->_legacy_coding)	\
- 			 || (AttrOf(ch) & A_ALTCHARSET)			\
- 			 || (!isWidecExt(ch) &&				\
- 			     (ch).chars[1] == L'\0' &&			\
-@@ -1214,8 +1354,8 @@
-  * Standardize/simplify common loops
-  */
- #define each_screen(p) p = _nc_screen_chain; p != 0; p = (p)->_next_screen
--#define each_window(p) p = _nc_windows; p != 0; p = (p)->next
--#define each_ripoff(p) p = ripoff_stack; (p - ripoff_stack) < N_RIPS; ++p
-+#define each_window(sp,p) p = WindowList(sp); p != 0; p = (p)->next
-+#define each_ripoff(p) p = safe_ripoff_stack; (p - safe_ripoff_stack) < N_RIPS; ++p
- 
- /*
-  * Prefixes for call/return points of library function traces.  We use these to
-@@ -1263,7 +1403,7 @@
- #define returnBool(code)	TRACE_RETURN(code,bool)
- #define returnCPtr(code)	TRACE_RETURN(code,cptr)
- #define returnCVoidPtr(code)	TRACE_RETURN(code,cvoid_ptr)
--#define returnChar(code)	TRACE_RETURN(code,chtype)
-+#define returnChtype(code)	TRACE_RETURN(code,chtype)
- #define returnCode(code)	TRACE_RETURN(code,int)
- #define returnPtr(code)		TRACE_RETURN(code,ptr)
- #define returnSP(code)		TRACE_RETURN(code,sp)
-@@ -1322,7 +1462,7 @@
- #define returnBool(code)	return code
- #define returnCPtr(code)	return code
- #define returnCVoidPtr(code)	return code
--#define returnChar(code)	return code
-+#define returnChtype(code)	return code
- #define returnCode(code)	return code
- #define returnPtr(code)		return code
- #define returnSP(code)		return code
-@@ -1348,7 +1488,7 @@
- 
- #define ALL_BUT_COLOR ((chtype)~(A_COLOR))
- #define NONBLANK_ATTR (A_NORMAL|A_BOLD|A_DIM|A_BLINK)
--#define XMC_CHANGES(c) ((c) & SP->_xmc_suppress)
-+#define XMC_CHANGES(c) ((c) & SP_PARM->_xmc_suppress)
- 
- #define toggle_attr_on(S,at) {\
-    if (PAIR_NUMBER(at) > 0) {\
-@@ -1367,38 +1507,38 @@
-    }\
-    TR(TRACE_ATTRS, ("new attribute is %s", _traceattr((S))));}
- 
--#define DelCharCost(count) \
-+#define DelCharCost(sp,count) \
- 		((parm_dch != 0) \
--		? SP->_dch_cost \
-+		? sp->_dch_cost \
- 		: ((delete_character != 0) \
--			? (SP->_dch1_cost * count) \
-+			? (sp->_dch1_cost * count) \
- 			: INFINITY))
- 
--#define InsCharCost(count) \
-+#define InsCharCost(sp,count) \
- 		((parm_ich != 0) \
--		? SP->_ich_cost \
-+		? sp->_ich_cost \
- 		: ((enter_insert_mode && exit_insert_mode) \
--		  ? SP->_smir_cost + SP->_rmir_cost + (SP->_ip_cost * count) \
-+		  ? sp->_smir_cost + sp->_rmir_cost + (sp->_ip_cost * count) \
- 		  : ((insert_character != 0) \
--		    ? ((SP->_ich1_cost + SP->_ip_cost) * count) \
-+		    ? ((sp->_ich1_cost + sp->_ip_cost) * count) \
- 		    : INFINITY)))
- 
- #if USE_XMC_SUPPORT
--#define UpdateAttrs(c)	if (!SameAttrOf(SCREEN_ATTRS(SP), c)) { \
--				attr_t chg = AttrOf(SCREEN_ATTRS(SP)); \
--				VIDATTR(AttrOf(c), GetPair(c)); \
-+#define UpdateAttrs(sp,c)	if (!SameAttrOf(SCREEN_ATTRS(sp), c)) { \
-+				attr_t chg = AttrOf(SCREEN_ATTRS(sp)); \
-+				VIDATTR(sp, AttrOf(c), GetPair(c)); \
- 				if (magic_cookie_glitch > 0 \
--				 && XMC_CHANGES((chg ^ AttrOf(SCREEN_ATTRS(SP))))) { \
-+				 && XMC_CHANGES((chg ^ AttrOf(SCREEN_ATTRS(sp))))) { \
- 					T(("%s @%d before glitch %d,%d", \
- 						__FILE__, __LINE__, \
--						SP->_cursrow, \
--						SP->_curscol)); \
--					_nc_do_xmc_glitch(chg); \
-+						sp->_cursrow, \
-+						sp->_curscol)); \
-+					NCURSES_SP_NAME(_nc_do_xmc_glitch)(NCURSES_SP_ARGx chg); \
- 				} \
- 			}
- #else
--#define UpdateAttrs(c)	if (!SameAttrOf(SCREEN_ATTRS(SP), c)) \
--				VIDATTR(AttrOf(c), GetPair(c));
-+#define UpdateAttrs(sp,c)	if (!SameAttrOf(SCREEN_ATTRS(sp), c)) \
-+				    VIDATTR(sp, AttrOf(c), GetPair(c));
- #endif
- 
- /*
-@@ -1425,16 +1565,28 @@
- extern NCURSES_EXPORT(void) _nc_toggle_attr_off (attr_t *, attr_t);
- 
- #undef  DelCharCost
--#define DelCharCost(count) _nc_DelCharCost(count)
--extern NCURSES_EXPORT(int) _nc_DelCharCost (int);
-+#define DelCharCost(sp, count) NCURSES_SP_NAME(_nc_DelCharCost)(NCURSES_SP_ARGx count)
- 
- #undef  InsCharCost
--#define InsCharCost(count) _nc_InsCharCost(count)
--extern NCURSES_EXPORT(int) _nc_InsCharCost (int);
-+#define InsCharCost(sp, count) NCURSES_SP_NAME(_nc_InsCharCost)(NCURSES_SP_ARGx count)
-+
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_DelCharCost) (NCURSES_SP_DCLx int _c);
-+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_InsCharCost) (NCURSES_SP_DCLx int _c);
- 
- #undef  UpdateAttrs
--#define UpdateAttrs(c) _nc_UpdateAttrs(c)
--extern NCURSES_EXPORT(void) _nc_UpdateAttrs (NCURSES_CH_T);
-+#define UpdateAttrs(sp,c) NCURSES_SP_NAME(_nc_UpdateAttrs)(NCURSES_SP_ARGx CHREF(c))
-+
-+#if defined(NEED_NCURSES_CH_T)
-+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_UpdateAttrs) (NCURSES_SP_DCLx CARG_CH_T _c);
-+#else
-+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_UpdateAttrs) (NCURSES_SP_DCLx chtype c);
-+#endif
-+
-+#if NCURSES_SP_FUNCS
-+extern NCURSES_EXPORT(int) _nc_DelCharCost (int);
-+extern NCURSES_EXPORT(int) _nc_InsCharCost (int);
-+extern NCURSES_EXPORT(void) _nc_UpdateAttrs (CARG_CH_T);
-+#endif /* NCURSES_SP_FUNCS */
- 
- #else
- 
-@@ -1483,8 +1635,8 @@
- #endif
- 
- /* lib_acs.c */
--extern NCURSES_EXPORT(void) _nc_init_acs (void);	/* corresponds to traditional 'init_acs()' */
--extern NCURSES_EXPORT(int) _nc_msec_cost (const char *const, int);  /* used by 'tack' program */
-+extern NCURSES_EXPORT(void) _nc_init_acs (void); /* corresponds to traditional 'init_acs()' */
-+extern NCURSES_EXPORT(int)  _nc_msec_cost (const char *const, int);  /* used by 'tack' program */
- 
- /* lib_addch.c */
- #if USE_WIDEC_SUPPORT
-@@ -1503,7 +1655,7 @@
- extern NCURSES_EXPORT(int) _nc_wgetch(WINDOW *, unsigned long *, int EVENTLIST_2nd(_nc_eventlist *));
- 
- /* lib_insch.c */
--extern NCURSES_EXPORT(int) _nc_insert_ch(WINDOW *, chtype);
-+extern NCURSES_EXPORT(int) _nc_insert_ch(SCREEN *, WINDOW *, chtype);
- 
- /* lib_mvcur.c */
- #define INFINITY	1000000	/* cost: too high to use */
-@@ -1519,7 +1671,7 @@
- extern NCURSES_EXPORT(void) _nc_screen_wrap (void);
- 
- /* lib_mouse.c */
--extern NCURSES_EXPORT(int) _nc_has_mouse (void);
-+extern NCURSES_EXPORT(bool) _nc_has_mouse (SCREEN *);
- 
- /* lib_mvcur.c */
- #define INFINITY	1000000	/* cost: too high to use */
-@@ -1527,10 +1679,13 @@
- 
- /* lib_setup.c */
- extern NCURSES_EXPORT(char *) _nc_get_locale(void);
--extern NCURSES_EXPORT(int) _nc_unicode_locale(void);
--extern NCURSES_EXPORT(int) _nc_locale_breaks_acs(TERMINAL *);
--extern NCURSES_EXPORT(int) _nc_setupterm(NCURSES_CONST char *, int, int *, bool);
--extern NCURSES_EXPORT(void) _nc_get_screensize(SCREEN *, int *, int *);
-+extern NCURSES_EXPORT(int)    _nc_unicode_locale(void);
-+extern NCURSES_EXPORT(int)    _nc_locale_breaks_acs(TERMINAL *);
-+extern NCURSES_EXPORT(int)    _nc_setupterm(NCURSES_CONST char *, int, int *, bool);
-+extern NCURSES_EXPORT(void)   _nc_get_screensize(SCREEN *, int *, int *);
-+
-+/* lib_set_term.c */
-+extern NCURSES_EXPORT(int)    _nc_ripoffline(int, int(*)(WINDOW*, int));
- 
- /* lib_tstp.c */
- #if USE_SIGWINCH
-@@ -1539,9 +1694,6 @@
- #define _nc_handle_sigwinch(a) /* nothing */
- #endif
- 
--/* lib_ungetch.c */
--extern NCURSES_EXPORT(int) _nc_ungetch (SCREEN *, int);
--
- /* lib_wacs.c */
- #if USE_WIDEC_SUPPORT
- extern NCURSES_EXPORT(void) _nc_init_wacs(void);
-@@ -1577,8 +1729,6 @@
- 
- /* elsewhere ... */
- extern NCURSES_EXPORT(ENTRY *) _nc_delink_entry (ENTRY *, TERMTYPE *);
--extern NCURSES_EXPORT(NCURSES_CONST char *) _nc_keyname (SCREEN *, int);
--extern NCURSES_EXPORT(NCURSES_CONST char *) _nc_unctrl (SCREEN *, chtype);
- extern NCURSES_EXPORT(SCREEN *) _nc_screen_of (WINDOW *);
- extern NCURSES_EXPORT(WINDOW *) _nc_makenew (int, int, int, int, int);
- extern NCURSES_EXPORT(char *) _nc_trace_buf (int, size_t);
-@@ -1592,12 +1742,14 @@
- extern NCURSES_EXPORT(int) _nc_keypad (SCREEN *, bool);
- extern NCURSES_EXPORT(int) _nc_ospeed (int);
- extern NCURSES_EXPORT(int) _nc_outch (int);
-+extern NCURSES_EXPORT(int) _nc_putp(const char *, const char *);
-+extern NCURSES_EXPORT(int) _nc_putp_flush(const char *, const char *);
- extern NCURSES_EXPORT(int) _nc_read_termcap_entry (const char *const, TERMTYPE *const);
- extern NCURSES_EXPORT(int) _nc_setupscreen (int, int, FILE *, bool, int);
- extern NCURSES_EXPORT(int) _nc_timed_wait (SCREEN *, int, int, int * EVENTLIST_2nd(_nc_eventlist *));
--extern NCURSES_EXPORT(void) _nc_do_color (short, short, bool, int (*)(int));
-+extern NCURSES_EXPORT(void) _nc_do_color (short, short, bool, NCURSES_OUTC);
- extern NCURSES_EXPORT(void) _nc_flush (void);
--extern NCURSES_EXPORT(void) _nc_free_and_exit (int);
-+extern NCURSES_EXPORT(void) _nc_free_and_exit (int) GCC_NORETURN;
- extern NCURSES_EXPORT(void) _nc_free_entry (ENTRY *, TERMTYPE *);
- extern NCURSES_EXPORT(void) _nc_freeall (void);
- extern NCURSES_EXPORT(void) _nc_hash_map (void);
-@@ -1661,24 +1813,33 @@
- 
- #define USE_SETBUF_0 0
- 
--#define NC_BUFFERED(flag) _nc_set_buffer(SP->_ofp, flag)
-+#define NC_BUFFERED(sp,flag) NCURSES_SP_NAME(_nc_set_buffer)(NCURSES_SP_ARGx sp->_ofp, flag)
- 
--#define NC_OUTPUT ((SP != 0) ? SP->_ofp : stdout)
-+#define NC_OUTPUT(sp) ((sp != 0) ? sp->_ofp : stdout)
- 
- /*
-  * On systems with a broken linker, define 'SP' as a function to force the
-  * linker to pull in the data-only module with 'SP'.
-  */
-+#define _nc_alloc_screen_sp() typeCalloc(SCREEN, 1)
-+
- #if BROKEN_LINKER
--#define SP _nc_screen()
- extern NCURSES_EXPORT(SCREEN *) _nc_screen (void);
--extern NCURSES_EXPORT(int) _nc_alloc_screen (void);
--extern NCURSES_EXPORT(void) _nc_set_screen (SCREEN *);
-+extern NCURSES_EXPORT(int)      _nc_alloc_screen (void);
-+extern NCURSES_EXPORT(void)     _nc_set_screen (SCREEN *);
-+#define CURRENT_SCREEN          _nc_screen()
- #else
- /* current screen is private data; avoid possible linking conflicts too */
- extern NCURSES_EXPORT_VAR(SCREEN *) SP;
--#define _nc_alloc_screen() ((SP = typeCalloc(SCREEN, 1)) != 0)
--#define _nc_set_screen(sp) SP = sp
-+#define CURRENT_SCREEN SP
-+#define _nc_alloc_screen()      ((SP = _nc_alloc_screen_sp()) != 0)
-+#define _nc_set_screen(sp)      SP = sp
-+#endif
-+
-+#if NCURSES_SP_FUNCS && 0
-+#define CURRENT_SCREEN_PRE      (IsPreScreen(CURRENT_SCREEN) ? CURRENT_SCREEN : new_prescr())
-+#else
-+#define CURRENT_SCREEN_PRE      CURRENT_SCREEN
- #endif
- 
- /*
-@@ -1686,10 +1847,11 @@
-  * if the application is running multiple screens under X, it's quite possible
-  * they could all have type xterm but have different sizes!  So...
-  */
--#define screen_lines	SP->_lines
--#define screen_columns	SP->_columns
-+#define screen_lines(sp)        (sp)->_lines
-+#define screen_columns(sp)      (sp)->_columns
- 
- extern NCURSES_EXPORT(int) _nc_slk_initialize (WINDOW *, int);
-+extern NCURSES_EXPORT(int) _nc_format_slks (NCURSES_SP_DCLx int _c);
- 
- /*
-  * Some constants related to SLK's
-@@ -1707,14 +1869,240 @@
- #define MAX_SKEY(fmt)     (SLK_STDFMT(fmt)? MAX_SKEY_OLD : MAX_SKEY_PC)
- #define MAX_SKEY_LEN(fmt) (SLK_STDFMT(fmt)? MAX_SKEY_LEN_OLD : MAX_SKEY_LEN_PC)
- 
--extern NCURSES_EXPORT(int) _nc_ripoffline (int line, int (*init)(WINDOW *,int));
--
- /*
-  * Common error messages
-  */
- #define MSG_NO_MEMORY "Out of memory"
- #define MSG_NO_INPUTS "Premature EOF"
- 
-+extern NCURSES_EXPORT(int) _nc_set_tty_mode(TTY *);
-+extern NCURSES_EXPORT(int) _nc_get_tty_mode(TTY *);
-+
-+/* timed_wait flag definitions */
-+#define TW_NONE    0
-+#define TW_INPUT   1
-+#define TW_MOUSE   2
-+#define TW_ANY     (TW_INPUT | TW_MOUSE)
-+#define TW_EVENT   4
-+
-+#define SetSafeOutcWrapper(outc)	    \
-+    SCREEN* sp = CURRENT_SCREEN;            \
-+    if (sp==0) {                            \
-+	struct screen dummy;		    \
-+	sp = &dummy;                        \
-+	memset(sp,0,sizeof(struct screen)); \
-+	sp->_outch = _nc_outc_wrapper;      \
-+    }\
-+    sp->jump = outc
-+
-+struct DriverTCB; /* Terminal Control Block forward declaration */
-+typedef void* TERM_HANDLE;
-+
-+typedef struct _termInfo
-+{
-+    bool caninit;
-+
-+    bool hascolor;
-+    bool initcolor;
-+    bool canchange;
-+
-+    int  tabsize;
-+
-+    int  maxcolors;
-+    int  maxpairs;
-+    int  nocolorvideo;
-+
-+    int  numlabels;
-+    int  labelwidth;
-+    int  labelheight;
-+
-+    const color_t* defaultPalette;
-+} TerminalInfo;
-+
-+typedef struct term_driver {
-+    bool   isTerminfo;
-+    bool   (*CanHandle)(struct DriverTCB*,const char*,int*);
-+    void   (*init)(struct DriverTCB*);
-+    void   (*release)(struct DriverTCB*);
-+    int    (*size)(struct DriverTCB*, int* Line, int *Cols);
-+    int    (*sgmode)(struct DriverTCB*, bool setFlag, TTY*);
-+    chtype (*conattr)(struct DriverTCB*);
-+    int    (*hwcur)(struct DriverTCB*, int yold, int xold, int y, int x);
-+    int    (*mode)(struct DriverTCB*, bool progFlag, bool defFlag);
-+    bool   (*rescol)(struct DriverTCB*);
-+    bool   (*rescolors)(struct DriverTCB*);
-+    void   (*color)(struct DriverTCB*,bool fore, int color, int(*)(SCREEN*,int));
-+    int    (*doBeepOrFlash)(struct DriverTCB*, bool);
-+    void   (*initpair)(struct DriverTCB*,short,short,short);
-+    void   (*initcolor)(struct DriverTCB*,short,short,short,short);
-+    void   (*docolor)(struct DriverTCB*,short,short,bool,int(*)(SCREEN*,int));
-+    void   (*initmouse)(struct DriverTCB*);
-+    void   (*setfilter)(struct DriverTCB*);
-+    void   (*hwlabel)(struct DriverTCB*,int,char*);
-+    void   (*hwlabelOnOff)(struct DriverTCB*,bool);
-+    int    (*update)(struct DriverTCB*);
-+    int    (*defaultcolors)(struct DriverTCB*,int,int);
-+    int    (*print)(struct DriverTCB*,char*,int);
-+    int    (*getsize)(struct DriverTCB*,int*,int*);
-+    int    (*setsize)(struct DriverTCB*,int,int);
-+    void   (*initacs)(struct DriverTCB*,chtype*,chtype*);
-+    void   (*scinit)(SCREEN *);
-+    void   (*scexit)(SCREEN *);
-+    int    (*twait)(struct DriverTCB*,int,int,int* EVENTLIST_2nd(_nc_eventlist*));
-+    int    (*read)(struct DriverTCB*,int*);
-+    int    (*nap)(struct DriverTCB*,int);
-+    int    (*kpad)(struct DriverTCB*, bool);
-+    int    (*kyOk)(struct DriverTCB*, int, bool);
-+    bool   (*kyExist)(struct DriverTCB*, int);
-+} TERM_DRIVER;
-+
-+
-+typedef struct DriverTCB
-+{
-+    TERMINAL      term;   /* needs to be the first Element !!! */
-+    TERM_HANDLE   inp;    /* The input handle of the Terminal */
-+    TERM_HANDLE   out;    /* The output handle of the Terminal in shell mode */
-+    TERM_HANDLE   hdl;    /* The output handle of the Terminal in prog  mode */
-+    TERM_DRIVER*  drv;    /* The driver for that Terminal */
-+    SCREEN*       csp;    /* The screen that owns that Terminal */
-+    TerminalInfo  info;   /* Driver independent core capabilities of the Terminal */
-+    void*         prop;   /* Driver dependent property storage to be used by the Driver */
-+    long          magic;
-+} TERMINAL_CONTROL_BLOCK;
-+
-+#define NCDRV_MAGIC(id) (0x47110000 | (id&0xffff))
-+#define NCDRV_TINFO      0x01
-+#define NCDRV_WINCONSOLE 0x02
-+
-+#define TCBOf(sp)    ((TERMINAL_CONTROL_BLOCK*)(TerminalOf(sp)))
-+#define InfoOf(sp)   TCBOf(sp)->info
-+#define CallDriver(sp,method)                        TCBOf(sp)->drv->method(TCBOf(sp))
-+#define CallDriver_1(sp,method,arg1)                 TCBOf(sp)->drv->method(TCBOf(sp),arg1)
-+#define CallDriver_2(sp,method,arg1,arg2)            TCBOf(sp)->drv->method(TCBOf(sp),arg1,arg2)
-+#define CallDriver_3(sp,method,arg1,arg2,arg3)       TCBOf(sp)->drv->method(TCBOf(sp),arg1,arg2,arg3)
-+#define CallDriver_4(sp,method,arg1,arg2,arg3,arg4)  TCBOf(sp)->drv->method(TCBOf(sp),arg1,arg2,arg3,arg4)
-+
-+extern NCURSES_EXPORT_VAR(const color_t*) _nc_cga_palette;
-+extern NCURSES_EXPORT_VAR(const color_t*) _nc_hls_palette;
-+
-+#ifdef USE_TERM_DRIVER
-+extern NCURSES_EXPORT(int)      _nc_tinfo_has_key(SCREEN*, int);
-+extern NCURSES_EXPORT(int)      _nc_tinfo_doupdate(SCREEN *sp);
-+extern NCURSES_EXPORT(int)      _nc_tinfo_mvcur(SCREEN*,int,int,int,int);
-+extern NCURSES_EXPORT(int)      _nc_get_driver(TERMINAL_CONTROL_BLOCK*, const char*, int*);
-+#endif
-+
-+#ifdef __MINGW32__
-+#include <nc_mingw.h>
-+extern NCURSES_EXPORT_VAR(TERM_DRIVER) _nc_WIN_DRIVER;
-+#endif
-+extern NCURSES_EXPORT_VAR(TERM_DRIVER) _nc_TINFO_DRIVER;
-+
-+#ifdef USE_TERM_DRIVER
-+#define IsTermInfo(sp)       (TCBOf(sp) && ((TCBOf(sp)->drv->isTerminfo)))
-+#else
-+#define IsTermInfo(sp)       TRUE
-+#endif
-+
-+#define HasTInfoTerminal(sp) ((0 != TerminalOf(sp)) && IsTermInfo(sp))
-+#define IsValidTIScreen(sp)  (HasTInfoTerminal(sp))
-+
-+/*
-+ * Exported entrypoints beyond the published API
-+ */
-+#if NCURSES_SP_FUNCS
-+extern NCURSES_EXPORT(WINDOW *) _nc_curscr_of(SCREEN*);
-+extern NCURSES_EXPORT(WINDOW *) _nc_newscr_of(SCREEN*);
-+extern NCURSES_EXPORT(WINDOW *) _nc_stdscr_of(SCREEN*);
-+extern NCURSES_EXPORT(int)      _nc_outc_wrapper(SCREEN*,int);
-+
-+#if USE_REENTRANT
-+extern NCURSES_EXPORT(char *)    NCURSES_SP_NAME(_nc_ttytype)(SCREEN*);
-+extern NCURSES_EXPORT(int)       NCURSES_SP_NAME(_nc_TABSIZE)(SCREEN*);
-+extern NCURSES_EXPORT(char *)    NCURSES_SP_NAME(longname)(SCREEN*);
-+#endif
-+
-+#if NCURSES_EXT_FUNCS
-+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_set_tabsize)(SCREEN*, int);
-+#endif
-+
-+/*
-+ * We put the safe versions of various calls here as they are not published
-+ * part of the API up to now
-+ */
-+extern NCURSES_EXPORT(TERMINAL*) NCURSES_SP_NAME(cur_term)(SCREEN *sp);
-+extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(_nc_makenew) (SCREEN*, int, int, int, int, int);
-+extern NCURSES_EXPORT(bool)     NCURSES_SP_NAME(_nc_reset_colors)(SCREEN*);
-+extern NCURSES_EXPORT(char *)   NCURSES_SP_NAME(_nc_printf_string)(SCREEN*, const char *, va_list);
-+extern NCURSES_EXPORT(chtype)   NCURSES_SP_NAME(_nc_acs_char)(SCREEN*,int);
-+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_curs_set)(SCREEN*,int);
-+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_get_tty_mode)(SCREEN*,TTY*);
-+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_mcprint)(SCREEN*,char*, int);
-+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_msec_cost)(SCREEN*, const char *, int);
-+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_outch)(SCREEN*, int);
-+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_putp)(SCREEN*, const char *, const char*);
-+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_putp_flush)(SCREEN*, const char *, const char *);
-+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_resetty)(SCREEN*);
-+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_resize_term)(SCREEN*,int,int);
-+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_ripoffline)(SCREEN*, int, int (*)(WINDOW *,int));
-+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_savetty)(SCREEN*);
-+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_scr_init)(SCREEN*,const char*);
-+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_scr_restore)(SCREEN*, const char*);
-+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_scrolln)(SCREEN*, int, int, int, int);
-+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_set_tty_mode)(SCREEN*, TTY*);
-+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_setupscreen)(SCREEN**, int, int, FILE *, bool, int);
-+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_tgetent)(SCREEN*,char*,const char *);
-+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_tigetnum)(SCREEN*,NCURSES_CONST char*);
-+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_vid_attr)(SCREEN *, attr_t, short, void *);
-+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_vidputs)(SCREEN*,chtype,int(*) (SCREEN*, int));
-+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_do_color)(SCREEN*, short, short, bool, NCURSES_SP_OUTC);
-+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_do_xmc_glitch)(SCREEN*, attr_t);
-+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_flush)(SCREEN*);
-+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_free_and_exit)(SCREEN*, int) GCC_NORETURN;
-+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_freeall)(SCREEN*);
-+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_hash_map)(SCREEN*);
-+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_init_acs)(SCREEN*);
-+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_make_oldhash)(SCREEN*, int i);
-+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_mvcur_init)(SCREEN*);
-+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_mvcur_resume)(SCREEN*);
-+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_mvcur_wrap)(SCREEN*);
-+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_screen_init)(SCREEN*);
-+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_screen_resume)(SCREEN*);
-+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_screen_wrap)(SCREEN*);
-+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_scroll_oldhash)(SCREEN*, int n, int top, int bot);
-+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_scroll_optimize)(SCREEN*);
-+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_set_buffer)(SCREEN*, FILE *, bool);
-+
-+extern NCURSES_EXPORT(void)     _nc_cookie_init(SCREEN *sp);
-+
-+#if defined(TRACE) || defined(SCROLLDEBUG) || defined(HASHDEBUG)
-+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_linedump)(SCREEN*);
-+#endif
-+
-+#if USE_WIDEC_SUPPORT
-+extern NCURSES_EXPORT(wchar_t *) NCURSES_SP_NAME(_nc_wunctrl)(SCREEN*, cchar_t *);
-+#endif
-+
-+#endif /* NCURSES_SP_FUNCS */
-+
-+#if NCURSES_SP_FUNCS
-+
-+#define safe_keyname NCURSES_SP_NAME(keyname)
-+#define safe_unctrl  NCURSES_SP_NAME(unctrl)
-+#define safe_ungetch NCURSES_SP_NAME(ungetch)
-+
-+#else
-+
-+#define safe_keyname _nc_keyname
-+#define safe_unctrl  _nc_unctrl
-+#define safe_ungetch _nc_ungetch
-+
-+extern NCURSES_EXPORT(NCURSES_CONST char *) _nc_keyname (SCREEN *, int);
-+extern NCURSES_EXPORT(int) _nc_ungetch (SCREEN *, int);
-+extern NCURSES_EXPORT(NCURSES_CONST char *) _nc_unctrl (SCREEN *, chtype);
-+
-+#endif
-+
- #ifdef __cplusplus
- }
- #endif
-diff -Naur ncurses-5.7.orig/ncurses/llib-lncurses ncurses-5.7/ncurses/llib-lncurses
---- ncurses-5.7.orig/ncurses/llib-lncurses	2008-10-11 13:57:29.000000000 -0700
-+++ ncurses-5.7/ncurses/llib-lncurses	2009-07-19 15:04:11.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -27,7 +27,7 @@
-  ****************************************************************************/
- 
- /****************************************************************************
-- *  Author: Thomas E. Dickey 1996-2008                                      *
-+ *  Author: Thomas E. Dickey 1996-2009                                      *
-  ****************************************************************************/
- /* LINTLIBRARY */
- 
-@@ -38,27 +38,54 @@
- #undef _nc_oldnums
- int	*_nc_oldnums;
- 
-+#undef _nc_scroll_optimize_sp
-+void	_nc_scroll_optimize_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef _nc_scroll_optimize
- void	_nc_scroll_optimize(void)
- 		{ /* void */ }
- 
-+#undef _nc_linedump_sp
-+void	_nc_linedump_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef _nc_linedump
- void	_nc_linedump(void)
- 		{ /* void */ }
- 
- /* ./tty/hashmap.c */
- 
--#include <term.h>
-+#undef _nc_hash_map_sp
-+void	_nc_hash_map_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
- 
- #undef _nc_hash_map
- void	_nc_hash_map(void)
- 		{ /* void */ }
- 
-+#undef _nc_make_oldhash_sp
-+void	_nc_make_oldhash_sp(
-+		SCREEN	*sp, 
-+		int	i)
-+		{ /* void */ }
-+
- #undef _nc_make_oldhash
- void	_nc_make_oldhash(
- 		int	i)
- 		{ /* void */ }
- 
-+#undef _nc_scroll_oldhash_sp
-+void	_nc_scroll_oldhash_sp(
-+		SCREEN	*sp, 
-+		int	n, 
-+		int	top, 
-+		int	bot)
-+		{ /* void */ }
-+
- #undef _nc_scroll_oldhash
- void	_nc_scroll_oldhash(
- 		int	n, 
-@@ -112,6 +139,11 @@
- 
- /* ./base/lib_beep.c */
- 
-+#undef beep_sp
-+int	beep_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef beep
- int	beep(void)
- 		{ return(*(int *)0); }
-@@ -187,6 +219,7 @@
- 
- /* ./base/lib_color.c */
- 
-+#include <term.h>
- #include <tic.h>
- 
- #undef COLOR_PAIRS
-@@ -194,14 +227,32 @@
- #undef COLORS
- int	COLORS;
- 
-+#undef _nc_reset_colors_sp
-+NCURSES_BOOL _nc_reset_colors_sp(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
- #undef _nc_reset_colors
- NCURSES_BOOL _nc_reset_colors(void)
- 		{ return(*(NCURSES_BOOL *)0); }
- 
-+#undef start_color_sp
-+int	start_color_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef start_color
- int	start_color(void)
- 		{ return(*(int *)0); }
- 
-+#undef init_pair_sp
-+int	init_pair_sp(
-+		SCREEN	*sp, 
-+		short	pair, 
-+		short	f, 
-+		short	b)
-+		{ return(*(int *)0); }
-+
- #undef init_pair
- int	init_pair(
- 		short	pair, 
-@@ -209,6 +260,15 @@
- 		short	b)
- 		{ return(*(int *)0); }
- 
-+#undef init_color_sp
-+int	init_color_sp(
-+		SCREEN	*sp, 
-+		short	color, 
-+		short	r, 
-+		short	g, 
-+		short	b)
-+		{ return(*(int *)0); }
-+
- #undef init_color
- int	init_color(
- 		short	color, 
-@@ -217,14 +277,33 @@
- 		short	b)
- 		{ return(*(int *)0); }
- 
-+#undef can_change_color_sp
-+NCURSES_BOOL can_change_color_sp(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
- #undef can_change_color
- NCURSES_BOOL can_change_color(void)
- 		{ return(*(NCURSES_BOOL *)0); }
- 
-+#undef has_colors_sp
-+NCURSES_BOOL has_colors_sp(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
- #undef has_colors
- NCURSES_BOOL has_colors(void)
- 		{ return(*(NCURSES_BOOL *)0); }
- 
-+#undef color_content_sp
-+int	color_content_sp(
-+		SCREEN	*sp, 
-+		short	color, 
-+		short	*r, 
-+		short	*g, 
-+		short	*b)
-+		{ return(*(int *)0); }
-+
- #undef color_content
- int	color_content(
- 		short	color, 
-@@ -233,6 +312,14 @@
- 		short	*b)
- 		{ return(*(int *)0); }
- 
-+#undef pair_content_sp
-+int	pair_content_sp(
-+		SCREEN	*sp, 
-+		short	pair, 
-+		short	*f, 
-+		short	*b)
-+		{ return(*(int *)0); }
-+
- #undef pair_content
- int	pair_content(
- 		short	pair, 
-@@ -240,13 +327,21 @@
- 		short	*b)
- 		{ return(*(int *)0); }
- 
-+#undef _nc_do_color_sp
-+void	_nc_do_color_sp(
-+		SCREEN	*sp, 
-+		short	old_pair, 
-+		short	pair, 
-+		NCURSES_BOOL reverse, 
-+		NCURSES_OUTC_sp outc)
-+		{ /* void */ }
-+
- #undef _nc_do_color
- void	_nc_do_color(
- 		short	old_pair, 
- 		short	pair, 
- 		NCURSES_BOOL reverse, 
--		int	(*outc)(
--		int	p1))
-+		NCURSES_OUTC outc)
- 		{ /* void */ }
- 
- /* ./base/lib_colorset.c */
-@@ -274,16 +369,31 @@
- 
- /* ./base/lib_echo.c */
- 
-+#undef echo_sp
-+int	echo_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef echo
- int	echo(void)
- 		{ return(*(int *)0); }
- 
-+#undef noecho_sp
-+int	noecho_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef noecho
- int	noecho(void)
- 		{ return(*(int *)0); }
- 
- /* ./base/lib_endwin.c */
- 
-+#undef endwin_sp
-+int	endwin_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef endwin
- int	endwin(void)
- 		{ return(*(int *)0); }
-@@ -297,6 +407,11 @@
- 
- /* ./base/lib_flash.c */
- 
-+#undef flash_sp
-+int	flash_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef flash
- int	flash(void)
- 		{ return(*(int *)0); }
-@@ -1138,6 +1253,12 @@
- #undef ESCDELAY
- int	ESCDELAY;
- 
-+#undef set_escdelay_sp
-+int	set_escdelay_sp(
-+		SCREEN	*sp, 
-+		int	value)
-+		{ return(*(int *)0); }
-+
- #undef set_escdelay
- int	set_escdelay(
- 		int	value)
-@@ -1200,6 +1321,7 @@
- 
- #undef _nc_insert_ch
- int	_nc_insert_ch(
-+		SCREEN	*sp, 
- 		WINDOW	*win, 
- 		chtype	ch)
- 		{ return(*(int *)0); }
-@@ -1238,6 +1360,11 @@
- 
- /* ./base/lib_isendwin.c */
- 
-+#undef isendwin_sp
-+NCURSES_BOOL isendwin_sp(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
- #undef isendwin
- NCURSES_BOOL isendwin(void)
- 		{ return(*(NCURSES_BOOL *)0); }
-@@ -1252,16 +1379,35 @@
- 
- /* ./base/lib_mouse.c */
- 
-+#undef getmouse_sp
-+int	getmouse_sp(
-+		SCREEN	*sp, 
-+		MEVENT	*aevent)
-+		{ return(*(int *)0); }
-+
- #undef getmouse
- int	getmouse(
- 		MEVENT	*aevent)
- 		{ return(*(int *)0); }
- 
-+#undef ungetmouse_sp
-+int	ungetmouse_sp(
-+		SCREEN	*sp, 
-+		MEVENT	*aevent)
-+		{ return(*(int *)0); }
-+
- #undef ungetmouse
- int	ungetmouse(
- 		MEVENT	*aevent)
- 		{ return(*(int *)0); }
- 
-+#undef mousemask_sp
-+mmask_t	mousemask_sp(
-+		SCREEN	*sp, 
-+		mmask_t	newmask, 
-+		mmask_t	*oldmask)
-+		{ return(*(mmask_t *)0); }
-+
- #undef mousemask
- mmask_t	mousemask(
- 		mmask_t	newmask, 
-@@ -1275,14 +1421,30 @@
- 		int	x)
- 		{ return(*(NCURSES_BOOL *)0); }
- 
-+#undef mouseinterval_sp
-+int	mouseinterval_sp(
-+		SCREEN	*sp, 
-+		int	maxclick)
-+		{ return(*(int *)0); }
-+
- #undef mouseinterval
- int	mouseinterval(
- 		int	maxclick)
- 		{ return(*(int *)0); }
- 
- #undef _nc_has_mouse
--int	_nc_has_mouse(void)
--		{ return(*(int *)0); }
-+NCURSES_BOOL _nc_has_mouse(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef has_mouse_sp
-+NCURSES_BOOL has_mouse_sp(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef has_mouse
-+NCURSES_BOOL has_mouse(void)
-+		{ return(*(NCURSES_BOOL *)0); }
- 
- #undef wmouse_trafo
- NCURSES_BOOL wmouse_trafo(
-@@ -1303,24 +1465,55 @@
- 
- /* ./tty/lib_mvcur.c */
- 
-+#undef _nc_msec_cost_sp
-+int	_nc_msec_cost_sp(
-+		SCREEN	*sp, 
-+		const char *const cap, 
-+		int	affcnt)
-+		{ return(*(int *)0); }
-+
- #undef _nc_msec_cost
- int	_nc_msec_cost(
- 		const char *const cap, 
- 		int	affcnt)
- 		{ return(*(int *)0); }
- 
-+#undef _nc_mvcur_resume_sp
-+void	_nc_mvcur_resume_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef _nc_mvcur_resume
- void	_nc_mvcur_resume(void)
- 		{ /* void */ }
- 
-+#undef _nc_mvcur_init_sp
-+void	_nc_mvcur_init_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef _nc_mvcur_init
- void	_nc_mvcur_init(void)
- 		{ /* void */ }
- 
-+#undef _nc_mvcur_wrap_sp
-+void	_nc_mvcur_wrap_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef _nc_mvcur_wrap
- void	_nc_mvcur_wrap(void)
- 		{ /* void */ }
- 
-+#undef mvcur_sp
-+int	mvcur_sp(
-+		SCREEN	*sp, 
-+		int	yold, 
-+		int	xold, 
-+		int	ynew, 
-+		int	xnew)
-+		{ return(*(int *)0); }
-+
- #undef mvcur
- int	mvcur(
- 		int	yold, 
-@@ -1343,14 +1536,32 @@
- 
- /* ./base/lib_newterm.c */
- 
-+#undef filter_sp
-+void	filter_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef filter
- void	filter(void)
- 		{ /* void */ }
- 
-+#undef nofilter_sp
-+void	nofilter_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef nofilter
- void	nofilter(void)
- 		{ /* void */ }
- 
-+#undef newterm_sp
-+SCREEN	*newterm_sp(
-+		SCREEN	*sp, 
-+		char	*name, 
-+		FILE	*ofp, 
-+		FILE	*ifp)
-+		{ return(*(SCREEN **)0); }
-+
- #undef newterm
- SCREEN	*newterm(
- 		char	*name, 
-@@ -1365,6 +1576,15 @@
- 		WINDOW	*win)
- 		{ return(*(int *)0); }
- 
-+#undef newwin_sp
-+WINDOW	*newwin_sp(
-+		SCREEN	*sp, 
-+		int	num_lines, 
-+		int	num_columns, 
-+		int	begy, 
-+		int	begx)
-+		{ return(*(WINDOW **)0); }
-+
- #undef newwin
- WINDOW	*newwin(
- 		int	num_lines, 
-@@ -1391,6 +1611,16 @@
- 		int	x)
- 		{ return(*(WINDOW **)0); }
- 
-+#undef _nc_makenew_sp
-+WINDOW	*_nc_makenew_sp(
-+		SCREEN	*sp, 
-+		int	num_lines, 
-+		int	num_columns, 
-+		int	begy, 
-+		int	begx, 
-+		int	flags)
-+		{ return(*(WINDOW **)0); }
-+
- #undef _nc_makenew
- WINDOW	*_nc_makenew(
- 		int	num_lines, 
-@@ -1400,17 +1630,37 @@
- 		int	flags)
- 		{ return(*(WINDOW **)0); }
- 
--#undef _nc_screen_of
--SCREEN	*_nc_screen_of(
--		WINDOW	*win)
--		{ return(*(SCREEN **)0); }
-+#undef _nc_curscr_of
-+WINDOW	*_nc_curscr_of(
-+		SCREEN	*sp)
-+		{ return(*(WINDOW **)0); }
-+
-+#undef _nc_newscr_of
-+WINDOW	*_nc_newscr_of(
-+		SCREEN	*sp)
-+		{ return(*(WINDOW **)0); }
-+
-+#undef _nc_stdscr_of
-+WINDOW	*_nc_stdscr_of(
-+		SCREEN	*sp)
-+		{ return(*(WINDOW **)0); }
- 
- /* ./base/lib_nl.c */
- 
-+#undef nl_sp
-+int	nl_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef nl
- int	nl(void)
- 		{ return(*(int *)0); }
- 
-+#undef nonl_sp
-+int	nonl_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef nonl
- int	nonl(void)
- 		{ return(*(int *)0); }
-@@ -1444,6 +1694,13 @@
- 
- /* ./base/lib_pad.c */
- 
-+#undef newpad_sp
-+WINDOW	*newpad_sp(
-+		SCREEN	*sp, 
-+		int	l, 
-+		int	c)
-+		{ return(*(WINDOW **)0); }
-+
- #undef newpad
- WINDOW	*newpad(
- 		int	l, 
-@@ -1549,6 +1806,14 @@
- 
- /* ./base/lib_restart.c */
- 
-+#undef restartterm_sp
-+int	restartterm_sp(
-+		SCREEN	*sp, 
-+		char	*termp, 
-+		int	filenum, 
-+		int	*errret)
-+		{ return(*(int *)0); }
-+
- #undef restartterm
- int	restartterm(
- 		char	*termp, 
-@@ -1597,6 +1862,12 @@
- 
- /* ./base/lib_screen.c */
- 
-+#undef getwin_sp
-+WINDOW	*getwin_sp(
-+		SCREEN	*sp, 
-+		FILE	*filep)
-+		{ return(*(WINDOW **)0); }
-+
- #undef getwin
- WINDOW	*getwin(
- 		FILE	*filep)
-@@ -1608,6 +1879,12 @@
- 		FILE	*filep)
- 		{ return(*(int *)0); }
- 
-+#undef scr_restore_sp
-+int	scr_restore_sp(
-+		SCREEN	*sp, 
-+		const char *file)
-+		{ return(*(int *)0); }
-+
- #undef scr_restore
- int	scr_restore(
- 		const char *file)
-@@ -1618,11 +1895,23 @@
- 		const char *file)
- 		{ return(*(int *)0); }
- 
-+#undef scr_init_sp
-+int	scr_init_sp(
-+		SCREEN	*sp, 
-+		const char *file)
-+		{ return(*(int *)0); }
-+
- #undef scr_init
- int	scr_init(
- 		const char *file)
- 		{ return(*(int *)0); }
- 
-+#undef scr_set_sp
-+int	scr_set_sp(
-+		SCREEN	*sp, 
-+		const char *file)
-+		{ return(*(int *)0); }
-+
- #undef scr_set
- int	scr_set(
- 		const char *file)
-@@ -1683,6 +1972,15 @@
- 		int	slk_format)
- 		{ return(*(int *)0); }
- 
-+#undef _nc_ripoffline_sp
-+int	_nc_ripoffline_sp(
-+		SCREEN	*sp, 
-+		int	line, 
-+		int	(*init)(
-+		WINDOW	*p1, 
-+		int	p2))
-+		{ return(*(int *)0); }
-+
- #undef _nc_ripoffline
- int	_nc_ripoffline(
- 		int	line, 
-@@ -1691,6 +1989,15 @@
- 		int	p2))
- 		{ return(*(int *)0); }
- 
-+#undef ripoffline_sp
-+int	ripoffline_sp(
-+		SCREEN	*sp, 
-+		int	line, 
-+		int	(*init)(
-+		WINDOW	*p1, 
-+		int	p2))
-+		{ return(*(int *)0); }
-+
- #undef ripoffline
- int	ripoffline(
- 		int	line, 
-@@ -1707,12 +2014,25 @@
- 		int	cols)
- 		{ return(*(int *)0); }
- 
-+#undef slk_restore_sp
-+int	slk_restore_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef slk_restore
- int	slk_restore(void)
- 		{ return(*(int *)0); }
- 
- /* ./base/lib_slkatr_set.c */
- 
-+#undef slk_attr_set_sp
-+int	slk_attr_set_sp(
-+		SCREEN	*sp, 
-+		const attr_t attr, 
-+		short	color_pair_number, 
-+		void	*opts)
-+		{ return(*(int *)0); }
-+
- #undef slk_attr_set
- int	slk_attr_set(
- 		const attr_t attr, 
-@@ -1722,6 +2042,12 @@
- 
- /* ./base/lib_slkatrof.c */
- 
-+#undef slk_attroff_sp
-+int	slk_attroff_sp(
-+		SCREEN	*sp, 
-+		const chtype attr)
-+		{ return(*(int *)0); }
-+
- #undef slk_attroff
- int	slk_attroff(
- 		const chtype attr)
-@@ -1729,6 +2055,12 @@
- 
- /* ./base/lib_slkatron.c */
- 
-+#undef slk_attron_sp
-+int	slk_attron_sp(
-+		SCREEN	*sp, 
-+		const chtype attr)
-+		{ return(*(int *)0); }
-+
- #undef slk_attron
- int	slk_attron(
- 		const chtype attr)
-@@ -1736,6 +2068,12 @@
- 
- /* ./base/lib_slkatrset.c */
- 
-+#undef slk_attrset_sp
-+int	slk_attrset_sp(
-+		SCREEN	*sp, 
-+		const chtype attr)
-+		{ return(*(int *)0); }
-+
- #undef slk_attrset
- int	slk_attrset(
- 		const chtype attr)
-@@ -1743,18 +2081,34 @@
- 
- /* ./base/lib_slkattr.c */
- 
-+#undef slk_attr_sp
-+attr_t	slk_attr_sp(
-+		SCREEN	*sp)
-+		{ return(*(attr_t *)0); }
-+
- #undef slk_attr
- attr_t	slk_attr(void)
- 		{ return(*(attr_t *)0); }
- 
- /* ./base/lib_slkclear.c */
- 
-+#undef slk_clear_sp
-+int	slk_clear_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef slk_clear
- int	slk_clear(void)
- 		{ return(*(int *)0); }
- 
- /* ./base/lib_slkcolor.c */
- 
-+#undef slk_color_sp
-+int	slk_color_sp(
-+		SCREEN	*sp, 
-+		short	color_pair_number)
-+		{ return(*(int *)0); }
-+
- #undef slk_color
- int	slk_color(
- 		short	color_pair_number)
-@@ -1762,6 +2116,12 @@
- 
- /* ./base/lib_slkinit.c */
- 
-+#undef slk_init_sp
-+int	slk_init_sp(
-+		SCREEN	*sp, 
-+		int	format)
-+		{ return(*(int *)0); }
-+
- #undef slk_init
- int	slk_init(
- 		int	format)
-@@ -1769,6 +2129,12 @@
- 
- /* ./base/lib_slklab.c */
- 
-+#undef slk_label_sp
-+char	*slk_label_sp(
-+		SCREEN	*sp, 
-+		int	n)
-+		{ return(*(char **)0); }
-+
- #undef slk_label
- char	*slk_label(
- 		int	n)
-@@ -1776,16 +2142,34 @@
- 
- /* ./base/lib_slkrefr.c */
- 
-+#undef slk_noutrefresh_sp
-+int	slk_noutrefresh_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef slk_noutrefresh
- int	slk_noutrefresh(void)
- 		{ return(*(int *)0); }
- 
-+#undef slk_refresh_sp
-+int	slk_refresh_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef slk_refresh
- int	slk_refresh(void)
- 		{ return(*(int *)0); }
- 
- /* ./base/lib_slkset.c */
- 
-+#undef slk_set_sp
-+int	slk_set_sp(
-+		SCREEN	*sp, 
-+		int	i, 
-+		const char *astr, 
-+		int	format)
-+		{ return(*(int *)0); }
-+
- #undef slk_set
- int	slk_set(
- 		int	i, 
-@@ -1795,6 +2179,11 @@
- 
- /* ./base/lib_slktouch.c */
- 
-+#undef slk_touch_sp
-+int	slk_touch_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef slk_touch
- int	slk_touch(void)
- 		{ return(*(int *)0); }
-@@ -1857,8 +2246,8 @@
- 		SCREEN	*sp)
- 		{ /* void */ }
- 
--#undef _nc_ungetch
--int	_nc_ungetch(
-+#undef ungetch_sp
-+int	ungetch_sp(
- 		SCREEN	*sp, 
- 		int	ch)
- 		{ return(*(int *)0); }
-@@ -1870,11 +2259,23 @@
- 
- /* ./tty/lib_vidattr.c */
- 
-+#undef vidputs_sp
-+int	vidputs_sp(
-+		SCREEN	*sp, 
-+		chtype	newmode, 
-+		NCURSES_OUTC_sp outc)
-+		{ return(*(int *)0); }
-+
- #undef vidputs
- int	vidputs(
- 		chtype	newmode, 
--		int	(*outc)(
--		int	p1))
-+		NCURSES_OUTC outc)
-+		{ return(*(int *)0); }
-+
-+#undef vidattr_sp
-+int	vidattr_sp(
-+		SCREEN	*sp, 
-+		chtype	newmode)
- 		{ return(*(int *)0); }
- 
- #undef vidattr
-@@ -1882,6 +2283,11 @@
- 		chtype	newmode)
- 		{ return(*(int *)0); }
- 
-+#undef termattrs_sp
-+chtype	termattrs_sp(
-+		SCREEN	*sp)
-+		{ return(*(chtype *)0); }
-+
- #undef termattrs
- chtype	termattrs(void)
- 		{ return(*(chtype *)0); }
-@@ -1962,12 +2368,24 @@
- 
- /* ./base/nc_panel.c */
- 
-+#undef _nc_panelhook_sp
-+struct panelhook *_nc_panelhook_sp(
-+		SCREEN	*sp)
-+		{ return(*(struct panelhook **)0); }
-+
- #undef _nc_panelhook
- struct panelhook *_nc_panelhook(void)
- 		{ return(*(struct panelhook **)0); }
- 
- /* ./base/safe_sprintf.c */
- 
-+#undef _nc_printf_string_sp
-+char	*_nc_printf_string_sp(
-+		SCREEN	*sp, 
-+		const char *fmt, 
-+		va_list	ap)
-+		{ return(*(char **)0); }
-+
- #undef _nc_printf_string
- char	*_nc_printf_string(
- 		const char *fmt, 
-@@ -1979,10 +2397,24 @@
- #include <sys/time.h>
- #include <sys/times.h>
- 
-+#undef doupdate_sp
-+int	doupdate_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef doupdate
- int	doupdate(void)
- 		{ return(*(int *)0); }
- 
-+#undef _nc_scrolln_sp
-+int	_nc_scrolln_sp(
-+		SCREEN	*sp, 
-+		int	n, 
-+		int	top, 
-+		int	bot, 
-+		int	maxy)
-+		{ return(*(int *)0); }
-+
- #undef _nc_scrolln
- int	_nc_scrolln(
- 		int	n, 
-@@ -1991,18 +2423,39 @@
- 		int	maxy)
- 		{ return(*(int *)0); }
- 
-+#undef _nc_screen_resume_sp
-+void	_nc_screen_resume_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef _nc_screen_resume
- void	_nc_screen_resume(void)
- 		{ /* void */ }
- 
-+#undef _nc_screen_init_sp
-+void	_nc_screen_init_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef _nc_screen_init
- void	_nc_screen_init(void)
- 		{ /* void */ }
- 
-+#undef _nc_screen_wrap_sp
-+void	_nc_screen_wrap_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef _nc_screen_wrap
- void	_nc_screen_wrap(void)
- 		{ /* void */ }
- 
-+#undef _nc_do_xmc_glitch_sp
-+void	_nc_do_xmc_glitch_sp(
-+		SCREEN	*sp, 
-+		attr_t	previous)
-+		{ /* void */ }
-+
- #undef _nc_do_xmc_glitch
- void	_nc_do_xmc_glitch(
- 		attr_t	previous)
-@@ -2040,6 +2493,12 @@
- void	_nc_freeall(void)
- 		{ /* void */ }
- 
-+#undef _nc_free_and_exit_sp
-+void	_nc_free_and_exit_sp(
-+		SCREEN	*sp, 
-+		int	code)
-+		{ /* void */ }
-+
- #undef _nc_free_and_exit
- void	_nc_free_and_exit(
- 		int	code)
-@@ -2059,6 +2518,24 @@
- 		attr_t	at)
- 		{ /* void */ }
- 
-+#undef _nc_DelCharCost_sp
-+int	_nc_DelCharCost_sp(
-+		SCREEN	*sp, 
-+		int	count)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_InsCharCost_sp
-+int	_nc_InsCharCost_sp(
-+		SCREEN	*sp, 
-+		int	count)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_UpdateAttrs_sp
-+void	_nc_UpdateAttrs_sp(
-+		SCREEN	*sp, 
-+		chtype	c)
-+		{ /* void */ }
-+
- #undef _nc_DelCharCost
- int	_nc_DelCharCost(
- 		int	count)
-@@ -2076,6 +2553,12 @@
- 
- /* ./base/legacy_coding.c */
- 
-+#undef use_legacy_coding_sp
-+int	use_legacy_coding_sp(
-+		SCREEN	*sp, 
-+		int	level)
-+		{ return(*(int *)0); }
-+
- #undef use_legacy_coding
- int	use_legacy_coding(
- 		int	level)
-@@ -2083,10 +2566,22 @@
- 
- /* ./base/lib_dft_fgbg.c */
- 
-+#undef use_default_colors_sp
-+int	use_default_colors_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef use_default_colors
- int	use_default_colors(void)
- 		{ return(*(int *)0); }
- 
-+#undef assume_default_colors_sp
-+int	assume_default_colors_sp(
-+		SCREEN	*sp, 
-+		int	fg, 
-+		int	bg)
-+		{ return(*(int *)0); }
-+
- #undef assume_default_colors
- int	assume_default_colors(
- 		int	fg, 
-@@ -2095,6 +2590,13 @@
- 
- /* ./tinfo/lib_print.c */
- 
-+#undef mcprint_sp
-+int	mcprint_sp(
-+		SCREEN	*sp, 
-+		char	*data, 
-+		int	len)
-+		{ return(*(int *)0); }
-+
- #undef mcprint
- int	mcprint(
- 		char	*data, 
-@@ -2103,18 +2605,39 @@
- 
- /* ./base/resizeterm.c */
- 
-+#undef is_term_resized_sp
-+NCURSES_BOOL is_term_resized_sp(
-+		SCREEN	*sp, 
-+		int	ToLines, 
-+		int	ToCols)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
- #undef is_term_resized
- NCURSES_BOOL is_term_resized(
- 		int	ToLines, 
- 		int	ToCols)
- 		{ return(*(NCURSES_BOOL *)0); }
- 
-+#undef resize_term_sp
-+int	resize_term_sp(
-+		SCREEN	*sp, 
-+		int	ToLines, 
-+		int	ToCols)
-+		{ return(*(int *)0); }
-+
- #undef resize_term
- int	resize_term(
- 		int	ToLines, 
- 		int	ToCols)
- 		{ return(*(int *)0); }
- 
-+#undef resizeterm_sp
-+int	resizeterm_sp(
-+		SCREEN	*sp, 
-+		int	ToLines, 
-+		int	ToCols)
-+		{ return(*(int *)0); }
-+
- #undef resizeterm
- int	resizeterm(
- 		int	ToLines, 
-@@ -2397,6 +2920,11 @@
- #undef acs_map
- chtype	acs_map[128];
- 
-+#undef _nc_init_acs_sp
-+void	_nc_init_acs_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef _nc_init_acs
- void	_nc_init_acs(void)
- 		{ /* void */ }
-@@ -2420,6 +2948,11 @@
- 		int	BaudRate)
- 		{ return(*(int *)0); }
- 
-+#undef baudrate_sp
-+int	baudrate_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef baudrate
- int	baudrate(void)
- 		{ return(*(int *)0); }
-@@ -2434,6 +2967,12 @@
- 		TERMINAL *termp)
- 		{ return(*(TERMINAL **)0); }
- 
-+#undef del_curterm_sp
-+int	del_curterm_sp(
-+		SCREEN	*sp, 
-+		TERMINAL *termp)
-+		{ return(*(int *)0); }
-+
- #undef del_curterm
- int	del_curterm(
- 		TERMINAL *termp)
-@@ -2456,26 +2995,56 @@
- #undef _nc_prescreen
- NCURSES_PRESCREEN _nc_prescreen;
- 
-+#undef _nc_screen_of
-+SCREEN	*_nc_screen_of(
-+		WINDOW	*win)
-+		{ return(*(SCREEN **)0); }
-+
- /* ./tinfo/lib_has_cap.c */
- 
-+#undef has_ic_sp
-+NCURSES_BOOL has_ic_sp(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
- #undef has_ic
- NCURSES_BOOL has_ic(void)
- 		{ return(*(NCURSES_BOOL *)0); }
- 
-+#undef has_il_sp
-+NCURSES_BOOL has_il_sp(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
- #undef has_il
- NCURSES_BOOL has_il(void)
- 		{ return(*(NCURSES_BOOL *)0); }
- 
- /* ./tinfo/lib_kernel.c */
- 
-+#undef erasechar_sp
-+char	erasechar_sp(
-+		SCREEN	*sp)
-+		{ return(*(char *)0); }
-+
- #undef erasechar
- char	erasechar(void)
- 		{ return(*(char *)0); }
- 
-+#undef killchar_sp
-+char	killchar_sp(
-+		SCREEN	*sp)
-+		{ return(*(char *)0); }
-+
- #undef killchar
- char	killchar(void)
- 		{ return(*(char *)0); }
- 
-+#undef flushinp_sp
-+int	flushinp_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef flushinp
- int	flushinp(void)
- 		{ return(*(int *)0); }
-@@ -2484,8 +3053,8 @@
- 
- struct kn { short offset; int code; };
- 
--#undef _nc_keyname
--char	*_nc_keyname(
-+#undef keyname_sp
-+char	*keyname_sp(
- 		SCREEN	*sp, 
- 		int	c)
- 		{ return(*(char **)0); }
-@@ -2505,6 +3074,12 @@
- 
- #include <time.h>
- 
-+#undef napms_sp
-+int	napms_sp(
-+		SCREEN	*sp, 
-+		int	ms)
-+		{ return(*(int *)0); }
-+
- #undef napms
- int	napms(
- 		int	ms)
-@@ -2524,6 +3099,12 @@
- 		NCURSES_BOOL flag)
- 		{ /* void */ }
- 
-+#undef halfdelay_sp
-+int	halfdelay_sp(
-+		SCREEN	*sp, 
-+		int	t)
-+		{ return(*(int *)0); }
-+
- #undef halfdelay
- int	halfdelay(
- 		int	t)
-@@ -2559,21 +3140,52 @@
- 		NCURSES_BOOL flag)
- 		{ return(*(int *)0); }
- 
-+#undef curs_set_sp
-+int	curs_set_sp(
-+		SCREEN	*sp, 
-+		int	vis)
-+		{ return(*(int *)0); }
-+
- #undef curs_set
- int	curs_set(
- 		int	vis)
- 		{ return(*(int *)0); }
- 
-+#undef typeahead_sp
-+int	typeahead_sp(
-+		SCREEN	*sp, 
-+		int	fd)
-+		{ return(*(int *)0); }
-+
- #undef typeahead
- int	typeahead(
- 		int	fd)
- 		{ return(*(int *)0); }
- 
-+#undef has_key_sp
-+int	has_key_sp(
-+		SCREEN	*sp, 
-+		int	keycode)
-+		{ return(*(int *)0); }
-+
- #undef has_key
- int	has_key(
- 		int	keycode)
- 		{ return(*(int *)0); }
- 
-+#undef _nc_putp_flush_sp
-+int	_nc_putp_flush_sp(
-+		SCREEN	*sp, 
-+		const char *name, 
-+		const char *value)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_putp_flush
-+int	_nc_putp_flush(
-+		const char *name, 
-+		const char *value)
-+		{ return(*(int *)0); }
-+
- #undef _nc_keypad
- int	_nc_keypad(
- 		SCREEN	*sp, 
-@@ -2582,30 +3194,67 @@
- 
- /* ./tinfo/lib_raw.c */
- 
-+#undef raw_sp
-+int	raw_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef raw
- int	raw(void)
- 		{ return(*(int *)0); }
- 
-+#undef cbreak_sp
-+int	cbreak_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef cbreak
- int	cbreak(void)
- 		{ return(*(int *)0); }
- 
-+#undef qiflush_sp
-+void	qiflush_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef qiflush
- void	qiflush(void)
- 		{ /* void */ }
- 
-+#undef noraw_sp
-+int	noraw_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef noraw
- int	noraw(void)
- 		{ return(*(int *)0); }
- 
-+#undef nocbreak_sp
-+int	nocbreak_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef nocbreak
- int	nocbreak(void)
- 		{ return(*(int *)0); }
- 
-+#undef noqiflush_sp
-+void	noqiflush_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef noqiflush
- void	noqiflush(void)
- 		{ /* void */ }
- 
-+#undef intrflush_sp
-+int	intrflush_sp(
-+		SCREEN	*sp, 
-+		WINDOW	*win, 
-+		NCURSES_BOOL flag)
-+		{ return(*(int *)0); }
-+
- #undef intrflush
- int	intrflush(
- 		WINDOW	*win, 
-@@ -2627,6 +3276,12 @@
- #undef TABSIZE
- int	TABSIZE;
- 
-+#undef set_tabsize_sp
-+int	set_tabsize_sp(
-+		SCREEN	*sp, 
-+		int	value)
-+		{ return(*(int *)0); }
-+
- #undef set_tabsize
- int	set_tabsize(
- 		int	value)
-@@ -2637,6 +3292,12 @@
- 		SCREEN	*sp)
- 		{ return(*(int *)0); }
- 
-+#undef use_env_sp
-+void	use_env_sp(
-+		SCREEN	*sp, 
-+		NCURSES_BOOL f)
-+		{ /* void */ }
-+
- #undef use_env
- void	use_env(
- 		NCURSES_BOOL f)
-@@ -2689,8 +3350,9 @@
- #undef BC
- char	*BC;
- 
--#undef tgetent
--int	tgetent(
-+#undef tgetent_sp
-+int	tgetent_sp(
-+		SCREEN	*sp, 
- 		char	*bufp, 
- 		const char *name)
- 		{ return(*(int *)0); }
-@@ -2701,16 +3363,41 @@
- 
- #endif
- 
-+#undef tgetent
-+int	tgetent(
-+		char	*bufp, 
-+		const char *name)
-+		{ return(*(int *)0); }
-+
-+#undef tgetflag_sp
-+int	tgetflag_sp(
-+		SCREEN	*sp, 
-+		char	*id)
-+		{ return(*(int *)0); }
-+
- #undef tgetflag
- int	tgetflag(
- 		char	*id)
- 		{ return(*(int *)0); }
- 
-+#undef tgetnum_sp
-+int	tgetnum_sp(
-+		SCREEN	*sp, 
-+		char	*id)
-+		{ return(*(int *)0); }
-+
- #undef tgetnum
- int	tgetnum(
- 		char	*id)
- 		{ return(*(int *)0); }
- 
-+#undef tgetstr_sp
-+char	*tgetstr_sp(
-+		SCREEN	*sp, 
-+		char	*id, 
-+		char	**area)
-+		{ return(*(char **)0); }
-+
- #undef tgetstr
- char	*tgetstr(
- 		char	*id, 
-@@ -2719,6 +3406,11 @@
- 
- /* ./tinfo/lib_termname.c */
- 
-+#undef termname_sp
-+char	*termname_sp(
-+		SCREEN	*sp)
-+		{ return(*(char **)0); }
-+
- #undef termname
- char	*termname(void)
- 		{ return(*(char **)0); }
-@@ -2734,16 +3426,34 @@
- 
- /* ./tinfo/lib_ti.c */
- 
-+#undef tigetflag_sp
-+int	tigetflag_sp(
-+		SCREEN	*sp, 
-+		char	*str)
-+		{ return(*(int *)0); }
-+
- #undef tigetflag
- int	tigetflag(
- 		char	*str)
- 		{ return(*(int *)0); }
- 
-+#undef tigetnum_sp
-+int	tigetnum_sp(
-+		SCREEN	*sp, 
-+		char	*str)
-+		{ return(*(int *)0); }
-+
- #undef tigetnum
- int	tigetnum(
- 		char	*str)
- 		{ return(*(int *)0); }
- 
-+#undef tigetstr_sp
-+char	*tigetstr_sp(
-+		SCREEN	*sp, 
-+		char	*str)
-+		{ return(*(char **)0); }
-+
- #undef tigetstr
- char	*tigetstr(
- 		char	*str)
-@@ -2781,25 +3491,75 @@
- 		SCREEN	*sp)
- 		{ /* void */ }
- 
-+#undef delay_output_sp
-+int	delay_output_sp(
-+		SCREEN	*sp, 
-+		int	ms)
-+		{ return(*(int *)0); }
-+
- #undef delay_output
- int	delay_output(
- 		int	ms)
- 		{ return(*(int *)0); }
- 
-+#undef _nc_flush_sp
-+void	_nc_flush_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef _nc_flush
- void	_nc_flush(void)
- 		{ /* void */ }
- 
-+#undef _nc_outch_sp
-+int	_nc_outch_sp(
-+		SCREEN	*sp, 
-+		int	ch)
-+		{ return(*(int *)0); }
-+
- #undef _nc_outch
- int	_nc_outch(
- 		int	ch)
- 		{ return(*(int *)0); }
- 
-+#undef putp_sp
-+int	putp_sp(
-+		SCREEN	*sp, 
-+		const char *string)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_putp_sp
-+int	_nc_putp_sp(
-+		SCREEN	*sp, 
-+		const char *name, 
-+		const char *string)
-+		{ return(*(int *)0); }
-+
- #undef putp
- int	putp(
- 		const char *string)
- 		{ return(*(int *)0); }
- 
-+#undef _nc_putp
-+int	_nc_putp(
-+		const char *name, 
-+		const char *string)
-+		{ return(*(int *)0); }
-+
-+#undef tputs_sp
-+int	tputs_sp(
-+		SCREEN	*sp, 
-+		const char *string, 
-+		int	affcnt, 
-+		NCURSES_OUTC_sp outc)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_outc_wrapper
-+int	_nc_outc_wrapper(
-+		SCREEN	*sp, 
-+		int	c)
-+		{ return(*(int *)0); }
-+
- #undef tputs
- int	tputs(
- 		const char *string, 
-@@ -2944,36 +3704,78 @@
- 
- /* ./tinfo/lib_ttyflags.c */
- 
-+#undef _nc_get_tty_mode_sp
-+int	_nc_get_tty_mode_sp(
-+		SCREEN	*sp, 
-+		struct termios *buf)
-+		{ return(*(int *)0); }
-+
- #undef _nc_get_tty_mode
- int	_nc_get_tty_mode(
- 		struct termios *buf)
- 		{ return(*(int *)0); }
- 
-+#undef _nc_set_tty_mode_sp
-+int	_nc_set_tty_mode_sp(
-+		SCREEN	*sp, 
-+		struct termios *buf)
-+		{ return(*(int *)0); }
-+
- #undef _nc_set_tty_mode
- int	_nc_set_tty_mode(
- 		struct termios *buf)
- 		{ return(*(int *)0); }
- 
-+#undef def_shell_mode_sp
-+int	def_shell_mode_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef def_shell_mode
- int	def_shell_mode(void)
- 		{ return(*(int *)0); }
- 
-+#undef def_prog_mode_sp
-+int	def_prog_mode_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef def_prog_mode
- int	def_prog_mode(void)
- 		{ return(*(int *)0); }
- 
-+#undef reset_prog_mode_sp
-+int	reset_prog_mode_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef reset_prog_mode
- int	reset_prog_mode(void)
- 		{ return(*(int *)0); }
- 
-+#undef reset_shell_mode_sp
-+int	reset_shell_mode_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef reset_shell_mode
- int	reset_shell_mode(void)
- 		{ return(*(int *)0); }
- 
-+#undef savetty_sp
-+int	savetty_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef savetty
- int	savetty(void)
- 		{ return(*(int *)0); }
- 
-+#undef resetty_sp
-+int	resetty_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef resetty
- int	resetty(void)
- 		{ return(*(int *)0); }
-@@ -3053,6 +3855,13 @@
- 
- /* ./tinfo/setbuf.c */
- 
-+#undef _nc_set_buffer_sp
-+void	_nc_set_buffer_sp(
-+		SCREEN	*sp, 
-+		FILE	*ofp, 
-+		NCURSES_BOOL buffered)
-+		{ /* void */ }
-+
- #undef _nc_set_buffer
- void	_nc_set_buffer(
- 		FILE	*ofp, 
-@@ -3144,8 +3953,8 @@
- 
- /* ./unctrl.c */
- 
--#undef _nc_unctrl
--char	*_nc_unctrl(
-+#undef unctrl_sp
-+char	*unctrl_sp(
- 		SCREEN	*sp, 
- 		chtype	ch)
- 		{ return(*(char **)0); }
-@@ -3394,6 +4203,13 @@
- 
- /* ./base/define_key.c */
- 
-+#undef define_key_sp
-+int	define_key_sp(
-+		SCREEN	*sp, 
-+		const char *str, 
-+		int	keycode)
-+		{ return(*(int *)0); }
-+
- #undef define_key
- int	define_key(
- 		const char *str, 
-@@ -3408,6 +4224,12 @@
- 
- /* ./base/key_defined.c */
- 
-+#undef key_defined_sp
-+int	key_defined_sp(
-+		SCREEN	*sp, 
-+		const char *str)
-+		{ return(*(int *)0); }
-+
- #undef key_defined
- int	key_defined(
- 		const char *str)
-@@ -3415,6 +4237,13 @@
- 
- /* ./base/keybound.c */
- 
-+#undef keybound_sp
-+char	*keybound_sp(
-+		SCREEN	*sp, 
-+		int	code, 
-+		int	count)
-+		{ return(*(char **)0); }
-+
- #undef keybound
- char	*keybound(
- 		int	code, 
-@@ -3423,6 +4252,13 @@
- 
- /* ./base/keyok.c */
- 
-+#undef keyok_sp
-+int	keyok_sp(
-+		SCREEN	*sp, 
-+		int	c, 
-+		NCURSES_BOOL flag)
-+		{ return(*(int *)0); }
-+
- #undef keyok
- int	keyok(
- 		int	c, 
-diff -Naur ncurses-5.7.orig/ncurses/llib-lncursest ncurses-5.7/ncurses/llib-lncursest
---- ncurses-5.7.orig/ncurses/llib-lncursest	2008-10-11 14:13:13.000000000 -0700
-+++ ncurses-5.7/ncurses/llib-lncursest	2009-07-19 15:04:11.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 2008 Free Software Foundation, Inc.                        *
-+ * Copyright (c) 2008,2009 Free Software Foundation, Inc.                   *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -27,7 +27,7 @@
-  ****************************************************************************/
- 
- /****************************************************************************
-- *  Author: Thomas E. Dickey 2008                                           *
-+ *  Author: Thomas E. Dickey 2008-on                                        *
-  ****************************************************************************/
- /* LINTLIBRARY */
- 
-@@ -38,27 +38,54 @@
- #undef _nc_oldnums
- int	*_nc_oldnums;
- 
-+#undef _nc_scroll_optimize_sp
-+void	_nc_scroll_optimize_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef _nc_scroll_optimize
- void	_nc_scroll_optimize(void)
- 		{ /* void */ }
- 
-+#undef _nc_linedump_sp
-+void	_nc_linedump_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef _nc_linedump
- void	_nc_linedump(void)
- 		{ /* void */ }
- 
- /* ./tty/hashmap.c */
- 
--#include <term.h>
-+#undef _nc_hash_map_sp
-+void	_nc_hash_map_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
- 
- #undef _nc_hash_map
- void	_nc_hash_map(void)
- 		{ /* void */ }
- 
-+#undef _nc_make_oldhash_sp
-+void	_nc_make_oldhash_sp(
-+		SCREEN	*sp, 
-+		int	i)
-+		{ /* void */ }
-+
- #undef _nc_make_oldhash
- void	_nc_make_oldhash(
- 		int	i)
- 		{ /* void */ }
- 
-+#undef _nc_scroll_oldhash_sp
-+void	_nc_scroll_oldhash_sp(
-+		SCREEN	*sp, 
-+		int	n, 
-+		int	top, 
-+		int	bot)
-+		{ /* void */ }
-+
- #undef _nc_scroll_oldhash
- void	_nc_scroll_oldhash(
- 		int	n, 
-@@ -112,6 +139,11 @@
- 
- /* ./base/lib_beep.c */
- 
-+#undef beep_sp
-+int	beep_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef beep
- int	beep(void)
- 		{ return(*(int *)0); }
-@@ -187,6 +219,7 @@
- 
- /* ./base/lib_color.c */
- 
-+#include <term.h>
- #include <tic.h>
- 
- #undef _nc_COLOR_PAIRS
-@@ -197,14 +230,32 @@
- int	_nc_COLORS(void)
- 		{ return(*(int *)0); }
- 
-+#undef _nc_reset_colors_sp
-+NCURSES_BOOL _nc_reset_colors_sp(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
- #undef _nc_reset_colors
- NCURSES_BOOL _nc_reset_colors(void)
- 		{ return(*(NCURSES_BOOL *)0); }
- 
-+#undef start_color_sp
-+int	start_color_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef start_color
- int	start_color(void)
- 		{ return(*(int *)0); }
- 
-+#undef init_pair_sp
-+int	init_pair_sp(
-+		SCREEN	*sp, 
-+		short	pair, 
-+		short	f, 
-+		short	b)
-+		{ return(*(int *)0); }
-+
- #undef init_pair
- int	init_pair(
- 		short	pair, 
-@@ -212,6 +263,15 @@
- 		short	b)
- 		{ return(*(int *)0); }
- 
-+#undef init_color_sp
-+int	init_color_sp(
-+		SCREEN	*sp, 
-+		short	color, 
-+		short	r, 
-+		short	g, 
-+		short	b)
-+		{ return(*(int *)0); }
-+
- #undef init_color
- int	init_color(
- 		short	color, 
-@@ -220,14 +280,33 @@
- 		short	b)
- 		{ return(*(int *)0); }
- 
-+#undef can_change_color_sp
-+NCURSES_BOOL can_change_color_sp(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
- #undef can_change_color
- NCURSES_BOOL can_change_color(void)
- 		{ return(*(NCURSES_BOOL *)0); }
- 
-+#undef has_colors_sp
-+NCURSES_BOOL has_colors_sp(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
- #undef has_colors
- NCURSES_BOOL has_colors(void)
- 		{ return(*(NCURSES_BOOL *)0); }
- 
-+#undef color_content_sp
-+int	color_content_sp(
-+		SCREEN	*sp, 
-+		short	color, 
-+		short	*r, 
-+		short	*g, 
-+		short	*b)
-+		{ return(*(int *)0); }
-+
- #undef color_content
- int	color_content(
- 		short	color, 
-@@ -236,6 +315,14 @@
- 		short	*b)
- 		{ return(*(int *)0); }
- 
-+#undef pair_content_sp
-+int	pair_content_sp(
-+		SCREEN	*sp, 
-+		short	pair, 
-+		short	*f, 
-+		short	*b)
-+		{ return(*(int *)0); }
-+
- #undef pair_content
- int	pair_content(
- 		short	pair, 
-@@ -243,13 +330,21 @@
- 		short	*b)
- 		{ return(*(int *)0); }
- 
-+#undef _nc_do_color_sp
-+void	_nc_do_color_sp(
-+		SCREEN	*sp, 
-+		short	old_pair, 
-+		short	pair, 
-+		NCURSES_BOOL reverse, 
-+		NCURSES_OUTC_sp outc)
-+		{ /* void */ }
-+
- #undef _nc_do_color
- void	_nc_do_color(
- 		short	old_pair, 
- 		short	pair, 
- 		NCURSES_BOOL reverse, 
--		int	(*outc)(
--		int	p1))
-+		NCURSES_OUTC outc)
- 		{ /* void */ }
- 
- /* ./base/lib_colorset.c */
-@@ -277,16 +372,31 @@
- 
- /* ./base/lib_echo.c */
- 
-+#undef echo_sp
-+int	echo_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef echo
- int	echo(void)
- 		{ return(*(int *)0); }
- 
-+#undef noecho_sp
-+int	noecho_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef noecho
- int	noecho(void)
- 		{ return(*(int *)0); }
- 
- /* ./base/lib_endwin.c */
- 
-+#undef endwin_sp
-+int	endwin_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef endwin
- int	endwin(void)
- 		{ return(*(int *)0); }
-@@ -300,6 +410,11 @@
- 
- /* ./base/lib_flash.c */
- 
-+#undef flash_sp
-+int	flash_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef flash
- int	flash(void)
- 		{ return(*(int *)0); }
-@@ -1138,10 +1253,21 @@
- 
- #include <fifo_defs.h>
- 
-+#undef _nc_ptr_Escdelay
-+int	*_nc_ptr_Escdelay(
-+		SCREEN	*sp)
-+		{ return(*(int **)0); }
-+
- #undef _nc_ESCDELAY
- int	_nc_ESCDELAY(void)
- 		{ return(*(int *)0); }
- 
-+#undef set_escdelay_sp
-+int	set_escdelay_sp(
-+		SCREEN	*sp, 
-+		int	value)
-+		{ return(*(int *)0); }
-+
- #undef set_escdelay
- int	set_escdelay(
- 		int	value)
-@@ -1204,6 +1330,7 @@
- 
- #undef _nc_insert_ch
- int	_nc_insert_ch(
-+		SCREEN	*sp, 
- 		WINDOW	*win, 
- 		chtype	ch)
- 		{ return(*(int *)0); }
-@@ -1242,6 +1369,11 @@
- 
- /* ./base/lib_isendwin.c */
- 
-+#undef isendwin_sp
-+NCURSES_BOOL isendwin_sp(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
- #undef isendwin
- NCURSES_BOOL isendwin(void)
- 		{ return(*(NCURSES_BOOL *)0); }
-@@ -1256,16 +1388,35 @@
- 
- /* ./base/lib_mouse.c */
- 
-+#undef getmouse_sp
-+int	getmouse_sp(
-+		SCREEN	*sp, 
-+		MEVENT	*aevent)
-+		{ return(*(int *)0); }
-+
- #undef getmouse
- int	getmouse(
- 		MEVENT	*aevent)
- 		{ return(*(int *)0); }
- 
-+#undef ungetmouse_sp
-+int	ungetmouse_sp(
-+		SCREEN	*sp, 
-+		MEVENT	*aevent)
-+		{ return(*(int *)0); }
-+
- #undef ungetmouse
- int	ungetmouse(
- 		MEVENT	*aevent)
- 		{ return(*(int *)0); }
- 
-+#undef mousemask_sp
-+mmask_t	mousemask_sp(
-+		SCREEN	*sp, 
-+		mmask_t	newmask, 
-+		mmask_t	*oldmask)
-+		{ return(*(mmask_t *)0); }
-+
- #undef mousemask
- mmask_t	mousemask(
- 		mmask_t	newmask, 
-@@ -1279,14 +1430,30 @@
- 		int	x)
- 		{ return(*(NCURSES_BOOL *)0); }
- 
-+#undef mouseinterval_sp
-+int	mouseinterval_sp(
-+		SCREEN	*sp, 
-+		int	maxclick)
-+		{ return(*(int *)0); }
-+
- #undef mouseinterval
- int	mouseinterval(
- 		int	maxclick)
- 		{ return(*(int *)0); }
- 
- #undef _nc_has_mouse
--int	_nc_has_mouse(void)
--		{ return(*(int *)0); }
-+NCURSES_BOOL _nc_has_mouse(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef has_mouse_sp
-+NCURSES_BOOL has_mouse_sp(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef has_mouse
-+NCURSES_BOOL has_mouse(void)
-+		{ return(*(NCURSES_BOOL *)0); }
- 
- #undef wmouse_trafo
- NCURSES_BOOL wmouse_trafo(
-@@ -1307,24 +1474,55 @@
- 
- /* ./tty/lib_mvcur.c */
- 
-+#undef _nc_msec_cost_sp
-+int	_nc_msec_cost_sp(
-+		SCREEN	*sp, 
-+		const char *const cap, 
-+		int	affcnt)
-+		{ return(*(int *)0); }
-+
- #undef _nc_msec_cost
- int	_nc_msec_cost(
- 		const char *const cap, 
- 		int	affcnt)
- 		{ return(*(int *)0); }
- 
-+#undef _nc_mvcur_resume_sp
-+void	_nc_mvcur_resume_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef _nc_mvcur_resume
- void	_nc_mvcur_resume(void)
- 		{ /* void */ }
- 
-+#undef _nc_mvcur_init_sp
-+void	_nc_mvcur_init_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef _nc_mvcur_init
- void	_nc_mvcur_init(void)
- 		{ /* void */ }
- 
-+#undef _nc_mvcur_wrap_sp
-+void	_nc_mvcur_wrap_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef _nc_mvcur_wrap
- void	_nc_mvcur_wrap(void)
- 		{ /* void */ }
- 
-+#undef mvcur_sp
-+int	mvcur_sp(
-+		SCREEN	*sp, 
-+		int	yold, 
-+		int	xold, 
-+		int	ynew, 
-+		int	xnew)
-+		{ return(*(int *)0); }
-+
- #undef mvcur
- int	mvcur(
- 		int	yold, 
-@@ -1347,14 +1545,32 @@
- 
- /* ./base/lib_newterm.c */
- 
-+#undef filter_sp
-+void	filter_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef filter
- void	filter(void)
- 		{ /* void */ }
- 
-+#undef nofilter_sp
-+void	nofilter_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef nofilter
- void	nofilter(void)
- 		{ /* void */ }
- 
-+#undef newterm_sp
-+SCREEN	*newterm_sp(
-+		SCREEN	*sp, 
-+		char	*name, 
-+		FILE	*ofp, 
-+		FILE	*ifp)
-+		{ return(*(SCREEN **)0); }
-+
- #undef newterm
- SCREEN	*newterm(
- 		char	*name, 
-@@ -1369,6 +1585,15 @@
- 		WINDOW	*win)
- 		{ return(*(int *)0); }
- 
-+#undef newwin_sp
-+WINDOW	*newwin_sp(
-+		SCREEN	*sp, 
-+		int	num_lines, 
-+		int	num_columns, 
-+		int	begy, 
-+		int	begx)
-+		{ return(*(WINDOW **)0); }
-+
- #undef newwin
- WINDOW	*newwin(
- 		int	num_lines, 
-@@ -1395,6 +1620,16 @@
- 		int	x)
- 		{ return(*(WINDOW **)0); }
- 
-+#undef _nc_makenew_sp
-+WINDOW	*_nc_makenew_sp(
-+		SCREEN	*sp, 
-+		int	num_lines, 
-+		int	num_columns, 
-+		int	begy, 
-+		int	begx, 
-+		int	flags)
-+		{ return(*(WINDOW **)0); }
-+
- #undef _nc_makenew
- WINDOW	*_nc_makenew(
- 		int	num_lines, 
-@@ -1404,17 +1639,37 @@
- 		int	flags)
- 		{ return(*(WINDOW **)0); }
- 
--#undef _nc_screen_of
--SCREEN	*_nc_screen_of(
--		WINDOW	*win)
--		{ return(*(SCREEN **)0); }
-+#undef _nc_curscr_of
-+WINDOW	*_nc_curscr_of(
-+		SCREEN	*sp)
-+		{ return(*(WINDOW **)0); }
-+
-+#undef _nc_newscr_of
-+WINDOW	*_nc_newscr_of(
-+		SCREEN	*sp)
-+		{ return(*(WINDOW **)0); }
-+
-+#undef _nc_stdscr_of
-+WINDOW	*_nc_stdscr_of(
-+		SCREEN	*sp)
-+		{ return(*(WINDOW **)0); }
- 
- /* ./base/lib_nl.c */
- 
-+#undef nl_sp
-+int	nl_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef nl
- int	nl(void)
- 		{ return(*(int *)0); }
- 
-+#undef nonl_sp
-+int	nonl_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef nonl
- int	nonl(void)
- 		{ return(*(int *)0); }
-@@ -1448,6 +1703,13 @@
- 
- /* ./base/lib_pad.c */
- 
-+#undef newpad_sp
-+WINDOW	*newpad_sp(
-+		SCREEN	*sp, 
-+		int	l, 
-+		int	c)
-+		{ return(*(WINDOW **)0); }
-+
- #undef newpad
- WINDOW	*newpad(
- 		int	l, 
-@@ -1553,6 +1815,14 @@
- 
- /* ./base/lib_restart.c */
- 
-+#undef restartterm_sp
-+int	restartterm_sp(
-+		SCREEN	*sp, 
-+		char	*termp, 
-+		int	filenum, 
-+		int	*errret)
-+		{ return(*(int *)0); }
-+
- #undef restartterm
- int	restartterm(
- 		char	*termp, 
-@@ -1601,6 +1871,12 @@
- 
- /* ./base/lib_screen.c */
- 
-+#undef getwin_sp
-+WINDOW	*getwin_sp(
-+		SCREEN	*sp, 
-+		FILE	*filep)
-+		{ return(*(WINDOW **)0); }
-+
- #undef getwin
- WINDOW	*getwin(
- 		FILE	*filep)
-@@ -1612,6 +1888,12 @@
- 		FILE	*filep)
- 		{ return(*(int *)0); }
- 
-+#undef scr_restore_sp
-+int	scr_restore_sp(
-+		SCREEN	*sp, 
-+		const char *file)
-+		{ return(*(int *)0); }
-+
- #undef scr_restore
- int	scr_restore(
- 		const char *file)
-@@ -1622,11 +1904,23 @@
- 		const char *file)
- 		{ return(*(int *)0); }
- 
-+#undef scr_init_sp
-+int	scr_init_sp(
-+		SCREEN	*sp, 
-+		const char *file)
-+		{ return(*(int *)0); }
-+
- #undef scr_init
- int	scr_init(
- 		const char *file)
- 		{ return(*(int *)0); }
- 
-+#undef scr_set_sp
-+int	scr_set_sp(
-+		SCREEN	*sp, 
-+		const char *file)
-+		{ return(*(int *)0); }
-+
- #undef scr_set
- int	scr_set(
- 		const char *file)
-@@ -1687,6 +1981,15 @@
- 		int	slk_format)
- 		{ return(*(int *)0); }
- 
-+#undef _nc_ripoffline_sp
-+int	_nc_ripoffline_sp(
-+		SCREEN	*sp, 
-+		int	line, 
-+		int	(*init)(
-+		WINDOW	*p1, 
-+		int	p2))
-+		{ return(*(int *)0); }
-+
- #undef _nc_ripoffline
- int	_nc_ripoffline(
- 		int	line, 
-@@ -1695,6 +1998,15 @@
- 		int	p2))
- 		{ return(*(int *)0); }
- 
-+#undef ripoffline_sp
-+int	ripoffline_sp(
-+		SCREEN	*sp, 
-+		int	line, 
-+		int	(*init)(
-+		WINDOW	*p1, 
-+		int	p2))
-+		{ return(*(int *)0); }
-+
- #undef ripoffline
- int	ripoffline(
- 		int	line, 
-@@ -1711,12 +2023,25 @@
- 		int	cols)
- 		{ return(*(int *)0); }
- 
-+#undef slk_restore_sp
-+int	slk_restore_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef slk_restore
- int	slk_restore(void)
- 		{ return(*(int *)0); }
- 
- /* ./base/lib_slkatr_set.c */
- 
-+#undef slk_attr_set_sp
-+int	slk_attr_set_sp(
-+		SCREEN	*sp, 
-+		const attr_t attr, 
-+		short	color_pair_number, 
-+		void	*opts)
-+		{ return(*(int *)0); }
-+
- #undef slk_attr_set
- int	slk_attr_set(
- 		const attr_t attr, 
-@@ -1726,6 +2051,12 @@
- 
- /* ./base/lib_slkatrof.c */
- 
-+#undef slk_attroff_sp
-+int	slk_attroff_sp(
-+		SCREEN	*sp, 
-+		const chtype attr)
-+		{ return(*(int *)0); }
-+
- #undef slk_attroff
- int	slk_attroff(
- 		const chtype attr)
-@@ -1733,6 +2064,12 @@
- 
- /* ./base/lib_slkatron.c */
- 
-+#undef slk_attron_sp
-+int	slk_attron_sp(
-+		SCREEN	*sp, 
-+		const chtype attr)
-+		{ return(*(int *)0); }
-+
- #undef slk_attron
- int	slk_attron(
- 		const chtype attr)
-@@ -1740,6 +2077,12 @@
- 
- /* ./base/lib_slkatrset.c */
- 
-+#undef slk_attrset_sp
-+int	slk_attrset_sp(
-+		SCREEN	*sp, 
-+		const chtype attr)
-+		{ return(*(int *)0); }
-+
- #undef slk_attrset
- int	slk_attrset(
- 		const chtype attr)
-@@ -1747,18 +2090,34 @@
- 
- /* ./base/lib_slkattr.c */
- 
-+#undef slk_attr_sp
-+attr_t	slk_attr_sp(
-+		SCREEN	*sp)
-+		{ return(*(attr_t *)0); }
-+
- #undef slk_attr
- attr_t	slk_attr(void)
- 		{ return(*(attr_t *)0); }
- 
- /* ./base/lib_slkclear.c */
- 
-+#undef slk_clear_sp
-+int	slk_clear_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef slk_clear
- int	slk_clear(void)
- 		{ return(*(int *)0); }
- 
- /* ./base/lib_slkcolor.c */
- 
-+#undef slk_color_sp
-+int	slk_color_sp(
-+		SCREEN	*sp, 
-+		short	color_pair_number)
-+		{ return(*(int *)0); }
-+
- #undef slk_color
- int	slk_color(
- 		short	color_pair_number)
-@@ -1766,13 +2125,25 @@
- 
- /* ./base/lib_slkinit.c */
- 
--#undef slk_init
-+#undef slk_init_sp
-+int	slk_init_sp(
-+		SCREEN	*sp, 
-+		int	format)
-+		{ return(*(int *)0); }
-+
-+#undef slk_init
- int	slk_init(
- 		int	format)
- 		{ return(*(int *)0); }
- 
- /* ./base/lib_slklab.c */
- 
-+#undef slk_label_sp
-+char	*slk_label_sp(
-+		SCREEN	*sp, 
-+		int	n)
-+		{ return(*(char **)0); }
-+
- #undef slk_label
- char	*slk_label(
- 		int	n)
-@@ -1780,16 +2151,34 @@
- 
- /* ./base/lib_slkrefr.c */
- 
-+#undef slk_noutrefresh_sp
-+int	slk_noutrefresh_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef slk_noutrefresh
- int	slk_noutrefresh(void)
- 		{ return(*(int *)0); }
- 
-+#undef slk_refresh_sp
-+int	slk_refresh_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef slk_refresh
- int	slk_refresh(void)
- 		{ return(*(int *)0); }
- 
- /* ./base/lib_slkset.c */
- 
-+#undef slk_set_sp
-+int	slk_set_sp(
-+		SCREEN	*sp, 
-+		int	i, 
-+		const char *astr, 
-+		int	format)
-+		{ return(*(int *)0); }
-+
- #undef slk_set
- int	slk_set(
- 		int	i, 
-@@ -1799,6 +2188,11 @@
- 
- /* ./base/lib_slktouch.c */
- 
-+#undef slk_touch_sp
-+int	slk_touch_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef slk_touch
- int	slk_touch(void)
- 		{ return(*(int *)0); }
-@@ -1861,8 +2255,8 @@
- 		SCREEN	*sp)
- 		{ /* void */ }
- 
--#undef _nc_ungetch
--int	_nc_ungetch(
-+#undef ungetch_sp
-+int	ungetch_sp(
- 		SCREEN	*sp, 
- 		int	ch)
- 		{ return(*(int *)0); }
-@@ -1874,11 +2268,23 @@
- 
- /* ./tty/lib_vidattr.c */
- 
-+#undef vidputs_sp
-+int	vidputs_sp(
-+		SCREEN	*sp, 
-+		chtype	newmode, 
-+		NCURSES_OUTC_sp outc)
-+		{ return(*(int *)0); }
-+
- #undef vidputs
- int	vidputs(
- 		chtype	newmode, 
--		int	(*outc)(
--		int	p1))
-+		NCURSES_OUTC outc)
-+		{ return(*(int *)0); }
-+
-+#undef vidattr_sp
-+int	vidattr_sp(
-+		SCREEN	*sp, 
-+		chtype	newmode)
- 		{ return(*(int *)0); }
- 
- #undef vidattr
-@@ -1886,6 +2292,11 @@
- 		chtype	newmode)
- 		{ return(*(int *)0); }
- 
-+#undef termattrs_sp
-+chtype	termattrs_sp(
-+		SCREEN	*sp)
-+		{ return(*(chtype *)0); }
-+
- #undef termattrs
- chtype	termattrs(void)
- 		{ return(*(chtype *)0); }
-@@ -1966,12 +2377,24 @@
- 
- /* ./base/nc_panel.c */
- 
-+#undef _nc_panelhook_sp
-+struct panelhook *_nc_panelhook_sp(
-+		SCREEN	*sp)
-+		{ return(*(struct panelhook **)0); }
-+
- #undef _nc_panelhook
- struct panelhook *_nc_panelhook(void)
- 		{ return(*(struct panelhook **)0); }
- 
- /* ./base/safe_sprintf.c */
- 
-+#undef _nc_printf_string_sp
-+char	*_nc_printf_string_sp(
-+		SCREEN	*sp, 
-+		const char *fmt, 
-+		va_list	ap)
-+		{ return(*(char **)0); }
-+
- #undef _nc_printf_string
- char	*_nc_printf_string(
- 		const char *fmt, 
-@@ -1983,10 +2406,24 @@
- #include <sys/time.h>
- #include <sys/times.h>
- 
-+#undef doupdate_sp
-+int	doupdate_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef doupdate
- int	doupdate(void)
- 		{ return(*(int *)0); }
- 
-+#undef _nc_scrolln_sp
-+int	_nc_scrolln_sp(
-+		SCREEN	*sp, 
-+		int	n, 
-+		int	top, 
-+		int	bot, 
-+		int	maxy)
-+		{ return(*(int *)0); }
-+
- #undef _nc_scrolln
- int	_nc_scrolln(
- 		int	n, 
-@@ -1995,18 +2432,39 @@
- 		int	maxy)
- 		{ return(*(int *)0); }
- 
-+#undef _nc_screen_resume_sp
-+void	_nc_screen_resume_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef _nc_screen_resume
- void	_nc_screen_resume(void)
- 		{ /* void */ }
- 
-+#undef _nc_screen_init_sp
-+void	_nc_screen_init_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef _nc_screen_init
- void	_nc_screen_init(void)
- 		{ /* void */ }
- 
-+#undef _nc_screen_wrap_sp
-+void	_nc_screen_wrap_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef _nc_screen_wrap
- void	_nc_screen_wrap(void)
- 		{ /* void */ }
- 
-+#undef _nc_do_xmc_glitch_sp
-+void	_nc_do_xmc_glitch_sp(
-+		SCREEN	*sp, 
-+		attr_t	previous)
-+		{ /* void */ }
-+
- #undef _nc_do_xmc_glitch
- void	_nc_do_xmc_glitch(
- 		attr_t	previous)
-@@ -2044,6 +2502,12 @@
- void	_nc_freeall(void)
- 		{ /* void */ }
- 
-+#undef _nc_free_and_exit_sp
-+void	_nc_free_and_exit_sp(
-+		SCREEN	*sp, 
-+		int	code)
-+		{ /* void */ }
-+
- #undef _nc_free_and_exit
- void	_nc_free_and_exit(
- 		int	code)
-@@ -2063,6 +2527,24 @@
- 		attr_t	at)
- 		{ /* void */ }
- 
-+#undef _nc_DelCharCost_sp
-+int	_nc_DelCharCost_sp(
-+		SCREEN	*sp, 
-+		int	count)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_InsCharCost_sp
-+int	_nc_InsCharCost_sp(
-+		SCREEN	*sp, 
-+		int	count)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_UpdateAttrs_sp
-+void	_nc_UpdateAttrs_sp(
-+		SCREEN	*sp, 
-+		chtype	c)
-+		{ /* void */ }
-+
- #undef _nc_DelCharCost
- int	_nc_DelCharCost(
- 		int	count)
-@@ -2080,6 +2562,12 @@
- 
- /* ./base/legacy_coding.c */
- 
-+#undef use_legacy_coding_sp
-+int	use_legacy_coding_sp(
-+		SCREEN	*sp, 
-+		int	level)
-+		{ return(*(int *)0); }
-+
- #undef use_legacy_coding
- int	use_legacy_coding(
- 		int	level)
-@@ -2087,10 +2575,22 @@
- 
- /* ./base/lib_dft_fgbg.c */
- 
-+#undef use_default_colors_sp
-+int	use_default_colors_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef use_default_colors
- int	use_default_colors(void)
- 		{ return(*(int *)0); }
- 
-+#undef assume_default_colors_sp
-+int	assume_default_colors_sp(
-+		SCREEN	*sp, 
-+		int	fg, 
-+		int	bg)
-+		{ return(*(int *)0); }
-+
- #undef assume_default_colors
- int	assume_default_colors(
- 		int	fg, 
-@@ -2099,6 +2599,13 @@
- 
- /* ./tinfo/lib_print.c */
- 
-+#undef mcprint_sp
-+int	mcprint_sp(
-+		SCREEN	*sp, 
-+		char	*data, 
-+		int	len)
-+		{ return(*(int *)0); }
-+
- #undef mcprint
- int	mcprint(
- 		char	*data, 
-@@ -2107,18 +2614,39 @@
- 
- /* ./base/resizeterm.c */
- 
-+#undef is_term_resized_sp
-+NCURSES_BOOL is_term_resized_sp(
-+		SCREEN	*sp, 
-+		int	ToLines, 
-+		int	ToCols)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
- #undef is_term_resized
- NCURSES_BOOL is_term_resized(
- 		int	ToLines, 
- 		int	ToCols)
- 		{ return(*(NCURSES_BOOL *)0); }
- 
-+#undef resize_term_sp
-+int	resize_term_sp(
-+		SCREEN	*sp, 
-+		int	ToLines, 
-+		int	ToCols)
-+		{ return(*(int *)0); }
-+
- #undef resize_term
- int	resize_term(
- 		int	ToLines, 
- 		int	ToCols)
- 		{ return(*(int *)0); }
- 
-+#undef resizeterm_sp
-+int	resizeterm_sp(
-+		SCREEN	*sp, 
-+		int	ToLines, 
-+		int	ToCols)
-+		{ return(*(int *)0); }
-+
- #undef resizeterm
- int	resizeterm(
- 		int	ToLines, 
-@@ -2408,6 +2936,11 @@
- chtype	*_nc_acs_map(void)
- 		{ return(*(chtype **)0); }
- 
-+#undef _nc_init_acs_sp
-+void	_nc_init_acs_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef _nc_init_acs
- void	_nc_init_acs(void)
- 		{ /* void */ }
-@@ -2431,6 +2964,11 @@
- 		int	BaudRate)
- 		{ return(*(int *)0); }
- 
-+#undef baudrate_sp
-+int	baudrate_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef baudrate
- int	baudrate(void)
- 		{ return(*(int *)0); }
-@@ -2446,6 +2984,12 @@
- 		TERMINAL *termp)
- 		{ return(*(TERMINAL **)0); }
- 
-+#undef del_curterm_sp
-+int	del_curterm_sp(
-+		SCREEN	*sp, 
-+		TERMINAL *termp)
-+		{ return(*(int *)0); }
-+
- #undef del_curterm
- int	del_curterm(
- 		TERMINAL *termp)
-@@ -2474,6 +3018,11 @@
- #undef _nc_prescreen
- NCURSES_PRESCREEN _nc_prescreen;
- 
-+#undef _nc_screen_of
-+SCREEN	*_nc_screen_of(
-+		WINDOW	*win)
-+		{ return(*(SCREEN **)0); }
-+
- #undef _nc_init_pthreads
- void	_nc_init_pthreads(void)
- 		{ /* void */ }
-@@ -2500,24 +3049,49 @@
- 
- /* ./tinfo/lib_has_cap.c */
- 
-+#undef has_ic_sp
-+NCURSES_BOOL has_ic_sp(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
- #undef has_ic
- NCURSES_BOOL has_ic(void)
- 		{ return(*(NCURSES_BOOL *)0); }
- 
-+#undef has_il_sp
-+NCURSES_BOOL has_il_sp(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
- #undef has_il
- NCURSES_BOOL has_il(void)
- 		{ return(*(NCURSES_BOOL *)0); }
- 
- /* ./tinfo/lib_kernel.c */
- 
-+#undef erasechar_sp
-+char	erasechar_sp(
-+		SCREEN	*sp)
-+		{ return(*(char *)0); }
-+
- #undef erasechar
- char	erasechar(void)
- 		{ return(*(char *)0); }
- 
-+#undef killchar_sp
-+char	killchar_sp(
-+		SCREEN	*sp)
-+		{ return(*(char *)0); }
-+
- #undef killchar
- char	killchar(void)
- 		{ return(*(char *)0); }
- 
-+#undef flushinp_sp
-+int	flushinp_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef flushinp
- int	flushinp(void)
- 		{ return(*(int *)0); }
-@@ -2526,8 +3100,8 @@
- 
- struct kn { short offset; int code; };
- 
--#undef _nc_keyname
--char	*_nc_keyname(
-+#undef keyname_sp
-+char	*keyname_sp(
- 		SCREEN	*sp, 
- 		int	c)
- 		{ return(*(char **)0); }
-@@ -2539,12 +3113,23 @@
- 
- /* ./tinfo/lib_longname.c */
- 
-+#undef longname_sp
-+char	*longname_sp(
-+		SCREEN	*sp)
-+		{ return(*(char **)0); }
-+
- #undef longname
- char	*longname(void)
- 		{ return(*(char **)0); }
- 
- /* ./tinfo/lib_napms.c */
- 
-+#undef napms_sp
-+int	napms_sp(
-+		SCREEN	*sp, 
-+		int	ms)
-+		{ return(*(int *)0); }
-+
- #undef napms
- int	napms(
- 		int	ms)
-@@ -2564,6 +3149,12 @@
- 		NCURSES_BOOL flag)
- 		{ /* void */ }
- 
-+#undef halfdelay_sp
-+int	halfdelay_sp(
-+		SCREEN	*sp, 
-+		int	t)
-+		{ return(*(int *)0); }
-+
- #undef halfdelay
- int	halfdelay(
- 		int	t)
-@@ -2599,21 +3190,52 @@
- 		NCURSES_BOOL flag)
- 		{ return(*(int *)0); }
- 
-+#undef curs_set_sp
-+int	curs_set_sp(
-+		SCREEN	*sp, 
-+		int	vis)
-+		{ return(*(int *)0); }
-+
- #undef curs_set
- int	curs_set(
- 		int	vis)
- 		{ return(*(int *)0); }
- 
-+#undef typeahead_sp
-+int	typeahead_sp(
-+		SCREEN	*sp, 
-+		int	fd)
-+		{ return(*(int *)0); }
-+
- #undef typeahead
- int	typeahead(
- 		int	fd)
- 		{ return(*(int *)0); }
- 
-+#undef has_key_sp
-+int	has_key_sp(
-+		SCREEN	*sp, 
-+		int	keycode)
-+		{ return(*(int *)0); }
-+
- #undef has_key
- int	has_key(
- 		int	keycode)
- 		{ return(*(int *)0); }
- 
-+#undef _nc_putp_flush_sp
-+int	_nc_putp_flush_sp(
-+		SCREEN	*sp, 
-+		const char *name, 
-+		const char *value)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_putp_flush
-+int	_nc_putp_flush(
-+		const char *name, 
-+		const char *value)
-+		{ return(*(int *)0); }
-+
- #undef _nc_keypad
- int	_nc_keypad(
- 		SCREEN	*sp, 
-@@ -2622,30 +3244,67 @@
- 
- /* ./tinfo/lib_raw.c */
- 
-+#undef raw_sp
-+int	raw_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef raw
- int	raw(void)
- 		{ return(*(int *)0); }
- 
-+#undef cbreak_sp
-+int	cbreak_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef cbreak
- int	cbreak(void)
- 		{ return(*(int *)0); }
- 
-+#undef qiflush_sp
-+void	qiflush_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef qiflush
- void	qiflush(void)
- 		{ /* void */ }
- 
-+#undef noraw_sp
-+int	noraw_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef noraw
- int	noraw(void)
- 		{ return(*(int *)0); }
- 
-+#undef nocbreak_sp
-+int	nocbreak_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef nocbreak
- int	nocbreak(void)
- 		{ return(*(int *)0); }
- 
-+#undef noqiflush_sp
-+void	noqiflush_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef noqiflush
- void	noqiflush(void)
- 		{ /* void */ }
- 
-+#undef intrflush_sp
-+int	intrflush_sp(
-+		SCREEN	*sp, 
-+		WINDOW	*win, 
-+		NCURSES_BOOL flag)
-+		{ return(*(int *)0); }
-+
- #undef intrflush
- int	intrflush(
- 		WINDOW	*win, 
-@@ -2663,7 +3322,8 @@
- 		{ return(*(char **)0); }
- 
- #undef _nc_ptr_Lines
--int	*_nc_ptr_Lines(void)
-+int	*_nc_ptr_Lines(
-+		SCREEN	*sp)
- 		{ return(*(int **)0); }
- 
- #undef _nc_LINES
-@@ -2671,17 +3331,29 @@
- 		{ return(*(int *)0); }
- 
- #undef _nc_ptr_Cols
--int	*_nc_ptr_Cols(void)
-+int	*_nc_ptr_Cols(
-+		SCREEN	*sp)
- 		{ return(*(int **)0); }
- 
- #undef _nc_COLS
- int	_nc_COLS(void)
- 		{ return(*(int *)0); }
- 
-+#undef _nc_ptr_Tabsize
-+int	*_nc_ptr_Tabsize(
-+		SCREEN	*sp)
-+		{ return(*(int **)0); }
-+
- #undef _nc_TABSIZE
- int	_nc_TABSIZE(void)
- 		{ return(*(int *)0); }
- 
-+#undef set_tabsize_sp
-+int	set_tabsize_sp(
-+		SCREEN	*sp, 
-+		int	value)
-+		{ return(*(int *)0); }
-+
- #undef set_tabsize
- int	set_tabsize(
- 		int	value)
-@@ -2692,6 +3364,12 @@
- 		SCREEN	*sp)
- 		{ return(*(int *)0); }
- 
-+#undef use_env_sp
-+void	use_env_sp(
-+		SCREEN	*sp, 
-+		NCURSES_BOOL f)
-+		{ /* void */ }
-+
- #undef use_env
- void	use_env(
- 		NCURSES_BOOL f)
-@@ -2744,8 +3422,9 @@
- #undef BC
- char	*BC;
- 
--#undef tgetent
--int	tgetent(
-+#undef tgetent_sp
-+int	tgetent_sp(
-+		SCREEN	*sp, 
- 		char	*bufp, 
- 		const char *name)
- 		{ return(*(int *)0); }
-@@ -2756,16 +3435,41 @@
- 
- #endif
- 
-+#undef tgetent
-+int	tgetent(
-+		char	*bufp, 
-+		const char *name)
-+		{ return(*(int *)0); }
-+
-+#undef tgetflag_sp
-+int	tgetflag_sp(
-+		SCREEN	*sp, 
-+		char	*id)
-+		{ return(*(int *)0); }
-+
- #undef tgetflag
- int	tgetflag(
- 		char	*id)
- 		{ return(*(int *)0); }
- 
-+#undef tgetnum_sp
-+int	tgetnum_sp(
-+		SCREEN	*sp, 
-+		char	*id)
-+		{ return(*(int *)0); }
-+
- #undef tgetnum
- int	tgetnum(
- 		char	*id)
- 		{ return(*(int *)0); }
- 
-+#undef tgetstr_sp
-+char	*tgetstr_sp(
-+		SCREEN	*sp, 
-+		char	*id, 
-+		char	**area)
-+		{ return(*(char **)0); }
-+
- #undef tgetstr
- char	*tgetstr(
- 		char	*id, 
-@@ -2774,6 +3478,11 @@
- 
- /* ./tinfo/lib_termname.c */
- 
-+#undef termname_sp
-+char	*termname_sp(
-+		SCREEN	*sp)
-+		{ return(*(char **)0); }
-+
- #undef termname
- char	*termname(void)
- 		{ return(*(char **)0); }
-@@ -2789,16 +3498,34 @@
- 
- /* ./tinfo/lib_ti.c */
- 
-+#undef tigetflag_sp
-+int	tigetflag_sp(
-+		SCREEN	*sp, 
-+		char	*str)
-+		{ return(*(int *)0); }
-+
- #undef tigetflag
- int	tigetflag(
- 		char	*str)
- 		{ return(*(int *)0); }
- 
-+#undef tigetnum_sp
-+int	tigetnum_sp(
-+		SCREEN	*sp, 
-+		char	*str)
-+		{ return(*(int *)0); }
-+
- #undef tigetnum
- int	tigetnum(
- 		char	*str)
- 		{ return(*(int *)0); }
- 
-+#undef tigetstr_sp
-+char	*tigetstr_sp(
-+		SCREEN	*sp, 
-+		char	*str)
-+		{ return(*(char **)0); }
-+
- #undef tigetstr
- char	*tigetstr(
- 		char	*str)
-@@ -2836,25 +3563,75 @@
- 		SCREEN	*sp)
- 		{ /* void */ }
- 
-+#undef delay_output_sp
-+int	delay_output_sp(
-+		SCREEN	*sp, 
-+		int	ms)
-+		{ return(*(int *)0); }
-+
- #undef delay_output
- int	delay_output(
- 		int	ms)
- 		{ return(*(int *)0); }
- 
-+#undef _nc_flush_sp
-+void	_nc_flush_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef _nc_flush
- void	_nc_flush(void)
- 		{ /* void */ }
- 
-+#undef _nc_outch_sp
-+int	_nc_outch_sp(
-+		SCREEN	*sp, 
-+		int	ch)
-+		{ return(*(int *)0); }
-+
- #undef _nc_outch
- int	_nc_outch(
- 		int	ch)
- 		{ return(*(int *)0); }
- 
-+#undef putp_sp
-+int	putp_sp(
-+		SCREEN	*sp, 
-+		const char *string)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_putp_sp
-+int	_nc_putp_sp(
-+		SCREEN	*sp, 
-+		const char *name, 
-+		const char *string)
-+		{ return(*(int *)0); }
-+
- #undef putp
- int	putp(
- 		const char *string)
- 		{ return(*(int *)0); }
- 
-+#undef _nc_putp
-+int	_nc_putp(
-+		const char *name, 
-+		const char *string)
-+		{ return(*(int *)0); }
-+
-+#undef tputs_sp
-+int	tputs_sp(
-+		SCREEN	*sp, 
-+		const char *string, 
-+		int	affcnt, 
-+		NCURSES_OUTC_sp outc)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_outc_wrapper
-+int	_nc_outc_wrapper(
-+		SCREEN	*sp, 
-+		int	c)
-+		{ return(*(int *)0); }
-+
- #undef tputs
- int	tputs(
- 		const char *string, 
-@@ -3024,36 +3801,78 @@
- 
- /* ./tinfo/lib_ttyflags.c */
- 
-+#undef _nc_get_tty_mode_sp
-+int	_nc_get_tty_mode_sp(
-+		SCREEN	*sp, 
-+		struct termios *buf)
-+		{ return(*(int *)0); }
-+
- #undef _nc_get_tty_mode
- int	_nc_get_tty_mode(
- 		struct termios *buf)
- 		{ return(*(int *)0); }
- 
-+#undef _nc_set_tty_mode_sp
-+int	_nc_set_tty_mode_sp(
-+		SCREEN	*sp, 
-+		struct termios *buf)
-+		{ return(*(int *)0); }
-+
- #undef _nc_set_tty_mode
- int	_nc_set_tty_mode(
- 		struct termios *buf)
- 		{ return(*(int *)0); }
- 
-+#undef def_shell_mode_sp
-+int	def_shell_mode_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef def_shell_mode
- int	def_shell_mode(void)
- 		{ return(*(int *)0); }
- 
-+#undef def_prog_mode_sp
-+int	def_prog_mode_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef def_prog_mode
- int	def_prog_mode(void)
- 		{ return(*(int *)0); }
- 
-+#undef reset_prog_mode_sp
-+int	reset_prog_mode_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef reset_prog_mode
- int	reset_prog_mode(void)
- 		{ return(*(int *)0); }
- 
-+#undef reset_shell_mode_sp
-+int	reset_shell_mode_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef reset_shell_mode
- int	reset_shell_mode(void)
- 		{ return(*(int *)0); }
- 
-+#undef savetty_sp
-+int	savetty_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef savetty
- int	savetty(void)
- 		{ return(*(int *)0); }
- 
-+#undef resetty_sp
-+int	resetty_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef resetty
- int	resetty(void)
- 		{ return(*(int *)0); }
-@@ -3144,6 +3963,13 @@
- 
- /* ./tinfo/setbuf.c */
- 
-+#undef _nc_set_buffer_sp
-+void	_nc_set_buffer_sp(
-+		SCREEN	*sp, 
-+		FILE	*ofp, 
-+		NCURSES_BOOL buffered)
-+		{ /* void */ }
-+
- #undef _nc_set_buffer
- void	_nc_set_buffer(
- 		FILE	*ofp, 
-@@ -3235,8 +4061,8 @@
- 
- /* ./unctrl.c */
- 
--#undef _nc_unctrl
--char	*_nc_unctrl(
-+#undef unctrl_sp
-+char	*unctrl_sp(
- 		SCREEN	*sp, 
- 		chtype	ch)
- 		{ return(*(char **)0); }
-@@ -3485,6 +4311,13 @@
- 
- /* ./base/define_key.c */
- 
-+#undef define_key_sp
-+int	define_key_sp(
-+		SCREEN	*sp, 
-+		const char *str, 
-+		int	keycode)
-+		{ return(*(int *)0); }
-+
- #undef define_key
- int	define_key(
- 		const char *str, 
-@@ -3499,6 +4332,12 @@
- 
- /* ./base/key_defined.c */
- 
-+#undef key_defined_sp
-+int	key_defined_sp(
-+		SCREEN	*sp, 
-+		const char *str)
-+		{ return(*(int *)0); }
-+
- #undef key_defined
- int	key_defined(
- 		const char *str)
-@@ -3506,6 +4345,13 @@
- 
- /* ./base/keybound.c */
- 
-+#undef keybound_sp
-+char	*keybound_sp(
-+		SCREEN	*sp, 
-+		int	code, 
-+		int	count)
-+		{ return(*(char **)0); }
-+
- #undef keybound
- char	*keybound(
- 		int	code, 
-@@ -3514,6 +4360,13 @@
- 
- /* ./base/keyok.c */
- 
-+#undef keyok_sp
-+int	keyok_sp(
-+		SCREEN	*sp, 
-+		int	c, 
-+		NCURSES_BOOL flag)
-+		{ return(*(int *)0); }
-+
- #undef keyok
- int	keyok(
- 		int	c, 
-diff -Naur ncurses-5.7.orig/ncurses/llib-lncursestw ncurses-5.7/ncurses/llib-lncursestw
---- ncurses-5.7.orig/ncurses/llib-lncursestw	1969-12-31 16:00:00.000000000 -0800
-+++ ncurses-5.7/ncurses/llib-lncursestw	2009-07-19 15:04:11.000000000 -0700
-@@ -0,0 +1,5192 @@
-+/****************************************************************************
-+ * Copyright (c) 2008 Free Software Foundation, Inc.                        *
-+ *                                                                          *
-+ * Permission is hereby granted, free of charge, to any person obtaining a  *
-+ * copy of this software and associated documentation files (the            *
-+ * "Software"), to deal in the Software without restriction, including      *
-+ * without limitation the rights to use, copy, modify, merge, publish,      *
-+ * distribute, distribute with modifications, sublicense, and/or sell       *
-+ * copies of the Software, and to permit persons to whom the Software is    *
-+ * furnished to do so, subject to the following conditions:                 *
-+ *                                                                          *
-+ * The above copyright notice and this permission notice shall be included  *
-+ * in all copies or substantial portions of the Software.                   *
-+ *                                                                          *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
-+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
-+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
-+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
-+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
-+ *                                                                          *
-+ * Except as contained in this notice, the name(s) of the above copyright   *
-+ * holders shall not be used in advertising or otherwise to promote the     *
-+ * sale, use or other dealings in this Software without prior written       *
-+ * authorization.                                                           *
-+ ****************************************************************************/
-+
-+/****************************************************************************
-+ *  Author: Thomas E. Dickey 2008                                           *
-+ ****************************************************************************/
-+/* LINTLIBRARY */
-+
-+/* ./tty/hardscroll.c */
-+
-+#include <curses.priv.h>
-+
-+#undef _nc_oldnums
-+int	*_nc_oldnums;
-+
-+#undef _nc_scroll_optimize_sp
-+void	_nc_scroll_optimize_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
-+#undef _nc_scroll_optimize
-+void	_nc_scroll_optimize(void)
-+		{ /* void */ }
-+
-+#undef _nc_linedump_sp
-+void	_nc_linedump_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
-+#undef _nc_linedump
-+void	_nc_linedump(void)
-+		{ /* void */ }
-+
-+/* ./tty/hashmap.c */
-+
-+#undef _nc_hash_map_sp
-+void	_nc_hash_map_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
-+#undef _nc_hash_map
-+void	_nc_hash_map(void)
-+		{ /* void */ }
-+
-+#undef _nc_make_oldhash_sp
-+void	_nc_make_oldhash_sp(
-+		SCREEN	*sp, 
-+		int	i)
-+		{ /* void */ }
-+
-+#undef _nc_make_oldhash
-+void	_nc_make_oldhash(
-+		int	i)
-+		{ /* void */ }
-+
-+#undef _nc_scroll_oldhash_sp
-+void	_nc_scroll_oldhash_sp(
-+		SCREEN	*sp, 
-+		int	n, 
-+		int	top, 
-+		int	bot)
-+		{ /* void */ }
-+
-+#undef _nc_scroll_oldhash
-+void	_nc_scroll_oldhash(
-+		int	n, 
-+		int	top, 
-+		int	bot)
-+		{ /* void */ }
-+
-+/* ./base/lib_addch.c */
-+
-+#include <ctype.h>
-+
-+#undef _nc_render
-+cchar_t	_nc_render(
-+		WINDOW	*win, 
-+		cchar_t	ch)
-+		{ return(*(cchar_t *)0); }
-+
-+#undef _nc_build_wch
-+int	_nc_build_wch(
-+		WINDOW	*win, 
-+		cchar_t	*ch)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_waddch_nosync
-+int	_nc_waddch_nosync(
-+		WINDOW	*win, 
-+		const cchar_t c)
-+		{ return(*(int *)0); }
-+
-+#undef waddch
-+int	waddch(
-+		WINDOW	*win, 
-+		const chtype ch)
-+		{ return(*(int *)0); }
-+
-+#undef wechochar
-+int	wechochar(
-+		WINDOW	*win, 
-+		const chtype ch)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_addstr.c */
-+
-+#undef waddnstr
-+int	waddnstr(
-+		WINDOW	*win, 
-+		const char *astr, 
-+		int	n)
-+		{ return(*(int *)0); }
-+
-+#undef waddchnstr
-+int	waddchnstr(
-+		WINDOW	*win, 
-+		const chtype *astr, 
-+		int	n)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_wchstrlen
-+int	_nc_wchstrlen(
-+		const cchar_t *s)
-+		{ return(*(int *)0); }
-+
-+#undef wadd_wchnstr
-+int	wadd_wchnstr(
-+		WINDOW	*win, 
-+		const cchar_t *astr, 
-+		int	n)
-+		{ return(*(int *)0); }
-+
-+#undef waddnwstr
-+int	waddnwstr(
-+		WINDOW	*win, 
-+		const wchar_t *str, 
-+		int	n)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_beep.c */
-+
-+#undef beep_sp
-+int	beep_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
-+#undef beep
-+int	beep(void)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_bkgd.c */
-+
-+#undef wbkgrndset
-+void	wbkgrndset(
-+		WINDOW	*win, 
-+		const cchar_t *ch)
-+		{ /* void */ }
-+
-+#undef wbkgdset
-+void	wbkgdset(
-+		WINDOW	*win, 
-+		chtype	ch)
-+		{ /* void */ }
-+
-+#undef wbkgrnd
-+int	wbkgrnd(
-+		WINDOW	*win, 
-+		const cchar_t *ch)
-+		{ return(*(int *)0); }
-+
-+#undef wbkgd
-+int	wbkgd(
-+		WINDOW	*win, 
-+		chtype	ch)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_box.c */
-+
-+#undef wborder
-+int	wborder(
-+		WINDOW	*win, 
-+		chtype	ls, 
-+		chtype	rs, 
-+		chtype	ts, 
-+		chtype	bs, 
-+		chtype	tl, 
-+		chtype	tr, 
-+		chtype	bl, 
-+		chtype	br)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_chgat.c */
-+
-+#undef wchgat
-+int	wchgat(
-+		WINDOW	*win, 
-+		int	n, 
-+		attr_t	attr, 
-+		short	color, 
-+		const void *opts)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_clear.c */
-+
-+#undef wclear
-+int	wclear(
-+		WINDOW	*win)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_clearok.c */
-+
-+#undef clearok
-+int	clearok(
-+		WINDOW	*win, 
-+		NCURSES_BOOL flag)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_clrbot.c */
-+
-+#undef wclrtobot
-+int	wclrtobot(
-+		WINDOW	*win)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_clreol.c */
-+
-+#undef wclrtoeol
-+int	wclrtoeol(
-+		WINDOW	*win)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_color.c */
-+
-+#include <term.h>
-+#include <tic.h>
-+
-+#undef _nc_COLOR_PAIRS
-+int	_nc_COLOR_PAIRS(void)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_COLORS
-+int	_nc_COLORS(void)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_reset_colors_sp
-+NCURSES_BOOL _nc_reset_colors_sp(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef _nc_reset_colors
-+NCURSES_BOOL _nc_reset_colors(void)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef start_color_sp
-+int	start_color_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
-+#undef start_color
-+int	start_color(void)
-+		{ return(*(int *)0); }
-+
-+#undef init_pair_sp
-+int	init_pair_sp(
-+		SCREEN	*sp, 
-+		short	pair, 
-+		short	f, 
-+		short	b)
-+		{ return(*(int *)0); }
-+
-+#undef init_pair
-+int	init_pair(
-+		short	pair, 
-+		short	f, 
-+		short	b)
-+		{ return(*(int *)0); }
-+
-+#undef init_color_sp
-+int	init_color_sp(
-+		SCREEN	*sp, 
-+		short	color, 
-+		short	r, 
-+		short	g, 
-+		short	b)
-+		{ return(*(int *)0); }
-+
-+#undef init_color
-+int	init_color(
-+		short	color, 
-+		short	r, 
-+		short	g, 
-+		short	b)
-+		{ return(*(int *)0); }
-+
-+#undef can_change_color_sp
-+NCURSES_BOOL can_change_color_sp(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef can_change_color
-+NCURSES_BOOL can_change_color(void)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef has_colors_sp
-+NCURSES_BOOL has_colors_sp(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef has_colors
-+NCURSES_BOOL has_colors(void)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef color_content_sp
-+int	color_content_sp(
-+		SCREEN	*sp, 
-+		short	color, 
-+		short	*r, 
-+		short	*g, 
-+		short	*b)
-+		{ return(*(int *)0); }
-+
-+#undef color_content
-+int	color_content(
-+		short	color, 
-+		short	*r, 
-+		short	*g, 
-+		short	*b)
-+		{ return(*(int *)0); }
-+
-+#undef pair_content_sp
-+int	pair_content_sp(
-+		SCREEN	*sp, 
-+		short	pair, 
-+		short	*f, 
-+		short	*b)
-+		{ return(*(int *)0); }
-+
-+#undef pair_content
-+int	pair_content(
-+		short	pair, 
-+		short	*f, 
-+		short	*b)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_do_color_sp
-+void	_nc_do_color_sp(
-+		SCREEN	*sp, 
-+		short	old_pair, 
-+		short	pair, 
-+		NCURSES_BOOL reverse, 
-+		NCURSES_OUTC_sp outc)
-+		{ /* void */ }
-+
-+#undef _nc_do_color
-+void	_nc_do_color(
-+		short	old_pair, 
-+		short	pair, 
-+		NCURSES_BOOL reverse, 
-+		NCURSES_OUTC outc)
-+		{ /* void */ }
-+
-+/* ./base/lib_colorset.c */
-+
-+#undef wcolor_set
-+int	wcolor_set(
-+		WINDOW	*win, 
-+		short	color_pair_number, 
-+		void	*opts)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_delch.c */
-+
-+#undef wdelch
-+int	wdelch(
-+		WINDOW	*win)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_delwin.c */
-+
-+#undef delwin
-+int	delwin(
-+		WINDOW	*win)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_echo.c */
-+
-+#undef echo_sp
-+int	echo_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
-+#undef echo
-+int	echo(void)
-+		{ return(*(int *)0); }
-+
-+#undef noecho_sp
-+int	noecho_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
-+#undef noecho
-+int	noecho(void)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_endwin.c */
-+
-+#undef endwin_sp
-+int	endwin_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
-+#undef endwin
-+int	endwin(void)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_erase.c */
-+
-+#undef werase
-+int	werase(
-+		WINDOW	*win)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_flash.c */
-+
-+#undef flash_sp
-+int	flash_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
-+#undef flash
-+int	flash(void)
-+		{ return(*(int *)0); }
-+
-+/* ./lib_gen.c */
-+
-+#undef addch
-+int	addch(
-+		const chtype z)
-+		{ return(*(int *)0); }
-+
-+#undef addchnstr
-+int	addchnstr(
-+		const chtype *a1, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef addchstr
-+int	addchstr(
-+		const chtype *z)
-+		{ return(*(int *)0); }
-+
-+#undef addnstr
-+int	addnstr(
-+		const char *a1, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef addstr
-+int	addstr(
-+		const char *z)
-+		{ return(*(int *)0); }
-+
-+#undef attroff
-+int	attroff(
-+		NCURSES_ATTR_T	z)
-+		{ return(*(int *)0); }
-+
-+#undef attron
-+int	attron(
-+		NCURSES_ATTR_T	z)
-+		{ return(*(int *)0); }
-+
-+#undef attrset
-+int	attrset(
-+		NCURSES_ATTR_T	z)
-+		{ return(*(int *)0); }
-+
-+#undef attr_get
-+int	attr_get(
-+		attr_t	*a1, 
-+		short	*a2, 
-+		void	*z)
-+		{ return(*(int *)0); }
-+
-+#undef attr_off
-+int	attr_off(
-+		attr_t	a1, 
-+		void	*z)
-+		{ return(*(int *)0); }
-+
-+#undef attr_on
-+int	attr_on(
-+		attr_t	a1, 
-+		void	*z)
-+		{ return(*(int *)0); }
-+
-+#undef attr_set
-+int	attr_set(
-+		attr_t	a1, 
-+		short	a2, 
-+		void	*z)
-+		{ return(*(int *)0); }
-+
-+#undef bkgd
-+int	bkgd(
-+		chtype	z)
-+		{ return(*(int *)0); }
-+
-+#undef bkgdset
-+void	bkgdset(
-+		chtype	z)
-+		{ /* void */ }
-+
-+#undef border
-+int	border(
-+		chtype	a1, 
-+		chtype	a2, 
-+		chtype	a3, 
-+		chtype	a4, 
-+		chtype	a5, 
-+		chtype	a6, 
-+		chtype	a7, 
-+		chtype	z)
-+		{ return(*(int *)0); }
-+
-+#undef box
-+int	box(
-+		WINDOW	*a1, 
-+		chtype	a2, 
-+		chtype	z)
-+		{ return(*(int *)0); }
-+
-+#undef chgat
-+int	chgat(
-+		int	a1, 
-+		attr_t	a2, 
-+		short	a3, 
-+		const void *z)
-+		{ return(*(int *)0); }
-+
-+#undef clear
-+int	clear(void)
-+		{ return(*(int *)0); }
-+
-+#undef clrtobot
-+int	clrtobot(void)
-+		{ return(*(int *)0); }
-+
-+#undef clrtoeol
-+int	clrtoeol(void)
-+		{ return(*(int *)0); }
-+
-+#undef color_set
-+int	color_set(
-+		short	a1, 
-+		void	*z)
-+		{ return(*(int *)0); }
-+
-+#undef COLOR_PAIR
-+int	COLOR_PAIR(
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef delch
-+int	delch(void)
-+		{ return(*(int *)0); }
-+
-+#undef deleteln
-+int	deleteln(void)
-+		{ return(*(int *)0); }
-+
-+#undef echochar
-+int	echochar(
-+		const chtype z)
-+		{ return(*(int *)0); }
-+
-+#undef erase
-+int	erase(void)
-+		{ return(*(int *)0); }
-+
-+#undef getbkgd
-+chtype	getbkgd(
-+		WINDOW	*z)
-+		{ return(*(chtype *)0); }
-+
-+#undef getch
-+int	getch(void)
-+		{ return(*(int *)0); }
-+
-+#undef getnstr
-+int	getnstr(
-+		char	*a1, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef getstr
-+int	getstr(
-+		char	*z)
-+		{ return(*(int *)0); }
-+
-+#undef hline
-+int	hline(
-+		chtype	a1, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef inch
-+chtype	inch(void)
-+		{ return(*(chtype *)0); }
-+
-+#undef inchnstr
-+int	inchnstr(
-+		chtype	*a1, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef inchstr
-+int	inchstr(
-+		chtype	*z)
-+		{ return(*(int *)0); }
-+
-+#undef innstr
-+int	innstr(
-+		char	*a1, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef insch
-+int	insch(
-+		chtype	z)
-+		{ return(*(int *)0); }
-+
-+#undef insdelln
-+int	insdelln(
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef insertln
-+int	insertln(void)
-+		{ return(*(int *)0); }
-+
-+#undef insnstr
-+int	insnstr(
-+		const char *a1, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef insstr
-+int	insstr(
-+		const char *z)
-+		{ return(*(int *)0); }
-+
-+#undef instr
-+int	instr(
-+		char	*z)
-+		{ return(*(int *)0); }
-+
-+#undef move
-+int	move(
-+		int	a1, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvaddch
-+int	mvaddch(
-+		int	a1, 
-+		int	a2, 
-+		const chtype z)
-+		{ return(*(int *)0); }
-+
-+#undef mvaddchnstr
-+int	mvaddchnstr(
-+		int	a1, 
-+		int	a2, 
-+		const chtype *a3, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvaddchstr
-+int	mvaddchstr(
-+		int	a1, 
-+		int	a2, 
-+		const chtype *z)
-+		{ return(*(int *)0); }
-+
-+#undef mvaddnstr
-+int	mvaddnstr(
-+		int	a1, 
-+		int	a2, 
-+		const char *a3, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvaddstr
-+int	mvaddstr(
-+		int	a1, 
-+		int	a2, 
-+		const char *z)
-+		{ return(*(int *)0); }
-+
-+#undef mvchgat
-+int	mvchgat(
-+		int	a1, 
-+		int	a2, 
-+		int	a3, 
-+		attr_t	a4, 
-+		short	a5, 
-+		const void *z)
-+		{ return(*(int *)0); }
-+
-+#undef mvdelch
-+int	mvdelch(
-+		int	a1, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvgetch
-+int	mvgetch(
-+		int	a1, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvgetnstr
-+int	mvgetnstr(
-+		int	a1, 
-+		int	a2, 
-+		char	*a3, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvgetstr
-+int	mvgetstr(
-+		int	a1, 
-+		int	a2, 
-+		char	*z)
-+		{ return(*(int *)0); }
-+
-+#undef mvhline
-+int	mvhline(
-+		int	a1, 
-+		int	a2, 
-+		chtype	a3, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvinch
-+chtype	mvinch(
-+		int	a1, 
-+		int	z)
-+		{ return(*(chtype *)0); }
-+
-+#undef mvinchnstr
-+int	mvinchnstr(
-+		int	a1, 
-+		int	a2, 
-+		chtype	*a3, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvinchstr
-+int	mvinchstr(
-+		int	a1, 
-+		int	a2, 
-+		chtype	*z)
-+		{ return(*(int *)0); }
-+
-+#undef mvinnstr
-+int	mvinnstr(
-+		int	a1, 
-+		int	a2, 
-+		char	*a3, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvinsch
-+int	mvinsch(
-+		int	a1, 
-+		int	a2, 
-+		chtype	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvinsnstr
-+int	mvinsnstr(
-+		int	a1, 
-+		int	a2, 
-+		const char *a3, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvinsstr
-+int	mvinsstr(
-+		int	a1, 
-+		int	a2, 
-+		const char *z)
-+		{ return(*(int *)0); }
-+
-+#undef mvinstr
-+int	mvinstr(
-+		int	a1, 
-+		int	a2, 
-+		char	*z)
-+		{ return(*(int *)0); }
-+
-+#undef mvvline
-+int	mvvline(
-+		int	a1, 
-+		int	a2, 
-+		chtype	a3, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwaddch
-+int	mvwaddch(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		const chtype z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwaddchnstr
-+int	mvwaddchnstr(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		const chtype *a4, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwaddchstr
-+int	mvwaddchstr(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		const chtype *z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwaddnstr
-+int	mvwaddnstr(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		const char *a4, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwaddstr
-+int	mvwaddstr(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		const char *z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwchgat
-+int	mvwchgat(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		int	a4, 
-+		attr_t	a5, 
-+		short	a6, 
-+		const void *z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwdelch
-+int	mvwdelch(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwgetch
-+int	mvwgetch(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwgetnstr
-+int	mvwgetnstr(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		char	*a4, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwgetstr
-+int	mvwgetstr(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		char	*z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwhline
-+int	mvwhline(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		chtype	a4, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwinch
-+chtype	mvwinch(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	z)
-+		{ return(*(chtype *)0); }
-+
-+#undef mvwinchnstr
-+int	mvwinchnstr(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		chtype	*a4, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwinchstr
-+int	mvwinchstr(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		chtype	*z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwinnstr
-+int	mvwinnstr(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		char	*a4, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwinsch
-+int	mvwinsch(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		chtype	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwinsnstr
-+int	mvwinsnstr(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		const char *a4, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwinsstr
-+int	mvwinsstr(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		const char *z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwinstr
-+int	mvwinstr(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		char	*z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwvline
-+int	mvwvline(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		chtype	a4, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef PAIR_NUMBER
-+int	PAIR_NUMBER(
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef redrawwin
-+int	redrawwin(
-+		WINDOW	*z)
-+		{ return(*(int *)0); }
-+
-+#undef refresh
-+int	refresh(void)
-+		{ return(*(int *)0); }
-+
-+#undef scrl
-+int	scrl(
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef scroll
-+int	scroll(
-+		WINDOW	*z)
-+		{ return(*(int *)0); }
-+
-+#undef setscrreg
-+int	setscrreg(
-+		int	a1, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef slk_attr_off
-+int	slk_attr_off(
-+		const attr_t a1, 
-+		void	*z)
-+		{ return(*(int *)0); }
-+
-+#undef slk_attr_on
-+int	slk_attr_on(
-+		attr_t	a1, 
-+		void	*z)
-+		{ return(*(int *)0); }
-+
-+#undef standout
-+int	standout(void)
-+		{ return(*(int *)0); }
-+
-+#undef standend
-+int	standend(void)
-+		{ return(*(int *)0); }
-+
-+#undef timeout
-+void	timeout(
-+		int	z)
-+		{ /* void */ }
-+
-+#undef touchline
-+int	touchline(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef touchwin
-+int	touchwin(
-+		WINDOW	*z)
-+		{ return(*(int *)0); }
-+
-+#undef untouchwin
-+int	untouchwin(
-+		WINDOW	*z)
-+		{ return(*(int *)0); }
-+
-+#undef vline
-+int	vline(
-+		chtype	a1, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef vw_printw
-+int	vw_printw(
-+		WINDOW	*a1, 
-+		const char *a2, 
-+		va_list	z)
-+		{ return(*(int *)0); }
-+
-+#undef vw_scanw
-+int	vw_scanw(
-+		WINDOW	*a1, 
-+		char	*a2, 
-+		va_list	z)
-+		{ return(*(int *)0); }
-+
-+#undef waddchstr
-+int	waddchstr(
-+		WINDOW	*a1, 
-+		const chtype *z)
-+		{ return(*(int *)0); }
-+
-+#undef waddstr
-+int	waddstr(
-+		WINDOW	*a1, 
-+		const char *z)
-+		{ return(*(int *)0); }
-+
-+#undef wattron
-+int	wattron(
-+		WINDOW	*a1, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef wattroff
-+int	wattroff(
-+		WINDOW	*a1, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef wattrset
-+int	wattrset(
-+		WINDOW	*a1, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef wattr_get
-+int	wattr_get(
-+		WINDOW	*a1, 
-+		attr_t	*a2, 
-+		short	*a3, 
-+		void	*z)
-+		{ return(*(int *)0); }
-+
-+#undef wattr_set
-+int	wattr_set(
-+		WINDOW	*a1, 
-+		attr_t	a2, 
-+		short	a3, 
-+		void	*z)
-+		{ return(*(int *)0); }
-+
-+#undef wdeleteln
-+int	wdeleteln(
-+		WINDOW	*z)
-+		{ return(*(int *)0); }
-+
-+#undef wgetstr
-+int	wgetstr(
-+		WINDOW	*a1, 
-+		char	*z)
-+		{ return(*(int *)0); }
-+
-+#undef winchstr
-+int	winchstr(
-+		WINDOW	*a1, 
-+		chtype	*z)
-+		{ return(*(int *)0); }
-+
-+#undef winsertln
-+int	winsertln(
-+		WINDOW	*z)
-+		{ return(*(int *)0); }
-+
-+#undef winsstr
-+int	winsstr(
-+		WINDOW	*a1, 
-+		const char *z)
-+		{ return(*(int *)0); }
-+
-+#undef winstr
-+int	winstr(
-+		WINDOW	*a1, 
-+		char	*z)
-+		{ return(*(int *)0); }
-+
-+#undef wstandout
-+int	wstandout(
-+		WINDOW	*z)
-+		{ return(*(int *)0); }
-+
-+#undef wstandend
-+int	wstandend(
-+		WINDOW	*z)
-+		{ return(*(int *)0); }
-+
-+#undef getattrs
-+int	getattrs(
-+		const WINDOW *z)
-+		{ return(*(int *)0); }
-+
-+#undef getcurx
-+int	getcurx(
-+		const WINDOW *z)
-+		{ return(*(int *)0); }
-+
-+#undef getcury
-+int	getcury(
-+		const WINDOW *z)
-+		{ return(*(int *)0); }
-+
-+#undef getbegx
-+int	getbegx(
-+		const WINDOW *z)
-+		{ return(*(int *)0); }
-+
-+#undef getbegy
-+int	getbegy(
-+		const WINDOW *z)
-+		{ return(*(int *)0); }
-+
-+#undef getmaxx
-+int	getmaxx(
-+		const WINDOW *z)
-+		{ return(*(int *)0); }
-+
-+#undef getmaxy
-+int	getmaxy(
-+		const WINDOW *z)
-+		{ return(*(int *)0); }
-+
-+#undef getparx
-+int	getparx(
-+		const WINDOW *z)
-+		{ return(*(int *)0); }
-+
-+#undef getpary
-+int	getpary(
-+		const WINDOW *z)
-+		{ return(*(int *)0); }
-+
-+#undef wgetparent
-+WINDOW	*wgetparent(
-+		const WINDOW *z)
-+		{ return(*(WINDOW **)0); }
-+
-+#undef is_cleared
-+NCURSES_BOOL is_cleared(
-+		const WINDOW *z)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef is_idcok
-+NCURSES_BOOL is_idcok(
-+		const WINDOW *z)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef is_idlok
-+NCURSES_BOOL is_idlok(
-+		const WINDOW *z)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef is_immedok
-+NCURSES_BOOL is_immedok(
-+		const WINDOW *z)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef is_keypad
-+NCURSES_BOOL is_keypad(
-+		const WINDOW *z)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef is_leaveok
-+NCURSES_BOOL is_leaveok(
-+		const WINDOW *z)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef is_nodelay
-+NCURSES_BOOL is_nodelay(
-+		const WINDOW *z)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef is_notimeout
-+NCURSES_BOOL is_notimeout(
-+		const WINDOW *z)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef is_scrollok
-+NCURSES_BOOL is_scrollok(
-+		const WINDOW *z)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef is_syncok
-+NCURSES_BOOL is_syncok(
-+		const WINDOW *z)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef wgetscrreg
-+int	wgetscrreg(
-+		const WINDOW *a1, 
-+		int	*a2, 
-+		int	*z)
-+		{ return(*(int *)0); }
-+
-+#undef add_wch
-+int	add_wch(
-+		const cchar_t *z)
-+		{ return(*(int *)0); }
-+
-+#undef add_wchnstr
-+int	add_wchnstr(
-+		const cchar_t *a1, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef add_wchstr
-+int	add_wchstr(
-+		const cchar_t *z)
-+		{ return(*(int *)0); }
-+
-+#undef addnwstr
-+int	addnwstr(
-+		const wchar_t *a1, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef addwstr
-+int	addwstr(
-+		const wchar_t *z)
-+		{ return(*(int *)0); }
-+
-+#undef bkgrnd
-+int	bkgrnd(
-+		const cchar_t *z)
-+		{ return(*(int *)0); }
-+
-+#undef bkgrndset
-+void	bkgrndset(
-+		const cchar_t *z)
-+		{ /* void */ }
-+
-+#undef border_set
-+int	border_set(
-+		const cchar_t *a1, 
-+		const cchar_t *a2, 
-+		const cchar_t *a3, 
-+		const cchar_t *a4, 
-+		const cchar_t *a5, 
-+		const cchar_t *a6, 
-+		const cchar_t *a7, 
-+		const cchar_t *z)
-+		{ return(*(int *)0); }
-+
-+#undef box_set
-+int	box_set(
-+		WINDOW	*a1, 
-+		const cchar_t *a2, 
-+		const cchar_t *z)
-+		{ return(*(int *)0); }
-+
-+#undef echo_wchar
-+int	echo_wchar(
-+		const cchar_t *z)
-+		{ return(*(int *)0); }
-+
-+#undef get_wch
-+int	get_wch(
-+		wint_t	*z)
-+		{ return(*(int *)0); }
-+
-+#undef get_wstr
-+int	get_wstr(
-+		wint_t	*z)
-+		{ return(*(int *)0); }
-+
-+#undef getbkgrnd
-+int	getbkgrnd(
-+		cchar_t	*z)
-+		{ return(*(int *)0); }
-+
-+#undef getn_wstr
-+int	getn_wstr(
-+		wint_t	*a1, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef hline_set
-+int	hline_set(
-+		const cchar_t *a1, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef in_wch
-+int	in_wch(
-+		cchar_t	*z)
-+		{ return(*(int *)0); }
-+
-+#undef in_wchnstr
-+int	in_wchnstr(
-+		cchar_t	*a1, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef in_wchstr
-+int	in_wchstr(
-+		cchar_t	*z)
-+		{ return(*(int *)0); }
-+
-+#undef innwstr
-+int	innwstr(
-+		wchar_t	*a1, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef ins_nwstr
-+int	ins_nwstr(
-+		const wchar_t *a1, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef ins_wch
-+int	ins_wch(
-+		const cchar_t *z)
-+		{ return(*(int *)0); }
-+
-+#undef ins_wstr
-+int	ins_wstr(
-+		const wchar_t *z)
-+		{ return(*(int *)0); }
-+
-+#undef inwstr
-+int	inwstr(
-+		wchar_t	*z)
-+		{ return(*(int *)0); }
-+
-+#undef mvadd_wch
-+int	mvadd_wch(
-+		int	a1, 
-+		int	a2, 
-+		const cchar_t *z)
-+		{ return(*(int *)0); }
-+
-+#undef mvadd_wchnstr
-+int	mvadd_wchnstr(
-+		int	a1, 
-+		int	a2, 
-+		const cchar_t *a3, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvadd_wchstr
-+int	mvadd_wchstr(
-+		int	a1, 
-+		int	a2, 
-+		const cchar_t *z)
-+		{ return(*(int *)0); }
-+
-+#undef mvaddnwstr
-+int	mvaddnwstr(
-+		int	a1, 
-+		int	a2, 
-+		const wchar_t *a3, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvaddwstr
-+int	mvaddwstr(
-+		int	a1, 
-+		int	a2, 
-+		const wchar_t *z)
-+		{ return(*(int *)0); }
-+
-+#undef mvget_wch
-+int	mvget_wch(
-+		int	a1, 
-+		int	a2, 
-+		wint_t	*z)
-+		{ return(*(int *)0); }
-+
-+#undef mvget_wstr
-+int	mvget_wstr(
-+		int	a1, 
-+		int	a2, 
-+		wint_t	*z)
-+		{ return(*(int *)0); }
-+
-+#undef mvgetn_wstr
-+int	mvgetn_wstr(
-+		int	a1, 
-+		int	a2, 
-+		wint_t	*a3, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvhline_set
-+int	mvhline_set(
-+		int	a1, 
-+		int	a2, 
-+		const cchar_t *a3, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvin_wch
-+int	mvin_wch(
-+		int	a1, 
-+		int	a2, 
-+		cchar_t	*z)
-+		{ return(*(int *)0); }
-+
-+#undef mvin_wchnstr
-+int	mvin_wchnstr(
-+		int	a1, 
-+		int	a2, 
-+		cchar_t	*a3, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvin_wchstr
-+int	mvin_wchstr(
-+		int	a1, 
-+		int	a2, 
-+		cchar_t	*z)
-+		{ return(*(int *)0); }
-+
-+#undef mvinnwstr
-+int	mvinnwstr(
-+		int	a1, 
-+		int	a2, 
-+		wchar_t	*a3, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvins_nwstr
-+int	mvins_nwstr(
-+		int	a1, 
-+		int	a2, 
-+		const wchar_t *a3, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvins_wch
-+int	mvins_wch(
-+		int	a1, 
-+		int	a2, 
-+		const cchar_t *z)
-+		{ return(*(int *)0); }
-+
-+#undef mvins_wstr
-+int	mvins_wstr(
-+		int	a1, 
-+		int	a2, 
-+		const wchar_t *z)
-+		{ return(*(int *)0); }
-+
-+#undef mvinwstr
-+int	mvinwstr(
-+		int	a1, 
-+		int	a2, 
-+		wchar_t	*z)
-+		{ return(*(int *)0); }
-+
-+#undef mvvline_set
-+int	mvvline_set(
-+		int	a1, 
-+		int	a2, 
-+		const cchar_t *a3, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwadd_wch
-+int	mvwadd_wch(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		const cchar_t *z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwadd_wchnstr
-+int	mvwadd_wchnstr(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		const cchar_t *a4, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwadd_wchstr
-+int	mvwadd_wchstr(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		const cchar_t *z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwaddnwstr
-+int	mvwaddnwstr(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		const wchar_t *a4, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwaddwstr
-+int	mvwaddwstr(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		const wchar_t *z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwget_wch
-+int	mvwget_wch(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		wint_t	*z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwget_wstr
-+int	mvwget_wstr(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		wint_t	*z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwgetn_wstr
-+int	mvwgetn_wstr(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		wint_t	*a4, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwhline_set
-+int	mvwhline_set(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		const cchar_t *a4, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwin_wch
-+int	mvwin_wch(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		cchar_t	*z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwin_wchnstr
-+int	mvwin_wchnstr(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		cchar_t	*a4, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwin_wchstr
-+int	mvwin_wchstr(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		cchar_t	*z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwinnwstr
-+int	mvwinnwstr(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		wchar_t	*a4, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwins_nwstr
-+int	mvwins_nwstr(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		const wchar_t *a4, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwins_wch
-+int	mvwins_wch(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		const cchar_t *z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwins_wstr
-+int	mvwins_wstr(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		const wchar_t *z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwinwstr
-+int	mvwinwstr(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		wchar_t	*z)
-+		{ return(*(int *)0); }
-+
-+#undef mvwvline_set
-+int	mvwvline_set(
-+		WINDOW	*a1, 
-+		int	a2, 
-+		int	a3, 
-+		const cchar_t *a4, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef vline_set
-+int	vline_set(
-+		const cchar_t *a1, 
-+		int	z)
-+		{ return(*(int *)0); }
-+
-+#undef wadd_wchstr
-+int	wadd_wchstr(
-+		WINDOW	*a1, 
-+		const cchar_t *z)
-+		{ return(*(int *)0); }
-+
-+#undef waddwstr
-+int	waddwstr(
-+		WINDOW	*a1, 
-+		const wchar_t *z)
-+		{ return(*(int *)0); }
-+
-+#undef wget_wstr
-+int	wget_wstr(
-+		WINDOW	*a1, 
-+		wint_t	*z)
-+		{ return(*(int *)0); }
-+
-+#undef wgetbkgrnd
-+int	wgetbkgrnd(
-+		WINDOW	*a1, 
-+		cchar_t	*z)
-+		{ return(*(int *)0); }
-+
-+#undef win_wchstr
-+int	win_wchstr(
-+		WINDOW	*a1, 
-+		cchar_t	*z)
-+		{ return(*(int *)0); }
-+
-+#undef wins_wstr
-+int	wins_wstr(
-+		WINDOW	*a1, 
-+		const wchar_t *z)
-+		{ return(*(int *)0); }
-+
-+#undef mouse_trafo
-+NCURSES_BOOL mouse_trafo(
-+		int	*a1, 
-+		int	*a2, 
-+		NCURSES_BOOL z)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+/* ./base/lib_getch.c */
-+
-+#include <fifo_defs.h>
-+
-+#undef _nc_ptr_Escdelay
-+int	*_nc_ptr_Escdelay(
-+		SCREEN	*sp)
-+		{ return(*(int **)0); }
-+
-+#undef _nc_ESCDELAY
-+int	_nc_ESCDELAY(void)
-+		{ return(*(int *)0); }
-+
-+#undef set_escdelay_sp
-+int	set_escdelay_sp(
-+		SCREEN	*sp, 
-+		int	value)
-+		{ return(*(int *)0); }
-+
-+#undef set_escdelay
-+int	set_escdelay(
-+		int	value)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_wgetch
-+int	_nc_wgetch(
-+		WINDOW	*win, 
-+		unsigned long *result, 
-+		int	use_meta)
-+		{ return(*(int *)0); }
-+
-+#undef wgetch
-+int	wgetch(
-+		WINDOW	*win)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_getstr.c */
-+
-+#undef wgetnstr
-+int	wgetnstr(
-+		WINDOW	*win, 
-+		char	*str, 
-+		int	maxlen)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_hline.c */
-+
-+#undef whline
-+int	whline(
-+		WINDOW	*win, 
-+		chtype	ch, 
-+		int	n)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_immedok.c */
-+
-+#undef immedok
-+void	immedok(
-+		WINDOW	*win, 
-+		NCURSES_BOOL flag)
-+		{ /* void */ }
-+
-+/* ./base/lib_inchstr.c */
-+
-+#undef winchnstr
-+int	winchnstr(
-+		WINDOW	*win, 
-+		chtype	*str, 
-+		int	n)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_initscr.c */
-+
-+#undef initscr
-+WINDOW	*initscr(void)
-+		{ return(*(WINDOW **)0); }
-+
-+/* ./base/lib_insch.c */
-+
-+#undef _nc_insert_ch
-+int	_nc_insert_ch(
-+		SCREEN	*sp, 
-+		WINDOW	*win, 
-+		chtype	ch)
-+		{ return(*(int *)0); }
-+
-+#undef winsch
-+int	winsch(
-+		WINDOW	*win, 
-+		chtype	c)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_insdel.c */
-+
-+#undef winsdelln
-+int	winsdelln(
-+		WINDOW	*win, 
-+		int	n)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_insnstr.c */
-+
-+#undef winsnstr
-+int	winsnstr(
-+		WINDOW	*win, 
-+		const char *s, 
-+		int	n)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_instr.c */
-+
-+#undef winnstr
-+int	winnstr(
-+		WINDOW	*win, 
-+		char	*str, 
-+		int	n)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_isendwin.c */
-+
-+#undef isendwin_sp
-+NCURSES_BOOL isendwin_sp(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef isendwin
-+NCURSES_BOOL isendwin(void)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+/* ./base/lib_leaveok.c */
-+
-+#undef leaveok
-+int	leaveok(
-+		WINDOW	*win, 
-+		NCURSES_BOOL flag)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_mouse.c */
-+
-+#undef getmouse_sp
-+int	getmouse_sp(
-+		SCREEN	*sp, 
-+		MEVENT	*aevent)
-+		{ return(*(int *)0); }
-+
-+#undef getmouse
-+int	getmouse(
-+		MEVENT	*aevent)
-+		{ return(*(int *)0); }
-+
-+#undef ungetmouse_sp
-+int	ungetmouse_sp(
-+		SCREEN	*sp, 
-+		MEVENT	*aevent)
-+		{ return(*(int *)0); }
-+
-+#undef ungetmouse
-+int	ungetmouse(
-+		MEVENT	*aevent)
-+		{ return(*(int *)0); }
-+
-+#undef mousemask_sp
-+mmask_t	mousemask_sp(
-+		SCREEN	*sp, 
-+		mmask_t	newmask, 
-+		mmask_t	*oldmask)
-+		{ return(*(mmask_t *)0); }
-+
-+#undef mousemask
-+mmask_t	mousemask(
-+		mmask_t	newmask, 
-+		mmask_t	*oldmask)
-+		{ return(*(mmask_t *)0); }
-+
-+#undef wenclose
-+NCURSES_BOOL wenclose(
-+		const WINDOW *win, 
-+		int	y, 
-+		int	x)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef mouseinterval_sp
-+int	mouseinterval_sp(
-+		SCREEN	*sp, 
-+		int	maxclick)
-+		{ return(*(int *)0); }
-+
-+#undef mouseinterval
-+int	mouseinterval(
-+		int	maxclick)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_has_mouse
-+NCURSES_BOOL _nc_has_mouse(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef has_mouse_sp
-+NCURSES_BOOL has_mouse_sp(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef has_mouse
-+NCURSES_BOOL has_mouse(void)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef wmouse_trafo
-+NCURSES_BOOL wmouse_trafo(
-+		const WINDOW *win, 
-+		int	*pY, 
-+		int	*pX, 
-+		NCURSES_BOOL to_screen)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+/* ./base/lib_move.c */
-+
-+#undef wmove
-+int	wmove(
-+		WINDOW	*win, 
-+		int	y, 
-+		int	x)
-+		{ return(*(int *)0); }
-+
-+/* ./tty/lib_mvcur.c */
-+
-+#undef _nc_msec_cost_sp
-+int	_nc_msec_cost_sp(
-+		SCREEN	*sp, 
-+		const char *const cap, 
-+		int	affcnt)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_msec_cost
-+int	_nc_msec_cost(
-+		const char *const cap, 
-+		int	affcnt)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_mvcur_resume_sp
-+void	_nc_mvcur_resume_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
-+#undef _nc_mvcur_resume
-+void	_nc_mvcur_resume(void)
-+		{ /* void */ }
-+
-+#undef _nc_mvcur_init_sp
-+void	_nc_mvcur_init_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
-+#undef _nc_mvcur_init
-+void	_nc_mvcur_init(void)
-+		{ /* void */ }
-+
-+#undef _nc_mvcur_wrap_sp
-+void	_nc_mvcur_wrap_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
-+#undef _nc_mvcur_wrap
-+void	_nc_mvcur_wrap(void)
-+		{ /* void */ }
-+
-+#undef mvcur_sp
-+int	mvcur_sp(
-+		SCREEN	*sp, 
-+		int	yold, 
-+		int	xold, 
-+		int	ynew, 
-+		int	xnew)
-+		{ return(*(int *)0); }
-+
-+#undef mvcur
-+int	mvcur(
-+		int	yold, 
-+		int	xold, 
-+		int	ynew, 
-+		int	xnew)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_optimize_enable
-+int	_nc_optimize_enable;
-+
-+/* ./base/lib_mvwin.c */
-+
-+#undef mvwin
-+int	mvwin(
-+		WINDOW	*win, 
-+		int	by, 
-+		int	bx)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_newterm.c */
-+
-+#undef filter_sp
-+void	filter_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
-+#undef filter
-+void	filter(void)
-+		{ /* void */ }
-+
-+#undef nofilter_sp
-+void	nofilter_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
-+#undef nofilter
-+void	nofilter(void)
-+		{ /* void */ }
-+
-+#undef newterm_sp
-+SCREEN	*newterm_sp(
-+		SCREEN	*sp, 
-+		char	*name, 
-+		FILE	*ofp, 
-+		FILE	*ifp)
-+		{ return(*(SCREEN **)0); }
-+
-+#undef newterm
-+SCREEN	*newterm(
-+		char	*name, 
-+		FILE	*ofp, 
-+		FILE	*ifp)
-+		{ return(*(SCREEN **)0); }
-+
-+/* ./base/lib_newwin.c */
-+
-+#undef _nc_freewin
-+int	_nc_freewin(
-+		WINDOW	*win)
-+		{ return(*(int *)0); }
-+
-+#undef newwin_sp
-+WINDOW	*newwin_sp(
-+		SCREEN	*sp, 
-+		int	num_lines, 
-+		int	num_columns, 
-+		int	begy, 
-+		int	begx)
-+		{ return(*(WINDOW **)0); }
-+
-+#undef newwin
-+WINDOW	*newwin(
-+		int	num_lines, 
-+		int	num_columns, 
-+		int	begy, 
-+		int	begx)
-+		{ return(*(WINDOW **)0); }
-+
-+#undef derwin
-+WINDOW	*derwin(
-+		WINDOW	*orig, 
-+		int	num_lines, 
-+		int	num_columns, 
-+		int	begy, 
-+		int	begx)
-+		{ return(*(WINDOW **)0); }
-+
-+#undef subwin
-+WINDOW	*subwin(
-+		WINDOW	*w, 
-+		int	l, 
-+		int	c, 
-+		int	y, 
-+		int	x)
-+		{ return(*(WINDOW **)0); }
-+
-+#undef _nc_makenew_sp
-+WINDOW	*_nc_makenew_sp(
-+		SCREEN	*sp, 
-+		int	num_lines, 
-+		int	num_columns, 
-+		int	begy, 
-+		int	begx, 
-+		int	flags)
-+		{ return(*(WINDOW **)0); }
-+
-+#undef _nc_makenew
-+WINDOW	*_nc_makenew(
-+		int	num_lines, 
-+		int	num_columns, 
-+		int	begy, 
-+		int	begx, 
-+		int	flags)
-+		{ return(*(WINDOW **)0); }
-+
-+#undef _nc_curscr_of
-+WINDOW	*_nc_curscr_of(
-+		SCREEN	*sp)
-+		{ return(*(WINDOW **)0); }
-+
-+#undef _nc_newscr_of
-+WINDOW	*_nc_newscr_of(
-+		SCREEN	*sp)
-+		{ return(*(WINDOW **)0); }
-+
-+#undef _nc_stdscr_of
-+WINDOW	*_nc_stdscr_of(
-+		SCREEN	*sp)
-+		{ return(*(WINDOW **)0); }
-+
-+/* ./base/lib_nl.c */
-+
-+#undef nl_sp
-+int	nl_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
-+#undef nl
-+int	nl(void)
-+		{ return(*(int *)0); }
-+
-+#undef nonl_sp
-+int	nonl_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
-+#undef nonl
-+int	nonl(void)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_overlay.c */
-+
-+#undef overlay
-+int	overlay(
-+		const WINDOW *win1, 
-+		WINDOW	*win2)
-+		{ return(*(int *)0); }
-+
-+#undef overwrite
-+int	overwrite(
-+		const WINDOW *win1, 
-+		WINDOW	*win2)
-+		{ return(*(int *)0); }
-+
-+#undef copywin
-+int	copywin(
-+		const WINDOW *src, 
-+		WINDOW	*dst, 
-+		int	sminrow, 
-+		int	smincol, 
-+		int	dminrow, 
-+		int	dmincol, 
-+		int	dmaxrow, 
-+		int	dmaxcol, 
-+		int	over)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_pad.c */
-+
-+#undef newpad_sp
-+WINDOW	*newpad_sp(
-+		SCREEN	*sp, 
-+		int	l, 
-+		int	c)
-+		{ return(*(WINDOW **)0); }
-+
-+#undef newpad
-+WINDOW	*newpad(
-+		int	l, 
-+		int	c)
-+		{ return(*(WINDOW **)0); }
-+
-+#undef subpad
-+WINDOW	*subpad(
-+		WINDOW	*orig, 
-+		int	l, 
-+		int	c, 
-+		int	begy, 
-+		int	begx)
-+		{ return(*(WINDOW **)0); }
-+
-+#undef prefresh
-+int	prefresh(
-+		WINDOW	*win, 
-+		int	pminrow, 
-+		int	pmincol, 
-+		int	sminrow, 
-+		int	smincol, 
-+		int	smaxrow, 
-+		int	smaxcol)
-+		{ return(*(int *)0); }
-+
-+#undef pnoutrefresh
-+int	pnoutrefresh(
-+		WINDOW	*win, 
-+		int	pminrow, 
-+		int	pmincol, 
-+		int	sminrow, 
-+		int	smincol, 
-+		int	smaxrow, 
-+		int	smaxcol)
-+		{ return(*(int *)0); }
-+
-+#undef pechochar
-+int	pechochar(
-+		WINDOW	*pad, 
-+		const chtype ch)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_printw.c */
-+
-+#undef printw
-+int	printw(
-+		const char *fmt, 
-+		...)
-+		{ return(*(int *)0); }
-+
-+#undef wprintw
-+int	wprintw(
-+		WINDOW	*win, 
-+		const char *fmt, 
-+		...)
-+		{ return(*(int *)0); }
-+
-+#undef mvprintw
-+int	mvprintw(
-+		int	y, 
-+		int	x, 
-+		const char *fmt, 
-+		...)
-+		{ return(*(int *)0); }
-+
-+#undef mvwprintw
-+int	mvwprintw(
-+		WINDOW	*win, 
-+		int	y, 
-+		int	x, 
-+		const char *fmt, 
-+		...)
-+		{ return(*(int *)0); }
-+
-+#undef vwprintw
-+int	vwprintw(
-+		WINDOW	*win, 
-+		const char *fmt, 
-+		va_list	argp)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_redrawln.c */
-+
-+#undef wredrawln
-+int	wredrawln(
-+		WINDOW	*win, 
-+		int	beg, 
-+		int	num)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_refresh.c */
-+
-+#undef wrefresh
-+int	wrefresh(
-+		WINDOW	*win)
-+		{ return(*(int *)0); }
-+
-+#undef wnoutrefresh
-+int	wnoutrefresh(
-+		WINDOW	*win)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_restart.c */
-+
-+#undef restartterm_sp
-+int	restartterm_sp(
-+		SCREEN	*sp, 
-+		char	*termp, 
-+		int	filenum, 
-+		int	*errret)
-+		{ return(*(int *)0); }
-+
-+#undef restartterm
-+int	restartterm(
-+		char	*termp, 
-+		int	filenum, 
-+		int	*errret)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_scanw.c */
-+
-+#undef vwscanw
-+int	vwscanw(
-+		WINDOW	*win, 
-+		char	*fmt, 
-+		va_list	argp)
-+		{ return(*(int *)0); }
-+
-+#undef scanw
-+int	scanw(
-+		char	*fmt, 
-+		...)
-+		{ return(*(int *)0); }
-+
-+#undef wscanw
-+int	wscanw(
-+		WINDOW	*win, 
-+		char	*fmt, 
-+		...)
-+		{ return(*(int *)0); }
-+
-+#undef mvscanw
-+int	mvscanw(
-+		int	y, 
-+		int	x, 
-+		char	*fmt, 
-+		...)
-+		{ return(*(int *)0); }
-+
-+#undef mvwscanw
-+int	mvwscanw(
-+		WINDOW	*win, 
-+		int	y, 
-+		int	x, 
-+		char	*fmt, 
-+		...)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_screen.c */
-+
-+#undef getwin_sp
-+WINDOW	*getwin_sp(
-+		SCREEN	*sp, 
-+		FILE	*filep)
-+		{ return(*(WINDOW **)0); }
-+
-+#undef getwin
-+WINDOW	*getwin(
-+		FILE	*filep)
-+		{ return(*(WINDOW **)0); }
-+
-+#undef putwin
-+int	putwin(
-+		WINDOW	*win, 
-+		FILE	*filep)
-+		{ return(*(int *)0); }
-+
-+#undef scr_restore_sp
-+int	scr_restore_sp(
-+		SCREEN	*sp, 
-+		const char *file)
-+		{ return(*(int *)0); }
-+
-+#undef scr_restore
-+int	scr_restore(
-+		const char *file)
-+		{ return(*(int *)0); }
-+
-+#undef scr_dump
-+int	scr_dump(
-+		const char *file)
-+		{ return(*(int *)0); }
-+
-+#undef scr_init_sp
-+int	scr_init_sp(
-+		SCREEN	*sp, 
-+		const char *file)
-+		{ return(*(int *)0); }
-+
-+#undef scr_init
-+int	scr_init(
-+		const char *file)
-+		{ return(*(int *)0); }
-+
-+#undef scr_set_sp
-+int	scr_set_sp(
-+		SCREEN	*sp, 
-+		const char *file)
-+		{ return(*(int *)0); }
-+
-+#undef scr_set
-+int	scr_set(
-+		const char *file)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_scroll.c */
-+
-+#undef _nc_scroll_window
-+void	_nc_scroll_window(
-+		WINDOW	*win, 
-+		int const n, 
-+		int const top, 
-+		int const bottom, 
-+		cchar_t	blank)
-+		{ /* void */ }
-+
-+#undef wscrl
-+int	wscrl(
-+		WINDOW	*win, 
-+		int	n)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_scrollok.c */
-+
-+#undef scrollok
-+int	scrollok(
-+		WINDOW	*win, 
-+		NCURSES_BOOL flag)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_scrreg.c */
-+
-+#undef wsetscrreg
-+int	wsetscrreg(
-+		WINDOW	*win, 
-+		int	top, 
-+		int	bottom)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_set_term.c */
-+
-+#undef set_term
-+SCREEN	*set_term(
-+		SCREEN	*screenp)
-+		{ return(*(SCREEN **)0); }
-+
-+#undef delscreen
-+void	delscreen(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
-+#undef _nc_setupscreen
-+int	_nc_setupscreen(
-+		int	slines, 
-+		int	scolumns, 
-+		FILE	*output, 
-+		NCURSES_BOOL filtered, 
-+		int	slk_format)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_ripoffline_sp
-+int	_nc_ripoffline_sp(
-+		SCREEN	*sp, 
-+		int	line, 
-+		int	(*init)(
-+		WINDOW	*p1, 
-+		int	p2))
-+		{ return(*(int *)0); }
-+
-+#undef _nc_ripoffline
-+int	_nc_ripoffline(
-+		int	line, 
-+		int	(*init)(
-+		WINDOW	*p1, 
-+		int	p2))
-+		{ return(*(int *)0); }
-+
-+#undef ripoffline_sp
-+int	ripoffline_sp(
-+		SCREEN	*sp, 
-+		int	line, 
-+		int	(*init)(
-+		WINDOW	*p1, 
-+		int	p2))
-+		{ return(*(int *)0); }
-+
-+#undef ripoffline
-+int	ripoffline(
-+		int	line, 
-+		int	(*init)(
-+		WINDOW	*p1, 
-+		int	p2))
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_slk.c */
-+
-+#undef _nc_slk_initialize
-+int	_nc_slk_initialize(
-+		WINDOW	*stwin, 
-+		int	cols)
-+		{ return(*(int *)0); }
-+
-+#undef slk_restore_sp
-+int	slk_restore_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
-+#undef slk_restore
-+int	slk_restore(void)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_slkatr_set.c */
-+
-+#undef slk_attr_set_sp
-+int	slk_attr_set_sp(
-+		SCREEN	*sp, 
-+		const attr_t attr, 
-+		short	color_pair_number, 
-+		void	*opts)
-+		{ return(*(int *)0); }
-+
-+#undef slk_attr_set
-+int	slk_attr_set(
-+		const attr_t attr, 
-+		short	color_pair_number, 
-+		void	*opts)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_slkatrof.c */
-+
-+#undef slk_attroff_sp
-+int	slk_attroff_sp(
-+		SCREEN	*sp, 
-+		const chtype attr)
-+		{ return(*(int *)0); }
-+
-+#undef slk_attroff
-+int	slk_attroff(
-+		const chtype attr)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_slkatron.c */
-+
-+#undef slk_attron_sp
-+int	slk_attron_sp(
-+		SCREEN	*sp, 
-+		const chtype attr)
-+		{ return(*(int *)0); }
-+
-+#undef slk_attron
-+int	slk_attron(
-+		const chtype attr)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_slkatrset.c */
-+
-+#undef slk_attrset_sp
-+int	slk_attrset_sp(
-+		SCREEN	*sp, 
-+		const chtype attr)
-+		{ return(*(int *)0); }
-+
-+#undef slk_attrset
-+int	slk_attrset(
-+		const chtype attr)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_slkattr.c */
-+
-+#undef slk_attr_sp
-+attr_t	slk_attr_sp(
-+		SCREEN	*sp)
-+		{ return(*(attr_t *)0); }
-+
-+#undef slk_attr
-+attr_t	slk_attr(void)
-+		{ return(*(attr_t *)0); }
-+
-+/* ./base/lib_slkclear.c */
-+
-+#undef slk_clear_sp
-+int	slk_clear_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
-+#undef slk_clear
-+int	slk_clear(void)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_slkcolor.c */
-+
-+#undef slk_color_sp
-+int	slk_color_sp(
-+		SCREEN	*sp, 
-+		short	color_pair_number)
-+		{ return(*(int *)0); }
-+
-+#undef slk_color
-+int	slk_color(
-+		short	color_pair_number)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_slkinit.c */
-+
-+#undef slk_init_sp
-+int	slk_init_sp(
-+		SCREEN	*sp, 
-+		int	format)
-+		{ return(*(int *)0); }
-+
-+#undef slk_init
-+int	slk_init(
-+		int	format)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_slklab.c */
-+
-+#undef slk_label_sp
-+char	*slk_label_sp(
-+		SCREEN	*sp, 
-+		int	n)
-+		{ return(*(char **)0); }
-+
-+#undef slk_label
-+char	*slk_label(
-+		int	n)
-+		{ return(*(char **)0); }
-+
-+/* ./base/lib_slkrefr.c */
-+
-+#undef slk_noutrefresh_sp
-+int	slk_noutrefresh_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
-+#undef slk_noutrefresh
-+int	slk_noutrefresh(void)
-+		{ return(*(int *)0); }
-+
-+#undef slk_refresh_sp
-+int	slk_refresh_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
-+#undef slk_refresh
-+int	slk_refresh(void)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_slkset.c */
-+
-+#include <wctype.h>
-+
-+#undef slk_set_sp
-+int	slk_set_sp(
-+		SCREEN	*sp, 
-+		int	i, 
-+		const char *astr, 
-+		int	format)
-+		{ return(*(int *)0); }
-+
-+#undef slk_set
-+int	slk_set(
-+		int	i, 
-+		const char *astr, 
-+		int	format)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_slktouch.c */
-+
-+#undef slk_touch_sp
-+int	slk_touch_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
-+#undef slk_touch
-+int	slk_touch(void)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_touch.c */
-+
-+#undef is_linetouched
-+NCURSES_BOOL is_linetouched(
-+		WINDOW	*win, 
-+		int	line)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef is_wintouched
-+NCURSES_BOOL is_wintouched(
-+		WINDOW	*win)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef wtouchln
-+int	wtouchln(
-+		WINDOW	*win, 
-+		int	y, 
-+		int	n, 
-+		int	changed)
-+		{ return(*(int *)0); }
-+
-+/* ./trace/lib_tracedmp.c */
-+
-+#undef _tracedump
-+void	_tracedump(
-+		const char *name, 
-+		WINDOW	*win)
-+		{ /* void */ }
-+
-+/* ./trace/lib_tracemse.c */
-+
-+#undef _nc_tracemouse
-+char	*_nc_tracemouse(
-+		SCREEN	*sp, 
-+		MEVENT const *ep)
-+		{ return(*(char **)0); }
-+
-+#undef _tracemouse
-+char	*_tracemouse(
-+		MEVENT const *ep)
-+		{ return(*(char **)0); }
-+
-+/* ./tty/lib_tstp.c */
-+
-+#include <SigAction.h>
-+
-+#undef _nc_signal_handler
-+void	_nc_signal_handler(
-+		NCURSES_BOOL enable)
-+		{ /* void */ }
-+
-+/* ./base/lib_ungetch.c */
-+
-+#undef _nc_fifo_dump
-+void	_nc_fifo_dump(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
-+#undef ungetch_sp
-+int	ungetch_sp(
-+		SCREEN	*sp, 
-+		int	ch)
-+		{ return(*(int *)0); }
-+
-+#undef ungetch
-+int	ungetch(
-+		int	ch)
-+		{ return(*(int *)0); }
-+
-+/* ./tty/lib_vidattr.c */
-+
-+#undef vidputs_sp
-+int	vidputs_sp(
-+		SCREEN	*sp, 
-+		chtype	newmode, 
-+		NCURSES_OUTC_sp outc)
-+		{ return(*(int *)0); }
-+
-+#undef vidputs
-+int	vidputs(
-+		chtype	newmode, 
-+		NCURSES_OUTC outc)
-+		{ return(*(int *)0); }
-+
-+#undef vidattr_sp
-+int	vidattr_sp(
-+		SCREEN	*sp, 
-+		chtype	newmode)
-+		{ return(*(int *)0); }
-+
-+#undef vidattr
-+int	vidattr(
-+		chtype	newmode)
-+		{ return(*(int *)0); }
-+
-+#undef termattrs_sp
-+chtype	termattrs_sp(
-+		SCREEN	*sp)
-+		{ return(*(chtype *)0); }
-+
-+#undef termattrs
-+chtype	termattrs(void)
-+		{ return(*(chtype *)0); }
-+
-+/* ./base/lib_vline.c */
-+
-+#undef wvline
-+int	wvline(
-+		WINDOW	*win, 
-+		chtype	ch, 
-+		int	n)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_wattroff.c */
-+
-+#undef wattr_off
-+int	wattr_off(
-+		WINDOW	*win, 
-+		attr_t	at, 
-+		void	*opts)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_wattron.c */
-+
-+#undef wattr_on
-+int	wattr_on(
-+		WINDOW	*win, 
-+		attr_t	at, 
-+		void	*opts)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_winch.c */
-+
-+#undef winch
-+chtype	winch(
-+		WINDOW	*win)
-+		{ return(*(chtype *)0); }
-+
-+/* ./base/lib_window.c */
-+
-+#undef _nc_synchook
-+void	_nc_synchook(
-+		WINDOW	*win)
-+		{ /* void */ }
-+
-+#undef mvderwin
-+int	mvderwin(
-+		WINDOW	*win, 
-+		int	y, 
-+		int	x)
-+		{ return(*(int *)0); }
-+
-+#undef syncok
-+int	syncok(
-+		WINDOW	*win, 
-+		NCURSES_BOOL bf)
-+		{ return(*(int *)0); }
-+
-+#undef wsyncup
-+void	wsyncup(
-+		WINDOW	*win)
-+		{ /* void */ }
-+
-+#undef wsyncdown
-+void	wsyncdown(
-+		WINDOW	*win)
-+		{ /* void */ }
-+
-+#undef wcursyncup
-+void	wcursyncup(
-+		WINDOW	*win)
-+		{ /* void */ }
-+
-+#undef dupwin
-+WINDOW	*dupwin(
-+		WINDOW	*win)
-+		{ return(*(WINDOW **)0); }
-+
-+/* ./base/nc_panel.c */
-+
-+#undef _nc_panelhook_sp
-+struct panelhook *_nc_panelhook_sp(
-+		SCREEN	*sp)
-+		{ return(*(struct panelhook **)0); }
-+
-+#undef _nc_panelhook
-+struct panelhook *_nc_panelhook(void)
-+		{ return(*(struct panelhook **)0); }
-+
-+/* ./base/safe_sprintf.c */
-+
-+#undef _nc_printf_string_sp
-+char	*_nc_printf_string_sp(
-+		SCREEN	*sp, 
-+		const char *fmt, 
-+		va_list	ap)
-+		{ return(*(char **)0); }
-+
-+#undef _nc_printf_string
-+char	*_nc_printf_string(
-+		const char *fmt, 
-+		va_list	ap)
-+		{ return(*(char **)0); }
-+
-+/* ./tty/tty_update.c */
-+
-+#include <sys/time.h>
-+#include <sys/times.h>
-+
-+#undef doupdate_sp
-+int	doupdate_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
-+#undef doupdate
-+int	doupdate(void)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_scrolln_sp
-+int	_nc_scrolln_sp(
-+		SCREEN	*sp, 
-+		int	n, 
-+		int	top, 
-+		int	bot, 
-+		int	maxy)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_scrolln
-+int	_nc_scrolln(
-+		int	n, 
-+		int	top, 
-+		int	bot, 
-+		int	maxy)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_screen_resume_sp
-+void	_nc_screen_resume_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
-+#undef _nc_screen_resume
-+void	_nc_screen_resume(void)
-+		{ /* void */ }
-+
-+#undef _nc_screen_init_sp
-+void	_nc_screen_init_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
-+#undef _nc_screen_init
-+void	_nc_screen_init(void)
-+		{ /* void */ }
-+
-+#undef _nc_screen_wrap_sp
-+void	_nc_screen_wrap_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
-+#undef _nc_screen_wrap
-+void	_nc_screen_wrap(void)
-+		{ /* void */ }
-+
-+#undef _nc_do_xmc_glitch_sp
-+void	_nc_do_xmc_glitch_sp(
-+		SCREEN	*sp, 
-+		attr_t	previous)
-+		{ /* void */ }
-+
-+#undef _nc_do_xmc_glitch
-+void	_nc_do_xmc_glitch(
-+		attr_t	previous)
-+		{ /* void */ }
-+
-+/* ./trace/varargs.c */
-+
-+typedef enum {
-+    atUnknown = 0, atInteger, atFloat, atPoint, atString
-+} ARGTYPE;
-+
-+#undef _nc_varargs
-+char	*_nc_varargs(
-+		const char *fmt, 
-+		va_list	ap)
-+		{ return(*(char **)0); }
-+
-+/* ./base/memmove.c */
-+
-+#undef _nc_memmove
-+void	_nc_memmove(void)
-+		{ /* void */ }
-+
-+/* ./base/vsscanf.c */
-+
-+#undef _nc_vsscanf
-+void	_nc_vsscanf(void)
-+		{ /* void */ }
-+
-+/* ./base/lib_freeall.c */
-+
-+#include <term_entry.h>
-+
-+#undef _nc_freeall
-+void	_nc_freeall(void)
-+		{ /* void */ }
-+
-+#undef _nc_free_and_exit_sp
-+void	_nc_free_and_exit_sp(
-+		SCREEN	*sp, 
-+		int	code)
-+		{ /* void */ }
-+
-+#undef _nc_free_and_exit
-+void	_nc_free_and_exit(
-+		int	code)
-+		{ /* void */ }
-+
-+/* ./widechar/charable.c */
-+
-+#undef _nc_is_charable
-+NCURSES_BOOL _nc_is_charable(
-+		wchar_t	ch)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef _nc_to_char
-+int	_nc_to_char(
-+		wint_t	ch)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_to_widechar
-+wint_t	_nc_to_widechar(
-+		int	ch)
-+		{ return(*(wint_t *)0); }
-+
-+/* ./widechar/lib_add_wch.c */
-+
-+#undef wadd_wch
-+int	wadd_wch(
-+		WINDOW	*win, 
-+		const cchar_t *wch)
-+		{ return(*(int *)0); }
-+
-+#undef wecho_wchar
-+int	wecho_wchar(
-+		WINDOW	*win, 
-+		const cchar_t *wch)
-+		{ return(*(int *)0); }
-+
-+/* ./widechar/lib_box_set.c */
-+
-+#undef wborder_set
-+int	wborder_set(
-+		WINDOW	*win, 
-+		const cchar_t *ls, 
-+		const cchar_t *rs, 
-+		const cchar_t *ts, 
-+		const cchar_t *bs, 
-+		const cchar_t *tl, 
-+		const cchar_t *tr, 
-+		const cchar_t *bl, 
-+		const cchar_t *br)
-+		{ return(*(int *)0); }
-+
-+/* ./widechar/lib_cchar.c */
-+
-+#undef setcchar
-+int	setcchar(
-+		cchar_t	*wcval, 
-+		const wchar_t *wch, 
-+		const attr_t attrs, 
-+		short	color_pair, 
-+		const void *opts)
-+		{ return(*(int *)0); }
-+
-+#undef getcchar
-+int	getcchar(
-+		const cchar_t *wcval, 
-+		wchar_t	*wch, 
-+		attr_t	*attrs, 
-+		short	*color_pair, 
-+		void	*opts)
-+		{ return(*(int *)0); }
-+
-+/* ./widechar/lib_erasewchar.c */
-+
-+#undef erasewchar
-+int	erasewchar(
-+		wchar_t	*wch)
-+		{ return(*(int *)0); }
-+
-+#undef killwchar
-+int	killwchar(
-+		wchar_t	*wch)
-+		{ return(*(int *)0); }
-+
-+/* ./widechar/lib_get_wch.c */
-+
-+#undef wget_wch
-+int	wget_wch(
-+		WINDOW	*win, 
-+		wint_t	*result)
-+		{ return(*(int *)0); }
-+
-+/* ./widechar/lib_get_wstr.c */
-+
-+#undef wgetn_wstr
-+int	wgetn_wstr(
-+		WINDOW	*win, 
-+		wint_t	*str, 
-+		int	maxlen)
-+		{ return(*(int *)0); }
-+
-+/* ./widechar/lib_hline_set.c */
-+
-+#undef whline_set
-+int	whline_set(
-+		WINDOW	*win, 
-+		const cchar_t *ch, 
-+		int	n)
-+		{ return(*(int *)0); }
-+
-+/* ./widechar/lib_in_wch.c */
-+
-+#undef win_wch
-+int	win_wch(
-+		WINDOW	*win, 
-+		cchar_t	*wcval)
-+		{ return(*(int *)0); }
-+
-+/* ./widechar/lib_in_wchnstr.c */
-+
-+#undef win_wchnstr
-+int	win_wchnstr(
-+		WINDOW	*win, 
-+		cchar_t	*wchstr, 
-+		int	n)
-+		{ return(*(int *)0); }
-+
-+/* ./widechar/lib_ins_wch.c */
-+
-+#undef wins_wch
-+int	wins_wch(
-+		WINDOW	*win, 
-+		const cchar_t *wch)
-+		{ return(*(int *)0); }
-+
-+#undef wins_nwstr
-+int	wins_nwstr(
-+		WINDOW	*win, 
-+		const wchar_t *wstr, 
-+		int	n)
-+		{ return(*(int *)0); }
-+
-+/* ./widechar/lib_inwstr.c */
-+
-+#undef winnwstr
-+int	winnwstr(
-+		WINDOW	*win, 
-+		wchar_t	*wstr, 
-+		int	n)
-+		{ return(*(int *)0); }
-+
-+#undef winwstr
-+int	winwstr(
-+		WINDOW	*win, 
-+		wchar_t	*wstr)
-+		{ return(*(int *)0); }
-+
-+/* ./widechar/lib_key_name.c */
-+
-+#undef key_name
-+char	*key_name(
-+		wchar_t	c)
-+		{ return(*(char **)0); }
-+
-+/* ./widechar/lib_pecho_wchar.c */
-+
-+#undef pecho_wchar
-+int	pecho_wchar(
-+		WINDOW	*pad, 
-+		const cchar_t *wch)
-+		{ return(*(int *)0); }
-+
-+/* ./widechar/lib_slk_wset.c */
-+
-+#undef slk_wset
-+int	slk_wset(
-+		int	i, 
-+		const wchar_t *astr, 
-+		int	format)
-+		{ return(*(int *)0); }
-+
-+/* ./widechar/lib_unget_wch.c */
-+
-+#undef _nc_wcrtomb
-+size_t	_nc_wcrtomb(
-+		char	*target, 
-+		wchar_t	source, 
-+		mbstate_t *state)
-+		{ return(*(size_t *)0); }
-+
-+#undef unget_wch_sp
-+int	unget_wch_sp(
-+		SCREEN	*sp, 
-+		const wchar_t wch)
-+		{ return(*(int *)0); }
-+
-+#undef unget_wch
-+int	unget_wch(
-+		const wchar_t wch)
-+		{ return(*(int *)0); }
-+
-+/* ./widechar/lib_vid_attr.c */
-+
-+#undef vid_puts_sp
-+int	vid_puts_sp(
-+		SCREEN	*sp, 
-+		attr_t	newmode, 
-+		short	pair, 
-+		void	*opts, 
-+		NCURSES_OUTC_sp outc)
-+		{ return(*(int *)0); }
-+
-+#undef vid_puts
-+int	vid_puts(
-+		attr_t	newmode, 
-+		short	pair, 
-+		void	*opts, 
-+		NCURSES_OUTC outc)
-+		{ return(*(int *)0); }
-+
-+#undef vid_attr_sp
-+int	vid_attr_sp(
-+		SCREEN	*sp, 
-+		attr_t	newmode, 
-+		short	pair, 
-+		void	*opts)
-+		{ return(*(int *)0); }
-+
-+#undef vid_attr
-+int	vid_attr(
-+		attr_t	newmode, 
-+		short	pair, 
-+		void	*opts)
-+		{ return(*(int *)0); }
-+
-+#undef term_attrs_sp
-+attr_t	term_attrs_sp(
-+		SCREEN	*sp)
-+		{ return(*(attr_t *)0); }
-+
-+#undef term_attrs
-+attr_t	term_attrs(void)
-+		{ return(*(attr_t *)0); }
-+
-+/* ./widechar/lib_vline_set.c */
-+
-+#undef wvline_set
-+int	wvline_set(
-+		WINDOW	*win, 
-+		const cchar_t *ch, 
-+		int	n)
-+		{ return(*(int *)0); }
-+
-+/* ./widechar/lib_wacs.c */
-+
-+#undef _nc_wacs
-+cchar_t	*_nc_wacs;
-+
-+#undef _nc_init_wacs
-+void	_nc_init_wacs(void)
-+		{ /* void */ }
-+
-+/* ./widechar/lib_wunctrl.c */
-+
-+#undef wunctrl_sp
-+wchar_t	*wunctrl_sp(
-+		SCREEN	*sp, 
-+		cchar_t	*wc)
-+		{ return(*(wchar_t **)0); }
-+
-+#undef wunctrl
-+wchar_t	*wunctrl(
-+		cchar_t	*wc)
-+		{ return(*(wchar_t **)0); }
-+
-+/* ./expanded.c */
-+
-+#undef _nc_toggle_attr_on
-+void	_nc_toggle_attr_on(
-+		attr_t	*S, 
-+		attr_t	at)
-+		{ /* void */ }
-+
-+#undef _nc_toggle_attr_off
-+void	_nc_toggle_attr_off(
-+		attr_t	*S, 
-+		attr_t	at)
-+		{ /* void */ }
-+
-+#undef _nc_DelCharCost_sp
-+int	_nc_DelCharCost_sp(
-+		SCREEN	*sp, 
-+		int	count)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_InsCharCost_sp
-+int	_nc_InsCharCost_sp(
-+		SCREEN	*sp, 
-+		int	count)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_UpdateAttrs_sp
-+void	_nc_UpdateAttrs_sp(
-+		SCREEN	*sp, 
-+		const cchar_t *c)
-+		{ /* void */ }
-+
-+#undef _nc_DelCharCost
-+int	_nc_DelCharCost(
-+		int	count)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_InsCharCost
-+int	_nc_InsCharCost(
-+		int	count)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_UpdateAttrs
-+void	_nc_UpdateAttrs(
-+		const cchar_t *c)
-+		{ /* void */ }
-+
-+/* ./base/legacy_coding.c */
-+
-+#undef use_legacy_coding_sp
-+int	use_legacy_coding_sp(
-+		SCREEN	*sp, 
-+		int	level)
-+		{ return(*(int *)0); }
-+
-+#undef use_legacy_coding
-+int	use_legacy_coding(
-+		int	level)
-+		{ return(*(int *)0); }
-+
-+/* ./base/lib_dft_fgbg.c */
-+
-+#undef use_default_colors_sp
-+int	use_default_colors_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
-+#undef use_default_colors
-+int	use_default_colors(void)
-+		{ return(*(int *)0); }
-+
-+#undef assume_default_colors_sp
-+int	assume_default_colors_sp(
-+		SCREEN	*sp, 
-+		int	fg, 
-+		int	bg)
-+		{ return(*(int *)0); }
-+
-+#undef assume_default_colors
-+int	assume_default_colors(
-+		int	fg, 
-+		int	bg)
-+		{ return(*(int *)0); }
-+
-+/* ./tinfo/lib_print.c */
-+
-+#undef mcprint_sp
-+int	mcprint_sp(
-+		SCREEN	*sp, 
-+		char	*data, 
-+		int	len)
-+		{ return(*(int *)0); }
-+
-+#undef mcprint
-+int	mcprint(
-+		char	*data, 
-+		int	len)
-+		{ return(*(int *)0); }
-+
-+/* ./base/resizeterm.c */
-+
-+#undef is_term_resized_sp
-+NCURSES_BOOL is_term_resized_sp(
-+		SCREEN	*sp, 
-+		int	ToLines, 
-+		int	ToCols)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef is_term_resized
-+NCURSES_BOOL is_term_resized(
-+		int	ToLines, 
-+		int	ToCols)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef resize_term_sp
-+int	resize_term_sp(
-+		SCREEN	*sp, 
-+		int	ToLines, 
-+		int	ToCols)
-+		{ return(*(int *)0); }
-+
-+#undef resize_term
-+int	resize_term(
-+		int	ToLines, 
-+		int	ToCols)
-+		{ return(*(int *)0); }
-+
-+#undef resizeterm_sp
-+int	resizeterm_sp(
-+		SCREEN	*sp, 
-+		int	ToLines, 
-+		int	ToCols)
-+		{ return(*(int *)0); }
-+
-+#undef resizeterm
-+int	resizeterm(
-+		int	ToLines, 
-+		int	ToCols)
-+		{ return(*(int *)0); }
-+
-+/* ./trace/trace_xnames.c */
-+
-+#undef _nc_trace_xnames
-+void	_nc_trace_xnames(
-+		TERMTYPE *tp)
-+		{ /* void */ }
-+
-+/* ./tinfo/use_screen.c */
-+
-+#undef use_screen
-+int	use_screen(
-+		SCREEN	*screen, 
-+		NCURSES_SCREEN_CB func, 
-+		void	*data)
-+		{ return(*(int *)0); }
-+
-+/* ./base/use_window.c */
-+
-+#undef use_window
-+int	use_window(
-+		WINDOW	*win, 
-+		NCURSES_WINDOW_CB func, 
-+		void	*data)
-+		{ return(*(int *)0); }
-+
-+/* ./base/wresize.c */
-+
-+#undef wresize
-+int	wresize(
-+		WINDOW	*win, 
-+		int	ToLines, 
-+		int	ToCols)
-+		{ return(*(int *)0); }
-+
-+/* ./tinfo/access.c */
-+
-+#include <sys/stat.h>
-+#include <nc_alloc.h>
-+
-+#undef _nc_rootname
-+char	*_nc_rootname(
-+		char	*path)
-+		{ return(*(char **)0); }
-+
-+#undef _nc_is_abs_path
-+NCURSES_BOOL _nc_is_abs_path(
-+		const char *path)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef _nc_pathlast
-+unsigned _nc_pathlast(
-+		const char *path)
-+		{ return(*(unsigned *)0); }
-+
-+#undef _nc_basename
-+char	*_nc_basename(
-+		char	*path)
-+		{ return(*(char **)0); }
-+
-+#undef _nc_access
-+int	_nc_access(
-+		const char *path, 
-+		int	mode)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_is_dir_path
-+NCURSES_BOOL _nc_is_dir_path(
-+		const char *path)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef _nc_is_file_path
-+NCURSES_BOOL _nc_is_file_path(
-+		const char *path)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef _nc_env_access
-+int	_nc_env_access(void)
-+		{ return(*(int *)0); }
-+
-+/* ./tinfo/add_tries.c */
-+
-+#undef _nc_add_to_try
-+int	_nc_add_to_try(
-+		TRIES	**tree, 
-+		const char *str, 
-+		unsigned code)
-+		{ return(*(int *)0); }
-+
-+/* ./tinfo/alloc_ttype.c */
-+
-+#undef _nc_align_termtype
-+void	_nc_align_termtype(
-+		TERMTYPE *to, 
-+		TERMTYPE *from)
-+		{ /* void */ }
-+
-+#undef _nc_copy_termtype
-+void	_nc_copy_termtype(
-+		TERMTYPE *dst, 
-+		TERMTYPE *src)
-+		{ /* void */ }
-+
-+/* ./codes.c */
-+
-+#undef _nc_boolcodes
-+char	*const *_nc_boolcodes(void)
-+		{ return(*(char **)0); }
-+
-+#undef _nc_numcodes
-+char	*const *_nc_numcodes(void)
-+		{ return(*(char **)0); }
-+
-+#undef _nc_strcodes
-+char	*const *_nc_strcodes(void)
-+		{ return(*(char **)0); }
-+
-+/* ./tinfo/comp_error.c */
-+
-+#undef _nc_suppress_warnings
-+NCURSES_BOOL _nc_suppress_warnings;
-+#undef _nc_curr_line
-+int	_nc_curr_line;
-+#undef _nc_curr_col
-+int	_nc_curr_col;
-+
-+#undef _nc_get_source
-+const char *_nc_get_source(void)
-+		{ return(*(const char **)0); }
-+
-+#undef _nc_set_source
-+void	_nc_set_source(
-+		const char *const name)
-+		{ /* void */ }
-+
-+#undef _nc_set_type
-+void	_nc_set_type(
-+		const char *const name)
-+		{ /* void */ }
-+
-+#undef _nc_get_type
-+void	_nc_get_type(
-+		char	*name)
-+		{ /* void */ }
-+
-+#undef _nc_warning
-+void	_nc_warning(
-+		const char *const fmt, 
-+		...)
-+		{ /* void */ }
-+
-+#undef _nc_err_abort
-+void	_nc_err_abort(
-+		const char *const fmt, 
-+		...)
-+		{ /* void */ }
-+
-+#undef _nc_syserr_abort
-+void	_nc_syserr_abort(
-+		const char *const fmt, 
-+		...)
-+		{ /* void */ }
-+
-+/* ./tinfo/db_iterator.c */
-+
-+#undef _nc_tic_dir
-+const char *_nc_tic_dir(
-+		const char *path)
-+		{ return(*(const char **)0); }
-+
-+#undef _nc_keep_tic_dir
-+void	_nc_keep_tic_dir(
-+		const char *path)
-+		{ /* void */ }
-+
-+#undef _nc_last_db
-+void	_nc_last_db(void)
-+		{ /* void */ }
-+
-+#undef _nc_next_db
-+const char *_nc_next_db(
-+		DBDIRS	*state, 
-+		int	*offset)
-+		{ return(*(const char **)0); }
-+
-+#undef _nc_first_db
-+void	_nc_first_db(
-+		DBDIRS	*state, 
-+		int	*offset)
-+		{ /* void */ }
-+
-+/* ./tinfo/doalloc.c */
-+
-+#undef _nc_doalloc
-+void	*_nc_doalloc(
-+		void	*oldp, 
-+		size_t	amount)
-+		{ return(*(void **)0); }
-+
-+/* ./tinfo/entries.c */
-+
-+#undef _nc_head
-+ENTRY	*_nc_head;
-+#undef _nc_tail
-+ENTRY	*_nc_tail;
-+
-+#undef _nc_free_entry
-+void	_nc_free_entry(
-+		ENTRY	*headp, 
-+		TERMTYPE *tterm)
-+		{ /* void */ }
-+
-+#undef _nc_free_entries
-+void	_nc_free_entries(
-+		ENTRY	*headp)
-+		{ /* void */ }
-+
-+#undef _nc_delink_entry
-+ENTRY	*_nc_delink_entry(
-+		ENTRY	*headp, 
-+		TERMTYPE *tterm)
-+		{ return(*(ENTRY **)0); }
-+
-+#undef _nc_leaks_tinfo
-+void	_nc_leaks_tinfo(void)
-+		{ /* void */ }
-+
-+/* ./fallback.c */
-+
-+#undef _nc_fallback
-+const TERMTYPE *_nc_fallback(
-+		const char *name)
-+		{ return(*(const TERMTYPE **)0); }
-+
-+/* ./tinfo/free_ttype.c */
-+
-+#undef _nc_free_termtype
-+void	_nc_free_termtype(
-+		TERMTYPE *ptr)
-+		{ /* void */ }
-+
-+#undef _nc_user_definable
-+NCURSES_BOOL _nc_user_definable;
-+
-+#undef use_extended_names
-+int	use_extended_names(
-+		NCURSES_BOOL flag)
-+		{ return(*(int *)0); }
-+
-+/* ./tinfo/getenv_num.c */
-+
-+#undef _nc_getenv_num
-+int	_nc_getenv_num(
-+		const char *name)
-+		{ return(*(int *)0); }
-+
-+/* ./tinfo/home_terminfo.c */
-+
-+#undef _nc_home_terminfo
-+char	*_nc_home_terminfo(void)
-+		{ return(*(char **)0); }
-+
-+/* ./tinfo/init_keytry.c */
-+
-+#if 0
-+
-+#include <init_keytry.h>
-+
-+#undef _nc_tinfo_fkeys
-+const struct tinfo_fkeys _nc_tinfo_fkeys[] = {0};
-+
-+#endif
-+
-+#undef _nc_init_keytry
-+void	_nc_init_keytry(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
-+/* ./tinfo/lib_acs.c */
-+
-+#undef _nc_acs_map
-+chtype	*_nc_acs_map(void)
-+		{ return(*(chtype **)0); }
-+
-+#undef _nc_init_acs_sp
-+void	_nc_init_acs_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
-+#undef _nc_init_acs
-+void	_nc_init_acs(void)
-+		{ /* void */ }
-+
-+/* ./tinfo/lib_baudrate.c */
-+
-+#include <termcap.h>
-+
-+struct speed {
-+    int s; 
-+    int sp; 
-+};
-+
-+#undef _nc_baudrate
-+int	_nc_baudrate(
-+		int	OSpeed)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_ospeed
-+int	_nc_ospeed(
-+		int	BaudRate)
-+		{ return(*(int *)0); }
-+
-+#undef baudrate_sp
-+int	baudrate_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
-+#undef baudrate
-+int	baudrate(void)
-+		{ return(*(int *)0); }
-+
-+/* ./tinfo/lib_cur_term.c */
-+
-+#undef _nc_cur_term
-+TERMINAL *_nc_cur_term(void)
-+		{ return(*(TERMINAL **)0); }
-+
-+#undef set_curterm
-+TERMINAL *set_curterm(
-+		TERMINAL *termp)
-+		{ return(*(TERMINAL **)0); }
-+
-+#undef del_curterm_sp
-+int	del_curterm_sp(
-+		SCREEN	*sp, 
-+		TERMINAL *termp)
-+		{ return(*(int *)0); }
-+
-+#undef del_curterm
-+int	del_curterm(
-+		TERMINAL *termp)
-+		{ return(*(int *)0); }
-+
-+/* ./tinfo/lib_data.c */
-+
-+#undef _nc_stdscr
-+WINDOW	*_nc_stdscr(void)
-+		{ return(*(WINDOW **)0); }
-+
-+#undef _nc_curscr
-+WINDOW	*_nc_curscr(void)
-+		{ return(*(WINDOW **)0); }
-+
-+#undef _nc_newscr
-+WINDOW	*_nc_newscr(void)
-+		{ return(*(WINDOW **)0); }
-+
-+#undef _nc_screen_chain
-+SCREEN	*_nc_screen_chain;
-+#undef SP
-+SCREEN	*SP;
-+#undef _nc_globals
-+NCURSES_GLOBALS _nc_globals;
-+#undef _nc_prescreen
-+NCURSES_PRESCREEN _nc_prescreen;
-+
-+#undef _nc_screen_of
-+SCREEN	*_nc_screen_of(
-+		WINDOW	*win)
-+		{ return(*(SCREEN **)0); }
-+
-+#undef _nc_init_pthreads
-+void	_nc_init_pthreads(void)
-+		{ /* void */ }
-+
-+#undef _nc_mutex_init
-+void	_nc_mutex_init(
-+		pthread_mutex_t *obj)
-+		{ /* void */ }
-+
-+#undef _nc_mutex_lock
-+int	_nc_mutex_lock(
-+		pthread_mutex_t *obj)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_mutex_trylock
-+int	_nc_mutex_trylock(
-+		pthread_mutex_t *obj)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_mutex_unlock
-+int	_nc_mutex_unlock(
-+		pthread_mutex_t *obj)
-+		{ return(*(int *)0); }
-+
-+/* ./tinfo/lib_has_cap.c */
-+
-+#undef has_ic_sp
-+NCURSES_BOOL has_ic_sp(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef has_ic
-+NCURSES_BOOL has_ic(void)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef has_il_sp
-+NCURSES_BOOL has_il_sp(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef has_il
-+NCURSES_BOOL has_il(void)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+/* ./tinfo/lib_kernel.c */
-+
-+#undef erasechar_sp
-+char	erasechar_sp(
-+		SCREEN	*sp)
-+		{ return(*(char *)0); }
-+
-+#undef erasechar
-+char	erasechar(void)
-+		{ return(*(char *)0); }
-+
-+#undef killchar_sp
-+char	killchar_sp(
-+		SCREEN	*sp)
-+		{ return(*(char *)0); }
-+
-+#undef killchar
-+char	killchar(void)
-+		{ return(*(char *)0); }
-+
-+#undef flushinp_sp
-+int	flushinp_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
-+#undef flushinp
-+int	flushinp(void)
-+		{ return(*(int *)0); }
-+
-+/* ./lib_keyname.c */
-+
-+struct kn { short offset; int code; };
-+
-+#undef keyname_sp
-+char	*keyname_sp(
-+		SCREEN	*sp, 
-+		int	c)
-+		{ return(*(char **)0); }
-+
-+#undef keyname
-+char	*keyname(
-+		int	c)
-+		{ return(*(char **)0); }
-+
-+/* ./tinfo/lib_longname.c */
-+
-+#undef longname_sp
-+char	*longname_sp(
-+		SCREEN	*sp)
-+		{ return(*(char **)0); }
-+
-+#undef longname
-+char	*longname(void)
-+		{ return(*(char **)0); }
-+
-+/* ./tinfo/lib_napms.c */
-+
-+#undef napms_sp
-+int	napms_sp(
-+		SCREEN	*sp, 
-+		int	ms)
-+		{ return(*(int *)0); }
-+
-+#undef napms
-+int	napms(
-+		int	ms)
-+		{ return(*(int *)0); }
-+
-+/* ./tinfo/lib_options.c */
-+
-+#undef idlok
-+int	idlok(
-+		WINDOW	*win, 
-+		NCURSES_BOOL flag)
-+		{ return(*(int *)0); }
-+
-+#undef idcok
-+void	idcok(
-+		WINDOW	*win, 
-+		NCURSES_BOOL flag)
-+		{ /* void */ }
-+
-+#undef halfdelay_sp
-+int	halfdelay_sp(
-+		SCREEN	*sp, 
-+		int	t)
-+		{ return(*(int *)0); }
-+
-+#undef halfdelay
-+int	halfdelay(
-+		int	t)
-+		{ return(*(int *)0); }
-+
-+#undef nodelay
-+int	nodelay(
-+		WINDOW	*win, 
-+		NCURSES_BOOL flag)
-+		{ return(*(int *)0); }
-+
-+#undef notimeout
-+int	notimeout(
-+		WINDOW	*win, 
-+		NCURSES_BOOL f)
-+		{ return(*(int *)0); }
-+
-+#undef wtimeout
-+void	wtimeout(
-+		WINDOW	*win, 
-+		int	delay)
-+		{ /* void */ }
-+
-+#undef keypad
-+int	keypad(
-+		WINDOW	*win, 
-+		NCURSES_BOOL flag)
-+		{ return(*(int *)0); }
-+
-+#undef meta
-+int	meta(
-+		WINDOW	*win, 
-+		NCURSES_BOOL flag)
-+		{ return(*(int *)0); }
-+
-+#undef curs_set_sp
-+int	curs_set_sp(
-+		SCREEN	*sp, 
-+		int	vis)
-+		{ return(*(int *)0); }
-+
-+#undef curs_set
-+int	curs_set(
-+		int	vis)
-+		{ return(*(int *)0); }
-+
-+#undef typeahead_sp
-+int	typeahead_sp(
-+		SCREEN	*sp, 
-+		int	fd)
-+		{ return(*(int *)0); }
-+
-+#undef typeahead
-+int	typeahead(
-+		int	fd)
-+		{ return(*(int *)0); }
-+
-+#undef has_key_sp
-+int	has_key_sp(
-+		SCREEN	*sp, 
-+		int	keycode)
-+		{ return(*(int *)0); }
-+
-+#undef has_key
-+int	has_key(
-+		int	keycode)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_putp_flush_sp
-+int	_nc_putp_flush_sp(
-+		SCREEN	*sp, 
-+		const char *name, 
-+		const char *value)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_putp_flush
-+int	_nc_putp_flush(
-+		const char *name, 
-+		const char *value)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_keypad
-+int	_nc_keypad(
-+		SCREEN	*sp, 
-+		NCURSES_BOOL flag)
-+		{ return(*(int *)0); }
-+
-+/* ./tinfo/lib_raw.c */
-+
-+#undef raw_sp
-+int	raw_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
-+#undef raw
-+int	raw(void)
-+		{ return(*(int *)0); }
-+
-+#undef cbreak_sp
-+int	cbreak_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
-+#undef cbreak
-+int	cbreak(void)
-+		{ return(*(int *)0); }
-+
-+#undef qiflush_sp
-+void	qiflush_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
-+#undef qiflush
-+void	qiflush(void)
-+		{ /* void */ }
-+
-+#undef noraw_sp
-+int	noraw_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
-+#undef noraw
-+int	noraw(void)
-+		{ return(*(int *)0); }
-+
-+#undef nocbreak_sp
-+int	nocbreak_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
-+#undef nocbreak
-+int	nocbreak(void)
-+		{ return(*(int *)0); }
-+
-+#undef noqiflush_sp
-+void	noqiflush_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
-+#undef noqiflush
-+void	noqiflush(void)
-+		{ /* void */ }
-+
-+#undef intrflush_sp
-+int	intrflush_sp(
-+		SCREEN	*sp, 
-+		WINDOW	*win, 
-+		NCURSES_BOOL flag)
-+		{ return(*(int *)0); }
-+
-+#undef intrflush
-+int	intrflush(
-+		WINDOW	*win, 
-+		NCURSES_BOOL flag)
-+		{ return(*(int *)0); }
-+
-+/* ./tinfo/lib_setup.c */
-+
-+#include <locale.h>
-+#include <sys/ioctl.h>
-+#include <langinfo.h>
-+
-+#undef _nc_ttytype
-+char	*_nc_ttytype(void)
-+		{ return(*(char **)0); }
-+
-+#undef _nc_ptr_Lines
-+int	*_nc_ptr_Lines(
-+		SCREEN	*sp)
-+		{ return(*(int **)0); }
-+
-+#undef _nc_LINES
-+int	_nc_LINES(void)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_ptr_Cols
-+int	*_nc_ptr_Cols(
-+		SCREEN	*sp)
-+		{ return(*(int **)0); }
-+
-+#undef _nc_COLS
-+int	_nc_COLS(void)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_ptr_Tabsize
-+int	*_nc_ptr_Tabsize(
-+		SCREEN	*sp)
-+		{ return(*(int **)0); }
-+
-+#undef _nc_TABSIZE
-+int	_nc_TABSIZE(void)
-+		{ return(*(int *)0); }
-+
-+#undef set_tabsize_sp
-+int	set_tabsize_sp(
-+		SCREEN	*sp, 
-+		int	value)
-+		{ return(*(int *)0); }
-+
-+#undef set_tabsize
-+int	set_tabsize(
-+		int	value)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_handle_sigwinch
-+int	_nc_handle_sigwinch(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
-+#undef use_env_sp
-+void	use_env_sp(
-+		SCREEN	*sp, 
-+		NCURSES_BOOL f)
-+		{ /* void */ }
-+
-+#undef use_env
-+void	use_env(
-+		NCURSES_BOOL f)
-+		{ /* void */ }
-+
-+#undef _nc_get_screensize
-+void	_nc_get_screensize(
-+		SCREEN	*sp, 
-+		int	*linep, 
-+		int	*colp)
-+		{ /* void */ }
-+
-+#undef _nc_update_screensize
-+void	_nc_update_screensize(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
-+#undef _nc_get_locale
-+char	*_nc_get_locale(void)
-+		{ return(*(char **)0); }
-+
-+#undef _nc_unicode_locale
-+int	_nc_unicode_locale(void)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_locale_breaks_acs
-+int	_nc_locale_breaks_acs(
-+		TERMINAL *termp)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_setupterm
-+int	_nc_setupterm(
-+		char	*tname, 
-+		int	Filedes, 
-+		int	*errret, 
-+		NCURSES_BOOL reuse)
-+		{ return(*(int *)0); }
-+
-+#undef setupterm
-+int	setupterm(
-+		char	*tname, 
-+		int	Filedes, 
-+		int	*errret)
-+		{ return(*(int *)0); }
-+
-+/* ./tinfo/lib_termcap.c */
-+
-+#undef UP
-+char	*UP;
-+#undef BC
-+char	*BC;
-+
-+#undef tgetent_sp
-+int	tgetent_sp(
-+		SCREEN	*sp, 
-+		char	*bufp, 
-+		const char *name)
-+		{ return(*(int *)0); }
-+
-+#if 0
-+
-+#include <capdefaults.c>
-+
-+#endif
-+
-+#undef tgetent
-+int	tgetent(
-+		char	*bufp, 
-+		const char *name)
-+		{ return(*(int *)0); }
-+
-+#undef tgetflag_sp
-+int	tgetflag_sp(
-+		SCREEN	*sp, 
-+		char	*id)
-+		{ return(*(int *)0); }
-+
-+#undef tgetflag
-+int	tgetflag(
-+		char	*id)
-+		{ return(*(int *)0); }
-+
-+#undef tgetnum_sp
-+int	tgetnum_sp(
-+		SCREEN	*sp, 
-+		char	*id)
-+		{ return(*(int *)0); }
-+
-+#undef tgetnum
-+int	tgetnum(
-+		char	*id)
-+		{ return(*(int *)0); }
-+
-+#undef tgetstr_sp
-+char	*tgetstr_sp(
-+		SCREEN	*sp, 
-+		char	*id, 
-+		char	**area)
-+		{ return(*(char **)0); }
-+
-+#undef tgetstr
-+char	*tgetstr(
-+		char	*id, 
-+		char	**area)
-+		{ return(*(char **)0); }
-+
-+/* ./tinfo/lib_termname.c */
-+
-+#undef termname_sp
-+char	*termname_sp(
-+		SCREEN	*sp)
-+		{ return(*(char **)0); }
-+
-+#undef termname
-+char	*termname(void)
-+		{ return(*(char **)0); }
-+
-+/* ./tinfo/lib_tgoto.c */
-+
-+#undef tgoto
-+char	*tgoto(
-+		const char *string, 
-+		int	x, 
-+		int	y)
-+		{ return(*(char **)0); }
-+
-+/* ./tinfo/lib_ti.c */
-+
-+#undef tigetflag_sp
-+int	tigetflag_sp(
-+		SCREEN	*sp, 
-+		char	*str)
-+		{ return(*(int *)0); }
-+
-+#undef tigetflag
-+int	tigetflag(
-+		char	*str)
-+		{ return(*(int *)0); }
-+
-+#undef tigetnum_sp
-+int	tigetnum_sp(
-+		SCREEN	*sp, 
-+		char	*str)
-+		{ return(*(int *)0); }
-+
-+#undef tigetnum
-+int	tigetnum(
-+		char	*str)
-+		{ return(*(int *)0); }
-+
-+#undef tigetstr_sp
-+char	*tigetstr_sp(
-+		SCREEN	*sp, 
-+		char	*str)
-+		{ return(*(char **)0); }
-+
-+#undef tigetstr
-+char	*tigetstr(
-+		char	*str)
-+		{ return(*(char **)0); }
-+
-+/* ./tinfo/lib_tparm.c */
-+
-+#undef _nc_tparm_err
-+int	_nc_tparm_err;
-+
-+#undef _nc_tparm_analyze
-+int	_nc_tparm_analyze(
-+		const char *string, 
-+		char	*p_is_s[9], 
-+		int	*popcount)
-+		{ return(*(int *)0); }
-+
-+#undef tparm
-+char	*tparm(
-+		char	*string, 
-+		...)
-+		{ return(*(char **)0); }
-+
-+/* ./tinfo/lib_tputs.c */
-+
-+#undef PC
-+char	PC;
-+#undef ospeed
-+NCURSES_OSPEED	ospeed;
-+#undef _nc_nulls_sent
-+int	_nc_nulls_sent;
-+
-+#undef _nc_set_no_padding
-+void	_nc_set_no_padding(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
-+#undef delay_output_sp
-+int	delay_output_sp(
-+		SCREEN	*sp, 
-+		int	ms)
-+		{ return(*(int *)0); }
-+
-+#undef delay_output
-+int	delay_output(
-+		int	ms)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_flush_sp
-+void	_nc_flush_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
-+#undef _nc_flush
-+void	_nc_flush(void)
-+		{ /* void */ }
-+
-+#undef _nc_outch_sp
-+int	_nc_outch_sp(
-+		SCREEN	*sp, 
-+		int	ch)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_outch
-+int	_nc_outch(
-+		int	ch)
-+		{ return(*(int *)0); }
-+
-+#undef putp_sp
-+int	putp_sp(
-+		SCREEN	*sp, 
-+		const char *string)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_putp_sp
-+int	_nc_putp_sp(
-+		SCREEN	*sp, 
-+		const char *name, 
-+		const char *string)
-+		{ return(*(int *)0); }
-+
-+#undef putp
-+int	putp(
-+		const char *string)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_putp
-+int	_nc_putp(
-+		const char *name, 
-+		const char *string)
-+		{ return(*(int *)0); }
-+
-+#undef tputs_sp
-+int	tputs_sp(
-+		SCREEN	*sp, 
-+		const char *string, 
-+		int	affcnt, 
-+		NCURSES_OUTC_sp outc)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_outc_wrapper
-+int	_nc_outc_wrapper(
-+		SCREEN	*sp, 
-+		int	c)
-+		{ return(*(int *)0); }
-+
-+#undef tputs
-+int	tputs(
-+		const char *string, 
-+		int	affcnt, 
-+		int	(*outc)(
-+		int	p1))
-+		{ return(*(int *)0); }
-+
-+/* ./trace/lib_trace.c */
-+
-+#undef _nc_tracing
-+unsigned _nc_tracing;
-+
-+#undef _nc__nc_tputs_trace
-+const char *_nc__nc_tputs_trace(void)
-+		{ return(*(const char **)0); }
-+
-+#undef _nc__nc_outchars
-+long	_nc__nc_outchars(void)
-+		{ return(*(long *)0); }
-+
-+#undef _nc_set_tputs_trace
-+void	_nc_set_tputs_trace(
-+		const char *s)
-+		{ /* void */ }
-+
-+#undef _nc_count_outchars
-+void	_nc_count_outchars(
-+		long	increment)
-+		{ /* void */ }
-+
-+#undef trace
-+void	trace(
-+		const unsigned int tracelevel)
-+		{ /* void */ }
-+
-+#undef _tracef
-+void	_tracef(
-+		const char *fmt, 
-+		...)
-+		{ /* void */ }
-+
-+#undef _nc_retrace_bool
-+NCURSES_BOOL _nc_retrace_bool(
-+		NCURSES_BOOL code)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef _nc_retrace_int
-+int	_nc_retrace_int(
-+		int	code)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_retrace_unsigned
-+unsigned _nc_retrace_unsigned(
-+		unsigned code)
-+		{ return(*(unsigned *)0); }
-+
-+#undef _nc_retrace_ptr
-+char	*_nc_retrace_ptr(
-+		char	*code)
-+		{ return(*(char **)0); }
-+
-+#undef _nc_retrace_cptr
-+const char *_nc_retrace_cptr(
-+		const char *code)
-+		{ return(*(const char **)0); }
-+
-+#undef _nc_retrace_cvoid_ptr
-+void	*_nc_retrace_cvoid_ptr(
-+		void	*code)
-+		{ return(*(void **)0); }
-+
-+#undef _nc_retrace_void_ptr
-+void	*_nc_retrace_void_ptr(
-+		void	*code)
-+		{ return(*(void **)0); }
-+
-+#undef _nc_retrace_sp
-+SCREEN	*_nc_retrace_sp(
-+		SCREEN	*code)
-+		{ return(*(SCREEN **)0); }
-+
-+#undef _nc_retrace_win
-+WINDOW	*_nc_retrace_win(
-+		WINDOW	*code)
-+		{ return(*(WINDOW **)0); }
-+
-+#undef _nc_use_tracef
-+int	_nc_use_tracef(
-+		unsigned mask)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_locked_tracef
-+void	_nc_locked_tracef(
-+		const char *fmt, 
-+		...)
-+		{ /* void */ }
-+
-+/* ./trace/lib_traceatr.c */
-+
-+#undef _traceattr2
-+char	*_traceattr2(
-+		int	bufnum, 
-+		chtype	newmode)
-+		{ return(*(char **)0); }
-+
-+#undef _traceattr
-+char	*_traceattr(
-+		attr_t	newmode)
-+		{ return(*(char **)0); }
-+
-+#undef _nc_retrace_attr_t
-+attr_t	_nc_retrace_attr_t(
-+		attr_t	code)
-+		{ return(*(attr_t *)0); }
-+
-+#undef _nc_altcharset_name
-+const char *_nc_altcharset_name(
-+		attr_t	attr, 
-+		chtype	ch)
-+		{ return(*(const char **)0); }
-+
-+#undef _tracechtype2
-+char	*_tracechtype2(
-+		int	bufnum, 
-+		chtype	ch)
-+		{ return(*(char **)0); }
-+
-+#undef _tracechtype
-+char	*_tracechtype(
-+		chtype	ch)
-+		{ return(*(char **)0); }
-+
-+#undef _nc_retrace_chtype
-+chtype	_nc_retrace_chtype(
-+		chtype	code)
-+		{ return(*(chtype *)0); }
-+
-+#undef _tracecchar_t2
-+char	*_tracecchar_t2(
-+		int	bufnum, 
-+		const cchar_t *ch)
-+		{ return(*(char **)0); }
-+
-+#undef _tracecchar_t
-+char	*_tracecchar_t(
-+		const cchar_t *ch)
-+		{ return(*(char **)0); }
-+
-+/* ./trace/lib_tracebits.c */
-+
-+typedef struct {
-+    unsigned int val;
-+    const char *name;
-+} BITNAMES;
-+
-+#undef _nc_trace_ttymode
-+char	*_nc_trace_ttymode(
-+		struct termios *tty)
-+		{ return(*(char **)0); }
-+
-+#undef _nc_tracebits
-+char	*_nc_tracebits(void)
-+		{ return(*(char **)0); }
-+
-+/* ./trace/lib_tracechr.c */
-+
-+#undef _nc_tracechar
-+char	*_nc_tracechar(
-+		SCREEN	*sp, 
-+		int	ch)
-+		{ return(*(char **)0); }
-+
-+#undef _tracechar
-+char	*_tracechar(
-+		int	ch)
-+		{ return(*(char **)0); }
-+
-+/* ./tinfo/lib_ttyflags.c */
-+
-+#undef _nc_get_tty_mode_sp
-+int	_nc_get_tty_mode_sp(
-+		SCREEN	*sp, 
-+		struct termios *buf)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_get_tty_mode
-+int	_nc_get_tty_mode(
-+		struct termios *buf)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_set_tty_mode_sp
-+int	_nc_set_tty_mode_sp(
-+		SCREEN	*sp, 
-+		struct termios *buf)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_set_tty_mode
-+int	_nc_set_tty_mode(
-+		struct termios *buf)
-+		{ return(*(int *)0); }
-+
-+#undef def_shell_mode_sp
-+int	def_shell_mode_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
-+#undef def_shell_mode
-+int	def_shell_mode(void)
-+		{ return(*(int *)0); }
-+
-+#undef def_prog_mode_sp
-+int	def_prog_mode_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
-+#undef def_prog_mode
-+int	def_prog_mode(void)
-+		{ return(*(int *)0); }
-+
-+#undef reset_prog_mode_sp
-+int	reset_prog_mode_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
-+#undef reset_prog_mode
-+int	reset_prog_mode(void)
-+		{ return(*(int *)0); }
-+
-+#undef reset_shell_mode_sp
-+int	reset_shell_mode_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
-+#undef reset_shell_mode
-+int	reset_shell_mode(void)
-+		{ return(*(int *)0); }
-+
-+#undef savetty_sp
-+int	savetty_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
-+#undef savetty
-+int	savetty(void)
-+		{ return(*(int *)0); }
-+
-+#undef resetty_sp
-+int	resetty_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
-+#undef resetty
-+int	resetty(void)
-+		{ return(*(int *)0); }
-+
-+/* ./tty/lib_twait.c */
-+
-+#undef _nc_timed_wait
-+int	_nc_timed_wait(
-+		SCREEN	*sp, 
-+		int	mode, 
-+		int	milliseconds, 
-+		int	*timeleft)
-+		{ return(*(int *)0); }
-+
-+/* ./tinfo/name_match.c */
-+
-+#undef _nc_first_name
-+char	*_nc_first_name(
-+		const char *const sp)
-+		{ return(*(char **)0); }
-+
-+#undef _nc_name_match
-+int	_nc_name_match(
-+		const char *const namelst, 
-+		const char *const name, 
-+		const char *const delim)
-+		{ return(*(int *)0); }
-+
-+/* ./names.c */
-+
-+#undef _nc_boolnames
-+char	*const *_nc_boolnames(void)
-+		{ return(*(char **)0); }
-+
-+#undef _nc_boolfnames
-+char	*const *_nc_boolfnames(void)
-+		{ return(*(char **)0); }
-+
-+#undef _nc_numnames
-+char	*const *_nc_numnames(void)
-+		{ return(*(char **)0); }
-+
-+#undef _nc_numfnames
-+char	*const *_nc_numfnames(void)
-+		{ return(*(char **)0); }
-+
-+#undef _nc_strnames
-+char	*const *_nc_strnames(void)
-+		{ return(*(char **)0); }
-+
-+#undef _nc_strfnames
-+char	*const *_nc_strfnames(void)
-+		{ return(*(char **)0); }
-+
-+/* ./tinfo/read_entry.c */
-+
-+#include <hashed_db.h>
-+
-+#undef _nc_read_termtype
-+int	_nc_read_termtype(
-+		TERMTYPE *ptr, 
-+		char	*buffer, 
-+		int	limit)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_read_file_entry
-+int	_nc_read_file_entry(
-+		const char *const filename, 
-+		TERMTYPE *ptr)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_read_entry
-+int	_nc_read_entry(
-+		const char *const name, 
-+		char	*const filename, 
-+		TERMTYPE *const tp)
-+		{ return(*(int *)0); }
-+
-+/* ./tinfo/read_termcap.c */
-+
-+#include <sys/types.h>
-+
-+#undef _nc_read_termcap_entry
-+int	_nc_read_termcap_entry(
-+		const char *const tn, 
-+		TERMTYPE *const tp)
-+		{ return(*(int *)0); }
-+
-+/* ./tinfo/setbuf.c */
-+
-+#undef _nc_set_buffer_sp
-+void	_nc_set_buffer_sp(
-+		SCREEN	*sp, 
-+		FILE	*ofp, 
-+		NCURSES_BOOL buffered)
-+		{ /* void */ }
-+
-+#undef _nc_set_buffer
-+void	_nc_set_buffer(
-+		FILE	*ofp, 
-+		NCURSES_BOOL buffered)
-+		{ /* void */ }
-+
-+/* ./tinfo/strings.c */
-+
-+#undef _nc_str_init
-+string_desc *_nc_str_init(
-+		string_desc *dst, 
-+		char	*src, 
-+		size_t	len)
-+		{ return(*(string_desc **)0); }
-+
-+#undef _nc_str_null
-+string_desc *_nc_str_null(
-+		string_desc *dst, 
-+		size_t	len)
-+		{ return(*(string_desc **)0); }
-+
-+#undef _nc_str_copy
-+string_desc *_nc_str_copy(
-+		string_desc *dst, 
-+		string_desc *src)
-+		{ return(*(string_desc **)0); }
-+
-+#undef _nc_safe_strcat
-+NCURSES_BOOL _nc_safe_strcat(
-+		string_desc *dst, 
-+		const char *src)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef _nc_safe_strcpy
-+NCURSES_BOOL _nc_safe_strcpy(
-+		string_desc *dst, 
-+		const char *src)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+/* ./trace/trace_buf.c */
-+
-+#undef _nc_trace_buf
-+char	*_nc_trace_buf(
-+		int	bufnum, 
-+		size_t	want)
-+		{ return(*(char **)0); }
-+
-+#undef _nc_trace_bufcat
-+char	*_nc_trace_bufcat(
-+		int	bufnum, 
-+		const char *value)
-+		{ return(*(char **)0); }
-+
-+/* ./trace/trace_tries.c */
-+
-+#undef _nc_trace_tries
-+void	_nc_trace_tries(
-+		TRIES	*tree)
-+		{ /* void */ }
-+
-+/* ./base/tries.c */
-+
-+#undef _nc_expand_try
-+char	*_nc_expand_try(
-+		TRIES	*tree, 
-+		unsigned code, 
-+		int	*count, 
-+		size_t	len)
-+		{ return(*(char **)0); }
-+
-+#undef _nc_remove_key
-+int	_nc_remove_key(
-+		TRIES	**tree, 
-+		unsigned code)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_remove_string
-+int	_nc_remove_string(
-+		TRIES	**tree, 
-+		const char *string)
-+		{ return(*(int *)0); }
-+
-+/* ./tinfo/trim_sgr0.c */
-+
-+#undef _nc_trim_sgr0
-+char	*_nc_trim_sgr0(
-+		TERMTYPE *tp)
-+		{ return(*(char **)0); }
-+
-+/* ./unctrl.c */
-+
-+#undef unctrl_sp
-+char	*unctrl_sp(
-+		SCREEN	*sp, 
-+		chtype	ch)
-+		{ return(*(char **)0); }
-+
-+#undef unctrl
-+char	*unctrl(
-+		chtype	ch)
-+		{ return(*(char **)0); }
-+
-+/* ./trace/visbuf.c */
-+
-+#undef _nc_visbuf2
-+const char *_nc_visbuf2(
-+		int	bufnum, 
-+		const char *buf)
-+		{ return(*(const char **)0); }
-+
-+#undef _nc_visbuf
-+const char *_nc_visbuf(
-+		const char *buf)
-+		{ return(*(const char **)0); }
-+
-+#undef _nc_visbufn
-+const char *_nc_visbufn(
-+		const char *buf, 
-+		int	len)
-+		{ return(*(const char **)0); }
-+
-+#undef _nc_viswbuf2
-+const char *_nc_viswbuf2(
-+		int	bufnum, 
-+		const wchar_t *buf)
-+		{ return(*(const char **)0); }
-+
-+#undef _nc_viswbuf
-+const char *_nc_viswbuf(
-+		const wchar_t *buf)
-+		{ return(*(const char **)0); }
-+
-+#undef _nc_viswbufn
-+const char *_nc_viswbufn(
-+		const wchar_t *buf, 
-+		int	len)
-+		{ return(*(const char **)0); }
-+
-+#undef _nc_viswibuf
-+const char *_nc_viswibuf(
-+		const wint_t *buf)
-+		{ return(*(const char **)0); }
-+
-+#undef _nc_viscbuf2
-+const char *_nc_viscbuf2(
-+		int	bufnum, 
-+		const cchar_t *buf, 
-+		int	len)
-+		{ return(*(const char **)0); }
-+
-+#undef _nc_viscbuf
-+const char *_nc_viscbuf(
-+		const cchar_t *buf, 
-+		int	len)
-+		{ return(*(const char **)0); }
-+
-+/* ./tinfo/alloc_entry.c */
-+
-+#undef _nc_init_entry
-+void	_nc_init_entry(
-+		TERMTYPE *const tp)
-+		{ /* void */ }
-+
-+#undef _nc_copy_entry
-+ENTRY	*_nc_copy_entry(
-+		ENTRY	*oldp)
-+		{ return(*(ENTRY **)0); }
-+
-+#undef _nc_save_str
-+char	*_nc_save_str(
-+		const char *const string)
-+		{ return(*(char **)0); }
-+
-+#undef _nc_wrap_entry
-+void	_nc_wrap_entry(
-+		ENTRY	*const ep, 
-+		NCURSES_BOOL copy_strings)
-+		{ /* void */ }
-+
-+#undef _nc_merge_entry
-+void	_nc_merge_entry(
-+		TERMTYPE *const to, 
-+		TERMTYPE *const from)
-+		{ /* void */ }
-+
-+/* ./tinfo/captoinfo.c */
-+
-+#undef _nc_captoinfo
-+char	*_nc_captoinfo(
-+		const char *cap, 
-+		const char *s, 
-+		int const parameterized)
-+		{ return(*(char **)0); }
-+
-+#undef _nc_infotocap
-+char	*_nc_infotocap(
-+		const char *cap, 
-+		const char *str, 
-+		int const parameterized)
-+		{ return(*(char **)0); }
-+
-+/* ./comp_captab.c */
-+
-+#include <hashsize.h>
-+
-+#undef _nc_get_table
-+const struct name_table_entry *_nc_get_table(
-+		NCURSES_BOOL termcap)
-+		{ return(*(const struct name_table_entry **)0); }
-+
-+#undef _nc_get_hash_table
-+const short *_nc_get_hash_table(
-+		NCURSES_BOOL termcap)
-+		{ return(*(const short **)0); }
-+
-+#undef _nc_get_alias_table
-+const struct alias *_nc_get_alias_table(
-+		NCURSES_BOOL termcap)
-+		{ return(*(const struct alias **)0); }
-+
-+/* ./tinfo/comp_expand.c */
-+
-+#undef _nc_tic_expand
-+char	*_nc_tic_expand(
-+		const char *srcp, 
-+		NCURSES_BOOL tic_format, 
-+		int	numbers)
-+		{ return(*(char **)0); }
-+
-+/* ./tinfo/comp_hash.c */
-+
-+#undef _nc_find_entry
-+struct name_table_entry const *_nc_find_entry(
-+		const char *string, 
-+		const short *hash_table)
-+		{ return(*(struct name_table_entry const **)0); }
-+
-+#undef _nc_find_type_entry
-+struct name_table_entry const *_nc_find_type_entry(
-+		const char *string, 
-+		int	type, 
-+		const struct name_table_entry *table)
-+		{ return(*(struct name_table_entry const **)0); }
-+
-+/* ./tinfo/comp_parse.c */
-+
-+#undef _nc_check_termtype2
-+void	(*_nc_check_termtype2)(
-+		TERMTYPE *p1, 
-+		NCURSES_BOOL p2);
-+#undef _nc_check_termtype
-+void	(*_nc_check_termtype)(
-+		TERMTYPE *p1);
-+
-+#undef _nc_entry_match
-+NCURSES_BOOL _nc_entry_match(
-+		char	*n1, 
-+		char	*n2)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef _nc_read_entry_source
-+void	_nc_read_entry_source(
-+		FILE	*fp, 
-+		char	*buf, 
-+		int	literal, 
-+		NCURSES_BOOL silent, 
-+		NCURSES_BOOL (*hook)(
-+		ENTRY	*p1))
-+		{ /* void */ }
-+
-+#undef _nc_resolve_uses2
-+int	_nc_resolve_uses2(
-+		NCURSES_BOOL fullresolve, 
-+		NCURSES_BOOL literal)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_resolve_uses
-+int	_nc_resolve_uses(
-+		NCURSES_BOOL fullresolve)
-+		{ return(*(int *)0); }
-+
-+/* ./tinfo/comp_scan.c */
-+
-+#undef _nc_syntax
-+int	_nc_syntax;
-+#undef _nc_curr_file_pos
-+long	_nc_curr_file_pos;
-+#undef _nc_comment_start
-+long	_nc_comment_start;
-+#undef _nc_comment_end
-+long	_nc_comment_end;
-+#undef _nc_start_line
-+long	_nc_start_line;
-+#undef _nc_curr_token
-+struct token _nc_curr_token;
-+#undef _nc_disable_period
-+NCURSES_BOOL _nc_disable_period;
-+
-+#undef _nc_reset_input
-+void	_nc_reset_input(
-+		FILE	*fp, 
-+		char	*buf)
-+		{ /* void */ }
-+
-+#undef _nc_get_token
-+int	_nc_get_token(
-+		NCURSES_BOOL silent)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_trans_string
-+int	_nc_trans_string(
-+		char	*ptr, 
-+		char	*last)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_push_token
-+void	_nc_push_token(
-+		int	tokclass)
-+		{ /* void */ }
-+
-+#undef _nc_panic_mode
-+void	_nc_panic_mode(
-+		char	ch)
-+		{ /* void */ }
-+
-+/* ./tinfo/parse_entry.c */
-+
-+#undef _nc_parse_entry
-+int	_nc_parse_entry(
-+		struct entry *entryp, 
-+		int	literal, 
-+		NCURSES_BOOL silent)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_capcmp
-+int	_nc_capcmp(
-+		const char *s, 
-+		const char *t)
-+		{ return(*(int *)0); }
-+
-+typedef struct {
-+    const char *from;
-+    const char *to;
-+} assoc;
-+
-+/* ./tinfo/write_entry.c */
-+
-+#undef _nc_set_writedir
-+void	_nc_set_writedir(
-+		char	*dir)
-+		{ /* void */ }
-+
-+#undef _nc_write_entry
-+void	_nc_write_entry(
-+		TERMTYPE *const tp)
-+		{ /* void */ }
-+
-+#undef _nc_tic_written
-+int	_nc_tic_written(void)
-+		{ return(*(int *)0); }
-+
-+/* ./base/define_key.c */
-+
-+#undef define_key_sp
-+int	define_key_sp(
-+		SCREEN	*sp, 
-+		const char *str, 
-+		int	keycode)
-+		{ return(*(int *)0); }
-+
-+#undef define_key
-+int	define_key(
-+		const char *str, 
-+		int	keycode)
-+		{ return(*(int *)0); }
-+
-+/* ./tinfo/hashed_db.c */
-+
-+#undef _nc_hashed_db
-+void	_nc_hashed_db(void)
-+		{ /* void */ }
-+
-+/* ./base/key_defined.c */
-+
-+#undef key_defined_sp
-+int	key_defined_sp(
-+		SCREEN	*sp, 
-+		const char *str)
-+		{ return(*(int *)0); }
-+
-+#undef key_defined
-+int	key_defined(
-+		const char *str)
-+		{ return(*(int *)0); }
-+
-+/* ./base/keybound.c */
-+
-+#undef keybound_sp
-+char	*keybound_sp(
-+		SCREEN	*sp, 
-+		int	code, 
-+		int	count)
-+		{ return(*(char **)0); }
-+
-+#undef keybound
-+char	*keybound(
-+		int	code, 
-+		int	count)
-+		{ return(*(char **)0); }
-+
-+/* ./base/keyok.c */
-+
-+#undef keyok_sp
-+int	keyok_sp(
-+		SCREEN	*sp, 
-+		int	c, 
-+		NCURSES_BOOL flag)
-+		{ return(*(int *)0); }
-+
-+#undef keyok
-+int	keyok(
-+		int	c, 
-+		NCURSES_BOOL flag)
-+		{ return(*(int *)0); }
-+
-+/* ./base/version.c */
-+
-+#undef curses_version
-+const char *curses_version(void)
-+		{ return(*(const char **)0); }
-diff -Naur ncurses-5.7.orig/ncurses/llib-lncursesw ncurses-5.7/ncurses/llib-lncursesw
---- ncurses-5.7.orig/ncurses/llib-lncursesw	2008-10-11 14:03:02.000000000 -0700
-+++ ncurses-5.7/ncurses/llib-lncursesw	2009-07-19 15:04:11.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 2001-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 2001-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -27,7 +27,7 @@
-  ****************************************************************************/
- 
- /****************************************************************************
-- *  Author: Thomas E. Dickey 2001-2008                                      *
-+ *  Author: Thomas E. Dickey 2001-2009                                      *
-  ****************************************************************************/
- /* LINTLIBRARY */
- 
-@@ -38,27 +38,54 @@
- #undef _nc_oldnums
- int	*_nc_oldnums;
- 
-+#undef _nc_scroll_optimize_sp
-+void	_nc_scroll_optimize_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef _nc_scroll_optimize
- void	_nc_scroll_optimize(void)
- 		{ /* void */ }
- 
-+#undef _nc_linedump_sp
-+void	_nc_linedump_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef _nc_linedump
- void	_nc_linedump(void)
- 		{ /* void */ }
- 
- /* ./tty/hashmap.c */
- 
--#include <term.h>
-+#undef _nc_hash_map_sp
-+void	_nc_hash_map_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
- 
- #undef _nc_hash_map
- void	_nc_hash_map(void)
- 		{ /* void */ }
- 
-+#undef _nc_make_oldhash_sp
-+void	_nc_make_oldhash_sp(
-+		SCREEN	*sp, 
-+		int	i)
-+		{ /* void */ }
-+
- #undef _nc_make_oldhash
- void	_nc_make_oldhash(
- 		int	i)
- 		{ /* void */ }
- 
-+#undef _nc_scroll_oldhash_sp
-+void	_nc_scroll_oldhash_sp(
-+		SCREEN	*sp, 
-+		int	n, 
-+		int	top, 
-+		int	bot)
-+		{ /* void */ }
-+
- #undef _nc_scroll_oldhash
- void	_nc_scroll_oldhash(
- 		int	n, 
-@@ -137,6 +164,11 @@
- 
- /* ./base/lib_beep.c */
- 
-+#undef beep_sp
-+int	beep_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef beep
- int	beep(void)
- 		{ return(*(int *)0); }
-@@ -224,6 +256,7 @@
- 
- /* ./base/lib_color.c */
- 
-+#include <term.h>
- #include <tic.h>
- 
- #undef COLOR_PAIRS
-@@ -231,14 +264,32 @@
- #undef COLORS
- int	COLORS;
- 
-+#undef _nc_reset_colors_sp
-+NCURSES_BOOL _nc_reset_colors_sp(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
- #undef _nc_reset_colors
- NCURSES_BOOL _nc_reset_colors(void)
- 		{ return(*(NCURSES_BOOL *)0); }
- 
-+#undef start_color_sp
-+int	start_color_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef start_color
- int	start_color(void)
- 		{ return(*(int *)0); }
- 
-+#undef init_pair_sp
-+int	init_pair_sp(
-+		SCREEN	*sp, 
-+		short	pair, 
-+		short	f, 
-+		short	b)
-+		{ return(*(int *)0); }
-+
- #undef init_pair
- int	init_pair(
- 		short	pair, 
-@@ -246,6 +297,15 @@
- 		short	b)
- 		{ return(*(int *)0); }
- 
-+#undef init_color_sp
-+int	init_color_sp(
-+		SCREEN	*sp, 
-+		short	color, 
-+		short	r, 
-+		short	g, 
-+		short	b)
-+		{ return(*(int *)0); }
-+
- #undef init_color
- int	init_color(
- 		short	color, 
-@@ -254,14 +314,33 @@
- 		short	b)
- 		{ return(*(int *)0); }
- 
-+#undef can_change_color_sp
-+NCURSES_BOOL can_change_color_sp(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
- #undef can_change_color
- NCURSES_BOOL can_change_color(void)
- 		{ return(*(NCURSES_BOOL *)0); }
- 
-+#undef has_colors_sp
-+NCURSES_BOOL has_colors_sp(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
- #undef has_colors
- NCURSES_BOOL has_colors(void)
- 		{ return(*(NCURSES_BOOL *)0); }
- 
-+#undef color_content_sp
-+int	color_content_sp(
-+		SCREEN	*sp, 
-+		short	color, 
-+		short	*r, 
-+		short	*g, 
-+		short	*b)
-+		{ return(*(int *)0); }
-+
- #undef color_content
- int	color_content(
- 		short	color, 
-@@ -270,6 +349,14 @@
- 		short	*b)
- 		{ return(*(int *)0); }
- 
-+#undef pair_content_sp
-+int	pair_content_sp(
-+		SCREEN	*sp, 
-+		short	pair, 
-+		short	*f, 
-+		short	*b)
-+		{ return(*(int *)0); }
-+
- #undef pair_content
- int	pair_content(
- 		short	pair, 
-@@ -277,13 +364,21 @@
- 		short	*b)
- 		{ return(*(int *)0); }
- 
-+#undef _nc_do_color_sp
-+void	_nc_do_color_sp(
-+		SCREEN	*sp, 
-+		short	old_pair, 
-+		short	pair, 
-+		NCURSES_BOOL reverse, 
-+		NCURSES_OUTC_sp outc)
-+		{ /* void */ }
-+
- #undef _nc_do_color
- void	_nc_do_color(
- 		short	old_pair, 
- 		short	pair, 
- 		NCURSES_BOOL reverse, 
--		int	(*outc)(
--		int	p1))
-+		NCURSES_OUTC outc)
- 		{ /* void */ }
- 
- /* ./base/lib_colorset.c */
-@@ -311,16 +406,31 @@
- 
- /* ./base/lib_echo.c */
- 
-+#undef echo_sp
-+int	echo_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef echo
- int	echo(void)
- 		{ return(*(int *)0); }
- 
-+#undef noecho_sp
-+int	noecho_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef noecho
- int	noecho(void)
- 		{ return(*(int *)0); }
- 
- /* ./base/lib_endwin.c */
- 
-+#undef endwin_sp
-+int	endwin_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef endwin
- int	endwin(void)
- 		{ return(*(int *)0); }
-@@ -334,6 +444,11 @@
- 
- /* ./base/lib_flash.c */
- 
-+#undef flash_sp
-+int	flash_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef flash
- int	flash(void)
- 		{ return(*(int *)0); }
-@@ -1646,6 +1761,12 @@
- #undef ESCDELAY
- int	ESCDELAY;
- 
-+#undef set_escdelay_sp
-+int	set_escdelay_sp(
-+		SCREEN	*sp, 
-+		int	value)
-+		{ return(*(int *)0); }
-+
- #undef set_escdelay
- int	set_escdelay(
- 		int	value)
-@@ -1708,6 +1829,7 @@
- 
- #undef _nc_insert_ch
- int	_nc_insert_ch(
-+		SCREEN	*sp, 
- 		WINDOW	*win, 
- 		chtype	ch)
- 		{ return(*(int *)0); }
-@@ -1746,6 +1868,11 @@
- 
- /* ./base/lib_isendwin.c */
- 
-+#undef isendwin_sp
-+NCURSES_BOOL isendwin_sp(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
- #undef isendwin
- NCURSES_BOOL isendwin(void)
- 		{ return(*(NCURSES_BOOL *)0); }
-@@ -1760,16 +1887,35 @@
- 
- /* ./base/lib_mouse.c */
- 
-+#undef getmouse_sp
-+int	getmouse_sp(
-+		SCREEN	*sp, 
-+		MEVENT	*aevent)
-+		{ return(*(int *)0); }
-+
- #undef getmouse
- int	getmouse(
- 		MEVENT	*aevent)
- 		{ return(*(int *)0); }
- 
-+#undef ungetmouse_sp
-+int	ungetmouse_sp(
-+		SCREEN	*sp, 
-+		MEVENT	*aevent)
-+		{ return(*(int *)0); }
-+
- #undef ungetmouse
- int	ungetmouse(
- 		MEVENT	*aevent)
- 		{ return(*(int *)0); }
- 
-+#undef mousemask_sp
-+mmask_t	mousemask_sp(
-+		SCREEN	*sp, 
-+		mmask_t	newmask, 
-+		mmask_t	*oldmask)
-+		{ return(*(mmask_t *)0); }
-+
- #undef mousemask
- mmask_t	mousemask(
- 		mmask_t	newmask, 
-@@ -1783,14 +1929,30 @@
- 		int	x)
- 		{ return(*(NCURSES_BOOL *)0); }
- 
-+#undef mouseinterval_sp
-+int	mouseinterval_sp(
-+		SCREEN	*sp, 
-+		int	maxclick)
-+		{ return(*(int *)0); }
-+
- #undef mouseinterval
- int	mouseinterval(
- 		int	maxclick)
- 		{ return(*(int *)0); }
- 
- #undef _nc_has_mouse
--int	_nc_has_mouse(void)
--		{ return(*(int *)0); }
-+NCURSES_BOOL _nc_has_mouse(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef has_mouse_sp
-+NCURSES_BOOL has_mouse_sp(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
-+#undef has_mouse
-+NCURSES_BOOL has_mouse(void)
-+		{ return(*(NCURSES_BOOL *)0); }
- 
- #undef wmouse_trafo
- NCURSES_BOOL wmouse_trafo(
-@@ -1811,24 +1973,55 @@
- 
- /* ./tty/lib_mvcur.c */
- 
-+#undef _nc_msec_cost_sp
-+int	_nc_msec_cost_sp(
-+		SCREEN	*sp, 
-+		const char *const cap, 
-+		int	affcnt)
-+		{ return(*(int *)0); }
-+
- #undef _nc_msec_cost
- int	_nc_msec_cost(
- 		const char *const cap, 
- 		int	affcnt)
- 		{ return(*(int *)0); }
- 
-+#undef _nc_mvcur_resume_sp
-+void	_nc_mvcur_resume_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef _nc_mvcur_resume
- void	_nc_mvcur_resume(void)
- 		{ /* void */ }
- 
-+#undef _nc_mvcur_init_sp
-+void	_nc_mvcur_init_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef _nc_mvcur_init
- void	_nc_mvcur_init(void)
- 		{ /* void */ }
- 
-+#undef _nc_mvcur_wrap_sp
-+void	_nc_mvcur_wrap_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef _nc_mvcur_wrap
- void	_nc_mvcur_wrap(void)
- 		{ /* void */ }
- 
-+#undef mvcur_sp
-+int	mvcur_sp(
-+		SCREEN	*sp, 
-+		int	yold, 
-+		int	xold, 
-+		int	ynew, 
-+		int	xnew)
-+		{ return(*(int *)0); }
-+
- #undef mvcur
- int	mvcur(
- 		int	yold, 
-@@ -1851,14 +2044,32 @@
- 
- /* ./base/lib_newterm.c */
- 
-+#undef filter_sp
-+void	filter_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef filter
- void	filter(void)
- 		{ /* void */ }
- 
-+#undef nofilter_sp
-+void	nofilter_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef nofilter
- void	nofilter(void)
- 		{ /* void */ }
- 
-+#undef newterm_sp
-+SCREEN	*newterm_sp(
-+		SCREEN	*sp, 
-+		char	*name, 
-+		FILE	*ofp, 
-+		FILE	*ifp)
-+		{ return(*(SCREEN **)0); }
-+
- #undef newterm
- SCREEN	*newterm(
- 		char	*name, 
-@@ -1873,6 +2084,15 @@
- 		WINDOW	*win)
- 		{ return(*(int *)0); }
- 
-+#undef newwin_sp
-+WINDOW	*newwin_sp(
-+		SCREEN	*sp, 
-+		int	num_lines, 
-+		int	num_columns, 
-+		int	begy, 
-+		int	begx)
-+		{ return(*(WINDOW **)0); }
-+
- #undef newwin
- WINDOW	*newwin(
- 		int	num_lines, 
-@@ -1899,6 +2119,16 @@
- 		int	x)
- 		{ return(*(WINDOW **)0); }
- 
-+#undef _nc_makenew_sp
-+WINDOW	*_nc_makenew_sp(
-+		SCREEN	*sp, 
-+		int	num_lines, 
-+		int	num_columns, 
-+		int	begy, 
-+		int	begx, 
-+		int	flags)
-+		{ return(*(WINDOW **)0); }
-+
- #undef _nc_makenew
- WINDOW	*_nc_makenew(
- 		int	num_lines, 
-@@ -1908,17 +2138,37 @@
- 		int	flags)
- 		{ return(*(WINDOW **)0); }
- 
--#undef _nc_screen_of
--SCREEN	*_nc_screen_of(
--		WINDOW	*win)
--		{ return(*(SCREEN **)0); }
-+#undef _nc_curscr_of
-+WINDOW	*_nc_curscr_of(
-+		SCREEN	*sp)
-+		{ return(*(WINDOW **)0); }
-+
-+#undef _nc_newscr_of
-+WINDOW	*_nc_newscr_of(
-+		SCREEN	*sp)
-+		{ return(*(WINDOW **)0); }
-+
-+#undef _nc_stdscr_of
-+WINDOW	*_nc_stdscr_of(
-+		SCREEN	*sp)
-+		{ return(*(WINDOW **)0); }
- 
- /* ./base/lib_nl.c */
- 
-+#undef nl_sp
-+int	nl_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef nl
- int	nl(void)
- 		{ return(*(int *)0); }
- 
-+#undef nonl_sp
-+int	nonl_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef nonl
- int	nonl(void)
- 		{ return(*(int *)0); }
-@@ -1952,6 +2202,13 @@
- 
- /* ./base/lib_pad.c */
- 
-+#undef newpad_sp
-+WINDOW	*newpad_sp(
-+		SCREEN	*sp, 
-+		int	l, 
-+		int	c)
-+		{ return(*(WINDOW **)0); }
-+
- #undef newpad
- WINDOW	*newpad(
- 		int	l, 
-@@ -2057,6 +2314,14 @@
- 
- /* ./base/lib_restart.c */
- 
-+#undef restartterm_sp
-+int	restartterm_sp(
-+		SCREEN	*sp, 
-+		char	*termp, 
-+		int	filenum, 
-+		int	*errret)
-+		{ return(*(int *)0); }
-+
- #undef restartterm
- int	restartterm(
- 		char	*termp, 
-@@ -2105,6 +2370,12 @@
- 
- /* ./base/lib_screen.c */
- 
-+#undef getwin_sp
-+WINDOW	*getwin_sp(
-+		SCREEN	*sp, 
-+		FILE	*filep)
-+		{ return(*(WINDOW **)0); }
-+
- #undef getwin
- WINDOW	*getwin(
- 		FILE	*filep)
-@@ -2116,6 +2387,12 @@
- 		FILE	*filep)
- 		{ return(*(int *)0); }
- 
-+#undef scr_restore_sp
-+int	scr_restore_sp(
-+		SCREEN	*sp, 
-+		const char *file)
-+		{ return(*(int *)0); }
-+
- #undef scr_restore
- int	scr_restore(
- 		const char *file)
-@@ -2126,11 +2403,23 @@
- 		const char *file)
- 		{ return(*(int *)0); }
- 
-+#undef scr_init_sp
-+int	scr_init_sp(
-+		SCREEN	*sp, 
-+		const char *file)
-+		{ return(*(int *)0); }
-+
- #undef scr_init
- int	scr_init(
- 		const char *file)
- 		{ return(*(int *)0); }
- 
-+#undef scr_set_sp
-+int	scr_set_sp(
-+		SCREEN	*sp, 
-+		const char *file)
-+		{ return(*(int *)0); }
-+
- #undef scr_set
- int	scr_set(
- 		const char *file)
-@@ -2191,6 +2480,15 @@
- 		int	slk_format)
- 		{ return(*(int *)0); }
- 
-+#undef _nc_ripoffline_sp
-+int	_nc_ripoffline_sp(
-+		SCREEN	*sp, 
-+		int	line, 
-+		int	(*init)(
-+		WINDOW	*p1, 
-+		int	p2))
-+		{ return(*(int *)0); }
-+
- #undef _nc_ripoffline
- int	_nc_ripoffline(
- 		int	line, 
-@@ -2199,6 +2497,15 @@
- 		int	p2))
- 		{ return(*(int *)0); }
- 
-+#undef ripoffline_sp
-+int	ripoffline_sp(
-+		SCREEN	*sp, 
-+		int	line, 
-+		int	(*init)(
-+		WINDOW	*p1, 
-+		int	p2))
-+		{ return(*(int *)0); }
-+
- #undef ripoffline
- int	ripoffline(
- 		int	line, 
-@@ -2215,12 +2522,25 @@
- 		int	cols)
- 		{ return(*(int *)0); }
- 
-+#undef slk_restore_sp
-+int	slk_restore_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef slk_restore
- int	slk_restore(void)
- 		{ return(*(int *)0); }
- 
- /* ./base/lib_slkatr_set.c */
- 
-+#undef slk_attr_set_sp
-+int	slk_attr_set_sp(
-+		SCREEN	*sp, 
-+		const attr_t attr, 
-+		short	color_pair_number, 
-+		void	*opts)
-+		{ return(*(int *)0); }
-+
- #undef slk_attr_set
- int	slk_attr_set(
- 		const attr_t attr, 
-@@ -2230,6 +2550,12 @@
- 
- /* ./base/lib_slkatrof.c */
- 
-+#undef slk_attroff_sp
-+int	slk_attroff_sp(
-+		SCREEN	*sp, 
-+		const chtype attr)
-+		{ return(*(int *)0); }
-+
- #undef slk_attroff
- int	slk_attroff(
- 		const chtype attr)
-@@ -2237,6 +2563,12 @@
- 
- /* ./base/lib_slkatron.c */
- 
-+#undef slk_attron_sp
-+int	slk_attron_sp(
-+		SCREEN	*sp, 
-+		const chtype attr)
-+		{ return(*(int *)0); }
-+
- #undef slk_attron
- int	slk_attron(
- 		const chtype attr)
-@@ -2244,6 +2576,12 @@
- 
- /* ./base/lib_slkatrset.c */
- 
-+#undef slk_attrset_sp
-+int	slk_attrset_sp(
-+		SCREEN	*sp, 
-+		const chtype attr)
-+		{ return(*(int *)0); }
-+
- #undef slk_attrset
- int	slk_attrset(
- 		const chtype attr)
-@@ -2251,18 +2589,34 @@
- 
- /* ./base/lib_slkattr.c */
- 
-+#undef slk_attr_sp
-+attr_t	slk_attr_sp(
-+		SCREEN	*sp)
-+		{ return(*(attr_t *)0); }
-+
- #undef slk_attr
- attr_t	slk_attr(void)
- 		{ return(*(attr_t *)0); }
- 
- /* ./base/lib_slkclear.c */
- 
-+#undef slk_clear_sp
-+int	slk_clear_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef slk_clear
- int	slk_clear(void)
- 		{ return(*(int *)0); }
- 
- /* ./base/lib_slkcolor.c */
- 
-+#undef slk_color_sp
-+int	slk_color_sp(
-+		SCREEN	*sp, 
-+		short	color_pair_number)
-+		{ return(*(int *)0); }
-+
- #undef slk_color
- int	slk_color(
- 		short	color_pair_number)
-@@ -2270,6 +2624,12 @@
- 
- /* ./base/lib_slkinit.c */
- 
-+#undef slk_init_sp
-+int	slk_init_sp(
-+		SCREEN	*sp, 
-+		int	format)
-+		{ return(*(int *)0); }
-+
- #undef slk_init
- int	slk_init(
- 		int	format)
-@@ -2277,6 +2637,12 @@
- 
- /* ./base/lib_slklab.c */
- 
-+#undef slk_label_sp
-+char	*slk_label_sp(
-+		SCREEN	*sp, 
-+		int	n)
-+		{ return(*(char **)0); }
-+
- #undef slk_label
- char	*slk_label(
- 		int	n)
-@@ -2284,10 +2650,20 @@
- 
- /* ./base/lib_slkrefr.c */
- 
-+#undef slk_noutrefresh_sp
-+int	slk_noutrefresh_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef slk_noutrefresh
- int	slk_noutrefresh(void)
- 		{ return(*(int *)0); }
- 
-+#undef slk_refresh_sp
-+int	slk_refresh_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef slk_refresh
- int	slk_refresh(void)
- 		{ return(*(int *)0); }
-@@ -2296,6 +2672,14 @@
- 
- #include <wctype.h>
- 
-+#undef slk_set_sp
-+int	slk_set_sp(
-+		SCREEN	*sp, 
-+		int	i, 
-+		const char *astr, 
-+		int	format)
-+		{ return(*(int *)0); }
-+
- #undef slk_set
- int	slk_set(
- 		int	i, 
-@@ -2305,6 +2689,11 @@
- 
- /* ./base/lib_slktouch.c */
- 
-+#undef slk_touch_sp
-+int	slk_touch_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef slk_touch
- int	slk_touch(void)
- 		{ return(*(int *)0); }
-@@ -2367,8 +2756,8 @@
- 		SCREEN	*sp)
- 		{ /* void */ }
- 
--#undef _nc_ungetch
--int	_nc_ungetch(
-+#undef ungetch_sp
-+int	ungetch_sp(
- 		SCREEN	*sp, 
- 		int	ch)
- 		{ return(*(int *)0); }
-@@ -2380,11 +2769,23 @@
- 
- /* ./tty/lib_vidattr.c */
- 
-+#undef vidputs_sp
-+int	vidputs_sp(
-+		SCREEN	*sp, 
-+		chtype	newmode, 
-+		NCURSES_OUTC_sp outc)
-+		{ return(*(int *)0); }
-+
- #undef vidputs
- int	vidputs(
- 		chtype	newmode, 
--		int	(*outc)(
--		int	p1))
-+		NCURSES_OUTC outc)
-+		{ return(*(int *)0); }
-+
-+#undef vidattr_sp
-+int	vidattr_sp(
-+		SCREEN	*sp, 
-+		chtype	newmode)
- 		{ return(*(int *)0); }
- 
- #undef vidattr
-@@ -2392,6 +2793,11 @@
- 		chtype	newmode)
- 		{ return(*(int *)0); }
- 
-+#undef termattrs_sp
-+chtype	termattrs_sp(
-+		SCREEN	*sp)
-+		{ return(*(chtype *)0); }
-+
- #undef termattrs
- chtype	termattrs(void)
- 		{ return(*(chtype *)0); }
-@@ -2472,12 +2878,24 @@
- 
- /* ./base/nc_panel.c */
- 
-+#undef _nc_panelhook_sp
-+struct panelhook *_nc_panelhook_sp(
-+		SCREEN	*sp)
-+		{ return(*(struct panelhook **)0); }
-+
- #undef _nc_panelhook
- struct panelhook *_nc_panelhook(void)
- 		{ return(*(struct panelhook **)0); }
- 
- /* ./base/safe_sprintf.c */
- 
-+#undef _nc_printf_string_sp
-+char	*_nc_printf_string_sp(
-+		SCREEN	*sp, 
-+		const char *fmt, 
-+		va_list	ap)
-+		{ return(*(char **)0); }
-+
- #undef _nc_printf_string
- char	*_nc_printf_string(
- 		const char *fmt, 
-@@ -2489,10 +2907,24 @@
- #include <sys/time.h>
- #include <sys/times.h>
- 
-+#undef doupdate_sp
-+int	doupdate_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef doupdate
- int	doupdate(void)
- 		{ return(*(int *)0); }
- 
-+#undef _nc_scrolln_sp
-+int	_nc_scrolln_sp(
-+		SCREEN	*sp, 
-+		int	n, 
-+		int	top, 
-+		int	bot, 
-+		int	maxy)
-+		{ return(*(int *)0); }
-+
- #undef _nc_scrolln
- int	_nc_scrolln(
- 		int	n, 
-@@ -2501,18 +2933,39 @@
- 		int	maxy)
- 		{ return(*(int *)0); }
- 
-+#undef _nc_screen_resume_sp
-+void	_nc_screen_resume_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef _nc_screen_resume
- void	_nc_screen_resume(void)
- 		{ /* void */ }
- 
-+#undef _nc_screen_init_sp
-+void	_nc_screen_init_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef _nc_screen_init
- void	_nc_screen_init(void)
- 		{ /* void */ }
- 
-+#undef _nc_screen_wrap_sp
-+void	_nc_screen_wrap_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef _nc_screen_wrap
- void	_nc_screen_wrap(void)
- 		{ /* void */ }
- 
-+#undef _nc_do_xmc_glitch_sp
-+void	_nc_do_xmc_glitch_sp(
-+		SCREEN	*sp, 
-+		attr_t	previous)
-+		{ /* void */ }
-+
- #undef _nc_do_xmc_glitch
- void	_nc_do_xmc_glitch(
- 		attr_t	previous)
-@@ -2550,6 +3003,12 @@
- void	_nc_freeall(void)
- 		{ /* void */ }
- 
-+#undef _nc_free_and_exit_sp
-+void	_nc_free_and_exit_sp(
-+		SCREEN	*sp, 
-+		int	code)
-+		{ /* void */ }
-+
- #undef _nc_free_and_exit
- void	_nc_free_and_exit(
- 		int	code)
-@@ -2739,6 +3198,12 @@
- 		mbstate_t *state)
- 		{ return(*(size_t *)0); }
- 
-+#undef unget_wch_sp
-+int	unget_wch_sp(
-+		SCREEN	*sp, 
-+		const wchar_t wch)
-+		{ return(*(int *)0); }
-+
- #undef unget_wch
- int	unget_wch(
- 		const wchar_t wch)
-@@ -2746,13 +3211,29 @@
- 
- /* ./widechar/lib_vid_attr.c */
- 
-+#undef vid_puts_sp
-+int	vid_puts_sp(
-+		SCREEN	*sp, 
-+		attr_t	newmode, 
-+		short	pair, 
-+		void	*opts, 
-+		NCURSES_OUTC_sp outc)
-+		{ return(*(int *)0); }
-+
- #undef vid_puts
- int	vid_puts(
- 		attr_t	newmode, 
- 		short	pair, 
- 		void	*opts, 
--		int	(*outc)(
--		int	p1))
-+		NCURSES_OUTC outc)
-+		{ return(*(int *)0); }
-+
-+#undef vid_attr_sp
-+int	vid_attr_sp(
-+		SCREEN	*sp, 
-+		attr_t	newmode, 
-+		short	pair, 
-+		void	*opts)
- 		{ return(*(int *)0); }
- 
- #undef vid_attr
-@@ -2762,6 +3243,11 @@
- 		void	*opts)
- 		{ return(*(int *)0); }
- 
-+#undef term_attrs_sp
-+attr_t	term_attrs_sp(
-+		SCREEN	*sp)
-+		{ return(*(attr_t *)0); }
-+
- #undef term_attrs
- attr_t	term_attrs(void)
- 		{ return(*(attr_t *)0); }
-@@ -2786,6 +3272,12 @@
- 
- /* ./widechar/lib_wunctrl.c */
- 
-+#undef wunctrl_sp
-+wchar_t	*wunctrl_sp(
-+		SCREEN	*sp, 
-+		cchar_t	*wc)
-+		{ return(*(wchar_t **)0); }
-+
- #undef wunctrl
- wchar_t	*wunctrl(
- 		cchar_t	*wc)
-@@ -2805,6 +3297,24 @@
- 		attr_t	at)
- 		{ /* void */ }
- 
-+#undef _nc_DelCharCost_sp
-+int	_nc_DelCharCost_sp(
-+		SCREEN	*sp, 
-+		int	count)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_InsCharCost_sp
-+int	_nc_InsCharCost_sp(
-+		SCREEN	*sp, 
-+		int	count)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_UpdateAttrs_sp
-+void	_nc_UpdateAttrs_sp(
-+		SCREEN	*sp, 
-+		const cchar_t *c)
-+		{ /* void */ }
-+
- #undef _nc_DelCharCost
- int	_nc_DelCharCost(
- 		int	count)
-@@ -2817,11 +3327,17 @@
- 
- #undef _nc_UpdateAttrs
- void	_nc_UpdateAttrs(
--		cchar_t	c)
-+		const cchar_t *c)
- 		{ /* void */ }
- 
- /* ./base/legacy_coding.c */
- 
-+#undef use_legacy_coding_sp
-+int	use_legacy_coding_sp(
-+		SCREEN	*sp, 
-+		int	level)
-+		{ return(*(int *)0); }
-+
- #undef use_legacy_coding
- int	use_legacy_coding(
- 		int	level)
-@@ -2829,10 +3345,22 @@
- 
- /* ./base/lib_dft_fgbg.c */
- 
-+#undef use_default_colors_sp
-+int	use_default_colors_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef use_default_colors
- int	use_default_colors(void)
- 		{ return(*(int *)0); }
- 
-+#undef assume_default_colors_sp
-+int	assume_default_colors_sp(
-+		SCREEN	*sp, 
-+		int	fg, 
-+		int	bg)
-+		{ return(*(int *)0); }
-+
- #undef assume_default_colors
- int	assume_default_colors(
- 		int	fg, 
-@@ -2841,6 +3369,13 @@
- 
- /* ./tinfo/lib_print.c */
- 
-+#undef mcprint_sp
-+int	mcprint_sp(
-+		SCREEN	*sp, 
-+		char	*data, 
-+		int	len)
-+		{ return(*(int *)0); }
-+
- #undef mcprint
- int	mcprint(
- 		char	*data, 
-@@ -2849,18 +3384,39 @@
- 
- /* ./base/resizeterm.c */
- 
-+#undef is_term_resized_sp
-+NCURSES_BOOL is_term_resized_sp(
-+		SCREEN	*sp, 
-+		int	ToLines, 
-+		int	ToCols)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
- #undef is_term_resized
- NCURSES_BOOL is_term_resized(
- 		int	ToLines, 
- 		int	ToCols)
- 		{ return(*(NCURSES_BOOL *)0); }
- 
-+#undef resize_term_sp
-+int	resize_term_sp(
-+		SCREEN	*sp, 
-+		int	ToLines, 
-+		int	ToCols)
-+		{ return(*(int *)0); }
-+
- #undef resize_term
- int	resize_term(
- 		int	ToLines, 
- 		int	ToCols)
- 		{ return(*(int *)0); }
- 
-+#undef resizeterm_sp
-+int	resizeterm_sp(
-+		SCREEN	*sp, 
-+		int	ToLines, 
-+		int	ToCols)
-+		{ return(*(int *)0); }
-+
- #undef resizeterm
- int	resizeterm(
- 		int	ToLines, 
-@@ -3143,6 +3699,11 @@
- #undef acs_map
- chtype	acs_map[128];
- 
-+#undef _nc_init_acs_sp
-+void	_nc_init_acs_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef _nc_init_acs
- void	_nc_init_acs(void)
- 		{ /* void */ }
-@@ -3166,6 +3727,11 @@
- 		int	BaudRate)
- 		{ return(*(int *)0); }
- 
-+#undef baudrate_sp
-+int	baudrate_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef baudrate
- int	baudrate(void)
- 		{ return(*(int *)0); }
-@@ -3180,6 +3746,12 @@
- 		TERMINAL *termp)
- 		{ return(*(TERMINAL **)0); }
- 
-+#undef del_curterm_sp
-+int	del_curterm_sp(
-+		SCREEN	*sp, 
-+		TERMINAL *termp)
-+		{ return(*(int *)0); }
-+
- #undef del_curterm
- int	del_curterm(
- 		TERMINAL *termp)
-@@ -3202,26 +3774,56 @@
- #undef _nc_prescreen
- NCURSES_PRESCREEN _nc_prescreen;
- 
-+#undef _nc_screen_of
-+SCREEN	*_nc_screen_of(
-+		WINDOW	*win)
-+		{ return(*(SCREEN **)0); }
-+
- /* ./tinfo/lib_has_cap.c */
- 
-+#undef has_ic_sp
-+NCURSES_BOOL has_ic_sp(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
- #undef has_ic
- NCURSES_BOOL has_ic(void)
- 		{ return(*(NCURSES_BOOL *)0); }
- 
-+#undef has_il_sp
-+NCURSES_BOOL has_il_sp(
-+		SCREEN	*sp)
-+		{ return(*(NCURSES_BOOL *)0); }
-+
- #undef has_il
- NCURSES_BOOL has_il(void)
- 		{ return(*(NCURSES_BOOL *)0); }
- 
- /* ./tinfo/lib_kernel.c */
- 
-+#undef erasechar_sp
-+char	erasechar_sp(
-+		SCREEN	*sp)
-+		{ return(*(char *)0); }
-+
- #undef erasechar
- char	erasechar(void)
- 		{ return(*(char *)0); }
- 
-+#undef killchar_sp
-+char	killchar_sp(
-+		SCREEN	*sp)
-+		{ return(*(char *)0); }
-+
- #undef killchar
- char	killchar(void)
- 		{ return(*(char *)0); }
- 
-+#undef flushinp_sp
-+int	flushinp_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef flushinp
- int	flushinp(void)
- 		{ return(*(int *)0); }
-@@ -3230,8 +3832,8 @@
- 
- struct kn { short offset; int code; };
- 
--#undef _nc_keyname
--char	*_nc_keyname(
-+#undef keyname_sp
-+char	*keyname_sp(
- 		SCREEN	*sp, 
- 		int	c)
- 		{ return(*(char **)0); }
-@@ -3251,6 +3853,12 @@
- 
- #include <time.h>
- 
-+#undef napms_sp
-+int	napms_sp(
-+		SCREEN	*sp, 
-+		int	ms)
-+		{ return(*(int *)0); }
-+
- #undef napms
- int	napms(
- 		int	ms)
-@@ -3270,6 +3878,12 @@
- 		NCURSES_BOOL flag)
- 		{ /* void */ }
- 
-+#undef halfdelay_sp
-+int	halfdelay_sp(
-+		SCREEN	*sp, 
-+		int	t)
-+		{ return(*(int *)0); }
-+
- #undef halfdelay
- int	halfdelay(
- 		int	t)
-@@ -3305,21 +3919,52 @@
- 		NCURSES_BOOL flag)
- 		{ return(*(int *)0); }
- 
-+#undef curs_set_sp
-+int	curs_set_sp(
-+		SCREEN	*sp, 
-+		int	vis)
-+		{ return(*(int *)0); }
-+
- #undef curs_set
- int	curs_set(
- 		int	vis)
- 		{ return(*(int *)0); }
- 
-+#undef typeahead_sp
-+int	typeahead_sp(
-+		SCREEN	*sp, 
-+		int	fd)
-+		{ return(*(int *)0); }
-+
- #undef typeahead
- int	typeahead(
- 		int	fd)
- 		{ return(*(int *)0); }
- 
-+#undef has_key_sp
-+int	has_key_sp(
-+		SCREEN	*sp, 
-+		int	keycode)
-+		{ return(*(int *)0); }
-+
- #undef has_key
- int	has_key(
- 		int	keycode)
- 		{ return(*(int *)0); }
- 
-+#undef _nc_putp_flush_sp
-+int	_nc_putp_flush_sp(
-+		SCREEN	*sp, 
-+		const char *name, 
-+		const char *value)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_putp_flush
-+int	_nc_putp_flush(
-+		const char *name, 
-+		const char *value)
-+		{ return(*(int *)0); }
-+
- #undef _nc_keypad
- int	_nc_keypad(
- 		SCREEN	*sp, 
-@@ -3328,30 +3973,67 @@
- 
- /* ./tinfo/lib_raw.c */
- 
-+#undef raw_sp
-+int	raw_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef raw
- int	raw(void)
- 		{ return(*(int *)0); }
- 
-+#undef cbreak_sp
-+int	cbreak_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef cbreak
- int	cbreak(void)
- 		{ return(*(int *)0); }
- 
-+#undef qiflush_sp
-+void	qiflush_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef qiflush
- void	qiflush(void)
- 		{ /* void */ }
- 
-+#undef noraw_sp
-+int	noraw_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef noraw
- int	noraw(void)
- 		{ return(*(int *)0); }
- 
-+#undef nocbreak_sp
-+int	nocbreak_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef nocbreak
- int	nocbreak(void)
- 		{ return(*(int *)0); }
- 
-+#undef noqiflush_sp
-+void	noqiflush_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef noqiflush
- void	noqiflush(void)
- 		{ /* void */ }
- 
-+#undef intrflush_sp
-+int	intrflush_sp(
-+		SCREEN	*sp, 
-+		WINDOW	*win, 
-+		NCURSES_BOOL flag)
-+		{ return(*(int *)0); }
-+
- #undef intrflush
- int	intrflush(
- 		WINDOW	*win, 
-@@ -3373,6 +4055,12 @@
- #undef TABSIZE
- int	TABSIZE;
- 
-+#undef set_tabsize_sp
-+int	set_tabsize_sp(
-+		SCREEN	*sp, 
-+		int	value)
-+		{ return(*(int *)0); }
-+
- #undef set_tabsize
- int	set_tabsize(
- 		int	value)
-@@ -3383,6 +4071,12 @@
- 		SCREEN	*sp)
- 		{ return(*(int *)0); }
- 
-+#undef use_env_sp
-+void	use_env_sp(
-+		SCREEN	*sp, 
-+		NCURSES_BOOL f)
-+		{ /* void */ }
-+
- #undef use_env
- void	use_env(
- 		NCURSES_BOOL f)
-@@ -3435,8 +4129,9 @@
- #undef BC
- char	*BC;
- 
--#undef tgetent
--int	tgetent(
-+#undef tgetent_sp
-+int	tgetent_sp(
-+		SCREEN	*sp, 
- 		char	*bufp, 
- 		const char *name)
- 		{ return(*(int *)0); }
-@@ -3447,16 +4142,41 @@
- 
- #endif
- 
-+#undef tgetent
-+int	tgetent(
-+		char	*bufp, 
-+		const char *name)
-+		{ return(*(int *)0); }
-+
-+#undef tgetflag_sp
-+int	tgetflag_sp(
-+		SCREEN	*sp, 
-+		char	*id)
-+		{ return(*(int *)0); }
-+
- #undef tgetflag
- int	tgetflag(
- 		char	*id)
- 		{ return(*(int *)0); }
- 
-+#undef tgetnum_sp
-+int	tgetnum_sp(
-+		SCREEN	*sp, 
-+		char	*id)
-+		{ return(*(int *)0); }
-+
- #undef tgetnum
- int	tgetnum(
- 		char	*id)
- 		{ return(*(int *)0); }
- 
-+#undef tgetstr_sp
-+char	*tgetstr_sp(
-+		SCREEN	*sp, 
-+		char	*id, 
-+		char	**area)
-+		{ return(*(char **)0); }
-+
- #undef tgetstr
- char	*tgetstr(
- 		char	*id, 
-@@ -3465,6 +4185,11 @@
- 
- /* ./tinfo/lib_termname.c */
- 
-+#undef termname_sp
-+char	*termname_sp(
-+		SCREEN	*sp)
-+		{ return(*(char **)0); }
-+
- #undef termname
- char	*termname(void)
- 		{ return(*(char **)0); }
-@@ -3480,16 +4205,34 @@
- 
- /* ./tinfo/lib_ti.c */
- 
-+#undef tigetflag_sp
-+int	tigetflag_sp(
-+		SCREEN	*sp, 
-+		char	*str)
-+		{ return(*(int *)0); }
-+
- #undef tigetflag
- int	tigetflag(
- 		char	*str)
- 		{ return(*(int *)0); }
- 
-+#undef tigetnum_sp
-+int	tigetnum_sp(
-+		SCREEN	*sp, 
-+		char	*str)
-+		{ return(*(int *)0); }
-+
- #undef tigetnum
- int	tigetnum(
- 		char	*str)
- 		{ return(*(int *)0); }
- 
-+#undef tigetstr_sp
-+char	*tigetstr_sp(
-+		SCREEN	*sp, 
-+		char	*str)
-+		{ return(*(char **)0); }
-+
- #undef tigetstr
- char	*tigetstr(
- 		char	*str)
-@@ -3527,25 +4270,75 @@
- 		SCREEN	*sp)
- 		{ /* void */ }
- 
-+#undef delay_output_sp
-+int	delay_output_sp(
-+		SCREEN	*sp, 
-+		int	ms)
-+		{ return(*(int *)0); }
-+
- #undef delay_output
- int	delay_output(
- 		int	ms)
- 		{ return(*(int *)0); }
- 
-+#undef _nc_flush_sp
-+void	_nc_flush_sp(
-+		SCREEN	*sp)
-+		{ /* void */ }
-+
- #undef _nc_flush
- void	_nc_flush(void)
- 		{ /* void */ }
- 
-+#undef _nc_outch_sp
-+int	_nc_outch_sp(
-+		SCREEN	*sp, 
-+		int	ch)
-+		{ return(*(int *)0); }
-+
- #undef _nc_outch
- int	_nc_outch(
- 		int	ch)
- 		{ return(*(int *)0); }
- 
-+#undef putp_sp
-+int	putp_sp(
-+		SCREEN	*sp, 
-+		const char *string)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_putp_sp
-+int	_nc_putp_sp(
-+		SCREEN	*sp, 
-+		const char *name, 
-+		const char *string)
-+		{ return(*(int *)0); }
-+
- #undef putp
- int	putp(
- 		const char *string)
- 		{ return(*(int *)0); }
- 
-+#undef _nc_putp
-+int	_nc_putp(
-+		const char *name, 
-+		const char *string)
-+		{ return(*(int *)0); }
-+
-+#undef tputs_sp
-+int	tputs_sp(
-+		SCREEN	*sp, 
-+		const char *string, 
-+		int	affcnt, 
-+		NCURSES_OUTC_sp outc)
-+		{ return(*(int *)0); }
-+
-+#undef _nc_outc_wrapper
-+int	_nc_outc_wrapper(
-+		SCREEN	*sp, 
-+		int	c)
-+		{ return(*(int *)0); }
-+
- #undef tputs
- int	tputs(
- 		const char *string, 
-@@ -3701,36 +4494,78 @@
- 
- /* ./tinfo/lib_ttyflags.c */
- 
-+#undef _nc_get_tty_mode_sp
-+int	_nc_get_tty_mode_sp(
-+		SCREEN	*sp, 
-+		struct termios *buf)
-+		{ return(*(int *)0); }
-+
- #undef _nc_get_tty_mode
- int	_nc_get_tty_mode(
- 		struct termios *buf)
- 		{ return(*(int *)0); }
- 
-+#undef _nc_set_tty_mode_sp
-+int	_nc_set_tty_mode_sp(
-+		SCREEN	*sp, 
-+		struct termios *buf)
-+		{ return(*(int *)0); }
-+
- #undef _nc_set_tty_mode
- int	_nc_set_tty_mode(
- 		struct termios *buf)
- 		{ return(*(int *)0); }
- 
-+#undef def_shell_mode_sp
-+int	def_shell_mode_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef def_shell_mode
- int	def_shell_mode(void)
- 		{ return(*(int *)0); }
- 
-+#undef def_prog_mode_sp
-+int	def_prog_mode_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef def_prog_mode
- int	def_prog_mode(void)
- 		{ return(*(int *)0); }
- 
-+#undef reset_prog_mode_sp
-+int	reset_prog_mode_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef reset_prog_mode
- int	reset_prog_mode(void)
- 		{ return(*(int *)0); }
- 
-+#undef reset_shell_mode_sp
-+int	reset_shell_mode_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef reset_shell_mode
- int	reset_shell_mode(void)
- 		{ return(*(int *)0); }
- 
-+#undef savetty_sp
-+int	savetty_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef savetty
- int	savetty(void)
- 		{ return(*(int *)0); }
- 
-+#undef resetty_sp
-+int	resetty_sp(
-+		SCREEN	*sp)
-+		{ return(*(int *)0); }
-+
- #undef resetty
- int	resetty(void)
- 		{ return(*(int *)0); }
-@@ -3810,6 +4645,13 @@
- 
- /* ./tinfo/setbuf.c */
- 
-+#undef _nc_set_buffer_sp
-+void	_nc_set_buffer_sp(
-+		SCREEN	*sp, 
-+		FILE	*ofp, 
-+		NCURSES_BOOL buffered)
-+		{ /* void */ }
-+
- #undef _nc_set_buffer
- void	_nc_set_buffer(
- 		FILE	*ofp, 
-@@ -3901,8 +4743,8 @@
- 
- /* ./unctrl.c */
- 
--#undef _nc_unctrl
--char	*_nc_unctrl(
-+#undef unctrl_sp
-+char	*unctrl_sp(
- 		SCREEN	*sp, 
- 		chtype	ch)
- 		{ return(*(char **)0); }
-@@ -4173,6 +5015,13 @@
- 
- /* ./base/define_key.c */
- 
-+#undef define_key_sp
-+int	define_key_sp(
-+		SCREEN	*sp, 
-+		const char *str, 
-+		int	keycode)
-+		{ return(*(int *)0); }
-+
- #undef define_key
- int	define_key(
- 		const char *str, 
-@@ -4187,6 +5036,12 @@
- 
- /* ./base/key_defined.c */
- 
-+#undef key_defined_sp
-+int	key_defined_sp(
-+		SCREEN	*sp, 
-+		const char *str)
-+		{ return(*(int *)0); }
-+
- #undef key_defined
- int	key_defined(
- 		const char *str)
-@@ -4194,6 +5049,13 @@
- 
- /* ./base/keybound.c */
- 
-+#undef keybound_sp
-+char	*keybound_sp(
-+		SCREEN	*sp, 
-+		int	code, 
-+		int	count)
-+		{ return(*(char **)0); }
-+
- #undef keybound
- char	*keybound(
- 		int	code, 
-@@ -4202,6 +5064,13 @@
- 
- /* ./base/keyok.c */
- 
-+#undef keyok_sp
-+int	keyok_sp(
-+		SCREEN	*sp, 
-+		int	c, 
-+		NCURSES_BOOL flag)
-+		{ return(*(int *)0); }
-+
- #undef keyok
- int	keyok(
- 		int	c, 
-diff -Naur ncurses-5.7.orig/ncurses/Makefile.in ncurses-5.7/ncurses/Makefile.in
---- ncurses-5.7.orig/ncurses/Makefile.in	2008-10-18 07:11:54.000000000 -0700
-+++ ncurses-5.7/ncurses/Makefile.in	2009-07-19 15:04:13.000000000 -0700
-@@ -1,6 +1,6 @@
--# $Id: Makefile.in,v 1.113 2008/10/18 14:11:54 tom Exp $
-+# $Id: Makefile.in,v 1.117 2009/07/04 16:36:11 tom Exp $
- ##############################################################################
--# Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.                #
-+# Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.                #
- #                                                                            #
- # Permission is hereby granted, free of charge, to any person obtaining a    #
- # copy of this software and associated documentation files (the "Software"), #
-@@ -71,6 +71,7 @@
- LIBTOOL_LINK	= @LIB_LINK@
- LIBTOOL_INSTALL	= @LIB_INSTALL@
- LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
-+LT_UNDEF	= @LT_UNDEF@
- 
- INSTALL		= @INSTALL@
- INSTALL_LIB	= @INSTALL@ @INSTALL_LIB@
-@@ -78,7 +79,7 @@
- INSTALL_DATA	= @INSTALL_DATA@
- 
- AR		= @AR@
--AR_OPTS		= @AR_OPTS@
-+ARFLAGS		= @ARFLAGS@
- AWK		= @AWK@
- LD		= @LD@
- LN_S		= @LN_S@
-@@ -164,11 +165,12 @@
- 	hashmap$x \
- 	lib_mvcur$x
- 
--base	= $(srcdir)/base
--serial	= $(srcdir)/tty
--tinfo	= $(srcdir)/tinfo
--trace	= $(srcdir)/trace
--wide	= $(srcdir)/widechar
-+base	 = $(srcdir)/base
-+serial	 = $(srcdir)/tty
-+tinfo	 = $(srcdir)/tinfo
-+trace	 = $(srcdir)/trace
-+wide	 = $(srcdir)/widechar
-+win32con = $(srcdir)/win32con
- 
- ################################################################################
- all \
-@@ -204,7 +206,7 @@
- 		../include/hashsize.h
- 	$(BUILD_CC) -o $@ $(BUILD_CCFLAGS) -DMAIN_PROGRAM $(tinfo)/comp_hash.c $(BUILD_LDFLAGS) $(BUILD_LIBS)
- 
--./expanded.c : $(serial)/MKexpanded.sh
-+./expanded.c : curses.priv.h $(serial)/MKexpanded.sh
- 	sh -e $(serial)/MKexpanded.sh "$(CPP)" $(CPPFLAGS) > $@
- 
- ./comp_captab.c: \
-diff -Naur ncurses-5.7.orig/ncurses/modules ncurses-5.7/ncurses/modules
---- ncurses-5.7.orig/ncurses/modules	2007-09-08 15:03:34.000000000 -0700
-+++ ncurses-5.7/ncurses/modules	2009-07-19 15:04:15.000000000 -0700
-@@ -1,6 +1,6 @@
--# $Id: modules,v 1.112 2007/09/08 22:03:34 tom Exp $
-+# $Id: modules,v 1.113 2009/07/11 17:45:32 tom Exp $
- ##############################################################################
--# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.                #
-+# Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.                #
- #                                                                            #
- # Permission is hereby granted, free of charge, to any person obtaining a    #
- # copy of this software and associated documentation files (the "Software"), #
-@@ -162,7 +162,9 @@
- add_tries	lib		$(tinfo)
- alloc_ttype	lib		$(tinfo)	../include/term.h $(INCDIR)/term_entry.h $(INCDIR)/tic.h
- codes		lib		.
-+comp_captab	lib		.		$(INCDIR)/tic.h ../include/term.h ../include/hashsize.h
- comp_error	lib		$(tinfo)	$(INCDIR)/tic.h
-+comp_hash	lib		$(tinfo)	../include/term.h $(INCDIR)/tic.h ../include/hashsize.h
- db_iterator	lib		$(tinfo)	$(INCDIR)/tic.h
- doalloc		lib		$(tinfo)
- entries		lib		$(tinfo)	../include/term.h $(INCDIR)/tic.h
-@@ -212,9 +214,7 @@
- @ ticlib
- alloc_entry	lib		$(tinfo)	../include/term.h $(INCDIR)/term_entry.h $(INCDIR)/tic.h
- captoinfo	lib		$(tinfo)	$(INCDIR)/tic.h
--comp_captab	lib		.		$(INCDIR)/tic.h ../include/term.h ../include/hashsize.h
- comp_expand	lib		$(tinfo)	$(INCDIR)/tic.h
--comp_hash	lib		$(tinfo)	../include/term.h $(INCDIR)/tic.h ../include/hashsize.h
- comp_parse	lib		$(tinfo)	../include/term.h $(INCDIR)/term_entry.h $(INCDIR)/tic.h
- comp_scan	lib		$(tinfo)	$(INCDIR)/tic.h
- parse_entry	lib		$(tinfo)	../include/term.h $(INCDIR)/term_entry.h $(INCDIR)/tic.h ../include/parametrized.h $(INCDIR)/capdefaults.c
-diff -Naur ncurses-5.7.orig/ncurses/README ncurses-5.7/ncurses/README
---- ncurses-5.7.orig/ncurses/README	2006-04-22 15:19:37.000000000 -0700
-+++ ncurses-5.7/ncurses/README	2009-07-19 15:04:11.000000000 -0700
-@@ -1,5 +1,5 @@
- -------------------------------------------------------------------------------
---- Copyright (c) 1998-2000,2006 Free Software Foundation, Inc.               --
-+-- Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.               --
- --                                                                           --
- -- Permission is hereby granted, free of charge, to any person obtaining a   --
- -- copy of this software and associated documentation files (the             --
-@@ -25,7 +25,26 @@
- -- sale, use or other dealings in this Software without prior written        --
- -- authorization.                                                            --
- -------------------------------------------------------------------------------
---- $Id: README,v 1.9 2006/04/22 22:19:37 tom Exp $
-+-- $Id: README,v 1.10 2009/06/27 14:44:30 tom Exp $
- -------------------------------------------------------------------------------
- For discussion of the package internals, see hackguide.html in the doc/html
- directory.
-+
-+-------------------------------------------------------------------------------
-+The llib-lXXXX files could be used as lint-library sources (and were, at one
-+time).  However, they are actually used as a documentation aid to keep track
-+of changes to the public/private interfaces in ncurses.  Most of the text in
-+these files is generated using cproto; some manual cleanup and adjustment of
-+types (to reflect #define's in curses.h) is needed.  The functions listed in
-+the llib-lXXXX files do not correspond to the default configure options; some
-+additional ones are added to include "all" of the entrypoints for each of the
-+major configurations (normal, wide-character, threaded):
-+
-+	--disable-macros
-+	--disable-root-environ
-+	--enable-expanded
-+	--enable-getcap
-+	--enable-getcap-cache
-+	--enable-sp-funcs
-+	--enable-termcap
-+	--with-develop
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/access.c ncurses-5.7/ncurses/tinfo/access.c
---- ncurses-5.7.orig/ncurses/tinfo/access.c	2007-11-17 16:57:53.000000000 -0800
-+++ ncurses-5.7/ncurses/tinfo/access.c	2009-07-19 15:03:51.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -38,7 +38,7 @@
- #include <tic.h>
- #include <nc_alloc.h>
- 
--MODULE_ID("$Id: access.c,v 1.14 2007/11/18 00:57:53 tom Exp $")
-+MODULE_ID("$Id: access.c,v 1.15 2009/04/05 00:03:10 tom Exp $")
- 
- #define LOWERCASE(c) ((isalpha(UChar(c)) && isupper(UChar(c))) ? tolower(UChar(c)) : (c))
- 
-@@ -97,7 +97,7 @@
- 	test = path;
-     else
- 	test++;
--    return (test - path);
-+    return (unsigned) (test - path);
- }
- 
- NCURSES_EXPORT(char *)
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/alloc_ttype.c ncurses-5.7/ncurses/tinfo/alloc_ttype.c
---- ncurses-5.7.orig/ncurses/tinfo/alloc_ttype.c	2008-10-12 09:12:00.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/alloc_ttype.c	2009-07-19 15:03:53.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1999-2006,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1999-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -43,7 +43,7 @@
- #include <tic.h>
- #include <term_entry.h>
- 
--MODULE_ID("$Id: alloc_ttype.c,v 1.17 2008/10/12 16:12:00 tom Exp $")
-+MODULE_ID("$Id: alloc_ttype.c,v 1.18 2009/04/18 21:01:38 tom Exp $")
- 
- #if NCURSES_XNAMES
- /*
-@@ -147,10 +147,10 @@
- /*
-  * Returns the first index in ext_Names[] for the given token-type
-  */
--static int
-+static unsigned
- _nc_first_ext_name(TERMTYPE *tp, int token_type)
- {
--    int first;
-+    unsigned first;
- 
-     switch (token_type) {
-     case BOOLEAN:
-@@ -160,7 +160,7 @@
- 	first = tp->ext_Booleans;
- 	break;
-     case STRING:
--	first = tp->ext_Booleans + tp->ext_Numbers;
-+	first = (unsigned) (tp->ext_Booleans + tp->ext_Numbers);
- 	break;
-     default:
- 	first = 0;
-@@ -172,17 +172,17 @@
- /*
-  * Returns the last index in ext_Names[] for the given token-type
-  */
--static int
-+static unsigned
- _nc_last_ext_name(TERMTYPE *tp, int token_type)
- {
--    int last;
-+    unsigned last;
- 
-     switch (token_type) {
-     case BOOLEAN:
- 	last = tp->ext_Booleans;
- 	break;
-     case NUMBER:
--	last = tp->ext_Booleans + tp->ext_Numbers;
-+	last = (unsigned) (tp->ext_Booleans + tp->ext_Numbers);
- 	break;
-     default:
-     case STRING:
-@@ -204,7 +204,7 @@
- 
-     for (j = first; j < last; j++) {
- 	if (!strcmp(name, tp->ext_Names[j])) {
--	    return j;
-+	    return (int) j;
- 	}
-     }
-     return -1;
-@@ -244,7 +244,7 @@
-     int first, last;
- 
-     if ((first = _nc_find_ext_name(tp, name, token_type)) >= 0) {
--	last = NUM_EXT_NAMES(tp) - 1;
-+	last = (int) NUM_EXT_NAMES(tp) - 1;
- 	for (j = first; j < last; j++) {
- 	    tp->ext_Names[j] = tp->ext_Names[j + 1];
- 	}
-@@ -254,22 +254,22 @@
- 	    last = tp->num_Booleans - 1;
- 	    for (j = first; j < last; j++)
- 		tp->Booleans[j] = tp->Booleans[j + 1];
--	    tp->ext_Booleans -= 1;
--	    tp->num_Booleans -= 1;
-+	    tp->ext_Booleans--;
-+	    tp->num_Booleans--;
- 	    break;
- 	case NUMBER:
- 	    last = tp->num_Numbers - 1;
- 	    for (j = first; j < last; j++)
- 		tp->Numbers[j] = tp->Numbers[j + 1];
--	    tp->ext_Numbers -= 1;
--	    tp->num_Numbers -= 1;
-+	    tp->ext_Numbers--;
-+	    tp->num_Numbers--;
- 	    break;
- 	case STRING:
- 	    last = tp->num_Strings - 1;
- 	    for (j = first; j < last; j++)
- 		tp->Strings[j] = tp->Strings[j + 1];
--	    tp->ext_Strings -= 1;
--	    tp->num_Strings -= 1;
-+	    tp->ext_Strings--;
-+	    tp->num_Strings--;
- 	    break;
- 	}
- 	return TRUE;
-@@ -307,22 +307,22 @@
- 
-     switch (token_type) {
-     case BOOLEAN:
--	tp->ext_Booleans += 1;
--	tp->num_Booleans += 1;
-+	tp->ext_Booleans++;
-+	tp->num_Booleans++;
- 	tp->Booleans = typeRealloc(NCURSES_SBOOL, tp->num_Booleans, tp->Booleans);
- 	for (k = tp->num_Booleans - 1; k > j; k--)
- 	    tp->Booleans[k] = tp->Booleans[k - 1];
- 	break;
-     case NUMBER:
--	tp->ext_Numbers += 1;
--	tp->num_Numbers += 1;
-+	tp->ext_Numbers++;
-+	tp->num_Numbers++;
- 	tp->Numbers = typeRealloc(short, tp->num_Numbers, tp->Numbers);
- 	for (k = tp->num_Numbers - 1; k > j; k--)
- 	    tp->Numbers[k] = tp->Numbers[k - 1];
- 	break;
-     case STRING:
--	tp->ext_Strings += 1;
--	tp->num_Strings += 1;
-+	tp->ext_Strings++;
-+	tp->num_Strings++;
- 	tp->Strings = typeRealloc(char *, tp->num_Strings, tp->Strings);
- 	for (k = tp->num_Strings - 1; k > j; k--)
- 	    tp->Strings[k] = tp->Strings[k - 1];
-@@ -345,7 +345,7 @@
- 
-     for (j = first; j < last;) {
- 	char *name = to->ext_Names[j];
--	unsigned j_str = to->num_Strings - first - to->ext_Strings;
-+	int j_str = to->num_Strings - first - to->ext_Strings;
- 
- 	if (to->Strings[j + j_str] == CANCELLED_STRING) {
- 	    if ((k = _nc_find_ext_name(from, to->ext_Names[j], BOOLEAN)) >= 0) {
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/captoinfo.c ncurses-5.7/ncurses/tinfo/captoinfo.c
---- ncurses-5.7.orig/ncurses/tinfo/captoinfo.c	2008-08-16 12:24:51.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/captoinfo.c	2009-07-19 15:03:48.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -93,7 +93,7 @@
- #include <ctype.h>
- #include <tic.h>
- 
--MODULE_ID("$Id: captoinfo.c,v 1.52 2008/08/16 19:24:51 tom Exp $")
-+MODULE_ID("$Id: captoinfo.c,v 1.53 2009/03/28 20:44:23 tom Exp $")
- 
- #define MAX_PUSHED	16	/* max # args we can push onto the stack */
- 
-@@ -128,7 +128,7 @@
-     size_t have = (d - my_string);
-     size_t need = have + strlen(s) + 2;
-     if (need > my_length) {
--	my_string = (char *) realloc(my_string, my_length = (need + need));
-+	my_string = (char *) _nc_doalloc(my_string, my_length = (need + need));
- 	if (my_string == 0)
- 	    _nc_err_abort(MSG_NO_MEMORY);
- 	d = my_string + have;
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/comp_hash.c ncurses-5.7/ncurses/tinfo/comp_hash.c
---- ncurses-5.7.orig/ncurses/tinfo/comp_hash.c	2008-08-16 10:06:53.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/comp_hash.c	2009-07-19 15:04:17.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -50,7 +50,7 @@
- #define DEBUG(level, params)	/*nothing */
- #endif
- 
--MODULE_ID("$Id: comp_hash.c,v 1.36 2008/08/16 17:06:53 tom Exp $")
-+MODULE_ID("$Id: comp_hash.c,v 1.45 2009/07/18 20:30:21 tom Exp $")
- 
- static int hash_function(const char *);
- 
-@@ -91,8 +91,7 @@
- 	hash_table[hashvalue] = i;
-     }
- 
--    DEBUG(4, ("Hash table complete: %d collisions out of %d entries",
--	      collisions, CAPTABSIZE));
-+    printf("/* %d collisions out of %d entries */\n", collisions, CAPTABSIZE);
- }
- #endif
- 
-@@ -121,16 +120,24 @@
-     return (int) (sum % HASHTABSIZE);
- }
- 
-+#ifndef MAIN_PROGRAM
-+
-+#define SameName(a,b,termcap) (termcap ? !strncmp(a,b,2) : !strcmp(a,b))
-+#if 0
-+static bool
-+same_name(const char *a, const char *b, bool termcap)
-+{
-+    fprintf(stderr, "compare(%s,%s)\n", a, b);
-+    return SameName(a, b, termcap);
-+}
-+#else
-+#define same_name(a,b,termcap) SameName(a,b,termcap)
-+#endif
-+
- /*
-- *	struct name_table_entry *
-- *	find_entry(string)
-- *
-- *	Finds the entry for the given string in the hash table if present.
-- *	Returns a pointer to the entry in the table or 0 if not found.
-- *
-+ * Finds the entry for the given string in the hash table if present.
-+ * Returns a pointer to the entry in the table or 0 if not found.
-  */
--
--#ifndef MAIN_PROGRAM
- NCURSES_EXPORT(struct name_table_entry const *)
- _nc_find_entry(const char *string,
- 	       const short *hash_table)
-@@ -142,11 +149,15 @@
-     hashvalue = hash_function(string);
- 
-     if (hash_table[hashvalue] >= 0) {
--	real_table = _nc_get_table(hash_table != _nc_get_hash_table(FALSE));
-+	bool termcap = (hash_table != _nc_get_hash_table(FALSE));
-+
-+	real_table = _nc_get_table(termcap);
- 	ptr = real_table + hash_table[hashvalue];
--	while (strcmp(ptr->nte_name, string) != 0) {
--	    if (ptr->nte_link < 0)
--		return 0;
-+	while (!same_name(ptr->nte_name, string, termcap)) {
-+	    if (ptr->nte_link < 0) {
-+		ptr = 0;
-+		break;
-+	    }
- 	    ptr = real_table + (ptr->nte_link + hash_table[HASHTABSIZE]);
- 	}
-     }
-@@ -155,29 +166,36 @@
- }
- 
- /*
-- *	struct name_table_entry *
-- *	find_type_entry(string, type, table)
-+ * Finds the entry for the given name with the given type in the given table if
-+ * present (as distinct from _nc_find_entry, which finds the last entry
-+ * regardless of type).
-  *
-- *	Finds the first entry for the given name with the given type in the
-- *	given table if present (as distinct from find_entry, which finds the
-- *	the last entry regardless of type).  You can use this if you detect
-- *	a name clash.  It's slower, though.  Returns a pointer to the entry
-- *	in the table or 0 if not found.
-+ * Returns a pointer to the entry in the table or 0 if not found.
-  */
--
- NCURSES_EXPORT(struct name_table_entry const *)
- _nc_find_type_entry(const char *string,
- 		    int type,
--		    const struct name_table_entry *table)
-+		    bool termcap)
- {
--    struct name_table_entry const *ptr;
-+    struct name_table_entry const *ptr = NULL;
-+    const short *hash_table = _nc_get_hash_table(termcap);
-+    int hashvalue = hash_function(string);
- 
--    for (ptr = table; ptr < table + CAPTABSIZE; ptr++) {
--	if (ptr->nte_type == type && strcmp(string, ptr->nte_name) == 0)
--	    return (ptr);
-+    if (hash_table[hashvalue] >= 0) {
-+	const struct name_table_entry *const table = _nc_get_table(termcap);
-+
-+	ptr = table + hash_table[hashvalue];
-+	while (ptr->nte_type != type
-+	       || !same_name(ptr->nte_name, string, termcap)) {
-+	    if (ptr->nte_link < 0) {
-+		ptr = 0;
-+		break;
-+	    }
-+	    ptr = table + (ptr->nte_link + hash_table[HASHTABSIZE]);
-+	}
-     }
- 
--    return ((struct name_table_entry *) NULL);
-+    return ptr;
- }
- #endif
- 
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/comp_parse.c ncurses-5.7/ncurses/tinfo/comp_parse.c
---- ncurses-5.7.orig/ncurses/tinfo/comp_parse.c	2008-08-16 14:58:16.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/comp_parse.c	2009-07-19 15:04:17.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -53,7 +53,7 @@
- #include <tic.h>
- #include <term_entry.h>
- 
--MODULE_ID("$Id: comp_parse.c,v 1.69 2008/08/16 21:58:16 tom Exp $")
-+MODULE_ID("$Id: comp_parse.c,v 1.70 2009/07/18 20:38:52 tom Exp $")
- 
- static void sanity_check2(TERMTYPE *, bool);
- NCURSES_IMPEXP void NCURSES_API(*_nc_check_termtype2) (TERMTYPE *, bool) = sanity_check2;
-@@ -92,16 +92,18 @@
-     }
-     return src;
- }
-+#define ForceBar(dst, src) ((strchr(src, '|') == 0) ? force_bar(dst, src) : src)
- 
- NCURSES_EXPORT(bool)
- _nc_entry_match(char *n1, char *n2)
- /* do any of the aliases in a pair of terminal names match? */
- {
-     char *pstart, *qstart, *pend, *qend;
--    char nc1[MAX_NAME_SIZE + 2], nc2[MAX_NAME_SIZE + 2];
-+    char nc1[MAX_NAME_SIZE + 2];
-+    char nc2[MAX_NAME_SIZE + 2];
- 
--    n1 = force_bar(nc1, n1);
--    n2 = force_bar(nc2, n2);
-+    n1 = ForceBar(nc1, n1);
-+    n2 = ForceBar(nc2, n2);
- 
-     for (pstart = n1; (pend = strchr(pstart, '|')); pstart = pend + 1)
- 	for (qstart = n2; (qend = strchr(qstart, '|')); qstart = qend + 1)
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/comp_scan.c ncurses-5.7/ncurses/tinfo/comp_scan.c
---- ncurses-5.7.orig/ncurses/tinfo/comp_scan.c	2008-08-16 12:22:55.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/comp_scan.c	2009-07-19 15:03:59.000000000 -0700
-@@ -51,7 +51,7 @@
- #include <term_entry.h>
- #include <tic.h>
- 
--MODULE_ID("$Id: comp_scan.c,v 1.83 2008/08/16 19:22:55 tom Exp $")
-+MODULE_ID("$Id: comp_scan.c,v 1.84 2009/05/09 16:37:42 tom Exp $")
- 
- /*
-  * Maximum length of string capability we'll accept before raising an error.
-@@ -61,19 +61,13 @@
- 
- #define iswhite(ch)	(ch == ' '  ||  ch == '\t')
- 
--NCURSES_EXPORT_VAR(int)
--_nc_syntax = 0;			/* termcap or terminfo? */
--NCURSES_EXPORT_VAR(long)
--_nc_curr_file_pos = 0;		/* file offset of current line */
--NCURSES_EXPORT_VAR(long)
--_nc_comment_start = 0;		/* start of comment range before name */
--NCURSES_EXPORT_VAR(long)
--_nc_comment_end = 0;		/* end of comment range before name */
--NCURSES_EXPORT_VAR(long)
--_nc_start_line = 0;		/* start line of current entry */
-+NCURSES_EXPORT_VAR (int) _nc_syntax = 0;         /* termcap or terminfo? */
-+NCURSES_EXPORT_VAR (long) _nc_curr_file_pos = 0; /* file offset of current line */
-+NCURSES_EXPORT_VAR (long) _nc_comment_start = 0; /* start of comment range before name */
-+NCURSES_EXPORT_VAR (long) _nc_comment_end = 0;   /* end of comment range before name */
-+NCURSES_EXPORT_VAR (long) _nc_start_line = 0;    /* start line of current entry */
- 
--NCURSES_EXPORT_VAR(struct token)
--_nc_curr_token =
-+NCURSES_EXPORT_VAR (struct token) _nc_curr_token =
- {
-     0, 0, 0
- };
-@@ -91,8 +85,7 @@
- static char *pushname;
- 
- #if NCURSES_EXT_FUNCS
--NCURSES_EXPORT_VAR(bool)
--_nc_disable_period = FALSE;	/* used by tic -a option */
-+NCURSES_EXPORT_VAR (bool) _nc_disable_period = FALSE; /* used by tic -a option */
- #endif
- 
- /*****************************************************************************
-@@ -637,7 +630,8 @@
- 		/* just to get rid of the compiler warning */
- 		type = UNDEF;
- 		if (!silent)
--		    _nc_warning("Illegal character - '%s'", unctrl((chtype) ch));
-+		    _nc_warning("Illegal character - '%s'",
-+				unctrl((chtype) ch));
- 	    }
- 	}			/* end else (first_column == FALSE) */
-     }				/* end else (ch != EOF) */
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/entries.c ncurses-5.7/ncurses/tinfo/entries.c
---- ncurses-5.7.orig/ncurses/tinfo/entries.c	2008-09-27 06:11:10.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/entries.c	2009-07-19 15:04:15.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 2006-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 2006-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -28,6 +28,7 @@
- 
- /****************************************************************************
-  *  Author: Thomas E. Dickey                                                *
-+ *     and: Juergen Pfeifer                                                 *
-  ****************************************************************************/
- 
- #include <curses.priv.h>
-@@ -37,7 +38,7 @@
- #include <tic.h>
- #include <term_entry.h>
- 
--MODULE_ID("$Id: entries.c,v 1.8 2008/09/27 13:11:10 tom Exp $")
-+MODULE_ID("$Id: entries.c,v 1.15 2009/07/11 14:42:42 tom Exp $")
- 
- /****************************************************************************
-  *
-@@ -119,6 +120,11 @@
- #if NO_LEAKS
-     _nc_free_tparm();
-     _nc_tgetent_leaks();
-+
-+    if (TerminalOf(CURRENT_SCREEN) != 0) {
-+	del_curterm(TerminalOf(CURRENT_SCREEN));
-+    }
-+
-     _nc_free_entries(_nc_head);
-     _nc_get_type(0);
-     _nc_first_name(0);
-@@ -131,6 +137,12 @@
- 
-     if ((s = _nc_home_terminfo()) != 0)
- 	free(s);
-+
-+#ifdef TRACE
-+    trace(0);
-+    _nc_trace_buf(-1, 0);
-+#endif
-+
- #endif /* NO_LEAKS */
-     returnVoid;
- }
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/hashed_db.c ncurses-5.7/ncurses/tinfo/hashed_db.c
---- ncurses-5.7.orig/ncurses/tinfo/hashed_db.c	2006-08-19 12:48:38.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/hashed_db.c	2009-07-19 15:02:02.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 2006 Free Software Foundation, Inc.                        *
-+ * Copyright (c) 2006,2008 Free Software Foundation, Inc.                   *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -27,7 +27,7 @@
-  ****************************************************************************/
- 
- /****************************************************************************
-- *  Author: Thomas E. Dickey                        2006                    *
-+ *  Author: Thomas E. Dickey                        2006-on                 *
-  ****************************************************************************/
- 
- #include <curses.priv.h>
-@@ -36,7 +36,7 @@
- 
- #if USE_HASHED_DB
- 
--MODULE_ID("$Id: hashed_db.c,v 1.13 2006/08/19 19:48:38 tom Exp $")
-+MODULE_ID("$Id: hashed_db.c,v 1.14 2008/12/13 20:59:02 tom Exp $")
- 
- #if HASHED_DB_API >= 2
- static DBC *cursor;
-@@ -49,27 +49,30 @@
- _nc_db_open(const char *path, bool modify)
- {
-     DB *result = 0;
-+    int code;
- 
- #if HASHED_DB_API >= 4
-     db_create(&result, NULL, 0);
--    result->open(result,
--		 NULL,
--		 path,
--		 NULL,
--		 DB_HASH,
--		 modify ? DB_CREATE : DB_RDONLY,
--		 0644);
-+    if ((code = result->open(result,
-+			     NULL,
-+			     path,
-+			     NULL,
-+			     DB_HASH,
-+			     modify ? DB_CREATE : DB_RDONLY,
-+			     0644)) != 0) {
-+	result = 0;
-+    }
- #elif HASHED_DB_API >= 3
-     db_create(&result, NULL, 0);
--    result->open(result,
--		 path,
--		 NULL,
--		 DB_HASH,
--		 modify ? DB_CREATE : DB_RDONLY,
--		 0644);
-+    if ((code = result->open(result,
-+			     path,
-+			     NULL,
-+			     DB_HASH,
-+			     modify ? DB_CREATE : DB_RDONLY,
-+			     0644)) != 0) {
-+	result = 0;
-+    }
- #elif HASHED_DB_API >= 2
--    int code;
--
-     if ((code = db_open(path,
- 			DB_HASH,
- 			modify ? DB_CREATE : DB_RDONLY,
-@@ -77,21 +80,22 @@
- 			(DB_ENV *) 0,
- 			(DB_INFO *) 0,
- 			&result)) != 0) {
--	T(("cannot open %s: %s", path, strerror(code)));
- 	result = 0;
--    } else {
--	T(("opened %s", path));
-     }
- #else
--    result = dbopen(path,
--		    modify ? (O_CREAT | O_RDWR) : O_RDONLY,
--		    0644,
--		    DB_HASH,
--		    NULL);
-+    if ((result = dbopen(path,
-+			 modify ? (O_CREAT | O_RDWR) : O_RDONLY,
-+			 0644,
-+			 DB_HASH,
-+			 NULL)) == 0) {
-+	code = errno;
-+    }
-+#endif
-     if (result != 0) {
- 	T(("opened %s", path));
-+    } else {
-+	T(("cannot open %s: %s", path, strerror(code)));
-     }
--#endif
-     return result;
- }
- 
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/init_keytry.c ncurses-5.7/ncurses/tinfo/init_keytry.c
---- ncurses-5.7.orig/ncurses/tinfo/init_keytry.c	2008-05-24 14:44:51.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/init_keytry.c	2009-07-19 15:03:59.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1999-2006,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1999-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -27,16 +27,11 @@
-  ****************************************************************************/
- 
- #include <curses.priv.h>
--
--#include <term.h>
--/* keypad_xmit, keypad_local, meta_on, meta_off */
--/* cursor_visible,cursor_normal,cursor_invisible */
--
- #include <tic.h>		/* struct tinfo_fkeys */
- 
- #include <term_entry.h>
- 
--MODULE_ID("$Id: init_keytry.c,v 1.12 2008/05/24 21:44:51 tom Exp $")
-+MODULE_ID("$Id: init_keytry.c,v 1.14 2009/05/10 00:48:29 tom Exp $")
- 
- /*
- **      _nc_init_keytry()
-@@ -50,7 +45,7 @@
-  * than cur_term.
-  */
- #undef CUR
--#define CUR (sp->_term)->type.
-+#define CUR SP_TERMTYPE 
- 
- #if	BROKEN_LINKER
- #undef	_nc_tinfo_fkeys
-@@ -102,7 +97,8 @@
- 		if (name != 0
- 		    && *name == 'k'
- 		    && value != 0
--		    && key_defined(value) == 0) {
-+		    && NCURSES_SP_NAME(key_defined) (NCURSES_SP_ARGx
-+						     value) == 0) {
- 		    (void) _nc_add_to_try(&(sp->_keytry),
- 					  value,
- 					  n - STRCOUNT + KEY_MAX);
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_acs.c ncurses-5.7/ncurses/tinfo/lib_acs.c
---- ncurses-5.7.orig/ncurses/tinfo/lib_acs.c	2008-08-16 12:22:55.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/lib_acs.c	2009-07-19 15:04:06.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -30,17 +30,21 @@
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-  *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                         2008                    *
-  ****************************************************************************/
- 
- #include <curses.priv.h>
--#include <term.h>		/* ena_acs, acs_chars */
- 
--MODULE_ID("$Id: lib_acs.c,v 1.36 2008/08/16 19:22:55 tom Exp $")
-+#ifndef CUR
-+#define CUR SP_TERMTYPE
-+#endif
-+
-+MODULE_ID("$Id: lib_acs.c,v 1.40 2009/06/06 18:08:04 tom Exp $")
- 
- #if BROKEN_LINKER || USE_REENTRANT
- #define MyBuffer _nc_prescreen.real_acs_map
--NCURSES_EXPORT_VAR(chtype *)
--_nc_acs_map(void)
-+NCURSES_EXPORT(chtype *)
-+NCURSES_PUBLIC_VAR(acs_map) (void)
- {
-     if (MyBuffer == 0)
- 	MyBuffer = typeCalloc(chtype, ACS_LEN);
-@@ -48,17 +52,35 @@
- }
- #undef MyBuffer
- #else
--NCURSES_EXPORT_VAR(chtype) acs_map[ACS_LEN] =
-+NCURSES_EXPORT_VAR (chtype) acs_map[ACS_LEN] =
- {
-     0
- };
- #endif
- 
-+#ifdef USE_TERM_DRIVER
-+NCURSES_EXPORT(chtype)
-+NCURSES_SP_NAME(_nc_acs_char) (NCURSES_SP_DCLx int c)
-+{
-+    chtype *map;
-+    if (c < 0 || c >= ACS_LEN)
-+	return (chtype) 0;
-+    map = (SP_PARM != 0) ? SP_PARM->_acs_map :
-+#if BROKEN_LINKER || USE_REENTRANT
-+	_nc_prescreen.real_acs_map
-+#else
-+	acs_map
-+#endif
-+	;
-+    return map[c];
-+}
-+#endif /* USE_TERM_DRIVER */
-+
- NCURSES_EXPORT(void)
--_nc_init_acs(void)
-+NCURSES_SP_NAME(_nc_init_acs) (NCURSES_SP_DCL0)
- {
-     chtype *fake_map = acs_map;
--    chtype *real_map = SP != 0 ? SP->_acs_map : fake_map;
-+    chtype *real_map = SP_PARM != 0 ? SP_PARM->_acs_map : fake_map;
-     int j;
- 
-     T(("initializing ACS map"));
-@@ -72,8 +94,8 @@
- 	for (j = 1; j < ACS_LEN; ++j) {
- 	    real_map[j] = 0;
- 	    fake_map[j] = A_ALTCHARSET | j;
--	    if (SP)
--		SP->_screen_acs_map[j] = FALSE;
-+	    if (SP_PARM)
-+		SP_PARM->_screen_acs_map[j] = FALSE;
- 	}
-     } else {
- 	for (j = 1; j < ACS_LEN; ++j) {
-@@ -119,6 +141,9 @@
-     real_map['|'] = '!';	/* should be not-equal */
-     real_map['}'] = 'f';	/* should be pound-sterling symbol */
- 
-+#ifdef USE_TERM_DRIVER
-+    CallDriver_2(SP_PARM, initacs, real_map, fake_map);
-+#else
-     if (ena_acs != NULL) {
- 	TPUTS_TRACE("ena_acs");
- 	putp(ena_acs);
-@@ -191,4 +216,13 @@
- 	_nc_unlock_global(tracef);
-     }
- #endif /* TRACE */
-+#endif
-+}
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(void)
-+_nc_init_acs(void)
-+{
-+    NCURSES_SP_NAME(_nc_init_acs) (CURRENT_SCREEN);
- }
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_baudrate.c ncurses-5.7/ncurses/tinfo/lib_baudrate.c
---- ncurses-5.7.orig/ncurses/tinfo/lib_baudrate.c	2008-06-28 08:19:24.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/lib_baudrate.c	2009-07-19 15:03:59.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -38,7 +38,6 @@
-  */
- 
- #include <curses.priv.h>
--#include <term.h>		/* cur_term, pad_char */
- #include <termcap.h>		/* ospeed */
- #if defined(__FreeBSD__)
- #include <sys/param.h>
-@@ -80,7 +79,7 @@
- #undef USE_OLD_TTY
- #endif /* USE_OLD_TTY */
- 
--MODULE_ID("$Id: lib_baudrate.c,v 1.27 2008/06/28 15:19:24 tom Exp $")
-+MODULE_ID("$Id: lib_baudrate.c,v 1.29 2009/02/21 17:22:13 tom Exp $")
- 
- /*
-  *	int
-@@ -195,11 +194,11 @@
- }
- 
- NCURSES_EXPORT(int)
--baudrate(void)
-+NCURSES_SP_NAME(baudrate) (NCURSES_SP_DCL0)
- {
-     int result;
- 
--    T((T_CALLED("baudrate()")));
-+    T((T_CALLED("baudrate(%p)"), SP_PARM));
- 
-     /*
-      * In debugging, allow the environment symbol to override when we're
-@@ -207,7 +206,8 @@
-      * that take into account costs that depend on baudrate.
-      */
- #ifdef TRACE
--    if (!isatty(fileno(SP ? SP->_ofp : stdout))
-+    if (IsValidTIScreen(SP_PARM)
-+	&& !isatty(fileno(SP_PARM ? SP_PARM->_ofp : stdout))
- 	&& getenv("BAUDRATE") != 0) {
- 	int ret;
- 	if ((ret = _nc_getenv_num("BAUDRATE")) <= 0)
-@@ -217,22 +217,30 @@
-     }
- #endif
- 
--    if (cur_term != 0) {
-+    if (IsValidTIScreen(SP_PARM)) {
- #ifdef USE_OLD_TTY
--	result = cfgetospeed(&cur_term->Nttyb);
-+	result = cfgetospeed(&(TerminalOf(SP_PARM)->Nttyb));
- 	ospeed = _nc_ospeed(result);
- #else /* !USE_OLD_TTY */
- #ifdef TERMIOS
--	ospeed = cfgetospeed(&cur_term->Nttyb);
-+	ospeed = cfgetospeed(&(TerminalOf(SP_PARM)->Nttyb));
- #else
--	ospeed = cur_term->Nttyb.sg_ospeed;
-+	ospeed = TerminalOf(SP_PARM)->Nttyb.sg_ospeed;
- #endif
- 	result = _nc_baudrate(ospeed);
- #endif
--	cur_term->_baudrate = result;
-+	TerminalOf(SP_PARM)->_baudrate = result;
-     } else {
- 	result = ERR;
-     }
- 
-     returnCode(result);
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+baudrate(void)
-+{
-+    return NCURSES_SP_NAME(baudrate) (CURRENT_SCREEN);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_cur_term.c ncurses-5.7/ncurses/tinfo/lib_cur_term.c
---- ncurses-5.7.orig/ncurses/tinfo/lib_cur_term.c	2008-08-16 12:22:55.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/lib_cur_term.c	2009-07-19 15:04:04.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2003,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -40,12 +40,14 @@
- #include <term_entry.h>		/* TTY, cur_term */
- #include <termcap.h>		/* ospeed */
- 
--MODULE_ID("$Id: lib_cur_term.c,v 1.18 2008/08/16 19:22:55 tom Exp $")
-+MODULE_ID("$Id: lib_cur_term.c,v 1.22 2009/05/30 13:55:19 tom Exp $")
- 
- #undef CUR
- #define CUR termp->type.
- 
--#if BROKEN_LINKER || USE_REENTRANT
-+#if BROKEN_LINKER && !USE_REENTRANT
-+NCURSES_EXPORT_VAR(TERMINAL *) cur_term = 0;
-+#elif BROKEN_LINKER || USE_REENTRANT
- NCURSES_EXPORT(TERMINAL *)
- NCURSES_PUBLIC_VAR(cur_term) (void)
- {
-@@ -66,7 +68,9 @@
-     oldterm = cur_term;
-     if (SP)
- 	SP->_term = termp;
--#if BROKEN_LINKER || USE_REENTRANT
-+#if BROKEN_LINKER && !USE_REENTRANT
-+    cur_term = termp;
-+#elif BROKEN_LINKER || USE_REENTRANT
-     _nc_prescreen._cur_term = termp;
- #else
-     cur_term = termp;
-@@ -84,7 +88,7 @@
- }
- 
- NCURSES_EXPORT(int)
--del_curterm(TERMINAL * termp)
-+NCURSES_SP_NAME(del_curterm) (NCURSES_SP_DCLx TERMINAL * termp)
- {
-     int rc = ERR;
- 
-@@ -94,6 +98,10 @@
-     if (termp != 0) {
- 	_nc_free_termtype(&(termp->type));
- 	FreeIfNeeded(termp->_termname);
-+#if USE_HOME_TERMINFO
-+	if (_nc_globals.home_terminfo != 0)
-+	    FreeAndNull(_nc_globals.home_terminfo);
-+#endif
- 	free(termp);
- 	if (termp == cur_term)
- 	    set_curterm(0);
-@@ -103,3 +111,13 @@
- 
-     returnCode(rc);
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+del_curterm(TERMINAL * termp)
-+{
-+    int rc = ERR;
-+    rc = NCURSES_SP_NAME(del_curterm) (CURRENT_SCREEN, termp);
-+    return (rc);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_data.c ncurses-5.7/ncurses/tinfo/lib_data.c
---- ncurses-5.7.orig/ncurses/tinfo/lib_data.c	2008-08-23 15:16:15.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/lib_data.c	2009-07-19 15:04:09.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -30,6 +30,7 @@
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-  *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                                                 *
-  ****************************************************************************/
- 
- /*
-@@ -41,7 +42,7 @@
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_data.c,v 1.52 2008/08/23 22:16:15 tom Exp $")
-+MODULE_ID("$Id: lib_data.c,v 1.55 2009/06/07 14:48:25 tom Exp $")
- 
- /*
-  * OS/2's native linker complains if we don't initialize public data when
-@@ -51,17 +52,17 @@
- NCURSES_EXPORT(WINDOW *)
- NCURSES_PUBLIC_VAR(stdscr) (void)
- {
--    return SP ? SP->_stdscr : 0;
-+    return CURRENT_SCREEN ? StdScreen(CURRENT_SCREEN) : 0;
- }
- NCURSES_EXPORT(WINDOW *)
- NCURSES_PUBLIC_VAR(curscr) (void)
- {
--    return SP ? SP->_curscr : 0;
-+    return CURRENT_SCREEN ? CurScreen(CURRENT_SCREEN) : 0;
- }
- NCURSES_EXPORT(WINDOW *)
- NCURSES_PUBLIC_VAR(newscr) (void)
- {
--    return SP ? SP->_newscr : 0;
-+    return CURRENT_SCREEN ? NewScreen(CURRENT_SCREEN) : 0;
- }
- #else
- NCURSES_EXPORT_VAR(WINDOW *) stdscr = 0;
-@@ -93,7 +94,7 @@
- NCURSES_EXPORT(int)
- _nc_alloc_screen(void)
- {
--    return ((my_screen = typeCalloc(SCREEN, 1)) != 0);
-+    return ((my_screen = _nc_alloc_screen_sp()) != 0);
- }
- 
- NCURSES_EXPORT(void)
-@@ -103,6 +104,7 @@
- }
- 
- #else
-+
- NCURSES_EXPORT_VAR(SCREEN *) SP = NULL; /* Some linkers require initialized data... */
- #endif
- /* *INDENT-OFF* */
-@@ -140,7 +142,9 @@
-     0,				/* tgetent_index */
-     0,				/* tgetent_sequence */
- 
-+#ifndef USE_SP_WINDOWLIST
-     0,				/* _nc_windowlist */
-+#endif
- 
- #if USE_HOME_TERMINFO
-     NULL,			/* home_terminfo */
-@@ -174,7 +178,9 @@
-     { CHARS_0s, CHARS_0s },	/* traceatr_color_buf */
-     0,				/* traceatr_color_sel */
-     -1,				/* traceatr_color_last */
--
-+#if !defined(USE_PTHREADS) && USE_REENTRANT
-+    0,				/* nested_tracef */
-+#endif
- #endif /* TRACE */
- #ifdef USE_PTHREADS
-     PTHREAD_MUTEX_INITIALIZER,	/* mutex_curses */
-@@ -196,8 +202,10 @@
-     TRUE,			/* use_env */
-     FALSE,			/* filter_mode */
-     A_NORMAL,			/* previous_attr */
-+#ifndef USE_SP_RIPOFF
-     RIPOFF_0s,			/* ripoff */
-     NULL,			/* rsp */
-+#endif
-     {				/* tparm_state */
- #ifdef TRACE
- 	NULL,			/* tname */
-@@ -225,6 +233,8 @@
-     NULL,			/* real_acs_map */
-     0,				/* LINES */
-     0,				/* COLS */
-+    8,				/* TABSIZE */
-+    1000,			/* ESCDELAY */
-     0,				/* cur_term */
- #ifdef TRACE
-     0L,				/* _outchars */
-@@ -234,6 +244,23 @@
- };
- /* *INDENT-ON* */
- 
-+/*
-+ * wgetch() and other functions with a WINDOW* parameter may use a SCREEN*
-+ * internally, and it is useful to allow those to be invoked without switching
-+ * SCREEN's, e.g., for multi-threaded applications.
-+ */
-+NCURSES_EXPORT(SCREEN *)
-+_nc_screen_of(WINDOW *win)
-+{
-+    SCREEN *sp = 0;
-+
-+    if (win != 0) {
-+	WINDOWLIST *wp = (WINDOWLIST *) win;
-+	sp = wp->screen;
-+    }
-+    return (sp);
-+}
-+
- /******************************************************************************/
- #ifdef USE_PTHREADS
- static void
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_has_cap.c ncurses-5.7/ncurses/tinfo/lib_has_cap.c
---- ncurses-5.7.orig/ncurses/tinfo/lib_has_cap.c	2003-10-25 12:43:55.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/lib_has_cap.c	2009-07-19 15:03:59.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2000,2003 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2003,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -30,6 +30,7 @@
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-  *     and: Thomas E. Dickey                        1996-2003               *
-+ *     and: Juergen Pfeifer                         2009                    *
-  ****************************************************************************/
- 
- /*
-@@ -41,25 +42,53 @@
- 
- #include <curses.priv.h>
- 
--#include <term.h>
-+#ifndef CUR
-+#define CUR SP_TERMTYPE
-+#endif
- 
--MODULE_ID("$Id: lib_has_cap.c,v 1.4 2003/10/25 19:43:55 tom Exp $")
-+MODULE_ID("$Id: lib_has_cap.c,v 1.8 2009/05/10 00:53:52 tom Exp $")
- 
- NCURSES_EXPORT(bool)
-+NCURSES_SP_NAME(has_ic) (NCURSES_SP_DCL0)
-+{
-+    bool code = FALSE;
-+
-+    T((T_CALLED("has_ic(%p)"), SP_PARM));
-+
-+    if (IsValidTIScreen(SP_PARM) && IsTermInfo(SP_PARM)) {
-+	code = ((insert_character || parm_ich
-+		 || (enter_insert_mode && exit_insert_mode))
-+		&& (delete_character || parm_dch)) ? TRUE : FALSE;
-+    }
-+
-+    returnCode(code);
-+}
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(bool)
- has_ic(void)
- {
--    T((T_CALLED("has_ic()")));
--    returnCode(cur_term &&
--	       (insert_character || parm_ich
--		|| (enter_insert_mode && exit_insert_mode))
--	       && (delete_character || parm_dch));
-+    return NCURSES_SP_NAME(has_ic) (CURRENT_SCREEN);
-+}
-+#endif
-+
-+NCURSES_EXPORT(bool)
-+NCURSES_SP_NAME(has_il) (NCURSES_SP_DCL0)
-+{
-+    bool code = FALSE;
-+    T((T_CALLED("has_il(%p)"), SP_PARM));
-+    if (IsValidTIScreen(SP_PARM) && IsTermInfo(SP_PARM)) {
-+	code = ((insert_line || parm_insert_line)
-+		&& (delete_line || parm_delete_line)) ? TRUE : FALSE;
-+    }
-+
-+    returnCode(code);
- }
- 
-+#if NCURSES_SP_FUNCS
- NCURSES_EXPORT(bool)
- has_il(void)
- {
--    T((T_CALLED("has_il()")));
--    returnCode(cur_term
--	       && (insert_line || parm_insert_line)
--	       && (delete_line || parm_delete_line));
-+    return NCURSES_SP_NAME(has_il) (CURRENT_SCREEN);
- }
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_kernel.c ncurses-5.7/ncurses/tinfo/lib_kernel.c
---- ncurses-5.7.orig/ncurses/tinfo/lib_kernel.c	2004-05-08 10:11:21.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/lib_kernel.c	2009-07-19 15:04:06.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2004,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -29,7 +29,8 @@
- /****************************************************************************
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-- *     and: Thomas E. Dickey 2002                                           *
-+ *     and: Thomas E. Dickey                        2002                    *
-+ *     and: Juergen Pfeifer                         2009                    *
-  ****************************************************************************/
- 
- /*
-@@ -46,9 +47,8 @@
-  */
- 
- #include <curses.priv.h>
--#include <term.h>		/* cur_term */
- 
--MODULE_ID("$Id: lib_kernel.c,v 1.24 2004/05/08 17:11:21 tom Exp $")
-+MODULE_ID("$Id: lib_kernel.c,v 1.27 2009/06/06 21:25:50 tom Exp $")
- 
- static int
- _nc_vdisable(void)
-@@ -79,23 +79,33 @@
-  */
- 
- NCURSES_EXPORT(char)
--erasechar(void)
-+NCURSES_SP_NAME(erasechar) (NCURSES_SP_DCL0)
- {
-     int result = ERR;
--    T((T_CALLED("erasechar()")));
-+    TERMINAL *termp = TerminalOf(SP_PARM);
-+
-+    T((T_CALLED("erasechar(%p)"), SP_PARM));
- 
--    if (cur_term != 0) {
-+    if (termp != 0) {
- #ifdef TERMIOS
--	result = cur_term->Ottyb.c_cc[VERASE];
-+	result = termp->Ottyb.c_cc[VERASE];
- 	if (result == _nc_vdisable())
- 	    result = ERR;
- #else
--	result = cur_term->Ottyb.sg_erase;
-+	result = termp->Ottyb.sg_erase;
- #endif
-     }
-     returnCode(result);
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(char)
-+erasechar(void)
-+{
-+    return NCURSES_SP_NAME(erasechar) (CURRENT_SCREEN);
-+}
-+#endif
-+
- /*
-  *	killchar()
-  *
-@@ -104,23 +114,33 @@
-  */
- 
- NCURSES_EXPORT(char)
--killchar(void)
-+NCURSES_SP_NAME(killchar) (NCURSES_SP_DCL0)
- {
-     int result = ERR;
--    T((T_CALLED("killchar()")));
-+    TERMINAL *termp = TerminalOf(SP_PARM);
- 
--    if (cur_term != 0) {
-+    T((T_CALLED("killchar(%p)"), SP_PARM));
-+
-+    if (termp != 0) {
- #ifdef TERMIOS
--	result = cur_term->Ottyb.c_cc[VKILL];
-+	result = termp->Ottyb.c_cc[VKILL];
- 	if (result == _nc_vdisable())
- 	    result = ERR;
- #else
--	result = cur_term->Ottyb.sg_kill;
-+	result = termp->Ottyb.sg_kill;
- #endif
-     }
-     returnCode(result);
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(char)
-+killchar(void)
-+{
-+    return NCURSES_SP_NAME(killchar) (CURRENT_SCREEN);
-+}
-+#endif
-+
- /*
-  *	flushinp()
-  *
-@@ -129,26 +149,36 @@
-  */
- 
- NCURSES_EXPORT(int)
--flushinp(void)
-+NCURSES_SP_NAME(flushinp) (NCURSES_SP_DCL0)
- {
--    T((T_CALLED("flushinp()")));
-+    TERMINAL *termp = TerminalOf(SP_PARM);
-+
-+    T((T_CALLED("flushinp(%p)"), SP_PARM));
- 
--    if (cur_term != 0) {
-+    if (termp != 0) {
- #ifdef TERMIOS
--	tcflush(cur_term->Filedes, TCIFLUSH);
-+	tcflush(termp->Filedes, TCIFLUSH);
- #else
- 	errno = 0;
- 	do {
--	    ioctl(cur_term->Filedes, TIOCFLUSH, 0);
-+	    ioctl(termp->Filedes, TIOCFLUSH, 0);
- 	} while
- 	    (errno == EINTR);
- #endif
--	if (SP) {
--	    SP->_fifohead = -1;
--	    SP->_fifotail = 0;
--	    SP->_fifopeek = 0;
-+	if (SP_PARM) {
-+	    SP_PARM->_fifohead = -1;
-+	    SP_PARM->_fifotail = 0;
-+	    SP_PARM->_fifopeek = 0;
- 	}
- 	returnCode(OK);
-     }
-     returnCode(ERR);
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+flushinp(void)
-+{
-+    return NCURSES_SP_NAME(flushinp) (CURRENT_SCREEN);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_longname.c ncurses-5.7/ncurses/tinfo/lib_longname.c
---- ncurses-5.7.orig/ncurses/tinfo/lib_longname.c	2000-12-09 18:55:07.000000000 -0800
-+++ ncurses-5.7/ncurses/tinfo/lib_longname.c	2009-07-19 15:03:59.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998,2000 Free Software Foundation, Inc.                   *
-+ * Copyright (c) 1998-2000,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -29,6 +29,8 @@
- /****************************************************************************
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-+ *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                         2009                    *
-  ****************************************************************************/
- 
- /*
-@@ -40,8 +42,38 @@
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_longname.c,v 1.9 2000/12/10 02:55:07 tom Exp $")
-+MODULE_ID("$Id: lib_longname.c,v 1.11 2009/02/21 17:18:02 tom Exp $")
- 
-+#if USE_REENTRANT
-+NCURSES_EXPORT(char *)
-+NCURSES_SP_NAME(longname) (NCURSES_SP_DCL0)
-+{
-+    static char empty[] =
-+    {'\0'};
-+    char *ptr;
-+
-+    T((T_CALLED("longname(%p)"), SP_PARM));
-+
-+    if (SP_PARM) {
-+	for (ptr = SP_PARM->_ttytype + strlen(SP_PARM->_ttytype);
-+	     ptr > SP_PARM->_ttytype;
-+	     ptr--)
-+	    if (*ptr == '|')
-+		returnPtr(ptr + 1);
-+	returnPtr(SP_PARM->_ttytype);
-+    }
-+    return empty;
-+}
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(char *)
-+longname(void)
-+{
-+    return NCURSES_SP_NAME(longname) (CURRENT_SCREEN);
-+}
-+#endif
-+
-+#else
- NCURSES_EXPORT(char *)
- longname(void)
- {
-@@ -49,9 +81,11 @@
- 
-     T((T_CALLED("longname()")));
- 
--    for (ptr = ttytype + strlen(ttytype); ptr > ttytype; ptr--)
-+    for (ptr = ttytype + strlen(ttytype);
-+	 ptr > ttytype;
-+	 ptr--)
- 	if (*ptr == '|')
- 	    returnPtr(ptr + 1);
--
-     returnPtr(ttytype);
- }
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_napms.c ncurses-5.7/ncurses/tinfo/lib_napms.c
---- ncurses-5.7.orig/ncurses/tinfo/lib_napms.c	2008-05-03 14:34:13.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/lib_napms.c	2009-07-19 15:04:06.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2005,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -29,6 +29,8 @@
- /****************************************************************************
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-+ *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                         2009                    *
-  ****************************************************************************/
- 
- /*
-@@ -49,13 +51,16 @@
- #endif
- #endif
- 
--MODULE_ID("$Id: lib_napms.c,v 1.17 2008/05/03 21:34:13 tom Exp $")
-+MODULE_ID("$Id: lib_napms.c,v 1.19 2009/06/06 18:50:30 tom Exp $")
- 
- NCURSES_EXPORT(int)
--napms(int ms)
-+NCURSES_SP_NAME(napms) (NCURSES_SP_DCLx int ms)
- {
-     T((T_CALLED("napms(%d)"), ms));
- 
-+#ifdef USE_TERM_DRIVER
-+    CallDriver_1(sp, nap, ms);
-+#else /* !USE_TERM_DRIVER */
- #if HAVE_NANOSLEEP
-     {
- 	struct timespec request, remaining;
-@@ -69,6 +74,15 @@
- #else
-     _nc_timed_wait(0, 0, ms, (int *) 0 EVENTLIST_2nd(0));
- #endif
-+#endif /* !USE_TERM_DRIVER */
- 
-     returnCode(OK);
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+napms(int ms)
-+{
-+    return NCURSES_SP_NAME(napms) (CURRENT_SCREEN, ms);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_options.c ncurses-5.7/ncurses/tinfo/lib_options.c
---- ncurses-5.7.orig/ncurses/tinfo/lib_options.c	2008-08-16 14:20:48.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/lib_options.c	2009-07-19 15:04:13.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -30,6 +30,7 @@
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-  *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                         2009                    *
-  ****************************************************************************/
- 
- /*
-@@ -43,14 +44,20 @@
- 
- #include <term.h>
- 
--MODULE_ID("$Id: lib_options.c,v 1.58 2008/08/16 21:20:48 Werner.Fink Exp $")
-+#ifndef CUR
-+#define CUR SP_TERMTYPE
-+#endif
-+
-+MODULE_ID("$Id: lib_options.c,v 1.65 2009/07/04 18:14:31 tom Exp $")
- 
--static int _nc_curs_set(SCREEN *, int);
- static int _nc_meta(SCREEN *, bool);
- 
- NCURSES_EXPORT(int)
- idlok(WINDOW *win, bool flag)
- {
-+#if NCURSES_SP_FUNCS
-+    SCREEN *sp = CURRENT_SCREEN;
-+#endif
-     T((T_CALLED("idlok(%p,%d)"), win, flag));
- 
-     if (win) {
-@@ -63,6 +70,9 @@
- NCURSES_EXPORT(void)
- idcok(WINDOW *win, bool flag)
- {
-+#if NCURSES_SP_FUNCS
-+    SCREEN *sp = CURRENT_SCREEN;
-+#endif
-     T((T_CALLED("idcok(%p,%d)"), win, flag));
- 
-     if (win)
-@@ -72,18 +82,26 @@
- }
- 
- NCURSES_EXPORT(int)
--halfdelay(int t)
-+NCURSES_SP_NAME(halfdelay) (NCURSES_SP_DCLx int t)
- {
-     T((T_CALLED("halfdelay(%d)"), t));
- 
--    if (t < 1 || t > 255 || SP == 0)
-+    if (t < 1 || t > 255 || SP_PARM == 0)
- 	returnCode(ERR);
- 
-     cbreak();
--    SP->_cbreak = t + 1;
-+    SP_PARM->_cbreak = t + 1;
-     returnCode(OK);
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+halfdelay(int t)
-+{
-+    return NCURSES_SP_NAME(halfdelay) (CURRENT_SCREEN, t);
-+}
-+#endif
-+
- NCURSES_EXPORT(int)
- nodelay(WINDOW *win, bool flag)
- {
-@@ -148,27 +166,64 @@
- /* curs_set() moved here to narrow the kernel interface */
- 
- NCURSES_EXPORT(int)
--curs_set(int vis)
-+NCURSES_SP_NAME(curs_set) (NCURSES_SP_DCLx int vis)
- {
--    int result;
-+    int result = ERR;
-+
-+    T((T_CALLED("curs_set(%p,%d)"), SP_PARM, vis));
-+    if (SP_PARM != 0 && vis >= 0 && vis <= 2) {
-+	int cursor = SP_PARM->_cursor;
- 
--    T((T_CALLED("curs_set(%d)"), vis));
--    result = _nc_curs_set(SP, vis);
-+	if (vis == cursor) {
-+	    result = cursor;
-+	} else {
-+	    switch (vis) {
-+	    case 2:
-+		result = _nc_putp_flush("cursor_visible", cursor_visible);
-+		break;
-+	    case 1:
-+		result = _nc_putp_flush("cursor_normal", cursor_normal);
-+		break;
-+	    case 0:
-+		result = _nc_putp_flush("cursor_invisible", cursor_invisible);
-+		break;
-+	    }
-+	    if (result != ERR)
-+		result = (cursor == -1 ? 1 : cursor);
-+	    SP_PARM->_cursor = vis;
-+	}
-+    }
-     returnCode(result);
- }
- 
-+#if NCURSES_SP_FUNCS
- NCURSES_EXPORT(int)
--typeahead(int fd)
-+curs_set(int vis)
-+{
-+    return (NCURSES_SP_NAME(curs_set) (CURRENT_SCREEN, vis));
-+}
-+#endif
-+
-+NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(typeahead) (NCURSES_SP_DCLx int fd)
- {
-     T((T_CALLED("typeahead(%d)"), fd));
--    if (SP != 0) {
--	SP->_checkfd = fd;
-+    if (SP_PARM != 0) {
-+	SP_PARM->_checkfd = fd;
- 	returnCode(OK);
-     } else {
- 	returnCode(ERR);
-     }
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+typeahead(int fd)
-+{
-+    return NCURSES_SP_NAME(typeahead) (CURRENT_SCREEN, fd);
-+}
-+#endif
-+
- /*
- **      has_key()
- **
-@@ -190,11 +245,19 @@
- }
- 
- NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(has_key) (NCURSES_SP_DCLx int keycode)
-+{
-+    T((T_CALLED("has_key(%p,%d)"), SP_PARM, keycode));
-+    returnCode(SP != 0 ? has_key_internal(keycode, SP_PARM->_keytry) : FALSE);
-+}
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
- has_key(int keycode)
- {
--    T((T_CALLED("has_key(%d)"), keycode));
--    returnCode(SP != 0 ? has_key_internal(keycode, SP->_keytry) : FALSE);
-+    return NCURSES_SP_NAME(has_key) (CURRENT_SCREEN, keycode);
- }
-+#endif
- #endif /* NCURSES_EXT_FUNCS */
- 
- /*
-@@ -202,29 +265,26 @@
-  * than cur_term.
-  */
- #undef CUR
--#define CUR (sp->_term)->type.
-+#define CUR SP_TERMTYPE
- 
--static int
--_nc_putp(const char *name GCC_UNUSED, const char *value)
-+NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(_nc_putp_flush) (NCURSES_SP_DCLx
-+				 const char *name, const char *value)
- {
--    int rc = ERR;
--
--    if (value) {
--	TPUTS_TRACE(name);
--	rc = putp(value);
-+    int rc = _nc_putp(name, value);
-+    if (rc != ERR) {
-+	_nc_flush();
-     }
-     return rc;
- }
- 
--static int
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
- _nc_putp_flush(const char *name, const char *value)
- {
--    int rc = _nc_putp(name, value);
--    if (rc != ERR) {
--	_nc_flush();
--    }
--    return rc;
-+    return NCURSES_SP_NAME(_nc_putp_flush) (CURRENT_SCREEN, name, value);
- }
-+#endif
- 
- /* Turn the keypad on/off
-  *
-@@ -245,12 +305,12 @@
- 	 * has wgetch() reading in more than one thread.  putp() and below
- 	 * may use SP explicitly.
- 	 */
--	if (_nc_use_pthreads && sp != SP) {
-+	if (_nc_use_pthreads && sp != CURRENT_SCREEN) {
- 	    SCREEN *save_sp;
- 
- 	    /* cannot use use_screen(), since that is not in tinfo library */
- 	    _nc_lock_global(curses);
--	    save_sp = SP;
-+	    save_sp = CURRENT_SCREEN;
- 	    _nc_set_screen(sp);
- 	    rc = _nc_keypad(sp, flag);
- 	    _nc_set_screen(save_sp);
-@@ -276,45 +336,14 @@
- }
- 
- static int
--_nc_curs_set(SCREEN *sp, int vis)
--{
--    int result = ERR;
--
--    T((T_CALLED("curs_set(%d)"), vis));
--    if (sp != 0 && vis >= 0 && vis <= 2) {
--	int cursor = sp->_cursor;
--
--	if (vis == cursor) {
--	    result = cursor;
--	} else {
--	    switch (vis) {
--	    case 2:
--		result = _nc_putp_flush("cursor_visible", cursor_visible);
--		break;
--	    case 1:
--		result = _nc_putp_flush("cursor_normal", cursor_normal);
--		break;
--	    case 0:
--		result = _nc_putp_flush("cursor_invisible", cursor_invisible);
--		break;
--	    }
--	    if (result != ERR)
--		result = (cursor == -1 ? 1 : cursor);
--	    sp->_cursor = vis;
--	}
--    }
--    returnCode(result);
--}
--
--static int
- _nc_meta(SCREEN *sp, bool flag)
- {
-     int result = ERR;
- 
-     /* Ok, we stay relaxed and don't signal an error if win is NULL */
- 
--    if (SP != 0) {
--	SP->_use_meta = flag;
-+    if (sp != 0) {
-+	sp->_use_meta = flag;
- 
- 	if (flag) {
- 	    _nc_putp("meta_on", meta_on);
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_print.c ncurses-5.7/ncurses/tinfo/lib_print.c
---- ncurses-5.7.orig/ncurses/tinfo/lib_print.c	2006-11-25 16:26:34.000000000 -0800
-+++ ncurses-5.7/ncurses/tinfo/lib_print.c	2009-07-19 15:04:06.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2002,2006 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -29,23 +29,27 @@
- /****************************************************************************
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-+ *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                                                 *
-  ****************************************************************************/
- 
- #include <curses.priv.h>
- 
--#include <term.h>
-+#ifndef CUR
-+#define CUR SP_TERMTYPE
-+#endif
- 
--MODULE_ID("$Id: lib_print.c,v 1.16 2006/11/26 00:26:34 tom Exp $")
-+MODULE_ID("$Id: lib_print.c,v 1.19 2009/06/06 20:26:17 tom Exp $")
- 
- NCURSES_EXPORT(int)
--mcprint(char *data, int len)
-+NCURSES_SP_NAME(mcprint) (NCURSES_SP_DCLx char *data, int len)
- /* ship binary character data to the printer via mc4/mc5/mc5p */
- {
-     char *mybuf, *switchon;
-     size_t onsize, offsize, res;
- 
-     errno = 0;
--    if (!cur_term || (!prtr_non && (!prtr_on || !prtr_off))) {
-+    if (!HasTInfoTerminal(SP_PARM) || (!prtr_non && (!prtr_on || !prtr_off))) {
- 	errno = ENODEV;
- 	return (ERR);
-     }
-@@ -78,15 +82,24 @@
-      * data has actually been shipped to the terminal.  If the write(2)
-      * operation is truly atomic we're protected from this.
-      */
--    res = write(cur_term->Filedes, mybuf, onsize + len + offsize);
-+    res = write(TerminalOf(SP_PARM)->Filedes, mybuf, onsize + len + offsize);
- 
-     /*
-      * By giving up our scheduler slot here we increase the odds that the
-      * kernel will ship the contiguous clist items from the last write
-      * immediately.
-      */
-+#ifndef __MINGW32__
-     (void) sleep(0);
--
-+#endif
-     free(mybuf);
-     return (res);
- }
-+
-+#if NCURSES_SP_FUNCS && !defined(USE_TERM_DRIVER)
-+NCURSES_EXPORT(int)
-+mcprint(char *data, int len)
-+{
-+    return NCURSES_SP_NAME(mcprint) (CURRENT_SCREEN, data, len);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_raw.c ncurses-5.7/ncurses/tinfo/lib_raw.c
---- ncurses-5.7.orig/ncurses/tinfo/lib_raw.c	2007-09-29 14:50:22.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/lib_raw.c	2009-07-19 15:02:20.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2002,2007 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -29,7 +29,8 @@
- /****************************************************************************
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-- *     and: Thomas E. Dickey 1998 on                                        *
-+ *     and: Thomas E. Dickey                        1998-on                 *
-+ *     and: Juergen Pfeifer                         2009                    *
-  ****************************************************************************/
- 
- /*
-@@ -49,7 +50,7 @@
- #include <curses.priv.h>
- #include <term.h>		/* cur_term */
- 
--MODULE_ID("$Id: lib_raw.c,v 1.14 2007/09/29 21:50:22 tom Exp $")
-+MODULE_ID("$Id: lib_raw.c,v 1.15 2009/02/15 00:49:02 tom Exp $")
- 
- #if SVR4_TERMIO && !defined(_POSIX_SOURCE)
- #define _POSIX_SOURCE
-@@ -61,7 +62,7 @@
- 
- #ifdef __EMX__
- #include <io.h>
--#define _nc_setmode(mode) setmode(SP->_ifd, mode)
-+#define _nc_setmode(mode) setmode(SP_PARM->_ifd, mode)
- #else
- #define _nc_setmode(mode)	/* nothing */
- #endif
-@@ -77,13 +78,13 @@
- #endif /* TRACE */
- 
- NCURSES_EXPORT(int)
--raw(void)
-+NCURSES_SP_NAME(raw) (NCURSES_SP_DCL0)
- {
-     int result = ERR;
- 
-     T((T_CALLED("raw()")));
- 
--    if (SP != 0 && cur_term != 0) {
-+    if (SP_PARM != 0 && cur_term != 0) {
- 	TTY buf;
- 
- 	BEFORE("raw");
-@@ -99,8 +100,8 @@
- 	buf.sg_flags |= RAW;
- #endif
- 	if ((result = _nc_set_tty_mode(&buf)) == OK) {
--	    SP->_raw = TRUE;
--	    SP->_cbreak = 1;
-+	    SP_PARM->_raw = TRUE;
-+	    SP_PARM->_cbreak = 1;
- 	    cur_term->Nttyb = buf;
- 	}
- 	AFTER("raw");
-@@ -108,14 +109,22 @@
-     returnCode(result);
- }
- 
-+#if NCURSES_SP_FUNCS
- NCURSES_EXPORT(int)
--cbreak(void)
-+raw(void)
-+{
-+    return NCURSES_SP_NAME(raw) (CURRENT_SCREEN);
-+}
-+#endif
-+
-+NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(cbreak) (NCURSES_SP_DCL0)
- {
-     int result = ERR;
- 
-     T((T_CALLED("cbreak()")));
- 
--    if (SP != 0 && cur_term != 0) {
-+    if (SP_PARM != 0 && cur_term != 0) {
- 	TTY buf;
- 
- 	BEFORE("cbreak");
-@@ -132,7 +141,7 @@
- 	buf.sg_flags |= CBREAK;
- #endif
- 	if ((result = _nc_set_tty_mode(&buf)) == OK) {
--	    SP->_cbreak = 1;
-+	    SP_PARM->_cbreak = 1;
- 	    cur_term->Nttyb = buf;
- 	}
- 	AFTER("cbreak");
-@@ -140,12 +149,20 @@
-     returnCode(result);
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+cbreak(void)
-+{
-+    return NCURSES_SP_NAME(cbreak) (CURRENT_SCREEN);
-+}
-+#endif
-+
- /*
-  * Note:
-  * this implementation may be wrong.  See the comment under intrflush().
-  */
- NCURSES_EXPORT(void)
--qiflush(void)
-+NCURSES_SP_NAME(qiflush) (NCURSES_SP_DCL0)
- {
-     int result = ERR;
- 
-@@ -169,14 +186,22 @@
-     returnVoid;
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(void)
-+qiflush(void)
-+{
-+    NCURSES_SP_NAME(qiflush) (CURRENT_SCREEN);
-+}
-+#endif
-+
- NCURSES_EXPORT(int)
--noraw(void)
-+NCURSES_SP_NAME(noraw) (NCURSES_SP_DCL0)
- {
-     int result = ERR;
- 
-     T((T_CALLED("noraw()")));
- 
--    if (SP != 0 && cur_term != 0) {
-+    if (SP_PARM != 0 && cur_term != 0) {
- 	TTY buf;
- 
- 	BEFORE("noraw");
-@@ -191,8 +216,8 @@
- 	buf.sg_flags &= ~(RAW | CBREAK);
- #endif
- 	if ((result = _nc_set_tty_mode(&buf)) == OK) {
--	    SP->_raw = FALSE;
--	    SP->_cbreak = 0;
-+	    SP_PARM->_raw = FALSE;
-+	    SP_PARM->_cbreak = 0;
- 	    cur_term->Nttyb = buf;
- 	}
- 	AFTER("noraw");
-@@ -200,14 +225,22 @@
-     returnCode(result);
- }
- 
-+#if NCURSES_SP_FUNCS
- NCURSES_EXPORT(int)
--nocbreak(void)
-+noraw(void)
-+{
-+    return NCURSES_SP_NAME(noraw) (CURRENT_SCREEN);
-+}
-+#endif
-+
-+NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(nocbreak) (NCURSES_SP_DCL0)
- {
-     int result = ERR;
- 
-     T((T_CALLED("nocbreak()")));
- 
--    if (SP != 0 && cur_term != 0) {
-+    if (SP_PARM != 0 && cur_term != 0) {
- 	TTY buf;
- 
- 	BEFORE("nocbreak");
-@@ -221,7 +254,7 @@
- 	buf.sg_flags &= ~CBREAK;
- #endif
- 	if ((result = _nc_set_tty_mode(&buf)) == OK) {
--	    SP->_cbreak = 0;
-+	    SP_PARM->_cbreak = 0;
- 	    cur_term->Nttyb = buf;
- 	}
- 	AFTER("nocbreak");
-@@ -229,12 +262,20 @@
-     returnCode(result);
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+nocbreak(void)
-+{
-+    return NCURSES_SP_NAME(nocbreak) (CURRENT_SCREEN);
-+}
-+#endif
-+
- /*
-  * Note:
-  * this implementation may be wrong.  See the comment under intrflush().
-  */
- NCURSES_EXPORT(void)
--noqiflush(void)
-+NCURSES_SP_NAME(noqiflush) (NCURSES_SP_DCL0)
- {
-     int result = ERR;
- 
-@@ -259,6 +300,14 @@
-     returnVoid;
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(void)
-+noqiflush(void)
-+{
-+    NCURSES_SP_NAME(noqiflush) (CURRENT_SCREEN);
-+}
-+#endif
-+
- /*
-  * This call does the same thing as the qiflush()/noqiflush() pair.  We know
-  * for certain that SVr3 intrflush() tweaks the NOFLSH bit; on the other hand,
-@@ -267,7 +316,7 @@
-  * curs_inopts(3x) is too exact to be coincidence.
-  */
- NCURSES_EXPORT(int)
--intrflush(WINDOW *win GCC_UNUSED, bool flag)
-+NCURSES_SP_NAME(intrflush) (NCURSES_SP_DCLx WINDOW *win GCC_UNUSED, bool flag)
- {
-     int result = ERR;
- 
-@@ -294,3 +343,11 @@
-     }
-     returnCode(result);
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+intrflush(WINDOW *win GCC_UNUSED, bool flag)
-+{
-+    return NCURSES_SP_NAME(intrflush) (CURRENT_SCREEN, win, flag);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_setup.c ncurses-5.7/ncurses/tinfo/lib_setup.c
---- ncurses-5.7.orig/ncurses/tinfo/lib_setup.c	2008-08-03 15:42:33.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/lib_setup.c	2009-07-19 15:04:06.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -30,6 +30,7 @@
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-  *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                         2009                    *
-  ****************************************************************************/
- 
- /*
-@@ -53,7 +54,7 @@
- 
- #include <term.h>		/* lines, columns, cur_term */
- 
--MODULE_ID("$Id: lib_setup.c,v 1.111 2008/08/03 22:42:33 tom Exp $")
-+MODULE_ID("$Id: lib_setup.c,v 1.117 2009/06/06 17:56:31 tom Exp $")
- 
- /****************************************************************************
-  *
-@@ -116,54 +117,68 @@
-     return cur_term ? cur_term->type.term_names : empty;
- }
- NCURSES_EXPORT(int *)
--_nc_ptr_Lines(void)
-+_nc_ptr_Lines(SCREEN *sp)
- {
--    return ptrLines();
-+    return ptrLines(sp);
- }
- NCURSES_EXPORT(int)
- NCURSES_PUBLIC_VAR(LINES) (void)
- {
--    return *_nc_ptr_Lines();
-+    return *_nc_ptr_Lines(CURRENT_SCREEN);
- }
- NCURSES_EXPORT(int *)
--_nc_ptr_Cols(void)
-+_nc_ptr_Cols(SCREEN *sp)
- {
--    return ptrCols();
-+    return ptrCols(sp);
- }
- NCURSES_EXPORT(int)
- NCURSES_PUBLIC_VAR(COLS) (void)
- {
--    return *_nc_ptr_Cols();
-+    return *_nc_ptr_Cols(CURRENT_SCREEN);
-+}
-+NCURSES_EXPORT(int *)
-+_nc_ptr_Tabsize(SCREEN *sp)
-+{
-+    return ptrTabsize(sp);
- }
- NCURSES_EXPORT(int)
- NCURSES_PUBLIC_VAR(TABSIZE) (void)
- {
--    return SP ? SP->_TABSIZE : 8;
-+    return *_nc_ptr_Tabsize(CURRENT_SCREEN);
- }
- #else
- NCURSES_EXPORT_VAR(char) ttytype[NAMESIZE] = "";
- NCURSES_EXPORT_VAR(int) LINES = 0;
- NCURSES_EXPORT_VAR(int) COLS = 0;
--NCURSES_EXPORT_VAR(int) TABSIZE = 0;
-+NCURSES_EXPORT_VAR(int) TABSIZE = 8;
- #endif
- 
- #if NCURSES_EXT_FUNCS
- NCURSES_EXPORT(int)
--set_tabsize(int value)
-+NCURSES_SP_NAME(set_tabsize) (NCURSES_SP_DCLx int value)
- {
-     int code = OK;
- #if USE_REENTRANT
--    if (SP) {
--	SP->_TABSIZE = value;
-+    if (SP_PARM) {
-+	SP_PARM->_TABSIZE = value;
-     } else {
- 	code = ERR;
-     }
- #else
-+    (void) SP_PARM;
-     TABSIZE = value;
- #endif
-     return code;
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+set_tabsize(int value)
-+{
-+    return NCURSES_SP_NAME(set_tabsize) (CURRENT_SCREEN, value);
-+}
- #endif
-+#endif /* NCURSES_EXT_FUNCS */
- 
- #if USE_SIGWINCH
- /*
-@@ -188,13 +203,25 @@
- #endif
- 
- NCURSES_EXPORT(void)
--use_env(bool f)
-+NCURSES_SP_NAME(use_env) (NCURSES_SP_DCLx bool f)
- {
-     T((T_CALLED("use_env()")));
--    _nc_prescreen.use_env = f;
-+    if (IsPreScreen(SP_PARM)) {
-+	SP_PARM->_use_env = f;
-+    } else {
-+	_nc_prescreen.use_env = f;
-+    }
-     returnVoid;
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(void)
-+use_env(bool f)
-+{
-+    NCURSES_SP_NAME(use_env) (CURRENT_SCREEN, f);
-+}
-+#endif
-+
- NCURSES_EXPORT(void)
- _nc_get_screensize(SCREEN *sp, int *linep, int *colp)
- /* Obtain lines/columns values from the environment and/or terminfo entry */
-@@ -320,7 +347,7 @@
-     if (sp != 0
- 	&& sp->_resize != 0) {
- 	if ((new_lines != old_lines) || (new_cols != old_cols))
--	    sp->_resize(new_lines, new_cols);
-+	    sp->_resize(NCURSES_SP_ARGx new_lines, new_cols);
- 	sp->_sig_winch = FALSE;
-     }
- }
-@@ -604,7 +631,7 @@
-     /*
-      * We should always check the screensize, just in case.
-      */
--    _nc_get_screensize(SP, ptrLines(), ptrCols());
-+    _nc_get_screensize(SP, ptrLines(SP), ptrCols(SP));
- 
-     if (errret)
- 	*errret = TGETENT_YES;
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_termcap.c ncurses-5.7/ncurses/tinfo/lib_termcap.c
---- ncurses-5.7.orig/ncurses/tinfo/lib_termcap.c	2008-08-16 12:22:55.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/lib_termcap.c	2009-07-19 15:04:15.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -30,6 +30,7 @@
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-  *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                                                 *
-  *                                                                          *
-  * some of the code in here was contributed by:                             *
-  * Magnus Bengtsson, d6mbeng@dtek.chalmers.se (Nov'93)                      *
-@@ -45,7 +46,11 @@
- 
- #include <term_entry.h>
- 
--MODULE_ID("$Id: lib_termcap.c,v 1.63 2008/08/16 19:22:55 tom Exp $")
-+#ifndef CUR
-+#define CUR SP_TERMTYPE
-+#endif
-+
-+MODULE_ID("$Id: lib_termcap.c,v 1.69 2009/07/11 18:14:21 tom Exp $")
- 
- NCURSES_EXPORT_VAR(char *) UP = 0;
- NCURSES_EXPORT_VAR(char *) BC = 0;
-@@ -76,16 +81,28 @@
-  ***************************************************************************/
- 
- NCURSES_EXPORT(int)
--tgetent(char *bufp, const char *name)
-+NCURSES_SP_NAME(tgetent) (NCURSES_SP_DCLx char *bufp, const char *name)
- {
--    int errcode;
-+    int errcode = ERR;
-     int n;
-     bool found_cache = FALSE;
-+#ifdef USE_TERM_DRIVER
-+    TERMINAL *termp = 0;
-+#endif
- 
-     START_TRACE();
-     T((T_CALLED("tgetent()")));
- 
-+#ifdef USE_TERM_DRIVER
-+    _nc_setupterm_ex(&termp, (NCURSES_CONST char *) name,
-+		     STDOUT_FILENO, &errcode, TRUE);
-+
-+    if (termp == 0 ||
-+	!((TERMINAL_CONTROL_BLOCK *) termp)->drv->isTerminfo)
-+	return (errcode);
-+#else
-     _nc_setupterm((NCURSES_CONST char *) name, STDOUT_FILENO, &errcode, TRUE);
-+#endif
- 
-     /*
-      * In general we cannot tell if the fixed sgr0 is still used by the
-@@ -109,9 +126,9 @@
- 	    /*
- 	     * Also free the terminfo data that we loaded (much bigger leak).
- 	     */
--	    if (LAST_TRM != 0 && LAST_TRM != cur_term) {
-+	    if (LAST_TRM != 0 && LAST_TRM != TerminalOf(SP_PARM)) {
- 		TERMINAL *trm = LAST_TRM;
--		del_curterm(LAST_TRM);
-+		NCURSES_SP_NAME(del_curterm) (NCURSES_SP_ARGx LAST_TRM);
- 		for (CacheInx = 0; CacheInx < TGETENT_MAX; ++CacheInx)
- 		    if (LAST_TRM == trm)
- 			LAST_TRM = 0;
-@@ -131,7 +148,7 @@
- 	}
- 	CacheInx = best;
-     }
--    LAST_TRM = cur_term;
-+    LAST_TRM = TerminalOf(SP_PARM);
-     LAST_SEQ = ++CacheSeq;
- 
-     PC = 0;
-@@ -153,7 +170,7 @@
- 	if (backspace_if_not_bs != NULL)
- 	    BC = backspace_if_not_bs;
- 
--	if ((FIX_SGR0 = _nc_trim_sgr0(&(cur_term->type))) != 0) {
-+	if ((FIX_SGR0 = _nc_trim_sgr0(&(TerminalOf(SP_PARM)->type))) != 0) {
- 	    if (!strcmp(FIX_SGR0, exit_attribute_mode)) {
- 		if (FIX_SGR0 != exit_attribute_mode) {
- 		    free(FIX_SGR0);
-@@ -164,8 +181,8 @@
- 	LAST_BUF = bufp;
- 	LAST_USE = TRUE;
- 
--	SetNoPadding(SP);
--	(void) baudrate();	/* sets ospeed as a side-effect */
-+	SetNoPadding(SP_PARM);
-+	(void) NCURSES_SP_NAME(baudrate) (NCURSES_SP_ARG);	/* sets ospeed as a side-effect */
- 
- /* LINT_PREPRO
- #if 0*/
-@@ -177,6 +194,25 @@
-     returnCode(errcode);
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+tgetent(char *bufp, const char *name)
-+{
-+    return NCURSES_SP_NAME(tgetent) (CURRENT_SCREEN, bufp, name);
-+}
-+#endif
-+
-+#if 0
-+static bool
-+same_tcname(const char *a, const char *b)
-+{
-+    fprintf(stderr, "compare(%s,%s)\n", a, b);
-+    return !strncmp(a, b, 2);
-+}
-+#else
-+#define same_tcname(a,b) !strncmp(a,b,2)
-+#endif
-+
- /***************************************************************************
-  *
-  * tgetflag(str)
-@@ -187,23 +223,47 @@
-  ***************************************************************************/
- 
- NCURSES_EXPORT(int)
--tgetflag(NCURSES_CONST char *id)
-+NCURSES_SP_NAME(tgetflag) (NCURSES_SP_DCLx NCURSES_CONST char *id)
- {
--    unsigned i;
-+    int result = 0;		/* Solaris returns zero for missing flag */
-+    int i, j;
- 
--    T((T_CALLED("tgetflag(%s)"), id));
--    if (cur_term != 0) {
--	TERMTYPE *tp = &(cur_term->type);
--	for_each_boolean(i, tp) {
--	    const char *capname = ExtBoolname(tp, i, boolcodes);
--	    if (!strncmp(id, capname, 2)) {
--		/* setupterm forces invalid booleans to false */
--		returnCode(tp->Booleans[i]);
-+    T((T_CALLED("tgetflag(%p, %s)"), SP_PARM, id));
-+    if (HasTInfoTerminal(SP_PARM)) {
-+	TERMTYPE *tp = &(TerminalOf(SP_PARM)->type);
-+	struct name_table_entry const *entry_ptr;
-+
-+	entry_ptr = _nc_find_type_entry(id, BOOLEAN, TRUE);
-+	if (entry_ptr != 0) {
-+	    j = entry_ptr->nte_index;
-+	}
-+#if NCURSES_XNAMES
-+	else {
-+	    j = -1;
-+	    for_each_ext_boolean(i, tp) {
-+		const char *capname = ExtBoolname(tp, i, boolcodes);
-+		if (same_tcname(id, capname)) {
-+		    j = i;
-+		    break;
-+		}
- 	    }
- 	}
-+#endif
-+	if (j >= 0) {
-+	    /* note: setupterm forces invalid booleans to false */
-+	    result = tp->Booleans[j];
-+	}
-     }
--    returnCode(0);		/* Solaris does this */
-+    returnCode(result);
-+}
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+tgetflag(NCURSES_CONST char *id)
-+{
-+    return NCURSES_SP_NAME(tgetflag) (CURRENT_SCREEN, id);
- }
-+#endif
- 
- /***************************************************************************
-  *
-@@ -215,25 +275,48 @@
-  ***************************************************************************/
- 
- NCURSES_EXPORT(int)
--tgetnum(NCURSES_CONST char *id)
-+NCURSES_SP_NAME(tgetnum) (NCURSES_SP_DCLx NCURSES_CONST char *id)
- {
--    unsigned i;
-+    int result = ABSENT_NUMERIC;
-+    int i, j;
- 
--    T((T_CALLED("tgetnum(%s)"), id));
--    if (cur_term != 0) {
--	TERMTYPE *tp = &(cur_term->type);
--	for_each_number(i, tp) {
--	    const char *capname = ExtNumname(tp, i, numcodes);
--	    if (!strncmp(id, capname, 2)) {
--		if (!VALID_NUMERIC(tp->Numbers[i]))
--		    returnCode(ABSENT_NUMERIC);
--		returnCode(tp->Numbers[i]);
-+    T((T_CALLED("tgetnum(%p, %s)"), SP_PARM, id));
-+    if (HasTInfoTerminal(SP_PARM)) {
-+	TERMTYPE *tp = &(TerminalOf(SP_PARM)->type);
-+	struct name_table_entry const *entry_ptr;
-+
-+	entry_ptr = _nc_find_type_entry(id, NUMBER, TRUE);
-+	if (entry_ptr != 0) {
-+	    j = entry_ptr->nte_index;
-+	}
-+#if NCURSES_XNAMES
-+	else {
-+	    j = -1;
-+	    for_each_ext_number(i, tp) {
-+		const char *capname = ExtNumname(tp, i, numcodes);
-+		if (same_tcname(id, capname)) {
-+		    j = i;
-+		    break;
-+		}
- 	    }
- 	}
-+#endif
-+	if (j >= 0) {
-+	    if (VALID_NUMERIC(tp->Numbers[j]))
-+		result = tp->Numbers[j];
-+	}
-     }
--    returnCode(ABSENT_NUMERIC);
-+    returnCode(result);
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+tgetnum(NCURSES_CONST char *id)
-+{
-+    return NCURSES_SP_NAME(tgetnum) (CURRENT_SCREEN, id);
-+}
-+#endif
-+
- /***************************************************************************
-  *
-  * tgetstr(str, area)
-@@ -244,40 +327,62 @@
-  ***************************************************************************/
- 
- NCURSES_EXPORT(char *)
--tgetstr(NCURSES_CONST char *id, char **area)
-+NCURSES_SP_NAME(tgetstr) (NCURSES_SP_DCLx NCURSES_CONST char *id, char **area)
- {
--    unsigned i;
-     char *result = NULL;
-+    int i, j;
- 
-     T((T_CALLED("tgetstr(%s,%p)"), id, area));
--    if (cur_term != 0) {
--	TERMTYPE *tp = &(cur_term->type);
--	for_each_string(i, tp) {
--	    const char *capname = ExtStrname(tp, i, strcodes);
--	    if (!strncmp(id, capname, 2)) {
--		result = tp->Strings[i];
--		TR(TRACE_DATABASE, ("found match : %s", _nc_visbuf(result)));
--		/* setupterm forces canceled strings to null */
--		if (VALID_STRING(result)) {
--		    if (result == exit_attribute_mode
--			&& FIX_SGR0 != 0) {
--			result = FIX_SGR0;
--			TR(TRACE_DATABASE, ("altered to : %s", _nc_visbuf(result)));
--		    }
--		    if (area != 0
--			&& *area != 0) {
--			(void) strcpy(*area, result);
--			result = *area;
--			*area += strlen(*area) + 1;
--		    }
-+    if (HasTInfoTerminal(SP_PARM)) {
-+	TERMTYPE *tp = &(TerminalOf(SP_PARM)->type);
-+	struct name_table_entry const *entry_ptr;
-+
-+	entry_ptr = _nc_find_type_entry(id, STRING, TRUE);
-+	if (entry_ptr != 0) {
-+	    j = entry_ptr->nte_index;
-+	}
-+#if NCURSES_XNAMES
-+	else {
-+	    j = -1;
-+	    for_each_ext_string(i, tp) {
-+		const char *capname = ExtStrname(tp, i, strcodes);
-+		if (same_tcname(id, capname)) {
-+		    j = i;
-+		    break;
-+		}
-+	    }
-+	}
-+#endif
-+	if (j >= 0) {
-+	    result = tp->Strings[j];
-+	    TR(TRACE_DATABASE, ("found match : %s", _nc_visbuf(result)));
-+	    /* setupterm forces canceled strings to null */
-+	    if (VALID_STRING(result)) {
-+		if (result == exit_attribute_mode
-+		    && FIX_SGR0 != 0) {
-+		    result = FIX_SGR0;
-+		    TR(TRACE_DATABASE, ("altered to : %s", _nc_visbuf(result)));
-+		}
-+		if (area != 0
-+		    && *area != 0) {
-+		    (void) strcpy(*area, result);
-+		    result = *area;
-+		    *area += strlen(*area) + 1;
- 		}
--		break;
- 	    }
- 	}
-     }
-     returnPtr(result);
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(char *)
-+tgetstr(NCURSES_CONST char *id, char **area)
-+{
-+    return NCURSES_SP_NAME(tgetstr) (CURRENT_SCREEN, id, area);
-+}
-+#endif
-+
- #if NO_LEAKS
- NCURSES_EXPORT(void)
- _nc_tgetent_leaks(void)
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_termname.c ncurses-5.7/ncurses/tinfo/lib_termname.c
---- ncurses-5.7.orig/ncurses/tinfo/lib_termname.c	2003-12-27 10:23:01.000000000 -0800
-+++ ncurses-5.7/ncurses/tinfo/lib_termname.c	2009-07-19 15:02:22.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2001,2003 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2003,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -28,17 +28,31 @@
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_termname.c,v 1.8 2003/12/27 18:23:01 tom Exp $")
-+MODULE_ID("$Id: lib_termname.c,v 1.11 2009/02/21 16:37:12 tom Exp $")
- 
- NCURSES_EXPORT(char *)
--termname(void)
-+NCURSES_SP_NAME(termname) (NCURSES_SP_DCL0)
- {
-     char *name = 0;
- 
--    T((T_CALLED("termname()")));
-+    T((T_CALLED("termname(%p)"), SP_PARM));
- 
-+#if NCURSES_SP_FUNCS
-+    if (TerminalOf(SP_PARM) != 0) {
-+	name = TerminalOf(SP_PARM)->_termname;
-+    }
-+#else
-     if (cur_term != 0)
- 	name = cur_term->_termname;
-+#endif
- 
-     returnPtr(name);
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(char *)
-+termname(void)
-+{
-+    return NCURSES_SP_NAME(termname) (CURRENT_SCREEN);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_ti.c ncurses-5.7/ncurses/tinfo/lib_ti.c
---- ncurses-5.7.orig/ncurses/tinfo/lib_ti.c	2003-05-24 14:10:28.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/lib_ti.c	2009-07-19 15:04:15.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2000,2003 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2003,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -29,6 +29,7 @@
- /****************************************************************************
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-+ *     and: Thomas E. Dickey                        1996-on                 *
-  ****************************************************************************/
- 
- #include <curses.priv.h>
-@@ -36,68 +37,150 @@
- #include <term_entry.h>
- #include <tic.h>
- 
--MODULE_ID("$Id: lib_ti.c,v 1.23 2003/05/24 21:10:28 tom Exp $")
-+MODULE_ID("$Id: lib_ti.c,v 1.26 2009/07/11 18:14:21 tom Exp $")
-+
-+#if 0
-+static bool
-+same_name(const char *a, const char *b)
-+{
-+    fprintf(stderr, "compare(%s,%s)\n", a, b);
-+    return !strcmp(a, b);
-+}
-+#else
-+#define same_name(a,b) !strcmp(a,b)
-+#endif
- 
- NCURSES_EXPORT(int)
--tigetflag(NCURSES_CONST char *str)
-+NCURSES_SP_NAME(tigetflag) (NCURSES_SP_DCLx NCURSES_CONST char *str)
- {
--    unsigned i;
-+    int result = ABSENT_BOOLEAN;
-+    int i, j;
- 
--    T((T_CALLED("tigetflag(%s)"), str));
-+    T((T_CALLED("tigetflag(%p, %s)"), SP_PARM, str));
- 
--    if (cur_term != 0) {
--	TERMTYPE *tp = &(cur_term->type);
--	for_each_boolean(i, tp) {
--	    const char *capname = ExtBoolname(tp, i, boolnames);
--	    if (!strcmp(str, capname)) {
--		/* setupterm forces invalid booleans to false */
--		returnCode(tp->Booleans[i]);
-+    if (HasTInfoTerminal(SP_PARM)) {
-+	TERMTYPE *tp = &(TerminalOf(SP_PARM)->type);
-+	struct name_table_entry const *entry_ptr;
-+
-+	entry_ptr = _nc_find_type_entry(str, BOOLEAN, FALSE);
-+	if (entry_ptr != 0) {
-+	    j = entry_ptr->nte_index;
-+	}
-+#if NCURSES_XNAMES
-+	else {
-+	    j = -1;
-+	    for_each_ext_boolean(i, tp) {
-+		const char *capname = ExtBoolname(tp, i, boolnames);
-+		if (same_name(str, capname)) {
-+		    j = i;
-+		    break;
-+		}
- 	    }
- 	}
-+#endif
-+	if (j >= 0) {
-+	    /* note: setupterm forces invalid booleans to false */
-+	    result = tp->Booleans[j];
-+	}
-     }
- 
--    returnCode(ABSENT_BOOLEAN);
-+    returnCode(result);
- }
- 
-+#if NCURSES_SP_FUNCS
- NCURSES_EXPORT(int)
--tigetnum(NCURSES_CONST char *str)
-+tigetflag(NCURSES_CONST char *str)
-+{
-+    return NCURSES_SP_NAME(tigetflag) (CURRENT_SCREEN, str);
-+}
-+#endif
-+
-+NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(tigetnum) (NCURSES_SP_DCLx NCURSES_CONST char *str)
- {
--    unsigned i;
-+    int i, j;
-+    int result = CANCELLED_NUMERIC;	/* Solaris returns a -1 on error */
- 
--    T((T_CALLED("tigetnum(%s)"), str));
-+    T((T_CALLED("tigetnum(%p, %s)"), SP_PARM, str));
- 
--    if (cur_term != 0) {
--	TERMTYPE *tp = &(cur_term->type);
--	for_each_number(i, tp) {
--	    const char *capname = ExtNumname(tp, i, numnames);
--	    if (!strcmp(str, capname)) {
--		if (!VALID_NUMERIC(tp->Numbers[i]))
--		    returnCode(ABSENT_NUMERIC);
--		returnCode(tp->Numbers[i]);
-+    if (HasTInfoTerminal(SP_PARM)) {
-+	TERMTYPE *tp = &(TerminalOf(SP_PARM)->type);
-+	struct name_table_entry const *entry_ptr;
-+
-+	entry_ptr = _nc_find_type_entry(str, NUMBER, FALSE);
-+	if (entry_ptr != 0) {
-+	    j = entry_ptr->nte_index;
-+	}
-+#if NCURSES_XNAMES
-+	else {
-+	    j = -1;
-+	    for_each_ext_number(i, tp) {
-+		const char *capname = ExtNumname(tp, i, numnames);
-+		if (same_name(str, capname)) {
-+		    j = i;
-+		    break;
-+		}
- 	    }
- 	}
-+#endif
-+	if (j >= 0 && VALID_NUMERIC(tp->Numbers[j]))
-+	    result = tp->Numbers[j];
-+	else
-+	    result = ABSENT_NUMERIC;
-     }
- 
--    returnCode(CANCELLED_NUMERIC);	/* Solaris returns a -1 instead */
-+    returnCode(result);
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+tigetnum(NCURSES_CONST char *str)
-+{
-+    return NCURSES_SP_NAME(tigetnum) (CURRENT_SCREEN, str);
-+}
-+#endif
-+
- NCURSES_EXPORT(char *)
--tigetstr(NCURSES_CONST char *str)
-+NCURSES_SP_NAME(tigetstr) (NCURSES_SP_DCLx NCURSES_CONST char *str)
- {
--    unsigned i;
-+    char *result = CANCELLED_STRING;
-+    int i, j;
- 
--    T((T_CALLED("tigetstr(%s)"), str));
-+    T((T_CALLED("tigetstr(%p, %s)"), SP_PARM, str));
- 
--    if (cur_term != 0) {
--	TERMTYPE *tp = &(cur_term->type);
--	for_each_string(i, tp) {
--	    const char *capname = ExtStrname(tp, i, strnames);
--	    if (!strcmp(str, capname)) {
--		/* setupterm forces cancelled strings to null */
--		returnPtr(tp->Strings[i]);
-+    if (HasTInfoTerminal(SP_PARM)) {
-+	TERMTYPE *tp = &(TerminalOf(SP_PARM)->type);
-+	struct name_table_entry const *entry_ptr;
-+
-+	entry_ptr = _nc_find_type_entry(str, STRING, FALSE);
-+	if (entry_ptr != 0) {
-+	    j = entry_ptr->nte_index;
-+	}
-+#if NCURSES_XNAMES
-+	else {
-+	    j = -1;
-+	    for_each_ext_string(i, tp) {
-+		const char *capname = ExtStrname(tp, i, strnames);
-+		if (same_name(str, capname)) {
-+		    j = i;
-+		    break;
-+		}
- 	    }
- 	}
-+#endif
-+	if (j >= 0) {
-+	    /* note: setupterm forces cancelled strings to null */
-+	    result = tp->Strings[j];
-+	}
-     }
- 
--    returnPtr(CANCELLED_STRING);
-+    returnPtr(result);
-+}
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(char *)
-+tigetstr(NCURSES_CONST char *str)
-+{
-+    return NCURSES_SP_NAME(tigetstr) (CURRENT_SCREEN, str);
- }
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_tparm.c ncurses-5.7/ncurses/tinfo/lib_tparm.c
---- ncurses-5.7.orig/ncurses/tinfo/lib_tparm.c	2008-08-16 12:22:55.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/lib_tparm.c	2009-07-19 15:02:22.000000000 -0700
-@@ -40,10 +40,9 @@
- #include <curses.priv.h>
- 
- #include <ctype.h>
--#include <term.h>
- #include <tic.h>
- 
--MODULE_ID("$Id: lib_tparm.c,v 1.76 2008/08/16 19:22:55 tom Exp $")
-+MODULE_ID("$Id: lib_tparm.c,v 1.77 2008/11/16 00:19:59 juergen Exp $")
- 
- /*
-  *	char *
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_tputs.c ncurses-5.7/ncurses/tinfo/lib_tputs.c
---- ncurses-5.7.orig/ncurses/tinfo/lib_tputs.c	2008-06-28 06:12:15.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/lib_tputs.c	2009-07-19 15:04:07.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -30,6 +30,7 @@
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-  *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                         2009                    *
-  ****************************************************************************/
- 
- /*
-@@ -41,12 +42,16 @@
-  */
- 
- #include <curses.priv.h>
-+
-+#ifndef CUR
-+#define CUR SP_TERMTYPE
-+#endif
-+
- #include <ctype.h>
--#include <term.h>		/* padding_baud_rate, xon_xoff */
- #include <termcap.h>		/* ospeed */
- #include <tic.h>
- 
--MODULE_ID("$Id: lib_tputs.c,v 1.66 2008/06/28 13:12:15 tom Exp $")
-+MODULE_ID("$Id: lib_tputs.c,v 1.77 2009/06/07 13:59:11 tom Exp $")
- 
- NCURSES_EXPORT_VAR(char) PC = 0;              /* used by termcap library */
- NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed = 0;        /* used by termcap library */
-@@ -69,62 +74,126 @@
- }
- #endif
- 
--static int (*my_outch) (int c) = _nc_outch;
-+#if NCURSES_SP_FUNCS
-+#define my_outch SP_PARM->_outch
-+#else
-+static NCURSES_SP_OUTC my_outch = NCURSES_SP_NAME(_nc_outch);
-+#endif
- 
- NCURSES_EXPORT(int)
--delay_output(int ms)
-+NCURSES_SP_NAME(delay_output) (NCURSES_SP_DCLx int ms)
- {
--    T((T_CALLED("delay_output(%d)"), ms));
-+    T((T_CALLED("delay_output(%p,%d)"), SP_PARM, ms));
-+
-+    if (!HasTInfoTerminal(SP_PARM))
-+	returnCode(ERR);
- 
-     if (no_pad_char) {
--	_nc_flush();
-+	NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG);
- 	napms(ms);
-     } else {
- 	register int nullcount;
- 
- 	nullcount = (ms * _nc_baudrate(ospeed)) / (BAUDBYTE * 1000);
- 	for (_nc_nulls_sent += nullcount; nullcount > 0; nullcount--)
--	    my_outch(PC);
--	if (my_outch == _nc_outch)
--	    _nc_flush();
-+	    my_outch(NCURSES_SP_ARGx PC);
-+	if (my_outch == NCURSES_SP_NAME(_nc_outch))
-+	    NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG);
-     }
- 
-     returnCode(OK);
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+delay_output(int ms)
-+{
-+    return NCURSES_SP_NAME(delay_output) (CURRENT_SCREEN, ms);
-+}
-+#endif
-+
-+NCURSES_EXPORT(void)
-+NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_DCL0)
-+{
-+    (void) fflush(NC_OUTPUT(SP_PARM));
-+}
-+
-+#if NCURSES_SP_FUNCS
- NCURSES_EXPORT(void)
- _nc_flush(void)
- {
--    (void) fflush(NC_OUTPUT);
-+    NCURSES_SP_NAME(_nc_flush) (CURRENT_SCREEN);
- }
-+#endif
- 
- NCURSES_EXPORT(int)
--_nc_outch(int ch)
-+NCURSES_SP_NAME(_nc_outch) (NCURSES_SP_DCLx int ch)
- {
-     COUNT_OUTCHARS(1);
- 
--    if (SP != 0
--	&& SP->_cleanup) {
-+    if (HasTInfoTerminal(SP_PARM)
-+	&& SP_PARM != 0
-+	&& SP_PARM->_cleanup) {
- 	char tmp = ch;
- 	/*
- 	 * POSIX says write() is safe in a signal handler, but the
- 	 * buffered I/O is not.
- 	 */
--	write(fileno(NC_OUTPUT), &tmp, 1);
-+	write(fileno(NC_OUTPUT(SP_PARM)), &tmp, 1);
-     } else {
--	putc(ch, NC_OUTPUT);
-+	putc(ch, NC_OUTPUT(SP_PARM));
-     }
-     return OK;
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+_nc_outch(int ch)
-+{
-+    return NCURSES_SP_NAME(_nc_outch) (CURRENT_SCREEN, ch);
-+}
-+#endif
-+
-+NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(putp) (NCURSES_SP_DCLx const char *string)
-+{
-+    return NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
-+				   string, 1, NCURSES_SP_NAME(_nc_outch));
-+}
-+
-+NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_DCLx
-+			   const char *name GCC_UNUSED,
-+			   const char *string)
-+{
-+    int rc = ERR;
-+
-+    if (string != 0) {
-+	TPUTS_TRACE(name);
-+	rc = NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx string);
-+    }
-+    return rc;
-+}
-+
-+#if NCURSES_SP_FUNCS
- NCURSES_EXPORT(int)
- putp(const char *string)
- {
--    return tputs(string, 1, _nc_outch);
-+    return NCURSES_SP_NAME(putp) (CURRENT_SCREEN, string);
- }
- 
- NCURSES_EXPORT(int)
--tputs(const char *string, int affcnt, int (*outc) (int))
-+_nc_putp(const char *name, const char *string)
-+{
-+    return NCURSES_SP_NAME(_nc_putp) (CURRENT_SCREEN, name, string);
-+}
-+#endif
-+
-+NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(tputs) (NCURSES_SP_DCLx
-+			const char *string,
-+			int affcnt,
-+			NCURSES_SP_OUTC outc)
- {
-     bool always_delay;
-     bool normal_delay;
-@@ -137,7 +206,7 @@
-     char addrbuf[32];
- 
-     if (USE_TRACEF(TRACE_TPUTS)) {
--	if (outc == _nc_outch)
-+	if (outc == NCURSES_SP_NAME(_nc_outch))
- 	    (void) strcpy(addrbuf, "_nc_outch");
- 	else
- 	    (void) sprintf(addrbuf, "%p", outc);
-@@ -152,10 +221,19 @@
-     }
- #endif /* TRACE */
- 
-+    if (SP_PARM != 0 && !HasTInfoTerminal(SP_PARM))
-+	return ERR;
-+
-     if (!VALID_STRING(string))
- 	return ERR;
- 
--    if (cur_term == 0) {
-+    if (
-+#if NCURSES_SP_FUNCS
-+	   (SP_PARM != 0 && SP_PARM->_term == 0)
-+#else
-+	   cur_term == 0
-+#endif
-+	) {
- 	always_delay = FALSE;
- 	normal_delay = TRUE;
-     } else {
-@@ -164,7 +242,7 @@
- 	    !xon_xoff
- 	    && padding_baud_rate
- #if NCURSES_NO_PADDING
--	    && !GetNoPadding(SP)
-+	    && !GetNoPadding(SP_PARM)
- #endif
- 	    && (_nc_baudrate(ospeed) >= padding_baud_rate);
-     }
-@@ -201,21 +279,21 @@
-     my_outch = outc;		/* redirect delay_output() */
-     while (*string) {
- 	if (*string != '$')
--	    (*outc) (*string);
-+	    (*outc) (NCURSES_SP_ARGx *string);
- 	else {
- 	    string++;
- 	    if (*string != '<') {
--		(*outc) ('$');
-+		(*outc) (NCURSES_SP_ARGx '$');
- 		if (*string)
--		    (*outc) (*string);
-+		    (*outc) (NCURSES_SP_ARGx *string);
- 	    } else {
- 		bool mandatory;
- 
- 		string++;
- 		if ((!isdigit(UChar(*string)) && *string != '.')
- 		    || !strchr(string, '>')) {
--		    (*outc) ('$');
--		    (*outc) ('<');
-+		    (*outc) (NCURSES_SP_ARGx '$');
-+		    (*outc) (NCURSES_SP_ARGx '<');
- 		    continue;
- 		}
- 
-@@ -250,7 +328,7 @@
- 		    && (always_delay
- 			|| normal_delay
- 			|| mandatory))
--		    delay_output(number / 10);
-+		    NCURSES_SP_NAME(delay_output) (NCURSES_SP_ARGx number / 10);
- 
- 	    }			/* endelse (*string == '<') */
- 	}			/* endelse (*string == '$') */
-@@ -270,6 +348,25 @@
- 	delay_output(trailpad / 10);
- #endif /* BSD_TPUTS */
- 
--    my_outch = _nc_outch;
-+    my_outch = NCURSES_SP_NAME(_nc_outch);
-     return OK;
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+_nc_outc_wrapper(SCREEN *sp, int c)
-+{
-+    if (0 == sp) {
-+	return (ERR);
-+    } else {
-+	return sp->jump(c);
-+    }
-+}
-+
-+NCURSES_EXPORT(int)
-+tputs(const char *string, int affcnt, int (*outc) (int))
-+{
-+    SetSafeOutcWrapper(outc);
-+    return NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx string, affcnt, _nc_outc_wrapper);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_ttyflags.c ncurses-5.7/ncurses/tinfo/lib_ttyflags.c
---- ncurses-5.7.orig/ncurses/tinfo/lib_ttyflags.c	2008-08-03 15:10:44.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/lib_ttyflags.c	2009-07-19 15:04:06.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -36,159 +36,246 @@
-  */
- 
- #include <curses.priv.h>
--#include <term.h>		/* cur_term */
- 
--MODULE_ID("$Id: lib_ttyflags.c,v 1.18 2008/08/03 22:10:44 tom Exp $")
-+#ifndef CUR
-+#define CUR SP_TERMTYPE
-+#endif
-+
-+MODULE_ID("$Id: lib_ttyflags.c,v 1.25 2009/06/06 19:10:05 tom Exp $")
- 
- NCURSES_EXPORT(int)
--_nc_get_tty_mode(TTY * buf)
-+NCURSES_SP_NAME(_nc_get_tty_mode) (NCURSES_SP_DCLx TTY * buf)
- {
-     int result = OK;
- 
--    if (buf == 0) {
-+    if (buf == 0 || SP_PARM == 0) {
- 	result = ERR;
-     } else {
--	if (cur_term == 0) {
-+	TERMINAL *termp = TerminalOf(SP_PARM);
-+
-+	if (0 == termp) {
- 	    result = ERR;
- 	} else {
-+#ifdef USE_TERM_DRIVER
-+	    result = CallDriver_2(SP_PARM, sgmode, FALSE, buf);
-+#else
- 	    for (;;) {
--		if (GET_TTY(cur_term->Filedes, buf) != 0) {
-+		if (GET_TTY(termp->Filedes, buf) != 0) {
- 		    if (errno == EINTR)
- 			continue;
- 		    result = ERR;
- 		}
- 		break;
- 	    }
-+#endif
- 	}
- 
- 	if (result == ERR)
- 	    memset(buf, 0, sizeof(*buf));
- 
- 	TR(TRACE_BITS, ("_nc_get_tty_mode(%d): %s",
--			cur_term ? cur_term->Filedes : -1,
-+			termp ? termp->Filedes : -1,
- 			_nc_trace_ttymode(buf)));
-     }
-     return (result);
- }
- 
-+#if NCURSES_SP_FUNCS
- NCURSES_EXPORT(int)
--_nc_set_tty_mode(TTY * buf)
-+_nc_get_tty_mode(TTY * buf)
-+{
-+    return NCURSES_SP_NAME(_nc_get_tty_mode) (CURRENT_SCREEN, buf);
-+}
-+#endif
-+
-+NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_DCLx TTY * buf)
- {
-     int result = OK;
- 
--    if (buf == 0) {
-+    if (buf == 0 || SP_PARM == 0) {
- 	result = ERR;
-     } else {
--	if (cur_term == 0) {
-+	TERMINAL *termp = TerminalOf(SP_PARM);
-+
-+	if (0 == termp) {
- 	    result = ERR;
- 	} else {
-+#ifdef USE_TERM_DRIVER
-+	    result = CallDriver_2(SP_PARM, sgmode, TRUE, buf);
-+#else
- 	    for (;;) {
--		if (SET_TTY(cur_term->Filedes, buf) != 0) {
-+		if (SET_TTY(termp->Filedes, buf) != 0) {
- 		    if (errno == EINTR)
- 			continue;
--		    if ((errno == ENOTTY) && (SP != 0))
--			SP->_notty = TRUE;
-+		    if ((errno == ENOTTY) && (SP_PARM != 0))
-+			SP_PARM->_notty = TRUE;
- 		    result = ERR;
- 		}
- 		break;
- 	    }
-+#endif
- 	}
- 	TR(TRACE_BITS, ("_nc_set_tty_mode(%d): %s",
--			cur_term ? cur_term->Filedes : -1,
-+			termp ? termp->Filedes : -1,
- 			_nc_trace_ttymode(buf)));
-     }
-     return (result);
- }
- 
-+#if NCURSES_SP_FUNCS
- NCURSES_EXPORT(int)
--def_shell_mode(void)
-+_nc_set_tty_mode(TTY * buf)
-+{
-+    return NCURSES_SP_NAME(_nc_set_tty_mode) (CURRENT_SCREEN, buf);
-+}
-+#endif
-+
-+NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(def_shell_mode) (NCURSES_SP_DCL0)
- {
-     int rc = ERR;
-+    TERMINAL *termp = TerminalOf(SP_PARM);
- 
--    T((T_CALLED("def_shell_mode()")));
-+    T((T_CALLED("def_shell_mode(%p)"), SP_PARM));
- 
--    if (cur_term != 0) {
-+    if (termp != 0) {
-+#ifdef USE_TERM_DRIVER
-+	rc = CallDriver_2(SP_PARM, mode, FALSE, TRUE);
-+#else
- 	/*
- 	 * If XTABS was on, remove the tab and backtab capabilities.
- 	 */
--	if (_nc_get_tty_mode(&cur_term->Ottyb) == OK) {
-+	if (_nc_get_tty_mode(&termp->Ottyb) == OK) {
- #ifdef TERMIOS
--	    if (cur_term->Ottyb.c_oflag & OFLAGS_TABS)
-+	    if (termp->Ottyb.c_oflag & OFLAGS_TABS)
- 		tab = back_tab = NULL;
- #else
--	    if (cur_term->Ottyb.sg_flags & XTABS)
-+	    if (termp->Ottyb.sg_flags & XTABS)
- 		tab = back_tab = NULL;
- #endif
- 	    rc = OK;
- 	}
-+#endif
-     }
-     returnCode(rc);
- }
- 
-+#if NCURSES_SP_FUNCS
- NCURSES_EXPORT(int)
--def_prog_mode(void)
-+def_shell_mode(void)
-+{
-+    return NCURSES_SP_NAME(def_shell_mode) (CURRENT_SCREEN);
-+}
-+#endif
-+
-+NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(def_prog_mode) (NCURSES_SP_DCL0)
- {
-     int rc = ERR;
-+    TERMINAL *termp = TerminalOf(SP_PARM);
- 
--    T((T_CALLED("def_prog_mode()")));
-+    T((T_CALLED("def_prog_mode(%p)"), SP_PARM));
- 
--    if (cur_term != 0) {
-+    if (termp != 0) {
-+#ifdef USE_TERM_DRIVER
-+	rc = CallDriver_2(SP_PARM, mode, TRUE, TRUE);
-+#else
- 	/*
- 	 * Turn off the XTABS bit in the tty structure if it was on.
- 	 */
--	if (_nc_get_tty_mode(&cur_term->Nttyb) == OK) {
-+	if (_nc_get_tty_mode(&termp->Nttyb) == OK) {
- #ifdef TERMIOS
--	    cur_term->Nttyb.c_oflag &= ~OFLAGS_TABS;
-+	    termp->Nttyb.c_oflag &= ~OFLAGS_TABS;
- #else
--	    cur_term->Nttyb.sg_flags &= ~XTABS;
-+	    termp->Nttyb.sg_flags &= ~XTABS;
- #endif
- 	    rc = OK;
- 	}
-+#endif
-     }
-     returnCode(rc);
- }
- 
-+#if NCURSES_SP_FUNCS
- NCURSES_EXPORT(int)
--reset_prog_mode(void)
-+def_prog_mode(void)
- {
--    T((T_CALLED("reset_prog_mode()")));
-+    return NCURSES_SP_NAME(def_prog_mode) (CURRENT_SCREEN);
-+}
-+#endif
- 
--    if (cur_term != 0) {
--	if (_nc_set_tty_mode(&cur_term->Nttyb) == OK) {
--	    if (SP) {
--		if (SP->_keypad_on)
--		    _nc_keypad(SP, TRUE);
--		NC_BUFFERED(TRUE);
-+NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(reset_prog_mode) (NCURSES_SP_DCL0)
-+{
-+    int rc = ERR;
-+    TERMINAL *termp = TerminalOf(SP_PARM);
-+
-+    T((T_CALLED("reset_prog_mode(%p)"), SP_PARM));
-+
-+    if (termp != 0) {
-+#ifdef USE_TERM_DRIVER
-+	rc = CallDriver_2(SP_PARM, mode, TRUE, FALSE);
-+#else
-+	if (_nc_set_tty_mode(&termp->Nttyb) == OK) {
-+	    if (SP_PARM) {
-+		if (SP_PARM->_keypad_on)
-+		    _nc_keypad(SP_PARM, TRUE);
-+		NC_BUFFERED(SP_PARM, TRUE);
- 	    }
--	    returnCode(OK);
-+	    rc = OK;
- 	}
-+#endif
-     }
--    returnCode(ERR);
-+    returnCode(rc);
- }
- 
-+#if NCURSES_SP_FUNCS
- NCURSES_EXPORT(int)
--reset_shell_mode(void)
-+reset_prog_mode(void)
- {
--    T((T_CALLED("reset_shell_mode()")));
-+    return NCURSES_SP_NAME(reset_prog_mode) (CURRENT_SCREEN);
-+}
-+#endif
- 
--    if (cur_term != 0) {
--	if (SP) {
--	    _nc_keypad(SP, FALSE);
-+NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(reset_shell_mode) (NCURSES_SP_DCL0)
-+{
-+    int rc = ERR;
-+    TERMINAL *termp = TerminalOf(SP_PARM);
-+
-+    T((T_CALLED("reset_shell_mode(%p)"), SP_PARM));
-+
-+    if (termp != 0) {
-+#ifdef USE_TERM_DRIVER
-+	rc = CallDriver_2(SP_PARM, mode, FALSE, FALSE);
-+#else
-+	if (SP_PARM) {
-+	    _nc_keypad(SP_PARM, FALSE);
- 	    _nc_flush();
--	    NC_BUFFERED(FALSE);
-+	    NC_BUFFERED(SP_PARM, FALSE);
- 	}
--	returnCode(_nc_set_tty_mode(&cur_term->Ottyb));
-+	rc = _nc_set_tty_mode(&termp->Ottyb);
-+#endif
-     }
--    returnCode(ERR);
-+    returnCode(rc);
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+reset_shell_mode(void)
-+{
-+    return NCURSES_SP_NAME(reset_shell_mode) (CURRENT_SCREEN);
-+}
-+#endif
-+
- static TTY *
--saved_tty(void)
-+saved_tty(NCURSES_SP_DCL0)
- {
-     TTY *result = 0;
- 
--    if (SP != 0) {
--	result = &(SP->_saved_tty);
-+    if (SP_PARM != 0) {
-+	result = (TTY *) & (SP_PARM->_saved_tty);
-     } else {
- 	if (_nc_prescreen.saved_tty == 0) {
- 	    _nc_prescreen.saved_tty = typeCalloc(TTY, 1);
-@@ -204,17 +291,31 @@
- */
- 
- NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(savetty) (NCURSES_SP_DCL0)
-+{
-+    T((T_CALLED("savetty(%p)"), SP_PARM));
-+    returnCode(NCURSES_SP_NAME(_nc_get_tty_mode) (NCURSES_SP_ARGx saved_tty(NCURSES_SP_ARG)));
-+}
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
- savetty(void)
- {
--    T((T_CALLED("savetty()")));
-+    return NCURSES_SP_NAME(savetty) (CURRENT_SCREEN);
-+}
-+#endif
- 
--    returnCode(_nc_get_tty_mode(saved_tty()));
-+NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(resetty) (NCURSES_SP_DCL0)
-+{
-+    T((T_CALLED("resetty(%p)"), SP_PARM));
-+    returnCode(NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx saved_tty(NCURSES_SP_ARG)));
- }
- 
-+#if NCURSES_SP_FUNCS
- NCURSES_EXPORT(int)
- resetty(void)
- {
--    T((T_CALLED("resetty()")));
--
--    returnCode(_nc_set_tty_mode(saved_tty()));
-+    return NCURSES_SP_NAME(resetty) (CURRENT_SCREEN);
- }
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/make_keys.c ncurses-5.7/ncurses/tinfo/make_keys.c
---- ncurses-5.7.orig/ncurses/tinfo/make_keys.c	2008-08-03 14:57:22.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/make_keys.c	2009-07-19 15:02:22.000000000 -0700
-@@ -39,16 +39,16 @@
- #define USE_TERMLIB 1
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: make_keys.c,v 1.14 2008/08/03 21:57:22 tom Exp $")
-+MODULE_ID("$Id: make_keys.c,v 1.15 2008/11/16 00:19:59 juergen Exp $")
- 
- #include <names.c>
- 
- #define UNKNOWN (SIZEOF(strnames) + SIZEOF(strfnames))
- 
--static size_t
-+static unsigned
- lookup(const char *name)
- {
--    size_t n;
-+    unsigned n;
-     bool found = FALSE;
-     for (n = 0; strnames[n] != 0; n++) {
- 	if (!strcmp(name, strnames[n])) {
-@@ -73,7 +73,7 @@
-     char buffer[BUFSIZ];
-     char from[256];
-     char to[256];
--    int maxlen = 16;
-+    unsigned maxlen = 16;
-     int scanned;
- 
-     while (fgets(buffer, sizeof(buffer), ifp) != 0) {
-@@ -85,10 +85,10 @@
- 
- 	scanned = sscanf(buffer, "%255s %255s", to, from);
- 	if (scanned == 2) {
--	    int code = lookup(from);
-+	    unsigned code = lookup(from);
- 	    if (code == UNKNOWN)
- 		continue;
--	    if ((int) strlen(from) > maxlen)
-+	    if (strlen(from) > maxlen)
- 		maxlen = strlen(from);
- 	    fprintf(ofp, "\t{ %4d, %-*.*s },\t/* %s */\n",
- 		    code,
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/MKcodes.awk ncurses-5.7/ncurses/tinfo/MKcodes.awk
---- ncurses-5.7.orig/ncurses/tinfo/MKcodes.awk	2008-06-28 16:13:25.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/MKcodes.awk	2009-07-19 15:04:03.000000000 -0700
-@@ -1,5 +1,5 @@
- ##############################################################################
--# Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.                #
-+# Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.                #
- #                                                                            #
- # Permission is hereby granted, free of charge, to any person obtaining a    #
- # copy of this software and associated documentation files (the "Software"), #
-@@ -25,7 +25,7 @@
- # use or other dealings in this Software without prior written               #
- # authorization.                                                             #
- ##############################################################################
--# $Id: MKcodes.awk,v 1.5 2008/06/28 23:13:25 tom Exp $
-+# $Id: MKcodes.awk,v 1.8 2009/05/23 19:09:54 tom Exp $
- function large_item(value) {
- 	result = sprintf("%d,", offset);
- 	offset = offset + length(value) + 1;
-@@ -117,28 +117,39 @@
- 			print  "		if ((*value = typeCalloc(NCURSES_CONST char *, size + 1)) != 0) {"
- 			print  "			unsigned n;"
- 			print  "			for (n = 0; n < size; ++n) {"
--			print  "				(*value)[n] = _nc_code_blob + offsets[n];"
-+			print  "				(*value)[n] = (NCURSES_CONST char *) _nc_code_blob + offsets[n];"
- 			print  "			}"
- 			print  "		}"
- 			print  "	}"
- 			print  "	return *value;"
- 			print  "}"
- 			print  ""
--			print  "#define FIX(it) NCURSES_IMPEXP IT * NCURSES_API _nc_##it(void) { return alloc_array(&ptr_##it, _nc_offset_##it, SIZEOF(_nc_offset_##it)); }"
-+			print  "#define FIX(it) NCURSES_IMPEXP IT * NCURSES_API NCURSES_PUBLIC_VAR(it)(void) { return alloc_array(&ptr_##it, _nc_offset_##it, SIZEOF(_nc_offset_##it)); }"
- 		} else {
- 			print  "#define DCL(it) static IT data##it[]"
- 			print  ""
- 			print_strings("boolcodes", small_boolcodes);
- 			print_strings("numcodes", small_numcodes);
- 			print_strings("strcodes", small_strcodes);
--			print  "#define FIX(it) NCURSES_IMPEXP IT * NCURSES_API _nc_##it(void) { return data##it; }"
-+			print  "#define FIX(it) NCURSES_IMPEXP IT * NCURSES_API NCURSES_PUBLIC_VAR(it)(void) { return data##it; }"
- 		}
- 		print  ""
-+		print  "/* remove public definition which conflicts with FIX() */"
-+		print  "#undef boolcodes"
-+		print  "#undef numcodes"
-+		print  "#undef strcodes"
-+		print  ""
-+		print  "/* add local definition */"
- 		print  "FIX(boolcodes)"
- 		print  "FIX(numcodes)"
- 		print  "FIX(strcodes)"
- 		print  ""
-+		print  "/* restore the public definition */"
-+		print  ""
- 		print  "#define FREE_FIX(it) if (ptr_##it) { FreeAndNull(ptr_##it); }"
-+		print  "#define boolcodes  NCURSES_PUBLIC_VAR(boolcodes())"
-+		print  "#define numcodes   NCURSES_PUBLIC_VAR(numcodes())"
-+		print  "#define strcodes   NCURSES_PUBLIC_VAR(strcodes())"
- 		print  ""
- 		print  "#if NO_LEAKS"
- 		print  "NCURSES_EXPORT(void)"
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/MKfallback.sh ncurses-5.7/ncurses/tinfo/MKfallback.sh
---- ncurses-5.7.orig/ncurses/tinfo/MKfallback.sh	2006-07-15 09:54:20.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/MKfallback.sh	2009-07-19 15:03:53.000000000 -0700
-@@ -1,6 +1,6 @@
- #!/bin/sh
- ##############################################################################
--# Copyright (c) 1998-2001,2006 Free Software Foundation, Inc.                #
-+# Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.                #
- #                                                                            #
- # Permission is hereby granted, free of charge, to any person obtaining a    #
- # copy of this software and associated documentation files (the "Software"), #
-@@ -26,7 +26,7 @@
- # use or other dealings in this Software without prior written               #
- # authorization.                                                             #
- ##############################################################################
--# $Id: MKfallback.sh,v 1.13 2006/07/15 16:54:20 tom Exp $
-+# $Id: MKfallback.sh,v 1.14 2009/04/18 21:01:38 tom Exp $
- #
- # MKfallback.sh -- create fallback table for entry reads
- #
-@@ -63,7 +63,6 @@
-  */
- 
- #include <curses.priv.h>
--#include <term.h>
- 
- EOF
- 
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/MKnames.awk ncurses-5.7/ncurses/tinfo/MKnames.awk
---- ncurses-5.7.orig/ncurses/tinfo/MKnames.awk	2008-10-11 14:07:56.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/MKnames.awk	2009-07-19 15:03:45.000000000 -0700
-@@ -1,5 +1,5 @@
- ##############################################################################
--# Copyright (c) 2007,2008 Free Software Foundation, Inc.                     #
-+# Copyright (c) 2007-2008,2009 Free Software Foundation, Inc.                #
- #                                                                            #
- # Permission is hereby granted, free of charge, to any person obtaining a    #
- # copy of this software and associated documentation files (the "Software"), #
-@@ -25,7 +25,7 @@
- # use or other dealings in this Software without prior written               #
- # authorization.                                                             #
- ##############################################################################
--# $Id: MKnames.awk,v 1.20 2008/10/11 21:07:56 tom Exp $
-+# $Id: MKnames.awk,v 1.22 2009/03/21 21:03:39 tom Exp $
- function large_item(value) {
- 	result = sprintf("%d,", offset);
- 	offset = offset + length(value) + 1;
-@@ -107,8 +107,6 @@
- 		print  ""
- 		print  "#if BROKEN_LINKER || USE_REENTRANT"
- 		print  ""
--		print  "#include <term.h>"
--		print  ""
- 		if (bigstrings) {
- 			printf "static const char _nc_name_blob[] = \n"
- 			printf "%s;\n", bigstr;
-@@ -133,7 +131,7 @@
- 			print  "	return *value;"
- 			print  "}"
- 			print  ""
--			print  "#define FIX(it) NCURSES_IMPEXP IT * NCURSES_API _nc_##it(void) { return alloc_array(&ptr_##it, _nc_offset_##it, SIZEOF(_nc_offset_##it)); }"
-+			print  "#define FIX(it) NCURSES_IMPEXP IT * NCURSES_API NCURSES_PUBLIC_VAR(it)(void) { return alloc_array(&ptr_##it, _nc_offset_##it, SIZEOF(_nc_offset_##it)); }"
- 		} else {
- 			print  "#define DCL(it) static IT data##it[]"
- 			print  ""
-@@ -143,9 +141,18 @@
- 			print_strings("numfnames", small_numfnames);
- 			print_strings("strnames", small_strnames);
- 			print_strings("strfnames", small_strfnames);
--			print  "#define FIX(it) NCURSES_IMPEXP IT * NCURSES_API _nc_##it(void) { return data##it; }"
-+			print  "#define FIX(it) NCURSES_IMPEXP IT * NCURSES_API NCURSES_PUBLIC_VAR(it)(void) { return data##it; }"
- 		}
- 		print  ""
-+		print  "/* remove public definition which conflicts with FIX() */"
-+		print  "#undef boolnames"
-+		print  "#undef boolfnames"
-+		print  "#undef numnames"
-+		print  "#undef numfnames"
-+		print  "#undef strnames"
-+		print  "#undef strfnames"
-+		print  ""
-+		print  "/* add local definition */"
- 		print  "FIX(boolnames)"
- 		print  "FIX(boolfnames)"
- 		print  "FIX(numnames)"
-@@ -153,6 +160,13 @@
- 		print  "FIX(strnames)"
- 		print  "FIX(strfnames)"
- 		print  ""
-+		print  "/* restore the public definition */"
-+		print  "#define boolnames  NCURSES_PUBLIC_VAR(boolnames())"
-+		print  "#define boolfnames NCURSES_PUBLIC_VAR(boolfnames())"
-+		print  "#define numnames   NCURSES_PUBLIC_VAR(numnames())"
-+		print  "#define numfnames  NCURSES_PUBLIC_VAR(numfnames())"
-+		print  "#define strnames   NCURSES_PUBLIC_VAR(strnames())"
-+		print  "#define strfnames  NCURSES_PUBLIC_VAR(strfnames())"
- 		print  ""
- 		print  "#define FREE_FIX(it) if (ptr_##it) { FreeAndNull(ptr_##it); }"
- 		print  ""
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/name_match.c ncurses-5.7/ncurses/tinfo/name_match.c
---- ncurses-5.7.orig/ncurses/tinfo/name_match.c	2008-08-03 12:49:33.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/name_match.c	2009-07-19 15:02:22.000000000 -0700
-@@ -31,10 +31,9 @@
-  ****************************************************************************/
- 
- #include <curses.priv.h>
--#include <term.h>
- #include <tic.h>
- 
--MODULE_ID("$Id: name_match.c,v 1.17 2008/08/03 19:49:33 tom Exp $")
-+MODULE_ID("$Id: name_match.c,v 1.18 2008/11/16 00:19:59 juergen Exp $")
- 
- /*
-  *	_nc_first_name(char *names)
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/parse_entry.c ncurses-5.7/ncurses/tinfo/parse_entry.c
---- ncurses-5.7.orig/ncurses/tinfo/parse_entry.c	2008-08-16 14:52:03.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/parse_entry.c	2009-07-19 15:04:15.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -48,7 +48,7 @@
- #include <tic.h>
- #include <term_entry.h>
- 
--MODULE_ID("$Id: parse_entry.c,v 1.69 2008/08/16 21:52:03 tom Exp $")
-+MODULE_ID("$Id: parse_entry.c,v 1.71 2009/07/11 18:14:21 tom Exp $")
- 
- #ifdef LINT
- static short const parametrized[] =
-@@ -84,13 +84,13 @@
-     case NUMBER:
- 	first = tp->ext_Booleans;
- 	last = tp->ext_Numbers + first;
--	offset = tp->ext_Booleans + tp->ext_Numbers;
-+	offset = (unsigned) (tp->ext_Booleans + tp->ext_Numbers);
- 	tindex = tp->num_Numbers;
- 	break;
-     case STRING:
--	first = tp->ext_Booleans + tp->ext_Numbers;
-+	first = (unsigned) (tp->ext_Booleans + tp->ext_Numbers);
- 	last = tp->ext_Strings + first;
--	offset = tp->ext_Booleans + tp->ext_Numbers + tp->ext_Strings;
-+	offset = (unsigned) (tp->ext_Booleans + tp->ext_Numbers + tp->ext_Strings);
- 	tindex = tp->num_Strings;
- 	break;
-     case CANCEL:
-@@ -137,27 +137,31 @@
- 	    break;
- 	}
-     }
-+
-+#define for_each_value(max) \
-+	for (last = (unsigned) (max - 1); last > tindex; last--)
-+
-     if (!found) {
- 	switch (token_type) {
- 	case BOOLEAN:
--	    tp->ext_Booleans += 1;
--	    tp->num_Booleans += 1;
-+	    tp->ext_Booleans++;
-+	    tp->num_Booleans++;
- 	    tp->Booleans = typeRealloc(NCURSES_SBOOL, tp->num_Booleans, tp->Booleans);
--	    for (last = tp->num_Booleans - 1; last > tindex; last--)
-+	    for_each_value(tp->num_Booleans)
- 		tp->Booleans[last] = tp->Booleans[last - 1];
- 	    break;
- 	case NUMBER:
--	    tp->ext_Numbers += 1;
--	    tp->num_Numbers += 1;
-+	    tp->ext_Numbers++;
-+	    tp->num_Numbers++;
- 	    tp->Numbers = typeRealloc(short, tp->num_Numbers, tp->Numbers);
--	    for (last = tp->num_Numbers - 1; last > tindex; last--)
-+	    for_each_value(tp->num_Numbers)
- 		tp->Numbers[last] = tp->Numbers[last - 1];
- 	    break;
- 	case STRING:
--	    tp->ext_Strings += 1;
--	    tp->num_Strings += 1;
-+	    tp->ext_Strings++;
-+	    tp->num_Strings++;
- 	    tp->Strings = typeRealloc(char *, tp->num_Strings, tp->Strings);
--	    for (last = tp->num_Strings - 1; last > tindex; last--)
-+	    for_each_value(tp->num_Strings)
- 		tp->Strings[last] = tp->Strings[last - 1];
- 	    break;
- 	}
-@@ -170,7 +174,7 @@
- 
-     temp.nte_name = tp->ext_Names[offset];
-     temp.nte_type = token_type;
--    temp.nte_index = tindex;
-+    temp.nte_index = (short) tindex;
-     temp.nte_link = -1;
- 
-     return &temp;
-@@ -379,16 +383,14 @@
- 		    && !strcmp("ma", _nc_curr_token.tk_name)) {
- 		    /* tell max_attributes from arrow_key_map */
- 		    entry_ptr = _nc_find_type_entry("ma", NUMBER,
--						    _nc_get_table(_nc_syntax
--								  != 0));
-+						    _nc_syntax != 0);
- 		    assert(entry_ptr != 0);
- 
- 		} else if (token_type == STRING
- 			   && !strcmp("MT", _nc_curr_token.tk_name)) {
- 		    /* map terminfo's string MT to MT */
- 		    entry_ptr = _nc_find_type_entry("MT", STRING,
--						    _nc_get_table(_nc_syntax
--								  != 0));
-+						    _nc_syntax != 0);
- 		    assert(entry_ptr != 0);
- 
- 		} else if (token_type == BOOLEAN
-@@ -444,7 +446,7 @@
- 
- 	    case NUMBER:
- 		entryp->tterm.Numbers[entry_ptr->nte_index] =
--		    _nc_curr_token.tk_valnumber;
-+		    (short) _nc_curr_token.tk_valnumber;
- 		break;
- 
- 	    case STRING:
-@@ -788,7 +790,7 @@
- 	for (base = other_non_function_keys;
- 	     (cp = strchr(base, ',')) != 0;
- 	     base = cp + 1) {
--	    size_t len = cp - base;
-+	    size_t len = (unsigned) (cp - base);
- 
- 	    for (ap = ko_xlate; ap->from; ap++) {
- 		if (len == strlen(ap->from)
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/setbuf.c ncurses-5.7/ncurses/tinfo/setbuf.c
---- ncurses-5.7.orig/ncurses/tinfo/setbuf.c	2007-05-12 12:04:02.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/setbuf.c	2009-07-19 15:03:59.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2003,2007 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -29,6 +29,8 @@
- /****************************************************************************
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-+ *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                         2008                    *
-  ****************************************************************************/
- 
- /*
-@@ -40,7 +42,7 @@
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: setbuf.c,v 1.13 2007/05/12 19:04:02 tom Exp $")
-+MODULE_ID("$Id: setbuf.c,v 1.14 2009/05/09 23:09:00 tom Exp $")
- 
- /*
-  * If the output file descriptor is connected to a tty (the typical case) it
-@@ -98,11 +100,11 @@
-  * buffer.  So we disable this by default (there may yet be a workaround).
-  */
- NCURSES_EXPORT(void)
--_nc_set_buffer(FILE *ofp, bool buffered)
-+NCURSES_SP_NAME(_nc_set_buffer) (NCURSES_SP_DCLx FILE *ofp, bool buffered)
- {
-     /* optional optimization hack -- do before any output to ofp */
- #if HAVE_SETVBUF || HAVE_SETBUFFER
--    if (SP->_buffered != buffered) {
-+    if (SP_PARM->_buffered != buffered) {
- 	unsigned buf_len;
- 	char *buf_ptr;
- 
-@@ -115,10 +117,10 @@
- #endif
- 	if (buffered != 0) {
- 	    buf_len = min(LINES * (COLS + 6), 2800);
--	    if ((buf_ptr = SP->_setbuf) == 0) {
-+	    if ((buf_ptr = SP_PARM->_setbuf) == 0) {
- 		if ((buf_ptr = typeMalloc(char, buf_len)) == NULL)
- 		      return;
--		SP->_setbuf = buf_ptr;
-+		SP_PARM->_setbuf = buf_ptr;
- 		/* Don't try to free this! */
- 	    }
- #if !USE_SETBUF_0
-@@ -144,7 +146,15 @@
- 	(void) setbuffer(ofp, buf_ptr, (int) buf_len);
- #endif
- 
--	SP->_buffered = buffered;
-+	SP_PARM->_buffered = buffered;
-     }
- #endif /* HAVE_SETVBUF || HAVE_SETBUFFER */
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(void)
-+_nc_set_buffer(FILE *ofp, bool buffered)
-+{
-+    return NCURSES_SP_NAME(_nc_set_buffer) (CURRENT_SCREEN, ofp, buffered);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/tinfo_driver.c ncurses-5.7/ncurses/tinfo/tinfo_driver.c
---- ncurses-5.7.orig/ncurses/tinfo/tinfo_driver.c	1969-12-31 16:00:00.000000000 -0800
-+++ ncurses-5.7/ncurses/tinfo/tinfo_driver.c	2009-07-19 15:04:11.000000000 -0700
-@@ -0,0 +1,1389 @@
-+/****************************************************************************
-+ * Copyright (c) 2008,2009 Free Software Foundation, Inc.                   *
-+ *                                                                          *
-+ * Permission is hereby granted, free of charge, to any person obtaining a  *
-+ * copy of this software and associated documentation files (the            *
-+ * "Software"), to deal in the Software without restriction, including      *
-+ * without limitation the rights to use, copy, modify, merge, publish,      *
-+ * distribute, distribute with modifications, sublicense, and/or sell       *
-+ * copies of the Software, and to permit persons to whom the Software is    *
-+ * furnished to do so, subject to the following conditions:                 *
-+ *                                                                          *
-+ * The above copyright notice and this permission notice shall be included  *
-+ * in all copies or substantial portions of the Software.                   *
-+ *                                                                          *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
-+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
-+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
-+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
-+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
-+ *                                                                          *
-+ * Except as contained in this notice, the name(s) of the above copyright   *
-+ * holders shall not be used in advertising or otherwise to promote the     *
-+ * sale, use or other dealings in this Software without prior written       *
-+ * authorization.                                                           *
-+ ****************************************************************************/
-+
-+/****************************************************************************
-+ *  Author: Juergen Pfeifer                                                 *
-+ *                                                                          *
-+ ****************************************************************************/
-+
-+#include <curses.priv.h>
-+#define CUR ((TERMINAL*)TCB)->type.
-+#include <tic.h>
-+
-+#if HAVE_NANOSLEEP
-+#include <time.h>
-+#if HAVE_SYS_TIME_H
-+#include <sys/time.h>		/* needed for MacOS X DP3 */
-+#endif
-+#endif
-+
-+MODULE_ID("$Id: tinfo_driver.c,v 1.1 2009/05/23 22:40:30 juergen Exp $")
-+
-+/*
-+ * SCO defines TIOCGSIZE and the corresponding struct.  Other systems (SunOS,
-+ * Solaris, IRIX) define TIOCGWINSZ and struct winsize.
-+ */
-+#ifdef TIOCGSIZE
-+# define IOCTL_WINSIZE TIOCGSIZE
-+# define STRUCT_WINSIZE struct ttysize
-+# define WINSIZE_ROWS(n) (int)n.ts_lines
-+# define WINSIZE_COLS(n) (int)n.ts_cols
-+#else
-+# ifdef TIOCGWINSZ
-+#  define IOCTL_WINSIZE TIOCGWINSZ
-+#  define STRUCT_WINSIZE struct winsize
-+#  define WINSIZE_ROWS(n) (int)n.ws_row
-+#  define WINSIZE_COLS(n) (int)n.ws_col
-+# endif
-+#endif
-+
-+/*
-+ * These should be screen structure members.  They need to be globals for
-+ * historical reasons.  So we assign them in start_color() and also in
-+ * set_term()'s screen-switching logic.
-+ */
-+#if USE_REENTRANT
-+NCURSES_EXPORT(int)
-+NCURSES_PUBLIC_VAR(COLOR_PAIRS) (void)
-+{
-+    return CURRENT_SCREEN ? CURRENT_SCREEN->_pair_count : -1;
-+}
-+NCURSES_EXPORT(int)
-+NCURSES_PUBLIC_VAR(COLORS) (void)
-+{
-+    return CURRENT_SCREEN ? CURRENT_SCREEN->_color_count : -1;
-+}
-+#else
-+NCURSES_EXPORT_VAR(int) COLOR_PAIRS = 0;
-+NCURSES_EXPORT_VAR(int) COLORS = 0;
-+#endif
-+
-+static bool drv_CanHandle(TERMINAL_CONTROL_BLOCK * TCB, const char *tname, int *);
-+static void drv_init(TERMINAL_CONTROL_BLOCK *);
-+static void drv_release(TERMINAL_CONTROL_BLOCK *);
-+static int drv_size(TERMINAL_CONTROL_BLOCK *, int *, int *);
-+static int drv_sgmode(TERMINAL_CONTROL_BLOCK * TCB, bool setFlag, TTY * buf);
-+static chtype drv_conattr(TERMINAL_CONTROL_BLOCK * TCB);
-+static int drv_mvcur(TERMINAL_CONTROL_BLOCK * TCB, int yold, int xold, int
-+		     ynew, int xnew);
-+static int drv_mode(TERMINAL_CONTROL_BLOCK * TCB, bool progFlag, bool defFlag);
-+static bool drv_rescol(TERMINAL_CONTROL_BLOCK * TCB);
-+static bool drv_rescolors(TERMINAL_CONTROL_BLOCK * TCB);
-+static void drv_setcolor(TERMINAL_CONTROL_BLOCK * TCB, bool fore, int color, int
-+			   (*outc) (SCREEN *, int));
-+static int drv_dobeepflash(TERMINAL_CONTROL_BLOCK * TCB, bool beepFlag);
-+static void drv_initpair(TERMINAL_CONTROL_BLOCK * TCB, short pair, short f, short b);
-+static void drv_initcolor(TERMINAL_CONTROL_BLOCK * TCB, short color, short
-+			  r, short g, short b);
-+static void drv_do_color(TERMINAL_CONTROL_BLOCK * TCB, short old_pair, short
-+			 pair, bool reverse,
-+			 int (*outc) (SCREEN *, int));
-+static void drv_initmouse(TERMINAL_CONTROL_BLOCK * TCB);
-+static void drv_setfilter(TERMINAL_CONTROL_BLOCK * TCB);
-+static void drv_hwlabel(TERMINAL_CONTROL_BLOCK * TCB, int labnum, char *text);
-+static void drv_hwlabelOnOff(TERMINAL_CONTROL_BLOCK * TCB, bool OnFlag);
-+static int drv_doupdate(TERMINAL_CONTROL_BLOCK * TCB);
-+static int drv_defaultcolors(TERMINAL_CONTROL_BLOCK * TCB, int fg, int bg);
-+static int drv_print(TERMINAL_CONTROL_BLOCK * TCB, char *data, int len);
-+static int drv_getsize(TERMINAL_CONTROL_BLOCK *, int *, int *);
-+static int drv_setsize(TERMINAL_CONTROL_BLOCK * TCB, int l, int c);
-+static void drv_initacs(TERMINAL_CONTROL_BLOCK * TCB, chtype *, chtype *);
-+static void drv_wrap(SCREEN *);
-+static void drv_screen_init(SCREEN *);
-+static int drv_twait(TERMINAL_CONTROL_BLOCK *, int, int, int
-+		     *EVENTLIST_2nd(_nc_eventlist
-+				    *));
-+static int drv_read(TERMINAL_CONTROL_BLOCK * TCB, int *buf);
-+static int drv_nap(TERMINAL_CONTROL_BLOCK * TCB GCC_UNUSED, int ms);
-+static int drv_kpad(TERMINAL_CONTROL_BLOCK * TCB, bool);
-+static int drv_keyok(TERMINAL_CONTROL_BLOCK * TCB, int, bool);
-+static bool drv_kyExist(TERMINAL_CONTROL_BLOCK * TCB, int);
-+
-+NCURSES_EXPORT_VAR (TERM_DRIVER) _nc_TINFO_DRIVER = {
-+    TRUE,
-+	drv_CanHandle,		/* CanHandle */
-+	drv_init,		/* init */
-+	drv_release,		/* release */
-+	drv_size,		/* size */
-+	drv_sgmode,		/* sgmode */
-+	drv_conattr,		/* conattr */
-+	drv_mvcur,		/* hwcur */
-+	drv_mode,		/* mode */
-+	drv_rescol,		/* rescol */
-+	drv_rescolors,		/* rescolors */
-+	drv_setcolor,		/* color */
-+	drv_dobeepflash,	/* doBeepOrFlash */
-+	drv_initpair,		/* initpair */
-+	drv_initcolor,		/* initcolor */
-+	drv_do_color,		/* docolor */
-+	drv_initmouse,		/* initmouse */
-+	drv_setfilter,		/* setfilter */
-+	drv_hwlabel,		/* hwlabel */
-+	drv_hwlabelOnOff,	/* hwlabelOnOff */
-+	drv_doupdate,		/* update */
-+	drv_defaultcolors,	/* defaultcolors */
-+	drv_print,		/* print */
-+	drv_getsize,		/* getsize */
-+	drv_setsize,		/* setsize */
-+	drv_initacs,		/* initacs */
-+	drv_screen_init,	/* scinit */
-+	drv_wrap,		/* scexit */
-+	drv_twait,		/* twait  */
-+	drv_read,		/* read */
-+	drv_nap,		/* nap */
-+	drv_kpad,		/* kpad */
-+	drv_keyok,		/* kyOk */
-+	drv_kyExist		/* kyExist */
-+};
-+
-+#define TCBMAGIC NCDRV_MAGIC(NCDRV_TINFO)
-+#define AssertTCB() assert(TCB!=0 && TCB->magic==TCBMAGIC)
-+#define SetSP() assert(TCB->csp!=0); sp = TCB->csp
-+
-+/*
-+ * This routine needs to do all the work to make curscr look
-+ * like newscr.
-+ */
-+static int
-+drv_doupdate(TERMINAL_CONTROL_BLOCK * TCB)
-+{
-+    AssertTCB();
-+    return _nc_tinfo_doupdate(TCB->csp);
-+}
-+
-+/*
-+**	do_prototype()
-+**
-+**	Take the real command character out of the CC environment variable
-+**	and substitute it in for the prototype given in 'command_character'.
-+*/
-+static void
-+do_prototype(TERMINAL * termp)
-+{
-+    unsigned i;
-+    char CC;
-+    char proto;
-+    char *tmp;
-+    TERMINAL_CONTROL_BLOCK *TCB = (TERMINAL_CONTROL_BLOCK *) termp;
-+
-+    if ((tmp = getenv("CC")) != 0) {
-+	if ((CC = *tmp) != 0) {
-+	    proto = *command_character;
-+
-+	    for_each_string(i, &(termp->type)) {
-+		for (tmp = termp->type.Strings[i]; *tmp; tmp++) {
-+		    if (*tmp == proto)
-+			*tmp = CC;
-+		}
-+	    }
-+	}
-+    }
-+}
-+
-+#define ret_error(code, fmt, arg)	if (errret) {\
-+					    *errret = code;\
-+					    return(FALSE); \
-+					} else {\
-+					    fprintf(stderr, fmt, arg);\
-+					    exit(EXIT_FAILURE);\
-+					}
-+
-+#define ret_error0(code, msg)		if (errret) {\
-+					    *errret = code;\
-+					    return(FALSE);\
-+					} else {\
-+					    fprintf(stderr, msg);\
-+					    exit(EXIT_FAILURE);\
-+					}
-+
-+#if USE_DATABASE || USE_TERMCAP
-+/*
-+ * Return 1 if entry found, 0 if not found, -1 if database not accessible,
-+ * just like tgetent().
-+ */
-+static int
-+grab_entry(const char *const tn, TERMTYPE *const tp)
-+{
-+    char filename[PATH_MAX];
-+    int status = _nc_read_entry(tn, filename, tp);
-+
-+    /*
-+     * If we have an entry, force all of the cancelled strings to null
-+     * pointers so we don't have to test them in the rest of the library.
-+     * (The terminfo compiler bypasses this logic, since it must know if
-+     * a string is cancelled, for merging entries).
-+     */
-+    if (status == TGETENT_YES) {
-+	unsigned n;
-+	for_each_boolean(n, tp) {
-+	    if (!VALID_BOOLEAN(tp->Booleans[n]))
-+		tp->Booleans[n] = FALSE;
-+	}
-+	for_each_string(n, tp) {
-+	    if (tp->Strings[n] == CANCELLED_STRING)
-+		tp->Strings[n] = ABSENT_STRING;
-+	}
-+    }
-+    return (status);
-+}
-+#endif
-+
-+static bool
-+drv_CanHandle(TERMINAL_CONTROL_BLOCK * TCB, const char *tname, int *errret)
-+{
-+    bool result = FALSE;
-+    int status;
-+    TERMINAL *termp;
-+    SCREEN *sp;
-+
-+    assert(TCB != 0 && tname != 0);
-+    termp = (TERMINAL *) TCB;
-+    sp = TCB->csp;
-+    TCB->magic = TCBMAGIC;
-+
-+#if (USE_DATABASE || USE_TERMCAP)
-+    status = grab_entry(tname, &termp->type);
-+#else
-+    status = TGETENT_NO;
-+#endif
-+
-+    /* try fallback list if entry on disk */
-+    if (status != TGETENT_YES) {
-+	const TERMTYPE *fallback = _nc_fallback(tname);
-+
-+	if (fallback) {
-+	    termp->type = *fallback;
-+	    status = TGETENT_YES;
-+	}
-+    }
-+
-+    if (status != TGETENT_YES) {
-+	NCURSES_SP_NAME(del_curterm) (NCURSES_SP_ARGx termp);
-+	if (status == TGETENT_ERR) {
-+	    ret_error0(status, "terminals database is inaccessible\n");
-+	} else if (status == TGETENT_NO) {
-+	    ret_error(status, "'%s': unknown terminal type.\n", tname);
-+	}
-+    }
-+    result = TRUE;
-+#if !USE_REENTRANT
-+    strncpy(ttytype, termp->type.term_names, NAMESIZE - 1);
-+    ttytype[NAMESIZE - 1] = '\0';
-+#endif
-+
-+    if (command_character && getenv("CC"))
-+	do_prototype(termp);
-+
-+    if (generic_type) {
-+	ret_error(TGETENT_NO, "'%s': I need something more specific.\n", tname);
-+    }
-+    if (hard_copy) {
-+	ret_error(TGETENT_YES, "'%s': I can't handle hardcopy terminals.\n", tname);
-+    }
-+
-+    return result;
-+}
-+
-+static int
-+drv_dobeepflash(TERMINAL_CONTROL_BLOCK * TCB, bool beepFlag)
-+{
-+    SCREEN *sp;
-+    int res = ERR;
-+
-+    AssertTCB();
-+    SetSP();
-+
-+    /* FIXME: should make sure that we are not in altchar mode */
-+    if (beepFlag) {
-+	if (bell) {
-+	    res = NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "bell", bell);
-+	    NCURSES_SP_NAME(_nc_flush) (sp);
-+	} else if (flash_screen) {
-+	    res = NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx
-+					     "flash_screen",
-+					     flash_screen);
-+	    NCURSES_SP_NAME(_nc_flush) (sp);
-+	}
-+    } else {
-+	if (flash_screen) {
-+	    res = NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx
-+					     "flash_screen",
-+					     flash_screen);
-+	    NCURSES_SP_NAME(_nc_flush) (sp);
-+	} else if (bell) {
-+	    res = NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "bell", bell);
-+	    NCURSES_SP_NAME(_nc_flush) (sp);
-+	}
-+    }
-+    return res;
-+}
-+
-+/*
-+ * SVr4 curses is known to interchange color codes (1,4) and (3,6), possibly
-+ * to maintain compatibility with a pre-ANSI scheme.  The same scheme is
-+ * also used in the FreeBSD syscons.
-+ */
-+static int
-+toggled_colors(int c)
-+{
-+    if (c < 16) {
-+	static const int table[] =
-+	{0, 4, 2, 6, 1, 5, 3, 7,
-+	 8, 12, 10, 14, 9, 13, 11, 15};
-+	c = table[c];
-+    }
-+    return c;
-+}
-+
-+static int
-+drv_print(TERMINAL_CONTROL_BLOCK * TCB, char *data, int len)
-+{
-+    SCREEN *sp;
-+
-+    AssertTCB();
-+    SetSP();
-+#if NCURSES_EXT_FUNCS
-+    return NCURSES_SP_NAME(mcprint) (TCB->csp, data, len);
-+#else
-+    return ERR;
-+#endif
-+}
-+
-+static int
-+drv_defaultcolors(TERMINAL_CONTROL_BLOCK * TCB, int fg, int bg)
-+{
-+    SCREEN *sp;
-+    int code = ERR;
-+
-+    AssertTCB();
-+    SetSP();
-+
-+    if (sp != 0 && orig_pair && orig_colors && (initialize_pair != 0)) {
-+#if NCURSES_EXT_FUNCS
-+	sp->_default_color = isDefaultColor(fg) || isDefaultColor(bg);
-+	sp->_has_sgr_39_49 = (NCURSES_SP_NAME(tigetflag) (NCURSES_SP_ARGx
-+							  "AX")
-+			      == TRUE);
-+	sp->_default_fg = isDefaultColor(fg) ? COLOR_DEFAULT : (fg & C_MASK);
-+	sp->_default_bg = isDefaultColor(bg) ? COLOR_DEFAULT : (bg & C_MASK);
-+	if (sp->_color_pairs != 0) {
-+	    bool save = sp->_default_color;
-+	    sp->_default_color = TRUE;
-+	    NCURSES_SP_NAME(init_pair) (NCURSES_SP_ARGx
-+					0,
-+					(short)fg,
-+					(short)bg);
-+	    sp->_default_color = save;
-+	}
-+#endif
-+	code = OK;
-+    }
-+    return (code);
-+}
-+
-+static void
-+drv_setcolor(TERMINAL_CONTROL_BLOCK * TCB, bool fore, int color, int (*outc)
-+	       (SCREEN *, int))
-+{
-+    SCREEN *sp;
-+
-+    AssertTCB();
-+    SetSP();
-+
-+    if (fore) {
-+	if (set_a_foreground) {
-+	    TPUTS_TRACE("set_a_foreground");
-+	    NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
-+				    TPARM_1(set_a_foreground, color), 1, outc);
-+	} else {
-+	    TPUTS_TRACE("set_foreground");
-+	    NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
-+				    TPARM_1(set_foreground,
-+					    toggled_colors(color)), 1, outc);
-+	}
-+    } else {
-+	if (set_a_background) {
-+	    TPUTS_TRACE("set_a_background");
-+	    NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
-+				    TPARM_1(set_a_background, color), 1, outc);
-+	} else {
-+	    TPUTS_TRACE("set_background");
-+	    NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
-+				    TPARM_1(set_background,
-+					    toggled_colors(color)), 1, outc);
-+	}
-+    }
-+}
-+
-+static bool
-+drv_rescol(TERMINAL_CONTROL_BLOCK * TCB)
-+{
-+    bool result = FALSE;
-+    SCREEN *sp;
-+
-+    AssertTCB();
-+    SetSP();
-+
-+    if (orig_pair != 0) {
-+	NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "orig_pair", orig_pair);
-+	result = TRUE;
-+    }
-+    return result;
-+}
-+
-+static bool
-+drv_rescolors(TERMINAL_CONTROL_BLOCK * TCB)
-+{
-+    int result = FALSE;
-+    SCREEN *sp;
-+
-+    AssertTCB();
-+    SetSP();
-+
-+    if (orig_colors != 0) {
-+	NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "orig_colors", orig_colors);
-+	result = TRUE;
-+    }
-+    return result;
-+}
-+
-+static int
-+drv_size(TERMINAL_CONTROL_BLOCK * TCB, int *linep, int *colp)
-+{
-+    SCREEN *sp;
-+    bool useEnv = TRUE;
-+
-+    AssertTCB();
-+    sp = TCB->csp;		/* can be null here */
-+
-+    if (sp) {
-+	useEnv = sp->_use_env;
-+    } else
-+	useEnv = _nc_prescreen.use_env;
-+
-+    /* figure out the size of the screen */
-+    T(("screen size: terminfo lines = %d columns = %d", lines, columns));
-+
-+    if (!useEnv) {
-+	*linep = (int) lines;
-+	*colp = (int) columns;
-+    } else {			/* usually want to query LINES and COLUMNS from environment */
-+	int value;
-+
-+	*linep = *colp = 0;
-+
-+	/* first, look for environment variables */
-+	if ((value = _nc_getenv_num("LINES")) > 0) {
-+	    *linep = value;
-+	}
-+	if ((value = _nc_getenv_num("COLUMNS")) > 0) {
-+	    *colp = value;
-+	}
-+	T(("screen size: environment LINES = %d COLUMNS = %d", *linep, *colp));
-+
-+#ifdef __EMX__
-+	if (*linep <= 0 || *colp <= 0) {
-+	    int screendata[2];
-+	    _scrsize(screendata);
-+	    *colp = screendata[0];
-+	    *linep = screendata[1];
-+	    T(("EMX screen size: environment LINES = %d COLUMNS = %d",
-+	       *linep, *colp));
-+	}
-+#endif
-+#if HAVE_SIZECHANGE
-+	/* if that didn't work, maybe we can try asking the OS */
-+	if (*linep <= 0 || *colp <= 0) {
-+	    TERMINAL *termp = (TERMINAL *) TCB;
-+	    if (isatty(termp->Filedes)) {
-+		STRUCT_WINSIZE size;
-+
-+		errno = 0;
-+		do {
-+		    if (ioctl(termp->Filedes, IOCTL_WINSIZE, &size) < 0
-+			&& errno != EINTR)
-+			goto failure;
-+		} while
-+		    (errno == EINTR);
-+
-+		/*
-+		 * Solaris lets users override either dimension with an
-+		 * environment variable.
-+		 */
-+		if (*linep <= 0)
-+		    *linep = (sp != 0 && sp->_filtered) ? 1 : WINSIZE_ROWS(size);
-+		if (*colp <= 0)
-+		    *colp = WINSIZE_COLS(size);
-+	    }
-+	    /* FALLTHRU */
-+	  failure:;
-+	}
-+#endif /* HAVE_SIZECHANGE */
-+
-+	/* if we can't get dynamic info about the size, use static */
-+	if (*linep <= 0) {
-+	    *linep = (int) lines;
-+	}
-+	if (*colp <= 0) {
-+	    *colp = (int) columns;
-+	}
-+
-+	/* the ultimate fallback, assume fixed 24x80 size */
-+	if (*linep <= 0) {
-+	    *linep = 24;
-+	}
-+	if (*colp <= 0) {
-+	    *colp = 80;
-+	}
-+
-+	/*
-+	 * Put the derived values back in the screen-size caps, so
-+	 * tigetnum() and tgetnum() will do the right thing.
-+	 */
-+	lines = (short) (*linep);
-+	columns = (short) (*colp);
-+    }
-+
-+    T(("screen size is %dx%d", *linep, *colp));
-+    return OK;
-+}
-+
-+static int
-+drv_getsize(TERMINAL_CONTROL_BLOCK * TCB, int *l, int *c)
-+{
-+    AssertTCB();
-+    assert(l != 0 && c != 0);
-+    *l = lines;
-+    *c = columns;
-+    return OK;
-+}
-+
-+static int
-+drv_setsize(TERMINAL_CONTROL_BLOCK * TCB, int l, int c)
-+{
-+    AssertTCB();
-+    lines = l;
-+    columns = c;
-+    return OK;
-+}
-+
-+static int
-+drv_mode(TERMINAL_CONTROL_BLOCK * TCB, bool progFlag, bool defFlag)
-+{
-+    SCREEN *sp;
-+    TERMINAL *_term = (TERMINAL *) TCB;
-+    int code = ERR;
-+
-+    AssertTCB();
-+    sp = TCB->csp;
-+
-+    if (progFlag)		/* prog mode */
-+    {
-+	if (defFlag) {
-+	    /* def_prog_mode */
-+	    /*
-+	     * Turn off the XTABS bit in the tty structure if it was on.
-+	     */
-+	    if ((drv_sgmode(TCB, FALSE, &(_term->Nttyb)) == OK)) {
-+#ifdef TERMIOS
-+		_term->Nttyb.c_oflag &= ~OFLAGS_TABS;
-+#else
-+		_term->Nttyb.sg_flags &= ~XTABS;
-+#endif
-+		code = OK;
-+	    }
-+	} else {
-+	    /* reset_prog_mode */
-+	    if (drv_sgmode(TCB, TRUE, &(_term->Nttyb)) == OK) {
-+		if (sp) {
-+		    if (sp->_keypad_on)
-+			_nc_keypad(sp, TRUE);
-+		    NC_BUFFERED(sp, TRUE);
-+		}
-+		code = OK;
-+	    }
-+	}
-+    } else {			/* shell mode */
-+	if (defFlag) {
-+	    /* def_shell_mode */
-+	    /*
-+	     * If XTABS was on, remove the tab and backtab capabilities.
-+	     */
-+	    if (drv_sgmode(TCB, FALSE, &(_term->Ottyb)) == OK) {
-+#ifdef TERMIOS
-+		if (_term->Ottyb.c_oflag & OFLAGS_TABS)
-+		    tab = back_tab = NULL;
-+#else
-+		if (_term->Ottyb.sg_flags & XTABS)
-+		    tab = back_tab = NULL;
-+#endif
-+		code = OK;
-+	    }
-+	} else {
-+	    /* reset_shell_mode */
-+	    if (sp) {
-+		_nc_keypad(sp, FALSE);
-+		NCURSES_SP_NAME(_nc_flush) (sp);
-+		NC_BUFFERED(sp, FALSE);
-+	    }
-+	    code = drv_sgmode(TCB, TRUE, &(_term->Ottyb));
-+	}
-+    }
-+    return (code);
-+}
-+
-+static void
-+drv_wrap(SCREEN *sp)
-+{
-+    if (sp) {
-+	sp->_mouse_wrap(sp);
-+	NCURSES_SP_NAME(_nc_screen_wrap) (sp);
-+	NCURSES_SP_NAME(_nc_mvcur_wrap) (sp);	/* wrap up cursor addressing */
-+    }
-+}
-+
-+static void
-+drv_release(TERMINAL_CONTROL_BLOCK * TCB GCC_UNUSED)
-+{
-+}
-+
-+#  define SGR0_TEST(mode) (mode != 0) && (exit_attribute_mode == 0 || strcmp(mode, exit_attribute_mode))
-+
-+void
-+drv_screen_init(SCREEN *sp)
-+{
-+    TERMINAL_CONTROL_BLOCK *TCB = TCBOf(sp);
-+
-+    AssertTCB();
-+
-+    /*
-+     * Check for mismatched graphic-rendition capabilities.  Most SVr4
-+     * terminfo trees contain entries that have rmul or rmso equated to
-+     * sgr0 (Solaris curses copes with those entries).  We do this only
-+     * for curses, since many termcap applications assume that
-+     * smso/rmso and smul/rmul are paired, and will not function
-+     * properly if we remove rmso or rmul.  Curses applications
-+     * shouldn't be looking at this detail.
-+     */
-+    sp->_use_rmso = SGR0_TEST(exit_standout_mode);
-+    sp->_use_rmul = SGR0_TEST(exit_underline_mode);
-+
-+    /*
-+     * Check whether we can optimize scrolling under dumb terminals in
-+     * case we do not have any of these capabilities, scrolling
-+     * optimization will be useless.
-+     */
-+    sp->_scrolling = ((scroll_forward && scroll_reverse) ||
-+		      ((parm_rindex ||
-+			parm_insert_line ||
-+			insert_line) &&
-+		       (parm_index ||
-+			parm_delete_line ||
-+			delete_line)));
-+
-+    NCURSES_SP_NAME(baudrate) (sp);
-+
-+    NCURSES_SP_NAME(_nc_mvcur_init) (sp);
-+    /* initialize terminal to a sane state */
-+    NCURSES_SP_NAME(_nc_screen_init) (sp);
-+}
-+
-+static void
-+drv_init(TERMINAL_CONTROL_BLOCK * TCB)
-+{
-+    SCREEN *sp;
-+    TERMINAL *trm;
-+
-+    AssertTCB();
-+
-+    trm = (TERMINAL *) TCB;
-+    sp = TCB->csp;
-+
-+    TCB->info.initcolor = initialize_color;
-+    TCB->info.canchange = can_change;
-+    TCB->info.hascolor = ((VALID_NUMERIC(max_colors) && VALID_NUMERIC(max_pairs)
-+			   && (((set_foreground != NULL)
-+				&& (set_background != NULL))
-+			       || ((set_a_foreground != NULL)
-+				   && (set_a_background != NULL))
-+			       || set_color_pair)) ? TRUE : FALSE);
-+
-+    TCB->info.caninit = !(exit_ca_mode && non_rev_rmcup);
-+
-+    TCB->info.maxpairs = VALID_NUMERIC(max_pairs) ? max_pairs : 0;
-+    TCB->info.maxcolors = VALID_NUMERIC(max_colors) ? max_colors : 0;
-+    TCB->info.numlabels = VALID_NUMERIC(num_labels) ? num_labels : 0;
-+    TCB->info.labelwidth = VALID_NUMERIC(label_width) ? label_width : 0;
-+    TCB->info.labelheight = VALID_NUMERIC(label_height) ? label_height : 0;
-+    TCB->info.nocolorvideo = VALID_NUMERIC(no_color_video) ? no_color_video
-+	: 0;
-+    TCB->info.tabsize = VALID_NUMERIC(init_tabs) ? (int) init_tabs : 8;
-+
-+    TCB->info.defaultPalette = hue_lightness_saturation ? _nc_hls_palette : _nc_cga_palette;
-+
-+    /*
-+     * If an application calls setupterm() rather than initscr() or
-+     * newterm(), we will not have the def_prog_mode() call in
-+     * _nc_setupscreen().  Do it now anyway, so we can initialize the
-+     * baudrate.
-+     */
-+    if (isatty(trm->Filedes)) {
-+	TCB->drv->mode(TCB, TRUE, TRUE);
-+    }
-+}
-+
-+#define MAX_PALETTE	8
-+#define InPalette(n)	((n) >= 0 && (n) < MAX_PALETTE)
-+
-+static void
-+drv_initpair(TERMINAL_CONTROL_BLOCK * TCB, short pair, short f, short b)
-+{
-+    SCREEN *sp;
-+
-+    AssertTCB();
-+    SetSP();
-+
-+    if ((initialize_pair != NULL) && InPalette(f) && InPalette(b)) {
-+	const color_t *tp = InfoOf(sp).defaultPalette;
-+
-+	TR(TRACE_ATTRS,
-+	   ("initializing pair: pair = %d, fg=(%d,%d,%d), bg=(%d,%d,%d)",
-+	    pair,
-+	    tp[f].red, tp[f].green, tp[f].blue,
-+	    tp[b].red, tp[b].green, tp[b].blue));
-+
-+	NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx
-+				   "initialize_pair",
-+				   TPARM_7(initialize_pair,
-+					   pair,
-+					   tp[f].red, tp[f].green, tp[f].blue,
-+					   tp[b].red, tp[b].green, tp[b].blue));
-+    }
-+}
-+
-+static int
-+default_fg(SCREEN *sp)
-+{
-+#if NCURSES_EXT_FUNCS
-+    return (sp != 0) ? sp->_default_fg : COLOR_WHITE;
-+#else
-+    return COLOR_WHITE;
-+#endif
-+}
-+
-+static int
-+default_bg(SCREEN *sp)
-+{
-+#if NCURSES_EXT_FUNCS
-+    return sp != 0 ? sp->_default_bg : COLOR_BLACK;
-+#else
-+    return COLOR_BLACK;
-+#endif
-+}
-+
-+static void
-+drv_initcolor(TERMINAL_CONTROL_BLOCK * TCB,
-+	      short color, short r, short g, short b)
-+{
-+    SCREEN *sp = TCB->csp;
-+
-+    AssertTCB();
-+    if (initialize_color != NULL) {
-+	NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx
-+				   "initialize_color",
-+				   TPARM_4(initialize_color, color, r, g, b));
-+    }
-+}
-+
-+static void
-+drv_do_color(TERMINAL_CONTROL_BLOCK * TCB,
-+	     short old_pair,
-+	     short pair,
-+	     bool reverse,
-+	     NCURSES_SP_OUTC outc)
-+{
-+    SCREEN *sp = TCB->csp;
-+    NCURSES_COLOR_T fg = COLOR_DEFAULT;
-+    NCURSES_COLOR_T bg = COLOR_DEFAULT;
-+    NCURSES_COLOR_T old_fg, old_bg;
-+
-+    AssertTCB();
-+    if (sp == 0)
-+	return;
-+
-+    if (pair < 0 || pair >= COLOR_PAIRS) {
-+	return;
-+    } else if (pair != 0) {
-+	if (set_color_pair) {
-+	    TPUTS_TRACE("set_color_pair");
-+	    NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
-+				    TPARM_1(set_color_pair, pair), 1, outc);
-+	    return;
-+	} else if (sp != 0) {
-+	    NCURSES_SP_NAME(pair_content) (NCURSES_SP_ARGx
-+					   (short) pair,
-+					   &fg,
-+					   &bg);
-+	}
-+    }
-+
-+    if (old_pair >= 0
-+	&& sp != 0
-+	&& NCURSES_SP_NAME(pair_content) (NCURSES_SP_ARGx
-+					  old_pair,
-+					  &old_fg,
-+					  &old_bg) !=ERR) {
-+	if ((isDefaultColor(fg) && !isDefaultColor(old_fg))
-+	    || (isDefaultColor(bg) && !isDefaultColor(old_bg))) {
-+#if NCURSES_EXT_FUNCS
-+	    /*
-+	     * A minor optimization - but extension.  If "AX" is specified in
-+	     * the terminal description, treat it as screen's indicator of ECMA
-+	     * SGR 39 and SGR 49, and assume the two sequences are independent.
-+	     */
-+	    if (sp->_has_sgr_39_49
-+		&& isDefaultColor(old_bg)
-+		&& !isDefaultColor(old_fg)) {
-+		NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx "\033[39m", 1, outc);
-+	    } else if (sp->_has_sgr_39_49
-+		       && isDefaultColor(old_fg)
-+		       && !isDefaultColor(old_bg)) {
-+		NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx "\033[49m", 1, outc);
-+	    } else
-+#endif
-+		drv_rescol(TCB);
-+	}
-+    } else {
-+	drv_rescol(TCB);
-+	if (old_pair < 0)
-+	    return;
-+    }
-+
-+#if NCURSES_EXT_FUNCS
-+    if (isDefaultColor(fg))
-+	fg = default_fg(sp);
-+    if (isDefaultColor(bg))
-+	bg = default_bg(sp);
-+#endif
-+
-+    if (reverse) {
-+	NCURSES_COLOR_T xx = fg;
-+	fg = bg;
-+	bg = xx;
-+    }
-+
-+    TR(TRACE_ATTRS, ("setting colors: pair = %d, fg = %d, bg = %d", pair,
-+		     fg, bg));
-+
-+    if (!isDefaultColor(fg)) {
-+	drv_setcolor(TCB, TRUE, fg, outc);
-+    }
-+    if (!isDefaultColor(bg)) {
-+	drv_setcolor(TCB, FALSE, bg, outc);
-+    }
-+}
-+
-+#define xterm_kmous "\033[M"
-+static void
-+init_xterm_mouse(SCREEN *sp)
-+{
-+    sp->_mouse_type = M_XTERM;
-+    sp->_mouse_xtermcap = NCURSES_SP_NAME(tigetstr) (NCURSES_SP_ARGx "XM");
-+    if (!VALID_STRING(sp->_mouse_xtermcap))
-+	sp->_mouse_xtermcap = "\033[?1000%?%p1%{1}%=%th%el%;";
-+}
-+
-+static void
-+drv_initmouse(TERMINAL_CONTROL_BLOCK * TCB)
-+{
-+    SCREEN *sp;
-+
-+    AssertTCB();
-+    SetSP();
-+
-+    /* we know how to recognize mouse events under "xterm" */
-+    if (sp != 0) {
-+	if (key_mouse != 0) {
-+	    if (!strcmp(key_mouse, xterm_kmous)
-+		|| strstr(TerminalOf(sp)->type.term_names, "xterm") != 0) {
-+		init_xterm_mouse(sp);
-+	    }
-+	} else if (strstr(TerminalOf(sp)->type.term_names, "xterm") != 0) {
-+	    if (_nc_add_to_try(&(sp->_keytry), xterm_kmous, KEY_MOUSE) == OK)
-+		init_xterm_mouse(sp);
-+	}
-+    }
-+}
-+
-+static int
-+drv_mvcur(TERMINAL_CONTROL_BLOCK * TCB, int yold, int xold, int ynew, int xnew)
-+{
-+    SCREEN *sp = TCB->csp;
-+    AssertTCB();
-+    return _nc_tinfo_mvcur(sp, yold, xold, ynew, xnew);
-+}
-+
-+static void
-+drv_hwlabel(TERMINAL_CONTROL_BLOCK * TCB, int labnum, char *text)
-+{
-+    SCREEN *sp = TCB->csp;
-+
-+    AssertTCB();
-+    if (labnum > 0 && labnum <= num_labels) {
-+	NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx
-+				   "plab_norm",
-+				   TPARM_2(plab_norm, labnum, text));
-+    }
-+}
-+
-+static void
-+drv_hwlabelOnOff(TERMINAL_CONTROL_BLOCK * TCB, bool OnFlag)
-+{
-+    SCREEN *sp = TCB->csp;
-+
-+    AssertTCB();
-+    if (OnFlag) {
-+	NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "label_on", label_on);
-+    } else {
-+	NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "label_off", label_off);
-+    }
-+}
-+
-+static chtype
-+drv_conattr(TERMINAL_CONTROL_BLOCK * TCB)
-+{
-+    SCREEN *sp = TCB->csp;
-+    chtype attrs = A_NORMAL;
-+
-+    AssertTCB();
-+    if (enter_alt_charset_mode)
-+	attrs |= A_ALTCHARSET;
-+
-+    if (enter_blink_mode)
-+	attrs |= A_BLINK;
-+
-+    if (enter_bold_mode)
-+	attrs |= A_BOLD;
-+
-+    if (enter_dim_mode)
-+	attrs |= A_DIM;
-+
-+    if (enter_reverse_mode)
-+	attrs |= A_REVERSE;
-+
-+    if (enter_standout_mode)
-+	attrs |= A_STANDOUT;
-+
-+    if (enter_protected_mode)
-+	attrs |= A_PROTECT;
-+
-+    if (enter_secure_mode)
-+	attrs |= A_INVIS;
-+
-+    if (enter_underline_mode)
-+	attrs |= A_UNDERLINE;
-+
-+    if (sp && sp->_coloron)
-+	attrs |= A_COLOR;
-+
-+    return (attrs);
-+}
-+
-+static void
-+drv_setfilter(TERMINAL_CONTROL_BLOCK * TCB)
-+{
-+    AssertTCB();
-+
-+    clear_screen = 0;
-+    cursor_down = parm_down_cursor = 0;
-+    cursor_address = 0;
-+    cursor_up = parm_up_cursor = 0;
-+    row_address = 0;
-+    cursor_home = carriage_return;
-+}
-+
-+static int
-+drv_sgmode(TERMINAL_CONTROL_BLOCK * TCB, bool setFlag, TTY * buf)
-+{
-+    SCREEN *sp = TCB->csp;
-+    TERMINAL *_term = (TERMINAL *) TCB;
-+    int result = OK;
-+
-+    AssertTCB();
-+    if (setFlag) {
-+	for (;;) {
-+	    if (SET_TTY(_term->Filedes, buf) != 0) {
-+		if (errno == EINTR)
-+		    continue;
-+		if (errno == ENOTTY) {
-+		    if (sp)
-+			sp->_notty = TRUE;
-+		}
-+		result = ERR;
-+	    }
-+	    break;
-+	}
-+    } else {
-+	for (;;) {
-+	    if (GET_TTY(_term->Filedes, buf) != 0) {
-+		if (errno == EINTR)
-+		    continue;
-+		result = ERR;
-+	    }
-+	    break;
-+	}
-+    }
-+    return result;
-+}
-+
-+static void
-+drv_initacs(TERMINAL_CONTROL_BLOCK * TCB, chtype *real_map, chtype *fake_map)
-+{
-+    SCREEN *sp = TCB->csp;
-+
-+    AssertTCB();
-+    assert(sp != 0);
-+    if (ena_acs != NULL) {
-+	NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "ena_acs", ena_acs);
-+    }
-+#if NCURSES_EXT_FUNCS
-+    /*
-+     * Linux console "supports" the "PC ROM" character set by the coincidence
-+     * that smpch/rmpch and smacs/rmacs have the same values.  ncurses has
-+     * no codepage support (see SCO Merge for an example).  Outside of the
-+     * values defined in acsc, there are no definitions for the "PC ROM"
-+     * character set (assumed by some applications to be codepage 437), but we
-+     * allow those applications to use those codepoints.
-+     *
-+     * test/blue.c uses this feature.
-+     */
-+#define PCH_KLUDGE(a,b) (a != 0 && b != 0 && !strcmp(a,b))
-+    if (PCH_KLUDGE(enter_pc_charset_mode, enter_alt_charset_mode) &&
-+	PCH_KLUDGE(exit_pc_charset_mode, exit_alt_charset_mode)) {
-+	size_t i;
-+	for (i = 1; i < ACS_LEN; ++i) {
-+	    if (real_map[i] == 0) {
-+		real_map[i] = i;
-+		if (real_map != fake_map) {
-+		    if (sp != 0)
-+			sp->_screen_acs_map[i] = TRUE;
-+		}
-+	    }
-+	}
-+    }
-+#endif
-+
-+    if (acs_chars != NULL) {
-+	size_t i = 0;
-+	size_t length = strlen(acs_chars);
-+
-+	while (i + 1 < length) {
-+	    if (acs_chars[i] != 0 && UChar(acs_chars[i]) < ACS_LEN) {
-+		real_map[UChar(acs_chars[i])] = UChar(acs_chars[i + 1]) | A_ALTCHARSET;
-+		if (sp != 0)
-+		    sp->_screen_acs_map[UChar(acs_chars[i])] = TRUE;
-+	    }
-+	    i += 2;
-+	}
-+    }
-+#ifdef TRACE
-+    /* Show the equivalent mapping, noting if it does not match the
-+     * given attribute, whether by re-ordering or duplication.
-+     */
-+    if (USE_TRACEF(TRACE_CALLS)) {
-+	size_t n, m;
-+	char show[ACS_LEN * 2 + 1];
-+	for (n = 1, m = 0; n < ACS_LEN; n++) {
-+	    if (real_map[n] != 0) {
-+		show[m++] = (char) n;
-+		show[m++] = (char) ChCharOf(real_map[n]);
-+	    }
-+	}
-+	show[m] = 0;
-+	if (acs_chars == NULL || strcmp(acs_chars, show))
-+	    _tracef("%s acs_chars %s",
-+		    (acs_chars == NULL) ? "NULL" : "READ",
-+		    _nc_visbuf(acs_chars));
-+	_tracef("%s acs_chars %s",
-+		(acs_chars == NULL)
-+		? "NULL"
-+		: (strcmp(acs_chars, show)
-+		   ? "DIFF"
-+		   : "SAME"),
-+		_nc_visbuf(show));
-+
-+	_nc_unlock_global(tracef);
-+    }
-+#endif /* TRACE */
-+}
-+
-+#define ENSURE_TINFO(sp) (TCBOf(sp)->drv->isTerminfo)
-+
-+NCURSES_EXPORT(void)
-+_nc_cookie_init(SCREEN *sp)
-+{
-+    bool support_cookies = USE_XMC_SUPPORT;
-+    TERMINAL_CONTROL_BLOCK *TCB = (TERMINAL_CONTROL_BLOCK *) (sp->_term);
-+
-+    if (sp == 0 || !ENSURE_TINFO(sp))
-+	return;
-+
-+#if USE_XMC_SUPPORT
-+    /*
-+     * If we have no magic-cookie support compiled-in, or if it is suppressed
-+     * in the environment, reset the support-flag.
-+     */
-+    if (magic_cookie_glitch >= 0) {
-+	if (getenv("NCURSES_NO_MAGIC_COOKIE") != 0) {
-+	    support_cookies = FALSE;
-+	}
-+    }
-+#endif
-+
-+    if (!support_cookies && magic_cookie_glitch >= 0) {
-+	T(("will disable attributes to work w/o magic cookies"));
-+    }
-+
-+    if (magic_cookie_glitch > 0) {	/* tvi, wyse */
-+
-+	sp->_xmc_triggers = sp->_ok_attributes & (
-+						     A_STANDOUT |
-+						     A_UNDERLINE |
-+						     A_REVERSE |
-+						     A_BLINK |
-+						     A_DIM |
-+						     A_BOLD |
-+						     A_INVIS |
-+						     A_PROTECT
-+	    );
-+#if 0
-+	/*
-+	 * We "should" treat colors as an attribute.  The wyse350 (and its
-+	 * clones) appear to be the only ones that have both colors and magic
-+	 * cookies.
-+	 */
-+	if (has_colors()) {
-+	    sp->_xmc_triggers |= A_COLOR;
-+	}
-+#endif
-+	sp->_xmc_suppress = sp->_xmc_triggers & (chtype) ~(A_BOLD);
-+
-+	T(("magic cookie attributes %s", _traceattr(sp->_xmc_suppress)));
-+	/*
-+	 * Supporting line-drawing may be possible.  But make the regular
-+	 * video attributes work first.
-+	 */
-+	acs_chars = ABSENT_STRING;
-+	ena_acs = ABSENT_STRING;
-+	enter_alt_charset_mode = ABSENT_STRING;
-+	exit_alt_charset_mode = ABSENT_STRING;
-+#if USE_XMC_SUPPORT
-+	/*
-+	 * To keep the cookie support simple, suppress all of the optimization
-+	 * hooks except for clear_screen and the cursor addressing.
-+	 */
-+	if (support_cookies) {
-+	    clr_eol = ABSENT_STRING;
-+	    clr_eos = ABSENT_STRING;
-+	    set_attributes = ABSENT_STRING;
-+	}
-+#endif
-+    } else if (magic_cookie_glitch == 0) {	/* hpterm */
-+    }
-+
-+    /*
-+     * If magic cookies are not supported, cancel the strings that set
-+     * video attributes.
-+     */
-+    if (!support_cookies && magic_cookie_glitch >= 0) {
-+	magic_cookie_glitch = ABSENT_NUMERIC;
-+	set_attributes = ABSENT_STRING;
-+	enter_blink_mode = ABSENT_STRING;
-+	enter_bold_mode = ABSENT_STRING;
-+	enter_dim_mode = ABSENT_STRING;
-+	enter_reverse_mode = ABSENT_STRING;
-+	enter_standout_mode = ABSENT_STRING;
-+	enter_underline_mode = ABSENT_STRING;
-+    }
-+
-+    /* initialize normal acs before wide, since we use mapping in the latter */
-+#if !USE_WIDEC_SUPPORT
-+    if (_nc_unicode_locale() && _nc_locale_breaks_acs(sp->_term)) {
-+	acs_chars = NULL;
-+	ena_acs = NULL;
-+	enter_alt_charset_mode = NULL;
-+	exit_alt_charset_mode = NULL;
-+	set_attributes = NULL;
-+    }
-+#endif
-+}
-+
-+static int
-+drv_twait(TERMINAL_CONTROL_BLOCK * TCB,
-+	  int mode,
-+	  int milliseconds,
-+	  int *timeleft
-+	  EVENTLIST_2nd(_nc_eventlist * evl))
-+{
-+    SCREEN *sp;
-+
-+    AssertTCB();
-+    SetSP();
-+
-+    return _nc_timed_wait(sp, mode, milliseconds, timeleft EVENTLIST_2nd(evl));
-+}
-+
-+static int
-+drv_read(TERMINAL_CONTROL_BLOCK * TCB, int *buf)
-+{
-+    SCREEN *sp;
-+    unsigned char c2 = 0;
-+    int n;
-+
-+    AssertTCB();
-+    assert(buf);
-+    SetSP();
-+
-+    n = read(sp->_ifd, &c2, 1);
-+    *buf = (int) c2;
-+    return n;
-+}
-+
-+static int
-+drv_nap(TERMINAL_CONTROL_BLOCK * TCB GCC_UNUSED, int ms)
-+{
-+#if HAVE_NANOSLEEP
-+    {
-+	struct timespec request, remaining;
-+	request.tv_sec = ms / 1000;
-+	request.tv_nsec = (ms % 1000) * 1000000;
-+	while (nanosleep(&request, &remaining) == -1
-+	       && errno == EINTR) {
-+	    request = remaining;
-+	}
-+    }
-+#else
-+    _nc_timed_wait(0, 0, ms, (int *) 0 EVENTLIST_2nd(0));
-+#endif
-+    return OK;
-+}
-+
-+static int
-+__nc_putp(SCREEN *sp, const char *name GCC_UNUSED, const char *value)
-+{
-+    int rc = ERR;
-+
-+    if (value) {
-+	rc = NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx name, value);
-+    }
-+    return rc;
-+}
-+
-+static int
-+__nc_putp_flush(SCREEN *sp, const char *name, const char *value)
-+{
-+    int rc = __nc_putp(sp, name, value);
-+    if (rc != ERR) {
-+	NCURSES_SP_NAME(_nc_flush) (sp);
-+    }
-+    return rc;
-+}
-+
-+static int
-+drv_kpad(TERMINAL_CONTROL_BLOCK * TCB, bool flag)
-+{
-+    int ret = ERR;
-+    SCREEN *sp;
-+
-+    AssertTCB();
-+
-+    sp = TCB->csp;
-+
-+    if (sp) {
-+	if (flag) {
-+	    (void) __nc_putp_flush(sp, "keypad_xmit", keypad_xmit);
-+	} else if (!flag && keypad_local) {
-+	    (void) __nc_putp_flush(sp, "keypad_local", keypad_local);
-+	}
-+	if (flag && !sp->_tried) {
-+	    _nc_init_keytry(sp);
-+	    sp->_tried = TRUE;
-+	}
-+	ret = OK;
-+    }
-+
-+    return ret;
-+}
-+
-+static int
-+drv_keyok(TERMINAL_CONTROL_BLOCK * TCB, int c, bool flag)
-+{
-+    SCREEN *sp;
-+    int code = ERR;
-+    int count = 0;
-+    char *s;
-+
-+    AssertTCB();
-+    SetSP();
-+
-+    if (c >= 0) {
-+	unsigned ch = (unsigned) c;
-+	if (flag) {
-+	    while ((s = _nc_expand_try(sp->_key_ok, ch, &count, 0)) != 0
-+		   && _nc_remove_key(&(sp->_key_ok), ch)) {
-+		code = _nc_add_to_try(&(sp->_keytry), s, ch);
-+		free(s);
-+		count = 0;
-+		if (code != OK)
-+		    break;
-+	    }
-+	} else {
-+	    while ((s = _nc_expand_try(sp->_keytry, ch, &count, 0)) != 0
-+		   && _nc_remove_key(&(sp->_keytry), ch)) {
-+		code = _nc_add_to_try(&(sp->_key_ok), s, ch);
-+		free(s);
-+		count = 0;
-+		if (code != OK)
-+		    break;
-+	    }
-+	}
-+    }
-+    return (code);
-+}
-+
-+static bool
-+drv_kyExist(TERMINAL_CONTROL_BLOCK * TCB, int key)
-+{
-+    bool res = FALSE;
-+
-+    AssertTCB();
-+    if (TCB->csp)
-+	res = _nc_tinfo_has_key(TCB->csp, key) == 0 ? FALSE : TRUE;
-+
-+    return res;
-+}
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/use_screen.c ncurses-5.7/ncurses/tinfo/use_screen.c
---- ncurses-5.7.orig/ncurses/tinfo/use_screen.c	2008-06-07 12:16:56.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/use_screen.c	2009-07-19 15:02:22.000000000 -0700
-@@ -32,7 +32,7 @@
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: use_screen.c,v 1.6 2008/06/07 19:16:56 tom Exp $")
-+MODULE_ID("$Id: use_screen.c,v 1.7 2008/11/16 00:19:59 juergen Exp $")
- 
- NCURSES_EXPORT(int)
- use_screen(SCREEN *screen, NCURSES_SCREEN_CB func, void *data)
-@@ -47,7 +47,7 @@
-      * recurred through this point, return an error if so.
-      */
-     _nc_lock_global(curses);
--    save_SP = SP;
-+    save_SP = CURRENT_SCREEN;
-     set_term(screen);
- 
-     code = func(screen, data);
-diff -Naur ncurses-5.7.orig/ncurses/tinfo/write_entry.c ncurses-5.7/ncurses/tinfo/write_entry.c
---- ncurses-5.7.orig/ncurses/tinfo/write_entry.c	2008-08-03 12:24:00.000000000 -0700
-+++ ncurses-5.7/ncurses/tinfo/write_entry.c	2009-07-19 15:03:53.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -54,7 +54,7 @@
- #define TRACE_OUT(p)		/*nothing */
- #endif
- 
--MODULE_ID("$Id: write_entry.c,v 1.72 2008/08/03 19:24:00 tom Exp $")
-+MODULE_ID("$Id: write_entry.c,v 1.73 2009/04/18 21:01:38 tom Exp $")
- 
- static int total_written;
- 
-@@ -171,7 +171,11 @@
- 	struct stat statbuf;
- 
- 	if ((rc = stat(path, &statbuf)) < 0) {
--	    rc = mkdir(path, 0777);
-+	    rc = mkdir(path
-+#if !defined(__MINGW32__)
-+		       ,0777
-+#endif
-+		);
- 	} else if (_nc_access(path, R_OK | W_OK | X_OK) < 0) {
- 	    rc = -1;		/* permission denied */
- 	} else if (!(S_ISDIR(statbuf.st_mode))) {
-@@ -338,6 +342,7 @@
- 
- 	    while (*other_names != '\0') {
- 		ptr = other_names++;
-+		assert(ptr < buffer + sizeof(buffer) - 1);
- 		while (*other_names != '|' && *other_names != '\0')
- 		    other_names++;
- 
-@@ -385,7 +390,6 @@
-     }
-     while (*other_names != '\0') {
- 	ptr = other_names++;
--	assert(ptr < buffer + sizeof(buffer) - 1);
- 	while (*other_names != '|' && *other_names != '\0')
- 	    other_names++;
- 
-@@ -468,18 +472,18 @@
- 	   unsigned want,
- 	   unsigned size)
- {
--    int have = (limit - *offset);
-+    unsigned have = (limit - *offset);
- 
-     want *= size;
-     if (have > 0) {
--	if ((int) want > have)
-+	if (want > have)
- 	    want = have;
- 	memcpy(dst + *offset, src, want);
- 	*offset += want;
-     } else {
- 	want = 0;
-     }
--    return (int) (want / size);
-+    return (want / size);
- }
- 
- #define Write(buf, size, count) fake_write(buffer, offset, limit, (char *) buf, count, size)
-@@ -487,14 +491,15 @@
- #undef LITTLE_ENDIAN		/* BSD/OS defines this as a feature macro */
- #define HI(x)			((x) / 256)
- #define LO(x)			((x) % 256)
--#define LITTLE_ENDIAN(p, x)	(p)[0] = LO(x), (p)[1] = HI(x)
-+#define LITTLE_ENDIAN(p, x)	(p)[0] = (unsigned char)LO(x),  \
-+                                (p)[1] = (unsigned char)HI(x)
- 
- #define WRITE_STRING(str) (Write(str, sizeof(char), strlen(str) + 1) == strlen(str) + 1)
- 
- static int
- compute_offsets(char **Strings, unsigned strmax, short *offsets)
- {
--    size_t nextfree = 0;
-+    int nextfree = 0;
-     unsigned i;
- 
-     for (i = 0; i < strmax; i++) {
-@@ -503,8 +508,8 @@
- 	} else if (Strings[i] == CANCELLED_STRING) {
- 	    offsets[i] = -2;
- 	} else {
--	    offsets[i] = nextfree;
--	    nextfree += strlen(Strings[i]) + 1;
-+	    offsets[i] = (short) nextfree;
-+	    nextfree += (int) strlen(Strings[i]) + 1;
- 	    TRACE_OUT(("put Strings[%d]=%s(%d)", (int) i,
- 		       _nc_visbuf(Strings[i]), (int) nextfree));
- 	}
-@@ -536,8 +541,8 @@
- static unsigned
- extended_Booleans(TERMTYPE *tp)
- {
--    unsigned short result = 0;
--    unsigned short i;
-+    unsigned result = 0;
-+    unsigned i;
- 
-     for (i = 0; i < tp->ext_Booleans; ++i) {
- 	if (tp->Booleans[BOOLCOUNT + i] == TRUE)
-@@ -549,8 +554,8 @@
- static unsigned
- extended_Numbers(TERMTYPE *tp)
- {
--    unsigned short result = 0;
--    unsigned short i;
-+    unsigned result = 0;
-+    unsigned i;
- 
-     for (i = 0; i < tp->ext_Numbers; ++i) {
- 	if (tp->Numbers[NUMCOUNT + i] != ABSENT_NUMERIC)
-@@ -597,7 +602,7 @@
-     size_t namelen, boolmax, nummax, strmax;
-     char zero = '\0';
-     size_t i;
--    short nextfree;
-+    int nextfree;
-     short offsets[MAX_ENTRY_SIZE / 2];
-     unsigned char buf[MAX_ENTRY_SIZE];
-     unsigned last_bool = BOOLWRITE;
-@@ -690,7 +695,7 @@
- 
- #if NCURSES_XNAMES
-     if (extended_object(tp)) {
--	unsigned extcnt = NUM_EXT_NAMES(tp);
-+	unsigned extcnt = (unsigned) NUM_EXT_NAMES(tp);
- 
- 	if (even_boundary(nextfree))
- 	    return (ERR);
-diff -Naur ncurses-5.7.orig/ncurses/trace/lib_traceatr.c ncurses-5.7/ncurses/trace/lib_traceatr.c
---- ncurses-5.7.orig/ncurses/trace/lib_traceatr.c	2008-08-03 09:24:53.000000000 -0700
-+++ ncurses-5.7/ncurses/trace/lib_traceatr.c	2009-07-19 15:03:59.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -30,6 +30,7 @@
-  *  Author: Thomas Dickey                           1996-on                 *
-  *     and: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-+ *     and: Juergen Pfeifer                                                 *
-  ****************************************************************************/
- 
- /*
-@@ -37,9 +38,12 @@
-  */
- 
- #include <curses.priv.h>
--#include <term.h>		/* acs_chars */
- 
--MODULE_ID("$Id: lib_traceatr.c,v 1.63 2008/08/03 16:24:53 tom Exp $")
-+#ifndef CUR
-+#define CUR SP_TERMTYPE 
-+#endif
-+
-+MODULE_ID("$Id: lib_traceatr.c,v 1.66 2009/05/10 00:48:29 tom Exp $")
- 
- #define COLOR_OF(c) ((c < 0) ? "default" : (c > 7 ? color_of(c) : colors[c].name))
- 
-@@ -186,6 +190,9 @@
- 	unsigned int val;
- 	const char *name;
-     } ALT_NAMES;
-+#if NCURSES_SP_FUNCS
-+    SCREEN *sp = CURRENT_SCREEN;
-+#endif
-     static const ALT_NAMES names[] =
-     {
- 	{'l', "ACS_ULCORNER"},	/* upper left corner */
-@@ -228,7 +235,7 @@
-     if ((attr & A_ALTCHARSET) && (acs_chars != 0)) {
- 	char *cp;
- 	char *found = 0;
--	const ALT_NAMES *sp;
-+	const ALT_NAMES *strp;
- 
- 	for (cp = acs_chars; cp[0] && cp[1]; cp += 2) {
- 	    if (ChCharOf(cp[1]) == ChCharOf(ch)) {
-@@ -239,9 +246,9 @@
- 
- 	if (found != 0) {
- 	    ch = ChCharOf(*found);
--	    for (sp = names; sp->val; sp++)
--		if (sp->val == ch) {
--		    result = sp->name;
-+	    for (strp = names; strp->val; strp++)
-+		if (strp->val == ch) {
-+		    result = strp->name;
- 		    break;
- 		}
- 	}
-@@ -260,7 +267,9 @@
- 	if ((found = _nc_altcharset_name(ChAttrOf(ch), ch)) != 0) {
- 	    (void) _nc_trace_bufcat(bufnum, found);
- 	} else
--	    (void) _nc_trace_bufcat(bufnum, _nc_tracechar(SP, (int) ChCharOf(ch)));
-+	    (void) _nc_trace_bufcat(bufnum,
-+				    _nc_tracechar(CURRENT_SCREEN,
-+						  (int) ChCharOf(ch)));
- 
- 	if (ChAttrOf(ch) != A_NORMAL) {
- 	    (void) _nc_trace_bufcat(bufnum, " | ");
-@@ -320,7 +329,7 @@
- 			if (PUTC_ch != L'\0') {
- 			    /* it could not be a multibyte sequence */
- 			    (void) _nc_trace_bufcat(bufnum,
--						    _nc_tracechar(SP,
-+						    _nc_tracechar(CURRENT_SCREEN,
- 								  UChar(ch->chars[PUTC_i])));
- 			}
- 			break;
-@@ -329,7 +338,7 @@
- 			if (n)
- 			    (void) _nc_trace_bufcat(bufnum, ", ");
- 			(void) _nc_trace_bufcat(bufnum,
--						_nc_tracechar(SP,
-+						_nc_tracechar(CURRENT_SCREEN,
- 							      UChar(PUTC_buf[n])));
- 		    }
- 		}
-diff -Naur ncurses-5.7.orig/ncurses/trace/lib_tracebits.c ncurses-5.7/ncurses/trace/lib_tracebits.c
---- ncurses-5.7.orig/ncurses/trace/lib_tracebits.c	2008-08-03 09:09:26.000000000 -0700
-+++ ncurses-5.7/ncurses/trace/lib_tracebits.c	2009-07-19 15:02:22.000000000 -0700
-@@ -33,9 +33,8 @@
-  ****************************************************************************/
- 
- #include <curses.priv.h>
--#include <term.h>		/* cur_term */
- 
--MODULE_ID("$Id: lib_tracebits.c,v 1.17 2008/08/03 16:09:26 tom Exp $")
-+MODULE_ID("$Id: lib_tracebits.c,v 1.18 2008/11/16 00:19:59 juergen Exp $")
- 
- #if SVR4_TERMIO && !defined(_POSIX_SOURCE)
- #define _POSIX_SOURCE
-diff -Naur ncurses-5.7.orig/ncurses/trace/lib_trace.c ncurses-5.7/ncurses/trace/lib_trace.c
---- ncurses-5.7.orig/ncurses/trace/lib_trace.c	2008-08-23 11:04:29.000000000 -0700
-+++ ncurses-5.7/ncurses/trace/lib_trace.c	2009-07-19 15:02:23.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -30,6 +30,7 @@
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-  *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                                                 *
-  ****************************************************************************/
- 
- /*
-@@ -46,7 +47,7 @@
- 
- #include <ctype.h>
- 
--MODULE_ID("$Id: lib_trace.c,v 1.71 2008/08/23 18:04:29 tom Exp $")
-+MODULE_ID("$Id: lib_trace.c,v 1.72 2009/02/28 20:37:37 tom Exp $")
- 
- NCURSES_EXPORT_VAR(unsigned) _nc_tracing = 0; /* always define this */
- 
-@@ -56,26 +57,26 @@
- NCURSES_EXPORT(const char *)
- NCURSES_PUBLIC_VAR(_nc_tputs_trace) (void)
- {
--    return SP ? SP->_tputs_trace : _nc_prescreen._tputs_trace;
-+    return CURRENT_SCREEN ? CURRENT_SCREEN->_tputs_trace : _nc_prescreen._tputs_trace;
- }
- NCURSES_EXPORT(long)
- NCURSES_PUBLIC_VAR(_nc_outchars) (void)
- {
--    return SP ? SP->_outchars : _nc_prescreen._outchars;
-+    return CURRENT_SCREEN ? CURRENT_SCREEN->_outchars : _nc_prescreen._outchars;
- }
- NCURSES_EXPORT(void)
- _nc_set_tputs_trace(const char *s)
- {
--    if (SP)
--	SP->_tputs_trace = s;
-+    if (CURRENT_SCREEN)
-+	CURRENT_SCREEN->_tputs_trace = s;
-     else
- 	_nc_prescreen._tputs_trace = s;
- }
- NCURSES_EXPORT(void)
- _nc_count_outchars(long increment)
- {
--    if (SP)
--	SP->_outchars += increment;
-+    if (CURRENT_SCREEN)
-+	CURRENT_SCREEN->_outchars += increment;
-     else
- 	_nc_prescreen._outchars += increment;
- }
-diff -Naur ncurses-5.7.orig/ncurses/trace/lib_tracechr.c ncurses-5.7/ncurses/trace/lib_tracechr.c
---- ncurses-5.7.orig/ncurses/trace/lib_tracechr.c	2008-08-03 08:39:29.000000000 -0700
-+++ ncurses-5.7/ncurses/trace/lib_tracechr.c	2009-07-19 15:03:53.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -39,7 +39,7 @@
- 
- #include <ctype.h>
- 
--MODULE_ID("$Id: lib_tracechr.c,v 1.19 2008/08/03 15:39:29 tom Exp $")
-+MODULE_ID("$Id: lib_tracechr.c,v 1.20 2009/04/18 22:48:29 tom Exp $")
- 
- #ifdef TRACE
- 
-@@ -52,7 +52,7 @@
- 		      : _nc_globals.tracechr_buf);
- 
-     if (ch > KEY_MIN || ch < 0) {
--	name = _nc_keyname(sp, ch);
-+	name = safe_keyname(SP_PARM, ch);
- 	if (name == 0 || *name == '\0')
- 	    name = "NULL";
- 	(void) sprintf(MyBuffer, "'%.30s' = %#03o", name, ch);
-@@ -64,7 +64,7 @@
- 	 */
- 	(void) sprintf(MyBuffer, "%#03o", ch);
-     } else {
--	name = _nc_unctrl(sp, (chtype) ch);
-+	name = safe_unctrl(SP_PARM, (chtype) ch);
- 	if (name == 0 || *name == 0)
- 	    name = "null";	/* shouldn't happen */
- 	(void) sprintf(MyBuffer, "'%.30s' = %#03o", name, ch);
-@@ -75,7 +75,7 @@
- NCURSES_EXPORT(char *)
- _tracechar(int ch)
- {
--    return _nc_tracechar(SP, ch);
-+    return _nc_tracechar(CURRENT_SCREEN, ch);
- }
- #else
- EMPTY_MODULE(_nc_lib_tracechr)
-diff -Naur ncurses-5.7.orig/ncurses/trace/lib_tracedmp.c ncurses-5.7/ncurses/trace/lib_tracedmp.c
---- ncurses-5.7.orig/ncurses/trace/lib_tracedmp.c	2008-08-16 12:30:56.000000000 -0700
-+++ ncurses-5.7/ncurses/trace/lib_tracedmp.c	2009-07-19 15:03:53.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -39,7 +39,7 @@
- #include <curses.priv.h>
- #include <ctype.h>
- 
--MODULE_ID("$Id: lib_tracedmp.c,v 1.31 2008/08/16 19:30:56 tom Exp $")
-+MODULE_ID("$Id: lib_tracedmp.c,v 1.32 2009/04/18 21:01:38 tom Exp $")
- 
- #ifdef TRACE
- 
-@@ -68,7 +68,7 @@
-     if (width < win->_maxx)
- 	++width;
-     if (++width + 1 > (int) my_length) {
--	my_length = 2 * (width + 1);
-+	my_length = (unsigned) (2 * (width + 1));
- 	my_buffer = typeRealloc(char, my_length, my_buffer);
-     }
- 
-@@ -82,7 +82,7 @@
- 	 * we map those to '.' and '?' respectively.
- 	 */
- 	for (j = 0; j < width; ++j) {
--	    chtype test = CharOf(win->_line[n].text[j]);
-+	    chtype test = (chtype) CharOf(win->_line[n].text[j]);
- 	    ep[j] = (char) ((UChar(test) == test
- #if USE_WIDEC_SUPPORT
- 			     && (win->_line[n].text[j].chars[1] == 0)
-@@ -111,7 +111,7 @@
- 	    if (multicolumn) {
- 		ep = my_buffer;
- 		for (j = 0; j < width; ++j) {
--		    int test = WidecExt(win->_line[n].text[j]);
-+		    chtype test = WidecExt(win->_line[n].text[j]);
- 		    if (test) {
- 			ep[j] = (char) (test + '0');
- 		    } else {
-@@ -153,7 +153,7 @@
- 
- 	for (i = 0; i < 4; ++i) {
- 	    const char *hex = " 123456789ABCDEF";
--	    attr_t mask = (0xf << ((i + 4) * 4));
-+	    attr_t mask = (attr_t) (0xf << ((i + 4) * 4));
- 
- 	    haveattrs = FALSE;
- 	    for (j = 0; j < width; ++j)
-diff -Naur ncurses-5.7.orig/ncurses/trace/lib_tracemse.c ncurses-5.7/ncurses/trace/lib_tracemse.c
---- ncurses-5.7.orig/ncurses/trace/lib_tracemse.c	2008-08-03 08:39:29.000000000 -0700
-+++ ncurses-5.7/ncurses/trace/lib_tracemse.c	2009-07-19 15:02:22.000000000 -0700
-@@ -38,7 +38,7 @@
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_tracemse.c,v 1.15 2008/08/03 15:39:29 tom Exp $")
-+MODULE_ID("$Id: lib_tracemse.c,v 1.16 2008/11/16 00:19:59 juergen Exp $")
- 
- #ifdef TRACE
- 
-@@ -117,7 +117,7 @@
- NCURSES_EXPORT(char *)
- _tracemouse(MEVENT const *ep)
- {
--    return _nc_tracemouse(SP, ep);
-+    return _nc_tracemouse(CURRENT_SCREEN, ep);
- }
- 
- #else /* !TRACE */
-diff -Naur ncurses-5.7.orig/ncurses/trace/trace_tries.c ncurses-5.7/ncurses/trace/trace_tries.c
---- ncurses-5.7.orig/ncurses/trace/trace_tries.c	2008-08-03 08:43:30.000000000 -0700
-+++ ncurses-5.7/ncurses/trace/trace_tries.c	2009-07-19 15:03:48.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1999-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1999-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -35,7 +35,7 @@
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: trace_tries.c,v 1.13 2008/08/03 15:43:30 tom Exp $")
-+MODULE_ID("$Id: trace_tries.c,v 1.14 2009/03/28 20:44:01 tom Exp $")
- 
- #ifdef TRACE
- #define my_buffer _nc_globals.tracetry_buf
-@@ -46,7 +46,7 @@
- {
-     if (level > my_length) {
- 	my_length = (level + 1) * 4;
--	my_buffer = (unsigned char *) realloc(my_buffer, my_length);
-+	my_buffer = (unsigned char *) _nc_doalloc(my_buffer, my_length);
-     }
- 
-     while (tree != 0) {
-diff -Naur ncurses-5.7.orig/ncurses/trace/varargs.c ncurses-5.7/ncurses/trace/varargs.c
---- ncurses-5.7.orig/ncurses/trace/varargs.c	2008-08-03 08:42:49.000000000 -0700
-+++ ncurses-5.7/ncurses/trace/varargs.c	2009-07-19 15:02:22.000000000 -0700
-@@ -34,7 +34,7 @@
- 
- #include <ctype.h>
- 
--MODULE_ID("$Id: varargs.c,v 1.7 2008/08/03 15:42:49 tom Exp $")
-+MODULE_ID("$Id: varargs.c,v 1.8 2008/11/16 00:19:59 juergen Exp $")
- 
- #ifdef TRACE
- 
-@@ -44,7 +44,7 @@
-     atUnknown = 0, atInteger, atFloat, atPoint, atString
- } ARGTYPE;
- 
--#define VA_INT(type) ival = va_arg(ap, type)
-+#define VA_INT(type) ival = (int) va_arg(ap, type)
- #define VA_FLT(type) fval = va_arg(ap, type)
- #define VA_PTR(type) pval = (char *)va_arg(ap, type)
- #define VA_STR(type) sval = va_arg(ap, type)
-diff -Naur ncurses-5.7.orig/ncurses/trace/visbuf.c ncurses-5.7/ncurses/trace/visbuf.c
---- ncurses-5.7.orig/ncurses/trace/visbuf.c	2008-08-04 16:07:39.000000000 -0700
-+++ ncurses-5.7/ncurses/trace/visbuf.c	2009-07-19 15:04:15.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 2001-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 2001-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -42,7 +42,9 @@
- #include <tic.h>
- #include <ctype.h>
- 
--MODULE_ID("$Id: visbuf.c,v 1.32 2008/08/04 23:07:39 tom Exp $")
-+MODULE_ID("$Id: visbuf.c,v 1.33 2009/07/11 14:44:20 tom Exp $")
-+
-+#define NUM_VISBUFS 4
- 
- #define NormalLen(len) (size_t) (((size_t)(len) + 1) * 4)
- #define WideLen(len)   (size_t) (((size_t)(len) + 1) * 4 * MB_CUR_MAX)
-@@ -108,9 +110,16 @@
-     vbuf = tp = _nc_trace_buf(bufnum, NormalLen(len));
- #else
-     {
--	static char *mybuf[4];
--	mybuf[bufnum] = typeRealloc(char, NormalLen(len), mybuf[bufnum]);
--	vbuf = tp = mybuf[bufnum];
-+	static char *mybuf[NUM_VISBUFS];
-+	if (bufnum < 0) {
-+	    for (c = 0; c < NUM_VISBUFS; ++c) {
-+		FreeAndNull(mybuf[c]);
-+	    }
-+	    tp = 0;
-+	} else {
-+	    mybuf[bufnum] = typeRealloc(char, NormalLen(len), mybuf[bufnum]);
-+	    vbuf = tp = mybuf[bufnum];
-+	}
-     }
- #endif
-     if (tp != 0) {
-@@ -177,7 +186,7 @@
-     vbuf = tp = _nc_trace_buf(bufnum, WideLen(len));
- #else
-     {
--	static char *mybuf[2];
-+	static char *mybuf[NUM_VISBUFS];
- 	mybuf[bufnum] = typeRealloc(char, WideLen(len), mybuf[bufnum]);
- 	vbuf = tp = mybuf[bufnum];
-     }
-@@ -293,7 +302,8 @@
- 			PUTC_ch = buf[j].chars[PUTC_i];
- 			if (PUTC_ch == L'\0')
- 			    break;
--			PUTC_n = (int) wcrtomb(PUTC_buf, buf[j].chars[PUTC_i], &PUT_st);
-+			PUTC_n = (int) wcrtomb(PUTC_buf,
-+					       buf[j].chars[PUTC_i], &PUT_st);
- 			if (PUTC_n <= 0)
- 			    break;
- 			for (k = 0; k < PUTC_n; k++) {
-diff -Naur ncurses-5.7.orig/ncurses/tty/hardscroll.c ncurses-5.7/ncurses/tty/hardscroll.c
---- ncurses-5.7.orig/ncurses/tty/hardscroll.c	2008-08-03 16:49:30.000000000 -0700
-+++ ncurses-5.7/ncurses/tty/hardscroll.c	2009-07-19 15:03:53.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -147,90 +147,96 @@
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: hardscroll.c,v 1.42 2008/08/03 23:49:30 tom Exp $")
-+MODULE_ID("$Id: hardscroll.c,v 1.43 2009/04/18 21:41:30 tom Exp $")
- 
- #if defined(SCROLLDEBUG) || defined(HASHDEBUG)
- 
- # undef screen_lines
--# define screen_lines MAXLINES
--NCURSES_EXPORT_VAR(int)
--oldnums[MAXLINES];
--# define OLDNUM(n)	oldnums[n]
-+# define screen_lines(sp) MAXLINES
-+NCURSES_EXPORT_VAR (int)
-+  oldnums[MAXLINES];
-+# define OLDNUM(sp,n)	oldnums[n]
- # define _tracef	printf
- # undef TR
- # define TR(n, a)	if (_nc_tracing & (n)) { _tracef a ; putchar('\n'); }
- 
--extern NCURSES_EXPORT_VAR(unsigned) _nc_tracing;
-+extern				NCURSES_EXPORT_VAR(unsigned) _nc_tracing;
- 
- #else /* no debug */
- 
- /* OLDNUM(n) indicates which line will be shifted to the position n.
-    if OLDNUM(n) == _NEWINDEX, then the line n in new, not shifted from
-    somewhere. */
--NCURSES_EXPORT_VAR(int *)
--_nc_oldnums = 0;		/* obsolete: keep for ABI compat */
-+NCURSES_EXPORT_VAR (int *)
-+  _nc_oldnums = 0;		/* obsolete: keep for ABI compat */
- 
- # if USE_HASHMAP
--#  define oldnums       SP->_oldnum_list
--#  define OLDNUM(n)	oldnums[n]
-+#  define oldnums(sp)   (sp)->_oldnum_list
-+#  define OLDNUM(sp,n)	oldnums(sp)[n]
- # else				/* !USE_HASHMAP */
--#  define OLDNUM(n)	newscr->_line[n].oldindex
-+#  define OLDNUM(sp,n)	sp->_newscr->_line[n].oldindex
- # endif				/* !USE_HASHMAP */
- 
--#define OLDNUM_SIZE     SP->_oldnum_size
-+#define OLDNUM_SIZE(sp) (sp)->_oldnum_size
- 
- #endif /* defined(SCROLLDEBUG) || defined(HASHDEBUG) */
- 
- NCURSES_EXPORT(void)
--_nc_scroll_optimize(void)
-+NCURSES_SP_NAME(_nc_scroll_optimize) (NCURSES_SP_DCL0)
- /* scroll optimization to transform curscr to newscr */
- {
-     int i;
-     int start, end, shift;
- 
--    TR(TRACE_ICALLS, (T_CALLED("_nc_scroll_optimize")));
-+    TR(TRACE_ICALLS, (T_CALLED("_nc_scroll_optimize(%p)"), SP_PARM));
- 
- #if !defined(SCROLLDEBUG) && !defined(HASHDEBUG)
- #if USE_HASHMAP
-     /* get enough storage */
--    if (OLDNUM_SIZE < screen_lines) {
--	int *new_oldnums = typeRealloc(int, screen_lines, oldnums);
-+    if (OLDNUM_SIZE(SP_PARM) < screen_lines(SP_PARM)) {
-+	int *new_oldnums = typeRealloc(int, screen_lines(SP_PARM), oldnums(SP_PARM));
- 	if (!new_oldnums)
- 	    return;
--	oldnums = new_oldnums;
--	OLDNUM_SIZE = screen_lines;
-+	oldnums(SP_PARM) = new_oldnums;
-+	OLDNUM_SIZE(SP_PARM) = screen_lines(SP_PARM);
-     }
-     /* calculate the indices */
--    _nc_hash_map();
-+    NCURSES_SP_NAME(_nc_hash_map) (NCURSES_SP_ARG);
- #endif
- #endif /* !defined(SCROLLDEBUG) && !defined(HASHDEBUG) */
- 
- #ifdef TRACE
-     if (USE_TRACEF(TRACE_UPDATE | TRACE_MOVE)) {
--	_nc_linedump();
-+	NCURSES_SP_NAME(_nc_linedump) (NCURSES_SP_ARG);
- 	_nc_unlock_global(tracef);
-     }
- #endif /* TRACE */
- 
-     /* pass 1 - from top to bottom scrolling up */
--    for (i = 0; i < screen_lines;) {
--	while (i < screen_lines && (OLDNUM(i) == _NEWINDEX || OLDNUM(i) <= i))
-+    for (i = 0; i < screen_lines(SP_PARM);) {
-+	while (i < screen_lines(SP_PARM)
-+	       && (OLDNUM(SP_PARM, i) == _NEWINDEX || OLDNUM(SP_PARM, i) <= i))
- 	    i++;
--	if (i >= screen_lines)
-+	if (i >= screen_lines(SP_PARM))
- 	    break;
- 
--	shift = OLDNUM(i) - i;	/* shift > 0 */
-+	shift = OLDNUM(SP_PARM, i) - i;		/* shift > 0 */
- 	start = i;
- 
- 	i++;
--	while (i < screen_lines && OLDNUM(i) != _NEWINDEX && OLDNUM(i) - i
--	       == shift)
-+	while (i < screen_lines(SP_PARM)
-+	       && OLDNUM(SP_PARM, i) != _NEWINDEX
-+	       && OLDNUM(SP_PARM, i) - i == shift)
- 	    i++;
- 	end = i - 1 + shift;
- 
- 	TR(TRACE_UPDATE | TRACE_MOVE, ("scroll [%d, %d] by %d", start, end, shift));
- #if !defined(SCROLLDEBUG) && !defined(HASHDEBUG)
--	if (_nc_scrolln(shift, start, end, screen_lines - 1) == ERR) {
-+	if (NCURSES_SP_NAME(_nc_scrolln) (NCURSES_SP_ARGx
-+					  shift,
-+					  start,
-+					  end,
-+					  screen_lines(SP_PARM) - 1) == ERR) {
- 	    TR(TRACE_UPDATE | TRACE_MOVE, ("unable to scroll"));
- 	    continue;
- 	}
-@@ -238,23 +244,33 @@
-     }
- 
-     /* pass 2 - from bottom to top scrolling down */
--    for (i = screen_lines - 1; i >= 0;) {
--	while (i >= 0 && (OLDNUM(i) == _NEWINDEX || OLDNUM(i) >= i))
-+    for (i = screen_lines(SP_PARM) - 1; i >= 0;) {
-+	while (i >= 0
-+	       && (OLDNUM(SP_PARM, i) == _NEWINDEX
-+		   || OLDNUM(SP_PARM, i) >= i)) {
- 	    i--;
-+	}
- 	if (i < 0)
- 	    break;
- 
--	shift = OLDNUM(i) - i;	/* shift < 0 */
-+	shift = OLDNUM(SP_PARM, i) - i;		/* shift < 0 */
- 	end = i;
- 
- 	i--;
--	while (i >= 0 && OLDNUM(i) != _NEWINDEX && OLDNUM(i) - i == shift)
-+	while (i >= 0
-+	       && OLDNUM(SP_PARM, i) != _NEWINDEX
-+	       && OLDNUM(SP_PARM, i) - i == shift) {
- 	    i--;
-+	}
- 	start = i + 1 - (-shift);
- 
- 	TR(TRACE_UPDATE | TRACE_MOVE, ("scroll [%d, %d] by %d", start, end, shift));
- #if !defined(SCROLLDEBUG) && !defined(HASHDEBUG)
--	if (_nc_scrolln(shift, start, end, screen_lines - 1) == ERR) {
-+	if (NCURSES_SP_NAME(_nc_scrolln) (NCURSES_SP_ARGx
-+					  shift,
-+					  start,
-+					  end,
-+					  screen_lines(SP_PARM) - 1) == ERR) {
- 	    TR(TRACE_UPDATE | TRACE_MOVE, ("unable to scroll"));
- 	    continue;
- 	}
-@@ -263,24 +279,41 @@
-     TR(TRACE_ICALLS, (T_RETURN("")));
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(void)
-+_nc_scroll_optimize(void)
-+{
-+    NCURSES_SP_NAME(_nc_scroll_optimize) (CURRENT_SCREEN);
-+}
-+#endif
-+
- #if defined(TRACE) || defined(SCROLLDEBUG) || defined(HASHDEBUG)
- NCURSES_EXPORT(void)
--_nc_linedump(void)
-+NCURSES_SP_NAME(_nc_linedump) (NCURSES_SP_DCL0)
- /* dump the state of the real and virtual oldnum fields */
- {
-     int n;
-     char *buf = 0;
--    size_t want = (screen_lines + 1) * 4;
-+    size_t want = (screen_lines(SP_PARM) + 1) * 4;
- 
-     if ((buf = typeMalloc(char, want)) != 0) {
- 
- 	(void) strcpy(buf, "virt");
--	for (n = 0; n < screen_lines; n++)
--	    (void) sprintf(buf + strlen(buf), " %02d", OLDNUM(n));
-+	for (n = 0; n < screen_lines(SP_PARM); n++)
-+	    (void) sprintf(buf + strlen(buf), " %02d", OLDNUM(SP_PARM, n));
- 	TR(TRACE_UPDATE | TRACE_MOVE, (buf));
- 	free(buf);
-     }
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(void)
-+_nc_linedump(void)
-+{
-+    NCURSES_SP_NAME(_nc_linedump) (CURRENT_SCREEN);
-+}
-+#endif
-+
- #endif /* defined(TRACE) || defined(SCROLLDEBUG) */
- 
- #ifdef SCROLLDEBUG
-diff -Naur ncurses-5.7.orig/ncurses/tty/hashmap.c ncurses-5.7/ncurses/tty/hashmap.c
---- ncurses-5.7.orig/ncurses/tty/hashmap.c	2007-10-13 11:47:25.000000000 -0700
-+++ ncurses-5.7/ncurses/tty/hashmap.c	2009-07-19 15:03:59.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.                   *
-+ * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -68,9 +68,12 @@
- *****************************************************************************/
- 
- #include <curses.priv.h>
--#include <term.h>		/* for back_color_erase */
- 
--MODULE_ID("$Id: hashmap.c,v 1.56 2007/10/13 18:47:25 Miroslav.Lichvar Exp $")
-+#ifndef CUR
-+#define CUR SP_TERMTYPE
-+#endif
-+
-+MODULE_ID("$Id: hashmap.c,v 1.59 2009/05/10 00:51:57 tom Exp $")
- 
- #ifdef HASHDEBUG
- 
-@@ -83,25 +86,25 @@
- int oldnums[MAXLINES], reallines[MAXLINES];
- static NCURSES_CH_T oldtext[MAXLINES][TEXTWIDTH];
- static NCURSES_CH_T newtext[MAXLINES][TEXTWIDTH];
--# define OLDNUM(n)	oldnums[n]
--# define OLDTEXT(n)	oldtext[n]
--# define NEWTEXT(m)	newtext[m]
--# define PENDING(n)     1
-+# define OLDNUM(sp,n)	oldnums[n]
-+# define OLDTEXT(sp,n)	oldtext[n]
-+# define NEWTEXT(sp,m)	newtext[m]
-+# define PENDING(sp,n)  1
- 
- #else /* !HASHDEBUG */
- 
--# define OLDNUM(n)	SP->_oldnum_list[n]
--# define OLDTEXT(n)	curscr->_line[n].text
--# define NEWTEXT(m)	newscr->_line[m].text
--# define TEXTWIDTH	(curscr->_maxx+1)
--# define PENDING(n)     (newscr->_line[n].firstchar != _NOCHANGE)
-+# define OLDNUM(sp,n)	(sp)->_oldnum_list[n]
-+# define OLDTEXT(sp,n)	(sp)->_curscr->_line[n].text
-+# define NEWTEXT(sp,m)	(sp)->_newscr->_line[m].text
-+# define TEXTWIDTH(sp)	((sp)->_curscr->_maxx+1)
-+# define PENDING(sp,n)  ((sp)->_newscr->_line[n].firstchar != _NOCHANGE)
- 
- #endif /* !HASHDEBUG */
- 
--#define oldhash		(SP->oldhash)
--#define newhash		(SP->newhash)
--#define hashtab		(SP->hashtab)
--#define lines_alloc	(SP->hashtab_len)
-+#define oldhash(sp)	((sp)->oldhash)
-+#define newhash(sp)	((sp)->newhash)
-+#define hashtab(sp)	((sp)->hashtab)
-+#define lines_alloc(sp)	((sp)->hashtab_len)
- 
- #if USE_WIDEC_SUPPORT
- #define HASH_VAL(ch) (ch.chars[0])
-@@ -112,12 +115,12 @@
- static const NCURSES_CH_T blankchar = NewChar(BLANK_TEXT);
- 
- static NCURSES_INLINE unsigned long
--hash(NCURSES_CH_T * text)
-+hash(SCREEN *sp, NCURSES_CH_T * text)
- {
-     int i;
-     NCURSES_CH_T ch;
-     unsigned long result = 0;
--    for (i = TEXTWIDTH; i > 0; i--) {
-+    for (i = TEXTWIDTH(sp); i > 0; i--) {
- 	ch = *text++;
- 	result += (result << 5) + HASH_VAL(ch);
-     }
-@@ -126,12 +129,12 @@
- 
- /* approximate update cost */
- static int
--update_cost(NCURSES_CH_T * from, NCURSES_CH_T * to)
-+update_cost(SCREEN *sp, NCURSES_CH_T * from, NCURSES_CH_T * to)
- {
-     int cost = 0;
-     int i;
- 
--    for (i = TEXTWIDTH; i > 0; i--, from++, to++)
-+    for (i = TEXTWIDTH(sp); i > 0; i--, from++, to++)
- 	if (!(CharEq(*from, *to)))
- 	    cost++;
- 
-@@ -139,7 +142,7 @@
- }
- 
- static int
--update_cost_from_blank(NCURSES_CH_T * to)
-+update_cost_from_blank(SCREEN *sp, NCURSES_CH_T * to)
- {
-     int cost = 0;
-     int i;
-@@ -148,7 +151,7 @@
-     if (back_color_erase)
- 	SetPair(blank, GetPair(stdscr->_nc_bkgd));
- 
--    for (i = TEXTWIDTH; i > 0; i--, to++)
-+    for (i = TEXTWIDTH(sp); i > 0; i--, to++)
- 	if (!(CharEq(blank, *to)))
- 	    cost++;
- 
-@@ -160,14 +163,14 @@
-  * effective. 'blank' indicates whether the line 'to' would become blank.
-  */
- static NCURSES_INLINE bool
--cost_effective(const int from, const int to, const bool blank)
-+cost_effective(SCREEN *sp, const int from, const int to, const bool blank)
- {
-     int new_from;
- 
-     if (from == to)
- 	return FALSE;
- 
--    new_from = OLDNUM(from);
-+    new_from = OLDNUM(sp, from);
-     if (new_from == _NEWINDEX)
- 	new_from = from;
- 
-@@ -175,16 +178,17 @@
-      * On the left side of >= is the cost before moving;
-      * on the right side -- cost after moving.
-      */
--    return (((blank ? update_cost_from_blank(NEWTEXT(to))
--	      : update_cost(OLDTEXT(to), NEWTEXT(to)))
--	     + update_cost(OLDTEXT(new_from), NEWTEXT(from)))
--	    >= ((new_from == from ? update_cost_from_blank(NEWTEXT(from))
--		 : update_cost(OLDTEXT(new_from), NEWTEXT(from)))
--		+ update_cost(OLDTEXT(from), NEWTEXT(to)))) ? TRUE : FALSE;
-+    return (((blank ? update_cost_from_blank(sp, NEWTEXT(sp, to))
-+	      : update_cost(sp, OLDTEXT(sp, to), NEWTEXT(sp, to)))
-+	     + update_cost(sp, OLDTEXT(sp, new_from), NEWTEXT(sp, from)))
-+	    >= ((new_from == from ? update_cost_from_blank(sp, NEWTEXT(sp, from))
-+		 : update_cost(sp, OLDTEXT(sp, new_from), NEWTEXT(sp, from)))
-+		+ update_cost(sp, OLDTEXT(sp, from), NEWTEXT(sp, to))))
-+	? TRUE : FALSE;
- }
- 
- static void
--grow_hunks(void)
-+grow_hunks(SCREEN *sp)
- {
-     int start, end, shift;
-     int back_limit, forward_limit;	/* limits for cells to fill */
-@@ -200,35 +204,36 @@
-     back_ref_limit = 0;
- 
-     i = 0;
--    while (i < screen_lines && OLDNUM(i) == _NEWINDEX)
-+    while (i < screen_lines(sp) && OLDNUM(sp, i) == _NEWINDEX)
- 	i++;
--    for (; i < screen_lines; i = next_hunk) {
-+    for (; i < screen_lines(sp); i = next_hunk) {
- 	start = i;
--	shift = OLDNUM(i) - i;
-+	shift = OLDNUM(sp, i) - i;
- 
- 	/* get forward limit */
- 	i = start + 1;
--	while (i < screen_lines && OLDNUM(i) != _NEWINDEX && OLDNUM(i) - i
--	       == shift)
-+	while (i < screen_lines(sp)
-+	       && OLDNUM(sp, i) != _NEWINDEX
-+	       && OLDNUM(sp, i) - i == shift)
- 	    i++;
- 	end = i;
--	while (i < screen_lines && OLDNUM(i) == _NEWINDEX)
-+	while (i < screen_lines(sp) && OLDNUM(sp, i) == _NEWINDEX)
- 	    i++;
- 	next_hunk = i;
- 	forward_limit = i;
--	if (i >= screen_lines || OLDNUM(i) >= i)
-+	if (i >= screen_lines(sp) || OLDNUM(sp, i) >= i)
- 	    forward_ref_limit = i;
- 	else
--	    forward_ref_limit = OLDNUM(i);
-+	    forward_ref_limit = OLDNUM(sp, i);
- 
- 	i = start - 1;
- 	/* grow back */
- 	if (shift < 0)
- 	    back_limit = back_ref_limit + (-shift);
- 	while (i >= back_limit) {
--	    if (newhash[i] == oldhash[i + shift]
--		|| cost_effective(i + shift, i, shift < 0)) {
--		OLDNUM(i) = i + shift;
-+	    if (newhash(sp)[i] == oldhash(sp)[i + shift]
-+		|| cost_effective(sp, i + shift, i, shift < 0)) {
-+		OLDNUM(sp, i) = i + shift;
- 		TR(TRACE_UPDATE | TRACE_MOVE,
- 		   ("connected new line %d to old line %d (backward continuation)",
- 		    i, i + shift));
-@@ -246,9 +251,9 @@
- 	if (shift > 0)
- 	    forward_limit = forward_ref_limit - shift;
- 	while (i < forward_limit) {
--	    if (newhash[i] == oldhash[i + shift]
--		|| cost_effective(i + shift, i, shift > 0)) {
--		OLDNUM(i) = i + shift;
-+	    if (newhash(sp)[i] == oldhash(sp)[i + shift]
-+		|| cost_effective(sp, i + shift, i, shift > 0)) {
-+		OLDNUM(sp, i) = i + shift;
- 		TR(TRACE_UPDATE | TRACE_MOVE,
- 		   ("connected new line %d to old line %d (forward continuation)",
- 		    i, i + shift));
-@@ -268,51 +273,53 @@
- }
- 
- NCURSES_EXPORT(void)
--_nc_hash_map(void)
-+NCURSES_SP_NAME(_nc_hash_map) (NCURSES_SP_DCL0)
- {
--    HASHMAP *sp;
-+    HASHMAP *hsp;
-     register int i;
-     int start, shift, size;
- 
--    if (screen_lines > lines_alloc) {
--	if (hashtab)
--	    free(hashtab);
--	hashtab = typeMalloc(HASHMAP, (screen_lines + 1) * 2);
--	if (!hashtab) {
--	    if (oldhash) {
--		FreeAndNull(oldhash);
-+    if (screen_lines(SP_PARM) > lines_alloc(SP_PARM)) {
-+	if (hashtab(SP_PARM))
-+	    free(hashtab(SP_PARM));
-+	hashtab(SP_PARM) = typeMalloc(HASHMAP, (screen_lines(SP_PARM) + 1) * 2);
-+	if (!hashtab(SP_PARM)) {
-+	    if (oldhash(SP_PARM)) {
-+		FreeAndNull(oldhash(SP_PARM));
- 	    }
--	    lines_alloc = 0;
-+	    lines_alloc(SP_PARM) = 0;
- 	    return;
- 	}
--	lines_alloc = screen_lines;
-+	lines_alloc(SP_PARM) = screen_lines(SP_PARM);
-     }
- 
--    if (oldhash && newhash) {
-+    if (oldhash(SP_PARM) && newhash(SP_PARM)) {
- 	/* re-hash only changed lines */
--	for (i = 0; i < screen_lines; i++) {
--	    if (PENDING(i))
--		newhash[i] = hash(NEWTEXT(i));
-+	for (i = 0; i < screen_lines(SP_PARM); i++) {
-+	    if (PENDING(SP_PARM, i))
-+		newhash(SP_PARM)[i] = hash(SP_PARM, NEWTEXT(SP_PARM, i));
- 	}
-     } else {
- 	/* re-hash all */
--	if (oldhash == 0)
--	    oldhash = typeCalloc(unsigned long, (unsigned) screen_lines);
--	if (newhash == 0)
--	    newhash = typeCalloc(unsigned long, (unsigned) screen_lines);
--	if (!oldhash || !newhash)
-+	if (oldhash(SP_PARM) == 0)
-+	    oldhash(SP_PARM) = typeCalloc(unsigned long,
-+					    (unsigned) screen_lines(SP_PARM));
-+	if (newhash(SP_PARM) == 0)
-+	    newhash(SP_PARM) = typeCalloc(unsigned long,
-+					    (unsigned) screen_lines(SP_PARM));
-+	if (!oldhash(SP_PARM) || !newhash(SP_PARM))
- 	    return;		/* malloc failure */
--	for (i = 0; i < screen_lines; i++) {
--	    newhash[i] = hash(NEWTEXT(i));
--	    oldhash[i] = hash(OLDTEXT(i));
-+	for (i = 0; i < screen_lines(SP_PARM); i++) {
-+	    newhash(SP_PARM)[i] = hash(SP_PARM, NEWTEXT(SP_PARM, i));
-+	    oldhash(SP_PARM)[i] = hash(SP_PARM, OLDTEXT(SP_PARM, i));
- 	}
-     }
- 
- #ifdef HASH_VERIFY
--    for (i = 0; i < screen_lines; i++) {
--	if (newhash[i] != hash(NEWTEXT(i)))
-+    for (i = 0; i < screen_lines(SP_PARM); i++) {
-+	if (newhash(SP_PARM)[i] != hash(SP_PARM, NEWTEXT(SP_PARM, i)))
- 	    fprintf(stderr, "error in newhash[%d]\n", i);
--	if (oldhash[i] != hash(OLDTEXT(i)))
-+	if (oldhash(SP_PARM)[i] != hash(SP_PARM, OLDTEXT(SP_PARM, i)))
- 	    fprintf(stderr, "error in oldhash[%d]\n", i);
-     }
- #endif
-@@ -320,28 +327,29 @@
-     /*
-      * Set up and count line-hash values.
-      */
--    memset(hashtab, '\0', sizeof(*hashtab) * (screen_lines + 1) * 2);
--    for (i = 0; i < screen_lines; i++) {
--	unsigned long hashval = oldhash[i];
-+    memset(hashtab(SP_PARM), '\0',
-+	   sizeof(*(hashtab(SP_PARM))) * (screen_lines(SP_PARM) + 1) * 2);
-+    for (i = 0; i < screen_lines(SP_PARM); i++) {
-+	unsigned long hashval = oldhash(SP_PARM)[i];
- 
--	for (sp = hashtab; sp->hashval; sp++)
--	    if (sp->hashval == hashval)
-+	for (hsp = hashtab(SP_PARM); hsp->hashval; hsp++)
-+	    if (hsp->hashval == hashval)
- 		break;
--	sp->hashval = hashval;	/* in case this is a new entry */
--	sp->oldcount++;
--	sp->oldindex = i;
-+	hsp->hashval = hashval;	/* in case this is a new entry */
-+	hsp->oldcount++;
-+	hsp->oldindex = i;
-     }
--    for (i = 0; i < screen_lines; i++) {
--	unsigned long hashval = newhash[i];
-+    for (i = 0; i < screen_lines(SP_PARM); i++) {
-+	unsigned long hashval = newhash(SP_PARM)[i];
- 
--	for (sp = hashtab; sp->hashval; sp++)
--	    if (sp->hashval == hashval)
-+	for (hsp = hashtab(SP_PARM); hsp->hashval; hsp++)
-+	    if (hsp->hashval == hashval)
- 		break;
--	sp->hashval = hashval;	/* in case this is a new entry */
--	sp->newcount++;
--	sp->newindex = i;
-+	hsp->hashval = hashval;	/* in case this is a new entry */
-+	hsp->newcount++;
-+	hsp->newindex = i;
- 
--	OLDNUM(i) = _NEWINDEX;	/* initialize old indices array */
-+	OLDNUM(SP_PARM, i) = _NEWINDEX;		/* initialize old indices array */
-     }
- 
-     /*
-@@ -351,16 +359,16 @@
-      * extending hunks by cost_effective. Otherwise, it does not
-      * have any side effects.
-      */
--    for (sp = hashtab; sp->hashval; sp++)
--	if (sp->oldcount == 1 && sp->newcount == 1
--	    && sp->oldindex != sp->newindex) {
-+    for (hsp = hashtab(SP_PARM); hsp->hashval; hsp++)
-+	if (hsp->oldcount == 1 && hsp->newcount == 1
-+	    && hsp->oldindex != hsp->newindex) {
- 	    TR(TRACE_UPDATE | TRACE_MOVE,
- 	       ("new line %d is hash-identical to old line %d (unique)",
--		sp->newindex, sp->oldindex));
--	    OLDNUM(sp->newindex) = sp->oldindex;
-+		hsp->newindex, hsp->oldindex));
-+	    OLDNUM(SP_PARM, hsp->newindex) = hsp->oldindex;
- 	}
- 
--    grow_hunks();
-+    grow_hunks(SP_PARM);
- 
-     /*
-      * Eliminate bad or impossible shifts -- this includes removing
-@@ -368,58 +376,83 @@
-      * those which are to be moved too far, they are likely to destroy
-      * more than carry.
-      */
--    for (i = 0; i < screen_lines;) {
--	while (i < screen_lines && OLDNUM(i) == _NEWINDEX)
-+    for (i = 0; i < screen_lines(SP_PARM);) {
-+	while (i < screen_lines(SP_PARM) && OLDNUM(SP_PARM, i) == _NEWINDEX)
- 	    i++;
--	if (i >= screen_lines)
-+	if (i >= screen_lines(SP_PARM))
- 	    break;
- 	start = i;
--	shift = OLDNUM(i) - i;
-+	shift = OLDNUM(SP_PARM, i) - i;
- 	i++;
--	while (i < screen_lines && OLDNUM(i) != _NEWINDEX && OLDNUM(i) - i
--	       == shift)
-+	while (i < screen_lines(SP_PARM)
-+	       && OLDNUM(SP_PARM, i) != _NEWINDEX
-+	       && OLDNUM(SP_PARM, i) - i == shift)
- 	    i++;
- 	size = i - start;
- 	if (size < 3 || size + min(size / 8, 2) < abs(shift)) {
- 	    while (start < i) {
--		OLDNUM(start) = _NEWINDEX;
-+		OLDNUM(SP_PARM, start) = _NEWINDEX;
- 		start++;
- 	    }
- 	}
-     }
- 
-     /* After clearing invalid hunks, try grow the rest. */
--    grow_hunks();
-+    grow_hunks(SP_PARM);
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(void)
-+_nc_hash_map(void)
-+{
-+    NCURSES_SP_NAME(_nc_hash_map) (CURRENT_SCREEN);
-+}
-+#endif
-+
-+NCURSES_EXPORT(void)
-+NCURSES_SP_NAME(_nc_make_oldhash) (NCURSES_SP_DCLx int i)
-+{
-+    if (oldhash(SP_PARM))
-+	oldhash(SP_PARM)[i] = hash(SP_PARM, OLDTEXT(SP_PARM, i));
-+}
-+
-+#if NCURSES_SP_FUNCS
- NCURSES_EXPORT(void)
- _nc_make_oldhash(int i)
- {
--    if (oldhash)
--	oldhash[i] = hash(OLDTEXT(i));
-+    NCURSES_SP_NAME(_nc_make_oldhash) (CURRENT_SCREEN, i);
- }
-+#endif
- 
- NCURSES_EXPORT(void)
--_nc_scroll_oldhash(int n, int top, int bot)
-+NCURSES_SP_NAME(_nc_scroll_oldhash) (NCURSES_SP_DCLx int n, int top, int bot)
- {
-     size_t size;
-     int i;
- 
--    if (!oldhash)
-+    if (!oldhash(SP_PARM))
- 	return;
- 
--    size = sizeof(*oldhash) * (bot - top + 1 - abs(n));
-+    size = sizeof(*(oldhash(SP_PARM))) * (bot - top + 1 - abs(n));
-     if (n > 0) {
--	memmove(oldhash + top, oldhash + top + n, size);
-+	memmove(oldhash(SP_PARM) + top, oldhash(SP_PARM) + top + n, size);
- 	for (i = bot; i > bot - n; i--)
--	    oldhash[i] = hash(OLDTEXT(i));
-+	    oldhash(SP_PARM)[i] = hash(SP_PARM, OLDTEXT(SP_PARM, i));
-     } else {
--	memmove(oldhash + top - n, oldhash + top, size);
-+	memmove(oldhash(SP_PARM) + top - n, oldhash(SP_PARM) + top, size);
- 	for (i = top; i < top - n; i++)
--	    oldhash[i] = hash(OLDTEXT(i));
-+	    oldhash(SP_PARM)[i] = hash(SP_PARM, OLDTEXT(SP_PARM, i));
-     }
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(void)
-+_nc_scroll_oldhash(int n, int top, int bot)
-+{
-+    NCURSES_SP_NAME(_nc_scroll_oldhash) (CURRENT_SCREEN, n, top, bot);
-+}
-+#endif
-+
- #ifdef HASHDEBUG
- static void
- usage(void)
-diff -Naur ncurses-5.7.orig/ncurses/tty/lib_mvcur.c ncurses-5.7/ncurses/tty/lib_mvcur.c
---- ncurses-5.7.orig/ncurses/tty/lib_mvcur.c	2008-08-16 12:30:58.000000000 -0700
-+++ ncurses-5.7/ncurses/tty/lib_mvcur.c	2009-07-19 15:03:59.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -30,6 +30,7 @@
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-  *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                         2009                    *
-  ****************************************************************************/
- 
- /*
-@@ -109,8 +110,8 @@
-  * LONG_DIST and (b) further inward from the right or left edge than LONG_DIST,
-  * we'll consider nonlocal.
-  */
--#define NOT_LOCAL(fy, fx, ty, tx)	((tx > LONG_DIST) \
-- 		 && (tx < screen_columns - 1 - LONG_DIST) \
-+#define NOT_LOCAL(sp, fy, fx, ty, tx)	((tx > LONG_DIST) \
-+		 && (tx < screen_columns(sp) - 1 - LONG_DIST) \
- 		 && (abs(ty-fy) + abs(tx-fx) > LONG_DIST))
- 
- /****************************************************************************
-@@ -152,13 +153,16 @@
-  */
- 
- #include <curses.priv.h>
--#include <term.h>
- #include <ctype.h>
- 
--MODULE_ID("$Id: lib_mvcur.c,v 1.113 2008/08/16 19:30:58 tom Exp $")
-+#ifndef CUR
-+#define CUR SP_TERMTYPE
-+#endif
-+
-+MODULE_ID("$Id: lib_mvcur.c,v 1.120 2009/05/10 00:52:29 tom Exp $")
- 
--#define WANT_CHAR(y, x)	SP->_newscr->_line[y].text[x]	/* desired state */
--#define BAUDRATE	cur_term->_baudrate	/* bits per second */
-+#define WANT_CHAR(sp, y, x) (sp)->_newscr->_line[y].text[x]	/* desired state */
-+#define BAUDRATE(sp)	cur_term->_baudrate	/* bits per second */
- 
- #if defined(MAIN) || defined(NCURSES_TEST)
- #include <sys/time.h>
-@@ -169,7 +173,7 @@
- 
- #define OPT_SIZE 512
- 
--static int normalized_cost(const char *const cap, int affcnt);
-+static int normalized_cost(NCURSES_SP_DCLx const char *const cap, int affcnt);
- 
- /****************************************************************************
-  *
-@@ -179,34 +183,34 @@
- 
- #ifdef TRACE
- static int
--trace_cost_of(const char *capname, const char *cap, int affcnt)
-+trace_cost_of(NCURSES_SP_DCLx const char *capname, const char *cap, int affcnt)
- {
--    int result = _nc_msec_cost(cap, affcnt);
-+    int result = NCURSES_SP_NAME(_nc_msec_cost) (NCURSES_SP_ARGx cap, affcnt);
-     TR(TRACE_CHARPUT | TRACE_MOVE,
-        ("CostOf %s %d %s", capname, result, _nc_visbuf(cap)));
-     return result;
- }
--#define CostOf(cap,affcnt) trace_cost_of(#cap,cap,affcnt);
-+#define CostOf(cap,affcnt) trace_cost_of(NCURSES_SP_ARGx #cap, cap, affcnt)
- 
- static int
--trace_normalized_cost(const char *capname, const char *cap, int affcnt)
-+trace_normalized_cost(NCURSES_SP_DCLx const char *capname, const char *cap, int affcnt)
- {
--    int result = normalized_cost(cap, affcnt);
-+    int result = normalized_cost(NCURSES_SP_ARGx cap, affcnt);
-     TR(TRACE_CHARPUT | TRACE_MOVE,
-        ("NormalizedCost %s %d %s", capname, result, _nc_visbuf(cap)));
-     return result;
- }
--#define NormalizedCost(cap,affcnt) trace_normalized_cost(#cap,cap,affcnt);
-+#define NormalizedCost(cap,affcnt) trace_normalized_cost(NCURSES_SP_ARGx #cap, cap, affcnt)
- 
- #else
- 
--#define CostOf(cap,affcnt) _nc_msec_cost(cap,affcnt);
--#define NormalizedCost(cap,affcnt) normalized_cost(cap,affcnt);
-+#define CostOf(cap,affcnt) NCURSES_SP_NAME(_nc_msec_cost)(NCURSES_SP_ARGx cap, affcnt)
-+#define NormalizedCost(cap,affcnt) normalized_cost(NCURSES_SP_ARGx cap, affcnt)
- 
- #endif
- 
- NCURSES_EXPORT(int)
--_nc_msec_cost(const char *const cap, int affcnt)
-+NCURSES_SP_NAME(_nc_msec_cost) (NCURSES_SP_DCLx const char *const cap, int affcnt)
- /* compute the cost of a given operation */
- {
-     if (cap == 0)
-@@ -230,45 +234,56 @@
- 		}
- 
- #if NCURSES_NO_PADDING
--		if (!GetNoPadding(SP))
-+		if (!GetNoPadding(SP_PARM))
- #endif
- 		    cum_cost += number * 10;
- 	    } else
--		cum_cost += SP->_char_padding;
-+		cum_cost += SP_PARM->_char_padding;
- 	}
- 
- 	return ((int) cum_cost);
-     }
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+_nc_msec_cost(const char *const cap, int affcnt)
-+{
-+    return NCURSES_SP_NAME(_nc_msec_cost) (CURRENT_SCREEN, cap, affcnt);
-+}
-+#endif
-+
- static int
--normalized_cost(const char *const cap, int affcnt)
-+normalized_cost(NCURSES_SP_DCLx const char *const cap, int affcnt)
- /* compute the effective character-count for an operation (round up) */
- {
--    int cost = _nc_msec_cost(cap, affcnt);
-+    int cost = NCURSES_SP_NAME(_nc_msec_cost) (NCURSES_SP_ARGx cap, affcnt);
-     if (cost != INFINITY)
--	cost = (cost + SP->_char_padding - 1) / SP->_char_padding;
-+	cost = (cost + SP_PARM->_char_padding - 1) / SP_PARM->_char_padding;
-     return cost;
- }
- 
- static void
--reset_scroll_region(void)
-+reset_scroll_region(NCURSES_SP_DCL0)
- /* Set the scroll-region to a known state (the default) */
- {
-     if (change_scroll_region) {
--	TPUTS_TRACE("change_scroll_region");
--	putp(TPARM_2(change_scroll_region, 0, screen_lines - 1));
-+	NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx
-+				   "change_scroll_region",
-+				   TPARM_2(change_scroll_region,
-+					   0, screen_lines(SP_PARM) - 1));
-     }
- }
- 
- NCURSES_EXPORT(void)
--_nc_mvcur_resume(void)
-+NCURSES_SP_NAME(_nc_mvcur_resume) (NCURSES_SP_DCL0)
- /* what to do at initialization time and after each shellout */
- {
-     /* initialize screen for cursor access */
-     if (enter_ca_mode) {
--	TPUTS_TRACE("enter_ca_mode");
--	putp(enter_ca_mode);
-+	NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx
-+				   "enter_ca_mode",
-+				   enter_ca_mode);
-     }
- 
-     /*
-@@ -280,53 +295,63 @@
-      * they know the screen size.  This is useful when you're running
-      * a vt100 emulation through xterm.
-      */
--    reset_scroll_region();
--    SP->_cursrow = SP->_curscol = -1;
-+    reset_scroll_region(NCURSES_SP_ARG);
-+    SP_PARM->_cursrow = SP_PARM->_curscol = -1;
- 
-     /* restore cursor shape */
--    if (SP->_cursor != -1) {
--	int cursor = SP->_cursor;
--	SP->_cursor = -1;
--	curs_set(cursor);
-+    if (SP_PARM->_cursor != -1) {
-+	int cursor = SP_PARM->_cursor;
-+	SP_PARM->_cursor = -1;
-+	NCURSES_SP_NAME(curs_set) (NCURSES_SP_ARGx cursor);
-     }
- }
- 
-+#if NCURSES_SP_FUNCS
- NCURSES_EXPORT(void)
--_nc_mvcur_init(void)
-+_nc_mvcur_resume(void)
-+{
-+    NCURSES_SP_NAME(_nc_mvcur_resume) (CURRENT_SCREEN);
-+}
-+#endif
-+
-+NCURSES_EXPORT(void)
-+NCURSES_SP_NAME(_nc_mvcur_init) (NCURSES_SP_DCL0)
- /* initialize the cost structure */
- {
--    if (isatty(fileno(SP->_ofp)))
--	SP->_char_padding = ((BAUDBYTE * 1000 * 10)
--			     / (BAUDRATE > 0 ? BAUDRATE : 9600));
-+    if (SP_PARM->_ofp && isatty(fileno(SP_PARM->_ofp)))
-+	SP_PARM->_char_padding = ((BAUDBYTE * 1000 * 10)
-+				  / (BAUDRATE(SP_PARM) > 0
-+				     ? BAUDRATE(SP_PARM)
-+				     : 9600));
-     else
--	SP->_char_padding = 1;	/* must be nonzero */
--    if (SP->_char_padding <= 0)
--	SP->_char_padding = 1;	/* must be nonzero */
--    TR(TRACE_CHARPUT | TRACE_MOVE, ("char_padding %d msecs", SP->_char_padding));
-+	SP_PARM->_char_padding = 1;	/* must be nonzero */
-+    if (SP_PARM->_char_padding <= 0)
-+	SP_PARM->_char_padding = 1;	/* must be nonzero */
-+    TR(TRACE_CHARPUT | TRACE_MOVE, ("char_padding %d msecs", SP_PARM->_char_padding));
- 
-     /* non-parameterized local-motion strings */
--    SP->_cr_cost = CostOf(carriage_return, 0);
--    SP->_home_cost = CostOf(cursor_home, 0);
--    SP->_ll_cost = CostOf(cursor_to_ll, 0);
-+    SP_PARM->_cr_cost = CostOf(carriage_return, 0);
-+    SP_PARM->_home_cost = CostOf(cursor_home, 0);
-+    SP_PARM->_ll_cost = CostOf(cursor_to_ll, 0);
- #if USE_HARD_TABS
-     if (getenv("NCURSES_NO_HARD_TABS") == 0) {
--	SP->_ht_cost = CostOf(tab, 0);
--	SP->_cbt_cost = CostOf(back_tab, 0);
-+	SP_PARM->_ht_cost = CostOf(tab, 0);
-+	SP_PARM->_cbt_cost = CostOf(back_tab, 0);
-     } else {
--	SP->_ht_cost = INFINITY;
--	SP->_cbt_cost = INFINITY;
-+	SP_PARM->_ht_cost = INFINITY;
-+	SP_PARM->_cbt_cost = INFINITY;
-     }
- #endif /* USE_HARD_TABS */
--    SP->_cub1_cost = CostOf(cursor_left, 0);
--    SP->_cuf1_cost = CostOf(cursor_right, 0);
--    SP->_cud1_cost = CostOf(cursor_down, 0);
--    SP->_cuu1_cost = CostOf(cursor_up, 0);
--
--    SP->_smir_cost = CostOf(enter_insert_mode, 0);
--    SP->_rmir_cost = CostOf(exit_insert_mode, 0);
--    SP->_ip_cost = 0;
-+    SP_PARM->_cub1_cost = CostOf(cursor_left, 0);
-+    SP_PARM->_cuf1_cost = CostOf(cursor_right, 0);
-+    SP_PARM->_cud1_cost = CostOf(cursor_down, 0);
-+    SP_PARM->_cuu1_cost = CostOf(cursor_up, 0);
-+
-+    SP_PARM->_smir_cost = CostOf(enter_insert_mode, 0);
-+    SP_PARM->_rmir_cost = CostOf(exit_insert_mode, 0);
-+    SP_PARM->_ip_cost = 0;
-     if (insert_padding) {
--	SP->_ip_cost = CostOf(insert_padding, 0);
-+	SP_PARM->_ip_cost = CostOf(insert_padding, 0);
-     }
- 
-     /*
-@@ -335,7 +360,7 @@
-      * can treat it like absolute screen addressing.  This seems to be true
-      * for all cursor_mem_address terminal types in the terminfo database.
-      */
--    SP->_address_cursor = cursor_address ? cursor_address : cursor_mem_address;
-+    SP_PARM->_address_cursor = cursor_address ? cursor_address : cursor_mem_address;
- 
-     /*
-      * Parametrized local-motion strings.  This static cost computation
-@@ -361,40 +386,43 @@
-      * All these averages depend on the assumption that all parameter values
-      * are equally probable.
-      */
--    SP->_cup_cost = CostOf(TPARM_2(SP->_address_cursor, 23, 23), 1);
--    SP->_cub_cost = CostOf(TPARM_1(parm_left_cursor, 23), 1);
--    SP->_cuf_cost = CostOf(TPARM_1(parm_right_cursor, 23), 1);
--    SP->_cud_cost = CostOf(TPARM_1(parm_down_cursor, 23), 1);
--    SP->_cuu_cost = CostOf(TPARM_1(parm_up_cursor, 23), 1);
--    SP->_hpa_cost = CostOf(TPARM_1(column_address, 23), 1);
--    SP->_vpa_cost = CostOf(TPARM_1(row_address, 23), 1);
-+    SP_PARM->_cup_cost = CostOf(TPARM_2(SP_PARM->_address_cursor, 23, 23), 1);
-+    SP_PARM->_cub_cost = CostOf(TPARM_1(parm_left_cursor, 23), 1);
-+    SP_PARM->_cuf_cost = CostOf(TPARM_1(parm_right_cursor, 23), 1);
-+    SP_PARM->_cud_cost = CostOf(TPARM_1(parm_down_cursor, 23), 1);
-+    SP_PARM->_cuu_cost = CostOf(TPARM_1(parm_up_cursor, 23), 1);
-+    SP_PARM->_hpa_cost = CostOf(TPARM_1(column_address, 23), 1);
-+    SP_PARM->_vpa_cost = CostOf(TPARM_1(row_address, 23), 1);
- 
-     /* non-parameterized screen-update strings */
--    SP->_ed_cost = NormalizedCost(clr_eos, 1);
--    SP->_el_cost = NormalizedCost(clr_eol, 1);
--    SP->_el1_cost = NormalizedCost(clr_bol, 1);
--    SP->_dch1_cost = NormalizedCost(delete_character, 1);
--    SP->_ich1_cost = NormalizedCost(insert_character, 1);
-+    SP_PARM->_ed_cost = NormalizedCost(clr_eos, 1);
-+    SP_PARM->_el_cost = NormalizedCost(clr_eol, 1);
-+    SP_PARM->_el1_cost = NormalizedCost(clr_bol, 1);
-+    SP_PARM->_dch1_cost = NormalizedCost(delete_character, 1);
-+    SP_PARM->_ich1_cost = NormalizedCost(insert_character, 1);
- 
-     /*
-      * If this is a bce-terminal, we want to bias the choice so we use clr_eol
-      * rather than spaces at the end of a line.
-      */
-     if (back_color_erase)
--	SP->_el_cost = 0;
-+	SP_PARM->_el_cost = 0;
- 
-     /* parameterized screen-update strings */
--    SP->_dch_cost = NormalizedCost(TPARM_1(parm_dch, 23), 1);
--    SP->_ich_cost = NormalizedCost(TPARM_1(parm_ich, 23), 1);
--    SP->_ech_cost = NormalizedCost(TPARM_1(erase_chars, 23), 1);
--    SP->_rep_cost = NormalizedCost(TPARM_2(repeat_char, ' ', 23), 1);
--
--    SP->_cup_ch_cost = NormalizedCost(TPARM_2(SP->_address_cursor, 23, 23), 1);
--    SP->_hpa_ch_cost = NormalizedCost(TPARM_1(column_address, 23), 1);
--    SP->_cuf_ch_cost = NormalizedCost(TPARM_1(parm_right_cursor, 23), 1);
--    SP->_inline_cost = min(SP->_cup_ch_cost,
--			   min(SP->_hpa_ch_cost,
--			       SP->_cuf_ch_cost));
-+    SP_PARM->_dch_cost = NormalizedCost(TPARM_1(parm_dch, 23), 1);
-+    SP_PARM->_ich_cost = NormalizedCost(TPARM_1(parm_ich, 23), 1);
-+    SP_PARM->_ech_cost = NormalizedCost(TPARM_1(erase_chars, 23), 1);
-+    SP_PARM->_rep_cost = NormalizedCost(TPARM_2(repeat_char, ' ', 23), 1);
-+
-+    SP_PARM->_cup_ch_cost = NormalizedCost(
-+					      TPARM_2(SP_PARM->_address_cursor,
-+						      23, 23),
-+					      1);
-+    SP_PARM->_hpa_ch_cost = NormalizedCost(TPARM_1(column_address, 23), 1);
-+    SP_PARM->_cuf_ch_cost = NormalizedCost(TPARM_1(parm_right_cursor, 23), 1);
-+    SP_PARM->_inline_cost = min(SP_PARM->_cup_ch_cost,
-+				min(SP_PARM->_hpa_ch_cost,
-+				    SP_PARM->_cuf_ch_cost));
- 
-     /*
-      * If save_cursor is used within enter_ca_mode, we should not use it for
-@@ -411,30 +439,40 @@
-     }
- 
-     /*
--     * A different, possibly better way to arrange this would be to set
--     * SP->_endwin = TRUE at window initialization time and let this be
-+     * A different, possibly better way to arrange this would be to set the
-+     * SCREEN's _endwin to TRUE at window initialization time and let this be
-      * called by doupdate's return-from-shellout code.
-      */
-+    NCURSES_SP_NAME(_nc_mvcur_resume) (NCURSES_SP_ARG);
-+}
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(void)
-+_nc_mvcur_init(void)
-+{
-+    NCURSES_SP_NAME(_nc_mvcur_init) (CURRENT_SCREEN);
-     _nc_mvcur_resume();
- }
-+#endif
- 
- NCURSES_EXPORT(void)
--_nc_mvcur_wrap(void)
-+NCURSES_SP_NAME(_nc_mvcur_wrap) (NCURSES_SP_DCL0)
- /* wrap up cursor-addressing mode */
- {
-     /* leave cursor at screen bottom */
--    mvcur(-1, -1, screen_lines - 1, 0);
-+    mvcur(-1, -1, screen_lines(CURRENT_SCREEN) - 1, 0);
- 
-     /* set cursor to normal mode */
--    if (SP->_cursor != -1) {
--	int cursor = SP->_cursor;
--	curs_set(1);
--	SP->_cursor = cursor;
-+    if (SP_PARM->_cursor != -1) {
-+	int cursor = SP_PARM->_cursor;
-+	NCURSES_SP_NAME(curs_set) (NCURSES_SP_ARGx 1);
-+	SP_PARM->_cursor = cursor;
-     }
- 
-     if (exit_ca_mode) {
--	TPUTS_TRACE("exit_ca_mode");
--	putp(exit_ca_mode);
-+	NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx
-+				   "exit_ca_mode",
-+				   exit_ca_mode);
-     }
-     /*
-      * Reset terminal's tab counter.  There's a long-time bug that
-@@ -444,8 +482,16 @@
-      * escape sequences that reset things as column positions.
-      * Utter a \r to reset this invisibly.
-      */
--    _nc_outch('\r');
-+    NCURSES_SP_NAME(_nc_outch) (NCURSES_SP_ARGx '\r');
-+}
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(void)
-+_nc_mvcur_wrap(void)
-+{
-+    NCURSES_SP_NAME(_nc_mvcur_wrap) (CURRENT_SCREEN);
- }
-+#endif
- 
- /****************************************************************************
-  *
-@@ -486,8 +532,13 @@
- #define LASTTAB(fr)	((fr > 0) ? ((fr - 1) / init_tabs) * init_tabs : -1)
- 
- static int
--relative_move(string_desc * target, int from_y, int from_x, int to_y, int
--	      to_x, bool ovw)
-+relative_move(NCURSES_SP_DCLx
-+	      string_desc * target,
-+	      int from_y,
-+	      int from_x,
-+	      int to_y,
-+	      int to_x,
-+	      bool ovw)
- /* move via local motions (cuu/cuu1/cud/cud1/cub1/cub/cuf1/cuf/vpa/hpa) */
- {
-     string_desc save;
-@@ -500,38 +551,38 @@
- 
- 	if (row_address != 0
- 	    && _nc_safe_strcat(target, TPARM_1(row_address, to_y))) {
--	    vcost = SP->_vpa_cost;
-+	    vcost = SP_PARM->_vpa_cost;
- 	}
- 
- 	if (to_y > from_y) {
- 	    n = (to_y - from_y);
- 
- 	    if (parm_down_cursor
--		&& SP->_cud_cost < vcost
-+		&& SP_PARM->_cud_cost < vcost
- 		&& _nc_safe_strcat(_nc_str_copy(target, &save),
- 				   TPARM_1(parm_down_cursor, n))) {
--		vcost = SP->_cud_cost;
-+		vcost = SP_PARM->_cud_cost;
- 	    }
- 
- 	    if (cursor_down
--		&& (*cursor_down != '\n' || SP->_nl)
--		&& (n * SP->_cud1_cost < vcost)) {
-+		&& (*cursor_down != '\n' || SP_PARM->_nl)
-+		&& (n * SP_PARM->_cud1_cost < vcost)) {
- 		vcost = repeated_append(_nc_str_copy(target, &save), 0,
--					SP->_cud1_cost, n, cursor_down);
-+					SP_PARM->_cud1_cost, n, cursor_down);
- 	    }
- 	} else {		/* (to_y < from_y) */
- 	    n = (from_y - to_y);
- 
- 	    if (parm_up_cursor
--		&& SP->_cuu_cost < vcost
-+		&& SP_PARM->_cuu_cost < vcost
- 		&& _nc_safe_strcat(_nc_str_copy(target, &save),
- 				   TPARM_1(parm_up_cursor, n))) {
--		vcost = SP->_cuu_cost;
-+		vcost = SP_PARM->_cuu_cost;
- 	    }
- 
--	    if (cursor_up && (n * SP->_cuu1_cost < vcost)) {
-+	    if (cursor_up && (n * SP_PARM->_cuu1_cost < vcost)) {
- 		vcost = repeated_append(_nc_str_copy(target, &save), 0,
--					SP->_cuu1_cost, n, cursor_up);
-+					SP_PARM->_cuu1_cost, n, cursor_up);
- 	    }
- 	}
- 
-@@ -550,17 +601,17 @@
- 	if (column_address
- 	    && _nc_safe_strcat(_nc_str_copy(target, &save),
- 			       TPARM_1(column_address, to_x))) {
--	    hcost = SP->_hpa_cost;
-+	    hcost = SP_PARM->_hpa_cost;
- 	}
- 
- 	if (to_x > from_x) {
- 	    n = to_x - from_x;
- 
- 	    if (parm_right_cursor
--		&& SP->_cuf_cost < hcost
-+		&& SP_PARM->_cuf_cost < hcost
- 		&& _nc_safe_strcat(_nc_str_copy(target, &save),
- 				   TPARM_1(parm_right_cursor, n))) {
--		hcost = SP->_cuf_cost;
-+		hcost = SP_PARM->_cuf_cost;
- 	    }
- 
- 	    if (cursor_right) {
-@@ -575,7 +626,7 @@
- 
- 		    for (fr = from_x; (nxt = NEXTTAB(fr)) <= to_x; fr = nxt) {
- 			lhcost = repeated_append(&check, lhcost,
--						 SP->_ht_cost, 1, tab);
-+						 SP_PARM->_ht_cost, 1, tab);
- 			if (lhcost == INFINITY)
- 			    break;
- 		    }
-@@ -599,7 +650,7 @@
- 		    && n < (int) check.s_size
- 		    && vcost == 0
- 		    && str[0] == '\0') {
--		    int wanted = CharOf(WANT_CHAR(to_y, from_x));
-+		    int wanted = CharOf(WANT_CHAR(SP_PARM, to_y, from_x));
- 		    if (is8bits(wanted) && isdigit(wanted))
- 			ovw = FALSE;
- 		}
-@@ -616,8 +667,8 @@
- 		    int i;
- 
- 		    for (i = 0; i < n; i++) {
--			NCURSES_CH_T ch = WANT_CHAR(to_y, from_x + i);
--			if (!SameAttrOf(ch, SCREEN_ATTRS(SP))
-+			NCURSES_CH_T ch = WANT_CHAR(SP_PARM, to_y, from_x + i);
-+			if (!SameAttrOf(ch, SCREEN_ATTRS(SP_PARM))
- #if USE_WIDEC_SUPPORT
- 			    || !Charable(ch)
- #endif
-@@ -631,13 +682,13 @@
- 		    int i;
- 
- 		    for (i = 0; i < n; i++)
--			*check.s_tail++ = (char) CharOf(WANT_CHAR(to_y,
-+			*check.s_tail++ = (char) CharOf(WANT_CHAR(SP_PARM, to_y,
- 								  from_x + i));
- 		    *check.s_tail = '\0';
- 		    check.s_size -= n;
--		    lhcost += n * SP->_char_padding;
-+		    lhcost += n * SP_PARM->_char_padding;
- 		} else {
--		    lhcost = repeated_append(&check, lhcost, SP->_cuf1_cost,
-+		    lhcost = repeated_append(&check, lhcost, SP_PARM->_cuf1_cost,
- 					     n, cursor_right);
- 		}
- 
-@@ -650,10 +701,10 @@
- 	    n = from_x - to_x;
- 
- 	    if (parm_left_cursor
--		&& SP->_cub_cost < hcost
-+		&& SP_PARM->_cub_cost < hcost
- 		&& _nc_safe_strcat(_nc_str_copy(target, &save),
- 				   TPARM_1(parm_left_cursor, n))) {
--		hcost = SP->_cub_cost;
-+		hcost = SP_PARM->_cub_cost;
- 	    }
- 
- 	    if (cursor_left) {
-@@ -667,7 +718,8 @@
- 
- 		    for (fr = from_x; (nxt = LASTTAB(fr)) >= to_x; fr = nxt) {
- 			lhcost = repeated_append(&check, lhcost,
--						 SP->_cbt_cost, 1, back_tab);
-+						 SP_PARM->_cbt_cost,
-+						 1, back_tab);
- 			if (lhcost == INFINITY)
- 			    break;
- 		    }
-@@ -676,7 +728,9 @@
- 		}
- #endif /* USE_HARD_TABS */
- 
--		lhcost = repeated_append(&check, lhcost, SP->_cub1_cost, n, cursor_left);
-+		lhcost = repeated_append(&check, lhcost,
-+					 SP_PARM->_cub1_cost,
-+					 n, cursor_left);
- 
- 		if (lhcost < hcost
- 		    && _nc_safe_strcat(_nc_str_copy(target, &save), str)) {
-@@ -705,7 +759,7 @@
-  */
- 
- static NCURSES_INLINE int
--onscreen_mvcur(int yold, int xold, int ynew, int xnew, bool ovw)
-+onscreen_mvcur(NCURSES_SP_DCLx int yold, int xold, int ynew, int xnew, bool ovw)
- /* onscreen move from (yold, xold) to (ynew, xnew) */
- {
-     string_desc result;
-@@ -723,9 +777,9 @@
- #define InitResult _nc_str_init(&result, buffer, sizeof(buffer))
- 
-     /* tactic #0: use direct cursor addressing */
--    if (_nc_safe_strcpy(InitResult, TPARM_2(SP->_address_cursor, ynew, xnew))) {
-+    if (_nc_safe_strcpy(InitResult, TPARM_2(SP_PARM->_address_cursor, ynew, xnew))) {
- 	tactic = 0;
--	usecost = SP->_cup_cost;
-+	usecost = SP_PARM->_cup_cost;
- 
- #if defined(TRACE) || defined(NCURSES_TEST)
- 	if (!(_nc_optimize_enable & OPTIMIZE_MVCUR))
-@@ -740,7 +794,7 @@
- 	 * (like, say, local-movement \n getting mapped to some obscure
- 	 * character because A_ALTCHARSET is on).
- 	 */
--	if (yold == -1 || xold == -1 || NOT_LOCAL(yold, xold, ynew, xnew)) {
-+	if (yold == -1 || xold == -1 || NOT_LOCAL(SP_PARM, yold, xold, ynew, xnew)) {
- #if defined(MAIN) || defined(NCURSES_TEST)
- 	    if (!profiling) {
- 		(void) fputs("nonlocal\n", stderr);
-@@ -754,8 +808,10 @@
- #ifndef NO_OPTIMIZE
-     /* tactic #1: use local movement */
-     if (yold != -1 && xold != -1
--	&& ((newcost = relative_move(NullResult, yold, xold, ynew, xnew,
--				     ovw)) != INFINITY)
-+	&& ((newcost = relative_move(NCURSES_SP_ARGx
-+				     NullResult,
-+				     yold, xold,
-+				     ynew, xnew, ovw)) != INFINITY)
- 	&& newcost < usecost) {
- 	tactic = 1;
- 	usecost = newcost;
-@@ -763,42 +819,51 @@
- 
-     /* tactic #2: use carriage-return + local movement */
-     if (yold != -1 && carriage_return
--	&& ((newcost = relative_move(NullResult, yold, 0, ynew, xnew, ovw))
--	    != INFINITY)
--	&& SP->_cr_cost + newcost < usecost) {
-+	&& ((newcost = relative_move(NCURSES_SP_ARGx
-+				     NullResult,
-+				     yold, 0,
-+				     ynew, xnew, ovw)) != INFINITY)
-+	&& SP_PARM->_cr_cost + newcost < usecost) {
- 	tactic = 2;
--	usecost = SP->_cr_cost + newcost;
-+	usecost = SP_PARM->_cr_cost + newcost;
-     }
- 
-     /* tactic #3: use home-cursor + local movement */
-     if (cursor_home
--	&& ((newcost = relative_move(NullResult, 0, 0, ynew, xnew, ovw)) != INFINITY)
--	&& SP->_home_cost + newcost < usecost) {
-+	&& ((newcost = relative_move(NCURSES_SP_ARGx
-+				     NullResult,
-+				     0, 0,
-+				     ynew, xnew, ovw)) != INFINITY)
-+	&& SP_PARM->_home_cost + newcost < usecost) {
- 	tactic = 3;
--	usecost = SP->_home_cost + newcost;
-+	usecost = SP_PARM->_home_cost + newcost;
-     }
- 
-     /* tactic #4: use home-down + local movement */
-     if (cursor_to_ll
--	&& ((newcost = relative_move(NullResult, screen_lines - 1, 0, ynew,
--				     xnew, ovw)) != INFINITY)
--	&& SP->_ll_cost + newcost < usecost) {
-+	&& ((newcost = relative_move(NCURSES_SP_ARGx
-+				     NullResult,
-+				     screen_lines(SP_PARM) - 1, 0,
-+				     ynew, xnew, ovw)) != INFINITY)
-+	&& SP_PARM->_ll_cost + newcost < usecost) {
- 	tactic = 4;
--	usecost = SP->_ll_cost + newcost;
-+	usecost = SP_PARM->_ll_cost + newcost;
-     }
- 
-     /*
-      * tactic #5: use left margin for wrap to right-hand side,
-      * unless strange wrap behavior indicated by xenl might hose us.
-      */
--    t5_cr_cost = (xold > 0 ? SP->_cr_cost : 0);
-+    t5_cr_cost = (xold > 0 ? SP_PARM->_cr_cost : 0);
-     if (auto_left_margin && !eat_newline_glitch
- 	&& yold > 0 && cursor_left
--	&& ((newcost = relative_move(NullResult, yold - 1, screen_columns -
--				     1, ynew, xnew, ovw)) != INFINITY)
--	&& t5_cr_cost + SP->_cub1_cost + newcost < usecost) {
-+	&& ((newcost = relative_move(NCURSES_SP_ARGx
-+				     NullResult,
-+				     yold - 1, screen_columns(SP_PARM) - 1,
-+				     ynew, xnew, ovw)) != INFINITY)
-+	&& t5_cr_cost + SP_PARM->_cub1_cost + newcost < usecost) {
- 	tactic = 5;
--	usecost = t5_cr_cost + SP->_cub1_cost + newcost;
-+	usecost = t5_cr_cost + SP_PARM->_cub1_cost + newcost;
-     }
- 
-     /*
-@@ -808,26 +873,39 @@
- 	InitResult;
-     switch (tactic) {
-     case 1:
--	(void) relative_move(&result, yold, xold, ynew, xnew, ovw);
-+	(void) relative_move(NCURSES_SP_ARGx
-+			     &result,
-+			     yold, xold,
-+			     ynew, xnew, ovw);
- 	break;
-     case 2:
- 	(void) _nc_safe_strcpy(&result, carriage_return);
--	(void) relative_move(&result, yold, 0, ynew, xnew, ovw);
-+	(void) relative_move(NCURSES_SP_ARGx
-+			     &result,
-+			     yold, 0,
-+			     ynew, xnew, ovw);
- 	break;
-     case 3:
- 	(void) _nc_safe_strcpy(&result, cursor_home);
--	(void) relative_move(&result, 0, 0, ynew, xnew, ovw);
-+	(void) relative_move(NCURSES_SP_ARGx
-+			     &result, 0, 0,
-+			     ynew, xnew, ovw);
- 	break;
-     case 4:
- 	(void) _nc_safe_strcpy(&result, cursor_to_ll);
--	(void) relative_move(&result, screen_lines - 1, 0, ynew, xnew, ovw);
-+	(void) relative_move(NCURSES_SP_ARGx
-+			     &result,
-+			     screen_lines(SP_PARM) - 1, 0,
-+			     ynew, xnew, ovw);
- 	break;
-     case 5:
- 	if (xold > 0)
- 	    (void) _nc_safe_strcat(&result, carriage_return);
- 	(void) _nc_safe_strcat(&result, cursor_left);
--	(void) relative_move(&result, yold - 1, screen_columns - 1, ynew,
--			     xnew, ovw);
-+	(void) relative_move(NCURSES_SP_ARGx
-+			     &result,
-+			     yold - 1, screen_columns(SP_PARM) - 1,
-+			     ynew, xnew, ovw);
- 	break;
-     }
- #endif /* !NO_OPTIMIZE */
-@@ -845,17 +923,19 @@
- 
-     if (usecost != INFINITY) {
- 	TPUTS_TRACE("mvcur");
--	tputs(buffer, 1, _nc_outch);
--	SP->_cursrow = ynew;
--	SP->_curscol = xnew;
-+	NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
-+				buffer, 1, NCURSES_SP_NAME(_nc_outch));
-+	SP_PARM->_cursrow = ynew;
-+	SP_PARM->_curscol = xnew;
- 	return (OK);
-     } else
- 	return (ERR);
- }
- 
--NCURSES_EXPORT(int)
--mvcur(int yold, int xold, int ynew, int xnew)
- /* optimized cursor move from (yold, xold) to (ynew, xnew) */
-+NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(mvcur) (NCURSES_SP_DCLx
-+			int yold, int xold, int ynew, int xnew)
- {
-     NCURSES_CH_T oldattr;
-     int code;
-@@ -863,7 +943,7 @@
-     TR(TRACE_CALLS | TRACE_MOVE, (T_CALLED("mvcur(%d,%d,%d,%d)"),
- 				  yold, xold, ynew, xnew));
- 
--    if (SP == 0) {
-+    if (SP_PARM == 0) {
- 	code = ERR;
-     } else if (yold == ynew && xold == xnew) {
- 	code = OK;
-@@ -874,9 +954,9 @@
- 	 * column position implied by wraparound or the lack thereof and
- 	 * rolling up the screen to get ynew on the screen.
- 	 */
--	if (xnew >= screen_columns) {
--	    ynew += xnew / screen_columns;
--	    xnew %= screen_columns;
-+	if (xnew >= screen_columns(SP_PARM)) {
-+	    ynew += xnew / screen_columns(SP_PARM);
-+	    xnew %= screen_columns(SP_PARM);
- 	}
- 
- 	/*
-@@ -884,38 +964,40 @@
- 	 * character set -- these have a strong tendency to screw up the CR &
- 	 * LF used for local character motions!
- 	 */
--	oldattr = SCREEN_ATTRS(SP);
-+	oldattr = SCREEN_ATTRS(SP_PARM);
- 	if ((AttrOf(oldattr) & A_ALTCHARSET)
- 	    || (AttrOf(oldattr) && !move_standout_mode)) {
- 	    TR(TRACE_CHARPUT, ("turning off (%#lx) %s before move",
- 			       (unsigned long) AttrOf(oldattr),
- 			       _traceattr(AttrOf(oldattr))));
--	    (void) VIDATTR(A_NORMAL, 0);
-+	    (void) VIDATTR(SP_PARM, A_NORMAL, 0);
- 	}
- 
--	if (xold >= screen_columns) {
-+	if (xold >= screen_columns(SP_PARM)) {
- 	    int l;
- 
--	    if (SP->_nl) {
--		l = (xold + 1) / screen_columns;
-+	    if (SP_PARM->_nl) {
-+		l = (xold + 1) / screen_columns(SP_PARM);
- 		yold += l;
--		if (yold >= screen_lines)
--		    l -= (yold - screen_lines - 1);
-+		if (yold >= screen_lines(SP_PARM))
-+		    l -= (yold - screen_lines(SP_PARM) - 1);
- 
- 		if (l > 0) {
- 		    if (carriage_return) {
--			TPUTS_TRACE("carriage_return");
--			putp(carriage_return);
-+			NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx
-+						   "carriage_return",
-+						   carriage_return);
- 		    } else
--			_nc_outch('\r');
-+			NCURSES_SP_NAME(_nc_outch) (NCURSES_SP_ARGx '\r');
- 		    xold = 0;
- 
- 		    while (l > 0) {
- 			if (newline) {
--			    TPUTS_TRACE("newline");
--			    putp(newline);
-+			    NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx
-+						       "newline",
-+						       newline);
- 			} else
--			    _nc_outch('\n');
-+			    NCURSES_SP_NAME(_nc_outch) (NCURSES_SP_ARGx '\n');
- 			l--;
- 		    }
- 		}
-@@ -929,27 +1011,35 @@
- 	    }
- 	}
- 
--	if (yold > screen_lines - 1)
--	    yold = screen_lines - 1;
--	if (ynew > screen_lines - 1)
--	    ynew = screen_lines - 1;
-+	if (yold > screen_lines(SP_PARM) - 1)
-+	    yold = screen_lines(SP_PARM) - 1;
-+	if (ynew > screen_lines(SP_PARM) - 1)
-+	    ynew = screen_lines(SP_PARM) - 1;
- 
- 	/* destination location is on screen now */
--	code = onscreen_mvcur(yold, xold, ynew, xnew, TRUE);
-+	code = onscreen_mvcur(NCURSES_SP_ARGx yold, xold, ynew, xnew, TRUE);
- 
- 	/*
- 	 * Restore attributes if we disabled them before moving.
- 	 */
--	if (!SameAttrOf(oldattr, SCREEN_ATTRS(SP))) {
-+	if (!SameAttrOf(oldattr, SCREEN_ATTRS(SP_PARM))) {
- 	    TR(TRACE_CHARPUT, ("turning on (%#lx) %s after move",
- 			       (unsigned long) AttrOf(oldattr),
- 			       _traceattr(AttrOf(oldattr))));
--	    (void) VIDATTR(AttrOf(oldattr), GetPair(oldattr));
-+	    (void) VIDATTR(SP_PARM, AttrOf(oldattr), GetPair(oldattr));
- 	}
-     }
-     returnCode(code);
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+mvcur(int yold, int xold, int ynew, int xnew)
-+{
-+    return NCURSES_SP_NAME(mvcur) (CURRENT_SCREEN, yold, xold, ynew, xnew);
-+}
-+#endif
-+
- #if defined(TRACE) || defined(NCURSES_TEST)
- NCURSES_EXPORT_VAR(int) _nc_optimize_enable = OPTIMIZE_ALL;
- #endif
-@@ -1212,25 +1302,25 @@
- 			   speeds[i], overhead, totalest);
- 	    }
- 	} else if (buf[0] == 'c') {
--	    (void) printf("char padding: %d\n", SP->_char_padding);
--	    (void) printf("cr cost: %d\n", SP->_cr_cost);
--	    (void) printf("cup cost: %d\n", SP->_cup_cost);
--	    (void) printf("home cost: %d\n", SP->_home_cost);
--	    (void) printf("ll cost: %d\n", SP->_ll_cost);
-+	    (void) printf("char padding: %d\n", CURRENT_SCREEN->_char_padding);
-+	    (void) printf("cr cost: %d\n", CURRENT_SCREEN->_cr_cost);
-+	    (void) printf("cup cost: %d\n", CURRENT_SCREEN->_cup_cost);
-+	    (void) printf("home cost: %d\n", CURRENT_SCREEN->_home_cost);
-+	    (void) printf("ll cost: %d\n", CURRENT_SCREEN->_ll_cost);
- #if USE_HARD_TABS
--	    (void) printf("ht cost: %d\n", SP->_ht_cost);
--	    (void) printf("cbt cost: %d\n", SP->_cbt_cost);
-+	    (void) printf("ht cost: %d\n", CURRENT_SCREEN->_ht_cost);
-+	    (void) printf("cbt cost: %d\n", CURRENT_SCREEN->_cbt_cost);
- #endif /* USE_HARD_TABS */
--	    (void) printf("cub1 cost: %d\n", SP->_cub1_cost);
--	    (void) printf("cuf1 cost: %d\n", SP->_cuf1_cost);
--	    (void) printf("cud1 cost: %d\n", SP->_cud1_cost);
--	    (void) printf("cuu1 cost: %d\n", SP->_cuu1_cost);
--	    (void) printf("cub cost: %d\n", SP->_cub_cost);
--	    (void) printf("cuf cost: %d\n", SP->_cuf_cost);
--	    (void) printf("cud cost: %d\n", SP->_cud_cost);
--	    (void) printf("cuu cost: %d\n", SP->_cuu_cost);
--	    (void) printf("hpa cost: %d\n", SP->_hpa_cost);
--	    (void) printf("vpa cost: %d\n", SP->_vpa_cost);
-+	    (void) printf("cub1 cost: %d\n", CURRENT_SCREEN->_cub1_cost);
-+	    (void) printf("cuf1 cost: %d\n", CURRENT_SCREEN->_cuf1_cost);
-+	    (void) printf("cud1 cost: %d\n", CURRENT_SCREEN->_cud1_cost);
-+	    (void) printf("cuu1 cost: %d\n", CURRENT_SCREEN->_cuu1_cost);
-+	    (void) printf("cub cost: %d\n", CURRENT_SCREEN->_cub_cost);
-+	    (void) printf("cuf cost: %d\n", CURRENT_SCREEN->_cuf_cost);
-+	    (void) printf("cud cost: %d\n", CURRENT_SCREEN->_cud_cost);
-+	    (void) printf("cuu cost: %d\n", CURRENT_SCREEN->_cuu_cost);
-+	    (void) printf("hpa cost: %d\n", CURRENT_SCREEN->_hpa_cost);
-+	    (void) printf("vpa cost: %d\n", CURRENT_SCREEN->_vpa_cost);
- 	} else if (buf[0] == 'x' || buf[0] == 'q')
- 	    break;
- 	else
-diff -Naur ncurses-5.7.orig/ncurses/tty/lib_tstp.c ncurses-5.7/ncurses/tty/lib_tstp.c
---- ncurses-5.7.orig/ncurses/tty/lib_tstp.c	2008-05-03 09:24:56.000000000 -0700
-+++ ncurses-5.7/ncurses/tty/lib_tstp.c	2009-07-19 15:03:59.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -46,7 +46,7 @@
- #define _POSIX_SOURCE
- #endif
- 
--MODULE_ID("$Id: lib_tstp.c,v 1.37 2008/05/03 16:24:56 tom Exp $")
-+MODULE_ID("$Id: lib_tstp.c,v 1.39 2009/05/09 15:46:20 tom Exp $")
- 
- #if defined(SIGTSTP) && (HAVE_SIGACTION || HAVE_SIGVEC)
- #define USE_SIGTSTP 1
-@@ -59,16 +59,20 @@
- signal_name(int sig)
- {
-     switch (sig) {
-+#ifdef SIGALRM
-     case SIGALRM:
- 	return "SIGALRM";
-+#endif
- #ifdef SIGCONT
-     case SIGCONT:
- 	return "SIGCONT";
- #endif
-     case SIGINT:
- 	return "SIGINT";
-+#ifdef SIGQUIT
-     case SIGQUIT:
- 	return "SIGQUIT";
-+#endif
-     case SIGTERM:
- 	return "SIGTERM";
- #ifdef SIGTSTP
-@@ -136,6 +140,7 @@
- static void
- tstp(int dummy GCC_UNUSED)
- {
-+    SCREEN *sp = CURRENT_SCREEN;
-     sigset_t mask, omask;
-     sigaction_t act, oact;
- 
-@@ -154,11 +159,11 @@
-      * parent was stopped before us, and we would likely pick up the
-      * settings already modified by the shell.
-      */
--    if (SP != 0 && !SP->_endwin)	/* don't do this if we're not in curses */
-+    if (sp != 0 && !sp->_endwin)	/* don't do this if we're not in curses */
- #if HAVE_TCGETPGRP
- 	if (tcgetpgrp(STDIN_FILENO) == getpgrp())
- #endif
--	    def_prog_mode();
-+	    NCURSES_SP_NAME(def_prog_mode) (NCURSES_SP_ARG);
- 
-     /*
-      * Block window change and timer signals.  The latter
-@@ -166,7 +171,9 @@
-      * to repaint the screen.
-      */
-     (void) sigemptyset(&mask);
-+#ifdef SIGALRM
-     (void) sigaddset(&mask, SIGALRM);
-+#endif
- #if USE_SIGWINCH
-     (void) sigaddset(&mask, SIGWINCH);
- #endif
-@@ -185,7 +192,7 @@
-      * End window mode, which also resets the terminal state to the
-      * original (pre-curses) modes.
-      */
--    endwin();
-+    NCURSES_SP_NAME(endwin) (NCURSES_SP_ARG);
- 
-     /* Unblock SIGTSTP. */
-     (void) sigemptyset(&mask);
-@@ -212,19 +219,19 @@
- 
-     T(("SIGCONT received"));
-     sigaction(SIGTSTP, &oact, NULL);
--    flushinp();
-+    NCURSES_SP_NAME(flushinp) (NCURSES_SP_ARG);
- 
-     /*
-      * If the user modified the tty state while suspended, he wants
-      * those changes to stick.  So save the new "default" terminal state.
-      */
--    def_shell_mode();
-+    NCURSES_SP_NAME(def_shell_mode) (NCURSES_SP_ARG);
- 
-     /*
-      * This relies on the fact that doupdate() will restore the
-      * program-mode tty state, and issue enter_ca_mode if need be.
-      */
--    doupdate();
-+    NCURSES_SP_NAME(doupdate) (NCURSES_SP_ARG);
- 
-     /* Reset the signals. */
-     (void) sigprocmask(SIG_SETMASK, &omask, NULL);
-@@ -234,6 +241,8 @@
- static void
- cleanup(int sig)
- {
-+    SCREEN *sp = CURRENT_SCREEN;
-+
-     /*
-      * Actually, doing any sort of I/O from within an signal handler is
-      * "unsafe".  But we'll _try_ to clean up the screen and terminal
-@@ -241,7 +250,10 @@
-      */
-     if (!_nc_globals.cleanup_nested++
- 	&& (sig == SIGINT
--	    || sig == SIGQUIT)) {
-+#ifdef SIGQUIT
-+	    || sig == SIGQUIT
-+#endif
-+	)) {
- #if HAVE_SIGACTION || HAVE_SIGVEC
- 	sigaction_t act;
- 	sigemptyset(&act.sa_mask);
-@@ -257,12 +269,12 @@
- 		if (scan->_ofp != 0
- 		    && isatty(fileno(scan->_ofp))) {
- 		    scan->_cleanup = TRUE;
--		    scan->_outch = _nc_outch;
-+		    scan->_outch = NCURSES_SP_NAME(_nc_outch);
- 		}
- 		set_term(scan);
--		endwin();
--		if (SP)
--		    SP->_endwin = FALSE;	/* in case we have an atexit! */
-+		NCURSES_SP_NAME(endwin) (NCURSES_SP_ARG);
-+		if (sp)
-+		    sp->_endwin = FALSE;	/* in case we have an atexit! */
- 	    }
- 	}
-     }
-diff -Naur ncurses-5.7.orig/ncurses/tty/lib_twait.c ncurses-5.7/ncurses/tty/lib_twait.c
---- ncurses-5.7.orig/ncurses/tty/lib_twait.c	2008-08-30 13:08:19.000000000 -0700
-+++ ncurses-5.7/ncurses/tty/lib_twait.c	2009-07-19 15:03:53.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -65,10 +65,12 @@
- #  include <sys/select.h>
- # endif
- #endif
--
-+#ifdef __MINGW32__
-+#  include <sys/time.h>
-+#endif
- #undef CUR
- 
--MODULE_ID("$Id: lib_twait.c,v 1.59 2008/08/30 20:08:19 tom Exp $")
-+MODULE_ID("$Id: lib_twait.c,v 1.60 2009/04/18 21:01:13 tom Exp $")
- 
- static long
- _nc_gettime(TimeType * t0, bool first)
-@@ -124,15 +126,27 @@
- }
- #endif /* NCURSES_WGETCH_EVENTS */
- 
-+#if (USE_FUNC_POLL || HAVE_SELECT)
-+#  define MAYBE_UNUSED
-+#else
-+#  define MAYBE_UNUSED GCC_UNUSED
-+#endif
-+
-+#if (USE_FUNC_POLL || HAVE_SELECT)
-+#  define MAYBE_UNUSED
-+#else
-+#  define MAYBE_UNUSED GCC_UNUSED
-+#endif
-+
- /*
-  * Wait a specified number of milliseconds, returning nonzero if the timer
-  * didn't expire before there is activity on the specified file descriptors.
-  * The file-descriptors are specified by the mode:
-- *	0 - none (absolute time)
-- *	1 - ncurses' normal input-descriptor
-- *	2 - mouse descriptor, if any
-- *	3 - either input or mouse.
-- *
-+ *	TW_NONE    0 - none (absolute time)
-+ *	TW_INPUT   1 - ncurses' normal input-descriptor
-+ *	TW_MOUSE   2 - mouse descriptor, if any
-+ *	TW_ANY     3 - either input or mouse.
-+ *      TW_EVENT   4 -
-  * Experimental:  if NCURSES_WGETCH_EVENTS is defined, (mode & 4) determines
-  * whether to pay attention to evl argument.  If set, the smallest of
-  * millisecond and of timeout of evl is taken.
-@@ -143,16 +157,18 @@
-  * descriptors.
-  */
- NCURSES_EXPORT(int)
--_nc_timed_wait(SCREEN *sp,
--	       int mode,
-+_nc_timed_wait(SCREEN *sp MAYBE_UNUSED,
-+	       int mode MAYBE_UNUSED,
- 	       int milliseconds,
- 	       int *timeleft
- 	       EVENTLIST_2nd(_nc_eventlist * evl))
- {
--    int fd;
-     int count;
--    int result = 0;
-+    int result = TW_NONE;
-     TimeType t0;
-+#if (USE_FUNC_POLL || HAVE_SELECT)
-+    int fd;
-+#endif
- 
- #ifdef NCURSES_WGETCH_EVENTS
-     int timeout_is_event = 0;
-@@ -174,7 +190,7 @@
- 		      milliseconds, mode));
- 
- #ifdef NCURSES_WGETCH_EVENTS
--    if (mode & 4) {
-+    if (mode & TW_EVENT) {
- 	int event_delay = _nc_eventlist_timeout(evl);
- 
- 	if (event_delay >= 0
-@@ -193,7 +209,7 @@
-     count = 0;
- 
- #ifdef NCURSES_WGETCH_EVENTS
--    if ((mode & 4) && evl)
-+    if ((mode & TW_EVENT) && evl)
- 	evl->result_flags = 0;
- #endif
- 
-@@ -201,23 +217,23 @@
-     memset(fd_list, 0, sizeof(fd_list));
- 
- #ifdef NCURSES_WGETCH_EVENTS
--    if ((mode & 4) && evl)
-+    if ((mode & TW_EVENT) && evl)
- 	fds = typeMalloc(struct pollfd, MIN_FDS + evl->count);
- #endif
- 
--    if (mode & 1) {
-+    if (mode & TW_INPUT) {
- 	fds[count].fd = sp->_ifd;
- 	fds[count].events = POLLIN;
- 	count++;
-     }
--    if ((mode & 2)
-+    if ((mode & TW_MOUSE)
- 	&& (fd = sp->_mouse_fd) >= 0) {
- 	fds[count].fd = fd;
- 	fds[count].events = POLLIN;
- 	count++;
-     }
- #ifdef NCURSES_WGETCH_EVENTS
--    if ((mode & 4) && evl) {
-+    if ((mode & TW_EVENT) && evl) {
- 	for (n = 0; n < evl->count; ++n) {
- 	    _nc_event *ev = evl->events[n];
- 
-@@ -234,7 +250,7 @@
-     result = poll(fds, (unsigned) count, milliseconds);
- 
- #ifdef NCURSES_WGETCH_EVENTS
--    if ((mode & 4) && evl) {
-+    if ((mode & TW_EVENT) && evl) {
- 	int c;
- 
- 	if (!result)
-@@ -276,8 +292,8 @@
-      *
-      * FIXME: this assumes mode&1 if milliseconds < 0 (see lib_getch.c).
-      */
--    result = 0;
--    if (mode & 1) {
-+    result = TW_NONE;
-+    if (mode & TW_INPUT) {
- 	int step = (milliseconds < 0) ? 0 : 5000;
- 	bigtime_t d;
- 	bigtime_t useconds = milliseconds * 1000;
-@@ -313,17 +329,17 @@
-      */
-     FD_ZERO(&set);
- 
--    if (mode & 1) {
-+    if (mode & TW_INPUT) {
- 	FD_SET(sp->_ifd, &set);
- 	count = sp->_ifd + 1;
-     }
--    if ((mode & 2)
-+    if ((mode & TW_MOUSE)
- 	&& (fd = sp->_mouse_fd) >= 0) {
- 	FD_SET(fd, &set);
- 	count = max(fd, count) + 1;
-     }
- #ifdef NCURSES_WGETCH_EVENTS
--    if ((mode & 4) && evl) {
-+    if ((mode & TW_EVENT) && evl) {
- 	for (n = 0; n < evl->count; ++n) {
- 	    _nc_event *ev = evl->events[n];
- 
-@@ -346,7 +362,7 @@
-     }
- 
- #ifdef NCURSES_WGETCH_EVENTS
--    if ((mode & 4) && evl) {
-+    if ((mode & TW_EVENT) && evl) {
- 	evl->result_flags = 0;
- 	for (n = 0; n < evl->count; ++n) {
- 	    _nc_event *ev = evl->events[n];
-@@ -428,22 +444,22 @@
- 		}
- 	    }
- #elif defined(__BEOS__)
--	    result = 1;		/* redundant, but simple */
-+	    result = TW_INPUT;	/* redundant, but simple */
- #elif HAVE_SELECT
--	    if ((mode & 2)
-+	    if ((mode & TW_MOUSE)
- 		&& (fd = sp->_mouse_fd) >= 0
- 		&& FD_ISSET(fd, &set))
--		result |= 2;
--	    if ((mode & 1)
-+		result |= TW_MOUSE;
-+	    if ((mode & TW_INPUT)
- 		&& FD_ISSET(sp->_ifd, &set))
--		result |= 1;
-+		result |= TW_INPUT;
- #endif
- 	} else
- 	    result = 0;
-     }
- #ifdef NCURSES_WGETCH_EVENTS
--    if ((mode & 4) && evl && evl->result_flags)
--	result |= 4;
-+    if ((mode & TW_EVENT) && evl && evl->result_flags)
-+	result |= TW_EVENT;
- #endif
- 
-     return (result);
-diff -Naur ncurses-5.7.orig/ncurses/tty/lib_vidattr.c ncurses-5.7/ncurses/tty/lib_vidattr.c
---- ncurses-5.7.orig/ncurses/tty/lib_vidattr.c	2007-06-30 14:58:04.000000000 -0700
-+++ ncurses-5.7/ncurses/tty/lib_vidattr.c	2009-07-19 15:04:09.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -29,7 +29,8 @@
- /****************************************************************************
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-- *     and: Thomas E. Dickey                        1996 on                 *
-+ *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                         2009                    *
-  ****************************************************************************/
- 
- /*
-@@ -63,11 +64,16 @@
-  */
- 
- #include <curses.priv.h>
--#include <term.h>
- 
--MODULE_ID("$Id: lib_vidattr.c,v 1.49 2007/06/30 21:58:04 tom Exp $")
-+#ifndef CUR
-+#define CUR SP_TERMTYPE
-+#endif
-+
-+MODULE_ID("$Id: lib_vidattr.c,v 1.57 2009/05/23 20:46:28 tom Exp $")
- 
--#define doPut(mode) TPUTS_TRACE(#mode); tputs(mode, 1, outc)
-+#define doPut(mode) \
-+	TPUTS_TRACE(#mode); \
-+	NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx mode, 1, outc)
- 
- #define TurnOn(mask,mode) \
- 	if ((turn_on & mask) && mode) { doPut(mode); }
-@@ -83,35 +89,42 @@
- 		if ((pair != old_pair) \
- 		 || (fix_pair0 && (pair == 0)) \
- 		 || (reverse ^ ((old_attr & A_REVERSE) != 0))) { \
--			_nc_do_color(old_pair, pair, reverse, outc); \
-+		     NCURSES_SP_NAME(_nc_do_color)(NCURSES_SP_ARGx \
-+				     old_pair, pair, reverse, outc); \
- 		} \
- 	}
- 
- #define PreviousAttr _nc_prescreen.previous_attr
- 
- NCURSES_EXPORT(int)
--vidputs(chtype newmode, int (*outc) (int))
-+NCURSES_SP_NAME(vidputs) (NCURSES_SP_DCLx
-+			  chtype newmode,
-+			  NCURSES_SP_OUTC outc)
- {
-     attr_t turn_on, turn_off;
-     int pair;
-     bool reverse = FALSE;
--    bool can_color = (SP == 0 || SP->_coloron);
-+    bool can_color = (SP_PARM == 0 || SP_PARM->_coloron);
- #if NCURSES_EXT_FUNCS
--    bool fix_pair0 = (SP != 0 && SP->_coloron && !SP->_default_color);
-+    bool fix_pair0 = (SP_PARM != 0 && SP_PARM->_coloron && !SP_PARM->_default_color);
- #else
- #define fix_pair0 FALSE
- #endif
- 
-     newmode &= A_ATTRIBUTES;
--    T((T_CALLED("vidputs(%s)"), _traceattr(newmode)));
-+
-+    T((T_CALLED("vidputs(%p,%s)"), SP_PARM, _traceattr(newmode)));
-+
-+    if (!IsTermInfo(SP_PARM))
-+	returnCode(ERR);
- 
-     /* this allows us to go on whether or not newterm() has been called */
--    if (SP)
--	PreviousAttr = AttrOf(SCREEN_ATTRS(SP));
-+    if (SP_PARM)
-+	PreviousAttr = AttrOf(SCREEN_ATTRS(SP_PARM));
- 
-     TR(TRACE_ATTRS, ("previous attribute was %s", _traceattr(PreviousAttr)));
- 
--    if ((SP != 0)
-+    if ((SP_PARM != 0)
- 	&& (magic_cookie_glitch > 0)) {
- #if USE_XMC_SUPPORT
- 	static const chtype table[] =
-@@ -135,7 +148,7 @@
- 	 * the terminfo max_attributes value.
- 	 */
- 	for (n = 0; n < SIZEOF(table); ++n) {
--	    if ((table[n] & SP->_ok_attributes) == 0) {
-+	    if ((table[n] & SP_PARM->_ok_attributes) == 0) {
- 		newmode &= ~table[n];
- 	    } else if ((table[n] & newmode) != 0) {
- 		if (used++ >= limit) {
-@@ -148,7 +161,7 @@
- 	    }
- 	}
- #else
--	newmode &= ~(SP->_xmc_suppress);
-+	newmode &= ~(SP_PARM->_xmc_suppress);
- #endif
- 	TR(TRACE_ATTRS, ("suppressed attribute is %s", _traceattr(newmode)));
-     }
-@@ -208,10 +221,10 @@
- 	    if (exit_attribute_mode) {
- 		doPut(exit_attribute_mode);
- 	    } else {
--		if (!SP || SP->_use_rmul) {
-+		if (!SP_PARM || SP_PARM->_use_rmul) {
- 		    TurnOff(A_UNDERLINE, exit_underline_mode);
- 		}
--		if (!SP || SP->_use_rmso) {
-+		if (!SP_PARM || SP_PARM->_use_rmso) {
- 		    TurnOff(A_STANDOUT, exit_standout_mode);
- 		}
- 	    }
-@@ -222,16 +235,18 @@
-     } else if (set_attributes) {
- 	if (turn_on || turn_off) {
- 	    TPUTS_TRACE("set_attributes");
--	    tputs(tparm(set_attributes,
--			(newmode & A_STANDOUT) != 0,
--			(newmode & A_UNDERLINE) != 0,
--			(newmode & A_REVERSE) != 0,
--			(newmode & A_BLINK) != 0,
--			(newmode & A_DIM) != 0,
--			(newmode & A_BOLD) != 0,
--			(newmode & A_INVIS) != 0,
--			(newmode & A_PROTECT) != 0,
--			(newmode & A_ALTCHARSET) != 0), 1, outc);
-+	    NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
-+				    tparm(set_attributes,
-+					  (newmode & A_STANDOUT) != 0,
-+					  (newmode & A_UNDERLINE) != 0,
-+					  (newmode & A_REVERSE) != 0,
-+					  (newmode & A_BLINK) != 0,
-+					  (newmode & A_DIM) != 0,
-+					  (newmode & A_BOLD) != 0,
-+					  (newmode & A_INVIS) != 0,
-+					  (newmode & A_PROTECT) != 0,
-+					  (newmode & A_ALTCHARSET) != 0),
-+				    1, outc);
- 	    PreviousAttr &= ALL_BUT_COLOR;
- 	}
- 	SetColorsIf((pair != 0) || fix_pair0, PreviousAttr);
-@@ -241,11 +256,11 @@
- 
- 	TurnOff(A_ALTCHARSET, exit_alt_charset_mode);
- 
--	if (!SP || SP->_use_rmul) {
-+	if (!SP_PARM || SP_PARM->_use_rmul) {
- 	    TurnOff(A_UNDERLINE, exit_underline_mode);
- 	}
- 
--	if (!SP || SP->_use_rmso) {
-+	if (!SP_PARM || SP_PARM->_use_rmso) {
- 	    TurnOff(A_STANDOUT, exit_standout_mode);
- 	}
- 
-@@ -282,27 +297,53 @@
-     if (reverse)
- 	newmode |= A_REVERSE;
- 
--    if (SP)
--	SetAttr(SCREEN_ATTRS(SP), newmode);
-+    if (SP_PARM)
-+	SetAttr(SCREEN_ATTRS(SP_PARM), newmode);
-     else
- 	PreviousAttr = newmode;
- 
-     returnCode(OK);
- }
- 
-+#if NCURSES_SP_FUNCS
- NCURSES_EXPORT(int)
--vidattr(chtype newmode)
-+vidputs(chtype newmode, NCURSES_OUTC outc)
- {
--    T((T_CALLED("vidattr(%s)"), _traceattr(newmode)));
-+    SetSafeOutcWrapper(outc);
-+    return NCURSES_SP_NAME(vidputs) (CURRENT_SCREEN,
-+				     newmode,
-+				     _nc_outc_wrapper);
-+}
-+#endif
- 
--    returnCode(vidputs(newmode, _nc_outch));
-+NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(vidattr) (NCURSES_SP_DCLx chtype newmode)
-+{
-+    T((T_CALLED("vidattr(%p,%s)"), SP_PARM, _traceattr(newmode)));
-+    returnCode(NCURSES_SP_NAME(vidputs) (NCURSES_SP_ARGx
-+					 newmode,
-+					 NCURSES_SP_NAME(_nc_outch)));
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+vidattr(chtype newmode)
-+{
-+    return NCURSES_SP_NAME(vidattr) (CURRENT_SCREEN, newmode);
-+}
-+#endif
-+
- NCURSES_EXPORT(chtype)
--termattrs(void)
-+NCURSES_SP_NAME(termattrs) (NCURSES_SP_DCL0)
- {
-     chtype attrs = A_NORMAL;
- 
-+    T((T_CALLED("termattrs(%p)"), SP_PARM));
-+#ifdef USE_TERM_DRIVER
-+    if (HasTerminal(SP_PARM))
-+	attrs = CallDriver(SP_PARM, conattr);
-+#else
-+
-     T((T_CALLED("termattrs()")));
-     if (enter_alt_charset_mode)
- 	attrs |= A_ALTCHARSET;
-@@ -331,8 +372,17 @@
-     if (enter_underline_mode)
- 	attrs |= A_UNDERLINE;
- 
--    if (SP->_coloron)
-+    if (SP_PARM->_coloron)
- 	attrs |= A_COLOR;
- 
--    returnChar(attrs);
-+#endif
-+    returnChtype(attrs);
-+}
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(chtype)
-+termattrs(void)
-+{
-+    return NCURSES_SP_NAME(termattrs) (CURRENT_SCREEN);
- }
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/tty/MKexpanded.sh ncurses-5.7/ncurses/tty/MKexpanded.sh
---- ncurses-5.7.orig/ncurses/tty/MKexpanded.sh	2005-01-01 17:06:40.000000000 -0800
-+++ ncurses-5.7/ncurses/tty/MKexpanded.sh	2009-07-19 15:04:13.000000000 -0700
-@@ -1,6 +1,6 @@
- #! /bin/sh
- ##############################################################################
--# Copyright (c) 1998-2000,2005 Free Software Foundation, Inc.                #
-+# Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.                #
- #                                                                            #
- # Permission is hereby granted, free of charge, to any person obtaining a    #
- # copy of this software and associated documentation files (the "Software"), #
-@@ -27,9 +27,9 @@
- # authorization.                                                             #
- ##############################################################################
- #
--# Author: Thomas E. Dickey <dickey@clark.net> 1997
-+# Author: Thomas E. Dickey, 1997-on
- #
--# $Id: MKexpanded.sh,v 1.11 2005/01/02 01:06:40 tom Exp $
-+# $Id: MKexpanded.sh,v 1.16 2009/07/04 16:45:03 tom Exp $
- #
- # Script to generate 'expanded.c', a dummy source that contains functions
- # corresponding to complex macros used in this library.  By making functions,
-@@ -52,8 +52,14 @@
- 
- cat <<EOF
- /* generated by MKexpanded.sh */
-+#define NEED_NCURSES_CH_T 1
- #include <curses.priv.h>
- #include <term.h>
-+
-+#ifndef CUR
-+#define CUR SP_TERMTYPE
-+#endif
-+
- #if NCURSES_EXPANDED
- EOF
- 
-@@ -68,29 +74,59 @@
- #undef FALSE
- /* this is a marker */
- IGNORE
--NCURSES_EXPORT(void) _nc_toggle_attr_on (attr_t *S, attr_t at)
-+NCURSES_EXPORT(void)
-+_nc_toggle_attr_on (attr_t *S, attr_t at)
- {
- 	toggle_attr_on(*S,at);
- }
--NCURSES_EXPORT(void) _nc_toggle_attr_off (attr_t *S, attr_t at) 
-+
-+NCURSES_EXPORT(void)
-+_nc_toggle_attr_off (attr_t *S, attr_t at) 
- {
- 	toggle_attr_off(*S,at);
- }
--NCURSES_EXPORT(int) _nc_DelCharCost (int count)
-+
-+NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(_nc_DelCharCost) (NCURSES_SP_DCLx int count)
-+{
-+	return DelCharCost(SP_PARM, count);
-+}
-+
-+NCURSES_EXPORT(int)
-+NCURSES_SP_NAME(_nc_InsCharCost) (NCURSES_SP_DCLx int count)
- {
--	return DelCharCost(count);
-+	return InsCharCost(SP_PARM, count);
- }
--NCURSES_EXPORT(int) _nc_InsCharCost (int count)
-+
-+NCURSES_EXPORT(void)
-+NCURSES_SP_NAME(_nc_UpdateAttrs) (NCURSES_SP_DCLx CARG_CH_T c)
- {
--	return InsCharCost(count);
-+	UpdateAttrs(SP_PARM, CHDEREF(c));
- }
--NCURSES_EXPORT(void) _nc_UpdateAttrs (NCURSES_CH_T c)
-+
-+@if_NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+_nc_DelCharCost (int count)
-+{
-+	return NCURSES_SP_NAME(_nc_DelCharCost) (CURRENT_SCREEN, count);
-+}
-+
-+NCURSES_EXPORT(int)
-+_nc_InsCharCost (int count)
-+{
-+	return NCURSES_SP_NAME(_nc_InsCharCost)(CURRENT_SCREEN, count);
-+}
-+
-+NCURSES_EXPORT(void)
-+_nc_UpdateAttrs (CARG_CH_T c)
- {
--	UpdateAttrs(c);
-+	NCURSES_SP_NAME(_nc_UpdateAttrs)(CURRENT_SCREEN,c);
- }
-+@endif
- EOF
- 
--$preprocessor $TMP 2>/dev/null | sed -e '1,/^IGNORE$/d'
-+$preprocessor $TMP 2>/dev/null | \
-+	sed -e '1,/^IGNORE$/d' -e 's/^@/#/' -e 's/^#if_/#if /'
- 
- cat <<EOF
- #else /* ! NCURSES_EXPANDED */
-diff -Naur ncurses-5.7.orig/ncurses/tty/tty_update.c ncurses-5.7/ncurses/tty/tty_update.c
---- ncurses-5.7.orig/ncurses/tty/tty_update.c	2008-08-30 13:08:19.000000000 -0700
-+++ ncurses-5.7/ncurses/tty/tty_update.c	2009-07-19 15:04:11.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -30,6 +30,7 @@
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-  *     and: Thomas E. Dickey                        1996-on                 *
-+ *     and: Juergen Pfeifer                         2009                    *
-  ****************************************************************************/
- 
- /*-----------------------------------------------------------------
-@@ -38,12 +39,17 @@
-  *
-  * 	The routine doupdate() and its dependents.
-  * 	All physical output is concentrated here (except _nc_outch()
--  *	in lib_tputs.c).
-+ *	in lib_tputs.c).
-  *
-  *-----------------------------------------------------------------*/
- 
-+#define NEED_NCURSES_CH_T 1
- #include <curses.priv.h>
- 
-+#ifndef CUR
-+#define CUR SP_TERMTYPE
-+#endif
-+
- #if defined __HAIKU__ && defined __BEOS__
- #undef __BEOS__
- #endif
-@@ -76,9 +82,8 @@
- #endif
- 
- #include <ctype.h>
--#include <term.h>
- 
--MODULE_ID("$Id: tty_update.c,v 1.246 2008/08/30 20:08:19 tom Exp $")
-+MODULE_ID("$Id: tty_update.c,v 1.258 2009/06/27 19:16:17 tom Exp $")
- 
- /*
-  * This define controls the line-breakout optimization.  Every once in a
-@@ -91,7 +96,7 @@
-  */
- #define CHECK_INTERVAL	5
- 
--#define FILL_BCE() (SP->_coloron && !SP->_default_color && !back_color_erase)
-+#define FILL_BCE(sp) (sp->_coloron && !sp->_default_color && !back_color_erase)
- 
- static const NCURSES_CH_T blankchar = NewChar(BLANK_TEXT);
- static NCURSES_CH_T normal = NewChar(BLANK_TEXT);
-@@ -103,13 +108,23 @@
-  */
- /* #define POSITION_DEBUG */
- 
--static NCURSES_INLINE NCURSES_CH_T ClrBlank(WINDOW *win);
-+static NCURSES_INLINE NCURSES_CH_T ClrBlank(NCURSES_SP_DCLx WINDOW *win);
-+
-+#if NCURSES_SP_FUNCS
-+static int ClrBottom(SCREEN *, int total);
-+static void ClearScreen(SCREEN *, NCURSES_CH_T blank);
-+static void ClrUpdate(SCREEN *);
-+static void DelChar(SCREEN *, int count);
-+static void InsStr(SCREEN *, NCURSES_CH_T * line, int count);
-+static void TransformLine(SCREEN *, int const lineno);
-+#else
- static int ClrBottom(int total);
- static void ClearScreen(NCURSES_CH_T blank);
- static void ClrUpdate(void);
- static void DelChar(int count);
- static void InsStr(NCURSES_CH_T * line, int count);
- static void TransformLine(int const lineno);
-+#endif
- 
- #ifdef POSITION_DEBUG
- /****************************************************************************
-@@ -119,7 +134,7 @@
-  ****************************************************************************/
- 
- static void
--position_check(int expected_y, int expected_x, char *legend)
-+position_check(NCURSES_SP_DCLx int expected_y, int expected_x, char *legend)
- /* check to see if the real cursor position matches the virtual */
- {
-     char buf[20];
-@@ -129,10 +144,10 @@
-     if (!_nc_tracing || (expected_y < 0 && expected_x < 0))
- 	return;
- 
--    _nc_flush();
-+    NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG);
-     memset(buf, '\0', sizeof(buf));
--    putp("\033[6n");		/* only works on ANSI-compatibles */
--    _nc_flush();
-+    NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx "\033[6n");	/* only works on ANSI-compatibles */
-+    NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG);
-     *(s = buf) = 0;
-     do {
- 	int ask = sizeof(buf) - 1 - (s - buf);
-@@ -152,8 +167,12 @@
- 	if (expected_y < 0)
- 	    expected_y = y - 1;
- 	if (y - 1 != expected_y || x - 1 != expected_x) {
--	    beep();
--	    tputs(tparm("\033[%d;%dH", expected_y + 1, expected_x + 1), 1, _nc_outch);
-+	    NCURSES_SP_NAME(beep) (NCURSES_SP_ARG);
-+	    NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
-+				    tparm("\033[%d;%dH",
-+					  expected_y + 1,
-+					  expected_x + 1),
-+				    1, NCURSES_SP_NAME(_nc_outch));
- 	    _tracef("position seen (%d, %d) doesn't match expected one (%d, %d) in %s",
- 		    y - 1, x - 1, expected_y, expected_x, legend);
- 	} else {
-@@ -162,7 +181,7 @@
-     }
- }
- #else
--#define position_check(expected_y, expected_x, legend)	/* nothing */
-+#define position_check(sp, expected_y, expected_x, legend)	/* nothing */
- #endif /* POSITION_DEBUG */
- 
- /****************************************************************************
-@@ -172,19 +191,20 @@
-  ****************************************************************************/
- 
- static NCURSES_INLINE void
--GoTo(int const row, int const col)
-+GoTo(NCURSES_SP_DCLx int const row, int const col)
- {
--    TR(TRACE_MOVE, ("GoTo(%d, %d) from (%d, %d)",
--		    row, col, SP->_cursrow, SP->_curscol));
-+    TR(TRACE_MOVE, ("GoTo(%p, %d, %d) from (%d, %d)",
-+		    SP_PARM, row, col, SP_PARM->_cursrow, SP_PARM->_curscol));
- 
--    position_check(SP->_cursrow, SP->_curscol, "GoTo");
-+    position_check(SP_PARM, SP_PARM->_cursrow, SP_PARM->_curscol, "GoTo");
- 
--    mvcur(SP->_cursrow, SP->_curscol, row, col);
--    position_check(SP->_cursrow, SP->_curscol, "GoTo2");
-+    NCURSES_SP_NAME(mvcur) (NCURSES_SP_ARGx SP_PARM->_cursrow,
-+			    SP_PARM->_curscol, row, col);
-+    position_check(SP_PARM, SP_PARM->_cursrow, SP_PARM->_curscol, "GoTo2");
- }
- 
- static NCURSES_INLINE void
--PutAttrChar(CARG_CH_T ch)
-+PutAttrChar(NCURSES_SP_DCLx CARG_CH_T ch)
- {
-     int chlen = 1;
-     NCURSES_CH_T my_ch;
-@@ -194,7 +214,7 @@
- 
-     TR(TRACE_CHARPUT, ("PutAttrChar(%s) at (%d, %d)",
- 		       _tracech_t(ch),
--		       SP->_cursrow, SP->_curscol));
-+		       SP_PARM->_cursrow, SP_PARM->_curscol));
- #if USE_WIDEC_SUPPORT
-     /*
-      * If this is not a valid character, there is nothing more to do.
-@@ -224,12 +244,12 @@
- 	 */
- 	if (is8bits(CharOf(CHDEREF(ch)))
- 	    && (isprint(CharOf(CHDEREF(ch)))
--		|| (SP->_legacy_coding > 0 && CharOf(CHDEREF(ch)) >= 160)
--		|| (SP->_legacy_coding > 1 && CharOf(CHDEREF(ch)) >= 128)
-+		|| (SP_PARM->_legacy_coding > 0 && CharOf(CHDEREF(ch)) >= 160)
-+		|| (SP_PARM->_legacy_coding > 1 && CharOf(CHDEREF(ch)) >= 128)
- 		|| (AttrOf(attr) & A_ALTCHARSET
- 		    && ((CharOfD(ch) < ACS_LEN
--			 && SP->_acs_map != 0
--			 && SP->_acs_map[CharOfD(ch)] != 0)
-+			 && SP_PARM->_acs_map != 0
-+			 && SP_PARM->_acs_map[CharOfD(ch)] != 0)
- 			|| (CharOfD(ch) >= 128))))) {
- 	    ;
- 	} else {
-@@ -241,7 +261,7 @@
- #endif
- 
-     if ((AttrOf(attr) & A_ALTCHARSET)
--	&& SP->_acs_map != 0
-+	&& SP_PARM->_acs_map != 0
- 	&& CharOfD(ch) < ACS_LEN) {
- 	my_ch = CHDEREF(ch);	/* work around const param */
- #if USE_WIDEC_SUPPORT
-@@ -251,8 +271,8 @@
- 	 * character, and uses the wide-character mapping when we expect the
- 	 * normal one to be broken (by mis-design ;-).
- 	 */
--	if (SP->_screen_acs_fix
--	    && SP->_screen_acs_map[CharOf(my_ch)]) {
-+	if (SP_PARM->_screen_acs_fix
-+	    && SP_PARM->_screen_acs_map[CharOf(my_ch)]) {
- 	    RemAttr(attr, A_ALTCHARSET);
- 	    my_ch = _nc_wacs[CharOf(my_ch)];
- 	}
-@@ -265,9 +285,9 @@
- 	 */
- 	if (AttrOf(attr) & A_ALTCHARSET) {
- 	    int j = CharOfD(ch);
--	    chtype temp = UChar(SP->_acs_map[j]);
-+	    chtype temp = UChar(SP_PARM->_acs_map[j]);
- 
--	    if (!(SP->_screen_acs_map[j])) {
-+	    if (!(SP_PARM->_screen_acs_map[j])) {
- 		RemAttr(attr, A_ALTCHARSET);
- 		if (temp == 0)
- 		    temp = ' ';
-@@ -282,28 +302,28 @@
- 	ch = CHREF(tilde);
-     }
- 
--    UpdateAttrs(attr);
-+    UpdateAttrs(SP_PARM, attr);
- #if !USE_WIDEC_SUPPORT
-     /* FIXME - we do this special case for signal handling, should see how to
-      * make it work for wide characters.
-      */
--    if (SP->_outch != 0) {
--	SP->_outch(UChar(ch));
-+    if (SP_PARM->_outch != 0) {
-+	SP_PARM->_outch(NCURSES_SP_ARGx UChar(ch));
-     } else
- #endif
-     {
--	PUTC(CHDEREF(ch), SP->_ofp);	/* macro's fastest... */
-+	PUTC(CHDEREF(ch), SP_PARM->_ofp);	/* macro's fastest... */
- 	COUNT_OUTCHARS(1);
-     }
--    SP->_curscol += chlen;
-+    SP_PARM->_curscol += chlen;
-     if (char_padding) {
- 	TPUTS_TRACE("char_padding");
--	putp(char_padding);
-+	NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx char_padding);
-     }
- }
- 
- static bool
--check_pending(void)
-+check_pending(NCURSES_SP_DCL0)
- /* check for pending input */
- {
-     bool have_pending = FALSE;
-@@ -313,13 +333,13 @@
-      * have the refreshing slow down drastically (or stop) if there's an
-      * unread character available.
-      */
--    if (SP->_fifohold != 0)
-+    if (SP_PARM->_fifohold != 0)
- 	return FALSE;
- 
--    if (SP->_checkfd >= 0) {
-+    if (SP_PARM->_checkfd >= 0) {
- #if USE_FUNC_POLL
- 	struct pollfd fds[1];
--	fds[0].fd = SP->_checkfd;
-+	fds[0].fd = SP_PARM->_checkfd;
- 	fds[0].events = POLLIN;
- 	if (poll(fds, 1, 0) > 0) {
- 	    have_pending = TRUE;
-@@ -347,43 +367,52 @@
- 	    ktimeout.tv_usec = 0;
- 
- 	FD_ZERO(&fdset);
--	FD_SET(SP->_checkfd, &fdset);
--	if (select(SP->_checkfd + 1, &fdset, NULL, NULL, &ktimeout) != 0) {
-+	FD_SET(SP_PARM->_checkfd, &fdset);
-+	if (select(SP_PARM->_checkfd + 1, &fdset, NULL, NULL, &ktimeout) != 0) {
- 	    have_pending = TRUE;
- 	}
- #endif
-     }
-     if (have_pending) {
--	SP->_fifohold = 5;
--	_nc_flush();
-+	SP_PARM->_fifohold = 5;
-+	NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG);
-     }
-     return FALSE;
- }
- 
- /* put char at lower right corner */
- static void
--PutCharLR(const ARG_CH_T ch)
-+PutCharLR(NCURSES_SP_DCLx const ARG_CH_T ch)
- {
-     if (!auto_right_margin) {
- 	/* we can put the char directly */
--	PutAttrChar(ch);
-+	PutAttrChar(NCURSES_SP_ARGx ch);
-     } else if (enter_am_mode && exit_am_mode) {
- 	/* we can suppress automargin */
- 	TPUTS_TRACE("exit_am_mode");
--	putp(exit_am_mode);
-+	NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx exit_am_mode);
- 
--	PutAttrChar(ch);
--	SP->_curscol--;
--	position_check(SP->_cursrow, SP->_curscol, "exit_am_mode");
-+	PutAttrChar(NCURSES_SP_ARGx ch);
-+	SP_PARM->_curscol--;
-+	position_check(SP_PARM,
-+		       SP_PARM->_cursrow,
-+		       SP_PARM->_curscol,
-+		       "exit_am_mode");
- 
- 	TPUTS_TRACE("enter_am_mode");
--	putp(enter_am_mode);
-+	NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx enter_am_mode);
-     } else if ((enter_insert_mode && exit_insert_mode)
- 	       || insert_character || parm_ich) {
--	GoTo(screen_lines - 1, screen_columns - 2);
--	PutAttrChar(ch);
--	GoTo(screen_lines - 1, screen_columns - 2);
--	InsStr(newscr->_line[screen_lines - 1].text + screen_columns - 2, 1);
-+	GoTo(NCURSES_SP_ARGx
-+	     screen_lines(SP_PARM) - 1,
-+	     screen_columns(SP_PARM) - 2);
-+	PutAttrChar(NCURSES_SP_ARGx ch);
-+	GoTo(NCURSES_SP_ARGx
-+	     screen_lines(SP_PARM) - 1,
-+	     screen_columns(SP_PARM) - 2);
-+	InsStr(NCURSES_SP_ARGx
-+	       NewScreen(SP_PARM)->_line[screen_lines(SP_PARM) - 1].text +
-+	       screen_columns(SP_PARM) - 2, 1);
-     }
- }
- 
-@@ -391,7 +420,7 @@
-  * Wrap the cursor position, i.e., advance to the beginning of the next line.
-  */
- static void
--wrap_cursor(void)
-+wrap_cursor(NCURSES_SP_DCL0)
- {
-     if (eat_newline_glitch) {
- 	/*
-@@ -407,40 +436,45 @@
- 	 * it's safe to just tell the code that the cursor is in hyperspace and
- 	 * let the next mvcur() call straighten things out.
- 	 */
--	SP->_curscol = -1;
--	SP->_cursrow = -1;
-+	SP_PARM->_curscol = -1;
-+	SP_PARM->_cursrow = -1;
-     } else if (auto_right_margin) {
--	SP->_curscol = 0;
--	SP->_cursrow++;
-+	SP_PARM->_curscol = 0;
-+	SP_PARM->_cursrow++;
- 	/*
- 	 * We've actually moved - but may have to work around problems with
- 	 * video attributes not working.
- 	 */
--	if (!move_standout_mode && AttrOf(SCREEN_ATTRS(SP))) {
-+	if (!move_standout_mode && AttrOf(SCREEN_ATTRS(SP_PARM))) {
- 	    TR(TRACE_CHARPUT, ("turning off (%#lx) %s before wrapping",
--			       (unsigned long) AttrOf(SCREEN_ATTRS(SP)),
--			       _traceattr(AttrOf(SCREEN_ATTRS(SP)))));
--	    (void) VIDATTR(A_NORMAL, 0);
-+			       (unsigned long) AttrOf(SCREEN_ATTRS(SP_PARM)),
-+			       _traceattr(AttrOf(SCREEN_ATTRS(SP_PARM)))));
-+	    (void) VIDATTR(SP_PARM, A_NORMAL, 0);
- 	}
-     } else {
--	SP->_curscol--;
-+	SP_PARM->_curscol--;
-     }
--    position_check(SP->_cursrow, SP->_curscol, "wrap_cursor");
-+    position_check(SP_PARM,
-+		   SP_PARM->_cursrow,
-+		   SP_PARM->_curscol,
-+		   "wrap_cursor");
- }
- 
- static NCURSES_INLINE void
--PutChar(const ARG_CH_T ch)
-+PutChar(NCURSES_SP_DCLx const ARG_CH_T ch)
- /* insert character, handling automargin stuff */
- {
--    if (SP->_cursrow == screen_lines - 1 && SP->_curscol == screen_columns - 1)
--	PutCharLR(ch);
--    else
--	PutAttrChar(ch);
-+    if (SP_PARM->_cursrow == screen_lines(SP_PARM) - 1 &&
-+	SP_PARM->_curscol == screen_columns(SP_PARM) - 1) {
-+	PutCharLR(NCURSES_SP_ARGx ch);
-+    } else {
-+	PutAttrChar(NCURSES_SP_ARGx ch);
-+    }
- 
--    if (SP->_curscol >= screen_columns)
--	wrap_cursor();
-+    if (SP_PARM->_curscol >= screen_columns(SP_PARM))
-+	wrap_cursor(NCURSES_SP_ARG);
- 
--    position_check(SP->_cursrow, SP->_curscol, "PutChar");
-+    position_check(SP_PARM, SP_PARM->_cursrow, SP_PARM->_curscol, "PutChar");
- }
- 
- /*
-@@ -450,19 +484,19 @@
-  * or can be output by clearing (A_COLOR in case of bce-terminal) are excluded.
-  */
- static NCURSES_INLINE bool
--can_clear_with(ARG_CH_T ch)
-+can_clear_with(NCURSES_SP_DCLx ARG_CH_T ch)
- {
--    if (!back_color_erase && SP->_coloron) {
-+    if (!back_color_erase && SP_PARM->_coloron) {
- #if NCURSES_EXT_FUNCS
- 	int pair;
- 
--	if (!SP->_default_color)
-+	if (!SP_PARM->_default_color)
- 	    return FALSE;
--	if (SP->_default_fg != C_MASK || SP->_default_bg != C_MASK)
-+	if (SP_PARM->_default_fg != C_MASK || SP_PARM->_default_bg != C_MASK)
- 	    return FALSE;
- 	if ((pair = GetPair(CHDEREF(ch))) != 0) {
- 	    short fg, bg;
--	    pair_content(pair, &fg, &bg);
-+	    NCURSES_SP_NAME(pair_content) (NCURSES_SP_ARGx pair, &fg, &bg);
- 	    if (fg != C_MASK || bg != C_MASK)
- 		return FALSE;
- 	}
-@@ -488,7 +522,7 @@
-  * This code is optimized using ech and rep.
-  */
- static int
--EmitRange(const NCURSES_CH_T * ntext, int num)
-+EmitRange(NCURSES_SP_DCLx const NCURSES_CH_T * ntext, int num)
- {
-     int i;
- 
-@@ -500,13 +534,13 @@
- 	    NCURSES_CH_T ntext0;
- 
- 	    while (num > 1 && !CharEq(ntext[0], ntext[1])) {
--		PutChar(CHREF(ntext[0]));
-+		PutChar(NCURSES_SP_ARGx CHREF(ntext[0]));
- 		ntext++;
- 		num--;
- 	    }
- 	    ntext0 = ntext[0];
- 	    if (num == 1) {
--		PutChar(CHREF(ntext0));
-+		PutChar(NCURSES_SP_ARGx CHREF(ntext0));
- 		return 0;
- 	    }
- 	    runcount = 2;
-@@ -523,10 +557,11 @@
- 	     * which it would be marginally advantageous.
- 	     */
- 	    if (erase_chars
--		&& runcount > SP->_ech_cost + SP->_cup_ch_cost
--		&& can_clear_with(CHREF(ntext0))) {
--		UpdateAttrs(ntext0);
--		putp(TPARM_1(erase_chars, runcount));
-+		&& runcount > SP_PARM->_ech_cost + SP_PARM->_cup_ch_cost
-+		&& can_clear_with(NCURSES_SP_ARGx CHREF(ntext0))) {
-+		UpdateAttrs(SP_PARM, ntext0);
-+		NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx
-+				       TPARM_1(erase_chars, runcount));
- 
- 		/*
- 		 * If this is the last part of the given interval,
-@@ -534,27 +569,34 @@
- 		 * last update on the line.
- 		 */
- 		if (runcount < num) {
--		    GoTo(SP->_cursrow, SP->_curscol + runcount);
-+		    GoTo(NCURSES_SP_ARGx
-+			 SP_PARM->_cursrow,
-+			 SP_PARM->_curscol + runcount);
- 		} else {
- 		    return 1;	/* cursor stays in the middle */
- 		}
--	    } else if (repeat_char && runcount > SP->_rep_cost) {
--		bool wrap_possible = (SP->_curscol + runcount >= screen_columns);
-+	    } else if (repeat_char && runcount > SP_PARM->_rep_cost) {
-+		bool wrap_possible = (SP_PARM->_curscol + runcount >=
-+				      screen_columns(SP_PARM));
- 		int rep_count = runcount;
- 
- 		if (wrap_possible)
- 		    rep_count--;
- 
--		UpdateAttrs(ntext0);
--		tputs(TPARM_2(repeat_char, CharOf(ntext0), rep_count),
--		      rep_count, _nc_outch);
--		SP->_curscol += rep_count;
-+		UpdateAttrs(SP_PARM, ntext0);
-+		NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
-+					TPARM_2(repeat_char,
-+						CharOf(ntext0),
-+						rep_count),
-+					rep_count,
-+					NCURSES_SP_NAME(_nc_outch));
-+		SP_PARM->_curscol += rep_count;
- 
- 		if (wrap_possible)
--		    PutChar(CHREF(ntext0));
-+		    PutChar(NCURSES_SP_ARGx CHREF(ntext0));
- 	    } else {
- 		for (i = 0; i < runcount; i++)
--		    PutChar(CHREF(ntext[i]));
-+		    PutChar(NCURSES_SP_ARGx CHREF(ntext[i]));
- 	    }
- 	    ntext += runcount;
- 	    num -= runcount;
-@@ -563,7 +605,7 @@
-     }
- 
-     for (i = 0; i < num; i++)
--	PutChar(CHREF(ntext[i]));
-+	PutChar(NCURSES_SP_ARGx CHREF(ntext[i]));
-     return 0;
- }
- 
-@@ -576,39 +618,40 @@
-  * Returns: same as EmitRange
-  */
- static int
--PutRange(const NCURSES_CH_T * otext,
-+PutRange(NCURSES_SP_DCLx
-+	 const NCURSES_CH_T * otext,
- 	 const NCURSES_CH_T * ntext,
- 	 int row,
- 	 int first, int last)
- {
-     int i, j, same;
- 
--    TR(TRACE_CHARPUT, ("PutRange(%p, %p, %d, %d, %d)",
--		       otext, ntext, row, first, last));
-+    TR(TRACE_CHARPUT, ("PutRange(%p, %p, %p, %d, %d, %d)",
-+		       SP_PARM, otext, ntext, row, first, last));
- 
-     if (otext != ntext
--	&& (last - first + 1) > SP->_inline_cost) {
-+	&& (last - first + 1) > SP_PARM->_inline_cost) {
- 	for (j = first, same = 0; j <= last; j++) {
- 	    if (!same && isWidecExt(otext[j]))
- 		continue;
- 	    if (CharEq(otext[j], ntext[j])) {
- 		same++;
- 	    } else {
--		if (same > SP->_inline_cost) {
--		    EmitRange(ntext + first, j - same - first);
--		    GoTo(row, first = j);
-+		if (same > SP_PARM->_inline_cost) {
-+		    EmitRange(NCURSES_SP_ARGx ntext + first, j - same - first);
-+		    GoTo(NCURSES_SP_ARGx row, first = j);
- 		}
- 		same = 0;
- 	    }
- 	}
--	i = EmitRange(ntext + first, j - same - first);
-+	i = EmitRange(NCURSES_SP_ARGx ntext + first, j - same - first);
- 	/*
- 	 * Always return 1 for the next GoTo() after a PutRange() if we found
- 	 * identical characters at end of interval
- 	 */
- 	return (same == 0 ? i : 1);
-     }
--    return EmitRange(ntext + first, last - first + 1);
-+    return EmitRange(NCURSES_SP_ARGx ntext + first, last - first + 1);
- }
- 
- /* leave unbracketed here so 'indent' works */
-@@ -618,7 +661,7 @@
- 		if_USE_SCROLL_HINTS(win->_line[row].oldindex = row)
- 
- NCURSES_EXPORT(int)
--doupdate(void)
-+NCURSES_SP_NAME(doupdate) (NCURSES_SP_DCL0)
- {
-     int i;
-     int nonempty;
-@@ -626,30 +669,49 @@
-     struct tms before, after;
- #endif /* USE_TRACE_TIMES */
- 
--    T((T_CALLED("doupdate()")));
-+    T((T_CALLED("_nc_tinfo:doupdate(%p)"), SP_PARM));
-+
-+#if !USE_REENTRANT
-+    /*
-+     * It is "legal" but unlikely that an application could assign a new
-+     * value to one of the standard windows.  Check for that possibility
-+     * and try to recover.
-+     *
-+     * We do not allow applications to assign new values in the reentrant
-+     * model.
-+     */
-+#define SyncScreens(internal,exported) \
-+	if (internal == 0) internal = exported; \
-+	if (internal != exported) exported = internal
-+
-+    SyncScreens(CurScreen(SP_PARM), curscr);
-+    SyncScreens(NewScreen(SP_PARM), newscr);
-+    SyncScreens(StdScreen(SP_PARM), stdscr);
-+#endif
- 
--    if (curscr == 0
--	|| newscr == 0)
-+    if (CurScreen(SP_PARM) == 0
-+	|| NewScreen(SP_PARM) == 0
-+	|| StdScreen(SP_PARM) == 0)
- 	returnCode(ERR);
- 
- #ifdef TRACE
-     if (USE_TRACEF(TRACE_UPDATE)) {
--	if (curscr->_clear)
-+	if (CurScreen(SP_PARM)->_clear)
- 	    _tracef("curscr is clear");
- 	else
--	    _tracedump("curscr", curscr);
--	_tracedump("newscr", newscr);
-+	    _tracedump("curscr", CurScreen(SP_PARM));
-+	_tracedump("newscr", NewScreen(SP_PARM));
- 	_nc_unlock_global(tracef);
-     }
- #endif /* TRACE */
- 
-     _nc_signal_handler(FALSE);
- 
--    if (SP->_fifohold)
--	SP->_fifohold--;
-+    if (SP_PARM->_fifohold)
-+	SP_PARM->_fifohold--;
- 
- #if USE_SIZECHANGE
--    if (SP->_endwin || _nc_handle_sigwinch(SP)) {
-+    if (SP_PARM->_endwin || _nc_handle_sigwinch(SP_PARM)) {
- 	/*
- 	 * This is a transparent extension:  XSI does not address it,
- 	 * and applications need not know that ncurses can do it.
-@@ -658,20 +720,20 @@
- 	 * (this can happen in an xterm, for example), and resize the
- 	 * ncurses data structures accordingly.
- 	 */
--	_nc_update_screensize(SP);
-+	_nc_update_screensize(SP_PARM);
-     }
- #endif
- 
--    if (SP->_endwin) {
-+    if (SP_PARM->_endwin) {
- 
- 	T(("coming back from shell mode"));
--	reset_prog_mode();
-+	NCURSES_SP_NAME(reset_prog_mode) (NCURSES_SP_ARG);
- 
--	_nc_mvcur_resume();
--	_nc_screen_resume();
--	SP->_mouse_resume(SP);
-+	NCURSES_SP_NAME(_nc_mvcur_resume) (NCURSES_SP_ARG);
-+	NCURSES_SP_NAME(_nc_screen_resume) (NCURSES_SP_ARG);
-+	SP_PARM->_mouse_resume(SP_PARM);
- 
--	SP->_endwin = FALSE;
-+	SP_PARM->_endwin = FALSE;
-     }
- #if USE_TRACE_TIMES
-     /* zero the metering machinery */
-@@ -695,11 +757,11 @@
- 	int j, k;
- 	attr_t rattr = A_NORMAL;
- 
--	for (i = 0; i < screen_lines; i++) {
--	    for (j = 0; j < screen_columns; j++) {
-+	for (i = 0; i < screen_lines(SP_PARM); i++) {
-+	    for (j = 0; j < screen_columns(SP_PARM); j++) {
- 		bool failed = FALSE;
--		NCURSES_CH_T *thisline = newscr->_line[i].text;
--		attr_t thisattr = AttrOf(thisline[j]) & SP->_xmc_triggers;
-+		NCURSES_CH_T *thisline = NewScreen(SP_PARM)->_line[i].text;
-+		attr_t thisattr = AttrOf(thisline[j]) & SP_PARM->_xmc_triggers;
- 		attr_t turnon = thisattr & ~rattr;
- 
- 		/* is an attribute turned on here? */
-@@ -717,8 +779,8 @@
- 		 * there's enough room to set the attribute before the first
- 		 * non-blank in the run.
- 		 */
--#define SAFE(a)	(!((a) & SP->_xmc_triggers))
--		if (ISBLANK(thisline[j]) && SAFE(turnon)) {
-+#define SAFE(scr,a)	(!((a) & (scr)->_xmc_triggers))
-+		if (ISBLANK(thisline[j]) && SAFE(SP_PARM, turnon)) {
- 		    RemAttr(thisline[j], turnon);
- 		    continue;
- 		}
-@@ -727,14 +789,14 @@
- 		for (k = 1; k <= magic_cookie_glitch; k++) {
- 		    if (j - k < 0
- 			|| !ISBLANK(thisline[j - k])
--			|| !SAFE(AttrOf(thisline[j - k]))) {
-+			|| !SAFE(SP_PARM, AttrOf(thisline[j - k]))) {
- 			failed = TRUE;
- 			TR(TRACE_ATTRS, ("No room at start in %d,%d%s%s",
- 					 i, j - k,
- 					 (ISBLANK(thisline[j - k])
- 					  ? ""
- 					  : ":nonblank"),
--					 (SAFE(AttrOf(thisline[j - k]))
-+					 (SAFE(SP_PARM, AttrOf(thisline[j - k]))
- 					  ? ""
- 					  : ":unsafe")));
- 			break;
-@@ -745,10 +807,11 @@
- 		    int m, n = j;
- 
- 		    /* find end of span, if it's onscreen */
--		    for (m = i; m < screen_lines; m++) {
--			for (; n < screen_columns; n++) {
--			    attr_t testattr = AttrOf(newscr->_line[m].text[n]);
--			    if ((testattr & SP->_xmc_triggers) == rattr) {
-+		    for (m = i; m < screen_lines(SP_PARM); m++) {
-+			for (; n < screen_columns(SP_PARM); n++) {
-+			    attr_t testattr =
-+			    AttrOf(NewScreen(SP_PARM)->_line[m].text[n]);
-+			    if ((testattr & SP_PARM->_xmc_triggers) == rattr) {
- 				end_onscreen = TRUE;
- 				TR(TRACE_ATTRS,
- 				   ("Range attributed with %s ends at (%d, %d)",
-@@ -764,7 +827,8 @@
- 		  foundit:;
- 
- 		    if (end_onscreen) {
--			NCURSES_CH_T *lastline = newscr->_line[m].text;
-+			NCURSES_CH_T *lastline =
-+			NewScreen(SP_PARM)->_line[m].text;
- 
- 			/*
- 			 * If there are safely-attributed blanks at the end of
-@@ -773,15 +837,15 @@
- 			 */
- 			while (n >= 0
- 			       && ISBLANK(lastline[n])
--			       && SAFE(AttrOf(lastline[n]))) {
-+			       && SAFE(SP_PARM, AttrOf(lastline[n]))) {
- 			    RemAttr(lastline[n--], turnon);
- 			}
- 
- 			/* check that there's enough room at end of span */
- 			for (k = 1; k <= magic_cookie_glitch; k++) {
--			    if (n + k >= screen_columns
-+			    if (n + k >= screen_columns(SP_PARM)
- 				|| !ISBLANK(lastline[n + k])
--				|| !SAFE(AttrOf(lastline[n + k]))) {
-+				|| !SAFE(SP_PARM, AttrOf(lastline[n + k]))) {
- 				failed = TRUE;
- 				TR(TRACE_ATTRS,
- 				   ("No room at end in %d,%d%s%s",
-@@ -789,7 +853,7 @@
- 				    (ISBLANK(lastline[n + k])
- 				     ? ""
- 				     : ":nonblank"),
--				    (SAFE(AttrOf(lastline[n + k]))
-+				    (SAFE(SP_PARM, AttrOf(lastline[n + k]))
- 				     ? ""
- 				     : ":unsafe")));
- 				break;
-@@ -806,12 +870,12 @@
- 			_traceattr(turnon), i, j));
- 
- 		    /* turn off new attributes over span */
--		    for (p = i; p < screen_lines; p++) {
--			for (; q < screen_columns; q++) {
-+		    for (p = i; p < screen_lines(SP_PARM); p++) {
-+			for (; q < screen_columns(SP_PARM); q++) {
- 			    attr_t testattr = AttrOf(newscr->_line[p].text[q]);
--			    if ((testattr & SP->_xmc_triggers) == rattr)
-+			    if ((testattr & SP_PARM->_xmc_triggers) == rattr)
- 				goto foundend;
--			    RemAttr(newscr->_line[p].text[q], turnon);
-+			    RemAttr(NewScreen(SP_PARM)->_line[p].text[q], turnon);
- 			}
- 			q = 0;
- 		    }
-@@ -837,7 +901,7 @@
- 	/* show altered highlights after magic-cookie check */
- 	if (USE_TRACEF(TRACE_UPDATE)) {
- 	    _tracef("After magic-cookie check...");
--	    _tracedump("newscr", newscr);
-+	    _tracedump("newscr", NewScreen(SP_PARM));
- 	    _nc_unlock_global(tracef);
- 	}
- #endif /* TRACE */
-@@ -845,23 +909,23 @@
- #endif /* USE_XMC_SUPPORT */
- 
-     nonempty = 0;
--    if (curscr->_clear || newscr->_clear) {	/* force refresh ? */
--	ClrUpdate();
--	curscr->_clear = FALSE;	/* reset flag */
--	newscr->_clear = FALSE;	/* reset flag */
-+    if (CurScreen(SP_PARM)->_clear || NewScreen(SP_PARM)->_clear) {	/* force refresh ? */
-+	ClrUpdate(NCURSES_SP_ARG);
-+	CurScreen(SP_PARM)->_clear = FALSE;	/* reset flag */
-+	NewScreen(SP_PARM)->_clear = FALSE;	/* reset flag */
-     } else {
- 	int changedlines = CHECK_INTERVAL;
- 
--	if (check_pending())
-+	if (check_pending(NCURSES_SP_ARG))
- 	    goto cleanup;
- 
--	nonempty = min(screen_lines, newscr->_maxy + 1);
-+	nonempty = min(screen_lines(SP_PARM), NewScreen(SP_PARM)->_maxy + 1);
- 
--	if (SP->_scrolling) {
--	    _nc_scroll_optimize();
-+	if (SP_PARM->_scrolling) {
-+	    NCURSES_SP_NAME(_nc_scroll_optimize) (NCURSES_SP_ARG);
- 	}
- 
--	nonempty = ClrBottom(nonempty);
-+	nonempty = ClrBottom(NCURSES_SP_ARGx nonempty);
- 
- 	TR(TRACE_UPDATE, ("Transforming lines, nonempty %d", nonempty));
- 	for (i = 0; i < nonempty; i++) {
-@@ -869,7 +933,7 @@
- 	     * Here is our line-breakout optimization.
- 	     */
- 	    if (changedlines == CHECK_INTERVAL) {
--		if (check_pending())
-+		if (check_pending(NCURSES_SP_ARG))
- 		    goto cleanup;
- 		changedlines = 0;
- 	    }
-@@ -880,35 +944,35 @@
- 	     * is normally set by _nc_scroll_window in the
- 	     * vertical-movement optimization code,
- 	     */
--	    if (newscr->_line[i].firstchar != _NOCHANGE
--		|| curscr->_line[i].firstchar != _NOCHANGE) {
--		TransformLine(i);
-+	    if (NewScreen(SP_PARM)->_line[i].firstchar != _NOCHANGE
-+		|| CurScreen(SP_PARM)->_line[i].firstchar != _NOCHANGE) {
-+		TransformLine(NCURSES_SP_ARGx i);
- 		changedlines++;
- 	    }
- 
- 	    /* mark line changed successfully */
--	    if (i <= newscr->_maxy) {
--		MARK_NOCHANGE(newscr, i);
-+	    if (i <= NewScreen(SP_PARM)->_maxy) {
-+		MARK_NOCHANGE(NewScreen(SP_PARM), i);
- 	    }
--	    if (i <= curscr->_maxy) {
--		MARK_NOCHANGE(curscr, i);
-+	    if (i <= CurScreen(SP_PARM)->_maxy) {
-+		MARK_NOCHANGE(CurScreen(SP_PARM), i);
- 	    }
- 	}
-     }
- 
-     /* put everything back in sync */
--    for (i = nonempty; i <= newscr->_maxy; i++) {
--	MARK_NOCHANGE(newscr, i);
-+    for (i = nonempty; i <= NewScreen(SP_PARM)->_maxy; i++) {
-+	MARK_NOCHANGE(NewScreen(SP_PARM), i);
-     }
--    for (i = nonempty; i <= curscr->_maxy; i++) {
--	MARK_NOCHANGE(curscr, i);
-+    for (i = nonempty; i <= CurScreen(SP_PARM)->_maxy; i++) {
-+	MARK_NOCHANGE(CurScreen(SP_PARM), i);
-     }
- 
--    if (!newscr->_leaveok) {
--	curscr->_curx = newscr->_curx;
--	curscr->_cury = newscr->_cury;
-+    if (!NewScreen(SP_PARM)->_leaveok) {
-+	CurScreen(SP_PARM)->_curx = NewScreen(SP_PARM)->_curx;
-+	CurScreen(SP_PARM)->_cury = NewScreen(SP_PARM)->_cury;
- 
--	GoTo(curscr->_cury, curscr->_curx);
-+	GoTo(NCURSES_SP_ARGx CurScreen(SP_PARM)->_cury, CurScreen(SP_PARM)->_curx);
-     }
- 
-   cleanup:
-@@ -921,10 +985,10 @@
- #if USE_XMC_SUPPORT
-     if (magic_cookie_glitch != 0)
- #endif
--	UpdateAttrs(normal);
-+	UpdateAttrs(SP_PARM, normal);
- 
--    _nc_flush();
--    WINDOW_ATTRS(curscr) = WINDOW_ATTRS(newscr);
-+    NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG);
-+    WINDOW_ATTRS(CurScreen(SP_PARM)) = WINDOW_ATTRS(NewScreen(SP_PARM));
- 
- #if USE_TRACE_TIMES
-     (void) times(&after);
-@@ -940,6 +1004,14 @@
-     returnCode(OK);
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+doupdate(void)
-+{
-+    return NCURSES_SP_NAME(doupdate) (CURRENT_SCREEN);
-+}
-+#endif
-+
- /*
-  *	ClrBlank(win)
-  *
-@@ -951,14 +1023,14 @@
-  *	in the wbkgd() call.  Assume 'stdscr' for this case.
-  */
- #define BCE_ATTRS (A_NORMAL|A_COLOR)
--#define BCE_BKGD(win) (((win) == curscr ? stdscr : (win))->_nc_bkgd)
-+#define BCE_BKGD(sp,win) (((win) == CurScreen(sp) ? StdScreen(sp) : (win))->_nc_bkgd)
- 
- static NCURSES_INLINE NCURSES_CH_T
--ClrBlank(WINDOW *win)
-+ClrBlank(NCURSES_SP_DCLx WINDOW *win)
- {
-     NCURSES_CH_T blank = blankchar;
-     if (back_color_erase)
--	AddAttr(blank, (AttrOf(BCE_BKGD(win)) & BCE_ATTRS));
-+	AddAttr(blank, (AttrOf(BCE_BKGD(SP_PARM, win)) & BCE_ATTRS));
-     return blank;
- }
- 
-@@ -970,23 +1042,24 @@
- */
- 
- static void
--ClrUpdate(void)
-+ClrUpdate(NCURSES_SP_DCL0)
- {
--    int i;
--    NCURSES_CH_T blank = ClrBlank(stdscr);
--    int nonempty = min(screen_lines, newscr->_maxy + 1);
--
-     TR(TRACE_UPDATE, (T_CALLED("ClrUpdate")));
-+    if (0 != SP_PARM) {
-+	int i;
-+	NCURSES_CH_T blank = ClrBlank(NCURSES_SP_ARGx StdScreen(SP_PARM));
-+	int nonempty = min(screen_lines(SP_PARM),
-+			   NewScreen(SP_PARM)->_maxy + 1);
- 
--    ClearScreen(blank);
--
--    TR(TRACE_UPDATE, ("updating screen from scratch"));
-+	ClearScreen(NCURSES_SP_ARGx blank);
- 
--    nonempty = ClrBottom(nonempty);
-+	TR(TRACE_UPDATE, ("updating screen from scratch"));
- 
--    for (i = 0; i < nonempty; i++)
--	TransformLine(i);
-+	nonempty = ClrBottom(NCURSES_SP_ARGx nonempty);
- 
-+	for (i = 0; i < nonempty; i++)
-+	    TransformLine(NCURSES_SP_ARGx i);
-+    }
-     TR(TRACE_UPDATE, (T_RETURN("")));
- }
- 
-@@ -997,15 +1070,16 @@
- */
- 
- static void
--ClrToEOL(NCURSES_CH_T blank, bool needclear)
-+ClrToEOL(NCURSES_SP_DCLx NCURSES_CH_T blank, bool needclear)
- {
-     int j;
- 
--    if (curscr != 0
--	&& SP->_cursrow >= 0) {
--	for (j = SP->_curscol; j < screen_columns; j++) {
-+    if (SP_PARM != 0 && CurScreen(SP_PARM) != 0
-+	&& SP_PARM->_cursrow >= 0) {
-+	for (j = SP_PARM->_curscol; j < screen_columns(SP_PARM); j++) {
- 	    if (j >= 0) {
--		NCURSES_CH_T *cp = &(curscr->_line[SP->_cursrow].text[j]);
-+		NCURSES_CH_T *cp =
-+		&(CurScreen(SP_PARM)->_line[SP_PARM->_cursrow].text[j]);
- 
- 		if (!CharEq(*cp, blank)) {
- 		    *cp = blank;
-@@ -1018,14 +1092,14 @@
-     }
- 
-     if (needclear) {
--	UpdateAttrs(blank);
-+	UpdateAttrs(SP_PARM, blank);
- 	TPUTS_TRACE("clr_eol");
--	if (clr_eol && SP->_el_cost <= (screen_columns - SP->_curscol)) {
--	    putp(clr_eol);
-+	if (clr_eol && SP_PARM->_el_cost <= (screen_columns(SP_PARM) - SP_PARM->_curscol)) {
-+	    NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx clr_eol);
- 	} else {
--	    int count = (screen_columns - SP->_curscol);
-+	    int count = (screen_columns(SP_PARM) - SP_PARM->_curscol);
- 	    while (count-- > 0)
--		PutChar(CHREF(blank));
-+		PutChar(NCURSES_SP_ARGx CHREF(blank));
- 	}
-     }
- }
-@@ -1037,23 +1111,29 @@
- */
- 
- static void
--ClrToEOS(NCURSES_CH_T blank)
-+ClrToEOS(NCURSES_SP_DCLx NCURSES_CH_T blank)
- {
-     int row, col;
- 
--    row = SP->_cursrow;
--    col = SP->_curscol;
--
--    UpdateAttrs(blank);
--    TPUTS_TRACE("clr_eos");
--    tputs(clr_eos, screen_lines - row, _nc_outch);
-+    if (0 == SP_PARM)
-+	return;
- 
--    while (col < screen_columns)
--	curscr->_line[row].text[col++] = blank;
-+    row = SP_PARM->_cursrow;
-+    col = SP_PARM->_curscol;
- 
--    for (row++; row < screen_lines; row++) {
--	for (col = 0; col < screen_columns; col++)
--	    curscr->_line[row].text[col] = blank;
-+    UpdateAttrs(SP_PARM, blank);
-+    TPUTS_TRACE("clr_eos");
-+    NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
-+			    clr_eos,
-+			    screen_lines(SP_PARM) - row,
-+			    NCURSES_SP_NAME(_nc_outch));
-+
-+    while (col < screen_columns(SP_PARM))
-+	CurScreen(SP_PARM)->_line[row].text[col++] = blank;
-+
-+    for (row++; row < screen_lines(SP_PARM); row++) {
-+	for (col = 0; col < screen_columns(SP_PARM); col++)
-+	    CurScreen(SP_PARM)->_line[row].text[col] = blank;
-     }
- }
- 
-@@ -1065,26 +1145,26 @@
-  *	screen, checking if each is blank, and one or more are changed.
-  */
- static int
--ClrBottom(int total)
-+ClrBottom(NCURSES_SP_DCLx int total)
- {
-     int row;
-     int col;
-     int top = total;
--    int last = min(screen_columns, newscr->_maxx + 1);
--    NCURSES_CH_T blank = newscr->_line[total - 1].text[last - 1];
-+    int last = min(screen_columns(SP_PARM), NewScreen(SP_PARM)->_maxx + 1);
-+    NCURSES_CH_T blank = NewScreen(SP_PARM)->_line[total - 1].text[last - 1];
-     bool ok;
- 
--    if (clr_eos && can_clear_with(CHREF(blank))) {
-+    if (clr_eos && can_clear_with(NCURSES_SP_ARGx CHREF(blank))) {
- 
- 	for (row = total - 1; row >= 0; row--) {
- 	    for (col = 0, ok = TRUE; ok && col < last; col++) {
--		ok = (CharEq(newscr->_line[row].text[col], blank));
-+		ok = (CharEq(NewScreen(SP_PARM)->_line[row].text[col], blank));
- 	    }
- 	    if (!ok)
- 		break;
- 
- 	    for (col = 0; ok && col < last; col++) {
--		ok = (CharEq(curscr->_line[row].text[col], blank));
-+		ok = (CharEq(CurScreen(SP_PARM)->_line[row].text[col], blank));
- 	    }
- 	    if (!ok)
- 		top = row;
-@@ -1092,11 +1172,11 @@
- 
- 	/* don't use clr_eos for just one line if clr_eol available */
- 	if (top < total) {
--	    GoTo(top, 0);
--	    ClrToEOS(blank);
--	    if (SP->oldhash && SP->newhash) {
--		for (row = top; row < screen_lines; row++)
--		    SP->oldhash[row] = SP->newhash[row];
-+	    GoTo(NCURSES_SP_ARGx top, 0);
-+	    ClrToEOS(NCURSES_SP_ARGx blank);
-+	    if (SP_PARM->oldhash && SP_PARM->newhash) {
-+		for (row = top; row < screen_lines(SP_PARM); row++)
-+		    SP_PARM->oldhash[row] = SP_PARM->newhash[row];
- 	    }
- 	}
-     }
-@@ -1105,15 +1185,15 @@
- 
- #if USE_XMC_SUPPORT
- #if USE_WIDEC_SUPPORT
--#define check_xmc_transition(a, b) \
--    ((((a)->attr ^ (b)->attr) & ~((a)->attr) & SP->_xmc_triggers) != 0)
--#define xmc_turn_on(a,b) check_xmc_transition(&(a), &(b))
-+#define check_xmc_transition(sp, a, b)					\
-+    ((((a)->attr ^ (b)->attr) & ~((a)->attr) & (sp)->_xmc_triggers) != 0)
-+#define xmc_turn_on(sp,a,b) check_xmc_transition(sp,&(a), &(b))
- #else
--#define xmc_turn_on(a,b) ((((a)^(b)) & ~(a) & SP->_xmc_triggers) != 0)
-+#define xmc_turn_on(sp,a,b) ((((a)^(b)) & ~(a) & (sp)->_xmc_triggers) != 0)
- #endif
- 
--#define xmc_new(r,c) newscr->_line[r].text[c]
--#define xmc_turn_off(a,b) xmc_turn_on(b,a)
-+#define xmc_new(sp,r,c) NewScreen(sp)->_line[r].text[c]
-+#define xmc_turn_off(sp,a,b) xmc_turn_on(sp,b,a)
- #endif /* USE_XMC_SUPPORT */
- 
- /*
-@@ -1135,19 +1215,19 @@
- */
- 
- static void
--TransformLine(int const lineno)
-+TransformLine(NCURSES_SP_DCLx int const lineno)
- {
-     int firstChar, oLastChar, nLastChar;
--    NCURSES_CH_T *newLine = newscr->_line[lineno].text;
--    NCURSES_CH_T *oldLine = curscr->_line[lineno].text;
-+    NCURSES_CH_T *newLine = NewScreen(SP_PARM)->_line[lineno].text;
-+    NCURSES_CH_T *oldLine = CurScreen(SP_PARM)->_line[lineno].text;
-     int n;
-     bool attrchanged = FALSE;
- 
--    TR(TRACE_UPDATE, (T_CALLED("TransformLine(%d)"), lineno));
-+    TR(TRACE_UPDATE, (T_CALLED("TransformLine(%p, %d)"), SP_PARM, lineno));
- 
-     /* copy new hash value to old one */
--    if (SP->oldhash && SP->newhash)
--	SP->oldhash[lineno] = SP->newhash[lineno];
-+    if (SP_PARM->oldhash && SP_PARM->newhash)
-+	SP_PARM->oldhash[lineno] = SP_PARM->newhash[lineno];
- 
-     /*
-      * If we have colors, there is the possibility of having two color pairs
-@@ -1155,19 +1235,20 @@
-      * for this case, and update the old line with the new line's colors when
-      * they are equivalent.
-      */
--    if (SP->_coloron) {
-+    if (SP_PARM->_coloron) {
- 	int oldPair;
- 	int newPair;
- 
--	for (n = 0; n < screen_columns; n++) {
-+	for (n = 0; n < screen_columns(SP_PARM); n++) {
- 	    if (!CharEq(newLine[n], oldLine[n])) {
- 		oldPair = GetPair(oldLine[n]);
- 		newPair = GetPair(newLine[n]);
- 		if (oldPair != newPair
- 		    && unColor(oldLine[n]) == unColor(newLine[n])) {
--		    if (oldPair < COLOR_PAIRS
--			&& newPair < COLOR_PAIRS
--			&& SP->_color_pairs[oldPair] == SP->_color_pairs[newPair]) {
-+		    if (oldPair < SP_PARM->_pair_limit
-+			&& newPair < SP_PARM->_pair_limit
-+			&& (SP_PARM->_color_pairs[oldPair] ==
-+			    SP_PARM->_color_pairs[newPair])) {
- 			SetPair(oldLine[n], GetPair(newLine[n]));
- 		    }
- 		}
-@@ -1177,7 +1258,7 @@
- 
-     if (ceol_standout_glitch && clr_eol) {
- 	firstChar = 0;
--	while (firstChar < screen_columns) {
-+	while (firstChar < screen_columns(SP_PARM)) {
- 	    if (!SameAttrOf(newLine[firstChar], oldLine[firstChar])) {
- 		attrchanged = TRUE;
- 		break;
-@@ -1189,9 +1270,13 @@
-     firstChar = 0;
- 
-     if (attrchanged) {		/* we may have to disregard the whole line */
--	GoTo(lineno, firstChar);
--	ClrToEOL(ClrBlank(curscr), FALSE);
--	PutRange(oldLine, newLine, lineno, 0, (screen_columns - 1));
-+	GoTo(NCURSES_SP_ARGx lineno, firstChar);
-+	ClrToEOL(NCURSES_SP_ARGx
-+		 ClrBlank(NCURSES_SP_ARGx
-+			  CurScreen(SP_PARM)), FALSE);
-+	PutRange(NCURSES_SP_ARGx
-+		 oldLine, newLine, lineno, 0,
-+		 screen_columns(SP_PARM) - 1);
- #if USE_XMC_SUPPORT
- 
- 	/*
-@@ -1206,8 +1291,8 @@
- 	 * following operation.
- 	 */
-     } else if (magic_cookie_glitch > 0) {
--	GoTo(lineno, firstChar);
--	for (n = 0; n < screen_columns; n++) {
-+	GoTo(NCURSES_SP_ARGx lineno, firstChar);
-+	for (n = 0; n < screen_columns(SP_PARM); n++) {
- 	    int m = n + magic_cookie_glitch;
- 
- 	    /* check for turn-on:
-@@ -1216,26 +1301,30 @@
- 	     */
- 	    if (ISBLANK(newLine[n])
- 		&& ((n > 0
--		     && xmc_turn_on(newLine[n - 1], newLine[n]))
-+		     && xmc_turn_on(SP_PARM, newLine[n - 1], newLine[n]))
- 		    || (n == 0
- 			&& lineno > 0
--			&& xmc_turn_on(xmc_new(lineno - 1, screen_columns - 1),
-+			&& xmc_turn_on(SP_PARM,
-+				       xmc_new(SP_PARM, lineno - 1,
-+					       screen_columns(SP_PARM) - 1),
- 				       newLine[n])))) {
- 		n = m;
- 	    }
- 
--	    PutChar(CHREF(newLine[n]));
-+	    PutChar(NCURSES_SP_ARGx CHREF(newLine[n]));
- 
- 	    /* check for turn-off:
- 	     * If we are writing an attributed non-blank, where the
- 	     * next cell is blank, and not attributed.
- 	     */
- 	    if (!ISBLANK(newLine[n])
--		&& ((n + 1 < screen_columns
--		     && xmc_turn_off(newLine[n], newLine[n + 1]))
--		    || (n + 1 >= screen_columns
--			&& lineno + 1 < screen_lines
--			&& xmc_turn_off(newLine[n], xmc_new(lineno + 1, 0))))) {
-+		&& ((n + 1 < screen_columns(SP_PARM)
-+		     && xmc_turn_off(SP_PARM, newLine[n], newLine[n + 1]))
-+		    || (n + 1 >= screen_columns(SP_PARM)
-+			&& lineno + 1 < screen_lines(SP_PARM)
-+			&& xmc_turn_off(SP_PARM,
-+					newLine[n],
-+					xmc_new(SP_PARM, lineno + 1, 0))))) {
- 		n = m;
- 	    }
- 
-@@ -1246,38 +1335,42 @@
- 
- 	/* it may be cheap to clear leading whitespace with clr_bol */
- 	blank = newLine[0];
--	if (clr_bol && can_clear_with(CHREF(blank))) {
-+	if (clr_bol && can_clear_with(NCURSES_SP_ARGx CHREF(blank))) {
- 	    int oFirstChar, nFirstChar;
- 
--	    for (oFirstChar = 0; oFirstChar < screen_columns; oFirstChar++)
-+	    for (oFirstChar = 0;
-+		 oFirstChar < screen_columns(SP_PARM);
-+		 oFirstChar++)
- 		if (!CharEq(oldLine[oFirstChar], blank))
- 		    break;
--	    for (nFirstChar = 0; nFirstChar < screen_columns; nFirstChar++)
-+	    for (nFirstChar = 0;
-+		 nFirstChar < screen_columns(SP_PARM);
-+		 nFirstChar++)
- 		if (!CharEq(newLine[nFirstChar], blank))
- 		    break;
- 
- 	    if (nFirstChar == oFirstChar) {
- 		firstChar = nFirstChar;
- 		/* find the first differing character */
--		while (firstChar < screen_columns
-+		while (firstChar < screen_columns(SP_PARM)
- 		       && CharEq(newLine[firstChar], oldLine[firstChar]))
- 		    firstChar++;
- 	    } else if (oFirstChar > nFirstChar) {
- 		firstChar = nFirstChar;
- 	    } else {		/* oFirstChar < nFirstChar */
- 		firstChar = oFirstChar;
--		if (SP->_el1_cost < nFirstChar - oFirstChar) {
--		    if (nFirstChar >= screen_columns
--			&& SP->_el_cost <= SP->_el1_cost) {
--			GoTo(lineno, 0);
--			UpdateAttrs(blank);
-+		if (SP_PARM->_el1_cost < nFirstChar - oFirstChar) {
-+		    if (nFirstChar >= screen_columns(SP_PARM)
-+			&& SP_PARM->_el_cost <= SP_PARM->_el1_cost) {
-+			GoTo(NCURSES_SP_ARGx lineno, 0);
-+			UpdateAttrs(SP_PARM, blank);
- 			TPUTS_TRACE("clr_eol");
--			putp(clr_eol);
-+			NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx clr_eol);
- 		    } else {
--			GoTo(lineno, nFirstChar - 1);
--			UpdateAttrs(blank);
-+			GoTo(NCURSES_SP_ARGx lineno, nFirstChar - 1);
-+			UpdateAttrs(SP_PARM, blank);
- 			TPUTS_TRACE("clr_bol");
--			putp(clr_bol);
-+			NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx clr_bol);
- 		    }
- 
- 		    while (firstChar < nFirstChar)
-@@ -1286,29 +1379,34 @@
- 	    }
- 	} else {
- 	    /* find the first differing character */
--	    while (firstChar < screen_columns
-+	    while (firstChar < screen_columns(SP_PARM)
- 		   && CharEq(newLine[firstChar], oldLine[firstChar]))
- 		firstChar++;
- 	}
- 	/* if there wasn't one, we're done */
--	if (firstChar >= screen_columns) {
-+	if (firstChar >= screen_columns(SP_PARM)) {
- 	    TR(TRACE_UPDATE, (T_RETURN("")));
- 	    return;
- 	}
- 
--	blank = newLine[screen_columns - 1];
-+	blank = newLine[screen_columns(SP_PARM) - 1];
- 
--	if (!can_clear_with(CHREF(blank))) {
-+	if (!can_clear_with(NCURSES_SP_ARGx CHREF(blank))) {
- 	    /* find the last differing character */
--	    nLastChar = screen_columns - 1;
-+	    nLastChar = screen_columns(SP_PARM) - 1;
- 
- 	    while (nLastChar > firstChar
- 		   && CharEq(newLine[nLastChar], oldLine[nLastChar]))
- 		nLastChar--;
- 
- 	    if (nLastChar >= firstChar) {
--		GoTo(lineno, firstChar);
--		PutRange(oldLine, newLine, lineno, firstChar, nLastChar);
-+		GoTo(NCURSES_SP_ARGx lineno, firstChar);
-+		PutRange(NCURSES_SP_ARGx
-+			 oldLine,
-+			 newLine,
-+			 lineno,
-+			 firstChar,
-+			 nLastChar);
- 		memcpy(oldLine + firstChar,
- 		       newLine + firstChar,
- 		       (nLastChar - firstChar + 1) * sizeof(NCURSES_CH_T));
-@@ -1318,32 +1416,44 @@
- 	}
- 
- 	/* find last non-blank character on old line */
--	oLastChar = screen_columns - 1;
-+	oLastChar = screen_columns(SP_PARM) - 1;
- 	while (oLastChar > firstChar && CharEq(oldLine[oLastChar], blank))
- 	    oLastChar--;
- 
- 	/* find last non-blank character on new line */
--	nLastChar = screen_columns - 1;
-+	nLastChar = screen_columns(SP_PARM) - 1;
- 	while (nLastChar > firstChar && CharEq(newLine[nLastChar], blank))
- 	    nLastChar--;
- 
- 	if ((nLastChar == firstChar)
--	    && (SP->_el_cost < (oLastChar - nLastChar))) {
--	    GoTo(lineno, firstChar);
-+	    && (SP_PARM->_el_cost < (oLastChar - nLastChar))) {
-+	    GoTo(NCURSES_SP_ARGx lineno, firstChar);
- 	    if (!CharEq(newLine[firstChar], blank))
--		PutChar(CHREF(newLine[firstChar]));
--	    ClrToEOL(blank, FALSE);
-+		PutChar(NCURSES_SP_ARGx CHREF(newLine[firstChar]));
-+	    ClrToEOL(NCURSES_SP_ARGx blank, FALSE);
- 	} else if ((nLastChar != oLastChar)
- 		   && (!CharEq(newLine[nLastChar], oldLine[oLastChar])
--		       || !(_nc_idcok && has_ic()))) {
--	    GoTo(lineno, firstChar);
--	    if ((oLastChar - nLastChar) > SP->_el_cost) {
--		if (PutRange(oldLine, newLine, lineno, firstChar, nLastChar))
--		    GoTo(lineno, nLastChar + 1);
--		ClrToEOL(blank, FALSE);
-+		       || !(SP_PARM->_nc_sp_idcok
-+			    && NCURSES_SP_NAME(has_ic) (NCURSES_SP_ARG)))) {
-+	    GoTo(NCURSES_SP_ARGx lineno, firstChar);
-+	    if ((oLastChar - nLastChar) > SP_PARM->_el_cost) {
-+		if (PutRange(NCURSES_SP_ARGx
-+			     oldLine,
-+			     newLine,
-+			     lineno,
-+			     firstChar,
-+			     nLastChar)) {
-+		    GoTo(NCURSES_SP_ARGx lineno, nLastChar + 1);
-+		}
-+		ClrToEOL(NCURSES_SP_ARGx blank, FALSE);
- 	    } else {
- 		n = max(nLastChar, oLastChar);
--		PutRange(oldLine, newLine, lineno, firstChar, n);
-+		PutRange(NCURSES_SP_ARGx
-+			 oldLine,
-+			 newLine,
-+			 lineno,
-+			 firstChar,
-+			 n);
- 	    }
- 	} else {
- 	    int nLastNonblank = nLastChar;
-@@ -1364,8 +1474,13 @@
- 
- 	    n = min(oLastChar, nLastChar);
- 	    if (n >= firstChar) {
--		GoTo(lineno, firstChar);
--		PutRange(oldLine, newLine, lineno, firstChar, n);
-+		GoTo(NCURSES_SP_ARGx lineno, firstChar);
-+		PutRange(NCURSES_SP_ARGx
-+			 oldLine,
-+			 newLine,
-+			 lineno,
-+			 firstChar,
-+			 n);
- 	    }
- 
- 	    if (oLastChar < nLastChar) {
-@@ -1376,21 +1491,26 @@
- 		    --oLastChar;
- 		}
- #endif
--		GoTo(lineno, n + 1);
-+		GoTo(NCURSES_SP_ARGx lineno, n + 1);
- 		if ((nLastChar < nLastNonblank)
--		    || InsCharCost(nLastChar - oLastChar) > (m - n)) {
--		    PutRange(oldLine, newLine, lineno, n + 1, m);
-+		    || InsCharCost(SP_PARM, nLastChar - oLastChar) > (m - n)) {
-+		    PutRange(NCURSES_SP_ARGx
-+			     oldLine,
-+			     newLine,
-+			     lineno,
-+			     n + 1,
-+			     m);
- 		} else {
--		    InsStr(&newLine[n + 1], nLastChar - oLastChar);
-+		    InsStr(NCURSES_SP_ARGx &newLine[n + 1], nLastChar - oLastChar);
- 		}
- 	    } else if (oLastChar > nLastChar) {
--		GoTo(lineno, n + 1);
--		if (DelCharCost(oLastChar - nLastChar)
--		    > SP->_el_cost + nLastNonblank - (n + 1)) {
--		    if (PutRange(oldLine, newLine, lineno,
-+		GoTo(NCURSES_SP_ARGx lineno, n + 1);
-+		if (DelCharCost(SP_PARM, oLastChar - nLastChar)
-+		    > SP_PARM->_el_cost + nLastNonblank - (n + 1)) {
-+		    if (PutRange(NCURSES_SP_ARGx oldLine, newLine, lineno,
- 				 n + 1, nLastNonblank))
--			GoTo(lineno, nLastNonblank + 1);
--		    ClrToEOL(blank, FALSE);
-+			  GoTo(NCURSES_SP_ARGx lineno, nLastNonblank + 1);
-+		    ClrToEOL(NCURSES_SP_ARGx blank, FALSE);
- 		} else {
- 		    /*
- 		     * The delete-char sequence will
-@@ -1400,18 +1520,18 @@
- 		     * setting the video attributes from
- 		     * the last character on the row.
- 		     */
--		    UpdateAttrs(blank);
--		    DelChar(oLastChar - nLastChar);
-+		    UpdateAttrs(SP_PARM, blank);
-+		    DelChar(NCURSES_SP_ARGx oLastChar - nLastChar);
- 		}
- 	    }
- 	}
-     }
- 
-     /* update the code's internal representation */
--    if (screen_columns > firstChar)
-+    if (screen_columns(SP_PARM) > firstChar)
- 	memcpy(oldLine + firstChar,
- 	       newLine + firstChar,
--	       (screen_columns - firstChar) * sizeof(NCURSES_CH_T));
-+	       (screen_columns(SP_PARM) - firstChar) * sizeof(NCURSES_CH_T));
-     TR(TRACE_UPDATE, (T_RETURN("")));
-     return;
- }
-@@ -1424,7 +1544,7 @@
- */
- 
- static void
--ClearScreen(NCURSES_CH_T blank)
-+ClearScreen(NCURSES_SP_DCLx NCURSES_CH_T blank)
- {
-     int i, j;
-     bool fast_clear = (clear_screen || clr_eos || clr_eol);
-@@ -1432,9 +1552,13 @@
-     TR(TRACE_UPDATE, ("ClearScreen() called"));
- 
- #if NCURSES_EXT_FUNCS
--    if (SP->_coloron
--	&& !SP->_default_color) {
--	_nc_do_color(GET_SCREEN_PAIR(SP), 0, FALSE, _nc_outch);
-+    if (SP_PARM->_coloron
-+	&& !SP_PARM->_default_color) {
-+	NCURSES_SP_NAME(_nc_do_color) (NCURSES_SP_ARGx
-+				       GET_SCREEN_PAIR(SP_PARM),
-+				       0,
-+				       FALSE,
-+				       NCURSES_SP_NAME(_nc_outch));
- 	if (!back_color_erase) {
- 	    fast_clear = FALSE;
- 	}
-@@ -1443,42 +1567,46 @@
- 
-     if (fast_clear) {
- 	if (clear_screen) {
--	    UpdateAttrs(blank);
-+	    UpdateAttrs(SP_PARM, blank);
- 	    TPUTS_TRACE("clear_screen");
--	    putp(clear_screen);
--	    SP->_cursrow = SP->_curscol = 0;
--	    position_check(SP->_cursrow, SP->_curscol, "ClearScreen");
-+	    NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx clear_screen);
-+	    SP_PARM->_cursrow = SP_PARM->_curscol = 0;
-+	    position_check(SP_PARM,
-+			   SP_PARM->_cursrow,
-+			   SP_PARM->_curscol,
-+			   "ClearScreen");
- 	} else if (clr_eos) {
--	    SP->_cursrow = SP->_curscol = -1;
--	    GoTo(0, 0);
--
--	    UpdateAttrs(blank);
-+	    SP_PARM->_cursrow = SP_PARM->_curscol = -1;
-+	    GoTo(NCURSES_SP_ARGx 0, 0);
-+	    UpdateAttrs(SP_PARM, blank);
- 	    TPUTS_TRACE("clr_eos");
--	    tputs(clr_eos, screen_lines, _nc_outch);
-+	    NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
-+				    clr_eos,
-+				    screen_lines(SP_PARM),
-+				    NCURSES_SP_NAME(_nc_outch));
- 	} else if (clr_eol) {
--	    SP->_cursrow = SP->_curscol = -1;
--
--	    UpdateAttrs(blank);
--	    for (i = 0; i < screen_lines; i++) {
--		GoTo(i, 0);
-+	    SP_PARM->_cursrow = SP_PARM->_curscol = -1;
-+	    UpdateAttrs(SP_PARM, blank);
-+	    for (i = 0; i < screen_lines(SP_PARM); i++) {
-+		GoTo(NCURSES_SP_ARGx i, 0);
- 		TPUTS_TRACE("clr_eol");
--		putp(clr_eol);
-+		NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx clr_eol);
- 	    }
--	    GoTo(0, 0);
-+	    GoTo(NCURSES_SP_ARGx 0, 0);
- 	}
-     } else {
--	UpdateAttrs(blank);
--	for (i = 0; i < screen_lines; i++) {
--	    GoTo(i, 0);
--	    for (j = 0; j < screen_columns; j++)
--		PutChar(CHREF(blank));
--	}
--	GoTo(0, 0);
-+	UpdateAttrs(SP_PARM, blank);
-+	for (i = 0; i < screen_lines(SP_PARM); i++) {
-+	    GoTo(NCURSES_SP_ARGx i, 0);
-+	    for (j = 0; j < screen_columns(SP_PARM); j++)
-+		PutChar(NCURSES_SP_ARGx CHREF(blank));
-+	}
-+	GoTo(NCURSES_SP_ARGx 0, 0);
-     }
- 
--    for (i = 0; i < screen_lines; i++) {
--	for (j = 0; j < screen_columns; j++)
--	    curscr->_line[i].text[j] = blank;
-+    for (i = 0; i < screen_lines(SP_PARM); i++) {
-+	for (j = 0; j < screen_columns(SP_PARM); j++)
-+	    CurScreen(SP_PARM)->_line[i].text[j] = blank;
-     }
- 
-     TR(TRACE_UPDATE, ("screen cleared"));
-@@ -1492,49 +1620,52 @@
- */
- 
- static void
--InsStr(NCURSES_CH_T * line, int count)
-+InsStr(NCURSES_SP_DCLx NCURSES_CH_T * line, int count)
- {
--    TR(TRACE_UPDATE, ("InsStr(%p,%d) called", line, count));
-+    TR(TRACE_UPDATE, ("InsStr(%p, %p,%d) called", SP_PARM, line, count));
- 
-     /* Prefer parm_ich as it has the smallest cost - no need to shift
-      * the whole line on each character. */
-     /* The order must match that of InsCharCost. */
-     if (parm_ich) {
- 	TPUTS_TRACE("parm_ich");
--	tputs(TPARM_1(parm_ich, count), count, _nc_outch);
-+	NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
-+				TPARM_1(parm_ich, count),
-+				count,
-+				NCURSES_SP_NAME(_nc_outch));
- 	while (count) {
--	    PutAttrChar(CHREF(*line));
-+	    PutAttrChar(NCURSES_SP_ARGx CHREF(*line));
- 	    line++;
- 	    count--;
- 	}
-     } else if (enter_insert_mode && exit_insert_mode) {
- 	TPUTS_TRACE("enter_insert_mode");
--	putp(enter_insert_mode);
-+	NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx enter_insert_mode);
- 	while (count) {
--	    PutAttrChar(CHREF(*line));
-+	    PutAttrChar(NCURSES_SP_ARGx CHREF(*line));
- 	    if (insert_padding) {
- 		TPUTS_TRACE("insert_padding");
--		putp(insert_padding);
-+		NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx insert_padding);
- 	    }
- 	    line++;
- 	    count--;
- 	}
- 	TPUTS_TRACE("exit_insert_mode");
--	putp(exit_insert_mode);
-+	NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx exit_insert_mode);
-     } else {
- 	while (count) {
- 	    TPUTS_TRACE("insert_character");
--	    putp(insert_character);
--	    PutAttrChar(CHREF(*line));
-+	    NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx insert_character);
-+	    PutAttrChar(NCURSES_SP_ARGx CHREF(*line));
- 	    if (insert_padding) {
- 		TPUTS_TRACE("insert_padding");
--		putp(insert_padding);
-+		NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx insert_padding);
- 	    }
- 	    line++;
- 	    count--;
- 	}
-     }
--    position_check(SP->_cursrow, SP->_curscol, "InsStr");
-+    position_check(SP_PARM, SP_PARM->_cursrow, SP_PARM->_curscol, "InsStr");
- }
- 
- /*
-@@ -1545,22 +1676,25 @@
- */
- 
- static void
--DelChar(int count)
-+DelChar(NCURSES_SP_DCLx int count)
- {
-     int n;
- 
--    TR(TRACE_UPDATE, ("DelChar(%d) called, position = (%ld,%ld)",
--		      count,
--		      (long) newscr->_cury,
--		      (long) newscr->_curx));
-+    TR(TRACE_UPDATE, ("DelChar(%p, %d) called, position = (%ld,%ld)",
-+		      SP_PARM, count,
-+		      (long) NewScreen(SP_PARM)->_cury,
-+		      (long) NewScreen(SP_PARM)->_curx));
- 
-     if (parm_dch) {
- 	TPUTS_TRACE("parm_dch");
--	tputs(TPARM_1(parm_dch, count), count, _nc_outch);
-+	NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
-+				TPARM_1(parm_dch, count),
-+				count,
-+				NCURSES_SP_NAME(_nc_outch));
-     } else {
- 	for (n = 0; n < count; n++) {
- 	    TPUTS_TRACE("delete_character");
--	    putp(delete_character);
-+	    NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx delete_character);
- 	}
-     }
- }
-@@ -1599,54 +1733,66 @@
- 
- /* Try to scroll up assuming given csr (miny, maxy). Returns ERR on failure */
- static int
--scroll_csr_forward(int n, int top, int bot, int miny, int maxy, NCURSES_CH_T blank)
-+scroll_csr_forward(NCURSES_SP_DCLx
-+		   int n,
-+		   int top,
-+		   int bot,
-+		   int miny,
-+		   int maxy,
-+		   NCURSES_CH_T blank)
- {
-     int i;
- 
-     if (n == 1 && scroll_forward && top == miny && bot == maxy) {
--	GoTo(bot, 0);
--	UpdateAttrs(blank);
-+	GoTo(NCURSES_SP_ARGx bot, 0);
-+	UpdateAttrs(SP_PARM, blank);
- 	TPUTS_TRACE("scroll_forward");
--	putp(scroll_forward);
-+	NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx scroll_forward);
-     } else if (n == 1 && delete_line && bot == maxy) {
--	GoTo(top, 0);
--	UpdateAttrs(blank);
-+	GoTo(NCURSES_SP_ARGx top, 0);
-+	UpdateAttrs(SP_PARM, blank);
- 	TPUTS_TRACE("delete_line");
--	putp(delete_line);
-+	NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx delete_line);
-     } else if (parm_index && top == miny && bot == maxy) {
--	GoTo(bot, 0);
--	UpdateAttrs(blank);
-+	GoTo(NCURSES_SP_ARGx bot, 0);
-+	UpdateAttrs(SP_PARM, blank);
- 	TPUTS_TRACE("parm_index");
--	tputs(TPARM_2(parm_index, n, 0), n, _nc_outch);
-+	NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
-+				TPARM_2(parm_index, n, 0),
-+				n,
-+				NCURSES_SP_NAME(_nc_outch));
-     } else if (parm_delete_line && bot == maxy) {
--	GoTo(top, 0);
--	UpdateAttrs(blank);
-+	GoTo(NCURSES_SP_ARGx top, 0);
-+	UpdateAttrs(SP_PARM, blank);
- 	TPUTS_TRACE("parm_delete_line");
--	tputs(TPARM_2(parm_delete_line, n, 0), n, _nc_outch);
-+	NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
-+				TPARM_2(parm_delete_line, n, 0),
-+				n,
-+				NCURSES_SP_NAME(_nc_outch));
-     } else if (scroll_forward && top == miny && bot == maxy) {
--	GoTo(bot, 0);
--	UpdateAttrs(blank);
-+	GoTo(NCURSES_SP_ARGx bot, 0);
-+	UpdateAttrs(SP_PARM, blank);
- 	for (i = 0; i < n; i++) {
- 	    TPUTS_TRACE("scroll_forward");
--	    putp(scroll_forward);
-+	    NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx scroll_forward);
- 	}
-     } else if (delete_line && bot == maxy) {
--	GoTo(top, 0);
--	UpdateAttrs(blank);
-+	GoTo(NCURSES_SP_ARGx top, 0);
-+	UpdateAttrs(SP_PARM, blank);
- 	for (i = 0; i < n; i++) {
- 	    TPUTS_TRACE("delete_line");
--	    putp(delete_line);
-+	    NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx delete_line);
- 	}
-     } else
- 	return ERR;
- 
- #if NCURSES_EXT_FUNCS
--    if (FILL_BCE()) {
-+    if (FILL_BCE(SP_PARM)) {
- 	int j;
- 	for (i = 0; i < n; i++) {
--	    GoTo(bot - i, 0);
--	    for (j = 0; j < screen_columns; j++)
--		PutChar(CHREF(blank));
-+	    GoTo(NCURSES_SP_ARGx bot - i, 0);
-+	    for (j = 0; j < screen_columns(SP_PARM); j++)
-+		PutChar(NCURSES_SP_ARGx CHREF(blank));
- 	}
-     }
- #endif
-@@ -1656,55 +1802,66 @@
- /* Try to scroll down assuming given csr (miny, maxy). Returns ERR on failure */
- /* n > 0 */
- static int
--scroll_csr_backward(int n, int top, int bot, int miny, int maxy,
-+scroll_csr_backward(NCURSES_SP_DCLx
-+		    int n,
-+		    int top,
-+		    int bot,
-+		    int miny,
-+		    int maxy,
- 		    NCURSES_CH_T blank)
- {
-     int i;
- 
-     if (n == 1 && scroll_reverse && top == miny && bot == maxy) {
--	GoTo(top, 0);
--	UpdateAttrs(blank);
-+	GoTo(NCURSES_SP_ARGx top, 0);
-+	UpdateAttrs(SP_PARM, blank);
- 	TPUTS_TRACE("scroll_reverse");
--	putp(scroll_reverse);
-+	NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx scroll_reverse);
-     } else if (n == 1 && insert_line && bot == maxy) {
--	GoTo(top, 0);
--	UpdateAttrs(blank);
-+	GoTo(NCURSES_SP_ARGx top, 0);
-+	UpdateAttrs(SP_PARM, blank);
- 	TPUTS_TRACE("insert_line");
--	putp(insert_line);
-+	NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx insert_line);
-     } else if (parm_rindex && top == miny && bot == maxy) {
--	GoTo(top, 0);
--	UpdateAttrs(blank);
-+	GoTo(NCURSES_SP_ARGx top, 0);
-+	UpdateAttrs(SP_PARM, blank);
- 	TPUTS_TRACE("parm_rindex");
--	tputs(TPARM_2(parm_rindex, n, 0), n, _nc_outch);
-+	NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
-+				TPARM_2(parm_rindex, n, 0),
-+				n,
-+				NCURSES_SP_NAME(_nc_outch));
-     } else if (parm_insert_line && bot == maxy) {
--	GoTo(top, 0);
--	UpdateAttrs(blank);
-+	GoTo(NCURSES_SP_ARGx top, 0);
-+	UpdateAttrs(SP_PARM, blank);
- 	TPUTS_TRACE("parm_insert_line");
--	tputs(TPARM_2(parm_insert_line, n, 0), n, _nc_outch);
-+	NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
-+				TPARM_2(parm_insert_line, n, 0),
-+				n,
-+				NCURSES_SP_NAME(_nc_outch));
-     } else if (scroll_reverse && top == miny && bot == maxy) {
--	GoTo(top, 0);
--	UpdateAttrs(blank);
-+	GoTo(NCURSES_SP_ARGx top, 0);
-+	UpdateAttrs(SP_PARM, blank);
- 	for (i = 0; i < n; i++) {
- 	    TPUTS_TRACE("scroll_reverse");
--	    putp(scroll_reverse);
-+	    NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx scroll_reverse);
- 	}
-     } else if (insert_line && bot == maxy) {
--	GoTo(top, 0);
--	UpdateAttrs(blank);
-+	GoTo(NCURSES_SP_ARGx top, 0);
-+	UpdateAttrs(SP_PARM, blank);
- 	for (i = 0; i < n; i++) {
- 	    TPUTS_TRACE("insert_line");
--	    putp(insert_line);
-+	    NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx insert_line);
- 	}
-     } else
- 	return ERR;
- 
- #if NCURSES_EXT_FUNCS
--    if (FILL_BCE()) {
-+    if (FILL_BCE(SP_PARM)) {
- 	int j;
- 	for (i = 0; i < n; i++) {
--	    GoTo(top + i, 0);
--	    for (j = 0; j < screen_columns; j++)
--		PutChar(CHREF(blank));
-+	    GoTo(NCURSES_SP_ARGx top + i, 0);
-+	    for (j = 0; j < screen_columns(SP_PARM); j++)
-+		PutChar(NCURSES_SP_ARGx CHREF(blank));
- 	}
-     }
- #endif
-@@ -1714,40 +1871,46 @@
- /* scroll by using delete_line at del and insert_line at ins */
- /* n > 0 */
- static int
--scroll_idl(int n, int del, int ins, NCURSES_CH_T blank)
-+scroll_idl(NCURSES_SP_DCLx int n, int del, int ins, NCURSES_CH_T blank)
- {
-     int i;
- 
-     if (!((parm_delete_line || delete_line) && (parm_insert_line || insert_line)))
- 	return ERR;
- 
--    GoTo(del, 0);
--    UpdateAttrs(blank);
-+    GoTo(NCURSES_SP_ARGx del, 0);
-+    UpdateAttrs(SP_PARM, blank);
-     if (n == 1 && delete_line) {
- 	TPUTS_TRACE("delete_line");
--	putp(delete_line);
-+	NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx delete_line);
-     } else if (parm_delete_line) {
- 	TPUTS_TRACE("parm_delete_line");
--	tputs(TPARM_2(parm_delete_line, n, 0), n, _nc_outch);
-+	NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
-+				TPARM_2(parm_delete_line, n, 0),
-+				n,
-+				NCURSES_SP_NAME(_nc_outch));
-     } else {			/* if (delete_line) */
- 	for (i = 0; i < n; i++) {
- 	    TPUTS_TRACE("delete_line");
--	    putp(delete_line);
-+	    NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx delete_line);
- 	}
-     }
- 
--    GoTo(ins, 0);
--    UpdateAttrs(blank);
-+    GoTo(NCURSES_SP_ARGx ins, 0);
-+    UpdateAttrs(SP_PARM, blank);
-     if (n == 1 && insert_line) {
- 	TPUTS_TRACE("insert_line");
--	putp(insert_line);
-+	NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx insert_line);
-     } else if (parm_insert_line) {
- 	TPUTS_TRACE("parm_insert_line");
--	tputs(TPARM_2(parm_insert_line, n, 0), n, _nc_outch);
-+	NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
-+				TPARM_2(parm_insert_line, n, 0),
-+				n,
-+				NCURSES_SP_NAME(_nc_outch));
-     } else {			/* if (insert_line) */
- 	for (i = 0; i < n; i++) {
- 	    TPUTS_TRACE("insert_line");
--	    putp(insert_line);
-+	    NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx insert_line);
- 	}
-     }
- 
-@@ -1763,15 +1926,24 @@
-  * save/restore cursor capabilities if the terminal has them.
-  */
- NCURSES_EXPORT(int)
--_nc_scrolln(int n, int top, int bot, int maxy)
-+NCURSES_SP_NAME(_nc_scrolln) (NCURSES_SP_DCLx
-+			      int n,
-+			      int top,
-+			      int bot,
-+			      int maxy)
- /* scroll region from top to bot by n lines */
- {
--    NCURSES_CH_T blank = ClrBlank(stdscr);
-+    NCURSES_CH_T blank;
-     int i;
-     bool cursor_saved = FALSE;
-     int res;
- 
--    TR(TRACE_MOVE, ("mvcur_scrolln(%d, %d, %d, %d)", n, top, bot, maxy));
-+    TR(TRACE_MOVE, ("_nc_scrolln(%p, %d, %d, %d, %d)", SP_PARM, n, top, bot, maxy));
-+
-+    if (!IsValidScreen(SP_PARM))
-+	return (ERR);
-+
-+    blank = ClrBlank(NCURSES_SP_ARGx StdScreen(SP_PARM));
- 
- #if USE_XMC_SUPPORT
-     /*
-@@ -1787,34 +1959,36 @@
- 	 * Explicitly clear if stuff pushed off top of region might
- 	 * be saved by the terminal.
- 	 */
--	res = scroll_csr_forward(n, top, bot, 0, maxy, blank);
-+	res = scroll_csr_forward(NCURSES_SP_ARGx n, top, bot, 0, maxy, blank);
- 
- 	if (res == ERR && change_scroll_region) {
- 	    if ((((n == 1 && scroll_forward) || parm_index)
--		 && (SP->_cursrow == bot || SP->_cursrow == bot - 1))
-+		 && (SP_PARM->_cursrow == bot || SP_PARM->_cursrow == bot - 1))
- 		&& save_cursor && restore_cursor) {
- 		cursor_saved = TRUE;
- 		TPUTS_TRACE("save_cursor");
--		putp(save_cursor);
-+		NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx save_cursor);
- 	    }
- 	    TPUTS_TRACE("change_scroll_region");
--	    putp(TPARM_2(change_scroll_region, top, bot));
-+	    NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx
-+				   TPARM_2(change_scroll_region, top, bot));
- 	    if (cursor_saved) {
- 		TPUTS_TRACE("restore_cursor");
--		putp(restore_cursor);
-+		NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx restore_cursor);
- 	    } else {
--		SP->_cursrow = SP->_curscol = -1;
-+		SP_PARM->_cursrow = SP_PARM->_curscol = -1;
- 	    }
- 
--	    res = scroll_csr_forward(n, top, bot, top, bot, blank);
-+	    res = scroll_csr_forward(NCURSES_SP_ARGx n, top, bot, top, bot, blank);
- 
- 	    TPUTS_TRACE("change_scroll_region");
--	    putp(TPARM_2(change_scroll_region, 0, maxy));
--	    SP->_cursrow = SP->_curscol = -1;
-+	    NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx
-+				   TPARM_2(change_scroll_region, 0, maxy));
-+	    SP_PARM->_cursrow = SP_PARM->_curscol = -1;
- 	}
- 
--	if (res == ERR && _nc_idlok)
--	    res = scroll_idl(n, top, bot - n + 1, blank);
-+	if (res == ERR && SP_PARM->_nc_sp_idlok)
-+	    res = scroll_idl(NCURSES_SP_ARGx n, top, bot - n + 1, blank);
- 
- 	/*
- 	 * Clear the newly shifted-in text.
-@@ -1823,44 +1997,49 @@
- 	    && (non_dest_scroll_region || (memory_below && bot == maxy))) {
- 	    static const NCURSES_CH_T blank2 = NewChar(BLANK_TEXT);
- 	    if (bot == maxy && clr_eos) {
--		GoTo(bot - n + 1, 0);
--		ClrToEOS(blank2);
-+		GoTo(NCURSES_SP_ARGx bot - n + 1, 0);
-+		ClrToEOS(NCURSES_SP_ARGx blank2);
- 	    } else {
- 		for (i = 0; i < n; i++) {
--		    GoTo(bot - i, 0);
--		    ClrToEOL(blank2, FALSE);
-+		    GoTo(NCURSES_SP_ARGx bot - i, 0);
-+		    ClrToEOL(NCURSES_SP_ARGx blank2, FALSE);
- 		}
- 	    }
- 	}
- 
-     } else {			/* (n < 0) - scroll down (backward) */
--	res = scroll_csr_backward(-n, top, bot, 0, maxy, blank);
-+	res = scroll_csr_backward(NCURSES_SP_ARGx -n, top, bot, 0, maxy, blank);
- 
- 	if (res == ERR && change_scroll_region) {
--	    if (top != 0 && (SP->_cursrow == top || SP->_cursrow == top - 1)
-+	    if (top != 0
-+		&& (SP_PARM->_cursrow == top ||
-+		    SP_PARM->_cursrow == top - 1)
- 		&& save_cursor && restore_cursor) {
- 		cursor_saved = TRUE;
- 		TPUTS_TRACE("save_cursor");
--		putp(save_cursor);
-+		NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx save_cursor);
- 	    }
- 	    TPUTS_TRACE("change_scroll_region");
--	    putp(TPARM_2(change_scroll_region, top, bot));
-+	    NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx
-+				   TPARM_2(change_scroll_region, top, bot));
- 	    if (cursor_saved) {
- 		TPUTS_TRACE("restore_cursor");
--		putp(restore_cursor);
-+		NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx restore_cursor);
- 	    } else {
--		SP->_cursrow = SP->_curscol = -1;
-+		SP_PARM->_cursrow = SP_PARM->_curscol = -1;
- 	    }
- 
--	    res = scroll_csr_backward(-n, top, bot, top, bot, blank);
-+	    res = scroll_csr_backward(NCURSES_SP_ARGx
-+				      -n, top, bot, top, bot, blank);
- 
- 	    TPUTS_TRACE("change_scroll_region");
--	    putp(TPARM_2(change_scroll_region, 0, maxy));
--	    SP->_cursrow = SP->_curscol = -1;
-+	    NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx
-+				   TPARM_2(change_scroll_region, 0, maxy));
-+	    SP_PARM->_cursrow = SP_PARM->_curscol = -1;
- 	}
- 
--	if (res == ERR && _nc_idlok)
--	    res = scroll_idl(-n, bot + n + 1, top, blank);
-+	if (res == ERR && SP_PARM->_nc_sp_idlok)
-+	    res = scroll_idl(NCURSES_SP_ARGx -n, bot + n + 1, top, blank);
- 
- 	/*
- 	 * Clear the newly shifted-in text.
-@@ -1869,8 +2048,8 @@
- 	    && (non_dest_scroll_region || (memory_above && top == 0))) {
- 	    static const NCURSES_CH_T blank2 = NewChar(BLANK_TEXT);
- 	    for (i = 0; i < -n; i++) {
--		GoTo(i + top, 0);
--		ClrToEOL(blank2, FALSE);
-+		GoTo(NCURSES_SP_ARGx i + top, 0);
-+		ClrToEOL(NCURSES_SP_ARGx blank2, FALSE);
- 	    }
- 	}
-     }
-@@ -1878,99 +2057,159 @@
-     if (res == ERR)
- 	return (ERR);
- 
--    _nc_scroll_window(curscr, n, top, bot, blank);
-+    _nc_scroll_window(CurScreen(SP_PARM), n, top, bot, blank);
- 
-     /* shift hash values too - they can be reused */
--    _nc_scroll_oldhash(n, top, bot);
-+    NCURSES_SP_NAME(_nc_scroll_oldhash) (NCURSES_SP_ARGx n, top, bot);
- 
-     return (OK);
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+_nc_scrolln(int n, int top, int bot, int maxy)
-+{
-+    return NCURSES_SP_NAME(_nc_scrolln) (CURRENT_SCREEN, n, top, bot, maxy);
-+}
-+#endif
-+
- NCURSES_EXPORT(void)
--_nc_screen_resume(void)
-+NCURSES_SP_NAME(_nc_screen_resume) (NCURSES_SP_DCL0)
- {
-+    assert(SP_PARM);
-+
-     /* make sure terminal is in a sane known state */
--    SetAttr(SCREEN_ATTRS(SP), A_NORMAL);
--    newscr->_clear = TRUE;
-+    SetAttr(SCREEN_ATTRS(SP_PARM), A_NORMAL);
-+    NewScreen(SP_PARM)->_clear = TRUE;
- 
-     /* reset color pairs and definitions */
--    if (SP->_coloron || SP->_color_defs)
--	_nc_reset_colors();
-+    if (SP_PARM->_coloron || SP_PARM->_color_defs)
-+	NCURSES_SP_NAME(_nc_reset_colors) (NCURSES_SP_ARG);
- 
-     /* restore user-defined colors, if any */
--    if (SP->_color_defs < 0) {
-+    if (SP_PARM->_color_defs < 0) {
- 	int n;
--	SP->_color_defs = -(SP->_color_defs);
--	for (n = 0; n < SP->_color_defs; ++n) {
--	    if (SP->_color_table[n].init) {
--		init_color(n,
--			   SP->_color_table[n].r,
--			   SP->_color_table[n].g,
--			   SP->_color_table[n].b);
-+	SP_PARM->_color_defs = -(SP_PARM->_color_defs);
-+	for (n = 0; n < SP_PARM->_color_defs; ++n) {
-+	    if (SP_PARM->_color_table[n].init) {
-+		NCURSES_SP_NAME(init_color) (NCURSES_SP_ARGx n,
-+					     SP_PARM->_color_table[n].r,
-+					     SP_PARM->_color_table[n].g,
-+					     SP_PARM->_color_table[n].b);
- 	    }
- 	}
-     }
- 
-     if (exit_attribute_mode)
--	putp(exit_attribute_mode);
-+	NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx exit_attribute_mode);
-     else {
- 	/* turn off attributes */
- 	if (exit_alt_charset_mode)
--	    putp(exit_alt_charset_mode);
-+	    NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx exit_alt_charset_mode);
- 	if (exit_standout_mode)
--	    putp(exit_standout_mode);
-+	    NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx exit_standout_mode);
- 	if (exit_underline_mode)
--	    putp(exit_underline_mode);
-+	    NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx exit_underline_mode);
-     }
-     if (exit_insert_mode)
--	putp(exit_insert_mode);
-+	NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx exit_insert_mode);
-     if (enter_am_mode && exit_am_mode)
--	putp(auto_right_margin ? enter_am_mode : exit_am_mode);
-+	NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx
-+			       (auto_right_margin
-+				? enter_am_mode
-+				: exit_am_mode));
-+}
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(void)
-+_nc_screen_resume(void)
-+{
-+    NCURSES_SP_NAME(_nc_screen_resume) (CURRENT_SCREEN);
- }
-+#endif
- 
- NCURSES_EXPORT(void)
-+NCURSES_SP_NAME(_nc_screen_init) (NCURSES_SP_DCL0)
-+{
-+    NCURSES_SP_NAME(_nc_screen_resume) (NCURSES_SP_ARG);
-+}
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(void)
- _nc_screen_init(void)
- {
--    _nc_screen_resume();
-+    NCURSES_SP_NAME(_nc_screen_init) (CURRENT_SCREEN);
- }
-+#endif
- 
- /* wrap up screen handling */
- NCURSES_EXPORT(void)
--_nc_screen_wrap(void)
-+NCURSES_SP_NAME(_nc_screen_wrap) (NCURSES_SP_DCL0)
- {
--    UpdateAttrs(normal);
-+    if (SP_PARM == 0)
-+	return;
-+
-+    UpdateAttrs(SP_PARM, normal);
- #if NCURSES_EXT_FUNCS
--    if (SP->_coloron
--	&& !SP->_default_color) {
-+    if (SP_PARM->_coloron
-+	&& !SP_PARM->_default_color) {
- 	static const NCURSES_CH_T blank = NewChar(BLANK_TEXT);
--	SP->_default_color = TRUE;
--	_nc_do_color(-1, 0, FALSE, _nc_outch);
--	SP->_default_color = FALSE;
-+	SP_PARM->_default_color = TRUE;
-+	NCURSES_SP_NAME(_nc_do_color) (NCURSES_SP_ARGx
-+				       -1,
-+				       0,
-+				       FALSE,
-+				       NCURSES_SP_NAME(_nc_outch));
-+	SP_PARM->_default_color = FALSE;
- 
--	mvcur(SP->_cursrow, SP->_curscol, screen_lines - 1, 0);
-+	NCURSES_SP_NAME(mvcur) (NCURSES_SP_ARGx
-+				SP_PARM->_cursrow,
-+				SP_PARM->_curscol,
-+				screen_lines(SP_PARM) - 1,
-+				0);
- 
--	ClrToEOL(blank, TRUE);
-+	ClrToEOL(NCURSES_SP_ARGx blank, TRUE);
-     }
- #endif
--    if (SP->_color_defs) {
--	_nc_reset_colors();
-+    if (SP_PARM->_color_defs) {
-+	NCURSES_SP_NAME(_nc_reset_colors) (NCURSES_SP_ARG);
-     }
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(void)
-+_nc_screen_wrap(void)
-+{
-+    NCURSES_SP_NAME(_nc_screen_wrap) (CURRENT_SCREEN);
-+}
-+#endif
-+
- #if USE_XMC_SUPPORT
- NCURSES_EXPORT(void)
--_nc_do_xmc_glitch(attr_t previous)
-+NCURSES_SP_NAME(_nc_do_xmc_glitch) (NCURSES_SP_DCLx attr_t previous)
- {
--    attr_t chg = XMC_CHANGES(previous ^ AttrOf(SCREEN_ATTRS(SP)));
-+    if (SP_PARM != 0) {
-+	attr_t chg = XMC_CHANGES(previous ^ AttrOf(SCREEN_ATTRS(SP_PARM)));
- 
--    while (chg != 0) {
--	if (chg & 1) {
--	    SP->_curscol += magic_cookie_glitch;
--	    if (SP->_curscol >= SP->_columns)
--		wrap_cursor();
--	    TR(TRACE_UPDATE, ("bumped to %d,%d after cookie", SP->_cursrow, SP->_curscol));
-+	while (chg != 0) {
-+	    if (chg & 1) {
-+		SP_PARM->_curscol += magic_cookie_glitch;
-+		if (SP_PARM->_curscol >= SP_PARM->_columns)
-+		    wrap_cursor(NCURSES_SP_ARG);
-+		TR(TRACE_UPDATE, ("bumped to %d,%d after cookie",
-+				  SP_PARM->_cursrow, SP_PARM->_curscol));
-+	    }
-+	    chg >>= 1;
- 	}
--	chg >>= 1;
-     }
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(void)
-+_nc_do_xmc_glitch(attr_t previous)
-+{
-+    NCURSES_SP_NAME(_nc_do_xmc_glitch) (CURRENT_SCREEN, previous);
-+}
-+#endif
-+
- #endif /* USE_XMC_SUPPORT */
-diff -Naur ncurses-5.7.orig/ncurses/widechar/lib_add_wch.c ncurses-5.7/ncurses/widechar/lib_add_wch.c
---- ncurses-5.7.orig/ncurses/widechar/lib_add_wch.c	2006-12-02 13:19:17.000000000 -0800
-+++ ncurses-5.7/ncurses/widechar/lib_add_wch.c	2009-07-19 15:04:13.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 2004,2006 Free Software Foundation, Inc.                   *
-+ * Copyright (c) 2004-2006,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -35,39 +35,389 @@
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_add_wch.c,v 1.6 2006/12/02 21:19:17 tom Exp $")
-+#if HAVE_WCTYPE_H
-+#include <wctype.h>
-+#endif
- 
--NCURSES_EXPORT(int)
--wadd_wch(WINDOW *win, const cchar_t *wch)
-+MODULE_ID("$Id: lib_add_wch.c,v 1.7 2009/07/04 21:59:25 tom Exp $")
-+
-+/* clone/adapt lib_addch.c */
-+static const cchar_t blankchar = NewChar(BLANK_TEXT);
-+
-+/*
-+ * Ugly microtweaking alert.  Everything from here to end of module is
-+ * likely to be speed-critical -- profiling data sure says it is!
-+ * Most of the important screen-painting functions are shells around
-+ * wadd_wch().  So we make every effort to reduce function-call overhead
-+ * by inlining stuff, even at the cost of making wrapped copies for
-+ * export.  Also we supply some internal versions that don't call the
-+ * window sync hook, for use by string-put functions.
-+ */
-+
-+/* Return bit mask for clearing color pair number if given ch has color */
-+#define COLOR_MASK(ch) (~(attr_t)((ch) & A_COLOR ? A_COLOR : 0))
-+
-+static NCURSES_INLINE cchar_t
-+render_char(WINDOW *win, cchar_t ch)
-+/* compute a rendition of the given char correct for the current context */
- {
--    PUTC_DATA;
--    int n;
--    int code = ERR;
-+    attr_t a = WINDOW_ATTRS(win);
-+    int pair = GetPair(ch);
- 
--    TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("wadd_wch(%p, %s)"), win,
--				      _tracech_t(wch)));
-+    if (ISBLANK(ch)
-+	&& AttrOf(ch) == A_NORMAL
-+	&& pair == 0) {
-+	/* color/pair in attrs has precedence over bkgrnd */
-+	ch = win->_nc_bkgd;
-+	SetAttr(ch, a | AttrOf(win->_nc_bkgd));
-+	if ((pair = GET_WINDOW_PAIR(win)) == 0)
-+	    pair = GetPair(win->_nc_bkgd);
-+	SetPair(ch, pair);
-+    } else {
-+	/* color in attrs has precedence over bkgrnd */
-+	a |= AttrOf(win->_nc_bkgd) & COLOR_MASK(a);
-+	/* color in ch has precedence */
-+	if (pair == 0) {
-+	    if ((pair = GET_WINDOW_PAIR(win)) == 0)
-+		pair = GetPair(win->_nc_bkgd);
-+	}
-+#if 0
-+	if (pair > 255) {
-+	    cchar_t fixme = ch;
-+	    SetPair(fixme, pair);
-+	}
-+#endif
-+	AddAttr(ch, (a & COLOR_MASK(AttrOf(ch))));
-+	SetPair(ch, pair);
-+    }
-+
-+    TR(TRACE_VIRTPUT,
-+       ("render_char bkg %s (%d), attrs %s (%d) -> ch %s (%d)",
-+	_tracech_t2(1, CHREF(win->_nc_bkgd)),
-+	GetPair(win->_nc_bkgd),
-+	_traceattr(WINDOW_ATTRS(win)),
-+	GET_WINDOW_PAIR(win),
-+	_tracech_t2(3, CHREF(ch)),
-+	GetPair(ch)));
- 
--    if (win != 0) {
--	PUTC_INIT;
--	for (PUTC_i = 0; PUTC_i < CCHARW_MAX; ++PUTC_i) {
--	    attr_t attrs = (wch->attr & A_ATTRIBUTES);
--
--	    if ((PUTC_ch = wch->chars[PUTC_i]) == L'\0')
--		break;
--	    if ((PUTC_n = wcrtomb(PUTC_buf, PUTC_ch, &PUT_st)) <= 0) {
--		code = ERR;
--		if (is8bits(PUTC_ch))
--		    code = waddch(win, UChar(PUTC_ch) | attrs);
--		break;
-+    return (ch);
-+}
-+
-+/* check if position is legal; if not, return error */
-+#ifndef NDEBUG			/* treat this like an assertion */
-+#define CHECK_POSITION(win, x, y) \
-+	if (y > win->_maxy \
-+	 || x > win->_maxx \
-+	 || y < 0 \
-+	 || x < 0) { \
-+		TR(TRACE_VIRTPUT, ("Alert! Win=%p _curx = %d, _cury = %d " \
-+				   "(_maxx = %d, _maxy = %d)", win, x, y, \
-+				   win->_maxx, win->_maxy)); \
-+		return(ERR); \
-+	}
-+#else
-+#define CHECK_POSITION(win, x, y)	/* nothing */
-+#endif
-+
-+static bool
-+newline_forces_scroll(WINDOW *win, NCURSES_SIZE_T * ypos)
-+{
-+    bool result = FALSE;
-+
-+    if (*ypos >= win->_regtop && *ypos == win->_regbottom) {
-+	*ypos = win->_regbottom;
-+	result = TRUE;
-+    } else {
-+	*ypos += 1;
-+    }
-+    return result;
-+}
-+
-+/*
-+ * The _WRAPPED flag is useful only for telling an application that we've just
-+ * wrapped the cursor.  We don't do anything with this flag except set it when
-+ * wrapping, and clear it whenever we move the cursor.  If we try to wrap at
-+ * the lower-right corner of a window, we cannot move the cursor (since that
-+ * wouldn't be legal).  So we return an error (which is what SVr4 does). 
-+ * Unlike SVr4, we can successfully add a character to the lower-right corner
-+ * (Solaris 2.6 does this also, however).
-+ */
-+static int
-+wrap_to_next_line(WINDOW *win)
-+{
-+    win->_flags |= _WRAPPED;
-+    if (newline_forces_scroll(win, &(win->_cury))) {
-+	win->_curx = win->_maxx;
-+	if (!win->_scroll)
-+	    return (ERR);
-+	scroll(win);
-+    }
-+    win->_curx = 0;
-+    return (OK);
-+}
-+
-+static int wadd_wch_literal(WINDOW *, cchar_t);
-+/*
-+ * Fill the given number of cells with blanks using the current background
-+ * rendition.  This saves/restores the current x-position.
-+ */
-+static void
-+fill_cells(WINDOW *win, int count)
-+{
-+    cchar_t blank = blankchar;
-+    int save_x = win->_curx;
-+    int save_y = win->_cury;
-+
-+    while (count-- > 0) {
-+	if (wadd_wch_literal(win, blank) == ERR)
-+	    break;
-+    }
-+    win->_curx = save_x;
-+    win->_cury = save_y;
-+}
-+
-+static int
-+wadd_wch_literal(WINDOW *win, cchar_t ch)
-+{
-+    int x;
-+    int y;
-+    struct ldat *line;
-+
-+    x = win->_curx;
-+    y = win->_cury;
-+
-+    CHECK_POSITION(win, x, y);
-+
-+    ch = render_char(win, ch);
-+
-+    line = win->_line + y;
-+
-+    CHANGED_CELL(line, x);
-+
-+    /*
-+     * Non-spacing characters are added to the current cell.
-+     *
-+     * Spacing characters that are wider than one column require some display
-+     * adjustments.
-+     */
-+    {
-+	int len = wcwidth(CharOf(ch));
-+	int i;
-+	int j;
-+	wchar_t *chars;
-+
-+	if (len == 0) {		/* non-spacing */
-+	    if ((x > 0 && y >= 0)
-+		|| (win->_maxx >= 0 && win->_cury >= 1)) {
-+		if (x > 0 && y >= 0)
-+		    chars = (win->_line[y].text[x - 1].chars);
-+		else
-+		    chars = (win->_line[y - 1].text[win->_maxx].chars);
-+		for (i = 0; i < CCHARW_MAX; ++i) {
-+		    if (chars[i] == 0) {
-+			TR(TRACE_VIRTPUT,
-+			   ("added non-spacing %d: %x",
-+			    x, (int) CharOf(ch)));
-+			chars[i] = CharOf(ch);
-+			break;
-+		    }
-+		}
-+	    }
-+	    goto testwrapping;
-+	} else if (len > 1) {	/* multi-column characters */
-+	    /*
-+	     * Check if the character will fit on the current line.  If it does
-+	     * not fit, fill in the remainder of the line with blanks.  and
-+	     * move to the next line.
-+	     */
-+	    if (len > win->_maxx + 1) {
-+		TR(TRACE_VIRTPUT, ("character will not fit"));
-+		return ERR;
-+	    } else if (x + len > win->_maxx + 1) {
-+		int count = win->_maxx + 1 - x;
-+		TR(TRACE_VIRTPUT, ("fill %d remaining cells", count));
-+		fill_cells(win, count);
-+		if (wrap_to_next_line(win) == ERR)
-+		    return ERR;
-+		x = win->_curx;
-+		y = win->_cury;
-+		line = win->_line + y;
- 	    }
--	    for (n = 0; n < PUTC_n; n++) {
--		if ((code = waddch(win, UChar(PUTC_buf[n]) | attrs)) == ERR) {
-+	    /*
-+	     * Check for cells which are orphaned by adding this character, set
-+	     * those to blanks.
-+	     *
-+	     * FIXME: this actually could fill j-i cells, more complicated to
-+	     * setup though.
-+	     */
-+	    for (i = 0; i < len; ++i) {
-+		if (isWidecBase(win->_line[y].text[x + i])) {
- 		    break;
-+		} else if (isWidecExt(win->_line[y].text[x + i])) {
-+		    for (j = i; x + j <= win->_maxx; ++j) {
-+			if (!isWidecExt(win->_line[y].text[x + j])) {
-+			    TR(TRACE_VIRTPUT, ("fill %d orphan cells", j));
-+			    fill_cells(win, j);
-+			    break;
-+			}
-+		    }
-+		    break;
-+		}
-+	    }
-+	    /*
-+	     * Finally, add the cells for this character.
-+	     */
-+	    for (i = 0; i < len; ++i) {
-+		cchar_t value = ch;
-+		SetWidecExt(value, i);
-+		TR(TRACE_VIRTPUT, ("multicolumn %d:%d (%d,%d)",
-+				   i + 1, len,
-+				   win->_begy + y, win->_begx + x));
-+		line->text[x] = value;
-+		CHANGED_CELL(line, x);
-+		++x;
-+	    }
-+	    goto testwrapping;
-+	}
-+    }
-+
-+    /*
-+     * Single-column characters.
-+     */
-+    line->text[x++] = ch;
-+    /*
-+     * This label is used only for wide-characters.
-+     */
-+  testwrapping:
-+
-+    TR(TRACE_VIRTPUT, ("cell (%ld, %ld..%d) = %s",
-+		       (long) win->_cury, (long) win->_curx, x - 1,
-+		       _tracech_t(CHREF(ch))));
-+
-+    if (x > win->_maxx) {
-+	return wrap_to_next_line(win);
-+    }
-+    win->_curx = x;
-+    return OK;
-+}
-+
-+static NCURSES_INLINE int
-+wadd_wch_nosync(WINDOW *win, cchar_t ch)
-+/* the workhorse function -- add a character to the given window */
-+{
-+    NCURSES_SIZE_T x, y;
-+    wchar_t *s;
-+    int tabsize = 8;
-+
-+    /*
-+     * If we are using the alternate character set, forget about locale.
-+     * Otherwise, if the locale * claims the code is printable, treat it that
-+     * way.
-+     */
-+    if ((AttrOf(ch) & A_ALTCHARSET)
-+	|| iswprint(CharOf(ch)))
-+	return wadd_wch_literal(win, ch);
-+
-+    /*
-+     * Handle carriage control and other codes that are not printable, or are
-+     * known to expand to more than one character according to unctrl().
-+     */
-+    x = win->_curx;
-+    y = win->_cury;
-+
-+    switch (CharOf(ch)) {
-+    case '\t':
-+#if USE_REENTRANT
-+	tabsize = sp->_TABSIZE;
-+#else
-+	tabsize = TABSIZE;
-+#endif
-+	x += (tabsize - (x % tabsize));
-+	/*
-+	 * Space-fill the tab on the bottom line so that we'll get the
-+	 * "correct" cursor position.
-+	 */
-+	if ((!win->_scroll && (y == win->_regbottom))
-+	    || (x <= win->_maxx)) {
-+	    cchar_t blank = blankchar;
-+	    AddAttr(blank, AttrOf(ch));
-+	    while (win->_curx < x) {
-+		if (wadd_wch_literal(win, blank) == ERR)
-+		    return (ERR);
-+	    }
-+	    break;
-+	} else {
-+	    wclrtoeol(win);
-+	    win->_flags |= _WRAPPED;
-+	    if (newline_forces_scroll(win, &y)) {
-+		x = win->_maxx;
-+		if (win->_scroll) {
-+		    scroll(win);
-+		    x = 0;
- 		}
-+	    } else {
-+		x = 0;
-+	    }
-+	}
-+	break;
-+    case '\n':
-+	wclrtoeol(win);
-+	if (newline_forces_scroll(win, &y)) {
-+	    if (win->_scroll)
-+		scroll(win);
-+	    else
-+		return (ERR);
-+	}
-+	/* FALLTHRU */
-+    case '\r':
-+	x = 0;
-+	win->_flags &= ~_WRAPPED;
-+	break;
-+    case '\b':
-+	if (x == 0)
-+	    return (OK);
-+	x--;
-+	win->_flags &= ~_WRAPPED;
-+	break;
-+    default:
-+	if ((s = wunctrl(&ch)) != 0) {
-+	    while (*s) {
-+		cchar_t sch;
-+		SetChar(sch, *s++, AttrOf(ch));
-+		if_EXT_COLORS(SetPair(sch, GetPair(ch)));
-+		if (wadd_wch_literal(win, sch) == ERR)
-+		    return ERR;
- 	    }
--	    if (code == ERR)
--		break;
-+	    return OK;
- 	}
-+	return ERR;
-+    }
-+
-+    win->_curx = x;
-+    win->_cury = y;
-+
-+    return OK;
-+}
-+
-+/*
-+ * The versions below call _nc_synchook().  We wanted to avoid this in the
-+ * version exported for string puts; they'll call _nc_synchook once at end
-+ * of run.
-+ */
-+
-+/* These are actual entry points */
-+
-+NCURSES_EXPORT(int)
-+wadd_wch(WINDOW *win, const cchar_t *wch)
-+{
-+    int code = ERR;
-+
-+    TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("wadd_wch(%p, %s)"), win,
-+				      _tracecchar_t(wch)));
-+
-+    if (win && (wadd_wch_nosync(win, *wch) != ERR)) {
-+	_nc_synchook(win);
-+	code = OK;
-     }
- 
-     TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_RETURN("%d"), code));
-@@ -77,37 +427,18 @@
- NCURSES_EXPORT(int)
- wecho_wchar(WINDOW *win, const cchar_t *wch)
- {
--    PUTC_DATA;
--    int n;
-     int code = ERR;
- 
--    TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("wecho_wchar(%p, %s)"), win,
--				      _tracech_t(wch)));
-+    TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("wechochar(%p, %s)"), win,
-+				      _tracecchar_t(wch)));
- 
--    if (win != 0) {
--	PUTC_INIT;
--	for (PUTC_i = 0; PUTC_i < CCHARW_MAX; ++PUTC_i) {
--	    attr_t attrs = (wch->attr & A_ATTRIBUTES);
--
--	    if ((PUTC_ch = wch->chars[PUTC_i]) == L'\0')
--		break;
--	    if ((PUTC_n = wcrtomb(PUTC_buf, PUTC_ch, &PUT_st)) <= 0) {
--		code = ERR;
--		if (is8bits(PUTC_ch))
--		    code = waddch(win, UChar(PUTC_ch) | attrs);
--		break;
--	    }
--	    for (n = 0; n < PUTC_n; n++) {
--		if ((code = waddch(win, UChar(PUTC_buf[n]) | attrs)) == ERR) {
--		    break;
--		}
--	    }
--	    if (code == ERR)
--		break;
--	}
--	wrefresh(win);
-+    if (win && (wadd_wch_nosync(win, *wch) != ERR)) {
-+	bool save_immed = win->_immed;
-+	win->_immed = TRUE;
-+	_nc_synchook(win);
-+	win->_immed = save_immed;
-+	code = OK;
-     }
--
-     TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_RETURN("%d"), code));
-     return (code);
- }
-diff -Naur ncurses-5.7.orig/ncurses/widechar/lib_cchar.c ncurses-5.7/ncurses/widechar/lib_cchar.c
---- ncurses-5.7.orig/ncurses/widechar/lib_cchar.c	2007-05-12 12:03:06.000000000 -0700
-+++ ncurses-5.7/ncurses/widechar/lib_cchar.c	2009-07-19 15:04:17.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 2001-2005,2007 Free Software Foundation, Inc.              *
-+ * Copyright (c) 2001-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -35,7 +35,7 @@
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_cchar.c,v 1.12 2007/05/12 19:03:06 tom Exp $")
-+MODULE_ID("$Id: lib_cchar.c,v 1.14 2009/07/18 15:20:42 tom Exp $")
- 
- /* 
-  * The SuSv2 description leaves some room for interpretation.  We'll assume wch
-@@ -50,8 +50,8 @@
- 	 short color_pair,
- 	 const void *opts)
- {
--    int i;
--    int len;
-+    unsigned i;
-+    unsigned len;
-     int code = OK;
- 
-     TR(TRACE_CCALLS, (T_CALLED("setcchar(%p,%s,%lu,%d,%p)"),
-@@ -112,7 +112,11 @@
- 	    : CCHARW_MAX;
- 
- 	if (wch == NULL) {
--	    code = len;
-+	    /*
-+	     * If the value is a null, set the length to 1.
-+	     * If the value is not a null, return the length plus 1 for null.
-+	     */
-+	    code = (len < CCHARW_MAX) ? (len + 1) : CCHARW_MAX;
- 	} else if (attrs == 0 || color_pair == 0) {
- 	    code = ERR;
- 	} else if (len >= 0) {
-diff -Naur ncurses-5.7.orig/ncurses/widechar/lib_get_wch.c ncurses-5.7/ncurses/widechar/lib_get_wch.c
---- ncurses-5.7.orig/ncurses/widechar/lib_get_wch.c	2008-08-16 12:22:55.000000000 -0700
-+++ ncurses-5.7/ncurses/widechar/lib_get_wch.c	2009-07-19 15:03:53.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 2002-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 2002-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -40,7 +40,7 @@
- #include <curses.priv.h>
- #include <ctype.h>
- 
--MODULE_ID("$Id: lib_get_wch.c,v 1.17 2008/08/16 19:22:55 tom Exp $")
-+MODULE_ID("$Id: lib_get_wch.c,v 1.18 2009/04/18 22:41:33 tom Exp $")
- 
- #if HAVE_MBTOWC && HAVE_MBLEN
- #define reset_mbytes(state) mblen(NULL, 0), mbtowc(NULL, NULL, 0)
-@@ -95,12 +95,12 @@
- 		 * whether the improvement would be worth the effort.
- 		 */
- 		if (count != 0) {
--		    _nc_ungetch(sp, (int) value);
-+		    safe_ungetch (SP_PARM, (int) value);
- 		    code = ERR;
- 		}
- 		break;
- 	    } else if (count + 1 >= sizeof(buffer)) {
--		_nc_ungetch(sp, (int) value);
-+		safe_ungetch (SP_PARM, (int) value);
- 		code = ERR;
- 		break;
- 	    } else {
-@@ -111,7 +111,7 @@
- 		    reset_mbytes(state);
- 		    if (check_mbytes(wch, buffer, count, state) != status) {
- 			code = ERR;	/* the two calls should match */
--			_nc_ungetch(sp, (int) value);
-+			safe_ungetch (SP_PARM, (int) value);
- 		    }
- 		    value = wch;
- 		    break;
-diff -Naur ncurses-5.7.orig/ncurses/widechar/lib_get_wstr.c ncurses-5.7/ncurses/widechar/lib_get_wstr.c
---- ncurses-5.7.orig/ncurses/widechar/lib_get_wstr.c	2008-08-16 12:25:33.000000000 -0700
-+++ ncurses-5.7/ncurses/widechar/lib_get_wstr.c	2009-07-19 15:02:22.000000000 -0700
-@@ -38,9 +38,8 @@
- */
- 
- #include <curses.priv.h>
--#include <term.h>
- 
--MODULE_ID("$Id: lib_get_wstr.c,v 1.10 2008/08/16 19:25:33 tom Exp $")
-+MODULE_ID("$Id: lib_get_wstr.c,v 1.11 2008/11/16 00:19:59 juergen Exp $")
- 
- static int
- wadd_wint(WINDOW *win, wint_t *src)
-diff -Naur ncurses-5.7.orig/ncurses/widechar/lib_ins_wch.c ncurses-5.7/ncurses/widechar/lib_ins_wch.c
---- ncurses-5.7.orig/ncurses/widechar/lib_ins_wch.c	2005-12-03 12:24:19.000000000 -0800
-+++ ncurses-5.7/ncurses/widechar/lib_ins_wch.c	2009-07-19 15:04:04.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 2002-2003,2005 Free Software Foundation, Inc.              *
-+ * Copyright (c) 2002-2005,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -39,7 +39,7 @@
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_ins_wch.c,v 1.8 2005/12/03 20:24:19 tom Exp $")
-+MODULE_ID("$Id: lib_ins_wch.c,v 1.9 2009/05/30 14:52:42 tom Exp $")
- 
- /*
-  * Insert the given character, updating the current location to simplify
-@@ -112,6 +112,8 @@
- 	    n = wcslen(wstr);
- 	code = OK;
- 	if (n > 0) {
-+	    SCREEN *sp = _nc_screen_of(win);
-+
- 	    oy = win->_cury;
- 	    ox = win->_curx;
- 	    for (cp = wstr; *cp && ((cp - wstr) < n); cp++) {
-@@ -129,7 +131,7 @@
- 		    code = _nc_insert_wch(win, &tmp_cchar);
- 		} else {
- 		    /* tabs, other ASCII stuff */
--		    code = _nc_insert_ch(win, (chtype) (*cp));
-+		    code = _nc_insert_ch(sp, win, (chtype) (*cp));
- 		}
- 		if (code != OK)
- 		    break;
-diff -Naur ncurses-5.7.orig/ncurses/widechar/lib_unget_wch.c ncurses-5.7/ncurses/widechar/lib_unget_wch.c
---- ncurses-5.7.orig/ncurses/widechar/lib_unget_wch.c	2008-06-07 07:50:37.000000000 -0700
-+++ ncurses-5.7/ncurses/widechar/lib_unget_wch.c	2009-07-19 15:03:53.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 2002-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 2002-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -39,7 +39,7 @@
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_unget_wch.c,v 1.10 2008/06/07 14:50:37 tom Exp $")
-+MODULE_ID("$Id: lib_unget_wch.c,v 1.11 2009/04/04 23:57:25 tom Exp $")
- 
- /*
-  * Wrapper for wcrtomb() which obtains the length needed for the given
-@@ -65,14 +65,14 @@
- }
- 
- NCURSES_EXPORT(int)
--unget_wch(const wchar_t wch)
-+NCURSES_SP_NAME(unget_wch) (NCURSES_SP_DCLx const wchar_t wch)
- {
-     int result = OK;
-     mbstate_t state;
-     size_t length;
-     int n;
- 
--    T((T_CALLED("unget_wch(%#lx)"), (unsigned long) wch));
-+    T((T_CALLED("unget_wch(%p, %#lx)"), SP_PARM, (unsigned long) wch));
- 
-     init_mb(state);
-     length = _nc_wcrtomb(0, wch, &state);
-@@ -86,7 +86,7 @@
- 	    wcrtomb(string, wch, &state);
- 
- 	    for (n = (int) (length - 1); n >= 0; --n) {
--		if (_nc_ungetch(SP, string[n]) != OK) {
-+		if (NCURSES_SP_NAME(ungetch) (NCURSES_SP_ARGx string[n]) != OK) {
- 		    result = ERR;
- 		    break;
- 		}
-@@ -101,3 +101,11 @@
- 
-     returnCode(result);
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+unget_wch(const wchar_t wch)
-+{
-+    return NCURSES_SP_NAME(unget_wch) (CURRENT_SCREEN, wch);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/widechar/lib_vid_attr.c ncurses-5.7/ncurses/widechar/lib_vid_attr.c
---- ncurses-5.7.orig/ncurses/widechar/lib_vid_attr.c	2007-06-30 15:03:02.000000000 -0700
-+++ ncurses-5.7/ncurses/widechar/lib_vid_attr.c	2009-07-19 15:04:00.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 2002-2006,2007 Free Software Foundation, Inc.              *
-+ * Copyright (c) 2002-2007,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -33,9 +33,13 @@
- #include <curses.priv.h>
- #include <term.h>
- 
--MODULE_ID("$Id: lib_vid_attr.c,v 1.5 2007/06/30 22:03:02 tom Exp $")
-+#ifndef CUR
-+#define CUR SP_TERMTYPE 
-+#endif
-+
-+MODULE_ID("$Id: lib_vid_attr.c,v 1.11 2009/05/10 00:48:29 tom Exp $")
- 
--#define doPut(mode) TPUTS_TRACE(#mode); tputs(mode, 1, outc)
-+#define doPut(mode) TPUTS_TRACE(#mode); NCURSES_SP_NAME(tputs)(NCURSES_SP_ARGx mode, 1, outc)
- 
- #define TurnOn(mask,mode) \
- 	if ((turn_on & mask) && mode) { doPut(mode); }
-@@ -50,14 +54,20 @@
- 		if ((pair != old_pair) \
- 		 || (fix_pair0 && (pair == 0)) \
- 		 || (reverse ^ ((old_attr & A_REVERSE) != 0))) { \
--			_nc_do_color(old_pair, pair, reverse, outc); \
-+		    NCURSES_SP_NAME(_nc_do_color) (NCURSES_SP_ARGx \
-+						   old_pair, pair, \
-+						   reverse, outc); \
- 		} \
- 	}
- 
- #define set_color(mode, pair) mode &= ALL_BUT_COLOR; mode |= COLOR_PAIR(pair)
- 
- NCURSES_EXPORT(int)
--vid_puts(attr_t newmode, short pair, void *opts GCC_UNUSED, int (*outc) (int))
-+NCURSES_SP_NAME(vid_puts) (NCURSES_SP_DCLx
-+			   attr_t newmode,
-+			   short pair,
-+			   void *opts GCC_UNUSED,
-+			   NCURSES_SP_OUTC outc)
- {
- #if NCURSES_EXT_COLORS
-     static attr_t previous_attr = A_NORMAL;
-@@ -65,9 +75,9 @@
- 
-     attr_t turn_on, turn_off;
-     bool reverse = FALSE;
--    bool can_color = (SP == 0 || SP->_coloron);
-+    bool can_color = (SP_PARM == 0 || SP_PARM->_coloron);
- #if NCURSES_EXT_FUNCS
--    bool fix_pair0 = (SP != 0 && SP->_coloron && !SP->_default_color);
-+    bool fix_pair0 = (SP_PARM != 0 && SP_PARM->_coloron && !SP_PARM->_default_color);
- #else
- #define fix_pair0 FALSE
- #endif
-@@ -76,18 +86,18 @@
-     T((T_CALLED("vid_puts(%s,%d)"), _traceattr(newmode), pair));
- 
-     /* this allows us to go on whether or not newterm() has been called */
--    if (SP) {
--	previous_attr = AttrOf(SCREEN_ATTRS(SP));
--	previous_pair = GetPair(SCREEN_ATTRS(SP));
-+    if (SP_PARM) {
-+	previous_attr = AttrOf(SCREEN_ATTRS(SP_PARM));
-+	previous_pair = GetPair(SCREEN_ATTRS(SP_PARM));
-     }
- 
-     TR(TRACE_ATTRS, ("previous attribute was %s, %d",
- 		     _traceattr(previous_attr), previous_pair));
- 
- #if !USE_XMC_SUPPORT
--    if ((SP != 0)
-+    if ((SP_PARM != 0)
- 	&& (magic_cookie_glitch > 0))
--	newmode &= ~(SP->_xmc_suppress);
-+	newmode &= ~(SP_PARM->_xmc_suppress);
- #endif
- 
-     /*
-@@ -144,10 +154,10 @@
- 	    if (exit_attribute_mode) {
- 		doPut(exit_attribute_mode);
- 	    } else {
--		if (!SP || SP->_use_rmul) {
-+		if (!SP_PARM || SP_PARM->_use_rmul) {
- 		    TurnOff(A_UNDERLINE, exit_underline_mode);
- 		}
--		if (!SP || SP->_use_rmso) {
-+		if (!SP_PARM || SP_PARM->_use_rmso) {
- 		    TurnOff(A_STANDOUT, exit_standout_mode);
- 		}
- 	    }
-@@ -159,16 +169,18 @@
-     } else if (set_attributes) {
- 	if (turn_on || turn_off) {
- 	    TPUTS_TRACE("set_attributes");
--	    tputs(TPARM_9(set_attributes,
--			  (newmode & A_STANDOUT) != 0,
--			  (newmode & A_UNDERLINE) != 0,
--			  (newmode & A_REVERSE) != 0,
--			  (newmode & A_BLINK) != 0,
--			  (newmode & A_DIM) != 0,
--			  (newmode & A_BOLD) != 0,
--			  (newmode & A_INVIS) != 0,
--			  (newmode & A_PROTECT) != 0,
--			  (newmode & A_ALTCHARSET) != 0), 1, outc);
-+	    NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
-+				    TPARM_9(set_attributes,
-+					    (newmode & A_STANDOUT) != 0,
-+					    (newmode & A_UNDERLINE) != 0,
-+					    (newmode & A_REVERSE) != 0,
-+					    (newmode & A_BLINK) != 0,
-+					    (newmode & A_DIM) != 0,
-+					    (newmode & A_BOLD) != 0,
-+					    (newmode & A_INVIS) != 0,
-+					    (newmode & A_PROTECT) != 0,
-+					    (newmode & A_ALTCHARSET) != 0),
-+				    1, outc);
- 	    previous_attr &= ALL_BUT_COLOR;
- 	    previous_pair = 0;
- 	}
-@@ -179,11 +191,11 @@
- 
- 	TurnOff(A_ALTCHARSET, exit_alt_charset_mode);
- 
--	if (!SP || SP->_use_rmul) {
-+	if (!SP_PARM || SP_PARM->_use_rmul) {
- 	    TurnOff(A_UNDERLINE, exit_underline_mode);
- 	}
- 
--	if (!SP || SP->_use_rmso) {
-+	if (!SP_PARM || SP_PARM->_use_rmso) {
- 	    TurnOff(A_STANDOUT, exit_standout_mode);
- 	}
- 
-@@ -221,9 +233,9 @@
-     if (reverse)
- 	newmode |= A_REVERSE;
- 
--    if (SP) {
--	SetAttr(SCREEN_ATTRS(SP), newmode);
--	SetPair(SCREEN_ATTRS(SP), pair);
-+    if (SP_PARM) {
-+	SetAttr(SCREEN_ATTRS(SP_PARM), newmode);
-+	SetPair(SCREEN_ATTRS(SP_PARM), pair);
-     } else {
- 	previous_attr = newmode;
- 	previous_pair = pair;
-@@ -233,29 +245,60 @@
- #else
-     T((T_CALLED("vid_puts(%s,%d)"), _traceattr(newmode), pair));
-     set_color(newmode, pair);
--    returnCode(vidputs(newmode, outc));
-+    returnCode(NCURSES_SP_NAME(vidputs) (NCURSES_SP_ARGx newmode, outc));
- #endif
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+vid_puts(attr_t newmode,
-+	 short pair,
-+	 void *opts GCC_UNUSED,
-+	 NCURSES_OUTC outc)
-+{
-+    SetSafeOutcWrapper(outc);
-+    return NCURSES_SP_NAME(vid_puts) (CURRENT_SCREEN,
-+				      newmode,
-+				      pair,
-+				      opts,
-+				      _nc_outc_wrapper);
-+}
-+#endif
-+
- #undef vid_attr
- NCURSES_EXPORT(int)
--vid_attr(attr_t newmode, short pair, void *opts)
-+NCURSES_SP_NAME(vid_attr) (NCURSES_SP_DCLx
-+			   attr_t newmode,
-+			   short pair,
-+			   void *opts)
- {
-     T((T_CALLED("vid_attr(%s,%d)"), _traceattr(newmode), pair));
--    returnCode(vid_puts(newmode, pair, opts, _nc_outch));
-+    returnCode(NCURSES_SP_NAME(vid_puts) (NCURSES_SP_ARGx
-+					  newmode,
-+					  pair,
-+					  opts,
-+					  NCURSES_SP_NAME(_nc_outch)));
- }
- 
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(int)
-+vid_attr(attr_t newmode, short pair, void *opts)
-+{
-+    return NCURSES_SP_NAME(vid_attr) (CURRENT_SCREEN, newmode, pair, opts);
-+}
-+#endif
-+
- /*
-  * This implementation uses the same mask values for A_xxx and WA_xxx, so
-  * we can use termattrs() for part of the logic.
-  */
- NCURSES_EXPORT(attr_t)
--term_attrs(void)
-+NCURSES_SP_NAME(term_attrs) (NCURSES_SP_DCL0)
- {
-     attr_t attrs;
- 
-     T((T_CALLED("term_attrs()")));
--    attrs = termattrs();
-+    attrs = SP_PARM ? NCURSES_SP_NAME(termattrs) (NCURSES_SP_ARG) : 0;
- 
-     /* these are only supported for wide-character mode */
-     if (enter_horizontal_hl_mode)
-@@ -273,3 +316,11 @@
- 
-     returnAttr(attrs);
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(attr_t)
-+term_attrs(void)
-+{
-+    return NCURSES_SP_NAME(term_attrs) (CURRENT_SCREEN);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/widechar/lib_wacs.c ncurses-5.7/ncurses/widechar/lib_wacs.c
---- ncurses-5.7.orig/ncurses/widechar/lib_wacs.c	2006-12-17 07:16:17.000000000 -0800
-+++ ncurses-5.7/ncurses/widechar/lib_wacs.c	2009-07-19 15:02:22.000000000 -0700
-@@ -31,9 +31,8 @@
-  ****************************************************************************/
- 
- #include <curses.priv.h>
--#include <term.h>
- 
--MODULE_ID("$Id: lib_wacs.c,v 1.7 2006/12/17 15:16:17 tom Exp $")
-+MODULE_ID("$Id: lib_wacs.c,v 1.8 2008/11/16 00:19:59 juergen Exp $")
- 
- NCURSES_EXPORT_VAR(cchar_t) * _nc_wacs = 0;
- 
-diff -Naur ncurses-5.7.orig/ncurses/widechar/lib_wunctrl.c ncurses-5.7/ncurses/widechar/lib_wunctrl.c
---- ncurses-5.7.orig/ncurses/widechar/lib_wunctrl.c	2007-06-12 13:22:32.000000000 -0700
-+++ ncurses-5.7/ncurses/widechar/lib_wunctrl.c	2009-07-19 15:03:53.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 2001-2005,2007 Free Software Foundation, Inc.              *
-+ * Copyright (c) 2001-2007,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -35,21 +35,31 @@
- 
- #include <curses.priv.h>
- 
--MODULE_ID("$Id: lib_wunctrl.c,v 1.12 2007/06/12 20:22:32 tom Exp $")
-+MODULE_ID("$Id: lib_wunctrl.c,v 1.13 2009/04/18 19:06:55 tom Exp $")
- 
- NCURSES_EXPORT(wchar_t *)
--wunctrl(cchar_t *wc)
-+NCURSES_SP_NAME(wunctrl) (NCURSES_SP_DCLx cchar_t *wc)
- {
--    static wchar_t str[CCHARW_MAX + 1], *sp;
-+    static wchar_t str[CCHARW_MAX + 1], *wsp;
- 
-     if (Charable(*wc)) {
--	const char *p = unctrl((unsigned) _nc_to_char((wint_t) CharOf(*wc)));
-+	const char *p =
-+	NCURSES_SP_NAME(unctrl) (NCURSES_SP_ARGx
-+				 (unsigned) _nc_to_char((wint_t)CharOf(*wc)));
- 
--	for (sp = str; *p; ++p) {
--	    *sp++ = _nc_to_widechar(*p);
-+	for (wsp = str; *p; ++p) {
-+	    *wsp++ = _nc_to_widechar(*p);
- 	}
--	*sp = 0;
-+	*wsp = 0;
- 	return str;
-     } else
- 	return wc->chars;
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(wchar_t *)
-+wunctrl(cchar_t *wc)
-+{
-+    return NCURSES_SP_NAME(wunctrl) (CURRENT_SCREEN, wc);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/ncurses/win32con/gettimeofday.c ncurses-5.7/ncurses/win32con/gettimeofday.c
---- ncurses-5.7.orig/ncurses/win32con/gettimeofday.c	1969-12-31 16:00:00.000000000 -0800
-+++ ncurses-5.7/ncurses/win32con/gettimeofday.c	2009-07-19 15:04:11.000000000 -0700
-@@ -0,0 +1,51 @@
-+/****************************************************************************
-+ * Copyright (c) 2008 Free Software Foundation, Inc.                        *
-+ *                                                                          *
-+ * Permission is hereby granted, free of charge, to any person obtaining a  *
-+ * copy of this software and associated documentation files (the            *
-+ * "Software"), to deal in the Software without restriction, including      *
-+ * without limitation the rights to use, copy, modify, merge, publish,      *
-+ * distribute, distribute with modifications, sublicense, and/or sell       *
-+ * copies of the Software, and to permit persons to whom the Software is    *
-+ * furnished to do so, subject to the following conditions:                 *
-+ *                                                                          *
-+ * The above copyright notice and this permission notice shall be included  *
-+ * in all copies or substantial portions of the Software.                   *
-+ *                                                                          *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
-+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
-+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
-+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
-+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
-+ *                                                                          *
-+ * Except as contained in this notice, the name(s) of the above copyright   *
-+ * holders shall not be used in advertising or otherwise to promote the     *
-+ * sale, use or other dealings in this Software without prior written       *
-+ * authorization.                                                           *
-+ ****************************************************************************/
-+
-+#define WINVER 0x0501
-+
-+#include <curses.priv.h>
-+
-+#include <windows.h>
-+
-+MODULE_ID("$Id: gettimeofday.c,v 1.1 2008/12/07 02:07:39 juergen Exp $")
-+
-+#define JAN1970 116444736000000000LL	/* the value for 01/01/1970 00:00 */
-+
-+int
-+gettimeofday(struct timeval *tv, void *tz)
-+{
-+    union {
-+	FILETIME ft;
-+	long long since1601;	/* time since 1 Jan 1601 in 100ns units */
-+    } data;
-+
-+    GetSystemTimeAsFileTime(&data.ft);
-+    tv->tv_usec = (long) ((data.since1601 / 10LL) % 1000000LL);
-+    tv->tv_sec = (long) ((data.since1601 - JAN1970) / 10000000LL);
-+    return (0);
-+}
-diff -Naur ncurses-5.7.orig/ncurses/win32con/win_driver.c ncurses-5.7/ncurses/win32con/win_driver.c
---- ncurses-5.7.orig/ncurses/win32con/win_driver.c	1969-12-31 16:00:00.000000000 -0800
-+++ ncurses-5.7/ncurses/win32con/win_driver.c	2009-07-19 15:04:11.000000000 -0700
-@@ -0,0 +1,1085 @@
-+/****************************************************************************
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-+ *                                                                          *
-+ * Permission is hereby granted, free of charge, to any person obtaining a  *
-+ * copy of this software and associated documentation files (the            *
-+ * "Software"), to deal in the Software without restriction, including      *
-+ * without limitation the rights to use, copy, modify, merge, publish,      *
-+ * distribute, distribute with modifications, sublicense, and/or sell       *
-+ * copies of the Software, and to permit persons to whom the Software is    *
-+ * furnished to do so, subject to the following conditions:                 *
-+ *                                                                          *
-+ * The above copyright notice and this permission notice shall be included  *
-+ * in all copies or substantial portions of the Software.                   *
-+ *                                                                          *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
-+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
-+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
-+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
-+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
-+ *                                                                          *
-+ * Except as contained in this notice, the name(s) of the above copyright   *
-+ * holders shall not be used in advertising or otherwise to promote the     *
-+ * sale, use or other dealings in this Software without prior written       *
-+ * authorization.                                                           *
-+ ****************************************************************************/
-+
-+/****************************************************************************
-+ *  Author: Juergen Pfeifer                                                 *
-+ *                                                                          *
-+ ****************************************************************************/
-+
-+#include <curses.priv.h>
-+
-+MODULE_ID("$Id: win_driver.c,v 1.1 2009/02/21 15:11:29 juergen Exp $")
-+
-+static bool drv_CanHandle(TERMINAL_CONTROL_BLOCK * TCB, const char *tname, int *);
-+static void drv_init(TERMINAL_CONTROL_BLOCK *);
-+static void drv_release(TERMINAL_CONTROL_BLOCK *);
-+static int drv_size(TERMINAL_CONTROL_BLOCK *, int *, int *);
-+static int drv_sgmode(TERMINAL_CONTROL_BLOCK * TCB,
-+		      bool setFlag,
-+		      TTY * buf);
-+static chtype drv_conattr(TERMINAL_CONTROL_BLOCK * TCB);
-+
-+static int drv_mvcur(TERMINAL_CONTROL_BLOCK * TCB,
-+		     int yold, int xold, int ynew, int xnew);
-+static int drv_mode(TERMINAL_CONTROL_BLOCK * TCB,
-+		    bool progFlag, bool defFlag);
-+static bool drv_rescol(TERMINAL_CONTROL_BLOCK * TCB);
-+static bool drv_rescolors(TERMINAL_CONTROL_BLOCK * TCB);
-+static void drv_setcolor(TERMINAL_CONTROL_BLOCK * TCB,
-+			 bool fore,
-+			 int color,
-+			 int (*outc) (SCREEN *, int));
-+static int drv_dobeepflash(TERMINAL_CONTROL_BLOCK * TCB, bool);
-+static void drv_initpair(TERMINAL_CONTROL_BLOCK * TCB,
-+			 short pair,
-+			 short f,
-+			 short b);
-+static void drv_initcolor(TERMINAL_CONTROL_BLOCK * TCB,
-+			  short color,
-+			  short r,
-+			  short g,
-+			  short b);
-+static void drv_do_color(TERMINAL_CONTROL_BLOCK * TCB,
-+			 short old_pair,
-+			 short pair,
-+			 bool reverse,
-+			 int (*outc) (SCREEN *, int));
-+static void drv_initmouse(TERMINAL_CONTROL_BLOCK * TCB);
-+static void drv_setfilter(TERMINAL_CONTROL_BLOCK * TCB);
-+static void drv_hwlabel(TERMINAL_CONTROL_BLOCK * TCB,
-+			int labnum,
-+			char *text);
-+static void drv_hwlabelOnOff(TERMINAL_CONTROL_BLOCK * TCB,
-+			     bool OnFlag);
-+static int drv_doupdate(TERMINAL_CONTROL_BLOCK * TCB);
-+
-+static int drv_defaultcolors(TERMINAL_CONTROL_BLOCK * TCB,
-+			     int fg,
-+			     int bg);
-+static int drv_print(TERMINAL_CONTROL_BLOCK * TCB,
-+		     char *data,
-+		     int len);
-+/*static int _getsize(TERMINAL_CONTROL_BLOCK*,int *, int *);*/
-+static int drv_setsize(TERMINAL_CONTROL_BLOCK * TCB, int l, int c);
-+static void drv_initacs(TERMINAL_CONTROL_BLOCK * TCB, chtype *, chtype *);
-+static void drv_wrap(SCREEN *);
-+static void drv_screen_init(SCREEN *);
-+static int drv_twait(TERMINAL_CONTROL_BLOCK *,
-+		     int,
-+		     int,
-+		     int *EVENTLIST_2nd(_nc_eventlist *));
-+static int drv_read(TERMINAL_CONTROL_BLOCK * TCB, int *buf);
-+static int drv_nap(TERMINAL_CONTROL_BLOCK * TCB GCC_UNUSED, int ms);
-+static int drv_kpad(TERMINAL_CONTROL_BLOCK * TCB, bool);
-+static int drv_keyok(TERMINAL_CONTROL_BLOCK * TCB, int, bool);
-+static bool drv_kyExist(TERMINAL_CONTROL_BLOCK * TCB, int);
-+
-+NCURSES_EXPORT_VAR (TERM_DRIVER) _nc_WIN_DRIVER = {
-+    FALSE,
-+	drv_CanHandle,		/* CanHandle */
-+	drv_init,		/* init */
-+	drv_release,		/* release */
-+	drv_size,		/* size */
-+	drv_sgmode,		/* sgmode */
-+	drv_conattr,		/* conattr */
-+	drv_mvcur,		/* hwcur */
-+	drv_mode,		/* mode */
-+	drv_rescol,		/* rescol */
-+	drv_rescolors,		/* rescolors */
-+	drv_setcolor,		/* color */
-+	drv_dobeepflash,	/* DoBeepFlash */
-+	drv_initpair,		/* initpair */
-+	drv_initcolor,		/* initcolor */
-+	drv_do_color,		/* docolor */
-+	drv_initmouse,		/* initmouse */
-+	drv_setfilter,		/* setfilter */
-+	drv_hwlabel,		/* hwlabel */
-+	drv_hwlabelOnOff,	/* hwlabelOnOff */
-+	drv_doupdate,		/* update */
-+	drv_defaultcolors,	/* defaultcolors */
-+	drv_print,		/* print */
-+	drv_size,		/* getsize */
-+	drv_setsize,		/* setsize */
-+	drv_initacs,		/* initacs */
-+	drv_screen_init,	/* scinit */
-+	drv_wrap,		/* scexit */
-+	drv_twait,		/* twait */
-+	drv_read,		/* read */
-+	drv_nap,		/* nap */
-+	drv_kpad,		/* kpad */
-+	drv_keyok,		/* kyOk */
-+	drv_kyExist		/* kyExist */
-+};
-+
-+#define WINMAGIC NCDRV_MAGIC(NCDRV_WINCONSOLE)
-+
-+#define AssertTCB() assert(TCB!=0 && TCB->magic==WINMAGIC)
-+#define SetSP() assert(TCB->csp!=0); sp = TCB->csp
-+
-+#define GenMap(vKey,key) MAKELONG(key, vKey)
-+
-+static const LONG keylist[] =
-+{
-+    GenMap(VK_PRIOR, KEY_PPAGE),
-+    GenMap(VK_NEXT, KEY_NPAGE),
-+    GenMap(VK_END, KEY_END),
-+    GenMap(VK_HOME, KEY_HOME),
-+    GenMap(VK_LEFT, KEY_LEFT),
-+    GenMap(VK_UP, KEY_UP),
-+    GenMap(VK_RIGHT, KEY_RIGHT),
-+    GenMap(VK_DOWN, KEY_DOWN),
-+    GenMap(VK_DELETE, KEY_DC),
-+    GenMap(VK_INSERT, KEY_IC)
-+};
-+#define N_INI ((int)(sizeof(keylist)/sizeof(keylist[0])))
-+#define FKEYS 24
-+#define MAPSIZE (FKEYS + N_INI)
-+#define NUMPAIRS 64
-+
-+typedef struct props {
-+    CONSOLE_SCREEN_BUFFER_INFO SBI;
-+    bool progMode;
-+    DWORD map[MAPSIZE];
-+    DWORD rmap[MAPSIZE];
-+    WORD pairs[NUMPAIRS];
-+} Properties;
-+
-+#define PropOf(TCB) ((Properties*)TCB->prop)
-+
-+int
-+_nc_mingw_ioctl(int fd GCC_UNUSED,
-+		long int request GCC_UNUSED,
-+		struct termios *arg GCC_UNUSED)
-+{
-+    return 0;
-+    endwin();
-+    fprintf(stderr, "TERMINFO currently not supported on Windows.\n");
-+    exit(1);
-+}
-+
-+static WORD
-+MapColor(bool fore, int color)
-+{
-+    static const int _cmap[] =
-+    {0, 4, 2, 6, 1, 5, 3, 7};
-+    int a;
-+    if (color < 0 || color > 7)
-+	a = fore ? 7 : 0;
-+    else
-+	a = _cmap[color];
-+    if (!fore)
-+	a = a << 4;
-+    return (WORD) a;
-+}
-+
-+static WORD
-+MapAttr(TERMINAL_CONTROL_BLOCK * TCB, WORD res, chtype ch)
-+{
-+    if (ch & A_COLOR) {
-+	int p;
-+	SCREEN *sp;
-+
-+	AssertTCB();
-+	SetSP();
-+	p = PAIR_NUMBER(ch);
-+	if (p > 0 && p < NUMPAIRS && TCB != 0 && sp != 0) {
-+	    WORD a;
-+	    a = PropOf(TCB)->pairs[p];
-+	    res = (res & 0xff00) | a;
-+	}
-+    }
-+
-+    if (ch & A_REVERSE)
-+	res = ((res & 0xff00) | (((res & 0x07) << 4) | ((res & 0x70) >> 4)));
-+
-+    if (ch & A_STANDOUT)
-+	res = ((res & 0xff00) | (((res & 0x07) << 4) | ((res & 0x70) >> 4))
-+	       | BACKGROUND_INTENSITY);
-+
-+    if (ch & A_BOLD)
-+	res |= FOREGROUND_INTENSITY;
-+
-+    if (ch & A_DIM)
-+	res |= BACKGROUND_INTENSITY;
-+
-+    return res;
-+}
-+
-+static BOOL
-+con_write(TERMINAL_CONTROL_BLOCK * TCB, int y, int x, chtype *str, int n)
-+{
-+    CHAR_INFO ci[n];
-+    COORD loc, siz;
-+    SMALL_RECT rec;
-+    int i;
-+    chtype ch;
-+    SCREEN *sp;
-+
-+    AssertTCB();
-+
-+    if (TCB == 0 || InvalidConsoleHandle(TCB->hdl))
-+	return FALSE;
-+
-+    SetSP();
-+
-+    for (i = 0; i < n; i++) {
-+	ch = str[i];
-+	ci[i].Char.AsciiChar = ChCharOf(ch);
-+	ci[i].Attributes = MapAttr(TCB,
-+				   PropOf(TCB)->SBI.wAttributes,
-+				   ChAttrOf(ch));
-+	if (ChAttrOf(ch) & A_ALTCHARSET) {
-+	    if (sp->_acs_map)
-+		ci[i].Char.AsciiChar =
-+		    ChCharOf(NCURSES_SP_NAME(_nc_acs_char) (sp, ChCharOf(ch)));
-+	}
-+    }
-+
-+    loc.X = (short) 0;
-+    loc.Y = (short) 0;
-+    siz.X = (short) n;
-+    siz.Y = 1;
-+
-+    rec.Left = (short) x;
-+    rec.Top = (short) y;
-+    rec.Right = (short) (x + n - 1);
-+    rec.Bottom = rec.Top;
-+
-+    return WriteConsoleOutput(TCB->hdl, ci, siz, loc, &rec);
-+}
-+
-+#define MARK_NOCHANGE(win,row) \
-+		win->_line[row].firstchar = _NOCHANGE; \
-+		win->_line[row].lastchar  = _NOCHANGE
-+
-+static int
-+drv_doupdate(TERMINAL_CONTROL_BLOCK * TCB)
-+{
-+    int y, nonempty, n, x0, x1, Width, Height;
-+    SCREEN *sp;
-+
-+    AssertTCB();
-+    SetSP();
-+
-+    Width = screen_columns(sp);
-+    Height = screen_lines(sp);
-+    nonempty = min(Height, sp->_newscr->_maxy + 1);
-+
-+    if ((sp->_curscr->_clear || sp->_newscr->_clear)) {
-+	int x;
-+	chtype empty[Width];
-+
-+	for (x = 0; x < Width; x++)
-+	    empty[x] = ' ';
-+
-+	for (y = 0; y < nonempty; y++) {
-+	    con_write(TCB, y, 0, empty, Width);
-+	    memcpy(empty,
-+		   sp->_curscr->_line[y].text,
-+		   Width * sizeof(chtype));
-+	}
-+	sp->_curscr->_clear = FALSE;
-+	sp->_newscr->_clear = FALSE;
-+	touchwin(sp->_newscr);
-+    }
-+
-+    for (y = 0; y < nonempty; y++) {
-+	x0 = sp->_newscr->_line[y].firstchar;
-+	if (x0 != _NOCHANGE) {
-+	    x1 = sp->_newscr->_line[y].lastchar;
-+	    n = x1 - x0 + 1;
-+	    if (n > 0) {
-+		memcpy(sp->_curscr->_line[y].text + x0,
-+		       sp->_newscr->_line[y].text + x0,
-+		       n * sizeof(chtype));
-+		con_write(TCB,
-+			  y,
-+			  x0,
-+			  ((chtype *) sp->_curscr->_line[y].text) + x0, n);
-+
-+		/* mark line changed successfully */
-+		if (y <= sp->_newscr->_maxy) {
-+		    MARK_NOCHANGE(sp->_newscr, y);
-+		}
-+		if (y <= sp->_curscr->_maxy) {
-+		    MARK_NOCHANGE(sp->_curscr, y);
-+		}
-+	    }
-+	}
-+    }
-+
-+    /* put everything back in sync */
-+    for (y = nonempty; y <= sp->_newscr->_maxy; y++) {
-+	MARK_NOCHANGE(sp->_newscr, y);
-+    }
-+    for (y = nonempty; y <= sp->_curscr->_maxy; y++) {
-+	MARK_NOCHANGE(sp->_curscr, y);
-+    }
-+
-+    if (!sp->_newscr->_leaveok) {
-+	sp->_curscr->_curx = sp->_newscr->_curx;
-+	sp->_curscr->_cury = sp->_newscr->_cury;
-+
-+	TCB->drv->hwcur(TCB, 0, 0, sp->_curscr->_cury, sp->_curscr->_curx);
-+    }
-+    SetConsoleActiveScreenBuffer(TCB->hdl);
-+    return OK;
-+}
-+
-+static bool
-+drv_CanHandle(TERMINAL_CONTROL_BLOCK * TCB,
-+	      const char *tname,
-+	      int *errret GCC_UNUSED)
-+{
-+    assert(TCB != 0);
-+    assert(tname != 0);
-+    TCB->magic = WINMAGIC;
-+    if (*tname == 0 || *tname == 0 || strcmp(tname, "unknown") == 0) {
-+	return TRUE;
-+    } else
-+	return FALSE;
-+}
-+
-+static int
-+drv_dobeepflash(TERMINAL_CONTROL_BLOCK * TCB,
-+		bool beepFlag GCC_UNUSED)
-+{
-+    SCREEN *sp;
-+    int res = ERR;
-+
-+    AssertTCB();
-+    SetSP();
-+
-+    return res;
-+}
-+
-+static int
-+drv_print(TERMINAL_CONTROL_BLOCK * TCB,
-+	  char *data GCC_UNUSED,
-+	  int len GCC_UNUSED)
-+{
-+    SCREEN *sp;
-+
-+    AssertTCB();
-+    SetSP();
-+
-+    return ERR;
-+}
-+
-+static int
-+drv_defaultcolors(TERMINAL_CONTROL_BLOCK * TCB,
-+		  int fg GCC_UNUSED,
-+		  int bg GCC_UNUSED)
-+{
-+    SCREEN *sp;
-+    int code = ERR;
-+
-+    AssertTCB();
-+    SetSP();
-+
-+    return (code);
-+}
-+
-+static void
-+drv_setcolor(TERMINAL_CONTROL_BLOCK * TCB,
-+	     bool fore,
-+	     int color,
-+	     int (*outc) (SCREEN *, int) GCC_UNUSED)
-+{
-+    AssertTCB();
-+
-+    if (TCB && !InvalidConsoleHandle(TCB->hdl)) {
-+	WORD a = MapColor(fore, color);
-+	a = ((PropOf(TCB)->SBI.wAttributes) & (fore ? 0xfff8 : 0xff8f)) | a;
-+	SetConsoleTextAttribute(TCB->hdl, a);
-+	GetConsoleScreenBufferInfo(TCB->hdl, &(PropOf(TCB)->SBI));
-+    }
-+}
-+
-+static bool
-+drv_rescol(TERMINAL_CONTROL_BLOCK * TCB)
-+{
-+    bool res = FALSE;
-+
-+    AssertTCB();
-+    if (TCB && !InvalidConsoleHandle(TCB->hdl)) {
-+	WORD a = FOREGROUND_BLUE | FOREGROUND_RED | FOREGROUND_GREEN;
-+	SetConsoleTextAttribute(TCB->hdl, a);
-+	GetConsoleScreenBufferInfo(TCB->hdl, &(PropOf(TCB)->SBI));
-+	res = TRUE;
-+    }
-+    return res;
-+}
-+
-+static bool
-+drv_rescolors(TERMINAL_CONTROL_BLOCK * TCB)
-+{
-+    int result = FALSE;
-+    SCREEN *sp;
-+
-+    AssertTCB();
-+    SetSP();
-+
-+    return result;
-+}
-+
-+static int
-+drv_size(TERMINAL_CONTROL_BLOCK * TCB, int *Lines, int *Cols)
-+{
-+    AssertTCB();
-+
-+    if (TCB == NULL || Lines == NULL || Cols == NULL || InvalidConsoleHandle(TCB->hdl))
-+	return ERR;
-+
-+    *Lines = (int) (PropOf(TCB)->SBI.dwSize.Y);
-+    *Cols = (int) (PropOf(TCB)->SBI.dwSize.X);
-+    return OK;
-+}
-+
-+static int
-+drv_setsize(TERMINAL_CONTROL_BLOCK * TCB GCC_UNUSED,
-+	    int l GCC_UNUSED,
-+	    int c GCC_UNUSED)
-+{
-+    AssertTCB();
-+    return ERR;
-+}
-+
-+static int
-+drv_mode(TERMINAL_CONTROL_BLOCK * TCB, bool progFlag, bool defFlag)
-+{
-+    SCREEN *sp;
-+    TERMINAL *_term = (TERMINAL *) TCB;
-+    int code = ERR;
-+
-+    AssertTCB();
-+    sp = TCB->csp;
-+
-+    PropOf(TCB)->progMode = progFlag;
-+    SetConsoleActiveScreenBuffer(progFlag ? TCB->hdl : TCB->out);
-+
-+    if (progFlag) /* prog mode */  {
-+	if (defFlag) {
-+	    if ((drv_sgmode(TCB, FALSE, &(_term->Nttyb)) == OK)) {
-+		_term->Nttyb.c_oflag &= ~OFLAGS_TABS;
-+		code = OK;
-+	    }
-+	} else {
-+	    /* reset_prog_mode */
-+	    if (drv_sgmode(TCB, TRUE, &(_term->Nttyb)) == OK) {
-+		if (sp) {
-+		    if (sp->_keypad_on)
-+			_nc_keypad(sp, TRUE);
-+		    NC_BUFFERED(sp, TRUE);
-+		}
-+		code = OK;
-+	    }
-+	}
-+    } else {			/* shell mode */
-+	if (defFlag) {
-+	    /* def_shell_mode */
-+	    if (drv_sgmode(TCB, FALSE, &(_term->Ottyb)) == OK) {
-+		code = OK;
-+	    }
-+	} else {
-+	    /* reset_shell_mode */
-+	    if (sp) {
-+		_nc_keypad(sp, FALSE);
-+		NCURSES_SP_NAME(_nc_flush) (sp);
-+		NC_BUFFERED(sp, FALSE);
-+	    }
-+	    code = drv_sgmode(TCB, TRUE, &(_term->Ottyb));
-+	}
-+    }
-+
-+    return (code);
-+}
-+
-+static void
-+drv_screen_init(SCREEN *sp GCC_UNUSED)
-+{
-+}
-+
-+static void
-+drv_wrap(SCREEN *sp GCC_UNUSED)
-+{
-+}
-+
-+static int
-+rkeycompare(const void *el1, const void *el2)
-+{
-+    WORD key1 = (LOWORD((*((const LONG *) el1)))) & 0x7fff;
-+    WORD key2 = (LOWORD((*((const LONG *) el2)))) & 0x7fff;
-+
-+    return ((key1 < key2) ? -1 : ((key1 == key2) ? 0 : 1));
-+}
-+
-+static int
-+keycompare(const void *el1, const void *el2)
-+{
-+    WORD key1 = HIWORD((*((const LONG *) el1)));
-+    WORD key2 = HIWORD((*((const LONG *) el2)));
-+
-+    return ((key1 < key2) ? -1 : ((key1 == key2) ? 0 : 1));
-+}
-+
-+static int
-+MapKey(TERMINAL_CONTROL_BLOCK * TCB, WORD vKey)
-+{
-+    WORD nKey = 0;
-+    void *res;
-+    LONG key = GenMap(vKey, 0);
-+    int code = -1;
-+
-+    AssertTCB();
-+
-+    res = bsearch(&key,
-+		  PropOf(TCB)->map,
-+		  (size_t) (N_INI + FKEYS),
-+		  sizeof(keylist[0]),
-+		  keycompare);
-+    if (res) {
-+	key = *((LONG *) res);
-+	nKey = LOWORD(key);
-+	code = (int) (nKey & 0x7fff);
-+	if (nKey & 0x8000)
-+	    code = -code;
-+    }
-+    return code;
-+}
-+
-+static void
-+drv_release(TERMINAL_CONTROL_BLOCK * TCB)
-+{
-+    AssertTCB();
-+    if (TCB->prop)
-+	free(TCB->prop);
-+}
-+
-+static void
-+drv_init(TERMINAL_CONTROL_BLOCK * TCB)
-+{
-+    AssertTCB();
-+
-+    if (TCB) {
-+	BOOL b = AllocConsole();
-+	WORD a;
-+	int i;
-+
-+	if (!b)
-+	    b = AttachConsole(ATTACH_PARENT_PROCESS);
-+
-+	TCB->inp = GetStdHandle(STD_INPUT_HANDLE);
-+	TCB->out = GetStdHandle(STD_OUTPUT_HANDLE);
-+
-+	if (getenv("NCGDB"))
-+	    TCB->hdl = TCB->out;
-+	else
-+	    TCB->hdl = CreateConsoleScreenBuffer(GENERIC_READ | GENERIC_WRITE,
-+						 0,
-+						 NULL,
-+						 CONSOLE_TEXTMODE_BUFFER,
-+						 NULL);
-+
-+	if (!InvalidConsoleHandle(TCB->hdl)) {
-+	    TCB->prop = typeCalloc(Properties, 1);
-+	    GetConsoleScreenBufferInfo(TCB->hdl, &(PropOf(TCB)->SBI));
-+	}
-+
-+	TCB->info.initcolor = TRUE;
-+	TCB->info.canchange = FALSE;
-+	TCB->info.hascolor = TRUE;
-+	TCB->info.caninit = TRUE;
-+
-+	TCB->info.maxpairs = NUMPAIRS;
-+	TCB->info.maxcolors = 8;
-+	TCB->info.numlabels = 0;
-+	TCB->info.labelwidth = 0;
-+	TCB->info.labelheight = 0;
-+	TCB->info.nocolorvideo = 1;
-+	TCB->info.tabsize = 8;
-+
-+	TCB->info.defaultPalette = _nc_cga_palette;
-+
-+	for (i = 0; i < (N_INI + FKEYS); i++) {
-+	    if (i < N_INI)
-+		PropOf(TCB)->rmap[i] = PropOf(TCB)->map[i] = keylist[i];
-+	    else
-+		PropOf(TCB)->rmap[i] = PropOf(TCB)->map[i] =
-+		    GenMap((VK_F1 + (i - N_INI)), (KEY_F(1) + (i - N_INI)));
-+	}
-+	qsort(PropOf(TCB)->map,
-+	      (size_t) (MAPSIZE),
-+	      sizeof(keylist[0]),
-+	      keycompare);
-+	qsort(PropOf(TCB)->rmap,
-+	      (size_t) (MAPSIZE),
-+	      sizeof(keylist[0]),
-+	      rkeycompare);
-+
-+	a = MapColor(true, COLOR_WHITE) | MapColor(false, COLOR_BLACK);
-+	for (i = 0; i < NUMPAIRS; i++)
-+	    PropOf(TCB)->pairs[i] = a;
-+    }
-+}
-+
-+static void
-+drv_initpair(TERMINAL_CONTROL_BLOCK * TCB,
-+	     short pair,
-+	     short f,
-+	     short b)
-+{
-+    SCREEN *sp;
-+
-+    AssertTCB();
-+    SetSP();
-+
-+    if ((pair > 0) && (pair < NUMPAIRS) && (f >= 0) && (f < 8)
-+	&& (b >= 0) && (b < 8)) {
-+	PropOf(TCB)->pairs[pair] = MapColor(true, f) | MapColor(false, b);
-+    }
-+}
-+
-+static void
-+drv_initcolor(TERMINAL_CONTROL_BLOCK * TCB,
-+	      short color GCC_UNUSED,
-+	      short r GCC_UNUSED,
-+	      short g GCC_UNUSED,
-+	      short b GCC_UNUSED)
-+{
-+    SCREEN *sp;
-+
-+    AssertTCB();
-+    SetSP();
-+}
-+
-+static void
-+drv_do_color(TERMINAL_CONTROL_BLOCK * TCB,
-+	     short old_pair GCC_UNUSED,
-+	     short pair GCC_UNUSED,
-+	     bool reverse GCC_UNUSED,
-+	     int (*outc) (SCREEN *, int) GCC_UNUSED
-+)
-+{
-+    SCREEN *sp;
-+
-+    AssertTCB();
-+    SetSP();
-+}
-+
-+static void
-+drv_initmouse(TERMINAL_CONTROL_BLOCK * TCB)
-+{
-+    SCREEN *sp;
-+
-+    AssertTCB();
-+    SetSP();
-+}
-+
-+static int
-+drv_mvcur(TERMINAL_CONTROL_BLOCK * TCB,
-+	  int yold GCC_UNUSED, int xold GCC_UNUSED,
-+	  int y, int x)
-+{
-+    int ret = ERR;
-+    if (TCB && !InvalidConsoleHandle(TCB->hdl)) {
-+	COORD loc;
-+	loc.X = (short) x;
-+	loc.Y = (short) y;
-+	SetConsoleCursorPosition(TCB->hdl, loc);
-+	ret = OK;
-+    }
-+    return ret;
-+}
-+
-+static void
-+drv_hwlabel(TERMINAL_CONTROL_BLOCK * TCB,
-+	    int labnum GCC_UNUSED,
-+	    char *text GCC_UNUSED)
-+{
-+    SCREEN *sp;
-+
-+    AssertTCB();
-+    SetSP();
-+}
-+
-+static void
-+drv_hwlabelOnOff(TERMINAL_CONTROL_BLOCK * TCB,
-+		 bool OnFlag GCC_UNUSED)
-+{
-+    SCREEN *sp;
-+
-+    AssertTCB();
-+    SetSP();
-+}
-+
-+static chtype
-+drv_conattr(TERMINAL_CONTROL_BLOCK * TCB GCC_UNUSED)
-+{
-+    chtype res = A_NORMAL;
-+    res |= (A_BOLD | A_DIM | A_REVERSE | A_STANDOUT | A_COLOR);
-+    return res;
-+}
-+
-+static void
-+drv_setfilter(TERMINAL_CONTROL_BLOCK * TCB)
-+{
-+    SCREEN *sp;
-+
-+    AssertTCB();
-+    SetSP();
-+}
-+
-+static int
-+drv_sgmode(TERMINAL_CONTROL_BLOCK * TCB, bool setFlag, TTY * buf)
-+{
-+    DWORD dwFlag = 0;
-+    tcflag_t iflag;
-+    tcflag_t lflag;
-+
-+    AssertTCB();
-+
-+    if (TCB == 0 || buf == NULL)
-+	return ERR;
-+
-+    if (setFlag) {
-+	iflag = buf->c_iflag;
-+	lflag = buf->c_lflag;
-+
-+	GetConsoleMode(TCB->inp, &dwFlag);
-+
-+	if (lflag & ICANON)
-+	    dwFlag |= ENABLE_LINE_INPUT;
-+	else
-+	    dwFlag &= ~ENABLE_LINE_INPUT;
-+
-+	if (lflag & ECHO)
-+	    dwFlag |= ENABLE_ECHO_INPUT;
-+	else
-+	    dwFlag &= ~ENABLE_ECHO_INPUT;
-+
-+	if (iflag & BRKINT)
-+	    dwFlag |= ENABLE_PROCESSED_INPUT;
-+	else
-+	    dwFlag &= ~ENABLE_PROCESSED_INPUT;
-+
-+	/* we disable that for now to focus on keyboard. */
-+	dwFlag &= ~ENABLE_MOUSE_INPUT;
-+
-+	buf->c_iflag = iflag;
-+	buf->c_lflag = lflag;
-+	SetConsoleMode(TCB->inp, dwFlag);
-+	TCB->term.Nttyb = *buf;
-+    } else {
-+	iflag = TCB->term.Nttyb.c_iflag;
-+	lflag = TCB->term.Nttyb.c_lflag;
-+	GetConsoleMode(TCB->inp, &dwFlag);
-+
-+	if (dwFlag & ENABLE_LINE_INPUT)
-+	    lflag |= ICANON;
-+	else
-+	    lflag &= ~ICANON;
-+
-+	if (dwFlag & ENABLE_ECHO_INPUT)
-+	    lflag |= ECHO;
-+	else
-+	    lflag &= ~ECHO;
-+
-+	if (dwFlag & ENABLE_PROCESSED_INPUT)
-+	    iflag |= BRKINT;
-+	else
-+	    iflag &= ~BRKINT;
-+
-+	TCB->term.Nttyb.c_iflag = iflag;
-+	TCB->term.Nttyb.c_lflag = lflag;
-+
-+	*buf = TCB->term.Nttyb;
-+    }
-+    return OK;
-+}
-+
-+static void
-+drv_initacs(TERMINAL_CONTROL_BLOCK * TCB,
-+	    chtype *real_map GCC_UNUSED,
-+	    chtype *fake_map GCC_UNUSED)
-+{
-+    SCREEN *sp;
-+    AssertTCB();
-+    SetSP();
-+}
-+
-+static ULONGLONG
-+tdiff(FILETIME fstart, FILETIME fend)
-+{
-+    ULARGE_INTEGER ustart;
-+    ULARGE_INTEGER uend;
-+    ULONGLONG diff;
-+
-+    ustart.LowPart = fstart.dwLowDateTime;
-+    ustart.HighPart = fstart.dwHighDateTime;
-+    uend.LowPart = fend.dwLowDateTime;
-+    uend.HighPart = fend.dwHighDateTime;
-+
-+    diff = (uend.QuadPart - ustart.QuadPart) / 10000;
-+    return diff;
-+}
-+
-+static int
-+Adjust(int milliseconds, int diff)
-+{
-+    if (milliseconds == INFINITY)
-+	return milliseconds;
-+    milliseconds -= diff;
-+    if (milliseconds < 0)
-+	milliseconds = 0;
-+    return milliseconds;
-+}
-+
-+static int
-+drv_twait(TERMINAL_CONTROL_BLOCK * TCB,
-+	  int mode,
-+	  int milliseconds,
-+	  int *timeleft
-+	  EVENTLIST_2nd(_nc_eventlist * evl))
-+{
-+    SCREEN *sp;
-+    INPUT_RECORD inp;
-+    BOOL b;
-+    DWORD nRead = 0, rc = -1;
-+    int code = 0;
-+    FILETIME fstart;
-+    FILETIME fend;
-+    int diff;
-+    bool isImmed = (milliseconds == 0);
-+
-+#define CONSUME() ReadConsoleInput(TCB->inp,&inp,1,&nRead)
-+
-+    AssertTCB();
-+    SetSP();
-+
-+    if (milliseconds < 0)
-+	milliseconds = INFINITY;
-+
-+    memset(&inp, 0, sizeof(inp));
-+
-+    while (true) {
-+	GetSystemTimeAsFileTime(&fstart);
-+	rc = WaitForSingleObject(TCB->inp, milliseconds);
-+	GetSystemTimeAsFileTime(&fend);
-+	diff = (int) tdiff(fstart, fend);
-+	milliseconds = Adjust(milliseconds, diff);
-+
-+	if (!isImmed && milliseconds == 0)
-+	    break;
-+
-+	if (rc == WAIT_OBJECT_0) {
-+	    if (mode) {
-+		b = GetNumberOfConsoleInputEvents(TCB->inp, &nRead);
-+		if (b && nRead > 0) {
-+		    b = PeekConsoleInput(TCB->inp, &inp, 1, &nRead);
-+		    if (b && nRead > 0) {
-+			switch (inp.EventType) {
-+			case KEY_EVENT:
-+			    if (mode & TW_INPUT) {
-+				WORD vk = inp.Event.KeyEvent.wVirtualKeyCode;
-+				char ch = inp.Event.KeyEvent.uChar.AsciiChar;
-+
-+				if (inp.Event.KeyEvent.bKeyDown) {
-+				    if (0 == ch) {
-+					int nKey = MapKey(TCB, vk);
-+					if ((nKey < 0) || FALSE == sp->_keypad_on) {
-+					    CONSUME();
-+					    continue;
-+					}
-+				    }
-+				    code = TW_INPUT;
-+				    goto end;
-+				} else {
-+				    CONSUME();
-+				}
-+			    }
-+			    continue;
-+			case MOUSE_EVENT:
-+			    if (0 && mode & TW_MOUSE) {
-+				code = TW_MOUSE;
-+				goto end;
-+			    } else
-+				continue;
-+			default:
-+			    SetConsoleActiveScreenBuffer(!PropOf(TCB)->progMode ?
-+							 TCB->hdl : TCB->out);
-+			    continue;
-+			}
-+		    }
-+		}
-+	    }
-+	    continue;
-+	} else {
-+	    if (rc != WAIT_TIMEOUT) {
-+		code = -1;
-+		break;
-+	    } else {
-+		code = 0;
-+		break;
-+	    }
-+	}
-+    }
-+  end:
-+    if (timeleft)
-+	*timeleft = milliseconds;
-+
-+    return code;
-+}
-+
-+static int
-+drv_read(TERMINAL_CONTROL_BLOCK * TCB, int *buf)
-+{
-+    SCREEN *sp;
-+    int n = 1;
-+    INPUT_RECORD inp;
-+    BOOL b;
-+    DWORD nRead;
-+    WORD vk;
-+    WORD sc;
-+
-+    AssertTCB();
-+    assert(buf);
-+    SetSP();
-+
-+    memset(&inp, 0, sizeof(inp));
-+
-+    while ((b = ReadConsoleInput(TCB->inp, &inp, 1, &nRead))) {
-+	if (b && nRead > 0) {
-+	    if (inp.EventType == KEY_EVENT) {
-+		if (!inp.Event.KeyEvent.bKeyDown)
-+		    continue;
-+		*buf = (int) inp.Event.KeyEvent.uChar.AsciiChar;
-+		vk = inp.Event.KeyEvent.wVirtualKeyCode;
-+		sc = inp.Event.KeyEvent.wVirtualScanCode;
-+		if (*buf == 0) {
-+		    if (sp->_keypad_on) {
-+			*buf = MapKey(TCB, vk);
-+			if (0 > (*buf))
-+			    continue;
-+			else
-+			    break;
-+		    } else
-+			continue;
-+		} else {	/* *buf != 0 */
-+		    break;
-+		}
-+	    } else if (0 && inp.EventType == MOUSE_EVENT) {
-+		*buf = KEY_MOUSE;
-+		break;
-+	    }
-+	    continue;
-+	}
-+    }
-+    return n;
-+}
-+
-+static int
-+drv_nap(TERMINAL_CONTROL_BLOCK * TCB GCC_UNUSED, int ms)
-+{
-+    Sleep(ms);
-+    return OK;
-+}
-+
-+static bool
-+drv_kyExist(TERMINAL_CONTROL_BLOCK * TCB, int keycode)
-+{
-+    SCREEN *sp;
-+    WORD nKey;
-+    void *res;
-+    bool found = FALSE;
-+    LONG key = GenMap(0, (WORD) keycode);
-+
-+    AssertTCB();
-+    SetSP();
-+
-+    AssertTCB();
-+
-+    res = bsearch(&key,
-+		  PropOf(TCB)->rmap,
-+		  (size_t) (N_INI + FKEYS),
-+		  sizeof(keylist[0]),
-+		  rkeycompare);
-+    if (res) {
-+	key = *((LONG *) res);
-+	nKey = LOWORD(key);
-+	if (!(nKey & 0x8000))
-+	    found = TRUE;
-+    }
-+    return found;
-+}
-+
-+static int
-+drv_kpad(TERMINAL_CONTROL_BLOCK * TCB, bool flag GCC_UNUSED)
-+{
-+    SCREEN *sp;
-+    int code = ERR;
-+
-+    AssertTCB();
-+    sp = TCB->csp;
-+
-+    if (sp) {
-+	code = OK;
-+    }
-+    return code;
-+}
-+
-+static int
-+drv_keyok(TERMINAL_CONTROL_BLOCK * TCB, int keycode, bool flag)
-+{
-+    int code = ERR;
-+    SCREEN *sp;
-+    WORD nKey;
-+    WORD vKey;
-+    void *res;
-+    LONG key = GenMap(0, (WORD) keycode);
-+
-+    AssertTCB();
-+    SetSP();
-+
-+    if (sp) {
-+	res = bsearch(&key,
-+		      PropOf(TCB)->rmap,
-+		      (size_t) (N_INI + FKEYS),
-+		      sizeof(keylist[0]),
-+		      rkeycompare);
-+	if (res) {
-+	    key = *((LONG *) res);
-+	    vKey = HIWORD(key);
-+	    nKey = (LOWORD(key)) & 0x7fff;
-+	    if (!flag)
-+		nKey |= 0x8000;
-+	    *(LONG *) res = GenMap(vKey, nKey);
-+	}
-+    }
-+    return code;
-+}
-diff -Naur ncurses-5.7.orig/NEWS ncurses-5.7/NEWS
---- ncurses-5.7.orig/NEWS	2008-11-01 17:56:22.000000000 -0700
-+++ ncurses-5.7/NEWS	2009-07-19 15:04:17.000000000 -0700
-@@ -1,5 +1,5 @@
- -------------------------------------------------------------------------------
---- Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.               --
-+-- Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.               --
- --                                                                           --
- -- Permission is hereby granted, free of charge, to any person obtaining a   --
- -- copy of this software and associated documentation files (the             --
-@@ -25,7 +25,7 @@
- -- sale, use or other dealings in this Software without prior written        --
- -- authorization.                                                            --
- -------------------------------------------------------------------------------
---- $Id: NEWS,v 1.1320 2008/11/02 00:56:22 tom Exp $
-+-- $Id: NEWS,v 1.1409 2009/07/19 00:09:05 tom Exp $
- -------------------------------------------------------------------------------
- 
- This is a log of changes that ncurses has gone through since Zeyd started
-@@ -45,6 +45,300 @@
- Changes through 1.9.9e did not credit all contributions;
- it is not possible to add this information.
- 
-+20090718
-+	+ fix a null-pointer check in _nc_format_slks() in lib_slk.c, from
-+	  20070704 changes.
-+	+ modify _nc_find_type_entry() to use hashing.
-+	+ make CCHARW_MAX value configurable, noting that changing this would
-+	  change the size of cchar_t, and would be ABI-incompatible.
-+	+ modify test-programs, e.g,.  test/view.c, to address subtle
-+	  differences between Tru64/Solaris and HPUX/AIX getcchar() return
-+	  values.
-+	+ modify length returned by getcchar() to count the trailing null
-+	  which is documented in X/Open (cf: 20020427).
-+	+ fixes for test programs to build/work on HPUX and AIX, etc.
-+
-+20090711
-+	+ improve performance of tigetstr, etc., by using hashing code from tic.
-+	+ minor fixes for memory-leak checking.
-+	+ add test/demo_terminfo, for comparison with demo_termcap
-+
-+20090704
-+	+ remove wide-character checks from unctrl() (patch by Clemens Ladisch).
-+	+ revise wadd_wch() and wecho_wchar() to eliminate dependency on
-+	  unctrl().
-+	+ continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
-+
-+20090627
-+	+ update llib-lncurses[wt] to use sp-funcs.
-+	+ various code-fixes to build/work with --disable-macros configure
-+	  option.
-+	+ add several new files from Juergen Pfeifer which will be used when
-+	  integration of "sp-funcs" is complete.  This includes a port to
-+	  MinGW.
-+
-+20090613
-+	+ move definition for NCURSES_WRAPPED_VAR back to ncurses_dll.h, to
-+	  make includes of term.h without curses.h work (report by "Nix").
-+	+ continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
-+
-+20090607
-+	+ fix a regression in lib_tputs.c, from ongoing merges.
-+
-+20090606
-+	+ continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
-+
-+20090530
-+	+ fix an infinite recursion when adding a legacy-coding 8-bit value
-+	  using insch() (report by Clemens Ladisch).
-+	+ free home-terminfo string in del_curterm() (patch by Dan Weber).
-+	+ continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
-+
-+20090523
-+	+ continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
-+
-+20090516
-+	+ work around antique BSD game's manipulation of stdscr, etc., versus
-+	  SCREEN's copy of the pointer (Debian #528411).
-+	+ add a cast to wattrset macro to avoid compiler warning when comparing
-+	  its result against ERR (adapted from patch by Matt Kraii, Debian
-+	  #528374).
-+
-+20090510
-+	+ continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
-+
-+20090502
-+	+ continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
-+	+ add vwmterm terminfo entry (patch by Bryan Christ).
-+
-+20090425
-+	+ continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
-+
-+20090419
-+	+ build fix for _nc_free_and_exit() change in 20090418 (report by
-+	  Christian Ebert).
-+
-+20090418
-+	+ continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
-+
-+20090411
-+	+ continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
-+	  This change finishes merging for menu and panel libraries, does
-+	  part of the form library.
-+
-+20090404
-+	+ suppress configure check for static/dynamic linker flags for gcc on
-+	  Darwin (report by Nelson Beebe).
-+
-+20090328
-+	+ extend ansi.sys pfkey capability from kf1-kf10 to kf1-kf48, moving
-+	  function key definitions from emx-base for consistency -TD
-+	+ correct missing final 'p' in pfkey capability of ansi.sys-old (report
-+	  by Kalle Olavi Niemitalo).
-+	+ improve test/ncurses.c 'F' test, show combining characters in color.
-+	+ quiet a false report by cppcheck in c++/cursesw.cc by eliminating
-+	  a temporary variable.
-+	+ use _nc_doalloc() rather than realloc() in a few places in ncurses
-+	  library to avoid leak in out-of-memory condition (reports by William
-+	  Egert and Martin Ettl based on cppcheck tool).
-+	+ add --with-ncurses-wrap-prefix option to test/configure (discussion
-+	  with Charles Wilson).
-+	+ use ncurses*-config scripts if available for test/configure.
-+	+ update test/aclocal.m4 and test/configure
-+	> patches by Charles Wilson:
-+	+ modify CF_WITH_LIBTOOL configure check to allow unreleased libtool
-+	  version numbers (e.g.  which include alphabetic chars, as well as
-+	  digits, after the final '.').
-+	+ improve use of -no-undefined option for libtool by setting an
-+	  intermediate variable LT_UNDEF in the configure script, and then
-+	  using that in the libtool link-commands.
-+	+ fix an missing use of NCURSES_PUBLIC_VAR() in tinfo/MKcodes.awk
-+	  from 2009031 changes.
-+	+ improve mk-1st.awk script by writing separate cases for the
-+	  LIBTOOL_LINK command, depending on which library (ncurses, ticlib,
-+	  termlib) is to be linked.
-+	+ modify configure.in to allow broken-linker configurations, not just
-+	  enable-reentrant, to set public wrap prefix.
-+
-+20090321
-+	+ add TICS_LIST and SHLIB_LIST to allow libtool 2.2.6 on Cygwin to
-+	  build with tic and term libraries (patch by Charles Wilson).
-+	+ add -no-undefined option to libtool for Cygwin, MinGW, U/Win and AIX
-+	  (report by Charles Wilson).
-+	+ fix definition for c++/Makefile.in's SHLIB_LIST, which did not list
-+	  the form, menu or panel libraries (patch by Charles Wilson).
-+	+ add configure option --with-wrap-prefix to allow setting the prefix
-+	  for functions used to wrap global variables to something other than
-+	  "_nc_" (discussion with Charles Wilson).
-+
-+20090314
-+	+ modify scripts to generate ncurses*-config and pc-files to add
-+	  dependency for tinfo library (patch by Charles Wilson).
-+	+ improve comparison of program-names when checking for linked flavors
-+	  such as "reset" by ignoring the executable suffix (reports by Charles
-+	  Wilson, Samuel Thibault and Cedric Bretaudeau on Cygwin mailing
-+	  list).
-+	+ suppress configure check for static/dynamic linker flags for gcc on
-+	  Solaris 10, since gcc is confused by absence of static libc, and
-+	  does not switch back to dynamic mode before finishing the libraries
-+	  (reports by Joel Bertrand, Alan Pae).
-+	+ minor fixes to Intel compiler warning checks in configure script.
-+	+ modify _nc_leaks_tinfo() so leak-checking in test/railroad.c works.
-+	+ modify set_curterm() to make broken-linker configuration work with
-+	  changes from 20090228 (report by Charles Wilson).
-+
-+20090228
-+	+ continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
-+	+ modify declaration of cur_term when broken-linker is used, but
-+	  enable-reentrant is not, to match pre-5.7 (report by Charles Wilson).
-+
-+20090221
-+	+ continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
-+
-+20090214
-+	+ add configure script --enable-sp-funcs to enable the new set of
-+	  extended functions.
-+	+ start integrating patches by Juergen Pfeifer:
-+	  + add extended functions which specify the SCREEN pointer for several
-+	    curses functions which use the global SP (these are incomplete;
-+	    some internals work is needed to complete these).
-+	  + add special cases to configure script for MinGW port.
-+
-+20090207
-+	+ update several configure macros from lynx changes
-+	  + append (not prepend) to CFLAGS/CPPFLAGS
-+	  + change variable from PATHSEP to PATH_SEPARATOR
-+	+ improve install-rules for pc-files (patch by Miroslav Lichvar).
-+	  + make it work with $DESTDIR
-+	  + create the pkg-config library directory if needed.
-+
-+20090124
-+	+ modify init_pair() to allow caller to create extra color pairs beyond
-+	  the color_pairs limit, which use default colors (request by Emanuele
-+	  Giaquinta).
-+	+ add misc/terminfo.tmp and misc/*.pc to "sources" rule.
-+	+ fix typo "==" where "=" is needed in ncurses-config.in and
-+	  gen-pkgconfig.in files (Debian #512161).
-+
-+20090117
-+	+ add -shared option to MK_SHARED_LIB when -Bsharable is used, for
-+	  *BSD's, without which "main" might be one of the shared library's
-+	  dependencies (report/analysis by Ken Dickey).
-+	+ modify waddch_literal(), updating line-pointer after a multicolumn
-+	  character is found to not fit on the current row, and wrapping is
-+	  done.  Since the line-pointer was not updated, the wrapped
-+	  multicolumn character was written to the beginning of the current row
-+	  (cf: 20041023, reported by "Nick" regarding problem with ncmpc
-+	  http://musicpd.org/mantis/bug_view_page.php?bug_id=1930).
-+
-+20090110
-+	+ add screen.Eterm terminfo entry (GenToo #124887) -TD
-+	+ modify adacurses-config to look for ".ali" files in the adalib
-+	  directory.
-+	+ correct install for Ada95, which omitted libAdaCurses.a used in
-+	  adacurses-config
-+	+ change install for adacurses-config to provide additional flavors
-+	  such as adacursesw-config, for ncursesw (GenToo #167849).
-+
-+20090105
-+	+ remove undeveloped feature in ncurses-config.in for setting
-+	  prefix variable.
-+	+ recent change to ncurses-config.in did not take into account the
-+	  --disable-overwrite option, which sets $includedir to the
-+	  subdirectory and using just that for a -I option does not work - fix
-+	  (report by Frederic L W Meunier).
-+
-+20090104
-+	+ modify gen-pkgconfig.in to eliminate a dependency on rpath when
-+	  deciding whether to add $LIBS to --libs output; that should be shown
-+	  for the ncurses and tinfo libraries without taking rpath into
-+	  account.
-+	+ fix an overlooked change from $AR_OPTS to $ARFLAGS in mk-1st.awk,
-+	  used in static libraries (report by Marty Jack).
-+
-+20090103
-+	+ add a configure-time check to pick a suitable value for
-+	  CC_SHARED_OPTS for Solaris (report by Dagobert Michelsen).
-+	+ add configure --with-pkg-config and --enable-pc-files options, along
-+	  with misc/gen-pkgconfig.in which can be used to generate ".pc" files
-+	  for pkg-config (request by Jan Engelhardt).
-+	+ use $includedir symbol in misc/ncurses-config.in, add --includedir
-+	  option.
-+	+ change makefiles to use $ARFLAGS rather than $AR_OPTS, provide a
-+	  configure check to detect whether a "-" is needed before "ar"
-+	  options.
-+	+ update config.guess, config.sub from
-+		http://savannah.gnu.org/projects/config
-+
-+20081227
-+	+ modify mk-1st.awk to work with extra categories for tinfo library.
-+	+ modify configure script to allow building shared libraries with gcc
-+	  on AIX 5 or 6 (adapted from patch by Lital Natan).
-+
-+20081220
-+	+ modify to omit the opaque-functions from lib_gen.o when
-+	  --disable-ext-funcs is used.
-+	+ add test/clip_printw.c to illustrate how to use printw without
-+	  wrapping.
-+	+ modify ncurses 'F' test to demo wborder_set() with colored lines.
-+	+ modify ncurses 'f' test to demo wborder() with colored lines.
-+
-+20081213
-+	+ add check for failure to open hashed-database needed for db4.6
-+	  (GenToo #245370).
-+	+ corrected --without-manpages option; previous change only suppressed
-+	  the auxiliary rules install.man and uninstall.man
-+	+ add case for FreeMINT to configure macro CF_XOPEN_SOURCE (patch from
-+	  GenToo #250454).
-+	+ fixes from NetBSD port at
-+	  http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/devel/ncurses/patches
-+	  patch-ac (build-fix for DragonFly)
-+	  patch-ae (use INSTALL_SCRIPT for installing misc/ncurses*-config).
-+	+ improve configure script macros CF_HEADER_PATH and CF_LIBRARY_PATH
-+	  by adding CFLAGS, CPPFLAGS and LDFLAGS, LIBS values to the
-+	  search-lists.
-+	+ correct title string for keybound manpage (patch by Frederic Culot,
-+	  OpenBSD documentation/6019),
-+
-+20081206
-+	+ move del_curterm() call from _nc_freeall() to _nc_leaks_tinfo() to
-+	  work for progs/clear, progs/tabs, etc.
-+	+ correct buffer-size after internal resizing of wide-character
-+	  set_field_buffer(), broken in 20081018 changes (report by Mike Gran).
-+	+ add "-i" option to test/filter.c to tell it to use initscr() rather
-+	  than newterm(), to investigate report on comp.unix.programmer that
-+	  ncurses would clear the screen in that case (it does not - the issue
-+	  was xterm's alternate screen feature).
-+	+ add check in mouse-driver to disable connection if GPM returns a
-+	  zero, indicating that the connection is closed (Debian #506717,
-+	  adapted from patch by Samuel Thibault).
-+
-+20081129
-+	+ improve a workaround in adding wide-characters, when a control
-+	  character is found.  The library (cf: 20040207) uses unctrl() to
-+	  obtain a printable version of the control character, but was not
-+	  passing color or video attributes.
-+	+ improve test/ncurses.c 'a' test, using unctrl() more consistently to
-+	  display meta-characters.
-+	+ turn on _XOPEN_CURSES definition in curses.h
-+	+ add eterm-color entry (report by Vincent Lefevre) -TD
-+	+ correct use of key_name() in test/ncurses.c 'A' test, which only
-+	  displays wide-characters, not key-codes since 20070612 (report by
-+	  Ricardo Cantu).
-+
-+20081122
-+	+ change _nc_has_mouse() to has_mouse(), reflect its use in C++ and
-+	  Ada95 (patch by Juergen Pfeifer).
-+	+ document in TO-DO an issue with Cygwin's package for GNAT (report
-+	  by Mike Dennison).
-+	+ improve error-checking of command-line options in "tabs" program.
-+
-+20081115
-+	+ change several terminfo entries to make consistent use of ANSI
-+	  clear-all-tabs -TD
-+	+ add "tabs" program (prompted by Debian #502260).
-+	+ add configure --without-manpages option (request by Mike Frysinger).
-+
- 20081102 5.7 release for upload to ftp.gnu.org
- 
- 20081025
-diff -Naur ncurses-5.7.orig/panel/Makefile.in ncurses-5.7/panel/Makefile.in
---- ncurses-5.7.orig/panel/Makefile.in	2007-04-28 07:56:11.000000000 -0700
-+++ ncurses-5.7/panel/Makefile.in	2009-07-19 15:03:48.000000000 -0700
-@@ -1,6 +1,6 @@
--# $Id: Makefile.in,v 1.52 2007/04/28 14:56:11 tom Exp $
-+# $Id: Makefile.in,v 1.54 2009/03/28 18:22:39 Charles.Wilson Exp $
- ##############################################################################
--# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.                #
-+# Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.                #
- #                                                                            #
- # Permission is hereby granted, free of charge, to any person obtaining a    #
- # copy of this software and associated documentation files (the "Software"), #
-@@ -64,6 +64,7 @@
- LIBTOOL_LINK	= @LIB_LINK@
- LIBTOOL_INSTALL	= @LIB_INSTALL@
- LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
-+LT_UNDEF	= @LT_UNDEF@
- 
- INSTALL		= @INSTALL@
- INSTALL_LIB	= @INSTALL@ @INSTALL_LIB@
-@@ -71,7 +72,7 @@
- INSTALL_DATA	= @INSTALL_DATA@
- 
- AR		= @AR@
--AR_OPTS		= @AR_OPTS@
-+ARFLAGS		= @ARFLAGS@
- AWK		= @AWK@
- LD		= @LD@
- LN_S		= @LN_S@
-diff -Naur ncurses-5.7.orig/panel/p_above.c ncurses-5.7/panel/p_above.c
---- ncurses-5.7.orig/panel/p_above.c	2005-02-19 08:44:57.000000000 -0800
-+++ ncurses-5.7/panel/p_above.c	2009-07-19 15:03:51.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -29,24 +29,56 @@
- /****************************************************************************
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995                    *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-+ *     and: Juergen Pfeifer                         1997-1999,2008          *
-  ****************************************************************************/
- 
- /* p_above.c
-  */
- #include "panel.priv.h"
- 
--MODULE_ID("$Id: p_above.c,v 1.6 2005/02/19 16:44:57 tom Exp $")
-+MODULE_ID("$Id: p_above.c,v 1.7 2009/04/11 20:03:06 tom Exp $")
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(PANEL *)
-+ground_panel(SCREEN * sp)
-+{
-+  T((T_CALLED("ground_panel(%p)"), sp));
-+  if (sp)
-+    {
-+      struct panelhook *ph = NCURSES_SP_NAME(_nc_panelhook) (sp);
-+
-+      if (_nc_bottom_panel)	/* this is the pseudo panel */
-+	returnPanel(_nc_bottom_panel->above);
-+      else
-+	returnPanel(0);
-+    }
-+  else
-+    {
-+      if (0 == CURRENT_SCREEN)
-+	returnPanel(0);
-+      else
-+	returnPanel(ground_panel(CURRENT_SCREEN));
-+    }
-+}
-+#endif
- 
- NCURSES_EXPORT(PANEL *)
- panel_above(const PANEL * pan)
- {
-+  PANEL *result;
-+
-   T((T_CALLED("panel_above(%p)"), pan));
--  if (!pan)
-+  if (pan)
-+    result = pan->above;
-+  else
-     {
-+#if NCURSES_SP_FUNCS
-+      result = ground_panel(CURRENT_SCREEN);
-+#else
-       /* if top and bottom are equal, we have no or only the pseudo panel;
-          if not, we return the panel above the pseudo panel */
--      returnPanel(EMPTY_STACK()? (PANEL *) 0 : _nc_bottom_panel->above);
-+      result = EMPTY_STACK()? (PANEL *) 0 : _nc_bottom_panel->above;
-+#endif
-     }
--  else
--    returnPanel(pan->above);
-+  returnPanel(result);
- }
-diff -Naur ncurses-5.7.orig/panel/panel.c ncurses-5.7/panel/panel.c
---- ncurses-5.7.orig/panel/panel.c	2005-02-19 10:04:31.000000000 -0800
-+++ ncurses-5.7/panel/panel.c	2009-07-19 15:03:51.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -29,12 +29,14 @@
- /****************************************************************************
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995                    *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-+ *     and: Juergen Pfeifer                         1996-1999,2008          *
-+ *     and: Thomas E. Dickey                                                *
-  ****************************************************************************/
- 
- /* panel.c -- implementation of panels library, some core routines */
- #include "panel.priv.h"
- 
--MODULE_ID("$Id: panel.c,v 1.23 2005/02/19 18:04:31 tom Exp $")
-+MODULE_ID("$Id: panel.c,v 1.24 2009/04/11 21:29:10 tom Exp $")
- 
- /*+-------------------------------------------------------------------------
- 	_nc_retrace_panel (pan)
-@@ -91,6 +93,8 @@
- {
-   char s80[80];
- 
-+  GetPanelHook(pan);
-+
-   sprintf(s80, fmt, num, pan);
-   _tracef("%s b=%s t=%s", s80,
- 	  (_nc_bottom_panel) ? USER_PTR(_nc_bottom_panel->user) : "--",
-diff -Naur ncurses-5.7.orig/panel/panel.h ncurses-5.7/panel/panel.h
---- ncurses-5.7.orig/panel/panel.h	2006-05-27 12:49:40.000000000 -0700
-+++ ncurses-5.7/panel/panel.h	2009-07-19 15:03:51.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2001,2006 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -29,9 +29,10 @@
- /****************************************************************************
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995                    *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-+ *     and: Juergen Pfeifer                         1996-1999,2008          *
-  ****************************************************************************/
- 
--/* $Id: panel.h,v 1.10 2006/05/27 19:49:40 tom Exp $ */
-+/* $Id: panel.h,v 1.11 2009/04/11 19:50:40 tom Exp $ */
- 
- /* panel.h -- interface file for panels library */
- 
-@@ -68,6 +69,13 @@
- extern NCURSES_EXPORT(int)     replace_panel (PANEL *,WINDOW *);
- extern NCURSES_EXPORT(int)     panel_hidden (const PANEL *);
- 
-+#if NCURSES_SP_FUNCS
-+extern NCURSES_EXPORT(PANEL *) ground_panel(SCREEN *);
-+extern NCURSES_EXPORT(PANEL *) ceiling_panel(SCREEN *);
-+
-+extern NCURSES_EXPORT(void)    NCURSES_SP_NAME(update_panels) (SCREEN*);
-+#endif
-+
- #if	defined(__cplusplus)
- }
- #endif
-diff -Naur ncurses-5.7.orig/panel/panel.priv.h ncurses-5.7/panel/panel.priv.h
---- ncurses-5.7.orig/panel/panel.priv.h	2008-09-27 15:36:11.000000000 -0700
-+++ ncurses-5.7/panel/panel.priv.h	2009-07-19 15:03:51.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2005,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -26,7 +26,7 @@
-  * authorization.                                                           *
-  ****************************************************************************/
- 
--/* $Id: panel.priv.h,v 1.22 2008/09/27 22:36:11 tom Exp $ */
-+/* $Id: panel.priv.h,v 1.23 2009/04/11 20:33:55 tom Exp $ */
- 
- #ifndef NCURSES_PANEL_PRIV_H
- #define NCURSES_PANEL_PRIV_H 1
-@@ -39,9 +39,11 @@
- #include <string.h>
- #include <assert.h>
- 
--#include "curses.priv.h"
-+struct screen;              /* forward declaration */
-+
-+#include "curses.priv.h"    /* includes nc_panel.h */
- #include "panel.h"
--#include <nc_panel.h>
-+
- 
- #if USE_RCS_IDS
- #  define MODULE_ID(id) static const char Ident[] = id;
-@@ -83,14 +85,38 @@
- #  define Touchline(pan,start,count) touchline((pan)->win,start,count)
- #endif
- 
-+#if NCURSES_SP_FUNCS
-+#define GetScreenHook(sp) \
-+			struct panelhook* ph = NCURSES_SP_NAME(_nc_panelhook)(sp)
-+#define GetPanelHook(pan) \
-+			GetScreenHook(_nc_screen_of((pan)->win))
-+#define GetWindowHook(win) \
-+			SCREEN* sp = _nc_screen_of(win); \
-+			GetScreenHook(sp)
-+#define GetHook(pan)	SCREEN* sp = _nc_screen_of(pan->win); \
-+			GetScreenHook(sp)
-+
-+#define _nc_stdscr_pseudo_panel ((ph)->stdscr_pseudo_panel)
-+#define _nc_top_panel           ((ph)->top_panel)
-+#define _nc_bottom_panel        ((ph)->bottom_panel)
-+
-+#else	/* !NCURSES_SP_FUNCS */
-+
-+#define GetScreenHook(sp) /* nothing */
-+#define GetPanelHook(pan) /* nothing */
-+#define GetWindowHook(win) /* nothing */
-+#define GetHook(pan) /* nothing */
-+
- #define _nc_stdscr_pseudo_panel _nc_panelhook()->stdscr_pseudo_panel
--#define _nc_top_panel _nc_panelhook()->top_panel
--#define _nc_bottom_panel _nc_panelhook()->bottom_panel
-+#define _nc_top_panel           _nc_panelhook()->top_panel
-+#define _nc_bottom_panel        _nc_panelhook()->bottom_panel
- 
--#define EMPTY_STACK() (_nc_top_panel==_nc_bottom_panel)
--#define Is_Bottom(p)  (((p)!=(PANEL*)0) && !EMPTY_STACK() && (_nc_bottom_panel->above==(p)))
--#define Is_Top(p) (((p)!=(PANEL*)0) && !EMPTY_STACK() && (_nc_top_panel==(p)))
--#define Is_Pseudo(p) ((p) && ((p)==_nc_bottom_panel))
-+#endif	/* NCURSES_SP_FUNCS */
-+
-+#define EMPTY_STACK() (_nc_top_panel == _nc_bottom_panel)
-+#define Is_Bottom(p)  (((p) != (PANEL*)0) && !EMPTY_STACK() && (_nc_bottom_panel->above == (p)))
-+#define Is_Top(p)     (((p) != (PANEL*)0) && !EMPTY_STACK() && (_nc_top_panel == (p)))
-+#define Is_Pseudo(p)  (((p) != (PANEL*)0) && ((p) == _nc_bottom_panel))
- 
- /*+-------------------------------------------------------------------------
- 	IS_LINKED(pan) - check to see if panel is in the stack
-@@ -122,7 +148,7 @@
-    ix2 = (PENDX(pan1)   < PENDX(pan2))   ? PENDX(pan1)   : PENDX(pan2);\
-    iy1 = (PSTARTY(pan1) < PSTARTY(pan2)) ? PSTARTY(pan2) : PSTARTY(pan1);\
-    iy2 = (PENDY(pan1)   < PENDY(pan2))   ? PENDY(pan1)   : PENDY(pan2);\
--   assert((ix1<=ix2) && (iy1<=iy2));\
-+   assert((ix1<=ix2) && (iy1<=iy2))
- 
- 
- /*+-------------------------------------------------------------------------
-@@ -136,12 +162,12 @@
- {  PANEL* pan2 = ((panstart) ? (panstart) : _nc_bottom_panel);\
-    while(pan2) {\
-       if ((pan2 != pan) && PANELS_OVERLAPPED(pan,pan2)) {\
--        int y,ix1,ix2,iy1,iy2;\
--        COMPUTE_INTERSECTION(pan,pan2,ix1,ix2,iy1,iy2);\
-+        int y, ix1, ix2, iy1, iy2;\
-+        COMPUTE_INTERSECTION(pan, pan2, ix1, ix2, iy1, iy2);\
- 	for(y = iy1; y <= iy2; y++) {\
- 	  if (is_linetouched(pan->win,y - PSTARTY(pan))) {\
-             struct ldat* line = &(pan2->win->_line[y - PSTARTY(pan2)]);\
--            CHANGED_RANGE(line,ix1-PSTARTX(pan2),ix2-PSTARTX(pan2));\
-+            CHANGED_RANGE(line, ix1 - PSTARTX(pan2), ix2 - PSTARTX(pan2));\
-           }\
- 	}\
-       }\
-@@ -180,4 +206,9 @@
-       err = err_if_unlinked;\
-   }
- 
-+#if NCURSES_SP_FUNCS
-+/* These may become later renamed and part of panel.h and the public API */
-+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_update_panels)(SCREEN*);
-+#endif
-+
- #endif /* NCURSES_PANEL_PRIV_H */
-diff -Naur ncurses-5.7.orig/panel/p_below.c ncurses-5.7/panel/p_below.c
---- ncurses-5.7.orig/panel/p_below.c	2005-02-19 08:45:10.000000000 -0800
-+++ ncurses-5.7/panel/p_below.c	2009-07-19 15:03:51.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -29,26 +29,57 @@
- /****************************************************************************
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995                    *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-+ *     and: Juergen Pfeifer                         1997-1999,2008          *
-  ****************************************************************************/
- 
- /* p_below.c
-  */
- #include "panel.priv.h"
- 
--MODULE_ID("$Id: p_below.c,v 1.6 2005/02/19 16:45:10 tom Exp $")
-+MODULE_ID("$Id: p_below.c,v 1.7 2009/04/11 20:17:59 tom Exp $")
- 
-+#if NCURSES_SP_FUNCS
- NCURSES_EXPORT(PANEL *)
--panel_below(const PANEL * pan)
-+ceiling_panel(SCREEN * sp)
- {
--  T((T_CALLED("panel_below(%p)"), pan));
--  if (!pan)
-+  T((T_CALLED("ceiling_panel(%p)"), sp));
-+  if (sp)
-     {
-+      struct panelhook *ph = NCURSES_SP_NAME(_nc_panelhook) (sp);
-+
-       /* if top and bottom are equal, we have no or only the pseudo panel */
-       returnPanel(EMPTY_STACK()? (PANEL *) 0 : _nc_top_panel);
-     }
-   else
-     {
-+      if (0 == CURRENT_SCREEN)
-+	returnPanel(0);
-+      else
-+	returnPanel(ceiling_panel(CURRENT_SCREEN));
-+    }
-+}
-+#endif
-+
-+NCURSES_EXPORT(PANEL *)
-+panel_below(const PANEL * pan)
-+{
-+  PANEL *result;
-+
-+  T((T_CALLED("panel_below(%p)"), pan));
-+  if (pan)
-+    {
-+      GetHook(pan);
-       /* we must not return the pseudo panel */
--      returnPanel(Is_Pseudo(pan->below) ? (PANEL *) 0 : pan->below);
-+      result = Is_Pseudo(pan->below) ? (PANEL *) 0 : pan->below;
-+    }
-+  else
-+    {
-+#if NCURSES_SP_FUNCS
-+      result = ceiling_panel(CURRENT_SCREEN);
-+#else
-+      /* if top and bottom are equal, we have no or only the pseudo panel */
-+      result = EMPTY_STACK()? (PANEL *) 0 : _nc_top_panel;
-+#endif
-     }
-+  returnPanel(result);
- }
-diff -Naur ncurses-5.7.orig/panel/p_bottom.c ncurses-5.7/panel/p_bottom.c
---- ncurses-5.7.orig/panel/p_bottom.c	2005-02-19 08:38:16.000000000 -0800
-+++ ncurses-5.7/panel/p_bottom.c	2009-07-19 15:03:51.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -29,6 +29,7 @@
- /****************************************************************************
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995                    *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-+ *     and: Juergen Pfeifer                         1997-1999,2008          *
-  ****************************************************************************/
- 
- /* p_bottom.c
-@@ -36,7 +37,7 @@
-  */
- #include "panel.priv.h"
- 
--MODULE_ID("$Id: p_bottom.c,v 1.11 2005/02/19 16:38:16 tom Exp $")
-+MODULE_ID("$Id: p_bottom.c,v 1.12 2008/11/16 00:19:59 juergen Exp $")
- 
- NCURSES_EXPORT(int)
- bottom_panel(PANEL * pan)
-@@ -46,6 +47,7 @@
-   T((T_CALLED("bottom_panel(%p)"), pan));
-   if (pan)
-     {
-+      GetHook(pan);
-       if (!Is_Bottom(pan))
- 	{
- 
-diff -Naur ncurses-5.7.orig/panel/p_delete.c ncurses-5.7/panel/p_delete.c
---- ncurses-5.7.orig/panel/p_delete.c	2005-02-19 08:38:45.000000000 -0800
-+++ ncurses-5.7/panel/p_delete.c	2009-07-19 15:03:51.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -29,6 +29,7 @@
- /****************************************************************************
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995                    *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-+ *     and: Juergen Pfeifer                         1999,2008               *
-  ****************************************************************************/
- 
- /* p_delete.c
-@@ -36,7 +37,7 @@
-  */
- #include "panel.priv.h"
- 
--MODULE_ID("$Id: p_delete.c,v 1.8 2005/02/19 16:38:45 tom Exp $")
-+MODULE_ID("$Id: p_delete.c,v 1.9 2009/04/11 18:58:36 tom Exp $")
- 
- NCURSES_EXPORT(int)
- del_panel(PANEL * pan)
-@@ -47,8 +48,11 @@
-   if (pan)
-     {
-       dBug(("--> del_panel %s", USER_PTR(pan->user)));
--      HIDE_PANEL(pan, err, OK);
--      free((void *)pan);
-+      {
-+	GetHook(pan);
-+	HIDE_PANEL(pan, err, OK);
-+	free((void *)pan);
-+      }
-     }
-   else
-     err = ERR;
-diff -Naur ncurses-5.7.orig/panel/p_hidden.c ncurses-5.7/panel/p_hidden.c
---- ncurses-5.7.orig/panel/p_hidden.c	2005-02-19 08:39:17.000000000 -0800
-+++ ncurses-5.7/panel/p_hidden.c	2009-07-19 15:03:51.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -29,6 +29,7 @@
- /****************************************************************************
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995                    *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-+ *     and: Juergen Pfeifer                         1997-1999,2008          *
-  ****************************************************************************/
- 
- /* p_hidden.c
-@@ -36,13 +37,18 @@
-  */
- #include "panel.priv.h"
- 
--MODULE_ID("$Id: p_hidden.c,v 1.7 2005/02/19 16:39:17 tom Exp $")
-+MODULE_ID("$Id: p_hidden.c,v 1.8 2009/04/11 19:01:56 tom Exp $")
- 
- NCURSES_EXPORT(int)
- panel_hidden(const PANEL * pan)
- {
-+  int rc = ERR;
-+
-   T((T_CALLED("panel_hidden(%p)"), pan));
--  if (!pan)
--    returnCode(ERR);
--  returnCode(IS_LINKED(pan) ? FALSE : TRUE);
-+  if (pan)
-+    {
-+      GetHook(pan);
-+      rc = (IS_LINKED(pan) ? FALSE : TRUE);
-+    }
-+  returnCode(rc);
- }
-diff -Naur ncurses-5.7.orig/panel/p_hide.c ncurses-5.7/panel/p_hide.c
---- ncurses-5.7.orig/panel/p_hide.c	2005-02-19 08:39:41.000000000 -0800
-+++ ncurses-5.7/panel/p_hide.c	2009-07-19 15:03:51.000000000 -0700
-@@ -36,23 +36,27 @@
-  */
- #include "panel.priv.h"
- 
--MODULE_ID("$Id: p_hide.c,v 1.9 2005/02/19 16:39:41 tom Exp $")
-+MODULE_ID("$Id: p_hide.c,v 1.10 2009/02/07 23:11:45 tom Exp $")
- 
- NCURSES_EXPORT(int)
- hide_panel(register PANEL * pan)
- {
--  int err = OK;
-+  int err = ERR;
- 
-   T((T_CALLED("hide_panel(%p)"), pan));
--  if (!pan)
--    returnCode(ERR);
- 
--  dBug(("--> hide_panel %s", USER_PTR(pan->user)));
--  dStack("<u%d>", 1, pan);
-+  if (pan)
-+    {
-+      GetHook(pan);
- 
--  HIDE_PANEL(pan, err, ERR);
-+      dBug(("--> hide_panel %s", USER_PTR(pan->user)));
-+      dStack("<u%d>", 1, pan);
- 
--  dStack("<u%d>", 9, pan);
-+      HIDE_PANEL(pan, err, ERR);
- 
-+      err = OK;
-+
-+      dStack("<u%d>", 9, pan);
-+    }
-   returnCode(err);
- }
-diff -Naur ncurses-5.7.orig/panel/p_move.c ncurses-5.7/panel/p_move.c
---- ncurses-5.7.orig/panel/p_move.c	2005-02-19 08:46:49.000000000 -0800
-+++ ncurses-5.7/panel/p_move.c	2009-07-19 15:03:51.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2005,2008 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -29,6 +29,7 @@
- /****************************************************************************
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995                    *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-+ *     and: Juergen Pfeifer                         1997-1999,2009          *
-  ****************************************************************************/
- 
- /* p_move.c
-@@ -36,21 +37,24 @@
-  */
- #include "panel.priv.h"
- 
--MODULE_ID("$Id: p_move.c,v 1.9 2005/02/19 16:46:49 tom Exp $")
-+MODULE_ID("$Id: p_move.c,v 1.10 2008/11/16 00:19:59 juergen Exp $")
- 
- NCURSES_EXPORT(int)
- move_panel(PANEL * pan, int starty, int startx)
- {
--  T((T_CALLED("move_panel(%p,%d,%d)"), pan, starty, startx));
-+  int rc = ERR;
- 
--  if (!pan)
--    returnCode(ERR);
-+  T((T_CALLED("move_panel(%p,%d,%d)"), pan, starty, startx));
- 
--  if (IS_LINKED(pan))
-+  if (pan)
-     {
--      Touchpan(pan);
--      PANEL_UPDATE(pan, (PANEL *) 0);
-+      GetHook(pan);
-+      if (IS_LINKED(pan))
-+	{
-+	  Touchpan(pan);
-+	  PANEL_UPDATE(pan, (PANEL *) 0);
-+	}
-+      rc = mvwin(pan->win, starty, startx);
-     }
--
--  returnCode(mvwin(pan->win, starty, startx));
-+  returnCode(rc);
- }
-diff -Naur ncurses-5.7.orig/panel/p_new.c ncurses-5.7/panel/p_new.c
---- ncurses-5.7.orig/panel/p_new.c	2008-08-04 11:25:48.000000000 -0700
-+++ ncurses-5.7/panel/p_new.c	2009-07-19 15:03:51.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2005,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -38,7 +38,7 @@
-  */
- #include "panel.priv.h"
- 
--MODULE_ID("$Id: p_new.c,v 1.10 2008/08/04 18:25:48 tom Exp $")
-+MODULE_ID("$Id: p_new.c,v 1.14 2009/04/11 20:43:04 tom Exp $")
- 
- #ifdef TRACE
- static char *stdscr_id;
-@@ -50,20 +50,27 @@
-   Establish the pseudo panel for stdscr if necessary.
- --------------------------------------------------------------------------*/
- static PANEL *
--root_panel(void)
-+root_panel(NCURSES_SP_DCL0)
- {
-+#if NCURSES_SP_FUNCS
-+  struct panelhook *ph = NCURSES_SP_NAME(_nc_panelhook) (sp);
-+
-+#elif NO_LEAKS
-+  struct panelhook *ph = _nc_panelhook();
-+#endif
-+
-   if (_nc_stdscr_pseudo_panel == (PANEL *) 0)
-     {
- 
--      assert(stdscr && !_nc_bottom_panel && !_nc_top_panel);
-+      assert(SP_PARM && SP_PARM->_stdscr && !_nc_bottom_panel && !_nc_top_panel);
- #if NO_LEAKS
--      _nc_panelhook()->destroy = del_panel;
-+      ph->destroy = del_panel;
- #endif
-       _nc_stdscr_pseudo_panel = (PANEL *) malloc(sizeof(PANEL));
-       if (_nc_stdscr_pseudo_panel != 0)
- 	{
- 	  PANEL *pan = _nc_stdscr_pseudo_panel;
--	  WINDOW *win = stdscr;
-+	  WINDOW *win = SP_PARM->_stdscr;
- 
- 	  pan->win = win;
- 	  pan->below = (PANEL *) 0;
-@@ -86,13 +93,15 @@
- {
-   PANEL *pan = (PANEL *) 0;
- 
-+  GetWindowHook(win);
-+
-   T((T_CALLED("new_panel(%p)"), win));
- 
-   if (!win)
-     returnPanel(pan);
- 
-   if (!_nc_stdscr_pseudo_panel)
--    (void)root_panel();
-+    (void)root_panel(NCURSES_SP_ARG);
-   assert(_nc_stdscr_pseudo_panel);
- 
-   if (!(win->_flags & _ISPAD) && (pan = (PANEL *) malloc(sizeof(PANEL))))
-diff -Naur ncurses-5.7.orig/panel/p_replace.c ncurses-5.7/panel/p_replace.c
---- ncurses-5.7.orig/panel/p_replace.c	2005-02-19 08:41:31.000000000 -0800
-+++ ncurses-5.7/panel/p_replace.c	2009-07-19 15:03:51.000000000 -0700
-@@ -36,23 +36,25 @@
-  */
- #include "panel.priv.h"
- 
--MODULE_ID("$Id: p_replace.c,v 1.9 2005/02/19 16:41:31 tom Exp $")
-+MODULE_ID("$Id: p_replace.c,v 1.10 2009/02/07 23:11:45 tom Exp $")
- 
- NCURSES_EXPORT(int)
- replace_panel(PANEL * pan, WINDOW *win)
- {
--  T((T_CALLED("replace_panel(%p,%p)"), pan, win));
-+  int rc = ERR;
- 
--  if (!pan)
--    returnCode(ERR);
-+  T((T_CALLED("replace_panel(%p,%p)"), pan, win));
- 
--  if (IS_LINKED(pan))
-+  if (pan)
-     {
--      Touchpan(pan);
--      PANEL_UPDATE(pan, (PANEL *) 0);
-+      GetHook(pan);
-+      if (IS_LINKED(pan))
-+	{
-+	  Touchpan(pan);
-+	  PANEL_UPDATE(pan, (PANEL *) 0);
-+	}
-+      pan->win = win;
-+      rc = OK;
-     }
--
--  pan->win = win;
--
--  returnCode(OK);
-+  returnCode(rc);
- }
-diff -Naur ncurses-5.7.orig/panel/p_show.c ncurses-5.7/panel/p_show.c
---- ncurses-5.7.orig/panel/p_show.c	2005-02-19 08:42:02.000000000 -0800
-+++ ncurses-5.7/panel/p_show.c	2009-07-19 15:03:51.000000000 -0700
-@@ -36,34 +36,37 @@
-  */
- #include "panel.priv.h"
- 
--MODULE_ID("$Id: p_show.c,v 1.11 2005/02/19 16:42:02 tom Exp $")
-+MODULE_ID("$Id: p_show.c,v 1.12 2009/02/07 23:11:45 tom Exp $")
- 
- NCURSES_EXPORT(int)
- show_panel(PANEL * pan)
- {
--  int err = OK;
-+  int err = ERR;
- 
-   T((T_CALLED("show_panel(%p)"), pan));
- 
--  if (!pan)
--    returnCode(ERR);
-+  if (pan)
-+    {
-+      GetHook(pan);
- 
--  if (Is_Top(pan))
--    returnCode(OK);
-+      if (Is_Top(pan))
-+	returnCode(OK);
- 
--  dBug(("--> show_panel %s", USER_PTR(pan->user)));
-+      dBug(("--> show_panel %s", USER_PTR(pan->user)));
- 
--  HIDE_PANEL(pan, err, OK);
-+      HIDE_PANEL(pan, err, OK);
- 
--  dStack("<lt%d>", 1, pan);
--  assert(_nc_bottom_panel == _nc_stdscr_pseudo_panel);
-+      dStack("<lt%d>", 1, pan);
-+      assert(_nc_bottom_panel == _nc_stdscr_pseudo_panel);
- 
--  _nc_top_panel->above = pan;
--  pan->below = _nc_top_panel;
--  pan->above = (PANEL *) 0;
--  _nc_top_panel = pan;
-+      _nc_top_panel->above = pan;
-+      pan->below = _nc_top_panel;
-+      pan->above = (PANEL *) 0;
-+      _nc_top_panel = pan;
- 
--  dStack("<lt%d>", 9, pan);
-+      err = OK;
- 
--  returnCode(OK);
-+      dStack("<lt%d>", 9, pan);
-+    }
-+  returnCode(err);
- }
-diff -Naur ncurses-5.7.orig/panel/p_update.c ncurses-5.7/panel/p_update.c
---- ncurses-5.7.orig/panel/p_update.c	2005-02-19 08:49:47.000000000 -0800
-+++ ncurses-5.7/panel/p_update.c	2009-07-19 15:03:51.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -29,6 +29,7 @@
- /****************************************************************************
-  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995                    *
-  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
-+ *     and: Juergen Pfeifer                         1997-1999,2008          *
-  ****************************************************************************/
- 
- /* p_update.c
-@@ -36,28 +37,42 @@
-  */
- #include "panel.priv.h"
- 
--MODULE_ID("$Id: p_update.c,v 1.9 2005/02/19 16:49:47 tom Exp $")
-+MODULE_ID("$Id: p_update.c,v 1.10 2009/04/11 19:48:36 tom Exp $")
- 
- NCURSES_EXPORT(void)
--update_panels(void)
-+NCURSES_SP_NAME(update_panels) (NCURSES_SP_DCL0)
- {
-   PANEL *pan;
- 
--  T((T_CALLED("update_panels()")));
-+  T((T_CALLED("update_panels(%p)"), SP_PARM));
-   dBug(("--> update_panels"));
--  pan = _nc_bottom_panel;
--  while (pan && pan->above)
--    {
--      PANEL_UPDATE(pan, pan->above);
--      pan = pan->above;
--    }
- 
--  pan = _nc_bottom_panel;
--  while (pan)
-+  if (SP_PARM)
-     {
--      Wnoutrefresh(pan);
--      pan = pan->above;
-+      GetScreenHook(SP_PARM);
-+
-+      pan = _nc_bottom_panel;
-+      while (pan && pan->above)
-+	{
-+	  PANEL_UPDATE(pan, pan->above);
-+	  pan = pan->above;
-+	}
-+
-+      pan = _nc_bottom_panel;
-+      while (pan)
-+	{
-+	  Wnoutrefresh(pan);
-+	  pan = pan->above;
-+	}
-     }
- 
-   returnVoid;
- }
-+
-+#if NCURSES_SP_FUNCS
-+NCURSES_EXPORT(void)
-+update_panels(void)
-+{
-+  NCURSES_SP_NAME(update_panels) (CURRENT_SCREEN);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/progs/Makefile.in ncurses-5.7/progs/Makefile.in
---- ncurses-5.7.orig/progs/Makefile.in	2008-09-07 06:58:55.000000000 -0700
-+++ ncurses-5.7/progs/Makefile.in	2009-07-19 15:03:48.000000000 -0700
-@@ -1,6 +1,6 @@
--# $Id: Makefile.in,v 1.79 2008/09/07 13:58:55 tom Exp $
-+# $Id: Makefile.in,v 1.82 2009/03/28 20:30:58 tom Exp $
- ##############################################################################
--# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.                #
-+# Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.                #
- #                                                                            #
- # Permission is hereby granted, free of charge, to any person obtaining a    #
- # copy of this software and associated documentation files (the "Software"), #
-@@ -124,7 +124,7 @@
- 	transform.h
- 
- # tic relies on direct access to the terminfo database
--GET_PROGS = infocmp$x clear$x tput$x tset$x toe$x
-+GET_PROGS = infocmp$x clear$x tabs$x tput$x tset$x toe$x
- PUT_PROGS = @MAKE_TERMINFO@ tic$x
- PROGS = $(PUT_PROGS) $(GET_PROGS)
- 
-@@ -159,6 +159,7 @@
- actual_infotocap = `echo infotocap$x| $(TRANSFORM)`
- actual_init      = `echo init$x|      $(TRANSFORM)`
- actual_reset     = `echo reset$x|     $(TRANSFORM)`
-+actual_tabs      = `echo tabs$x|      $(TRANSFORM)`
- actual_tic       = `echo tic$x|       $(TRANSFORM)`
- actual_toe       = `echo toe$x|       $(TRANSFORM)`
- actual_tput      = `echo tput$x|      $(TRANSFORM)`
-@@ -171,10 +172,16 @@
- define_reset     = `echo reset|       $(TRANSFORM)`
- 
- transform.h :
--	echo "#define PROG_CAPTOINFO \"$(define_captoinfo)\"" >$@
--	echo "#define PROG_INFOTOCAP \"$(define_infotocap)\"" >>$@
--	echo "#define PROG_RESET     \"$(define_reset)\""     >>$@
--	echo "#define PROG_INIT      \"$(define_init)\""      >>$@
-+	echo "#ifndef __TRANSFORM_H"					>$@
-+	echo "#define __TRANSFORM_H 1"					>>$@
-+	echo "#include <progs.priv.h>"					>>$@
-+	echo "extern bool same_program(const char *, const char *);"	>>$@
-+	-sh -c 'if test -n "$x" ; then echo "#define SUFFIX_IGNORED \"$x\"">>$@; fi'
-+	echo "#define PROG_CAPTOINFO \"$(define_captoinfo)\""		>>$@
-+	echo "#define PROG_INFOTOCAP \"$(define_infotocap)\""		>>$@
-+	echo "#define PROG_RESET     \"$(define_reset)\""		>>$@
-+	echo "#define PROG_INIT      \"$(define_init)\""		>>$@
-+	echo "#endif /* __TRANSFORM_H */"				>>$@
- 
- install.progs: $(AUTO_SRC) $(PROGS) $(DESTDIR)$(bindir)
- @MAKE_TERMINFO@	$(LIBTOOL_INSTALL) $(INSTALL_PROG) tic$x     $(DESTDIR)$(bindir)/$(actual_tic)
-@@ -187,6 +194,7 @@
- @MAKE_TERMINFO@	(cd $(DESTDIR)$(bindir) && $(LN_S) $(actual_tic) $(actual_captoinfo))
- 	$(LIBTOOL_INSTALL) $(INSTALL_PROG) infocmp$x $(DESTDIR)$(bindir)/$(actual_infocmp)
- 	$(LIBTOOL_INSTALL) $(INSTALL_PROG) clear$x   $(DESTDIR)$(bindir)/$(actual_clear)
-+	$(LIBTOOL_INSTALL) $(INSTALL_PROG) tabs$x    $(DESTDIR)$(bindir)/$(actual_tabs)
- 	$(LIBTOOL_INSTALL) $(INSTALL_PROG) tput$x    $(DESTDIR)$(bindir)/$(actual_tput)
- 	$(LIBTOOL_INSTALL) $(INSTALL_PROG) tset$x    $(DESTDIR)$(bindir)/$(actual_tset)
- 	@echo "linking $(actual_reset) to $(actual_tset)"
-@@ -200,6 +208,7 @@
- @MAKE_TERMINFO@	-@rm -f $(DESTDIR)$(bindir)/$(actual_infotocap)
- 	-@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_infocmp)
- 	-@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_clear)
-+	-@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_tabs)
- 	-@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_tput)
- 	-@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_tset)
- 	-@rm -f $(DESTDIR)$(bindir)/$(actual_reset)
-@@ -213,7 +222,8 @@
- 
- DEPS_TIC = \
- 	$(MODEL)/tic$o \
--	$(MODEL)/dump_entry$o
-+	$(MODEL)/dump_entry$o \
-+	$(MODEL)/transform$o
- 
- tic$x: $(DEPS_TIC) $(DEPS_CURSES) transform.h
- 	@ECHO_LINK@ $(LINK) $(DEPS_TIC) $(LDFLAGS_TIC) -o $@
-@@ -230,8 +240,15 @@
- clear$x: $(DEPS_CLEAR) $(DEPS_CURSES)
- 	@ECHO_LINK@ $(LINK) $(DEPS_CLEAR) $(LDFLAGS_TINFO) -o $@
- 
-+DEPS_TABS = \
-+	$(MODEL)/tabs$o
-+
-+tabs$x: $(DEPS_TABS) $(DEPS_TABS)
-+	@ECHO_LINK@ $(LINK) $(DEPS_TABS) $(LDFLAGS_TINFO) -o $@
-+
- DEPS_TPUT = \
--	$(MODEL)/tput$o
-+	$(MODEL)/tput$o \
-+	$(MODEL)/transform$o
- 
- tput$x: $(DEPS_TPUT) $(DEPS_CURSES) transform.h
- 	@ECHO_LINK@ $(LINK) $(DEPS_TPUT) $(LDFLAGS_TINFO) -o $@
-@@ -244,7 +261,8 @@
- 	@ECHO_LINK@ $(LINK) $(DEPS_INFOCMP) $(LDFLAGS_TIC) -o $@
- 
- DEPS_TSET = \
--	$(MODEL)/tset$o
-+	$(MODEL)/tset$o \
-+	$(MODEL)/transform$o
- 
- tset$x: $(DEPS_TSET) $(DEPS_CURSES) transform.h
- 	@ECHO_LINK@ $(LINK) $(DEPS_TSET) $(LDFLAGS_TINFO) -o $@
-@@ -289,6 +307,7 @@
- @MAKE_TERMINFO@	$(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/toe.c     $(srcdir)/dump_entry.c $(LINT_LIBS)
- 	$(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/clear.c                          $(LINT_LIBS)
- 	$(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/infocmp.c $(srcdir)/dump_entry.c $(LINT_LIBS)
-+	$(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tabs.c                           $(LINT_LIBS)
- 	$(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tput.c                           $(LINT_LIBS)
- 	$(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tset.c    $(srcdir)/dump_entry.c $(LINT_LIBS)
- 
-diff -Naur ncurses-5.7.orig/progs/modules ncurses-5.7/progs/modules
---- ncurses-5.7.orig/progs/modules	2006-12-23 16:53:21.000000000 -0800
-+++ ncurses-5.7/progs/modules	2009-07-19 15:03:43.000000000 -0700
-@@ -1,7 +1,7 @@
--# $Id: modules,v 1.13 2006/12/24 00:53:21 tom Exp $
-+# $Id: modules,v 1.15 2009/03/14 18:45:55 tom Exp $
- # Program modules (some are in ncurses lib!)
- ##############################################################################
--# Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.                #
-+# Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.                #
- #                                                                            #
- # Permission is hereby granted, free of charge, to any person obtaining a    #
- # copy of this software and associated documentation files (the "Software"), #
-@@ -37,7 +37,9 @@
- toe		progs		$(srcdir)	$(HEADER_DEPS)             $(srcdir)/dump_entry.h
- dump_entry	progs		$(srcdir)	$(HEADER_DEPS)             $(srcdir)/dump_entry.h ../include/parametrized.h $(INCDIR)/capdefaults.c termsort.c
- infocmp		progs		$(srcdir)	$(HEADER_DEPS)             $(srcdir)/dump_entry.h
-+tabs		progs		$(srcdir)	$(HEADER_DEPS)
- tput		progs		$(srcdir)	$(HEADER_DEPS) transform.h termsort.c
- tset		progs		$(srcdir)	$(HEADER_DEPS) transform.h $(srcdir)/dump_entry.h ../include/termcap.h
-+transform	progs		$(srcdir)	$(HEADER_DEPS)
- 
- # vile:makemode
-diff -Naur ncurses-5.7.orig/progs/tabs.c ncurses-5.7/progs/tabs.c
---- ncurses-5.7.orig/progs/tabs.c	1969-12-31 16:00:00.000000000 -0800
-+++ ncurses-5.7/progs/tabs.c	2009-07-19 15:01:57.000000000 -0700
-@@ -0,0 +1,506 @@
-+/****************************************************************************
-+ * Copyright (c) 2008 Free Software Foundation, Inc.                        *
-+ *                                                                          *
-+ * Permission is hereby granted, free of charge, to any person obtaining a  *
-+ * copy of this software and associated documentation files (the            *
-+ * "Software"), to deal in the Software without restriction, including      *
-+ * without limitation the rights to use, copy, modify, merge, publish,      *
-+ * distribute, distribute with modifications, sublicense, and/or sell       *
-+ * copies of the Software, and to permit persons to whom the Software is    *
-+ * furnished to do so, subject to the following conditions:                 *
-+ *                                                                          *
-+ * The above copyright notice and this permission notice shall be included  *
-+ * in all copies or substantial portions of the Software.                   *
-+ *                                                                          *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
-+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
-+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
-+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
-+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
-+ *                                                                          *
-+ * Except as contained in this notice, the name(s) of the above copyright   *
-+ * holders shall not be used in advertising or otherwise to promote the     *
-+ * sale, use or other dealings in this Software without prior written       *
-+ * authorization.                                                           *
-+ ****************************************************************************/
-+
-+/****************************************************************************
-+ *  Author: Thomas E. Dickey                        2008                    *
-+ ****************************************************************************/
-+
-+/*
-+ * tabs.c --  set terminal hard-tabstops
-+ */
-+
-+#define USE_LIBTINFO
-+#include <progs.priv.h>
-+
-+MODULE_ID("$Id: tabs.c,v 1.15 2008/11/23 00:47:51 tom Exp $")
-+
-+static void usage(void) GCC_NORETURN;
-+
-+static int max_cols;
-+
-+static int
-+putch(int c)
-+{
-+    return putchar(c);
-+}
-+
-+static void
-+do_tabs(int *tab_list)
-+{
-+    int last = 1;
-+    int stop;
-+
-+    putchar('\r');
-+    while ((stop = *tab_list++) > 0) {
-+	if (last < stop) {
-+	    while (last++ < stop) {
-+		if (last > max_cols)
-+		    break;
-+		putchar(' ');
-+	    }
-+	}
-+	if (stop <= max_cols) {
-+	    tputs(tparm(set_tab, stop), 1, putch);
-+	    last = stop;
-+	} else {
-+	    break;
-+	}
-+    }
-+    putchar('\n');
-+}
-+
-+static int *
-+decode_tabs(const char *tab_list)
-+{
-+    int *result = typeCalloc(int, strlen(tab_list) + (unsigned) max_cols);
-+    int n = 0;
-+    int value = 0;
-+    int prior = 0;
-+    int ch;
-+
-+    if (result != 0) {
-+	while ((ch = *tab_list++) != '\0') {
-+	    if (isdigit(UChar(ch))) {
-+		value *= 10;
-+		value += (ch - '0');
-+	    } else if (ch == ',') {
-+		result[n] = value + prior;
-+		if (n > 0 && value <= result[n - 1]) {
-+		    fprintf(stderr,
-+			    "tab-stops are not in increasing order\n");
-+		    free(result);
-+		    result = 0;
-+		    break;
-+		}
-+		++n;
-+		value = 0;
-+		prior = 0;
-+	    } else if (ch == '+') {
-+		if (n)
-+		    prior = result[n - 1];
-+	    }
-+	}
-+    }
-+
-+    if (result != 0) {
-+	/*
-+	 * If there is only one value, then it is an option such as "-8".
-+	 */
-+	if ((n == 0) && (value > 0)) {
-+	    int step = value;
-+	    while (n < max_cols - 1) {
-+		result[n++] = value;
-+		value += step;
-+	    }
-+	}
-+
-+	/*
-+	 * Add the last value, if any.
-+	 */
-+	result[n++] = value;
-+	result[n] = 0;
-+    }
-+    return result;
-+}
-+
-+static void
-+print_ruler(int *tab_list)
-+{
-+    int last = 0;
-+    int stop;
-+    int n;
-+
-+    /* first print a readable ruler */
-+    for (n = 0; n < max_cols; n += 10) {
-+	int ch = 1 + (n / 10);
-+	char buffer[20];
-+	sprintf(buffer, "----+----%c",
-+		((ch < 10)
-+		 ? (ch + '0')
-+		 : (ch + 'A' - 10)));
-+	printf("%.*s", ((max_cols - n) > 10) ? 10 : (max_cols - n), buffer);
-+    }
-+    putchar('\n');
-+
-+    /* now, print '*' for each stop */
-+    for (n = 0, last = 0; (tab_list[n] > 0) && (last < max_cols); ++n) {
-+	stop = tab_list[n];
-+	while (++last < stop) {
-+	    if (last <= max_cols) {
-+		putchar('-');
-+	    } else {
-+		break;
-+	    }
-+	}
-+	if (last <= max_cols) {
-+	    putchar('*');
-+	    last = stop;
-+	} else {
-+	    break;
-+	}
-+    }
-+    while (++last <= max_cols)
-+	putchar('-');
-+    putchar('\n');
-+}
-+
-+/*
-+ * Write an '*' on each tabstop, to demonstrate whether it lines up with the
-+ * ruler.
-+ */
-+static void
-+write_tabs(int *tab_list)
-+{
-+    int stop;
-+
-+    while ((stop = *tab_list++) > 0 && stop <= max_cols) {
-+	fputs((stop == 1) ? "*" : "\t*", stdout);
-+    };
-+    /* also show a tab _past_ the stops */
-+    if (stop < max_cols)
-+	fputs("\t+", stdout);
-+    putchar('\n');
-+}
-+
-+/*
-+ * Trim leading/trailing blanks, as well as blanks after a comma.
-+ * Convert embedded blanks to commas.
-+ */
-+static char *
-+trimmed_tab_list(const char *source)
-+{
-+    char *result = strdup(source);
-+    int ch, j, k, last;
-+
-+    if (result != 0) {
-+	for (j = k = last = 0; result[j] != 0; ++j) {
-+	    ch = UChar(result[j]);
-+	    if (isspace(ch)) {
-+		if (last == '\0') {
-+		    continue;
-+		} else if (isdigit(last) || last == ',') {
-+		    ch = ',';
-+		}
-+	    } else if (ch == ',') {
-+		;
-+	    } else {
-+		if (last == ',')
-+		    result[k++] = last;
-+		result[k++] = ch;
-+	    }
-+	    last = ch;
-+	}
-+	result[k] = '\0';
-+    }
-+    return result;
-+}
-+
-+static bool
-+comma_is_needed(const char *source)
-+{
-+    bool result = FALSE;
-+
-+    if (source != 0) {
-+	unsigned len = strlen(source);
-+	if (len != 0)
-+	    result = (source[len - 1] != ',');
-+    } else {
-+	result = FALSE;
-+    }
-+    return result;
-+}
-+
-+/*
-+ * Add a command-line parameter to the tab-list.  It can be blank- or comma-
-+ * separated (or a mixture).  For simplicity, empty tabs are ignored, e.g.,
-+ *	tabs 1,,6,11
-+ *	tabs 1,6,11
-+ * are treated the same.
-+ */
-+static const char *
-+add_to_tab_list(char **append, const char *value)
-+{
-+    char *result = *append;
-+    char *copied = trimmed_tab_list(value);
-+
-+    if (copied != 0 && *copied != '\0') {
-+	const char *comma = ",";
-+	unsigned need = 1 + strlen(copied);
-+
-+	if (*copied == ',')
-+	    comma = "";
-+	else if (!comma_is_needed(*append))
-+	    comma = "";
-+
-+	need += strlen(comma);
-+	if (*append != 0)
-+	    need += strlen(*append);
-+
-+	result = malloc(need);
-+	if (result != 0) {
-+	    *result = '\0';
-+	    if (*append != 0) {
-+		strcpy(result, *append);
-+		free(*append);
-+	    }
-+	    strcat(result, comma);
-+	    strcat(result, copied);
-+	}
-+
-+	*append = result;
-+    }
-+    return result;
-+}
-+
-+/*
-+ * Check for illegal characters in the tab-list.
-+ */
-+static bool
-+legal_tab_list(const char *program, const char *tab_list)
-+{
-+    bool result = TRUE;
-+
-+    if (tab_list != 0 && *tab_list != '\0') {
-+	if (comma_is_needed(tab_list)) {
-+	    int n, ch;
-+	    for (n = 0; tab_list[n] != '\0'; ++n) {
-+		ch = UChar(tab_list[n]);
-+		if (!(isdigit(ch) || ch == ',')) {
-+		    fprintf(stderr,
-+			    "%s: unexpected character found '%c'\n",
-+			    program, ch);
-+		    result = FALSE;
-+		    break;
-+		}
-+	    }
-+	} else {
-+	    fprintf(stderr, "%s: trailing comma found '%s'\n", program, tab_list);
-+	    result = FALSE;
-+	}
-+    } else {
-+	fprintf(stderr, "%s: no tab-list given\n", program);
-+	result = FALSE;
-+    }
-+    return result;
-+}
-+
-+static void
-+usage(void)
-+{
-+    static const char *msg[] =
-+    {
-+	"Usage: tabs [options] [tabstop-list]"
-+	,""
-+	,"Options:"
-+	,"  -0       reset tabs"
-+	,"  -8       set tabs to standard interval"
-+	,"  -a       Assembler, IBM S/370, first format"
-+	,"  -a2      Assembler, IBM S/370, second format"
-+	,"  -c       COBOL, normal format"
-+	,"  -c2      COBOL compact format"
-+	,"  -c3      COBOL compact format extended"
-+	,"  -d       debug (show ruler with expected/actual tab positions)"
-+	,"  -f       FORTRAN"
-+	,"  -n       no-op (do not modify terminal settings)"
-+	,"  -p       PL/I"
-+	,"  -s       SNOBOL"
-+	,"  -u       UNIVAC 1100 Assembler"
-+	,"  -T name  use terminal type 'name'"
-+	,""
-+	,"A tabstop-list is an ordered list of column numbers, e.g., 1,11,21"
-+	,"or 1,+10,+10 which is the same."
-+    };
-+    unsigned n;
-+
-+    fflush(stdout);
-+    for (n = 0; n < SIZEOF(msg); ++n) {
-+	fprintf(stderr, "%s\n", msg[n]);
-+    }
-+    ExitProgram(EXIT_FAILURE);
-+}
-+
-+int
-+main(int argc, char *argv[])
-+{
-+    int rc = EXIT_FAILURE;
-+    bool debug = FALSE;
-+    bool no_op = FALSE;
-+    int n, ch;
-+    NCURSES_CONST char *term_name = 0;
-+    const char *mar_list = 0;	/* ignored */
-+    char *append = 0;
-+    const char *tab_list = 0;
-+
-+    if ((term_name = getenv("TERM")) == 0)
-+	term_name = "ansi+tabs";
-+
-+    /* cannot use getopt, since some options are two-character */
-+    for (n = 1; n < argc; ++n) {
-+	char *option = argv[n];
-+	switch (option[0]) {
-+	case '-':
-+	    while ((ch = *++option) != '\0') {
-+		switch (ch) {
-+		case 'a':
-+		    switch (*option) {
-+		    case '\0':
-+			tab_list = "1,10,16,36,72";
-+			/* Assembler, IBM S/370, first format */
-+			break;
-+		    case '2':
-+			tab_list = "1,10,16,40,72";
-+			/* Assembler, IBM S/370, second format */
-+			break;
-+		    default:
-+			usage();
-+		    }
-+		    break;
-+		case 'c':
-+		    switch (*option) {
-+		    case '\0':
-+			tab_list = "1,8,12,16,20,55";
-+			/* COBOL, normal format */
-+			break;
-+		    case '2':
-+			tab_list = "1,6,10,14,49";
-+			/* COBOL compact format */
-+			break;
-+		    case '3':
-+			tab_list = "1,6,10,14,18,22,26,30,34,38,42,46,50,54,58,62,67";
-+			/* COBOL compact format extended */
-+			break;
-+		    default:
-+			usage();
-+		    }
-+		    break;
-+		case 'd':	/* ncurses extension */
-+		    debug = TRUE;
-+		    break;
-+		case 'f':
-+		    tab_list = "1,7,11,15,19,23";
-+		    /* FORTRAN */
-+		    break;
-+		case 'n':	/* ncurses extension */
-+		    no_op = TRUE;
-+		    break;
-+		case 'p':
-+		    tab_list = "1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61";
-+		    /* PL/I */
-+		    break;
-+		case 's':
-+		    tab_list = "1,10,55";
-+		    /* SNOBOL */
-+		    break;
-+		case 'u':
-+		    tab_list = "1,12,20,44";
-+		    /* UNIVAC 1100 Assembler */
-+		    break;
-+		case 'T':
-+		    ++n;
-+		    if (*++option != '\0') {
-+			term_name = option;
-+		    } else {
-+			term_name = argv[n++];
-+		    }
-+		    option += ((int) strlen(option)) - 1;
-+		    continue;
-+		default:
-+		    if (isdigit(UChar(*option))) {
-+			tab_list = option;
-+			++n;
-+		    } else {
-+			usage();
-+		    }
-+		    option += ((int) strlen(option)) - 1;
-+		    break;
-+		}
-+	    }
-+	    break;
-+	case '+':
-+	    while ((ch = *++option) != '\0') {
-+		switch (ch) {
-+		case 'm':
-+		    mar_list = option;
-+		    break;
-+		default:
-+		    usage();
-+		}
-+	    }
-+	    break;
-+	default:
-+	    if (append != 0) {
-+		if (tab_list != (const char *) append) {
-+		    /* one of the predefined options was used */
-+		    free(append);
-+		    append = 0;
-+		}
-+	    }
-+	    tab_list = add_to_tab_list(&append, option);
-+	    option += ((int) strlen(option)) - 1;
-+	    break;
-+	}
-+    }
-+
-+    setupterm(term_name, STDOUT_FILENO, (int *) 0);
-+
-+    max_cols = (columns > 0) ? columns : 80;
-+
-+    if (!VALID_STRING(clear_all_tabs)) {
-+	fprintf(stderr,
-+		"%s: terminal type '%s' cannot reset tabs\n",
-+		argv[0], term_name);
-+    } else if (!VALID_STRING(set_tab)) {
-+	fprintf(stderr,
-+		"%s: terminal type '%s' cannot set tabs\n",
-+		argv[0], term_name);
-+    } else if (legal_tab_list(argv[0], tab_list)) {
-+	int *list = decode_tabs(tab_list);
-+
-+	if (!no_op)
-+	    tputs(clear_all_tabs, 1, putch);
-+
-+	if (list != 0) {
-+	    if (!no_op)
-+		do_tabs(list);
-+	    if (debug) {
-+		fflush(stderr);
-+		printf("tabs %s\n", tab_list);
-+		print_ruler(list);
-+		write_tabs(list);
-+	    }
-+	    free(list);
-+	} else if (debug) {
-+	    fflush(stderr);
-+	    printf("tabs %s\n", tab_list);
-+	}
-+	rc = EXIT_SUCCESS;
-+    }
-+    if (append != 0)
-+	free(append);
-+    ExitProgram(rc);
-+}
-diff -Naur ncurses-5.7.orig/progs/tic.c ncurses-5.7/progs/tic.c
---- ncurses-5.7.orig/progs/tic.c	2008-09-13 09:59:24.000000000 -0700
-+++ ncurses-5.7/progs/tic.c	2009-07-19 15:03:43.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -44,7 +44,7 @@
- #include <dump_entry.h>
- #include <transform.h>
- 
--MODULE_ID("$Id: tic.c,v 1.137 2008/09/13 16:59:24 tom Exp $")
-+MODULE_ID("$Id: tic.c,v 1.138 2009/03/14 18:45:55 tom Exp $")
- 
- const char *_nc_progname = "tic";
- 
-@@ -495,11 +495,11 @@
- 
-     _nc_progname = _nc_rootname(argv[0]);
- 
--    if ((infodump = (strcmp(_nc_progname, PROG_CAPTOINFO) == 0)) != FALSE) {
-+    if ((infodump = same_program(_nc_progname, PROG_CAPTOINFO)) != FALSE) {
- 	outform = F_TERMINFO;
- 	sortmode = S_TERMINFO;
-     }
--    if ((capdump = (strcmp(_nc_progname, PROG_INFOTOCAP) == 0)) != FALSE) {
-+    if ((capdump = same_program(_nc_progname, PROG_INFOTOCAP)) != FALSE) {
- 	outform = F_TERMCAP;
- 	sortmode = S_TERMCAP;
-     }
-diff -Naur ncurses-5.7.orig/progs/tput.c ncurses-5.7/progs/tput.c
---- ncurses-5.7.orig/progs/tput.c	2008-07-13 04:05:12.000000000 -0700
-+++ ncurses-5.7/progs/tput.c	2009-07-19 15:03:43.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -47,7 +47,7 @@
- #endif
- #include <transform.h>
- 
--MODULE_ID("$Id: tput.c,v 1.42 2008/07/13 11:05:12 tom Exp $")
-+MODULE_ID("$Id: tput.c,v 1.43 2009/03/14 18:45:55 tom Exp $")
- 
- #define PUTS(s)		fputs(s, stdout)
- #define PUTCHAR(c)	putchar(c)
-@@ -86,8 +86,8 @@
- static void
- check_aliases(const char *name)
- {
--    is_init = (strcmp(name, PROG_INIT) == 0);
--    is_reset = (strcmp(name, PROG_RESET) == 0);
-+    is_init = same_program(name, PROG_INIT);
-+    is_reset = same_program(name, PROG_RESET);
- }
- 
- /*
-diff -Naur ncurses-5.7.orig/progs/transform.c ncurses-5.7/progs/transform.c
---- ncurses-5.7.orig/progs/transform.c	1969-12-31 16:00:00.000000000 -0800
-+++ ncurses-5.7/progs/transform.c	2009-07-19 15:03:43.000000000 -0700
-@@ -0,0 +1,79 @@
-+/****************************************************************************
-+ * Copyright (c) 2009 Free Software Foundation, Inc.                        *
-+ *                                                                          *
-+ * Permission is hereby granted, free of charge, to any person obtaining a  *
-+ * copy of this software and associated documentation files (the            *
-+ * "Software"), to deal in the Software without restriction, including      *
-+ * without limitation the rights to use, copy, modify, merge, publish,      *
-+ * distribute, distribute with modifications, sublicense, and/or sell       *
-+ * copies of the Software, and to permit persons to whom the Software is    *
-+ * furnished to do so, subject to the following conditions:                 *
-+ *                                                                          *
-+ * The above copyright notice and this permission notice shall be included  *
-+ * in all copies or substantial portions of the Software.                   *
-+ *                                                                          *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
-+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
-+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
-+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
-+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
-+ *                                                                          *
-+ * Except as contained in this notice, the name(s) of the above copyright   *
-+ * holders shall not be used in advertising or otherwise to promote the     *
-+ * sale, use or other dealings in this Software without prior written       *
-+ * authorization.                                                           *
-+ ****************************************************************************/
-+
-+/****************************************************************************
-+ *  Author: Thomas E. Dickey                                                *
-+ ****************************************************************************/
-+#include <progs.priv.h>
-+#include <string.h>
-+
-+#include <transform.h>
-+
-+MODULE_ID("$Id: transform.c,v 1.1 2009/03/14 19:08:28 tom Exp $")
-+
-+#ifdef SUFFIX_IGNORED
-+static void
-+trim_suffix(const char *a, unsigned *len)
-+{
-+    const char ignore[] = SUFFIX_IGNORED;
-+
-+    if (sizeof(ignore) != 0) {
-+	bool trim = FALSE;
-+	unsigned need = (sizeof(ignore) - 1);
-+
-+	if (*len > need) {
-+	    unsigned first = *len - need;
-+	    unsigned n;
-+	    trim = TRUE;
-+	    for (n = first; n < *len; ++n) {
-+		if (tolower(a[n]) != tolower(ignore[n - first])) {
-+		    trim = FALSE;
-+		    break;
-+		}
-+	    }
-+	    if (trim) {
-+		*len -= need;
-+	    }
-+	}
-+    }
-+}
-+#else
-+#define trim_suffix(a, len) /* nothing */
-+#endif
-+
-+bool
-+same_program(const char *a, const char *b)
-+{
-+    unsigned len_a = strlen(a);
-+    unsigned len_b = strlen(b);
-+
-+    trim_suffix(a, &len_a);
-+    trim_suffix(b, &len_b);
-+
-+    return (len_a == len_b) && (strncmp(a, b, len_a) == 0);
-+}
-diff -Naur ncurses-5.7.orig/progs/tset.c ncurses-5.7/progs/tset.c
---- ncurses-5.7.orig/progs/tset.c	2008-10-11 12:26:19.000000000 -0700
-+++ ncurses-5.7/progs/tset.c	2009-07-19 15:03:43.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -107,7 +107,7 @@
- #include <dump_entry.h>
- #include <transform.h>
- 
--MODULE_ID("$Id: tset.c,v 1.76 2008/10/11 19:26:19 tom Exp $")
-+MODULE_ID("$Id: tset.c,v 1.77 2009/03/14 19:08:35 tom Exp $")
- 
- /*
-  * SCO defines TIOCGSIZE and the corresponding struct.  Other systems (SunOS,
-@@ -1247,7 +1247,7 @@
-     ospeed = (NCURSES_OSPEED) mode.sg_ospeed;
- #endif
- 
--    if (!strcmp(_nc_progname, PROG_RESET)) {
-+    if (same_program(_nc_progname, PROG_RESET)) {
- 	isreset = TRUE;
- 	reset_mode();
-     }
-diff -Naur ncurses-5.7.orig/README.MinGW ncurses-5.7/README.MinGW
---- ncurses-5.7.orig/README.MinGW	1969-12-31 16:00:00.000000000 -0800
-+++ ncurses-5.7/README.MinGW	2009-07-19 15:04:11.000000000 -0700
-@@ -0,0 +1,79 @@
-+-------------------------------------------------------------------------------
-+-- Copyright (c) 2008           Free Software Foundation, Inc.               --
-+--                                                                           --
-+-- Permission is hereby granted, free of charge, to any person obtaining a   --
-+-- copy of this software and associated documentation files (the             --
-+-- "Software"), to deal in the Software without restriction, including       --
-+-- without limitation the rights to use, copy, modify, merge, publish,       --
-+-- distribute, distribute with modifications, sublicense, and/or sell copies --
-+-- of the Software, and to permit persons to whom the Software is furnished  --
-+-- to do so, subject to the following conditions:                            --
-+--                                                                           --
-+-- The above copyright notice and this permission notice shall be included   --
-+-- in all copies or substantial portions of the Software.                    --
-+--                                                                           --
-+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS   --
-+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF                --
-+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN --
-+-- NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,       --
-+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR     --
-+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE --
-+-- USE OR OTHER DEALINGS IN THE SOFTWARE.                                    --
-+--                                                                           --
-+-- Except as contained in this notice, the name(s) of the above copyright    --
-+-- holders shall not be used in advertising or otherwise to promote the      --
-+-- sale, use or other dealings in this Software without prior written        --
-+-- authorization.                                                            --
-+-------------------------------------------------------------------------------
-+-- $Id: README.MinGW,v 1.1 2008/12/14 19:22:16 juergen Exp $
-+-- Author: Juergen Pfeifer
-+-------------------------------------------------------------------------------
-+
-+This is work in progress, but it's in an state where one can see it
-+works at least on the Windows Console.
-+
-+To build ncurses for native Windows, you need the MinGW toolchain from
-+http://www.mingw.org
-+
-+You should install also the MSYS package, so that you've a shell environment
-+that allows you to run the scripts, especially configure etc.
-+
-+Using MinGW is a pragmatic decision, it's the easiest way to port this
-+heavily UNIX based sourcebase to native Windows. The goal is of course
-+to provide the includes, libraries and DLLs to be used with the more
-+common traditional development environments on Windows, mainly with
-+Microsoft Visual Studio.
-+
-+If you start a bash from the MSYS environment, please make sure that the
-+Microsoft Development tools are in your PATH right after the MinGW
-+tools. The LIB.EXE tool is the only one needed. You need this only if 
-+you want to build DLLs that work with native Windows programs. If you 
-+don't have any Microsoft  Development tools on your machine, consider 
-+at least to get the free "Visual C++ 2008 Express Edition". 
-+It contains the LIB.EXE tool. You may also use this compiler to test 
-+writing native Windows programs using the ncurses DLLs without using 
-+MinGW then for writing apps.
-+
-+Please unset the TERM environment variable, so that the Console driver
-+gets activated.
-+
-+This code requires WindowsNT 5.1 or better, which means on the client
-+Windows XP or better, on the server Windows Server 2003 or better.
-+
-+In order to build the DLLs, you must call
-+
-+   make dlls
-+
-+A lot is still TODO, e.g.:
-+
-+  - Mouse support for the Console
-+  - Wide Character support
-+    The Win32Con driver should actually only use Unicode in the
-+    future.
-+  - Thread support (locking)
-+  - A GUI console driver
-+  - Support for Terminals attached via a serial port (via terminfo)
-+  - Support for networked Terminal connections (via terminfo)
-+
-+To support terminfo, we need to have an ioctl() simulation for the
-+serial and networked Terminals.
-diff -Naur ncurses-5.7.orig/test/aclocal.m4 ncurses-5.7/test/aclocal.m4
---- ncurses-5.7.orig/test/aclocal.m4	2008-02-09 10:22:17.000000000 -0800
-+++ ncurses-5.7/test/aclocal.m4	2009-07-19 15:04:17.000000000 -0700
-@@ -1,5 +1,5 @@
- dnl***************************************************************************
--dnl Copyright (c) 2003-2007,2008 Free Software Foundation, Inc.              *
-+dnl Copyright (c) 2003-2008,2009 Free Software Foundation, Inc.              *
- dnl                                                                          *
- dnl Permission is hereby granted, free of charge, to any person obtaining a  *
- dnl copy of this software and associated documentation files (the            *
-@@ -26,7 +26,7 @@
- dnl authorization.                                                           *
- dnl***************************************************************************
- dnl
--dnl $Id: aclocal.m4,v 1.22 2008/02/09 18:22:17 tom Exp $
-+dnl $Id: aclocal.m4,v 1.29 2009/07/17 01:07:50 tom Exp $
- dnl
- dnl Author: Thomas E. Dickey
- dnl
-@@ -40,7 +40,7 @@
- dnl
- dnl ---------------------------------------------------------------------------
- dnl ---------------------------------------------------------------------------
--dnl CF_ADD_CFLAGS version: 7 updated: 2004/04/25 17:48:30
-+dnl CF_ADD_CFLAGS version: 8 updated: 2009/01/06 19:33:30
- dnl -------------
- dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS
- dnl The second parameter if given makes this macro verbose.
-@@ -110,7 +110,7 @@
- 
- if test -n "$cf_new_cppflags" ; then
- 	ifelse($2,,,[CF_VERBOSE(add to \$CPPFLAGS $cf_new_cppflags)])
--	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
-+	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
- fi
- 
- if test -n "$cf_new_extra_cppflags" ; then
-@@ -122,7 +122,7 @@
- 
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_ADD_INCDIR version: 9 updated: 2008/02/09 13:15:34
-+dnl CF_ADD_INCDIR version: 12 updated: 2009/01/18 10:00:47
- dnl -------------
- dnl Add an include-directory to $CPPFLAGS.  Don't add /usr/include, since it's
- dnl redundant.  We don't normally need to add -I/usr/local/include for gcc,
-@@ -149,7 +149,7 @@
- 		fi
- 
- 		if test "$cf_have_incdir" = no ; then
--          if test "$cf_add_incdir" = /usr/local/include ; then
-+		  if test "$cf_add_incdir" = /usr/local/include ; then
- 			if test "$GCC" = yes
- 			then
- 			  cf_save_CPPFLAGS=$CPPFLAGS
-@@ -165,11 +165,11 @@
- 
- 		if test "$cf_have_incdir" = no ; then
- 		  CF_VERBOSE(adding $cf_add_incdir to include-path)
--		  ifelse($2,,CPPFLAGS,$2)="-I$cf_add_incdir $ifelse($2,,CPPFLAGS,[$]$2)"
-+		  ifelse($2,,CPPFLAGS,$2)="$ifelse($2,,CPPFLAGS,$2) -I$cf_add_incdir"
- 
--          cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
--          test "$cf_top_incdir" = "$cf_add_incdir" && break
--          cf_add_incdir="$cf_top_incdir"
-+		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
-+		  test "$cf_top_incdir" = "$cf_add_incdir" && break
-+		  cf_add_incdir="$cf_top_incdir"
- 		else
- 		  break
- 		fi
-@@ -179,7 +179,7 @@
- fi
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_ADD_LIBDIR version: 6 updated: 2008/02/09 13:15:34
-+dnl CF_ADD_LIBDIR version: 8 updated: 2009/01/18 10:01:08
- dnl -------------
- dnl	Adds to the library-path
- dnl
-@@ -208,7 +208,7 @@
-       fi
-       if test "$cf_have_libdir" = no ; then
-         CF_VERBOSE(adding $cf_add_libdir to library-path)
--        ifelse($2,,LDFLAGS,$2)="-L$cf_add_libdir $ifelse($2,,LDFLAGS,[$]$2)"
-+        ifelse($2,,LDFLAGS,$2)="-L$cf_add_libdir $ifelse($2,,LDFLAGS,$2)"
-       fi
-     fi
-   done
-@@ -289,7 +289,7 @@
- fi
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_ANSI_CC_REQD version: 3 updated: 1997/09/06 13:40:44
-+dnl CF_ANSI_CC_REQD version: 4 updated: 2008/03/23 14:48:54
- dnl ---------------
- dnl For programs that must use an ANSI compiler, obtain compiler options that
- dnl will make it recognize prototypes.  We'll do preprocessor checks in other
-@@ -298,7 +298,7 @@
- AC_DEFUN([CF_ANSI_CC_REQD],
- [AC_REQUIRE([CF_ANSI_CC_CHECK])
- if test "$cf_cv_ansi_cc" = "no"; then
--	AC_ERROR(
-+	AC_MSG_ERROR(
- [Your compiler does not appear to recognize prototypes.
- You have the following choices:
- 	a. adjust your compiler options
-@@ -342,7 +342,7 @@
- ])dnl
-   ])])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_CHECK_CACHE version: 10 updated: 2004/05/23 13:03:31
-+dnl CF_CHECK_CACHE version: 11 updated: 2008/03/23 14:45:59
- dnl --------------
- dnl Check if we're accidentally using a cache from a different machine.
- dnl Derive the system name, as a check for reusing the autoconf cache.
-@@ -373,7 +373,7 @@
- 
- if test ".$system_name" != ".$cf_cv_system_name" ; then
- 	AC_MSG_RESULT(Cached system name ($system_name) does not agree with actual ($cf_cv_system_name))
--	AC_ERROR("Please remove config.cache and try again.")
-+	AC_MSG_ERROR("Please remove config.cache and try again.")
- fi
- ])dnl
- dnl ---------------------------------------------------------------------------
-@@ -399,14 +399,15 @@
- fi
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_CURSES_ACS_MAP version: 3 updated: 2003/05/17 22:19:02
-+dnl CF_CURSES_ACS_MAP version: 5 updated: 2009/03/28 16:08:10
- dnl -----------------
- dnl Check for likely values of acs_map[]:
- AC_DEFUN([CF_CURSES_ACS_MAP],
- [
-+AC_REQUIRE([CF_NCURSES_WRAP_PREFIX])dnl
- AC_CACHE_CHECK(for alternate character set array, cf_cv_curses_acs_map,[
- cf_cv_curses_acs_map=unknown
--for name in acs_map _acs_map __acs_map _nc_acs_map
-+for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
- do
- AC_TRY_LINK([
- #include <${cf_cv_ncurses_header-curses.h}>
-@@ -419,6 +420,37 @@
- test "$cf_cv_curses_acs_map" != unknown && AC_DEFINE_UNQUOTED(CURSES_ACS_ARRAY,$cf_cv_curses_acs_map)
- ])
- dnl ---------------------------------------------------------------------------
-+dnl CF_CURSES_CHECK_DATA version: 2 updated: 2009/07/16 21:03:10
-+dnl --------------------
-+dnl Check if curses.h defines the given data/variable.
-+dnl Use this after CF_NCURSES_CONFIG or CF_CURSES_CONFIG.
-+AC_DEFUN([CF_CURSES_CHECK_DATA],
-+[
-+AC_MSG_CHECKING(for data $1 declaration in ${cf_cv_ncurses_header-curses.h})
-+AC_TRY_COMPILE(CF__CURSES_HEAD,[
-+void *foo = &($1)
-+],cf_result=yes,cf_result=no)
-+AC_MSG_RESULT($cf_result)
-+if test $cf_result = yes ; then
-+	CF_UPPER(cf_result,have_curses_data_$1)
-+	AC_DEFINE_UNQUOTED($cf_result)
-+else
-+	AC_MSG_CHECKING(for data $1 in library)
-+	AC_TRY_LINK(CF__CURSES_HEAD
-+[extern char $1;],[
-+	do {
-+		void *foo = &($1);
-+		${cf_cv_main_return-return}(foo == 0);
-+	} while (0)
-+],[cf_result=yes],[cf_result=no])
-+	AC_MSG_RESULT($cf_result)
-+	if test $cf_result = yes ; then
-+		CF_UPPER(cf_result,decl_curses_data_$1)
-+		AC_DEFINE_UNQUOTED($cf_result)
-+	fi
-+fi
-+])dnl
-+dnl ---------------------------------------------------------------------------
- dnl CF_CURSES_CHECK_TYPE version: 2 updated: 2003/03/01 23:40:33
- dnl --------------------
- dnl Check if curses.h defines the given type
-@@ -441,7 +473,19 @@
- fi
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_CURSES_CPPFLAGS version: 9 updated: 2006/02/04 19:44:43
-+dnl CF_CURSES_CONFIG version: 2 updated: 2006/10/29 11:06:27
-+dnl ----------------
-+dnl Tie together the configure-script macros for curses.  It may be ncurses,
-+dnl but unless asked, we do not make a special search for ncurses.  However,
-+dnl still check for the ncurses version number, for use in other macros.
-+AC_DEFUN([CF_CURSES_CONFIG],
-+[
-+CF_CURSES_CPPFLAGS
-+CF_NCURSES_VERSION
-+CF_CURSES_LIBS
-+])dnl
-+dnl ---------------------------------------------------------------------------
-+dnl CF_CURSES_CPPFLAGS version: 10 updated: 2009/01/06 19:34:11
- dnl ------------------
- dnl Look for the curses headers.
- AC_DEFUN([CF_CURSES_CPPFLAGS],[
-@@ -460,13 +504,13 @@
- 	;;
- esac
- ])
--test "$cf_cv_curses_incdir" != no && CPPFLAGS="$cf_cv_curses_incdir $CPPFLAGS"
-+test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
- 
- CF_CURSES_HEADER
- CF_TERM_HEADER
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_CURSES_FUNCS version: 13 updated: 2007/04/28 09:15:55
-+dnl CF_CURSES_FUNCS version: 14 updated: 2009/07/16 19:34:55
- dnl ---------------
- dnl Curses-functions are a little complicated, since a lot of them are macros.
- AC_DEFUN([CF_CURSES_FUNCS],
-@@ -482,24 +526,7 @@
- 	AC_CACHE_VAL(cf_cv_func_$cf_func,[
- 		eval cf_result='$ac_cv_func_'$cf_func
- 		if test ".$cf_result" != ".no"; then
--			AC_TRY_LINK([
--#ifdef HAVE_XCURSES
--#include <xcurses.h>
--char * XCursesProgramName = "test";
--#else
--#include <${cf_cv_ncurses_header-curses.h}>
--#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
--#include <ncursesw/term.h>
--#else
--#if defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
--#include <ncurses/term.h>
--#else
--#ifdef HAVE_TERM_H
--#include <term.h>
--#endif
--#endif
--#endif
--#endif],
-+			AC_TRY_LINK(CF__CURSES_HEAD,
- 			[
- #ifndef ${cf_func}
- long foo = (long)(&${cf_func});
-@@ -549,7 +576,7 @@
- AC_CHECK_HEADERS($cf_cv_ncurses_header)
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_CURSES_LIBS version: 26 updated: 2007/07/29 10:32:40
-+dnl CF_CURSES_LIBS version: 29 updated: 2009/01/06 19:34:57
- dnl --------------
- dnl Look for the curses libraries.  Older curses implementations may require
- dnl termcap/termlib to be linked as well.  Call CF_CURSES_CPPFLAGS first.
-@@ -576,7 +603,7 @@
-     AC_CHECK_LIB(Hcurses,initscr,[
-         # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
-         LIBS="-lHcurses $LIBS"
--        CPPFLAGS="-D__HP_CURSES -D_HP_CURSES $CPPFLAGS"
-+        CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
-         ac_cv_func_initscr=yes
-         ])])
-     ;;
-@@ -615,11 +642,11 @@
- 
-     # Check for library containing initscr
-     test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
--    for cf_curs_lib in $cf_check_list xcurses jcurses unknown
-+ 	for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
-     do
-         AC_CHECK_LIB($cf_curs_lib,initscr,[break])
-     done
--    test $cf_curs_lib = unknown && AC_ERROR(no curses library found)
-+    test $cf_curs_lib = unknown && AC_MSG_ERROR(no curses library found)
- 
-     LIBS="-l$cf_curs_lib $cf_save_LIBS"
-     if test "$cf_term_lib" = unknown ; then
-@@ -629,7 +656,7 @@
-             [cf_result=yes],
-             [cf_result=no])
-         AC_MSG_RESULT($cf_result)
--        test $cf_result = no && AC_ERROR(Cannot link curses library)
-+        test $cf_result = no && AC_MSG_ERROR(Cannot link curses library)
-     elif test "$cf_curs_lib" = "$cf_term_lib" ; then
-         :
-     elif test "$cf_term_lib" != predefined ; then
-@@ -772,7 +799,7 @@
- fi
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_FIND_LIBRARY version: 8 updated: 2004/11/23 20:14:58
-+dnl CF_FIND_LIBRARY version: 9 updated: 2008/03/23 14:48:54
- dnl ---------------
- dnl Look for a non-standard library, given parameters for AC_TRY_LINK.  We
- dnl prefer a standard location, and use -L options only if we do not find the
-@@ -817,11 +844,124 @@
- eval 'cf_found_library=[$]cf_cv_have_lib_'$1
- ifelse($6,,[
- if test $cf_found_library = no ; then
--	AC_ERROR(Cannot link $1 library)
-+	AC_MSG_ERROR(Cannot link $1 library)
- fi
- ])
- ])dnl
- dnl ---------------------------------------------------------------------------
-+dnl CF_FIND_LINKAGE version: 13 updated: 2008/12/24 07:59:55
-+dnl ---------------
-+dnl Find a library (specifically the linkage used in the code fragment),
-+dnl searching for it if it is not already in the library path.
-+dnl See also CF_ADD_SEARCHPATH.
-+dnl
-+dnl Parameters (4-on are optional):
-+dnl     $1 = headers for library entrypoint
-+dnl     $2 = code fragment for library entrypoint
-+dnl     $3 = the library name without the "-l" option or ".so" suffix.
-+dnl     $4 = action to perform if successful (default: update CPPFLAGS, etc)
-+dnl     $5 = action to perform if not successful
-+dnl     $6 = module name, if not the same as the library name
-+dnl     $7 = extra libraries
-+dnl
-+dnl Sets these variables:
-+dnl     $cf_cv_find_linkage_$3 - yes/no according to whether linkage is found
-+dnl     $cf_cv_header_path_$3 - include-directory if needed
-+dnl     $cf_cv_library_path_$3 - library-directory if needed
-+dnl     $cf_cv_library_file_$3 - library-file if needed, e.g., -l$3
-+AC_DEFUN([CF_FIND_LINKAGE],[
-+
-+# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
-+# will be set on completion of the AC_TRY_LINK below.
-+cf_cv_header_path_$3=
-+cf_cv_library_path_$3=
-+
-+CF_MSG_LOG([Starting [FIND_LINKAGE]($3,$6)])
-+
-+AC_TRY_LINK([$1],[$2],
-+    cf_cv_find_linkage_$3=yes,[
-+    cf_cv_find_linkage_$3=no
-+
-+    CF_VERBOSE(find linkage for $3 library)
-+    CF_MSG_LOG([Searching for headers in [FIND_LINKAGE]($3,$6)])
-+
-+    cf_save_CPPFLAGS="$CPPFLAGS"
-+    cf_test_CPPFLAGS="$CPPFLAGS"
-+
-+    CF_HEADER_PATH(cf_search,ifelse([$6],,[$3],[$6]))
-+    for cf_cv_header_path_$3 in $cf_search
-+    do
-+      if test -d $cf_cv_header_path_$3 ; then
-+        CF_VERBOSE(... testing $cf_cv_header_path_$3)
-+        CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_$3"
-+        AC_TRY_COMPILE([$1],[$2],[
-+            CF_VERBOSE(... found $3 headers in $cf_cv_header_path_$3)
-+            cf_cv_find_linkage_$3=maybe
-+            cf_test_CPPFLAGS="$CPPFLAGS"
-+            break],[
-+            CPPFLAGS="$cf_save_CPPFLAGS"
-+            ])
-+      fi
-+    done
-+
-+    if test "$cf_cv_find_linkage_$3" = maybe ; then
-+
-+      CF_MSG_LOG([Searching for $3 library in [FIND_LINKAGE]($3,$6)])
-+
-+      cf_save_LIBS="$LIBS"
-+      cf_save_LDFLAGS="$LDFLAGS"
-+
-+      ifelse([$6],,,[
-+        CPPFLAGS="$cf_test_CPPFLAGS"
-+        LIBS="-l$3 $7 $cf_save_LIBS"
-+        AC_TRY_LINK([$1],[$2],[
-+            CF_VERBOSE(... found $3 library in system)
-+            cf_cv_find_linkage_$3=yes])
-+            CPPFLAGS="$cf_save_CPPFLAGS"
-+            LIBS="$cf_save_LIBS"
-+            ])
-+
-+      if test "$cf_cv_find_linkage_$3" != yes ; then
-+        CF_LIBRARY_PATH(cf_search,$3)
-+        for cf_cv_library_path_$3 in $cf_search
-+        do
-+          if test -d $cf_cv_library_path_$3 ; then
-+            CF_VERBOSE(... testing $cf_cv_library_path_$3)
-+            CPPFLAGS="$cf_test_CPPFLAGS"
-+            LIBS="-l$3 $7 $cf_save_LIBS"
-+            LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_$3"
-+            AC_TRY_LINK([$1],[$2],[
-+                CF_VERBOSE(... found $3 library in $cf_cv_library_path_$3)
-+                cf_cv_find_linkage_$3=yes
-+                cf_cv_library_file_$3="-l$3"
-+                break],[
-+                CPPFLAGS="$cf_save_CPPFLAGS"
-+                LIBS="$cf_save_LIBS"
-+                LDFLAGS="$cf_save_LDFLAGS"
-+                ])
-+          fi
-+        done
-+        LIBS="$cf_save_LIBS"
-+        CPPFLAGS="$cf_save_CPPFLAGS"
-+        LDFLAGS="$cf_save_LDFLAGS"
-+      fi
-+
-+    else
-+      cf_cv_find_linkage_$3=no
-+    fi
-+    ],$7)
-+
-+if test "$cf_cv_find_linkage_$3" = yes ; then
-+ifelse([$4],,[
-+  CF_ADD_INCDIR($cf_cv_header_path_$3)
-+  CF_ADD_LIBDIR($cf_cv_library_path_$3)
-+  LIBS="-l$3 $LIBS"
-+],[$4])
-+else
-+ifelse([$5],,AC_MSG_WARN(Cannot find $3 library),[$5])
-+fi
-+])dnl
-+dnl ---------------------------------------------------------------------------
- dnl CF_FUNC_CURSES_VERSION version: 4 updated: 2007/04/28 09:15:55
- dnl ----------------------
- dnl Solaris has a data item 'curses_version', which confuses AC_CHECK_FUNCS.
-@@ -933,7 +1073,7 @@
- fi
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_GCC_WARNINGS version: 22 updated: 2007/07/29 09:55:12
-+dnl CF_GCC_WARNINGS version: 24 updated: 2009/02/01 15:21:00
- dnl ---------------
- dnl Check if the compiler supports useful warning options.  There's a few that
- dnl we don't use, simply because they're too noisy:
-@@ -966,7 +1106,6 @@
- then
- # The "-wdXXX" options suppress warnings:
- # remark #1419: external declaration in primary source file
--# remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
- # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
- # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
- # remark #193: zero used for undefined preprocessing identifier
-@@ -974,19 +1113,18 @@
- # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
- # remark #869: parameter "tw" was never referenced
- # remark #981: operands are evaluated in unspecified order
--# warning #269: invalid format string conversion
-+# warning #279: controlling expression is constant
- 
- 	AC_CHECKING([for $CC warning options])
- 	cf_save_CFLAGS="$CFLAGS"
- 	EXTRA_CFLAGS="-Wall"
- 	for cf_opt in \
- 		wd1419 \
--		wd1682 \
- 		wd1683 \
- 		wd1684 \
- 		wd193 \
--		wd279 \
- 		wd593 \
-+		wd279 \
- 		wd810 \
- 		wd869 \
- 		wd981
-@@ -1028,7 +1166,7 @@
- 				;;
- 			Winline) #(vi
- 				case $GCC_VERSION in
--				3.3*)
-+				[[34]].*)
- 					CF_VERBOSE(feature is broken in gcc $GCC_VERSION)
- 					continue;;
- 				esac
-@@ -1074,11 +1212,31 @@
- test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_HEADER_PATH version: 8 updated: 2002/11/10 14:46:59
-+dnl CF_HEADER_PATH version: 9 updated: 2008/12/07 19:38:31
- dnl --------------
--dnl Construct a search-list for a nonstandard header-file
-+dnl Construct a search-list of directories for a nonstandard header-file
-+dnl
-+dnl Parameters
-+dnl	$1 = the variable to return as result
-+dnl	$2 = the package name
- AC_DEFUN([CF_HEADER_PATH],
--[CF_SUBDIR_PATH($1,$2,include)
-+[
-+cf_header_path_list=""
-+if test -n "${CFLAGS}${CPPFLAGS}" ; then
-+	for cf_header_path in $CPPFLAGS $CFLAGS
-+	do
-+		case $cf_header_path in #(vi
-+		-I*)
-+			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
-+			CF_ADD_SUBDIR_PATH($1,$2,include,$cf_header_path,NONE)
-+			cf_header_path_list="$cf_header_path_list [$]$1"
-+			;;
-+		esac
-+	done
-+fi
-+
-+CF_SUBDIR_PATH($1,$2,include)
-+
- test "$includedir" != NONE && \
- test "$includedir" != "/usr/include" && \
- test -d "$includedir" && {
-@@ -1093,6 +1251,7 @@
- 	test -d $oldincludedir/$2 && $1="[$]$1 $oldincludedir/$2"
- }
- 
-+$1="$cf_header_path_list [$]$1"
- ])dnl
- dnl ---------------------------------------------------------------------------
- dnl CF_INHERIT_SCRIPT version: 2 updated: 2003/03/01 23:50:42
-@@ -1140,11 +1299,64 @@
- fi
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_LIBRARY_PATH version: 7 updated: 2002/11/10 14:46:59
-+dnl CF_LIBRARY_PATH version: 8 updated: 2008/12/07 19:38:31
- dnl ---------------
--dnl Construct a search-list for a nonstandard library-file
-+dnl Construct a search-list of directories for a nonstandard library-file
-+dnl
-+dnl Parameters
-+dnl	$1 = the variable to return as result
-+dnl	$2 = the package name
- AC_DEFUN([CF_LIBRARY_PATH],
--[CF_SUBDIR_PATH($1,$2,lib)])dnl
-+[
-+cf_library_path_list=""
-+if test -n "${LDFLAGS}${LIBS}" ; then
-+	for cf_library_path in $LDFLAGS $LIBS
-+	do
-+		case $cf_library_path in #(vi
-+		-L*)
-+			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
-+			CF_ADD_SUBDIR_PATH($1,$2,lib,$cf_library_path,NONE)
-+			cf_library_path_list="$cf_library_path_list [$]$1"
-+			;;
-+		esac
-+	done
-+fi
-+
-+CF_SUBDIR_PATH($1,$2,lib)
-+
-+$1="$cf_library_path_list [$]$1"
-+])dnl
-+dnl ---------------------------------------------------------------------------
-+dnl CF_MIN_GETCCHAR version: 2 updated: 2009/07/16 21:03:10
-+dnl ---------------
-+dnl CF_MIN_GETCCHAR
-+dnl Check whether getcchar's return value counts the trailing null in a wchar_t
-+dnl string, or not.  X/Open says it does, but Tru64 and Solaris do not do this.
-+AC_DEFUN([CF_MIN_GETCCHAR],[
-+AC_CACHE_CHECK(if getcchar counts trailing null,cf_cv_min_getcchar,[
-+AC_TRY_RUN([
-+#include <stdlib.h>
-+#include <stdarg.h>
-+#include <${cf_cv_ncurses_header-curses.h}>
-+
-+int main()
-+{
-+	wchar_t data[2];
-+	cchar_t temp[2];
-+	int count;
-+	data[0] = L'\0';
-+    setcchar(temp, data, 0, 0, (void *)0);
-+	count = getcchar(temp, (wchar_t *)0, (attr_t *)0, (short *)0, (void *)0);
-+	${cf_cv_main_return-return}(count != 0);
-+}],
-+	[cf_cv_min_getcchar=no],
-+	[cf_cv_min_getcchar=yes],
-+	[cf_cv_min_getcchar=yes])
-+])
-+if test "$cf_cv_min_getcchar" = yes ; then
-+	AC_DEFINE(MIN_GETCCHAR,1)
-+fi
-+])dnl
- dnl ---------------------------------------------------------------------------
- dnl CF_MSG_LOG version: 4 updated: 2007/07/29 09:55:12
- dnl ----------
-@@ -1187,6 +1399,45 @@
- 	,[$1=no])
- ])dnl
- dnl ---------------------------------------------------------------------------
-+dnl CF_NCURSES_CONFIG version: 5 updated: 2009/01/11 15:31:22
-+dnl -----------------
-+dnl Tie together the configure-script macros for ncurses.
-+dnl Prefer the "-config" script from ncurses 5.6, to simplify analysis.
-+dnl Allow that to be overridden using the $NCURSES_CONFIG environment variable.
-+dnl
-+dnl $1 is the root library name (default: "ncurses")
-+AC_DEFUN([CF_NCURSES_CONFIG],
-+[
-+cf_ncuconfig_root=ifelse($1,,ncurses,$1)
-+
-+echo "Looking for ${cf_ncuconfig_root}-config"
-+AC_PATH_PROGS(NCURSES_CONFIG,${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config,none)
-+
-+if test "$NCURSES_CONFIG" != none ; then
-+
-+cf_cv_ncurses_header=curses.h
-+
-+CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
-+LIBS="`$NCURSES_CONFIG --libs` $LIBS"
-+
-+dnl like CF_NCURSES_CPPFLAGS
-+AC_DEFINE(NCURSES)
-+
-+dnl like CF_NCURSES_LIBS
-+CF_UPPER(cf_nculib_ROOT,HAVE_LIB$cf_ncuconfig_root)
-+AC_DEFINE_UNQUOTED($cf_nculib_ROOT)
-+
-+dnl like CF_NCURSES_VERSION
-+cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
-+
-+else
-+
-+CF_NCURSES_CPPFLAGS(ifelse($1,,ncurses,$1))
-+CF_NCURSES_LIBS(ifelse($1,,ncurses,$1))
-+
-+fi
-+])dnl
-+dnl ---------------------------------------------------------------------------
- dnl CF_NCURSES_CPPFLAGS version: 19 updated: 2007/07/29 13:35:20
- dnl -------------------
- dnl Look for the SVr4 curses clone 'ncurses' in the standard places, adjusting
-@@ -1238,7 +1489,7 @@
- CF_NCURSES_VERSION
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_NCURSES_HEADER version: 1 updated: 2005/12/31 13:28:37
-+dnl CF_NCURSES_HEADER version: 2 updated: 2008/03/23 14:48:54
- dnl -----------------
- dnl Find a "curses" header file, e.g,. "curses.h", or one of the more common
- dnl variations of ncurses' installs.
-@@ -1273,7 +1524,7 @@
- 		CPPFLAGS="$cf_save2_CPPFLAGS"
- 		test "$cf_cv_ncurses_h2" != no && break
- 	done
--	test "$cf_cv_ncurses_h2" = no && AC_ERROR(not found)
-+	test "$cf_cv_ncurses_h2" = no && AC_MSG_ERROR(not found)
- 	])
- 
- 	CF_DIRNAME(cf_1st_incdir,$cf_cv_ncurses_h2)
-@@ -1435,7 +1686,23 @@
- test "$cf_cv_ncurses_version" = no || AC_DEFINE(NCURSES)
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_PATH_SYNTAX version: 11 updated: 2006/09/02 08:55:46
-+dnl CF_NCURSES_WRAP_PREFIX version: 1 updated: 2009/03/28 16:08:10
-+dnl ----------------------
-+dnl Check for ncurses "wrap-prefix" used for public variables which have been
-+dnl wrapped with a function to help with concurrency control.
-+AC_DEFUN([CF_NCURSES_WRAP_PREFIX],
-+[
-+AC_MSG_CHECKING(for ncurses wrap-prefix)
-+AC_ARG_WITH(ncurses-wrap-prefix,
-+	[  --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables],
-+	[NCURSES_WRAP_PREFIX=$withval],
-+	[NCURSES_WRAP_PREFIX=_nc_])
-+AC_MSG_RESULT($NCURSES_WRAP_PREFIX)
-+
-+AC_SUBST(NCURSES_WRAP_PREFIX)
-+])
-+dnl ---------------------------------------------------------------------------
-+dnl CF_PATH_SYNTAX version: 12 updated: 2008/03/23 14:45:59
- dnl --------------
- dnl Check the argument to see that it looks like a pathname.  Rewrite it if it
- dnl begins with one of the prefix/exec_prefix variables, and then again if the
-@@ -1467,12 +1734,12 @@
-   $1=`echo [$]$1 | sed -e s%NONE%$cf_path_syntax%`
-   ;;
- *)
--  ifelse($2,,[AC_ERROR([expected a pathname, not \"[$]$1\"])],$2)
-+  ifelse($2,,[AC_MSG_ERROR([expected a pathname, not \"[$]$1\"])],$2)
-   ;;
- esac
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_PDCURSES_X11 version: 7 updated: 2006/11/12 17:31:59
-+dnl CF_PDCURSES_X11 version: 9 updated: 2009/01/11 15:31:37
- dnl ---------------
- dnl Configure for PDCurses' X11 library
- AC_DEFUN([CF_PDCURSES_X11],[
-@@ -1482,7 +1749,7 @@
- 
- if test "$XCURSES_CONFIG" != none ; then
- 
--CPPFLAGS="`$XCURSES_CONFIG --cflags` $CPPFLAGS"
-+CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
- LIBS="`$XCURSES_CONFIG --libs` $LIBS"
- 
- cf_cv_lib_XCurses=yes
-@@ -1511,7 +1778,7 @@
- 	AC_DEFINE(XCURSES)
- 	AC_DEFINE(HAVE_XCURSES)
- else
--	AC_ERROR(Cannot link with XCurses)
-+	AC_MSG_ERROR(Cannot link with XCurses)
- fi
- ])dnl
- dnl ---------------------------------------------------------------------------
-@@ -1790,7 +2057,7 @@
- $1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_UTF8_LIB version: 4 updated: 2003/03/01 18:36:42
-+dnl CF_UTF8_LIB version: 5 updated: 2008/10/17 19:37:52
- dnl -----------
- dnl Check for multibyte support, and if not found, utf8 compatibility library
- AC_DEFUN([CF_UTF8_LIB],
-@@ -1800,18 +2067,18 @@
- 	AC_TRY_LINK([
- #include <stdlib.h>],[putwc(0,0);],
- 	[cf_cv_utf8_lib=yes],
--	[LIBS="-lutf8 $LIBS"
--	 AC_TRY_LINK([
--#include <libutf8.h>],[putwc(0,0);],
-+	[CF_FIND_LINKAGE([
-+#include <libutf8.h>],[putwc(0,0);],utf8,
- 		[cf_cv_utf8_lib=add-on],
- 		[cf_cv_utf8_lib=no])
--	LIBS="$cf_save_LIBS"
- ])])
- 
- # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
- # ncurses/ncursesw:
- if test "$cf_cv_utf8_lib" = "add-on" ; then
- 	AC_DEFINE(HAVE_LIBUTF8_H)
-+	CF_ADD_INCDIR($cf_cv_header_path_utf8)
-+	CF_ADD_LIBDIR($cf_cv_library_path_utf8)
- 	LIBS="-lutf8 $LIBS"
- fi
- ])dnl
-@@ -1824,6 +2091,56 @@
- CF_MSG_LOG([$1])
- ])dnl
- dnl ---------------------------------------------------------------------------
-+dnl CF_WCHAR_TYPE version: 2 updated: 2004/01/17 19:18:20
-+dnl -------------
-+dnl Check if type wide-character type $1 is declared, and if so, which header
-+dnl file is needed.  The second parameter is used to set a shell variable when
-+dnl the type is not found.  The first parameter sets a shell variable for the
-+dnl opposite sense.
-+AC_DEFUN([CF_WCHAR_TYPE],
-+[
-+# This is needed on Tru64 5.0 to declare $1
-+AC_CACHE_CHECK(if we must include wchar.h to declare $1,cf_cv_$1,[
-+AC_TRY_COMPILE([
-+#include <stdlib.h>
-+#include <stdarg.h>
-+#include <stdio.h>
-+#ifdef HAVE_LIBUTF8_H
-+#include <libutf8.h>
-+#endif],
-+	[$1 state],
-+	[cf_cv_$1=no],
-+	[AC_TRY_COMPILE([
-+#include <stdlib.h>
-+#include <stdarg.h>
-+#include <stdio.h>
-+#include <wchar.h>
-+#ifdef HAVE_LIBUTF8_H
-+#include <libutf8.h>
-+#endif],
-+	[$1 value],
-+	[cf_cv_$1=yes],
-+	[cf_cv_$1=unknown])])])
-+
-+if test "$cf_cv_$1" = yes ; then
-+	AC_DEFINE(NEED_WCHAR_H)
-+	NEED_WCHAR_H=1
-+fi
-+
-+ifelse($2,,,[
-+# if we do not find $1 in either place, use substitution to provide a fallback.
-+if test "$cf_cv_$1" = unknown ; then
-+	$2=1
-+fi
-+])
-+ifelse($3,,,[
-+# if we find $1 in either place, use substitution to provide a fallback.
-+if test "$cf_cv_$1" != unknown ; then
-+	$3=1
-+fi
-+])
-+])dnl
-+dnl ---------------------------------------------------------------------------
- dnl CF_WITH_CURSES_DIR version: 2 updated: 2002/11/10 14:46:59
- dnl ------------------
- dnl Wrapper for AC_ARG_WITH to specify directory under which to look for curses
-@@ -1866,7 +2183,7 @@
- test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_XOPEN_SOURCE version: 25 updated: 2007/01/29 18:36:38
-+dnl CF_XOPEN_SOURCE version: 29 updated: 2009/07/16 21:07:04
- dnl ---------------
- dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
- dnl or adapt to the vendor's definitions to get equivalent functionality,
-@@ -1883,10 +2200,10 @@
- cf_POSIX_C_SOURCE=ifelse($2,,199506L,$2)
- 
- case $host_os in #(vi
--aix[[45]]*) #(vi
-+aix[[456]]*) #(vi
- 	CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
- 	;;
--freebsd*) #(vi
-+freebsd*|dragonfly*) #(vi
- 	# 5.x headers associate
- 	#	_XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
- 	#	_XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
-@@ -1894,13 +2211,16 @@
- 	cf_XOPEN_SOURCE=600
- 	CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
- 	;;
-+hpux11*) #(vi
-+	CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
-+	;;
- hpux*) #(vi
- 	CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
- 	;;
- irix[[56]].*) #(vi
- 	CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
- 	;;
--linux*|gnu*|k*bsd*-gnu) #(vi
-+linux*|gnu*|mint*|k*bsd*-gnu) #(vi
- 	CF_GNU_SOURCE
- 	;;
- mirbsd*) #(vi
-@@ -2005,7 +2325,7 @@
- CF_X_ATHENA_LIBS($cf_x_athena)
- ])dnl
- dnl ---------------------------------------------------------------------------
--dnl CF_X_ATHENA_CPPFLAGS version: 2 updated: 2002/10/09 20:00:37
-+dnl CF_X_ATHENA_CPPFLAGS version: 3 updated: 2009/01/11 15:33:39
- dnl --------------------
- dnl Normally invoked by CF_X_ATHENA, with $1 set to the appropriate flavor of
- dnl the Athena widgets, e.g., Xaw, Xaw3d, neXtaw.
-@@ -2024,7 +2344,7 @@
- 		cf_save="$CPPFLAGS"
- 		cf_test=X11/$cf_x_athena_root/SimpleMenu.h
- 		if test $cf_path != default ; then
--			CPPFLAGS="-I$cf_path/include $cf_save"
-+			CPPFLAGS="$cf_save -I$cf_path/include"
- 			AC_MSG_CHECKING(for $cf_test in $cf_path)
- 		else
- 			AC_MSG_CHECKING(for $cf_test)
-@@ -2052,7 +2372,7 @@
- fi
- ])
- dnl ---------------------------------------------------------------------------
--dnl CF_X_ATHENA_LIBS version: 6 updated: 2006/11/30 17:57:11
-+dnl CF_X_ATHENA_LIBS version: 7 updated: 2008/03/23 14:46:03
- dnl ----------------
- dnl Normally invoked by CF_X_ATHENA, with $1 set to the appropriate flavor of
- dnl the Athena widgets, e.g., Xaw, Xaw3d, neXtaw.
-@@ -2096,7 +2416,7 @@
- done
- 
- if test -z "$cf_x_athena_lib" ; then
--	AC_ERROR(
-+	AC_MSG_ERROR(
- [Unable to successfully link Athena library (-l$cf_x_athena_root) with test program])
- fi
- 
-@@ -2104,7 +2424,7 @@
- AC_DEFINE_UNQUOTED($cf_x_athena_LIBS)
- ])
- dnl ---------------------------------------------------------------------------
--dnl CF_X_TOOLKIT version: 11 updated: 2006/11/29 19:05:14
-+dnl CF_X_TOOLKIT version: 12 updated: 2008/03/23 15:04:54
- dnl ------------
- dnl Check for X Toolkit libraries
- dnl
-@@ -2133,9 +2453,29 @@
- 	[$X_PRE_LIBS $LIBS $X_EXTRA_LIBS])])
- 
- if test $cf_have_X_LIBS = no ; then
--	AC_WARN(
-+	AC_MSG_WARN(
- [Unable to successfully link X Toolkit library (-lXt) with
- test program.  You will have to check and add the proper libraries by hand
- to makefile.])
- fi
- ])dnl
-+dnl ---------------------------------------------------------------------------
-+dnl CF__CURSES_HEAD version: 1 updated: 2009/07/16 19:32:31
-+dnl ---------------
-+dnl Define a reusable chunk which includes <curses.h> and <term.h> when they
-+dnl are both available.
-+define([CF__CURSES_HEAD],[
-+#ifdef HAVE_XCURSES
-+#include <xcurses.h>
-+char * XCursesProgramName = "test";
-+#else
-+#include <${cf_cv_ncurses_header-curses.h}>
-+#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
-+#include <ncursesw/term.h>
-+#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
-+#include <ncurses/term.h>
-+#elif defined(HAVE_TERM_H)
-+#include <term.h>
-+#endif
-+#endif
-+])
-diff -Naur ncurses-5.7.orig/test/chgat.c ncurses-5.7/test/chgat.c
---- ncurses-5.7.orig/test/chgat.c	2008-02-09 15:19:13.000000000 -0800
-+++ ncurses-5.7/test/chgat.c	2009-07-19 15:04:17.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 2006-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 2006-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -26,7 +26,7 @@
-  * authorization.                                                           *
-  ****************************************************************************/
- /*
-- * $Id: chgat.c,v 1.8 2008/02/09 23:19:13 tom Exp $
-+ * $Id: chgat.c,v 1.9 2009/07/15 23:21:04 tom Exp $
-  *
-  * test-driver for chgat/wchgat/mvchgat/mvwchgat
-  */
-@@ -124,10 +124,17 @@
- fill_window(WINDOW *win)
- {
-     int y, x;
-+    int y0 = -1, x0 = -1;
- 
-     getyx(win, y, x);
-     wmove(win, 0, 0);
-     while (waddstr(win, "0123456789 abcdefghijklmnopqrstuvwxyz ") != ERR) {
-+	int y1, x1;
-+	getyx(win, y1, x1);
-+	if (y1 == y0 && x1 == x0)
-+	    break;
-+	x0 = x1;
-+	y0 = y1;
-     }
-     wmove(win, y, x);
- }
-diff -Naur ncurses-5.7.orig/test/clip_printw.c ncurses-5.7/test/clip_printw.c
---- ncurses-5.7.orig/test/clip_printw.c	1969-12-31 16:00:00.000000000 -0800
-+++ ncurses-5.7/test/clip_printw.c	2009-07-19 15:04:17.000000000 -0700
-@@ -0,0 +1,377 @@
-+/****************************************************************************
-+ * Copyright (c) 2008,2009 Free Software Foundation, Inc.                   *
-+ *                                                                          *
-+ * Permission is hereby granted, free of charge, to any person obtaining a  *
-+ * copy of this software and associated documentation files (the            *
-+ * "Software"), to deal in the Software without restriction, including      *
-+ * without limitation the rights to use, copy, modify, merge, publish,      *
-+ * distribute, distribute with modifications, sublicense, and/or sell       *
-+ * copies of the Software, and to permit persons to whom the Software is    *
-+ * furnished to do so, subject to the following conditions:                 *
-+ *                                                                          *
-+ * The above copyright notice and this permission notice shall be included  *
-+ * in all copies or substantial portions of the Software.                   *
-+ *                                                                          *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
-+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
-+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
-+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
-+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
-+ *                                                                          *
-+ * Except as contained in this notice, the name(s) of the above copyright   *
-+ * holders shall not be used in advertising or otherwise to promote the     *
-+ * sale, use or other dealings in this Software without prior written       *
-+ * authorization.                                                           *
-+ ****************************************************************************/
-+/*
-+ * $Id: clip_printw.c,v 1.3 2009/07/17 09:28:52 tom Exp $
-+ *
-+ * demonstrate how to use printw without wrapping.
-+ */
-+
-+#include <test.priv.h>
-+
-+#ifdef HAVE_VW_PRINTW
-+
-+#define SHOW(n) ((n) == ERR ? "ERR" : "OK")
-+#define COLOR_DEFAULT (-1)
-+
-+typedef struct {
-+    unsigned c;
-+    unsigned v;
-+    int status;
-+    int pair;
-+    unsigned attr;
-+    int count;
-+    int ch;
-+    const char *c_msg;
-+    const char *v_msg;
-+    int y_val;
-+    int x_val;
-+    int y_beg, x_beg;
-+    int y_max, x_max;
-+} STATUS;
-+
-+static int
-+clip_wprintw(WINDOW *win, NCURSES_CONST char *fmt,...)
-+{
-+    int y0, x0, y1, x1, width;
-+    WINDOW *sub;
-+    va_list ap;
-+    int rc;
-+
-+    /*
-+     * Allocate a single-line derived window extending from the current
-+     * cursor position to the end of the current line in the given window.
-+     * Disable scrolling in the derived window.
-+     */
-+    getyx(win, y0, x0);
-+    width = getmaxx(win) - x0;
-+    sub = derwin(win, 1, width, y0, x0);
-+    scrollok(sub, FALSE);
-+
-+    /*
-+     * Print the text.
-+     */
-+    va_start(ap, fmt);
-+    rc = vw_printw(sub, fmt, ap);
-+    va_end(ap);
-+
-+    getyx(sub, y1, x1);
-+    delwin(sub);
-+
-+    wmove(win, y1 + y0, x1 + x0);
-+
-+    return rc;
-+}
-+
-+static const char *
-+color_params(unsigned state, int *pair)
-+{
-+    /* *INDENT-OFF* */
-+    static struct {
-+	int pair;
-+	int fg, bg;
-+	const char *msg;
-+    } table[] = {
-+	{ 0, COLOR_DEFAULT, COLOR_DEFAULT, "default" },
-+	{ 1, COLOR_RED,     COLOR_BLACK,   "red/black" },
-+	{ 2, COLOR_WHITE,   COLOR_BLUE,    "white/blue" },
-+    };
-+    /* *INDENT-ON* */
-+
-+    static bool first = TRUE;
-+    const char *result = 0;
-+
-+    if (has_colors()) {
-+	if (first) {
-+	    unsigned n;
-+
-+	    start_color();
-+	    for (n = 0; n < SIZEOF(table); ++n) {
-+		init_pair(table[n].pair, table[n].fg, table[n].bg);
-+	    }
-+	}
-+	if (state < SIZEOF(table)) {
-+	    *pair = table[state].pair;
-+	    result = table[state].msg;
-+	}
-+    }
-+    return result;
-+}
-+
-+static const char *
-+video_params(unsigned state, unsigned *attr)
-+{
-+    /* *INDENT-OFF* */
-+    static struct {
-+	unsigned attr;
-+	const char *msg;
-+    } table[] = {
-+	{ A_NORMAL,	"normal" },
-+	{ A_BOLD,	"bold" },
-+	{ A_REVERSE,	"reverse" },
-+	{ A_UNDERLINE,	"underline" },
-+	{ A_BLINK, 	"blink" },
-+    };
-+    /* *INDENT-ON* */
-+
-+    const char *result = 0;
-+
-+    if (state < SIZEOF(table)) {
-+	*attr = table[state].attr;
-+	result = table[state].msg;
-+    }
-+    return result;
-+}
-+
-+/* fill the window with a test-pattern */
-+static void
-+fill_window(WINDOW *win)
-+{
-+    int y, x;
-+    int y0 = -1, x0 = -1;
-+
-+    getyx(win, y, x);
-+    wmove(win, 0, 0);
-+    while (waddstr(win, "0123456789 abcdefghijklmnopqrstuvwxyz ") != ERR) {
-+	int y1, x1;
-+	getyx(win, y1, x1);
-+	if (y1 == y0 && x1 == x0)
-+	    break;
-+	x0 = x1;
-+	y0 = y1;
-+    }
-+    wmove(win, y, x);
-+}
-+
-+static void
-+show_status(WINDOW *win, STATUS * sp)
-+{
-+    int y, x;
-+
-+    getyx(win, y, x);
-+    wmove(win, 0, 0);
-+    wprintw(win, "Count %d", sp->count);
-+    if (sp->v_msg != 0)
-+	wprintw(win, " Video %s", sp->v_msg);
-+    if (sp->c_msg != 0)
-+	wprintw(win, " Color %s", sp->c_msg);
-+    wprintw(win, " (%d)", sp->status);
-+    wclrtoeol(win);
-+    wmove(win, y, x);
-+}
-+
-+static void
-+do_subwindow(WINDOW *win, STATUS * sp, void func(WINDOW *))
-+{
-+    WINDOW *win1 = newwin(sp->y_max - 2, sp->x_max - 2,
-+			  sp->y_beg + 1, sp->x_beg + 1);
-+
-+    if (win1 != 0 && sp->y_max > 4 && sp->x_max > 4) {
-+	WINDOW *win2 = derwin(win1, sp->y_max - 4, sp->x_max - 4, 1, 1);
-+
-+	if (win2 != 0) {
-+	    box(win1, 0, 0);
-+	    wrefresh(win1);
-+	    func(win2);
-+
-+	    delwin(win2);
-+	} else {
-+	    beep();
-+	}
-+	delwin(win1);
-+	touchwin(win);
-+    } else {
-+	beep();
-+    }
-+}
-+
-+static void
-+init_status(WINDOW *win, STATUS * sp)
-+{
-+    memset(sp, 0, sizeof(*sp));
-+    sp->c = 99;
-+    sp->v = 99;
-+    sp->ch = ' ';
-+
-+    keypad(win, TRUE);
-+    fill_window(win);
-+
-+    getbegyx(win, sp->y_beg, sp->x_beg);
-+    getmaxyx(win, sp->y_max, sp->x_max);
-+}
-+
-+static void
-+show_help(WINDOW *win)
-+{
-+    static const char *table[] =
-+    {
-+	"Basic commands:"
-+	,"Use h/j/k/l or arrow keys to move the cursor."
-+	,"Set the count parameter for clip_wprintw by entering digits 0-9."
-+	,""
-+	,"Other commands:"
-+	,"space toggles through the set of video attributes and colors."
-+	,"t     touches (forces repaint) of the current line."
-+	,".     calls clip_wprintw at the current position with the given count."
-+	,"=     resets count to zero."
-+	,"?     shows this help-window"
-+	,""
-+    };
-+
-+    int y_max, x_max;
-+    int row;
-+
-+    getmaxyx(win, y_max, x_max);
-+    for (row = 0; row < (int) SIZEOF(table) && row < y_max; ++row) {
-+	mvwprintw(win, row, 0, "%.*s", x_max, table[row]);
-+    }
-+    while (wgetch(win) != 'q')
-+	beep();
-+}
-+
-+static void
-+update_status(WINDOW *win, STATUS * sp)
-+{
-+    switch (sp->ch) {
-+    case ' ':			/* next test-iteration */
-+	if (has_colors()) {
-+	    if ((sp->c_msg = color_params(++(sp->c), &(sp->pair))) == 0) {
-+		sp->c_msg = color_params(sp->c = 0, &(sp->pair));
-+		if ((sp->v_msg = video_params(++(sp->v), &(sp->attr))) == 0) {
-+		    sp->v_msg = video_params(sp->v = 0, &(sp->attr));
-+		}
-+	    }
-+	} else {
-+	    if ((sp->v_msg = video_params(++(sp->v), &(sp->attr))) == 0) {
-+		sp->v_msg = video_params(sp->v = 0, &(sp->attr));
-+	    }
-+	}
-+	sp->count = 0;
-+	show_status(win, sp);
-+	break;
-+    case KEY_LEFT:
-+    case 'h':
-+	if (sp->x_val > 0)
-+	    wmove(win, sp->y_val, --(sp->x_val));
-+	break;
-+    case KEY_DOWN:
-+    case 'j':
-+	if (sp->y_val < sp->y_max)
-+	    wmove(win, ++(sp->y_val), sp->x_val);
-+	break;
-+    case KEY_UP:
-+    case 'k':
-+	if (sp->y_val > 0)
-+	    wmove(win, --(sp->y_val), sp->x_val);
-+	break;
-+    case KEY_RIGHT:
-+    case 'l':
-+	if (sp->x_val < sp->x_max)
-+	    wmove(win, sp->y_val, ++(sp->x_val));
-+	break;
-+    case 't':
-+	touchline(win, sp->y_val, 1);
-+	break;
-+    case '=':
-+	sp->count = 0;
-+	show_status(win, sp);
-+	break;
-+    case '?':
-+	do_subwindow(win, sp, show_help);
-+	break;
-+    default:
-+	if (isdigit(sp->ch)) {
-+	    sp->count = (sp->count * 10) + (sp->ch - '0');
-+	    show_status(win, sp);
-+	} else {
-+	    beep();
-+	}
-+	break;
-+    }
-+}
-+
-+static void
-+test_clipping(WINDOW *win)
-+{
-+    STATUS st;
-+    char fmt[80];
-+    char *buffer;
-+    unsigned j, need;
-+
-+    init_status(win, &st);
-+
-+    do {
-+	switch (st.ch) {
-+	case '.':		/* change from current position */
-+	    wattrset(win, st.attr | COLOR_PAIR(st.pair));
-+	    if (st.count > 0) {
-+		need = st.count + 1;
-+		sprintf(fmt, "%%c%%%ds%%c", st.count);
-+	    } else {
-+		need = getmaxx(win) - 1;
-+		strcpy(fmt, "%c%s%c");
-+	    }
-+	    if ((buffer = typeMalloc(char, need)) != 0) {
-+		for (j = 0; j < need; ++j) {
-+		    buffer[j] = 'A' + (j % 26);
-+		}
-+		buffer[need - 1] = '\0';
-+		st.status = clip_wprintw(win, fmt, '[', buffer, ']');
-+	    }
-+	    break;
-+	case 'w':
-+	    do_subwindow(win, &st, test_clipping);
-+	    break;
-+	case 'q':
-+	    return;
-+	default:
-+	    update_status(win, &st);
-+	    break;
-+	}
-+    } while ((st.ch = wgetch(win)) != ERR);
-+}
-+
-+int
-+main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
-+{
-+    initscr();
-+    cbreak();
-+    noecho();
-+
-+    test_clipping(stdscr);
-+    endwin();
-+
-+    ExitProgram(EXIT_SUCCESS);
-+}
-+#else
-+int
-+main(void)
-+{
-+    printf("This program requires the curses vw_printw function\n");
-+    ExitProgram(EXIT_FAILURE);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/test/configure ncurses-5.7/test/configure
---- ncurses-5.7.orig/test/configure	2008-09-06 15:11:48.000000000 -0700
-+++ ncurses-5.7/test/configure	2009-07-19 15:04:17.000000000 -0700
-@@ -194,6 +194,7 @@
-   --with-Xaw3d            link with Xaw 3d library
-   --with-neXtaw           link with neXT Athena library
-   --with-XawPlus          link with Athena-Plus library
-+  --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
- EOF
-     exit 0 ;;
- 
-@@ -536,7 +537,7 @@
- # Uses ac_ vars as temps to allow command line to override cache and checks.
- # --without-x overrides everything else, but does not touch the cache.
- echo $ac_n "checking for X""... $ac_c" 1>&6
--echo "configure:540: checking for X" >&5
-+echo "configure:541: checking for X" >&5
- 
- 
- # Check whether --with-x or --without-x was given.
-@@ -599,12 +600,12 @@
- 
-   # First, try using that file with no special directory specified.
- cat > conftest.$ac_ext <<EOF
--#line 603 "configure"
-+#line 604 "configure"
- #include "confdefs.h"
- #include <$x_direct_test_include>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
--{ (eval echo configure:608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+{ (eval echo configure:609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
- if test -z "$ac_err"; then
-   rm -rf conftest*
-@@ -673,14 +674,14 @@
-   ac_save_LIBS="$LIBS"
-   LIBS="-l$x_direct_test_library $LIBS"
- cat > conftest.$ac_ext <<EOF
--#line 677 "configure"
-+#line 678 "configure"
- #include "confdefs.h"
- 
- int main() {
- ${x_direct_test_function}()
- ; return 0; }
- EOF
--if { (eval echo configure:684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   LIBS="$ac_save_LIBS"
- # We can link X programs with no special library path.
-@@ -803,7 +804,7 @@
- fi
- 
- echo $ac_n "checking host system type""... $ac_c" 1>&6
--echo "configure:807: checking host system type" >&5
-+echo "configure:808: checking host system type" >&5
- 
- host_alias=$host
- case "$host_alias" in
-@@ -851,7 +852,7 @@
- 
- 
- echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
--echo "configure:855: checking whether ${MAKE-make} sets \${MAKE}" >&5
-+echo "configure:856: checking whether ${MAKE-make} sets \${MAKE}" >&5
- set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
-@@ -880,7 +881,7 @@
- # Extract the first word of "gcc", so it can be a program name with args.
- set dummy gcc; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:884: checking for $ac_word" >&5
-+echo "configure:885: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -910,7 +911,7 @@
-   # Extract the first word of "cc", so it can be a program name with args.
- set dummy cc; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:914: checking for $ac_word" >&5
-+echo "configure:915: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -961,7 +962,7 @@
-       # Extract the first word of "cl", so it can be a program name with args.
- set dummy cl; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:965: checking for $ac_word" >&5
-+echo "configure:966: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -993,7 +994,7 @@
- fi
- 
- echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
--echo "configure:997: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-+echo "configure:998: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
- 
- ac_ext=c
- # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-@@ -1004,12 +1005,12 @@
- 
- cat > conftest.$ac_ext << EOF
- 
--#line 1008 "configure"
-+#line 1009 "configure"
- #include "confdefs.h"
- 
- main(){return(0);}
- EOF
--if { (eval echo configure:1013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:1014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   ac_cv_prog_cc_works=yes
-   # If we can't run a trivial program, we are probably using a cross compiler.
-   if (./conftest; exit) 2>/dev/null; then
-@@ -1035,12 +1036,12 @@
-   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
- fi
- echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
--echo "configure:1039: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-+echo "configure:1040: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
- echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
- cross_compiling=$ac_cv_prog_cc_cross
- 
- echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
--echo "configure:1044: checking whether we are using GNU C" >&5
-+echo "configure:1045: checking whether we are using GNU C" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -1049,7 +1050,7 @@
-   yes;
- #endif
- EOF
--if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-   ac_cv_prog_gcc=yes
- else
-   ac_cv_prog_gcc=no
-@@ -1068,7 +1069,7 @@
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
--echo "configure:1072: checking whether ${CC-cc} accepts -g" >&5
-+echo "configure:1073: checking whether ${CC-cc} accepts -g" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -1100,7 +1101,7 @@
- fi
- 
- echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
--echo "configure:1104: checking how to run the C preprocessor" >&5
-+echo "configure:1105: checking how to run the C preprocessor" >&5
- # On Suns, sometimes $CPP names a directory.
- if test -n "$CPP" && test -d "$CPP"; then
-   CPP=
-@@ -1115,13 +1116,13 @@
-   # On the NeXT, cc -E runs the code through the compiler's parser,
-   # not just through cpp.
-   cat > conftest.$ac_ext <<EOF
--#line 1119 "configure"
-+#line 1120 "configure"
- #include "confdefs.h"
- #include <assert.h>
- Syntax Error
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
--{ (eval echo configure:1125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+{ (eval echo configure:1126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
- if test -z "$ac_err"; then
-   :
-@@ -1132,13 +1133,13 @@
-   rm -rf conftest*
-   CPP="${CC-cc} -E -traditional-cpp"
-   cat > conftest.$ac_ext <<EOF
--#line 1136 "configure"
-+#line 1137 "configure"
- #include "confdefs.h"
- #include <assert.h>
- Syntax Error
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
--{ (eval echo configure:1142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+{ (eval echo configure:1143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
- if test -z "$ac_err"; then
-   :
-@@ -1149,13 +1150,13 @@
-   rm -rf conftest*
-   CPP="${CC-cc} -nologo -E"
-   cat > conftest.$ac_ext <<EOF
--#line 1153 "configure"
-+#line 1154 "configure"
- #include "confdefs.h"
- #include <assert.h>
- Syntax Error
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
--{ (eval echo configure:1159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+{ (eval echo configure:1160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
- if test -z "$ac_err"; then
-   :
-@@ -1184,7 +1185,7 @@
- # Extract the first word of "$ac_prog", so it can be a program name with args.
- set dummy $ac_prog; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:1188: checking for $ac_word" >&5
-+echo "configure:1189: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -1246,12 +1247,12 @@
- cf_cv_libtype=
- 
- echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
--echo "configure:1250: checking for Cygwin environment" >&5
-+echo "configure:1251: checking for Cygwin environment" >&5
- if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   cat > conftest.$ac_ext <<EOF
--#line 1255 "configure"
-+#line 1256 "configure"
- #include "confdefs.h"
- 
- int main() {
-@@ -1262,7 +1263,7 @@
- return __CYGWIN__;
- ; return 0; }
- EOF
--if { (eval echo configure:1266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:1267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
-   ac_cv_cygwin=yes
- else
-@@ -1279,19 +1280,19 @@
- CYGWIN=
- test "$ac_cv_cygwin" = yes && CYGWIN=yes
- echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
--echo "configure:1283: checking for mingw32 environment" >&5
-+echo "configure:1284: checking for mingw32 environment" >&5
- if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   cat > conftest.$ac_ext <<EOF
--#line 1288 "configure"
-+#line 1289 "configure"
- #include "confdefs.h"
- 
- int main() {
- return __MINGW32__;
- ; return 0; }
- EOF
--if { (eval echo configure:1295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:1296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
-   ac_cv_mingw32=yes
- else
-@@ -1310,7 +1311,7 @@
- 
- 
- echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
--echo "configure:1314: checking for executable suffix" >&5
-+echo "configure:1315: checking for executable suffix" >&5
- if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -1320,7 +1321,7 @@
-   rm -f conftest*
-   echo 'int main () { return 0; }' > conftest.$ac_ext
-   ac_cv_exeext=
--  if { (eval echo configure:1324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
-+  if { (eval echo configure:1325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
-     for file in conftest.*; do
-       case $file in
-       *.c | *.o | *.obj) ;;
-@@ -1341,13 +1342,13 @@
- ac_exeext=$EXEEXT
- 
- echo $ac_n "checking for object suffix""... $ac_c" 1>&6
--echo "configure:1345: checking for object suffix" >&5
-+echo "configure:1346: checking for object suffix" >&5
- if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   rm -f conftest*
- echo 'int i = 1;' > conftest.$ac_ext
--if { (eval echo configure:1351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:1352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   for ac_file in conftest.*; do
-     case $ac_file in
-     *.c) ;;
-@@ -1367,7 +1368,7 @@
- 
- 
- echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
--echo "configure:1371: checking for ${CC-cc} option to accept ANSI C" >&5
-+echo "configure:1372: checking for ${CC-cc} option to accept ANSI C" >&5
- if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -1451,7 +1452,7 @@
- 
- if test -n "$cf_new_cppflags" ; then
- 	
--	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
-+	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
- fi
- 
- if test -n "$cf_new_extra_cppflags" ; then
-@@ -1463,7 +1464,7 @@
- 
- 
- 	cat > conftest.$ac_ext <<EOF
--#line 1467 "configure"
-+#line 1468 "configure"
- #include "confdefs.h"
- 
- #ifndef CC_HAS_PROTOS
-@@ -1479,7 +1480,7 @@
- 	struct s2 {int (*f) (double a);};
- ; return 0; }
- EOF
--if { (eval echo configure:1483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:1484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
-   cf_cv_ansi_cc="$cf_arg"; break
- else
-@@ -1558,7 +1559,7 @@
- 
- if test -n "$cf_new_cppflags" ; then
- 	
--	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
-+	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
- fi
- 
- if test -n "$cf_new_extra_cppflags" ; then
-@@ -1606,9 +1607,9 @@
- if test "$GCC" = yes
- then
- 	echo "checking for $CC __attribute__ directives" 1>&6
--echo "configure:1610: checking for $CC __attribute__ directives" >&5
-+echo "configure:1611: checking for $CC __attribute__ directives" >&5
- cat > conftest.$ac_ext <<EOF
--#line 1612 "${as_me-configure}"
-+#line 1613 "${as_me-configure}"
- #include "confdefs.h"
- #include "conftest.h"
- #include "conftest.i"
-@@ -1646,7 +1647,7 @@
- EOF
- 			;;
- 		esac
--		if { (eval echo configure:1650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+		if { (eval echo configure:1651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- 			test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
- 			cat conftest.h >>confdefs.h
- 		fi
-@@ -1659,7 +1660,7 @@
- 
- 
- echo $ac_n "checking if $CC -U and -D options work together""... $ac_c" 1>&6
--echo "configure:1663: checking if $CC -U and -D options work together" >&5
-+echo "configure:1664: checking if $CC -U and -D options work together" >&5
- if eval "test \"`echo '$''{'cf_cv_cc_u_d_options'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -1667,7 +1668,7 @@
- 	cf_save_CPPFLAGS="$CPPFLAGS"
- 	CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
- 	cat > conftest.$ac_ext <<EOF
--#line 1671 "configure"
-+#line 1672 "configure"
- #include "confdefs.h"
- 
- int main() {
-@@ -1681,7 +1682,7 @@
- 	
- ; return 0; }
- EOF
--if { (eval echo configure:1685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:1686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
-   
- 	cf_cv_cc_u_d_options=yes
-@@ -1707,10 +1708,10 @@
- cf_POSIX_C_SOURCE=199506L
- 
- case $host_os in #(vi
--aix[45]*) #(vi
-+aix[456]*) #(vi
- 	CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
- 	;;
--freebsd*) #(vi
-+freebsd*|dragonfly*) #(vi
- 	# 5.x headers associate
- 	#	_XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
- 	#	_XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
-@@ -1718,22 +1719,25 @@
- 	cf_XOPEN_SOURCE=600
- 	CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
- 	;;
-+hpux11*) #(vi
-+	CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
-+	;;
- hpux*) #(vi
- 	CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
- 	;;
- irix[56].*) #(vi
- 	CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
- 	;;
--linux*|gnu*|k*bsd*-gnu) #(vi
-+linux*|gnu*|mint*|k*bsd*-gnu) #(vi
- 	
- echo $ac_n "checking if we must define _GNU_SOURCE""... $ac_c" 1>&6
--echo "configure:1731: checking if we must define _GNU_SOURCE" >&5
-+echo "configure:1735: checking if we must define _GNU_SOURCE" >&5
- if eval "test \"`echo '$''{'cf_cv_gnu_source'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   
- cat > conftest.$ac_ext <<EOF
--#line 1737 "configure"
-+#line 1741 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- int main() {
-@@ -1743,7 +1747,7 @@
- #endif
- ; return 0; }
- EOF
--if { (eval echo configure:1747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:1751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
-   cf_cv_gnu_source=no
- else
-@@ -1753,7 +1757,7 @@
-   cf_save="$CPPFLAGS"
- 	 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
- 	 cat > conftest.$ac_ext <<EOF
--#line 1757 "configure"
-+#line 1761 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- int main() {
-@@ -1763,7 +1767,7 @@
- #endif
- ; return 0; }
- EOF
--if { (eval echo configure:1767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:1771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
-   cf_cv_gnu_source=no
- else
-@@ -1807,13 +1811,13 @@
- 	;;
- *)
- 	echo $ac_n "checking if we should define _XOPEN_SOURCE""... $ac_c" 1>&6
--echo "configure:1811: checking if we should define _XOPEN_SOURCE" >&5
-+echo "configure:1815: checking if we should define _XOPEN_SOURCE" >&5
- if eval "test \"`echo '$''{'cf_cv_xopen_source'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   
- 	cat > conftest.$ac_ext <<EOF
--#line 1817 "configure"
-+#line 1821 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- int main() {
-@@ -1823,7 +1827,7 @@
- #endif
- ; return 0; }
- EOF
--if { (eval echo configure:1827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:1831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
-   cf_cv_xopen_source=no
- else
-@@ -1833,7 +1837,7 @@
-   cf_save="$CPPFLAGS"
- 	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
- 	 cat > conftest.$ac_ext <<EOF
--#line 1837 "configure"
-+#line 1841 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- int main() {
-@@ -1843,7 +1847,7 @@
- #endif
- ; return 0; }
- EOF
--if { (eval echo configure:1847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:1851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
-   cf_cv_xopen_source=no
- else
-@@ -1898,16 +1902,16 @@
- 
- 
- echo $ac_n "checking if we should define _POSIX_C_SOURCE""... $ac_c" 1>&6
--echo "configure:1902: checking if we should define _POSIX_C_SOURCE" >&5
-+echo "configure:1906: checking if we should define _POSIX_C_SOURCE" >&5
- if eval "test \"`echo '$''{'cf_cv_posix_c_source'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   
- 	
--echo "${as_me-configure}:1908: testing if the symbol is already defined go no further ..." 1>&5
-+echo "${as_me-configure}:1912: testing if the symbol is already defined go no further ..." 1>&5
- 
- 	cat > conftest.$ac_ext <<EOF
--#line 1911 "configure"
-+#line 1915 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- int main() {
-@@ -1917,7 +1921,7 @@
- #endif
- ; return 0; }
- EOF
--if { (eval echo configure:1921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:1925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
-   cf_cv_posix_c_source=no
- else
-@@ -1939,7 +1943,7 @@
- 	 esac
- 	 if test "$cf_want_posix_source" = yes ; then
- 		cat > conftest.$ac_ext <<EOF
--#line 1943 "configure"
-+#line 1947 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- int main() {
-@@ -1949,7 +1953,7 @@
- #endif
- ; return 0; }
- EOF
--if { (eval echo configure:1953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:1957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   :
- else
-   echo "configure: failed program was:" >&5
-@@ -1960,15 +1964,15 @@
- rm -f conftest*
- 	 fi
- 	 
--echo "${as_me-configure}:1964: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
-+echo "${as_me-configure}:1968: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
- 
- 	 CFLAGS="$cf_trim_CFLAGS"
- 	 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
- 	 
--echo "${as_me-configure}:1969: testing if the second compile does not leave our definition intact error ..." 1>&5
-+echo "${as_me-configure}:1973: testing if the second compile does not leave our definition intact error ..." 1>&5
- 
- 	 cat > conftest.$ac_ext <<EOF
--#line 1972 "configure"
-+#line 1976 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- int main() {
-@@ -1978,7 +1982,7 @@
- #endif
- ; return 0; }
- EOF
--if { (eval echo configure:1982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:1986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   :
- else
-   echo "configure: failed program was:" >&5
-@@ -2013,12 +2017,12 @@
- esac
- 
- echo $ac_n "checking for working const""... $ac_c" 1>&6
--echo "configure:2017: checking for working const" >&5
-+echo "configure:2021: checking for working const" >&5
- if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   cat > conftest.$ac_ext <<EOF
--#line 2022 "configure"
-+#line 2026 "configure"
- #include "confdefs.h"
- 
- int main() {
-@@ -2067,7 +2071,7 @@
- 
- ; return 0; }
- EOF
--if { (eval echo configure:2071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:2075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
-   ac_cv_c_const=yes
- else
-@@ -2089,7 +2093,7 @@
- 
- 
- echo $ac_n "checking for signal global datatype""... $ac_c" 1>&6
--echo "configure:2093: checking for signal global datatype" >&5
-+echo "configure:2097: checking for signal global datatype" >&5
- if eval "test \"`echo '$''{'cf_cv_sig_atomic_t'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -2100,7 +2104,7 @@
- 		"int"
- 	do
- 	cat > conftest.$ac_ext <<EOF
--#line 2104 "configure"
-+#line 2108 "configure"
- #include "confdefs.h"
- 
- #include <sys/types.h>
-@@ -2118,7 +2122,7 @@
- 		 x = 1
- ; return 0; }
- EOF
--if { (eval echo configure:2122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:2126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
-   cf_cv_sig_atomic_t=$cf_type
- else
-@@ -2142,7 +2146,7 @@
- 
- 
- echo $ac_n "checking if you want to see long compiling messages""... $ac_c" 1>&6
--echo "configure:2146: checking if you want to see long compiling messages" >&5
-+echo "configure:2150: checking if you want to see long compiling messages" >&5
- 
- # Check whether --enable-echo or --disable-echo was given.
- if test "${enable_echo+set}" = set; then
-@@ -2189,7 +2193,7 @@
- GCC_VERSION=none
- if test "$GCC" = yes ; then
- 	echo $ac_n "checking version of $CC""... $ac_c" 1>&6
--echo "configure:2193: checking version of $CC" >&5
-+echo "configure:2197: checking version of $CC" >&5
- 	GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
- 	test -z "$GCC_VERSION" && GCC_VERSION=unknown
- 	echo "$ac_t""$GCC_VERSION" 1>&6
-@@ -2199,7 +2203,7 @@
- if ( test "$GCC" = yes || test "$GXX" = yes )
- then
- echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6
--echo "configure:2203: checking if you want to turn on gcc warnings" >&5
-+echo "configure:2207: checking if you want to turn on gcc warnings" >&5
- 
- # Check whether --enable-warnings or --disable-warnings was given.
- if test "${enable_warnings+set}" = set; then
-@@ -2228,11 +2232,11 @@
- 	case $host_os in
- 	linux*|gnu*)
- 		echo $ac_n "checking if this is really Intel C compiler""... $ac_c" 1>&6
--echo "configure:2232: checking if this is really Intel C compiler" >&5
-+echo "configure:2236: checking if this is really Intel C compiler" >&5
- 		cf_save_CFLAGS="$CFLAGS"
- 		CFLAGS="$CFLAGS -no-gcc"
- 		cat > conftest.$ac_ext <<EOF
--#line 2236 "configure"
-+#line 2240 "configure"
- #include "confdefs.h"
- 
- int main() {
-@@ -2244,7 +2248,7 @@
- 
- ; return 0; }
- EOF
--if { (eval echo configure:2248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:2252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
-   INTEL_COMPILER=yes
- cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
-@@ -2262,7 +2266,7 @@
- 
- 
- cat > conftest.$ac_ext <<EOF
--#line 2266 "${as_me-configure}"
-+#line 2270 "${as_me-configure}"
- int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
- EOF
- 
-@@ -2270,7 +2274,6 @@
- then
- # The "-wdXXX" options suppress warnings:
- # remark #1419: external declaration in primary source file
--# remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
- # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
- # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
- # remark #193: zero used for undefined preprocessing identifier
-@@ -2278,26 +2281,25 @@
- # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
- # remark #869: parameter "tw" was never referenced
- # remark #981: operands are evaluated in unspecified order
--# warning #269: invalid format string conversion
-+# warning #279: controlling expression is constant
- 
- 	echo "checking for $CC warning options" 1>&6
--echo "configure:2285: checking for $CC warning options" >&5
-+echo "configure:2288: checking for $CC warning options" >&5
- 	cf_save_CFLAGS="$CFLAGS"
- 	EXTRA_CFLAGS="-Wall"
- 	for cf_opt in \
- 		wd1419 \
--		wd1682 \
- 		wd1683 \
- 		wd1684 \
- 		wd193 \
--		wd279 \
- 		wd593 \
-+		wd279 \
- 		wd810 \
- 		wd869 \
- 		wd981
- 	do
- 		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
--		if { (eval echo configure:2301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+		if { (eval echo configure:2303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- 			test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
- 			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
- 		fi
-@@ -2307,7 +2309,7 @@
- elif test "$GCC" = yes
- then
- 	echo "checking for $CC warning options" 1>&6
--echo "configure:2311: checking for $CC warning options" >&5
-+echo "configure:2313: checking for $CC warning options" >&5
- 	cf_save_CFLAGS="$CFLAGS"
- 	EXTRA_CFLAGS="-W -Wall"
- 	cf_warn_CONST=""
-@@ -2326,7 +2328,7 @@
- 		Wundef $cf_warn_CONST 
- 	do
- 		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
--		if { (eval echo configure:2330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+		if { (eval echo configure:2332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- 			test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
- 			case $cf_opt in #(vi
- 			Wcast-qual) #(vi
-@@ -2334,10 +2336,10 @@
- 				;;
- 			Winline) #(vi
- 				case $GCC_VERSION in
--				3.3*)
-+				[34].*)
- 					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
- 
--echo "${as_me-configure}:2341: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
-+echo "${as_me-configure}:2343: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
- 
- 
- 					continue;;
-@@ -2440,8 +2442,9 @@
- curses)
- 	
- 
-+
- echo $ac_n "checking for extra include directories""... $ac_c" 1>&6
--echo "configure:2445: checking for extra include directories" >&5
-+echo "configure:2448: checking for extra include directories" >&5
- if eval "test \"`echo '$''{'cf_cv_curses_incdir'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -2462,11 +2465,11 @@
- fi
- 
- echo "$ac_t""$cf_cv_curses_incdir" 1>&6
--test "$cf_cv_curses_incdir" != no && CPPFLAGS="$cf_cv_curses_incdir $CPPFLAGS"
-+test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
- 
- 
- echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6
--echo "configure:2470: checking if we have identified curses headers" >&5
-+echo "configure:2473: checking if we have identified curses headers" >&5
- if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -2479,14 +2482,14 @@
- 	ncurses/ncurses.h
- do
- cat > conftest.$ac_ext <<EOF
--#line 2483 "configure"
-+#line 2486 "configure"
- #include "confdefs.h"
- #include <${cf_header}>
- int main() {
- initscr(); tgoto("?", 0,0)
- ; return 0; }
- EOF
--if { (eval echo configure:2490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:2493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
-   cf_cv_ncurses_header=$cf_header; break
- else
-@@ -2509,17 +2512,17 @@
- do
- ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
- echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
--echo "configure:2513: checking for $ac_hdr" >&5
-+echo "configure:2516: checking for $ac_hdr" >&5
- if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   cat > conftest.$ac_ext <<EOF
--#line 2518 "configure"
-+#line 2521 "configure"
- #include "confdefs.h"
- #include <$ac_hdr>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
--{ (eval echo configure:2523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+{ (eval echo configure:2526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
- if test -z "$ac_err"; then
-   rm -rf conftest*
-@@ -2548,7 +2551,7 @@
- 
- 
- echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
--echo "configure:2552: checking for terminfo header" >&5
-+echo "configure:2555: checking for terminfo header" >&5
- if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -2565,7 +2568,7 @@
- for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
- do
- cat > conftest.$ac_ext <<EOF
--#line 2569 "configure"
-+#line 2572 "configure"
- #include "confdefs.h"
- #include <stdio.h>
- #include <${cf_cv_ncurses_header-curses.h}>
-@@ -2575,7 +2578,7 @@
- int x = auto_left_margin
- ; return 0; }
- EOF
--if { (eval echo configure:2579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:2582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
-   
- 	cf_cv_term_header="$cf_test"
-@@ -2622,9 +2625,9 @@
- esac
- 
- 
--	
-+
- echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
--echo "configure:2628: checking for ncurses version" >&5
-+echo "configure:2631: checking for ncurses version" >&5
- if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -2650,7 +2653,7 @@
- #endif
- EOF
- 	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
--	{ (eval echo configure:2654: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
-+	{ (eval echo configure:2657: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
- 	if test -f conftest.out ; then
- 		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
- 		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
-@@ -2659,7 +2662,7 @@
- 
- else
-   cat > conftest.$ac_ext <<EOF
--#line 2663 "configure"
-+#line 2666 "configure"
- #include "confdefs.h"
- 
- #include <${cf_cv_ncurses_header-curses.h}>
-@@ -2683,7 +2686,7 @@
- 	${cf_cv_main_return-return}(0);
- }
- EOF
--if { (eval echo configure:2687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-+if { (eval echo configure:2690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
-   
- 	cf_cv_ncurses_version=`cat $cf_tempfile`
-@@ -2704,19 +2707,19 @@
- EOF
- 
- 
--	
-+
- 
- echo $ac_n "checking if we have identified curses libraries""... $ac_c" 1>&6
--echo "configure:2711: checking if we have identified curses libraries" >&5
-+echo "configure:2714: checking if we have identified curses libraries" >&5
- cat > conftest.$ac_ext <<EOF
--#line 2713 "configure"
-+#line 2716 "configure"
- #include "confdefs.h"
- #include <${cf_cv_ncurses_header-curses.h}>
- int main() {
- initscr(); tgoto("?", 0,0)
- ; return 0; }
- EOF
--if { (eval echo configure:2720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:2723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   cf_result=yes
- else
-@@ -2732,7 +2735,7 @@
- case $host_os in #(vi
- freebsd*) #(vi
-     echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
--echo "configure:2736: checking for tgoto in -lmytinfo" >&5
-+echo "configure:2739: checking for tgoto in -lmytinfo" >&5
- ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
-@@ -2740,7 +2743,7 @@
-   ac_save_LIBS="$LIBS"
- LIBS="-lmytinfo  $LIBS"
- cat > conftest.$ac_ext <<EOF
--#line 2744 "configure"
-+#line 2747 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error.  */
- /* We use char because int might match the return type of a gcc2
-@@ -2751,7 +2754,7 @@
- tgoto()
- ; return 0; }
- EOF
--if { (eval echo configure:2755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:2758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   eval "ac_cv_lib_$ac_lib_var=yes"
- else
-@@ -2774,7 +2777,7 @@
-     ;;
- hpux10.*) #(vi
-     echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6
--echo "configure:2778: checking for initscr in -lcur_colr" >&5
-+echo "configure:2781: checking for initscr in -lcur_colr" >&5
- ac_lib_var=`echo cur_colr'_'initscr | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
-@@ -2782,7 +2785,7 @@
-   ac_save_LIBS="$LIBS"
- LIBS="-lcur_colr  $LIBS"
- cat > conftest.$ac_ext <<EOF
--#line 2786 "configure"
-+#line 2789 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error.  */
- /* We use char because int might match the return type of a gcc2
-@@ -2793,7 +2796,7 @@
- initscr()
- ; return 0; }
- EOF
--if { (eval echo configure:2797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:2800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   eval "ac_cv_lib_$ac_lib_var=yes"
- else
-@@ -2816,7 +2819,7 @@
-   echo "$ac_t""no" 1>&6
- 
-     echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6
--echo "configure:2820: checking for initscr in -lHcurses" >&5
-+echo "configure:2823: checking for initscr in -lHcurses" >&5
- ac_lib_var=`echo Hcurses'_'initscr | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
-@@ -2824,7 +2827,7 @@
-   ac_save_LIBS="$LIBS"
- LIBS="-lHcurses  $LIBS"
- cat > conftest.$ac_ext <<EOF
--#line 2828 "configure"
-+#line 2831 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error.  */
- /* We use char because int might match the return type of a gcc2
-@@ -2835,7 +2838,7 @@
- initscr()
- ; return 0; }
- EOF
--if { (eval echo configure:2839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:2842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   eval "ac_cv_lib_$ac_lib_var=yes"
- else
-@@ -2853,7 +2856,7 @@
-   
-         # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
-         LIBS="-lHcurses $LIBS"
--        CPPFLAGS="-D__HP_CURSES -D_HP_CURSES $CPPFLAGS"
-+        CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
-         ac_cv_func_initscr=yes
-         
- else
-@@ -2884,7 +2887,7 @@
-       if test "$cf_have_libdir" = no ; then
-         test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
- 
--echo "${as_me-configure}:2888: testing adding $cf_add_libdir to library-path ..." 1>&5
-+echo "${as_me-configure}:2891: testing adding $cf_add_libdir to library-path ..." 1>&5
- 
- 
-         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
-@@ -2916,7 +2919,7 @@
-       if test "$cf_have_libdir" = no ; then
-         test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
- 
--echo "${as_me-configure}:2920: testing adding $cf_add_libdir to library-path ..." 1>&5
-+echo "${as_me-configure}:2923: testing adding $cf_add_libdir to library-path ..." 1>&5
- 
- 
-         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
-@@ -2946,12 +2949,12 @@
-     # Check for library containing tgoto.  Do this before curses library
-     # because it may be needed to link the test-case for initscr.
-     echo $ac_n "checking for tgoto""... $ac_c" 1>&6
--echo "configure:2950: checking for tgoto" >&5
-+echo "configure:2953: checking for tgoto" >&5
- if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   cat > conftest.$ac_ext <<EOF
--#line 2955 "configure"
-+#line 2958 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
-     which can conflict with char tgoto(); below.  */
-@@ -2974,7 +2977,7 @@
- 
- ; return 0; }
- EOF
--if { (eval echo configure:2978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:2981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   eval "ac_cv_func_tgoto=yes"
- else
-@@ -2995,7 +2998,7 @@
-         for cf_term_lib in $cf_check_list termcap termlib unknown
-         do
-             echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6
--echo "configure:2999: checking for tgoto in -l$cf_term_lib" >&5
-+echo "configure:3002: checking for tgoto in -l$cf_term_lib" >&5
- ac_lib_var=`echo $cf_term_lib'_'tgoto | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
-@@ -3003,7 +3006,7 @@
-   ac_save_LIBS="$LIBS"
- LIBS="-l$cf_term_lib  $LIBS"
- cat > conftest.$ac_ext <<EOF
--#line 3007 "configure"
-+#line 3010 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error.  */
- /* We use char because int might match the return type of a gcc2
-@@ -3014,7 +3017,7 @@
- tgoto()
- ; return 0; }
- EOF
--if { (eval echo configure:3018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:3021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   eval "ac_cv_lib_$ac_lib_var=yes"
- else
-@@ -3041,10 +3044,10 @@
- 
-     # Check for library containing initscr
-     test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
--    for cf_curs_lib in $cf_check_list xcurses jcurses unknown
-+ 	for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
-     do
-         echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6
--echo "configure:3048: checking for initscr in -l$cf_curs_lib" >&5
-+echo "configure:3051: checking for initscr in -l$cf_curs_lib" >&5
- ac_lib_var=`echo $cf_curs_lib'_'initscr | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
-@@ -3052,7 +3055,7 @@
-   ac_save_LIBS="$LIBS"
- LIBS="-l$cf_curs_lib  $LIBS"
- cat > conftest.$ac_ext <<EOF
--#line 3056 "configure"
-+#line 3059 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error.  */
- /* We use char because int might match the return type of a gcc2
-@@ -3063,7 +3066,7 @@
- initscr()
- ; return 0; }
- EOF
--if { (eval echo configure:3067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:3070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   eval "ac_cv_lib_$ac_lib_var=yes"
- else
-@@ -3089,16 +3092,16 @@
-     LIBS="-l$cf_curs_lib $cf_save_LIBS"
-     if test "$cf_term_lib" = unknown ; then
-         echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6
--echo "configure:3093: checking if we can link with $cf_curs_lib library" >&5
-+echo "configure:3096: checking if we can link with $cf_curs_lib library" >&5
-         cat > conftest.$ac_ext <<EOF
--#line 3095 "configure"
-+#line 3098 "configure"
- #include "confdefs.h"
- #include <${cf_cv_ncurses_header-curses.h}>
- int main() {
- initscr()
- ; return 0; }
- EOF
--if { (eval echo configure:3102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:3105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   cf_result=yes
- else
-@@ -3114,16 +3117,16 @@
-         :
-     elif test "$cf_term_lib" != predefined ; then
-         echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6
--echo "configure:3118: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
-+echo "configure:3121: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
-         cat > conftest.$ac_ext <<EOF
--#line 3120 "configure"
-+#line 3123 "configure"
- #include "confdefs.h"
- #include <${cf_cv_ncurses_header-curses.h}>
- int main() {
- initscr(); tgoto((char *)0, 0, 0);
- ; return 0; }
- EOF
--if { (eval echo configure:3127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:3130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   cf_result=no
- else
-@@ -3133,14 +3136,14 @@
-   
-             LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
-             cat > conftest.$ac_ext <<EOF
--#line 3137 "configure"
-+#line 3140 "configure"
- #include "confdefs.h"
- #include <${cf_cv_ncurses_header-curses.h}>
- int main() {
- initscr()
- ; return 0; }
- EOF
--if { (eval echo configure:3144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:3147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   cf_result=yes
- else
-@@ -3159,9 +3162,80 @@
- fi
- 
- 
-+
- 	;;
- ncurses)
- 	
-+cf_ncuconfig_root=ncurses
-+
-+echo "Looking for ${cf_ncuconfig_root}-config"
-+for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
-+do
-+# Extract the first word of "$ac_prog", so it can be a program name with args.
-+set dummy $ac_prog; ac_word=$2
-+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-+echo "configure:3178: checking for $ac_word" >&5
-+if eval "test \"`echo '$''{'ac_cv_path_NCURSES_CONFIG'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
-+else
-+  case "$NCURSES_CONFIG" in
-+  /*)
-+  ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
-+  ;;
-+  ?:/*)			 
-+  ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a dos path.
-+  ;;
-+  *)
-+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-+  ac_dummy="$PATH"
-+  for ac_dir in $ac_dummy; do 
-+    test -z "$ac_dir" && ac_dir=.
-+    if test -f $ac_dir/$ac_word; then
-+      ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
-+      break
-+    fi
-+  done
-+  IFS="$ac_save_ifs"
-+  ;;
-+esac
-+fi
-+NCURSES_CONFIG="$ac_cv_path_NCURSES_CONFIG"
-+if test -n "$NCURSES_CONFIG"; then
-+  echo "$ac_t""$NCURSES_CONFIG" 1>&6
-+else
-+  echo "$ac_t""no" 1>&6
-+fi
-+
-+test -n "$NCURSES_CONFIG" && break
-+done
-+test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
-+
-+
-+if test "$NCURSES_CONFIG" != none ; then
-+
-+cf_cv_ncurses_header=curses.h
-+
-+CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
-+LIBS="`$NCURSES_CONFIG --libs` $LIBS"
-+
-+cat >> confdefs.h <<\EOF
-+#define NCURSES 1
-+EOF
-+
-+
-+
-+cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
-+
-+cat >> confdefs.h <<EOF
-+#define $cf_nculib_ROOT 1
-+EOF
-+
-+
-+cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
-+
-+else
-+
-+
- 
- cf_ncuhdr_root=ncurses
- 
-@@ -3186,20 +3260,20 @@
- 		fi
- 
- 		if test "$cf_have_incdir" = no ; then
--          if test "$cf_add_incdir" = /usr/local/include ; then
-+		  if test "$cf_add_incdir" = /usr/local/include ; then
- 			if test "$GCC" = yes
- 			then
- 			  cf_save_CPPFLAGS=$CPPFLAGS
- 			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
- 			  cat > conftest.$ac_ext <<EOF
--#line 3196 "configure"
-+#line 3270 "configure"
- #include "confdefs.h"
- #include <stdio.h>
- int main() {
- printf("Hello")
- ; return 0; }
- EOF
--if { (eval echo configure:3203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:3277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   :
- else
-   echo "configure: failed program was:" >&5
-@@ -3216,14 +3290,14 @@
- 		if test "$cf_have_incdir" = no ; then
- 		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
- 
--echo "${as_me-configure}:3220: testing adding $cf_add_incdir to include-path ..." 1>&5
-+echo "${as_me-configure}:3294: testing adding $cf_add_incdir to include-path ..." 1>&5
- 
- 
--		  CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
-+		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
- 
--          cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
--          test "$cf_top_incdir" = "$cf_add_incdir" && break
--          cf_add_incdir="$cf_top_incdir"
-+		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
-+		  test "$cf_top_incdir" = "$cf_add_incdir" && break
-+		  cf_add_incdir="$cf_top_incdir"
- 		else
- 		  break
- 		fi
-@@ -3235,7 +3309,7 @@
- }
- 
- echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
--echo "configure:3239: checking for $cf_ncuhdr_root header in include-path" >&5
-+echo "configure:3313: checking for $cf_ncuhdr_root header in include-path" >&5
- if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -3246,7 +3320,7 @@
- 	do
- 		
- 	cat > conftest.$ac_ext <<EOF
--#line 3250 "configure"
-+#line 3324 "configure"
- #include "confdefs.h"
- 
- 
-@@ -3267,7 +3341,7 @@
- 	
- ; return 0; }
- EOF
--if { (eval echo configure:3271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:3345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
-   cf_cv_ncurses_h=$cf_header
- 	
-@@ -3293,13 +3367,39 @@
- else
- 
- echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
--echo "configure:3297: checking for $cf_ncuhdr_root include-path" >&5
-+echo "configure:3371: checking for $cf_ncuhdr_root include-path" >&5
- if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   
- 	test -n "$verbose" && echo
--	cf_search=""
-+	
-+cf_header_path_list=""
-+if test -n "${CFLAGS}${CPPFLAGS}" ; then
-+	for cf_header_path in $CPPFLAGS $CFLAGS
-+	do
-+		case $cf_header_path in #(vi
-+		-I*)
-+			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
-+			
-+test "$cf_header_path" != "NONE" && \
-+test -d "$cf_header_path" && \
-+ {
-+	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
-+	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
-+	test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
-+	test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
-+	test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
-+	test -d $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
-+}
-+
-+			cf_header_path_list="$cf_header_path_list $cf_search"
-+			;;
-+		esac
-+	done
-+fi
-+
-+cf_search=""
- 
- 
- test "/usr" != "$prefix" && \
-@@ -3362,6 +3462,7 @@
- }
- 
- 
-+
- test "$includedir" != NONE && \
- test "$includedir" != "/usr/include" && \
- test -d "$includedir" && {
-@@ -3376,6 +3477,7 @@
- 	test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
- }
- 
-+cf_search="$cf_header_path_list $cf_search"
- 
- 	test -n "$verbose" && echo search path $cf_search
- 	cf_save2_CPPFLAGS="$CPPFLAGS"
-@@ -3400,20 +3502,20 @@
- 		fi
- 
- 		if test "$cf_have_incdir" = no ; then
--          if test "$cf_add_incdir" = /usr/local/include ; then
-+		  if test "$cf_add_incdir" = /usr/local/include ; then
- 			if test "$GCC" = yes
- 			then
- 			  cf_save_CPPFLAGS=$CPPFLAGS
- 			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
- 			  cat > conftest.$ac_ext <<EOF
--#line 3410 "configure"
-+#line 3512 "configure"
- #include "confdefs.h"
- #include <stdio.h>
- int main() {
- printf("Hello")
- ; return 0; }
- EOF
--if { (eval echo configure:3417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:3519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   :
- else
-   echo "configure: failed program was:" >&5
-@@ -3430,14 +3532,14 @@
- 		if test "$cf_have_incdir" = no ; then
- 		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
- 
--echo "${as_me-configure}:3434: testing adding $cf_add_incdir to include-path ..." 1>&5
-+echo "${as_me-configure}:3536: testing adding $cf_add_incdir to include-path ..." 1>&5
- 
- 
--		  CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
-+		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
- 
--          cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
--          test "$cf_top_incdir" = "$cf_add_incdir" && break
--          cf_add_incdir="$cf_top_incdir"
-+		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
-+		  test "$cf_top_incdir" = "$cf_add_incdir" && break
-+		  cf_add_incdir="$cf_top_incdir"
- 		else
- 		  break
- 		fi
-@@ -3452,7 +3554,7 @@
- 		do
- 			
- 	cat > conftest.$ac_ext <<EOF
--#line 3456 "configure"
-+#line 3558 "configure"
- #include "confdefs.h"
- 
- 
-@@ -3473,7 +3575,7 @@
- 	
- ; return 0; }
- EOF
--if { (eval echo configure:3477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:3579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
-   cf_cv_ncurses_h2=$cf_header
- 	
-@@ -3525,20 +3627,20 @@
- 		fi
- 
- 		if test "$cf_have_incdir" = no ; then
--          if test "$cf_add_incdir" = /usr/local/include ; then
-+		  if test "$cf_add_incdir" = /usr/local/include ; then
- 			if test "$GCC" = yes
- 			then
- 			  cf_save_CPPFLAGS=$CPPFLAGS
- 			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
- 			  cat > conftest.$ac_ext <<EOF
--#line 3535 "configure"
-+#line 3637 "configure"
- #include "confdefs.h"
- #include <stdio.h>
- int main() {
- printf("Hello")
- ; return 0; }
- EOF
--if { (eval echo configure:3542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:3644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   :
- else
-   echo "configure: failed program was:" >&5
-@@ -3555,14 +3657,14 @@
- 		if test "$cf_have_incdir" = no ; then
- 		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
- 
--echo "${as_me-configure}:3559: testing adding $cf_add_incdir to include-path ..." 1>&5
-+echo "${as_me-configure}:3661: testing adding $cf_add_incdir to include-path ..." 1>&5
- 
- 
--		  CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
-+		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
- 
--          cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
--          test "$cf_top_incdir" = "$cf_add_incdir" && break
--          cf_add_incdir="$cf_top_incdir"
-+		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
-+		  test "$cf_top_incdir" = "$cf_add_incdir" && break
-+		  cf_add_incdir="$cf_top_incdir"
- 		else
- 		  break
- 		fi
-@@ -3603,7 +3705,7 @@
- 
- 
- echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
--echo "configure:3607: checking for terminfo header" >&5
-+echo "configure:3709: checking for terminfo header" >&5
- if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -3620,7 +3722,7 @@
- for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
- do
- cat > conftest.$ac_ext <<EOF
--#line 3624 "configure"
-+#line 3726 "configure"
- #include "confdefs.h"
- #include <stdio.h>
- #include <${cf_cv_ncurses_header-curses.h}>
-@@ -3630,7 +3732,7 @@
- int x = auto_left_margin
- ; return 0; }
- EOF
--if { (eval echo configure:3634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:3736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
-   
- 	cf_cv_term_header="$cf_test"
-@@ -3685,7 +3787,7 @@
- 
- 
- echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
--echo "configure:3689: checking for ncurses version" >&5
-+echo "configure:3791: checking for ncurses version" >&5
- if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -3711,7 +3813,7 @@
- #endif
- EOF
- 	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
--	{ (eval echo configure:3715: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
-+	{ (eval echo configure:3817: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
- 	if test -f conftest.out ; then
- 		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
- 		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
-@@ -3720,7 +3822,7 @@
- 
- else
-   cat > conftest.$ac_ext <<EOF
--#line 3724 "configure"
-+#line 3826 "configure"
- #include "confdefs.h"
- 
- #include <${cf_cv_ncurses_header-curses.h}>
-@@ -3744,7 +3846,7 @@
- 	${cf_cv_main_return-return}(0);
- }
- EOF
--if { (eval echo configure:3748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-+if { (eval echo configure:3850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
-   
- 	cf_cv_ncurses_version=`cat $cf_tempfile`
-@@ -3766,7 +3868,7 @@
- 
- 
- 
--	
-+
- 
- cf_nculib_root=ncurses
- 	# This works, except for the special case where we find gpm, but
-@@ -3775,7 +3877,7 @@
- cf_ncurses_LIBS=""
- cf_ncurses_SAVE="$LIBS"
- echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
--echo "configure:3779: checking for Gpm_Open in -lgpm" >&5
-+echo "configure:3881: checking for Gpm_Open in -lgpm" >&5
- ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
-@@ -3783,7 +3885,7 @@
-   ac_save_LIBS="$LIBS"
- LIBS="-lgpm  $LIBS"
- cat > conftest.$ac_ext <<EOF
--#line 3787 "configure"
-+#line 3889 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error.  */
- /* We use char because int might match the return type of a gcc2
-@@ -3794,7 +3896,7 @@
- Gpm_Open()
- ; return 0; }
- EOF
--if { (eval echo configure:3798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:3900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   eval "ac_cv_lib_$ac_lib_var=yes"
- else
-@@ -3810,7 +3912,7 @@
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-   echo "$ac_t""yes" 1>&6
-   echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
--echo "configure:3814: checking for initscr in -lgpm" >&5
-+echo "configure:3916: checking for initscr in -lgpm" >&5
- ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
-@@ -3818,7 +3920,7 @@
-   ac_save_LIBS="$LIBS"
- LIBS="-lgpm  $LIBS"
- cat > conftest.$ac_ext <<EOF
--#line 3822 "configure"
-+#line 3924 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error.  */
- /* We use char because int might match the return type of a gcc2
-@@ -3829,7 +3931,7 @@
- initscr()
- ; return 0; }
- EOF
--if { (eval echo configure:3833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:3935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   eval "ac_cv_lib_$ac_lib_var=yes"
- else
-@@ -3861,7 +3963,7 @@
- 	# version of ncurses (but it should do no harm, since it's static).
- 	if test "$cf_nculib_root" = ncurses ; then
- 		echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
--echo "configure:3865: checking for tgoto in -lmytinfo" >&5
-+echo "configure:3967: checking for tgoto in -lmytinfo" >&5
- ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
-@@ -3869,7 +3971,7 @@
-   ac_save_LIBS="$LIBS"
- LIBS="-lmytinfo  $LIBS"
- cat > conftest.$ac_ext <<EOF
--#line 3873 "configure"
-+#line 3975 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error.  */
- /* We use char because int might match the return type of a gcc2
-@@ -3880,7 +3982,7 @@
- tgoto()
- ; return 0; }
- EOF
--if { (eval echo configure:3884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:3986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   eval "ac_cv_lib_$ac_lib_var=yes"
- else
-@@ -3928,7 +4030,7 @@
-       if test "$cf_have_libdir" = no ; then
-         test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
- 
--echo "${as_me-configure}:3932: testing adding $cf_add_libdir to library-path ..." 1>&5
-+echo "${as_me-configure}:4034: testing adding $cf_add_libdir to library-path ..." 1>&5
- 
- 
-         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
-@@ -3943,12 +4045,12 @@
- 	eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
- 	cf_libdir=""
- 	echo $ac_n "checking for initscr""... $ac_c" 1>&6
--echo "configure:3947: checking for initscr" >&5
-+echo "configure:4049: checking for initscr" >&5
- if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   cat > conftest.$ac_ext <<EOF
--#line 3952 "configure"
-+#line 4054 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
-     which can conflict with char initscr(); below.  */
-@@ -3971,7 +4073,7 @@
- 
- ; return 0; }
- EOF
--if { (eval echo configure:3975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:4077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   eval "ac_cv_func_initscr=yes"
- else
-@@ -3991,17 +4093,17 @@
- 
- 		cf_save_LIBS="$LIBS"
- 		echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
--echo "configure:3995: checking for initscr in -l$cf_nculib_root" >&5
-+echo "configure:4097: checking for initscr in -l$cf_nculib_root" >&5
- 		LIBS="-l$cf_nculib_root $LIBS"
- 		cat > conftest.$ac_ext <<EOF
--#line 3998 "configure"
-+#line 4100 "configure"
- #include "confdefs.h"
- #include <${cf_cv_ncurses_header-curses.h}>
- int main() {
- initscr()
- ; return 0; }
- EOF
--if { (eval echo configure:4005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:4107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   echo "$ac_t""yes" 1>&6
- 			 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
-@@ -4011,7 +4113,33 @@
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
-   echo "$ac_t""no" 1>&6
--			cf_search=""
-+			
-+cf_library_path_list=""
-+if test -n "${LDFLAGS}${LIBS}" ; then
-+	for cf_library_path in $LDFLAGS $LIBS
-+	do
-+		case $cf_library_path in #(vi
-+		-L*)
-+			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
-+			
-+test "$cf_library_path" != "NONE" && \
-+test -d "$cf_library_path" && \
-+ {
-+	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
-+	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
-+	test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
-+	test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
-+	test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
-+	test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
-+}
-+
-+			cf_library_path_list="$cf_library_path_list $cf_search"
-+			;;
-+		esac
-+	done
-+fi
-+
-+cf_search=""
- 
- 
- test "/usr" != "$prefix" && \
-@@ -4074,20 +4202,23 @@
- }
- 
- 
-+
-+cf_search="$cf_library_path_list $cf_search"
-+
- 			for cf_libdir in $cf_search
- 			do
- 				echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
--echo "configure:4081: checking for -l$cf_nculib_root in $cf_libdir" >&5
-+echo "configure:4212: checking for -l$cf_nculib_root in $cf_libdir" >&5
- 				LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
- 				cat > conftest.$ac_ext <<EOF
--#line 4084 "configure"
-+#line 4215 "configure"
- #include "confdefs.h"
- #include <${cf_cv_ncurses_header-curses.h}>
- int main() {
- initscr()
- ; return 0; }
- EOF
--if { (eval echo configure:4091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:4222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   echo "$ac_t""yes" 1>&6
- 			 		 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
-@@ -4118,7 +4249,7 @@
- 
- if test -n "$cf_ncurses_LIBS" ; then
- 	echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
--echo "configure:4122: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
-+echo "configure:4253: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
- 	cf_ncurses_SAVE="$LIBS"
- 	for p in $cf_ncurses_LIBS ; do
- 		q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
-@@ -4127,14 +4258,14 @@
- 		fi
- 	done
- 	cat > conftest.$ac_ext <<EOF
--#line 4131 "configure"
-+#line 4262 "configure"
- #include "confdefs.h"
- #include <${cf_cv_ncurses_header-curses.h}>
- int main() {
- initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
- ; return 0; }
- EOF
--if { (eval echo configure:4138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:4269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   echo "$ac_t""yes" 1>&6
- else
-@@ -4155,19 +4286,22 @@
- EOF
- 
- 
-+
-+fi
-+
- 	;;
- ncursesw)
- 	cf_cv_libtype=w
- 	
- echo $ac_n "checking for multibyte character support""... $ac_c" 1>&6
--echo "configure:4164: checking for multibyte character support" >&5
-+echo "configure:4298: checking for multibyte character support" >&5
- if eval "test \"`echo '$''{'cf_cv_utf8_lib'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   
- 	cf_save_LIBS="$LIBS"
- 	cat > conftest.$ac_ext <<EOF
--#line 4171 "configure"
-+#line 4305 "configure"
- #include "confdefs.h"
- 
- #include <stdlib.h>
-@@ -4175,198 +4309,82 @@
- putwc(0,0);
- ; return 0; }
- EOF
--if { (eval echo configure:4179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:4313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   cf_cv_utf8_lib=yes
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  LIBS="-lutf8 $LIBS"
--	 cat > conftest.$ac_ext <<EOF
--#line 4188 "configure"
--#include "confdefs.h"
--
--#include <libutf8.h>
--int main() {
--putwc(0,0);
--; return 0; }
--EOF
--if { (eval echo configure:4196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
--  rm -rf conftest*
--  cf_cv_utf8_lib=add-on
--else
--  echo "configure: failed program was:" >&5
--  cat conftest.$ac_ext >&5
--  rm -rf conftest*
--  cf_cv_utf8_lib=no
--fi
--rm -f conftest*
--	LIBS="$cf_save_LIBS"
--
--fi
--rm -f conftest*
--fi
--
--echo "$ac_t""$cf_cv_utf8_lib" 1>&6
--
--# HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
--# ncurses/ncursesw:
--if test "$cf_cv_utf8_lib" = "add-on" ; then
--	cat >> confdefs.h <<\EOF
--#define HAVE_LIBUTF8_H 1
--EOF
-+  
- 
--	LIBS="-lutf8 $LIBS"
--fi
-+# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
-+# will be set on completion of the AC_TRY_LINK below.
-+cf_cv_header_path_utf8=
-+cf_cv_library_path_utf8=
- 
--	
- 
--cf_ncuhdr_root=ncursesw
-+echo "${as_me-configure}:4328: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
- 
--test -n "$cf_cv_curses_dir" && \
--test "$cf_cv_curses_dir" != "no" && { \
--  
--if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
--  for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
--  do
--	while test $cf_add_incdir != /usr/include
--	do
--	  if test -d $cf_add_incdir
--	  then
--		cf_have_incdir=no
--		if test -n "$CFLAGS$CPPFLAGS" ; then
--		  # a loop is needed to ensure we can add subdirs of existing dirs
--		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
--			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
--			  cf_have_incdir=yes; break
--			fi
--		  done
--		fi
- 
--		if test "$cf_have_incdir" = no ; then
--          if test "$cf_add_incdir" = /usr/local/include ; then
--			if test "$GCC" = yes
--			then
--			  cf_save_CPPFLAGS=$CPPFLAGS
--			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
--			  cat > conftest.$ac_ext <<EOF
--#line 4255 "configure"
-+cat > conftest.$ac_ext <<EOF
-+#line 4332 "configure"
- #include "confdefs.h"
--#include <stdio.h>
-+
-+#include <libutf8.h>
- int main() {
--printf("Hello")
-+putwc(0,0);
- ; return 0; }
- EOF
--if { (eval echo configure:4262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
--  :
-+if { (eval echo configure:4340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+  rm -rf conftest*
-+  cf_cv_find_linkage_utf8=yes
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  cf_have_incdir=yes
--fi
--rm -f conftest*
--			  CPPFLAGS=$cf_save_CPPFLAGS
--			fi
--		  fi
--		fi
-+  
-+    cf_cv_find_linkage_utf8=no
- 
--		if test "$cf_have_incdir" = no ; then
--		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
-+    test -n "$verbose" && echo "	find linkage for utf8 library" 1>&6
- 
--echo "${as_me-configure}:4279: testing adding $cf_add_incdir to include-path ..." 1>&5
-+echo "${as_me-configure}:4352: testing find linkage for utf8 library ..." 1>&5
- 
- 
--		  CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
-+    
-+echo "${as_me-configure}:4356: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
- 
--          cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
--          test "$cf_top_incdir" = "$cf_add_incdir" && break
--          cf_add_incdir="$cf_top_incdir"
--		else
--		  break
--		fi
--	  fi
--	done
--  done
--fi
- 
--}
-+    cf_save_CPPFLAGS="$CPPFLAGS"
-+    cf_test_CPPFLAGS="$CPPFLAGS"
- 
--echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
--echo "configure:4298: checking for $cf_ncuhdr_root header in include-path" >&5
--if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
--  echo $ac_n "(cached) $ac_c" 1>&6
--else
--  
--	cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
--	( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
--	for cf_header in $cf_header_list
-+    
-+cf_header_path_list=""
-+if test -n "${CFLAGS}${CPPFLAGS}" ; then
-+	for cf_header_path in $CPPFLAGS $CFLAGS
- 	do
--		
--	cat > conftest.$ac_ext <<EOF
--#line 4309 "configure"
--#include "confdefs.h"
--
--
--#define _XOPEN_SOURCE_EXTENDED
--#undef  HAVE_LIBUTF8_H	/* in case we used CF_UTF8_LIB */
--#define HAVE_LIBUTF8_H	/* to force ncurses' header file to use cchar_t */
--
--#include <$cf_header>
--int main() {
--
--#ifdef NCURSES_VERSION
--
--#ifndef WACS_BSSB
--	make an error
--#endif
--
--printf("%s\n", NCURSES_VERSION);
--#else
--#ifdef __NCURSES_H
--printf("old\n");
--#else
--	make an error
--#endif
--#endif
--	
--	
--; return 0; }
--EOF
--if { (eval echo configure:4338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
--  rm -rf conftest*
--  cf_cv_ncurses_h=$cf_header
--	
--else
--  echo "configure: failed program was:" >&5
--  cat conftest.$ac_ext >&5
--  rm -rf conftest*
--  cf_cv_ncurses_h=no
--fi
--rm -f conftest*
-+		case $cf_header_path in #(vi
-+		-I*)
-+			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
-+			
-+test "$cf_header_path" != "NONE" && \
-+test -d "$cf_header_path" && \
-+ {
-+	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
-+	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
-+	test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
-+	test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
-+	test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
-+	test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
-+}
- 
--		test "$cf_cv_ncurses_h" != no && break
-+			cf_header_path_list="$cf_header_path_list $cf_search"
-+			;;
-+		esac
- 	done
--
- fi
- 
--echo "$ac_t""$cf_cv_ncurses_h" 1>&6
--
--
--
--if test "$cf_cv_ncurses_h" != no ; then
--	cf_cv_ncurses_header=$cf_cv_ncurses_h
--else
--
--echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
--echo "configure:4364: checking for $cf_ncuhdr_root include-path" >&5
--if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
--  echo $ac_n "(cached) $ac_c" 1>&6
--else
--  
--	test -n "$verbose" && echo
--	cf_search=""
-+cf_search=""
- 
- 
- test "/usr" != "$prefix" && \
-@@ -4374,10 +4392,10 @@
- (test $prefix = NONE || test -d $prefix) && {
- 	test -n "$verbose" && echo "	... testing for include-directories under /usr"
- 	test -d /usr/include &&          cf_search="$cf_search /usr/include"
--	test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
--	test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
--	test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
--	test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
-+	test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
-+	test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
-+	test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
-+	test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
- }
- 
- 
-@@ -4386,10 +4404,10 @@
-  {
- 	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
- 	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
--	test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
--	test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
--	test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
--	test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
-+	test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
-+	test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
-+	test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
-+	test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
- }
- 
- 
-@@ -4398,10 +4416,10 @@
- (test $prefix = NONE || test -d $prefix) && {
- 	test -n "$verbose" && echo "	... testing for include-directories under /usr/local"
- 	test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
--	test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
--	test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
--	test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
--	test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
-+	test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
-+	test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
-+	test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
-+	test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
- }
- 
- 
-@@ -4410,10 +4428,10 @@
- (test $prefix = NONE || test -d $prefix) && {
- 	test -n "$verbose" && echo "	... testing for include-directories under /opt"
- 	test -d /opt/include &&          cf_search="$cf_search /opt/include"
--	test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
--	test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
--	test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
--	test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
-+	test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
-+	test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
-+	test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
-+	test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
- }
- 
- 
-@@ -4422,160 +4440,254 @@
- (test $prefix = NONE || test -d $prefix) && {
- 	test -n "$verbose" && echo "	... testing for include-directories under $HOME"
- 	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
--	test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
--	test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
--	test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
--	test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
-+	test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
-+	test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
-+	test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
-+	test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
- }
- 
- 
-+
- test "$includedir" != NONE && \
- test "$includedir" != "/usr/include" && \
- test -d "$includedir" && {
- 	test -d $includedir &&    cf_search="$cf_search $includedir"
--	test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
-+	test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
- }
- 
- test "$oldincludedir" != NONE && \
- test "$oldincludedir" != "/usr/include" && \
- test -d "$oldincludedir" && {
- 	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
--	test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
-+	test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
- }
- 
-+cf_search="$cf_header_path_list $cf_search"
- 
--	test -n "$verbose" && echo search path $cf_search
--	cf_save2_CPPFLAGS="$CPPFLAGS"
--	for cf_incdir in $cf_search
--	do
--		
--if test -n "$cf_incdir" ; then
--  for cf_add_incdir in $cf_incdir
--  do
--	while test $cf_add_incdir != /usr/include
--	do
--	  if test -d $cf_add_incdir
--	  then
--		cf_have_incdir=no
--		if test -n "$CFLAGS$CPPFLAGS" ; then
--		  # a loop is needed to ensure we can add subdirs of existing dirs
--		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
--			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
--			  cf_have_incdir=yes; break
--			fi
--		  done
--		fi
-+    for cf_cv_header_path_utf8 in $cf_search
-+    do
-+      if test -d $cf_cv_header_path_utf8 ; then
-+        test -n "$verbose" && echo "	... testing $cf_cv_header_path_utf8" 1>&6
- 
--		if test "$cf_have_incdir" = no ; then
--          if test "$cf_add_incdir" = /usr/local/include ; then
--			if test "$GCC" = yes
--			then
--			  cf_save_CPPFLAGS=$CPPFLAGS
--			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
--			  cat > conftest.$ac_ext <<EOF
--#line 4477 "configure"
-+echo "${as_me-configure}:4473: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
-+
-+
-+        CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
-+        cat > conftest.$ac_ext <<EOF
-+#line 4478 "configure"
- #include "confdefs.h"
--#include <stdio.h>
-+
-+#include <libutf8.h>
- int main() {
--printf("Hello")
-+putwc(0,0);
- ; return 0; }
- EOF
--if { (eval echo configure:4484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
--  :
-+if { (eval echo configure:4486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+  rm -rf conftest*
-+  
-+            test -n "$verbose" && echo "	... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
-+
-+echo "${as_me-configure}:4491: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
-+
-+
-+            cf_cv_find_linkage_utf8=maybe
-+            cf_test_CPPFLAGS="$CPPFLAGS"
-+            break
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  cf_have_incdir=yes
-+  
-+            CPPFLAGS="$cf_save_CPPFLAGS"
-+            
- fi
- rm -f conftest*
--			  CPPFLAGS=$cf_save_CPPFLAGS
--			fi
--		  fi
--		fi
-+      fi
-+    done
- 
--		if test "$cf_have_incdir" = no ; then
--		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
-+    if test "$cf_cv_find_linkage_utf8" = maybe ; then
- 
--echo "${as_me-configure}:4501: testing adding $cf_add_incdir to include-path ..." 1>&5
-+      
-+echo "${as_me-configure}:4512: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
- 
- 
--		  CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
-+      cf_save_LIBS="$LIBS"
-+      cf_save_LDFLAGS="$LDFLAGS"
- 
--          cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
--          test "$cf_top_incdir" = "$cf_add_incdir" && break
--          cf_add_incdir="$cf_top_incdir"
--		else
--		  break
--		fi
--	  fi
-+      
-+
-+      if test "$cf_cv_find_linkage_utf8" != yes ; then
-+        
-+cf_library_path_list=""
-+if test -n "${LDFLAGS}${LIBS}" ; then
-+	for cf_library_path in $LDFLAGS $LIBS
-+	do
-+		case $cf_library_path in #(vi
-+		-L*)
-+			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
-+			
-+test "$cf_library_path" != "NONE" && \
-+test -d "$cf_library_path" && \
-+ {
-+	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
-+	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
-+	test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
-+	test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
-+	test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
-+	test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
-+}
-+
-+			cf_library_path_list="$cf_library_path_list $cf_search"
-+			;;
-+		esac
- 	done
--  done
- fi
- 
--		for cf_header in \
--			ncurses.h \
--			curses.h
--		do
--			
--	cat > conftest.$ac_ext <<EOF
--#line 4523 "configure"
--#include "confdefs.h"
-+cf_search=""
- 
- 
--#include <$cf_header>
--int main() {
-+test "/usr" != "$prefix" && \
-+test -d "/usr" && \
-+(test $prefix = NONE || test -d $prefix) && {
-+	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
-+	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
-+	test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
-+	test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
-+	test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
-+	test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
-+}
- 
--#ifdef NCURSES_VERSION
- 
--printf("%s\n", NCURSES_VERSION);
--#else
--#ifdef __NCURSES_H
--printf("old\n");
--#else
--	make an error
--#endif
--#endif
--	
--	
-+test "$prefix" != "NONE" && \
-+test -d "$prefix" && \
-+ {
-+	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
-+	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
-+	test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
-+	test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
-+	test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
-+	test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
-+}
-+
-+
-+test "/usr/local" != "$prefix" && \
-+test -d "/usr/local" && \
-+(test $prefix = NONE || test -d $prefix) && {
-+	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
-+	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
-+	test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
-+	test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
-+	test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
-+	test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
-+}
-+
-+
-+test "/opt" != "$prefix" && \
-+test -d "/opt" && \
-+(test $prefix = NONE || test -d $prefix) && {
-+	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
-+	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
-+	test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
-+	test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
-+	test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
-+	test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
-+}
-+
-+
-+test "$HOME" != "$prefix" && \
-+test -d "$HOME" && \
-+(test $prefix = NONE || test -d $prefix) && {
-+	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
-+	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
-+	test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
-+	test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
-+	test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
-+	test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
-+}
-+
-+
-+
-+cf_search="$cf_library_path_list $cf_search"
-+
-+        for cf_cv_library_path_utf8 in $cf_search
-+        do
-+          if test -d $cf_cv_library_path_utf8 ; then
-+            test -n "$verbose" && echo "	... testing $cf_cv_library_path_utf8" 1>&6
-+
-+echo "${as_me-configure}:4618: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
-+
-+
-+            CPPFLAGS="$cf_test_CPPFLAGS"
-+            LIBS="-lutf8  $cf_save_LIBS"
-+            LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
-+            cat > conftest.$ac_ext <<EOF
-+#line 4625 "configure"
-+#include "confdefs.h"
-+
-+#include <libutf8.h>
-+int main() {
-+putwc(0,0);
- ; return 0; }
- EOF
--if { (eval echo configure:4544: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:4633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
--  cf_cv_ncurses_h2=$cf_header
--	
-+  
-+                test -n "$verbose" && echo "	... found utf8 library in $cf_cv_library_path_utf8" 1>&6
-+
-+echo "${as_me-configure}:4638: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
-+
-+
-+                cf_cv_find_linkage_utf8=yes
-+                cf_cv_library_file_utf8="-lutf8"
-+                break
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  cf_cv_ncurses_h2=no
-+  
-+                CPPFLAGS="$cf_save_CPPFLAGS"
-+                LIBS="$cf_save_LIBS"
-+                LDFLAGS="$cf_save_LDFLAGS"
-+                
-+fi
-+rm -f conftest*
-+          fi
-+        done
-+        LIBS="$cf_save_LIBS"
-+        CPPFLAGS="$cf_save_CPPFLAGS"
-+        LDFLAGS="$cf_save_LDFLAGS"
-+      fi
-+
-+    else
-+      cf_cv_find_linkage_utf8=no
-+    fi
-+    
- fi
- rm -f conftest*
- 
--			if test "$cf_cv_ncurses_h2" != no ; then
--				cf_cv_ncurses_h2=$cf_incdir/$cf_header
--				test -n "$verbose" && echo $ac_n "	... found $ac_c" 1>&6
--				break
--			fi
--			test -n "$verbose" && echo "	... tested $cf_incdir/$cf_header" 1>&6
--		done
--		CPPFLAGS="$cf_save2_CPPFLAGS"
--		test "$cf_cv_ncurses_h2" != no && break
--	done
--	test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
--	
-+if test "$cf_cv_find_linkage_utf8" = yes ; then
-+cf_cv_utf8_lib=add-on
-+else
-+cf_cv_utf8_lib=no
- fi
- 
--echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
- 
--	cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
--	cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
--	if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
--		cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
--	fi
-+fi
-+rm -f conftest*
-+fi
-+
-+echo "$ac_t""$cf_cv_utf8_lib" 1>&6
-+
-+# HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
-+# ncurses/ncursesw:
-+if test "$cf_cv_utf8_lib" = "add-on" ; then
-+	cat >> confdefs.h <<\EOF
-+#define HAVE_LIBUTF8_H 1
-+EOF
-+
- 	
--if test -n "$cf_1st_incdir" ; then
--  for cf_add_incdir in $cf_1st_incdir
-+if test -n "$cf_cv_header_path_utf8" ; then
-+  for cf_add_incdir in $cf_cv_header_path_utf8
-   do
- 	while test $cf_add_incdir != /usr/include
- 	do
-@@ -4592,20 +4704,20 @@
- 		fi
- 
- 		if test "$cf_have_incdir" = no ; then
--          if test "$cf_add_incdir" = /usr/local/include ; then
-+		  if test "$cf_add_incdir" = /usr/local/include ; then
- 			if test "$GCC" = yes
- 			then
- 			  cf_save_CPPFLAGS=$CPPFLAGS
- 			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
- 			  cat > conftest.$ac_ext <<EOF
--#line 4602 "configure"
-+#line 4714 "configure"
- #include "confdefs.h"
- #include <stdio.h>
- int main() {
- printf("Hello")
- ; return 0; }
- EOF
--if { (eval echo configure:4609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:4721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   :
- else
-   echo "configure: failed program was:" >&5
-@@ -4622,14 +4734,14 @@
- 		if test "$cf_have_incdir" = no ; then
- 		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
- 
--echo "${as_me-configure}:4626: testing adding $cf_add_incdir to include-path ..." 1>&5
-+echo "${as_me-configure}:4738: testing adding $cf_add_incdir to include-path ..." 1>&5
- 
- 
--		  CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
-+		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
- 
--          cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
--          test "$cf_top_incdir" = "$cf_add_incdir" && break
--          cf_add_incdir="$cf_top_incdir"
-+		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
-+		  test "$cf_top_incdir" = "$cf_add_incdir" && break
-+		  cf_add_incdir="$cf_top_incdir"
- 		else
- 		  break
- 		fi
-@@ -4638,738 +4750,778 @@
-   done
- fi
- 
-+	
-+if test -n "$cf_cv_library_path_utf8" ; then
-+  for cf_add_libdir in $cf_cv_library_path_utf8
-+  do
-+    if test $cf_add_libdir = /usr/lib ; then
-+      :
-+    elif test -d $cf_add_libdir
-+    then
-+      cf_have_libdir=no
-+      if test -n "$LDFLAGS$LIBS" ; then
-+        # a loop is needed to ensure we can add subdirs of existing dirs
-+        for cf_test_libdir in $LDFLAGS $LIBS ; do
-+          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
-+            cf_have_libdir=yes; break
-+          fi
-+        done
-+      fi
-+      if test "$cf_have_libdir" = no ; then
-+        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
- 
--fi
--
--# Set definitions to allow ifdef'ing for ncurses.h
--
--case $cf_cv_ncurses_header in # (vi
--*ncurses.h)
--	cat >> confdefs.h <<\EOF
--#define HAVE_NCURSES_H 1
--EOF
--
--	;;
--esac
--
--case $cf_cv_ncurses_header in # (vi
--ncurses/curses.h|ncurses/ncurses.h)
--	cat >> confdefs.h <<\EOF
--#define HAVE_NCURSES_NCURSES_H 1
--EOF
-+echo "${as_me-configure}:4774: testing adding $cf_add_libdir to library-path ..." 1>&5
- 
--	;;
--ncursesw/curses.h|ncursesw/ncurses.h)
--	cat >> confdefs.h <<\EOF
--#define HAVE_NCURSESW_NCURSES_H 1
--EOF
- 
--	;;
--esac
-+        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
-+      fi
-+    fi
-+  done
-+fi
- 
-+	LIBS="-lutf8 $LIBS"
-+fi
- 
-+	
-+cf_ncuconfig_root=ncursesw
- 
--echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
--echo "configure:4674: checking for terminfo header" >&5
--if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
--  echo $ac_n "(cached) $ac_c" 1>&6
--else
--  
--case ${cf_cv_ncurses_header} in #(vi
--*/ncurses.h|*/ncursesw.h) #(vi
--	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
--	;;
--*)
--	cf_term_header=term.h
--	;;
--esac
--
--for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
-+echo "Looking for ${cf_ncuconfig_root}-config"
-+for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
- do
--cat > conftest.$ac_ext <<EOF
--#line 4691 "configure"
--#include "confdefs.h"
--#include <stdio.h>
--#include <${cf_cv_ncurses_header-curses.h}>
--#include <$cf_test>
--
--int main() {
--int x = auto_left_margin
--; return 0; }
--EOF
--if { (eval echo configure:4701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
--  rm -rf conftest*
--  
--	cf_cv_term_header="$cf_test"
-+# Extract the first word of "$ac_prog", so it can be a program name with args.
-+set dummy $ac_prog; ac_word=$2
-+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-+echo "configure:4795: checking for $ac_word" >&5
-+if eval "test \"`echo '$''{'ac_cv_path_NCURSES_CONFIG'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
- else
--  echo "configure: failed program was:" >&5
--  cat conftest.$ac_ext >&5
--  rm -rf conftest*
--  
--	cf_cv_term_header=unknown
--	
-+  case "$NCURSES_CONFIG" in
-+  /*)
-+  ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
-+  ;;
-+  ?:/*)			 
-+  ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a dos path.
-+  ;;
-+  *)
-+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-+  ac_dummy="$PATH"
-+  for ac_dir in $ac_dummy; do 
-+    test -z "$ac_dir" && ac_dir=.
-+    if test -f $ac_dir/$ac_word; then
-+      ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
-+      break
-+    fi
-+  done
-+  IFS="$ac_save_ifs"
-+  ;;
-+esac
- fi
--rm -f conftest*
--	test "$cf_cv_term_header" != unknown && break
--done
--
-+NCURSES_CONFIG="$ac_cv_path_NCURSES_CONFIG"
-+if test -n "$NCURSES_CONFIG"; then
-+  echo "$ac_t""$NCURSES_CONFIG" 1>&6
-+else
-+  echo "$ac_t""no" 1>&6
- fi
- 
--echo "$ac_t""$cf_cv_term_header" 1>&6
-+test -n "$NCURSES_CONFIG" && break
-+done
-+test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
- 
--# Set definitions to allow ifdef'ing to accommodate subdirectories
- 
--case $cf_cv_term_header in # (vi
--*term.h)
--	cat >> confdefs.h <<\EOF
--#define HAVE_TERM_H 1
--EOF
-+if test "$NCURSES_CONFIG" != none ; then
- 
--	;;
--esac
-+cf_cv_ncurses_header=curses.h
- 
--case $cf_cv_term_header in # (vi
--ncurses/term.h) #(vi
--	cat >> confdefs.h <<\EOF
--#define HAVE_NCURSES_TERM_H 1
--EOF
-+CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
-+LIBS="`$NCURSES_CONFIG --libs` $LIBS"
- 
--	;;
--ncursesw/term.h)
--	cat >> confdefs.h <<\EOF
--#define HAVE_NCURSESW_TERM_H 1
-+cat >> confdefs.h <<\EOF
-+#define NCURSES 1
- EOF
- 
--	;;
--esac
- 
- 
--# some applications need this, but should check for NCURSES_VERSION
--cat >> confdefs.h <<\EOF
--#define NCURSES 1
-+cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
-+
-+cat >> confdefs.h <<EOF
-+#define $cf_nculib_ROOT 1
- EOF
- 
- 
-+cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
- 
--echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
--echo "configure:4756: checking for ncurses version" >&5
--if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
--  echo $ac_n "(cached) $ac_c" 1>&6
- else
--  
--	cf_cv_ncurses_version=no
--	cf_tempfile=out$$
--	rm -f $cf_tempfile
--	if test "$cross_compiling" = yes; then
--  
- 
--	# This will not work if the preprocessor splits the line after the
--	# Autoconf token.  The 'unproto' program does that.
--	cat > conftest.$ac_ext <<EOF
--#include <${cf_cv_ncurses_header-curses.h}>
--#undef Autoconf
--#ifdef NCURSES_VERSION
--Autoconf NCURSES_VERSION
--#else
--#ifdef __NCURSES_H
--Autoconf "old"
--#endif
--;
--#endif
--EOF
--	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
--	{ (eval echo configure:4782: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
--	if test -f conftest.out ; then
--		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
--		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
--		rm -f conftest.out
--	fi
- 
--else
--  cat > conftest.$ac_ext <<EOF
--#line 4791 "configure"
--#include "confdefs.h"
- 
--#include <${cf_cv_ncurses_header-curses.h}>
-+cf_ncuhdr_root=ncursesw
-+
-+test -n "$cf_cv_curses_dir" && \
-+test "$cf_cv_curses_dir" != "no" && { \
-+  
-+if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
-+  for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
-+  do
-+	while test $cf_add_incdir != /usr/include
-+	do
-+	  if test -d $cf_add_incdir
-+	  then
-+		cf_have_incdir=no
-+		if test -n "$CFLAGS$CPPFLAGS" ; then
-+		  # a loop is needed to ensure we can add subdirs of existing dirs
-+		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
-+			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
-+			  cf_have_incdir=yes; break
-+			fi
-+		  done
-+		fi
-+
-+		if test "$cf_have_incdir" = no ; then
-+		  if test "$cf_add_incdir" = /usr/local/include ; then
-+			if test "$GCC" = yes
-+			then
-+			  cf_save_CPPFLAGS=$CPPFLAGS
-+			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
-+			  cat > conftest.$ac_ext <<EOF
-+#line 4887 "configure"
-+#include "confdefs.h"
- #include <stdio.h>
--int main()
--{
--	FILE *fp = fopen("$cf_tempfile", "w");
--#ifdef NCURSES_VERSION
--# ifdef NCURSES_VERSION_PATCH
--	fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
--# else
--	fprintf(fp, "%s\n", NCURSES_VERSION);
--# endif
--#else
--# ifdef __NCURSES_H
--	fprintf(fp, "old\n");
--# else
--	make an error
--# endif
--#endif
--	${cf_cv_main_return-return}(0);
--}
-+int main() {
-+printf("Hello")
-+; return 0; }
- EOF
--if { (eval echo configure:4815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
--then
--  
--	cf_cv_ncurses_version=`cat $cf_tempfile`
-+if { (eval echo configure:4894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+  :
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  cf_have_incdir=yes
- fi
--rm -fr conftest*
--fi
-+rm -f conftest*
-+			  CPPFLAGS=$cf_save_CPPFLAGS
-+			fi
-+		  fi
-+		fi
- 
--	rm -f $cf_tempfile
-+		if test "$cf_have_incdir" = no ; then
-+		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
- 
--fi
-+echo "${as_me-configure}:4911: testing adding $cf_add_incdir to include-path ..." 1>&5
- 
--echo "$ac_t""$cf_cv_ncurses_version" 1>&6
--test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
--#define NCURSES 1
--EOF
- 
-+		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
- 
-+		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
-+		  test "$cf_top_incdir" = "$cf_add_incdir" && break
-+		  cf_add_incdir="$cf_top_incdir"
-+		else
-+		  break
-+		fi
-+	  fi
-+	done
-+  done
-+fi
- 
--	
-+}
- 
--cf_nculib_root=ncursesw
--	# This works, except for the special case where we find gpm, but
--	# ncurses is in a nonstandard location via $LIBS, and we really want
--	# to link gpm.
--cf_ncurses_LIBS=""
--cf_ncurses_SAVE="$LIBS"
--echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
--echo "configure:4846: checking for Gpm_Open in -lgpm" >&5
--ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
--if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-+echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
-+echo "configure:4930: checking for $cf_ncuhdr_root header in include-path" >&5
-+if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
--  ac_save_LIBS="$LIBS"
--LIBS="-lgpm  $LIBS"
--cat > conftest.$ac_ext <<EOF
--#line 4854 "configure"
-+  
-+	cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
-+	( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
-+	for cf_header in $cf_header_list
-+	do
-+		
-+	cat > conftest.$ac_ext <<EOF
-+#line 4941 "configure"
- #include "confdefs.h"
--/* Override any gcc2 internal prototype to avoid an error.  */
--/* We use char because int might match the return type of a gcc2
--    builtin and then its argument prototype would still apply.  */
--char Gpm_Open();
- 
-+
-+#define _XOPEN_SOURCE_EXTENDED
-+#undef  HAVE_LIBUTF8_H	/* in case we used CF_UTF8_LIB */
-+#define HAVE_LIBUTF8_H	/* to force ncurses' header file to use cchar_t */
-+
-+#include <$cf_header>
- int main() {
--Gpm_Open()
-+
-+#ifdef NCURSES_VERSION
-+
-+#ifndef WACS_BSSB
-+	make an error
-+#endif
-+
-+printf("%s\n", NCURSES_VERSION);
-+#else
-+#ifdef __NCURSES_H
-+printf("old\n");
-+#else
-+	make an error
-+#endif
-+#endif
-+	
-+	
- ; return 0; }
- EOF
--if { (eval echo configure:4865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:4970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
--  eval "ac_cv_lib_$ac_lib_var=yes"
-+  cf_cv_ncurses_h=$cf_header
-+	
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  eval "ac_cv_lib_$ac_lib_var=no"
-+  cf_cv_ncurses_h=no
- fi
- rm -f conftest*
--LIBS="$ac_save_LIBS"
-+
-+		test "$cf_cv_ncurses_h" != no && break
-+	done
- 
- fi
--if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
--  echo "$ac_t""yes" 1>&6
--  echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
--echo "configure:4881: checking for initscr in -lgpm" >&5
--ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
--if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
--  echo $ac_n "(cached) $ac_c" 1>&6
--else
--  ac_save_LIBS="$LIBS"
--LIBS="-lgpm  $LIBS"
--cat > conftest.$ac_ext <<EOF
--#line 4889 "configure"
--#include "confdefs.h"
--/* Override any gcc2 internal prototype to avoid an error.  */
--/* We use char because int might match the return type of a gcc2
--    builtin and then its argument prototype would still apply.  */
--char initscr();
--
--int main() {
--initscr()
--; return 0; }
--EOF
--if { (eval echo configure:4900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
--  rm -rf conftest*
--  eval "ac_cv_lib_$ac_lib_var=yes"
--else
--  echo "configure: failed program was:" >&5
--  cat conftest.$ac_ext >&5
--  rm -rf conftest*
--  eval "ac_cv_lib_$ac_lib_var=no"
--fi
--rm -f conftest*
--LIBS="$ac_save_LIBS"
--
--fi
--if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
--  echo "$ac_t""yes" 1>&6
--  LIBS="$cf_ncurses_SAVE"
--else
--  echo "$ac_t""no" 1>&6
--cf_ncurses_LIBS="-lgpm"
--fi
--
--else
--  echo "$ac_t""no" 1>&6
--fi
- 
-+echo "$ac_t""$cf_cv_ncurses_h" 1>&6
- 
--case $host_os in #(vi
--freebsd*)
--	# This is only necessary if you are linking against an obsolete
--	# version of ncurses (but it should do no harm, since it's static).
--	if test "$cf_nculib_root" = ncurses ; then
--		echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
--echo "configure:4932: checking for tgoto in -lmytinfo" >&5
--ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
--if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
--  echo $ac_n "(cached) $ac_c" 1>&6
--else
--  ac_save_LIBS="$LIBS"
--LIBS="-lmytinfo  $LIBS"
--cat > conftest.$ac_ext <<EOF
--#line 4940 "configure"
--#include "confdefs.h"
--/* Override any gcc2 internal prototype to avoid an error.  */
--/* We use char because int might match the return type of a gcc2
--    builtin and then its argument prototype would still apply.  */
--char tgoto();
- 
--int main() {
--tgoto()
--; return 0; }
--EOF
--if { (eval echo configure:4951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
--  rm -rf conftest*
--  eval "ac_cv_lib_$ac_lib_var=yes"
--else
--  echo "configure: failed program was:" >&5
--  cat conftest.$ac_ext >&5
--  rm -rf conftest*
--  eval "ac_cv_lib_$ac_lib_var=no"
--fi
--rm -f conftest*
--LIBS="$ac_save_LIBS"
- 
--fi
--if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
--  echo "$ac_t""yes" 1>&6
--  cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
-+if test "$cf_cv_ncurses_h" != no ; then
-+	cf_cv_ncurses_header=$cf_cv_ncurses_h
- else
--  echo "$ac_t""no" 1>&6
--fi
--
--	fi
--	;;
--esac
--
--LIBS="$cf_ncurses_LIBS $LIBS"
--
--if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
--then
--	
--if test -n "$cf_cv_curses_dir/lib" ; then
--  for cf_add_libdir in $cf_cv_curses_dir/lib
--  do
--    if test $cf_add_libdir = /usr/lib ; then
--      :
--    elif test -d $cf_add_libdir
--    then
--      cf_have_libdir=no
--      if test -n "$LDFLAGS$LIBS" ; then
--        # a loop is needed to ensure we can add subdirs of existing dirs
--        for cf_test_libdir in $LDFLAGS $LIBS ; do
--          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
--            cf_have_libdir=yes; break
--          fi
--        done
--      fi
--      if test "$cf_have_libdir" = no ; then
--        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
- 
--echo "${as_me-configure}:4999: testing adding $cf_add_libdir to library-path ..." 1>&5
--
--
--        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
--      fi
--    fi
--  done
--fi
--
--	LIBS="-l$cf_nculib_root $LIBS"
--else
--	
--	eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
--	cf_libdir=""
--	echo $ac_n "checking for initscr""... $ac_c" 1>&6
--echo "configure:5014: checking for initscr" >&5
--if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
-+echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
-+echo "configure:4996: checking for $cf_ncuhdr_root include-path" >&5
-+if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
--  cat > conftest.$ac_ext <<EOF
--#line 5019 "configure"
--#include "confdefs.h"
--/* System header to define __stub macros and hopefully few prototypes,
--    which can conflict with char initscr(); below.  */
--#include <assert.h>
--/* Override any gcc2 internal prototype to avoid an error.  */
--/* We use char because int might match the return type of a gcc2
--    builtin and then its argument prototype would still apply.  */
--char initscr();
--
--int main() {
--
--/* The GNU C library defines this for functions which it implements
--    to always fail with ENOSYS.  Some functions are actually named
--    something starting with __ and the normal name is an alias.  */
--#if defined (__stub_initscr) || defined (__stub___initscr)
--choke me
--#else
--initscr();
--#endif
-+  
-+	test -n "$verbose" && echo
-+	
-+cf_header_path_list=""
-+if test -n "${CFLAGS}${CPPFLAGS}" ; then
-+	for cf_header_path in $CPPFLAGS $CFLAGS
-+	do
-+		case $cf_header_path in #(vi
-+		-I*)
-+			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
-+			
-+test "$cf_header_path" != "NONE" && \
-+test -d "$cf_header_path" && \
-+ {
-+	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
-+	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
-+	test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
-+	test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
-+	test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
-+	test -d $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
-+}
- 
--; return 0; }
--EOF
--if { (eval echo configure:5042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
--  rm -rf conftest*
--  eval "ac_cv_func_initscr=yes"
--else
--  echo "configure: failed program was:" >&5
--  cat conftest.$ac_ext >&5
--  rm -rf conftest*
--  eval "ac_cv_func_initscr=no"
--fi
--rm -f conftest*
-+			cf_header_path_list="$cf_header_path_list $cf_search"
-+			;;
-+		esac
-+	done
- fi
- 
--if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
--  echo "$ac_t""yes" 1>&6
--  eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
--else
--  echo "$ac_t""no" 1>&6
--
--		cf_save_LIBS="$LIBS"
--		echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
--echo "configure:5062: checking for initscr in -l$cf_nculib_root" >&5
--		LIBS="-l$cf_nculib_root $LIBS"
--		cat > conftest.$ac_ext <<EOF
--#line 5065 "configure"
--#include "confdefs.h"
--#include <${cf_cv_ncurses_header-curses.h}>
--int main() {
--initscr()
--; return 0; }
--EOF
--if { (eval echo configure:5072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
--  rm -rf conftest*
--  echo "$ac_t""yes" 1>&6
--			 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
--			
--else
--  echo "configure: failed program was:" >&5
--  cat conftest.$ac_ext >&5
--  rm -rf conftest*
--  echo "$ac_t""no" 1>&6
--			cf_search=""
-+cf_search=""
- 
- 
- test "/usr" != "$prefix" && \
- test -d "/usr" && \
- (test $prefix = NONE || test -d $prefix) && {
--	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
--	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
--	test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
--	test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
--	test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
--	test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
-+	test -n "$verbose" && echo "	... testing for include-directories under /usr"
-+	test -d /usr/include &&          cf_search="$cf_search /usr/include"
-+	test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
-+	test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
-+	test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
-+	test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
- }
- 
- 
- test "$prefix" != "NONE" && \
- test -d "$prefix" && \
-  {
--	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
--	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
--	test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
--	test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
--	test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
--	test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
-+	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
-+	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
-+	test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
-+	test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
-+	test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
-+	test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
- }
- 
- 
- test "/usr/local" != "$prefix" && \
- test -d "/usr/local" && \
- (test $prefix = NONE || test -d $prefix) && {
--	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
--	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
--	test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
--	test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
--	test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
--	test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
-+	test -n "$verbose" && echo "	... testing for include-directories under /usr/local"
-+	test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
-+	test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
-+	test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
-+	test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
-+	test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
- }
- 
- 
- test "/opt" != "$prefix" && \
- test -d "/opt" && \
- (test $prefix = NONE || test -d $prefix) && {
--	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
--	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
--	test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
--	test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
--	test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
--	test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
-+	test -n "$verbose" && echo "	... testing for include-directories under /opt"
-+	test -d /opt/include &&          cf_search="$cf_search /opt/include"
-+	test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
-+	test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
-+	test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
-+	test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
- }
- 
- 
- test "$HOME" != "$prefix" && \
- test -d "$HOME" && \
- (test $prefix = NONE || test -d $prefix) && {
--	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
--	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
--	test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
--	test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
--	test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
--	test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
-+	test -n "$verbose" && echo "	... testing for include-directories under $HOME"
-+	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
-+	test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
-+	test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
-+	test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
-+	test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
- }
- 
- 
--			for cf_libdir in $cf_search
--			do
--				echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
--echo "configure:5148: checking for -l$cf_nculib_root in $cf_libdir" >&5
--				LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
--				cat > conftest.$ac_ext <<EOF
--#line 5151 "configure"
-+
-+test "$includedir" != NONE && \
-+test "$includedir" != "/usr/include" && \
-+test -d "$includedir" && {
-+	test -d $includedir &&    cf_search="$cf_search $includedir"
-+	test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
-+}
-+
-+test "$oldincludedir" != NONE && \
-+test "$oldincludedir" != "/usr/include" && \
-+test -d "$oldincludedir" && {
-+	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
-+	test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
-+}
-+
-+cf_search="$cf_header_path_list $cf_search"
-+
-+	test -n "$verbose" && echo search path $cf_search
-+	cf_save2_CPPFLAGS="$CPPFLAGS"
-+	for cf_incdir in $cf_search
-+	do
-+		
-+if test -n "$cf_incdir" ; then
-+  for cf_add_incdir in $cf_incdir
-+  do
-+	while test $cf_add_incdir != /usr/include
-+	do
-+	  if test -d $cf_add_incdir
-+	  then
-+		cf_have_incdir=no
-+		if test -n "$CFLAGS$CPPFLAGS" ; then
-+		  # a loop is needed to ensure we can add subdirs of existing dirs
-+		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
-+			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
-+			  cf_have_incdir=yes; break
-+			fi
-+		  done
-+		fi
-+
-+		if test "$cf_have_incdir" = no ; then
-+		  if test "$cf_add_incdir" = /usr/local/include ; then
-+			if test "$GCC" = yes
-+			then
-+			  cf_save_CPPFLAGS=$CPPFLAGS
-+			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
-+			  cat > conftest.$ac_ext <<EOF
-+#line 5137 "configure"
- #include "confdefs.h"
--#include <${cf_cv_ncurses_header-curses.h}>
-+#include <stdio.h>
- int main() {
--initscr()
-+printf("Hello")
- ; return 0; }
- EOF
--if { (eval echo configure:5158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
--  rm -rf conftest*
--  echo "$ac_t""yes" 1>&6
--			 		 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
--					 break
-+if { (eval echo configure:5144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+  :
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  echo "$ac_t""no" 1>&6
--					 LIBS="$cf_save_LIBS"
--fi
--rm -f conftest*
--			done
--			
-+  cf_have_incdir=yes
- fi
- rm -f conftest*
--		
--fi
-+			  CPPFLAGS=$cf_save_CPPFLAGS
-+			fi
-+		  fi
-+		fi
- 
--eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
-+		if test "$cf_have_incdir" = no ; then
-+		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
- 
--if test $cf_found_library = no ; then
--	{ echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
--fi
-+echo "${as_me-configure}:5161: testing adding $cf_add_incdir to include-path ..." 1>&5
- 
- 
--fi
-+		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
- 
--if test -n "$cf_ncurses_LIBS" ; then
--	echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
--echo "configure:5189: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
--	cf_ncurses_SAVE="$LIBS"
--	for p in $cf_ncurses_LIBS ; do
--		q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
--		if test "$q" != "$LIBS" ; then
--			LIBS="$q"
-+		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
-+		  test "$cf_top_incdir" = "$cf_add_incdir" && break
-+		  cf_add_incdir="$cf_top_incdir"
-+		else
-+		  break
- 		fi
-+	  fi
- 	done
-+  done
-+fi
-+
-+		for cf_header in \
-+			ncurses.h \
-+			curses.h
-+		do
-+			
- 	cat > conftest.$ac_ext <<EOF
--#line 5198 "configure"
-+#line 5183 "configure"
- #include "confdefs.h"
--#include <${cf_cv_ncurses_header-curses.h}>
-+
-+
-+#include <$cf_header>
- int main() {
--initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
-+
-+#ifdef NCURSES_VERSION
-+
-+printf("%s\n", NCURSES_VERSION);
-+#else
-+#ifdef __NCURSES_H
-+printf("old\n");
-+#else
-+	make an error
-+#endif
-+#endif
-+	
-+	
- ; return 0; }
- EOF
--if { (eval echo configure:5205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:5204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
--  echo "$ac_t""yes" 1>&6
-+  cf_cv_ncurses_h2=$cf_header
-+	
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  echo "$ac_t""no" 1>&6
--		 LIBS="$cf_ncurses_SAVE"
-+  cf_cv_ncurses_h2=no
- fi
- rm -f conftest*
--fi
--
--
--cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
--
--cat >> confdefs.h <<EOF
--#define $cf_nculib_ROOT 1
--EOF
- 
-+			if test "$cf_cv_ncurses_h2" != no ; then
-+				cf_cv_ncurses_h2=$cf_incdir/$cf_header
-+				test -n "$verbose" && echo $ac_n "	... found $ac_c" 1>&6
-+				break
-+			fi
-+			test -n "$verbose" && echo "	... tested $cf_incdir/$cf_header" 1>&6
-+		done
-+		CPPFLAGS="$cf_save2_CPPFLAGS"
-+		test "$cf_cv_ncurses_h2" != no && break
-+	done
-+	test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
-+	
-+fi
- 
--	;;
--pdcurses) #(vi
--	if test "$no_x" = yes; then
--  # Not all programs may use this symbol, but it does not hurt to define it.
--  cat >> confdefs.h <<\EOF
--#define X_DISPLAY_MISSING 1
--EOF
-+echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
- 
--  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
--else
--  if test -n "$x_includes"; then
--    X_CFLAGS="$X_CFLAGS -I$x_includes"
--  fi
-+	cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
-+	cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
-+	if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
-+		cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
-+	fi
-+	
-+if test -n "$cf_1st_incdir" ; then
-+  for cf_add_incdir in $cf_1st_incdir
-+  do
-+	while test $cf_add_incdir != /usr/include
-+	do
-+	  if test -d $cf_add_incdir
-+	  then
-+		cf_have_incdir=no
-+		if test -n "$CFLAGS$CPPFLAGS" ; then
-+		  # a loop is needed to ensure we can add subdirs of existing dirs
-+		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
-+			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
-+			  cf_have_incdir=yes; break
-+			fi
-+		  done
-+		fi
- 
--  # It would also be nice to do this for all -L options, not just this one.
--  if test -n "$x_libraries"; then
--    X_LIBS="$X_LIBS -L$x_libraries"
--    # For Solaris; some versions of Sun CC require a space after -R and
--    # others require no space.  Words are not sufficient . . . .
--    case "`(uname -sr) 2>/dev/null`" in
--    "SunOS 5"*)
--      echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
--echo "configure:5248: checking whether -R must be followed by a space" >&5
--      ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
--      cat > conftest.$ac_ext <<EOF
--#line 5251 "configure"
-+		if test "$cf_have_incdir" = no ; then
-+		  if test "$cf_add_incdir" = /usr/local/include ; then
-+			if test "$GCC" = yes
-+			then
-+			  cf_save_CPPFLAGS=$CPPFLAGS
-+			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
-+			  cat > conftest.$ac_ext <<EOF
-+#line 5262 "configure"
- #include "confdefs.h"
--
-+#include <stdio.h>
- int main() {
--
-+printf("Hello")
- ; return 0; }
- EOF
--if { (eval echo configure:5258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
--  rm -rf conftest*
--  ac_R_nospace=yes
-+if { (eval echo configure:5269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+  :
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  ac_R_nospace=no
-+  cf_have_incdir=yes
- fi
- rm -f conftest*
--      if test $ac_R_nospace = yes; then
--	echo "$ac_t""no" 1>&6
--	X_LIBS="$X_LIBS -R$x_libraries"
--      else
--	LIBS="$ac_xsave_LIBS -R $x_libraries"
--	cat > conftest.$ac_ext <<EOF
--#line 5274 "configure"
--#include "confdefs.h"
-+			  CPPFLAGS=$cf_save_CPPFLAGS
-+			fi
-+		  fi
-+		fi
- 
--int main() {
-+		if test "$cf_have_incdir" = no ; then
-+		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
- 
--; return 0; }
--EOF
--if { (eval echo configure:5281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
--  rm -rf conftest*
--  ac_R_space=yes
--else
--  echo "configure: failed program was:" >&5
--  cat conftest.$ac_ext >&5
--  rm -rf conftest*
--  ac_R_space=no
-+echo "${as_me-configure}:5286: testing adding $cf_add_incdir to include-path ..." 1>&5
-+
-+
-+		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
-+
-+		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
-+		  test "$cf_top_incdir" = "$cf_add_incdir" && break
-+		  cf_add_incdir="$cf_top_incdir"
-+		else
-+		  break
-+		fi
-+	  fi
-+	done
-+  done
- fi
--rm -f conftest*
--	if test $ac_R_space = yes; then
--	  echo "$ac_t""yes" 1>&6
--	  X_LIBS="$X_LIBS -R $x_libraries"
--	else
--	  echo "$ac_t""neither works" 1>&6
--	fi
--      fi
--      LIBS="$ac_xsave_LIBS"
--    esac
--  fi
- 
--  # Check for system-dependent libraries X programs must link with.
--  # Do this before checking for the system-independent R6 libraries
--  # (-lICE), since we may need -lsocket or whatever for X linking.
- 
--  if test "$ISC" = yes; then
--    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
--  else
--    # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
--    # libraries were built with DECnet support.  And karl@cs.umb.edu says
--    # the Alpha needs dnet_stub (dnet does not exist).
--    echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
--echo "configure:5313: checking for dnet_ntoa in -ldnet" >&5
--ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
--if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
--  echo $ac_n "(cached) $ac_c" 1>&6
-+fi
-+
-+# Set definitions to allow ifdef'ing for ncurses.h
-+
-+case $cf_cv_ncurses_header in # (vi
-+*ncurses.h)
-+	cat >> confdefs.h <<\EOF
-+#define HAVE_NCURSES_H 1
-+EOF
-+
-+	;;
-+esac
-+
-+case $cf_cv_ncurses_header in # (vi
-+ncurses/curses.h|ncurses/ncurses.h)
-+	cat >> confdefs.h <<\EOF
-+#define HAVE_NCURSES_NCURSES_H 1
-+EOF
-+
-+	;;
-+ncursesw/curses.h|ncursesw/ncurses.h)
-+	cat >> confdefs.h <<\EOF
-+#define HAVE_NCURSESW_NCURSES_H 1
-+EOF
-+
-+	;;
-+esac
-+
-+
-+
-+echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
-+echo "configure:5334: checking for terminfo header" >&5
-+if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
- else
--  ac_save_LIBS="$LIBS"
--LIBS="-ldnet  $LIBS"
-+  
-+case ${cf_cv_ncurses_header} in #(vi
-+*/ncurses.h|*/ncursesw.h) #(vi
-+	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
-+	;;
-+*)
-+	cf_term_header=term.h
-+	;;
-+esac
-+
-+for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
-+do
- cat > conftest.$ac_ext <<EOF
--#line 5321 "configure"
-+#line 5351 "configure"
- #include "confdefs.h"
--/* Override any gcc2 internal prototype to avoid an error.  */
--/* We use char because int might match the return type of a gcc2
--    builtin and then its argument prototype would still apply.  */
--char dnet_ntoa();
-+#include <stdio.h>
-+#include <${cf_cv_ncurses_header-curses.h}>
-+#include <$cf_test>
- 
- int main() {
--dnet_ntoa()
-+int x = auto_left_margin
- ; return 0; }
- EOF
--if { (eval echo configure:5332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:5361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
--  eval "ac_cv_lib_$ac_lib_var=yes"
-+  
-+	cf_cv_term_header="$cf_test"
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  eval "ac_cv_lib_$ac_lib_var=no"
-+  
-+	cf_cv_term_header=unknown
-+	
- fi
- rm -f conftest*
--LIBS="$ac_save_LIBS"
-+	test "$cf_cv_term_header" != unknown && break
-+done
- 
- fi
--if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
--  echo "$ac_t""yes" 1>&6
--  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
-+
-+echo "$ac_t""$cf_cv_term_header" 1>&6
-+
-+# Set definitions to allow ifdef'ing to accommodate subdirectories
-+
-+case $cf_cv_term_header in # (vi
-+*term.h)
-+	cat >> confdefs.h <<\EOF
-+#define HAVE_TERM_H 1
-+EOF
-+
-+	;;
-+esac
-+
-+case $cf_cv_term_header in # (vi
-+ncurses/term.h) #(vi
-+	cat >> confdefs.h <<\EOF
-+#define HAVE_NCURSES_TERM_H 1
-+EOF
-+
-+	;;
-+ncursesw/term.h)
-+	cat >> confdefs.h <<\EOF
-+#define HAVE_NCURSESW_TERM_H 1
-+EOF
-+
-+	;;
-+esac
-+
-+
-+# some applications need this, but should check for NCURSES_VERSION
-+cat >> confdefs.h <<\EOF
-+#define NCURSES 1
-+EOF
-+
-+
-+
-+echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
-+echo "configure:5416: checking for ncurses version" >&5
-+if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
- else
--  echo "$ac_t""no" 1>&6
-+  
-+	cf_cv_ncurses_version=no
-+	cf_tempfile=out$$
-+	rm -f $cf_tempfile
-+	if test "$cross_compiling" = yes; then
-+  
-+
-+	# This will not work if the preprocessor splits the line after the
-+	# Autoconf token.  The 'unproto' program does that.
-+	cat > conftest.$ac_ext <<EOF
-+#include <${cf_cv_ncurses_header-curses.h}>
-+#undef Autoconf
-+#ifdef NCURSES_VERSION
-+Autoconf NCURSES_VERSION
-+#else
-+#ifdef __NCURSES_H
-+Autoconf "old"
-+#endif
-+;
-+#endif
-+EOF
-+	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
-+	{ (eval echo configure:5442: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
-+	if test -f conftest.out ; then
-+		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
-+		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
-+		rm -f conftest.out
-+	fi
-+
-+else
-+  cat > conftest.$ac_ext <<EOF
-+#line 5451 "configure"
-+#include "confdefs.h"
-+
-+#include <${cf_cv_ncurses_header-curses.h}>
-+#include <stdio.h>
-+int main()
-+{
-+	FILE *fp = fopen("$cf_tempfile", "w");
-+#ifdef NCURSES_VERSION
-+# ifdef NCURSES_VERSION_PATCH
-+	fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
-+# else
-+	fprintf(fp, "%s\n", NCURSES_VERSION);
-+# endif
-+#else
-+# ifdef __NCURSES_H
-+	fprintf(fp, "old\n");
-+# else
-+	make an error
-+# endif
-+#endif
-+	${cf_cv_main_return-return}(0);
-+}
-+EOF
-+if { (eval echo configure:5475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-+then
-+  
-+	cf_cv_ncurses_version=`cat $cf_tempfile`
-+else
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+fi
-+rm -fr conftest*
- fi
- 
--    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
--      echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
--echo "configure:5354: checking for dnet_ntoa in -ldnet_stub" >&5
--ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
-+	rm -f $cf_tempfile
-+
-+fi
-+
-+echo "$ac_t""$cf_cv_ncurses_version" 1>&6
-+test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
-+#define NCURSES 1
-+EOF
-+
-+
-+
-+
-+
-+cf_nculib_root=ncursesw
-+	# This works, except for the special case where we find gpm, but
-+	# ncurses is in a nonstandard location via $LIBS, and we really want
-+	# to link gpm.
-+cf_ncurses_LIBS=""
-+cf_ncurses_SAVE="$LIBS"
-+echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
-+echo "configure:5506: checking for Gpm_Open in -lgpm" >&5
-+ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   ac_save_LIBS="$LIBS"
--LIBS="-ldnet_stub  $LIBS"
-+LIBS="-lgpm  $LIBS"
- cat > conftest.$ac_ext <<EOF
--#line 5362 "configure"
-+#line 5514 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error.  */
- /* We use char because int might match the return type of a gcc2
-     builtin and then its argument prototype would still apply.  */
--char dnet_ntoa();
-+char Gpm_Open();
- 
- int main() {
--dnet_ntoa()
-+Gpm_Open()
- ; return 0; }
- EOF
--if { (eval echo configure:5373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:5525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   eval "ac_cv_lib_$ac_lib_var=yes"
- else
-@@ -5384,89 +5536,78 @@
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-   echo "$ac_t""yes" 1>&6
--  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
--else
--  echo "$ac_t""no" 1>&6
--fi
--
--    fi
--
--    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
--    # to get the SysV transport functions.
--    # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
--    # needs -lnsl.
--    # The nsl library prevents programs from opening the X display
--    # on Irix 5.2, according to dickey@clark.net.
--    echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
--echo "configure:5402: checking for gethostbyname" >&5
--if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
-+  echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
-+echo "configure:5541: checking for initscr in -lgpm" >&5
-+ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
-+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
--  cat > conftest.$ac_ext <<EOF
--#line 5407 "configure"
-+  ac_save_LIBS="$LIBS"
-+LIBS="-lgpm  $LIBS"
-+cat > conftest.$ac_ext <<EOF
-+#line 5549 "configure"
- #include "confdefs.h"
--/* System header to define __stub macros and hopefully few prototypes,
--    which can conflict with char gethostbyname(); below.  */
--#include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error.  */
- /* We use char because int might match the return type of a gcc2
-     builtin and then its argument prototype would still apply.  */
--char gethostbyname();
-+char initscr();
- 
- int main() {
--
--/* The GNU C library defines this for functions which it implements
--    to always fail with ENOSYS.  Some functions are actually named
--    something starting with __ and the normal name is an alias.  */
--#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
--choke me
--#else
--gethostbyname();
--#endif
--
-+initscr()
- ; return 0; }
- EOF
--if { (eval echo configure:5430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:5560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
--  eval "ac_cv_func_gethostbyname=yes"
-+  eval "ac_cv_lib_$ac_lib_var=yes"
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  eval "ac_cv_func_gethostbyname=no"
-+  eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
--fi
-+LIBS="$ac_save_LIBS"
- 
--if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
-+fi
-+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-   echo "$ac_t""yes" 1>&6
--  :
-+  LIBS="$cf_ncurses_SAVE"
- else
-   echo "$ac_t""no" 1>&6
-+cf_ncurses_LIBS="-lgpm"
- fi
- 
--    if test $ac_cv_func_gethostbyname = no; then
--      echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
--echo "configure:5451: checking for gethostbyname in -lnsl" >&5
--ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
--if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
--  echo $ac_n "(cached) $ac_c" 1>&6
-+else
-+  echo "$ac_t""no" 1>&6
-+fi
-+
-+
-+case $host_os in #(vi
-+freebsd*)
-+	# This is only necessary if you are linking against an obsolete
-+	# version of ncurses (but it should do no harm, since it's static).
-+	if test "$cf_nculib_root" = ncurses ; then
-+		echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
-+echo "configure:5592: checking for tgoto in -lmytinfo" >&5
-+ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
-+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
- else
-   ac_save_LIBS="$LIBS"
--LIBS="-lnsl  $LIBS"
-+LIBS="-lmytinfo  $LIBS"
- cat > conftest.$ac_ext <<EOF
--#line 5459 "configure"
-+#line 5600 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error.  */
- /* We use char because int might match the return type of a gcc2
-     builtin and then its argument prototype would still apply.  */
--char gethostbyname();
-+char tgoto();
- 
- int main() {
--gethostbyname()
-+tgoto()
- ; return 0; }
- EOF
--if { (eval echo configure:5470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:5611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   eval "ac_cv_lib_$ac_lib_var=yes"
- else
-@@ -5481,182 +5622,405 @@
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-   echo "$ac_t""yes" 1>&6
--  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
-+  cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
- else
-   echo "$ac_t""no" 1>&6
- fi
- 
-+	fi
-+	;;
-+esac
-+
-+LIBS="$cf_ncurses_LIBS $LIBS"
-+
-+if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
-+then
-+	
-+if test -n "$cf_cv_curses_dir/lib" ; then
-+  for cf_add_libdir in $cf_cv_curses_dir/lib
-+  do
-+    if test $cf_add_libdir = /usr/lib ; then
-+      :
-+    elif test -d $cf_add_libdir
-+    then
-+      cf_have_libdir=no
-+      if test -n "$LDFLAGS$LIBS" ; then
-+        # a loop is needed to ensure we can add subdirs of existing dirs
-+        for cf_test_libdir in $LDFLAGS $LIBS ; do
-+          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
-+            cf_have_libdir=yes; break
-+          fi
-+        done
-+      fi
-+      if test "$cf_have_libdir" = no ; then
-+        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
-+
-+echo "${as_me-configure}:5659: testing adding $cf_add_libdir to library-path ..." 1>&5
-+
-+
-+        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
-+      fi
-     fi
-+  done
-+fi
- 
--    # lieder@skyler.mavd.honeywell.com says without -lsocket,
--    # socket/setsockopt and other routines are undefined under SCO ODT
--    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
--    # on later versions), says simon@lia.di.epfl.ch: it contains
--    # gethostby* variants that don't use the nameserver (or something).
--    # -lsocket must be given before -lnsl if both are needed.
--    # We assume that if connect needs -lnsl, so does gethostbyname.
--    echo $ac_n "checking for connect""... $ac_c" 1>&6
--echo "configure:5500: checking for connect" >&5
--if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
-+	LIBS="-l$cf_nculib_root $LIBS"
-+else
-+	
-+	eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
-+	cf_libdir=""
-+	echo $ac_n "checking for initscr""... $ac_c" 1>&6
-+echo "configure:5674: checking for initscr" >&5
-+if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   cat > conftest.$ac_ext <<EOF
--#line 5505 "configure"
-+#line 5679 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
--    which can conflict with char connect(); below.  */
-+    which can conflict with char initscr(); below.  */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error.  */
- /* We use char because int might match the return type of a gcc2
-     builtin and then its argument prototype would still apply.  */
--char connect();
-+char initscr();
- 
- int main() {
- 
- /* The GNU C library defines this for functions which it implements
-     to always fail with ENOSYS.  Some functions are actually named
-     something starting with __ and the normal name is an alias.  */
--#if defined (__stub_connect) || defined (__stub___connect)
-+#if defined (__stub_initscr) || defined (__stub___initscr)
- choke me
- #else
--connect();
-+initscr();
- #endif
- 
- ; return 0; }
- EOF
--if { (eval echo configure:5528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:5702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
--  eval "ac_cv_func_connect=yes"
-+  eval "ac_cv_func_initscr=yes"
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  eval "ac_cv_func_connect=no"
-+  eval "ac_cv_func_initscr=no"
- fi
- rm -f conftest*
- fi
- 
--if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
-+if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
-   echo "$ac_t""yes" 1>&6
--  :
-+  eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
- else
-   echo "$ac_t""no" 1>&6
--fi
- 
--    if test $ac_cv_func_connect = no; then
--      echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
--echo "configure:5549: checking for connect in -lsocket" >&5
--ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
--if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
--  echo $ac_n "(cached) $ac_c" 1>&6
--else
--  ac_save_LIBS="$LIBS"
--LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
--cat > conftest.$ac_ext <<EOF
--#line 5557 "configure"
-+		cf_save_LIBS="$LIBS"
-+		echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
-+echo "configure:5722: checking for initscr in -l$cf_nculib_root" >&5
-+		LIBS="-l$cf_nculib_root $LIBS"
-+		cat > conftest.$ac_ext <<EOF
-+#line 5725 "configure"
- #include "confdefs.h"
--/* Override any gcc2 internal prototype to avoid an error.  */
--/* We use char because int might match the return type of a gcc2
--    builtin and then its argument prototype would still apply.  */
--char connect();
--
-+#include <${cf_cv_ncurses_header-curses.h}>
- int main() {
--connect()
-+initscr()
- ; return 0; }
- EOF
--if { (eval echo configure:5568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:5732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
--  eval "ac_cv_lib_$ac_lib_var=yes"
-+  echo "$ac_t""yes" 1>&6
-+			 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
-+			
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  eval "ac_cv_lib_$ac_lib_var=no"
--fi
--rm -f conftest*
--LIBS="$ac_save_LIBS"
--
--fi
--if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
--  echo "$ac_t""yes" 1>&6
--  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
--else
-   echo "$ac_t""no" 1>&6
-+			
-+cf_library_path_list=""
-+if test -n "${LDFLAGS}${LIBS}" ; then
-+	for cf_library_path in $LDFLAGS $LIBS
-+	do
-+		case $cf_library_path in #(vi
-+		-L*)
-+			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
-+			
-+test "$cf_library_path" != "NONE" && \
-+test -d "$cf_library_path" && \
-+ {
-+	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
-+	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
-+	test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
-+	test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
-+	test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
-+	test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
-+}
-+
-+			cf_library_path_list="$cf_library_path_list $cf_search"
-+			;;
-+		esac
-+	done
- fi
- 
--    fi
-+cf_search=""
- 
--    # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
--    echo $ac_n "checking for remove""... $ac_c" 1>&6
--echo "configure:5592: checking for remove" >&5
--if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
--  echo $ac_n "(cached) $ac_c" 1>&6
--else
--  cat > conftest.$ac_ext <<EOF
--#line 5597 "configure"
--#include "confdefs.h"
--/* System header to define __stub macros and hopefully few prototypes,
--    which can conflict with char remove(); below.  */
--#include <assert.h>
--/* Override any gcc2 internal prototype to avoid an error.  */
--/* We use char because int might match the return type of a gcc2
--    builtin and then its argument prototype would still apply.  */
--char remove();
- 
--int main() {
-+test "/usr" != "$prefix" && \
-+test -d "/usr" && \
-+(test $prefix = NONE || test -d $prefix) && {
-+	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
-+	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
-+	test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
-+	test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
-+	test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
-+	test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
-+}
-+
-+
-+test "$prefix" != "NONE" && \
-+test -d "$prefix" && \
-+ {
-+	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
-+	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
-+	test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
-+	test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
-+	test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
-+	test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
-+}
-+
-+
-+test "/usr/local" != "$prefix" && \
-+test -d "/usr/local" && \
-+(test $prefix = NONE || test -d $prefix) && {
-+	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
-+	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
-+	test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
-+	test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
-+	test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
-+	test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
-+}
-+
-+
-+test "/opt" != "$prefix" && \
-+test -d "/opt" && \
-+(test $prefix = NONE || test -d $prefix) && {
-+	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
-+	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
-+	test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
-+	test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
-+	test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
-+	test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
-+}
-+
-+
-+test "$HOME" != "$prefix" && \
-+test -d "$HOME" && \
-+(test $prefix = NONE || test -d $prefix) && {
-+	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
-+	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
-+	test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
-+	test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
-+	test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
-+	test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
-+}
-+
- 
--/* The GNU C library defines this for functions which it implements
--    to always fail with ENOSYS.  Some functions are actually named
--    something starting with __ and the normal name is an alias.  */
--#if defined (__stub_remove) || defined (__stub___remove)
--choke me
--#else
--remove();
--#endif
- 
-+cf_search="$cf_library_path_list $cf_search"
-+
-+			for cf_libdir in $cf_search
-+			do
-+				echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
-+echo "configure:5837: checking for -l$cf_nculib_root in $cf_libdir" >&5
-+				LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
-+				cat > conftest.$ac_ext <<EOF
-+#line 5840 "configure"
-+#include "confdefs.h"
-+#include <${cf_cv_ncurses_header-curses.h}>
-+int main() {
-+initscr()
- ; return 0; }
- EOF
--if { (eval echo configure:5620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:5847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
--  eval "ac_cv_func_remove=yes"
-+  echo "$ac_t""yes" 1>&6
-+			 		 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
-+					 break
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  eval "ac_cv_func_remove=no"
-+  echo "$ac_t""no" 1>&6
-+					 LIBS="$cf_save_LIBS"
-+fi
-+rm -f conftest*
-+			done
-+			
- fi
- rm -f conftest*
-+		
- fi
- 
--if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
--  echo "$ac_t""yes" 1>&6
--  :
--else
--  echo "$ac_t""no" 1>&6
-+eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
-+
-+if test $cf_found_library = no ; then
-+	{ echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
- fi
- 
--    if test $ac_cv_func_remove = no; then
--      echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
--echo "configure:5641: checking for remove in -lposix" >&5
--ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
--if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
--  echo $ac_n "(cached) $ac_c" 1>&6
--else
--  ac_save_LIBS="$LIBS"
--LIBS="-lposix  $LIBS"
--cat > conftest.$ac_ext <<EOF
--#line 5649 "configure"
-+
-+fi
-+
-+if test -n "$cf_ncurses_LIBS" ; then
-+	echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
-+echo "configure:5878: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
-+	cf_ncurses_SAVE="$LIBS"
-+	for p in $cf_ncurses_LIBS ; do
-+		q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
-+		if test "$q" != "$LIBS" ; then
-+			LIBS="$q"
-+		fi
-+	done
-+	cat > conftest.$ac_ext <<EOF
-+#line 5887 "configure"
-+#include "confdefs.h"
-+#include <${cf_cv_ncurses_header-curses.h}>
-+int main() {
-+initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
-+; return 0; }
-+EOF
-+if { (eval echo configure:5894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+  rm -rf conftest*
-+  echo "$ac_t""yes" 1>&6
-+else
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  echo "$ac_t""no" 1>&6
-+		 LIBS="$cf_ncurses_SAVE"
-+fi
-+rm -f conftest*
-+fi
-+
-+
-+cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
-+
-+cat >> confdefs.h <<EOF
-+#define $cf_nculib_ROOT 1
-+EOF
-+
-+
-+
-+fi
-+
-+	;;
-+pdcurses) #(vi
-+	if test "$no_x" = yes; then
-+  # Not all programs may use this symbol, but it does not hurt to define it.
-+  cat >> confdefs.h <<\EOF
-+#define X_DISPLAY_MISSING 1
-+EOF
-+
-+  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
-+else
-+  if test -n "$x_includes"; then
-+    X_CFLAGS="$X_CFLAGS -I$x_includes"
-+  fi
-+
-+  # It would also be nice to do this for all -L options, not just this one.
-+  if test -n "$x_libraries"; then
-+    X_LIBS="$X_LIBS -L$x_libraries"
-+    # For Solaris; some versions of Sun CC require a space after -R and
-+    # others require no space.  Words are not sufficient . . . .
-+    case "`(uname -sr) 2>/dev/null`" in
-+    "SunOS 5"*)
-+      echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
-+echo "configure:5940: checking whether -R must be followed by a space" >&5
-+      ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
-+      cat > conftest.$ac_ext <<EOF
-+#line 5943 "configure"
-+#include "confdefs.h"
-+
-+int main() {
-+
-+; return 0; }
-+EOF
-+if { (eval echo configure:5950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+  rm -rf conftest*
-+  ac_R_nospace=yes
-+else
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  ac_R_nospace=no
-+fi
-+rm -f conftest*
-+      if test $ac_R_nospace = yes; then
-+	echo "$ac_t""no" 1>&6
-+	X_LIBS="$X_LIBS -R$x_libraries"
-+      else
-+	LIBS="$ac_xsave_LIBS -R $x_libraries"
-+	cat > conftest.$ac_ext <<EOF
-+#line 5966 "configure"
-+#include "confdefs.h"
-+
-+int main() {
-+
-+; return 0; }
-+EOF
-+if { (eval echo configure:5973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+  rm -rf conftest*
-+  ac_R_space=yes
-+else
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  ac_R_space=no
-+fi
-+rm -f conftest*
-+	if test $ac_R_space = yes; then
-+	  echo "$ac_t""yes" 1>&6
-+	  X_LIBS="$X_LIBS -R $x_libraries"
-+	else
-+	  echo "$ac_t""neither works" 1>&6
-+	fi
-+      fi
-+      LIBS="$ac_xsave_LIBS"
-+    esac
-+  fi
-+
-+  # Check for system-dependent libraries X programs must link with.
-+  # Do this before checking for the system-independent R6 libraries
-+  # (-lICE), since we may need -lsocket or whatever for X linking.
-+
-+  if test "$ISC" = yes; then
-+    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
-+  else
-+    # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
-+    # libraries were built with DECnet support.  And karl@cs.umb.edu says
-+    # the Alpha needs dnet_stub (dnet does not exist).
-+    echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
-+echo "configure:6005: checking for dnet_ntoa in -ldnet" >&5
-+ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
-+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
-+else
-+  ac_save_LIBS="$LIBS"
-+LIBS="-ldnet  $LIBS"
-+cat > conftest.$ac_ext <<EOF
-+#line 6013 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error.  */
- /* We use char because int might match the return type of a gcc2
-     builtin and then its argument prototype would still apply.  */
--char remove();
-+char dnet_ntoa();
- 
- int main() {
--remove()
-+dnet_ntoa()
- ; return 0; }
- EOF
--if { (eval echo configure:5660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:6024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   eval "ac_cv_lib_$ac_lib_var=yes"
- else
-@@ -5671,84 +6035,130 @@
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-   echo "$ac_t""yes" 1>&6
--  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
-+  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
-+else
-+  echo "$ac_t""no" 1>&6
-+fi
-+
-+    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
-+      echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
-+echo "configure:6046: checking for dnet_ntoa in -ldnet_stub" >&5
-+ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
-+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
-+else
-+  ac_save_LIBS="$LIBS"
-+LIBS="-ldnet_stub  $LIBS"
-+cat > conftest.$ac_ext <<EOF
-+#line 6054 "configure"
-+#include "confdefs.h"
-+/* Override any gcc2 internal prototype to avoid an error.  */
-+/* We use char because int might match the return type of a gcc2
-+    builtin and then its argument prototype would still apply.  */
-+char dnet_ntoa();
-+
-+int main() {
-+dnet_ntoa()
-+; return 0; }
-+EOF
-+if { (eval echo configure:6065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+  rm -rf conftest*
-+  eval "ac_cv_lib_$ac_lib_var=yes"
-+else
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  eval "ac_cv_lib_$ac_lib_var=no"
-+fi
-+rm -f conftest*
-+LIBS="$ac_save_LIBS"
-+
-+fi
-+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-+  echo "$ac_t""yes" 1>&6
-+  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
- else
-   echo "$ac_t""no" 1>&6
- fi
- 
-     fi
- 
--    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
--    echo $ac_n "checking for shmat""... $ac_c" 1>&6
--echo "configure:5684: checking for shmat" >&5
--if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
-+    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
-+    # to get the SysV transport functions.
-+    # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
-+    # needs -lnsl.
-+    # The nsl library prevents programs from opening the X display
-+    # on Irix 5.2, according to dickey@clark.net.
-+    echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-+echo "configure:6094: checking for gethostbyname" >&5
-+if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   cat > conftest.$ac_ext <<EOF
--#line 5689 "configure"
-+#line 6099 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
--    which can conflict with char shmat(); below.  */
-+    which can conflict with char gethostbyname(); below.  */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error.  */
- /* We use char because int might match the return type of a gcc2
-     builtin and then its argument prototype would still apply.  */
--char shmat();
-+char gethostbyname();
- 
- int main() {
- 
- /* The GNU C library defines this for functions which it implements
-     to always fail with ENOSYS.  Some functions are actually named
-     something starting with __ and the normal name is an alias.  */
--#if defined (__stub_shmat) || defined (__stub___shmat)
-+#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
- choke me
- #else
--shmat();
-+gethostbyname();
- #endif
- 
- ; return 0; }
- EOF
--if { (eval echo configure:5712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:6122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
--  eval "ac_cv_func_shmat=yes"
-+  eval "ac_cv_func_gethostbyname=yes"
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  eval "ac_cv_func_shmat=no"
-+  eval "ac_cv_func_gethostbyname=no"
- fi
- rm -f conftest*
- fi
- 
--if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
-+if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
-   echo "$ac_t""yes" 1>&6
-   :
- else
-   echo "$ac_t""no" 1>&6
- fi
- 
--    if test $ac_cv_func_shmat = no; then
--      echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
--echo "configure:5733: checking for shmat in -lipc" >&5
--ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
-+    if test $ac_cv_func_gethostbyname = no; then
-+      echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-+echo "configure:6143: checking for gethostbyname in -lnsl" >&5
-+ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   ac_save_LIBS="$LIBS"
--LIBS="-lipc  $LIBS"
-+LIBS="-lnsl  $LIBS"
- cat > conftest.$ac_ext <<EOF
--#line 5741 "configure"
-+#line 6151 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error.  */
- /* We use char because int might match the return type of a gcc2
-     builtin and then its argument prototype would still apply.  */
--char shmat();
-+char gethostbyname();
- 
- int main() {
--shmat()
-+gethostbyname()
- ; return 0; }
- EOF
--if { (eval echo configure:5752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:6162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   eval "ac_cv_lib_$ac_lib_var=yes"
- else
-@@ -5763,269 +6173,182 @@
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-   echo "$ac_t""yes" 1>&6
--  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
-+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
- else
-   echo "$ac_t""no" 1>&6
- fi
- 
-     fi
--  fi
- 
--  # Check for libraries that X11R6 Xt/Xaw programs need.
--  ac_save_LDFLAGS="$LDFLAGS"
--  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
--  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
--  # check for ICE first), but we must link in the order -lSM -lICE or
--  # we get undefined symbols.  So assume we have SM if we have ICE.
--  # These have to be linked with before -lX11, unlike the other
--  # libraries we check for below, so use a different variable.
--  #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
--  echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
--echo "configure:5785: checking for IceConnectionNumber in -lICE" >&5
--ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
--if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-+    # lieder@skyler.mavd.honeywell.com says without -lsocket,
-+    # socket/setsockopt and other routines are undefined under SCO ODT
-+    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
-+    # on later versions), says simon@lia.di.epfl.ch: it contains
-+    # gethostby* variants that don't use the nameserver (or something).
-+    # -lsocket must be given before -lnsl if both are needed.
-+    # We assume that if connect needs -lnsl, so does gethostbyname.
-+    echo $ac_n "checking for connect""... $ac_c" 1>&6
-+echo "configure:6192: checking for connect" >&5
-+if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
--  ac_save_LIBS="$LIBS"
--LIBS="-lICE $X_EXTRA_LIBS $LIBS"
--cat > conftest.$ac_ext <<EOF
--#line 5793 "configure"
-+  cat > conftest.$ac_ext <<EOF
-+#line 6197 "configure"
- #include "confdefs.h"
-+/* System header to define __stub macros and hopefully few prototypes,
-+    which can conflict with char connect(); below.  */
-+#include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error.  */
- /* We use char because int might match the return type of a gcc2
-     builtin and then its argument prototype would still apply.  */
--char IceConnectionNumber();
-+char connect();
- 
- int main() {
--IceConnectionNumber()
-+
-+/* The GNU C library defines this for functions which it implements
-+    to always fail with ENOSYS.  Some functions are actually named
-+    something starting with __ and the normal name is an alias.  */
-+#if defined (__stub_connect) || defined (__stub___connect)
-+choke me
-+#else
-+connect();
-+#endif
-+
- ; return 0; }
- EOF
--if { (eval echo configure:5804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:6220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
--  eval "ac_cv_lib_$ac_lib_var=yes"
-+  eval "ac_cv_func_connect=yes"
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  eval "ac_cv_lib_$ac_lib_var=no"
-+  eval "ac_cv_func_connect=no"
- fi
- rm -f conftest*
--LIBS="$ac_save_LIBS"
--
- fi
--if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-+
-+if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
-   echo "$ac_t""yes" 1>&6
--  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
-+  :
- else
-   echo "$ac_t""no" 1>&6
- fi
- 
--  LDFLAGS="$ac_save_LDFLAGS"
--
--fi
--
--
--
--
--
--# SYSTEM_NAME=`echo "$cf_cv_system_name"|tr ' ' -`
--
--cf_have_X_LIBS=no
--
--LDFLAGS="$X_LIBS $LDFLAGS"
--
--test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
--
--echo "${as_me-configure}:5840: testing checking additions to CFLAGS ..." 1>&5
--
--
--cf_check_cflags="$CFLAGS"
--cf_check_cppflags="$CPPFLAGS"
--
--cf_fix_cppflags=no
--cf_new_cflags=
--cf_new_cppflags=
--cf_new_extra_cppflags=
--
--for cf_add_cflags in $X_CFLAGS
--do
--case $cf_fix_cppflags in
--no)
--	case $cf_add_cflags in #(vi
--	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
--		case $cf_add_cflags in
--		-D*)
--			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
--
--			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
--			&& test -z "${cf_tst_cflags}" \
--			&& cf_fix_cppflags=yes
--
--			if test $cf_fix_cppflags = yes ; then
--				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
--				continue
--			elif test "${cf_tst_cflags}" = "\"'" ; then
--				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
--				continue
--			fi
--			;;
--		esac
--		case "$CPPFLAGS" in
--		*$cf_add_cflags) #(vi
--			;;
--		*) #(vi
--			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
--			;;
--		esac
--		;;
--	*)
--		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
--		;;
--	esac
--	;;
--yes)
--	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
--
--	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
--
--	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
--	&& test -z "${cf_tst_cflags}" \
--	&& cf_fix_cppflags=no
--	;;
--esac
--done
--
--if test -n "$cf_new_cflags" ; then
--	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
--
--echo "${as_me-configure}:5902: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
--
--
--	CFLAGS="$CFLAGS $cf_new_cflags"
--fi
--
--if test -n "$cf_new_cppflags" ; then
--	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
--
--echo "${as_me-configure}:5911: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
--
--
--	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
--fi
--
--if test -n "$cf_new_extra_cppflags" ; then
--	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
--
--echo "${as_me-configure}:5920: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
--
--
--	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
--fi
--
--
--
--
--if test "$cf_check_cflags" != "$CFLAGS" ; then
-+    if test $ac_cv_func_connect = no; then
-+      echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-+echo "configure:6241: checking for connect in -lsocket" >&5
-+ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
-+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
-+else
-+  ac_save_LIBS="$LIBS"
-+LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
- cat > conftest.$ac_ext <<EOF
--#line 5931 "configure"
-+#line 6249 "configure"
- #include "confdefs.h"
--#include <stdio.h>
-+/* Override any gcc2 internal prototype to avoid an error.  */
-+/* We use char because int might match the return type of a gcc2
-+    builtin and then its argument prototype would still apply.  */
-+char connect();
-+
- int main() {
--printf("Hello world");
-+connect()
- ; return 0; }
- EOF
--if { (eval echo configure:5938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
--  :
-+if { (eval echo configure:6260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+  rm -rf conftest*
-+  eval "ac_cv_lib_$ac_lib_var=yes"
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
--
--echo "${as_me-configure}:5946: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
--
--
--	 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
--		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
--
--echo "${as_me-configure}:5952: testing but keeping change to \$CPPFLAGS ..." 1>&5
--
--
--	 fi
--	 CFLAGS="$cf_check_flags"
-+  eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
-+LIBS="$ac_save_LIBS"
-+
-+fi
-+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-+  echo "$ac_t""yes" 1>&6
-+  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
-+else
-+  echo "$ac_t""no" 1>&6
- fi
- 
-+    fi
- 
--echo $ac_n "checking for XOpenDisplay""... $ac_c" 1>&6
--echo "configure:5963: checking for XOpenDisplay" >&5
--if eval "test \"`echo '$''{'ac_cv_func_XOpenDisplay'+set}'`\" = set"; then
-+    # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
-+    echo $ac_n "checking for remove""... $ac_c" 1>&6
-+echo "configure:6284: checking for remove" >&5
-+if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   cat > conftest.$ac_ext <<EOF
--#line 5968 "configure"
-+#line 6289 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
--    which can conflict with char XOpenDisplay(); below.  */
-+    which can conflict with char remove(); below.  */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error.  */
- /* We use char because int might match the return type of a gcc2
-     builtin and then its argument prototype would still apply.  */
--char XOpenDisplay();
-+char remove();
- 
- int main() {
- 
- /* The GNU C library defines this for functions which it implements
-     to always fail with ENOSYS.  Some functions are actually named
-     something starting with __ and the normal name is an alias.  */
--#if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
-+#if defined (__stub_remove) || defined (__stub___remove)
- choke me
- #else
--XOpenDisplay();
-+remove();
- #endif
- 
- ; return 0; }
- EOF
--if { (eval echo configure:5991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:6312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
--  eval "ac_cv_func_XOpenDisplay=yes"
-+  eval "ac_cv_func_remove=yes"
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  eval "ac_cv_func_XOpenDisplay=no"
-+  eval "ac_cv_func_remove=no"
- fi
- rm -f conftest*
- fi
- 
--if eval "test \"`echo '$ac_cv_func_'XOpenDisplay`\" = yes"; then
-+if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
-   echo "$ac_t""yes" 1>&6
-   :
- else
-   echo "$ac_t""no" 1>&6
-+fi
- 
--echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
--echo "configure:6010: checking for XOpenDisplay in -lX11" >&5
--ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
-+    if test $ac_cv_func_remove = no; then
-+      echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-+echo "configure:6333: checking for remove in -lposix" >&5
-+ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   ac_save_LIBS="$LIBS"
--LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
-+LIBS="-lposix  $LIBS"
- cat > conftest.$ac_ext <<EOF
--#line 6018 "configure"
-+#line 6341 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error.  */
- /* We use char because int might match the return type of a gcc2
-     builtin and then its argument prototype would still apply.  */
--char XOpenDisplay();
-+char remove();
- 
- int main() {
--XOpenDisplay()
-+remove()
- ; return 0; }
- EOF
--if { (eval echo configure:6029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:6352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   eval "ac_cv_lib_$ac_lib_var=yes"
- else
-@@ -6040,82 +6363,84 @@
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-   echo "$ac_t""yes" 1>&6
--  LIBS="-lX11 $LIBS"
-+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
- else
-   echo "$ac_t""no" 1>&6
- fi
- 
--fi
--
-+    fi
- 
--echo $ac_n "checking for XtAppInitialize""... $ac_c" 1>&6
--echo "configure:6053: checking for XtAppInitialize" >&5
--if eval "test \"`echo '$''{'ac_cv_func_XtAppInitialize'+set}'`\" = set"; then
-+    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
-+    echo $ac_n "checking for shmat""... $ac_c" 1>&6
-+echo "configure:6376: checking for shmat" >&5
-+if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   cat > conftest.$ac_ext <<EOF
--#line 6058 "configure"
-+#line 6381 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
--    which can conflict with char XtAppInitialize(); below.  */
-+    which can conflict with char shmat(); below.  */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error.  */
- /* We use char because int might match the return type of a gcc2
-     builtin and then its argument prototype would still apply.  */
--char XtAppInitialize();
-+char shmat();
- 
- int main() {
- 
- /* The GNU C library defines this for functions which it implements
-     to always fail with ENOSYS.  Some functions are actually named
-     something starting with __ and the normal name is an alias.  */
--#if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
-+#if defined (__stub_shmat) || defined (__stub___shmat)
- choke me
- #else
--XtAppInitialize();
-+shmat();
- #endif
- 
- ; return 0; }
- EOF
--if { (eval echo configure:6081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:6404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
--  eval "ac_cv_func_XtAppInitialize=yes"
-+  eval "ac_cv_func_shmat=yes"
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  eval "ac_cv_func_XtAppInitialize=no"
-+  eval "ac_cv_func_shmat=no"
- fi
- rm -f conftest*
- fi
- 
--if eval "test \"`echo '$ac_cv_func_'XtAppInitialize`\" = yes"; then
-+if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
-   echo "$ac_t""yes" 1>&6
-   :
- else
-   echo "$ac_t""no" 1>&6
-+fi
- 
--echo $ac_n "checking for XtAppInitialize in -lXt""... $ac_c" 1>&6
--echo "configure:6100: checking for XtAppInitialize in -lXt" >&5
--ac_lib_var=`echo Xt'_'XtAppInitialize | sed 'y%./+-%__p_%'`
-+    if test $ac_cv_func_shmat = no; then
-+      echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-+echo "configure:6425: checking for shmat in -lipc" >&5
-+ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   ac_save_LIBS="$LIBS"
--LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
-+LIBS="-lipc  $LIBS"
- cat > conftest.$ac_ext <<EOF
--#line 6108 "configure"
-+#line 6433 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error.  */
- /* We use char because int might match the return type of a gcc2
-     builtin and then its argument prototype would still apply.  */
--char XtAppInitialize();
-+char shmat();
- 
- int main() {
--XtAppInitialize()
-+shmat()
- ; return 0; }
- EOF
--if { (eval echo configure:6119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:6444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   eval "ac_cv_lib_$ac_lib_var=yes"
- else
-@@ -6130,100 +6455,44 @@
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-   echo "$ac_t""yes" 1>&6
--  cat >> confdefs.h <<\EOF
--#define HAVE_LIBXT 1
--EOF
--
--	 cf_have_X_LIBS=Xt
--	 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
-+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
- else
-   echo "$ac_t""no" 1>&6
- fi
- 
--fi
-+    fi
-+  fi
- 
--
--if test $cf_have_X_LIBS = no ; then
--	echo "configure: warning: Unable to successfully link X Toolkit library (-lXt) with
--test program.  You will have to check and add the proper libraries by hand
--to makefile." 1>&2
--fi
--
--
--cf_x_athena=${cf_x_athena-Xaw}
--
--echo $ac_n "checking if you want to link with Xaw 3d library""... $ac_c" 1>&6
--echo "configure:6157: checking if you want to link with Xaw 3d library" >&5
--withval=
--
--# Check whether --with-Xaw3d or --without-Xaw3d was given.
--if test "${with_Xaw3d+set}" = set; then
--  withval="$with_Xaw3d"
--  :
--fi
--
--if test "$withval" = yes ; then
--	cf_x_athena=Xaw3d
--	echo "$ac_t""yes" 1>&6
--else
--	echo "$ac_t""no" 1>&6
--fi
--
--echo $ac_n "checking if you want to link with neXT Athena library""... $ac_c" 1>&6
--echo "configure:6174: checking if you want to link with neXT Athena library" >&5
--withval=
--
--# Check whether --with-neXtaw or --without-neXtaw was given.
--if test "${with_neXtaw+set}" = set; then
--  withval="$with_neXtaw"
--  :
--fi
--
--if test "$withval" = yes ; then
--	cf_x_athena=neXtaw
--	echo "$ac_t""yes" 1>&6
--else
--	echo "$ac_t""no" 1>&6
--fi
--
--echo $ac_n "checking if you want to link with Athena-Plus library""... $ac_c" 1>&6
--echo "configure:6191: checking if you want to link with Athena-Plus library" >&5
--withval=
--
--# Check whether --with-XawPlus or --without-XawPlus was given.
--if test "${with_XawPlus+set}" = set; then
--  withval="$with_XawPlus"
--  :
--fi
--
--if test "$withval" = yes ; then
--	cf_x_athena=XawPlus
--	echo "$ac_t""yes" 1>&6
--else
--	echo "$ac_t""no" 1>&6
--fi
--
--echo $ac_n "checking for XextCreateExtension in -lXext""... $ac_c" 1>&6
--echo "configure:6208: checking for XextCreateExtension in -lXext" >&5
--ac_lib_var=`echo Xext'_'XextCreateExtension | sed 'y%./+-%__p_%'`
--if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
--  echo $ac_n "(cached) $ac_c" 1>&6
--else
--  ac_save_LIBS="$LIBS"
--LIBS="-lXext  $LIBS"
--cat > conftest.$ac_ext <<EOF
--#line 6216 "configure"
--#include "confdefs.h"
--/* Override any gcc2 internal prototype to avoid an error.  */
--/* We use char because int might match the return type of a gcc2
--    builtin and then its argument prototype would still apply.  */
--char XextCreateExtension();
-+  # Check for libraries that X11R6 Xt/Xaw programs need.
-+  ac_save_LDFLAGS="$LDFLAGS"
-+  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
-+  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
-+  # check for ICE first), but we must link in the order -lSM -lICE or
-+  # we get undefined symbols.  So assume we have SM if we have ICE.
-+  # These have to be linked with before -lX11, unlike the other
-+  # libraries we check for below, so use a different variable.
-+  #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
-+  echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
-+echo "configure:6477: checking for IceConnectionNumber in -lICE" >&5
-+ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
-+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
-+else
-+  ac_save_LIBS="$LIBS"
-+LIBS="-lICE $X_EXTRA_LIBS $LIBS"
-+cat > conftest.$ac_ext <<EOF
-+#line 6485 "configure"
-+#include "confdefs.h"
-+/* Override any gcc2 internal prototype to avoid an error.  */
-+/* We use char because int might match the return type of a gcc2
-+    builtin and then its argument prototype would still apply.  */
-+char IceConnectionNumber();
- 
- int main() {
--XextCreateExtension()
-+IceConnectionNumber()
- ; return 0; }
- EOF
--if { (eval echo configure:6227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:6496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   eval "ac_cv_lib_$ac_lib_var=yes"
- else
-@@ -6238,198 +6507,28 @@
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-   echo "$ac_t""yes" 1>&6
--  LIBS="-lXext $LIBS"
-+  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
- else
-   echo "$ac_t""no" 1>&6
- fi
- 
-+  LDFLAGS="$ac_save_LDFLAGS"
- 
--cf_x_athena_lib=""
--
--
--cf_x_athena_root=$cf_x_athena
--cf_x_athena_include=""
--
--for cf_path in default \
--	/usr/contrib/X11R6 \
--	/usr/contrib/X11R5 \
--	/usr/lib/X11R5 \
--	/usr/local
--do
--	if test -z "$cf_x_athena_include" ; then
--		cf_save="$CPPFLAGS"
--		cf_test=X11/$cf_x_athena_root/SimpleMenu.h
--		if test $cf_path != default ; then
--			CPPFLAGS="-I$cf_path/include $cf_save"
--			echo $ac_n "checking for $cf_test in $cf_path""... $ac_c" 1>&6
--echo "configure:6266: checking for $cf_test in $cf_path" >&5
--		else
--			echo $ac_n "checking for $cf_test""... $ac_c" 1>&6
--echo "configure:6269: checking for $cf_test" >&5
--		fi
--		cat > conftest.$ac_ext <<EOF
--#line 6272 "configure"
--#include "confdefs.h"
--
--#include <X11/Intrinsic.h>
--#include <$cf_test>
--int main() {
--
--; return 0; }
--EOF
--if { (eval echo configure:6281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
--  rm -rf conftest*
--  cf_result=yes
--else
--  echo "configure: failed program was:" >&5
--  cat conftest.$ac_ext >&5
--  rm -rf conftest*
--  cf_result=no
--fi
--rm -f conftest*
--		echo "$ac_t""$cf_result" 1>&6
--		if test "$cf_result" = yes ; then
--			cf_x_athena_include=$cf_path
--			break
--		else
--			CPPFLAGS="$cf_save"
--		fi
--	fi
--done
--
--if test -z "$cf_x_athena_include" ; then
--	echo "configure: warning: Unable to successfully find Athena header files with test program" 1>&2
--elif test "$cf_x_athena_include" != default ; then
--	CPPFLAGS="$CPPFLAGS -I$cf_x_athena_include"
--fi
--
--
--cf_x_athena_root=$cf_x_athena
--cf_x_athena_lib=""
--
--for cf_path in default \
--	/usr/contrib/X11R6 \
--	/usr/contrib/X11R5 \
--	/usr/lib/X11R5 \
--	/usr/local
--do
--	for cf_lib in \
--		"-l$cf_x_athena_root -lXmu" \
--		"-l$cf_x_athena_root -lXpm -lXmu" \
--		"-l${cf_x_athena_root}_s -lXmu_s"
--	do
--		if test -z "$cf_x_athena_lib" ; then
--			cf_save="$LIBS"
--			cf_test=XawSimpleMenuAddGlobalActions
--			if test $cf_path != default ; then
--				LIBS="-L$cf_path/lib $cf_lib $LIBS"
--				echo $ac_n "checking for $cf_lib in $cf_path""... $ac_c" 1>&6
--echo "configure:6328: checking for $cf_lib in $cf_path" >&5
--			else
--				LIBS="$cf_lib $LIBS"
--				echo $ac_n "checking for $cf_test in $cf_lib""... $ac_c" 1>&6
--echo "configure:6332: checking for $cf_test in $cf_lib" >&5
--			fi
--			cat > conftest.$ac_ext <<EOF
--#line 6335 "configure"
--#include "confdefs.h"
--
--int main() {
--$cf_test()
--; return 0; }
--EOF
--if { (eval echo configure:6342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
--  rm -rf conftest*
--  cf_result=yes
--else
--  echo "configure: failed program was:" >&5
--  cat conftest.$ac_ext >&5
--  rm -rf conftest*
--  cf_result=no
--fi
--rm -f conftest*
--			echo "$ac_t""$cf_result" 1>&6
--			if test "$cf_result" = yes ; then
--				cf_x_athena_lib="$cf_lib"
--				break
--			fi
--			LIBS="$cf_save"
--		fi
--	done
--done
--
--if test -z "$cf_x_athena_lib" ; then
--	{ echo "configure: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" 1>&2; exit 1; }
--fi
--
--
--cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
--
--cat >> confdefs.h <<EOF
--#define $cf_x_athena_LIBS 1
--EOF
--
--
--
--
--
--
--for ac_prog in xcurses-config
--do
--# Extract the first word of "$ac_prog", so it can be a program name with args.
--set dummy $ac_prog; ac_word=$2
--echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:6383: checking for $ac_word" >&5
--if eval "test \"`echo '$''{'ac_cv_path_XCURSES_CONFIG'+set}'`\" = set"; then
--  echo $ac_n "(cached) $ac_c" 1>&6
--else
--  case "$XCURSES_CONFIG" in
--  /*)
--  ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a path.
--  ;;
--  ?:/*)			 
--  ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a dos path.
--  ;;
--  *)
--  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
--  ac_dummy="$PATH"
--  for ac_dir in $ac_dummy; do 
--    test -z "$ac_dir" && ac_dir=.
--    if test -f $ac_dir/$ac_word; then
--      ac_cv_path_XCURSES_CONFIG="$ac_dir/$ac_word"
--      break
--    fi
--  done
--  IFS="$ac_save_ifs"
--  ;;
--esac
--fi
--XCURSES_CONFIG="$ac_cv_path_XCURSES_CONFIG"
--if test -n "$XCURSES_CONFIG"; then
--  echo "$ac_t""$XCURSES_CONFIG" 1>&6
--else
--  echo "$ac_t""no" 1>&6
- fi
- 
--test -n "$XCURSES_CONFIG" && break
--done
--test -n "$XCURSES_CONFIG" || XCURSES_CONFIG="none"
- 
- 
--if test "$XCURSES_CONFIG" != none ; then
- 
--CPPFLAGS="`$XCURSES_CONFIG --cflags` $CPPFLAGS"
--LIBS="`$XCURSES_CONFIG --libs` $LIBS"
- 
--cf_cv_lib_XCurses=yes
-+# SYSTEM_NAME=`echo "$cf_cv_system_name"|tr ' ' -`
- 
--else
-+cf_have_X_LIBS=no
- 
--LDFLAGS="$LDFLAGS $X_LIBS"
-+LDFLAGS="$X_LIBS $LDFLAGS"
- 
- test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
- 
--echo "${as_me-configure}:6433: testing checking additions to CFLAGS ..." 1>&5
-+echo "${as_me-configure}:6532: testing checking additions to CFLAGS ..." 1>&5
- 
- 
- cf_check_cflags="$CFLAGS"
-@@ -6491,7 +6590,7 @@
- if test -n "$cf_new_cflags" ; then
- 	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
- 
--echo "${as_me-configure}:6495: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
-+echo "${as_me-configure}:6594: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
- 
- 
- 	CFLAGS="$CFLAGS $cf_new_cflags"
-@@ -6500,1148 +6599,2291 @@
- if test -n "$cf_new_cppflags" ; then
- 	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
- 
--echo "${as_me-configure}:6504: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
-+echo "${as_me-configure}:6603: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
-+
-+
-+	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
-+fi
-+
-+if test -n "$cf_new_extra_cppflags" ; then
-+	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
-+
-+echo "${as_me-configure}:6612: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
-+
-+
-+	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
-+fi
-+
-+
- 
- 
--	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
-+if test "$cf_check_cflags" != "$CFLAGS" ; then
-+cat > conftest.$ac_ext <<EOF
-+#line 6623 "configure"
-+#include "confdefs.h"
-+#include <stdio.h>
-+int main() {
-+printf("Hello world");
-+; return 0; }
-+EOF
-+if { (eval echo configure:6630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+  :
-+else
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
-+
-+echo "${as_me-configure}:6638: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
-+
-+
-+	 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
-+		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
-+
-+echo "${as_me-configure}:6644: testing but keeping change to \$CPPFLAGS ..." 1>&5
-+
-+
-+	 fi
-+	 CFLAGS="$cf_check_flags"
-+fi
-+rm -f conftest*
-+fi
-+
-+
-+echo $ac_n "checking for XOpenDisplay""... $ac_c" 1>&6
-+echo "configure:6655: checking for XOpenDisplay" >&5
-+if eval "test \"`echo '$''{'ac_cv_func_XOpenDisplay'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
-+else
-+  cat > conftest.$ac_ext <<EOF
-+#line 6660 "configure"
-+#include "confdefs.h"
-+/* System header to define __stub macros and hopefully few prototypes,
-+    which can conflict with char XOpenDisplay(); below.  */
-+#include <assert.h>
-+/* Override any gcc2 internal prototype to avoid an error.  */
-+/* We use char because int might match the return type of a gcc2
-+    builtin and then its argument prototype would still apply.  */
-+char XOpenDisplay();
-+
-+int main() {
-+
-+/* The GNU C library defines this for functions which it implements
-+    to always fail with ENOSYS.  Some functions are actually named
-+    something starting with __ and the normal name is an alias.  */
-+#if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
-+choke me
-+#else
-+XOpenDisplay();
-+#endif
-+
-+; return 0; }
-+EOF
-+if { (eval echo configure:6683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+  rm -rf conftest*
-+  eval "ac_cv_func_XOpenDisplay=yes"
-+else
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  eval "ac_cv_func_XOpenDisplay=no"
-+fi
-+rm -f conftest*
-+fi
-+
-+if eval "test \"`echo '$ac_cv_func_'XOpenDisplay`\" = yes"; then
-+  echo "$ac_t""yes" 1>&6
-+  :
-+else
-+  echo "$ac_t""no" 1>&6
-+
-+echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
-+echo "configure:6702: checking for XOpenDisplay in -lX11" >&5
-+ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
-+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
-+else
-+  ac_save_LIBS="$LIBS"
-+LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
-+cat > conftest.$ac_ext <<EOF
-+#line 6710 "configure"
-+#include "confdefs.h"
-+/* Override any gcc2 internal prototype to avoid an error.  */
-+/* We use char because int might match the return type of a gcc2
-+    builtin and then its argument prototype would still apply.  */
-+char XOpenDisplay();
-+
-+int main() {
-+XOpenDisplay()
-+; return 0; }
-+EOF
-+if { (eval echo configure:6721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+  rm -rf conftest*
-+  eval "ac_cv_lib_$ac_lib_var=yes"
-+else
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  eval "ac_cv_lib_$ac_lib_var=no"
-+fi
-+rm -f conftest*
-+LIBS="$ac_save_LIBS"
-+
-+fi
-+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-+  echo "$ac_t""yes" 1>&6
-+  LIBS="-lX11 $LIBS"
-+else
-+  echo "$ac_t""no" 1>&6
-+fi
-+
-+fi
-+
-+
-+echo $ac_n "checking for XtAppInitialize""... $ac_c" 1>&6
-+echo "configure:6745: checking for XtAppInitialize" >&5
-+if eval "test \"`echo '$''{'ac_cv_func_XtAppInitialize'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
-+else
-+  cat > conftest.$ac_ext <<EOF
-+#line 6750 "configure"
-+#include "confdefs.h"
-+/* System header to define __stub macros and hopefully few prototypes,
-+    which can conflict with char XtAppInitialize(); below.  */
-+#include <assert.h>
-+/* Override any gcc2 internal prototype to avoid an error.  */
-+/* We use char because int might match the return type of a gcc2
-+    builtin and then its argument prototype would still apply.  */
-+char XtAppInitialize();
-+
-+int main() {
-+
-+/* The GNU C library defines this for functions which it implements
-+    to always fail with ENOSYS.  Some functions are actually named
-+    something starting with __ and the normal name is an alias.  */
-+#if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
-+choke me
-+#else
-+XtAppInitialize();
-+#endif
-+
-+; return 0; }
-+EOF
-+if { (eval echo configure:6773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+  rm -rf conftest*
-+  eval "ac_cv_func_XtAppInitialize=yes"
-+else
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  eval "ac_cv_func_XtAppInitialize=no"
-+fi
-+rm -f conftest*
-+fi
-+
-+if eval "test \"`echo '$ac_cv_func_'XtAppInitialize`\" = yes"; then
-+  echo "$ac_t""yes" 1>&6
-+  :
-+else
-+  echo "$ac_t""no" 1>&6
-+
-+echo $ac_n "checking for XtAppInitialize in -lXt""... $ac_c" 1>&6
-+echo "configure:6792: checking for XtAppInitialize in -lXt" >&5
-+ac_lib_var=`echo Xt'_'XtAppInitialize | sed 'y%./+-%__p_%'`
-+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
-+else
-+  ac_save_LIBS="$LIBS"
-+LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
-+cat > conftest.$ac_ext <<EOF
-+#line 6800 "configure"
-+#include "confdefs.h"
-+/* Override any gcc2 internal prototype to avoid an error.  */
-+/* We use char because int might match the return type of a gcc2
-+    builtin and then its argument prototype would still apply.  */
-+char XtAppInitialize();
-+
-+int main() {
-+XtAppInitialize()
-+; return 0; }
-+EOF
-+if { (eval echo configure:6811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+  rm -rf conftest*
-+  eval "ac_cv_lib_$ac_lib_var=yes"
-+else
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  eval "ac_cv_lib_$ac_lib_var=no"
-+fi
-+rm -f conftest*
-+LIBS="$ac_save_LIBS"
-+
-+fi
-+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-+  echo "$ac_t""yes" 1>&6
-+  cat >> confdefs.h <<\EOF
-+#define HAVE_LIBXT 1
-+EOF
-+
-+	 cf_have_X_LIBS=Xt
-+	 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
-+else
-+  echo "$ac_t""no" 1>&6
-+fi
-+
-+fi
-+
-+
-+if test $cf_have_X_LIBS = no ; then
-+	echo "configure: warning: Unable to successfully link X Toolkit library (-lXt) with
-+test program.  You will have to check and add the proper libraries by hand
-+to makefile." 1>&2
-+fi
-+
-+
-+cf_x_athena=${cf_x_athena-Xaw}
-+
-+echo $ac_n "checking if you want to link with Xaw 3d library""... $ac_c" 1>&6
-+echo "configure:6849: checking if you want to link with Xaw 3d library" >&5
-+withval=
-+
-+# Check whether --with-Xaw3d or --without-Xaw3d was given.
-+if test "${with_Xaw3d+set}" = set; then
-+  withval="$with_Xaw3d"
-+  :
-+fi
-+
-+if test "$withval" = yes ; then
-+	cf_x_athena=Xaw3d
-+	echo "$ac_t""yes" 1>&6
-+else
-+	echo "$ac_t""no" 1>&6
-+fi
-+
-+echo $ac_n "checking if you want to link with neXT Athena library""... $ac_c" 1>&6
-+echo "configure:6866: checking if you want to link with neXT Athena library" >&5
-+withval=
-+
-+# Check whether --with-neXtaw or --without-neXtaw was given.
-+if test "${with_neXtaw+set}" = set; then
-+  withval="$with_neXtaw"
-+  :
-+fi
-+
-+if test "$withval" = yes ; then
-+	cf_x_athena=neXtaw
-+	echo "$ac_t""yes" 1>&6
-+else
-+	echo "$ac_t""no" 1>&6
-+fi
-+
-+echo $ac_n "checking if you want to link with Athena-Plus library""... $ac_c" 1>&6
-+echo "configure:6883: checking if you want to link with Athena-Plus library" >&5
-+withval=
-+
-+# Check whether --with-XawPlus or --without-XawPlus was given.
-+if test "${with_XawPlus+set}" = set; then
-+  withval="$with_XawPlus"
-+  :
-+fi
-+
-+if test "$withval" = yes ; then
-+	cf_x_athena=XawPlus
-+	echo "$ac_t""yes" 1>&6
-+else
-+	echo "$ac_t""no" 1>&6
-+fi
-+
-+echo $ac_n "checking for XextCreateExtension in -lXext""... $ac_c" 1>&6
-+echo "configure:6900: checking for XextCreateExtension in -lXext" >&5
-+ac_lib_var=`echo Xext'_'XextCreateExtension | sed 'y%./+-%__p_%'`
-+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
-+else
-+  ac_save_LIBS="$LIBS"
-+LIBS="-lXext  $LIBS"
-+cat > conftest.$ac_ext <<EOF
-+#line 6908 "configure"
-+#include "confdefs.h"
-+/* Override any gcc2 internal prototype to avoid an error.  */
-+/* We use char because int might match the return type of a gcc2
-+    builtin and then its argument prototype would still apply.  */
-+char XextCreateExtension();
-+
-+int main() {
-+XextCreateExtension()
-+; return 0; }
-+EOF
-+if { (eval echo configure:6919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+  rm -rf conftest*
-+  eval "ac_cv_lib_$ac_lib_var=yes"
-+else
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  eval "ac_cv_lib_$ac_lib_var=no"
-+fi
-+rm -f conftest*
-+LIBS="$ac_save_LIBS"
-+
-+fi
-+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-+  echo "$ac_t""yes" 1>&6
-+  LIBS="-lXext $LIBS"
-+else
-+  echo "$ac_t""no" 1>&6
-+fi
-+
-+
-+cf_x_athena_lib=""
-+
-+
-+cf_x_athena_root=$cf_x_athena
-+cf_x_athena_include=""
-+
-+for cf_path in default \
-+	/usr/contrib/X11R6 \
-+	/usr/contrib/X11R5 \
-+	/usr/lib/X11R5 \
-+	/usr/local
-+do
-+	if test -z "$cf_x_athena_include" ; then
-+		cf_save="$CPPFLAGS"
-+		cf_test=X11/$cf_x_athena_root/SimpleMenu.h
-+		if test $cf_path != default ; then
-+			CPPFLAGS="$cf_save -I$cf_path/include"
-+			echo $ac_n "checking for $cf_test in $cf_path""... $ac_c" 1>&6
-+echo "configure:6958: checking for $cf_test in $cf_path" >&5
-+		else
-+			echo $ac_n "checking for $cf_test""... $ac_c" 1>&6
-+echo "configure:6961: checking for $cf_test" >&5
-+		fi
-+		cat > conftest.$ac_ext <<EOF
-+#line 6964 "configure"
-+#include "confdefs.h"
-+
-+#include <X11/Intrinsic.h>
-+#include <$cf_test>
-+int main() {
-+
-+; return 0; }
-+EOF
-+if { (eval echo configure:6973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+  rm -rf conftest*
-+  cf_result=yes
-+else
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  cf_result=no
-+fi
-+rm -f conftest*
-+		echo "$ac_t""$cf_result" 1>&6
-+		if test "$cf_result" = yes ; then
-+			cf_x_athena_include=$cf_path
-+			break
-+		else
-+			CPPFLAGS="$cf_save"
-+		fi
-+	fi
-+done
-+
-+if test -z "$cf_x_athena_include" ; then
-+	echo "configure: warning: Unable to successfully find Athena header files with test program" 1>&2
-+elif test "$cf_x_athena_include" != default ; then
-+	CPPFLAGS="$CPPFLAGS -I$cf_x_athena_include"
-+fi
-+
-+
-+cf_x_athena_root=$cf_x_athena
-+cf_x_athena_lib=""
-+
-+for cf_path in default \
-+	/usr/contrib/X11R6 \
-+	/usr/contrib/X11R5 \
-+	/usr/lib/X11R5 \
-+	/usr/local
-+do
-+	for cf_lib in \
-+		"-l$cf_x_athena_root -lXmu" \
-+		"-l$cf_x_athena_root -lXpm -lXmu" \
-+		"-l${cf_x_athena_root}_s -lXmu_s"
-+	do
-+		if test -z "$cf_x_athena_lib" ; then
-+			cf_save="$LIBS"
-+			cf_test=XawSimpleMenuAddGlobalActions
-+			if test $cf_path != default ; then
-+				LIBS="-L$cf_path/lib $cf_lib $LIBS"
-+				echo $ac_n "checking for $cf_lib in $cf_path""... $ac_c" 1>&6
-+echo "configure:7020: checking for $cf_lib in $cf_path" >&5
-+			else
-+				LIBS="$cf_lib $LIBS"
-+				echo $ac_n "checking for $cf_test in $cf_lib""... $ac_c" 1>&6
-+echo "configure:7024: checking for $cf_test in $cf_lib" >&5
-+			fi
-+			cat > conftest.$ac_ext <<EOF
-+#line 7027 "configure"
-+#include "confdefs.h"
-+
-+int main() {
-+$cf_test()
-+; return 0; }
-+EOF
-+if { (eval echo configure:7034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+  rm -rf conftest*
-+  cf_result=yes
-+else
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  cf_result=no
-+fi
-+rm -f conftest*
-+			echo "$ac_t""$cf_result" 1>&6
-+			if test "$cf_result" = yes ; then
-+				cf_x_athena_lib="$cf_lib"
-+				break
-+			fi
-+			LIBS="$cf_save"
-+		fi
-+	done
-+done
-+
-+if test -z "$cf_x_athena_lib" ; then
-+	{ echo "configure: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" 1>&2; exit 1; }
-+fi
-+
-+
-+cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
-+
-+cat >> confdefs.h <<EOF
-+#define $cf_x_athena_LIBS 1
-+EOF
-+
-+
-+
-+
-+
-+
-+for ac_prog in xcurses-config
-+do
-+# Extract the first word of "$ac_prog", so it can be a program name with args.
-+set dummy $ac_prog; ac_word=$2
-+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-+echo "configure:7075: checking for $ac_word" >&5
-+if eval "test \"`echo '$''{'ac_cv_path_XCURSES_CONFIG'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
-+else
-+  case "$XCURSES_CONFIG" in
-+  /*)
-+  ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a path.
-+  ;;
-+  ?:/*)			 
-+  ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a dos path.
-+  ;;
-+  *)
-+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-+  ac_dummy="$PATH"
-+  for ac_dir in $ac_dummy; do 
-+    test -z "$ac_dir" && ac_dir=.
-+    if test -f $ac_dir/$ac_word; then
-+      ac_cv_path_XCURSES_CONFIG="$ac_dir/$ac_word"
-+      break
-+    fi
-+  done
-+  IFS="$ac_save_ifs"
-+  ;;
-+esac
-+fi
-+XCURSES_CONFIG="$ac_cv_path_XCURSES_CONFIG"
-+if test -n "$XCURSES_CONFIG"; then
-+  echo "$ac_t""$XCURSES_CONFIG" 1>&6
-+else
-+  echo "$ac_t""no" 1>&6
-+fi
-+
-+test -n "$XCURSES_CONFIG" && break
-+done
-+test -n "$XCURSES_CONFIG" || XCURSES_CONFIG="none"
-+
-+
-+if test "$XCURSES_CONFIG" != none ; then
-+
-+CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
-+LIBS="`$XCURSES_CONFIG --libs` $LIBS"
-+
-+cf_cv_lib_XCurses=yes
-+
-+else
-+
-+LDFLAGS="$LDFLAGS $X_LIBS"
-+
-+test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
-+
-+echo "${as_me-configure}:7125: testing checking additions to CFLAGS ..." 1>&5
-+
-+
-+cf_check_cflags="$CFLAGS"
-+cf_check_cppflags="$CPPFLAGS"
-+
-+cf_fix_cppflags=no
-+cf_new_cflags=
-+cf_new_cppflags=
-+cf_new_extra_cppflags=
-+
-+for cf_add_cflags in $X_CFLAGS
-+do
-+case $cf_fix_cppflags in
-+no)
-+	case $cf_add_cflags in #(vi
-+	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
-+		case $cf_add_cflags in
-+		-D*)
-+			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
-+
-+			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
-+			&& test -z "${cf_tst_cflags}" \
-+			&& cf_fix_cppflags=yes
-+
-+			if test $cf_fix_cppflags = yes ; then
-+				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
-+				continue
-+			elif test "${cf_tst_cflags}" = "\"'" ; then
-+				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
-+				continue
-+			fi
-+			;;
-+		esac
-+		case "$CPPFLAGS" in
-+		*$cf_add_cflags) #(vi
-+			;;
-+		*) #(vi
-+			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
-+			;;
-+		esac
-+		;;
-+	*)
-+		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
-+		;;
-+	esac
-+	;;
-+yes)
-+	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
-+
-+	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
-+
-+	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
-+	&& test -z "${cf_tst_cflags}" \
-+	&& cf_fix_cppflags=no
-+	;;
-+esac
-+done
-+
-+if test -n "$cf_new_cflags" ; then
-+	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
-+
-+echo "${as_me-configure}:7187: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
-+
-+
-+	CFLAGS="$CFLAGS $cf_new_cflags"
-+fi
-+
-+if test -n "$cf_new_cppflags" ; then
-+	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
-+
-+echo "${as_me-configure}:7196: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
-+
-+
-+	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
-+fi
-+
-+if test -n "$cf_new_extra_cppflags" ; then
-+	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
-+
-+echo "${as_me-configure}:7205: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
-+
-+
-+	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
-+fi
-+
-+
-+
-+
-+if test "$cf_check_cflags" != "$CFLAGS" ; then
-+cat > conftest.$ac_ext <<EOF
-+#line 7216 "configure"
-+#include "confdefs.h"
-+#include <stdio.h>
-+int main() {
-+printf("Hello world");
-+; return 0; }
-+EOF
-+if { (eval echo configure:7223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+  :
-+else
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
-+
-+echo "${as_me-configure}:7231: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
-+
-+
-+	 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
-+		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
-+
-+echo "${as_me-configure}:7237: testing but keeping change to \$CPPFLAGS ..." 1>&5
-+
-+
-+	 fi
-+	 CFLAGS="$cf_check_flags"
-+fi
-+rm -f conftest*
-+fi
-+
-+echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
-+echo "configure:7247: checking for XOpenDisplay in -lX11" >&5
-+ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
-+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
-+else
-+  ac_save_LIBS="$LIBS"
-+LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
-+cat > conftest.$ac_ext <<EOF
-+#line 7255 "configure"
-+#include "confdefs.h"
-+/* Override any gcc2 internal prototype to avoid an error.  */
-+/* We use char because int might match the return type of a gcc2
-+    builtin and then its argument prototype would still apply.  */
-+char XOpenDisplay();
-+
-+int main() {
-+XOpenDisplay()
-+; return 0; }
-+EOF
-+if { (eval echo configure:7266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+  rm -rf conftest*
-+  eval "ac_cv_lib_$ac_lib_var=yes"
-+else
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  eval "ac_cv_lib_$ac_lib_var=no"
-+fi
-+rm -f conftest*
-+LIBS="$ac_save_LIBS"
-+
-+fi
-+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-+  echo "$ac_t""yes" 1>&6
-+  LIBS="-lX11 $LIBS"
-+else
-+  echo "$ac_t""no" 1>&6
-+fi
-+
-+echo $ac_n "checking for XCurses library""... $ac_c" 1>&6
-+echo "configure:7287: checking for XCurses library" >&5
-+if eval "test \"`echo '$''{'cf_cv_lib_XCurses'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
-+else
-+  
-+LIBS="-lXCurses $LIBS"
-+cat > conftest.$ac_ext <<EOF
-+#line 7294 "configure"
-+#include "confdefs.h"
-+
-+#include <xcurses.h>
-+char *XCursesProgramName = "test";
-+
-+int main() {
-+XCursesExit();
-+; return 0; }
-+EOF
-+if { (eval echo configure:7304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+  rm -rf conftest*
-+  cf_cv_lib_XCurses=yes
-+else
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  cf_cv_lib_XCurses=no
-+fi
-+rm -f conftest*
-+
-+fi
-+
-+echo "$ac_t""$cf_cv_lib_XCurses" 1>&6
-+
-+fi
-+
-+if test $cf_cv_lib_XCurses = yes ; then
-+	cat >> confdefs.h <<\EOF
-+#define UNIX 1
-+EOF
-+
-+	cat >> confdefs.h <<\EOF
-+#define XCURSES 1
-+EOF
-+
-+	cat >> confdefs.h <<\EOF
-+#define HAVE_XCURSES 1
-+EOF
-+
-+else
-+	{ echo "configure: error: Cannot link with XCurses" 1>&2; exit 1; }
-+fi
-+
-+	;;
-+esac
-+
-+
-+
-+case $cf_cv_screen in #(vi
-+pdcurses) #(vi
-+	;;
-+*)
-+	# look for curses-related libraries
-+	echo $ac_n "checking for new_panel in -lpanel$cf_cv_libtype""... $ac_c" 1>&6
-+echo "configure:7349: checking for new_panel in -lpanel$cf_cv_libtype" >&5
-+ac_lib_var=`echo panel$cf_cv_libtype'_'new_panel | sed 'y%./+-%__p_%'`
-+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
-+else
-+  ac_save_LIBS="$LIBS"
-+LIBS="-lpanel$cf_cv_libtype  $LIBS"
-+cat > conftest.$ac_ext <<EOF
-+#line 7357 "configure"
-+#include "confdefs.h"
-+/* Override any gcc2 internal prototype to avoid an error.  */
-+/* We use char because int might match the return type of a gcc2
-+    builtin and then its argument prototype would still apply.  */
-+char new_panel();
-+
-+int main() {
-+new_panel()
-+; return 0; }
-+EOF
-+if { (eval echo configure:7368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+  rm -rf conftest*
-+  eval "ac_cv_lib_$ac_lib_var=yes"
-+else
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  eval "ac_cv_lib_$ac_lib_var=no"
-+fi
-+rm -f conftest*
-+LIBS="$ac_save_LIBS"
-+
-+fi
-+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-+  echo "$ac_t""yes" 1>&6
-+    ac_tr_lib=HAVE_LIB`echo panel$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-+  cat >> confdefs.h <<EOF
-+#define $ac_tr_lib 1
-+EOF
-+
-+  LIBS="-lpanel$cf_cv_libtype $LIBS"
-+
-+else
-+  echo "$ac_t""no" 1>&6
-+fi
-+
-+	echo $ac_n "checking for menu_driver in -lmenu$cf_cv_libtype""... $ac_c" 1>&6
-+echo "configure:7396: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
-+ac_lib_var=`echo menu$cf_cv_libtype'_'menu_driver | sed 'y%./+-%__p_%'`
-+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
-+else
-+  ac_save_LIBS="$LIBS"
-+LIBS="-lmenu$cf_cv_libtype  $LIBS"
-+cat > conftest.$ac_ext <<EOF
-+#line 7404 "configure"
-+#include "confdefs.h"
-+/* Override any gcc2 internal prototype to avoid an error.  */
-+/* We use char because int might match the return type of a gcc2
-+    builtin and then its argument prototype would still apply.  */
-+char menu_driver();
-+
-+int main() {
-+menu_driver()
-+; return 0; }
-+EOF
-+if { (eval echo configure:7415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+  rm -rf conftest*
-+  eval "ac_cv_lib_$ac_lib_var=yes"
-+else
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  eval "ac_cv_lib_$ac_lib_var=no"
-+fi
-+rm -f conftest*
-+LIBS="$ac_save_LIBS"
-+
-+fi
-+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-+  echo "$ac_t""yes" 1>&6
-+    ac_tr_lib=HAVE_LIB`echo menu$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-+  cat >> confdefs.h <<EOF
-+#define $ac_tr_lib 1
-+EOF
-+
-+  LIBS="-lmenu$cf_cv_libtype $LIBS"
-+
-+else
-+  echo "$ac_t""no" 1>&6
-+fi
-+
-+	echo $ac_n "checking for form_driver in -lform$cf_cv_libtype""... $ac_c" 1>&6
-+echo "configure:7443: checking for form_driver in -lform$cf_cv_libtype" >&5
-+ac_lib_var=`echo form$cf_cv_libtype'_'form_driver | sed 'y%./+-%__p_%'`
-+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
-+else
-+  ac_save_LIBS="$LIBS"
-+LIBS="-lform$cf_cv_libtype  $LIBS"
-+cat > conftest.$ac_ext <<EOF
-+#line 7451 "configure"
-+#include "confdefs.h"
-+/* Override any gcc2 internal prototype to avoid an error.  */
-+/* We use char because int might match the return type of a gcc2
-+    builtin and then its argument prototype would still apply.  */
-+char form_driver();
-+
-+int main() {
-+form_driver()
-+; return 0; }
-+EOF
-+if { (eval echo configure:7462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+  rm -rf conftest*
-+  eval "ac_cv_lib_$ac_lib_var=yes"
-+else
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  eval "ac_cv_lib_$ac_lib_var=no"
-+fi
-+rm -f conftest*
-+LIBS="$ac_save_LIBS"
-+
-+fi
-+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-+  echo "$ac_t""yes" 1>&6
-+    ac_tr_lib=HAVE_LIB`echo form$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-+  cat >> confdefs.h <<EOF
-+#define $ac_tr_lib 1
-+EOF
-+
-+  LIBS="-lform$cf_cv_libtype $LIBS"
-+
-+else
-+  echo "$ac_t""no" 1>&6
-+fi
-+
-+
-+	# look for curses-related headers
-+	for ac_hdr in \
-+		nc_alloc.h \
-+		nomacros.h \
-+		form.h \
-+		menu.h \
-+		panel.h \
-+		
-+do
-+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-+echo "configure:7501: checking for $ac_hdr" >&5
-+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
-+else
-+  cat > conftest.$ac_ext <<EOF
-+#line 7506 "configure"
-+#include "confdefs.h"
-+#include <$ac_hdr>
-+EOF
-+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-+{ (eval echo configure:7511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-+if test -z "$ac_err"; then
-+  rm -rf conftest*
-+  eval "ac_cv_header_$ac_safe=yes"
-+else
-+  echo "$ac_err" >&5
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  eval "ac_cv_header_$ac_safe=no"
-+fi
-+rm -f conftest*
-+fi
-+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-+  echo "$ac_t""yes" 1>&6
-+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-+  cat >> confdefs.h <<EOF
-+#define $ac_tr_hdr 1
-+EOF
-+ 
-+else
-+  echo "$ac_t""no" 1>&6
-+fi
-+done
-+
-+	;;
-+esac
-+
-+echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-+echo "configure:7541: checking return type of signal handlers" >&5
-+if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
-+else
-+  cat > conftest.$ac_ext <<EOF
-+#line 7546 "configure"
-+#include "confdefs.h"
-+#include <sys/types.h>
-+#include <signal.h>
-+#ifdef signal
-+#undef signal
-+#endif
-+#ifdef __cplusplus
-+extern "C" void (*signal (int, void (*)(int)))(int);
-+#else
-+void (*signal ()) ();
-+#endif
-+
-+int main() {
-+int i;
-+; return 0; }
-+EOF
-+if { (eval echo configure:7563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+  rm -rf conftest*
-+  ac_cv_type_signal=void
-+else
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  ac_cv_type_signal=int
-+fi
-+rm -f conftest*
-+fi
-+
-+echo "$ac_t""$ac_cv_type_signal" 1>&6
-+cat >> confdefs.h <<EOF
-+#define RETSIGTYPE $ac_cv_type_signal
-+EOF
-+
-+
-+
-+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-+echo "configure:7583: checking for ANSI C header files" >&5
-+if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
-+else
-+  cat > conftest.$ac_ext <<EOF
-+#line 7588 "configure"
-+#include "confdefs.h"
-+#include <stdlib.h>
-+#include <stdarg.h>
-+#include <string.h>
-+#include <float.h>
-+EOF
-+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-+{ (eval echo configure:7596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-+if test -z "$ac_err"; then
-+  rm -rf conftest*
-+  ac_cv_header_stdc=yes
-+else
-+  echo "$ac_err" >&5
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  ac_cv_header_stdc=no
-+fi
-+rm -f conftest*
-+
-+if test $ac_cv_header_stdc = yes; then
-+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-+cat > conftest.$ac_ext <<EOF
-+#line 7613 "configure"
-+#include "confdefs.h"
-+#include <string.h>
-+EOF
-+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-+  egrep "memchr" >/dev/null 2>&1; then
-+  :
-+else
-+  rm -rf conftest*
-+  ac_cv_header_stdc=no
-+fi
-+rm -f conftest*
-+
-+fi
-+
-+if test $ac_cv_header_stdc = yes; then
-+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-+cat > conftest.$ac_ext <<EOF
-+#line 7631 "configure"
-+#include "confdefs.h"
-+#include <stdlib.h>
-+EOF
-+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-+  egrep "free" >/dev/null 2>&1; then
-+  :
-+else
-+  rm -rf conftest*
-+  ac_cv_header_stdc=no
- fi
-+rm -f conftest*
- 
--if test -n "$cf_new_extra_cppflags" ; then
--	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
--
--echo "${as_me-configure}:6513: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
-+fi
- 
-+if test $ac_cv_header_stdc = yes; then
-+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-+if test "$cross_compiling" = yes; then
-+  :
-+else
-+  cat > conftest.$ac_ext <<EOF
-+#line 7652 "configure"
-+#include "confdefs.h"
-+#include <ctype.h>
-+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-+int main () { int i; for (i = 0; i < 256; i++)
-+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
-+exit (0); }
- 
--	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
-+EOF
-+if { (eval echo configure:7663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-+then
-+  :
-+else
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -fr conftest*
-+  ac_cv_header_stdc=no
-+fi
-+rm -fr conftest*
- fi
- 
-+fi
-+fi
- 
-+echo "$ac_t""$ac_cv_header_stdc" 1>&6
-+if test $ac_cv_header_stdc = yes; then
-+  cat >> confdefs.h <<\EOF
-+#define STDC_HEADERS 1
-+EOF
- 
-+fi
- 
--if test "$cf_check_cflags" != "$CFLAGS" ; then
--cat > conftest.$ac_ext <<EOF
--#line 6524 "configure"
-+echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-+echo "configure:7687: checking whether time.h and sys/time.h may both be included" >&5
-+if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
-+else
-+  cat > conftest.$ac_ext <<EOF
-+#line 7692 "configure"
- #include "confdefs.h"
--#include <stdio.h>
-+#include <sys/types.h>
-+#include <sys/time.h>
-+#include <time.h>
- int main() {
--printf("Hello world");
-+struct tm *tp;
- ; return 0; }
- EOF
--if { (eval echo configure:6531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
--  :
-+if { (eval echo configure:7701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+  rm -rf conftest*
-+  ac_cv_header_time=yes
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
--
--echo "${as_me-configure}:6539: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
--
--
--	 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
--		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
--
--echo "${as_me-configure}:6545: testing but keeping change to \$CPPFLAGS ..." 1>&5
--
--
--	 fi
--	 CFLAGS="$cf_check_flags"
-+  ac_cv_header_time=no
- fi
- rm -f conftest*
- fi
- 
--echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
--echo "configure:6555: checking for XOpenDisplay in -lX11" >&5
--ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
--if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-+echo "$ac_t""$ac_cv_header_time" 1>&6
-+if test $ac_cv_header_time = yes; then
-+  cat >> confdefs.h <<\EOF
-+#define TIME_WITH_SYS_TIME 1
-+EOF
-+
-+fi
-+
-+for ac_hdr in \
-+getopt.h \
-+locale.h \
-+stdarg.h \
-+sys/ioctl.h \
-+sys/select.h \
-+sys/time.h \
-+termios.h \
-+unistd.h \
-+
-+do
-+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-+echo "configure:7734: checking for $ac_hdr" >&5
-+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
--  ac_save_LIBS="$LIBS"
--LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
--cat > conftest.$ac_ext <<EOF
--#line 6563 "configure"
-+  cat > conftest.$ac_ext <<EOF
-+#line 7739 "configure"
- #include "confdefs.h"
--/* Override any gcc2 internal prototype to avoid an error.  */
--/* We use char because int might match the return type of a gcc2
--    builtin and then its argument prototype would still apply.  */
--char XOpenDisplay();
--
--int main() {
--XOpenDisplay()
--; return 0; }
-+#include <$ac_hdr>
- EOF
--if { (eval echo configure:6574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-+{ (eval echo configure:7744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-+if test -z "$ac_err"; then
-   rm -rf conftest*
--  eval "ac_cv_lib_$ac_lib_var=yes"
-+  eval "ac_cv_header_$ac_safe=yes"
- else
-+  echo "$ac_err" >&5
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  eval "ac_cv_lib_$ac_lib_var=no"
-+  eval "ac_cv_header_$ac_safe=no"
- fi
- rm -f conftest*
--LIBS="$ac_save_LIBS"
--
- fi
--if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-   echo "$ac_t""yes" 1>&6
--  LIBS="-lX11 $LIBS"
-+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-+  cat >> confdefs.h <<EOF
-+#define $ac_tr_hdr 1
-+EOF
-+ 
- else
-   echo "$ac_t""no" 1>&6
- fi
-+done
- 
--echo $ac_n "checking for XCurses library""... $ac_c" 1>&6
--echo "configure:6595: checking for XCurses library" >&5
--if eval "test \"`echo '$''{'cf_cv_lib_XCurses'+set}'`\" = set"; then
-+
-+for ac_func in \
-+gettimeofday \
-+mblen \
-+mbrlen \
-+mbrtowc \
-+mbsrtowcs \
-+mbstowcs \
-+mbtowc \
-+strdup \
-+wcsrtombs \
-+wcstombs \
-+
-+do
-+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-+echo "configure:7785: checking for $ac_func" >&5
-+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
--  
--LIBS="-lXCurses $LIBS"
--cat > conftest.$ac_ext <<EOF
--#line 6602 "configure"
-+  cat > conftest.$ac_ext <<EOF
-+#line 7790 "configure"
- #include "confdefs.h"
--
--#include <xcurses.h>
--char *XCursesProgramName = "test";
-+/* System header to define __stub macros and hopefully few prototypes,
-+    which can conflict with char $ac_func(); below.  */
-+#include <assert.h>
-+/* Override any gcc2 internal prototype to avoid an error.  */
-+/* We use char because int might match the return type of a gcc2
-+    builtin and then its argument prototype would still apply.  */
-+char $ac_func();
- 
- int main() {
--XCursesExit();
-+
-+/* The GNU C library defines this for functions which it implements
-+    to always fail with ENOSYS.  Some functions are actually named
-+    something starting with __ and the normal name is an alias.  */
-+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-+choke me
-+#else
-+$ac_func();
-+#endif
-+
- ; return 0; }
- EOF
--if { (eval echo configure:6612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:7813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
--  cf_cv_lib_XCurses=yes
-+  eval "ac_cv_func_$ac_func=yes"
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  cf_cv_lib_XCurses=no
-+  eval "ac_cv_func_$ac_func=no"
- fi
- rm -f conftest*
--
--fi
--
--echo "$ac_t""$cf_cv_lib_XCurses" 1>&6
--
- fi
- 
--if test $cf_cv_lib_XCurses = yes ; then
--	cat >> confdefs.h <<\EOF
--#define UNIX 1
--EOF
--
--	cat >> confdefs.h <<\EOF
--#define XCURSES 1
--EOF
--
--	cat >> confdefs.h <<\EOF
--#define HAVE_XCURSES 1
-+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-+  echo "$ac_t""yes" 1>&6
-+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-+  cat >> confdefs.h <<EOF
-+#define $ac_tr_func 1
- EOF
--
-+ 
- else
--	{ echo "configure: error: Cannot link with XCurses" 1>&2; exit 1; }
-+  echo "$ac_t""no" 1>&6
- fi
--
--	;;
--esac
-+done
- 
- 
- 
--case $cf_cv_screen in #(vi
--pdcurses) #(vi
--	;;
--*)
--	# look for curses-related libraries
--	echo $ac_n "checking for new_panel in -lpanel$cf_cv_libtype""... $ac_c" 1>&6
--echo "configure:6657: checking for new_panel in -lpanel$cf_cv_libtype" >&5
--ac_lib_var=`echo panel$cf_cv_libtype'_'new_panel | sed 'y%./+-%__p_%'`
--if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-+echo $ac_n "checking if we must define _XOPEN_SOURCE_EXTENDED""... $ac_c" 1>&6
-+echo "configure:7840: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
-+if eval "test \"`echo '$''{'cf_cv_need_xopen_extension'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
--  ac_save_LIBS="$LIBS"
--LIBS="-lpanel$cf_cv_libtype  $LIBS"
-+  
- cat > conftest.$ac_ext <<EOF
--#line 6665 "configure"
-+#line 7846 "configure"
- #include "confdefs.h"
--/* Override any gcc2 internal prototype to avoid an error.  */
--/* We use char because int might match the return type of a gcc2
--    builtin and then its argument prototype would still apply.  */
--char new_panel();
- 
-+#include <stdlib.h>
-+#include <${cf_cv_ncurses_header-curses.h}>
- int main() {
--new_panel()
-+
-+	long x = winnstr(stdscr, "", 0);
-+	int x1, y1;
-+	getbegyx(stdscr, y1, x1)
- ; return 0; }
- EOF
--if { (eval echo configure:6676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:7858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
--  eval "ac_cv_lib_$ac_lib_var=yes"
-+  cf_cv_need_xopen_extension=no
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  eval "ac_cv_lib_$ac_lib_var=no"
--fi
--rm -f conftest*
--LIBS="$ac_save_LIBS"
-+  cat > conftest.$ac_ext <<EOF
-+#line 7866 "configure"
-+#include "confdefs.h"
- 
--fi
--if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
--  echo "$ac_t""yes" 1>&6
--    ac_tr_lib=HAVE_LIB`echo panel$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
--    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
--  cat >> confdefs.h <<EOF
--#define $ac_tr_lib 1
-+#define _XOPEN_SOURCE_EXTENDED
-+#include <stdlib.h>
-+#include <${cf_cv_ncurses_header-curses.h}>
-+int main() {
-+
-+	long x = winnstr(stdscr, "", 0);
-+	int x1, y1;
-+	getbegyx(stdscr, y1, x1)
-+; return 0; }
- EOF
-+if { (eval echo configure:7879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+  rm -rf conftest*
-+  cf_cv_need_xopen_extension=yes
-+else
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  cf_cv_need_xopen_extension=unknown
-+fi
-+rm -f conftest*
-+fi
-+rm -f conftest*
-+fi
- 
--  LIBS="-lpanel$cf_cv_libtype $LIBS"
-+echo "$ac_t""$cf_cv_need_xopen_extension" 1>&6
-+test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
- 
--else
--  echo "$ac_t""no" 1>&6
--fi
- 
--	echo $ac_n "checking for menu_driver in -lmenu$cf_cv_libtype""... $ac_c" 1>&6
--echo "configure:6704: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
--ac_lib_var=`echo menu$cf_cv_libtype'_'menu_driver | sed 'y%./+-%__p_%'`
--if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-+echo $ac_n "checking for term.h""... $ac_c" 1>&6
-+echo "configure:7898: checking for term.h" >&5
-+if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
--  ac_save_LIBS="$LIBS"
--LIBS="-lmenu$cf_cv_libtype  $LIBS"
--cat > conftest.$ac_ext <<EOF
--#line 6712 "configure"
-+  
-+
-+# If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
-+# for <term.h> if we do not find the variant.
-+for cf_header in \
-+	`echo ${cf_cv_ncurses_header-curses.h} | sed -e 's%/.*%/%'`term.h \
-+	term.h
-+do
-+	cat > conftest.$ac_ext <<EOF
-+#line 7911 "configure"
- #include "confdefs.h"
--/* Override any gcc2 internal prototype to avoid an error.  */
--/* We use char because int might match the return type of a gcc2
--    builtin and then its argument prototype would still apply.  */
--char menu_driver();
- 
-+#include <${cf_cv_ncurses_header-curses.h}>
-+#include <${cf_header}>
- int main() {
--menu_driver()
-+WINDOW *x
- ; return 0; }
- EOF
--if { (eval echo configure:6723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:7920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
--  eval "ac_cv_lib_$ac_lib_var=yes"
-+  cf_cv_term_header=$cf_header
-+	 break
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  eval "ac_cv_lib_$ac_lib_var=no"
-+  cf_cv_term_header=no
- fi
- rm -f conftest*
--LIBS="$ac_save_LIBS"
-+done
- 
- fi
--if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
--  echo "$ac_t""yes" 1>&6
--    ac_tr_lib=HAVE_LIB`echo menu$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
--    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
--  cat >> confdefs.h <<EOF
--#define $ac_tr_lib 1
-+
-+echo "$ac_t""$cf_cv_term_header" 1>&6
-+
-+case $cf_cv_term_header in #(vi
-+term.h) #(vi
-+	cat >> confdefs.h <<\EOF
-+#define HAVE_TERM_H 1
- EOF
- 
--  LIBS="-lmenu$cf_cv_libtype $LIBS"
-+	;;
-+ncurses/term.h)
-+	cat >> confdefs.h <<\EOF
-+#define HAVE_NCURSES_TERM_H 1
-+EOF
- 
--else
--  echo "$ac_t""no" 1>&6
--fi
-+	;;
-+ncursesw/term.h)
-+	cat >> confdefs.h <<\EOF
-+#define HAVE_NCURSESW_TERM_H 1
-+EOF
- 
--	echo $ac_n "checking for form_driver in -lform$cf_cv_libtype""... $ac_c" 1>&6
--echo "configure:6751: checking for form_driver in -lform$cf_cv_libtype" >&5
--ac_lib_var=`echo form$cf_cv_libtype'_'form_driver | sed 'y%./+-%__p_%'`
--if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-+	;;
-+esac
-+
-+
-+
-+
-+for cf_func in \
-+chgat \
-+color_set \
-+filter \
-+getbegx \
-+getcurx \
-+getmaxx \
-+getnstr \
-+getparx \
-+getwin \
-+mvvline \
-+mvwvline \
-+napms \
-+putwin \
-+resize_term \
-+resizeterm \
-+ripoffline \
-+setupterm \
-+slk_color \
-+slk_init \
-+termattrs \
-+tgetent \
-+tigetnum \
-+tigetstr \
-+typeahead \
-+use_default_colors \
-+vw_printw \
-+vsscanf \
-+wchgat \
-+winsstr \
-+wresize \
-+
-+do
-+	
-+cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
-+
-+	echo $ac_n "checking for ${cf_func}""... $ac_c" 1>&6
-+echo "configure:7998: checking for ${cf_func}" >&5
-+	
-+echo "${as_me-configure}:8000: testing ${cf_func} ..." 1>&5
-+
-+	if eval "test \"`echo '$''{'cf_cv_func_$cf_func'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
--  ac_save_LIBS="$LIBS"
--LIBS="-lform$cf_cv_libtype  $LIBS"
--cat > conftest.$ac_ext <<EOF
--#line 6759 "configure"
-+  
-+		eval cf_result='$ac_cv_func_'$cf_func
-+		if test ".$cf_result" != ".no"; then
-+			cat > conftest.$ac_ext <<EOF
-+#line 8009 "configure"
- #include "confdefs.h"
--/* Override any gcc2 internal prototype to avoid an error.  */
--/* We use char because int might match the return type of a gcc2
--    builtin and then its argument prototype would still apply.  */
--char form_driver();
-+
-+#ifdef HAVE_XCURSES
-+#include <xcurses.h>
-+char * XCursesProgramName = "test";
-+#else
-+#include <${cf_cv_ncurses_header-curses.h}>
-+#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
-+#include <ncursesw/term.h>
-+#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
-+#include <ncurses/term.h>
-+#elif defined(HAVE_TERM_H)
-+#include <term.h>
-+#endif
-+#endif
- 
- int main() {
--form_driver()
-+
-+#ifndef ${cf_func}
-+long foo = (long)(&${cf_func});
-+${cf_cv_main_return-return}(foo == 0);
-+#endif
-+			
- ; return 0; }
- EOF
--if { (eval echo configure:6770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:8035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
--  eval "ac_cv_lib_$ac_lib_var=yes"
-+  cf_result=yes
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  eval "ac_cv_lib_$ac_lib_var=no"
-+  cf_result=no
- fi
- rm -f conftest*
--LIBS="$ac_save_LIBS"
--
-+		fi
-+		eval 'cf_cv_func_'$cf_func'=$cf_result'
-+	
- fi
--if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
--  echo "$ac_t""yes" 1>&6
--    ac_tr_lib=HAVE_LIB`echo form$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
--    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
--  cat >> confdefs.h <<EOF
--#define $ac_tr_lib 1
--EOF
- 
--  LIBS="-lform$cf_cv_libtype $LIBS"
-+	# use the computed/retrieved cache-value:
-+	eval 'cf_result=$cf_cv_func_'$cf_func
-+	echo "$ac_t""$cf_result" 1>&6
-+	if test $cf_result != no; then
-+		cat >> confdefs.h <<EOF
-+#define HAVE_${cf_tr_func} 1
-+EOF
- 
--else
--  echo "$ac_t""no" 1>&6
--fi
-+	fi
-+done
- 
- 
--	# look for curses-related headers
--	for ac_hdr in \
--		nc_alloc.h \
--		nomacros.h \
--		form.h \
--		menu.h \
--		panel.h \
--		
--do
--ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
--echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
--echo "configure:6809: checking for $ac_hdr" >&5
--if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-+echo $ac_n "checking for ncurses extended functions""... $ac_c" 1>&6
-+echo "configure:8063: checking for ncurses extended functions" >&5
-+if eval "test \"`echo '$''{'cf_cv_ncurses_ext_funcs'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
--  cat > conftest.$ac_ext <<EOF
--#line 6814 "configure"
-+  
-+cat > conftest.$ac_ext <<EOF
-+#line 8069 "configure"
- #include "confdefs.h"
--#include <$ac_hdr>
-+
-+#include <${cf_cv_ncurses_header-curses.h}>
-+int main() {
-+
-+	(void) assume_default_colors (0, 0);
-+	(void) curses_version ();
-+	(void) define_key (0, 0);
-+	(void) is_term_resized (0, 0);
-+	(void) key_defined (0);
-+	(void) keybound (0, 0);
-+	(void) keyok (0, 0);
-+	(void) resize_term (0, 0);
-+	(void) resizeterm (0, 0);
-+	(void) use_default_colors ();
-+	(void) use_extended_names (0);
-+	(void) wresize (0, 0, 0);
-+; return 0; }
- EOF
--ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
--{ (eval echo configure:6819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
--ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
--if test -z "$ac_err"; then
-+if { (eval echo configure:8089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
--  eval "ac_cv_header_$ac_safe=yes"
-+  cf_cv_ncurses_ext_funcs=yes
- else
--  echo "$ac_err" >&5
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  eval "ac_cv_header_$ac_safe=no"
-+  cf_cv_ncurses_ext_funcs=no
- fi
- rm -f conftest*
-+
- fi
--if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
--  echo "$ac_t""yes" 1>&6
--    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
--  cat >> confdefs.h <<EOF
--#define $ac_tr_hdr 1
-+
-+echo "$ac_t""$cf_cv_ncurses_ext_funcs" 1>&6
-+test "$cf_cv_ncurses_ext_funcs" != no && cat >> confdefs.h <<\EOF
-+#define NCURSES_EXT_FUNCS 1
- EOF
-- 
--else
--  echo "$ac_t""no" 1>&6
--fi
--done
- 
--	;;
--esac
- 
--echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
--echo "configure:6849: checking return type of signal handlers" >&5
--if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
-+echo $ac_n "checking for wide-character functions""... $ac_c" 1>&6
-+echo "configure:8109: checking for wide-character functions" >&5
-+if eval "test \"`echo '$''{'cf_cv_widechar_funcs'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
--  cat > conftest.$ac_ext <<EOF
--#line 6854 "configure"
--#include "confdefs.h"
--#include <sys/types.h>
--#include <signal.h>
--#ifdef signal
--#undef signal
--#endif
--#ifdef __cplusplus
--extern "C" void (*signal (int, void (*)(int)))(int);
--#else
--void (*signal ()) ();
--#endif
-+  
-+cat > conftest.$ac_ext <<EOF
-+#line 8115 "configure"
-+#include "confdefs.h"
- 
-+#include <${cf_cv_ncurses_header-curses.h}>
- int main() {
--int i;
-+
-+	static wchar_t src_wchar[2];
-+	static cchar_t dst_cchar;
-+	setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
-+	
- ; return 0; }
- EOF
--if { (eval echo configure:6871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:8127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
--  ac_cv_type_signal=void
-+  cf_cv_widechar_funcs=yes
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  ac_cv_type_signal=int
-+  cf_cv_widechar_funcs=no
- fi
- rm -f conftest*
-+
- fi
- 
--echo "$ac_t""$ac_cv_type_signal" 1>&6
--cat >> confdefs.h <<EOF
--#define RETSIGTYPE $ac_cv_type_signal
-+echo "$ac_t""$cf_cv_widechar_funcs" 1>&6
-+if test "$cf_cv_widechar_funcs" != no ; then
-+	cat >> confdefs.h <<\EOF
-+#define USE_WIDEC_SUPPORT 1
-+EOF
-+
-+else
-+	cat >> confdefs.h <<\EOF
-+#define USE_WIDEC_SUPPORT 0
- EOF
- 
-+fi
- 
- 
--echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
--echo "configure:6891: checking for ANSI C header files" >&5
--if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
-+echo $ac_n "checking if sys/time.h works with sys/select.h""... $ac_c" 1>&6
-+echo "configure:8155: checking if sys/time.h works with sys/select.h" >&5
-+if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
--  cat > conftest.$ac_ext <<EOF
--#line 6896 "configure"
-+  
-+cat > conftest.$ac_ext <<EOF
-+#line 8161 "configure"
- #include "confdefs.h"
--#include <stdlib.h>
--#include <stdarg.h>
--#include <string.h>
--#include <float.h>
-+
-+#include <sys/types.h>
-+#ifdef HAVE_SYS_TIME_H
-+#include <sys/time.h>
-+#endif
-+#ifdef HAVE_SYS_SELECT_H
-+#include <sys/select.h>
-+#endif
-+
-+int main() {
-+
-+; return 0; }
- EOF
--ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
--{ (eval echo configure:6904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
--ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
--if test -z "$ac_err"; then
-+if { (eval echo configure:8176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
--  ac_cv_header_stdc=yes
-+  cf_cv_sys_time_select=yes
- else
--  echo "$ac_err" >&5
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  ac_cv_header_stdc=no
--fi
--rm -f conftest*
--
--if test $ac_cv_header_stdc = yes; then
--  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
--cat > conftest.$ac_ext <<EOF
--#line 6921 "configure"
--#include "confdefs.h"
--#include <string.h>
--EOF
--if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
--  egrep "memchr" >/dev/null 2>&1; then
--  :
--else
--  rm -rf conftest*
--  ac_cv_header_stdc=no
-+  cf_cv_sys_time_select=no
- fi
- rm -f conftest*
--
-+     
- fi
- 
--if test $ac_cv_header_stdc = yes; then
--  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
--cat > conftest.$ac_ext <<EOF
--#line 6939 "configure"
--#include "confdefs.h"
--#include <stdlib.h>
-+echo "$ac_t""$cf_cv_sys_time_select" 1>&6
-+test "$cf_cv_sys_time_select" = yes && cat >> confdefs.h <<\EOF
-+#define HAVE_SYS_TIME_SELECT 1
- EOF
--if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
--  egrep "free" >/dev/null 2>&1; then
--  :
--else
--  rm -rf conftest*
--  ac_cv_header_stdc=no
--fi
--rm -f conftest*
- 
--fi
- 
--if test $ac_cv_header_stdc = yes; then
--  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-+
-+echo $ac_n "checking for function curses_version""... $ac_c" 1>&6
-+echo "configure:8197: checking for function curses_version" >&5
-+if eval "test \"`echo '$''{'cf_cv_func_curses_version'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
-+else
-+  
- if test "$cross_compiling" = yes; then
--  :
-+  cf_cv_func_curses_version=unknown
- else
-   cat > conftest.$ac_ext <<EOF
--#line 6960 "configure"
-+#line 8206 "configure"
- #include "confdefs.h"
--#include <ctype.h>
--#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
--#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
--#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
--int main () { int i; for (i = 0; i < 256; i++)
--if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
--exit (0); }
-+
-+#include <${cf_cv_ncurses_header-curses.h}>
-+int main()
-+{
-+	char temp[1024];
-+	sprintf(temp, "%s\n", curses_version());
-+	${cf_cv_main_return-return}(0);
-+}
- 
- EOF
--if { (eval echo configure:6971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-+if { (eval echo configure:8218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
--  :
-+  cf_cv_func_curses_version=yes
-+
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -fr conftest*
--  ac_cv_header_stdc=no
-+  cf_cv_func_curses_version=no
-+
- fi
- rm -fr conftest*
- fi
- 
--fi
-+rm -f core
- fi
- 
--echo "$ac_t""$ac_cv_header_stdc" 1>&6
--if test $ac_cv_header_stdc = yes; then
--  cat >> confdefs.h <<\EOF
--#define STDC_HEADERS 1
-+echo "$ac_t""$cf_cv_func_curses_version" 1>&6
-+test "$cf_cv_func_curses_version" = yes && cat >> confdefs.h <<\EOF
-+#define HAVE_CURSES_VERSION 1
- EOF
- 
-+
-+
-+echo $ac_n "checking for ncurses wrap-prefix""... $ac_c" 1>&6
-+echo "configure:8243: checking for ncurses wrap-prefix" >&5
-+
-+# Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
-+if test "${with_ncurses_wrap_prefix+set}" = set; then
-+  withval="$with_ncurses_wrap_prefix"
-+  NCURSES_WRAP_PREFIX=$withval
-+else
-+  NCURSES_WRAP_PREFIX=_nc_
- fi
- 
--echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
--echo "configure:6995: checking whether time.h and sys/time.h may both be included" >&5
--if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
-+echo "$ac_t""$NCURSES_WRAP_PREFIX" 1>&6
-+
-+
-+
-+
-+echo $ac_n "checking for alternate character set array""... $ac_c" 1>&6
-+echo "configure:8259: checking for alternate character set array" >&5
-+if eval "test \"`echo '$''{'cf_cv_curses_acs_map'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
--  cat > conftest.$ac_ext <<EOF
--#line 7000 "configure"
-+  
-+cf_cv_curses_acs_map=unknown
-+for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
-+do
-+cat > conftest.$ac_ext <<EOF
-+#line 8268 "configure"
- #include "confdefs.h"
--#include <sys/types.h>
--#include <sys/time.h>
--#include <time.h>
-+
-+#include <${cf_cv_ncurses_header-curses.h}>
-+
- int main() {
--struct tm *tp;
-+
-+$name['k'] = ACS_PLUS
-+
- ; return 0; }
- EOF
--if { (eval echo configure:7009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:8279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
--  ac_cv_header_time=yes
-+  cf_cv_curses_acs_map=$name; break
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
--  rm -rf conftest*
--  ac_cv_header_time=no
- fi
- rm -f conftest*
-+done
-+
- fi
- 
--echo "$ac_t""$ac_cv_header_time" 1>&6
--if test $ac_cv_header_time = yes; then
--  cat >> confdefs.h <<\EOF
--#define TIME_WITH_SYS_TIME 1
-+echo "$ac_t""$cf_cv_curses_acs_map" 1>&6
-+
-+test "$cf_cv_curses_acs_map" != unknown && cat >> confdefs.h <<EOF
-+#define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
- EOF
- 
--fi
- 
--for ac_hdr in \
--getopt.h \
--locale.h \
--stdarg.h \
--sys/ioctl.h \
--sys/select.h \
--sys/time.h \
--termios.h \
--unistd.h \
- 
--do
--ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
--echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
--echo "configure:7042: checking for $ac_hdr" >&5
--if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-+echo $ac_n "checking for wide alternate character set array""... $ac_c" 1>&6
-+echo "configure:8300: checking for wide alternate character set array" >&5
-+if eval "test \"`echo '$''{'cf_cv_curses_wacs_map'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
--  cat > conftest.$ac_ext <<EOF
--#line 7047 "configure"
-+  
-+	cf_cv_curses_wacs_map=unknown
-+	for name in wacs_map _wacs_map __wacs_map _nc_wacs
-+	do
-+	cat > conftest.$ac_ext <<EOF
-+#line 8309 "configure"
- #include "confdefs.h"
--#include <$ac_hdr>
-+
-+#ifndef _XOPEN_SOURCE_EXTENDED
-+#define _XOPEN_SOURCE_EXTENDED
-+#endif
-+#include <${cf_cv_ncurses_header-curses.h}>
-+int main() {
-+$name['k'] = *WACS_PLUS
-+; return 0; }
- EOF
--ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
--{ (eval echo configure:7052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
--ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
--if test -z "$ac_err"; then
-+if { (eval echo configure:8320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
--  eval "ac_cv_header_$ac_safe=yes"
-+  cf_cv_curses_wacs_map=$name
-+	 break
- else
--  echo "$ac_err" >&5
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
--  rm -rf conftest*
--  eval "ac_cv_header_$ac_safe=no"
- fi
- rm -f conftest*
-+	done
- fi
--if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
--  echo "$ac_t""yes" 1>&6
--    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
--  cat >> confdefs.h <<EOF
--#define $ac_tr_hdr 1
--EOF
-- 
--else
--  echo "$ac_t""no" 1>&6
--fi
--done
- 
-+echo "$ac_t""$cf_cv_curses_wacs_map" 1>&6
- 
--for ac_func in \
--gettimeofday \
--mblen \
--mbrlen \
--mbrtowc \
--mbsrtowcs \
--mbstowcs \
--mbtowc \
--strdup \
--wcsrtombs \
--wcstombs \
- 
--do
--echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
--echo "configure:7093: checking for $ac_func" >&5
--if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
--  echo $ac_n "(cached) $ac_c" 1>&6
--else
--  cat > conftest.$ac_ext <<EOF
--#line 7098 "configure"
-+
-+echo $ac_n "checking for type attr_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
-+echo "configure:8337: checking for type attr_t in ${cf_cv_ncurses_header-curses.h}" >&5
-+cat > conftest.$ac_ext <<EOF
-+#line 8339 "configure"
- #include "confdefs.h"
--/* System header to define __stub macros and hopefully few prototypes,
--    which can conflict with char $ac_func(); below.  */
--#include <assert.h>
--/* Override any gcc2 internal prototype to avoid an error.  */
--/* We use char because int might match the return type of a gcc2
--    builtin and then its argument prototype would still apply.  */
--char $ac_func();
- 
-+#ifndef _XOPEN_SOURCE_EXTENDED
-+#define _XOPEN_SOURCE_EXTENDED
-+#endif
-+#include <${cf_cv_ncurses_header-curses.h}>
- int main() {
- 
--/* The GNU C library defines this for functions which it implements
--    to always fail with ENOSYS.  Some functions are actually named
--    something starting with __ and the normal name is an alias.  */
--#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
--choke me
--#else
--$ac_func();
--#endif
-+attr_t foo
- 
- ; return 0; }
- EOF
--if { (eval echo configure:7121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:8352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
--  eval "ac_cv_func_$ac_func=yes"
-+  cf_result=yes
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  eval "ac_cv_func_$ac_func=no"
-+  cf_result=no
- fi
- rm -f conftest*
--fi
-+echo "$ac_t""$cf_result" 1>&6
-+if test $cf_result = yes ; then
-+	
-+cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
- 
--if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
--  echo "$ac_t""yes" 1>&6
--    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
--  cat >> confdefs.h <<EOF
--#define $ac_tr_func 1
-+	cat >> confdefs.h <<EOF
-+#define $cf_result 1
- EOF
-- 
-+
- else
--  echo "$ac_t""no" 1>&6
-+	cat >> confdefs.h <<EOF
-+#define attr_t long
-+EOF
-+
- fi
--done
- 
- 
- 
--echo $ac_n "checking if we must define _XOPEN_SOURCE_EXTENDED""... $ac_c" 1>&6
--echo "configure:7148: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
--if eval "test \"`echo '$''{'cf_cv_need_xopen_extension'+set}'`\" = set"; then
-+# This is needed on Tru64 5.0 to declare mbstate_t
-+echo $ac_n "checking if we must include wchar.h to declare mbstate_t""... $ac_c" 1>&6
-+echo "configure:8382: checking if we must include wchar.h to declare mbstate_t" >&5
-+if eval "test \"`echo '$''{'cf_cv_mbstate_t'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   
- cat > conftest.$ac_ext <<EOF
--#line 7154 "configure"
-+#line 8388 "configure"
- #include "confdefs.h"
- 
- #include <stdlib.h>
--#include <${cf_cv_ncurses_header-curses.h}>
-+#include <stdarg.h>
-+#include <stdio.h>
-+#ifdef HAVE_LIBUTF8_H
-+#include <libutf8.h>
-+#endif
- int main() {
--
--	long x = winnstr(stdscr, "", 0);
--	int x1, y1;
--	getbegyx(stdscr, y1, x1)
-+mbstate_t state
- ; return 0; }
- EOF
--if { (eval echo configure:7166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:8401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
--  cf_cv_need_xopen_extension=no
-+  cf_cv_mbstate_t=no
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
-   cat > conftest.$ac_ext <<EOF
--#line 7174 "configure"
-+#line 8409 "configure"
- #include "confdefs.h"
- 
--#define _XOPEN_SOURCE_EXTENDED
- #include <stdlib.h>
--#include <${cf_cv_ncurses_header-curses.h}>
-+#include <stdarg.h>
-+#include <stdio.h>
-+#include <wchar.h>
-+#ifdef HAVE_LIBUTF8_H
-+#include <libutf8.h>
-+#endif
- int main() {
--
--	long x = winnstr(stdscr, "", 0);
--	int x1, y1;
--	getbegyx(stdscr, y1, x1)
-+mbstate_t value
- ; return 0; }
- EOF
--if { (eval echo configure:7187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:8423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
--  cf_cv_need_xopen_extension=yes
-+  cf_cv_mbstate_t=yes
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  cf_cv_need_xopen_extension=unknown
-+  cf_cv_mbstate_t=unknown
- fi
- rm -f conftest*
- fi
- rm -f conftest*
- fi
- 
--echo "$ac_t""$cf_cv_need_xopen_extension" 1>&6
--test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
-+echo "$ac_t""$cf_cv_mbstate_t" 1>&6
- 
-+if test "$cf_cv_mbstate_t" = yes ; then
-+	cat >> confdefs.h <<\EOF
-+#define NEED_WCHAR_H 1
-+EOF
- 
--echo $ac_n "checking for term.h""... $ac_c" 1>&6
--echo "configure:7206: checking for term.h" >&5
--if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
-+	NEED_WCHAR_H=1
-+fi
-+
-+
-+# if we do not find mbstate_t in either place, use substitution to provide a fallback.
-+if test "$cf_cv_mbstate_t" = unknown ; then
-+	NCURSES_MBSTATE_T=1
-+fi
-+
-+
-+# if we find mbstate_t in either place, use substitution to provide a fallback.
-+if test "$cf_cv_mbstate_t" != unknown ; then
-+	NCURSES_OK_MBSTATE_T=1
-+fi
-+
-+
-+
-+# This is needed on Tru64 5.0 to declare wchar_t
-+echo $ac_n "checking if we must include wchar.h to declare wchar_t""... $ac_c" 1>&6
-+echo "configure:8463: checking if we must include wchar.h to declare wchar_t" >&5
-+if eval "test \"`echo '$''{'cf_cv_wchar_t'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   
-+cat > conftest.$ac_ext <<EOF
-+#line 8469 "configure"
-+#include "confdefs.h"
- 
--# If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
--# for <term.h> if we do not find the variant.
--for cf_header in \
--	`echo ${cf_cv_ncurses_header-curses.h} | sed -e 's%/.*%/%'`term.h \
--	term.h
--do
--	cat > conftest.$ac_ext <<EOF
--#line 7219 "configure"
-+#include <stdlib.h>
-+#include <stdarg.h>
-+#include <stdio.h>
-+#ifdef HAVE_LIBUTF8_H
-+#include <libutf8.h>
-+#endif
-+int main() {
-+wchar_t state
-+; return 0; }
-+EOF
-+if { (eval echo configure:8482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+  rm -rf conftest*
-+  cf_cv_wchar_t=no
-+else
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  cat > conftest.$ac_ext <<EOF
-+#line 8490 "configure"
- #include "confdefs.h"
- 
--#include <${cf_cv_ncurses_header-curses.h}>
--#include <${cf_header}>
-+#include <stdlib.h>
-+#include <stdarg.h>
-+#include <stdio.h>
-+#include <wchar.h>
-+#ifdef HAVE_LIBUTF8_H
-+#include <libutf8.h>
-+#endif
- int main() {
--WINDOW *x
-+wchar_t value
- ; return 0; }
- EOF
--if { (eval echo configure:7228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:8504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
--  cf_cv_term_header=$cf_header
--	 break
-+  cf_cv_wchar_t=yes
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  cf_cv_term_header=no
-+  cf_cv_wchar_t=unknown
-+fi
-+rm -f conftest*
- fi
- rm -f conftest*
--done
--
- fi
- 
--echo "$ac_t""$cf_cv_term_header" 1>&6
--
--case $cf_cv_term_header in #(vi
--term.h) #(vi
--	cat >> confdefs.h <<\EOF
--#define HAVE_TERM_H 1
--EOF
--
--	;;
--ncurses/term.h)
--	cat >> confdefs.h <<\EOF
--#define HAVE_NCURSES_TERM_H 1
--EOF
-+echo "$ac_t""$cf_cv_wchar_t" 1>&6
- 
--	;;
--ncursesw/term.h)
-+if test "$cf_cv_wchar_t" = yes ; then
- 	cat >> confdefs.h <<\EOF
--#define HAVE_NCURSESW_TERM_H 1
-+#define NEED_WCHAR_H 1
- EOF
- 
--	;;
--esac
-+	NEED_WCHAR_H=1
-+fi
- 
- 
-+# if we do not find wchar_t in either place, use substitution to provide a fallback.
-+if test "$cf_cv_wchar_t" = unknown ; then
-+	NCURSES_WCHAR_T=1
-+fi
- 
- 
--for cf_func in \
--chgat \
--color_set \
--filter \
--getbegx \
--getcurx \
--getmaxx \
--getnstr \
--getparx \
--getwin \
--mvvline \
--mvwvline \
--napms \
--putwin \
--resize_term \
--resizeterm \
--ripoffline \
--setupterm \
--slk_color \
--slk_init \
--termattrs \
--tgetent \
--tigetnum \
--tigetstr \
--typeahead \
--use_default_colors \
--vsscanf \
--wchgat \
--winsstr \
--wresize \
-+# if we find wchar_t in either place, use substitution to provide a fallback.
-+if test "$cf_cv_wchar_t" != unknown ; then
-+	NCURSES_OK_WCHAR_T=1
-+fi
- 
--do
--	
--cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
- 
--	echo $ac_n "checking for ${cf_func}""... $ac_c" 1>&6
--echo "configure:7305: checking for ${cf_func}" >&5
--	
--echo "${as_me-configure}:7307: testing ${cf_func} ..." 1>&5
- 
--	if eval "test \"`echo '$''{'cf_cv_func_$cf_func'+set}'`\" = set"; then
-+# This is needed on Tru64 5.0 to declare wint_t
-+echo $ac_n "checking if we must include wchar.h to declare wint_t""... $ac_c" 1>&6
-+echo "configure:8544: checking if we must include wchar.h to declare wint_t" >&5
-+if eval "test \"`echo '$''{'cf_cv_wint_t'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   
--		eval cf_result='$ac_cv_func_'$cf_func
--		if test ".$cf_result" != ".no"; then
--			cat > conftest.$ac_ext <<EOF
--#line 7316 "configure"
-+cat > conftest.$ac_ext <<EOF
-+#line 8550 "configure"
- #include "confdefs.h"
- 
--#ifdef HAVE_XCURSES
--#include <xcurses.h>
--char * XCursesProgramName = "test";
--#else
--#include <${cf_cv_ncurses_header-curses.h}>
--#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
--#include <ncursesw/term.h>
--#else
--#if defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
--#include <ncurses/term.h>
--#else
--#ifdef HAVE_TERM_H
--#include <term.h>
--#endif
--#endif
--#endif
-+#include <stdlib.h>
-+#include <stdarg.h>
-+#include <stdio.h>
-+#ifdef HAVE_LIBUTF8_H
-+#include <libutf8.h>
- #endif
- int main() {
-+wint_t state
-+; return 0; }
-+EOF
-+if { (eval echo configure:8563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+  rm -rf conftest*
-+  cf_cv_wint_t=no
-+else
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  cat > conftest.$ac_ext <<EOF
-+#line 8571 "configure"
-+#include "confdefs.h"
- 
--#ifndef ${cf_func}
--long foo = (long)(&${cf_func});
--${cf_cv_main_return-return}(foo == 0);
-+#include <stdlib.h>
-+#include <stdarg.h>
-+#include <stdio.h>
-+#include <wchar.h>
-+#ifdef HAVE_LIBUTF8_H
-+#include <libutf8.h>
- #endif
--			
-+int main() {
-+wint_t value
- ; return 0; }
- EOF
--if { (eval echo configure:7345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:8585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
--  cf_result=yes
-+  cf_cv_wint_t=yes
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  cf_result=no
-+  cf_cv_wint_t=unknown
-+fi
-+rm -f conftest*
- fi
- rm -f conftest*
--		fi
--		eval 'cf_cv_func_'$cf_func'=$cf_result'
--	
- fi
- 
--	# use the computed/retrieved cache-value:
--	eval 'cf_result=$cf_cv_func_'$cf_func
--	echo "$ac_t""$cf_result" 1>&6
--	if test $cf_result != no; then
--		cat >> confdefs.h <<EOF
--#define HAVE_${cf_tr_func} 1
-+echo "$ac_t""$cf_cv_wint_t" 1>&6
-+
-+if test "$cf_cv_wint_t" = yes ; then
-+	cat >> confdefs.h <<\EOF
-+#define NEED_WCHAR_H 1
- EOF
- 
--	fi
--done
-+	NEED_WCHAR_H=1
-+fi
- 
- 
--echo $ac_n "checking for ncurses extended functions""... $ac_c" 1>&6
--echo "configure:7373: checking for ncurses extended functions" >&5
--if eval "test \"`echo '$''{'cf_cv_ncurses_ext_funcs'+set}'`\" = set"; then
--  echo $ac_n "(cached) $ac_c" 1>&6
--else
--  
-+# if we do not find wint_t in either place, use substitution to provide a fallback.
-+if test "$cf_cv_wint_t" = unknown ; then
-+	NCURSES_WINT_T=1
-+fi
-+
-+
-+# if we find wint_t in either place, use substitution to provide a fallback.
-+if test "$cf_cv_wint_t" != unknown ; then
-+	NCURSES_OK_WINT_T=1
-+fi
-+
-+
-+
-+if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
-+	
-+echo $ac_n "checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
-+echo "configure:8626: checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}" >&5
- cat > conftest.$ac_ext <<EOF
--#line 7379 "configure"
-+#line 8628 "configure"
- #include "confdefs.h"
- 
-+#ifndef _XOPEN_SOURCE_EXTENDED
-+#define _XOPEN_SOURCE_EXTENDED
-+#endif
- #include <${cf_cv_ncurses_header-curses.h}>
- int main() {
- 
--	(void) assume_default_colors (0, 0);
--	(void) curses_version ();
--	(void) define_key (0, 0);
--	(void) is_term_resized (0, 0);
--	(void) key_defined (0);
--	(void) keybound (0, 0);
--	(void) keyok (0, 0);
--	(void) resize_term (0, 0);
--	(void) resizeterm (0, 0);
--	(void) use_default_colors ();
--	(void) use_extended_names (0);
--	(void) wresize (0, 0, 0);
-+mbstate_t foo
-+
- ; return 0; }
- EOF
--if { (eval echo configure:7399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:8641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
--  cf_cv_ncurses_ext_funcs=yes
-+  cf_result=yes
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  cf_cv_ncurses_ext_funcs=no
-+  cf_result=no
- fi
- rm -f conftest*
-+echo "$ac_t""$cf_result" 1>&6
-+if test $cf_result = yes ; then
-+	
-+cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
- 
--fi
-+	cat >> confdefs.h <<EOF
-+#define $cf_result 1
-+EOF
- 
--echo "$ac_t""$cf_cv_ncurses_ext_funcs" 1>&6
--test "$cf_cv_ncurses_ext_funcs" != no && cat >> confdefs.h <<\EOF
--#define NCURSES_EXT_FUNCS 1
-+else
-+	cat >> confdefs.h <<EOF
-+#define mbstate_t long
- EOF
- 
-+fi
- 
--echo $ac_n "checking for wide-character functions""... $ac_c" 1>&6
--echo "configure:7419: checking for wide-character functions" >&5
--if eval "test \"`echo '$''{'cf_cv_widechar_funcs'+set}'`\" = set"; then
--  echo $ac_n "(cached) $ac_c" 1>&6
--else
--  
-+fi
-+
-+if test "$NCURSES_OK_WCHAR_T" = 0 ; then
-+	
-+echo $ac_n "checking for type wchar_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
-+echo "configure:8672: checking for type wchar_t in ${cf_cv_ncurses_header-curses.h}" >&5
- cat > conftest.$ac_ext <<EOF
--#line 7425 "configure"
-+#line 8674 "configure"
- #include "confdefs.h"
- 
-+#ifndef _XOPEN_SOURCE_EXTENDED
-+#define _XOPEN_SOURCE_EXTENDED
-+#endif
- #include <${cf_cv_ncurses_header-curses.h}>
- int main() {
- 
--	static wchar_t src_wchar[2];
--	static cchar_t dst_cchar;
--	setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
--	
-+wchar_t foo
-+
- ; return 0; }
- EOF
--if { (eval echo configure:7437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:8687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
--  cf_cv_widechar_funcs=yes
-+  cf_result=yes
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  cf_cv_widechar_funcs=no
-+  cf_result=no
- fi
- rm -f conftest*
-+echo "$ac_t""$cf_result" 1>&6
-+if test $cf_result = yes ; then
-+	
-+cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
- 
--fi
--
--echo "$ac_t""$cf_cv_widechar_funcs" 1>&6
--if test "$cf_cv_widechar_funcs" != no ; then
--	cat >> confdefs.h <<\EOF
--#define USE_WIDEC_SUPPORT 1
-+	cat >> confdefs.h <<EOF
-+#define $cf_result 1
- EOF
- 
- else
--	cat >> confdefs.h <<\EOF
--#define USE_WIDEC_SUPPORT 0
-+	cat >> confdefs.h <<EOF
-+#define wchar_t long
- EOF
- 
- fi
- 
-+fi
- 
--echo $ac_n "checking if sys/time.h works with sys/select.h""... $ac_c" 1>&6
--echo "configure:7465: checking if sys/time.h works with sys/select.h" >&5
--if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then
--  echo $ac_n "(cached) $ac_c" 1>&6
--else
--  
-+if test "$NCURSES_OK_WINT_T" = 0 ; then
-+	
-+echo $ac_n "checking for type wint_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
-+echo "configure:8718: checking for type wint_t in ${cf_cv_ncurses_header-curses.h}" >&5
- cat > conftest.$ac_ext <<EOF
--#line 7471 "configure"
-+#line 8720 "configure"
- #include "confdefs.h"
- 
--#include <sys/types.h>
--#ifdef HAVE_SYS_TIME_H
--#include <sys/time.h>
--#endif
--#ifdef HAVE_SYS_SELECT_H
--#include <sys/select.h>
-+#ifndef _XOPEN_SOURCE_EXTENDED
-+#define _XOPEN_SOURCE_EXTENDED
- #endif
--
-+#include <${cf_cv_ncurses_header-curses.h}>
- int main() {
- 
-+wint_t foo
-+
- ; return 0; }
- EOF
--if { (eval echo configure:7486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:8733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
--  cf_cv_sys_time_select=yes
-+  cf_result=yes
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
--  cf_cv_sys_time_select=no
-+  cf_result=no
- fi
- rm -f conftest*
--     
--fi
-+echo "$ac_t""$cf_result" 1>&6
-+if test $cf_result = yes ; then
-+	
-+cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
- 
--echo "$ac_t""$cf_cv_sys_time_select" 1>&6
--test "$cf_cv_sys_time_select" = yes && cat >> confdefs.h <<\EOF
--#define HAVE_SYS_TIME_SELECT 1
-+	cat >> confdefs.h <<EOF
-+#define $cf_result 1
- EOF
- 
--
--
--echo $ac_n "checking for function curses_version""... $ac_c" 1>&6
--echo "configure:7507: checking for function curses_version" >&5
--if eval "test \"`echo '$''{'cf_cv_func_curses_version'+set}'`\" = set"; then
--  echo $ac_n "(cached) $ac_c" 1>&6
--else
--  
--if test "$cross_compiling" = yes; then
--  cf_cv_func_curses_version=unknown
- else
--  cat > conftest.$ac_ext <<EOF
--#line 7516 "configure"
--#include "confdefs.h"
--
--#include <${cf_cv_ncurses_header-curses.h}>
--int main()
--{
--	char temp[1024];
--	sprintf(temp, "%s\n", curses_version());
--	${cf_cv_main_return-return}(0);
--}
--
-+	cat >> confdefs.h <<EOF
-+#define wint_t long
- EOF
--if { (eval echo configure:7528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
--then
--  cf_cv_func_curses_version=yes
--
--else
--  echo "configure: failed program was:" >&5
--  cat conftest.$ac_ext >&5
--  rm -fr conftest*
--  cf_cv_func_curses_version=no
- 
- fi
--rm -fr conftest*
--fi
- 
--rm -f core
- fi
- 
--echo "$ac_t""$cf_cv_func_curses_version" 1>&6
--test "$cf_cv_func_curses_version" = yes && cat >> confdefs.h <<\EOF
--#define HAVE_CURSES_VERSION 1
--EOF
--
--
- 
--echo $ac_n "checking for alternate character set array""... $ac_c" 1>&6
--echo "configure:7553: checking for alternate character set array" >&5
--if eval "test \"`echo '$''{'cf_cv_curses_acs_map'+set}'`\" = set"; then
--  echo $ac_n "(cached) $ac_c" 1>&6
--else
--  
--cf_cv_curses_acs_map=unknown
--for name in acs_map _acs_map __acs_map _nc_acs_map
--do
-+echo $ac_n "checking for data boolnames declaration in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
-+echo "configure:8763: checking for data boolnames declaration in ${cf_cv_ncurses_header-curses.h}" >&5
- cat > conftest.$ac_ext <<EOF
--#line 7562 "configure"
-+#line 8765 "configure"
- #include "confdefs.h"
- 
-+#ifdef HAVE_XCURSES
-+#include <xcurses.h>
-+char * XCursesProgramName = "test";
-+#else
- #include <${cf_cv_ncurses_header-curses.h}>
-+#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
-+#include <ncursesw/term.h>
-+#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
-+#include <ncurses/term.h>
-+#elif defined(HAVE_TERM_H)
-+#include <term.h>
-+#endif
-+#endif
- 
- int main() {
- 
--$name['k'] = ACS_PLUS
-+void *foo = &(boolnames)
- 
- ; return 0; }
- EOF
--if { (eval echo configure:7573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:8788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
--  cf_cv_curses_acs_map=$name; break
-+  cf_result=yes
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  cf_result=no
- fi
- rm -f conftest*
--done
--
--fi
--
--echo "$ac_t""$cf_cv_curses_acs_map" 1>&6
-+echo "$ac_t""$cf_result" 1>&6
-+if test $cf_result = yes ; then
-+	
-+cf_result=`echo "have_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
- 
--test "$cf_cv_curses_acs_map" != unknown && cat >> confdefs.h <<EOF
--#define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
-+	cat >> confdefs.h <<EOF
-+#define $cf_result 1
- EOF
- 
--
--
--echo $ac_n "checking for wide alternate character set array""... $ac_c" 1>&6
--echo "configure:7594: checking for wide alternate character set array" >&5
--if eval "test \"`echo '$''{'cf_cv_curses_wacs_map'+set}'`\" = set"; then
--  echo $ac_n "(cached) $ac_c" 1>&6
- else
--  
--	cf_cv_curses_wacs_map=unknown
--	for name in wacs_map _wacs_map __wacs_map _nc_wacs
--	do
-+	echo $ac_n "checking for data boolnames in library""... $ac_c" 1>&6
-+echo "configure:8809: checking for data boolnames in library" >&5
- 	cat > conftest.$ac_ext <<EOF
--#line 7603 "configure"
-+#line 8811 "configure"
- #include "confdefs.h"
- 
--#ifndef _XOPEN_SOURCE_EXTENDED
--#define _XOPEN_SOURCE_EXTENDED
--#endif
-+#ifdef HAVE_XCURSES
-+#include <xcurses.h>
-+char * XCursesProgramName = "test";
-+#else
- #include <${cf_cv_ncurses_header-curses.h}>
-+#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
-+#include <ncursesw/term.h>
-+#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
-+#include <ncurses/term.h>
-+#elif defined(HAVE_TERM_H)
-+#include <term.h>
-+#endif
-+#endif
-+
-+extern char boolnames;
- int main() {
--$name['k'] = *WACS_PLUS
-+
-+	do {
-+		void *foo = &(boolnames);
-+		${cf_cv_main_return-return}(foo == 0);
-+	} while (0)
-+
- ; return 0; }
- EOF
--if { (eval echo configure:7614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:8838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
--  cf_cv_curses_wacs_map=$name
--	 break
-+  cf_result=yes
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  cf_result=no
- fi
- rm -f conftest*
--	done
--fi
-+	echo "$ac_t""$cf_result" 1>&6
-+	if test $cf_result = yes ; then
-+		
-+cf_result=`echo "decl_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
- 
--echo "$ac_t""$cf_cv_curses_wacs_map" 1>&6
-+		cat >> confdefs.h <<EOF
-+#define $cf_result 1
-+EOF
- 
-+	fi
-+fi
- 
--echo $ac_n "checking for type attr_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
--echo "configure:7630: checking for type attr_t in ${cf_cv_ncurses_header-curses.h}" >&5
-+
-+echo $ac_n "checking for data boolfnames declaration in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
-+echo "configure:8862: checking for data boolfnames declaration in ${cf_cv_ncurses_header-curses.h}" >&5
- cat > conftest.$ac_ext <<EOF
--#line 7632 "configure"
-+#line 8864 "configure"
- #include "confdefs.h"
- 
--#ifndef _XOPEN_SOURCE_EXTENDED
--#define _XOPEN_SOURCE_EXTENDED
--#endif
-+#ifdef HAVE_XCURSES
-+#include <xcurses.h>
-+char * XCursesProgramName = "test";
-+#else
- #include <${cf_cv_ncurses_header-curses.h}>
-+#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
-+#include <ncursesw/term.h>
-+#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
-+#include <ncurses/term.h>
-+#elif defined(HAVE_TERM_H)
-+#include <term.h>
-+#endif
-+#endif
-+
- int main() {
- 
--attr_t foo
-+void *foo = &(boolfnames)
- 
- ; return 0; }
- EOF
--if { (eval echo configure:7645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:8887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
-   cf_result=yes
- else
-@@ -7654,37 +8896,44 @@
- echo "$ac_t""$cf_result" 1>&6
- if test $cf_result = yes ; then
- 	
--cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
-+cf_result=`echo "have_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
- 
- 	cat >> confdefs.h <<EOF
- #define $cf_result 1
- EOF
- 
- else
--	cat >> confdefs.h <<EOF
--#define attr_t long
--EOF
--
--fi
--
--
--echo $ac_n "checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
--echo "configure:7673: checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}" >&5
--cat > conftest.$ac_ext <<EOF
--#line 7675 "configure"
-+	echo $ac_n "checking for data boolfnames in library""... $ac_c" 1>&6
-+echo "configure:8908: checking for data boolfnames in library" >&5
-+	cat > conftest.$ac_ext <<EOF
-+#line 8910 "configure"
- #include "confdefs.h"
- 
--#ifndef _XOPEN_SOURCE_EXTENDED
--#define _XOPEN_SOURCE_EXTENDED
--#endif
-+#ifdef HAVE_XCURSES
-+#include <xcurses.h>
-+char * XCursesProgramName = "test";
-+#else
- #include <${cf_cv_ncurses_header-curses.h}>
-+#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
-+#include <ncursesw/term.h>
-+#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
-+#include <ncurses/term.h>
-+#elif defined(HAVE_TERM_H)
-+#include <term.h>
-+#endif
-+#endif
-+
-+extern char boolfnames;
- int main() {
- 
--mbstate_t foo
-+	do {
-+		void *foo = &(boolfnames);
-+		${cf_cv_main_return-return}(foo == 0);
-+	} while (0)
- 
- ; return 0; }
- EOF
--if { (eval echo configure:7688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:8937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   cf_result=yes
- else
-@@ -7694,20 +8943,16 @@
-   cf_result=no
- fi
- rm -f conftest*
--echo "$ac_t""$cf_result" 1>&6
--if test $cf_result = yes ; then
--	
--cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
-+	echo "$ac_t""$cf_result" 1>&6
-+	if test $cf_result = yes ; then
-+		
-+cf_result=`echo "decl_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
- 
--	cat >> confdefs.h <<EOF
-+		cat >> confdefs.h <<EOF
- #define $cf_result 1
- EOF
- 
--else
--	cat >> confdefs.h <<EOF
--#define mbstate_t long
--EOF
--
-+	fi
- fi
- 
- 
-@@ -7891,11 +9136,13 @@
- s%@SHOW_CC@%$SHOW_CC%g
- s%@ECHO_CC@%$ECHO_CC%g
- s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
-+s%@NCURSES_CONFIG@%$NCURSES_CONFIG%g
- s%@X_CFLAGS@%$X_CFLAGS%g
- s%@X_PRE_LIBS@%$X_PRE_LIBS%g
- s%@X_LIBS@%$X_LIBS%g
- s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
- s%@XCURSES_CONFIG@%$XCURSES_CONFIG%g
-+s%@NCURSES_WRAP_PREFIX@%$NCURSES_WRAP_PREFIX%g
- 
- CEOF
- EOF
-diff -Naur ncurses-5.7.orig/test/configure.in ncurses-5.7/test/configure.in
---- ncurses-5.7.orig/test/configure.in	2008-09-06 15:10:23.000000000 -0700
-+++ ncurses-5.7/test/configure.in	2009-07-19 15:04:17.000000000 -0700
-@@ -1,5 +1,5 @@
- dnl***************************************************************************
--dnl Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+dnl Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
- dnl                                                                          *
- dnl Permission is hereby granted, free of charge, to any person obtaining a  *
- dnl copy of this software and associated documentation files (the            *
-@@ -28,7 +28,7 @@
- dnl
- dnl Author: Thomas E. Dickey 1996, etc.
- dnl
--dnl $Id: configure.in,v 1.67 2008/09/06 22:10:23 tom Exp $
-+dnl $Id: configure.in,v 1.74 2009/07/18 20:52:09 tom Exp $
- dnl This is a simple configuration-script for the ncurses test programs that
- dnl allows the test-directory to be separately configured against a reference
- dnl system (i.e., sysvr4 curses)
-@@ -120,19 +120,15 @@
- 
- case $cf_cv_screen in
- curses)
--	CF_CURSES_CPPFLAGS
--	CF_NCURSES_VERSION
--	CF_CURSES_LIBS
-+	CF_CURSES_CONFIG
- 	;;
- ncurses)
--	CF_NCURSES_CPPFLAGS
--	CF_NCURSES_LIBS
-+	CF_NCURSES_CONFIG
- 	;;
- ncursesw)
- 	cf_cv_libtype=w
- 	CF_UTF8_LIB
--	CF_NCURSES_CPPFLAGS(ncursesw)
--	CF_NCURSES_LIBS(ncursesw)
-+	CF_NCURSES_CONFIG(ncursesw)
- 	;;
- pdcurses) #(vi
- 	CF_PDCURSES_X11
-@@ -218,6 +214,7 @@
- tigetstr \
- typeahead \
- use_default_colors \
-+vw_printw \
- vsscanf \
- wchgat \
- winsstr \
-@@ -266,8 +263,27 @@
- CF_FUNC_CURSES_VERSION
- CF_CURSES_ACS_MAP
- CF_CURSES_WACS_MAP
-+
- CF_CURSES_CHECK_TYPE(attr_t,long)
--CF_CURSES_CHECK_TYPE(mbstate_t,long)
-+
-+CF_WCHAR_TYPE(mbstate_t, NCURSES_MBSTATE_T, NCURSES_OK_MBSTATE_T)
-+CF_WCHAR_TYPE(wchar_t,   NCURSES_WCHAR_T,   NCURSES_OK_WCHAR_T)
-+CF_WCHAR_TYPE(wint_t,    NCURSES_WINT_T,    NCURSES_OK_WINT_T)
-+
-+if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
-+	CF_CURSES_CHECK_TYPE(mbstate_t,long)
-+fi
-+
-+if test "$NCURSES_OK_WCHAR_T" = 0 ; then
-+	CF_CURSES_CHECK_TYPE(wchar_t,long)
-+fi
-+
-+if test "$NCURSES_OK_WINT_T" = 0 ; then
-+	CF_CURSES_CHECK_TYPE(wint_t,long)
-+fi
-+
-+CF_CURSES_CHECK_DATA(boolnames)
-+CF_CURSES_CHECK_DATA(boolfnames)
- 
- TEST_ARGS="$LIBS"
- LIBS=
-diff -Naur ncurses-5.7.orig/test/demo_forms.c ncurses-5.7/test/demo_forms.c
---- ncurses-5.7.orig/test/demo_forms.c	2008-10-18 13:38:20.000000000 -0700
-+++ ncurses-5.7/test/demo_forms.c	2009-07-19 15:04:04.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 2003-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 2003-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -26,7 +26,7 @@
-  * authorization.                                                           *
-  ****************************************************************************/
- /*
-- * $Id: demo_forms.c,v 1.30 2008/10/18 20:38:20 tom Exp $
-+ * $Id: demo_forms.c,v 1.32 2009/05/30 16:52:42 tom Exp $
-  *
-  * Demonstrate a variety of functions from the form library.
-  * Thomas Dickey - 2003/4/26
-@@ -97,6 +97,8 @@
-     FIELD *f = new_field(rows, cols, frow, fcol, o_value, 1);
- 
-     if (f) {
-+	FieldAttrs *ptr;
-+
- 	set_field_back(f, A_UNDERLINE);
- 	/*
- 	 * If -j and -d options are combined, -j loses.  It is documented in
-@@ -122,7 +124,12 @@
- 	/*
- 	 * The userptr is used in edit_field.c's inactive_field().
- 	 */
--	set_field_userptr(f, (void *) (long) field_back(f));
-+	ptr = (FieldAttrs *) field_userptr(f);
-+	if (ptr == 0) {
-+	    ptr = typeCalloc(FieldAttrs, 1);
-+	    ptr->background = field_back(f);
-+	}
-+	set_field_userptr(f, (void *) ptr);
- 	if (t_value)
- 	    set_field_buffer(f, 0, t_value);
-     }
-@@ -444,8 +451,11 @@
- 
- 	free_form(form);
-     }
--    for (c = 0; f[c] != 0; c++)
-+    for (c = 0; f[c] != 0; c++) {
-+	void *ptr = field_userptr(f[c]);
-+	free(ptr);
- 	free_field(f[c]);
-+    }
-     noraw();
-     nl();
- 
-diff -Naur ncurses-5.7.orig/test/demo_terminfo.c ncurses-5.7/test/demo_terminfo.c
---- ncurses-5.7.orig/test/demo_terminfo.c	1969-12-31 16:00:00.000000000 -0800
-+++ ncurses-5.7/test/demo_terminfo.c	2009-07-19 15:04:17.000000000 -0700
-@@ -0,0 +1,304 @@
-+/****************************************************************************
-+ * Copyright (c) 2009 Free Software Foundation, Inc.                        *
-+ *                                                                          *
-+ * Permission is hereby granted, free of charge, to any person obtaining a  *
-+ * copy of this software and associated documentation files (the            *
-+ * "Software"), to deal in the Software without restriction, including      *
-+ * without limitation the rights to use, copy, modify, merge, publish,      *
-+ * distribute, distribute with modifications, sublicense, and/or sell       *
-+ * copies of the Software, and to permit persons to whom the Software is    *
-+ * furnished to do so, subject to the following conditions:                 *
-+ *                                                                          *
-+ * The above copyright notice and this permission notice shall be included  *
-+ * in all copies or substantial portions of the Software.                   *
-+ *                                                                          *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
-+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
-+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
-+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
-+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
-+ *                                                                          *
-+ * Except as contained in this notice, the name(s) of the above copyright   *
-+ * holders shall not be used in advertising or otherwise to promote the     *
-+ * sale, use or other dealings in this Software without prior written       *
-+ * authorization.                                                           *
-+ ****************************************************************************/
-+
-+/*
-+ * Author: Thomas E. Dickey
-+ *
-+ * $Id: demo_terminfo.c,v 1.6 2009/07/17 01:02:08 tom Exp $
-+ *
-+ * A simple demo of the terminfo interface.
-+ */
-+#define USE_TINFO
-+#include <test.priv.h>
-+
-+#ifdef NCURSES_VERSION
-+#if NCURSES_XNAMES
-+#include <term_entry.h>
-+#endif
-+#endif
-+
-+#if defined(HAVE_CURSES_DATA_BOOLNAMES) || defined(DECL_CURSES_DATA_BOOLNAMES)
-+
-+static bool b_opt = FALSE;
-+static bool f_opt = FALSE;
-+static bool n_opt = FALSE;
-+static bool s_opt = FALSE;
-+static bool x_opt = FALSE;
-+
-+#define FCOLS 8
-+#define FNAME(type) "%s %-*s = ", #type, FCOLS
-+
-+static void
-+dumpit(NCURSES_CONST char *cap)
-+{
-+    /*
-+     * One of the limitations of the termcap interface is that the library
-+     * cannot determine the size of the buffer passed via tgetstr(), nor the
-+     * amount of space remaining.  This demo simply reuses the whole buffer
-+     * for each call; a normal termcap application would try to use the buffer
-+     * to hold all of the strings extracted from the terminal entry.
-+     */
-+    const char *str;
-+    int num;
-+
-+    if ((str = tigetstr(cap)) != 0 && (str != (char *) -1)) {
-+	/*
-+	 * Note that the strings returned are mostly terminfo format, since
-+	 * ncurses does not convert except for a handful of special cases.
-+	 */
-+	printf(FNAME(str), cap);
-+	while (*str != 0) {
-+	    int ch = UChar(*str++);
-+	    switch (ch) {
-+	    case '\177':
-+		fputs("^?", stdout);
-+		break;
-+	    case '\033':
-+		fputs("\\E", stdout);
-+		break;
-+	    case '\b':
-+		fputs("\\b", stdout);
-+		break;
-+	    case '\f':
-+		fputs("\\f", stdout);
-+		break;
-+	    case '\n':
-+		fputs("\\n", stdout);
-+		break;
-+	    case '\r':
-+		fputs("\\r", stdout);
-+		break;
-+	    case ' ':
-+		fputs("\\s", stdout);
-+		break;
-+	    case '\t':
-+		fputs("\\t", stdout);
-+		break;
-+	    case '^':
-+		fputs("\\^", stdout);
-+		break;
-+	    case ':':
-+		fputs("\\072", stdout);
-+		break;
-+	    case '\\':
-+		fputs("\\\\", stdout);
-+		break;
-+	    default:
-+		if (isgraph(ch))
-+		    fputc(ch, stdout);
-+		else if (ch < 32)
-+		    printf("^%c", ch + '@');
-+		else
-+		    printf("\\%03o", ch);
-+		break;
-+	    }
-+	}
-+	printf("\n");
-+    } else if ((num = tigetnum(cap)) >= 0) {
-+	printf(FNAME(num), cap);
-+	printf(" %d\n", num);
-+    } else if ((num = tigetflag(cap)) >= 0) {
-+	printf(FNAME(flg), cap);
-+	printf("%s\n", num ? "true" : "false");
-+    }
-+    fflush(stdout);
-+}
-+
-+static void
-+demo_terminfo(char *name)
-+{
-+    unsigned n;
-+    NCURSES_CONST char *cap;
-+
-+    printf("Terminal type \"%s\"\n", name);
-+    setupterm(name, 1, (int *) 0);
-+
-+    if (b_opt) {
-+	for (n = 0;; ++n) {
-+	    cap = f_opt ? boolfnames[n] : boolnames[n];
-+	    if (cap == 0)
-+		break;
-+	    dumpit(cap);
-+	}
-+    }
-+
-+    if (n_opt) {
-+	for (n = 0;; ++n) {
-+	    cap = f_opt ? numfnames[n] : numnames[n];
-+	    if (cap == 0)
-+		break;
-+	    dumpit(cap);
-+	}
-+    }
-+
-+    if (s_opt) {
-+	for (n = 0;; ++n) {
-+	    cap = f_opt ? strfnames[n] : strnames[n];
-+	    if (cap == 0)
-+		break;
-+	    dumpit(cap);
-+	}
-+    }
-+#ifdef NCURSES_VERSION
-+    if (x_opt) {
-+	int mod;
-+	if (f_opt) {
-+#if NCURSES_XNAMES
-+	    TERMTYPE *term = &(cur_term->type);
-+	    if (term != 0
-+		&& ((NUM_BOOLEANS(term) != BOOLCOUNT)
-+		    || (NUM_NUMBERS(term) != NUMCOUNT)
-+		    || (NUM_STRINGS(term) != STRCOUNT))) {
-+		for (n = BOOLCOUNT; n < NUM_BOOLEANS(term); ++n) {
-+		    dumpit(ExtBoolname(term, n, boolnames));
-+		}
-+		for (n = NUMCOUNT; n < NUM_NUMBERS(term); ++n) {
-+		    dumpit(ExtNumname(term, n, numnames));
-+		}
-+		for (n = STRCOUNT; n < NUM_STRINGS(term); ++n) {
-+		    dumpit(ExtStrname(term, n, strnames));
-+		}
-+	    }
-+#endif
-+	} else {
-+	    char temp[10];
-+	    static const char *xterm_keys[] =
-+	    {
-+		"kDC", "kDN", "kEND", "kHOM", "kIC",
-+		"kLFT", "kNXT", "kPRV", "kRIT", "kUP",
-+	    };
-+	    for (n = 0; n < SIZEOF(xterm_keys); ++n) {
-+		for (mod = 0; mod < 8; ++mod) {
-+		    if (mod == 0)
-+			strcpy(temp, xterm_keys[n]);
-+		    else
-+			sprintf(temp, "%s%d", xterm_keys[n], mod);
-+		    dumpit(temp);
-+		}
-+	    }
-+	}
-+    }
-+#endif
-+
-+}
-+
-+static void
-+usage(void)
-+{
-+    static const char *msg[] =
-+    {
-+	"Usage: demo_terminfo [options] [terminal]",
-+	"",
-+	"If no options are given, print all (boolean, numeric, string)",
-+	"capabilities for the given terminal, using short names.",
-+	"",
-+	"Options:",
-+	" -b       print boolean-capabilities",
-+	" -f       print full names",
-+	" -n       print numeric-capabilities",
-+	" -r COUNT repeat for given count",
-+	" -s       print string-capabilities",
-+#ifdef NCURSES_VERSION
-+	" -x       print extended capabilities",
-+#endif
-+    };
-+    unsigned n;
-+    for (n = 0; n < SIZEOF(msg); ++n) {
-+	fprintf(stderr, "%s\n", msg[n]);
-+    }
-+    ExitProgram(EXIT_FAILURE);
-+}
-+
-+int
-+main(int argc, char *argv[])
-+{
-+    int n;
-+    int repeat;
-+    char *name;
-+    int r_opt = 1;
-+
-+    while ((n = getopt(argc, argv, "bfnr:sx")) != -1) {
-+	switch (n) {
-+	case 'b':
-+	    b_opt = TRUE;
-+	    break;
-+	case 'f':
-+	    f_opt = TRUE;
-+	    break;
-+	case 'n':
-+	    n_opt = TRUE;
-+	    break;
-+	case 'r':
-+	    if ((r_opt = atoi(optarg)) <= 0)
-+		usage();
-+	    break;
-+	case 's':
-+	    s_opt = TRUE;
-+	    break;
-+#ifdef NCURSES_VERSION
-+	case 'x':
-+	    x_opt = TRUE;
-+	    use_extended_names(TRUE);
-+	    break;
-+#endif
-+	default:
-+	    usage();
-+	    break;
-+	}
-+    }
-+
-+    if (!(b_opt || n_opt || s_opt || x_opt)) {
-+	b_opt = TRUE;
-+	n_opt = TRUE;
-+	s_opt = TRUE;
-+    }
-+
-+    for (repeat = 0; repeat < r_opt; ++repeat) {
-+	if (optind < argc) {
-+	    for (n = optind; n < argc; ++n) {
-+		demo_terminfo(argv[n]);
-+	    }
-+	} else if ((name = getenv("TERM")) != 0) {
-+	    demo_terminfo(name);
-+	} else {
-+	    static char dumb[] = "dumb";
-+	    demo_terminfo(dumb);
-+	}
-+    }
-+
-+    ExitProgram(EXIT_SUCCESS);
-+}
-+
-+#else
-+int
-+main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
-+{
-+    printf("This program requires the terminfo arrays\n");
-+    ExitProgram(EXIT_FAILURE);
-+}
-+#endif
-diff -Naur ncurses-5.7.orig/test/ditto.c ncurses-5.7/test/ditto.c
---- ncurses-5.7.orig/test/ditto.c	2008-08-04 06:21:41.000000000 -0700
-+++ ncurses-5.7/test/ditto.c	2009-07-19 15:04:17.000000000 -0700
-@@ -29,7 +29,7 @@
- /*
-  * Author: Thomas E. Dickey (1998-on)
-  *
-- * $Id: ditto.c,v 1.32 2008/08/04 13:21:41 tom Exp $
-+ * $Id: ditto.c,v 1.34 2009/07/17 00:07:25 tom Exp $
-  *
-  * The program illustrates how to set up multiple screens from a single
-  * program.
-@@ -137,8 +137,8 @@
- {
-     int result = -1;
-     if (peek->sequence < fifo->sequence) {
--	peek->sequence += 1;
- 	result = fifo->data[THIS_FIFO(peek->sequence)];
-+	peek->sequence += 1;
-     }
-     return result;
- }
-@@ -188,7 +188,11 @@
- }
- 
- static void
--init_screen(SCREEN *sp GCC_UNUSED, void *arg)
-+init_screen(
-+#if HAVE_USE_WINDOW
-+	       SCREEN *sp GCC_UNUSED,
-+#endif
-+	       void *arg)
- {
-     DITTO *target = (DITTO *) arg;
-     int high, wide;
-@@ -237,6 +241,7 @@
-     target->which1 = which1;
-     target->titles = source;
-     target->length = length;
-+    target->fifo.head = -1;
-     target->screen = newterm((char *) 0,	/* assume $TERM is the same */
- 			     target->output,
- 			     target->input);
-@@ -248,9 +253,15 @@
- }
- 
- static int
--close_screen(SCREEN *sp GCC_UNUSED, void *arg GCC_UNUSED)
-+close_screen(
-+#if HAVE_USE_WINDOW
-+		SCREEN *sp GCC_UNUSED,
-+#endif
-+		void *arg GCC_UNUSED)
- {
-+#if HAVE_USE_WINDOW
-     (void) sp;
-+#endif
-     (void) arg;
-     return endwin();
- }
-@@ -259,7 +270,11 @@
-  * Read data from the 'source' screen.
-  */
- static int
--read_screen(SCREEN *sp GCC_UNUSED, void *arg)
-+read_screen(
-+#if HAVE_USE_WINDOW
-+	       SCREEN *sp GCC_UNUSED,
-+#endif
-+	       void *arg)
- {
-     DDATA *data = (DDATA *) arg;
-     DITTO *ditto = &(data->ditto[data->source]);
-@@ -278,7 +293,11 @@
-  * Write all of the data that's in fifos for the 'target' screen.
-  */
- static int
--write_screen(SCREEN *sp GCC_UNUSED, void *arg GCC_UNUSED)
-+write_screen(
-+#if HAVE_USE_WINDOW
-+		SCREEN *sp GCC_UNUSED,
-+#endif
-+		void *arg GCC_UNUSED)
- {
-     DDATA *data = (DDATA *) arg;
-     DITTO *ditto = &(data->ditto[data->target]);
-@@ -360,7 +379,7 @@
- 
-     if (argc <= 1)
- 	usage();
--
-+    
-     if ((data = typeCalloc(DITTO, (size_t) argc)) == 0)
- 	failed("calloc data");
- 
-diff -Naur ncurses-5.7.orig/test/edit_field.c ncurses-5.7/test/edit_field.c
---- ncurses-5.7.orig/test/edit_field.c	2008-10-18 13:40:20.000000000 -0700
-+++ ncurses-5.7/test/edit_field.c	2009-07-19 15:02:04.000000000 -0700
-@@ -26,7 +26,7 @@
-  * authorization.                                                           *
-  ****************************************************************************/
- /*
-- * $Id: edit_field.c,v 1.14 2008/10/18 20:40:20 tom Exp $
-+ * $Id: edit_field.c,v 1.15 2008/12/20 19:23:01 tom Exp $
-  *
-  * A wrapper for form_driver() which keeps track of the user's editing changes
-  * for each field, and makes the result available as a null-terminated string
-@@ -294,8 +294,8 @@
- static void
- inactive_field(FIELD * f)
- {
--    void *ptr = field_userptr(f);
--    set_field_back(f, (chtype) ptr);
-+    FieldAttrs *ptr = (FieldAttrs *) field_userptr(f);
-+    set_field_back(f, ptr->background);
- }
- 
- int
-diff -Naur ncurses-5.7.orig/test/edit_field.h ncurses-5.7/test/edit_field.h
---- ncurses-5.7.orig/test/edit_field.h	2006-06-03 09:38:57.000000000 -0700
-+++ ncurses-5.7/test/edit_field.h	2009-07-19 15:02:04.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 2003-2004,2005 Free Software Foundation, Inc.              *
-+ * Copyright (c) 2003-2006,2008 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -26,7 +26,7 @@
-  * authorization.                                                           *
-  ****************************************************************************/
- /*
-- * $Id: edit_field.h,v 1.5 2006/06/03 16:38:57 tom Exp $
-+ * $Id: edit_field.h,v 1.6 2008/12/20 19:23:18 tom Exp $
-  *
-  * Interface of edit_field.c
-  */
-@@ -43,6 +43,10 @@
- #define MY_EDT_MODE	EDIT_FIELD('e')
- #define MY_INS_MODE	EDIT_FIELD('t')
- 
-+typedef struct {
-+    chtype background;
-+} FieldAttrs;
-+
- extern void help_edit_field(void);
- extern int edit_field(FORM * form, int *result);
- 
-diff -Naur ncurses-5.7.orig/test/filter.c ncurses-5.7/test/filter.c
---- ncurses-5.7.orig/test/filter.c	2006-12-09 08:53:47.000000000 -0800
-+++ ncurses-5.7/test/filter.c	2009-07-19 15:02:00.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -29,7 +29,7 @@
- /*
-  * Author:  Thomas E. Dickey <dickey@clark.net> 1998
-  *
-- * $Id: filter.c,v 1.11 2006/12/09 16:53:47 tom Exp $
-+ * $Id: filter.c,v 1.12 2008/12/06 21:59:27 tom Exp $
-  */
- #include <test.priv.h>
- 
-@@ -78,16 +78,50 @@
-     return code;
- }
- 
-+static void
-+usage(void)
-+{
-+    static const char *msg[] =
-+    {
-+	"Usage: filter [options]"
-+	,""
-+	,"Options:"
-+	,"  -i   use initscr() rather than newterm()"
-+    };
-+    unsigned n;
-+    for (n = 0; n < SIZEOF(msg); n++)
-+	fprintf(stderr, "%s\n", msg[n]);
-+    ExitProgram(EXIT_FAILURE);
-+}
-+
- int
--main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
-+main(int argc, char *argv[])
- {
-+    int ch;
-     char buffer[80];
-     attr_t underline;
-+    bool i_option = FALSE;
- 
-     setlocale(LC_ALL, "");
- 
-+    while ((ch = getopt(argc, argv, "i")) != -1) {
-+	switch (ch) {
-+	case 'i':
-+	    i_option = TRUE;
-+	    break;
-+	default:
-+	    usage();
-+	}
-+    }
-+
-+    printf("starting filter program using %s...\n",
-+	   i_option ? "initscr" : "newterm");
-     filter();
--    (void) newterm((char *) 0, stdout, stdin);
-+    if (i_option) {
-+	initscr();
-+    } else {
-+	(void) newterm((char *) 0, stdout, stdin);
-+    }
-     cbreak();
-     keypad(stdscr, TRUE);
- 
-diff -Naur ncurses-5.7.orig/test/firstlast.c ncurses-5.7/test/firstlast.c
---- ncurses-5.7.orig/test/firstlast.c	2006-04-01 11:03:18.000000000 -0800
-+++ ncurses-5.7/test/firstlast.c	2009-07-19 15:04:17.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -29,7 +29,7 @@
-  * This test was written by Alexander V. Lukyanov to demonstrate difference
-  * between ncurses 4.1 and SVR4 curses
-  *
-- * $Id: firstlast.c,v 1.5 2006/04/01 19:03:18 tom Exp $
-+ * $Id: firstlast.c,v 1.6 2009/07/15 23:29:46 tom Exp $
-  */
- 
- #include <test.priv.h>
-@@ -38,12 +38,19 @@
- fill(WINDOW *w, const char *str)
- {
-     const char *s;
-+    int x0 = -1, y0 = -1;
-+    int x1, y1;
-+
-     for (;;) {
- 	for (s = str; *s; s++) {
--	    if (waddch(w, UChar(*s)) == ERR) {
-+	    getyx(w, y1, x1);
-+	    if (waddch(w, UChar(*s)) == ERR
-+		|| (x1 == x0 && y1 == y0)) {
- 		wmove(w, 0, 0);
- 		return;
- 	    }
-+	    x0 = x1;
-+	    y0 = y1;
- 	}
-     }
- }
-diff -Naur ncurses-5.7.orig/test/insdelln.c ncurses-5.7/test/insdelln.c
---- ncurses-5.7.orig/test/insdelln.c	1969-12-31 16:00:00.000000000 -0800
-+++ ncurses-5.7/test/insdelln.c	2009-07-19 15:04:17.000000000 -0700
-@@ -0,0 +1,387 @@
-+/****************************************************************************
-+ * Copyright (c) 2008,2009 Free Software Foundation, Inc.                   *
-+ *                                                                          *
-+ * Permission is hereby granted, free of charge, to any person obtaining a  *
-+ * copy of this software and associated documentation files (the            *
-+ * "Software"), to deal in the Software without restriction, including      *
-+ * without limitation the rights to use, copy, modify, merge, publish,      *
-+ * distribute, distribute with modifications, sublicense, and/or sell       *
-+ * copies of the Software, and to permit persons to whom the Software is    *
-+ * furnished to do so, subject to the following conditions:                 *
-+ *                                                                          *
-+ * The above copyright notice and this permission notice shall be included  *
-+ * in all copies or substantial portions of the Software.                   *
-+ *                                                                          *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
-+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
-+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
-+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
-+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
-+ *                                                                          *
-+ * Except as contained in this notice, the name(s) of the above copyright   *
-+ * holders shall not be used in advertising or otherwise to promote the     *
-+ * sale, use or other dealings in this Software without prior written       *
-+ * authorization.                                                           *
-+ ****************************************************************************/
-+/*
-+ * $Id: insdelln.c,v 1.2 2009/07/15 23:21:04 tom Exp $
-+ *
-+ * test-driver for deleteln, wdeleteln, insdelln, winsdelln, insertln, winsertln
-+ */
-+
-+#include <test.priv.h>
-+
-+#define SHOW(n) ((n) == ERR ? "ERR" : "OK")
-+#define COLOR_DEFAULT (-1)
-+
-+typedef struct {
-+    unsigned c;
-+    unsigned v;
-+    int pair;
-+    unsigned attr;
-+    int count;
-+    int ch;
-+    const char *c_msg;
-+    const char *v_msg;
-+    int y_val;
-+    int x_val;
-+    int y_beg, x_beg;
-+    int y_max, x_max;
-+} STATUS;
-+
-+static const char *
-+color_params(unsigned state, int *pair)
-+{
-+    /* *INDENT-OFF* */
-+    static struct {
-+	int pair;
-+	int fg, bg;
-+	const char *msg;
-+    } table[] = {
-+	{ 0, COLOR_DEFAULT, COLOR_DEFAULT, "default" },
-+	{ 1, COLOR_RED,     COLOR_BLACK,   "red/black" },
-+	{ 2, COLOR_WHITE,   COLOR_BLUE,    "white/blue" },
-+    };
-+    /* *INDENT-ON* */
-+
-+    static bool first = TRUE;
-+    const char *result = 0;
-+
-+    if (has_colors()) {
-+	if (first) {
-+	    unsigned n;
-+
-+	    start_color();
-+	    for (n = 0; n < SIZEOF(table); ++n) {
-+		init_pair(table[n].pair, table[n].fg, table[n].bg);
-+	    }
-+	}
-+	if (state < SIZEOF(table)) {
-+	    *pair = table[state].pair;
-+	    result = table[state].msg;
-+	}
-+    }
-+    return result;
-+}
-+
-+static const char *
-+video_params(unsigned state, unsigned *attr)
-+{
-+    /* *INDENT-OFF* */
-+    static struct {
-+	unsigned attr;
-+	const char *msg;
-+    } table[] = {
-+	{ A_NORMAL,	"normal" },
-+	{ A_BOLD,	"bold" },
-+	{ A_REVERSE,	"reverse" },
-+	{ A_UNDERLINE,	"underline" },
-+	{ A_BLINK, 	"blink" },
-+    };
-+    /* *INDENT-ON* */
-+
-+    const char *result = 0;
-+
-+    if (state < SIZEOF(table)) {
-+	*attr = table[state].attr;
-+	result = table[state].msg;
-+    }
-+    return result;
-+}
-+
-+/* fill the window with a test-pattern */
-+static void
-+fill_window(WINDOW *win)
-+{
-+    int y, x;
-+    int y0 = -1, x0 = -1;
-+
-+    getyx(win, y, x);
-+    wmove(win, 0, 0);
-+    while (waddstr(win, "0123456789 abcdefghijklmnopqrstuvwxyz ") != ERR) {
-+	int y1, x1;
-+	getyx(win, y1, x1);
-+	if (y1 == y0 && x1 == x0)
-+	    break;
-+	x0 = x1;
-+	y0 = y1;
-+    }
-+    wmove(win, y, x);
-+}
-+
-+static void
-+show_status(WINDOW *win, STATUS * sp)
-+{
-+    int y, x;
-+
-+    getyx(win, y, x);
-+    wmove(win, 0, 0);
-+    wprintw(win, "Count %d", sp->count);
-+    if (sp->v_msg != 0)
-+	wprintw(win, " Video %s", sp->v_msg);
-+    if (sp->c_msg != 0)
-+	wprintw(win, " Color %s", sp->c_msg);
-+    wclrtoeol(win);
-+    wmove(win, y, x);
-+}
-+
-+static void
-+reshow_status(WINDOW *win, STATUS * sp)
-+{
-+    fill_window(win);
-+    show_status(win, sp);
-+}
-+
-+static void
-+do_subwindow(WINDOW *win, STATUS * sp, void func(WINDOW *))
-+{
-+    WINDOW *win1 = newwin(sp->y_max - 2, sp->x_max - 2,
-+			  sp->y_beg + 1, sp->x_beg + 1);
-+
-+    if (win1 != 0 && sp->y_max > 4 && sp->x_max > 4) {
-+	WINDOW *win2 = derwin(win1, sp->y_max - 4, sp->x_max - 4, 1, 1);
-+
-+	if (win2 != 0) {
-+	    box(win1, 0, 0);
-+	    wrefresh(win1);
-+	    func(win2);
-+
-+	    delwin(win2);
-+	} else {
-+	    beep();
-+	}
-+	delwin(win1);
-+	touchwin(win);
-+    } else {
-+	beep();
-+    }
-+}
-+
-+static void
-+init_status(WINDOW *win, STATUS * sp)
-+{
-+    memset(sp, 0, sizeof(*sp));
-+    sp->c = 99;
-+    sp->v = 99;
-+    sp->ch = ' ';
-+
-+    keypad(win, TRUE);
-+    fill_window(win);
-+
-+    getbegyx(win, sp->y_beg, sp->x_beg);
-+    getmaxyx(win, sp->y_max, sp->x_max);
-+}
-+
-+static void
-+show_help(WINDOW *win)
-+{
-+    static const char *table[] =
-+    {
-+	"Basic commands:"
-+	,"Use h/j/k/l or arrow keys to move the cursor."
-+	,"Set the count parameter for insert/delete by entering digits 0-9."
-+	,""
-+	,"Other commands:"
-+	,"space toggles through the set of video attributes and colors."
-+	,"t     touches (forces repaint) of the current line."
-+	,"i     calls insertln at the current position with the given count."
-+	,"d     calls deleteln at the window beginning with the given count."
-+	,"I     calls insdelln at the window beginning with the given count."
-+	,"D     calls insdelln at the window beginning with the given -count."
-+	,"f     refills the window with test-pattern using current attributes."
-+	,"w     recur to test windows other than stdscr"
-+	,"q     quit"
-+	,"=     resets count to zero."
-+	,"?     shows this help-window"
-+	,""
-+	,""
-+    };
-+
-+    int y_max, x_max;
-+    int row;
-+
-+    getmaxyx(win, y_max, x_max);
-+    for (row = 0; row < (int) SIZEOF(table) && row < y_max; ++row) {
-+	mvwprintw(win, row, 0, "%.*s", x_max, table[row]);
-+    }
-+    while (wgetch(win) != 'q')
-+	beep();
-+}
-+
-+static void
-+update_status(WINDOW *win, STATUS * sp)
-+{
-+    switch (sp->ch) {
-+    case ' ':			/* next test-iteration */
-+	if (has_colors()) {
-+	    if ((sp->c_msg = color_params(++(sp->c), &(sp->pair))) == 0) {
-+		sp->c_msg = color_params(sp->c = 0, &(sp->pair));
-+		if ((sp->v_msg = video_params(++(sp->v), &(sp->attr))) == 0) {
-+		    sp->v_msg = video_params(sp->v = 0, &(sp->attr));
-+		}
-+	    }
-+	} else {
-+	    if ((sp->v_msg = video_params(++(sp->v), &(sp->attr))) == 0) {
-+		sp->v_msg = video_params(sp->v = 0, &(sp->attr));
-+	    }
-+	}
-+	sp->count = 0;
-+	show_status(win, sp);
-+	break;
-+    case KEY_LEFT:
-+    case 'h':
-+	if (sp->x_val > 0)
-+	    wmove(win, sp->y_val, --(sp->x_val));
-+	break;
-+    case KEY_DOWN:
-+    case 'j':
-+	if (sp->y_val < sp->y_max)
-+	    wmove(win, ++(sp->y_val), sp->x_val);
-+	break;
-+    case KEY_UP:
-+    case 'k':
-+	if (sp->y_val > 0)
-+	    wmove(win, --(sp->y_val), sp->x_val);
-+	break;
-+    case KEY_RIGHT:
-+    case 'l':
-+	if (sp->x_val < sp->x_max)
-+	    wmove(win, sp->y_val, ++(sp->x_val));
-+	break;
-+    case 't':
-+	touchline(win, sp->y_val, 1);
-+	break;
-+    case '=':
-+	sp->count = 0;
-+	show_status(win, sp);
-+	break;
-+    case '?':
-+	do_subwindow(win, sp, show_help);
-+	break;
-+    default:
-+	if (isdigit(sp->ch)) {
-+	    sp->count = (sp->count * 10) + (sp->ch - '0');
-+	    show_status(win, sp);
-+	} else {
-+	    beep();
-+	}
-+	break;
-+    }
-+}
-+
-+static void
-+test_winsdelln(WINDOW *win)
-+{
-+    STATUS st;
-+    int n;
-+
-+    init_status(win, &st);
-+
-+    do {
-+	wattrset(win, st.attr | COLOR_PAIR(st.pair));
-+	switch (st.ch) {
-+	case 'i':
-+	    for (n = 0; n < st.count; ++n)
-+		winsertln(win);
-+	    break;
-+	case 'd':
-+	    for (n = 0; n < st.count; ++n)
-+		wdeleteln(win);
-+	    break;
-+	case 'I':
-+	    winsdelln(win, st.count);
-+	    break;
-+	case 'D':
-+	    winsdelln(win, -st.count);
-+	    break;
-+	case 'f':
-+	    fill_window(win);
-+	    reshow_status(win, &st);
-+	    break;
-+	case 'w':
-+	    do_subwindow(win, &st, test_winsdelln);
-+	    break;
-+	case 'q':
-+	    return;
-+	default:
-+	    update_status(win, &st);
-+	    break;
-+	}
-+    } while ((st.ch = wgetch(win)) != ERR);
-+}
-+
-+static void
-+test_insdelln(void)
-+{
-+    STATUS st;
-+    int n;
-+
-+    init_status(stdscr, &st);
-+
-+    do {
-+	attrset(st.attr | COLOR_PAIR(st.pair));
-+	switch (st.ch) {
-+	case 'i':
-+	    for (n = 0; n < st.count; ++n)
-+		insertln();
-+	    break;
-+	case 'd':
-+	    for (n = 0; n < st.count; ++n)
-+		deleteln();
-+	    break;
-+	case 'I':
-+	    insdelln(st.count);
-+	    break;
-+	case 'D':
-+	    insdelln(-st.count);
-+	    break;
-+	case 'f':
-+	    fill_window(stdscr);
-+	    reshow_status(stdscr, &st);
-+	    break;
-+	case 'w':
-+	    do_subwindow(stdscr, &st, test_winsdelln);
-+	    break;
-+	case 'q':
-+	    return;
-+	default:
-+	    update_status(stdscr, &st);
-+	    break;
-+	}
-+    } while ((st.ch = getch()) != ERR);
-+}
-+
-+int
-+main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
-+{
-+    initscr();
-+    cbreak();
-+    noecho();
-+
-+    test_insdelln();
-+    endwin();
-+
-+    ExitProgram(EXIT_SUCCESS);
-+}
-diff -Naur ncurses-5.7.orig/test/modules ncurses-5.7/test/modules
---- ncurses-5.7.orig/test/modules	2007-08-18 10:57:08.000000000 -0700
-+++ ncurses-5.7/test/modules	2009-07-19 15:04:15.000000000 -0700
-@@ -1,6 +1,6 @@
--# $Id: modules,v 1.36 2007/08/18 17:57:08 tom Exp $
-+# $Id: modules,v 1.38 2009/07/11 12:43:09 tom Exp $
- ##############################################################################
--# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.                #
-+# Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.                #
- #                                                                            #
- # Permission is hereby granted, free of charge, to any person obtaining a    #
- # copy of this software and associated documentation files (the "Software"), #
-@@ -37,6 +37,7 @@
- bs		progs		$(srcdir)	$(HEADER_DEPS)
- cardfile	progs		$(srcdir)	$(HEADER_DEPS)	../include/panel.h ../include/form.h
- chgat		progs		$(srcdir)	$(HEADER_DEPS)
-+clip_printw	progs		$(srcdir)	$(HEADER_DEPS)
- color_set	progs		$(srcdir)	$(HEADER_DEPS)
- demo_altkeys	progs		$(srcdir)	$(HEADER_DEPS)
- demo_defkey	progs		$(srcdir)	$(HEADER_DEPS)
-@@ -45,6 +46,7 @@
- demo_menus	progs		$(srcdir)	$(HEADER_DEPS)	../include/menu.h
- demo_panels	progs		$(srcdir)	$(HEADER_DEPS)	../include/panel.h
- demo_termcap	progs		$(srcdir)	$(HEADER_DEPS)
-+demo_terminfo	progs		$(srcdir)	$(HEADER_DEPS)
- ditto		progs		$(srcdir)	$(HEADER_DEPS)
- dots		progs		$(srcdir)	$(HEADER_DEPS)
- dots_mvcur	progs		$(srcdir)	$(HEADER_DEPS)
-@@ -60,6 +62,7 @@
- inch_wide	progs		$(srcdir)	$(HEADER_DEPS)
- inchs		progs		$(srcdir)	$(HEADER_DEPS)
- ins_wide	progs		$(srcdir)	$(HEADER_DEPS)
-+insdelln	progs		$(srcdir)	$(HEADER_DEPS)
- inserts		progs		$(srcdir)	$(HEADER_DEPS)
- key_names	progs		$(srcdir)	$(HEADER_DEPS)
- keynames	progs		$(srcdir)	$(HEADER_DEPS)
-diff -Naur ncurses-5.7.orig/test/ncurses.c ncurses-5.7/test/ncurses.c
---- ncurses-5.7.orig/test/ncurses.c	2008-09-27 07:34:58.000000000 -0700
-+++ ncurses-5.7/test/ncurses.c	2009-07-19 15:04:17.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -40,7 +40,7 @@
-    Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
-            Thomas E. Dickey (beginning revision 1.27 in 1996).
- 
--$Id: ncurses.c,v 1.329 2008/09/27 14:34:58 tom Exp $
-+$Id: ncurses.c,v 1.342 2009/07/18 11:48:42 tom Exp $
- 
- ***************************************************************************/
- 
-@@ -318,6 +318,7 @@
-     *target = 0;
- }
- 
-+#if USE_LIBPANEL
- static void
- make_fullwidth_digit(cchar_t *target, int digit)
- {
-@@ -327,6 +328,7 @@
-     source[1] = 0;
-     setcchar(target, source, A_NORMAL, 0, 0);
- }
-+#endif
- 
- static int
- wGet_wchar(WINDOW *win, wint_t *result)
-@@ -483,7 +485,11 @@
- 	addstr("Shelling out...");
-     def_prog_mode();
-     endwin();
-+#ifdef __MINGW32__
-+    system("cmd.exe");
-+#else
-     system("sh");
-+#endif
-     if (message)
- 	addstr("returned from shellout.\n");
-     refresh();
-@@ -569,8 +575,11 @@
-  *
-  ****************************************************************************/
- 
-+#define NUM_GETCH_FLAGS 256
-+typedef bool GetchFlags[NUM_GETCH_FLAGS];
-+
- static void
--setup_getch(WINDOW *win, bool flags[])
-+setup_getch(WINDOW *win, GetchFlags flags)
- {
-     keypad(win, flags['k']);	/* should be redundant, but for testing */
-     meta(win, flags['m']);	/* force this to a known state */
-@@ -581,7 +590,17 @@
- }
- 
- static void
--wgetch_help(WINDOW *win, bool flags[])
-+init_getch(WINDOW *win, GetchFlags flags)
-+{
-+    memset(flags, FALSE, NUM_GETCH_FLAGS);
-+    flags[UChar('k')] = (win == stdscr);
-+    flags[UChar('m')] = TRUE;
-+
-+    setup_getch(win, flags);
-+}
-+
-+static void
-+wgetch_help(WINDOW *win, GetchFlags flags)
- {
-     static const char *help[] =
-     {
-@@ -657,7 +676,7 @@
- {
-     unsigned need = (level + 1) * 2;
- 
--    assert(level < COLS);
-+    assert(level < (unsigned) COLS);
- 
-     if (winstack == 0) {
- 	len_winstack = 20;
-@@ -731,13 +750,10 @@
-     int first_y, first_x;
-     int c;
-     int incount = 0;
--    bool flags[256];
-+    GetchFlags flags;
-     bool blocking = (delay < 0);
- 
--    memset(flags, FALSE, sizeof(flags));
--    flags[UChar('k')] = (win == stdscr);
--
--    setup_getch(win, flags);
-+    init_getch(win, flags);
-     wtimeout(win, delay);
-     getyx(win, first_y, first_x);
- 
-@@ -835,12 +851,18 @@
- 		}
- #endif
- 		(void) waddstr(win, keyname(c));
--	    } else if (c > 0x80) {
--		unsigned c2 = (unsigned) (c & 0x7f);
--		if (isprint(c2))
--		    (void) wprintw(win, "M-%c", UChar(c2));
--		else
-+	    } else if (c >= 0x80) {
-+		unsigned c2 = (unsigned) c;
-+#if !(defined(NCURSES_VERSION) || defined(_XOPEN_CURSES))
-+		/* at least Solaris SVR4 curses breaks unctrl(128), etc. */
-+		c2 &= 0x7f;
-+#endif
-+		if (isprint(c))
-+		    (void) wprintw(win, "%c", UChar(c));
-+		else if (c2 != UChar(c))
- 		    (void) wprintw(win, "M-%s", unctrl(c2));
-+		else
-+		    (void) wprintw(win, "%s", unctrl(c2));
- 		waddstr(win, " (high-half character)");
- 	    } else {
- 		if (isprint(c))
-@@ -854,6 +876,9 @@
-     }
- 
-     wtimeout(win, -1);
-+
-+    if (!level)
-+	init_getch(win, flags);
- }
- 
- static int
-@@ -905,6 +930,7 @@
-     wgetch_test(0, stdscr, delay);
-     forget_boxes();
-     finish_getch_test();
-+    slk_clear();
- }
- 
- #if USE_WIDEC_SUPPORT
-@@ -978,15 +1004,12 @@
-     int first_y, first_x;
-     wint_t c;
-     int incount = 0;
--    bool flags[256];
-+    GetchFlags flags;
-     bool blocking = (delay < 0);
-     int y, x, code;
-     char *temp;
- 
--    memset(flags, FALSE, sizeof(flags));
--    flags[UChar('k')] = (win == stdscr);
--
--    setup_getch(win, flags);
-+    init_getch(win, flags);
-     wtimeout(win, delay);
-     getyx(win, first_y, first_x);
- 
-@@ -1096,14 +1119,14 @@
- 		    resize_wide_boxes(level, win);
- 		}
- #endif
--		(void) waddstr(win, key_name((wchar_t) c));
-+		(void) waddstr(win, keyname((wchar_t) c));
- 	    } else {
-+		(void) waddstr(win, key_name((wchar_t) c));
- 		if (c < 256 && iscntrl(c)) {
--		    (void) wprintw(win, "%s (control character)", unctrl(c));
-+		    (void) wprintw(win, " (control character)");
- 		} else {
--		    wchar_t c2 = (wchar_t) c;
--		    waddnwstr(win, &c2, 1);
--		    (void) wprintw(win, " = %#x (printable character)", (unsigned) c);
-+		    (void) wprintw(win, " = %#x (printable character)",
-+				   (unsigned) c);
- 		}
- 	    }
- 	    wgetch_wrap(win, first_y);
-@@ -1111,6 +1134,9 @@
-     }
- 
-     wtimeout(win, -1);
-+
-+    if (!level)
-+	init_getch(win, flags);
- }
- 
- static void
-@@ -1122,6 +1148,7 @@
-     wget_wch_test(0, stdscr, delay);
-     forget_boxes();
-     finish_getch_test();
-+    slk_clear();
- }
- #endif
- 
-@@ -1840,6 +1867,8 @@
- 	    width = 4;
- 	} else if (color >= 8) {
- 	    sprintf(temp, "[%02d]", color);
-+	} else if (color < 0) {
-+	    strcpy(temp, "default");
- 	} else {
- 	    strcpy(temp, the_color_names[color]);
- 	}
-@@ -1874,6 +1903,8 @@
-     mvwprintw(helpwin, row++, col,
- 	      "  n/N     toggle text/number on/off");
-     mvwprintw(helpwin, row++, col,
-+	      "  r/R     toggle reverse on/off");
-+    mvwprintw(helpwin, row++, col,
- 	      "  w/W     toggle width between 8/16 colors");
- #if USE_WIDEC_SUPPORT
-     if (wide) {
-@@ -1906,12 +1937,19 @@
-     bool done = FALSE;
-     bool opt_acsc = FALSE;
-     bool opt_bold = FALSE;
--    bool opt_wide = FALSE;
-+    bool opt_revs = FALSE;
-     bool opt_nums = FALSE;
-+    bool opt_wide = FALSE;
-     WINDOW *helpwin;
- 
--    if (pairs_max > COLOR_PAIRS)
--	pairs_max = COLOR_PAIRS;
-+    if (COLORS * COLORS == COLOR_PAIRS) {
-+	int limit = (COLORS - min_colors) * (COLORS - min_colors);
-+	if (pairs_max > limit)
-+	    pairs_max = limit;
-+    } else {
-+	if (pairs_max > COLOR_PAIRS)
-+	    pairs_max = COLOR_PAIRS;
-+    }
- 
-     while (!done) {
- 	int shown = 0;
-@@ -1926,12 +1964,14 @@
- 	    hello = "Hello";
- 	    per_row = 8;
- 	}
-+	per_row -= min_colors;
- 
- 	row_limit = (pairs_max + per_row - 1) / per_row;
- 
- 	move(0, 0);
--	(void) printw("There are %d color pairs and %d colors\n",
--		      pairs_max, COLORS);
-+	(void) printw("There are %d color pairs and %d colors%s\n",
-+		      pairs_max, COLORS,
-+		      min_colors ? " besides 'default'" : "");
- 
- 	clrtobot();
- 	(void) mvprintw(top + 1, 0,
-@@ -1942,7 +1982,7 @@
- 
- 	/* show color names/numbers across the top */
- 	for (i = 0; i < per_row; i++)
--	    show_color_name(top + 2, (i + 1) * width, i, opt_wide);
-+	    show_color_name(top + 2, (i + 1) * width, i + min_colors, opt_wide);
- 
- 	/* show a grid of colors, with color names/ numbers on the left */
- 	for (i = (short) (base_row * per_row); i < pairs_max; i++) {
-@@ -1950,9 +1990,11 @@
- 	    int col = (i % per_row + 1) * width;
- 	    short pair = i;
- 
-+#define InxToFG(i) (short) ((i % (COLORS - min_colors)) + min_colors)
-+#define InxToBG(i) (short) ((i / (COLORS - min_colors)) + min_colors)
- 	    if (row >= 0 && move(row, col) != ERR) {
--		short fg = (short) (i % COLORS);
--		short bg = (short) (i / COLORS);
-+		short fg = InxToFG(i);
-+		short bg = InxToBG(i);
- 
- 		init_pair(pair, fg, bg);
- 		attron((attr_t) COLOR_PAIR(pair));
-@@ -1960,6 +2002,8 @@
- 		    attron((attr_t) A_ALTCHARSET);
- 		if (opt_bold)
- 		    attron((attr_t) A_BOLD);
-+		if (opt_revs)
-+		    attron((attr_t) A_REVERSE);
- 
- 		if (opt_nums) {
- 		    sprintf(numbered, "{%02X}", i);
-@@ -1968,8 +2012,8 @@
- 		printw("%-*.*s", width, width, hello);
- 		attrset(A_NORMAL);
- 
--		if ((i % per_row) == 0 && (i % COLORS) == 0) {
--		    show_color_name(row, 0, i / COLORS, opt_wide);
-+		if ((i % per_row) == 0 && InxToFG(i) == min_colors) {
-+		    show_color_name(row, 0, InxToBG(i), opt_wide);
- 		}
- 		++shown;
- 	    } else if (shown) {
-@@ -1996,6 +2040,12 @@
- 	case 'N':
- 	    opt_nums = TRUE;
- 	    break;
-+	case 'r':
-+	    opt_revs = FALSE;
-+	    break;
-+	case 'R':
-+	    opt_revs = TRUE;
-+	    break;
- 	case case_QUIT:
- 	    done = TRUE;
- 	    continue;
-@@ -2073,7 +2123,7 @@
-     int base_row = 0;
-     int grid_top = top + 3;
-     int page_size = (LINES - grid_top);
--    int pairs_max = COLOR_PAIRS;
-+    int pairs_max = (unsigned short) (-1);
-     int row_limit;
-     int per_row;
-     char numbered[80];
-@@ -2081,12 +2131,22 @@
-     bool done = FALSE;
-     bool opt_acsc = FALSE;
-     bool opt_bold = FALSE;
-+    bool opt_revs = FALSE;
-     bool opt_wide = FALSE;
-     bool opt_nums = FALSE;
-     bool opt_xchr = FALSE;
-     wchar_t buffer[10];
-     WINDOW *helpwin;
- 
-+    if (COLORS * COLORS == COLOR_PAIRS) {
-+	int limit = (COLORS - min_colors) * (COLORS - min_colors);
-+	if (pairs_max > limit)
-+	    pairs_max = limit;
-+    } else {
-+	if (pairs_max > COLOR_PAIRS)
-+	    pairs_max = COLOR_PAIRS;
-+    }
-+
-     while (!done) {
- 	int shown = 0;
- 
-@@ -2100,6 +2160,8 @@
- 	    hello = "Hello";
- 	    per_row = 8;
- 	}
-+	per_row -= min_colors;
-+
- 	if (opt_xchr) {
- 	    make_fullwidth_text(buffer, hello);
- 	    width *= 2;
-@@ -2111,8 +2173,9 @@
- 	row_limit = (pairs_max + per_row - 1) / per_row;
- 
- 	move(0, 0);
--	(void) printw("There are %d color pairs and %d colors\n",
--		      pairs_max, COLORS);
-+	(void) printw("There are %d color pairs and %d colors%s\n",
-+		      pairs_max, COLORS,
-+		      min_colors ? " besides 'default'" : "");
- 
- 	clrtobot();
- 	(void) mvprintw(top + 1, 0,
-@@ -2123,7 +2186,7 @@
- 
- 	/* show color names/numbers across the top */
- 	for (i = 0; i < per_row; i++)
--	    show_color_name(top + 2, (i + 1) * width, i, opt_wide);
-+	    show_color_name(top + 2, (i + 1) * width, i + min_colors, opt_wide);
- 
- 	/* show a grid of colors, with color names/ numbers on the left */
- 	for (i = (base_row * per_row); i < pairs_max; i++) {
-@@ -2132,12 +2195,14 @@
- 	    short pair = (short) i;
- 
- 	    if (row >= 0 && move(row, col) != ERR) {
--		init_pair(pair, (short) (i % COLORS), (short) (i / COLORS));
-+		init_pair(pair, InxToFG(i), InxToBG(i));
- 		color_set(pair, NULL);
- 		if (opt_acsc)
- 		    attr_on((attr_t) A_ALTCHARSET, NULL);
- 		if (opt_bold)
- 		    attr_on((attr_t) A_BOLD, NULL);
-+		if (opt_revs)
-+		    attr_on((attr_t) A_REVERSE, NULL);
- 
- 		if (opt_nums) {
- 		    sprintf(numbered, "{%02X}", i);
-@@ -2150,8 +2215,8 @@
- 		addnwstr(buffer, width);
- 		attr_set(A_NORMAL, 0, NULL);
- 
--		if ((i % per_row) == 0 && (i % COLORS) == 0) {
--		    show_color_name(row, 0, i / COLORS, opt_wide);
-+		if ((i % per_row) == 0 && InxToFG(i) == min_colors) {
-+		    show_color_name(row, 0, InxToBG(i), opt_wide);
- 		}
- 		++shown;
- 	    } else if (shown) {
-@@ -2178,6 +2243,12 @@
- 	case 'N':
- 	    opt_nums = TRUE;
- 	    break;
-+	case 'r':
-+	    opt_revs = FALSE;
-+	    break;
-+	case 'R':
-+	    opt_revs = TRUE;
-+	    break;
- 	case case_QUIT:
- 	    done = TRUE;
- 	    continue;
-@@ -2802,6 +2873,7 @@
- } attrs_to_cycle[] = {
-     { A_NORMAL,		"normal" },
-     { A_BOLD,		"bold" },
-+    { A_BLINK,		"blink" },
-     { A_REVERSE,	"reverse" },
-     { A_UNDERLINE,	"underline" },
- };
-@@ -2902,7 +2974,7 @@
- 	do {
- 	    if (C1)
- 		nodelay(stdscr, TRUE);
--	    echochar(code | attr | COLOR_PAIR(pair));
-+	    echochar(colored_chtype(code, attr, pair));
- 	    if (C1) {
- 		/* (yes, this _is_ crude) */
- 		while ((reply = Getchar()) != ERR) {
-@@ -2951,7 +3023,7 @@
- 		 */
- 		break;
- 	    default:
--		addch(code | A_ALTCHARSET | attr | COLOR_PAIR(pair));
-+		addch(colored_chtype(code, A_ALTCHARSET | attr, pair));
- 		break;
- 	    }
- 	} while (--count > 0);
-@@ -2969,15 +3041,23 @@
-     mvaddstr(0, 20, "Display of the ACS Line-Drawing Set");
-     attroff(A_BOLD);
-     refresh();
--    box(stdscr, 0, 0);
-     /* *INDENT-OFF* */
--    mvhline(LINES / 2, 0,        ACS_HLINE | attr, COLS);
--    mvvline(0,         COLS / 2, ACS_VLINE | attr, LINES);
--    mvaddch(0,         COLS / 2, ACS_TTEE | attr);
--    mvaddch(LINES / 2, COLS / 2, ACS_PLUS | attr);
--    mvaddch(LINES - 1, COLS / 2, ACS_BTEE | attr);
--    mvaddch(LINES / 2, 0,        ACS_LTEE | attr);
--    mvaddch(LINES / 2, COLS - 1, ACS_RTEE | attr);
-+    wborder(stdscr,
-+	    colored_chtype(ACS_VLINE,	 attr, pair),
-+	    colored_chtype(ACS_VLINE,	 attr, pair),
-+            colored_chtype(ACS_HLINE,    attr, pair),
-+	    colored_chtype(ACS_HLINE,	 attr, pair),
-+	    colored_chtype(ACS_ULCORNER, attr, pair),
-+	    colored_chtype(ACS_URCORNER, attr, pair),
-+            colored_chtype(ACS_LLCORNER, attr, pair),
-+	    colored_chtype(ACS_LRCORNER, attr, pair));
-+    mvhline(LINES / 2, 0,        colored_chtype(ACS_HLINE, attr, pair), COLS);
-+    mvvline(0,         COLS / 2, colored_chtype(ACS_VLINE, attr, pair), LINES);
-+    mvaddch(0,         COLS / 2, colored_chtype(ACS_TTEE,  attr, pair));
-+    mvaddch(LINES / 2, COLS / 2, colored_chtype(ACS_PLUS,  attr, pair));
-+    mvaddch(LINES - 1, COLS / 2, colored_chtype(ACS_BTEE,  attr, pair));
-+    mvaddch(LINES / 2, 0,        colored_chtype(ACS_LTEE,  attr, pair));
-+    mvaddch(LINES / 2, COLS - 1, colored_chtype(ACS_RTEE,  attr, pair));
-     /* *INDENT-ON* */
- 
- }
-@@ -3002,7 +3082,7 @@
- {
-     int n;
- 
--#define BOTH(name) #name, (name | attr | COLOR_PAIR(pair))
-+#define BOTH(name) #name, colored_chtype(name, attr, pair)
- 
-     erase();
-     attron(A_BOLD);
-@@ -3161,21 +3241,18 @@
- static cchar_t *
- merge_wide_attr(cchar_t *dst, const cchar_t *src, attr_t attr, short pair)
- {
--    int count = getcchar(src, NULL, NULL, NULL, 0);
--    wchar_t *wch = 0;
--    attr_t ignore_attr;
--    short ignore_pair;
-+    int count;
- 
-     *dst = *src;
--    if (count > 0) {
--	if ((wch = typeMalloc(wchar_t, (unsigned) count + 1)) != 0) {
--	    if (getcchar(src, wch, &ignore_attr, &ignore_pair, 0) != ERR) {
--		attr |= (ignore_attr & A_ALTCHARSET);
--		setcchar(dst, wch, attr, pair, 0);
--	    }
--	    free(wch);
--	}
--    }
-+    do {
-+	TEST_CCHAR(src, count, {
-+	    attr |= (test_attrs & A_ALTCHARSET);
-+	    setcchar(dst, test_wch, attr, pair, NULL);
-+	}
-+	, {
-+	    ;
-+	});
-+    } while (0);
-     return dst;
- }
- 
-@@ -3212,7 +3289,7 @@
- 	     * the display.
- 	     */
- 	    if (wcwidth(code) == 0)
--		addch(space | A_REVERSE);
-+		addch(space | (A_REVERSE ^ attr) | COLOR_PAIR(pair));
- 	    /*
- 	     * This could use add_wch(), but is done for comparison with the
- 	     * normal 'f' test (and to make a test-case for echo_wchar()).
-@@ -3238,7 +3315,7 @@
-     int col = (n / height) * COLS / 2;
- 
-     mvprintw(row, col, "%*s : ", COLS / 4, name);
--    while (repeat-- >= 0) {
-+    while (--repeat >= 0) {
- 	add_wch(code);
-     }
-     return n + 1;
-@@ -3307,12 +3384,12 @@
- 
- #undef MERGE_ATTR
- 
--#define MERGE_ATTR(wch) merge_wide_attr(&temp, wch, attr, pair)
-+#define MERGE_ATTR(n,wch) merge_wide_attr(&temp[n], wch, attr, pair)
- 
- static void
- show_wbox_chars(int repeat, attr_t attr, short pair)
- {
--    cchar_t temp;
-+    cchar_t temp[8];
- 
-     (void) repeat;
-     erase();
-@@ -3321,17 +3398,23 @@
-     attroff(A_BOLD);
-     refresh();
- 
--    attr_set(attr, pair, 0);
--    box_set(stdscr, 0, 0);
--    attr_set(A_NORMAL, 0, 0);
-+    wborder_set(stdscr,
-+		MERGE_ATTR(0, WACS_VLINE),
-+		MERGE_ATTR(1, WACS_VLINE),
-+		MERGE_ATTR(2, WACS_HLINE),
-+		MERGE_ATTR(3, WACS_HLINE),
-+		MERGE_ATTR(4, WACS_ULCORNER),
-+		MERGE_ATTR(5, WACS_URCORNER),
-+		MERGE_ATTR(6, WACS_LLCORNER),
-+		MERGE_ATTR(7, WACS_LRCORNER));
-     /* *INDENT-OFF* */
--    mvhline_set(LINES / 2, 0,        MERGE_ATTR(WACS_HLINE), COLS);
--    mvvline_set(0,         COLS / 2, MERGE_ATTR(WACS_VLINE), LINES);
--    mvadd_wch(0,           COLS / 2, MERGE_ATTR(WACS_TTEE));
--    mvadd_wch(LINES / 2,   COLS / 2, MERGE_ATTR(WACS_PLUS));
--    mvadd_wch(LINES - 1,   COLS / 2, MERGE_ATTR(WACS_BTEE));
--    mvadd_wch(LINES / 2,   0,        MERGE_ATTR(WACS_LTEE));
--    mvadd_wch(LINES / 2,   COLS - 1, MERGE_ATTR(WACS_RTEE));
-+    mvhline_set(LINES / 2, 0,        MERGE_ATTR(0, WACS_HLINE), COLS);
-+    mvvline_set(0,         COLS / 2, MERGE_ATTR(0, WACS_VLINE), LINES);
-+    mvadd_wch(0,           COLS / 2, MERGE_ATTR(0, WACS_TTEE));
-+    mvadd_wch(LINES / 2,   COLS / 2, MERGE_ATTR(0, WACS_PLUS));
-+    mvadd_wch(LINES - 1,   COLS / 2, MERGE_ATTR(0, WACS_BTEE));
-+    mvadd_wch(LINES / 2,   0,        MERGE_ATTR(0, WACS_LTEE));
-+    mvadd_wch(LINES / 2,   COLS - 1, MERGE_ATTR(0, WACS_RTEE));
-     /* *INDENT-ON* */
- 
- }
-@@ -5804,7 +5887,7 @@
- 	break;
-     case 2:
- 	init_pair(cpair, COLOR_RED, COLOR_GREEN);
--	wbkgdset(win, ' ' | A_BLINK | COLOR_PAIR(cpair));
-+	wbkgdset(win, colored_chtype(' ', A_BLINK, cpair));
- 	break;
-     case 3:
- 	wbkgdset(win, ' ' | A_NORMAL);
-diff -Naur ncurses-5.7.orig/test/programs ncurses-5.7/test/programs
---- ncurses-5.7.orig/test/programs	2008-08-16 14:47:39.000000000 -0700
-+++ ncurses-5.7/test/programs	2009-07-19 15:04:15.000000000 -0700
-@@ -1,6 +1,6 @@
--# $Id: programs,v 1.14 2008/08/16 21:47:39 tom Exp $
-+# $Id: programs,v 1.16 2009/07/11 12:47:15 tom Exp $
- ##############################################################################
--# Copyright (c) 2006-2007,2008 Free Software Foundation, Inc.                #
-+# Copyright (c) 2006-2008,2009 Free Software Foundation, Inc.                #
- #                                                                            #
- # Permission is hereby granted, free of charge, to any person obtaining a    #
- # copy of this software and associated documentation files (the "Software"), #
-@@ -35,6 +35,7 @@
- bs		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	bs
- cardfile	$(LDFLAGS_DEFAULT)	$(LOCAL_LIBS)	cardfile
- chgat		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	chgat
-+clip_printw	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	clip_printw
- color_set	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	color_set
- demo_altkeys	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	demo_altkeys
- demo_defkey	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	demo_defkey
-@@ -43,6 +44,7 @@
- demo_menus	$(LDFLAGS_DEFAULT)	$(LOCAL_LIBS)	demo_menus
- demo_panels	$(LDFLAGS_DEFAULT)	$(LOCAL_LIBS)	demo_panels
- demo_termcap	$(LDFLAGS_TINFO)	$(LOCAL_LIBS)	demo_termcap
-+demo_terminfo	$(LDFLAGS_TINFO)	$(LOCAL_LIBS)	demo_terminfo
- ditto		$(LDFLAGS_THREADS)	$(LOCAL_LIBS)	ditto
- dots		$(LDFLAGS_TINFO)	$(LOCAL_LIBS)	dots
- dots_mvcur	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	dots_mvcur
-@@ -57,6 +59,7 @@
- inch_wide	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	inch_wide
- inchs		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	inchs
- ins_wide	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	ins_wide
-+insdelln	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	insdelln
- inserts		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	inserts
- key_names	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	key_names
- keynames	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	keynames
-diff -Naur ncurses-5.7.orig/test/railroad.c ncurses-5.7/test/railroad.c
---- ncurses-5.7.orig/test/railroad.c	2008-02-09 10:08:43.000000000 -0800
-+++ ncurses-5.7/test/railroad.c	2009-07-19 15:02:23.000000000 -0700
-@@ -29,7 +29,7 @@
- /*
-  * Author: Thomas E. Dickey - 2000
-  *
-- * $Id: railroad.c,v 1.16 2008/02/09 18:08:43 tom Exp $
-+ * $Id: railroad.c,v 1.17 2008/12/07 02:07:41 juergen Exp $
-  *
-  * A simple demo of the termcap interface.
-  */
-@@ -82,7 +82,7 @@
- }
- 
- static void
--ShowCursor(int flag)
-+MyShowCursor(int flag)
- {
-     if (startC != 0 && finisC != 0) {
- 	tputs(flag ? startC : finisC, 1, outc);
-@@ -166,7 +166,7 @@
- {
-     Underline(0);
-     StandOut(0);
--    ShowCursor(1);
-+    MyShowCursor(1);
- }
- 
- static void
-@@ -214,14 +214,14 @@
- 	startC = tgetstr("ve", &ap);
- 	finisC = tgetstr("vi", &ap);
- 
--	ShowCursor(0);
-+	MyShowCursor(0);
- 
- 	CATCHALL(onsig);
- 
- 	while (*args) {
- 	    ShowSign(*args++);
- 	}
--	ShowCursor(1);
-+	MyShowCursor(1);
-     }
- }
- 
-diff -Naur ncurses-5.7.orig/test/README ncurses-5.7/test/README
---- ncurses-5.7.orig/test/README	2008-10-18 14:02:45.000000000 -0700
-+++ ncurses-5.7/test/README	2009-07-19 15:04:15.000000000 -0700
-@@ -25,7 +25,7 @@
- -- sale, use or other dealings in this Software without prior written        --
- -- authorization.                                                            --
- -------------------------------------------------------------------------------
---- $Id: README,v 1.38 2008/10/18 21:02:45 tom Exp $
-+-- $Id: README,v 1.40 2009/07/11 19:09:01 tom Exp $
- -------------------------------------------------------------------------------
- 
- The programs in this directory are designed to test your newest toy :-)
-@@ -87,7 +87,7 @@
- field_status			test: demo_forms
- field_term			-
- field_type			test: demo_forms
--field_userptr			test: edit_field ncurses
-+field_userptr			test: demo_forms edit_field ncurses
- form_driver			test: cardfile demo_forms edit_field ncurses
- form_fields			test: cardfile demo_forms
- form_init			-
-@@ -211,14 +211,14 @@
- ----------
- BC				-
- COLORS				test: echochar ncurses savescreen xmas
--COLOR_PAIR			test: background blue bs cardfile demo_forms demo_menus demo_panels echochar filter firework gdc hanoi ins_wide inserts knight ncurses newdemo rain savescreen tclock testaddch testcurs view worm xmas
-+COLOR_PAIR			test: background blue bs cardfile clip_printw demo_forms demo_menus demo_panels echochar filter firework gdc hanoi ins_wide insdelln inserts knight ncurses newdemo rain savescreen tclock testaddch testcurs view worm xmas
- COLOR_PAIRS			test: echochar ncurses newdemo savescreen
- COLS				test: cardfile demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_panels ditto echochar edit_field firework foldkeys hashtest inch_wide inchs ins_wide inserts lrtest movewindow ncurses newdemo rain savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm
- ESCDELAY			test: test_opaque
- LINES				test: cardfile demo_defkey demo_keyok demo_menus demo_panels ditto echochar edit_field firework hanoi hashtest inch_wide inchs ins_wide inserts lrtest movewindow ncurses newdemo rain savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm xmas
- PAIR_NUMBER			test: ncurses
- PC				lib: ncurses
--SP				lib: ncurses
-+SP				lib: menu
- TABSIZE				test: test_opaque
- UP				-
- acs_map				test: gdc ins_wide inserts knight movewindow ncurses newdemo testcurs
-@@ -239,22 +239,22 @@
- attr_set			test: ncurses
- attroff				test: echochar filter gdc ncurses tclock
- attron				test: bs echochar filter gdc ncurses
--attrset				test: bs firework gdc hanoi ncurses rain tclock testaddch testcurs
-+attrset				test: bs firework gdc hanoi insdelln ncurses rain tclock testaddch testcurs
- baudrate			lib: ncurses
--beep				test: blue bs cardfile chgat demo_forms demo_menus demo_panels edit_field hanoi inch_wide inchs ins_wide inserts knight movewindow ncurses savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view xmas
-+beep				test: blue bs cardfile chgat clip_printw demo_forms demo_menus demo_panels edit_field hanoi inch_wide inchs ins_wide insdelln inserts knight movewindow ncurses savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view xmas
- bkgd				test: background cardfile demo_forms ncurses savescreen tclock view
- bkgdset				test: background ncurses testaddch
- bkgrnd				test: ncurses
- bkgrndset			test: ncurses
- boolcodes			test: test_arrays progs: dump_entry
--boolfnames			test: test_arrays progs: dump_entry
--boolnames			test: test_arrays progs: dump_entry infocmp
-+boolfnames			test: demo_terminfo test_arrays progs: dump_entry
-+boolnames			test: demo_terminfo test_arrays progs: dump_entry infocmp
- border				-
- border_set			-
--box				test: cardfile chgat demo_forms demo_menus demo_panels ditto edit_field inch_wide inchs ins_wide inserts lrtest ncurses newdemo redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
-+box				test: cardfile chgat clip_printw demo_forms demo_menus demo_panels ditto edit_field inch_wide inchs ins_wide insdelln inserts lrtest ncurses newdemo redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
- box_set				test: ncurses
- can_change_color		test: ncurses
--cbreak				test: background blue bs cardfile chgat color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_panels ditto filter firework foldkeys gdc hanoi hashtest inch_wide inchs ins_wide inserts knight lrtest movewindow ncurses newdemo savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm xmas
-+cbreak				test: background blue bs cardfile chgat clip_printw color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_panels ditto filter firework foldkeys gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts knight lrtest movewindow ncurses newdemo savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm xmas
- chgat				test: chgat
- clear				test: blue bs gdc ncurses testcurs xmas
- clearok				test: bs knight
-@@ -263,7 +263,7 @@
- color_content			test: ncurses
- color_set			test: color_set ncurses
- copywin				test: ncurses testcurs
--cur_term			test: dots dots_mvcur lrtest progs: clear tput tset
-+cur_term			test: demo_terminfo dots dots_mvcur lrtest progs: clear tabs tput tset
- curs_set			test: echochar firework gdc hanoi lrtest ncurses newdemo rain savescreen tclock testcurs worm xmas
- curscr				test: demo_panels edit_field knight lrtest ncurses savescreen tclock view
- curses_version			test: ncurses progs: infocmp tic toe tput tset
-@@ -273,35 +273,36 @@
- del_curterm			lib: ncurses
- delay_output			test: newdemo
- delch				-
--deleteln			-
-+deleteln			test: insdelln
- delscreen			test: ditto dots_mvcur
--delwin				test: cardfile chgat demo_forms demo_panels edit_field inch_wide inchs ins_wide inserts movewindow ncurses newdemo redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
--derwin				test: cardfile chgat demo_forms demo_menus ditto inch_wide inchs ins_wide inserts movewindow ncurses test_get_wstr test_getstr test_instr test_inwstr test_opaque
-+delwin				test: cardfile chgat clip_printw demo_forms demo_panels edit_field inch_wide inchs ins_wide insdelln inserts movewindow ncurses newdemo redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
-+derwin				test: cardfile chgat clip_printw demo_forms demo_menus ditto inch_wide inchs ins_wide insdelln inserts movewindow ncurses test_get_wstr test_getstr test_instr test_inwstr test_opaque
- doupdate			test: cardfile demo_menus demo_panels ditto edit_field ins_wide inserts knight movewindow ncurses redraw savescreen test_get_wstr test_getstr
- dupwin				test: edit_field
- echo				test: bs hanoi ncurses test_get_wstr test_getstr testcurs testscanw
- echo_wchar			test: ncurses
- echochar			test: echochar ncurses
--endwin				test: background blue bs cardfile chgat color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_panels ditto dots_mvcur echochar filter firework firstlast foldkeys gdc hanoi hashtest inch_wide inchs ins_wide inserts key_names keynames knight lrtest movewindow ncurses newdemo rain redraw savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testaddch testcurs testscanw view worm xmas
-+endwin				test: background blue bs cardfile chgat clip_printw color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_panels ditto dots_mvcur echochar filter firework firstlast foldkeys gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts key_names keynames knight lrtest movewindow ncurses newdemo rain redraw savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testaddch testcurs testscanw view worm xmas
- erase				test: cardfile demo_menus filter firework firstlast hanoi lrtest ncurses tclock test_opaque testcurs
- erasechar			lib: ncurses
- erasewchar			-
- filter				test: filter
- flash				test: cardfile lrtest ncurses tclock testcurs
- flushinp			test: ncurses newdemo testcurs
-+get_escdelay			-
- get_wch				-
- get_wstr			test: test_get_wstr
- getattrs			-
--getbegx				test: chgat demo_menus demo_panels movewindow ncurses newdemo redraw testcurs
--getbegy				test: chgat demo_menus demo_panels movewindow ncurses newdemo redraw testcurs
-+getbegx				test: chgat clip_printw demo_menus demo_panels insdelln movewindow ncurses newdemo redraw testcurs
-+getbegy				test: chgat clip_printw demo_menus demo_panels insdelln movewindow ncurses newdemo redraw testcurs
- getbkgd				test: ncurses
- getbkgrnd			test: ncurses
- getcchar			test: ncurses view
--getch				test: background blue bs chgat color_set demo_altkeys filter firework firstlast foldkeys hanoi hashtest lrtest savescreen tclock test_opaque testaddch testcurs view xmas
--getcurx				test: bs chgat demo_altkeys demo_defkey demo_panels foldkeys movewindow ncurses redraw savescreen test_get_wstr test_getstr test_opaque testcurs
--getcury				test: bs chgat demo_altkeys demo_defkey demo_panels edit_field foldkeys movewindow ncurses redraw savescreen test_opaque testcurs
--getmaxx				test: chgat demo_panels inch_wide inchs movewindow ncurses newdemo redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
--getmaxy				test: chgat demo_forms demo_panels inch_wide inchs movewindow ncurses newdemo redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
-+getch				test: background blue bs chgat color_set demo_altkeys filter firework firstlast foldkeys hanoi hashtest insdelln lrtest savescreen tclock test_opaque testaddch testcurs view xmas
-+getcurx				test: bs chgat clip_printw demo_altkeys demo_defkey demo_panels foldkeys insdelln movewindow ncurses redraw savescreen test_get_wstr test_getstr test_opaque testcurs
-+getcury				test: bs chgat clip_printw demo_altkeys demo_defkey demo_panels edit_field foldkeys insdelln movewindow ncurses redraw savescreen test_opaque testcurs
-+getmaxx				test: chgat clip_printw demo_panels inch_wide inchs insdelln movewindow ncurses newdemo redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
-+getmaxy				test: chgat clip_printw demo_forms demo_panels inch_wide inchs insdelln movewindow ncurses newdemo redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
- getmouse			test: bs knight movewindow ncurses
- getn_wstr			test: test_get_wstr
- getnstr				test: filter ncurses test_getstr
-@@ -310,10 +311,11 @@
- getstr				test: test_getstr
- getwin				test: ncurses
- halfdelay			test: view
--has_colors			test: background bs cardfile chgat color_set demo_forms demo_menus demo_panels echochar filter firework gdc hanoi ins_wide inserts knight ncurses newdemo rain savescreen tclock testcurs view worm xmas
-+has_colors			test: background bs cardfile chgat clip_printw color_set demo_forms demo_menus demo_panels echochar filter firework gdc hanoi ins_wide insdelln inserts knight ncurses newdemo rain savescreen tclock testcurs view worm xmas
- has_ic				test: lrtest
- has_il				lib: ncurses
- has_key				lib: ncurses
-+has_mouse			-
- hline				test: gdc ncurses
- hline_set			-
- idcok				test: test_opaque
-@@ -326,16 +328,16 @@
- inchnstr			test: inchs
- inchstr				test: inchs
- init_color			test: ncurses
--init_pair			test: background blue bs cardfile chgat color_set demo_forms demo_menus demo_panels echochar filter firework gdc hanoi ins_wide inserts knight ncurses newdemo rain savescreen tclock testaddch testcurs view worm xmas
--initscr				test: background blue bs cardfile chgat color_set demo_defkey demo_forms demo_keyok demo_menus demo_panels echochar firework firstlast gdc hanoi hashtest inch_wide inchs ins_wide inserts knight lrtest movewindow ncurses newdemo rain redraw savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testaddch testcurs testscanw view worm xmas
-+init_pair			test: background blue bs cardfile chgat clip_printw color_set demo_forms demo_menus demo_panels echochar filter firework gdc hanoi ins_wide insdelln inserts knight ncurses newdemo rain savescreen tclock testaddch testcurs view worm xmas
-+initscr				test: background blue bs cardfile chgat clip_printw color_set demo_defkey demo_forms demo_keyok demo_menus demo_panels echochar filter firework firstlast gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts knight lrtest movewindow ncurses newdemo rain redraw savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testaddch testcurs testscanw view worm xmas
- innstr				test: test_instr
- innwstr				test: test_inwstr
- ins_nwstr			test: ins_wide
- ins_wch				test: ins_wide
- ins_wstr			test: ins_wide
- insch				test: ins_wide inserts
--insdelln			-
--insertln			-
-+insdelln			test: insdelln
-+insertln			test: insdelln
- insnstr				test: inserts
- insstr				test: inserts
- instr				test: test_instr
-@@ -360,7 +362,7 @@
- keybound			test: demo_altkeys demo_defkey
- keyname				test: demo_altkeys demo_defkey demo_keyok demo_menus edit_field foldkeys keynames movewindow ncurses redraw testcurs view progs: tic
- keyok				test: demo_keyok foldkeys
--keypad				test: bs cardfile chgat demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_panels ditto edit_field filter firework foldkeys hashtest inch_wide inchs ins_wide inserts key_names keynames knight lrtest movewindow ncurses redraw savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs testscanw view
-+keypad				test: bs cardfile chgat clip_printw demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_panels ditto edit_field filter firework foldkeys hashtest inch_wide inchs ins_wide insdelln inserts key_names keynames knight lrtest movewindow ncurses redraw savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs testscanw view
- killchar			lib: ncurses
- killwchar			-
- leaveok				test: hanoi test_opaque
-@@ -450,7 +452,7 @@
- mvwinsstr			test: inserts testcurs
- mvwinstr			test: test_instr
- mvwinwstr			test: test_inwstr
--mvwprintw			test: chgat demo_panels inch_wide inchs ncurses test_instr test_inwstr testcurs
-+mvwprintw			test: chgat clip_printw demo_panels inch_wide inchs insdelln ncurses test_instr test_inwstr testcurs
- mvwscanw			test: testcurs
- mvwvline			test: ins_wide inserts movewindow
- mvwvline_set			-
-@@ -458,19 +460,19 @@
- newpad				test: edit_field ncurses testcurs
- newscr				lib: ncurses
- newterm				test: demo_altkeys ditto dots_mvcur filter foldkeys gdc key_names keynames
--newwin				test: cardfile chgat demo_defkey demo_forms demo_keyok demo_menus demo_panels ditto edit_field firstlast inch_wide inchs ins_wide inserts knight movewindow ncurses newdemo redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs xmas
-+newwin				test: cardfile chgat clip_printw demo_defkey demo_forms demo_keyok demo_menus demo_panels ditto edit_field firstlast inch_wide inchs ins_wide insdelln inserts knight movewindow ncurses newdemo redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs xmas
- nl				test: demo_forms ncurses rain testcurs
- nocbreak			test: testcurs
- nodelay				test: ditto firework gdc lrtest ncurses newdemo rain tclock test_opaque view worm xmas
--noecho				test: background bs cardfile chgat color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_panels ditto firework firstlast foldkeys gdc hanoi hashtest inch_wide inchs ins_wide inserts knight lrtest movewindow ncurses rain redraw savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm xmas
-+noecho				test: background bs cardfile chgat clip_printw color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_panels ditto firework firstlast foldkeys gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts knight lrtest movewindow ncurses rain redraw savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm xmas
- nofilter			-
- nonl				test: bs demo_forms hashtest movewindow ncurses view worm xmas
- noqiflush			-
- noraw				test: demo_forms demo_menus ncurses testcurs
- notimeout			test: test_opaque
- numcodes			test: test_arrays progs: dump_entry
--numfnames			test: test_arrays progs: dump_entry
--numnames			test: test_arrays progs: dump_entry infocmp
-+numfnames			test: demo_terminfo test_arrays progs: dump_entry
-+numnames			test: demo_terminfo test_arrays progs: dump_entry infocmp
- ospeed				progs: tset
- overlay				test: ncurses testcurs xmas
- overwrite			test: ncurses savescreen
-@@ -501,14 +503,14 @@
- scr_set				test: savescreen
- scrl				test: view
- scroll				test: testcurs
--scrollok			test: demo_altkeys demo_defkey demo_keyok demo_panels ditto foldkeys hashtest knight ncurses redraw test_opaque testcurs testscanw view
-+scrollok			test: clip_printw demo_altkeys demo_defkey demo_keyok demo_panels ditto foldkeys hashtest knight ncurses redraw test_opaque testcurs testscanw view
- set_curterm			lib: ncurses
- set_escdelay			test: test_opaque
- set_tabsize			test: test_opaque
- set_term			lib: ncurses
- setcchar			test: demo_panels ins_wide ncurses view
- setscrreg			test: view
--setupterm			test: dots progs: clear tput tset
-+setupterm			test: demo_terminfo dots progs: clear tabs tput tset
- slk_attr			-
- slk_attr_off			-
- slk_attr_on			-
-@@ -528,11 +530,11 @@
- slk_wset			test: ncurses
- standend			test: blue gdc ncurses
- standout			test: blue ncurses
--start_color			test: background blue bs cardfile chgat color_set demo_forms demo_menus demo_panels echochar filter firework gdc hanoi ins_wide inserts knight ncurses newdemo rain savescreen tclock testaddch testcurs view worm xmas
--stdscr				test: bs chgat demo_altkeys demo_forms demo_menus demo_panels ditto filter firework foldkeys gdc hanoi hashtest inch_wide inchs ins_wide inserts key_names keynames knight lrtest movewindow ncurses rain redraw savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs testscanw view worm xmas
-+start_color			test: background blue bs cardfile chgat clip_printw color_set demo_forms demo_menus demo_panels echochar filter firework gdc hanoi ins_wide insdelln inserts knight ncurses newdemo rain savescreen tclock testaddch testcurs view worm xmas
-+stdscr				test: bs chgat clip_printw demo_altkeys demo_forms demo_menus demo_panels ditto filter firework foldkeys gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts key_names keynames knight lrtest movewindow ncurses rain redraw savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs testscanw view worm xmas
- strcodes			test: test_arrays progs: dump_entry
--strfnames			test: test_arrays progs: dump_entry
--strnames			test: foldkeys test_arrays progs: dump_entry infocmp tic
-+strfnames			test: demo_terminfo test_arrays progs: dump_entry
-+strnames			test: demo_terminfo foldkeys test_arrays progs: dump_entry infocmp tic
- subpad				test: testcurs
- subwin				test: movewindow ncurses newdemo testcurs
- syncok				test: test_opaque
-@@ -544,14 +546,14 @@
- tgetnum				test: demo_termcap railroad
- tgetstr				test: demo_termcap railroad
- tgoto				test: railroad
--tigetflag			progs: tput
--tigetnum			test: ncurses progs: tput
--tigetstr			test: blue demo_defkey foldkeys testcurs progs: tput
-+tigetflag			test: demo_terminfo progs: tput
-+tigetnum			test: demo_terminfo ncurses progs: tput
-+tigetstr			test: blue demo_defkey demo_terminfo foldkeys testcurs progs: tput
- timeout				test: rain savescreen
--touchline			test: chgat
--touchwin			test: chgat demo_menus edit_field filter firstlast inch_wide inchs ins_wide inserts movewindow ncurses redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque xmas
--tparm				test: dots dots_mvcur progs: tic tput
--tputs				test: dots dots_mvcur railroad progs: clear tset
-+touchline			test: chgat clip_printw insdelln
-+touchwin			test: chgat clip_printw demo_menus edit_field filter firstlast inch_wide inchs ins_wide insdelln inserts movewindow ncurses redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque xmas
-+tparm				test: dots dots_mvcur progs: tabs tic tput
-+tputs				test: dots dots_mvcur railroad progs: clear tabs tset
- trace				test: demo_menus hanoi hashtest lrtest ncurses testcurs view worm
- ttytype				lib: ncurses
- typeahead			test: testcurs
-@@ -562,7 +564,7 @@
- untouchwin			lib: form
- use_default_colors		test: filter firework gdc hanoi knight ncurses rain tclock worm xmas
- use_env				progs: tput
--use_extended_names		progs: infocmp tic
-+use_extended_names		test: demo_terminfo progs: infocmp tic
- use_legacy_coding		-
- use_screen			test: ditto
- use_window			test: rain worm
-@@ -572,7 +574,7 @@
- vidputs				lib: ncurses
- vline				test: gdc ncurses
- vline_set			-
--vw_printw			-
-+vw_printw			test: clip_printw
- vw_scanw			-
- vwprintw			test: movewindow
- vwscanw				lib: ncurses
-@@ -584,7 +586,7 @@
- waddchstr			-
- waddnstr			lib: menu
- waddnwstr			test: ncurses
--waddstr				test: chgat demo_forms demo_panels edit_field firstlast ins_wide knight ncurses redraw testcurs
-+waddstr				test: chgat clip_printw demo_forms demo_panels edit_field firstlast ins_wide insdelln knight ncurses redraw testcurs
- waddwstr			test: ins_wide test_get_wstr
- wattr_get			-
- wattr_off			lib: ncurses
-@@ -592,21 +594,21 @@
- wattr_set			-
- wattroff			test: demo_forms ncurses testcurs xmas
- wattron				test: testcurs xmas
--wattrset			test: demo_forms ncurses newdemo test_get_wstr test_getstr testcurs xmas
-+wattrset			test: clip_printw demo_forms insdelln ncurses newdemo test_get_wstr test_getstr testcurs xmas
- wbkgd				test: cardfile demo_forms demo_menus ncurses newdemo testcurs
- wbkgdset			test: demo_panels ins_wide inserts ncurses
- wbkgrnd				lib: ncurses
- wbkgrndset			lib: ncurses
--wborder				lib: ncurses
--wborder_set			lib: ncurses
-+wborder				test: ncurses
-+wborder_set			test: ncurses
- wchgat				test: chgat test_get_wstr test_getstr view
- wclear				test: ncurses test_opaque testcurs
- wclrtobot			test: firstlast inch_wide inchs ncurses test_instr test_inwstr testcurs
--wclrtoeol			test: chgat demo_defkey demo_keyok demo_panels firstlast inch_wide inchs ins_wide inserts knight ncurses test_instr test_inwstr testcurs
-+wclrtoeol			test: chgat clip_printw demo_defkey demo_keyok demo_panels firstlast inch_wide inchs ins_wide insdelln inserts knight ncurses test_instr test_inwstr testcurs
- wcolor_set			lib: ncurses
- wcursyncup			lib: form
- wdelch				test: ncurses testcurs
--wdeleteln			test: testcurs
-+wdeleteln			test: insdelln testcurs
- wecho_wchar			lib: ncurses
- wechochar			lib: ncurses
- wenclose			lib: form
-@@ -614,7 +616,7 @@
- wget_wch			test: ins_wide ncurses
- wget_wstr			test: test_get_wstr
- wgetbkgrnd			lib: ncurses
--wgetch				test: cardfile chgat demo_defkey demo_keyok demo_menus demo_panels ditto edit_field gdc inserts knight movewindow ncurses newdemo rain redraw test_opaque testcurs worm
-+wgetch				test: cardfile chgat clip_printw demo_defkey demo_keyok demo_menus demo_panels ditto edit_field gdc insdelln inserts knight movewindow ncurses newdemo rain redraw test_opaque testcurs worm
- wgetn_wstr			test: ncurses test_get_wstr
- wgetnstr			test: ncurses test_getstr
- wgetparent			test: test_opaque
-@@ -634,18 +636,18 @@
- wins_wch			test: ins_wide
- wins_wstr			test: ins_wide
- winsch				test: ins_wide inserts testcurs
--winsdelln			lib: ncurses
--winsertln			test: testcurs
-+winsdelln			test: insdelln
-+winsertln			test: insdelln testcurs
- winsnstr			test: inserts
- winsstr				test: inserts
- winstr				test: test_instr
- winwstr				test: test_inwstr
- wmouse_trafo			lib: form
--wmove				test: chgat demo_altkeys demo_defkey demo_keyok demo_menus demo_panels firstlast foldkeys inch_wide inchs ins_wide inserts knight movewindow ncurses newdemo redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs worm
-+wmove				test: chgat clip_printw demo_altkeys demo_defkey demo_keyok demo_menus demo_panels firstlast foldkeys inch_wide inchs ins_wide insdelln inserts knight movewindow ncurses newdemo redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs worm
- wnoutrefresh			test: demo_menus ditto edit_field inch_wide inchs ins_wide inserts knight movewindow ncurses redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque
--wprintw				test: chgat demo_defkey demo_forms demo_keyok demo_menus demo_panels edit_field inch_wide inchs ins_wide inserts knight movewindow ncurses test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
-+wprintw				test: chgat clip_printw demo_defkey demo_forms demo_keyok demo_menus demo_panels edit_field inch_wide inchs ins_wide insdelln inserts knight movewindow ncurses test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
- wredrawln			test: redraw
--wrefresh			test: chgat demo_forms demo_keyok demo_menus demo_panels edit_field firstlast knight lrtest movewindow ncurses newdemo redraw savescreen tclock testcurs view worm xmas
-+wrefresh			test: chgat clip_printw demo_forms demo_keyok demo_menus demo_panels edit_field firstlast insdelln knight lrtest movewindow ncurses newdemo redraw savescreen tclock testcurs view worm xmas
- wresize				test: cardfile ncurses
- wscanw				test: testcurs
- wscrl				test: ncurses testcurs
-diff -Naur ncurses-5.7.orig/test/test_arrays.c ncurses-5.7/test/test_arrays.c
---- ncurses-5.7.orig/test/test_arrays.c	2008-02-09 10:09:43.000000000 -0800
-+++ ncurses-5.7/test/test_arrays.c	2009-07-19 15:04:17.000000000 -0700
-@@ -26,7 +26,7 @@
-  * authorization.                                                           *
-  ****************************************************************************/
- /*
-- * $Id: test_arrays.c,v 1.3 2008/02/09 18:09:43 tom Exp $
-+ * $Id: test_arrays.c,v 1.4 2009/07/17 00:09:00 tom Exp $
-  *
-  * Author: Thomas E Dickey
-  *
-@@ -47,7 +47,7 @@
- #define USE_TINFO
- #include <test.priv.h>
- 
--#if defined(NCURSES_VERSION) || !defined(_XOPEN_CURSES)
-+#if defined(HAVE_CURSES_DATA_BOOLNAMES) || defined(DECL_CURSES_DATA_BOOLNAMES)
- 
- #define DUMP(name) dump_array(#name, name)
- 
-diff -Naur ncurses-5.7.orig/test/test.priv.h ncurses-5.7/test/test.priv.h
---- ncurses-5.7.orig/test/test.priv.h	2008-10-04 14:53:41.000000000 -0700
-+++ ncurses-5.7/test/test.priv.h	2009-07-19 15:04:17.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -29,7 +29,7 @@
- /****************************************************************************
-  *  Author: Thomas E. Dickey                    1996-on                     *
-  ****************************************************************************/
--/* $Id: test.priv.h,v 1.79 2008/10/04 21:53:41 tom Exp $ */
-+/* $Id: test.priv.h,v 1.91 2009/07/18 12:19:23 tom Exp $ */
- 
- #ifndef __TEST_PRIV_H
- #define __TEST_PRIV_H 1
-@@ -42,14 +42,17 @@
-  */
- #ifdef  HAVE_LIBFORMW
- #define HAVE_LIBFORMW 1
-+#define HAVE_LIBFORM 1
- #endif
- 
- #ifdef  HAVE_LIBMENUW
- #define HAVE_LIBMENUW 1
-+#define HAVE_LIBMENU 1
- #endif
- 
- #ifdef  HAVE_LIBPANELW
- #define HAVE_LIBPANELW 1
-+#define HAVE_LIBPANEL 1
- #endif
- 
- /*
-@@ -207,11 +210,16 @@
- #define NEED_PTEM_H 0
- #endif
- 
-+#ifndef NEED_WCHAR_H
-+#define NEED_WCHAR_H 0
-+#endif
-+
- #ifndef NO_LEAKS
- #define NO_LEAKS 0
- #endif
- 
- #include <stdlib.h>
-+#include <stdarg.h>
- #include <string.h>
- #include <sys/types.h>
- 
-@@ -221,6 +229,13 @@
- 
- #include <signal.h>	/* include before curses.h to work around glibc bug */
- 
-+#if NEED_WCHAR_H
-+#include <wchar.h>
-+#ifdef HAVE_LIBUTF8_H
-+#include <libutf8.h>
-+#endif
-+#endif
-+
- #if defined(HAVE_XCURSES)
- #include <xcurses.h>
- #elif defined(HAVE_NCURSESW_NCURSES_H)
-@@ -359,6 +374,15 @@
- #define KEY_MIN 256	/* not defined in Solaris 8 */
- #endif
- 
-+#ifdef DECL_CURSES_DATA_BOOLNAMES
-+extern char	*boolnames[], *boolcodes[], *boolfnames[],
-+		*numnames[], *numcodes[], *numfnames[],
-+		*strnames[], *strcodes[], *strfnames[];
-+#endif
-+
-+#define colored_chtype(ch, attr, pair) \
-+	((ch) | (attr) | COLOR_PAIR(pair))
-+
- /*
-  * Workaround for HPUX
-  */
-@@ -374,6 +398,25 @@
- #endif
- 
- /*
-+ * Workaround in case getcchar() returns a positive value when the source
-+ * string produces only a L'\0'.
-+ */
-+#define TEST_CCHAR(s, count, then_stmt, else_stmt) \
-+	if ((count = getcchar(s, NULL, NULL, NULL, NULL)) > 0) { \
-+	    wchar_t test_wch[CCHARW_MAX + 2]; \
-+	    attr_t test_attrs; \
-+	    short test_pair; \
-+	    \
-+	    if (getcchar( s, test_wch, &test_attrs, &test_pair, NULL) == OK \
-+		&& test_wch[0] != L'\0') { \
-+		then_stmt \
-+	    } else { \
-+		else_stmt \
-+	    } \
-+	} else { \
-+	    else_stmt \
-+	}
-+/*
-  * These usually are implemented as macros, but may be functions.
-  */
- #if !defined(getcurx) && !HAVE_GETCURX
-@@ -464,6 +507,14 @@
- #define EXIT_FAILURE 1
- #endif
- 
-+#ifdef __MINGW32__
-+#include <nc_mingw.h>
-+/* conflicts in test/firstlast.c */
-+#undef large
-+#undef small
-+
-+#endif
-+
- /* Use this to quiet gcc's -Wwrite-strings warnings, but accommodate SVr4
-  * curses which doesn't have const parameters declared (so far) in the places
-  * that XSI shows.
-@@ -521,6 +572,26 @@
- #endif
- 
- /*
-+ * Workaround to build with Sun's default SVr4 curses.
-+ */
-+#ifdef NCURSES_VERSION
-+#ifndef HAVE_VW_PRINTW
-+#define HAVE_VW_PRINTW 1
-+#endif
-+#endif
-+
-+/*
-+ * ncurses provides arrays of capability names; X/Open discarded these SVr4
-+ * features.  Some implementations continue to provide them (see the test
-+ * configure script).
-+ */
-+#ifdef NCURSES_VERSION
-+#ifndef HAVE_CURSES_DATA_BOOLNAMES
-+#define HAVE_CURSES_DATA_BOOLNAMES 1
-+#endif
-+#endif
-+
-+/*
-  * ncurses uses const in some places where X/Open does (or did) not allow.
-  */
- #ifdef NCURSES_VERSION
-@@ -560,7 +631,7 @@
- #define USING_SCREEN(s,func,data) use_screen(s, (NCURSES_SCREEN_CB) func, data)
- #define WANT_USE_SCREEN() extern void _nc_want_use_screen(void)
- #else
--#define USING_SCREEN(s,func,data) func(s,data)
-+#define USING_SCREEN(s,func,data) func(data)
- #define WANT_USE_SCREEN() extern void _nc_want_use_screen(void)
- #endif
- 
-diff -Naur ncurses-5.7.orig/test/view.c ncurses-5.7/test/view.c
---- ncurses-5.7.orig/test/view.c	2008-09-06 15:10:50.000000000 -0700
-+++ ncurses-5.7/test/view.c	2009-07-19 15:04:17.000000000 -0700
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
-+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -50,7 +50,7 @@
-  * scroll operation worked, and the refresh() code only had to do a
-  * partial repaint.
-  *
-- * $Id: view.c,v 1.69 2008/09/06 22:10:50 tom Exp $
-+ * $Id: view.c,v 1.75 2009/07/19 00:34:07 tom Exp $
-  */
- 
- #include <test.priv.h>
-@@ -62,8 +62,10 @@
- #if HAVE_TERMIOS_H
- # include <termios.h>
- #else
-+#if !defined(__MINGW32__)
- # include <sgtty.h>
- #endif
-+#endif
- 
- #if !defined(sun) || !HAVE_TERMIOS_H
- # if HAVE_SYS_IOCTL_H
-@@ -149,11 +151,19 @@
- {
-     int result = 0;
- #if USE_WIDEC_SUPPORT
-+    int count;
- #endif
- 
- #if USE_WIDEC_SUPPORT
--    while (getcchar(src++, NULL, NULL, NULL, NULL) > 0)
--	result++;
-+    for (;;) {
-+	TEST_CCHAR(src, count, {
-+	    ++result;
-+	    ++src;
-+	}
-+	, {
-+	    break;
-+	})
-+    }
- #else
-     while (*src++)
- 	result++;
-@@ -281,7 +291,7 @@
-     if (optind + 1 != argc)
- 	usage();
- 
--    if ((vec_lines = typeMalloc(NCURSES_CH_T *, MAXLINES + 2)) == 0)
-+    if ((vec_lines = typeCalloc(NCURSES_CH_T *, MAXLINES + 2)) == 0)
- 	usage();
- 
-     fname = argv[optind];
-diff -Naur ncurses-5.7.orig/test/worm.c ncurses-5.7/test/worm.c
---- ncurses-5.7.orig/test/worm.c	2008-10-04 14:54:09.000000000 -0700
-+++ ncurses-5.7/test/worm.c	2009-07-19 15:03:58.000000000 -0700
-@@ -61,7 +61,7 @@
-   traces will be dumped.  The program stops and waits for one character of
-   input at the beginning and end of the interval.
- 
--  $Id: worm.c,v 1.58 2008/10/04 21:54:09 tom Exp $
-+  $Id: worm.c,v 1.59 2008/11/16 00:19:59 juergen Exp $
- */
- 
- #include <test.priv.h>
-@@ -330,7 +330,11 @@
-     while (!quit_worm(((struct worm *) arg) - worm)) {
- 	while (compare < sequence) {
- 	    ++compare;
-+#if HAVE_USE_WINDOW
- 	    use_window(stdscr, draw_worm, arg);
-+#else
-+	    draw_worm(stdscr, arg);
-+#endif
- 	}
-     }
-     Trace(("...start_worm (done)"));
-@@ -356,7 +360,13 @@
-     }
- #else
-     for (n = 0, w = &worm[0]; n < number; n++, w++) {
--	if (USING_WINDOW2(stdscr, draw_worm, w))
-+	if (
-+#if HAVE_USE_WINDOW
-+	       USING_WINDOW2(stdscr, draw_worm, w)
-+#else
-+	       draw_worm(stdscr, w)
-+#endif
-+	    )
- 	    done = TRUE;
-     }
- #endif
-diff -Naur ncurses-5.7.orig/TO-DO ncurses-5.7/TO-DO
---- ncurses-5.7.orig/TO-DO	2008-10-11 12:22:27.000000000 -0700
-+++ ncurses-5.7/TO-DO	2009-07-19 15:01:59.000000000 -0700
-@@ -25,7 +25,7 @@
- -- sale, use or other dealings in this Software without prior written        --
- -- authorization.                                                            --
- -------------------------------------------------------------------------------
---- $Id: TO-DO,v 1.51 2008/10/11 19:22:27 tom Exp $
-+-- $Id: TO-DO,v 1.53 2008/11/28 16:39:12 tom Exp $
- -------------------------------------------------------------------------------
- 
- SHORT-TERM TO-DO ITEMS:
-@@ -45,7 +45,7 @@
- + Scrolling optimization has holes:  for example, it forces repaints of the
-   screen between calls to refresh().
- 
--+ SVr4 uses slightly different rules for determining when softkeys are shown. 
-++ SVr4 uses slightly different rules for determining when softkeys are shown.
-   For example, they are initially displayed (before the ncurses 'e' test
-   activates them), and a touchwin can apparently also force them to be
-   displayed.
-@@ -58,7 +58,7 @@
- + The window classes defined in the c++ subdirectory need documentation.  Some
-   C++ programmer could earn a lot of good karma by doing this...
- 
--+ vid_attr() should support the set_a_attributes (sgr1) string, but does not. 
-++ vid_attr() should support the set_a_attributes (sgr1) string, but does not.
-   There appear to be no terminals that require that functionality.
- 
- + the configure --disable-ext-funcs option does not work for Ada95 tree.
-@@ -66,6 +66,24 @@
- + the --with-pthread configuration builds for Cygwin, but does not work
-   properly (test/worm.c shows all of the worms in the same location).
- 
-++ the Ada95 tree requires a small fix to build on Cygwin, since the GNAT port
-+  to that platform provides an incomplete Interrupts.Names package.  For
-+  instance (your gcc version may be different):
-+        /usr/lib/gcc/i686-pc-cygwin/3.4.4/adainclude/a-intnam.ads
-+
-+  cut here...
-+-------------------------------------------------------------------------------
-+--- a-intnam.ads.orig   2003-10-21 13:41:51.000000000 +0000
-++++ a-intnam.ads        2007-05-05 22:40:02.609375000 +0000
-+@@ -44,5 +44,6 @@
-+
-+    DUMMY_INTERRUPT_1 : constant Interrupt_ID := 1;
-+    DUMMY_INTERRUPT_2 : constant Interrupt_ID := 2;
-++   SIGINT : constant Interrupt_ID := 2;
-+
-+ end Ada.Interrupts.Names;
-+-------------------------------------------------------------------------------
-+
- + the --enable-rpath configure option builds for the corresponding platforms;
-   however combining it with --with-ticlib and --with-termlib does not always
-   produce libraries that can be run without setting environment variables.
-@@ -122,7 +140,7 @@
- 2. DOS port
- 
- Only a few of the files in the library depend on the terminfo format.
--It should be possible to further kernelize the package, then rewrite 
-+It should be possible to further kernelize the package, then rewrite
- a small number of core files to produce a functionally-compatible
- port that would do updates to a memory-mapped screen area.  The first
- result of this would be a DOS port.
-@@ -195,10 +213,10 @@
- 		move_insert, dest_tabs_magic_smso, transparent_underline,
- 		needs_xon_xoff, hard_cursor.
- 	Numerics: lines_of_memory, buttons.
--	Strings: pkey_key, pkey_local, pkey_xmit, underline_char, 
--		enter_xon_mode,	exit_xon_mode, xon_character, xoff_character, 
-+	Strings: pkey_key, pkey_local, pkey_xmit, underline_char,
-+		enter_xon_mode,	exit_xon_mode, xon_character, xoff_character,
- 		display_clock, remove_clock, user[0-5], display_pc_char,
--		enter_scancode_mode, exit_scancode_mode, pc_term_options, 
-+		enter_scancode_mode, exit_scancode_mode, pc_term_options,
- 		scancode_escape, alt_scancode_esc.
- 
- These are the potentially important ones for ncurses.  Notes:
Index: tches/perl-5.10.0-cross_compile-1.patch
===================================================================
--- patches/perl-5.10.0-cross_compile-1.patch	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,5608 +1,0 @@
-diff -Naur perl-5.10.0.orig/Cross/build-arm-n770-sh perl-5.10.0/Cross/build-arm-n770-sh
---- perl-5.10.0.orig/Cross/build-arm-n770-sh	2007-12-18 05:47:07.000000000 -0500
-+++ perl-5.10.0/Cross/build-arm-n770-sh	1969-12-31 19:00:00.000000000 -0500
-@@ -1,74 +0,0 @@
--# this is a build script for ARM-linux cross-compiling.
--# it builds miniperl on HOST and then perl for TARGET
--# this approach is like Perl-CE cross-compiling, and allows
--# for full TARGET perl (as opposed to renamed miniperl)
--
--# to skip Configure/build for HOST miniperl, pass "noconf" argument to this script
--
--# some trick is different, however - the file extension for objects files
--# are choosen to be .${CROSS_NAME}, .armo in our case
--
--# note how invoked Makefile.PL for cross-compilation:
--#   miniperl -MCross Makefile.PL
--
--# steps are:
--# - run HOST configure
--# - build HOST miniperl
--# given freshly-created HOST makefile and existing miniperl fix makefile
--# to use 
--
--CROSS_NAME=arm
--
--# suppose compiler is in /opt/arm-2006q3
--CCPATH=/opt/arm-2006q3
--PATH=$CCPATH/bin:$PATH
--CCPREF=arm-none-linux-gnueabi-
--
--CROSSCC=${CCPREF}gcc
--export CROSSCC
--export CROSS_NAME
--
--cp config.sh-arm-linux-n770 config-${CROSS_NAME}.sh
--
--# following should be done better:
--cd ..
--
--if [[ "x$1" != xnoconf* ]] ; then
--# do miniperl on HOST
--./Configure -des -D prefix=./dummy -Dusedevel
--make miniperl
--make uudmap.h
--# fake uudmap, which should be on HOST
--# TODO - all host utilities should be clearly stated and not built for TARGET
--cp generate_uudmap generate_uudmap.${CROSS_NAME}
--fi
--
--#?? cd Cross
--
--# do the rest for TARGET
--$CROSSCC --version
--
--# call make thusly so it will crosscompile...
--XCOREDIR=xlib/$CROSS_NAME/CORE
--PERL_CONFIG_SH=Cross/config-${CROSS_NAME}.sh
--
--#?? . $PERL_CONFIG_SH 
--
--# make cflags do cross-compile work (now its hackish, will be improved!)
--rm cflags-cross-$CROSS_NAME
--cp Cross/cflags-cross-$CROSS_NAME .
--rm Makefile-cross-$CROSS_NAME
--sh Cross/Makefile-cross-SH
--cp Cross/Makefile-cross-$CROSS_NAME .
--
--mkdir xlib
--mkdir xlib/$CROSS_NAME
--mkdir ${XCOREDIR}
--
--#??OBJ_EXT=.${CROSS_NAME}o
--# TODO these -- AR=${CCPREF}ar LD=${CCPREF}ld
--make -f Makefile-cross-$CROSS_NAME xconfig.h
--make -f Makefile-cross-$CROSS_NAME libperl.${CROSS_NAME}a  OBJ_EXT=.${CROSS_NAME}o EXE_EXT=.$CROSS_NAME LIB_EXT=.${CROSS_NAME}a  AR=${CCPREF}ar LD=${CCPREF}ld
--make -f Makefile-cross-$CROSS_NAME DynaLoader.${CROSS_NAME}o  OBJ_EXT=.${CROSS_NAME}o EXE_EXT=.$CROSS_NAME LIB_EXT=.${CROSS_NAME}a  AR=${CCPREF}ar LD=${CCPREF}ld
--make -f Makefile-cross-$CROSS_NAME perl.${CROSS_NAME}
--
-diff -Naur perl-5.10.0.orig/Cross/cflags-cross-arm perl-5.10.0/Cross/cflags-cross-arm
---- perl-5.10.0.orig/Cross/cflags-cross-arm	2007-12-18 05:47:07.000000000 -0500
-+++ perl-5.10.0/Cross/cflags-cross-arm	1969-12-31 19:00:00.000000000 -0500
-@@ -1,157 +0,0 @@
--#!/bin/sh
--
--# Extra warnings, used e.g. for gcc.
--warn="-Wall -ansi   -W -Wextra -Wdeclaration-after-statement -Wendif-labels -Wc++-compat"
--# Extra standardness.
--stdflags=" -std=c89"
--# Extra extra.
--extra=""
--
--# TODO - remove this Cross-config-xxx stuff
--
--case $PERL_CONFIG_SH in
--'')
--	if test -f Cross/config-arm.sh; then TOP=.;
--	elif test -f ../Cross/config-arm.sh; then TOP=..;
--	elif test -f ../../Cross/config-arm.sh; then TOP=../..;
--	elif test -f ../../../Cross/config-arm.sh; then TOP=../../..;
--	elif test -f ../../../../Cross/config-arm.sh; then TOP=../../../..;
--	else
--		echo "Can't find config-arm.sh."; exit 1
--	fi
--	. $TOP/Cross/config-arm.sh
--	;;
--esac
--
--: syntax: cflags [optimize=XXX] [file[.suffix]]
--: displays the compiler command line for file
--
--case "X$1" in
--Xoptimize=*|X"optimize=*")
--	eval "$1"
--	shift
--	;;
--esac
--
--also=': '
--case $# in
--1) also='echo 1>&2 "	  CCCMD = "'
--esac
--
--case $# in
--0) set *.c; echo "The current C flags are:" ;;
--esac
--
--set `echo "$* " | sed -e 's/\.[oc] / /g' -e "s/\.${CROSS_NAME}o / /g" -e 's/\.obj / /g' -e "s/\\$obj_ext / /g"`
--
--for file do
--
--    case "$#" in
--    1) extra="-o $file.${CROSS_NAME}o $extra";;
--    *) echo $n "    $file.c	$c" ;;
--    esac
--
--    : allow variables like toke_cflags to be evaluated
--
--    if echo $file | grep -v / >/dev/null
--    then
--      eval 'eval ${'"${file}_cflags"'-""}'
--    fi
--
--    : or customize here
--
--    case "$file" in
--    DB_File) ;;
--    GDBM_File) ;;
--    NDBM_File) ;;
--    ODBM_File) ;;
--    POSIX) ;;
--    SDBM_File) ;;
--    av) ;;
--    byterun) ;;
--    deb) ;;
--    dl) ;;
--    doio) ;;
--    doop) ;;
--    dump) ;;
--    globals) ;;
--    gv) ;;
--    hv) ;;
--    locale) ;;
--    madly) ;;
--    main) ;;
--    malloc) ;;
--    mg) ;;
--    miniperlmain) ;;
--    numeric) ;;
--    op) ;;
--    opmini) ;;
--    pad) ;;
--    perl) ;;
--    perlapi) ;;
--    perlmain) ;;
--    perly) ;;
--    pp) ;;
--    pp_ctl) ;;
--    pp_hot) ;;
--    pp_pack) ;;
--    pp_sort) ;;
--    pp_sys) ;;
--    regcomp) ;;
--    regexec) ;;
--    run) ;;
--    scope) ;;
--    sv) ;;
--    taint) ;;
--    toke) ;;
--    universal) ;;
--    usersub) ;;
--    utf8) ;;
--    util) ;;
--    xsutils) ;;
--    *) ;;
--    esac
--
--case "$cc" in
--*g++*)
--  # Extra paranoia in case people have bad canned ccflags:
--  # bad in the sense that the flags are accepted by g++,
--  # but then whined about.
--  for f in -Wdeclaration-after-statement -std=c89
--  do
--    ccflags=`echo $ccflags|sed 's/$f/ /'`
--  done
--  ;;
--esac
--
--case "$cc" in
--*g++*)
--  # Without -Wno-unused-variable g++ 4.x compiles are rather unwatchable
--  # because of all the warnings about Perl___notused, and g++ doesn't do
--  # __attribute__((unused)) (and even if at some stage it may, people do
--  # have older gcc installations), and ((void)x) isn't enough to silence
--  # the noises about XS functions not using their cv parameter, so we need
--  # the -Wno-unused-parameter too.
--  # Yes, we lose some valid warnings, but hopefully other compilers
--  # (like gcc) will still pick up those warnings.
--  for o in -Wno-unused-variable -Wno-unused-parameter
--  do
--    case "$warn" in
--    *$o*) ;;
--    *) warn="$warn $o" ;;
--    esac
--  done
--  ;;
--esac
--
--if test -f .patch; then
--  ccflags="-DPERL_PATCHNUM=`cat .patch` $ccflags"
--fi
--
--    : Can we perhaps use $ansi2knr here
--    echo "$CROSSCC -c -DPERL_CORE $ccflags $stdflags $optimize $warn $extra"
--    eval "$also "'"$CROSSCC -DUSE_CROSS_COMPILE -DPERL_CORE -c $ccflags $stdflags $optimize $warn $extra"'
--
--    . $TOP/Cross/config-arm.sh
--
--done
-diff -Naur perl-5.10.0.orig/Cross/cleanconfig.sh perl-5.10.0/Cross/cleanconfig.sh
---- perl-5.10.0.orig/Cross/cleanconfig.sh	1969-12-31 19:00:00.000000000 -0500
-+++ perl-5.10.0/Cross/cleanconfig.sh	2009-04-05 13:37:35.954482014 -0400
-@@ -0,0 +1,25 @@
-+#!/bin/bash
-+
-+if [ ! -f "$1" ]; then
-+  echo "Usage: $0 filename"
-+  exit 1
-+fi
-+# Package name      : 
-+# Source directory  : 
-+# Configuration time: 
-+# Configured by     : 
-+# Target system     : linux shelby 2.6.27.10-r4 #4 smp sun dec 21 12:36:
-+
-+sed -i.orig "$1" \
-+    -e "/^#.*Package name/d" \
-+    -e "/^#.*Source directory/d" \
-+    -e "/^#.*Configuration time/d" \
-+    -e "/^#.*Configured by/d" \
-+    -e "/^#.*Target system/d" \
-+    -e "s@\(^myhostname=\).*@\1''@g" \
-+    -e "s@\(^mydomain=\).*@\1''@g" \
-+    -e "s@\(^cf_by=\).*@\1''@g" \
-+    -e "s@\(^cf_email=\).*@\1''@g" \
-+    -e "s@\(^perladmin=\).*@\1''@g" \
-+    -e "s@\(^myuname=\).*@\1''@g" \
-+    -e "s@\(^cf_time=\).*@\1''@g"
-diff -Naur perl-5.10.0.orig/Cross/config perl-5.10.0/Cross/config
---- perl-5.10.0.orig/Cross/config	2007-12-18 05:47:07.000000000 -0500
-+++ perl-5.10.0/Cross/config	1969-12-31 19:00:00.000000000 -0500
-@@ -1,23 +0,0 @@
--##############################################################################
--#
--# This is the configuration file used to specify the target platform and
--# required level of debug or optimisation.
--#
--##############################################################################
--
--### Target Arch
--ARCH = arm
--#ARCH = i386-pc
--#ARCH = sh4
--#ARCH = mips
--#ARCH = mipsel
--#ARCH = ppc
--
--## Specific arm
--CONFIG_TARGET_ARM_SA11X0 = 1
--#CONFIG_TARGET_ARM_XSCALE = 1
--
--### Target OS
--OS = linux
--#OS = solaris2.8
--
-diff -Naur perl-5.10.0.orig/Cross/config.sh-arm-linux perl-5.10.0/Cross/config.sh-arm-linux
---- perl-5.10.0.orig/Cross/config.sh-arm-linux	2007-12-18 05:47:07.000000000 -0500
-+++ perl-5.10.0/Cross/config.sh-arm-linux	2009-04-05 13:37:40.274479697 -0400
-@@ -6,11 +6,6 @@
- # instead choose to run each of the .SH files by yourself, or "Configure -S".
- #
- 
--# Package name      : perl5
--# Source directory  : .
--# Configuration time: Wed Sep  3 22:24:58 EDT 2003
--# Configured by     : red
--# Target system     : linux openzaurus.criticalintegration.com 2.4.6-rmk1-np2-embedix #15 Wed Aug 6 07:49:44 UTC 2003 armv4l unknown 
- 
- Author=''
- Date='$Date'
-@@ -33,15 +28,15 @@
- aphostname='/bin/hostname'
- api_revision='5'
- api_subversion='0'
--api_version='9'
-+api_version='10'
- api_versionstring='5.10.0'
- ar='ar'
--archlib='/usr/lib/perl5/5.10.0/armv4l-linux'
--archlibexp='/usr/lib/perl5/5.10.0/armv4l-linux'
-+archlib='/usr/lib/perl5/5.10.0/armv5tel-linux-thread-multi'
-+archlibexp='/usr/lib/perl5/5.10.0/armv5tel-linux-thread-multi'
- archname64=''
--archname='armv4l-linux'
-+archname='armv5tel-linux-thread-multi'
- archobjs=''
--asctime_r_proto='0'
-+asctime_r_proto='REENTRANT_PROTO_B_SB'
- awk='awk'
- baserev='5.0'
- bash=''
-@@ -54,16 +49,16 @@
- castflags='0'
- cat='cat'
- cc='cc'
--cccdlflags='-fpic'
--ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.10.0/armv4l-linux/CORE'
--ccflags='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
-+cccdlflags='-fPIC'
-+ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib/perl5/5.10.0/armv5tel-linux-thread-multi/CORE'
-+ccflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
- ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
--ccname='arm-linux-gcc'
--ccsymbols='__APCS_32__=1 __ARM_ARCH_3__=1 __CHAR_UNSIGNED__=1 __GNUC_MINOR__=95 __arm__=1 __linux=1 __linux__=1 __unix=1 __unix__=1 cpu=arm machine=arm system=posix system=unix'
-+ccname='gcc'
-+ccsymbols=''
- ccversion=''
--cf_by='red'
--cf_email='red@criticalintegration.com'
--cf_time='Wed Sep  3 22:24:58 EDT 2003'
-+cf_by=''
-+cf_email=''
-+cf_time=''
- chgrp=''
- chmod='chmod'
- chown=''
-@@ -75,18 +70,18 @@
- cpio=''
- cpp='cpp'
- cpp_stuff='42'
--cppccsymbols='__ELF__=1 __GNUC__=2 linux=1 unix=1'
--cppflags='-fno-strict-aliasing -I/usr/local/include'
-+cppccsymbols=''
-+cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -I/usr/local/include'
- cpplast='-'
- cppminus='-'
- cpprun='cc -E'
- cppstdin='cc -E'
--cppsymbols='_FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC_MINOR__=95 __GNU_LIBRARY__=6 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=199506 _POSIX_SOURCE=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 __linux=1 __linux__=1 __unix=1 __unix__=1'
--crypt_r_proto='0'
-+cppsymbols='_FILE_OFFSET_BITS=64 _GNU_SOURCE=1 _LARGEFILE64_SOURCE=1 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=200112L _POSIX_SOURCE=1 _REENTRANT=1 _XOPEN_SOURCE=600 _XOPEN_SOURCE_EXTENDED=1 __APCS_32__=1 __ARMEL__=1 __ARM_ARCH_3__=1 __CHAR_BIT__=8 __CHAR_UNSIGNED__=1 __DBL_DENORM_MIN__=4.9406564584124654e-324 __DBL_DIG__=15 __DBL_EPSILON__=2.2204460492503131e-16 __DBL_HAS_DENORM__=1 __DBL_HAS_INFINITY__=1 __DBL_HAS_QUIET_NAN__=1 __DBL_MANT_DIG__=53 __DBL_MAX_10_EXP__=308 __DBL_MAX_EXP__=1024 __DBL_MAX__=1.7976931348623157e+308 __DBL_MIN_10_EXP__=(-307) __DBL_MIN_EXP__=(-1021) __DBL_MIN__=2.2250738585072014e-308 __DEC128_DEN__=0.000000000000000000000000000000001E-6143DL __DEC128_EPSILON__=1E-33DL __DEC128_MANT_DIG__=34 __DEC128_MAX_EXP__=6144 __DEC128_MAX__=9.999999999999999999999999999999999E6144DL __DEC128_MIN_EXP__=(-6143) __DEC128_MIN__=1E-6143DL __DEC32_DEN__=0.000001E-95DF __DEC32_EPSILON__=1E-6DF __DEC32_MANT_DIG__=7 __DEC32_MAX_EXP__=96 __DEC32_MAX__=9.999999E96DF __DEC32_MIN_EXP__=(-95) __DEC32_MIN__=1E-95DF __DEC64_DEN__=0.000000000000001E-383DD __DEC64_EPSILON__=1E-15DD __DEC64_MANT_DIG__=16 __DEC64_MAX_EXP__=384 __DEC64_MAX__=9.999999999999999E384DD __DEC64_MIN_EXP__=(-383) __DEC64_MIN__=1E-383DD __DECIMAL_DIG__=17 __DEC_EVAL_METHOD__=2 __ELF__=1 __FINITE_MATH_ONLY__=0 __FLT_DENORM_MIN__=1.40129846e-45F __FLT_DIG__=6 __FLT_EPSILON__=1.19209290e-7F __FLT_EVAL_METHOD__=0 __FLT_HAS_DENORM__=1 __FLT_HAS_INFINITY__=1 __FLT_HAS_QUIET_NAN__=1 __FLT_MANT_DIG__=24 __FLT_MAX_10_EXP__=38 __FLT_MAX_EXP__=128 __FLT_MAX__=3.40282347e+38F __FLT_MIN_10_EXP__=(-37) __FLT_MIN_EXP__=(-125) __FLT_MIN__=1.17549435e-38F __FLT_RADIX__=2 __GLIBC_MINOR__=9 __GLIBC__=2 __GNUC_GNU_INLINE__=1 __GNUC_MINOR__=3 __GNUC_PATCHLEVEL__=3 __GNUC__=4 __GNU_LIBRARY__=6 __GXX_ABI_VERSION=1002 __INTMAX_MAX__=9223372036854775807LL __INTMAX_TYPE__=long\ long\ int __INT_MAX__=2147483647 __LDBL_DENORM_MIN__=4.9406564584124654e-324L __LDBL_DIG__=15 __LDBL_EPSILON__=2.2204460492503131e-16L __LDBL_HAS_DENORM__=1 __LDBL_HAS_INFINITY__=1 __LDBL_HAS_QUIET_NAN__=1 __LDBL_MANT_DIG__=53 __LDBL_MAX_10_EXP__=308 __LDBL_MAX_EXP__=1024 __LDBL_MAX__=1.7976931348623157e+308L __LDBL_MIN_10_EXP__=(-307) __LDBL_MIN_EXP__=(-1021) __LDBL_MIN__=2.2250738585072014e-308L __LONG_LONG_MAX__=9223372036854775807LL __LONG_MAX__=2147483647L __PTRDIFF_TYPE__=int __REGISTER_PREFIX__= __SCHAR_MAX__=127 __SHRT_MAX__=32767 __SIZEOF_DOUBLE__=8 __SIZEOF_FLOAT__=4 __SIZEOF_INT__=4 __SIZEOF_LONG_DOUBLE__=8 __SIZEOF_LONG_LONG__=8 __SIZEOF_LONG__=4 __SIZEOF_POINTER__=4 __SIZEOF_PTRDIFF_T__=4 __SIZEOF_SHORT__=2 __SIZEOF_SIZE_T__=4 __SIZEOF_WCHAR_T__=4 __SIZEOF_WINT_T__=4 __SIZE_TYPE__=unsigned\ int __STDC_HOSTED__=1 __STDC__=1 __UINTMAX_TYPE__=long\ long\ unsigned\ int __USER_LABEL_PREFIX__= __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_GNU=1 __USE_LARGEFILE64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_POSIX=1 __USE_REENTRANT=1 __USE_SVID=1 __USE_UNIX98=1 __USE_XOPEN=1 __USE_XOPEN_EXTENDED=1 __USING_SJLJ_EXCEPTIONS__=1 __VERSION__="4.3.3" __WCHAR_MAX__=2147483647 __WCHAR_TYPE__=long\ int __WINT_TYPE__=unsigned\ int __arm__=1 __gnu_linux__=1 __linux=1 __linux__=1 __unix=1 __unix__=1 linux=1 unix=1'
-+crypt_r_proto='REENTRANT_PROTO_B_CCS'
- cryptlib=''
- csh='csh'
- ctermid_r_proto='0'
--ctime_r_proto='0'
-+ctime_r_proto='REENTRANT_PROTO_B_SB'
- d_Gconvert='gcvt((x),(n),(b))'
- d_PRIEUldbl='define'
- d_PRIFUldbl='define'
-@@ -107,25 +102,25 @@
- d_aintl='undef'
- d_alarm='define'
- d_archlib='define'
--d_asctime_r='undef'
-+d_asctime_r='define'
- d_atolf='undef'
- d_atoll='define'
--d_attribute_format='undef'
--d_attribute_malloc='undef'
--d_attribute_nonnull='undef'
--d_attribute_noreturn='undef'
--d_attribute_pure='undef'
--d_attribute_unused='undef'
--d_attribute_warn_unused_result='undef'
-+d_attribute_format='define'
-+d_attribute_malloc='define'
-+d_attribute_nonnull='define'
-+d_attribute_noreturn='define'
-+d_attribute_pure='define'
-+d_attribute_unused='define'
-+d_attribute_warn_unused_result='define'
- d_bcmp='define'
- d_bcopy='define'
- d_bsd='undef'
- d_bsdgetpgrp='undef'
- d_bsdsetpgrp='undef'
- d_builtin_choose_expr='define'
--d_builtin_expect='define'
-+d_builtin_expect='undef'
- d_bzero='define'
--d_c99_variadic_macros='undef'
-+d_c99_variadic_macros='define'
- d_casti32='define'
- d_castneg='define'
- d_charvspr='undef'
-@@ -140,11 +135,11 @@
- d_copysignl='define'
- d_cplusplus='undef'
- d_crypt='define'
--d_crypt_r='undef'
--d_csh='define'
--d_ctermid='undef'
-+d_crypt_r='define'
-+d_csh='undef'
-+d_ctermid='define'
- d_ctermid_r='undef'
--d_ctime_r='undef'
-+d_ctime_r='define'
- d_cuserid='define'
- d_dbl_dig='define'
- d_dbminitproto='undef'
-@@ -156,10 +151,10 @@
- d_dlopen='define'
- d_dlsymun='undef'
- d_dosuid='undef'
--d_drand48_r='undef'
-+d_drand48_r='define'
- d_drand48proto='define'
- d_dup2='define'
--d_eaccess='undef'
-+d_eaccess='define'
- d_endgrent='define'
- d_endgrent_r='undef'
- d_endhent='define'
-@@ -174,7 +169,7 @@
- d_endservent_r='undef'
- d_eofnblk='define'
- d_eunice='undef'
--d_faststdio='define'
-+d_faststdio='undef'
- d_fchdir='define'
- d_fchmod='define'
- d_fchown='define'
-@@ -182,7 +177,7 @@
- d_fcntl_can_lock='define'
- d_fd_macros='define'
- d_fd_set='define'
--d_fds_bits='undef'
-+d_fds_bits='define'
- d_fgetpos='define'
- d_finite='define'
- d_finitel='define'
-@@ -205,34 +200,34 @@
- d_fsync='define'
- d_ftello='define'
- d_ftime='undef'
--d_futimes='undef'
-+d_futimes='define'
- d_getcwd='define'
- d_getespwnam='undef'
- d_getfsstat='undef'
- d_getgrent='define'
--d_getgrent_r='undef'
--d_getgrgid_r='undef'
--d_getgrnam_r='undef'
-+d_getgrent_r='define'
-+d_getgrgid_r='define'
-+d_getgrnam_r='define'
- d_getgrps='define'
- d_gethbyaddr='define'
- d_gethbyname='define'
- d_gethent='define'
- d_gethname='define'
--d_gethostbyaddr_r='undef'
--d_gethostbyname_r='undef'
--d_gethostent_r='undef'
-+d_gethostbyaddr_r='define'
-+d_gethostbyname_r='define'
-+d_gethostent_r='define'
- d_gethostprotos='define'
- d_getitimer='define'
- d_getlogin='define'
--d_getlogin_r='undef'
-+d_getlogin_r='define'
- d_getmnt='undef'
- d_getmntent='define'
- d_getnbyaddr='define'
- d_getnbyname='define'
- d_getnent='define'
--d_getnetbyaddr_r='undef'
--d_getnetbyname_r='undef'
--d_getnetent_r='undef'
-+d_getnetbyaddr_r='define'
-+d_getnetbyname_r='define'
-+d_getnetent_r='define'
- d_getnetprotos='define'
- d_getpagsz='define'
- d_getpbyname='define'
-@@ -243,32 +238,32 @@
- d_getpgrp='define'
- d_getppid='define'
- d_getprior='define'
--d_getprotobyname_r='undef'
--d_getprotobynumber_r='undef'
--d_getprotoent_r='undef'
-+d_getprotobyname_r='define'
-+d_getprotobynumber_r='define'
-+d_getprotoent_r='define'
- d_getprotoprotos='define'
- d_getprpwnam='undef'
- d_getpwent='define'
--d_getpwent_r='undef'
--d_getpwnam_r='undef'
--d_getpwuid_r='undef'
-+d_getpwent_r='define'
-+d_getpwnam_r='define'
-+d_getpwuid_r='define'
- d_getsbyname='define'
- d_getsbyport='define'
- d_getsent='define'
--d_getservbyname_r='undef'
--d_getservbyport_r='undef'
--d_getservent_r='undef'
-+d_getservbyname_r='define'
-+d_getservbyport_r='define'
-+d_getservent_r='define'
- d_getservprotos='define'
- d_getspnam='define'
--d_getspnam_r='undef'
-+d_getspnam_r='define'
- d_gettimeod='define'
--d_gmtime_r='undef'
-+d_gmtime_r='define'
- d_gnulibc='define'
- d_grpasswd='define'
- d_hasmntopt='define'
- d_htonl='define'
- d_ilogbl='define'
--d_inc_version_list='define'
-+d_inc_version_list='undef'
- d_index='undef'
- d_inetaton='define'
- d_int64_t='define'
-@@ -282,8 +277,8 @@
- d_ldbl_dig='define'
- d_libm_lib_version='define'
- d_link='define'
--d_localtime_r='undef'
--d_localtime_r_needs_tzset='undef'
-+d_localtime_r='define'
-+d_localtime_r_needs_tzset='define'
- d_locconv='define'
- d_lockf='define'
- d_longdbl='define'
-@@ -329,8 +324,8 @@
- d_nice='define'
- d_nl_langinfo='define'
- d_nv_preserves_uv='define'
--d_nv_zero_is_allbits_zero='undef'
--d_off64_t='undef'
-+d_nv_zero_is_allbits_zero='define'
-+d_off64_t='define'
- d_old_pthread_create_joinable='undef'
- d_oldpthreads='undef'
- d_oldsock='undef'
-@@ -342,12 +337,12 @@
- d_pipe='define'
- d_poll='define'
- d_portable='define'
--d_printf_format_null='undef'
-+d_printf_format_null='define'
- d_procselfexe='define'
- d_pseudofork='undef'
--d_pthread_atfork='undef'
-+d_pthread_atfork='define'
- d_pthread_attr_setscope='define'
--d_pthread_yield='undef'
-+d_pthread_yield='define'
- d_pwage='undef'
- d_pwchange='undef'
- d_pwclass='undef'
-@@ -358,10 +353,10 @@
- d_pwquota='undef'
- d_qgcvt='define'
- d_quad='define'
--d_random_r='undef'
--d_readdir64_r='undef'
-+d_random_r='define'
-+d_readdir64_r='define'
- d_readdir='define'
--d_readdir_r='undef'
-+d_readdir_r='define'
- d_readlink='define'
- d_readv='define'
- d_recvmsg='define'
-@@ -428,36 +423,36 @@
- d_sigprocmask='define'
- d_sigsetjmp='define'
- d_sitearch='define'
--d_snprintf='undef'
--d_sockatmark='undef'
--d_sockatmarkproto='undef'
-+d_snprintf='define'
-+d_sockatmark='define'
-+d_sockatmarkproto='define'
- d_socket='define'
- d_socklen_t='define'
- d_sockpair='define'
- d_socks5_init='undef'
- d_sprintf_returns_strlen='define'
- d_sqrtl='define'
--d_srand48_r='undef'
--d_srandom_r='undef'
--d_sresgproto='undef'
--d_sresuproto='undef'
-+d_srand48_r='define'
-+d_srandom_r='define'
-+d_sresgproto='define'
-+d_sresuproto='define'
- d_statblks='define'
- d_statfs_f_flags='undef'
- d_statfs_s='define'
- d_statvfs='define'
- d_stdio_cnt_lval='undef'
--d_stdio_ptr_lval='define'
-+d_stdio_ptr_lval='undef'
- d_stdio_ptr_lval_nochange_cnt='undef'
--d_stdio_ptr_lval_sets_cnt='define'
-+d_stdio_ptr_lval_sets_cnt='undef'
- d_stdio_stream_array='undef'
--d_stdiobase='define'
--d_stdstdio='define'
-+d_stdiobase='undef'
-+d_stdstdio='undef'
- d_strchr='define'
- d_strcoll='define'
- d_strctcpy='define'
- d_strerrm='strerror(e)'
- d_strerror='define'
--d_strerror_r='undef'
-+d_strerror_r='define'
- d_strftime='define'
- d_strlcat='undef'
- d_strlcpy='undef'
-@@ -486,9 +481,9 @@
- d_times='define'
- d_tm_tm_gmtoff='define'
- d_tm_tm_zone='define'
--d_tmpnam_r='undef'
-+d_tmpnam_r='define'
- d_truncate='define'
--d_ttyname_r='undef'
-+d_ttyname_r='define'
- d_tzname='define'
- d_u32align='undef'
- d_ualarm='define'
-@@ -500,10 +495,10 @@
- d_usleep='define'
- d_usleepproto='define'
- d_ustat='define'
--d_vendorarch='undef'
--d_vendorbin='undef'
--d_vendorlib='undef'
--d_vendorscript='undef'
-+d_vendorarch='define'
-+d_vendorbin='define'
-+d_vendorlib='define'
-+d_vendorscript='define'
- d_vfork='undef'
- d_void_closedir='undef'
- d_voidsig='define'
-@@ -529,8 +524,8 @@
- dlsrc='dl_dlopen.xs'
- doublesize='8'
- drand01='drand48()'
--drand48_r_proto='0'
--dynamic_ext='B ByteLoader Cwd Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared'
-+drand48_r_proto='REENTRANT_PROTO_I_ST'
-+dynamic_ext='attrs B Compress/Raw/Zlib Cwd Data/Dumper Devel/DProf Devel/Peek Devel/PPPort Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call Hash/Util I18N/Langinfo IO IPC/SysV List/Util Math/BigInt/FastCalc MIME/Base64 Opcode PerlIO/encoding PerlIO/scalar PerlIO/via POSIX re SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex threads Time/HiRes Time/Piece Unicode/Normalize XS/APItest XS/Typemap threads/shared Hash/Util/FieldHash'
- eagain='EAGAIN'
- ebcdic='undef'
- echo='echo'
-@@ -545,7 +540,7 @@
- eunicefix=':'
- exe_ext=''
- expr='expr'
--extensions='B ByteLoader Cwd Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared Errno'
-+extensions='attrs B Compress/Raw/Zlib Cwd Data/Dumper Devel/DProf Devel/Peek Devel/PPPort Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call Hash/Util I18N/Langinfo IO IPC/SysV List/Util Math/BigInt/FastCalc MIME/Base64 Opcode PerlIO/encoding PerlIO/scalar PerlIO/via POSIX re SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex threads Time/HiRes Time/Piece Unicode/Normalize XS/APItest XS/Typemap threads/shared Hash/Util/FieldHash Compress/Zlib Errno IO_Compress_Base IO_Compress_Zlib'
- extras=''
- fflushNULL='define'
- fflushall='undef'
-@@ -557,39 +552,39 @@
- freetype='void'
- from=':'
- full_ar='/usr/bin/ar'
--full_csh='/bin/csh'
-+full_csh='csh'
- full_sed='/bin/sed'
- gccansipedantic=''
- gccosandvers=''
--gccversion='2.95.3 20010125 (prerelease)'
--getgrent_r_proto='0'
--getgrgid_r_proto='0'
--getgrnam_r_proto='0'
--gethostbyaddr_r_proto='0'
--gethostbyname_r_proto='0'
--gethostent_r_proto='0'
--getlogin_r_proto='0'
--getnetbyaddr_r_proto='0'
--getnetbyname_r_proto='0'
--getnetent_r_proto='0'
--getprotobyname_r_proto='0'
--getprotobynumber_r_proto='0'
--getprotoent_r_proto='0'
--getpwent_r_proto='0'
--getpwnam_r_proto='0'
--getpwuid_r_proto='0'
--getservbyname_r_proto='0'
--getservbyport_r_proto='0'
--getservent_r_proto='0'
--getspnam_r_proto='0'
-+gccversion='4.3.3'
-+getgrent_r_proto='REENTRANT_PROTO_I_SBWR'
-+getgrgid_r_proto='REENTRANT_PROTO_I_TSBWR'
-+getgrnam_r_proto='REENTRANT_PROTO_I_CSBWR'
-+gethostbyaddr_r_proto='REENTRANT_PROTO_I_TsISBWRE'
-+gethostbyname_r_proto='REENTRANT_PROTO_I_CSBWRE'
-+gethostent_r_proto='REENTRANT_PROTO_I_SBWRE'
-+getlogin_r_proto='REENTRANT_PROTO_I_BW'
-+getnetbyaddr_r_proto='REENTRANT_PROTO_I_uISBWRE'
-+getnetbyname_r_proto='REENTRANT_PROTO_I_CSBWRE'
-+getnetent_r_proto='REENTRANT_PROTO_I_SBWRE'
-+getprotobyname_r_proto='REENTRANT_PROTO_I_CSBWR'
-+getprotobynumber_r_proto='REENTRANT_PROTO_I_ISBWR'
-+getprotoent_r_proto='REENTRANT_PROTO_I_SBWR'
-+getpwent_r_proto='REENTRANT_PROTO_I_SBWR'
-+getpwnam_r_proto='REENTRANT_PROTO_I_CSBWR'
-+getpwuid_r_proto='REENTRANT_PROTO_I_TSBWR'
-+getservbyname_r_proto='REENTRANT_PROTO_I_CCSBWR'
-+getservbyport_r_proto='REENTRANT_PROTO_I_ICSBWR'
-+getservent_r_proto='REENTRANT_PROTO_I_SBWR'
-+getspnam_r_proto='REENTRANT_PROTO_I_CSBWR'
- gidformat='"lu"'
- gidsign='1'
- gidsize='4'
- gidtype='gid_t'
- glibpth='/usr/shlib  /lib /usr/lib /usr/lib/386 /lib/386 /usr/ccs/lib /usr/ucblib /usr/local/lib '
- gmake='gmake'
--gmtime_r_proto='0'
--gnulibc_version='2.2.2'
-+gmtime_r_proto='REENTRANT_PROTO_S_TS'
-+gnulibc_version='2.9'
- grep='grep'
- groupcat='cat /etc/group'
- groupstype='gid_t'
-@@ -697,64 +692,65 @@
- inc_version_list_init='0'
- incpath=''
- inews=''
--installarchlib='./install_me_here/usr/lib/perl5/5.10.0/armv4l-linux'
--installbin='./install_me_here/usr/bin'
-+initialinstalllocation='/usr/bin'
-+installarchlib='/usr/lib/perl5/5.10.0/armv5tel-linux-thread-multi'
-+installbin='/usr/bin'
- installhtml1dir=''
- installhtml3dir=''
--installman1dir='./install_me_here/usr/share/man/man1'
--installman3dir='./install_me_here/usr/share/man/man3'
--installprefix='./install_me_here/usr'
--installprefixexp='./install_me_here/usr'
--installprivlib='./install_me_here/usr/lib/perl5/5.10.0'
--installscript='./install_me_here/usr/bin'
--installsitearch='./install_me_here/usr/lib/perl5/site_perl/5.10.0/armv4l-linux'
--installsitebin='./install_me_here/usr/bin'
-+installman1dir='/usr/share/man/man1'
-+installman3dir='/usr/share/man/man3'
-+installprefix='/usr'
-+installprefixexp='/usr'
-+installprivlib='/usr/lib/perl5/5.10.0'
-+installscript='/usr/bin'
-+installsitearch='/usr/lib/perl5/site_perl/5.10.0/armv5tel-linux-thread-multi'
-+installsitebin='/usr/bin'
- installsitehtml1dir=''
- installsitehtml3dir=''
--installsitelib='./install_me_here/usr/lib/perl5/site_perl/5.10.0'
--installsiteman1dir='./install_me_here/usr/share/man/man1'
--installsiteman3dir='./install_me_here/usr/share/man/man3'
--installsitescript='./install_me_here/usr/bin'
--installstyle='./install_me_herelib/perl5'
-+installsitelib='/usr/lib/perl5/site_perl/5.10.0'
-+installsiteman1dir='/usr/share/man/man1'
-+installsiteman3dir='/usr/share/man/man3'
-+installsitescript='/usr/bin'
-+installstyle='lib/perl5'
- installusrbinperl='undef'
--installvendorarch=''
--installvendorbin=''
-+installvendorarch='/usr/lib/perl5/vendor_perl/5.10.0/armv5tel-linux-thread-multi'
-+installvendorbin='/usr/bin'
- installvendorhtml1dir=''
- installvendorhtml3dir=''
--installvendorlib=''
--installvendorman1dir=''
--installvendorman3dir=''
--installvendorscript=''
-+installvendorlib='/usr/lib/perl5/vendor_perl/5.10.0'
-+installvendorman1dir='/usr/share/man/man1'
-+installvendorman3dir='/usr/share/man/man3'
-+installvendorscript='/usr/bin'
- intsize='4'
--issymlink='/usr/bin/test -h'
-+issymlink='test -h'
- ivdformat='"ld"'
- ivsize='4'
- ivtype='long'
--known_extensions='B ByteLoader Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call GDBM_File I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 NDBM_File ODBM_File Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared'
-+known_extensions='attrs B Compress/Raw/Zlib Cwd Data/Dumper DB_File Devel/DProf Devel/Peek Devel/PPPort Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call GDBM_File Hash/Util I18N/Langinfo IO IPC/SysV List/Util Math/BigInt/FastCalc MIME/Base64 NDBM_File ODBM_File Opcode PerlIO/encoding PerlIO/scalar PerlIO/via POSIX re SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex threads Time/HiRes Time/Piece Unicode/Normalize Win32 Win32API/File Win32CORE XS/APItest XS/Typemap threads/shared Hash/Util/FieldHash'
- ksh=''
- ld='cc'
--lddlflags='-shared -L/usr/local/lib'
-+lddlflags='-shared -O2 -L/usr/local/lib'
- ldflags=' -L/usr/local/lib'
- ldflags_uselargefiles=''
- ldlibpthname='LD_LIBRARY_PATH'
- less='less'
- lib_ext='.a'
--libc='/lib/libc-2.2.2.so'
-+libc='/lib/libc-2.9.so'
- libperl='libperl.so'
- libpth='/usr/local/lib /lib /usr/lib'
--libs='-lnsl -ldl -lm -lcrypt -lutil -lc'
-+libs='-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc'
- libsdirs=' /usr/lib'
--libsfiles=' libnsl.so libdl.so libm.so libcrypt.so libutil.so libc.so'
--libsfound=' /usr/lib/libnsl.so /usr/lib/libdl.so /usr/lib/libm.so /usr/lib/libcrypt.so /usr/lib/libutil.so /usr/lib/libc.so'
-+libsfiles=' libnsl.so libdl.so libm.so libcrypt.so libutil.so libpthread.so libc.so'
-+libsfound=' /usr/lib/libnsl.so /usr/lib/libdl.so /usr/lib/libm.so /usr/lib/libcrypt.so /usr/lib/libutil.so /usr/lib/libpthread.so /usr/lib/libc.so'
- libspath=' /usr/local/lib /lib /usr/lib'
--libswanted='sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m crypt sec util c cposix posix ucb BSD'
-+libswanted='sfio socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m crypt sec util pthread c cposix posix ucb BSD'
- libswanted_uselargefiles=''
- line=''
- lint=''
- lkflags=''
- ln='ln'
- lns='/bin/ln -s'
--localtime_r_proto='0'
-+localtime_r_proto='REENTRANT_PROTO_S_TS'
- locincpth='/usr/local/include /opt/local/include /usr/gnu/include /opt/gnu/include /usr/GNU/include /opt/GNU/include'
- loclibpth='/usr/local/lib /opt/local/lib /usr/gnu/lib /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib'
- longdblsize='8'
-@@ -766,6 +762,9 @@
- lseeksize='8'
- lseektype='off_t'
- mad='undef'
-+madlyh=''
-+madlyobj=''
-+madlysrc=''
- mail=''
- mailx=''
- make='make'
-@@ -787,10 +786,10 @@
- more='more'
- multiarch='undef'
- mv=''
--myarchname='armv4l-linux'
--mydomain='.criticalintegration.com'
--myhostname='openzaurus'
--myuname='linux openzaurus.criticalintegration.com 2.4.6-rmk1-np2-embedix #15 Wed Aug 6 07:49:44 UTC 2003 armv4l unknown '
-+myarchname='armv5tel-linux'
-+mydomain=''
-+myhostname=''
-+myuname=''
- n='-n'
- need_va_copy='undef'
- netdb_hlen_type='size_t'
-@@ -800,7 +799,7 @@
- nm='nm'
- nm_opt=''
- nm_so_opt='--dynamic'
--nonxs_ext='Errno'
-+nonxs_ext='Compress/Zlib Errno IO_Compress_Base IO_Compress_Zlib'
- nroff='nroff'
- nvEUformat='"E"'
- nvFUformat='"F"'
-@@ -817,18 +816,18 @@
- optimize='-O2'
- orderlib='false'
- osname='linux'
--osvers='2.4.6-rmk1-np2-embedix'
-+osvers='2.6.24-rc7'
- otherlibdirs=' '
- package='perl5'
--pager='/usr/bin/less'
-+pager='/bin/less -isR'
- passcat='cat /etc/passwd'
--patchlevel='9'
-+patchlevel='10'
- path_sep=':'
--perl5='/usr/bin/perl'
-+perl5=''
- perl=''
- perl_patchlevel=''
--perladmin='red@criticalintegration.com'
--perllibs='-lnsl -ldl -lm -lcrypt -lutil -lc'
-+perladmin=''
-+perllibs='-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc'
- perlpath='/usr/bin/perl'
- pg='pg'
- phostname='hostname'
-@@ -847,14 +846,15 @@
- quadtype='long long'
- randbits='48'
- randfunc='drand48'
--random_r_proto='0'
-+random_r_proto='REENTRANT_PROTO_I_St'
- randseedtype='long'
- ranlib=':'
- rd_nodata='-1'
--readdir64_r_proto='0'
--readdir_r_proto='0'
-+readdir64_r_proto='REENTRANT_PROTO_I_TSR'
-+readdir_r_proto='REENTRANT_PROTO_I_TSR'
- revision='5'
- rm='rm'
-+rm_try='/bin/rm -f try try a.out .out try.[cho] try..o core core.try* try.core*'
- rmail=''
- run=''
- runnm='false'
-@@ -893,15 +893,15 @@
- shortsize='2'
- shrpenv=''
- shsharp='true'
--sig_count='64'
--sig_name='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN NUM33 NUM34 NUM35 NUM36 NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 NUM43 NUM44 NUM45 NUM46 NUM47 NUM48 NUM49 NUM50 NUM51 NUM52 NUM53 NUM54 NUM55 NUM56 NUM57 NUM58 NUM59 NUM60 NUM61 NUM62 RTMAX IOT CLD POLL UNUSED '
--sig_name_init='"ZERO", "HUP", "INT", "QUIT", "ILL", "TRAP", "ABRT", "BUS", "FPE", "KILL", "USR1", "SEGV", "USR2", "PIPE", "ALRM", "TERM", "STKFLT", "CHLD", "CONT", "STOP", "TSTP", "TTIN", "TTOU", "URG", "XCPU", "XFSZ", "VTALRM", "PROF", "WINCH", "IO", "PWR", "SYS", "RTMIN", "NUM33", "NUM34", "NUM35", "NUM36", "NUM37", "NUM38", "NUM39", "NUM40", "NUM41", "NUM42", "NUM43", "NUM44", "NUM45", "NUM46", "NUM47", "NUM48", "NUM49", "NUM50", "NUM51", "NUM52", "NUM53", "NUM54", "NUM55", "NUM56", "NUM57", "NUM58", "NUM59", "NUM60", "NUM61", "NUM62", "RTMAX", "IOT", "CLD", "POLL", "UNUSED", 0'
--sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 6 17 29 31 '
--sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 6, 17, 29, 31, 0'
--sig_size='68'
-+sig_count='65'
-+sig_name='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS NUM32 NUM33 RTMIN NUM35 NUM36 NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 NUM43 NUM44 NUM45 NUM46 NUM47 NUM48 NUM49 NUM50 NUM51 NUM52 NUM53 NUM54 NUM55 NUM56 NUM57 NUM58 NUM59 NUM60 NUM61 NUM62 NUM63 RTMAX IOT CLD POLL UNUSED '
-+sig_name_init='"ZERO", "HUP", "INT", "QUIT", "ILL", "TRAP", "ABRT", "BUS", "FPE", "KILL", "USR1", "SEGV", "USR2", "PIPE", "ALRM", "TERM", "STKFLT", "CHLD", "CONT", "STOP", "TSTP", "TTIN", "TTOU", "URG", "XCPU", "XFSZ", "VTALRM", "PROF", "WINCH", "IO", "PWR", "SYS", "NUM32", "NUM33", "RTMIN", "NUM35", "NUM36", "NUM37", "NUM38", "NUM39", "NUM40", "NUM41", "NUM42", "NUM43", "NUM44", "NUM45", "NUM46", "NUM47", "NUM48", "NUM49", "NUM50", "NUM51", "NUM52", "NUM53", "NUM54", "NUM55", "NUM56", "NUM57", "NUM58", "NUM59", "NUM60", "NUM61", "NUM62", "NUM63", "RTMAX", "IOT", "CLD", "POLL", "UNUSED", 0'
-+sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 6 17 29 31 '
-+sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 6, 17, 29, 31, 0'
-+sig_size='69'
- signal_t='void'
--sitearch='/usr/lib/perl5/site_perl/5.10.0/armv4l-linux'
--sitearchexp='/usr/lib/perl5/site_perl/5.10.0/armv4l-linux'
-+sitearch='/usr/lib/perl5/site_perl/5.10.0/armv5tel-linux-thread-multi'
-+sitearchexp='/usr/lib/perl5/site_perl/5.10.0/armv5tel-linux-thread-multi'
- sitebin='/usr/bin'
- sitebinexp='/usr/bin'
- sitehtml1dir=''
-@@ -930,8 +930,8 @@
- sort='sort'
- spackage='Perl5'
- spitshell='cat'
--srand48_r_proto='0'
--srandom_r_proto='0'
-+srand48_r_proto='REENTRANT_PROTO_I_LS'
-+srandom_r_proto='REENTRANT_PROTO_I_TS'
- src='.'
- ssizetype='ssize_t'
- startperl='#!/usr/bin/perl'
-@@ -944,10 +944,10 @@
- stdio_filbuf=''
- stdio_ptr='((fp)->_IO_read_ptr)'
- stdio_stream_array=''
--strerror_r_proto='0'
-+strerror_r_proto='REENTRANT_PROTO_B_IBW'
- strings='/usr/include/string.h'
- submit=''
--subversion='3'
-+subversion='0'
- sysman='/usr/share/man/man1'
- tail=''
- tar=''
-@@ -957,13 +957,13 @@
- test='test'
- timeincl='/usr/include/sys/time.h /usr/include/time.h '
- timetype='time_t'
--tmpnam_r_proto='0'
-+tmpnam_r_proto='REENTRANT_PROTO_B_B'
- to=':'
- touch='touch'
- tr='tr'
- trnl='\n'
- troff=''
--ttyname_r_proto='0'
-+ttyname_r_proto='REENTRANT_PROTO_I_IBW'
- u16size='2'
- u16type='unsigned short'
- u32size='4'
-@@ -984,13 +984,13 @@
- use64bitint='undef'
- usecrosscompile='undef'
- usedl='define'
--usefaststdio='define'
--useithreads='undef'
-+usefaststdio='undef'
-+useithreads='define'
- uselargefiles='define'
- uselongdouble='undef'
- usemallocwrap='define'
- usemorebits='undef'
--usemultiplicity='undef'
-+usemultiplicity='define'
- usemymalloc='n'
- usenm='false'
- useopcode='true'
-@@ -1002,8 +1002,8 @@
- useshrplib='true'
- usesitecustomize='undef'
- usesocks='undef'
--usethreads='undef'
--usevendorprefix='undef'
-+usethreads='define'
-+usevendorprefix='define'
- usevfork='false'
- usrinc='/usr/include'
- uuname=''
-@@ -1013,27 +1013,27 @@
- uvtype='unsigned long'
- uvuformat='"lu"'
- uvxformat='"lx"'
--vendorarch=''
--vendorarchexp=''
--vendorbin=''
--vendorbinexp=''
-+vendorarch='/usr/lib/perl5/vendor_perl/5.10.0/armv5tel-linux-thread-multi'
-+vendorarchexp='/usr/lib/perl5/vendor_perl/5.10.0/armv5tel-linux-thread-multi'
-+vendorbin='/usr/bin'
-+vendorbinexp='/usr/bin'
- vendorhtml1dir=' '
- vendorhtml1direxp=''
- vendorhtml3dir=' '
- vendorhtml3direxp=''
--vendorlib=''
--vendorlib_stem=''
--vendorlibexp=''
--vendorman1dir=' '
--vendorman1direxp=''
--vendorman3dir=' '
--vendorman3direxp=''
--vendorprefix=''
--vendorprefixexp=''
--vendorscript=''
--vendorscriptexp=''
-+vendorlib='/usr/lib/perl5/vendor_perl/5.10.0'
-+vendorlib_stem='/usr/lib/perl5/vendor_perl'
-+vendorlibexp='/usr/lib/perl5/vendor_perl/5.10.0'
-+vendorman1dir='/usr/share/man/man1'
-+vendorman1direxp='/usr/share/man/man1'
-+vendorman3dir='/usr/share/man/man3'
-+vendorman3direxp='/usr/share/man/man3'
-+vendorprefix='/usr'
-+vendorprefixexp='/usr'
-+vendorscript='/usr/bin'
-+vendorscriptexp='/usr/bin'
- version='5.10.0'
--version_patchlevel_string='version 9 subversion 4'
-+version_patchlevel_string='version 10 subversion 0'
- versiononly='undef'
- vi=''
- voidflags='15'
-@@ -1044,13 +1044,24 @@
- zip='zip'
- # Configure command line arguments.
- config_arg0='Configure'
--config_args=''
--config_argc=0
-+config_args='-ds -e -Dprefix=/usr -Dvendorprefix=/usr -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dpager=/bin/less -isR -Dusethreads -Duseshrplib'
-+config_argc=9
-+config_arg1='-ds'
-+config_arg2='-e'
-+config_arg3='-Dprefix=/usr'
-+config_arg4='-Dvendorprefix=/usr'
-+config_arg5='-Dman1dir=/usr/share/man/man1'
-+config_arg6='-Dman3dir=/usr/share/man/man3'
-+config_arg7='-Dpager=/bin/less -isR'
-+config_arg8='-Dusethreads'
-+config_arg9='-Duseshrplib'
- PERL_REVISION=5
--PERL_VERSION=9
--PERL_SUBVERSION=4
-+PERL_VERSION=10
-+PERL_SUBVERSION=0
- PERL_API_REVISION=5
--PERL_API_VERSION=9
-+PERL_API_VERSION=10
- PERL_API_SUBVERSION=0
- PERL_PATCHLEVEL=
- PERL_CONFIG_SH=true
-+# Variables propagated from previous config.sh file.
-+libdb_needs_pthread='N'
-diff -Naur perl-5.10.0.orig/Cross/config.sh-arm-linux-n770 perl-5.10.0/Cross/config.sh-arm-linux-n770
---- perl-5.10.0.orig/Cross/config.sh-arm-linux-n770	2007-12-18 05:47:07.000000000 -0500
-+++ perl-5.10.0/Cross/config.sh-arm-linux-n770	1969-12-31 19:00:00.000000000 -0500
-@@ -1,1056 +0,0 @@
--#!/bin/sh
--#
--# This file was produced by running the Configure script. It holds all the
--# definitions figured out by Configure. Should you modify one of these values,
--# do not forget to propagate your changes by running "Configure -der". You may
--# instead choose to run each of the .SH files by yourself, or "Configure -S".
--#
--
--# Package name      : perl5
--# Source directory  : .
--# Configuration time: Wed Sep  3 22:24:58 EDT 2003
--# Configured by     : vadrer
--# Target system     : linux nokia770 armv5teji1
--
--Author=''
--Date='$Date'
--Header=''
--Id='$Id'
--Locker=''
--Log='$Log'
--Mcc='Mcc'
--RCSfile='$RCSfile'
--Revision='$Revision'
--Source=''
--State=''
--_a='.arma'
--_exe='.arm'
--_o='.armo'
--afs='false'
--afsroot='/afs'
--alignbytes='4'
--ansi2knr=''
--aphostname='/bin/hostname'
--api_revision='5'
--api_subversion='0'
--api_version='9'
--api_versionstring='5.10.0'
--ar='ar'
--archlib='/usr/lib/perl5/5.10.0/armv4l-linux'
--archlibexp='/usr/lib/perl5/5.10.0/armv4l-linux'
--archname64=''
--archname='armv4l-linux'
--archobjs=''
--asctime_r_proto='0'
--awk='awk'
--baserev='5.0'
--bash=''
--bin='/usr/bin'
--binexp='/usr/bin'
--bison='bison'
--byacc='byacc'
--byteorder='1234'
--c=''
--castflags='0'
--cat='cat'
--cc='arm-none-linux-gnueabi-gcc'
--cccdlflags='-fpic'
--ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.10.0/armv4l-linux/CORE'
--ccflags='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
--ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
--ccname='arm-linux-gcc'
--ccsymbols='__APCS_32__=1 __ARM_ARCH_3__=1 __CHAR_UNSIGNED__=1 __GNUC_MINOR__=95 __arm__=1 __linux=1 __linux__=1 __unix=1 __unix__=1 cpu=arm machine=arm system=posix system=unix'
--ccversion=''
--cf_by='red'
--cf_email='red@criticalintegration.com'
--cf_time='Wed Sep  3 22:24:58 EDT 2003'
--chgrp=''
--chmod='chmod'
--chown=''
--clocktype='clock_t'
--comm='comm'
--compress=''
--contains='grep'
--cp='cp'
--cpio=''
--cpp='cpp'
--cpp_stuff='42'
--cppccsymbols='__ELF__=1 __GNUC__=2 linux=1 unix=1'
--cppflags='-fno-strict-aliasing -I/usr/local/include'
--cpplast='-'
--cppminus='-'
--cpprun='arm-none-linux-gnueabi-gcc -E'
--cppstdin='arm-none-linux-gnueabi-gcc -E'
--cppsymbols='_FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC_MINOR__=95 __GNU_LIBRARY__=6 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=199506 _POSIX_SOURCE=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 __linux=1 __linux__=1 __unix=1 __unix__=1'
--crypt_r_proto='0'
--cryptlib=''
--csh='csh'
--ctermid_r_proto='0'
--ctime_r_proto='0'
--d_Gconvert='gcvt((x),(n),(b))'
--d_PRIEUldbl='define'
--d_PRIFUldbl='define'
--d_PRIGUldbl='define'
--d_PRIXU64='define'
--d_PRId64='define'
--d_PRIeldbl='define'
--d_PRIfldbl='define'
--d_PRIgldbl='define'
--d_PRIi64='define'
--d_PRIo64='define'
--d_PRIu64='define'
--d_PRIx64='define'
--d_SCNfldbl='define'
--d__fwalk='undef'
--d_access='define'
--d_accessx='undef'
--d_aintl='undef'
--d_alarm='define'
--d_archlib='define'
--d_asctime_r='undef'
--d_atolf='undef'
--d_atoll='define'
--d_attribute_format='undef'
--d_attribute_malloc='undef'
--d_attribute_nonnull='undef'
--d_attribute_noreturn='undef'
--d_attribute_pure='undef'
--d_attribute_unused='undef'
--d_attribute_warn_unused_result='undef'
--d_bcmp='define'
--d_bcopy='define'
--d_bsd='undef'
--d_bsdgetpgrp='undef'
--d_bsdsetpgrp='undef'
--d_builtin_choose_expr='define'
--d_builtin_expect='define'
--d_bzero='define'
--d_c99_variadic_macros='undef'
--d_casti32='define'
--d_castneg='define'
--d_charvspr='undef'
--d_chown='define'
--d_chroot='define'
--d_chsize='undef'
--d_class='undef'
--d_clearenv='define'
--d_closedir='define'
--d_cmsghdr_s='define'
--d_const='define'
--d_copysignl='define'
--d_cplusplus='undef'
--d_crypt='define'
--d_crypt_r='undef'
--d_csh='define'
--d_ctermid='undef'
--d_ctermid_r='undef'
--d_ctime_r='undef'
--d_cuserid='define'
--d_dbl_dig='define'
--d_dbminitproto='undef'
--d_difftime='define'
--d_dir_dd_fd='undef'
--d_dirfd='define'
--d_dirnamlen='undef'
--d_dlerror='define'
--d_dlopen='define'
--d_dlsymun='undef'
--d_dosuid='undef'
--d_drand48_r='undef'
--d_drand48proto='define'
--d_dup2='define'
--d_eaccess='undef'
--d_endgrent='define'
--d_endgrent_r='undef'
--d_endhent='define'
--d_endhostent_r='undef'
--d_endnent='define'
--d_endnetent_r='undef'
--d_endpent='define'
--d_endprotoent_r='undef'
--d_endpwent='define'
--d_endpwent_r='undef'
--d_endsent='define'
--d_endservent_r='undef'
--d_eofnblk='define'
--d_eunice='undef'
--d_faststdio='define'
--d_fchdir='define'
--d_fchmod='define'
--d_fchown='define'
--d_fcntl='define'
--d_fcntl_can_lock='define'
--d_fd_macros='define'
--d_fd_set='define'
--d_fds_bits='undef'
--d_fgetpos='define'
--d_finite='define'
--d_finitel='define'
--d_flexfnam='define'
--d_flock='define'
--d_flockproto='define'
--d_fork='define'
--d_fp_class='undef'
--d_fpathconf='define'
--d_fpclass='undef'
--d_fpclassify='undef'
--d_fpclassl='undef'
--d_fpos64_t='undef'
--d_frexpl='define'
--d_fs_data_s='undef'
--d_fseeko='define'
--d_fsetpos='define'
--d_fstatfs='define'
--d_fstatvfs='define'
--d_fsync='define'
--d_ftello='define'
--d_ftime='undef'
--d_futimes='undef'
--d_getcwd='define'
--d_getespwnam='undef'
--d_getfsstat='undef'
--d_getgrent='define'
--d_getgrent_r='undef'
--d_getgrgid_r='undef'
--d_getgrnam_r='undef'
--d_getgrps='define'
--d_gethbyaddr='define'
--d_gethbyname='define'
--d_gethent='define'
--d_gethname='define'
--d_gethostbyaddr_r='undef'
--d_gethostbyname_r='undef'
--d_gethostent_r='undef'
--d_gethostprotos='define'
--d_getitimer='define'
--d_getlogin='define'
--d_getlogin_r='undef'
--d_getmnt='undef'
--d_getmntent='define'
--d_getnbyaddr='define'
--d_getnbyname='define'
--d_getnent='define'
--d_getnetbyaddr_r='undef'
--d_getnetbyname_r='undef'
--d_getnetent_r='undef'
--d_getnetprotos='define'
--d_getpagsz='define'
--d_getpbyname='define'
--d_getpbynumber='define'
--d_getpent='define'
--d_getpgid='define'
--d_getpgrp2='undef'
--d_getpgrp='define'
--d_getppid='define'
--d_getprior='define'
--d_getprotobyname_r='undef'
--d_getprotobynumber_r='undef'
--d_getprotoent_r='undef'
--d_getprotoprotos='define'
--d_getprpwnam='undef'
--d_getpwent='define'
--d_getpwent_r='undef'
--d_getpwnam_r='undef'
--d_getpwuid_r='undef'
--d_getsbyname='define'
--d_getsbyport='define'
--d_getsent='define'
--d_getservbyname_r='undef'
--d_getservbyport_r='undef'
--d_getservent_r='undef'
--d_getservprotos='define'
--d_getspnam='define'
--d_getspnam_r='undef'
--d_gettimeod='define'
--d_gmtime_r='undef'
--d_gnulibc='define'
--d_grpasswd='define'
--d_hasmntopt='define'
--d_htonl='define'
--d_ilogbl='define'
--d_inc_version_list='define'
--d_index='undef'
--d_inetaton='define'
--d_int64_t='define'
--d_isascii='define'
--d_isfinite='undef'
--d_isinf='define'
--d_isnan='define'
--d_isnanl='define'
--d_killpg='define'
--d_lchown='define'
--d_ldbl_dig='define'
--d_libm_lib_version='define'
--d_link='define'
--d_localtime_r='undef'
--d_localtime_r_needs_tzset='undef'
--d_locconv='define'
--d_lockf='define'
--d_longdbl='define'
--d_longlong='define'
--d_lseekproto='define'
--d_lstat='define'
--d_madvise='define'
--d_malloc_good_size='undef'
--d_malloc_size='undef'
--d_mblen='define'
--d_mbstowcs='define'
--d_mbtowc='define'
--d_memchr='define'
--d_memcmp='define'
--d_memcpy='define'
--d_memmove='define'
--d_memset='define'
--d_mkdir='define'
--d_mkdtemp='define'
--d_mkfifo='define'
--d_mkstemp='define'
--d_mkstemps='undef'
--d_mktime='define'
--d_mmap='define'
--d_modfl='define'
--d_modfl_pow32_bug='undef'
--d_modflproto='undef'
--d_mprotect='define'
--d_msg='define'
--d_msg_ctrunc='define'
--d_msg_dontroute='define'
--d_msg_oob='define'
--d_msg_peek='define'
--d_msg_proxy='define'
--d_msgctl='define'
--d_msgget='define'
--d_msghdr_s='define'
--d_msgrcv='define'
--d_msgsnd='define'
--d_msync='define'
--d_munmap='define'
--d_mymalloc='undef'
--d_nice='define'
--d_nl_langinfo='define'
--d_nv_preserves_uv='define'
--d_nv_zero_is_allbits_zero='undef'
--d_off64_t='undef'
--d_old_pthread_create_joinable='undef'
--d_oldpthreads='undef'
--d_oldsock='undef'
--d_open3='define'
--d_pathconf='define'
--d_pause='define'
--d_perl_otherlibdirs='undef'
--d_phostname='undef'
--d_pipe='define'
--d_poll='define'
--d_portable='define'
--d_printf_format_null='undef'
--d_procselfexe='define'
--d_pseudofork='undef'
--d_pthread_atfork='undef'
--d_pthread_attr_setscope='define'
--d_pthread_yield='undef'
--d_pwage='undef'
--d_pwchange='undef'
--d_pwclass='undef'
--d_pwcomment='undef'
--d_pwexpire='undef'
--d_pwgecos='define'
--d_pwpasswd='define'
--d_pwquota='undef'
--d_qgcvt='define'
--d_quad='define'
--d_random_r='undef'
--d_readdir64_r='undef'
--d_readdir='define'
--d_readdir_r='undef'
--d_readlink='define'
--d_readv='define'
--d_recvmsg='define'
--d_rename='define'
--d_rewinddir='define'
--d_rmdir='define'
--d_safebcpy='undef'
--d_safemcpy='undef'
--d_sanemcmp='define'
--d_sbrkproto='define'
--d_scalbnl='define'
--d_sched_yield='define'
--d_scm_rights='define'
--d_seekdir='define'
--d_select='define'
--d_sem='define'
--d_semctl='define'
--d_semctl_semid_ds='define'
--d_semctl_semun='define'
--d_semget='define'
--d_semop='define'
--d_sendmsg='define'
--d_setegid='define'
--d_seteuid='define'
--d_setgrent='define'
--d_setgrent_r='undef'
--d_setgrps='define'
--d_sethent='define'
--d_sethostent_r='undef'
--d_setitimer='define'
--d_setlinebuf='define'
--d_setlocale='define'
--d_setlocale_r='undef'
--d_setnent='define'
--d_setnetent_r='undef'
--d_setpent='define'
--d_setpgid='define'
--d_setpgrp2='undef'
--d_setpgrp='define'
--d_setprior='define'
--d_setproctitle='undef'
--d_setprotoent_r='undef'
--d_setpwent='define'
--d_setpwent_r='undef'
--d_setregid='define'
--d_setresgid='define'
--d_setresuid='define'
--d_setreuid='define'
--d_setrgid='undef'
--d_setruid='undef'
--d_setsent='define'
--d_setservent_r='undef'
--d_setsid='define'
--d_setvbuf='define'
--d_sfio='undef'
--d_shm='define'
--d_shmat='define'
--d_shmatprototype='define'
--d_shmctl='define'
--d_shmdt='define'
--d_shmget='define'
--d_sigaction='define'
--d_signbit='define'
--d_sigprocmask='define'
--d_sigsetjmp='define'
--d_sitearch='define'
--d_snprintf='undef'
--d_sockatmark='undef'
--d_sockatmarkproto='undef'
--d_socket='define'
--d_socklen_t='define'
--d_sockpair='define'
--d_socks5_init='undef'
--d_sprintf_returns_strlen='define'
--d_sqrtl='define'
--d_srand48_r='undef'
--d_srandom_r='undef'
--d_sresgproto='undef'
--d_sresuproto='undef'
--d_statblks='define'
--d_statfs_f_flags='undef'
--d_statfs_s='define'
--d_statvfs='define'
--d_stdio_cnt_lval='undef'
--d_stdio_ptr_lval='define'
--d_stdio_ptr_lval_nochange_cnt='undef'
--d_stdio_ptr_lval_sets_cnt='define'
--d_stdio_stream_array='undef'
--d_stdiobase='define'
--d_stdstdio='define'
--d_strchr='define'
--d_strcoll='define'
--d_strctcpy='define'
--d_strerrm='strerror(e)'
--d_strerror='define'
--d_strerror_r='undef'
--d_strftime='define'
--d_strlcat='undef'
--d_strlcpy='undef'
--d_strtod='define'
--d_strtol='define'
--d_strtold='define'
--d_strtoll='define'
--d_strtoq='define'
--d_strtoul='define'
--d_strtoull='define'
--d_strtouq='define'
--d_strxfrm='define'
--d_suidsafe='undef'
--d_symlink='define'
--d_syscall='define'
--d_syscallproto='define'
--d_sysconf='define'
--d_sysernlst=''
--d_syserrlst='define'
--d_system='define'
--d_tcgetpgrp='define'
--d_tcsetpgrp='define'
--d_telldir='define'
--d_telldirproto='define'
--d_time='define'
--d_times='define'
--d_tm_tm_gmtoff='define'
--d_tm_tm_zone='define'
--d_tmpnam_r='undef'
--d_truncate='define'
--d_ttyname_r='undef'
--d_tzname='define'
--d_u32align='undef'
--d_ualarm='define'
--d_umask='define'
--d_uname='define'
--d_union_semun='undef'
--d_unordered='undef'
--d_unsetenv='define'
--d_usleep='define'
--d_usleepproto='define'
--d_ustat='define'
--d_vendorarch='undef'
--d_vendorbin='undef'
--d_vendorlib='undef'
--d_vendorscript='undef'
--d_vfork='undef'
--d_void_closedir='undef'
--d_voidsig='define'
--d_voidtty=''
--d_volatile='define'
--d_vprintf='define'
--d_vsnprintf='define'
--d_wait4='define'
--d_waitpid='define'
--d_wcstombs='define'
--d_wctomb='define'
--d_writev='define'
--d_xenix='undef'
--date='date'
--db_hashtype='u_int32_t'
--db_prefixtype='size_t'
--db_version_major=''
--db_version_minor=''
--db_version_patch=''
--defvoidused='15'
--direntrytype='struct dirent'
--dlext='so'
--dlsrc='dl_dlopen.xs'
--doublesize='8'
--drand01='drand48()'
--drand48_r_proto='0'
--dynamic_ext='B ByteLoader Cwd Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared'
--eagain='EAGAIN'
--ebcdic='undef'
--echo='echo'
--egrep='egrep'
--emacs=''
--endgrent_r_proto='0'
--endhostent_r_proto='0'
--endnetent_r_proto='0'
--endprotoent_r_proto='0'
--endpwent_r_proto='0'
--endservent_r_proto='0'
--eunicefix=':'
--exe_ext=''
--expr='expr'
--extensions='B ByteLoader Cwd Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared Errno'
--extras=''
--fflushNULL='define'
--fflushall='undef'
--find=''
--firstmakefile='makefile'
--flex=''
--fpossize='16'
--fpostype='fpos_t'
--freetype='void'
--from=':'
--full_ar='/usr/bin/ar'
--full_csh='/bin/csh'
--full_sed='/bin/sed'
--gccansipedantic=''
--gccosandvers=''
--gccversion='2.95.3 20010125 (prerelease)'
--getgrent_r_proto='0'
--getgrgid_r_proto='0'
--getgrnam_r_proto='0'
--gethostbyaddr_r_proto='0'
--gethostbyname_r_proto='0'
--gethostent_r_proto='0'
--getlogin_r_proto='0'
--getnetbyaddr_r_proto='0'
--getnetbyname_r_proto='0'
--getnetent_r_proto='0'
--getprotobyname_r_proto='0'
--getprotobynumber_r_proto='0'
--getprotoent_r_proto='0'
--getpwent_r_proto='0'
--getpwnam_r_proto='0'
--getpwuid_r_proto='0'
--getservbyname_r_proto='0'
--getservbyport_r_proto='0'
--getservent_r_proto='0'
--getspnam_r_proto='0'
--gidformat='"lu"'
--gidsign='1'
--gidsize='4'
--gidtype='gid_t'
--glibpth='/usr/shlib  /lib /usr/lib /usr/lib/386 /lib/386 /usr/ccs/lib /usr/ucblib /usr/local/lib '
--gmake='gmake'
--gmtime_r_proto='0'
--gnulibc_version='2.2.2'
--grep='grep'
--groupcat='cat /etc/group'
--groupstype='gid_t'
--gzip='gzip'
--h_fcntl='false'
--h_sysfile='true'
--hint='recommended'
--hostcat='cat /etc/hosts'
--html1dir=' '
--html1direxp=''
--html3dir=' '
--html3direxp=''
--i16size='2'
--i16type='short'
--i32size='4'
--i32type='long'
--i64size='8'
--i64type='long long'
--i8size='1'
--i8type='char'
--i_arpainet='define'
--i_bsdioctl=''
--i_crypt='define'
--i_db='undef'
--i_dbm='undef'
--i_dirent='define'
--i_dld='undef'
--i_dlfcn='define'
--i_fcntl='undef'
--i_float='define'
--i_fp='undef'
--i_fp_class='undef'
--i_gdbm='undef'
--i_grp='define'
--i_ieeefp='undef'
--i_inttypes='define'
--i_langinfo='define'
--i_libutil='undef'
--i_limits='define'
--i_locale='define'
--i_machcthr='undef'
--i_malloc='define'
--i_math='define'
--i_memory='undef'
--i_mntent='define'
--i_ndbm='undef'
--i_netdb='define'
--i_neterrno='undef'
--i_netinettcp='define'
--i_niin='define'
--i_poll='define'
--i_prot='undef'
--i_pthread='define'
--i_pwd='define'
--i_rpcsvcdbm='undef'
--i_sfio='undef'
--i_sgtty='undef'
--i_shadow='define'
--i_socks='undef'
--i_stdarg='define'
--i_stddef='define'
--i_stdlib='define'
--i_string='define'
--i_sunmath='undef'
--i_sysaccess='undef'
--i_sysdir='define'
--i_sysfile='define'
--i_sysfilio='undef'
--i_sysin='undef'
--i_sysioctl='define'
--i_syslog='define'
--i_sysmman='define'
--i_sysmode='undef'
--i_sysmount='define'
--i_sysndir='undef'
--i_sysparam='define'
--i_sysresrc='define'
--i_syssecrt='undef'
--i_sysselct='define'
--i_syssockio='undef'
--i_sysstat='define'
--i_sysstatfs='define'
--i_sysstatvfs='define'
--i_systime='define'
--i_systimek='undef'
--i_systimes='define'
--i_systypes='define'
--i_sysuio='define'
--i_sysun='define'
--i_sysutsname='define'
--i_sysvfs='define'
--i_syswait='define'
--i_termio='undef'
--i_termios='define'
--i_time='define'
--i_unistd='define'
--i_ustat='define'
--i_utime='define'
--i_values='define'
--i_varargs='undef'
--i_varhdr='stdarg.h'
--i_vfork='undef'
--ignore_versioned_solibs='y'
--inc_version_list=' '
--inc_version_list_init='0'
--incpath=''
--inews=''
--installarchlib='./install_me_here/usr/lib/perl5/5.10.0/armv4l-linux'
--installbin='./install_me_here/usr/bin'
--installhtml1dir=''
--installhtml3dir=''
--installman1dir='./install_me_here/usr/share/man/man1'
--installman3dir='./install_me_here/usr/share/man/man3'
--installprefix='./install_me_here/usr'
--installprefixexp='./install_me_here/usr'
--installprivlib='./install_me_here/usr/lib/perl5/5.10.0'
--installscript='./install_me_here/usr/bin'
--installsitearch='./install_me_here/usr/lib/perl5/site_perl/5.10.0/armv4l-linux'
--installsitebin='./install_me_here/usr/bin'
--installsitehtml1dir=''
--installsitehtml3dir=''
--installsitelib='./install_me_here/usr/lib/perl5/site_perl/5.10.0'
--installsiteman1dir='./install_me_here/usr/share/man/man1'
--installsiteman3dir='./install_me_here/usr/share/man/man3'
--installsitescript='./install_me_here/usr/bin'
--installstyle='./install_me_herelib/perl5'
--installusrbinperl='undef'
--installvendorarch=''
--installvendorbin=''
--installvendorhtml1dir=''
--installvendorhtml3dir=''
--installvendorlib=''
--installvendorman1dir=''
--installvendorman3dir=''
--installvendorscript=''
--intsize='4'
--issymlink='/usr/bin/test -h'
--ivdformat='"ld"'
--ivsize='4'
--ivtype='long'
--known_extensions='B ByteLoader Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call GDBM_File I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 NDBM_File ODBM_File Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared'
--ksh=''
--ld='arm-none-linux-gnueabi-gcc'
--lddlflags='-shared -L/usr/local/lib'
--ldflags=' -L/usr/local/lib'
--ldflags_uselargefiles=''
--ldlibpthname='LD_LIBRARY_PATH'
--less='less'
--lib_ext='.arma'
--libc='/lib/libc-2.2.2.so'
--libperl='libperl.arma'
--libpth='/usr/local/lib /lib /usr/lib'
--libs='-lnsl -ldl -lm -lcrypt -lutil -lc'
--libsdirs=' /usr/lib'
--libsfiles=' libnsl.so libdl.so libm.so libcrypt.so libutil.so libc.so'
--libsfound=' /usr/lib/libnsl.so /usr/lib/libdl.so /usr/lib/libm.so /usr/lib/libcrypt.so /usr/lib/libutil.so /usr/lib/libc.so'
--libspath=' /usr/local/lib /lib /usr/lib'
--libswanted='sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m crypt sec util c cposix posix ucb BSD'
--libswanted_uselargefiles=''
--line=''
--lint=''
--lkflags=''
--ln='ln'
--lns='/bin/ln -s'
--localtime_r_proto='0'
--locincpth='/usr/local/include /opt/local/include /usr/gnu/include /opt/gnu/include /usr/GNU/include /opt/GNU/include'
--loclibpth='/usr/local/lib /opt/local/lib /usr/gnu/lib /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib'
--longdblsize='8'
--longlongsize='8'
--longsize='4'
--lp=''
--lpr=''
--ls='ls'
--lseeksize='8'
--lseektype='off_t'
--mad='undef'
--mail=''
--mailx=''
--make='make'
--make_set_make='#'
--mallocobj=''
--mallocsrc=''
--malloctype='void *'
--man1dir='/usr/share/man/man1'
--man1direxp='/usr/share/man/man1'
--man1ext='1'
--man3dir='/usr/share/man/man3'
--man3direxp='/usr/share/man/man3'
--man3ext='3'
--mips_type=''
--mistrustnm=''
--mkdir='mkdir'
--mmaptype='void *'
--modetype='mode_t'
--more='more'
--multiarch='undef'
--mv=''
--myarchname='armv4l-linux'
--mydomain='.criticalintegration.com'
--myhostname='openzaurus'
--myuname='linux openzaurus.criticalintegration.com 2.4.6-rmk1-np2-embedix #15 Wed Aug 6 07:49:44 UTC 2003 armv4l unknown '
--n='-n'
--need_va_copy='undef'
--netdb_hlen_type='size_t'
--netdb_host_type='const void *'
--netdb_name_type='const char *'
--netdb_net_type='in_addr_t'
--nm='nm'
--nm_opt=''
--nm_so_opt='--dynamic'
--nonxs_ext='Errno'
--nroff='nroff'
--nvEUformat='"E"'
--nvFUformat='"F"'
--nvGUformat='"G"'
--nv_preserves_uv_bits='32'
--nveformat='"e"'
--nvfformat='"f"'
--nvgformat='"g"'
--nvsize='8'
--nvtype='double'
--o_nonblock='O_NONBLOCK'
--obj_ext='.armo'
--old_pthread_create_joinable=''
--optimize='-O2'
--orderlib='false'
--osname='linux'
--osvers='2.6'
--otherlibdirs=' '
--package='perl5'
--pager='/usr/bin/less'
--passcat='cat /etc/passwd'
--patchlevel='9'
--path_sep=':'
--perl5='/usr/bin/perl'
--perl=''
--perl_patchlevel=''
--perladmin='red@criticalintegration.com'
--perllibs='-lnsl -ldl -lm -lcrypt -lutil -lc'
--perlpath='/usr/bin/perl'
--pg='pg'
--phostname='hostname'
--pidtype='pid_t'
--plibpth=''
--pmake=''
--pr=''
--prefix='/usr'
--prefixexp='/usr'
--privlib='/usr/lib/perl5/5.10.0'
--privlibexp='/usr/lib/perl5/5.10.0'
--procselfexe='"/proc/self/exe"'
--prototype='define'
--ptrsize='4'
--quadkind='3'
--quadtype='long long'
--randbits='48'
--randfunc='drand48'
--random_r_proto='0'
--randseedtype='long'
--ranlib=':'
--rd_nodata='-1'
--readdir64_r_proto='0'
--readdir_r_proto='0'
--revision='5'
--rm='rm'
--rmail=''
--run=''
--runnm='false'
--sPRIEUldbl='"E"'
--sPRIFUldbl='"F"'
--sPRIGUldbl='"G"'
--sPRIXU64='"LX"'
--sPRId64='"Ld"'
--sPRIeldbl='"e"'
--sPRIfldbl='"f"'
--sPRIgldbl='"g"'
--sPRIi64='"Li"'
--sPRIo64='"Lo"'
--sPRIu64='"Lu"'
--sPRIx64='"Lx"'
--sSCNfldbl='"f"'
--sched_yield='sched_yield()'
--scriptdir='/usr/bin'
--scriptdirexp='/usr/bin'
--sed='sed'
--seedfunc='srand48'
--selectminbits='32'
--selecttype='fd_set *'
--sendmail=''
--setgrent_r_proto='0'
--sethostent_r_proto='0'
--setlocale_r_proto='0'
--setnetent_r_proto='0'
--setprotoent_r_proto='0'
--setpwent_r_proto='0'
--setservent_r_proto='0'
--sh='/bin/sh'
--shar=''
--sharpbang='#!'
--shmattype='void *'
--shortsize='2'
--shrpenv=''
--shsharp='true'
--sig_count='64'
--sig_name='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN NUM33 NUM34 NUM35 NUM36 NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 NUM43 NUM44 NUM45 NUM46 NUM47 NUM48 NUM49 NUM50 NUM51 NUM52 NUM53 NUM54 NUM55 NUM56 NUM57 NUM58 NUM59 NUM60 NUM61 NUM62 RTMAX IOT CLD POLL UNUSED '
--sig_name_init='"ZERO", "HUP", "INT", "QUIT", "ILL", "TRAP", "ABRT", "BUS", "FPE", "KILL", "USR1", "SEGV", "USR2", "PIPE", "ALRM", "TERM", "STKFLT", "CHLD", "CONT", "STOP", "TSTP", "TTIN", "TTOU", "URG", "XCPU", "XFSZ", "VTALRM", "PROF", "WINCH", "IO", "PWR", "SYS", "RTMIN", "NUM33", "NUM34", "NUM35", "NUM36", "NUM37", "NUM38", "NUM39", "NUM40", "NUM41", "NUM42", "NUM43", "NUM44", "NUM45", "NUM46", "NUM47", "NUM48", "NUM49", "NUM50", "NUM51", "NUM52", "NUM53", "NUM54", "NUM55", "NUM56", "NUM57", "NUM58", "NUM59", "NUM60", "NUM61", "NUM62", "RTMAX", "IOT", "CLD", "POLL", "UNUSED", 0'
--sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 6 17 29 31 '
--sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 6, 17, 29, 31, 0'
--sig_size='68'
--signal_t='void'
--sitearch='/usr/lib/perl5/site_perl/5.10.0/armv4l-linux'
--sitearchexp='/usr/lib/perl5/site_perl/5.10.0/armv4l-linux'
--sitebin='/usr/bin'
--sitebinexp='/usr/bin'
--sitehtml1dir=''
--sitehtml1direxp=''
--sitehtml3dir=''
--sitehtml3direxp=''
--sitelib='/usr/lib/perl5/site_perl/5.10.0'
--sitelib_stem='/usr/lib/perl5/site_perl'
--sitelibexp='/usr/lib/perl5/site_perl/5.10.0'
--siteman1dir='/usr/share/man/man1'
--siteman1direxp='/usr/share/man/man1'
--siteman3dir='/usr/share/man/man3'
--siteman3direxp='/usr/share/man/man3'
--siteprefix='/usr'
--siteprefixexp='/usr'
--sitescript='/usr/bin'
--sitescriptexp='/usr/bin'
--sizesize='4'
--sizetype='size_t'
--sleep=''
--smail=''
--so='so'
--sockethdr=''
--socketlib=''
--socksizetype='socklen_t'
--sort='sort'
--spackage='Perl5'
--spitshell='cat'
--srand48_r_proto='0'
--srandom_r_proto='0'
--src='.'
--ssizetype='ssize_t'
--startperl='#!/usr/bin/perl'
--startsh='#!/bin/sh'
--static_ext='DynaLoader '
--stdchar='char'
--stdio_base='((fp)->_IO_read_base)'
--stdio_bufsiz='((fp)->_IO_read_end - (fp)->_IO_read_base)'
--stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)'
--stdio_filbuf=''
--stdio_ptr='((fp)->_IO_read_ptr)'
--stdio_stream_array=''
--strerror_r_proto='0'
--strings='/usr/include/string.h'
--submit=''
--subversion='3'
--sysman='/usr/share/man/man1'
--tail=''
--tar=''
--targetarch=''
--tbl=''
--tee=''
--test='test'
--timeincl='/usr/include/sys/time.h /usr/include/time.h '
--timetype='time_t'
--tmpnam_r_proto='0'
--to=':'
--touch='touch'
--tr='tr'
--trnl='\n'
--troff=''
--ttyname_r_proto='0'
--u16size='2'
--u16type='unsigned short'
--u32size='4'
--u32type='unsigned long'
--u64size='8'
--u64type='unsigned long long'
--u8size='1'
--u8type='unsigned char'
--uidformat='"lu"'
--uidsign='1'
--uidsize='4'
--uidtype='uid_t'
--uname='uname'
--uniq='uniq'
--uquadtype='unsigned long long'
--use5005threads='undef'
--use64bitall='undef'
--use64bitint='undef'
--usecrosscompile='undef'
--usedl='define'
--usefaststdio='define'
--useithreads='undef'
--uselargefiles='define'
--uselongdouble='undef'
--usemallocwrap='define'
--usemorebits='undef'
--usemultiplicity='undef'
--usemymalloc='n'
--usenm='false'
--useopcode='true'
--useperlio='define'
--useposix='true'
--usereentrant='undef'
--userelocatableinc='undef'
--usesfio='false'
--useshrplib='true'
--usesitecustomize='undef'
--usesocks='undef'
--usethreads='undef'
--usevendorprefix='undef'
--usevfork='false'
--usrinc='/usr/include'
--uuname=''
--uvXUformat='"lX"'
--uvoformat='"lo"'
--uvsize='4'
--uvtype='unsigned long'
--uvuformat='"lu"'
--uvxformat='"lx"'
--vendorarch=''
--vendorarchexp=''
--vendorbin=''
--vendorbinexp=''
--vendorhtml1dir=' '
--vendorhtml1direxp=''
--vendorhtml3dir=' '
--vendorhtml3direxp=''
--vendorlib=''
--vendorlib_stem=''
--vendorlibexp=''
--vendorman1dir=' '
--vendorman1direxp=''
--vendorman3dir=' '
--vendorman3direxp=''
--vendorprefix=''
--vendorprefixexp=''
--vendorscript=''
--vendorscriptexp=''
--version='5.10.0'
--version_patchlevel_string='version 9 subversion 4'
--versiononly='undef'
--vi=''
--voidflags='15'
--xlibpth='/usr/lib/386 /lib/386'
--yacc='yacc'
--yaccflags=''
--zcat=''
--zip='zip'
--# Configure command line arguments.
--config_arg0='Configure'
--config_args=''
--config_argc=0
--PERL_REVISION=5
--PERL_VERSION=9
--PERL_SUBVERSION=4
--PERL_API_REVISION=5
--PERL_API_VERSION=9
--PERL_API_SUBVERSION=0
--PERL_PATCHLEVEL=
--PERL_CONFIG_SH=true
-diff -Naur perl-5.10.0.orig/Cross/config.sh-x86-linux perl-5.10.0/Cross/config.sh-x86-linux
---- perl-5.10.0.orig/Cross/config.sh-x86-linux	1969-12-31 19:00:00.000000000 -0500
-+++ perl-5.10.0/Cross/config.sh-x86-linux	2009-04-05 13:38:02.485519728 -0400
-@@ -0,0 +1,1067 @@
-+#!/bin/sh
-+#
-+# This file was produced by running the Configure script. It holds all the
-+# definitions figured out by Configure. Should you modify one of these values,
-+# do not forget to propagate your changes by running "Configure -der". You may
-+# instead choose to run each of the .SH files by yourself, or "Configure -S".
-+#
-+
-+
-+Author=''
-+Date='$Date'
-+Header=''
-+Id='$Id'
-+Locker=''
-+Log='$Log'
-+Mcc='Mcc'
-+RCSfile='$RCSfile'
-+Revision='$Revision'
-+Source=''
-+State=''
-+_a='.a'
-+_exe=''
-+_o='.o'
-+afs='false'
-+afsroot='/afs'
-+alignbytes='4'
-+ansi2knr=''
-+aphostname='/bin/hostname'
-+api_revision='5'
-+api_subversion='0'
-+api_version='10'
-+api_versionstring='5.10.0'
-+ar='ar'
-+archlib='/usr/lib/perl5/5.10.0/x86_64-linux-thread-multi'
-+archlibexp='/usr/lib/perl5/5.10.0/x86_64-linux-thread-multi'
-+archname64=''
-+archname='x86_64-linux-thread-multi'
-+archobjs=''
-+asctime_r_proto='REENTRANT_PROTO_B_SB'
-+awk='awk'
-+baserev='5.0'
-+bash=''
-+bin='/usr/bin'
-+binexp='/usr/bin'
-+bison='bison'
-+byacc='byacc'
-+byteorder='1234'
-+c=''
-+castflags='0'
-+cat='cat'
-+cc='cc'
-+cccdlflags='-fPIC'
-+ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE'
-+ccflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
-+ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
-+ccname='gcc'
-+ccsymbols=''
-+ccversion=''
-+cf_by=''
-+cf_email=''
-+cf_time=''
-+chgrp=''
-+chmod='chmod'
-+chown=''
-+clocktype='clock_t'
-+comm='comm'
-+compress=''
-+contains='grep'
-+cp='cp'
-+cpio=''
-+cpp='cpp'
-+cpp_stuff='42'
-+cppccsymbols=''
-+cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -I/usr/local/include'
-+cpplast='-'
-+cppminus='-'
-+cpprun='cc -E'
-+cppstdin='cc -E'
-+cppsymbols='_FILE_OFFSET_BITS=64 _GNU_SOURCE=1 _LARGEFILE64_SOURCE=1 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=200112L _POSIX_SOURCE=1 _REENTRANT=1 _XOPEN_SOURCE=600 _XOPEN_SOURCE_EXTENDED=1 __CHAR_BIT__=8 __DBL_DENORM_MIN__=4.9406564584124654e-324 __DBL_DIG__=15 __DBL_EPSILON__=2.2204460492503131e-16 __DBL_HAS_DENORM__=1 __DBL_HAS_INFINITY__=1 __DBL_HAS_QUIET_NAN__=1 __DBL_MANT_DIG__=53 __DBL_MAX_10_EXP__=308 __DBL_MAX_EXP__=1024 __DBL_MAX__=1.7976931348623157e+308 __DBL_MIN_10_EXP__=(-307) __DBL_MIN_EXP__=(-1021) __DBL_MIN__=2.2250738585072014e-308 __DEC128_DEN__=0.000000000000000000000000000000001E-6143DL __DEC128_EPSILON__=1E-33DL __DEC128_MANT_DIG__=34 __DEC128_MAX_EXP__=6144 __DEC128_MAX__=9.999999999999999999999999999999999E6144DL __DEC128_MIN_EXP__=(-6143) __DEC128_MIN__=1E-6143DL __DEC32_DEN__=0.000001E-95DF __DEC32_EPSILON__=1E-6DF __DEC32_MANT_DIG__=7 __DEC32_MAX_EXP__=96 __DEC32_MAX__=9.999999E96DF __DEC32_MIN_EXP__=(-95) __DEC32_MIN__=1E-95DF __DEC64_DEN__=0.000000000000001E-383DD __DEC64_EPSILON__=1E-15DD __DEC64_MANT_DIG__=16 __DEC64_MAX_EXP__=384 __DEC64_MAX__=9.999999999999999E384DD __DEC64_MIN_EXP__=(-383) __DEC64_MIN__=1E-383DD __DECIMAL_BID_FORMAT__=1 __DECIMAL_DIG__=21 __DEC_EVAL_METHOD__=2 __ELF__=1 __FINITE_MATH_ONLY__=0 __FLT_DENORM_MIN__=1.40129846e-45F __FLT_DIG__=6 __FLT_EPSILON__=1.19209290e-7F __FLT_EVAL_METHOD__=2 __FLT_HAS_DENORM__=1 __FLT_HAS_INFINITY__=1 __FLT_HAS_QUIET_NAN__=1 __FLT_MANT_DIG__=24 __FLT_MAX_10_EXP__=38 __FLT_MAX_EXP__=128 __FLT_MAX__=3.40282347e+38F __FLT_MIN_10_EXP__=(-37) __FLT_MIN_EXP__=(-125) __FLT_MIN__=1.17549435e-38F __FLT_RADIX__=2 __GLIBC_MINOR__=9 __GLIBC__=2 __GNUC_GNU_INLINE__=1 __GNUC_MINOR__=3 __GNUC_PATCHLEVEL__=3 __GNUC__=4 __GNU_LIBRARY__=6 __GXX_ABI_VERSION=1002 __INTMAX_MAX__=9223372036854775807LL __INTMAX_TYPE__=long\ long\ int __INT_MAX__=2147483647 __LDBL_DENORM_MIN__=3.64519953188247460253e-4951L __LDBL_DIG__=18 __LDBL_EPSILON__=1.08420217248550443401e-19L __LDBL_HAS_DENORM__=1 __LDBL_HAS_INFINITY__=1 __LDBL_HAS_QUIET_NAN__=1 __LDBL_MANT_DIG__=64 __LDBL_MAX_10_EXP__=4932 __LDBL_MAX_EXP__=16384 __LDBL_MAX__=1.18973149535723176502e+4932L __LDBL_MIN_10_EXP__=(-4931) __LDBL_MIN_EXP__=(-16381) __LDBL_MIN__=3.36210314311209350626e-4932L __LONG_LONG_MAX__=9223372036854775807LL __LONG_MAX__=2147483647L __PTRDIFF_TYPE__=int __REGISTER_PREFIX__= __SCHAR_MAX__=127 __SHRT_MAX__=32767 __SIZEOF_DOUBLE__=8 __SIZEOF_FLOAT__=4 __SIZEOF_INT__=4 __SIZEOF_LONG_DOUBLE__=12 __SIZEOF_LONG_LONG__=8 __SIZEOF_LONG__=4 __SIZEOF_POINTER__=4 __SIZEOF_PTRDIFF_T__=4 __SIZEOF_SHORT__=2 __SIZEOF_SIZE_T__=4 __SIZEOF_WCHAR_T__=4 __SIZEOF_WINT_T__=4 __SIZE_TYPE__=unsigned\ int __STDC_HOSTED__=1 __STDC__=1 __UINTMAX_TYPE__=long\ long\ unsigned\ int __USER_LABEL_PREFIX__= __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_GNU=1 __USE_LARGEFILE64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_POSIX=1 __USE_REENTRANT=1 __USE_SVID=1 __USE_UNIX98=1 __USE_XOPEN=1 __USE_XOPEN_EXTENDED=1 __VERSION__="4.3.3" __WCHAR_MAX__=2147483647 __WCHAR_TYPE__=long\ int __WINT_TYPE__=unsigned\ int __gnu_linux__=1 __i386=1 __i386__=1 __linux=1 __linux__=1 __unix=1 __unix__=1 i386=1 linux=1 unix=1'
-+crypt_r_proto='REENTRANT_PROTO_B_CCS'
-+cryptlib=''
-+csh='csh'
-+ctermid_r_proto='0'
-+ctime_r_proto='REENTRANT_PROTO_B_SB'
-+d_Gconvert='gcvt((x),(n),(b))'
-+d_PRIEUldbl='define'
-+d_PRIFUldbl='define'
-+d_PRIGUldbl='define'
-+d_PRIXU64='define'
-+d_PRId64='define'
-+d_PRIeldbl='define'
-+d_PRIfldbl='define'
-+d_PRIgldbl='define'
-+d_PRIi64='define'
-+d_PRIo64='define'
-+d_PRIu64='define'
-+d_PRIx64='define'
-+d_SCNfldbl='define'
-+d__fwalk='undef'
-+d_access='define'
-+d_accessx='undef'
-+d_aintl='undef'
-+d_alarm='define'
-+d_archlib='define'
-+d_asctime_r='define'
-+d_atolf='undef'
-+d_atoll='define'
-+d_attribute_format='define'
-+d_attribute_malloc='define'
-+d_attribute_nonnull='define'
-+d_attribute_noreturn='define'
-+d_attribute_pure='define'
-+d_attribute_unused='define'
-+d_attribute_warn_unused_result='define'
-+d_bcmp='define'
-+d_bcopy='define'
-+d_bsd='undef'
-+d_bsdgetpgrp='undef'
-+d_bsdsetpgrp='undef'
-+d_builtin_choose_expr='define'
-+d_builtin_expect='undef'
-+d_bzero='define'
-+d_c99_variadic_macros='define'
-+d_casti32='undef'
-+d_castneg='define'
-+d_charvspr='undef'
-+d_chown='define'
-+d_chroot='define'
-+d_chsize='undef'
-+d_class='undef'
-+d_clearenv='define'
-+d_closedir='define'
-+d_cmsghdr_s='define'
-+d_const='define'
-+d_copysignl='define'
-+d_cplusplus='undef'
-+d_crypt='define'
-+d_crypt_r='define'
-+d_csh='undef'
-+d_ctermid='define'
-+d_ctermid_r='undef'
-+d_ctime_r='define'
-+d_cuserid='define'
-+d_dbl_dig='define'
-+d_dbminitproto='undef'
-+d_difftime='define'
-+d_dir_dd_fd='undef'
-+d_dirfd='define'
-+d_dirnamlen='undef'
-+d_dlerror='define'
-+d_dlopen='define'
-+d_dlsymun='undef'
-+d_dosuid='undef'
-+d_drand48_r='define'
-+d_drand48proto='define'
-+d_dup2='define'
-+d_eaccess='define'
-+d_endgrent='define'
-+d_endgrent_r='undef'
-+d_endhent='define'
-+d_endhostent_r='undef'
-+d_endnent='define'
-+d_endnetent_r='undef'
-+d_endpent='define'
-+d_endprotoent_r='undef'
-+d_endpwent='define'
-+d_endpwent_r='undef'
-+d_endsent='define'
-+d_endservent_r='undef'
-+d_eofnblk='define'
-+d_eunice='undef'
-+d_faststdio='undef'
-+d_fchdir='define'
-+d_fchmod='define'
-+d_fchown='define'
-+d_fcntl='define'
-+d_fcntl_can_lock='define'
-+d_fd_macros='define'
-+d_fd_set='define'
-+d_fds_bits='define'
-+d_fgetpos='define'
-+d_finite='define'
-+d_finitel='define'
-+d_flexfnam='define'
-+d_flock='define'
-+d_flockproto='define'
-+d_fork='define'
-+d_fp_class='undef'
-+d_fpathconf='define'
-+d_fpclass='undef'
-+d_fpclassify='undef'
-+d_fpclassl='undef'
-+d_fpos64_t='undef'
-+d_frexpl='define'
-+d_fs_data_s='undef'
-+d_fseeko='define'
-+d_fsetpos='define'
-+d_fstatfs='define'
-+d_fstatvfs='define'
-+d_fsync='define'
-+d_ftello='define'
-+d_ftime='undef'
-+d_futimes='define'
-+d_getcwd='define'
-+d_getespwnam='undef'
-+d_getfsstat='undef'
-+d_getgrent='define'
-+d_getgrent_r='define'
-+d_getgrgid_r='define'
-+d_getgrnam_r='define'
-+d_getgrps='define'
-+d_gethbyaddr='define'
-+d_gethbyname='define'
-+d_gethent='define'
-+d_gethname='define'
-+d_gethostbyaddr_r='define'
-+d_gethostbyname_r='define'
-+d_gethostent_r='define'
-+d_gethostprotos='define'
-+d_getitimer='define'
-+d_getlogin='define'
-+d_getlogin_r='define'
-+d_getmnt='undef'
-+d_getmntent='define'
-+d_getnbyaddr='define'
-+d_getnbyname='define'
-+d_getnent='define'
-+d_getnetbyaddr_r='define'
-+d_getnetbyname_r='define'
-+d_getnetent_r='define'
-+d_getnetprotos='define'
-+d_getpagsz='define'
-+d_getpbyname='define'
-+d_getpbynumber='define'
-+d_getpent='define'
-+d_getpgid='define'
-+d_getpgrp2='undef'
-+d_getpgrp='define'
-+d_getppid='define'
-+d_getprior='define'
-+d_getprotobyname_r='define'
-+d_getprotobynumber_r='define'
-+d_getprotoent_r='define'
-+d_getprotoprotos='define'
-+d_getprpwnam='undef'
-+d_getpwent='define'
-+d_getpwent_r='define'
-+d_getpwnam_r='define'
-+d_getpwuid_r='define'
-+d_getsbyname='define'
-+d_getsbyport='define'
-+d_getsent='define'
-+d_getservbyname_r='define'
-+d_getservbyport_r='define'
-+d_getservent_r='define'
-+d_getservprotos='define'
-+d_getspnam='define'
-+d_getspnam_r='define'
-+d_gettimeod='define'
-+d_gmtime_r='define'
-+d_gnulibc='define'
-+d_grpasswd='define'
-+d_hasmntopt='define'
-+d_htonl='define'
-+d_ilogbl='define'
-+d_inc_version_list='undef'
-+d_index='undef'
-+d_inetaton='define'
-+d_int64_t='define'
-+d_isascii='define'
-+d_isfinite='undef'
-+d_isinf='define'
-+d_isnan='define'
-+d_isnanl='define'
-+d_killpg='define'
-+d_lchown='define'
-+d_ldbl_dig='define'
-+d_libm_lib_version='define'
-+d_link='define'
-+d_localtime_r='define'
-+d_localtime_r_needs_tzset='define'
-+d_locconv='define'
-+d_lockf='define'
-+d_longdbl='define'
-+d_longlong='define'
-+d_lseekproto='define'
-+d_lstat='define'
-+d_madvise='define'
-+d_malloc_good_size='undef'
-+d_malloc_size='undef'
-+d_mblen='define'
-+d_mbstowcs='define'
-+d_mbtowc='define'
-+d_memchr='define'
-+d_memcmp='define'
-+d_memcpy='define'
-+d_memmove='define'
-+d_memset='define'
-+d_mkdir='define'
-+d_mkdtemp='define'
-+d_mkfifo='define'
-+d_mkstemp='define'
-+d_mkstemps='undef'
-+d_mktime='define'
-+d_mmap='define'
-+d_modfl='define'
-+d_modfl_pow32_bug='undef'
-+d_modflproto='define'
-+d_mprotect='define'
-+d_msg='define'
-+d_msg_ctrunc='define'
-+d_msg_dontroute='define'
-+d_msg_oob='define'
-+d_msg_peek='define'
-+d_msg_proxy='define'
-+d_msgctl='define'
-+d_msgget='define'
-+d_msghdr_s='define'
-+d_msgrcv='define'
-+d_msgsnd='define'
-+d_msync='define'
-+d_munmap='define'
-+d_mymalloc='undef'
-+d_nice='define'
-+d_nl_langinfo='define'
-+d_nv_preserves_uv='define'
-+d_nv_zero_is_allbits_zero='define'
-+d_off64_t='define'
-+d_old_pthread_create_joinable='undef'
-+d_oldpthreads='undef'
-+d_oldsock='undef'
-+d_open3='define'
-+d_pathconf='define'
-+d_pause='define'
-+d_perl_otherlibdirs='undef'
-+d_phostname='undef'
-+d_pipe='define'
-+d_poll='define'
-+d_portable='define'
-+d_printf_format_null='define'
-+d_procselfexe='undef'
-+d_pseudofork='undef'
-+d_pthread_atfork='define'
-+d_pthread_attr_setscope='define'
-+d_pthread_yield='define'
-+d_pwage='undef'
-+d_pwchange='undef'
-+d_pwclass='undef'
-+d_pwcomment='undef'
-+d_pwexpire='undef'
-+d_pwgecos='define'
-+d_pwpasswd='define'
-+d_pwquota='undef'
-+d_qgcvt='define'
-+d_quad='define'
-+d_random_r='define'
-+d_readdir64_r='define'
-+d_readdir='define'
-+d_readdir_r='define'
-+d_readlink='define'
-+d_readv='define'
-+d_recvmsg='define'
-+d_rename='define'
-+d_rewinddir='define'
-+d_rmdir='define'
-+d_safebcpy='undef'
-+d_safemcpy='undef'
-+d_sanemcmp='define'
-+d_sbrkproto='define'
-+d_scalbnl='define'
-+d_sched_yield='define'
-+d_scm_rights='define'
-+d_seekdir='define'
-+d_select='define'
-+d_sem='define'
-+d_semctl='define'
-+d_semctl_semid_ds='define'
-+d_semctl_semun='define'
-+d_semget='define'
-+d_semop='define'
-+d_sendmsg='define'
-+d_setegid='define'
-+d_seteuid='define'
-+d_setgrent='define'
-+d_setgrent_r='undef'
-+d_setgrps='define'
-+d_sethent='define'
-+d_sethostent_r='undef'
-+d_setitimer='define'
-+d_setlinebuf='define'
-+d_setlocale='define'
-+d_setlocale_r='undef'
-+d_setnent='define'
-+d_setnetent_r='undef'
-+d_setpent='define'
-+d_setpgid='define'
-+d_setpgrp2='undef'
-+d_setpgrp='define'
-+d_setprior='define'
-+d_setproctitle='undef'
-+d_setprotoent_r='undef'
-+d_setpwent='define'
-+d_setpwent_r='undef'
-+d_setregid='define'
-+d_setresgid='define'
-+d_setresuid='define'
-+d_setreuid='define'
-+d_setrgid='undef'
-+d_setruid='undef'
-+d_setsent='define'
-+d_setservent_r='undef'
-+d_setsid='define'
-+d_setvbuf='define'
-+d_sfio='undef'
-+d_shm='define'
-+d_shmat='define'
-+d_shmatprototype='define'
-+d_shmctl='define'
-+d_shmdt='define'
-+d_shmget='define'
-+d_sigaction='define'
-+d_signbit='define'
-+d_sigprocmask='define'
-+d_sigsetjmp='define'
-+d_sitearch='define'
-+d_snprintf='define'
-+d_sockatmark='define'
-+d_sockatmarkproto='define'
-+d_socket='define'
-+d_socklen_t='define'
-+d_sockpair='define'
-+d_socks5_init='undef'
-+d_sprintf_returns_strlen='define'
-+d_sqrtl='define'
-+d_srand48_r='define'
-+d_srandom_r='define'
-+d_sresgproto='define'
-+d_sresuproto='define'
-+d_statblks='define'
-+d_statfs_f_flags='undef'
-+d_statfs_s='define'
-+d_statvfs='define'
-+d_stdio_cnt_lval='undef'
-+d_stdio_ptr_lval='undef'
-+d_stdio_ptr_lval_nochange_cnt='undef'
-+d_stdio_ptr_lval_sets_cnt='undef'
-+d_stdio_stream_array='undef'
-+d_stdiobase='undef'
-+d_stdstdio='undef'
-+d_strchr='define'
-+d_strcoll='define'
-+d_strctcpy='define'
-+d_strerrm='strerror(e)'
-+d_strerror='define'
-+d_strerror_r='define'
-+d_strftime='define'
-+d_strlcat='undef'
-+d_strlcpy='undef'
-+d_strtod='define'
-+d_strtol='define'
-+d_strtold='define'
-+d_strtoll='define'
-+d_strtoq='define'
-+d_strtoul='define'
-+d_strtoull='define'
-+d_strtouq='define'
-+d_strxfrm='define'
-+d_suidsafe='undef'
-+d_symlink='define'
-+d_syscall='define'
-+d_syscallproto='define'
-+d_sysconf='define'
-+d_sysernlst=''
-+d_syserrlst='define'
-+d_system='define'
-+d_tcgetpgrp='define'
-+d_tcsetpgrp='define'
-+d_telldir='define'
-+d_telldirproto='define'
-+d_time='define'
-+d_times='define'
-+d_tm_tm_gmtoff='define'
-+d_tm_tm_zone='define'
-+d_tmpnam_r='define'
-+d_truncate='define'
-+d_ttyname_r='define'
-+d_tzname='define'
-+d_u32align='undef'
-+d_ualarm='define'
-+d_umask='define'
-+d_uname='define'
-+d_union_semun='undef'
-+d_unordered='undef'
-+d_unsetenv='define'
-+d_usleep='define'
-+d_usleepproto='define'
-+d_ustat='define'
-+d_vendorarch='define'
-+d_vendorbin='define'
-+d_vendorlib='define'
-+d_vendorscript='define'
-+d_vfork='undef'
-+d_void_closedir='undef'
-+d_voidsig='define'
-+d_voidtty=''
-+d_volatile='define'
-+d_vprintf='define'
-+d_vsnprintf='define'
-+d_wait4='define'
-+d_waitpid='define'
-+d_wcstombs='define'
-+d_wctomb='define'
-+d_writev='define'
-+d_xenix='undef'
-+date='date'
-+db_hashtype='u_int32_t'
-+db_prefixtype='size_t'
-+db_version_major=''
-+db_version_minor=''
-+db_version_patch=''
-+defvoidused='15'
-+direntrytype='struct dirent'
-+dlext='so'
-+dlsrc='dl_dlopen.xs'
-+doublesize='8'
-+drand01='drand48()'
-+drand48_r_proto='REENTRANT_PROTO_I_ST'
-+dynamic_ext='attrs B Compress/Raw/Zlib Cwd Data/Dumper Devel/DProf Devel/Peek Devel/PPPort Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call Hash/Util I18N/Langinfo IO IPC/SysV List/Util Math/BigInt/FastCalc MIME/Base64 Opcode PerlIO/encoding PerlIO/scalar PerlIO/via POSIX re SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex threads Time/HiRes Time/Piece Unicode/Normalize XS/APItest XS/Typemap threads/shared Hash/Util/FieldHash'
-+eagain='EAGAIN'
-+ebcdic='undef'
-+echo='echo'
-+egrep='egrep'
-+emacs=''
-+endgrent_r_proto='0'
-+endhostent_r_proto='0'
-+endnetent_r_proto='0'
-+endprotoent_r_proto='0'
-+endpwent_r_proto='0'
-+endservent_r_proto='0'
-+eunicefix=':'
-+exe_ext=''
-+expr='expr'
-+extensions='attrs B Compress/Raw/Zlib Cwd Data/Dumper Devel/DProf Devel/Peek Devel/PPPort Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call Hash/Util I18N/Langinfo IO IPC/SysV List/Util Math/BigInt/FastCalc MIME/Base64 Opcode PerlIO/encoding PerlIO/scalar PerlIO/via POSIX re SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex threads Time/HiRes Time/Piece Unicode/Normalize XS/APItest XS/Typemap threads/shared Hash/Util/FieldHash Compress/Zlib Errno IO_Compress_Base IO_Compress_Zlib'
-+extras=''
-+fflushNULL='define'
-+fflushall='undef'
-+find=''
-+firstmakefile='makefile'
-+flex=''
-+fpossize='16'
-+fpostype='fpos_t'
-+freetype='void'
-+from=':'
-+full_ar='/usr/bin/ar'
-+full_csh='csh'
-+full_sed='/bin/sed'
-+gccansipedantic=''
-+gccosandvers=''
-+gccversion='4.3.3'
-+getgrent_r_proto='REENTRANT_PROTO_I_SBWR'
-+getgrgid_r_proto='REENTRANT_PROTO_I_TSBWR'
-+getgrnam_r_proto='REENTRANT_PROTO_I_CSBWR'
-+gethostbyaddr_r_proto='REENTRANT_PROTO_I_TsISBWRE'
-+gethostbyname_r_proto='REENTRANT_PROTO_I_CSBWRE'
-+gethostent_r_proto='REENTRANT_PROTO_I_SBWRE'
-+getlogin_r_proto='REENTRANT_PROTO_I_BW'
-+getnetbyaddr_r_proto='REENTRANT_PROTO_I_uISBWRE'
-+getnetbyname_r_proto='REENTRANT_PROTO_I_CSBWRE'
-+getnetent_r_proto='REENTRANT_PROTO_I_SBWRE'
-+getprotobyname_r_proto='REENTRANT_PROTO_I_CSBWR'
-+getprotobynumber_r_proto='REENTRANT_PROTO_I_ISBWR'
-+getprotoent_r_proto='REENTRANT_PROTO_I_SBWR'
-+getpwent_r_proto='REENTRANT_PROTO_I_SBWR'
-+getpwnam_r_proto='REENTRANT_PROTO_I_CSBWR'
-+getpwuid_r_proto='REENTRANT_PROTO_I_TSBWR'
-+getservbyname_r_proto='REENTRANT_PROTO_I_CCSBWR'
-+getservbyport_r_proto='REENTRANT_PROTO_I_ICSBWR'
-+getservent_r_proto='REENTRANT_PROTO_I_SBWR'
-+getspnam_r_proto='REENTRANT_PROTO_I_CSBWR'
-+gidformat='"lu"'
-+gidsign='1'
-+gidsize='4'
-+gidtype='gid_t'
-+glibpth='/usr/shlib  /lib /usr/lib /usr/lib/386 /lib/386 /usr/ccs/lib /usr/ucblib /usr/local/lib '
-+gmake='gmake'
-+gmtime_r_proto='REENTRANT_PROTO_S_TS'
-+gnulibc_version='2.9'
-+grep='grep'
-+groupcat='cat /etc/group'
-+groupstype='gid_t'
-+gzip='gzip'
-+h_fcntl='false'
-+h_sysfile='true'
-+hint='recommended'
-+hostcat='cat /etc/hosts'
-+html1dir=' '
-+html1direxp=''
-+html3dir=' '
-+html3direxp=''
-+i16size='2'
-+i16type='short'
-+i32size='4'
-+i32type='long'
-+i64size='8'
-+i64type='long long'
-+i8size='1'
-+i8type='char'
-+i_arpainet='define'
-+i_bsdioctl=''
-+i_crypt='define'
-+i_db='undef'
-+i_dbm='undef'
-+i_dirent='define'
-+i_dld='undef'
-+i_dlfcn='define'
-+i_fcntl='undef'
-+i_float='define'
-+i_fp='undef'
-+i_fp_class='undef'
-+i_gdbm='undef'
-+i_grp='define'
-+i_ieeefp='undef'
-+i_inttypes='define'
-+i_langinfo='define'
-+i_libutil='undef'
-+i_limits='define'
-+i_locale='define'
-+i_machcthr='undef'
-+i_malloc='define'
-+i_math='define'
-+i_memory='undef'
-+i_mntent='define'
-+i_ndbm='undef'
-+i_netdb='define'
-+i_neterrno='undef'
-+i_netinettcp='define'
-+i_niin='define'
-+i_poll='define'
-+i_prot='undef'
-+i_pthread='define'
-+i_pwd='define'
-+i_rpcsvcdbm='undef'
-+i_sfio='undef'
-+i_sgtty='undef'
-+i_shadow='define'
-+i_socks='undef'
-+i_stdarg='define'
-+i_stddef='define'
-+i_stdlib='define'
-+i_string='define'
-+i_sunmath='undef'
-+i_sysaccess='undef'
-+i_sysdir='define'
-+i_sysfile='define'
-+i_sysfilio='undef'
-+i_sysin='undef'
-+i_sysioctl='define'
-+i_syslog='define'
-+i_sysmman='define'
-+i_sysmode='undef'
-+i_sysmount='define'
-+i_sysndir='undef'
-+i_sysparam='define'
-+i_sysresrc='define'
-+i_syssecrt='undef'
-+i_sysselct='define'
-+i_syssockio='undef'
-+i_sysstat='define'
-+i_sysstatfs='define'
-+i_sysstatvfs='define'
-+i_systime='define'
-+i_systimek='undef'
-+i_systimes='define'
-+i_systypes='define'
-+i_sysuio='define'
-+i_sysun='define'
-+i_sysutsname='define'
-+i_sysvfs='define'
-+i_syswait='define'
-+i_termio='undef'
-+i_termios='define'
-+i_time='define'
-+i_unistd='define'
-+i_ustat='define'
-+i_utime='define'
-+i_values='define'
-+i_varargs='undef'
-+i_varhdr='stdarg.h'
-+i_vfork='undef'
-+ignore_versioned_solibs='y'
-+inc_version_list=' '
-+inc_version_list_init='0'
-+incpath=''
-+inews=''
-+initialinstalllocation='/usr/bin'
-+installarchlib='/usr/lib/perl5/5.10.0/x86_64-linux-thread-multi'
-+installbin='/usr/bin'
-+installhtml1dir=''
-+installhtml3dir=''
-+installman1dir='/usr/share/man/man1'
-+installman3dir='/usr/share/man/man3'
-+installprefix='/usr'
-+installprefixexp='/usr'
-+installprivlib='/usr/lib/perl5/5.10.0'
-+installscript='/usr/bin'
-+installsitearch='/usr/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi'
-+installsitebin='/usr/bin'
-+installsitehtml1dir=''
-+installsitehtml3dir=''
-+installsitelib='/usr/lib/perl5/site_perl/5.10.0'
-+installsiteman1dir='/usr/share/man/man1'
-+installsiteman3dir='/usr/share/man/man3'
-+installsitescript='/usr/bin'
-+installstyle='lib/perl5'
-+installusrbinperl='undef'
-+installvendorarch='/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi'
-+installvendorbin='/usr/bin'
-+installvendorhtml1dir=''
-+installvendorhtml3dir=''
-+installvendorlib='/usr/lib/perl5/vendor_perl/5.10.0'
-+installvendorman1dir='/usr/share/man/man1'
-+installvendorman3dir='/usr/share/man/man3'
-+installvendorscript='/usr/bin'
-+intsize='4'
-+issymlink='test -h'
-+ivdformat='"ld"'
-+ivsize='4'
-+ivtype='long'
-+known_extensions='attrs B Compress/Raw/Zlib Cwd Data/Dumper DB_File Devel/DProf Devel/Peek Devel/PPPort Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call GDBM_File Hash/Util I18N/Langinfo IO IPC/SysV List/Util Math/BigInt/FastCalc MIME/Base64 NDBM_File ODBM_File Opcode PerlIO/encoding PerlIO/scalar PerlIO/via POSIX re SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex threads Time/HiRes Time/Piece Unicode/Normalize Win32 Win32API/File Win32CORE XS/APItest XS/Typemap threads/shared Hash/Util/FieldHash'
-+ksh=''
-+ld='cc'
-+lddlflags='-shared -O2 -L/usr/local/lib'
-+ldflags=' -L/usr/local/lib'
-+ldflags_uselargefiles=''
-+ldlibpthname='LD_LIBRARY_PATH'
-+less='less'
-+lib_ext='.a'
-+libc='/lib/libc-2.9.so'
-+libperl='libperl.so'
-+libpth='/usr/local/lib /lib /usr/lib'
-+libs='-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc'
-+libsdirs=' /usr/lib'
-+libsfiles=' libnsl.so libdl.so libm.so libcrypt.so libutil.so libpthread.so libc.so'
-+libsfound=' /usr/lib/libnsl.so /usr/lib/libdl.so /usr/lib/libm.so /usr/lib/libcrypt.so /usr/lib/libutil.so /usr/lib/libpthread.so /usr/lib/libc.so'
-+libspath=' /usr/local/lib /lib /usr/lib'
-+libswanted='sfio socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m crypt sec util pthread c cposix posix ucb BSD'
-+libswanted_uselargefiles=''
-+line=''
-+lint=''
-+lkflags=''
-+ln='ln'
-+lns='/bin/ln -s'
-+localtime_r_proto='REENTRANT_PROTO_S_TS'
-+locincpth='/usr/local/include /opt/local/include /usr/gnu/include /opt/gnu/include /usr/GNU/include /opt/GNU/include'
-+loclibpth='/usr/local/lib /opt/local/lib /usr/gnu/lib /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib'
-+longdblsize='12'
-+longlongsize='8'
-+longsize='4'
-+lp=''
-+lpr=''
-+ls='ls'
-+lseeksize='8'
-+lseektype='off_t'
-+mad='undef'
-+madlyh=''
-+madlyobj=''
-+madlysrc=''
-+mail=''
-+mailx=''
-+make='make'
-+make_set_make='#'
-+mallocobj=''
-+mallocsrc=''
-+malloctype='void *'
-+man1dir='/usr/share/man/man1'
-+man1direxp='/usr/share/man/man1'
-+man1ext='1'
-+man3dir='/usr/share/man/man3'
-+man3direxp='/usr/share/man/man3'
-+man3ext='3'
-+mips_type=''
-+mistrustnm=''
-+mkdir='mkdir'
-+mmaptype='void *'
-+modetype='mode_t'
-+more='more'
-+multiarch='undef'
-+mv=''
-+myarchname='x86_64-linux'
-+mydomain=''
-+myhostname=''
-+myuname=''
-+n='-n'
-+need_va_copy='undef'
-+netdb_hlen_type='size_t'
-+netdb_host_type='const void *'
-+netdb_name_type='const char *'
-+netdb_net_type='in_addr_t'
-+nm='nm'
-+nm_opt=''
-+nm_so_opt='--dynamic'
-+nonxs_ext='Compress/Zlib Errno IO_Compress_Base IO_Compress_Zlib'
-+nroff='nroff'
-+nvEUformat='"E"'
-+nvFUformat='"F"'
-+nvGUformat='"G"'
-+nv_preserves_uv_bits='32'
-+nveformat='"e"'
-+nvfformat='"f"'
-+nvgformat='"g"'
-+nvsize='8'
-+nvtype='double'
-+o_nonblock='O_NONBLOCK'
-+obj_ext='.o'
-+old_pthread_create_joinable=''
-+optimize='-O2'
-+orderlib='false'
-+osname='linux'
-+osvers='2.6.27.10-r4'
-+otherlibdirs=' '
-+package='perl5'
-+pager='/bin/less -isR'
-+passcat='cat /etc/passwd'
-+patchlevel='10'
-+path_sep=':'
-+perl5=''
-+perl=''
-+perl_patchlevel=''
-+perladmin=''
-+perllibs='-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc'
-+perlpath='/usr/bin/perl'
-+pg='pg'
-+phostname='hostname'
-+pidtype='pid_t'
-+plibpth=''
-+pmake=''
-+pr=''
-+prefix='/usr'
-+prefixexp='/usr'
-+privlib='/usr/lib/perl5/5.10.0'
-+privlibexp='/usr/lib/perl5/5.10.0'
-+procselfexe=''
-+prototype='define'
-+ptrsize='4'
-+quadkind='3'
-+quadtype='long long'
-+randbits='48'
-+randfunc='drand48'
-+random_r_proto='REENTRANT_PROTO_I_St'
-+randseedtype='long'
-+ranlib=':'
-+rd_nodata='-1'
-+readdir64_r_proto='REENTRANT_PROTO_I_TSR'
-+readdir_r_proto='REENTRANT_PROTO_I_TSR'
-+revision='5'
-+rm='rm'
-+rm_try='/bin/rm -f try try a.out .out try.[cho] try..o core core.try* try.core*'
-+rmail=''
-+run=''
-+runnm='false'
-+sPRIEUldbl='"LE"'
-+sPRIFUldbl='"LF"'
-+sPRIGUldbl='"LG"'
-+sPRIXU64='"LX"'
-+sPRId64='"Ld"'
-+sPRIeldbl='"Le"'
-+sPRIfldbl='"Lf"'
-+sPRIgldbl='"Lg"'
-+sPRIi64='"Li"'
-+sPRIo64='"Lo"'
-+sPRIu64='"Lu"'
-+sPRIx64='"Lx"'
-+sSCNfldbl='"Lf"'
-+sched_yield='sched_yield()'
-+scriptdir='/usr/bin'
-+scriptdirexp='/usr/bin'
-+sed='sed'
-+seedfunc='srand48'
-+selectminbits='32'
-+selecttype='fd_set *'
-+sendmail=''
-+setgrent_r_proto='0'
-+sethostent_r_proto='0'
-+setlocale_r_proto='0'
-+setnetent_r_proto='0'
-+setprotoent_r_proto='0'
-+setpwent_r_proto='0'
-+setservent_r_proto='0'
-+sh='/bin/sh'
-+shar=''
-+sharpbang='#!'
-+shmattype='void *'
-+shortsize='2'
-+shrpenv=''
-+shsharp='true'
-+sig_count='65'
-+sig_name='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS NUM32 NUM33 RTMIN NUM35 NUM36 NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 NUM43 NUM44 NUM45 NUM46 NUM47 NUM48 NUM49 NUM50 NUM51 NUM52 NUM53 NUM54 NUM55 NUM56 NUM57 NUM58 NUM59 NUM60 NUM61 NUM62 NUM63 RTMAX IOT CLD POLL UNUSED '
-+sig_name_init='"ZERO", "HUP", "INT", "QUIT", "ILL", "TRAP", "ABRT", "BUS", "FPE", "KILL", "USR1", "SEGV", "USR2", "PIPE", "ALRM", "TERM", "STKFLT", "CHLD", "CONT", "STOP", "TSTP", "TTIN", "TTOU", "URG", "XCPU", "XFSZ", "VTALRM", "PROF", "WINCH", "IO", "PWR", "SYS", "NUM32", "NUM33", "RTMIN", "NUM35", "NUM36", "NUM37", "NUM38", "NUM39", "NUM40", "NUM41", "NUM42", "NUM43", "NUM44", "NUM45", "NUM46", "NUM47", "NUM48", "NUM49", "NUM50", "NUM51", "NUM52", "NUM53", "NUM54", "NUM55", "NUM56", "NUM57", "NUM58", "NUM59", "NUM60", "NUM61", "NUM62", "NUM63", "RTMAX", "IOT", "CLD", "POLL", "UNUSED", 0'
-+sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 6 17 29 31 '
-+sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 6, 17, 29, 31, 0'
-+sig_size='69'
-+signal_t='void'
-+sitearch='/usr/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi'
-+sitearchexp='/usr/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi'
-+sitebin='/usr/bin'
-+sitebinexp='/usr/bin'
-+sitehtml1dir=''
-+sitehtml1direxp=''
-+sitehtml3dir=''
-+sitehtml3direxp=''
-+sitelib='/usr/lib/perl5/site_perl/5.10.0'
-+sitelib_stem='/usr/lib/perl5/site_perl'
-+sitelibexp='/usr/lib/perl5/site_perl/5.10.0'
-+siteman1dir='/usr/share/man/man1'
-+siteman1direxp='/usr/share/man/man1'
-+siteman3dir='/usr/share/man/man3'
-+siteman3direxp='/usr/share/man/man3'
-+siteprefix='/usr'
-+siteprefixexp='/usr'
-+sitescript='/usr/bin'
-+sitescriptexp='/usr/bin'
-+sizesize='4'
-+sizetype='size_t'
-+sleep=''
-+smail=''
-+so='so'
-+sockethdr=''
-+socketlib=''
-+socksizetype='socklen_t'
-+sort='sort'
-+spackage='Perl5'
-+spitshell='cat'
-+srand48_r_proto='REENTRANT_PROTO_I_LS'
-+srandom_r_proto='REENTRANT_PROTO_I_TS'
-+src='.'
-+ssizetype='ssize_t'
-+startperl='#!/usr/bin/perl'
-+startsh='#!/bin/sh'
-+static_ext=' '
-+stdchar='char'
-+stdio_base='((fp)->_IO_read_base)'
-+stdio_bufsiz='((fp)->_IO_read_end - (fp)->_IO_read_base)'
-+stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)'
-+stdio_filbuf=''
-+stdio_ptr='((fp)->_IO_read_ptr)'
-+stdio_stream_array=''
-+strerror_r_proto='REENTRANT_PROTO_B_IBW'
-+strings='/usr/include/string.h'
-+submit=''
-+subversion='0'
-+sysman='/usr/share/man/man1'
-+tail=''
-+tar=''
-+targetarch=''
-+tbl=''
-+tee=''
-+test='test'
-+timeincl='/usr/include/sys/time.h /usr/include/time.h '
-+timetype='time_t'
-+tmpnam_r_proto='REENTRANT_PROTO_B_B'
-+to=':'
-+touch='touch'
-+tr='tr'
-+trnl='\n'
-+troff=''
-+ttyname_r_proto='REENTRANT_PROTO_I_IBW'
-+u16size='2'
-+u16type='unsigned short'
-+u32size='4'
-+u32type='unsigned long'
-+u64size='8'
-+u64type='unsigned long long'
-+u8size='1'
-+u8type='unsigned char'
-+uidformat='"lu"'
-+uidsign='1'
-+uidsize='4'
-+uidtype='uid_t'
-+uname='uname'
-+uniq='uniq'
-+uquadtype='unsigned long long'
-+use5005threads='undef'
-+use64bitall='undef'
-+use64bitint='undef'
-+usecrosscompile='undef'
-+usedl='define'
-+usefaststdio='undef'
-+useithreads='define'
-+uselargefiles='define'
-+uselongdouble='undef'
-+usemallocwrap='define'
-+usemorebits='undef'
-+usemultiplicity='define'
-+usemymalloc='n'
-+usenm='false'
-+useopcode='true'
-+useperlio='define'
-+useposix='true'
-+usereentrant='undef'
-+userelocatableinc='undef'
-+usesfio='false'
-+useshrplib='true'
-+usesitecustomize='undef'
-+usesocks='undef'
-+usethreads='define'
-+usevendorprefix='define'
-+usevfork='false'
-+usrinc='/usr/include'
-+uuname=''
-+uvXUformat='"lX"'
-+uvoformat='"lo"'
-+uvsize='4'
-+uvtype='unsigned long'
-+uvuformat='"lu"'
-+uvxformat='"lx"'
-+vendorarch='/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi'
-+vendorarchexp='/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi'
-+vendorbin='/usr/bin'
-+vendorbinexp='/usr/bin'
-+vendorhtml1dir=' '
-+vendorhtml1direxp=''
-+vendorhtml3dir=' '
-+vendorhtml3direxp=''
-+vendorlib='/usr/lib/perl5/vendor_perl/5.10.0'
-+vendorlib_stem='/usr/lib/perl5/vendor_perl'
-+vendorlibexp='/usr/lib/perl5/vendor_perl/5.10.0'
-+vendorman1dir='/usr/share/man/man1'
-+vendorman1direxp='/usr/share/man/man1'
-+vendorman3dir='/usr/share/man/man3'
-+vendorman3direxp='/usr/share/man/man3'
-+vendorprefix='/usr'
-+vendorprefixexp='/usr'
-+vendorscript='/usr/bin'
-+vendorscriptexp='/usr/bin'
-+version='5.10.0'
-+version_patchlevel_string='version 10 subversion 0'
-+versiononly='undef'
-+vi=''
-+voidflags='15'
-+xlibpth='/usr/lib/386 /lib/386'
-+yacc='yacc'
-+yaccflags=''
-+zcat=''
-+zip='zip'
-+# Configure command line arguments.
-+config_arg0='Configure'
-+config_args='-ds -e -Dprefix=/usr -Dvendorprefix=/usr -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dpager=/bin/less -isR -Dusethreads -Duseshrplib'
-+config_argc=9
-+config_arg1='-ds'
-+config_arg2='-e'
-+config_arg3='-Dprefix=/usr'
-+config_arg4='-Dvendorprefix=/usr'
-+config_arg5='-Dman1dir=/usr/share/man/man1'
-+config_arg6='-Dman3dir=/usr/share/man/man3'
-+config_arg7='-Dpager=/bin/less -isR'
-+config_arg8='-Dusethreads'
-+config_arg9='-Duseshrplib'
-+PERL_REVISION=5
-+PERL_VERSION=10
-+PERL_SUBVERSION=0
-+PERL_API_REVISION=5
-+PERL_API_VERSION=10
-+PERL_API_SUBVERSION=0
-+PERL_PATCHLEVEL=
-+PERL_CONFIG_SH=true
-+# Variables propagated from previous config.sh file.
-+libdb_needs_pthread='N'
-diff -Naur perl-5.10.0.orig/Cross/generate_config_sh perl-5.10.0/Cross/generate_config_sh
---- perl-5.10.0.orig/Cross/generate_config_sh	2007-12-18 05:47:07.000000000 -0500
-+++ perl-5.10.0/Cross/generate_config_sh	1969-12-31 19:00:00.000000000 -0500
-@@ -1,132 +0,0 @@
--#!/usr/bin/perl
--
--##############################################################################
--#
--#	generate_config_sh
--#		Process that takes an automatically generated config.sh
--#		file and allows the environment to overload the values
--#		automatically discovered by Configure on our target platform.
--#
--#	Author	Redvers Davies <red@criticalintegration.com>
--#
--##############################################################################
--
--my $config = shift;
--
--my $sys = $ENV{SYS};
--
--my $callbacks = {};
--$callbacks->{'ar'} = [\&simple_process, ["AR", "arm-linux-ar"]];
--$callbacks->{'archname'} = [\&simple_process, ["SYS", "armv4l-linux"]];
--$callbacks->{'cc'} = [\&simple_process, ["CC", "arm-linux-gcc"]];
--$callbacks->{'cccdlflags'} = [\&simple_process, ["CFLAGS", ""]];
--$callbacks->{'ccdlflags'} = [\&simple_process, ["CFLAGS", ""]];
--$callbacks->{'ccflags'} = [\&simple_process, ["CFLAGS", "-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"]];
--$callbacks->{'ccflags_uselargefiles'} = [\&simple_process, ["CFLAGS", "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"]];
--$callbacks->{'ccname'} = [\&simple_process, ["CC", "arm-linux-gcc"]];
--$callbacks->{'cpp'} = [\&simple_process, ["CCP", "arm-linux-cpp"]];
--$callbacks->{'cppflags'} = [\&simple_process, ["CCPFLAGS", "-fno-strict-aliasing"]];
--$callbacks->{'cpprun'} = [\&simple_process_append, ["CC", "arm-linux-gcc -E", "-E"]];
--$callbacks->{'cppstdin'} = [\&simple_process_append, ["CC", "arm-linux-gcc -E", "-E"]];
--$callbacks->{'full_ar'} = [\&backtick, ["AR", "which $ENV{AR}", "/usr/local/arm/2.95.3/bin/arm-linux-ar"]];
--$callbacks->{'ld'} = [\&simple_process, ["LD", "arm-linux-ld"]];
--$callbacks->{'ldflags'} = [\&simple_process, ["LDFLAGS", ""]];
--$callbacks->{'ldflags_uselargefiles'} = [\&simple_process, ["LDFLAGS", ""]];
--$callbacks->{'myarchname'} = [\&simple_process, ["SYS", "armv4l-linux"]];
--$callbacks->{'archlib'} = [\&library_munge, ["SYS", "armv4l-linux"]];
--$callbacks->{'archlibexp'} = [\&library_munge, ["SYS", "armv4l-linux"]];
--$callbacks->{'installarchlib'} = [\&library_munge, ["SYS", "armv4l-linux"]];
--$callbacks->{'installsitearch'} = [\&library_munge, ["SYS", "armv4l-linux"]];
--$callbacks->{'sitearch'} = [\&library_munge, ["SYS", "armv4l-linux"]];
--$callbacks->{'sitearchexp'} = [\&library_munge, ["SYS", "armv4l-linux"]];
--
--if ($config eq "") {
--	die("Please run me as generate_config_sh path/to/original/config.sh");
--}
--
--open(FILE, "$config") || die("Unable to open $config");
--
--my $line_in;
--while ($line_in = <FILE>) {
--	if ($line_in =~ /^#/) {
--		next;
--	}
--
--	if ($line_in !~ /./) {
--		next;
--	}
--
--	$line_in =~ /^([^=]+)=(.*)/;
--	my $key = $1;
--	my $value = $2;
--	if (ref($callbacks->{$key}) eq "ARRAY") {
--		($callbacks->{$key}[0])->($key,$value);
--	} else {
--		print($line_in);
--	}
--}
--
--sub backtick {
--	my $key = shift;
--	my $value = shift;
--	my $envvar = $callbacks->{$key}->[1][0];
--
--	if ($ENV{$envvar}) {
--		my $rawtext = `$callbacks->{$key}->[1][1]`;
--		chomp($rawtext);
--		print("$key=\'$rawtext\'\n");
--	} else {
--		print("$key=\'$callbacks->{$key}->[1][2]\'\n");
--	}
--}
--	
--
--sub simple_process {
--	my $key = shift;
--	my $envvar = $callbacks->{$key}->[1][0];
--
--	if ($ENV{$envvar}) {
--		print("$key=\"$ENV{$envvar}\"\n");
--	} else {
--		print("$key=\'$callbacks->{$key}->[1][1]\'\n");
--	}
--
--}
--
--sub simple_process_append {
--	my $key = shift;
--	my $envvar = $callbacks->{$key}->[1][0];
--
--	if ($ENV{$envvar}) {
--		print("$key=\"$ENV{$envvar} $callbacks->{$key}->[1][2]\"\n");
--	} else {
--		print("$key=\'$callbacks->{$key}->[1][1]\'\n");
--	}
--
--}
--
--sub library_munge {
--	my $key = shift;
--	my $value = shift;
--	my $envvar = $callbacks->{$key}->[1][0];
--
--	if ($ENV{$envvar}) {
--		$value =~ s/$callbacks->{$key}->[1][1]/$ENV{$envvar}/g;
--		print("$key=$value\n");
--	} else {
--		print("$key=$value\n");
--	}
--		
--}
--
--
--
--
--
--
--
--
--
--
--
--
-diff -Naur perl-5.10.0.orig/Cross/installperl.patch perl-5.10.0/Cross/installperl.patch
---- perl-5.10.0.orig/Cross/installperl.patch	2007-12-18 05:47:07.000000000 -0500
-+++ perl-5.10.0/Cross/installperl.patch	1969-12-31 19:00:00.000000000 -0500
-@@ -1,22 +0,0 @@
----- ../installperl	2003-08-31 11:58:48.000000000 -0500
--+++ installperl	2003-09-05 02:38:40.000000000 -0500
--@@ -3,8 +3,8 @@
-- BEGIN {
--     require 5.004;
--     chdir '..' if !-d 'lib' and -d '../lib';
---    @INC = 'lib';
---    $ENV{PERL5LIB} = 'lib';
--+#    @INC = 'lib';
--+#    $ENV{PERL5LIB} = 'lib';
-- }
-- 
-- use strict;
--@@ -946,7 +946,7 @@
-- 		print " " if (@opts);
-- 		print "$file\n";
-- 	    }
---	    system("strip", @opts, $file);
--+	    system("XXSTRIPXX-strip", @opts, $file);
-- 	} else {
-- 	    print "# file '$file' skipped\n" if $verbose;
-- 	}
-diff -Naur perl-5.10.0.orig/Cross/Makefile perl-5.10.0/Cross/Makefile
---- perl-5.10.0.orig/Cross/Makefile	2007-12-18 05:47:07.000000000 -0500
-+++ perl-5.10.0/Cross/Makefile	2009-04-05 13:27:24.455076604 -0400
-@@ -1,64 +1,84 @@
--## Toplevel Makefile for cross-compilation of perl
--#
--## $Id: Makefile,v 1.5 2003/12/12 00:48:19 red Exp red $
--
--export TOPDIR=${shell pwd}
--include $(TOPDIR)/config
--export CFLAGS
--export SYS=$(ARCH)-$(OS)
--export CROSS=$(ARCH)-$(OS)-
--export FULL_OPTIMIZATION = -fexpensive-optimizations -fomit-frame-pointer -O2
--export OPTIMIZATION = -O2
--
--export CC = $(CROSS)gcc
--export CXX = $(CROSS)g++
--export LD = $(CROSS)ld
--export STRIP = $(CROSS)strip
--export AR = $(CROSS)ar
--export RANLIB = $(CROSS)ranlib
--
--
--## Optimisation work
--ifeq ($(ARCH),arm)
-- ifdef CONFIG_TARGET_ARM_SA11X0
--   ifndef Architecture
--     Architecture = armv4l-strongarm
--   endif
--   FULL_OPTIMIZATION += -march=armv4 -mtune=strongarm1100 -mapcs-32
--   OPTIMIZATION += -march=armv4 -mtune=strongarm1100 -mapcs-32
-- endif
--endif
--
--CFLAGS+=$(FULL_OPTIMIZATION)
--
--all:
--	@echo Please read the README file before doing anything else.
--
--gen_patch:
--	diff -Bbur ../Makefile.SH Makefile.SH > Makefile.SH.patch
--	diff -Bbur ../installperl installperl > installperl.patch
--
--patch:
--	cd .. ; if [ ! -e ./CROSS_PATCHED ] ; then \
--		patch -p1 < Cross/Makefile.SH.patch; \
--		patch -p1 < Cross/installperl.patch ; mv installperl installperl-patched; \
--		sed -e 's/XXSTRIPXX/$(SYS)/' installperl-patched > installperl; \
--		touch CROSS_PATCHED ; fi
--
--perl:
--	@echo Perl cross-build directory is $(TOPDIR)
--	@echo Target arch is $(SYS)
--	@echo toolchain: $(CC), $(CXX), $(LD), $(STRIP), $(AR), $(RANLIB)
--	@echo Optimizations: $(FULL_OPTIMIZATION)
--
--	$(TOPDIR)/generate_config_sh config.sh-$(SYS) > $(TOPDIR)/../config.sh
--	cd $(TOPDIR)/.. ; ./Configure -S ; make depend ; make ; make more
--	cd $(TOPDIR)/.. ; mkdir -p fake_config_library ; cp lib/Config.pm lib/Config_heavy.pl fake_config_library
--	cd $(TOPDIR)/.. ; $(MAKE) more2 "PERLRUN=/usr/bin/perl -I$(TOPDIR)/../fake_config_library -MConfig"
--	cd $(TOPDIR)/.. ; $(MAKE) more3 "PERLRUN=/usr/bin/perl -I$(TOPDIR)/../fake_config_library -MConfig"
--	cd $(TOPDIR)/.. ; $(MAKE) more4 "PERLRUN=/usr/bin/perl -I$(TOPDIR)/../fake_config_library -MConfig"
--	cd $(TOPDIR)/.. ; rm -rf install_me_here
--	cd $(TOPDIR)/.. ; make install-strip
--	cd $(TOPDIR)/.. ; sh -x Cross/warp
-+PWD		:= $(shell pwd)
-+TOP		:= $(shell dirname $(PWD))
- 
-+VERSION		:= $(shell awk '/define[ ]PERL_REVISION/ {printf $$3"."} /define[ ]PERL_VERSION/ {printf $$3"."} /define[ ]PERL_SUBVERSION/ {print $$3}' $(TOP)/patchlevel.h)
- 
-+CROSS_COMPILE	:= arm-unknown-linux-gnu-
-+
-+ARCH		:= arm
-+OS		:= linux
-+
-+SYS		:= $(ARCH)-$(OS)
-+
-+AR		:= $(CROSS_COMPILE)ar
-+CC		:= $(CROSS_COMPILE)gcc
-+CXX		:= $(CROSS_COMPILE)g++
-+CPP		:= $(CROSS_COMPILE)cpp
-+LD		:= $(CROSS_COMPILE)gcc
-+RANLIB		:= $(CROSS_COMPILE)ranlib
-+STRIP		:= $(CROSS_COMPILE)strip
-+
-+ARCHNAME	:= $(SYS)-thread-multi
-+MYARCHNAME	:= $(SYS)
-+
-+HOSTNAME	:= none
-+DOMAIN		:= .nonet
-+CFBY		:= root
-+EMAIL		:= $(CFBY)@$(HOSTNAME)$(DOMAIN)
-+UNAME		:= 
-+CFTIME		:= 
-+
-+.PHONY: all install create-config.sh
-+
-+all: $(TOP)/miniperl-cross
-+	# Do the final build
-+	$(MAKE) create-config.sh
-+	cd $(TOP); ./Configure -S
-+	$(MAKE) -C $(TOP)
-+
-+$(TOP)/miniperl-cross:
-+	cd $(TOP); CC=gcc ./configure.gnu
-+
-+	# Make miniperl
-+	$(MAKE) -C $(TOP) miniperl
-+	mv -v $(TOP)/miniperl $(TOP)/miniperl-cross
-+	$(MAKE) -C $(TOP) clean
-+
-+install:
-+	$(MAKE) -C $(TOP) install
-+
-+create-config.sh:
-+	sed -e "s@\(^archname=\).*@\1'$(ARCHNAME)'@g" \
-+	    -e "s@\(^myarchname=\).*@\1'$(MYARCHNAME)'@g" \
-+	    -e "s@\(^ar=\).*@\1'$(AR)'@g" \
-+	    -e "s@\(^cc=\).*@\1'$(CC)'@g" \
-+	    -e "s@\(^ccname=\).*@\1'$(CC)'@g" \
-+	    -e "s@\(^cpp=\).*@\1'$(CPP)'@g" \
-+	    -e "s@\(^cpprun=\).*@\1'$(CC) -E'@g" \
-+	    -e "s@\(^cppstdin=\).*@\1'$(CC) -E'@g" \
-+	    -e "s@\(^ld=\).*@\1'$(LD)'@g" \
-+	    -e "s@\(^ranlib=\).*@\1'$(RANLIB)'@g" \
-+	    -e "s@\(^full_ar=\).*@\1'$(shell which $(AR))'@g" \
-+	    -e "s@\(^full_sed=\).*@\1'$(shell which sed)'@g" \
-+	    -e "s@\(^ccdlflags=\).*@\1'-Wl,-E -Wl,-rpath,/usr/lib/perl5/$(VERSION)/$(ARCHNAME)/CORE'@g" \
-+	    -e "/^ccflags=/s@-I/usr/local/include@@g" \
-+	    -e "/^cppflags=/s@-I/usr/local/include@@g" \
-+	    -e "/^ldflags=/s@-L/usr/local/lib@@g" \
-+	    -e "/^lddlflags=/s@-L/usr/local/lib@@g" \
-+	    -e "/^archlib=/s@$(VERSION).*@$(VERSION)/$(ARCHNAME)'@" \
-+	    -e "/^archlibexp=/s@$(VERSION).*@$(VERSION)/$(ARCHNAME)'@" \
-+	    -e "/^installarchlib=/s@$(VERSION).*@$(VERSION)/$(ARCHNAME)'@" \
-+	    -e "/^installsitearch=/s@$(VERSION).*@$(VERSION)/$(ARCHNAME)'@" \
-+	    -e "/^installvendorarch=/s@$(VERSION).*@$(VERSION)/$(ARCHNAME)'@" \
-+	    -e "/^sitearch/s@$(VERSION).*@$(VERSION)/$(ARCHNAME)'@" \
-+	    -e "/^sitearchexp/s@$(VERSION).*@$(VERSION)/$(ARCHNAME)'@" \
-+	    -e "/^vendorarch/s@$(VERSION).*@$(VERSION)/$(ARCHNAME)'@" \
-+	    -e "/^vendorarchexp/s@$(VERSION).*@$(VERSION)/$(ARCHNAME)'@" \
-+	    -e "s@\(^myhostname=\).*@\1'$(HOSTNAME)'@g" \
-+	    -e "s@\(^mydomain=\).*@\1'$(DOMAIN)'@g" \
-+	    -e "s@\(^cf_by=\).*@\1'$(CFBY)'@g" \
-+	    -e "s|\(^cf_email=\).*|\1'$(EMAIL)'|g" \
-+	    -e "s|\(^perladmin=\).*|\1'$(EMAIL)'|g" \
-+	    -e "s@\(^myuname=\).*@\1'$(UNAME)'@g" \
-+	    -e "s@\(^cf_time=\).*@\1'$(CFTIME)'@g" \
-+	    $(PWD)/config.sh-$(SYS) > $(TOP)/config.sh
-diff -Naur perl-5.10.0.orig/Cross/Makefile-cross-SH perl-5.10.0/Cross/Makefile-cross-SH
---- perl-5.10.0.orig/Cross/Makefile-cross-SH	2007-12-18 05:47:07.000000000 -0500
-+++ perl-5.10.0/Cross/Makefile-cross-SH	1969-12-31 19:00:00.000000000 -0500
-@@ -1,1406 +0,0 @@
--#! /bin/sh
--
--# This file is used to create generic Makefile for cross-compile
--# (borrowed from Makefile.SH)
--# (now only small changes are done to establish cross-compilation)
--# miniperl removed from here, as this is built on HOST
--
--Makefile=Makefile-cross-$CROSS_NAME
--
--. Cross/config-${CROSS_NAME}.sh
--
--# H.Merijn Brand [17 Feb 2004]
--# This comment is just to ensure that Configure will find variables that
--# are removed/replaced in patches on blead, but are still needed in the
--# 5.8.x, 5.6.x and 5.005.x maintainance tracks.
--# metaconfig -m will scan all .SH files on this level (not deeper), and
--# not in x2p and other subfolders. This file is as good as any .SH
--# patch   references
--# #22227 $baserev
--# #22302 $yacc $byacc
--
--# H.Merijn Brand [30 Oct 2004]
--# Mentioned for the same reason for future reference
--# #23434 $d_strlcat $d_strlcpy
--
--: This forces SH files to create target in same directory as SH file.
--: This is so that make depend always knows where to find SH derivatives.
--case "$0" in
--*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
--esac
--
--case "$d_dosuid" in
--*define*) suidperl='suidperl' ;;
--*) suidperl='';;
--esac
--
--linklibperl='$(LIBPERL)'
--shrpldflags='$(LDDLFLAGS)'
--ldlibpth=''
--DPERL_EXTERNAL_GLOB='-DPERL_EXTERNAL_GLOB'
--case "$useshrplib" in
--true)
--	# Prefix all runs of 'miniperl' and 'perl' with
--	# $ldlibpth so that ./perl finds *this* shared libperl.
--	case "$LD_LIBRARY_PATH" in
--	'')
--		ldlibpth="LD_LIBRARY_PATH=`pwd`";;
--	*)
--		ldlibpth="LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}";;
--	esac
--
--	pldlflags="$cccdlflags"
--	static_target='static_pic'
--	case "${osname}${osvers}" in
--	next4*)
--		ld=libtool
--		lddlflags="-dynamic -undefined warning -framework System \
--		-compatibility_version 1 -current_version $patchlevel \
--		-prebind -seg1addr 0x27000000 -install_name \$(shrpdir)/\$@"
--		;;
--	rhapsody*|darwin*)
--		shrpldflags="${ldflags} -dynamiclib \
--                            -compatibility_version \
--				${api_revision}.${api_version}.${api_subversion} \
--			     -current_version \
--				${revision}.${patchlevel}.${subversion} \
--			     -install_name \$(shrpdir)/\$@"
--		;;
--	cygwin*)
--		linklibperl="-lperl"
--		;;
--	sunos*)
--		linklibperl="-lperl"
--		;;
--	netbsd*|freebsd[234]*|openbsd*|dragonfly*)
--		linklibperl="-L. -lperl"
--		;;
--	interix*)
--		linklibperl="-L. -lperl"
--		shrpldflags="$shrpldflags -Wl,--image-base,0x57000000"
--		;;
--	linux*)
--		shrpldflags="$shrpldflags $ldflags $perllibs $cryptlib"
--		;;
--	aix*)
--		shrpldflags="-H512 -T512 -bhalt:4 -bM:SRE -bE:perl.exp"
--		case "$osvers" in
--		3*)	shrpldflags="$shrpldflags -e _nostart"
--			;;
--		*)	shrpldflags="$shrpldflags -b noentry"
--			;;
--		esac
--	        shrpldflags="$shrpldflags $ldflags $perllibs $cryptlib"
--		linklibperl="-L $archlibexp/CORE -L `pwd | sed 's/\/UU$//'` -lperl"
--		;;
--	hpux*)
--		linklibperl="-L `pwd | sed 's/\/UU$//'` -Wl,+s -Wl,+b$archlibexp/CORE -lperl"
--		;;
--	os390*)
--            shrpldflags='-W l,XPLINK,dll'
--	    linklibperl='libperl.x'
--	    DPERL_EXTERNAL_GLOB=''
--	    ;;
--	esac
--	case "$ldlibpthname" in
--	'') ;;
--	*)
--	    case "$osname" in
--	    os2)
--	        ldlibpth=''
--	        ;;
--	    *)
--		eval "ldlibpth=\"$ldlibpthname=`pwd`:\$$ldlibpthname\""
--		;;
--	    esac
--	    # Strip off any trailing :'s
--	    ldlibpth=`echo $ldlibpth | sed 's/:*$//'`
--	    ;;
--        esac
--
--	case "$ldlibpth" in
--	# Protect any spaces
--	*" "*) ldlibpth=`echo $ldlibpth|sed 's/ /\\\\ /g'` ;;
--	esac
--
--	case "$osname" in
--	linux)
--	    # If there is a pre-existing $libperl from a previous
--	    # installation, Linux needs to use LD_PRELOAD to
--	    # override the LD_LIBRARY_PATH setting.  See the
--	    # INSTALL file, under "Building a shared perl library".
--	    # If there is no pre-existing $libperl, we don't need
--	    # to do anything further.
--	    if test -f $archlib/CORE/$libperl; then
--		rm -f preload
--		cat <<'EOT' > preload
--#! /bin/sh
--lib=$1
--shift
--test -r $lib && export LD_PRELOAD="$lib $LD_PRELOAD"
--exec "$@"
--EOT
--		chmod 755 preload
--		ldlibpth="$ldlibpth `pwd`/preload `pwd`/$libperl"
--	    fi
--	    ;;
--	os390)	test -f /bin/env && ldlibpth="/bin/env $ldlibpth"
--		;;
--	esac
--
--	;;
--
--*)	pldlflags=''
--	static_target='static'
--	;;
--esac
--
--: Prepare dependency lists for Makefile.
--dynamic_list=' '
--extra_dep=''
--for f in $dynamic_ext; do
--    : the dependency named here will never exist
--      base=`echo "$f" | sed 's/.*\///'`
--    this_target="lib/auto/$f/$base.$dlext"  
--    dynamic_list="$dynamic_list $this_target"
--
--    : Parallel makes reveal that we have some interdependencies
--    case $f in
--	Math/BigInt/FastCalc) extra_dep="$extra_dep
--$this_target: lib/auto/List/Util/Util.$dlext" ;;
--	Unicode/Normalize) extra_dep="$extra_dep
--$this_target: uni.data" ;;
--    esac
--done
--
--static_list=' '
--for f in $static_ext; do
--	base=`echo "$f" | sed 's/.*\///'`
--	static_list="$static_list lib/auto/$f/$base\$(LIB_EXT)"
--done
--
--nonxs_list=' '
--for f in $nonxs_ext; do
--    base=`echo "$f" | sed 's/.*\///'`
--    nonxs_list="$nonxs_list ext/$f/pm_to_blib"
--done
--
--echo "Extracting $Makefile (with variable substitutions)"
--$spitshell >$Makefile <<!GROK!THIS!
--# $Makefile.SH
--# This file is derived from $Makefile.SH.  Any changes made here will
--# be lost the next time you run Configure.
--#  $Makefile is used to generate $firstmakefile.  The only difference
--#  is that $firstmakefile has the dependencies filled in at the end.
--
--CC = $cc
--LD = $ld
--
--LDFLAGS = $ldflags
--CLDFLAGS = $ldflags
--
--mallocsrc = $mallocsrc
--mallocobj = $mallocobj
--madlysrc = $madlysrc
--madlyobj = $madlyobj
--LNS = $lns
--# NOTE: some systems don't grok "cp -f". XXX Configure test needed?
--CPS = $cp
--RMS = rm -f
--ranlib = $ranlib
--
--# The following are mentioned only to make metaconfig include the
--# appropriate questions in Configure.  If you want to change these,
--# edit config.sh instead, or specify --man1dir=/wherever on
--# installman commandline.
--bin = $installbin
--scriptdir = $scriptdir
--shrpdir = $archlibexp/CORE
--privlib = $installprivlib
--man1dir = $man1dir
--man1ext = $man1ext
--man3dir = $man3dir
--man3ext = $man3ext
--
--# The following are used to build and install shared libraries for
--# dynamic loading.
--LDDLFLAGS = $lddlflags
--SHRPLDFLAGS = $shrpldflags
--CCDLFLAGS = $ccdlflags
--DLSUFFIX = .$dlext
--PLDLFLAGS = $pldlflags
--LIBPERL = $libperl
--LLIBPERL= $linklibperl
--SHRPENV = $shrpenv
--
--# Static targets are ordinarily built without CCCDLFLAGS.  However,
--# if building a shared libperl.so that might later be linked into
--# another application, then it might be appropriate to also build static
--# extensions (usually just DynaLoader) with relocatable code (e.g. -fPIC
--# for GNU cc).  This is handled by ext/util/make_ext.
--STATIC = $static_target
--
--# The following is used to include the current directory in
--# the dynamic loader path you are building a shared libperl.
--LDLIBPTH = $ldlibpth
--
--dynamic_ext = $dynamic_list
--static_ext = $static_list
--nonxs_ext = $nonxs_list
--ext = \$(dynamic_ext) \$(static_ext) \$(nonxs_ext)
--DYNALOADER = DynaLoader\$(OBJ_EXT)
--
--libs = $perllibs $cryptlib
--
--public = perl\$(EXE_EXT) $suidperl utilities translators
--
--shellflags = $shellflags
--
--# This is set to  MAKE=$make if your $make command doesn't
--# do it for you.
--$make_set_make
--
--# Mention $gmake here so it gets probed for by Configure.
--
--# These variables may need to be manually set for non-Unix systems.
--AR = $full_ar
--EXE_EXT = $_exe
--LIB_EXT = $_a
--OBJ_EXT = $_o
--PATH_SEP = $p_
--
--# If you're going to use valgrind and it can't be invoked as plain valgrind
--# then you'll need to change this, or override it on the make command line.
--VALGRIND=valgrind
--
--FIRSTMAKEFILE = $firstmakefile
--
--# Any special object files needed by this architecture, e.g. os2/os2.obj
--ARCHOBJS = $archobjs
--
--.SUFFIXES: .c \$(OBJ_EXT) .i .s
--
--# grrr
--SHELL = $sh
--
--# how to tr(anslate) newlines
--TRNL = '$trnl'
--
--OPTIMIZE = $optimize
--
--EXTRAS = $extras
--
--INSTALLPREFIXEXP = $prefix
--
--!GROK!THIS!
--# not used by Makefile but by installperl;
--# mentioned here so that metaconfig picks these up
--# $installusrbinperl
--# $versiononly
--
--case "${osname}:${osvers}" in
--darwin:*)
--$spitshell >>$Makefile <<EOF
--
--# Your locales are broken (osname $osname, osvers $osvers)
--# and to avoid the numerous
--# perl: warning: Setting locale failed.
--# warnings during the build process we reset the locale variables.
--
--LC_ALL=C
--LANG=C
--LANGUAGE=C
--EOF
--	;;
--esac
--
--$spitshell >>$Makefile <<!GROK!THIS!
--CROSS_NAME = ${CROSS_NAME}
--CROSS_LIB = xlib/${CROSS_NAME}
--
--CCCMD    = \`sh \$(shellflags) cflags-cross-${CROSS_NAME} "optimize='\$(OPTIMIZE)'" \$@\`
--
--CCCMDSRC = \`sh \$(shellflags) cflags-cross-${CROSS_NAME} "optimize='\$(OPTIMIZE)'" \$<\`
--
--!GROK!THIS!
--
--## In the following dollars and backticks do not need the extra backslash.
--$spitshell >>$Makefile <<'!NO!SUBS!'
--
--CONFIGPM = xlib/$(CROSS_NAME)/Config.pm
--
--private = preplibrary $(CONFIGPM) $(CROSS_LIB)/Config.pod
--
--shextract = Makefile cflags config.h makeaperl makedepend \
--	makedir myconfig writemain pod/Makefile
--
--# Files to be built with variable substitution after miniperl is
--# available.  Dependencies handled manually below (for now).
--
--pl = pod/pod2html.PL pod/pod2latex.PL pod/pod2man.PL pod/pod2text.PL \
--	pod/pod2usage.PL pod/podchecker.PL pod/podselect.PL
--
--# lib/lib.pm is not listed here because it has a rule of its own.
--plextract = pod/pod2html pod/pod2latex pod/pod2man pod/pod2text \
--	pod/pod2usage pod/podchecker pod/podselect
--
--addedbyconf = UU $(shextract) $(plextract) lib/lib.pm pstruct
--
--# Unicode data files generated by mktables
--unidatafiles = lib/unicore/Canonical.pl lib/unicore/Exact.pl \
--	lib/unicore/Properties lib/unicore/Decomposition.pl \
--	lib/unicore/CombiningClass.pl lib/unicore/Name.pl lib/unicore/PVA.pl
--
--# Directories of Unicode data files generated by mktables
--unidatadirs = lib/unicore/To lib/unicore/lib
--
--h1 = EXTERN.h INTERN.h XSUB.h av.h xconfig.h cop.h cv.h dosish.h
--h2 = embed.h form.h gv.h handy.h hv.h keywords.h mg.h op.h opcode.h
--h3 = pad.h patchlevel.h perl.h perlapi.h perly.h pp.h proto.h regcomp.h
--h4 = regexp.h scope.h sv.h unixish.h util.h iperlsys.h thread.h
--h5 = utf8.h warnings.h
--h = $(h1) $(h2) $(h3) $(h4) $(h5)
--
--c1 = av.c scope.c op.c doop.c doio.c dump.c gv.c hv.c mg.c reentr.c mro.c perl.c
--c2 = perly.c pp.c pp_hot.c pp_ctl.c pp_sys.c regcomp.c regexec.c utf8.c sv.c
--c3 = taint.c toke.c util.c deb.c run.c universal.c xsutils.c pad.c globals.c
--c4 = perlio.c perlapi.c numeric.c mathoms.c locale.c pp_pack.c pp_sort.c
--c5 = $(madlysrc) $(mallocsrc)
--
--c = $(c1) $(c2) $(c3) $(c4) $(c5) miniperlmain.c perlmain.c opmini.c
--
--obj1 = $(madlyobj) $(mallocobj) gv$(OBJ_EXT) toke$(OBJ_EXT) perly$(OBJ_EXT) op$(OBJ_EXT) pad$(OBJ_EXT) regcomp$(OBJ_EXT) dump$(OBJ_EXT) util$(OBJ_EXT) mg$(OBJ_EXT) reentr$(OBJ_EXT) mro$(OBJ_EXT)
--obj2 = hv$(OBJ_EXT) av$(OBJ_EXT) perl$(OBJ_EXT) run$(OBJ_EXT) pp_hot$(OBJ_EXT) sv$(OBJ_EXT) pp$(OBJ_EXT) scope$(OBJ_EXT) pp_ctl$(OBJ_EXT) pp_sys$(OBJ_EXT)
--obj3 = doop$(OBJ_EXT) doio$(OBJ_EXT) regexec$(OBJ_EXT) utf8$(OBJ_EXT) taint$(OBJ_EXT) deb$(OBJ_EXT) universal$(OBJ_EXT) xsutils$(OBJ_EXT) globals$(OBJ_EXT) perlio$(OBJ_EXT) perlapi$(OBJ_EXT) numeric$(OBJ_EXT) mathoms$(OBJ_EXT) locale$(OBJ_EXT) pp_pack$(OBJ_EXT) pp_sort$(OBJ_EXT)
--
--obj = $(obj1) $(obj2) $(obj3) $(ARCHOBJS)
--
--lintflags = \
--    -b \
--    -n \
--    -p \
--    -Ncheck=%all \
--    -Nlevel=4 \
--    -errchk=parentheses \
--    -errhdr=%all \
--    -errfmt=src \
--    -errtags \
--    -erroff=E_ASSIGN_NARROW_CONV \
--    -erroff=E_BAD_PTR_CAST \
--    -erroff=E_BAD_PTR_CAST_ALIGN \
--    -erroff=E_BAD_PTR_INT_COMBINATION \
--    -erroff=E_BAD_SIGN_EXTEND \
--    -erroff=E_BLOCK_DECL_UNUSED \
--    -erroff=E_CASE_FALLTHRU \
--    -erroff=E_CONST_EXPR \
--    -erroff=E_CONSTANT_CONDITION \
--    -erroff=E_END_OF_LOOP_CODE_NOT_REACHED \
--    -erroff=E_EQUALITY_NOT_ASSIGNMENT \
--    -erroff=E_EXPR_NULL_EFFECT \
--    -erroff=E_FALSE_LOGICAL_EXPR \
--    -erroff=E_INCL_NUSD \
--    -erroff=E_LOOP_EMPTY \
--    -erroff=E_MAIN_PARAM \
--    -erroff=E_POINTER_TO_OBJECT \
--    -erroff=E_PTRDIFF_OVERFLOW \
--    -erroff=E_SHIFT_CNT_NEG_TOO_BIG_L \
--    -erroff=E_STATIC_UNUSED \
--    -erroff=E_TRUE_LOGICAL_EXPR
--
--splintflags = \
--    -I/usr/lib/gcc/i486-linux-gnu/4.0.2/include/ \
--    -D__builtin_va_list=va_list \
--    -Dsigjmp_buf=jmp_buf \
--    -warnposix \
--    \
--    +boolint \
--    +charintliteral \
--    -fixedformalarray \
--    -mustfreefresh \
--    -nestedextern \
--    -predboolint \
--    -predboolothers \
--    -preproc \
--    -boolops \
--    -shadow \
--    -nullstate \
--    +longintegral \
--    +matchanyintegral \
--    -type \
--    \
--    +line-len 999 \
--    +weak
--
--splintfiles = $(c1)
--
--.c$(OBJ_EXT):
--	$(CCCMD) -I$(CROSS_LIB) $(PLDLFLAGS) $*.c
--
--.c.i:
--	$(CCCMDSRC) -E $*.c > $*.i
--
--.c.s:
--	$(CCCMDSRC) -S $*.c
--
--all: $(FIRSTMAKEFILE) miniperl$(EXE_EXT) extra.pods $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make
--	@echo " ";
--	@echo "	Everything is up to date. Type '$(MAKE) test' to run test suite."
--
--.PHONY: all
--
--
--# This is now done by installman only if you actually want the man pages.
--#	@echo " "; echo "	Making docs"; cd pod; $(MAKE) all;
--
--# Phony target to force checking subdirectories.
--# Apparently some makes require an action for the FORCE target.
--.PHONY: FORCE
--FORCE:
--	@sh -c true
--!NO!SUBS!
--$spitshell >>$Makefile <<!GROK!THIS!
--
--# We do a copy of the op.c instead of a symlink because gcc gets huffy
--# if we have a symlink forest to another disk (it complains about too many
--# levels of symbolic links, even if we have only two)
--
--opmini.c: op.c
--	\$(RMS) opmini.c
--	\$(CPS) op.c opmini.c
--
--opmini\$(OBJ_EXT): opmini.c
--	\$(CCCMD) \$(PLDLFLAGS) $DPERL_EXTERNAL_GLOB opmini.c
--
--globals\$(OBJ_EXT):
--
--!GROK!THIS!
--$spitshell >>$Makefile <<'!NO!SUBS!'
--miniperlmain$(OBJ_EXT): miniperlmain.c patchlevel.h
--	$(CCCMD) $(PLDLFLAGS) $*.c
--
--perlmain.c: miniperlmain.c config.sh $(FIRSTMAKEFILE)
--	sh writemain $(DYNALOADER) $(static_ext) > perlmain.c
--
--!NO!SUBS!
--case "$osname" in
--cygwin)
--	;; # Let cygwin/Makefile.SHs do its work.
--*)
--	$spitshell >>$Makefile <<'!NO!SUBS!'
--perlmain$(OBJ_EXT): perlmain.c
--	$(CCCMD) $(PLDLFLAGS) $*.c
--
--!NO!SUBS!
--	;;
--esac
--$spitshell >>$Makefile <<'!NO!SUBS!'
--# The file ext.libs is a list of libraries that must be linked in
--# for static extensions, e.g. -lm -lgdbm, etc.  The individual
--# static extension Makefile's add to it.
--ext.libs: $(static_ext)
--	-@test -f ext.libs || touch ext.libs
--
--!NO!SUBS!
--
--# How to build libperl.  This is still rather convoluted.
--# Load up custom Makefile.SH fragment for shared loading and executables:
--case "$osname" in
--*)
--	Makefile_s="$osname/Makefile.SHs"
--	;;
--esac
--
--case "$osname" in
--aix)
--	$spitshell >>$Makefile <<!GROK!THIS!
--LIBS			= $perllibs
--# In AIX we need to change this for building Perl itself from
--# its earlier definition (which is for building external
--# extensions *after* Perl has been built and installed)
--CCDLFLAGS		= `echo $ccdlflags|sed -e 's@-bE:.*/perl\.exp@-bE:perl.exp@'`
--
--!GROK!THIS!
--	case "$useshrplib" in
--	define|true|[yY]*)
--		$spitshell >>$Makefile <<'!NO!SUBS!'
--
--LIBPERL_NONSHR		= libperl_nonshr$(LIB_EXT)
--MINIPERL_NONSHR		= miniperl_nonshr$(EXE_EXT)
--
--$(LIBPERL_NONSHR): $(obj)
--	$(RMS) $(LIBPERL_NONSHR)
--	$(AR) rcu $(LIBPERL_NONSHR) $(obj)
--
--$(MINIPERL_NONSHR): $(LIBPERL_NONSHR) miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT)
--	$(CC) $(LDFLAGS) -o $(MINIPERL_NONSHR) miniperlmain$(OBJ_EXT) \
--	    opmini$(OBJ_EXT) $(LIBPERL_NONSHR) $(LIBS)
--
--MINIPERLEXP		= $(MINIPERL_NONSHR)
--
--LIBPERLEXPORT		= perl.exp
--
--!NO!SUBS!
--		
--		;;
--	*)	
--		$spitshell >>$Makefile <<'!NO!SUBS!'
--MINIPERLEXP		= miniperl$(EXE_EXT)
--
--PERLEXPORT		= perl.exp
--
--!NO!SUBS!
--	;;
--	esac
--	$spitshell >>$Makefile <<'!NO!SUBS!'
--perl.exp: $(MINIPERLEXP) makedef.pl config.sh $(SYM) $(SYMH)
--	./$(MINIPERLEXP) makedef.pl PLATFORM=aix CC_FLAGS="$(OPTIMIZE)" | sort -u | sort -f > perl.exp
--
--!NO!SUBS!
--	;;
--os2)
--	$spitshell >>$Makefile <<'!NO!SUBS!'
--MINIPERLEXP		= miniperl
--
--perl5.def: $(MINIPERLEXP) makedef.pl config.sh $(SYM) $(SYMH) miniperl.map
--	./$(MINIPERLEXP) makedef.pl PLATFORM=os2 -DPERL_DLL=$(PERL_DLL) CC_FLAGS="$(OPTIMIZE)" > perl5.def
--
--!NO!SUBS!
--	;;
--esac
--
--if test -r $Makefile_s ; then
--	. $Makefile_s
--	$spitshell >>$Makefile <<!GROK!THIS!
--
--$Makefile: $Makefile_s
--!GROK!THIS!
--else
--	$spitshell >>$Makefile <<'!NO!SUBS!'
--$(LIBPERL): $& $(obj) $(DYNALOADER) $(LIBPERLEXPORT)
--!NO!SUBS!
--	case "$useshrplib" in
--	true)
--		$spitshell >>$Makefile <<'!NO!SUBS!'
--	rm -f $@
--	$(LD) -o $@ $(SHRPLDFLAGS) $(obj) $(DYNALOADER) $(libs)
--!NO!SUBS!
--		case "$osname" in
--		aix)
--			$spitshell >>$Makefile <<'!NO!SUBS!'
--	rm -f libperl$(OBJ_EXT)
--	mv $@ libperl$(OBJ_EXT)
--	$(AR) qv $(LIBPERL) libperl$(OBJ_EXT)
--!NO!SUBS!
--			;;
--		esac
--		;;
--	*)
--		$spitshell >>$Makefile <<'!NO!SUBS!'
--	rm -f $(LIBPERL)
--	$(AR) rcu $(LIBPERL) $(obj) $(DYNALOADER)
--	@$(ranlib) $(LIBPERL)
--!NO!SUBS!
--		;;
--	esac
--	$spitshell >>$Makefile <<'!NO!SUBS!'
--
--# How to build executables.
--
--# The $& notation tells Sequent machines that it can do a parallel make,
--# and is harmless otherwise.
--# The miniperl -w -MExporter line is a basic cheap test to catch errors
--# before make goes on to run preplibrary and then MakeMaker on extensions.
--# This is very handy because later errors are often caused by miniperl
--# build problems but that's not obvious to the novice.
--# The Module used here must not depend on Config or any extensions.
--
--!NO!SUBS!
--
--
--	$spitshell >>$Makefile <<'!NO!SUBS!'
--
--perl$(EXE_EXT): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT)
--	-@rm -f miniperl.xok
--	$(SHRPENV) $(LDLIBPTH) $(CC) -o perl$(PERL_SUFFIX)dyn$(EXE_EXT) $(PERL_PROFILE_LDFLAGS) $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
--	$(SHRPENV) $(LDLIBPTH) $(CC) -o perl$(PERL_SUFFIX)$(EXE_EXT) $(PERL_PROFILE_LDFLAGS) $(CLDFLAGS) perlmain$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
--
--# Purify/Quantify Perls.
--
--pureperl$(EXE_EXT): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT)
--	$(SHRPENV) $(LDLIBPTH) purify $(CC) -o pureperl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
--
--purecovperl$(EXE_EXT): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT)
--	$(SHRPENV) $(LDLIBPTH) purecov $(CC) -o purecovperl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
--
--quantperl$(EXE_EXT): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT)
--	$(SHRPENV) $(LDLIBPTH) quantify $(CC) -o quantperl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
--
--# Valgrind perl (currently Linux only)
--
--perl.valgrind.config: config.sh
--	@echo "To build perl.valgrind you must Configure -Doptimize=-g -Uusemymalloc, checking..."
--	@$(MAKE) perl.config.dashg
--	@echo "Checking usemymalloc='n' in config.sh..."
--	@grep "^usemymalloc="    config.sh
--	@grep "^usemymalloc='n'" config.sh >/dev/null || exit 1
--	@echo "And of course you have to have valgrind..."
--	$(VALGRIND) ./perl -e 1 2>/dev/null || exit 1
--
--# Third Degree Perl (Tru64 only)
--
--perl.config.dashg:
--	@echo "Checking optimize='-g' in config.sh..."
--	@grep "^optimize=" config.sh
--	@egrep "^optimize='(.*-g.*)'" config.sh >/dev/null || exit 1
--
--perl.third.config: config.sh
--	@echo "To build perl.third you must Configure -Doptimize=-g -Uusemymalloc, checking..."
--	@$(MAKE) perl.config.dashg
--	@echo "Checking usemymalloc='n' in config.sh..."
--	@grep "^usemymalloc="    config.sh
--	@grep "^usemymalloc='n'" config.sh >/dev/null || exit 1
--
--perl.third: /usr/bin/atom perl.third.config perl
--	atom -tool third -L. -all -gp -toolargs="-invalid -uninit heap+stack+copy -min 0" perl
--	@echo "Now you may run perl.third and then study perl.3log."
--
--# Pixie Perls (Tru64 and IRIX only)
--
--perl.pixie.config: config.sh
--	@echo "To build perl.pixie you must Configure -Doptimize=-g, checking..."
--	@$(MAKE) perl.config.dashg
--
--perl.pixie.atom: /usr/bin/atom perl
--	atom -tool pixie -L. -all -toolargs="-quiet" perl
--
--perl.pixie.irix: perl
--	pixie perl
--
--perl.pixie: /usr/bin/pixie perl.pixie.config perl
--	if test -x /usr/bin/atom; then \
--	  $(MAKE) perl.pixie.atom; \
--	else \
--	  $(MAKE) perl.pixie.irix; \
--	fi
--	@echo "Now you may run perl.pixie and then run pixie."
--
--# Gprof Perl
--
--perl.config.dashpg:
--	@echo "Checking optimize='-pg' in config.sh..."
--	@grep "^optimize="      config.sh
--	@grep "^optimize='.*-pg.*'" config.sh >/dev/null || exit 1
--
--perl.gprof.config: config.sh
--	@echo "To build perl.gprof you must Configure -Doptimize=-pg, checking..."
--	@$(MAKE) perl.config.dashpg
--
--perl.gprof: /usr/bin/gprof perl.gprof.config
--	@-rm -f perl
--	$(MAKE) PERL_SUFFIX=.gprof PERL_PROFILE_LDFLAGS=-pg perl
--	@echo "Now you may run perl.gprof and then run gprof perl.gprof."
--
--# Gcov Perl
--
--perl.config.gcov:
--	@echo "To build perl.gcov you must use gcc 3.0 or newer, checking..."
--	@echo "Checking gccversion in config.sh..."
--	@grep "^gccversion="      config.sh
--	@grep "^gccversion='[3-9]\." config.sh >/dev/null || exit 1
--	@echo "To build perl.gcov you must Configure -Dccflags=-fprofile-arcs -ftest-coverage, checking..."
--	@echo "Checking ccflags='-fprofile-arcs -ftest-coverage' in config.sh..."
--	@grep "^ccflags="      config.sh
--	@grep "^ccflags='.*-fprofile-arcs -ftest-coverage.*'" config.sh >/dev/null || exit 1
--
--perl.gcov: perl.config.gcov
--	@-rm -f perl
--	$(MAKE) PERL_SUFFIX=.gcov PERL_PROFILE_LDFLAGS='' perl
--	@echo "Now you may run perl.gcov and then run gcov some.c."
--
--# Microperl.  This is just a convenience thing if one happens to
--# build also the full Perl and therefore the real big Makefile:
--# usually one should manually explicitly issue the below command.
--
--.PHONY: microperl
--microperl:
--	$(MAKE) -f Makefile.micro
--
--# This version, if specified in Configure, does ONLY those scripts which need
--# set-id emulation.  Suidperl must be setuid root.  It contains the "taint"
--# checks as well as the special code to validate that the script in question
--# has been invoked correctly.
--
--suidperl$(EXE_EXT): $& sperl$(OBJ_EXT) perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT)
--	$(SHRPENV) $(LDLIBPTH) $(CC) -o suidperl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) sperl$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
--
--!NO!SUBS!
--
--fi
--
--$spitshell >>$Makefile <<'!NO!SUBS!'
--
--sperl$(OBJ_EXT): perl.c $(h)
--	$(RMS) sperl.c
--	$(LNS) perl.c sperl.c
--	$(CCCMD) -DIAMSUID sperl.c
--	$(RMS) sperl.c
--
--# We have to call our ./makedir because Ultrix 4.3 make can't handle the line
--#	test -d lib/auto || mkdir lib/auto
--# We need to autosplit in two steps because VOS can't handle so many args
--#
--.PHONY: preplibrary
--preplibrary: miniperl $(CONFIGPM) lib/lib.pm $(PREPLIBRARY_LIBPERL)
--	@sh ./makedir lib/auto
--	@echo "	AutoSplitting perl library"
--	$(LDLIBPTH) ./miniperl -Ilib -MCross -e 'use AutoSplit; \
--		autosplit_lib_modules(@ARGV)' lib/*.pm
--	$(LDLIBPTH) ./miniperl -Ilib -MCross -e 'use AutoSplit; \
--		autosplit_lib_modules(@ARGV)' lib/*/*.pm
--	$(MAKE) lib/re.pm
--
--.PHONY: makeppport
--makeppport: miniperl$(EXE_EXT) $(CONFIGPM)
--	$(LDLIBPTH) ./miniperl$(EXE_EXT) -Ilib mkppport
--
--$(CROSS_LIB)/Config.pod: config.sh miniperl configpm Porting/Glossary
--	$(LDLIBPTH) ./miniperl -Ilib configpm --cross=$(CROSS_NAME)
--	cp *.h $(CROSS_LIB)/
--	cp ext/re/re.pm $(LIBDIR)/
--
--$(CONFIGPM): $(CROSS_LIB)/Config.pod xconfig.h
--
--lib/re.pm: ext/re/re.pm
--	@-rm -f $@
--	cp ext/re/re.pm lib/re.pm
--
--$(plextract):	miniperl $(CONFIGPM) x2p/s2p
--	@-rm -f $@
--	$(LDLIBPTH) ./miniperl -I`pwd`/lib $@.PL
--
--lib/lib.pm:	miniperl $(CONFIGPM)
--	@-rm -f $@
--	$(LDLIBPTH) ./miniperl -Ilib -MCross lib/lib_pm.PL
--
--unidatafiles $(unidatafiles): uni.data
--
--uni.data: miniperl$(EXE_EXT) $(CONFIGPM) lib/unicore/mktables
--	cd lib/unicore && $(LDLIBPTH) ../../miniperl -I../../lib mktables -w
--	touch uni.data
--
--extra.pods: miniperl
--	-@test ! -f extra.pods || rm -f `cat extra.pods`
--	-@rm -f extra.pods
--	-@for x in `grep -l '^=[a-z]' README.* | grep -v README.vms` ; do \
--	    nx=`echo $$x | sed -e "s/README\.//"`; \
--	    cd pod ; $(LNS) ../$$x "perl"$$nx".pod" ; cd .. ; \
--	    echo "pod/perl"$$nx".pod" >> extra.pods ; \
--	done
--	-@rm -f pod/perlvms.pod
--	-@test -f vms/perlvms.pod && cd pod && $(LNS) ../vms/perlvms.pod perlvms.pod && cd .. && echo "pod/perlvms.pod" >> extra.pods
--	-@rm -f pod/perldelta.pod
--	-@test -f pod/perl5100delta.pod && cd pod && $(LNS) perl5100delta.pod perldelta.pod && cd .. && echo "pod/perldelta.pod" >> extra.pods # See buildtoc
--
--extras.make: perl$(EXE_EXT)
--	-@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(LDLIBPTH) ./perl -Ilib -MCPAN -e '@ARGV&&make(@ARGV)' `cat extras.lst`
--
--extras.test: perl$(EXE_EXT)
--	-@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(LDLIBPTH) ./perl -Ilib -MCPAN -e '@ARGV&&test(@ARGV)' `cat extras.lst`
--
--extras.install: perl$(EXE_EXT)
--	-@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(LDLIBPTH) ./perl -Ilib -MCPAN -e '@ARGV&&install(@ARGV)' `cat extras.lst`
--
--.PHONY: install install-strip install-all install-verbose install-silent \
--	no-install install.perl install.man install.html
--
--META.yml:	Porting/makemeta Porting/Maintainers.pl Porting/Maintainers.pm
--	$(LDLIBPTH) ./miniperl -Ilib Porting/makemeta
--
--install-strip:
--	$(MAKE) STRIPFLAGS=-s install DESTDIR="$(DESTDIR)"
--
--install install-all:
--	$(MAKE) install.perl install.man STRIPFLAGS=$(STRIPFLAGS) DESTDIR="$(DESTDIR)"
--
--install-verbose:
--	$(MAKE) install.perl install.man STRIPFLAGS=$(STRIPFLAGS) INSTALLFLAGS=-V DESTDIR="$(DESTDIR)"
--
--install-silent:
--	$(MAKE) install.perl install.man STRIPFLAGS=$(STRIPFLAGS) INSTALLFLAGS=-S DESTDIR="$(DESTDIR)"
--
--no-install:
--	$(MAKE) install.perl install.man STRIPFLAGS=$(STRIPFLAGS) INSTALLFLAGS=-n DESTDIR="$(DESTDIR)"
--
--# Set this to an empty string to avoid an attempt of rebuild before install
--INSTALL_DEPENDENCE = all
--
--install.perl:	$(INSTALL_DEPENDENCE) installperl
--	$(LDLIBPTH) ./perl installperl --destdir=$(DESTDIR) $(INSTALLFLAGS) $(STRIPFLAGS)
--	-@test ! -s extras.lst || $(MAKE) extras.install
--
--install.man:	all installman
--	$(LDLIBPTH) ./perl installman --destdir=$(DESTDIR) $(INSTALLFLAGS)
--
--# XXX Experimental. Hardwired values, but useful for testing.
--# Eventually Configure could ask for some of these values.
--install.html: all installhtml
--	-@test -f README.vms && cd vms && $(LNS) ../README.vms README_vms.pod && cd ..
--	$(LDLIBPTH) ./perl installhtml   \
--      --podroot=. --podpath=. --recurse  \
--      --htmldir=$(privlib)/html   \
--      --htmlroot=$(privlib)/html  \
--      --splithead=pod/perlipc     \
--      --splititem=pod/perlfunc    \
--      --libpods=perlfunc:perlguts:perlvar:perlrun:perlop \
--      --ignore=Porting/Maintainers.pm,Porting/patching.pod,Porting/pumpkin.pod,Porting/repository.pod \
--      --verbose
--
--
--# I now supply perly.c with the kits, so the following section is
--# used only if you force bison to run by saying
--# 	make regen_perly
--# You normally shouldn't remake perly.[ch].
--
--.PHONY: regen_perly
--
--run_byacc:
--	@echo "run_byacc is obsolete; try 'make regen_perly' instead"
--
--# this outputs perly.h, perly.act and perly.tab
--regen_perly:
--	perl regen_perly.pl
--
--# We don't want to regenerate perly.c and perly.h, but they might
--# appear out-of-date after a patch is applied or a new distribution is
--# made.
--perly.c: perly.y
--	-@sh -c true
--
--perly.h: perly.y
--	-@sh -c true
--
--# No compat3.sym here since and including the 5.004_50.
--# No interp.sym since 5.005_03.
--SYM  = global.sym globvar.sym perlio.sym pp.sym
--
--SYMH = perlvars.h intrpvar.h
--
--CHMOD_W = chmod +w
--
--# The following files are generated automatically
--#	autodoc.pl:	pod/perlapi.pod pod/perlintern.pod
--#	embed.pl:	proto.h embed.h embedvar.h global.sym
--#			perlapi.h perlapi.c 
--# [* embed.pl needs pp.sym generated by opcode.pl! *]
--#	keywords.pl:	keywords.h
--#	opcode.pl:	opcode.h opnames.h pp_proto.h pp.sym
--#	regcomp.pl:	regnodes.h
--#	warnings.pl:	warnings.h lib/warnings.pm
--# The correct versions should be already supplied with the perl kit,
--# in case you don't have perl available.
--# To force them to be regenerated, run
--#       perl regen.pl
--# with your existing copy of perl
--# (make regen_headers is kept for backwards compatibility)
--
--AUTOGEN_FILES = keywords.h opcode.h opnames.h pp_proto.h pp.sym proto.h \
--		embed.h embedvar.h global.sym \
--		pod/perlintern.pod pod/perlapi.pod \
--		perlapi.h perlapi.c regnodes.h \
--		warnings.h lib/warnings.pm
--
--.PHONY: regen_headers regen_pods regen_all
--
--regen regen_headers:	FORCE
--	-perl regen.pl
--
--regen_pods:	FORCE
--	-cd pod; $(LDLIBPTH) $(MAKE) regen_pods
--
--regen_all: regen regen_pods
--
--.PHONY:	manisort manicheck
--
--manisort:	FORCE
--	LC_ALL=C sort -fdc MANIFEST || (echo "WARNING: re-sorting MANIFEST"; \
--		LC_ALL=C sort -fdo MANIFEST MANIFEST)
--
--manicheck:	FORCE
--	perl Porting/manicheck
--
--# Extensions:
--# Names added to $(dynamic_ext) or $(static_ext) or $(nonxs_ext) will
--# automatically get built.  There should ordinarily be no need to change
--# any of this part of makefile.
--#
--# The dummy dependency is a place holder in case $(dynamic_ext) or
--# $(static_ext) is empty.
--#
--# DynaLoader may be needed for extensions that use Makefile.PL.
--
--###$(DYNALOADER).c: $(EXTDIR)/DynaLoader/dl_dld.xs $(CONFIGPM)
--###	if not exist $(AUTODIR) mkdir $(AUTODIR)
--###	cd $(EXTDIR)\$(*B)
--###	$(HPERL) -I..\..\lib -MCross=$(CROSS_NAME) $(*B)_pm.PL
--###	$(HPERL) -I..\..\lib -MCross=$(CROSS_NAME) XSLoader_pm.PL
--###	cd ..\..\win32
--###	$(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
--###	$(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
--###	cd $(EXTDIR)\$(*B)
--###	$(XSUBPP) dl_win32.xs > $(*B).c
--###	cd ..\..\win32
--###
--###$(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
--###	$(COPY) dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
--
--
--
--$(DYNALOADER):	preplibrary FORCE
--	@$(LDLIBPTH) sh ext/util/make_ext_cross $(STATIC) $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
--
--d_dummy $(dynamic_ext):	miniperl$(EXE_EXT) preplibrary makeppport $(DYNALOADER) FORCE
--	@$(LDLIBPTH) sh ext/util/make_ext_cross dynamic $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
--
--s_dummy $(static_ext):	miniperl$(EXE_EXT) preplibrary makeppport $(DYNALOADER) FORCE
--	@$(LDLIBPTH) sh ext/util/make_ext_cross $(STATIC) $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
--
--n_dummy $(nonxs_ext):	miniperl$(EXE_EXT) preplibrary $(DYNALOADER) FORCE
--	@$(LDLIBPTH) sh ext/util/make_ext_cross nonxs $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
--!NO!SUBS!
--
--$spitshell >>$Makefile <<EOF
--$extra_dep
--EOF
--
--$spitshell >>$Makefile <<'!NO!SUBS!'
--
--.PHONY: printconfig
--printconfig:
--	@eval `$(LDLIBPTH) ./perl -Ilib -V:$(CONFIGVAR)`; echo $$$(CONFIGVAR)
--
--.PHONY: clean _tidy _mopup _cleaner1 _cleaner2 \
--	realclean _realcleaner clobber _clobber \
--	distclean veryclean _verycleaner \
--	cleanup_unpacked_files unpack_files
--
--clean:		cleanup_unpacked_files _tidy _mopup 
--
--realclean:	cleanup_unpacked_files _realcleaner _mopup
--	@echo "Note that '$(MAKE) realclean' does not delete config.sh or Policy.sh"
--
--_clobber:
--	-@rm -f Cross/run-* Cross/to-* Cross/from-*
--	rm -f config.sh cppstdin Policy.sh extras.lst
--
--clobber:	cleanup_unpacked_files _realcleaner _mopup _clobber
--
--distclean:	clobber
--
--# Like distclean but also removes emacs backups and *.orig.
--veryclean:	_verycleaner _mopup _clobber
--	-@rm -f Obsolete Wanted
--
--# Do not 'make _mopup' directly.
--_mopup:
--	rm -f *$(OBJ_EXT) *$(LIB_EXT) all perlmain.c opmini.c uudmap.h generate_uudmap$(EXE_EXT)
--	-rmdir .depending
--	-@test -f extra.pods && rm -f `cat extra.pods`
--	-@test -f vms/README_vms.pod && rm -f vms/README_vms.pod
--	-rm -f perl.exp ext.libs extra.pods uni.data opmini.o
--	-rm -f perl.export perl.dll perl.libexp perl.map perl.def
--	-rm -f perl.loadmap miniperl.loadmap perl.prelmap miniperl.prelmap
--	-rm -f perl.third lib*.so.perl.third perl.3log t/perl.third t/perl.3log
--	-rm -f perl.pixie lib*.so.perl.pixie lib*.so.Addrs
--	-rm -f perl.Addrs perl.Counts t/perl.Addrs t/perl.Counts *perl.xok
--	-rm -f cygwin.c libperl*.def libperl*.dll cygperl*.dll *.exe.stackdump
--	-rm -f perl$(EXE_EXT) suidperl$(EXE_EXT) miniperl$(EXE_EXT) $(LIBPERL) libperl.* microperl
--	-rm -f opcode.h-old opnames.h-old pp.sym-old pp_proto.h-old
--	-rm -f config.over
--
--# Do not 'make _tidy' directly.
--_tidy:
--	-cd pod; $(LDLIBPTH) $(MAKE) clean
--	-cd utils; $(LDLIBPTH) $(MAKE) clean
--	-cd x2p; $(LDLIBPTH) $(MAKE) clean
--	-@for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) $(nonxs_ext) ; do \
--	$(LDLIBPTH) sh ext/util/make_ext clean $$x MAKE=$(MAKE) ; \
--	done
--
--_cleaner1:
--	-cd os2; rm -f Makefile
--	-cd pod; $(LDLIBPTH) $(MAKE) $(CLEAN)
--	-cd utils; $(LDLIBPTH) $(MAKE) $(CLEAN)
--	-cd x2p; $(LDLIBPTH) $(MAKE) $(CLEAN)
--	-@for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) $(nonxs_ext) ; do \
--	$(LDLIBPTH) sh ext/util/make_ext $(CLEAN) $$x MAKE=$(MAKE) ; \
--	done
--	-@test ! -f ./miniperl$(EXE_EXT) || $(LDLIBPTH) ./miniperl$(EXE_EXT) -Ilib mkppport --clean
--
--# Some systems do not support "?", so keep these files separate.
--_cleaner2:
--	-rm -f core.*perl.*.? t/core.perl.*.? .?*.c
--	rm -f core *perl.core t/core t/*perl.core core.* t/core.*
--	rm -f t/misctmp* t/forktmp* t/tmp* t/c t/perl$(EXE_EXT) t/rantests
--	rm -f so_locations $(LIBPERL_NONSHR) $(MINIPERL_NONSHR)
--	rm -rf $(addedbyconf)
--	rm -f $(FIRSTMAKEFILE) $(FIRSTMAKEFILE).old makefile.old
--	rm -f $(private)
--	rm -rf $(unidatafiles) $(unidatadirs)
--	rm -rf lib/auto
--	rm -f lib/.exists lib/*/.exists lib/*/*/.exists
--	rm -f h2ph.man pstruct
--	rm -rf .config
--	rm -f preload
--	rm -rf lib/Encode lib/Compress lib/Hash lib/re
--	rm -rf lib/IO/Compress lib/IO/Uncompress
--	rm -f lib/ExtUtils/ParseXS/t/XSTest.c
--	rm -f lib/ExtUtils/ParseXS/t/XSTest$(OBJ_EXT)
--	rm -f lib/ExtUtils/ParseXS/t/XSTest$(DLSUFFIX)
--	-rmdir lib/B lib/Data
--	-rmdir lib/Filter/Util lib/IO/Socket
--	-rmdir lib/List lib/MIME lib/Scalar lib/Sys
--	-rmdir lib/threads lib/XS
--
--_realcleaner:
--	@$(LDLIBPTH) $(MAKE) _cleaner1 CLEAN=realclean
--	@$(LDLIBPTH) $(MAKE) _cleaner2
--
--_verycleaner:
--	@$(LDLIBPTH) $(MAKE) _cleaner1 CLEAN=veryclean
--	@$(LDLIBPTH) $(MAKE) _cleaner2
--	-rm -f *~ *.orig */*~ */*.orig */*/*~ */*/*.orig
--
--.PHONY: lint
--lint: $(c)
--	rm -f *.ln
--	lint $(lintflags) -DPERL_CORE -D_REENTRANT -DDEBUGGING -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(c)
--
--.PHONY: splint
--splint: $(c)
--	splint $(splintflags) -DPERL_CORE -D_REENTRANT -DDEBUGGING -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(splintfiles)
--
--# Need to unset during recursion to go out of loop.
--# The README below ensures that the dependency list is never empty and
--# that when MAKEDEPEND is empty $(FIRSTMAKEFILE) doesn't need rebuilding.
--
--MAKEDEPEND = Makefile makedepend
--
--$(FIRSTMAKEFILE):	README $(MAKEDEPEND)
--	$(MAKE) depend MAKEDEPEND=
--
--config.h: config_h.SH config.sh
--	$(SHELL) config_h.SH
--	# TODO - improve following line
--	cp config.h $(CROSS_LIB)/
--
--xconfig.h: config_h.SH Cross/config-$(CROSS_NAME).sh
--	CONFIG_SH=Cross/config-$(CROSS_NAME).sh CONFIG_H=xconfig.h $(SHELL) config_h.SH
--	#TODO $(LDLIBPTH) ./miniperl -Ilib -MCross=$(CROSS_NAME) config_h.PL "INST_VER=$(INST_VER)" "CORE_DIR=$(CROSS_LIB)" "CONFIG_H=xconfig.h"
--	cp xconfig.h $(CROSS_LIB)/
--	cp xconfig.h $(CROSS_LIB)/config.h
--
--# When done, touch perlmain.c so that it doesn't get remade each time.
--.PHONY: depend
--depend: makedepend
--	sh ./makedepend MAKE=$(MAKE)
--	- test -s perlmain.c && touch perlmain.c
--	cd x2p; $(MAKE) depend
--
--# Cannot postpone this until $firstmakefile is ready ;-)
--makedepend: makedepend.SH config.sh
--	sh ./makedepend.SH
--
--.PHONY: test check test_prep test_prep_nodll test_prep_pre _test_prep \
--	test_tty test-tty _test_tty test_notty test-notty _test_notty \
--	utest ucheck test.utf8 check.utf8 test.torture torturetest \
--	test.utf16 check.utf16 utest.utf16 ucheck.utf16 \
--	test.third check.third utest.third ucheck.third test_notty.third \
--	test.deparse test_notty.deparse test_harness test_harness_notty \
--	minitest coretest test.taintwarn
--
--# Cannot delegate rebuilding of t/perl to make
--# to allow interlaced test and minitest
--
--TESTFILE=TEST
--
--_test_prep: unpack_files
--	cd t && (rm -f $(PERL)$(EXE_EXT); $(LNS) ../$(PERL)$(EXE_EXT) $(PERL)$(EXE_EXT))
--
--# Architecture-neutral stuff:
--
--test_prep_pre: preplibrary utilities $(nonxs_ext)
--
--test_prep: test_prep_pre miniperl$(EXE_EXT) $(unidatafiles) perl$(EXE_EXT) $(dynamic_ext) $(TEST_PERL_DLL)
--	PERL=./perl $(MAKE) _test_prep
--
--_test_tty:
--	cd t && $(PERL_DEBUG) $(LDLIBPTH) $(PERL) $(TESTFILE) $(TEST_ARGS) </dev/tty
--
--_test_notty:
--	cd t && $(PERL_DEBUG) PERL_SKIP_TTY_TEST=1 $(LDLIBPTH) $(PERL) $(TESTFILE) $(TEST_ARGS)
--
--unpack_files:
--	$(LDLIBPTH) ./miniperl$(EXE_EXT) -Ilib uupacktool.pl -u -m
--
--cleanup_unpacked_files:
--	-@test ! -f ./miniperl$(EXE_EXT) || $(LDLIBPTH) ./miniperl$(EXE_EXT) -Ilib uupacktool.pl -c
--
--# The second branch is for testing without a tty or controlling terminal,
--# see t/op/stat.t
--_test:
--	if (true </dev/tty) >/dev/null 2>&1; then \
--	  $(MAKE) TEST_ARGS=$(TEST_ARGS) TESTFILE=$(TESTFILE) _test_tty   ; \
--	else \
--	  $(MAKE) TEST_ARGS=$(TEST_ARGS) TESTFILE=$(TESTFILE) _test_notty ; \
--	fi
--	@echo "Ran tests" > t/rantests
--
--test check: test_prep
--	PERL=./perl $(MAKE) _test
--
--test_tty: test_prep
--	PERL=./perl $(MAKE) _test_tty
--
--test_notty: test_prep
--	PERL=./perl $(MAKE) _test_notty
--
--utest ucheck test.utf8 check.utf8: test_prep
--	PERL=./perl TEST_ARGS=-utf8 $(MAKE) _test
--
--coretest: test_prep
--	PERL=./perl TEST_ARGS=-core $(MAKE) _test
--
--test-prep:	test_prep
--
--test-tty:	test_tty
--
--test-notty:	test_notty
--
--# Torture testing
--
--test.torture torturetest:	test_prep
--	PERL=./perl TEST_ARGS=-torture $(MAKE) _test
--
--# Targets for UTF16 testing:
--
--minitest.utf16: minitest.prep
--	- cd t && (rm -f perl$(EXE_EXT); $(LNS) ../miniperl$(EXE_EXT) perl$(EXE_EXT)) \
--		&& $(LDLIBPTH) ./perl TEST -minitest -utf16 base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t uni/*.t </dev/tty
--
--test.utf16 check.utf16: test_prep
--	PERL=./perl $(MAKE) TEST_ARGS=-utf16 _test
--
--utest.utf16 ucheck.utf16: test_prep
--	PERL=./perl $(MAKE) TEST_ARGS="-utf8 -utf16" _test
--
--# Targets for valgrind testing:
--
--test_prep.valgrind: test_prep perl.valgrind
--	PERL=./perl $(MAKE) _test_prep
--
--test.valgrind check.valgrind:	test_prep perl.valgrind.config
--	PERL=./perl PERL_DEBUG=PERL_VALGRIND=1 VALGRIND='$(VALGRIND)' $(MAKE) _test
--
--utest.valgrind ucheck.valgrind: test_prep.valgrind perl.valgrind.config
--	PERL=./perl PERL_DEBUG=PERL_VALGRIND=1 TEST_ARGS=-utf8 $(MAKE) _test
--
--test_notty.valgrind: test_prep.valgrind perl.valgrind.config
--	PERL=./perl $(MAKE) PERL_DEBUG=PERL_VALGRIND=1 _test_notty
--
--# Targets for Third Degree testing.
--
--test_prep.third: test_prep perl.third
--	PERL=./perl.third $(MAKE) _test_prep
--
--test.third check.third:	test_prep.third perl.third
--	PERL=./perl.third PERL_DEBUG=PERL_3LOG=1 $(MAKE) _test
--
--utest.third ucheck.third: test_prep.third perl.third
--	PERL=./perl.third PERL_DEBUG=PERL_3LOG=1 TEST_ARGS=-utf8 $(MAKE) _test
--
--test_notty.third: test_prep.third perl.third
--	PERL=./perl.third $(MAKE) PERL_DEBUG=PERL_3LOG=1 _test_notty
--
--# Targets for Deparse testing.
--
--test.deparse:	test_prep
--	PERL=./perl TEST_ARGS=-deparse $(MAKE) _test
--
--test_notty.deparse:	test_prep
--	PERL=./perl TEST_ARGS=-deparse $(MAKE) _test_notty
--
--# Targets to run the test suite with -t
--
--test.taintwarn:	test_prep
--	PERL=./perl TEST_ARGS=-taintwarn $(MAKE) _test
--
--minitest.prep:
--	-@test -f lib/lib.pm && test -f lib/Config.pm || \
--	  $(MAKE) lib/Config.pm lib/lib.pm $(unidatafiles)
--	@echo " "
--	@echo "You may see some irrelevant test failures if you have been unable"
--	@echo "to build lib/Config.pm, lib/lib.pm or the Unicode data files."
--	@echo " "
--
--# Can't depend on lib/Config.pm because that might be where miniperl
--# is crashing.
--minitest: miniperl$(EXE_EXT) lib/re.pm minitest.prep
--	- cd t && (rm -f perl$(EXE_EXT); $(LNS) ../miniperl$(EXE_EXT) perl$(EXE_EXT)) \
--		&& $(LDLIBPTH) ./perl TEST -minitest base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t uni/*.t </dev/tty
--
--# Test via harness
--
--test_harness: test_prep
--	PERL=./perl $(MAKE) TESTFILE=harness _test
--
--test_harness_notty: test_prep
--	PERL=./perl HARNESS_NOTTY=1 $(MAKE) TESTFILE=harness _test
--
--# Handy way to run perlbug -ok without having to install and run the
--# installed perlbug. We don't re-run the tests here - we trust the user.
--# Please *don't* use this unless all tests pass.
--# If you want to report test failures, use "make nok" instead.
--
--.PHONY: ok okfile oknack okfilenack nok nokfile noknack nokfilenack
--
--ok:	utilities
--	$(LDLIBPTH) ./perl -Ilib utils/perlbug -ok -s '(UNINSTALLED)'
--
--okfile:	utilities
--	$(LDLIBPTH) ./perl -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -F perl.ok
--
--oknack:	utilities
--	$(LDLIBPTH) ./perl -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -A
--
--okfilenack:	utilities
--	$(LDLIBPTH) ./perl -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -F perl.ok -A
--
--nok:	utilities
--	$(LDLIBPTH) ./perl -Ilib utils/perlbug -nok -s '(UNINSTALLED)'
--
--nokfile:	utilities
--	$(LDLIBPTH) ./perl -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -F perl.nok
--
--noknack:	utilities
--	$(LDLIBPTH) ./perl -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -A
--
--nokfilenack:	utilities
--	$(LDLIBPTH) ./perl -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -F perl.nok -A
--
--.PHONY: clist hlist shlist pllist
--
--clist:	$(c)
--	echo $(c) | tr ' ' $(TRNL) >.clist
--
--hlist:  $(h)
--	echo $(h) | tr ' ' $(TRNL) >.hlist
--
--shlist: $(sh)
--	echo $(sh) | tr ' ' $(TRNL) >.shlist
--
--pllist: $(pl)
--	echo $(pl) | tr ' ' $(TRNL) >.pllist
--
--Makefile: Makefile.SH ./config.sh
--	$(SHELL) Makefile.SH
--
--.PHONY: distcheck
--distcheck: FORCE
--	perl '-MExtUtils::Manifest=&fullcheck' -e 'fullcheck()'
--
--.PHONY: elc
--elc:	emacs/cperl-mode.elc
--
--emacs/cperl-mode.elc: emacs/cperl-mode.el
--	-cd emacs; emacs -batch -q -no-site-file -f batch-byte-compile cperl-mode.el
--
--.PHONY: etags ctags tags
--
--etags:	TAGS
--
--TAGS: emacs/cperl-mode.elc
--	sh emacs/ptags
--
--# Let's hope make will not go into an infinite loop on case-unsensitive systems
--# This may also fail if . is in the head of the path, since perl will
--# require -Ilib
--tags:	TAGS
--	perl emacs/e2ctags.pl TAGS > tags
--
--ctags:
--	ctags -f Tags -N --totals --languages=c --langmap=c:+.h --exclude=opmini.c *.c *.h
--
--# AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
--# If this runs make out of memory, delete /usr/include lines.
--!NO!SUBS!
--
--$eunicefix $Makefile
--case `pwd` in
--*SH)
--    $rm -f ../$Makefile
--    $ln $Makefile ../$Makefile
--    ;;
--esac
--$rm -f $firstmakefile
--
--# Now do any special processing required before building.
--
--case "$ebcdic" in
--define)
--    xxx=''
--    echo "This is an EBCDIC system, checking if any parser files need regenerating." >&2
--case "$osname" in
--os390|posix-bc)
--    if cd x2p
--    then
--        rm -f y.tab.c y.tab.h
--        case "$osname" in
--        posix-bc)
--           # we are using two different yaccs in BS2000 Posix!
--           byacc a2p.y >/dev/null 2>&1
--           ;;
--        *) # e.g. os390
--           yacc  a2p.y >/dev/null 2>&1
--           ;;
--        esac
--        if cmp -s y.tab.c a2p.c
--        then
--            rm -f y.tab.c
--        else
--            echo "a2p.y -> a2p.c" >&2
--            mv -f y.tab.c a2p.c
--            chmod u+w a2p.c
--            sed -e 's/fprintf *( *stderr *,/PerlIO_printf(Perl_debug_log,/g' \
--		-e 's|^static void __YY_YACC_MAIN.*BS2000.*|/*static main deleted*/|' \
--                -e 's/y\.tab/a2p/g' a2p.c >a2p.tmp && mv a2p.tmp a2p.c
--            xxx="$xxx a2p.c"
--        fi
--        # In case somebody yacc -d:ed the a2p.y.
--        if test -f y.tab.h
--        then
--            if cmp -s y.tab.h a2p.h
--            then
--                rm -f y.tab.h
--            else
--                echo "a2p.h -> a2p.h" >&2
--                mv -f y.tab.h a2p.h
--                xxx="$xxx a2p.h"
--            fi
--        fi
--        cd ..
--    fi
--    ;;
--vmesa)
--    # Do nothing in VM/ESA.
--    ;;
--*)
--    echo "'$osname' is an EBCDIC system I don't know that well." >&4
--    ;;
--esac
--    case "$xxx" in
--    '') echo "No parser files were regenerated.  That's okay." >&2 ;;
--    esac
--    ;;
--esac
--
--# ex: set ts=8 sts=4 sw=4 noet:
-diff -Naur perl-5.10.0.orig/Cross/Makefile.SH.patch perl-5.10.0/Cross/Makefile.SH.patch
---- perl-5.10.0.orig/Cross/Makefile.SH.patch	2007-12-18 05:47:07.000000000 -0500
-+++ perl-5.10.0/Cross/Makefile.SH.patch	1969-12-31 19:00:00.000000000 -0500
-@@ -1,189 +0,0 @@
----- ../Makefile.SH
--+++ ../Makefile.SH
--@@ -129,18 +129,7 @@
-- 	    # INSTALL file, under "Building a shared perl library".
-- 	    # If there is no pre-existing $libperl, we don't need
-- 	    # to do anything further.
---	    if test -f $archlib/CORE/$libperl; then
---		rm -f preload
---		cat <<'EOT' > preload
---#! /bin/sh
---lib=$1
---shift
---test -r $lib && export LD_PRELOAD="$lib $LD_PRELOAD"
---exec "$@"
---EOT
---		chmod 755 preload
---		ldlibpth="$ldlibpth `pwd`/preload `pwd`/$libperl"
---	    fi
--+	    echo linux libraries overwritten by cross-compile patches
-- 	    ;;
-- 	os390)	test -f /bin/env && ldlibpth="/bin/env $ldlibpth"
-- 		;;
--@@ -389,9 +378,21 @@
-- .c.s:
-- 	$(CCCMDSRC) -S $*.c
-- 
---all: $(FIRSTMAKEFILE) miniperl$(EXE_EXT) extra.pods $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make
---	@echo " ";
---	@echo "	Everything is up to date. Type '$(MAKE) test' to run test suite."
--+#all: $(FIRSTMAKEFILE) miniperl$(EXE_EXT) extra.pods $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make
--+#	@echo " ";
--+#	@echo "	Everything is up to date. Type '$(MAKE) test' to run test suite."
--+
--+all: $(FIRSTMAKEFILE) miniperl$(EXE_EXT)
--+	mv miniperl miniperl-arm
--+	ln -s /usr/bin/perl miniperl
--+
--+more: extra.pods $(private) $(public)
--+
--+more2: $(dynamic_ext)
--+
--+more3: $(nonxs_ext)
--+
--+more4: extras.make
-- 
-- .PHONY: all compile translators utilities
-- 
--@@ -401,10 +402,10 @@
-- 	cd x2p; $(MAKE) compile;
-- 	cd pod; $(MAKE) compile;
-- 
---translators:	miniperl$(EXE_EXT) $(CONFIGPM) FORCE
--+translators:	$(CONFIGPM) FORCE
-- 	@echo " "; echo "	Making x2p stuff"; cd x2p; $(LDLIBPTH) $(MAKE) all
-- 
---utilities:	miniperl$(EXE_EXT) $(CONFIGPM) $(plextract) lib/lib.pm FORCE
--+utilities:	$(CONFIGPM) $(plextract) lib/lib.pm FORCE
-- 	@echo " "; echo "	Making utilities"; cd utils; $(LDLIBPTH) $(MAKE) all
-- 
-- 
--@@ -579,7 +580,7 @@
-- 	$(CC) -o miniperl $(CLDFLAGS) \
-- 	    `echo $(obj) | sed 's/ op$(OBJ_EXT) / /'` \
-- 	    miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) perl$(OBJ_EXT) $(libs)
---	$(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
--+#	$(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
-- !NO!SUBS!
-- 		;;
-- 	next4*)
--@@ -587,7 +588,7 @@
-- miniperl: $& miniperlmain$(OBJ_EXT) $(LIBPERL) opmini$(OBJ_EXT)
-- 	$(CC) -o miniperl `echo $(obj) | sed 's/ op$(OBJ_EXT) / /'` \
-- 	    miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) perl$(OBJ_EXT) $(libs)
---	$(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
--+#	$(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
-- !NO!SUBS!
-- 		;;
-- 	darwin*)
--@@ -754,7 +755,7 @@
-- # We need to autosplit in two steps because VOS can't handle so many args
-- #
-- .PHONY: preplibrary
---preplibrary: miniperl$(EXE_EXT) $(CONFIGPM) lib/lib.pm $(PREPLIBRARY_LIBPERL)
--+preplibrary: $(CONFIGPM) lib/lib.pm $(PREPLIBRARY_LIBPERL)
-- 	@sh ./makedir lib/auto
-- 	@echo "	AutoSplitting perl library"
-- 	$(LDLIBPTH) ./miniperl -Ilib -e 'use AutoSplit; \
--@@ -763,35 +764,35 @@
-- 		autosplit_lib_modules(@ARGV)' lib/*/*.pm
-- 	$(MAKE) lib/re.pm
-- 
---lib/Config.pod: config.sh miniperl$(EXE_EXT) configpm Porting/Glossary
--+lib/Config.pod: config.sh configpm Porting/Glossary
-- 	$(LDLIBPTH) ./miniperl -Ilib configpm --heavy=lib/Config_heavy.pl lib/Config.pm
-- 
-- $(CONFIGPM): lib/Config.pod
-- 
---lib/ExtUtils/Miniperl.pm: miniperlmain.c miniperl$(EXE_EXT) minimod.pl $(CONFIGPM)
--+lib/ExtUtils/Miniperl.pm: miniperlmain.c minimod.pl $(CONFIGPM)
-- 	$(LDLIBPTH) ./miniperl minimod.pl > lib/ExtUtils/Miniperl.pm
-- 
-- lib/re.pm: ext/re/re.pm
-- 	cp ext/re/re.pm lib/re.pm
-- 
---$(plextract):	miniperl$(EXE_EXT) $(CONFIGPM) x2p/s2p
--+$(plextract):	$(CONFIGPM) x2p/s2p
-- 	@-rm -f $@
-- 	$(LDLIBPTH) ./miniperl -I`pwd`/lib $@.PL
-- 
---x2p/s2p: miniperl$(EXE_EXT) $(CONFIGPM) x2p/s2p.PL
--+x2p/s2p: $(CONFIGPM) x2p/s2p.PL
-- 	cd x2p; $(LDLIBPTH) $(MAKE) s2p
-- 
---lib/lib.pm:	miniperl$(EXE_EXT) $(CONFIGPM)
--+lib/lib.pm:	$(CONFIGPM)
-- 	@-rm -f $@
-- 	$(LDLIBPTH) ./miniperl -Ilib lib/lib_pm.PL
-- 
-- unidatafiles $(unidatafiles): uni.data
-- 
---uni.data: miniperl$(EXE_EXT) $(CONFIGPM) lib/unicore/mktables
--+uni.data: $(CONFIGPM) lib/unicore/mktables
-- 	cd lib/unicore && $(LDLIBPTH) ../../miniperl -I../../lib mktables -w
-- 	touch uni.data
-- 
---extra.pods: miniperl$(EXE_EXT)
--+extra.pods:
-- 	-@test -f extra.pods && rm -f `cat extra.pods`
-- 	-@rm -f extra.pods
-- 	-@for x in `grep -l '^=[a-z]' README.* | grep -v README.vms` ; do \
--@@ -837,18 +838,7 @@
-- INSTALL_DEPENDENCE = all
-- 
-- install.perl:	$(INSTALL_DEPENDENCE) installperl
---	if [ -n "$(COMPILE)" ]; \
---	then \
---		cd utils; $(MAKE) compile; \
---		cd ../x2p; $(MAKE) compile; \
---		cd ../pod; $(MAKE) compile; \
---	else :; \
---	fi
---	$(LDLIBPTH) ./perl installperl --destdir=$(DESTDIR) $(INSTALLFLAGS) $(STRIPFLAGS)
---	$(MAKE) extras.install
---
---install.man:	all installman
---	$(LDLIBPTH) ./perl installman --destdir=$(DESTDIR) $(INSTALLFLAGS)
--+	/usr/bin/perl -Ifake_config_library -MConfig installperl $(INSTALLFLAGS) $(STRIPFLAGS)
-- 
-- # XXX Experimental. Hardwired values, but useful for testing.
-- # Eventually Configure could ask for some of these values.
--@@ -950,16 +940,16 @@
-- #
-- # DynaLoader may be needed for extensions that use Makefile.PL.
-- 
---$(DYNALOADER):	miniperl$(EXE_EXT) preplibrary FORCE
--+$(DYNALOADER):	preplibrary FORCE
-- 	@$(LDLIBPTH) sh ext/util/make_ext $(STATIC) $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
-- 
---d_dummy $(dynamic_ext):	miniperl$(EXE_EXT) preplibrary $(DYNALOADER) FORCE
--+d_dummy $(dynamic_ext):	preplibrary $(DYNALOADER) FORCE
-- 	@$(LDLIBPTH) sh ext/util/make_ext dynamic $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
-- 
---s_dummy $(static_ext):	miniperl$(EXE_EXT) preplibrary $(DYNALOADER) FORCE
--+s_dummy $(static_ext):	preplibrary $(DYNALOADER) FORCE
-- 	@$(LDLIBPTH) sh ext/util/make_ext $(STATIC) $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
-- 
---n_dummy $(nonxs_ext):	miniperl$(EXE_EXT) preplibrary $(DYNALOADER) FORCE
--+n_dummy $(nonxs_ext):	preplibrary $(DYNALOADER) FORCE
-- 	@$(LDLIBPTH) sh ext/util/make_ext nonxs $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
-- 
-- .PHONY: clean _tidy _mopup _cleaner1 _cleaner2 \
--@@ -1101,7 +1091,7 @@
-- 
-- test_prep_pre: preplibrary utilities $(nonxs_ext)
-- 
---test_prep: test_prep_pre miniperl$(EXE_EXT) $(unidatafiles) perl$(EXE_EXT) $(dynamic_ext) $(TEST_PERL_DLL)
--+test_prep: test_prep_pre $(unidatafiles) perl$(EXE_EXT) $(dynamic_ext) $(TEST_PERL_DLL)
-- 	PERL=./perl $(MAKE) _test_prep
-- 
-- _test_tty:
--@@ -1214,7 +1204,7 @@
-- 
-- # Can't depend on lib/Config.pm because that might be where miniperl
-- # is crashing.
---minitest: miniperl$(EXE_EXT) lib/re.pm minitest.prep
--+minitest: lib/re.pm minitest.prep
-- 	- cd t && (rm -f perl$(EXE_EXT); $(LNS) ../miniperl$(EXE_EXT) perl$(EXE_EXT)) \
-- 		&& $(LDLIBPTH) ./perl TEST -minitest base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t uni/*.t </dev/tty
-- 
-diff -Naur perl-5.10.0.orig/Cross/README perl-5.10.0/Cross/README
---- perl-5.10.0.orig/Cross/README	2007-12-18 05:47:07.000000000 -0500
-+++ perl-5.10.0/Cross/README	1969-12-31 19:00:00.000000000 -0500
-@@ -1,87 +0,0 @@
--Building for arm-linux
------------------------
--
--The files in this directory add another cross-compilation
--target to the Perl buildsystem.  It was built as a part of
--the Open Zaurus (http://www.openzaurus.com/) distribution.
--Most / All of the arm compiler optimisations are "borrowed"
--from this excellent project.
--
--(Further discussion about cross-compiling Perl in the top level
--INSTALL file, see the section "Cross-compilation".)
--
--The main target is arm-linux but I have also managed to
--successfully cross-compile Perl for Solaris x86 using the same
--buildsystem.
--
--We are currently dependent on an existing working local copy of
--Perl ** of the same version and revision ** which is available
--as /usr/bin/perl. 
--
--You need a working and tested cross-compiler for your build
--and target combination.  The binary directory must be in
--your path.
--
--1)	You should be reading me (README) in perl-5.x.y/Cross
--
--2)	Make sure you are in the Cross directory.
--
--3)	Edit the file 'config' to contain your target platform information.
--
--4)	make patch	## This will patch the existing source-tree.
--5)	make perl	## Will make perl
--
--Your built Perl environment is in install_me_here/ in your build
--directory.  From here you can package and deploy as you wish.
--
--Omissions
------------
--
--This does NOT perform any installation.
--
--Make test will NOT work.
--
--We do not provide documentation in the core,  man pages are not generated.
--
--Other Targets (For Developers)
--------------------------------
--
--It is possible to extend the cross-compilation to other targets.
--We have sucessfully compiled for the target solaris2.8/x86
--on linux/x86 build system.
--
--To attempt a cross-compile for another target using the methods
--in this directory:
--
--1)	Copy the Perl source code onto your TARGET machine.
--2)	Execute sh Configure as normal and configure as required,
--	do not "make".
--3)	Copy the config.sh file that is generated to your BUILD
--	machine and place it in the Cross directory with the
--	filename config.sh-ARCH-OS.  For example,
--	config.sh-i386-pc-solaris2.8.  For the appropriate ARCH
--	and OS please refer to your cross-compiler documentation.
--4)	Edit Cross/config to reflect your new target and continue
--	with build as above.
--
--Should you wish to produce optimised binaries for different
--architectures you can add the appropriate compiler flags to
--the Makefile in a new ifeq ($(ARCH),...) ... endif block.
--
--
--Please refer to your cross-compiler documentation for details.
--
--
--	Note that the Cross/ directory is also used by a different
--	cross-compilation setup described in the INSTALL file, and
--	executed by Configure.  There should be no conflicts since
--	it is unlikely both that cross-compilation setups are used
--	simultaneously.
--
--Enjoy!
--
--References
------------
--Redvers Davies <red@criticalintegration.com>
--Open Zaurus http://www.openzaurus.org/
--Perl OZ Packages http://www.criticalintegration.com/perl-oz/
-diff -Naur perl-5.10.0.orig/Cross/README.new perl-5.10.0/Cross/README.new
---- perl-5.10.0.orig/Cross/README.new	2007-12-18 05:47:07.000000000 -0500
-+++ perl-5.10.0/Cross/README.new	1969-12-31 19:00:00.000000000 -0500
-@@ -1,95 +0,0 @@
--You're reading ./Cross/README.new, describing Perl cross-compilation process.
--NOTE: this file will replace ./Cross/README, after the cross-compilation scheme
--is stabilized.
--
--=head1 NAME
--
--README.new - Cross-compilation for linux
--
--=head1 DESCRIPTION
--
--This is second approach to linux cross-compilation, which should allow
--building full perl and entensions for target platform. Cross-compilation
--for linux uses similar approach and shares the same files as
--cross-compilation for WinCE.
--
--We refer to HOST as the platform where the build is performed, and to
--TARGET as where final executables will run.
--
--=head2 Basic ideas
--
--=head3 common
--
--Unlike WinCE, output files from GCC cross-compiler are produced in the same
--directory where C files are. All TARGET binaries have different extensions
--so to distinguish HOST and TARGET binaries. Namely, object files for C<arm>
--cross-compilation will have extension C<.armo>, executable files will have
--C<.arm>.
--
--After typical cross-compilation the following files will be built, among
--others:
--
--  sv.c
--  sv.o
--  sv.armo
--  libperl.arma
--
--(this approach may be reconsidered, however.)
--
--=head3 build process
--
--C<miniperl> is built. This executable is intended to run on HOST, and it
--will facilitate the remaining build process; all binaries built after it are
--foreign (TARGET) and should not run locally (HOST).
--
--Unlike HOST build, miniperl will not have C<Config.pm> of HOST within reach;
--it rather will use the C<Config.pm> from the cross-compilation directories.
--In fact, if the build process does have Config.pm within reach, this is only
--an indication of a mistake somewhere in the middle.
--
--  # following command is okay:
--  ./miniperl -Ilib -MCross -MConfig -e 1
--  # following command should cluck, and it is bad if it does not:
--  ./miniperl -Ilib -MConfig -e 1
--
--After C<miniperl> is built, C<configpm> is invoked to create an
--appropriate C<Config.pm> in the right place and its corresponding
--C<Cross.pm>.
--
--File C<Cross.pm> is dead simple: for given cross-architecture places in @INC
--a path where perl modules are, and right C<Config.pm> in that place.
--
--That said, C<miniperl -Ilib -MConfig -we 1> should report an error, because
--it cannot find C<Config.pm>. If it does not give an error, a wrong C<Config.pm>
--is substituted, and resulting binaries will be a mess.
--
--C<miniperl -MCross -MConfig -we 1> should run okay, and it will provide a
--correct C<Config.pm> for further compilations.
--
--During extensions build phase, the script C<./ext/util/make_ext_cross> is
--invoked.
--
--All invocations of C<Makefile.PL> are provided with C<-MCross> so to enable
--cross-compilation.
--
--=head2 BUILD
--
--=head3 Tools & SDK
--
--To compile, you need the following:
--
--=over 4
--
--=item * TODO
--
--=back
--
--=head1 Things to be done
--
--=over 4
--
--=item * better distinguishing of config.h/xconfig.h, dependencies
--
--=item * object files created in ./xlib/cross-name/ ?
--
--=back
-diff -Naur perl-5.10.0.orig/Cross/TODO perl-5.10.0/Cross/TODO
---- perl-5.10.0.orig/Cross/TODO	2007-12-18 05:47:07.000000000 -0500
-+++ perl-5.10.0/Cross/TODO	1969-12-31 19:00:00.000000000 -0500
-@@ -1 +0,0 @@
--Provide a better sandbox for building additional XS libraries.
-diff -Naur perl-5.10.0.orig/Cross/warp perl-5.10.0/Cross/warp
---- perl-5.10.0.orig/Cross/warp	2007-12-18 05:47:07.000000000 -0500
-+++ perl-5.10.0/Cross/warp	1969-12-31 19:00:00.000000000 -0500
-@@ -1,14 +0,0 @@
--#!/bin/sh -x
--
--## This script contains an rm -rf.  This may alarm you.
--## These directories need to be reccursively deleted.
--## I don't see any method of making "Bad Things"[tm]
--## Happen.  But we don't run buildroot as root do we? :-)
--
--for f in `find lib -name install_me_here`;do
--cp -r $f/* ./install_me_here/
--done
--
--for f in `find lib -name install_me_here`;do
--rm -rf $f
--done
-diff -Naur perl-5.10.0.orig/ext/util/make_ext perl-5.10.0/ext/util/make_ext
---- perl-5.10.0.orig/ext/util/make_ext	2007-12-18 05:47:07.000000000 -0500
-+++ perl-5.10.0/ext/util/make_ext	2009-04-05 13:27:24.458708635 -0400
-@@ -126,7 +126,7 @@
- esac
- 
- if test ! -f $makefile ; then
--	test -f Makefile.PL && $run ../$depth/miniperl -I../$depth/lib Makefile.PL INSTALLDIRS=perl INSTALLMAN3DIR=none PERL_CORE=1 $passthru
-+	test -f Makefile.PL && $run ../$depth/miniperl-cross -I../$depth/lib Makefile.PL INSTALLDIRS=perl INSTALLMAN3DIR=none PERL_CORE=1 $passthru
- fi
- if test ! -f $makefile ; then
- 	echo "Warning: No Makefile!"
-diff -Naur perl-5.10.0.orig/lib/unicore/Makefile perl-5.10.0/lib/unicore/Makefile
---- perl-5.10.0.orig/lib/unicore/Makefile	2007-12-18 05:47:07.000000000 -0500
-+++ perl-5.10.0/lib/unicore/Makefile	2009-04-05 13:27:24.468708588 -0400
-@@ -1,11 +1,11 @@
- all:
--	../../miniperl -I../../lib ./mktables
-+	../../miniperl-cross -I../../lib ./mktables
- 
- TestProp.pl: mktables UnicodeData.txt Scripts.txt Blocks.txt PropList.txt
--	../../miniperl -I../../lib ./mktables -maketest
-+	../../miniperl-cross -I../../lib ./mktables -maketest
- 
- test:   TestProp.pl
--	../../miniperl -I../../lib TestProp.pl
-+	../../miniperl-cross -I../../lib TestProp.pl
- 
- clean:
- 	rm -f *.pl */*.pl
-diff -Naur perl-5.10.0.orig/Makefile.SH perl-5.10.0/Makefile.SH
---- perl-5.10.0.orig/Makefile.SH	2007-12-18 05:47:07.000000000 -0500
-+++ perl-5.10.0/Makefile.SH	2009-04-05 13:27:24.484541195 -0400
-@@ -634,7 +634,7 @@
- 	$(CC) -o miniperl $(CLDFLAGS) \
- 	    `echo $(obj) | sed 's/ op$(OBJ_EXT) / /'` \
- 	    miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) $(libs)
--	$(LDLIBPTH) $(RUN) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
-+	$(LDLIBPTH) $(RUN) ./miniperl-cross -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
- !NO!SUBS!
- 		;;
- 	next4*)
-@@ -642,7 +642,7 @@
- miniperl: $& miniperlmain$(OBJ_EXT) $(obj) opmini$(OBJ_EXT)
- 	$(CC) -o miniperl `echo $(obj) | sed 's/ op$(OBJ_EXT) / /'` \
- 	    miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) $(libs)
--	$(LDLIBPTH) $(RUN) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
-+	$(LDLIBPTH) $(RUN) ./miniperl-cross -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
- !NO!SUBS!
- 		;;
- 	darwin*)
-@@ -664,7 +664,7 @@
- 	$(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o miniperl \
- 	    `echo $(obj) | sed 's/ op$(OBJ_EXT) / /'` \
- 	    miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) $(libs)
--	$(LDLIBPTH) $(RUN) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
-+	$(LDLIBPTH) $(RUN) ./miniperl-cross -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
- !NO!SUBS!
- 		;;
- 	*)
-@@ -674,7 +674,7 @@
- 	$(LDLIBPTH) $(CC) $(CLDFLAGS) -o miniperl \
- 	    `echo $(obj) | sed 's/ op$(OBJ_EXT) / /'` \
- 	    miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) $(libs)
--	$(LDLIBPTH) $(RUN) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
-+	$(LDLIBPTH) $(RUN) ./miniperl-cross -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
- !NO!SUBS!
- 		;;
- 	esac
-@@ -806,7 +806,7 @@
- .PHONY: makeppport
- makeppport: miniperl\$(EXE_EXT) \$(CONFIGPM)
- 	-@for f in Makefile.PL PPPort_pm.PL PPPort_xs.PL ppport_h.PL; do \
--	(cd ext/Devel/PPPort && `pwd`/run.sh ../../../miniperl -I../../../lib \$\$f); \
-+	(cd ext/Devel/PPPort && `pwd`/run.sh ../../../miniperl-cross -I../../../lib \$\$f); \
- 	done
- 
- !GROK!THIS!
-@@ -815,7 +815,7 @@
- $spitshell >>Makefile <<'!NO!SUBS!'
- .PHONY: makeppport
- makeppport: miniperl$(EXE_EXT) $(CONFIGPM)
--	$(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib mkppport
-+	$(LDLIBPTH) $(RUN) ./miniperl-cross$(EXE_EXT) -Ilib mkppport
- 
- !NO!SUBS!
- ;;
-@@ -837,19 +837,19 @@
- preplibrary: miniperl$(EXE_EXT) $(CONFIGPM) lib/lib.pm $(PREPLIBRARY_LIBPERL)
- 	@sh ./makedir lib/auto
- 	@echo "	AutoSplitting perl library"
--	$(LDLIBPTH) $(RUN) ./miniperl -Ilib -e 'use AutoSplit; \
-+	$(LDLIBPTH) $(RUN) ./miniperl-cross -Ilib -e 'use AutoSplit; \
- 		autosplit_lib_modules(@ARGV)' lib/*.pm
--	$(LDLIBPTH) $(RUN) ./miniperl -Ilib -e 'use AutoSplit; \
-+	$(LDLIBPTH) $(RUN) ./miniperl-cross -Ilib -e 'use AutoSplit; \
- 		autosplit_lib_modules(@ARGV)' lib/*/*.pm
- 	$(MAKE) lib/re.pm
- 
- lib/Config.pod: config.sh miniperl$(EXE_EXT) configpm Porting/Glossary
--	$(LDLIBPTH) $(RUN) ./miniperl -Ilib configpm
-+	$(LDLIBPTH) $(RUN) ./miniperl-cross -Ilib configpm
- 
- $(CONFIGPM): lib/Config.pod
- 
- lib/ExtUtils/Miniperl.pm: miniperlmain.c miniperl$(EXE_EXT) minimod.pl $(CONFIGPM)
--	$(LDLIBPTH) $(RUN) ./miniperl minimod.pl > lib/ExtUtils/Miniperl.pm
-+	$(LDLIBPTH) $(RUN) ./miniperl-cross minimod.pl > lib/ExtUtils/Miniperl.pm
- 
- lib/re.pm: ext/re/re.pm
- 	@-rm -f $@
-@@ -857,19 +857,19 @@
- 
- $(plextract):	miniperl$(EXE_EXT) $(CONFIGPM) x2p/s2p
- 	@-rm -f $@
--	$(LDLIBPTH) $(RUN) ./miniperl -I`pwd`/lib $@.PL
-+	$(LDLIBPTH) $(RUN) ./miniperl-cross -I`pwd`/lib $@.PL
- 
- x2p/s2p: miniperl$(EXE_EXT) $(CONFIGPM) x2p/s2p.PL
- 	cd x2p; $(LDLIBPTH) $(MAKE) s2p
- 
- lib/lib.pm:	miniperl$(EXE_EXT) $(CONFIGPM)
- 	@-rm -f $@
--	$(LDLIBPTH) $(RUN) ./miniperl -Ilib lib/lib_pm.PL
-+	$(LDLIBPTH) $(RUN) ./miniperl-cross -Ilib lib/lib_pm.PL
- 
- unidatafiles $(unidatafiles): uni.data
- 
- uni.data: miniperl$(EXE_EXT) $(CONFIGPM) lib/unicore/mktables
--	cd lib/unicore && $(LDLIBPTH) $(RUN) ../../miniperl -I../../lib mktables -w
-+	cd lib/unicore && $(LDLIBPTH) $(RUN) ../../miniperl-cross -I../../lib mktables -w
- 	touch uni.data
- 
- extra.pods: miniperl$(EXE_EXT)
-@@ -898,7 +898,7 @@
- 	no-install install.perl install.man install.html
- 
- META.yml:	Porting/makemeta Porting/Maintainers.pl Porting/Maintainers.pm
--	$(LDLIBPTH) $(RUN) ./miniperl -Ilib Porting/makemeta
-+	$(LDLIBPTH) $(RUN) ./miniperl-cross -Ilib Porting/makemeta
- 
- install-strip:
- 	$(MAKE) STRIPFLAGS=-s install DESTDIR="$(DESTDIR)"
-@@ -1101,7 +1101,7 @@
- 	-@for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) $(nonxs_ext) ; do \
- 	$(LDLIBPTH) sh ext/util/make_ext $(CLEAN) $$x MAKE=$(MAKE) ; \
- 	done
--	-@test ! -f $(RUN) ./miniperl$(EXE_EXT) || $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib mkppport --clean
-+	-@test ! -f $(RUN) ./miniperl-cross$(EXE_EXT) || $(LDLIBPTH) $(RUN) ./miniperl-cross$(EXE_EXT) -Ilib mkppport --clean
- 
- # Some systems do not support "?", so keep these files separate.
- _cleaner2:
-@@ -1204,10 +1204,10 @@
- 	cd t && $(PERL_DEBUG) PERL_SKIP_TTY_TEST=1 $(LDLIBPTH) $(PERL) $(TESTFILE) $(TEST_ARGS) $(TEST_FILES)
- 
- unpack_files:
--	$(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib uupacktool.pl -u -m
-+	$(LDLIBPTH) $(RUN) ./miniperl-cross$(EXE_EXT) -Ilib uupacktool.pl -u -m
- 
- cleanup_unpacked_files:
--	-@test ! -f $(RUN) ./miniperl$(EXE_EXT) || $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib uupacktool.pl -c
-+	-@test ! -f $(RUN) ./miniperl-cross$(EXE_EXT) || $(LDLIBPTH) $(RUN) ./miniperl-cross$(EXE_EXT) -Ilib uupacktool.pl -c
- 
- # The second branch is for testing without a tty or controlling terminal,
- # see t/op/stat.t
-@@ -1248,7 +1248,7 @@
- # Targets for UTF16 testing:
- 
- minitest.utf16: minitest.prep
--	- cd t && (rm -f perl$(EXE_EXT); $(LNS) ../miniperl$(EXE_EXT) perl$(EXE_EXT)) \
-+	- cd t && (rm -f perl$(EXE_EXT); $(LNS) ../miniperl-cross$(EXE_EXT) perl$(EXE_EXT)) \
- 		&& $(LDLIBPTH) $(RUN) ./perl TEST -minitest -utf16 base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t uni/*.t mro/*.t </dev/tty
- 
- test.utf16 check.utf16: test_prep
-@@ -1309,7 +1309,7 @@
- # Can't depend on lib/Config.pm because that might be where miniperl
- # is crashing.
- minitest: miniperl$(EXE_EXT) lib/re.pm minitest.prep
--	- cd t && (rm -f perl$(EXE_EXT); $(LNS) ../miniperl$(EXE_EXT) perl$(EXE_EXT)) \
-+	- cd t && (rm -f perl$(EXE_EXT); $(LNS) ../miniperl-cross$(EXE_EXT) perl$(EXE_EXT)) \
- 		&& $(LDLIBPTH) $(RUN) ./perl TEST -minitest base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t uni/*.t mro/*.t </dev/tty
- 
- # Test via harness
-diff -Naur perl-5.10.0.orig/MANIFEST perl-5.10.0/MANIFEST
---- perl-5.10.0.orig/MANIFEST	2007-12-18 05:47:07.000000000 -0500
-+++ perl-5.10.0/MANIFEST	2009-04-05 13:38:50.514474440 -0400
-@@ -25,20 +25,10 @@
- configure.gnu		Crude emulation of GNU configure
- cop.h			Control operator header
- Copying			The GNU General Public License
--Cross/build-arm-n770-sh	Cross-compilation
--Cross/cflags-cross-arm	Cross-compilation
--Cross/config		Cross-compilation
-+Cross/cleanconfig.sh	Cross-compilation
- Cross/config.sh-arm-linux	Cross-compilation
--Cross/config.sh-arm-linux-n770	Cross-compilation
--Cross/generate_config_sh	Cross-compilation
--Cross/installperl.patch		Cross-compilation
-+Cross/config.sh-x86-linux	Cross-compilation
- Cross/Makefile		Cross-compilation
--Cross/Makefile-cross-SH	Cross-compilation
--Cross/Makefile.SH.patch	Cross-compilation
--Cross/README		Cross-compilation
--Cross/README.new	Cross-compilation
--Cross/TODO		Cross-compilation
--Cross/warp		Cross-compilation
- cv.h			Code value header
- cygwin/cygwin.c		Additional code for Cygwin port
- cygwin/Makefile.SHs	Shared library generation for Cygwin port
-diff -Naur perl-5.10.0.orig/pod/Makefile.SH perl-5.10.0/pod/Makefile.SH
---- perl-5.10.0.orig/pod/Makefile.SH	2007-12-18 05:47:08.000000000 -0500
-+++ perl-5.10.0/pod/Makefile.SH	2009-04-05 13:27:24.514542587 -0400
-@@ -63,7 +63,7 @@
- 	    --podroot=.. --podpath=pod:lib:ext:vms \
- 	    --libpods=perlfunc:perlguts:perlvar:perlrun:perlop
- 
--PERL = ../miniperl
-+PERL = ../miniperl-cross
- PERLILIB = $(PERL) -I../lib
- REALPERL = ../perl
- 
-diff -Naur perl-5.10.0.orig/utils/Makefile perl-5.10.0/utils/Makefile
---- perl-5.10.0.orig/utils/Makefile	2007-12-18 05:47:08.000000000 -0500
-+++ perl-5.10.0/utils/Makefile	2009-04-05 13:27:24.522041845 -0400
-@@ -1,5 +1,5 @@
- 
--PERL = ../miniperl
-+PERL = ../miniperl-cross
- REALPERL = ../perl
- RUN =   # Used mainly cross-compilation setups.
- 
-diff -Naur perl-5.10.0.orig/x2p/Makefile.SH perl-5.10.0/x2p/Makefile.SH
---- perl-5.10.0.orig/x2p/Makefile.SH	2007-12-18 05:47:08.000000000 -0500
-+++ perl-5.10.0/x2p/Makefile.SH	2009-04-05 13:27:24.552041881 -0400
-@@ -171,7 +171,7 @@
- # These should be automatically generated
- 
- $(plextract):
--	$(RUN) ../miniperl -I../lib $@.PL
-+	$(RUN) ../miniperl-cross -I../lib $@.PL
- 
- find2perl: find2perl.PL
- 
Index: tches/readline-6.0-branch_update-1.patch
===================================================================
--- patches/readline-6.0-branch_update-1.patch	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,92 +1,0 @@
-Submitted By: Jim Gifford (jim at cross-lfs dot org)
-Date: 06-05-2009
-Initial Package Version: 6.0
-Origin: Upstream
-Upstream Status: Applied
-Description: Contains all upstream patches up to 6.0-003
-
-diff -Naur readline-6.0.orig/display.c readline-6.0/display.c
---- readline-6.0.orig/display.c	2009-01-04 11:32:32.000000000 -0800
-+++ readline-6.0/display.c	2009-06-05 14:07:00.000000000 -0700
-@@ -512,6 +512,7 @@
-   /* Block keyboard interrupts because this function manipulates global
-      data structures. */
-   _rl_block_sigint ();  
-+  RL_SETSTATE (RL_STATE_REDISPLAYING);
- 
-   if (!rl_display_prompt)
-     rl_display_prompt = "";
-@@ -1236,6 +1237,7 @@
-       visible_wrap_offset = wrap_offset;
-   }
- 
-+  RL_UNSETSTATE (RL_STATE_REDISPLAYING);
-   _rl_release_sigint ();
- }
- 
-@@ -1772,7 +1774,7 @@
- 	     space_to_eol will insert too many spaces.  XXX - maybe we should
- 	     adjust col_lendiff based on the difference between _rl_last_c_pos
- 	     and _rl_screenwidth */
--	  if (col_lendiff && (_rl_last_c_pos < _rl_screenwidth))
-+	  if (col_lendiff && ((MB_CUR_MAX == 1 || rl_byte_oriented) || (_rl_last_c_pos < _rl_screenwidth)))
- #endif
- 	    {	  
- 	      if (_rl_term_autowrap && current_line < inv_botlin)
-@@ -1892,6 +1894,10 @@
- 
-   woff = WRAP_OFFSET (_rl_last_v_pos, wrap_offset);
-   cpos = _rl_last_c_pos;
-+
-+  if (cpos == 0 && cpos == new)
-+    return;
-+
- #if defined (HANDLE_MULTIBYTE)
-   /* If we have multibyte characters, NEW is indexed by the buffer point in
-      a multibyte string, but _rl_last_c_pos is the display position.  In
-@@ -1905,9 +1911,9 @@
- 	 prompt string, since they're both buffer indices and DPOS is a
- 	 desired display position. */
-       if ((new > prompt_last_invisible) ||		/* XXX - don't use woff here */
--	  (prompt_physical_chars > _rl_screenwidth &&
-+	  (prompt_physical_chars >= _rl_screenwidth &&
- 	   _rl_last_v_pos == prompt_last_screen_line &&
--	   wrap_offset >= woff &&
-+	   wrap_offset >= woff && dpos >= woff &&
- 	   new > (prompt_last_invisible-(_rl_screenwidth*_rl_last_v_pos)-wrap_offset)))
- 	   /* XXX last comparison might need to be >= */
- 	{
-diff -Naur readline-6.0.orig/patchlevel readline-6.0/patchlevel
---- readline-6.0.orig/patchlevel	2008-11-18 08:01:14.000000000 -0800
-+++ readline-6.0/patchlevel	2009-06-05 14:07:00.000000000 -0700
-@@ -1,3 +1,3 @@
- # Do not edit -- exists only for use by patch
- 
--0
-+3
-diff -Naur readline-6.0.orig/readline.h readline-6.0/readline.h
---- readline-6.0.orig/readline.h	2009-01-04 11:32:33.000000000 -0800
-+++ readline-6.0/readline.h	2009-06-05 14:06:57.000000000 -0700
-@@ -814,8 +814,9 @@
- #define RL_STATE_VIMOTION	0x100000	/* reading vi motion arg */
- #define RL_STATE_MULTIKEY	0x200000	/* reading multiple-key command */
- #define RL_STATE_VICMDONCE	0x400000	/* entered vi command mode at least once */
-+#define RL_STATE_REDISPLAYING	0x800000	/* updating terminal display */
- 
--#define RL_STATE_DONE		0x800000	/* done; accepted line */
-+#define RL_STATE_DONE		0x1000000	/* done; accepted line */
- 
- #define RL_SETSTATE(x)		(rl_readline_state |= (x))
- #define RL_UNSETSTATE(x)	(rl_readline_state &= ~(x))
-diff -Naur readline-6.0.orig/terminal.c readline-6.0/terminal.c
---- readline-6.0.orig/terminal.c	2009-01-04 11:32:34.000000000 -0800
-+++ readline-6.0/terminal.c	2009-06-05 14:06:57.000000000 -0700
-@@ -355,7 +355,7 @@
-       _rl_get_screen_size (fileno (rl_instream), 1);
-       if (CUSTOM_REDISPLAY_FUNC ())
- 	rl_forced_update_display ();
--      else
-+      else if (RL_ISSTATE(RL_STATE_REDISPLAYING) == 0)
- 	_rl_redisplay_after_sigwinch ();
-     }
- }
Index: tches/shadow-4.1.4.2-sysroot_hacks-1.patch
===================================================================
--- patches/shadow-4.1.4.2-sysroot_hacks-1.patch	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,2101 +1,0 @@
-Submitted By: Joe Ciccone <jciccone@gmail.com>
-Date: 2006-11-24
-Initial Package Version: 4.0.18.1
-        Rediffed Against 4.1.2.2 by Joe Ciccone on 2009-01-03
-        Rediffed Against 4.1.4.1 by Joe Ciccone on 2009-07-11
-        Rediffed Against 4.1.4.2 by Joe Ciccone on 2009-07-26
-Origin: Joe Ciccone
-Upstream Status: None
-Description: Changes the hardcoded /etc to the value of the --sysconfdir
-             parameter passed to configure. Allows the utilities to be run
-             as a user other then root and properly modify the passwd and group
-             files for the target system. This patch also disables the
-             calls that flushes the nscd cache. There is no point in flushing
-             the hosts cache db when it wasn't modified.
-
-diff -Naur shadow-4.1.4.2.orig/aclocal.m4 shadow-4.1.4.2/aclocal.m4
---- shadow-4.1.4.2.orig/aclocal.m4	2009-07-23 21:15:54.000000000 -0400
-+++ shadow-4.1.4.2/aclocal.m4	2009-07-26 14:30:10.903936315 -0400
-@@ -1,4 +1,4 @@
--# generated automatically by aclocal 1.10.2 -*- Autoconf -*-
-+# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
- 
- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- # 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
-@@ -13,7 +13,7 @@
- 
- m4_ifndef([AC_AUTOCONF_VERSION],
-   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
--m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
-+m4_if(AC_AUTOCONF_VERSION, [2.63],,
- [m4_warning([this file was generated for autoconf 2.63.
- You have another version of autoconf.  It may work, but is not guaranteed to.
- If you have problems, you may need to regenerate the build system entirely.
-@@ -4122,18 +4122,6 @@
-   dynamic_linker='GNU/Linux ld.so'
-   ;;
- 
--netbsdelf*-gnu)
--  version_type=linux
--  need_lib_prefix=no
--  need_version=no
--  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
--  soname_spec='${libname}${release}${shared_ext}$major'
--  shlibpath_var=LD_LIBRARY_PATH
--  shlibpath_overrides_runpath=no
--  hardcode_into_libs=yes
--  dynamic_linker='NetBSD ld.elf_so'
--  ;;
--
- netbsd*)
-   version_type=sunos
-   need_lib_prefix=no
-@@ -4725,7 +4713,7 @@
-   lt_cv_deplibs_check_method=pass_all
-   ;;
- 
--netbsd* | netbsdelf*-gnu)
-+netbsd*)
-   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
-     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
-   else
-@@ -5406,7 +5394,7 @@
- 	    ;;
- 	esac
- 	;;
--      netbsd* | netbsdelf*-gnu)
-+      netbsd*)
- 	;;
-       *qnx* | *nto*)
-         # QNX uses GNU C++, but need to define -shared option too, otherwise
-@@ -5831,9 +5819,6 @@
-   cygwin* | mingw* | cegcc*)
-     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
-   ;;
--  linux* | k*bsd*-gnu)
--    _LT_TAGVAR(link_all_deplibs, $1)=no
--  ;;
-   *)
-     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-   ;;
-@@ -5898,9 +5883,6 @@
-   openbsd*)
-     with_gnu_ld=no
-     ;;
--  linux* | k*bsd*-gnu)
--    _LT_TAGVAR(link_all_deplibs, $1)=no
--    ;;
-   esac
- 
-   _LT_TAGVAR(ld_shlibs, $1)=yes
-@@ -6083,7 +6065,7 @@
-       fi
-       ;;
- 
--    netbsd* | netbsdelf*-gnu)
-+    netbsd*)
-       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- 	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
- 	wlarc=
-@@ -6258,7 +6240,6 @@
- 	if test "$aix_use_runtimelinking" = yes; then
- 	  shared_flag="$shared_flag "'${wl}-G'
- 	fi
--	_LT_TAGVAR(link_all_deplibs, $1)=no
-       else
- 	# not using gcc
- 	if test "$host_cpu" = ia64; then
-@@ -6497,7 +6478,7 @@
-       _LT_TAGVAR(link_all_deplibs, $1)=yes
-       ;;
- 
--    netbsd* | netbsdelf*-gnu)
-+    netbsd*)
-       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- 	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
-       else
-@@ -10181,7 +10162,7 @@
- AC_SUBST($1)dnl
- ])
- 
--# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
-+# Copyright (C) 2002, 2003, 2005, 2006, 2007  Free Software Foundation, Inc.
- #
- # This file is free software; the Free Software Foundation
- # gives unlimited permission to copy and/or distribute it,
-@@ -10196,7 +10177,7 @@
- [am__api_version='1.10'
- 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.10.2], [],
-+m4_if([$1], [1.10.1], [],
-       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
- ])
- 
-@@ -10210,12 +10191,12 @@
- # AM_SET_CURRENT_AUTOMAKE_VERSION
- # -------------------------------
- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
--# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
-+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
- AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
--[AM_AUTOMAKE_VERSION([1.10.2])dnl
-+[AM_AUTOMAKE_VERSION([1.10.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_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
- 
- # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
- 
-@@ -10465,28 +10446,19 @@
- 
- # Generate code to set up dependency tracking.              -*- Autoconf -*-
- 
--# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
- # Free Software Foundation, Inc.
- #
- # This file is free software; the Free Software Foundation
- # gives unlimited permission to copy and/or distribute it,
- # with or without modifications, as long as this notice is preserved.
- 
--#serial 4
-+#serial 3
- 
- # _AM_OUTPUT_DEPENDENCY_COMMANDS
- # ------------------------------
- AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
--[# Autoconf 2.62 quotes --file arguments for eval, but not when files
--# are listed without --file.  Let's play safe and only enable the eval
--# if we detect the quoting.
--case $CONFIG_FILES in
--*\'*) eval set x "$CONFIG_FILES" ;;
--*)   set x $CONFIG_FILES ;;
--esac
--shift
--for mf
--do
-+[for mf in $CONFIG_FILES; do
-   # Strip MF so we end up with the name of the file.
-   mf=`echo "$mf" | sed -e 's/:.*$//'`
-   # Check whether this is an Automake generated Makefile or not.
-@@ -10847,13 +10819,13 @@
- 
- # Helper functions for option handling.                     -*- Autoconf -*-
- 
--# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
-+# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
- #
- # This file is free software; the Free Software Foundation
- # gives unlimited permission to copy and/or distribute it,
- # with or without modifications, as long as this notice is preserved.
- 
--# serial 4
-+# serial 3
- 
- # _AM_MANGLE_OPTION(NAME)
- # -----------------------
-@@ -10870,7 +10842,7 @@
- # ----------------------------------
- # OPTIONS is a space-separated list of Automake options.
- AC_DEFUN([_AM_SET_OPTIONS],
--[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
-+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
- 
- # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
- # -------------------------------------------
-diff -Naur shadow-4.1.4.2.orig/configure shadow-4.1.4.2/configure
---- shadow-4.1.4.2.orig/configure	2009-07-23 21:15:56.000000000 -0400
-+++ shadow-4.1.4.2/configure	2009-07-26 14:30:10.910389331 -0400
-@@ -6786,7 +6786,7 @@
-   lt_cv_deplibs_check_method=pass_all
-   ;;
- 
--netbsd* | netbsdelf*-gnu)
-+netbsd*)
-   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
-     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
-   else
-@@ -9444,9 +9444,6 @@
-   openbsd*)
-     with_gnu_ld=no
-     ;;
--  linux* | k*bsd*-gnu)
--    link_all_deplibs=no
--    ;;
-   esac
- 
-   ld_shlibs=yes
-@@ -9629,7 +9626,7 @@
-       fi
-       ;;
- 
--    netbsd* | netbsdelf*-gnu)
-+    netbsd*)
-       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- 	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
- 	wlarc=
-@@ -9804,7 +9801,6 @@
- 	if test "$aix_use_runtimelinking" = yes; then
- 	  shared_flag="$shared_flag "'${wl}-G'
- 	fi
--	link_all_deplibs=no
-       else
- 	# not using gcc
- 	if test "$host_cpu" = ia64; then
-@@ -10219,7 +10215,7 @@
-       link_all_deplibs=yes
-       ;;
- 
--    netbsd* | netbsdelf*-gnu)
-+    netbsd*)
-       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- 	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
-       else
-@@ -11196,18 +11192,6 @@
-   dynamic_linker='GNU/Linux ld.so'
-   ;;
- 
--netbsdelf*-gnu)
--  version_type=linux
--  need_lib_prefix=no
--  need_version=no
--  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
--  soname_spec='${libname}${release}${shared_ext}$major'
--  shlibpath_var=LD_LIBRARY_PATH
--  shlibpath_overrides_runpath=no
--  hardcode_into_libs=yes
--  dynamic_linker='NetBSD ld.elf_so'
--  ;;
--
- netbsd*)
-   version_type=sunos
-   need_lib_prefix=no
-@@ -12141,7 +12125,7 @@
-   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-   lt_status=$lt_dlunknown
-   cat > conftest.$ac_ext <<_LT_EOF
--#line 12144 "configure"
-+#line 12128 "configure"
- #include "confdefs.h"
- 
- #if HAVE_DLFCN_H
-@@ -12237,7 +12221,7 @@
-   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-   lt_status=$lt_dlunknown
-   cat > conftest.$ac_ext <<_LT_EOF
--#line 12240 "configure"
-+#line 12224 "configure"
- #include "confdefs.h"
- 
- #if HAVE_DLFCN_H
-@@ -24905,16 +24889,7 @@
- 
- 
-   case $ac_file$ac_mode in
--    "depfiles":C) test x"$AMDEP_TRUE" != x"" || # Autoconf 2.62 quotes --file arguments for eval, but not when files
--# are listed without --file.  Let's play safe and only enable the eval
--# if we detect the quoting.
--case $CONFIG_FILES in
--*\'*) eval set x "$CONFIG_FILES" ;;
--*)   set x $CONFIG_FILES ;;
--esac
--shift
--for mf
--do
-+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
-   # Strip MF so we end up with the name of the file.
-   mf=`echo "$mf" | sed -e 's/:.*$//'`
-   # Check whether this is an Automake generated Makefile or not.
-diff -Naur shadow-4.1.4.2.orig/contrib/Makefile.in shadow-4.1.4.2/contrib/Makefile.in
---- shadow-4.1.4.2.orig/contrib/Makefile.in	2009-07-23 21:15:59.000000000 -0400
-+++ shadow-4.1.4.2/contrib/Makefile.in	2009-07-26 14:30:10.910389331 -0400
-@@ -1,4 +1,4 @@
--# Makefile.in generated by automake 1.10.2 from Makefile.am.
-+# Makefile.in generated by automake 1.10.1 from Makefile.am.
- # @configure_input@
- 
- # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-@@ -200,8 +200,8 @@
- 	@for dep in $?; do \
- 	  case '$(am__configure_deps)' in \
- 	    *$$dep*) \
--	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
--	        && { if test -f $@; then exit 0; else break; fi; }; \
-+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-+		&& exit 0; \
- 	      exit 1;; \
- 	  esac; \
- 	done; \
-diff -Naur shadow-4.1.4.2.orig/doc/Makefile.in shadow-4.1.4.2/doc/Makefile.in
---- shadow-4.1.4.2.orig/doc/Makefile.in	2009-07-23 21:15:59.000000000 -0400
-+++ shadow-4.1.4.2/doc/Makefile.in	2009-07-26 14:30:10.910389331 -0400
-@@ -1,4 +1,4 @@
--# Makefile.in generated by automake 1.10.2 from Makefile.am.
-+# Makefile.in generated by automake 1.10.1 from Makefile.am.
- # @configure_input@
- 
- # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-@@ -199,8 +199,8 @@
- 	@for dep in $?; do \
- 	  case '$(am__configure_deps)' in \
- 	    *$$dep*) \
--	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
--	        && { if test -f $@; then exit 0; else break; fi; }; \
-+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-+		&& exit 0; \
- 	      exit 1;; \
- 	  esac; \
- 	done; \
-diff -Naur shadow-4.1.4.2.orig/etc/Makefile.in shadow-4.1.4.2/etc/Makefile.in
---- shadow-4.1.4.2.orig/etc/Makefile.in	2009-07-23 21:15:59.000000000 -0400
-+++ shadow-4.1.4.2/etc/Makefile.in	2009-07-26 14:30:10.910389331 -0400
-@@ -1,4 +1,4 @@
--# Makefile.in generated by automake 1.10.2 from Makefile.am.
-+# Makefile.in generated by automake 1.10.1 from Makefile.am.
- # @configure_input@
- 
- # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-@@ -238,8 +238,8 @@
- 	@for dep in $?; do \
- 	  case '$(am__configure_deps)' in \
- 	    *$$dep*) \
--	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
--	        && { if test -f $@; then exit 0; else break; fi; }; \
-+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-+		&& exit 0; \
- 	      exit 1;; \
- 	  esac; \
- 	done; \
-@@ -396,7 +396,7 @@
- 	unique=`for i in $$list; do \
- 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- 	  done | \
--	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-+	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
- 	      END { if (nonempty) { for (i in files) print i; }; }'`; \
- 	mkid -fID $$unique
- tags: TAGS
-diff -Naur shadow-4.1.4.2.orig/etc/pam.d/Makefile.in shadow-4.1.4.2/etc/pam.d/Makefile.in
---- shadow-4.1.4.2.orig/etc/pam.d/Makefile.in	2009-07-23 21:15:59.000000000 -0400
-+++ shadow-4.1.4.2/etc/pam.d/Makefile.in	2009-07-26 14:30:10.910389331 -0400
-@@ -1,4 +1,4 @@
--# Makefile.in generated by automake 1.10.2 from Makefile.am.
-+# Makefile.in generated by automake 1.10.1 from Makefile.am.
- # @configure_input@
- 
- # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-@@ -230,8 +230,8 @@
- 	@for dep in $?; do \
- 	  case '$(am__configure_deps)' in \
- 	    *$$dep*) \
--	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
--	        && { if test -f $@; then exit 0; else break; fi; }; \
-+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-+		&& exit 0; \
- 	      exit 1;; \
- 	  esac; \
- 	done; \
-diff -Naur shadow-4.1.4.2.orig/lib/commonio.c shadow-4.1.4.2/lib/commonio.c
---- shadow-4.1.4.2.orig/lib/commonio.c	2009-05-10 09:49:05.000000000 -0400
-+++ shadow-4.1.4.2/lib/commonio.c	2009-07-26 14:30:10.910389331 -0400
-@@ -215,16 +215,6 @@
- 		return NULL;
- 	}
- 
--#ifdef HAVE_FCHOWN
--	if (fchown (fileno (fp), sb->st_uid, sb->st_gid) != 0) {
--		goto fail;
--	}
--#else
--	if (chown (name, sb->st_mode) != 0) {
--		goto fail;
--	}
--#endif
--
- #ifdef HAVE_FCHMOD
- 	if (fchmod (fileno (fp), sb->st_mode & 0664) != 0) {
- 		goto fail;
-@@ -408,8 +398,8 @@
- 			/* Tell nscd when lock count goes to zero,
- 			   if any of the files were changed.  */
- 			if (nscd_need_reload) {
--				nscd_flush_cache ("passwd");
--				nscd_flush_cache ("group");
-+//				nscd_flush_cache ("passwd");
-+//				nscd_flush_cache ("group");
- 				nscd_need_reload = false;
- 			}
- #ifdef HAVE_LCKPWDF
-@@ -872,7 +862,7 @@
- 		 * Default permissions for new [g]shadow files.
- 		 * (passwd and group always exist...)
- 		 */
--		sb.st_mode = 0400;
-+		sb.st_mode = 0600;
- 		sb.st_uid = 0;
- 		sb.st_gid = 0;
- 	}
-diff -Naur shadow-4.1.4.2.orig/lib/defines.h shadow-4.1.4.2/lib/defines.h
---- shadow-4.1.4.2.orig/lib/defines.h	2009-05-19 04:05:10.000000000 -0400
-+++ shadow-4.1.4.2/lib/defines.h	2009-07-26 14:30:10.910389331 -0400
-@@ -299,20 +299,20 @@
- 	(strncpy((A), (B), sizeof(A) - 1), (A)[sizeof(A) - 1] = '\0')
- 
- #ifndef PASSWD_FILE
--#define PASSWD_FILE "/etc/passwd"
-+#define PASSWD_FILE SYSCONFDIR"/passwd"
- #endif
- 
- #ifndef GROUP_FILE
--#define GROUP_FILE "/etc/group"
-+#define GROUP_FILE SYSCONFDIR"/group"
- #endif
- 
- #ifndef SHADOW_FILE
--#define SHADOW_FILE "/etc/shadow"
-+#define SHADOW_FILE SYSCONFDIR"/shadow"
- #endif
- 
- #ifdef SHADOWGRP
- #ifndef SGROUP_FILE
--#define SGROUP_FILE "/etc/gshadow"
-+#define SGROUP_FILE SYSCONFDIR"/gshadow"
- #endif
- #endif
- 
-diff -Naur shadow-4.1.4.2.orig/lib/getdef.c shadow-4.1.4.2/lib/getdef.c
---- shadow-4.1.4.2.orig/lib/getdef.c	2009-04-23 07:46:47.000000000 -0400
-+++ shadow-4.1.4.2/lib/getdef.c	2009-07-26 14:30:10.914142709 -0400
-@@ -128,7 +128,7 @@
- };
- 
- #ifndef LOGINDEFS
--#define LOGINDEFS "/etc/login.defs"
-+#define LOGINDEFS SYSCONFDIR"/login.defs"
- #endif
- 
- static char def_fname[] = LOGINDEFS;	/* login config defs file       */
-diff -Naur shadow-4.1.4.2.orig/lib/gshadow_.h shadow-4.1.4.2/lib/gshadow_.h
---- shadow-4.1.4.2.orig/lib/gshadow_.h	2009-04-24 20:20:11.000000000 -0400
-+++ shadow-4.1.4.2/lib/gshadow_.h	2009-07-26 14:30:10.914142709 -0400
-@@ -71,5 +71,5 @@
- int putsgent ();
- #endif
- 
--#define	GSHADOW	"/etc/gshadow"
-+#define	GSHADOW	SYSCONFDIR"/gshadow"
- #endif				/* ifndef _H_GSHADOW */
-diff -Naur shadow-4.1.4.2.orig/lib/Makefile.am shadow-4.1.4.2/lib/Makefile.am
---- shadow-4.1.4.2.orig/lib/Makefile.am	2009-04-24 05:47:28.000000000 -0400
-+++ shadow-4.1.4.2/lib/Makefile.am	2009-07-26 14:30:10.914142709 -0400
-@@ -2,6 +2,7 @@
- AUTOMAKE_OPTIONS = 1.0 foreign
- 
- DEFS = 
-+AM_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\"
- 
- noinst_LTLIBRARIES = libshadow.la
- 
-diff -Naur shadow-4.1.4.2.orig/lib/Makefile.in shadow-4.1.4.2/lib/Makefile.in
---- shadow-4.1.4.2.orig/lib/Makefile.in	2009-07-23 21:15:59.000000000 -0400
-+++ shadow-4.1.4.2/lib/Makefile.in	2009-07-26 14:30:10.914142709 -0400
-@@ -1,4 +1,4 @@
--# Makefile.in generated by automake 1.10.2 from Makefile.am.
-+# Makefile.in generated by automake 1.10.1 from Makefile.am.
- # @configure_input@
- 
- # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-@@ -214,6 +214,7 @@
- top_builddir = @top_builddir@
- top_srcdir = @top_srcdir@
- AUTOMAKE_OPTIONS = 1.0 foreign
-+AM_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\"
- noinst_LTLIBRARIES = libshadow.la
- libshadow_la_LDFLAGS = -version-info 0:0:0
- libshadow_la_SOURCES = \
-@@ -275,8 +276,8 @@
- 	@for dep in $?; do \
- 	  case '$(am__configure_deps)' in \
- 	    *$$dep*) \
--	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
--	        && { if test -f $@; then exit 0; else break; fi; }; \
-+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-+		&& exit 0; \
- 	      exit 1;; \
- 	  esac; \
- 	done; \
-@@ -377,7 +378,7 @@
- 	unique=`for i in $$list; do \
- 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- 	  done | \
--	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-+	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
- 	      END { if (nonempty) { for (i in files) print i; }; }'`; \
- 	mkid -fID $$unique
- tags: TAGS
-diff -Naur shadow-4.1.4.2.orig/lib/port.h shadow-4.1.4.2/lib/port.h
---- shadow-4.1.4.2.orig/lib/port.h	2008-04-26 20:40:13.000000000 -0400
-+++ shadow-4.1.4.2/lib/port.h	2009-07-26 14:30:10.914142709 -0400
-@@ -52,7 +52,7 @@
-  * PORT_DAY - Day of the week to a bit value (0 = Sunday).
-  */
- 
--#define	PORTS	"/etc/porttime"
-+#define	PORTS	SYSCONFDIR"/porttime"
- #define	PORT_IDS	64
- #define	PORT_TTY	64
- #define	PORT_TIMES	24
-diff -Naur shadow-4.1.4.2.orig/libmisc/limits.c shadow-4.1.4.2/libmisc/limits.c
---- shadow-4.1.4.2.orig/libmisc/limits.c	2009-04-30 17:08:50.000000000 -0400
-+++ shadow-4.1.4.2/libmisc/limits.c	2009-07-26 14:30:10.914142709 -0400
-@@ -54,7 +54,7 @@
- #endif
- #ifdef LIMITS
- #ifndef LIMITS_FILE
--#define LIMITS_FILE "/etc/limits"
-+#define LIMITS_FILE SYSCONFDIR"/limits"
- #endif
- #define LOGIN_ERROR_RLIMIT	1
- #define LOGIN_ERROR_LOGIN	2
-diff -Naur shadow-4.1.4.2.orig/libmisc/Makefile.am shadow-4.1.4.2/libmisc/Makefile.am
---- shadow-4.1.4.2.orig/libmisc/Makefile.am	2009-05-17 14:39:06.000000000 -0400
-+++ shadow-4.1.4.2/libmisc/Makefile.am	2009-07-26 14:30:10.914142709 -0400
-@@ -1,6 +1,8 @@
- 
- EXTRA_DIST = .indent.pro xgetXXbyYY.c
- 
-+AM_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\"
-+
- INCLUDES = -I$(top_srcdir)/lib
- 
- noinst_LIBRARIES = libmisc.a
-diff -Naur shadow-4.1.4.2.orig/libmisc/Makefile.in shadow-4.1.4.2/libmisc/Makefile.in
---- shadow-4.1.4.2.orig/libmisc/Makefile.in	2009-07-23 21:15:59.000000000 -0400
-+++ shadow-4.1.4.2/libmisc/Makefile.in	2009-07-26 14:30:10.914142709 -0400
-@@ -1,4 +1,4 @@
--# Makefile.in generated by automake 1.10.2 from Makefile.am.
-+# Makefile.in generated by automake 1.10.1 from Makefile.am.
- # @configure_input@
- 
- # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-@@ -233,6 +233,7 @@
- top_builddir = @top_builddir@
- top_srcdir = @top_srcdir@
- EXTRA_DIST = .indent.pro xgetXXbyYY.c
-+AM_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\"
- INCLUDES = -I$(top_srcdir)/lib
- noinst_LIBRARIES = libmisc.a
- libmisc_a_SOURCES = \
-@@ -305,8 +306,8 @@
- 	@for dep in $?; do \
- 	  case '$(am__configure_deps)' in \
- 	    *$$dep*) \
--	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
--	        && { if test -f $@; then exit 0; else break; fi; }; \
-+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-+		&& exit 0; \
- 	      exit 1;; \
- 	  esac; \
- 	done; \
-@@ -438,7 +439,7 @@
- 	unique=`for i in $$list; do \
- 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- 	  done | \
--	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-+	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
- 	      END { if (nonempty) { for (i in files) print i; }; }'`; \
- 	mkid -fID $$unique
- tags: TAGS
-diff -Naur shadow-4.1.4.2.orig/Makefile.in shadow-4.1.4.2/Makefile.in
---- shadow-4.1.4.2.orig/Makefile.in	2009-07-23 21:16:00.000000000 -0400
-+++ shadow-4.1.4.2/Makefile.in	2009-07-26 14:30:10.914142709 -0400
-@@ -1,4 +1,4 @@
--# Makefile.in generated by automake 1.10.2 from Makefile.am.
-+# Makefile.in generated by automake 1.10.1 from Makefile.am.
- # @configure_input@
- 
- # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-@@ -283,7 +283,7 @@
- 	-rm -rf .libs _libs
- 
- distclean-libtool:
--	-rm -f libtool config.lt
-+	-rm -f libtool
- 
- # This directory's subdirectories are mostly independent; you can cd
- # into them and run `make' without going through this Makefile.
-@@ -360,7 +360,7 @@
- 	unique=`for i in $$list; do \
- 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- 	  done | \
--	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-+	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
- 	      END { if (nonempty) { for (i in files) print i; }; }'`; \
- 	mkid -fID $$unique
- tags: TAGS
-diff -Naur shadow-4.1.4.2.orig/man/cs/Makefile.in shadow-4.1.4.2/man/cs/Makefile.in
---- shadow-4.1.4.2.orig/man/cs/Makefile.in	2009-07-23 21:15:59.000000000 -0400
-+++ shadow-4.1.4.2/man/cs/Makefile.in	2009-07-26 14:30:10.914142709 -0400
-@@ -1,4 +1,4 @@
--# Makefile.in generated by automake 1.10.2 from Makefile.am.
-+# Makefile.in generated by automake 1.10.1 from Makefile.am.
- # @configure_input@
- 
- # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-@@ -223,8 +223,8 @@
- 	@for dep in $?; do \
- 	  case '$(am__configure_deps)' in \
- 	    *$$dep*) \
--	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
--	        && { if test -f $@; then exit 0; else break; fi; }; \
-+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-+		&& exit 0; \
- 	      exit 1;; \
- 	  esac; \
- 	done; \
-@@ -265,8 +265,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    1*) ;; \
-@@ -310,8 +310,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    5*) ;; \
-@@ -355,8 +355,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    8*) ;; \
-diff -Naur shadow-4.1.4.2.orig/man/de/Makefile.in shadow-4.1.4.2/man/de/Makefile.in
---- shadow-4.1.4.2.orig/man/de/Makefile.in	2009-07-23 21:15:59.000000000 -0400
-+++ shadow-4.1.4.2/man/de/Makefile.in	2009-07-26 14:30:10.914142709 -0400
-@@ -1,4 +1,4 @@
--# Makefile.in generated by automake 1.10.2 from Makefile.am.
-+# Makefile.in generated by automake 1.10.1 from Makefile.am.
- # @configure_input@
- 
- # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-@@ -223,8 +223,8 @@
- 	@for dep in $?; do \
- 	  case '$(am__configure_deps)' in \
- 	    *$$dep*) \
--	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
--	        && { if test -f $@; then exit 0; else break; fi; }; \
-+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-+		&& exit 0; \
- 	      exit 1;; \
- 	  esac; \
- 	done; \
-@@ -265,8 +265,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    1*) ;; \
-@@ -310,8 +310,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    5*) ;; \
-@@ -355,8 +355,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    8*) ;; \
-diff -Naur shadow-4.1.4.2.orig/man/es/Makefile.in shadow-4.1.4.2/man/es/Makefile.in
---- shadow-4.1.4.2.orig/man/es/Makefile.in	2009-07-23 21:15:59.000000000 -0400
-+++ shadow-4.1.4.2/man/es/Makefile.in	2009-07-26 14:30:10.917476044 -0400
-@@ -1,4 +1,4 @@
--# Makefile.in generated by automake 1.10.2 from Makefile.am.
-+# Makefile.in generated by automake 1.10.1 from Makefile.am.
- # @configure_input@
- 
- # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-@@ -206,8 +206,8 @@
- 	@for dep in $?; do \
- 	  case '$(am__configure_deps)' in \
- 	    *$$dep*) \
--	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
--	        && { if test -f $@; then exit 0; else break; fi; }; \
-+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-+		&& exit 0; \
- 	      exit 1;; \
- 	  esac; \
- 	done; \
-diff -Naur shadow-4.1.4.2.orig/man/fi/Makefile.in shadow-4.1.4.2/man/fi/Makefile.in
---- shadow-4.1.4.2.orig/man/fi/Makefile.in	2009-07-23 21:15:59.000000000 -0400
-+++ shadow-4.1.4.2/man/fi/Makefile.in	2009-07-26 14:30:10.917476044 -0400
-@@ -1,4 +1,4 @@
--# Makefile.in generated by automake 1.10.2 from Makefile.am.
-+# Makefile.in generated by automake 1.10.1 from Makefile.am.
- # @configure_input@
- 
- # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-@@ -206,8 +206,8 @@
- 	@for dep in $?; do \
- 	  case '$(am__configure_deps)' in \
- 	    *$$dep*) \
--	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
--	        && { if test -f $@; then exit 0; else break; fi; }; \
-+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-+		&& exit 0; \
- 	      exit 1;; \
- 	  esac; \
- 	done; \
-@@ -248,8 +248,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    1*) ;; \
-diff -Naur shadow-4.1.4.2.orig/man/fr/Makefile.in shadow-4.1.4.2/man/fr/Makefile.in
---- shadow-4.1.4.2.orig/man/fr/Makefile.in	2009-07-23 21:15:59.000000000 -0400
-+++ shadow-4.1.4.2/man/fr/Makefile.in	2009-07-26 14:30:10.917476044 -0400
-@@ -1,4 +1,4 @@
--# Makefile.in generated by automake 1.10.2 from Makefile.am.
-+# Makefile.in generated by automake 1.10.1 from Makefile.am.
- # @configure_input@
- 
- # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-@@ -229,8 +229,8 @@
- 	@for dep in $?; do \
- 	  case '$(am__configure_deps)' in \
- 	    *$$dep*) \
--	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
--	        && { if test -f $@; then exit 0; else break; fi; }; \
-+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-+		&& exit 0; \
- 	      exit 1;; \
- 	  esac; \
- 	done; \
-@@ -271,8 +271,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    1*) ;; \
-@@ -316,8 +316,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    3*) ;; \
-@@ -361,8 +361,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    5*) ;; \
-@@ -406,8 +406,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    8*) ;; \
-diff -Naur shadow-4.1.4.2.orig/man/hu/Makefile.in shadow-4.1.4.2/man/hu/Makefile.in
---- shadow-4.1.4.2.orig/man/hu/Makefile.in	2009-07-23 21:15:59.000000000 -0400
-+++ shadow-4.1.4.2/man/hu/Makefile.in	2009-07-26 14:30:10.917476044 -0400
-@@ -1,4 +1,4 @@
--# Makefile.in generated by automake 1.10.2 from Makefile.am.
-+# Makefile.in generated by automake 1.10.1 from Makefile.am.
- # @configure_input@
- 
- # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-@@ -213,8 +213,8 @@
- 	@for dep in $?; do \
- 	  case '$(am__configure_deps)' in \
- 	    *$$dep*) \
--	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
--	        && { if test -f $@; then exit 0; else break; fi; }; \
-+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-+		&& exit 0; \
- 	      exit 1;; \
- 	  esac; \
- 	done; \
-@@ -255,8 +255,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    1*) ;; \
-@@ -300,8 +300,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    5*) ;; \
-@@ -345,8 +345,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    8*) ;; \
-diff -Naur shadow-4.1.4.2.orig/man/id/Makefile.in shadow-4.1.4.2/man/id/Makefile.in
---- shadow-4.1.4.2.orig/man/id/Makefile.in	2009-07-23 21:15:59.000000000 -0400
-+++ shadow-4.1.4.2/man/id/Makefile.in	2009-07-26 14:30:10.917476044 -0400
-@@ -1,4 +1,4 @@
--# Makefile.in generated by automake 1.10.2 from Makefile.am.
-+# Makefile.in generated by automake 1.10.1 from Makefile.am.
- # @configure_input@
- 
- # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-@@ -204,8 +204,8 @@
- 	@for dep in $?; do \
- 	  case '$(am__configure_deps)' in \
- 	    *$$dep*) \
--	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
--	        && { if test -f $@; then exit 0; else break; fi; }; \
-+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-+		&& exit 0; \
- 	      exit 1;; \
- 	  esac; \
- 	done; \
-@@ -246,8 +246,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    1*) ;; \
-@@ -291,8 +291,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    8*) ;; \
-diff -Naur shadow-4.1.4.2.orig/man/it/Makefile.in shadow-4.1.4.2/man/it/Makefile.in
---- shadow-4.1.4.2.orig/man/it/Makefile.in	2009-07-23 21:15:59.000000000 -0400
-+++ shadow-4.1.4.2/man/it/Makefile.in	2009-07-26 14:30:10.917476044 -0400
-@@ -1,4 +1,4 @@
--# Makefile.in generated by automake 1.10.2 from Makefile.am.
-+# Makefile.in generated by automake 1.10.1 from Makefile.am.
- # @configure_input@
- 
- # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-@@ -227,8 +227,8 @@
- 	@for dep in $?; do \
- 	  case '$(am__configure_deps)' in \
- 	    *$$dep*) \
--	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
--	        && { if test -f $@; then exit 0; else break; fi; }; \
-+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-+		&& exit 0; \
- 	      exit 1;; \
- 	  esac; \
- 	done; \
-@@ -269,8 +269,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    1*) ;; \
-@@ -314,8 +314,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    3*) ;; \
-@@ -359,8 +359,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    5*) ;; \
-@@ -404,8 +404,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    8*) ;; \
-diff -Naur shadow-4.1.4.2.orig/man/ja/Makefile.in shadow-4.1.4.2/man/ja/Makefile.in
---- shadow-4.1.4.2.orig/man/ja/Makefile.in	2009-07-23 21:15:59.000000000 -0400
-+++ shadow-4.1.4.2/man/ja/Makefile.in	2009-07-26 14:30:10.917476044 -0400
-@@ -1,4 +1,4 @@
--# Makefile.in generated by automake 1.10.2 from Makefile.am.
-+# Makefile.in generated by automake 1.10.1 from Makefile.am.
- # @configure_input@
- 
- # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-@@ -219,8 +219,8 @@
- 	@for dep in $?; do \
- 	  case '$(am__configure_deps)' in \
- 	    *$$dep*) \
--	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
--	        && { if test -f $@; then exit 0; else break; fi; }; \
-+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-+		&& exit 0; \
- 	      exit 1;; \
- 	  esac; \
- 	done; \
-@@ -261,8 +261,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    1*) ;; \
-@@ -306,8 +306,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    5*) ;; \
-@@ -351,8 +351,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    8*) ;; \
-diff -Naur shadow-4.1.4.2.orig/man/ko/Makefile.in shadow-4.1.4.2/man/ko/Makefile.in
---- shadow-4.1.4.2.orig/man/ko/Makefile.in	2009-07-23 21:15:59.000000000 -0400
-+++ shadow-4.1.4.2/man/ko/Makefile.in	2009-07-26 14:30:10.917476044 -0400
-@@ -1,4 +1,4 @@
--# Makefile.in generated by automake 1.10.2 from Makefile.am.
-+# Makefile.in generated by automake 1.10.1 from Makefile.am.
- # @configure_input@
- 
- # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-@@ -213,8 +213,8 @@
- 	@for dep in $?; do \
- 	  case '$(am__configure_deps)' in \
- 	    *$$dep*) \
--	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
--	        && { if test -f $@; then exit 0; else break; fi; }; \
-+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-+		&& exit 0; \
- 	      exit 1;; \
- 	  esac; \
- 	done; \
-@@ -255,8 +255,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    1*) ;; \
-@@ -300,8 +300,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    5*) ;; \
-@@ -345,8 +345,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    8*) ;; \
-diff -Naur shadow-4.1.4.2.orig/man/Makefile.in shadow-4.1.4.2/man/Makefile.in
---- shadow-4.1.4.2.orig/man/Makefile.in	2009-07-23 21:16:14.000000000 -0400
-+++ shadow-4.1.4.2/man/Makefile.in	2009-07-26 14:30:10.917476044 -0400
-@@ -1,4 +1,4 @@
--# Makefile.in generated by automake 1.10.2 from Makefile.am.
-+# Makefile.in generated by automake 1.10.1 from Makefile.am.
- # @configure_input@
- 
- # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-@@ -353,8 +353,8 @@
- 	@for dep in $?; do \
- 	  case '$(am__configure_deps)' in \
- 	    *$$dep*) \
--	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
--	        && { if test -f $@; then exit 0; else break; fi; }; \
-+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-+		&& exit 0; \
- 	      exit 1;; \
- 	  esac; \
- 	done; \
-@@ -397,8 +397,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    1*) ;; \
-@@ -442,8 +442,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    3*) ;; \
-@@ -487,8 +487,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    5*) ;; \
-@@ -532,8 +532,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    8*) ;; \
-@@ -642,7 +642,7 @@
- 	unique=`for i in $$list; do \
- 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- 	  done | \
--	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-+	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
- 	      END { if (nonempty) { for (i in files) print i; }; }'`; \
- 	mkid -fID $$unique
- tags: TAGS
-diff -Naur shadow-4.1.4.2.orig/man/pl/Makefile.in shadow-4.1.4.2/man/pl/Makefile.in
---- shadow-4.1.4.2.orig/man/pl/Makefile.in	2009-07-23 21:16:00.000000000 -0400
-+++ shadow-4.1.4.2/man/pl/Makefile.in	2009-07-26 14:30:10.920809384 -0400
-@@ -1,4 +1,4 @@
--# Makefile.in generated by automake 1.10.2 from Makefile.am.
-+# Makefile.in generated by automake 1.10.1 from Makefile.am.
- # @configure_input@
- 
- # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-@@ -230,8 +230,8 @@
- 	@for dep in $?; do \
- 	  case '$(am__configure_deps)' in \
- 	    *$$dep*) \
--	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
--	        && { if test -f $@; then exit 0; else break; fi; }; \
-+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-+		&& exit 0; \
- 	      exit 1;; \
- 	  esac; \
- 	done; \
-@@ -272,8 +272,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    1*) ;; \
-@@ -317,8 +317,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    5*) ;; \
-@@ -362,8 +362,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    8*) ;; \
-diff -Naur shadow-4.1.4.2.orig/man/pt_BR/Makefile.in shadow-4.1.4.2/man/pt_BR/Makefile.in
---- shadow-4.1.4.2.orig/man/pt_BR/Makefile.in	2009-07-23 21:16:00.000000000 -0400
-+++ shadow-4.1.4.2/man/pt_BR/Makefile.in	2009-07-26 14:30:10.920809384 -0400
-@@ -1,4 +1,4 @@
--# Makefile.in generated by automake 1.10.2 from Makefile.am.
-+# Makefile.in generated by automake 1.10.1 from Makefile.am.
- # @configure_input@
- 
- # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-@@ -209,8 +209,8 @@
- 	@for dep in $?; do \
- 	  case '$(am__configure_deps)' in \
- 	    *$$dep*) \
--	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
--	        && { if test -f $@; then exit 0; else break; fi; }; \
-+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-+		&& exit 0; \
- 	      exit 1;; \
- 	  esac; \
- 	done; \
-@@ -251,8 +251,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    1*) ;; \
-@@ -296,8 +296,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    5*) ;; \
-@@ -341,8 +341,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    8*) ;; \
-diff -Naur shadow-4.1.4.2.orig/man/ru/Makefile.in shadow-4.1.4.2/man/ru/Makefile.in
---- shadow-4.1.4.2.orig/man/ru/Makefile.in	2009-07-23 21:16:00.000000000 -0400
-+++ shadow-4.1.4.2/man/ru/Makefile.in	2009-07-26 14:30:10.920809384 -0400
-@@ -1,4 +1,4 @@
--# Makefile.in generated by automake 1.10.2 from Makefile.am.
-+# Makefile.in generated by automake 1.10.1 from Makefile.am.
- # @configure_input@
- 
- # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-@@ -230,8 +230,8 @@
- 	@for dep in $?; do \
- 	  case '$(am__configure_deps)' in \
- 	    *$$dep*) \
--	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
--	        && { if test -f $@; then exit 0; else break; fi; }; \
-+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-+		&& exit 0; \
- 	      exit 1;; \
- 	  esac; \
- 	done; \
-@@ -272,8 +272,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    1*) ;; \
-@@ -317,8 +317,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    3*) ;; \
-@@ -362,8 +362,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    5*) ;; \
-@@ -407,8 +407,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    8*) ;; \
-diff -Naur shadow-4.1.4.2.orig/man/sv/Makefile.in shadow-4.1.4.2/man/sv/Makefile.in
---- shadow-4.1.4.2.orig/man/sv/Makefile.in	2009-07-23 21:16:00.000000000 -0400
-+++ shadow-4.1.4.2/man/sv/Makefile.in	2009-07-26 14:30:10.920809384 -0400
-@@ -1,4 +1,4 @@
--# Makefile.in generated by automake 1.10.2 from Makefile.am.
-+# Makefile.in generated by automake 1.10.1 from Makefile.am.
- # @configure_input@
- 
- # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-@@ -228,8 +228,8 @@
- 	@for dep in $?; do \
- 	  case '$(am__configure_deps)' in \
- 	    *$$dep*) \
--	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
--	        && { if test -f $@; then exit 0; else break; fi; }; \
-+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-+		&& exit 0; \
- 	      exit 1;; \
- 	  esac; \
- 	done; \
-@@ -270,8 +270,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    1*) ;; \
-@@ -315,8 +315,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    3*) ;; \
-@@ -360,8 +360,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    5*) ;; \
-@@ -405,8 +405,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    8*) ;; \
-diff -Naur shadow-4.1.4.2.orig/man/tr/Makefile.in shadow-4.1.4.2/man/tr/Makefile.in
---- shadow-4.1.4.2.orig/man/tr/Makefile.in	2009-07-23 21:16:00.000000000 -0400
-+++ shadow-4.1.4.2/man/tr/Makefile.in	2009-07-26 14:30:10.920809384 -0400
-@@ -1,4 +1,4 @@
--# Makefile.in generated by automake 1.10.2 from Makefile.am.
-+# Makefile.in generated by automake 1.10.1 from Makefile.am.
- # @configure_input@
- 
- # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-@@ -216,8 +216,8 @@
- 	@for dep in $?; do \
- 	  case '$(am__configure_deps)' in \
- 	    *$$dep*) \
--	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
--	        && { if test -f $@; then exit 0; else break; fi; }; \
-+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-+		&& exit 0; \
- 	      exit 1;; \
- 	  esac; \
- 	done; \
-@@ -258,8 +258,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    1*) ;; \
-@@ -303,8 +303,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    5*) ;; \
-@@ -348,8 +348,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    8*) ;; \
-diff -Naur shadow-4.1.4.2.orig/man/zh_CN/Makefile.in shadow-4.1.4.2/man/zh_CN/Makefile.in
---- shadow-4.1.4.2.orig/man/zh_CN/Makefile.in	2009-07-23 21:16:00.000000000 -0400
-+++ shadow-4.1.4.2/man/zh_CN/Makefile.in	2009-07-26 14:30:10.920809384 -0400
-@@ -1,4 +1,4 @@
--# Makefile.in generated by automake 1.10.2 from Makefile.am.
-+# Makefile.in generated by automake 1.10.1 from Makefile.am.
- # @configure_input@
- 
- # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-@@ -217,8 +217,8 @@
- 	@for dep in $?; do \
- 	  case '$(am__configure_deps)' in \
- 	    *$$dep*) \
--	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
--	        && { if test -f $@; then exit 0; else break; fi; }; \
-+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-+		&& exit 0; \
- 	      exit 1;; \
- 	  esac; \
- 	done; \
-@@ -259,8 +259,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    1*) ;; \
-@@ -304,8 +304,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    5*) ;; \
-@@ -349,8 +349,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    8*) ;; \
-diff -Naur shadow-4.1.4.2.orig/man/zh_TW/Makefile.in shadow-4.1.4.2/man/zh_TW/Makefile.in
---- shadow-4.1.4.2.orig/man/zh_TW/Makefile.in	2009-07-23 21:16:00.000000000 -0400
-+++ shadow-4.1.4.2/man/zh_TW/Makefile.in	2009-07-26 14:30:10.920809384 -0400
-@@ -1,4 +1,4 @@
--# Makefile.in generated by automake 1.10.2 from Makefile.am.
-+# Makefile.in generated by automake 1.10.1 from Makefile.am.
- # @configure_input@
- 
- # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-@@ -217,8 +217,8 @@
- 	@for dep in $?; do \
- 	  case '$(am__configure_deps)' in \
- 	    *$$dep*) \
--	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
--	        && { if test -f $@; then exit 0; else break; fi; }; \
-+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-+		&& exit 0; \
- 	      exit 1;; \
- 	  esac; \
- 	done; \
-@@ -259,8 +259,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    1*) ;; \
-@@ -304,8 +304,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    5*) ;; \
-@@ -349,8 +349,8 @@
- 	  esac; \
- 	done; \
- 	for i in $$list; do \
--	  if test -f $$i; then file=$$i; \
--	  else file=$(srcdir)/$$i; fi; \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
- 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- 	  case "$$ext" in \
- 	    8*) ;; \
-diff -Naur shadow-4.1.4.2.orig/src/chage.c shadow-4.1.4.2/src/chage.c
---- shadow-4.1.4.2.orig/src/chage.c	2009-04-30 17:39:39.000000000 -0400
-+++ shadow-4.1.4.2/src/chage.c	2009-07-26 14:30:10.920809384 -0400
-@@ -808,7 +808,7 @@
- 
- 	ruid = getuid ();
- 	rgid = getgid ();
--	amroot = (ruid == 0);
-+	amroot = 1; /* (ruid == 0); */
- #ifdef WITH_SELINUX
- 	if (amroot && (is_selinux_enabled () > 0)) {
- 		amroot = (selinux_check_passwd_access (PASSWD__ROOTOK) == 0);
-diff -Naur shadow-4.1.4.2.orig/src/chfn.c shadow-4.1.4.2/src/chfn.c
---- shadow-4.1.4.2.orig/src/chfn.c	2009-04-30 17:39:39.000000000 -0400
-+++ shadow-4.1.4.2/src/chfn.c	2009-07-26 14:30:10.923713238 -0400
-@@ -719,7 +719,7 @@
- 
- 	SYSLOG ((LOG_INFO, "changed user '%s' information", user));
- 
--	nscd_flush_cache ("passwd");
-+//	nscd_flush_cache ("passwd");
- 
- 	closelog ();
- 	exit (E_SUCCESS);
-diff -Naur shadow-4.1.4.2.orig/src/chgpasswd.c shadow-4.1.4.2/src/chgpasswd.c
---- shadow-4.1.4.2.orig/src/chgpasswd.c	2009-04-30 17:39:39.000000000 -0400
-+++ shadow-4.1.4.2/src/chgpasswd.c	2009-07-26 14:30:10.923713238 -0400
-@@ -537,7 +537,7 @@
- 
- 	close_files ();
- 
--	nscd_flush_cache ("group");
-+//	nscd_flush_cache ("group");
- 
- 	return (0);
- }
-diff -Naur shadow-4.1.4.2.orig/src/chpasswd.c shadow-4.1.4.2/src/chpasswd.c
---- shadow-4.1.4.2.orig/src/chpasswd.c	2009-05-10 09:49:05.000000000 -0400
-+++ shadow-4.1.4.2/src/chpasswd.c	2009-07-26 14:30:10.923713238 -0400
-@@ -578,7 +578,7 @@
- 	close_files ();
- #endif
- 
--	nscd_flush_cache ("passwd");
-+//	nscd_flush_cache ("passwd");
- 
- 	return (0);
- }
-diff -Naur shadow-4.1.4.2.orig/src/chsh.c shadow-4.1.4.2/src/chsh.c
---- shadow-4.1.4.2.orig/src/chsh.c	2009-04-30 17:39:39.000000000 -0400
-+++ shadow-4.1.4.2/src/chsh.c	2009-07-26 14:30:10.923713238 -0400
-@@ -56,7 +56,7 @@
- #include "exitcodes.h"
- 
- #ifndef SHELLS_FILE
--#define SHELLS_FILE "/etc/shells"
-+#define SHELLS_FILE SYSCONFDIR"/shells"
- #endif
- /*
-  * Global variables
-@@ -443,7 +443,7 @@
- 	/*
- 	 * This command behaves different for root and non-root users.
- 	 */
--	amroot = (getuid () == 0);
-+	amroot = 1; //(getuid () == 0);
- 
- 	/*
- 	 * Get the program name. The program name is used as a prefix to
-@@ -543,7 +543,7 @@
- 
- 	SYSLOG ((LOG_INFO, "changed user '%s' shell to '%s'", user, loginsh));
- 
--	nscd_flush_cache ("passwd");
-+//	nscd_flush_cache ("passwd");
- 
- 	closelog ();
- 	exit (E_SUCCESS);
-diff -Naur shadow-4.1.4.2.orig/src/gpasswd.c shadow-4.1.4.2/src/gpasswd.c
---- shadow-4.1.4.2.orig/src/gpasswd.c	2009-04-30 17:39:40.000000000 -0400
-+++ shadow-4.1.4.2/src/gpasswd.c	2009-07-26 14:30:10.923713238 -0400
-@@ -86,7 +86,7 @@
- /* The UID of the caller */
- static uid_t bywho;
- /* Indicate if gpasswd was called by root */
--#define amroot	(0 == bywho)
-+#define amroot	1 /* (0 == bywho) */
- 
- /* The number of retries for th user to provide and repeat a new password */
- #ifndef	RETRIES
-@@ -1173,12 +1173,14 @@
- 	 * output, etc.
- 	 */
-       output:
-+/*
- 	if (setuid (0) != 0) {
- 		fputs (_("Cannot change ID to root.\n"), stderr);
- 		SYSLOG ((LOG_ERR, "can't setuid(0)"));
- 		closelog ();
- 		exit (E_NOPERM);
- 	}
-+*/
- 	pwd_init ();
- 
- 	open_files ();
-@@ -1191,7 +1193,7 @@
- 
- 	close_files ();
- 
--	nscd_flush_cache ("group");
-+//	nscd_flush_cache ("group");
- 
- 	exit (E_SUCCESS);
- }
-diff -Naur shadow-4.1.4.2.orig/src/groupadd.c shadow-4.1.4.2/src/groupadd.c
---- shadow-4.1.4.2.orig/src/groupadd.c	2009-06-05 18:16:58.000000000 -0400
-+++ shadow-4.1.4.2/src/groupadd.c	2009-07-26 14:30:10.923713238 -0400
-@@ -604,7 +604,7 @@
- 	grp_update ();
- 	close_files ();
- 
--	nscd_flush_cache ("group");
-+//	nscd_flush_cache ("group");
- 
- 	exit (E_SUCCESS);
- 	/*@notreached@*/
-diff -Naur shadow-4.1.4.2.orig/src/groupdel.c shadow-4.1.4.2/src/groupdel.c
---- shadow-4.1.4.2.orig/src/groupdel.c	2009-04-30 17:39:40.000000000 -0400
-+++ shadow-4.1.4.2/src/groupdel.c	2009-07-26 14:30:10.923713238 -0400
-@@ -426,7 +426,7 @@
- 
- 	close_files ();
- 
--	nscd_flush_cache ("group");
-+//	nscd_flush_cache ("group");
- 
- 	return E_SUCCESS;
- }
-diff -Naur shadow-4.1.4.2.orig/src/groupmod.c shadow-4.1.4.2/src/groupmod.c
---- shadow-4.1.4.2.orig/src/groupmod.c	2009-06-05 18:16:58.000000000 -0400
-+++ shadow-4.1.4.2/src/groupmod.c	2009-07-26 14:30:10.923713238 -0400
-@@ -815,7 +815,7 @@
- 
- 	close_files ();
- 
--	nscd_flush_cache ("group");
-+//	nscd_flush_cache ("group");
- 
- 	return E_SUCCESS;
- }
-diff -Naur shadow-4.1.4.2.orig/src/grpck.c shadow-4.1.4.2/src/grpck.c
---- shadow-4.1.4.2.orig/src/grpck.c	2009-05-09 17:20:57.000000000 -0400
-+++ shadow-4.1.4.2/src/grpck.c	2009-07-26 14:30:10.923713238 -0400
-@@ -836,7 +836,7 @@
- 	/* Commit the change in the database if needed */
- 	close_files (changed);
- 
--	nscd_flush_cache ("group");
-+//	nscd_flush_cache ("group");
- 
- 	/*
- 	 * Tell the user what we did and exit.
-diff -Naur shadow-4.1.4.2.orig/src/grpconv.c shadow-4.1.4.2/src/grpconv.c
---- shadow-4.1.4.2.orig/src/grpconv.c	2008-09-06 08:51:54.000000000 -0400
-+++ shadow-4.1.4.2/src/grpconv.c	2009-07-26 14:30:10.926850479 -0400
-@@ -217,7 +217,7 @@
- 	}
- 	gr_locked = false;
- 
--	nscd_flush_cache ("group");
-+//	nscd_flush_cache ("group");
- 
- 	return 0;
- }
-diff -Naur shadow-4.1.4.2.orig/src/grpunconv.c shadow-4.1.4.2/src/grpunconv.c
---- shadow-4.1.4.2.orig/src/grpunconv.c	2008-09-06 08:51:54.000000000 -0400
-+++ shadow-4.1.4.2/src/grpunconv.c	2009-07-26 14:30:10.926850479 -0400
-@@ -186,7 +186,7 @@
- 		/* continue */
- 	}
- 
--	nscd_flush_cache ("group");
-+//	nscd_flush_cache ("group");
- 
- 	return 0;
- }
-diff -Naur shadow-4.1.4.2.orig/src/login_nopam.c shadow-4.1.4.2/src/login_nopam.c
---- shadow-4.1.4.2.orig/src/login_nopam.c	2008-09-13 14:03:51.000000000 -0400
-+++ shadow-4.1.4.2/src/login_nopam.c	2009-07-26 14:30:10.926850479 -0400
-@@ -59,7 +59,7 @@
- 
-  /* Path name of the access control file. */
- #ifndef	TABLE
--#define TABLE	"/etc/login.access"
-+#define TABLE	SYSCONFDIR"/login.access"
- #endif
- 
- /* Delimiters for fields and for lists of users, ttys or hosts. */
-diff -Naur shadow-4.1.4.2.orig/src/logoutd.c shadow-4.1.4.2/src/logoutd.c
---- shadow-4.1.4.2.orig/src/logoutd.c	2009-04-30 17:08:50.000000000 -0400
-+++ shadow-4.1.4.2/src/logoutd.c	2009-07-26 14:30:10.926850479 -0400
-@@ -50,7 +50,7 @@
- #endif
- 
- #ifndef HUP_MESG_FILE
--#define HUP_MESG_FILE "/etc/logoutd.mesg"
-+#define HUP_MESG_FILE SYSCONFDIR"/logoutd.mesg"
- #endif
- 
- /* local function prototypes */
-diff -Naur shadow-4.1.4.2.orig/src/Makefile.am shadow-4.1.4.2/src/Makefile.am
---- shadow-4.1.4.2.orig/src/Makefile.am	2009-05-09 17:10:18.000000000 -0400
-+++ shadow-4.1.4.2/src/Makefile.am	2009-07-26 14:30:10.926850479 -0400
-@@ -3,7 +3,7 @@
- 	.indent.pro
- 
- ubindir = ${prefix}/bin
--usbindir = ${prefix}/sbin
-+usbindir = ${prefix}/bin
- suidperms = 4755
- 
- INCLUDES = \
-@@ -56,7 +56,7 @@
- LDADD          = $(INTLLIBS) \
- 		 $(top_builddir)/libmisc/libmisc.a \
- 		 $(top_builddir)/lib/libshadow.la
--AM_CPPFLAGS    = -DLOCALEDIR=\"$(datadir)/locale\"
-+AM_CPPFLAGS    = -DSYSCONFDIR=\"$(sysconfdir)\" -DLOCALEDIR=\"$(datadir)/locale\" -DSG=\"`echo sg | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`\" -DVIGR=\"`echo vigr | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`\"
- 
- if ACCT_TOOLS_SETUID
- LIBPAM_SUID  = $(LIBPAM)
-@@ -106,11 +106,11 @@
- 
- install-am: all-am
- 	$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
--	ln -sf newgrp	$(DESTDIR)$(ubindir)/sg
--	ln -sf vipw	$(DESTDIR)$(usbindir)/vigr
-+	ln -sf `echo newgrp | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(ubindir)/`echo sg | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
-+	ln -sf `echo vipw | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(usbindir)/`echo vigr | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
- 	for i in $(suidbins); do \
--		chmod -f $(suidperms) $(DESTDIR)$(bindir)/$$i; \
-+		chmod -f 4755 $(DESTDIR)$(bindir)/`echo $$i | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
- 	done
- 	for i in $(suidubins); do \
--		chmod -f $(suidperms) $(DESTDIR)$(ubindir)/$$i; \
-+		chmod -f 4755 $(DESTDIR)$(ubindir)/`echo $$i | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
- 	done
-diff -Naur shadow-4.1.4.2.orig/src/Makefile.in shadow-4.1.4.2/src/Makefile.in
---- shadow-4.1.4.2.orig/src/Makefile.in	2009-07-23 21:16:00.000000000 -0400
-+++ shadow-4.1.4.2/src/Makefile.in	2009-07-26 14:30:10.926850479 -0400
-@@ -1,4 +1,4 @@
--# Makefile.in generated by automake 1.10.2 from Makefile.am.
-+# Makefile.in generated by automake 1.10.1 from Makefile.am.
- # @configure_input@
- 
- # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-@@ -382,7 +382,7 @@
- 	.indent.pro
- 
- ubindir = ${prefix}/bin
--usbindir = ${prefix}/sbin
-+usbindir = ${prefix}/bin
- suidperms = 4755
- INCLUDES = \
- 	-I${top_srcdir}/lib \
-@@ -394,7 +394,7 @@
- 		 $(top_builddir)/libmisc/libmisc.a \
- 		 $(top_builddir)/lib/libshadow.la
- 
--AM_CPPFLAGS = -DLOCALEDIR=\"$(datadir)/locale\"
-+AM_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\" -DLOCALEDIR=\"$(datadir)/locale\" -DSG=\"`echo sg | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`\" -DVIGR=\"`echo vigr | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`\"
- @ACCT_TOOLS_SETUID_FALSE@LIBPAM_SUID = 
- @ACCT_TOOLS_SETUID_TRUE@LIBPAM_SUID = $(LIBPAM)
- @USE_PAM_FALSE@LIBCRYPT_NOPAM = $(LIBCRYPT)
-@@ -442,8 +442,8 @@
- 	@for dep in $?; do \
- 	  case '$(am__configure_deps)' in \
- 	    *$$dep*) \
--	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
--	        && { if test -f $@; then exit 0; else break; fi; }; \
-+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-+		&& exit 0; \
- 	      exit 1;; \
- 	  esac; \
- 	done; \
-@@ -760,7 +760,7 @@
- 	unique=`for i in $$list; do \
- 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- 	  done | \
--	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-+	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
- 	      END { if (nonempty) { for (i in files) print i; }; }'`; \
- 	mkid -fID $$unique
- tags: TAGS
-@@ -941,13 +941,13 @@
- 
- install-am: all-am
- 	$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
--	ln -sf newgrp	$(DESTDIR)$(ubindir)/sg
--	ln -sf vipw	$(DESTDIR)$(usbindir)/vigr
-+	ln -sf `echo newgrp | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(ubindir)/`echo sg | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
-+	ln -sf `echo vipw | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(usbindir)/`echo vigr | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
- 	for i in $(suidbins); do \
--		chmod -f $(suidperms) $(DESTDIR)$(bindir)/$$i; \
-+		chmod -f 4755 $(DESTDIR)$(bindir)/`echo $$i | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
- 	done
- 	for i in $(suidubins); do \
--		chmod -f $(suidperms) $(DESTDIR)$(ubindir)/$$i; \
-+		chmod -f 4755 $(DESTDIR)$(ubindir)/`echo $$i | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
- 	done
- # Tell versions [3.59,3.63) of GNU make to not export all variables.
- # Otherwise a system limit (for SysV at least) may be exceeded.
-diff -Naur shadow-4.1.4.2.orig/src/newgrp.c shadow-4.1.4.2/src/newgrp.c
---- shadow-4.1.4.2.orig/src/newgrp.c	2009-07-23 16:38:56.000000000 -0400
-+++ shadow-4.1.4.2/src/newgrp.c	2009-07-26 14:30:10.934038324 -0400
-@@ -296,7 +296,7 @@
- 		if ((pid_t)-1 == child) {
- 			/* error in fork() */
- 			fprintf (stderr, _("%s: failure forking: %s\n"),
--				 is_newgrp ? "newgrp" : "sg", strerror (errno));
-+				 is_newgrp ? "newgrp" : SG, strerror (errno));
- #ifdef WITH_AUDIT
- 			if (group) {
- 				snprintf (audit_buf, sizeof(audit_buf),
-@@ -417,7 +417,7 @@
- 	 */
- 	Prog = Basename (argv[0]);
- 	is_newgrp = (strcmp (Prog, "newgrp") == 0);
--	OPENLOG (is_newgrp ? "newgrp" : "sg");
-+	OPENLOG (is_newgrp ? "newgrp" : SG);
- 	gid = getgid ();
- 	argc--;
- 	argv++;
-diff -Naur shadow-4.1.4.2.orig/src/newusers.c shadow-4.1.4.2/src/newusers.c
---- shadow-4.1.4.2.orig/src/newusers.c	2009-05-10 09:49:05.000000000 -0400
-+++ shadow-4.1.4.2/src/newusers.c	2009-07-26 14:30:10.934038324 -0400
-@@ -1041,8 +1041,8 @@
- 
- 	close_files ();
- 
--	nscd_flush_cache ("passwd");
--	nscd_flush_cache ("group");
-+//	nscd_flush_cache ("passwd");
-+//	nscd_flush_cache ("group");
- 
- #ifdef USE_PAM
- 	unsigned int i;
-diff -Naur shadow-4.1.4.2.orig/src/passwd.c shadow-4.1.4.2/src/passwd.c
---- shadow-4.1.4.2.orig/src/passwd.c	2009-05-22 09:32:30.000000000 -0400
-+++ shadow-4.1.4.2/src/passwd.c	2009-07-26 14:30:10.934038324 -0400
-@@ -775,7 +775,7 @@
- 	 * The program behaves differently when executed by root than when
- 	 * executed by a normal user.
- 	 */
--	amroot = (getuid () == 0);
-+	amroot = 1; //(getuid () == 0);
- 
- 	/*
- 	 * Get the program name. The program name is used as a prefix to
-@@ -1088,20 +1088,22 @@
- 		exit (E_SUCCESS);
- 	}
- #endif				/* USE_PAM */
-+/*
- 	if (setuid (0) != 0) {
- 		fputs (_("Cannot change ID to root.\n"), stderr);
- 		SYSLOG ((LOG_ERR, "can't setuid(0)"));
- 		closelog ();
- 		exit (E_NOPERM);
- 	}
-+*/
- 	if (spw_file_present ()) {
- 		update_shadow ();
- 	} else {
- 		update_noshadow ();
- 	}
- 
--	nscd_flush_cache ("passwd");
--	nscd_flush_cache ("group");
-+	//nscd_flush_cache ("passwd");
-+	//nscd_flush_cache ("group");
- 
- 	SYSLOG ((LOG_INFO, "password for '%s' changed by '%s'", name, myname));
- 	closelog ();
-diff -Naur shadow-4.1.4.2.orig/src/pwck.c shadow-4.1.4.2/src/pwck.c
---- shadow-4.1.4.2.orig/src/pwck.c	2009-06-05 18:16:58.000000000 -0400
-+++ shadow-4.1.4.2/src/pwck.c	2009-07-26 14:30:10.934038324 -0400
-@@ -704,7 +704,7 @@
- 
- 	close_files (changed);
- 
--	nscd_flush_cache ("passwd");
-+//	nscd_flush_cache ("passwd");
- 
- 	/*
- 	 * Tell the user what we did and exit.
-diff -Naur shadow-4.1.4.2.orig/src/pwconv.c shadow-4.1.4.2/src/pwconv.c
---- shadow-4.1.4.2.orig/src/pwconv.c	2009-04-30 17:39:40.000000000 -0400
-+++ shadow-4.1.4.2/src/pwconv.c	2009-07-26 14:30:10.937479067 -0400
-@@ -269,7 +269,7 @@
- 		}
- 	}
- 
--	nscd_flush_cache ("passwd");
-+//	nscd_flush_cache ("passwd");
- 
- 	return E_SUCCESS;
- }
-diff -Naur shadow-4.1.4.2.orig/src/pwunconv.c shadow-4.1.4.2/src/pwunconv.c
---- shadow-4.1.4.2.orig/src/pwunconv.c	2009-04-30 17:44:37.000000000 -0400
-+++ shadow-4.1.4.2/src/pwunconv.c	2009-07-26 14:30:10.937479067 -0400
-@@ -194,7 +194,7 @@
- 		/* continue */
- 	}
- 
--	nscd_flush_cache ("passwd");
-+//	nscd_flush_cache ("passwd");
- 
- 	return 0;
- }
-diff -Naur shadow-4.1.4.2.orig/src/suauth.c shadow-4.1.4.2/src/suauth.c
---- shadow-4.1.4.2.orig/src/suauth.c	2008-09-13 12:29:23.000000000 -0400
-+++ shadow-4.1.4.2/src/suauth.c	2009-07-26 14:30:10.937479067 -0400
-@@ -40,7 +40,7 @@
- #include "prototypes.h"
- 
- #ifndef SUAUTHFILE
--#define SUAUTHFILE "/etc/suauth"
-+#define SUAUTHFILE SYSCONFDIR"/suauth"
- #endif
- 
- #define	NOACTION	0
-diff -Naur shadow-4.1.4.2.orig/src/useradd.c shadow-4.1.4.2/src/useradd.c
---- shadow-4.1.4.2.orig/src/useradd.c	2009-06-05 18:16:58.000000000 -0400
-+++ shadow-4.1.4.2/src/useradd.c	2009-07-26 14:30:10.937479067 -0400
-@@ -67,11 +67,11 @@
- #include "shadowio.h"
- 
- #ifndef SKEL_DIR
--#define SKEL_DIR "/etc/skel"
-+#define SKEL_DIR SYSCONFDIR"/skel"
- #endif
- #ifndef USER_DEFAULTS_FILE
--#define USER_DEFAULTS_FILE "/etc/default/useradd"
--#define NEW_USER_FILE "/etc/default/nuaddXXXXXX"
-+#define USER_DEFAULTS_FILE SYSCONFDIR"/default/useradd"
-+#define NEW_USER_FILE SYSCONFDIR"/default/nuaddXXXXXX"
- #endif
- /*
-  * Needed for MkLinux DR1/2/2.1 - J.
-@@ -2027,8 +2027,8 @@
- 	selinux_update_mapping ();
- #endif
- 
--	nscd_flush_cache ("passwd");
--	nscd_flush_cache ("group");
-+//	nscd_flush_cache ("passwd");
-+//	nscd_flush_cache ("group");
- 
- 	return E_SUCCESS;
- }
-diff -Naur shadow-4.1.4.2.orig/src/userdel.c shadow-4.1.4.2/src/userdel.c
---- shadow-4.1.4.2.orig/src/userdel.c	2009-05-22 06:41:12.000000000 -0400
-+++ shadow-4.1.4.2/src/userdel.c	2009-07-26 14:30:10.937479067 -0400
-@@ -993,8 +993,8 @@
- 	user_cancel (user_name);
- 	close_files ();
- 
--	nscd_flush_cache ("passwd");
--	nscd_flush_cache ("group");
-+//	nscd_flush_cache ("passwd");
-+//	nscd_flush_cache ("group");
- 
- 	return ((0 != errors) ? E_HOMEDIR : E_SUCCESS);
- }
-diff -Naur shadow-4.1.4.2.orig/src/usermod.c shadow-4.1.4.2/src/usermod.c
---- shadow-4.1.4.2.orig/src/usermod.c	2009-05-22 06:42:53.000000000 -0400
-+++ shadow-4.1.4.2/src/usermod.c	2009-07-26 14:30:10.940818569 -0400
-@@ -1781,8 +1781,8 @@
- 	}
- 	close_files ();
- 
--	nscd_flush_cache ("passwd");
--	nscd_flush_cache ("group");
-+//	nscd_flush_cache ("passwd");
-+//	nscd_flush_cache ("group");
- 
- #ifdef WITH_SELINUX
- 	if (Zflg) {
-diff -Naur shadow-4.1.4.2.orig/src/vipw.c shadow-4.1.4.2/src/vipw.c
---- shadow-4.1.4.2.orig/src/vipw.c	2009-05-25 15:51:28.000000000 -0400
-+++ shadow-4.1.4.2/src/vipw.c	2009-07-26 14:30:10.940818569 -0400
-@@ -328,7 +328,7 @@
- 	(void) textdomain (PACKAGE);
- 
- 	progname = ((a = strrchr (*argv, '/')) ? a + 1 : *argv);
--	do_vipw = (strcmp (progname, "vigr") != 0);
-+	do_vipw = (strcmp (progname, VIGR) != 0);
- 
- 	OPENLOG (do_vipw ? "vipw" : "vigr");
- 
-@@ -408,8 +408,8 @@
- #endif
- 	}
- 
--	nscd_flush_cache ("passwd");
--	nscd_flush_cache ("group");
-+//	nscd_flush_cache ("passwd");
-+//	nscd_flush_cache ("group");
- 
- 	return E_SUCCESS;
- }
Index: tches/sysvinit-2.86-fixes-1.patch
===================================================================
--- patches/sysvinit-2.86-fixes-1.patch	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,705 +1,0 @@
-Submitted By: Jim Gifford (jim at cross-lfs dot org)
-Date: 01-07-2008
-Initial Package Version: 2.86
-Origin: Various
-Upstream Status: Unknown
-Description: Fixes to Major issues in Sysvinit -- listed Below
-	IPV6 Displayed Incorrectly
-	On 64bit which have 32bit multilib support, the utmp struct is the same
-	Fix bug where proc names are truncated
-	Fixed support for POSIX capabilite
-	All halt/reboot to handle being called by login correctly
-	Preserve waiting state across re-exec
-	Allow failed console opens some time to resolve themselves
-	
-	New:
-	Added kexec support
-
-diff -Naur sysvinit-2.86.orig/man/halt.8 sysvinit-2.86/man/halt.8
---- sysvinit-2.86.orig/man/halt.8	2001-11-21 13:11:22.000000000 -0800
-+++ sysvinit-2.86/man/halt.8	2009-01-07 11:07:06.000000000 -0800
-@@ -23,6 +23,7 @@
- .RB [ \-d ]
- .RB [ \-f ]
- .RB [ \-i ]
-+.RB [ \-k ]
- .br
- .B /sbin/poweroff
- .RB [ \-n ]
-@@ -65,6 +66,8 @@
- .IP \fB\-p\fP
- When halting the system, do a poweroff. This is the default when halt is
- called as \fBpoweroff\fP.
-+.IP \fB\-k\fP
-+Try to reboot using \fBkexec\fP, if kernel supports it.
- .\"}}}
- .\"{{{  Diagnostics
- .SH DIAGNOSTICS
-diff -Naur sysvinit-2.86.orig/man/init.8 sysvinit-2.86/man/init.8
---- sysvinit-2.86.orig/man/init.8	2004-07-29 04:21:31.000000000 -0700
-+++ sysvinit-2.86/man/init.8	2009-01-07 11:23:45.000000000 -0800
-@@ -64,7 +64,7 @@
- .PP
- Runlevel \fBS\fP or \fBs\fP bring the system to single user mode
- and do not require an \fB/etc/inittab\fP file.  In single user mode,
--\fB/sbin/sulogin\fP is invoked on \fB/dev/console\fP.
-+a root shell is opened on \fB/dev/console\fP.
- .PP
- When entering single user mode, \fBinit\fP initializes the consoles
- \fBstty\fP settings to sane values. Clocal mode is set. Hardware
-diff -Naur sysvinit-2.86.orig/man/last.1 sysvinit-2.86/man/last.1
---- sysvinit-2.86.orig/man/last.1	2004-07-30 04:39:18.000000000 -0700
-+++ sysvinit-2.86/man/last.1	2009-01-07 11:23:45.000000000 -0800
-@@ -60,6 +60,8 @@
- useful, e.g., to determine easily who was logged in at a particular
- time -- specify that time with \fB\-t\fP and look for "still logged
- in".
-+.IP "\fB\-f\fP \fIfile\fP"
-+Specifies a file to search other than \fB/var/log/wtmp\fP.
- .IP \fB\-R\fP
- Suppresses the display of the hostname field.
- .IP \fB\-a\fP
-diff -Naur sysvinit-2.86.orig/man/pidof.8 sysvinit-2.86/man/pidof.8
---- sysvinit-2.86.orig/man/pidof.8	1998-09-02 05:49:33.000000000 -0700
-+++ sysvinit-2.86/man/pidof.8	2009-01-07 11:22:28.000000000 -0800
-@@ -4,6 +4,7 @@
- .SH SYNOPSIS
- .B pidof
- .RB [ \-s ]
-+.RB [ \-c ]
- .RB [ \-x ]
- .RB [ \-o
- .IR omitpid ]
-@@ -24,6 +25,10 @@
- .SH OPTIONS
- .IP -s
- Single shot - this instructs the program to only return one \fIpid\fP.
-+.IP -c
-+Only return process ids that are running with the same root directory.
-+This option is ignored for non-root users, as they will be unable to check
-+the current root directory of processes they do not own.
- .IP -x
- Scripts too - this causes the program to also return process id's of
- shells running the named scripts.
-diff -Naur sysvinit-2.86.orig/man/shutdown.8 sysvinit-2.86/man/shutdown.8
---- sysvinit-2.86.orig/man/shutdown.8	2004-06-09 05:47:45.000000000 -0700
-+++ sysvinit-2.86/man/shutdown.8	2009-01-07 11:08:22.000000000 -0800
-@@ -9,11 +9,11 @@
- .\"{{{  Synopsis
- .SH SYNOPSIS
- .B /sbin/shutdown
-+.RB [ \-akrhPHfFnc ]
- .RB [ \-t
- .IR sec ]
--.RB [ \-arkhncfFHP ]
- .I time
--.RI [ warning-message ]
-+.RI [ "warning message" ]
- .\"}}}
- .\"{{{  Description
- .SH DESCRIPTION
-@@ -39,11 +39,6 @@
- .IP "\fB\-a\fP
- Use \fB/etc/shutdown.allow\fP.
- .\"}}}
--.\"{{{  -t sec
--.IP "\fB\-t\fP \fIsec\fP"
--Tell \fBinit\fP(8) to wait \fIsec\fP seconds between sending processes the 
--warning and the kill signal, before changing to another runlevel.
--.\"}}}
- .\"{{{  -k
- .IP \fB\-k\fP
- Don't really shutdown; only send the warning messages to everybody.
-@@ -56,20 +51,14 @@
- .IP \fB\-h\fP
- Halt or poweroff after shutdown.
- .\"}}}
--.\"{{{  -H
--.IP \fB\-H\fP
--Halt action is to halt or drop into boot monitor on systems that
--support it.
--.\"}}}
- .\"{{{  -P
- .IP \fB\-P\fP
- Halt action is to turn off the power.
- .\"}}}
--.\"{{{  -n
--.IP \fB\-n\fP
--[DEPRECATED] Don't call \fBinit\fP(8) to do the shutdown but do it ourself.
--The use of this option is discouraged, and its results are not always what
--you'd expect.
-+.\"{{{  -H
-+.IP \fB\-H\fP
-+Halt action is to halt or drop into boot monitor on systems that
-+support it.
- .\"}}}
- .\"{{{  -f
- .IP \fB\-f\fP
-@@ -79,18 +68,29 @@
- .IP \fB\-F\fP
- Force fsck on reboot.
- .\"}}}
-+.\"{{{  -n
-+.IP \fB\-n\fP
-+[DEPRECATED] Don't call \fBinit\fP(8) to do the shutdown but do it ourself.
-+The use of this option is discouraged, and its results are not always what
-+you'd expect.
-+.\"}}}
- .\"{{{  -c
- .IP \fB\-c\fP
- Cancel an already running shutdown. With this option it is of course
- not possible to give the \fBtime\fP argument, but you can enter a
- explanatory message on the command line that will be sent to all users.
- .\"}}}
-+.\"{{{  -t sec
-+.IP "\fB\-t\fP \fIsec\fP"
-+Tell \fBinit\fP(8) to wait \fIsec\fP seconds between sending processes the 
-+warning and the kill signal, before changing to another runlevel.
-+.\"}}}
- .\"{{{  time
- .IP \fItime\fP
- When to shutdown.
- .\"}}}
- .\"{{{  warning-message
--.IP \fIwarning-message\fP
-+.IP "\fIwarning message\fP"
- Message to send to all users.
- .\"}}}
- .PP
-diff -Naur sysvinit-2.86.orig/man/sulogin.8 sysvinit-2.86/man/sulogin.8
---- sysvinit-2.86.orig/man/sulogin.8	2004-06-09 05:47:45.000000000 -0700
-+++ sysvinit-2.86/man/sulogin.8	2009-01-07 11:23:45.000000000 -0800
-@@ -9,7 +9,7 @@
- .RB [ " tty-device " ]
- .SH DESCRIPTION
- .I sulogin
--is invoked by \fBinit(8)\fP when the system goes into single user mode
-+can be invoked by \fBinit(8)\fP when the system goes into single user mode
- (this is done through an entry in \fIinittab(5)\fP). \fBInit\fP also
- tries to execute \fIsulogin\fP when it is passed the \fB-b\fP flag
- from the bootmonitor (eg, LILO).
-diff -Naur sysvinit-2.86.orig/src/bootlogd.c sysvinit-2.86/src/bootlogd.c
---- sysvinit-2.86.orig/src/bootlogd.c	2004-06-09 05:47:45.000000000 -0700
-+++ sysvinit-2.86/src/bootlogd.c	2009-01-07 11:34:12.000000000 -0800
-@@ -609,7 +609,7 @@
- 		else
- 			todo = endptr - outptr;
- 		if (fp && todo)
--			writelog(fp, outptr, todo);
-+			writelog(fp, (unsigned char *)outptr, todo);
- 	}
- 
- 	if (fp) {
-diff -Naur sysvinit-2.86.orig/src/halt.c sysvinit-2.86/src/halt.c
---- sysvinit-2.86.orig/src/halt.c	2004-07-30 05:16:18.000000000 -0700
-+++ sysvinit-2.86/src/halt.c	2009-01-07 11:25:19.000000000 -0800
-@@ -8,7 +8,7 @@
-  *		execute an "shutdown -r". This is for compatibility with
-  *		sysvinit 2.4.
-  *
-- * Usage:	halt [-n] [-w] [-d] [-f] [-h] [-i] [-p]
-+ * Usage:	halt [-n] [-w] [-d] [-f] [-h] [-i] [-p] [-k]
-  *		-n: don't sync before halting the system
-  *		-w: only write a wtmp reboot record and exit.
-  *		-d: don't write a wtmp record.
-@@ -16,6 +16,7 @@
-  *		-h: put harddisks in standby mode
-  *		-i: shut down all network interfaces.
-  *		-p: power down the system (if possible, otherwise halt).
-+ *		-k: reboot the system using kexec.
-  *
-  *		Reboot and halt are both this program. Reboot
-  *		is just a link to halt. Invoking the program
-@@ -64,8 +65,10 @@
-  */
- void usage(void)
- {
--	fprintf(stderr, "usage: %s [-n] [-w] [-d] [-f] [-h] [-i]%s\n",
--		progname, strcmp(progname, "halt") ? "" : " [-p]");
-+	fprintf(stderr, "usage: %s [-n] [-w] [-d] [-f] [-h] [-i]%s%s\n",
-+		progname,
-+		strcmp(progname, "halt") ? "" : " [-p]",
-+		strcmp(progname, "reboot") ? "" : " [-k]");
- 	fprintf(stderr, "\t-n: don't sync before halting the system\n");
- 	fprintf(stderr, "\t-w: only write a wtmp reboot record and exit.\n");
- 	fprintf(stderr, "\t-d: don't write a wtmp record.\n");
-@@ -74,6 +77,8 @@
- 	fprintf(stderr, "\t-i: shut down all network interfaces.\n");
- 	if (!strcmp(progname, "halt"))
- 		fprintf(stderr, "\t-p: power down the system (if possible, otherwise halt).\n");
-+	if (!strcmp(progname, "reboot"))
-+		fprintf(stderr, "\t-k: reboot the system using kexec.\n");
- 	exit(1);
- }
- 
-@@ -172,12 +177,14 @@
- 	int do_ifdown = 0;
- 	int do_hddown = 0;
- 	int do_poweroff = 0;
-+	int do_kexec = 0;
- 	int c;
- 	char *tm = NULL;
- 
- 	/*
- 	 *	Find out who we are
- 	 */
-+	if (argv[0][0] == '-') argv[0]++;
- 	if ((progname = strrchr(argv[0], '/')) != NULL)
- 		progname++;
- 	else
-@@ -189,7 +196,7 @@
- 	/*
- 	 *	Get flags
- 	 */
--	while((c = getopt(argc, argv, ":ihdfnpwt:")) != EOF) {
-+	while((c = getopt(argc, argv, ":ihdfnpwkt:")) != EOF) {
- 		switch(c) {
- 			case 'n':
- 				do_sync = 0;
-@@ -213,6 +220,9 @@
- 			case 'p':
- 				do_poweroff = 1;
- 				break;
-+			case 'k':
-+				do_kexec = 1;
-+				break;
- 			case 't':
- 				tm = optarg;
- 				break;
-@@ -230,12 +240,37 @@
- 	(void)chdir("/");
- 
- 	if (!do_hard && !do_nothing) {
-+		c = get_runlevel();
-+
-+		/*
-+		 *	 We can't reboot using kexec through this path.
-+		 */
-+		if (c != '6' && do_reboot && do_kexec) {
-+			fprintf(stderr, "ERROR: using -k at this"
-+				" runlevel requires also -f\n"
-+				"  (You probably want instead to reboot"
-+				" normally and let your reboot\n"
-+				"   script, usually /etc/init.d/reboot,"
-+				" specify -k)\n");
-+			exit(1);
-+		}
-+		
- 		/*
- 		 *	See if we are in runlevel 0 or 6.
- 		 */
--		c = get_runlevel();
--		if (c != '0' && c != '6')
--			do_shutdown(do_reboot ? "-r" : "-h", tm);
-+               if (c != '0' && c != '6') {
-+                       char *file;
-+
-+                       if (do_poweroff) {
-+                               file = strdup("/poweroff");
-+                       } else {
-+                               file = strdup("/halt");
-+                       }
-+                       close(open(file, O_CREAT|O_RDWR, 0644));
-+                       free(file);
-+
-+                        do_shutdown(do_reboot ? "-r" : "-h", tm);
-+               }
- 	}
- 
- 	/*
-@@ -263,6 +298,16 @@
- 	if (do_nothing) exit(0);
- 
- 	if (do_reboot) {
-+		/*
-+		 *	kexec or reboot
-+		 */
-+		if (do_kexec) {
-+			init_reboot(BMAGIC_KEXEC);
-+		}
-+
-+		/* 
-+		 *	Fall through if failed
-+		 */
- 		init_reboot(BMAGIC_REBOOT);
- 	} else {
- 		/*
-diff -Naur sysvinit-2.86.orig/src/init.c sysvinit-2.86/src/init.c
---- sysvinit-2.86.orig/src/init.c	2004-07-30 05:16:20.000000000 -0700
-+++ sysvinit-2.86/src/init.c	2009-01-07 14:02:51.000000000 -0800
-@@ -185,6 +185,7 @@
- 	{"RU",RUNNING},
- 	{"DE",DEMAND},
- 	{"XD",XECUTED},
-+	{"WT",WAITING},
- 	{NULL,0}
- };
- 
-@@ -466,7 +467,7 @@
- 
- 	if (maxproclen > 2) {
- 		memset(argv0, 0, maxproclen);
--		strncpy(argv0, buf, maxproclen - 2);
-+		strncpy(argv0, buf, maxproclen - 1);
- 	}
- 
- 	return len;
-@@ -527,8 +528,10 @@
- 	/*
- 	 *	Retry the open five times.
- 	 */
--	for(f = 0; f < 5; f++)
-+	for(f = 0; f < 5; f++) {
- 		if ((fd = open(console_dev, m)) >= 0) break;
-+		usleep(100);
-+	}
- 
- 	if (fd < 0) return fd;
- 
-@@ -949,11 +952,30 @@
-   		sigprocmask(SIG_SETMASK, &omask, NULL);
- 
- 		/*
-+		 * Update utmp/wtmp file prior to starting
-+		 * any child.  This MUST be done right here in
-+		 * the child process in order to prevent a race
-+		 * condition that occurs when the child
-+		 * process' time slice executes before the
-+		 * parent (can and does happen in a uniprocessor
-+		 * environment).  If the child is a getty and
-+		 * the race condition happens, then init's utmp
-+		 * update will happen AFTER the getty runs
-+		 * and expects utmp to be updated already!
-+		 *
-+		 * Do NOT log if process field starts with '+'
-+		 * FIXME: that's for compatibility with *very*
-+		 * old getties - probably it can be taken out.
-+		 */
-+		if (ch->action == RESPAWN && ch->process[0] != '+')
-+			write_utmp_wtmp("", ch->id, getpid(), INIT_PROCESS, "");
-+
-+		/*
- 		 *	In sysinit, boot, bootwait or single user mode:
- 		 *	for any wait-type subprocess we _force_ the console
- 		 *	to be its controlling tty.
- 		 */
--  		if (strchr("*#sS", runlevel) && ch->flags & WAITING) {
-+  		if ((strchr("*#sS", runlevel) || (ch->id[0] == 'l' && isdigit(ch->id[1]))) && ch->flags & WAITING) {
- 			/*
- 			 *	We fork once extra. This is so that we can
- 			 *	wait and change the process group and session
-@@ -1088,15 +1110,7 @@
- 		case ONDEMAND:
- 		case RESPAWN:
-   			ch->flags |= RUNNING;
--  			if (spawn(ch, &(ch->pid)) < 0) break;
--			/*
--			 *	Do NOT log if process field starts with '+'
--			 *	FIXME: that's for compatibility with *very*
--			 *	old getties - probably it can be taken out.
--			 */
--  			if (ch->process[0] != '+')
--				write_utmp_wtmp("", ch->id, ch->pid,
--					INIT_PROCESS, "");
-+  			(void)spawn(ch, &(ch->pid));
-   			break;
- 	}
- }
-@@ -1373,14 +1387,14 @@
- 		case 0: /* Send TERM signal */
- 			if (talk)
- 				initlog(L_CO,
--					"Sending processes the TERM signal");
-+					"Sending processes started by init the TERM signal");
- 			kill(-(ch->pid), SIGTERM);
- 			foundOne = 1;
- 			break;
- 		case 1: /* Send KILL signal and collect status */
- 			if (talk)
- 				initlog(L_CO,
--					"Sending processes the KILL signal");
-+					"Sending processes started by init the KILL signal");
- 			kill(-(ch->pid), SIGKILL);
- 			break;
- 	}
-@@ -1884,7 +1898,7 @@
- 	 *	The existing init process execs a new init binary.
- 	 */
- 	env = init_buildenv(0);
--	execl(myname, myname, "--init", NULL, env);
-+	execle(myname, myname, "--init", NULL, env);
- 
- 	/*
- 	 *	We shouldn't be here, something failed. 
-diff -Naur sysvinit-2.86.orig/src/killall5.c sysvinit-2.86/src/killall5.c
---- sysvinit-2.86.orig/src/killall5.c	2004-07-30 05:16:23.000000000 -0700
-+++ sysvinit-2.86/src/killall5.c	2009-01-07 14:10:41.000000000 -0800
-@@ -51,9 +51,8 @@
- 	char *argv0base;	/* `basename argv[1]`		  */
- 	char *argv1;		/* Name as found out from argv[1] */
- 	char *argv1base;	/* `basename argv[1]`		  */
-+	char *pathname;		/* full path to executable	  */
- 	char *statname;		/* the statname without braces    */
--	ino_t ino;		/* Inode number			  */
--	dev_t dev;		/* Device it is on		  */
- 	pid_t pid;		/* Process ID.			  */
- 	int sid;		/* Session ID.			  */
- 	int kernel;		/* Kernel thread or zombie.	  */
-@@ -172,7 +171,6 @@
- 	FILE		*fp;
- 	PROC		*p, *n;
- 	struct dirent	*d;
--	struct stat	st;
- 	char		path[256];
- 	char		buf[256];
- 	char		*s, *q;
-@@ -191,6 +189,8 @@
- 		n = p->next;
- 		if (p->argv0) free(p->argv0);
- 		if (p->argv1) free(p->argv1);
-+		if (p->pathname) free(p->pathname);
-+		if (p->statname) free(p->statname);
- 		free(p);
- 	}
- 	plist = NULL;
-@@ -248,6 +248,7 @@
- 				p->sid = 0;
- 				nsyslog(LOG_ERR, "can't read sid from %s\n",
- 					path);
-+				if (p->statname) free(p->statname);
- 				free(p);
- 				continue;
- 			}
-@@ -300,15 +301,18 @@
- 
- 		} else {
- 			/* Process disappeared.. */
-+			if (p->statname) free(p->statname);
- 			free(p);
- 			continue;
- 		}
- 
- 		/* Try to stat the executable. */
- 		snprintf(path, sizeof(path), "/proc/%s/exe", d->d_name);
--		if (stat(path, &st) == 0) {
--			p->dev = st.st_dev;
--			p->ino = st.st_ino;
-+		p->pathname = (char *)xmalloc(PATH_MAX);
-+		if (readlink(path, p->pathname, PATH_MAX) == -1) {
-+			p->pathname = NULL;
-+		} else {
-+			p->pathname[PATH_MAX-1] = '\0';
- 		}
- 
- 		/* Link it into the list. */
-@@ -372,14 +376,14 @@
- {
- 	PROC		*p;
- 	PIDQ_HEAD	*q;
--	struct stat	st;
- 	char		*s;
- 	int		dostat = 0;
- 	int		foundone = 0;
- 	int		ok = 0;
-+	char		*real_path;
- 
- 	/* Try to stat the executable. */
--	if (prog[0] == '/' && stat(prog, &st) == 0) dostat++;
-+	if (prog[0] == '/' && (real_path = canonicalize_file_name(prog))) dostat++;
- 
- 	/* Get basename of program. */
- 	if ((s = strrchr(prog, '/')) == NULL)
-@@ -390,10 +394,10 @@
- 	q = (PIDQ_HEAD *)xmalloc(sizeof(PIDQ_HEAD));
- 	q = init_pid_q(q);
- 
--	/* First try to find a match based on dev/ino pair. */
-+	/* First try to find a match based on pathname. */
- 	if (dostat) {
- 		for (p = plist; p; p = p->next) {
--			if (p->dev == st.st_dev && p->ino == st.st_ino) {
-+			if (p->pathname && strcmp(real_path, p->pathname) == 0) {
- 				add_pid_to_q(q, p);
- 				foundone++;
- 			}
-@@ -408,11 +412,14 @@
- 		ok += (p->argv0 && strcmp(p->argv0, prog) == 0);
- 		ok += (p->argv0 && strcmp(p->argv0base, s) == 0);
- 
-+		if (prog[0] == '/' && p->pathname && strcmp(prog, p->pathname))
-+			ok = 0;
-+		
- 		/* For scripts, compare argv[1] as well. */
- 		if (scripts_too && p->argv1 &&
- 		    !strncmp(p->statname, p->argv1base, STATNAMELEN)) {
- 			ok += (strcmp(p->argv1, prog) == 0);
--			ok += (strcmp(p->argv1base, s) == 0);
-+			if (prog[0] != '/') ok += (strcmp(p->argv1base, s) == 0);
- 		}
- 
- 		/*
-@@ -476,16 +483,22 @@
- 	int		f;
- 	int		first = 1;
- 	int		i, oind, opt, flags = 0;
-+	int		chroot_check = 0;
-+	struct stat	st;
-+	char		tmp[512];
- 
- 	for (oind = PIDOF_OMITSZ-1; oind > 0; oind--)
- 		opid[oind] = 0;
- 	opterr = 0;
- 
--	while ((opt = getopt(argc,argv,"ho:sx")) != EOF) switch (opt) {
-+	while ((opt = getopt(argc,argv,"hco:sx")) != EOF) switch (opt) {
- 		case '?':
- 			nsyslog(LOG_ERR,"invalid options on command line!\n");
- 			closelog();
- 			exit(1);
-+		case 'c':
-+			if (geteuid() == 0) chroot_check = 1;
-+			break;
- 		case 'o':
- 			if (oind >= PIDOF_OMITSZ -1) {
- 				nsyslog(LOG_ERR,"omit pid buffer size %d "
-@@ -518,6 +531,16 @@
- 	argc -= optind;
- 	argv += optind;
- 
-+	/* Check if we are in a chroot */
-+	if (chroot_check) {
-+		snprintf(tmp, 512, "/proc/%d/root", getpid());
-+		if (stat(tmp, &st) < 0) {
-+			nsyslog(LOG_ERR, "stat failed for %s!\n", tmp);
-+			closelog();
-+			exit(1);
-+		}
-+	}
-+
- 	/* Print out process-ID's one by one. */
- 	readproc();
- 	for(f = 0; f < argc; f++) {
-@@ -541,6 +564,16 @@
- 					else
- 						spid = 1;
- 				}
-+				if (chroot_check) {
-+					struct stat st2;
-+					snprintf(tmp, 512, "/proc/%d/root",
-+						 p->pid);
-+					if (stat(tmp, &st2) < 0 ||
-+					    st.st_dev != st2.st_dev ||
-+					    st.st_ino != st2.st_ino) {
-+						continue;
-+					}
-+				}
- 				if (!first)
- 					printf(" ");
- 				printf("%d", p->pid);
-diff -Naur sysvinit-2.86.orig/src/last.c sysvinit-2.86/src/last.c
---- sysvinit-2.86.orig/src/last.c	2004-07-30 05:16:26.000000000 -0700
-+++ sysvinit-2.86/src/last.c	2009-01-07 11:18:38.000000000 -0800
-@@ -307,14 +307,15 @@
- 	struct sockaddr		*sa;
- 	int			salen, flags;
- 	unsigned int		topnibble;
-+	unsigned int		azero = 0, sitelocal = 0;
- 	int			mapped = 0;
- 
- 	flags = useip ? NI_NUMERICHOST : 0;
- 
- 	/*
- 	 *	IPv4 or IPv6 ? We use 2 heuristics:
--	 *	1. Current IPv6 range uses 2000-3fff. Outside of
--	 *	   that is illegal and must be IPv4.
-+	 *	1. Current IPv6 range uses 2000-3fff or fec0-feff.
-+	 *	   Outside of that is illegal and must be IPv4.
- 	 *	2. If last 3 bytes are 0, must be IPv4
- 	 *	3. If IPv6 in IPv4, handle as IPv4
- 	 *
-@@ -323,7 +324,11 @@
- 	if (a[0] == 0 && a[1] == 0 && a[2] == htonl (0xffff))
- 		mapped = 1;
- 	topnibble = ntohl((unsigned int)a[0]) >> 28;
--	if (topnibble < 2 || topnibble > 3 || mapped ||
-+
-+	azero = ntohl((unsigned int)a[0]) >> 16;
-+	sitelocal = (azero >= 0xfec0 && azero <= 0xfeff) ? 1 : 0;
-+	
-+	if (((topnibble < 2 || topnibble > 3) && (!sitelocal)) || mapped ||
- 	    (a[1] == 0 && a[2] == 0 && a[3] == 0)) {
- 		/* IPv4 */
- 		sin.sin_family = AF_INET;
-diff -Naur sysvinit-2.86.orig/src/reboot.h sysvinit-2.86/src/reboot.h
---- sysvinit-2.86.orig/src/reboot.h	2004-06-09 05:47:45.000000000 -0700
-+++ sysvinit-2.86/src/reboot.h	2009-01-07 11:07:06.000000000 -0800
-@@ -32,5 +32,8 @@
- #  define BMAGIC_POWEROFF	BMAGIC_HALT
- #endif
- 
-+/* for kexec support */
-+#define BMAGIC_KEXEC  0x45584543
-+
- #define init_reboot(magic)	reboot(magic)
- 
-diff -Naur sysvinit-2.86.orig/src/shutdown.c sysvinit-2.86/src/shutdown.c
---- sysvinit-2.86.orig/src/shutdown.c	2004-07-30 04:59:04.000000000 -0700
-+++ sysvinit-2.86/src/shutdown.c	2009-01-07 11:09:43.000000000 -0800
-@@ -102,7 +102,7 @@
- void usage(void)
- {
- 	fprintf(stderr,
--	"Usage:\t  shutdown [-akrhHPfnc] [-t secs] time [warning message]\n"
-+	"Usage:\t  shutdown [-akrhPHfFnc] [-t sec] time [warning message]\n"
- 	"\t\t  -a:      use /etc/shutdown.allow\n"
- 	"\t\t  -k:      don't really shutdown, only warn.\n"
- 	"\t\t  -r:      reboot after shutdown.\n"
-@@ -460,6 +460,7 @@
- 
- 	if (getuid() != 0) {
-   		fprintf(stderr, "shutdown: you must be root to do that!\n");
-+		usage();
-   		exit(1);
- 	}
- 	strcpy(down_level, "1");
-diff -Naur sysvinit-2.86.orig/src/utmp.c sysvinit-2.86/src/utmp.c
---- sysvinit-2.86.orig/src/utmp.c	1999-06-09 04:11:33.000000000 -0700
-+++ sysvinit-2.86/src/utmp.c	2009-01-07 11:11:29.000000000 -0800
-@@ -47,6 +47,7 @@
- 	int fd;
- 	struct utmp utmp;
- 	struct utsname uname_buf;
-+	struct timeval tv;
- 
- 	/*
- 	 *	Try to open the wtmp file. Note that we even try
-@@ -76,7 +77,9 @@
- 	 */
- 	memset(&utmp, 0, sizeof(utmp));
- #if defined(__GLIBC__)
--	gettimeofday(&utmp.ut_tv, NULL);
-+	gettimeofday(&tv, NULL);
-+	utmp.ut_tv.tv_sec = tv.tv_sec;
-+	utmp.ut_tv.tv_usec = tv.tv_usec;
- #else
- 	time(&utmp.ut_time);
- #endif
-@@ -113,6 +116,7 @@
- 	struct utmp utmp;
- 	struct utmp tmp;
- 	struct utmp *utmptr;
-+	struct timeval tv;
- 
- 	/*
- 	 *	Can't do much if UTMP_FILE is not present.
-@@ -144,7 +148,9 @@
- 	utmp.ut_pid = pid;
- 	strncpy(utmp.ut_id, id, sizeof(utmp.ut_id));
- #if defined(__GLIBC__)
--	gettimeofday(&utmp.ut_tv, NULL);
-+	gettimeofday(&tv, NULL);
-+	utmp.ut_tv.tv_sec = tv.tv_sec;
-+	utmp.ut_tv.tv_usec = tv.tv_usec;
- #else
- 	time(&utmp.ut_time);
- #endif
Index: tches/tar-1.22-man_page-1.patch
===================================================================
--- patches/tar-1.22-man_page-1.patch	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,566 +1,0 @@
-Submitted By: Jim Gifford (jim at cross-lfs dot org)
-Date: 2009-03-06
-Initial Package Version: 1.22
-Origin: Debian
-Upstream Status: N/A
-Description: This Patch adds and man-page to TAR. This has been
-	     added as per numerous requests.
-
-diff -Naur tar-1.22.orig/doc/Makefile.am tar-1.22/doc/Makefile.am
---- tar-1.22.orig/doc/Makefile.am	2008-04-14 05:03:12.000000000 -0700
-+++ tar-1.22/doc/Makefile.am	2009-03-05 20:50:20.245637658 -0800
-@@ -17,6 +17,8 @@
- ## along with this program; if not, write to the Free Software Foundation,
- ## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- 
-+man_MANS = tar.1
-+
- info_TEXINFOS = tar.texi
- tar_TEXINFOS = \
-  dumpdir.texi\
-diff -Naur tar-1.22.orig/doc/Makefile.in tar-1.22/doc/Makefile.in
---- tar-1.22.orig/doc/Makefile.in	2009-03-04 23:05:25.000000000 -0800
-+++ tar-1.22/doc/Makefile.in	2009-03-05 20:50:20.245637658 -0800
-@@ -146,13 +146,16 @@
- MAKEINFOHTML = $(MAKEINFO) --html
- AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
- DVIPS = dvips
--am__installdirs = "$(DESTDIR)$(infodir)"
-+am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"
- am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
- am__vpath_adj = case $$p in \
-     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-     *) f=$$p;; \
-   esac;
- am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-+man1dir = $(mandir)/man1
-+NROFF = nroff
-+MANS = $(man_MANS)
- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
- ACLOCAL = @ACLOCAL@
- ALLOCA = @ALLOCA@
-@@ -645,6 +648,7 @@
- target_alias = @target_alias@
- top_builddir = @top_builddir@
- top_srcdir = @top_srcdir@
-+man_MANS = tar.1
- info_TEXINFOS = tar.texi
- tar_TEXINFOS = \
-  dumpdir.texi\
-@@ -858,6 +862,51 @@
- 	  echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
- 	  rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
- 	done
-+install-man1: $(man1_MANS) $(man_MANS)
-+	@$(NORMAL_INSTALL)
-+	test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
-+	@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
-+	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
-+	for i in $$l2; do \
-+	  case "$$i" in \
-+	    *.1*) list="$$list $$i" ;; \
-+	  esac; \
-+	done; \
-+	for i in $$list; do \
-+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-+	  else file=$$i; fi; \
-+	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
-+	  case "$$ext" in \
-+	    1*) ;; \
-+	    *) ext='1' ;; \
-+	  esac; \
-+	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
-+	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
-+	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
-+	  echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
-+	  $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
-+	done
-+uninstall-man1:
-+	@$(NORMAL_UNINSTALL)
-+	@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
-+	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
-+	for i in $$l2; do \
-+	  case "$$i" in \
-+	    *.1*) list="$$list $$i" ;; \
-+	  esac; \
-+	done; \
-+	for i in $$list; do \
-+	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
-+	  case "$$ext" in \
-+	    1*) ;; \
-+	    *) ext='1' ;; \
-+	  esac; \
-+	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
-+	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
-+	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
-+	  echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
-+	  rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
-+	done
- tags: TAGS
- TAGS:
- 
-@@ -896,9 +945,9 @@
- 	  dist-info
- check-am: all-am
- check: check-am
--all-am: Makefile $(INFO_DEPS)
-+all-am: Makefile $(INFO_DEPS) $(MANS)
- installdirs:
--	for dir in "$(DESTDIR)$(infodir)"; do \
-+	for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \
- 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- 	done
- install: install-am
-@@ -945,7 +994,7 @@
- 
- info-am: $(INFO_DEPS)
- 
--install-data-am: install-info-am
-+install-data-am: install-info-am install-man
- 
- install-dvi: install-dvi-am
- 
-@@ -1010,7 +1059,7 @@
- 	    install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
- 	  done; \
- 	else : ; fi
--install-man:
-+install-man: install-man1
- 
- install-pdf: install-pdf-am
- 
-@@ -1054,7 +1103,9 @@
- ps-am: $(PSS)
- 
- uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \
--	uninstall-pdf-am uninstall-ps-am
-+	uninstall-man uninstall-pdf-am uninstall-ps-am
-+
-+uninstall-man: uninstall-man1
- 
- .MAKE: install-am install-strip
- 
-@@ -1063,14 +1114,15 @@
- 	html-am info info-am install install-am install-data \
- 	install-data-am install-dvi install-dvi-am install-exec \
- 	install-exec-am install-html install-html-am install-info \
--	install-info-am install-man install-pdf install-pdf-am \
--	install-ps install-ps-am install-strip installcheck \
--	installcheck-am installdirs maintainer-clean \
-+	install-info-am install-man install-man1 install-pdf \
-+	install-pdf-am install-ps install-ps-am install-strip \
-+	installcheck installcheck-am installdirs maintainer-clean \
- 	maintainer-clean-aminfo maintainer-clean-generic \
- 	maintainer-clean-vti mostlyclean mostlyclean-aminfo \
- 	mostlyclean-generic mostlyclean-vti pdf pdf-am ps ps-am \
- 	uninstall uninstall-am uninstall-dvi-am uninstall-html-am \
--	uninstall-info-am uninstall-pdf-am uninstall-ps-am
-+	uninstall-info-am uninstall-man uninstall-man1 \
-+	uninstall-pdf-am uninstall-ps-am
- 
- 
- header.texi: $(top_srcdir)/src/tar.h
-diff -Naur tar-1.22.orig/doc/tar.1 tar-1.22/doc/tar.1
---- tar-1.22.orig/doc/tar.1	1969-12-31 16:00:00.000000000 -0800
-+++ tar-1.22/doc/tar.1	2009-03-05 20:52:59.235825673 -0800
-@@ -0,0 +1,400 @@
-+.\" @(#)tar.1 1.11.1 93/19/22 PJV;
-+.TH TAR 1 "29 Aug 2007"
-+.SH NAME
-+tar \- The GNU version of the tar archiving utility
-+.SH SYNOPSIS
-+.B tar
-+[
-+.B \-
-+]
-+.B A \-\-catenate \-\-concatenate \||\| c \-\-create \||\| d \-\-diff \-\-compare \||\| \-\-delete \||\| r \-\-append \||\| t \-\-list \||\| u \-\-update \||\| x \-\-extract \-\-get 
-+.I [ options ]
-+.I pathname [ pathname ... ] 
-+.SH DESCRIPTION
-+.LP
-+This manual page documents the GNU version of
-+.B tar
-+, an archiving program designed to store and extract files from 
-+an archive file known as a 
-+.IR tarfile.
-+A 
-+.IR tarfile 
-+may be made on a tape drive, however, it is also common
-+to write a
-+.IR tarfile
-+to a normal file. 
-+The first argument to 
-+.B tar
-+must be one of the options:
-+.BR Acdrtux ,
-+followed by any optional functions.
-+The final arguments to 
-+.B tar
-+are the names of the files or directories which should be archived. The use
-+of a directory name always implies that the subdirectories below should be
-+included in the archive.
-+.SH EXAMPLES
-+.TP
-+.B tar \-xvvf foo.tar
-+extract foo.tar
-+.TP
-+.B tar \-xvvzf foo.tar.gz
-+extract gzipped foo.tar.gz
-+.TP
-+.B tar \-cvvf foo.tar foo/
-+tar contents of folder foo in foo.tar
-+.SH "FUNCTION LETTERS"
-+.TP
-+.B One of the following options must be used:
-+.TP
-+.B \-A, \-\-catenate, \-\-concatenate
-+append tar files to an archive
-+.TP
-+.B \-c, \-\-create	
-+create a new archive
-+.TP
-+.B \-d, \-\-diff, \-\-compare
-+find differences between archive and file system
-+.TP
-+.B \-\-delete		
-+delete from the archive (not for use on mag tapes!)
-+.TP
-+.B \-r, \-\-append		
-+append files to the end of an archive
-+.TP
-+.B \-t, \-\-list		
-+list the contents of an archive
-+.TP
-+.B \-u, \-\-update		
-+only append files that are newer than copy in archive
-+.TP
-+.B \-x, \-\-extract, \-\-get		
-+extract files from an archive
-+.SH "OTHER OPTIONS"
-+.TP
-+.B \-\-allow\-name\-mangling
-+re-enable handling of GNUTYPE_NAMES which is now disabled by default
-+.TP
-+.B \-\-anchored	
-+force exclusion patterns to match initial subsequences
-+.TP
-+.B \-\-atime\-preserve	
-+don't change access times on dumped files
-+.TP
-+.B \-a, \-\-auto\-compress
-+with \-\-create, selects compression algorithm basing on the suffix
-+of the archive file name
-+.TP
-+.B \-b, \-\-blocking\-factor N
-+use record size of Nx512 bytes (default N=20)
-+.TP
-+.B \-B, \-\-read\-full\-records
-+reblock as we read (for reading 4.2BSD pipes)
-+.TP
-+.B \-\-backup[\=TYPE]
-+back up files instead of overwriting (TYPE=numbered, existing, simple)
-+.TP 
-+.B \-C, \-\-directory DIR	
-+change to directory DIR
-+.TP 
-+.B \-\-checkpoint		
-+print periodic checkpoints
-+.TP
-+.B \-\-checkpoint\-action
-+this action allows to specify an action to be executed upon hitting a
-+checkpoint.  Recognized actions are: dot, echo (the default),
-+echo\=string, ttyout\=string, exec\=cmdline, and sleep\=value.  Any number
-+of `\-\-checkpoint\-action' options can be specified, the actions will be
-+executed in order of their appearance in the command line.
-+.TP
-+.B \-\-check\-device
-+enables comparing device numbers.  This is the default.
-+.TP
-+.B \-\-no\-check\-device
-+disables comparing device numbers during preparatory stage of an 
-+incremental dump.  
-+This allows to avoid creating full dumps if the device numbers change 
-+(e.g. when using an LVM snapshot)
-+.TP
-+.B \-\-exclude=PATTERN
-+exclude files matching PATTERN
-+.TP
-+.B \-f, \-\-file [HOSTNAME:]F	
-+use archive file or device F (otherwise value of TAPE environment variable; if unset, "\-", meaning stdin/stdout)
-+.TP 
-+.B \-F, \-\-info\-script F, \-\-new\-volume\-script F 
-+run script at end of each tape (implies \-M)
-+.TP
-+.B \-\-force\-local		
-+archive file is local even if it has a colon
-+.TP
-+.B \-G, \-\-incremental	
-+create/list/extract old GNU-format incremental backup
-+.TP
-+.B \-g, \-\-listed\-incremental F 
-+create/list/extract new GNU-format incremental backup
-+.TP
-+.B \-\-group G
-+set group to G while adding files
-+.TP 
-+.B \-h, \-\-dereference	
-+don't dump symlinks; dump the files they point to
-+.TP
-+.B \-\-hard\-dereference
-+during archive creation, dereferences hard links and stores the files
-+they refer to, instead of creating usual hard link members (type '1')
-+.TP
-+.B \-\-help
-+print help message
-+.TP
-+.B \-i, \-\-ignore\-zeros	
-+ignore blocks of zeros in archive (normally mean EOF)
-+.TP
-+.B \-\-ignore\-case
-+ignore case when excluding files
-+.TP
-+.B \-\-ignore\-failed\-read	
-+don't exit with non-zero status on unreadable files
-+.TP
-+.B \-j, \-\-bzip2
-+filter archive through bzip2, use to decompress .bz2 files.
-+WARNING: some previous versions of tar used option \-I to 
-+filter through bzip2.  When writing scripts, use \-\-bzip2 
-+instead of \-j so that both older and newer tar versions
-+will work.
-+.TP
-+.B \-J, \-\-xz
-+selects XZ compression algorithm
-+.TP
-+.B \-k, \-\-keep\-old\-files	
-+keep existing files; don't overwrite them from archive
-+.TP
-+.B \-K, \-\-starting\-file F	
-+begin at file F in the archive
-+.TP
-+.B \-\-lzip
-+selects Lzip compression algorithm
-+.TP
-+.B \-\-lzma
-+selects LZMA compression algorithm
-+.TP
-+.B \-l, \-\-check\-links
-+print a message if not all links are dumped
-+.TP
-+.B \-L, \-\-tape\-length N	
-+change tapes after writing N*1024 bytes
-+.TP
-+.B \-m, \-\-touch
-+don't extract file modified time
-+.TP
-+.BI \-\-transform " expr"
-+applies filename transformations.  
-+The argument to this option can be a list of replace expressions, separated
-+by semicolon (as in `sed').
-+Filename transformations are applied to symbolic link targets during both
-+creation and extraction.
-+This option may be specified any number of
-+times, the specified transofrmations will be applied in turn.
-+.TP
-+.B \-M, \-\-multi\-volume	
-+create/list/extract multi-volume archive
-+.TP
-+.B \-\-mode M
-+set permissions to M while adding files
-+.TP
-+.B \-N, \-\-after\-date DATE, \-\-newer DATE
-+only store files newer than DATE
-+.TP
-+.B \-\-newer\-mtime DATE
-+only store files whose contents have changed after DATE
-+.TP
-+.B \-\-no\-anchored
-+allow exclusion patterns to match any substring (the default)
-+.TP
-+.B \-\-no\-ignore\-case
-+match patterns case sensitively (the default)
-+.TP
-+.B \-\-no\-recursion
-+do not recurse into subdirectories
-+.TP
-+.B \-o, \-\-no\-same\-owner
-+extract files with owner set to current user (the default for non-root
-+users)
-+.TP
-+.B \-\-no\-same\-permissions
-+apply umask to extracted files (the default for non-root users)
-+.TP
-+.B \-\-no\-wildcards
-+do not use wildcards when excluding files
-+.TP
-+.B \-\-no\-wildcards\-match\-slash
-+don't let wildcards match "/" when excluding files
-+.TP
-+.B \-\-null
-+for \-T, use "NUL" instead of newline as filename terminator
-+.TP
-+.B \-\-numeric\-owner
-+always use numbers for user/group names
-+.TP
-+.B \-\-old\-archive, \-\-portability	
-+write a V7 format archive, rather than ANSI format.  These options are
-+deprecated, please use 
-+.B \-\-format\=v7
-+instead.
-+.TP
-+.B \-\-one\-file\-system	
-+stay in local file system when creating an archive
-+.TP
-+.B \-\-owner O
-+set owner to O while adding files
-+.TP 
-+.B \-O, \-\-to\-stdout		
-+extract files to standard output
-+.TP
-+.B \-p, \-\-same\-permissions, \-\-preserve\-permissions 
-+ignore umask when extracting files (the default for root)
-+.TP
-+.B \-P, \-\-absolute\-names
-+don't strip leading `/'s from file names
-+.TP
-+.B \-\-posix
-+create POSIX compliant archive.  This option is deprecated,
-+please use 
-+.B \-\-format\=posix
-+instead.
-+.TP
-+.B \-\-preserve		
-+like \-p \-s
-+.TP
-+.B \-R, \-\-block\-number	
-+show block number within archive with each message
-+.TP
-+.B \-\-record\-size SIZE
-+use SIZE bytes per record
-+.TP
-+.B \-\-recursion
-+recurse into directories (the default)
-+.TP
-+.B \-\-recursive\-unlink
-+remove existing directories before extracting directories of the same
-+name
-+.TP 
-+.B \-\-remove\-files		
-+remove files after adding them to the archive
-+.TP
-+.B \-\-rsh\-command=CMD
-+Use remote COMMAND instead of `rsh'.  This option exists so that
-+people who use something other than the standard `rsh' (e.g., a
-+Kerberized `rsh') can access a remote device.
-+.TP
-+.B \-S, \-\-sparse		
-+handle sparse files efficiently
-+.TP
-+.B \-s, \-\-same\-order, \-\-preserve\-order	
-+list of names to extract is sorted to match archive
-+.TP
-+.B \-\-same\-owner		
-+extract files with owner as specified in archive (the default for
-+root)
-+.TP
-+.B \-\-show\-omitted\-dirs
-+mention directories that are being skipped over
-+.TP
-+.BI \-\-strip\-components " n"
-+Strip the given number of leading directory components
-+.TP
-+.B \-\-strip, \-\-strip\-components N
-+Strips the first N components from archive members' pathnames when
-+unpacking.
-+.TP
-+.B \-\-suffix SUFFIX
-+append SUFFIX to make backup files (default ~)
-+.TP 
-+.B \-T, \-\-files\-from F	
-+get names to extract or archive from file F
-+.TP
-+.B \-\-totals
-+display total bytes written after creating an archive
-+.TP
-+.B \-U, \-\-unlink\-first
-+unlink & recreate files instead of overwriting
-+.TP
-+.B \-\-use\-compress\-program PROG
-+filter the archive through PROG (which must accept \-d)
-+.TP
-+.B \-v, \-\-verbose		
-+verbosely list files processed
-+.TP
-+.B \-V, \-\-label NAME	
-+create archive with volume name NAME
-+.TP 
-+.B \-\-version		
-+print tar program version number
-+.TP
-+.B \-\-volno\-file F
-+keep track of current volume (of a multi-volume archive) in F
-+.TP
-+.B \-w, \-\-interactive, \-\-confirmation	
-+ask for confirmation for every action
-+.TP
-+.B \-W, \-\-verify		
-+attempt to verify the archive after writing it
-+.TP
-+.B \-\-wildcards
-+use wildcards when excluding files (the default)
-+.TP
-+.B \-\-wildcards\-match\-slash
-+allow wildcards to match "/" (the default)
-+.TP
-+.B \-X, \-\-exclude\-from=FILE	
-+exclude files matching patterns listed in FILE
-+.TP
-+.B \-Z, \-\-compress, \-\-uncompress      	
-+filter the archive through compress
-+.TP 
-+.B \-z, \-\-gzip, \-\-gunzip, \-\-ungzip		
-+filter the archive through gzip
-+.TP
-+.B \-[0\-7][lmh]		
-+specify drive and density
-+.SH ENVIRONMENT
-+The behavior of tar is controlled by the following environment variables,
-+among others:
-+.TP
-+.B TAPE
-+Device or file to use for the archive if \fB--file\fR is not specified.
-+If this environment variable is unset, use stdin or stdout instead.
-+.TP
-+.B TAR_OPTIONS
-+Options to prepend to those specified on the command line, separated by
-+whitespace.  Embedded backslashes may be used to escape whitespace or
-+backslashes within an option.
-+.LP
-+In addition, the value of the blocking factor is made available to info
-+and checkpoint scripts via environment variable 
-+.B TAR_BLOCKING_FACTOR.
-+.SH BUGS
-+.LP
-+The GNU folks, in general, abhor man pages and create info documents instead.
-+The maintainer of \fBtar\fR falls into this category.  Thus, this man page may 
-+not be complete nor current, and it is included in the Cross-LFS Build 
-+because man is a great tool :).  This man page was taken from Debian 
-+Linux and has since been lovingly updated here.
-+
-+If you want to read the complete documentation for GNU tar, please refer to
-+the online version at 
-+.PP
-+.ce 1
-+<http://www.gnu.org/software/tar/manual/index.html>
-+.PP
-+This man page was created for the Cross LFS Build.  It does not describe
-+all of the functionality of tar, and it is often out of date.  Patches to 
-+improve the coverage and/or accuracy of this man page are appreciated, and
-+should be filed as tickets in bug reporting system for Cross-LFS and
-+not submitted to the GNU tar maintainers. The URL for the Cross-LFS bug
-+reporting system is at
-+.PP
-+.ce 1
-+<http://trac.cross-lfs.org>
-+.PP
-+
Index: tches/tar-1.22-new_compressors-1.patch
===================================================================
--- patches/tar-1.22-new_compressors-1.patch	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,86 +1,0 @@
-Submitted By: Jim Gifford <jim at cross-lfs dot org>
-Date: 2009-03-05
-Initial Package Version: 1.22
-Upstream Status: Unknown
-Origin: Jim Gifford
-Description: For using lzip compression
-
-diff -Naur tar-1.22.orig/src/buffer.c tar-1.22/src/buffer.c
---- tar-1.22.orig/src/buffer.c	2009-03-04 23:04:13.000000000 -0800
-+++ tar-1.22/src/buffer.c	2009-03-05 20:46:39.763509707 -0800
-@@ -203,6 +203,7 @@
-   ct_compress,
-   ct_gzip,
-   ct_bzip2,
-+  ct_lzip,
-   ct_lzma,
-   ct_lzop,
-   ct_xz
-@@ -221,10 +222,11 @@
-   { ct_tar },
-   { ct_none, },
-   { ct_compress, 2, "\037\235", "compress", "-Z" },
--  { ct_gzip,     2, "\037\213", "gzip", "-z"  },
--  { ct_bzip2,    3, "BZh",      "bzip2", "-j" },
--  { ct_lzma,     6, "\xFFLZMA", "lzma", "--lzma" }, /* FIXME: ???? */
--  { ct_lzop,     4, "\211LZO",  "lzop", "--lzop" },
-+  { ct_gzip,     2, "\037\213", "gzip",     "-z"  },
-+  { ct_bzip2,    3, "BZh",      "bzip2",    "-j" },
-+  { ct_lzip,     4, "LZIP",     "lzip",     "--lzip" },
-+  { ct_lzma,     6, "\xFFLZMA", "lzma",     "--lzma" }, /* FIXME: ???? */
-+  { ct_lzop,     4, "\211LZO",  "lzop",     "--lzop" },
-   { ct_xz,       6, "\0xFD7zXZ", "-J" },
- };
- 
-diff -Naur tar-1.22.orig/src/tar.c tar-1.22/src/tar.c
---- tar-1.22.orig/src/tar.c	2009-03-04 23:04:13.000000000 -0800
-+++ tar-1.22/src/tar.c	2009-03-05 20:48:09.989291521 -0800
-@@ -271,6 +271,7 @@
-   IGNORE_FAILED_READ_OPTION,
-   INDEX_FILE_OPTION,
-   KEEP_NEWER_FILES_OPTION,
-+  LZIP_OPTION,
-   LZMA_OPTION,
-   LZOP_OPTION,
-   MODE_OPTION,
-@@ -328,7 +329,8 @@
-   VERSION_OPTION,
-   VOLNO_FILE_OPTION,
-   WILDCARDS_MATCH_SLASH_OPTION,
--  WILDCARDS_OPTION
-+  WILDCARDS_OPTION,
-+  XZ_OPTION
- };
- 
- const char *argp_program_version = "tar (" PACKAGE_NAME ") " VERSION;
-@@ -605,6 +607,8 @@
-   {"compress", 'Z', 0, 0,
-    N_("filter the archive through compress"), GRID+1 },
-   {"uncompress", 0, 0, OPTION_ALIAS, NULL, GRID+1 },
-+  {"lzip", LZIP_OPTION, 0, 0,
-+   N_("filter the archive through lzip"), GRID+8 },
-   {"lzma", LZMA_OPTION, 0, 0,
-    N_("filter the archive through lzma"), GRID+1 },
-   {"lzop", LZOP_OPTION, 0, 0,
-@@ -1404,6 +1408,10 @@
-       }
-       break;
- 
-+    case LZIP_OPTION:
-+      set_use_compress_program_option ("lzip");
-+      break;
-+
-     case LZMA_OPTION:
-       set_use_compress_program_option ("lzma");
-       break;
-@@ -1561,6 +1569,10 @@
- 	}
-       break;
- 
-+    case XZ_OPTION:
-+      set_use_compress_program_option ("xz");
-+      break;
-+
-     case 'z':
-       set_use_compress_program_option ("gzip");
-       break;
Index: tches/texinfo-4.13a-new_compressors-1.patch
===================================================================
--- patches/texinfo-4.13a-new_compressors-1.patch	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,68 +1,0 @@
-Submitted By: Jim Gifford <jim at cross-lfs dot org>
-Date: 2009-02-21
-Initial Package Version: 4.13a
-Upstream Status: Unknown
-Origin: Jim Gifford
-Description: For using xz compression
-
-diff -Naur texinfo-4.13.orig/doc/texinfo.txi texinfo-4.13/doc/texinfo.txi
---- texinfo-4.13.orig/doc/texinfo.txi	2008-09-18 11:31:57.000000000 -0700
-+++ texinfo-4.13/doc/texinfo.txi	2009-02-22 19:41:37.874296689 -0800
-@@ -16488,6 +16488,7 @@
- 
- @cindex Compressed dir files, reading
- @cindex Bzipped dir files, reading
-+@cindex XZ-compressed dir files, reading
- @cindex LZMA-compressed dir files, reading
- @cindex Dir files, compressed
- If any input file is compressed with @code{gzip} (@pxref{Top,,,gzip,
-@@ -16495,8 +16496,8 @@
- for reading.  And if @var{dir-file} is compressed, @code{install-info}
- also automatically leaves it compressed after writing any changes.
- If @var{dir-file} itself does not exist, @code{install-info} tries to
--open @file{@var{dir-file}.gz}, @file{@var{dir-file}.bz2}, and 
--@file{@var{dir-file}.lzma}, in that order.
-+open @file{@var{dir-file}.gz}, @file{@var{dir-file}.bz2},
-+@file{@var{dir-file}.xz} and @file{@var{dir-file}.lzma}, in that order.
- 
- Options:
- 
-diff -Naur texinfo-4.13.orig/info/filesys.c texinfo-4.13/info/filesys.c
---- texinfo-4.13.orig/info/filesys.c	2008-06-12 05:39:20.000000000 -0700
-+++ texinfo-4.13/info/filesys.c	2009-02-22 19:41:37.874296689 -0800
-@@ -55,6 +55,7 @@
- static COMPRESSION_ALIST compress_suffixes[] = {
-   { ".gz", "gunzip" },
-   { ".bz2", "bunzip2" },
-+  { ".xz", "unxz" },
-   { ".lzma", "unlzma" },
-   { ".z", "gunzip" },
-   { ".Z", "uncompress" },
-diff -Naur texinfo-4.13.orig/install-info/install-info.c texinfo-4.13/install-info/install-info.c
---- texinfo-4.13.orig/install-info/install-info.c	2008-05-22 05:11:33.000000000 -0700
-+++ texinfo-4.13/install-info/install-info.c	2009-02-22 19:41:37.874296689 -0800
-@@ -739,15 +739,20 @@
- #else
-     *compression_program = "bzip";
- #endif
-+  else if (data[0] == '\xFD' && data[1] == '7' && data[2] == 'z'
-+               && data[3] == 'X' && data[4] == 'Z' && data[5] == 0x00)
-+#ifndef STRIP_DOT_EXE
-+    *compression_program = "xz.exe";
-+#else
-+    *compression_program = "xz";
-+#endif
-     /* We (try to) match against old lzma format (which lacks proper
--       header, two first matches), as well as the new format (last match).  */
-+       header, two first matches). */
-   else if ((data[9] == 0x00 && data[10] == 0x00 && data[11] == 0x00
-             && data[12] == 0x00)
-            || (data[5] == '\xFF' && data[6] == '\xFF' && data[7] == '\xFF'
-                && data[8] == '\xFF' && data[9] == '\xFF' && data[10] == '\xFF'
--               && data[11] == '\xFF' && data[12] == '\xFF') 
--           || (data[0] == '\xFF' && data[1] == 'L' && data[2] == 'Z'
--               && data[3] == 'M' && data[4] == 'A' && data[5] == 0x00))
-+               && data[11] == '\xFF' && data[12] == '\xFF'))
- #ifndef STRIP_DOT_EXE
-     *compression_program = "lzma.exe";
- #else
Index: tches/vim-7.2-branch_update-19.patch
===================================================================
--- patches/vim-7.2-branch_update-19.patch	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,26073 +1,0 @@
-Submitted By: Jim Gifford (jim at cross-lfs dot org)
-Date: 07-19-2009
-Initial Package Version: 7.2
-Origin: Upstream
-Upstream Status: Applied
-Description: Contains all upstream patches up to 7.2.234
-             The following patches were skipped
-             007 036 041 049 071 072 074 088 089 093 101 138 150 172 173 191 194 204 205 212 216 219 233
-
-diff -Naur vim72.orig/Filelist vim72/Filelist
---- vim72.orig/Filelist	2008-07-06 11:02:23.000000000 -0700
-+++ vim72/Filelist	2009-07-19 15:17:20.000000000 -0700
-@@ -285,6 +285,7 @@
- 		src/proto/os_win32.pro \
- 		src/proto/os_mswin.pro \
- 		src/testdir/Make_dos.mak \
-+		src/testdir/Make_ming.mak \
- 		src/testdir/dos.vim \
- 		src/uninstal.c \
- 		src/vim.def \
-@@ -682,9 +683,7 @@
- 		runtime/spell/??/main.aap \
- 		runtime/spell/yi/README.txt \
- 		runtime/spell/main.aap \
--		runtime/spell/cleanadd.vim \
- 		runtime/spell/*.vim \
--		runtime/spell/fixdup \
- 
- # generic language files, binary
- LANG_GEN_BIN = \
-diff -Naur vim72.orig/runtime/doc/cmdline.txt vim72/runtime/doc/cmdline.txt
---- vim72.orig/runtime/doc/cmdline.txt	2008-08-09 07:22:59.000000000 -0700
-+++ vim72/runtime/doc/cmdline.txt	2009-07-19 15:19:00.000000000 -0700
-@@ -1,4 +1,4 @@
--*cmdline.txt*   For Vim version 7.2.  Last change: 2008 Jul 29
-+*cmdline.txt*   For Vim version 7.2.  Last change: 2008 Sep 18
- 
- 
- 		  VIM REFERENCE MANUAL    by Bram Moolenaar
-@@ -157,6 +157,11 @@
- 				(doesn't work at the expression prompt; some
- 				things such as changing the buffer or current
- 				window are not allowed to avoid side effects)
-+				When the result is a |List| the items are used
-+				as lines.  They can have line breaks inside
-+				too.
-+				When the result is a Float it's automatically
-+				converted to a String.
- 		See |registers| about registers.  {not in Vi}
- 		Implementation detail: When using the |expression| register
- 		and invoking setcmdpos(), this sets the position before
-@@ -436,13 +441,20 @@
- those files with an extension that is in the 'suffixes' option are ignored.
- The default is ".bak,~,.o,.h,.info,.swp,.obj", which means that files ending
- in ".bak", "~", ".o", ".h", ".info", ".swp" and ".obj" are sometimes ignored.
--It is impossible to ignore suffixes with two dots.  Examples:
-+
-+An empty entry, two consecutive commas, match a file name that does not
-+contain a ".", thus has no suffix.  This is useful to ignore "prog" and prefer
-+"prog.c".
-+
-+Examples:
- 
-   pattern:	files:				match:	~
-    test*	test.c test.h test.o		test.c
-    test*	test.h test.o			test.h and test.o
-    test*	test.i test.h test.c		test.i and test.c
- 
-+It is impossible to ignore suffixes with two dots.
-+
- If there is more than one matching file (after ignoring the ones matching
- the 'suffixes' option) the first file name is inserted.  You can see that
- there is only one match when you type 'wildchar' twice and the completed
-@@ -730,19 +742,29 @@
- In Ex commands, at places where a file name can be used, the following
- characters have a special meaning.  These can also be used in the expression
- function expand() |expand()|.
--	%	is replaced with the current file name			*:_%*
--	#	is replaced with the alternate file name		*:_#*
-+	%	Is replaced with the current file name.		  *:_%* *c_%*
-+	#	Is replaced with the alternate file name.	  *:_#* *c_#*
- 	#n	(where n is a number) is replaced with the file name of
--		buffer n.  "#0" is the same as "#"
--	##	is replaced with all names in the argument list		*:_##*
-+		buffer n.  "#0" is the same as "#".
-+	##	Is replaced with all names in the argument list	  *:_##* *c_##*
- 		concatenated, separated by spaces.  Each space in a name
- 		is preceded with a backslash.
--Note that these give the file name as it was typed.  If an absolute path is
--needed (when using the file name from a different directory), you need to add
--":p".  See |filename-modifiers|.
-+	#<n	(where n is a number > 0) is replaced with old	  *:_#<* *c_#<*
-+		file name n.  See |:oldfiles| or |v:oldfiles| to get the
-+		number.							*E809*
-+		{only when compiled with the +eval and +viminfo features}
-+
-+Note that these, except "#<n", give the file name as it was typed.  If an
-+absolute path is needed (when using the file name from a different directory),
-+you need to add ":p".  See |filename-modifiers|.
-+
-+The "#<n" item returns an absolute path, but it will start with "~/" for files
-+below your home directory.
-+
- Note that backslashes are inserted before spaces, so that the command will
- correctly interpret the file name.  But this doesn't happen for shell
--commands.  For those you probably have to use quotes: >
-+commands.  For those you probably have to use quotes (this fails for files
-+that contain a quote and wildcards): >
- 	:!ls "%"
- 	:r !spell "%"
- 
-diff -Naur vim72.orig/runtime/doc/eval.txt vim72/runtime/doc/eval.txt
---- vim72.orig/runtime/doc/eval.txt	2008-08-09 07:22:59.000000000 -0700
-+++ vim72/runtime/doc/eval.txt	2009-07-19 15:15:05.000000000 -0700
-@@ -1,4 +1,4 @@
--*eval.txt*	For Vim version 7.2.  Last change: 2008 Aug 09
-+*eval.txt*	For Vim version 7.2.  Last change: 2008 Nov 27
- 
- 
- 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
-@@ -1484,6 +1484,17 @@
- 		This is the screen column number, like with |virtcol()|.  The
- 		value is zero when there was no mouse button click.
- 
-+					*v:oldfiles* *oldfiles-variable*
-+v:oldfiles	List of file names that is loaded from the |viminfo| file on
-+		startup.  These are the files that Vim remembers marks for.
-+		The length of the List is limited by the ' argument of the
-+		'viminfo' option (default is 100).
-+		Also see |:oldfiles| and |c_#<|.
-+		The List can be modified, but this has no effect on what is
-+		stored in the |viminfo| file later.  If you use values other
-+		than String this will cause trouble.
-+		{only when compiled with the +viminfo feature}
-+
- 					*v:operator* *operator-variable*
- v:operator	The last operator given in Normal mode.  This is a single
- 		character except for commands starting with <g> or <z>,
-@@ -1695,7 +1706,7 @@
- exists( {expr})			Number	TRUE if {expr} exists
- extend({expr1}, {expr2} [, {expr3}])
- 				List/Dict insert items of {expr2} into {expr1}
--expand( {expr})			String	expand special keywords in {expr}
-+expand( {expr} [, {flag}])	String	expand special keywords in {expr}
- feedkeys( {string} [, {mode}])	Number	add key sequence to typeahead buffer
- filereadable( {file})		Number	TRUE if {file} is a readable file
- filewritable( {file})		Number	TRUE if {file} is a writable file
-@@ -1747,8 +1758,9 @@
- getwinposx()			Number	X coord in pixels of GUI Vim window
- getwinposy()			Number	Y coord in pixels of GUI Vim window
- getwinvar( {nr}, {varname})	any	variable {varname} in window {nr}
--glob( {expr})			String	expand file wildcards in {expr}
--globpath( {path}, {expr})	String	do glob({expr}) for all dirs in {path}
-+glob( {expr} [, {flag}])	String	expand file wildcards in {expr}
-+globpath( {path}, {expr} [, {flag}])
-+				String	do glob({expr}) for all dirs in {path}
- has( {feature})			Number	TRUE if feature {feature} supported
- has_key( {dict}, {key})		Number	TRUE if {dict} has entry {key}
- haslocaldir()			Number	TRUE if current window executed |:lcd|
-@@ -2402,6 +2414,7 @@
- 		When 'virtualedit' is used {off} specifies the offset in
- 		screen columns from the start of the character.  E.g., a
- 		position within a <Tab> or after the last character.
-+		Returns 0 when the position could be set, -1 otherwise.
- 
- 
- deepcopy({expr}[, {noref}])				*deepcopy()* *E698*
-@@ -3275,14 +3288,16 @@
- 			:let list_is_on = getwinvar(2, '&list')
- 			:echo "myvar = " . getwinvar(1, 'myvar')
- <
--							*glob()*
--glob({expr})	Expand the file wildcards in {expr}.  See |wildcards| for the
-+glob({expr} [, {flag}])					*glob()*
-+		Expand the file wildcards in {expr}.  See |wildcards| for the
- 		use of special characters.
- 		The result is a String.
- 		When there are several matches, they are separated by <NL>
- 		characters.
--		The 'wildignore' option applies: Names matching one of the
--		patterns in 'wildignore' will be skipped.
-+		Unless the optional {flag} argument is given and is non-zero,
-+		the 'suffixes' and 'wildignore' options apply: Names matching
-+		one of the patterns in 'wildignore' will be skipped and
-+		'suffixes' affect the ordering of matches.
- 		If the expansion fails, the result is an empty string.
- 		A name for a non-existing file is not included.
- 
-@@ -3296,20 +3311,22 @@
- 		See |expand()| for expanding special Vim variables.  See
- 		|system()| for getting the raw output of an external command.
- 
--globpath({path}, {expr})				*globpath()*
-+globpath({path}, {expr} [, {flag}])			*globpath()*
- 		Perform glob() on all directories in {path} and concatenate
- 		the results.  Example: >
- 			:echo globpath(&rtp, "syntax/c.vim")
- <		{path} is a comma-separated list of directory names.  Each
- 		directory name is prepended to {expr} and expanded like with
--		glob().  A path separator is inserted when needed.
-+		|glob()|.  A path separator is inserted when needed.
- 		To add a comma inside a directory name escape it with a
- 		backslash.  Note that on MS-Windows a directory may have a
- 		trailing backslash, remove it if you put a comma after it.
- 		If the expansion fails for one of the directories, there is no
- 		error message.
--		The 'wildignore' option applies: Names matching one of the
--		patterns in 'wildignore' will be skipped.
-+		Unless the optional {flag} argument is given and is non-zero,
-+		the 'suffixes' and 'wildignore' options apply: Names matching
-+		one of the patterns in 'wildignore' will be skipped and
-+		'suffixes' affect the ordering of matches.
- 
- 		The "**" item can be used to search in a directory tree.
- 		For example, to find all "README.txt" files in the directories
-@@ -4500,6 +4517,7 @@
- 		should also work to move files across file systems.  The
- 		result is a Number, which is 0 if the file was renamed
- 		successfully, and non-zero when the renaming failed.
-+		NOTE: If {to} exists it is overwritten without warning.
- 		This function is not available in the |sandbox|.
- 
- repeat({expr}, {count})					*repeat()*
-@@ -5332,10 +5350,12 @@
- 		"fg"		foreground color (GUI: color name used to set
- 				the color, cterm: color number as a string,
- 				term: empty string)
--		"bg"		background color (like "fg")
-+		"bg"		background color (as with "fg")
-+		"sp"		special color (as with "fg") |highlight-guisp|
- 		"fg#"		like "fg", but for the GUI and the GUI is
- 				running the name in "#RRGGBB" form
- 		"bg#"		like "fg#" for "bg"
-+		"sp#"		like "fg#" for "sp"
- 		"bold"		"1" if bold
- 		"italic"	"1" if italic
- 		"reverse"	"1" if reverse
-@@ -5823,7 +5843,8 @@
- mouse_pterm		Compiled with support for qnx pterm mouse.
- mouse_sysmouse		Compiled with support for sysmouse (*BSD console mouse)
- mouse_xterm		Compiled with support for xterm mouse.
--multi_byte		Compiled with support for editing Korean et al.
-+multi_byte		Compiled with support for 'encoding'
-+multi_byte_encoding	'encoding' is set to a multi-byte encoding.
- multi_byte_ime		Compiled with support for IME input method.
- multi_lang		Compiled with support for multiple languages.
- mzscheme		Compiled with MzScheme interface |mzscheme|.
-diff -Naur vim72.orig/runtime/doc/if_cscop.txt vim72/runtime/doc/if_cscop.txt
---- vim72.orig/runtime/doc/if_cscop.txt	2008-08-09 07:22:59.000000000 -0700
-+++ vim72/runtime/doc/if_cscop.txt	2009-07-19 15:18:44.000000000 -0700
-@@ -1,4 +1,4 @@
--*if_cscop.txt*  For Vim version 7.2.  Last change: 2005 Mar 29
-+*if_cscop.txt*  For Vim version 7.2.  Last change: 2009 Mar 18
- 
- 
- 		  VIM REFERENCE MANUAL    by Andy Kahn
-@@ -131,11 +131,22 @@
- 		7 or f: Find this file
- 		8 or i: Find files #including this file
- 
-+	For all types, except 4 and 6, leading white space for {name} is
-+	removed.  For 4 and 6 there is exactly one space between {querytype}
-+	and {name}.  Further white space is included in {name}.
-+
- 	EXAMPLES >
- 	    :cscope find c vim_free
--	    :cscope find 3 vim_free
-+	    :cscope find 3  vim_free
-+<
-+	    These two examples perform the same query: functions calling
-+	    "vim_free". >
-+
-+	    :cscope find t initOnce
-+	    :cscope find t  initOnce
- <
--	    These two examples perform the same query. >
-+	    The first one searches for the text "initOnce", the second one for
-+	    " initOnce". >
- 
- 	    :cscope find 0 DEFAULT_TERM
- <
-@@ -344,13 +355,8 @@
- The DJGPP-built version from http://cscope.sourceforge.net is known to not
- work with Vim.
- 
--There are a couple of hard-coded limitations:
--
--    1. The maximum number of cscope connections allowed is 8.  Do you
--    really need more?
--
--    2. Doing a |:tjump| when |:cstag| searches the tag files is not
--    configurable (e.g., you can't do a tselect instead).
-+Hard-coded limitation: doing a |:tjump| when |:cstag| searches the tag files
-+is not configurable (e.g., you can't do a tselect instead).
- 
- ==============================================================================
- 6. Suggested usage					*cscope-suggestions*
-diff -Naur vim72.orig/runtime/doc/netbeans.txt vim72/runtime/doc/netbeans.txt
---- vim72.orig/runtime/doc/netbeans.txt	2008-08-09 07:22:59.000000000 -0700
-+++ vim72/runtime/doc/netbeans.txt	2009-07-19 15:12:02.000000000 -0700
-@@ -1,4 +1,4 @@
--*netbeans.txt*  For Vim version 7.2.  Last change: 2008 Jun 28
-+*netbeans.txt*  For Vim version 7.2.  Last change: 2009 Jan 06
- 
- 
- 		  VIM REFERENCE MANUAL    by Gordon Prieur et al.
-@@ -722,8 +722,10 @@
- 		of the cursor.
- 		New in version 2.1.
- 
--killed		A file was closed by the user.  Only for files that have been
--		assigned a number by the IDE.
-+killed		A file was deleted or wiped out by the user and the buffer
-+		annotations have been removed.  The bufID number for this
-+		buffer has become invalid.  Only for files that have been
-+		assigned a bufID number by the IDE.
- 
- newDotAndMark off off
- 		Reports the position of the cursor being at "off" bytes into
-diff -Naur vim72.orig/runtime/doc/options.txt vim72/runtime/doc/options.txt
---- vim72.orig/runtime/doc/options.txt	2008-08-09 07:22:59.000000000 -0700
-+++ vim72/runtime/doc/options.txt	2009-07-19 15:17:33.000000000 -0700
-@@ -1,4 +1,4 @@
--*options.txt*	For Vim version 7.2.  Last change: 2008 Aug 06
-+*options.txt*	For Vim version 7.2.  Last change: 2008 Nov 25
- 
- 
- 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
-@@ -1443,6 +1443,14 @@
- 	autoselectml	Like "autoselect", but for the modeless selection
- 			only.  Compare to the 'A' flag in 'guioptions'.
- 
-+	html		When the clipboard contains HTML, use this when
-+			pasting.  When putting text on the clipboard, mark it
-+			as HTML.  This works to copy rendered HTML from
-+			Firefox, paste it as raw HTML in Vim, select the HTML
-+			in Vim and paste it in a rich edit box in Firefox.
-+			Only supported for GTK version 2 and later.
-+			Only available with the |+multi_byte| feature.
-+
- 	exclude:{pattern}
- 			Defines a pattern that is matched against the name of
- 			the terminal 'term'.  If there is a match, no
-@@ -4175,9 +4183,6 @@
- 	be able to execute Normal mode commands.
- 	This is the opposite of the 'keymap' option, where characters are
- 	mapped in Insert mode.
--	This only works for 8-bit characters.  The value of 'langmap' may be
--	specified with multi-byte characters (e.g., UTF-8), but only the lower
--	8 bits of each character will be used.
- 
- 	Example (for Greek, in UTF-8):				*greek*  >
- 	    :set langmap=ÎA,ÎB,ÎšC,ÎD,ÎE,ÎŠF,ÎG,ÎH,ÎI,ÎJ,ÎK,ÎL,ÎM,ÎN,ÎO,Î P,QQ,Î¡R,Î£S,Î€T,ÎU,Î©V,WW,Î§X,Î¥Y,ÎZ,Î±a,Î²b,Ïc,ÎŽd,Îµe,Ïf,Î³g,Î·h,Î¹i,ÎŸj,Îºk,Î»l,ÎŒm,Îœn,Î¿o,Ïp,qq,Ïr,Ïs,Ït,Îžu,Ïv,Ïw,Ïx,Ï
-y,Î¶z
-@@ -7472,7 +7477,9 @@
- 			{not available when compiled without the |+wildignore|
- 			feature}
- 	A list of file patterns.  A file that matches with one of these
--	patterns is ignored when completing file or directory names.
-+	patterns is ignored when completing file or directory names, and
-+	influences the result of |expand()|, |glob()| and |globpath()| unless
-+	a flag is passed to disable this.
- 	The pattern is used like with |:autocmd|, see |autocmd-patterns|.
- 	Also see 'suffixes'.
- 	Example: >
-diff -Naur vim72.orig/runtime/doc/spell.txt vim72/runtime/doc/spell.txt
---- vim72.orig/runtime/doc/spell.txt	2008-08-09 07:23:00.000000000 -0700
-+++ vim72/runtime/doc/spell.txt	2009-07-19 15:11:11.000000000 -0700
-@@ -1,4 +1,4 @@
--*spell.txt*	For Vim version 7.2.  Last change: 2008 Jun 21
-+*spell.txt*	For Vim version 7.2.  Last change: 2008 Nov 30
- 
- 
- 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
-@@ -831,8 +831,11 @@
- 
- 	# comment line ~
- 
--With some items it's also possible to put a comment after it, but this isn't
--supported in general.
-+Items with a fixed number of arguments can be followed by a comment.  But only
-+if none of the arguments can contain white space.  The comment must start with
-+a "#" character.  Example:
-+
-+	KEEPCASE =  # fix case for words with this flag ~
- 
- 
- ENCODING							*spell-SET*
-@@ -965,6 +968,9 @@
- 
- Note: When using utf-8 only characters up to 65000 may be used for flags.
- 
-+Note: even when using "num" or "long" the number of flags available to
-+compounding and prefixes is limited to about 250.
-+
- 
- AFFIXES
- 					    *spell-PFX* *spell-SFX*
-@@ -1178,6 +1184,9 @@
- The flag also applies to the word with affixes, thus this can be used to mark
- a whole bunch of related words as bad.
- 
-+							*spell-FORBIDDENWORD*
-+FORBIDDENWORD can be used just like BAD.  For compatibility with Hunspell.
-+
- 							*spell-NEEDAFFIX*
- The NEEDAFFIX flag is used to require that a word is used with an affix.  The
- word itself is not a good word (unless there is an empty affix).  Example:
-@@ -1268,6 +1277,10 @@
- 
- 	NEEDCOMPOUND & ~
- 
-+							*spell-ONLYINCOMPOUND*
-+The ONLYINCOMPOUND does exactly the same as NEEDCOMPOUND.  Supported for
-+compatiblity with Hunspell.
-+
- 							*spell-COMPOUNDMIN*
- The minimal character length of a word used for compounding is specified with
- COMPOUNDMIN.  Example:
-@@ -1328,6 +1341,20 @@
- rules.  Can also be used for an affix to count the affix as a compounding
- word.
- 
-+						*spell-CHECKCOMPOUNDPATTERN*
-+CHECKCOMPOUNDPATTERN is used to define patterns that, when matching at the
-+position where two words are compounded together forbids the compound.
-+For example:
-+	CHECKCOMPOUNDPATTERN o e ~
-+
-+This forbids compounding if the first word ends in "o" and the second word
-+starts with "e".
-+
-+The arguments must be plain text, no patterns are actually supported, despite
-+the item name.  Case is always ignored.
-+
-+The Hunspell feature to use three arguments and flags is not supported.
-+
- 							*spell-SYLLABLE*
- The SYLLABLE item defines characters or character sequences that are used to
- count the number of syllables in a word.  Example:
-@@ -1496,6 +1523,10 @@
- ACCENT		(Hunspell)				*spell-ACCENT*
- 		Use MAP instead. |spell-MAP|
- 
-+BREAK		(Hunspell)				*spell-BREAK*
-+		Define break points.  Unclear how it works exactly.
-+		Not supported.
-+
- CHECKCOMPOUNDCASE  (Hunspell)			*spell-CHECKCOMPOUNDCASE*
- 		Disallow uppercase letters at compound word boundaries.
- 		Not supported.
-@@ -1512,9 +1543,6 @@
- 		Forbid three identical characters when compounding.  Not
- 		supported.
- 
--CHECKCOMPOUNDPATTERN  (Hunspell)		*spell-CHECKCOMPOUNDPATTERN*
--		Forbid compounding when patterns match.  Not supported.
--
- COMPLEXPREFIXES  (Hunspell)				*spell-COMPLEXPREFIXES*
- 		Enables using two prefixes.  Not supported.
- 
-@@ -1536,13 +1564,18 @@
- COMPOUNDMIDDLE	(Hunspell)				*spell-COMPOUNDMIDDLE*
- 		Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
- 
-+COMPOUNDRULES	(Hunspell)				*spell-COMPOUNDRULES*
-+		Number of COMPOUNDRULE lines following.  Ignored, but the
-+		argument must be a number.
-+
- COMPOUNDSYLLABLE  (Hunspell)			*spell-COMPOUNDSYLLABLE*
- 		Use SYLLABLE and COMPOUNDSYLMAX instead. |spell-SYLLABLE|
- 		|spell-COMPOUNDSYLMAX|
- 
--FORBIDDENWORD	(Hunspell)				*spell-FORBIDDENWORD*
--		Use BAD instead. |spell-BAD|
--
-+KEY		(Hunspell)				*spell-KEY*
-+		Define characters that are close together on the keyboard.
-+		Used to give better suggestions.  Not supported.
-+		
- LANG		(Hunspell)				*spell-LANG*
- 		This specifies language-specific behavior.  This actually
- 		moves part of the language knowledge into the program,
-@@ -1553,10 +1586,7 @@
- 		Only needed for morphological analysis.
- 
- MAXNGRAMSUGS	(Hunspell)				*spell-MAXNGRAMSUGS*
--		Not supported.
--
--ONLYINCOMPOUND	(Hunspell)				*spell-ONLYINCOMPOUND*
--		Use NEEDCOMPOUND instead. |spell-NEEDCOMPOUND|
-+		Set number of n-gram suggestions.  Not supported.
- 
- PSEUDOROOT	(Hunspell)				*spell-PSEUDOROOT*
- 		Use NEEDAFFIX instead. |spell-NEEDAFFIX|
-diff -Naur vim72.orig/runtime/doc/starting.txt vim72/runtime/doc/starting.txt
---- vim72.orig/runtime/doc/starting.txt	2008-08-09 07:23:00.000000000 -0700
-+++ vim72/runtime/doc/starting.txt	2009-07-19 15:09:53.000000000 -0700
-@@ -1,4 +1,4 @@
--*starting.txt*  For Vim version 7.2.  Last change: 2008 Jun 21
-+*starting.txt*  For Vim version 7.2.  Last change: 2008 Nov 09
- 
- 
- 		  VIM REFERENCE MANUAL    by Bram Moolenaar
-@@ -1337,8 +1337,9 @@
- 							*viminfo-read*
- When Vim is started and the 'viminfo' option is non-empty, the contents of
- the viminfo file are read and the info can be used in the appropriate places.
--The marks are not read in at startup (but file marks are).  See
--|initialization| for how to set the 'viminfo' option upon startup.
-+The |v:oldfiles| variable is filled.  The marks are not read in at startup
-+(but file marks are).  See |initialization| for how to set the 'viminfo'
-+option upon startup.
- 
- 							*viminfo-write*
- When Vim exits and 'viminfo' is non-empty, the info is stored in the viminfo
-@@ -1372,6 +1373,8 @@
- that start with any string given with the "r" flag in 'viminfo'.  This can be
- used to avoid saving marks for files on removable media (for MS-DOS you would
- use "ra:,rb:", for Amiga "rdf0:,rdf1:,rdf2:").
-+The |v:oldfiles| variable is filled with the file names that the viminfo file
-+has marks for.
- 
- 							*viminfo-file-marks*
- Uppercase marks ('A to 'Z) are stored when writing the viminfo file.  The
-@@ -1463,8 +1466,8 @@
- 						   *:rv* *:rviminfo* *E195*
- :rv[iminfo][!] [file]	Read from viminfo file [file] (default: see above).
- 			If [!] is given, then any information that is
--			already set (registers, marks, etc.) will be
--			overwritten.  {not in Vi}
-+			already set (registers, marks, |v:oldfiles|, etc.)
-+			will be overwritten   {not in Vi}
- 
- 					*:wv* *:wviminfo* *E137* *E138* *E574*
- :wv[iminfo][!] [file]	Write to viminfo file [file] (default: see above).
-@@ -1479,4 +1482,20 @@
- 			the .viminfo file.
- 			{not in Vi}
- 
-+						*:ol* *:oldfiles*
-+:ol[dfiles]		List the files that have marks stored in the viminfo
-+			file.  This list is read on startup and only changes
-+			afterwards with ":rviminfo!".  Also see |v:oldfiles|.
-+			The number can be used with |c_#<|.
-+			{not in Vi, only when compiled with the +eval feature}
-+
-+:bro[wse] ol[dfiles][!]
-+			List file names as with |:oldfiles|, and then prompt
-+			for a number.  When the number is valid that file from
-+			the list is edited.
-+			If you get the |press-enter| prompt you can press "q"
-+			and still get the prompt to enter a file number.
-+			Use ! to abondon a modified buffer. |abandon|
-+			{not when compiled with tiny or small features}
-+
-  vim:tw=78:ts=8:ft=help:norl:
-diff -Naur vim72.orig/runtime/doc/usr_21.txt vim72/runtime/doc/usr_21.txt
---- vim72.orig/runtime/doc/usr_21.txt	2008-08-09 07:23:01.000000000 -0700
-+++ vim72/runtime/doc/usr_21.txt	2009-07-19 15:09:53.000000000 -0700
-@@ -1,4 +1,4 @@
--*usr_21.txt*	For Vim version 7.2.  Last change: 2007 May 01
-+*usr_21.txt*	For Vim version 7.2.  Last change: 2008 Nov 09
- 
- 		     VIM USER MANUAL - by Bram Moolenaar
- 
-@@ -153,7 +153,7 @@
- to be lost.  Each item can be remembered only once.
- 
- 
--GETTING BACK TO WHERE YOU WERE
-+GETTING BACK TO WHERE YOU STOPPED VIM
- 
- You are halfway editing a file and it's time to leave for holidays.  You exit
- Vim and go enjoy yourselves, forgetting all about your work.  After a couple
-@@ -168,6 +168,48 @@
-    The |:marks| command is useful to find out where '0 to '9 will take you.
- 
- 
-+GETTING BACK TO SOME FILE
-+
-+If you want to go back to a file that you edited recently, but not when
-+exiting Vim, there is a slightly more complicated way.  You can see a list of
-+files by typing the command: >
-+
-+	:oldfiles
-+<	1: ~/.viminfo ~
-+	2: ~/text/resume.txt ~
-+	3: /tmp/draft ~
-+
-+Now you would like to edit the second file, which is in the list preceded by
-+"2:".  You type: >
-+
-+	:e #<2
-+
-+Instead of ":e" you can use any command that has a file name argument, the
-+"#<2" item works in the same place as "%" (current file name) and "#"
-+(alternate file name).  So you can also split the window to edit the third
-+file: >
-+
-+	:split #<3
-+
-+That #<123 thing is a bit complicated when you just want to edit a file.
-+Fortunately there is a simpler way: >
-+
-+	:browse oldfiles
-+<	1: ~/.viminfo ~
-+	2: ~/text/resume.txt ~
-+	3: /tmp/draft ~
-+	-- More --
-+
-+You get the same list of files as with |:oldfiles|.  If you want to edit
-+"resume.txt" first press "q" to stop the listing.  You will get a prompt:
-+
-+	Type number and <Enter> (empty cancels): ~
-+
-+Type "2" and press <Enter> to edit the second file.
-+
-+More info at |:oldfiles|, |v:oldfiles| and |c_#<|.
-+
-+
- MOVE INFO FROM ONE VIM TO ANOTHER
- 
- You can use the ":wviminfo" and ":rviminfo" commands to save and restore the
-diff -Naur vim72.orig/runtime/doc/various.txt vim72/runtime/doc/various.txt
---- vim72.orig/runtime/doc/various.txt	2008-08-09 07:23:01.000000000 -0700
-+++ vim72/runtime/doc/various.txt	2009-07-19 15:18:31.000000000 -0700
-@@ -508,6 +508,17 @@
- 			messages though.  Use ":silent" in the command itself
- 			to avoid that: ":silent menu .... :silent command".
- 
-+						*:uns* *:unsilent*
-+:uns[ilent] {command}	Execute {command} not silently.  Only makes a
-+			difference when |:silent| was used to get to this
-+			command.
-+			Use this for giving a message even when |:silent| was
-+			used.  In this example |:silent| is used to avoid the
-+			message about reading the file and |:unsilent| to be
-+			able to list the first line of each file. >
-+    		:silent argdo unsilent echo expand('%') . ": " . getline(1)
-+<
-+
- 						*:verb* *:verbose*
- :[count]verb[ose] {command}
- 			Execute {command} with 'verbose' set to [count].  If
-diff -Naur vim72.orig/runtime/scripts.vim vim72/runtime/scripts.vim
---- vim72.orig/runtime/scripts.vim	2008-08-08 15:27:21.000000000 -0700
-+++ vim72/runtime/scripts.vim	2009-07-19 15:08:47.000000000 -0700
-@@ -234,6 +234,10 @@
-   elseif s:line1 =~ '\<DTD\s\+XHTML\s'
-     set ft=xhtml
- 
-+    " HTML (e.g.: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN")
-+  elseif s:line1 =~? '\<DOCTYPE\s\+html\>'
-+    set ft=html
-+
-     " PDF
-   elseif s:line1 =~ '^%PDF-'
-     set ft=pdf
-diff -Naur vim72.orig/src/auto/configure vim72/src/auto/configure
---- vim72.orig/src/auto/configure	2008-07-24 05:40:36.000000000 -0700
-+++ vim72/src/auto/configure	2009-07-19 15:16:46.000000000 -0700
-@@ -1,6 +1,6 @@
- #! /bin/sh
- # Guess values for system-dependent variables and create Makefiles.
--# Generated by GNU Autoconf 2.62.
-+# Generated by GNU Autoconf 2.63.
- #
- # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
- # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-@@ -635,138 +635,138 @@
- # include <unistd.h>
- #endif"
- 
--ac_subst_vars='SHELL
--PATH_SEPARATOR
--PACKAGE_NAME
--PACKAGE_TARNAME
--PACKAGE_VERSION
--PACKAGE_STRING
--PACKAGE_BUGREPORT
--exec_prefix
--prefix
--program_transform_name
--bindir
--sbindir
--libexecdir
--datarootdir
--datadir
--sysconfdir
--sharedstatedir
--localstatedir
--includedir
--oldincludedir
--docdir
--infodir
--htmldir
--dvidir
--pdfdir
--psdir
--libdir
--localedir
--mandir
--DEFS
--ECHO_C
--ECHO_N
--ECHO_T
--LIBS
--build_alias
--host_alias
--target_alias
--SET_MAKE
--CC
--CFLAGS
--LDFLAGS
--CPPFLAGS
--ac_ct_CC
--EXEEXT
--OBJEXT
--CPP
--GREP
--EGREP
--AWK
--STRIP
--CPP_MM
--OS_EXTRA_SRC
--OS_EXTRA_OBJ
--VIMNAME
--EXNAME
--VIEWNAME
--line_break
--dovimdiff
--dogvimdiff
--compiledby
--vi_cv_path_mzscheme
--MZSCHEME_SRC
--MZSCHEME_OBJ
--MZSCHEME_PRO
--MZSCHEME_LIBS
--MZSCHEME_CFLAGS
--vi_cv_path_perl
--vi_cv_perllib
--shrpenv
--PERL_SRC
--PERL_OBJ
--PERL_PRO
--PERL_CFLAGS
--PERL_LIBS
--vi_cv_path_python
--PYTHON_CONFDIR
--PYTHON_LIBS
--PYTHON_GETPATH_CFLAGS
--PYTHON_CFLAGS
--PYTHON_SRC
--PYTHON_OBJ
--vi_cv_path_tcl
--TCL_SRC
--TCL_OBJ
--TCL_PRO
--TCL_CFLAGS
--TCL_LIBS
--vi_cv_path_ruby
--RUBY_SRC
--RUBY_OBJ
--RUBY_PRO
--RUBY_CFLAGS
--RUBY_LIBS
--WORKSHOP_SRC
--WORKSHOP_OBJ
--NETBEANS_SRC
--NETBEANS_OBJ
--SNIFF_SRC
--SNIFF_OBJ
--xmkmfpath
--XMKMF
--X_CFLAGS
--X_PRE_LIBS
--X_LIBS
--X_EXTRA_LIBS
--X_LIB
--GTK_CONFIG
--GTK12_CONFIG
--PKG_CONFIG
--GTK_CFLAGS
--GTK_LIBS
--GTK_LIBNAME
--GNOME_LIBS
--GNOME_LIBDIR
--GNOME_INCLUDEDIR
--GNOME_CONFIG
--MOTIF_LIBNAME
--NARROW_PROTO
--GUI_INC_LOC
--GUI_LIB_LOC
--GUITYPE
--GUI_X_LIBS
--HANGULIN_SRC
--HANGULIN_OBJ
--TAGPRG
--INSTALL_LANGS
--INSTALL_TOOL_LANGS
--MSGFMT
--MAKEMO
--DEPEND_CFLAGS_FILTER
-+ac_subst_vars='LTLIBOBJS
- LIBOBJS
--LTLIBOBJS'
-+DEPEND_CFLAGS_FILTER
-+MAKEMO
-+MSGFMT
-+INSTALL_TOOL_LANGS
-+INSTALL_LANGS
-+TAGPRG
-+HANGULIN_OBJ
-+HANGULIN_SRC
-+GUI_X_LIBS
-+GUITYPE
-+GUI_LIB_LOC
-+GUI_INC_LOC
-+NARROW_PROTO
-+MOTIF_LIBNAME
-+GNOME_CONFIG
-+GNOME_INCLUDEDIR
-+GNOME_LIBDIR
-+GNOME_LIBS
-+GTK_LIBNAME
-+GTK_LIBS
-+GTK_CFLAGS
-+PKG_CONFIG
-+GTK12_CONFIG
-+GTK_CONFIG
-+X_LIB
-+X_EXTRA_LIBS
-+X_LIBS
-+X_PRE_LIBS
-+X_CFLAGS
-+XMKMF
-+xmkmfpath
-+SNIFF_OBJ
-+SNIFF_SRC
-+NETBEANS_OBJ
-+NETBEANS_SRC
-+WORKSHOP_OBJ
-+WORKSHOP_SRC
-+RUBY_LIBS
-+RUBY_CFLAGS
-+RUBY_PRO
-+RUBY_OBJ
-+RUBY_SRC
-+vi_cv_path_ruby
-+TCL_LIBS
-+TCL_CFLAGS
-+TCL_PRO
-+TCL_OBJ
-+TCL_SRC
-+vi_cv_path_tcl
-+PYTHON_OBJ
-+PYTHON_SRC
-+PYTHON_CFLAGS
-+PYTHON_GETPATH_CFLAGS
-+PYTHON_LIBS
-+PYTHON_CONFDIR
-+vi_cv_path_python
-+PERL_LIBS
-+PERL_CFLAGS
-+PERL_PRO
-+PERL_OBJ
-+PERL_SRC
-+shrpenv
-+vi_cv_perllib
-+vi_cv_path_perl
-+MZSCHEME_CFLAGS
-+MZSCHEME_LIBS
-+MZSCHEME_PRO
-+MZSCHEME_OBJ
-+MZSCHEME_SRC
-+vi_cv_path_mzscheme
-+compiledby
-+dogvimdiff
-+dovimdiff
-+line_break
-+VIEWNAME
-+EXNAME
-+VIMNAME
-+OS_EXTRA_OBJ
-+OS_EXTRA_SRC
-+CPP_MM
-+STRIP
-+AWK
-+EGREP
-+GREP
-+CPP
-+OBJEXT
-+EXEEXT
-+ac_ct_CC
-+CPPFLAGS
-+LDFLAGS
-+CFLAGS
-+CC
-+SET_MAKE
-+target_alias
-+host_alias
-+build_alias
-+LIBS
-+ECHO_T
-+ECHO_N
-+ECHO_C
-+DEFS
-+mandir
-+localedir
-+libdir
-+psdir
-+pdfdir
-+dvidir
-+htmldir
-+infodir
-+docdir
-+oldincludedir
-+includedir
-+localstatedir
-+sharedstatedir
-+sysconfdir
-+datadir
-+datarootdir
-+libexecdir
-+sbindir
-+bindir
-+program_transform_name
-+prefix
-+exec_prefix
-+PACKAGE_BUGREPORT
-+PACKAGE_STRING
-+PACKAGE_VERSION
-+PACKAGE_TARNAME
-+PACKAGE_NAME
-+PATH_SEPARATOR
-+SHELL'
- ac_subst_files=''
- ac_user_opts='
- enable_option_checking
-@@ -1253,9 +1253,9 @@
- if test -n "$ac_unrecognized_opts"; then
-   case $enable_option_checking in
-     no) ;;
--    fatal) { $as_echo "$as_me: error: Unrecognized options: $ac_unrecognized_opts" >&2
-+    fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
-    { (exit 1); exit 1; }; } ;;
--    *)     $as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2 ;;
-+    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
-   esac
- fi
- 
-@@ -1308,7 +1308,7 @@
- ac_pwd=`pwd` && test -n "$ac_pwd" &&
- ac_ls_di=`ls -di .` &&
- ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
--  { $as_echo "$as_me: error: Working directory cannot be determined" >&2
-+  { $as_echo "$as_me: error: working directory cannot be determined" >&2
-    { (exit 1); exit 1; }; }
- test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-   { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
-@@ -1587,7 +1587,7 @@
- if $ac_init_version; then
-   cat <<\_ACEOF
- configure
--generated by GNU Autoconf 2.62
-+generated by GNU Autoconf 2.63
- 
- Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-@@ -1601,7 +1601,7 @@
- running configure, to aid debugging if configure makes a mistake.
- 
- It was created by $as_me, which was
--generated by GNU Autoconf 2.62.  Invocation command line was
-+generated by GNU Autoconf 2.63.  Invocation command line was
- 
-   $ $0 $@
- 
-@@ -1724,8 +1724,8 @@
-     case $ac_val in #(
-     *${as_nl}*)
-       case $ac_var in #(
--      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
--$as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
-+      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
-+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
-       esac
-       case $ac_var in #(
-       _ | IFS | as_nl) ;; #(
-@@ -1928,6 +1928,8 @@
-   fi
- done
- if $ac_cache_corrupted; then
-+  { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-   { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
- $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-   { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-@@ -2084,12 +2086,8 @@
-   else
-     case $cross_compiling:$ac_tool_warned in
- yes:)
--{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
--whose name does not start with the host triplet.  If you think this
--configuration is useful to you, please write to autoconf@gnu.org." >&5
--$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
--whose name does not start with the host triplet.  If you think this
--configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
- ac_tool_warned=yes ;;
- esac
-     CC=$ac_ct_CC
-@@ -2288,12 +2286,8 @@
-   else
-     case $cross_compiling:$ac_tool_warned in
- yes:)
--{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
--whose name does not start with the host triplet.  If you think this
--configuration is useful to you, please write to autoconf@gnu.org." >&5
--$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
--whose name does not start with the host triplet.  If you think this
--configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
- ac_tool_warned=yes ;;
- esac
-     CC=$ac_ct_CC
-@@ -2303,11 +2297,13 @@
- fi
- 
- 
--test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-+test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
- See \`config.log' for more details." >&5
- $as_echo "$as_me: error: no acceptable C compiler found in \$PATH
- See \`config.log' for more details." >&2;}
--   { (exit 1); exit 1; }; }
-+   { (exit 1); exit 1; }; }; }
- 
- # Provide some information about the compiler.
- $as_echo "$as_me:$LINENO: checking for C compiler version" >&5
-@@ -2437,11 +2433,13 @@
-   $as_echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- 
-+{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
- { { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
- See \`config.log' for more details." >&5
- $as_echo "$as_me: error: C compiler cannot create executables
- See \`config.log' for more details." >&2;}
--   { (exit 77); exit 77; }; }
-+   { (exit 77); exit 77; }; }; }
- fi
- 
- ac_exeext=$ac_cv_exeext
-@@ -2469,13 +2467,15 @@
-     if test "$cross_compiling" = maybe; then
- 	cross_compiling=yes
-     else
--	{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
-+	{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
- If you meant to cross compile, use \`--host'.
- See \`config.log' for more details." >&5
- $as_echo "$as_me: error: cannot run C compiled programs.
- If you meant to cross compile, use \`--host'.
- See \`config.log' for more details." >&2;}
--   { (exit 1); exit 1; }; }
-+   { (exit 1); exit 1; }; }; }
-     fi
-   fi
- fi
-@@ -2518,11 +2518,13 @@
-   esac
- done
- else
--  { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
- See \`config.log' for more details." >&5
- $as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
- See \`config.log' for more details." >&2;}
--   { (exit 1); exit 1; }; }
-+   { (exit 1); exit 1; }; }; }
- fi
- 
- rm -f conftest$ac_cv_exeext
-@@ -2576,11 +2578,13 @@
-   $as_echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- 
-+{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
- { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
- See \`config.log' for more details." >&5
- $as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
- See \`config.log' for more details." >&2;}
--   { (exit 1); exit 1; }; }
-+   { (exit 1); exit 1; }; }; }
- fi
- 
- rm -f conftest.$ac_cv_objext conftest.$ac_ext
-@@ -3148,11 +3152,13 @@
- if $ac_preproc_ok; then
-   :
- else
--  { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
- See \`config.log' for more details." >&5
- $as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
- See \`config.log' for more details." >&2;}
--   { (exit 1); exit 1; }; }
-+   { (exit 1); exit 1; }; }; }
- fi
- 
- ac_ext=c
-@@ -4016,8 +4022,9 @@
- 		 $as_echo "$as_val"'`
- 	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
- $as_echo "$ac_res" >&6; }
--if test `eval 'as_val=${'$as_ac_Header'}
--		 $as_echo "$as_val"'` = yes; then
-+as_val=`eval 'as_val=${'$as_ac_Header'}
-+		 $as_echo "$as_val"'`
-+   if test "x$as_val" = x""yes; then
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
-@@ -4154,7 +4161,7 @@
- $as_echo "$ac_cv_header_Carbon_Carbon_h" >&6; }
- 
- fi
--if test $ac_cv_header_Carbon_Carbon_h = yes; then
-+if test "x$ac_cv_header_Carbon_Carbon_h" = x""yes; then
-   CARBON=yes
- fi
- 
-@@ -4484,7 +4491,7 @@
- fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5
- $as_echo "$ac_cv_lib_selinux_is_selinux_enabled" >&6; }
--if test $ac_cv_lib_selinux_is_selinux_enabled = yes; then
-+if test "x$ac_cv_lib_selinux_is_selinux_enabled" = x""yes; then
-   LIBS="$LIBS -lselinux"
- 	   cat >>confdefs.h <<\_ACEOF
- #define HAVE_SELINUX 1
-@@ -5891,7 +5898,7 @@
- fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
- $as_echo "$ac_cv_lib_socket_socket" >&6; }
--if test $ac_cv_lib_socket_socket = yes; then
-+if test "x$ac_cv_lib_socket_socket" = x""yes; then
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBSOCKET 1
- _ACEOF
-@@ -5966,7 +5973,7 @@
- fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
- $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
--if test $ac_cv_lib_nsl_gethostbyname = yes; then
-+if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBNSL 1
- _ACEOF
-@@ -6203,8 +6210,8 @@
-   have_x=disabled
- else
-   case $x_includes,$x_libraries in #(
--    *\'*) { { $as_echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
--$as_echo "$as_me: error: Cannot use X directory names containing '" >&2;}
-+    *\'*) { { $as_echo "$as_me:$LINENO: error: cannot use X directory names containing '" >&5
-+$as_echo "$as_me: error: cannot use X directory names containing '" >&2;}
-    { (exit 1); exit 1; }; };; #(
-     *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
-   $as_echo_n "(cached) " >&6
-@@ -6242,7 +6249,7 @@
- 	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
-     esac
-     case $ac_im_usrlibdir in
--	/usr/lib | /lib) ;;
-+	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
- 	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
-     esac
-   fi
-@@ -6682,7 +6689,7 @@
- fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
- $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
--if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
-+if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then
-   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
- fi
- 
-@@ -6752,7 +6759,7 @@
- fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
- $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
--if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
-+if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then
-   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
- fi
- 
-@@ -6924,7 +6931,7 @@
- fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
- $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
--if test $ac_cv_lib_nsl_gethostbyname = yes; then
-+if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then
-   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
- fi
- 
-@@ -6994,7 +7001,7 @@
- fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
- $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
--if test $ac_cv_lib_bsd_gethostbyname = yes; then
-+if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then
-   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
- fi
- 
-@@ -7160,7 +7167,7 @@
- fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
- $as_echo "$ac_cv_lib_socket_connect" >&6; }
--if test $ac_cv_lib_socket_connect = yes; then
-+if test "x$ac_cv_lib_socket_connect" = x""yes; then
-   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
- fi
- 
-@@ -7319,7 +7326,7 @@
- fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
- $as_echo "$ac_cv_lib_posix_remove" >&6; }
--if test $ac_cv_lib_posix_remove = yes; then
-+if test "x$ac_cv_lib_posix_remove" = x""yes; then
-   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
- fi
- 
-@@ -7478,7 +7485,7 @@
- fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
- $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
--if test $ac_cv_lib_ipc_shmat = yes; then
-+if test "x$ac_cv_lib_ipc_shmat" = x""yes; then
-   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
- fi
- 
-@@ -7559,7 +7566,7 @@
- fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
- $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
--if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
-+if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then
-   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
- fi
- 
-@@ -7727,7 +7734,7 @@
- fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&5
- $as_echo "$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&6; }
--if test $ac_cv_lib_Xdmcp__XdmcpAuthDoIt = yes; then
-+if test "x$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" = x""yes; then
-   X_EXTRA_LIBS="$X_EXTRA_LIBS -lXdmcp"
- fi
- 
-@@ -7797,7 +7804,7 @@
- fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceOpenConnection" >&5
- $as_echo "$ac_cv_lib_ICE_IceOpenConnection" >&6; }
--if test $ac_cv_lib_ICE_IceOpenConnection = yes; then
-+if test "x$ac_cv_lib_ICE_IceOpenConnection" = x""yes; then
-   X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE"
- fi
- 
-@@ -7868,7 +7875,7 @@
- fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5
- $as_echo "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&6; }
--if test $ac_cv_lib_Xpm_XpmCreatePixmapFromData = yes; then
-+if test "x$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = x""yes; then
-   X_PRE_LIBS="$X_PRE_LIBS -lXpm"
- fi
- 
-@@ -7970,6 +7977,82 @@
- 
-     LDFLAGS="$ac_save_LDFLAGS"
- 
-+    { $as_echo "$as_me:$LINENO: checking size of wchar_t is 2 bytes" >&5
-+$as_echo_n "checking size of wchar_t is 2 bytes... " >&6; }
-+    if test "${ac_cv_small_wchar_t+set}" = set; then
-+  $as_echo_n "(cached) " >&6
-+else
-+  if test "$cross_compiling" = yes; then
-+  { { $as_echo "$as_me:$LINENO: error: failed to compile test program" >&5
-+$as_echo "$as_me: error: failed to compile test program" >&2;}
-+   { (exit 1); exit 1; }; }
-+else
-+  cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h.  */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h.  */
-+
-+#include <X11/Xlib.h>
-+#if STDC_HEADERS
-+# include <stdlib.h>
-+# include <stddef.h>
-+#endif
-+		main()
-+		{
-+		  if (sizeof(wchar_t) <= 2)
-+		    exit(1);
-+		  exit(0);
-+		}
-+_ACEOF
-+rm -f conftest$ac_exeext
-+if { (ac_try="$ac_link"
-+case "(($ac_try" in
-+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+  *) ac_try_echo=$ac_try;;
-+esac
-+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-+$as_echo "$ac_try_echo") >&5
-+  (eval "$ac_link") 2>&5
-+  ac_status=$?
-+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-+  { (case "(($ac_try" in
-+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+  *) ac_try_echo=$ac_try;;
-+esac
-+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-+$as_echo "$ac_try_echo") >&5
-+  (eval "$ac_try") 2>&5
-+  ac_status=$?
-+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+  (exit $ac_status); }; }; then
-+  ac_cv_small_wchar_t="no"
-+else
-+  $as_echo "$as_me: program exited with status $ac_status" >&5
-+$as_echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+( exit $ac_status )
-+ac_cv_small_wchar_t="yes"
-+fi
-+rm -rf conftest.dSYM
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-+fi
-+
-+
-+fi
-+
-+    { $as_echo "$as_me:$LINENO: result: $ac_cv_small_wchar_t" >&5
-+$as_echo "$ac_cv_small_wchar_t" >&6; }
-+    if test "x$ac_cv_small_wchar_t" = "xyes" ; then
-+      cat >>confdefs.h <<\_ACEOF
-+#define SMALL_WCHAR_T 1
-+_ACEOF
-+
-+    fi
-+
-   fi
- fi
- 
-@@ -9251,7 +9334,7 @@
- fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
- $as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
--if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
-+if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then
-   GUI_X_LIBS="-lXext"
- fi
- 
-@@ -9320,7 +9403,7 @@
- fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_w_wslen" >&5
- $as_echo "$ac_cv_lib_w_wslen" >&6; }
--if test $ac_cv_lib_w_wslen = yes; then
-+if test "x$ac_cv_lib_w_wslen" = x""yes; then
-   X_EXTRA_LIBS="$X_EXTRA_LIBS -lw"
- fi
- 
-@@ -9389,7 +9472,7 @@
- fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlsym" >&5
- $as_echo "$ac_cv_lib_dl_dlsym" >&6; }
--if test $ac_cv_lib_dl_dlsym = yes; then
-+if test "x$ac_cv_lib_dl_dlsym" = x""yes; then
-   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldl"
- fi
- 
-@@ -9458,7 +9541,7 @@
- fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&5
- $as_echo "$ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&6; }
--if test $ac_cv_lib_Xmu_XmuCreateStippledPixmap = yes; then
-+if test "x$ac_cv_lib_Xmu_XmuCreateStippledPixmap" = x""yes; then
-   GUI_X_LIBS="-lXmu $GUI_X_LIBS"
- fi
- 
-@@ -9528,7 +9611,7 @@
- fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpEndJob" >&5
- $as_echo "$ac_cv_lib_Xp_XpEndJob" >&6; }
--if test $ac_cv_lib_Xp_XpEndJob = yes; then
-+if test "x$ac_cv_lib_Xp_XpEndJob" = x""yes; then
-   GUI_X_LIBS="-lXp $GUI_X_LIBS"
- fi
- 
-@@ -9699,8 +9782,9 @@
- $as_echo "$ac_res" >&6; }
- 
- fi
--if test `eval 'as_val=${'$as_ac_Header'}
--		 $as_echo "$as_val"'` = yes; then
-+as_val=`eval 'as_val=${'$as_ac_Header'}
-+		 $as_echo "$as_val"'`
-+   if test "x$as_val" = x""yes; then
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
-@@ -9852,8 +9936,9 @@
- $as_echo "$ac_res" >&6; }
- 
- fi
--if test `eval 'as_val=${'$as_ac_Header'}
--		 $as_echo "$as_val"'` = yes; then
-+as_val=`eval 'as_val=${'$as_ac_Header'}
-+		 $as_echo "$as_val"'`
-+   if test "x$as_val" = x""yes; then
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
-@@ -10098,8 +10183,9 @@
- $as_echo "$ac_res" >&6; }
- 
- fi
--if test `eval 'as_val=${'$as_ac_Header'}
--		 $as_echo "$as_val"'` = yes; then
-+as_val=`eval 'as_val=${'$as_ac_Header'}
-+		 $as_echo "$as_val"'`
-+   if test "x$as_val" = x""yes; then
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
-@@ -10489,7 +10575,7 @@
- $as_echo "$ac_cv_header_elf_h" >&6; }
- 
- fi
--if test $ac_cv_header_elf_h = yes; then
-+if test "x$ac_cv_header_elf_h" = x""yes; then
-   HAS_ELF=1
- fi
- 
-@@ -10555,7 +10641,7 @@
- fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_elf_main" >&5
- $as_echo "$ac_cv_lib_elf_main" >&6; }
--if test $ac_cv_lib_elf_main = yes; then
-+if test "x$ac_cv_lib_elf_main" = x""yes; then
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBELF 1
- _ACEOF
-@@ -10629,8 +10715,9 @@
- 		 $as_echo "$as_val"'`
- 	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
- $as_echo "$ac_res" >&6; }
--if test `eval 'as_val=${'$as_ac_Header'}
--		 $as_echo "$as_val"'` = yes; then
-+as_val=`eval 'as_val=${'$as_ac_Header'}
-+		 $as_echo "$as_val"'`
-+   if test "x$as_val" = x""yes; then
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
- _ACEOF
-@@ -10916,7 +11003,6 @@
- 
- 
- 
--
- for ac_header in stdarg.h stdlib.h string.h sys/select.h sys/utsname.h \
- 	termcap.h fcntl.h sgtty.h sys/ioctl.h sys/time.h sys/types.h termio.h \
- 	iconv.h langinfo.h math.h unistd.h stropts.h errno.h \
-@@ -10924,7 +11010,7 @@
- 	sys/stream.h termios.h libc.h sys/statfs.h \
- 	poll.h sys/poll.h pwd.h utime.h sys/param.h libintl.h \
- 	libgen.h util/debug.h util/msg18n.h frame.h \
--	sys/acl.h sys/access.h sys/sysctl.h sys/sysinfo.h wchar.h wctype.h
-+	sys/acl.h sys/access.h sys/sysinfo.h wchar.h wctype.h
- do
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
- if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-@@ -11058,8 +11144,9 @@
- $as_echo "$ac_res" >&6; }
- 
- fi
--if test `eval 'as_val=${'$as_ac_Header'}
--		 $as_echo "$as_val"'` = yes; then
-+as_val=`eval 'as_val=${'$as_ac_Header'}
-+		 $as_echo "$as_val"'`
-+   if test "x$as_val" = x""yes; then
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
-@@ -11122,8 +11209,74 @@
- 		 $as_echo "$as_val"'`
- 	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
- $as_echo "$ac_res" >&6; }
--if test `eval 'as_val=${'$as_ac_Header'}
--		 $as_echo "$as_val"'` = yes; then
-+as_val=`eval 'as_val=${'$as_ac_Header'}
-+		 $as_echo "$as_val"'`
-+   if test "x$as_val" = x""yes; then
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
-+
-+fi
-+
-+done
-+
-+
-+
-+for ac_header in sys/sysctl.h
-+do
-+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-+$as_echo_n "checking for $ac_header... " >&6; }
-+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-+  $as_echo_n "(cached) " >&6
-+else
-+  cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h.  */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h.  */
-+#if defined HAVE_SYS_PARAM_H
-+#  include <sys/param.h>
-+#endif
-+
-+#include <$ac_header>
-+_ACEOF
-+rm -f conftest.$ac_objext
-+if { (ac_try="$ac_compile"
-+case "(($ac_try" in
-+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+  *) ac_try_echo=$ac_try;;
-+esac
-+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-+$as_echo "$ac_try_echo") >&5
-+  (eval "$ac_compile") 2>conftest.er1
-+  ac_status=$?
-+  grep -v '^ *+' conftest.er1 >conftest.err
-+  rm -f conftest.er1
-+  cat conftest.err >&5
-+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+  (exit $ac_status); } && {
-+	 test -z "$ac_c_werror_flag" ||
-+	 test ! -s conftest.err
-+       } && test -s conftest.$ac_objext; then
-+  eval "$as_ac_Header=yes"
-+else
-+  $as_echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+	eval "$as_ac_Header=no"
-+fi
-+
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+ac_res=`eval 'as_val=${'$as_ac_Header'}
-+		 $as_echo "$as_val"'`
-+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-+$as_echo "$ac_res" >&6; }
-+as_val=`eval 'as_val=${'$as_ac_Header'}
-+		 $as_echo "$as_val"'`
-+   if test "x$as_val" = x""yes; then
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
-@@ -11322,8 +11475,9 @@
- $as_echo "$ac_res" >&6; }
- 
- fi
--if test `eval 'as_val=${'$as_ac_Header'}
--		 $as_echo "$as_val"'` = yes; then
-+as_val=`eval 'as_val=${'$as_ac_Header'}
-+		 $as_echo "$as_val"'`
-+   if test "x$as_val" = x""yes; then
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
-@@ -11565,6 +11719,67 @@
- 
- fi
- 
-+{ $as_echo "$as_me:$LINENO: checking for working volatile" >&5
-+$as_echo_n "checking for working volatile... " >&6; }
-+if test "${ac_cv_c_volatile+set}" = set; then
-+  $as_echo_n "(cached) " >&6
-+else
-+  cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h.  */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h.  */
-+
-+int
-+main ()
-+{
-+
-+volatile int x;
-+int * volatile y = (int *) 0;
-+return !x && !y;
-+  ;
-+  return 0;
-+}
-+_ACEOF
-+rm -f conftest.$ac_objext
-+if { (ac_try="$ac_compile"
-+case "(($ac_try" in
-+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+  *) ac_try_echo=$ac_try;;
-+esac
-+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-+$as_echo "$ac_try_echo") >&5
-+  (eval "$ac_compile") 2>conftest.er1
-+  ac_status=$?
-+  grep -v '^ *+' conftest.er1 >conftest.err
-+  rm -f conftest.er1
-+  cat conftest.err >&5
-+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+  (exit $ac_status); } && {
-+	 test -z "$ac_c_werror_flag" ||
-+	 test ! -s conftest.err
-+       } && test -s conftest.$ac_objext; then
-+  ac_cv_c_volatile=yes
-+else
-+  $as_echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+	ac_cv_c_volatile=no
-+fi
-+
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
-+$as_echo "$ac_cv_c_volatile" >&6; }
-+if test $ac_cv_c_volatile = no; then
-+
-+cat >>confdefs.h <<\_ACEOF
-+#define volatile /**/
-+_ACEOF
-+
-+fi
-+
- { $as_echo "$as_me:$LINENO: checking for mode_t" >&5
- $as_echo_n "checking for mode_t... " >&6; }
- if test "${ac_cv_type_mode_t+set}" = set; then
-@@ -11659,7 +11874,7 @@
- fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
- $as_echo "$ac_cv_type_mode_t" >&6; }
--if test $ac_cv_type_mode_t = yes; then
-+if test "x$ac_cv_type_mode_t" = x""yes; then
-   :
- else
- 
-@@ -11763,7 +11978,7 @@
- fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
- $as_echo "$ac_cv_type_off_t" >&6; }
--if test $ac_cv_type_off_t = yes; then
-+if test "x$ac_cv_type_off_t" = x""yes; then
-   :
- else
- 
-@@ -11867,7 +12082,7 @@
- fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
- $as_echo "$ac_cv_type_pid_t" >&6; }
--if test $ac_cv_type_pid_t = yes; then
-+if test "x$ac_cv_type_pid_t" = x""yes; then
-   :
- else
- 
-@@ -11971,7 +12186,7 @@
- fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
- $as_echo "$ac_cv_type_size_t" >&6; }
--if test $ac_cv_type_size_t = yes; then
-+if test "x$ac_cv_type_size_t" = x""yes; then
-   :
- else
- 
-@@ -12175,7 +12390,7 @@
- fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_type_ino_t" >&5
- $as_echo "$ac_cv_type_ino_t" >&6; }
--if test $ac_cv_type_ino_t = yes; then
-+if test "x$ac_cv_type_ino_t" = x""yes; then
-   :
- else
- 
-@@ -12279,7 +12494,7 @@
- fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_type_dev_t" >&5
- $as_echo "$ac_cv_type_dev_t" >&6; }
--if test $ac_cv_type_dev_t = yes; then
-+if test "x$ac_cv_type_dev_t" = x""yes; then
-   :
- else
- 
-@@ -12569,8 +12784,9 @@
- 		 $as_echo "$as_val"'`
- 	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
- $as_echo "$ac_res" >&6; }
--if test `eval 'as_val=${'$as_ac_Lib'}
--		 $as_echo "$as_val"'` = yes; then
-+as_val=`eval 'as_val=${'$as_ac_Lib'}
-+		 $as_echo "$as_val"'`
-+   if test "x$as_val" = x""yes; then
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_LIB${libname}" | $as_tr_cpp` 1
- _ACEOF
-@@ -13818,8 +14034,9 @@
- 		 $as_echo "$as_val"'`
- 	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
- $as_echo "$ac_res" >&6; }
--if test `eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'` = yes; then
-+as_val=`eval 'as_val=${'$as_ac_var'}
-+		 $as_echo "$as_val"'`
-+   if test "x$as_val" = x""yes; then
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
-@@ -14202,7 +14419,7 @@
- fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_strtod" >&5
- $as_echo "$ac_cv_lib_m_strtod" >&6; }
--if test $ac_cv_lib_m_strtod = yes; then
-+if test "x$ac_cv_lib_m_strtod" = x""yes; then
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBM 1
- _ACEOF
-@@ -14362,7 +14579,7 @@
- fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_posix1e_acl_get_file" >&5
- $as_echo "$ac_cv_lib_posix1e_acl_get_file" >&6; }
--if test $ac_cv_lib_posix1e_acl_get_file = yes; then
-+if test "x$ac_cv_lib_posix1e_acl_get_file" = x""yes; then
-   LIBS="$LIBS -lposix1e"
- else
-   { $as_echo "$as_me:$LINENO: checking for acl_get_file in -lacl" >&5
-@@ -14430,7 +14647,7 @@
- fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_acl_acl_get_file" >&5
- $as_echo "$ac_cv_lib_acl_acl_get_file" >&6; }
--if test $ac_cv_lib_acl_acl_get_file = yes; then
-+if test "x$ac_cv_lib_acl_acl_get_file" = x""yes; then
-   LIBS="$LIBS -lacl"
- 		  { $as_echo "$as_me:$LINENO: checking for fgetxattr in -lattr" >&5
- $as_echo_n "checking for fgetxattr in -lattr... " >&6; }
-@@ -14497,7 +14714,7 @@
- fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_attr_fgetxattr" >&5
- $as_echo "$ac_cv_lib_attr_fgetxattr" >&6; }
--if test $ac_cv_lib_attr_fgetxattr = yes; then
-+if test "x$ac_cv_lib_attr_fgetxattr" = x""yes; then
-   LIBS="$LIBS -lattr"
- fi
- 
-@@ -15226,7 +15443,6 @@
- 
- 
- 
--
- bcopy_test_prog='
- #include "confdefs.h"
- #ifdef HAVE_STRING_H
-@@ -15458,7 +15674,7 @@
- if test "$enable_multibyte" = "yes"; then
-   cflags_save=$CFLAGS
-   ldflags_save=$LDFLAGS
--  if test -n "$x_includes" ; then
-+  if test "x$x_includes" != "xNONE" ; then
-     CFLAGS="$CFLAGS -I$x_includes"
-     LDFLAGS="$X_LIBS $LDFLAGS -lX11"
-     { $as_echo "$as_me:$LINENO: checking whether X_LOCALE needed" >&5
-@@ -15635,7 +15851,7 @@
- fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_xpg4__xpg4_setrunelocale" >&5
- $as_echo "$ac_cv_lib_xpg4__xpg4_setrunelocale" >&6; }
--if test $ac_cv_lib_xpg4__xpg4_setrunelocale = yes; then
-+if test "x$ac_cv_lib_xpg4__xpg4_setrunelocale" = x""yes; then
-   LIBS="$LIBS -lxpg4"
- fi
- 
-@@ -15646,6 +15862,7 @@
- if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
-   TAGPRG="ctags -I INIT+ --fields=+S"
- else
-+  TAGPRG="ctags"
-   (eval etags	   /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags"
-   (eval etags -c   /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags -c"
-   (eval ctags	   /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags"
-@@ -15933,8 +16150,9 @@
- 		 $as_echo "$as_val"'`
- 	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
- $as_echo "$ac_res" >&6; }
--if test `eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'` = yes; then
-+as_val=`eval 'as_val=${'$as_ac_var'}
-+		 $as_echo "$as_val"'`
-+   if test "x$as_val" = x""yes; then
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
-@@ -16134,7 +16352,7 @@
- $as_echo "$ac_cv_header_dlfcn_h" >&6; }
- 
- fi
--if test $ac_cv_header_dlfcn_h = yes; then
-+if test "x$ac_cv_header_dlfcn_h" = x""yes; then
-   DLL=dlfcn.h
- else
-   if test "${ac_cv_header_dl_h+set}" = set; then
-@@ -16264,7 +16482,7 @@
- $as_echo "$ac_cv_header_dl_h" >&6; }
- 
- fi
--if test $ac_cv_header_dl_h = yes; then
-+if test "x$ac_cv_header_dl_h" = x""yes; then
-   DLL=dl.h
- fi
- 
-@@ -16783,8 +17001,9 @@
- $as_echo "$ac_res" >&6; }
- 
- fi
--if test `eval 'as_val=${'$as_ac_Header'}
--		 $as_echo "$as_val"'` = yes; then
-+as_val=`eval 'as_val=${'$as_ac_Header'}
-+		 $as_echo "$as_val"'`
-+   if test "x$as_val" = x""yes; then
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
-@@ -16819,21 +17038,29 @@
-   LDFLAGS="$LDFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
- fi
- 
--{ $as_echo "$as_me:$LINENO: checking for GCC 3 or later" >&5
--$as_echo_n "checking for GCC 3 or later... " >&6; }
- DEPEND_CFLAGS_FILTER=
- if test "$GCC" = yes; then
-+  { $as_echo "$as_me:$LINENO: checking for GCC 3 or later" >&5
-+$as_echo_n "checking for GCC 3 or later... " >&6; }
-   gccmajor=`echo "$gccversion" | sed -e 's/^\([1-9]\)\..*$/\1/g'`
-   if test "$gccmajor" -gt "2"; then
-     DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'"
--  fi
--fi
--if test "$DEPEND_CFLAGS_FILTER" = ""; then
--  { $as_echo "$as_me:$LINENO: result: no" >&5
-+    { $as_echo "$as_me:$LINENO: result: yes" >&5
-+$as_echo "yes" >&6; }
-+  else
-+    { $as_echo "$as_me:$LINENO: result: no" >&5
- $as_echo "no" >&6; }
--else
--  { $as_echo "$as_me:$LINENO: result: yes" >&5
-+  fi
-+      { $as_echo "$as_me:$LINENO: checking whether we need -D_FORTIFY_SOURCE=1" >&5
-+$as_echo_n "checking whether we need -D_FORTIFY_SOURCE=1... " >&6; }
-+  if test "$gccmajor" -gt "3"; then
-+    CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=1"
-+    { $as_echo "$as_me:$LINENO: result: yes" >&5
- $as_echo "yes" >&6; }
-+  else
-+    { $as_echo "$as_me:$LINENO: result: no" >&5
-+$as_echo "no" >&6; }
-+  fi
- fi
- 
- 
-@@ -16866,8 +17093,8 @@
-     case $ac_val in #(
-     *${as_nl}*)
-       case $ac_var in #(
--      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
--$as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
-+      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
-+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
-       esac
-       case $ac_var in #(
-       _ | IFS | as_nl) ;; #(
-@@ -17259,7 +17486,7 @@
- # values after options handling.
- ac_log="
- This file was extended by $as_me, which was
--generated by GNU Autoconf 2.62.  Invocation command line was
-+generated by GNU Autoconf 2.63.  Invocation command line was
- 
-   CONFIG_FILES    = $CONFIG_FILES
-   CONFIG_HEADERS  = $CONFIG_HEADERS
-@@ -17272,6 +17499,15 @@
- 
- _ACEOF
- 
-+case $ac_config_files in *"
-+"*) set x $ac_config_files; shift; ac_config_files=$*;;
-+esac
-+
-+case $ac_config_headers in *"
-+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
-+esac
-+
-+
- cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- # Files that config.status was made for.
- config_files="$ac_config_files"
-@@ -17284,16 +17520,17 @@
- \`$as_me' instantiates files from templates according to the
- current configuration.
- 
--Usage: $0 [OPTIONS] [FILE]...
-+Usage: $0 [OPTION]... [FILE]...
- 
-   -h, --help       print this help, then exit
-   -V, --version    print version number and configuration settings, then exit
--  -q, --quiet      do not print progress messages
-+  -q, --quiet, --silent
-+                   do not print progress messages
-   -d, --debug      don't remove temporary files
-       --recheck    update $as_me by reconfiguring in the same conditions
--  --file=FILE[:TEMPLATE]
-+      --file=FILE[:TEMPLATE]
-                    instantiate the configuration file FILE
--  --header=FILE[:TEMPLATE]
-+      --header=FILE[:TEMPLATE]
-                    instantiate the configuration header FILE
- 
- Configuration files:
-@@ -17308,7 +17545,7 @@
- cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- ac_cs_version="\\
- config.status
--configured by $0, generated by GNU Autoconf 2.62,
-+configured by $0, generated by GNU Autoconf 2.63,
-   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
- 
- Copyright (C) 2008 Free Software Foundation, Inc.
-@@ -17505,7 +17742,8 @@
- $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-    { (exit 1); exit 1; }; }
- 
--  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` = $ac_delim_num; then
-+  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
-+  if test $ac_delim_n = $ac_delim_num; then
-     break
-   elif $ac_last_try; then
-     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-@@ -17710,9 +17948,9 @@
-   }
-   split(mac1, mac2, "(") #)
-   macro = mac2[1]
-+  prefix = substr(line, 1, index(line, defundef) - 1)
-   if (D_is_set[macro]) {
-     # Preserve the white space surrounding the "#".
--    prefix = substr(line, 1, index(line, defundef) - 1)
-     print prefix "define", macro P[macro] D[macro]
-     next
-   } else {
-@@ -17720,7 +17958,7 @@
-     # in the case of _POSIX_SOURCE, which is predefined and required
-     # on some systems where configure will not decide to define it.
-     if (defundef == "undef") {
--      print "/*", line, "*/"
-+      print "/*", prefix defundef, macro, "*/"
-       next
-     }
-   }
-@@ -17744,8 +17982,8 @@
-   esac
-   case $ac_mode$ac_tag in
-   :[FHL]*:*);;
--  :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
--$as_echo "$as_me: error: Invalid tag $ac_tag." >&2;}
-+  :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
-+$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
-    { (exit 1); exit 1; }; };;
-   :[FH]-) ac_tag=-:-;;
-   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
-@@ -18063,8 +18301,8 @@
-   $ac_cs_success || { (exit 1); exit 1; }
- fi
- if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
--  { $as_echo "$as_me:$LINENO: WARNING: Unrecognized options: $ac_unrecognized_opts" >&5
--$as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2;}
-+  { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
- fi
- 
- 
-diff -Naur vim72.orig/src/buffer.c vim72/src/buffer.c
---- vim72.orig/src/buffer.c	2008-08-06 04:00:48.000000000 -0700
-+++ vim72/src/buffer.c	2009-07-19 15:16:33.000000000 -0700
-@@ -44,6 +44,7 @@
- #ifdef FEAT_TITLE
- static int	ti_change __ARGS((char_u *str, char_u **last));
- #endif
-+static int	append_arg_number __ARGS((win_T *wp, char_u *buf, int buflen, int add_file));
- static void	free_buffer __ARGS((buf_T *));
- static void	free_buffer_stuff __ARGS((buf_T *buf, int free_options));
- static void	clear_wininfo __ARGS((buf_T *buf));
-@@ -437,10 +438,6 @@
- 	return;
- #endif
- 
--#ifdef FEAT_NETBEANS_INTG
--    if (usingNetbeans)
--	netbeans_file_closed(buf);
--#endif
-     /* Change directories when the 'acd' option is set. */
-     DO_AUTOCHDIR
- 
-@@ -639,6 +636,10 @@
- #ifdef FEAT_SIGNS
-     buf_delete_signs(buf);		/* delete any signs */
- #endif
-+#ifdef FEAT_NETBEANS_INTG
-+    if (usingNetbeans)
-+        netbeans_file_killed(buf);
-+#endif
- #ifdef FEAT_LOCALMAP
-     map_clear_int(buf, MAP_ALL_MODES, TRUE, FALSE);  /* clear local mappings */
-     map_clear_int(buf, MAP_ALL_MODES, TRUE, TRUE);   /* clear local abbrevs */
-@@ -647,6 +648,9 @@
-     vim_free(buf->b_start_fenc);
-     buf->b_start_fenc = NULL;
- #endif
-+#ifdef FEAT_SPELL
-+    ga_clear(&buf->b_langp);
-+#endif
- }
- 
- /*
-@@ -812,9 +816,6 @@
-     int		bnr;		/* buffer number */
-     char_u	*p;
- 
--#ifdef FEAT_NETBEANS_INTG
--    netbeansCloseFile = 1;
--#endif
-     if (addr_count == 0)
-     {
- 	(void)do_buffer(command, DOBUF_CURRENT, FORWARD, 0, forceit);
-@@ -909,9 +910,6 @@
- 	}
-     }
- 
--#ifdef FEAT_NETBEANS_INTG
--    netbeansCloseFile = 0;
--#endif
- 
-     return errormsg;
- }
-@@ -1237,7 +1235,7 @@
- 	 * "buf" if one exists */
- 	if ((swb_flags & SWB_USEOPEN) && buf_jump_open_win(buf))
- 	    return OK;
--	/* If 'switchbuf' contians "usetab": jump to first window in any tab
-+	/* If 'switchbuf' contains "usetab": jump to first window in any tab
- 	 * page containing "buf" if one exists */
- 	if ((swb_flags & SWB_USETAB) && buf_jump_open_tab(buf))
- 	    return OK;
-@@ -1351,11 +1349,12 @@
- 	}
-     }
- #ifdef FEAT_AUTOCMD
-+    /* An autocommand may have deleted "buf", already entered it (e.g., when
-+     * it did ":bunload") or aborted the script processing! */
- # ifdef FEAT_EVAL
--    /* An autocommand may have deleted buf or aborted the script processing! */
--    if (buf_valid(buf) && !aborting())
-+    if (buf_valid(buf) && buf != curbuf && !aborting())
- # else
--    if (buf_valid(buf))	    /* an autocommand may have deleted buf! */
-+    if (buf_valid(buf) && buf != curbuf)
- # endif
- #endif
- 	enter_buffer(buf);
-@@ -1397,6 +1396,9 @@
-     curwin->w_cursor.coladd = 0;
- #endif
-     curwin->w_set_curswant = TRUE;
-+#ifdef FEAT_AUTOCMD
-+    curwin->w_topline_was_set = FALSE;
-+#endif
- 
-     /* Make sure the buffer is loaded. */
-     if (curbuf->b_ml.ml_mfp == NULL)	/* need to load the file */
-@@ -1436,7 +1438,8 @@
-     maketitle();
- #endif
- #ifdef FEAT_AUTOCMD
--    if (curwin->w_topline == 1)		/* when autocmds didn't change it */
-+	/* when autocmds didn't change it */
-+    if (curwin->w_topline == 1 && !curwin->w_topline_was_set)
- #endif
- 	scroll_cursor_halfway(FALSE);	/* redisplay at correct position */
- 
-@@ -1451,13 +1454,13 @@
- 
- #ifdef FEAT_KEYMAP
-     if (curbuf->b_kmap_state & KEYMAP_INIT)
--	keymap_init();
-+	(void)keymap_init();
- #endif
- #ifdef FEAT_SPELL
-     /* May need to set the spell language.  Can only do this after the buffer
-      * has been properly setup. */
-     if (!curbuf->b_help && curwin->w_p_spell && *curbuf->b_p_spl != NUL)
--	did_set_spelllang(curbuf);
-+	(void)did_set_spelllang(curbuf);
- #endif
- 
-     redraw_later(NOT_VALID);
-@@ -1675,9 +1678,10 @@
-     buf->b_fname = buf->b_sfname;
- #ifdef UNIX
-     if (st.st_dev == (dev_T)-1)
--	buf->b_dev = -1;
-+	buf->b_dev_valid = FALSE;
-     else
-     {
-+	buf->b_dev_valid = TRUE;
- 	buf->b_dev = st.st_dev;
- 	buf->b_ino = st.st_ino;
-     }
-@@ -2022,13 +2026,12 @@
-  * Return fnum of the found buffer.
-  * Return < 0 for error.
-  */
--/*ARGSUSED*/
-     int
- buflist_findpat(pattern, pattern_end, unlisted, diffmode)
-     char_u	*pattern;
-     char_u	*pattern_end;	/* pointer to first char after pattern */
-     int		unlisted;	/* find unlisted buffers */
--    int		diffmode;	/* find diff-mode buffers only */
-+    int		diffmode UNUSED; /* find diff-mode buffers only */
- {
-     buf_T	*buf;
-     regprog_T	*prog;
-@@ -2466,7 +2469,7 @@
-     buf_T	*buf;
- {
-     wininfo_T	*wip;
--    static pos_T no_position = {1, 0};
-+    static pos_T no_position = INIT_POS_T(1, 0, 0);
- 
-     wip = find_wininfo(buf);
-     if (wip != NULL)
-@@ -2489,7 +2492,6 @@
- /*
-  * List all know file names (for :files and :buffers command).
-  */
--/*ARGSUSED*/
-     void
- buflist_list(eap)
-     exarg_T	*eap;
-@@ -2527,8 +2529,8 @@
- 	{
- 	    IObuff[len++] = ' ';
- 	} while (--i > 0 && len < IOSIZE - 18);
--	vim_snprintf((char *)IObuff + len, IOSIZE - len, _("line %ld"),
--		buf == curbuf ? curwin->w_cursor.lnum
-+	vim_snprintf((char *)IObuff + len, (size_t)(IOSIZE - len),
-+		_("line %ld"), buf == curbuf ? curwin->w_cursor.lnum
- 					       : (long)buflist_findlnum(buf));
- 	msg_outtrans(IObuff);
- 	out_flush();	    /* output one line at a time */
-@@ -2642,9 +2644,10 @@
-     buf->b_fname = buf->b_sfname;
- #ifdef UNIX
-     if (st.st_dev == (dev_T)-1)
--	buf->b_dev = -1;
-+	buf->b_dev_valid = FALSE;
-     else
-     {
-+	buf->b_dev_valid = TRUE;
- 	buf->b_dev = st.st_dev;
- 	buf->b_ino = st.st_ino;
-     }
-@@ -2838,7 +2841,7 @@
- 	/* If no struct stat given, get it now */
- 	if (stp == NULL)
- 	{
--	    if (buf->b_dev < 0 || mch_stat((char *)ffname, &st) < 0)
-+	    if (!buf->b_dev_valid || mch_stat((char *)ffname, &st) < 0)
- 		st.st_dev = (dev_T)-1;
- 	    stp = &st;
- 	}
-@@ -2875,11 +2878,12 @@
- 
-     if (buf->b_fname != NULL && mch_stat((char *)buf->b_fname, &st) >= 0)
-     {
-+	buf->b_dev_valid = TRUE;
- 	buf->b_dev = st.st_dev;
- 	buf->b_ino = st.st_ino;
-     }
-     else
--	buf->b_dev = -1;
-+	buf->b_dev_valid = FALSE;
- }
- 
- /*
-@@ -2890,7 +2894,7 @@
-     buf_T	*buf;
-     struct stat *stp;
- {
--    return (buf->b_dev >= 0
-+    return (buf->b_dev_valid
- 	    && stp->st_dev == buf->b_dev
- 	    && stp->st_ino == buf->b_ino);
- }
-@@ -2917,7 +2921,7 @@
- 
-     if (fullname > 1)	    /* 2 CTRL-G: include buffer number */
-     {
--	sprintf((char *)buffer, "buf %d: ", curbuf->b_fnum);
-+	vim_snprintf((char *)buffer, IOSIZE, "buf %d: ", curbuf->b_fnum);
- 	p = buffer + STRLEN(buffer);
-     }
-     else
-@@ -2991,11 +2995,12 @@
- 		(long)curbuf->b_ml.ml_line_count,
- 		n);
- 	validate_virtcol();
--	col_print(buffer + STRLEN(buffer),
-+	len = STRLEN(buffer);
-+	col_print(buffer + len, IOSIZE - len,
- 		   (int)curwin->w_cursor.col + 1, (int)curwin->w_virtcol + 1);
-     }
- 
--    (void)append_arg_number(curwin, buffer, !shortmess(SHM_FILE), IOSIZE);
-+    (void)append_arg_number(curwin, buffer, IOSIZE, !shortmess(SHM_FILE));
- 
-     if (dont_truncate)
-     {
-@@ -3023,15 +3028,16 @@
- }
- 
-     void
--col_print(buf, col, vcol)
-+col_print(buf, buflen, col, vcol)
-     char_u  *buf;
-+    size_t  buflen;
-     int	    col;
-     int	    vcol;
- {
-     if (col == vcol)
--	sprintf((char *)buf, "%d", col);
-+	vim_snprintf((char *)buf, buflen, "%d", col);
-     else
--	sprintf((char *)buf, "%d-%d", col, vcol);
-+	vim_snprintf((char *)buf, buflen, "%d-%d", col, vcol);
- }
- 
- #if defined(FEAT_TITLE) || defined(PROTO)
-@@ -3144,18 +3150,18 @@
- 		if (p == buf + off)
- 		    /* must be a help buffer */
- 		    vim_strncpy(buf + off, (char_u *)_("help"),
--							    IOSIZE - off - 1);
-+						  (size_t)(IOSIZE - off - 1));
- 		else
- 		    *p = NUL;
- 
- 		/* translate unprintable chars */
- 		p = transstr(buf + off);
--		vim_strncpy(buf + off, p, IOSIZE - off - 1);
-+		vim_strncpy(buf + off, p, (size_t)(IOSIZE - off - 1));
- 		vim_free(p);
- 		STRCAT(buf, ")");
- 	    }
- 
--	    append_arg_number(curwin, buf, FALSE, IOSIZE);
-+	    append_arg_number(curwin, buf, IOSIZE, FALSE);
- 
- #if defined(FEAT_CLIENTSERVER)
- 	    if (serverName != NULL)
-@@ -3292,14 +3298,13 @@
-  * If maxwidth is not zero, the string will be filled at any middle marker
-  * or truncated if too long, fillchar is used for all whitespace.
-  */
--/*ARGSUSED*/
-     int
- build_stl_str_hl(wp, out, outlen, fmt, use_sandbox, fillchar, maxwidth, hltab, tabtab)
-     win_T	*wp;
-     char_u	*out;		/* buffer to write into != NameBuff */
-     size_t	outlen;		/* length of out[] */
-     char_u	*fmt;
--    int		use_sandbox;	/* "fmt" was set insecurely, use sandbox */
-+    int		use_sandbox UNUSED; /* "fmt" was set insecurely, use sandbox */
-     int		fillchar;
-     int		maxwidth;
-     struct stl_hlrec *hltab;	/* return: HL attributes (can be NULL) */
-@@ -3470,7 +3475,7 @@
- 		    n = (long)(p - t) - item[groupitem[groupdepth]].maxwid + 1;
- 
- 		*t = '<';
--		mch_memmove(t + 1, t + n, p - (t + n));
-+		mch_memmove(t + 1, t + n, (size_t)(p - (t + n)));
- 		p = p - n + 1;
- #ifdef FEAT_MBYTE
- 		/* Fill up space left over by half a double-wide char. */
-@@ -3500,7 +3505,7 @@
- 		else
- 		{
- 		    /* fill by inserting characters */
--		    mch_memmove(t + n - l, t, p - t);
-+		    mch_memmove(t + n - l, t, (size_t)(p - t));
- 		    l = n - l;
- 		    if (p + l >= out + outlen)
- 			l = (long)((out + outlen) - p - 1);
-@@ -3636,7 +3641,7 @@
- 	    p = t;
- 
- #ifdef FEAT_EVAL
--	    sprintf((char *)tmp, "%d", curbuf->b_fnum);
-+	    vim_snprintf((char *)tmp, sizeof(tmp), "%d", curbuf->b_fnum);
- 	    set_internal_string_var((char_u *)"actual_curbuf", tmp);
- 
- 	    o_curbuf = curbuf;
-@@ -3703,13 +3708,13 @@
- 
- 	case STL_ALTPERCENT:
- 	    str = tmp;
--	    get_rel_pos(wp, str);
-+	    get_rel_pos(wp, str, TMPLEN);
- 	    break;
- 
- 	case STL_ARGLISTSTAT:
- 	    fillable = FALSE;
- 	    tmp[0] = 0;
--	    if (append_arg_number(wp, tmp, FALSE, (int)sizeof(tmp)))
-+	    if (append_arg_number(wp, tmp, (int)sizeof(tmp), FALSE))
- 		str = tmp;
- 	    break;
- 
-@@ -3744,7 +3749,7 @@
- 	case STL_BYTEVAL_X:
- 	    base = 'X';
- 	case STL_BYTEVAL:
--	    if (wp->w_cursor.col > STRLEN(linecont))
-+	    if (wp->w_cursor.col > (colnr_T)STRLEN(linecont))
- 		num = 0;
- 	    else
- 	    {
-@@ -3917,7 +3922,7 @@
- 	    if (zeropad)
- 		*t++ = '0';
- 	    *t++ = '*';
--	    *t++ = nbase == 16 ? base : (nbase == 8 ? 'o' : 'd');
-+	    *t++ = nbase == 16 ? base : (char_u)(nbase == 8 ? 'o' : 'd');
- 	    *t = 0;
- 
- 	    for (n = num, l = 1; n >= nbase; n /= nbase)
-@@ -3963,7 +3968,7 @@
-     width = vim_strsize(out);
-     if (maxwidth > 0 && width > maxwidth)
-     {
--	/* Result is too long, must trunctate somewhere. */
-+	/* Result is too long, must truncate somewhere. */
- 	l = 0;
- 	if (itemcnt == 0)
- 	    s = out;
-@@ -4110,13 +4115,14 @@
- #if defined(FEAT_STL_OPT) || defined(FEAT_CMDL_INFO) \
- 	    || defined(FEAT_GUI_TABLINE) || defined(PROTO)
- /*
-- * Get relative cursor position in window into "str[]", in the form 99%, using
-- * "Top", "Bot" or "All" when appropriate.
-+ * Get relative cursor position in window into "buf[buflen]", in the form 99%,
-+ * using "Top", "Bot" or "All" when appropriate.
-  */
-     void
--get_rel_pos(wp, str)
-+get_rel_pos(wp, buf, buflen)
-     win_T	*wp;
--    char_u	*str;
-+    char_u	*buf;
-+    int		buflen;
- {
-     long	above; /* number of lines above window */
-     long	below; /* number of lines below window */
-@@ -4127,34 +4133,35 @@
- #endif
-     below = wp->w_buffer->b_ml.ml_line_count - wp->w_botline + 1;
-     if (below <= 0)
--	STRCPY(str, above == 0 ? _("All") : _("Bot"));
-+	vim_strncpy(buf, (char_u *)(above == 0 ? _("All") : _("Bot")),
-+							(size_t)(buflen - 1));
-     else if (above <= 0)
--	STRCPY(str, _("Top"));
-+	vim_strncpy(buf, (char_u *)_("Top"), (size_t)(buflen - 1));
-     else
--	sprintf((char *)str, "%2d%%", above > 1000000L
-+	vim_snprintf((char *)buf, (size_t)buflen, "%2d%%", above > 1000000L
- 				    ? (int)(above / ((above + below) / 100L))
- 				    : (int)(above * 100L / (above + below)));
- }
- #endif
- 
- /*
-- * Append (file 2 of 8) to 'buf', if editing more than one file.
-+ * Append (file 2 of 8) to "buf[buflen]", if editing more than one file.
-  * Return TRUE if it was appended.
-  */
--    int
--append_arg_number(wp, buf, add_file, maxlen)
-+    static int
-+append_arg_number(wp, buf, buflen, add_file)
-     win_T	*wp;
-     char_u	*buf;
-+    int		buflen;
-     int		add_file;	/* Add "file" before the arg number */
--    int		maxlen;		/* maximum nr of chars in buf or zero*/
- {
-     char_u	*p;
- 
-     if (ARGCOUNT <= 1)		/* nothing to do */
- 	return FALSE;
- 
--    p = buf + STRLEN(buf);		/* go to the end of the buffer */
--    if (maxlen && p - buf + 35 >= maxlen) /* getting too long */
-+    p = buf + STRLEN(buf);	/* go to the end of the buffer */
-+    if (p - buf + 35 >= buflen)	/* getting too long */
- 	return FALSE;
-     *p++ = ' ';
-     *p++ = '(';
-@@ -4163,7 +4170,8 @@
- 	STRCPY(p, "file ");
- 	p += 5;
-     }
--    sprintf((char *)p, wp->w_arg_idx_invalid ? "(%d) of %d)"
-+    vim_snprintf((char *)p, (size_t)(buflen - (p - buf)),
-+		wp->w_arg_idx_invalid ? "(%d) of %d)"
- 				  : "%d of %d)", wp->w_arg_idx + 1, ARGCOUNT);
-     return TRUE;
- }
-@@ -4946,7 +4954,7 @@
- 	if (tab != NULL)
- 	{
- 	    *tab++ = '\0';
--	    col = atoi((char *)tab);
-+	    col = (colnr_T)atoi((char *)tab);
- 	    tab = vim_strrchr(xline, '\t');
- 	    if (tab != NULL)
- 	    {
-@@ -4984,6 +4992,7 @@
- #endif
-     char_u	*line;
-     int		max_buffers;
-+    size_t	len;
- 
-     if (find_viminfo_parameter('%') == NULL)
- 	return;
-@@ -4992,7 +5001,8 @@
-     max_buffers = get_viminfo_parameter('%');
- 
-     /* Allocate room for the file name, lnum and col. */
--    line = alloc(MAXPATHL + 40);
-+#define LINE_BUF_LEN (MAXPATHL + 40)
-+    line = alloc(LINE_BUF_LEN);
-     if (line == NULL)
- 	return;
- 
-@@ -5018,7 +5028,8 @@
- 	    break;
- 	putc('%', fp);
- 	home_replace(NULL, buf->b_ffname, line, MAXPATHL, TRUE);
--	sprintf((char *)line + STRLEN(line), "\t%ld\t%d",
-+	len = STRLEN(line);
-+	vim_snprintf((char *)line + len, len - LINE_BUF_LEN, "\t%ld\t%d",
- 			(long)buf->b_last_cursor.lnum,
- 			buf->b_last_cursor.col);
- 	viminfo_writestring(fp, line);
-@@ -5048,7 +5059,8 @@
- 	 */
- 	FOR_ALL_TAB_WINDOWS(tp, win)
- 	    if (win->w_buffer == buf)
--		break;
-+		goto win_found;
-+win_found:
- 	if (win != NULL && win->w_llist_ref != NULL)
- 	    return _("[Location List]");
- 	else
-@@ -5062,7 +5074,7 @@
-     {
- 	if (buf->b_sfname != NULL)
- 	    return (char *)buf->b_sfname;
--	return "[Scratch]";
-+	return _("[Scratch]");
-     }
- #endif
-     if (buf->b_fname == NULL)
-@@ -5175,7 +5187,7 @@
-     return;
- }
- 
--    int
-+    linenr_T
- buf_change_sign_type(buf, markId, typenr)
-     buf_T	*buf;		/* buffer to store sign in */
-     int		markId;		/* sign ID */
-@@ -5192,10 +5204,10 @@
- 	}
-     }
- 
--    return 0;
-+    return (linenr_T)0;
- }
- 
--    int_u
-+    int
- buf_getsigntype(buf, lnum, type)
-     buf_T	*buf;
-     linenr_T	lnum;
-diff -Naur vim72.orig/src/charset.c vim72/src/charset.c
---- vim72.orig/src/charset.c	2008-07-24 07:59:44.000000000 -0700
-+++ vim72/src/charset.c	2009-07-19 15:15:54.000000000 -0700
-@@ -17,7 +17,7 @@
- static int win_nolbr_chartabsize __ARGS((win_T *wp, char_u *s, colnr_T col, int *headp));
- #endif
- 
--static int nr2hex __ARGS((int c));
-+static unsigned nr2hex __ARGS((unsigned c));
- 
- static int    chartab_initialized = FALSE;
- 
-@@ -664,7 +664,7 @@
-     }
- #endif
-     buf[++i] = nr2hex((unsigned)c >> 4);
--    buf[++i] = nr2hex(c);
-+    buf[++i] = nr2hex((unsigned)c);
-     buf[++i] = '>';
-     buf[++i] = NUL;
- }
-@@ -674,9 +674,9 @@
-  * Lower case letters are used to avoid the confusion of <F1> being 0xf1 or
-  * function key 1.
-  */
--    static int
-+    static unsigned
- nr2hex(c)
--    int		c;
-+    unsigned	c;
- {
-     if ((c & 0xf) <= 9)
- 	return (c & 0xf) + '0';
-@@ -884,7 +884,7 @@
-     if (c >= 0x100)
-     {
- 	if (enc_dbcs != 0)
--	    return dbcs_class((unsigned)c >> 8, c & 0xff) >= 2;
-+	    return dbcs_class((unsigned)c >> 8, (unsigned)(c & 0xff)) >= 2;
- 	if (enc_utf8)
- 	    return utf_class(c) >= 2;
-     }
-@@ -1090,7 +1090,7 @@
- 	 */
- 	numberextra = win_col_off(wp);
- 	col2 = col;
--	colmax = W_WIDTH(wp) - numberextra;
-+	colmax = (colnr_T)(W_WIDTH(wp) - numberextra);
- 	if (col >= colmax)
- 	{
- 	    n = colmax + win_col_off2(wp);
-@@ -1201,17 +1201,17 @@
-     win_T	*wp;
-     colnr_T	vcol;
- {
--    colnr_T	width1;		/* width of first line (after line number) */
--    colnr_T	width2;		/* width of further lines */
-+    int		width1;		/* width of first line (after line number) */
-+    int		width2;		/* width of further lines */
- 
- #ifdef FEAT_VERTSPLIT
-     if (wp->w_width == 0)	/* there is no border */
- 	return FALSE;
- #endif
-     width1 = W_WIDTH(wp) - win_col_off(wp);
--    if (vcol < width1 - 1)
-+    if ((int)vcol < width1 - 1)
- 	return FALSE;
--    if (vcol == width1 - 1)
-+    if ((int)vcol == width1 - 1)
- 	return TRUE;
-     width2 = width1 + win_col_off2(wp);
-     return ((vcol - width1) % width2 == width2 - 1);
-@@ -1396,13 +1396,13 @@
- # ifdef FEAT_MBYTE
- 	/* Cannot put the cursor on part of a wide character. */
- 	ptr = ml_get_buf(wp->w_buffer, pos->lnum, FALSE);
--	if (pos->col < STRLEN(ptr))
-+	if (pos->col < (colnr_T)STRLEN(ptr))
- 	{
- 	    int c = (*mb_ptr2char)(ptr + pos->col);
- 
- 	    if (c != TAB && vim_isprintc(c))
- 	    {
--		endadd = char2cells(c) - 1;
-+		endadd = (colnr_T)(char2cells(c) - 1);
- 		if (coladd > endadd)	/* past end of line */
- 		    endadd = 0;
- 		else
-diff -Naur vim72.orig/src/config.h.in vim72/src/config.h.in
---- vim72.orig/src/config.h.in	2008-06-21 08:01:41.000000000 -0700
-+++ vim72/src/config.h.in	2009-07-19 15:16:46.000000000 -0700
-@@ -36,6 +36,9 @@
- /* Defined to the size of an int */
- #undef SIZEOF_INT
- 
-+/* Define when wchar_t is only 2 bytes. */
-+#undef SMALL_WCHAR_T
-+
- /*
-  * If we cannot trust one of the following from the libraries, we use our
-  * own safe but probably slower vim_memmove().
-@@ -50,6 +53,9 @@
- /* Define to empty if the keyword does not work.  */
- #undef const
- 
-+/* Define to empty if the keyword does not work.  */
-+#undef volatile
-+
- /* Define to `int' if <sys/types.h> doesn't define.  */
- #undef mode_t
- 
-diff -Naur vim72.orig/src/configure.in vim72/src/configure.in
---- vim72.orig/src/configure.in	2008-07-24 05:40:26.000000000 -0700
-+++ vim72/src/configure.in	2009-07-19 15:16:46.000000000 -0700
-@@ -1193,6 +1193,28 @@
- 
-     LDFLAGS="$ac_save_LDFLAGS"
- 
-+    AC_MSG_CHECKING(size of wchar_t is 2 bytes)
-+    AC_CACHE_VAL(ac_cv_small_wchar_t,
-+	[AC_TRY_RUN([
-+#include <X11/Xlib.h>
-+#if STDC_HEADERS
-+# include <stdlib.h>
-+# include <stddef.h>
-+#endif
-+		main()
-+		{
-+		  if (sizeof(wchar_t) <= 2)
-+		    exit(1);
-+		  exit(0);
-+		}],
-+		ac_cv_small_wchar_t="no",
-+		ac_cv_small_wchar_t="yes",
-+		AC_MSG_ERROR(failed to compile test program))])
-+    AC_MSG_RESULT($ac_cv_small_wchar_t)
-+    if test "x$ac_cv_small_wchar_t" = "xyes" ; then
-+      AC_DEFINE(SMALL_WCHAR_T)
-+    fi
-+
-   fi
- fi
- 
-@@ -2095,7 +2117,7 @@
- 	sys/stream.h termios.h libc.h sys/statfs.h \
- 	poll.h sys/poll.h pwd.h utime.h sys/param.h libintl.h \
- 	libgen.h util/debug.h util/msg18n.h frame.h \
--	sys/acl.h sys/access.h sys/sysctl.h sys/sysinfo.h wchar.h wctype.h)
-+	sys/acl.h sys/access.h sys/sysinfo.h wchar.h wctype.h)
- 
- dnl sys/ptem.h depends on sys/stream.h on Solaris
- AC_CHECK_HEADERS(sys/ptem.h, [], [],
-@@ -2103,6 +2125,12 @@
- #  include <sys/stream.h>
- #endif])
- 
-+dnl sys/sysctl.h depends on sys/param.h on OpenBSD
-+AC_CHECK_HEADERS(sys/sysctl.h, [], [],
-+[#if defined HAVE_SYS_PARAM_H
-+#  include <sys/param.h>
-+#endif])
-+
- 
- dnl pthread_np.h may exist but can only be used after including pthread.h
- AC_MSG_CHECKING([for pthread_np.h])
-@@ -2148,6 +2176,7 @@
- dnl Checks for typedefs, structures, and compiler characteristics.
- AC_PROG_GCC_TRADITIONAL
- AC_C_CONST
-+AC_C_VOLATILE
- AC_TYPE_MODE_T
- AC_TYPE_OFF_T
- AC_TYPE_PID_T
-@@ -2869,7 +2898,6 @@
- AC_MSG_RESULT($ac_cv_sizeof_int)
- AC_DEFINE_UNQUOTED(SIZEOF_INT, $ac_cv_sizeof_int)
- 
--
- dnl Check for memmove() before bcopy(), makes memmove() be used when both are
- dnl present, fixes problem with incompatibility between Solaris 2.4 and 2.5.
- 
-@@ -2951,7 +2979,7 @@
- if test "$enable_multibyte" = "yes"; then
-   cflags_save=$CFLAGS
-   ldflags_save=$LDFLAGS
--  if test -n "$x_includes" ; then
-+  if test "x$x_includes" != "xNONE" ; then
-     CFLAGS="$CFLAGS -I$x_includes"
-     LDFLAGS="$X_LIBS $LDFLAGS -lX11"
-     AC_MSG_CHECKING(whether X_LOCALE needed)
-@@ -2967,7 +2995,7 @@
- dnl Link with xpg4, it is said to make Korean locale working
- AC_CHECK_LIB(xpg4, _xpg4_setrunelocale, [LIBS="$LIBS -lxpg4"],,)
- 
--dnl Check how we can run ctags
-+dnl Check how we can run ctags.  Default to "ctags" when nothing works.
- dnl --version for Exuberant ctags (preferred)
- dnl       Add --fields=+S to get function signatures for omni completion.
- dnl -t for typedefs (many ctags have this)
-@@ -2979,6 +3007,7 @@
- if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then
-   TAGPRG="ctags -I INIT+ --fields=+S"
- else
-+  TAGPRG="ctags"
-   (eval etags	   /dev/null) < /dev/null 1>&AC_FD_CC 2>&1 && TAGPRG="etags"
-   (eval etags -c   /dev/null) < /dev/null 1>&AC_FD_CC 2>&1 && TAGPRG="etags -c"
-   (eval ctags	   /dev/null) < /dev/null 1>&AC_FD_CC 2>&1 && TAGPRG="ctags"
-@@ -3152,18 +3181,25 @@
- dnl But only when making dependencies, cproto and lint don't take "-isystem".
- dnl Mac gcc returns "powerpc-apple-darwin8-gcc-4.0.1 (GCC)...", need to allow
- dnl the number before the version number.
--AC_MSG_CHECKING(for GCC 3 or later)
- DEPEND_CFLAGS_FILTER=
- if test "$GCC" = yes; then
-+  AC_MSG_CHECKING(for GCC 3 or later)
-   gccmajor=`echo "$gccversion" | sed -e 's/^\([[1-9]]\)\..*$/\1/g'`
-   if test "$gccmajor" -gt "2"; then
-     DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'"
-+    AC_MSG_RESULT(yes)
-+  else
-+    AC_MSG_RESULT(no)
-+  fi
-+  dnl -D_FORTIFY_SOURCE=2 crashes Vim on strcpy(buf, "000") when buf is
-+  dnl declared as char x[1] but actually longer.  Introduced in gcc 4.0.
-+  AC_MSG_CHECKING(whether we need -D_FORTIFY_SOURCE=1)
-+  if test "$gccmajor" -gt "3"; then
-+    CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=1"
-+    AC_MSG_RESULT(yes)
-+  else
-+    AC_MSG_RESULT(no)
-   fi
--fi
--if test "$DEPEND_CFLAGS_FILTER" = ""; then
--  AC_MSG_RESULT(no)
--else
--  AC_MSG_RESULT(yes)
- fi
- AC_SUBST(DEPEND_CFLAGS_FILTER)
- 
-diff -Naur vim72.orig/src/diff.c vim72/src/diff.c
---- vim72.orig/src/diff.c	2008-03-05 03:16:56.000000000 -0800
-+++ vim72/src/diff.c	2009-07-19 15:16:00.000000000 -0700
-@@ -8,7 +8,7 @@
-  */
- 
- /*
-- * diff.c: code for diff'ing two or three buffers.
-+ * diff.c: code for diff'ing two, three or four buffers.
-  */
- 
- #include "vim.h"
-@@ -73,6 +73,8 @@
- 	{
- 	    tp->tp_diffbuf[i] = NULL;
- 	    tp->tp_diff_invalid = TRUE;
-+	    if (tp == curtab)
-+		diff_redraw(TRUE);
- 	}
-     }
- }
-@@ -102,6 +104,7 @@
- 	    {
- 		curtab->tp_diffbuf[i] = NULL;
- 		curtab->tp_diff_invalid = TRUE;
-+		diff_redraw(TRUE);
- 	    }
- 	}
-     }
-@@ -113,7 +116,7 @@
-  * Add a buffer to make diffs for.
-  * Call this when a new buffer is being edited in the current window where
-  * 'diff' is set.
-- * Marks the current buffer as being part of the diff and requireing updating.
-+ * Marks the current buffer as being part of the diff and requiring updating.
-  * This must be done before any autocmd, because a command may use info
-  * about the screen contents.
-  */
-@@ -131,6 +134,7 @@
- 	{
- 	    curtab->tp_diffbuf[i] = buf;
- 	    curtab->tp_diff_invalid = TRUE;
-+	    diff_redraw(TRUE);
- 	    return;
- 	}
- 
-@@ -661,6 +665,7 @@
-     char_u	*tmp_diff;
-     FILE	*fd;
-     int		ok;
-+    int		io_error = FALSE;
- 
-     /* Delete all diffblocks. */
-     diff_clear(curtab);
-@@ -697,18 +702,26 @@
-     {
- 	ok = FALSE;
- 	fd = mch_fopen((char *)tmp_orig, "w");
--	if (fd != NULL)
-+	if (fd == NULL)
-+	    io_error = TRUE;
-+	else
- 	{
--	    fwrite("line1\n", (size_t)6, (size_t)1, fd);
-+	    if (fwrite("line1\n", (size_t)6, (size_t)1, fd) != 1)
-+		io_error = TRUE;
- 	    fclose(fd);
- 	    fd = mch_fopen((char *)tmp_new, "w");
--	    if (fd != NULL)
-+	    if (fd == NULL)
-+		io_error = TRUE;
-+	    else
- 	    {
--		fwrite("line2\n", (size_t)6, (size_t)1, fd);
-+		if (fwrite("line2\n", (size_t)6, (size_t)1, fd) != 1)
-+		    io_error = TRUE;
- 		fclose(fd);
- 		diff_file(tmp_orig, tmp_new, tmp_diff);
- 		fd = mch_fopen((char *)tmp_diff, "r");
--		if (fd != NULL)
-+		if (fd == NULL)
-+		    io_error = TRUE;
-+		else
- 		{
- 		    char_u	linebuf[LBUFLEN];
- 
-@@ -761,6 +774,8 @@
-     }
-     if (!ok)
-     {
-+	if (io_error)
-+	    EMSG(_("E810: Cannot read or write temp files"));
- 	EMSG(_("E97: Cannot create diffs"));
- 	diff_a_works = MAYBE;
- #if defined(MSWIN) || defined(MSDOS)
-@@ -812,6 +827,7 @@
-     char_u	*tmp_diff;
- {
-     char_u	*cmd;
-+    size_t	len;
- 
- #ifdef FEAT_EVAL
-     if (*p_dex != NUL)
-@@ -820,8 +836,9 @@
-     else
- #endif
-     {
--	cmd = alloc((unsigned)(STRLEN(tmp_orig) + STRLEN(tmp_new)
--				+ STRLEN(tmp_diff) + STRLEN(p_srr) + 27));
-+	len = STRLEN(tmp_orig) + STRLEN(tmp_new)
-+				      + STRLEN(tmp_diff) + STRLEN(p_srr) + 27;
-+	cmd = alloc((unsigned)len);
- 	if (cmd != NULL)
- 	{
- 	    /* We don't want $DIFF_OPTIONS to get in the way. */
-@@ -831,7 +848,7 @@
- 	    /* Build the diff command and execute it.  Always use -a, binary
- 	     * differences are of no use.  Ignore errors, diff returns
- 	     * non-zero when differences have been found. */
--	    sprintf((char *)cmd, "diff %s%s%s%s%s %s",
-+	    vim_snprintf((char *)cmd, len, "diff %s%s%s%s%s %s",
- 		    diff_a_works == FALSE ? "" : "-a ",
- #if defined(MSWIN) || defined(MSDOS)
- 		    diff_bin_works == TRUE ? "--binary " : "",
-@@ -841,7 +858,7 @@
- 		    (diff_flags & DIFF_IWHITE) ? "-b " : "",
- 		    (diff_flags & DIFF_ICASE) ? "-i " : "",
- 		    tmp_orig, tmp_new);
--	    append_redir(cmd, p_srr, tmp_diff);
-+	    append_redir(cmd, (int)len, p_srr, tmp_diff);
- #ifdef FEAT_AUTOCMD
- 	    block_autocmds();	/* Avoid ShellCmdPost stuff */
- #endif
-@@ -866,6 +883,7 @@
-     char_u	*tmp_orig;	/* name of original temp file */
-     char_u	*tmp_new;	/* name of patched temp file */
-     char_u	*buf = NULL;
-+    size_t	buflen;
-     win_T	*old_curwin = curwin;
-     char_u	*newname = NULL;	/* name of patched file buffer */
- #ifdef UNIX
-@@ -905,16 +923,17 @@
-     /* Get the absolute path of the patchfile, changing directory below. */
-     fullname = FullName_save(eap->arg, FALSE);
- #endif
--    buf = alloc((unsigned)(STRLEN(tmp_orig) + (
-+    buflen = STRLEN(tmp_orig) + (
- # ifdef UNIX
- 		    fullname != NULL ? STRLEN(fullname) :
- # endif
--		    STRLEN(eap->arg)) + STRLEN(tmp_new) + 16));
-+		    STRLEN(eap->arg)) + STRLEN(tmp_new) + 16;
-+    buf = alloc((unsigned)buflen);
-     if (buf == NULL)
- 	goto theend;
- 
- #ifdef UNIX
--    /* Temporaraly chdir to /tmp, to avoid patching files in the current
-+    /* Temporarily chdir to /tmp, to avoid patching files in the current
-      * directory when the patch file contains more than one patch.  When we
-      * have our own temp dir use that instead, it will be cleaned up when we
-      * exit (any .rej files created).  Don't change directory if we can't
-@@ -925,10 +944,10 @@
-     {
- # ifdef TEMPDIRNAMES
- 	if (vim_tempdir != NULL)
--	    mch_chdir((char *)vim_tempdir);
-+	    ignored = mch_chdir((char *)vim_tempdir);
- 	else
- # endif
--	    mch_chdir("/tmp");
-+	    ignored = mch_chdir("/tmp");
- 	shorten_fnames(TRUE);
-     }
- #endif
-@@ -946,7 +965,8 @@
-     {
- 	/* Build the patch command and execute it.  Ignore errors.  Switch to
- 	 * cooked mode to allow the user to respond to prompts. */
--	sprintf((char *)buf, "patch -o %s %s < \"%s\"", tmp_new, tmp_orig,
-+	vim_snprintf((char *)buf, buflen, "patch -o %s %s < \"%s\"",
-+		tmp_new, tmp_orig,
- # ifdef UNIX
- 		fullname != NULL ? fullname :
- # endif
-@@ -1138,7 +1158,7 @@
- 
-     for (wp = firstwin; wp != NULL; wp = wp->w_next)
-     {
--	if (wp == curwin || eap->forceit)
-+	if (wp == curwin || (eap->forceit && wp->w_p_diff))
- 	{
- 	    /* Set 'diff', 'scrollbind' off and 'wrap' on. */
- 	    wp->w_p_diff = FALSE;
-@@ -2114,6 +2134,8 @@
- 	    EMSG2(_("E102: Can't find buffer \"%s\""), eap->arg);
- 	    return;
- 	}
-+	if (buf == curbuf)
-+	    return;		/* nothing to do */
- 	idx_other = diff_buf_idx(buf);
- 	if (idx_other == DB_COUNT)
- 	{
-diff -Naur vim72.orig/src/digraph.c vim72/src/digraph.c
---- vim72.orig/src/digraph.c	2008-06-23 14:12:51.000000000 -0700
-+++ vim72/src/digraph.c	2009-07-19 15:15:54.000000000 -0700
-@@ -32,7 +32,7 @@
- static void printdigraph __ARGS((digr_T *));
- 
- /* digraphs added by the user */
--static garray_T	user_digraphs = {0, 0, sizeof(digr_T), 10, NULL};
-+static garray_T	user_digraphs = {0, 0, (int)sizeof(digr_T), 10, NULL};
- 
- /*
-  * Note: Characters marked with XX are not included literally, because some
-@@ -2371,10 +2371,10 @@
- 	}
- 	else
- #endif
--	    *p++ = dp->result;
-+	    *p++ = (char_u)dp->result;
- 	if (char2cells(dp->result) == 1)
- 	    *p++ = ' ';
--	sprintf((char *)p, " %3d", dp->result);
-+	vim_snprintf((char *)p, sizeof(buf) - (p - buf), " %3d", dp->result);
- 	msg_outtrans(buf);
-     }
- }
-@@ -2395,7 +2395,10 @@
- static void keymap_unload __ARGS((void));
- 
- /*
-- * Set up key mapping tables for the 'keymap' option
-+ * Set up key mapping tables for the 'keymap' option.
-+ * Returns NULL if OK, an error message for failure.  This only needs to be
-+ * used when setting the option, not later when the value has already been
-+ * checked.
-  */
-     char_u *
- keymap_init()
-@@ -2412,25 +2415,29 @@
-     else
-     {
- 	char_u	*buf;
-+	size_t  buflen;
- 
- 	/* Source the keymap file.  It will contain a ":loadkeymap" command
- 	 * which will call ex_loadkeymap() below. */
--	buf = alloc((unsigned)(STRLEN(curbuf->b_p_keymap)
-+	buflen = STRLEN(curbuf->b_p_keymap)
- # ifdef FEAT_MBYTE
--						       + STRLEN(p_enc)
-+					   + STRLEN(p_enc)
- # endif
--						       + 14));
-+						       + 14;
-+	buf = alloc((unsigned)buflen);
- 	if (buf == NULL)
- 	    return e_outofmem;
- 
- # ifdef FEAT_MBYTE
- 	/* try finding "keymap/'keymap'_'encoding'.vim"  in 'runtimepath' */
--	sprintf((char *)buf, "keymap/%s_%s.vim", curbuf->b_p_keymap, p_enc);
-+	vim_snprintf((char *)buf, buflen, "keymap/%s_%s.vim",
-+						   curbuf->b_p_keymap, p_enc);
- 	if (source_runtime(buf, FALSE) == FAIL)
- # endif
- 	{
- 	    /* try finding "keymap/'keymap'.vim" in 'runtimepath'  */
--	    sprintf((char *)buf, "keymap/%s.vim", curbuf->b_p_keymap);
-+	    vim_snprintf((char *)buf, buflen, "keymap/%s.vim",
-+							  curbuf->b_p_keymap);
- 	    if (source_runtime(buf, FALSE) == FAIL)
- 	    {
- 		vim_free(buf);
-diff -Naur vim72.orig/src/edit.c vim72/src/edit.c
---- vim72.orig/src/edit.c	2008-08-06 05:51:17.000000000 -0700
-+++ vim72/src/edit.c	2009-07-19 15:18:33.000000000 -0700
-@@ -57,7 +57,7 @@
-     N_(" Keyword Local completion (^N^P)"),
- };
- 
--static char_u e_hitend[] = N_("Hit end of paragraph");
-+static char e_hitend[] = N_("Hit end of paragraph");
- 
- /*
-  * Structure used to store one match for insert completion.
-@@ -114,6 +114,10 @@
-  * FALSE the word to be completed must be located. */
- static int	  compl_started = FALSE;
- 
-+/* Set when doing something for completion that may call edit() recursively,
-+ * which is not allowed. */
-+static int	  compl_busy = FALSE;
-+
- static int	  compl_matches = 0;
- static char_u	  *compl_pattern = NULL;
- static int	  compl_direction = FORWARD;
-@@ -147,6 +151,7 @@
- static int  ins_compl_bs __ARGS((void));
- static void ins_compl_new_leader __ARGS((void));
- static void ins_compl_addleader __ARGS((int c));
-+static int ins_compl_len __ARGS((void));
- static void ins_compl_restart __ARGS((void));
- static void ins_compl_set_original_text __ARGS((char_u *str));
- static void ins_compl_addfrommatch __ARGS((void));
-@@ -164,7 +169,7 @@
- static int  ins_compl_key2count __ARGS((int c));
- static int  ins_compl_use_match __ARGS((int c));
- static int  ins_complete __ARGS((int c));
--static int  quote_meta __ARGS((char_u *dest, char_u *str, int len));
-+static unsigned  quote_meta __ARGS((char_u *dest, char_u *str, int len));
- #endif /* FEAT_INS_EXPAND */
- 
- #define BACKSPACE_CHAR		    1
-@@ -197,7 +202,8 @@
- static void mb_replace_pop_ins __ARGS((int cc));
- #endif
- static void replace_flush __ARGS((void));
--static void replace_do_bs __ARGS((void));
-+static void replace_do_bs __ARGS((int limit_col));
-+static int del_char_after_col __ARGS((int limit_col));
- #ifdef FEAT_CINDENT
- static int cindent_on __ARGS((void));
- #endif
-@@ -304,7 +310,7 @@
-     int		c = 0;
-     char_u	*ptr;
-     int		lastc;
--    colnr_T	mincol;
-+    int		mincol;
-     static linenr_T o_lnum = 0;
-     int		i;
-     int		did_backspace = TRUE;	    /* previous char was backspace */
-@@ -344,7 +350,7 @@
- 
- #ifdef FEAT_INS_EXPAND
-     /* Don't allow recursive insert mode when busy with completion. */
--    if (compl_started || pum_visible())
-+    if (compl_started || compl_busy || pum_visible())
-     {
- 	EMSG(_(e_secure));
- 	return FALSE;
-@@ -385,7 +391,7 @@
- 	if (startln)
- 	    Insstart.col = 0;
-     }
--    Insstart_textlen = linetabsize(ml_get_curline());
-+    Insstart_textlen = (colnr_T)linetabsize(ml_get_curline());
-     Insstart_blank_vcol = MAXCOL;
-     if (!did_ai)
- 	ai_col = 0;
-@@ -651,7 +657,7 @@
- 	    mincol = curwin->w_wcol;
- 	    validate_cursor_col();
- 
--	    if ((int)curwin->w_wcol < (int)mincol - curbuf->b_p_ts
-+	    if ((int)curwin->w_wcol < mincol - curbuf->b_p_ts
- 		    && curwin->w_wrow == W_WINROW(curwin)
- 						 + curwin->w_height - 1 - p_so
- 		    && (curwin->w_cursor.lnum != curwin->w_topline
-@@ -751,7 +757,7 @@
- 		 * there is nothing to add, CTRL-L works like CTRL-P then. */
- 		if (c == Ctrl_L
- 			&& (ctrl_x_mode != CTRL_X_WHOLE_LINE
--			    || STRLEN(compl_shown_match->cp_str)
-+			    || (int)STRLEN(compl_shown_match->cp_str)
- 					  > curwin->w_cursor.col - compl_col))
- 		{
- 		    ins_compl_addfrommatch();
-@@ -1338,8 +1344,10 @@
- 		goto normalchar;
- 
- docomplete:
-+	    compl_busy = TRUE;
- 	    if (ins_complete(c) == FAIL)
- 		compl_cont_status = 0;
-+	    compl_busy = FALSE;
- 	    break;
- #endif /* FEAT_INS_EXPAND */
- 
-@@ -1771,7 +1779,7 @@
- 	 * Compute the screen column where the cursor should be.
- 	 */
- 	vcol = get_indent() - vcol;
--	curwin->w_virtcol = (vcol < 0) ? 0 : vcol;
-+	curwin->w_virtcol = (colnr_T)((vcol < 0) ? 0 : vcol);
- 
- 	/*
- 	 * Advance the cursor until we reach the right screen column.
-@@ -1798,9 +1806,9 @@
- 	 */
- 	if (vcol != (int)curwin->w_virtcol)
- 	{
--	    curwin->w_cursor.col = new_cursor_col;
-+	    curwin->w_cursor.col = (colnr_T)new_cursor_col;
- 	    i = (int)curwin->w_virtcol - vcol;
--	    ptr = alloc(i + 1);
-+	    ptr = alloc((unsigned)(i + 1));
- 	    if (ptr != NULL)
- 	    {
- 		new_cursor_col += i;
-@@ -1824,7 +1832,7 @@
-     if (new_cursor_col <= 0)
- 	curwin->w_cursor.col = 0;
-     else
--	curwin->w_cursor.col = new_cursor_col;
-+	curwin->w_cursor.col = (colnr_T)new_cursor_col;
-     curwin->w_set_curswant = TRUE;
-     changed_cline_bef_curs();
- 
-@@ -1933,6 +1941,8 @@
- /*
-  * Backspace the cursor until the given column.  Handles REPLACE and VREPLACE
-  * modes correctly.  May also be used when not in insert mode at all.
-+ * Will attempt not to go before "col" even when there is a composing
-+ * character.
-  */
-     void
- backspace_until_column(col)
-@@ -1942,13 +1952,50 @@
-     {
- 	curwin->w_cursor.col--;
- 	if (State & REPLACE_FLAG)
--	    replace_do_bs();
--	else
--	    (void)del_char(FALSE);
-+	    replace_do_bs(col);
-+	else if (!del_char_after_col(col))
-+	    break;
-     }
- }
- #endif
- 
-+/*
-+ * Like del_char(), but make sure not to go before column "limit_col".
-+ * Only matters when there are composing characters.
-+ * Return TRUE when something was deleted.
-+ */
-+/*ARGSUSED*/
-+   static int
-+del_char_after_col(limit_col)
-+    int limit_col;
-+{
-+#ifdef FEAT_MBYTE
-+    if (enc_utf8 && limit_col >= 0)
-+    {
-+	colnr_T ecol = curwin->w_cursor.col + 1;
-+
-+	/* Make sure the cursor is at the start of a character, but
-+	 * skip forward again when going too far back because of a
-+	 * composing character. */
-+	mb_adjust_cursor();
-+	while (curwin->w_cursor.col < (colnr_T)limit_col)
-+	{
-+	    int l = utf_ptr2len(ml_get_cursor());
-+
-+	    if (l == 0)  /* end of line */
-+		break;
-+	    curwin->w_cursor.col += l;
-+	}
-+	if (*ml_get_cursor() == NUL || curwin->w_cursor.col == ecol)
-+	    return FALSE;
-+	del_bytes((long)((int)ecol - curwin->w_cursor.col), FALSE, TRUE);
-+    }
-+    else
-+#endif
-+	(void)del_char(FALSE);
-+    return TRUE;
-+}
-+
- #if defined(FEAT_INS_EXPAND) || defined(PROTO)
- /*
-  * CTRL-X pressed in Insert mode.
-@@ -2160,7 +2207,7 @@
- 	    actual_compl_length = compl_length;
- 
- 	/* Allocate wide character array for the completion and fill it. */
--	wca = (int *)alloc(actual_len * sizeof(int));
-+	wca = (int *)alloc((unsigned)(actual_len * sizeof(int)));
- 	if (wca != NULL)
- 	{
- 	    p = str;
-@@ -2418,7 +2465,7 @@
- 	{
- 	    had_match = (curwin->w_cursor.col > compl_col);
- 	    ins_compl_delete();
--	    ins_bytes(compl_leader + curwin->w_cursor.col - compl_col);
-+	    ins_bytes(compl_leader + ins_compl_len());
- 	    ins_redraw(FALSE);
- 
- 	    /* When the match isn't there (to avoid matching itself) remove it
-@@ -2470,7 +2517,7 @@
- 	    *p = NUL;
- 	    had_match = (curwin->w_cursor.col > compl_col);
- 	    ins_compl_delete();
--	    ins_bytes(compl_leader + curwin->w_cursor.col - compl_col);
-+	    ins_bytes(compl_leader + ins_compl_len());
- 	    ins_redraw(FALSE);
- 
- 	    /* When the match isn't there (to avoid matching itself) remove it
-@@ -2539,7 +2586,7 @@
-  */
-     void
- set_completion(startcol, list)
--    int	    startcol;
-+    colnr_T startcol;
-     list_T  *list;
- {
-     /* If already doing completions stop it. */
-@@ -2550,10 +2597,10 @@
-     if (stop_arrow() == FAIL)
- 	return;
- 
--    if (startcol > (int)curwin->w_cursor.col)
-+    if (startcol > curwin->w_cursor.col)
- 	startcol = curwin->w_cursor.col;
-     compl_col = startcol;
--    compl_length = curwin->w_cursor.col - startcol;
-+    compl_length = (int)curwin->w_cursor.col - (int)startcol;
-     /* compl_pattern doesn't need to be set */
-     compl_orig_text = vim_strnsave(ml_get_curline() + compl_col, compl_length);
-     if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
-@@ -2819,7 +2866,6 @@
-     regmatch_T	regmatch;
-     char_u	**files;
-     int		count;
--    int		i;
-     int		save_p_scs;
-     int		dir = compl_direction;
- 
-@@ -2851,17 +2897,18 @@
-     if (ctrl_x_mode == CTRL_X_WHOLE_LINE)
-     {
- 	char_u *pat_esc = vim_strsave_escaped(pat, (char_u *)"\\");
-+	size_t len;
- 
- 	if (pat_esc == NULL)
- 	    goto theend;
--	i = (int)STRLEN(pat_esc) + 10;
--	ptr = alloc(i);
-+	len = STRLEN(pat_esc) + 10;
-+	ptr = alloc((unsigned)len);
- 	if (ptr == NULL)
- 	{
- 	    vim_free(pat_esc);
- 	    goto theend;
- 	}
--	vim_snprintf((char *)ptr, i, "^\\s*\\zs\\V%s", pat_esc);
-+	vim_snprintf((char *)ptr, len, "^\\s*\\zs\\V%s", pat_esc);
- 	regmatch.regprog = vim_regcomp(ptr, RE_MAGIC);
- 	vim_free(pat_esc);
- 	vim_free(ptr);
-@@ -2952,7 +2999,7 @@
- 	{
- 	    vim_snprintf((char *)IObuff, IOSIZE,
- 			      _("Scanning dictionary: %s"), (char *)files[i]);
--	    msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
-+	    (void)msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
- 	}
- 
- 	if (fp != NULL)
-@@ -3133,6 +3180,7 @@
- 	vim_free(match);
-     } while (compl_curr_match != NULL && compl_curr_match != compl_first_match);
-     compl_first_match = compl_curr_match = NULL;
-+    compl_shown_match = NULL;
- }
- 
-     static void
-@@ -3209,7 +3257,7 @@
- {
-     ins_compl_del_pum();
-     ins_compl_delete();
--    ins_bytes(compl_leader + curwin->w_cursor.col - compl_col);
-+    ins_bytes(compl_leader + ins_compl_len());
-     compl_used_match = FALSE;
- 
-     if (compl_started)
-@@ -3264,6 +3312,20 @@
- }
- 
- /*
-+ * Return the length of the completion, from the completion start column to
-+ * the cursor column.  Making sure it never goes below zero.
-+ */
-+    static int
-+ins_compl_len()
-+{
-+    int off = (int)curwin->w_cursor.col - (int)compl_col;
-+
-+    if (off < 0)
-+	return 0;
-+    return off;
-+}
-+
-+/*
-  * Append one character to the match leader.  May reduce the number of
-  * matches.
-  */
-@@ -3292,7 +3354,7 @@
- 
-     vim_free(compl_leader);
-     compl_leader = vim_strnsave(ml_get_curline() + compl_col,
--					    curwin->w_cursor.col - compl_col);
-+				     (int)(curwin->w_cursor.col - compl_col));
-     if (compl_leader != NULL)
- 	ins_compl_new_leader();
- }
-@@ -3340,7 +3402,7 @@
- ins_compl_addfrommatch()
- {
-     char_u	*p;
--    int		len = curwin->w_cursor.col - compl_col;
-+    int		len = (int)curwin->w_cursor.col - (int)compl_col;
-     int		c;
-     compl_T	*cp;
- 
-@@ -3621,10 +3683,9 @@
- 	    {
- 		ins_compl_delete();
- 		if (compl_leader != NULL)
--		    ins_bytes(compl_leader + curwin->w_cursor.col - compl_col);
-+		    ins_bytes(compl_leader + ins_compl_len());
- 		else if (compl_first_match != NULL)
--		    ins_bytes(compl_orig_text
--					  + curwin->w_cursor.col - compl_col);
-+		    ins_bytes(compl_orig_text + ins_compl_len());
- 		retval = TRUE;
- 	    }
- 
-@@ -3907,7 +3968,7 @@
- 			    : ins_buf->b_sfname == NULL
- 				? (char *)ins_buf->b_fname
- 				: (char *)ins_buf->b_sfname);
--		msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
-+		(void)msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
- 	    }
- 	    else if (*e_cpt == NUL)
- 		break;
-@@ -3936,8 +3997,8 @@
- 		else if (*e_cpt == ']' || *e_cpt == 't')
- 		{
- 		    type = CTRL_X_TAGS;
--		    sprintf((char*)IObuff, _("Scanning tags."));
--		    msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
-+		    vim_snprintf((char *)IObuff, IOSIZE, _("Scanning tags."));
-+		    (void)msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
- 		}
- 		else
- 		    type = -1;
-@@ -4035,7 +4096,7 @@
- 	case CTRL_X_SPELL:
- #ifdef FEAT_SPELL
- 	    num_matches = expand_spelling(first_match_pos.lnum,
--				 first_match_pos.col, compl_pattern, &matches);
-+						     compl_pattern, &matches);
- 	    if (num_matches > 0)
- 		ins_compl_add_matches(num_matches, matches, p_ic);
- #endif
-@@ -4187,7 +4248,7 @@
- 	}
- 
- 	/* check if compl_curr_match has changed, (e.g. other type of
--	 * expansion added somenthing) */
-+	 * expansion added something) */
- 	if (type != 0 && compl_curr_match != old_match)
- 	    found_new_match = OK;
- 
-@@ -4256,7 +4317,7 @@
-     static void
- ins_compl_insert()
- {
--    ins_bytes(compl_shown_match->cp_str + curwin->w_cursor.col - compl_col);
-+    ins_bytes(compl_shown_match->cp_str + ins_compl_len());
-     if (compl_shown_match->cp_flags & ORIGINAL_TEXT)
- 	compl_used_match = FALSE;
-     else
-@@ -4425,7 +4486,7 @@
- 	if (!compl_get_longest || compl_used_match)
- 	    ins_compl_insert();
- 	else
--	    ins_bytes(compl_leader + curwin->w_cursor.col - compl_col);
-+	    ins_bytes(compl_leader + ins_compl_len());
-     }
-     else
- 	compl_used_match = FALSE;
-@@ -4688,7 +4749,7 @@
- 		}
- 		compl_length = curwin->w_cursor.col - (int)compl_col;
- 		/* IObuff is used to add a "word from the next line" would we
--		 * have enough space?  just being paranoic */
-+		 * have enough space?  just being paranoid */
- #define	MIN_SPACE 75
- 		if (compl_length > (IOSIZE - MIN_SPACE))
- 		{
-@@ -4745,10 +4806,9 @@
- 	    {
- 		char_u	    *prefix = (char_u *)"\\<";
- 
--		/* we need 3 extra chars, 1 for the NUL and
--		 * 2 >= strlen(prefix)	-- Acevedo */
-+		/* we need up to 2 extra chars for the prefix */
- 		compl_pattern = alloc(quote_meta(NULL, line + compl_col,
--							   compl_length) + 3);
-+							   compl_length) + 2);
- 		if (compl_pattern == NULL)
- 		    return FAIL;
- 		if (!vim_iswordp(line + compl_col)
-@@ -4823,7 +4883,7 @@
- 		else
- 		{
- 		    compl_pattern = alloc(quote_meta(NULL, line + compl_col,
--							   compl_length) + 3);
-+							   compl_length) + 2);
- 		    if (compl_pattern == NULL)
- 			return FAIL;
- 		    STRCPY((char *)compl_pattern, "\\<");
-@@ -4905,7 +4965,7 @@
- 	    if (col < 0)
- 		col = curs_col;
- 	    compl_col = col;
--	    if ((colnr_T)compl_col > curs_col)
-+	    if (compl_col > curs_col)
- 		compl_col = curs_col;
- 
- 	    /* Setup variables for completion.  Need to obtain "line" again,
-@@ -5178,15 +5238,15 @@
-  * a backslash) the metachars, and dest would be NUL terminated.
-  * Returns the length (needed) of dest
-  */
--    static int
-+    static unsigned
- quote_meta(dest, src, len)
-     char_u	*dest;
-     char_u	*src;
-     int		len;
- {
--    int	m;
-+    unsigned	m = (unsigned)len + 1;  /* one extra for the NUL */
- 
--    for (m = len; --len >= 0; src++)
-+    for ( ; --len >= 0; src++)
-     {
- 	switch (*src)
- 	{
-@@ -6015,7 +6075,7 @@
-      * in 'formatoptions' and there is a single character before the cursor.
-      * Otherwise the line would be broken and when typing another non-white
-      * next they are not joined back together. */
--    wasatend = (pos.col == STRLEN(old));
-+    wasatend = (pos.col == (colnr_T)STRLEN(old));
-     if (*old != NUL && !trailblank && wasatend)
-     {
- 	dec_cursor();
-@@ -6192,7 +6252,7 @@
-      * three digits. */
-     if (VIM_ISDIGIT(c))
-     {
--	sprintf((char *)buf, "%03d", c);
-+	vim_snprintf((char *)buf, sizeof(buf), "%03d", c);
- 	AppendToRedobuff(buf);
-     }
-     else
-@@ -6266,7 +6326,7 @@
- 	    ins_need_undo = FALSE;
- 	}
- 	Insstart = curwin->w_cursor;	/* new insertion starts here */
--	Insstart_textlen = linetabsize(ml_get_curline());
-+	Insstart_textlen = (colnr_T)linetabsize(ml_get_curline());
- 	ai_col = 0;
- #ifdef FEAT_VREPLACE
- 	if (State & VREPLACE_FLAG)
-@@ -6369,13 +6429,17 @@
- 
- 	/* If we just did an auto-indent, remove the white space from the end
- 	 * of the line, and put the cursor back.
--	 * Do this when ESC was used or moving the cursor up/down. */
-+	 * Do this when ESC was used or moving the cursor up/down.
-+	 * Check for the old position still being valid, just in case the text
-+	 * got changed unexpectedly. */
- 	if (did_ai && (esc || (vim_strchr(p_cpo, CPO_INDENT) == NULL
--			&& curwin->w_cursor.lnum != end_insert_pos->lnum)))
-+			&& curwin->w_cursor.lnum != end_insert_pos->lnum))
-+		&& end_insert_pos->lnum <= curbuf->b_ml.ml_line_count)
- 	{
- 	    pos_T	tpos = curwin->w_cursor;
- 
- 	    curwin->w_cursor = *end_insert_pos;
-+	    check_cursor_col();  /* make sure it is not past the line */
- 	    for (;;)
- 	    {
- 		if (gchar_cursor() == NUL && curwin->w_cursor.col > 0)
-@@ -6383,7 +6447,8 @@
- 		cc = gchar_cursor();
- 		if (!vim_iswhite(cc))
- 		    break;
--		(void)del_char(TRUE);
-+		if (del_char(TRUE) == FAIL)
-+		    break;  /* should not happen */
- 	    }
- 	    if (curwin->w_cursor.lnum != tpos.lnum)
- 		curwin->w_cursor = tpos;
-@@ -6395,10 +6460,11 @@
- 	     * deleted characters. */
- 	    if (VIsual_active && VIsual.lnum == curwin->w_cursor.lnum)
- 	    {
--		cc = (int)STRLEN(ml_get_curline());
--		if (VIsual.col > (colnr_T)cc)
-+		int len = (int)STRLEN(ml_get_curline());
-+
-+		if (VIsual.col > len)
- 		{
--		    VIsual.col = cc;
-+		    VIsual.col = len;
- # ifdef FEAT_VIRTUALEDIT
- 		    VIsual.coladd = 0;
- # endif
-@@ -7123,9 +7189,12 @@
-  * cc == 0: character was inserted, delete it
-  * cc > 0: character was replaced, put cc (first byte of original char) back
-  * and check for more characters to be put back
-+ * When "limit_col" is >= 0, don't delete before this column.  Matters when
-+ * using composing characters, use del_char_after_col() instead of del_char().
-  */
-     static void
--replace_do_bs()
-+replace_do_bs(limit_col)
-+    int		limit_col;
- {
-     int		cc;
- #ifdef FEAT_VREPLACE
-@@ -7153,7 +7222,7 @@
- #ifdef FEAT_MBYTE
- 	if (has_mbyte)
- 	{
--	    del_char(FALSE);
-+	    (void)del_char_after_col(limit_col);
- # ifdef FEAT_VREPLACE
- 	    if (State & VREPLACE_FLAG)
- 		orig_len = (int)STRLEN(ml_get_cursor());
-@@ -7203,7 +7272,7 @@
- 	changed_bytes(curwin->w_cursor.lnum, curwin->w_cursor.col);
-     }
-     else if (cc == 0)
--	(void)del_char(FALSE);
-+	(void)del_char_after_col(limit_col);
- }
- 
- #ifdef FEAT_CINDENT
-@@ -7646,9 +7715,7 @@
-      */
-     ++no_mapping;
-     regname = plain_vgetc();
--#ifdef FEAT_LANGMAP
-     LANGMAP_ADJUST(regname, TRUE);
--#endif
-     if (regname == Ctrl_R || regname == Ctrl_O || regname == Ctrl_P)
-     {
- 	/* Get a third key for literal register insertion */
-@@ -7657,9 +7724,7 @@
- 	add_to_showcmd_c(literally);
- #endif
- 	regname = plain_vgetc();
--#ifdef FEAT_LANGMAP
- 	LANGMAP_ADJUST(regname, TRUE);
--#endif
-     }
-     --no_mapping;
- 
-@@ -8150,7 +8215,7 @@
- /*
-  * If the cursor is on an indent, ^T/^D insert/delete one
-  * shiftwidth.	Otherwise ^T/^D behave like a "<<" or ">>".
-- * Always round the indent to 'shiftwith', this is compatible
-+ * Always round the indent to 'shiftwidth', this is compatible
-  * with vi.  But vi only supports ^T and ^D after an
-  * autoindent, we support it everywhere.
-  */
-@@ -8239,7 +8304,7 @@
- 	 * Replace mode */
- 	if (curwin->w_cursor.lnum != Insstart.lnum
- 		|| curwin->w_cursor.col >= Insstart.col)
--	    replace_do_bs();
-+	    replace_do_bs(-1);
-     }
-     else
- 	(void)del_char(FALSE);
-@@ -8258,6 +8323,7 @@
-     linenr_T	lnum;
-     int		cc;
-     int		temp = 0;	    /* init for GCC */
-+    colnr_T	save_col;
-     colnr_T	mincol;
-     int		did_backspace = FALSE;
-     int		in_indent;
-@@ -8415,13 +8481,13 @@
- 		 */
- 		while (cc > 0)
- 		{
--		    temp = curwin->w_cursor.col;
-+		    save_col = curwin->w_cursor.col;
- #ifdef FEAT_MBYTE
- 		    mb_replace_pop_ins(cc);
- #else
- 		    ins_char(cc);
- #endif
--		    curwin->w_cursor.col = temp;
-+		    curwin->w_cursor.col = save_col;
- 		    cc = replace_pop();
- 		}
- 		/* restore the characters that NL replaced */
-@@ -8453,11 +8519,11 @@
- #endif
- 			    )
- 	{
--	    temp = curwin->w_cursor.col;
-+	    save_col = curwin->w_cursor.col;
- 	    beginline(BL_WHITE);
- 	    if (curwin->w_cursor.col < (colnr_T)temp)
- 		mincol = curwin->w_cursor.col;
--	    curwin->w_cursor.col = temp;
-+	    curwin->w_cursor.col = save_col;
- 	}
- 
- 	/*
-@@ -8556,7 +8622,7 @@
- 		break;
- 	    }
- 	    if (State & REPLACE_FLAG)
--		replace_do_bs();
-+		replace_do_bs(-1);
- 	    else
- 	    {
- #ifdef FEAT_MBYTE
-@@ -8931,7 +8997,10 @@
- 	foldOpenCursor();
- #endif
-     undisplay_dollar();
--    if (gchar_cursor() != NUL || virtual_active()
-+    if (gchar_cursor() != NUL
-+#ifdef FEAT_VIRTUALEDIT
-+	    || virtual_active()
-+#endif
- 	    )
-     {
- 	start_arrow(&curwin->w_cursor);
-diff -Naur vim72.orig/src/eval.c vim72/src/eval.c
---- vim72.orig/src/eval.c	2008-08-07 12:37:22.000000000 -0700
-+++ vim72/src/eval.c	2009-07-19 15:17:12.000000000 -0700
-@@ -32,6 +32,9 @@
- 
- #define DICT_MAXNEST 100	/* maximum nesting of lists and dicts */
- 
-+#define DO_NOT_FREE_CNT 99999	/* refcount for dict or list that should not
-+				   be freed. */
-+
- /*
-  * In a hashtab item "hi_key" points to "di_key" in a dictitem.
-  * This avoids adding a pointer to the hashtab item.
-@@ -126,8 +129,11 @@
- /*
-  * When recursively copying lists and dicts we need to remember which ones we
-  * have done to avoid endless recursiveness.  This unique ID is used for that.
-+ * The last bit is used for previous_funccal, ignored when comparing.
-  */
- static int current_copyID = 0;
-+#define COPYID_INC 2
-+#define COPYID_MASK (~0x1)
- 
- /*
-  * Array to hold the hashtab with variables local to each sourced script.
-@@ -280,7 +286,7 @@
- #define VV_RO		2	/* read-only */
- #define VV_RO_SBX	4	/* read-only in the sandbox */
- 
--#define VV_NAME(s, t)	s, {{t}}, {0}
-+#define VV_NAME(s, t)	s, {{t, 0, {0}}, 0, {0}}, {0}
- 
- static struct vimvar
- {
-@@ -348,6 +354,7 @@
-     {VV_NAME("mouse_col",	 VAR_NUMBER), 0},
-     {VV_NAME("operator",	 VAR_STRING), VV_RO},
-     {VV_NAME("searchforward",	 VAR_NUMBER), 0},
-+    {VV_NAME("oldfiles",	 VAR_LIST), 0},
- };
- 
- /* shorthand */
-@@ -355,6 +362,7 @@
- #define vv_nr		vv_di.di_tv.vval.v_number
- #define vv_float	vv_di.di_tv.vval.v_float
- #define vv_str		vv_di.di_tv.vval.v_string
-+#define vv_list		vv_di.di_tv.vval.v_list
- #define vv_tv		vv_di.di_tv
- 
- /*
-@@ -426,7 +434,6 @@
- static long list_idx_of_item __ARGS((list_T *l, listitem_T *item));
- static void list_append __ARGS((list_T *l, listitem_T *item));
- static int list_append_tv __ARGS((list_T *l, typval_T *tv));
--static int list_append_string __ARGS((list_T *l, char_u *str, int len));
- static int list_append_number __ARGS((list_T *l, varnumber_T n));
- static int list_insert_tv __ARGS((list_T *l, typval_T *tv, listitem_T *item));
- static int list_extend __ARGS((list_T	*l1, list_T *l2, listitem_T *bef));
-@@ -435,6 +442,7 @@
- static void list_remove __ARGS((list_T *l, listitem_T *item, listitem_T *item2));
- static char_u *list2string __ARGS((typval_T *tv, int copyID));
- static int list_join __ARGS((garray_T *gap, list_T *l, char_u *sep, int echo, int copyID));
-+static int free_unref_items __ARGS((int copyID));
- static void set_ref_in_ht __ARGS((hashtab_T *ht, int copyID));
- static void set_ref_in_list __ARGS((list_T *l, int copyID));
- static void set_ref_in_item __ARGS((typval_T *tv, int copyID));
-@@ -788,6 +796,8 @@
- static void func_unref __ARGS((char_u *name));
- static void func_ref __ARGS((char_u *name));
- static void call_user_func __ARGS((ufunc_T *fp, int argcount, typval_T *argvars, typval_T *rettv, linenr_T firstline, linenr_T lastline, dict_T *selfdict));
-+static int can_free_funccal __ARGS((funccall_T *fc, int copyID)) ;
-+static void free_funccal __ARGS((funccall_T *fc, int free_val));
- static void add_nr_var __ARGS((dict_T *dp, dictitem_T *v, char *name, varnumber_T nr));
- static win_T *find_win_by_nr __ARGS((typval_T *vp, tabpage_T *tp));
- static void getwinvar __ARGS((typval_T *argvars, typval_T *rettv, int off));
-@@ -845,11 +855,17 @@
- 	p = &vimvars[i];
- 	if (p->vv_di.di_tv.v_type == VAR_STRING)
- 	{
--	    vim_free(p->vv_di.di_tv.vval.v_string);
--	    p->vv_di.di_tv.vval.v_string = NULL;
-+	    vim_free(p->vv_str);
-+	    p->vv_str = NULL;
-+	}
-+	else if (p->vv_di.di_tv.v_type == VAR_LIST)
-+	{
-+	    list_unref(p->vv_list);
-+	    p->vv_list = NULL;
- 	}
-     }
-     hash_clear(&vimvarht);
-+    hash_init(&vimvarht);  /* garbage_collect() will access it */
-     hash_clear(&compat_hashtab);
- 
-     /* script-local variables */
-@@ -916,6 +932,10 @@
- /* pointer to funccal for currently active function */
- funccall_T *current_funccal = NULL;
- 
-+/* pointer to list of previously used funccal, still around because some
-+ * item in it is still being used. */
-+funccall_T *previous_funccal = NULL;
-+
- /*
-  * Return TRUE when a function was ended by a ":return" command.
-  */
-@@ -1256,23 +1276,28 @@
- 
- /*
-  * Top level evaluation function, returning a string.
-+ * When "convert" is TRUE convert a List into a sequence of lines and convert
-+ * a Float to a String.
-  * Return pointer to allocated memory, or NULL for failure.
-  */
-     char_u *
--eval_to_string(arg, nextcmd, dolist)
-+eval_to_string(arg, nextcmd, convert)
-     char_u	*arg;
-     char_u	**nextcmd;
--    int		dolist;		/* turn List into sequence of lines */
-+    int		convert;
- {
-     typval_T	tv;
-     char_u	*retval;
-     garray_T	ga;
-+#ifdef FEAT_FLOAT
-+    char_u	numbuf[NUMBUFLEN];
-+#endif
- 
-     if (eval0(arg, &tv, nextcmd, TRUE) == FAIL)
- 	retval = NULL;
-     else
-     {
--	if (dolist && tv.v_type == VAR_LIST)
-+	if (convert && tv.v_type == VAR_LIST)
- 	{
- 	    ga_init2(&ga, (int)sizeof(char), 80);
- 	    if (tv.vval.v_list != NULL)
-@@ -1280,6 +1305,13 @@
- 	    ga_append(&ga, NUL);
- 	    retval = (char_u *)ga.ga_data;
- 	}
-+#ifdef FEAT_FLOAT
-+	else if (convert && tv.v_type == VAR_FLOAT)
-+	{
-+	    vim_snprintf((char *)numbuf, NUMBUFLEN, "%g", tv.vval.v_float);
-+	    retval = vim_strsave(numbuf);
-+	}
-+#endif
- 	else
- 	    retval = vim_strsave(get_tv_string(&tv));
- 	clear_tv(&tv);
-@@ -3277,7 +3309,7 @@
- 
-     if (*startarg != '(')
-     {
--	EMSG2(_("E107: Missing braces: %s"), eap->arg);
-+	EMSG2(_("E107: Missing parentheses: %s"), eap->arg);
- 	goto end;
-     }
- 
-@@ -3657,8 +3689,8 @@
- }
- 
- /*
-- * Return TRUE if typeval "tv" is locked: Either tha value is locked itself or
-- * it refers to a List or Dictionary that is locked.
-+ * Return TRUE if typeval "tv" is locked: Either that value is locked itself
-+ * or it refers to a List or Dictionary that is locked.
-  */
-     static int
- tv_islocked(tv)
-@@ -3744,7 +3776,6 @@
-  * Function given to ExpandGeneric() to obtain the list of user defined
-  * (global/buffer/window/built-in) variable names.
-  */
--/*ARGSUSED*/
-     char_u *
- get_user_var_name(xp, idx)
-     expand_T	*xp;
-@@ -3902,7 +3933,7 @@
- 
- /*
-  * Handle top level expression:
-- *	expr1 ? expr0 : expr0
-+ *	expr2 ? expr1 : expr1
-  *
-  * "arg" must point to the first non-white of the expression.
-  * "arg" is advanced to the next non-white after the recognized expression.
-@@ -6047,6 +6078,25 @@
- }
- 
- /*
-+ * Get list item "l[idx - 1]" as a string.  Returns NULL for failure.
-+ */
-+    char_u *
-+list_find_str(l, idx)
-+    list_T	*l;
-+    long	idx;
-+{
-+    listitem_T	*li;
-+
-+    li = list_find(l, idx - 1);
-+    if (li == NULL)
-+    {
-+	EMSGN(_(e_listidx), idx);
-+	return NULL;
-+    }
-+    return get_tv_string(&li->li_tv);
-+}
-+
-+/*
-  * Locate "item" list "l" and return its index.
-  * Returns -1 when "item" is not in the list.
-  */
-@@ -6137,7 +6187,7 @@
-  * When "len" >= 0 use "str[len]".
-  * Returns FAIL when out of memory.
-  */
--    static int
-+    int
- list_append_string(l, str, len)
-     list_T	*l;
-     char_u	*str;
-@@ -6448,14 +6498,13 @@
-     int
- garbage_collect()
- {
--    dict_T	*dd;
--    list_T	*ll;
--    int		copyID = ++current_copyID;
-+    int		copyID;
-     buf_T	*buf;
-     win_T	*wp;
-     int		i;
--    funccall_T	*fc;
--    int		did_free = FALSE;
-+    funccall_T	*fc, **pfc;
-+    int		did_free;
-+    int		did_free_funccal = FALSE;
- #ifdef FEAT_WINDOWS
-     tabpage_T	*tp;
- #endif
-@@ -6465,10 +6514,25 @@
-     may_garbage_collect = FALSE;
-     garbage_collect_at_exit = FALSE;
- 
-+    /* We advance by two because we add one for items referenced through
-+     * previous_funccal. */
-+    current_copyID += COPYID_INC;
-+    copyID = current_copyID;
-+
-     /*
-      * 1. Go through all accessible variables and mark all lists and dicts
-      *    with copyID.
-      */
-+
-+    /* Don't free variables in the previous_funccal list unless they are only
-+     * referenced through previous_funccal.  This must be first, because if
-+     * the item is referenced elsewhere the funccal must not be freed. */
-+    for (fc = previous_funccal; fc != NULL; fc = fc->caller)
-+    {
-+	set_ref_in_ht(&fc->l_vars.dv_hashtab, copyID + 1);
-+	set_ref_in_ht(&fc->l_avars.dv_hashtab, copyID + 1);
-+    }
-+
-     /* script-local variables */
-     for (i = 1; i <= ga_scripts.ga_len; ++i)
- 	set_ref_in_ht(&SCRIPT_VARS(i), copyID);
-@@ -6497,11 +6561,54 @@
- 	set_ref_in_ht(&fc->l_avars.dv_hashtab, copyID);
-     }
- 
-+    /* v: vars */
-+    set_ref_in_ht(&vimvarht, copyID);
-+
-+    /*
-+     * 2. Free lists and dictionaries that are not referenced.
-+     */
-+    did_free = free_unref_items(copyID);
-+
-     /*
--     * 2. Go through the list of dicts and free items without the copyID.
-+     * 3. Check if any funccal can be freed now.
-+     */
-+    for (pfc = &previous_funccal; *pfc != NULL; )
-+    {
-+	if (can_free_funccal(*pfc, copyID))
-+	{
-+	    fc = *pfc;
-+	    *pfc = fc->caller;
-+	    free_funccal(fc, TRUE);
-+	    did_free = TRUE;
-+	    did_free_funccal = TRUE;
-+	}
-+	else
-+	    pfc = &(*pfc)->caller;
-+    }
-+    if (did_free_funccal)
-+	/* When a funccal was freed some more items might be garbage
-+	 * collected, so run again. */
-+	(void)garbage_collect();
-+
-+    return did_free;
-+}
-+
-+/*
-+ * Free lists and dictionaries that are no longer referenced.
-+ */
-+    static int
-+free_unref_items(copyID)
-+    int copyID;
-+{
-+    dict_T	*dd;
-+    list_T	*ll;
-+    int		did_free = FALSE;
-+
-+    /*
-+     * Go through the list of dicts and free items without the copyID.
-      */
-     for (dd = first_dict; dd != NULL; )
--	if (dd->dv_copyID != copyID)
-+	if ((dd->dv_copyID & COPYID_MASK) != (copyID & COPYID_MASK))
- 	{
- 	    /* Free the Dictionary and ordinary items it contains, but don't
- 	     * recurse into Lists and Dictionaries, they will be in the list
-@@ -6516,12 +6623,13 @@
- 	    dd = dd->dv_used_next;
- 
-     /*
--     * 3. Go through the list of lists and free items without the copyID.
--     *    But don't free a list that has a watcher (used in a for loop), these
--     *    are not referenced anywhere.
-+     * Go through the list of lists and free items without the copyID.
-+     * But don't free a list that has a watcher (used in a for loop), these
-+     * are not referenced anywhere.
-      */
-     for (ll = first_list; ll != NULL; )
--	if (ll->lv_copyID != copyID && ll->lv_watch == NULL)
-+	if ((ll->lv_copyID & COPYID_MASK) != (copyID & COPYID_MASK)
-+						      && ll->lv_watch == NULL)
- 	{
- 	    /* Free the List and ordinary items it contains, but don't recurse
- 	     * into Lists and Dictionaries, they will be in the list of dicts
-@@ -6587,7 +6695,7 @@
-     {
- 	case VAR_DICT:
- 	    dd = tv->vval.v_dict;
--	    if (dd->dv_copyID != copyID)
-+	    if (dd != NULL && dd->dv_copyID != copyID)
- 	    {
- 		/* Didn't see this dict yet. */
- 		dd->dv_copyID = copyID;
-@@ -6597,7 +6705,7 @@
- 
- 	case VAR_LIST:
- 	    ll = tv->vval.v_list;
--	    if (ll->lv_copyID != copyID)
-+	    if (ll != NULL && ll->lv_copyID != copyID)
- 	    {
- 		/* Didn't see this list yet. */
- 		ll->lv_copyID = copyID;
-@@ -7525,8 +7633,8 @@
-     {"getwinposx",	0, 0, f_getwinposx},
-     {"getwinposy",	0, 0, f_getwinposy},
-     {"getwinvar",	2, 2, f_getwinvar},
--    {"glob",		1, 1, f_glob},
--    {"globpath",	2, 2, f_globpath},
-+    {"glob",		1, 2, f_glob},
-+    {"globpath",	2, 3, f_globpath},
-     {"has",		1, 1, f_has},
-     {"has_key",		2, 2, f_has_key},
-     {"haslocaldir",	0, 0, f_haslocaldir},
-@@ -7723,7 +7831,6 @@
-  * Function given to ExpandGeneric() to obtain the list of internal or
-  * user defined variable or function names.
-  */
--/*ARGSUSED*/
-     char_u *
- get_expr_name(xp, idx)
-     expand_T	*xp;
-@@ -7856,9 +7963,9 @@
-     else if (!aborting())
-     {
- 	if (argcount == MAX_FUNC_ARGS)
--	    emsg_funcname("E740: Too many arguments for function %s", name);
-+	    emsg_funcname(N_("E740: Too many arguments for function %s"), name);
- 	else
--	    emsg_funcname("E116: Invalid arguments for function %s", name);
-+	    emsg_funcname(N_("E116: Invalid arguments for function %s"), name);
-     }
- 
-     while (--argcount >= 0)
-@@ -7956,7 +8063,8 @@
-     /* execute the function if no errors detected and executing */
-     if (evaluate && error == ERROR_NONE)
-     {
--	rettv->v_type = VAR_NUMBER;	/* default is number rettv */
-+	rettv->v_type = VAR_NUMBER;	/* default rettv is number zero */
-+	rettv->vval.v_number = 0;
- 	error = ERROR_UNKNOWN;
- 
- 	if (!builtin_function(fname))
-@@ -8091,6 +8199,7 @@
- 
- /*
-  * Give an error message with a function name.  Handle <SNR> things.
-+ * "ermsg" is to be passed without translation, use N_() instead of _().
-  */
-     static void
- emsg_funcname(ermsg, name)
-@@ -8205,7 +8314,6 @@
- 		return;
- 	    li = l->lv_first;
- 	}
--	rettv->vval.v_number = 0;	/* Default: Success */
- 	for (;;)
- 	{
- 	    if (l == NULL)
-@@ -8238,10 +8346,9 @@
- /*
-  * "argc()" function
-  */
--/* ARGSUSED */
-     static void
- f_argc(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     rettv->vval.v_number = ARGCOUNT;
-@@ -8250,10 +8357,9 @@
- /*
-  * "argidx()" function
-  */
--/* ARGSUSED */
-     static void
- f_argidx(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     rettv->vval.v_number = curwin->w_arg_idx;
-@@ -8331,10 +8437,9 @@
- /*
-  * "browse(save, title, initdir, default)" function
-  */
--/* ARGSUSED */
-     static void
- f_browse(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
- #ifdef FEAT_BROWSE
-@@ -8366,10 +8471,9 @@
- /*
-  * "browsedir(title, initdir)" function
-  */
--/* ARGSUSED */
-     static void
- f_browsedir(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
- #ifdef FEAT_BROWSE
-@@ -8594,10 +8698,9 @@
- /*
-  * "byte2line(byte)" function
-  */
--/*ARGSUSED*/
-     static void
- f_byte2line(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
- #ifndef FEAT_BYTEOFF
-@@ -8617,7 +8720,6 @@
- /*
-  * "byteidx()" function
-  */
--/*ARGSUSED*/
-     static void
- f_byteidx(argvars, rettv)
-     typval_T	*argvars;
-@@ -8665,7 +8767,6 @@
-     int		dummy;
-     dict_T	*selfdict = NULL;
- 
--    rettv->vval.v_number = 0;
-     if (argvars[1].v_type != VAR_LIST)
-     {
- 	EMSG(_(e_listreq));
-@@ -8737,10 +8838,9 @@
- /*
-  * "changenr()" function
-  */
--/*ARGSUSED*/
-     static void
- f_changenr(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     rettv->vval.v_number = curbuf->b_u_seq_cur;
-@@ -8790,11 +8890,10 @@
- /*
-  * "clearmatches()" function
-  */
--/*ARGSUSED*/
-     static void
- f_clearmatches(argvars, rettv)
--    typval_T	*argvars;
--    typval_T	*rettv;
-+    typval_T	*argvars UNUSED;
-+    typval_T	*rettv UNUSED;
- {
- #ifdef FEAT_SEARCH_EXTRA
-     clear_matches(curwin);
-@@ -8858,11 +8957,10 @@
- /*
-  * "complete()" function
-  */
--/*ARGSUSED*/
-     static void
- f_complete(argvars, rettv)
-     typval_T	*argvars;
--    typval_T	*rettv;
-+    typval_T	*rettv UNUSED;
- {
-     int	    startcol;
- 
-@@ -8893,7 +8991,6 @@
- /*
-  * "complete_add()" function
-  */
--/*ARGSUSED*/
-     static void
- f_complete_add(argvars, rettv)
-     typval_T	*argvars;
-@@ -8905,10 +9002,9 @@
- /*
-  * "complete_check()" function
-  */
--/*ARGSUSED*/
-     static void
- f_complete_check(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     int		saved = RedrawingDisabled;
-@@ -8923,11 +9019,10 @@
- /*
-  * "confirm(message, buttons[, default [, type]])" function
-  */
--/*ARGSUSED*/
-     static void
- f_confirm(argvars, rettv)
--    typval_T	*argvars;
--    typval_T	*rettv;
-+    typval_T	*argvars UNUSED;
-+    typval_T	*rettv UNUSED;
- {
- #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
-     char_u	*message;
-@@ -8973,13 +9068,9 @@
-     if (buttons == NULL || *buttons == NUL)
- 	buttons = (char_u *)_("&Ok");
- 
--    if (error)
--	rettv->vval.v_number = 0;
--    else
-+    if (!error)
- 	rettv->vval.v_number = do_dialog(type, NULL, message, buttons,
- 								   def, NULL);
--#else
--    rettv->vval.v_number = 0;
- #endif
- }
- 
-@@ -9096,11 +9187,10 @@
-  *
-  * Checks the existence of a cscope connection.
-  */
--/*ARGSUSED*/
-     static void
- f_cscope_connection(argvars, rettv)
--    typval_T	*argvars;
--    typval_T	*rettv;
-+    typval_T	*argvars UNUSED;
-+    typval_T	*rettv UNUSED;
- {
- #ifdef FEAT_CSCOPE
-     int		num = 0;
-@@ -9118,17 +9208,15 @@
-     }
- 
-     rettv->vval.v_number = cs_connection(num, dbpath, prepend);
--#else
--    rettv->vval.v_number = 0;
- #endif
- }
- 
- /*
-  * "cursor(lnum, col)" function
-  *
-- * Moves the cursor to the specified line and column
-+ * Moves the cursor to the specified line and column.
-+ * Returns 0 when the position could be set, -1 otherwise.
-  */
--/*ARGSUSED*/
-     static void
- f_cursor(argvars, rettv)
-     typval_T	*argvars;
-@@ -9139,6 +9227,7 @@
-     long	coladd = 0;
- #endif
- 
-+    rettv->vval.v_number = -1;
-     if (argvars[1].v_type == VAR_UNKNOWN)
-     {
- 	pos_T	    pos;
-@@ -9183,6 +9272,7 @@
- #endif
- 
-     curwin->w_set_curswant = TRUE;
-+    rettv->vval.v_number = 0;
- }
- 
- /*
-@@ -9200,7 +9290,10 @@
-     if (noref < 0 || noref > 1)
- 	EMSG(_(e_invarg));
-     else
--	item_copy(&argvars[0], rettv, TRUE, noref == 0 ? ++current_copyID : 0);
-+    {
-+	current_copyID += COPYID_INC;
-+	item_copy(&argvars[0], rettv, TRUE, noref == 0 ? current_copyID : 0);
-+    }
- }
- 
- /*
-@@ -9220,27 +9313,23 @@
- /*
-  * "did_filetype()" function
-  */
--/*ARGSUSED*/
-     static void
- f_did_filetype(argvars, rettv)
--    typval_T	*argvars;
--    typval_T	*rettv;
-+    typval_T	*argvars UNUSED;
-+    typval_T	*rettv UNUSED;
- {
- #ifdef FEAT_AUTOCMD
-     rettv->vval.v_number = did_filetype;
--#else
--    rettv->vval.v_number = 0;
- #endif
- }
- 
- /*
-  * "diff_filler()" function
-  */
--/*ARGSUSED*/
-     static void
- f_diff_filler(argvars, rettv)
--    typval_T	*argvars;
--    typval_T	*rettv;
-+    typval_T	*argvars UNUSED;
-+    typval_T	*rettv UNUSED;
- {
- #ifdef FEAT_DIFF
-     rettv->vval.v_number = diff_check_fill(curwin, get_tv_lnum(argvars));
-@@ -9250,11 +9339,10 @@
- /*
-  * "diff_hlID()" function
-  */
--/*ARGSUSED*/
-     static void
- f_diff_hlID(argvars, rettv)
--    typval_T	*argvars;
--    typval_T	*rettv;
-+    typval_T	*argvars UNUSED;
-+    typval_T	*rettv UNUSED;
- {
- #ifdef FEAT_DIFF
-     linenr_T		lnum = get_tv_lnum(argvars);
-@@ -9367,7 +9455,6 @@
- /*
-  * "eval()" function
-  */
--/*ARGSUSED*/
-     static void
- f_eval(argvars, rettv)
-     typval_T	*argvars;
-@@ -9391,10 +9478,9 @@
- /*
-  * "eventhandler()" function
-  */
--/*ARGSUSED*/
-     static void
- f_eventhandler(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     rettv->vval.v_number = vgetc_busy;
-@@ -9518,7 +9604,7 @@
-     else
-     {
- 	/* When the optional second argument is non-zero, don't remove matches
--	 * for 'suffixes' and 'wildignore' */
-+	 * for 'wildignore' and don't put matches for 'suffixes' at the end. */
- 	if (argvars[1].v_type != VAR_UNKNOWN
- 				    && get_tv_number_chk(&argvars[1], &error))
- 	    flags |= WILD_KEEP_ALL;
-@@ -9542,7 +9628,6 @@
-     typval_T	*argvars;
-     typval_T	*rettv;
- {
--    rettv->vval.v_number = 0;
-     if (argvars[0].v_type == VAR_LIST && argvars[1].v_type == VAR_LIST)
-     {
- 	list_T		*l1, *l2;
-@@ -9652,11 +9737,10 @@
- /*
-  * "feedkeys()" function
-  */
--/*ARGSUSED*/
-     static void
- f_feedkeys(argvars, rettv)
-     typval_T    *argvars;
--    typval_T    *rettv;
-+    typval_T    *rettv UNUSED;
- {
-     int		remap = TRUE;
-     char_u	*keys, *flags;
-@@ -9670,7 +9754,6 @@
-     if (check_secure())
- 	return;
- 
--    rettv->vval.v_number = 0;
-     keys = get_tv_string(&argvars[0]);
-     if (*keys != NUL)
-     {
-@@ -9838,7 +9921,6 @@
-     char_u	*ermsg = map ? (char_u *)"map()" : (char_u *)"filter()";
-     int		save_did_emsg;
- 
--    rettv->vval.v_number = 0;
-     if (argvars[0].v_type == VAR_LIST)
-     {
- 	if ((l = argvars[0].vval.v_list) == NULL
-@@ -10021,8 +10103,6 @@
- 	else
- 	    rettv->vval.v_number = (varnumber_T)f;
-     }
--    else
--	rettv->vval.v_number = 0;
- }
- 
- /*
-@@ -10156,18 +10236,15 @@
-     lnum = get_tv_lnum(argvars);
-     if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count)
- 	rettv->vval.v_number = foldLevel(lnum);
--    else
- #endif
--	rettv->vval.v_number = 0;
- }
- 
- /*
-  * "foldtext()" function
-  */
--/*ARGSUSED*/
-     static void
- f_foldtext(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
- #ifdef FEAT_FOLDING
-@@ -10232,10 +10309,9 @@
- /*
-  * "foldtextresult(lnum)" function
-  */
--/*ARGSUSED*/
-     static void
- f_foldtextresult(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
- #ifdef FEAT_FOLDING
-@@ -10268,13 +10344,11 @@
- /*
-  * "foreground()" function
-  */
--/*ARGSUSED*/
-     static void
- f_foreground(argvars, rettv)
--    typval_T	*argvars;
--    typval_T	*rettv;
-+    typval_T	*argvars UNUSED;
-+    typval_T	*rettv UNUSED;
- {
--    rettv->vval.v_number = 0;
- #ifdef FEAT_GUI
-     if (gui.in_use)
- 	gui_mch_set_foreground();
-@@ -10288,7 +10362,6 @@
- /*
-  * "function()" function
-  */
--/*ARGSUSED*/
-     static void
- f_function(argvars, rettv)
-     typval_T	*argvars;
-@@ -10296,11 +10369,11 @@
- {
-     char_u	*s;
- 
--    rettv->vval.v_number = 0;
-     s = get_tv_string(&argvars[0]);
-     if (s == NULL || *s == NUL || VIM_ISDIGIT(*s))
- 	EMSG2(_(e_invarg2), s);
--    else if (!function_exists(s))
-+    /* Don't check an autoload name for existence here. */
-+    else if (vim_strchr(s, AUTOLOAD_CHAR) == NULL && !function_exists(s))
- 	EMSG2(_("E700: Unknown function: %s"), s);
-     else
-     {
-@@ -10312,11 +10385,10 @@
- /*
-  * "garbagecollect()" function
-  */
--/*ARGSUSED*/
-     static void
- f_garbagecollect(argvars, rettv)
-     typval_T	*argvars;
--    typval_T	*rettv;
-+    typval_T	*rettv UNUSED;
- {
-     /* This is postponed until we are back at the toplevel, because we may be
-      * using Lists and Dicts internally.  E.g.: ":echo [garbagecollect()]". */
-@@ -10365,9 +10437,7 @@
- 
-     if (tv == NULL)
-     {
--	if (argvars[2].v_type == VAR_UNKNOWN)
--	    rettv->vval.v_number = 0;
--	else
-+	if (argvars[2].v_type != VAR_UNKNOWN)
- 	    copy_tv(&argvars[2], rettv);
-     }
-     else
-@@ -10392,13 +10462,8 @@
- {
-     char_u	*p;
- 
--    if (retlist)
--    {
--	if (rettv_list_alloc(rettv) == FAIL)
--	    return;
--    }
--    else
--	rettv->vval.v_number = 0;
-+    if (retlist && rettv_list_alloc(rettv) == FAIL)
-+	return;
- 
-     if (buf == NULL || buf->b_ml.ml_mfp == NULL || start < 0)
- 	return;
-@@ -10602,7 +10667,7 @@
- # ifdef FEAT_WINDOWS
- 	    win_T	*wp;
- # endif
--	    int		n = 1;
-+	    int		winnr = 1;
- 
- 	    if (row >= 0 && col >= 0)
- 	    {
-@@ -10612,9 +10677,9 @@
- 		(void)mouse_comp_pos(win, &row, &col, &lnum);
- # ifdef FEAT_WINDOWS
- 		for (wp = firstwin; wp != win; wp = wp->w_next)
--		    ++n;
-+		    ++winnr;
- # endif
--		vimvars[VV_MOUSE_WIN].vv_nr = n;
-+		vimvars[VV_MOUSE_WIN].vv_nr = winnr;
- 		vimvars[VV_MOUSE_LNUM].vv_nr = lnum;
- 		vimvars[VV_MOUSE_COL].vv_nr = col + 1;
- 	    }
-@@ -10626,10 +10691,9 @@
- /*
-  * "getcharmod()" function
-  */
--/*ARGSUSED*/
-     static void
- f_getcharmod(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     rettv->vval.v_number = mod_mask;
-@@ -10638,10 +10702,9 @@
- /*
-  * "getcmdline()" function
-  */
--/*ARGSUSED*/
-     static void
- f_getcmdline(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     rettv->v_type = VAR_STRING;
-@@ -10651,10 +10714,9 @@
- /*
-  * "getcmdpos()" function
-  */
--/*ARGSUSED*/
-     static void
- f_getcmdpos(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     rettv->vval.v_number = get_cmdline_pos() + 1;
-@@ -10663,10 +10725,9 @@
- /*
-  * "getcmdtype()" function
-  */
--/*ARGSUSED*/
-     static void
- f_getcmdtype(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     rettv->v_type = VAR_STRING;
-@@ -10681,10 +10742,9 @@
- /*
-  * "getcwd()" function
-  */
--/*ARGSUSED*/
-     static void
- f_getcwd(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     char_u	cwd[MAXPATHL];
-@@ -10705,10 +10765,9 @@
- /*
-  * "getfontname()" function
-  */
--/*ARGSUSED*/
-     static void
- f_getfontname(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     rettv->v_type = VAR_STRING;
-@@ -10935,18 +10994,15 @@
- /*
-  * "getmatches()" function
-  */
--/*ARGSUSED*/
-     static void
- f_getmatches(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
- #ifdef FEAT_SEARCH_EXTRA
-     dict_T	*dict;
-     matchitem_T	*cur = curwin->w_match_head;
- 
--    rettv->vval.v_number = 0;
--
-     if (rettv_list_alloc(rettv) == OK)
-     {
- 	while (cur != NULL)
-@@ -10968,10 +11024,9 @@
- /*
-  * "getpid()" function
-  */
--/*ARGSUSED*/
-     static void
- f_getpid(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     rettv->vval.v_number = mch_get_pid();
-@@ -11015,17 +11070,15 @@
- /*
-  * "getqflist()" and "getloclist()" functions
-  */
--/*ARGSUSED*/
-     static void
- f_getqflist(argvars, rettv)
--    typval_T	*argvars;
--    typval_T	*rettv;
-+    typval_T	*argvars UNUSED;
-+    typval_T	*rettv UNUSED;
- {
- #ifdef FEAT_QUICKFIX
-     win_T	*wp;
- #endif
- 
--    rettv->vval.v_number = 0;
- #ifdef FEAT_QUICKFIX
-     if (rettv_list_alloc(rettv) == OK)
-     {
-@@ -11135,10 +11188,9 @@
- /*
-  * "getwinposx()" function
-  */
--/*ARGSUSED*/
-     static void
- f_getwinposx(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     rettv->vval.v_number = -1;
-@@ -11156,10 +11208,9 @@
- /*
-  * "getwinposy()" function
-  */
--/*ARGSUSED*/
-     static void
- f_getwinposy(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     rettv->vval.v_number = -1;
-@@ -11284,13 +11335,25 @@
-     typval_T	*argvars;
-     typval_T	*rettv;
- {
-+    int		flags = WILD_SILENT|WILD_USE_NL;
-     expand_T	xpc;
-+    int		error = FALSE;
- 
--    ExpandInit(&xpc);
--    xpc.xp_context = EXPAND_FILES;
-+    /* When the optional second argument is non-zero, don't remove matches
-+    * for 'wildignore' and don't put matches for 'suffixes' at the end. */
-+    if (argvars[1].v_type != VAR_UNKNOWN
-+				&& get_tv_number_chk(&argvars[1], &error))
-+	flags |= WILD_KEEP_ALL;
-     rettv->v_type = VAR_STRING;
--    rettv->vval.v_string = ExpandOne(&xpc, get_tv_string(&argvars[0]),
--				     NULL, WILD_USE_NL|WILD_SILENT, WILD_ALL);
-+    if (!error)
-+    {
-+	ExpandInit(&xpc);
-+	xpc.xp_context = EXPAND_FILES;
-+	rettv->vval.v_string = ExpandOne(&xpc, get_tv_string(&argvars[0]),
-+						       NULL, flags, WILD_ALL);
-+    }
-+    else
-+	rettv->vval.v_string = NULL;
- }
- 
- /*
-@@ -11301,14 +11364,22 @@
-     typval_T	*argvars;
-     typval_T	*rettv;
- {
-+    int		flags = 0;
-     char_u	buf1[NUMBUFLEN];
-     char_u	*file = get_tv_string_buf_chk(&argvars[1], buf1);
-+    int		error = FALSE;
- 
-+    /* When the optional second argument is non-zero, don't remove matches
-+    * for 'wildignore' and don't put matches for 'suffixes' at the end. */
-+    if (argvars[2].v_type != VAR_UNKNOWN
-+				&& get_tv_number_chk(&argvars[2], &error))
-+	flags |= WILD_KEEP_ALL;
-     rettv->v_type = VAR_STRING;
--    if (file == NULL)
-+    if (file == NULL || error)
- 	rettv->vval.v_string = NULL;
-     else
--	rettv->vval.v_string = globpath(get_tv_string(&argvars[0]), file);
-+	rettv->vval.v_string = globpath(get_tv_string(&argvars[0]), file,
-+								       flags);
- }
- 
- /*
-@@ -11782,6 +11853,10 @@
- 	    n = has_patch(atoi((char *)name + 5));
- 	else if (STRICMP(name, "vim_starting") == 0)
- 	    n = (starting != 0);
-+#ifdef FEAT_MBYTE
-+	else if (STRICMP(name, "multi_byte_encoding") == 0)
-+	    n = has_mbyte;
-+#endif
- #if defined(FEAT_BEVAL) && defined(FEAT_GUI_W32)
- 	else if (STRICMP(name, "balloon_multiline") == 0)
- 	    n = multiline_balloon_available();
-@@ -11847,7 +11922,6 @@
-     typval_T	*argvars;
-     typval_T	*rettv;
- {
--    rettv->vval.v_number = 0;
-     if (argvars[0].v_type != VAR_DICT)
-     {
- 	EMSG(_(e_dictreq));
-@@ -11863,10 +11937,9 @@
- /*
-  * "haslocaldir()" function
-  */
--/*ARGSUSED*/
-     static void
- f_haslocaldir(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     rettv->vval.v_number = (curwin->w_localdir != NULL);
-@@ -11904,10 +11977,9 @@
- /*
-  * "histadd()" function
-  */
--/*ARGSUSED*/
-     static void
- f_histadd(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
- #ifdef FEAT_CMDHIST
-@@ -11938,11 +12010,10 @@
- /*
-  * "histdel()" function
-  */
--/*ARGSUSED*/
-     static void
- f_histdel(argvars, rettv)
--    typval_T	*argvars;
--    typval_T	*rettv;
-+    typval_T	*argvars UNUSED;
-+    typval_T	*rettv UNUSED;
- {
- #ifdef FEAT_CMDHIST
-     int		n;
-@@ -11964,18 +12035,15 @@
- 	n = del_history_entry(get_histtype(str),
- 				      get_tv_string_buf(&argvars[1], buf));
-     rettv->vval.v_number = n;
--#else
--    rettv->vval.v_number = 0;
- #endif
- }
- 
- /*
-  * "histget()" function
-  */
--/*ARGSUSED*/
-     static void
- f_histget(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
- #ifdef FEAT_CMDHIST
-@@ -12005,10 +12073,9 @@
- /*
-  * "histnr()" function
-  */
--/*ARGSUSED*/
-     static void
- f_histnr(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     int		i;
-@@ -12050,10 +12117,9 @@
- /*
-  * "hostname()" function
-  */
--/*ARGSUSED*/
-     static void
- f_hostname(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     char_u hostname[256];
-@@ -12066,10 +12132,9 @@
- /*
-  * iconv() function
-  */
--/*ARGSUSED*/
-     static void
- f_iconv(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
- #ifdef FEAT_MBYTE
-@@ -12327,7 +12392,6 @@
-     int		selected;
-     int		mouse_used;
- 
--    rettv->vval.v_number = 0;
- #ifdef NO_CONSOLE_INPUT
-     /* While starting up, there is no place to enter text. */
-     if (no_console_input())
-@@ -12365,10 +12429,9 @@
- /*
-  * "inputrestore()" function
-  */
--/*ARGSUSED*/
-     static void
- f_inputrestore(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     if (ga_userinput.ga_len > 0)
-@@ -12376,7 +12439,7 @@
- 	--ga_userinput.ga_len;
- 	restore_typeahead((tasave_T *)(ga_userinput.ga_data)
- 						       + ga_userinput.ga_len);
--	rettv->vval.v_number = 0; /* OK */
-+	/* default return is zero == OK */
-     }
-     else if (p_verbose > 1)
-     {
-@@ -12388,10 +12451,9 @@
- /*
-  * "inputsave()" function
-  */
--/*ARGSUSED*/
-     static void
- f_inputsave(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     /* Add an entry to the stack of typeahead storage. */
-@@ -12400,7 +12462,7 @@
- 	save_typeahead((tasave_T *)(ga_userinput.ga_data)
- 						       + ga_userinput.ga_len);
- 	++ga_userinput.ga_len;
--	rettv->vval.v_number = 0; /* OK */
-+	/* default return is zero == OK */
-     }
-     else
- 	rettv->vval.v_number = 1; /* Failed */
-@@ -12434,7 +12496,6 @@
-     list_T	*l;
-     int		error = FALSE;
- 
--    rettv->vval.v_number = 0;
-     if (argvars[0].v_type != VAR_LIST)
- 	EMSG2(_(e_listarg), "insert()");
-     else if ((l = argvars[0].vval.v_list) != NULL
-@@ -12553,7 +12614,6 @@
-     dict_T	*d;
-     int		todo;
- 
--    rettv->vval.v_number = 0;
-     if (argvars[0].v_type != VAR_DICT)
-     {
- 	EMSG(_(e_dictreq));
-@@ -12641,7 +12701,6 @@
-     garray_T	ga;
-     char_u	*sep;
- 
--    rettv->vval.v_number = 0;
-     if (argvars[0].v_type != VAR_LIST)
-     {
- 	EMSG(_(e_listreq));
-@@ -12681,10 +12740,9 @@
- /*
-  * "last_buffer_nr()" function.
-  */
--/*ARGSUSED*/
-     static void
- f_last_buffer_nr(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     int		n = 0;
-@@ -12739,9 +12797,7 @@
- #endif
- 
-     rettv->v_type = type;
--    if (type == VAR_NUMBER)
--	rettv->vval.v_number = 0;
--    else
-+    if (type != VAR_NUMBER)
- 	rettv->vval.v_string = NULL;
- 
-     if (check_restricted() || check_secure())
-@@ -12813,10 +12869,9 @@
- /*
-  * "line2byte(lnum)" function
-  */
--/*ARGSUSED*/
-     static void
- f_line2byte(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
- #ifndef FEAT_BYTEOFF
-@@ -12862,10 +12917,9 @@
- /*
-  * "localtime()" function
-  */
--/*ARGSUSED*/
-     static void
- f_localtime(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     rettv->vval.v_number = (varnumber_T)time(NULL);
-@@ -13447,7 +13501,6 @@
- /*
-  * "mode()" function
-  */
--/*ARGSUSED*/
-     static void
- f_mode(argvars, rettv)
-     typval_T	*argvars;
-@@ -13676,13 +13729,11 @@
- /*
-  * "pumvisible()" function
-  */
--/*ARGSUSED*/
-     static void
- f_pumvisible(argvars, rettv)
--    typval_T	*argvars;
--    typval_T	*rettv;
-+    typval_T	*argvars UNUSED;
-+    typval_T	*rettv UNUSED;
- {
--    rettv->vval.v_number = 0;
- #ifdef FEAT_INS_EXPAND
-     if (pum_visible())
- 	rettv->vval.v_number = 1;
-@@ -13716,7 +13767,6 @@
- 	    stride = get_tv_number_chk(&argvars[2], &error);
-     }
- 
--    rettv->vval.v_number = 0;
-     if (error)
- 	return;		/* type error; errmsg already given */
-     if (stride == 0)
-@@ -14083,10 +14133,9 @@
- /*
-  * "remote_expr()" function
-  */
--/*ARGSUSED*/
-     static void
- f_remote_expr(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     rettv->v_type = VAR_STRING;
-@@ -14099,13 +14148,11 @@
- /*
-  * "remote_foreground()" function
-  */
--/*ARGSUSED*/
-     static void
- f_remote_foreground(argvars, rettv)
--    typval_T	*argvars;
--    typval_T	*rettv;
-+    typval_T	*argvars UNUSED;
-+    typval_T	*rettv UNUSED;
- {
--    rettv->vval.v_number = 0;
- #ifdef FEAT_CLIENTSERVER
- # ifdef WIN32
-     /* On Win32 it's done in this application. */
-@@ -14126,10 +14173,9 @@
- #endif
- }
- 
--/*ARGSUSED*/
-     static void
- f_remote_peek(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
- #ifdef FEAT_CLIENTSERVER
-@@ -14161,7 +14207,6 @@
- 	rettv->vval.v_number = (s != NULL);
-     }
- # else
--    rettv->vval.v_number = 0;
-     if (check_connection() == FAIL)
- 	return;
- 
-@@ -14185,10 +14230,9 @@
- #endif
- }
- 
--/*ARGSUSED*/
-     static void
- f_remote_read(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     char_u	*r = NULL;
-@@ -14220,10 +14264,9 @@
- /*
-  * "remote_send()" function
-  */
--/*ARGSUSED*/
-     static void
- f_remote_send(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     rettv->v_type = VAR_STRING;
-@@ -14250,7 +14293,6 @@
-     dict_T	*d;
-     dictitem_T	*di;
- 
--    rettv->vval.v_number = 0;
-     if (argvars[0].v_type == VAR_DICT)
-     {
- 	if (argvars[2].v_type != VAR_UNKNOWN)
-@@ -14353,7 +14395,6 @@
- /*
-  * "repeat()" function
-  */
--/*ARGSUSED*/
-     static void
- f_repeat(argvars, rettv)
-     typval_T	*argvars;
-@@ -14608,7 +14649,6 @@
-     list_T	*l;
-     listitem_T	*li, *ni;
- 
--    rettv->vval.v_number = 0;
-     if (argvars[0].v_type != VAR_LIST)
- 	EMSG2(_(e_listarg), "reverse()");
-     else if ((l = argvars[0].vval.v_list) != NULL
-@@ -14960,8 +15000,6 @@
-     int		lnum = 0;
-     int		col = 0;
- 
--    rettv->vval.v_number = 0;
--
-     if (rettv_list_alloc(rettv) == FAIL)
- 	return;
- 
-@@ -15148,8 +15186,6 @@
-     int		n;
-     int		flags = 0;
- 
--    rettv->vval.v_number = 0;
--
-     if (rettv_list_alloc(rettv) == FAIL)
- 	return;
- 
-@@ -15167,10 +15203,9 @@
- }
- 
- 
--/*ARGSUSED*/
-     static void
- f_server2client(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
- #ifdef FEAT_CLIENTSERVER
-@@ -15199,10 +15234,9 @@
- #endif
- }
- 
--/*ARGSUSED*/
-     static void
- f_serverlist(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     char_u	*r = NULL;
-@@ -15223,11 +15257,10 @@
- /*
-  * "setbufvar()" function
-  */
--/*ARGSUSED*/
-     static void
- f_setbufvar(argvars, rettv)
-     typval_T	*argvars;
--    typval_T	*rettv;
-+    typval_T	*rettv UNUSED;
- {
-     buf_T	*buf;
-     aco_save_T	aco;
-@@ -15235,8 +15268,6 @@
-     typval_T	*varp;
-     char_u	nbuf[NUMBUFLEN];
- 
--    rettv->vval.v_number = 0;
--
-     if (check_restricted() || check_secure())
- 	return;
-     (void)get_tv_number(&argvars[0]);	    /* issue errmsg if type error */
-@@ -15316,7 +15347,7 @@
-     else
- 	line = get_tv_string_chk(&argvars[1]);
- 
--    rettv->vval.v_number = 0;		/* OK */
-+    /* default result is zero == OK */
-     for (;;)
-     {
- 	if (l != NULL)
-@@ -15364,12 +15395,11 @@
- /*
-  * Used by "setqflist()" and "setloclist()" functions
-  */
--/*ARGSUSED*/
-     static void
- set_qf_ll_list(wp, list_arg, action_arg, rettv)
--    win_T	*wp;
--    typval_T	*list_arg;
--    typval_T	*action_arg;
-+    win_T	*wp UNUSED;
-+    typval_T	*list_arg UNUSED;
-+    typval_T	*action_arg UNUSED;
-     typval_T	*rettv;
- {
- #ifdef FEAT_QUICKFIX
-@@ -15404,7 +15434,6 @@
- /*
-  * "setloclist()" function
-  */
--/*ARGSUSED*/
-     static void
- f_setloclist(argvars, rettv)
-     typval_T	*argvars;
-@@ -15482,7 +15511,6 @@
- /*
-  * "setpos()" function
-  */
--/*ARGSUSED*/
-     static void
- f_setpos(argvars, rettv)
-     typval_T	*argvars;
-@@ -15526,7 +15554,6 @@
- /*
-  * "setqflist()" function
-  */
--/*ARGSUSED*/
-     static void
- f_setqflist(argvars, rettv)
-     typval_T	*argvars;
-@@ -15632,7 +15659,7 @@
-     static void
- setwinvar(argvars, rettv, off)
-     typval_T	*argvars;
--    typval_T	*rettv;
-+    typval_T	*rettv UNUSED;
-     int		off;
- {
-     win_T	*win;
-@@ -15645,8 +15672,6 @@
-     char_u	nbuf[NUMBUFLEN];
-     tabpage_T	*tp;
- 
--    rettv->vval.v_number = 0;
--
-     if (check_restricted() || check_secure())
- 	return;
- 
-@@ -15838,10 +15863,9 @@
-     if (res == FAIL)
- 	res = ITEM_COMPARE_FAIL;
-     else
--	/* return value has wrong type */
- 	res = get_tv_number_chk(&rettv, &item_compare_func_err);
-     if (item_compare_func_err)
--	res = ITEM_COMPARE_FAIL;
-+	res = ITEM_COMPARE_FAIL;  /* return value has wrong type */
-     clear_tv(&rettv);
-     return res;
- }
-@@ -15860,7 +15884,6 @@
-     long	len;
-     long	i;
- 
--    rettv->vval.v_number = 0;
-     if (argvars[0].v_type != VAR_LIST)
- 	EMSG2(_(e_listarg), "sort()");
-     else
-@@ -15952,10 +15975,9 @@
- /*
-  * "spellbadword()" function
-  */
--/* ARGSUSED */
-     static void
- f_spellbadword(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     char_u	*word = (char_u *)"";
-@@ -16007,10 +16029,9 @@
- /*
-  * "spellsuggest()" function
-  */
--/*ARGSUSED*/
-     static void
- f_spellsuggest(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
- #ifdef FEAT_SPELL
-@@ -16493,10 +16514,9 @@
- /*
-  * "synID(lnum, col, trans)" function
-  */
--/*ARGSUSED*/
-     static void
- f_synID(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     int		id = 0;
-@@ -16521,10 +16541,9 @@
- /*
-  * "synIDattr(id, what [, mode])" function
-  */
--/*ARGSUSED*/
-     static void
- f_synIDattr(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     char_u	*p = NULL;
-@@ -16590,8 +16609,11 @@
- 		p = highlight_has_attr(id, HL_INVERSE, modec);
- 		break;
- 
--	case 's':					/* standout */
--		p = highlight_has_attr(id, HL_STANDOUT, modec);
-+	case 's':
-+		if (TOLOWER_ASC(what[1]) == 'p')	/* sp[#] */
-+		    p = highlight_color(id, what, modec);
-+		else					/* standout */
-+		    p = highlight_has_attr(id, HL_STANDOUT, modec);
- 		break;
- 
- 	case 'u':
-@@ -16614,10 +16636,9 @@
- /*
-  * "synIDtrans(id)" function
-  */
--/*ARGSUSED*/
-     static void
- f_synIDtrans(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     int		id;
-@@ -16637,10 +16658,9 @@
- /*
-  * "synstack(lnum, col)" function
-  */
--/*ARGSUSED*/
-     static void
- f_synstack(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
- #ifdef FEAT_SYN_HL
-@@ -16658,7 +16678,7 @@
-     col = get_tv_number(&argvars[1]) - 1;	/* -1 on type error */
- 
-     if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count
--	    && col >= 0 && col < (long)STRLEN(ml_get(lnum))
-+	    && col >= 0 && (col == 0 || col < (long)STRLEN(ml_get(lnum)))
- 	    && rettv_list_alloc(rettv) != FAIL)
-     {
- 	(void)syn_get_id(curwin, lnum, (colnr_T)col, FALSE, NULL, TRUE);
-@@ -16774,15 +16794,12 @@
- /*
-  * "tabpagebuflist()" function
-  */
--/* ARGSUSED */
-     static void
- f_tabpagebuflist(argvars, rettv)
--    typval_T	*argvars;
--    typval_T	*rettv;
-+    typval_T	*argvars UNUSED;
-+    typval_T	*rettv UNUSED;
- {
--#ifndef FEAT_WINDOWS
--    rettv->vval.v_number = 0;
--#else
-+#ifdef FEAT_WINDOWS
-     tabpage_T	*tp;
-     win_T	*wp = NULL;
- 
-@@ -16794,19 +16811,12 @@
- 	if (tp != NULL)
- 	    wp = (tp == curtab) ? firstwin : tp->tp_firstwin;
-     }
--    if (wp == NULL)
--	rettv->vval.v_number = 0;
--    else
-+    if (wp != NULL && rettv_list_alloc(rettv) != FAIL)
-     {
--	if (rettv_list_alloc(rettv) == FAIL)
--	    rettv->vval.v_number = 0;
--	else
--	{
--	    for (; wp != NULL; wp = wp->w_next)
--		if (list_append_number(rettv->vval.v_list,
-+	for (; wp != NULL; wp = wp->w_next)
-+	    if (list_append_number(rettv->vval.v_list,
- 						wp->w_buffer->b_fnum) == FAIL)
--		    break;
--	}
-+		break;
-     }
- #endif
- }
-@@ -16815,10 +16825,9 @@
- /*
-  * "tabpagenr()" function
-  */
--/* ARGSUSED */
-     static void
- f_tabpagenr(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     int		nr = 1;
-@@ -16900,10 +16909,9 @@
- /*
-  * "tabpagewinnr()" function
-  */
--/* ARGSUSED */
-     static void
- f_tabpagewinnr(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     int		nr = 1;
-@@ -16923,10 +16931,9 @@
- /*
-  * "tagfiles()" function
-  */
--/*ARGSUSED*/
-     static void
- f_tagfiles(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     char_u	fname[MAXPATHL + 1];
-@@ -16934,10 +16941,7 @@
-     int		first;
- 
-     if (rettv_list_alloc(rettv) == FAIL)
--    {
--	rettv->vval.v_number = 0;
- 	return;
--    }
- 
-     for (first = TRUE; ; first = FALSE)
- 	if (get_tagfname(&tn, first, fname) == FAIL
-@@ -16969,10 +16973,9 @@
- /*
-  * "tempname()" function
-  */
--/*ARGSUSED*/
-     static void
- f_tempname(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     static int	x = 'A';
-@@ -17005,11 +17008,10 @@
- /*
-  * "test(list)" function: Just checking the walls...
-  */
--/*ARGSUSED*/
-     static void
- f_test(argvars, rettv)
--    typval_T	*argvars;
--    typval_T	*rettv;
-+    typval_T	*argvars UNUSED;
-+    typval_T	*rettv UNUSED;
- {
-     /* Used for unit testing.  Change the code below to your liking. */
- #if 0
-@@ -17294,11 +17296,10 @@
- /*
-  * "visualmode()" function
-  */
--/*ARGSUSED*/
-     static void
- f_visualmode(argvars, rettv)
--    typval_T	*argvars;
--    typval_T	*rettv;
-+    typval_T	*argvars UNUSED;
-+    typval_T	*rettv UNUSED;
- {
- #ifdef FEAT_VISUAL
-     char_u	str[2];
-@@ -17311,8 +17312,6 @@
-     /* A non-zero number or non-empty string argument: reset mode. */
-     if (non_zero_arg(&argvars[0]))
- 	curbuf->b_visual_mode_eval = NUL;
--#else
--    rettv->vval.v_number = 0; /* return anything, it won't work anyway */
- #endif
- }
- 
-@@ -17336,10 +17335,9 @@
- /*
-  * "wincol()" function
-  */
--/*ARGSUSED*/
-     static void
- f_wincol(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     validate_cursor();
-@@ -17366,10 +17364,9 @@
- /*
-  * "winline()" function
-  */
--/*ARGSUSED*/
-     static void
- f_winline(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     validate_cursor();
-@@ -17379,10 +17376,9 @@
- /*
-  * "winnr()" function
-  */
--/* ARGSUSED */
-     static void
- f_winnr(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     int		nr = 1;
-@@ -17396,10 +17392,9 @@
- /*
-  * "winrestcmd()" function
-  */
--/* ARGSUSED */
-     static void
- f_winrestcmd(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
- #ifdef FEAT_WINDOWS
-@@ -17431,11 +17426,10 @@
- /*
-  * "winrestview()" function
-  */
--/* ARGSUSED */
-     static void
- f_winrestview(argvars, rettv)
-     typval_T	*argvars;
--    typval_T	*rettv;
-+    typval_T	*rettv UNUSED;
- {
-     dict_T	*dict;
- 
-@@ -17477,10 +17471,9 @@
- /*
-  * "winsaveview()" function
-  */
--/* ARGSUSED */
-     static void
- f_winsaveview(argvars, rettv)
--    typval_T	*argvars;
-+    typval_T	*argvars UNUSED;
-     typval_T	*rettv;
- {
-     dict_T	*dict;
-@@ -18097,14 +18090,28 @@
- }
- 
- /*
-- * Set v:count, v:count1 and v:prevcount.
-+ * Get List v: variable value.  Caller must take care of reference count when
-+ * needed.
-+ */
-+    list_T *
-+get_vim_var_list(idx)
-+    int		idx;
-+{
-+    return vimvars[idx].vv_list;
-+}
-+
-+/*
-+ * Set v:count to "count" and v:count1 to "count1".
-+ * When "set_prevcount" is TRUE first set v:prevcount from v:count.
-  */
-     void
--set_vcount(count, count1)
-+set_vcount(count, count1, set_prevcount)
-     long	count;
-     long	count1;
-+    int		set_prevcount;
- {
--    vimvars[VV_PREVCOUNT].vv_nr = vimvars[VV_COUNT].vv_nr;
-+    if (set_prevcount)
-+	vimvars[VV_PREVCOUNT].vv_nr = vimvars[VV_COUNT].vv_nr;
-     vimvars[VV_COUNT].vv_nr = count;
-     vimvars[VV_COUNT1].vv_nr = count1;
- }
-@@ -18132,6 +18139,20 @@
- }
- 
- /*
-+ * Set List v: variable to "val".
-+ */
-+    void
-+set_vim_var_list(idx, val)
-+    int		idx;
-+    list_T	*val;
-+{
-+    list_unref(vimvars[idx].vv_list);
-+    vimvars[idx].vv_list = val;
-+    if (val != NULL)
-+	++val->lv_refcount;
-+}
-+
-+/*
-  * Set v:register if needed.
-  */
-     void
-@@ -18868,7 +18889,8 @@
-     dictitem_T	*dict_var;
- {
-     hash_init(&dict->dv_hashtab);
--    dict->dv_refcount = 99999;
-+    dict->dv_refcount = DO_NOT_FREE_CNT;
-+    dict->dv_copyID = 0;
-     dict_var->di_tv.vval.v_dict = dict;
-     dict_var->di_tv.v_type = VAR_DICT;
-     dict_var->di_tv.v_lock = VAR_FIXED;
-@@ -18951,7 +18973,8 @@
-     char_u	*s;
-     char_u	numbuf[NUMBUFLEN];
- 
--    s = echo_string(&v->di_tv, &tofree, numbuf, ++current_copyID);
-+    current_copyID += COPYID_INC;
-+    s = echo_string(&v->di_tv, &tofree, numbuf, current_copyID);
-     list_one_var_a(prefix, v->di_key, v->di_tv.v_type,
- 					 s == NULL ? (char_u *)"" : s, first);
-     vim_free(tofree);
-@@ -19205,6 +19228,8 @@
-  * Copy the values from typval_T "from" to typval_T "to".
-  * When needed allocates string or increases reference count.
-  * Does not make a copy of a list or dict but copies the reference!
-+ * It is OK for "from" and "to" to point to the same item.  This is used to
-+ * make a copy later.
-  */
-     static void
- copy_tv(from, to)
-@@ -19384,7 +19409,8 @@
- 	    }
- 	    else if (eap->cmdidx == CMD_echo)
- 		msg_puts_attr((char_u *)" ", echo_attr);
--	    p = echo_string(&rettv, &tofree, numbuf, ++current_copyID);
-+	    current_copyID += COPYID_INC;
-+	    p = echo_string(&rettv, &tofree, numbuf, current_copyID);
- 	    if (p != NULL)
- 		for ( ; *p != NUL && !got_int; ++p)
- 		{
-@@ -19660,6 +19686,7 @@
- 			    list_func_head(fp, FALSE);
- 		    }
- 		}
-+		vim_free(regmatch.regprog);
- 	    }
- 	}
- 	if (*p == '/')
-@@ -19748,7 +19775,7 @@
- 		}
- 	    }
- 	    else
--		emsg_funcname("E123: Undefined function: %s", name);
-+		emsg_funcname(N_("E123: Undefined function: %s"), name);
- 	}
- 	goto ret_free;
-     }
-@@ -19792,7 +19819,7 @@
- 						      : eval_isnamec(arg[j])))
- 		++j;
- 	    if (arg[j] != NUL)
--		emsg_funcname(_(e_invarg2), arg);
-+		emsg_funcname((char *)e_invarg2, arg);
- 	}
-     }
- 
-@@ -20064,7 +20091,7 @@
- 	v = find_var(name, &ht);
- 	if (v != NULL && v->di_tv.v_type == VAR_FUNC)
- 	{
--	    emsg_funcname("E707: Function name conflicts with variable: %s",
-+	    emsg_funcname(N_("E707: Function name conflicts with variable: %s"),
- 									name);
- 	    goto erret;
- 	}
-@@ -20079,7 +20106,7 @@
- 	    }
- 	    if (fp->uf_calls > 0)
- 	    {
--		emsg_funcname("E127: Cannot redefine function %s: It is in use",
-+		emsg_funcname(N_("E127: Cannot redefine function %s: It is in use"),
- 									name);
- 		goto erret;
- 	    }
-@@ -20590,6 +20617,9 @@
-     int		st_len = 0;
- 
-     todo = (int)func_hashtab.ht_used;
-+    if (todo == 0)
-+	return;     /* nothing to dump */
-+
-     sorttab = (ufunc_T **)alloc((unsigned)(sizeof(ufunc_T) * todo));
- 
-     for (hi = func_hashtab.ht_array; todo > 0; ++hi)
-@@ -20638,6 +20668,8 @@
- 							      prof_self_cmp);
- 	prof_sort_list(fd, sorttab, st_len, "SELF", TRUE);
-     }
-+
-+    vim_free(sorttab);
- }
- 
-     static void
-@@ -21012,7 +21044,7 @@
-     char_u	*save_sourcing_name;
-     linenr_T	save_sourcing_lnum;
-     scid_T	save_current_SID;
--    funccall_T	fc;
-+    funccall_T	*fc;
-     int		save_did_emsg;
-     static int	depth = 0;
-     dictitem_T	*v;
-@@ -21038,36 +21070,37 @@
- 
-     line_breakcheck();		/* check for CTRL-C hit */
- 
--    fc.caller = current_funccal;
--    current_funccal = &fc;
--    fc.func = fp;
--    fc.rettv = rettv;
-+    fc = (funccall_T *)alloc(sizeof(funccall_T));
-+    fc->caller = current_funccal;
-+    current_funccal = fc;
-+    fc->func = fp;
-+    fc->rettv = rettv;
-     rettv->vval.v_number = 0;
--    fc.linenr = 0;
--    fc.returned = FALSE;
--    fc.level = ex_nesting_level;
-+    fc->linenr = 0;
-+    fc->returned = FALSE;
-+    fc->level = ex_nesting_level;
-     /* Check if this function has a breakpoint. */
--    fc.breakpoint = dbg_find_breakpoint(FALSE, fp->uf_name, (linenr_T)0);
--    fc.dbg_tick = debug_tick;
-+    fc->breakpoint = dbg_find_breakpoint(FALSE, fp->uf_name, (linenr_T)0);
-+    fc->dbg_tick = debug_tick;
- 
-     /*
--     * Note about using fc.fixvar[]: This is an array of FIXVAR_CNT variables
-+     * Note about using fc->fixvar[]: This is an array of FIXVAR_CNT variables
-      * with names up to VAR_SHORT_LEN long.  This avoids having to alloc/free
-      * each argument variable and saves a lot of time.
-      */
-     /*
-      * Init l: variables.
-      */
--    init_var_dict(&fc.l_vars, &fc.l_vars_var);
-+    init_var_dict(&fc->l_vars, &fc->l_vars_var);
-     if (selfdict != NULL)
-     {
- 	/* Set l:self to "selfdict".  Use "name" to avoid a warning from
- 	 * some compiler that checks the destination size. */
--	v = &fc.fixvar[fixvar_idx++].var;
-+	v = &fc->fixvar[fixvar_idx++].var;
- 	name = v->di_key;
- 	STRCPY(name, "self");
- 	v->di_flags = DI_FLAGS_RO + DI_FLAGS_FIX;
--	hash_add(&fc.l_vars.dv_hashtab, DI2HIKEY(v));
-+	hash_add(&fc->l_vars.dv_hashtab, DI2HIKEY(v));
- 	v->di_tv.v_type = VAR_DICT;
- 	v->di_tv.v_lock = 0;
- 	v->di_tv.vval.v_dict = selfdict;
-@@ -21079,28 +21112,31 @@
-      * Set a:0 to "argcount".
-      * Set a:000 to a list with room for the "..." arguments.
-      */
--    init_var_dict(&fc.l_avars, &fc.l_avars_var);
--    add_nr_var(&fc.l_avars, &fc.fixvar[fixvar_idx++].var, "0",
-+    init_var_dict(&fc->l_avars, &fc->l_avars_var);
-+    add_nr_var(&fc->l_avars, &fc->fixvar[fixvar_idx++].var, "0",
- 				(varnumber_T)(argcount - fp->uf_args.ga_len));
--    v = &fc.fixvar[fixvar_idx++].var;
--    STRCPY(v->di_key, "000");
-+    /* Use "name" to avoid a warning from some compiler that checks the
-+     * destination size. */
-+    v = &fc->fixvar[fixvar_idx++].var;
-+    name = v->di_key;
-+    STRCPY(name, "000");
-     v->di_flags = DI_FLAGS_RO | DI_FLAGS_FIX;
--    hash_add(&fc.l_avars.dv_hashtab, DI2HIKEY(v));
-+    hash_add(&fc->l_avars.dv_hashtab, DI2HIKEY(v));
-     v->di_tv.v_type = VAR_LIST;
-     v->di_tv.v_lock = VAR_FIXED;
--    v->di_tv.vval.v_list = &fc.l_varlist;
--    vim_memset(&fc.l_varlist, 0, sizeof(list_T));
--    fc.l_varlist.lv_refcount = 99999;
--    fc.l_varlist.lv_lock = VAR_FIXED;
-+    v->di_tv.vval.v_list = &fc->l_varlist;
-+    vim_memset(&fc->l_varlist, 0, sizeof(list_T));
-+    fc->l_varlist.lv_refcount = DO_NOT_FREE_CNT;
-+    fc->l_varlist.lv_lock = VAR_FIXED;
- 
-     /*
-      * Set a:firstline to "firstline" and a:lastline to "lastline".
-      * Set a:name to named arguments.
-      * Set a:N to the "..." arguments.
-      */
--    add_nr_var(&fc.l_avars, &fc.fixvar[fixvar_idx++].var, "firstline",
-+    add_nr_var(&fc->l_avars, &fc->fixvar[fixvar_idx++].var, "firstline",
- 						      (varnumber_T)firstline);
--    add_nr_var(&fc.l_avars, &fc.fixvar[fixvar_idx++].var, "lastline",
-+    add_nr_var(&fc->l_avars, &fc->fixvar[fixvar_idx++].var, "lastline",
- 						       (varnumber_T)lastline);
-     for (i = 0; i < argcount; ++i)
-     {
-@@ -21116,7 +21152,7 @@
- 	}
- 	if (fixvar_idx < FIXVAR_CNT && STRLEN(name) <= VAR_SHORT_LEN)
- 	{
--	    v = &fc.fixvar[fixvar_idx++].var;
-+	    v = &fc->fixvar[fixvar_idx++].var;
- 	    v->di_flags = DI_FLAGS_RO | DI_FLAGS_FIX;
- 	}
- 	else
-@@ -21128,7 +21164,7 @@
- 	    v->di_flags = DI_FLAGS_RO;
- 	}
- 	STRCPY(v->di_key, name);
--	hash_add(&fc.l_avars.dv_hashtab, DI2HIKEY(v));
-+	hash_add(&fc->l_avars.dv_hashtab, DI2HIKEY(v));
- 
- 	/* Note: the values are copied directly to avoid alloc/free.
- 	 * "argvars" must have VAR_FIXED for v_lock. */
-@@ -21137,9 +21173,9 @@
- 
- 	if (ai >= 0 && ai < MAX_FUNC_ARGS)
- 	{
--	    list_append(&fc.l_varlist, &fc.l_listitems[ai]);
--	    fc.l_listitems[ai].li_tv = argvars[i];
--	    fc.l_listitems[ai].li_tv.v_lock = VAR_FIXED;
-+	    list_append(&fc->l_varlist, &fc->l_listitems[ai]);
-+	    fc->l_listitems[ai].li_tv = argvars[i];
-+	    fc->l_listitems[ai].li_tv.v_lock = VAR_FIXED;
- 	}
-     }
- 
-@@ -21204,7 +21240,7 @@
- 	if (!fp->uf_profiling && has_profiling(FALSE, fp->uf_name, NULL))
- 	    func_do_profile(fp);
- 	if (fp->uf_profiling
--		       || (fc.caller != NULL && &fc.caller->func->uf_profiling))
-+		    || (fc->caller != NULL && fc->caller->func->uf_profiling))
- 	{
- 	    ++fp->uf_tm_count;
- 	    profile_start(&call_start);
-@@ -21220,7 +21256,7 @@
-     did_emsg = FALSE;
- 
-     /* call do_cmdline() to execute the lines */
--    do_cmdline(NULL, get_func_line, (void *)&fc,
-+    do_cmdline(NULL, get_func_line, (void *)fc,
- 				     DOCMD_NOWAIT|DOCMD_VERBOSE|DOCMD_REPEAT);
- 
-     --RedrawingDisabled;
-@@ -21235,16 +21271,16 @@
- 
- #ifdef FEAT_PROFILE
-     if (do_profiling == PROF_YES && (fp->uf_profiling
--		    || (fc.caller != NULL && &fc.caller->func->uf_profiling)))
-+		    || (fc->caller != NULL && fc->caller->func->uf_profiling)))
-     {
- 	profile_end(&call_start);
- 	profile_sub_wait(&wait_start, &call_start);
- 	profile_add(&fp->uf_tm_total, &call_start);
- 	profile_self(&fp->uf_tm_self, &call_start, &fp->uf_tm_children);
--	if (fc.caller != NULL && &fc.caller->func->uf_profiling)
-+	if (fc->caller != NULL && fc->caller->func->uf_profiling)
- 	{
--	    profile_add(&fc.caller->func->uf_tm_children, &call_start);
--	    profile_add(&fc.caller->func->uf_tml_children, &call_start);
-+	    profile_add(&fc->caller->func->uf_tm_children, &call_start);
-+	    profile_add(&fc->caller->func->uf_tml_children, &call_start);
- 	}
-     }
- #endif
-@@ -21257,9 +21293,9 @@
- 
- 	if (aborting())
- 	    smsg((char_u *)_("%s aborted"), sourcing_name);
--	else if (fc.rettv->v_type == VAR_NUMBER)
-+	else if (fc->rettv->v_type == VAR_NUMBER)
- 	    smsg((char_u *)_("%s returning #%ld"), sourcing_name,
--					       (long)fc.rettv->vval.v_number);
-+					       (long)fc->rettv->vval.v_number);
- 	else
- 	{
- 	    char_u	buf[MSG_BUF_LEN];
-@@ -21270,7 +21306,7 @@
- 	    /* The value may be very long.  Skip the middle part, so that we
- 	     * have some idea how it starts and ends. smsg() would always
- 	     * truncate it at the end. */
--	    s = tv2string(fc.rettv, &tofree, numbuf2, 0);
-+	    s = tv2string(fc->rettv, &tofree, numbuf2, 0);
- 	    if (s != NULL)
- 	    {
- 		trunc_string(s, buf, MSG_BUF_CLEN);
-@@ -21306,14 +21342,84 @@
-     }
- 
-     did_emsg |= save_did_emsg;
--    current_funccal = fc.caller;
-+    current_funccal = fc->caller;
-+    --depth;
- 
--    /* The a: variables typevals were not allocated, only free the allocated
--     * variables. */
--    vars_clear_ext(&fc.l_avars.dv_hashtab, FALSE);
-+    /* If the a:000 list and the l: and a: dicts are not referenced we can
-+     * free the funccall_T and what's in it. */
-+    if (fc->l_varlist.lv_refcount == DO_NOT_FREE_CNT
-+	    && fc->l_vars.dv_refcount == DO_NOT_FREE_CNT
-+	    && fc->l_avars.dv_refcount == DO_NOT_FREE_CNT)
-+    {
-+	free_funccal(fc, FALSE);
-+    }
-+    else
-+    {
-+	hashitem_T	*hi;
-+	listitem_T	*li;
-+	int		todo;
- 
--    vars_clear(&fc.l_vars.dv_hashtab);		/* free all l: variables */
--    --depth;
-+	/* "fc" is still in use.  This can happen when returning "a:000" or
-+	 * assigning "l:" to a global variable.
-+	 * Link "fc" in the list for garbage collection later. */
-+	fc->caller = previous_funccal;
-+	previous_funccal = fc;
-+
-+	/* Make a copy of the a: variables, since we didn't do that above. */
-+	todo = (int)fc->l_avars.dv_hashtab.ht_used;
-+	for (hi = fc->l_avars.dv_hashtab.ht_array; todo > 0; ++hi)
-+	{
-+	    if (!HASHITEM_EMPTY(hi))
-+	    {
-+		--todo;
-+		v = HI2DI(hi);
-+		copy_tv(&v->di_tv, &v->di_tv);
-+	    }
-+	}
-+
-+	/* Make a copy of the a:000 items, since we didn't do that above. */
-+	for (li = fc->l_varlist.lv_first; li != NULL; li = li->li_next)
-+	    copy_tv(&li->li_tv, &li->li_tv);
-+    }
-+}
-+
-+/*
-+ * Return TRUE if items in "fc" do not have "copyID".  That means they are not
-+ * referenced from anywhere that is in use.
-+ */
-+    static int
-+can_free_funccal(fc, copyID)
-+    funccall_T	*fc;
-+    int		copyID;
-+{
-+    return (fc->l_varlist.lv_copyID != copyID
-+	    && fc->l_vars.dv_copyID != copyID
-+	    && fc->l_avars.dv_copyID != copyID);
-+}
-+
-+/*
-+ * Free "fc" and what it contains.
-+ */
-+   static void
-+free_funccal(fc, free_val)
-+    funccall_T	*fc;
-+    int		free_val;  /* a: vars were allocated */
-+{
-+    listitem_T	*li;
-+
-+    /* The a: variables typevals may not have been allocated, only free the
-+     * allocated variables. */
-+    vars_clear_ext(&fc->l_avars.dv_hashtab, free_val);
-+
-+    /* free all l: variables */
-+    vars_clear(&fc->l_vars.dv_hashtab);
-+
-+    /* Free the a:000 variables if they were allocated. */
-+    if (free_val)
-+	for (li = fc->l_varlist.lv_first; li != NULL; li = li->li_next)
-+	    clear_tv(&li->li_tv);
-+
-+    vim_free(fc);
- }
- 
- /*
-@@ -21512,12 +21618,11 @@
-  * Called by do_cmdline() to get the next line.
-  * Returns allocated string, or NULL for end of function.
-  */
--/* ARGSUSED */
-     char_u *
- get_func_line(c, cookie, indent)
--    int	    c;		    /* not used */
-+    int	    c UNUSED;
-     void    *cookie;
--    int	    indent;	    /* not used */
-+    int	    indent UNUSED;
- {
-     funccall_T	*fcp = (funccall_T *)cookie;
-     ufunc_T	*fp = fcp->func;
-@@ -21886,6 +21991,61 @@
-     }
- }
- 
-+/*
-+ * List v:oldfiles in a nice way.
-+ */
-+    void
-+ex_oldfiles(eap)
-+    exarg_T	*eap UNUSED;
-+{
-+    list_T	*l = vimvars[VV_OLDFILES].vv_list;
-+    listitem_T	*li;
-+    int		nr = 0;
-+
-+    if (l == NULL)
-+	msg((char_u *)_("No old files"));
-+    else
-+    {
-+	msg_start();
-+	msg_scroll = TRUE;
-+	for (li = l->lv_first; li != NULL && !got_int; li = li->li_next)
-+	{
-+	    msg_outnum((long)++nr);
-+	    MSG_PUTS(": ");
-+	    msg_outtrans(get_tv_string(&li->li_tv));
-+	    msg_putchar('\n');
-+	    out_flush();	    /* output one line at a time */
-+	    ui_breakcheck();
-+	}
-+	/* Assume "got_int" was set to truncate the listing. */
-+	got_int = FALSE;
-+
-+#ifdef FEAT_BROWSE_CMD
-+	if (cmdmod.browse)
-+	{
-+	    quit_more = FALSE;
-+	    nr = prompt_for_number(FALSE);
-+	    msg_starthere();
-+	    if (nr > 0)
-+	    {
-+		char_u *p = list_find_str(get_vim_var_list(VV_OLDFILES),
-+								    (long)nr);
-+
-+		if (p != NULL)
-+		{
-+		    p = expand_env_save(p);
-+		    eap->arg = p;
-+		    eap->cmdidx = CMD_edit;
-+		    cmdmod.browse = FALSE;
-+		    do_exedit(eap, NULL);
-+		    vim_free(p);
-+		}
-+	    }
-+	}
-+#endif
-+    }
-+}
-+
- #endif /* FEAT_EVAL */
- 
- 
-diff -Naur vim72.orig/src/ex_cmds2.c vim72/src/ex_cmds2.c
---- vim72.orig/src/ex_cmds2.c	2008-07-13 09:18:22.000000000 -0700
-+++ vim72/src/ex_cmds2.c	2009-07-19 15:16:28.000000000 -0700
-@@ -28,7 +28,8 @@
- {
-     char_u	*sn_name;
- # ifdef UNIX
--    int		sn_dev;
-+    int		sn_dev_valid;
-+    dev_t	sn_dev;
-     ino_t	sn_ino;
- # endif
- # ifdef FEAT_PROFILE
-@@ -2842,6 +2843,7 @@
-     linenr_T		    save_sourcing_lnum;
-     char_u		    *p;
-     char_u		    *fname_exp;
-+    char_u		    *firstline = NULL;
-     int			    retval = FAIL;
- #ifdef FEAT_EVAL
-     scid_T		    save_current_SID;
-@@ -2992,23 +2994,6 @@
- 
-     cookie.level = ex_nesting_level;
- #endif
--#ifdef FEAT_MBYTE
--    cookie.conv.vc_type = CONV_NONE;		/* no conversion */
--
--    /* Try reading the first few bytes to check for a UTF-8 BOM. */
--    {
--	char_u	    buf[3];
--
--	if (fread((char *)buf, sizeof(char_u), (size_t)3, cookie.fp)
--								  == (size_t)3
--		&& buf[0] == 0xef && buf[1] == 0xbb && buf[2] == 0xbf)
--	    /* Found BOM, setup conversion and skip over it. */
--	    convert_setup(&cookie.conv, (char_u *)"utf-8", p_enc);
--	else
--	    /* No BOM found, rewind. */
--	    fseek(cookie.fp, 0L, SEEK_SET);
--    }
--#endif
- 
-     /*
-      * Keep the sourcing name/lnum, for recursive calls.
-@@ -3018,6 +3003,27 @@
-     save_sourcing_lnum = sourcing_lnum;
-     sourcing_lnum = 0;
- 
-+#ifdef FEAT_MBYTE
-+    cookie.conv.vc_type = CONV_NONE;		/* no conversion */
-+
-+    /* Read the first line so we can check for a UTF-8 BOM. */
-+    firstline = getsourceline(0, (void *)&cookie, 0);
-+    if (firstline != NULL && STRLEN(firstline) >= 3 && firstline[0] == 0xef
-+			      && firstline[1] == 0xbb && firstline[2] == 0xbf)
-+    {
-+	/* Found BOM; setup conversion, skip over BOM and recode the line. */
-+	convert_setup(&cookie.conv, (char_u *)"utf-8", p_enc);
-+	p = string_convert(&cookie.conv, firstline + 3, NULL);
-+	if (p == NULL)
-+	    p = vim_strsave(firstline + 3);
-+	if (p != NULL)
-+	{
-+	    vim_free(firstline);
-+	    firstline = p;
-+	}
-+    }
-+#endif
-+
- #ifdef STARTUPTIME
-     time_push(&tv_rel, &tv_start);
- #endif
-@@ -3049,7 +3055,7 @@
- 		    /* Compare dev/ino when possible, it catches symbolic
- 		     * links.  Also compare file names, the inode may change
- 		     * when the file was edited. */
--		    ((stat_ok && si->sn_dev != -1)
-+		    ((stat_ok && si->sn_dev_valid)
- 			&& (si->sn_dev == st.st_dev
- 			    && si->sn_ino == st.st_ino)) ||
- # endif
-@@ -3076,11 +3082,12 @@
- # ifdef UNIX
- 	if (stat_ok)
- 	{
-+	    si->sn_dev_valid = TRUE;
- 	    si->sn_dev = st.st_dev;
- 	    si->sn_ino = st.st_ino;
- 	}
- 	else
--	    si->sn_dev = -1;
-+	    si->sn_dev_valid = FALSE;
- # endif
- 
- 	/* Allocate the local script variables to use for this script. */
-@@ -3111,9 +3118,8 @@
-     /*
-      * Call do_cmdline, which will call getsourceline() to get the lines.
-      */
--    do_cmdline(NULL, getsourceline, (void *)&cookie,
-+    do_cmdline(firstline, getsourceline, (void *)&cookie,
- 				     DOCMD_VERBOSE|DOCMD_NOWAIT|DOCMD_REPEAT);
--
-     retval = OK;
- 
- #ifdef FEAT_PROFILE
-@@ -3145,8 +3151,8 @@
- 	verbose_leave();
-     }
- #ifdef STARTUPTIME
--    vim_snprintf(IObuff, IOSIZE, "sourcing %s", fname);
--    time_msg(IObuff, &tv_start);
-+    vim_snprintf((char *)IObuff, IOSIZE, "sourcing %s", fname);
-+    time_msg((char *)IObuff, &tv_start);
-     time_pop(&tv_rel);
- #endif
- 
-@@ -3171,6 +3177,7 @@
- #endif
-     fclose(cookie.fp);
-     vim_free(cookie.nextline);
-+    vim_free(firstline);
- #ifdef FEAT_MBYTE
-     convert_setup(&cookie.conv, NULL, NULL);
- #endif
-@@ -3368,7 +3375,7 @@
- 	    p = skipwhite(sp->nextline);
- 	    if (*p != '\\')
- 		break;
--	    s = alloc((int)(STRLEN(line) + STRLEN(p)));
-+	    s = alloc((unsigned)(STRLEN(line) + STRLEN(p)));
- 	    if (s == NULL)	/* out of memory */
- 		break;
- 	    STRCPY(s, line);
-diff -Naur vim72.orig/src/ex_cmds.c vim72/src/ex_cmds.c
---- vim72.orig/src/ex_cmds.c	2008-08-04 12:15:00.000000000 -0700
-+++ vim72/src/ex_cmds.c	2009-07-19 15:18:39.000000000 -0700
-@@ -24,7 +24,7 @@
- static void do_filter __ARGS((linenr_T line1, linenr_T line2, exarg_T *eap, char_u *cmd, int do_in, int do_out));
- #ifdef FEAT_VIMINFO
- static char_u *viminfo_filename __ARGS((char_u	*));
--static void do_viminfo __ARGS((FILE *fp_in, FILE *fp_out, int want_info, int want_marks, int force_read));
-+static void do_viminfo __ARGS((FILE *fp_in, FILE *fp_out, int flags));
- static int viminfo_encoding __ARGS((vir_T *virp));
- static int read_viminfo_up_to_marks __ARGS((vir_T *virp, int forceit, int writing));
- #endif
-@@ -49,6 +49,7 @@
-     exarg_T	*eap;
- {
-     int		c;
-+    int		cval;
-     char	buf1[20];
-     char	buf2[20];
-     char_u	buf3[7];
-@@ -75,6 +76,10 @@
-     {
- 	if (c == NL)	    /* NUL is stored as NL */
- 	    c = NUL;
-+	if (c == CAR && get_fileformat(curbuf) == EOL_MAC)
-+	    cval = NL;	    /* NL is stored as CR */
-+	else
-+	    cval = c;
- 	if (vim_isprintc_strict(c) && (c < ' '
- #ifndef EBCDIC
- 		    || c > '~'
-@@ -82,19 +87,20 @@
- 			       ))
- 	{
- 	    transchar_nonprint(buf3, c);
--	    sprintf(buf1, "  <%s>", (char *)buf3);
-+	    vim_snprintf(buf1, sizeof(buf1), "  <%s>", (char *)buf3);
- 	}
- 	else
- 	    buf1[0] = NUL;
- #ifndef EBCDIC
- 	if (c >= 0x80)
--	    sprintf(buf2, "  <M-%s>", transchar(c & 0x7f));
-+	    vim_snprintf(buf2, sizeof(buf2), "  <M-%s>",
-+						 (char *)transchar(c & 0x7f));
- 	else
- #endif
- 	    buf2[0] = NUL;
- 	vim_snprintf((char *)IObuff, IOSIZE,
- 		_("<%s>%s%s  %d,  Hex %02x,  Octal %03o"),
--					   transchar(c), buf1, buf2, c, c, c);
-+				  transchar(c), buf1, buf2, cval, cval, cval);
- #ifdef FEAT_MBYTE
- 	if (enc_utf8)
- 	    c = cc[ci++];
-@@ -353,7 +359,7 @@
-     linenr_T	lnum;
-     long	maxlen = 0;
-     sorti_T	*nrs;
--    size_t	count = eap->line2 - eap->line1 + 1;
-+    size_t	count = (size_t)(eap->line2 - eap->line1 + 1);
-     size_t	i;
-     char_u	*p;
-     char_u	*s;
-@@ -952,7 +958,7 @@
- 	    }
- 	    len += (int)STRLEN(prevcmd);
- 	}
--	if ((t = alloc(len)) == NULL)
-+	if ((t = alloc((unsigned)len)) == NULL)
- 	{
- 	    vim_free(newcmd);
- 	    return;
-@@ -1543,7 +1549,7 @@
-      * redirecting input and/or output.
-      */
-     if (itmp != NULL || otmp != NULL)
--	sprintf((char *)buf, "(%s)", (char *)cmd);
-+	vim_snprintf((char *)buf, len, "(%s)", (char *)cmd);
-     else
- 	STRCPY(buf, cmd);
-     if (itmp != NULL)
-@@ -1592,37 +1598,41 @@
-     }
- #endif
-     if (otmp != NULL)
--	append_redir(buf, p_srr, otmp);
-+	append_redir(buf, (int)len, p_srr, otmp);
- 
-     return buf;
- }
- 
- /*
-- * Append output redirection for file "fname" to the end of string buffer "buf"
-+ * Append output redirection for file "fname" to the end of string buffer
-+ * "buf[buflen]"
-  * Works with the 'shellredir' and 'shellpipe' options.
-  * The caller should make sure that there is enough room:
-  *	STRLEN(opt) + STRLEN(fname) + 3
-  */
-     void
--append_redir(buf, opt, fname)
-+append_redir(buf, buflen, opt, fname)
-     char_u	*buf;
-+    int		buflen;
-     char_u	*opt;
-     char_u	*fname;
- {
-     char_u	*p;
-+    char_u	*end;
- 
--    buf += STRLEN(buf);
-+    end = buf + STRLEN(buf);
-     /* find "%s", skipping "%%" */
-     for (p = opt; (p = vim_strchr(p, '%')) != NULL; ++p)
- 	if (p[1] == 's')
- 	    break;
-     if (p != NULL)
-     {
--	*buf = ' '; /* not really needed? Not with sh, ksh or bash */
--	sprintf((char *)buf + 1, (char *)opt, (char *)fname);
-+	*end = ' '; /* not really needed? Not with sh, ksh or bash */
-+	vim_snprintf((char *)end + 1, (size_t)(buflen - (end + 1 - buf)),
-+						  (char *)opt, (char *)fname);
-     }
-     else
--	sprintf((char *)buf,
-+	vim_snprintf((char *)end, (size_t)(buflen - (end - buf)),
- #ifdef FEAT_QUICKFIX
- # ifndef RISCOS
- 		opt != p_sp ? " %s%s" :
-@@ -1676,14 +1686,12 @@
- 
- /*
-  * read_viminfo() -- Read the viminfo file.  Registers etc. which are already
-- * set are not over-written unless force is TRUE. -- webb
-+ * set are not over-written unless "flags" includes VIF_FORCEIT. -- webb
-  */
-     int
--read_viminfo(file, want_info, want_marks, forceit)
--    char_u	*file;
--    int		want_info;
--    int		want_marks;
--    int		forceit;
-+read_viminfo(file, flags)
-+    char_u	*file;	    /* file name or NULL to use default name */
-+    int		flags;	    /* VIF_WANT_INFO et al. */
- {
-     FILE	*fp;
-     char_u	*fname;
-@@ -1691,7 +1699,7 @@
-     if (no_viminfo())
- 	return FAIL;
- 
--    fname = viminfo_filename(file);	    /* may set to default if NULL */
-+    fname = viminfo_filename(file);	/* get file name in allocated buffer */
-     if (fname == NULL)
- 	return FAIL;
-     fp = mch_fopen((char *)fname, READBIN);
-@@ -1701,8 +1709,9 @@
- 	verbose_enter();
- 	smsg((char_u *)_("Reading viminfo file \"%s\"%s%s%s"),
- 		fname,
--		want_info ? _(" info") : "",
--		want_marks ? _(" marks") : "",
-+		(flags & VIF_WANT_INFO) ? _(" info") : "",
-+		(flags & VIF_WANT_MARKS) ? _(" marks") : "",
-+		(flags & VIF_GET_OLDFILES) ? _(" oldfiles") : "",
- 		fp == NULL ? _(" FAILED") : "");
- 	verbose_leave();
-     }
-@@ -1712,10 +1721,9 @@
- 	return FAIL;
- 
-     viminfo_errcnt = 0;
--    do_viminfo(fp, NULL, want_info, want_marks, forceit);
-+    do_viminfo(fp, NULL, flags);
- 
-     fclose(fp);
--
-     return OK;
- }
- 
-@@ -1786,7 +1794,7 @@
- 	 * overwrite a user's viminfo file after a "su root", with a
- 	 * viminfo file that the user can't read.
- 	 */
--	st_old.st_dev = 0;
-+	st_old.st_dev = (dev_t)0;
- 	st_old.st_ino = 0;
- 	st_old.st_mode = 0600;
- 	if (mch_stat((char *)fname, &st_old) == 0
-@@ -1943,7 +1951,7 @@
- 	     * root.
- 	     */
- 	    if (fp_out != NULL)
--		(void)fchown(fileno(fp_out), st_old.st_uid, st_old.st_gid);
-+		ignored = fchown(fileno(fp_out), st_old.st_uid, st_old.st_gid);
- #endif
- 	}
-     }
-@@ -1968,7 +1976,7 @@
-     }
- 
-     viminfo_errcnt = 0;
--    do_viminfo(fp_in, fp_out, !forceit, !forceit, FALSE);
-+    do_viminfo(fp_in, fp_out, forceit ? 0 : (VIF_WANT_INFO | VIF_WANT_MARKS));
- 
-     fclose(fp_out);	    /* errors are ignored !? */
-     if (fp_in != NULL)
-@@ -2041,12 +2049,10 @@
-  * do_viminfo() -- Should only be called from read_viminfo() & write_viminfo().
-  */
-     static void
--do_viminfo(fp_in, fp_out, want_info, want_marks, force_read)
-+do_viminfo(fp_in, fp_out, flags)
-     FILE	*fp_in;
-     FILE	*fp_out;
--    int		want_info;
--    int		want_marks;
--    int		force_read;
-+    int		flags;
- {
-     int		count = 0;
-     int		eof = FALSE;
-@@ -2061,8 +2067,9 @@
- 
-     if (fp_in != NULL)
-     {
--	if (want_info)
--	    eof = read_viminfo_up_to_marks(&vir, force_read, fp_out != NULL);
-+	if (flags & VIF_WANT_INFO)
-+	    eof = read_viminfo_up_to_marks(&vir,
-+					 flags & VIF_FORCEIT, fp_out != NULL);
- 	else
- 	    /* Skip info, find start of marks */
- 	    while (!(eof = viminfo_readline(&vir))
-@@ -2092,8 +2099,9 @@
- 	write_viminfo_bufferlist(fp_out);
- 	count = write_viminfo_marks(fp_out);
-     }
--    if (fp_in != NULL && want_marks)
--	copy_viminfo_marks(&vir, fp_out, count, eof);
-+    if (fp_in != NULL
-+	    && (flags & (VIF_WANT_MARKS | VIF_GET_OLDFILES | VIF_FORCEIT)))
-+	copy_viminfo_marks(&vir, fp_out, count, eof, flags);
- 
-     vim_free(vir.vir_line);
- #ifdef FEAT_MBYTE
-@@ -2248,12 +2256,11 @@
-  *
-  * Return the string in allocated memory (NULL when out of memory).
-  */
--/*ARGSUSED*/
-     char_u *
- viminfo_readstring(virp, off, convert)
-     vir_T	*virp;
-     int		off;		    /* offset for virp->vir_line */
--    int		convert;	    /* convert the string */
-+    int		convert UNUSED;	    /* convert the string */
- {
-     char_u	*retval;
-     char_u	*s, *d;
-@@ -2387,7 +2394,8 @@
- 
-     if (curwin->w_p_nu || use_number)
-     {
--	sprintf((char *)numbuf, "%*ld ", number_width(curwin), (long)lnum);
-+	vim_snprintf((char *)numbuf, sizeof(numbuf),
-+				   "%*ld ", number_width(curwin), (long)lnum);
- 	msg_puts_attr(numbuf, hl_attr(HLF_N));	/* Highlight line nrs */
-     }
-     msg_prt_line(ml_get(lnum), list);
-@@ -2414,8 +2422,8 @@
- 	cursor_on();		/* msg_start() switches it off */
- 	out_flush();
- 	silent_mode = save_silent;
--	info_message = FALSE;
-     }
-+    info_message = FALSE;
- }
- 
- /*
-@@ -2704,7 +2712,12 @@
- 	if (eap->cmdidx == CMD_saveas)
- 	{
- 	    if (retval == OK)
-+	    {
- 		curbuf->b_p_ro = FALSE;
-+#ifdef FEAT_WINDOWS
-+		redraw_tabline = TRUE;
-+#endif
-+	    }
- 	    /* Change directories when the 'acd' option is set. */
- 	    DO_AUTOCHDIR
- 	}
-@@ -2724,7 +2737,6 @@
-  * May set eap->forceit if a dialog says it's OK to overwrite.
-  * Return OK if it's OK, FAIL if it is not.
-  */
--/*ARGSUSED*/
-     static int
- check_overwrite(eap, buf, fname, ffname, other)
-     exarg_T	*eap;
-@@ -3701,7 +3713,7 @@
-     /* If the window options were changed may need to set the spell language.
-      * Can only do this after the buffer has been properly setup. */
-     if (did_get_winopts && curwin->w_p_spell && *curbuf->b_p_spl != NUL)
--	did_set_spelllang(curbuf);
-+	(void)did_set_spelllang(curbuf);
- #endif
- 
-     if (command == NULL)
-@@ -3774,7 +3786,7 @@
- 
- #ifdef FEAT_KEYMAP
-     if (curbuf->b_kmap_state & KEYMAP_INIT)
--	keymap_init();
-+	(void)keymap_init();
- #endif
- 
-     --RedrawingDisabled;
-@@ -3997,6 +4009,9 @@
- 	    break;
- 	ml_delete(eap->line1, FALSE);
-     }
-+
-+    /* make sure the cursor is not beyond the end of the file now */
-+    check_cursor_lnum();
-     deleted_lines_mark(eap->line1, (long)(eap->line2 - lnum));
- 
-     /* ":append" on the line above the deleted lines. */
-@@ -4022,8 +4037,10 @@
- 	bigness = curwin->w_height;
-     else if (firstwin == lastwin)
- 	bigness = curwin->w_p_scr * 2;
-+#ifdef FEAT_WINDOWS
-     else
- 	bigness = curwin->w_height - 3;
-+#endif
-     if (bigness < 1)
- 	bigness = 1;
- 
-@@ -4472,7 +4489,7 @@
- 	    char_u	*p1;
- 	    int		did_sub = FALSE;
- 	    int		lastone;
--	    unsigned	len, needed_len;
-+	    int		len, copy_len, needed_len;
- 	    long	nmatch_tl = 0;	/* nr of lines matched below lnum */
- 	    int		do_again;	/* do it again after joining lines */
- 	    int		skip_match = FALSE;
-@@ -4617,6 +4634,8 @@
- 
- 		if (do_ask)
- 		{
-+		    int typed = 0;
-+
- 		    /* change State to CONFIRM, so that the mouse works
- 		     * properly */
- 		    save_State = State;
-@@ -4655,7 +4674,7 @@
- 			    resp = getexmodeline('?', NULL, 0);
- 			    if (resp != NULL)
- 			    {
--				i = *resp;
-+				typed = *resp;
- 				vim_free(resp);
- 			    }
- 			}
-@@ -4707,7 +4726,7 @@
- #endif
- 			    ++no_mapping;	/* don't map this key */
- 			    ++allow_keys;	/* allow special keys */
--			    i = plain_vgetc();
-+			    typed = plain_vgetc();
- 			    --allow_keys;
- 			    --no_mapping;
- 
-@@ -4718,35 +4737,35 @@
- 			}
- 
- 			need_wait_return = FALSE; /* no hit-return prompt */
--			if (i == 'q' || i == ESC || i == Ctrl_C
-+			if (typed == 'q' || typed == ESC || typed == Ctrl_C
- #ifdef UNIX
--				|| i == intr_char
-+				|| typed == intr_char
- #endif
- 				)
- 			{
- 			    got_quit = TRUE;
- 			    break;
- 			}
--			if (i == 'n')
-+			if (typed == 'n')
- 			    break;
--			if (i == 'y')
-+			if (typed == 'y')
- 			    break;
--			if (i == 'l')
-+			if (typed == 'l')
- 			{
- 			    /* last: replace and then stop */
- 			    do_all = FALSE;
- 			    line2 = lnum;
- 			    break;
- 			}
--			if (i == 'a')
-+			if (typed == 'a')
- 			{
- 			    do_ask = FALSE;
- 			    break;
- 			}
- #ifdef FEAT_INS_EXPAND
--			if (i == Ctrl_E)
-+			if (typed == Ctrl_E)
- 			    scrollup_clamp();
--			else if (i == Ctrl_Y)
-+			else if (typed == Ctrl_Y)
- 			    scrolldown_clamp();
- #endif
- 		    }
-@@ -4757,7 +4776,7 @@
- 		    if (vim_strchr(p_cpo, CPO_UNDO) != NULL)
- 			--no_u_sync;
- 
--		    if (i == 'n')
-+		    if (typed == 'n')
- 		    {
- 			/* For a multi-line match, put matchcol at the NUL at
- 			 * the end of the line and set nmatch to one, so that
-@@ -4808,9 +4827,9 @@
- 		    p1 = ml_get(sub_firstlnum + nmatch - 1);
- 		    nmatch_tl += nmatch - 1;
- 		}
--		i = regmatch.startpos[0].col - copycol;
--		needed_len = i + ((unsigned)STRLEN(p1) - regmatch.endpos[0].col)
--								 + sublen + 1;
-+		copy_len = regmatch.startpos[0].col - copycol;
-+		needed_len = copy_len + ((unsigned)STRLEN(p1)
-+				       - regmatch.endpos[0].col) + sublen + 1;
- 		if (new_start == NULL)
- 		{
- 		    /*
-@@ -4833,7 +4852,7 @@
- 		     */
- 		    len = (unsigned)STRLEN(new_start);
- 		    needed_len += len;
--		    if (needed_len > new_start_len)
-+		    if (needed_len > (int)new_start_len)
- 		    {
- 			new_start_len = needed_len + 50;
- 			if ((p1 = alloc_check(new_start_len)) == NULL)
-@@ -4851,8 +4870,8 @@
- 		/*
- 		 * copy the text up to the part that matched
- 		 */
--		mch_memmove(new_end, sub_firstline + copycol, (size_t)i);
--		new_end += i;
-+		mch_memmove(new_end, sub_firstline + copycol, (size_t)copy_len);
-+		new_end += copy_len;
- 
- 		(void)vim_regsub_multi(&regmatch,
- 				    sub_firstlnum - regmatch.startpos[0].lnum,
-@@ -5059,6 +5078,7 @@
- 
- 	    if (did_sub)
- 		++sub_nlines;
-+	    vim_free(new_start);	/* for when substitute was cancelled */
- 	    vim_free(sub_firstline);	/* free the copy of the original line */
- 	    sub_firstline = NULL;
- 	}
-@@ -5769,7 +5789,7 @@
-      * Recognize a few exceptions to the rule.	Some strings that contain '*'
-      * with "star".  Otherwise '*' is recognized as a wildcard.
-      */
--    for (i = sizeof(mtable) / sizeof(char *); --i >= 0; )
-+    for (i = (int)(sizeof(mtable) / sizeof(char *)); --i >= 0; )
- 	if (STRCMP(arg, mtable[i]) == 0)
- 	{
- 	    STRCPY(d, rtable[i]);
-@@ -6519,22 +6539,11 @@
- static sign_T	*first_sign = NULL;
- static int	last_sign_typenr = MAX_TYPENR;	/* is decremented */
- 
-+static int sign_cmd_idx __ARGS((char_u *begin_cmd, char_u *end_cmd));
- static void sign_list_defined __ARGS((sign_T *sp));
-+static void sign_undefine __ARGS((sign_T *sp, sign_T *sp_prev));
- 
--/*
-- * ":sign" command
-- */
--    void
--ex_sign(eap)
--    exarg_T	*eap;
--{
--    char_u	*arg = eap->arg;
--    char_u	*p;
--    int		idx;
--    sign_T	*sp;
--    sign_T	*sp_prev;
--    buf_T	*buf;
--    static char	*cmds[] = {
-+static char *cmds[] = {
- 			"define",
- #define SIGNCMD_DEFINE	0
- 			"undefine",
-@@ -6547,22 +6556,51 @@
- #define SIGNCMD_UNPLACE	4
- 			"jump",
- #define SIGNCMD_JUMP	5
-+			NULL
- #define SIGNCMD_LAST	6
--    };
-+};
-+
-+/*
-+ * Find index of a ":sign" subcmd from its name.
-+ * "*end_cmd" must be writable.
-+ */
-+    static int
-+sign_cmd_idx(begin_cmd, end_cmd)
-+    char_u	*begin_cmd;	/* begin of sign subcmd */
-+    char_u	*end_cmd;	/* just after sign subcmd */
-+{
-+    int		idx;
-+    char	save = *end_cmd;
-+
-+    *end_cmd = NUL;
-+    for (idx = 0; ; ++idx)
-+	if (cmds[idx] == NULL || STRCMP(begin_cmd, cmds[idx]) == 0)
-+	    break;
-+    *end_cmd = save;
-+    return idx;
-+}
-+
-+/*
-+ * ":sign" command
-+ */
-+    void
-+ex_sign(eap)
-+    exarg_T	*eap;
-+{
-+    char_u	*arg = eap->arg;
-+    char_u	*p;
-+    int		idx;
-+    sign_T	*sp;
-+    sign_T	*sp_prev;
-+    buf_T	*buf;
- 
-     /* Parse the subcommand. */
-     p = skiptowhite(arg);
--    if (*p != NUL)
--	*p++ = NUL;
--    for (idx = 0; ; ++idx)
-+    idx = sign_cmd_idx(arg, p);
-+    if (idx == SIGNCMD_LAST)
-     {
--	if (idx == SIGNCMD_LAST)
--	{
--	    EMSG2(_("E160: Unknown sign command: %s"), arg);
--	    return;
--	}
--	if (STRCMP(arg, cmds[idx]) == 0)
--	    break;
-+	EMSG2(_("E160: Unknown sign command: %s"), arg);
-+	return;
-     }
-     arg = skipwhite(p);
- 
-@@ -6728,24 +6766,8 @@
- 		/* ":sign list {name}" */
- 		sign_list_defined(sp);
- 	    else
--	    {
- 		/* ":sign undefine {name}" */
--		vim_free(sp->sn_name);
--		vim_free(sp->sn_icon);
--#ifdef FEAT_SIGN_ICONS
--		if (sp->sn_image != NULL)
--		{
--		    out_flush();
--		    gui_mch_destroy_sign(sp->sn_image);
--		}
--#endif
--		vim_free(sp->sn_text);
--		if (sp_prev == NULL)
--		    first_sign = sp->sn_next;
--		else
--		    sp_prev->sn_next = sp->sn_next;
--		vim_free(sp);
--	    }
-+		sign_undefine(sp, sp_prev);
- 	}
-     }
-     else
-@@ -6994,6 +7016,31 @@
- }
- 
- /*
-+ * Undefine a sign and free its memory.
-+ */
-+    static void
-+sign_undefine(sp, sp_prev)
-+    sign_T	*sp;
-+    sign_T	*sp_prev;
-+{
-+    vim_free(sp->sn_name);
-+    vim_free(sp->sn_icon);
-+#ifdef FEAT_SIGN_ICONS
-+    if (sp->sn_image != NULL)
-+    {
-+	out_flush();
-+	gui_mch_destroy_sign(sp->sn_image);
-+    }
-+#endif
-+    vim_free(sp->sn_text);
-+    if (sp_prev == NULL)
-+	first_sign = sp->sn_next;
-+    else
-+	sp_prev->sn_next = sp->sn_next;
-+    vim_free(sp);
-+}
-+
-+/*
-  * Get highlighting attribute for sign "typenr".
-  * If "line" is TRUE: line highl, if FALSE: text highl.
-  */
-@@ -7067,6 +7114,198 @@
-     return (char_u *)_("[Deleted]");
- }
- 
-+#if defined(EXITFREE) || defined(PROTO)
-+/*
-+ * Undefine/free all signs.
-+ */
-+    void
-+free_signs()
-+{
-+    while (first_sign != NULL)
-+	sign_undefine(first_sign, NULL);
-+}
-+#endif
-+
-+#if defined(FEAT_CMDL_COMPL) || defined(PROTO)
-+static enum
-+{
-+    EXP_SUBCMD,		/* expand :sign sub-commands */
-+    EXP_DEFINE,		/* expand :sign define {name} args */
-+    EXP_PLACE,		/* expand :sign place {id} args */
-+    EXP_UNPLACE,	/* expand :sign unplace" */
-+    EXP_SIGN_NAMES	/* expand with name of placed signs */
-+} expand_what;
-+
-+/*
-+ * Function given to ExpandGeneric() to obtain the sign command
-+ * expansion.
-+ */
-+/*ARGSUSED*/
-+    char_u *
-+get_sign_name(xp, idx)
-+    expand_T	*xp;
-+    int		idx;
-+{
-+    sign_T	*sp;
-+    int		current_idx;
-+
-+    switch (expand_what)
-+    {
-+    case EXP_SUBCMD:
-+	return (char_u *)cmds[idx];
-+    case EXP_DEFINE:
-+	{
-+	    char *define_arg[] =
-+	    {
-+		"icon=", "linehl=", "text=", "texthl=", NULL
-+	    };
-+	    return (char_u *)define_arg[idx];
-+	}
-+    case EXP_PLACE:
-+	{
-+	    char *place_arg[] =
-+	    {
-+		"line=", "name=", "file=", "buffer=", NULL
-+	    };
-+	    return (char_u *)place_arg[idx];
-+	}
-+    case EXP_UNPLACE:
-+	{
-+	    char *unplace_arg[] = { "file=", "buffer=", NULL };
-+	    return (char_u *)unplace_arg[idx];
-+	}
-+    case EXP_SIGN_NAMES:
-+	/* Complete with name of signs already defined */
-+	current_idx = 0;
-+	for (sp = first_sign; sp != NULL; sp = sp->sn_next)
-+	    if (current_idx++ == idx)
-+		return sp->sn_name;
-+	return NULL;
-+    default:
-+	return NULL;
-+    }
-+}
-+
-+/*
-+ * Handle command line completion for :sign command.
-+ */
-+    void
-+set_context_in_sign_cmd(xp, arg)
-+    expand_T	*xp;
-+    char_u	*arg;
-+{
-+    char_u	*p;
-+    char_u	*end_subcmd;
-+    char_u	*last;
-+    int		cmd_idx;
-+    char_u	*begin_subcmd_args;
-+
-+    /* Default: expand subcommands. */
-+    xp->xp_context = EXPAND_SIGN;
-+    expand_what = EXP_SUBCMD;
-+    xp->xp_pattern = arg;
-+
-+    end_subcmd = skiptowhite(arg);
-+    if (*end_subcmd == NUL)
-+	/* expand subcmd name
-+	 * :sign {subcmd}<CTRL-D>*/
-+	return;
-+
-+    cmd_idx = sign_cmd_idx(arg, end_subcmd);
-+
-+    /* :sign {subcmd} {subcmd_args}
-+     *                |
-+     *                begin_subcmd_args */
-+    begin_subcmd_args = skipwhite(end_subcmd);
-+    p = skiptowhite(begin_subcmd_args);
-+    if (*p == NUL)
-+    {
-+	/*
-+	 * Expand first argument of subcmd when possible.
-+	 * For ":jump {id}" and ":unplace {id}", we could
-+	 * possibly expand the ids of all signs already placed.
-+	 */
-+	xp->xp_pattern = begin_subcmd_args;
-+	switch (cmd_idx)
-+	{
-+	    case SIGNCMD_LIST:
-+	    case SIGNCMD_UNDEFINE:
-+		/* :sign list <CTRL-D>
-+		 * :sign undefine <CTRL-D> */
-+		expand_what = EXP_SIGN_NAMES;
-+		break;
-+	    default:
-+		xp->xp_context = EXPAND_NOTHING;
-+	}
-+	return;
-+    }
-+
-+    /* expand last argument of subcmd */
-+
-+    /* :sign define {name} {args}...
-+     *              |
-+     *              p */
-+
-+    /* Loop until reaching last argument. */
-+    do
-+    {
-+	p = skipwhite(p);
-+	last = p;
-+	p = skiptowhite(p);
-+    } while (*p != NUL);
-+
-+    p = vim_strchr(last, '=');
-+
-+    /* :sign define {name} {args}... {last}=
-+     *                               |     |
-+     *                            last     p */
-+    if (p == NUL)
-+    {
-+	/* Expand last argument name (before equal sign). */
-+	xp->xp_pattern = last;
-+	switch (cmd_idx)
-+	{
-+	    case SIGNCMD_DEFINE:
-+		expand_what = EXP_DEFINE;
-+		break;
-+	    case SIGNCMD_PLACE:
-+		expand_what = EXP_PLACE;
-+		break;
-+	    case SIGNCMD_JUMP:
-+	    case SIGNCMD_UNPLACE:
-+		expand_what = EXP_UNPLACE;
-+		break;
-+	    default:
-+		xp->xp_context = EXPAND_NOTHING;
-+	}
-+    }
-+    else
-+    {
-+	/* Expand last argument value (after equal sign). */
-+	xp->xp_pattern = p + 1;
-+	switch (cmd_idx)
-+	{
-+	    case SIGNCMD_DEFINE:
-+		if (STRNCMP(last, "texthl", p - last) == 0 ||
-+		    STRNCMP(last, "linehl", p - last) == 0)
-+		    xp->xp_context = EXPAND_HIGHLIGHT;
-+		else if (STRNCMP(last, "icon", p - last) == 0)
-+		    xp->xp_context = EXPAND_FILES;
-+		else
-+		    xp->xp_context = EXPAND_NOTHING;
-+		break;
-+	    case SIGNCMD_PLACE:
-+		if (STRNCMP(last, "name", p - last) == 0)
-+		    expand_what = EXP_SIGN_NAMES;
-+		else
-+		    xp->xp_context = EXPAND_NOTHING;
-+		break;
-+	    default:
-+		xp->xp_context = EXPAND_NOTHING;
-+	}
-+    }
-+}
-+#endif
- #endif
- 
- #if defined(FEAT_GUI) || defined(FEAT_CLIENTSERVER) || defined(PROTO)
-diff -Naur vim72.orig/src/ex_cmds.h vim72/src/ex_cmds.h
---- vim72.orig/src/ex_cmds.h	2008-06-21 11:47:57.000000000 -0700
-+++ vim72/src/ex_cmds.h	2009-07-19 15:18:31.000000000 -0700
-@@ -278,7 +278,7 @@
- EX(CMD_crewind,		"crewind",	ex_cc,
- 			RANGE|NOTADR|COUNT|TRLBAR|BANG),
- EX(CMD_cscope,		"cscope",	do_cscope,
--			EXTRA|NOTRLCOM|SBOXOK|XFILE),
-+			EXTRA|NOTRLCOM|XFILE),
- EX(CMD_cstag,		"cstag",	do_cstag,
- 			BANG|TRLBAR|WORD1),
- EX(CMD_cunmap,		"cunmap",	ex_unmap,
-@@ -506,7 +506,7 @@
- EX(CMD_lclose,		"lclose",	ex_cclose,
- 			RANGE|NOTADR|COUNT|TRLBAR),
- EX(CMD_lcscope,		"lcscope",	do_cscope,
--			EXTRA|NOTRLCOM|SBOXOK|XFILE),
-+			EXTRA|NOTRLCOM|XFILE),
- EX(CMD_left,		"left",		ex_align,
- 			TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY),
- EX(CMD_leftabove,	"leftabove",	ex_wrongmodifier,
-@@ -635,6 +635,8 @@
- 			RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
- EX(CMD_noremap,		"noremap",	ex_map,
- 			BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
-+EX(CMD_noautocmd,	"noautocmd",	ex_wrongmodifier,
-+			NEEDARG|EXTRA|NOTRLCOM),
- EX(CMD_nohlsearch,	"nohlsearch",	ex_nohlsearch,
- 			TRLBAR|SBOXOK|CMDWIN),
- EX(CMD_noreabbrev,	"noreabbrev",	ex_abbreviate,
-@@ -651,6 +653,8 @@
- 			EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
- EX(CMD_open,		"open",		ex_open,
- 			RANGE|EXTRA),
-+EX(CMD_oldfiles,	"oldfiles",	ex_oldfiles,
-+			BANG|TRLBAR|SBOXOK|CMDWIN),
- EX(CMD_omap,		"omap",		ex_map,
- 			EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
- EX(CMD_omapclear,	"omapclear",	ex_mapclear,
-@@ -802,7 +806,7 @@
- EX(CMD_scriptencoding,	"scriptencoding", ex_scriptencoding,
- 			WORD1|TRLBAR|CMDWIN),
- EX(CMD_scscope,		"scscope",	do_scscope,
--			EXTRA|NOTRLCOM|SBOXOK),
-+			EXTRA|NOTRLCOM),
- EX(CMD_set,		"set",		ex_set,
- 			TRLBAR|EXTRA|CMDWIN|SBOXOK),
- EX(CMD_setfiletype,	"setfiletype",	ex_setfiletype,
-@@ -987,6 +991,8 @@
- 			BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
- EX(CMD_unmenu,		"unmenu",	ex_menu,
- 			BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
-+EX(CMD_unsilent,	"unsilent",	ex_wrongmodifier,
-+			NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN),
- EX(CMD_update,		"update",	ex_update,
- 			RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR),
- EX(CMD_vglobal,		"vglobal",	ex_global,
-diff -Naur vim72.orig/src/ex_docmd.c vim72/src/ex_docmd.c
---- vim72.orig/src/ex_docmd.c	2008-07-26 04:51:05.000000000 -0700
-+++ vim72/src/ex_docmd.c	2009-07-19 15:18:41.000000000 -0700
-@@ -364,6 +364,7 @@
- # define ex_function		ex_ni
- # define ex_delfunction		ex_ni
- # define ex_return		ex_ni
-+# define ex_oldfiles		ex_ni
- #endif
- static char_u	*arg_all __ARGS((void));
- #ifdef FEAT_SESSION
-@@ -1577,11 +1578,10 @@
-  * If "fgetline" is get_loop_line(), return TRUE if the getline it uses equals
-  * "func".  * Otherwise return TRUE when "fgetline" equals "func".
-  */
--/*ARGSUSED*/
-     int
- getline_equal(fgetline, cookie, func)
-     char_u	*(*fgetline) __ARGS((int, void *, int));
--    void	*cookie;		/* argument for fgetline() */
-+    void	*cookie UNUSED;		/* argument for fgetline() */
-     char_u	*(*func) __ARGS((int, void *, int));
- {
- #ifdef FEAT_EVAL
-@@ -1609,10 +1609,9 @@
-  * If "fgetline" is get_loop_line(), return the cookie used by the original
-  * getline function.  Otherwise return "cookie".
-  */
--/*ARGSUSED*/
-     void *
- getline_cookie(fgetline, cookie)
--    char_u	*(*fgetline) __ARGS((int, void *, int));
-+    char_u	*(*fgetline) __ARGS((int, void *, int)) UNUSED;
-     void	*cookie;		/* argument for fgetline() */
- {
- # ifdef FEAT_EVAL
-@@ -1678,8 +1677,8 @@
-     char_u		*errormsg = NULL;	/* error message */
-     exarg_T		ea;			/* Ex command arguments */
-     long		verbose_save = -1;
--    int			save_msg_scroll = 0;
--    int			did_silent = 0;
-+    int			save_msg_scroll = msg_scroll;
-+    int			save_msg_silent = -1;
-     int			did_esilent = 0;
- #ifdef HAVE_SANDBOX
-     int			did_sandbox = FALSE;
-@@ -1770,7 +1769,7 @@
- 			}
- 			if (checkforcmd(&ea.cmd, "browse", 3))
- 			{
--#ifdef FEAT_BROWSE
-+#ifdef FEAT_BROWSE_CMD
- 			    cmdmod.browse = TRUE;
- #endif
- 			    continue;
-@@ -1857,9 +1856,9 @@
- 			}
- 			if (!checkforcmd(&ea.cmd, "silent", 3))
- 			    break;
--			++did_silent;
-+			if (save_msg_silent == -1)
-+			    save_msg_silent = msg_silent;
- 			++msg_silent;
--			save_msg_scroll = msg_scroll;
- 			if (*ea.cmd == '!' && !vim_iswhite(ea.cmd[-1]))
- 			{
- 			    /* ":silent!", but not "silent !cmd" */
-@@ -1887,6 +1886,13 @@
- #endif
- 			continue;
- 
-+	    case 'u':	if (!checkforcmd(&ea.cmd, "unsilent", 3))
-+			    break;
-+			if (save_msg_silent == -1)
-+			    save_msg_silent = msg_silent;
-+			msg_silent = 0;
-+			continue;
-+
- 	    case 'v':	if (checkforcmd(&ea.cmd, "vertical", 4))
- 			{
- #ifdef FEAT_VERTSPLIT
-@@ -2685,19 +2691,23 @@
- 
-     cmdmod = save_cmdmod;
- 
--    if (did_silent > 0)
-+    if (save_msg_silent != -1)
-     {
- 	/* messages could be enabled for a serious error, need to check if the
- 	 * counters don't become negative */
--	msg_silent -= did_silent;
--	if (msg_silent < 0)
--	    msg_silent = 0;
-+	if (!did_emsg)
-+	    msg_silent = save_msg_silent;
- 	emsg_silent -= did_esilent;
- 	if (emsg_silent < 0)
- 	    emsg_silent = 0;
- 	/* Restore msg_scroll, it's set by file I/O commands, even when no
- 	 * message is actually displayed. */
- 	msg_scroll = save_msg_scroll;
-+
-+	/* "silent reg" or "silent echo x" inside "redir" leaves msg_col
-+	 * somewhere in the line.  Put it back in the first column. */
-+	if (redirecting())
-+	    msg_col = 0;
-     }
- 
- #ifdef HAVE_SANDBOX
-@@ -2731,7 +2741,7 @@
-     int		i;
- 
-     for (i = 0; cmd[i] != NUL; ++i)
--	if (cmd[i] != (*pp)[i])
-+	if (((char_u *)cmd)[i] != (*pp)[i])
- 	    break;
-     if (i >= len && !isalpha((*pp)[i]))
-     {
-@@ -2748,11 +2758,10 @@
-  * "full" is set to TRUE if the whole command name matched.
-  * Returns NULL for an ambiguous user command.
-  */
--/*ARGSUSED*/
-     static char_u *
- find_command(eap, full)
-     exarg_T	*eap;
--    int		*full;
-+    int		*full UNUSED;
- {
-     int		len;
-     char_u	*p;
-@@ -2797,7 +2806,7 @@
- 	    /* Check for ":dl", ":dell", etc. to ":deletel": that's
- 	     * :delete with the 'l' flag.  Same for 'p'. */
- 	    for (i = 0; i < len; ++i)
--		if (eap->cmd[i] != "delete"[i])
-+		if (eap->cmd[i] != ((char_u *)"delete")[i])
- 		    break;
- 	    if (i == len - 1)
- 	    {
-@@ -2978,11 +2987,13 @@
-     {"keepmarks", 3, FALSE},
-     {"leftabove", 5, FALSE},
-     {"lockmarks", 3, FALSE},
-+    {"noautocmd", 3, FALSE},
-     {"rightbelow", 6, FALSE},
-     {"sandbox", 3, FALSE},
-     {"silent", 3, FALSE},
-     {"tab", 3, TRUE},
-     {"topleft", 2, FALSE},
-+    {"unsilent", 3, FALSE},
-     {"verbose", 4, TRUE},
-     {"vertical", 4, FALSE},
- };
-@@ -3000,7 +3011,7 @@
- 
-     if (VIM_ISDIGIT(*cmd))
- 	p = skipwhite(skipdigits(cmd));
--    for (i = 0; i < sizeof(cmdmods) / sizeof(struct cmdmod); ++i)
-+    for (i = 0; i < (int)(sizeof(cmdmods) / sizeof(struct cmdmod)); ++i)
-     {
- 	for (j = 0; p[j] != NUL; ++j)
- 	    if (p[j] != cmdmods[i].name[j])
-@@ -3028,7 +3039,7 @@
-     char_u	*p;
- 
-     /* Check command modifiers. */
--    for (i = 0; i < sizeof(cmdmods) / sizeof(struct cmdmod); ++i)
-+    for (i = 0; i < (int)(sizeof(cmdmods) / sizeof(struct cmdmod)); ++i)
-     {
- 	for (j = 0; name[j] != NUL; ++j)
- 	    if (name[j] != cmdmods[i].name[j])
-@@ -3608,6 +3619,7 @@
- 	    return set_context_in_autocmd(xp, arg, FALSE);
- 
- 	case CMD_doautocmd:
-+	case CMD_doautoall:
- 	    return set_context_in_autocmd(xp, arg, TRUE);
- #endif
- 	case CMD_set:
-@@ -3680,6 +3692,18 @@
- 	case CMD_highlight:
- 	    set_context_in_highlight_cmd(xp, arg);
- 	    break;
-+#ifdef FEAT_CSCOPE
-+	case CMD_cscope:
-+	case CMD_lcscope:
-+	case CMD_scscope:
-+	    set_context_in_cscope_cmd(xp, arg, ea.cmdidx);
-+	    break;
-+#endif
-+#ifdef FEAT_SIGNS
-+	case CMD_sign:
-+	    set_context_in_sign_cmd(xp, arg);
-+	    break;
-+#endif
- #ifdef FEAT_LISTCMDS
- 	case CMD_bdelete:
- 	case CMD_bwipeout:
-@@ -3803,7 +3827,7 @@
-     char_u	*cmd;
-     int		*ctx;	/* pointer to xp_context or NULL */
- {
--    int		delim;
-+    unsigned	delim;
- 
-     while (vim_strchr((char_u *)" \t0123456789.$%'/?-+,;", *cmd) != NULL)
-     {
-@@ -5033,10 +5057,9 @@
- /*
-  * Function given to ExpandGeneric() to obtain the list of command names.
-  */
--/*ARGSUSED*/
-     char_u *
- get_command_name(xp, idx)
--    expand_T	*xp;
-+    expand_T	*xp UNUSED;
-     int		idx;
- {
-     if (idx >= (int)CMD_SIZE)
-@@ -5121,7 +5144,11 @@
- 	    }
- 
- 	    vim_free(cmd->uc_rep);
--	    cmd->uc_rep = 0;
-+	    cmd->uc_rep = NULL;
-+#if defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
-+	    vim_free(cmd->uc_compl_arg);
-+	    cmd->uc_compl_arg = NULL;
-+#endif
- 	    break;
- 	}
- 
-@@ -5180,6 +5207,9 @@
-     {EXPAND_AUGROUP, "augroup"},
-     {EXPAND_BUFFERS, "buffer"},
-     {EXPAND_COMMANDS, "command"},
-+#if defined(FEAT_CSCOPE)
-+    {EXPAND_CSCOPE, "cscope"},
-+#endif
- #if defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
-     {EXPAND_USER_DEFINED, "custom"},
-     {EXPAND_USER_LIST, "customlist"},
-@@ -5196,6 +5226,9 @@
-     {EXPAND_MENUS, "menu"},
-     {EXPAND_SETTINGS, "option"},
-     {EXPAND_SHELLCMD, "shellcmd"},
-+#if defined(FEAT_SIGNS)
-+    {EXPAND_SIGN, "sign"},
-+#endif
-     {EXPAND_TAGS, "tag"},
-     {EXPAND_TAGS_LISTFILES, "tag_listfiles"},
-     {EXPAND_USER_VARS, "var"},
-@@ -5479,6 +5512,9 @@
-     return OK;
- }
- 
-+/*
-+ * ":command ..."
-+ */
-     static void
- ex_command(eap)
-     exarg_T   *eap;
-@@ -5540,10 +5576,9 @@
-  * ":comclear"
-  * Clear all user commands, global and for current buffer.
-  */
--/*ARGSUSED*/
-     void
- ex_comclear(eap)
--    exarg_T	*eap;
-+    exarg_T	*eap UNUSED;
- {
-     uc_clear(&ucmds);
-     uc_clear(&curbuf->b_ucmds);
-@@ -5910,7 +5945,8 @@
-     char_u	*q;
- 
-     char_u	*start;
--    char_u	*end;
-+    char_u	*end = NULL;
-+    char_u	*ksp;
-     size_t	len, totlen;
- 
-     size_t	split_len = 0;
-@@ -5927,16 +5963,51 @@
- 
-     /*
-      * Replace <> in the command by the arguments.
-+     * First round: "buf" is NULL, compute length, allocate "buf".
-+     * Second round: copy result into "buf".
-      */
-     buf = NULL;
-     for (;;)
-     {
--	p = cmd->uc_rep;
--	q = buf;
-+	p = cmd->uc_rep;    /* source */
-+	q = buf;	    /* destination */
- 	totlen = 0;
--	while ((start = vim_strchr(p, '<')) != NULL
--	       && (end = vim_strchr(start + 1, '>')) != NULL)
-+
-+	for (;;)
- 	{
-+	    start = vim_strchr(p, '<');
-+	    if (start != NULL)
-+		end = vim_strchr(start + 1, '>');
-+	    if (buf != NULL)
-+	    {
-+		ksp = vim_strchr(p, K_SPECIAL);
-+		if (ksp != NULL && (start == NULL || ksp < start || end == NULL)
-+			&& ((ksp[1] == KS_SPECIAL && ksp[2] == KE_FILLER)
-+# ifdef FEAT_GUI
-+			    || (ksp[1] == KS_EXTRA && ksp[2] == (int)KE_CSI)
-+# endif
-+			    ))
-+		{
-+		    /* K_SPECIAL han been put in the buffer as K_SPECIAL
-+		     * KS_SPECIAL KE_FILLER, like for mappings, but
-+		     * do_cmdline() doesn't handle that, so convert it back.
-+		     * Also change K_SPECIAL KS_EXTRA KE_CSI into CSI. */
-+		    len = ksp - p;
-+		    if (len > 0)
-+		    {
-+			mch_memmove(q, p, len);
-+			q += len;
-+		    }
-+		    *q++ = ksp[1] == KS_SPECIAL ? K_SPECIAL : CSI;
-+		    p = ksp + 3;
-+		    continue;
-+		}
-+	    }
-+
-+	    /* break if there no <item> is found */
-+	    if (start == NULL || end == NULL)
-+		break;
-+
- 	    /* Include the '>' */
- 	    ++end;
- 
-@@ -6003,10 +6074,9 @@
- /*
-  * Function given to ExpandGeneric() to obtain the list of user command names.
-  */
--/*ARGSUSED*/
-     char_u *
- get_user_commands(xp, idx)
--    expand_T	*xp;
-+    expand_T	*xp UNUSED;
-     int		idx;
- {
-     if (idx < curbuf->b_ucmds.ga_len)
-@@ -6021,17 +6091,16 @@
-  * Function given to ExpandGeneric() to obtain the list of user command
-  * attributes.
-  */
--/*ARGSUSED*/
-     char_u *
- get_user_cmd_flags(xp, idx)
--    expand_T	*xp;
-+    expand_T	*xp UNUSED;
-     int		idx;
- {
-     static char *user_cmd_flags[] =
- 	{"bang", "bar", "buffer", "complete", "count",
- 	    "nargs", "range", "register"};
- 
--    if (idx >= sizeof(user_cmd_flags) / sizeof(user_cmd_flags[0]))
-+    if (idx >= (int)(sizeof(user_cmd_flags) / sizeof(user_cmd_flags[0])))
- 	return NULL;
-     return (char_u *)user_cmd_flags[idx];
- }
-@@ -6039,15 +6108,14 @@
- /*
-  * Function given to ExpandGeneric() to obtain the list of values for -nargs.
-  */
--/*ARGSUSED*/
-     char_u *
- get_user_cmd_nargs(xp, idx)
--    expand_T	*xp;
-+    expand_T	*xp UNUSED;
-     int		idx;
- {
-     static char *user_cmd_nargs[] = {"0", "1", "*", "?", "+"};
- 
--    if (idx >= sizeof(user_cmd_nargs) / sizeof(user_cmd_nargs[0]))
-+    if (idx >= (int)(sizeof(user_cmd_nargs) / sizeof(user_cmd_nargs[0])))
- 	return NULL;
-     return (char_u *)user_cmd_nargs[idx];
- }
-@@ -6055,10 +6123,9 @@
- /*
-  * Function given to ExpandGeneric() to obtain the list of values for -complete.
-  */
--/*ARGSUSED*/
-     char_u *
- get_user_cmd_complete(xp, idx)
--    expand_T	*xp;
-+    expand_T	*xp UNUSED;
-     int		idx;
- {
-     return (char_u *)command_complete[idx].name;
-@@ -6236,10 +6303,9 @@
- /*
-  * ":cquit".
-  */
--/*ARGSUSED*/
-     static void
- ex_cquit(eap)
--    exarg_T	*eap;
-+    exarg_T	*eap UNUSED;
- {
-     getout(1);	/* this does not always pass on the exit code to the Manx
- 		   compiler. why? */
-@@ -6681,10 +6747,9 @@
- /*
-  * ":shell".
-  */
--/*ARGSUSED*/
-     static void
- ex_shell(eap)
--    exarg_T	*eap;
-+    exarg_T	*eap UNUSED;
- {
-     do_shell(NULL, 0);
- }
-@@ -6988,10 +7053,9 @@
- /*
-  * ":preserve".
-  */
--/*ARGSUSED*/
-     static void
- ex_preserve(eap)
--    exarg_T	*eap;
-+    exarg_T	*eap UNUSED;
- {
-     curbuf->b_flags |= BF_PRESERVED;
-     ml_preserve(curbuf, TRUE);
-@@ -7223,10 +7287,9 @@
- /*
-  * :tabs command: List tabs and their contents.
-  */
--/*ARGSUSED*/
-     static void
- ex_tabs(eap)
--    exarg_T	*eap;
-+    exarg_T	*eap UNUSED;
- {
-     tabpage_T	*tp;
-     win_T	*wp;
-@@ -7413,7 +7476,6 @@
- /*
-  * ":edit <file>" command and alikes.
-  */
--/*ARGSUSED*/
-     void
- do_exedit(eap, old_curwin)
-     exarg_T	*eap;
-@@ -7624,10 +7686,9 @@
- }
- #endif
- 
--/*ARGSUSED*/
-     static void
- ex_swapname(eap)
--    exarg_T	*eap;
-+    exarg_T	*eap UNUSED;
- {
-     if (curbuf->b_ml.ml_mfp == NULL || curbuf->b_ml.ml_mfp->mf_fname == NULL)
- 	MSG(_("No swap file"));
-@@ -7640,10 +7701,9 @@
-  * offset.
-  * (1998-11-02 16:21:01  R. Edward Ralston <eralston@computer.org>)
-  */
--/*ARGSUSED*/
-     static void
- ex_syncbind(eap)
--    exarg_T	*eap;
-+    exarg_T	*eap UNUSED;
- {
- #ifdef FEAT_SCROLLBIND
-     win_T	*wp;
-@@ -7784,10 +7844,10 @@
- 		if (*ml_get(lnum) == NUL && u_savedel(lnum, 1L) == OK)
- 		{
- 		    ml_delete(lnum, FALSE);
--		    deleted_lines_mark(lnum, 1L);
- 		    if (curwin->w_cursor.lnum > 1
- 					     && curwin->w_cursor.lnum >= lnum)
- 			--curwin->w_cursor.lnum;
-+		    deleted_lines_mark(lnum, 1L);
- 		}
- 	    }
- 	    redraw_curbuf_later(VALID);
-@@ -7803,6 +7863,9 @@
- {
-     vim_free(prev_dir);
-     prev_dir = NULL;
-+
-+    vim_free(globaldir);
-+    globaldir = NULL;
- }
- #endif
- 
-@@ -7825,6 +7888,10 @@
-     else
- #endif
-     {
-+#ifdef FEAT_AUTOCMD
-+	if (allbuf_locked())
-+	    return;
-+#endif
- 	if (vim_strchr(p_cpo, CPO_CHDIR) != NULL && curbufIsChanged()
- 							     && !eap->forceit)
- 	{
-@@ -7896,7 +7963,7 @@
- 	    shorten_fnames(TRUE);
- 
- 	    /* Echo the new current directory if the command was typed. */
--	    if (KeyTyped)
-+	    if (KeyTyped || p_verbose >= 5)
- 		ex_pwd(eap);
- 	}
- 	vim_free(tofree);
-@@ -7906,10 +7973,9 @@
- /*
-  * ":pwd".
-  */
--/*ARGSUSED*/
-     static void
- ex_pwd(eap)
--    exarg_T	*eap;
-+    exarg_T	*eap UNUSED;
- {
-     if (mch_dirname(NameBuff, MAXPATHL) == OK)
-     {
-@@ -8340,10 +8406,9 @@
- /*
-  * ":undo".
-  */
--/*ARGSUSED*/
-     static void
- ex_undo(eap)
--    exarg_T	*eap;
-+    exarg_T	*eap UNUSED;
- {
-     if (eap->addr_count == 1)	    /* :undo 123 */
- 	undo_time(eap->line2, FALSE, TRUE);
-@@ -8354,10 +8419,9 @@
- /*
-  * ":redo".
-  */
--/*ARGSUSED*/
-     static void
- ex_redo(eap)
--    exarg_T	*eap;
-+    exarg_T	*eap UNUSED;
- {
-     u_redo(1);
- }
-@@ -8365,7 +8429,6 @@
- /*
-  * ":earlier" and ":later".
-  */
--/*ARGSUSED*/
-     static void
- ex_later(eap)
-     exarg_T	*eap;
-@@ -8550,10 +8613,9 @@
- /*
-  * ":redrawstatus": force redraw of status line(s)
-  */
--/*ARGSUSED*/
-     static void
- ex_redrawstatus(eap)
--    exarg_T	*eap;
-+    exarg_T	*eap UNUSED;
- {
- #if defined(FEAT_WINDOWS)
-     int		r = RedrawingDisabled;
-@@ -8630,6 +8692,8 @@
-     }
- 
- #ifdef FEAT_SESSION
-+    /* Use the short file name until ":lcd" is used.  We also don't use the
-+     * short file name when 'acd' is set, that is checked later. */
-     did_lcd = FALSE;
- 
-     /* ":mkview" or ":mkview 9": generate file name with 'viewdir' */
-@@ -8749,8 +8813,8 @@
- 		else if (*dirnow != NUL
- 			&& (ssop_flags & SSOP_CURDIR) && globaldir != NULL)
- 		{
--		    (void)mch_chdir((char *)globaldir);
--		    shorten_fnames(TRUE);
-+		    if (mch_chdir((char *)globaldir) == 0)
-+			shorten_fnames(TRUE);
- 		}
- 
- 		failed |= (makeopens(fd, dirnow) == FAIL);
-@@ -8814,11 +8878,10 @@
- 
- #if ((defined(FEAT_SESSION) || defined(FEAT_EVAL)) && defined(vim_mkdir)) \
- 	|| defined(PROTO)
--/*ARGSUSED*/
-     int
- vim_mkdir_emsg(name, prot)
-     char_u	*name;
--    int		prot;
-+    int		prot UNUSED;
- {
-     if (vim_mkdir(name, prot) != 0)
-     {
-@@ -9089,10 +9152,9 @@
- /*
-  * ":stopinsert"
-  */
--/*ARGSUSED*/
-     static void
- ex_stopinsert(eap)
--    exarg_T	*eap;
-+    exarg_T	*eap UNUSED;
- {
-     restart_edit = 0;
-     stop_insert_mode = TRUE;
-@@ -9366,9 +9428,8 @@
- # define SPEC_CLIENT 9
- #endif
-     };
--#define SPEC_COUNT  (sizeof(spec_str) / sizeof(char *))
- 
--    for (i = 0; i < SPEC_COUNT; ++i)
-+    for (i = 0; i < (int)(sizeof(spec_str) / sizeof(char *)); ++i)
-     {
- 	len = (int)STRLEN(spec_str[i]);
- 	if (STRNCMP(src, spec_str[i], len) == 0)
-@@ -9506,24 +9567,50 @@
- 		    break;
- 		}
- 		s = src + 1;
-+		if (*s == '<')		/* "#<99" uses v:oldfiles */
-+		    ++s;
- 		i = (int)getdigits(&s);
- 		*usedlen = (int)(s - src); /* length of what we expand */
- 
--		buf = buflist_findnr(i);
--		if (buf == NULL)
-+		if (src[1] == '<')
- 		{
--		    *errormsg = (char_u *)_("E194: No alternate file name to substitute for '#'");
-+		    if (*usedlen < 2)
-+		    {
-+			/* Should we give an error message for #<text? */
-+			*usedlen = 1;
-+			return NULL;
-+		    }
-+#ifdef FEAT_EVAL
-+		    result = list_find_str(get_vim_var_list(VV_OLDFILES),
-+								     (long)i);
-+		    if (result == NULL)
-+		    {
-+			*errormsg = (char_u *)"";
-+			return NULL;
-+		    }
-+#else
-+		    *errormsg = (char_u *)_("E809: #< is not available without the +eval feature");
- 		    return NULL;
-+#endif
- 		}
--		if (lnump != NULL)
--		    *lnump = ECMD_LAST;
--		if (buf->b_fname == NULL)
-+		else
- 		{
--		    result = (char_u *)"";
--		    valid = 0;	    /* Must have ":p:h" to be valid */
-+		    buf = buflist_findnr(i);
-+		    if (buf == NULL)
-+		    {
-+			*errormsg = (char_u *)_("E194: No alternate file name to substitute for '#'");
-+			return NULL;
-+		    }
-+		    if (lnump != NULL)
-+			*lnump = ECMD_LAST;
-+		    if (buf->b_fname == NULL)
-+		    {
-+			result = (char_u *)"";
-+			valid = 0;	    /* Must have ":p:h" to be valid */
-+		    }
-+		    else
-+			result = buf->b_fname;
- 		}
--		else
--		    result = buf->b_fname;
- 		break;
- 
- #ifdef FEAT_SEARCHPATH
-@@ -9541,6 +9628,15 @@
- #ifdef FEAT_AUTOCMD
- 	case SPEC_AFILE:	/* file name for autocommand */
- 		result = autocmd_fname;
-+		if (result != NULL && !autocmd_fname_full)
-+		{
-+		    /* Still need to turn the fname into a full path.  It is
-+		     * postponed to avoid a delay when <afile> is not used. */
-+		    autocmd_fname_full = TRUE;
-+		    result = FullName_save(autocmd_fname, FALSE);
-+		    vim_free(autocmd_fname);
-+		    autocmd_fname = result;
-+		}
- 		if (result == NULL)
- 		{
- 		    *errormsg = (char_u *)_("E495: no autocommand file name to substitute for \"<afile>\"");
-@@ -9684,7 +9780,7 @@
- 	}
- 
- 	/* allocate memory */
--	retval = alloc(len + 1);
-+	retval = alloc((unsigned)len + 1);
- 	if (retval == NULL)
- 	    break;
-     }
-@@ -10067,7 +10163,7 @@
-      */
-     if (put_line(fd, "let s:sx = expand(\"<sfile>:p:r\").\"x.vim\"") == FAIL
- 	    || put_line(fd, "if file_readable(s:sx)") == FAIL
--	    || put_line(fd, "  exe \"source \" . s:sx") == FAIL
-+	    || put_line(fd, "  exe \"source \" . fnameescape(s:sx)") == FAIL
- 	    || put_line(fd, "endif") == FAIL)
- 	return FAIL;
- 
-@@ -10485,6 +10581,9 @@
-     if (buf->b_sfname != NULL
- 	    && flagp == &ssop_flags
- 	    && (ssop_flags & (SSOP_CURDIR | SSOP_SESDIR))
-+#ifdef FEAT_AUTOCHDIR
-+	    && !p_acd
-+#endif
- 	    && !did_lcd)
- 	name = buf->b_sfname;
-     else
-@@ -10689,7 +10788,8 @@
- 	p_viminfo = (char_u *)"'100";
-     if (eap->cmdidx == CMD_rviminfo)
-     {
--	if (read_viminfo(eap->arg, TRUE, TRUE, eap->forceit) == FAIL)
-+	if (read_viminfo(eap->arg, VIF_WANT_INFO | VIF_WANT_MARKS
-+				  | (eap->forceit ? VIF_FORCEIT : 0)) == FAIL)
- 	    EMSG(_("E195: Cannot open viminfo file for reading"));
-     }
-     else
-@@ -10850,10 +10950,9 @@
- }
- #endif
- 
--/*ARGSUSED*/
-     static void
- ex_digraphs(eap)
--    exarg_T	*eap;
-+    exarg_T	*eap UNUSED;
- {
- #ifdef FEAT_DIGRAPHS
-     if (*eap->arg != NUL)
-@@ -10887,10 +10986,9 @@
- /*
-  * ":nohlsearch"
-  */
--/*ARGSUSED*/
-     static void
- ex_nohlsearch(eap)
--    exarg_T	*eap;
-+    exarg_T	*eap UNUSED;
- {
-     no_hlsearch = TRUE;
-     redraw_all_later(SOME_VALID);
-@@ -10969,10 +11067,9 @@
- /*
-  * ":X": Get crypt key
-  */
--/*ARGSUSED*/
-     static void
- ex_X(eap)
--    exarg_T	*eap;
-+    exarg_T	*eap UNUSED;
- {
-     (void)get_crypt_key(TRUE, TRUE);
- }
-diff -Naur vim72.orig/src/ex_eval.c vim72/src/ex_eval.c
---- vim72.orig/src/ex_eval.c	2007-11-24 07:34:09.000000000 -0800
-+++ vim72/src/ex_eval.c	2009-07-19 15:16:23.000000000 -0700
-@@ -60,7 +60,9 @@
- #else
- /* Values used for the Vim release. */
- # define THROW_ON_ERROR		TRUE
-+# define THROW_ON_ERROR_TRUE
- # define THROW_ON_INTERRUPT	TRUE
-+# define THROW_ON_INTERRUPT_TRUE
- #endif
- 
- static void	catch_exception __ARGS((except_T *excp));
-@@ -1320,16 +1322,20 @@
-      * and reset the did_emsg or got_int flag, so this won't happen again at
-      * the next surrounding try conditional.
-      */
-+#ifndef THROW_ON_ERROR_TRUE
-     if (did_emsg && !THROW_ON_ERROR)
-     {
- 	inactivate_try = TRUE;
- 	did_emsg = FALSE;
-     }
-+#endif
-+#ifndef THROW_ON_INTERRUPT_TRUE
-     if (got_int && !THROW_ON_INTERRUPT)
-     {
- 	inactivate_try = TRUE;
- 	got_int = FALSE;
-     }
-+#endif
-     idx = cleanup_conditionals(cstack, 0, inactivate_try);
-     if (idx >= 0)
-     {
-@@ -2254,10 +2260,9 @@
- /*
-  * ":endfunction" when not after a ":function"
-  */
--/*ARGSUSED*/
-     void
- ex_endfunction(eap)
--    exarg_T	*eap;
-+    exarg_T	*eap UNUSED;
- {
-     EMSG(_("E193: :endfunction not inside a function"));
- }
-diff -Naur vim72.orig/src/ex_getln.c vim72/src/ex_getln.c
---- vim72.orig/src/ex_getln.c	2008-08-08 02:31:33.000000000 -0700
-+++ vim72/src/ex_getln.c	2009-07-19 15:18:07.000000000 -0700
-@@ -31,6 +31,8 @@
-     int		cmdattr;	/* attributes for prompt */
-     int		overstrike;	/* Typing mode on the command line.  Shared by
- 				   getcmdline() and put_on_cmdline(). */
-+    expand_T	*xpc;		/* struct being used for expansion, xp_pattern
-+				   may point into cmdbuff */
-     int		xp_context;	/* type of expansion */
- # ifdef FEAT_EVAL
-     char_u	*xp_arg;	/* user-defined expansion arg */
-@@ -38,7 +40,11 @@
- # endif
- };
- 
--static struct cmdline_info ccline;	/* current cmdline_info */
-+/* The current cmdline_info.  It is initialized in getcmdline() and after that
-+ * used by other functions.  When invoking getcmdline() recursively it needs
-+ * to be saved with save_cmdline() and restored with restore_cmdline().
-+ * TODO: make it local to getcmdline() and pass it around. */
-+static struct cmdline_info ccline;
- 
- static int	cmd_showtail;		/* Only show path tail in lists ? */
- 
-@@ -134,11 +140,10 @@
-  * Return pointer to allocated string if there is a commandline, NULL
-  * otherwise.
-  */
--/*ARGSUSED*/
-     char_u *
- getcmdline(firstc, count, indent)
-     int		firstc;
--    long	count;		/* only used for incremental search */
-+    long	count UNUSED;	/* only used for incremental search */
-     int		indent;		/* indent for inside conditionals */
- {
-     int		c;
-@@ -238,6 +243,7 @@
-     }
- 
-     ExpandInit(&xpc);
-+    ccline.xpc = &xpc;
- 
- #ifdef FEAT_RIGHTLEFT
-     if (curwin->w_p_rl && *curwin->w_p_rlc == 's'
-@@ -318,7 +324,7 @@
- #endif
- 
- #ifdef FEAT_DIGRAPHS
--    do_digraph(-1);		/* init digraph typahead */
-+    do_digraph(-1);		/* init digraph typeahead */
- #endif
- 
-     /*
-@@ -408,9 +414,10 @@
- #endif
- 
- 	/*
--	 * <S-Tab> works like CTRL-P (unless 'wc' is <S-Tab>).
-+	 * When there are matching completions to select <S-Tab> works like
-+	 * CTRL-P (unless 'wc' is <S-Tab>).
- 	 */
--	if (c != p_wc && c == K_S_TAB && xpc.xp_numfiles != -1)
-+	if (c != p_wc && c == K_S_TAB && xpc.xp_numfiles > 0)
- 	    c = Ctrl_P;
- 
- #ifdef FEAT_WILDMENU
-@@ -1513,6 +1520,7 @@
- 		    int		old_firstc;
- 
- 		    vim_free(ccline.cmdbuff);
-+		    xpc.xp_context = EXPAND_NOTHING;
- 		    if (hiscnt == hislen)
- 			p = lookfor;	/* back to the old one */
- 		    else
-@@ -1839,6 +1847,7 @@
- #endif
- 
-     ExpandCleanup(&xpc);
-+    ccline.xpc = NULL;
- 
- #ifdef FEAT_SEARCH_EXTRA
-     if (did_incsearch)
-@@ -1990,8 +1999,8 @@
- 
- #if defined(FEAT_AUTOCMD) || defined(PROTO)
- /*
-- * Check if "curbuf_lock" is set and return TRUE when it is and give an error
-- * message.
-+ * Check if "curbuf_lock" or "allbuf_lock" is set and return TRUE when it is
-+ * and give an error message.
-  */
-     int
- curbuf_locked()
-@@ -2001,6 +2010,21 @@
- 	EMSG(_("E788: Not allowed to edit another buffer now"));
- 	return TRUE;
-     }
-+    return allbuf_locked();
-+}
-+
-+/*
-+ * Check if "allbuf_lock" is set and return TRUE when it is and give an error
-+ * message.
-+ */
-+    int
-+allbuf_locked()
-+{
-+    if (allbuf_lock > 0)
-+    {
-+	EMSG(_("E811: Not allowed to change buffer information now"));
-+	return TRUE;
-+    }
-     return FALSE;
- }
- #endif
-@@ -2088,11 +2112,10 @@
- /*
-  * Get an Ex command line for the ":" command.
-  */
--/* ARGSUSED */
-     char_u *
--getexline(c, dummy, indent)
-+getexline(c, cookie, indent)
-     int		c;		/* normally ':', NUL for ":append" */
--    void	*dummy;		/* cookie not used */
-+    void	*cookie UNUSED;
-     int		indent;		/* indent for inside conditionals */
- {
-     /* When executing a register, remove ':' that's in front of each line. */
-@@ -2107,12 +2130,11 @@
-  * mappings or abbreviations.
-  * Returns a string in allocated memory or NULL.
-  */
--/* ARGSUSED */
-     char_u *
--getexmodeline(promptc, dummy, indent)
-+getexmodeline(promptc, cookie, indent)
-     int		promptc;	/* normally ':', NUL for ":append" and '?' for
- 				   :s prompt */
--    void	*dummy;		/* cookie not used */
-+    void	*cookie UNUSED;
-     int		indent;		/* indent for inside conditionals */
- {
-     garray_T	line_ga;
-@@ -2508,6 +2530,20 @@
-     }
-     mch_memmove(ccline.cmdbuff, p, (size_t)ccline.cmdlen + 1);
-     vim_free(p);
-+
-+    if (ccline.xpc != NULL
-+	    && ccline.xpc->xp_pattern != NULL
-+	    && ccline.xpc->xp_context != EXPAND_NOTHING
-+	    && ccline.xpc->xp_context != EXPAND_UNSUCCESSFUL)
-+    {
-+	int i = (int)(ccline.xpc->xp_pattern - p);
-+
-+	/* If xp_pattern points inside the old cmdbuff it needs to be adjusted
-+	 * to point into the newly allocated memory. */
-+	if (i >= 0 && i <= ccline.cmdlen)
-+	    ccline.xpc->xp_pattern = ccline.cmdbuff + i;
-+    }
-+
-     return OK;
- }
- 
-@@ -2875,6 +2911,7 @@
-     prev_ccline = ccline;
-     ccline.cmdbuff = NULL;
-     ccline.cmdprompt = NULL;
-+    ccline.xpc = NULL;
- }
- 
- /*
-@@ -3582,6 +3619,7 @@
- ExpandInit(xp)
-     expand_T	*xp;
- {
-+    xp->xp_pattern = NULL;
-     xp->xp_backslash = XP_BS_NONE;
- #ifndef BACKSLASH_IN_FILENAME
-     xp->xp_shell = FALSE;
-@@ -3791,11 +3829,10 @@
-  * Returns EXPAND_NOTHING when the character that triggered expansion should
-  * be inserted like a normal character.
-  */
--/*ARGSUSED*/
-     static int
- showmatches(xp, wildmenu)
-     expand_T	*xp;
--    int		wildmenu;
-+    int		wildmenu UNUSED;
- {
- #define L_SHOWFILE(m) (showtail ? sm_gettail(files_found[m]) : files_found[m])
-     int		num_files;
-@@ -4477,6 +4514,12 @@
- 	    {EXPAND_EVENTS, get_event_name, TRUE},
- 	    {EXPAND_AUGROUP, get_augroup_name, TRUE},
- #endif
-+#ifdef FEAT_CSCOPE
-+	    {EXPAND_CSCOPE, get_cscope_name, TRUE},
-+#endif
-+#ifdef FEAT_SIGNS
-+	    {EXPAND_SIGN, get_sign_name, TRUE},
-+#endif
- #if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \
- 	&& (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE))
- 	    {EXPAND_LANGUAGE, get_lang_arg, TRUE},
-@@ -4490,7 +4533,7 @@
- 	 * right function to do the expansion.
- 	 */
- 	ret = FAIL;
--	for (i = 0; i < sizeof(tab) / sizeof(struct expgen); ++i)
-+	for (i = 0; i < (int)(sizeof(tab) / sizeof(struct expgen)); ++i)
- 	    if (xp->xp_context == tab[i].context)
- 	    {
- 		if (tab[i].ic)
-@@ -4831,14 +4874,14 @@
-     /* Loop over the items in the list. */
-     for (li = retlist->lv_first; li != NULL; li = li->li_next)
-     {
--	if (li->li_tv.v_type != VAR_STRING)
--	    continue;  /* Skip non-string items */
-+	if (li->li_tv.v_type != VAR_STRING || li->li_tv.vval.v_string == NULL)
-+	    continue;  /* Skip non-string items and empty strings */
- 
- 	if (ga_grow(&ga, 1) == FAIL)
- 	    break;
- 
- 	((char_u **)ga.ga_data)[ga.ga_len] =
--	    vim_strsave(li->li_tv.vval.v_string);
-+					 vim_strsave(li->li_tv.vval.v_string);
- 	++ga.ga_len;
-     }
-     list_unref(retlist);
-@@ -4871,7 +4914,7 @@
-     if (s == NULL)
- 	return FAIL;
-     sprintf((char *)s, "%s/%s*.vim", dirname, pat);
--    all = globpath(p_rtp, s);
-+    all = globpath(p_rtp, s, 0);
-     vim_free(s);
-     if (all == NULL)
- 	return FAIL;
-@@ -4912,9 +4955,10 @@
-  * newlines.  Returns NULL for an error or no matches.
-  */
-     char_u *
--globpath(path, file)
-+globpath(path, file, expand_options)
-     char_u	*path;
-     char_u	*file;
-+    int		expand_options;
- {
-     expand_T	xpc;
-     char_u	*buf;
-@@ -4943,10 +4987,10 @@
- 	{
- 	    add_pathsep(buf);
- 	    STRCAT(buf, file);
--	    if (ExpandFromContext(&xpc, buf, &num_p, &p, WILD_SILENT) != FAIL
--								 && num_p > 0)
-+	    if (ExpandFromContext(&xpc, buf, &num_p, &p,
-+			     WILD_SILENT|expand_options) != FAIL && num_p > 0)
- 	    {
--		ExpandEscape(&xpc, buf, num_p, p, WILD_SILENT);
-+		ExpandEscape(&xpc, buf, num_p, p, WILD_SILENT|expand_options);
- 		for (len = 0, i = 0; i < num_p; ++i)
- 		    len += (int)STRLEN(p[i]) + 1;
- 
-@@ -5641,7 +5685,7 @@
- 	histype1 = get_histtype(arg);
- 	if (histype1 == -1)
- 	{
--	    if (STRICMP(arg, "all") == 0)
-+	    if (STRNICMP(arg, "all", STRLEN(arg)) == 0)
- 	    {
- 		histype1 = 0;
- 		histype2 = HIST_COUNT-1;
-@@ -6020,9 +6064,7 @@
- # endif
- 	return K_IGNORE;
-     }
--    cmdwin_type = ccline.cmdfirstc;
--    if (cmdwin_type == NUL)
--	cmdwin_type = '-';
-+    cmdwin_type = get_cmdline_type();
- 
-     /* Create the command-line buffer empty. */
-     (void)do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, ECMD_HIDE);
-@@ -6030,6 +6072,9 @@
-     set_option_value((char_u *)"bt", 0L, (char_u *)"nofile", OPT_LOCAL);
-     set_option_value((char_u *)"swf", 0L, NULL, OPT_LOCAL);
-     curbuf->b_p_ma = TRUE;
-+#ifdef FEAT_FOLDING
-+    curwin->w_p_fen = FALSE;
-+#endif
- # ifdef FEAT_RIGHTLEFT
-     curwin->w_p_rl = cmdmsg_rl;
-     cmdmsg_rl = FALSE;
-@@ -6046,7 +6091,7 @@
-     /* Showing the prompt may have set need_wait_return, reset it. */
-     need_wait_return = FALSE;
- 
--    histtype = hist_char2type(ccline.cmdfirstc);
-+    histtype = hist_char2type(cmdwin_type);
-     if (histtype == HIST_CMD || histtype == HIST_DEBUG)
-     {
- 	if (p_wc == TAB)
-diff -Naur vim72.orig/src/farsi.c vim72/src/farsi.c
---- vim72.orig/src/farsi.c	2007-12-31 08:28:10.000000000 -0800
-+++ vim72/src/farsi.c	2009-07-19 15:16:23.000000000 -0700
-@@ -103,7 +103,8 @@
- 	case F_HE:
- 		tempc = _HE;
- 
--		if (p_ri && (curwin->w_cursor.col+1 < STRLEN(ml_get_curline())))
-+		if (p_ri && (curwin->w_cursor.col + 1
-+					 < (colnr_T)STRLEN(ml_get_curline())))
- 		{
- 		    inc_cursor();
- 
-@@ -344,7 +345,7 @@
-     if (curwin->w_p_rl && p_ri)
- 	return;
- 
--    if ( (curwin->w_cursor.col < STRLEN(ml_get_curline())))
-+    if ((curwin->w_cursor.col < (colnr_T)STRLEN(ml_get_curline())))
-     {
- 	if ((p_ri && curwin->w_cursor.col) || !p_ri)
- 	{
-@@ -565,7 +566,7 @@
- 
-     tempc = gchar_cursor();
- 
--    if (curwin->w_cursor.col+1 < STRLEN(ml_get_curline()))
-+    if (curwin->w_cursor.col + 1 < (colnr_T)STRLEN(ml_get_curline()))
-     {
- 	inc_cursor();
- 
-@@ -594,8 +595,8 @@
- {
-     int	tempc;
- 
--    if (!curwin->w_cursor.col &&
--	(curwin->w_cursor.col+1 == STRLEN(ml_get_curline())))
-+    if (curwin->w_cursor.col != 0 &&
-+	(curwin->w_cursor.col + 1 == (colnr_T)STRLEN(ml_get_curline())))
- 	return;
- 
-     if (!curwin->w_cursor.col && p_ri)
-@@ -663,8 +664,8 @@
- {
-     int	tempc;
- 
--    if (!curwin->w_cursor.col &&
--	(curwin->w_cursor.col+1 == STRLEN(ml_get_curline())))
-+    if (curwin->w_cursor.col != 0 &&
-+	(curwin->w_cursor.col + 1 == (colnr_T)STRLEN(ml_get_curline())))
- 	return;
- 
-     if (!curwin->w_cursor.col && p_ri)
-diff -Naur vim72.orig/src/feature.h vim72/src/feature.h
---- vim72.orig/src/feature.h	2008-08-06 04:00:39.000000000 -0700
-+++ vim72/src/feature.h	2009-07-19 15:09:53.000000000 -0700
-@@ -767,9 +767,13 @@
- 
- /*
-  * +browse		":browse" command.
-+ *			or just the ":browse" command modifier
-  */
--#if defined(FEAT_NORMAL) && (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC))
--# define FEAT_BROWSE
-+#if defined(FEAT_NORMAL)
-+# define FEAT_BROWSE_CMD
-+# if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC)
-+#  define FEAT_BROWSE
-+# endif
- #endif
- 
- /*
-diff -Naur vim72.orig/src/fileio.c vim72/src/fileio.c
---- vim72.orig/src/fileio.c	2008-08-06 04:01:03.000000000 -0700
-+++ vim72/src/fileio.c	2009-07-19 15:18:23.000000000 -0700
-@@ -69,7 +69,7 @@
- static int au_find_group __ARGS((char_u *name));
- 
- # define AUGROUP_DEFAULT    -1	    /* default autocmd group */
--# define AUGROUP_ERROR	    -2	    /* errornouse autocmd group */
-+# define AUGROUP_ERROR	    -2	    /* erroneous autocmd group */
- # define AUGROUP_ALL	    -3	    /* all autocmd groups */
- #endif
- 
-@@ -144,7 +144,9 @@
- # endif
- #endif
- static int move_lines __ARGS((buf_T *frombuf, buf_T *tobuf));
--
-+#ifdef FEAT_AUTOCMD
-+static char *e_auchangedbuf = N_("E812: Autocommands changed buffer or buffer name");
-+#endif
- 
-     void
- filemess(buf, name, s, attr)
-@@ -295,6 +297,19 @@
-     int		conv_restlen = 0;	/* nr of bytes in conv_rest[] */
- #endif
- 
-+#ifdef FEAT_AUTOCMD
-+    /* Remember the initial values of curbuf, curbuf->b_ffname and
-+     * curbuf->b_fname to detect whether they are altered as a result of
-+     * executing nasty autocommands.  Also check if "fname" and "sfname"
-+     * point to one of these values. */
-+    buf_T   *old_curbuf = curbuf;
-+    char_u  *old_b_ffname = curbuf->b_ffname;
-+    char_u  *old_b_fname = curbuf->b_fname;
-+    int     using_b_ffname = (fname == curbuf->b_ffname)
-+					      || (sfname == curbuf->b_ffname);
-+    int     using_b_fname = (fname == curbuf->b_fname)
-+					       || (sfname == curbuf->b_fname);
-+#endif
-     write_no_eol_lnum = 0;	/* in case it was set by the previous read */
- 
-     /*
-@@ -589,7 +604,21 @@
- #ifdef FEAT_QUICKFIX
- 		    if (!bt_dontwrite(curbuf))
- #endif
-+		    {
- 			check_need_swap(newfile);
-+#ifdef FEAT_AUTOCMD
-+			/* SwapExists autocommand may mess things up */
-+			if (curbuf != old_curbuf
-+				|| (using_b_ffname
-+					&& (old_b_ffname != curbuf->b_ffname))
-+				|| (using_b_fname
-+					 && (old_b_fname != curbuf->b_fname)))
-+			{
-+			    EMSG(_(e_auchangedbuf));
-+			    return FAIL;
-+			}
-+#endif
-+		    }
- 		    if (dir_of_file_exists(fname))
- 			filemess(curbuf, sfname, (char_u *)_("[New File]"), 0);
- 		    else
-@@ -668,9 +697,21 @@
- #endif
-     {
- 	check_need_swap(newfile);
-+#ifdef FEAT_AUTOCMD
-+	if (!read_stdin && (curbuf != old_curbuf
-+		|| (using_b_ffname && (old_b_ffname != curbuf->b_ffname))
-+		|| (using_b_fname && (old_b_fname != curbuf->b_fname))))
-+	{
-+	    EMSG(_(e_auchangedbuf));
-+	    if (!read_buffer)
-+		close(fd);
-+	    return FAIL;
-+	}
-+#endif
- #ifdef UNIX
- 	/* Set swap file protection bits after creating it. */
--	if (swap_mode > 0 && curbuf->b_ml.ml_mfp->mf_fname != NULL)
-+	if (swap_mode > 0 && curbuf->b_ml.ml_mfp != NULL
-+			  && curbuf->b_ml.ml_mfp->mf_fname != NULL)
- 	    (void)mch_setperm(curbuf->b_ml.ml_mfp->mf_fname, (long)swap_mode);
- #endif
-     }
-@@ -698,7 +739,6 @@
-     {
- 	int	m = msg_scroll;
- 	int	n = msg_scrolled;
--	buf_T	*old_curbuf = curbuf;
- 
- 	/*
- 	 * The file must be closed again, the autocommands may want to change
-@@ -740,8 +780,13 @@
- 	/*
- 	 * Don't allow the autocommands to change the current buffer.
- 	 * Try to re-open the file.
-+	 *
-+	 * Don't allow the autocommands to change the buffer name either
-+	 * (cd for example) if it invalidates fname or sfname.
- 	 */
- 	if (!read_stdin && (curbuf != old_curbuf
-+		|| (using_b_ffname && (old_b_ffname != curbuf->b_ffname))
-+		|| (using_b_fname && (old_b_fname != curbuf->b_fname))
- 		|| (fd = mch_open((char *)fname, O_RDONLY | O_EXTRA, 0)) < 0))
- 	{
- 	    --no_wait_return;
-@@ -932,7 +977,10 @@
-     else
-     {
- 	if (eap != NULL && eap->force_ff != 0)
-+	{
- 	    fileformat = get_fileformat_force(curbuf, eap);
-+	    try_unix = try_dos = try_mac = FALSE;
-+	}
- 	else if (curbuf->b_p_bin)
- 	    fileformat = EOL_UNIX;		/* binary: use Unix format */
- 	else if (*p_ffs == NUL)
-@@ -2211,7 +2259,7 @@
-     {
- 	/* Use stderr for stdin, makes shell commands work. */
- 	close(0);
--	dup(2);
-+	ignored = dup(2);
-     }
- #endif
- 
-@@ -2341,11 +2389,6 @@
- 		STRCAT(IObuff, _("[CR missing]"));
- 		c = TRUE;
- 	    }
--	    if (ff_error == EOL_MAC)
--	    {
--		STRCAT(IObuff, _("[NL found]"));
--		c = TRUE;
--	    }
- 	    if (split)
- 	    {
- 		STRCAT(IObuff, _("[long lines split]"));
-@@ -2711,7 +2754,7 @@
- {
-     if (!curbuf->b_marks_read && get_viminfo_parameter('\'') > 0
- 						  && curbuf->b_ffname != NULL)
--	read_viminfo(NULL, FALSE, TRUE, FALSE);
-+	read_viminfo(NULL, VIF_WANT_MARKS);
- 
-     /* Always set b_marks_read; needed when 'viminfo' is changed to include
-      * the ' parameter after opening a buffer. */
-@@ -3451,12 +3494,12 @@
- 		{
- # ifdef UNIX
- #  ifdef HAVE_FCHOWN
--		    fchown(fd, st_old.st_uid, st_old.st_gid);
-+		    ignored = fchown(fd, st_old.st_uid, st_old.st_gid);
- #  endif
- 		    if (mch_stat((char *)IObuff, &st) < 0
- 			    || st.st_uid != st_old.st_uid
- 			    || st.st_gid != st_old.st_gid
--			    || st.st_mode != perm)
-+			    || (long)st.st_mode != perm)
- 			backup_copy = TRUE;
- # endif
- 		    /* Close the file before removing it, on MS-Windows we
-@@ -4367,14 +4410,14 @@
- 		|| st.st_uid != st_old.st_uid
- 		|| st.st_gid != st_old.st_gid)
- 	{
--	    fchown(fd, st_old.st_uid, st_old.st_gid);
-+	    ignored = fchown(fd, st_old.st_uid, st_old.st_gid);
- 	    if (perm >= 0)	/* set permission again, may have changed */
- 		(void)mch_setperm(wfname, perm);
- 	}
- # endif
- 	buf_setino(buf);
-     }
--    else if (buf->b_dev < 0)
-+    else if (!buf->b_dev_valid)
- 	/* Set the inode when creating a new file. */
- 	buf_setino(buf);
- #endif
-@@ -4782,6 +4825,8 @@
-     char_u	*sfname;
- {
- #ifdef FEAT_AUTOCMD
-+    buf_T	*buf = curbuf;
-+
-     /* It's like the unnamed buffer is deleted.... */
-     if (curbuf->b_p_bl)
- 	apply_autocmds(EVENT_BUFDELETE, NULL, NULL, FALSE, curbuf);
-@@ -4790,6 +4835,12 @@
-     if (aborting())	    /* autocmds may abort script processing */
- 	return FAIL;
- # endif
-+    if (curbuf != buf)
-+    {
-+	/* We are in another buffer now, don't do the renaming. */
-+	EMSG(_(e_auchangedbuf));
-+	return FAIL;
-+    }
- #endif
- 
-     if (setfname(curbuf, fname, sfname, FALSE) == OK)
-@@ -5246,13 +5297,16 @@
- 	    /* Convert with iconv(). */
- 	    if (ip->bw_restlen > 0)
- 	    {
-+		char *fp;
-+
- 		/* Need to concatenate the remainder of the previous call and
- 		 * the bytes of the current call.  Use the end of the
- 		 * conversion buffer for this. */
- 		fromlen = len + ip->bw_restlen;
--		from = (char *)ip->bw_conv_buf + ip->bw_conv_buflen - fromlen;
--		mch_memmove((void *)from, ip->bw_rest, (size_t)ip->bw_restlen);
--		mch_memmove((void *)(from + ip->bw_restlen), buf, (size_t)len);
-+		fp = (char *)ip->bw_conv_buf + ip->bw_conv_buflen - fromlen;
-+		mch_memmove(fp, ip->bw_rest, (size_t)ip->bw_restlen);
-+		mch_memmove(fp + ip->bw_restlen, buf, (size_t)len);
-+		from = fp;
- 		tolen = ip->bw_conv_buflen - fromlen;
- 	    }
- 	    else
-@@ -5550,9 +5604,10 @@
- 	    name = "ucs-4le";	/* FF FE 00 00 */
- 	    len = 4;
- 	}
--	else if (flags == FIO_ALL || flags == (FIO_UCS2 | FIO_ENDIAN_L))
-+	else if (flags == (FIO_UCS2 | FIO_ENDIAN_L))
- 	    name = "ucs-2le";	/* FF FE */
--	else if (flags == (FIO_UTF16 | FIO_ENDIAN_L))
-+	else if (flags == FIO_ALL || flags == (FIO_UTF16 | FIO_ENDIAN_L))
-+	    /* utf-16le is preferred, it also works for ucs-2le text */
- 	    name = "utf-16le";	/* FF FE */
-     }
-     else if (p[0] == 0xfe && p[1] == 0xff
-@@ -5917,7 +5972,7 @@
- 	else if (*ext == '.')
- #endif
- 	{
--	    if (s - ptr > (size_t)8)
-+	    if ((size_t)(s - ptr) > (size_t)8)
- 	    {
- 		s = ptr + 8;
- 		*s = '\0';
-@@ -6031,9 +6086,9 @@
- 	{
- 	    tbuf[FGETS_SIZE - 2] = NUL;
- #ifdef USE_CR
--	    fgets_cr((char *)tbuf, FGETS_SIZE, fp);
-+	    ignoredp = fgets_cr((char *)tbuf, FGETS_SIZE, fp);
- #else
--	    fgets((char *)tbuf, FGETS_SIZE, fp);
-+	    ignoredp = fgets((char *)tbuf, FGETS_SIZE, fp);
- #endif
- 	} while (tbuf[FGETS_SIZE - 2] != NUL && tbuf[FGETS_SIZE - 2] != '\n');
-     }
-@@ -6107,12 +6162,24 @@
- #ifdef HAVE_ACL
-     vim_acl_T	acl;		/* ACL from original file */
- #endif
-+#if defined(UNIX) || defined(CASE_INSENSITIVE_FILENAME)
-+    int		use_tmp_file = FALSE;
-+#endif
- 
-     /*
--     * When the names are identical, there is nothing to do.
-+     * When the names are identical, there is nothing to do.  When they refer
-+     * to the same file (ignoring case and slash/backslash differences) but
-+     * the file name differs we need to go through a temp file.
-      */
-     if (fnamecmp(from, to) == 0)
--	return 0;
-+    {
-+#ifdef CASE_INSENSITIVE_FILENAME
-+	if (STRCMP(gettail(from), gettail(to)) != 0)
-+	    use_tmp_file = TRUE;
-+	else
-+#endif
-+	    return 0;
-+    }
- 
-     /*
-      * Fail if the "from" file doesn't exist.  Avoids that "to" is deleted.
-@@ -6120,6 +6187,55 @@
-     if (mch_stat((char *)from, &st) < 0)
- 	return -1;
- 
-+#ifdef UNIX
-+    {
-+	struct stat	st_to;
-+
-+	/* It's possible for the source and destination to be the same file.
-+	 * This happens when "from" and "to" differ in case and are on a FAT32
-+	 * filesystem.  In that case go through a temp file name. */
-+	if (mch_stat((char *)to, &st_to) >= 0
-+		&& st.st_dev == st_to.st_dev
-+		&& st.st_ino == st_to.st_ino)
-+	    use_tmp_file = TRUE;
-+    }
-+#endif
-+
-+#if defined(UNIX) || defined(CASE_INSENSITIVE_FILENAME)
-+    if (use_tmp_file)
-+    {
-+	char	tempname[MAXPATHL + 1];
-+
-+	/*
-+	 * Find a name that doesn't exist and is in the same directory.
-+	 * Rename "from" to "tempname" and then rename "tempname" to "to".
-+	 */
-+	if (STRLEN(from) >= MAXPATHL - 5)
-+	    return -1;
-+	STRCPY(tempname, from);
-+	for (n = 123; n < 99999; ++n)
-+	{
-+	    sprintf((char *)gettail((char_u *)tempname), "%d", n);
-+	    if (mch_stat(tempname, &st) < 0)
-+	    {
-+		if (mch_rename((char *)from, tempname) == 0)
-+		{
-+		    if (mch_rename(tempname, (char *)to) == 0)
-+			return 0;
-+		    /* Strange, the second step failed.  Try moving the
-+		     * file back and return failure. */
-+		    mch_rename(tempname, (char *)from);
-+		    return -1;
-+		}
-+		/* If it fails for one temp name it will most likely fail
-+		 * for any temp name, give up. */
-+		return -1;
-+	    }
-+	}
-+	return -1;
-+    }
-+#endif
-+
-     /*
-      * Delete the "to" file, this is required on some systems to make the
-      * mch_rename() work, on other systems it makes sure that we don't have
-@@ -6260,7 +6376,7 @@
- 
-     if (!stuff_empty() || global_busy || !typebuf_typed()
- #ifdef FEAT_AUTOCMD
--			|| autocmd_busy || curbuf_lock > 0
-+			|| autocmd_busy || curbuf_lock > 0 || allbuf_lock > 0
- #endif
- 					)
- 	need_check_timestamps = TRUE;		/* check later */
-@@ -6353,11 +6469,10 @@
-  * return 2 if a message has been displayed.
-  * return 0 otherwise.
-  */
--/*ARGSUSED*/
-     int
- buf_check_timestamp(buf, focus)
-     buf_T	*buf;
--    int		focus;		/* called for GUI focus event */
-+    int		focus UNUSED;	/* called for GUI focus event */
- {
-     struct stat	st;
-     int		stat_res;
-@@ -6462,8 +6577,10 @@
- 	    set_vim_var_string(VV_FCS_REASON, (char_u *)reason, -1);
- 	    set_vim_var_string(VV_FCS_CHOICE, (char_u *)"", -1);
- # endif
-+	    ++allbuf_lock;
- 	    n = apply_autocmds(EVENT_FILECHANGEDSHELL,
- 				      buf->b_fname, buf->b_fname, FALSE, buf);
-+	    --allbuf_lock;
- 	    busy = FALSE;
- 	    if (n)
- 	    {
-@@ -6511,7 +6628,10 @@
- 			mesg = _("W16: Warning: Mode of file \"%s\" has changed since editing started");
- 			mesg2 = _("See \":help W16\" for more info.");
- 		    }
--		    /* Else: only timestamp changed, ignored */
-+		    else
-+			/* Only timestamp changed, store it to avoid a warning
-+			 * in check_mtime() later. */
-+			buf->b_mtime_read = buf->b_mtime;
- 		}
- 	    }
- 	}
-@@ -6538,6 +6658,11 @@
- 	    tbuf = alloc((unsigned)(STRLEN(path) + STRLEN(mesg)
- 							+ STRLEN(mesg2) + 2));
- 	    sprintf((char *)tbuf, mesg, path);
-+#ifdef FEAT_EVAL
-+	    /* Set warningmsg here, before the unimportant and output-specific
-+	     * mesg2 has been appended. */
-+	    set_vim_var_string(VV_WARNINGMSG, tbuf, -1);
-+#endif
- #if defined(FEAT_CON_DIALOG) || defined(FEAT_GUI_DIALOG)
- 	    if (can_reload)
- 	    {
-@@ -6732,10 +6857,11 @@
- #endif
- #ifdef FEAT_FOLDING
- 	{
--	    win_T *wp;
-+	    win_T	*wp;
-+	    tabpage_T	*tp;
- 
- 	    /* Update folds unless they are defined manually. */
--	    FOR_ALL_WINDOWS(wp)
-+	    FOR_ALL_TAB_WINDOWS(tp, wp)
- 		if (wp->w_buffer == curwin->w_buffer
- 			&& !foldmethodIsManual(wp))
- 		    foldUpdateAll(wp);
-@@ -6753,12 +6879,11 @@
-     /* Careful: autocommands may have made "buf" invalid! */
- }
- 
--/*ARGSUSED*/
-     void
- buf_store_time(buf, st, fname)
-     buf_T	*buf;
-     struct stat	*st;
--    char_u	*fname;
-+    char_u	*fname UNUSED;
- {
-     buf->b_mtime = (long)st->st_mtime;
-     buf->b_orig_size = (size_t)st->st_size;
-@@ -6821,10 +6946,9 @@
-  * The returned pointer is to allocated memory.
-  * The returned pointer is NULL if no valid name was found.
-  */
--/*ARGSUSED*/
-     char_u  *
- vim_tempname(extra_char)
--    int	    extra_char;	    /* character to use in the name instead of '?' */
-+    int	    extra_char UNUSED;  /* char to use in the name instead of '?' */
- {
- #ifdef USE_TMPNAM
-     char_u	itmp[L_tmpnam];	/* use tmpnam() */
-@@ -6853,7 +6977,7 @@
- 	/*
- 	 * Try the entries in TEMPDIRNAMES to create the temp directory.
- 	 */
--	for (i = 0; i < sizeof(tempdirs) / sizeof(char *); ++i)
-+	for (i = 0; i < (int)(sizeof(tempdirs) / sizeof(char *)); ++i)
- 	{
- 	    /* expand $TMP, leave room for "/v1100000/999999999" */
- 	    expand_env((char_u *)tempdirs[i], itmp, TEMPNAMELEN - 20);
-@@ -8245,7 +8369,7 @@
- 
- 	    /* Execute the modeline settings, but don't set window-local
- 	     * options if we are using the current window for another buffer. */
--	    do_modelines(aco.save_curwin == NULL ? OPT_NOWIN : 0);
-+	    do_modelines(curwin == aucmd_win ? OPT_NOWIN : 0);
- 
- 	    /* restore the current window */
- 	    aucmd_restbuf(&aco);
-@@ -8261,8 +8385,8 @@
- 
- /*
-  * Prepare for executing autocommands for (hidden) buffer "buf".
-- * Search a window for the current buffer.  Save the cursor position and
-- * screen offset.
-+ * Search for a visible window containing the current buffer.  If there isn't
-+ * one then use "aucmd_win".
-  * Set "curbuf" and "curwin" to match "buf".
-  * When FEAT_AUTOCMD is not defined another version is used, see below.
-  */
-@@ -8272,8 +8396,9 @@
-     buf_T	*buf;		/* new curbuf */
- {
-     win_T	*win;
--
--    aco->new_curbuf = buf;
-+#ifdef FEAT_WINDOWS
-+    int		save_ea;
-+#endif
- 
-     /* Find a window that is for the new buffer */
-     if (buf == curbuf)		/* be quick when buf is curbuf */
-@@ -8287,42 +8412,51 @@
- 	win = NULL;
- #endif
- 
--    /*
--     * Prefer to use an existing window for the buffer, it has the least side
--     * effects (esp. if "buf" is curbuf).
--     * Otherwise, use curwin for "buf".  It might make some items in the
--     * window invalid.  At least save the cursor and topline.
--     */
-+    /* Allocate "aucmd_win" when needed.  If this fails (out of memory) fall
-+     * back to using the current window. */
-+    if (win == NULL && aucmd_win == NULL)
-+    {
-+	win_alloc_aucmd_win();
-+	if (aucmd_win == NULL)
-+	    win = curwin;
-+    }
-+
-+    aco->save_curwin = curwin;
-+    aco->save_curbuf = curbuf;
-     if (win != NULL)
-     {
--	/* there is a window for "buf", make it the curwin */
--	aco->save_curwin = curwin;
-+	/* There is a window for "buf" in the current tab page, make it the
-+	 * curwin.  This is preferred, it has the least side effects (esp. if
-+	 * "buf" is curbuf). */
- 	curwin = win;
--	aco->save_buf = win->w_buffer;
--	aco->new_curwin = win;
-     }
-     else
-     {
--	/* there is no window for "buf", use curwin */
--	aco->save_curwin = NULL;
--	aco->save_buf = curbuf;
--	--curbuf->b_nwindows;
--	curwin->w_buffer = buf;
-+	/* There is no window for "buf", use "aucmd_win".  To minimize the side
-+	 * effects, insert it in a the current tab page.
-+	 * Anything related to a window (e.g., setting folds) may have
-+	 * unexpected results. */
-+	aucmd_win->w_buffer = buf;
- 	++buf->b_nwindows;
-+	win_init_empty(aucmd_win); /* set cursor and topline to safe values */
- 
--	/* save cursor and topline, set them to safe values */
--	aco->save_cursor = curwin->w_cursor;
--	curwin->w_cursor.lnum = 1;
--	curwin->w_cursor.col = 0;
--	aco->save_topline = curwin->w_topline;
--	curwin->w_topline = 1;
--#ifdef FEAT_DIFF
--	aco->save_topfill = curwin->w_topfill;
--	curwin->w_topfill = 0;
-+#ifdef FEAT_WINDOWS
-+	/* Split the current window, put the aucmd_win in the upper half.
-+	 * We don't want the BufEnter or WinEnter autocommands. */
-+	block_autocmds();
-+	make_snapshot(SNAP_AUCMD_IDX);
-+	save_ea = p_ea;
-+	p_ea = FALSE;
-+	(void)win_split_ins(0, WSP_TOP, aucmd_win, 0);
-+	(void)win_comp_pos();   /* recompute window positions */
-+	p_ea = save_ea;
-+	unblock_autocmds();
- #endif
-+	curwin = aucmd_win;
-     }
--
-     curbuf = buf;
-+    aco->new_curwin = curwin;
-+    aco->new_curbuf = curbuf;
- }
- 
- /*
-@@ -8334,21 +8468,88 @@
- aucmd_restbuf(aco)
-     aco_save_T	*aco;		/* structure holding saved values */
- {
--    if (aco->save_curwin != NULL)
-+#ifdef FEAT_WINDOWS
-+    int dummy;
-+#endif
-+
-+    if (aco->new_curwin == aucmd_win)
-+    {
-+	--curbuf->b_nwindows;
-+#ifdef FEAT_WINDOWS
-+	/* Find "aucmd_win", it can't be closed, but it may be in another tab
-+	 * page. Do not trigger autocommands here. */
-+	block_autocmds();
-+	if (curwin != aucmd_win)
-+	{
-+	    tabpage_T	*tp;
-+	    win_T	*wp;
-+
-+	    FOR_ALL_TAB_WINDOWS(tp, wp)
-+	    {
-+		if (wp == aucmd_win)
-+		{
-+		    if (tp != curtab)
-+			goto_tabpage_tp(tp);
-+		    win_goto(aucmd_win);
-+		    break;
-+		}
-+	    }
-+	}
-+
-+	/* Remove the window and frame from the tree of frames. */
-+	(void)winframe_remove(curwin, &dummy, NULL);
-+	win_remove(curwin, NULL);
-+	last_status(FALSE);	    /* may need to remove last status line */
-+	restore_snapshot(SNAP_AUCMD_IDX, FALSE);
-+	(void)win_comp_pos();   /* recompute window positions */
-+	unblock_autocmds();
-+
-+	if (win_valid(aco->save_curwin))
-+	    curwin = aco->save_curwin;
-+	else
-+	    /* Hmm, original window disappeared.  Just use the first one. */
-+	    curwin = firstwin;
-+# ifdef FEAT_EVAL
-+	vars_clear(&aucmd_win->w_vars.dv_hashtab);  /* free all w: variables */
-+# endif
-+#else
-+	curwin = aco->save_curwin;
-+#endif
-+	curbuf = curwin->w_buffer;
-+
-+	/* the buffer contents may have changed */
-+	check_cursor();
-+	if (curwin->w_topline > curbuf->b_ml.ml_line_count)
-+	{
-+	    curwin->w_topline = curbuf->b_ml.ml_line_count;
-+#ifdef FEAT_DIFF
-+	    curwin->w_topfill = 0;
-+#endif
-+	}
-+#if defined(FEAT_GUI)
-+	/* Hide the scrollbars from the aucmd_win and update. */
-+	gui_mch_enable_scrollbar(&aucmd_win->w_scrollbars[SBAR_LEFT], FALSE);
-+	gui_mch_enable_scrollbar(&aucmd_win->w_scrollbars[SBAR_RIGHT], FALSE);
-+	gui_may_update_scrollbars();
-+#endif
-+    }
-+    else
-     {
- 	/* restore curwin */
- #ifdef FEAT_WINDOWS
- 	if (win_valid(aco->save_curwin))
- #endif
- 	{
--	    /* restore the buffer which was previously edited by curwin, if
--	     * it's still the same window and it's valid */
-+	    /* Restore the buffer which was previously edited by curwin, if
-+	     * it was chagned, we are still the same window and the buffer is
-+	     * valid. */
- 	    if (curwin == aco->new_curwin
--		    && buf_valid(aco->save_buf)
--		    && aco->save_buf->b_ml.ml_mfp != NULL)
-+		    && curbuf != aco->new_curbuf
-+		    && buf_valid(aco->new_curbuf)
-+		    && aco->new_curbuf->b_ml.ml_mfp != NULL)
- 	    {
- 		--curbuf->b_nwindows;
--		curbuf = aco->save_buf;
-+		curbuf = aco->new_curbuf;
- 		curwin->w_buffer = curbuf;
- 		++curbuf->b_nwindows;
- 	    }
-@@ -8357,34 +8558,6 @@
- 	    curbuf = curwin->w_buffer;
- 	}
-     }
--    else
--    {
--	/* restore buffer for curwin if it still exists and is loaded */
--	if (buf_valid(aco->save_buf) && aco->save_buf->b_ml.ml_mfp != NULL)
--	{
--	    --curbuf->b_nwindows;
--	    curbuf = aco->save_buf;
--	    curwin->w_buffer = curbuf;
--	    ++curbuf->b_nwindows;
--	    curwin->w_cursor = aco->save_cursor;
--	    check_cursor();
--	    /* check topline < line_count, in case lines got deleted */
--	    if (aco->save_topline <= curbuf->b_ml.ml_line_count)
--	    {
--		curwin->w_topline = aco->save_topline;
--#ifdef FEAT_DIFF
--		curwin->w_topfill = aco->save_topfill;
--#endif
--	    }
--	    else
--	    {
--		curwin->w_topline = curbuf->b_ml.ml_line_count;
--#ifdef FEAT_DIFF
--		curwin->w_topfill = 0;
--#endif
--	    }
--	}
--    }
- }
- 
- static int	autocmd_nested = FALSE;
-@@ -8523,6 +8696,7 @@
-     char_u	*save_sourcing_name;
-     linenr_T	save_sourcing_lnum;
-     char_u	*save_autocmd_fname;
-+    int		save_autocmd_fname_full;
-     int		save_autocmd_bufnr;
-     char_u	*save_autocmd_match;
-     int		save_autocmd_busy;
-@@ -8601,6 +8775,7 @@
-      * Save the autocmd_* variables and info about the current buffer.
-      */
-     save_autocmd_fname = autocmd_fname;
-+    save_autocmd_fname_full = autocmd_fname_full;
-     save_autocmd_bufnr = autocmd_bufnr;
-     save_autocmd_match = autocmd_match;
-     save_autocmd_busy = autocmd_busy;
-@@ -8618,14 +8793,15 @@
- 	if (fname != NULL && *fname != NUL)
- 	    autocmd_fname = fname;
- 	else if (buf != NULL)
--	    autocmd_fname = buf->b_fname;
-+	    autocmd_fname = buf->b_ffname;
- 	else
- 	    autocmd_fname = NULL;
-     }
-     else
- 	autocmd_fname = fname_io;
-     if (autocmd_fname != NULL)
--	autocmd_fname = FullName_save(autocmd_fname, FALSE);
-+	autocmd_fname = vim_strsave(autocmd_fname);
-+    autocmd_fname_full = FALSE; /* call FullName_save() later */
- 
-     /*
-      * Set the buffer number to be used for <abuf>.
-@@ -8667,9 +8843,11 @@
-     else
-     {
- 	sfname = vim_strsave(fname);
--	/* Don't try expanding FileType, Syntax, WindowID or QuickFixCmd* */
-+	/* Don't try expanding FileType, Syntax, FuncUndefined, WindowID or
-+	 * QuickFixCmd* */
- 	if (event == EVENT_FILETYPE
- 		|| event == EVENT_SYNTAX
-+		|| event == EVENT_FUNCUNDEFINED
- 		|| event == EVENT_REMOTEREPLY
- 		|| event == EVENT_SPELLFILEMISSING
- 		|| event == EVENT_QUICKFIXCMDPRE
-@@ -8810,6 +8988,7 @@
-     sourcing_lnum = save_sourcing_lnum;
-     vim_free(autocmd_fname);
-     autocmd_fname = save_autocmd_fname;
-+    autocmd_fname_full = save_autocmd_fname_full;
-     autocmd_bufnr = save_autocmd_bufnr;
-     autocmd_match = save_autocmd_match;
- #ifdef FEAT_EVAL
-@@ -8918,7 +9097,7 @@
-     {
- 	apc->curpat = NULL;
- 
--	/* only use a pattern when it has not been removed, has commands and
-+	/* Only use a pattern when it has not been removed, has commands and
- 	 * the group matches. For buffer-local autocommands only check the
- 	 * buffer number. */
- 	if (ap->pat != NULL && ap->cmds != NULL
-@@ -8967,12 +9146,11 @@
-  * Called by do_cmdline() to get the next line for ":if".
-  * Returns allocated string, or NULL for end of autocommands.
-  */
--/* ARGSUSED */
-     static char_u *
- getnextac(c, cookie, indent)
--    int	    c;		    /* not used */
-+    int	    c UNUSED;
-     void    *cookie;
--    int	    indent;	    /* not used */
-+    int	    indent UNUSED;
- {
-     AutoPatCmd	    *acp = (AutoPatCmd *)cookie;
-     char_u	    *retval;
-@@ -9083,10 +9261,9 @@
-  * Function given to ExpandGeneric() to obtain the list of autocommand group
-  * names.
-  */
--/*ARGSUSED*/
-     char_u *
- get_augroup_name(xp, idx)
--    expand_T	*xp;
-+    expand_T	*xp UNUSED;
-     int		idx;
- {
-     if (idx == augroups.ga_len)		/* add "END" add the end */
-@@ -9104,7 +9281,7 @@
- set_context_in_autocmd(xp, arg, doautocmd)
-     expand_T	*xp;
-     char_u	*arg;
--    int		doautocmd;	/* TRUE for :doautocmd, FALSE for :autocmd */
-+    int		doautocmd;	/* TRUE for :doauto*, FALSE for :autocmd */
- {
-     char_u	*p;
-     int		group;
-@@ -9152,10 +9329,9 @@
- /*
-  * Function given to ExpandGeneric() to obtain the list of event names.
-  */
--/*ARGSUSED*/
-     char_u *
- get_event_name(xp, idx)
--    expand_T	*xp;
-+    expand_T	*xp UNUSED;
-     int		idx;
- {
-     if (idx < augroups.ga_len)		/* First list group names, if wanted */
-@@ -9296,9 +9472,11 @@
-     aco_save_T	*aco;		/* structure to save values in */
-     buf_T	*buf;		/* new curbuf */
- {
--    aco->save_buf = curbuf;
-+    aco->save_curbuf = curbuf;
-+    --curbuf->b_nwindows;
-     curbuf = buf;
-     curwin->w_buffer = buf;
-+    ++curbuf->b_nwindows;
- }
- 
- /*
-@@ -9309,8 +9487,10 @@
- aucmd_restbuf(aco)
-     aco_save_T	*aco;		/* structure holding saved values */
- {
--    curbuf = aco->save_buf;
-+    --curbuf->b_nwindows;
-+    curbuf = aco->save_curbuf;
-     curwin->w_buffer = curbuf;
-+    ++curbuf->b_nwindows;
- }
- 
- #endif	/* FEAT_AUTOCMD */
-@@ -9467,13 +9647,12 @@
-  *
-  * Returns NULL when out of memory.
-  */
--/*ARGSUSED*/
-     char_u *
- file_pat_to_reg_pat(pat, pat_end, allow_dirs, no_bslash)
-     char_u	*pat;
-     char_u	*pat_end;	/* first char after pattern or NULL */
-     char	*allow_dirs;	/* Result passed back out in here */
--    int		no_bslash;	/* Don't use a backward slash as pathsep */
-+    int		no_bslash UNUSED; /* Don't use a backward slash as pathsep */
- {
-     int		size;
-     char_u	*endp;
-diff -Naur vim72.orig/src/fold.c vim72/src/fold.c
---- vim72.orig/src/fold.c	2008-08-06 04:01:12.000000000 -0700
-+++ vim72/src/fold.c	2009-07-19 15:11:59.000000000 -0700
-@@ -48,7 +48,7 @@
- static int foldFind __ARGS((garray_T *gap, linenr_T lnum, fold_T **fpp));
- static int foldLevelWin __ARGS((win_T *wp, linenr_T lnum));
- static void checkupdate __ARGS((win_T *wp));
--static void setFoldRepeat __ARGS((linenr_T lnum, long count, int open));
-+static void setFoldRepeat __ARGS((linenr_T lnum, long count, int do_open));
- static linenr_T setManualFold __ARGS((linenr_T lnum, int opening, int recurse, int *donep));
- static linenr_T setManualFoldWin __ARGS((win_T *wp, linenr_T lnum, int opening, int recurse, int *donep));
- static void foldOpenNested __ARGS((fold_T *fpr));
-@@ -740,7 +740,7 @@
-     garray_T	*found_ga;
-     fold_T	*found_fp = NULL;
-     linenr_T	found_off = 0;
--    int		use_level = FALSE;
-+    int		use_level;
-     int		maybe_small = FALSE;
-     int		level = 0;
-     linenr_T	lnum = start;
-@@ -757,6 +757,7 @@
- 	gap = &curwin->w_folds;
- 	found_ga = NULL;
- 	lnum_off = 0;
-+	use_level = FALSE;
- 	for (;;)
- 	{
- 	    if (!foldFind(gap, lnum - lnum_off, &fp))
-@@ -783,20 +784,21 @@
- 	else
- 	{
- 	    lnum = found_fp->fd_top + found_fp->fd_len + found_off;
--	    did_one = TRUE;
- 
- 	    if (foldmethodIsManual(curwin))
- 		deleteFoldEntry(found_ga,
- 		    (int)(found_fp - (fold_T *)found_ga->ga_data), recursive);
- 	    else
- 	    {
--		if (found_fp->fd_top + found_off < first_lnum)
--		    first_lnum = found_fp->fd_top;
--		if (lnum > last_lnum)
-+		if (first_lnum > found_fp->fd_top + found_off)
-+		    first_lnum = found_fp->fd_top + found_off;
-+		if (last_lnum < lnum)
- 		    last_lnum = lnum;
--		parseMarker(curwin);
-+		if (!did_one)
-+		    parseMarker(curwin);
- 		deleteFoldMarkers(found_fp, recursive, found_off);
- 	    }
-+	    did_one = TRUE;
- 
- 	    /* redraw window */
- 	    changed_window_setting();
-@@ -811,6 +813,10 @@
- 	    redraw_curbuf_later(INVERTED);
- #endif
-     }
-+    else
-+	/* Deleting markers may make cursor column invalid. */
-+	check_cursor_col();
-+
-     if (last_lnum > 0)
- 	changed_lines(first_lnum, (colnr_T)0, last_lnum, 0L);
- }
-@@ -1241,10 +1247,10 @@
-  * Repeat "count" times.
-  */
-     static void
--setFoldRepeat(lnum, count, open)
-+setFoldRepeat(lnum, count, do_open)
-     linenr_T	lnum;
-     long	count;
--    int		open;
-+    int		do_open;
- {
-     int		done;
-     long	n;
-@@ -1252,7 +1258,7 @@
-     for (n = 0; n < count; ++n)
-     {
- 	done = DONE_NOTHING;
--	(void)setManualFold(lnum, open, FALSE, &done);
-+	(void)setManualFold(lnum, do_open, FALSE, &done);
- 	if (!(done & DONE_ACTION))
- 	{
- 	    /* Only give an error message when no fold could be opened. */
-diff -Naur vim72.orig/src/getchar.c vim72/src/getchar.c
---- vim72.orig/src/getchar.c	2008-07-22 09:57:48.000000000 -0700
-+++ vim72/src/getchar.c	2009-07-19 15:18:49.000000000 -0700
-@@ -1309,6 +1309,9 @@
-     return OK;
- }
- 
-+static int old_char = -1;	/* character put back by vungetc() */
-+static int old_mod_mask;	/* mod_mask for ungotten character */
-+
- #if defined(FEAT_EVAL) || defined(FEAT_EX_EXTRA) || defined(PROTO)
- 
- /*
-@@ -1323,6 +1326,10 @@
-     if (!tp->typebuf_valid)
- 	typebuf = tp->save_typebuf;
- 
-+    tp->old_char = old_char;
-+    tp->old_mod_mask = old_mod_mask;
-+    old_char = -1;
-+
-     tp->save_stuffbuff = stuffbuff;
-     stuffbuff.bh_first.b_next = NULL;
- # ifdef USE_INPUT_BUF
-@@ -1344,6 +1351,9 @@
- 	typebuf = tp->save_typebuf;
-     }
- 
-+    old_char = tp->old_char;
-+    old_mod_mask = tp->old_mod_mask;
-+
-     free_buff(&stuffbuff);
-     stuffbuff = tp->save_stuffbuff;
- # ifdef USE_INPUT_BUF
-@@ -1499,9 +1509,6 @@
- #define KL_PART_KEY -1		/* keylen value for incomplete key-code */
- #define KL_PART_MAP -2		/* keylen value for incomplete mapping */
- 
--static int old_char = -1;	/* character put back by vungetc() */
--static int old_mod_mask;	/* mod_mask for ungotten character */
--
- /*
-  * Get the next input character.
-  * Can return a special key or a multi-byte character.
-@@ -3701,11 +3708,10 @@
-  * Clear all mappings or abbreviations.
-  * 'abbr' should be FALSE for mappings, TRUE for abbreviations.
-  */
--/*ARGSUSED*/
-     void
- map_clear(cmdp, arg, forceit, abbr)
-     char_u	*cmdp;
--    char_u	*arg;
-+    char_u	*arg UNUSED;
-     int		forceit;
-     int		abbr;
- {
-@@ -3734,13 +3740,12 @@
- /*
-  * Clear all mappings in "mode".
-  */
--/*ARGSUSED*/
-     void
- map_clear_int(buf, mode, local, abbr)
--    buf_T	*buf;	    /* buffer for local mappings */
--    int		mode;	    /* mode in which to delete */
--    int		local;	    /* TRUE for buffer-local mappings */
--    int		abbr;	    /* TRUE for abbreviations */
-+    buf_T	*buf UNUSED;	/* buffer for local mappings */
-+    int		mode;		/* mode in which to delete */
-+    int		local UNUSED;	/* TRUE for buffer-local mappings */
-+    int		abbr;		/* TRUE for abbreviations */
- {
-     mapblock_T	*mp, **mpp;
-     int		hash;
-@@ -3816,7 +3821,11 @@
-     int len = 1;
- 
-     if (msg_didout || msg_silent != 0)
-+    {
- 	msg_putchar('\n');
-+	if (got_int)	    /* 'q' typed at MORE prompt */
-+	    return;
-+    }
-     if ((mp->m_mode & (INSERT + CMDLINE)) == INSERT + CMDLINE)
- 	msg_putchar('!');			/* :map! */
-     else if (mp->m_mode & INSERT)
-@@ -4702,7 +4711,7 @@
- 			return FAIL;
- 		    if (mp->m_noremap != REMAP_YES && fprintf(fd, "nore") < 0)
- 			return FAIL;
--		    if (fprintf(fd, cmd) < 0)
-+		    if (fputs(cmd, fd) < 0)
- 			return FAIL;
- 		    if (buf != NULL && fputs(" <buffer>", fd) < 0)
- 			return FAIL;
-@@ -4801,7 +4810,7 @@
- 	    }
- 	    if (IS_SPECIAL(c) || modifiers)	/* special key */
- 	    {
--		if (fprintf(fd, (char *)get_special_key_name(c, modifiers)) < 0)
-+		if (fputs((char *)get_special_key_name(c, modifiers), fd) < 0)
- 		    return FAIL;
- 		continue;
- 	    }
-diff -Naur vim72.orig/src/globals.h vim72/src/globals.h
---- vim72.orig/src/globals.h	2008-07-26 04:53:29.000000000 -0700
-+++ vim72/src/globals.h	2009-07-19 15:17:39.000000000 -0700
-@@ -482,8 +482,10 @@
- /*
-  * While executing external commands or in Ex mode, should not insert GUI
-  * events in the input buffer: Set hold_gui_events to non-zero.
-+ *
-+ * volatile because it is used in signal handler sig_sysmouse().
-  */
--EXTERN int	hold_gui_events INIT(= 0);
-+EXTERN volatile int hold_gui_events INIT(= 0);
- 
- /*
-  * When resizing the shell is postponed, remember the new size, and call
-@@ -507,6 +509,7 @@
- EXTERN int	clip_unnamed INIT(= FALSE);
- EXTERN int	clip_autoselect INIT(= FALSE);
- EXTERN int	clip_autoselectml INIT(= FALSE);
-+EXTERN int	clip_html INIT(= FALSE);
- EXTERN regprog_T *clip_exclude_prog INIT(= NULL);
- #endif
- 
-@@ -522,7 +525,7 @@
- EXTERN win_T	*prevwin INIT(= NULL);	/* previous window */
- # define W_NEXT(wp) ((wp)->w_next)
- # define FOR_ALL_WINDOWS(wp) for (wp = firstwin; wp != NULL; wp = wp->w_next)
--#define FOR_ALL_TAB_WINDOWS(tp, wp) \
-+# define FOR_ALL_TAB_WINDOWS(tp, wp) \
-     for ((tp) = first_tabpage; (tp) != NULL; (tp) = (tp)->tp_next) \
- 	for ((wp) = ((tp) == curtab) \
- 		? firstwin : (tp)->tp_firstwin; (wp); (wp) = (wp)->w_next)
-@@ -536,6 +539,10 @@
- 
- EXTERN win_T	*curwin;	/* currently active window */
- 
-+#ifdef FEAT_AUTOCMD
-+EXTERN win_T	*aucmd_win;	/* window used in aucmd_prepbuf() */
-+#endif
-+
- /*
-  * The window layout is kept in a tree of frames.  topframe points to the top
-  * of the tree.
-@@ -597,7 +604,8 @@
- EXTERN int	really_exiting INIT(= FALSE);
- 				/* TRUE when we are sure to exit, e.g., after
- 				 * a deadly signal */
--EXTERN int	full_screen INIT(= FALSE);
-+/* volatile because it is used in signal handler deathtrap(). */
-+EXTERN volatile int full_screen INIT(= FALSE);
- 				/* TRUE when doing full-screen output
- 				 * otherwise only writing some messages */
- 
-@@ -616,6 +624,11 @@
- EXTERN int	curbuf_lock INIT(= 0);
- 				/* non-zero when the current buffer can't be
- 				 * changed.  Used for FileChangedRO. */
-+EXTERN int	allbuf_lock INIT(= 0);
-+				/* non-zero when no buffer name can be
-+				 * changed, no buffer can be deleted and
-+				 * current directory can't be changed.
-+				 * Used for SwapExists et al. */
- #endif
- #ifdef FEAT_EVAL
- # define HAVE_SANDBOX
-@@ -710,7 +723,7 @@
- 
- EXTERN pos_T	saved_cursor		/* w_cursor before formatting text. */
- # ifdef DO_INIT
--	= INIT_POS_T
-+	= INIT_POS_T(0, 0, 0)
- # endif
- 	;
- 
-@@ -739,10 +752,12 @@
-  */
- EXTERN JMP_BUF lc_jump_env;	/* argument to SETJMP() */
- # ifdef SIGHASARG
--EXTERN int lc_signal;		/* catched signal number, 0 when no was signal
--				   catched; used for mch_libcall() */
-+/* volatile because it is used in signal handlers. */
-+EXTERN volatile int lc_signal;	/* caught signal number, 0 when no was signal
-+				   caught; used for mch_libcall() */
- # endif
--EXTERN int lc_active INIT(= FALSE); /* TRUE when lc_jump_env is valid. */
-+/* volatile because it is used in signal handler deathtrap(). */
-+EXTERN volatile int lc_active INIT(= FALSE); /* TRUE when lc_jump_env is valid. */
- #endif
- 
- #if defined(FEAT_MBYTE) || defined(FEAT_POSTSCRIPT)
-@@ -800,11 +815,14 @@
-  */
- /* length of char in bytes, including following composing chars */
- EXTERN int (*mb_ptr2len) __ARGS((char_u *p)) INIT(= latin_ptr2len);
-+/* idem, with limit on string length */
-+EXTERN int (*mb_ptr2len_len) __ARGS((char_u *p, int size)) INIT(= latin_ptr2len_len);
- /* byte length of char */
- EXTERN int (*mb_char2len) __ARGS((int c)) INIT(= latin_char2len);
- /* convert char to bytes, return the length */
- EXTERN int (*mb_char2bytes) __ARGS((int c, char_u *buf)) INIT(= latin_char2bytes);
- EXTERN int (*mb_ptr2cells) __ARGS((char_u *p)) INIT(= latin_ptr2cells);
-+EXTERN int (*mb_ptr2cells_len) __ARGS((char_u *p, int size)) INIT(= latin_ptr2cells_len);
- EXTERN int (*mb_char2cells) __ARGS((int c)) INIT(= latin_char2cells);
- EXTERN int (*mb_off2cells) __ARGS((unsigned off, unsigned max_off)) INIT(= latin_off2cells);
- EXTERN int (*mb_ptr2char) __ARGS((char_u *p)) INIT(= latin_ptr2char);
-@@ -950,7 +968,7 @@
- 		    ;
- EXTERN typebuf_T typebuf		/* typeahead buffer */
- #ifdef DO_INIT
--		    = {NULL, NULL}
-+		    = {NULL, NULL, 0, 0, 0, 0, 0, 0, 0}
- #endif
- 		    ;
- #ifdef FEAT_EX_EXTRA
-@@ -986,7 +1004,8 @@
- EXTERN FILE	*scriptout  INIT(= NULL);   /* stream to write script to */
- EXTERN int	read_cmd_fd INIT(= 0);	    /* fd to read commands from */
- 
--EXTERN int	got_int INIT(= FALSE);	    /* set to TRUE when interrupt
-+/* volatile because it is used in signal handler catch_sigint(). */
-+EXTERN volatile int got_int INIT(= FALSE);    /* set to TRUE when interrupt
- 						signal occurred */
- #ifdef USE_TERM_CONSOLE
- EXTERN int	term_console INIT(= FALSE); /* set to TRUE when console used */
-@@ -1022,12 +1041,13 @@
- #endif
- #ifdef FEAT_AUTOCMD
- EXTERN char_u	*autocmd_fname INIT(= NULL); /* fname for <afile> on cmdline */
-+EXTERN int	autocmd_fname_full;	     /* autocmd_fname is full path */
- EXTERN int	autocmd_bufnr INIT(= 0);     /* fnum for <abuf> on cmdline */
- EXTERN char_u	*autocmd_match INIT(= NULL); /* name for <amatch> on cmdline */
- EXTERN int	did_cursorhold INIT(= FALSE); /* set when CursorHold t'gerd */
- EXTERN pos_T	last_cursormoved	    /* for CursorMoved event */
- # ifdef DO_INIT
--			= INIT_POS_T
-+			= INIT_POS_T(0, 0, 0)
- # endif
- 			;
- #endif
-@@ -1339,7 +1359,6 @@
- 
- #ifdef FEAT_NETBEANS_INTG
- EXTERN char *netbeansArg INIT(= NULL);	/* the -nb[:host:port:passwd] arg */
--EXTERN int netbeansCloseFile INIT(= 0);	/* send killed if != 0 */
- EXTERN int netbeansFireChanges INIT(= 1); /* send buffer changes if != 0 */
- EXTERN int netbeansForcedQuit INIT(= 0);/* don't write modified files */
- EXTERN int netbeansReadFile INIT(= 1);	/* OK to read from disk if != 0 */
-@@ -1548,6 +1567,14 @@
- EXTERN time_t starttime;
- 
- /*
-+ * Some compilers warn for not using a return value, but in some situations we
-+ * can't do anything useful with the value.  Assign to this variable to avoid
-+ * the warning.
-+ */
-+EXTERN int ignored;
-+EXTERN char *ignoredp;
-+
-+/*
-  * Optional Farsi support.  Include it here, so EXTERN and INIT are defined.
-  */
- #ifdef FEAT_FKMAP
-diff -Naur vim72.orig/src/gui_at_fs.c vim72/src/gui_at_fs.c
---- vim72.orig/src/gui_at_fs.c	2006-05-12 02:26:24.000000000 -0700
-+++ vim72/src/gui_at_fs.c	2009-07-19 15:16:46.000000000 -0700
-@@ -829,7 +829,7 @@
-     text.format = FMT8BIT;
- 
- #ifdef XtNinternational
--    if (_XawTextFormat((TextWidget)selFileField) == XawFmtWide)
-+    if ((unsigned long)_XawTextFormat((TextWidget)selFileField) == XawFmtWide)
-     {
- 	XawTextReplace(selFileField, (XawTextPosition)0,
- 				    (XawTextPosition)WcsLen((wchar_t *)&SFtextBuffer[0]), &text);
-@@ -851,17 +851,15 @@
- #endif
- }
- 
--/* ARGSUSED */
-     static void
- SFbuttonPressList(w, n, event)
--    Widget		w;
--    int			n;
--    XButtonPressedEvent	*event;
-+    Widget		w UNUSED;
-+    int			n UNUSED;
-+    XButtonPressedEvent	*event UNUSED;
- {
-     SFbuttonPressed = 1;
- }
- 
--/* ARGSUSED */
-     static void
- SFbuttonReleaseList(w, n, event)
-     Widget		 w;
-@@ -989,11 +987,10 @@
-     return result;
- }
- 
--/* ARGSUSED */
-     static void
- SFdirModTimer(cl, id)
--    XtPointer		cl;
--    XtIntervalId	*id;
-+    XtPointer		cl UNUSED;
-+    XtIntervalId	*id UNUSED;
- {
-     static int		n = -1;
-     static int		f = 0;
-@@ -1596,11 +1593,10 @@
- 
- static void SFscrollTimer __ARGS((XtPointer p, XtIntervalId *id));
- 
--/* ARGSUSED */
-     static void
- SFscrollTimer(p, id)
-     XtPointer		p;
--    XtIntervalId	*id;
-+    XtIntervalId	*id UNUSED;
- {
-     SFDir	*dir;
-     int		save;
-@@ -1695,10 +1691,9 @@
-     }
- }
- 
--/* ARGSUSED */
-     static void
- SFenterList(w, n, event)
--    Widget		w;
-+    Widget		w UNUSED;
-     int			n;
-     XEnterWindowEvent	*event;
- {
-@@ -1719,12 +1714,11 @@
-     }
- }
- 
--/* ARGSUSED */
-     static void
- SFleaveList(w, n, event)
--    Widget	w;
-+    Widget	w UNUSED;
-     int		n;
--    XEvent	*event;
-+    XEvent	*event UNUSED;
- {
-     if (SFcurrentInvert[n] != -1)
-     {
-@@ -1733,10 +1727,9 @@
-     }
- }
- 
--/* ARGSUSED */
-     static void
- SFmotionList(w, n, event)
--    Widget		w;
-+    Widget		w UNUSED;
-     int			n;
-     XMotionEvent	*event;
- {
-@@ -1754,7 +1747,6 @@
-     }
- }
- 
--/* ARGSUSED */
-     static void
- SFvFloatSliderMovedCallback(w, n, fnew)
-     Widget	w;
-@@ -1767,10 +1759,9 @@
-     SFvSliderMovedCallback(w, (int)(long)n, nw);
- }
- 
--/* ARGSUSED */
-     static void
- SFvSliderMovedCallback(w, n, nw)
--    Widget	w;
-+    Widget	w UNUSED;
-     int		n;
-     int		nw;
- {
-@@ -1853,10 +1844,9 @@
-     }
- }
- 
--/* ARGSUSED */
-     static void
- SFvAreaSelectedCallback(w, n, pnew)
--    Widget		w;
-+    Widget	w;
-     XtPointer	n;
-     XtPointer	pnew;
- {
-@@ -1914,10 +1904,9 @@
-     SFvSliderMovedCallback(w, (int)(long)n, nw);
- }
- 
--/* ARGSUSED */
-     static void
- SFhSliderMovedCallback(w, n, nw)
--    Widget	w;
-+    Widget	w UNUSED;
-     XtPointer	n;
-     XtPointer	nw;
- {
-@@ -1933,10 +1922,9 @@
-     SFdrawList((int)(long)n, SF_DO_NOT_SCROLL);
- }
- 
--/* ARGSUSED */
-     static void
- SFhAreaSelectedCallback(w, n, pnew)
--    Widget		w;
-+    Widget	w;
-     XtPointer	n;
-     XtPointer	pnew;
- {
-@@ -1994,11 +1982,10 @@
-     }
- }
- 
--/* ARGSUSED */
-     static void
- SFpathSliderMovedCallback(w, client_data, nw)
--    Widget		w;
--    XtPointer	client_data;
-+    Widget	w UNUSED;
-+    XtPointer	client_data UNUSED;
-     XtPointer	nw;
- {
-     SFDir		*dir;
-@@ -2031,11 +2018,10 @@
-     XawTextSetInsertionPoint(selFileField, pos);
- }
- 
--/* ARGSUSED */
-     static void
- SFpathAreaSelectedCallback(w, client_data, pnew)
-     Widget	w;
--    XtPointer	client_data;
-+    XtPointer	client_data UNUSED;
-     XtPointer	pnew;
- {
-     int		nw = (int)(long)pnew;
-@@ -2206,13 +2192,12 @@
- 
- static void SFexposeList __ARGS((Widget w, XtPointer n, XEvent *event, Boolean *cont));
- 
--/* ARGSUSED */
-     static void
- SFexposeList(w, n, event, cont)
--    Widget	w;
-+    Widget	w UNUSED;
-     XtPointer	n;
-     XEvent	*event;
--    Boolean	*cont;
-+    Boolean	*cont UNUSED;
- {
-     if ((event->type == NoExpose) || event->xexpose.count)
- 	return;
-@@ -2222,13 +2207,12 @@
- 
- static void SFmodVerifyCallback __ARGS((Widget w, XtPointer client_data, XEvent *event, Boolean *cont));
- 
--/* ARGSUSED */
-     static void
- SFmodVerifyCallback(w, client_data, event, cont)
--    Widget		w;
--    XtPointer		client_data;
-+    Widget		w UNUSED;
-+    XtPointer		client_data UNUSED;
-     XEvent		*event;
--    Boolean		*cont;
-+    Boolean		*cont UNUSED;
- {
-     char	buf[2];
- 
-@@ -2241,11 +2225,11 @@
- 
- static void SFokCallback __ARGS((Widget w, XtPointer cl, XtPointer cd));
- 
--/* ARGSUSED */
-     static void
- SFokCallback(w, cl, cd)
--    Widget	w;
--    XtPointer	cl, cd;
-+    Widget	w UNUSED;
-+    XtPointer	cl UNUSED;
-+    XtPointer	cd UNUSED;
- {
-     SFstatus = SEL_FILE_OK;
- }
-@@ -2258,11 +2242,11 @@
- 
- static void SFcancelCallback __ARGS((Widget w, XtPointer cl, XtPointer cd));
- 
--/* ARGSUSED */
-     static void
- SFcancelCallback(w, cl, cd)
--    Widget	w;
--    XtPointer	cl, cd;
-+    Widget	w UNUSED;
-+    XtPointer	cl UNUSED;
-+    XtPointer	cd UNUSED;
- {
-     SFstatus = SEL_FILE_CANCEL;
- }
-@@ -2275,16 +2259,15 @@
- 
- static void SFdismissAction __ARGS((Widget w, XEvent *event, String *params, Cardinal *num_params));
- 
--/* ARGSUSED */
-     static void
- SFdismissAction(w, event, params, num_params)
--    Widget	w;
--    XEvent *event;
--    String *params;
--    Cardinal *num_params;
-+    Widget	w UNUSED;
-+    XEvent	*event;
-+    String	*params UNUSED;
-+    Cardinal	*num_params UNUSED;
- {
--    if (event->type == ClientMessage &&
--	    event->xclient.data.l[0] != SFwmDeleteWindow)
-+    if (event->type == ClientMessage
-+	    && (Atom)event->xclient.data.l[0] != SFwmDeleteWindow)
- 	return;
- 
-     SFstatus = SEL_FILE_CANCEL;
-@@ -2703,7 +2686,7 @@
- SFtextChanged()
- {
- #if defined(FEAT_XFONTSET) && defined(XtNinternational)
--    if (_XawTextFormat((TextWidget)selFileField) == XawFmtWide)
-+    if ((unsigned long)_XawTextFormat((TextWidget)selFileField) == XawFmtWide)
-     {
- 	wchar_t *wcbuf=(wchar_t *)SFtextBuffer;
- 
-@@ -2749,7 +2732,7 @@
- #if defined(FEAT_XFONTSET) && defined(XtNinternational)
-     char *buf;
- 
--    if (_XawTextFormat((TextWidget)selFileField) == XawFmtWide)
-+    if ((unsigned long)_XawTextFormat((TextWidget)selFileField) == XawFmtWide)
-     {
- 	wchar_t *wcbuf;
- 	int mbslength;
-diff -Naur vim72.orig/src/gui_athena.c vim72/src/gui_athena.c
---- vim72.orig/src/gui_athena.c	2008-06-21 12:38:58.000000000 -0700
-+++ vim72/src/gui_athena.c	2009-07-19 15:16:46.000000000 -0700
-@@ -86,10 +86,9 @@
-  * Scrollbar callback (XtNjumpProc) for when the scrollbar is dragged with the
-  * left or middle mouse button.
-  */
--/* ARGSUSED */
-     static void
- gui_athena_scroll_cb_jump(w, client_data, call_data)
--    Widget	w;
-+    Widget	w UNUSED;
-     XtPointer	client_data, call_data;
- {
-     scrollbar_T *sb, *sb_info;
-@@ -122,10 +121,9 @@
-  * Scrollbar callback (XtNscrollProc) for paging up or down with the left or
-  * right mouse buttons.
-  */
--/* ARGSUSED */
-     static void
- gui_athena_scroll_cb_scroll(w, client_data, call_data)
--    Widget	w;
-+    Widget	w UNUSED;
-     XtPointer	client_data, call_data;
- {
-     scrollbar_T *sb, *sb_info;
-@@ -492,7 +490,7 @@
-     if (menu->icon_builtin || gui_find_bitmap(menu->name, buf, "xpm") == FAIL)
-     {
- 	if (menu->iconidx >= 0 && menu->iconidx
--		   < (sizeof(built_in_pixmaps) / sizeof(built_in_pixmaps[0])))
-+	      < (int)(sizeof(built_in_pixmaps) / sizeof(built_in_pixmaps[0])))
- 	    xpm = built_in_pixmaps[menu->iconidx];
- 	else
- 	    xpm = tb_blank_xpm;
-@@ -763,7 +761,7 @@
-     XtGetValues(XtParent(widget), args, n);
- 
-     retval = num_children;
--    for (i = 0; i < num_children; ++i)
-+    for (i = 0; i < (int)num_children; ++i)
-     {
- 	Widget	current = children[i];
- 	vimmenu_T	*menu = NULL;
-@@ -780,11 +778,10 @@
-     return retval;
- }
- 
--/* ARGSUSED */
-     void
- gui_mch_add_menu(menu, idx)
-     vimmenu_T	*menu;
--    int		idx;
-+    int		idx UNUSED;
- {
-     char_u	*pullright_name;
-     Dimension	height, space, border;
-@@ -869,7 +866,7 @@
- 	    XtVaGetValues(parent->submenu_id, XtNchildren, &children,
- 					      XtNnumChildren, &num_children,
- 					      NULL);
--	    for (i = 0; i < num_children; ++i)
-+	    for (i = 0; i < (int)num_children; ++i)
- 	    {
- 		XtVaSetValues(children[i],
- 			      XtNrightMargin, puller_width,
-@@ -913,7 +910,7 @@
-     XtVaGetValues(id, XtNchildren, &children,
- 		      XtNnumChildren, &num_children,
- 		      NULL);
--    for (i = 0; i < num_children; ++i)
-+    for (i = 0; i < (int)num_children; ++i)
-     {
- 	if (children[i] == ignore)
- 	    continue;
-@@ -1175,11 +1172,10 @@
-     return pname;
- }
- 
--/* ARGSUSED */
-     void
- gui_mch_add_menu_item(menu, idx)
-     vimmenu_T	*menu;
--    int		idx;
-+    int		idx UNUSED;
- {
-     vimmenu_T	*parent = menu->parent;
- 
-@@ -1444,7 +1440,7 @@
- 		XtNchildren,	    &children,
- 		XtNnumChildren,	    &numChildren,
- 		NULL);
--	for (i = 0; i < numChildren; i++)
-+	for (i = 0; i < (int)numChildren; i++)
- 	{
- 	    whgt = 0;
- 
-@@ -1473,10 +1469,9 @@
- #endif
- 
- 
--/* ARGSUSED */
-     void
- gui_mch_toggle_tearoffs(enable)
--    int		enable;
-+    int		enable UNUSED;
- {
-     /* no tearoff menus */
- }
-@@ -1537,7 +1532,7 @@
- 	    else
- 		get_left_margin = True;
- 
--	    for (i = 0; i < num_children; ++i)
-+	    for (i = 0; i < (int)num_children; ++i)
- 	    {
- 		if (children[i] == menu->id)
- 		    continue;
-@@ -1645,11 +1640,10 @@
-     }
- }
- 
--/*ARGSUSED*/
-     static void
- gui_athena_menu_timeout(client_data, id)
-     XtPointer	    client_data;
--    XtIntervalId    *id;
-+    XtIntervalId    *id UNUSED;
- {
-     Widget  w = (Widget)client_data;
-     Widget  popup;
-@@ -1678,12 +1672,11 @@
-  *
-  * This is called when XtPopup() is called.
-  */
--/*ARGSUSED*/
-     static void
- gui_athena_popup_callback(w, client_data, call_data)
-     Widget	w;
-     XtPointer	client_data;
--    XtPointer	call_data;
-+    XtPointer	call_data UNUSED;
- {
-     /* Assumption: XtIsSubclass(XtParent(w),simpleMenuWidgetClass) */
-     vimmenu_T	*menu = (vimmenu_T *)client_data;
-@@ -1711,7 +1704,6 @@
- 		     NULL);
- }
- 
--/* ARGSUSED */
-     static void
- gui_athena_popdown_submenus_action(w, event, args, nargs)
-     Widget	w;
-@@ -1756,7 +1748,6 @@
-     return False;
- }
- 
--/* ARGSUSED */
-     static void
- gui_athena_delayed_arm_action(w, event, args, nargs)
-     Widget	w;
-@@ -1837,7 +1828,6 @@
-      * (XtIsSubclass(popup,simpleMenuWidgetClass) == True) */
- }
- 
--/* ARGSUSED */
-     void
- gui_mch_show_popupmenu(menu)
-     vimmenu_T *menu;
-@@ -2046,15 +2036,14 @@
-  * Put up a file requester.
-  * Returns the selected name in allocated memory, or NULL for Cancel.
-  */
--/* ARGSUSED */
-     char_u *
- gui_mch_browse(saving, title, dflt, ext, initdir, filter)
--    int		saving;		/* select file to write */
--    char_u	*title;		/* not used (title for the window) */
--    char_u	*dflt;		/* not used (default name) */
--    char_u	*ext;		/* not used (extension added) */
-+    int		saving UNUSED;	/* select file to write */
-+    char_u	*title;		/* title for the window */
-+    char_u	*dflt;		/* default name */
-+    char_u	*ext UNUSED;	/* extension added */
-     char_u	*initdir;	/* initial directory, NULL for current dir */
--    char_u	*filter;	/* not used (file name filter) */
-+    char_u	*filter UNUSED;	/* file name filter */
- {
-     Position x, y;
-     char_u	dirbuf[MAXPATHL];
-@@ -2100,13 +2089,12 @@
-  * Callback function for the textfield.  When CR is hit this works like
-  * hitting the "OK" button, ESC like "Cancel".
-  */
--/* ARGSUSED */
-     static void
- keyhit_callback(w, client_data, event, cont)
--    Widget		w;
--    XtPointer		client_data;
-+    Widget		w UNUSED;
-+    XtPointer		client_data UNUSED;
-     XEvent		*event;
--    Boolean		*cont;
-+    Boolean		*cont UNUSED;
- {
-     char	buf[2];
- 
-@@ -2119,12 +2107,11 @@
-     }
- }
- 
--/* ARGSUSED */
-     static void
- butproc(w, client_data, call_data)
--    Widget	w;
-+    Widget	w UNUSED;
-     XtPointer	client_data;
--    XtPointer	call_data;
-+    XtPointer	call_data UNUSED;
- {
-     dialogStatus = (int)(long)client_data + 1;
- }
-@@ -2132,27 +2119,25 @@
- /*
-  * Function called when dialog window closed.
-  */
--/*ARGSUSED*/
-     static void
- dialog_wm_handler(w, client_data, event, dum)
--    Widget	w;
--    XtPointer	client_data;
-+    Widget	w UNUSED;
-+    XtPointer	client_data UNUSED;
-     XEvent	*event;
--    Boolean	*dum;
-+    Boolean	*dum UNUSED;
- {
-     if (event->type == ClientMessage
--	    && ((XClientMessageEvent *)event)->data.l[0] == dialogatom)
-+	    && (Atom)((XClientMessageEvent *)event)->data.l[0] == dialogatom)
- 	dialogStatus = 0;
- }
- 
--/* ARGSUSED */
-     int
- gui_mch_dialog(type, title, message, buttons, dfltbutton, textfield)
--    int		type;
-+    int		type UNUSED;
-     char_u	*title;
-     char_u	*message;
-     char_u	*buttons;
--    int		dfltbutton;
-+    int		dfltbutton UNUSED;
-     char_u	*textfield;
- {
-     char_u		*buts;
-diff -Naur vim72.orig/src/gui_at_sb.c vim72/src/gui_at_sb.c
---- vim72.orig/src/gui_at_sb.c	2004-06-07 07:32:25.000000000 -0700
-+++ vim72/src/gui_at_sb.c	2009-07-19 15:16:46.000000000 -0700
-@@ -198,10 +198,13 @@
-     /* extension	*/  NULL
-   },
-   { /* simple fields */
--    /* change_sensitive	*/  XtInheritChangeSensitive
-+    /* change_sensitive	*/  XtInheritChangeSensitive,
-+#ifndef OLDXAW
-+    /* extension */	    NULL
-+#endif
-   },
-   { /* scrollbar fields */
--    /* ignore	    */	0
-+    /* empty	    */	    0
-   }
- };
- 
-@@ -241,7 +244,8 @@
- 
-     if (bottom <= 0 || bottom <= top)
- 	return;
--    if ((sw = sbw->scrollbar.shadow_width) < 0)
-+    sw = sbw->scrollbar.shadow_width;
-+    if (sw < 0)
- 	sw = 0;
-     margin = MARGIN (sbw);
-     floor = sbw->scrollbar.length - margin + 2;
-@@ -516,13 +520,12 @@
-     }
- }
- 
--/* ARGSUSED */
-     static void
- Initialize(request, new, args, num_args)
--    Widget	request;	/* what the client asked for */
-+    Widget	request UNUSED;	/* what the client asked for */
-     Widget	new;		/* what we're going to give him */
--    ArgList	args;
--    Cardinal	*num_args;
-+    ArgList	args UNUSED;
-+    Cardinal	*num_args UNUSED;
- {
-     ScrollbarWidget sbw = (ScrollbarWidget) new;
- 
-@@ -556,14 +559,13 @@
- 	(w, valueMask, attributes);
- }
- 
--/* ARGSUSED */
-     static Boolean
- SetValues(current, request, desired, args, num_args)
--    Widget  current,	    /* what I am */
--	    request,	    /* what he wants me to be */
--	    desired;	    /* what I will become */
--    ArgList args;
--    Cardinal *num_args;
-+    Widget  current;	    /* what I am */
-+    Widget  request UNUSED; /* what he wants me to be */
-+    Widget  desired;	    /* what I will become */
-+    ArgList args UNUSED;
-+    Cardinal *num_args UNUSED;
- {
-     ScrollbarWidget	sbw = (ScrollbarWidget) current;
-     ScrollbarWidget	dsbw = (ScrollbarWidget) desired;
-@@ -609,7 +611,6 @@
- }
- 
- 
--/* ARGSUSED */
-     static void
- Redisplay(w, event, region)
-     Widget w;
-@@ -789,11 +790,10 @@
-     }
- }
- 
--/* ARGSUSED */
-     static void
- RepeatNotify(client_data, idp)
-     XtPointer client_data;
--    XtIntervalId *idp;
-+    XtIntervalId *idp UNUSED;
- {
-     ScrollbarWidget sbw = (ScrollbarWidget) client_data;
-     int		    call_data;
-@@ -839,46 +839,42 @@
-     return (num < small) ? small : ((num > big) ? big : num);
- }
- 
--/* ARGSUSED */
-     static void
- ScrollOneLineUp(w, event, params, num_params)
-     Widget	w;
-     XEvent	*event;
--    String	*params;
--    Cardinal	*num_params;
-+    String	*params UNUSED;
-+    Cardinal	*num_params UNUSED;
- {
-     ScrollSome(w, event, -ONE_LINE_DATA);
- }
- 
--/* ARGSUSED */
-     static void
- ScrollOneLineDown(w, event, params, num_params)
-     Widget	w;
-     XEvent	*event;
--    String	*params;
--    Cardinal	*num_params;
-+    String	*params UNUSED;
-+    Cardinal	*num_params UNUSED;
- {
-     ScrollSome(w, event, ONE_LINE_DATA);
- }
- 
--/* ARGSUSED */
-     static void
- ScrollPageDown(w, event, params, num_params)
-     Widget	w;
-     XEvent	*event;
--    String	*params;
--    Cardinal	*num_params;
-+    String	*params UNUSED;
-+    Cardinal	*num_params UNUSED;
- {
-     ScrollSome(w, event, ONE_PAGE_DATA);
- }
- 
--/* ARGSUSED */
-     static void
- ScrollPageUp(w, event, params, num_params)
-     Widget	w;
-     XEvent	*event;
--    String	*params;
--    Cardinal	*num_params;
-+    String	*params UNUSED;
-+    Cardinal	*num_params UNUSED;
- {
-     ScrollSome(w, event, -ONE_PAGE_DATA);
- }
-@@ -901,13 +897,12 @@
-     XtCallCallbacks(w, XtNscrollProc, (XtPointer)call_data);
- }
- 
--/* ARGSUSED */
-     static void
- NotifyScroll(w, event, params, num_params)
-     Widget	w;
-     XEvent	*event;
--    String	*params;
--    Cardinal	*num_params;
-+    String	*params UNUSED;
-+    Cardinal	*num_params UNUSED;
- {
-     ScrollbarWidget sbw = (ScrollbarWidget) w;
-     Position	    x, y, loc;
-@@ -991,13 +986,12 @@
- 					   delay, RepeatNotify, (XtPointer)w);
- }
- 
--/* ARGSUSED */
-     static void
- EndScroll(w, event, params, num_params)
-     Widget w;
--    XEvent *event;	/* unused */
--    String *params;	/* unused */
--    Cardinal *num_params;   /* unused */
-+    XEvent *event UNUSED;
-+    String *params UNUSED;
-+    Cardinal *num_params UNUSED;
- {
-     ScrollbarWidget sbw = (ScrollbarWidget) w;
- 
-@@ -1023,13 +1017,12 @@
-     return PICKLENGTH(sbw, x / width, y / height);
- }
- 
--/* ARGSUSED */
-     static void
- MoveThumb(w, event, params, num_params)
-     Widget	w;
-     XEvent	*event;
--    String	*params;	/* unused */
--    Cardinal	*num_params;	/* unused */
-+    String	*params UNUSED;
-+    Cardinal	*num_params UNUSED;
- {
-     ScrollbarWidget	sbw = (ScrollbarWidget)w;
-     Position		x, y;
-@@ -1069,15 +1062,20 @@
- }
- 
- 
--/* ARGSUSED */
-     static void
- NotifyThumb(w, event, params, num_params)
-     Widget	w;
-     XEvent	*event;
--    String	*params;	/* unused */
--    Cardinal	*num_params;	/* unused */
-+    String	*params UNUSED;
-+    Cardinal	*num_params UNUSED;
- {
-     ScrollbarWidget sbw = (ScrollbarWidget)w;
-+    /* Use a union to avoid a warning for the weird conversion from float to
-+     * XtPointer.  Comes from Xaw/Scrollbar.c. */
-+    union {
-+	XtPointer xtp;
-+	float xtf;
-+    } xtpf;
- 
-     if (LookAhead(w, event))
- 	return;
-@@ -1085,11 +1083,11 @@
-     /* thumbProc is not pretty, but is necessary for backwards
-        compatibility on those architectures for which it work{s,ed};
-        the intent is to pass a (truncated) float by value. */
--    XtCallCallbacks(w, XtNthumbProc, *(XtPointer*)&sbw->scrollbar.top);
-+    xtpf.xtf = sbw->scrollbar.top;
-+    XtCallCallbacks(w, XtNthumbProc, xtpf.xtp);
-     XtCallCallbacks(w, XtNjumpProc, (XtPointer)&sbw->scrollbar.top);
- }
- 
--/* ARGSUSED */
-     static void
- AllocTopShadowGC(w)
-     Widget w;
-@@ -1103,7 +1101,6 @@
-     sbw->scrollbar.top_shadow_GC = XtGetGC(w, valuemask, &myXGCV);
- }
- 
--/* ARGSUSED */
-     static void
- AllocBotShadowGC(w)
-     Widget w;
-@@ -1117,11 +1114,10 @@
-     sbw->scrollbar.bot_shadow_GC = XtGetGC(w, valuemask, &myXGCV);
- }
- 
--/* ARGSUSED */
-     static void
- _Xaw3dDrawShadows(gw, event, region, out)
-     Widget  gw;
--    XEvent  *event;
-+    XEvent  *event UNUSED;
-     Region  region;
-     int	    out;
- {
-diff -Naur vim72.orig/src/gui_beval.c vim72/src/gui_beval.c
---- vim72.orig/src/gui_beval.c	2007-05-07 12:33:41.000000000 -0700
-+++ vim72/src/gui_beval.c	2009-07-19 15:16:46.000000000 -0700
-@@ -15,11 +15,10 @@
- /*
-  * Common code, invoked when the mouse is resting for a moment.
-  */
--/*ARGSUSED*/
-     void
- general_beval_cb(beval, state)
-     BalloonEval *beval;
--    int state;
-+    int		state UNUSED;
- {
-     win_T	*wp;
-     int		col;
-@@ -551,9 +550,8 @@
-     return FALSE; /* continue emission */
- }
- 
--/*ARGSUSED*/
-     static gint
--mainwin_event_cb(GtkWidget *widget, GdkEvent *event, gpointer data)
-+mainwin_event_cb(GtkWidget *widget UNUSED, GdkEvent *event, gpointer data)
- {
-     BalloonEval *beval = (BalloonEval *)data;
- 
-@@ -663,9 +661,10 @@
-     return FALSE; /* don't call me again */
- }
- 
--/*ARGSUSED2*/
-     static gint
--balloon_expose_event_cb(GtkWidget *widget, GdkEventExpose *event, gpointer data)
-+balloon_expose_event_cb(GtkWidget *widget,
-+			GdkEventExpose *event,
-+			gpointer data UNUSED)
- {
-     gtk_paint_flat_box(widget->style, widget->window,
- 		       GTK_STATE_NORMAL, GTK_SHADOW_OUT,
-@@ -676,7 +675,6 @@
- }
- 
- # ifndef HAVE_GTK2
--/*ARGSUSED2*/
-     static void
- balloon_draw_cb(GtkWidget *widget, GdkRectangle *area, gpointer data)
- {
-@@ -726,13 +724,12 @@
- /*
-  * The X event handler. All it does is call the real event handler.
-  */
--/*ARGSUSED*/
-     static void
- pointerEventEH(w, client_data, event, unused)
--    Widget	w;
-+    Widget	w UNUSED;
-     XtPointer	client_data;
-     XEvent	*event;
--    Boolean	*unused;
-+    Boolean	*unused UNUSED;
- {
-     BalloonEval *beval = (BalloonEval *)client_data;
-     pointerEvent(beval, event);
-@@ -877,11 +874,10 @@
-     }
- }
- 
--/*ARGSUSED*/
-     static void
- timerRoutine(dx, id)
-     XtPointer	    dx;
--    XtIntervalId    *id;
-+    XtIntervalId    *id UNUSED;
- {
-     BalloonEval *beval = (BalloonEval *)dx;
- 
-@@ -1291,6 +1287,23 @@
- 		XtNy, ty,
- 		NULL);
- #endif
-+	/* Set tooltip colors */
-+	{
-+	    Arg args[2];
-+
-+#ifdef FEAT_GUI_MOTIF
-+	    args[0].name = XmNbackground;
-+	    args[0].value = gui.tooltip_bg_pixel;
-+	    args[1].name = XmNforeground;
-+	    args[1].value = gui.tooltip_fg_pixel;
-+#else /* Athena */
-+	    args[0].name = XtNbackground;
-+	    args[0].value = gui.tooltip_bg_pixel;
-+	    args[1].name = XtNforeground;
-+	    args[1].value = gui.tooltip_fg_pixel;
-+#endif
-+	    XtSetValues(beval->balloonLabel, &args[0], XtNumber(args));
-+	}
- 
- 	XtPopup(beval->balloonShell, XtGrabNone);
- 
-diff -Naur vim72.orig/src/gui.c vim72/src/gui.c
---- vim72.orig/src/gui.c	2008-07-27 12:32:14.000000000 -0700
-+++ vim72/src/gui.c	2009-07-19 15:18:18.000000000 -0700
-@@ -139,7 +139,7 @@
- 		/* The read returns when the child closes the pipe (or when
- 		 * the child dies for some reason). */
- 		close(pipefd[1]);
--		(void)read(pipefd[0], &dummy, (size_t)1);
-+		ignored = (int)read(pipefd[0], &dummy, (size_t)1);
- 		close(pipefd[0]);
- 	    }
- 
-@@ -678,11 +678,10 @@
-  * Return OK when able to set the font.  When it failed FAIL is returned and
-  * the fonts are unchanged.
-  */
--/*ARGSUSED*/
-     int
- gui_init_font(font_list, fontset)
-     char_u	*font_list;
--    int		fontset;
-+    int		fontset UNUSED;
- {
- #define FONTLEN 320
-     char_u	font_name[FONTLEN];
-@@ -960,7 +959,7 @@
- 		guicolor_T fg, bg;
- 
- 		if (
--# ifdef HAVE_GTK2
-+# if defined(HAVE_GTK2) && !defined(FEAT_HANGULIN)
- 			preedit_get_status()
- # else
- 			im_get_status()
-@@ -1138,10 +1137,9 @@
-  * Position the various GUI components (text area, menu).  The vertical
-  * scrollbars are NOT handled here.  See gui_update_scrollbars().
-  */
--/*ARGSUSED*/
-     static void
- gui_position_components(total_width)
--    int	    total_width;
-+    int	    total_width UNUSED;
- {
-     int	    text_area_x;
-     int	    text_area_y;
-@@ -1374,10 +1372,9 @@
-  * If "fit_to_display" is TRUE then the size may be reduced to fit the window
-  * on the screen.
-  */
--/*ARGSUSED*/
-     void
- gui_set_shellsize(mustset, fit_to_display, direction)
--    int		mustset;		/* set by the user */
-+    int		mustset UNUSED;		/* set by the user */
-     int		fit_to_display;
-     int		direction;		/* RESIZE_HOR, RESIZE_VER */
- {
-@@ -3120,10 +3117,9 @@
-  * If "oldval" is not NULL, "oldval" is the previous value, the new value is
-  * in p_go.
-  */
--/*ARGSUSED*/
-     void
- gui_init_which_components(oldval)
--    char_u	*oldval;
-+    char_u	*oldval UNUSED;
- {
- #ifdef FEAT_MENU
-     static int	prev_menu_is_active = -1;
-@@ -3241,7 +3237,7 @@
- 	    i = Rows;
- 	    gui_update_tabline();
- 	    Rows = i;
--	    need_set_size = RESIZE_VERT;
-+	    need_set_size |= RESIZE_VERT;
- 	    if (using_tabline)
- 		fix_size = TRUE;
- 	    if (!gui_use_tabline())
-@@ -3275,9 +3271,9 @@
- 		if (gui.which_scrollbars[i] != prev_which_scrollbars[i])
- 		{
- 		    if (i == SBAR_BOTTOM)
--			need_set_size = RESIZE_VERT;
-+			need_set_size |= RESIZE_VERT;
- 		    else
--			need_set_size = RESIZE_HOR;
-+			need_set_size |= RESIZE_HOR;
- 		    if (gui.which_scrollbars[i])
- 			fix_size = TRUE;
- 		}
-@@ -3297,7 +3293,7 @@
- 	    gui_mch_enable_menu(gui.menu_is_active);
- 	    Rows = i;
- 	    prev_menu_is_active = gui.menu_is_active;
--	    need_set_size = RESIZE_VERT;
-+	    need_set_size |= RESIZE_VERT;
- 	    if (gui.menu_is_active)
- 		fix_size = TRUE;
- 	}
-@@ -3308,7 +3304,7 @@
- 	{
- 	    gui_mch_show_toolbar(using_toolbar);
- 	    prev_toolbar = using_toolbar;
--	    need_set_size = RESIZE_VERT;
-+	    need_set_size |= RESIZE_VERT;
- 	    if (using_toolbar)
- 		fix_size = TRUE;
- 	}
-@@ -3318,7 +3314,7 @@
- 	{
- 	    gui_mch_enable_footer(using_footer);
- 	    prev_footer = using_footer;
--	    need_set_size = RESIZE_VERT;
-+	    need_set_size |= RESIZE_VERT;
- 	    if (using_footer)
- 		fix_size = TRUE;
- 	}
-@@ -3330,10 +3326,11 @@
- 	    prev_tearoff = using_tearoff;
- 	}
- #endif
--	if (need_set_size)
-+	if (need_set_size != 0)
- 	{
- #ifdef FEAT_GUI_GTK
--	    long    c = Columns;
-+	    long    prev_Columns = Columns;
-+	    long    prev_Rows = Rows;
- #endif
- 	    /* Adjust the size of the window to make the text area keep the
- 	     * same size and to avoid that part of our window is off-screen
-@@ -3349,11 +3346,14 @@
- 	     * If you remove this, please test this command for resizing
- 	     * effects (with optional left scrollbar): ":vsp|q|vsp|q|vsp|q".
- 	     * Don't do this while starting up though.
--	     * And don't change Rows, it may have be reduced intentionally
--	     * when adding menu/toolbar/tabline. */
--	    if (!gui.starting)
-+	     * Don't change Rows when adding menu/toolbar/tabline.
-+	     * Don't change Columns when adding vertical toolbar. */
-+	    if (!gui.starting && need_set_size != (RESIZE_VERT | RESIZE_HOR))
- 		(void)char_avail();
--	    Columns = c;
-+	    if ((need_set_size & RESIZE_VERT) == 0)
-+		Rows = prev_Rows;
-+	    if ((need_set_size & RESIZE_HOR) == 0)
-+		Columns = prev_Columns;
- #endif
- 	}
- #ifdef FEAT_WINDOWS
-@@ -3879,6 +3879,21 @@
-  * Scrollbar stuff:
-  */
- 
-+/*
-+ * Called when something in the window layout has changed.
-+ */
-+    void
-+gui_may_update_scrollbars()
-+{
-+    if (gui.in_use && starting == 0)
-+    {
-+	out_flush();
-+	gui_init_which_components(NULL);
-+	gui_update_scrollbars(TRUE);
-+    }
-+    need_mouse_correct = TRUE;
-+}
-+
-     void
- gui_update_scrollbars(force)
-     int		force;	    /* Force all scrollbars to get updated */
-@@ -4407,7 +4422,7 @@
-     if (curwin->w_p_wrap)
- 	return FALSE;
- 
--    if (curwin->w_leftcol == scrollbar_value)
-+    if ((long_u)curwin->w_leftcol == scrollbar_value)
- 	return FALSE;
- 
-     curwin->w_leftcol = (colnr_T)scrollbar_value;
-@@ -4420,7 +4435,7 @@
- 	    && longest_lnum < curwin->w_botline
- 	    && !virtual_active())
-     {
--	if (scrollbar_value > scroll_line_len(curwin->w_cursor.lnum))
-+	if (scrollbar_value > (long_u)scroll_line_len(curwin->w_cursor.lnum))
- 	{
- 	    curwin->w_cursor.lnum = longest_lnum;
- 	    curwin->w_cursor.col = 0;
-@@ -4666,11 +4681,10 @@
- /*
-  * Find window where the mouse pointer "y" coordinate is in.
-  */
--/*ARGSUSED*/
-     static win_T *
- xy2win(x, y)
--    int		x;
--    int		y;
-+    int		x UNUSED;
-+    int		y UNUSED;
- {
- #ifdef FEAT_WINDOWS
-     int		row;
-@@ -5120,11 +5134,10 @@
-  * of dropped files, they will be freed in this function, and caller can't use
-  * fnames after call this function.
-  */
--/*ARGSUSED*/
-     void
- gui_handle_drop(x, y, modifiers, fnames, count)
--    int		x;
--    int		y;
-+    int		x UNUSED;
-+    int		y UNUSED;
-     int_u	modifiers;
-     char_u	**fnames;
-     int		count;
-diff -Naur vim72.orig/src/gui_gtk.c vim72/src/gui_gtk.c
---- vim72.orig/src/gui_gtk.c	2008-07-31 12:48:20.000000000 -0700
-+++ vim72/src/gui_gtk.c	2009-07-19 15:16:36.000000000 -0700
-@@ -285,14 +285,14 @@
-     return image;
- }
- 
--/*ARGSUSED*/
-     static gint
--toolbar_button_focus_in_event(GtkWidget *widget, GdkEventFocus *event, gpointer data)
--{
--    /* When we're in a GtkPlug, we don't have window focus events, only widget focus.
--     * To emulate stand-alone gvim, if a button gets focus (e.g., <Tab> into GtkPlug)
--     * immediately pass it to mainwin.
--     */
-+toolbar_button_focus_in_event(GtkWidget *widget UNUSED,
-+			      GdkEventFocus *event UNUSED,
-+			      gpointer data UNUSED)
-+{
-+    /* When we're in a GtkPlug, we don't have window focus events, only widget
-+     * focus.  To emulate stand-alone gvim, if a button gets focus (e.g.,
-+     * <Tab> into GtkPlug) immediately pass it to mainwin. */
-     if (gtk_socket_id != 0)
- 	gtk_widget_grab_focus(gui.drawarea);
- 
-@@ -585,9 +585,8 @@
-     gtk_menu_prepend(GTK_MENU(menu->submenu_id), menu->tearoff_handle);
- }
- 
--/*ARGSUSED*/
-     static void
--menu_item_activate(GtkWidget *widget, gpointer data)
-+menu_item_activate(GtkWidget *widget UNUSED, gpointer data)
- {
-     gui_menu_cb((vimmenu_T *)data);
- 
-@@ -1202,9 +1201,8 @@
- #endif
- 
- #ifndef USE_FILE_CHOOSER
--/*ARGSUSED*/
-     static void
--browse_ok_cb(GtkWidget *widget, gpointer cbdata)
-+browse_ok_cb(GtkWidget *widget UNUSED, gpointer cbdata)
- {
-     gui_T *vw = (gui_T *)cbdata;
- 
-@@ -1218,9 +1216,8 @@
- 	gtk_main_quit();
- }
- 
--/*ARGSUSED*/
-     static void
--browse_cancel_cb(GtkWidget *widget, gpointer cbdata)
-+browse_cancel_cb(GtkWidget *widget UNUSED, gpointer cbdata)
- {
-     gui_T *vw = (gui_T *)cbdata;
- 
-@@ -1234,9 +1231,8 @@
- 	gtk_main_quit();
- }
- 
--/*ARGSUSED*/
-     static gboolean
--browse_destroy_cb(GtkWidget * widget)
-+browse_destroy_cb(GtkWidget *widget UNUSED)
- {
-     if (gui.browse_fname != NULL)
-     {
-@@ -1262,14 +1258,13 @@
-  * initdir			initial directory, NULL for current dir
-  * filter			not used (file name filter)
-  */
--/*ARGSUSED*/
-     char_u *
--gui_mch_browse(int saving,
-+gui_mch_browse(int saving UNUSED,
- 	       char_u *title,
- 	       char_u *dflt,
--	       char_u *ext,
-+	       char_u *ext UNUSED,
- 	       char_u *initdir,
--	       char_u *filter)
-+	       char_u *filter UNUSED)
- {
- #ifdef USE_FILE_CHOOSER
-     GtkWidget		*fc;
-@@ -1377,7 +1372,6 @@
-  * dflt				default name
-  * initdir			initial directory, NULL for current dir
-  */
--/*ARGSUSED*/
-     char_u *
- gui_mch_browsedir(
- 	       char_u *title,
-@@ -1460,7 +1454,6 @@
- }
- 
- # ifdef FEAT_GUI_GNOME
--/* ARGSUSED */
-     static int
- gui_gnome_dialog( int	type,
- 		char_u	*title,
-@@ -1611,7 +1604,6 @@
-     GtkWidget	*dialog;
- } CancelData;
- 
--/* ARGSUSED */
-     static void
- dlg_button_clicked(GtkWidget * widget, ButtonData *data)
- {
-@@ -1622,7 +1614,6 @@
- /*
-  * This makes the Escape key equivalent to the cancel button.
-  */
--/*ARGSUSED*/
-     static int
- dlg_key_press_event(GtkWidget *widget, GdkEventKey *event, CancelData *data)
- {
-@@ -1655,7 +1646,6 @@
- 	gtk_main_quit();
- }
- 
--/* ARGSUSED */
-     int
- gui_mch_dialog(	int	type,		/* type of dialog */
- 		char_u	*title,		/* title of dialog */
-@@ -2215,7 +2205,6 @@
-     GtkDialog	*dialog;	    /* Widget of the dialog */
- } DialogInfo;
- 
--/*ARGSUSED2*/
-     static gboolean
- dialog_key_press_event_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
- {
-@@ -2398,14 +2387,13 @@
-  * Note: The push_in output argument seems to affect scrolling of huge
-  * menus that don't fit on the screen.	Leave it at the default for now.
-  */
--/*ARGSUSED0*/
-     static void
--popup_menu_position_func(GtkMenu *menu,
-+popup_menu_position_func(GtkMenu *menu UNUSED,
- 			 gint *x, gint *y,
- # ifdef HAVE_GTK2
--			 gboolean *push_in,
-+			 gboolean *push_in UNUSED,
- # endif
--			 gpointer user_data)
-+			 gpointer user_data UNUSED)
- {
-     gdk_window_get_origin(gui.drawarea->window, x, y);
- 
-@@ -2464,13 +2452,12 @@
-     GtkWidget *all;	/* 'Replace All' action button */
- } SharedFindReplace;
- 
--static SharedFindReplace find_widgets = { NULL, };
--static SharedFindReplace repl_widgets = { NULL, };
-+static SharedFindReplace find_widgets = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
-+static SharedFindReplace repl_widgets = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
- 
--/* ARGSUSED */
-     static int
- find_key_press_event(
--		GtkWidget	*widget,
-+		GtkWidget	*widget UNUSED,
- 		GdkEventKey	*event,
- 		SharedFindReplace *frdp)
- {
-@@ -2962,9 +2949,8 @@
- /*
-  * Callback for actions of the find and replace dialogs
-  */
--/*ARGSUSED*/
-     static void
--find_replace_cb(GtkWidget *widget, gpointer data)
-+find_replace_cb(GtkWidget *widget UNUSED, gpointer data)
- {
-     int			flags;
-     char_u		*find_text;
-@@ -3010,9 +2996,8 @@
- }
- 
- /* our usual callback function */
--/*ARGSUSED*/
-     static void
--entry_activate_cb(GtkWidget *widget, gpointer data)
-+entry_activate_cb(GtkWidget *widget UNUSED, gpointer data)
- {
-     gtk_widget_grab_focus(GTK_WIDGET(data));
- }
-@@ -3055,10 +3040,9 @@
- /*
-  * ":helpfind"
-  */
--/*ARGSUSED*/
-     void
- ex_helpfind(eap)
--    exarg_T	*eap;
-+    exarg_T	*eap UNUSED;
- {
-     /* This will fail when menus are not loaded.  Well, it's only for
-      * backwards compatibility anyway. */
-diff -Naur vim72.orig/src/gui_gtk_f.c vim72/src/gui_gtk_f.c
---- vim72.orig/src/gui_gtk_f.c	2007-05-07 12:38:02.000000000 -0700
-+++ vim72/src/gui_gtk_f.c	2009-07-19 15:16:39.000000000 -0700
-@@ -227,14 +227,14 @@
- 
-     if (!form_type)
-     {
--	GtkTypeInfo form_info =
--	{
--	    "GtkForm",
--	    sizeof(GtkForm),
--	    sizeof(GtkFormClass),
--	    (GtkClassInitFunc) gtk_form_class_init,
--	    (GtkObjectInitFunc) gtk_form_init
--	};
-+	GtkTypeInfo form_info;
-+
-+	vim_memset(&form_info, 0, sizeof(form_info));
-+	form_info.type_name = "GtkForm";
-+	form_info.object_size = sizeof(GtkForm);
-+	form_info.class_size = sizeof(GtkFormClass);
-+	form_info.class_init_func = (GtkClassInitFunc)gtk_form_class_init;
-+	form_info.object_init_func = (GtkObjectInitFunc)gtk_form_init;
- 
- 	form_type = gtk_type_unique(GTK_TYPE_CONTAINER, &form_info);
-     }
-@@ -611,10 +611,9 @@
-     }
- }
- 
--/*ARGSUSED1*/
-     static void
- gtk_form_forall(GtkContainer	*container,
--		gboolean	include_internals,
-+		gboolean	include_internals UNUSED,
- 		GtkCallback	callback,
- 		gpointer	callback_data)
- {
-@@ -786,9 +785,8 @@
-  * them or discards them, depending on whether we are obscured
-  * or not.
-  */
--/*ARGSUSED1*/
-     static GdkFilterReturn
--gtk_form_filter(GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data)
-+gtk_form_filter(GdkXEvent *gdk_xevent, GdkEvent *event UNUSED, gpointer data)
- {
-     XEvent *xevent;
-     GtkForm *form;
-@@ -821,9 +819,10 @@
-  * there is no corresponding event in GTK, so we have
-  * to get the events from a filter
-  */
--/*ARGSUSED1*/
-     static GdkFilterReturn
--gtk_form_main_filter(GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data)
-+gtk_form_main_filter(GdkXEvent *gdk_xevent,
-+		     GdkEvent *event UNUSED,
-+		     gpointer data)
- {
-     XEvent *xevent;
-     GtkForm *form;
-@@ -911,9 +910,8 @@
- #endif
- }
- 
--/*ARGSUSED0*/
-     static void
--gtk_form_child_map(GtkWidget *widget, gpointer user_data)
-+gtk_form_child_map(GtkWidget *widget UNUSED, gpointer user_data)
- {
-     GtkFormChild *child;
- 
-@@ -923,9 +921,8 @@
-     gdk_window_show(child->window);
- }
- 
--/*ARGSUSED0*/
-     static void
--gtk_form_child_unmap(GtkWidget *widget, gpointer user_data)
-+gtk_form_child_unmap(GtkWidget *widget UNUSED, gpointer user_data)
- {
-     GtkFormChild *child;
- 
-diff -Naur vim72.orig/src/gui_gtk_x11.c vim72/src/gui_gtk_x11.c
---- vim72.orig/src/gui_gtk_x11.c	2008-07-04 03:46:24.000000000 -0700
-+++ vim72/src/gui_gtk_x11.c	2009-07-19 15:18:26.000000000 -0700
-@@ -107,6 +107,7 @@
-     TARGET_UTF8_STRING,
-     TARGET_STRING,
-     TARGET_COMPOUND_TEXT,
-+    TARGET_HTML,
-     TARGET_TEXT,
-     TARGET_TEXT_URI_LIST,
-     TARGET_TEXT_PLAIN,
-@@ -123,6 +124,7 @@
-     {VIMENC_ATOM_NAME,	0, TARGET_VIMENC},
-     {VIM_ATOM_NAME,	0, TARGET_VIM},
- #ifdef FEAT_MBYTE
-+    {"text/html",	0, TARGET_HTML},
-     {"UTF8_STRING",	0, TARGET_UTF8_STRING},
- #endif
-     {"COMPOUND_TEXT",	0, TARGET_COMPOUND_TEXT},
-@@ -140,6 +142,7 @@
- {
-     {"text/uri-list",	0, TARGET_TEXT_URI_LIST},
- # ifdef FEAT_MBYTE
-+    {"text/html",	0, TARGET_HTML},
-     {"UTF8_STRING",	0, TARGET_UTF8_STRING},
- # endif
-     {"STRING",		0, TARGET_STRING},
-@@ -178,6 +181,7 @@
-  * Atoms used to control/reference X11 selections.
-  */
- #ifdef FEAT_MBYTE
-+static GdkAtom html_atom = GDK_NONE;
- static GdkAtom utf8_string_atom = GDK_NONE;
- #endif
- #ifndef HAVE_GTK2
-@@ -412,6 +416,7 @@
- #endif
- #if defined(FEAT_GUI_GNOME) && defined(FEAT_SESSION)
- static const char *restart_command = NULL;
-+static       char *abs_restart_command = NULL;
- #endif
- static int found_iconic_arg = FALSE;
- 
-@@ -449,8 +454,10 @@
- 	char_u buf[MAXPATHL];
- 
- 	if (mch_FullName((char_u *)argv[0], buf, (int)sizeof(buf), TRUE) == OK)
--	    /* Tiny leak; doesn't matter, and usually we don't even get here */
--	    restart_command = (char *)vim_strsave(buf);
-+	{
-+	    abs_restart_command = (char *)vim_strsave(buf);
-+	    restart_command = abs_restart_command;
-+	}
-     }
- #endif
- 
-@@ -611,6 +618,9 @@
- gui_mch_free_all()
- {
-     vim_free(gui_argv);
-+#if defined(FEAT_GUI_GNOME) && defined(FEAT_SESSION)
-+    vim_free(abs_restart_command);
-+#endif
- }
- #endif
- 
-@@ -619,9 +629,10 @@
-  * Doesn't seem possible, since check_copy_area() relies on
-  * this information.  --danielk
-  */
--/*ARGSUSED*/
-     static gint
--visibility_event(GtkWidget *widget, GdkEventVisibility *event, gpointer data)
-+visibility_event(GtkWidget *widget UNUSED,
-+		 GdkEventVisibility *event,
-+		 gpointer data UNUSED)
- {
-     gui.visibility = event->state;
-     /*
-@@ -638,9 +649,10 @@
- /*
-  * Redraw the corresponding portions of the screen.
-  */
--/*ARGSUSED*/
-     static gint
--expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer data)
-+expose_event(GtkWidget *widget UNUSED,
-+	     GdkEventExpose *event,
-+	     gpointer data UNUSED)
- {
-     /* Skip this when the GUI isn't set up yet, will redraw later. */
-     if (gui.starting)
-@@ -668,9 +680,10 @@
- /*
-  * Handle changes to the "Comm" property
-  */
--/*ARGSUSED2*/
-     static gint
--property_event(GtkWidget *widget, GdkEventProperty *event, gpointer data)
-+property_event(GtkWidget *widget,
-+	       GdkEventProperty *event,
-+	       gpointer data UNUSED)
- {
-     if (event->type == GDK_PROPERTY_NOTIFY
- 	    && event->state == (int)GDK_PROPERTY_NEW_VALUE
-@@ -740,9 +753,8 @@
-     blink_state = BLINK_NONE;
- }
- 
--/*ARGSUSED*/
-     static gint
--blink_cb(gpointer data)
-+blink_cb(gpointer data UNUSED)
- {
-     if (blink_state == BLINK_ON)
-     {
-@@ -781,9 +793,10 @@
-     }
- }
- 
--/*ARGSUSED*/
-     static gint
--enter_notify_event(GtkWidget *widget, GdkEventCrossing *event, gpointer data)
-+enter_notify_event(GtkWidget *widget UNUSED,
-+		   GdkEventCrossing *event UNUSED,
-+		   gpointer data UNUSED)
- {
-     if (blink_state == BLINK_NONE)
- 	gui_mch_start_blink();
-@@ -795,9 +808,10 @@
-     return FALSE;
- }
- 
--/*ARGSUSED*/
-     static gint
--leave_notify_event(GtkWidget *widget, GdkEventCrossing *event, gpointer data)
-+leave_notify_event(GtkWidget *widget UNUSED,
-+		   GdkEventCrossing *event UNUSED,
-+		   gpointer data UNUSED)
- {
-     if (blink_state != BLINK_NONE)
- 	gui_mch_stop_blink();
-@@ -805,9 +819,10 @@
-     return FALSE;
- }
- 
--/*ARGSUSED*/
-     static gint
--focus_in_event(GtkWidget *widget, GdkEventFocus *event, gpointer data)
-+focus_in_event(GtkWidget *widget,
-+	       GdkEventFocus *event UNUSED,
-+	       gpointer data UNUSED)
- {
-     gui_focus_change(TRUE);
- 
-@@ -826,9 +841,10 @@
-     return TRUE;
- }
- 
--/*ARGSUSED*/
-     static gint
--focus_out_event(GtkWidget *widget, GdkEventFocus *event, gpointer data)
-+focus_out_event(GtkWidget *widget UNUSED,
-+	        GdkEventFocus *event UNUSED,
-+		gpointer data UNUSED)
- {
-     gui_focus_change(FALSE);
- 
-@@ -956,9 +972,10 @@
- /*
-  * Main keyboard handler:
-  */
--/*ARGSUSED*/
-     static gint
--key_press_event(GtkWidget *widget, GdkEventKey *event, gpointer data)
-+key_press_event(GtkWidget *widget UNUSED,
-+		GdkEventKey *event,
-+		gpointer data UNUSED)
- {
- #ifdef HAVE_GTK2
-     /* 256 bytes is way over the top, but for safety let's reduce it only
-@@ -1225,9 +1242,10 @@
- }
- 
- #if defined(FEAT_XIM) && defined(HAVE_GTK2)
--/*ARGSUSED0*/
-     static gboolean
--key_release_event(GtkWidget *widget, GdkEventKey *event, gpointer data)
-+key_release_event(GtkWidget *widget UNUSED,
-+		  GdkEventKey *event,
-+		  gpointer data UNUSED)
- {
-     /*
-      * GTK+ 2 input methods may do fancy stuff on key release events too.
-@@ -1243,11 +1261,10 @@
-  * Selection handlers:
-  */
- 
--/*ARGSUSED*/
-     static gint
--selection_clear_event(GtkWidget		*widget,
-+selection_clear_event(GtkWidget		*widget UNUSED,
- 		      GdkEventSelection	*event,
--		      gpointer		user_data)
-+		      gpointer		user_data UNUSED)
- {
-     if (event->selection == clip_plus.gtk_sel_atom)
- 	clip_lose_selection(&clip_plus);
-@@ -1265,12 +1282,11 @@
- #define RS_FAIL	2	/* selection_received_cb() called and failed */
- static int received_selection = RS_NONE;
- 
--/*ARGSUSED*/
-     static void
--selection_received_cb(GtkWidget		*widget,
-+selection_received_cb(GtkWidget		*widget UNUSED,
- 		      GtkSelectionData	*data,
--		      guint		time_,
--		      gpointer		user_data)
-+		      guint		time_ UNUSED,
-+		      gpointer		user_data UNUSED)
- {
-     VimClipboard    *cbd;
-     char_u	    *text;
-@@ -1352,6 +1368,24 @@
- 	    else
- 		text = tmpbuf_utf8;
- 	}
-+	else if (len >= 2 && text[0] == 0xff && text[1] == 0xfe)
-+	{
-+	    vimconv_T conv;
-+
-+	    /* UTF-16, we get this for HTML */
-+	    conv.vc_type = CONV_NONE;
-+	    convert_setup_ext(&conv, (char_u *)"utf-16le", FALSE, p_enc, TRUE);
-+
-+	    if (conv.vc_type != CONV_NONE)
-+	    {
-+		text += 2;
-+		len -= 2;
-+		tmpbuf = string_convert(&conv, text, &len);
-+		convert_setup(&conv, NULL, NULL);
-+	    }
-+	    if (tmpbuf != NULL)
-+		text = tmpbuf;
-+	}
-     }
- #else /* !HAVE_GTK2 */
- # ifdef FEAT_MBYTE
-@@ -1414,13 +1448,12 @@
-  * Prepare our selection data for passing it to the external selection
-  * client.
-  */
--/*ARGSUSED*/
-     static void
--selection_get_cb(GtkWidget	    *widget,
-+selection_get_cb(GtkWidget	    *widget UNUSED,
- 		 GtkSelectionData   *selection_data,
- 		 guint		    info,
--		 guint		    time_,
--		 gpointer	    user_data)
-+		 guint		    time_ UNUSED,
-+		 gpointer	    user_data UNUSED)
- {
-     char_u	    *string;
-     char_u	    *tmpbuf;
-@@ -1440,6 +1473,7 @@
- 
-     if (info != (guint)TARGET_STRING
- #ifdef FEAT_MBYTE
-+	    && (!clip_html || info != (guint)TARGET_HTML)
- 	    && info != (guint)TARGET_UTF8_STRING
- 	    && info != (guint)TARGET_VIMENC
- #endif
-@@ -1475,6 +1509,40 @@
-     }
- 
- #ifdef FEAT_MBYTE
-+    else if (info == (guint)TARGET_HTML)
-+    {
-+	vimconv_T conv;
-+
-+	/* Since we get utf-16, we probably should set it as well. */
-+	conv.vc_type = CONV_NONE;
-+	convert_setup_ext(&conv, p_enc, TRUE, (char_u *)"utf-16le", FALSE);
-+	if (conv.vc_type != CONV_NONE)
-+	{
-+	    tmpbuf = string_convert(&conv, string, &length);
-+	    convert_setup(&conv, NULL, NULL);
-+	    vim_free(string);
-+	    string = tmpbuf;
-+	}
-+
-+	/* Prepend the BOM: "fffe" */
-+	if (string != NULL)
-+	{
-+	    tmpbuf = alloc(length + 2);
-+	    tmpbuf[0] = 0xff;
-+	    tmpbuf[1] = 0xfe;
-+	    mch_memmove(tmpbuf + 2, string, (size_t)length);
-+	    vim_free(string);
-+	    string = tmpbuf;
-+	    length += 2;
-+
-+	    selection_data->type = selection_data->target;
-+	    selection_data->format = 16;	/* 16 bits per char */
-+	    gtk_selection_data_set(selection_data, html_atom, 16,
-+							      string, length);
-+	    vim_free(string);
-+	}
-+	return;
-+    }
-     else if (info == (guint)TARGET_VIMENC)
-     {
- 	int l = STRLEN(p_enc);
-@@ -1678,7 +1746,7 @@
- 
- 	offshoot = dx > dy ? dx : dy;
- 
--	/* Make a linearly declaying timer delay with a threshold of 5 at a
-+	/* Make a linearly decaying timer delay with a threshold of 5 at a
- 	 * distance of 127 pixels from the main window.
- 	 *
- 	 * One could think endlessly about the most ergonomic variant here.
-@@ -1707,9 +1775,8 @@
- /*
-  * Timer used to recognize multiple clicks of the mouse button.
-  */
--/*ARGSUSED0*/
-     static gint
--motion_repeat_timer_cb(gpointer data)
-+motion_repeat_timer_cb(gpointer data UNUSED)
- {
-     int		    x;
-     int		    y;
-@@ -1749,9 +1816,10 @@
-     return FALSE;
- }
- 
--/*ARGSUSED2*/
-     static gint
--motion_notify_event(GtkWidget *widget, GdkEventMotion *event, gpointer data)
-+motion_notify_event(GtkWidget *widget,
-+		    GdkEventMotion *event,
-+		    gpointer data UNUSED)
- {
-     if (event->is_hint)
-     {
-@@ -1777,9 +1845,10 @@
-  * by our own timeout mechanism instead of the one provided by GTK+ itself.
-  * This is due to the way the generic VIM code is recognizing multiple clicks.
-  */
--/*ARGSUSED2*/
-     static gint
--button_press_event(GtkWidget *widget, GdkEventButton *event, gpointer data)
-+button_press_event(GtkWidget *widget,
-+		   GdkEventButton *event,
-+		   gpointer data UNUSED)
- {
-     int button;
-     int repeated_click = FALSE;
-@@ -1855,9 +1924,10 @@
-  * GTK+ 2 doesn't handle mouse buttons 4, 5, 6 and 7 the same way as GTK+ 1.
-  * Instead, it abstracts scrolling via the new GdkEventScroll.
-  */
--/*ARGSUSED2*/
-     static gboolean
--scroll_event(GtkWidget *widget, GdkEventScroll *event, gpointer data)
-+scroll_event(GtkWidget *widget,
-+	     GdkEventScroll *event,
-+	     gpointer data UNUSED)
- {
-     int	    button;
-     int_u   vim_modifiers;
-@@ -1896,9 +1966,10 @@
- #endif /* HAVE_GTK2 */
- 
- 
--/*ARGSUSED*/
-     static gint
--button_release_event(GtkWidget *widget, GdkEventButton *event, gpointer data)
-+button_release_event(GtkWidget *widget UNUSED,
-+		     GdkEventButton *event,
-+		     gpointer data UNUSED)
- {
-     int x, y;
-     int_u vim_modifiers;
-@@ -2100,7 +2171,6 @@
- /*
-  * DND receiver.
-  */
--/*ARGSUSED2*/
-     static void
- drag_data_received_cb(GtkWidget		*widget,
- 		      GdkDragContext	*context,
-@@ -2109,7 +2179,7 @@
- 		      GtkSelectionData	*data,
- 		      guint		info,
- 		      guint		time_,
--		      gpointer		user_data)
-+		      gpointer		user_data UNUSED)
- {
-     GdkModifierType state;
- 
-@@ -2143,7 +2213,6 @@
-  * be abandoned and pop up a dialog asking the user for confirmation if
-  * necessary.
-  */
--/*ARGSUSED0*/
-     static void
- sm_client_check_changed_any(GnomeClient	    *client,
- 			    gint	    key,
-@@ -2251,7 +2320,6 @@
-  * for confirmation if necessary.  Save the current editing session and tell
-  * the session manager how to restart Vim.
-  */
--/*ARGSUSED1*/
-     static gboolean
- sm_client_save_yourself(GnomeClient	    *client,
- 			gint		    phase,
-@@ -2339,7 +2407,6 @@
-  * here since "save_yourself" has been emitted before (unless serious trouble
-  * is happening).
-  */
--/*ARGSUSED0*/
-     static void
- sm_client_die(GnomeClient *client, gpointer data)
- {
-@@ -2379,10 +2446,9 @@
- /*
-  * GTK tells us that XSMP needs attention
-  */
--/*ARGSUSED*/
-     static gboolean
- local_xsmp_handle_requests(source, condition, data)
--    GIOChannel		*source;
-+    GIOChannel		*source UNUSED;
-     GIOCondition	condition;
-     gpointer		data;
- {
-@@ -2480,16 +2546,18 @@
-  * WM_SAVE_YOURSELF hack it actually stores the session...  And yes,
-  * it should work with KDE as well.
-  */
--/*ARGSUSED1*/
-     static GdkFilterReturn
--global_event_filter(GdkXEvent *xev, GdkEvent *event, gpointer data)
-+global_event_filter(GdkXEvent *xev,
-+		    GdkEvent *event UNUSED,
-+		    gpointer data UNUSED)
- {
-     XEvent *xevent = (XEvent *)xev;
- 
-     if (xevent != NULL
- 	    && xevent->type == ClientMessage
- 	    && xevent->xclient.message_type == GET_X_ATOM(wm_protocols_atom)
--	    && xevent->xclient.data.l[0] == GET_X_ATOM(save_yourself_atom))
-+	    && (long_u)xevent->xclient.data.l[0]
-+					    == GET_X_ATOM(save_yourself_atom))
-     {
- 	out_flush();
- 	ml_sync_all(FALSE, FALSE); /* preserve all swap files */
-@@ -2512,7 +2580,6 @@
- /*
-  * GDK handler for X ClientMessage events.
-  */
--/*ARGSUSED2*/
-     static GdkFilterReturn
- gdk_wm_protocols_filter(GdkXEvent *xev, GdkEvent *event, gpointer data)
- {
-@@ -2558,9 +2625,8 @@
- /*
-  * Setup the window icon & xcmdsrv comm after the main window has been realized.
-  */
--/*ARGSUSED*/
-     static void
--mainwin_realize(GtkWidget *widget, gpointer data)
-+mainwin_realize(GtkWidget *widget UNUSED, gpointer data UNUSED)
- {
- /* If you get an error message here, you still need to unpack the runtime
-  * archive! */
-@@ -2712,11 +2778,10 @@
- }
- 
- #ifdef HAVE_GTK_MULTIHEAD
--/*ARGSUSED1*/
-     static void
- mainwin_screen_changed_cb(GtkWidget  *widget,
--			  GdkScreen  *previous_screen,
--			  gpointer   data)
-+			  GdkScreen  *previous_screen UNUSED,
-+			  gpointer   data UNUSED)
- {
-     if (!gtk_widget_has_screen(widget))
- 	return;
-@@ -2757,9 +2822,8 @@
-  * Don't try to set any VIM scrollbar sizes anywhere here. I'm relying on the
-  * fact that the main VIM engine doesn't take them into account anywhere.
-  */
--/*ARGSUSED1*/
-     static void
--drawarea_realize_cb(GtkWidget *widget, gpointer data)
-+drawarea_realize_cb(GtkWidget *widget, gpointer data UNUSED)
- {
-     GtkWidget *sbar;
- 
-@@ -2789,9 +2853,8 @@
- /*
-  * Properly clean up on shutdown.
-  */
--/*ARGSUSED0*/
-     static void
--drawarea_unrealize_cb(GtkWidget *widget, gpointer data)
-+drawarea_unrealize_cb(GtkWidget *widget UNUSED, gpointer data UNUSED)
- {
-     /* Don't write messages to the GUI anymore */
-     full_screen = FALSE;
-@@ -2827,11 +2890,10 @@
- #endif
- }
- 
--/*ARGSUSED0*/
-     static void
--drawarea_style_set_cb(GtkWidget	*widget,
--		      GtkStyle	*previous_style,
--		      gpointer	data)
-+drawarea_style_set_cb(GtkWidget	*widget UNUSED,
-+		      GtkStyle	*previous_style UNUSED,
-+		      gpointer	data UNUSED)
- {
-     gui_mch_new_colors();
- }
-@@ -2840,9 +2902,10 @@
-  * Callback routine for the "delete_event" signal on the toplevel window.
-  * Tries to vim gracefully, or refuses to exit with changed buffers.
-  */
--/*ARGSUSED*/
-     static gint
--delete_event_cb(GtkWidget *widget, GdkEventAny *event, gpointer data)
-+delete_event_cb(GtkWidget *widget UNUSED,
-+		GdkEventAny *event UNUSED,
-+		gpointer data UNUSED)
- {
-     gui_shell_closed();
-     return TRUE;
-@@ -2964,7 +3027,7 @@
- 
-     /* At start-up, don't try to set the hints until the initial
-      * values have been used (those that dictate our initial size)
--     * Let forced (i.e., correct) values thruogh always.
-+     * Let forced (i.e., correct) values through always.
-      */
-     if (!(force_width && force_height)  &&  init_window_hints_state > 0)
-     {
-@@ -3142,9 +3205,8 @@
- /*
-  * Handle selecting an item in the tab line popup menu.
-  */
--/*ARGSUSED*/
-     static void
--tabline_menu_handler(GtkMenuItem *item, gpointer user_data)
-+tabline_menu_handler(GtkMenuItem *item UNUSED, gpointer user_data)
- {
-     /* Add the string cmd into input buffer */
-     send_tabline_menu_event(clicked_page, (int)(long)user_data);
-@@ -3244,13 +3306,12 @@
- /*
-  * Handle selecting one of the tabs.
-  */
--/*ARGSUSED*/
-     static void
- on_select_tab(
--	GtkNotebook	*notebook,
--	GtkNotebookPage *page,
-+	GtkNotebook	*notebook UNUSED,
-+	GtkNotebookPage *page UNUSED,
- 	gint		idx,
--	gpointer	data)
-+	gpointer	data UNUSED)
- {
-     if (!ignore_tabline_evt)
-     {
-@@ -3460,6 +3521,7 @@
- 
-     /* Initialise atoms */
- #ifdef FEAT_MBYTE
-+    html_atom = gdk_atom_intern("text/html", FALSE);
-     utf8_string_atom = gdk_atom_intern("UTF8_STRING", FALSE);
- #endif
- #ifndef HAVE_GTK2
-@@ -3784,7 +3846,7 @@
- #endif
- 
-     if (gtk_socket_id != 0)
--	/* make sure keybord input can go to the drawarea */
-+	/* make sure keyboard input can go to the drawarea */
- 	GTK_WIDGET_SET_FLAGS(gui.drawarea, GTK_CAN_FOCUS);
- 
-     /*
-@@ -3922,10 +3984,10 @@
- /*
-  * This signal informs us about the need to rearrange our sub-widgets.
-  */
--/*ARGSUSED*/
-     static gint
--form_configure_event(GtkWidget *widget, GdkEventConfigure *event,
--		     gpointer data)
-+form_configure_event(GtkWidget *widget UNUSED,
-+		     GdkEventConfigure *event,
-+		     gpointer data UNUSED)
- {
-     int usable_height = event->height;
- 
-@@ -3948,9 +4010,8 @@
-  * We can't do much more here than to trying to preserve what had been done,
-  * since the window is already inevitably going away.
-  */
--/*ARGSUSED0*/
-     static void
--mainwin_destroy_cb(GtkObject *object, gpointer data)
-+mainwin_destroy_cb(GtkObject *object UNUSED, gpointer data UNUSED)
- {
-     /* Don't write messages to the GUI anymore */
-     full_screen = FALSE;
-@@ -3980,9 +4041,8 @@
-  * scrollbar init.), actually do the standard hinst and stop the timer.
-  * We'll not let the default hints be set while this timer's active.
-  */
--/*ARGSUSED*/
-     static gboolean
--check_startup_plug_hints(gpointer data)
-+check_startup_plug_hints(gpointer data UNUSED)
- {
-     if (init_window_hints_state == 1)
-     {
-@@ -4055,7 +4115,7 @@
- 	    Columns = w;
- 	if (mask & HeightValue)
- 	{
--	    if (p_window > h - 1 || !option_was_set((char_u *)"window"))
-+	    if (p_window > (long)h - 1 || !option_was_set((char_u *)"window"))
- 		p_window = h - 1;
- 	    Rows = h;
- 	}
-@@ -4070,14 +4130,14 @@
- 
- 	if (mask & (XValue | YValue))
- 	{
--	    int w, h;
--	    gui_mch_get_screen_dimensions(&w, &h);
--	    h += p_ghr + get_menu_tool_height();
--	    w += get_menu_tool_width();
-+	    int ww, hh;
-+	    gui_mch_get_screen_dimensions(&ww, &hh);
-+	    hh += p_ghr + get_menu_tool_height();
-+	    ww += get_menu_tool_width();
- 	    if (mask & XNegative)
--		x += w - pixel_width;
-+		x += ww - pixel_width;
- 	    if (mask & YNegative)
--		y += h - pixel_height;
-+		y += hh - pixel_height;
- #ifdef HAVE_GTK2
- 	    gtk_window_move(GTK_WINDOW(gui.mainwin), x, y);
- #else
-@@ -4229,9 +4289,8 @@
- }
- 
- 
--/*ARGSUSED0*/
-     void
--gui_mch_exit(int rc)
-+gui_mch_exit(int rc UNUSED)
- {
-     if (gui.mainwin != NULL)
- 	gtk_widget_destroy(gui.mainwin);
-@@ -4286,7 +4345,6 @@
-  * report the new size through form_configure_event().  That caused the window
-  * layout to be messed up.
-  */
--/*ARGSUSED0*/
-     static gboolean
- force_shell_resize_idle(gpointer data)
- {
-@@ -4314,12 +4372,11 @@
- /*
-  * Set the windows size.
-  */
--/*ARGSUSED2*/
-     void
- gui_mch_set_shellsize(int width, int height,
--		      int min_width,  int min_height,
--		      int base_width, int base_height,
--		      int direction)
-+		      int min_width UNUSED,  int min_height UNUSED,
-+		      int base_width UNUSED, int base_height UNUSED,
-+		      int direction UNUSED)
- {
- #ifndef HAVE_GTK2
-     /* Hack: When the form already is at the desired size, the window might
-@@ -4413,9 +4470,8 @@
- }
- 
- #if defined(FEAT_TITLE) || defined(PROTO)
--/*ARGSUSED*/
-     void
--gui_mch_settitle(char_u *title, char_u *icon)
-+gui_mch_settitle(char_u *title, char_u *icon UNUSED)
- {
- # ifdef HAVE_GTK2
-     if (title != NULL && output_conv.vc_type != CONV_NONE)
-@@ -4493,7 +4549,6 @@
-  * Get a font structure for highlighting.
-  * "cbdata" is a pointer to the global gui structure.
-  */
--/*ARGSUSED*/
-     static void
- font_sel_ok(GtkWidget *wgt, gpointer cbdata)
- {
-@@ -4509,7 +4564,6 @@
- 	gtk_main_quit();
- }
- 
--/*ARGSUSED*/
-     static void
- font_sel_cancel(GtkWidget *wgt, gpointer cbdata)
- {
-@@ -4520,7 +4574,6 @@
- 	gtk_main_quit();
- }
- 
--/*ARGSUSED*/
-     static void
- font_sel_destroy(GtkWidget *wgt, gpointer cbdata)
- {
-@@ -4620,7 +4673,6 @@
- /*
-  * Try to load the requested fontset.
-  */
--/*ARGSUSED2*/
-     GuiFontset
- gui_mch_get_fontset(char_u *name, int report_error, int fixed_width)
- {
-@@ -4863,7 +4915,7 @@
-     styled_font[1] = &gui.ital_font;
-     styled_font[2] = &gui.boldital_font;
- 
--    /* First free whatever was freviously there. */
-+    /* First free whatever was previously there. */
-     for (i = 0; i < 3; ++i)
- 	if (*styled_font[i])
- 	{
-@@ -5012,9 +5064,8 @@
-  * Initialize Vim to use the font or fontset with the given name.
-  * Return FAIL if the font could not be loaded, OK otherwise.
-  */
--/*ARGSUSED1*/
-     int
--gui_mch_init_font(char_u *font_name, int fontset)
-+gui_mch_init_font(char_u *font_name, int fontset UNUSED)
- {
- #ifdef HAVE_GTK2
-     PangoFontDescription    *font_desc;
-@@ -5326,9 +5377,8 @@
- /*
-  * Return the name of font "font" in allocated memory.
-  */
--/*ARGSUSED*/
-     char_u *
--gui_mch_get_fontname(GuiFont font, char_u *name)
-+gui_mch_get_fontname(GuiFont font, char_u *name UNUSED)
- {
- # ifdef HAVE_GTK2
-     if (font != NOFONT)
-@@ -5732,7 +5782,7 @@
- {
-     int			i;
-     int			offset;
--    const static int	val[8] = {1, 0, 0, 0, 1, 2, 2, 2 };
-+    static const int	val[8] = {1, 0, 0, 0, 1, 2, 2, 2 };
-     int			y = FILL_Y(row + 1) - 1;
- 
-     /* Undercurl: draw curl at the bottom of the character cell. */
-@@ -6085,12 +6135,15 @@
- # ifdef FEAT_MBYTE
- 	    if (enc_utf8)
- 	    {
--		c = utf_ptr2char(p);
-+		int pcc[MAX_MCO];
-+
-+		/* TODO: use the composing characters */
-+		c = utfc_ptr2char_len(p, &pcc, len - (p - s));
- 		if (c >= 0x10000)	/* show chars > 0xffff as ? */
- 		    c = 0xbf;
- 		buf[textlen].byte1 = c >> 8;
- 		buf[textlen].byte2 = c;
--		p += utf_ptr2len(p);
-+		p += utfc_ptr2len_len(p, len - (p - s));
- 		width += utf_char2cells(c);
- 	    }
- 	    else
-@@ -6114,8 +6167,8 @@
- 	if (has_mbyte)
- 	{
- 	    width = 0;
--	    for (p = s; p < s + len; p += (*mb_ptr2len)(p))
--		width += (*mb_ptr2cells)(p);
-+	    for (p = s; p < s + len; p += (*mb_ptr2len_len)(p, len - (p - s)))
-+		width += (*mb_ptr2cells_len)(p, len - (p - s));
- 	}
- 	else
- # endif
-@@ -6402,7 +6455,6 @@
- /*
-  * Callback function, used when data is available on the SNiFF connection.
-  */
--/* ARGSUSED */
-     static void
- sniff_request_cb(
-     gpointer	data,
-@@ -6665,12 +6717,14 @@
- {
-     GdkAtom	target;
-     unsigned	i;
--    int		nbytes;
--    char_u	*buffer;
-     time_t	start;
- 
-     for (i = 0; i < N_SELECTION_TARGETS; ++i)
-     {
-+#ifdef FEAT_MBYTE
-+	if (!clip_html && selection_targets[i].info == TARGET_HTML)
-+	    continue;
-+#endif
- 	received_selection = RS_NONE;
- 	target = gdk_atom_intern(selection_targets[i].target, FALSE);
- 
-@@ -6690,30 +6744,14 @@
-     }
- 
-     /* Final fallback position - use the X CUT_BUFFER0 store */
--    nbytes = 0;
--    buffer = (char_u *)XFetchBuffer(GDK_WINDOW_XDISPLAY(gui.mainwin->window),
--				    &nbytes, 0);
--    if (nbytes > 0)
--    {
--	/* Got something */
--	clip_yank_selection(MCHAR, buffer, (long)nbytes, cbd);
--	if (p_verbose > 0)
--	{
--	    verbose_enter();
--	    smsg((char_u *)_("Used CUT_BUFFER0 instead of empty selection"));
--	    verbose_leave();
--	}
--    }
--    if (buffer != NULL)
--	XFree(buffer);
-+    yank_cut_buffer0(GDK_WINDOW_XDISPLAY(gui.mainwin->window), cbd);
- }
- 
- /*
-  * Disown the selection.
-  */
--/*ARGSUSED*/
-     void
--clip_mch_lose_selection(VimClipboard *cbd)
-+clip_mch_lose_selection(VimClipboard *cbd UNUSED)
- {
-     /* WEIRD: when using NULL to actually disown the selection, we lose the
-      * selection the first time we own it. */
-@@ -6741,9 +6779,8 @@
-  * Send the current selection to the clipboard.  Do nothing for X because we
-  * will fill in the selection only when requested by another app.
-  */
--/*ARGSUSED*/
-     void
--clip_mch_set_selection(VimClipboard *cbd)
-+clip_mch_set_selection(VimClipboard *cbd UNUSED)
- {
- }
- 
-@@ -6950,7 +6987,7 @@
- 	    else
- 		id &= ~1;	/* they are always even (why?) */
- 	}
--	else if (shape < sizeof(mshape_ids) / sizeof(int))
-+	else if (shape < (int)(sizeof(mshape_ids) / sizeof(int)))
- 	    id = mshape_ids[shape];
- 	else
- 	    return;
-diff -Naur vim72.orig/src/gui_motif.c vim72/src/gui_motif.c
---- vim72.orig/src/gui_motif.c	2008-06-07 06:06:33.000000000 -0700
-+++ vim72/src/gui_motif.c	2009-07-19 15:16:46.000000000 -0700
-@@ -117,10 +117,9 @@
-  * Call-back routines.
-  */
- 
--/* ARGSUSED */
-     static void
- scroll_cb(w, client_data, call_data)
--    Widget	w;
-+    Widget	w UNUSED;
-     XtPointer	client_data, call_data;
- {
-     scrollbar_T *sb;
-@@ -136,11 +135,11 @@
- }
- 
- #ifdef FEAT_GUI_TABLINE
--/*ARGSUSED*/
-     static void
- tabline_cb(w, client_data, call_data)
--    Widget	w;
--    XtPointer	client_data, call_data;
-+    Widget	w UNUSED;
-+    XtPointer	client_data UNUSED;
-+    XtPointer	call_data;
- {
-     XmNotebookCallbackStruct *nptr;
- 
-@@ -149,11 +148,11 @@
- 	send_tabline_event(nptr->page_number);
- }
- 
--/*ARGSUSED*/
-     static void
- tabline_button_cb(w, client_data, call_data)
-     Widget	w;
--    XtPointer	client_data, call_data;
-+    XtPointer	client_data UNUSED;
-+    XtPointer	call_data UNUSED;
- {
-     int		cmd, tab_idx;
- 
-@@ -166,11 +165,10 @@
- /*
-  * Tabline single mouse click timeout handler
-  */
--/*ARGSUSED*/
-     static void
- motif_tabline_timer_cb (timed_out, interval_id)
-     XtPointer		timed_out;
--    XtIntervalId	*interval_id;
-+    XtIntervalId	*interval_id UNUSED;
- {
-     *((int *)timed_out) = TRUE;
- }
-@@ -203,13 +201,12 @@
-     return FALSE;
- }
- 
--/*ARGSUSED*/
-     static void
- tabline_menu_cb(w, closure, e, continue_dispatch)
-     Widget	w;
--    XtPointer	closure;
-+    XtPointer	closure UNUSED;
-     XEvent	*e;
--    Boolean	*continue_dispatch;
-+    Boolean	*continue_dispatch UNUSED;
- {
-     Widget			tab_w;
-     XButtonPressedEvent		*event;
-@@ -277,11 +274,10 @@
-     XtManageChild(tabLine_menu);
- }
- 
--/*ARGSUSED*/
-     static void
- tabline_balloon_cb(beval, state)
-     BalloonEval	*beval;
--    int		state;
-+    int		state UNUSED;
- {
-     int		nr;
-     tabpage_T	*tp;
-@@ -642,13 +638,12 @@
- #endif
- }
- 
--/*ARGSUSED*/
-     void
- gui_mch_set_text_area_pos(x, y, w, h)
--    int	    x;
--    int	    y;
--    int	    w;
--    int	    h;
-+    int	    x UNUSED;
-+    int	    y UNUSED;
-+    int	    w UNUSED;
-+    int	    h UNUSED;
- {
- #ifdef FEAT_TOOLBAR
-     /* Give keyboard focus to the textArea instead of the toolbar. */
-@@ -1261,7 +1256,7 @@
-     if (menu->icon_builtin || gui_find_bitmap(menu->name, buf, "xpm") == FAIL)
-     {
- 	if (menu->iconidx >= 0 && menu->iconidx
--		   < (sizeof(built_in_pixmaps) / sizeof(built_in_pixmaps[0])))
-+	       < (int)(sizeof(built_in_pixmaps) / sizeof(built_in_pixmaps[0])))
- 	    xpm = built_in_pixmaps[menu->iconidx];
- 	else
- 	    xpm = tb_blank_xpm;
-@@ -1716,10 +1711,9 @@
-     }
- }
- 
--/* ARGSUSED */
-     void
- gui_mch_show_popupmenu(menu)
--    vimmenu_T *menu;
-+    vimmenu_T *menu UNUSED;
- {
- #ifdef MOTIF_POPUP
-     XmMenuPosition(menu->submenu_id, gui_x11_get_last_mouse_event());
-@@ -2046,9 +2040,8 @@
- /*
-  * Callback routine for dialog mnemonic processing.
-  */
--/*ARGSUSED*/
-     static void
--mnemonic_event(Widget w, XtPointer call_data, XKeyEvent *event)
-+mnemonic_event(Widget w, XtPointer call_data UNUSED, XKeyEvent *event)
- {
-     do_mnemonic(w, event->keycode);
- }
-@@ -2287,13 +2280,12 @@
-  * Put up a file requester.
-  * Returns the selected name in allocated memory, or NULL for Cancel.
-  */
--/* ARGSUSED */
-     char_u *
- gui_mch_browse(saving, title, dflt, ext, initdir, filter)
--    int		saving;		/* select file to write */
-+    int		saving UNUSED;	/* select file to write */
-     char_u	*title;		/* title for the window */
-     char_u	*dflt;		/* default name */
--    char_u	*ext;		/* not used (extension added) */
-+    char_u	*ext UNUSED;	/* not used (extension added) */
-     char_u	*initdir;	/* initial directory, NULL for current dir */
-     char_u	*filter;	/* file name filter */
- {
-@@ -2413,12 +2405,11 @@
- /*
-  * Process callback from Dialog cancel actions.
-  */
--/* ARGSUSED */
-     static void
- DialogCancelCB(w, client_data, call_data)
--    Widget	w;		/*  widget id		*/
--    XtPointer	client_data;	/*  data from application   */
--    XtPointer	call_data;	/*  data from widget class  */
-+    Widget	w UNUSED;		/*  widget id		*/
-+    XtPointer	client_data UNUSED;	/*  data from application   */
-+    XtPointer	call_data UNUSED;	/*  data from widget class  */
- {
-     if (browse_fname != NULL)
-     {
-@@ -2431,12 +2422,11 @@
- /*
-  * Process callback from Dialog actions.
-  */
--/* ARGSUSED */
-     static void
- DialogAcceptCB(w, client_data, call_data)
--    Widget	w;		/*  widget id		*/
--    XtPointer	client_data;	/*  data from application   */
--    XtPointer	call_data;	/*  data from widget class  */
-+    Widget	w UNUSED;		/*  widget id		*/
-+    XtPointer	client_data UNUSED;	/*  data from application   */
-+    XtPointer	call_data;		/*  data from widget class  */
- {
-     XmFileSelectionBoxCallbackStruct *fcb;
- 
-@@ -2467,13 +2457,12 @@
-  * Callback function for the textfield.  When CR is hit this works like
-  * hitting the "OK" button, ESC like "Cancel".
-  */
--/* ARGSUSED */
-     static void
- keyhit_callback(w, client_data, event, cont)
-     Widget		w;
--    XtPointer		client_data;
-+    XtPointer		client_data UNUSED;
-     XEvent		*event;
--    Boolean		*cont;
-+    Boolean		*cont UNUSED;
- {
-     char	buf[2];
-     KeySym	key_sym;
-@@ -2490,12 +2479,11 @@
- 	XmTextFieldClearSelection(w, XtLastTimestampProcessed(gui.dpy));
- }
- 
--/* ARGSUSED */
-     static void
- butproc(w, client_data, call_data)
--    Widget	w;
-+    Widget	w UNUSED;
-     XtPointer	client_data;
--    XtPointer	call_data;
-+    XtPointer	call_data UNUSED;
- {
-     dialogStatus = (int)(long)client_data + 1;
- }
-@@ -2567,10 +2555,9 @@
- }
- #endif
- 
--/* ARGSUSED */
-     int
- gui_mch_dialog(type, title, message, button_names, dfltbutton, textfield)
--    int		type;
-+    int		type UNUSED;
-     char_u	*title;
-     char_u	*message;
-     char_u	*button_names;
-@@ -3197,7 +3184,7 @@
- 		XmNchildren, &children,
- 		XmNnumChildren, &numChildren, NULL);
- 	borders += tst + tmh;
--	for (i = 0; i < numChildren; i++)
-+	for (i = 0; i < (int)numChildren; i++)
- 	{
- 	    whgt = 0;
- 	    XtVaGetValues(children[i], XmNheight, &whgt, NULL);
-@@ -3237,13 +3224,12 @@
-  * I have to use footer help for backwards compatability.  Hopefully both will
-  * get implemented and the user will have a choice.
-  */
--/*ARGSUSED*/
-     static void
- toolbarbutton_enter_cb(w, client_data, event, cont)
--    Widget	w;
-+    Widget	w UNUSED;
-     XtPointer	client_data;
--    XEvent	*event;
--    Boolean	*cont;
-+    XEvent	*event UNUSED;
-+    Boolean	*cont UNUSED;
- {
-     vimmenu_T	*menu = (vimmenu_T *) client_data;
- 
-@@ -3254,13 +3240,12 @@
-     }
- }
- 
--/*ARGSUSED*/
-     static void
- toolbarbutton_leave_cb(w, client_data, event, cont)
--    Widget	w;
--    XtPointer	client_data;
--    XEvent	*event;
--    Boolean	*cont;
-+    Widget	w UNUSED;
-+    XtPointer	client_data UNUSED;
-+    XEvent	*event UNUSED;
-+    Boolean	*cont UNUSED;
- {
-     gui_mch_set_footer((char_u *) "");
- }
-@@ -3492,10 +3477,9 @@
- /*
-  * Set the fontlist for Widget "id" to use gui.menu_fontset or gui.menu_font.
-  */
--/*ARGSUSED*/
-     void
- gui_motif_menu_fontlist(id)
--    Widget  id;
-+    Widget  id UNUSED;
- {
- #ifdef FEAT_MENU
- #ifdef FONTSET_ALWAYS
-@@ -3566,8 +3550,8 @@
-     Widget cancel;
- } SharedFindReplace;
- 
--static SharedFindReplace find_widgets = { NULL };
--static SharedFindReplace repl_widgets = { NULL };
-+static SharedFindReplace find_widgets = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
-+static SharedFindReplace repl_widgets = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
- 
- static void find_replace_destroy_callback __ARGS((Widget w, XtPointer client_data, XtPointer call_data));
- static void find_replace_dismiss_callback __ARGS((Widget w, XtPointer client_data, XtPointer call_data));
-@@ -3576,12 +3560,11 @@
- static void find_replace_keypress __ARGS((Widget w, SharedFindReplace * frdp, XKeyEvent * event));
- static void find_replace_dialog_create __ARGS((char_u *entry_text, int do_replace));
- 
--/*ARGSUSED*/
-     static void
- find_replace_destroy_callback(w, client_data, call_data)
--    Widget	w;
-+    Widget	w UNUSED;
-     XtPointer	client_data;
--    XtPointer	call_data;
-+    XtPointer	call_data UNUSED;
- {
-     SharedFindReplace *cd = (SharedFindReplace *)client_data;
- 
-@@ -3590,12 +3573,11 @@
- 	cd->dialog = (Widget)0;
- }
- 
--/*ARGSUSED*/
-     static void
- find_replace_dismiss_callback(w, client_data, call_data)
--    Widget	w;
-+    Widget	w UNUSED;
-     XtPointer	client_data;
--    XtPointer	call_data;
-+    XtPointer	call_data UNUSED;
- {
-     SharedFindReplace *cd = (SharedFindReplace *)client_data;
- 
-@@ -3603,22 +3585,20 @@
- 	XtUnmanageChild(cd->dialog);
- }
- 
--/*ARGSUSED*/
-     static void
- entry_activate_callback(w, client_data, call_data)
--    Widget	w;
-+    Widget	w UNUSED;
-     XtPointer	client_data;
--    XtPointer	call_data;
-+    XtPointer	call_data UNUSED;
- {
-     XmProcessTraversal((Widget)client_data, XmTRAVERSE_CURRENT);
- }
- 
--/*ARGSUSED*/
-     static void
- find_replace_callback(w, client_data, call_data)
--    Widget	w;
-+    Widget	w UNUSED;
-     XtPointer	client_data;
--    XtPointer	call_data;
-+    XtPointer	call_data UNUSED;
- {
-     long_u	flags = (long_u)client_data;
-     char	*find_text, *repl_text;
-@@ -3668,10 +3648,9 @@
- 	XtFree(repl_text);
- }
- 
--/*ARGSUSED*/
-     static void
- find_replace_keypress(w, frdp, event)
--    Widget		w;
-+    Widget		w UNUSED;
-     SharedFindReplace	*frdp;
-     XKeyEvent		*event;
- {
-diff -Naur vim72.orig/src/gui_x11.c vim72/src/gui_x11.c
---- vim72.orig/src/gui_x11.c	2008-06-08 08:13:45.000000000 -0700
-+++ vim72/src/gui_x11.c	2009-07-19 15:16:46.000000000 -0700
-@@ -570,22 +570,20 @@
-  * Call-back routines.
-  */
- 
--/* ARGSUSED */
-     static void
- gui_x11_timer_cb(timed_out, interval_id)
-     XtPointer	    timed_out;
--    XtIntervalId    *interval_id;
-+    XtIntervalId    *interval_id UNUSED;
- {
-     *((int *)timed_out) = TRUE;
- }
- 
--/* ARGSUSED */
-     static void
- gui_x11_visibility_cb(w, dud, event, dum)
--    Widget	w;
--    XtPointer	dud;
-+    Widget	w UNUSED;
-+    XtPointer	dud UNUSED;
-     XEvent	*event;
--    Boolean	*dum;
-+    Boolean	*dum UNUSED;
- {
-     if (event->type != VisibilityNotify)
- 	return;
-@@ -603,13 +601,12 @@
-     gui_mch_update();
- }
- 
--/* ARGSUSED */
-     static void
- gui_x11_expose_cb(w, dud, event, dum)
--    Widget	w;
--    XtPointer	dud;
-+    Widget	w UNUSED;
-+    XtPointer	dud UNUSED;
-     XEvent	*event;
--    Boolean	*dum;
-+    Boolean	*dum UNUSED;
- {
-     XExposeEvent	*gevent;
-     int			new_x;
-@@ -680,13 +677,12 @@
- }
- #endif
- 
--/* ARGSUSED */
-     static void
- gui_x11_resize_window_cb(w, dud, event, dum)
--    Widget	w;
--    XtPointer	dud;
-+    Widget	w UNUSED;
-+    XtPointer	dud UNUSED;
-     XEvent	*event;
--    Boolean	*dum;
-+    Boolean	*dum UNUSED;
- {
-     static int lastWidth, lastHeight;
- 
-@@ -727,35 +723,32 @@
- #endif
- }
- 
--/* ARGSUSED */
-     static void
- gui_x11_focus_change_cb(w, data, event, dum)
--    Widget	w;
--    XtPointer	data;
-+    Widget	w UNUSED;
-+    XtPointer	data UNUSED;
-     XEvent	*event;
--    Boolean	*dum;
-+    Boolean	*dum UNUSED;
- {
-     gui_focus_change(event->type == FocusIn);
- }
- 
--/* ARGSUSED */
-     static void
- gui_x11_enter_cb(w, data, event, dum)
--    Widget	w;
--    XtPointer	data;
--    XEvent	*event;
--    Boolean	*dum;
-+    Widget	w UNUSED;
-+    XtPointer	data UNUSED;
-+    XEvent	*event UNUSED;
-+    Boolean	*dum UNUSED;
- {
-     gui_focus_change(TRUE);
- }
- 
--/* ARGSUSED */
-     static void
- gui_x11_leave_cb(w, data, event, dum)
--    Widget	w;
--    XtPointer	data;
--    XEvent	*event;
--    Boolean	*dum;
-+    Widget	w UNUSED;
-+    XtPointer	data UNUSED;
-+    XEvent	*event UNUSED;
-+    Boolean	*dum UNUSED;
- {
-     gui_focus_change(FALSE);
- }
-@@ -766,13 +759,12 @@
- # endif
- #endif
- 
--/* ARGSUSED */
-     void
- gui_x11_key_hit_cb(w, dud, event, dum)
--    Widget	w;
--    XtPointer	dud;
-+    Widget	w UNUSED;
-+    XtPointer	dud UNUSED;
-     XEvent	*event;
--    Boolean	*dum;
-+    Boolean	*dum UNUSED;
- {
-     XKeyPressedEvent	*ev_press;
- #ifdef FEAT_XIM
-@@ -1078,13 +1070,12 @@
- #endif
- }
- 
--/* ARGSUSED */
-     static void
- gui_x11_mouse_cb(w, dud, event, dum)
--    Widget	w;
--    XtPointer	dud;
-+    Widget	w UNUSED;
-+    XtPointer	dud UNUSED;
-     XEvent	*event;
--    Boolean	*dum;
-+    Boolean	*dum UNUSED;
- {
-     static XtIntervalId timer = (XtIntervalId)0;
-     static int	timed_out = TRUE;
-@@ -1210,11 +1201,11 @@
-     while (arg < *argc)
-     {
- 	/* Look for argv[arg] in cmdline_options[] table */
--	for (i = 0; i < XtNumber(cmdline_options); i++)
-+	for (i = 0; i < (int)XtNumber(cmdline_options); i++)
- 	    if (strcmp(argv[arg], cmdline_options[i].option) == 0)
- 		break;
- 
--	if (i < XtNumber(cmdline_options))
-+	if (i < (int)XtNumber(cmdline_options))
- 	{
- 	    /* Remember finding "-rv" or "-reverse" */
- 	    if (strcmp("-rv", argv[arg]) == 0
-@@ -1319,12 +1310,11 @@
- 
- static void local_xsmp_handle_requests __ARGS((XtPointer c, int *s, XtInputId *i));
- 
--/*ARGSUSED*/
-     static void
- local_xsmp_handle_requests(c, s, i)
--    XtPointer	c;
--    int		*s;
--    XtInputId	*i;
-+    XtPointer	c UNUSED;
-+    int		*s UNUSED;
-+    XtInputId	*i UNUSED;
- {
-     if (xsmp_handle_requests() == FAIL)
- 	XtRemoveInput(_xsmp_xtinputid);
-@@ -1438,7 +1428,7 @@
- 	    Columns = w;
- 	if (mask & HeightValue)
- 	{
--	    if (p_window > h - 1 || !option_was_set((char_u *)"window"))
-+	    if (p_window > (long)h - 1 || !option_was_set((char_u *)"window"))
- 		p_window = h - 1;
- 	    Rows = h;
- 	}
-@@ -1587,6 +1577,8 @@
-     XtCloseDisplay(gui.dpy);
-     gui.dpy = NULL;
-     vimShell = (Widget)0;
-+    vim_free(gui_argv);
-+    gui_argv = NULL;
- }
- 
- /*
-@@ -1751,16 +1743,17 @@
- }
- #endif
- 
--/*ARGSUSED*/
-     void
- gui_mch_exit(rc)
--    int		rc;
-+    int		rc UNUSED;
- {
- #if 0
-     /* Lesstif gives an error message here, and so does Solaris.  The man page
-      * says that this isn't needed when exiting, so just skip it. */
-     XtCloseDisplay(gui.dpy);
- #endif
-+    vim_free(gui_argv);
-+    gui_argv = NULL;
- }
- 
- /*
-@@ -1795,7 +1788,6 @@
- 	NULL);
- }
- 
--/*ARGSUSED*/
-     void
- gui_mch_set_shellsize(width, height, min_width, min_height,
- 		    base_width, base_height, direction)
-@@ -1805,7 +1797,7 @@
-     int		min_height;
-     int		base_width;
-     int		base_height;
--    int		direction;
-+    int		direction UNUSED;
- {
- #ifdef FEAT_XIM
-     height += xim_get_status_area_height(),
-@@ -1843,11 +1835,10 @@
-  * If "fontset" is TRUE, load the "font_name" as a fontset.
-  * Return FAIL if the font could not be loaded, OK otherwise.
-  */
--/*ARGSUSED*/
-     int
- gui_mch_init_font(font_name, do_fontset)
-     char_u	*font_name;
--    int		do_fontset;
-+    int		do_fontset UNUSED;
- {
-     XFontStruct	*font = NULL;
- 
-@@ -2025,10 +2016,9 @@
-  * Return the name of font "font" in allocated memory.
-  * Don't know how to get the actual name, thus use the provided name.
-  */
--/*ARGSUSED*/
-     char_u *
- gui_mch_get_fontname(font, name)
--    GuiFont font;
-+    GuiFont font UNUSED;
-     char_u  *name;
- {
-     if (name == NULL)
-@@ -2450,7 +2440,7 @@
- 	*colorPtr = colortable[closest];
-     }
- 
--    free(colortable);
-+    vim_free(colortable);
-     return OK;
- }
- 
-@@ -2517,7 +2507,7 @@
- {
-     int			i;
-     int			offset;
--    const static int	val[8] = {1, 0, 0, 0, 1, 2, 2, 2 };
-+    static const int	val[8] = {1, 0, 0, 0, 1, 2, 2, 2 };
- 
-     XSetForeground(gui.dpy, gui.text_gc, prev_sp_color);
-     for (i = FILL_X(col); i < FILL_X(col + cells); ++i)
-@@ -2565,8 +2555,10 @@
- # ifdef FEAT_XFONTSET
- 	    if (current_fontset != NULL)
- 	    {
--		if (c >= 0x10000 && sizeof(wchar_t) <= 2)
-+#  ifdef SMALL_WCHAR_T
-+		if (c >= 0x10000)
- 		    c = 0xbf;		/* show chars > 0xffff as ? */
-+#  endif
- 		((wchar_t *)buf)[wlen] = c;
- 	    }
- 	    else
-@@ -3132,11 +3124,11 @@
-     /* Nothing to do in X */
- }
- 
--/* ARGSUSED */
-     void
- gui_x11_menu_cb(w, client_data, call_data)
--    Widget	w;
--    XtPointer	client_data, call_data;
-+    Widget	w UNUSED;
-+    XtPointer	client_data;
-+    XtPointer	call_data UNUSED;
- {
-     gui_menu_cb((vimmenu_T *)client_data);
- }
-@@ -3149,13 +3141,12 @@
-  * Function called when window closed.	Works like ":qa".
-  * Should put up a requester!
-  */
--/*ARGSUSED*/
-     static void
- gui_x11_wm_protocol_handler(w, client_data, event, dum)
--    Widget	w;
--    XtPointer	client_data;
-+    Widget	w UNUSED;
-+    XtPointer	client_data UNUSED;
-     XEvent	*event;
--    Boolean	*dum;
-+    Boolean	*dum UNUSED;
- {
-     /*
-      * Only deal with Client messages.
-@@ -3168,7 +3159,7 @@
-      * exit.  That can be cancelled though, thus Vim shouldn't exit here.
-      * Just sync our swap files.
-      */
--    if (((XClientMessageEvent *)event)->data.l[0] ==
-+    if ((Atom)((XClientMessageEvent *)event)->data.l[0] ==
- 						  wm_atoms[SAVE_YOURSELF_IDX])
-     {
- 	out_flush();
-@@ -3181,7 +3172,7 @@
- 	return;
-     }
- 
--    if (((XClientMessageEvent *)event)->data.l[0] !=
-+    if ((Atom)((XClientMessageEvent *)event)->data.l[0] !=
- 						  wm_atoms[DELETE_WINDOW_IDX])
- 	return;
- 
-@@ -3192,13 +3183,12 @@
- /*
-  * Function called when property changed. Check for incoming commands
-  */
--/*ARGSUSED*/
-     static void
- gui_x11_send_event_handler(w, client_data, event, dum)
--    Widget	w;
--    XtPointer	client_data;
-+    Widget	w UNUSED;
-+    XtPointer	client_data UNUSED;
-     XEvent	*event;
--    Boolean	*dum;
-+    Boolean	*dum UNUSED;
- {
-     XPropertyEvent *e = (XPropertyEvent *) event;
- 
-@@ -3273,11 +3263,10 @@
-     }
- }
- 
--/* ARGSUSED */
-     static void
- gui_x11_blink_cb(timed_out, interval_id)
--    XtPointer	    timed_out;
--    XtIntervalId    *interval_id;
-+    XtPointer	    timed_out UNUSED;
-+    XtIntervalId    *interval_id UNUSED;
- {
-     if (blink_state == BLINK_ON)
-     {
-@@ -3439,47 +3428,37 @@
-     char_u	    *signfile;
- {
-     XpmAttributes   attrs;
--    XImage	    *sign;
-+    XImage	    *sign = NULL;
-     int		    status;
- 
-     /*
-      * Setup the color substitution table.
-      */
--    sign = NULL;
-     if (signfile[0] != NUL && signfile[0] != '-')
-     {
--	sign = (XImage *)alloc(sizeof(XImage));
--	if (sign != NULL)
-+	XpmColorSymbol color[5] =
- 	{
--	    XpmColorSymbol color[5] =
--	    {
--		{"none", NULL, 0},
--		{"iconColor1", NULL, 0},
--		{"bottomShadowColor", NULL, 0},
--		{"topShadowColor", NULL, 0},
--		{"selectColor", NULL, 0}
--	    };
--	    attrs.valuemask = XpmColorSymbols;
--	    attrs.numsymbols = 2;
--	    attrs.colorsymbols = color;
--	    attrs.colorsymbols[0].pixel = gui.back_pixel;
--	    attrs.colorsymbols[1].pixel = gui.norm_pixel;
--	    status = XpmReadFileToImage(gui.dpy, (char *)signfile,
-+	    {"none", NULL, 0},
-+	    {"iconColor1", NULL, 0},
-+	    {"bottomShadowColor", NULL, 0},
-+	    {"topShadowColor", NULL, 0},
-+	    {"selectColor", NULL, 0}
-+	};
-+	attrs.valuemask = XpmColorSymbols;
-+	attrs.numsymbols = 2;
-+	attrs.colorsymbols = color;
-+	attrs.colorsymbols[0].pixel = gui.back_pixel;
-+	attrs.colorsymbols[1].pixel = gui.norm_pixel;
-+	status = XpmReadFileToImage(gui.dpy, (char *)signfile,
- 							 &sign, NULL, &attrs);
--
--	    if (status == 0)
--	    {
--		/* Sign width is fixed at two columns now.
--		if (sign->width > gui.sign_width)
--		    gui.sign_width = sign->width + 8; */
--	    }
--	    else
--	    {
--		vim_free(sign);
--		sign = NULL;
--		EMSG(_(e_signdata));
--	    }
-+	if (status == 0)
-+	{
-+	    /* Sign width is fixed at two columns now.
-+	    if (sign->width > gui.sign_width)
-+	        gui.sign_width = sign->width + 8; */
- 	}
-+	else
-+	    EMSG(_(e_signdata));
-     }
- 
-     return (void *)sign;
-@@ -3489,8 +3468,7 @@
- gui_mch_destroy_sign(sign)
-     void *sign;
- {
--    XFree(((XImage *)sign)->data);
--    vim_free(sign);
-+    XDestroyImage((XImage*)sign);
- }
- #endif
- 
-diff -Naur vim72.orig/src/gui_xmdlg.c vim72/src/gui_xmdlg.c
---- vim72.orig/src/gui_xmdlg.c	2008-06-21 09:05:32.000000000 -0700
-+++ vim72/src/gui_xmdlg.c	2009-07-19 15:16:46.000000000 -0700
-@@ -369,10 +369,10 @@
-     char	buf[TEMP_BUF_SIZE];
-     XmString	items[MAX_ENTRIES_IN_LIST];
-     int		i;
--    int		index;
-+    int		idx;
- 
--    for (index = (int)ENCODING; index < (int)NONE; ++index)
--	count[index] = 0;
-+    for (idx = (int)ENCODING; idx < (int)NONE; ++idx)
-+	count[idx] = 0;
- 
-     /* First we insert the wild char into every single list. */
-     if (fix != ENCODING)
-@@ -448,7 +448,7 @@
- 
- 	    items[i] = XmStringCreateLocalized(list[ENCODING][i]);
- 
--	    if (i < n_items)
-+	    if (i < (int)n_items)
- 	    {
- 		/* recycle old button */
- 		XtVaSetValues(children[i],
-@@ -481,7 +481,7 @@
- 
- 	/* Destroy all the outstanding menu items.
- 	 */
--	for (i = count[ENCODING]; i < n_items; ++i)
-+	for (i = count[ENCODING]; i < (int)n_items; ++i)
- 	{
- 	    XtUnmanageChild(children[i]);
- 	    XtDestroyWidget(children[i]);
-@@ -503,14 +503,14 @@
-     /*
-      * Now loop trough the remaining lists and set them up.
-      */
--    for (index = (int)NAME; index < (int)NONE; ++index)
-+    for (idx = (int)NAME; idx < (int)NONE; ++idx)
-     {
- 	Widget w;
- 
--	if (fix == (enum ListSpecifier)index)
-+	if (fix == (enum ListSpecifier)idx)
- 	    continue;
- 
--	switch ((enum ListSpecifier)index)
-+	switch ((enum ListSpecifier)idx)
- 	{
- 	    case NAME:
- 		w = data->list[NAME];
-@@ -525,28 +525,27 @@
- 		w = (Widget)0;	/* for lint */
- 	}
- 
--	for (i = 0; i < count[index]; ++i)
-+	for (i = 0; i < count[idx]; ++i)
- 	{
--	    items[i] = XmStringCreateLocalized(list[index][i]);
--	    XtFree(list[index][i]);
-+	    items[i] = XmStringCreateLocalized(list[idx][i]);
-+	    XtFree(list[idx][i]);
- 	}
- 	XmListDeleteAllItems(w);
--	XmListAddItems(w, items, count[index], 1);
--	if (data->sel[index])
-+	XmListAddItems(w, items, count[idx], 1);
-+	if (data->sel[idx])
- 	{
- 	    XmStringFree(items[0]);
--	    items[0] = XmStringCreateLocalized(data->sel[index]);
-+	    items[0] = XmStringCreateLocalized(data->sel[idx]);
- 	    XmListSelectItem(w, items[0], False);
- 	    XmListSetBottomItem(w, items[0]);
- 	}
--	for (i = 0; i < count[index]; ++i)
-+	for (i = 0; i < count[idx]; ++i)
- 	    XmStringFree(items[i]);
-     }
- }
- 
--/*ARGSUSED*/
-     static void
--stoggle_callback(Widget w,
-+stoggle_callback(Widget w UNUSED,
- 	SharedFontSelData *data,
- 	XmToggleButtonCallbackStruct *call_data)
- {
-@@ -695,25 +694,24 @@
- 	int	    n;
- 	XmString    str;
- 	Arg	    args[4];
--	char	    *msg = _("no specific match");
-+	char	    *nomatch_msg = _("no specific match");
- 
- 	n = 0;
--	str = XmStringCreateLocalized(msg);
-+	str = XmStringCreateLocalized(nomatch_msg);
- 	XtSetArg(args[n], XmNlabelString, str); ++n;
- 	XtSetValues(data->sample, args, n);
- 	apply_fontlist(data->sample);
--	XmTextSetString(data->name, msg);
-+	XmTextSetString(data->name, nomatch_msg);
- 	XmStringFree(str);
- 
- 	return False;
-     }
- }
- 
--/*ARGSUSED*/
-     static void
- encoding_callback(Widget w,
- 	SharedFontSelData *data,
--	XtPointer dummy)
-+	XtPointer dummy UNUSED)
- {
-     XmString str;
-     XmListCallbackStruct fake_data;
-@@ -752,11 +750,10 @@
-     do_choice(w, data, call_data, SIZE);
- }
- 
--/*ARGSUSED*/
-     static void
--cancel_callback(Widget w,
-+cancel_callback(Widget w UNUSED,
- 	SharedFontSelData *data,
--	XmListCallbackStruct *call_data)
-+	XmListCallbackStruct *call_data UNUSED)
- {
-     if (data->sel[ENCODING])
-     {
-@@ -789,11 +786,10 @@
-     data->exit = True;
- }
- 
--/*ARGSUSED*/
-     static void
--ok_callback(Widget w,
-+ok_callback(Widget w UNUSED,
- 	SharedFontSelData *data,
--	XmPushButtonCallbackStruct *call_data)
-+	XmPushButtonCallbackStruct *call_data UNUSED)
- {
-     char    *pattern;
-     char    **name;
-@@ -886,21 +882,21 @@
-     {
- 	int	i;
- 	int	max;
--	int	index = 0;
-+	int	idx = 0;
- 	int	size;
--	char	str[128];
-+	char	buf[128];
- 
- 	for (i = 0, max = 0; i < data->num; i++)
- 	{
--	    get_part(fn(data, i), 7, str);
--	    size = atoi(str);
-+	    get_part(fn(data, i), 7, buf);
-+	    size = atoi(buf);
- 	    if ((size > max) && (size < MAX_DISPLAY_SIZE))
- 	    {
--		index = i;
-+		idx = i;
- 		max = size;
- 	    }
- 	}
--	strcpy(big_font, fn(data, index));
-+	strcpy(big_font, fn(data, idx));
-     }
-     data->old = XLoadQueryFont(XtDisplay(parent), big_font);
-     data->old_list = gui_motif_create_fontlist(data->old);
-@@ -1217,28 +1213,28 @@
- 
- 	if (i != 0)
- 	{
--	    char name[TEMP_BUF_SIZE];
--	    char style[TEMP_BUF_SIZE];
--	    char size[TEMP_BUF_SIZE];
--	    char encoding[TEMP_BUF_SIZE];
-+	    char namebuf[TEMP_BUF_SIZE];
-+	    char stylebuf[TEMP_BUF_SIZE];
-+	    char sizebuf[TEMP_BUF_SIZE];
-+	    char encodingbuf[TEMP_BUF_SIZE];
- 	    char *found;
- 
- 	    found = names[0];
- 
--	    name_part(found, name);
--	    style_part(found, style);
--	    size_part(found, size, data->in_pixels);
--	    encoding_part(found, encoding);
--
--	    if (strlen(name) > 0
--		    && strlen(style) > 0
--		    && strlen(size) > 0
--		    && strlen(encoding) > 0)
-+	    name_part(found, namebuf);
-+	    style_part(found, stylebuf);
-+	    size_part(found, sizebuf, data->in_pixels);
-+	    encoding_part(found, encodingbuf);
-+
-+	    if (strlen(namebuf) > 0
-+		    && strlen(stylebuf) > 0
-+		    && strlen(sizebuf) > 0
-+		    && strlen(encodingbuf) > 0)
- 	    {
--		data->sel[NAME] = XtNewString(name);
--		data->sel[STYLE] = XtNewString(style);
--		data->sel[SIZE] = XtNewString(size);
--		data->sel[ENCODING] = XtNewString(encoding);
-+		data->sel[NAME] = XtNewString(namebuf);
-+		data->sel[STYLE] = XtNewString(stylebuf);
-+		data->sel[SIZE] = XtNewString(sizebuf);
-+		data->sel[ENCODING] = XtNewString(encodingbuf);
- 		data->font_name = XtNewString(names[0]);
- 		display_sample(data);
- 		XmTextSetString(data->name, data->font_name);
-diff -Naur vim72.orig/src/gui_xmebw.c vim72/src/gui_xmebw.c
---- vim72.orig/src/gui_xmebw.c	2007-09-06 03:57:51.000000000 -0700
-+++ vim72/src/gui_xmebw.c	2009-07-19 15:16:46.000000000 -0700
-@@ -235,13 +235,12 @@
-     return tmp;
- }
- 
--/*ARGSUSED*/
-     static int
- alloc_color(Display	*display,
- 	Colormap	colormap,
- 	char		*colorname,
- 	XColor		*xcolor,
--	void		*closure)
-+	void		*closure UNUSED)
- {
-     int status;
- 
-@@ -595,9 +594,10 @@
- 		       XtHeight(eb), eb->primitive.highlight_thickness);
- }
- 
--/*ARGSUSED*/
-     static void
--draw_pixmap(XmEnhancedButtonWidget eb, XEvent *event, Region region)
-+draw_pixmap(XmEnhancedButtonWidget eb,
-+	    XEvent *event UNUSED,
-+	    Region region UNUSED)
- {
-     Pixmap	pix;
-     GC		gc = eb->label.normal_GC;
-@@ -641,7 +641,7 @@
-     height = eb->core.height - 2 * y;
-     if (h < height)
- 	height = h;
--    if (depth == eb->core.depth)
-+    if (depth == (int)eb->core.depth)
- 	XCopyArea(XtDisplay(eb), pix, XtWindow(eb), gc, 0, 0,
- 		width, height, x, y);
-     else if (depth == 1)
-@@ -731,9 +731,11 @@
- 	eb->label.normal_GC = tmp_gc;
- }
- 
--/*ARGSUSED*/
-     static void
--Enter(Widget wid, XEvent *event, String *params, Cardinal *num_params)
-+Enter(Widget wid,
-+      XEvent *event,
-+      String *params UNUSED,
-+      Cardinal *num_params UNUSED)
- {
-     XmEnhancedButtonWidget eb = (XmEnhancedButtonWidget) wid;
-     XmPushButtonCallbackStruct call_value;
-@@ -818,9 +820,11 @@
-     }
- }
- 
--/*ARGSUSED*/
-     static void
--Leave(Widget wid, XEvent *event, String *params, Cardinal *num_params)
-+Leave(Widget wid,
-+      XEvent *event,
-+      String *params UNUSED,
-+      Cardinal *num_params UNUSED)
- {
-     XmEnhancedButtonWidget eb = (XmEnhancedButtonWidget)wid;
-     XmPushButtonCallbackStruct call_value;
-@@ -976,9 +980,8 @@
-     }
- }
- 
--/*ARGSUSED*/
-     static void
--Initialize(Widget rq, Widget ebw, ArgList args, Cardinal *n)
-+Initialize(Widget rq, Widget ebw, ArgList args UNUSED, Cardinal *n UNUSED)
- {
-     XmEnhancedButtonWidget  request = (XmEnhancedButtonWidget)rq;
-     XmEnhancedButtonWidget  eb = (XmEnhancedButtonWidget)ebw;
-@@ -1056,9 +1059,12 @@
-     free_pixmaps((XmEnhancedButtonWidget)w);
- }
- 
--/*ARGSUSED*/
-     static Boolean
--SetValues(Widget current, Widget request, Widget new, ArgList args, Cardinal *n)
-+SetValues(Widget current,
-+	  Widget request UNUSED,
-+	  Widget new,
-+	  ArgList args UNUSED,
-+	  Cardinal *n UNUSED)
- {
-     XmEnhancedButtonWidget  cur = (XmEnhancedButtonWidget) current;
-     XmEnhancedButtonWidget  eb = (XmEnhancedButtonWidget) new;
-@@ -1108,7 +1114,7 @@
- 		if ((win_x < 0) || (win_y < 0))
- 		    return False;
- 
--		if ((win_x > r_width) || (win_y > r_height))
-+		if ((win_x > (int)r_width) || (win_y > (int)r_height))
- 		    return False;
- 		draw_highlight(eb);
- 		draw_shadows(eb);
-@@ -1256,7 +1262,7 @@
-     }
-     else
-     {
--	int adjust = 0;
-+	adjust = 0;
- 
- #if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
- 	/*
-@@ -1268,12 +1274,11 @@
- 	{
- 	    case XmEXTERNAL_HIGHLIGHT:
- 		adjust = (eb->primitive.highlight_thickness -
--			(eb->pushbutton.default_button_shadow_thickness ?
--			 Xm3D_ENHANCE_PIXEL : 0));
-+			 (eb->pushbutton.default_button_shadow_thickness
-+			  ?  Xm3D_ENHANCE_PIXEL : 0));
- 		break;
- 
- 	    case XmINTERNAL_HIGHLIGHT:
--		adjust = 0;
- 		break;
- 
- 	    default:
-diff -Naur vim72.orig/src/hardcopy.c vim72/src/hardcopy.c
---- vim72.orig/src/hardcopy.c	2008-01-11 12:46:20.000000000 -0800
-+++ vim72/src/hardcopy.c	2009-07-19 15:16:23.000000000 -0700
-@@ -442,12 +442,11 @@
- /*
-  * Print the page header.
-  */
--/*ARGSUSED*/
-     static void
- prt_header(psettings, pagenum, lnum)
-     prt_settings_T  *psettings;
-     int		pagenum;
--    linenr_T	lnum;
-+    linenr_T	lnum UNUSED;
- {
-     int		width = psettings->chars_per_line;
-     int		page_line;
-@@ -1881,7 +1880,7 @@
- 	return FALSE;
- 
-     /* Find type of DSC comment */
--    for (comment = 0; comment < NUM_ELEMENTS(prt_dsc_table); comment++)
-+    for (comment = 0; comment < (int)NUM_ELEMENTS(prt_dsc_table); comment++)
- 	if (prt_resfile_strncmp(0, prt_dsc_table[comment].string,
- 					    prt_dsc_table[comment].len) == 0)
- 	    break;
-@@ -2454,12 +2453,11 @@
- }
- #endif
- 
--/*ARGSUSED*/
-     int
- mch_print_init(psettings, jobname, forceit)
-     prt_settings_T *psettings;
-     char_u	*jobname;
--    int		forceit;
-+    int		forceit UNUSED;
- {
-     int		i;
-     char	*paper_name;
-@@ -2514,7 +2512,7 @@
-     if (!(props & ENC_8BIT) && ((*p_pmcs != NUL) || !(props & ENC_UNICODE)))
-     {
- 	p_mbenc_first = NULL;
--	for (cmap = 0; cmap < NUM_ELEMENTS(prt_ps_mbfonts); cmap++)
-+	for (cmap = 0; cmap < (int)NUM_ELEMENTS(prt_ps_mbfonts); cmap++)
- 	    if (prt_match_encoding((char *)p_encoding, &prt_ps_mbfonts[cmap],
- 								    &p_mbenc))
- 	    {
-@@ -2642,7 +2640,7 @@
- 	paper_name = "A4";
- 	paper_strlen = 2;
-     }
--    for (i = 0; i < PRT_MEDIASIZE_LEN; ++i)
-+    for (i = 0; i < (int)PRT_MEDIASIZE_LEN; ++i)
- 	if (STRLEN(prt_mediasize[i].name) == (unsigned)paper_strlen
- 		&& STRNICMP(prt_mediasize[i].name, paper_name,
- 							   paper_strlen) == 0)
-@@ -3308,10 +3306,9 @@
-     return !prt_file_error;
- }
- 
--/*ARGSUSED*/
-     int
- mch_print_begin_page(str)
--    char_u	*str;
-+    char_u	*str UNUSED;
- {
-     int		page_num[2];
- 
-@@ -3379,11 +3376,10 @@
- #endif
- }
- 
--/*ARGSUSED*/
-     int
- mch_print_text_out(p, len)
-     char_u	*p;
--    int		len;
-+    int		len UNUSED;
- {
-     int		need_break;
-     char_u	ch;
-diff -Naur vim72.orig/src/if_cscope.c vim72/src/if_cscope.c
---- vim72.orig/src/if_cscope.c	2008-06-24 09:32:34.000000000 -0700
-+++ vim72/src/if_cscope.c	2009-07-19 15:18:44.000000000 -0700
-@@ -46,7 +46,6 @@
- static int	    cs_find __ARGS((exarg_T *eap));
- static int	    cs_find_common __ARGS((char *opt, char *pat, int, int, int));
- static int	    cs_help __ARGS((exarg_T *eap));
--static void	    cs_init __ARGS((void));
- static void	    clear_csinfo __ARGS((int i));
- static int	    cs_insert_filelist __ARGS((char *, char *, char *,
- 			struct stat *));
-@@ -66,7 +65,10 @@
- static int	    cs_show __ARGS((exarg_T *eap));
- 
- 
--static csinfo_T	    csinfo[CSCOPE_MAX_CONNECTIONS];
-+static csinfo_T *   csinfo = NULL;
-+static int	    csinfo_size = 0;	/* number of items allocated in
-+					   csinfo[] */
-+
- static int	    eap_arg_len;    /* length of eap->arg, set in
- 				       cs_lookup_cmd() */
- static cscmd_T	    cs_cmds[] =
-@@ -74,7 +76,7 @@
-     { "add",	cs_add,
- 		N_("Add a new database"),     "add file|dir [pre-path] [flags]", 0 },
-     { "find",	cs_find,
--		N_("Query for a pattern"),    FIND_USAGE, 1 },
-+		N_("Query for a pattern"),    "find c|d|e|f|g|i|s|t name", 1 },
-     { "help",	cs_help,
- 		N_("Show this message"),      "help", 0 },
-     { "kill",	cs_kill,
-@@ -83,7 +85,7 @@
- 		N_("Reinit all connections"), "reset", 0 },
-     { "show",	cs_show,
- 		N_("Show connections"),       "show", 0 },
--    { NULL }
-+    { NULL, NULL, NULL, NULL, 0 }
- };
- 
-     static void
-@@ -93,12 +95,125 @@
-     (void)EMSG2(_("E560: Usage: cs[cope] %s"), cs_cmds[(int)x].usage);
- }
- 
-+#if defined(FEAT_CMDL_COMPL) || defined(PROTO)
-+
-+static enum
-+{
-+    EXP_CSCOPE_SUBCMD,	/* expand ":cscope" sub-commands */
-+    EXP_SCSCOPE_SUBCMD,	/* expand ":scscope" sub-commands */
-+    EXP_CSCOPE_FIND,	/* expand ":cscope find" arguments */
-+    EXP_CSCOPE_KILL	/* expand ":cscope kill" arguments */
-+} expand_what;
-+
-+/*
-+ * Function given to ExpandGeneric() to obtain the cscope command
-+ * expansion.
-+ */
-+    char_u *
-+get_cscope_name(xp, idx)
-+    expand_T	*xp UNUSED;
-+    int		idx;
-+{
-+    int		current_idx;
-+    int		i;
-+
-+    switch (expand_what)
-+    {
-+    case EXP_CSCOPE_SUBCMD:
-+	/* Complete with sub-commands of ":cscope":
-+	 * add, find, help, kill, reset, show */
-+	return (char_u *)cs_cmds[idx].name;
-+    case EXP_SCSCOPE_SUBCMD:
-+	/* Complete with sub-commands of ":scscope": same sub-commands as
-+	 * ":cscope" but skip commands which don't support split windows */
-+	for (i = 0, current_idx = 0; cs_cmds[i].name != NULL; i++)
-+	    if (cs_cmds[i].cansplit)
-+		if (current_idx++ == idx)
-+		    break;
-+	return (char_u *)cs_cmds[i].name;
-+    case EXP_CSCOPE_FIND:
-+	{
-+	    const char *query_type[] =
-+	    {
-+		"c", "d", "e", "f", "g", "i", "s", "t", NULL
-+	    };
-+
-+	    /* Complete with query type of ":cscope find {query_type}".
-+	     * {query_type} can be letters (c, d, ... t) or numbers (0, 1,
-+	     * ..., 8) but only complete with letters, since numbers are
-+	     * redundant. */
-+	    return (char_u *)query_type[idx];
-+	}
-+    case EXP_CSCOPE_KILL:
-+	{
-+	    static char	connection[5];
-+
-+	    /* ":cscope kill" accepts connection numbers or partial names of
-+	     * the pathname of the cscope database as argument.  Only complete
-+	     * with connection numbers. -1 can also be used to kill all
-+	     * connections. */
-+	    for (i = 0, current_idx = 0; i < csinfo_size; i++)
-+	    {
-+		if (csinfo[i].fname == NULL)
-+		    continue;
-+		if (current_idx++ == idx)
-+		{
-+		    vim_snprintf(connection, sizeof(connection), "%d", i);
-+		    return (char_u *)connection;
-+		}
-+	    }
-+	    return (current_idx == idx && idx > 0) ? (char_u *)"-1" : NULL;
-+	}
-+    default:
-+	return NULL;
-+    }
-+}
-+
-+/*
-+ * Handle command line completion for :cscope command.
-+ */
-+    void
-+set_context_in_cscope_cmd(xp, arg, cmdidx)
-+    expand_T	*xp;
-+    char_u	*arg;
-+    cmdidx_T	cmdidx;
-+{
-+    char_u	*p;
-+
-+    /* Default: expand subcommands */
-+    xp->xp_context = EXPAND_CSCOPE;
-+    xp->xp_pattern = arg;
-+    expand_what = (cmdidx == CMD_scscope)
-+			? EXP_SCSCOPE_SUBCMD : EXP_CSCOPE_SUBCMD;
-+
-+    /* (part of) subcommand already typed */
-+    if (*arg != NUL)
-+    {
-+	p = skiptowhite(arg);
-+	if (*p != NUL)		    /* past first word */
-+	{
-+	    xp->xp_pattern = skipwhite(p);
-+	    if (*skiptowhite(xp->xp_pattern) != NUL)
-+		xp->xp_context = EXPAND_NOTHING;
-+	    else if (STRNICMP(arg, "add", p - arg) == 0)
-+		xp->xp_context = EXPAND_FILES;
-+	    else if (STRNICMP(arg, "kill", p - arg) == 0)
-+		expand_what = EXP_CSCOPE_KILL;
-+	    else if (STRNICMP(arg, "find", p - arg) == 0)
-+		expand_what = EXP_CSCOPE_FIND;
-+	    else
-+		xp->xp_context = EXPAND_NOTHING;
-+	}
-+    }
-+}
-+
-+#endif /* FEAT_CMDL_COMPL */
-+
- /*
-  * PRIVATE: do_cscope_general
-  *
-- * find the command, print help if invalid, and the then call the
-- * corresponding command function,
-- * called from do_cscope and do_scscope
-+ * Find the command, print help if invalid, and then call the corresponding
-+ * command function.
-  */
-     static void
- do_cscope_general(eap, make_split)
-@@ -107,7 +222,6 @@
- {
-     cscmd_T *cmdp;
- 
--    cs_init();
-     if ((cmdp = cs_lookup_cmd(eap)) == NULL)
-     {
- 	cs_help(eap);
-@@ -168,8 +282,6 @@
- {
-     int ret = FALSE;
- 
--    cs_init();
--
-     if (*eap->arg == NUL)
-     {
- 	(void)EMSG(_("E562: Usage: cstag <ident>"));
-@@ -325,7 +437,7 @@
-     if (num < 0 || num > 4 || (num > 0 && !dbpath))
- 	return FALSE;
- 
--    for (i = 0; i < CSCOPE_MAX_CONNECTIONS; i++)
-+    for (i = 0; i < csinfo_size; i++)
-     {
- 	if (!csinfo[i].fname)
- 	    continue;
-@@ -379,10 +491,9 @@
-  *
-  * MAXPATHL 256
-  */
--/* ARGSUSED */
-     static int
- cs_add(eap)
--    exarg_T *eap;
-+    exarg_T *eap UNUSED;
- {
-     char *fname, *ppath, *flags = NULL;
- 
-@@ -569,7 +680,7 @@
-     short i;
-     short cnt = 0;
- 
--    for (i = 0; i < CSCOPE_MAX_CONNECTIONS; i++)
-+    for (i = 0; i < csinfo_size; i++)
-     {
- 	if (csinfo[i].fname != NULL)
- 	    cnt++;
-@@ -659,6 +770,7 @@
- {
-     char *cmd;
-     short search;
-+    char *pat;
- 
-     switch (csoption[0])
-     {
-@@ -692,10 +804,17 @@
- 	return NULL;
-     }
- 
--    if ((cmd = (char *)alloc((unsigned)(strlen(pattern) + 2))) == NULL)
-+    /* Skip white space before the patter, except for text and pattern search,
-+     * they may want to use the leading white space. */
-+    pat = pattern;
-+    if (search != 4 && search != 6)
-+	while vim_iswhite(*pat)
-+	    ++pat;
-+
-+    if ((cmd = (char *)alloc((unsigned)(strlen(pat) + 2))) == NULL)
- 	return NULL;
- 
--    (void)sprintf(cmd, "%d%s", search, pattern);
-+    (void)sprintf(cmd, "%d%s", search, pat);
- 
-     return cmd;
- } /* cs_create_cmd */
-@@ -869,7 +988,7 @@
- 	vim_free(ppath);
- 
- #if defined(UNIX)
--	if (execl("/bin/sh", "sh", "-c", cmd, NULL) == -1)
-+	if (execl("/bin/sh", "sh", "-c", cmd, (char *)NULL) == -1)
- 	    PERROR(_("cs_create_connection exec failed"));
- 
- 	exit(127);
-@@ -989,7 +1108,8 @@
- {
-     int i;
-     char *cmd;
--    int nummatches[CSCOPE_MAX_CONNECTIONS], totmatches;
-+    int *nummatches;
-+    int totmatches;
- #ifdef FEAT_QUICKFIX
-     char cmdletter;
-     char *qfpos;
-@@ -1000,13 +1120,17 @@
-     if (cmd == NULL)
- 	return FALSE;
- 
-+    nummatches = (int *)alloc(sizeof(int)*csinfo_size);
-+    if (nummatches == NULL)
-+	return FALSE;
-+
-     /* send query to all open connections, then count the total number
-      * of matches so we can alloc matchesp all in one swell foop
-      */
--    for (i = 0; i < CSCOPE_MAX_CONNECTIONS; i++)
-+    for (i = 0; i < csinfo_size; i++)
- 	nummatches[i] = 0;
-     totmatches = 0;
--    for (i = 0; i < CSCOPE_MAX_CONNECTIONS; i++)
-+    for (i = 0; i < csinfo_size; i++)
-     {
- 	if (csinfo[i].fname == NULL || csinfo[i].to_fp == NULL)
- 	    continue;
-@@ -1031,7 +1155,10 @@
- 	char *buf;
- 
- 	if (!verbose)
-+	{
-+	    vim_free(nummatches);
- 	    return FALSE;
-+	}
- 
- 	buf = (char *)alloc((unsigned)(strlen(opt) + strlen(pat) + strlen(nf)));
- 	if (buf == NULL)
-@@ -1042,6 +1169,7 @@
- 	    (void)EMSG(buf);
- 	    vim_free(buf);
- 	}
-+	vim_free(nummatches);
- 	return FALSE;
-     }
- 
-@@ -1094,6 +1222,7 @@
- 		(void)EMSG(buf);
- 		vim_free(buf);
- 	    }
-+	    vim_free(nummatches);
- 	    return FALSE;
- 	}
-     }
-@@ -1141,6 +1270,7 @@
- 	}
- 	mch_remove(tmp);
- 	vim_free(tmp);
-+	vim_free(nummatches);
- 	return TRUE;
-     }
-     else
-@@ -1152,6 +1282,7 @@
- 	/* read output */
- 	cs_fill_results((char *)pat, totmatches, nummatches, &matches,
- 							 &contexts, &matched);
-+	vim_free(nummatches);
- 	if (matches == NULL)
- 	    return FALSE;
- 
-@@ -1167,20 +1298,36 @@
-  *
-  * print help
-  */
--/* ARGSUSED */
-     static int
- cs_help(eap)
--    exarg_T *eap;
-+    exarg_T *eap UNUSED;
- {
-     cscmd_T *cmdp = cs_cmds;
- 
-     (void)MSG_PUTS(_("cscope commands:\n"));
-     while (cmdp->name != NULL)
-     {
--	(void)smsg((char_u *)_("%-5s: %-30s (Usage: %s)"),
--				      cmdp->name, _(cmdp->help), cmdp->usage);
-+	char *help = _(cmdp->help);
-+	int  space_cnt = 30 - vim_strsize((char_u *)help);
-+
-+	/* Use %*s rather than %30s to ensure proper alignment in utf-8 */
-+	if (space_cnt < 0)
-+	    space_cnt = 0;
-+	(void)smsg((char_u *)_("%-5s: %s%*s (Usage: %s)"),
-+				      cmdp->name,
-+				      help, space_cnt, " ",
-+				      cmdp->usage);
- 	if (strcmp(cmdp->name, "find") == 0)
--	    MSG_PUTS(FIND_HELP);
-+	    MSG_PUTS(_("\n"
-+		       "       c: Find functions calling this function\n"
-+		       "       d: Find functions called by this function\n"
-+		       "       e: Find this egrep pattern\n"
-+		       "       f: Find this file\n"
-+		       "       g: Find this definition\n"
-+		       "       i: Find files #including this file\n"
-+		       "       s: Find this C symbol\n"
-+		       "       t: Find assignments to\n"));
-+
- 	cmdp++;
-     }
- 
-@@ -1189,26 +1336,6 @@
- } /* cs_help */
- 
- 
--/*
-- * PRIVATE: cs_init
-- *
-- * initialize cscope structure if not already
-- */
--    static void
--cs_init()
--{
--    short i;
--    static int init_already = FALSE;
--
--    if (init_already)
--	return;
--
--    for (i = 0; i < CSCOPE_MAX_CONNECTIONS; i++)
--	clear_csinfo(i);
--
--    init_already = TRUE;
--} /* cs_init */
--
-     static void
- clear_csinfo(i)
-     int	    i;
-@@ -1257,13 +1384,12 @@
-  *
-  * insert a new cscope database filename into the filelist
-  */
--/*ARGSUSED*/
-     static int
- cs_insert_filelist(fname, ppath, flags, sb)
-     char *fname;
-     char *ppath;
-     char *flags;
--    struct stat *sb;
-+    struct stat *sb UNUSED;
- {
-     short	i, j;
- #ifndef UNIX
-@@ -1306,7 +1432,7 @@
- #endif
- 
-     i = -1; /* can be set to the index of an empty item in csinfo */
--    for (j = 0; j < CSCOPE_MAX_CONNECTIONS; j++)
-+    for (j = 0; j < csinfo_size; j++)
-     {
- 	if (csinfo[j].fname != NULL
- #if defined(UNIX)
-@@ -1333,9 +1459,25 @@
- 
-     if (i == -1)
-     {
--	if (p_csverbose)
--	    (void)EMSG(_("E569: maximum number of cscope connections reached"));
--	return -1;
-+	i = csinfo_size;
-+	if (csinfo_size == 0)
-+	{
-+	    /* First time allocation: allocate only 1 connection. It should
-+	     * be enough for most users.  If more is needed, csinfo will be
-+	     * reallocated. */
-+	    csinfo_size = 1;
-+	    csinfo = (csinfo_T *)alloc_clear(sizeof(csinfo_T));
-+	}
-+	else
-+	{
-+	    /* Reallocate space for more connections. */
-+	    csinfo_size *= 2;
-+	    csinfo = vim_realloc(csinfo, sizeof(csinfo_T)*csinfo_size);
-+	}
-+	if (csinfo == NULL)
-+	    return -1;
-+	for (j = csinfo_size/2; j < csinfo_size; j++)
-+	    clear_csinfo(j);
-     }
- 
-     if ((csinfo[i].fname = (char *)alloc((unsigned)strlen(fname)+1)) == NULL)
-@@ -1419,10 +1561,9 @@
-  *
-  * nuke em
-  */
--/* ARGSUSED */
-     static int
- cs_kill(eap)
--    exarg_T *eap;
-+    exarg_T *eap UNUSED;
- {
-     char *stok;
-     short i;
-@@ -1443,15 +1584,14 @@
- 	/* It must be part of a name.  We will try to find a match
- 	 * within all the names in the csinfo data structure
- 	 */
--	for (i = 0; i < CSCOPE_MAX_CONNECTIONS; i++)
-+	for (i = 0; i < csinfo_size; i++)
- 	{
- 	    if (csinfo[i].fname != NULL && strstr(csinfo[i].fname, stok))
- 		break;
- 	}
-     }
- 
--    if ((i >= CSCOPE_MAX_CONNECTIONS || i < -1 || csinfo[i].fname == NULL)
--	    && i != -1)
-+    if ((i != -1) && (i >= csinfo_size || i < -1 || csinfo[i].fname == NULL))
-     {
- 	if (p_csverbose)
- 	    (void)EMSG2(_("E261: cscope connection %s not found"), stok);
-@@ -1460,7 +1600,7 @@
-     {
- 	if (i == -1)
- 	{
--	    for (i = 0; i < CSCOPE_MAX_CONNECTIONS; i++)
-+	    for (i = 0; i < csinfo_size; i++)
- 	    {
- 		if (csinfo[i].fname)
- 		    cs_kill_execute(i, csinfo[i].fname);
-@@ -1720,7 +1860,7 @@
-     if (buf == NULL)
- 	return;
- 
--    for (i = 0; i < CSCOPE_MAX_CONNECTIONS; i++)
-+    for (i = 0; i < csinfo_size; i++)
-     {
- 	if (nummatches_a[i] < 1)
- 	    continue;
-@@ -1792,7 +1932,7 @@
-     if ((cntxts = (char **)alloc(sizeof(char *) * totmatches)) == NULL)
- 	goto parse_out;
- 
--    for (i = 0; i < CSCOPE_MAX_CONNECTIONS; i++)
-+    for (i = 0; i < csinfo_size; i++)
-     {
- 	if (nummatches_a[i] < 1)
- 	    continue;
-@@ -2099,7 +2239,6 @@
- /*
-  * Used to catch and ignore SIGALRM below.
-  */
--/* ARGSUSED */
-     static RETSIGTYPE
- sig_handler SIGDEFARG(sigarg)
- {
-@@ -2239,19 +2378,21 @@
-  *
-  * calls cs_kill on all cscope connections then reinits
-  */
--/* ARGSUSED */
-     static int
- cs_reset(eap)
--    exarg_T *eap;
-+    exarg_T *eap UNUSED;
- {
-     char	**dblist = NULL, **pplist = NULL, **fllist = NULL;
-     int	i;
-     char buf[20]; /* for sprintf " (#%d)" */
- 
-+    if (csinfo_size == 0)
-+	return CSCOPE_SUCCESS;
-+
-     /* malloc our db and ppath list */
--    dblist = (char **)alloc(CSCOPE_MAX_CONNECTIONS * sizeof(char *));
--    pplist = (char **)alloc(CSCOPE_MAX_CONNECTIONS * sizeof(char *));
--    fllist = (char **)alloc(CSCOPE_MAX_CONNECTIONS * sizeof(char *));
-+    dblist = (char **)alloc(csinfo_size * sizeof(char *));
-+    pplist = (char **)alloc(csinfo_size * sizeof(char *));
-+    fllist = (char **)alloc(csinfo_size * sizeof(char *));
-     if (dblist == NULL || pplist == NULL || fllist == NULL)
-     {
- 	vim_free(dblist);
-@@ -2260,7 +2401,7 @@
- 	return CSCOPE_FAILURE;
-     }
- 
--    for (i = 0; i < CSCOPE_MAX_CONNECTIONS; i++)
-+    for (i = 0; i < csinfo_size; i++)
-     {
- 	dblist[i] = csinfo[i].fname;
- 	pplist[i] = csinfo[i].ppath;
-@@ -2270,7 +2411,7 @@
-     }
- 
-     /* rebuild the cscope connection list */
--    for (i = 0; i < CSCOPE_MAX_CONNECTIONS; i++)
-+    for (i = 0; i < csinfo_size; i++)
-     {
- 	if (dblist[i] != NULL)
- 	{
-@@ -2355,10 +2496,9 @@
-  *
-  * show all cscope connections
-  */
--/* ARGSUSED */
-     static int
- cs_show(eap)
--    exarg_T *eap;
-+    exarg_T *eap UNUSED;
- {
-     short i;
-     if (cs_cnt_connections() == 0)
-@@ -2368,7 +2508,7 @@
- 	MSG_PUTS_ATTR(
- 	    _(" # pid    database name                       prepend path\n"),
- 	    hl_attr(HLF_T));
--	for (i = 0; i < CSCOPE_MAX_CONNECTIONS; i++)
-+	for (i = 0; i < csinfo_size; i++)
- 	{
- 	    if (csinfo[i].fname == NULL)
- 		continue;
-@@ -2397,8 +2537,10 @@
- {
-     int i;
- 
--    for (i = 0; i < CSCOPE_MAX_CONNECTIONS; i++)
-+    for (i = 0; i < csinfo_size; i++)
- 	cs_release_csp(i, TRUE);
-+    vim_free(csinfo);
-+    csinfo_size = 0;
- }
- 
- #endif	/* FEAT_CSCOPE */
-diff -Naur vim72.orig/src/if_cscope.h vim72/src/if_cscope.h
---- vim72.orig/src/if_cscope.h	2007-09-02 07:51:08.000000000 -0700
-+++ vim72/src/if_cscope.h	2009-07-19 15:18:44.000000000 -0700
-@@ -25,7 +25,6 @@
- 
- #define CSCOPE_SUCCESS		0
- #define CSCOPE_FAILURE		-1
--#define CSCOPE_MAX_CONNECTIONS	8   /* you actually need more? */
- 
- #define	CSCOPE_DBFILE		"cscope.out"
- #define	CSCOPE_PROMPT		">> "
-@@ -42,17 +41,6 @@
-  * f 7name	Find this file
-  * i 8name	Find files #including this file
-  */
--#define	FIND_USAGE "find c|d|e|f|g|i|s|t name"
--#define FIND_HELP "\n\
--       c: Find functions calling this function\n\
--       d: Find functions called by this function\n\
--       e: Find this egrep pattern\n\
--       f: Find this file\n\
--       g: Find this definition\n\
--       i: Find files #including this file\n\
--       s: Find this C symbol\n\
--       t: Find assignments to\n"
--
- 
- typedef struct {
-     char *  name;
-diff -Naur vim72.orig/src/if_mzsch.c vim72/src/if_mzsch.c
---- vim72.orig/src/if_mzsch.c	2007-07-01 09:44:49.000000000 -0700
-+++ vim72/src/if_mzsch.c	2009-07-19 15:18:39.000000000 -0700
-@@ -667,13 +667,11 @@
-     static void CALLBACK
- timer_proc(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime)
- # elif defined(FEAT_GUI_GTK)
--/*ARGSUSED*/
-     static gint
--timer_proc(gpointer data)
-+timer_proc(gpointer data UNUSED)
- # elif defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)
--/* ARGSUSED */
-     static void
--timer_proc(XtPointer timed_out, XtIntervalId *interval_id)
-+timer_proc(XtPointer timed_out UNUSED, XtIntervalId *interval_id UNUSED)
- # elif defined(FEAT_GUI_MAC)
-     pascal void
- timer_proc(EventLoopTimerRef theTimer, void *userData)
-@@ -1958,9 +1956,9 @@
- 	    curbuf = savebuf;
- 	    raise_vim_exn(_("cannot delete line"));
- 	}
--	deleted_lines_mark((linenr_T)n, 1L);
- 	if (buf->buf == curwin->w_buffer)
- 	    mz_fix_cursor(n, n + 1, -1);
-+	deleted_lines_mark((linenr_T)n, 1L);
- 
- 	curbuf = savebuf;
- 
-@@ -2065,9 +2063,9 @@
- 		    curbuf = savebuf;
- 		    raise_vim_exn(_("cannot delete line"));
- 		}
--	    deleted_lines_mark((linenr_T)lo, (long)old_len);
- 	    if (buf->buf == curwin->w_buffer)
- 		mz_fix_cursor(lo, hi, -old_len);
-+	    deleted_lines_mark((linenr_T)lo, (long)old_len);
- 	}
- 
- 	curbuf = savebuf;
-diff -Naur vim72.orig/src/if_perl.xs vim72/src/if_perl.xs
---- vim72.orig/src/if_perl.xs	2008-07-17 13:55:09.000000000 -0700
-+++ vim72/src/if_perl.xs	2009-07-19 15:18:52.000000000 -0700
-@@ -136,6 +136,9 @@
- #  define Perl_newXS_flags dll_Perl_newXS_flags
- #endif
- # define Perl_sv_free dll_Perl_sv_free
-+# if (PERL_REVISION == 5) && (PERL_VERSION >= 10)
-+#  define Perl_sv_free2 dll_Perl_sv_free2
-+# endif
- # define Perl_sv_isa dll_Perl_sv_isa
- # define Perl_sv_magic dll_Perl_sv_magic
- # define Perl_sv_setiv dll_Perl_sv_setiv
-@@ -163,7 +166,7 @@
- # define Perl_Isv_yes_ptr dll_Perl_Isv_yes_ptr
- # define boot_DynaLoader dll_boot_DynaLoader
- 
--# define Perl_sys_init3 dll_Perl_sys_init3
-+# define Perl_sys_init dll_Perl_sys_init
- # define Perl_sys_term dll_Perl_sys_term
- # define Perl_ISv_ptr dll_Perl_ISv_ptr
- # define Perl_Istack_max_ptr dll_Perl_Istack_max_ptr
-@@ -268,7 +271,8 @@
- static void (*boot_DynaLoader)_((pTHX_ CV*));
- 
- #if (PERL_REVISION == 5) && (PERL_VERSION >= 10)
--static void (*Perl_sys_init3)(int* argc, char*** argv, char*** env);
-+static void (*Perl_sv_free2)(pTHX_ SV*);
-+static void (*Perl_sys_init)(int* argc, char*** argv);
- static void (*Perl_sys_term)(void);
- static SV** (*Perl_ISv_ptr)(register PerlInterpreter*);
- static SV*** (*Perl_Istack_max_ptr)(register PerlInterpreter*);
-@@ -367,7 +371,8 @@
-     {"Perl_TXpv_ptr", (PERL_PROC*)&Perl_TXpv_ptr},
-     {"Perl_Tna_ptr", (PERL_PROC*)&Perl_Tna_ptr},
- #else
--    {"Perl_sys_init3", (PERL_PROC*)&Perl_sys_init3},
-+    {"Perl_sv_free2", (PERL_PROC*)&Perl_sv_free2},
-+    {"Perl_sys_init", (PERL_PROC*)&Perl_sys_init},
-     {"Perl_sys_term", (PERL_PROC*)&Perl_sys_term},
-     {"Perl_ISv_ptr", (PERL_PROC*)&Perl_ISv_ptr},
-     {"Perl_Istack_sp_ptr", (PERL_PROC*)&Perl_Istack_sp_ptr},
-@@ -455,7 +460,7 @@
-     static char *argv[] = { "", "-e", "" };
- 
- #if (PERL_REVISION == 5) && (PERL_VERSION >= 10)
--    Perl_sys_init3(&argc, (char***)&argv, NULL);
-+    Perl_sys_init(&argc, (char***)&argv);
- #endif
-     perl_interp = perl_alloc();
-     perl_construct(perl_interp);
-@@ -715,9 +720,11 @@
- #ifdef HAVE_SANDBOX
-     if (sandbox)
-     {
-+# ifndef MAKE_TEST  /* avoid a warning for unreachable code */
- 	if ((safe = perl_get_sv( "VIM::safe", FALSE )) == NULL || !SvTRUE(safe))
- 	    EMSG(_("E299: Perl evaluation forbidden in sandbox without the Safe module"));
- 	else
-+# endif
- 	{
- 	    PUSHMARK(SP);
- 	    XPUSHs(safe);
-@@ -1228,9 +1235,8 @@
- 		    if (u_savedel(lnum, 1) == OK)
- 		    {
- 			ml_delete(lnum, 0);
-+			check_cursor();
- 			deleted_lines_mark(lnum, 1L);
--			if (aco.save_buf == curbuf)
--			    check_cursor();
- 		    }
- 
- 		    /* restore curwin/curbuf and a few other things */
-diff -Naur vim72.orig/src/if_python.c vim72/src/if_python.c
---- vim72.orig/src/if_python.c	2008-07-17 14:09:32.000000000 -0700
-+++ vim72/src/if_python.c	2009-07-19 15:18:39.000000000 -0700
-@@ -531,6 +531,12 @@
- 	if (PythonMod_Init())
- 	    goto fail;
- 
-+	/* Remove the element from sys.path that was added because of our
-+	 * argv[0] value in PythonMod_Init().  Previously we used an empty
-+	 * string, but dependinding on the OS we then get an empty entry or
-+	 * the current directory in sys.path. */
-+	PyRun_SimpleString("import sys; sys.path = filter(lambda x: x != '/must>not&exist', sys.path)");
-+
- 	/* the first python thread is vim's, release the lock */
- 	Python_SaveThread();
- 
-@@ -1090,9 +1096,8 @@
- 
- /* Vim module - Implementation
-  */
--/*ARGSUSED*/
-     static PyObject *
--VimCommand(PyObject *self, PyObject *args)
-+VimCommand(PyObject *self UNUSED, PyObject *args)
- {
-     char *cmd;
-     PyObject *result;
-@@ -1145,14 +1150,23 @@
- 
-     /* Check if we run into a recursive loop.  The item must be in lookupDict
-      * then and we can use it again. */
--    sprintf(ptrBuf, PRINTF_DECIMAL_LONG_U, (long_u)our_tv);
--    result = PyDict_GetItemString(lookupDict, ptrBuf);
--    if (result != NULL)
--	Py_INCREF(result);
--    else if (our_tv->v_type == VAR_STRING)
-+    if ((our_tv->v_type == VAR_LIST && our_tv->vval.v_list != NULL)
-+	    || (our_tv->v_type == VAR_DICT && our_tv->vval.v_dict != NULL))
-+    {
-+	sprintf(ptrBuf, PRINTF_DECIMAL_LONG_U,
-+	        our_tv->v_type == VAR_LIST ? (long_u)our_tv->vval.v_list
-+		                           : (long_u)our_tv->vval.v_dict);
-+	result = PyDict_GetItemString(lookupDict, ptrBuf);
-+	if (result != NULL)
-+	{
-+	    Py_INCREF(result);
-+	    return result;
-+	}
-+    }
-+
-+    if (our_tv->v_type == VAR_STRING)
-     {
- 	result = Py_BuildValue("s", our_tv->vval.v_string);
--	PyDict_SetItemString(lookupDict, ptrBuf, result);
-     }
-     else if (our_tv->v_type == VAR_NUMBER)
-     {
-@@ -1161,7 +1175,6 @@
- 	/* For backwards compatibility numbers are stored as strings. */
- 	sprintf(buf, "%ld", (long)our_tv->vval.v_number);
- 	result = Py_BuildValue("s", buf);
--	PyDict_SetItemString(lookupDict, ptrBuf, result);
-     }
- # ifdef FEAT_FLOAT
-     else if (our_tv->v_type == VAR_FLOAT)
-@@ -1170,7 +1183,6 @@
- 
- 	sprintf(buf, "%f", our_tv->vval.v_float);
- 	result = Py_BuildValue("s", buf);
--	PyDict_SetItemString(lookupDict, ptrBuf, result);
-     }
- # endif
-     else if (our_tv->v_type == VAR_LIST)
-@@ -1179,10 +1191,11 @@
- 	listitem_T	*curr;
- 
- 	result = PyList_New(0);
--	PyDict_SetItemString(lookupDict, ptrBuf, result);
- 
- 	if (list != NULL)
- 	{
-+	    PyDict_SetItemString(lookupDict, ptrBuf, result);
-+
- 	    for (curr = list->lv_first; curr != NULL; curr = curr->li_next)
- 	    {
- 		newObj = VimToPython(&curr->li_tv, depth + 1, lookupDict);
-@@ -1194,7 +1207,6 @@
-     else if (our_tv->v_type == VAR_DICT)
-     {
- 	result = PyDict_New();
--	PyDict_SetItemString(lookupDict, ptrBuf, result);
- 
- 	if (our_tv->vval.v_dict != NULL)
- 	{
-@@ -1203,6 +1215,8 @@
- 	    hashitem_T	*hi;
- 	    dictitem_T	*di;
- 
-+	    PyDict_SetItemString(lookupDict, ptrBuf, result);
-+
- 	    for (hi = ht->ht_array; todo > 0; ++hi)
- 	    {
- 		if (!HASHITEM_EMPTY(hi))
-@@ -1227,9 +1241,8 @@
- }
- #endif
- 
--/*ARGSUSED*/
-     static PyObject *
--VimEval(PyObject *self, PyObject *args)
-+VimEval(PyObject *self UNUSED, PyObject *args)
- {
- #ifdef FEAT_EVAL
-     char	*expr;
-@@ -1879,9 +1892,8 @@
- /* Buffer list object - Implementation
-  */
- 
--/*ARGSUSED*/
-     static PyInt
--BufListLength(PyObject *self)
-+BufListLength(PyObject *self UNUSED)
- {
-     buf_T	*b = firstbuf;
-     PyInt	n = 0;
-@@ -1895,9 +1907,8 @@
-     return n;
- }
- 
--/*ARGSUSED*/
-     static PyObject *
--BufListItem(PyObject *self, PyInt n)
-+BufListItem(PyObject *self UNUSED, PyInt n)
- {
-     buf_T *b;
- 
-@@ -2195,9 +2206,8 @@
- 
- /* Window list object - Implementation
-  */
--/*ARGSUSED*/
-     static PyInt
--WinListLength(PyObject *self)
-+WinListLength(PyObject *self UNUSED)
- {
-     win_T	*w = firstwin;
-     PyInt	n = 0;
-@@ -2211,9 +2221,8 @@
-     return n;
- }
- 
--/*ARGSUSED*/
-     static PyObject *
--WinListItem(PyObject *self, PyInt n)
-+WinListItem(PyObject *self UNUSED, PyInt n)
- {
-     win_T *w;
- 
-@@ -2259,9 +2268,8 @@
- 
- /* Current items object - Implementation
-  */
--/*ARGSUSED*/
-     static PyObject *
--CurrentGetattr(PyObject *self, char *name)
-+CurrentGetattr(PyObject *self UNUSED, char *name)
- {
-     if (strcmp(name, "buffer") == 0)
- 	return (PyObject *)BufferNew(curbuf);
-@@ -2280,9 +2288,8 @@
-     }
- }
- 
--/*ARGSUSED*/
-     static int
--CurrentSetattr(PyObject *self, char *name, PyObject *value)
-+CurrentSetattr(PyObject *self UNUSED, char *name, PyObject *value)
- {
-     if (strcmp(name, "line") == 0)
-     {
-@@ -2345,7 +2352,8 @@
- {
-     PyObject *mod;
-     PyObject *dict;
--    static char *(argv[2]) = {"", NULL};
-+    /* The special value is removed from sys.path in Python_Init(). */
-+    static char *(argv[2]) = {"/must>not&exist/foo", NULL};
- 
-     /* Fixups... */
-     BufferType.ob_type = &PyType_Type;
-@@ -2489,9 +2497,9 @@
- 	    PyErr_SetVim(_("cannot delete line"));
- 	else
- 	{
--	    deleted_lines_mark((linenr_T)n, 1L);
- 	    if (buf == curwin->w_buffer)
- 		py_fix_cursor((linenr_T)n, (linenr_T)n + 1, (linenr_T)-1);
-+	    deleted_lines_mark((linenr_T)n, 1L);
- 	}
- 
- 	curbuf = savebuf;
-@@ -2588,10 +2596,9 @@
- 		    break;
- 		}
- 	    }
--	    deleted_lines_mark((linenr_T)lo, (long)i);
--
- 	    if (buf == curwin->w_buffer)
- 		py_fix_cursor((linenr_T)lo, (linenr_T)hi, (linenr_T)-n);
-+	    deleted_lines_mark((linenr_T)lo, (long)i);
- 	}
- 
- 	curbuf = savebuf;
-diff -Naur vim72.orig/src/if_ruby.c vim72/src/if_ruby.c
---- vim72.orig/src/if_ruby.c	2007-09-10 01:40:38.000000000 -0700
-+++ vim72/src/if_ruby.c	2009-07-19 15:16:49.000000000 -0700
-@@ -492,7 +492,7 @@
-     }
- }
- 
--static VALUE vim_message(VALUE self, VALUE str)
-+static VALUE vim_message(VALUE self UNUSED, VALUE str)
- {
-     char *buff, *p;
- 
-@@ -505,20 +505,20 @@
-     return Qnil;
- }
- 
--static VALUE vim_set_option(VALUE self, VALUE str)
-+static VALUE vim_set_option(VALUE self UNUSED, VALUE str)
- {
-     do_set((char_u *)STR2CSTR(str), 0);
-     update_screen(NOT_VALID);
-     return Qnil;
- }
- 
--static VALUE vim_command(VALUE self, VALUE str)
-+static VALUE vim_command(VALUE self UNUSED, VALUE str)
- {
-     do_cmdline_cmd((char_u *)STR2CSTR(str));
-     return Qnil;
- }
- 
--static VALUE vim_evaluate(VALUE self, VALUE str)
-+static VALUE vim_evaluate(VALUE self UNUSED, VALUE str)
- {
- #ifdef FEAT_EVAL
-     char_u *value = eval_to_string((char_u *)STR2CSTR(str), NULL, TRUE);
-@@ -580,7 +580,7 @@
-     return INT2NUM(n);
- }
- 
--static VALUE buffer_s_aref(VALUE self, VALUE num)
-+static VALUE buffer_s_aref(VALUE self UNUSED, VALUE num)
- {
-     buf_T *b;
-     int n = NUM2INT(num);
-@@ -629,7 +629,9 @@
- 	return line ? rb_str_new2(line) : Qnil;
-     }
-     rb_raise(rb_eIndexError, "index %d out of buffer", n);
-+#ifndef __GNUC__
-     return Qnil; /* For stop warning */
-+#endif
- }
- 
- static VALUE buffer_aref(VALUE self, VALUE num)
-@@ -668,7 +670,9 @@
-     else
-     {
- 	rb_raise(rb_eIndexError, "index %d out of buffer", n);
-+#ifndef __GNUC__
- 	return Qnil; /* For stop warning */
-+#endif
-     }
-     return str;
- }
-@@ -789,7 +793,7 @@
-     return get_buffer_line(curbuf, curwin->w_cursor.lnum);
- }
- 
--static VALUE set_current_line(VALUE self, VALUE str)
-+static VALUE set_current_line(VALUE self UNUSED, VALUE str)
- {
-     return set_buffer_line(curbuf, curwin->w_cursor.lnum, str);
- }
-@@ -815,7 +819,7 @@
- #endif
- }
- 
--static VALUE window_s_aref(VALUE self, VALUE num)
-+static VALUE window_s_aref(VALUE self UNUSED, VALUE num)
- {
-     win_T *w;
-     int n = NUM2INT(num);
-@@ -897,7 +901,7 @@
-     return Qnil;
- }
- 
--static VALUE f_p(int argc, VALUE *argv, VALUE self)
-+static VALUE f_p(int argc, VALUE *argv, VALUE self UNUSED)
- {
-     int i;
-     VALUE str = rb_str_new("", 0);
-diff -Naur vim72.orig/src/if_tcl.c vim72/src/if_tcl.c
---- vim72.orig/src/if_tcl.c	2007-05-07 12:50:14.000000000 -0700
-+++ vim72/src/if_tcl.c	2009-07-19 15:16:54.000000000 -0700
-@@ -161,7 +161,7 @@
- # endif
- 
- /*
-- * Declare HANDLE for perl.dll and function pointers.
-+ * Declare HANDLE for tcl.dll and function pointers.
-  */
- static HANDLE hTclLib = NULL;
- Tcl_Interp* (*dll_Tcl_CreateInterp)();
-@@ -182,7 +182,7 @@
-  * Make all runtime-links of tcl.
-  *
-  * 1. Get module handle using LoadLibraryEx.
-- * 2. Get pointer to perl function by GetProcAddress.
-+ * 2. Get pointer to tcl function by GetProcAddress.
-  * 3. Repeat 2, until get all functions will be used.
-  *
-  * Parameter 'libname' provides name of DLL.
-@@ -290,10 +290,9 @@
-  */
- #define TCL_EXIT	5
- 
--/* ARGSUSED */
-     static int
- exitcmd(dummy, interp, objc, objv)
--    ClientData dummy;
-+    ClientData dummy UNUSED;
-     Tcl_Interp *interp;
-     int objc;
-     Tcl_Obj *CONST objv[];
-@@ -315,10 +314,9 @@
-     return TCL_ERROR;
- }
- 
--/* ARGSUSED */
-     static int
- catchcmd(dummy, interp, objc, objv)
--    ClientData	dummy;
-+    ClientData	dummy UNUSED;
-     Tcl_Interp	*interp;
-     int		objc;
-     Tcl_Obj	*CONST objv[];
-@@ -356,10 +354,9 @@
- /*
-  *  "::vim::beep" - what Vi[m] does best :-)
-  */
--/* ARGSUSED */
-     static int
- beepcmd(dummy, interp, objc, objv)
--    ClientData dummy;
-+    ClientData dummy UNUSED;
-     Tcl_Interp *interp;
-     int objc;
-     Tcl_Obj *CONST objv[];
-@@ -378,10 +375,9 @@
-  *  "::vim::buffer {N}" - create buffer command for buffer N.
-  *  "::vim::buffer new" - create a new buffer (not implemented)
-  */
--/* ARGSUSED */
-     static int
- buffercmd(dummy, interp, objc, objv)
--    ClientData dummy;
-+    ClientData dummy UNUSED;
-     Tcl_Interp *interp;
-     int objc;
-     Tcl_Obj *CONST objv[];
-@@ -475,10 +471,9 @@
- /*
-  * "::vim::window list" - create list of window commands.
-  */
--/* ARGSUSED */
-     static int
- windowcmd(dummy, interp, objc, objv)
--    ClientData	dummy;
-+    ClientData	dummy UNUSED;
-     Tcl_Interp	*interp;
-     int		objc;
-     Tcl_Obj	*CONST objv[];
-@@ -1130,10 +1125,9 @@
- }
- 
- 
--/* ARGSUSED */
-     static int
- commandcmd(dummy, interp, objc, objv)
--    ClientData	dummy;
-+    ClientData	dummy UNUSED;
-     Tcl_Interp	*interp;
-     int		objc;
-     Tcl_Obj	*CONST objv[];
-@@ -1145,10 +1139,9 @@
-     return err;
- }
- 
--/* ARGSUSED */
-     static int
- optioncmd(dummy, interp, objc, objv)
--    ClientData	dummy;
-+    ClientData	dummy UNUSED;
-     Tcl_Interp	*interp;
-     int		objc;
-     Tcl_Obj	*CONST objv[];
-@@ -1160,10 +1153,9 @@
-     return err;
- }
- 
--/* ARGSUSED */
-     static int
- exprcmd(dummy, interp, objc, objv)
--    ClientData	dummy;
-+    ClientData	dummy UNUSED;
-     Tcl_Interp	*interp;
-     int		objc;
-     Tcl_Obj	*CONST objv[];
-@@ -1584,11 +1576,10 @@
-     I/O Channel
- ********************************************/
- 
--/* ARGSUSED */
-     static int
- channel_close(instance, interp)
-     ClientData	instance;
--    Tcl_Interp	*interp;
-+    Tcl_Interp	*interp UNUSED;
- {
-     int		err = 0;
- 
-@@ -1602,12 +1593,11 @@
-     return err;
- }
- 
--/* ARGSUSED */
-     static int
- channel_input(instance, buf, bufsiz, errptr)
--    ClientData	instance;
--    char	*buf;
--    int		bufsiz;
-+    ClientData	instance UNUSED;
-+    char	*buf UNUSED;
-+    int		bufsiz UNUSED;
-     int		*errptr;
- {
- 
-@@ -1659,21 +1649,19 @@
-     return result;
- }
- 
--/* ARGSUSED */
-     static void
- channel_watch(instance, mask)
--    ClientData	instance;
--    int		mask;
-+    ClientData	instance UNUSED;
-+    int		mask UNUSED;
- {
-     Tcl_SetErrno(EINVAL);
- }
- 
--/* ARGSUSED */
-     static int
- channel_gethandle(instance, direction, handleptr)
--    ClientData	instance;
--    int		direction;
--    ClientData	*handleptr;
-+    ClientData	instance UNUSED;
-+    int		direction UNUSED;
-+    ClientData	*handleptr UNUSED;
- {
-     Tcl_SetErrno(EINVAL);
-     return EINVAL;
-@@ -1682,16 +1670,31 @@
- 
- static Tcl_ChannelType channel_type =
- {
--    "vimmessage",
--    NULL,   /* blockmode */
--    channel_close,
--    channel_input,
--    channel_output,
--    NULL,   /* seek */
--    NULL,   /* set option */
--    NULL,   /* get option */
--    channel_watch,
--    channel_gethandle
-+    "vimmessage",	/* typeName */
-+    NULL,		/* version */
-+    channel_close,	/* closeProc */
-+    channel_input,	/* inputProc */
-+    channel_output,	/* outputProc */
-+    NULL,		/* seekProc */
-+    NULL,		/* setOptionProc */
-+    NULL,		/* getOptionProc */
-+    channel_watch,	/* watchProc */
-+    channel_gethandle,	/* getHandleProc */
-+    NULL,		/* close2Proc */
-+    NULL,		/* blockModeProc */
-+#ifdef TCL_CHANNEL_VERSION_2
-+    NULL,		/* flushProc */
-+    NULL,		/* handlerProc */
-+#endif
-+#ifdef TCL_CHANNEL_VERSION_3
-+    NULL,		/* wideSeekProc */
-+#endif
-+#ifdef TCL_CHANNEL_VERSION_4
-+    NULL,		/* threadActionProc */
-+#endif
-+#ifdef TCL_CHANNEL_VERSION_5
-+    NULL		/* truncateProc */
-+#endif
- };
- 
- /**********************************
-diff -Naur vim72.orig/src/if_xcmdsrv.c vim72/src/if_xcmdsrv.c
---- vim72.orig/src/if_xcmdsrv.c	2008-07-18 06:05:03.000000000 -0700
-+++ vim72/src/if_xcmdsrv.c	2009-07-19 15:16:23.000000000 -0700
-@@ -682,7 +682,7 @@
-      * Scan all of the names out of the property.
-      */
-     ga_init2(&ga, 1, 100);
--    for (p = regProp; (p - regProp) < numItems; p++)
-+    for (p = regProp; (long_u)(p - regProp) < numItems; p++)
-     {
- 	entry = p;
- 	while (*p != 0 && !isspace(*p))
-@@ -736,7 +736,7 @@
- 		+ serverReply.ga_len;
- 	    e.id = w;
- 	    ga_init2(&e.strings, 1, 100);
--	    memcpy(p, &e, sizeof(e));
-+	    mch_memmove(p, &e, sizeof(e));
- 	    serverReply.ga_len++;
- 	}
-     }
-@@ -969,7 +969,7 @@
-      */
-     returnValue = (int_u)None;
-     entry = NULL;	/* Not needed, but eliminates compiler warning. */
--    for (p = regProp; (p - regProp) < numItems; )
-+    for (p = regProp; (long_u)(p - regProp) < numItems; )
-     {
- 	entry = p;
- 	while (*p != 0 && !isspace(*p))
-@@ -986,7 +986,7 @@
- 
-     if (loose != NULL && returnValue == (int_u)None && !IsSerialName(name))
-     {
--	for (p = regProp; (p - regProp) < numItems; )
-+	for (p = regProp; (long_u)(p - regProp) < numItems; )
- 	{
- 	    entry = p;
- 	    while (*p != 0 && !isspace(*p))
-@@ -1018,7 +1018,7 @@
- 	p++;
- 	count = numItems - (p - regProp);
- 	if (count > 0)
--	    memcpy(entry, p, count);
-+	    mch_memmove(entry, p, count);
- 	XChangeProperty(dpy, RootWindow(dpy, 0), registryProperty, XA_STRING,
- 			8, PropModeReplace, regProp,
- 			(int)(numItems - (p - entry)));
-@@ -1056,7 +1056,7 @@
- 	return;
- 
-     /* Scan the property for the window id.  */
--    for (p = regProp; (p - regProp) < numItems; )
-+    for (p = regProp; (long_u)(p - regProp) < numItems; )
-     {
- 	if (*p != 0)
- 	{
-@@ -1072,7 +1072,7 @@
- 		p++;
- 		lastHalf = numItems - (p - regProp);
- 		if (lastHalf > 0)
--		    memcpy(entry, p, lastHalf);
-+		    mch_memmove(entry, p, lastHalf);
- 		numItems = (entry - regProp) + lastHalf;
- 		p = entry;
- 		continue;
-@@ -1196,7 +1196,7 @@
-      * one time;  each iteration through the outer loop handles a
-      * single command or result.
-      */
--    for (p = propInfo; (p - propInfo) < numItems; )
-+    for (p = propInfo; (long_u)(p - propInfo) < numItems; )
-     {
- 	/*
- 	 * Ignore leading NULs; each command or result starts with a
-@@ -1230,7 +1230,7 @@
- 	    serial = (char_u *)"";
- 	    script = NULL;
- 	    enc = NULL;
--	    while (p - propInfo < numItems && *p == '-')
-+	    while ((long_u)(p - propInfo) < numItems && *p == '-')
- 	    {
- 		switch (p[1])
- 		{
-@@ -1333,7 +1333,7 @@
- 	    res = (char_u *)"";
- 	    code = 0;
- 	    enc = NULL;
--	    while ((p-propInfo) < numItems && *p == '-')
-+	    while ((long_u)(p - propInfo) < numItems && *p == '-')
- 	    {
- 		switch (p[1])
- 		{
-@@ -1401,7 +1401,7 @@
- 	    gotWindow = 0;
- 	    str = (char_u *)"";
- 	    enc = NULL;
--	    while ((p-propInfo) < numItems && *p == '-')
-+	    while ((long_u)(p - propInfo) < numItems && *p == '-')
- 	    {
- 		switch (p[1])
- 		{
-@@ -1489,11 +1489,10 @@
- /*
-  * Another X Error handler, just used to check for errors.
-  */
--/* ARGSUSED */
-     static int
- x_error_check(dpy, error_event)
--    Display	*dpy;
--    XErrorEvent	*error_event;
-+    Display	*dpy UNUSED;
-+    XErrorEvent	*error_event UNUSED;
- {
-     got_x_error = TRUE;
-     return 0;
-diff -Naur vim72.orig/src/macros.h vim72/src/macros.h
---- vim72.orig/src/macros.h	2007-08-04 04:44:18.000000000 -0700
-+++ vim72/src/macros.h	2009-07-19 15:16:33.000000000 -0700
-@@ -127,15 +127,31 @@
- #ifdef FEAT_LANGMAP
- /*
-  * Adjust chars in a language according to 'langmap' option.
-- * NOTE that there is NO overhead if 'langmap' is not set; but even
-- * when set we only have to do 2 ifs and an array lookup.
-+ * NOTE that there is no noticeable overhead if 'langmap' is not set.
-+ * When set the overhead for characters < 256 is small.
-  * Don't apply 'langmap' if the character comes from the Stuff buffer.
-  * The do-while is just to ignore a ';' after the macro.
-  */
--# define LANGMAP_ADJUST(c, condition) do { \
--	if (*p_langmap && (condition) && !KeyStuffed && (c) >= 0 && (c) < 256) \
--	    c = langmap_mapchar[c]; \
-+# ifdef FEAT_MBYTE
-+#  define LANGMAP_ADJUST(c, condition) \
-+    do { \
-+        if (*p_langmap && (condition) && !KeyStuffed && (c) >= 0) \
-+	{ \
-+	    if ((c) < 256) \
-+		c = langmap_mapchar[c]; \
-+	    else \
-+		c = langmap_adjust_mb(c); \
-+	} \
-     } while (0)
-+# else
-+#  define LANGMAP_ADJUST(c, condition) \
-+    do { \
-+        if (*p_langmap && (condition) && !KeyStuffed && (c) >= 0 && (c) < 256) \
-+            c = langmap_mapchar[c]; \
-+    } while (0)
-+# endif
-+#else
-+# define LANGMAP_ADJUST(c, condition) /* nop */
- #endif
- 
- /*
-@@ -268,7 +284,7 @@
- # define mb_cptr2len(p)	    (enc_utf8 ? utf_ptr2len(p) : (*mb_ptr2len)(p))
- 
- # define MB_COPY_CHAR(f, t) if (has_mbyte) mb_copy_char(&f, &t); else *t++ = *f++
--# define MB_CHARLEN(p)	    (has_mbyte ? mb_charlen(p) : STRLEN(p))
-+# define MB_CHARLEN(p)	    (has_mbyte ? mb_charlen(p) : (int)STRLEN(p))
- # define PTR2CHAR(p)	    (has_mbyte ? mb_ptr2char(p) : (int)*(p))
- #else
- # define mb_ptr_adv(p)		++p
-diff -Naur vim72.orig/src/main.c vim72/src/main.c
---- vim72.orig/src/main.c	2008-07-24 01:40:56.000000000 -0700
-+++ vim72/src/main.c	2009-07-19 15:16:33.000000000 -0700
-@@ -645,11 +645,12 @@
- 
- #ifdef FEAT_VIMINFO
-     /*
--     * Read in registers, history etc, but not marks, from the viminfo file
-+     * Read in registers, history etc, but not marks, from the viminfo file.
-+     * This is where v:oldfiles gets filled.
-      */
-     if (*p_viminfo != NUL)
-     {
--	read_viminfo(NULL, TRUE, FALSE, FALSE);
-+	read_viminfo(NULL, VIF_WANT_INFO | VIF_GET_OLDFILES);
- 	TIME_MSG("reading viminfo");
-     }
- #endif
-@@ -1457,7 +1458,8 @@
- 	++initstr;
-     }
- 
--    if (TOLOWER_ASC(initstr[0]) == 'g' || initstr[0] == 'k')
-+    /* "gvim" starts the GUI.  Also accept "Gvim" for MS-Windows. */
-+    if (TOLOWER_ASC(initstr[0]) == 'g')
-     {
- 	main_start_gui();
- #ifdef FEAT_GUI
-@@ -1503,12 +1505,12 @@
-  *
-  * Also find the --server... arguments and --socketid and --windowid
-  */
--/*ARGSUSED*/
-     static void
- early_arg_scan(parmp)
--    mparm_T	*parmp;
-+    mparm_T	*parmp UNUSED;
- {
--#if defined(FEAT_XCLIPBOARD) || defined(FEAT_CLIENTSERVER)
-+#if defined(FEAT_XCLIPBOARD) || defined(FEAT_CLIENTSERVER) \
-+	|| !defined(FEAT_NETBEANS_INTG)
-     int		argc = parmp->argc;
-     char	**argv = parmp->argv;
-     int		i;
-@@ -1580,6 +1582,14 @@
- 	else if (STRICMP(argv[i], "--echo-wid") == 0)
- 	    echo_wid_arg = TRUE;
- # endif
-+# ifndef FEAT_NETBEANS_INTG
-+	else if (strncmp(argv[i], "-nb", (size_t)3) == 0)
-+        {
-+            mch_errmsg(_("'-nb' cannot be used: not enabled at compile time\n"));
-+            mch_exit(2);
-+        }
-+# endif
-+
-     }
- #endif
- }
-@@ -2361,7 +2371,7 @@
-      * Is there any other system that cannot do this?
-      */
-     close(0);
--    dup(2);
-+    ignored = dup(2);
- #endif
- }
- 
-@@ -2369,10 +2379,9 @@
-  * Create the requested number of windows and edit buffers in them.
-  * Also does recovery if "recoverymode" set.
-  */
--/*ARGSUSED*/
-     static void
- create_windows(parmp)
--    mparm_T	*parmp;
-+    mparm_T	*parmp UNUSED;
- {
- #ifdef FEAT_WINDOWS
-     int		dorewind;
-@@ -3840,10 +3849,9 @@
-  * return an allocated string.  Otherwise return "data".
-  * "*tofree" is set to the result when it needs to be freed later.
-  */
--/*ARGSUSED*/
-     char_u *
- serverConvert(client_enc, data, tofree)
--    char_u *client_enc;
-+    char_u *client_enc UNUSED;
-     char_u *data;
-     char_u **tofree;
- {
-diff -Naur vim72.orig/src/Makefile vim72/src/Makefile
---- vim72.orig/src/Makefile	2008-08-09 07:50:04.000000000 -0700
-+++ vim72/src/Makefile	2009-07-19 15:16:49.000000000 -0700
-@@ -105,8 +105,8 @@
- # 4. "make test"  {{{1
- #	This is optional.  This will run Vim scripts on a number of test
- #	files, and compare the produced output with the expected output.
--#	If all is well, you will get the "ALL DONE" message in the end.  See
--#	below (search for "/^test").
-+#	If all is well, you will get the "ALL DONE" message in the end.  If a
-+#	test fails you get "TEST FAILURE".  See below (search for "/^test").
- #
- # 5. "make install"  {{{1
- #	If the new Vim seems to be working OK you can install it and the
-@@ -533,6 +533,11 @@
- #CFLAGS = -g -DDEBUG -Wall -Wshadow -Wmissing-prototypes
- #CFLAGS = -g -O2 '-DSTARTUPTIME="vimstartup"' -fno-strength-reduce -Wall -Wmissing-prototypes
- 
-+# Use this with GCC to check for mistakes, unused arguments, etc.
-+#CFLAGS = -g -Wall -Wextra -Wmissing-prototypes -Wunreachable-code
-+#PYTHON_CFLAGS_EXTRA = -Wno-missing-field-initializers
-+#MZSCHEME_CFLAGS_EXTRA = -Wno-unreachable-code
-+
- # EFENCE - Electric-Fence malloc debugging: catches memory accesses beyond
- # allocated memory (and makes every malloc()/free() very slow).
- # Electric Fence is free (search ftp sites).
-@@ -551,7 +556,13 @@
- # }}}
- 
- # LINT - for running lint
-+#  For standard Unix lint
-+LINT = lint
- LINT_OPTIONS = -beprxzF
-+#  For splint
-+#  It doesn't work well, crashes on include files and non-ascii characters.
-+#LINT = splint
-+#LINT_OPTIONS = +unixlib -weak -macrovarprefixexclude -showfunc -linelen 9999
- 
- # PROFILING - Uncomment the next two lines to do profiling with gcc and gprof.
- # Might not work with GUI or Perl.
-@@ -1259,16 +1270,16 @@
- #     This is for cproto 3 patchlevel 8 or below
- #     __inline, __attribute__ and __extension__ are not recognized by cproto
- #     G_IMPLEMENT_INLINES is to avoid functions defined in glib/gutils.h.
--NO_ATTR = -D__inline= -D__inline__= -DG_IMPLEMENT_INLINES \
--	  -D"__attribute__\\(x\\)=" -D"__asm__\\(x\\)=" \
--	  -D__extension__= -D__restrict="" \
--	  -D__gnuc_va_list=char -D__builtin_va_list=char
-+#NO_ATTR = -D__inline= -D__inline__= -DG_IMPLEMENT_INLINES \
-+#	  -D"__attribute__\\(x\\)=" -D"__asm__\\(x\\)=" \
-+#	  -D__extension__= -D__restrict="" \
-+#	  -D__gnuc_va_list=char -D__builtin_va_list=char
- 
- #
--#     This is for cproto 3 patchlevel 9 or above (currently 4.6)
-+#     This is for cproto 3 patchlevel 9 or above (currently 4.6, 4.7g)
- #     __inline and __attribute__ are now recognized by cproto
- #     -D"foo()=" is not supported by all compilers so do not use it
--# NO_ATTR=
-+NO_ATTR=
- #
- #     maybe the "/usr/bin/cc -E" has to be adjusted for some systems
- # This is for cproto 3.5 patchlevel 3:
-@@ -1432,6 +1443,7 @@
- 	$(SNIFF_SRC) $(WORKSHOP_SRC) $(WSDEBUG_SRC) $(NETBEANS_SRC)
- #LINT_SRC = $(SRC)
- #LINT_SRC = $(ALL_SRC)
-+#LINT_SRC = $(BASIC_SRC)
- 
- OBJ = \
- 	objects/buffer.o \
-@@ -1737,7 +1749,8 @@
- # messages.  Don't worry about that.
- # If there is a real error, there will be a difference between "test.out" and
- # a "test99.ok" file.
--# If everything is alright, the final message will be "ALL DONE".
-+# If everything is alright, the final message will be "ALL DONE".  If not you
-+# get "TEST FAILURE".
- #
- test check:
- 	$(MAKE) -f Makefile $(VIMTARGET)
-@@ -2272,12 +2285,12 @@
- 
- # Run lint.  Clean up the *.ln files that are sometimes left behind.
- lint:
--	lint $(LINT_OPTIONS) $(LINT_CFLAGS) $(LINT_EXTRA) $(LINT_SRC)
-+	$(LINT) $(LINT_OPTIONS) $(LINT_CFLAGS) $(LINT_EXTRA) $(LINT_SRC)
- 	-rm -f *.ln
- 
- # Check dosinst.c with lint.
- lintinstall:
--	lint $(LINT_OPTIONS) -DWIN32 -DUNIX_LINT dosinst.c
-+	$(LINT) $(LINT_OPTIONS) -DWIN32 -DUNIX_LINT dosinst.c
- 	-rm -f dosinst.ln
- 
- ###########################################################################
-@@ -2421,7 +2434,7 @@
- 	$(CCC) -o $@ if_xcmdsrv.c
- 
- objects/if_mzsch.o: if_mzsch.c
--	$(CCC) -o $@ if_mzsch.c
-+	$(CCC) -o $@ $(MZSCHEME_CFLAGS_EXTRA) if_mzsch.c
- 
- objects/if_perl.o: auto/if_perl.c
- 	$(CCC) -o $@ auto/if_perl.c
-@@ -2430,7 +2443,7 @@
- 	$(CCC) -o $@ if_perlsfio.c
- 
- objects/if_python.o: if_python.c
--	$(CCC) -o $@ if_python.c
-+	$(CCC) -o $@ $(PYTHON_CFLAGS_EXTRA) if_python.c
- 
- objects/if_ruby.o: if_ruby.c
- 	$(CCC) -o $@ if_ruby.c
-diff -Naur vim72.orig/src/mark.c vim72/src/mark.c
---- vim72.orig/src/mark.c	2008-08-08 15:06:49.000000000 -0700
-+++ vim72/src/mark.c	2009-07-19 15:16:23.000000000 -0700
-@@ -884,10 +884,9 @@
- /*
-  * print the jumplist
-  */
--/*ARGSUSED*/
-     void
- ex_jumps(eap)
--    exarg_T	*eap;
-+    exarg_T	*eap UNUSED;
- {
-     int		i;
-     char_u	*name;
-@@ -933,10 +932,9 @@
- /*
-  * print the changelist
-  */
--/*ARGSUSED*/
-     void
- ex_changes(eap)
--    exarg_T	*eap;
-+    exarg_T	*eap UNUSED;
- {
-     int		i;
-     char_u	*name;
-@@ -1023,6 +1021,9 @@
-     int		fnum = curbuf->b_fnum;
-     linenr_T	*lp;
-     win_T	*win;
-+#ifdef FEAT_WINDOWS
-+    tabpage_T	*tab;
-+#endif
- 
-     if (line2 < line1 && amount_after == 0L)	    /* nothing to do */
- 	return;
-@@ -1064,7 +1065,7 @@
- 	/* quickfix marks */
- 	qf_mark_adjust(NULL, line1, line2, amount, amount_after);
- 	/* location lists */
--	FOR_ALL_WINDOWS(win)
-+	FOR_ALL_TAB_WINDOWS(tab, win)
- 	    qf_mark_adjust(win, line1, line2, amount, amount_after);
- #endif
- 
-@@ -1086,7 +1087,7 @@
-     /*
-      * Adjust items in all windows related to the current buffer.
-      */
--    FOR_ALL_WINDOWS(win)
-+    FOR_ALL_TAB_WINDOWS(tab, win)
-     {
- #ifdef FEAT_JUMPLIST
- 	if (!cmdmod.lockmarks)
-@@ -1627,15 +1628,17 @@
- 
- /*
-  * Handle marks in the viminfo file:
-- * fp_out == NULL   read marks for current buffer only
-- * fp_out != NULL   copy marks for buffers not in buffer list
-+ * fp_out != NULL: copy marks for buffers not in buffer list
-+ * fp_out == NULL && (flags & VIF_WANT_MARKS): read marks for curbuf only
-+ * fp_out == NULL && (flags & VIF_GET_OLDFILES | VIF_FORCEIT): fill v:oldfiles
-  */
-     void
--copy_viminfo_marks(virp, fp_out, count, eof)
-+copy_viminfo_marks(virp, fp_out, count, eof, flags)
-     vir_T	*virp;
-     FILE	*fp_out;
-     int		count;
-     int		eof;
-+    int		flags;
- {
-     char_u	*line = virp->vir_line;
-     buf_T	*buf;
-@@ -1647,10 +1650,23 @@
-     char_u	*p;
-     char_u	*name_buf;
-     pos_T	pos;
-+#ifdef FEAT_EVAL
-+    list_T	*list = NULL;
-+#endif
- 
-     if ((name_buf = alloc(LSIZE)) == NULL)
- 	return;
-     *name_buf = NUL;
-+
-+#ifdef FEAT_EVAL
-+    if (fp_out == NULL && (flags & (VIF_GET_OLDFILES | VIF_FORCEIT)))
-+    {
-+	list = list_alloc();
-+	if (list != NULL)
-+	    set_vim_var_list(VV_OLDFILES, list);
-+    }
-+#endif
-+
-     num_marked_files = get_viminfo_parameter('\'');
-     while (!eof && (count < num_marked_files || fp_out == NULL))
-     {
-@@ -1681,6 +1697,11 @@
- 	    p++;
- 	*p = NUL;
- 
-+#ifdef FEAT_EVAL
-+	if (list != NULL)
-+	    list_append_string(list, str, -1);
-+#endif
-+
- 	/*
- 	 * If fp_out == NULL, load marks for current buffer.
- 	 * If fp_out != NULL, copy marks for buffers not in buflist.
-@@ -1688,7 +1709,7 @@
- 	load_marks = copy_marks_out = FALSE;
- 	if (fp_out == NULL)
- 	{
--	    if (curbuf->b_ffname != NULL)
-+	    if ((flags & VIF_WANT_MARKS) && curbuf->b_ffname != NULL)
- 	    {
- 		if (*name_buf == NUL)	    /* only need to do this once */
- 		    home_replace(NULL, curbuf->b_ffname, name_buf, LSIZE, TRUE);
-diff -Naur vim72.orig/src/mbyte.c vim72/src/mbyte.c
---- vim72.orig/src/mbyte.c	2008-07-14 05:38:05.000000000 -0700
-+++ vim72/src/mbyte.c	2009-07-19 15:17:33.000000000 -0700
-@@ -127,7 +127,10 @@
- static int dbcs_char2len __ARGS((int c));
- static int dbcs_char2bytes __ARGS((int c, char_u *buf));
- static int dbcs_ptr2len __ARGS((char_u *p));
-+static int dbcs_ptr2len_len __ARGS((char_u *p, int size));
-+static int utf_ptr2cells_len __ARGS((char_u *p, int size));
- static int dbcs_char2cells __ARGS((int c));
-+static int dbcs_ptr2cells_len __ARGS((char_u *p, int size));
- static int dbcs_ptr2char __ARGS((char_u *p));
- 
- /* Lookup table to quickly get the length in bytes of a UTF-8 character from
-@@ -606,9 +609,11 @@
-     if (enc_utf8)
-     {
- 	mb_ptr2len = utfc_ptr2len;
-+	mb_ptr2len_len = utfc_ptr2len_len;
- 	mb_char2len = utf_char2len;
- 	mb_char2bytes = utf_char2bytes;
- 	mb_ptr2cells = utf_ptr2cells;
-+	mb_ptr2cells_len = utf_ptr2cells_len;
- 	mb_char2cells = utf_char2cells;
- 	mb_off2cells = utf_off2cells;
- 	mb_ptr2char = utf_ptr2char;
-@@ -617,9 +622,11 @@
-     else if (enc_dbcs != 0)
-     {
- 	mb_ptr2len = dbcs_ptr2len;
-+	mb_ptr2len_len = dbcs_ptr2len_len;
- 	mb_char2len = dbcs_char2len;
- 	mb_char2bytes = dbcs_char2bytes;
- 	mb_ptr2cells = dbcs_ptr2cells;
-+	mb_ptr2cells_len = dbcs_ptr2cells_len;
- 	mb_char2cells = dbcs_char2cells;
- 	mb_off2cells = dbcs_off2cells;
- 	mb_ptr2char = dbcs_ptr2char;
-@@ -628,9 +635,11 @@
-     else
-     {
- 	mb_ptr2len = latin_ptr2len;
-+	mb_ptr2len_len = latin_ptr2len_len;
- 	mb_char2len = latin_char2len;
- 	mb_char2bytes = latin_char2bytes;
- 	mb_ptr2cells = latin_ptr2cells;
-+	mb_ptr2cells_len = latin_ptr2cells_len;
- 	mb_char2cells = latin_char2cells;
- 	mb_off2cells = latin_off2cells;
- 	mb_ptr2char = latin_ptr2char;
-@@ -717,7 +726,7 @@
- 		     * where mblen() returns 0 for invalid character.
- 		     * Therefore, following condition includes 0.
- 		     */
--		    (void)mblen(NULL, 0);	/* First reset the state. */
-+		    ignored = mblen(NULL, 0);	/* First reset the state. */
- 		    if (mblen(buf, (size_t)1) <= 0)
- 			n = 2;
- 		    else
-@@ -1015,10 +1024,9 @@
-  * Return length in bytes of character "c".
-  * Returns 1 for a single-byte character.
-  */
--/* ARGSUSED */
-     int
- latin_char2len(c)
--    int		c;
-+    int		c UNUSED;
- {
-     return 1;
- }
-@@ -1070,7 +1078,6 @@
-  * Get byte length of character at "*p" but stop at a NUL.
-  * For UTF-8 this includes following composing characters.
-  * Returns 0 when *p is NUL.
-- *
-  */
-     int
- latin_ptr2len(p)
-@@ -1092,6 +1099,40 @@
-     return len;
- }
- 
-+/*
-+ * mb_ptr2len_len() function pointer.
-+ * Like mb_ptr2len(), but limit to read "size" bytes.
-+ * Returns 0 for an empty string.
-+ * Returns 1 for an illegal char or an incomplete byte sequence.
-+ */
-+    int
-+latin_ptr2len_len(p, size)
-+    char_u	*p;
-+    int		size;
-+{
-+    if (size < 1 || *p == NUL)
-+	return 0;
-+    return 1;
-+}
-+
-+    static int
-+dbcs_ptr2len_len(p, size)
-+    char_u	*p;
-+    int		size;
-+{
-+    int		len;
-+
-+    if (size < 1 || *p == NUL)
-+	return 0;
-+    if (size == 1)
-+	return 1;
-+    /* Check that second byte is not missing. */
-+    len = MB_BYTE2LEN(*p);
-+    if (len == 2 && p[1] == NUL)
-+	len = 1;
-+    return len;
-+}
-+
- struct interval
- {
-     unsigned short first;
-@@ -1248,10 +1289,9 @@
-  * Return the number of display cells character at "*p" occupies.
-  * This doesn't take care of unprintable characters, use ptr2cells() for that.
-  */
--/*ARGSUSED*/
-     int
- latin_ptr2cells(p)
--    char_u	*p;
-+    char_u	*p UNUSED;
- {
-     return 1;
- }
-@@ -1289,14 +1329,62 @@
- }
- 
- /*
-+ * mb_ptr2cells_len() function pointer.
-+ * Like mb_ptr2cells(), but limit string length to "size".
-+ * For an empty string or truncated character returns 1.
-+ */
-+    int
-+latin_ptr2cells_len(p, size)
-+    char_u	*p UNUSED;
-+    int		size UNUSED;
-+{
-+    return 1;
-+}
-+
-+    static int
-+utf_ptr2cells_len(p, size)
-+    char_u	*p;
-+    int		size;
-+{
-+    int		c;
-+
-+    /* Need to convert to a wide character. */
-+    if (size > 0 && *p >= 0x80)
-+    {
-+	if (utf_ptr2len_len(p, size) < utf8len_tab[*p])
-+	    return 1;
-+	c = utf_ptr2char(p);
-+	/* An illegal byte is displayed as <xx>. */
-+	if (utf_ptr2len(p) == 1 || c == NUL)
-+	    return 4;
-+	/* If the char is ASCII it must be an overlong sequence. */
-+	if (c < 0x80)
-+	    return char2cells(c);
-+	return utf_char2cells(c);
-+    }
-+    return 1;
-+}
-+
-+    static int
-+dbcs_ptr2cells_len(p, size)
-+    char_u	*p;
-+    int		size;
-+{
-+    /* Number of cells is equal to number of bytes, except for euc-jp when
-+     * the first byte is 0x8e. */
-+    if (size <= 1 || (enc_dbcs == DBCS_JPNU && *p == 0x8e))
-+	return 1;
-+    return MB_BYTE2LEN(*p);
-+}
-+
-+/*
-  * mb_char2cells() function pointer.
-  * Return the number of display cells character "c" occupies.
-  * Only takes care of multi-byte chars, not "^C" and such.
-  */
--/*ARGSUSED*/
-     int
- latin_char2cells(c)
--    int		c;
-+    int		c UNUSED;
- {
-     return 1;
- }
-@@ -1318,11 +1406,10 @@
-  * Return number of display cells for char at ScreenLines[off].
-  * We make sure that the offset used is less than "max_off".
-  */
--/*ARGSUSED*/
-     int
- latin_off2cells(off, max_off)
--    unsigned	off;
--    unsigned	max_off;
-+    unsigned	off UNUSED;
-+    unsigned	max_off UNUSED;
- {
-     return 1;
- }
-@@ -1720,6 +1807,7 @@
- /*
-  * Return the number of bytes the UTF-8 encoding of the character at "p[size]"
-  * takes.  This includes following composing characters.
-+ * Returns 0 for an empty string.
-  * Returns 1 for an illegal char or an incomplete byte sequence.
-  */
-     int
-@@ -1732,7 +1820,7 @@
-     int		prevlen;
- #endif
- 
--    if (*p == NUL)
-+    if (size < 1 || *p == NUL)
- 	return 0;
-     if (p[0] < 0x80 && (size == 1 || p[1] < 0x80)) /* be quick for ASCII */
- 	return 1;
-@@ -2419,11 +2507,10 @@
-  * Return offset from "p" to the first byte of the character it points into.
-  * Returns 0 when already at the first byte of a character.
-  */
--/*ARGSUSED*/
-     int
- latin_head_off(base, p)
--    char_u	*base;
--    char_u	*p;
-+    char_u	*base UNUSED;
-+    char_u	*p UNUSED;
- {
-     return 0;
- }
-@@ -2540,7 +2627,6 @@
-     return (int)(p - q);
- }
- 
--#if defined(FEAT_EVAL) || defined(PROTO)
- /*
-  * Copy a character from "*fp" to "*tp" and advance the pointers.
-  */
-@@ -2555,7 +2641,6 @@
-     *tp += l;
-     *fp += l;
- }
--#endif
- 
- /*
-  * Return the offset from "p" to the first byte of a character.  When "p" is
-@@ -3133,7 +3218,7 @@
- 	else
- 	    s = p + 1;
-     }
--    for (i = 0; s[i] != NUL && s + i < buf + sizeof(buf) - 1; ++i)
-+    for (i = 0; s[i] != NUL && i < (int)sizeof(buf) - 1; ++i)
-     {
- 	if (s[i] == '_' || s[i] == '-')
- 	    buf[i] = '-';
-@@ -3180,7 +3265,7 @@
- 
- # if defined(USE_ICONV) || defined(PROTO)
- 
--static char_u *iconv_string __ARGS((vimconv_T *vcp, char_u *str, int slen, int *unconvlenp));
-+static char_u *iconv_string __ARGS((vimconv_T *vcp, char_u *str, int slen, int *unconvlenp, int *resultlenp));
- 
- /*
-  * Call iconv_open() with a check if iconv() works properly (there are broken
-@@ -3241,13 +3326,15 @@
-  * If "unconvlenp" is not NULL handle the string ending in an incomplete
-  * sequence and set "*unconvlenp" to the length of it.
-  * Returns the converted string in allocated memory.  NULL for an error.
-+ * If resultlenp is not NULL, sets it to the result length in bytes.
-  */
-     static char_u *
--iconv_string(vcp, str, slen, unconvlenp)
-+iconv_string(vcp, str, slen, unconvlenp, resultlenp)
-     vimconv_T	*vcp;
-     char_u	*str;
-     int		slen;
-     int		*unconvlenp;
-+    int		*resultlenp;
- {
-     const char	*from;
-     size_t	fromlen;
-@@ -3333,6 +3420,9 @@
- 	/* Not enough room or skipping illegal sequence. */
- 	done = to - (char *)result;
-     }
-+
-+    if (resultlenp != NULL)
-+	*resultlenp = (int)(to - (char *)result);
-     return result;
- }
- 
-@@ -3584,9 +3674,10 @@
-  * Callback invoked when the user finished preediting.
-  * Put the final string into the input buffer.
-  */
--/*ARGSUSED0*/
-     static void
--im_commit_cb(GtkIMContext *context, const gchar *str, gpointer data)
-+im_commit_cb(GtkIMContext *context UNUSED,
-+	     const gchar *str,
-+	     gpointer data UNUSED)
- {
-     int	slen = (int)STRLEN(str);
-     int	add_to_input = TRUE;
-@@ -3672,9 +3763,8 @@
- /*
-  * Callback invoked after start to the preedit.
-  */
--/*ARGSUSED*/
-     static void
--im_preedit_start_cb(GtkIMContext *context, gpointer data)
-+im_preedit_start_cb(GtkIMContext *context UNUSED, gpointer data UNUSED)
- {
- #ifdef XIM_DEBUG
-     xim_log("im_preedit_start_cb()\n");
-@@ -3689,9 +3779,8 @@
- /*
-  * Callback invoked after end to the preedit.
-  */
--/*ARGSUSED*/
-     static void
--im_preedit_end_cb(GtkIMContext *context, gpointer data)
-+im_preedit_end_cb(GtkIMContext *context UNUSED, gpointer data UNUSED)
- {
- #ifdef XIM_DEBUG
-     xim_log("im_preedit_end_cb()\n");
-@@ -3750,9 +3839,8 @@
-  * remaining input from within the "retrieve_surrounding" signal handler, this
-  * might not be necessary.  Gotta ask on vim-dev for opinions.
-  */
--/*ARGSUSED1*/
-     static void
--im_preedit_changed_cb(GtkIMContext *context, gpointer data)
-+im_preedit_changed_cb(GtkIMContext *context, gpointer data UNUSED)
- {
-     char    *preedit_string = NULL;
-     int	    cursor_index    = 0;
-@@ -4618,11 +4706,10 @@
-     }
- }
- 
--/*ARGSUSED*/
-     void
- im_set_position(row, col)
--    int		row;
--    int		col;
-+    int		row UNUSED;
-+    int		col UNUSED;
- {
-     xim_set_preedit();
- }
-@@ -4929,12 +5016,11 @@
- static void xim_instantiate_cb __ARGS((Display *display, XPointer client_data, XPointer	call_data));
- static void xim_destroy_cb __ARGS((XIM im, XPointer client_data, XPointer call_data));
- 
--/*ARGSUSED*/
-     static void
- xim_instantiate_cb(display, client_data, call_data)
-     Display	*display;
--    XPointer	client_data;
--    XPointer	call_data;
-+    XPointer	client_data UNUSED;
-+    XPointer	call_data UNUSED;
- {
-     Window	x11_window;
-     Display	*x11_display;
-@@ -4954,12 +5040,11 @@
- 					 xim_instantiate_cb, NULL);
- }
- 
--/*ARGSUSED*/
-     static void
- xim_destroy_cb(im, client_data, call_data)
--    XIM		im;
--    XPointer	client_data;
--    XPointer	call_data;
-+    XIM		im UNUSED;
-+    XPointer	client_data UNUSED;
-+    XPointer	call_data UNUSED;
- {
-     Window	x11_window;
-     Display	*x11_display;
-@@ -5278,9 +5363,10 @@
-     }
- }
- 
--/*ARGSUSED*/
-     static void
--preedit_start_cbproc(XIC xic, XPointer client_data, XPointer call_data)
-+preedit_start_cbproc(XIC thexic UNUSED,
-+	             XPointer client_data UNUSED,
-+		     XPointer call_data UNUSED)
- {
- #ifdef XIM_DEBUG
-     xim_log("xim_decide_input_style()\n");
-@@ -5312,9 +5398,10 @@
- static GSList *key_press_event_queue = NULL;
- static gboolean processing_queued_event = FALSE;
- 
--/*ARGSUSED*/
-     static void
--preedit_draw_cbproc(XIC xic, XPointer client_data, XPointer call_data)
-+preedit_draw_cbproc(XIC thexic UNUSED,
-+		    XPointer client_data UNUSED,
-+		    XPointer call_data)
- {
-     XIMPreeditDrawCallbackStruct *draw_data;
-     XIMText	*text;
-@@ -5386,7 +5473,7 @@
- 			draw_feedback = (char *)alloc(draw_data->chg_first
- 							      + text->length);
- 		    else
--			draw_feedback = realloc(draw_feedback,
-+			draw_feedback = vim_realloc(draw_feedback,
- 					 draw_data->chg_first + text->length);
- 		    if (draw_feedback != NULL)
- 		    {
-@@ -5453,18 +5540,20 @@
-     return -1;
- }
- 
--/*ARGSUSED*/
-     static void
--preedit_caret_cbproc(XIC xic, XPointer client_data, XPointer call_data)
-+preedit_caret_cbproc(XIC thexic UNUSED,
-+		     XPointer client_data UNUSED,
-+		     XPointer call_data UNUSED)
- {
- #ifdef XIM_DEBUG
-     xim_log("preedit_caret_cbproc()\n");
- #endif
- }
- 
--/*ARGSUSED*/
-     static void
--preedit_done_cbproc(XIC xic, XPointer client_data, XPointer call_data)
-+preedit_done_cbproc(XIC thexic UNUSED,
-+		    XPointer client_data UNUSED,
-+		    XPointer call_data UNUSED)
- {
- #ifdef XIM_DEBUG
-     xim_log("preedit_done_cbproc()\n");
-@@ -5503,9 +5592,8 @@
-     }
- }
- 
--/*ARGSUSED*/
-     int
--xim_queue_key_press_event(GdkEventKey *event, int down)
-+xim_queue_key_press_event(GdkEventKey *event, int down UNUSED)
- {
- #ifdef XIM_DEBUG
-     xim_log("xim_queue_key_press_event()\n");
-@@ -5521,9 +5609,8 @@
-     return TRUE;
- }
- 
--/*ARGSUSED*/
-     static void
--preedit_callback_setup(GdkIC *ic)
-+preedit_callback_setup(GdkIC *ic UNUSED)
- {
-     XIC xxic;
-     XVaNestedList preedit_attr;
-@@ -5548,9 +5635,8 @@
-     XFree(preedit_attr);
- }
- 
--/*ARGSUSED*/
-     static void
--reset_state_setup(GdkIC *ic)
-+reset_state_setup(GdkIC *ic UNUSED)
- {
- #ifdef USE_X11R6_XIM
-     /* don't change the input context when we call reset */
-@@ -5756,8 +5842,25 @@
-     char_u	*from;
-     char_u	*to;
- {
-+    return convert_setup_ext(vcp, from, TRUE, to, TRUE);
-+}
-+
-+/*
-+ * As convert_setup(), but only when from_unicode_is_utf8 is TRUE will all
-+ * "from" unicode charsets be considered utf-8.  Same for "to".
-+ */
-+    int
-+convert_setup_ext(vcp, from, from_unicode_is_utf8, to, to_unicode_is_utf8)
-+    vimconv_T	*vcp;
-+    char_u	*from;
-+    int		from_unicode_is_utf8;
-+    char_u	*to;
-+    int		to_unicode_is_utf8;
-+{
-     int		from_prop;
-     int		to_prop;
-+    int		from_is_utf8;
-+    int		to_is_utf8;
- 
-     /* Reset to no conversion. */
- # ifdef USE_ICONV
-@@ -5775,37 +5878,46 @@
- 
-     from_prop = enc_canon_props(from);
-     to_prop = enc_canon_props(to);
--    if ((from_prop & ENC_LATIN1) && (to_prop & ENC_UNICODE))
-+    if (from_unicode_is_utf8)
-+	from_is_utf8 = from_prop & ENC_UNICODE;
-+    else
-+	from_is_utf8 = from_prop == ENC_UNICODE;
-+    if (to_unicode_is_utf8)
-+	to_is_utf8 = to_prop & ENC_UNICODE;
-+    else
-+	to_is_utf8 = to_prop == ENC_UNICODE;
-+
-+    if ((from_prop & ENC_LATIN1) && to_is_utf8)
-     {
- 	/* Internal latin1 -> utf-8 conversion. */
- 	vcp->vc_type = CONV_TO_UTF8;
- 	vcp->vc_factor = 2;	/* up to twice as long */
-     }
--    else if ((from_prop & ENC_LATIN9) && (to_prop & ENC_UNICODE))
-+    else if ((from_prop & ENC_LATIN9) && to_is_utf8)
-     {
- 	/* Internal latin9 -> utf-8 conversion. */
- 	vcp->vc_type = CONV_9_TO_UTF8;
- 	vcp->vc_factor = 3;	/* up to three as long (euro sign) */
-     }
--    else if ((from_prop & ENC_UNICODE) && (to_prop & ENC_LATIN1))
-+    else if (from_is_utf8 && (to_prop & ENC_LATIN1))
-     {
- 	/* Internal utf-8 -> latin1 conversion. */
- 	vcp->vc_type = CONV_TO_LATIN1;
-     }
--    else if ((from_prop & ENC_UNICODE) && (to_prop & ENC_LATIN9))
-+    else if (from_is_utf8 && (to_prop & ENC_LATIN9))
-     {
- 	/* Internal utf-8 -> latin9 conversion. */
- 	vcp->vc_type = CONV_TO_LATIN9;
-     }
- #ifdef WIN3264
-     /* Win32-specific codepage <-> codepage conversion without iconv. */
--    else if (((from_prop & ENC_UNICODE) || encname2codepage(from) > 0)
--	    && ((to_prop & ENC_UNICODE) || encname2codepage(to) > 0))
-+    else if ((from_is_utf8 || encname2codepage(from) > 0)
-+	    && (to_is_utf8 || encname2codepage(to) > 0))
-     {
- 	vcp->vc_type = CONV_CODEPAGE;
- 	vcp->vc_factor = 2;	/* up to twice as long */
--	vcp->vc_cpfrom = (from_prop & ENC_UNICODE) ? 0 : encname2codepage(from);
--	vcp->vc_cpto = (to_prop & ENC_UNICODE) ? 0 : encname2codepage(to);
-+	vcp->vc_cpfrom = from_is_utf8 ? 0 : encname2codepage(from);
-+	vcp->vc_cpto = to_is_utf8 ? 0 : encname2codepage(to);
-     }
- #endif
- #ifdef MACOS_X
-@@ -5813,7 +5925,7 @@
-     {
- 	vcp->vc_type = CONV_MAC_LATIN1;
-     }
--    else if ((from_prop & ENC_MACROMAN) && (to_prop & ENC_UNICODE))
-+    else if ((from_prop & ENC_MACROMAN) && to_is_utf8)
-     {
- 	vcp->vc_type = CONV_MAC_UTF8;
- 	vcp->vc_factor = 2;	/* up to twice as long */
-@@ -5822,7 +5934,7 @@
-     {
- 	vcp->vc_type = CONV_LATIN1_MAC;
-     }
--    else if ((from_prop & ENC_UNICODE) && (to_prop & ENC_MACROMAN))
-+    else if (from_is_utf8 && (to_prop & ENC_MACROMAN))
-     {
- 	vcp->vc_type = CONV_UTF8_MAC;
-     }
-@@ -5832,8 +5944,8 @@
-     {
- 	/* Use iconv() for conversion. */
- 	vcp->vc_fd = (iconv_t)my_iconv_open(
--		(to_prop & ENC_UNICODE) ? (char_u *)"utf-8" : to,
--		(from_prop & ENC_UNICODE) ? (char_u *)"utf-8" : from);
-+		to_is_utf8 ? (char_u *)"utf-8" : to,
-+		from_is_utf8 ? (char_u *)"utf-8" : from);
- 	if (vcp->vc_fd != (iconv_t)-1)
- 	{
- 	    vcp->vc_type = CONV_ICONV;
-@@ -6089,9 +6201,7 @@
- 
- # ifdef USE_ICONV
- 	case CONV_ICONV:	/* conversion with output_conv.vc_fd */
--	    retval = iconv_string(vcp, ptr, len, unconvlenp);
--	    if (retval != NULL && lenp != NULL)
--		*lenp = (int)STRLEN(retval);
-+	    retval = iconv_string(vcp, ptr, len, unconvlenp, lenp);
- 	    break;
- # endif
- # ifdef WIN3264
-diff -Naur vim72.orig/src/memline.c vim72/src/memline.c
---- vim72.orig/src/memline.c	2008-07-13 09:19:22.000000000 -0700
-+++ vim72/src/memline.c	2009-07-19 15:15:19.000000000 -0700
-@@ -1554,10 +1554,15 @@
- 	    for (i = 0; i < num_files; ++i)
- 		if (fullpathcmp(p, files[i], TRUE) & FPC_SAME)
- 		{
-+		    /* Remove the name from files[i].  Move further entries
-+		     * down.  When the array becomes empty free it here, since
-+		     * FreeWild() won't be called below. */
- 		    vim_free(files[i]);
--		    --num_files;
--		    for ( ; i < num_files; ++i)
--			files[i] = files[i + 1];
-+		    if (--num_files == 0)
-+			vim_free(files);
-+		    else
-+			for ( ; i < num_files; ++i)
-+			    files[i] = files[i + 1];
- 		}
- 	}
- 	if (nr > 0)
-@@ -3522,7 +3527,7 @@
- 	    if (errno == EINVAL || errno == ENOENT)
- 	    {
- 		/* Found non-symlink or not existing file, stop here.
--		 * When at the first level use the unmodifed name, skip the
-+		 * When at the first level use the unmodified name, skip the
- 		 * call to vim_FullName(). */
- 		if (depth == 1)
- 		    return FAIL;
-@@ -3766,8 +3771,10 @@
-     set_vim_var_string(VV_SWAPCHOICE, NULL, -1);
- 
-     /* Trigger SwapExists autocommands with <afile> set to the file being
--     * edited. */
-+     * edited.  Disallow changing directory here. */
-+    ++allbuf_lock;
-     apply_autocmds(EVENT_SWAPEXISTS, buf->b_fname, NULL, FALSE, NULL);
-+    --allbuf_lock;
- 
-     set_vim_var_string(VV_SWAPNAME, NULL, -1);
- 
-@@ -3793,6 +3800,7 @@
-  *
-  * Note: If BASENAMELEN is not correct, you will get error messages for
-  *	 not being able to open the swapfile
-+ * Note: May trigger SwapExists autocmd, pointers may change!
-  */
-     static char_u *
- findswapname(buf, dirp, old_fname)
-@@ -4560,7 +4568,7 @@
- 			buf->b_ml.ml_chunksize + curix,
- 			(buf->b_ml.ml_usedchunks - curix) *
- 			sizeof(chunksize_T));
--	    /* Compute length of first half of lines in the splitted chunk */
-+	    /* Compute length of first half of lines in the split chunk */
- 	    size = 0;
- 	    linecnt = 0;
- 	    while (curline < buf->b_ml.ml_line_count
-diff -Naur vim72.orig/src/menu.c vim72/src/menu.c
---- vim72.orig/src/menu.c	2008-06-21 12:53:43.000000000 -0700
-+++ vim72/src/menu.c	2009-07-19 15:16:33.000000000 -0700
-@@ -231,7 +231,7 @@
- 		if (skipdigits(menu_path + 7) == p)
- 		{
- 		    menuarg.iconidx = atoi((char *)menu_path + 7);
--		    if (menuarg.iconidx >= TOOLBAR_NAME_COUNT)
-+		    if (menuarg.iconidx >= (int)TOOLBAR_NAME_COUNT)
- 			menuarg.iconidx = -1;
- 		    else
- 			menuarg.icon_builtin = TRUE;
-@@ -239,7 +239,7 @@
- 	    }
- 	    else
- 	    {
--		for (i = 0; i < TOOLBAR_NAME_COUNT; ++i)
-+		for (i = 0; i < (int)TOOLBAR_NAME_COUNT; ++i)
- 		    if (STRNCMP(toolbar_names[i], menu_path, p - menu_path)
- 									 == 0)
- 		    {
-@@ -1120,6 +1120,7 @@
- 	parent = menu;
- 	menu = menu->children;
-     }
-+    vim_free(path_name);
- 
-     /* Now we have found the matching menu, and we list the mappings */
- 						    /* Highlight title */
-@@ -1340,10 +1341,9 @@
-  * Function given to ExpandGeneric() to obtain the list of (sub)menus (not
-  * entries).
-  */
--/*ARGSUSED*/
-     char_u *
- get_menu_name(xp, idx)
--    expand_T	*xp;
-+    expand_T	*xp UNUSED;
-     int		idx;
- {
-     static vimmenu_T	*menu = NULL;
-@@ -1377,10 +1377,9 @@
-  * Function given to ExpandGeneric() to obtain the list of menus and menu
-  * entries.
-  */
--/*ARGSUSED*/
-     char_u *
- get_menu_names(xp, idx)
--    expand_T	*xp;
-+    expand_T	*xp UNUSED;
-     int		idx;
- {
-     static vimmenu_T	*menu = NULL;
-@@ -1738,10 +1737,9 @@
- /*
-  * Return TRUE if the menu is the tearoff menu.
-  */
--/*ARGSUSED*/
-     static int
- menu_is_tearoff(name)
--    char_u *name;
-+    char_u *name UNUSED;
- {
- #ifdef FEAT_GUI
-     return (STRCMP(name, TEAR_STRING) == 0);
-@@ -2342,10 +2340,9 @@
-  * This function is also defined without the +multi_lang feature, in which
-  * case the commands are ignored.
-  */
--/*ARGSUSED*/
-     void
- ex_menutranslate(eap)
--    exarg_T	*eap;
-+    exarg_T	*eap UNUSED;
- {
- #ifdef FEAT_MULTI_LANG
-     char_u		*arg = eap->arg;
-diff -Naur vim72.orig/src/message.c vim72/src/message.c
---- vim72.orig/src/message.c	2008-07-09 11:24:55.000000000 -0700
-+++ vim72/src/message.c	2009-07-19 15:18:26.000000000 -0700
-@@ -107,7 +107,7 @@
- }
- 
- #if defined(FEAT_EVAL) || defined(FEAT_X11) || defined(USE_XSMP) \
--    || defined(PROTO)
-+    || defined(FEAT_GUI_GTK) || defined(PROTO)
- /*
-  * Like msg() but keep it silent when 'verbosefile' is set.
-  */
-@@ -818,10 +818,9 @@
- /*
-  * ":messages" command.
-  */
--/*ARGSUSED*/
-     void
- ex_messages(eap)
--    exarg_T	*eap;
-+    exarg_T	*eap UNUSED;
- {
-     struct msg_hist *p;
-     char_u	    *s;
-@@ -976,7 +975,7 @@
- 		    }
- 		}
- 		else if (msg_scrolled > Rows - 2
--				     && (c == 'j' || c == K_DOWN || c == 'd'))
-+			 && (c == 'j' || c == K_DOWN || c == 'd' || c == 'f'))
- 		    c = K_IGNORE;
- 	    }
- 	} while ((had_got_int && c == Ctrl_C)
-@@ -2504,7 +2503,6 @@
- 	    break;
- 
- 	case 'u':		/* Up half a page */
--	case K_PAGEUP:
- 	    scroll = -(Rows / 2);
- 	    break;
- 
-@@ -2513,10 +2511,12 @@
- 	    break;
- 
- 	case 'b':		/* one page back */
-+	case K_PAGEUP:
- 	    scroll = -(Rows - 1);
- 	    break;
- 
- 	case ' ':		/* one extra page */
-+	case 'f':
- 	case K_PAGEDOWN:
- 	case K_LEFTMOUSE:
- 	    scroll = Rows - 1;
-@@ -2552,7 +2552,6 @@
- 	    {
- 		/* Jump to the choices of the dialog. */
- 		retval = TRUE;
--		lines_left = Rows - 1;
- 	    }
- 	    else
- #endif
-@@ -2560,6 +2559,9 @@
- 		got_int = TRUE;
- 		quit_more = TRUE;
- 	    }
-+	    /* When there is some more output (wrapping line) display that
-+	     * without another prompt. */
-+	    lines_left = Rows - 1;
- 	    break;
- 
- #ifdef FEAT_CLIPBOARD
-@@ -3020,11 +3022,7 @@
-     if (*p_vfile != NUL)
- 	verbose_write(s, maxlen);
- 
--    if (redir_fd != NULL
--#ifdef FEAT_EVAL
--			  || redir_reg || redir_vname
--#endif
--				       )
-+    if (redirecting())
-     {
- 	/* If the string doesn't start with CR or NL, go to msg_col */
- 	if (*s != '\n' && *s != '\r')
-@@ -3071,6 +3069,16 @@
-     }
- }
- 
-+    int
-+redirecting()
-+{
-+    return redir_fd != NULL
-+#ifdef FEAT_EVAL
-+			  || redir_reg || redir_vname
-+#endif
-+				       ;
-+}
-+
- /*
-  * Before giving verbose message.
-  * Must always be called paired with verbose_leave()!
-@@ -3281,15 +3289,15 @@
-  * A '&' in a button name becomes a shortcut, so each '&' should be before a
-  * different letter.
-  */
--/* ARGSUSED */
-     int
- do_dialog(type, title, message, buttons, dfltbutton, textfield)
--    int		type;
--    char_u	*title;
-+    int		type UNUSED;
-+    char_u	*title UNUSED;
-     char_u	*message;
-     char_u	*buttons;
-     int		dfltbutton;
--    char_u	*textfield;	/* IObuff for inputdialog(), NULL otherwise */
-+    char_u	*textfield UNUSED;	/* IObuff for inputdialog(), NULL
-+					   otherwise */
- {
-     int		oldState;
-     int		retval = 0;
-@@ -3309,7 +3317,10 @@
-     {
- 	c = gui_mch_dialog(type, title, message, buttons, dfltbutton,
- 								   textfield);
--	msg_end_prompt();
-+	/* avoid a hit-enter prompt without clearing the cmdline */
-+	need_wait_return = FALSE;
-+	emsg_on_display = FALSE;
-+	cmdline_row = msg_row;
- 
- 	/* Flush output to avoid that further messages and redrawing is done
- 	 * in the wrong order. */
-@@ -4009,7 +4020,7 @@
- 	if (*p != '%')
- 	{
- 	    char    *q = strchr(p + 1, '%');
--	    size_t  n = (q == NULL) ? STRLEN(p) : (q - p);
-+	    size_t  n = (q == NULL) ? STRLEN(p) : (size_t)(q - p);
- 
- 	    /* Copy up to the next '%' or NUL without any changes. */
- 	    if (str_l < str_m)
-@@ -4256,7 +4267,8 @@
- 				  precision <= (size_t)0x7fffffffL ? precision
- 						       : (size_t)0x7fffffffL);
- #endif
--			str_arg_l = (q == NULL) ? precision : q - str_arg;
-+			str_arg_l = (q == NULL) ? precision
-+						      : (size_t)(q - str_arg);
- 		    }
- 		    break;
- 
-@@ -4356,7 +4368,8 @@
- 					    get_a_arg(arg_idx);
- #else
- # if defined(FEAT_EVAL)
--					    tvs != NULL ? tv_nr(tvs, &arg_idx) :
-+					    tvs != NULL ? (unsigned)
-+							tv_nr(tvs, &arg_idx) :
- # endif
- 						va_arg(ap, unsigned int);
- #endif
-@@ -4369,7 +4382,8 @@
- 					    get_a_arg(arg_idx);
- #else
- # if defined(FEAT_EVAL)
--					    tvs != NULL ? tv_nr(tvs, &arg_idx) :
-+					    tvs != NULL ? (unsigned long)
-+							tv_nr(tvs, &arg_idx) :
- # endif
- 						va_arg(ap, unsigned long int);
- #endif
-@@ -4556,7 +4570,13 @@
- 			remove_trailing_zeroes = TRUE;
- 		    }
- 
--		    if (fmt_spec == 'f' && abs_f > 1.0e307)
-+		    if (fmt_spec == 'f' &&
-+#ifdef VAX
-+			    abs_f > 1.0e38
-+#else
-+			    abs_f > 1.0e307
-+#endif
-+			    )
- 		    {
- 			/* Avoid a buffer overflow */
- 			strcpy(tmp, "inf");
-@@ -4585,61 +4605,62 @@
- 			if (remove_trailing_zeroes)
- 			{
- 			    int i;
--			    char *p;
-+			    char *tp;
- 
- 			    /* Using %g or %G: remove superfluous zeroes. */
- 			    if (fmt_spec == 'f')
--				p = tmp + str_arg_l - 1;
-+				tp = tmp + str_arg_l - 1;
- 			    else
- 			    {
--				p = (char *)vim_strchr((char_u *)tmp,
-+				tp = (char *)vim_strchr((char_u *)tmp,
- 						 fmt_spec == 'e' ? 'e' : 'E');
--				if (p != NULL)
-+				if (tp != NULL)
- 				{
- 				    /* Remove superfluous '+' and leading
- 				     * zeroes from the exponent. */
--				    if (p[1] == '+')
-+				    if (tp[1] == '+')
- 				    {
- 					/* Change "1.0e+07" to "1.0e07" */
--					STRMOVE(p + 1, p + 2);
-+					STRMOVE(tp + 1, tp + 2);
- 					--str_arg_l;
- 				    }
--				    i = (p[1] == '-') ? 2 : 1;
--				    while (p[i] == '0')
-+				    i = (tp[1] == '-') ? 2 : 1;
-+				    while (tp[i] == '0')
- 				    {
- 					/* Change "1.0e07" to "1.0e7" */
--					STRMOVE(p + i, p + i + 1);
-+					STRMOVE(tp + i, tp + i + 1);
- 					--str_arg_l;
- 				    }
--				    --p;
-+				    --tp;
- 				}
- 			    }
- 
--			    if (p != NULL && !precision_specified)
-+			    if (tp != NULL && !precision_specified)
- 				/* Remove trailing zeroes, but keep the one
- 				 * just after a dot. */
--				while (p > tmp + 2 && *p == '0' && p[-1] != '.')
-+				while (tp > tmp + 2 && *tp == '0'
-+							     && tp[-1] != '.')
- 				{
--				    STRMOVE(p, p + 1);
--				    --p;
-+				    STRMOVE(tp, tp + 1);
-+				    --tp;
- 				    --str_arg_l;
- 				}
- 			}
- 			else
- 			{
--			    char *p;
-+			    char *tp;
- 
- 			    /* Be consistent: some printf("%e") use 1.0e+12
- 			     * and some 1.0e+012.  Remove one zero in the last
- 			     * case. */
--			    p = (char *)vim_strchr((char_u *)tmp,
-+			    tp = (char *)vim_strchr((char_u *)tmp,
- 						 fmt_spec == 'e' ? 'e' : 'E');
--			    if (p != NULL && (p[1] == '+' || p[1] == '-')
--					  && p[2] == '0'
--					  && vim_isdigit(p[3])
--					  && vim_isdigit(p[4]))
-+			    if (tp != NULL && (tp[1] == '+' || tp[1] == '-')
-+					  && tp[2] == '0'
-+					  && vim_isdigit(tp[3])
-+					  && vim_isdigit(tp[4]))
- 			    {
--				STRMOVE(p + 2, p + 3);
-+				STRMOVE(tp + 2, tp + 3);
- 				--str_arg_l;
- 			    }
- 			}
-@@ -4685,7 +4706,8 @@
- 			size_t avail = str_m - str_l;
- 
- 			vim_memset(str + str_l, zero_padding ? '0' : ' ',
--					     (size_t)pn > avail ? avail : pn);
-+					     (size_t)pn > avail ? avail
-+								: (size_t)pn);
- 		    }
- 		    str_l += pn;
- 		}
-@@ -4712,7 +4734,8 @@
- 			size_t avail = str_m - str_l;
- 
- 			mch_memmove(str + str_l, str_arg,
--					     (size_t)zn > avail ? avail : zn);
-+					     (size_t)zn > avail ? avail
-+								: (size_t)zn);
- 		    }
- 		    str_l += zn;
- 		}
-@@ -4727,7 +4750,8 @@
- 			size_t avail = str_m-str_l;
- 
- 			vim_memset(str + str_l, '0',
--					     (size_t)zn > avail ? avail : zn);
-+					     (size_t)zn > avail ? avail
-+								: (size_t)zn);
- 		    }
- 		    str_l += zn;
- 		}
-@@ -4746,7 +4770,7 @@
- 
- 			mch_memmove(str + str_l,
- 				str_arg + zero_padding_insertion_ind,
--				(size_t)sn > avail ? avail : sn);
-+				(size_t)sn > avail ? avail : (size_t)sn);
- 		    }
- 		    str_l += sn;
- 		}
-@@ -4766,7 +4790,8 @@
- 			size_t avail = str_m - str_l;
- 
- 			vim_memset(str + str_l, ' ',
--					     (size_t)pn > avail ? avail : pn);
-+					     (size_t)pn > avail ? avail
-+								: (size_t)pn);
- 		    }
- 		    str_l += pn;
- 		}
-diff -Naur vim72.orig/src/misc1.c vim72/src/misc1.c
---- vim72.orig/src/misc1.c	2008-07-12 12:20:53.000000000 -0700
-+++ vim72/src/misc1.c	2009-07-19 15:19:00.000000000 -0700
-@@ -2188,12 +2188,11 @@
-  *
-  * return FAIL for failure, OK otherwise
-  */
--/*ARGSUSED*/
-     int
- del_bytes(count, fixpos_arg, use_delcombine)
-     long	count;
-     int		fixpos_arg;
--    int		use_delcombine;	    /* 'delcombine' option applies */
-+    int		use_delcombine UNUSED;	    /* 'delcombine' option applies */
- {
-     char_u	*oldp, *newp;
-     colnr_T	oldlen;
-@@ -2346,12 +2345,13 @@
-     int		undo;		/* if TRUE, prepare for undo */
- {
-     long	n;
-+    linenr_T	first = curwin->w_cursor.lnum;
- 
-     if (nlines <= 0)
- 	return;
- 
-     /* save the deleted lines for undo */
--    if (undo && u_savedel(curwin->w_cursor.lnum, nlines) == FAIL)
-+    if (undo && u_savedel(first, nlines) == FAIL)
- 	return;
- 
-     for (n = 0; n < nlines; )
-@@ -2359,18 +2359,21 @@
- 	if (curbuf->b_ml.ml_flags & ML_EMPTY)	    /* nothing to delete */
- 	    break;
- 
--	ml_delete(curwin->w_cursor.lnum, TRUE);
-+	ml_delete(first, TRUE);
- 	++n;
- 
- 	/* If we delete the last line in the file, stop */
--	if (curwin->w_cursor.lnum > curbuf->b_ml.ml_line_count)
-+	if (first > curbuf->b_ml.ml_line_count)
- 	    break;
-     }
--    /* adjust marks, mark the buffer as changed and prepare for displaying */
--    deleted_lines_mark(curwin->w_cursor.lnum, n);
- 
-+    /* Correct the cursor position before calling deleted_lines_mark(), it may
-+     * trigger a callback to display the cursor. */
-     curwin->w_cursor.col = 0;
-     check_cursor_lnum();
-+
-+    /* adjust marks, mark the buffer as changed and prepare for displaying */
-+    deleted_lines_mark(first, n);
- }
- 
-     int
-@@ -2622,6 +2625,8 @@
- 
- /*
-  * Like deleted_lines(), but adjust marks first.
-+ * Make sure the cursor is on a valid line before calling, a GUI callback may
-+ * be triggered to display the cursor.
-  */
-     void
- deleted_lines_mark(lnum, count)
-@@ -2717,6 +2722,9 @@
-     long	xtra;
- {
-     win_T	*wp;
-+#ifdef FEAT_WINDOWS
-+    tabpage_T	*tp;
-+#endif
-     int		i;
- #ifdef FEAT_JUMPLIST
-     int		cols;
-@@ -2769,7 +2777,7 @@
- 		    curbuf->b_changelistlen = JUMPLISTSIZE - 1;
- 		    mch_memmove(curbuf->b_changelist, curbuf->b_changelist + 1,
- 					  sizeof(pos_T) * (JUMPLISTSIZE - 1));
--		    FOR_ALL_WINDOWS(wp)
-+		    FOR_ALL_TAB_WINDOWS(tp, wp)
- 		    {
- 			/* Correct position in changelist for other windows on
- 			 * this buffer. */
-@@ -2777,7 +2785,7 @@
- 			    --wp->w_changelistidx;
- 		    }
- 		}
--		FOR_ALL_WINDOWS(wp)
-+		FOR_ALL_TAB_WINDOWS(tp, wp)
- 		{
- 		    /* For other windows, if the position in the changelist is
- 		     * at the end it stays at the end. */
-@@ -2796,7 +2804,7 @@
- #endif
-     }
- 
--    FOR_ALL_WINDOWS(wp)
-+    FOR_ALL_TAB_WINDOWS(tp, wp)
-     {
- 	if (wp->w_buffer == curbuf)
- 	{
-@@ -2955,6 +2963,8 @@
-     int	    col;		/* column for message; non-zero when in insert
- 				   mode and 'showmode' is on */
- {
-+    static char *w_readonly = N_("W10: Warning: Changing a readonly file");
-+
-     if (curbuf->b_did_warn == FALSE
- 	    && curbufIsChanged() == 0
- #ifdef FEAT_AUTOCMD
-@@ -2977,8 +2987,10 @@
- 	if (msg_row == Rows - 1)
- 	    msg_col = col;
- 	msg_source(hl_attr(HLF_W));
--	MSG_PUTS_ATTR(_("W10: Warning: Changing a readonly file"),
--						   hl_attr(HLF_W) | MSG_HIST);
-+	MSG_PUTS_ATTR(_(w_readonly), hl_attr(HLF_W) | MSG_HIST);
-+#ifdef FEAT_EVAL
-+	set_vim_var_string(VV_WARNINGMSG, (char_u *)_(w_readonly), -1);
-+#endif
- 	msg_clr_eos();
- 	(void)msg_end();
- 	if (msg_silent == 0 && !silent_mode)
-@@ -3245,9 +3257,9 @@
- 
-     /* When using ":silent" assume that <CR> was entered. */
-     if (mouse_used != NULL)
--	MSG_PUTS(_("Type number or click with mouse (<Enter> cancels): "));
-+	MSG_PUTS(_("Type number and <Enter> or click with mouse (empty cancels): "));
-     else
--	MSG_PUTS(_("Choice number (<Enter> cancels): "));
-+	MSG_PUTS(_("Type number and <Enter> (empty cancels): "));
- 
-     /* Set the state such that text can be selected/copied/pasted and we still
-      * get mouse events. */
-@@ -4141,10 +4153,9 @@
- /*
-  * Function given to ExpandGeneric() to obtain an environment variable name.
-  */
--/*ARGSUSED*/
-     char_u *
- get_env_name(xp, idx)
--    expand_T	*xp;
-+    expand_T	*xp UNUSED;
-     int		idx;
- {
- # if defined(AMIGA) || defined(__MRC__) || defined(__SC__)
-@@ -4736,9 +4747,9 @@
- 	 * If it is then restrict the search to below this line and try again.
- 	 */
- 	line = ml_get(pos->lnum);
--	for (p = line; *p && (unsigned)(p - line) < pos->col; ++p)
-+	for (p = line; *p && (colnr_T)(p - line) < pos->col; ++p)
- 	    p = skip_string(p);
--	if ((unsigned)(p - line) <= pos->col)
-+	if ((colnr_T)(p - line) <= pos->col)
- 	    break;
- 	cur_maxcomment = curwin->w_cursor.lnum - pos->lnum - 1;
- 	if (cur_maxcomment <= 0)
-@@ -6269,7 +6280,7 @@
-      * check for that.
-      */
-     if ((State & INSERT)
--	    && curwin->w_cursor.col < STRLEN(linecopy)
-+	    && curwin->w_cursor.col < (colnr_T)STRLEN(linecopy)
- 	    && linecopy[curwin->w_cursor.col] == ')')
- 	linecopy[curwin->w_cursor.col] = NUL;
- 
-@@ -8522,11 +8533,25 @@
-     for (setsuf = p_su; *setsuf; )
-     {
- 	setsuflen = copy_option_part(&setsuf, suf_buf, MAXSUFLEN, ".,");
--	if (fnamelen >= setsuflen
--		&& fnamencmp(suf_buf, fname + fnamelen - setsuflen,
--					      (size_t)setsuflen) == 0)
--	    break;
--	setsuflen = 0;
-+	if (setsuflen == 0)
-+	{
-+	    char_u *tail = gettail(fname);
-+
-+	    /* empty entry: match name without a '.' */
-+	    if (vim_strchr(tail, '.') == NULL)
-+	    {
-+		setsuflen = 1;
-+		break;
-+	    }
-+	}
-+	else
-+	{
-+	    if (fnamelen >= setsuflen
-+		    && fnamencmp(suf_buf, fname + fnamelen - setsuflen,
-+						  (size_t)setsuflen) == 0)
-+		break;
-+	    setsuflen = 0;
-+	}
-     }
-     return (setsuflen != 0);
- }
-@@ -9188,7 +9213,7 @@
- 		else if (vim_strpbrk(p, (char_u *)"$~") != NULL)
- 		{
- 		    vim_free(p);
--		    ga_clear(&ga);
-+		    ga_clear_strings(&ga);
- 		    i = mch_expand_wildcards(num_pat, pat, num_file, file,
- 								       flags);
- 		    recursive = FALSE;
-diff -Naur vim72.orig/src/misc2.c vim72/src/misc2.c
---- vim72.orig/src/misc2.c	2008-07-23 12:12:56.000000000 -0700
-+++ vim72/src/misc2.c	2009-07-19 15:16:25.000000000 -0700
-@@ -496,7 +496,8 @@
- {
-     colnr_T len;
- #ifdef FEAT_VIRTUALEDIT
--    colnr_T oldcol = curwin->w_cursor.col + curwin->w_cursor.coladd;
-+    colnr_T oldcol = curwin->w_cursor.col;
-+    colnr_T oldcoladd = curwin->w_cursor.col + curwin->w_cursor.coladd;
- #endif
- 
-     len = (colnr_T)STRLEN(ml_get_curline());
-@@ -535,7 +536,13 @@
-     if (oldcol == MAXCOL)
- 	curwin->w_cursor.coladd = 0;
-     else if (ve_flags == VE_ALL)
--	curwin->w_cursor.coladd = oldcol - curwin->w_cursor.col;
-+    {
-+	if (oldcoladd > curwin->w_cursor.col)
-+	    curwin->w_cursor.coladd = oldcoladd - curwin->w_cursor.col;
-+	else
-+	    /* avoid weird number when there is a miscalculation or overflow */
-+	    curwin->w_cursor.coladd = 0;
-+    }
- #endif
- }
- 
-@@ -873,7 +880,7 @@
- 	    /* 3. check for available memory: call mch_avail_mem() */
- 	    if (mch_avail_mem(TRUE) < KEEP_ROOM && !releasing)
- 	    {
--		vim_free((char *)p);	/* System is low... no go! */
-+		free((char *)p);	/* System is low... no go! */
- 		p = NULL;
- 	    }
- 	    else
-@@ -1010,6 +1017,9 @@
- # if defined(FEAT_PROFILE)
-     do_cmdline_cmd((char_u *)"profdel *");
- # endif
-+# if defined(FEAT_KEYMAP)
-+    do_cmdline_cmd((char_u *)"set keymap=");
-+#endif
- 
- # ifdef FEAT_TITLE
-     free_titles();
-@@ -1034,6 +1044,9 @@
-     free_regexp_stuff();
-     free_tag_stuff();
-     free_cd_dir();
-+# ifdef FEAT_SIGNS
-+    free_signs();
-+# endif
- # ifdef FEAT_EVAL
-     set_expr_line(NULL);
- # endif
-@@ -1062,11 +1075,12 @@
- 
- #ifdef FEAT_QUICKFIX
-     {
--	win_T	*win;
-+	win_T	    *win;
-+	tabpage_T   *tab;
- 
- 	qf_free_all(NULL);
- 	/* Free all location lists */
--	FOR_ALL_WINDOWS(win)
-+	FOR_ALL_TAB_WINDOWS(tab, win)
- 	    qf_free_all(win);
-     }
- #endif
-@@ -1257,7 +1271,6 @@
-     return escaped_string;
- }
- 
--#if !defined(BACKSLASH_IN_FILENAME) || defined(FEAT_EVAL) || defined(PROTO)
- /*
-  * Return TRUE when 'shell' has "csh" in the tail.
-  */
-@@ -1266,9 +1279,7 @@
- {
-     return (strstr((char *)gettail(p_sh), "csh") != NULL);
- }
--#endif
- 
--#if defined(FEAT_EVAL) || defined(PROTO)
- /*
-  * Escape "string" for use as a shell argument with system().
-  * This uses single quotes, except when we know we need to use double qoutes
-@@ -1391,7 +1402,6 @@
- 
-     return escaped_string;
- }
--#endif
- 
- /*
-  * Like vim_strsave(), but make all characters uppercase.
-@@ -2565,7 +2575,7 @@
-     int		key;
-     int		dlen = 0;
- 
--    key = find_special_key(srcp, &modifiers, keycode);
-+    key = find_special_key(srcp, &modifiers, keycode, FALSE);
-     if (key == 0)
- 	return 0;
- 
-@@ -2601,10 +2611,11 @@
-  * returns 0 if there is no match.
-  */
-     int
--find_special_key(srcp, modp, keycode)
-+find_special_key(srcp, modp, keycode, keep_x_key)
-     char_u	**srcp;
-     int		*modp;
--    int		keycode; /* prefer key code, e.g. K_DEL instead of DEL */
-+    int		keycode;     /* prefer key code, e.g. K_DEL instead of DEL */
-+    int		keep_x_key;  /* don't translate xHome to Home key */
- {
-     char_u	*last_dash;
-     char_u	*end_of_name;
-@@ -2672,7 +2683,8 @@
- 	    else
- 	    {
- 		key = get_special_key_code(last_dash + 1);
--		key = handle_x_keys(key);
-+		if (!keep_x_key)
-+		    key = handle_x_keys(key);
- 	    }
- 
- 	    /*
-@@ -2829,7 +2841,7 @@
- get_key_name(i)
-     int	    i;
- {
--    if (i >= KEY_NAMES_TABLE_LEN)
-+    if (i >= (int)KEY_NAMES_TABLE_LEN)
- 	return NULL;
-     return  key_names_table[i].name;
- }
-@@ -3857,7 +3869,8 @@
-      * use filename.
-      */
- #ifdef UNIX
--    int			ffv_dev;	/* device number (-1 if not set) */
-+    int			ffv_dev_valid;	/* ffv_dev and ffv_ino were set */
-+    dev_t		ffv_dev;	/* device number */
-     ino_t		ffv_ino;	/* inode number */
- #endif
-     /* The memory for this struct is allocated according to the length of
-@@ -4047,13 +4060,12 @@
-  * This function silently ignores a few errors, vim_findfile() will have
-  * limited functionality then.
-  */
--/*ARGSUSED*/
-     void *
- vim_findfile_init(path, filename, stopdirs, level, free_visited, find_what,
- 					   search_ctx_arg, tagfile, rel_fname)
-     char_u	*path;
-     char_u	*filename;
--    char_u	*stopdirs;
-+    char_u	*stopdirs UNUSED;
-     int		level;
-     int		free_visited;
-     int		find_what;
-@@ -4698,7 +4710,8 @@
- 				stackp->ffs_filearray_cur = i + 1;
- 				ff_push(search_ctx, stackp);
- 
--				simplify_filename(file_path);
-+				if (!path_with_url(file_path))
-+				    simplify_filename(file_path);
- 				if (mch_dirname(ff_expand_buffer, MAXPATHL)
- 									== OK)
- 				{
-@@ -5050,10 +5063,9 @@
-     {
- 	if (
- #ifdef UNIX
--		!url
--		    ? (vp->ffv_dev == st.st_dev
--			&& vp->ffv_ino == st.st_ino)
--		    :
-+		!url ? (vp->ffv_dev_valid && vp->ffv_dev == st.st_dev
-+						  && vp->ffv_ino == st.st_ino)
-+		     :
- #endif
- 		fnamecmp(vp->ffv_fname, ff_expand_buffer) == 0
- 	   )
-@@ -5078,14 +5090,14 @@
- #ifdef UNIX
- 	if (!url)
- 	{
-+	    vp->ffv_dev_valid = TRUE;
- 	    vp->ffv_ino = st.st_ino;
- 	    vp->ffv_dev = st.st_dev;
- 	    vp->ffv_fname[0] = NUL;
- 	}
- 	else
- 	{
--	    vp->ffv_ino = 0;
--	    vp->ffv_dev = -1;
-+	    vp->ffv_dev_valid = FALSE;
- #endif
- 	    STRCPY(vp->ffv_fname, ff_expand_buffer);
- #ifdef UNIX
-diff -Naur vim72.orig/src/move.c vim72/src/move.c
---- vim72.orig/src/move.c	2008-07-12 09:26:47.000000000 -0700
-+++ vim72/src/move.c	2009-07-19 15:16:14.000000000 -0700
-@@ -280,18 +280,20 @@
- 
- 	if (curwin->w_botline <= curbuf->b_ml.ml_line_count)
- 	{
--	    if (curwin->w_cursor.lnum < curwin->w_botline
--		    && ((long)curwin->w_cursor.lnum
-+	    if (curwin->w_cursor.lnum < curwin->w_botline)
-+	    {
-+	      if (((long)curwin->w_cursor.lnum
- 					     >= (long)curwin->w_botline - p_so
- #ifdef FEAT_FOLDING
- 			|| hasAnyFolding(curwin)
- #endif
- 			))
--	    {
-+	      {
- 		lineoff_T	loff;
- 
--		/* Cursor is above botline, check if there are 'scrolloff'
--		 * window lines below the cursor.  If not, need to scroll. */
-+		/* Cursor is (a few lines) above botline, check if there are
-+		 * 'scrolloff' window lines below the cursor.  If not, need to
-+		 * scroll. */
- 		n = curwin->w_empty_rows;
- 		loff.lnum = curwin->w_cursor.lnum;
- #ifdef FEAT_FOLDING
-@@ -317,6 +319,10 @@
- 		if (n >= p_so)
- 		    /* sufficient context, no need to scroll */
- 		    check_botline = FALSE;
-+	      }
-+	      else
-+		  /* sufficient context, no need to scroll */
-+		  check_botline = FALSE;
- 	    }
- 	    if (check_botline)
- 	    {
-@@ -509,6 +515,9 @@
-     /* Approximate the value of w_botline */
-     wp->w_botline += lnum - wp->w_topline;
-     wp->w_topline = lnum;
-+#ifdef FEAT_AUTOCMD
-+    wp->w_topline_was_set = TRUE;
-+#endif
- #ifdef FEAT_DIFF
-     wp->w_topfill = 0;
- #endif
-@@ -1229,11 +1238,10 @@
- /*
-  * Scroll the current window down by "line_count" logical lines.  "CTRL-Y"
-  */
--/*ARGSUSED*/
-     void
- scrolldown(line_count, byfold)
-     long	line_count;
--    int		byfold;		/* TRUE: count a closed fold as one line */
-+    int		byfold UNUSED;	/* TRUE: count a closed fold as one line */
- {
-     long	done = 0;	/* total # of physical lines done */
-     int		wrow;
-@@ -1340,11 +1348,10 @@
- /*
-  * Scroll the current window up by "line_count" logical lines.  "CTRL-E"
-  */
--/*ARGSUSED*/
-     void
- scrollup(line_count, byfold)
-     long	line_count;
--    int		byfold;		/* TRUE: count a closed fold as one line */
-+    int		byfold UNUSED;	/* TRUE: count a closed fold as one line */
- {
- #if defined(FEAT_FOLDING) || defined(FEAT_DIFF)
-     linenr_T	lnum;
-diff -Naur vim72.orig/src/nbdebug.c vim72/src/nbdebug.c
---- vim72.orig/src/nbdebug.c	2008-06-22 08:38:58.000000000 -0700
-+++ vim72/src/nbdebug.c	2009-07-19 15:13:36.000000000 -0700
-@@ -33,7 +33,6 @@
- u_int		 nb_dlevel = 0;		/* nb_debug verbosity level */
- 
- void		 nbdb(char *, ...);
--void		 nbtrace(char *, ...);
- 
- static int	 lookup(char *);
- #ifdef USE_NB_ERRORHANDLER
-@@ -100,25 +99,6 @@
- }    /* end nbdebug_log_init */
- 
- 
--
--
--void
--nbtrace(
--	char		*fmt,
--	...)
--{
--	va_list		 ap;
--
--	if (nb_debug!= NULL && (nb_dlevel & (NB_TRACE | NB_TRACE_VERBOSE))) {
--		va_start(ap, fmt);
--		vfprintf(nb_debug, fmt, ap);
--		va_end(ap);
--		fflush(nb_debug);
--	}
--
--}    /* end nbtrace */
--
--
- void
- nbdbg(
- 	char		*fmt,
-@@ -136,23 +116,6 @@
- }    /* end nbdbg */
- 
- 
--void
--nbprt(
--	char		*fmt,
--	...)
--{
--	va_list		 ap;
--
--	if (nb_debug != NULL && nb_dlevel & NB_PRINT) {
--		va_start(ap, fmt);
--		vfprintf(nb_debug, fmt, ap);
--		va_end(ap);
--		fflush(nb_debug);
--	}
--
--}    /* end nbprt */
--
--
- static int
- lookup(
- 	char		*file)
-diff -Naur vim72.orig/src/nbdebug.h vim72/src/nbdebug.h
---- vim72.orig/src/nbdebug.h	2008-06-22 07:31:50.000000000 -0700
-+++ vim72/src/nbdebug.h	2009-07-19 15:13:36.000000000 -0700
-@@ -43,8 +43,6 @@
- 
- 
- void		 nbdbg(char *, ...);
--void		 nbprt(char *, ...);
--void		 nbtrace(char *, ...);
- 
- void nbdebug_wait __ARGS((u_int wait_flags, char *wait_var, u_int wait_secs));
- void nbdebug_log_init __ARGS((char *log_var, char *level_var));
-@@ -70,19 +68,5 @@
- {
- }
- 
--void
--nbprt(
--	char		*fmt,
--	...)
--{
--}
--
--void
--nbtrace(
--	char		*fmt,
--	...)
--{
--}
--
- #endif /* NBDEBUG */
- #endif /* NBDEBUG_H */
-diff -Naur vim72.orig/src/netbeans.c vim72/src/netbeans.c
---- vim72.orig/src/netbeans.c	2008-07-13 09:19:54.000000000 -0700
-+++ vim72/src/netbeans.c	2009-07-19 15:18:05.000000000 -0700
-@@ -32,6 +32,7 @@
- /* WinSock API is separated from C API, thus we can't use read(), write(),
-  * errno... */
- # define sock_errno WSAGetLastError()
-+# undef ECONNREFUSED
- # define ECONNREFUSED WSAECONNREFUSED
- # ifdef EINTR
- #  undef EINTR
-@@ -700,7 +701,6 @@
- /*
-  * Read and process a command from netbeans.
-  */
--/*ARGSUSED*/
- #if defined(FEAT_GUI_W32) || defined(PROTO)
- /* Use this one when generating prototypes, the others are static. */
-     void
-@@ -708,12 +708,15 @@
- #else
- # ifdef FEAT_GUI_MOTIF
-     static void
--messageFromNetbeans(XtPointer clientData, int *unused1, XtInputId *unused2)
-+messageFromNetbeans(XtPointer clientData UNUSED,
-+		    int *unused1 UNUSED,
-+		    XtInputId *unused2 UNUSED)
- # endif
- # ifdef FEAT_GUI_GTK
-     static void
--messageFromNetbeans(gpointer clientData, gint unused1,
--						    GdkInputCondition unused2)
-+messageFromNetbeans(gpointer clientData UNUSED,
-+		    gint unused1 UNUSED,
-+		    GdkInputCondition unused2 UNUSED)
- # endif
- #endif
- {
-@@ -1043,7 +1046,7 @@
- 	nbdebug(("EVT: %s", buf));
- /*	nb_send(buf, "netbeans_end");    avoid "write failed" messages */
- 	if (sd >= 0)
--	    sock_write(sd, buf, (int)STRLEN(buf));  /* ignore errors */
-+	    ignored = sock_write(sd, buf, (int)STRLEN(buf));
-     }
- }
- 
-@@ -1582,7 +1585,9 @@
- 			    buf_delsign(buf->bufp, id);
- 			}
- 			else
-+			{
- 			    nbdebug(("    No sign on line %d\n", i));
-+			}
- 		    }
- 
- 		    nbdebug(("    Deleting lines %d through %d\n", del_from_lnum, del_to_lnum));
-@@ -1921,7 +1926,7 @@
- 	    vim_free(path);
- 	    if (bufp == NULL)
- 	    {
--	    	nbdebug(("    File %s not found in setBufferNumber\n", args));
-+		nbdebug(("    File %s not found in setBufferNumber\n", args));
- 		EMSG2("E642: File %s not found in setBufferNumber", args);
- 		return FAIL;
- 	    }
-@@ -2141,7 +2146,9 @@
- #endif
- 	    }
- 	    else
-+	    {
- 		nbdebug(("    BAD POSITION in setDot: %s\n", s));
-+	    }
- 
- 	    /* gui_update_cursor(TRUE, FALSE); */
- 	    /* update_curbuf(NOT_VALID); */
-@@ -2277,9 +2284,6 @@
- 	    int serNum;
- 	    int localTypeNum;
- 	    int typeNum;
--# ifdef NBDEBUG
--	    int len;
--# endif
- 	    pos_T *pos;
- 
- 	    if (buf == NULL || buf->bufp == NULL)
-@@ -2303,13 +2307,10 @@
- 	    pos = get_off_or_lnum(buf->bufp, &args);
- 
- 	    cp = (char *)args;
--# ifdef NBDEBUG
--	    len =
--# endif
--		strtol(cp, &cp, 10);
-+	    ignored = (int)strtol(cp, &cp, 10);
- 	    args = (char_u *)cp;
- # ifdef NBDEBUG
--	    if (len != -1)
-+	    if (ignored != -1)
- 	    {
- 		nbdebug(("    partial line annotation -- Not Yet Implemented!\n"));
- 	    }
-@@ -2321,7 +2322,7 @@
- 	    }
- 	    if (pos)
- 	    {
--		coloncmd(":sign place %d line=%d name=%d buffer=%d",
-+		coloncmd(":sign place %d line=%ld name=%d buffer=%d",
- 			   serNum, pos->lnum, typeNum, buf->bufp->b_fnum);
- 		if (typeNum == curPCtype)
- 		    coloncmd(":sign jump %d buffer=%d", serNum,
-@@ -2425,7 +2426,7 @@
- 				GUARDED) == 0)
- 			    {
- 				coloncmd(
--				    ":sign place %d line=%d name=%d buffer=%d",
-+				    ":sign place %d line=%ld name=%d buffer=%d",
- 				     guardId++, lnum, GUARDED,
- 				     buf->bufp->b_fnum);
- 			    }
-@@ -2582,7 +2583,7 @@
-     va_list ap;
- 
-     va_start(ap, cmd);
--    vsprintf(buf, cmd, ap);
-+    vim_vsnprintf(buf, sizeof(buf), cmd, ap, NULL);
-     va_end(ap);
- 
-     nbdebug(("    COLONCMD %s\n", buf));
-@@ -2747,11 +2748,10 @@
-  * cursor and sends it to the debugger for evaluation.  The debugger should
-  * respond with a showBalloon command when there is a useful result.
-  */
--/*ARGSUSED*/
-     void
- netbeans_beval_cb(
- 	BalloonEval	*beval,
--	int		 state)
-+	int		 state UNUSED)
- {
-     win_T	*wp;
-     char_u	*text;
-@@ -2924,44 +2924,26 @@
- }
- 
- /*
-- * Tell netbeans a file was closed.
-+ * Tell netbeans that a file was deleted or wiped out.
-  */
-     void
--netbeans_file_closed(buf_T *bufp)
-+netbeans_file_killed(buf_T *bufp)
- {
-     int		bufno = nb_getbufno(bufp);
-     nbbuf_T	*nbbuf = nb_get_buf(bufno);
-     char	buffer[2*MAXPATHL];
- 
--    if (!haveConnection || bufno < 0)
--	return;
--
--    if (!netbeansCloseFile)
--    {
--	nbdebug(("Ignoring file_closed for %s. File was closed from IDE\n",
--		    bufp->b_ffname));
-+    if (!haveConnection || bufno == -1)
- 	return;
--    }
--
--    nbdebug(("netbeans_file_closed:\n"));
--    nbdebug(("    Closing bufno: %d", bufno));
--    if (curbuf != NULL && curbuf != bufp)
--    {
--	nbdebug(("    Curbuf bufno:  %d\n", nb_getbufno(curbuf)));
--    }
--    else if (curbuf == bufp)
--    {
--	nbdebug(("    curbuf == bufp\n"));
--    }
- 
--    if (bufno <= 0)
--	return;
-+    nbdebug(("netbeans_file_killed:\n"));
-+    nbdebug(("    Killing bufno: %d", bufno));
- 
-     sprintf(buffer, "%d:killed=%d\n", bufno, r_cmdno);
- 
-     nbdebug(("EVT: %s", buffer));
- 
--    nb_send(buffer, "netbeans_file_closed");
-+    nb_send(buffer, "netbeans_file_killed");
- 
-     if (nbbuf != NULL)
- 	nbbuf->bufp = NULL;
-@@ -3082,9 +3064,8 @@
- /*
-  * Send netbeans an unmodufied command.
-  */
--/*ARGSUSED*/
-     void
--netbeans_unmodified(buf_T *bufp)
-+netbeans_unmodified(buf_T *bufp UNUSED)
- {
- #if 0
-     char_u	buf[128];
-@@ -3391,13 +3372,12 @@
-  * buf->signmapused[]	maps buffer-local annotation IDs to an index in
-  *			globalsignmap[].
-  */
--/*ARGSUSED*/
-     static void
- addsigntype(
-     nbbuf_T	*buf,
-     int		typeNum,
-     char_u	*typeName,
--    char_u	*tooltip,
-+    char_u	*tooltip UNUSED,
-     char_u	*glyphFile,
-     int		use_fg,
-     int		fg,
-diff -Naur vim72.orig/src/normal.c vim72/src/normal.c
---- vim72.orig/src/normal.c	2008-07-31 13:03:08.000000000 -0700
-+++ vim72/src/normal.c	2009-07-19 15:16:33.000000000 -0700
-@@ -183,6 +183,8 @@
- static void	nv_cursorhold __ARGS((cmdarg_T *cap));
- #endif
- 
-+static char *e_noident = N_("E349: No identifier under cursor");
-+
- /*
-  * Function to be called for a Normal or Visual mode command.
-  * The argument is a cmdarg_T.
-@@ -491,14 +493,14 @@
-     int		i;
- 
-     /* Fill the index table with a one to one relation. */
--    for (i = 0; i < NV_CMDS_SIZE; ++i)
-+    for (i = 0; i < (int)NV_CMDS_SIZE; ++i)
- 	nv_cmd_idx[i] = i;
- 
-     /* Sort the commands by the command character.  */
-     qsort((void *)&nv_cmd_idx, (size_t)NV_CMDS_SIZE, sizeof(short), nv_compare);
- 
-     /* Find the first entry that can't be indexed by the command character. */
--    for (i = 0; i < NV_CMDS_SIZE; ++i)
-+    for (i = 0; i < (int)NV_CMDS_SIZE; ++i)
- 	if (i != nv_cmds[nv_cmd_idx[i]].cmd_char)
- 	    break;
-     nv_max_linear = i - 1;
-@@ -559,11 +561,10 @@
- /*
-  * Execute a command in Normal mode.
-  */
--/*ARGSUSED*/
-     void
- normal_cmd(oap, toplevel)
-     oparg_T	*oap;
--    int		toplevel;		/* TRUE when called from main() */
-+    int		toplevel UNUSED;	/* TRUE when called from main() */
- {
-     cmdarg_T	ca;			/* command arguments */
-     int		c;
-@@ -578,6 +579,9 @@
-     static int	old_mapped_len = 0;
- #endif
-     int		idx;
-+#ifdef FEAT_EVAL
-+    int		set_prevcount = FALSE;
-+#endif
- 
-     vim_memset(&ca, 0, sizeof(ca));	/* also resets ca.retval */
-     ca.oap = oap;
-@@ -613,7 +617,12 @@
-     /* When not finishing an operator and no register name typed, reset the
-      * count. */
-     if (!finish_op && !oap->regname)
-+    {
- 	ca.opcount = 0;
-+#ifdef FEAT_EVAL
-+	set_prevcount = TRUE;
-+#endif
-+    }
- 
- #ifdef FEAT_AUTOCMD
-     /* Restore counts from before receiving K_CURSORHOLD.  This means after
-@@ -641,10 +650,7 @@
-      * Get the command character from the user.
-      */
-     c = safe_vgetc();
--
--#ifdef FEAT_LANGMAP
-     LANGMAP_ADJUST(c, TRUE);
--#endif
- 
- #ifdef FEAT_VISUAL
-     /*
-@@ -717,7 +723,15 @@
- 	     * command, so that v:count can be used in an expression mapping
- 	     * right after the count. */
- 	    if (toplevel && stuff_empty())
--		set_vcount(ca.count0, ca.count0 == 0 ? 1 : ca.count0);
-+	    {
-+		long count = ca.count0;
-+
-+		/* multiply with ca.opcount the same way as below */
-+		if (ca.opcount != 0)
-+		    count = ca.opcount * (count == 0 ? 1 : count);
-+		set_vcount(count, count == 0 ? 1 : count, set_prevcount);
-+		set_prevcount = FALSE;  /* only set v:prevcount once */
-+	    }
- #endif
- 	    if (ctrl_w)
- 	    {
-@@ -726,9 +740,7 @@
- 	    }
- 	    ++no_zero_mapping;		/* don't map zero here */
- 	    c = plain_vgetc();
--#ifdef FEAT_LANGMAP
- 	    LANGMAP_ADJUST(c, TRUE);
--#endif
- 	    --no_zero_mapping;
- 	    if (ctrl_w)
- 	    {
-@@ -751,9 +763,7 @@
- 	    ++no_mapping;
- 	    ++allow_keys;		/* no mapping for nchar, but keys */
- 	    c = plain_vgetc();		/* get next character */
--#ifdef FEAT_LANGMAP
- 	    LANGMAP_ADJUST(c, TRUE);
--#endif
- 	    --no_mapping;
- 	    --allow_keys;
- #ifdef FEAT_CMDL_INFO
-@@ -804,7 +814,7 @@
-      * Only set v:count when called from main() and not a stuffed command.
-      */
-     if (toplevel && stuff_empty())
--	set_vcount(ca.count0, ca.count1);
-+	set_vcount(ca.count0, ca.count1, set_prevcount);
- #endif
- 
-     /*
-@@ -941,9 +951,7 @@
- 	     * "gr", "g'" and "g`".
- 	     */
- 	    ca.nchar = plain_vgetc();
--#ifdef FEAT_LANGMAP
- 	    LANGMAP_ADJUST(ca.nchar, TRUE);
--#endif
- #ifdef FEAT_CMDL_INFO
- 	    need_flushbuf |= add_to_showcmd(ca.nchar);
- #endif
-@@ -1044,10 +1052,8 @@
- 		}
- #endif
- 
--#ifdef FEAT_LANGMAP
- 		/* adjust chars > 127, except after "tTfFr" commands */
- 		LANGMAP_ADJUST(*cp, !lang);
--#endif
- #ifdef FEAT_RIGHTLEFT
- 		/* adjust Hebrew mapped char */
- 		if (p_hkmap && lang && KeyTyped)
-@@ -1132,7 +1138,8 @@
- 	out_flush();
- #endif
- #ifdef FEAT_AUTOCMD
--    did_cursorhold = FALSE;
-+    if (ca.cmdchar != K_IGNORE)
-+	did_cursorhold = FALSE;
- #endif
- 
-     State = NORMAL;
-@@ -2180,10 +2187,9 @@
- /*
-  * Handle the "g@" operator: call 'operatorfunc'.
-  */
--/*ARGSUSED*/
-     static void
- op_function(oap)
--    oparg_T	*oap;
-+    oparg_T	*oap UNUSED;
- {
- #ifdef FEAT_EVAL
-     char_u	*(argv[1]);
-@@ -3509,7 +3515,7 @@
- 	if (find_type & FIND_STRING)
- 	    EMSG(_("E348: No string under cursor"));
- 	else
--	    EMSG(_("E349: No identifier under cursor"));
-+	    EMSG(_(e_noident));
- 	return 0;
-     }
-     ptr += col;
-@@ -3701,13 +3707,13 @@
- #ifdef FEAT_VISUAL
-     if (VIsual_active && !char_avail())
-     {
--	int		i = lt(VIsual, curwin->w_cursor);
-+	int		cursor_bot = lt(VIsual, curwin->w_cursor);
- 	long		lines;
- 	colnr_T		leftcol, rightcol;
- 	linenr_T	top, bot;
- 
- 	/* Show the size of the Visual area. */
--	if (i)
-+	if (cursor_bot)
- 	{
- 	    top = VIsual.lnum;
- 	    bot = curwin->w_cursor.lnum;
-@@ -3726,14 +3732,23 @@
- 
- 	if (VIsual_mode == Ctrl_V)
- 	{
-+#ifdef FEAT_LINEBREAK
-+	    char_u *saved_sbr = p_sbr;
-+
-+	    /* Make 'sbr' empty for a moment to get the correct size. */
-+	    p_sbr = empty_option;
-+#endif
- 	    getvcols(curwin, &curwin->w_cursor, &VIsual, &leftcol, &rightcol);
-+#ifdef FEAT_LINEBREAK
-+	    p_sbr = saved_sbr;
-+#endif
- 	    sprintf((char *)showcmd_buf, "%ldx%ld", lines,
- 					      (long)(rightcol - leftcol + 1));
- 	}
- 	else if (VIsual_mode == 'V' || VIsual.lnum != curwin->w_cursor.lnum)
- 	    sprintf((char *)showcmd_buf, "%ld", lines);
- 	else
--	    sprintf((char *)showcmd_buf, "%ld", (long)(i
-+	    sprintf((char *)showcmd_buf, "%ld", (long)(cursor_bot
- 		    ? curwin->w_cursor.col - VIsual.col
- 		    : VIsual.col - curwin->w_cursor.col) + (*p_sel != 'e'));
- 	showcmd_buf[SHOWCMD_COLS] = NUL;	/* truncate */
-@@ -4083,10 +4098,9 @@
-  * Command character that doesn't do anything, but unlike nv_ignore() does
-  * start edit().  Used for "startinsert" executed while starting up.
-  */
--/*ARGSUSED */
-     static void
- nv_nop(cap)
--    cmdarg_T	*cap;
-+    cmdarg_T	*cap UNUSED;
- {
- }
- 
-@@ -4611,9 +4625,7 @@
- 	    ++no_mapping;
- 	    ++allow_keys;   /* no mapping for nchar, but allow key codes */
- 	    nchar = plain_vgetc();
--#ifdef FEAT_LANGMAP
- 	    LANGMAP_ADJUST(nchar, TRUE);
--#endif
- 	    --no_mapping;
- 	    --allow_keys;
- #ifdef FEAT_CMDL_INFO
-@@ -4969,9 +4981,7 @@
- 		++no_mapping;
- 		++allow_keys;   /* no mapping for nchar, but allow key codes */
- 		nchar = plain_vgetc();
--#ifdef FEAT_LANGMAP
- 		LANGMAP_ADJUST(nchar, TRUE);
--#endif
- 		--no_mapping;
- 		--allow_keys;
- #ifdef FEAT_CMDL_INFO
-@@ -5228,7 +5238,7 @@
- 	if (cap->oap->op_type != OP_NOP
- 		&& (cap->oap->start.lnum > curbuf->b_ml.ml_line_count
- 		    || cap->oap->start.col >
--					 STRLEN(ml_get(cap->oap->start.lnum))))
-+			       (colnr_T)STRLEN(ml_get(cap->oap->start.lnum))))
- 	    clearopbeep(cap->oap);
-     }
- }
-@@ -5469,6 +5479,20 @@
- 		STRCPY(buf, "he! ");
- 	    else
- 	    {
-+		/* An external command will probably use an argument starting
-+		 * with "-" as an option.  To avoid trouble we skip the "-". */
-+		while (*ptr == '-' && n > 0)
-+		{
-+		    ++ptr;
-+		    --n;
-+		}
-+		if (n == 0)
-+		{
-+		    EMSG(_(e_noident));	 /* found dashes only */
-+		    vim_free(buf);
-+		    return;
-+		}
-+
- 		/* When a count is given, turn it into a range.  Is this
- 		 * really what we want? */
- 		isman = (STRCMP(kp, "man") == 0);
-@@ -5511,37 +5535,59 @@
-     /*
-      * Now grab the chars in the identifier
-      */
--    if (cmdchar == '*')
--	aux_ptr = (char_u *)(p_magic ? "/.*~[^$\\" : "/^$\\");
--    else if (cmdchar == '#')
--	aux_ptr = (char_u *)(p_magic ? "/?.*~[^$\\" : "/?^$\\");
--    else if (cmdchar == 'K' && !kp_help)
--	aux_ptr = (char_u *)" \t\\\"|!";
--    else
--	/* Don't escape spaces and Tabs in a tag with a backslash */
--	aux_ptr = (char_u *)"\\|\"";
--
--    p = buf + STRLEN(buf);
--    while (n-- > 0)
--    {
--	/* put a backslash before \ and some others */
--	if (vim_strchr(aux_ptr, *ptr) != NULL)
--	    *p++ = '\\';
--#ifdef FEAT_MBYTE
--	/* When current byte is a part of multibyte character, copy all bytes
--	 * of that character. */
--	if (has_mbyte)
-+    if (cmdchar == 'K' && !kp_help)
-+    {
-+	/* Escape the argument properly for a shell command */
-+	ptr = vim_strnsave(ptr, n);
-+	p = vim_strsave_shellescape(ptr, TRUE);
-+	vim_free(ptr);
-+	if (p == NULL)
- 	{
--	    int i;
--	    int len = (*mb_ptr2len)(ptr) - 1;
--
--	    for (i = 0; i < len && n >= 1; ++i, --n)
--		*p++ = *ptr++;
-+	    vim_free(buf);
-+	    return;
- 	}
-+	buf = (char_u *)vim_realloc(buf, STRLEN(buf) + STRLEN(p) + 1);
-+	if (buf == NULL)
-+	{
-+	    vim_free(buf);
-+	    vim_free(p);
-+	    return;
-+	}
-+	STRCAT(buf, p);
-+	vim_free(p);
-+    }
-+    else
-+    {
-+	if (cmdchar == '*')
-+	    aux_ptr = (char_u *)(p_magic ? "/.*~[^$\\" : "/^$\\");
-+	else if (cmdchar == '#')
-+	    aux_ptr = (char_u *)(p_magic ? "/?.*~[^$\\" : "/?^$\\");
-+	else
-+	    /* Don't escape spaces and Tabs in a tag with a backslash */
-+	    aux_ptr = (char_u *)"\\|\"\n*?[";
-+
-+	p = buf + STRLEN(buf);
-+	while (n-- > 0)
-+	{
-+	    /* put a backslash before \ and some others */
-+	    if (vim_strchr(aux_ptr, *ptr) != NULL)
-+		*p++ = '\\';
-+#ifdef FEAT_MBYTE
-+	    /* When current byte is a part of multibyte character, copy all
-+	     * bytes of that character. */
-+	    if (has_mbyte)
-+	    {
-+		int i;
-+		int len = (*mb_ptr2len)(ptr) - 1;
-+
-+		for (i = 0; i < len && n >= 1; ++i, --n)
-+		    *p++ = *ptr++;
-+	    }
- #endif
--	*p++ = *ptr++;
-+	    *p++ = *ptr++;
-+	}
-+	*p = NUL;
-     }
--    *p = NUL;
- 
-     /*
-      * Execute the command.
-@@ -5767,7 +5813,10 @@
-     for (n = cap->count1; n > 0; --n)
-     {
- 	if ((!PAST_LINE && oneright() == FAIL)
--		|| (PAST_LINE && *ml_get_cursor() == NUL))
-+#ifdef FEAT_VISUAL
-+		|| (PAST_LINE && *ml_get_cursor() == NUL)
-+#endif
-+		)
- 	{
- 	    /*
- 	     *	  <Space> wraps to next line if 'whichwrap' has 's'.
-@@ -6728,6 +6777,8 @@
-     /* Visual mode "r" */
-     if (VIsual_active)
-     {
-+	if (got_int)
-+	    reset_VIsual();
- 	nv_operator(cap);
- 	return;
-     }
-@@ -7784,7 +7835,7 @@
- 	else
- 	    i = curwin->w_leftcol;
- 	/* Go to the middle of the screen line.  When 'number' is on and lines
--	 * are wrapping the middle can be more to the left.*/
-+	 * are wrapping the middle can be more to the left. */
- 	if (cap->nchar == 'm')
- 	    i += (W_WIDTH(curwin) - curwin_col_off()
- 		    + ((curwin->w_p_wrap && i > 0)
-@@ -9192,10 +9243,9 @@
- }
- 
- #ifdef FEAT_SNIFF
--/*ARGSUSED*/
-     static void
- nv_sniff(cap)
--    cmdarg_T	*cap;
-+    cmdarg_T	*cap UNUSED;
- {
-     ProcessSniffRequests();
- }
-@@ -9211,10 +9261,9 @@
- #endif
- 
- #ifdef FEAT_DND
--/*ARGSUSED*/
-     static void
- nv_drop(cap)
--    cmdarg_T	*cap;
-+    cmdarg_T	*cap UNUSED;
- {
-     do_put('~', BACKWARD, 1L, PUT_CURSEND);
- }
-@@ -9226,7 +9275,6 @@
-  * When waiting for a character for 'updatetime' K_CURSORHOLD is put in the
-  * input buffer.  "did_cursorhold" is set to avoid retriggering.
-  */
--/*ARGSUSED*/
-     static void
- nv_cursorhold(cap)
-     cmdarg_T	*cap;
-diff -Naur vim72.orig/src/ops.c vim72/src/ops.c
---- vim72.orig/src/ops.c	2008-06-21 13:08:59.000000000 -0700
-+++ vim72/src/ops.c	2009-07-19 15:18:26.000000000 -0700
-@@ -72,11 +72,11 @@
-  */
- struct block_def
- {
--    int		startspaces;	/* 'extra' cols of first char */
--    int		endspaces;	/* 'extra' cols of first char */
-+    int		startspaces;	/* 'extra' cols before first char */
-+    int		endspaces;	/* 'extra' cols after last char */
-     int		textlen;	/* chars in block */
--    char_u	*textstart;	/* pointer to 1st char in block */
--    colnr_T	textcol;	/* cols of chars (at least part.) in block */
-+    char_u	*textstart;	/* pointer to 1st char (partially) in block */
-+    colnr_T	textcol;	/* index of chars (partially) in block */
-     colnr_T	start_vcol;	/* start col of 1st char wholly inside block */
-     colnr_T	end_vcol;	/* start col of 1st char wholly after block */
- #ifdef FEAT_VISUALEXTRA
-@@ -382,18 +382,16 @@
- {
-     int			left = (oap->op_type == OP_LSHIFT);
-     int			oldstate = State;
--    int			total, split;
--    char_u		*newp, *oldp, *midp, *ptr;
-+    int			total;
-+    char_u		*newp, *oldp;
-     int			oldcol = curwin->w_cursor.col;
-     int			p_sw = (int)curbuf->b_p_sw;
-     int			p_ts = (int)curbuf->b_p_ts;
-     struct block_def	bd;
--    int			internal = 0;
-     int			incr;
--    colnr_T		vcol, col = 0, ws_vcol;
-+    colnr_T		ws_vcol;
-     int			i = 0, j = 0;
-     int			len;
--
- #ifdef FEAT_RIGHTLEFT
-     int			old_p_ri = p_ri;
- 
-@@ -456,67 +454,90 @@
-     }
-     else /* left */
-     {
--	vcol = oap->start_vcol;
--	/* walk vcol past ws to be removed */
--	for (midp = oldp + bd.textcol;
--	      vcol < (oap->start_vcol + total) && vim_iswhite(*midp); )
--	{
--	    incr = lbr_chartabsize_adv(&midp, (colnr_T)vcol);
--	    vcol += incr;
--	}
--	/* internal is the block-internal ws replacing a split TAB */
--	if (vcol > (oap->start_vcol + total))
--	{
--	    /* we have to split the TAB *(midp-1) */
--	    internal = vcol - (oap->start_vcol + total);
--	}
--	/* if 'expandtab' is not set, use TABs */
-+	colnr_T	    destination_col;	/* column to which text in block will
-+					   be shifted */
-+	char_u	    *verbatim_copy_end;	/* end of the part of the line which is
-+					   copied verbatim */
-+	colnr_T	    verbatim_copy_width;/* the (displayed) width of this part
-+					   of line */
-+	unsigned    fill;		/* nr of spaces that replace a TAB */
-+	unsigned    new_line_len;	/* the length of the line after the
-+					   block shift */
-+	size_t	    block_space_width;
-+	size_t	    shift_amount;
-+	char_u	    *non_white = bd.textstart;
-+	colnr_T	    non_white_col;
- 
--	split = bd.startspaces + internal;
--	if (split > 0)
--	{
--	    if (!curbuf->b_p_et)
--	    {
--		for (ptr = oldp, col = 0; ptr < oldp+bd.textcol; )
--		    col += lbr_chartabsize_adv(&ptr, (colnr_T)col);
-+	/*
-+	 * Firstly, let's find the first non-whitespace character that is
-+	 * displayed after the block's start column and the character's column
-+	 * number. Also, let's calculate the width of all the whitespace
-+	 * characters that are displayed in the block and precede the searched
-+	 * non-whitespace character.
-+	 */
- 
--		/* col+1 now equals the start col of the first char of the
--		 * block (may be < oap.start_vcol if we're splitting a TAB) */
--		i = ((col % p_ts) + split) / p_ts; /* number of tabs */
--	    }
--	    if (i)
--		j = ((col % p_ts) + split) % p_ts; /* number of spp */
--	    else
--		j = split;
--	}
-+	/* If "bd.startspaces" is set, "bd.textstart" points to the character,
-+	 * the part of which is displayed at the block's beginning. Let's start
-+	 * searching from the next character. */
-+	if (bd.startspaces)
-+	    mb_ptr_adv(non_white);
- 
--	newp = alloc_check(bd.textcol + i + j + (unsigned)STRLEN(midp) + 1);
--	if (newp == NULL)
--	    return;
--	vim_memset(newp, NUL, (size_t)(bd.textcol + i + j + STRLEN(midp) + 1));
-+	/* The character's column is in "bd.start_vcol".  */
-+	non_white_col = bd.start_vcol;
- 
--	/* copy first part we want to keep */
--	mch_memmove(newp, oldp, (size_t)bd.textcol);
--	/* Now copy any TABS and spp to ensure correct alignment! */
--	while (vim_iswhite(*midp))
-+	while (vim_iswhite(*non_white))
- 	{
--	    if (*midp == TAB)
--		i++;
--	    else /*space */
--		j++;
--	    midp++;
-+	    incr = lbr_chartabsize_adv(&non_white, non_white_col);
-+	    non_white_col += incr;
- 	}
--	/* We might have an extra TAB worth of spp now! */
--	if (j / p_ts && !curbuf->b_p_et)
-+
-+	block_space_width = non_white_col - oap->start_vcol;
-+	/* We will shift by "total" or "block_space_width", whichever is less.
-+	 */
-+	shift_amount = (block_space_width < (size_t)total
-+					 ? block_space_width : (size_t)total);
-+
-+	/* The column to which we will shift the text.  */
-+	destination_col = (colnr_T)(non_white_col - shift_amount);
-+
-+	/* Now let's find out how much of the beginning of the line we can
-+	 * reuse without modification.  */
-+	verbatim_copy_end = bd.textstart;
-+	verbatim_copy_width = bd.start_vcol;
-+
-+	/* If "bd.startspaces" is set, "bd.textstart" points to the character
-+	 * preceding the block. We have to subtract its width to obtain its
-+	 * column number.  */
-+	if (bd.startspaces)
-+	    verbatim_copy_width -= bd.start_char_vcols;
-+	while (verbatim_copy_width < destination_col)
- 	{
--	    i++;
--	    j -= p_ts;
-+	    incr = lbr_chartabsize(verbatim_copy_end, verbatim_copy_width);
-+	    if (verbatim_copy_width + incr > destination_col)
-+		break;
-+	    verbatim_copy_width += incr;
-+	    mb_ptr_adv(verbatim_copy_end);
- 	}
--	copy_chars(newp + bd.textcol, (size_t)i, TAB);
--	copy_spaces(newp + bd.textcol + i, (size_t)j);
- 
--	/* the end */
--	STRMOVE(newp + STRLEN(newp), midp);
-+	/* If "destination_col" is different from the width of the initial
-+	 * part of the line that will be copied, it means we encountered a tab
-+	 * character, which we will have to partly replace with spaces.  */
-+	fill = destination_col - verbatim_copy_width;
-+
-+	/* The replacement line will consist of:
-+	 * - the beginning of the original line up to "verbatim_copy_end",
-+	 * - "fill" number of spaces,
-+	 * - the rest of the line, pointed to by non_white.  */
-+	new_line_len = (unsigned)(verbatim_copy_end - oldp)
-+		       + fill
-+		       + (unsigned)STRLEN(non_white) + 1;
-+
-+	newp = alloc_check(new_line_len);
-+	if (newp == NULL)
-+	    return;
-+	mch_memmove(newp, oldp, (size_t)(verbatim_copy_end - oldp));
-+	copy_spaces(newp + (verbatim_copy_end - oldp), (size_t)fill);
-+	STRMOVE(newp + (verbatim_copy_end - oldp) + fill, non_white);
-     }
-     /* replace the line */
-     ml_replace(curwin->w_cursor.lnum, newp, FALSE);
-@@ -1122,6 +1143,8 @@
-     return OK;
- }
- 
-+static int execreg_lastc = NUL;
-+
- /*
-  * execute a yank register: copy it into the stuff buffer
-  *
-@@ -1134,7 +1157,6 @@
-     int	    addcr;		/* always add '\n' to end of line */
-     int	    silent;		/* set "silent" flag in typeahead buffer */
- {
--    static int	lastc = NUL;
-     long	i;
-     char_u	*p;
-     int		retval = OK;
-@@ -1142,12 +1164,12 @@
- 
-     if (regname == '@')			/* repeat previous one */
-     {
--	if (lastc == NUL)
-+	if (execreg_lastc == NUL)
- 	{
- 	    EMSG(_("E748: No previously used register"));
- 	    return FAIL;
- 	}
--	regname = lastc;
-+	regname = execreg_lastc;
-     }
- 					/* check for valid regname */
-     if (regname == '%' || regname == '#' || !valid_yank_reg(regname, FALSE))
-@@ -1155,7 +1177,7 @@
- 	emsg_invreg(regname);
- 	return FAIL;
-     }
--    lastc = regname;
-+    execreg_lastc = regname;
- 
- #ifdef FEAT_CLIPBOARD
-     regname = may_get_selection(regname);
-@@ -2209,12 +2231,15 @@
-     {
- 	for (; pos.lnum <= oap->end.lnum; ++pos.lnum)
- 	{
-+	    int one_change;
-+
- 	    block_prep(oap, &bd, pos.lnum, FALSE);
- 	    pos.col = bd.textcol;
--	    did_change = swapchars(oap->op_type, &pos, bd.textlen);
-+	    one_change = swapchars(oap->op_type, &pos, bd.textlen);
-+	    did_change |= one_change;
- 
- # ifdef FEAT_NETBEANS_INTG
--	    if (usingNetbeans && did_change)
-+	    if (usingNetbeans && one_change)
- 	    {
- 		char_u *ptr = ml_get_buf(curbuf, pos.lnum, FALSE);
- 
-@@ -4848,7 +4873,8 @@
-  * - textlen includes the first/last char to be (partly) deleted
-  * - start/endspaces is the number of columns that are taken by the
-  *   first/last deleted char minus the number of columns that have to be
-- *   deleted.  for yank and tilde:
-+ *   deleted.
-+ * for yank and tilde:
-  * - textlen includes the first/last char to be wholly yanked
-  * - start/endspaces is the number of columns of the first/last yanked char
-  *   that are to be yanked.
-@@ -5312,11 +5338,14 @@
- 
-     /* We only get here (hopefully) if line[0] == '"' */
-     str = virp->vir_line + 1;
-+
-+    /* If the line starts with "" this is the y_previous register. */
-     if (*str == '"')
-     {
- 	set_prev = TRUE;
- 	str++;
-     }
-+
-     if (!ASCII_ISALNUM(*str) && *str != '-')
-     {
- 	if (viminfo_error("E577: ", _("Illegal register name"), virp->vir_line))
-@@ -5326,6 +5355,14 @@
-     get_yank_register(*str++, FALSE);
-     if (!force && y_current->y_array != NULL)
- 	do_it = FALSE;
-+
-+    if (*str == '@')
-+    {
-+	/* "x@: register x used for @@ */
-+	if (force || execreg_lastc == NUL)
-+	    execreg_lastc = str[-1];
-+    }
-+
-     size = 0;
-     limit = 100;	/* Optimized for registers containing <= 100 lines */
-     if (do_it)
-@@ -5335,7 +5372,7 @@
- 	vim_free(y_current->y_array);
- 	array = y_current->y_array =
- 		       (char_u **)alloc((unsigned)(limit * sizeof(char_u *)));
--	str = skipwhite(str);
-+	str = skipwhite(skiptowhite(str));
- 	if (STRNCMP(str, "CHAR", 4) == 0)
- 	    y_current->y_type = MCHAR;
- #ifdef FEAT_VISUAL
-@@ -5418,6 +5455,7 @@
-     max_kbyte = get_viminfo_parameter('s');
-     if (max_kbyte == 0)
- 	return;
-+
-     for (i = 0; i < NUM_REGISTERS; i++)
-     {
- 	if (y_regs[i].y_array == NULL)
-@@ -5472,7 +5510,10 @@
- 	if (y_previous == &y_regs[i])
- 	    fprintf(fp, "\"");
- 	c = get_register_name(i);
--	fprintf(fp, "\"%c\t%s\t%d\n", c, type,
-+	fprintf(fp, "\"%c", c);
-+	if (c == execreg_lastc)
-+	    fprintf(fp, "@");
-+	fprintf(fp, "\t%s\t%d\n", type,
- #ifdef FEAT_VISUAL
- 		    (int)y_regs[i].y_width
- #else
-@@ -5550,6 +5591,29 @@
-     if (dpy != NULL && str != NULL && motion_type >= 0
- 					       && len < 1024*1024 && len > 0)
-     {
-+#ifdef FEAT_MBYTE
-+	/* The CUT_BUFFER0 is supposed to always contain latin1.  Convert from
-+	 * 'enc' when it is a multi-byte encoding.  When 'enc' is an 8-bit
-+	 * encoding conversion usually doesn't work, so keep the text as-is.
-+	 */
-+	if (has_mbyte)
-+	{
-+	    char_u	*conv_str = str;
-+	    vimconv_T	vc;
-+
-+	    vc.vc_type = CONV_NONE;
-+	    if (convert_setup(&vc, p_enc, (char_u *)"latin1") == OK)
-+	    {
-+		conv_str = string_convert(&vc, str, (int*)&len);
-+		if (conv_str != NULL)
-+		{
-+		    vim_free(str);
-+		    str = conv_str;
-+		}
-+		convert_setup(&vc, NULL, NULL);
-+	    }
-+	}
-+#endif
- 	XStoreBuffer(dpy, (char *)str, (int)len, 0);
- 	XFlush(dpy);
-     }
-@@ -6258,11 +6322,20 @@
- 
- 	    if (VIsual_mode == Ctrl_V)
- 	    {
-+#ifdef FEAT_LINEBREAK
-+		char_u * saved_sbr = p_sbr;
-+
-+		/* Make 'sbr' empty for a moment to get the correct size. */
-+		p_sbr = empty_option;
-+#endif
- 		oparg.is_VIsual = 1;
- 		oparg.block_mode = TRUE;
- 		oparg.op_type = OP_NOP;
- 		getvcols(curwin, &min_pos, &max_pos,
- 					  &oparg.start_vcol, &oparg.end_vcol);
-+#ifdef FEAT_LINEBREAK
-+		p_sbr = saved_sbr;
-+#endif
- 		if (curwin->w_curswant == MAXCOL)
- 		    oparg.end_vcol = MAXCOL;
- 		/* Swap the start, end vcol if needed */
-@@ -6366,7 +6439,7 @@
- 	    {
- 		getvcols(curwin, &min_pos, &max_pos, &min_pos.col,
- 								&max_pos.col);
--		sprintf((char *)buf1, _("%ld Cols; "),
-+		vim_snprintf((char *)buf1, sizeof(buf1), _("%ld Cols; "),
- 			(long)(oparg.end_vcol - oparg.start_vcol + 1));
- 	    }
- 	    else
-@@ -6374,13 +6447,15 @@
- 
- 	    if (char_count_cursor == byte_count_cursor
- 						  && char_count == byte_count)
--		sprintf((char *)IObuff, _("Selected %s%ld of %ld Lines; %ld of %ld Words; %ld of %ld Bytes"),
-+		vim_snprintf((char *)IObuff, IOSIZE,
-+			_("Selected %s%ld of %ld Lines; %ld of %ld Words; %ld of %ld Bytes"),
- 			buf1, line_count_selected,
- 			(long)curbuf->b_ml.ml_line_count,
- 			word_count_cursor, word_count,
- 			byte_count_cursor, byte_count);
- 	    else
--		sprintf((char *)IObuff, _("Selected %s%ld of %ld Lines; %ld of %ld Words; %ld of %ld Chars; %ld of %ld Bytes"),
-+		vim_snprintf((char *)IObuff, IOSIZE,
-+			_("Selected %s%ld of %ld Lines; %ld of %ld Words; %ld of %ld Chars; %ld of %ld Bytes"),
- 			buf1, line_count_selected,
- 			(long)curbuf->b_ml.ml_line_count,
- 			word_count_cursor, word_count,
-@@ -6392,20 +6467,22 @@
- 	{
- 	    p = ml_get_curline();
- 	    validate_virtcol();
--	    col_print(buf1, (int)curwin->w_cursor.col + 1,
-+	    col_print(buf1, sizeof(buf1), (int)curwin->w_cursor.col + 1,
- 		    (int)curwin->w_virtcol + 1);
--	    col_print(buf2, (int)STRLEN(p), linetabsize(p));
-+	    col_print(buf2, sizeof(buf2), (int)STRLEN(p), linetabsize(p));
- 
- 	    if (char_count_cursor == byte_count_cursor
- 		    && char_count == byte_count)
--		sprintf((char *)IObuff, _("Col %s of %s; Line %ld of %ld; Word %ld of %ld; Byte %ld of %ld"),
-+		vim_snprintf((char *)IObuff, IOSIZE,
-+		    _("Col %s of %s; Line %ld of %ld; Word %ld of %ld; Byte %ld of %ld"),
- 		    (char *)buf1, (char *)buf2,
- 		    (long)curwin->w_cursor.lnum,
- 		    (long)curbuf->b_ml.ml_line_count,
- 		    word_count_cursor, word_count,
- 		    byte_count_cursor, byte_count);
- 	    else
--		sprintf((char *)IObuff, _("Col %s of %s; Line %ld of %ld; Word %ld of %ld; Char %ld of %ld; Byte %ld of %ld"),
-+		vim_snprintf((char *)IObuff, IOSIZE,
-+		    _("Col %s of %s; Line %ld of %ld; Word %ld of %ld; Char %ld of %ld; Byte %ld of %ld"),
- 		    (char *)buf1, (char *)buf2,
- 		    (long)curwin->w_cursor.lnum,
- 		    (long)curbuf->b_ml.ml_line_count,
-diff -Naur vim72.orig/src/option.c vim72/src/option.c
---- vim72.orig/src/option.c	2008-07-18 06:05:33.000000000 -0700
-+++ vim72/src/option.c	2009-07-19 15:17:52.000000000 -0700
-@@ -387,6 +387,9 @@
-     char_u	*def_val[2];	/* default values for variable (vi and vim) */
- #ifdef FEAT_EVAL
-     scid_T	scriptID;	/* script in which the option was last set */
-+# define SCRIPTID_INIT , 0
-+#else
-+# define SCRIPTID_INIT
- #endif
- };
- 
-@@ -477,7 +480,7 @@
- #else
- 			    (char_u *)224L,
- #endif
--					    (char_u *)0L}},
-+					    (char_u *)0L} SCRIPTID_INIT},
-     {"antialias",   "anti", P_BOOL|P_VI_DEF|P_VIM|P_RCLR,
- #if defined(FEAT_GUI) && defined(MACOS_X)
- 			    (char_u *)&p_antialias, PV_NONE,
-@@ -486,35 +489,35 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)FALSE, (char_u *)FALSE}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"arabic",	    "arab", P_BOOL|P_VI_DEF|P_VIM,
- #ifdef FEAT_ARABIC
- 			    (char_u *)VAR_WIN, PV_ARAB,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"arabicshape", "arshape", P_BOOL|P_VI_DEF|P_VIM|P_RCLR,
- #ifdef FEAT_ARABIC
- 			    (char_u *)&p_arshape, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)TRUE, (char_u *)0L}},
-+			    {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
-     {"allowrevins", "ari",  P_BOOL|P_VI_DEF|P_VIM,
- #ifdef FEAT_RIGHTLEFT
- 			    (char_u *)&p_ari, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"altkeymap",   "akm",  P_BOOL|P_VI_DEF,
- #ifdef FEAT_FKMAP
- 			    (char_u *)&p_altkeymap, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"ambiwidth",  "ambw",  P_STRING|P_VI_DEF|P_RCLR,
- #if defined(FEAT_MBYTE)
- 			    (char_u *)&p_ambw, PV_NONE,
-@@ -523,27 +526,27 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
- #ifdef FEAT_AUTOCHDIR
-     {"autochdir",  "acd",   P_BOOL|P_VI_DEF,
- 			    (char_u *)&p_acd, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- #endif
-     {"autoindent",  "ai",   P_BOOL|P_VI_DEF,
- 			    (char_u *)&p_ai, PV_AI,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"autoprint",   "ap",   P_BOOL|P_VI_DEF,
- 			    (char_u *)NULL, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"autoread",    "ar",   P_BOOL|P_VI_DEF,
- 			    (char_u *)&p_ar, PV_AR,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"autowrite",   "aw",   P_BOOL|P_VI_DEF,
- 			    (char_u *)&p_aw, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"autowriteall","awa",  P_BOOL|P_VI_DEF,
- 			    (char_u *)&p_awa, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"background",  "bg",   P_STRING|P_VI_DEF|P_RCLR,
- 			    (char_u *)&p_bg, PV_NONE,
- 			    {
-@@ -552,13 +555,13 @@
- #else
- 			    (char_u *)"light",
- #endif
--					    (char_u *)0L}},
-+					    (char_u *)0L} SCRIPTID_INIT},
-     {"backspace",   "bs",   P_STRING|P_VI_DEF|P_VIM|P_COMMA|P_NODUP,
- 			    (char_u *)&p_bs, PV_NONE,
--			    {(char_u *)"", (char_u *)0L}},
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
-     {"backup",	    "bk",   P_BOOL|P_VI_DEF|P_VIM,
- 			    (char_u *)&p_bk, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"backupcopy",  "bkc",  P_STRING|P_VIM|P_COMMA|P_NODUP,
- 			    (char_u *)&p_bkc, PV_NONE,
- #ifdef UNIX
-@@ -566,10 +569,10 @@
- #else
- 			    {(char_u *)"auto", (char_u *)"auto"}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"backupdir",   "bdir", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP|P_SECURE,
- 			    (char_u *)&p_bdir, PV_NONE,
--			    {(char_u *)DFLT_BDIR, (char_u *)0L}},
-+			    {(char_u *)DFLT_BDIR, (char_u *)0L} SCRIPTID_INIT},
-     {"backupext",   "bex",  P_STRING|P_VI_DEF|P_NFNAME,
- 			    (char_u *)&p_bex, PV_NONE,
- 			    {
-@@ -578,7 +581,7 @@
- #else
- 			    (char_u *)"~",
- #endif
--					    (char_u *)0L}},
-+					    (char_u *)0L} SCRIPTID_INIT},
-     {"backupskip",  "bsk",  P_STRING|P_VI_DEF|P_COMMA,
- #ifdef FEAT_WILDIGN
- 			    (char_u *)&p_bsk, PV_NONE,
-@@ -587,40 +590,40 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
- #ifdef FEAT_BEVAL
-     {"balloondelay","bdlay",P_NUM|P_VI_DEF,
- 			    (char_u *)&p_bdlay, PV_NONE,
--			    {(char_u *)600L, (char_u *)0L}},
-+			    {(char_u *)600L, (char_u *)0L} SCRIPTID_INIT},
-     {"ballooneval", "beval",P_BOOL|P_VI_DEF|P_NO_MKRC,
- 			    (char_u *)&p_beval, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- # ifdef FEAT_EVAL
-     {"balloonexpr", "bexpr", P_STRING|P_ALLOCED|P_VI_DEF|P_VIM,
- 			    (char_u *)&p_bexpr, PV_BEXPR,
--			    {(char_u *)"", (char_u *)0L}},
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- # endif
- #endif
-     {"beautify",    "bf",   P_BOOL|P_VI_DEF,
- 			    (char_u *)NULL, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"binary",	    "bin",  P_BOOL|P_VI_DEF|P_RSTAT,
- 			    (char_u *)&p_bin, PV_BIN,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"bioskey",	    "biosk",P_BOOL|P_VI_DEF,
- #ifdef MSDOS
- 			    (char_u *)&p_biosk, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)TRUE, (char_u *)0L}},
-+			    {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
-     {"bomb",	    NULL,   P_BOOL|P_NO_MKRC|P_VI_DEF|P_RSTAT,
- #ifdef FEAT_MBYTE
- 			    (char_u *)&p_bomb, PV_BOMB,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"breakat",	    "brk",  P_STRING|P_VI_DEF|P_RALL|P_FLAGLIST,
- #ifdef FEAT_LINEBREAK
- 			    (char_u *)&p_breakat, PV_NONE,
-@@ -629,7 +632,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"browsedir",   "bsdir",P_STRING|P_VI_DEF,
- #ifdef FEAT_BROWSE
- 			    (char_u *)&p_bsdir, PV_NONE,
-@@ -638,7 +641,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"bufhidden",   "bh",   P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB,
- #if defined(FEAT_QUICKFIX)
- 			    (char_u *)&p_bh, PV_BH,
-@@ -647,11 +650,11 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"buflisted",   "bl",   P_BOOL|P_VI_DEF|P_NOGLOB,
- 			    (char_u *)&p_bl, PV_BL,
- 			    {(char_u *)1L, (char_u *)0L}
--			    },
-+			    SCRIPTID_INIT},
-     {"buftype",	    "bt",   P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB,
- #if defined(FEAT_QUICKFIX)
- 			    (char_u *)&p_bt, PV_BT,
-@@ -660,7 +663,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"casemap",	    "cmp",   P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- #ifdef FEAT_MBYTE
- 			    (char_u *)&p_cmp, PV_NONE,
-@@ -669,7 +672,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"cdpath",	    "cd",   P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP,
- #ifdef FEAT_SEARCHPATH
- 			    (char_u *)&p_cdpath, PV_NONE,
-@@ -678,7 +681,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"cedit",	    NULL,   P_STRING,
- #ifdef FEAT_CMDWIN
- 			    (char_u *)&p_cedit, PV_NONE,
-@@ -687,7 +690,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"charconvert",  "ccv", P_STRING|P_VI_DEF|P_SECURE,
- #if defined(FEAT_MBYTE) && defined(FEAT_EVAL)
- 			    (char_u *)&p_ccv, PV_NONE,
-@@ -696,14 +699,14 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"cindent",	    "cin",  P_BOOL|P_VI_DEF|P_VIM,
- #ifdef FEAT_CINDENT
- 			    (char_u *)&p_cin, PV_CIN,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"cinkeys",	    "cink", P_STRING|P_ALLOCED|P_VI_DEF|P_COMMA|P_NODUP,
- #ifdef FEAT_CINDENT
- 			    (char_u *)&p_cink, PV_CINK,
-@@ -712,14 +715,14 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"cinoptions",  "cino", P_STRING|P_ALLOCED|P_VI_DEF|P_COMMA|P_NODUP,
- #ifdef FEAT_CINDENT
- 			    (char_u *)&p_cino, PV_CINO,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)"", (char_u *)0L}},
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
-     {"cinwords",    "cinw", P_STRING|P_ALLOCED|P_VI_DEF|P_COMMA|P_NODUP,
- #if defined(FEAT_SMARTINDENT) || defined(FEAT_CINDENT)
- 			    (char_u *)&p_cinw, PV_CINW,
-@@ -729,7 +732,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"clipboard",   "cb",   P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- #ifdef FEAT_CLIPBOARD
- 			    (char_u *)&p_cb, PV_NONE,
-@@ -743,20 +746,20 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)"", (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"cmdheight",   "ch",   P_NUM|P_VI_DEF|P_RALL,
- 			    (char_u *)&p_ch, PV_NONE,
--			    {(char_u *)1L, (char_u *)0L}},
-+			    {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
-     {"cmdwinheight", "cwh", P_NUM|P_VI_DEF,
- #ifdef FEAT_CMDWIN
- 			    (char_u *)&p_cwh, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)7L, (char_u *)0L}},
-+			    {(char_u *)7L, (char_u *)0L} SCRIPTID_INIT},
-     {"columns",	    "co",   P_NUM|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RCLR,
- 			    (char_u *)&Columns, PV_NONE,
--			    {(char_u *)80L, (char_u *)0L}},
-+			    {(char_u *)80L, (char_u *)0L} SCRIPTID_INIT},
-     {"comments",    "com",  P_STRING|P_ALLOCED|P_VI_DEF|P_COMMA|P_NODUP,
- #ifdef FEAT_COMMENTS
- 			    (char_u *)&p_com, PV_COM,
-@@ -766,7 +769,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"commentstring", "cms", P_STRING|P_ALLOCED|P_VI_DEF,
- #ifdef FEAT_FOLDING
- 			    (char_u *)&p_cms, PV_CMS,
-@@ -775,12 +778,12 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
- 			    /* P_PRI_MKRC isn't needed here, optval_default()
- 			     * always returns TRUE for 'compatible' */
-     {"compatible",  "cp",   P_BOOL|P_RALL,
- 			    (char_u *)&p_cp, PV_NONE,
--			    {(char_u *)TRUE, (char_u *)FALSE}},
-+			    {(char_u *)TRUE, (char_u *)FALSE} SCRIPTID_INIT},
-     {"complete",    "cpt",  P_STRING|P_ALLOCED|P_VI_DEF|P_COMMA|P_NODUP,
- #ifdef FEAT_INS_EXPAND
- 			    (char_u *)&p_cpt, PV_CPT,
-@@ -789,7 +792,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"completefunc", "cfu", P_STRING|P_ALLOCED|P_VI_DEF|P_SECURE,
- #ifdef FEAT_COMPL_FUNC
- 			    (char_u *)&p_cfu, PV_CFU,
-@@ -798,7 +801,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"completeopt",   "cot",  P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- #ifdef FEAT_INS_EXPAND
- 			    (char_u *)&p_cot, PV_NONE,
-@@ -807,34 +810,35 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"confirm",     "cf",   P_BOOL|P_VI_DEF,
- #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
- 			    (char_u *)&p_confirm, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"conskey",	    "consk",P_BOOL|P_VI_DEF,
- #ifdef MSDOS
- 			    (char_u *)&p_consk, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"copyindent",  "ci",   P_BOOL|P_VI_DEF|P_VIM,
- 			    (char_u *)&p_ci, PV_CI,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"cpoptions",   "cpo",  P_STRING|P_VIM|P_RALL|P_FLAGLIST,
- 			    (char_u *)&p_cpo, PV_NONE,
--			    {(char_u *)CPO_VI, (char_u *)CPO_VIM}},
-+			    {(char_u *)CPO_VI, (char_u *)CPO_VIM}
-+			    SCRIPTID_INIT},
-     {"cscopepathcomp", "cspc", P_NUM|P_VI_DEF|P_VIM,
- #ifdef FEAT_CSCOPE
- 			    (char_u *)&p_cspc, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)0L, (char_u *)0L}},
-+			    {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
-     {"cscopeprg",   "csprg", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- #ifdef FEAT_CSCOPE
- 			    (char_u *)&p_csprg, PV_NONE,
-@@ -843,7 +847,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"cscopequickfix", "csqf", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- #if defined(FEAT_CSCOPE) && defined(FEAT_QUICKFIX)
- 			    (char_u *)&p_csqf, PV_NONE,
-@@ -852,45 +856,45 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"cscopetag",   "cst",  P_BOOL|P_VI_DEF|P_VIM,
- #ifdef FEAT_CSCOPE
- 			    (char_u *)&p_cst, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)0L, (char_u *)0L}},
-+			    {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
-     {"cscopetagorder", "csto", P_NUM|P_VI_DEF|P_VIM,
- #ifdef FEAT_CSCOPE
- 			    (char_u *)&p_csto, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)0L, (char_u *)0L}},
-+			    {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
-     {"cscopeverbose", "csverb", P_BOOL|P_VI_DEF|P_VIM,
- #ifdef FEAT_CSCOPE
- 			    (char_u *)&p_csverbose, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)0L, (char_u *)0L}},
-+			    {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
-     {"cursorcolumn", "cuc", P_BOOL|P_VI_DEF|P_RWIN,
- #ifdef FEAT_SYN_HL
- 			    (char_u *)VAR_WIN, PV_CUC,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"cursorline",   "cul", P_BOOL|P_VI_DEF|P_RWIN,
- #ifdef FEAT_SYN_HL
- 			    (char_u *)VAR_WIN, PV_CUL,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"debug",	    NULL,   P_STRING|P_VI_DEF,
- 			    (char_u *)&p_debug, PV_NONE,
--			    {(char_u *)"", (char_u *)0L}},
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
-     {"define",	    "def",  P_STRING|P_ALLOCED|P_VI_DEF,
- #ifdef FEAT_FIND_ID
- 			    (char_u *)&p_def, PV_DEF,
-@@ -899,28 +903,28 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)NULL, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"delcombine", "deco",  P_BOOL|P_VI_DEF|P_VIM,
- #ifdef FEAT_MBYTE
- 			    (char_u *)&p_deco, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"dictionary",  "dict", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP,
- #ifdef FEAT_INS_EXPAND
- 			    (char_u *)&p_dict, PV_DICT,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)"", (char_u *)0L}},
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
-     {"diff",	    NULL,   P_BOOL|P_VI_DEF|P_RWIN|P_NOGLOB,
- #ifdef FEAT_DIFF
- 			    (char_u *)VAR_WIN, PV_DIFF,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"diffexpr",    "dex",  P_STRING|P_VI_DEF|P_SECURE,
- #if defined(FEAT_DIFF) && defined(FEAT_EVAL)
- 			    (char_u *)&p_dex, PV_NONE,
-@@ -929,7 +933,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"diffopt",	    "dip",  P_STRING|P_ALLOCED|P_VI_DEF|P_RWIN|P_COMMA|P_NODUP,
- #ifdef FEAT_DIFF
- 			    (char_u *)&p_dip, PV_NONE,
-@@ -938,20 +942,20 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)"", (char_u *)NULL}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"digraph",	    "dg",   P_BOOL|P_VI_DEF|P_VIM,
- #ifdef FEAT_DIGRAPHS
- 			    (char_u *)&p_dg, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"directory",   "dir",  P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP|P_SECURE,
- 			    (char_u *)&p_dir, PV_NONE,
--			    {(char_u *)DFLT_DIR, (char_u *)0L}},
-+			    {(char_u *)DFLT_DIR, (char_u *)0L} SCRIPTID_INIT},
-     {"display",	    "dy",   P_STRING|P_VI_DEF|P_COMMA|P_RALL|P_NODUP,
- 			    (char_u *)&p_dy, PV_NONE,
--			    {(char_u *)"", (char_u *)0L}},
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
-     {"eadirection", "ead",  P_STRING|P_VI_DEF,
- #ifdef FEAT_VERTSPLIT
- 			    (char_u *)&p_ead, PV_NONE,
-@@ -960,10 +964,10 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)NULL, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"edcompatible","ed",   P_BOOL|P_VI_DEF,
- 			    (char_u *)&p_ed, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"encoding",    "enc",  P_STRING|P_VI_DEF|P_RCLR,
- #ifdef FEAT_MBYTE
- 			    (char_u *)&p_enc, PV_NONE,
-@@ -972,19 +976,19 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"endofline",   "eol",  P_BOOL|P_NO_MKRC|P_VI_DEF|P_RSTAT,
- 			    (char_u *)&p_eol, PV_EOL,
--			    {(char_u *)TRUE, (char_u *)0L}},
-+			    {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
-     {"equalalways", "ea",   P_BOOL|P_VI_DEF|P_RALL,
- 			    (char_u *)&p_ea, PV_NONE,
--			    {(char_u *)TRUE, (char_u *)0L}},
-+			    {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
-     {"equalprg",    "ep",   P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- 			    (char_u *)&p_ep, PV_EP,
--			    {(char_u *)"", (char_u *)0L}},
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
-     {"errorbells",  "eb",   P_BOOL|P_VI_DEF,
- 			    (char_u *)&p_eb, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"errorfile",   "ef",   P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- #ifdef FEAT_QUICKFIX
- 			    (char_u *)&p_ef, PV_NONE,
-@@ -993,32 +997,32 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)NULL, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"errorformat", "efm",  P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- #ifdef FEAT_QUICKFIX
- 			    (char_u *)&p_efm, PV_EFM,
--			    {(char_u *)DFLT_EFM, (char_u *)0L},
-+			    {(char_u *)DFLT_EFM, (char_u *)0L}
- #else
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)NULL, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"esckeys",	    "ek",   P_BOOL|P_VIM,
- 			    (char_u *)&p_ek, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)TRUE}},
-+			    {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
-     {"eventignore", "ei",   P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- #ifdef FEAT_AUTOCMD
- 			    (char_u *)&p_ei, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)"", (char_u *)0L}},
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
-     {"expandtab",   "et",   P_BOOL|P_VI_DEF|P_VIM,
- 			    (char_u *)&p_et, PV_ET,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"exrc",	    "ex",   P_BOOL|P_VI_DEF|P_SECURE,
- 			    (char_u *)&p_exrc, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"fileencoding","fenc", P_STRING|P_ALLOCED|P_VI_DEF|P_RSTAT|P_RBUF|P_NO_MKRC,
- #ifdef FEAT_MBYTE
- 			    (char_u *)&p_fenc, PV_FENC,
-@@ -1027,7 +1031,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"fileencodings","fencs", P_STRING|P_VI_DEF|P_COMMA,
- #ifdef FEAT_MBYTE
- 			    (char_u *)&p_fencs, PV_NONE,
-@@ -1036,13 +1040,14 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"fileformat",  "ff",   P_STRING|P_ALLOCED|P_VI_DEF|P_RSTAT|P_NO_MKRC,
- 			    (char_u *)&p_ff, PV_FF,
--			    {(char_u *)DFLT_FF, (char_u *)0L}},
-+			    {(char_u *)DFLT_FF, (char_u *)0L} SCRIPTID_INIT},
-     {"fileformats", "ffs",  P_STRING|P_VIM|P_COMMA|P_NODUP,
- 			    (char_u *)&p_ffs, PV_NONE,
--			    {(char_u *)DFLT_FFS_VI, (char_u *)DFLT_FFS_VIM}},
-+			    {(char_u *)DFLT_FFS_VI, (char_u *)DFLT_FFS_VIM}
-+			    SCRIPTID_INIT},
-     {"filetype",    "ft",   P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB|P_NFNAME,
- #ifdef FEAT_AUTOCMD
- 			    (char_u *)&p_ft, PV_FT,
-@@ -1051,7 +1056,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"fillchars",   "fcs",  P_STRING|P_VI_DEF|P_RALL|P_COMMA|P_NODUP,
- #if defined(FEAT_WINDOWS) || defined(FEAT_FOLDING)
- 			    (char_u *)&p_fcs, PV_NONE,
-@@ -1060,27 +1065,27 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)"", (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"fkmap",	    "fk",   P_BOOL|P_VI_DEF,
- #ifdef FEAT_FKMAP
- 			    (char_u *)&p_fkmap, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"flash",	    "fl",   P_BOOL|P_VI_DEF,
- 			    (char_u *)NULL, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- #ifdef FEAT_FOLDING
-     {"foldclose",   "fcl",  P_STRING|P_VI_DEF|P_COMMA|P_NODUP|P_RWIN,
- 			    (char_u *)&p_fcl, PV_NONE,
--			    {(char_u *)"", (char_u *)0L}},
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
-     {"foldcolumn",  "fdc",  P_NUM|P_VI_DEF|P_RWIN,
- 			    (char_u *)VAR_WIN, PV_FDC,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"foldenable",  "fen",  P_BOOL|P_VI_DEF|P_RWIN,
- 			    (char_u *)VAR_WIN, PV_FEN,
--			    {(char_u *)TRUE, (char_u *)0L}},
-+			    {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
-     {"foldexpr",    "fde",  P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN,
- # ifdef FEAT_EVAL
- 			    (char_u *)VAR_WIN, PV_FDE,
-@@ -1089,33 +1094,34 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)NULL, (char_u *)0L}
- # endif
--			    },
-+			    SCRIPTID_INIT},
-     {"foldignore",  "fdi",  P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN,
- 			    (char_u *)VAR_WIN, PV_FDI,
--			    {(char_u *)"#", (char_u *)NULL}},
-+			    {(char_u *)"#", (char_u *)NULL} SCRIPTID_INIT},
-     {"foldlevel",   "fdl",  P_NUM|P_VI_DEF|P_RWIN,
- 			    (char_u *)VAR_WIN, PV_FDL,
--			    {(char_u *)0L, (char_u *)0L}},
-+			    {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
-     {"foldlevelstart","fdls", P_NUM|P_VI_DEF,
- 			    (char_u *)&p_fdls, PV_NONE,
--			    {(char_u *)-1L, (char_u *)0L}},
-+			    {(char_u *)-1L, (char_u *)0L} SCRIPTID_INIT},
-     {"foldmarker",  "fmr",  P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|
- 						       P_RWIN|P_COMMA|P_NODUP,
- 			    (char_u *)VAR_WIN, PV_FMR,
--			    {(char_u *)"{{{,}}}", (char_u *)NULL}},
-+			    {(char_u *)"{{{,}}}", (char_u *)NULL}
-+			    SCRIPTID_INIT},
-     {"foldmethod",  "fdm",  P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN,
- 			    (char_u *)VAR_WIN, PV_FDM,
--			    {(char_u *)"manual", (char_u *)NULL}},
-+			    {(char_u *)"manual", (char_u *)NULL} SCRIPTID_INIT},
-     {"foldminlines","fml",  P_NUM|P_VI_DEF|P_RWIN,
- 			    (char_u *)VAR_WIN, PV_FML,
--			    {(char_u *)1L, (char_u *)0L}},
-+			    {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
-     {"foldnestmax", "fdn",  P_NUM|P_VI_DEF|P_RWIN,
- 			    (char_u *)VAR_WIN, PV_FDN,
--			    {(char_u *)20L, (char_u *)0L}},
-+			    {(char_u *)20L, (char_u *)0L} SCRIPTID_INIT},
-     {"foldopen",    "fdo",  P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- 			    (char_u *)&p_fdo, PV_NONE,
- 		 {(char_u *)"block,hor,mark,percent,quickfix,search,tag,undo",
--							       (char_u *)0L}},
-+						 (char_u *)0L} SCRIPTID_INIT},
-     {"foldtext",    "fdt",  P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN,
- # ifdef FEAT_EVAL
- 			    (char_u *)VAR_WIN, PV_FDT,
-@@ -1124,7 +1130,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)NULL, (char_u *)0L}
- # endif
--			    },
-+			    SCRIPTID_INIT},
- #endif
-     {"formatexpr", "fex",   P_STRING|P_ALLOCED|P_VI_DEF|P_VIM,
- #ifdef FEAT_EVAL
-@@ -1134,16 +1140,18 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"formatoptions","fo",  P_STRING|P_ALLOCED|P_VIM|P_FLAGLIST,
- 			    (char_u *)&p_fo, PV_FO,
--			    {(char_u *)DFLT_FO_VI, (char_u *)DFLT_FO_VIM}},
-+			    {(char_u *)DFLT_FO_VI, (char_u *)DFLT_FO_VIM}
-+			    SCRIPTID_INIT},
-     {"formatlistpat","flp", P_STRING|P_ALLOCED|P_VI_DEF,
- 			    (char_u *)&p_flp, PV_FLP,
--			    {(char_u *)"^\\s*\\d\\+[\\]:.)}\\t ]\\s*", (char_u *)0L}},
-+			    {(char_u *)"^\\s*\\d\\+[\\]:.)}\\t ]\\s*",
-+						 (char_u *)0L} SCRIPTID_INIT},
-     {"formatprg",   "fp",   P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- 			    (char_u *)&p_fp, PV_NONE,
--			    {(char_u *)"", (char_u *)0L}},
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
-     {"fsync",       "fs",   P_BOOL|P_SECURE|P_VI_DEF,
- #ifdef HAVE_FSYNC
- 			    (char_u *)&p_fs, PV_NONE,
-@@ -1152,22 +1160,22 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)FALSE, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"gdefault",    "gd",   P_BOOL|P_VI_DEF|P_VIM,
- 			    (char_u *)&p_gd, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"graphic",	    "gr",   P_BOOL|P_VI_DEF,
- 			    (char_u *)NULL, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"grepformat",  "gfm",  P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- #ifdef FEAT_QUICKFIX
- 			    (char_u *)&p_gefm, PV_NONE,
--			    {(char_u *)DFLT_GREPFORMAT, (char_u *)0L},
-+			    {(char_u *)DFLT_GREPFORMAT, (char_u *)0L}
- #else
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)NULL, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"grepprg",	    "gp",   P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- #ifdef FEAT_QUICKFIX
- 			    (char_u *)&p_gp, PV_GP,
-@@ -1185,15 +1193,15 @@
- 			    (char_u *)"SEARCH/NUMBERS ",
- #   else
- 			    (char_u *)"grep -n ",
--#endif
--#endif
-+#   endif
-+#  endif
- # endif
--			    (char_u *)0L},
-+			    (char_u *)0L}
- #else
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)NULL, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"guicursor",    "gcr",  P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- #ifdef CURSOR_SHAPE
- 			    (char_u *)&p_guicursor, PV_NONE,
-@@ -1208,7 +1216,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)NULL, (char_u *)0L}
- #endif
--				    },
-+			    SCRIPTID_INIT},
-     {"guifont",	    "gfn",  P_STRING|P_VI_DEF|P_RCLR|P_COMMA|P_NODUP,
- #ifdef FEAT_GUI
- 			    (char_u *)&p_guifont, PV_NONE,
-@@ -1217,7 +1225,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)NULL, (char_u *)0L}
- #endif
--				    },
-+			    SCRIPTID_INIT},
-     {"guifontset",  "gfs",  P_STRING|P_VI_DEF|P_RCLR|P_COMMA,
- #if defined(FEAT_GUI) && defined(FEAT_XFONTSET)
- 			    (char_u *)&p_guifontset, PV_NONE,
-@@ -1226,7 +1234,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)NULL, (char_u *)0L}
- #endif
--				    },
-+			    SCRIPTID_INIT},
-     {"guifontwide", "gfw",  P_STRING|P_VI_DEF|P_RCLR|P_COMMA|P_NODUP,
- #if defined(FEAT_GUI) && defined(FEAT_MBYTE)
- 			    (char_u *)&p_guifontwide, PV_NONE,
-@@ -1235,14 +1243,14 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)NULL, (char_u *)0L}
- #endif
--				    },
-+			    SCRIPTID_INIT},
-     {"guiheadroom", "ghr",  P_NUM|P_VI_DEF,
- #if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11)
- 			    (char_u *)&p_ghr, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)50L, (char_u *)0L}},
-+			    {(char_u *)50L, (char_u *)0L} SCRIPTID_INIT},
-     {"guioptions",  "go",   P_STRING|P_VI_DEF|P_RALL|P_FLAGLIST,
- #if defined(FEAT_GUI)
- 			    (char_u *)&p_go, PV_NONE,
-@@ -1255,14 +1263,14 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)NULL, (char_u *)0L}
- #endif
--				    },
-+			    SCRIPTID_INIT},
-     {"guipty",	    NULL,   P_BOOL|P_VI_DEF,
- #if defined(FEAT_GUI)
- 			    (char_u *)&p_guipty, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)TRUE, (char_u *)0L}},
-+			    {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
-     {"guitablabel",  "gtl", P_STRING|P_VI_DEF|P_RWIN,
- #if defined(FEAT_GUI_TABLINE)
- 			    (char_u *)&p_gtl, PV_NONE,
-@@ -1271,7 +1279,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)NULL, (char_u *)0L}
- #endif
--				    },
-+			    SCRIPTID_INIT},
-     {"guitabtooltip",  "gtt", P_STRING|P_VI_DEF|P_RWIN,
- #if defined(FEAT_GUI_TABLINE)
- 			    (char_u *)&p_gtt, PV_NONE,
-@@ -1280,20 +1288,21 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)NULL, (char_u *)0L}
- #endif
--				    },
-+			    SCRIPTID_INIT},
-     {"hardtabs",    "ht",   P_NUM|P_VI_DEF,
- 			    (char_u *)NULL, PV_NONE,
--			    {(char_u *)0L, (char_u *)0L}},
-+			    {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
-     {"helpfile",    "hf",   P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- 			    (char_u *)&p_hf, PV_NONE,
--			    {(char_u *)DFLT_HELPFILE, (char_u *)0L}},
-+			    {(char_u *)DFLT_HELPFILE, (char_u *)0L}
-+			    SCRIPTID_INIT},
-     {"helpheight",  "hh",   P_NUM|P_VI_DEF,
- #ifdef FEAT_WINDOWS
- 			    (char_u *)&p_hh, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)20L, (char_u *)0L}},
-+			    {(char_u *)20L, (char_u *)0L} SCRIPTID_INIT},
-     {"helplang",    "hlg",  P_STRING|P_VI_DEF|P_COMMA,
- #ifdef FEAT_MULTI_LANG
- 			    (char_u *)&p_hlg, PV_NONE,
-@@ -1302,64 +1311,65 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--    },
-+			    SCRIPTID_INIT},
-     {"hidden",	    "hid",  P_BOOL|P_VI_DEF,
- 			    (char_u *)&p_hid, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"highlight",   "hl",   P_STRING|P_VI_DEF|P_RCLR|P_COMMA|P_NODUP,
- 			    (char_u *)&p_hl, PV_NONE,
--			    {(char_u *)HIGHLIGHT_INIT, (char_u *)0L}},
-+			    {(char_u *)HIGHLIGHT_INIT, (char_u *)0L}
-+			    SCRIPTID_INIT},
-     {"history",	    "hi",   P_NUM|P_VIM,
- 			    (char_u *)&p_hi, PV_NONE,
--			    {(char_u *)0L, (char_u *)20L}},
-+			    {(char_u *)0L, (char_u *)20L} SCRIPTID_INIT},
-     {"hkmap",	    "hk",   P_BOOL|P_VI_DEF|P_VIM,
- #ifdef FEAT_RIGHTLEFT
- 			    (char_u *)&p_hkmap, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"hkmapp",	    "hkp",  P_BOOL|P_VI_DEF|P_VIM,
- #ifdef FEAT_RIGHTLEFT
- 			    (char_u *)&p_hkmapp, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"hlsearch",    "hls",  P_BOOL|P_VI_DEF|P_VIM|P_RALL,
- 			    (char_u *)&p_hls, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"icon",	    NULL,   P_BOOL|P_VI_DEF,
- #ifdef FEAT_TITLE
- 			    (char_u *)&p_icon, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"iconstring",  NULL,   P_STRING|P_VI_DEF,
- #ifdef FEAT_TITLE
- 			    (char_u *)&p_iconstring, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)"", (char_u *)0L}},
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
-     {"ignorecase",  "ic",   P_BOOL|P_VI_DEF,
- 			    (char_u *)&p_ic, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"imactivatekey","imak",P_STRING|P_VI_DEF,
- #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
- 			    (char_u *)&p_imak, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)"", (char_u *)0L}},
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
-     {"imcmdline",   "imc",  P_BOOL|P_VI_DEF,
- #ifdef USE_IM_CONTROL
- 			    (char_u *)&p_imcmdline, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"imdisable",   "imd",  P_BOOL|P_VI_DEF,
- #ifdef USE_IM_CONTROL
- 			    (char_u *)&p_imdisable, PV_NONE,
-@@ -1371,7 +1381,7 @@
- #else
- 			    {(char_u *)FALSE, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"iminsert",    "imi",  P_NUM|P_VI_DEF,
- 			    (char_u *)&p_iminsert, PV_IMI,
- #ifdef B_IMODE_IM
-@@ -1379,7 +1389,7 @@
- #else
- 			    {(char_u *)B_IMODE_NONE, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"imsearch",    "ims",  P_NUM|P_VI_DEF,
- 			    (char_u *)&p_imsearch, PV_IMS,
- #ifdef B_IMODE_IM
-@@ -1387,7 +1397,7 @@
- #else
- 			    {(char_u *)B_IMODE_NONE, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"include",	    "inc",  P_STRING|P_ALLOCED|P_VI_DEF,
- #ifdef FEAT_FIND_ID
- 			    (char_u *)&p_inc, PV_INC,
-@@ -1396,7 +1406,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"includeexpr", "inex", P_STRING|P_ALLOCED|P_VI_DEF,
- #if defined(FEAT_FIND_ID) && defined(FEAT_EVAL)
- 			    (char_u *)&p_inex, PV_INEX,
-@@ -1405,10 +1415,10 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"incsearch",   "is",   P_BOOL|P_VI_DEF|P_VIM,
- 			    (char_u *)&p_is, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"indentexpr", "inde",  P_STRING|P_ALLOCED|P_VI_DEF|P_VIM,
- #if defined(FEAT_CINDENT) && defined(FEAT_EVAL)
- 			    (char_u *)&p_inde, PV_INDE,
-@@ -1417,7 +1427,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"indentkeys", "indk",  P_STRING|P_ALLOCED|P_VI_DEF|P_COMMA|P_NODUP,
- #if defined(FEAT_CINDENT) && defined(FEAT_EVAL)
- 			    (char_u *)&p_indk, PV_INDK,
-@@ -1426,13 +1436,13 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"infercase",   "inf",  P_BOOL|P_VI_DEF,
- 			    (char_u *)&p_inf, PV_INF,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"insertmode",  "im",   P_BOOL|P_VI_DEF|P_VIM,
- 			    (char_u *)&p_im, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"isfname",	    "isf",  P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- 			    (char_u *)&p_isf, PV_NONE,
- 			    {
-@@ -1455,7 +1465,7 @@
- #  endif
- # endif
- #endif
--				(char_u *)0L}},
-+				(char_u *)0L} SCRIPTID_INIT},
-     {"isident",	    "isi",  P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- 			    (char_u *)&p_isi, PV_NONE,
- 			    {
-@@ -1472,7 +1482,7 @@
- 			    (char_u *)"@,48-57,_,192-255",
- # endif
- #endif
--				(char_u *)0L}},
-+				(char_u *)0L} SCRIPTID_INIT},
-     {"iskeyword",   "isk",  P_STRING|P_ALLOCED|P_VIM|P_COMMA|P_NODUP,
- 			    (char_u *)&p_isk, PV_ISK,
- 			    {
-@@ -1491,7 +1501,7 @@
- 				ISK_LATIN1
- # endif
- #endif
--				}},
-+			    } SCRIPTID_INIT},
-     {"isprint",	    "isp",  P_STRING|P_VI_DEF|P_RALL|P_COMMA|P_NODUP,
- 			    (char_u *)&p_isp, PV_NONE,
- 			    {
-@@ -1507,10 +1517,10 @@
- 			    ISP_LATIN1,
- # endif
- #endif
--				(char_u *)0L}},
-+				(char_u *)0L} SCRIPTID_INIT},
-     {"joinspaces",  "js",   P_BOOL|P_VI_DEF|P_VIM,
- 			    (char_u *)&p_js, PV_NONE,
--			    {(char_u *)TRUE, (char_u *)0L}},
-+			    {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
-     {"key",	    NULL,   P_STRING|P_ALLOCED|P_VI_DEF|P_NO_MKRC,
- #ifdef FEAT_CRYPT
- 			    (char_u *)&p_key, PV_KEY,
-@@ -1519,7 +1529,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"keymap",	    "kmp",  P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF|P_RSTAT|P_NFNAME|P_PRI_MKRC,
- #ifdef FEAT_KEYMAP
- 			    (char_u *)&p_keymap, PV_KMAP,
-@@ -1528,14 +1538,14 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)"", (char_u *)0L}
- #endif
--	},
-+			    SCRIPTID_INIT},
-     {"keymodel",    "km",   P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- #ifdef FEAT_VISUAL
- 			    (char_u *)&p_km, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)"", (char_u *)0L}},
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
-     {"keywordprg",  "kp",   P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- 			    (char_u *)&p_kp, PV_KP,
- 			    {
-@@ -1556,7 +1566,7 @@
- # endif
- #endif
- #endif
--				(char_u *)0L}},
-+				(char_u *)0L} SCRIPTID_INIT},
-     {"langmap",     "lmap", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- #ifdef FEAT_LANGMAP
- 			    (char_u *)&p_langmap, PV_NONE,
-@@ -1565,31 +1575,31 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)NULL,
- #endif
--				(char_u *)0L}},
-+				(char_u *)0L} SCRIPTID_INIT},
-     {"langmenu",    "lm",   P_STRING|P_VI_DEF|P_NFNAME,
- #if defined(FEAT_MENU) && defined(FEAT_MULTI_LANG)
- 			    (char_u *)&p_lm, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)"", (char_u *)0L}},
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
-     {"laststatus",  "ls",   P_NUM|P_VI_DEF|P_RALL,
- #ifdef FEAT_WINDOWS
- 			    (char_u *)&p_ls, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)1L, (char_u *)0L}},
-+			    {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
-     {"lazyredraw",  "lz",   P_BOOL|P_VI_DEF,
- 			    (char_u *)&p_lz, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"linebreak",   "lbr",  P_BOOL|P_VI_DEF|P_RWIN,
- #ifdef FEAT_LINEBREAK
- 			    (char_u *)VAR_WIN, PV_LBR,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"lines",	    NULL,   P_NUM|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RCLR,
- 			    (char_u *)&Rows, PV_NONE,
- 			    {
-@@ -1598,7 +1608,7 @@
- #else
- 			    (char_u *)24L,
- #endif
--					    (char_u *)0L}},
-+					    (char_u *)0L} SCRIPTID_INIT},
-     {"linespace",   "lsp",  P_NUM|P_VI_DEF|P_RCLR,
- #ifdef FEAT_GUI
- 			    (char_u *)&p_linespace, PV_NONE,
-@@ -1610,14 +1620,14 @@
- #else
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"lisp",	    NULL,   P_BOOL|P_VI_DEF,
- #ifdef FEAT_LISP
- 			    (char_u *)&p_lisp, PV_LISP,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"lispwords",   "lw",   P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- #ifdef FEAT_LISP
- 			    (char_u *)&p_lispwords, PV_NONE,
-@@ -1626,24 +1636,24 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)"", (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"list",	    NULL,   P_BOOL|P_VI_DEF|P_RWIN,
- 			    (char_u *)VAR_WIN, PV_LIST,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"listchars",   "lcs",  P_STRING|P_VI_DEF|P_RALL|P_COMMA|P_NODUP,
- 			    (char_u *)&p_lcs, PV_NONE,
--			    {(char_u *)"eol:$", (char_u *)0L}},
-+			    {(char_u *)"eol:$", (char_u *)0L} SCRIPTID_INIT},
-     {"loadplugins", "lpl",  P_BOOL|P_VI_DEF,
- 			    (char_u *)&p_lpl, PV_NONE,
--			    {(char_u *)TRUE, (char_u *)0L}},
-+			    {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- #ifdef FEAT_GUI_MAC
-     {"macatsui",    NULL,   P_BOOL|P_VI_DEF|P_RCLR,
- 			    (char_u *)&p_macatsui, PV_NONE,
--			    {(char_u *)TRUE, (char_u *)0L}},
-+			    {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- #endif
-     {"magic",	    NULL,   P_BOOL|P_VI_DEF,
- 			    (char_u *)&p_magic, PV_NONE,
--			    {(char_u *)TRUE, (char_u *)0L}},
-+			    {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
-     {"makeef",	    "mef",  P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- #ifdef FEAT_QUICKFIX
- 			    (char_u *)&p_mef, PV_NONE,
-@@ -1652,7 +1662,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)NULL, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"makeprg",	    "mp",   P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- #ifdef FEAT_QUICKFIX
- 			    (char_u *)&p_mp, PV_MP,
-@@ -1665,49 +1675,52 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)NULL, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"matchpairs",  "mps",  P_STRING|P_ALLOCED|P_VI_DEF|P_COMMA|P_NODUP,
- 			    (char_u *)&p_mps, PV_MPS,
--			    {(char_u *)"(:),{:},[:]", (char_u *)0L}},
-+			    {(char_u *)"(:),{:},[:]", (char_u *)0L}
-+			    SCRIPTID_INIT},
-     {"matchtime",   "mat",  P_NUM|P_VI_DEF,
- 			    (char_u *)&p_mat, PV_NONE,
--			    {(char_u *)5L, (char_u *)0L}},
-+			    {(char_u *)5L, (char_u *)0L} SCRIPTID_INIT},
-     {"maxcombine",  "mco",  P_NUM|P_VI_DEF,
- #ifdef FEAT_MBYTE
- 			    (char_u *)&p_mco, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)2, (char_u *)0L}},
-+			    {(char_u *)2, (char_u *)0L} SCRIPTID_INIT},
-     {"maxfuncdepth", "mfd", P_NUM|P_VI_DEF,
- #ifdef FEAT_EVAL
- 			    (char_u *)&p_mfd, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)100L, (char_u *)0L}},
-+			    {(char_u *)100L, (char_u *)0L} SCRIPTID_INIT},
-     {"maxmapdepth", "mmd",  P_NUM|P_VI_DEF,
- 			    (char_u *)&p_mmd, PV_NONE,
--			    {(char_u *)1000L, (char_u *)0L}},
-+			    {(char_u *)1000L, (char_u *)0L} SCRIPTID_INIT},
-     {"maxmem",	    "mm",   P_NUM|P_VI_DEF,
- 			    (char_u *)&p_mm, PV_NONE,
--			    {(char_u *)DFLT_MAXMEM, (char_u *)0L}},
-+			    {(char_u *)DFLT_MAXMEM, (char_u *)0L}
-+			    SCRIPTID_INIT},
-     {"maxmempattern","mmp", P_NUM|P_VI_DEF,
- 			    (char_u *)&p_mmp, PV_NONE,
--			    {(char_u *)1000L, (char_u *)0L}},
-+			    {(char_u *)1000L, (char_u *)0L} SCRIPTID_INIT},
-     {"maxmemtot",   "mmt",  P_NUM|P_VI_DEF,
- 			    (char_u *)&p_mmt, PV_NONE,
--			    {(char_u *)DFLT_MAXMEMTOT, (char_u *)0L}},
-+			    {(char_u *)DFLT_MAXMEMTOT, (char_u *)0L}
-+			    SCRIPTID_INIT},
-     {"menuitems",   "mis",  P_NUM|P_VI_DEF,
- #ifdef FEAT_MENU
- 			    (char_u *)&p_mis, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)25L, (char_u *)0L}},
-+			    {(char_u *)25L, (char_u *)0L} SCRIPTID_INIT},
-     {"mesg",	    NULL,   P_BOOL|P_VI_DEF,
- 			    (char_u *)NULL, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"mkspellmem",  "msm",  P_STRING|P_VI_DEF|P_EXPAND|P_SECURE,
- #ifdef FEAT_SPELL
- 			    (char_u *)&p_msm, PV_NONE,
-@@ -1716,22 +1729,22 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--    },
-+			    SCRIPTID_INIT},
-     {"modeline",    "ml",   P_BOOL|P_VIM,
- 			    (char_u *)&p_ml, PV_ML,
--			    {(char_u *)FALSE, (char_u *)TRUE}},
-+			    {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
-     {"modelines",   "mls",  P_NUM|P_VI_DEF,
- 			    (char_u *)&p_mls, PV_NONE,
--			    {(char_u *)5L, (char_u *)0L}},
-+			    {(char_u *)5L, (char_u *)0L} SCRIPTID_INIT},
-     {"modifiable",  "ma",   P_BOOL|P_VI_DEF|P_NOGLOB,
- 			    (char_u *)&p_ma, PV_MA,
--			    {(char_u *)TRUE, (char_u *)0L}},
-+			    {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
-     {"modified",    "mod",  P_BOOL|P_NO_MKRC|P_VI_DEF|P_RSTAT,
- 			    (char_u *)&p_mod, PV_MOD,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"more",	    NULL,   P_BOOL|P_VIM,
- 			    (char_u *)&p_more, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)TRUE}},
-+			    {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
-     {"mouse",	    NULL,   P_STRING|P_VI_DEF|P_FLAGLIST,
- 			    (char_u *)&p_mouse, PV_NONE,
- 			    {
-@@ -1740,21 +1753,21 @@
- #else
- 				(char_u *)"",
- #endif
--				(char_u *)0L}},
-+				(char_u *)0L} SCRIPTID_INIT},
-     {"mousefocus",   "mousef", P_BOOL|P_VI_DEF,
- #ifdef FEAT_GUI
- 			    (char_u *)&p_mousef, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"mousehide",   "mh",   P_BOOL|P_VI_DEF,
- #ifdef FEAT_GUI
- 			    (char_u *)&p_mh, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)TRUE, (char_u *)0L}},
-+			    {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
-     {"mousemodel",  "mousem", P_STRING|P_VI_DEF,
- 			    (char_u *)&p_mousem, PV_NONE,
- 			    {
-@@ -1767,7 +1780,7 @@
- 				(char_u *)"extend",
- # endif
- #endif
--				(char_u *)0L}},
-+				(char_u *)0L} SCRIPTID_INIT},
-     {"mouseshape",  "mouses",  P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- #ifdef FEAT_MOUSESHAPE
- 			    (char_u *)&p_mouseshape, PV_NONE,
-@@ -1776,33 +1789,34 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)NULL, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"mousetime",   "mouset",	P_NUM|P_VI_DEF,
- 			    (char_u *)&p_mouset, PV_NONE,
--			    {(char_u *)500L, (char_u *)0L}},
-+			    {(char_u *)500L, (char_u *)0L} SCRIPTID_INIT},
-     {"mzquantum",  "mzq",   P_NUM,
- #ifdef FEAT_MZSCHEME
- 			    (char_u *)&p_mzq, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)100L, (char_u *)100L}},
-+			    {(char_u *)100L, (char_u *)100L} SCRIPTID_INIT},
-     {"novice",	    NULL,   P_BOOL|P_VI_DEF,
- 			    (char_u *)NULL, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"nrformats",   "nf",   P_STRING|P_ALLOCED|P_VI_DEF|P_COMMA|P_NODUP,
- 			    (char_u *)&p_nf, PV_NF,
--			    {(char_u *)"octal,hex", (char_u *)0L}},
-+			    {(char_u *)"octal,hex", (char_u *)0L}
-+			    SCRIPTID_INIT},
-     {"number",	    "nu",   P_BOOL|P_VI_DEF|P_RWIN,
- 			    (char_u *)VAR_WIN, PV_NU,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"numberwidth", "nuw",  P_NUM|P_RWIN|P_VIM,
- #ifdef FEAT_LINEBREAK
- 			    (char_u *)VAR_WIN, PV_NUW,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)8L, (char_u *)4L}},
-+			    {(char_u *)8L, (char_u *)4L} SCRIPTID_INIT},
-     {"omnifunc",    "ofu",  P_STRING|P_ALLOCED|P_VI_DEF|P_SECURE,
- #ifdef FEAT_COMPL_FUNC
- 			    (char_u *)&p_ofu, PV_OFU,
-@@ -1811,10 +1825,10 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"open",	    NULL,   P_BOOL|P_VI_DEF,
- 			    (char_u *)NULL, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"opendevice",  "odev", P_BOOL|P_VI_DEF,
- #if defined(MSDOS) || defined(MSWIN) || defined(OS2)
- 			    (char_u *)&p_odev, PV_NONE,
-@@ -1822,13 +1836,13 @@
- 			    (char_u *)NULL, PV_NONE,
- #endif
- 			    {(char_u *)FALSE, (char_u *)FALSE}
--			    },
-+			    SCRIPTID_INIT},
-     {"operatorfunc", "opfunc", P_STRING|P_VI_DEF|P_SECURE,
- 			    (char_u *)&p_opfunc, PV_NONE,
--			    {(char_u *)"", (char_u *)0L} },
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
-     {"optimize",    "opt",  P_BOOL|P_VI_DEF,
- 			    (char_u *)NULL, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"osfiletype",  "oft",  P_STRING|P_ALLOCED|P_VI_DEF,
- #ifdef FEAT_OSFILETYPE
- 			    (char_u *)&p_oft, PV_OFT,
-@@ -1837,17 +1851,17 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"paragraphs",  "para", P_STRING|P_VI_DEF,
- 			    (char_u *)&p_para, PV_NONE,
- 			    {(char_u *)"IPLPPPQPP TPHPLIPpLpItpplpipbp",
--				(char_u *)0L}},
-+				(char_u *)0L} SCRIPTID_INIT},
-     {"paste",	    NULL,   P_BOOL|P_VI_DEF|P_PRI_MKRC,
- 			    (char_u *)&p_paste, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"pastetoggle", "pt",   P_STRING|P_VI_DEF,
- 			    (char_u *)&p_pt, PV_NONE,
--			    {(char_u *)"", (char_u *)0L}},
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
-     {"patchexpr",   "pex",  P_STRING|P_VI_DEF|P_SECURE,
- #if defined(FEAT_DIFF) && defined(FEAT_EVAL)
- 			    (char_u *)&p_pex, PV_NONE,
-@@ -1856,10 +1870,10 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"patchmode",   "pm",   P_STRING|P_VI_DEF|P_NFNAME,
- 			    (char_u *)&p_pm, PV_NONE,
--			    {(char_u *)"", (char_u *)0L}},
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
-     {"path",	    "pa",   P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP,
- 			    (char_u *)&p_path, PV_PATH,
- 			    {
-@@ -1872,24 +1886,24 @@
- 			    (char_u *)".,/usr/include,,",
- # endif
- #endif
--				(char_u *)0L}},
-+				(char_u *)0L} SCRIPTID_INIT},
-     {"preserveindent", "pi", P_BOOL|P_VI_DEF|P_VIM,
- 			    (char_u *)&p_pi, PV_PI,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"previewheight", "pvh", P_NUM|P_VI_DEF,
- #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
- 			    (char_u *)&p_pvh, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)12L, (char_u *)0L}},
-+			    {(char_u *)12L, (char_u *)0L} SCRIPTID_INIT},
-     {"previewwindow", "pvw", P_BOOL|P_VI_DEF|P_RSTAT|P_NOGLOB,
- #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
- 			    (char_u *)VAR_WIN, PV_PVW,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"printdevice", "pdev", P_STRING|P_VI_DEF|P_SECURE,
- #ifdef FEAT_PRINTER
- 			    (char_u *)&p_pdev, PV_NONE,
-@@ -1898,7 +1912,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)NULL, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"printencoding", "penc", P_STRING|P_VI_DEF,
- #ifdef FEAT_POSTSCRIPT
- 			    (char_u *)&p_penc, PV_NONE,
-@@ -1907,7 +1921,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)NULL, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"printexpr", "pexpr",  P_STRING|P_VI_DEF,
- #ifdef FEAT_POSTSCRIPT
- 			    (char_u *)&p_pexpr, PV_NONE,
-@@ -1916,7 +1930,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)NULL, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"printfont", "pfn",    P_STRING|P_VI_DEF,
- #ifdef FEAT_PRINTER
- 			    (char_u *)&p_pfn, PV_NONE,
-@@ -1931,7 +1945,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)NULL, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"printheader", "pheader",  P_STRING|P_VI_DEF|P_GETTEXT,
- #ifdef FEAT_PRINTER
- 			    (char_u *)&p_header, PV_NONE,
-@@ -1940,7 +1954,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)NULL, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-    {"printmbcharset", "pmbcs",  P_STRING|P_VI_DEF,
- #if defined(FEAT_POSTSCRIPT) && defined(FEAT_MBYTE)
- 			    (char_u *)&p_pmcs, PV_NONE,
-@@ -1949,7 +1963,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)NULL, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"printmbfont", "pmbfn",  P_STRING|P_VI_DEF,
- #if defined(FEAT_POSTSCRIPT) && defined(FEAT_MBYTE)
- 			    (char_u *)&p_pmfn, PV_NONE,
-@@ -1958,7 +1972,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)NULL, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"printoptions", "popt", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- #ifdef FEAT_PRINTER
- 			    (char_u *)&p_popt, PV_NONE,
-@@ -1967,17 +1981,17 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)NULL, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"prompt",	    NULL,   P_BOOL|P_VI_DEF,
- 			    (char_u *)&p_prompt, PV_NONE,
--			    {(char_u *)TRUE, (char_u *)0L}},
-+			    {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
-     {"pumheight",   "ph",   P_NUM|P_VI_DEF,
- #ifdef FEAT_INS_EXPAND
- 			    (char_u *)&p_ph, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)0L, (char_u *)0L}},
-+			    {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
-     {"quoteescape", "qe",   P_STRING|P_ALLOCED|P_VI_DEF,
- #ifdef FEAT_TEXTOBJ
- 			    (char_u *)&p_qe, PV_QE,
-@@ -1986,47 +2000,47 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)NULL, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"readonly",    "ro",   P_BOOL|P_VI_DEF|P_RSTAT|P_NOGLOB,
- 			    (char_u *)&p_ro, PV_RO,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"redraw",	    NULL,   P_BOOL|P_VI_DEF,
- 			    (char_u *)NULL, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"redrawtime",  "rdt",  P_NUM|P_VI_DEF,
- #ifdef FEAT_RELTIME
- 			    (char_u *)&p_rdt, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)2000L, (char_u *)0L}},
-+			    {(char_u *)2000L, (char_u *)0L} SCRIPTID_INIT},
-     {"remap",	    NULL,   P_BOOL|P_VI_DEF,
- 			    (char_u *)&p_remap, PV_NONE,
--			    {(char_u *)TRUE, (char_u *)0L}},
-+			    {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
-     {"report",	    NULL,   P_NUM|P_VI_DEF,
- 			    (char_u *)&p_report, PV_NONE,
--			    {(char_u *)2L, (char_u *)0L}},
-+			    {(char_u *)2L, (char_u *)0L} SCRIPTID_INIT},
-     {"restorescreen", "rs", P_BOOL|P_VI_DEF,
- #ifdef WIN3264
- 			    (char_u *)&p_rs, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)TRUE, (char_u *)0L}},
-+			    {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
-     {"revins",	    "ri",   P_BOOL|P_VI_DEF|P_VIM,
- #ifdef FEAT_RIGHTLEFT
- 			    (char_u *)&p_ri, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"rightleft",   "rl",   P_BOOL|P_VI_DEF|P_RWIN,
- #ifdef FEAT_RIGHTLEFT
- 			    (char_u *)VAR_WIN, PV_RL,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"rightleftcmd", "rlc", P_STRING|P_ALLOCED|P_VI_DEF|P_RWIN,
- #ifdef FEAT_RIGHTLEFT
- 			    (char_u *)VAR_WIN, PV_RLC,
-@@ -2035,40 +2049,41 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)NULL, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"ruler",	    "ru",   P_BOOL|P_VI_DEF|P_VIM|P_RSTAT,
- #ifdef FEAT_CMDL_INFO
- 			    (char_u *)&p_ru, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"rulerformat", "ruf",  P_STRING|P_VI_DEF|P_ALLOCED|P_RSTAT,
- #ifdef FEAT_STL_OPT
- 			    (char_u *)&p_ruf, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)"", (char_u *)0L}},
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
-     {"runtimepath", "rtp",  P_STRING|P_VI_DEF|P_EXPAND|P_COMMA|P_NODUP|P_SECURE,
- 			    (char_u *)&p_rtp, PV_NONE,
--			    {(char_u *)DFLT_RUNTIMEPATH, (char_u *)0L}},
-+			    {(char_u *)DFLT_RUNTIMEPATH, (char_u *)0L}
-+			    SCRIPTID_INIT},
-     {"scroll",	    "scr",  P_NUM|P_NO_MKRC|P_VI_DEF,
- 			    (char_u *)VAR_WIN, PV_SCROLL,
--			    {(char_u *)12L, (char_u *)0L}},
-+			    {(char_u *)12L, (char_u *)0L} SCRIPTID_INIT},
-     {"scrollbind",  "scb",  P_BOOL|P_VI_DEF,
- #ifdef FEAT_SCROLLBIND
- 			    (char_u *)VAR_WIN, PV_SCBIND,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"scrolljump",  "sj",   P_NUM|P_VI_DEF|P_VIM,
- 			    (char_u *)&p_sj, PV_NONE,
--			    {(char_u *)1L, (char_u *)0L}},
-+			    {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
-     {"scrolloff",   "so",   P_NUM|P_VI_DEF|P_VIM|P_RALL,
- 			    (char_u *)&p_so, PV_NONE,
--			    {(char_u *)0L, (char_u *)0L}},
-+			    {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
-     {"scrollopt",   "sbo",  P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- #ifdef FEAT_SCROLLBIND
- 			    (char_u *)&p_sbo, PV_NONE,
-@@ -2077,27 +2092,29 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"sections",    "sect", P_STRING|P_VI_DEF,
- 			    (char_u *)&p_sections, PV_NONE,
--			    {(char_u *)"SHNHH HUnhsh", (char_u *)0L}},
-+			    {(char_u *)"SHNHH HUnhsh", (char_u *)0L}
-+			    SCRIPTID_INIT},
-     {"secure",	    NULL,   P_BOOL|P_VI_DEF|P_SECURE,
- 			    (char_u *)&p_secure, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"selection",   "sel",  P_STRING|P_VI_DEF,
- #ifdef FEAT_VISUAL
- 			    (char_u *)&p_sel, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)"inclusive", (char_u *)0L}},
-+			    {(char_u *)"inclusive", (char_u *)0L}
-+			    SCRIPTID_INIT},
-     {"selectmode",  "slm",  P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- #ifdef FEAT_VISUAL
- 			    (char_u *)&p_slm, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)"", (char_u *)0L}},
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
-     {"sessionoptions", "ssop", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- #ifdef FEAT_SESSION
- 			    (char_u *)&p_ssop, PV_NONE,
-@@ -2107,7 +2124,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"shell",	    "sh",   P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- 			    (char_u *)&p_sh, PV_NONE,
- 			    {
-@@ -2136,7 +2153,7 @@
- #  endif
- # endif
- #endif /* VMS */
--				(char_u *)0L}},
-+				(char_u *)0L} SCRIPTID_INIT},
-     {"shellcmdflag","shcf", P_STRING|P_VI_DEF|P_SECURE,
- 			    (char_u *)&p_shcf, PV_NONE,
- 			    {
-@@ -2149,7 +2166,7 @@
- 			    (char_u *)"-c",
- # endif
- #endif
--				(char_u *)0L}},
-+				(char_u *)0L} SCRIPTID_INIT},
-     {"shellpipe",   "sp",   P_STRING|P_VI_DEF|P_SECURE,
- #ifdef FEAT_QUICKFIX
- 			    (char_u *)&p_sp, PV_NONE,
-@@ -2168,30 +2185,30 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--    },
-+			    SCRIPTID_INIT},
-     {"shellquote",  "shq",  P_STRING|P_VI_DEF|P_SECURE,
- 			    (char_u *)&p_shq, PV_NONE,
--			    {(char_u *)"", (char_u *)0L}},
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
-     {"shellredir",  "srr",  P_STRING|P_VI_DEF|P_SECURE,
- 			    (char_u *)&p_srr, PV_NONE,
--			    {(char_u *)">", (char_u *)0L}},
-+			    {(char_u *)">", (char_u *)0L} SCRIPTID_INIT},
-     {"shellslash",  "ssl",   P_BOOL|P_VI_DEF,
- #ifdef BACKSLASH_IN_FILENAME
- 			    (char_u *)&p_ssl, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"shelltemp",   "stmp", P_BOOL,
- 			    (char_u *)&p_stmp, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)TRUE}},
-+			    {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
-     {"shelltype",   "st",   P_NUM|P_VI_DEF,
- #ifdef AMIGA
- 			    (char_u *)&p_st, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)0L, (char_u *)0L}},
-+			    {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
-     {"shellxquote", "sxq",  P_STRING|P_VI_DEF|P_SECURE,
- 			    (char_u *)&p_sxq, PV_NONE,
- 			    {
-@@ -2200,30 +2217,31 @@
- #else
- 			    (char_u *)"",
- #endif
--				(char_u *)0L}},
-+				(char_u *)0L} SCRIPTID_INIT},
-     {"shiftround",  "sr",   P_BOOL|P_VI_DEF|P_VIM,
- 			    (char_u *)&p_sr, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"shiftwidth",  "sw",   P_NUM|P_VI_DEF,
- 			    (char_u *)&p_sw, PV_SW,
--			    {(char_u *)8L, (char_u *)0L}},
-+			    {(char_u *)8L, (char_u *)0L} SCRIPTID_INIT},
-     {"shortmess",   "shm",  P_STRING|P_VIM|P_FLAGLIST,
- 			    (char_u *)&p_shm, PV_NONE,
--			    {(char_u *)"", (char_u *)"filnxtToO"}},
-+			    {(char_u *)"", (char_u *)"filnxtToO"}
-+			    SCRIPTID_INIT},
-     {"shortname",   "sn",   P_BOOL|P_VI_DEF,
- #ifdef SHORT_FNAME
- 			    (char_u *)NULL, PV_NONE,
- #else
- 			    (char_u *)&p_sn, PV_SN,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"showbreak",   "sbr",  P_STRING|P_VI_DEF|P_RALL,
- #ifdef FEAT_LINEBREAK
- 			    (char_u *)&p_sbr, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)"", (char_u *)0L}},
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
-     {"showcmd",	    "sc",   P_BOOL|P_VIM,
- #ifdef FEAT_CMDL_INFO
- 			    (char_u *)&p_sc, PV_NONE,
-@@ -2236,58 +2254,58 @@
- #else
- 				(char_u *)TRUE
- #endif
--				}},
-+				} SCRIPTID_INIT},
-     {"showfulltag", "sft",  P_BOOL|P_VI_DEF,
- 			    (char_u *)&p_sft, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"showmatch",   "sm",   P_BOOL|P_VI_DEF,
- 			    (char_u *)&p_sm, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"showmode",    "smd",  P_BOOL|P_VIM,
- 			    (char_u *)&p_smd, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)TRUE}},
-+			    {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
-     {"showtabline", "stal", P_NUM|P_VI_DEF|P_RALL,
- #ifdef FEAT_WINDOWS
- 			    (char_u *)&p_stal, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)1L, (char_u *)0L}},
-+			    {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
-     {"sidescroll",  "ss",   P_NUM|P_VI_DEF,
- 			    (char_u *)&p_ss, PV_NONE,
--			    {(char_u *)0L, (char_u *)0L}},
-+			    {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
-     {"sidescrolloff", "siso", P_NUM|P_VI_DEF|P_VIM|P_RBUF,
- 			    (char_u *)&p_siso, PV_NONE,
--			    {(char_u *)0L, (char_u *)0L}},
-+			    {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
-     {"slowopen",    "slow", P_BOOL|P_VI_DEF,
- 			    (char_u *)NULL, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"smartcase",   "scs",  P_BOOL|P_VI_DEF|P_VIM,
- 			    (char_u *)&p_scs, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"smartindent", "si",   P_BOOL|P_VI_DEF|P_VIM,
- #ifdef FEAT_SMARTINDENT
- 			    (char_u *)&p_si, PV_SI,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"smarttab",    "sta",  P_BOOL|P_VI_DEF|P_VIM,
- 			    (char_u *)&p_sta, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"softtabstop", "sts",  P_NUM|P_VI_DEF|P_VIM,
- 			    (char_u *)&p_sts, PV_STS,
--			    {(char_u *)0L, (char_u *)0L}},
-+			    {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
-     {"sourceany",   NULL,   P_BOOL|P_VI_DEF,
- 			    (char_u *)NULL, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"spell",	    NULL,   P_BOOL|P_VI_DEF|P_RWIN,
- #ifdef FEAT_SPELL
- 			    (char_u *)VAR_WIN, PV_SPELL,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"spellcapcheck", "spc", P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF,
- #ifdef FEAT_SPELL
- 			    (char_u *)&p_spc, PV_SPC,
-@@ -2296,7 +2314,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"spellfile",   "spf",  P_STRING|P_EXPAND|P_ALLOCED|P_VI_DEF|P_SECURE|P_COMMA,
- #ifdef FEAT_SPELL
- 			    (char_u *)&p_spf, PV_SPF,
-@@ -2305,7 +2323,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"spelllang",   "spl",  P_STRING|P_ALLOCED|P_VI_DEF|P_COMMA|P_RBUF|P_EXPAND,
- #ifdef FEAT_SPELL
- 			    (char_u *)&p_spl, PV_SPL,
-@@ -2314,7 +2332,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"spellsuggest", "sps", P_STRING|P_VI_DEF|P_EXPAND|P_SECURE|P_COMMA,
- #ifdef FEAT_SPELL
- 			    (char_u *)&p_sps, PV_NONE,
-@@ -2323,35 +2341,35 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--    },
-+			    SCRIPTID_INIT},
-     {"splitbelow",  "sb",   P_BOOL|P_VI_DEF,
- #ifdef FEAT_WINDOWS
- 			    (char_u *)&p_sb, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"splitright",  "spr",  P_BOOL|P_VI_DEF,
- #ifdef FEAT_VERTSPLIT
- 			    (char_u *)&p_spr, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"startofline", "sol",  P_BOOL|P_VI_DEF|P_VIM,
- 			    (char_u *)&p_sol, PV_NONE,
--			    {(char_u *)TRUE, (char_u *)0L}},
-+			    {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
-     {"statusline"  ,"stl",  P_STRING|P_VI_DEF|P_ALLOCED|P_RSTAT,
- #ifdef FEAT_STL_OPT
- 			    (char_u *)&p_stl, PV_STL,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)"", (char_u *)0L}},
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
-     {"suffixes",    "su",   P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- 			    (char_u *)&p_su, PV_NONE,
- 			    {(char_u *)".bak,~,.o,.h,.info,.swp,.obj",
--				(char_u *)0L}},
-+				(char_u *)0L} SCRIPTID_INIT},
-     {"suffixesadd", "sua",  P_STRING|P_VI_DEF|P_ALLOCED|P_COMMA|P_NODUP,
- #ifdef FEAT_SEARCHPATH
- 			    (char_u *)&p_sua, PV_SUA,
-@@ -2360,16 +2378,16 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"swapfile",    "swf",  P_BOOL|P_VI_DEF|P_RSTAT,
- 			    (char_u *)&p_swf, PV_SWF,
--			    {(char_u *)TRUE, (char_u *)0L}},
-+			    {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
-     {"swapsync",    "sws",  P_STRING|P_VI_DEF,
- 			    (char_u *)&p_sws, PV_NONE,
--			    {(char_u *)"fsync", (char_u *)0L}},
-+			    {(char_u *)"fsync", (char_u *)0L} SCRIPTID_INIT},
-     {"switchbuf",   "swb",  P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- 			    (char_u *)&p_swb, PV_NONE,
--			    {(char_u *)"", (char_u *)0L}},
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
-     {"synmaxcol",   "smc",  P_NUM|P_VI_DEF|P_RBUF,
- #ifdef FEAT_SYN_HL
- 			    (char_u *)&p_smc, PV_SMC,
-@@ -2378,7 +2396,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"syntax",	    "syn",  P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB|P_NFNAME,
- #ifdef FEAT_SYN_HL
- 			    (char_u *)&p_syn, PV_SYN,
-@@ -2387,24 +2405,24 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"tabline",	    "tal",  P_STRING|P_VI_DEF|P_RALL,
- #ifdef FEAT_STL_OPT
- 			    (char_u *)&p_tal, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)"", (char_u *)0L}},
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
-     {"tabpagemax",  "tpm",  P_NUM|P_VI_DEF,
- #ifdef FEAT_WINDOWS
- 			    (char_u *)&p_tpm, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)10L, (char_u *)0L}},
-+			    {(char_u *)10L, (char_u *)0L} SCRIPTID_INIT},
-     {"tabstop",	    "ts",   P_NUM|P_VI_DEF|P_RBUF,
- 			    (char_u *)&p_ts, PV_TS,
--			    {(char_u *)8L, (char_u *)0L}},
-+			    {(char_u *)8L, (char_u *)0L} SCRIPTID_INIT},
-     {"tagbsearch",  "tbs",   P_BOOL|P_VI_DEF,
- 			    (char_u *)&p_tbs, PV_NONE,
- #ifdef VMS	/* binary searching doesn't appear to work on VMS */
-@@ -2412,13 +2430,13 @@
- #else
- 			    {(char_u *)TRUE, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"taglength",   "tl",   P_NUM|P_VI_DEF,
- 			    (char_u *)&p_tl, PV_NONE,
--			    {(char_u *)0L, (char_u *)0L}},
-+			    {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
-     {"tagrelative", "tr",   P_BOOL|P_VIM,
- 			    (char_u *)&p_tr, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)TRUE}},
-+			    {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
-     {"tags",	    "tag",  P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP,
- 			    (char_u *)&p_tags, PV_TAGS,
- 			    {
-@@ -2427,20 +2445,20 @@
- #else
- 			    (char_u *)"./tags,tags",
- #endif
--				(char_u *)0L}},
-+				(char_u *)0L} SCRIPTID_INIT},
-     {"tagstack",    "tgst", P_BOOL|P_VI_DEF,
- 			    (char_u *)&p_tgst, PV_NONE,
--			    {(char_u *)TRUE, (char_u *)0L}},
-+			    {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
-     {"term",	    NULL,   P_STRING|P_EXPAND|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RALL,
- 			    (char_u *)&T_NAME, PV_NONE,
--			    {(char_u *)"", (char_u *)0L}},
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
-     {"termbidi", "tbidi",   P_BOOL|P_VI_DEF,
- #ifdef FEAT_ARABIC
- 			    (char_u *)&p_tbidi, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"termencoding", "tenc", P_STRING|P_VI_DEF|P_RCLR,
- #ifdef FEAT_MBYTE
- 			    (char_u *)&p_tenc, PV_NONE,
-@@ -2449,13 +2467,14 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"terse",	    NULL,   P_BOOL|P_VI_DEF,
- 			    (char_u *)&p_terse, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"textauto",    "ta",   P_BOOL|P_VIM,
- 			    (char_u *)&p_ta, PV_NONE,
--			    {(char_u *)DFLT_TEXTAUTO, (char_u *)TRUE}},
-+			    {(char_u *)DFLT_TEXTAUTO, (char_u *)TRUE}
-+			    SCRIPTID_INIT},
-     {"textmode",    "tx",   P_BOOL|P_VI_DEF|P_NO_MKRC,
- 			    (char_u *)&p_tx, PV_TX,
- 			    {
-@@ -2464,40 +2483,40 @@
- #else
- 			    (char_u *)FALSE,
- #endif
--				(char_u *)0L}},
-+				(char_u *)0L} SCRIPTID_INIT},
-     {"textwidth",   "tw",   P_NUM|P_VI_DEF|P_VIM,
- 			    (char_u *)&p_tw, PV_TW,
--			    {(char_u *)0L, (char_u *)0L}},
-+			    {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
-     {"thesaurus",   "tsr",  P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP,
- #ifdef FEAT_INS_EXPAND
- 			    (char_u *)&p_tsr, PV_TSR,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)"", (char_u *)0L}},
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
-     {"tildeop",	    "top",  P_BOOL|P_VI_DEF|P_VIM,
- 			    (char_u *)&p_to, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"timeout",	    "to",   P_BOOL|P_VI_DEF,
- 			    (char_u *)&p_timeout, PV_NONE,
--			    {(char_u *)TRUE, (char_u *)0L}},
-+			    {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
-     {"timeoutlen",  "tm",   P_NUM|P_VI_DEF,
- 			    (char_u *)&p_tm, PV_NONE,
--			    {(char_u *)1000L, (char_u *)0L}},
-+			    {(char_u *)1000L, (char_u *)0L} SCRIPTID_INIT},
-     {"title",	    NULL,   P_BOOL|P_VI_DEF,
- #ifdef FEAT_TITLE
- 			    (char_u *)&p_title, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"titlelen",    NULL,   P_NUM|P_VI_DEF,
- #ifdef FEAT_TITLE
- 			    (char_u *)&p_titlelen, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)85L, (char_u *)0L}},
-+			    {(char_u *)85L, (char_u *)0L} SCRIPTID_INIT},
-     {"titleold",    NULL,   P_STRING|P_VI_DEF|P_GETTEXT|P_SECURE|P_NO_MKRC,
- #ifdef FEAT_TITLE
- 			    (char_u *)&p_titleold, PV_NONE,
-@@ -2507,49 +2526,50 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"titlestring", NULL,   P_STRING|P_VI_DEF,
- #ifdef FEAT_TITLE
- 			    (char_u *)&p_titlestring, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)"", (char_u *)0L}},
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- #if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32)
-     {"toolbar",     "tb",   P_STRING|P_COMMA|P_VI_DEF|P_NODUP,
- 			    (char_u *)&p_toolbar, PV_NONE,
--			    {(char_u *)"icons,tooltips", (char_u *)0L}},
-+			    {(char_u *)"icons,tooltips", (char_u *)0L}
-+			    SCRIPTID_INIT},
- #endif
- #if defined(FEAT_TOOLBAR) && defined(FEAT_GUI_GTK) && defined(HAVE_GTK2)
-     {"toolbariconsize",	"tbis", P_STRING|P_VI_DEF,
- 			    (char_u *)&p_tbis, PV_NONE,
--			    {(char_u *)"small", (char_u *)0L}},
-+			    {(char_u *)"small", (char_u *)0L} SCRIPTID_INIT},
- #endif
-     {"ttimeout",    NULL,   P_BOOL|P_VI_DEF|P_VIM,
- 			    (char_u *)&p_ttimeout, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"ttimeoutlen", "ttm",  P_NUM|P_VI_DEF,
- 			    (char_u *)&p_ttm, PV_NONE,
--			    {(char_u *)-1L, (char_u *)0L}},
-+			    {(char_u *)-1L, (char_u *)0L} SCRIPTID_INIT},
-     {"ttybuiltin",  "tbi",  P_BOOL|P_VI_DEF,
- 			    (char_u *)&p_tbi, PV_NONE,
--			    {(char_u *)TRUE, (char_u *)0L}},
-+			    {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
-     {"ttyfast",	    "tf",   P_BOOL|P_NO_MKRC|P_VI_DEF,
- 			    (char_u *)&p_tf, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"ttymouse",    "ttym", P_STRING|P_NODEFAULT|P_NO_MKRC|P_VI_DEF,
- #if defined(FEAT_MOUSE) && (defined(UNIX) || defined(VMS))
- 			    (char_u *)&p_ttym, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)"", (char_u *)0L}},
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
-     {"ttyscroll",   "tsl",  P_NUM|P_VI_DEF,
- 			    (char_u *)&p_ttyscroll, PV_NONE,
--			    {(char_u *)999L, (char_u *)0L}},
-+			    {(char_u *)999L, (char_u *)0L} SCRIPTID_INIT},
-     {"ttytype",	    "tty",  P_STRING|P_EXPAND|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RALL,
- 			    (char_u *)&T_NAME, PV_NONE,
--			    {(char_u *)"", (char_u *)0L}},
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
-     {"undolevels",  "ul",   P_NUM|P_VI_DEF,
- 			    (char_u *)&p_ul, PV_NONE,
- 			    {
-@@ -2558,19 +2578,19 @@
- #else
- 			    (char_u *)100L,
- #endif
--				(char_u *)0L}},
-+				(char_u *)0L} SCRIPTID_INIT},
-     {"updatecount", "uc",   P_NUM|P_VI_DEF,
- 			    (char_u *)&p_uc, PV_NONE,
--			    {(char_u *)200L, (char_u *)0L}},
-+			    {(char_u *)200L, (char_u *)0L} SCRIPTID_INIT},
-     {"updatetime",  "ut",   P_NUM|P_VI_DEF,
- 			    (char_u *)&p_ut, PV_NONE,
--			    {(char_u *)4000L, (char_u *)0L}},
-+			    {(char_u *)4000L, (char_u *)0L} SCRIPTID_INIT},
-     {"verbose",	    "vbs",  P_NUM|P_VI_DEF,
- 			    (char_u *)&p_verbose, PV_NONE,
--			    {(char_u *)0L, (char_u *)0L}},
-+			    {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
-     {"verbosefile", "vfile", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- 			    (char_u *)&p_vfile, PV_NONE,
--			    {(char_u *)"", (char_u *)0L}},
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
-     {"viewdir",     "vdir", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- #ifdef FEAT_SESSION
- 			    (char_u *)&p_vdir, PV_NONE,
-@@ -2579,7 +2599,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"viewoptions", "vop",  P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- #ifdef FEAT_SESSION
- 			    (char_u *)&p_vop, PV_NONE,
-@@ -2588,25 +2608,25 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"viminfo",	    "vi",   P_STRING|P_COMMA|P_NODUP|P_SECURE,
- #ifdef FEAT_VIMINFO
- 			    (char_u *)&p_viminfo, PV_NONE,
- #if defined(MSDOS) || defined(MSWIN) || defined(OS2)
--			    {(char_u *)"", (char_u *)"'20,<50,s10,h,rA:,rB:"}
-+			    {(char_u *)"", (char_u *)"'100,<50,s10,h,rA:,rB:"}
- #else
- # ifdef AMIGA
- 			    {(char_u *)"",
--				 (char_u *)"'20,<50,s10,h,rdf0:,rdf1:,rdf2:"}
-+				 (char_u *)"'100,<50,s10,h,rdf0:,rdf1:,rdf2:"}
- # else
--			    {(char_u *)"", (char_u *)"'20,<50,s10,h"}
-+			    {(char_u *)"", (char_u *)"'100,<50,s10,h"}
- # endif
- #endif
- #else
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"virtualedit", "ve",   P_STRING|P_COMMA|P_NODUP|P_VI_DEF|P_VIM,
- #ifdef FEAT_VIRTUALEDIT
- 			    (char_u *)&p_ve, PV_NONE,
-@@ -2615,51 +2635,52 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)0L, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"visualbell",  "vb",   P_BOOL|P_VI_DEF,
- 			    (char_u *)&p_vb, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"w300",	    NULL,   P_NUM|P_VI_DEF,
- 			    (char_u *)NULL, PV_NONE,
--			    {(char_u *)0L, (char_u *)0L}},
-+			    {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
-     {"w1200",	    NULL,   P_NUM|P_VI_DEF,
- 			    (char_u *)NULL, PV_NONE,
--			    {(char_u *)0L, (char_u *)0L}},
-+			    {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
-     {"w9600",	    NULL,   P_NUM|P_VI_DEF,
- 			    (char_u *)NULL, PV_NONE,
--			    {(char_u *)0L, (char_u *)0L}},
-+			    {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
-     {"warn",	    NULL,   P_BOOL|P_VI_DEF,
- 			    (char_u *)&p_warn, PV_NONE,
--			    {(char_u *)TRUE, (char_u *)0L}},
-+			    {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
-     {"weirdinvert", "wiv",  P_BOOL|P_VI_DEF|P_RCLR,
- 			    (char_u *)&p_wiv, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"whichwrap",   "ww",   P_STRING|P_VIM|P_COMMA|P_FLAGLIST,
- 			    (char_u *)&p_ww, PV_NONE,
--			    {(char_u *)"", (char_u *)"b,s"}},
-+			    {(char_u *)"", (char_u *)"b,s"} SCRIPTID_INIT},
-     {"wildchar",    "wc",   P_NUM|P_VIM,
- 			    (char_u *)&p_wc, PV_NONE,
--			    {(char_u *)(long)Ctrl_E, (char_u *)(long)TAB}},
-+			    {(char_u *)(long)Ctrl_E, (char_u *)(long)TAB}
-+			    SCRIPTID_INIT},
-     {"wildcharm",   "wcm",   P_NUM|P_VI_DEF,
- 			    (char_u *)&p_wcm, PV_NONE,
--			    {(char_u *)0L, (char_u *)0L}},
-+			    {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
-     {"wildignore",  "wig",  P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- #ifdef FEAT_WILDIGN
- 			    (char_u *)&p_wig, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)"", (char_u *)0L}},
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
-     {"wildmenu",    "wmnu", P_BOOL|P_VI_DEF,
- #ifdef FEAT_WILDMENU
- 			    (char_u *)&p_wmnu, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"wildmode",    "wim",  P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- 			    (char_u *)&p_wim, PV_NONE,
--			    {(char_u *)"full", (char_u *)0L}},
-+			    {(char_u *)"full", (char_u *)0L} SCRIPTID_INIT},
-     {"wildoptions", "wop",  P_STRING|P_VI_DEF,
- #ifdef FEAT_CMDL_COMPL
- 			    (char_u *)&p_wop, PV_NONE,
-@@ -2668,7 +2689,7 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)NULL, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"winaltkeys",  "wak",  P_STRING|P_VI_DEF,
- #ifdef FEAT_WAK
- 			    (char_u *)&p_wak, PV_NONE,
-@@ -2677,67 +2698,67 @@
- 			    (char_u *)NULL, PV_NONE,
- 			    {(char_u *)NULL, (char_u *)0L}
- #endif
--			    },
-+			    SCRIPTID_INIT},
-     {"window",	    "wi",   P_NUM|P_VI_DEF,
- 			    (char_u *)&p_window, PV_NONE,
--			    {(char_u *)0L, (char_u *)0L}},
-+			    {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
-     {"winheight",   "wh",   P_NUM|P_VI_DEF,
- #ifdef FEAT_WINDOWS
- 			    (char_u *)&p_wh, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)1L, (char_u *)0L}},
-+			    {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
-     {"winfixheight", "wfh", P_BOOL|P_VI_DEF|P_RSTAT,
- #ifdef FEAT_WINDOWS
- 			    (char_u *)VAR_WIN, PV_WFH,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"winfixwidth", "wfw", P_BOOL|P_VI_DEF|P_RSTAT,
- #ifdef FEAT_VERTSPLIT
- 			    (char_u *)VAR_WIN, PV_WFW,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"winminheight", "wmh", P_NUM|P_VI_DEF,
- #ifdef FEAT_WINDOWS
- 			    (char_u *)&p_wmh, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)1L, (char_u *)0L}},
-+			    {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
-     {"winminwidth", "wmw", P_NUM|P_VI_DEF,
- #ifdef FEAT_VERTSPLIT
- 			    (char_u *)&p_wmw, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)1L, (char_u *)0L}},
-+			    {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
-     {"winwidth",   "wiw",   P_NUM|P_VI_DEF,
- #ifdef FEAT_VERTSPLIT
- 			    (char_u *)&p_wiw, PV_NONE,
- #else
- 			    (char_u *)NULL, PV_NONE,
- #endif
--			    {(char_u *)20L, (char_u *)0L}},
-+			    {(char_u *)20L, (char_u *)0L} SCRIPTID_INIT},
-     {"wrap",	    NULL,   P_BOOL|P_VI_DEF|P_RWIN,
- 			    (char_u *)VAR_WIN, PV_WRAP,
--			    {(char_u *)TRUE, (char_u *)0L}},
-+			    {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
-     {"wrapmargin",  "wm",   P_NUM|P_VI_DEF,
- 			    (char_u *)&p_wm, PV_WM,
--			    {(char_u *)0L, (char_u *)0L}},
-+			    {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
-     {"wrapscan",    "ws",   P_BOOL|P_VI_DEF,
- 			    (char_u *)&p_ws, PV_NONE,
--			    {(char_u *)TRUE, (char_u *)0L}},
-+			    {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
-     {"write",	    NULL,   P_BOOL|P_VI_DEF,
- 			    (char_u *)&p_write, PV_NONE,
--			    {(char_u *)TRUE, (char_u *)0L}},
-+			    {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
-     {"writeany",    "wa",   P_BOOL|P_VI_DEF,
- 			    (char_u *)&p_wa, PV_NONE,
--			    {(char_u *)FALSE, (char_u *)0L}},
-+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
-     {"writebackup", "wb",   P_BOOL|P_VI_DEF|P_VIM,
- 			    (char_u *)&p_wb, PV_NONE,
- 			    {
-@@ -2746,15 +2767,15 @@
- #else
- 			    (char_u *)FALSE,
- #endif
--				(char_u *)0L}},
-+				(char_u *)0L} SCRIPTID_INIT},
-     {"writedelay",  "wd",   P_NUM|P_VI_DEF,
- 			    (char_u *)&p_wd, PV_NONE,
--			    {(char_u *)0L, (char_u *)0L}},
-+			    {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- 
- /* terminal output codes */
- #define p_term(sss, vvv)   {sss, NULL, P_STRING|P_VI_DEF|P_RALL|P_SECURE, \
- 			    (char_u *)&vvv, PV_NONE, \
--			    {(char_u *)"", (char_u *)0L}},
-+			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- 
-     p_term("t_AB", T_CAB)
-     p_term("t_AF", T_CAF)
-@@ -2815,7 +2836,8 @@
- 
- /* terminal key codes are not in here */
- 
--    {NULL, NULL, 0, NULL, PV_NONE, {NULL, NULL}}	/* end marker */
-+    /* end marker */
-+    {NULL, NULL, 0, NULL, PV_NONE, {NULL, NULL} SCRIPTID_INIT}
- };
- 
- #define PARAM_COUNT (sizeof(options) / sizeof(struct vimoption))
-@@ -3984,7 +4006,7 @@
- 	else
- 	{
- 	    prefix = 1;
--	    if (STRNCMP(arg, "no", 2) == 0)
-+	    if (STRNCMP(arg, "no", 2) == 0 && STRNCMP(arg, "novice", 6) != 0)
- 	    {
- 		prefix = 0;
- 		arg += 2;
-@@ -4119,11 +4141,23 @@
- 					   && options[opt_idx].var == VAR_WIN)
- 		goto skip;
- 
--	    /* Disallow changing some options from modelines */
--	    if ((opt_flags & OPT_MODELINE) && (flags & P_SECURE))
-+	    /* Disallow changing some options from modelines. */
-+	    if (opt_flags & OPT_MODELINE)
- 	    {
--		errmsg = (char_u *)_("E520: Not allowed in a modeline");
--		goto skip;
-+		if (flags & P_SECURE)
-+		{
-+		    errmsg = (char_u *)_("E520: Not allowed in a modeline");
-+		    goto skip;
-+		}
-+#ifdef FEAT_DIFF
-+		/* In diff mode some options are overruled.  This avoids that
-+		 * 'foldmethod' becomes "marker" instead of "diff" and that
-+		 * "wrap" gets set. */
-+		if (curwin->w_p_diff
-+			&& (options[opt_idx].indir == PV_FDM
-+			    || options[opt_idx].indir == PV_WRAP))
-+		    goto skip;
-+#endif
- 	    }
- 
- #ifdef HAVE_SANDBOX
-@@ -5268,6 +5302,21 @@
- }
- #endif
- 
-+#ifdef FEAT_TITLE
-+static void redraw_titles __ARGS((void));
-+
-+/*
-+ * Redraw the window title and/or tab page text later.
-+ */
-+static void redraw_titles()
-+{
-+    need_maketitle = TRUE;
-+# ifdef FEAT_WINDOWS
-+    redraw_tabline = TRUE;
-+# endif
-+}
-+#endif
-+
- /*
-  * Set a string option to a new value (without checking the effect).
-  * The string is copied into allocated memory.
-@@ -5275,14 +5324,13 @@
-  * When "set_sid" is zero set the scriptID to current_SID.  When "set_sid" is
-  * SID_NONE don't set the scriptID.  Otherwise set the scriptID to "set_sid".
-  */
--/*ARGSUSED*/
-     void
- set_string_option_direct(name, opt_idx, val, opt_flags, set_sid)
-     char_u	*name;
-     int		opt_idx;
-     char_u	*val;
-     int		opt_flags;	/* OPT_FREE, OPT_LOCAL and/or OPT_GLOBAL */
--    int		set_sid;
-+    int		set_sid UNUSED;
- {
-     char_u	*s;
-     char_u	**varp;
-@@ -5407,6 +5455,10 @@
-     int		did_chartab = FALSE;
-     char_u	**gvarp;
-     long_u	free_oldval = (options[opt_idx].flags & P_ALLOCED);
-+#ifdef FEAT_GUI
-+    /* set when changing an option that only requires a redraw in the GUI */
-+    int		redraw_gui_only = FALSE;
-+#endif
- 
-     /* Get the global option to compare with, otherwise we would have to check
-      * two values for all local options. */
-@@ -5668,7 +5720,7 @@
- 	    {
- # ifdef FEAT_TITLE
- 		/* May show a "+" in the title now. */
--		need_maketitle = TRUE;
-+		redraw_titles();
- # endif
- 		/* Add 'fileencoding' to the swap file. */
- 		ml_setflags(curbuf);
-@@ -5687,7 +5739,7 @@
- 	    {
- 		errmsg = mb_init();
- # ifdef FEAT_TITLE
--		need_maketitle = TRUE;
-+		redraw_titles();
- # endif
- 	    }
- 	}
-@@ -5766,14 +5818,28 @@
- 	/* load or unload key mapping tables */
- 	errmsg = keymap_init();
- 
--	/* When successfully installed a new keymap switch on using it. */
--	if (*curbuf->b_p_keymap != NUL && errmsg == NULL)
-+	if (errmsg == NULL)
- 	{
--	    curbuf->b_p_iminsert = B_IMODE_LMAP;
--	    if (curbuf->b_p_imsearch != B_IMODE_USE_INSERT)
--		curbuf->b_p_imsearch = B_IMODE_LMAP;
--	    set_iminsert_global();
--	    set_imsearch_global();
-+	    if (*curbuf->b_p_keymap != NUL)
-+	    {
-+		/* Installed a new keymap, switch on using it. */
-+		curbuf->b_p_iminsert = B_IMODE_LMAP;
-+		if (curbuf->b_p_imsearch != B_IMODE_USE_INSERT)
-+		    curbuf->b_p_imsearch = B_IMODE_LMAP;
-+	    }
-+	    else
-+	    {
-+		/* Cleared the keymap, may reset 'iminsert' and 'imsearch'. */
-+		if (curbuf->b_p_iminsert == B_IMODE_LMAP)
-+		    curbuf->b_p_iminsert = B_IMODE_NONE;
-+		if (curbuf->b_p_imsearch == B_IMODE_LMAP)
-+		    curbuf->b_p_imsearch = B_IMODE_USE_INSERT;
-+	    }
-+	    if ((opt_flags & OPT_LOCAL) == 0)
-+	    {
-+		set_iminsert_global();
-+		set_imsearch_global();
-+	    }
- # ifdef FEAT_WINDOWS
- 	    status_redraw_curbuf();
- # endif
-@@ -5796,7 +5862,7 @@
- 	    else
- 		curbuf->b_p_tx = FALSE;
- #ifdef FEAT_TITLE
--	    need_maketitle = TRUE;
-+	    redraw_titles();
- #endif
- 	    /* update flag in swap file */
- 	    ml_setflags(curbuf);
-@@ -5977,15 +6043,23 @@
- 	/* ":set t_Co=0" and ":set t_Co=1" do ":set t_Co=" */
- 	if (varp == &T_CCO)
- 	{
--	    t_colors = atoi((char *)T_CCO);
--	    if (t_colors <= 1)
-+	    int colors = atoi((char *)T_CCO);
-+
-+	    /* Only reinitialize colors if t_Co value has really changed to
-+	     * avoid expensive reload of colorscheme if t_Co is set to the
-+	     * same value multiple times. */
-+	    if (colors != t_colors)
- 	    {
--		if (new_value_alloced)
--		    vim_free(T_CCO);
--		T_CCO = empty_option;
-+		t_colors = colors;
-+		if (t_colors <= 1)
-+		{
-+		    if (new_value_alloced)
-+			vim_free(T_CCO);
-+		    T_CCO = empty_option;
-+		}
-+		/* We now have a different color setup, initialize it again. */
-+		init_highlight(TRUE, FALSE);
- 	    }
--	    /* We now have a different color setup, initialize it again. */
--	    init_highlight(TRUE, FALSE);
- 	}
- 	ttest(FALSE);
- 	if (varp == &T_ME)
-@@ -6055,6 +6129,7 @@
- 		    errmsg = (char_u *)N_("E596: Invalid font(s)");
- 	    }
- 	}
-+	redraw_gui_only = TRUE;
-     }
- # ifdef FEAT_XFONTSET
-     else if (varp == &p_guifontset)
-@@ -6063,6 +6138,7 @@
- 	    errmsg = (char_u *)N_("E597: can't select fontset");
- 	else if (gui.in_use && gui_init_font(p_guifontset, TRUE) != OK)
- 	    errmsg = (char_u *)N_("E598: Invalid fontset");
-+	redraw_gui_only = TRUE;
-     }
- # endif
- # ifdef FEAT_MBYTE
-@@ -6072,6 +6148,7 @@
- 	    errmsg = (char_u *)N_("E533: can't select wide font");
- 	else if (gui_get_wide_font() == FAIL)
- 	    errmsg = (char_u *)N_("E534: Invalid wide font");
-+	redraw_gui_only = TRUE;
-     }
- # endif
- #endif
-@@ -6133,13 +6210,24 @@
- #ifdef FEAT_GUI
-     /* 'guioptions' */
-     else if (varp == &p_go)
-+    {
- 	gui_init_which_components(oldval);
-+	redraw_gui_only = TRUE;
-+    }
- #endif
- 
- #if defined(FEAT_GUI_TABLINE)
-     /* 'guitablabel' */
-     else if (varp == &p_gtl)
-+    {
- 	redraw_tabline = TRUE;
-+	redraw_gui_only = TRUE;
-+    }
-+    /* 'guitabtooltip' */
-+    else if (varp == &p_gtt)
-+    {
-+	redraw_gui_only = TRUE;
-+    }
- #endif
- 
- #if defined(FEAT_MOUSE_TTY) && (defined(UNIX) || defined(VMS))
-@@ -6717,7 +6805,11 @@
- 
-     if (curwin->w_curswant != MAXCOL)
- 	curwin->w_set_curswant = TRUE;  /* in case 'showbreak' changed */
--    check_redraw(options[opt_idx].flags);
-+#ifdef FEAT_GUI
-+    /* check redraw when it's not a GUI option or the GUI is active. */
-+    if (!redraw_gui_only || gui.in_use)
-+#endif
-+	check_redraw(options[opt_idx].flags);
- 
-     return errmsg;
- }
-@@ -6932,6 +7024,7 @@
-     int		new_unnamed = FALSE;
-     int		new_autoselect = FALSE;
-     int		new_autoselectml = FALSE;
-+    int		new_html = FALSE;
-     regprog_T	*new_exclude_prog = NULL;
-     char_u	*errmsg = NULL;
-     char_u	*p;
-@@ -6955,6 +7048,11 @@
- 	    new_autoselectml = TRUE;
- 	    p += 12;
- 	}
-+	else if (STRNCMP(p, "html", 4) == 0 && (p[4] == ',' || p[4] == NUL))
-+	{
-+	    new_html = TRUE;
-+	    p += 4;
-+	}
- 	else if (STRNCMP(p, "exclude:", 8) == 0 && new_exclude_prog == NULL)
- 	{
- 	    p += 8;
-@@ -6976,6 +7074,7 @@
- 	clip_unnamed = new_unnamed;
- 	clip_autoselect = new_autoselect;
- 	clip_autoselectml = new_autoselectml;
-+	clip_html = new_html;
- 	vim_free(clip_exclude_prog);
- 	clip_exclude_prog = new_exclude_prog;
-     }
-@@ -7105,22 +7204,28 @@
- 	    curbuf->b_did_warn = FALSE;
- 
- #ifdef FEAT_TITLE
--	need_maketitle = TRUE;
-+	redraw_titles();
- #endif
-     }
- 
- #ifdef FEAT_TITLE
-     /* when 'modifiable' is changed, redraw the window title */
-     else if ((int *)varp == &curbuf->b_p_ma)
--	need_maketitle = TRUE;
-+    {
-+	redraw_titles();
-+    }
-     /* when 'endofline' is changed, redraw the window title */
-     else if ((int *)varp == &curbuf->b_p_eol)
--	need_maketitle = TRUE;
--#ifdef FEAT_MBYTE
--    /* when 'bomb' is changed, redraw the window title */
-+    {
-+	redraw_titles();
-+    }
-+# ifdef FEAT_MBYTE
-+    /* when 'bomb' is changed, redraw the window title and tab page text */
-     else if ((int *)varp == &curbuf->b_p_bomb)
--	need_maketitle = TRUE;
--#endif
-+    {
-+	redraw_titles();
-+    }
-+# endif
- #endif
- 
-     /* when 'bin' is set also set some other options */
-@@ -7128,7 +7233,7 @@
-     {
- 	set_options_bin(old_value, curbuf->b_p_bin, opt_flags);
- #ifdef FEAT_TITLE
--	need_maketitle = TRUE;
-+	redraw_titles();
- #endif
-     }
- 
-@@ -7279,7 +7384,7 @@
- 	if (!value)
- 	    save_file_ff(curbuf);	/* Buffer is unchanged */
- #ifdef FEAT_TITLE
--	need_maketitle = TRUE;
-+	redraw_titles();
- #endif
- #ifdef FEAT_AUTOCMD
- 	modified_was_set = value;
-@@ -7486,9 +7591,13 @@
- 	     * set. */
- 	    if (STRCMP(p_enc, "utf-8") != 0)
- 	    {
-+		static char *w_arabic = N_("W17: Arabic requires UTF-8, do ':set encoding=utf-8'");
-+
- 		msg_source(hl_attr(HLF_W));
--		MSG_ATTR(_("W17: Arabic requires UTF-8, do ':set encoding=utf-8'"),
--			hl_attr(HLF_W));
-+		MSG_ATTR(_(w_arabic), hl_attr(HLF_W));
-+#ifdef FEAT_EVAL
-+		set_vim_var_string(VV_WARNINGMSG, (char_u *)_(w_arabic), -1);
-+#endif
- 	    }
- 
- # ifdef FEAT_MBYTE
-@@ -7714,7 +7823,7 @@
- 	newFoldLevel();
-     }
- 
--    /* 'foldminlevel' */
-+    /* 'foldminlines' */
-     else if (pp == &curwin->w_p_fml)
-     {
- 	foldUpdateAll(curwin);
-@@ -7974,6 +8083,11 @@
- 	else /* curwin->w_p_scr > curwin->w_height */
- 	    curwin->w_p_scr = curwin->w_height;
-     }
-+    if (p_hi < 0)
-+    {
-+	errmsg = e_positive;
-+	p_hi = 0;
-+    }
-     if (p_report < 0)
-     {
- 	errmsg = e_positive;
-@@ -8227,13 +8341,13 @@
- 	    {
- 		if (number == 0 && string != NULL)
- 		{
--		    int index;
-+		    int idx;
- 
- 		    /* Either we are given a string or we are setting option
- 		     * to zero. */
--		    for (index = 0; string[index] == '0'; ++index)
-+		    for (idx = 0; string[idx] == '0'; ++idx)
- 			;
--		    if (string[index] != NUL || index == 0)
-+		    if (string[idx] != NUL || idx == 0)
- 		    {
- 			/* There's another character after zeros or the string
- 			 * is empty.  In both cases, we are trying to set a
-@@ -8323,7 +8437,7 @@
-     {
- 	--arg;			    /* put arg at the '<' */
- 	modifiers = 0;
--	key = find_special_key(&arg, &modifiers, TRUE);
-+	key = find_special_key(&arg, &modifiers, TRUE, TRUE);
- 	if (modifiers)		    /* can't handle modifiers here */
- 	    key = 0;
-     }
-@@ -9271,10 +9385,9 @@
- /*
-  * Check for NULL pointers in a winopt_T and replace them with empty_option.
-  */
--/*ARGSUSED*/
-     void
- check_winopt(wop)
--    winopt_T	*wop;
-+    winopt_T	*wop UNUSED;
- {
- #ifdef FEAT_FOLDING
-     check_string_option(&wop->wo_fdi);
-@@ -9296,10 +9409,9 @@
- /*
-  * Free the allocated memory inside a winopt_T.
-  */
--/*ARGSUSED*/
-     void
- clear_winopt(wop)
--    winopt_T	*wop;
-+    winopt_T	*wop UNUSED;
- {
- #ifdef FEAT_FOLDING
-     clear_string_option(&wop->wo_fdi);
-@@ -9645,7 +9757,7 @@
- 	}
- 	--p;
-     }
--    if (STRNCMP(p, "no", 2) == 0)
-+    if (STRNCMP(p, "no", 2) == 0 && STRNCMP(p, "novice", 6) != 0)
-     {
- 	xp->xp_context = EXPAND_BOOL_SETTINGS;
- 	p += 2;
-@@ -9834,7 +9946,8 @@
- 	regmatch->rm_ic = ic;
- 	if (xp->xp_context != EXPAND_BOOL_SETTINGS)
- 	{
--	    for (match = 0; match < sizeof(names) / sizeof(char *); ++match)
-+	    for (match = 0; match < (int)(sizeof(names) / sizeof(char *));
-+								      ++match)
- 		if (vim_regexec(regmatch, (char_u *)names[match], (colnr_T)0))
- 		{
- 		    if (loop == 0)
-@@ -10093,25 +10206,110 @@
- 
- #ifdef FEAT_LANGMAP
- /*
-- * Any character has an equivalent character.  This is used for keyboards that
-- * have a special language mode that sends characters above 128 (although
-- * other characters can be translated too).
-+ * Any character has an equivalent 'langmap' character.  This is used for
-+ * keyboards that have a special language mode that sends characters above
-+ * 128 (although other characters can be translated too).  The "to" field is a
-+ * Vim command character.  This avoids having to switch the keyboard back to
-+ * ASCII mode when leaving Insert mode.
-+ *
-+ * langmap_mapchar[] maps any of 256 chars to an ASCII char used for Vim
-+ * commands.
-+ * When FEAT_MBYTE is defined langmap_mapga.ga_data is a sorted table of
-+ * langmap_entry_T.  This does the same as langmap_mapchar[] for characters >=
-+ * 256.
-  */
-+# ifdef FEAT_MBYTE
-+/*
-+ * With multi-byte support use growarray for 'langmap' chars >= 256
-+ */
-+typedef struct
-+{
-+    int	    from;
-+    int     to;
-+} langmap_entry_T;
-+
-+static garray_T langmap_mapga;
-+static void langmap_set_entry __ARGS((int from, int to));
- 
- /*
-- * char_u langmap_mapchar[256];
-- * Normally maps each of the 128 upper chars to an <128 ascii char; used to
-- * "translate" native lang chars in normal mode or some cases of
-- * insert mode without having to tediously switch lang mode back&forth.
-+ * Search for an entry in "langmap_mapga" for "from".  If found set the "to"
-+ * field.  If not found insert a new entry at the appropriate location.
-  */
-+    static void
-+langmap_set_entry(from, to)
-+    int    from;
-+    int    to;
-+{
-+    langmap_entry_T *entries = (langmap_entry_T *)(langmap_mapga.ga_data);
-+    int             a = 0;
-+    int             b = langmap_mapga.ga_len;
-+
-+    /* Do a binary search for an existing entry. */
-+    while (a != b)
-+    {
-+	int i = (a + b) / 2;
-+	int d = entries[i].from - from;
-+
-+	if (d == 0)
-+	{
-+	    entries[i].to = to;
-+	    return;
-+	}
-+	if (d < 0)
-+	    a = i + 1;
-+	else
-+	    b = i;
-+    }
-+
-+    if (ga_grow(&langmap_mapga, 1) != OK)
-+	return;  /* out of memory */
-+
-+    /* insert new entry at position "a" */
-+    entries = (langmap_entry_T *)(langmap_mapga.ga_data) + a;
-+    mch_memmove(entries + 1, entries,
-+			(langmap_mapga.ga_len - a) * sizeof(langmap_entry_T));
-+    ++langmap_mapga.ga_len;
-+    entries[0].from = from;
-+    entries[0].to = to;
-+}
-+
-+/*
-+ * Apply 'langmap' to multi-byte character "c" and return the result.
-+ */
-+    int
-+langmap_adjust_mb(c)
-+    int c;
-+{
-+    langmap_entry_T *entries = (langmap_entry_T *)(langmap_mapga.ga_data);
-+    int a = 0;
-+    int b = langmap_mapga.ga_len;
-+
-+    while (a != b)
-+    {
-+	int i = (a + b) / 2;
-+	int d = entries[i].from - c;
-+
-+	if (d == 0)
-+	    return entries[i].to;  /* found matching entry */
-+	if (d < 0)
-+	    a = i + 1;
-+	else
-+	    b = i;
-+    }
-+    return c;  /* no entry found, return "c" unmodified */
-+}
-+# endif
- 
-     static void
- langmap_init()
- {
-     int i;
- 
--    for (i = 0; i < 256; i++)		/* we init with a-one-to one map */
--	langmap_mapchar[i] = i;
-+    for (i = 0; i < 256; i++)
-+	langmap_mapchar[i] = i;	 /* we init with a one-to-one map */
-+# ifdef FEAT_MBYTE
-+    ga_init2(&langmap_mapga, sizeof(langmap_entry_T), 8);
-+# endif
- }
- 
- /*
-@@ -10125,7 +10323,10 @@
-     char_u  *p2;
-     int	    from, to;
- 
--    langmap_init();			    /* back to one-to-one map first */
-+#ifdef FEAT_MBYTE
-+    ga_clear(&langmap_mapga);		    /* clear the previous map first */
-+#endif
-+    langmap_init();			    /* back to one-to-one map */
- 
-     for (p = p_langmap; p[0] != NUL; )
-     {
-@@ -10175,7 +10376,13 @@
- 							     transchar(from));
- 		return;
- 	    }
--	    langmap_mapchar[from & 255] = to;
-+
-+#ifdef FEAT_MBYTE
-+	    if (from >= 256)
-+		langmap_set_entry(from, to);
-+	    else
-+#endif
-+		langmap_mapchar[from & 255] = to;
- 
- 	    /* Advance to next pair */
- 	    mb_ptr_adv(p);
-diff -Naur vim72.orig/src/os_unix.c vim72/src/os_unix.c
---- vim72.orig/src/os_unix.c	2008-08-06 04:01:40.000000000 -0700
-+++ vim72/src/os_unix.c	2009-07-19 15:18:55.000000000 -0700
-@@ -181,7 +181,8 @@
- 	&& defined(FEAT_TITLE) && !defined(FEAT_GUI_GTK)
- # define SET_SIG_ALARM
- static RETSIGTYPE sig_alarm __ARGS(SIGPROTOARG);
--static int sig_alarm_called;
-+/* volatile because it is used in signal handler sig_alarm(). */
-+static volatile int sig_alarm_called;
- #endif
- static RETSIGTYPE deathtrap __ARGS(SIGPROTOARG);
- 
-@@ -201,13 +202,16 @@
- # define SIG_ERR	((RETSIGTYPE (*)())-1)
- #endif
- 
--static int	do_resize = FALSE;
-+/* volatile because it is used in signal handler sig_winch(). */
-+static volatile int do_resize = FALSE;
- #ifndef __EMX__
- static char_u	*extra_shell_arg = NULL;
- static int	show_shell_mess = TRUE;
- #endif
--static int	deadly_signal = 0;	    /* The signal we caught */
--static int	in_mch_delay = FALSE;	    /* sleeping in mch_delay() */
-+/* volatile because it is used in signal handler deathtrap(). */
-+static volatile int deadly_signal = 0;	    /* The signal we caught */
-+/* volatile because it is used in signal handler deathtrap(). */
-+static volatile int in_mch_delay = FALSE;    /* sleeping in mch_delay() */
- 
- static int curr_tmode = TMODE_COOK;	/* contains current terminal mode */
- 
-@@ -315,12 +319,32 @@
-     {-1,	    "Unknown!", FALSE}
- };
- 
-+    int
-+mch_chdir(path)
-+    char *path;
-+{
-+    if (p_verbose >= 5)
-+    {
-+	verbose_enter();
-+	smsg((char_u *)"chdir(%s)", path);
-+	verbose_leave();
-+    }
-+# ifdef VMS
-+    return chdir(vms_fixfilename(path));
-+# else
-+    return chdir(path);
-+# endif
-+}
-+
-+/*
-+ * Write s[len] to the screen.
-+ */
-     void
- mch_write(s, len)
-     char_u	*s;
-     int		len;
- {
--    write(1, (char *)s, len);
-+    ignored = (int)write(1, (char *)s, len);
-     if (p_wd)		/* Unix is too fast, slow down a bit more */
- 	RealWaitForChar(read_cmd_fd, p_wd, NULL);
- }
-@@ -447,10 +471,9 @@
-  * Return total amount of memory available in Kbyte.
-  * Doesn't change when memory has been allocated.
-  */
--/* ARGSUSED */
-     long_u
- mch_total_mem(special)
--    int special;
-+    int special UNUSED;
- {
- # ifdef __EMX__
-     return ulimit(3, 0L) >> 10;   /* always 32MB? */
-@@ -799,12 +822,11 @@
- #endif
- 
- /*
-- * We need correct potatotypes for a signal function, otherwise mean compilers
-+ * We need correct prototypes for a signal function, otherwise mean compilers
-  * will barf when the second argument to signal() is ``wrong''.
-  * Let me try it with a few tricky defines from my own osdef.h	(jw).
-  */
- #if defined(SIGWINCH)
--/* ARGSUSED */
-     static RETSIGTYPE
- sig_winch SIGDEFARG(sigarg)
- {
-@@ -816,7 +838,6 @@
- #endif
- 
- #if defined(SIGINT)
--/* ARGSUSED */
-     static RETSIGTYPE
- catch_sigint SIGDEFARG(sigarg)
- {
-@@ -828,7 +849,6 @@
- #endif
- 
- #if defined(SIGPWR)
--/* ARGSUSED */
-     static RETSIGTYPE
- catch_sigpwr SIGDEFARG(sigarg)
- {
-@@ -848,7 +868,6 @@
- /*
-  * signal function for alarm().
-  */
--/* ARGSUSED */
-     static RETSIGTYPE
- sig_alarm SIGDEFARG(sigarg)
- {
-@@ -1065,19 +1084,23 @@
-     SIGRETURN;
- }
- 
--#ifdef _REENTRANT
-+#if defined(_REENTRANT) && defined(SIGCONT)
- /*
-  * On Solaris with multi-threading, suspending might not work immediately.
-  * Catch the SIGCONT signal, which will be used as an indication whether the
-  * suspending has been done or not.
-+ *
-+ * On Linux, signal is not always handled immediately either.
-+ * See https://bugs.launchpad.net/bugs/291373
-+ *
-+ * volatile because it is used in in signal handler sigcont_handler().
-  */
--static int sigcont_received;
-+static volatile int sigcont_received;
- static RETSIGTYPE sigcont_handler __ARGS(SIGPROTOARG);
- 
- /*
-  * signal handler for SIGCONT
-  */
--/* ARGSUSED */
-     static RETSIGTYPE
- sigcont_handler SIGDEFARG(sigarg)
- {
-@@ -1115,15 +1138,28 @@
-     }
- # endif
- 
--# ifdef _REENTRANT
-+# if defined(_REENTRANT) && defined(SIGCONT)
-     sigcont_received = FALSE;
- # endif
-     kill(0, SIGTSTP);	    /* send ourselves a STOP signal */
--# ifdef _REENTRANT
--    /* When we didn't suspend immediately in the kill(), do it now.  Happens
--     * on multi-threaded Solaris. */
--    if (!sigcont_received)
--	pause();
-+# if defined(_REENTRANT) && defined(SIGCONT)
-+    /*
-+     * Wait for the SIGCONT signal to be handled. It generally happens
-+     * immediately, but somehow not all the time. Do not call pause()
-+     * because there would be race condition which would hang Vim if
-+     * signal happened in between the test of sigcont_received and the
-+     * call to pause(). If signal is not yet received, call sleep(0)
-+     * to just yield CPU. Signal should then be received. If somehow
-+     * it's still not received, sleep 1, 2, 3 ms. Don't bother waiting
-+     * further if signal is not received after 1+2+3+4 ms (not expected
-+     * to happen).
-+     */
-+    {
-+	long wait_time;
-+	for (wait_time = 0; !sigcont_received && wait_time <= 3L; wait_time++)
-+	    /* Loop is not entered most of the time */
-+	    mch_delay(wait_time, FALSE);
-+    }
- # endif
- 
- # ifdef FEAT_TITLE
-@@ -1172,7 +1208,7 @@
- #ifdef SIGTSTP
-     signal(SIGTSTP, restricted ? SIG_IGN : SIG_DFL);
- #endif
--#ifdef _REENTRANT
-+#if defined(_REENTRANT) && defined(SIGCONT)
-     signal(SIGCONT, sigcont_handler);
- #endif
- 
-@@ -1231,7 +1267,7 @@
- reset_signals()
- {
-     catch_signals(SIG_DFL, SIG_DFL);
--#ifdef _REENTRANT
-+#if defined(_REENTRANT) && defined(SIGCONT)
-     /* SIGCONT isn't in the list, because its default action is ignore */
-     signal(SIGCONT, SIG_DFL);
- #endif
-@@ -1326,11 +1362,10 @@
- /*
-  * Check_win checks whether we have an interactive stdout.
-  */
--/* ARGSUSED */
-     int
- mch_check_win(argc, argv)
--    int	    argc;
--    char    **argv;
-+    int	    argc UNUSED;
-+    char    **argv UNUSED;
- {
- #ifdef OS2
-     /*
-@@ -1414,11 +1449,10 @@
- /*
-  * Another X Error handler, just used to check for errors.
-  */
--/* ARGSUSED */
-     static int
- x_error_check(dpy, error_event)
--    Display *dpy;
--    XErrorEvent	*error_event;
-+    Display *dpy UNUSED;
-+    XErrorEvent	*error_event UNUSED;
- {
-     got_x_error = TRUE;
-     return 0;
-@@ -1431,15 +1465,12 @@
-  */
- static int x_IOerror_check __ARGS((Display *dpy));
- 
--/* ARGSUSED */
-     static int
- x_IOerror_check(dpy)
--    Display *dpy;
-+    Display *dpy UNUSED;
- {
-     /* This function should not return, it causes exit().  Longjump instead. */
-     LONGJMP(lc_jump_env, 1);
--    /*NOTREACHED*/
--    return 0;
- }
- # endif
- 
-@@ -1448,10 +1479,9 @@
-  */
- static int x_IOerror_handler __ARGS((Display *dpy));
- 
--/* ARGSUSED */
-     static int
- x_IOerror_handler(dpy)
--    Display *dpy;
-+    Display *dpy UNUSED;
- {
-     xterm_dpy = NULL;
-     x11_window = 0;
-@@ -1460,8 +1490,6 @@
- 
-     /* This function should not return, it causes exit().  Longjump instead. */
-     LONGJMP(x_jump_env, 1);
--    /*NOTREACHED*/
--    return 0;
- }
- #endif
- 
-@@ -1897,10 +1925,9 @@
- 
- #else  /* FEAT_X11 */
- 
--/*ARGSUSED*/
-     static int
- get_x11_title(test_only)
--    int	    test_only;
-+    int	    test_only UNUSED;
- {
-     return FALSE;
- }
-@@ -2414,6 +2441,12 @@
- #ifdef HAVE_FCHDIR
- 	    if (fd >= 0)
- 	    {
-+		if (p_verbose >= 5)
-+		{
-+		    verbose_enter();
-+		    MSG("fchdir() to previous dir");
-+		    verbose_leave();
-+		}
- 		l = fchdir(fd);
- 		close(fd);
- 	    }
-@@ -2438,7 +2471,7 @@
-     }
- 
-     /* Catch file names which are too long. */
--    if (retval == FAIL || STRLEN(buf) + STRLEN(fname) >= len)
-+    if (retval == FAIL || (int)(STRLEN(buf) + STRLEN(fname)) >= len)
- 	return FAIL;
- 
-     /* Do not append ".", "/dir/." is equal to "/dir". */
-@@ -2475,11 +2508,10 @@
-  * file name to remain exactly the same.
-  * Only required for file systems where case is ignored and preserved.
-  */
--/*ARGSUSED*/
-     void
- fname_case(name, len)
-     char_u	*name;
--    int		len;	    /* buffer size, only used when name gets longer */
-+    int		len UNUSED;  /* buffer size, only used when name gets longer */
- {
-     struct stat st;
-     char_u	*slash, *tail;
-@@ -2657,7 +2689,7 @@
-  */
-     vim_acl_T
- mch_get_acl(fname)
--    char_u	*fname;
-+    char_u	*fname UNUSED;
- {
-     vim_acl_T	ret = NULL;
- #ifdef HAVE_POSIX_ACL
-@@ -2717,7 +2749,7 @@
-  */
-     void
- mch_set_acl(fname, aclent)
--    char_u	*fname;
-+    char_u	*fname UNUSED;
-     vim_acl_T	aclent;
- {
-     if (aclent == NULL)
-@@ -2760,10 +2792,9 @@
- /*
-  * Set hidden flag for "name".
-  */
--/* ARGSUSED */
-     void
- mch_hide(name)
--    char_u	*name;
-+    char_u	*name UNUSED;
- {
-     /* can't hide a file */
- }
-@@ -2905,7 +2936,7 @@
-      * Ignore any errors.
-      */
- #if defined(HAVE_SIGALTSTACK) || defined(HAVE_SIGSTACK)
--    signal_stack = malloc(SIGSTKSZ);
-+    signal_stack = (char *)alloc(SIGSTKSZ);
-     init_signal_stack();
- #endif
- }
-@@ -2936,7 +2967,8 @@
-     }
- #  endif
- # endif
--# ifdef FEAT_X11
-+    /* Don't close the display for GTK 1, it is done in exit(). */
-+# if defined(FEAT_X11) && (!defined(FEAT_GUI_GTK) || defined(HAVE_GTK2))
-     if (x11_display != NULL
- #  ifdef FEAT_XCLIPBOARD
- 	    && x11_display != xterm_dpy
-@@ -3451,10 +3483,9 @@
- /*
-  * set screen mode, always fails.
-  */
--/* ARGSUSED */
-     int
- mch_screenmode(arg)
--    char_u   *arg;
-+    char_u   *arg UNUSED;
- {
-     EMSG(_(e_screenmode));
-     return FAIL;
-@@ -3926,9 +3957,9 @@
- 		 */
- 		if (fd >= 0)
- 		{
--		    dup(fd); /* To replace stdin  (file descriptor 0) */
--		    dup(fd); /* To replace stdout (file descriptor 1) */
--		    dup(fd); /* To replace stderr (file descriptor 2) */
-+		    ignored = dup(fd); /* To replace stdin  (fd 0) */
-+		    ignored = dup(fd); /* To replace stdout (fd 1) */
-+		    ignored = dup(fd); /* To replace stderr (fd 2) */
- 
- 		    /* Don't need this now that we've duplicated it */
- 		    close(fd);
-@@ -3946,7 +3977,17 @@
- 		 * children can be kill()ed.  Don't do this when using pipes,
- 		 * because stdin is not a tty, we would lose /dev/tty. */
- 		if (p_stmp)
-+		{
- 		    (void)setsid();
-+#  if defined(SIGHUP)
-+		    /* When doing "!xterm&" and 'shell' is bash: the shell
-+		     * will exit and send SIGHUP to all processes in its
-+		     * group, killing the just started process.  Ignore SIGHUP
-+		     * to avoid that. (suggested by Simon Schubert)
-+		     */
-+		    signal(SIGHUP, SIG_IGN);
-+#  endif
-+		}
- # endif
- # ifdef FEAT_GUI
- 		if (pty_slave_fd >= 0)
-@@ -3996,13 +4037,13 @@
- 
- 		    /* set up stdin/stdout/stderr for the child */
- 		    close(0);
--		    dup(pty_slave_fd);
-+		    ignored = dup(pty_slave_fd);
- 		    close(1);
--		    dup(pty_slave_fd);
-+		    ignored = dup(pty_slave_fd);
- 		    if (gui.in_use)
- 		    {
- 			close(2);
--			dup(pty_slave_fd);
-+			ignored = dup(pty_slave_fd);
- 		    }
- 
- 		    close(pty_slave_fd);    /* has been dupped, close it now */
-@@ -4013,13 +4054,13 @@
- 		    /* set up stdin for the child */
- 		    close(fd_toshell[1]);
- 		    close(0);
--		    dup(fd_toshell[0]);
-+		    ignored = dup(fd_toshell[0]);
- 		    close(fd_toshell[0]);
- 
- 		    /* set up stdout for the child */
- 		    close(fd_fromshell[0]);
- 		    close(1);
--		    dup(fd_fromshell[1]);
-+		    ignored = dup(fd_fromshell[1]);
- 		    close(fd_fromshell[1]);
- 
- # ifdef FEAT_GUI
-@@ -4027,7 +4068,7 @@
- 		    {
- 			/* set up stderr for the child */
- 			close(2);
--			dup(1);
-+			ignored = dup(1);
- 		    }
- # endif
- 		}
-@@ -4078,6 +4119,9 @@
- 		int	    fromshell_fd;
- 		garray_T    ga;
- 		int	    noread_cnt;
-+# if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
-+		struct timeval  start_tv;
-+# endif
- 
- # ifdef FEAT_GUI
- 		if (pty_master_fd >= 0)
-@@ -4146,9 +4190,10 @@
- 			    {
- 				s = vim_strchr(lp + written, NL);
- 				len = write(toshell_fd, (char *)lp + written,
--					   s == NULL ? l : s - (lp + written));
-+					   s == NULL ? l
-+					      : (size_t)(s - (lp + written)));
- 			    }
--			    if (len == l)
-+			    if (len == (int)l)
- 			    {
- 				/* Finished a line, add a NL, unless this line
- 				 * should not have one. */
-@@ -4158,7 +4203,8 @@
- 					    && (lnum !=
- 						    curbuf->b_ml.ml_line_count
- 						    || curbuf->b_p_eol)))
--				    write(toshell_fd, "\n", (size_t)1);
-+				    ignored = write(toshell_fd, "\n",
-+								   (size_t)1);
- 				++lnum;
- 				if (lnum > curbuf->b_op_end.lnum)
- 				{
-@@ -4186,7 +4232,9 @@
- 		    ga_init2(&ga, 1, BUFLEN);
- 
- 		noread_cnt = 0;
--
-+# if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
-+		gettimeofday(&start_tv, NULL);
-+# endif
- 		for (;;)
- 		{
- 		    /*
-@@ -4199,25 +4247,34 @@
- 		     * that a typed password is echoed for ssh or gpg command.
- 		     * Don't get characters when the child has already
- 		     * finished (wait_pid == 0).
--		     * Don't get extra characters when we already have one.
- 		     * Don't read characters unless we didn't get output for a
--		     * while, avoids that ":r !ls" eats typeahead.
-+		     * while (noread_cnt > 4), avoids that ":r !ls" eats
-+		     * typeahead.
- 		     */
- 		    len = 0;
- 		    if (!(options & SHELL_EXPAND)
- 			    && ((options &
- 					 (SHELL_READ|SHELL_WRITE|SHELL_COOKED))
- 				      != (SHELL_READ|SHELL_WRITE|SHELL_COOKED)
--#ifdef FEAT_GUI
-+# ifdef FEAT_GUI
- 						    || gui.in_use
--#endif
-+# endif
- 						    )
- 			    && wait_pid == 0
--			    && (ta_len > 0
--				|| (noread_cnt > 4
--				    && (len = ui_inchar(ta_buf,
--						       BUFLEN, 10L, 0)) > 0)))
-+			    && (ta_len > 0 || noread_cnt > 4))
- 		    {
-+		      if (ta_len == 0)
-+		      {
-+			  /* Get extra characters when we don't have any.
-+			   * Reset the counter and timer. */
-+			  noread_cnt = 0;
-+# if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
-+			  gettimeofday(&start_tv, NULL);
-+# endif
-+			  len = ui_inchar(ta_buf, BUFLEN, 10L, 0);
-+		      }
-+		      if (ta_len > 0 || len > 0)
-+		      {
- 			/*
- 			 * For pipes:
- 			 * Check for CTRL-C: send interrupt signal to child.
-@@ -4271,7 +4328,8 @@
- 				ta_buf[i] = '\n';
- # ifdef FEAT_MBYTE
- 			    if (has_mbyte)
--				i += (*mb_ptr2len)(ta_buf + i) - 1;
-+				i += (*mb_ptr2len_len)(ta_buf + i,
-+							ta_len + len - i) - 1;
- # endif
- 			}
- 
-@@ -4319,9 +4377,9 @@
- 			    {
- 				ta_len -= len;
- 				mch_memmove(ta_buf, ta_buf + len, ta_len);
--				noread_cnt = 0;
- 			    }
- 			}
-+		      }
- 		    }
- 
- 		    if (got_int)
-@@ -4429,6 +4487,25 @@
- 			out_flush();
- 			if (got_int)
- 			    break;
-+
-+# if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
-+			{
-+			    struct timeval  now_tv;
-+			    long	    msec;
-+
-+			    /* Avoid that we keep looping here without
-+			     * checking for a CTRL-C for a long time.  Don't
-+			     * break out too often to avoid losing typeahead. */
-+			    gettimeofday(&now_tv, NULL);
-+			    msec = (now_tv.tv_sec - start_tv.tv_sec) * 1000L
-+				+ (now_tv.tv_usec - start_tv.tv_usec) / 1000L;
-+			    if (msec > 2000)
-+			    {
-+				noread_cnt = 5;
-+				break;
-+			    }
-+			}
-+# endif
- 		    }
- 
- 		    /* If we already detected the child has finished break the
-@@ -4672,7 +4749,6 @@
-  * Returns also, when a request from Sniff is waiting -- toni.
-  * Or when a Linux GPM mouse event is waiting.
-  */
--/* ARGSUSED */
- #if defined(__BEOS__)
-     int
- #else
-@@ -4681,7 +4757,7 @@
- RealWaitForChar(fd, msec, check_for_gpm)
-     int		fd;
-     long	msec;
--    int		*check_for_gpm;
-+    int		*check_for_gpm UNUSED;
- {
-     int		ret;
- #if defined(FEAT_XCLIPBOARD) || defined(USE_XSMP) || defined(FEAT_MZSCHEME)
-@@ -5076,7 +5152,6 @@
- 
- #define SHELL_SPECIAL (char_u *)"\t \"&'$;<>()\\|"
- 
--/* ARGSUSED */
-     int
- mch_expand_wildcards(num_pat, pat, num_file, file, flags)
-     int		   num_pat;
-@@ -5498,7 +5573,7 @@
-     i = fread((char *)buffer, 1, len, fd);
-     fclose(fd);
-     mch_remove(tempname);
--    if (i != len)
-+    if (i != (int)len)
-     {
- 	/* unexpected read error */
- 	EMSG2(_(e_notread), tempname);
-@@ -5559,7 +5634,7 @@
- 	if (shell_style == STYLE_PRINT && !did_find_nul)
- 	{
- 	    /* If there is a NUL, set did_find_nul, else set check_spaces */
--	    if (len && (int)STRLEN(buffer) < len - 1)
-+	    if (len && (int)STRLEN(buffer) < (int)len - 1)
- 		did_find_nul = TRUE;
- 	    else
- 		check_spaces = TRUE;
-@@ -5851,7 +5926,9 @@
- 	     * we are going to suspend or starting an external process
- 	     * so we shouldn't  have problem with this
- 	     */
-+# ifdef SIGTSTP
- 	    signal(SIGTSTP, restricted ? SIG_IGN : SIG_DFL);
-+# endif
- 	    return 1; /* succeed */
- 	}
- 	if (gpm_fd == -2)
-@@ -6001,7 +6078,6 @@
- /*
-  * Gets info from sysmouse and adds special keys to input buf.
-  */
--/* ARGSUSED */
-     static RETSIGTYPE
- sig_sysmouse SIGDEFARG(sigarg)
- {
-@@ -6565,11 +6641,10 @@
-  * This is our chance to ask the user if they want to save,
-  * or abort the logout
-  */
--/*ARGSUSED*/
-     static void
- xsmp_handle_interaction(smc_conn, client_data)
-     SmcConn	smc_conn;
--    SmPointer	client_data;
-+    SmPointer	client_data UNUSED;
- {
-     cmdmod_T	save_cmdmod;
-     int		cancel_shutdown = False;
-@@ -6602,16 +6677,15 @@
- /*
-  * Callback that starts save-yourself.
-  */
--/*ARGSUSED*/
-     static void
- xsmp_handle_save_yourself(smc_conn, client_data, save_type,
- 					       shutdown, interact_style, fast)
-     SmcConn	smc_conn;
--    SmPointer	client_data;
--    int		save_type;
-+    SmPointer	client_data UNUSED;
-+    int		save_type UNUSED;
-     Bool	shutdown;
--    int		interact_style;
--    Bool	fast;
-+    int		interact_style UNUSED;
-+    Bool	fast UNUSED;
- {
-     /* Handle already being in saveyourself */
-     if (xsmp.save_yourself)
-@@ -6645,11 +6719,10 @@
- /*
-  * Callback to warn us of imminent death.
-  */
--/*ARGSUSED*/
-     static void
- xsmp_die(smc_conn, client_data)
--    SmcConn	smc_conn;
--    SmPointer	client_data;
-+    SmcConn	smc_conn UNUSED;
-+    SmPointer	client_data UNUSED;
- {
-     xsmp_close();
- 
-@@ -6661,11 +6734,10 @@
- /*
-  * Callback to tell us that save-yourself has completed.
-  */
--/*ARGSUSED*/
-     static void
- xsmp_save_complete(smc_conn, client_data)
--    SmcConn	smc_conn;
--    SmPointer	client_data;
-+    SmcConn	smc_conn UNUSED;
-+    SmPointer	client_data UNUSED;
- {
-     xsmp.save_yourself = False;
- }
-@@ -6675,11 +6747,10 @@
-  * Callback to tell us that an instigated shutdown was cancelled
-  * (maybe even by us)
-  */
--/*ARGSUSED*/
-     static void
- xsmp_shutdown_cancelled(smc_conn, client_data)
-     SmcConn	smc_conn;
--    SmPointer	client_data;
-+    SmPointer	client_data UNUSED;
- {
-     if (xsmp.save_yourself)
- 	SmcSaveYourselfDone(smc_conn, True);
-@@ -6691,13 +6762,12 @@
- /*
-  * Callback to tell us that a new ICE connection has been established.
-  */
--/*ARGSUSED*/
-     static void
- xsmp_ice_connection(iceConn, clientData, opening, watchData)
-     IceConn	iceConn;
--    IcePointer	clientData;
-+    IcePointer	clientData UNUSED;
-     Bool	opening;
--    IcePointer	*watchData;
-+    IcePointer	*watchData UNUSED;
- {
-     /* Intercept creation of ICE connection fd */
-     if (opening)
-@@ -6814,7 +6884,8 @@
-     if (xsmp_icefd != -1)
-     {
- 	SmcCloseConnection(xsmp.smcconn, 0, NULL);
--	vim_free(xsmp.clientid);
-+	if (xsmp.clientid != NULL)
-+	    free(xsmp.clientid);
- 	xsmp.clientid = NULL;
- 	xsmp_icefd = -1;
-     }
-diff -Naur vim72.orig/src/os_unix.h vim72/src/os_unix.h
---- vim72.orig/src/os_unix.h	2008-06-17 11:01:17.000000000 -0700
-+++ vim72/src/os_unix.h	2009-07-19 15:18:55.000000000 -0700
-@@ -124,7 +124,7 @@
- #  define SIGDUMMYARG	0, 0, (struct sigcontext *)0
- # else
- #  define SIGPROTOARG	(int)
--#  define SIGDEFARG(s)	(s) int s;
-+#  define SIGDEFARG(s)	(s) int s UNUSED;
- #  define SIGDUMMYARG	0
- # endif
- #else
-@@ -482,11 +482,6 @@
- # else
- int mch_rename __ARGS((const char *src, const char *dest));
- # endif
--# ifdef VMS
--#  define mch_chdir(s) chdir(vms_fixfilename(s))
--# else
--#  define mch_chdir(s) chdir(s)
--# endif
- # ifndef VMS
- #  ifdef __MVS__
-   /* on OS390 Unix getenv() doesn't return a pointer to persistent
-diff -Naur vim72.orig/src/proto/buffer.pro vim72/src/proto/buffer.pro
---- vim72.orig/src/proto/buffer.pro	2008-08-09 07:31:21.000000000 -0700
-+++ vim72/src/proto/buffer.pro	2009-07-19 15:15:54.000000000 -0700
-@@ -37,13 +37,12 @@
- int otherfile __ARGS((char_u *ffname));
- void buf_setino __ARGS((buf_T *buf));
- void fileinfo __ARGS((int fullname, int shorthelp, int dont_truncate));
--void col_print __ARGS((char_u *buf, int col, int vcol));
-+void col_print __ARGS((char_u *buf, size_t buflen, int col, int vcol));
- void maketitle __ARGS((void));
- void resettitle __ARGS((void));
- void free_titles __ARGS((void));
- int build_stl_str_hl __ARGS((win_T *wp, char_u *out, size_t outlen, char_u *fmt, int use_sandbox, int fillchar, int maxwidth, struct stl_hlrec *hltab, struct stl_hlrec *tabtab));
--void get_rel_pos __ARGS((win_T *wp, char_u *str));
--int append_arg_number __ARGS((win_T *wp, char_u *buf, int add_file, int maxlen));
-+void get_rel_pos __ARGS((win_T *wp, char_u *buf, int buflen));
- char_u *fix_fname __ARGS((char_u *fname));
- void fname_expand __ARGS((buf_T *buf, char_u **ffname, char_u **sfname));
- char_u *alist_name __ARGS((aentry_T *aep));
-@@ -54,8 +53,8 @@
- void write_viminfo_bufferlist __ARGS((FILE *fp));
- char *buf_spname __ARGS((buf_T *buf));
- void buf_addsign __ARGS((buf_T *buf, int id, linenr_T lnum, int typenr));
--int buf_change_sign_type __ARGS((buf_T *buf, int markId, int typenr));
--int_u buf_getsigntype __ARGS((buf_T *buf, linenr_T lnum, int type));
-+linenr_T buf_change_sign_type __ARGS((buf_T *buf, int markId, int typenr));
-+int buf_getsigntype __ARGS((buf_T *buf, linenr_T lnum, int type));
- linenr_T buf_delsign __ARGS((buf_T *buf, int id));
- int buf_findsign __ARGS((buf_T *buf, int id));
- int buf_findsign_id __ARGS((buf_T *buf, linenr_T lnum));
-diff -Naur vim72.orig/src/proto/edit.pro vim72/src/proto/edit.pro
---- vim72.orig/src/proto/edit.pro	2008-08-09 07:31:24.000000000 -0700
-+++ vim72/src/proto/edit.pro	2009-07-19 15:15:54.000000000 -0700
-@@ -8,7 +8,7 @@
- void backspace_until_column __ARGS((int col));
- int vim_is_ctrl_x_key __ARGS((int c));
- int ins_compl_add_infercase __ARGS((char_u *str, int len, int icase, char_u *fname, int dir, int flags));
--void set_completion __ARGS((int startcol, list_T *list));
-+void set_completion __ARGS((colnr_T startcol, list_T *list));
- void ins_compl_show_pum __ARGS((void));
- char_u *find_word_start __ARGS((char_u *ptr));
- char_u *find_word_end __ARGS((char_u *ptr));
-diff -Naur vim72.orig/src/proto/eval.pro vim72/src/proto/eval.pro
---- vim72.orig/src/proto/eval.pro	2008-08-09 07:31:25.000000000 -0700
-+++ vim72/src/proto/eval.pro	2009-07-19 15:10:37.000000000 -0700
-@@ -17,7 +17,7 @@
- int eval_to_bool __ARGS((char_u *arg, int *error, char_u **nextcmd, int skip));
- char_u *eval_to_string_skip __ARGS((char_u *arg, char_u **nextcmd, int skip));
- int skip_expr __ARGS((char_u **pp));
--char_u *eval_to_string __ARGS((char_u *arg, char_u **nextcmd, int dolist));
-+char_u *eval_to_string __ARGS((char_u *arg, char_u **nextcmd, int convert));
- char_u *eval_to_string_safe __ARGS((char_u *arg, char_u **nextcmd, int use_sandbox));
- int eval_to_number __ARGS((char_u *expr));
- list_T *eval_spell_expr __ARGS((char_u *badword, char_u *expr));
-@@ -46,7 +46,9 @@
- void list_unref __ARGS((list_T *l));
- void list_free __ARGS((list_T *l, int recurse));
- dictitem_T *dict_lookup __ARGS((hashitem_T *hi));
-+char_u *list_find_str __ARGS((list_T *l, long idx));
- int list_append_dict __ARGS((list_T *list, dict_T *dict));
-+int list_append_string __ARGS((list_T *l, char_u *str, int len));
- int garbage_collect __ARGS((void));
- dict_T *dict_alloc __ARGS((void));
- int dict_add_nr_str __ARGS((dict_T *d, char *key, long nr, char_u *str));
-@@ -58,8 +60,10 @@
- void set_vim_var_nr __ARGS((int idx, long val));
- long get_vim_var_nr __ARGS((int idx));
- char_u *get_vim_var_str __ARGS((int idx));
--void set_vcount __ARGS((long count, long count1));
-+list_T *get_vim_var_list __ARGS((int idx));
-+void set_vcount __ARGS((long count, long count1, int set_prevcount));
- void set_vim_var_string __ARGS((int idx, char_u *val, int len));
-+void set_vim_var_list __ARGS((int idx, list_T *val));
- void set_reg_var __ARGS((int c));
- char_u *v_exception __ARGS((char_u *oldval));
- char_u *v_throwpoint __ARGS((char_u *oldval));
-@@ -94,6 +98,7 @@
- void write_viminfo_varlist __ARGS((FILE *fp));
- int store_session_globals __ARGS((FILE *fd));
- void last_set_msg __ARGS((scid_T scriptID));
-+void ex_oldfiles __ARGS((exarg_T *eap));
- int modify_fname __ARGS((char_u *src, int *usedlen, char_u **fnamep, char_u **bufp, int *fnamelen));
- char_u *do_string_sub __ARGS((char_u *str, char_u *pat, char_u *sub, char_u *flags));
- /* vim: set ft=c : */
-diff -Naur vim72.orig/src/proto/ex_cmds.pro vim72/src/proto/ex_cmds.pro
---- vim72.orig/src/proto/ex_cmds.pro	2008-08-09 07:31:25.000000000 -0700
-+++ vim72/src/proto/ex_cmds.pro	2009-07-19 15:16:00.000000000 -0700
-@@ -9,9 +9,9 @@
- void do_bang __ARGS((int addr_count, exarg_T *eap, int forceit, int do_in, int do_out));
- void do_shell __ARGS((char_u *cmd, int flags));
- char_u *make_filter_cmd __ARGS((char_u *cmd, char_u *itmp, char_u *otmp));
--void append_redir __ARGS((char_u *buf, char_u *opt, char_u *fname));
-+void append_redir __ARGS((char_u *buf, int buflen, char_u *opt, char_u *fname));
- int viminfo_error __ARGS((char *errnum, char *message, char_u *line));
--int read_viminfo __ARGS((char_u *file, int want_info, int want_marks, int forceit));
-+int read_viminfo __ARGS((char_u *file, int flags));
- void write_viminfo __ARGS((char_u *file, int forceit));
- int viminfo_readline __ARGS((vir_T *virp));
- char_u *viminfo_readstring __ARGS((vir_T *virp, int off, int convert));
-@@ -55,5 +55,8 @@
- char_u *sign_get_text __ARGS((int typenr));
- void *sign_get_image __ARGS((int typenr));
- char_u *sign_typenr2name __ARGS((int typenr));
-+void free_signs __ARGS((void));
-+char_u *get_sign_name __ARGS((expand_T *xp, int idx));
-+void set_context_in_sign_cmd __ARGS((expand_T *xp, char_u *arg));
- void ex_drop __ARGS((exarg_T *eap));
- /* vim: set ft=c : */
-diff -Naur vim72.orig/src/proto/ex_getln.pro vim72/src/proto/ex_getln.pro
---- vim72.orig/src/proto/ex_getln.pro	2008-08-09 07:31:28.000000000 -0700
-+++ vim72/src/proto/ex_getln.pro	2009-07-19 15:14:20.000000000 -0700
-@@ -4,6 +4,7 @@
- int text_locked __ARGS((void));
- void text_locked_msg __ARGS((void));
- int curbuf_locked __ARGS((void));
-+int allbuf_locked __ARGS((void));
- char_u *getexline __ARGS((int c, void *dummy, int indent));
- char_u *getexmodeline __ARGS((int promptc, void *dummy, int indent));
- int cmdline_overstrike __ARGS((void));
-@@ -31,7 +32,7 @@
- void set_cmd_context __ARGS((expand_T *xp, char_u *str, int len, int col));
- int expand_cmdline __ARGS((expand_T *xp, char_u *str, int col, int *matchcount, char_u ***matches));
- int ExpandGeneric __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file, char_u *((*func)(expand_T *, int))));
--char_u *globpath __ARGS((char_u *path, char_u *file));
-+char_u *globpath __ARGS((char_u *path, char_u *file, int expand_options));
- void init_history __ARGS((void));
- int get_histtype __ARGS((char_u *name));
- void add_to_history __ARGS((int histype, char_u *new_entry, int in_map, int sep));
-diff -Naur vim72.orig/src/proto/gui.pro vim72/src/proto/gui.pro
---- vim72.orig/src/proto/gui.pro	2008-08-09 07:31:56.000000000 -0700
-+++ vim72/src/proto/gui.pro	2009-07-19 15:17:39.000000000 -0700
-@@ -43,6 +43,7 @@
- void gui_create_scrollbar __ARGS((scrollbar_T *sb, int type, win_T *wp));
- scrollbar_T *gui_find_scrollbar __ARGS((long ident));
- void gui_drag_scrollbar __ARGS((scrollbar_T *sb, long value, int still_dragging));
-+void gui_may_update_scrollbars __ARGS((void));
- void gui_update_scrollbars __ARGS((int force));
- int gui_do_scroll __ARGS((void));
- int gui_do_horiz_scroll __ARGS((void));
-diff -Naur vim72.orig/src/proto/if_cscope.pro vim72/src/proto/if_cscope.pro
---- vim72.orig/src/proto/if_cscope.pro	2008-08-09 07:31:33.000000000 -0700
-+++ vim72/src/proto/if_cscope.pro	2009-07-19 15:15:24.000000000 -0700
-@@ -1,4 +1,6 @@
- /* if_cscope.c */
-+char_u *get_cscope_name __ARGS((expand_T *xp, int idx));
-+void set_context_in_cscope_cmd __ARGS((expand_T *xp, char_u *arg, cmdidx_T cmdidx));
- void do_cscope __ARGS((exarg_T *eap));
- void do_scscope __ARGS((exarg_T *eap));
- void do_cstag __ARGS((exarg_T *eap));
-diff -Naur vim72.orig/src/proto/mark.pro vim72/src/proto/mark.pro
---- vim72.orig/src/proto/mark.pro	2008-08-09 07:31:36.000000000 -0700
-+++ vim72/src/proto/mark.pro	2009-07-19 15:09:53.000000000 -0700
-@@ -26,5 +26,5 @@
- void write_viminfo_filemarks __ARGS((FILE *fp));
- int removable __ARGS((char_u *name));
- int write_viminfo_marks __ARGS((FILE *fp_out));
--void copy_viminfo_marks __ARGS((vir_T *virp, FILE *fp_out, int count, int eof));
-+void copy_viminfo_marks __ARGS((vir_T *virp, FILE *fp_out, int count, int eof, int flags));
- /* vim: set ft=c : */
-diff -Naur vim72.orig/src/proto/mbyte.pro vim72/src/proto/mbyte.pro
---- vim72.orig/src/proto/mbyte.pro	2008-08-09 07:31:41.000000000 -0700
-+++ vim72/src/proto/mbyte.pro	2009-07-19 15:17:30.000000000 -0700
-@@ -7,10 +7,12 @@
- int latin_char2len __ARGS((int c));
- int latin_char2bytes __ARGS((int c, char_u *buf));
- int latin_ptr2len __ARGS((char_u *p));
-+int latin_ptr2len_len __ARGS((char_u *p, int size));
- int utf_char2cells __ARGS((int c));
- int latin_ptr2cells __ARGS((char_u *p));
- int utf_ptr2cells __ARGS((char_u *p));
- int dbcs_ptr2cells __ARGS((char_u *p));
-+int latin_ptr2cells_len __ARGS((char_u *p, int size));
- int latin_char2cells __ARGS((int c));
- int latin_off2cells __ARGS((unsigned off, unsigned max_off));
- int dbcs_off2cells __ARGS((unsigned off, unsigned max_off));
-@@ -85,6 +87,7 @@
- int preedit_get_status __ARGS((void));
- int im_is_preediting __ARGS((void));
- int convert_setup __ARGS((vimconv_T *vcp, char_u *from, char_u *to));
-+int convert_setup_ext __ARGS((vimconv_T *vcp, char_u *from, int from_unicode_is_utf8, char_u *to, int to_unicode_is_utf8));
- int convert_input __ARGS((char_u *ptr, int len, int maxlen));
- int convert_input_safe __ARGS((char_u *ptr, int len, int maxlen, char_u **restp, int *restlenp));
- char_u *string_convert __ARGS((vimconv_T *vcp, char_u *ptr, int *lenp));
-diff -Naur vim72.orig/src/proto/message.pro vim72/src/proto/message.pro
---- vim72.orig/src/proto/message.pro	2008-08-09 07:31:39.000000000 -0700
-+++ vim72/src/proto/message.pro	2009-07-19 15:15:14.000000000 -0700
-@@ -54,6 +54,7 @@
- void msg_clr_cmdline __ARGS((void));
- int msg_end __ARGS((void));
- void msg_check __ARGS((void));
-+int redirecting __ARGS((void));
- void verbose_enter __ARGS((void));
- void verbose_leave __ARGS((void));
- void verbose_enter_scroll __ARGS((void));
-diff -Naur vim72.orig/src/proto/misc2.pro vim72/src/proto/misc2.pro
---- vim72.orig/src/proto/misc2.pro	2008-08-09 07:31:40.000000000 -0700
-+++ vim72/src/proto/misc2.pro	2009-07-19 15:11:46.000000000 -0700
-@@ -59,7 +59,7 @@
- int handle_x_keys __ARGS((int key));
- char_u *get_special_key_name __ARGS((int c, int modifiers));
- int trans_special __ARGS((char_u **srcp, char_u *dst, int keycode));
--int find_special_key __ARGS((char_u **srcp, int *modp, int keycode));
-+int find_special_key __ARGS((char_u **srcp, int *modp, int keycode, int keep_x_key));
- int extract_modifiers __ARGS((int key, int *modp));
- int find_special_key_in_table __ARGS((int c));
- int get_special_key_code __ARGS((char_u *name));
-diff -Naur vim72.orig/src/proto/netbeans.pro vim72/src/proto/netbeans.pro
---- vim72.orig/src/proto/netbeans.pro	2008-08-09 07:31:56.000000000 -0700
-+++ vim72/src/proto/netbeans.pro	2009-07-19 15:12:02.000000000 -0700
-@@ -11,7 +11,7 @@
- void netbeans_frame_moved __ARGS((int new_x, int new_y));
- void netbeans_file_activated __ARGS((buf_T *bufp));
- void netbeans_file_opened __ARGS((buf_T *bufp));
--void netbeans_file_closed __ARGS((buf_T *bufp));
-+void netbeans_file_killed __ARGS((buf_T *bufp));
- void netbeans_inserted __ARGS((buf_T *bufp, linenr_T linenr, colnr_T col, char_u *txt, int newlen));
- void netbeans_removed __ARGS((buf_T *bufp, linenr_T linenr, colnr_T col, long len));
- void netbeans_unmodified __ARGS((buf_T *bufp));
-diff -Naur vim72.orig/src/proto/option.pro vim72/src/proto/option.pro
---- vim72.orig/src/proto/option.pro	2008-08-09 07:31:43.000000000 -0700
-+++ vim72/src/proto/option.pro	2009-07-19 15:13:20.000000000 -0700
-@@ -44,6 +44,7 @@
- void set_context_in_set_cmd __ARGS((expand_T *xp, char_u *arg, int opt_flags));
- int ExpandSettings __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file));
- int ExpandOldSetting __ARGS((int *num_file, char_u ***file));
-+int langmap_adjust_mb __ARGS((int c));
- int has_format_option __ARGS((int x));
- int shortmess __ARGS((int x));
- void vimrc_found __ARGS((char_u *fname, char_u *envname));
-diff -Naur vim72.orig/src/proto/os_unix.pro vim72/src/proto/os_unix.pro
---- vim72.orig/src/proto/os_unix.pro	2008-08-09 07:31:44.000000000 -0700
-+++ vim72/src/proto/os_unix.pro	2009-07-19 15:18:55.000000000 -0700
-@@ -1,4 +1,5 @@
- /* os_unix.c */
-+int mch_chdir __ARGS((char *path));
- void mch_write __ARGS((char_u *s, int len));
- int mch_inchar __ARGS((char_u *buf, int maxlen, long wtime, int tb_change_cnt));
- int mch_char_avail __ARGS((void));
-diff -Naur vim72.orig/src/proto/spell.pro vim72/src/proto/spell.pro
---- vim72.orig/src/proto/spell.pro	2008-08-09 07:31:48.000000000 -0700
-+++ vim72/src/proto/spell.pro	2009-07-19 15:16:00.000000000 -0700
-@@ -22,5 +22,5 @@
- char_u *spell_to_word_end __ARGS((char_u *start, buf_T *buf));
- int spell_word_start __ARGS((int startcol));
- void spell_expand_check_cap __ARGS((colnr_T col));
--int expand_spelling __ARGS((linenr_T lnum, int col, char_u *pat, char_u ***matchp));
-+int expand_spelling __ARGS((linenr_T lnum, char_u *pat, char_u ***matchp));
- /* vim: set ft=c : */
-diff -Naur vim72.orig/src/proto/ui.pro vim72/src/proto/ui.pro
---- vim72.orig/src/proto/ui.pro	2008-08-09 07:31:52.000000000 -0700
-+++ vim72/src/proto/ui.pro	2009-07-19 15:18:26.000000000 -0700
-@@ -48,6 +48,7 @@
- void open_app_context __ARGS((void));
- void x11_setup_atoms __ARGS((Display *dpy));
- void clip_x11_request_selection __ARGS((Widget myShell, Display *dpy, VimClipboard *cbd));
-+void yank_cut_buffer0 __ARGS((Display *dpy, VimClipboard *cbd));
- void clip_x11_lose_selection __ARGS((Widget myShell, VimClipboard *cbd));
- int clip_x11_own_selection __ARGS((Widget myShell, VimClipboard *cbd));
- void clip_x11_set_selection __ARGS((VimClipboard *cbd));
-diff -Naur vim72.orig/src/proto/window.pro vim72/src/proto/window.pro
---- vim72.orig/src/proto/window.pro	2008-08-09 07:31:54.000000000 -0700
-+++ vim72/src/proto/window.pro	2009-07-19 15:18:10.000000000 -0700
-@@ -1,6 +1,7 @@
- /* window.c */
- void do_window __ARGS((int nchar, long Prenum, int xchar));
- int win_split __ARGS((int size, int flags));
-+int win_split_ins __ARGS((int size, int flags, win_T *newwin, int dir));
- int win_valid __ARGS((win_T *win));
- int win_count __ARGS((void));
- int make_windows __ARGS((int count, int vertical));
-@@ -10,9 +11,12 @@
- void win_close __ARGS((win_T *win, int free_buf));
- void win_close_othertab __ARGS((win_T *win, int free_buf, tabpage_T *tp));
- void win_free_all __ARGS((void));
-+win_T *winframe_remove __ARGS((win_T *win, int *dirp, tabpage_T *tp));
- void close_others __ARGS((int message, int forceit));
- void curwin_init __ARGS((void));
-+void win_init_empty __ARGS((win_T *wp));
- int win_alloc_first __ARGS((void));
-+void win_alloc_aucmd_win __ARGS((void));
- void win_init_size __ARGS((void));
- void free_tabpage __ARGS((tabpage_T *tp));
- int win_new_tabpage __ARGS((int after));
-@@ -30,6 +34,8 @@
- void win_enter __ARGS((win_T *wp, int undo_sync));
- win_T *buf_jump_open_win __ARGS((buf_T *buf));
- win_T *buf_jump_open_tab __ARGS((buf_T *buf));
-+void win_append __ARGS((win_T *after, win_T *wp));
-+void win_remove __ARGS((win_T *wp, tabpage_T *tp));
- int win_alloc_lines __ARGS((win_T *wp));
- void win_free_lsize __ARGS((win_T *wp));
- void shell_new_rows __ARGS((void));
-@@ -58,6 +64,8 @@
- int min_rows __ARGS((void));
- int only_one_window __ARGS((void));
- void check_lnums __ARGS((int do_curwin));
-+void make_snapshot __ARGS((int idx));
-+void restore_snapshot __ARGS((int idx, int close_curwin));
- int win_hasvertsplit __ARGS((void));
- int match_add __ARGS((win_T *wp, char_u *grp, char_u *pat, int prio, int id));
- int match_delete __ARGS((win_T *wp, int id, int perr));
-diff -Naur vim72.orig/src/pty.c vim72/src/pty.c
---- vim72.orig/src/pty.c	2008-06-21 11:52:58.000000000 -0700
-+++ vim72/src/pty.c	2009-07-19 15:08:34.000000000 -0700
-@@ -270,9 +270,10 @@
- }
- #endif
- 
--#if defined(HAVE_SVR4_PTYS) && !defined(PTY_DONE) && !defined(hpux)
-+#if defined(HAVE_SVR4_PTYS) && !defined(PTY_DONE) && !defined(hpux) && !defined(MACOS_X)
- 
--/* NOTE: Even though HPUX can have /dev/ptmx, the code below doesn't work! */
-+/* NOTE: Even though HPUX can have /dev/ptmx, the code below doesn't work!
-+ * Same for Mac OS X Leopard. */
- #define PTY_DONE
-     int
- OpenPTY(ttyn)
-diff -Naur vim72.orig/src/quickfix.c vim72/src/quickfix.c
---- vim72.orig/src/quickfix.c	2008-07-18 05:53:02.000000000 -0700
-+++ vim72/src/quickfix.c	2009-07-19 15:18:10.000000000 -0700
-@@ -1419,6 +1419,7 @@
-     int			opened_window = FALSE;
-     win_T		*win;
-     win_T		*altwin;
-+    int			flags;
- #endif
-     int			print_message = TRUE;
-     int			len;
-@@ -1530,7 +1531,6 @@
-     if (qf_ptr->qf_type == 1 && (!curwin->w_buffer->b_help || cmdmod.tab != 0))
-     {
- 	win_T	*wp;
--	int	n;
- 
- 	if (cmdmod.tab != 0)
- 	    wp = NULL;
-@@ -1546,13 +1546,16 @@
- 	     * Split off help window; put it at far top if no position
- 	     * specified, the current window is vertically split and narrow.
- 	     */
--	    n = WSP_HELP;
-+	    flags = WSP_HELP;
- # ifdef FEAT_VERTSPLIT
- 	    if (cmdmod.split == 0 && curwin->w_width != Columns
- 						      && curwin->w_width < 80)
--		n |= WSP_TOP;
-+		flags |= WSP_TOP;
- # endif
--	    if (win_split(0, n) == FAIL)
-+	    if (qi != &ql_info)
-+		flags |= WSP_NEWLOC;  /* don't copy the location list */
-+
-+	    if (win_split(0, flags) == FAIL)
- 		goto theend;
- 	    opened_window = TRUE;	/* close it when fail */
- 
-@@ -1562,7 +1565,6 @@
- 	    if (qi != &ql_info)	    /* not a quickfix list */
- 	    {
- 		/* The new window should use the supplied location list */
--		qf_free_all(curwin);
- 		curwin->w_llist = qi;
- 		qi->qf_refcount++;
- 	    }
-@@ -1609,10 +1611,11 @@
- 		{
- 		    goto_tabpage_win(tp, wp);
- 		    usable_win = 1;
--		    break;
-+		    goto win_found;
- 		}
- 	    }
- 	}
-+win_found:
- 
- 	/*
- 	 * If there is only one window and it is the quickfix window, create a
-@@ -1622,7 +1625,10 @@
- 	{
- 	    ll_ref = curwin->w_llist_ref;
- 
--	    if (win_split(0, WSP_ABOVE) == FAIL)
-+	    flags = WSP_ABOVE;
-+	    if (ll_ref != NULL)
-+		flags |= WSP_NEWLOC;
-+	    if (win_split(0, flags) == FAIL)
- 		goto failed;		/* not enough room for window */
- 	    opened_window = TRUE;	/* close it when fail */
- 	    p_swb = empty_option;	/* don't split again */
-@@ -1634,7 +1640,6 @@
- 	    {
- 		/* The new window should use the location list from the
- 		 * location list window */
--		qf_free_all(curwin);
- 		curwin->w_llist = ll_ref;
- 		ll_ref->qf_refcount++;
- 	    }
-@@ -2233,7 +2238,6 @@
-  * ":cclose": close the window showing the list of errors.
-  * ":lclose": close the window showing the location list
-  */
--/*ARGSUSED*/
-     void
- ex_cclose(eap)
-     exarg_T	*eap;
-@@ -2307,15 +2311,12 @@
- 	if (eap->cmdidx == CMD_copen || eap->cmdidx == CMD_cwindow)
- 	    /* Create the new window at the very bottom. */
- 	    win_goto(lastwin);
--	if (win_split(height, WSP_BELOW) == FAIL)
-+	if (win_split(height, WSP_BELOW | WSP_NEWLOC) == FAIL)
- 	    return;		/* not enough room for window */
- #ifdef FEAT_SCROLLBIND
- 	curwin->w_p_scb = FALSE;
- #endif
- 
--	/* Remove the location list for the quickfix window */
--	qf_free_all(curwin);
--
- 	if (eap->cmdidx == CMD_lopen || eap->cmdidx == CMD_lwindow)
- 	{
- 	    /*
-@@ -2339,7 +2340,13 @@
- 	    set_option_value((char_u *)"bt", 0L, (char_u *)"quickfix",
- 								   OPT_LOCAL);
- 	    set_option_value((char_u *)"bh", 0L, (char_u *)"wipe", OPT_LOCAL);
--	    set_option_value((char_u *)"diff", 0L, NULL, OPT_LOCAL);
-+#ifdef FEAT_DIFF
-+	    curwin->w_p_diff = FALSE;
-+#endif
-+#ifdef FEAT_FOLDING
-+	    set_option_value((char_u *)"fdm", 0L, (char_u *)"manual",
-+								   OPT_LOCAL);
-+#endif
- 	}
- 
- 	/* Only set the height when still in the same tab page and there is no
-@@ -2600,10 +2607,12 @@
-     curbuf->b_p_ma = FALSE;
- 
- #ifdef FEAT_AUTOCMD
-+    keep_filetype = TRUE;		/* don't detect 'filetype' */
-     apply_autocmds(EVENT_BUFREADPOST, (char_u *)"quickfix", NULL,
- 							       FALSE, curbuf);
-     apply_autocmds(EVENT_BUFWINENTER, (char_u *)"quickfix", NULL,
- 							       FALSE, curbuf);
-+    keep_filetype = FALSE;
- #endif
- 
-     /* make sure it will be redrawn */
-@@ -2759,7 +2768,7 @@
-     sprintf((char *)cmd, "%s%s%s", (char *)p_shq, (char *)eap->arg,
- 							       (char *)p_shq);
-     if (*p_sp != NUL)
--	append_redir(cmd, p_sp, fname);
-+	append_redir(cmd, len, p_sp, fname);
-     /*
-      * Output a newline if there's something else than the :make command that
-      * was typed (in which case the cursor is in column 0).
-@@ -3196,7 +3205,7 @@
- 			break;
- 		    col = regmatch.endpos[0].col
- 					    + (col == regmatch.endpos[0].col);
--		    if (col > STRLEN(ml_get_buf(buf, lnum, FALSE)))
-+		    if (col > (colnr_T)STRLEN(ml_get_buf(buf, lnum, FALSE)))
- 			break;
- 		}
- 		line_breakcheck();
-@@ -3397,14 +3406,15 @@
-     /* Init the options. */
-     buf_copy_options(newbuf, BCO_ENTER | BCO_NOHELP);
- 
--    /* set curwin/curbuf to buf and save a few things */
--    aucmd_prepbuf(&aco, newbuf);
-+    /* need to open the memfile before putting the buffer in a window */
-+    if (ml_open(newbuf) == OK)
-+    {
-+	/* set curwin/curbuf to buf and save a few things */
-+	aucmd_prepbuf(&aco, newbuf);
- 
--    /* Need to set the filename for autocommands. */
--    (void)setfname(curbuf, fname, NULL, FALSE);
-+	/* Need to set the filename for autocommands. */
-+	(void)setfname(curbuf, fname, NULL, FALSE);
- 
--    if (ml_open(curbuf) == OK)
--    {
- 	/* Create swap file now to avoid the ATTENTION message. */
- 	check_need_swap(TRUE);
- 
-@@ -3427,10 +3437,10 @@
- 		newbuf = curbuf;
- 	    }
- 	}
--    }
- 
--    /* restore curwin/curbuf and a few other things */
--    aucmd_restbuf(&aco);
-+	/* restore curwin/curbuf and a few other things */
-+	aucmd_restbuf(&aco);
-+    }
- 
-     if (!buf_valid(newbuf))
- 	return NULL;
-diff -Naur vim72.orig/src/regexp.c vim72/src/regexp.c
---- vim72.orig/src/regexp.c	2008-08-07 12:58:50.000000000 -0700
-+++ vim72/src/regexp.c	2009-07-19 15:16:14.000000000 -0700
-@@ -471,7 +471,7 @@
- 
-     if ((*pp)[1] == ':')
-     {
--	for (i = 0; i < sizeof(class_names) / sizeof(*class_names); ++i)
-+	for (i = 0; i < (int)(sizeof(class_names) / sizeof(*class_names)); ++i)
- 	    if (STRNCMP(*pp + 2, class_names[i], STRLEN(class_names[i])) == 0)
- 	    {
- 		*pp += STRLEN(class_names[i]) + 2;
-@@ -3362,12 +3362,11 @@
-  * Match a regexp against a string ("line" points to the string) or multiple
-  * lines ("line" is NULL, use reg_getline()).
-  */
--/*ARGSUSED*/
-     static long
- vim_regexec_both(line, col, tm)
-     char_u	*line;
-     colnr_T	col;		/* column to start looking for match */
--    proftime_T	*tm;		/* timeout limit or NULL */
-+    proftime_T	*tm UNUSED;	/* timeout limit or NULL */
- {
-     regprog_T	*prog;
-     char_u	*s;
-@@ -4532,7 +4531,7 @@
- 		cleanup_subexpr();
- 		if (!REG_MULTI)		/* Single-line regexp */
- 		{
--		    if (reg_endp[no] == NULL)
-+		    if (reg_startp[no] == NULL || reg_endp[no] == NULL)
- 		    {
- 			/* Backref was not set: Match an empty string. */
- 			len = 0;
-@@ -4548,7 +4547,7 @@
- 		}
- 		else				/* Multi-line regexp */
- 		{
--		    if (reg_endpos[no].lnum < 0)
-+		    if (reg_startpos[no].lnum < 0 || reg_endpos[no].lnum < 0)
- 		    {
- 			/* Backref was not set: Match an empty string. */
- 			len = 0;
-@@ -7279,13 +7278,11 @@
-     }
-     else
-     {
--	if (submatch_match->endp[no] == NULL)
-+	s = submatch_match->startp[no];
-+	if (s == NULL || submatch_match->endp[no] == NULL)
- 	    retval = NULL;
- 	else
--	{
--	    s = submatch_match->startp[no];
- 	    retval = vim_strnsave(s, (int)(submatch_match->endp[no] - s));
--	}
-     }
- 
-     return retval;
-diff -Naur vim72.orig/src/screen.c vim72/src/screen.c
---- vim72.orig/src/screen.c	2008-07-24 07:45:07.000000000 -0700
-+++ vim72/src/screen.c	2009-07-19 15:17:49.000000000 -0700
-@@ -270,11 +270,10 @@
-  * Note that when also inserting/deleting lines w_redraw_top and w_redraw_bot
-  * may become invalid and the whole window will have to be redrawn.
-  */
--/*ARGSUSED*/
-     void
- redrawWinline(lnum, invalid)
-     linenr_T	lnum;
--    int		invalid;	/* window line height is invalid now */
-+    int		invalid UNUSED;	/* window line height is invalid now */
- {
- #ifdef FEAT_FOLDING
-     int		i;
-@@ -2413,7 +2412,7 @@
- 			&& (lnume < bot->lnum
- 			    || (lnume == bot->lnum
- 				&& (bot->col - (*p_sel == 'e'))
--		>= STRLEN(ml_get_buf(wp->w_buffer, lnume, FALSE)))))))
-+		>= (colnr_T)STRLEN(ml_get_buf(wp->w_buffer, lnume, FALSE)))))))
- 	{
- 	    if (VIsual_mode == Ctrl_V)
- 	    {
-@@ -2439,9 +2438,17 @@
- 
- #ifdef FEAT_SYN_HL
-     /* Show 'cursorcolumn' in the fold line. */
--    if (wp->w_p_cuc && (int)wp->w_virtcol + txtcol < W_WIDTH(wp))
--	ScreenAttrs[off + wp->w_virtcol + txtcol] = hl_combine_attr(
--		 ScreenAttrs[off + wp->w_virtcol + txtcol], hl_attr(HLF_CUC));
-+    if (wp->w_p_cuc)
-+    {
-+	txtcol += wp->w_virtcol;
-+	if (wp->w_p_wrap)
-+	    txtcol -= wp->w_skipcol;
-+	else
-+	    txtcol -= wp->w_leftcol;
-+	if (txtcol >= 0 && txtcol < W_WIDTH(wp))
-+	    ScreenAttrs[off + txtcol] = hl_combine_attr(
-+				 ScreenAttrs[off + txtcol], hl_attr(HLF_CUC));
-+    }
- #endif
- 
-     SCREEN_LINE(row + W_WINROW(wp), W_WINCOL(wp), (int)W_WIDTH(wp),
-@@ -2541,14 +2548,13 @@
-  *
-  * Return the number of last row the line occupies.
-  */
--/* ARGSUSED */
-     static int
- win_line(wp, lnum, startrow, endrow, nochange)
-     win_T	*wp;
-     linenr_T	lnum;
-     int		startrow;
-     int		endrow;
--    int		nochange;		/* not updating for changed text */
-+    int		nochange UNUSED;	/* not updating for changed text */
- {
-     int		col;			/* visual column on screen */
-     unsigned	off;			/* offset in ScreenLines/ScreenAttrs */
-@@ -2588,6 +2594,7 @@
-     int		noinvcur = FALSE;	/* don't invert the cursor */
- #ifdef FEAT_VISUAL
-     pos_T	*top, *bot;
-+    int		lnum_in_visual_area = FALSE;
- #endif
-     pos_T	pos;
-     long	v;
-@@ -2784,9 +2791,10 @@
- 	    top = &VIsual;
- 	    bot = &curwin->w_cursor;
- 	}
-+	lnum_in_visual_area = (lnum >= top->lnum && lnum <= bot->lnum);
- 	if (VIsual_mode == Ctrl_V)	/* block mode */
- 	{
--	    if (lnum >= top->lnum && lnum <= bot->lnum)
-+	    if (lnum_in_visual_area)
- 	    {
- 		fromcol = wp->w_old_cursor_fcol;
- 		tocol = wp->w_old_cursor_lcol;
-@@ -2879,8 +2887,9 @@
- 	}
- 	else
- 	    tocol = MAXCOL;
--	if (fromcol == tocol)		/* do at least one character */
--	    tocol = fromcol + 1;	/* happens when past end of line */
-+	/* do at least one character; happens when past end of line */
-+	if (fromcol == tocol)
-+	    tocol = fromcol + 1;
- 	area_highlighting = TRUE;
- 	attr = hl_attr(HLF_I);
-     }
-@@ -3412,6 +3421,7 @@
- 			&& (*mb_ptr2cells)(ptr) > 1)
- #endif
- 		    || ((int)vcol_prev == fromcol_prev
-+			&& vcol_prev < vcol	/* not at margin */
- 			&& vcol < tocol))
- 		area_attr = attr;		/* start highlighting */
- 	    else if (area_attr != 0
-@@ -3544,7 +3554,8 @@
- 		/* Use line_attr when not in the Visual or 'incsearch' area
- 		 * (area_attr may be 0 when "noinvcur" is set). */
- 	    else if (line_attr != 0 && ((fromcol == -10 && tocol == MAXCOL)
--					|| (vcol < fromcol || vcol >= tocol)))
-+				|| vcol < fromcol || vcol_prev < fromcol_prev
-+				|| vcol >= tocol))
- 		char_attr = line_attr;
- #endif
- 	    else
-@@ -4106,6 +4117,7 @@
- # endif
- 				    (col < W_WIDTH(wp)))
- 				&& !(noinvcur
-+				    && lnum == wp->w_cursor.lnum
- 				    && (colnr_T)vcol == wp->w_virtcol)))
- 			&& lcs_eol_one >= 0)
- 		{
-@@ -4247,7 +4259,7 @@
- 	 * preedit_changed and commit.  Thus Vim can't set "im_is_active", use
- 	 * im_is_preediting() here. */
- 	if (xic != NULL
--		&& lnum == curwin->w_cursor.lnum
-+		&& lnum == wp->w_cursor.lnum
- 		&& (State & INSERT)
- 		&& !p_imdisable
- 		&& im_is_preediting()
-@@ -4256,7 +4268,7 @@
- 	    colnr_T tcol;
- 
- 	    if (preedit_end_col == MAXCOL)
--		getvcol(curwin, &(curwin->w_cursor), &tcol, NULL, NULL);
-+		getvcol(curwin, &(wp->w_cursor), &tcol, NULL, NULL);
- 	    else
- 		tcol = preedit_end_col;
- 	    if ((long)preedit_start_col <= vcol && vcol < (long)tcol)
-@@ -4353,7 +4365,13 @@
- 	    }
- #endif
- 	    if (lcs_eol == lcs_eol_one
--		    && ((area_attr != 0 && vcol == fromcol && c == NUL)
-+		    && ((area_attr != 0 && vcol == fromcol
-+#ifdef FEAT_VISUAL
-+			    && (VIsual_mode != Ctrl_V
-+				|| lnum == VIsual.lnum
-+				|| lnum == curwin->w_cursor.lnum)
-+#endif
-+			    && c == NUL)
- #ifdef FEAT_SEARCH_EXTRA
- 			/* highlight 'hlsearch' match at end of line */
- 			|| (prevcol_hl_flag == TRUE
-@@ -4447,7 +4465,8 @@
- 	if (c == NUL)
- 	{
- #ifdef FEAT_SYN_HL
--	    if (eol_hl_off > 0 && vcol - eol_hl_off == (long)wp->w_virtcol)
-+	    if (eol_hl_off > 0 && vcol - eol_hl_off == (long)wp->w_virtcol
-+		    && lnum == wp->w_cursor.lnum)
- 	    {
- 		/* highlight last char after line */
- 		--col;
-@@ -4549,7 +4568,8 @@
- 	 * highlight the cursor position itself. */
- 	if (wp->w_p_cuc && vcol == (long)wp->w_virtcol
- 		&& lnum != wp->w_cursor.lnum
--		&& draw_state == WL_LINE)
-+		&& draw_state == WL_LINE
-+		&& !lnum_in_visual_area)
- 	{
- 	    vcol_save_attr = char_attr;
- 	    char_attr = hl_combine_attr(char_attr, hl_attr(HLF_CUC));
-@@ -4652,7 +4672,7 @@
- 	    --n_skip;
- 
- 	/* Only advance the "vcol" when after the 'number' column. */
--	if (draw_state >= WL_SBR
-+	if (draw_state > WL_NR
- #ifdef FEAT_DIFF
- 		&& filler_todo <= 0
- #endif
-@@ -5119,8 +5139,8 @@
- #endif
- 
- #if defined(FEAT_GUI) || defined(UNIX)
--	    /* The bold trick makes a single row of pixels appear in the next
--	     * character.  When a bold character is removed, the next
-+	    /* The bold trick makes a single column of pixels appear in the
-+	     * next character.  When a bold character is removed, the next
- 	     * character should be redrawn too.  This happens for our own GUI
- 	     * and for some xterms. */
- 	    if (
-@@ -5723,6 +5743,13 @@
-     int		fillchar;
-     int		attr;
-     int		this_ru_col;
-+    static int  busy = FALSE;
-+
-+    /* It's possible to get here recursively when 'statusline' (indirectly)
-+     * invokes ":redrawstatus".  Simply ignore the call then. */
-+    if (busy)
-+	return;
-+    busy = TRUE;
- 
-     wp->w_redr_status = FALSE;
-     if (wp->w_status_height == 0)
-@@ -5861,6 +5888,7 @@
- 									attr);
-     }
- #endif
-+    busy = FALSE;
- }
- 
- #ifdef FEAT_STL_OPT
-@@ -6076,7 +6104,7 @@
- 				fillchar, maxwidth, hltab, tabtab);
-     len = (int)STRLEN(buf);
- 
--    while (width < maxwidth && len < sizeof(buf) - 1)
-+    while (width < maxwidth && len < (int)sizeof(buf) - 1)
-     {
- #ifdef FEAT_MBYTE
- 	len += (*mb_char2bytes)(fillchar, buf + len);
-@@ -6263,9 +6291,15 @@
-     int		pcc[MAX_MCO];
- # endif
- #endif
-+#if defined(FEAT_MBYTE) || defined(FEAT_GUI) || defined(UNIX)
-+    int		force_redraw_this;
-+    int		force_redraw_next = FALSE;
-+#endif
-+    int		need_redraw;
- 
-     if (ScreenLines == NULL || row >= screen_Rows)	/* safety check */
- 	return;
-+    off = LineOffset[row] + col;
- 
- #ifdef FEAT_MBYTE
-     /* When drawing over the right halve of a double-wide char clear out the
-@@ -6275,10 +6309,21 @@
- 	    && !gui.in_use
- # endif
- 	    && mb_fix_col(col, row) != col)
--	screen_puts_len((char_u *)" ", 1, row, col - 1, 0);
-+    {
-+	ScreenLines[off - 1] = ' ';
-+	ScreenAttrs[off - 1] = 0;
-+	if (enc_utf8)
-+	{
-+	    ScreenLinesUC[off - 1] = 0;
-+	    ScreenLinesC[0][off - 1] = 0;
-+	}
-+	/* redraw the previous cell, make it empty */
-+	screen_char(off - 1, row, col - 1);
-+	/* force the cell at "col" to be redrawn */
-+	force_redraw_next = TRUE;
-+    }
- #endif
- 
--    off = LineOffset[row] + col;
- #ifdef FEAT_MBYTE
-     max_off = LineOffset[row] + screen_Columns;
- #endif
-@@ -6342,7 +6387,12 @@
- 	}
- #endif
- 
--	if (ScreenLines[off] != c
-+#if defined(FEAT_MBYTE) || defined(FEAT_GUI) || defined(UNIX)
-+	force_redraw_this = force_redraw_next;
-+	force_redraw_next = FALSE;
-+#endif
-+
-+	need_redraw = ScreenLines[off] != c
- #ifdef FEAT_MBYTE
- 		|| (mbyte_cells == 2
- 		    && ScreenLines[off + 1] != (enc_dbcs ? ptr[1] : 0))
-@@ -6350,24 +6400,24 @@
- 		    && c == 0x8e
- 		    && ScreenLines2[off] != ptr[1])
- 		|| (enc_utf8
--		    && (ScreenLinesUC[off] != (u8char_T)u8c
-+		    && (ScreenLinesUC[off] != (u8char_T)(c >= 0x80 ? u8c : 0)
- 			|| screen_comp_differs(off, u8cc)))
- #endif
- 		|| ScreenAttrs[off] != attr
--		|| exmode_active
-+		|| exmode_active;
-+
-+	if (need_redraw
-+#if defined(FEAT_MBYTE) || defined(FEAT_GUI) || defined(UNIX)
-+		|| force_redraw_this
-+#endif
- 		)
- 	{
- #if defined(FEAT_GUI) || defined(UNIX)
- 	    /* The bold trick makes a single row of pixels appear in the next
- 	     * character.  When a bold character is removed, the next
- 	     * character should be redrawn too.  This happens for our own GUI
--	     * and for some xterms.
--	     * Force the redraw by setting the attribute to a different value
--	     * than "attr", the contents of ScreenLines[] may be needed by
--	     * mb_off2cells() further on.
--	     * Don't do this for the last drawn character, because the next
--	     * character may not be redrawn. */
--	    if (
-+	     * and for some xterms. */
-+	    if (need_redraw && ScreenLines[off] != ' ' && (
- # ifdef FEAT_GUI
- 		    gui.in_use
- # endif
-@@ -6377,23 +6427,14 @@
- # ifdef UNIX
- 		    term_is_xterm
- # endif
--	       )
-+		    ))
- 	    {
--		int		n;
-+		int	n = ScreenAttrs[off];
- 
--		n = ScreenAttrs[off];
--# ifdef FEAT_MBYTE
--		if (col + mbyte_cells < screen_Columns
--			&& (n > HL_ALL || (n & HL_BOLD))
--			&& (len < 0 ? ptr[mbyte_blen] != NUL
--					     : ptr + mbyte_blen < text + len))
--		    ScreenAttrs[off + mbyte_cells] = attr + 1;
--# else
--		if (col + 1 < screen_Columns
--			&& (n > HL_ALL || (n & HL_BOLD))
--			&& (len < 0 ? ptr[1] != NUL : ptr + 1 < text + len))
--		    ScreenLines[off + 1] = 0;
--# endif
-+		if (n > HL_ALL)
-+		    n = syn_attr2attr(n);
-+		if (n & HL_BOLD)
-+		    force_redraw_next = TRUE;
- 	    }
- #endif
- #ifdef FEAT_MBYTE
-@@ -6480,6 +6521,20 @@
- 	    ++ptr;
- 	}
-     }
-+
-+#if defined(FEAT_MBYTE) || defined(FEAT_GUI) || defined(UNIX)
-+    /* If we detected the next character needs to be redrawn, but the text
-+     * doesn't extend up to there, update the character here. */
-+    if (force_redraw_next && col < screen_Columns)
-+    {
-+# ifdef FEAT_MBYTE
-+	if (enc_dbcs != 0 && dbcs_off2cells(off, max_off) > 1)
-+	    screen_char_2(off, row, col);
-+	else
-+# endif
-+	    screen_char(off, row, col);
-+    }
-+#endif
- }
- 
- #ifdef FEAT_SEARCH_EXTRA
-@@ -7356,7 +7411,11 @@
- #endif
-     static int	    entered = FALSE;		/* avoid recursiveness */
-     static int	    done_outofmem_msg = FALSE;	/* did outofmem message */
-+#ifdef FEAT_AUTOCMD
-+    int		    retry_count = 0;
- 
-+retry:
-+#endif
-     /*
-      * Allocation of the screen buffers is done only when the size changes and
-      * when Rows and Columns have been set and we have started doing full
-@@ -7440,10 +7499,17 @@
- 	{
- 	    outofmem = TRUE;
- #ifdef FEAT_WINDOWS
--	    break;
-+	    goto give_up;
- #endif
- 	}
-     }
-+#ifdef FEAT_AUTOCMD
-+    if (aucmd_win != NULL && win_alloc_lines(aucmd_win) == FAIL)
-+	outofmem = TRUE;
-+#endif
-+#ifdef FEAT_WINDOWS
-+give_up:
-+#endif
- 
- #ifdef FEAT_MBYTE
-     for (i = 0; i < p_mco; ++i)
-@@ -7628,8 +7694,17 @@
-     --RedrawingDisabled;
- 
- #ifdef FEAT_AUTOCMD
--    if (starting == 0)
-+    /*
-+     * Do not apply autocommands more than 3 times to avoid an endless loop
-+     * in case applying autocommands always changes Rows or Columns.
-+     */
-+    if (starting == 0 && ++retry_count <= 3)
-+    {
- 	apply_autocmds(EVENT_VIMRESIZED, NULL, NULL, FALSE, curbuf);
-+	/* In rare cases, autocommands may have altered Rows or Columns,
-+	 * jump back to check if we need to allocate the screen again. */
-+	goto retry;
-+    }
- #endif
- }
- 
-@@ -8590,7 +8665,6 @@
-  *
-  * Return OK for success, FAIL if the lines are not deleted.
-  */
--/*ARGSUSED*/
-     int
- screen_del_lines(off, row, line_count, end, force, wp)
-     int		off;
-@@ -8598,7 +8672,7 @@
-     int		line_count;
-     int		end;
-     int		force;		/* even when line_count > p_ttyscroll */
--    win_T	*wp;		/* NULL or window to use width from */
-+    win_T	*wp UNUSED;	/* NULL or window to use width from */
- {
-     int		j;
-     int		i;
-@@ -9416,13 +9490,15 @@
-     win_T	*wp;
-     int		always;
- {
--    char_u	buffer[70];
-+#define RULER_BUF_LEN 70
-+    char_u	buffer[RULER_BUF_LEN];
-     int		row;
-     int		fillchar;
-     int		attr;
-     int		empty_line = FALSE;
-     colnr_T	virtcol;
-     int		i;
-+    size_t	len;
-     int		o;
- #ifdef FEAT_VERTSPLIT
-     int		this_ru_col;
-@@ -9537,11 +9613,12 @@
- 	 * Some sprintfs return the length, some return a pointer.
- 	 * To avoid portability problems we use strlen() here.
- 	 */
--	sprintf((char *)buffer, "%ld,",
-+	vim_snprintf((char *)buffer, RULER_BUF_LEN, "%ld,",
- 		(wp->w_buffer->b_ml.ml_flags & ML_EMPTY)
- 		    ? 0L
- 		    : (long)(wp->w_cursor.lnum));
--	col_print(buffer + STRLEN(buffer),
-+	len = STRLEN(buffer);
-+	col_print(buffer + len, RULER_BUF_LEN - len,
- 			empty_line ? 0 : (int)wp->w_cursor.col + 1,
- 			(int)virtcol + 1);
- 
-@@ -9551,7 +9628,7 @@
- 	 * screen up on some terminals).
- 	 */
- 	i = (int)STRLEN(buffer);
--	get_rel_pos(wp, buffer + i + 1);
-+	get_rel_pos(wp, buffer + i + 1, RULER_BUF_LEN - i - 1);
- 	o = i + vim_strsize(buffer + i + 1);
- #ifdef FEAT_WINDOWS
- 	if (wp->w_status_height == 0)	/* can't use last char of screen */
-@@ -9578,7 +9655,7 @@
- 		    buffer[i++] = fillchar;
- 		++o;
- 	    }
--	    get_rel_pos(wp, buffer + i);
-+	    get_rel_pos(wp, buffer + i, RULER_BUF_LEN - i);
- 	}
- 	/* Truncate at window boundary. */
- #ifdef FEAT_MBYTE
-diff -Naur vim72.orig/src/search.c vim72/src/search.c
---- vim72.orig/src/search.c	2008-07-13 11:18:27.000000000 -0700
-+++ vim72/src/search.c	2009-07-19 15:16:33.000000000 -0700
-@@ -345,6 +345,15 @@
- {
-     vim_free(spats[0].pat);
-     vim_free(spats[1].pat);
-+
-+# ifdef FEAT_RIGHTLEFT
-+    if (mr_pattern_alloced)
-+    {
-+        vim_free(mr_pattern);
-+        mr_pattern_alloced = FALSE;
-+        mr_pattern = NULL;
-+    }
-+# endif
- }
- #endif
- 
-@@ -513,7 +522,6 @@
-  * When FEAT_EVAL is defined, returns the index of the first matching
-  * subpattern plus one; one if there was none.
-  */
--/*ARGSUSED*/
-     int
- searchit(win, buf, pos, dir, pat, count, options, pat_use, stop_lnum, tm)
-     win_T	*win;		/* window to search in; can be NULL for a
-@@ -526,7 +534,7 @@
-     int		options;
-     int		pat_use;	/* which pattern to use when "pat" is empty */
-     linenr_T	stop_lnum;	/* stop after this line number when != 0 */
--    proftime_T	*tm;		/* timeout limit or NULL */
-+    proftime_T	*tm UNUSED;	/* timeout limit or NULL */
- {
-     int		found;
-     linenr_T	lnum;		/* no init to shut up Apollo cc */
-@@ -545,8 +553,6 @@
-     int		save_called_emsg = called_emsg;
- #ifdef FEAT_SEARCH_EXTRA
-     int		break_loop = FALSE;
--#else
--# define break_loop FALSE
- #endif
- 
-     if (search_regcomp(pat, RE_SEARCH, pat_use,
-@@ -931,7 +937,10 @@
- 	     * twice.
- 	     */
- 	    if (!p_ws || stop_lnum != 0 || got_int || called_emsg
--					       || break_loop || found || loop)
-+#ifdef FEAT_SEARCH_EXTRA
-+					       || break_loop
-+#endif
-+					       || found || loop)
- 		break;
- 
- 	    /*
-@@ -949,7 +958,11 @@
- 		give_warning((char_u *)_(dir == BACKWARD
- 					  ? top_bot_msg : bot_top_msg), TRUE);
- 	}
--	if (got_int || called_emsg || break_loop)
-+	if (got_int || called_emsg
-+#ifdef FEAT_SEARCH_EXTRA
-+		|| break_loop
-+#endif
-+		)
- 	    break;
-     }
-     while (--count > 0 && found);   /* stop after count matches or no match */
-@@ -2327,8 +2340,8 @@
- 		    for (col = pos.col; check_prevcol(linep, col, '\\', &col);)
- 			bslcnt++;
- 		}
--		/* Only accept a match when 'M' is in 'cpo' or when ecaping is
--		 * what we expect. */
-+		/* Only accept a match when 'M' is in 'cpo' or when escaping
-+		 * is what we expect. */
- 		if (cpo_bsl || (bslcnt & 1) == match_escaped)
- 		{
- 		    if (c == initc)
-@@ -4514,12 +4527,11 @@
-  * Find identifiers or defines in included files.
-  * if p_ic && (compl_cont_status & CONT_SOL) then ptr must be in lowercase.
-  */
--/*ARGSUSED*/
-     void
- find_pattern_in_path(ptr, dir, len, whole, skip_comments,
- 				    type, count, action, start_lnum, end_lnum)
-     char_u	*ptr;		/* pointer to search pattern */
--    int		dir;		/* direction of expansion */
-+    int		dir UNUSED;	/* direction of expansion */
-     int		len;		/* length of search pattern */
-     int		whole;		/* match whole words only */
-     int		skip_comments;	/* don't match inside comments */
-@@ -4663,7 +4675,7 @@
- 			    msg_putchar('\n');	    /* cursor below last one */
- 			    if (!got_int)	    /* don't display if 'q'
- 						       typed at "--more--"
--						       mesage */
-+						       message */
- 			    {
- 				msg_home_replace_hl(new_fname);
- 				MSG_PUTS(_(" (includes previously listed match)"));
-@@ -4975,7 +4987,7 @@
- 					    || IObuff[i-2] == '!'))))
- 				IObuff[i++] = ' ';
- 			}
--			/* copy as much as posible of the new word */
-+			/* copy as much as possible of the new word */
- 			if (p - aux >= IOSIZE - i)
- 			    p = aux + IOSIZE - i - 1;
- 			STRNCPY(IObuff + i, aux, p - aux);
-@@ -5010,7 +5022,7 @@
- 		    if (did_show)
- 			msg_putchar('\n');	/* cursor below last one */
- 		    if (!got_int)		/* don't display if 'q' typed
--						    at "--more--" mesage */
-+						    at "--more--" message */
- 			msg_home_replace_hl(curr_fname);
- 		    prev_fname = curr_fname;
- 		}
-@@ -5092,7 +5104,7 @@
- 		}
- 		if (action != ACTION_SHOW)
- 		{
--		    curwin->w_cursor.col = (colnr_T) (startp - line);
-+		    curwin->w_cursor.col = (colnr_T)(startp - line);
- 		    curwin->w_set_curswant = TRUE;
- 		}
- 
-@@ -5119,7 +5131,8 @@
- 		    && action == ACTION_EXPAND
- 		    && !(compl_cont_status & CONT_SOL)
- #endif
--		    && *(p = startp + 1))
-+		    && *startp != NUL
-+		    && *(p = startp + 1) != NUL)
- 		goto search_line;
- 	}
- 	line_breakcheck();
-diff -Naur vim72.orig/src/spell.c vim72/src/spell.c
---- vim72.orig/src/spell.c	2008-07-12 12:20:55.000000000 -0700
-+++ vim72/src/spell.c	2009-07-19 15:16:33.000000000 -0700
-@@ -77,7 +77,7 @@
- 
- /*
-  * Do the opposite: based on a maximum end score and a known sound score,
-- * compute the the maximum word score that can be used.
-+ * compute the maximum word score that can be used.
-  */
- #define MAXSCORE(word_score, sound_score) ((4 * word_score - sound_score) / 3)
- 
-@@ -469,6 +469,7 @@
-     garray_T	sl_comppat;	/* CHECKCOMPOUNDPATTERN items */
-     regprog_T	*sl_compprog;	/* COMPOUNDRULE turned into a regexp progrm
- 				 * (NULL when no compounding) */
-+    char_u	*sl_comprules;	/* all COMPOUNDRULE concatenated (or NULL) */
-     char_u	*sl_compstartflags; /* flags for first compound word */
-     char_u	*sl_compallflags; /* all flags for compound words */
-     char_u	sl_nobreak;	/* When TRUE: no spaces between words */
-@@ -625,7 +626,7 @@
- /* TRUE if a word appears in the list of banned words.  */
- #define WAS_BANNED(su, word) (!HASHITEM_EMPTY(hash_find(&su->su_banned, word)))
- 
--/* Number of suggestions kept when cleaning up.  we need to keep more than
-+/* Number of suggestions kept when cleaning up.  We need to keep more than
-  * what is displayed, because when rescore_suggestions() is called the score
-  * may change and wrong suggestions may be removed later. */
- #define SUG_CLEAN_COUNT(su)    ((su)->su_maxcount < 130 ? 150 : (su)->su_maxcount + 20)
-@@ -839,7 +840,10 @@
- static void slang_clear __ARGS((slang_T *lp));
- static void slang_clear_sug __ARGS((slang_T *lp));
- static void find_word __ARGS((matchinf_T *mip, int mode));
-+static int match_checkcompoundpattern __ARGS((char_u *ptr, int wlen, garray_T *gap));
- static int can_compound __ARGS((slang_T *slang, char_u *word, char_u *flags));
-+static int can_be_compound __ARGS((trystate_T *sp, slang_T *slang, char_u *compflags, int flag));
-+static int match_compoundrule __ARGS((slang_T *slang, char_u *compflags));
- static int valid_word_prefix __ARGS((int totprefcnt, int arridx, int flags, char_u *word, slang_T *slang, int cond_req));
- static void find_prefix __ARGS((matchinf_T *mip, int mode));
- static int fold_more __ARGS((matchinf_T *mip));
-@@ -946,8 +950,8 @@
-  */
- #ifndef FEAT_MBYTE
- /* Non-multi-byte implementation. */
--# define SPELL_TOFOLD(c) ((c) < 256 ? spelltab.st_fold[c] : (c))
--# define SPELL_TOUPPER(c) ((c) < 256 ? spelltab.st_upper[c] : (c))
-+# define SPELL_TOFOLD(c) ((c) < 256 ? (int)spelltab.st_fold[c] : (c))
-+# define SPELL_TOUPPER(c) ((c) < 256 ? (int)spelltab.st_upper[c] : (c))
- # define SPELL_ISUPPER(c) ((c) < 256 ? spelltab.st_isu[c] : FALSE)
- #else
- # if defined(HAVE_WCHAR_H)
-@@ -958,18 +962,18 @@
-  * the "w" library function for characters above 255 if available. */
- # ifdef HAVE_TOWLOWER
- #  define SPELL_TOFOLD(c) (enc_utf8 && (c) >= 128 ? utf_fold(c) \
--	    : (c) < 256 ? spelltab.st_fold[c] : towlower(c))
-+	    : (c) < 256 ? (int)spelltab.st_fold[c] : (int)towlower(c))
- # else
- #  define SPELL_TOFOLD(c) (enc_utf8 && (c) >= 128 ? utf_fold(c) \
--	    : (c) < 256 ? spelltab.st_fold[c] : (c))
-+	    : (c) < 256 ? (int)spelltab.st_fold[c] : (c))
- # endif
- 
- # ifdef HAVE_TOWUPPER
- #  define SPELL_TOUPPER(c) (enc_utf8 && (c) >= 128 ? utf_toupper(c) \
--	    : (c) < 256 ? spelltab.st_upper[c] : towupper(c))
-+	    : (c) < 256 ? (int)spelltab.st_upper[c] : (int)towupper(c))
- # else
- #  define SPELL_TOUPPER(c) (enc_utf8 && (c) >= 128 ? utf_toupper(c) \
--	    : (c) < 256 ? spelltab.st_upper[c] : (c))
-+	    : (c) < 256 ? (int)spelltab.st_upper[c] : (c))
- # endif
- 
- # ifdef HAVE_ISWUPPER
-@@ -1519,6 +1523,11 @@
- 					    ((unsigned)flags >> 24)))
- 		    continue;
- 
-+		/* If there is a match with a CHECKCOMPOUNDPATTERN rule
-+		 * discard the compound word. */
-+		if (match_checkcompoundpattern(ptr, wlen, &slang->sl_comppat))
-+		    continue;
-+
- 		if (mode == FIND_COMPOUND)
- 		{
- 		    int	    capflags;
-@@ -1577,6 +1586,11 @@
- 		    if (!can_compound(slang, fword, mip->mi_compflags))
- 			continue;
- 		}
-+		else if (slang->sl_comprules != NULL
-+			     && !match_compoundrule(slang, mip->mi_compflags))
-+		    /* The compound flags collected so far do not match any
-+		     * COMPOUNDRULE, discard the compounded word. */
-+		    continue;
- 	    }
- 
- 	    /* Check NEEDCOMPOUND: can't use word without compounding. */
-@@ -1727,6 +1741,39 @@
- }
- 
- /*
-+ * Return TRUE if there is a match between the word ptr[wlen] and
-+ * CHECKCOMPOUNDPATTERN rules, assuming that we will concatenate with another
-+ * word.
-+ * A match means that the first part of CHECKCOMPOUNDPATTERN matches at the
-+ * end of ptr[wlen] and the second part matches after it.
-+ */
-+    static int
-+match_checkcompoundpattern(ptr, wlen, gap)
-+    char_u	*ptr;
-+    int		wlen;
-+    garray_T	*gap;  /* &sl_comppat */
-+{
-+    int		i;
-+    char_u	*p;
-+    int		len;
-+
-+    for (i = 0; i + 1 < gap->ga_len; i += 2)
-+    {
-+	p = ((char_u **)gap->ga_data)[i + 1];
-+	if (STRNCMP(ptr + wlen, p, STRLEN(p)) == 0)
-+	{
-+	    /* Second part matches at start of following compound word, now
-+	     * check if first part matches at end of previous word. */
-+	    p = ((char_u **)gap->ga_data)[i];
-+	    len = (int)STRLEN(p);
-+	    if (len <= wlen && STRNCMP(ptr + wlen - len, p, len) == 0)
-+		return TRUE;
-+	}
-+    }
-+    return FALSE;
-+}
-+
-+/*
-  * Return TRUE if "flags" is a valid sequence of compound flags and "word"
-  * does not have too many syllables.
-  */
-@@ -1773,6 +1820,98 @@
- }
- 
- /*
-+ * Return TRUE when the sequence of flags in "compflags" plus "flag" can
-+ * possibly form a valid compounded word.  This also checks the COMPOUNDRULE
-+ * lines if they don't contain wildcards.
-+ */
-+    static int
-+can_be_compound(sp, slang, compflags, flag)
-+    trystate_T	*sp;
-+    slang_T	*slang;
-+    char_u	*compflags;
-+    int		flag;
-+{
-+    /* If the flag doesn't appear in sl_compstartflags or sl_compallflags
-+     * then it can't possibly compound. */
-+    if (!byte_in_str(sp->ts_complen == sp->ts_compsplit
-+		? slang->sl_compstartflags : slang->sl_compallflags, flag))
-+	return FALSE;
-+
-+    /* If there are no wildcards, we can check if the flags collected so far
-+     * possibly can form a match with COMPOUNDRULE patterns.  This only
-+     * makes sense when we have two or more words. */
-+    if (slang->sl_comprules != NULL && sp->ts_complen > sp->ts_compsplit)
-+    {
-+	int v;
-+
-+	compflags[sp->ts_complen] = flag;
-+	compflags[sp->ts_complen + 1] = NUL;
-+	v = match_compoundrule(slang, compflags + sp->ts_compsplit);
-+	compflags[sp->ts_complen] = NUL;
-+	return v;
-+    }
-+
-+    return TRUE;
-+}
-+
-+
-+/*
-+ * Return TRUE if the compound flags in compflags[] match the start of any
-+ * compound rule.  This is used to stop trying a compound if the flags
-+ * collected so far can't possibly match any compound rule.
-+ * Caller must check that slang->sl_comprules is not NULL.
-+ */
-+    static int
-+match_compoundrule(slang, compflags)
-+    slang_T	*slang;
-+    char_u	*compflags;
-+{
-+    char_u	*p;
-+    int		i;
-+    int		c;
-+
-+    /* loop over all the COMPOUNDRULE entries */
-+    for (p = slang->sl_comprules; *p != NUL; ++p)
-+    {
-+	/* loop over the flags in the compound word we have made, match
-+	 * them against the current rule entry */
-+	for (i = 0; ; ++i)
-+	{
-+	    c = compflags[i];
-+	    if (c == NUL)
-+		/* found a rule that matches for the flags we have so far */
-+		return TRUE;
-+	    if (*p == '/' || *p == NUL)
-+		break;  /* end of rule, it's too short */
-+	    if (*p == '[')
-+	    {
-+		int match = FALSE;
-+
-+		/* compare against all the flags in [] */
-+		++p;
-+		while (*p != ']' && *p != NUL)
-+		    if (*p++ == c)
-+			match = TRUE;
-+		if (!match)
-+		    break;  /* none matches */
-+	    }
-+	    else if (*p != c)
-+		break;  /* flag of word doesn't match flag in pattern */
-+	    ++p;
-+	}
-+
-+	/* Skip to the next "/", where the next pattern starts. */
-+	p = vim_strchr(p, '/');
-+	if (p == NULL)
-+	    break;
-+    }
-+
-+    /* Checked all the rules and none of them match the flags, so there
-+     * can't possibly be a compound starting with these flags. */
-+    return FALSE;
-+}
-+
-+/*
-  * Return non-zero if the prefix indicated by "arridx" matches with the prefix
-  * ID in "flags" for the word "word".
-  * The WF_RAREPFX flag is included in the return value for a rare prefix.
-@@ -2237,7 +2376,7 @@
- 
- 	    /* If we are back at the starting line and there is no match then
- 	     * give up. */
--	    if (lnum == wp->w_cursor.lnum && !found_one)
-+	    if (lnum == wp->w_cursor.lnum && (!found_one || wrapped))
- 		break;
- 
- 	    /* Skip the characters at the start of the next line that were
-@@ -2513,9 +2652,11 @@
-     lp->sl_midword = NULL;
- 
-     vim_free(lp->sl_compprog);
-+    vim_free(lp->sl_comprules);
-     vim_free(lp->sl_compstartflags);
-     vim_free(lp->sl_compallflags);
-     lp->sl_compprog = NULL;
-+    lp->sl_comprules = NULL;
-     lp->sl_compstartflags = NULL;
-     lp->sl_compallflags = NULL;
- 
-@@ -3460,6 +3601,7 @@
-     char_u	*pp;
-     char_u	*cp;
-     char_u	*ap;
-+    char_u	*crp;
-     int		cnt;
-     garray_T	*gap;
- 
-@@ -3545,6 +3687,12 @@
-     slang->sl_compallflags = ap;
-     *ap = NUL;
- 
-+    /* And a list of all patterns in their original form, for checking whether
-+     * compounding may work in match_compoundrule().  This is freed when we
-+     * encounter a wildcard, the check doesn't work then. */
-+    crp = alloc(todo + 1);
-+    slang->sl_comprules = crp;
-+
-     pp = pat;
-     *pp++ = '^';
-     *pp++ = '\\';
-@@ -3587,6 +3735,20 @@
- 		    atstart = 0;
- 	    }
- 	}
-+
-+	/* Copy flag to "sl_comprules", unless we run into a wildcard. */
-+	if (crp != NULL)
-+	{
-+	    if (c == '+' || c == '*')
-+	    {
-+		vim_free(slang->sl_comprules);
-+		slang->sl_comprules = NULL;
-+		crp = NULL;
-+	    }
-+	    else
-+		*crp++ = c;
-+	}
-+
- 	if (c == '/')	    /* slash separates two items */
- 	{
- 	    *pp++ = '\\';
-@@ -3611,6 +3773,9 @@
-     *pp++ = '$';
-     *pp = NUL;
- 
-+    if (crp != NULL)
-+	*crp = NUL;
-+
-     slang->sl_compprog = vim_regcomp(pat, RE_MAGIC + RE_STRING + RE_STRICT);
-     vim_free(pat);
-     if (slang->sl_compprog == NULL)
-@@ -4791,13 +4956,16 @@
-  * Structure that is used to store the items in the word tree.  This avoids
-  * the need to keep track of each allocated thing, everything is freed all at
-  * once after ":mkspell" is done.
-+ * Note: "sb_next" must be just before "sb_data" to make sure the alignment of
-+ * "sb_data" is correct for systems where pointers must be aligned on
-+ * pointer-size boundaries and sizeof(pointer) > sizeof(int) (e.g., Sparc).
-  */
- #define  SBLOCKSIZE 16000	/* size of sb_data */
- typedef struct sblock_S sblock_T;
- struct sblock_S
- {
--    sblock_T	*sb_next;	/* next block in list */
-     int		sb_used;	/* nr of bytes already in use */
-+    sblock_T	*sb_next;	/* next block in list */
-     char_u	sb_data[1];	/* data, actually longer */
- };
- 
-@@ -4915,6 +5083,7 @@
- } spellinfo_T;
- 
- static afffile_T *spell_read_aff __ARGS((spellinfo_T *spin, char_u *fname));
-+static int is_aff_rule __ARGS((char_u **items, int itemcnt, char *rulename, int	 mincount));
- static void aff_process_flags __ARGS((afffile_T *affile, affentry_T *entry));
- static int spell_info_item __ARGS((char_u *s));
- static unsigned affitem2flag __ARGS((int flagtype, char_u *item, char_u	*fname, int lnum));
-@@ -4950,7 +5119,7 @@
- static void put_sugtime __ARGS((spellinfo_T *spin, FILE *fd));
- static int write_vim_spell __ARGS((spellinfo_T *spin, char_u *fname));
- static void clear_node __ARGS((wordnode_T *node));
--static int put_node __ARGS((FILE *fd, wordnode_T *node, int index, int regionmask, int prefixtree));
-+static int put_node __ARGS((FILE *fd, wordnode_T *node, int idx, int regionmask, int prefixtree));
- static void spell_make_sugfile __ARGS((spellinfo_T *spin, char_u *wfname));
- static int sug_filltree __ARGS((spellinfo_T *spin, slang_T *slang));
- static int sug_maketable __ARGS((spellinfo_T *spin));
-@@ -5223,8 +5392,7 @@
- 	/* Handle non-empty lines. */
- 	if (itemcnt > 0)
- 	{
--	    if (STRCMP(items[0], "SET") == 0 && itemcnt == 2
--						       && aff->af_enc == NULL)
-+	    if (is_aff_rule(items, itemcnt, "SET", 2) && aff->af_enc == NULL)
- 	    {
- #ifdef FEAT_MBYTE
- 		/* Setup for conversion from "ENC" to 'encoding'. */
-@@ -5239,7 +5407,7 @@
- 		    smsg((char_u *)_("Conversion in %s not supported"), fname);
- #endif
- 	    }
--	    else if (STRCMP(items[0], "FLAG") == 0 && itemcnt == 2
-+	    else if (is_aff_rule(items, itemcnt, "FLAG", 2)
- 					      && aff->af_flagtype == AFT_CHAR)
- 	    {
- 		if (STRCMP(items[1], "long") == 0)
-@@ -5284,69 +5452,71 @@
- 			spin->si_info = p;
- 		    }
- 	    }
--	    else if (STRCMP(items[0], "MIDWORD") == 0 && itemcnt == 2
-+	    else if (is_aff_rule(items, itemcnt, "MIDWORD", 2)
- 							   && midword == NULL)
- 	    {
- 		midword = getroom_save(spin, items[1]);
- 	    }
--	    else if (STRCMP(items[0], "TRY") == 0 && itemcnt == 2)
-+	    else if (is_aff_rule(items, itemcnt, "TRY", 2))
- 	    {
- 		/* ignored, we look in the tree for what chars may appear */
- 	    }
- 	    /* TODO: remove "RAR" later */
--	    else if ((STRCMP(items[0], "RAR") == 0
--			|| STRCMP(items[0], "RARE") == 0) && itemcnt == 2
--						       && aff->af_rare == 0)
-+	    else if ((is_aff_rule(items, itemcnt, "RAR", 2)
-+			|| is_aff_rule(items, itemcnt, "RARE", 2))
-+							 && aff->af_rare == 0)
- 	    {
- 		aff->af_rare = affitem2flag(aff->af_flagtype, items[1],
- 								 fname, lnum);
- 	    }
- 	    /* TODO: remove "KEP" later */
--	    else if ((STRCMP(items[0], "KEP") == 0
--		    || STRCMP(items[0], "KEEPCASE") == 0) && itemcnt == 2
-+	    else if ((is_aff_rule(items, itemcnt, "KEP", 2)
-+			|| is_aff_rule(items, itemcnt, "KEEPCASE", 2))
- 						     && aff->af_keepcase == 0)
- 	    {
- 		aff->af_keepcase = affitem2flag(aff->af_flagtype, items[1],
- 								 fname, lnum);
- 	    }
--	    else if (STRCMP(items[0], "BAD") == 0 && itemcnt == 2
--						       && aff->af_bad == 0)
-+	    else if ((is_aff_rule(items, itemcnt, "BAD", 2)
-+			|| is_aff_rule(items, itemcnt, "FORBIDDENWORD", 2))
-+							  && aff->af_bad == 0)
- 	    {
- 		aff->af_bad = affitem2flag(aff->af_flagtype, items[1],
- 								 fname, lnum);
- 	    }
--	    else if (STRCMP(items[0], "NEEDAFFIX") == 0 && itemcnt == 2
-+	    else if (is_aff_rule(items, itemcnt, "NEEDAFFIX", 2)
- 						    && aff->af_needaffix == 0)
- 	    {
- 		aff->af_needaffix = affitem2flag(aff->af_flagtype, items[1],
- 								 fname, lnum);
- 	    }
--	    else if (STRCMP(items[0], "CIRCUMFIX") == 0 && itemcnt == 2
-+	    else if (is_aff_rule(items, itemcnt, "CIRCUMFIX", 2)
- 						    && aff->af_circumfix == 0)
- 	    {
- 		aff->af_circumfix = affitem2flag(aff->af_flagtype, items[1],
- 								 fname, lnum);
- 	    }
--	    else if (STRCMP(items[0], "NOSUGGEST") == 0 && itemcnt == 2
-+	    else if (is_aff_rule(items, itemcnt, "NOSUGGEST", 2)
- 						    && aff->af_nosuggest == 0)
- 	    {
- 		aff->af_nosuggest = affitem2flag(aff->af_flagtype, items[1],
- 								 fname, lnum);
- 	    }
--	    else if (STRCMP(items[0], "NEEDCOMPOUND") == 0 && itemcnt == 2
-+	    else if ((is_aff_rule(items, itemcnt, "NEEDCOMPOUND", 2)
-+			|| is_aff_rule(items, itemcnt, "ONLYINCOMPOUND", 2))
- 						     && aff->af_needcomp == 0)
- 	    {
- 		aff->af_needcomp = affitem2flag(aff->af_flagtype, items[1],
- 								 fname, lnum);
- 	    }
--	    else if (STRCMP(items[0], "COMPOUNDROOT") == 0 && itemcnt == 2
-+	    else if (is_aff_rule(items, itemcnt, "COMPOUNDROOT", 2)
- 						     && aff->af_comproot == 0)
- 	    {
- 		aff->af_comproot = affitem2flag(aff->af_flagtype, items[1],
- 								 fname, lnum);
- 	    }
--	    else if (STRCMP(items[0], "COMPOUNDFORBIDFLAG") == 0
--				   && itemcnt == 2 && aff->af_compforbid == 0)
-+	    else if (is_aff_rule(items, itemcnt, "COMPOUNDFORBIDFLAG", 2)
-+						   && aff->af_compforbid == 0)
- 	    {
- 		aff->af_compforbid = affitem2flag(aff->af_flagtype, items[1],
- 								 fname, lnum);
-@@ -5354,8 +5524,8 @@
- 		    smsg((char_u *)_("Defining COMPOUNDFORBIDFLAG after PFX item may give wrong results in %s line %d"),
- 			    fname, lnum);
- 	    }
--	    else if (STRCMP(items[0], "COMPOUNDPERMITFLAG") == 0
--				   && itemcnt == 2 && aff->af_comppermit == 0)
-+	    else if (is_aff_rule(items, itemcnt, "COMPOUNDPERMITFLAG", 2)
-+						   && aff->af_comppermit == 0)
- 	    {
- 		aff->af_comppermit = affitem2flag(aff->af_flagtype, items[1],
- 								 fname, lnum);
-@@ -5363,7 +5533,7 @@
- 		    smsg((char_u *)_("Defining COMPOUNDPERMITFLAG after PFX item may give wrong results in %s line %d"),
- 			    fname, lnum);
- 	    }
--	    else if (STRCMP(items[0], "COMPOUNDFLAG") == 0 && itemcnt == 2
-+	    else if (is_aff_rule(items, itemcnt, "COMPOUNDFLAG", 2)
- 							 && compflags == NULL)
- 	    {
- 		/* Turn flag "c" into COMPOUNDRULE compatible string "c+",
-@@ -5376,7 +5546,15 @@
- 		    compflags = p;
- 		}
- 	    }
--	    else if (STRCMP(items[0], "COMPOUNDRULE") == 0 && itemcnt == 2)
-+	    else if (is_aff_rule(items, itemcnt, "COMPOUNDRULES", 2))
-+	    {
-+		/* We don't use the count, but do check that it's a number and
-+		 * not COMPOUNDRULE mistyped. */
-+		if (atoi((char *)items[1]) == 0)
-+		    smsg((char_u *)_("Wrong COMPOUNDRULES value in %s line %d: %s"),
-+						       fname, lnum, items[1]);
-+	    }
-+	    else if (is_aff_rule(items, itemcnt, "COMPOUNDRULE", 2))
- 	    {
- 		/* Concatenate this string to previously defined ones, using a
- 		 * slash to separate them. */
-@@ -5395,7 +5573,7 @@
- 		    compflags = p;
- 		}
- 	    }
--	    else if (STRCMP(items[0], "COMPOUNDWORDMAX") == 0 && itemcnt == 2
-+	    else if (is_aff_rule(items, itemcnt, "COMPOUNDWORDMAX", 2)
- 							      && compmax == 0)
- 	    {
- 		compmax = atoi((char *)items[1]);
-@@ -5403,7 +5581,7 @@
- 		    smsg((char_u *)_("Wrong COMPOUNDWORDMAX value in %s line %d: %s"),
- 						       fname, lnum, items[1]);
- 	    }
--	    else if (STRCMP(items[0], "COMPOUNDMIN") == 0 && itemcnt == 2
-+	    else if (is_aff_rule(items, itemcnt, "COMPOUNDMIN", 2)
- 							   && compminlen == 0)
- 	    {
- 		compminlen = atoi((char *)items[1]);
-@@ -5411,7 +5589,7 @@
- 		    smsg((char_u *)_("Wrong COMPOUNDMIN value in %s line %d: %s"),
- 						       fname, lnum, items[1]);
- 	    }
--	    else if (STRCMP(items[0], "COMPOUNDSYLMAX") == 0 && itemcnt == 2
-+	    else if (is_aff_rule(items, itemcnt, "COMPOUNDSYLMAX", 2)
- 							   && compsylmax == 0)
- 	    {
- 		compsylmax = atoi((char *)items[1]);
-@@ -5419,32 +5597,29 @@
- 		    smsg((char_u *)_("Wrong COMPOUNDSYLMAX value in %s line %d: %s"),
- 						       fname, lnum, items[1]);
- 	    }
--	    else if (STRCMP(items[0], "CHECKCOMPOUNDDUP") == 0 && itemcnt == 1)
-+	    else if (is_aff_rule(items, itemcnt, "CHECKCOMPOUNDDUP", 1))
- 	    {
- 		compoptions |= COMP_CHECKDUP;
- 	    }
--	    else if (STRCMP(items[0], "CHECKCOMPOUNDREP") == 0 && itemcnt == 1)
-+	    else if (is_aff_rule(items, itemcnt, "CHECKCOMPOUNDREP", 1))
- 	    {
- 		compoptions |= COMP_CHECKREP;
- 	    }
--	    else if (STRCMP(items[0], "CHECKCOMPOUNDCASE") == 0 && itemcnt == 1)
-+	    else if (is_aff_rule(items, itemcnt, "CHECKCOMPOUNDCASE", 1))
- 	    {
- 		compoptions |= COMP_CHECKCASE;
- 	    }
--	    else if (STRCMP(items[0], "CHECKCOMPOUNDTRIPLE") == 0
--							      && itemcnt == 1)
-+	    else if (is_aff_rule(items, itemcnt, "CHECKCOMPOUNDTRIPLE", 1))
- 	    {
- 		compoptions |= COMP_CHECKTRIPLE;
- 	    }
--	    else if (STRCMP(items[0], "CHECKCOMPOUNDPATTERN") == 0
--							      && itemcnt == 2)
-+	    else if (is_aff_rule(items, itemcnt, "CHECKCOMPOUNDPATTERN", 2))
- 	    {
- 		if (atoi((char *)items[1]) == 0)
- 		    smsg((char_u *)_("Wrong CHECKCOMPOUNDPATTERN value in %s line %d: %s"),
- 						       fname, lnum, items[1]);
- 	    }
--	    else if (STRCMP(items[0], "CHECKCOMPOUNDPATTERN") == 0
--							      && itemcnt == 3)
-+	    else if (is_aff_rule(items, itemcnt, "CHECKCOMPOUNDPATTERN", 3))
- 	    {
- 		garray_T    *gap = &spin->si_comppat;
- 		int	    i;
-@@ -5463,24 +5638,24 @@
- 					       = getroom_save(spin, items[2]);
- 		}
- 	    }
--	    else if (STRCMP(items[0], "SYLLABLE") == 0 && itemcnt == 2
-+	    else if (is_aff_rule(items, itemcnt, "SYLLABLE", 2)
- 							  && syllable == NULL)
- 	    {
- 		syllable = getroom_save(spin, items[1]);
- 	    }
--	    else if (STRCMP(items[0], "NOBREAK") == 0 && itemcnt == 1)
-+	    else if (is_aff_rule(items, itemcnt, "NOBREAK", 1))
- 	    {
- 		spin->si_nobreak = TRUE;
- 	    }
--	    else if (STRCMP(items[0], "NOSPLITSUGS") == 0 && itemcnt == 1)
-+	    else if (is_aff_rule(items, itemcnt, "NOSPLITSUGS", 1))
- 	    {
- 		spin->si_nosplitsugs = TRUE;
- 	    }
--	    else if (STRCMP(items[0], "NOSUGFILE") == 0 && itemcnt == 1)
-+	    else if (is_aff_rule(items, itemcnt, "NOSUGFILE", 1))
- 	    {
- 		spin->si_nosugfile = TRUE;
- 	    }
--	    else if (STRCMP(items[0], "PFXPOSTPONE") == 0 && itemcnt == 1)
-+	    else if (is_aff_rule(items, itemcnt, "PFXPOSTPONE", 1))
- 	    {
- 		aff->af_pfxpostpone = TRUE;
- 	    }
-@@ -5771,24 +5946,20 @@
- 		    }
- 		}
- 	    }
--	    else if (STRCMP(items[0], "FOL") == 0 && itemcnt == 2
--							       && fol == NULL)
-+	    else if (is_aff_rule(items, itemcnt, "FOL", 2) && fol == NULL)
- 	    {
- 		fol = vim_strsave(items[1]);
- 	    }
--	    else if (STRCMP(items[0], "LOW") == 0 && itemcnt == 2
--							       && low == NULL)
-+	    else if (is_aff_rule(items, itemcnt, "LOW", 2) && low == NULL)
- 	    {
- 		low = vim_strsave(items[1]);
- 	    }
--	    else if (STRCMP(items[0], "UPP") == 0 && itemcnt == 2
--							       && upp == NULL)
-+	    else if (is_aff_rule(items, itemcnt, "UPP", 2) && upp == NULL)
- 	    {
- 		upp = vim_strsave(items[1]);
- 	    }
--	    else if ((STRCMP(items[0], "REP") == 0
--			|| STRCMP(items[0], "REPSAL") == 0)
--		    && itemcnt == 2)
-+	    else if (is_aff_rule(items, itemcnt, "REP", 2)
-+		     || is_aff_rule(items, itemcnt, "REPSAL", 2))
- 	    {
- 		/* Ignore REP/REPSAL count */;
- 		if (!isdigit(*items[1]))
-@@ -5819,7 +5990,7 @@
- 					 : &spin->si_rep, items[1], items[2]);
- 		}
- 	    }
--	    else if (STRCMP(items[0], "MAP") == 0 && itemcnt == 2)
-+	    else if (is_aff_rule(items, itemcnt, "MAP", 2))
- 	    {
- 		/* MAP item or count */
- 		if (!found_map)
-@@ -5856,9 +6027,8 @@
- 		    ga_append(&spin->si_map, '/');
- 		}
- 	    }
--	    /* Accept "SAL from to" and "SAL from to # comment". */
--	    else if (STRCMP(items[0], "SAL") == 0
--		    && (itemcnt == 3 || (itemcnt > 3 && items[3][0] == '#')))
-+	    /* Accept "SAL from to" and "SAL from to  #comment". */
-+	    else if (is_aff_rule(items, itemcnt, "SAL", 3))
- 	    {
- 		if (do_sal)
- 		{
-@@ -5877,12 +6047,12 @@
- 								: items[2]);
- 		}
- 	    }
--	    else if (STRCMP(items[0], "SOFOFROM") == 0 && itemcnt == 2
-+	    else if (is_aff_rule(items, itemcnt, "SOFOFROM", 2)
- 							  && sofofrom == NULL)
- 	    {
- 		sofofrom = getroom_save(spin, items[1]);
- 	    }
--	    else if (STRCMP(items[0], "SOFOTO") == 0 && itemcnt == 2
-+	    else if (is_aff_rule(items, itemcnt, "SOFOTO", 2)
- 							    && sofoto == NULL)
- 	    {
- 		sofoto = getroom_save(spin, items[1]);
-@@ -5980,7 +6150,7 @@
- 	else if (spin->si_newprefID == 0 || spin->si_newprefID == 127)
- 	    MSG(_("Too many compound flags"));
- 	else
--	    MSG(_("Too many posponed prefixes and/or compound flags"));
-+	    MSG(_("Too many postponed prefixes and/or compound flags"));
-     }
- 
-     if (syllable != NULL)
-@@ -6017,6 +6187,22 @@
- }
- 
- /*
-+ * Return TRUE when items[0] equals "rulename", there are "mincount" items or
-+ * a comment is following after item "mincount".
-+ */
-+    static int
-+is_aff_rule(items, itemcnt, rulename, mincount)
-+    char_u	**items;
-+    int		itemcnt;
-+    char	*rulename;
-+    int		mincount;
-+{
-+    return (STRCMP(items[0], rulename) == 0
-+	    && (itemcnt == mincount
-+		|| (itemcnt > mincount && items[mincount][0] == '#')));
-+}
-+
-+/*
-  * For affix "entry" move COMPOUNDFORBIDFLAG and COMPOUNDPERMITFLAG from
-  * ae_flags to ae_comppermit and ae_compforbid.
-  */
-@@ -7866,7 +8052,7 @@
-     /* time_t can be up to 8 bytes in size, more than long_u, thus we
-      * can't use put_bytes() here. */
-     for (i = 7; i >= 0; --i)
--	if (i + 1 > sizeof(time_t))
-+	if (i + 1 > (int)sizeof(time_t))
- 	    /* ">>" doesn't work well when shifting more bits than avail */
- 	    putc(0, fd);
- 	else
-@@ -7926,6 +8112,8 @@
-     char_u	*p;
-     int		rr;
-     int		retval = OK;
-+    size_t	fwv = 1;  /* collect return value of fwrite() to avoid
-+			     warnings from picky compiler */
- 
-     fd = mch_fopen((char *)fname, "w");
-     if (fd == NULL)
-@@ -7936,11 +8124,11 @@
- 
-     /* <HEADER>: <fileID> <versionnr> */
- 							    /* <fileID> */
--    if (fwrite(VIMSPELLMAGIC, VIMSPELLMAGICL, (size_t)1, fd) != 1)
--    {
--	EMSG(_(e_write));
--	retval = FAIL;
--    }
-+    fwv &= fwrite(VIMSPELLMAGIC, VIMSPELLMAGICL, (size_t)1, fd);
-+    if (fwv != (size_t)1)
-+	/* Catch first write error, don't try writing more. */
-+	goto theend;
-+
-     putc(VIMSPELLVERSION, fd);				    /* <versionnr> */
- 
-     /*
-@@ -7955,7 +8143,7 @@
- 
- 	i = (int)STRLEN(spin->si_info);
- 	put_bytes(fd, (long_u)i, 4);			/* <sectionlen> */
--	fwrite(spin->si_info, (size_t)i, (size_t)1, fd); /* <infotext> */
-+	fwv &= fwrite(spin->si_info, (size_t)i, (size_t)1, fd); /* <infotext> */
-     }
- 
-     /* SN_REGION: <regionname> ...
-@@ -7966,7 +8154,7 @@
- 	putc(SNF_REQUIRED, fd);				/* <sectionflags> */
- 	l = spin->si_region_count * 2;
- 	put_bytes(fd, (long_u)l, 4);			/* <sectionlen> */
--	fwrite(spin->si_region_name, (size_t)l, (size_t)1, fd);
-+	fwv &= fwrite(spin->si_region_name, (size_t)l, (size_t)1, fd);
- 							/* <regionname> ... */
- 	regionmask = (1 << spin->si_region_count) - 1;
-     }
-@@ -8016,7 +8204,7 @@
- 	}
- 
- 	put_bytes(fd, (long_u)l, 2);			/* <folcharslen> */
--	fwrite(folchars, (size_t)l, (size_t)1, fd);	/* <folchars> */
-+	fwv &= fwrite(folchars, (size_t)l, (size_t)1, fd); /* <folchars> */
-     }
- 
-     /* SN_MIDWORD: <midword> */
-@@ -8027,7 +8215,8 @@
- 
- 	i = (int)STRLEN(spin->si_midword);
- 	put_bytes(fd, (long_u)i, 4);			/* <sectionlen> */
--	fwrite(spin->si_midword, (size_t)i, (size_t)1, fd); /* <midword> */
-+	fwv &= fwrite(spin->si_midword, (size_t)i, (size_t)1, fd);
-+							/* <midword> */
-     }
- 
-     /* SN_PREFCOND: <prefcondcnt> <prefcond> ... */
-@@ -8113,7 +8302,8 @@
- 		p = rr == 1 ? ftp->ft_from : ftp->ft_to;
- 		l = (int)STRLEN(p);
- 		putc(l, fd);
--		fwrite(p, l, (size_t)1, fd);
-+		if (l > 0)
-+		    fwv &= fwrite(p, l, (size_t)1, fd);
- 	    }
- 	}
- 
-@@ -8131,11 +8321,11 @@
- 							/* <sectionlen> */
- 
- 	put_bytes(fd, (long_u)l, 2);			/* <sofofromlen> */
--	fwrite(spin->si_sofofr, l, (size_t)1, fd);	/* <sofofrom> */
-+	fwv &= fwrite(spin->si_sofofr, l, (size_t)1, fd); /* <sofofrom> */
- 
- 	l = (int)STRLEN(spin->si_sofoto);
- 	put_bytes(fd, (long_u)l, 2);			/* <sofotolen> */
--	fwrite(spin->si_sofoto, l, (size_t)1, fd);	/* <sofoto> */
-+	fwv &= fwrite(spin->si_sofoto, l, (size_t)1, fd); /* <sofoto> */
-     }
- 
-     /* SN_WORDS: <word> ...
-@@ -8160,7 +8350,7 @@
- 		    l = (int)STRLEN(hi->hi_key) + 1;
- 		    len += l;
- 		    if (round == 2)			/* <word> */
--			fwrite(hi->hi_key, (size_t)l, (size_t)1, fd);
-+			fwv &= fwrite(hi->hi_key, (size_t)l, (size_t)1, fd);
- 		    --todo;
- 		}
- 	    if (round == 1)
-@@ -8176,7 +8366,7 @@
- 	putc(0, fd);					/* <sectionflags> */
- 	l = spin->si_map.ga_len;
- 	put_bytes(fd, (long_u)l, 4);			/* <sectionlen> */
--	fwrite(spin->si_map.ga_data, (size_t)l, (size_t)1, fd);
-+	fwv &= fwrite(spin->si_map.ga_data, (size_t)l, (size_t)1, fd);
- 							/* <mapstr> */
-     }
- 
-@@ -8232,10 +8422,11 @@
- 	{
- 	    p = ((char_u **)(spin->si_comppat.ga_data))[i];
- 	    putc((int)STRLEN(p), fd);			/* <comppatlen> */
--	    fwrite(p, (size_t)STRLEN(p), (size_t)1, fd);/* <comppattext> */
-+	    fwv &= fwrite(p, (size_t)STRLEN(p), (size_t)1, fd);
-+							/* <comppattext> */
- 	}
- 							/* <compflags> */
--	fwrite(spin->si_compflags, (size_t)STRLEN(spin->si_compflags),
-+	fwv &= fwrite(spin->si_compflags, (size_t)STRLEN(spin->si_compflags),
- 							       (size_t)1, fd);
-     }
- 
-@@ -8259,7 +8450,8 @@
- 
- 	l = (int)STRLEN(spin->si_syllable);
- 	put_bytes(fd, (long_u)l, 4);			/* <sectionlen> */
--	fwrite(spin->si_syllable, (size_t)l, (size_t)1, fd); /* <syllable> */
-+	fwv &= fwrite(spin->si_syllable, (size_t)l, (size_t)1, fd);
-+							/* <syllable> */
-     }
- 
-     /* end of <SECTIONS> */
-@@ -8295,13 +8487,18 @@
- 	(void)put_node(fd, tree, 0, regionmask, round == 3);
-     }
- 
--    /* Write another byte to check for errors. */
-+    /* Write another byte to check for errors (file system full). */
-     if (putc(0, fd) == EOF)
- 	retval = FAIL;
--
-+theend:
-     if (fclose(fd) == EOF)
- 	retval = FAIL;
- 
-+    if (fwv != (size_t)1)
-+	retval = FAIL;
-+    if (retval == FAIL)
-+	EMSG(_(e_write));
-+
-     return retval;
- }
- 
-@@ -9890,6 +10087,7 @@
-     char_u	*p;
-     int		len;
-     int		totlen;
-+    size_t	x = 1;  /* collect return value of fwrite() */
- 
-     if (fd != NULL)
- 	put_bytes(fd, (long_u)gap->ga_len, 2);	    /* <prefcondcnt> */
-@@ -9906,7 +10104,7 @@
- 	    if (fd != NULL)
- 	    {
- 		fputc(len, fd);
--		fwrite(p, (size_t)len, (size_t)1, fd);
-+		x &= fwrite(p, (size_t)len, (size_t)1, fd);
- 	    }
- 	    totlen += len;
- 	}
-@@ -10343,10 +10541,9 @@
- /*
-  * ":spellrepall"
-  */
--/*ARGSUSED*/
-     void
- ex_spellrepall(eap)
--    exarg_T *eap;
-+    exarg_T *eap UNUSED;
- {
-     pos_T	pos = curwin->w_cursor;
-     char_u	*frompat;
-@@ -11480,15 +11677,24 @@
- 		    vim_strncpy(preword + sp->ts_prewordlen,
- 			    tword + sp->ts_splitoff,
- 			    sp->ts_twordlen - sp->ts_splitoff);
--		    p = preword;
--		    while (*skiptowhite(p) != NUL)
--			p = skipwhite(skiptowhite(p));
--		    if (fword_ends && !can_compound(slang, p,
--						compflags + sp->ts_compsplit))
--			/* Compound is not allowed.  But it may still be
--			 * possible if we add another (short) word. */
-+
-+		    /* Verify CHECKCOMPOUNDPATTERN  rules. */
-+		    if (match_checkcompoundpattern(preword,  sp->ts_prewordlen,
-+							  &slang->sl_comppat))
- 			compound_ok = FALSE;
- 
-+		    if (compound_ok)
-+		    {
-+			p = preword;
-+			while (*skiptowhite(p) != NUL)
-+			    p = skipwhite(skiptowhite(p));
-+			if (fword_ends && !can_compound(slang, p,
-+						compflags + sp->ts_compsplit))
-+			    /* Compound is not allowed.  But it may still be
-+			     * possible if we add another (short) word. */
-+			    compound_ok = FALSE;
-+		    }
-+
- 		    /* Get pointer to last char of previous word. */
- 		    p = preword + sp->ts_prewordlen;
- 		    mb_ptr_back(preword, p);
-@@ -11685,10 +11891,9 @@
- 			&& (slang->sl_compsylmax < MAXWLEN
- 			    || sp->ts_complen + 1 - sp->ts_compsplit
- 							  < slang->sl_compmax)
--			&& (byte_in_str(sp->ts_complen == sp->ts_compsplit
--					    ? slang->sl_compstartflags
--					    : slang->sl_compallflags,
--						    ((unsigned)flags >> 24))))
-+			&& (can_be_compound(sp, slang,
-+					 compflags, ((unsigned)flags >> 24))))
-+
- 		{
- 		    try_compound = TRUE;
- 		    compflags[sp->ts_complen] = ((unsigned)flags >> 24);
-@@ -14808,7 +15013,7 @@
- 
- 	case 0:
- 	    /*
--	     * Lenghts are equal, thus changes must result in same length: An
-+	     * Lengths are equal, thus changes must result in same length: An
- 	     * insert is only possible in combination with a delete.
- 	     * 1: check if for identical strings
- 	     */
-@@ -15398,10 +15603,9 @@
- /*
-  * ":spellinfo"
-  */
--/*ARGSUSED*/
-     void
- ex_spellinfo(eap)
--    exarg_T *eap;
-+    exarg_T *eap UNUSED;
- {
-     int		lpi;
-     langp_T	*lp;
-@@ -15945,11 +16149,9 @@
-  * Returns the number of matches.  The matches are in "matchp[]", array of
-  * allocated strings.
-  */
--/*ARGSUSED*/
-     int
--expand_spelling(lnum, col, pat, matchp)
--    linenr_T	lnum;
--    int		col;
-+expand_spelling(lnum, pat, matchp)
-+    linenr_T	lnum UNUSED;
-     char_u	*pat;
-     char_u	***matchp;
- {
-diff -Naur vim72.orig/src/structs.h vim72/src/structs.h
---- vim72.orig/src/structs.h	2008-07-30 13:02:50.000000000 -0700
-+++ vim72/src/structs.h	2009-07-19 15:18:36.000000000 -0700
-@@ -16,7 +16,7 @@
-  */
- #if defined(SASC) && SASC < 658
- typedef long		linenr_T;
--typedef unsigned	colnr_T;
-+typedef int		colnr_T;
- typedef unsigned short	short_u;
- #endif
- 
-@@ -33,9 +33,9 @@
- } pos_T;
- 
- #ifdef FEAT_VIRTUALEDIT
--# define INIT_POS_T {0, 0, 0}
-+# define INIT_POS_T(l, c, ca) {l, c, ca}
- #else
--# define INIT_POS_T {0, 0}
-+# define INIT_POS_T(l, c, ca) {l, c}
- #endif
- 
- /*
-@@ -459,7 +459,7 @@
- typedef struct
- {
-     int		hide;			/* TRUE when ":hide" was used */
--# ifdef FEAT_BROWSE
-+# ifdef FEAT_BROWSE_CMD
-     int		browse;			/* TRUE to invoke file dialog */
- # endif
- # ifdef FEAT_WINDOWS
-@@ -882,6 +882,8 @@
- {
-     typebuf_T		save_typebuf;
-     int			typebuf_valid;	    /* TRUE when save_typebuf valid */
-+    int			old_char;
-+    int			old_mod_mask;
-     struct buffheader	save_stuffbuff;
- #ifdef USE_INPUT_BUF
-     char_u		*save_inputbuf;
-@@ -1166,7 +1168,8 @@
-     char_u	*b_fname;	/* current file name */
- 
- #ifdef UNIX
--    int		b_dev;		/* device number (-1 if not set) */
-+    int		b_dev_valid;	/* TRUE when b_dev has a valid number */
-+    dev_t	b_dev;		/* device number */
-     ino_t	b_ino;		/* inode number */
- #endif
- #ifdef FEAT_CW_EDITOR
-@@ -1620,6 +1623,14 @@
- };
- #endif
- 
-+#define SNAP_HELP_IDX	0
-+#ifdef FEAT_AUTOCMD
-+# define SNAP_AUCMD_IDX 1
-+# define SNAP_COUNT	2
-+#else
-+# define SNAP_COUNT	1
-+#endif
-+
- /*
-  * Tab pages point to the top frame of each tab page.
-  * Note: Most values are NOT valid for the current tab page!  Use "curwin",
-@@ -1648,7 +1659,7 @@
-     buf_T	    *(tp_diffbuf[DB_COUNT]);
-     int		    tp_diff_invalid;	/* list of diffs is outdated */
- #endif
--    frame_T	    *tp_snapshot;    /* window layout snapshot */
-+    frame_T	    *(tp_snapshot[SNAP_COUNT]);  /* window layout snapshots */
- #ifdef FEAT_EVAL
-     dictitem_T	    tp_winvar;	    /* variable for "t:" Dictionary */
-     dict_T	    tp_vars;	    /* internal variables, local to tab page */
-@@ -1784,10 +1795,15 @@
- #endif
- 
-     /*
--     * The next three specify the offsets for displaying the buffer:
-+     * "w_topline", "w_leftcol" and "w_skipcol" specify the offsets for
-+     * displaying the buffer.
-      */
-     linenr_T	w_topline;	    /* buffer line number of the line at the
- 				       top of the window */
-+#ifdef FEAT_AUTOCMD
-+    char	w_topline_was_set;  /* flag set to TRUE when topline is set,
-+				       e.g. by winrestview() */
-+#endif
- #ifdef FEAT_DIFF
-     int		w_topfill;	    /* number of filler lines above w_topline */
-     int		w_old_topfill;	    /* w_topfill at last redraw */
-@@ -2270,16 +2286,11 @@
-  */
- typedef struct
- {
--    buf_T	*save_buf;	/* saved curbuf */
-+    buf_T	*save_curbuf;	/* saved curbuf */
- #ifdef FEAT_AUTOCMD
--    buf_T	*new_curbuf;	/* buffer to be used */
--    win_T	*save_curwin;	/* saved curwin, NULL if it didn't change */
--    win_T	*new_curwin;	/* new curwin if save_curwin != NULL */
--    pos_T	save_cursor;	/* saved cursor pos of save_curwin */
--    linenr_T	save_topline;	/* saved topline of save_curwin */
--# ifdef FEAT_DIFF
--    int		save_topfill;	/* saved topfill of save_curwin */
--# endif
-+    win_T	*save_curwin;	/* saved curwin */
-+    win_T	*new_curwin;	/* new curwin */
-+    buf_T	*new_curbuf;	/* new curbuf */
- #endif
- } aco_save_T;
- 
-diff -Naur vim72.orig/src/syntax.c vim72/src/syntax.c
---- vim72.orig/src/syntax.c	2008-08-08 14:47:48.000000000 -0700
-+++ vim72/src/syntax.c	2009-07-19 15:16:33.000000000 -0700
-@@ -3224,11 +3224,10 @@
- /*
-  * Handle ":syntax case" command.
-  */
--/* ARGSUSED */
-     static void
- syn_cmd_case(eap, syncing)
-     exarg_T	*eap;
--    int		syncing;	    /* not used */
-+    int		syncing UNUSED;
- {
-     char_u	*arg = eap->arg;
-     char_u	*next;
-@@ -3249,11 +3248,10 @@
- /*
-  * Handle ":syntax spell" command.
-  */
--/* ARGSUSED */
-     static void
- syn_cmd_spell(eap, syncing)
-     exarg_T	*eap;
--    int		syncing;	    /* not used */
-+    int		syncing UNUSED;
- {
-     char_u	*arg = eap->arg;
-     char_u	*next;
-@@ -3517,11 +3515,10 @@
- /*
-  * Handle ":syntax on" command.
-  */
--/* ARGSUSED */
-     static void
- syn_cmd_on(eap, syncing)
-     exarg_T	*eap;
--    int		syncing;	/* not used */
-+    int		syncing UNUSED;
- {
-     syn_cmd_onoff(eap, "syntax");
- }
-@@ -3529,11 +3526,10 @@
- /*
-  * Handle ":syntax enable" command.
-  */
--/* ARGSUSED */
-     static void
- syn_cmd_enable(eap, syncing)
-     exarg_T	*eap;
--    int		syncing;	/* not used */
-+    int		syncing UNUSED;
- {
-     set_internal_string_var((char_u *)"syntax_cmd", (char_u *)"enable");
-     syn_cmd_onoff(eap, "syntax");
-@@ -3543,11 +3539,10 @@
- /*
-  * Handle ":syntax reset" command.
-  */
--/* ARGSUSED */
-     static void
- syn_cmd_reset(eap, syncing)
-     exarg_T	*eap;
--    int		syncing;	/* not used */
-+    int		syncing UNUSED;
- {
-     eap->nextcmd = check_nextcmd(eap->arg);
-     if (!eap->skip)
-@@ -3561,11 +3556,10 @@
- /*
-  * Handle ":syntax manual" command.
-  */
--/* ARGSUSED */
-     static void
- syn_cmd_manual(eap, syncing)
-     exarg_T	*eap;
--    int		syncing;	/* not used */
-+    int		syncing UNUSED;
- {
-     syn_cmd_onoff(eap, "manual");
- }
-@@ -3573,11 +3567,10 @@
- /*
-  * Handle ":syntax off" command.
-  */
--/* ARGSUSED */
-     static void
- syn_cmd_off(eap, syncing)
-     exarg_T	*eap;
--    int		syncing;	/* not used */
-+    int		syncing UNUSED;
- {
-     syn_cmd_onoff(eap, "nosyntax");
- }
-@@ -4461,11 +4454,10 @@
- /*
-  * Handle ":syntax include [@{group-name}] filename" command.
-  */
--/* ARGSUSED */
-     static void
- syn_cmd_include(eap, syncing)
-     exarg_T	*eap;
--    int		syncing;	    /* not used */
-+    int		syncing UNUSED;
- {
-     char_u	*arg = eap->arg;
-     int		sgl_id = 1;
-@@ -4532,11 +4524,10 @@
- /*
-  * Handle ":syntax keyword {group-name} [{option}] keyword .." command.
-  */
--/* ARGSUSED */
-     static void
- syn_cmd_keyword(eap, syncing)
-     exarg_T	*eap;
--    int		syncing;	    /* not used */
-+    int		syncing UNUSED;
- {
-     char_u	*arg = eap->arg;
-     char_u	*group_name_end;
-@@ -5275,11 +5266,10 @@
-  * Handle ":syntax cluster {cluster-name} [contains={groupname},..]
-  *		[add={groupname},..] [remove={groupname},..]".
-  */
--/* ARGSUSED */
-     static void
- syn_cmd_cluster(eap, syncing)
-     exarg_T	*eap;
--    int		syncing;	    /* not used */
-+    int		syncing UNUSED;
- {
-     char_u	*arg = eap->arg;
-     char_u	*group_name_end;
-@@ -5464,11 +5454,10 @@
- /*
-  * Handle ":syntax sync .." command.
-  */
--/* ARGSUSED */
-     static void
- syn_cmd_sync(eap, syncing)
-     exarg_T	*eap;
--    int		syncing;	    /* not used */
-+    int		syncing UNUSED;
- {
-     char_u	*arg_start = eap->arg;
-     char_u	*arg_end;
-@@ -6099,10 +6088,9 @@
-  * Function given to ExpandGeneric() to obtain the list syntax names for
-  * expansion.
-  */
--/*ARGSUSED*/
-     char_u *
- get_syntax_name(xp, idx)
--    expand_T	*xp;
-+    expand_T	*xp UNUSED;
-     int		idx;
- {
-     if (expand_what == EXP_SUBCMD)
-@@ -7744,14 +7732,13 @@
- /*
-  * Get the font or fontset for one highlight group.
-  */
--/*ARGSUSED*/
-     static void
- hl_do_font(idx, arg, do_normal, do_menu, do_tooltip)
-     int		idx;
-     char_u	*arg;
--    int		do_normal;	/* set normal font */
--    int		do_menu;	/* set menu font */
--    int		do_tooltip;	/* set tooltip font */
-+    int		do_normal;		/* set normal font */
-+    int		do_menu UNUSED;		/* set menu font */
-+    int		do_tooltip UNUSED;	/* set tooltip font */
- {
- # ifdef FEAT_XFONTSET
-     /* If 'guifontset' is not empty, first try using the name as a
-@@ -9150,10 +9137,9 @@
-  * Function given to ExpandGeneric() to obtain the list of group names.
-  * Also used for synIDattr() function.
-  */
--/*ARGSUSED*/
-     char_u *
- get_highlight_name(xp, idx)
--    expand_T	*xp;
-+    expand_T	*xp UNUSED;
-     int		idx;
- {
- #ifdef FEAT_CMDL_COMPL
-diff -Naur vim72.orig/src/tag.c vim72/src/tag.c
---- vim72.orig/src/tag.c	2008-07-16 14:31:30.000000000 -0700
-+++ vim72/src/tag.c	2009-07-19 15:16:33.000000000 -0700
-@@ -100,7 +100,7 @@
-  * Tag for preview window is remembered separately, to avoid messing up the
-  * normal tagstack.
-  */
--static taggy_T ptag_entry = {NULL};
-+static taggy_T ptag_entry = {NULL, {INIT_POS_T(0, 0, 0), 0}, 0, 0};
- #endif
- 
- /*
-@@ -515,7 +515,7 @@
- 	     * If a count is supplied to the ":tag <name>" command, then
- 	     * jump to count'th matching tag.
- 	     */
--	    if (type == DT_TAG && count > 0)
-+	    if (type == DT_TAG && *tag != NUL && count > 0)
- 		cur_match = count - 1;
- 
- 	    if (type == DT_SELECT || type == DT_JUMP
-@@ -618,7 +618,7 @@
- 		taglen_advance(taglen);
- 		MSG_PUTS_ATTR(_("file\n"), hl_attr(HLF_T));
- 
--		for (i = 0; i < num_matches; ++i)
-+		for (i = 0; i < num_matches && !got_int; ++i)
- 		{
- 		    parse_match(matches[i], &tagp);
- 		    if (!new_tag && (
-@@ -655,6 +655,8 @@
- 		    }
- 		    if (msg_col > 0)
- 			msg_putchar('\n');
-+		    if (got_int)
-+			break;
- 		    msg_advance(15);
- 
- 		    /* print any extra fields */
-@@ -689,6 +691,8 @@
- 				if (msg_col + ptr2cells(p) >= Columns)
- 				{
- 				    msg_putchar('\n');
-+				    if (got_int)
-+					break;
- 				    msg_advance(15);
- 				}
- 				p = msg_outtrans_one(p, attr);
-@@ -704,6 +708,8 @@
- 			if (msg_col > 15)
- 			{
- 			    msg_putchar('\n');
-+			    if (got_int)
-+				break;
- 			    msg_advance(15);
- 			}
- 		    }
-@@ -734,6 +740,8 @@
- 		    {
- 			if (msg_col + (*p == TAB ? 1 : ptr2cells(p)) > Columns)
- 			    msg_putchar('\n');
-+			if (got_int)
-+			    break;
- 			msg_advance(15);
- 
- 			/* skip backslash used for escaping command char */
-@@ -760,12 +768,9 @@
- 		    if (msg_col)
- 			msg_putchar('\n');
- 		    ui_breakcheck();
--		    if (got_int)
--		    {
--			got_int = FALSE;	/* only stop the listing */
--			break;
--		    }
- 		}
-+		if (got_int)
-+		    got_int = FALSE;	/* only stop the listing */
- 		ask_for_selection = TRUE;
- 	    }
- #if defined(FEAT_QUICKFIX) && defined(FEAT_EVAL)
-@@ -1100,10 +1105,9 @@
- /*
-  * Print the tag stack
-  */
--/*ARGSUSED*/
-     void
- do_tags(eap)
--    exarg_T	*eap;
-+    exarg_T	*eap UNUSED;
- {
-     int		i;
-     char_u	*name;
-@@ -2525,11 +2529,10 @@
-  * Callback function for finding all "tags" and "tags-??" files in
-  * 'runtimepath' doc directories.
-  */
--/*ARGSUSED*/
-     static void
- found_tagfile_cb(fname, cookie)
-     char_u	*fname;
--    void	*cookie;
-+    void	*cookie UNUSED;
- {
-     if (ga_grow(&tag_fnames, 1) == OK)
- 	((char_u **)(tag_fnames.ga_data))[tag_fnames.ga_len++] =
-@@ -2542,6 +2545,15 @@
- {
-     ga_clear_strings(&tag_fnames);
-     do_tag(NULL, DT_FREE, 0, 0, 0);
-+    tag_freematch();
-+
-+# if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
-+    if (ptag_entry.tagname)
-+    {
-+        vim_free(ptag_entry.tagname);
-+        ptag_entry.tagname = NULL;
-+    }
-+# endif
- }
- #endif
- 
-@@ -2725,7 +2737,24 @@
- 	 */
- 	p_7f = vim_strchr(lbuf, 0x7f);
- 	if (p_7f == NULL)
-+	{
-+etag_fail:
-+	    if (vim_strchr(lbuf, '\n') == NULL)
-+	    {
-+		/* Truncated line.  Ignore it. */
-+		if (p_verbose >= 5)
-+		{
-+		    verbose_enter();
-+		    MSG(_("Ignoring long line in tags file"));
-+		    verbose_leave();
-+		}
-+		tagp->command = lbuf;
-+		tagp->tagname = lbuf;
-+		tagp->tagname_end = lbuf;
-+		return OK;
-+	    }
- 	    return FAIL;
-+	}
- 
- 	/* Find ^A.  If not found the line number is after the 0x7f */
- 	p = vim_strchr(p_7f, Ctrl_A);
-@@ -2735,7 +2764,7 @@
- 	    ++p;
- 
- 	if (!VIM_ISDIGIT(*p))	    /* check for start of line number */
--	    return FAIL;
-+	    goto etag_fail;
- 	tagp->command = p;
- 
- 
-@@ -2749,7 +2778,7 @@
- 	    /* find end of tagname */
- 	    for (p = p_7f - 1; !vim_iswordc(*p); --p)
- 		if (p == lbuf)
--		    return FAIL;
-+		    goto etag_fail;
- 	    tagp->tagname_end = p + 1;
- 	    while (p >= lbuf && vim_iswordc(*p))
- 		--p;
-@@ -3762,7 +3791,7 @@
- 		--end;
- 	}
- 	len = (int)(end - start);
--	if (len > sizeof(buf) - 1)
-+	if (len > (int)sizeof(buf) - 1)
- 	    len = sizeof(buf) - 1;
- 	vim_strncpy(buf, start, len);
-     }
-diff -Naur vim72.orig/src/term.c vim72/src/term.c
---- vim72.orig/src/term.c	2008-07-27 04:48:06.000000000 -0700
-+++ vim72/src/term.c	2009-07-19 15:17:27.000000000 -0700
-@@ -2906,7 +2906,7 @@
-     int	    i;
-     int	    shift;
- 
--    for (i = 1; i <= sizeof(long_u); i++)
-+    for (i = 1; i <= (int)sizeof(long_u); i++)
-     {
- 	shift = 8 * (sizeof(long_u) - i);
- 	dst[i - 1] = (char_u) ((val >> shift) & 0xff);
-@@ -2937,7 +2937,7 @@
-     len = get_bytes_from_buf(buf, bytes, (int)sizeof(long_u));
-     if (len != -1)
-     {
--	for (i = 0; i < sizeof(long_u); i++)
-+	for (i = 0; i < (int)sizeof(long_u); i++)
- 	{
- 	    shift = 8 * (sizeof(long_u) - 1 - i);
- 	    *val += (long_u)bytes[i] << shift;
-@@ -4920,7 +4920,15 @@
- 	key_name[0] = KEY2TERMCAP0(key);
- 	key_name[1] = KEY2TERMCAP1(key);
- 	if (key_name[0] == KS_KEY)
--	    string[new_slen++] = key_name[1];	/* from ":set <M-b>=xx" */
-+	{
-+	    /* from ":set <M-b>=xx" */
-+#ifdef FEAT_MBYTE
-+	    if (has_mbyte)
-+		new_slen += (*mb_char2bytes)(key_name[1], string + new_slen);
-+	    else
-+#endif
-+		string[new_slen++] = key_name[1];
-+	}
- 	else
- 	{
- 	    string[new_slen++] = K_SPECIAL;
-@@ -5547,7 +5555,7 @@
-  * respects the current B/k/< settings of 'cpoption'.
-  *
-  * This function is called when expanding mappings/abbreviations on the
-- * command-line, and for building the "Ambiguous mapping..." error messæge.
-+ * command-line, and for building the "Ambiguous mapping..." error message.
-  *
-  * It uses a growarray to build the translation string since the
-  * latter can be wider than the original description. The caller has to
-diff -Naur vim72.orig/src/testdir/Makefile vim72/src/testdir/Makefile
---- vim72.orig/src/testdir/Makefile	2008-06-19 13:29:46.000000000 -0700
-+++ vim72/src/testdir/Makefile	2009-07-19 15:18:15.000000000 -0700
-@@ -4,9 +4,11 @@
- 
- VIMPROG = ../vim
- 
--# Uncomment this line for using valgrind.
--# The output goes into a file "valgrind.$PID" (sorry, no test number).
--# VALGRIND = valgrind --tool=memcheck --leak-check=yes --num-callers=15 --logfile=valgrind
-+# Uncomment this line to use valgrind for memory leaks and extra warnings.
-+#   The output goes into a file "valgrind.testN"
-+#   Vim should be compiled with EXITFREE to avoid false warnings.
-+#   This will make testing about 10 times as slow.
-+# VALGRIND = valgrind --tool=memcheck --leak-check=yes --num-callers=15 --log-file=valgrind.$*
- 
- SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \
- 		test7.out test8.out test9.out test10.out test11.out \
-@@ -20,21 +22,23 @@
- 		test48.out test49.out test51.out test52.out test53.out \
- 		test54.out test55.out test56.out test57.out test58.out \
- 		test59.out test60.out test61.out test62.out test63.out \
--		test64.out test65.out
-+		test64.out test65.out test66.out
- 
- SCRIPTS_GUI = test16.out
- 
- .SUFFIXES: .in .out
- 
--nongui:	nolog $(SCRIPTS)
--	@echo
--	@cat test.log
--	@echo ALL DONE
-+nongui:	nolog $(SCRIPTS) report
-+
-+gui:	nolog $(SCRIPTS) $(SCRIPTS_GUI) report
- 
--gui:	nolog $(SCRIPTS) $(SCRIPTS_GUI)
-+report:
- 	@echo
--	@cat test.log
--	@echo ALL DONE
-+	@echo 'Test results:'
-+	@/bin/sh -c "if test -f test.log; \
-+		then cat test.log; echo TEST FAILURE; exit 1; \
-+		else echo ALL DONE; \
-+		fi"
- 
- $(SCRIPTS) $(SCRIPTS_GUI): $(VIMPROG)
- 
-@@ -71,4 +75,4 @@
- test60.out: test60.vim
- 
- nolog:
--	-echo Test results: >test.log
-+	-rm -f test.log
-diff -Naur vim72.orig/src/testdir/Make_ming.mak vim72/src/testdir/Make_ming.mak
---- vim72.orig/src/testdir/Make_ming.mak	1969-12-31 16:00:00.000000000 -0800
-+++ vim72/src/testdir/Make_ming.mak	2009-07-19 15:09:28.000000000 -0700
-@@ -0,0 +1,91 @@
-+# Makefile to run tests for Vim, on Dos-like machines
-+# with sh.exe or zsh.exe in the path or not.
-+#
-+# Author: Bill McCarthy
-+#
-+# Note that test54 has been removed until it is fixed.
-+#
-+# Requires a set of Unix tools: echo, diff, etc.
-+
-+ifneq (sh.exe, $(SHELL))
-+DEL = rm -f
-+MV = mv
-+CP = cp
-+DIRSLASH = /
-+else
-+DEL = del
-+MV = rename
-+CP = copy
-+DIRSLASH = \\
-+endif
-+
-+VIMPROG = ..$(DIRSLASH)vim
-+
-+# Omitted:
-+# test2		"\\tmp" doesn't work.
-+# test10	'errorformat' is different
-+# test12	can't unlink a swap file
-+# test25	uses symbolic link
-+# test27	can't edit file with "*" in file name
-+# test31	16 bit version runs out of memory...
-+
-+SCRIPTS16 =	test1.out test19.out test20.out test22.out \
-+		test23.out test24.out test28.out test29.out \
-+		test35.out test36.out test43.out \
-+		test44.out test45.out test46.out test47.out \
-+		test48.out test51.out test53.out            \
-+		test55.out test56.out test57.out test58.out test59.out \
-+		test60.out test61.out test62.out test63.out test64.out
-+
-+# Had to remove test54 which doesn't work yet.
-+#		                                 test54.out
-+
-+SCRIPTS =	test3.out test4.out test5.out test6.out test7.out \
-+		test8.out test9.out test11.out test13.out test14.out \
-+		test15.out test17.out test18.out test21.out test26.out \
-+		test30.out test31.out test32.out test33.out test34.out \
-+		test37.out test38.out test39.out test40.out test41.out \
-+		test42.out test52.out test65.out
-+
-+SCRIPTS32 =	test50.out
-+
-+SCRIPTS_GUI = test16.out
-+
-+.SUFFIXES: .in .out
-+
-+vimall:	fixff $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS_GUI) $(SCRIPTS32)
-+	echo ALL DONE
-+
-+nongui:	fixff $(SCRIPTS16) $(SCRIPTS)
-+	echo ALL DONE
-+
-+small:
-+	echo ALL DONE
-+
-+gui:	fixff $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS_GUI)
-+	echo ALL DONE
-+
-+win32:	fixff $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS32)
-+	echo ALL DONE
-+
-+fixff:
-+	-$(VIMPROG) -u dos.vim --noplugin "+argdo set ff=dos|upd" +q *.in *.ok
-+
-+clean:
-+	-$(DEL) *.out
-+	-$(DEL) test.ok
-+	-$(DEL) small.vim
-+	-$(DEL) tiny.vim
-+	-$(DEL) mbyte.vim
-+	-$(DEL) X*
-+	-$(DEL) viminfo
-+
-+.in.out:
-+	$(CP) $*.ok test.ok
-+	$(VIMPROG) -u dos.vim -U NONE --noplugin -s dotest.in $*.in
-+	diff test.out $*.ok
-+	-$(DEL) $*.out
-+	$(MV) test.out $*.out
-+	-$(DEL) X*
-+	-$(DEL) test.ok
-+	-$(DEL) viminfo
-diff -Naur vim72.orig/src/testdir/test42.ok vim72/src/testdir/test42.ok
---- vim72.orig/src/testdir/test42.ok	2008-02-20 04:27:37.000000000 -0800
-+++ vim72/src/testdir/test42.ok	2009-07-19 15:09:58.000000000 -0700
-@@ -20,7 +20,7 @@
- ucs-2
- 
- 
--  fileencoding=ucs-2le
-+  fileencoding=utf-16le
-   bomb
- ucs-2le
- 
-diff -Naur vim72.orig/src/testdir/test66.in vim72/src/testdir/test66.in
---- vim72.orig/src/testdir/test66.in	1969-12-31 16:00:00.000000000 -0800
-+++ vim72/src/testdir/test66.in	2009-07-19 15:14:34.000000000 -0700
-@@ -0,0 +1,25 @@
-+
-+Test for visual block shift and tab characters.
-+
-+STARTTEST
-+:so small.vim
-+/^abcdefgh
-+4jI    j<<11|D
-+7|a		
-+7|a		   
-+7|a	       	4k13|4j<
-+:$-4,$w! test.out
-+:$-4,$s/\s\+//g
-+4kI    j<<
-+7|a		
-+7|a					
-+7|a	       		4k13|4j3<
-+:$-4,$w >> test.out
-+:qa!
-+ENDTEST
-+
-+abcdefghijklmnopqrstuvwxyz
-+abcdefghijklmnopqrstuvwxyz
-+abcdefghijklmnopqrstuvwxyz
-+abcdefghijklmnopqrstuvwxyz
-+abcdefghijklmnopqrstuvwxyz
-diff -Naur vim72.orig/src/testdir/test66.ok vim72/src/testdir/test66.ok
---- vim72.orig/src/testdir/test66.ok	1969-12-31 16:00:00.000000000 -0800
-+++ vim72/src/testdir/test66.ok	2009-07-19 15:14:34.000000000 -0700
-@@ -0,0 +1,10 @@
-+    abcdefghijklmnopqrstuvwxyz
-+abcdefghij
-+    abc	    defghijklmnopqrstuvwxyz
-+    abc	    defghijklmnopqrstuvwxyz
-+    abc	    defghijklmnopqrstuvwxyz
-+    abcdefghijklmnopqrstuvwxyz
-+abcdefghij
-+    abc	    defghijklmnopqrstuvwxyz
-+    abc		defghijklmnopqrstuvwxyz
-+    abc	    defghijklmnopqrstuvwxyz
-diff -Naur vim72.orig/src/ui.c vim72/src/ui.c
---- vim72.orig/src/ui.c	2008-07-14 11:14:56.000000000 -0700
-+++ vim72/src/ui.c	2009-07-19 15:18:26.000000000 -0700
-@@ -320,10 +320,9 @@
-  * The gui_set_shellsize() or mch_set_shellsize() function will try to set the
-  * new size.  If this is not possible, it will adjust Rows and Columns.
-  */
--/*ARGSUSED*/
-     void
- ui_set_shellsize(mustset)
--    int		mustset;	/* set by the user */
-+    int		mustset UNUSED;	/* set by the user */
- {
- #ifdef FEAT_GUI
-     if (gui.in_use)
-@@ -1127,10 +1126,9 @@
-  * available for pasting.
-  * When "both" is TRUE also copy to the '+' register.
-  */
--/*ARGSUSED*/
-     void
- clip_copy_modeless_selection(both)
--    int		both;
-+    int		both UNUSED;
- {
-     char_u	*buffer;
-     char_u	*bufp;
-@@ -1701,10 +1699,9 @@
-     return (int)maxlen;
- }
- 
--/*ARGSUSED*/
-     void
- fill_input_buf(exit_on_error)
--    int	exit_on_error;
-+    int	exit_on_error UNUSED;
- {
- #if defined(UNIX) || defined(OS2) || defined(VMS) || defined(MACOS_X_UNIX)
-     int		len;
-@@ -1820,7 +1817,7 @@
- #ifdef HAVE_DUP
- 	    /* Use stderr for stdin, also works for shell commands. */
- 	    close(0);
--	    dup(2);
-+	    ignored = dup(2);
- #else
- 	    read_cmd_fd = 2;	/* read from stderr instead of stdin */
- #endif
-@@ -1992,11 +1989,10 @@
- 
- static void  clip_x11_request_selection_cb __ARGS((Widget, XtPointer, Atom *, Atom *, XtPointer, long_u *, int *));
- 
--/* ARGSUSED */
-     static void
- clip_x11_request_selection_cb(w, success, sel_atom, type, value, length,
- 			      format)
--    Widget	w;
-+    Widget	w UNUSED;
-     XtPointer	success;
-     Atom	*sel_atom;
-     Atom	*type;
-@@ -2020,7 +2016,7 @@
- 
-     if (value == NULL || *length == 0)
-     {
--	clip_free_selection(cbd);	/* ???  [what's the query?] */
-+	clip_free_selection(cbd);	/* nothing received, clear register */
- 	*(int *)success = FALSE;
- 	return;
-     }
-@@ -2076,7 +2072,7 @@
- 	text_prop.value = (unsigned char *)value;
- 	text_prop.encoding = *type;
- 	text_prop.format = *format;
--	text_prop.nitems = STRLEN(value);
-+	text_prop.nitems = len;
- 	status = XmbTextPropertyToTextList(X_DISPLAY, &text_prop,
- 							 &text_list, &n_text);
- 	if (status != Success || n_text < 1)
-@@ -2108,8 +2104,8 @@
-     Atom	type;
-     static int	success;
-     int		i;
--    int		nbytes = 0;
--    char_u	*buffer;
-+    time_t	start_time;
-+    int		timed_out = FALSE;
- 
-     for (i =
- #ifdef FEAT_MBYTE
-@@ -2129,6 +2125,7 @@
- 	    case 3:  type = text_atom;		break;
- 	    default: type = XA_STRING;
- 	}
-+	success = MAYBE;
- 	XtGetSelectionValue(myShell, cbd->sel_atom, type,
- 	    clip_x11_request_selection_cb, (XtPointer)&success, CurrentTime);
- 
-@@ -2141,47 +2138,59 @@
- 	 * characters, then they will appear before the one that requested the
- 	 * paste!  Don't worry, we will catch up with any other events later.
- 	 */
--	for (;;)
-+	start_time = time(NULL);
-+	while (success == MAYBE)
- 	{
--	    if (XCheckTypedEvent(dpy, SelectionNotify, &event))
--		break;
--	    if (XCheckTypedEvent(dpy, SelectionRequest, &event))
--		/* We may get a SelectionRequest here and if we don't handle
--		 * it we hang.  KDE klipper does this, for example. */
-+	    if (XCheckTypedEvent(dpy, SelectionNotify, &event)
-+		    || XCheckTypedEvent(dpy, SelectionRequest, &event)
-+		    || XCheckTypedEvent(dpy, PropertyNotify, &event))
-+	    {
-+		/* This is where clip_x11_request_selection_cb() should be
-+		 * called.  It may actually happen a bit later, so we loop
-+		 * until "success" changes.
-+		 * We may get a SelectionRequest here and if we don't handle
-+		 * it we hang.  KDE klipper does this, for example.
-+		 * We need to handle a PropertyNotify for large selections. */
- 		XtDispatchEvent(&event);
-+		continue;
-+	    }
-+
-+	    /* Time out after 2 to 3 seconds to avoid that we hang when the
-+	     * other process doesn't respond.  Note that the SelectionNotify
-+	     * event may still come later when the selection owner comes back
-+	     * to life and the text gets inserted unexpectedly.  Don't know
-+	     * why that happens or how to avoid that :-(. */
-+	    if (time(NULL) > start_time + 2)
-+	    {
-+		timed_out = TRUE;
-+		break;
-+	    }
- 
- 	    /* Do we need this?  Probably not. */
- 	    XSync(dpy, False);
- 
--	    /* Bernhard Walle solved a slow paste response in an X terminal by
--	     * adding: usleep(10000); here. */
-+	    /* Wait for 1 msec to avoid that we eat up all CPU time. */
-+	    ui_delay(1L, TRUE);
- 	}
- 
--	/* this is where clip_x11_request_selection_cb() is actually called */
--	XtDispatchEvent(&event);
--
--	if (success)
-+	if (success == TRUE)
- 	    return;
-+
-+	/* don't do a retry with another type after timing out, otherwise we
-+	 * hang for 15 seconds. */
-+	if (timed_out)
-+	    break;
-     }
- 
-     /* Final fallback position - use the X CUT_BUFFER0 store */
--    buffer = (char_u *)XFetchBuffer(dpy, &nbytes, 0);
--    if (nbytes > 0)
--    {
--	/* Got something */
--	clip_yank_selection(MCHAR, buffer, (long)nbytes, cbd);
--	XFree((void *)buffer);
--	if (p_verbose > 0)
--	    verb_msg((char_u *)_("Used CUT_BUFFER0 instead of empty selection"));
--    }
-+    yank_cut_buffer0(dpy, cbd);
- }
- 
- static Boolean	clip_x11_convert_selection_cb __ARGS((Widget, Atom *, Atom *, Atom *, XtPointer *, long_u *, int *));
- 
--/* ARGSUSED */
-     static Boolean
- clip_x11_convert_selection_cb(w, sel_atom, target, type, value, length, format)
--    Widget	w;
-+    Widget	w UNUSED;
-     Atom	*sel_atom;
-     Atom	*target;
-     Atom	*type;
-@@ -2308,10 +2317,9 @@
- 
- static void  clip_x11_lose_ownership_cb __ARGS((Widget, Atom *));
- 
--/* ARGSUSED */
-     static void
- clip_x11_lose_ownership_cb(w, sel_atom)
--    Widget  w;
-+    Widget  w UNUSED;
-     Atom    *sel_atom;
- {
-     if (*sel_atom == clip_plus.sel_atom)
-@@ -2344,14 +2352,67 @@
-  * Send the current selection to the clipboard.  Do nothing for X because we
-  * will fill in the selection only when requested by another app.
-  */
--/*ARGSUSED*/
-     void
- clip_x11_set_selection(cbd)
--    VimClipboard *cbd;
-+    VimClipboard *cbd UNUSED;
- {
- }
- #endif
- 
-+#if defined(FEAT_XCLIPBOARD) || defined(FEAT_GUI_X11) \
-+    || defined(FEAT_GUI_GTK) || defined(PROTO)
-+/*
-+ * Get the contents of the X CUT_BUFFER0 and put it in "cbd".
-+ */
-+    void
-+yank_cut_buffer0(dpy, cbd)
-+    Display		*dpy;
-+    VimClipboard	*cbd;
-+{
-+    int		nbytes = 0;
-+    char_u	*buffer = (char_u *)XFetchBuffer(dpy, &nbytes, 0);
-+
-+    if (nbytes > 0)
-+    {
-+#ifdef FEAT_MBYTE
-+	int  done = FALSE;
-+
-+	/* CUT_BUFFER0 is supposed to be always latin1.  Convert to 'enc' when
-+	 * using a multi-byte encoding.  Conversion between two 8-bit
-+	 * character sets usually fails and the text might actually be in
-+	 * 'enc' anyway. */
-+	if (has_mbyte)
-+	{
-+	    char_u	*conv_buf = buffer;
-+	    vimconv_T	vc;
-+
-+	    vc.vc_type = CONV_NONE;
-+	    if (convert_setup(&vc, (char_u *)"latin1", p_enc) == OK)
-+	    {
-+		conv_buf = string_convert(&vc, buffer, &nbytes);
-+		if (conv_buf != NULL)
-+		{
-+		    clip_yank_selection(MCHAR, conv_buf, (long)nbytes, cbd);
-+		    vim_free(conv_buf);
-+		    done = TRUE;
-+		}
-+		convert_setup(&vc, NULL, NULL);
-+	    }
-+	}
-+	if (!done)  /* use the text without conversion */
-+#endif
-+	    clip_yank_selection(MCHAR, buffer, (long)nbytes, cbd);
-+	XFree((void *)buffer);
-+	if (p_verbose > 0)
-+	{
-+	    verbose_enter();
-+	    verb_msg((char_u *)_("Used CUT_BUFFER0 instead of empty selection"));
-+	    verbose_leave();
-+	}
-+    }
-+}
-+#endif
-+
- #if defined(FEAT_MOUSE) || defined(PROTO)
- 
- /*
-@@ -2898,11 +2959,10 @@
-  * Find the window at screen position "*rowp" and "*colp".  The positions are
-  * updated to become relative to the top-left of the window.
-  */
--/*ARGSUSED*/
-     win_T *
- mouse_find_win(rowp, colp)
-     int		*rowp;
--    int		*colp;
-+    int		*colp UNUSED;
- {
-     frame_T	*fp;
- 
-diff -Naur vim72.orig/src/version.c vim72/src/version.c
---- vim72.orig/src/version.c	2008-08-09 07:24:52.000000000 -0700
-+++ vim72/src/version.c	2009-07-19 15:19:00.000000000 -0700
-@@ -677,9 +677,444 @@
- static int included_patches[] =
- {   /* Add new patch number below this line */
- /**/
-+    234,
-+/**/
-+    232,
-+/**/
-+    231,
-+/**/
-+    230,
-+/**/
-+    229,
-+/**/
-+    228,
-+/**/
-+    227,
-+/**/
-+    226,
-+/**/
-+    225,
-+/**/
-+    224,
-+/**/
-+    223,
-+/**/
-+    222,
-+/**/
-+    221,
-+/**/
-+    220,
-+/**/
-+    218,
-+/**/
-+    217,
-+/**/
-+    215,
-+/**/
-+    214,
-+/**/
-+    213,
-+/**/
-+    211,
-+/**/
-+    210,
-+/**/
-+    209,
-+/**/
-+    208,
-+/**/
-+    207,
-+/**/
-+    206,
-+/**/
-+    203,
-+/**/
-+    202,
-+/**/
-+    201,
-+/**/
-+    200,
-+/**/
-+    199,
-+/**/
-+    198,
-+/**/
-+    197,
-+/**/
-+    196,
-+/**/
-+    195,
-+/**/
-+    193,
-+/**/
-+    192,
-+/**/
-+    190,
-+/**/
-+    189,
-+/**/
-+    188,
-+/**/
-+    187,
-+/**/
-+    186,
-+/**/
-+    185,
-+/**/
-+    184,
-+/**/
-+    183,
-+/**/
-+    182,
-+/**/
-+    181,
-+/**/
-+    180,
-+/**/
-+    179,
-+/**/
-+    178,
-+/**/
-+    177,
-+/**/
-+    176,
-+/**/
-+    175,
-+/**/
-+    174,
-+/**/
-+    171,
-+/**/
-+    170,
-+/**/
-+    169,
-+/**/
-+    168,
-+/**/
-+    167,
-+/**/
-+    166,
-+/**/
-+    165,
-+/**/
-+    164,
-+/**/
-+    163,
-+/**/
-+    162,
-+/**/
-+    161,
-+/**/
-+    160,
-+/**/
-+    159,
-+/**/
-+    158,
-+/**/
-+    157,
-+/**/
-+    156,
-+/**/
-+    155,
-+/**/
-+    154,
-+/**/
-+    153,
-+/**/
-+    152,
-+/**/
-+    151,
-+/**/
-+    149,
-+/**/
-+    148,
-+/**/
-+    147,
-+/**/
-+    146,
-+/**/
-+    145,
-+/**/
-+    144,
-+/**/
-+    143,
-+/**/
-+    142,
-+/**/
-+    141,
-+/**/
-+    140,
-+/**/
-+    139,
-+/**/
-+    137,
-+/**/
-+    136,
-+/**/
-+    135,
-+/**/
-+    134,
-+/**/
-+    133,
-+/**/
-+    132,
-+/**/
-+    131,
-+/**/
-+    130,
-+/**/
-+    129,
-+/**/
-+    128,
-+/**/
-+    127,
-+/**/
-+    126,
-+/**/
-+    125,
-+/**/
-+    124,
-+/**/
-+    123,
-+/**/
-+    122,
-+/**/
-+    121,
-+/**/
-+    120,
-+/**/
-+    119,
-+/**/
-+    118,
-+/**/
-+    117,
-+/**/
-+    116,
-+/**/
-+    115,
-+/**/
-+    114,
-+/**/
-+    113,
-+/**/
-+    112,
-+/**/
-+    111,
-+/**/
-+    110,
-+/**/
-+    109,
-+/**/
-+    108,
-+/**/
-+    107,
-+/**/
-+    106,
-+/**/
-+    105,
-+/**/
-+    104,
-+/**/
-+    103,
-+/**/
-+    102,
-+/**/
-+    100,
-+/**/
-+    99,
-+/**/
-+    98,
-+/**/
-+    97,
-+/**/
-+    96,
-+/**/
-+    95,
-+/**/
-+    94,
-+/**/
-+    92,
-+/**/
-+    91,
-+/**/
-+    90,
-+/**/
-+    87,
-+/**/
-+    86,
-+/**/
-+    85,
-+/**/
-+    84,
-+/**/
-+    83,
-+/**/
-+    82,
-+/**/
-+    81,
-+/**/
-+    80,
-+/**/
-+    79,
-+/**/
-+    78,
-+/**/
-+    77,
-+/**/
-+    76,
-+/**/
-+    75,
-+/**/
-+    73,
-+/**/
-+    70,
-+/**/
-+    69,
-+/**/
-+    68,
-+/**/
-+    67,
-+/**/
-+    66,
-+/**/
-+    65,
-+/**/
-+    64,
-+/**/
-+    63,
-+/**/
-+    62,
-+/**/
-+    61,
-+/**/
-+    60,
-+/**/
-+    59,
-+/**/
-+    58,
-+/**/
-+    57,
-+/**/
-+    56,
-+/**/
-+    55,
-+/**/
-+    54,
-+/**/
-+    53,
-+/**/
-+    52,
-+/**/
-+    51,
-+/**/
-+    50,
-+/**/
-+    48,
-+/**/
-+    47,
-+/**/
-+    46,
-+/**/
-+    45,
-+/**/
-+    44,
-+/**/
-+    43,
-+/**/
-+    42,
-+/**/
-+    40,
-+/**/
-+    39,
-+/**/
-+    38,
-+/**/
-+    37,
-+/**/
-+    35,
-+/**/
-+    34,
-+/**/
-+    33,
-+/**/
-+    32,
-+/**/
-+    31,
-+/**/
-+    30,
-+/**/
-+    29,
-+/**/
-+    28,
-+/**/
-+    27,
-+/**/
-+    26,
-+/**/
-+    25,
-+/**/
-+    24,
-+/**/
-+    23,
-+/**/
-+    22,
-+/**/
-+    21,
-+/**/
-+    20,
-+/**/
-+    19,
-+/**/
-+    18,
-+/**/
-+    17,
-+/**/
-+    16,
-+/**/
-+    15,
-+/**/
-+    14,
-+/**/
-+    13,
-+/**/
-+    12,
-+/**/
-+    11,
-+/**/
-+    10,
-+/**/
-+    9,
-+/**/
-+    8,
-+/**/
-+    6,
-+/**/
-+    5,
-+/**/
-+    4,
-+/**/
-+    3,
-+/**/
-+    2,
-+/**/
-+    1,
-+/**/
-     0
- };
- 
-+/*
-+ * Place to put a short description when adding a feature with a patch.
-+ * Keep it short, e.g.,: "relative numbers", "persistent undo".
-+ * Also add a comment marker to separate the lines.
-+ * See the official Vim patches for the diff format: It must use a context of
-+ * one line only.  Create it by hand or use "diff -C2" and edit the patch.
-+ */
-+static char *(extra_patches[]) =
-+{   /* Add your patch description below this line */
-+/**/
-+    NULL
-+};
-+
-     int
- highest_patch()
- {
-@@ -786,7 +1221,7 @@
-     MSG_PUTS(_("\nRISC OS version"));
- #endif
- #ifdef VMS
--    MSG_PUTS("\nOpenVMS version");
-+    MSG_PUTS(_("\nOpenVMS version"));
- # ifdef HAVE_PATHDEF
-     if (*compiled_arch != NUL)
-     {
-@@ -825,6 +1260,19 @@
- 	}
-     }
- 
-+    /* Print the list of extra patch descriptions if there is at least one. */
-+    if (extra_patches[0] != NULL)
-+    {
-+	MSG_PUTS(_("\nExtra patches: "));
-+	s = "";
-+	for (i = 0; extra_patches[i] != NULL; ++i)
-+	{
-+	    MSG_PUTS(s);
-+	    s = ", ";
-+	    MSG_PUTS(extra_patches[i]);
-+	}
-+    }
-+
- #ifdef MODIFIED_BY
-     MSG_PUTS("\n");
-     MSG_PUTS(_("Modified by "));
-diff -Naur vim72.orig/src/vim.h vim72/src/vim.h
---- vim72.orig/src/vim.h	2008-08-09 09:03:38.000000000 -0700
-+++ vim72/src/vim.h	2009-07-19 15:17:25.000000000 -0700
-@@ -341,8 +341,14 @@
- #ifdef BACKSLASH_IN_FILENAME
- # define PATH_ESC_CHARS ((char_u *)" \t\n*?[{`%#'\"|!<")
- #else
--# define PATH_ESC_CHARS ((char_u *)" \t\n*?[{`$\\%#'\"|!<")
--# define SHELL_ESC_CHARS ((char_u *)" \t\n*?[{`$\\%#'\"|!<>();&")
-+# ifdef VMS
-+    /* VMS allows a lot of characters in the file name */
-+#  define PATH_ESC_CHARS ((char_u *)" \t\n*?{`\\%#'\"|!")
-+#  define SHELL_ESC_CHARS ((char_u *)" \t\n*?{`\\%#'|!()&")
-+# else
-+#  define PATH_ESC_CHARS ((char_u *)" \t\n*?[{`$\\%#'\"|!<")
-+#  define SHELL_ESC_CHARS ((char_u *)" \t\n*?[{`$\\%#'\"|!<>();&")
-+# endif
- #endif
- 
- #define NUMBUFLEN 30	    /* length of a buffer to store a number in ASCII */
-@@ -370,7 +376,7 @@
-    * Define __w64 as an empty token for everything but MSVC 7.x or later.
-    */
- # if !defined(_MSC_VER)	|| (_MSC_VER < 1300)
--#  define __w64 
-+#  define __w64
- # endif
- typedef unsigned long __w64	long_u;
- typedef		 long __w64     long_i;
-@@ -702,6 +708,8 @@
- #define EXPAND_USER_DEFINED	30
- #define EXPAND_USER_LIST	31
- #define EXPAND_SHELLCMD		32
-+#define EXPAND_CSCOPE		33
-+#define EXPAND_SIGN		34
- 
- /* Values for exmode_active (0 is no exmode) */
- #define EXMODE_NORMAL		1
-@@ -1051,6 +1059,7 @@
- #define WSP_HELP	16	/* creating the help window */
- #define WSP_BELOW	32	/* put new window below/right */
- #define WSP_ABOVE	64	/* put new window above/left */
-+#define WSP_NEWLOC	128	/* don't copy location list */
- 
- /*
-  * arguments for gui_set_shellsize()
-@@ -1328,11 +1337,11 @@
- # define MSG_BUF_CLEN  MSG_BUF_LEN	    /* cell length */
- #endif
- 
--#if defined(AMIGA) || defined(__linux__) || defined(__QNX__) || defined(__CYGWIN32__) || defined(_AIX)
--# define TBUFSZ 2048		/* buffer size for termcap entry */
--#else
--# define TBUFSZ 1024		/* buffer size for termcap entry */
--#endif
-+/* Size of the buffer used for tgetent().  Unfortunately this is largely
-+ * undocumented, some systems use 1024.  Using a buffer that is too small
-+ * causes a buffer overrun and a crash.  Use the maximum known value to stay
-+ * on the safe side. */
-+#define TBUFSZ 2048		/* buffer size for termcap entry */
- 
- /*
-  * Maximum length of key sequence to be mapped.
-@@ -1451,8 +1460,8 @@
- # define PERROR(msg)		    perror(msg)
- #endif
- 
--typedef long	    linenr_T;		/* line number type */
--typedef unsigned    colnr_T;		/* column number type */
-+typedef long	linenr_T;		/* line number type */
-+typedef int	colnr_T;		/* column number type */
- typedef unsigned short disptick_T;	/* display tick type */
- 
- #define MAXLNUM (0x7fffffffL)		/* maximum (invalid) line number */
-@@ -1728,7 +1737,8 @@
- #define VV_MOUSE_COL	51
- #define VV_OP		52
- #define VV_SEARCHFORWARD 53
--#define VV_LEN		54	/* number of v: vars */
-+#define VV_OLDFILES	54
-+#define VV_LEN		55	/* number of v: vars */
- 
- #ifdef FEAT_CLIPBOARD
- 
-@@ -1979,6 +1989,9 @@
- # endif
- #endif
- 
-+#ifndef FEAT_NETBEANS_INTG
-+# undef NBDEBUG
-+#endif
- #ifdef NBDEBUG /* Netbeans debugging. */
- # include "nbdebug.h"
- #else
-@@ -2054,4 +2067,10 @@
- #define DOSO_VIMRC	1	/* loading vimrc file */
- #define DOSO_GVIMRC	2	/* loading gvimrc file */
- 
-+/* flags for read_viminfo() and children */
-+#define VIF_WANT_INFO		1	/* load non-mark info */
-+#define VIF_WANT_MARKS		2	/* load file marks */
-+#define VIF_FORCEIT		4	/* overwrite info already read */
-+#define VIF_GET_OLDFILES	8	/* load v:oldfiles */
-+
- #endif /* VIM__H */
-diff -Naur vim72.orig/src/window.c vim72/src/window.c
---- vim72.orig/src/window.c	2008-08-06 04:00:30.000000000 -0700
-+++ vim72/src/window.c	2009-07-19 15:18:10.000000000 -0700
-@@ -11,8 +11,8 @@
- 
- static int path_is_url __ARGS((char_u *p));
- #if defined(FEAT_WINDOWS) || defined(PROTO)
--static int win_split_ins __ARGS((int size, int flags, win_T *newwin, int dir));
--static void win_init __ARGS((win_T *newp, win_T *oldp));
-+static void win_init __ARGS((win_T *newp, win_T *oldp, int flags));
-+static void win_init_some __ARGS((win_T *newp, win_T *oldp));
- static void frame_comp_pos __ARGS((frame_T *topfrp, int *row, int *col));
- static void frame_setheight __ARGS((frame_T *curfrp, int height));
- #ifdef FEAT_VERTSPLIT
-@@ -23,8 +23,8 @@
- static void win_totop __ARGS((int size, int flags));
- static void win_equal_rec __ARGS((win_T *next_curwin, int current, frame_T *topfr, int dir, int col, int row, int width, int height));
- static int last_window __ARGS((void));
-+static int one_window __ARGS((void));
- static win_T *win_free_mem __ARGS((win_T *win, int *dirp, tabpage_T *tp));
--static win_T *winframe_remove __ARGS((win_T *win, int *dirp, tabpage_T *tp));
- static frame_T *win_altframe __ARGS((win_T *win, tabpage_T *tp));
- static tabpage_T *alt_tabpage __ARGS((void));
- static win_T *frame2win __ARGS((frame_T *frp));
-@@ -41,6 +41,7 @@
- #endif
- #endif
- static int win_alloc_firstwin __ARGS((win_T *oldwin));
-+static void new_frame __ARGS((win_T *wp));
- #if defined(FEAT_WINDOWS) || defined(PROTO)
- static tabpage_T *alloc_tabpage __ARGS((void));
- static int leave_tabpage __ARGS((buf_T *new_curbuf));
-@@ -49,8 +50,6 @@
- static int frame_minheight __ARGS((frame_T *topfrp, win_T *next_curwin));
- static void win_enter_ext __ARGS((win_T *wp, int undo_sync, int no_curwin));
- static void win_free __ARGS((win_T *wp, tabpage_T *tp));
--static void win_append __ARGS((win_T *, win_T *));
--static void win_remove __ARGS((win_T *, tabpage_T *tp));
- static void frame_append __ARGS((frame_T *after, frame_T *frp));
- static void frame_insert __ARGS((frame_T *before, frame_T *frp));
- static void frame_remove __ARGS((frame_T *frp));
-@@ -62,17 +61,15 @@
- static void frame_add_height __ARGS((frame_T *frp, int n));
- static void last_status_rec __ARGS((frame_T *fr, int statusline));
- 
--static void make_snapshot __ARGS((void));
- static void make_snapshot_rec __ARGS((frame_T *fr, frame_T **frp));
--static void clear_snapshot __ARGS((tabpage_T *tp));
-+static void clear_snapshot __ARGS((tabpage_T *tp, int idx));
- static void clear_snapshot_rec __ARGS((frame_T *fr));
--static void restore_snapshot __ARGS((int close_curwin));
- static int check_snapshot_rec __ARGS((frame_T *sn, frame_T *fr));
- static win_T *restore_snapshot_rec __ARGS((frame_T *sn, frame_T *fr));
- 
- #endif /* FEAT_WINDOWS */
- 
--static win_T *win_alloc __ARGS((win_T *after));
-+static win_T *win_alloc __ARGS((win_T *after, int hidden));
- static void win_new_height __ARGS((win_T *, int));
- 
- #define URL_SLASH	1		/* path_is_url() has found "://" */
-@@ -259,7 +256,7 @@
- /* cursor to previous window with wrap around */
-     case 'W':
- 		CHECK_CMDWIN
--		if (lastwin == firstwin && Prenum != 1)	/* just one window */
-+		if (firstwin == lastwin && Prenum != 1)	/* just one window */
- 		    beep_flush();
- 		else
- 		{
-@@ -343,7 +340,7 @@
- 
- /* move window to new tab page */
-     case 'T':
--		if (firstwin == lastwin)
-+		if (one_window())
- 		    MSG(_(m_onlyone));
- 		else
- 		{
-@@ -593,9 +590,7 @@
- 		++allow_keys;   /* no mapping for xchar, but allow key codes */
- 		if (xchar == NUL)
- 		    xchar = plain_vgetc();
--#ifdef FEAT_LANGMAP
- 		LANGMAP_ADJUST(xchar, TRUE);
--#endif
- 		--no_mapping;
- 		--allow_keys;
- #ifdef FEAT_CMDL_INFO
-@@ -680,9 +675,9 @@
-     /* When creating the help window make a snapshot of the window layout.
-      * Otherwise clear the snapshot, it's now invalid. */
-     if (flags & WSP_HELP)
--	make_snapshot();
-+	make_snapshot(SNAP_HELP_IDX);
-     else
--	clear_snapshot(curtab);
-+	clear_snapshot(curtab, SNAP_HELP_IDX);
- 
-     return win_split_ins(size, flags, NULL, 0);
- }
-@@ -693,7 +688,7 @@
-  * top/left/right/bottom.
-  * return FAIL for failure, OK otherwise
-  */
--    static int
-+    int
- win_split_ins(size, flags, newwin, dir)
-     int		size;
-     int		flags;
-@@ -894,14 +889,14 @@
-     {
- 	/* new window below/right of current one */
- 	if (newwin == NULL)
--	    wp = win_alloc(oldwin);
-+	    wp = win_alloc(oldwin, FALSE);
- 	else
- 	    win_append(oldwin, wp);
-     }
-     else
-     {
- 	if (newwin == NULL)
--	    wp = win_alloc(oldwin->w_prev);
-+	    wp = win_alloc(oldwin->w_prev, FALSE);
- 	else
- 	    win_append(oldwin->w_prev, wp);
-     }
-@@ -911,8 +906,15 @@
- 	if (wp == NULL)
- 	    return FAIL;
- 
-+	new_frame(wp);
-+	if (wp->w_frame == NULL)
-+	{
-+	    win_free(wp, NULL);
-+	    return FAIL;
-+	}
-+
- 	/* make the contents of the new window the same as the current one */
--	win_init(wp, curwin);
-+	win_init(wp, curwin, flags);
-     }
- 
-     /*
-@@ -971,13 +973,7 @@
-     }
- 
-     if (newwin == NULL)
--    {
--	/* Create a frame for the new window. */
--	frp = (frame_T *)alloc_clear((unsigned)sizeof(frame_T));
--	frp->fr_layout = FR_LEAF;
--	frp->fr_win = wp;
--	wp->w_frame = frp;
--    }
-+	frp = wp->w_frame;
-     else
- 	frp = newwin->w_frame;
-     frp->fr_parent = curfrp->fr_parent;
-@@ -1157,15 +1153,19 @@
-     return OK;
- }
- 
-+
- /*
-  * Initialize window "newp" from window "oldp".
-  * Used when splitting a window and when creating a new tab page.
-  * The windows will both edit the same buffer.
-+ * WSP_NEWLOC may be specified in flags to prevent the location list from
-+ * being copied.
-  */
-     static void
--win_init(newp, oldp)
-+win_init(newp, oldp, flags)
-     win_T	*newp;
-     win_T	*oldp;
-+    int		 flags UNUSED;
- {
-     int		i;
- 
-@@ -1190,19 +1190,19 @@
-     copy_jumplist(oldp, newp);
- #endif
- #ifdef FEAT_QUICKFIX
--    copy_loclist(oldp, newp);
-+    if (flags & WSP_NEWLOC)
-+    {
-+	/* Don't copy the location list.  */
-+	newp->w_llist = NULL;
-+	newp->w_llist_ref = NULL;
-+    }
-+    else
-+	copy_loclist(oldp, newp);
- #endif
-     if (oldp->w_localdir != NULL)
- 	newp->w_localdir = vim_strsave(oldp->w_localdir);
- 
--    /* Use the same argument list. */
--    newp->w_alist = oldp->w_alist;
--    ++newp->w_alist->al_refcount;
--    newp->w_arg_idx = oldp->w_arg_idx;
--
--    /*
--     * copy tagstack and options from existing window
--     */
-+    /* copy tagstack and folds */
-     for (i = 0; i < oldp->w_tagstacklen; i++)
-     {
- 	newp->w_tagstack[i] = oldp->w_tagstack[i];
-@@ -1212,10 +1212,29 @@
-     }
-     newp->w_tagstackidx = oldp->w_tagstackidx;
-     newp->w_tagstacklen = oldp->w_tagstacklen;
--    win_copy_options(oldp, newp);
- # ifdef FEAT_FOLDING
-     copyFoldingState(oldp, newp);
- # endif
-+
-+    win_init_some(newp, oldp);
-+}
-+
-+/*
-+ * Initialize window "newp" from window"old".
-+ * Only the essential things are copied.
-+ */
-+    static void
-+win_init_some(newp, oldp)
-+    win_T	*newp;
-+    win_T	*oldp;
-+{
-+    /* Use the same argument list. */
-+    newp->w_alist = oldp->w_alist;
-+    ++newp->w_alist->al_refcount;
-+    newp->w_arg_idx = oldp->w_arg_idx;
-+
-+    /* copy options from existing window */
-+    win_copy_options(oldp, newp);
- }
- 
- #endif /* FEAT_WINDOWS */
-@@ -1258,11 +1277,10 @@
-  * Must be called when there is just one window, filling the whole screen
-  * (excluding the command line).
-  */
--/*ARGSUSED*/
-     int
- make_windows(count, vertical)
-     int		count;
--    int		vertical;	/* split windows vertically if TRUE */
-+    int		vertical UNUSED;  /* split windows vertically if TRUE */
- {
-     int		maxcount;
-     int		todo;
-@@ -1557,15 +1575,8 @@
- #if defined(FEAT_GUI) && defined(FEAT_VERTSPLIT)
-     /* When 'guioptions' includes 'L' or 'R' may have to remove or add
-      * scrollbars.  Have to update them anyway. */
--    if (gui.in_use)
--    {
--	out_flush();
--	gui_init_which_components(NULL);
--	gui_update_scrollbars(TRUE);
--    }
--    need_mouse_correct = TRUE;
-+    gui_may_update_scrollbars();
- #endif
--
- }
- 
- /*
-@@ -2040,13 +2051,40 @@
- }
- 
- /*
-- * Return TRUE if the current window is the only window that exists.
-+ * Return TRUE if the current window is the only window that exists (ignoring
-+ * "aucmd_win").
-  * Returns FALSE if there is a window, possibly in another tab page.
-  */
-     static int
- last_window()
- {
--    return (lastwin == firstwin && first_tabpage->tp_next == NULL);
-+    return (one_window() && first_tabpage->tp_next == NULL);
-+}
-+
-+/*
-+ * Return TRUE if there is only one window other than "aucmd_win" in the
-+ * current tab page.
-+ */
-+    static int
-+one_window()
-+{
-+#ifdef FEAT_AUTOCMD
-+    win_T	*wp;
-+    int		seen_one = FALSE;
-+
-+    FOR_ALL_WINDOWS(wp)
-+    {
-+	if (wp != aucmd_win)
-+	{
-+	    if (seen_one)
-+		return FALSE;
-+	    seen_one = TRUE;
-+	}
-+    }
-+    return TRUE;
-+#else
-+    return firstwin == lastwin;
-+#endif
- }
- 
- /*
-@@ -2075,6 +2113,19 @@
- 	return;
-     }
- 
-+#ifdef FEAT_AUTOCMD
-+    if (win == aucmd_win)
-+    {
-+	EMSG(_("E813: Cannot close autocmd window"));
-+	return;
-+    }
-+    if ((firstwin == aucmd_win || lastwin == aucmd_win) && one_window())
-+    {
-+	EMSG(_("E814: Cannot close window, only autocmd window would remain"));
-+	return;
-+    }
-+#endif
-+
-     /*
-      * When closing the last window in a tab page first go to another tab
-      * page and then close the window and the tab page.  This avoids that
-@@ -2104,7 +2155,7 @@
-     if (win->w_buffer->b_help)
- 	help_window = TRUE;
-     else
--	clear_snapshot(curtab);
-+	clear_snapshot(curtab, SNAP_HELP_IDX);
- 
- #ifdef FEAT_AUTOCMD
-     if (win == curwin)
-@@ -2221,7 +2272,7 @@
-     /* After closing the help window, try restoring the window layout from
-      * before it was opened. */
-     if (help_window)
--	restore_snapshot(close_curwin);
-+	restore_snapshot(SNAP_HELP_IDX, close_curwin);
- 
- #if defined(FEAT_GUI) && defined(FEAT_VERTSPLIT)
-     /* When 'guioptions' includes 'L' or 'R' may have to remove scrollbars. */
-@@ -2302,13 +2353,6 @@
-     frame_T	*frp;
-     win_T	*wp;
- 
--#ifdef FEAT_FOLDING
--    clearFolding(win);
--#endif
--
--    /* reduce the reference count to the argument list. */
--    alist_unlink(win->w_alist);
--
-     /* Remove the window and its frame from the tree of frames. */
-     frp = win->w_frame;
-     wp = winframe_remove(win, dirp, tp);
-@@ -2334,6 +2378,14 @@
- 	tabpage_close(TRUE);
- # endif
- 
-+# ifdef FEAT_AUTOCMD
-+    if (aucmd_win != NULL)
-+    {
-+	(void)win_free_mem(aucmd_win, &dummy, NULL);
-+	aucmd_win = NULL;
-+    }
-+# endif
-+
-     while (firstwin != NULL)
- 	(void)win_free_mem(firstwin, &dummy, NULL);
- }
-@@ -2343,11 +2395,10 @@
-  * Remove a window and its frame from the tree of frames.
-  * Returns a pointer to the window that got the freed up space.
-  */
--/*ARGSUSED*/
--    static win_T *
-+    win_T *
- winframe_remove(win, dirp, tp)
-     win_T	*win;
--    int		*dirp;		/* set to 'v' or 'h' for direction if 'ea' */
-+    int		*dirp UNUSED;	/* set to 'v' or 'h' for direction if 'ea' */
-     tabpage_T	*tp;		/* tab page "win" is in, NULL for current */
- {
-     frame_T	*frp, *frp2, *frp3;
-@@ -3083,7 +3134,7 @@
-     win_T	*nextwp;
-     int		r;
- 
--    if (lastwin == firstwin)
-+    if (one_window())
-     {
- 	if (message
- #ifdef FEAT_AUTOCMD
-@@ -3145,27 +3196,34 @@
-     void
- curwin_init()
- {
--    redraw_win_later(curwin, NOT_VALID);
--    curwin->w_lines_valid = 0;
--    curwin->w_cursor.lnum = 1;
--    curwin->w_curswant = curwin->w_cursor.col = 0;
-+    win_init_empty(curwin);
-+}
-+
-+    void
-+win_init_empty(wp)
-+    win_T *wp;
-+{
-+    redraw_win_later(wp, NOT_VALID);
-+    wp->w_lines_valid = 0;
-+    wp->w_cursor.lnum = 1;
-+    wp->w_curswant = wp->w_cursor.col = 0;
- #ifdef FEAT_VIRTUALEDIT
--    curwin->w_cursor.coladd = 0;
-+    wp->w_cursor.coladd = 0;
- #endif
--    curwin->w_pcmark.lnum = 1;	/* pcmark not cleared but set to line 1 */
--    curwin->w_pcmark.col = 0;
--    curwin->w_prev_pcmark.lnum = 0;
--    curwin->w_prev_pcmark.col = 0;
--    curwin->w_topline = 1;
-+    wp->w_pcmark.lnum = 1;	/* pcmark not cleared but set to line 1 */
-+    wp->w_pcmark.col = 0;
-+    wp->w_prev_pcmark.lnum = 0;
-+    wp->w_prev_pcmark.col = 0;
-+    wp->w_topline = 1;
- #ifdef FEAT_DIFF
--    curwin->w_topfill = 0;
-+    wp->w_topfill = 0;
- #endif
--    curwin->w_botline = 2;
-+    wp->w_botline = 2;
- #ifdef FEAT_FKMAP
--    if (curwin->w_p_rl)
--	curwin->w_farsi = W_CONV + W_R_L;
-+    if (wp->w_p_rl)
-+	wp->w_farsi = W_CONV + W_R_L;
-     else
--	curwin->w_farsi = W_CONV;
-+	wp->w_farsi = W_CONV;
- #endif
- }
- 
-@@ -3187,9 +3245,30 @@
-     first_tabpage->tp_topframe = topframe;
-     curtab = first_tabpage;
- #endif
-+
-     return OK;
- }
- 
-+#if defined(FEAT_AUTOCMD) || defined(PROTO)
-+/*
-+ * Init "aucmd_win".  This can only be done after the first
-+ * window is fully initialized, thus it can't be in win_alloc_first().
-+ */
-+    void
-+win_alloc_aucmd_win()
-+{
-+    aucmd_win = win_alloc(NULL, TRUE);
-+    if (aucmd_win != NULL)
-+    {
-+	win_init_some(aucmd_win, curwin);
-+# ifdef FEAT_SCROLLBIND
-+	aucmd_win->w_p_scb = FALSE;
-+# endif
-+	new_frame(aucmd_win);
-+    }
-+}
-+#endif
-+
- /*
-  * Allocate the first window or the first window in a new tab page.
-  * When "oldwin" is NULL create an empty buffer for it.
-@@ -3201,7 +3280,7 @@
- win_alloc_firstwin(oldwin)
-     win_T	*oldwin;
- {
--    curwin = win_alloc(NULL);
-+    curwin = win_alloc(NULL, FALSE);
-     if (oldwin == NULL)
-     {
- 	/* Very first window, need to create an empty buffer for it and
-@@ -3220,7 +3299,7 @@
-     else
-     {
- 	/* First window in new tab page, initialize it from "oldwin". */
--	win_init(curwin, oldwin);
-+	win_init(curwin, oldwin, 0);
- 
- # ifdef FEAT_SCROLLBIND
- 	/* We don't want scroll-binding in the first window. */
-@@ -3229,21 +3308,36 @@
-     }
- #endif
- 
--    topframe = (frame_T *)alloc_clear((unsigned)sizeof(frame_T));
--    if (topframe == NULL)
-+    new_frame(curwin);
-+    if (curwin->w_frame == NULL)
- 	return FAIL;
--    topframe->fr_layout = FR_LEAF;
-+    topframe = curwin->w_frame;
- #ifdef FEAT_VERTSPLIT
-     topframe->fr_width = Columns;
- #endif
-     topframe->fr_height = Rows - p_ch;
-     topframe->fr_win = curwin;
--    curwin->w_frame = topframe;
- 
-     return OK;
- }
- 
- /*
-+ * Create a frame for window "wp".
-+ */
-+    static void
-+new_frame(win_T *wp)
-+{
-+    frame_T *frp = (frame_T *)alloc_clear((unsigned)sizeof(frame_T));
-+
-+    wp->w_frame = frp;
-+    if (frp != NULL)
-+    {
-+	frp->fr_layout = FR_LEAF;
-+	frp->fr_win = wp;
-+    }
-+}
-+
-+/*
-  * Initialize the window and frame size to the maximum.
-  */
-     void
-@@ -3293,10 +3387,13 @@
- free_tabpage(tp)
-     tabpage_T	*tp;
- {
-+    int idx;
-+
- # ifdef FEAT_DIFF
-     diff_clear(tp);
- # endif
--    clear_snapshot(tp);
-+    for (idx = 0; idx < SNAP_COUNT; ++idx)
-+	clear_snapshot(tp, idx);
- #ifdef FEAT_EVAL
-     vars_clear(&tp->tp_vars.dv_hashtab);	/* free all t: variables */
- #endif
-@@ -3363,12 +3460,7 @@
- #if defined(FEAT_GUI)
- 	/* When 'guioptions' includes 'L' or 'R' may have to remove or add
- 	 * scrollbars.  Have to update them anyway. */
--	if (gui.in_use && starting == 0)
--	{
--	    gui_init_which_components(NULL);
--	    gui_update_scrollbars(TRUE);
--	}
--	need_mouse_correct = TRUE;
-+	gui_may_update_scrollbars();
- #endif
- 
- 	redraw_all_later(CLEAR);
-@@ -3490,10 +3582,9 @@
-  * FAIL.
-  * Careful: When OK is returned need to get a new tab page very very soon!
-  */
--/*ARGSUSED*/
-     static int
- leave_tabpage(new_curbuf)
--    buf_T	*new_curbuf;	    /* what is going to be the new curbuf,
-+    buf_T	*new_curbuf UNUSED;    /* what is going to be the new curbuf,
- 				       NULL if unknown */
- {
-     tabpage_T	*tp = curtab;
-@@ -3535,11 +3626,10 @@
-  * Start using tab page "tp".
-  * Only to be used after leave_tabpage() or freeing the current tab page.
-  */
--/*ARGSUSED*/
-     static void
- enter_tabpage(tp, old_curbuf)
-     tabpage_T	*tp;
--    buf_T	*old_curbuf;
-+    buf_T	*old_curbuf UNUSED;
- {
-     int		old_off = tp->tp_firstwin->w_winrow;
-     win_T	*next_prevwin = tp->tp_prevwin;
-@@ -3588,12 +3678,7 @@
- #if defined(FEAT_GUI)
-     /* When 'guioptions' includes 'L' or 'R' may have to remove or add
-      * scrollbars.  Have to update them anyway. */
--    if (gui.in_use && starting == 0)
--    {
--	gui_init_which_components(NULL);
--	gui_update_scrollbars(TRUE);
--    }
--    need_mouse_correct = TRUE;
-+    gui_may_update_scrollbars();
- #endif
- 
-     redraw_all_later(CLEAR);
-@@ -4028,14 +4113,14 @@
- 	    if (mch_dirname(cwd, MAXPATHL) == OK)
- 		globaldir = vim_strsave(cwd);
- 	}
--	mch_chdir((char *)curwin->w_localdir);
--	shorten_fnames(TRUE);
-+	if (mch_chdir((char *)curwin->w_localdir) == 0)
-+	    shorten_fnames(TRUE);
-     }
-     else if (globaldir != NULL)
-     {
- 	/* Window doesn't have a local directory and we are not in the global
- 	 * directory: Change to the global directory. */
--	mch_chdir((char *)globaldir);
-+	ignored = mch_chdir((char *)globaldir);
- 	vim_free(globaldir);
- 	globaldir = NULL;
- 	shorten_fnames(TRUE);
-@@ -4145,12 +4230,13 @@
- #endif
- 
- /*
-- * allocate a window structure and link it in the window list
-+ * Allocate a window structure and link it in the window list when "hidden" is
-+ * FALSE.
-  */
--/*ARGSUSED*/
-     static win_T *
--win_alloc(after)
--    win_T	*after;
-+win_alloc(after, hidden)
-+    win_T	*after UNUSED;
-+    int		hidden UNUSED;
- {
-     win_T	*newwin;
- 
-@@ -4176,7 +4262,8 @@
- 	 * link the window in the window list
- 	 */
- #ifdef FEAT_WINDOWS
--	win_append(after, newwin);
-+	if (!hidden)
-+	    win_append(after, newwin);
- #endif
- #ifdef FEAT_VERTSPLIT
- 	newwin->w_wincol = 0;
-@@ -4237,6 +4324,13 @@
- {
-     int		i;
- 
-+#ifdef FEAT_FOLDING
-+    clearFolding(wp);
-+#endif
-+
-+    /* reduce the reference count to the argument list. */
-+    alist_unlink(wp->w_alist);
-+
- #ifdef FEAT_AUTOCMD
-     /* Don't execute autocommands while the window is halfway being deleted.
-      * gui_mch_destroy_scrollbar() may trigger a FocusGained event. */
-@@ -4299,7 +4393,10 @@
-     }
- #endif /* FEAT_GUI */
- 
--    win_remove(wp, tp);
-+#ifdef FEAT_AUTOCMD
-+    if (wp != aucmd_win)
-+#endif
-+	win_remove(wp, tp);
-     vim_free(wp);
- 
- #ifdef FEAT_AUTOCMD
-@@ -4310,7 +4407,7 @@
- /*
-  * Append window "wp" in the window list after window "after".
-  */
--    static void
-+    void
- win_append(after, wp)
-     win_T	*after, *wp;
- {
-@@ -4336,7 +4433,7 @@
- /*
-  * Remove a window from the window list.
-  */
--    static void
-+    void
- win_remove(wp, tp)
-     win_T	*wp;
-     tabpage_T	*tp;		/* tab page "win" is in, NULL for current */
-@@ -6036,6 +6133,7 @@
- /*
-  * Return TRUE if there is only one window (in the current tab page), not
-  * counting a help or preview window, unless it is the current window.
-+ * Does not count "aucmd_win".
-  */
-     int
- only_one_window()
-@@ -6049,11 +6147,15 @@
- 	return FALSE;
- 
-     for (wp = firstwin; wp != NULL; wp = wp->w_next)
--	if (!((wp->w_buffer->b_help && !curbuf->b_help)
-+	if ((!((wp->w_buffer->b_help && !curbuf->b_help)
- # ifdef FEAT_QUICKFIX
- 		    || wp->w_p_pvw
- # endif
- 	     ) || wp == curwin)
-+# ifdef FEAT_AUTOCMD
-+		&& wp != aucmd_win
-+# endif
-+	   )
- 	    ++count;
-     return (count <= 1);
- #else
-@@ -6108,11 +6210,12 @@
- /*
-  * Create a snapshot of the current frame sizes.
-  */
--    static void
--make_snapshot()
-+    void
-+make_snapshot(idx)
-+    int idx;
- {
--    clear_snapshot(curtab);
--    make_snapshot_rec(topframe, &curtab->tp_snapshot);
-+    clear_snapshot(curtab, idx);
-+    make_snapshot_rec(topframe, &curtab->tp_snapshot[idx]);
- }
- 
-     static void
-@@ -6140,11 +6243,12 @@
-  * Remove any existing snapshot.
-  */
-     static void
--clear_snapshot(tp)
-+clear_snapshot(tp, idx)
-     tabpage_T	*tp;
-+    int		idx;
- {
--    clear_snapshot_rec(tp->tp_snapshot);
--    tp->tp_snapshot = NULL;
-+    clear_snapshot_rec(tp->tp_snapshot[idx]);
-+    tp->tp_snapshot[idx] = NULL;
- }
- 
-     static void
-@@ -6164,26 +6268,27 @@
-  * This is only done if the screen size didn't change and the window layout is
-  * still the same.
-  */
--    static void
--restore_snapshot(close_curwin)
-+    void
-+restore_snapshot(idx, close_curwin)
-+    int		idx;
-     int		close_curwin;	    /* closing current window */
- {
-     win_T	*wp;
- 
--    if (curtab->tp_snapshot != NULL
-+    if (curtab->tp_snapshot[idx] != NULL
- # ifdef FEAT_VERTSPLIT
--	    && curtab->tp_snapshot->fr_width == topframe->fr_width
-+	    && curtab->tp_snapshot[idx]->fr_width == topframe->fr_width
- # endif
--	    && curtab->tp_snapshot->fr_height == topframe->fr_height
--	    && check_snapshot_rec(curtab->tp_snapshot, topframe) == OK)
-+	    && curtab->tp_snapshot[idx]->fr_height == topframe->fr_height
-+	    && check_snapshot_rec(curtab->tp_snapshot[idx], topframe) == OK)
-     {
--	wp = restore_snapshot_rec(curtab->tp_snapshot, topframe);
-+	wp = restore_snapshot_rec(curtab->tp_snapshot[idx], topframe);
- 	win_comp_pos();
- 	if (wp != NULL && close_curwin)
- 	    win_goto(wp);
- 	redraw_all_later(CLEAR);
-     }
--    clear_snapshot(curtab);
-+    clear_snapshot(curtab, idx);
- }
- 
- /*
-diff -Naur vim72.orig/src/workshop.c vim72/src/workshop.c
---- vim72.orig/src/workshop.c	2008-06-21 11:53:26.000000000 -0700
-+++ vim72/src/workshop.c	2009-07-19 15:16:46.000000000 -0700
-@@ -204,12 +204,11 @@
-  * Function:
-  *	Load a given file into the WorkShop buffer.
-  */
--/*ARGSUSED*/
-     void
- workshop_load_file(
- 	char	*filename,		/* the file to load */
- 	int	 line,			/* an optional line number (or 0) */
--	char	*frameid)		/* used for multi-frame support */
-+	char	*frameid UNUSED)	/* used for multi-frame support */
- {
- #ifdef WSDEBUG_TRACE
-     if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
-@@ -263,10 +262,9 @@
-     load_window(filename, lineno);
- }
- 
--/*ARGSUSED*/
-     void
- workshop_front_file(
--	char	*filename)
-+	char	*filename UNUSED)
- {
- #ifdef WSDEBUG_TRACE
-     if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
-@@ -538,9 +536,8 @@
-  * breakpoints have moved when a program has been recompiled and
-  * reloaded into dbx.
-  */
--/*ARGSUSED*/
-     void
--workshop_moved_marks(char *filename)
-+workshop_moved_marks(char *filename UNUSED)
- {
- #ifdef WSDEBUG_TRACE
-     if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
-@@ -575,11 +572,10 @@
-     return (int)h;
- }
- 
--/*ARGSUSED*/
-     void
- workshop_footer_message(
--	char		*message,
--	int		 severity)	/* severity is currently unused */
-+	char	*message,
-+	int	severity UNUSED)	/* severity is currently unused */
- {
- #ifdef WSDEBUG_TRACE
-     if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
-@@ -687,15 +683,14 @@
-  * command. The globals curMenuName and curMenuPriority contain the name and
-  * priority of the parent menu tree.
-  */
--/*ARGSUSED*/
-     void
- workshop_menu_item(
- 	char		*label,
- 	char		*verb,
--	char		*accelerator,
-+	char		*accelerator UNUSED,
- 	char		*acceleratorText,
--	char		*name,
--	char		*filepos,
-+	char		*name UNUSED,
-+	char		*filepos UNUSED,
- 	char		*sensitive)
- {
-     char		 cbuf[BUFSIZ];
-@@ -810,13 +805,12 @@
-     workshopInitDone = True;
- }
- 
--/*ARGSUSED*/
-     void
- workshop_toolbar_button(
- 	char	*label,
- 	char	*verb,
--	char	*senseVerb,
--	char	*filepos,
-+	char	*senseVerb UNUSED,
-+	char	*filepos UNUSED,
- 	char	*help,
- 	char	*sense,
- 	char	*file,
-@@ -968,7 +962,9 @@
- 	    if (strcmp(option, "syntax") == 0)
- 		vim_snprintf(cbuf, sizeof(cbuf), "syntax %s", value);
- 	    else if (strcmp(option, "savefiles") == 0)
--		; /* XXX - Not yet implemented */
-+	    {
-+		/* XXX - Not yet implemented */
-+	    }
- 	    break;
- 
- 	case 'l':
-@@ -1098,10 +1094,9 @@
- /*
-  * A button in the toolbar has been pushed.
-  */
--/*ARGSUSED*/
-     int
- workshop_get_positions(
--	void		*clientData,	/* unused */
-+	void		*clientData UNUSED,
- 	char	       **filename,	/* output data */
- 	int		*curLine,	/* output data */
- 	int		*curCol,	/* output data */
-@@ -1121,8 +1116,12 @@
- 				      ? (char *)curbuf->b_sfname : "<None>");
- #endif
- 
--    strcpy(ffname, (char *) curbuf->b_ffname);
--    *filename = ffname;		/* copy so nobody can change b_ffname */
-+    if (curbuf->b_ffname == NULL)
-+	ffname[0] = NUL;
-+    else
-+	/* copy so nobody can change b_ffname */
-+	strcpy(ffname, (char *) curbuf->b_ffname);
-+    *filename = ffname;
-     *curLine = curwin->w_cursor.lnum;
-     *curCol = curwin->w_cursor.col;
- 
-@@ -1522,9 +1521,8 @@
- 	return NULL;
- }
- 
--/*ARGSUSED*/
-     void
--workshop_save_sensitivity(char *filename)
-+workshop_save_sensitivity(char *filename UNUSED)
- {
- }
- 
-diff -Naur vim72.orig/src/xxd/xxd.c vim72/src/xxd/xxd.c
---- vim72.orig/src/xxd/xxd.c	2007-11-29 12:05:16.000000000 -0800
-+++ vim72/src/xxd/xxd.c	2009-07-19 15:17:54.000000000 -0700
-@@ -64,6 +64,9 @@
- # define _CRT_SECURE_NO_DEPRECATE
- # define _CRT_NONSTDC_NO_DEPRECATE
- #endif
-+#if !defined(CYGWIN) && (defined(CYGWIN32) || defined(__CYGWIN__) || defined(__CYGWIN32__))
-+# define CYGWIN
-+#endif
- 
- #include <stdio.h>
- #ifdef VAXC
-@@ -77,7 +80,8 @@
- #if !defined(OS2) && defined(__EMX__)
- # define OS2
- #endif
--#if defined(MSDOS) || defined(WIN32) || defined(OS2) || defined(__BORLANDC__)
-+#if defined(MSDOS) || defined(WIN32) || defined(OS2) || defined(__BORLANDC__) \
-+  || defined(CYGWIN)
- # include <io.h>	/* for setmode() */
- #else
- # ifdef UNIX
-@@ -150,9 +154,6 @@
- # endif
- #endif
- 
--#if !defined(CYGWIN) && (defined(CYGWIN32) || defined(__CYGWIN__) || defined(__CYGWIN32__))
--# define CYGWIN
--#endif
- #if defined(MSDOS) || defined(WIN32) || defined(OS2)
- # define BIN_READ(yes)  ((yes) ? "rb" : "rt")
- # define BIN_WRITE(yes) ((yes) ? "wb" : "wt")
Index: tches/zlib-1.2.3-fPIC-2.patch
===================================================================
--- patches/zlib-1.2.3-fPIC-2.patch	(revision 4fc026ef671b8cdd8c60814e135dc362072ac718)
+++ 	(revision )
@@ -1,112 +1,0 @@
-Submitted By: Jim Gifford  <jim at cross-lfs dot org>
-Originally Submitted By: Tushar Teredesai <tushar@linuxfromscratch.org>
-Date: 2009-05-7
-Initial Package Version: 1.2.2
-Origin: Gentoo ebuild?
-Upstream Status: Not submitted
-Description:
- 1. Build shared and static lib in one pass
- 2. Always add -fPIC when building shared lib, don't expect the user to set it.
-
-To build the shared and static library:
-	./configure --prefix=<prefix> --shared &&
-	make &&
-	make install
-Remove the --shared if you don't want the shared lib.
-
-diff -Naur zlib-1.2.3.orig/configure zlib-1.2.3/configure
---- zlib-1.2.3.orig/configure	2005-07-11 13:11:57.000000000 -0700
-+++ zlib-1.2.3/configure	2009-05-07 12:09:31.000000000 -0700
-@@ -23,7 +23,7 @@
- VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`
- VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h`
- VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h`
--AR=${AR-"ar rc"}
-+AR=${AR-"ar"}
- RANLIB=${RANLIB-"ranlib"}
- prefix=${prefix-/usr/local}
- exec_prefix=${exec_prefix-'${prefix}'}
-@@ -73,7 +73,11 @@
- 
- if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then
-   CC="$cc"
--  SFLAGS=${CFLAGS-"-fPIC -O3"}
-+  #SFLAGS=${CFLAGS-"-fPIC -O3"}
-+  # the above is horribly wrong on a few archs where -fPIC should ALWAYS be
-+  # used in the creation of shared libraries. without the following, the
-+  # shared lib test will sometimes fail even when shared libs -can- be created.
-+  SFLAGS="${CFLAGS-"-O3"} -fPIC"
-   CFLAGS="$cflags"
-   case `(uname -s || echo unknown) 2>/dev/null` in
-   Linux | linux | GNU | GNU/*) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1"};;
-@@ -174,7 +178,7 @@
-   if test "`($CC -c $SFLAGS $test.c) 2>&1`" = "" &&
-      test "`($LDSHARED -o $test$shared_ext $test.o) 2>&1`" = ""; then
-     CFLAGS="$SFLAGS"
--    LIBS="$SHAREDLIBV"
-+    LIBS="$LIBS $SHAREDLIBV"
-     echo Building shared library $SHAREDLIBV with $CC.
-   elif test -z "$old_cc" -a -z "$old_cflags"; then
-     echo No shared library support.
-diff -Naur zlib-1.2.3.orig/Makefile.in zlib-1.2.3/Makefile.in
---- zlib-1.2.3.orig/Makefile.in	2005-07-17 19:25:21.000000000 -0700
-+++ zlib-1.2.3/Makefile.in	2009-05-07 12:10:15.000000000 -0700
-@@ -49,6 +49,8 @@
- OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
-        zutil.o inflate.o infback.o inftrees.o inffast.o
- 
-+PIC_OBJS = $(OBJS:%.o=%.lo)
-+
- OBJA =
- # to use the asm code: make OBJA=match.o
- 
-@@ -68,7 +70,7 @@
- 	fi
- 
- libz.a: $(OBJS) $(OBJA)
--	$(AR) $@ $(OBJS) $(OBJA)
-+	$(AR) rc $@ $(OBJS) $(OBJA)
- 	-@ ($(RANLIB) $@ || true) >/dev/null 2>&1
- 
- match.o: match.S
-@@ -77,8 +79,11 @@
- 	mv _match.o match.o
- 	rm -f _match.s
- 
--$(SHAREDLIBV): $(OBJS)
--	$(LDSHARED) -o $@ $(OBJS)
-+%.lo: %.c
-+	$(CC) $(CFLAGS) -DPIC -fPIC -c $< -o $@
-+
-+$(SHAREDLIBV): $(PIC_OBJS)
-+	$(LDSHARED) -o $@ $(PIC_OBJS) -lc
- 	rm -f $(SHAREDLIB) $(SHAREDLIBM)
- 	ln -s $@ $(SHAREDLIB)
- 	ln -s $@ $(SHAREDLIBM)
-@@ -89,13 +94,10 @@
- minigzip$(EXE): minigzip.o $(LIBS)
- 	$(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
- 
--install: $(LIBS)
-+install-libs: $(LIBS)
- 	-@if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi
--	-@if [ ! -d $(includedir)  ]; then mkdir -p $(includedir); fi
- 	-@if [ ! -d $(libdir)      ]; then mkdir -p $(libdir); fi
- 	-@if [ ! -d $(man3dir)     ]; then mkdir -p $(man3dir); fi
--	cp zlib.h zconf.h $(includedir)
--	chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h
- 	cp $(LIBS) $(libdir)
- 	cd $(libdir); chmod 755 $(LIBS)
- 	-@(cd $(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
-@@ -110,6 +112,11 @@
- # The ranlib in install is needed on NeXTSTEP which checks file times
- # ldconfig is for Linux
- 
-+install: install-libs
-+	-@if [ ! -d $(includedir)  ]; then mkdir $(includedir); fi
-+	cp zlib.h zconf.h $(includedir)
-+	chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h
-+
- uninstall:
- 	cd $(includedir); \
- 	cd $(libdir); rm -f libz.a; \
