summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2013-09-26 23:06:02 +0000
committer <>2015-02-03 11:56:22 +0000
commite0b511b834f3529395df67126a7314097c2cf97e (patch)
tree89945ae53183ab2acdc61659c8b0b3e57e4a1f3a /util
parent2d8ae7b161658c4a589172db0072fc99f76fa979 (diff)
downloadtexinfo-tarball-e0b511b834f3529395df67126a7314097c2cf97e.tar.gz
Imported from /home/lorry/working-area/delta_texinfo-tarball/texinfo-5.2.tar.xz.HEADtexinfo-5.2master
Diffstat (limited to 'util')
-rw-r--r--util/Makefile.am70
-rw-r--r--util/Makefile.in1115
-rw-r--r--util/README26
-rw-r--r--util/deref.c208
-rwxr-xr-xutil/detexinfo18
-rw-r--r--util/dir-example369
-rwxr-xr-xutil/fix-info-dir317
-rwxr-xr-xutil/fixfonts84
-rw-r--r--util/fixref.gawk143
-rw-r--r--util/gdoc914
-rwxr-xr-xutil/gen-dir-node212
-rwxr-xr-xutil/gendocs.sh423
-rw-r--r--util/gendocs_template49
-rw-r--r--util/htmlxref.cnf604
-rwxr-xr-xutil/infosrch104
-rw-r--r--util/install-info-html157
-rwxr-xr-xutil/makeinfo.bat2
-rw-r--r--util/outline.gawk144
-rwxr-xr-xutil/pdftexi2dvi21
-rwxr-xr-xutil/pod2texi.bat2
-rw-r--r--util/prepinfo.awk355
-rw-r--r--util/tests/Makefile.am11
-rw-r--r--util/tests/README17
-rwxr-xr-xutil/tests/automtest.sh59
-rwxr-xr-xutil/tests/bibtex.test (renamed from util/bibtex.test)0
-rw-r--r--util/tests/defs.in (renamed from util/defs.in)0
-rwxr-xr-xutil/tests/dvipdf.test (renamed from util/dvipdf.test)0
-rwxr-xr-xutil/tests/latex2html.test (renamed from util/latex2html.test)0
-rwxr-xr-xutil/tests/local.test (renamed from util/local.test)0
-rwxr-xr-xutil/tests/texi2dvi.test (renamed from util/texi2dvi.test)0
-rwxr-xr-xutil/tests/txitextest (renamed from util/txitextest)25
-rwxr-xr-xutil/tex3patch70
-rw-r--r--util/texi-docstring-magic.el347
-rwxr-xr-xutil/texi-elements-by-size237
-rwxr-xr-xutil/texi2any.bat2
-rwxr-xr-xutil/texi2dvi747
-rwxr-xr-xutil/texi2html29
-rwxr-xr-xutil/texi2pdf21
-rw-r--r--util/texindex.c64
-rw-r--r--util/texinfo.dtd1377
-rw-r--r--util/texinfo.xsl242
-rwxr-xr-xutil/txixml2texi.pl452
42 files changed, 4549 insertions, 4488 deletions
diff --git a/util/Makefile.am b/util/Makefile.am
index fec2df9..6d960d4 100644
--- a/util/Makefile.am
+++ b/util/Makefile.am
@@ -1,7 +1,10 @@
-# $Id: Makefile.am,v 1.34 2008/03/25 10:51:20 akim Exp $
+# $Id: Makefile.am 5191 2013-02-23 00:11:18Z karl $
# Makefile.am for texinfo/util.
# Run automake in .. to produce Makefile.in from this.
#
+# Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
+# Free Software Foundation, Inc.
+#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
@@ -12,51 +15,54 @@
bin_PROGRAMS = texindex
bin_SCRIPTS = texi2dvi texi2pdf pdftexi2dvi
+nodist_noinst_SCRIPTS = txixml2texi
+
+w32_bat = makeinfo.bat pod2texi.bat texi2any.bat
+if HOST_IS_WINDOWS
+ bin_SCRIPTS += $(w32_bat)
+endif
# for auctex.
pdftexi2dvi: texi2pdf
cp -f $(srcdir)/texi2pdf $@
+txixml2texi: txixml2texi.pl Makefile
+ sed -e 's,[@]datadir[@],$(datadir),g' \
+ -e 's,[@]PACKAGE[@],$(PACKAGE),g' \
+ -e 's,[@]USE_EXTERNAL_LIBINTL[@],$(USE_EXTERNAL_LIBINTL),g' \
+ -e 's,[@]USE_EXTERNAL_EASTASIANWIDTH[@],$(USE_EXTERNAL_EASTASIANWIDTH),g' \
+ -e 's,[@]USE_EXTERNAL_UNIDECODE[@],$(USE_EXTERNAL_UNIDECODE),g' \
+ -e '1 s,/usr/bin/env perl,$(PERL),g' \
+ $(srcdir)/txixml2texi.pl >$@
+ chmod a+x $@
+
localedir = $(datadir)/locale
AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/gnulib/lib \
-I$(top_builddir)/gnulib/lib \
-DLOCALEDIR=\"$(localedir)\"
-LDADD = ../lib/libtxi.a $(top_builddir)/gnulib/lib/libgnu.a $(LIBINTL)
+LDADD = $(top_builddir)/gnulib/lib/libgnu.a $(LIBINTL)
-dist_pkgdata_DATA = texinfo.dtd texinfo.xsl
-pkgdata_DATA = texinfo.cat
+dist_pkgdata_DATA = htmlxref.cnf texinfo.dtd #texinfo.cat
-# we don't actually use version.texi in the rule, but it's one way of
-# noticing when the version changes.
-texinfo.cat: texinfo-cat.in $(top_srcdir)/doc/version.texi
- sed 's/__VERSION__/@VERSION@/g' $(srcdir)/texinfo-cat.in >$@
+# This fails distcheck:
+#texinfo.cat: texinfo-cat.in Makefile
+# sed 's/__VERSION__/$(TEXINFO_DTD_VERSION)/g' $(srcdir)/texinfo-cat.in >$@
+# used to be:
+#texinfo.cat: texinfo-cat.in $(top_srcdir)/doc/version.texi
+# sed 's/__VERSION__/@VERSION@/g' $(srcdir)/texinfo-cat.in >$@
+# Let's try just getting rid of it; not aware of its being used.
# Most of these are for fun. The only official/installed ones are the
# *texi2* scripts.
#
-EXTRA_DIST = README deref.c dir-example fix-info-dir fixfonts \
- fixref.gawk gdoc gen-dir-node gendocs.sh gendocs_template infosrch \
- install-info-html outline.gawk pdftexi2dvi \
- prepinfo.awk tex3patch texi-docstring-magic.el texi2dvi texi2pdf txitextest \
- $(dist_pkgdata_DATA) texinfo-cat.in
-CLEANFILES = $(pkgdata_DATA)
-
-
-# Let's not stress people's TeX installations, etc.
-if MAINTAINER_MODE
-TESTS = \
-bibtex.test \
-dvipdf.test \
-latex2html.test \
-local.test \
-texi2dvi.test
-
-EXTRA_DIST += $(TESTS)
-
-# Each test case depends on defs.
-check_SCRIPTS = defs
-distclean-local:
- -rm -rf testSubDir
-endif
+EXTRA_DIST = README detexinfo dir-example \
+ gendocs.sh gendocs_template \
+ pdftexi2dvi \
+ texi2dvi texi2pdf \
+ $(dist_pkgdata_DATA) texinfo-cat.in texi-elements-by-size \
+ texi2html txixml2texi.pl $(w32_bat) \
+ tests
+
+DISTCLEANFILES = txixml2texi
diff --git a/util/Makefile.in b/util/Makefile.in
index fd17739..8e34ff6 100644
--- a/util/Makefile.in
+++ b/util/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# Makefile.in generated by automake 1.14 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
# This Makefile.in 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.
@@ -14,10 +14,13 @@
@SET_MAKE@
-# $Id: Makefile.am,v 1.34 2008/03/25 10:51:20 akim Exp $
+# $Id: Makefile.am 5191 2013-02-23 00:11:18Z karl $
# Makefile.am for texinfo/util.
# Run automake in .. to produce Makefile.in from this.
#
+# Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
+# Free Software Foundation, Inc.
+#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
@@ -29,9 +32,54 @@
VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
@@ -47,19 +95,24 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
bin_PROGRAMS = texindex$(EXEEXT)
-@MAINTAINER_MODE_TRUE@am__append_1 = $(TESTS)
+@HOST_IS_WINDOWS_TRUE@am__append_1 = $(w32_bat)
subdir = util
-DIST_COMMON = README $(dist_pkgdata_DATA) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(srcdir)/defs.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/build-aux/depcomp $(dist_pkgdata_DATA) README
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/alloca.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.m4 \
+ $(top_srcdir)/gnulib/m4/alloca.m4 \
$(top_srcdir)/gnulib/m4/argz.m4 \
+ $(top_srcdir)/gnulib/m4/btowc.m4 \
$(top_srcdir)/gnulib/m4/codeset.m4 \
+ $(top_srcdir)/gnulib/m4/configmake.m4 \
$(top_srcdir)/gnulib/m4/eealloc.m4 \
- $(top_srcdir)/gnulib/m4/environ.m4 \
+ $(top_srcdir)/gnulib/m4/errno_h.m4 \
$(top_srcdir)/gnulib/m4/error.m4 \
- $(top_srcdir)/gnulib/m4/exitfail.m4 \
$(top_srcdir)/gnulib/m4/extensions.m4 \
+ $(top_srcdir)/gnulib/m4/extern-inline.m4 \
+ $(top_srcdir)/gnulib/m4/fcntl-o.m4 \
+ $(top_srcdir)/gnulib/m4/fcntl_h.m4 \
$(top_srcdir)/gnulib/m4/getopt.m4 \
$(top_srcdir)/gnulib/m4/gettext.m4 \
$(top_srcdir)/gnulib/m4/gettimeofday.m4 \
@@ -68,38 +121,55 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/alloca.m4 \
$(top_srcdir)/gnulib/m4/gnulib-comp.m4 \
$(top_srcdir)/gnulib/m4/iconv.m4 \
$(top_srcdir)/gnulib/m4/include_next.m4 \
- $(top_srcdir)/gnulib/m4/inline.m4 \
$(top_srcdir)/gnulib/m4/intlmacosx.m4 \
+ $(top_srcdir)/gnulib/m4/iswblank.m4 \
+ $(top_srcdir)/gnulib/m4/langinfo_h.m4 \
+ $(top_srcdir)/gnulib/m4/largefile.m4 \
$(top_srcdir)/gnulib/m4/lib-ld.m4 \
$(top_srcdir)/gnulib/m4/lib-link.m4 \
$(top_srcdir)/gnulib/m4/lib-prefix.m4 \
+ $(top_srcdir)/gnulib/m4/libunistring-base.m4 \
$(top_srcdir)/gnulib/m4/localcharset.m4 \
+ $(top_srcdir)/gnulib/m4/locale-fr.m4 \
+ $(top_srcdir)/gnulib/m4/locale-ja.m4 \
+ $(top_srcdir)/gnulib/m4/locale-zh.m4 \
+ $(top_srcdir)/gnulib/m4/locale_h.m4 \
+ $(top_srcdir)/gnulib/m4/localeconv.m4 \
+ $(top_srcdir)/gnulib/m4/lock.m4 \
$(top_srcdir)/gnulib/m4/longlong.m4 \
+ $(top_srcdir)/gnulib/m4/lstat.m4 \
$(top_srcdir)/gnulib/m4/malloc.m4 \
$(top_srcdir)/gnulib/m4/malloca.m4 \
$(top_srcdir)/gnulib/m4/mbchar.m4 \
$(top_srcdir)/gnulib/m4/mbiter.m4 \
$(top_srcdir)/gnulib/m4/mbrtowc.m4 \
- $(top_srcdir)/gnulib/m4/mbscasecmp.m4 \
- $(top_srcdir)/gnulib/m4/mbschr.m4 \
+ $(top_srcdir)/gnulib/m4/mbsinit.m4 \
$(top_srcdir)/gnulib/m4/mbslen.m4 \
- $(top_srcdir)/gnulib/m4/mbsncasecmp.m4 \
- $(top_srcdir)/gnulib/m4/mbsstr.m4 \
$(top_srcdir)/gnulib/m4/mbstate_t.m4 \
$(top_srcdir)/gnulib/m4/mbswidth.m4 \
+ $(top_srcdir)/gnulib/m4/mbtowc.m4 \
$(top_srcdir)/gnulib/m4/memchr.m4 \
- $(top_srcdir)/gnulib/m4/memcmp.m4 \
- $(top_srcdir)/gnulib/m4/memcpy.m4 \
$(top_srcdir)/gnulib/m4/memmem.m4 \
- $(top_srcdir)/gnulib/m4/memmove.m4 \
$(top_srcdir)/gnulib/m4/mempcpy.m4 \
$(top_srcdir)/gnulib/m4/mkstemp.m4 \
+ $(top_srcdir)/gnulib/m4/mmap-anon.m4 \
+ $(top_srcdir)/gnulib/m4/msvc-inval.m4 \
+ $(top_srcdir)/gnulib/m4/msvc-nothrow.m4 \
+ $(top_srcdir)/gnulib/m4/multiarch.m4 \
+ $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \
$(top_srcdir)/gnulib/m4/nls.m4 \
+ $(top_srcdir)/gnulib/m4/nocrash.m4 \
+ $(top_srcdir)/gnulib/m4/off_t.m4 \
$(top_srcdir)/gnulib/m4/onceonly.m4 \
+ $(top_srcdir)/gnulib/m4/pathmax.m4 \
$(top_srcdir)/gnulib/m4/po.m4 \
$(top_srcdir)/gnulib/m4/progtest.m4 \
- $(top_srcdir)/gnulib/m4/setenv.m4 \
+ $(top_srcdir)/gnulib/m4/regex.m4 \
+ $(top_srcdir)/gnulib/m4/secure_getenv.m4 \
+ $(top_srcdir)/gnulib/m4/ssize_t.m4 \
+ $(top_srcdir)/gnulib/m4/stat.m4 \
$(top_srcdir)/gnulib/m4/stdbool.m4 \
+ $(top_srcdir)/gnulib/m4/stddef_h.m4 \
$(top_srcdir)/gnulib/m4/stdint.m4 \
$(top_srcdir)/gnulib/m4/stdlib_h.m4 \
$(top_srcdir)/gnulib/m4/stpcpy.m4 \
@@ -108,13 +178,20 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/alloca.m4 \
$(top_srcdir)/gnulib/m4/string_h.m4 \
$(top_srcdir)/gnulib/m4/strndup.m4 \
$(top_srcdir)/gnulib/m4/strnlen.m4 \
+ $(top_srcdir)/gnulib/m4/strstr.m4 \
+ $(top_srcdir)/gnulib/m4/sys_socket_h.m4 \
$(top_srcdir)/gnulib/m4/sys_stat_h.m4 \
$(top_srcdir)/gnulib/m4/sys_time_h.m4 \
+ $(top_srcdir)/gnulib/m4/sys_types_h.m4 \
$(top_srcdir)/gnulib/m4/tempname.m4 \
+ $(top_srcdir)/gnulib/m4/threadlib.m4 \
+ $(top_srcdir)/gnulib/m4/time_h.m4 \
$(top_srcdir)/gnulib/m4/unistd_h.m4 \
- $(top_srcdir)/gnulib/m4/wchar.m4 \
+ $(top_srcdir)/gnulib/m4/warn-on-use.m4 \
+ $(top_srcdir)/gnulib/m4/wchar_h.m4 \
$(top_srcdir)/gnulib/m4/wchar_t.m4 \
- $(top_srcdir)/gnulib/m4/wctype.m4 \
+ $(top_srcdir)/gnulib/m4/wcrtomb.m4 \
+ $(top_srcdir)/gnulib/m4/wctype_h.m4 \
$(top_srcdir)/gnulib/m4/wcwidth.m4 \
$(top_srcdir)/gnulib/m4/wint_t.m4 \
$(top_srcdir)/gnulib/m4/xalloc.m4 $(top_srcdir)/configure.ac
@@ -122,44 +199,110 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES = defs
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \
- "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(pkgdatadir)"
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+ "$(DESTDIR)$(pkgdatadir)"
PROGRAMS = $(bin_PROGRAMS)
texindex_SOURCES = texindex.c
texindex_OBJECTS = texindex.$(OBJEXT)
texindex_LDADD = $(LDADD)
am__DEPENDENCIES_1 =
-texindex_DEPENDENCIES = ../lib/libtxi.a \
- $(top_builddir)/gnulib/lib/libgnu.a $(am__DEPENDENCIES_1)
-binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
-SCRIPTS = $(bin_SCRIPTS)
+texindex_DEPENDENCIES = $(top_builddir)/gnulib/lib/libgnu.a \
+ $(am__DEPENDENCIES_1)
+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 = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+SCRIPTS = $(bin_SCRIPTS) $(nodist_noinst_SCRIPTS)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles
+am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
SOURCES = texindex.c
DIST_SOURCES = texindex.c
-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|^.*/||'`;
-dist_pkgdataDATA_INSTALL = $(INSTALL_DATA)
-pkgdataDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(dist_pkgdata_DATA) $(pkgdata_DATA)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+DATA = $(dist_pkgdata_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+pkglibexecdir = @pkglibexecdir@
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
ALLOCA_H = @ALLOCA_H@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
+AR = @AR@
+ARFLAGS = @ARFLAGS@
ARGZ_H = @ARGZ_H@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -178,101 +321,324 @@ CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DIFF_A_OPTION = @DIFF_A_OPTION@
+DIFF_U_OPTION = @DIFF_U_OPTION@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
+EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
+EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
+ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
+ENOLINK_VALUE = @ENOLINK_VALUE@
+EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
+EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
+ERRNO_H = @ERRNO_H@
EXEEXT = @EXEEXT@
GETOPT_H = @GETOPT_H@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GLIBC21 = @GLIBC21@
GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BTOWC = @GNULIB_BTOWC@
GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CHDIR = @GNULIB_CHDIR@
GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_DUP = @GNULIB_DUP@
GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
GNULIB_FCHDIR = @GNULIB_FCHDIR@
+GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
+GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
+GNULIB_FCNTL = @GNULIB_FCNTL@
+GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
+GNULIB_FFSL = @GNULIB_FFSL@
+GNULIB_FFSLL = @GNULIB_FFSLL@
+GNULIB_FSTAT = @GNULIB_FSTAT@
+GNULIB_FSTATAT = @GNULIB_FSTATAT@
+GNULIB_FSYNC = @GNULIB_FSYNC@
GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
GNULIB_GETCWD = @GNULIB_GETCWD@
+GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
+GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
+GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
+GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
+GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
+GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
+GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@
+GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
+GNULIB_ISATTY = @GNULIB_ISATTY@
+GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
+GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
+GNULIB_LCHMOD = @GNULIB_LCHMOD@
GNULIB_LCHOWN = @GNULIB_LCHOWN@
+GNULIB_LINK = @GNULIB_LINK@
+GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
GNULIB_LSEEK = @GNULIB_LSEEK@
+GNULIB_LSTAT = @GNULIB_LSTAT@
GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
+GNULIB_MBRLEN = @GNULIB_MBRLEN@
+GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
GNULIB_MBSCHR = @GNULIB_MBSCHR@
GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+GNULIB_MBSINIT = @GNULIB_MBSINIT@
GNULIB_MBSLEN = @GNULIB_MBSLEN@
GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
+GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
GNULIB_MBSSEP = @GNULIB_MBSSEP@
GNULIB_MBSSPN = @GNULIB_MBSSPN@
GNULIB_MBSSTR = @GNULIB_MBSSTR@
GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+GNULIB_MBTOWC = @GNULIB_MBTOWC@
+GNULIB_MEMCHR = @GNULIB_MEMCHR@
GNULIB_MEMMEM = @GNULIB_MEMMEM@
GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+GNULIB_MKDIRAT = @GNULIB_MKDIRAT@
GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+GNULIB_MKFIFO = @GNULIB_MKFIFO@
+GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@
+GNULIB_MKNOD = @GNULIB_MKNOD@
+GNULIB_MKNODAT = @GNULIB_MKNODAT@
+GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
+GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
+GNULIB_MKTIME = @GNULIB_MKTIME@
+GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@
+GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
+GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@
+GNULIB_OPEN = @GNULIB_OPEN@
+GNULIB_OPENAT = @GNULIB_OPENAT@
+GNULIB_PIPE = @GNULIB_PIPE@
+GNULIB_PIPE2 = @GNULIB_PIPE2@
+GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
+GNULIB_PREAD = @GNULIB_PREAD@
+GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_RANDOM = @GNULIB_RANDOM@
+GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READ = @GNULIB_READ@
GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_READLINKAT = @GNULIB_READLINKAT@
GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_RMDIR = @GNULIB_RMDIR@
GNULIB_RPMATCH = @GNULIB_RPMATCH@
+GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@
GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
+GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_STAT = @GNULIB_STAT@
GNULIB_STPCPY = @GNULIB_STPCPY@
GNULIB_STPNCPY = @GNULIB_STPNCPY@
GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
GNULIB_STRDUP = @GNULIB_STRDUP@
GNULIB_STRERROR = @GNULIB_STRERROR@
+GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
+GNULIB_STRNCAT = @GNULIB_STRNCAT@
GNULIB_STRNDUP = @GNULIB_STRNDUP@
GNULIB_STRNLEN = @GNULIB_STRNLEN@
GNULIB_STRPBRK = @GNULIB_STRPBRK@
+GNULIB_STRPTIME = @GNULIB_STRPTIME@
GNULIB_STRSEP = @GNULIB_STRSEP@
GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
GNULIB_STRSTR = @GNULIB_STRSTR@
GNULIB_STRTOD = @GNULIB_STRTOD@
GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+GNULIB_STRTOLL = @GNULIB_STRTOLL@
+GNULIB_STRTOULL = @GNULIB_STRTOULL@
+GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
+GNULIB_SYMLINK = @GNULIB_SYMLINK@
+GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
+GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
+GNULIB_TIMEGM = @GNULIB_TIMEGM@
+GNULIB_TIME_R = @GNULIB_TIME_R@
+GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
+GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
+GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
+GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
+GNULIB_UNLINK = @GNULIB_UNLINK@
+GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
+GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
GNULIB_UNSETENV = @GNULIB_UNSETENV@
+GNULIB_USLEEP = @GNULIB_USLEEP@
+GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@
+GNULIB_WCPCPY = @GNULIB_WCPCPY@
+GNULIB_WCPNCPY = @GNULIB_WCPNCPY@
+GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
+GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@
+GNULIB_WCSCAT = @GNULIB_WCSCAT@
+GNULIB_WCSCHR = @GNULIB_WCSCHR@
+GNULIB_WCSCMP = @GNULIB_WCSCMP@
+GNULIB_WCSCOLL = @GNULIB_WCSCOLL@
+GNULIB_WCSCPY = @GNULIB_WCSCPY@
+GNULIB_WCSCSPN = @GNULIB_WCSCSPN@
+GNULIB_WCSDUP = @GNULIB_WCSDUP@
+GNULIB_WCSLEN = @GNULIB_WCSLEN@
+GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@
+GNULIB_WCSNCAT = @GNULIB_WCSNCAT@
+GNULIB_WCSNCMP = @GNULIB_WCSNCMP@
+GNULIB_WCSNCPY = @GNULIB_WCSNCPY@
+GNULIB_WCSNLEN = @GNULIB_WCSNLEN@
+GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
+GNULIB_WCSPBRK = @GNULIB_WCSPBRK@
+GNULIB_WCSRCHR = @GNULIB_WCSRCHR@
+GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
+GNULIB_WCSSPN = @GNULIB_WCSSPN@
+GNULIB_WCSSTR = @GNULIB_WCSSTR@
+GNULIB_WCSTOK = @GNULIB_WCSTOK@
+GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@
+GNULIB_WCSXFRM = @GNULIB_WCSXFRM@
+GNULIB_WCTOB = @GNULIB_WCTOB@
+GNULIB_WCTOMB = @GNULIB_WCTOMB@
+GNULIB_WCTRANS = @GNULIB_WCTRANS@
+GNULIB_WCTYPE = @GNULIB_WCTYPE@
GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
+GNULIB_WMEMCHR = @GNULIB_WMEMCHR@
+GNULIB_WMEMCMP = @GNULIB_WMEMCMP@
+GNULIB_WMEMCPY = @GNULIB_WMEMCPY@
+GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@
+GNULIB_WMEMSET = @GNULIB_WMEMSET@
+GNULIB_WRITE = @GNULIB_WRITE@
+GNULIB__EXIT = @GNULIB__EXIT@
GREP = @GREP@
-HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
+HAVE_ATOLL = @HAVE_ATOLL@
+HAVE_BTOWC = @HAVE_BTOWC@
+HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
+HAVE_CHOWN = @HAVE_CHOWN@
HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
+HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
+HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
+HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
+HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
+HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
+HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
-HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@
+HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@
HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
+HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
+HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
HAVE_DUP2 = @HAVE_DUP2@
+HAVE_DUP3 = @HAVE_DUP3@
+HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
+HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_FACCESSAT = @HAVE_FACCESSAT@
+HAVE_FCHDIR = @HAVE_FCHDIR@
+HAVE_FCHMODAT = @HAVE_FCHMODAT@
+HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
+HAVE_FCNTL = @HAVE_FCNTL@
+HAVE_FDATASYNC = @HAVE_FDATASYNC@
+HAVE_FEATURES_H = @HAVE_FEATURES_H@
+HAVE_FFSL = @HAVE_FFSL@
+HAVE_FFSLL = @HAVE_FFSLL@
+HAVE_FSTATAT = @HAVE_FSTATAT@
+HAVE_FSYNC = @HAVE_FSYNC@
HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+HAVE_FUTIMENS = @HAVE_FUTIMENS@
+HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
+HAVE_GETGROUPS = @HAVE_GETGROUPS@
+HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
+HAVE_GETLOGIN = @HAVE_GETLOGIN@
+HAVE_GETOPT_H = @HAVE_GETOPT_H@
HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
+HAVE_GRANTPT = @HAVE_GRANTPT@
+HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+HAVE_ISWBLANK = @HAVE_ISWBLANK@
HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
+HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@
+HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@
+HAVE_LANGINFO_H = @HAVE_LANGINFO_H@
+HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@
+HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@
+HAVE_LCHMOD = @HAVE_LCHMOD@
+HAVE_LCHOWN = @HAVE_LCHOWN@
+HAVE_LINK = @HAVE_LINK@
+HAVE_LINKAT = @HAVE_LINKAT@
HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
HAVE_LSTAT = @HAVE_LSTAT@
-HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
+HAVE_MBRLEN = @HAVE_MBRLEN@
+HAVE_MBRTOWC = @HAVE_MBRTOWC@
+HAVE_MBSINIT = @HAVE_MBSINIT@
+HAVE_MBSLEN = @HAVE_MBSLEN@
+HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
+HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
+HAVE_MEMCHR = @HAVE_MEMCHR@
HAVE_MEMPCPY = @HAVE_MEMPCPY@
+HAVE_MKDIRAT = @HAVE_MKDIRAT@
HAVE_MKDTEMP = @HAVE_MKDTEMP@
+HAVE_MKFIFO = @HAVE_MKFIFO@
+HAVE_MKFIFOAT = @HAVE_MKFIFOAT@
+HAVE_MKNOD = @HAVE_MKNOD@
+HAVE_MKNODAT = @HAVE_MKNODAT@
+HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
+HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
+HAVE_MKSTEMP = @HAVE_MKSTEMP@
+HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
+HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
+HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
+HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
+HAVE_OPENAT = @HAVE_OPENAT@
HAVE_OS_H = @HAVE_OS_H@
+HAVE_PIPE = @HAVE_PIPE@
+HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
+HAVE_PREAD = @HAVE_PREAD@
+HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
+HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_RANDOM = @HAVE_RANDOM@
+HAVE_RANDOM_H = @HAVE_RANDOM_H@
+HAVE_RANDOM_R = @HAVE_RANDOM_R@
HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
HAVE_READLINK = @HAVE_READLINK@
-HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
+HAVE_READLINKAT = @HAVE_READLINKAT@
+HAVE_REALPATH = @HAVE_REALPATH@
HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
HAVE_SETENV = @HAVE_SETENV@
+HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
@@ -282,26 +648,74 @@ HAVE_STPCPY = @HAVE_STPCPY@
HAVE_STPNCPY = @HAVE_STPNCPY@
HAVE_STRCASESTR = @HAVE_STRCASESTR@
HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
-HAVE_STRNDUP = @HAVE_STRNDUP@
HAVE_STRPBRK = @HAVE_STRPBRK@
+HAVE_STRPTIME = @HAVE_STRPTIME@
HAVE_STRSEP = @HAVE_STRSEP@
HAVE_STRTOD = @HAVE_STRTOD@
+HAVE_STRTOLL = @HAVE_STRTOLL@
+HAVE_STRTOULL = @HAVE_STRTOULL@
+HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
+HAVE_SYMLINK = @HAVE_SYMLINK@
+HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_TIMEGM = @HAVE_TIMEGM@
HAVE_UNISTD_H = @HAVE_UNISTD_H@
-HAVE_UNSETENV = @HAVE_UNSETENV@
+HAVE_UNLINKAT = @HAVE_UNLINKAT@
+HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+HAVE_USLEEP = @HAVE_USLEEP@
+HAVE_UTIMENSAT = @HAVE_UTIMENSAT@
HAVE_WCHAR_H = @HAVE_WCHAR_H@
+HAVE_WCHAR_T = @HAVE_WCHAR_T@
+HAVE_WCPCPY = @HAVE_WCPCPY@
+HAVE_WCPNCPY = @HAVE_WCPNCPY@
+HAVE_WCRTOMB = @HAVE_WCRTOMB@
+HAVE_WCSCASECMP = @HAVE_WCSCASECMP@
+HAVE_WCSCAT = @HAVE_WCSCAT@
+HAVE_WCSCHR = @HAVE_WCSCHR@
+HAVE_WCSCMP = @HAVE_WCSCMP@
+HAVE_WCSCOLL = @HAVE_WCSCOLL@
+HAVE_WCSCPY = @HAVE_WCSCPY@
+HAVE_WCSCSPN = @HAVE_WCSCSPN@
+HAVE_WCSDUP = @HAVE_WCSDUP@
+HAVE_WCSLEN = @HAVE_WCSLEN@
+HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@
+HAVE_WCSNCAT = @HAVE_WCSNCAT@
+HAVE_WCSNCMP = @HAVE_WCSNCMP@
+HAVE_WCSNCPY = @HAVE_WCSNCPY@
+HAVE_WCSNLEN = @HAVE_WCSNLEN@
+HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@
+HAVE_WCSPBRK = @HAVE_WCSPBRK@
+HAVE_WCSRCHR = @HAVE_WCSRCHR@
+HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@
+HAVE_WCSSPN = @HAVE_WCSSPN@
+HAVE_WCSSTR = @HAVE_WCSSTR@
+HAVE_WCSTOK = @HAVE_WCSTOK@
+HAVE_WCSWIDTH = @HAVE_WCSWIDTH@
+HAVE_WCSXFRM = @HAVE_WCSXFRM@
+HAVE_WCTRANS_T = @HAVE_WCTRANS_T@
HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
+HAVE_WCTYPE_T = @HAVE_WCTYPE_T@
+HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
HAVE_WINT_T = @HAVE_WINT_T@
+HAVE_WMEMCHR = @HAVE_WMEMCHR@
+HAVE_WMEMCMP = @HAVE_WMEMCMP@
+HAVE_WMEMCPY = @HAVE_WMEMCPY@
+HAVE_WMEMMOVE = @HAVE_WMEMMOVE@
+HAVE_WMEMSET = @HAVE_WMEMSET@
+HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
HAVE__BOOL = @HAVE__BOOL@
+HAVE__EXIT = @HAVE__EXIT@
HELP2MAN = @HELP2MAN@
-HEVEA = @HEVEA@
INCLUDE_NEXT = @INCLUDE_NEXT@
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -314,72 +728,204 @@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@
LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
+LIBMULTITHREAD = @LIBMULTITHREAD@
LIBOBJS = @LIBOBJS@
+LIBPTH = @LIBPTH@
+LIBPTH_PREFIX = @LIBPTH_PREFIX@
LIBS = @LIBS@
+LIBTHREAD = @LIBTHREAD@
+LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@
+LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@
+LN_S = @LN_S@
LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
+LOCALE_FR = @LOCALE_FR@
+LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
+LOCALE_JA = @LOCALE_JA@
+LOCALE_ZH_CN = @LOCALE_ZH_CN@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
+LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
+LTLIBPTH = @LTLIBPTH@
+LTLIBTHREAD = @LTLIBTHREAD@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
+NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
+NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
+NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
+NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
+NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
+NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
+NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@
+NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
+NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@
+NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@
+NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
+NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
+NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
+NEXT_ERRNO_H = @NEXT_ERRNO_H@
+NEXT_FCNTL_H = @NEXT_FCNTL_H@
+NEXT_GETOPT_H = @NEXT_GETOPT_H@
+NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
+NEXT_LOCALE_H = @NEXT_LOCALE_H@
+NEXT_STDDEF_H = @NEXT_STDDEF_H@
NEXT_STDINT_H = @NEXT_STDINT_H@
NEXT_STDLIB_H = @NEXT_STDLIB_H@
NEXT_STRING_H = @NEXT_STRING_H@
NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
+NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@
+NEXT_TIME_H = @NEXT_TIME_H@
NEXT_UNISTD_H = @NEXT_UNISTD_H@
NEXT_WCHAR_H = @NEXT_WCHAR_H@
NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_DATE = @PACKAGE_DATE@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
POSUB = @POSUB@
+PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
+PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
+PROVE = @PROVE@
+PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RANLIB = @RANLIB@
+REPLACE_BTOWC = @REPLACE_BTOWC@
+REPLACE_CALLOC = @REPLACE_CALLOC@
+REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
REPLACE_CHOWN = @REPLACE_CHOWN@
-REPLACE_FCHDIR = @REPLACE_FCHDIR@
+REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_DUP = @REPLACE_DUP@
+REPLACE_DUP2 = @REPLACE_DUP2@
+REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
+REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
+REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FSTAT = @REPLACE_FSTAT@
+REPLACE_FSTATAT = @REPLACE_FSTATAT@
+REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@
+REPLACE_FUTIMENS = @REPLACE_FUTIMENS@
REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
+REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
+REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_ISATTY = @REPLACE_ISATTY@
+REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LINK = @REPLACE_LINK@
+REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
+REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_LSTAT = @REPLACE_LSTAT@
+REPLACE_MALLOC = @REPLACE_MALLOC@
+REPLACE_MBRLEN = @REPLACE_MBRLEN@
+REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
+REPLACE_MBSINIT = @REPLACE_MBSINIT@
+REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
+REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
+REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MBTOWC = @REPLACE_MBTOWC@
+REPLACE_MEMCHR = @REPLACE_MEMCHR@
REPLACE_MEMMEM = @REPLACE_MEMMEM@
REPLACE_MKDIR = @REPLACE_MKDIR@
+REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKNOD = @REPLACE_MKNOD@
REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_MKTIME = @REPLACE_MKTIME@
+REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
+REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
+REPLACE_NULL = @REPLACE_NULL@
+REPLACE_OPEN = @REPLACE_OPEN@
+REPLACE_OPENAT = @REPLACE_OPENAT@
+REPLACE_PREAD = @REPLACE_PREAD@
+REPLACE_PTSNAME = @REPLACE_PTSNAME@
+REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
REPLACE_PUTENV = @REPLACE_PUTENV@
+REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
+REPLACE_READ = @REPLACE_READ@
+REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_REALLOC = @REPLACE_REALLOC@
+REPLACE_REALPATH = @REPLACE_REALPATH@
+REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_SETENV = @REPLACE_SETENV@
+REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
+REPLACE_SLEEP = @REPLACE_SLEEP@
+REPLACE_STAT = @REPLACE_STAT@
+REPLACE_STPNCPY = @REPLACE_STPNCPY@
REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
+REPLACE_STRDUP = @REPLACE_STRDUP@
REPLACE_STRERROR = @REPLACE_STRERROR@
+REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
+REPLACE_STRNCAT = @REPLACE_STRNCAT@
+REPLACE_STRNDUP = @REPLACE_STRNDUP@
+REPLACE_STRNLEN = @REPLACE_STRNLEN@
REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
REPLACE_STRSTR = @REPLACE_STRSTR@
REPLACE_STRTOD = @REPLACE_STRTOD@
+REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
+REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
+REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
+REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
+REPLACE_UNLINK = @REPLACE_UNLINK@
+REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
+REPLACE_UNSETENV = @REPLACE_UNSETENV@
+REPLACE_USLEEP = @REPLACE_USLEEP@
+REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@
+REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
+REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
+REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
+REPLACE_WCTOB = @REPLACE_WCTOB@
+REPLACE_WCTOMB = @REPLACE_WCTOMB@
REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
+REPLACE_WRITE = @REPLACE_WRITE@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
STDBOOL_H = @STDBOOL_H@
+STDDEF_H = @STDDEF_H@
STDINT_H = @STDINT_H@
STRIP = @STRIP@
-SYS_STAT_H = @SYS_STAT_H@
-SYS_TIME_H = @SYS_TIME_H@
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
TERMLIBS = @TERMLIBS@
-TEX = @TEX@
+TEXINFO_DTD_VERSION = @TEXINFO_DTD_VERSION@
+TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
+UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
+UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
+USE_EXTERNAL_EASTASIANWIDTH = @USE_EXTERNAL_EASTASIANWIDTH@
+USE_EXTERNAL_LIBINTL = @USE_EXTERNAL_LIBINTL@
+USE_EXTERNAL_UNIDECODE = @USE_EXTERNAL_UNIDECODE@
USE_NLS = @USE_NLS@
+USE_UNICODE = @USE_UNICODE@
VERSION = @VERSION@
-VOID_UNSETENV = @VOID_UNSETENV@
-WCHAR_H = @WCHAR_H@
WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
-WCTYPE_H = @WCTYPE_H@
+WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@
+WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@
WINT_T_SUFFIX = @WINT_T_SUFFIX@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
@@ -410,6 +956,7 @@ gl_LIBOBJS = @gl_LIBOBJS@
gl_LTLIBOBJS = @gl_LTLIBOBJS@
gltests_LIBOBJS = @gltests_LIBOBJS@
gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
+gltests_WITNESS = @gltests_WITNESS@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -421,6 +968,7 @@ infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+lispdir = @lispdir@
localedir = $(datadir)/locale
localstatedir = @localstatedir@
mandir = @mandir@
@@ -439,55 +987,54 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-bin_SCRIPTS = texi2dvi texi2pdf pdftexi2dvi
+bin_SCRIPTS = texi2dvi texi2pdf pdftexi2dvi $(am__append_1)
+nodist_noinst_SCRIPTS = txixml2texi
+w32_bat = makeinfo.bat pod2texi.bat texi2any.bat
AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/gnulib/lib \
-I$(top_builddir)/gnulib/lib \
-DLOCALEDIR=\"$(localedir)\"
-LDADD = ../lib/libtxi.a $(top_builddir)/gnulib/lib/libgnu.a $(LIBINTL)
-dist_pkgdata_DATA = texinfo.dtd texinfo.xsl
-pkgdata_DATA = texinfo.cat
+LDADD = $(top_builddir)/gnulib/lib/libgnu.a $(LIBINTL)
+dist_pkgdata_DATA = htmlxref.cnf texinfo.dtd #texinfo.cat
+
+# This fails distcheck:
+#texinfo.cat: texinfo-cat.in Makefile
+# sed 's/__VERSION__/$(TEXINFO_DTD_VERSION)/g' $(srcdir)/texinfo-cat.in >$@
+# used to be:
+#texinfo.cat: texinfo-cat.in $(top_srcdir)/doc/version.texi
+# sed 's/__VERSION__/@VERSION@/g' $(srcdir)/texinfo-cat.in >$@
+# Let's try just getting rid of it; not aware of its being used.
# Most of these are for fun. The only official/installed ones are the
# *texi2* scripts.
#
-EXTRA_DIST = README deref.c dir-example fix-info-dir fixfonts \
- fixref.gawk gdoc gen-dir-node gendocs.sh gendocs_template \
- infosrch install-info-html outline.gawk pdftexi2dvi \
- prepinfo.awk tex3patch texi-docstring-magic.el texi2dvi \
- texi2pdf txitextest $(dist_pkgdata_DATA) texinfo-cat.in \
- $(am__append_1)
-CLEANFILES = $(pkgdata_DATA)
-
-# Let's not stress people's TeX installations, etc.
-@MAINTAINER_MODE_TRUE@TESTS = \
-@MAINTAINER_MODE_TRUE@bibtex.test \
-@MAINTAINER_MODE_TRUE@dvipdf.test \
-@MAINTAINER_MODE_TRUE@latex2html.test \
-@MAINTAINER_MODE_TRUE@local.test \
-@MAINTAINER_MODE_TRUE@texi2dvi.test
-
-
-# Each test case depends on defs.
-@MAINTAINER_MODE_TRUE@check_SCRIPTS = defs
+EXTRA_DIST = README detexinfo dir-example \
+ gendocs.sh gendocs_template \
+ pdftexi2dvi \
+ texi2dvi texi2pdf \
+ $(dist_pkgdata_DATA) texinfo-cat.in texi-elements-by-size \
+ texi2html txixml2texi.pl $(w32_bat) \
+ tests
+
+DISTCLEANFILES = txixml2texi
all: all-am
.SUFFIXES:
.SUFFIXES: .c .o .obj
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu util/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu util/Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu util/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu util/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -501,57 +1048,92 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-defs: $(top_builddir)/config.status $(srcdir)/defs.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+$(am__aclocal_m4_deps):
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
- @list='$(bin_PROGRAMS)'; for p in $$list; do \
- p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- if test -f $$p \
- ; then \
- f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
- $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
- else :; fi; \
- done
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+ fi; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p \
+ ; then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' \
+ -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
- @list='$(bin_PROGRAMS)'; for p in $$list; do \
- f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
- rm -f "$(DESTDIR)$(bindir)/$$f"; \
- done
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' \
+ `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
-texindex$(EXEEXT): $(texindex_OBJECTS) $(texindex_DEPENDENCIES)
+
+texindex$(EXEEXT): $(texindex_OBJECTS) $(texindex_DEPENDENCIES) $(EXTRA_texindex_DEPENDENCIES)
@rm -f texindex$(EXEEXT)
- $(LINK) $(texindex_OBJECTS) $(texindex_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(texindex_OBJECTS) $(texindex_LDADD) $(LIBS)
install-binSCRIPTS: $(bin_SCRIPTS)
@$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
- @list='$(bin_SCRIPTS)'; for p in $$list; do \
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- if test -f $$d$$p; then \
- f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
- echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
- $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
- else :; fi; \
- done
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
uninstall-binSCRIPTS:
@$(NORMAL_UNINSTALL)
- @list='$(bin_SCRIPTS)'; for p in $$list; do \
- f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
- echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
- rm -f "$(DESTDIR)$(bindir)/$$f"; \
- done
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -562,173 +1144,92 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texindex.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
install-dist_pkgdataDATA: $(dist_pkgdata_DATA)
@$(NORMAL_INSTALL)
- test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)"
- @list='$(dist_pkgdata_DATA)'; for p in $$list; do \
+ @list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pkgdatadir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- f=$(am__strip_dir) \
- echo " $(dist_pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \
- $(dist_pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdatadir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdatadir)" || exit $$?; \
done
uninstall-dist_pkgdataDATA:
@$(NORMAL_UNINSTALL)
- @list='$(dist_pkgdata_DATA)'; for p in $$list; do \
- f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \
- rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
- done
-install-pkgdataDATA: $(pkgdata_DATA)
- @$(NORMAL_INSTALL)
- test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)"
- @list='$(pkgdata_DATA)'; for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- f=$(am__strip_dir) \
- echo " $(pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \
- $(pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \
- done
+ @list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(pkgdatadir)'; $(am__uninstall_files_from_dir)
-uninstall-pkgdataDATA:
- @$(NORMAL_UNINSTALL)
- @list='$(pkgdata_DATA)'; for p in $$list; do \
- f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \
- rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
- done
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- 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; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- 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; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
+ $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-check-TESTS: $(TESTS)
- @failed=0; all=0; xfail=0; xpass=0; skip=0; ws='[ ]'; \
- srcdir=$(srcdir); export srcdir; \
- list=' $(TESTS) '; \
- if test -n "$$list"; then \
- for tst in $$list; do \
- if test -f ./$$tst; then dir=./; \
- elif test -f $$tst; then dir=; \
- else dir="$(srcdir)/"; fi; \
- if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
- all=`expr $$all + 1`; \
- case " $(XFAIL_TESTS) " in \
- *$$ws$$tst$$ws*) \
- xpass=`expr $$xpass + 1`; \
- failed=`expr $$failed + 1`; \
- echo "XPASS: $$tst"; \
- ;; \
- *) \
- echo "PASS: $$tst"; \
- ;; \
- esac; \
- elif test $$? -ne 77; then \
- all=`expr $$all + 1`; \
- case " $(XFAIL_TESTS) " in \
- *$$ws$$tst$$ws*) \
- xfail=`expr $$xfail + 1`; \
- echo "XFAIL: $$tst"; \
- ;; \
- *) \
- failed=`expr $$failed + 1`; \
- echo "FAIL: $$tst"; \
- ;; \
- esac; \
- else \
- skip=`expr $$skip + 1`; \
- echo "SKIP: $$tst"; \
- fi; \
- done; \
- if test "$$failed" -eq 0; then \
- if test "$$xfail" -eq 0; then \
- banner="All $$all tests passed"; \
- else \
- banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
- fi; \
- else \
- if test "$$xpass" -eq 0; then \
- banner="$$failed of $$all tests failed"; \
- else \
- banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
- fi; \
- fi; \
- dashes="$$banner"; \
- skipped=""; \
- if test "$$skip" -ne 0; then \
- skipped="($$skip tests were not run)"; \
- test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
- dashes="$$skipped"; \
- fi; \
- report=""; \
- if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
- report="Please report to $(PACKAGE_BUGREPORT)"; \
- test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
- dashes="$$report"; \
- fi; \
- dashes=`echo "$$dashes" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- test -z "$$skipped" || echo "$$skipped"; \
- test -z "$$report" || echo "$$report"; \
- echo "$$dashes"; \
- test "$$failed" -eq 0; \
- else :; fi
-
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -745,23 +1246,25 @@ distdir: $(DISTFILES)
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
- $(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS)
- $(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: check-am
all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA)
installdirs:
- for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(pkgdatadir)"; do \
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgdatadir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
@@ -774,22 +1277,27 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-@MAINTAINER_MODE_FALSE@distclean-local:
clean: clean-am
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
@@ -798,7 +1306,7 @@ distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
- distclean-local distclean-tags
+ distclean-tags
dvi: dvi-am
@@ -806,26 +1314,38 @@ dvi-am:
html: html-am
+html-am:
+
info: info-am
info-am:
-install-data-am: install-dist_pkgdataDATA install-pkgdataDATA
+install-data-am: install-dist_pkgdataDATA
install-dvi: install-dvi-am
+install-dvi-am:
+
install-exec-am: install-binPROGRAMS install-binSCRIPTS
install-html: install-html-am
+install-html-am:
+
install-info: install-info-am
+install-info-am:
+
install-man:
install-pdf: install-pdf-am
+install-pdf-am:
+
install-ps: install-ps-am
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -846,37 +1366,40 @@ ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \
- uninstall-dist_pkgdataDATA uninstall-pkgdataDATA
+ uninstall-dist_pkgdataDATA
.MAKE: install-am install-strip
-.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
- clean-binPROGRAMS clean-generic ctags distclean \
- distclean-compile distclean-generic distclean-local \
- distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-binPROGRAMS install-binSCRIPTS \
- install-data install-data-am install-dist_pkgdataDATA \
- 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-pkgdataDATA \
- install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
- uninstall-am uninstall-binPROGRAMS uninstall-binSCRIPTS \
- uninstall-dist_pkgdataDATA uninstall-pkgdataDATA
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
+ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \
+ distclean distclean-compile distclean-generic distclean-tags \
+ distdir dvi dvi-am html html-am info info-am install \
+ install-am install-binPROGRAMS install-binSCRIPTS install-data \
+ install-data-am install-dist_pkgdataDATA 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 maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
+ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \
+ uninstall-binSCRIPTS uninstall-dist_pkgdataDATA
# for auctex.
pdftexi2dvi: texi2pdf
cp -f $(srcdir)/texi2pdf $@
-# we don't actually use version.texi in the rule, but it's one way of
-# noticing when the version changes.
-texinfo.cat: texinfo-cat.in $(top_srcdir)/doc/version.texi
- sed 's/__VERSION__/@VERSION@/g' $(srcdir)/texinfo-cat.in >$@
-@MAINTAINER_MODE_TRUE@distclean-local:
-@MAINTAINER_MODE_TRUE@ -rm -rf testSubDir
+txixml2texi: txixml2texi.pl Makefile
+ sed -e 's,[@]datadir[@],$(datadir),g' \
+ -e 's,[@]PACKAGE[@],$(PACKAGE),g' \
+ -e 's,[@]USE_EXTERNAL_LIBINTL[@],$(USE_EXTERNAL_LIBINTL),g' \
+ -e 's,[@]USE_EXTERNAL_EASTASIANWIDTH[@],$(USE_EXTERNAL_EASTASIANWIDTH),g' \
+ -e 's,[@]USE_EXTERNAL_UNIDECODE[@],$(USE_EXTERNAL_UNIDECODE),g' \
+ -e '1 s,/usr/bin/env perl,$(PERL),g' \
+ $(srcdir)/txixml2texi.pl >$@
+ chmod a+x $@
+
# 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.
.NOEXPORT:
diff --git a/util/README b/util/README
index 8ed7b07..aac35a5 100644
--- a/util/README
+++ b/util/README
@@ -1,13 +1,29 @@
-$Id: README,v 1.6 2008/01/02 01:36:32 karl Exp $
+$Id: README 5191 2013-02-23 00:11:18Z karl $
texinfo/util/README
- Copyright (C) 2002, 2008 Free Software Foundation, Inc.
+ Copyright 2002, 2008, 2011, 2012, 2013 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
-Assorted Texinfo-related files.
+All the files here are maintained as part of the Texinfo distribution
+(in contrast to the contrib/ directory).
-texindex, texi2dvi, texi2pdf, pdftexi2dvi, and the XML stuff get installed.
-The other items here are for your amusement and/or hacking pleasure.
+These scripts actually get installed:
+ texindex texi2dvi texi2pdf pdftexi2dvi
+ (along with *.bat on Windows)
+ Also the XML stuff: texinfo.dtd texinfo.cat.
+
+These are examples of wrapping makeinfo invocation to achieve their
+various jobs:
+ detexinfo texi2html texi-elements-by-size
+ txicmdlist txicustomvars txixml2texi
+
+The srclist.txt file specifies common source files to keep in sync; see
+the srclist-update script in gnulib.
+
+Finally, the gendocs script and templates (which are not installed) are
+about creating all the usual output formats to be put on web pages.
+For more, see the GNU Maintainers Information:
+http://www.gnu.org/prep/maintain/html_node/Invoking-gendocs_002esh.html
diff --git a/util/deref.c b/util/deref.c
deleted file mode 100644
index 98e8ce0..0000000
--- a/util/deref.c
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
- * deref.c
- *
- * Make all texinfo references into the one argument form.
- *
- * Arnold Robbins
- * arnold@gnu.org
- * Written: December, 1991
- * Released: November, 1998
- *
- * Copyright 1991, 1998 Arnold David Robbins
- *
- * DEREF is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * DEREF is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*
- * LIMITATIONS:
- * One texinfo cross reference per line.
- * Cross references may not cross newlines.
- * Use of fgets for input (to be fixed).
- */
-
-#include <stdio.h>
-#include <ctype.h>
-#include <errno.h>
-
-/* for gcc on the 3B1, delete if this gives you grief */
-extern int fclose(FILE *fp);
-extern int fprintf(FILE *fp, const char *str, ...);
-/* extern int sprintf(char *str, const char *fmt, ...); */
-extern int fputs(char *buf, FILE *fp);
-
-extern char *strerror(int errno);
-extern char *strchr(char *cp, int ch);
-extern int strncmp(const char *s1, const char *s2, int count);
-
-extern int errno;
-
-void process(FILE *fp);
-void repair(char *line, char *ref, int toffset);
-
-int Errs = 0;
-char *Name = "stdin";
-int Line = 0;
-char *Me;
-
-/* main --- handle arguments, global vars for errors */
-
-int
-main(int argc, char **argv)
-{
- FILE *fp;
-
- Me = argv[0];
-
- if (argc == 1)
- process(stdin);
- else
- for (argc--, argv++; *argv != NULL; argc--, argv++) {
- if (argv[0][0] == '-' && argv[0][1] == '\0') {
- Name = "stdin";
- Line = 0;
- process(stdin);
- } else if ((fp = fopen(*argv, "r")) != NULL) {
- Name = *argv;
- Line = 0;
- process(fp);
- fclose(fp);
- } else {
- fprintf(stderr, "%s: can not open: %s\n",
- *argv, strerror(errno));
- Errs++;
- }
- }
- return Errs != 0;
-}
-
-/* isref --- decide if we've seen a texinfo cross reference */
-
-int
-isref(char *cp)
-{
- if (strncmp(cp, "@ref{", 5) == 0)
- return 5;
- if (strncmp(cp, "@xref{", 6) == 0)
- return 6;
- if (strncmp(cp, "@pxref{", 7) == 0)
- return 7;
- return 0;
-}
-
-/* process --- read files, look for references, fix them up */
-
-void
-process(FILE *fp)
-{
- char buf[BUFSIZ];
- char *cp;
- int count;
-
- while (fgets(buf, sizeof buf, fp) != NULL) {
- Line++;
- cp = strchr(buf, '@');
- if (cp == NULL) {
- fputs(buf, stdout);
- continue;
- }
- do {
- count = isref(cp);
- if (count == 0) {
- cp++;
- cp = strchr(cp, '@');
- if (cp == NULL) {
- fputs(buf, stdout);
- goto next;
- }
- continue;
- }
- /* got one */
- repair(buf, cp, count);
- break;
- } while (cp != NULL);
- next: ;
- }
-}
-
-/* repair --- turn all texinfo cross references into the one argument form */
-
-void
-repair(char *line, char *ref, int toffset)
-{
- int braces = 1; /* have seen first left brace */
- char *cp;
-
- ref += toffset;
-
- /* output line up to and including left brace in reference */
- for (cp = line; cp <= ref; cp++)
- putchar(*cp);
-
- /* output node name */
- for (; *cp && *cp != '}' && *cp != ',' && *cp != '\n'; cp++)
- putchar(*cp);
-
- if (*cp != '}') { /* could have been one arg xref */
- /* skip to matching right brace */
- for (; braces > 0; cp++) {
- switch (*cp) {
- case '@':
- cp++; /* blindly skip next character */
- break;
- case '{':
- braces++;
- break;
- case '}':
- braces--;
- break;
- case '\n':
- case '\0':
- Errs++;
- fprintf(stderr,
- "%s: %s: %d: mismatched braces\n",
- Me, Name, Line);
- goto out;
- default:
- break;
- }
- }
- out:
- ;
- }
-
- putchar('}');
- if (*cp == '}')
- cp++;
-
- /* now the rest of the line */
- for (; *cp; cp++)
- putchar(*cp);
- return;
-}
-
-/* strerror --- return error string, delete if in your library */
-
-char *
-strerror(int errno)
-{
- static char buf[100];
- extern int sys_nerr;
- extern char *sys_errlist[];
-
- if (errno < sys_nerr && errno >= 0)
- return sys_errlist[errno];
-
- sprintf(buf, "unknown error %d", errno);
- return buf;
-}
diff --git a/util/detexinfo b/util/detexinfo
new file mode 100755
index 0000000..cea03bd
--- /dev/null
+++ b/util/detexinfo
@@ -0,0 +1,18 @@
+#! /bin/sh
+# $Id: detexinfo 5191 2013-02-23 00:11:18Z karl $
+# Copyright 2011, 2012 Free Software Foundation, Inc.
+#
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# Original author: Patrice Dumas.
+
+# Script to strip Texinfo commands. It is so trivial we don't install
+# it, but it's in the distribution as an example.
+#
+exec texi2any --set-customization-variable TEXINFO_OUTPUT_FORMAT=textcontent "$@"
diff --git a/util/dir-example b/util/dir-example
index eac9490..b640c78 100644
--- a/util/dir-example
+++ b/util/dir-example
@@ -4,13 +4,12 @@ This particular dir file is merely made available for your hacking
pleasure, not official or standard in any way. If it doesn't make sense
to you, or you don't like it, ignore it.
rms suggested that we follow the categories of the Free Software
- Directory (http://www.gnu.org/directory/) where possible. Since
- capitalization in the directory is random, I've chosen to use
- `minimum' capitals, just the first word and proper nouns.
+ Directory (http://www.gnu.org/directory/) where possible, including
+ `minimal' capitalization, that is, just the first word and proper nouns.
If you have dir entries for Texinfo manuals you'd like to be added here,
please send them to karl@gnu.org.
-$Id: dir-example,v 1.77 2008/03/25 15:09:14 karl Exp $
+$Id: dir-example 5294 2013-08-10 15:30:19Z karl $

File: dir, Node: Top, This is the top of the INFO tree.
@@ -27,30 +26,32 @@ Not all of the topics shown below may be available on this system.
* Menu:
Basics
-* Bash: (bash). The GNU Bourne-Again SHell.
* BC: (bc). Arbitrary precision calculator language.
-* Common options: (coreutils)Common options. Common options.
+* Bash: (bash). The GNU Bourne-Again SHell.
+* Common options: (coreutils)Common options.
* Coreutils: (coreutils). Core GNU (file, text, shell) utilities.
* DC: (dc). Postfix desk calculator.
* Date input formats: (coreutils)Date input formats.
-* Ed: (ed). The GNU line editor.
-* File permissions: (coreutils)File permissions. Access modes.
+* Ed: (ed). The GNU line editor
+* File permissions: (coreutils)File permissions. Access modes.
* Finding files: (find). Operating on files matching certain criteria.
* Gcal: (gcal). GNU calendar program.
* Hello: (hello). Hello, GNU world.
+* Inetutils: (inetutils). GNU networking utilities.
* Time: (time). Measuring program resource usage.
Text creation and manipulation
-* Diffutils: (diff). Comparing and merging files.
+* Diffutils: (diffutils). Comparing and merging files.
* Gawk: (gawk). A text scanning and processing language.
-* M4: (m4). A powerful macro processor.
* grep: (grep). Print lines matching a pattern.
-* sed: (sed). Stream EDitor.
-* Wdiff: (wdiff). Word difference finder and related tools.
+* M4: (m4). A powerful macro processor.
+* Perl: (perldoc-all). Practical Extraction and Report Language.
+* sed: (sed). Stream EDitor.
+* Word differences: (wdiff). GNU wdiff and diff related tools.
Texinfo documentation system
-* Info: (info). Documentation browsing system.
-* Texi2HTML: (texi2html). Texinfo to HTML Converter.
+* Info: (info). How to use the documentation browsing system.
+* Texi2HTML: (texi2html). Texinfo to HTML Converter.
* Texinfo: (texinfo). The GNU documentation format.
* info standalone: (info-stnd). Standalone Info reader.
* infokey: (info-stnd)Invoking infokey. Compile Info customizations.
@@ -63,23 +64,35 @@ Archiving
* Cpio: (cpio). Copy-in-copy-out archiver to tape or disk.
* Shar utilities: (sharutils). Shell archiver, uuencode/uudecode.
* Tar: (tar). Making tape (or disk) archives.
+* Xorrecord: (xorrecord). Emulates CD/DVD/BD program cdrecord
+* Xorriso: (xorriso). Burns ISO 9660 on CD, DVD, BD.
+* Xorrisofs: (xorrisofs). Emulates ISO 9660 program mkisofs
Compression
-* bzip2: (bzip2). General (de)compression of files (blocksort).
* Gzip: (gzip). General (de)compression of files (lzw).
+* bzip2: (bzip2). General (de)compression of files (blocksort).
+
+Editors
+* JED: (jed). JED editor documentation.
+* Screen: (screen). Terminal multiplexer.
Email
* Anubis: (anubis). The GNU outgoing mail processor.
* Mailutils: (mailutils). Utilities & library for mailboxes, protocols.
+Graphics
+* Netpbm: (netpbm). Images/graphics manipulation programs.
+
Network applications
* Gawkinet: (gawkinet). TCP/IP Internetworking With `gawk'.
+* Inetutils: (inetutils). GNU networking utilities.
* Wget: (wget). Non-interactive network downloader.
-Printing Tools
+Printing
* PreScript: (a2ps) PreScript. Input language for a2ps
* a2ps: (a2ps). PostScript Generating Utility
* card: (a2ps) card. Print Reference Cards
+* enscript (enscript). Text to PostScript.
* fixnt: (a2ps) fixnt. Fixing Microsoft NT PostScript Files
* fixps: (a2ps) fixps. Fixing Some Ill Designed PostScript Files
* ogonkify: (ogonkify). Ogonkify
@@ -87,25 +100,31 @@ Printing Tools
* psmandup: (a2ps) psmandup. Printing Duplex on Simplex Printers
* psset: (a2ps) psset. Inserting calls to setpagedevice
+Version control
+* CVS: (cvs). Concurrent Versions System
+* RCS: (rcs). GNU Revision Control System.
+
Software development
+* Annotate: (annotate). The obsolete annotation interface.
* As: (as). Assembler.
* Autoconf: (autoconf). Create source code configuration scripts.
* Automake: (automake). Making GNU standards-compliant Makefiles.
* Binutils: (binutils). The GNU binary utilities.
-* Cpp: (cpp). The GNU C preprocessor.
+* C: (gnu-c-manual). GNU C reference manual.
+* Complexity: (complexity). Measure complexity of C source.
+* Cpp: (cpp). The GNU C preprocessor.
* Cpplib: (cppinternals). Cpplib internals.
-* CVS: (cvs). Concurrent Versions System
* DejaGnu: (dejagnu). Testing framework.
* Dmalloc: (dmalloc). Malloc debug library.
* Gdb: (gdb). The GNU debugger.
-* bison: (bison). GNU parser generator (Yacc replacement).
+* Gdb-Internals: (gdbint). The GNU debugger's internals.
+* Stabs: (stabs). The "stabs" debugging information format.
+* bison: (bison). GNU parser generator (Yacc replacement).
* egcs: (egcs). Experimental GNU C compiler.
* Flex: (flex). A fast scanner generator.
+* g++: (gcc). The GNU C++ compiler.
* g77: (g77). GNU Fortran 77 compiler.
* Gasp: (gasp). GNU Assembler preprocessor.
-* gcc: (gcc). The GNU Compiler Collection.
-* gccinstall: (gccinstall). Installing the GNU Compiler Collection.
-* gccint: (gccint). Internals of the GNU Compiler Collection.
* Gnats: (gnats). Cygnus bug tracking system.
* Gnulib: (gnulib). Source files to share among distributions.
* Gperf: (gperf). Perfect hash function generator.
@@ -117,55 +136,93 @@ Software development
* Ld: (ld). Linker.
* Libtool: (libtool). Generic library support script.
* Make: (make). Remake files automatically.
+* PRCS: (prcs). Project revision control system.
* Remsync: (remsync). Remote synchronization of directory trees.
* Send PR: (send-pr). Cygnus bug reporting for Gnats.
* Source config: (cfg-paper). Some theory on configuring source packages.
-* help2man: (help2man). Automatic manual page generation from -help.
+* gcc: (gcc). The GNU Compiler Collection.
+* gccinstall: (gccinstall). Installing the GNU Compiler Collection.
+* gccint: (gccint). Internals of the GNU Compiler Collection.
+* help2man: (help2man). Automatic manual page generation.
+* vc-dwim: (vc-dwim). VCS-agnostic commit, diff, and change logs.
Emacs
-* Ada mode: (ada-mode). The GNU Emacs mode for editing Ada.
-* Autotype: (autotype). Convenient features for text that you enter frequently
- in Emacs.
-* CC Mode: (ccmode). Emacs mode for editing C, C++, Objective-C,
- Java, Pike, and IDL code.
-* CL: (cl). Partial Common Lisp support for Emacs Lisp.
-* Dired-X: (dired-x). Dired Extra Features.
-* EUDC: (eudc). A client for directory servers (LDAP, PH)
-* Ebrowse: (ebrowse). A C++ class browser for Emacs.
-* Ediff: (ediff). A visual interface for comparing and merging programs.
-* Emacs: (emacs). The extensible self-documenting text editor.
-* Elisp: (elisp). The Emacs Lisp Reference Manual.
-* Emacs FAQ: (efaq). Frequently Asked Questions about Emacs.
-* Emacs MIME: (emacs-mime). The MIME de/composition library.
-* Eshell: (eshell). A command shell implemented in Emacs Lisp.
-* Forms: (forms). Emacs package for editing data bases
- by filling in forms.
-* Gnus: (gnus). The newsreader Gnus.
-* IDLWAVE: (idlwave). Major mode and shell for IDL and WAVE/CL files.
-* Intro Elisp: (emacs-lisp-intro). Introduction to Elisp programming.
-
-* AUC TeX: (auctex). Editing (La)TeX files.
-* MH-E: (mh-e). Emacs interface to the MH mail system.
-* Message: (message). Mail and news composition mode that goes with Gnus.
-* PCL-CVS: (pcl-cvs). Emacs front-end to CVS.
-* RefTeX: (reftex). Emacs support for LaTeX cross-references and citations.
-* SC: (sc). Supercite lets you cite parts of messages you're
- replying to, in flexible ways.
-* Speedbar: (speedbar). File/Tag summarizing utility.
-* TRAMP: (tramp). Transparent Remote Access, Multiple Protocol
- Emacs remote file access via rsh and rcp.
-* VIP: (vip). An older VI-emulation for Emacs.
-* VIPER: (viper). The newest Emacs VI-emulation mode.
- (also, A VI Plan for Emacs Rescue or the VI PERil.)
-* VM: (vm). View Mail for Emacs.
-* Widget: (widget). Documenting the "widget" package used by the
- Emacs Custom facility.
-* WoMan: (woman). Browse UN*X Manual Pages `Wo (without) Man'.
+* Emacs: (emacs). The extensible self-documenting text editor.
+* Emacs FAQ: (efaq). Frequently Asked Questions about Emacs.
-Typesetting
-* Font utilities: (fontu). Programs for font manipulation.
-* Groff: (groff). The GNU troff document formatting system.
-* GV: (gv). The GNU PostScript and PDF viewer.
+GNU Emacs Lisp
+* Elisp: (elisp). The Emacs Lisp Reference Manual.
+* Emacs Lisp Intro: (eintr). A simple introduction to Emacs Lisp
+ programming.
+
+Emacs editing modes
+* Ada mode: (ada-mode). Emacs mode for editing and compiling Ada code.
+* CC Mode: (ccmode). Emacs mode for editing C, C++, Objective-C,
+ Java, Pike, AWK, and CORBA IDL code.
+* IDLWAVE: (idlwave). Major mode and shell for IDL files.
+* Org Mode: (org). Outline-based notes management and organizer
+* nXML Mode: (nxml-mode). XML editing mode with RELAX NG support.
+
+Emacs Lisp libraries
+* Auth-source: (auth). The Emacs auth-source library.
+* CL: (cl). Partial Common Lisp support for Emacs Lisp.
+* D-Bus: (dbus). Using D-Bus in Emacs.
+* Emacs MIME: (emacs-mime). Emacs MIME de/composition library.
+* SMTP: (smtpmail). Emacs library for sending mail via SMTP.
+* URL: (url). URL loading package.
+* Widget: (widget). The "widget" package used by the Emacs
+ Customization facility.
+
+Emacs misc features
+* Autotype: (autotype). Convenient features for text that you enter
+ frequently in Emacs.
+* Bovine: (bovine). Semantic bovine parser development.
+* Calc: (calc). Advanced desk calculator and mathematical tool.
+* Dired-X: (dired-x). Dired Extra Features.
+* EDE: (ede). The Emacs Development Environment.
+* EDT: (edt). An Emacs emulation of the EDT editor.
+* EIEIO: (eieio). An objects system for Emacs Lisp.
+* ERT: (ert). Emacs Lisp regression testing tool.
+* EasyPG Assistant: (epa). An Emacs user interface to GNU Privacy Guard.
+* Ebrowse: (ebrowse). A C++ class browser for Emacs.
+* Ediff: (ediff). A visual interface for comparing and merging
+ programs.
+* Eshell: (eshell). A command shell implemented in Emacs Lisp.
+* Flymake: (flymake). A universal on-the-fly syntax checker.
+* Forms: (forms). Emacs package for editing data bases by
+ filling in forms.
+* Htmlfontify: (htmlfontify). Convert source code to html.
+* PCL-CVS: (pcl-cvs). Emacs front-end to CVS.
+* RefTeX: (reftex). Emacs support for LaTeX cross-references and
+ citations.
+* Remember: (remember). Simple information manager for Emacs.
+* SES: (ses). Simple Emacs Spreadsheet.
+* SRecode: (srecode). Template code generator.
+* Semantic: (semantic). Source code parser library and utilities.
+* Speedbar: (speedbar). File/Tag summarizing utility.
+* VIP: (vip). An older VI-emulation for Emacs.
+* VIPER: (viper). A VI-emulation mode for Emacs.
+* Wisent: (wisent). Semantic Wisent parser development.
+* WoMan: (woman). Browse UN*X Manual Pages "W.O. (without) Man".
+
+Emacs network features
+* ERC: (erc). Powerful and extensible IRC client for Emacs.
+* EUDC: (eudc). Emacs client for directory servers (LDAP, PH).
+* GnuTLS: (emacs-gnutls). The Emacs GnuTLS integration.
+* Gnus: (gnus). The newsreader Gnus.
+* MH-E: (mh-e). Emacs interface to the MH mail system.
+* Mairix: (mairix-el). Emacs interface to the Mairix mail indexer.
+* Message: (message). Mail and news composition mode that goes with
+ Gnus.
+* Newsticker: (newsticker). A Newsticker for Emacs.
+* PGG: (pgg). Emacs interface to various PGP implementations.
+* Rcirc: (rcirc). Internet Relay Chat (IRC) client.
+* SASL: (sasl). The Emacs SASL library.
+* SC: (sc). Supercite lets you cite parts of messages
+ you're replying to, in flexible ways.
+* Sieve: (sieve). Managing Sieve scripts in Emacs.
+* TRAMP: (tramp). Transparent Remote Access, Multiple Protocol
+ Emacs remote file access via rsh and rcp.
GNU Gettext Utilities
* ISO3166: (gettext)Country Codes. ISO 3166 country codes.
@@ -202,6 +259,10 @@ Software libraries
* History: (history). Recall previous lines of input.
* Ld internals: (ldint). GNU linker internals.
* Libc: (libc). C library.
+* Libextractor: (extractor). Metadata extraction library.
+* libgomp: (libgomp). GNU OpenMP runtime library
+* libitm: (libitm). GNU Transactional Memory Library
+* libquadmath: (libquadmath). GCC Quad-Precision Math Library
* Mmalloc: (mmalloc). The GNU mapped-malloc package.
* Stabs: (stabs). The "stabs" debugging information format.
* Readline: (readline). General command-line interface.
@@ -211,78 +272,104 @@ C++ libraries
* Iostream: (iostream). C++ input/output.
* autosprintf: (autosprintf). Support for printf format strings in C++.
-GNU organization
-* Maintain: (maintain). GNU maintainer guidelines.
-* Maintaining Findutils: (find-maint). Maintaining GNU findutils.
-* Standards: (standards). GNU coding standards.
+GNU LilyPond--the music typesetter
+* LilyPond Learning Manual: (lilypond-learning). Start here.
+* Music Glossary: (music-glossary). For non-English users.
+* LilyPond: (lilypond-notation). LilyPond Notation Reference.
+* LilyPond Snippets: (lilypond-snippets). Short tricks, tips, and examples.
+* LilyPond Internals Reference: (lilypond-internals). Definitions for tweaking.
+* LilyPond Application Usage: (lilypond-usage). Installing and running applications.
+* LilyPond Website: (lilypond-web). Preview of new website.
+* lilypond: (lilypond-usage)Running lilypond. Invoking the LilyPond program.
+* abc2ly: (lilypond-usage)Invoking abc2ly. Importing ABC.
+* convert-ly: (lilypond-usage)Updating files with convert-ly. Older LilyPond versions.
+* etf2ly: (lilypond-usage)Invoking etf2ly. Importing Finale.
+* lilypond-book: (lilypond-usage)lilypond-book. Integrating text and music.
+* midi2ly: (lilypond-usage)Invoking midi2ly. Importing MIDI.
+* musicxml2ly: (lilypond-usage)Invoking musicxml2ly. Importing MusicXML.
-GNU music project
-* LilyPond: (lilypond). The GNU music typesetter.
-* LilyPond internals: (lilypond-internals). LilyPond internals.
-* ly2dvi: (lilypond)Invoking ly2dvi:: Titling LilyPond scores.
-* convert-ly: (lilypond)Invoking convert-ly:: Older LilyPond versions.
-* midi2ly: (lilypond)Invoking midi2ly:: Importing MIDI.
-* etf2ly: (lilypond)Invoking etf2ly:: Importing Finale.
-* abc2ly: (lilypond)Invoking abc2ly:: Importing ABC.
-* pmx2ly: (lilypond)Invoking pmx2ly:: Importing PMX.
-* musedata2ly: (lilypond)Invoking musedata2ly::Importing Musedata.
-* mup2ly: (lilypond)Invoking mup2ly:: Importing MUP.
+Science
+* Asymptote: (asymptote). Vector graphics language.
+* Asymptote FAQ: (asy-faq). FAQ for Asymptote.
+* Octave: (octave). A language for numerical computation.
+* R FAQ: (R-FAQ). The R statistical language FAQ.
+
+System administration
+* GSRC: (gsrc). Building the GNU Source Release Collection.
TeX
-* Afm2tfm: (dvips)Invoking afm2tfm. Making Type 1 fonts available to TeX.
-* Dvips: (dvips). DVI-to-PostScript translator.
-* DVI-to-PNG: (dvipng). DVI to Portable Network Graphics (PNG).
+* Dvipng: (dvipng). DVI to Portable Network Graphics (PNG).
+* Dvips: (dvips). Translating TeX DVI files to PostScript.
* Eplain: (eplain). Expanding on plain TeX.
-* Kpathsearch: (kpathsea). File lookup along search paths.
-* LaTeX: (latex2e). LaTeX2e.
-* MakeIndex: (makeindex). Index creation for TeX.
+* EpsPDF: (epspdf). Portable GUI&cmdline EPS-to-PDF conversion.
+* Kpathsea: (kpathsea). File lookup along search paths.
+* LaTeX2e: (latex2e). LaTeX2e unofficial reference manual.
+* LaTeX2e-es: (latex2e-es). Spanish translation of LaTeX2e.
+* Mf2pt1: (mf2pt1). Make PostScript Type 1 fonts from Metafont.
* Naming TeX fonts: (fontname). Filenames for TeX fonts.
* TDS: (tds). Standard TeX directory structure.
* TeXDraw: (texdraw). Drawing PostScript diagrams within TeX.
-* Web2c: (web2c). TeX, Metafont, and their companion programs.
+* TL-basics: (tlbasics). install-tl and tlmgr.
+* Web2C: (web2c). TeX, Metafont, and companion programs.
+
+Typesetting
+* Font utilities: (fontu). Programs for font manipulation.
+* GV: (gv). The GNU PostScript and PDF viewer.
+* Groff: (groff). The GNU troff document formatting system.
DOS
* GNUish: (gnuish). GNU utilities for DOS.
* Mtools: (mtools). Access DOS disks from Unix.
-Science
-* R FAQ: (R-FAQ). The R statistical language FAQ.
-
-Other things
-* Jargon: (jargon). The jargon file.
-* Netpbm: (netpbm). Images/graphics manipulation programs.
-* JED: (jed). JED editor documentation.
-* Octave: (octave). Octave - A language for numerical computation.
-* PRCS: (prcs). Project revision control system.
-* Screen: (screen). Terminal multiplexer.
+GNU organization
+* Maintain: (maintain). GNU maintainer guidelines.
+* Maintaining Findutils: (find-maint). Maintaining GNU findutils.
+* Quality code: (qualitycode). GNU code quality recommendations.
+* Standards: (standards). GNU coding standards.
Individual utilities
-* aclocal: (automake)Invoking aclocal. Generating aclocal.m4.
-* addr2line: (binutils)addr2line. Convert addresses to file and line.
-* ar: (binutils)ar. Create, modify, and extract from archives.
+* aclocal-invocation: (automake)aclocal Invocation.
+ Generating aclocal.m4.
+* afm2tfm: (dvips)Invoking afm2tfm. Adobe to TeX font metrics.
+* addr2line: (binutils)addr2line. Convert addresses to file and line.
+* ar: (binutils)ar. Create, modify, and extract from archives.
+* arch: (coreutils)arch invocation. Print machine hardware name.
* at-pr: (gnats)at-pr. Bug report timely reminders.
* autoconf: (autoconf)autoconf Invocation. How to create configuration scripts.
-* autoheader: (autoconf)autoheader Invocation. How to create configuration templates
-* autom4te: (autoconf)autom4te Invocation. The Autoconf executables backbone.
-* automake: (automake)Invoking Automake. Generating Makefile.in.
-* autoreconf: (autoconf)autoreconf Invocation. Remaking multiple `configure' scripts
-* autoscan: (autoconf)autoscan Invocation. Semi-automatic `configure.ac' writing
-* autoupdate: (autoconf)autoupdate Invocation. Automatic update of `configure.ac'
+* autoconf-invocation: (autoconf)autoconf Invocation.
+ How to create configuration
+ scripts
+* autoheader: (autoconf)autoheader Invocation. How to create configuration
+ templates
+* autom4te: (autoconf)autom4te Invocation. The Autoconf executables
+ backbone
+* automake-invocation: (automake)automake Invocation.
+ Generating Makefile.in.
+* autoreconf: (autoconf)autoreconf Invocation. Remaking multiple `configure'
+ scripts
+* autoscan: (autoconf)autoscan Invocation. Semi-automatic `configure.ac'
+ writing
+* autoupdate: (autoconf)autoupdate Invocation. Automatic update of
+ `configure.ac'
* awk: (gawk)Invoking gawk. Text scanning and processing.
* base64: (coreutils)base64 invocation. Base64 encode/decode data.
* basename: (coreutils)basename invocation. Strip directory and suffix.
* bibtex: (web2c)BibTeX invocation. Maintaining bibliographies.
* c++filt: (binutils)c++filt. Filter to demangle encoded C++ symbols.
* cat: (coreutils)cat invocation. Concatenate and write files.
+* chcon: (coreutils)chcon invocation. Change SELinux CTX of files.
* chgrp: (coreutils)chgrp invocation. Change file groups.
-* chmod: (coreutils)chmod invocation. Change file permissions.
-* chown: (coreutils)chown invocation. Change file owners/groups.
+* chmod: (coreutils)chmod invocation. Change access permissions.
+* chown: (coreutils)chown invocation. Change file owners and groups.
* chroot: (coreutils)chroot invocation. Specify the root directory.
* cksum: (coreutils)cksum invocation. Print POSIX CRC checksum.
-* cmp: (diff)Invoking cmp. Compare 2 files byte by byte.
+* cmp: (diffutils)Invoking cmp. Compare 2 files byte by byte.
* comm: (coreutils)comm invocation. Compare sorted files by line.
* comsatd: (mailutils)comsatd. Comsat daemon.
-* config.status: (autoconf)config.status Invocation. Recreating configurations.
+* config. status:
+ (autoconf)config.status Invocation. Recreating configurations.
+* config.status: (autoconf)config.status Invocation.
+ Recreating configurations.
* configure: (autoconf)configure Invocation. Configuring a package.
* cp: (coreutils)cp invocation. Copy files.
* csplit: (coreutils)csplit invocation. Split by context.
@@ -293,16 +380,15 @@ Individual utilities
* date: (coreutils)date invocation. Print/set system date and time.
* dd: (coreutils)dd invocation. Copy and convert a file.
* df: (coreutils)df invocation. Report file system disk usage.
-* diff3: (diff)Invoking diff3. Compare 3 files line by line.
-* diff: (diff)Invoking diff. Compare 2 files line by line.
+* diff: (diffutils)Invoking diff. Compare 2 files line by line.
+* diff3: (diffutils)Invoking diff3. Compare 3 files line by line.
* dir: (coreutils)dir invocation. List directories briefly.
* dircolors: (coreutils)dircolors invocation. Color setup for ls.
-* dirname: (coreutils)dirname invocation. Strip non-directory suffix.
+* dirname: (coreutils)dirname invocation. Strip last file name component.
* dlltool: (binutils)dlltool. Create files needed to build and use DLLs.
* dmp: (web2c)Dmp invocation. Troff->MPX (MetaPost pictures).
* du: (coreutils)du invocation. Report on disk usage.
* dvicopy: (web2c)DVIcopy invocation. Virtual font expansion
-* dvipng: (dvipng)Invoking dvipng. A DVI-to-PNG translator.
* dvitomp: (web2c)DVItoMP invocation. DVI to MPX (MetaPost pictures).
* dvitype: (web2c)DVItype invocation. DVI to human-readable text.
* echo: (coreutils)echo invocation. Print a line of text.
@@ -321,24 +407,23 @@ Individual utilities
* fnid: (id-utils)fnid invocation. Looking up file names.
* fold: (coreutils)fold invocation. Wrap long input lines.
* frm: (mailutils)frm. List headers from a mailbox.
-* ftp: (inetutils)ftp invocation. File Transfer Protocol.
+* ftp: (inetutils)ftp invocation. FTP client.
* ftpd: (inetutils)ftpd invocation. FTP Daemon.
* gcal2txt: (gcal)Invoking gcal2txt. Calendar resource to text file.
* gftodvi: (web2c)GFtoDVI invocation. Generic font proofsheets.
* gftopk: (web2c)GFtoPK invocation. Generic to packed fonts.
* gftype: (web2c)GFtype invocation. GF to human-readable text.
-* git: (git). GNU interactive tools.
* groups: (coreutils)groups invocation. Print group names a user is in.
* guimb: (mailutils)guimb. Mailbox processing language.
* gunzip: (gzip)Overview. Decompression.
-* gzexe: (gzip)Overview. Compress executables.
+* gzexe: (gzip)Overview. Compress executables.
* head: (coreutils)head invocation. Output the first part of files.
* hostid: (coreutils)hostid invocation. Print numeric host identifier.
* hostname: (coreutils)hostname invocation. Print or set system name.
* id: (coreutils)id invocation. Print user identity.
* ifnames: (autoconf)ifnames Invocation. Listing conditionals in source.
* imap4d: (mailutils)imap4d. IMAP4 daemon.
-* inetd: (inetutils)inetd invocation. Internet super-server.
+* inetd: (inetutils)inetd invocation. Interner super-server.
* inimf: (web2c)inimf invocation. Initial Metafont.
* inimp: (web2c)inimp invocation. Initial MetaPost.
* initex: (web2c)initex invocation. Initial TeX.
@@ -346,12 +431,13 @@ Individual utilities
* join: (coreutils)join invocation. Join lines on a common field.
* kill: (coreutils)kill invocation. Send a signal to processes.
* kpsewhich: (kpathsea)Invoking kpsewhich. TeX file searching.
+* libtool-invocation: (libtool)Invoking libtool. Running the `libtool' script.
* libtoolize: (libtool)Invoking libtoolize. Adding libtool support.
* lid: (id-utils)lid invocation. Matching words and patterns.
* link: (coreutils)link invocation. Make hard links between files.
* ln: (coreutils)ln invocation. Make links between files.
* locate: (find)Invoking locate. Finding files in a database.
-* logger: (inetutils)logger invocation. Logger.
+* logger: (inetutils)logger invocation. Send messages to system log.
* logname: (coreutils)logname invocation. Print current login name.
* ls: (coreutils)ls invocation. List directory contents.
* mail-files: (sharutils)mail-files invocation. Send files to remote site.
@@ -373,21 +459,22 @@ Individual utilities
* mkfifo: (coreutils)mkfifo invocation. Create FIFOs (named pipes).
* mkid: (id-utils)mkid invocation. Creating an ID database.
* mknod: (coreutils)mknod invocation. Create special files.
+* mktemp: (coreutils)mktemp invocation. Create temporary files.
* mp: (web2c)mp invocation. Creating technical diagrams.
* mpto: (web2c)MPto invocation. MetaPost label extraction.
* mv: (coreutils)mv invocation. Rename files.
-* networking(inet) utilities: (inetutils). GNU networking utilities.
* newer: (web2c)Newer invocation. Compare modification times.
* nice: (coreutils)nice invocation. Modify niceness.
* nl: (coreutils)nl invocation. Number lines and write files.
* nlmconv: (binutils)nlmconv. Converts object code into an NLM.
* nm: (binutils)nm. List symbols from object files.
* nohup: (coreutils)nohup invocation. Immunize to hangups.
+* nproc: (coreutils)nproc invocation. Print the number of processors.
* objcopy: (binutils)objcopy. Copy and translate object files.
* objdump: (binutils)objdump. Display information from object files.
* od: (coreutils)od invocation. Dump files in octal, etc.
* paste: (coreutils)paste invocation. Merge lines of files.
-* patch: (diff)Invoking patch. Apply a patch to a file.
+* patch: (diffutils)Invoking patch. Apply a patch to a file.
* patgen: (web2c)Patgen invocation. Creating hyphenation patterns.
* pathchk: (coreutils)pathchk invocation. Check file name portability.
* ping: (inetutils)ping invocation. Packets to network hosts.
@@ -396,20 +483,22 @@ Individual utilities
* pltotf: (web2c)PLtoTF invocation. Property list to TFM.
* pooltype: (web2c)Pooltype invocation. Display WEB pool files.
* pop3d: (mailutils)pop3d. POP3 daemon.
+* pr: (coreutils)pr invocation. Paginate or columnate files.
* pr-addr: (gnats)pr-addr. Bug report address retrieval.
* pr-edit: (gnats)pr-edit. The edit-pr driver.
-* pr: (coreutils)pr invocation. Paginate or columnate files.
* printenv: (coreutils)printenv invocation. Print environment variables.
* printf: (coreutils)printf invocation. Format and print data.
* ptx: (coreutils)ptx invocation. Produce permuted indexes.
* pwd: (coreutils)pwd invocation. Print working directory.
* query-pr: (gnats)Invoking query-pr. Bug searching/reporting.
* queue-pr: (gnats)queue-pr. Handling incoming traffic.
-* ranlib: (binutils)ranlib. Generate index to archive contents.
-* rcp: (inetutils)rcp invocation. Strip non-directory suffix.
-* readelf: (binutils)readelf. Display the contents of ELF format files.
+* ranlib: (binutils)ranlib. Index archive contents.
+* rcp: (inetutils)rcp invocation. Remote copy.
+* readelf: (binutils)readelf. Display contents of ELF file.
* readlink: (coreutils)readlink invocation. Print referent of a symlink.
* readmsg: (mailutils)readmsg. Extract messages from a folder.
+* realpath: (coreutils)readpath invocation. Print resolved file names.
+* rexec: (inetutils)rexec invocation. Remote execution client.
* rexecd: (inetutils)rexecd invocation. Remote execution server.
* rlogin: (inetutils)rlogin invocation. Remote login.
* rlogind: (inetutils)rlogind invocation. Remote login server.
@@ -417,20 +506,22 @@ Individual utilities
* rmdir: (coreutils)rmdir invocation. Remove empty directories.
* rsh: (inetutils)rsh invocation. Remote shell.
* rshd: (inetutils)rshd invocation. Remote shell server.
-* sdiff: (diff)Invoking sdiff. Merge 2 files side-by-side.
+* runcon: (coreutils)runcon invocation. Run in specified SELinux CTX.
+* sdiff: (diffutils)Invoking sdiff. Merge 2 files side-by-side.
* send-pr: (gnats)Invoking send-pr. Submitting bugs.
* seq: (coreutils)seq invocation. Print numeric sequences
* sha1sum: (coreutils)sha1sum invocation. Print or check SHA-1 digests.
* sha2: (coreutils)sha2 utilities. Print or check SHA-2 digests.
-* shar: (sharutils)shar invocation. Make a shell archive.
+* shar: (sharutils)shar Invocation. Make a shell archive.
* shred: (coreutils)shred invocation. Remove files more securely.
* shuf: (coreutils)shuf invocation. Shuffling text files.
* sieve: (mailutils)sieve. Mail filtering utility.
* size: (binutils)size. List section sizes and total size.
* sleep: (coreutils)sleep invocation. Delay for a specified time.
* sort: (coreutils)sort invocation. Sort text files.
-* split: (coreutils)split invocation. Split into fixed-size pieces.
+* split: (coreutils)split invocation. Split into pieces.
* stat: (coreutils)stat invocation. Report file(system) status.
+* stdbuf: (coreutils)stdbuf invocation. Modify stdio buffering.
* strings: (binutils)strings. List printable strings from files.
* strip: (binutils)strip. Discard symbols.
* stty: (coreutils)stty invocation. Print/change terminal settings.
@@ -447,29 +538,39 @@ Individual utilities
* tar: (tar)tar invocation. Invoking GNU `tar'.
* tcal: (gcal)Invoking tcal. Run Gcal with tomorrow's date.
* tee: (coreutils)tee invocation. Redirect to multiple files.
+* telnet: (inetutils)telnet invocation. User interface to TELNET.
+* telnetd: (inetutils)telnetd invocation. Telnet server.
* test: (coreutils)test invocation. File/string tests.
* testsuite: (autoconf)testsuite Invocation. Running an Autotest test suite.
* tex: (web2c)tex invocation. Typesetting.
* tftopl: (web2c)TFtoPL invocation. TFM -> property list.
-* tftp: (inetutils)tftp invocation. Trivial FTP.
+* tftp: (inetutils)tftp invocation. TFTP client.
+* tftpd: (inetutils)tftpd invocation. TFTP server.
+* timeout: (coreutils)timeout invocation. Run with time limit.
* touch: (coreutils)touch invocation. Change file timestamps.
* tput: (tput)Invoking tput. Termcap in shell scripts.
* tr: (coreutils)tr invocation. Translate characters.
+* traceroute: (inetutils)traceroute invocation. Trace the route to a host.
* true: (coreutils)true invocation. Do nothing, successfully.
+* truncate: (coreutils)truncate invocation. Shrink/extend size of a file.
* tsort: (coreutils)tsort invocation. Topological sort.
* tty: (coreutils)tty invocation. Print terminal name.
* txt2gcal: (gcal)Invoking txt2gcal. Calendar text to resource file.
-* umb-scheme: (umb-scheme). UMB Scheme Interpreter.
* uname: (coreutils)uname invocation. Print system information.
* unexpand: (coreutils)unexpand invocation. Convert spaces to tabs.
* unify: (wdiff)unify invocation. Diff format converter.
* uniq: (coreutils)uniq invocation. Uniquify files.
* unlink: (coreutils)unlink invocation. Removal via unlink(2).
-* unshar: (sharutils)unshar invocation. Explode a shell archive.
+* unshar: (sharutils)unshar Invocation. Explode a shell archive.
* updatedb: (find)Invoking updatedb. Building the locate database.
+* uptime: (coreutils)uptime invocation. Print uptime and load.
* users: (coreutils)users invocation. Print current user names.
-* uudecode: (sharutils)uudecode invocation. Restore file from 7-bits.
-* uuencode: (sharutils)uuencode invocation. Force binary file to 7-bits.
+* uucpd: (inetutils)uucpd invocation. Unix to Unix Copy.
+* uudecode: (sharutils)uudecode Invocation. Restore file from 7-bits.
+* uuencode: (sharutils)uuencode Invocation. Force binary file to 7-bits.
+* vc-chlog: (vc-dwim)vc-chlog Invocation. Changelog writing helper tool.
+* vc-dwim: (vc-dwim)vc-dwim Invocation. Version-control-agnostic diff
+ and commit tool
* vdir: (coreutils)vdir invocation. List directories verbosely.
* vftovp: (web2c)VFtoVP invocation. Virtual font -> virtual pl.
* view-pr: (gnats)Invoking view-pr. Showing bug reports.
@@ -478,9 +579,11 @@ Individual utilities
* virtex: (web2c)virtex invocation. Virgin TeX.
* vptovf: (web2c)VPtoVF invocation. Virtual pl -> virtual font.
* wc: (coreutils)wc invocation. Line, word, and byte counts.
+* wdiff: (wdiff)wdiff invocation. Word difference finder.
* weave: (web2c)Weave invocation. WEB to TeX.
* who: (coreutils)who invocation. Print who is logged in.
* whoami: (coreutils)whoami invocation. Print effective user ID.
+* whois: (inetutils)whois invocation. Whois user interface.
* windmc: (binutils)windmc. Generator for Windows message resources.
* windres: (binutils)windres. Manipulate Windows resources.
* xargs: (find)Invoking xargs. Operating on many files.
diff --git a/util/fix-info-dir b/util/fix-info-dir
deleted file mode 100755
index b1144ed..0000000
--- a/util/fix-info-dir
+++ /dev/null
@@ -1,317 +0,0 @@
-#!/bin/sh
-#fix-info-dir (GNU texinfo)
-VERSION=1.1
-#Copyright (C) 1998, 2003 Free Software Foundation, Inc.
-#fix-info-dir comes with NO WARRANTY, to the extent permitted by law.
-#You may redistribute copies of fix-info-dir
-#under the terms of the GNU General Public License.
-#For more information about these matters, see the files named COPYING."
-#fix-info-dir was derived from update-info and gen-dir-node
-# The skeleton file contains info topic names in the
-# order they should appear in the output. There are three special
-# lines that alter the behavior: a line consisting of just "--" causes
-# the next line to be echoed verbatim to the output. A line
-# containing just "%%" causes all the remaining filenames (wildcards
-# allowed) in the rest of the file to be ignored. A line containing
-# just "!!" exits the script when reached (unless preceded by a line
-# containing just "--").
-#Author: Richard L. Hawes, rhawes@dmapub.dma.org.
-
-# ###SECTION 1### Constants
-set -h 2>/dev/null
-# ENVIRONMENT
-if test -z "$TMPDIR"; then
- TMPDIR="/usr/tmp"
-fi
-if test -z "$LINENO"; then
- LINENO="0"
-fi
-
-MENU_BEGIN='^\*\([ ]\)\{1,\}Menu:'
-MENU_ITEM='^\* ([^ ]).*:([ ])+\('
-MENU_FILTER1='s/^\*\([ ]\)\{1,\}/* /'
-MENU_FILTER2='s/\([ ]\)\{1,\}$//g'
-
-TMP_FILE1="${TMPDIR}/fx${$}.info"
-TMP_FILE2="${TMPDIR}/fy${$}.info"
-TMP_FILE_LIST="$TMP_FILE1 $TMP_FILE2"
-
-TRY_HELP_MSG="Try --help for more information"
-
-# ###SECTION 100### main program
-#variables set by options
-CREATE_NODE=""
-DEBUG=":"
-MODE=""
-#
-Total="0"
-Changed=""
-
-while test "$*"; do
- case "$1" in
- -c|--create) CREATE_NODE="y";;
- --debug) set -eux; DEBUG="set>&2";;
- -d|--delete) MODE="Detect_Invalid";;
- +d);;
- --version)
-cat<<VersionEOF
-fix-info-dir (GNU Texinfo) $VERSION
-Copyright (C) 1998 Free Software Foundation, Inc.
-fix-info-dir comes with NO WARRANTY, to the extent permitted by law.
-You may redistribute copies of fix-info-dir
-under the terms of the GNU General Public License.
-For more information about these matters, see the files named COPYING.
-Author: Richard L. Hawes
-VersionEOF
- exit;;
-
- --help)
-cat<<HelpEndOfFile
-Usage: fix-info-dir [OPTION]... [INFO_DIR/[DIR_FILE]] [SKELETON]
-
-It detects and inserts missing menu items into the info dir file.
-The info dir must be the current directory.
-
-Options:
--c, --create create a new info node
--d, --delete delete invalid menu items (ignore missing menu items)
- --debug print debug information to standard error path
- --help print this help message and exit
- --version print current version and exit
-Backup of the info node has a '.old' suffix added. This is a shell script.
-Environment Variables: TMPDIR
-Email bug reports to bug-texinfo@gnu.org.
-HelpEndOfFile
- exit;;
-
- [-+]*) echo "$0:$LINENO: \"$1\" is not a valid option">&2
- echo "$TRY_HELP_MSG">&2
- exit 2;;
- *) break;;
- esac
- shift
-done
-
-ORIGINAL_DIR=`pwd`
-
-if test "$#" -gt "0"; then
- INFO_DIR="$1"
- shift
-else
- INFO_DIR=$DEFAULT_INFO_DIR
-fi
-
-if test ! -d "${INFO_DIR}"; then
- DIR_FILE=`basename ${INFO_DIR}`;
- INFO_DIR=`dirname ${INFO_DIR}`;
-else
- DIR_FILE="dir"
-fi
-
-cd "$INFO_DIR"||exit
-
-
-if test "$CREATE_NODE"; then
- if test "$#" -gt "0"; then
- if test `expr $1 : /` = '1'; then
- SKELETON="$1"
- else
- SKELETON="$ORIGINAL_DIR/$1"
- fi
- if test ! -r "$SKELETON" && test -f "$SKELETON"; then
- echo "$0:$LINENO: $SKELETON is not readable">&2
- exit 2
- fi
- shift
- else
- SKELETON=/dev/null
-
- fi
-else
- if test ! -f "$DIR_FILE"; then
- echo "$0:$LINENO: $DIR_FILE is irregular or nonexistant">&2
- exit 2
- elif test ! -r "$DIR_FILE"; then
- echo "$0:$LINENO: $DIR_FILE is not readable">&2
- exit 2
- elif test ! -w "$DIR_FILE"; then
- echo "$0:$LINENO: $DIR_FILE is not writeable">&2
- exit 2
- fi
-fi
-
-if test "$#" -gt "0"; then
- echo "$0:$LINENO: Too many parameters">&2
- echo "$TRY_HELP_MSG">&2
- exit 2
-fi
-
-if test -f "$DIR_FILE"; then
- cp "$DIR_FILE" "$DIR_FILE.old"
- echo "Backed up $DIR_FILE to $DIR_FILE.old."
-fi
-
-if test "$CREATE_NODE"; then
- if test "$MODE"; then
- echo "$0:$LINENO: ERROR: Illogical option combination: -d -c">&2
- echo "$TRY_HELP_MSG">&2
- exit 2
- fi
- echo "Creating new Info Node: `pwd`/$DIR_FILE"
- Changed="y"
-
-{
-
- ### output the dir header
- echo "-*- Text -*-"
- echo "This file was generated automatically by $0."
- echo "This version was generated on `date`"
- echo "by `whoami`@`hostname` for `pwd`"
-
- cat<<DIR_FILE_END_OF_FILE
-This is the file .../info/$DIR_FILE, which contains the topmost node of the
-Info hierarchy. The first time you invoke Info you start off
-looking at that node, which is ($DIR_FILE)Top.
-
-
-File: $DIR_FILE Node: Top This is the top of the INFO tree
-
- This (the Directory node) gives a menu of major topics.
- Typing "q" exits, "?" lists all Info commands, "d" returns here,
- "h" gives a primer for first-timers,
- "mEmacs<Return>" visits the Emacs topic, etc.
-
- In Emacs, you can click mouse button 2 on a menu item or cross reference
- to select it.
-
-* Menu: The list of major topics begins on the next line.
-
-DIR_FILE_END_OF_FILE
-
-### go through the list of files in the skeleton. If an info file
-### exists, grab the ENTRY information from it. If an entry exists
-### use it, otherwise create a minimal $DIR_FILE entry.
-
- # Read one line from the file. This is so that we can echo lines with
- # whitespace and quoted characters in them.
- while read fileline; do
- # flag fancy features
- if test ! -z "$echoline"; then # echo line
- echo "$fileline"
- echoline=""
- continue
- elif test "${fileline}" = "--"; then
- # echo the next line
- echoline="1"
- continue
- elif test "${fileline}" = "%%"; then
- # skip remaining files listed in skeleton file
- skip="1"
- continue
- elif test "${fileline}" = "!!"; then
- # quit now
- break
- fi
-
- # handle files if they exist
- for file in $fileline""; do
- fname=
- if test -z "$file"; then
- break
- fi
- # Find the file to operate upon.
- if test -r "$file"; then
- fname="$file"
- elif test -r "${file}.info"; then
- fname="${file}.info"
- elif test -r "${file}.gz"; then
- fname="${file}.gz"
- elif test -r "${file}.info.gz"; then
- fname="${file}.info.gz"
- else
- echo "$0:$LINENO: can't find info file for ${file}?">&2
- continue
- fi
-
- # if we found something and aren't skipping, do the entry
- if test "$skip"; then
- continue
- fi
-
- infoname=`echo $file|sed -e 's/.info$//'`
- entry=`zcat -f $fname|\
- sed -e '1,/START-INFO-DIR-ENTRY/d'\
- -e '/END-INFO-DIR-ENTRY/,$d'`
- if [ ! -z "${entry}" ]; then
- echo "${entry}"
- else
- echo "* ${infoname}: (${infoname})."
- fi
- Total=`expr "$Total" + "1"`
- done
- done
-}>$DIR_FILE<$SKELETON
-fi
-
-trap ' eval "$DEBUG"; rm -f $TMP_FILE_LIST; exit ' 0
-trap ' rm -f $TMP_FILE_LIST
- exit ' 1
-trap ' rm -f $TMP_FILE_LIST
- echo "$0:$LINENO: received INT signal.">&2
- exit ' 2
-trap ' rm -f $TMP_FILE_LIST
- echo "$0:$LINENO: received QUIT signal.">&2
- exit ' 3
-
-sed -e "1,/$MENU_BEGIN/d" -e "$MENU_FILTER1" -e "$MENU_FILTER2"<$DIR_FILE\
-|sed -n -e '/\* /{
-s/).*$//g
-s/\.gz$//
-s/\.info$//
-s/^.*(//p
-}'|sort -u>$TMP_FILE1
-ls -F|sed -e '/\/$/d' -e '/[-.][0-9]/d'\
- -e "/^$DIR_FILE\$/d" -e "/^$DIR_FILE.old\$/d"\
- -e 's/[*@]$//' -e 's/\.gz$//' -e 's/\.info$//'|sort>$TMP_FILE2
-
-if test -z "$MODE"; then
- #Detect Missing
- DONE_MSG="total menu item(s) were inserted into `pwd`/$DIR_FILE"
- for Info_Name in `comm -13 $TMP_FILE1 $TMP_FILE2`; do
- if test -r "$Info_Name"; then
- Info_File="$Info_Name"
- elif test -r "${Info_Name}.info"; then
- Info_File="${Info_Name}.info"
- elif test -r "${Info_Name}.gz"; then
- Info_File="${Info_Name}.gz"
- elif test -r "${Info_Name}.info.gz"; then
- Info_File="${Info_Name}.info.gz"
- else
- echo "$0:$LINENO: can't find info file for ${Info_Name}?">&2
- continue
- fi
- Changed="y"
- if install-info $Info_File $DIR_FILE; then
- Total=`expr "$Total" + "1"`
- fi
- done
-else
- # Detect Invalid
- DONE_MSG="total invalid menu item(s) were removed from `pwd`/$DIR_FILE"
- for Info_Name in `comm -23 $TMP_FILE1 $TMP_FILE2`; do
- Changed="y"
- if install-info --remove $Info_Name $DIR_FILE; then
- Total=`expr "$Total" + "1"`
- fi
- done
-fi
-
-# print summary
-if test "$Changed"; then
- echo "$Total $DONE_MSG"
-else
- echo "Nothing to do"
-fi
-rm -f $TMP_FILE_LIST
-eval "$DEBUG"
-exit 0
diff --git a/util/fixfonts b/util/fixfonts
deleted file mode 100755
index ee2ea71..0000000
--- a/util/fixfonts
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/bin/sh
-# Make links named `lcircle10' for all TFM and GF/PK files, if no
-# lcircle10 files already exist.
-
-# Don't override definition of prefix and/or libdir if they are
-# already defined in the environment.
-if test "z${prefix}" = "z" ; then
- prefix=/usr/local
-else
- # prefix may contain references to other variables, thanks to make.
- eval prefix=\""${prefix}"\"
-fi
-
-if test "z${libdir}" = "z" ; then
- libdir="${prefix}/lib/tex"
-else
- # libdir may contain references to other variables, thanks to make.
- eval libdir=\""${libdir}"\"
-fi
-
-texlibdir="${libdir}"
-texfontdir="${texlibdir}/fonts"
-
-# Directories for the different font formats, in case they're not all
-# stored in one place.
-textfmdir="${textfmdir-${texfontdir}}"
-texpkdir="${texpkdir-${texfontdir}}"
-texgfdir="${texgfdir-${texfontdir}}"
-
-test "z${TMPDIR}" = "z" && TMPDIR="/tmp"
-
-tempfile="${TMPDIR}/circ$$"
-tempfile2="${TMPDIR}/circ2$$"
-
-# EXIT SIGHUP SIGINT SIGQUIT SIGTERM
-#trap 'rm -f "${tempfile}" "${tempfile2}"' 0 1 2 3 15
-
-# Find all the fonts with names that include `circle'.
-(cd "${texfontdir}"; find . -name '*circle*' -print > "${tempfile}")
-
-# If they have lcircle10.tfm, assume everything is there, and quit.
-if grep 'lcircle10\.tfm' "${tempfile}" > /dev/null 2>&1 ; then
- echo "Found lcircle10.tfm."
- exit 0
-fi
-
-# No TFM file for lcircle. Make a link to circle10.tfm if it exists,
-# and then make a link to the bitmap files.
-grep 'circle10\.tfm' "${tempfile}" > "${tempfile2}" \
- || {
- echo "I can't find any circle fonts in ${texfontdir}.
-If it isn't installed somewhere else, you need to get the Metafont sources
-from somewhere, e.g., labrea.stanford.edu:pub/tex/latex/circle10.mf, and
-run Metafont on them."
- exit 1
- }
-
-# We have circle10.tfm. (If we have it more than once, take the first
-# one.) Make the link.
-tempfile2_line1="`sed -ne '1p;q' \"${tempfile2}\"`"
-ln "${tempfile2_line1}" "${textfmdir}/lcircle10.tfm"
-echo "Linked to ${tempfile2_line1}."
-
-# Now make a link for the PK files, if any.
-(cd "${texpkdir}"
- for f in `grep 'circle10.*pk' "${tempfile}"` ; do
- set - `echo "$f" \
- | sed -ne '/\//!s/^/.\//;s/\(.*\)\/\([^\/][^\/]*\)$/\1 \2/;p'`
- ln "$f" "${1}/l${2}"
- echo "Linked to $f."
- done
-)
-
-# And finally for the GF files.
-(cd "${texgfdir}"
- for f in `grep 'circle10.*gf' "${tempfile}"` ; do
- set - `echo "$f" \
- | sed -ne '/\//!s/^/.\//;s/\(.*\)\/\([^\/][^\/]*\)$/\1 \2/;p'`
- ln "$f" "${1}/l${2}"
- echo "Linked to $f."
- done
-)
-
-# eof
diff --git a/util/fixref.gawk b/util/fixref.gawk
deleted file mode 100644
index 4a692f7..0000000
--- a/util/fixref.gawk
+++ /dev/null
@@ -1,143 +0,0 @@
-#! /usr/local/bin/gawk -f
-
-# fixref.awk --- fix xrefs in texinfo documents
-# Copyright 1991, 1998 Arnold David Robbins
-
-# FIXREF is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# FIXREF is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Updated: Jul 21 1992 --- change unknown
-# Updated: Jul 18 1997 --- bug fix
-
-# usage: gawk -f fixref.awk input-file > output-file
-# or if you have #!: fixref.awk input-file > output-file
-
-# Limitations:
-# 1. no more than one cross reference on a line
-# 2. cross references may not cross a newline
-
-BEGIN \
-{
- # we make two passes over the file. To do that we artificially
- # tweak the argument vector to do a variable assignment
-
- if (ARGC != 2) {
- printf("usage: %s texinfo-file\n", ARGV[0]) > "/dev/stderr"
- exit 1
- }
- ARGV[2] = "pass=2"
- ARGV[3] = ARGV[1]
- ARGC = 4
-
- # examine paragraphs
- RS = ""
-
- heading = "@(chapter|appendix|unnumbered|(appendix(sec|subsec|subsubsec))|section|subsection|subsubsection|unnumberedsec|heading|top)"
-
- pass = 1
-
- # put space between paragraphs on output
- ORS = "\n\n"
-}
-
-pass == 1 && NF == 0 { next }
-
-# pass == 1 && /@node/ \
-# bug fix 7/18/96
-pass == 1 && /^@node/ \
-{
- lname = name = ""
- n = split($0, lines, "\n")
- for (i = 1; i <= n; i++) {
- if (lines[i] ~ ("^" heading)) {
- sub(heading, "", lines[i])
- sub(/^[ \t]*/, "", lines[i])
- lname = lines[i]
-# printf "long name is '%s'\n", lines[i]
- } else if (lines[i] ~ /@node/) {
- sub(/@node[ \t]*/, "", lines[i])
- sub(/[ \t]*,.*$/, "", lines[i])
- name = lines[i]
-# printf "node name is '%s'\n", lines[i]
- }
- }
- if (name && lname)
- names[name] = lname
- else if (lname)
- printf("node name for %s missing!\n", lname) > "/dev/stderr"
- else
- printf("long name for %s missing!\n", name) > "/dev/stderr"
-
- if (name ~ /:/)
- printf("node `%s' contains a `:'\n", name) > "/dev/stderr"
-
- if (lname) {
- if (lname ~ /:/)
- printf("name `%s' contains a `:'\n", lname) > "/dev/stderr"
- else if (lname ~ /,/) {
- printf("name `%s' contains a `,'\n", lname) > "/dev/stderr"
- gsub(/,/, " ", lname)
- names[name] = lname # added 7/18/97
- }
- }
-}
-
-pass == 2 && /@(x|px)?ref{/ \
-{
- # split the paragraph into lines
- # write them out one by one after fixing them
- n = split($0, lines, "\n")
- for (i = 1; i <= n; i++)
- if (lines[i] ~ /@(x|px)?ref{/) {
- res = updateref(lines[i])
- printf "%s\n", res
- } else
- printf "%s\n", lines[i]
-
- printf "\n" # avoid ORS
- next
-}
-
-function updateref(orig, refkind, line)
-{
- line = orig # work on a copy
-
- # find the beginning of the reference
- match(line, "@(x|px)?ref{")
- refkind = substr(line, RSTART, RLENGTH)
-
- # pull out just the node name
- sub(/.*ref{/, "", line)
- sub(/}.*$/, "", line)
- sub(/,.*/, "", line)
-
-# debugging
-# printf("found ref to node '%s'\n", line) > "/dev/stderr"
-
- # If the node name and the section name are the same
- # we don't want to bother doing this.
-
- if (! (line in names)) # sanity checking
- printf("no long name for %s\n", line) > "/dev/stderr"
- else if (names[line] != line && names[line] !~ /[:,]/) {
- # build up new ref
- newref = refkind line ", ," names[line] "}"
- pat = refkind line "[^}]*}"
-
- sub(pat, newref, orig)
- }
-
- return orig
-}
-
-pass == 2 { print }
diff --git a/util/gdoc b/util/gdoc
deleted file mode 100644
index 3c52fb0..0000000
--- a/util/gdoc
+++ /dev/null
@@ -1,914 +0,0 @@
-#!/usr/bin/perl
-
-## Copyright (c) 2002, 2003 Simon Josefsson ##
-## added -texinfo, -listfunc ##
-## man page revamp ##
-## various improvements ##
-## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ##
-## hacked to allow -tex option --nmav ##
-## ##
-## This software falls under the GNU Public License. Please read ##
-## the COPYING file for more information ##
-
-#
-# This will read a 'c' file and scan for embedded comments in the
-# style of gnome comments (+minor extensions - see below).
-#
-# This program is modified by Nikos Mavroyanopoulos, for the gnutls
-# project.
-
-# Note: This only supports 'c'.
-
-# usage:
-# gdoc [ -docbook | -html | -text | -man | -tex | -texinfo | -listfunc ]
-# [ -sourceversion verno ] [ -includefuncprefix ] [ -bugsto address ]
-# [ -seeinfo infonode ] [ -copyright notice ] [ -verbatimcopying ]
-# [ -function funcname [ -function funcname ...] ] c file(s)s > outputfil
-e
-#
-# Set output format using one of -docbook, -html, -text, -man, -tex,
-# -texinfo, or -listfunc. Default is man.
-#
-# -sourceversion
-# Version number for source code, e.g. '1.0.4'. Used in 'man' headers.
-# Defaults to using current date.
-#
-# -includefuncprefix
-# For man pages, generate a #include <FILE.h> based on the function
-# prefix. For example, a function gss_init_sec_context will generate
-# an include statement of #include <gss.h>.
-#
-# -bugsto address
-# For man pages, include a section about reporting bugs and mention
-# the given e-mail address, e.g 'bug-libidn@gnu.org'.
-#
-# -seeinfo infonode
-# For man pages, include a section that point to an info manual
-# for more information.
-#
-# -copyright notice
-# For man pages, include a copyright section with the given
-# notice after a preamble. Use, e.g., '2002, 2003 Simon Josefsson'.
-#
-# -verbatimcopying
-# For man pages, and when the -copyright parameter is used,
-# add a licensing statement that say verbatim copying is permitted.
-#
-# -function funcname
-# If set, then only generate documentation for the given function(s). A
-ll
-# other functions are ignored.
-#
-# c files - list of 'c' files to process
-#
-# All output goes to stdout, with errors to stderr.
-
-#
-# format of comments.
-# In the following table, (...)? signifies optional structure.
-# (...)* signifies 0 or more structure elements
-# /**
-# * function_name(:)? (- short description)?
-# (* @parameterx: (description of parameter x)?)*
-# (* a blank line)?
-# * (Description:)? (Description of function)?
-# * (Section header: (section description)? )*
-# (*)?*/
-#
-# So .. the trivial example would be:
-#
-# /**
-# * my_function
-# **/
-#
-# If the Description: header tag is ommitted, then there must be a blank line
-# after the last parameter specification.
-# e.g.
-# /**
-# * my_function - does my stuff
-# * @my_arg: its mine damnit
-# *
-# * Does my stuff explained.
-# */
-#
-# or, could also use:
-# /**
-# * my_function - does my stuff
-# * @my_arg: its mine damnit
-# * Description: Does my stuff explained.
-# */
-# etc.
-#
-# All descriptions can be multiline, apart from the short function description
-.
-#
-# All descriptive text is further processed, scanning for the following specia
-l
-# patterns, which are highlighted appropriately.
-#
-# 'funcname()' - function
-# '$ENVVAR' - environmental variable
-# '&struct_name' - name of a structure
-# '@parameter' - name of a parameter
-# '%CONST' - name of a constant.
-
-#
-# Extensions for LaTeX:
-#
-# 1. the symbol '->' will be replaced with a rightarrow
-# 2. x^y with ${x}^{y}$.
-# 3. xxx\: with xxx:
-
-use POSIX qw(strftime);
-
-# match expressions used to find embedded type information
-$type_constant = "\\\%(\\w+)";
-$type_func = "(\\w+\\(\\))";
-$type_param = "\\\@(\\w+)";
-$type_struct = "\\\&(\\w+)";
-$type_env = "(\\\$\\w+)";
-
-
-# Output conversion substitutions.
-# One for each output format
-
-# these work fairly well
-%highlights_html = ( $type_constant, "<i>\$1</i>",
- $type_func, "<b>\$1</b>",
- $type_struct, "<i>\$1</i>",
- $type_param, "<tt><b>\$1</b></tt>" );
-$blankline_html = "<p>";
-
-%highlights_texinfo = ( $type_constant, "\\\@var{\$1}",
- $type_func, "\\\@code{\$1}",
- $type_struct, "\\\@code{\$1}",
- $type_param, "\\\@code{\$1}" );
-$blankline_texinfo = "";
-
-%highlights_tex = ( $type_constant, "{\\\\it \$1}",
- $type_func, "{\\\\bf \$1}",
- $type_struct, "{\\\\it \$1}",
- $type_param, "{\\\\bf \$1}" );
-$blankline_tex = "\\\\";
-
-# sgml, docbook format
-%highlights_sgml = ( $type_constant, "<replaceable class=\"option\">\$1</repla
-ceable>",
- $type_func, "<function>\$1</function>",
- $type_struct, "<structname>\$1</structname>",
- $type_env, "<envar>\$1</envar>",
- $type_param, "<parameter>\$1</parameter>" );
-$blankline_sgml = "</para><para>\n";
-
-# these are pretty rough
-%highlights_man = ( $type_constant, "\\n.I \\\"\$1\\\"\\n",
- $type_func, "\\n.B \\\"\$1\\\"\\n",
- $type_struct, "\\n.I \\\"\$1\\\"\\n",
- $type_param."([\.\, ]*)\n?", "\\n.I \\\"\$1\$2\\\"\\n" );
-$blankline_man = "";
-
-# text-mode
-%highlights_text = ( $type_constant, "\$1",
- $type_func, "\$1",
- $type_struct, "\$1",
- $type_param, "\$1" );
-$blankline_text = "";
-
-
-sub usage {
- print "Usage: $0 [ -v ] [ -docbook | -html | -text | -man | -tex | -texinf
-o -listfunc ]\n";
- print " [ -sourceversion verno ] [ -includefuncprefix ]\n";
- print " [ -bugsto address ] [ -seeinfo infonode ] [ -copyright not
-ice]\n";
- print " [ -verbatimcopying ]\n";
- print " [ -function funcname [ -function funcname ...] ]\n";
- print " c source file(s) > outputfile\n";
- exit 1;
-}
-
-# read arguments
-if ($#ARGV==-1) {
- usage();
-}
-
-$verbose = 0;
-$output_mode = "man";
-%highlights = %highlights_man;
-$blankline = $blankline_man;
-$modulename = "API Documentation";
-$sourceversion = strftime "%Y-%m-%d", localtime;
-$function_only = 0;
-while ($ARGV[0] =~ m/^-(.*)/) {
- $cmd = shift @ARGV;
- if ($cmd eq "-html") {
- $output_mode = "html";
- %highlights = %highlights_html;
- $blankline = $blankline_html;
- } elsif ($cmd eq "-man") {
- $output_mode = "man";
- %highlights = %highlights_man;
- $blankline = $blankline_man;
- } elsif ($cmd eq "-tex") {
- $output_mode = "tex";
- %highlights = %highlights_tex;
- $blankline = $blankline_tex;
- } elsif ($cmd eq "-texinfo") {
- $output_mode = "texinfo";
- %highlights = %highlights_texinfo;
- $blankline = $blankline_texinfo;
- } elsif ($cmd eq "-text") {
- $output_mode = "text";
- %highlights = %highlights_text;
- $blankline = $blankline_text;
- } elsif ($cmd eq "-docbook") {
- $output_mode = "sgml";
- %highlights = %highlights_sgml;
- $blankline = $blankline_sgml;
- } elsif ($cmd eq "-listfunc") {
- $output_mode = "listfunc";
- } elsif ($cmd eq "-module") { # not needed for sgml, inherits from calling
- document
- $modulename = shift @ARGV;
- } elsif ($cmd eq "-sourceversion") {
- $sourceversion = shift @ARGV;
- } elsif ($cmd eq "-includefuncprefix") {
- $includefuncprefix = 1;
- } elsif ($cmd eq "-bugsto") {
- $bugsto = shift @ARGV;
- } elsif ($cmd eq "-copyright") {
- $copyright = shift @ARGV;
- } elsif ($cmd eq "-verbatimcopying") {
- $verbatimcopying = 1;
- } elsif ($cmd eq "-seeinfo") {
- $seeinfo = shift @ARGV;
- } elsif ($cmd eq "-function") { # to only output specific functions
- $function_only = 1;
- $function = shift @ARGV;
- $function_table{$function} = 1;
- } elsif ($cmd eq "-v") {
- $verbose = 1;
- } elsif (($cmd eq "-h") || ($cmd eq "--help")) {
- usage();
- }
-}
-
-##
-# dumps section contents to arrays/hashes intended for that purpose.
-#
-sub dump_section {
- my $name = shift @_;
- my $contents = join "\n", @_;
-
- if ($name =~ m/$type_constant/) {
- $name = $1;
-# print STDERR "constant section '$1' = '$contents'\n";
- $constants{$name} = $contents;
- } elsif ($name =~ m/$type_param/) {
-# print STDERR "parameter def '$1' = '$contents'\n";
- $name = $1;
- $parameters{$name} = $contents;
- } else {
-# print STDERR "other section '$name' = '$contents'\n";
- $sections{$name} = $contents;
- push @sectionlist, $name;
- }
-}
-
-##
-# output function
-#
-# parameters, a hash.
-# function => "function name"
-# parameterlist => @list of parameters
-# parameters => %parameter descriptions
-# sectionlist => @list of sections
-# sections => %descriont descriptions
-#
-
-sub repstr {
- $pattern = shift;
- $repl = shift;
- $match1 = shift;
- $match2 = shift;
- $match3 = shift;
- $match4 = shift;
-
- $output = $repl;
- $output =~ s,\$1,$match1,g;
- $output =~ s,\$2,$match2,g;
- $output =~ s,\$3,$match3,g;
- $output =~ s,\$4,$match4,g;
-
- eval "\$return = qq/$output/";
-
-# print "pattern $pattern matched 1=$match1 2=$match2 3=$match3 4=$match4 r
-eplace $repl yielded $output interpolated $return\n";
-
- $return;
-}
-
-sub output_highlight {
- my $contents = join "\n", @_;
- my $line;
-
- foreach $pattern (keys %highlights) {
-# print "scanning pattern $pattern ($highlights{$pattern})\n";
- $contents =~ s:$pattern:repstr($pattern, $highlights{$pattern}, $1, $2
-, $3, $4):gse;
- }
- foreach $line (split "\n", $contents) {
- if ($line eq ""){
- print $lineprefix, $blankline;
- } else {
- print $lineprefix, $line;
- }
- print "\n";
- }
-}
-
-sub just_highlight {
- my $contents = join "\n", @_;
- my $line;
- my $ret = "";
-
- foreach $pattern (keys %highlights) {
-# print "scanning pattern $pattern ($highlights{$pattern})\n";
- $contents =~ s:$pattern:repstr($pattern, $highlights{$pattern}, $1, $2
-, $3, $4):gse;
- }
- foreach $line (split "\n", $contents) {
- if ($line eq ""){
- $ret = $ret . $lineprefix . $blankline;
- } else {
- $ret = $ret . $lineprefix . $line;
- }
- $ret = $ret . "\n";
- }
-
- return $ret;
-}
-
-# output in texinfo
-sub output_texinfo {
- my %args = %{$_[0]};
- my ($parameter, $section);
- my $count;
-
- print "\@deftypefun {" . $args{'functiontype'} . "} ";
- print "{".$args{'function'}."} ";
- print "(";
- $count = 0;
- foreach $parameter (@{$args{'parameterlist'}}) {
- print $args{'parametertypes'}{$parameter}." \@var{".$parameter."}";
- if ($count != $#{$args{'parameterlist'}}) {
- $count++;
- print ", ";
- }
- }
- print ")\n";
- foreach $parameter (@{$args{'parameterlist'}}) {
- if ($args{'parameters'}{$parameter}) {
- print "\@var{".$parameter."}: ";
- output_highlight($args{'parameters'}{$parameter});
- print "\n";
- }
- }
- foreach $section (@{$args{'sectionlist'}}) {
- print "\n\@strong{$section:} " if $section ne $section_default;
- $args{'sections'}{$section} =~ s:([{}]):\@\1:gs;
- output_highlight($args{'sections'}{$section});
- }
- print "\@end deftypefun\n\n";
-}
-
-# output in html
-sub output_html {
- my %args = %{$_[0]};
- my ($parameter, $section);
- my $count;
- print "\n\n<a name=\"". $args{'function'} . "\">&nbsp</a><h2>Function</h2>
-\n";
-
- print "<i>".$args{'functiontype'}."</i>\n";
- print "<b>".$args{'function'}."</b>\n";
- print "(";
- $count = 0;
- foreach $parameter (@{$args{'parameterlist'}}) {
- print "<i>".$args{'parametertypes'}{$parameter}."</i> <b>".$parameter.
-"</b>\n";
- if ($count != $#{$args{'parameterlist'}}) {
- $count++;
- print ", ";
- }
- }
- print ")\n";
-
- print "<h3>Arguments</h3>\n";
- print "<dl>\n";
- foreach $parameter (@{$args{'parameterlist'}}) {
- print "<dt><i>".$args{'parametertypes'}{$parameter}."</i> <b>".$parame
-ter."</b>\n";
- print "<dd>";
- output_highlight($args{'parameters'}{$parameter});
- }
- print "</dl>\n";
- foreach $section (@{$args{'sectionlist'}}) {
- print "<h3>$section</h3>\n";
- print "<ul>\n";
- output_highlight($args{'sections'}{$section});
- print "</ul>\n";
- }
- print "<hr>\n";
-}
-
-# output in tex
-sub output_tex {
- my %args = %{$_[0]};
- my ($parameter, $section);
- my $count;
- my $func = $args{'function'};
- my $param;
- my $param2;
- my $sec;
- my $check;
- my $type;
-
- $func =~ s/_/\\_/g;
-
- print "\n\n\\subsection{". $func . "}\n\\label{" . $args{'function'} . "}\
-n";
-
- $type = $args{'functiontype'};
- $type =~ s/_/\\_/g;
-
- print "{\\it ".$type."}\n";
- print "{\\bf ".$func."}\n";
- print "(";
- $count = 0;
- foreach $parameter (@{$args{'parameterlist'}}) {
- $param = $args{'parametertypes'}{$parameter};
- $param2 = $parameter;
- $param =~ s/_/\\_/g;
- $param2 =~ s/_/\\_/g;
-
- print "{\\it ".$param."} {\\bf ".$param2."}";
- if ($count != $#{$args{'parameterlist'}}) {
- $count++;
- print ", ";
- }
- }
- print ")\n";
-
- print "\n{\\large{Arguments}}\n";
-
- print "\\begin{itemize}\n";
- $check=0;
- foreach $parameter (@{$args{'parameterlist'}}) {
- $param1 = $args{'parametertypes'}{$parameter};
- $param1 =~ s/_/\\_/g;
- $param2 = $parameter;
- $param2 =~ s/_/\\_/g;
-
- $check = 1;
- print "\\item {\\it ".$param1."} {\\bf ".$param2."}: \n";
-# print "\n";
-
- $param3 = $args{'parameters'}{$parameter};
- $param3 =~ s/&([a-zA-Z\_]+)/{\\it \1}/g;
-
- $out = just_highlight($param3);
- $out =~ s/_/\\_/g;
- print $out;
- }
- if ($check==0) {
- print "\\item void\n";
- }
- print "\\end{itemize}\n";
-
- foreach $section (@{$args{'sectionlist'}}) {
- $sec = $section;
- $sec =~ s/_/\\_/g;
- $sec =~ s/&([a-zA-Z\_]+)/{\\it \1}/g;
-
- print "\n{\\large{$sec}}\\\\\n";
- print "\\begin{rmfamily}\n";
-
- $sec = $args{'sections'}{$section};
- $sec =~ s/\\:/:/g;
- $sec =~ s/&([a-zA-Z\_]+)/{\\it \1}/g;
- $sec =~ s/->/\$\\rightarrow\$/g;
- $sec =~ s/([0-9]+)\^([0-9]+)/\$\{\1\}\^\{\2\}\$/g;
-
- $out = just_highlight($sec);
- $out =~ s/_/\\_/g;
-
- print $out;
- print "\\end{rmfamily}\n";
- }
- print "\n";
-}
-
-
-# output in sgml DocBook
-sub output_sgml {
- my %args = %{$_[0]};
- my ($parameter, $section);
- my $count;
- my $id;
-
- $id = $args{'module'}."-".$args{'function'};
- $id =~ s/[^A-Za-z0-9]/-/g;
-
- print "<refentry>\n";
- print "<refmeta>\n";
- print "<refentrytitle><phrase id=\"$id\">".$args{'function'}."</phrase></r
-efentrytitle>\n";
- print "</refmeta>\n";
- print "<refnamediv>\n";
- print " <refname>".$args{'function'}."</refname>\n";
- print " <refpurpose>\n";
- print " ".$args{'purpose'}."\n";
- print " </refpurpose>\n";
- print "</refnamediv>\n";
-
- print "<refsynopsisdiv>\n";
- print " <title>Synopsis</title>\n";
- print " <funcsynopsis>\n";
- print " <funcdef>".$args{'functiontype'}." ";
- print "<function>".$args{'function'}." ";
- print "</function></funcdef>\n";
-
-# print "<refsect1>\n";
-# print " <title>Synopsis</title>\n";
-# print " <funcsynopsis>\n";
-# print " <funcdef>".$args{'functiontype'}." ";
-# print "<function>".$args{'function'}." ";
-# print "</function></funcdef>\n";
-
- $count = 0;
- if ($#{$args{'parameterlist'}} >= 0) {
- foreach $parameter (@{$args{'parameterlist'}}) {
- print " <paramdef>".$args{'parametertypes'}{$parameter};
- print " <parameter>$parameter</parameter></paramdef>\n";
- }
- } else {
- print " <void>\n";
- }
- print " </funcsynopsis>\n";
- print "</refsynopsisdiv>\n";
-# print "</refsect1>\n";
-
- # print parameters
- print "<refsect1>\n <title>Arguments</title>\n";
-# print "<para>\nArguments\n";
- if ($#{$args{'parameterlist'}} >= 0) {
- print " <variablelist>\n";
- foreach $parameter (@{$args{'parameterlist'}}) {
- print " <varlistentry>\n <term><parameter>$parameter</parameter
-></term>\n";
- print " <listitem>\n <para>\n";
- $lineprefix=" ";
- output_highlight($args{'parameters'}{$parameter});
- print " </para>\n </listitem>\n </varlistentry>\n";
- }
- print " </variablelist>\n";
- } else {
- print " <para>\n None\n </para>\n";
- }
- print "</refsect1>\n";
-
- # print out each section
- $lineprefix=" ";
- foreach $section (@{$args{'sectionlist'}}) {
- print "<refsect1>\n <title>$section</title>\n <para>\n";
-# print "<para>\n$section\n";
- if ($section =~ m/EXAMPLE/i) {
- print "<example><para>\n";
- }
- output_highlight($args{'sections'}{$section});
-# print "</para>";
- if ($section =~ m/EXAMPLE/i) {
- print "</para></example>\n";
- }
- print " </para>\n</refsect1>\n";
- }
-
- print "\n\n";
-}
-
-##
-# output in man
-sub output_man {
- my %args = %{$_[0]};
- my ($parameter, $section);
- my $count;
-
- print ".TH \"$args{'function'}\" 3 \"$args{'sourceversion'}\" \"". $args{'
-module'} . "\" \"". $args{'module'} . "\"\n";
-
- print ".SH NAME\n";
-
- print $args{'function'}."\n";
-
- print ".SH SYNOPSIS\n";
- print ".B #include <". lc((split /_/, $args{'function'})[0]) . ".h>\n"
- if $args{'includefuncprefix'};
- print ".sp\n";
- print ".BI \"".$args{'functiontype'}." ".$args{'function'}."(";
- $count = 0;
- foreach $parameter (@{$args{'parameterlist'}}) {
- print $args{'parametertypes'}{$parameter}." \" ".$parameter." \"";
- if ($count != $#{$args{'parameterlist'}}) {
- $count++;
- print ", ";
- }
- }
- print ");\"\n";
-
- print ".SH ARGUMENTS\n";
- foreach $parameter (@{$args{'parameterlist'}}) {
- print ".IP \"".$args{'parametertypes'}{$parameter}." ".$parameter."\"
-12\n";
- output_highlight($args{'parameters'}{$parameter});
- }
- foreach $section (@{$args{'sectionlist'}}) {
- print ".SH \"" . uc($section) . "\"\n";
- output_highlight($args{'sections'}{$section});
- }
-
- if ($args{'bugsto'}) {
- print ".SH \"REPORTING BUGS\"\n";
- print "Report bugs to <". $args{'bugsto'} . ">.\n";
- }
-
- if ($args{'copyright'}) {
- print ".SH COPYRIGHT\n";
- print "Copyright \\(co ". $args{'copyright'} . ".\n";
- if ($args{'verbatimcopying'}) {
- print ".br\n";
- print "Permission is granted to make and distribute verbatim copie
-s of this\n";
- print "manual provided the copyright notice and this permission no
-tice are\n";
- print "preserved on all copies.\n";
- }
- }
-
- if ($args{'seeinfo'}) {
- print ".SH \"SEE ALSO\"\n";
- print "The full documentation for\n";
- print ".B " . $args{'module'} . "\n";
- print "is maintained as a Texinfo manual. If the\n";
- print ".B info\n";
- print "and\n";
- print ".B " . $args{'module'} . "\n";
- print "programs are properly installed at your site, the command\n";
- print ".IP\n";
- print ".B info " . $args{'seeinfo'} . "\n";
- print ".PP\n";
- print "should give you access to the complete manual.\n";
- }
-}
-
-sub output_listfunc {
- my %args = %{$_[0]};
- print $args{'function'} . "\n";
-}
-
-##
-# output in text
-sub output_text {
- my %args = %{$_[0]};
- my ($parameter, $section);
-
- print "Function = ".$args{'function'}."\n";
- print " return type: ".$args{'functiontype'}."\n\n";
- foreach $parameter (@{$args{'parameterlist'}}) {
- print " ".$args{'parametertypes'}{$parameter}." ".$parameter."\n";
- print " -> ".$args{'parameters'}{$parameter}."\n";
- }
- foreach $section (@{$args{'sectionlist'}}) {
- print " $section:\n";
- print " -> ";
- output_highlight($args{'sections'}{$section});
- }
-}
-
-##
-# generic output function - calls the right one based
-# on current output mode.
-sub output_function {
-# output_html(@_);
- eval "output_".$output_mode."(\@_);";
-}
-
-
-##
-# takes a function prototype and spits out all the details
-# stored in the global arrays/hsahes.
-sub dump_function {
- my $prototype = shift @_;
-
- if ($prototype =~ m/^()([a-zA-Z0-9_~:]+)\s*\(([^\)]*)\)/ ||
- $prototype =~ m/^(\w+)\s+([a-zA-Z0-9_~:]+)\s*\(([^\)]*)\)/ ||
- $prototype =~ m/^(\w+\s*\*)\s*([a-zA-Z0-9_~:]+)\s*\(([^\)]*)\)/ ||
- $prototype =~ m/^(\w+\s+\w+)\s+([a-zA-Z0-9_~:]+)\s*\(([^\)]*)\)/ ||
- $prototype =~ m/^(\w+\s+\w+\s*\*)\s*([a-zA-Z0-9_~:]+)\s*\(([^\)]*)\)/)
- {
- $return_type = $1;
- $function_name = $2;
- $args = $3;
-
-# print STDERR "ARGS = '$args'\n";
-
- foreach $arg (split ',', $args) {
- # strip leading/trailing spaces
- $arg =~ s/^\s*//;
- $arg =~ s/\s*$//;
-# print STDERR "SCAN ARG: '$arg'\n";
- @args = split('\s', $arg);
-
-# print STDERR " -> @args\n";
- $param = pop @args;
-# print STDERR " -> @args\n";
- if ($param =~ m/^(\*+)(.*)/) {
- $param = $2;
- push @args, $1;
- }
- if ($param =~ m/^(.*)(\[\])$/) {
- $param = $1;
- push @args, $2;
- }
-# print STDERR " :> @args\n";
- $type = join " ", @args;
-
- if ($parameters{$param} eq "" && $param != "void") {
- $parameters{$param} = "-- undescribed --";
- print STDERR "Warning($lineno): Function parameter '$param' no
-t described in '$function_name'\n";
- }
-
- push @parameterlist, $param;
- $parametertypes{$param} = $type;
-
-# print STDERR "param = '$param', type = '$type'\n";
- }
- } else {
- print STDERR "Error($lineno): cannot understand prototype: '$prototype
-'\n";
- return;
- }
-
- if ($function_only==0 || defined($function_table{$function_name})) {
- output_function({'function' => $function_name,
- 'module' => $modulename,
- 'sourceversion' => $sourceversion,
- 'includefuncprefix' => $includefuncprefix,
- 'bugsto' => $bugsto,
- 'copyright' => $copyright,
- 'verbatimcopying' => $verbatimcopying,
- 'seeinfo' => $seeinfo,
- 'functiontype' => $return_type,
- 'parameterlist' => \@parameterlist,
- 'parameters' => \%parameters,
- 'parametertypes' => \%parametertypes,
- 'sectionlist' => \@sectionlist,
- 'sections' => \%sections,
- 'purpose' => $function_purpose
- });
- }
-}
-
-######################################################################
-# main
-# states
-# 0 - normal code
-# 1 - looking for function name
-# 2 - scanning field start.
-# 3 - scanning prototype.
-$state = 0;
-$section = "";
-
-$doc_special = "\@\%\$\&";
-
-$doc_start = "^/\\*\\*\$";
-$doc_end = "\\*/";
-$doc_com = "\\s*\\*\\s*";
-$doc_func = $doc_com."(\\w+):?";
-$doc_sect = $doc_com."([".$doc_special."[:upper:]][\\w ]+):(.*)";
-$doc_content = $doc_com."(.*)";
-
-%constants = ();
-%parameters = ();
-@parameterlist = ();
-%sections = ();
-@sectionlist = ();
-
-$contents = "";
-$section_default = "Description"; # default section
-$section = $section_default;
-
-$lineno = 0;
-foreach $file (@ARGV) {
- if (!open(IN,"<$file")) {
- print STDERR "Error: Cannot open file $file\n";
- next;
- }
- while (<IN>) {
- $lineno++;
-
- if ($state == 0) {
- if (/$doc_start/o) {
- $state = 1; # next line is always the function nam
-e
- }
- } elsif ($state == 1) { # this line is the function name (always)
- if (/$doc_func/o) {
- $function = $1;
- $state = 2;
- if (/-(.*)/) {
- $function_purpose = $1;
- } else {
- $function_purpose = "";
- }
- if ($verbose) {
- print STDERR "Info($lineno): Scanning doc for $function\n"
-;
- }
- } else {
- print STDERR "WARN($lineno): Cannot understand $_ on line $lin
-eno",
- " - I thought it was a doc line\n";
- $state = 0;
- }
- } elsif ($state == 2) { # look for head: lines, and include content
- if (/$doc_sect/o) {
- $newsection = $1;
- $newcontents = $2;
-
- if ($contents ne "") {
- dump_section($section, $contents);
- $section = $section_default;
- }
-
- $contents = $newcontents;
- if ($contents ne "") {
- $contents .= "\n";
- }
- $section = $newsection;
- } elsif (/$doc_end/) {
-
- if ($contents ne "") {
- dump_section($section, $contents);
- $section = $section_default;
- $contents = "";
- }
-
-# print STDERR "end of doc comment, looking for prototype\n";
- $prototype = "";
- $state = 3;
- } elsif (/$doc_content/) {
- # miguel-style comment kludge, look for blank lines after
- # @parameter line to signify start of description
- if ($1 eq "" && $section =~ m/^@/) {
- dump_section($section, $contents);
- $section = $section_default;
- $contents = "";
- } else {
- $contents .= $1."\n";
- }
- } else {
- # i dont know - bad line? ignore.
- print STDERR "WARNING($lineno): bad line: $_";
- }
- } elsif ($state == 3) { # scanning for function { (end of prototype)
- if (m#\s*/\*\s+MACDOC\s*#io) {
- # do nothing
- }
- elsif (/([^\{]*)/) {
- $prototype .= $1;
- }
- if (/\{/) {
- $prototype =~ s@/\*.*?\*/@@gos; # strip comments.
- $prototype =~ s@[\r\n]+@ @gos; # strip newlines/cr's.
- $prototype =~ s@^ +@@gos; # strip leading spaces
- dump_function($prototype);
-
- $function = "";
- %constants = ();
- %parameters = ();
- %parametertypes = ();
- @parameterlist = ();
- %sections = ();
- @sectionlist = ();
- $prototype = "";
-
- $state = 0;
- }
- }
- }
-}
-
-
-
diff --git a/util/gen-dir-node b/util/gen-dir-node
deleted file mode 100755
index 262bdd7..0000000
--- a/util/gen-dir-node
+++ /dev/null
@@ -1,212 +0,0 @@
-#!/bin/sh
-# $Id: gen-dir-node,v 1.3 2004/04/11 17:56:47 karl Exp $
-# Generate the top-level Info node, given a directory of Info files
-# and (optionally) a skeleton file. The output will be suitable for a
-# top-level dir file. The skeleton file contains info topic names in the
-# order they should appear in the output. There are three special
-# lines that alter the behavior: a line consisting of just "--" causes
-# the next line to be echoed verbatim to the output. A line
-# containing just "%%" causes all the remaining filenames (wildcards
-# allowed) in the rest of the file to be ignored. A line containing
-# just "!!" exits the script when reached (unless preceded by a line
-# containing just "--"). Once the script reaches the end of the
-# skeleton file, it goes through the remaining files in the directory
-# in order, putting their entries at the end. The script will use the
-# ENTRY information in each info file if it exists. Otherwise it will
-# make a minimal entry.
-
-# sent by Jeffrey Osier <jeffrey@cygnus.com>, who thinks it came from
-# zoo@winternet.com (david d `zoo' zuhn)
-
-# modified 7 April 1995 by Joe Harrington <jh@tecate.gsfc.nasa.gov> to
-# take special flags
-
-INFODIR=$1
-if [ $# = 2 ] ; then
- SKELETON=$2
-else
- SKELETON=/dev/null
-fi
-
-skip=
-
-if [ $# -gt 2 ] ; then
- echo usage: $0 info-directory [ skeleton-file ] 1>&2
- exit 1
-elif [ -z "${INFODIR}" ] ; then
- INFODIR="%%DEFAULT_INFO_DIR%%"
-else
- true
-fi
-
-if [ ! -d ${INFODIR} ] ; then
- echo "$0: first argument must specify a directory"
- exit 1
-fi
-
-### output the dir header
-echo "-*- Text -*-"
-echo "This file was generated automatically by $0."
-echo "This version was generated on `date`"
-echo "by `whoami`@`hostname` for `(cd ${INFODIR}; pwd)`"
-
-cat << moobler
-\$Id: gen-dir-node,v 1.3 2004/04/11 17:56:47 karl Exp $
-This is the file .../info/dir, which contains the topmost node of the
-Info hierarchy. The first time you invoke Info you start off
-looking at that node, which is (dir)Top.
-
-File: dir Node: Top This is the top of the INFO tree
-
- This (the Directory node) gives a menu of major topics.
- Typing "q" exits, "?" lists all Info commands, "d" returns here,
- "h" gives a primer for first-timers,
- "mEmacs<Return>" visits the Emacs topic, etc.
-
- In Emacs, you can click mouse button 2 on a menu item or cross reference
- to select it.
-
-* Menu: The list of major topics begins on the next line.
-
-moobler
-
-### go through the list of files in the skeleton. If an info file
-### exists, grab the ENTRY information from it. If an entry exists
-### use it, otherwise create a minimal dir entry.
-###
-### Then remove that file from the list of existing files. If any
-### additional files remain (ones that don't have a skeleton entry),
-### then generate entries for those in the same way, putting the info for
-### those at the end....
-
-infofiles=`(cd ${INFODIR}; /bin/ls | grep -v '\-[0-9]*$' | egrep -v '^dir$|^dir\.info$|^dir\.orig$')`
-
-# echoing gets clobbered by backquotes; we do it the hard way...
-lines=`wc $SKELETON | awk '{print $1}'`
-line=1
-while [ $lines -ge $line ] ; do
- # Read one line from the file. This is so that we can echo lines with
- # whitespace and quoted characters in them.
- fileline=`awk NR==$line $SKELETON`
-
- # flag fancy features
- if [ ! -z "$echoline" ] ; then # echo line
- echo "$fileline"
- fileline=
- echoline=
- elif [ "${fileline}" = "--" ] ; then # should we echo the next line?
- echoline=1
- elif [ "${fileline}" = "%%" ] ; then # eliminate remaining files from dir?
- skip=1
- elif [ "${fileline}" = "!!" ] ; then # quit now
- exit 0
- fi
-
- # handle files if they exist
- for file in $fileline"" ; do # expand wildcards ("" handles blank lines)
-
- fname=
-
- if [ -z "$echoline" ] && [ ! -z "$file" ] ; then
- # Find the file to operate upon. Check both possible names.
- infoname=`echo $file | sed 's/\.info$//'`
- noext=
- ext=
- if [ -f ${INFODIR}/$infoname ] ; then
- noext=$infoname
- fi
- if [ -f ${INFODIR}/${infoname}.info ] ; then
- ext=${infoname}.info
- fi
-
- # If it exists with both names take what was said in the file.
- if [ ! -z "$ext" ] && [ ! -z "$noext" ]; then
- fname=$file
- warn="### Warning: $ext and $noext both exist! Using ${file}. ###"
- elif [ ! -z "${noext}${ext}" ]; then
- # just take the name if it exists only once
- fname=${noext}${ext}
- fi
-
- # if we found something and aren't skipping, do the entry
- if [ ! -z "$fname" ] ; then
- if [ -z "$skip" ] ; then
-
- if [ ! -z "$warn" ] ; then # issue any warning
- echo $warn
- warn=
- fi
-
- entry=`sed -e '1,/START-INFO-DIR-ENTRY/d' \
- -e '/END-INFO-DIR-ENTRY/,$d' ${INFODIR}/$fname`
- if [ ! -z "${entry}" ] ; then
- echo "${entry}"
- else
- echo "* ${infoname}: (${infoname})."
- fi
- fi
-
- # remove the name from the directory listing
- infofiles=`echo "" ${infofiles} "" | sed -e "s/ ${fname} / /" -e "s/ / /g"`
-
- fi
-
- fi
-
- done
-
- line=`expr $line + 1`
-done
-
-if [ -z "${infofiles}" ] ; then
- exit 0
-elif [ $lines -gt 0 ]; then
- echo
-fi
-
-# Sort remaining files by INFO-DIR-SECTION.
-prevsect=
-filesectdata=`(cd ${INFODIR}; fgrep INFO-DIR-SECTION /dev/null ${infofiles} | \
- fgrep -v 'INFO-DIR-SECTION Miscellaneous' | \
- sort -t: -k2 -k1 | tr ' ' '_')`
-for sectdata in ${filesectdata}; do
- file=`echo ${sectdata} | cut -d: -f1`
- section=`sed -n -e 's/^INFO-DIR-SECTION //p' ${INFODIR}/${file}`
- infofiles=`echo "" ${infofiles} "" | sed -e "s/ ${file} / /" -e "s/ / /g"`
-
- if [ "${prevsect}" != "${section}" ] ; then
- if [ ! -z "${prevsect}" ] ; then
- echo ""
- fi
- echo "${section}"
- prevsect="${section}"
- fi
-
- infoname=`echo $file | sed 's/\.info$//'`
- entry=`sed -e '1,/START-INFO-DIR-ENTRY/d' \
- -e '/END-INFO-DIR-ENTRY/,$d' ${INFODIR}/${file}`
- if [ ! -z "${entry}" ] ; then
- echo "${entry}"
- elif [ ! -d "${INFODIR}/${file}" ] ; then
- echo "* ${infoname}: (${infoname})."
- fi
-done
-
-# Process miscellaneous files.
-for file in ${infofiles}; do
- if [ ! -z "${prevsect}" ] ; then
- echo ""
- echo "Miscellaneous"
- prevsect=""
- fi
-
- infoname=`echo $file | sed 's/\.info$//'`
- entry=`sed -e '1,/START-INFO-DIR-ENTRY/d' \
- -e '/END-INFO-DIR-ENTRY/,$d' ${INFODIR}/${file}`
-
- if [ ! -z "${entry}" ] ; then
- echo "${entry}"
- elif [ ! -d "${INFODIR}/${file}" ] ; then
- echo "* ${infoname}: (${infoname})."
- fi
-done
diff --git a/util/gendocs.sh b/util/gendocs.sh
index aded2c4..98c7523 100755
--- a/util/gendocs.sh
+++ b/util/gendocs.sh
@@ -1,16 +1,16 @@
-#!/bin/sh
+#!/bin/sh -e
# gendocs.sh -- generate a GNU manual in many formats. This script is
# mentioned in maintain.texi. See the help message below for usage details.
-scriptversion=2008-03-05.14
+scriptversion=2013-03-08.15
-# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
+# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
# Free Software Foundation, Inc.
#
-# This program is free software; you can redistribute it and/or modify
+# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License,
-# or (at your option) any later version.
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,9 +19,22 @@ scriptversion=2008-03-05.14
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
+#
# Original author: Mohit Agarwal.
# Send bug reports and any other correspondence to bug-texinfo@gnu.org.
+#
+# The latest version of this script, and the companion template, is
+# available from Texinfo CVS:
+# http://savannah.gnu.org/cgi-bin/viewcvs/texinfo/texinfo/util/gendocs.sh
+# http://savannah.gnu.org/cgi-bin/viewcvs/texinfo/texinfo/util/gendocs_template
+#
+# An up-to-date copy is also maintained in Gnulib (gnu.org/software/gnulib).
+
+# TODO:
+# - image importation was only implemented for HTML generated by
+# makeinfo. But it should be simple enough to adjust.
+# - images are not imported in the source tarball. All the needed
+# formats (PDF, PNG, etc.) should be included.
prog=`basename "$0"`
srcdir=`pwd`
@@ -32,48 +45,62 @@ templateurl="http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/texinfo/texinfo/
: ${SETLANG="env LANG= LC_MESSAGES= LC_ALL= LANGUAGE="}
: ${MAKEINFO="makeinfo"}
: ${TEXI2DVI="texi2dvi -t @finalout"}
-: ${DVIPS="dvips"}
: ${DOCBOOK2HTML="docbook2html"}
: ${DOCBOOK2PDF="docbook2pdf"}
-: ${DOCBOOK2PS="docbook2ps"}
: ${DOCBOOK2TXT="docbook2txt"}
: ${GENDOCS_TEMPLATE_DIR="."}
+: ${PERL='perl'}
: ${TEXI2HTML="texi2html"}
unset CDPATH
unset use_texi2html
version="gendocs.sh $scriptversion
-Copyright (C) 2007 Free Software Foundation, Inc.
+Copyright 2013 Free Software Foundation, Inc.
There is NO warranty. You may redistribute this software
under the terms of the GNU General Public License.
For more information about these matters, see the files named COPYING."
usage="Usage: $prog [OPTION]... PACKAGE MANUAL-TITLE
-Generate various output formats from PACKAGE.texinfo (or .texi or .txi) source.
-See the GNU Maintainers document for a more extensive discussion:
+Generate output in various formats from PACKAGE.texinfo (or .texi or
+.txi) source. See the GNU Maintainers document for a more extensive
+discussion:
http://www.gnu.org/prep/maintain_toc.html
Options:
- -o OUTDIR write files into OUTDIR, instead of manual/.
- --docbook convert to DocBook too (xml, txt, html, pdf and ps).
- --html ARG pass indicated ARG to makeinfo or texi2html for HTML targets.
- --texi2html use texi2html to generate HTML targets.
- --help display this help and exit successfully.
- --version display version information and exit successfully.
+ --email ADR use ADR as contact in generated web pages; always give this.
+
+ -s SRCFILE read Texinfo from SRCFILE, instead of PACKAGE.{texinfo|texi|txi}
+ -o OUTDIR write files into OUTDIR, instead of manual/.
+ -I DIR append DIR to the Texinfo search path.
+ --common ARG pass ARG in all invocations.
+ --html ARG pass ARG to makeinfo or texi2html for HTML targets.
+ --info ARG pass ARG to makeinfo for Info, instead of --no-split.
+ --no-ascii skip generating the plain text output.
+ --source ARG include ARG in tar archive of sources.
+ --split HOW make split HTML by node, section, chapter; default node.
+
+ --texi2html use texi2html to make HTML target, with all split versions.
+ --docbook convert through DocBook too (xml, txt, html, pdf).
+
+ --help display this help and exit successfully.
+ --version display version information and exit successfully.
-Simple example: $prog emacs \"GNU Emacs Manual\"
+Simple example: $prog --email bug-gnu-emacs@gnu.org emacs \"GNU Emacs Manual\"
Typical sequence:
- cd YOURPACKAGESOURCE/doc
+ cd PACKAGESOURCE/doc
wget \"$scripturl\"
wget \"$templateurl\"
- $prog YOURMANUAL \"GNU YOURMANUAL - One-line description\"
+ $prog --email BUGLIST MANUAL \"GNU MANUAL - One-line description\"
-Output will be in a new subdirectory \"manual\" (by default, use -o OUTDIR
-to override). Move all the new files into your web CVS tree, as
-explained in the Web Pages node of maintain.texi.
+Output will be in a new subdirectory \"manual\" (by default;
+use -o OUTDIR to override). Move all the new files into your web CVS
+tree, as explained in the Web Pages node of maintain.texi.
+
+Please use the --email ADDRESS option so your own bug-reporting
+address will be used in the generated HTML pages.
MANUAL-TITLE is included as part of the HTML <title> of the overall
manual/index.html file. It should include the name of the package being
@@ -82,49 +109,64 @@ $GENDOCS_TEMPLATE_DIR/gendocs_template. (Feel free to modify the
generic template for your own purposes.)
If you have several manuals, you'll need to run this script several
-times with different YOURMANUAL values, specifying a different output
+times with different MANUAL values, specifying a different output
directory with -o each time. Then write (by hand) an overall index.html
with links to them all.
-If a manual's texinfo sources are spread across several directories,
+If a manual's Texinfo sources are spread across several directories,
first copy or symlink all Texinfo sources into a single directory.
(Part of the script's work is to make a tar.gz of the sources.)
-You can set the environment variables MAKEINFO, TEXI2DVI, and DVIPS to
-control the programs that get executed, and GENDOCS_TEMPLATE_DIR to
-control where the gendocs_template file is looked for. (With --docbook,
-the environment variables DOCBOOK2HTML, DOCBOOK2PDF, DOCBOOK2PS, and
-DOCBOOK2TXT are also respected.)
+As implied above, by default monolithic Info files are generated.
+If you want split Info, or other Info options, use --info to override.
+
+You can set the environment variables MAKEINFO, TEXI2DVI, TEXI2HTML,
+and PERL to control the programs that get executed, and
+GENDOCS_TEMPLATE_DIR to control where the gendocs_template file is
+looked for. With --docbook, the environment variables DOCBOOK2HTML,
+DOCBOOK2PDF, and DOCBOOK2TXT are also consulted.
-By default, makeinfo is run in the default (English) locale, since
-that's the language of most Texinfo manuals. If you happen to have a
-non-English manual and non-English web site, check the SETLANG setting
-in the source.
+By default, makeinfo and texi2dvi are run in the default (English)
+locale, since that's the language of most Texinfo manuals. If you
+happen to have a non-English manual and non-English web site, see the
+SETLANG setting in the source.
Email bug reports or enhancement requests to bug-texinfo@gnu.org.
"
-calcsize()
-{
- size=`ls -ksl $1 | awk '{print $1}'`
- echo $size
-}
-
-outdir=manual
-html=
-PACKAGE=
MANUAL_TITLE=
+PACKAGE=
+EMAIL=webmasters@gnu.org # please override with --email
+commonarg= # passed to all makeinfo/texi2html invcations.
+dirargs= # passed to all tools (-I dir).
+dirs= # -I's directories.
+htmlarg=
+infoarg=--no-split
+generate_ascii=true
+outdir=manual
+source_extra=
+split=node
+srcfile=
while test $# -gt 0; do
case $1 in
- --help) echo "$usage"; exit 0;;
- --version) echo "$version"; exit 0;;
- -o) shift; outdir=$1;;
- --docbook) docbook=yes;;
- --html) shift; html=$1;;
+ -s) shift; srcfile=$1;;
+ -o) shift; outdir=$1;;
+ -I) shift; dirargs="$dirargs -I '$1'"; dirs="$dirs $1";;
+ --common) shift; commonarg=$1;;
+ --docbook) docbook=yes;;
+ --email) shift; EMAIL=$1;;
+ --html) shift; htmlarg=$1;;
+ --info) shift; infoarg=$1;;
+ --no-ascii) generate_ascii=false;;
+ --source) shift; source_extra=$1;;
+ --split) shift; split=$1;;
--texi2html) use_texi2html=1;;
+
+ --help) echo "$usage"; exit 0;;
+ --version) echo "$version"; exit 0;;
-*)
- echo "$0: Unknown or ambiguous option \`$1'." >&2
+ echo "$0: Unknown option \`$1'." >&2
echo "$0: Try \`--help' for more information." >&2
exit 1;;
*)
@@ -140,7 +182,20 @@ while test $# -gt 0; do
shift
done
-if test -s "$srcdir/$PACKAGE.texinfo"; then
+# makeinfo uses the dirargs, but texi2dvi doesn't.
+commonarg=" $dirargs $commonarg"
+
+# For most of the following, the base name is just $PACKAGE
+base=$PACKAGE
+
+if test -n "$srcfile"; then
+ # but here, we use the basename of $srcfile
+ base=`basename "$srcfile"`
+ case $base in
+ *.txi|*.texi|*.texinfo) base=`echo "$base"|sed 's/\.[texinfo]*$//'`;;
+ esac
+ PACKAGE=$base
+elif test -s "$srcdir/$PACKAGE.texinfo"; then
srcfile=$srcdir/$PACKAGE.texinfo
elif test -s "$srcdir/$PACKAGE.texi"; then
srcfile=$srcdir/$PACKAGE.texi
@@ -157,167 +212,239 @@ if test ! -r $GENDOCS_TEMPLATE_DIR/gendocs_template; then
exit 1
fi
+# Function to return size of $1 in something resembling kilobytes.
+calcsize()
+{
+ size=`ls -ksl $1 | awk '{print $1}'`
+ echo $size
+}
+
+# copy_images OUTDIR HTML-FILE...
+# -------------------------------
+# Copy all the images needed by the HTML-FILEs into OUTDIR. Look
+# for them in the -I directories.
+copy_images()
+{
+ local odir
+ odir=$1
+ shift
+ $PERL -n -e "
+BEGIN {
+ \$me = '$prog';
+ \$odir = '$odir';
+ @dirs = qw($dirs);
+}
+" -e '
+/<img src="(.*?)"/g && ++$need{$1};
+
+END {
+ #print "$me: @{[keys %need]}\n"; # for debugging, show images found.
+ FILE: for my $f (keys %need) {
+ for my $d (@dirs) {
+ if (-f "$d/$f") {
+ use File::Basename;
+ my $dest = dirname ("$odir/$f");
+ #
+ use File::Path;
+ -d $dest || mkpath ($dest)
+ || die "$me: cannot mkdir $dest: $!\n";
+ #
+ use File::Copy;
+ copy ("$d/$f", $dest)
+ || die "$me: cannot copy $d/$f to $dest: $!\n";
+ next FILE;
+ }
+ }
+ die "$me: $ARGV: cannot find image $f\n";
+ }
+}
+' -- "$@" || exit 1
+}
+
case $outdir in
- /*) dotdot_outdir="$outdir";;
- *) dotdot_outdir="../$outdir";;
+ /*) abs_outdir=$outdir;;
+ *) abs_outdir=$srcdir/$outdir;;
esac
-echo Generating output formats for $srcfile
+echo "Making output for $srcfile"
+echo " in `pwd`"
+mkdir -p "$outdir/"
-cmd="$SETLANG $MAKEINFO -o $PACKAGE.info \"$srcfile\""
-echo "Generating info files... ($cmd)"
+cmd="$SETLANG $MAKEINFO -o $PACKAGE.info $commonarg $infoarg \"$srcfile\""
+echo "Generating info... ($cmd)"
eval "$cmd"
-mkdir -p $outdir/
-tar czf $outdir/$PACKAGE.info.tar.gz $PACKAGE.info*
-info_tgz_size=`calcsize $outdir/$PACKAGE.info.tar.gz`
+tar czf "$outdir/$PACKAGE.info.tar.gz" $PACKAGE.info*
+ls -l "$outdir/$PACKAGE.info.tar.gz"
+info_tgz_size=`calcsize "$outdir/$PACKAGE.info.tar.gz"`
# do not mv the info files, there's no point in having them available
# separately on the web.
-cmd="${TEXI2DVI} \"$srcfile\""
-echo "Generating dvi ... ($cmd)"
+cmd="$SETLANG $TEXI2DVI $dirargs \"$srcfile\""
+printf "\nGenerating dvi... ($cmd)\n"
eval "$cmd"
-
-# now, before we compress dvi:
-echo Generating postscript...
-${DVIPS} $PACKAGE -o
-gzip -f -9 $PACKAGE.ps
-ps_gz_size=`calcsize $PACKAGE.ps.gz`
-mv $PACKAGE.ps.gz $outdir/
-
# compress/finish dvi:
gzip -f -9 $PACKAGE.dvi
dvi_gz_size=`calcsize $PACKAGE.dvi.gz`
-mv $PACKAGE.dvi.gz $outdir/
+mv $PACKAGE.dvi.gz "$outdir/"
+ls -l "$outdir/$PACKAGE.dvi.gz"
-cmd="${TEXI2DVI} --pdf \"$srcfile\""
-echo "Generating pdf ... ($cmd)"
+cmd="$SETLANG $TEXI2DVI --pdf $dirargs \"$srcfile\""
+printf "\nGenerating pdf... ($cmd)\n"
eval "$cmd"
pdf_size=`calcsize $PACKAGE.pdf`
-mv $PACKAGE.pdf $outdir/
+mv $PACKAGE.pdf "$outdir/"
+ls -l "$outdir/$PACKAGE.pdf"
-cmd="$SETLANG $MAKEINFO -o $PACKAGE.txt --no-split --no-headers \"$srcfile\""
-echo "Generating ASCII... ($cmd)"
-eval "$cmd"
-ascii_size=`calcsize $PACKAGE.txt`
-gzip -f -9 -c $PACKAGE.txt >$outdir/$PACKAGE.txt.gz
-ascii_gz_size=`calcsize $outdir/$PACKAGE.txt.gz`
-mv $PACKAGE.txt $outdir/
-
-html_split() {
- cmd="$SETLANG $TEXI2HTML --output $PACKAGE.html --split=$1 $html --node-files \"$srcfile\""
- echo "Generating html by $1... ($cmd)"
+if $generate_ascii; then
+ opt="-o $PACKAGE.txt --no-split --no-headers $commonarg"
+ cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
+ printf "\nGenerating ascii... ($cmd)\n"
+ eval "$cmd"
+ ascii_size=`calcsize $PACKAGE.txt`
+ gzip -f -9 -c $PACKAGE.txt >"$outdir/$PACKAGE.txt.gz"
+ ascii_gz_size=`calcsize "$outdir/$PACKAGE.txt.gz"`
+ mv $PACKAGE.txt "$outdir/"
+ ls -l "$outdir/$PACKAGE.txt" "$outdir/$PACKAGE.txt.gz"
+fi
+
+# Split HTML at level $1. Used for texi2html.
+html_split()
+{
+ opt="--split=$1 --node-files $commonarg $htmlarg"
+ cmd="$SETLANG $TEXI2HTML --output $PACKAGE.html $opt \"$srcfile\""
+ printf "\nGenerating html by $1... ($cmd)\n"
eval "$cmd"
split_html_dir=$PACKAGE.html
(
cd ${split_html_dir} || exit 1
ln -sf ${PACKAGE}.html index.html
- tar -czf $dotdot_outdir/${PACKAGE}.html_$1.tar.gz -- *.html
+ tar -czf "$abs_outdir/${PACKAGE}.html_$1.tar.gz" -- *.html
)
- eval html_$1_tgz_size=`calcsize $outdir/${PACKAGE}.html_$1.tar.gz`
- rm -f $outdir/html_$1/*.html
- mkdir -p $outdir/html_$1/
- mv ${split_html_dir}/*.html $outdir/html_$1/
+ eval html_$1_tgz_size=`calcsize "$outdir/${PACKAGE}.html_$1.tar.gz"`
+ rm -f "$outdir"/html_$1/*.html
+ mkdir -p "$outdir/html_$1/"
+ mv ${split_html_dir}/*.html "$outdir/html_$1/"
rmdir ${split_html_dir}
}
if test -z "$use_texi2html"; then
- cmd="$SETLANG $MAKEINFO --no-split --html -o $PACKAGE.html $html \"$srcfile\""
- echo "Generating monolithic html... ($cmd)"
+ opt="--no-split --html -o $PACKAGE.html $commonarg $htmlarg"
+ cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
+ printf "\nGenerating monolithic html... ($cmd)\n"
rm -rf $PACKAGE.html # in case a directory is left over
eval "$cmd"
html_mono_size=`calcsize $PACKAGE.html`
- gzip -f -9 -c $PACKAGE.html >$outdir/$PACKAGE.html.gz
- html_mono_gz_size=`calcsize $outdir/$PACKAGE.html.gz`
- mv $PACKAGE.html $outdir/
-
- cmd="$SETLANG $MAKEINFO --html -o $PACKAGE.html $html \"$srcfile\""
- echo "Generating html by node... ($cmd)"
+ gzip -f -9 -c $PACKAGE.html >"$outdir/$PACKAGE.html.gz"
+ html_mono_gz_size=`calcsize "$outdir/$PACKAGE.html.gz"`
+ copy_images "$outdir/" $PACKAGE.html
+ mv $PACKAGE.html "$outdir/"
+ ls -l "$outdir/$PACKAGE.html" "$outdir/$PACKAGE.html.gz"
+
+ # Before Texinfo 5.0, makeinfo did not accept a --split=HOW option,
+ # it just always split by node. So if we're splitting by node anyway,
+ # leave it out.
+ if test "x$split" = xnode; then
+ split_arg=
+ else
+ split_arg=--split=$split
+ fi
+ #
+ opt="--html -o $PACKAGE.html $split_arg $commonarg $htmlarg"
+ cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
+ printf "\nGenerating html by $split... ($cmd)\n"
eval "$cmd"
split_html_dir=$PACKAGE.html
+ copy_images $split_html_dir/ $split_html_dir/*.html
(
- cd ${split_html_dir} || exit 1
- tar -czf $dotdot_outdir/${PACKAGE}.html_node.tar.gz -- *.html
+ cd $split_html_dir || exit 1
+ tar -czf "$abs_outdir/$PACKAGE.html_$split.tar.gz" -- *
)
- html_node_tgz_size=`calcsize $outdir/${PACKAGE}.html_node.tar.gz`
- rm -f $outdir/html_node/*.html
- mkdir -p $outdir/html_node/
- mv ${split_html_dir}/*.html $outdir/html_node/
- rmdir ${split_html_dir}
-else
- cmd="$SETLANG $TEXI2HTML --output $PACKAGE.html $html \"$srcfile\""
- echo "Generating monolithic html... ($cmd)"
+ eval \
+ html_${split}_tgz_size=`calcsize "$outdir/$PACKAGE.html_$split.tar.gz"`
+ rm -rf "$outdir/html_$split/"
+ mv $split_html_dir "$outdir/html_$split/"
+ du -s "$outdir/html_$split/"
+ ls -l "$outdir/$PACKAGE.html_$split.tar.gz"
+
+else # use texi2html:
+ opt="--output $PACKAGE.html $commonarg $htmlarg"
+ cmd="$SETLANG $TEXI2HTML $opt \"$srcfile\""
+ printf "\nGenerating monolithic html with texi2html... ($cmd)\n"
rm -rf $PACKAGE.html # in case a directory is left over
eval "$cmd"
html_mono_size=`calcsize $PACKAGE.html`
- gzip -f -9 -c $PACKAGE.html >$outdir/$PACKAGE.html.gz
- html_mono_gz_size=`calcsize $outdir/$PACKAGE.html.gz`
- mv $PACKAGE.html $outdir/
+ gzip -f -9 -c $PACKAGE.html >"$outdir/$PACKAGE.html.gz"
+ html_mono_gz_size=`calcsize "$outdir/$PACKAGE.html.gz"`
+ mv $PACKAGE.html "$outdir/"
html_split node
html_split chapter
html_split section
fi
-echo Making .tar.gz for sources...
-srcfiles=`ls *.texinfo *.texi *.txi *.eps 2>/dev/null`
-tar cvzfh $outdir/$PACKAGE.texi.tar.gz $srcfiles
-texi_tgz_size=`calcsize $outdir/$PACKAGE.texi.tar.gz`
+printf "\nMaking .tar.gz for sources...\n"
+d=`dirname $srcfile`
+(
+ cd "$d"
+ srcfiles=`ls -d *.texinfo *.texi *.txi *.eps $source_extra 2>/dev/null` || true
+ tar czfh "$abs_outdir/$PACKAGE.texi.tar.gz" $srcfiles
+ ls -l "$abs_outdir/$PACKAGE.texi.tar.gz"
+)
+texi_tgz_size=`calcsize "$outdir/$PACKAGE.texi.tar.gz"`
if test -n "$docbook"; then
- cmd="$SETLANG $MAKEINFO -o - --docbook \"$srcfile\" > ${srcdir}/$PACKAGE-db.xml"
- echo "Generating docbook XML... $(cmd)"
+ opt="-o - --docbook $commonarg"
+ cmd="$SETLANG $MAKEINFO $opt \"$srcfile\" >${srcdir}/$PACKAGE-db.xml"
+ printf "\nGenerating docbook XML... ($cmd)\n"
eval "$cmd"
docbook_xml_size=`calcsize $PACKAGE-db.xml`
- gzip -f -9 -c $PACKAGE-db.xml >$outdir/$PACKAGE-db.xml.gz
- docbook_xml_gz_size=`calcsize $outdir/$PACKAGE-db.xml.gz`
- mv $PACKAGE-db.xml $outdir/
+ gzip -f -9 -c $PACKAGE-db.xml >"$outdir/$PACKAGE-db.xml.gz"
+ docbook_xml_gz_size=`calcsize "$outdir/$PACKAGE-db.xml.gz"`
+ mv $PACKAGE-db.xml "$outdir/"
- cmd="${DOCBOOK2HTML} -o $split_html_db_dir ${outdir}/$PACKAGE-db.xml"
- echo "Generating docbook HTML... ($cmd)"
- eval "$cmd"
split_html_db_dir=html_node_db
+ opt="$commonarg -o $split_html_db_dir"
+ cmd="$DOCBOOK2HTML $opt \"${outdir}/$PACKAGE-db.xml\""
+ printf "\nGenerating docbook HTML... ($cmd)\n"
+ eval "$cmd"
(
cd ${split_html_db_dir} || exit 1
- tar -czf $dotdot_outdir/${PACKAGE}.html_node_db.tar.gz -- *.html
+ tar -czf "$abs_outdir/${PACKAGE}.html_node_db.tar.gz" -- *.html
)
- html_node_db_tgz_size=`calcsize $outdir/${PACKAGE}.html_node_db.tar.gz`
- rm -f $outdir/html_node_db/*.html
- mkdir -p $outdir/html_node_db
- mv ${split_html_db_dir}/*.html $outdir/html_node_db/
+ html_node_db_tgz_size=`calcsize "$outdir/${PACKAGE}.html_node_db.tar.gz"`
+ rm -f "$outdir"/html_node_db/*.html
+ mkdir -p "$outdir/html_node_db"
+ mv ${split_html_db_dir}/*.html "$outdir/html_node_db/"
rmdir ${split_html_db_dir}
- cmd="${DOCBOOK2TXT} ${outdir}/$PACKAGE-db.xml"
- echo "Generating docbook ASCII... ($cmd)"
+ cmd="$DOCBOOK2TXT \"${outdir}/$PACKAGE-db.xml\""
+ printf "\nGenerating docbook ASCII... ($cmd)\n"
eval "$cmd"
docbook_ascii_size=`calcsize $PACKAGE-db.txt`
- mv $PACKAGE-db.txt $outdir/
-
- cmd="${DOCBOOK2PS} ${outdir}/$PACKAGE-db.xml"
- echo "Generating docbook PS... $(cmd)"
- eval "$cmd"
- gzip -f -9 -c $PACKAGE-db.ps >$outdir/$PACKAGE-db.ps.gz
- docbook_ps_gz_size=`calcsize $outdir/$PACKAGE-db.ps.gz`
- mv $PACKAGE-db.ps $outdir/
+ mv $PACKAGE-db.txt "$outdir/"
- cmd="${DOCBOOK2PDF} ${outdir}/$PACKAGE-db.xml"
- echo "Generating docbook PDF... ($cmd)"
+ cmd="$DOCBOOK2PDF \"${outdir}/$PACKAGE-db.xml\""
+ printf "\nGenerating docbook PDF... ($cmd)\n"
eval "$cmd"
docbook_pdf_size=`calcsize $PACKAGE-db.pdf`
- mv $PACKAGE-db.pdf $outdir/
+ mv $PACKAGE-db.pdf "$outdir/"
fi
-echo Writing index file...
+printf "\nMaking index file...\n"
if test -z "$use_texi2html"; then
- CONDS="/%%IF *HTML_SECTION%%/,/%%ENDIF *HTML_SECTION%%/d;\
- /%%IF *HTML_CHAPTER%%/,/%%ENDIF *HTML_CHAPTER%%/d"
+ CONDS="/%%IF *HTML_SECTION%%/,/%%ENDIF *HTML_SECTION%%/d;\
+ /%%IF *HTML_CHAPTER%%/,/%%ENDIF *HTML_CHAPTER%%/d"
else
- CONDS="/%%ENDIF.*%%/d;/%%IF *HTML_SECTION%%/d;/%%IF *HTML_CHAPTER%%/d"
+ # should take account of --split here.
+ CONDS="/%%ENDIF.*%%/d;/%%IF *HTML_SECTION%%/d;/%%IF *HTML_CHAPTER%%/d"
fi
+
curdate=`$SETLANG date '+%B %d, %Y'`
sed \
-e "s!%%TITLE%%!$MANUAL_TITLE!g" \
- -e "s!%%DATE%%!$curdate!g" \
+ -e "s!%%EMAIL%%!$EMAIL!g" \
-e "s!%%PACKAGE%%!$PACKAGE!g" \
+ -e "s!%%DATE%%!$curdate!g" \
-e "s!%%HTML_MONO_SIZE%%!$html_mono_size!g" \
-e "s!%%HTML_MONO_GZ_SIZE%%!$html_mono_gz_size!g" \
-e "s!%%HTML_NODE_TGZ_SIZE%%!$html_node_tgz_size!g" \
@@ -326,22 +453,20 @@ sed \
-e "s!%%INFO_TGZ_SIZE%%!$info_tgz_size!g" \
-e "s!%%DVI_GZ_SIZE%%!$dvi_gz_size!g" \
-e "s!%%PDF_SIZE%%!$pdf_size!g" \
- -e "s!%%PS_GZ_SIZE%%!$ps_gz_size!g" \
-e "s!%%ASCII_SIZE%%!$ascii_size!g" \
-e "s!%%ASCII_GZ_SIZE%%!$ascii_gz_size!g" \
-e "s!%%TEXI_TGZ_SIZE%%!$texi_tgz_size!g" \
-e "s!%%DOCBOOK_HTML_NODE_TGZ_SIZE%%!$html_node_db_tgz_size!g" \
-e "s!%%DOCBOOK_ASCII_SIZE%%!$docbook_ascii_size!g" \
- -e "s!%%DOCBOOK_PS_GZ_SIZE%%!$docbook_ps_gz_size!g" \
-e "s!%%DOCBOOK_PDF_SIZE%%!$docbook_pdf_size!g" \
-e "s!%%DOCBOOK_XML_SIZE%%!$docbook_xml_size!g" \
-e "s!%%DOCBOOK_XML_GZ_SIZE%%!$docbook_xml_gz_size!g" \
-e "s,%%SCRIPTURL%%,$scripturl,g" \
-e "s!%%SCRIPTNAME%%!$prog!g" \
-e "$CONDS" \
-$GENDOCS_TEMPLATE_DIR/gendocs_template >$outdir/index.html
+$GENDOCS_TEMPLATE_DIR/gendocs_template >"$outdir/index.html"
-echo "Done! See $outdir/ subdirectory for new files."
+echo "Done, see $outdir/ subdirectory for new files."
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
diff --git a/util/gendocs_template b/util/gendocs_template
index abf3b1f..63fbe53 100644
--- a/util/gendocs_template
+++ b/util/gendocs_template
@@ -3,19 +3,13 @@
<!--#include virtual="/server/banner.html" -->
<h2>%%TITLE%%</h2>
-<!-- This document is in XML, and xhtml 1.0 -->
-<!-- Please make sure to properly nest your tags -->
-<!-- and ensure that your final document validates -->
-<!-- consistent with W3C xhtml 1.0 and CSS standards -->
-<!-- See validator.w3.org -->
-
<address>Free Software Foundation</address>
<address>last updated %%DATE%%</address>
<p>This manual (%%PACKAGE%%) is available in the following formats:</p>
<ul>
-<li><a href="%%PACKAGE%%.html">HTML
+<li><a href="%%PACKAGE%%.html">HTML
(%%HTML_MONO_SIZE%%K bytes)</a> - entirely on one web page.</li>
<li><a href="html_node/index.html">HTML</a> - with one web page per
node.</li>
@@ -28,7 +22,7 @@
chapter.</li>
%%ENDIF HTML_CHAPTER%%
<li><a href="%%PACKAGE%%.html.gz">HTML compressed
- (%%HTML_MONO_GZ_SIZE%%K gzipped characters)</a> - entirely on
+ (%%HTML_MONO_GZ_SIZE%%K gzipped characters)</a> - entirely on
one web page.</li>
<li><a href="%%PACKAGE%%.html_node.tar.gz">HTML compressed
(%%HTML_NODE_TGZ_SIZE%%K gzipped tar file)</a> -
@@ -51,8 +45,6 @@
(%%ASCII_GZ_SIZE%%K bytes gzipped)</a>.</li>
<li><a href="%%PACKAGE%%.dvi.gz">TeX dvi file
(%%DVI_GZ_SIZE%%K bytes gzipped)</a>.</li>
-<li><a href="%%PACKAGE%%.ps.gz">PostScript file
- (%%PS_GZ_SIZE%%K bytes gzipped)</a>.</li>
<li><a href="%%PACKAGE%%.pdf">PDF file
(%%PDF_SIZE%%K bytes)</a>.</li>
<li><a href="%%PACKAGE%%.texi.tar.gz">Texinfo source
@@ -66,33 +58,28 @@ this helps support FSF activities.</p>
<p>(This page generated by the <a href="%%SCRIPTURL%%">%%SCRIPTNAME%%
script</a>.)</p>
-<!-- If needed, change the copyright block at the bottom. In general, -->
-<!-- all pages on the GNU web server should have the section about -->
-<!-- verbatim copying. Please do NOT remove this without talking -->
-<!-- with the webmasters first. -->
-<!-- Please make sure the copyright date is consistent with the document -->
-<!-- and that it is like this "2001, 2002" not this "2001-2002." -->
+<!-- If needed, change the copyright block at the bottom. In general,
+ all pages on the GNU web server should have the section about
+ verbatim copying. Please do NOT remove this without talking
+ with the webmasters first.
+ Please make sure the copyright date is consistent with the document
+ and that it is like this: "2001, 2002", not this: "2001-2002". -->
</div><!-- for id="content", starts in the include above -->
<!--#include virtual="/server/footer.html" -->
<div id="footer">
-<p>
-Please send FSF &amp; GNU inquiries to
-<a href="mailto:gnu@gnu.org"><em>gnu@gnu.org</em></a>.
-There are also <a href="/contact/">other ways to contact</a>
-the FSF.
-<br />
+<p>Please send general FSF &amp; GNU inquiries to
+<a href="mailto:gnu@gnu.org">&lt;gnu@gnu.org&gt;</a>.
+There are also <a href="/contact/">other ways to contact</a>
+the FSF.<br />
Please send broken links and other corrections or suggestions to
-<a href="mailto:webmasters@gnu.org"><em>webmasters@gnu.org</em></a>.
-</p>
+<a href="mailto:%%EMAIL%%">&lt;%%EMAIL%%&gt;</a>.</p>
+
+<p>Copyright &copy; 2013 Free Software Foundation, Inc.</p>
-<p>
-Copyright &copy; 2008 Free Software Foundation, Inc.,
-</p>
-<address>51 Franklin Street, Fifth Floor, Boston, MA 02111, USA</address>
-<p>Verbatim copying and distribution of this entire article is
-permitted in any medium, provided this notice is preserved.
-</p>
+<p>Verbatim copying and distribution of this entire article are
+permitted worldwide, without royalty, in any medium, provided this
+notice, and the copyright notice, are preserved.</p>
</div>
</div>
diff --git a/util/htmlxref.cnf b/util/htmlxref.cnf
new file mode 100644
index 0000000..5ed9b99
--- /dev/null
+++ b/util/htmlxref.cnf
@@ -0,0 +1,604 @@
+# htmlxref.cnf - reference file for free Texinfo manuals on the web.
+
+htmlxrefversion=2013-08-03.16; # UTC
+
+# Copyright 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved.
+#
+# The latest version of this file is available at
+# http://ftpmirror.gnu.org/texinfo/htmlxref.cnf.
+# Email corrections or additions to bug-texinfo@gnu.org.
+# The primary goal is to list all relevant GNU manuals;
+# other free manuals are also welcome.
+#
+# To be included in this list, a manual must:
+#
+# - have a generic url, i.e., no version numbers;
+# - have a unique file name (identifier), i.e., be related to the
+# package name, something like "refman" or "tutorial" doesn't work.
+# - follow the naming convention for nodes described at
+# http://www.gnu.org/software/texinfo/manual/texinfo/html_node/HTML-Xref.html
+# This is what makeinfo and texi2html implement.
+#
+# Unless the above criteria are met, it's not possible to generate
+# reliable cross-manual references.
+#
+# For information on automatically generating all the useful formats for
+# a manual to put on the web, see
+# http://www.gnu.org/prep/maintain/html_node/Manuals-on-Web-Pages.html.
+
+# For people editing this file: when a manual named foo is related to a
+# package named bar, the url should contain a variable reference ${BAR}.
+# Otherwise, the gnumaint scripts have no way of knowing they are
+# associated, and thus gnu.org/manual can't include them.
+
+# shorten references to manuals on www.gnu.org.
+G = http://www.gnu.org
+GS = ${G}/software
+
+3dldf mono ${GS}/3dldf/manual/user_ref/3DLDF.html
+3dldf node ${GS}/3dldf/manual/user_ref/
+
+alive mono ${GS}/alive/manual/alive.html
+alive node ${GS}/alive/manual/html_node/
+
+anubis chapter ${GS}/anubis/manual/html_chapter/
+anubis section ${GS}/anubis/manual/html_section/
+anubis node ${GS}/anubis/manual/html_node/
+
+aspell section http://aspell.net/man-html/index.html
+
+auctex mono ${GS}/auctex/manual/auctex.html
+auctex node ${GS}/auctex/manual/auctex/
+
+autoconf mono ${GS}/autoconf/manual/autoconf.html
+autoconf node ${GS}/autoconf/manual/html_node/
+
+autogen mono ${GS}/autogen/manual/html_mono/autogen.html
+autogen chapter ${GS}/autogen/manual/html_chapter/
+autogen node ${GS}/autoconf/manual/html_node/
+
+automake mono ${GS}/automake/manual/automake.html
+automake node ${GS}/automake/manual/html_node/
+
+avl node http://www.stanford.edu/~blp/avl/libavl.html/
+
+bash mono ${GS}/bash/manual/bash.html
+bash node ${GS}/bash/manual/html_node/
+
+BINUTILS = http://sourceware.org/binutils/docs
+binutils node ${BINUTILS}/binutils/
+ as node ${BINUTILS}/as/
+ bfd node ${BINUTILS}/bfd/
+ gprof node ${BINUTILS}/gprof/
+ ld node ${BINUTILS}/ld/
+
+bison mono ${GS}/bison/manual/bison.html
+bison node ${GS}/bison/manual/html_node/
+
+bpel2owfn mono ${GS}/bpel2owfn/manual/2.0.x/bpel2owfn.html
+
+cflow mono ${GS}/cflow/manual/cflow
+cflow node ${GS}/cflow/manual/html_node/
+
+chess mono ${GS}/chess/manual/gnuchess.html
+chess node ${GS}/chess/manual/html_node/
+
+combine mono ${GS}/combine/manual/combine.html
+combine chapter ${GS}/combine/manual/html_chapter/
+combine section ${GS}/combine/manual/html_section/
+combine node ${GS}/combine/manual/html_node/
+
+complexity mono ${GS}/complexity/manual/complexity.html
+complexity node ${GS}/complexity/manual/html_node/
+
+coreutils mono ${GS}/coreutils/manual/coreutils
+coreutils node ${GS}/coreutils/manual/html_node/
+
+cpio mono ${GS}/cpio/manual/cpio
+cpio node ${GS}/cpio/manual/html_node/
+
+cssc node ${GS}/cssc/manual/
+
+#cvs cannot be handled here; see http://ximbiot.com/cvs/manual.
+
+ddd mono ${GS}/ddd/manual/html_mono/ddd.html
+
+ddrescue mono ${GS}/ddrescue/manual/ddrescue_manual.html
+
+DICO = http://puszcza.gnu.org.ua/software/dico/manual
+dico mono ${DICO}/dico.html
+dico chapter ${DICO}/html_chapter/
+dico section ${DICO}/html_section/
+dico node ${DICO}/html_node/
+
+diffutils mono ${GS}/diffutils/manual/diffutils
+diffutils node ${GS}/diffutils/manual/html_node/
+
+ed mono ${GS}/ed/manual/ed_manual.html
+
+EMACS = ${GS}/emacs/manual
+emacs mono ${EMACS}/html_mono/emacs.html
+emacs node ${EMACS}/html_node/emacs/
+ #
+ ada-mode mono ${EMACS}/html_mono/ada-mode.html
+ ada-mode node ${EMACS}/html_node/ada-mode/
+ #
+ autotype mono ${EMACS}/html_mono/autotype.html
+ autotype node ${EMACS}/html_node/autotype/
+ #
+ ccmode mono ${EMACS}/html_mono/ccmode.html
+ ccmode node ${EMACS}/html_node/ccmode/
+ #
+ cl mono ${EMACS}/html_mono/cl.html
+ cl node ${EMACS}/html_node/cl/
+ #
+ ebrowse mono ${EMACS}/html_mono/ebrowse.html
+ ebrowse node ${EMACS}/html_node/ebrowse/
+ #
+ ediff mono ${EMACS}/html_mono/ediff.html
+ ediff node ${EMACS}/html_node/ediff/
+ #
+ eieio mono ${EMACS}/html_mono/eieio.html
+ eieio node ${EMACS}/html_node/eieio/
+ #
+ elisp mono ${EMACS}/html_mono/elisp.html
+ elisp node ${EMACS}/html_node/elisp/
+ #
+ epa mono ${EMACS}/html_mono/epa.html
+ epa node ${EMACS}/html_node/epa/
+ #
+ erc mono ${EMACS}/html_mono/erc.html
+ erc node ${EMACS}/html_node/erc/
+ #
+ dired-x mono ${EMACS}/html_mono/dired-x.html
+ dired-x node ${EMACS}/html_node/dired-x/
+ #
+ eshell mono ${EMACS}/html_mono/eshell.html
+ eshell node ${EMACS}/html_node/eshell/
+ #
+ flymake mono ${EMACS}/html_mono/flymake.html
+ flymake node ${EMACS}/html_node/flymake/
+ #
+ gnus mono ${EMACS}/html_mono/gnus.html
+ gnus node ${EMACS}/html_node/gnus/
+ #
+ idlwave mono ${EMACS}/html_mono/idlwave.html
+ idlwave node ${EMACS}/html_node/idlwave/
+ #
+ message mono ${EMACS}/html_mono/message.html
+ message node ${EMACS}/html_node/message/
+ #
+ mh-e mono ${EMACS}/html_mono/mh-e.html
+ mh-e node ${EMACS}/html_node/mh-e/
+ #
+ nxml-mode mono ${EMACS}/html_mono/nxml-mode.html
+ nxml-mode node ${EMACS}/html_node/nxml-mode/
+ #
+ org mono ${EMACS}/html_mono/org.html
+ org node ${EMACS}/html_node/org/
+ #
+ pcl-cvs mono ${EMACS}/html_mono/pcl-cvs.html
+ pcl-cvs node ${EMACS}/html_node/pcl-cvs/
+ #
+ rcirc mono ${EMACS}/html_mono/rcirc.html
+ rcirc node ${EMACS}/html_node/rcirc/
+ #
+ semantic mono ${EMACS}/html_mono/semantic.html
+ semantic node ${EMACS}/html_node/semantic/
+ #
+ smtp mono ${EMACS}/html_mono/smtpmail.html
+ smtp node ${EMACS}/html_node/smtpmail/
+ #
+ speedbar mono ${EMACS}/html_mono/speedbar.html
+ speedbar node ${EMACS}/html_node/speedbar/
+ #
+ tramp mono ${EMACS}/html_mono/tramp.html
+ tramp node ${EMACS}/html_node/tramp/
+ #
+ vip mono ${EMACS}/html_mono/vip.html
+ vip node ${EMACS}/html_node/vip/
+ #
+ viper mono ${EMACS}/html_mono/viper.html
+ viper node ${EMACS}/html_node/viper/
+ #
+ woman mono ${EMACS}/html_mono/woman.html
+ woman node ${EMACS}/html_node/woman/
+ # (end emacs manuals)
+
+emacs-muse node ${GS}/emacs-muse/manual/muse.html
+emacs-muse node ${GS}/emacs-muse/manual/html_node/
+
+emms node ${GS}/emms/manual/
+
+findutils mono ${GS}/findutils/manual/html_mono/find.html
+findutils node ${GS}/findutils/manual/html_node/find_html
+
+gama mono ${GS}/gama/manual/gama.html
+gama node ${GS}/gama/manual/html_node/
+
+GAWK = ${GS}/gawk/manual
+gawk mono ${GAWK}/gawk.html
+gawk node ${GAWK}/html_node/
+ gawkinet mono ${GAWK}/gawkinet/gawkinet.html
+ gawkinet node ${GAWK}/gawkinet/html_node/
+
+gcal mono ${GS}/gcal/manual/gcal.html
+gcal node ${GS}/gcal/manual/html_node/
+
+GCC = http://gcc.gnu.org/onlinedocs
+gcc node ${GCC}/gcc/
+ cpp node ${GCC}/cpp/
+ gcj node ${GCC}/gcj/
+ gfortran node ${GCC}/gfortran/
+ gnat_rm node ${GCC}/gnat_rm/
+ gnat_ugn_unw node ${GCC}/gnat_ugn_unw/
+ libgomp node ${GCC}/libgomp/
+ libstdc++ node ${GCC}/libstdc++/
+ #
+ gccint node ${GCC}/gccint/
+ cppinternals node ${GCC}/cppinternals/
+ gfc-internals node ${GCC}/gfc-internals/
+ gnat-style node ${GCC}/gnat-style/
+ libiberty node ${GCC}/libiberty/
+
+GDB = http://sourceware.org/gdb/current/onlinedocs
+gdb node ${GDB}/gdb/
+ gdbint node ${GDB}/gdbint/
+ stabs node ${GDB}/stabs/
+
+GDBM = http://www.gnu.org.ua/software/gdbm/manual
+gdbm mono ${GDBM}/gdbm.html
+gdbm chapter ${GDBM}/html_chapter/
+gdbm section ${GDBM}/html_section/
+gdbm node ${GDBM}/html_node/
+
+gettext mono ${GS}/gettext/manual/gettext.html
+gettext node ${GS}/gettext/manual/html_node/
+
+gforth node http://www.complang.tuwien.ac.at/forth/gforth/Docs-html/
+
+global mono ${GS}/global/manual/global.html
+
+gmediaserver node ${GS}/gmediaserver/manual/
+
+gmp node http://www.gmplib.org/manual/
+
+gnu-arch node ${GS}/gnu-arch/tutorial/
+
+gnu-c-manual mono ${GS}/gnu-c-manual/gnu-c-manual.html
+
+gnu-crypto node ${GS}/gnu-crypto/manual/
+
+gnubg mono ${GS}/gnubg/manual/gnubg.html
+gnubg node ${GS}/gnubg/manual/html_node/
+
+gnubik mono ${GS}/gnubik/manual/gnubik.html
+gnubik node ${GS}/gnubik/manual/html_node/
+
+gnulib mono ${GS}/gnulib/manual/gnulib.html
+gnulib node ${GS}/gnulib/manual/html_node/
+
+GNUN = ${GS}/trans-coord/manual
+gnun mono ${GNUN}/gnun/gnun.html
+gnun node ${GNUN}/gnun/html_node/
+ web-trans mono ${GNUN}/web-trans/web-trans.html
+ web-trans node ${GNUN}/web-trans/html_node/
+
+GNUPG = http://www.gnupg.org/documentation/manuals
+gnupg node ${GNUPG}/gnupg/
+ dirmngr node ${GNUPG}/dirmngr/
+ gcrypt node ${GNUPG}/gcrypt/
+ libgcrypt node ${GNUPG}/gcrypt/
+ ksba node ${GNUPG}/ksba/
+ assuan node ${GNUPG}/assuan/
+ gpgme node ${GNUPG}/gpgme/
+
+gnuprologjava node ${GS}/gnuprologjava/manual/
+
+gnuschool mono ${GS}/gnuschool/gnuschool.html
+
+GNUSTANDARDS = ${G}/prep
+ maintain mono ${GNUSTANDARDS}/maintain/maintain.html
+ maintain node ${GNUSTANDARDS}/maintain/html_node/
+ #
+ standards mono ${GNUSTANDARDS}/standards/standards.html
+ standards node ${GNUSTANDARDS}/standards/html_node/
+
+gnutls mono ${GS}/gnutls/manual/gnutls.html
+gnutls node ${GS}/gnutls/manual/html_node/
+
+gperf mono ${GS}/gperf/manual/gperf.html
+gperf node ${GS}/gperf/manual/html_node/
+
+grep mono ${GS}/grep/manual/grep.html
+grep node ${GS}/grep/manual/html_node/
+
+groff node ${GS}/groff/manual/html_node/
+
+grub mono ${GS}/grub/manual/grub.html
+grub node ${GS}/grub/manual/html_node/
+
+gsasl mono ${GS}/gsasl/manual/gsasl.html
+gsasl node ${GS}/gsasl/manual/html_node/
+
+gsl node ${GS}/gsl/manual/html_node/
+
+gsrc mono ${GS}/gsrc/manual/gsrc.html
+gsrc node ${GS}/gsrc/manual/html_node/
+
+gss mono ${GS}/gss/manual/gss.html
+gss node ${GS}/gss/manual/html_node/
+
+gtypist mono ${GS}/gtypist/doc/
+
+guile mono ${GS}/guile/manual/guile.html
+guile node ${GS}/guile/manual/html_node/
+
+GUILE_GNOME = ${GS}/guile-gnome/docs
+ gobject node ${GUILE_GNOME}/gobject/html/
+ glib node ${GUILE_GNOME}/glib/html/
+ atk node ${GUILE_GNOME}/atk/html/
+ pango node ${GUILE_GNOME}/pango/html/
+ pangocairo node ${GUILE_GNOME}/pangocairo/html/
+ gdk node ${GUILE_GNOME}/gdk/html/
+ gtk node ${GUILE_GNOME}/gtk/html/
+ libglade node ${GUILE_GNOME}/libglade/html/
+ gnome-vfs node ${GUILE_GNOME}/gnome-vfs/html/
+ libgnomecanvas node ${GUILE_GNOME}/libgnomecanvas/html/
+ gconf node ${GUILE_GNOME}/gconf/html/
+ libgnome node ${GUILE_GNOME}/libgnome/html/
+ libgnomeui node ${GUILE_GNOME}/libgnomeui/html/
+ corba node ${GUILE_GNOME}/corba/html/
+ clutter node ${GUILE_GNOME}/clutter/html/
+ clutter-glx node ${GUILE_GNOME}/clutter-glx/html/
+
+guile-gtk node ${GS}/guile-gtk/docs/guile-gtk/
+
+guile-rpc mono ${GS}/guile-rpc/manual/guile-rpc.html
+guile-rpc node ${GS}/guile-rpc/manual/html_node/
+
+gv mono ${GS}/gv/manual/gv.html
+gv node ${GS}/gv/manual/html_node/
+
+gzip mono ${GS}/gzip/manual/gzip.html
+gzip node ${GS}/gzip/manual/html_node/
+
+hello mono ${GS}/hello/manual/hello.html
+hello node ${GS}/hello/manual/html_node/
+
+help2man mono ${GS}/help2man/help2man.html
+
+idutils mono ${GS}/idutils/manual/idutils.html
+idutils node ${GS}/idutils/manual/html_node/
+
+inetutils mono ${GS}/inetutils/manual/inetutils.html
+inetutils node ${GS}/inetutils/manual/html_node/
+
+jwhois mono ${GS}/jwhois/manual/jwhois.html
+jwhois node ${GS}/jwhois/manual/html_node/
+
+libc mono ${GS}/libc/manual/html_mono/libc.html
+libc node ${GS}/libc/manual/html_node/
+
+LIBCDIO = ${GS}/libcdio
+ libcdio mono ${LIBCDIO}/libcdio.html
+ cd-text mono ${LIBCDIO}/cd-text-format.html
+
+libextractor mono ${GS}/libextractor/manual/libextractor.html
+libextractor node ${GS}/libextractor/manual/html_node/
+
+libidn mono ${GS}/libidn/manual/libidn.html
+libidn node ${GS}/libidn/manual/html_node/
+
+librejs mono ${GS}/librejs/manual/librejs.html
+librejs node ${GS}/librejs/manual/html_node/
+
+libmatheval mono ${GS}/libmatheval/manual/libmatheval.html
+
+LIBMICROHTTPD = ${GS}/libmicrohttpd
+libmicrohttpd mono ${LIBMICROHTTPD}/manual/libmicrohttpd.html
+libmicrohttpd node ${LIBMICROHTTPD}/manual/html_node/
+ microhttpd-tutorial mono ${LIBMICROHTTPD}/tutorial.html
+
+libtasn1 mono ${GS}/libtasn1/manual/libtasn1.html
+libtasn1 node ${GS}/libtasn1/manual/html_node/
+
+libtool mono ${GS}/libtool/manual/libtool.html
+libtool node ${GS}/libtool/manual/html_node/
+
+lightning mono ${GS}/lightning/manual/lightning.html
+lightning node ${GS}/lightning/manual/html_node/
+
+# The stable/ url redirects immediately, but that's ok.
+# The .html extension is omitted on their web site, but it works if given.
+LILYPOND = http://lilypond.org/doc/stable/Documentation
+ lilypond-internals node ${LILYPOND}/internals/
+ lilypond-learning node ${LILYPOND}/learning/
+ lilypond-notation node ${LILYPOND}/notation/
+ lilypond-snippets node ${LILYPOND}/snippets/
+ lilypond-usage node ${LILYPOND}/usage/
+ lilypond-web node ${LILYPOND}/web/
+ music-glossary node ${LILYPOND}/music-glossary/
+
+liquidwar6 mono ${GS}/liquidwar6/manual/liquidwar6.html
+liquidwar6 node ${GS}/liquidwar6/manual/html_node/
+
+lispintro mono ${GS}/emacs/emacs-lisp-intro/html_mono/emacs-lisp-intro.html
+lispintro node ${GS}/emacs/emacs-lisp-intro/html_node/index.html
+
+m4 mono ${GS}/m4/manual/m4.html
+m4 node ${GS}/m4/manual/html_node/
+
+mailutils mono ${GS}/mailutils/manual/mailutils.html
+mailutils chapter ${GS}/mailutils/manual/html_chapter/
+mailutils section ${GS}/mailutils/manual/html_section/
+mailutils node ${GS}/mailutils/manual/html_node/
+
+make mono ${GS}/make/manual/make.html
+make node ${GS}/make/manual/html_node/
+
+mdk mono ${GS}/mdk/manual/mdk.html
+mdk node ${GS}/mdk/manual/html_node/
+
+METAEXCHANGE = http://ftp.gwdg.de/pub/gnu2/iwfmdh/doc/texinfo
+ iwf_mh node ${METAEXCHANGE}/iwf_mh.html
+ scantest node ${METAEXCHANGE}/scantest.html
+
+MIT_SCHEME = ${GS}/mit-scheme/documentation
+ mit-scheme-ref node ${MIT_SCHEME}/mit-scheme-ref/
+ mit-scheme-user node ${MIT_SCHEME}/mit-scheme-user/
+ sos node ${MIT_SCHEME}/mit-scheme-sos/
+ mit-scheme-imail node ${MIT_SCHEME}/mit-scheme-imail/
+
+moe mono ${GS}/moe/manual/moe_manual.html
+
+motti node ${GS}/motti/manual/
+
+mpc node http://www.multiprecision.org/index.php?prog=mpc&page=html
+
+mpfr mono http://www.mpfr.org/mpfr-current/mpfr.html
+
+mtools mono ${GS}/mtools/manual/mtools.html
+
+myserver node http://www.myserverproject.net/documentation/
+
+nano mono http://www.nano-editor.org/dist/latest/nano.html
+
+nettle chapter http://www.lysator.liu.se/~nisse/nettle/nettle.html
+
+ocrad mono ${GS}/ocrad/manual/ocrad_manual.html
+
+parted mono ${GS}/parted/manual/parted.html
+parted node ${GS}/parted/manual/html_node/
+
+pascal mono http://www.gnu-pascal.de/gpc/
+
+# can't use pcb since url's contain dates --30nov10
+
+PIES = http://www.gnu.org.ua/software/pies/manual
+pies mono ${PIES}/pies.html
+pies chapter ${PIES}/html_chapter/
+pies section ${PIES}/html_section/
+pies node ${PIES}/html_node/
+
+plotutils mono ${GS}/plotutils/manual/en/plotutils.html
+plotutils node ${GS}/plotutils/manual/en/html_node/
+
+proxyknife mono ${GS}/proxyknife/manual/proxyknife.html
+proxyknife node ${GS}/proxyknife/manual/html_node/
+
+pspp mono ${GS}/pspp/manual/pspp.html
+pspp node ${GS}/pspp/manual/html_node/
+
+pyconfigure mono ${GS}/pyconfigure/manual/pyconfigure.html
+pyconfigure node ${GS}/pyconfigure/manual/html_node/
+
+R = http://cran.r-project.org/doc/manuals
+ R-intro mono ${R}/R-intro.html
+ R-lang mono ${R}/R-lang.html
+ R-exts mono ${R}/R-exts.html
+ R-data mono ${R}/R-data.html
+ R-admin mono ${R}/R-admin.html
+ R-ints mono ${R}/R-ints.html
+
+rcs mono ${GS}/rcs/manual/rcs.html
+rcs node ${GS}/rcs/manual/html_node/
+
+READLINE = http://cnswww.cns.cwru.edu/php/chet/readline
+readline mono ${READLINE}/readline.html
+ rluserman mono ${READLINE}/rluserman.html
+ history mono ${READLINE}/history.html
+
+recode mono http://recode.progiciels-bpi.ca/manual/index.html
+
+recutils mono ${GS}/recutils/manual/recutils.html
+recutils node ${GS}/recutils/manual/html_node/
+
+reftex mono ${GS}/auctex/manual/reftex.html
+reftex node ${GS}/auctex/manual/reftex/
+
+remotecontrol mono ${GS}/remotecontrol/manual/remotecontrol.html
+remotecontrol node ${GS}/remotecontrol/manual/html_node/
+
+rottlog mono ${GS}/rottlog/manual/rottlog.html
+rottlog node ${GS}/rottlog/manual/html_node/
+
+RUSH = http://www.gnu.org.ua/software/rush/manual
+rush mono ${RUSH}/rush.html
+rush chapter ${RUSH}/html_chapter/
+rush section ${RUSH}/html_section/
+rush node ${RUSH}/html_node/
+
+screen mono ${GS}/screen/manual/screen.html
+screen node ${GS}/screen/manual/html_node/
+
+sed mono ${GS}/sed/manual/sed.html
+sed node ${GS}/sed/manual/html_node/
+
+sharutils mono ${GS}/sharutils/manual/html_mono/sharutils.html
+sharutils chapter ${GS}/sharutils/manual/html_chapter/
+sharutils node ${GS}/sharutils/manual/html_node/
+
+# can't use mono files since they have generic names
+SMALLTALK = ${GS}/smalltalk
+smalltalk node ${SMALLTALK}/manual/html_node/
+ smalltalk-base node ${SMALLTALK}/manual-base/html_node/
+ smalltalk-libs node ${SMALLTALK}/manual-libs/html_node/
+
+sourceinstall mono ${GS}/sourceinstall/manual/sourceinstall.html
+sourceinstall node ${GS}/sourceinstall/manual/html_node/
+
+sqltutor mono ${GS}/sqltutor/manual/sqltutor.html
+sqltutor node ${GS}/sqltutor/manual/html_node/
+
+src-highlite mono ${GS}/src-highlite/source-highlight.html
+
+swbis mono ${GS}/swbis/manual.html
+
+tar mono ${GS}/tar/manual/tar.html
+tar chapter ${GS}/tar/manual/html_chapter/
+tar section ${GS}/tar/manual/html_section/
+tar node ${GS}/autoconf/manual/html_node/
+
+teseq mono ${GS}/teseq/teseq.html
+teseq node ${GS}/teseq/html_node/
+
+TEXINFO = ${GS}/texinfo/manual
+texinfo mono ${TEXINFO}/texinfo/texinfo.html
+texinfo node ${TEXINFO}/texinfo/html_node/
+ #
+ info mono ${TEXINFO}/info/info.html
+ info node ${TEXINFO}/info/html_node/
+ #
+ info-stnd mono ${TEXINFO}/info-stnd/info-stnd.html
+ info-stnd node ${TEXINFO}/info-stnd/html_node/
+
+units mono ${GS}/units/manual/units.html
+units node ${GS}/units/manual/html_node/
+
+vc-dwim mono ${GS}/vc-dwim/manual/vc-dwim.html
+vc-dwim node ${GS}/vc-dwim/manual/html_node/
+
+wdiff mono ${GS}/wdiff/manual/wdiff.html
+wdiff node ${GS}/wdiff/manual/html_node/
+
+websocket4j mono ${GS}/websocket4j/manual/websocket4j.html
+websocket4j node ${GS}/websocket4j/manual/html_node/
+
+wget mono ${GS}/wget/manual/wget.html
+wget node ${GS}/wget/manual/html_node/
+
+xboard mono ${GS}/xboard/manual/xboard.html
+xboard node ${GS}/xboard/manual/html_node/
+
+# Local Variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "htmlxrefversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/util/infosrch b/util/infosrch
deleted file mode 100755
index af4a9a6..0000000
--- a/util/infosrch
+++ /dev/null
@@ -1,104 +0,0 @@
-#!/usr/local/bin/perl -w
-# $Id: infosrch,v 1.2 2004/04/11 17:56:47 karl Exp $
-# infosrch does a regex search on an info manual.
-# By Harry Putnam <reader@newsguy.com>.
-
-($myscript = $0) =~ s:^.*/::;
-$six = '';
-
-if($ARGV[0] eq "help"){
- &usage;
- exit;
-}
-if($ARGV[0] eq "-e"){
- shift;
- $six = "true";
-}
-if(!$ARGV[1]){
- &usage;
- exit;
-}
-
-$target = shift;
-$regex = shift;
-
-$shell_proc = "info --output - --subnodes 2>/dev/null $target";
-
-open(SHELL_PROC," $shell_proc|");
-while(<SHELL_PROC>){
- chomp;
- push @lines,$_;
-}
-close(SHELL_PROC);
-$cnt = 0;
-for(@lines){
- if(/$regex/ && !$six){
- print "$target\n $lines[($cnt-1)]\n<$cnt> $lines[$cnt]\n $lines[($cnt+1)]\n";
- print "-- \n";
- }elsif(/$regex/ && $six){
- print "$target\n";
- if($lines[($cnt-6)]){
- print " $lines[($cnt-6)]\n";
- }
- if($lines[($cnt-5)]){
- print " $lines[($cnt-5)]\n";
- }
- if($lines[($cnt-4)]){
- print " $lines[($cnt-4)]\n";
- }
- if($lines[($cnt-3)]){
- print " $lines[($cnt-3)]\n";
- }
- if($lines[($cnt-2)]){
- print " $lines[($cnt-2)]\n";
- }
- if($lines[($cnt-1)]){
- print " $lines[($cnt-1)]\n";
- }
- if($lines[$cnt]){
- print "$cnt $lines[$cnt]\n";
- }
- if($lines[($cnt+1)]){
- print " $lines[($cnt+1)]\n";
- }
- if($lines[($cnt+2)]){
- print " $lines[($cnt+2)]\n";
- }
- if($lines[($cnt+3)]){
- print " $lines[($cnt+3)]\n";
- }
- if($lines[($cnt+4)]){
- print " $lines[($cnt+4)]\n";
- }
- if($lines[($cnt+5)]){
- print " $lines[($cnt+5)]\n";
- }
- if($lines[($cnt+6)]){
- print " $lines[($cnt+6)]\n";
- }
- print "-- \n";
- }
- $cnt++;
-}
-
-sub usage {
- print <<EOM;
-
-Purpose: Extract full text from info node and search it by regex
-Usage: $myscript [-e] TARGET REGEX
-
-Where TARGET is an info node such as `emacs', `bash' etc, and
-REGEX is what you want to find in it.
-
-The -e flag is not required but if used then 6 lines preceding and six
-lines following any hits will be printed. The default (with no -e flag)
-is to print one line before and after.
-
-The output has the line number prepended to the line containing the
-actual regex.
-
-Info command used:
- info --output - --subnodes 2>/dev/null TARGET
-
-EOM
-}
diff --git a/util/install-info-html b/util/install-info-html
deleted file mode 100644
index 4d10295..0000000
--- a/util/install-info-html
+++ /dev/null
@@ -1,157 +0,0 @@
-#!@BASH@
-# $Id: install-info-html,v 1.3 2004/04/11 17:56:47 karl Exp $
-
-name=install-info-html
-version=1.0
-
-all=
-index_dir=.
-
-#
-# debugging
-#
-debug_echo=:
-
-
-#
-# print usage
-#
-function help ()
-{
- cat << EOF
-$name $version
-Install HTML info document.
-
-Usage: $name [OPTION]... [DOCUMENT-DIR]...
-
-Options:
- -a,--all assume all subdirectories of index to be DOCUMENT-DIRs
- -d,--dir=DIR set index directory to DIR (default=.)
- -D,--debug print debugging info
- -h,--help this help text
- -v,--version show version
-EOF
-}
-
-
-function cleanup ()
-{
- $debug_echo "cleaning ($?)..."
-}
-
-trap cleanup 0 9 15
-
-#
-# Find command line options and switches
-#
-
-# "x:" x takes argument
-#
-options="adhvW:"
-#
-# ugh, "\-" is a hack to support long options
-# must be in double quotes for bash-2.0
-
-while getopts "\-:$options" O
-do
- $debug_echo "O: \`$O'"
- $debug_echo "arg: \`$OPTARG'"
- case $O in
- a)
- all=yes
- ;;
- D)
- [ "$debug_echo" = "echo" ] && set -x
- debug_echo=echo
- ;;
- h)
- help;
- exit 0
- ;;
- v)
- echo $name $version
- exit 0
- ;;
- d)
- index_dir=$OPTARG
- ;;
- # a long option!
- -)
- case "$OPTARG" in
- a*|-a*)
- all=yes
- ;;
- de*|-de*)
- [ "$debug_echo" = "echo" ] && set -x
- debug_echo=echo
- ;;
- h*|-h*)
- help;
- exit 0
- ;;
- di*|-di*)
- index_dir="`expr \"$OPTARG\" ':' '[^=]*=\(.*\)'`"
- ;;
- version|-version)
- echo $name $version
- exit 0
- ;;
- *|-*)
- echo "$0: invalid option -- \"$OPTARG\""
- help;
- exit -1
- ;;
- esac
- esac
-done
-shift `expr $OPTIND - 1`
-
-#
-# Input file name
-#
-if [ -z "$all" ] && [ -z "$1" ]; then
- help
- echo "$name: No HTML documents given"
- exit 2
-fi
-
-if [ -n "$all" ] && [ -n "$1" ]; then
- echo "$name: --all specified, ignoring DIRECTORY-DIRs"
-fi
-
-if [ -n "$all" ]; then
- document_dirs=`/bin/ls -d1 $index_dir`
-else
- document_dirs=$*
-fi
-
-index_file=$index_dir/index.html
-rm -f $index_file
-echo -n "$name: Writing index: $index_file..."
-
-# head
-cat >> $index_file <<EOF
-<html>
-<head><title>Info documentation index</title></head>
-<body>
-<h1>Info documentation index</h1>
-This is the directory file \`index.html' a.k.a. \`DIR', which contains the
-topmost node of the HTML Info hierarchy.
-<p>
-This is all very much Work in Progress (WiP).
-<p>
-<ul>
-EOF
-
-#list
-for i in $document_dirs; do
- echo "<li> <a href=\"$i/$i.html\">$i</a></li>"
-done >> $index_file
-
-# foot
-cat >> $index_file <<EOF
-</ul>
-</body>
-</html>
-EOF
-echo
diff --git a/util/makeinfo.bat b/util/makeinfo.bat
new file mode 100755
index 0000000..a70cd28
--- /dev/null
+++ b/util/makeinfo.bat
@@ -0,0 +1,2 @@
+@echo off
+perl "%~dpn0" %*
diff --git a/util/outline.gawk b/util/outline.gawk
deleted file mode 100644
index fa67263..0000000
--- a/util/outline.gawk
+++ /dev/null
@@ -1,144 +0,0 @@
-#! /usr/local/bin/gawk -f
-
-# texi.outline --- produce an outline from a texinfo source file
-#
-# Copyright (C) 1998 Arnold David Robbins (arnold@gnu.org)
-#
-# TEXI.OUTLINE is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# TEXI.OUTLINE is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# NOTE:
-# This program uses gensub(), which is specific to gawk.
-# With some work (split, substr, etc), it could be made to work
-# on other awks, but it's not worth the trouble for me.
-
-BEGIN \
-{
- # Levels at which different nodes can be
- Level["@top"] = 0
- Level["@appendix"] = 1
- Level["@chapter"] = 1
- Level["@majorheading"] = 1
- Level["@unnumbered"] = 1
- Level["@appendixsec"] = 2
- Level["@heading"] = 2
- Level["@section"] = 2
- Level["@unnumberedsec"] = 2
- Level["@unnumberedsubsec"] = 3
- Level["@appendixsubsec"] = 3
- Level["@subheading"] = 3
- Level["@subsection"] = 3
- Level["@appendixsubsubsec"] = 4
- Level["@subsubheading"] = 4
- Level["@subsubsection"] = 4
- Level["@unnumberedsubsubsec"] = 4
-
- # insure that we were called correctly
- if (ARGC != 2) {
- printf("usage: %s texinfo-file\n", ARGV[0]) > "/dev/stderr"
- exit 1
- }
-
- # init header counters
- app_letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
- app_h = 0
- l1_h = l2_h = l3_h = l4_h = 0
-}
-
-# skip lines we're not interested in
-/^[^@]/ || ! ($1 in Level) { next }
-
-Level[$1] == 1 {
- if ($1 !~ /^@unnumbered/ || $1 !~ /heading/)
- l1_h++
- l2_h = l3_h = l4_h = 0
- Ntabs = 0
- Number = makenumber($1)
- Title = maketitle($0)
- print_title()
-}
-
-Level[$1] == 2 {
- l2_h++
- l3_h = l4_h = 0
- Ntabs = 1
- Number = makenumber($1)
- Title = maketitle($0)
- print_title()
-}
-
-Level[$1] == 3 {
- l3_h++
- l4_h = 0
- Ntabs = 2
- Number = makenumber($1)
- Title = maketitle($0)
- print_title()
-}
-
-Level[$1] == 4 {
- l4_h++
- Ntabs = 3
- Number = makenumber($1)
- Title = maketitle($0)
- print_title()
-}
-
-# maketitle --- extract title
-
-function maketitle(str, text)
-{
- $1 = "" # clobber section keyword
- text = $0
- gsub(/^[ \t]*/, "", text)
- text = gensub(/@[a-z]+{/, "", "g", text)
- text = gensub(/([^@])}/, "\\1", "g", text)
- return text
-}
-
-# print_title --- print the title
-
-function print_title( i)
-{
- for (i = 1; i <= Ntabs; i++)
- printf "\t"
- printf("%s %s\n", Number, Title)
-}
-
-# makenumber --- construct a heading number from levels and section command
-
-function makenumber(command, result, lev1)
-{
- result = ""
- if (command ~ /^@appendix/) {
- if (Level[command] == 1)
- app_h++
-
- lev1 = substr(app_letters, app_h, 1)
- } else if (command ~ /^@unnumbered/ || command ~ /heading/) {
- lev1 = "(unnumbered)"
- } else
- lev1 = l1_h ""
-
- result = lev1 "."
- if (l2_h > 0) {
- result = result l2_h "."
- if (l3_h > 0) {
- result = result l3_h "."
- if (l4_h > 0) {
- result = result l4_h "."
- }
- }
- }
- return result
-}
diff --git a/util/pdftexi2dvi b/util/pdftexi2dvi
index 17708e7..11eadc8 100755
--- a/util/pdftexi2dvi
+++ b/util/pdftexi2dvi
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: pdftexi2dvi,v 1.3 2007/07/05 15:22:26 karl Exp $
+# $Id: texi2pdf 5381 2013-09-26 23:03:58Z karl $
# Written by Thomas Esser. Public domain.
# Execute texi2dvi --pdf.
@@ -16,4 +16,23 @@ unset RUNNING_BSH
# hack around a bug in zsh:
test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"'
+rcs_revision='$Revision: 5381 $'
+rcs_version=`set - $rcs_revision; echo $2`
+
+# special-case --version following GNU standards for identifying the
+# program name. If --version is specified as other than the first
+# argument, we don't output the standard name, but then, we're not
+# obliged to.
+if test "x$1" = x--version; then
+ cat <<EOF
+texi2pdf (GNU Texinfo 5.2) $rcs_version
+
+Copyright (C) 2013 Free Software Foundation, Inc.
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+EOF
+ exit 0
+fi
+
texi2dvi --pdf ${1+"$@"}
diff --git a/util/pod2texi.bat b/util/pod2texi.bat
new file mode 100755
index 0000000..a70cd28
--- /dev/null
+++ b/util/pod2texi.bat
@@ -0,0 +1,2 @@
+@echo off
+perl "%~dpn0" %*
diff --git a/util/prepinfo.awk b/util/prepinfo.awk
deleted file mode 100644
index 18e668b..0000000
--- a/util/prepinfo.awk
+++ /dev/null
@@ -1,355 +0,0 @@
-#! /usr/local/bin/gawk -f
-
-# prepinfo.awk --- fix node lines and menus
-#
-# Copyright 1998 Arnold Robbins, arnold@gnu.org
-#
-# PREPINFO is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# PREPINFO is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-BEGIN \
-{
- # manifest constants
- TRUE = 1
- FALSE = 0
-
- # Levels at which different nodes can be
- Level["@top"] = 0
- Level["@appendix"] = 1
- Level["@chapter"] = 1
- Level["@majorheading"] = 1
- Level["@unnumbered"] = 1
- Level["@appendixsec"] = 2
- Level["@heading"] = 2
- Level["@section"] = 2
- Level["@unnumberedsec"] = 2
- Level["@unnumberedsubsec"] = 3
- Level["@appendixsubsec"] = 3
- Level["@subheading"] = 3
- Level["@subsection"] = 3
- Level["@appendixsubsubsec"] = 4
- Level["@subsubheading"] = 4
- Level["@subsubsection"] = 4
- Level["@unnumberedsubsubsec"] = 4
-
- # Length of menus
- Menumargin = 78
-
- # Length of menu item
- Min_menitem_length = 29
-
- # insure that we were called correctly
- if (ARGC != 2) {
- printf("usage: %s texinfo-file\n", ARGV[0]) > "/dev/stderr"
- exit 1
- }
-
- # Arrange for two passes over input file
- Pass = 1
- ARGV[2] = "Pass=2"
- ARGV[3] = ARGV[1]
- ARGC = 4
- Lastlevel = -1
-
- # Initialize stacks
- Up[-1] = "(dir)"
- Prev[0] = "(dir)"
-
- if (Debug == "args") {
- for (i = 0; i < ARGC; i++)
- printf("ARGV[%d] = %s\n", i, ARGV[i]) > "/dev/stderr"
- }
-}
-
-$1 == "@node" \
-{
- Name = getnodename($0)
- Nodeseen = TRUE
-
- if ((l = length(Name)) > Maxlen)
- Maxlen = l
-
- if (Debug == "nodenames")
- printf("Name = %s\n", Name) > "/dev/stderr"
-
- if (Pass == 1)
- next
-}
-
-Pass == 1 && /^@c(omment)?[ \t]+fakenode/ \
-{
- if (Debug == "fakenodes")
- printf("fakenode at %d\n", FNR) > "/dev/stderr"
- Fakenode = TRUE
- next
-}
-
-Pass == 1 && ($1 in Level) \
-{
- # skip fake nodes --- titles without associated @node lines
- if (Fakenode) {
- if (Debug == "fakenodes")
- printf("%s at %d is a fakenode\n", $1, FNR) > "/dev/stderr"
- Fakenode = FALSE
- next
- }
-
- if (Debug == "titles")
- printf("Processing %s: Name = %s\n", $1, Name) > "/dev/stderr"
-
- # save type
- type = $1
-
- if (! Nodeseen) {
- err_prefix()
- printf("%s line with no @node or fakenode line\n",
- type) > "/dev/stderr"
- Badheading[FNR] = 1
- # ??? used ???
- next
- } else
- Nodeseen = FALSE # reset it
-
- # Squirrel away the info
- levelnum = Level[type]
- Node[Name ".level"] = levelnum
- Node[Name ".name"] = Name
- if (Debug == "titles") {
- printf("Node[%s\".level\"] = %s\n", Name, Node[Name ".level"]) > "/dev/stderr"
- printf("Node[%s\".name\"] = %s\n", Name, Node[Name ".name"]) > "/dev/stderr"
- }
-
- if (levelnum == Lastlevel) { # e.g., two sections in a row
- Node[Name ".up"] = Up[levelnum - 1]
- if (levelnum in Prev) {
- Node[Prev[levelnum] ".next"] = Name
- Node[Name ".prev"] = Prev[levelnum]
- }
- Prev[levelnum] = Name
- Up[levelnum] = Name # ???
- } else if (levelnum < Lastlevel) { # section, now chapter
- Lastlevel = levelnum
- Node[Name ".up"] = Up[levelnum - 1]
- if (levelnum in Prev) {
- Node[Name ".prev"] = Prev[levelnum]
- Node[Prev[levelnum] ".next"] = Name
- }
- Prev[levelnum] = Name
- Up[levelnum] = Name
- } else { # chapter, now section, levelnum > Lastlevel
- Node[Name ".up"] = Up[levelnum - 1]
- Node[Up[Lastlevel] ".child"] = Name
- Up[levelnum] = Name
- Prev[levelnum] = Name
- Lastlevel = levelnum
- }
-
- # For master menu
- if (Level[$1] >= 2)
- List[++Sequence] = Name
-
- if (Debug == "titles") {
- printf("Node[%s\".prev\"] = %s\n", Name, Node[Name ".prev"]) > "/dev/stderr"
- printf("Node[%s\".up\"] = %s\n", Name, Node[Name ".up"]) > "/dev/stderr"
- printf("Node[%s\".child\"] = %s\n", Name, Node[Name ".child"]) > "/dev/stderr"
- }
-}
-
-Pass == 2 && Debug == "dumptitles" && FNR <= 1 \
-{
- for (i in Node)
- printf("Node[%s] = %s\n", i, Node[i]) | "sort 1>&2"
- close("sort 1>&2")
-}
-
-/^@menu/ && Pass == 1, /^@end[ \t]+menu/ && Pass == 1 \
-{
- if (/^@menu/ || /^@end[ \t]+menu/)
- next
-
-# if (Debug == "menu")
-# printf("processing: %s\n", $0) > "/dev/stderr"
-
- if (/^\*/) {
- if (In_menitem) { # file away info from previousline
- Node[node ".mendesc"] = desc
- Node[node ".longdesc"] = longdesc
- if (Debug == "mendesc") {
- printf("Node[%s.mendesc] = %s\n",
- node, Node[node ".mendesc"]) > "/dev/stderr"
- printf("Node[%s.longdesc] = %s\n",
- node, Node[node ".longdesc"]) > "/dev/stderr"
- }
- }
- In_menitem = TRUE
-
- # pull apart menu item
- $1 = "" # nuke ``*''
- $0 = $0 # reparse line
- i1 = index($0, ":")
- if (i1 <= 0) {
- err_prefix()
- printf("badly formed menu item") > "/dev/stderr"
- next
- }
- if (substr($0, i1+1, 1) != ":") { # desc: node. long desc
- i2 = index($0, ".")
- if (i2 <= 0) {
- err_prefix()
- printf("badly formed menu item") > "/dev/stderr"
- next
- }
- desc = substr($0, 1, i1 - 1)
- sub(/^[ \t]+/, "", node)
- sub(/[ \t]+$/, "", node)
- longdesc = substr($0, i2 + 1)
- } else { # nodname:: long desc
- desc = ""
- node = substr($0, 1, i1 - 1)
- sub(/^[ \t]+/, "", node)
- sub(/[ \t]+$/, "", node)
- longdesc = substr($0, i1 + 2)
- }
- } else if (In_menitem) { # continuation line
- longdesc = longdesc " " $0
- } else
- In_menitem = FALSE
-
- Node[node ".mendesc"] = desc
- Node[node ".longdesc"] = longdesc
- if (Debug == "mendesc") {
- printf("Node[%s.mendesc] = %s\n",
- node, Node[node ".mendesc"]) > "/dev/stderr"
- printf("Node[%s.longdesc] = %s\n",
- node, Node[node ".longdesc"]) > "/dev/stderr"
- }
-
- if (Debug == "menu")
- printf("Menu:: Name %s: desc %s: longdesc %s\n",
- node, desc, longdesc) > "/dev/stderr"
-}
-
-function err_prefix()
-{
- printf("%s: %s: %d: ", ARGV[0], FILENAME, FNR) > "/dev/stderr"
-}
-
-function getnodename(str)
-{
- sub(/@node[ \t]+/, "", str)
- sub(/,.*/, "", str)
- if (Debug == "nodenames")
- printf("getnodename: return %s\n", str) > "/dev/stderr"
- return str
-}
-
-Pass == 2 && /^@node/ \
-{
- Name = getnodename($0)
-
- # Top node is special. It's next is the first child
- n = Node[Name ".next"]
- if (Node[Name ".level"] == 0 && n == "")
- n = Node[Name ".child"]
-
- printf("@node %s, %s, %s, %s\n", Name, n,
- Node[Name ".prev"] ? Node[Name ".prev"] : Node[Name ".up"],
- Node[Name ".up"])
- next
-}
-
-Pass == 2 && /^@menu/ \
-{
- # First, nuke current contents of menu
- do {
- if ((getline) <= 0) {
- err_prefix()
- printf("unexpected EOF inside menu\n") > "/dev/stderr"
- exit 1
- }
- } while (! /^@end[ \t]+menu/)
-
- # next, compute maximum length of a node name
- max = 0
- for (n = Node[Name ".child"]; (n ".next") in Node; n = Node[n ".next"]) {
- if ((n ".desc") in Node)
- s = Node[n ".desc"] ": " n "."
- else
- s = n "::"
- l = length(s)
- if (l > max)
- max = l
- }
- if (max < Min_menitem_length)
- max = Min_menitem_length
-
- # now dump the menu
- print "@menu"
-
- for (n = Node[Name ".child"]; (n ".next") in Node; n = Node[n ".next"]) {
- print_menuitem(n, max)
- }
- print_menuitem(n, max)
-
- if (Name == "Top") { # Master Menu
- if (Maxlen < Min_menitem_length)
- Maxlen = Min_menitem_length
- print ""
- for (i = 1; i <= Sequence; i++)
- print_menuitem(List[i], Maxlen)
- print ""
- }
- print "@end menu"
- next
-}
-
-Pass == 2 # print
-
-
-function print_menuitem(n, max, nodesc, i, dwords, count, p)
-{
- nodesc = FALSE
- if (! ((n ".longdesc") in Node)) {
- err_prefix()
- printf("warning: %s: no long description\n", n) > "/dev/stderr"
- nodesc = TRUE
- } else {
- for (i in dwords)
- delete dwords[i]
- count = split(Node[n ".longdesc"], dwords, "[ \t\n]+")
- }
- if ((n ".desc") in Node)
- s = Node[n ".desc"] ": " n "."
- else
- s = n "::"
- printf("* %-*s", max, s)
-
- if (Debug == "mendescitem")
- printf("<* %-*s>\n", max, s) > "/dev/stderr"
-
- p = max + 2
- if (! nodesc) {
- for (i = 1; i <= count; i++) {
- l = length(dwords[i])
- if (l == 0)
- continue
- if (p + l + 1 > Menumargin) {
- printf("\n%*s", max + 2, " ")
- p = max + 2
- }
- printf(" %s", dwords[i])
- p += l + 1
- }
- }
- print ""
-}
diff --git a/util/tests/Makefile.am b/util/tests/Makefile.am
new file mode 100644
index 0000000..a444fc2
--- /dev/null
+++ b/util/tests/Makefile.am
@@ -0,0 +1,11 @@
+# Makefile.am for texinfo/util/tests.
+#
+# Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
+#
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/util/tests/README b/util/tests/README
new file mode 100644
index 0000000..4b9945a
--- /dev/null
+++ b/util/tests/README
@@ -0,0 +1,17 @@
+$Id: README 5191 2013-02-23 00:11:18Z karl $
+texinfo/util/tests/README
+
+ Copyright 2013 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved.
+
+Perhaps some day we will actually make these work. We can't just invoke
+them unconditionally, since people may or may not have working TeX
+installations. And even checking whether it is working or not is not
+simple.
+
+The txitextest script compares old and new results of running manuals
+through texinfo.tex. The texinfo.tex developer(s) run this from cron
+nightly as an imperfect check against errors and/or reversions creeping in.
diff --git a/util/tests/automtest.sh b/util/tests/automtest.sh
new file mode 100755
index 0000000..ad0c6a1
--- /dev/null
+++ b/util/tests/automtest.sh
@@ -0,0 +1,59 @@
+#!/bin/sh
+# Copyright 2012 Free Software Foundation, Inc.
+#
+# This file is part of GNU Texinfo.
+#
+# GNU Texinfo is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License,
+# or (at your option) any later version.
+#
+# GNU Texinfo is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# This is a basic test of whether the Texinfo support in automake works.
+# Both texi2dvi and makeinfo. Since it requires automake, we don't want
+# to enable it by default or anything.
+
+set -x; set -e; set -u
+
+mkdir foo.dir
+cd foo.dir
+
+mkdir sub
+
+cat > configure.ac <<'END'
+AC_INIT([try-texinfo], [1.0])
+AM_INIT_AUTOMAKE([foreign -Wall -Werror])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+all-local: pdf dvi ps info
+info_TEXINFOS = sub/foobarbaz.texi
+END
+
+cat > sub/foobarbaz.texi <<'END'
+\input texinfo
+@setfilename foobarbaz.info
+@settitle Zardoz
+@node Top
+Foo Bar.
+@bye
+END
+
+autoreconf -vi
+grep ' -o.*foobarbaz\.texi' Makefile.in # Sanity check.
+./configure
+make
+test -f sub/foobarbaz.info
+test -f sub/foobarbaz.dvi
+test -f sub/foobarbaz.ps
+test -f sub/foobarbaz.pdf
+make distcheck
diff --git a/util/bibtex.test b/util/tests/bibtex.test
index 0bb29a0..0bb29a0 100755
--- a/util/bibtex.test
+++ b/util/tests/bibtex.test
diff --git a/util/defs.in b/util/tests/defs.in
index f70b1e7..f70b1e7 100644
--- a/util/defs.in
+++ b/util/tests/defs.in
diff --git a/util/dvipdf.test b/util/tests/dvipdf.test
index f66375b..f66375b 100755
--- a/util/dvipdf.test
+++ b/util/tests/dvipdf.test
diff --git a/util/latex2html.test b/util/tests/latex2html.test
index d52bf2f..d52bf2f 100755
--- a/util/latex2html.test
+++ b/util/tests/latex2html.test
diff --git a/util/local.test b/util/tests/local.test
index ff4aa79..ff4aa79 100755
--- a/util/local.test
+++ b/util/tests/local.test
diff --git a/util/texi2dvi.test b/util/tests/texi2dvi.test
index 2f3f075..2f3f075 100755
--- a/util/texi2dvi.test
+++ b/util/tests/texi2dvi.test
diff --git a/util/txitextest b/util/tests/txitextest
index 4a85b01..b72a80a 100755
--- a/util/txitextest
+++ b/util/tests/txitextest
@@ -1,5 +1,22 @@
#!/bin/sh
-# $Id: txitextest,v 1.8 2006/08/14 13:18:20 karl Exp $
+# $Id: txitextest 5320 2013-08-16 13:50:01Z karl $
+# Copyright 2006, 2011, 2012, 2013 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License,
+# or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Original author: Karl Berry.
+#
# Test texinfo.tex changes by running various manuals through with an
# old version, saving the .ps result from dvips, doing the same with a
# new version, and comparing. Idea from Stepan Kasal.
@@ -7,11 +24,11 @@
# Another option is to run the manuals all the way through using
# texi2dvi, which tests in another way.
-tsrc=`dirname $0`/..
+tsrc=`cd \`dirname $0\` && pwd`/../..
PATH=$tsrc/util:$PATH
tdoc=$tsrc/doc
-default_manuals="$tdoc/texinfo.txi $tdoc/info.texi $tdoc/info-stnd.texi"
+default_manuals="$tdoc/texinfo.texi $tdoc/info.texi $tdoc/info-stnd.texi"
olddir=$tsrc/../gnulib/config
newdir=$tdoc
@@ -40,7 +57,7 @@ rm -f *
run_tex() \
{
TEXINPUTS=.:$mandir: tex $manual \
- || { echo "tex $manual failed." >&2; exit 1; }
+ || { echo "$0: tex $manual failed." >&2; exit 1; }
}
for manual in $manuals; do
diff --git a/util/tex3patch b/util/tex3patch
deleted file mode 100755
index 046c794..0000000
--- a/util/tex3patch
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/bin/sh
-# Auxiliary script to work around TeX 3.0 bug. ---- tex3patch ----
-# patches texinfo.tex in current directory, or in directory given as arg.
-
-ANYVERSION=no
-
-for arg in $1 $2
-do
- case $arg in
- --dammit | -d ) ANYVERSION=yes ;;
-
- * ) dir=$arg
- esac
-done
-
-if [ -z "$dir" ]; then
- dir='.'
-fi
-
-if [ 2 -lt $# ] || [ ! -f "$dir/texinfo.tex" ]; then
- echo "To patch texinfo.tex for peaceful coexistence with Unix TeX 3.0,"
- echo "run $0"
- echo "with no arguments in the same directory as texinfo.tex; or run"
- echo " $0 DIRECTORY"
- echo "(where DIRECTORY is a path leading to texinfo.tex)."
- exit
-fi
-
-if [ -z "$TMPDIR" ]; then
- TMPDIR=/tmp
-fi
-
-echo "Checking for \`dummy.tfm'"
-
-( cd $TMPDIR; tex '\relax \batchmode \font\foo=dummy \bye' )
-
-grep -s '3.0' $TMPDIR/texput.log
-if [ 1 = "$?" ] && [ "$ANYVERSION" != "yes" ]; then
- echo "You probably do not need this patch,"
- echo "since your TeX does not seem to be version 3.0."
- echo "If you insist on applying the patch, run $0"
- echo "again with the option \`--dammit'"
- exit
-fi
-
-grep -s 'file not found' $TMPDIR/texput.log
-if [ 0 = $? ]; then
- echo "This patch requires the dummy font metric file \`dummy.tfm',"
- echo "which does not seem to be part of your TeX installation."
- echo "Please get your TeX maintainer to install \`dummy.tfm',"
- echo "then run this script again."
- exit
-fi
-rm $TMPDIR/texput.log
-
-echo "Patching $dir/texinfo.tex"
-
-sed -e 's/%%*\\font\\nullfont/\\font\\nullfont/' \
- $dir/texinfo.tex >$TMPDIR/texinfo.tex
-mv $dir/texinfo.tex $dir/texinfo.tex-distrib; mv $TMPDIR/texinfo.tex $dir
-
-if [ 0 = $? ]; then
- echo "Patched $dir/texinfo.tex to avoid TeX 3.0 bug."
- echo "The original version is saved as $dir/texinfo.tex-distrib."
-else
- echo "Patch failed. Sorry."
-fi
-----------------------------------------tex3patch ends
-
-
diff --git a/util/texi-docstring-magic.el b/util/texi-docstring-magic.el
deleted file mode 100644
index ab66c91..0000000
--- a/util/texi-docstring-magic.el
+++ /dev/null
@@ -1,347 +0,0 @@
-;; texi-docstring-magic.el -- munge internal docstrings into texi
-;;
-;; Keywords: lisp, docs, tex
-;; Author: David Aspinall <da@dcs.ed.ac.uk>
-;; Copyright (C) 1998 David Aspinall
-;; Maintainer: David Aspinall <da@dcs.ed.ac.uk>
-;;
-;; $Id: texi-docstring-magic.el,v 1.3 2007/07/01 21:20:33 karl Exp $
-;;
-;; This package is distributed under the terms of the
-;; GNU General Public License, Version 3.
-;; You should have a copy of the GPL with your version of
-;; GNU Emacs or the Texinfo distribution.
-;;
-;;
-;; This package generates Texinfo source fragments from Emacs
-;; docstrings. This avoids documenting functions and variables
-;; in more than one place, and automatically adds Texinfo markup
-;; to docstrings.
-;;
-;; It relies heavily on you following the Elisp documentation
-;; conventions to produce sensible output, check the Elisp manual
-;; for details. In brief:
-;;
-;; * The first line of a docstring should be a complete sentence.
-;; * Arguments to functions should be written in upper case: ARG1..ARGN
-;; * User options (variables users may want to set) should have docstrings
-;; beginning with an asterisk.
-;;
-;; Usage:
-;;
-;; Write comments of the form:
-;;
-;; @c TEXI DOCSTRING MAGIC: my-package-function-or-variable-name
-;;
-;; In your texi source, mypackage.texi. From within an Emacs session
-;; where my-package is loaded, visit mypackage.texi and run
-;; M-x texi-docstring-magic to update all of the documentation strings.
-;;
-;; This will insert @defopt, @deffn and the like underneath the
-;; magic comment strings.
-;;
-;; The default value for user options will be printed.
-;;
-;; Symbols are recognized if they are defined for faces, functions,
-;; or variables (in that order).
-;;
-;; Automatic markup rules:
-;;
-;; 1. Indented lines are gathered into @lisp environment.
-;; 2. Pieces of text `stuff' or surrounded in quotes marked up with @samp.
-;; 3. Words *emphasized* are made @strong{emphasized}
-;; 4. Words sym-bol which are symbols become @code{sym-bol}.
-;; 5. Upper cased words ARG corresponding to arguments become @var{arg}.
-;; In fact, you can any word longer than three letters, so that
-;; metavariables can be used easily.
-;; FIXME: to escape this, use `ARG'
-;; 6. Words 'sym which are lisp-quoted are marked with @code{'sym}.
-;;
-;; -----
-;;
-;; Useful key binding when writing Texinfo:
-;;
-;; (define-key TeXinfo-mode-map "C-cC-d" 'texi-docstring-magic-insert-magic)
-;;
-;; -----
-;;
-;; Useful enhancements to do:
-;;
-;; * Use customize properties (e.g. group, simple types)
-;; * Look for a "texi-docstring" property for symbols
-;; so TeXInfo can be defined directly in case automatic markup
-;; goes badly wrong.
-;; * Add tags to special comments so that user can specify face,
-;; function, or variable binding for a symbol in case more than
-;; one binding exists.
-;;
-;; ------
-
-(defun texi-docstring-magic-splice-sep (strings sep)
- "Return concatenation of STRINGS spliced together with separator SEP."
- (let (str)
- (while strings
- (setq str (concat str (car strings)))
- (if (cdr strings)
- (setq str (concat str sep)))
- (setq strings (cdr strings)))
- str))
-
-(defconst texi-docstring-magic-munge-table
- '(;; 1. Indented lines are gathered into @lisp environment.
- ("\\(^.*\\S-.*$\\)"
- t
- (let
- ((line (match-string 0 docstring)))
- (if (eq (char-syntax (string-to-char line)) ?\ )
- ;; whitespace
- (if in-quoted-region
- line
- (setq in-quoted-region t)
- (concat "@lisp\n" line))
- ;; non-white space
- (if in-quoted-region
- (progn
- (setq in-quoted-region nil)
- (concat "@end lisp\n" line))
- line))))
- ;; 2. Pieces of text `stuff' or surrounded in quotes
- ;; are marked up with @samp. NB: Must be backquote
- ;; followed by forward quote for this to work.
- ;; Can't use two forward quotes else problems with
- ;; symbols.
- ;; Odd hack: because ' is a word constituent in text/texinfo
- ;; mode, putting this first enables the recognition of args
- ;; and symbols put inside quotes.
- ("\\(`\\([^']+\\)'\\)"
- t
- (concat "@samp{" (match-string 2 docstring) "}"))
- ;; 3. Words *emphasized* are made @strong{emphasized}
- ("\\(\\*\\(\\w+\\)\\*\\)"
- t
- (concat "@strong{" (match-string 2 docstring) "}"))
- ;; 4. Words sym-bol which are symbols become @code{sym-bol}.
- ;; Must have at least one hyphen to be recognized,
- ;; terminated in whitespace, end of line, or punctuation.
- ;; (Only consider symbols made from word constituents
- ;; and hyphen.
- ("\\(\\(\\w+\\-\\(\\w\\|\\-\\)+\\)\\)\\(\\s\)\\|\\s-\\|\\s.\\|$\\)"
- (or (boundp (intern (match-string 2 docstring)))
- (fboundp (intern (match-string 2 docstring))))
- (concat "@code{" (match-string 2 docstring) "}"
- (match-string 4 docstring)))
- ;; 5. Upper cased words ARG corresponding to arguments become
- ;; @var{arg}
- ;; In fact, include any word so long as it is more than 3 characters
- ;; long. (Comes after symbols to avoid recognizing the
- ;; lowercased form of an argument as a symbol)
- ;; FIXME: maybe we don't want to downcase stuff already
- ;; inside @samp
- ;; FIXME: should - terminate? should _ be included?
- ("\\([A-Z0-9\\-]+\\)\\(/\\|\)\\|}\\|\\s-\\|\\s.\\|$\\)"
- (or (> (length (match-string 1 docstring)) 3)
- (member (downcase (match-string 1 docstring)) args))
- (concat "@var{" (downcase (match-string 1 docstring)) "}"
- (match-string 2 docstring)))
-
- ;; 6. Words 'sym which are lisp quoted are
- ;; marked with @code.
- ("\\(\\(\\s-\\|^\\)'\\(\\(\\w\\|\\-\\)+\\)\\)\\(\\s\)\\|\\s-\\|\\s.\\|$\\)"
- t
- (concat (match-string 2 docstring)
- "@code{'" (match-string 3 docstring) "}"
- (match-string 5 docstring)))
- ;; 7,8. Clean up for @lisp environments left with spurious newlines
- ;; after 1.
- ("\\(\\(^\\s-*$\\)\n@lisp\\)" t "@lisp")
- ("\\(\\(^\\s-*$\\)\n@end lisp\\)" t "@end lisp"))
- "Table of regexp matches and replacements used to markup docstrings.
-Format of table is a list of elements of the form
- (regexp predicate replacement-form)
-If regexp matches and predicate holds, then replacement-form is
-evaluated to get the replacement for the match.
-predicate and replacement-form can use variables arg,
-and forms such as (match-string 1 docstring)
-Match string 1 is assumed to determine the
-length of the matched item, hence where parsing restarts from.
-The replacement must cover the whole match (match string 0),
-including any whitespace included to delimit matches.")
-
-
-(defun texi-docstring-magic-munge-docstring (docstring args)
- "Markup DOCSTRING for texi according to regexp matches."
- (let ((case-fold-search nil))
- (dolist (test texi-docstring-magic-munge-table docstring)
- (let ((regexp (nth 0 test))
- (predicate (nth 1 test))
- (replace (nth 2 test))
- (i 0)
- in-quoted-region)
-
- (while (and
- (< i (length docstring))
- (string-match regexp docstring i))
- (setq i (match-end 1))
- (if (eval predicate)
- (let* ((origlength (- (match-end 0) (match-beginning 0)))
- (replacement (eval replace))
- (newlength (length replacement)))
- (setq docstring
- (replace-match replacement t t docstring))
- (setq i (+ i (- newlength origlength))))))
- (if in-quoted-region
- (setq docstring (concat docstring "\n@end lisp"))))))
- ;; Force a new line after (what should be) the first sentence,
- ;; if not already a new paragraph.
- (let*
- ((pos (string-match "\n" docstring))
- (needscr (and pos
- (not (string= "\n"
- (substring docstring
- (1+ pos)
- (+ pos 2)))))))
- (if (and pos needscr)
- (concat (substring docstring 0 pos)
- "@*\n"
- (substring docstring (1+ pos)))
- docstring)))
-
-(defun texi-docstring-magic-texi (env grp name docstring args &optional endtext)
- "Make a texi def environment ENV for entity NAME with DOCSTRING."
- (concat "@def" env (if grp (concat " " grp) "") " " name
- " "
- (texi-docstring-magic-splice-sep args " ")
- ;; " "
- ;; (texi-docstring-magic-splice-sep extras " ")
- "\n"
- (texi-docstring-magic-munge-docstring docstring args)
- "\n"
- (or endtext "")
- "@end def" env "\n"))
-
-(defun texi-docstring-magic-format-default (default)
- "Make a default value string for the value DEFAULT.
-Markup as @code{stuff} or @lisp stuff @end lisp."
- (let ((text (format "%S" default)))
- (concat
- "\nThe default value is "
- (if (string-match "\n" text)
- ;; Carriage return will break @code, use @lisp
- (if (stringp default)
- (concat "the string: \n@lisp\n" default "\n@end lisp\n")
- (concat "the value: \n@lisp\n" text "\n@end lisp\n"))
- (concat "@code{" text "}.\n")))))
-
-
-(defun texi-docstring-magic-texi-for (symbol)
- (cond
- ;; Faces
- ((find-face symbol)
- (let*
- ((face symbol)
- (name (symbol-name face))
- (docstring (or (face-doc-string face)
- "Not documented."))
- (useropt (eq ?* (string-to-char docstring))))
- ;; Chop off user option setting
- (if useropt
- (setq docstring (substring docstring 1)))
- (texi-docstring-magic-texi "fn" "Face" name docstring nil)))
- ((fboundp symbol)
- ;; Functions.
- ;; We don't handle macros, aliases, or compiled fns properly.
- (let*
- ((function symbol)
- (name (symbol-name function))
- (docstring (or (documentation function)
- "Not documented."))
- (def (symbol-function function))
- (argsyms (cond ((eq (car-safe def) 'lambda)
- (nth 1 def))))
- (args (mapcar 'symbol-name argsyms)))
- (if (commandp function)
- (texi-docstring-magic-texi "fn" "Command" name docstring args)
- (texi-docstring-magic-texi "un" nil name docstring args))))
- ((boundp symbol)
- ;; Variables.
- (let*
- ((variable symbol)
- (name (symbol-name variable))
- (docstring (or (documentation-property variable
- 'variable-documentation)
- "Not documented."))
- (useropt (eq ?* (string-to-char docstring)))
- (default (if useropt
- (texi-docstring-magic-format-default
- (default-value symbol)))))
- ;; Chop off user option setting
- (if useropt
- (setq docstring (substring docstring 1)))
- (texi-docstring-magic-texi
- (if useropt "opt" "var") nil name docstring nil default)))
- (t
- (error "Don't know anything about symbol %s" (symbol-name symbol)))))
-
-(defconst texi-docstring-magic-comment
- "@c TEXI DOCSTRING MAGIC:"
- "Magic string in a texi buffer expanded into @defopt, or @deffn.")
-
-(defun texi-docstring-magic ()
- "Update all texi docstring magic annotations in buffer."
- (interactive)
- (save-excursion
- (goto-char (point-min))
- (let ((magic (concat "^"
- (regexp-quote texi-docstring-magic-comment)
- "\\s-*\\(\\(\\w\\|\\-\\)+\\)$"))
- p
- symbol)
- (while (re-search-forward magic nil t)
- (setq symbol (intern (match-string 1)))
- (forward-line)
- (setq p (point))
- ;; If comment already followed by an environment, delete it.
- (if (and
- (looking-at "@def\\(\\w+\\)\\s-")
- (search-forward (concat "@end def" (match-string 1)) nil t))
- (progn
- (forward-line)
- (delete-region p (point))))
- (insert
- (texi-docstring-magic-texi-for symbol))))))
-
-(defun texi-docstring-magic-face-at-point ()
- (ignore-errors
- (let ((stab (syntax-table)))
- (unwind-protect
- (save-excursion
- (set-syntax-table emacs-lisp-mode-syntax-table)
- (or (not (zerop (skip-syntax-backward "_w")))
- (eq (char-syntax (char-after (point))) ?w)
- (eq (char-syntax (char-after (point))) ?_)
- (forward-sexp -1))
- (skip-chars-forward "'")
- (let ((obj (read (current-buffer))))
- (and (symbolp obj) (find-face obj) obj)))
- (set-syntax-table stab)))))
-
-(defun texi-docstring-magic-insert-magic (symbol)
- (interactive
- (let* ((v (or (variable-at-point)
- (function-at-point)
- (texi-docstring-magic-face-at-point)))
- (val (let ((enable-recursive-minibuffers t))
- (completing-read
- (if v
- (format "Magic docstring for symbol (default %s): " v)
- "Magic docstring for symbol: ")
- obarray '(lambda (sym)
- (or (boundp sym)
- (fboundp sym)
- (find-face sym)))
- t nil 'variable-history))))
- (list (if (equal val "") v (intern val)))))
- (insert "\n" texi-docstring-magic-comment " " (symbol-name symbol)))
-
-
-(provide 'texi-docstring-magic)
diff --git a/util/texi-elements-by-size b/util/texi-elements-by-size
new file mode 100755
index 0000000..0d828ac
--- /dev/null
+++ b/util/texi-elements-by-size
@@ -0,0 +1,237 @@
+#! /usr/bin/env perl
+# texi-elements-by-size -- dump list of elements based on words or line counts.
+# Also serve as an example of using the Texinfo::Parser module,
+# including the usual per-format options.
+#
+# Copyright 2012, 2013 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License,
+# or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Original author: Patrice Dumas <pertusus@free.fr>
+
+use strict;
+
+use Config; # to determine the path separator
+use Getopt::Long qw(GetOptions);
+Getopt::Long::Configure("gnu_getopt");
+
+BEGIN {
+ # The purpose of these includes is to make it possible to run the
+ # script from a Texinfo source checkout. If that's not relevant,
+ # probably best to simply assume all the needed packages are in the
+ # Perl include path.
+ #
+ (my $mydir = $0) =~ s,/[^/]*$,,; # dir we are in
+ my $txi_libdir = "$mydir/../tp"; # find tp relative to $0
+ unshift (@INC, $txi_libdir);
+ #
+ my @txi_maint_dirs = qw(Text-Unidecode Unicode-EastAsianWidth libintl-perl);
+ unshift (@INC, map { "$txi_libdir/maintain/lib/$_/lib" } @txi_maint_dirs );
+}
+
+use Texinfo::Parser;
+use Texinfo::Structuring;
+use Texinfo::Convert::TextContent;
+
+my $my_version = "0.1 (TP $Texinfo::Parser::VERSION)";
+
+(my $real_command_name = $0) =~ s/.*\///;
+$real_command_name =~ s/\.pl$//;
+
+# determine the path separators
+my $path_separator = $Config{'path_sep'};
+$path_separator = ':' if (!defined($path_separator));
+my $quoted_path_separator = quotemeta($path_separator);
+
+my $force = 0;
+my $use_sections = 0;
+my $count_words = 0;
+my $no_warn = 0;
+
+# placeholder for future i18n.
+sub __($) {
+ return $_[0];
+}
+
+my $format = 'info'; # make our counts from the Info output
+# this is the format associated with the output format, which is replaced
+# when the output format changes. It may also be removed if there is the
+# corresponding --no-ifformat.
+#my $default_expanded_format = [ $format ];
+
+# directories specified on the command line.
+my @include_dirs = ();
+my @prepend_dirs = ();
+
+my $parser_default_options = {
+ #'expanded_formats' => [],
+ 'expanded_formats' => [ $format ],
+ 'values' => {},
+ #'gettext' => \&__
+ };
+
+sub set_expansion($$) {
+ my $region = shift;
+ my $set = shift;
+ $set = 1 if (!defined($set));
+ if ($set) {
+ push @{$parser_default_options->{'expanded_formats'}}, $region
+ unless (grep {$_ eq $region} @{$parser_default_options->{'expanded_formats'}});
+ } else {
+ @{$parser_default_options->{'expanded_formats'}} =
+ grep {$_ ne $region} @{$parser_default_options->{'expanded_formats'}};
+# @{$default_expanded_format}
+# = grep {$_ ne $region} @{$default_expanded_format};
+ }
+}
+
+my $result_options = Getopt::Long::GetOptions (
+ 'help|h' => sub { print help(); exit 0; },
+ 'version|V' => sub {print "$real_command_name $my_version\n\n";
+ printf __("Copyright (C) %s Free Software Foundation, Inc.
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.\n"), "2013";
+ exit 0;},
+ 'force' => \$force,
+ 'ifhtml!' => sub { set_expansion('html', $_[1]); },
+ 'ifinfo!' => sub { set_expansion('info', $_[1]); },
+ 'ifxml!' => sub { set_expansion('xml', $_[1]); },
+ 'ifdocbook!' => sub { set_expansion('docbook', $_[1]); },
+ 'iftex!' => sub { set_expansion('tex', $_[1]); },
+ 'ifplaintext!' => sub { set_expansion('plaintext', $_[1]); },
+ 'use-sections!' => \$use_sections,
+ 'count-words!' => \$count_words,
+ 'no-warn' => \$no_warn,
+ 'D=s' => sub {$parser_default_options->{'values'}->{$_[1]} = 1;},
+ 'U=s' => sub {delete $parser_default_options->{'values'}->{$_[1]};},
+ 'I=s' => sub {
+ push @include_dirs, split(/$quoted_path_separator/, $_[1]); },
+ 'P=s' => sub { unshift @prepend_dirs, split(/$quoted_path_separator/, $_[1]); },
+ 'number-sections!' => sub { set_from_cmdline('NUMBER_SECTIONS', $_[1]); },
+);
+
+exit 1 if (!$result_options);
+
+my @input_files = @ARGV;
+# use STDIN if not a tty, like makeinfo does
+@input_files = ('-') if (!scalar(@input_files) and !-t STDIN);
+
+die sprintf(__("%s: missing file argument.\n"), $real_command_name)
+ .sprintf(__("Try `%s --help' for more information.\n"), $real_command_name)
+ unless (scalar(@input_files) >= 1);
+
+
+if (scalar(@input_files) > 1) {
+ warn sprintf(__("%s: superfluous file arguments: @input_files\n"),
+ $real_command_name);
+}
+
+my $input_file_name = shift @input_files;
+
+sub help() {
+ my $help =
+ sprintf(__("Usage: %s [OPTION]... TEXINFO-FILE...\n"), $real_command_name)
+ ."\n".
+ __("Write to standard output a list of Texinfo elements (nodes or sections)
+sorted by the number of lines (or words) they contain,
+after translation to Info format.\n")
+."\n";
+
+ $help .= __("General Options:
+ --count-words count words instead of lines.
+ --force keep going even if Texinfo file parsing fails.
+ --help display this help and exit.
+ --no-warn suppress warnings (but not errors).
+ --use-sections use sections as elements instead of nodes.
+ --version display version information and exit.\n")
+."\n";
+ $help .= __("Input file options:
+ -D VAR define the variable VAR, as with \@set.
+ -I DIR append DIR to the \@include search path.
+ -P DIR prepend DIR to the \@include search path.
+ -U VAR undefine the variable VAR, as with \@clear.\n")
+."\n";
+ $help .= __("Conditional processing in input:
+ --ifdocbook process \@ifdocbook and \@docbook.
+ --ifhtml process \@ifhtml and \@html.
+ --ifinfo process \@ifinfo.
+ --ifplaintext process \@ifplaintext.
+ --iftex process \@iftex and \@tex.
+ --ifxml process \@ifxml and \@xml.
+ --no-ifdocbook do not process \@ifdocbook and \@docbook text.
+ --no-ifhtml do not process \@ifhtml and \@html text.
+ --no-ifinfo do not process \@ifinfo text.
+ --no-ifplaintext do not process \@ifplaintext text.
+ --no-iftex do not process \@iftex and \@tex text.
+ --no-ifxml do not process \@ifxml and \@xml text.
+
+ Also, for the --no-ifFORMAT options, do process \@ifnotFORMAT text.\n");
+ return $help;
+
+}
+
+sub _exit($) {
+ my $error_count = shift;
+ exit (1) if ($error_count and !$force);
+}
+
+sub handle_errors($$) {
+ my $self = shift;
+ my $error_count = shift;
+ my ($errors, $new_error_count) = $self->errors();
+ $error_count += $new_error_count if ($new_error_count);
+ foreach my $error_message (@$errors) {
+ warn $error_message->{'error_line'} if ($error_message->{'type'} eq 'error'
+ or !$no_warn);
+ }
+
+ _exit($error_count);
+ return $error_count;
+}
+
+my $input_directory = '.';
+if ($input_file_name =~ /(.*\/)/) {
+ $input_directory = $1;
+}
+
+my $parser_options = { %$parser_default_options };
+$parser_options->{'include_directories'} = [@include_dirs];
+my @prepended_include_directories = ('.');
+push @prepended_include_directories, $input_directory
+ if ($input_directory ne '.');
+unshift @{$parser_options->{'include_directories'}},
+ @prepended_include_directories;
+unshift @{$parser_options->{'include_directories'}}, @prepend_dirs;
+
+my $error_count = 0;
+my $parser = Texinfo::Parser::parser($parser_options);
+my $tree = $parser->parse_texi_file($input_file_name);
+
+if (!defined($tree)) {
+ handle_errors($parser, $error_count);
+ exit (1);
+}
+
+my $converter_options = {};
+$converter_options->{'parser'} = $parser;
+my $converter = Texinfo::Convert::TextContent->converter($converter_options);
+
+my ($sorted_name_counts_array, $formatted_result)
+ = $converter->sort_element_counts($tree, $use_sections,
+ $count_words);
+
+print STDOUT $formatted_result;
+
+exit (0);
diff --git a/util/texi2any.bat b/util/texi2any.bat
new file mode 100755
index 0000000..a70cd28
--- /dev/null
+++ b/util/texi2any.bat
@@ -0,0 +1,2 @@
+@echo off
+perl "%~dpn0" %*
diff --git a/util/texi2dvi b/util/texi2dvi
index 18b2214..1d2bb8b 100755
--- a/util/texi2dvi
+++ b/util/texi2dvi
@@ -1,9 +1,10 @@
#! /bin/sh
# texi2dvi --- produce DVI (or PDF) files from Texinfo (or (La)TeX) sources.
-# $Id: texi2dvi,v 1.135 2008/09/18 18:46:01 karl Exp $
+# $Id: texi2dvi 5381 2013-09-26 23:03:58Z karl $
#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
+# Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,7 +19,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-# Original author: Noah Friedman.
+# Originally written by Noah Friedman.
#
# Please send bug reports, etc. to bug-texinfo@gnu.org.
# If possible, please send a copy of the output of the script called with
@@ -32,8 +33,8 @@ unset RUNNING_KSH
# No failure shall remain unpunished.
set -e
-# This string is expanded by rcs automatically when this file is checked out.
-rcs_revision='$Revision: 1.135 $'
+# This string is expanded automatically when this file is checked out.
+rcs_revision='$Revision: 5381 $'
rcs_version=`set - $rcs_revision; echo $2`
program=`echo $0 | sed -e 's!.*/!!'`
@@ -44,19 +45,22 @@ build_dir=${TEXI2DVI_BUILD_DIRECTORY:-.}
# Don't use `unset' since old bourne shells don't have this command.
# Instead, assign them an empty value.
action=compile
-batch=false # true for batch mode
+batch=false # interact normally
+catcode_special=maybe
debug=false
escape="\\"
-expand= # t for expansion via makeinfo
+expand=false # true for expansion via makeinfo
includes=
-line_error=true # Pass --file-line-error to TeX.
-no_line_error=false # absolutely do not pass --file-line-error to TeX
+line_error=true # pass --file-line-error to TeX
+max_iters=-1 # keep going forever
oname= # --output
out_lang=dvi
-quiet=false # by default let the tools' message be displayed
+quiet=false # let the tools' message be displayed
recode=false
set_language=
src_specials=
+shell_escape=
+latex2html=hevea # or set to tex4ht
textra= # Extra TeX commands to insert in the input file.
txiprereq=19990129 # minimum texinfo.tex version with macro expansion
verb=false # true for verbose mode
@@ -127,13 +131,15 @@ test -n "$TEX" && test -d "$TEX" && unset TEX
test_local () {
local foo=foo
}
- test_local
+ test_local >/dev/null 2>&1
test $foo = bar
-) || local () {
+) || eval '
+local () {
case $1 in
*=*) eval "$1";;
esac
}
+'
# cd_orig
@@ -160,6 +166,15 @@ func_dirname ()
}
+# noexit FILE
+# -----------
+# Return FILE with one extension remove. foo.bar.baz -> foo.bar.
+noext ()
+{
+ echo "$1" | sed -e 's/\.[^/.][^/.]*$//'
+}
+
+
# absolute NAME -> ABS-NAME
# -------------------------
# Return an absolute path to NAME.
@@ -175,12 +190,12 @@ absolute ()
local rel
rel=$orig_pwd/`func_dirname "$1"`
if test -d "$rel"; then
- (cd "$rel" 2>/dev/null &&
- local n
- n=`pwd`/`basename "$1"`"$slashes"
- echo "$n")
+ (cd "$rel" 2>/dev/null \
+ && local n
+ n=`pwd`/`basename "$1"`"$slashes"
+ echo "$n")
else
- error 1 "not a directory: $rel"
+ error 1 "not a directory: $rel"
fi
;;
esac
@@ -194,8 +209,12 @@ ensure_dir ()
{
for dir
do
+ # Beware that in parallel builds we may have several concurrent
+ # attempts to create the directory. So fail only if "mkdir"
+ # failed *and* the directory still does not exist.
test -d "$dir" \
|| mkdir "$dir" \
+ || test -d "$dir" \
|| error 1 "cannot create directory: $dir"
done
}
@@ -203,7 +222,7 @@ ensure_dir ()
# error EXIT_STATUS LINE1 LINE2...
# --------------------------------
-# Report an error and exit with failure if EXIT_STATUS is non null.
+# Report an error and exit with failure if EXIT_STATUS is non-null.
error ()
{
local s="$1"
@@ -229,12 +248,12 @@ findprog ()
# We have to try this both for $1 and $1.exe.
#
# Note: On Cygwin and DJGPP, `test -x' also looks for .exe. On Cygwin,
- # also `test -f' has this enhancement, bot not on DJGPP. (Both are
+ # also `test -f' has this enhancement, but not on DJGPP. (Both are
# design decisions, so there is little chance to make them consistent.)
# Thusly, it seems to be difficult to make use of these enhancements.
#
- if { test -f "$dir/$1" && test -x "$dir/$1"; } ||
- { test -f "$dir/$1.exe" && test -x "$dir/$1.exe"; }; then
+ if { test -f "$dir/$1" && test -x "$dir/$1"; } \
+ || { test -f "$dir/$1.exe" && test -x "$dir/$1.exe"; }; then
return 0
fi
done
@@ -259,8 +278,8 @@ report ()
run ()
{
verbose "Running $@"
- "$@" 2>&5 1>&2 ||
- error 1 "$1 failed"
+ "$@" 2>&5 1>&2 \
+ || error 1 "$1 failed"
}
@@ -280,6 +299,8 @@ usage ()
# where % denotes the eol character.
cat <<EOF
Usage: $program [OPTION]... FILE...
+ or: texi2pdf [OPTION]... FILE...
+ or: pdftexi2dvi [OPTION]... FILE...
Run each Texinfo or (La)TeX FILE through TeX in turn until all
cross-references are resolved, building all indices. The directory
@@ -292,31 +313,37 @@ the FILE may also be composed of the following simple TeX commands.
\`\\input{FILE}' the actual file to compile
\`\\nonstopmode' same as --batch
-Makeinfo is used to perform Texinfo macro expansion before running TeX
-when needed.
+When invoked as \`texi2pdf' or \`pdftexi2dvi', or given the option --pdf
+or --dvipdf, generate PDF output. Otherwise, generate DVI.
General options:
-b, --batch no interaction
-D, --debug turn on shell debugging (set -x)
-h, --help display this help and exit successfully
- -o, --output=OFILE leave output in OFILE (implies --clean);
- only one input FILE may be specified in this case
+ -o, --output=OFILE leave output in OFILE; only one input FILE is allowed
-q, --quiet no output unless errors (implies --batch)
-s, --silent same as --quiet
-v, --version display version information and exit successfully
-V, --verbose report on what is done
+Output format:
+ --dvi output a DVI file [default]
+ --dvipdf output a PDF file via DVI (using a dvi-to-pdf program)
+ --html output an HTML file from LaTeX, using HeVeA
+ --info output an Info file from LaTeX, using HeVeA
+ -p, --pdf use pdftex or pdflatex for processing
+ --ps output a PostScript file via DVI (using dvips)
+ --text output a plain text file from LaTeX, using HeVeA
+
TeX tuning:
-@ use @input instead of \input for preloaded Texinfo
- --dvi output a DVI file [default]
- --dvipdf output a PDF file via DVI (using dvipdf)
-e, -E, --expand force macro expansion using makeinfo
-I DIR search DIR for Texinfo files
-l, --language=LANG specify LANG for FILE, either latex or texinfo
--no-line-error do not pass --file-line-error to TeX
- -p, --pdf use pdftex or pdflatex for processing
-r, --recode call recode before TeX to translate input
--recode-from=ENC recode from ENC to the @documentencoding
+ --shell-escape pass --shell-escape to TeX
--src-specials pass --src-specials to TeX
-t, --command=CMD insert CMD in copy of input file
or --texinfo=CMD multiple values accumulate
@@ -327,10 +354,11 @@ Build modes:
--tidy same as --build=tidy
-c, --clean same as --build=clean
--build-dir=DIR specify where the tidy compilation is performed;
- implies --tidy;
- defaults to TEXI2DVI_BUILD_DIRECTORY [$build_dir]
+ implies --tidy;
+ defaults to TEXI2DVI_BUILD_DIRECTORY [$build_dir]
--mostly-clean remove the auxiliary files and directories
- but not the output
+ but not the output
+ --max-iterations=N don't process files more than N times
The MODE specifies where the TeX compilation takes place, and, as a
consequence, how auxiliary files are treated. The build mode
@@ -338,39 +366,46 @@ can also be set using the environment variable TEXI2DVI_BUILD_MODE.
Valid MODEs are:
\`local' compile in the current directory, leaving all the auxiliary
- files around. This is the traditional TeX use.
+ files around. This is the traditional TeX use.
\`tidy' compile in a local *.t2d directory, where the auxiliary files
- are left. Output files are copied back to the original file.
+ are left. Output files are copied back to the original file.
\`clean' same as \`tidy', but remove the auxiliary directory afterwards.
- Every compilation therefore requires the full cycle.
+ Every compilation therefore requires the full cycle.
Using the \`tidy' mode brings several advantages:
- - the current directory is not cluttered with plethora of temporary files.
- - clutter can be even reduced using --build-dir=dir: all the *.t2d
- directories are stored there.
- - clutter can be reduced to zero using, e.g., --build-dir=/tmp/\$USER.t2d
- or --build-dir=\$HOME/.t2d.
- - the output file is updated after every succesful TeX run, for
- sake of concurrent visualization of the output. In a \`local' build
- the viewer stops during the whole TeX run.
- - if the compilation fails, the previous state of the output file
- is preserved.
- - PDF and DVI compilation are kept in separate subdirectories
- preventing any possibility of auxiliary file incompatibility.
+ - the current directory is not cluttered with plethora of temporary files.
+ - clutter can be even further reduced using --build-dir=dir: all the *.t2d
+ directories are stored there.
+ - clutter can be reduced to zero using, e.g., --build-dir=/tmp/\$USER.t2d
+ or --build-dir=\$HOME/.t2d.
+ - the output file is updated after every successful TeX run, for
+ sake of concurrent visualization of the output. In a \`local' build
+ the viewer stops during the whole TeX run.
+ - if the compilation fails, the previous state of the output file
+ is preserved.
+ - PDF and DVI compilation are kept in separate subdirectories
+ preventing any possibility of auxiliary file incompatibility.
On the other hand, because \`tidy' compilation takes place in another
directory, occasionally TeX won't be able to find some files (e.g., when
-using \\graphicspath): in that case use -I to specify the additional
+using \\graphicspath): in that case, use -I to specify the additional
directories to consider.
-The values of the BIBTEX, LATEX (or PDFLATEX), MAKEINDEX, MAKEINFO,
-TEX (or PDFTEX), TEXINDEX, and THUMBPDF environment variables are used
-to run those commands, if they are set. Any CMD strings are added
-after @setfilename for Texinfo input, in the first line for LaTeX input.
+The values of the BIBER, BIBTEX, DVIPDF, DVIPS, HEVEA, LATEX, MAKEINDEX,
+MAKEINFO, PDFLATEX, PDFTEX, T4HT, TEX, TEX4HT, TEXINDEX, and THUMBPDF
+environment variables are used to run those commands, if they are set.
-Email bug reports to <bug-texinfo@gnu.org>,
-general questions and discussion to <help-texinfo@gnu.org>.
-Texinfo home page: http://www.gnu.org/software/texinfo/
+Regarding --dvipdf, if DVIPDF is not set in the environment, the
+following programs are looked for (in this order): dvipdfmx dvipdfm
+dvipdf dvi2pdf dvitopdf.
+
+Any CMD strings are added after @setfilename for Texinfo input, or in
+the first line for LaTeX input.
+
+Report bugs to bug-texinfo@gnu.org,
+general questions and discussion to help-texinfo@gnu.org.
+GNU Texinfo home page: <http://www.gnu.org/software/texinfo/>
+General help using GNU software: <http://www.gnu.org/gethelp/>
EOF
exit 0
}
@@ -389,13 +424,13 @@ verbose ()
# version
# -------
-# Display version info and exit succesfully.
+# Display version info and exit successfully.
version ()
{
cat <<EOF
-texi2dvi (GNU Texinfo 4.13) $rcs_version
+texi2dvi (GNU Texinfo 5.2) $rcs_version
-Copyright (C) 2008 Free Software Foundation, Inc.
+Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
@@ -512,6 +547,18 @@ list_dir_to_abs ()
## Language auxiliary functions. ##
## ------------------------------ ##
+
+# out_lang_set LANG
+# -----------------
+out_lang_set ()
+{
+ case $1 in
+ dvi|dvipdf|html|info|pdf|ps|text) out_lang=$1;;
+ *) error 1 "invalid output format: $1";;
+ esac
+}
+
+
# out_lang_tex
# ------------
# Return the tex output language (DVI or PDF) for $OUT_LANG.
@@ -521,7 +568,7 @@ out_lang_tex ()
dvi | ps | dvipdf ) echo dvi;;
pdf ) echo $out_lang;;
html | info | text ) echo $out_lang;;
- *) error 1 "$0: invalid out_lang: $1";;
+ *) error 1 "invalid out_lang: $1";;
esac
}
@@ -534,7 +581,7 @@ out_lang_ext ()
case $out_lang in
dvipdf ) echo pdf;;
dvi | html | info | pdf | ps | text ) echo $out_lang;;
- *) error 1 "$0: invalid out_lang: $1";;
+ *) error 1 "invalid out_lang: $1";;
esac
}
@@ -576,19 +623,19 @@ absolute_filenames ()
do
case $dir in
EMPTY)
- res=$res$path_sep
- ;;
+ res=$res$path_sep
+ ;;
*)
- if test -d "$dir"; then
- res=$res$path_sep`absolute "$dir"`
- else
- # Even if $dir is not a directory, preserve it in the path.
- # It might contain metacharacters that TeX will expand in
- # turn, e.g., /some/path/{a,b,c}. This will not get the
- # implicit absolutification of the path, but we can't help that.
- res=$res$path_sep$dir
- fi
- ;;
+ if test -d "$dir"; then
+ res=$res$path_sep`absolute "$dir"`
+ else
+ # Even if $dir is not a directory, preserve it in the path.
+ # It might contain metacharacters that TeX will expand in
+ # turn, e.g., /some/path/{a,b,c}. This will not get the
+ # implicit absolutification of the path, but we can't help that.
+ res=$res$path_sep$dir
+ fi
+ ;;
esac
done
echo "$res"
@@ -598,20 +645,33 @@ absolute_filenames ()
# output_base_name FILE
# ---------------------
# The name of FILE, possibly renamed to satisfy --output.
+# FILE is local, there is no directory part.
output_base_name ()
{
case $oname in
'') echo "$1";;
*) local out_noext
- out_noext=`echo "$oname" | sed 's/\.[^.]*$//'`
- local file_ext
- file_ext=`echo "$1" | sed 's/^.*\.//'`
- echo "$out_noext.$file_ext"
+ out_noext=`noext "$oname"`
+ local file_ext
+ file_ext=`echo "$1" | sed 's/^.*\.//'`
+ echo "$out_noext.$file_ext"
;;
esac
}
+# destdir
+# -------
+# Return the name of the directory where the output is expected.
+destdir ()
+{
+ case $oname in
+ '') echo "$orig_pwd";;
+ *) dirname "$oname";;
+ esac
+}
+
+
# move_to_dest FILE...
# --------------------
# Move FILE to the place where the user expects it. Truly move it, that
@@ -623,7 +683,14 @@ output_base_name ()
# an auxiliary file with the same base name.
move_to_dest ()
{
- local dest
+# echo "move_to_dest $*, tidy=$tidy, oname=$oname"
+
+ # If we built in place and have no output name, there is nothing to
+ # do, so just return.
+ case $tidy:$oname in
+ false:) return;;
+ esac
+
local destfile
local destdir
local destbase
@@ -632,42 +699,35 @@ move_to_dest ()
for file
do
+ test -f "$file" \
+ || error 1 "no such file or directory: $file"
case $tidy:$oname in
- true:) dest=$orig_pwd;;
- false:) dest=;;
- *:*) dest=`output_base_name "$file"`;;
+ true:) destdir=$orig_pwd
+ destfile=$destdir/$file;;
+ true:*) destfile=`output_base_name "$file"`
+ destdir=`dirname "$destfile"`;;
+ false:*) destfile=$oname
+ destdir=`dirname "$destfile"`;;
esac
- if test ! -f "$file"; then
- error 1 "no such file or directory: $file"
- fi
- if test -n "$dest"; then
- # We need to know whether $dest is a directory.
- if test -d "$dest"; then
- destdir=$dest
- destfile=$dest/$file
- else
- destdir="`dirname $dest`"
- destfile=$dest
- fi
- # We want to compare the source location and the output location,
- # and if they are different, do the move. But if they are the
- # same, we must preserve the source. Since we can't assume
- # stat(1) or test -ef is available, resort to comparing the
- # directory names, canonicalized with pwd. We can't use cmp -s
- # since the output file might not actually change from run to run;
- # e.g., TeX DVI output is timestamped to only the nearest minute.
- destdir=`cd $destdir && pwd`
- destbase=`basename $destfile`
- #
- sourcedir=`dirname $file`
- sourcedir=`cd $sourcedir && pwd`
- sourcebase=`basename $file`
- #
- if test "$sourcedir/$sourcebase" != "$destdir/$destbase"; then
- verbose "Moving $file to $destfile"
- rm -f "$destfile"
- mv "$file" "$destfile"
- fi
+
+ # We want to compare the source location and the output location,
+ # and if they are different, do the move. But if they are the
+ # same, we must preserve the source. Since we can't assume
+ # stat(1) or test -ef is available, resort to comparing the
+ # directory names, canonicalized with pwd. We can't use cmp -s
+ # since the output file might not actually change from run to run;
+ # e.g., TeX DVI output is timestamped to only the nearest minute.
+ destdir=`cd "$destdir" && pwd`
+ destbase=`basename "$destfile"`
+
+ sourcedir=`dirname "$file"`
+ sourcedir=`cd "$sourcedir" && pwd`
+ sourcebase=`basename "$file"`
+
+ if test "$sourcedir/$sourcebase" != "$destdir/$destbase"; then
+ verbose "Moving $file to $destfile"
+ rm -f "$destfile"
+ mv "$file" "$destfile"
fi
done
}
@@ -679,7 +739,7 @@ move_to_dest ()
# aux_file_p FILE
# ---------------
-# Return with success with FILE is an aux file.
+# Return with success if FILE is an aux file.
aux_file_p ()
{
test -f "$1" || return 1
@@ -691,7 +751,7 @@ aux_file_p ()
# bibaux_file_p FILE
# ------------------
-# Return with success with FILE is an aux file containing citation
+# Return with success if FILE is an aux file containing citation
# requests.
bibaux_file_p ()
{
@@ -711,13 +771,24 @@ bibaux_file_p ()
# index_file_p FILE
# -----------------
-# Return with success with FILE is an index file.
-# When index.sty is used, there is a space before the brace.
+# Return with success if FILE is an index file.
index_file_p ()
{
test -f "$1" || return 1
- case `sed '1q' "$1"` in
- "\\entry{"*|"\\indexentry{"*|"\\indexentry {"*) return 0;;
+ case $in_lang:$latex2html:`out_lang_tex`:`sed '1q' "$1"` in
+ # When working with TeX4HT, *.idx are created by LaTeX. They must
+ # be processed to produce *.4ix, *.4dx files. The *.4dx file is
+ # passed to makeindex to produce the *.ind file. This sequence is
+ # handled by run_index, so we are only interested in the *.idx
+ # files, which have each "\indexentry" preceded by a
+ # "\beforeentry".
+ latex:tex4ht:html:"\\beforeentry {"*) return 0;;
+
+ # When index.sty is used, there is a space before the brace.
+ latex:*:*:"\\indexentry{"*|latex:*:*:"\\indexentry {"*) return 0;;
+
+ texinfo:*:*:"\\entry{"*) return 0;;
+
*) return 1;;
esac
}
@@ -735,7 +806,7 @@ xref_file_p ()
case `sed '1q' "$1"` in
"\\input texinfo"*) return 1;;
[\\''@]*) return 0;;
- *) return 1;;
+ *) return 1;;
esac
}
@@ -762,15 +833,15 @@ generated_files_get ()
echo $file
case $in_lang in
texinfo)
- # texindex: texinfo.cp -> texinfo.cps
+ # texindex: texinfo.cp -> texinfo.cps
if index_file_p $file; then
- echo ${file}s
+ echo ${file}s
fi
;;
latex)
- if aux_file_p $file; then
+ if aux_file_p $file; then
# bibtex: *.aux -> *.bbl and *.blg.
- echo $file | sed 's/^\(.*\)\.aux$/\1.bbl/'
+ echo $file | sed 's/^\(.*\)\.aux$/\1.bbl/'
echo $file | sed 's/^\(.*\)\.aux$/\1.blg/'
# -recorder: .fls
echo $file | sed 's/^\(.*\)\.aux$/\1.fls/'
@@ -828,9 +899,13 @@ xref_files_changed ()
if grep "Rerun to get" "$in_noext.log" >&6 2>&1; then
return 0
fi
+ # biblatex report of whether rerunning is needed.
+ if grep "biblatex.*(re)run" "$in_noext.log" >&6 2>&1; then
+ return 0
+ fi
- # If old and new lists don't at least have the same file list,
- # then one file or another has definitely changed.
+ # If old and new lists don't have the same file list,
+ # then something has definitely changed.
xref_files_new=`generated_files_get "$in_noext" xref_file_p`
verbose "Original xref files = $xref_files_orig"
verbose "New xref files = $xref_files_new"
@@ -845,7 +920,7 @@ xref_files_changed ()
if cmp -s "$this_file" "$work_bak/$this_file"; then :; else
verbose "xref file `echo $this_file | sed 's|\./||g'` differed ..."
if $debug; then
- diff -u "$work_bak/$this_file" "$this_file"
+ diff -u "$work_bak/$this_file" "$this_file"
fi
return 0
fi
@@ -868,21 +943,31 @@ xref_files_changed ()
# Run TeX as "$tex $in_input", taking care of errors and logs.
run_tex ()
{
- case $in_lang:`out_lang_tex` in
- latex:dvi) tex=${LATEX:-latex};;
- latex:pdf) tex=${PDFLATEX:-pdflatex};;
- texinfo:dvi)
- # MetaPost also uses the TEX environment variable. If the user
- # has set TEX=latex for that reason, don't bomb out.
- case $TEX in
- *latex) tex=tex;; # don't bother trying to find etex
- *) tex=$TEX
- esac;;
- texinfo:pdf) tex=$PDFTEX;;
-
- *) error 1 "$0: $out_lang not supported for $in_lang";;
+ case $in_lang:$latex2html:`out_lang_tex` in
+ latex:*:dvi|latex:tex4ht:html)
+ tex=${LATEX:-latex};;
+ latex:*:pdf)
+ tex=${PDFLATEX:-pdflatex};;
+ texinfo:*:dvi)
+ # MetaPost also uses the TEX environment variable. If the user
+ # has set TEX=latex for that reason, don't bomb out.
+ case $TEX in
+ *latex) tex=tex;; # don't bother trying to find etex
+ *) tex=$TEX
+ esac;;
+ texinfo:*:pdf) tex=$PDFTEX;;
+
+ *) error 1 "$out_lang not supported for $in_lang";;
esac
+ # do the special catcode trick for ~ in filenames only for Texinfo,
+ # not LaTeX.
+ if test x"$in_lang" = xtexinfo && test $catcode_special = maybe; then
+ catcode_special=true
+ else
+ catcode_special=false
+ fi
+
# Beware of aux files in subdirectories that require the
# subdirectory to exist.
case $in_lang:$tidy in
@@ -891,7 +976,7 @@ run_tex ()
sort -u |
while read d
do
- ensure_dir "$work_build/$d"
+ ensure_dir "$work_build/$d"
done
;;
esac
@@ -900,18 +985,18 @@ run_tex ()
local cmd="$tex"
# If possible, make TeX report error locations in GNU format.
- if test "${tex_help:+set}" != set; then
- # Go to a temporary directory to try --help, since old versions that
- # don't accept --help will generate a texput.log.
- tex_help_dir=$t2ddir/tex_help
- ensure_dir "$tex_help_dir"
- tex_help=`cd "$tex_help_dir" >&6 && $tex --help </dev/null 2>&1`
- fi
- if $no_line_error; then :; else
+ if $line_error; then
+ if test "${tex_help:+set}" != set; then
+ # Go to a temporary directory to try --help, since old versions that
+ # don't accept --help will generate a texput.log.
+ tex_help_dir=$t2ddir/tex_help
+ ensure_dir "$tex_help_dir"
+ tex_help=`cd "$tex_help_dir" >&6 && $tex --help </dev/null 2>&1 || true`
+ fi
# The mk program and perhaps others want to parse TeX's
# original error messages.
- case $line_error:$tex_help in
- true:*file-line-error*) cmd="$cmd --file-line-error";;
+ case $tex_help in
+ *file-line-error*) cmd="$cmd --file-line-error";;
esac
fi
@@ -919,20 +1004,38 @@ run_tex ()
test -n "$translate_file" && cmd="$cmd --translate-file=$translate_file"
# Tell TeX to make source specials (for backtracking from output to
- # source, given a sufficiently smart editor), if specifed.
+ # source, given a sufficiently smart editor), if specified.
test -n "$src_specials" && cmd="$cmd $src_specials"
+ # Tell TeX to allow running external executables
+ test -n "$shell_escape" && cmd="$cmd $shell_escape"
+
# Tell TeX to be batch if requested.
if $batch; then
# \batchmode does not show terminal output at all, so we don't
# want that. And even in batch mode, TeX insists on having input
# from the user. Close its stdin to make it impossible.
- cmd="$cmd </dev/null '${escape}nonstopmode' '${escape}input'"
+ cmd="$cmd </dev/null '${escape}nonstopmode'"
fi
- # we'd like to handle arbitrary input file names, such as a~b.tex.
- # This isn't a general way to do it :), though it does work, kind of.
- # cmd="$cmd '${escape}catcode126=12 \input '"
+ # we'd like to handle arbitrary input file names, especially
+ # foo~bar/a~b.tex, since Debian likes ~ characters.
+ if $catcode_special; then
+ # $normaltilde is just to reduce line length in this source file.
+ # The idea is to define \normaltilde as a catcode other ~ character,
+ # then make the active ~ be equivalent to that, instead of the plain
+ # TeX tie. Then when the active ~ appears in the filename, it will
+ # be expanded to itself, as far as \input will see. (This is the
+ # same thing that texinfo.tex does in general, BTW.)
+ normaltilde="${escape}catcode126=12 ${escape}def${escape}normaltilde{~}"
+ cmd="$cmd '$normaltilde${escape}catcode126=13 ${escape}let~\normaltilde '"
+ fi
+ # Other special (non-active) characters could be supported by
+ # resetting their catcodes to other on the command line and changing
+ # texinfo.tex to initialize everything to plain catcodes. Maybe someday.
+
+ # append the \input command.
+ cmd="$cmd '${escape}input'"
# TeX's \input does not (easily or reliably) support whitespace
# characters or other special characters in file names. Our intensive
@@ -947,12 +1050,12 @@ run_tex ()
# harm in making the link.
#
case $tidy:`func_dirname "$in_input"` in
- true:*["$space$tab$newline\"#\$%\\^_{}"]*)
+ true:*["$space$tab$newline\"#\$%\\^_{}~"]*)
_run_tex_file_name=`basename "$in_input"`
if test ! -f "$_run_tex_file_name"; then
- # It might not be a file, clear it.
- run rm -f "$_run_tex_file_name"
- run ln -s "$in_input"
+ # It might not be a file, clear it.
+ run rm -f "$_run_tex_file_name"
+ run ln -s "$in_input"
fi
cmd="$cmd '$_run_tex_file_name'"
;;
@@ -974,20 +1077,19 @@ run_tex ()
# run_bibtex ()
# -------------
-# Run bibtex on current file.
+# Run bibtex on (or biber) current file.
# - If its input (AUX) exists.
# - If some citations are missing (LOG contains `Citation').
# or the LOG complains of a missing .bbl
#
# Don't try to be too smart:
-#
# 1. Running bibtex only if the bbl file exists and is older than
# the LaTeX file is wrong, since the document might include files
# that have changed.
#
# 3. Because there can be several AUX (if there are \include's),
# but a single LOG, looking for missing citations in LOG is
-# easier, though we take the risk to match false messages.
+# easier, though we take the risk of matching false messages.
run_bibtex ()
{
case $in_lang in
@@ -1001,36 +1103,91 @@ run_bibtex ()
# bibtex would never be run.
if test -r "$in_noext.aux" \
&& test -r "$in_noext.log" \
- && (grep 'Warning:.*Citation.*undefined' "$in_noext.log" \
- || grep '.*Undefined citation' "$in_noext.log" \
- || grep 'No file .*\.bbl\.' "$in_noext.log") \
- || (grep 'No \.aux file' "$in_noext.log" \
- && grep '^\\bibdata' "$in_noext.aux") \
- >&6 2>&1; \
+ && ((grep 'Warning:.*Citation.*undefined' "$in_noext.log" \
+ || grep '.*Undefined citation' "$in_noext.log" \
+ || grep 'No file .*\.bbl\.' "$in_noext.log") \
+ || (grep 'No \.aux file' "$in_noext.log" \
+ && grep '^\\bibdata' "$in_noext.aux")) \
+ >&6 2>&1; \
then
- for f in `generated_files_get "$in_noext" bibaux_file_p`
- do
+ for f in `generated_files_get "$in_noext" bibaux_file_p`; do
run $bibtex "$f"
done
fi
+
+ # biber(+biblatex) check.
+ if test -r "$in_noext.bcf" \
+ && grep '</bcf:controlfile>' "$in_noext.bcf" >/dev/null; then
+ run ${BIBER:-biber} "$in_noext"
+ fi
}
# run_index ()
# ------------
-# Run texindex (or makeindex) on current index files. If they already
-# exist, and after running TeX a first time the index files don't
-# change, then there's no reason to run TeX again. But we won't know
-# that if the index files are out of date or nonexistent.
+# Run texindex (or makeindex or texindy) on current index files. If
+# they already exist, and after running TeX a first time the index
+# files don't change, then there's no reason to run TeX again. But we
+# won't know that if the index files are out of date or nonexistent.
run_index ()
{
- case $in_lang in
- latex) texindex=${MAKEINDEX:-makeindex};;
- texinfo) texindex=${TEXINDEX:-texindex};;
- esac
+ local index_files
index_files=`generated_files_get $in_noext index_file_p`
- if test -n "$texindex" && test -n "$index_files"; then
- run $texindex $index_files
- fi
+ test -n "$index_files" \
+ || return 0
+
+ : ${MAKEINDEX:=makeindex}
+ : ${TEXINDEX:=texindex}
+ : ${TEXINDY:=texindy}
+
+ local index_file
+ local index_noext
+ case $in_lang:$latex2html:`out_lang_tex` in
+ latex:tex4ht:html)
+ for index_file in $index_files
+ do
+ index_noext=`noext "$index_file"`
+ run tex \
+ '\def\filename{{'"$index_noext"'}{idx}{4dx}{ind}}
+ \input idxmake.4ht'
+ run $MAKEINDEX -o $index_noext.ind $index_noext.4dx
+ done
+ ;;
+
+ latex:*)
+ if $TEXINDY --version >&6 2>&1; then
+ run $TEXINDY $index_files
+ else
+ run $MAKEINDEX $index_files
+ fi
+ ;;
+
+ texinfo:*)
+ run $TEXINDEX $index_files
+ ;;
+ esac
+}
+
+
+# run_tex4ht ()
+# -------------
+# Run the last two phases of TeX4HT: tex4ht extracts the HTML from the
+# instrumented DVI file, and t4ht converts the figures and installs
+# the files when given -d.
+#
+# Because knowing exactly which files are created is complex (in
+# addition the names are not simple to compute), which makes it
+# difficult to install the output files in a second step, it is much
+# simpler to install directly the output files.
+run_tex4ht ()
+{
+ case $in_lang:$latex2html:`out_lang_tex` in
+ latex:tex4ht:html)
+ : ${TEX4HT:=tex4ht} ${T4HT:=t4ht}
+ run "$TEX4HT" "-f/$in_noext"
+ # Do not remove the / after the destdir.
+ run "$T4HT" "-d`destdir`/" "-f/$in_noext"
+ ;;
+ esac
}
@@ -1049,7 +1206,7 @@ run_thumbpdf ()
run_tex
else
report "$thumbpdf exited with bad status." \
- "Ignoring its output."
+ "Ignoring its output."
fi
fi
}
@@ -1062,10 +1219,9 @@ run_dvipdf ()
{
# Find which dvi->pdf program is available.
if test -z "$dvipdf"; then
- for i in "$DVIPDF" dvipdfmx dvipdfm dvipdf dvi2pdf dvitopdf;
- do
+ for i in "$DVIPDF" dvipdfmx dvipdfm dvipdf dvi2pdf dvitopdf; do
if findprog $i; then
- dvipdf=$i
+ dvipdf=$i
fi
done
fi
@@ -1074,7 +1230,7 @@ run_dvipdf ()
# outputting using the expected file name.
run $dvipdf "$1"
if test ! -f `echo "$1" | sed -e 's/\.dvi$/.pdf/'`; then
- error 1 "$0: cannot find output file"
+ error 1 "cannot find output file"
fi
}
@@ -1093,6 +1249,13 @@ run_tex_suite ()
local cycle=0
while :; do
+ # check for probably LaTeX loop (e.g. varioref)
+ if test $cycle -eq "$max_iters"; then
+ error 0 "Maximum of $max_iters cycles exceeded"
+ break
+ fi
+
+ # report progress
cycle=`expr $cycle + 1`
verbose "Cycle $cycle for $command_line_filename"
@@ -1112,15 +1275,19 @@ run_tex_suite ()
# and TeX one last time.
run_thumbpdf
+ # If we are using tex4ht, call it.
+ run_tex4ht
+
# Install the result if we didn't already (i.e., if the output is
# dvipdf or ps).
- case $out_lang in
- dvipdf)
+ case $latex2html:$out_lang in
+ *:dvipdf)
run_dvipdf "$in_noext.`out_lang_tex`"
move_to_dest "$in_noext.`out_lang_ext`"
;;
- ps)
- dvips -o "$in_noext.`out_lang_ext`" "$in_noext.`out_lang_tex`"
+ *:ps)
+ : ${DVIPS:=dvips}
+ run $DVIPS -o "$in_noext.`out_lang_ext`" "$in_noext.`out_lang_tex`"
move_to_dest "$in_noext.`out_lang_ext`"
;;
esac
@@ -1134,37 +1301,41 @@ run_tex_suite ()
# A sed script that preprocesses Texinfo sources in order to keep the
-# iftex sections only. We want to remove non TeX sections, and comment
-# (with `@c texi2dvi') TeX sections so that makeinfo does not try to
+# iftex sections only. We want to remove non-TeX sections, and comment
+# (with `@c _texi2dvi') TeX sections so that makeinfo does not try to
# parse them. Nevertheless, while commenting TeX sections, don't
# comment @macro/@end macro so that makeinfo does propagate them.
# Unfortunately makeinfo --iftex --no-ifinfo doesn't work well enough
# (yet), makeinfo can't parse the TeX commands, so work around with sed.
#
+# We assume that `@c _texi2dvi' starting a line is not present in the
+# document.
+#
comment_iftex=\
'/^@tex/,/^@end tex/{
- s/^/@c texi2dvi/
+ s/^/@c _texi2dvi/
}
/^@iftex/,/^@end iftex/{
- s/^/@c texi2dvi/
- /^@c texi2dvi@macro/,/^@c texi2dvi@end macro/{
- s/^@c texi2dvi//
+ s/^/@c _texi2dvi/
+ /^@c _texi2dvi@macro/,/^@c _texi2dvi@end macro/{
+ s/^@c _texi2dvi//
}
}
/^@ifnottex/,/^@end ifnottex/{
- s/^/@c (texi2dvi)/
+ s/^/@c (_texi2dvi)/
}
/^@ifinfo/,/^@end ifinfo/{
/^@node/p
/^@menu/,/^@end menu/p
t
- s/^/@c (texi2dvi)/
+ s/^/@c (_texi2dvi)/
}
-s/^@ifnotinfo/@c texi2dvi@ifnotinfo/
-s/^@end ifnotinfo/@c texi2dvi@end ifnotinfo/'
+s/^@ifnotinfo/@c _texi2dvi@ifnotinfo/
+s/^@end ifnotinfo/@c _texi2dvi@end ifnotinfo/'
-# Uncommenting is simple: Remove any leading `@c texi2dvi'.
-uncomment_iftex='s/^@c texi2dvi//'
+# Uncommenting is simpler: remove any leading `@c texi2dvi'; repeated
+# copies can sneak in via macro invocations.
+uncomment_iftex='s/^@c _texi2dvi\(@c _texi2dvi\)*//'
# run_makeinfo ()
@@ -1180,28 +1351,30 @@ run_makeinfo ()
# Unless required by the user, makeinfo expansion is wanted only
# if texinfo.tex is too old.
- if test "$expand" = t; then
+ if $expand; then
makeinfo=${MAKEINFO:-makeinfo}
else
# Check if texinfo.tex performs macro expansion by looking for
# its version. The version is a date of the form YEAR-MO-DA.
# We don't need to use [0-9] to match the digits since anyway
- # the comparison with $txiprereq, a number, will fail with non
- # digits.
+ # the comparison with $txiprereq, a number, will fail with non-digits.
# Run in a temporary directory to avoid leaving files.
version_test_dir=$t2ddir/version_test
ensure_dir "$version_test_dir"
- (
+ if (
cd "$version_test_dir"
echo '\input texinfo.tex @bye' >txiversion.tex
# Be sure that if tex wants to fail, it is not interactive:
# close stdin.
$TEX txiversion.tex </dev/null >txiversion.out 2>txiversion.err
- )
- if test $? != 0; then
+ ); then :; else
+ report "texinfo.tex appears to be broken.
+This may be due to the environment variable TEX set to something
+other than (plain) tex, a corrupt texinfo.tex file, or
+to tex itself simply not working."
cat "$version_test_dir/txiversion.out"
cat "$version_test_dir/txiversion.err" >&2
- error 1 "texinfo.tex appears to be broken, quitting."
+ error 1 "quitting."
fi
eval `sed -n 's/^.*\[\(.*\)version \(....\)-\(..\)-\(..\).*$/txiformat=\1 txiversion="\2\3\4"/p' "$version_test_dir/txiversion.out"`
verbose "texinfo.tex preloaded as \`$txiformat', version is \`$txiversion' ..."
@@ -1210,9 +1383,9 @@ run_makeinfo ()
else
makeinfo=${MAKEINFO:-makeinfo}
fi
- # As long as we had to run TeX, offer the user this convenience:
+ # If TeX is preloaded, offer the user this convenience:
if test "$txiformat" = Texinfo; then
- escape=@
+ escape=@
fi
fi
@@ -1231,7 +1404,7 @@ run_makeinfo ()
# happens with gettext 0.14.5, at least.
sed "$comment_iftex" "$command_line_filename" \
| eval $makeinfo --footnote-style=end -I "$in_dir" $miincludes \
- -o /dev/null --macro-expand=- \
+ -o /dev/null --macro-expand=- \
| sed "$uncomment_iftex" >"$in_src"
# Continue only if everything succeeded.
if test $? -ne 0 \
@@ -1248,23 +1421,36 @@ run_makeinfo ()
# Used most commonly for @finalout, @smallbook, etc.
insert_commands ()
{
- local textra_cmd
- case $in_lang in
- latex) textra_cmd=1i;;
- texinfo) textra_cmd='/^@setfilename/a';;
- *) error 1 "internal error, unknown language: $in_lang";;
- esac
-
if test -n "$textra"; then
# _xtr. The file with the user's extra commands.
work_xtr=$workdir/xtr
in_xtr=$work_xtr/$in_base
ensure_dir "$work_xtr"
verbose "Inserting extra commands: $textra"
+ local textra_cmd
+ case $in_lang in
+ latex) textra_cmd=1i;;
+ texinfo) textra_cmd='/^@setfilename/a';;
+ *) error 1 "internal error, unknown language: $in_lang";;
+ esac
sed "$textra_cmd\\
$textra" "$in_input" >"$in_xtr"
in_input=$in_xtr
fi
+
+ case $in_lang:$latex2html:`out_lang_tex` in
+ latex:tex4ht:html)
+ # _tex4ht. The file with the added \usepackage{tex4ht}.
+ work_tex4ht=$workdir/tex4ht
+ in_tex4ht=$work_tex4ht/$in_base
+ ensure_dir "$work_tex4ht"
+ verbose "Inserting \\usepackage{tex4ht}"
+ perl -pe 's<\\documentclass(?:\[.*\])?{.*}>
+ <$&\\usepackage[xhtml]{tex4ht}>' \
+ "$in_input" >"$in_tex4ht"
+ in_input=$in_tex4ht
+ ;;
+ esac
}
# run_recode ()
@@ -1278,18 +1464,18 @@ run_recode ()
if test $in_lang = texinfo; then
pgm='s/^ *@documentencoding *\([^ ][^ ]*\) *$/\1/
- t found
- d
- :found
- q'
+ t found
+ d
+ :found
+ q'
encoding=`sed -e "$pgm" "$in_input"`
if $recode && test -n "$encoding" && findprog recode; then
if test -n "$recode_from"; then
- from=$recode_from
- to=$encoding
+ from=$recode_from
+ to=$encoding
else
- from=$encoding
- to=$texinfo
+ from=$encoding
+ to=$texinfo
fi
verbose "Recoding from $from to $to."
# _rcd. The Texinfo file recoded in 7bit.
@@ -1297,10 +1483,10 @@ run_recode ()
in_rcd=$work_rcd/$in_base
ensure_dir "$work_rcd"
if recode "$encoding..$to" <"$in_input" >"$in_rcd" \
- && test -s "$in_rcd"; then
- in_input=$in_rcd
+ && test -s "$in_rcd"; then
+ in_input=$in_rcd
else
- verbose "Recoding failed, using original input."
+ verbose "Recoding failed, using original input."
fi
fi
fi
@@ -1371,7 +1557,7 @@ run_hevea ()
case $1 in
html|text) move_to_dest "$out_base";;
info) # There can be foo.info-1, foo.info-2 etc.
- move_to_dest "$out_base"*;;
+ move_to_dest "$out_base"*;;
esac
else
error 1 "$hevea exited with bad status, quitting."
@@ -1384,13 +1570,13 @@ run_hevea ()
# Run the TeX (or HeVeA).
run_core_conversion ()
{
- case $in_lang:`out_lang_tex` in
- *:dvi|*:pdf)
- run_tex;;
- latex:html|latex:text|latex:info)
- run_hevea $out_lang;;
+ case $in_lang:$latex2html:`out_lang_tex` in
+ *:dvi|*:pdf|latex:tex4ht:html)
+ run_tex;;
+ latex:*:html|latex:*:text|latex:*:info)
+ run_hevea $out_lang;;
*)
- error 1 "invalid input/output combination: $in_lang/$out_lang";;
+ error 1 "invalid input/output combination: $in_lang/$out_lang";;
esac
}
@@ -1407,9 +1593,14 @@ compile ()
# `.' goes first to ensure that any old .aux, .cps,
# etc. files in ${directory} don't get used in preference to fresher
# files in `.'. Include orig_pwd in case we are in clean build mode, where
- # we've cd'd to a temp directory.
+ # we have cd'd to a temp directory.
+ common="$orig_pwd$path_sep$in_dir$path_sep"
+ #
+ # If we have any includes, put those at the end.
+ # Keep a final path_sep to get the default (system) TeX directories included.
txincludes=`list_infix includes $path_sep`
- common="$orig_pwd$path_sep$in_dir$path_sep$txincludes$path_sep"
+ test -n "$txincludes" && common="$common$txincludes$path_sep"
+ #
for var in $tex_envvars; do
eval val="\$common\$${var}_orig"
# Convert relative paths to absolute paths, so we can run in another
@@ -1505,38 +1696,42 @@ while test x"$1" != x"$arg_sep"; do
;;
esac
- # This recognizes --quark as --quiet. So what.
+ # This recognizes --quark as --quiet. Oh well.
case "$1" in
-@ ) escape=@;;
+ -~ ) catcode_special=false;;
# Silently and without documentation accept -b and --b[atch] as synonyms.
-b | --batch) batch=true;;
- --build) shift; build_mode=$1;;
- --build-dir) shift; build_dir=$1; build_mode=tidy;;
+ --build) shift; build_mode=$1;;
+ --build-dir) shift; build_dir=$1; build_mode=tidy;;
-c | --clean) build_mode=clean;;
-D | --debug) debug=true;;
- --dvi) out_lang=dvi;;
- --dvipdf) out_lang=dvipdf;;
- -e | -E | --expand) expand=t;;
+ -e | -E | --expand) expand=true;;
-h | --help) usage;;
- --html) out_lang=html;;
-I) shift; list_concat_dirs includes "$1";;
- --info) out_lang=info;;
-l | --lang | --language) shift; set_language=$1;;
--mostly-clean) action=mostly-clean;;
- --no-line-error) no_line_error=true;;
+ --no-line-error) line_error=false;;
+ --max-iterations) shift; max_iters=$1;;
-o | --out | --output)
shift
# Make it absolute, just in case we also have --clean, or whatever.
oname=`absolute "$1"`;;
- -p | --pdf) out_lang=pdf;;
- --ps) out_lang=ps;;
+
+ # Output formats.
+ -O|--output-format) shift; out_lang_set "$1";;
+ --dvi|--dvipdf|--html|--info|--pdf|--ps|--text)
+ out_lang_set `echo "x$1" | sed 's/^x--//'`;;
+
+ -p) out_lang_set pdf;;
-q | -s | --quiet | --silent) quiet=true; batch=true;;
-r | --recode) recode=true;;
--recode-from) shift; recode=true; recode_from="$1";;
--src-specials) src_specials=--src-specials;;
+ --shell-escape) shell_escape=--shell-escape;;
+ --tex4ht) latex2html=tex4ht;;
-t | --texinfo | --command ) shift; textra="$textra\\
"`echo "$1" | sed 's/\\\\/\\\\\\\\/g'`;;
- --text) out_lang=text;;
--translate-file ) shift; translate_file="$1";;
--tidy) build_mode=tidy;;
-v | --vers*) version;;
@@ -1544,13 +1739,13 @@ while test x"$1" != x"$arg_sep"; do
--) # What remains are not options.
shift
while test x"$1" != x"$arg_sep"; do
- set dummy ${1+"$@"} "$1"; shift
- shift
+ set dummy ${1+"$@"} "$1"; shift
+ shift
done
break;;
-*)
error 1 "Unknown or ambiguous option \`$1'." \
- "Try \`--help' for more information."
+ "Try \`--help' for more information."
;;
*) set dummy ${1+"$@"} "$1"; shift;;
esac
@@ -1591,9 +1786,8 @@ this script, you'll need to install TeX (if you don't have it) or change
your PATH or TEX environment variable (if you do). See the --help
output for more details.
-For information about obtaining TeX, please see http://www.tug.org. If
-you happen to be using Debian, you can get it with this command:
- apt-get install tetex-bin
+For information about obtaining TeX, please see http://tug.org/texlive,
+or do a web search for TeX and your operating system or distro.
EOM
exit 1
fi
@@ -1635,14 +1829,15 @@ fi
# Enable tracing, and auxiliary tools output.
-#
-# Should be used where you'd typically use /dev/null to throw output
-# away. But sometimes it is convenient to see that output (e.g., from
-# a grep) to aid debugging. Especially debugging at distance, via the
-# user.
+#
+# This fd should be used where you'd typically use /dev/null to throw
+# output away. But sometimes it is convenient to see that output (e.g.,
+# from a grep) to aid debugging. Especially debugging at distance, via
+# the user.
+#
if $debug; then
exec 6>&1
- set -x
+ set -vx
else
exec 6>/dev/null
fi
@@ -1677,21 +1872,21 @@ input_file_name_decode ()
# Let AUC-TeX error parser deal with line numbers.
line_error=false
command_line_filename=`\
- expr X"$command_line_filename" : X'.*input{\([^}]*\)}'`
+ expr X"$command_line_filename" : X'.*input{\([^}]*\)}'`
;;
esac
# If the COMMAND_LINE_FILENAME is not absolute (e.g., --debug.tex),
# prepend `./' in order to avoid that the tools take it as an option.
- echo "$command_line_filename" | $EGREP '^(/|[A-z]:/)' >&6 \
+ echo "$command_line_filename" | LC_ALL=C $EGREP '^(/|[A-Za-z]:/)' >&6 \
|| command_line_filename="./$command_line_filename"
# See if the file exists. If it doesn't we're in trouble since, even
# though the user may be able to reenter a valid filename at the tex
# prompt (assuming they're attending the terminal), this script won't
# be able to find the right xref files and so forth.
- test -r "$command_line_filename" ||
- error 1 "cannot read $command_line_filename, skipping."
+ test -r "$command_line_filename" \
+ || error 1 "cannot read $command_line_filename, skipping."
# Get the name of the current directory.
in_dir=`func_dirname "$command_line_filename"`
@@ -1704,7 +1899,7 @@ input_file_name_decode ()
# Strip directory part but leave extension.
in_base=`basename "$command_line_filename"`
# Strip extension.
- in_noext=`echo "$in_base" | sed 's/\.[^.]*$//'`
+ in_noext=`noext "$in_base"`
# The normalized file name to compile. Must always point to the
# file to actually compile (in case of recoding, macro-expansion etc.).
@@ -1720,7 +1915,7 @@ input_file_name_decode ()
out_dir=`func_dirname "$out_name"`
out_dir_abs=`absolute "$out_dir"`
out_base=`basename "$out_name"`
- out_noext=`echo "$out_base" | sed 's/\.[^.]*$//'`
+ out_noext=`noext "$out_base"`
}
@@ -1742,11 +1937,13 @@ do
case $build_dir in
'' | . ) t2ddir=$out_noext.t2d ;;
*) # Avoid collisions between multiple occurrences of the same
- # file. The sed expression is fragile if the cwd has
- # active characters.
- t2ddir=$build_dir/`echo "$out_dir_abs/$out_noext.t2d" |
- sed "s,^$orig_pwd/,," |
- sed 's,/,!,g'`
+ # file, so depend on the output path. Remove leading `./',
+ # at least to avoid creating a file starting with `.!', i.e.,
+ # an invisible file. The sed expression is fragile if the cwd
+ # has active characters. Transform / into ! so that we don't
+ # need `mkdir -p'. It might be something to reconsider.
+ t2ddir=$build_dir/`echo "$out_dir_abs/$out_noext.t2d" |
+ sed "s,^$orig_pwd/,,;s,^\./,,;s,/,!,g"`
esac
# Remove it at exit if clean mode.
trap "cleanup" 0 1 2 15
diff --git a/util/texi2html b/util/texi2html
new file mode 100755
index 0000000..b800c6a
--- /dev/null
+++ b/util/texi2html
@@ -0,0 +1,29 @@
+#! /bin/sh
+# $Id: texi2html 5191 2013-02-23 00:11:18Z karl $
+# Copyright 2012 Free Software Foundation, Inc.
+#
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# Original author: Patrice Dumas.
+
+# Convert Texinfo to HTML, setting the default style to be the texi2html
+# style.
+#
+# It is not fully compatible with texi2html. There is no possibility of
+# splitting indices, and translated strings cannot (yet?) be customized.
+# Command line processing and options have also changed, and the
+# customization API is new.
+#
+# Thus, since this is not a drop-in replacement for the old texi2html,
+# we do not install it. It's here as an example.
+#
+# See the texi2html node in the Texinfo manual for more.
+#
+exec texi2any --set-init-variable TEXI2HTML=1 "$@"
+
diff --git a/util/texi2pdf b/util/texi2pdf
index a030a74..11eadc8 100755
--- a/util/texi2pdf
+++ b/util/texi2pdf
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: texi2pdf,v 1.2 2005/01/28 01:52:04 karl Exp $
+# $Id: texi2pdf 5381 2013-09-26 23:03:58Z karl $
# Written by Thomas Esser. Public domain.
# Execute texi2dvi --pdf.
@@ -16,4 +16,23 @@ unset RUNNING_BSH
# hack around a bug in zsh:
test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"'
+rcs_revision='$Revision: 5381 $'
+rcs_version=`set - $rcs_revision; echo $2`
+
+# special-case --version following GNU standards for identifying the
+# program name. If --version is specified as other than the first
+# argument, we don't output the standard name, but then, we're not
+# obliged to.
+if test "x$1" = x--version; then
+ cat <<EOF
+texi2pdf (GNU Texinfo 5.2) $rcs_version
+
+Copyright (C) 2013 Free Software Foundation, Inc.
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+EOF
+ exit 0
+fi
+
texi2dvi --pdf ${1+"$@"}
diff --git a/util/texindex.c b/util/texindex.c
index 431f27e..e47b725 100644
--- a/util/texindex.c
+++ b/util/texindex.c
@@ -1,8 +1,9 @@
/* texindex -- sort TeX index dribble output into an actual index.
- $Id: texindex.c,v 1.24 2008/02/22 19:18:25 karl Exp $
+ $Id: texindex.c 5191 2013-02-23 00:11:18Z karl $
- Copyright (C) 1987, 1991, 1992, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ Copyright 1987, 1991, 1992, 1996, 1997, 1998, 1999, 2000, 2001,
+ 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
+ 2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -117,8 +118,8 @@ int compare_field (struct keyfield *keyfield, char *start1,
long int length2, long int pos2);
int compare_full (const void *, const void *);
void pfatal_with_name (const char *name);
-void fatal (const char *format, const char *arg);
-void error (const char *format, const char *arg);
+void fatal (const char *format, ...);
+void error (const char *format, ...);
void *xmalloc (), *xrealloc ();
static char *concat3 (const char *, const char *, const char *);
@@ -199,13 +200,12 @@ main (int argc, char *argv[])
{
fprintf (stderr, "%s: %s: file too large\n", program_name,
infiles[i]);
- xexit (1);
+ exit (EXIT_FAILURE);
}
sort_in_core (infiles[i], (int)ptr, outfile);
}
- xexit (0);
- return 0; /* Avoid bogus warnings. */
+ exit (EXIT_SUCCESS);
}
typedef struct
@@ -262,7 +262,7 @@ general questions and discussion to help-texinfo@gnu.org.\n\
Texinfo home page: http://www.gnu.org/software/texinfo/"), f);
fputs ("\n", f);
- xexit (result_value);
+ exit (result_value);
}
/* Decode the command line arguments to set the parameter variables
@@ -296,8 +296,8 @@ decode_command (int argc, char **argv)
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\
This is free software: you are free to change and redistribute it.\n\
There is NO WARRANTY, to the extent permitted by law.\n"),
- "2008");
- xexit (0);
+ "2013");
+ exit (EXIT_SUCCESS);
}
else if ((strcmp (arg, "--keep") == 0) ||
(strcmp (arg, "-k") == 0))
@@ -307,7 +307,7 @@ There is NO WARRANTY, to the extent permitted by law.\n"),
else if ((strcmp (arg, "--help") == 0) ||
(strcmp (arg, "-h") == 0))
{
- usage (0);
+ usage (EXIT_SUCCESS);
}
else if ((strcmp (arg, "--output") == 0) ||
(strcmp (arg, "-o") == 0))
@@ -319,10 +319,10 @@ There is NO WARRANTY, to the extent permitted by law.\n"),
*(op - 1) = argv[arg_index];
}
else
- usage (1);
+ usage (EXIT_FAILURE);
}
else
- usage (1);
+ usage (EXIT_FAILURE);
}
else
{
@@ -335,7 +335,7 @@ There is NO WARRANTY, to the extent permitted by law.\n"),
num_infiles = ip - infiles;
*ip = (char *)NULL;
if (num_infiles == 0)
- usage (1);
+ usage (EXIT_FAILURE);
}
/* Compare LINE1 and LINE2 according to the specified set of keyfields. */
@@ -1146,20 +1146,34 @@ writelines (char **linearray, int nlines, FILE *ostream)
/* Print error message and exit. */
void
-fatal (const char *format, const char *arg)
+vdiag (const char *fmt, const char *diagtype, va_list ap)
{
- error (format, arg);
- xexit (1);
+ fprintf (stderr, "%s: ", program_name);
+ if (diagtype)
+ fprintf (stderr, "%s: ", diagtype);
+ vfprintf (stderr, fmt, ap);
+ putc ('\n', stderr);
}
-/* Print error message. FORMAT is printf control string, ARG is arg for it. */
void
-error (const char *format, const char *arg)
+error (const char *fmt, ...)
{
- printf ("%s: ", program_name);
- printf (format, arg);
- if (format[strlen (format) -1] != '\n')
- printf ("\n");
+ va_list ap;
+
+ va_start (ap, fmt);
+ vdiag (fmt, NULL, ap);
+ va_end (ap);
+}
+
+void
+fatal (const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start (ap, fmt);
+ vdiag (fmt, NULL, ap);
+ va_end (ap);
+ exit (EXIT_FAILURE);
}
void
@@ -1173,7 +1187,7 @@ void
pfatal_with_name (const char *name)
{
perror_with_name (name);
- xexit (1);
+ exit (EXIT_FAILURE);
}
diff --git a/util/texinfo.dtd b/util/texinfo.dtd
index d07fdf6..cc5bd66 100644
--- a/util/texinfo.dtd
+++ b/util/texinfo.dtd
@@ -1,59 +1,107 @@
-<!-- $Id: texinfo.dtd,v 1.13 2008/01/31 18:33:27 karl Exp $
- Document Type Definition for Texinfo XML output (the '-'-xml option).
+<!-- $Id: texinfo.dtd 5369 2013-09-09 18:08:48Z karl $
+ Document Type Definition for Texinfo XML output (the '-'-xml option).
- Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
- Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+ 2011, 2012, 2013 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
- Author: Philippe Martin
- Contributors:
- Karl Eichwalder
- Alper Ersoy
- Karl Berry
- Torsten Bronger
+ Original author: Philippe Martin.
-->
<!-- * ENTITIES * -->
<!-- Meta-information -->
-<!ENTITY % metainformation "setfilename | settitle | dircategory
- | documentdescription">
-<!ENTITY % variables "setvalue | clearvalue">
-
-<!-- Document language -->
-<!ENTITY % lang "documentlanguage">
-
-<!-- Language codes -->
-<!ENTITY % languagecodes "aa|ab|af|am|ar|as|ay|az|ba|be|bg|bh|bi|bn|bo|br|ca|co|cs|cy|da|de|dz|el|en|eo|es|et|eu|fa|fi|fj|fo|fr|fy|ga|gd|gl|gn|gu|ha|he|hi|hr|hu|hy|ia|id|ie|ik|is|it|iu|ja|jw|ka|kk|kl|km|kn|ko|ks|ku|ky|la|ln|lo|lt|lv|mg|mi|mk|ml|mn|mo|mr|ms|mt|my|na|ne|nl|no|oc|om|or|pa|pl|ps|pt|qu|rm|rn|ro|ru|rw|sa|sd|sg|sh|si|sk|sl|sm|sn|so|sq|sr|ss|st|su|sv|sw|ta|te|tg|th|ti|tk|tl|tn|to|tr|ts|tt|tw|ug|uk|ur|uz|vi|vo|wo|xh|yi|yo|za|zh|zu">
+<!-- copying | titlepage could be there too -->
+<!ENTITY % metainformation "setfilename | settitle | dircategory | direntry
+ | hyphenation
+ | documentdescription
+ | shorttitlepage">
+<!ENTITY % variable.cmds "set | clear">
+
+<!-- Unique options -->
+<!ENTITY % unique.option.cmds "novalidate | setcontentsaftertitlepage
+ | setshortcontentsaftertitlepage | documentencoding
+ | everyheadingmarks | everyfootingmarks | evenheadingmarks | oddheadingmarks
+ | evenfootingmarks | oddfootingmarks | fonttextsize | pagesizes
+ | setchapternewpage | footnotestyle | finalout
+
+ | allowcodebreaks | exampleindent | afourpaper
+ | afivepaper | afourlatex | afourwide | headings
+ | everyheading | everyfooting | evenheading | evenfooting | oddheading
+ | oddfooting | smallbook | cropmarks">
+
+<!-- Global options in the main text -->
+<!ENTITY % global.option.cmds "synindex | syncodeindex
+ | defindex | defcodeindex | definfoenclose | alias">
+
+<!-- Options -->
+<!ENTITY % multiple.option.cmds "frenchspacing | documentlanguage
+ | %variable.cmds; | kbdinputstyle | paragraphindent
+ | firstparagraphindent | urefbreakstyle | xrefautomaticsectiontitle
+ | deftypefnnewline
+ | codequoteundirected | codequotebacktick | raisesections
+ | lowersections | clickstyle">
+
+<!ENTITY % option.cmds "%unique.option.cmds; | %global.option.cmds;
+ | %multiple.option.cmds;">
<!-- ToC -->
-<!ENTITY % toc "contents | shortcontents">
+<!ENTITY % toc "contents | shortcontents | summarycontents">
<!-- Title page -->
-<!ENTITY % titlepage_cmds "author | booktitle | booksubtitle">
-
-<!-- block -->
-<!ENTITY % block "menu | para | quotation | example | smallexample | lisp
- | smalllisp | cartouche | copying
- | format | smallformat | display
- | smalldisplay | itemize | enumerate | sp | center | group
- | table | multitable | definition | float | image">
-
-<!-- API definitions -->
-<!ENTITY % definition.cmds "defcategory | deffunction | defvariable | defparam
- | defdelimiter | deftype | defparamtype | defdatatype
- | defclass | defclassvar | defoperation">
+<!ENTITY % titlepage.cmds "author | title | subtitle">
+
+<!-- index entry commands -->
+<!ENTITY % indexentry.cmds "cindex | findex | kindex | pindex | tindex
+ | vindex | indexcommand">
+
+<!-- API definition commands -->
+<!ENTITY % def.cmds "deffn | defvr | deftypefn | deftypeop | deftypevr
+ | defcv | deftypecv | defop | deftp | defun | defmac
+ | defspec | defvar | defopt | deftypefun | deftypevar
+ | defivar | deftypeivar | defmethod | deftypemethod">
+
+<!ENTITY % raw.cmds "html | tex | docbook | xml | macro | rmacro | ignore">
+
+<!-- Commands that appear everywhere, both with block and in paragraphs -->
+<!-- include is in general absent, since it is replaced, but it is
+ present if the file was not found -->
+<!ENTITY % ubiquitous.cmds "sp | anchor | indent | noindent | %raw.cmds;
+ | %option.cmds; | errormsg | unmacro | include
+ | %indexentry.cmds; | refill | quote-arg | allow-recursion">
+
+<!-- Block -->
+<!ENTITY % block "menu | para | pre | quotation | smallquotation
+ | example | smallexample | lisp | smalllisp
+ | cartouche | float | format | smallformat
+ | display | smalldisplay | copying | titlepage
+ | raggedright | flushleft | flushright
+ | itemize | enumerate | titlefont | center | group
+ | table | vtable | ftable | multitable | definition
+ | image
+ | %def.cmds;
+ | %ubiquitous.cmds;
+ | verbatim | verbatiminclude | insertcopying | page | need
+ | vskip
+ | listoffloats">
+
+<!-- API definition line -->
+<!ENTITY % definition.args "defcategory | deffunction | defvariable | defparam
+ | defdelimiter | deftype | defparamtype | defdatatype
+ | defclass | defclassvar | defoperation">
<!-- Headings -->
-<!ENTITY % headings "majorheading | chapheading | heading | subheading
+<!ENTITY % heading.cmds "majorheading | chapheading | heading | subheading
| subsubheading">
+<!-- Language codes -->
+<!ENTITY % languagecodes "aa|ab|af|am|ar|as|ay|az|ba|be|bg|bh|bi|bn|bo|br|ca|co|cs|cy|da|de|dz|el|en|eo|es|et|eu|fa|fi|fj|fo|fr|fy|ga|gd|gl|gn|gu|ha|he|hi|hr|hu|hy|ia|id|ie|ik|is|it|iu|ja|jw|ka|kk|kl|km|kn|ko|ks|ku|ky|la|ln|lo|lt|lv|mg|mi|mk|ml|mn|mo|mr|ms|mt|my|na|ne|nl|no|oc|om|or|pa|pl|ps|pt|qu|rm|rn|ro|ru|rw|sa|sd|sg|sh|si|sk|sl|sm|sn|so|sq|sr|ss|st|su|sv|sw|ta|te|tg|th|ti|tk|tl|tn|to|tr|ts|tt|tw|ug|uk|ur|uz|vi|vo|wo|xh|yi|yo|za|zh|zu">
<!-- Sectioning -->
-<!ENTITY % section.level1 "top | chapter | unnumbered | appendix">
+<!ENTITY % section.level1 "top | part | chapter | unnumbered | centerchap | appendix">
<!ENTITY % section.level2 "section | unnumberedsec | appendixsec">
@@ -66,234 +114,860 @@
| %section.level4;">
-<!ENTITY % section.level1.content "(%block;
+<!-- toplevel content, not in copying nor footnote -->
+<!ENTITY % main.content "%block; | %toc; | node | %heading.cmds;
+ | printindex">
+
+<!ENTITY % section.level0.content "(%main.content;
+ | %section.level1;
+ | %section.level2;
+ | %section.level3;
+ | %section.level4;)*">
+
+
+<!ENTITY % section.level1.content "(%main.content;
| %section.level2;
| %section.level3;
- | %section.level4;
- | verbatim | titlepage | %toc;
- | %lang; | %variables;
- | %headings;
- | listoffloats
- | printindex)*">
-
-<!ENTITY % section.level2.content "(%block;
+ | %section.level4;)*">
+
+<!ENTITY % section.level2.content "(%main.content;
| %section.level3;
- | %section.level4;
- | verbatim | titlepage | %toc;
- | %lang; | %variables;
- | %headings;)*">
-
-<!ENTITY % section.level3.content "(%block;
- | %section.level4;
- | verbatim | titlepage | %toc;
- | %lang; | %variables;
- | %headings;)*">
-
-<!ENTITY % section.level4.content "(%block;
- | verbatim | titlepage | %toc;
- | %lang; | %variables;
- | %headings;)*">
-
-<!-- Options (many missing) -->
-<!ENTITY % onoff "on|off">
-<!ENTITY % option.cmds "frenchspacing">
+ | %section.level4;)*">
+
+<!ENTITY % section.level3.content "(%main.content;
+ | %section.level4;)*">
+
+<!ENTITY % section.level4.content "(%main.content;)*">
<!-- Inline -->
<!ENTITY % Inline.emphasize "strong | emph">
-<!ENTITY % Inline.fonts "b | i | r | sansserif | slanted | titlefont | tt
+<!ENTITY % Inline.fonts "b | i | r | sansserif | slanted | t
| sc">
<!ENTITY % Inline.footnote "footnote">
<!ENTITY % Inline.markup "code | command | env | file | option | samp | verb
- | dfn | cite | key | kbd | var | acronym | url">
+ | dfn | cite | key | kbd | var | acronym | abbr
+ | indicateurl | w | asis">
<!ENTITY % Inline.math "math | dmn">
-<!ENTITY % Inline.reference "xref | inforef | indexterm | email | uref">
-<!ENTITY % Inline.misc "click | clicksequence | logo | punct">
-
+<!ENTITY % Inline.reference "xref | ref | pxref | inforef | email | uref | url">
+<!ENTITY % Inline.misc "click | clicksequence | logo | punct | spacecmd | today
+ | linebreak | accent | dotless | ctrl | inlineraw
+ | inlinefmt | inlinefmtifelse | inlineifclear
+ | inlineifset | infoenclose | noeos | formfeed ">
+
+<!-- on lines -->
+<!ENTITY % Inline.linetext "%Inline.emphasize; | %Inline.misc; | %Inline.fonts;
+ | %Inline.markup; | %Inline.math; | %Inline.reference;
+ | %Inline.footnote;" >
+<!ENTITY % Inline.line "%Inline.linetext; | image">
+<!ENTITY % Inline.fullline "%Inline.line; | titlefont | anchor">
+
+<!-- in paragraphs -->
<!ENTITY % Inline.phrase
- "%Inline.emphasize; | %Inline.misc; | %Inline.fonts;
- | %Inline.markup; | %Inline.math; | %Inline.reference;
- | %Inline.footnote; | %option.cmds; ">
+ "%Inline.line; | %ubiquitous.cmds;">
+<!-- in raw (everything except sectioning commands) -->
+<!ENTITY % Raw.content "#PCDATA | %titlepage.cmds; | %block; | %heading.cmds;
+ | %Inline.linetext; | exdent | %toc; | printindex
+ | %metainformation;">
-<!-- * ELEMENTS * -->
+<!-- arguments/attribute values. Many are missing -->
+<!ENTITY % onoff "on|off">
+<!ENTITY % spacetype "spc|tab|nl">
+<!ENTITY % topbottom "top|bottom">
+<!ENTITY % zeroone "0|1">
+
+<!-- ubiquitous attribute -->
+<!ENTITY % spacesattr
+ "spaces CDATA #IMPLIED">
+<!ENTITY % lineattr
+ "line CDATA #IMPLIED">
+<!ENTITY % bracketedattr
+ "bracketed (%onoff;) #IMPLIED">
+<!-- block commands that have spaces also have endspaces -->
+<!-- this is also used for commands without arguments
+ when they have a @comment on their line -->
+<!ENTITY % spacesblockattr
+ "%spacesattr;
+ endspaces CDATA #IMPLIED">
+
+<!-- ELEMENTS -->
<!-- TOP Level Element -->
-<!ELEMENT texinfo ((%metainformation; | titlepage | node | synindex | %block; | %toc;
- | %variables; | %lang;)* )>
+<!ELEMENT texinfo (filename?, preamble?, (%metainformation;
+ | %section.all; | %main.content;)*, bye?)>
<!ATTLIST texinfo xml:lang (%languagecodes;) 'en'>
<!-- meta-information -->
-<!ELEMENT setfilename (#PCDATA)>
-<!ELEMENT settitle (#PCDATA | %Inline.phrase;)*>
-<!ELEMENT dircategory (#PCDATA)>
-
-<!ELEMENT setvalue (#PCDATA | %Inline.phrase;)*>
-<!ELEMENT clearvalue EMPTY>
-<!ATTLIST setvalue
- name CDATA #REQUIRED>
-<!ATTLIST clearvalue
- name CDATA #REQUIRED>
+<!ELEMENT filename EMPTY>
+<!ATTLIST filename
+ file CDATA #IMPLIED>
+<!ELEMENT setfilename (#PCDATA | %Inline.line;)*>
+<!ATTLIST setfilename
+ %spacesattr;
+ file CDATA #IMPLIED>
+<!ELEMENT settitle (#PCDATA | %Inline.line;)*>
+<!ATTLIST settitle
+ %spacesattr;>
+<!ELEMENT shorttitlepage (#PCDATA | %Inline.line;)*>
+<!ATTLIST shorttitlepage
+ %spacesattr;>
+<!ELEMENT dircategory (#PCDATA | %Inline.line;)*>
+<!ATTLIST dircategory
+ %spacesattr;>
+
+<!ELEMENT set (#PCDATA)>
+<!ATTLIST set
+ %lineattr;
+ name CDATA #REQUIRED>
+<!ELEMENT clear EMPTY>
+<!ATTLIST clear
+ %lineattr;
+ name CDATA #REQUIRED>
+<!ELEMENT unmacro EMPTY>
+<!ATTLIST unmacro
+ %lineattr;
+ name CDATA #REQUIRED>
+<!ELEMENT definfoenclose EMPTY>
+<!ATTLIST definfoenclose
+ %lineattr;
+ command NMTOKEN #REQUIRED
+ open CDATA #IMPLIED
+ close CDATA #IMPLIED>
+<!ELEMENT alias EMPTY>
+<!ATTLIST alias
+ %lineattr;
+ new NMTOKEN #REQUIRED
+ existing NMTOKEN #REQUIRED>
+<!ELEMENT clickstyle (#PCDATA)>
+<!ATTLIST clickstyle
+ %lineattr;
+ command NMTOKEN #REQUIRED>
+
+<!-- preamble -->
+<!ELEMENT preamble (#PCDATA)>
<!-- ToC -->
<!ELEMENT contents EMPTY>
+<!ATTLIST contents
+ %lineattr;>
<!ELEMENT shortcontents EMPTY>
-
-<!-- Document language -->
-<!ELEMENT documentlanguage EMPTY>
-<!ATTLIST documentlanguage xml:lang (%languagecodes;) 'en'>
-
-<!-- Titlepage -->
-<!ELEMENT titlepage (%titlepage_cmds; | %block;)*>
-<!ELEMENT author (#PCDATA | %Inline.phrase;)*>
-<!ELEMENT booktitle (#PCDATA | %Inline.phrase;)*>
-<!ELEMENT booksubtitle (#PCDATA | %Inline.phrase;)*>
-
-<!-- NODES -->
+<!ATTLIST shortcontents
+ %lineattr;>
+<!ELEMENT summarycontents EMPTY>
+<!ATTLIST summarycontents
+ %lineattr;>
+
+<!-- Global unique options -->
+<!ELEMENT novalidate EMPTY>
+<!ATTLIST novalidate
+ %lineattr;>
+<!ELEMENT setcontentsaftertitlepage EMPTY>
+<!ATTLIST setcontentsaftertitlepage
+ %lineattr;>
+<!ELEMENT setshortcontentsaftertitlepage EMPTY>
+<!ATTLIST setshortcontentsaftertitlepage
+ %lineattr;>
+<!ELEMENT documentencoding (#PCDATA)>
+<!ATTLIST documentencoding
+ %spacesattr;
+ encoding CDATA #REQUIRED>
+<!ELEMENT everyheadingmarks EMPTY>
+<!ATTLIST everyheadingmarks
+ %lineattr;
+ value (%topbottom;) #REQUIRED>
+<!ELEMENT everyfootingmarks EMPTY>
+<!ATTLIST everyfootingmarks
+ %lineattr;
+ value (%topbottom;) #REQUIRED>
+<!ELEMENT evenheadingmarks EMPTY>
+<!ATTLIST evenheadingmarks
+ %lineattr;
+ value (%topbottom;) #REQUIRED>
+<!ELEMENT oddheadingmarks EMPTY>
+<!ATTLIST oddheadingmarks
+ %lineattr;
+ value (%topbottom;) #REQUIRED>
+<!ELEMENT evenfootingmarks EMPTY>
+<!ATTLIST evenfootingmarks
+ %lineattr;
+ value (%topbottom;) #REQUIRED>
+<!ELEMENT oddfootingmarks EMPTY>
+<!ATTLIST oddfootingmarks
+ %lineattr;
+ value (%topbottom;) #REQUIRED>
+<!-- "10|11" -->
+<!ELEMENT fonttextsize EMPTY>
+<!ATTLIST fonttextsize
+ %lineattr;
+ value CDATA #REQUIRED>
+<!ELEMENT pagesizes (#PCDATA)>
+<!ATTLIST pagesizes
+ %spacesattr;>
+<!ELEMENT setchapternewpage EMPTY>
+<!-- "off|on|odd" -->
+<!ATTLIST setchapternewpage
+ %lineattr;
+ value CDATA #REQUIRED>
+<!ELEMENT footnotestyle EMPTY>
+<!-- "end|separate" -->
+<!ATTLIST footnotestyle
+ %lineattr;
+ value CDATA #REQUIRED>
+<!ELEMENT allowcodebreaks EMPTY>
+<!-- "false|true" -->
+<!ATTLIST allowcodebreaks
+ %lineattr;
+ value CDATA #REQUIRED>
+<!ELEMENT exampleindent EMPTY>
+<!ATTLIST exampleindent
+ %lineattr;
+ value CDATA #REQUIRED>
+<!ELEMENT afourpaper EMPTY>
+<!ATTLIST afourpaper
+ %lineattr;>
+<!ELEMENT afivepaper EMPTY>
+<!ATTLIST afivepaper
+ %lineattr;>
+<!ELEMENT afourlatex EMPTY>
+<!ATTLIST afourlatex
+ %lineattr;>
+<!ELEMENT afourwide EMPTY>
+<!ATTLIST afourwide
+ %lineattr;>
+<!ELEMENT finalout EMPTY>
+<!ATTLIST finalout
+ %lineattr;>
+<!ELEMENT headings EMPTY>
+<!-- "off|on|single|double|singleafter|doubleafter" -->
+<!ATTLIST headings
+ %lineattr;
+ value CDATA #REQUIRED>
+<!ELEMENT everyheading (#PCDATA)>
+<!ELEMENT everyfooting (#PCDATA)>
+<!ELEMENT evenheading (#PCDATA)>
+<!ELEMENT evenfooting (#PCDATA)>
+<!ELEMENT oddheading (#PCDATA)>
+<!ELEMENT oddfooting (#PCDATA)>
+<!ELEMENT vskip (#PCDATA)>
+<!ELEMENT smallbook EMPTY>
+<!ATTLIST smallbook
+ %lineattr;>
+<!ELEMENT cropmarks EMPTY>
+<!ATTLIST cropmarks
+ %lineattr;>
+
+<!-- Global options -->
+<!ELEMENT documentlanguage (#PCDATA)>
+<!ATTLIST documentlanguage
+ %spacesattr;
+ xml:lang (%languagecodes;) 'en'>
+<!ELEMENT frenchspacing (#PCDATA)> <!-- must be on or off -->
+<!ATTLIST frenchspacing
+ %lineattr;
+ value (%onoff;) 'off'>
+<!ELEMENT kbdinputstyle EMPTY>
+<!-- "code|example|distinct" -->
+<!ATTLIST kbdinputstyle
+ %lineattr;
+ value CDATA #REQUIRED>
+<!ELEMENT paragraphindent EMPTY>
+<!ATTLIST paragraphindent
+ %lineattr;
+ value CDATA #REQUIRED>
+<!ELEMENT firstparagraphindent EMPTY>
+<!ATTLIST firstparagraphindent
+ %lineattr;
+ value CDATA #REQUIRED>
+<!ELEMENT urefbreakstyle EMPTY>
+<!-- "after|before|none" -->
+<!ATTLIST urefbreakstyle
+ %lineattr;
+ value CDATA #REQUIRED>
+<!ELEMENT xrefautomaticsectiontitle EMPTY>
+<!ATTLIST xrefautomaticsectiontitle
+ %lineattr;
+ value (%onoff;) #REQUIRED>
+<!ELEMENT deftypefnnewline EMPTY>
+<!ATTLIST deftypefnnewline
+ %lineattr;
+ value (%onoff;) #REQUIRED>
+<!ELEMENT codequoteundirected EMPTY>
+<!ATTLIST codequoteundirected
+ %lineattr;
+ value (%onoff;) #REQUIRED>
+<!ELEMENT codequotebacktick EMPTY>
+<!ATTLIST codequotebacktick
+ %lineattr;
+ value (%onoff;) #REQUIRED>
+<!ELEMENT raisesections EMPTY>
+<!ATTLIST raisesections
+ %lineattr;>
+<!ELEMENT lowersections EMPTY>
+<!ATTLIST lowersections
+ %lineattr;>
+
+<!-- Titlepage and copying -->
+<!ELEMENT copying (%block; | %heading.cmds;)*>
+<!ATTLIST copying
+ %spacesblockattr;>
+<!ELEMENT insertcopying EMPTY>
+
+<!ELEMENT titlepage (%titlepage.cmds; | %block; | %heading.cmds;)*>
+<!ATTLIST titlepage
+ %spacesblockattr;>
+<!ELEMENT author (#PCDATA | %Inline.line;)*>
+<!ATTLIST author
+ %spacesattr;>
+<!ELEMENT title (#PCDATA | %Inline.line;)*>
+<!ATTLIST title
+ %spacesattr;>
+<!ELEMENT subtitle (#PCDATA | %Inline.line;)*>
+<!ATTLIST subtitle
+ %spacesattr;>
+
+<!-- Formatting -->
+<!ELEMENT sp EMPTY>
+<!ATTLIST sp
+ %lineattr;
+ value CDATA #IMPLIED>
+<!ELEMENT page EMPTY>
+<!ATTLIST page
+ %lineattr;>
+<!ELEMENT need EMPTY>
+<!ATTLIST need
+ %lineattr;
+ value CDATA #REQUIRED>
+<!ELEMENT indent EMPTY>
+<!ELEMENT noindent EMPTY>
+
+<!-- emacs-page
<!ELEMENT node (nodename, nodenext?, nodeprev?, nodeup?,
- (%section.all; | %block; | %toc; | %lang;)*) >
-
-<!ELEMENT nodename (#PCDATA)>
-<!ELEMENT nodenext (#PCDATA)>
-<!ELEMENT nodeprev (#PCDATA)>
-<!ELEMENT nodeup (#PCDATA)>
-
-
-<!-- SECTIONING -->
-<!ELEMENT top (title?, (%section.level1.content;))>
-
-<!ELEMENT chapter (title?, (%section.level1.content;))>
-<!ELEMENT section (title?, (%section.level2.content;))>
-<!ELEMENT subsection (title?, (%section.level3.content;))>
-<!ELEMENT subsubsection (title?, (%section.level4.content;))>
-
-<!ELEMENT unnumbered (title?, (%section.level1.content;))>
-<!ELEMENT unnumberedsec (title?, (%section.level2.content;))>
-<!ELEMENT unnumberedsubsec (title?, (%section.level3.content;))>
-<!ELEMENT unnumberedsubsubsec (title?, (%section.level4.content;))>
+ (%section.all; | %main.content;)*) >
+ Nodes -->
+<!ELEMENT node (nodename, nodenext?, nodeprev?, nodeup?)>
+<!ATTLIST node
+ %spacesattr;
+ name CDATA #IMPLIED>
-<!ELEMENT appendix (title?, (%section.level1.content;))>
-<!ELEMENT appendixsec (title?, (%section.level2.content;))>
-<!ELEMENT appendixsubsec (title?, (%section.level3.content;))>
-<!ELEMENT appendixsubsubsec (title?, (%section.level4.content;))>
+<!ELEMENT nodename (#PCDATA | %Inline.line;)*>
+<!ATTLIST nodename
+ trailingspaces CDATA #IMPLIED>
+<!ELEMENT nodenext (#PCDATA | %Inline.line;)*>
+<!ATTLIST nodenext
+ %spacesattr;
+ trailingspaces CDATA #IMPLIED
+ automatic (%onoff;) 'off'>
+<!ELEMENT nodeprev (#PCDATA | %Inline.line;)*>
+<!ATTLIST nodeprev
+ %spacesattr;
+ trailingspaces CDATA #IMPLIED
+ automatic (%onoff;) 'off'>
+<!ELEMENT nodeup (#PCDATA | %Inline.line;)*>
+<!ATTLIST nodeup
+ %spacesattr;
+ trailingspaces CDATA #IMPLIED
+ automatic (%onoff;) 'off'>
+
+<!ENTITY % sectionsattr
+ "%spacesattr;
+ originalcommand CDATA #IMPLIED">
+<!-- Sectioning -->
+<!ELEMENT top (sectiontitle?, (%section.level0.content;))>
+<!ATTLIST top
+ %sectionsattr;>
+<!ELEMENT part (sectiontitle?, (%section.level0.content;))>
+<!ATTLIST part
+ %sectionsattr;>
+
+<!ELEMENT chapter (sectiontitle?, (%section.level1.content;))>
+<!ATTLIST chapter
+ %sectionsattr;>
+<!ELEMENT section (sectiontitle?, (%section.level2.content;))>
+<!ATTLIST section
+ %sectionsattr;>
+<!ELEMENT subsection (sectiontitle?, (%section.level3.content;))>
+<!ATTLIST subsection
+ %sectionsattr;>
+<!ELEMENT subsubsection (sectiontitle?, (%section.level4.content;))>
+<!ATTLIST subsubsection
+ %sectionsattr;>
+
+<!ELEMENT unnumbered (sectiontitle?, (%section.level1.content;))>
+<!ATTLIST unnumbered
+ %sectionsattr;>
+<!ELEMENT unnumberedsec (sectiontitle?, (%section.level2.content;))>
+<!ATTLIST unnumberedsec
+ %sectionsattr;>
+<!ELEMENT unnumberedsubsec (sectiontitle?, (%section.level3.content;))>
+<!ATTLIST unnumberedsubsec
+ %sectionsattr;>
+<!ELEMENT unnumberedsubsubsec (sectiontitle?, (%section.level4.content;))>
+<!ATTLIST unnumberedsubsubsec
+ %sectionsattr;>
+<!ELEMENT centerchap (sectiontitle?, (%section.level1.content;))>
+<!ATTLIST centerchap
+ %sectionsattr;>
+
+<!ELEMENT appendix (sectiontitle?, (%section.level1.content;))>
+<!ATTLIST appendix
+ %sectionsattr;>
+<!ELEMENT appendixsec (sectiontitle?, (%section.level2.content;))>
+<!ATTLIST appendixsec
+ %sectionsattr;>
+<!ELEMENT appendixsubsec (sectiontitle?, (%section.level3.content;))>
+<!ATTLIST appendixsubsec
+ %sectionsattr;>
+<!ELEMENT appendixsubsubsec (sectiontitle?, (%section.level4.content;))>
+<!ATTLIST appendixsubsubsec
+ %sectionsattr;>
<!-- Headings and titles -->
-<!ELEMENT majorheading (#PCDATA | %Inline.phrase;)*>
-<!ELEMENT chapheading (#PCDATA | %Inline.phrase;)*>
-<!ELEMENT heading (#PCDATA | %Inline.phrase;)*>
-<!ELEMENT subheading (#PCDATA | %Inline.phrase;)*>
-<!ELEMENT subsubheading (#PCDATA | %Inline.phrase;)*>
-<!ELEMENT title (#PCDATA | %Inline.phrase;)*>
-
-<!-- Negative Indentation in Blocks -->
-<!ELEMENT exdent (#PCDATA | %Inline.phrase;)*>
-
-
-<!-- BLOCK Elements -->
-
-<!ELEMENT quotation (%block; | %Inline.phrase; | exdent)*>
-<!ELEMENT documentdescription (#PCDATA | %block; | %Inline.phrase;)*>
-<!ELEMENT example (#PCDATA | %block; | %Inline.phrase; | exdent)*>
-<!ELEMENT smallexample (#PCDATA | %block; | %Inline.phrase; | exdent)*>
-<!ELEMENT lisp (#PCDATA | %block; | %Inline.phrase; | exdent)*>
-<!ELEMENT smalllisp (#PCDATA | %block; | %Inline.phrase; | exdent)*>
-<!ELEMENT cartouche (#PCDATA | %block; | %Inline.phrase; | exdent)*>
-<!ELEMENT copying (#PCDATA | %block; | %Inline.phrase; | exdent)*>
-<!ELEMENT format (#PCDATA | %block; | %Inline.phrase; | exdent)*>
-<!ELEMENT smallformat (#PCDATA | %block; | %Inline.phrase; | exdent)*>
-<!ELEMENT display (#PCDATA | %block; | %Inline.phrase; | exdent)*>
-<!ELEMENT smalldisplay (#PCDATA | %block; | %Inline.phrase; | exdent)*>
-<!ELEMENT center (#PCDATA | %block; | %Inline.phrase; | exdent)*>
-<!ELEMENT group (#PCDATA | %block; | %Inline.phrase; | exdent)*>
-
-<!ELEMENT image (alttext)>
-<!ELEMENT alttext (#PCDATA)>
+<!ELEMENT majorheading (#PCDATA | %Inline.line;)*>
+<!ATTLIST majorheading
+ %spacesattr;>
+<!ELEMENT chapheading (#PCDATA | %Inline.line;)*>
+<!ATTLIST chapheading
+ %spacesattr;>
+<!ELEMENT heading (#PCDATA | %Inline.line;)*>
+<!ATTLIST heading
+ %spacesattr;>
+<!ELEMENT subheading (#PCDATA | %Inline.line;)*>
+<!ATTLIST subheading
+ %spacesattr;>
+<!ELEMENT subsubheading (#PCDATA | %Inline.line;)*>
+<!ATTLIST subsubheading
+ %spacesattr;>
+<!ELEMENT sectiontitle (#PCDATA | %Inline.line;)*>
+
+
+<!-- emacs-page
+ Block elements -->
+
+<!ELEMENT quotation (quotationtype?, (%block; | exdent | author)*)>
+<!ATTLIST quotation
+ %spacesblockattr;>
+<!ELEMENT smallquotation (quotationtype?, (%block; | exdent | author)*)>
+<!ATTLIST smallquotation
+ %spacesblockattr;>
+<!ELEMENT quotationtype (#PCDATA | %Inline.line;)*>
+
+<!ELEMENT documentdescription (%block;)*>
+<!ATTLIST documentdescription
+ %spacesblockattr;>
+<!ELEMENT example (%block; | exdent)*>
+<!ATTLIST example
+ %spacesblockattr;>
+<!ELEMENT smallexample (%block; | exdent)*>
+<!ATTLIST smallexample
+ %spacesblockattr;>
+<!ELEMENT lisp (%block; | exdent)*>
+<!ATTLIST lisp
+ %spacesblockattr;>
+<!ELEMENT smalllisp (%block; | exdent)*>
+<!ATTLIST smalllisp
+ %spacesblockattr;>
+<!ELEMENT cartouche (%block; | exdent)*>
+<!ATTLIST cartouche
+ %spacesblockattr;>
+<!ELEMENT format (%block; | exdent)*>
+<!ATTLIST format
+ %spacesblockattr;>
+<!ELEMENT smallformat (%block; | exdent)*>
+<!ATTLIST smallformat
+ %spacesblockattr;>
+<!ELEMENT display (%block; | exdent)*>
+<!ATTLIST display
+ %spacesblockattr;>
+<!ELEMENT smalldisplay (%block; | exdent)*>
+<!ATTLIST smalldisplay
+ %spacesblockattr;>
+<!ELEMENT group (%block; | exdent)*>
+<!ATTLIST group
+ %spacesblockattr;>
+<!ELEMENT flushleft (%block; | exdent)*>
+<!ATTLIST flushleft
+ %spacesblockattr;>
+<!ELEMENT flushright (%block; | exdent)*>
+<!ATTLIST flushright
+ %spacesblockattr;>
+<!ELEMENT raggedright (%block; | exdent)*>
+<!ATTLIST raggedright
+ %spacesblockattr;>
+
+<!ELEMENT center (#PCDATA | %Inline.fullline;)*>
+<!ATTLIST center
+ %spacesattr;>
+
+<!ELEMENT image (imagefile, imagewidth?, imageheight?, alttext?,
+ imageextension?)>
<!ATTLIST image
- name CDATA #REQUIRED
- extension CDATA #REQUIRED
- width CDATA #REQUIRED
- height CDATA #REQUIRED>
+ %spacesattr;
+ where CDATA #IMPLIED>
+<!ELEMENT imagefile (#PCDATA | %Inline.line;)*>
+<!ELEMENT imagewidth (#PCDATA)>
+<!ATTLIST imagewidth
+ %spacesattr;>
+<!ELEMENT imageheight (#PCDATA)>
+<!ATTLIST imageheight
+ %spacesattr;>
+<!ELEMENT alttext (#PCDATA | %Inline.line;)*>
+<!ATTLIST alttext
+ %spacesattr;>
+<!ELEMENT imageextension (#PCDATA)>
+<!ATTLIST imageextension
+ %spacesattr;>
<!-- Whitespace in these elements are always preserved -->
-<!ATTLIST example xml:space (preserve) #FIXED 'preserve'>
-<!ATTLIST smallexample xml:space (preserve) #FIXED 'preserve'>
-<!ATTLIST lisp xml:space (preserve) #FIXED 'preserve'>
-<!ATTLIST smalllisp xml:space (preserve) #FIXED 'preserve'>
-<!ATTLIST display xml:space (preserve) #FIXED 'preserve'>
-<!ATTLIST smalldisplay xml:space (preserve) #FIXED 'preserve'>
-<!ATTLIST format xml:space (preserve) #FIXED 'preserve'>
-<!ATTLIST smallformat xml:space (preserve) #FIXED 'preserve'>
-
<!ELEMENT verbatim (#PCDATA)>
-<!ATTLIST verbatim xml:space (preserve) #FIXED 'preserve'>
+<!ATTLIST verbatim
+ %spacesattr;
+ xml:space (preserve) #FIXED 'preserve'>
-<!ELEMENT para (#PCDATA | %Inline.phrase; | %lang;)*>
+<!-- author is there because it may happen in a quotation para -->
+<!ELEMENT para (#PCDATA | %Inline.phrase; | author)*>
<!ATTLIST para
role CDATA #IMPLIED>
-
-<!ELEMENT menu (menuentry | detailmenu | para)*>
-<!ELEMENT detailmenu (menuentry | para)*>
-<!ELEMENT menuentry (menunode?, menutitle?, menucomment?)>
-<!ELEMENT menunode (#PCDATA)>
-<!ELEMENT menutitle (#PCDATA)>
-<!ELEMENT menucomment (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT pre (#PCDATA | %Inline.phrase; | author)*>
+<!ATTLIST pre xml:space (preserve) #FIXED 'preserve'>
+
+<!ELEMENT menu (menuentry | detailmenu | menucomment)*>
+<!ATTLIST menu
+ %spacesblockattr;>
+<!ELEMENT detailmenu (menuentry | menucomment)*>
+<!ATTLIST detailmenu
+ %spacesblockattr;>
+<!ELEMENT direntry (menuentry | menucomment)*>
+<!ATTLIST direntry
+ %spacesblockattr;>
+<!ELEMENT menuentry (menutitle?, menunode?, menudescription?)>
+<!ATTLIST menuentry
+ leadingtext CDATA #REQUIRED>
+<!ELEMENT menunode (#PCDATA | %Inline.line;)*>
+<!ATTLIST menunode
+ separator CDATA #IMPLIED>
+<!ELEMENT menutitle (#PCDATA | %Inline.line;)*>
+<!ATTLIST menutitle
+ separator CDATA #IMPLIED>
+<!ELEMENT menudescription (%block;)*>
+<!ELEMENT menucomment (%block;)*>
+
+<!-- Raw formats -->
+<!ELEMENT docbook (%Raw.content;)*>
+<!ATTLIST docbook
+ %spacesblockattr;>
+<!ELEMENT html (%Raw.content;)*>
+<!ATTLIST html
+ %spacesblockattr;>
+<!ELEMENT tex (%Raw.content;)*>
+<!ATTLIST tex
+ %spacesblockattr;>
+<!-- this may happen if xml is not expanded -->
+<!ELEMENT xml (%Raw.content;)*>
+<!ATTLIST xml
+ %spacesblockattr;>
+
+<!-- formalarg only before PCDATA, but mandating it seems not possible -->
+<!-- same issue for nesting macros -->
+<!ELEMENT macro (#PCDATA | formalarg | macro | rmacro)*>
+<!ATTLIST macro
+ name CDATA #REQUIRED
+ line CDATA #REQUIRED>
+<!ELEMENT rmacro (#PCDATA | formalarg | macro | rmacro)*>
+<!ATTLIST rmacro
+ name CDATA #REQUIRED
+ line CDATA #REQUIRED>
+
+<!ELEMENT formalarg (#PCDATA)>
+
+<!ELEMENT ignore (#PCDATA)>
+
+<!-- Negative indentation in blocks -->
+<!ELEMENT exdent (#PCDATA | %Inline.fullline;)*>
+<!ATTLIST exdent
+ %spacesattr;>
+
+<!ELEMENT verbatiminclude (#PCDATA)>
+<!ATTLIST verbatiminclude
+ %spacesattr;
+ file CDATA #REQUIRED>
+
+<!ELEMENT include (#PCDATA)>
+<!ATTLIST include
+ %spacesattr;>
<!-- Floating displays -->
-<!ELEMENT float (floattype, floatpos, (%block;)*,
- ((caption, shortcaption?) | (shortcaption, caption))?)>
+<!ELEMENT float (floattype?, floatname?, (%block;)*,
+ (caption | shortcaption)*)>
<!ATTLIST float
- name CDATA #IMPLIED>
-<!ELEMENT floattype (#PCDATA)>
-<!ELEMENT floatpos (#PCDATA)>
-<!ELEMENT caption (#PCDATA | %Inline.phrase;)*>
-<!ELEMENT shortcaption (#PCDATA | %Inline.phrase;)*>
-<!ELEMENT listoffloats EMPTY>
+ %spacesblockattr;
+ number CDATA #IMPLIED
+ name CDATA #IMPLIED
+ type CDATA #IMPLIED>
+<!ELEMENT floattype (#PCDATA | %Inline.line;)*>
+<!ELEMENT floatname (#PCDATA | %Inline.line;)*>
+<!ATTLIST floatname
+ %spacesattr;>
+<!ELEMENT caption (#PCDATA | %block;)*>
+<!ATTLIST caption
+ %spacesattr;>
+<!ELEMENT shortcaption (#PCDATA | %Inline.phrase; | para)*>
+<!ELEMENT listoffloats (#PCDATA | %Inline.line;)*>
<!ATTLIST listoffloats
+ %spacesattr;
type CDATA #IMPLIED>
<!-- Lists -->
-<!ELEMENT itemize (itemfunction, (item | itemize | enumerate | indexterm)*)>
-<!ELEMENT enumerate (item | itemize | enumerate | indexterm)*>
+<!ELEMENT itemize (itemprepend?, beforefirstitem?,
+ (listitem | %indexentry.cmds;)*)>
+<!ATTLIST itemize
+ %spacesblockattr;
+ commandarg CDATA #IMPLIED>
+<!ELEMENT enumerate (enumeratefirst?, beforefirstitem?,
+ (listitem | %indexentry.cmds;)*)>
<!ATTLIST enumerate
+ %spacesblockattr;
first CDATA #IMPLIED>
+<!ELEMENT enumeratefirst (#PCDATA)>
-<!ELEMENT item (%block;)*>
+<!ELEMENT listitem (prepend?, (%block;)*)>
+<!ATTLIST listitem
+ %spacesattr;>
+<!ELEMENT prepend (#PCDATA | %Inline.line;)*>
-<!ELEMENT itemfunction (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT itemprepend (#PCDATA | %Inline.line; | formattingcommand)*>
+<!ELEMENT formattingcommand EMPTY>
+<!ATTLIST formattingcommand
+ command CDATA #REQUIRED>
+<!ELEMENT beforefirstitem (%block;)*>
<!-- Tables -->
-<!ELEMENT table (tableitem | indexterm)+>
-<!ELEMENT tableitem ((tableterm, indexterm*)+, item?)>
-<!ELEMENT tableterm (#PCDATA | %Inline.phrase;)*>
-
-<!ELEMENT multitable (columnfraction*, thead?, tbody)>
-<!ELEMENT columnfraction (#PCDATA)>
+<!ELEMENT table (beforefirstitem?, (tableentry | %indexentry.cmds;)+)>
+
+<!ENTITY % blocktablearg
+ "%spacesblockattr;
+ commandarg CDATA #IMPLIED
+ begin CDATA #IMPLIED
+ end CDATA #IMPLIED">
+
+<!-- begin and end are for definfoenclose command as table argument -->
+<!ATTLIST table
+ %blocktablearg;>
+<!ELEMENT vtable (beforefirstitem?, (tableentry | %indexentry.cmds;)+)>
+<!ATTLIST vtable
+ %blocktablearg;>
+<!ELEMENT ftable (beforefirstitem?, (tableentry | %indexentry.cmds;)+)>
+<!ATTLIST ftable
+ %blocktablearg;>
+<!ELEMENT tableentry (tableterm, tableitem?)>
+<!-- tableterm contains directly pre if there is an index entry before @itemx -->
+<!ELEMENT tableterm (item, (pre | itemx | %indexentry.cmds;)*)>
+<!ELEMENT item (#PCDATA | %Inline.line; | itemformat | indexterm)*>
+<!ATTLIST item
+ %spacesattr;>
+<!ELEMENT itemx (#PCDATA | %Inline.line; | itemformat | indexterm)*>
+<!ATTLIST itemx
+ %spacesattr;>
+<!ELEMENT itemformat (#PCDATA | %Inline.line; | indexterm)*>
+<!-- begin and end are for definfoenclose command for item content -->
+<!ATTLIST itemformat
+ command CDATA #REQUIRED
+ begin CDATA #IMPLIED
+ end CDATA #IMPLIED>
+<!ELEMENT tableitem (%block;)*>
+
+<!ELEMENT multitable ((columnfractions | columnprototypes), beforefirstitem?,
+ thead?, tbody)>
+<!ATTLIST multitable
+ %blocktablearg;>
+<!ELEMENT columnfractions (columnfraction+)>
+<!ATTLIST columnfractions
+ %lineattr;>
+<!ELEMENT columnprototypes (columnprototype+)>
+<!ELEMENT columnfraction EMPTY>
+<!ATTLIST columnfraction
+ value CDATA #REQUIRED>
+<!ELEMENT columnprototype (#PCDATA | %Inline.line;)*>
+<!ATTLIST columnprototype
+ %spacesattr;
+ %bracketedattr;>
<!ELEMENT thead (row+)>
<!ELEMENT tbody (row+)>
<!ELEMENT row (entry*)>
-<!ELEMENT entry (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT entry (%block;)*>
+<!ATTLIST entry
+ %spacesattr;
+ command CDATA #REQUIRED>
<!-- API definitions -->
+
+<!-- def* contains directly pre if there is an index entry before def*x -->
+<!ELEMENT deffn (definitionterm, (pre | deffnx | %indexentry.cmds;)*, definitionitem?)>
+<!ATTLIST deffn
+ %spacesblockattr;>
+<!ELEMENT deffnx (definitionterm)>
+<!ATTLIST deffnx
+ %spacesattr;>
+<!ELEMENT defvr (definitionterm, (pre | defvrx | %indexentry.cmds;)*, definitionitem?)>
+<!ATTLIST defvr
+ %spacesblockattr;>
+<!ELEMENT defvrx (definitionterm)>
+<!ATTLIST defvrx
+ %spacesattr;>
+<!ELEMENT deftypefn (definitionterm, (pre | deftypefnx | %indexentry.cmds;)*, definitionitem?)>
+<!ATTLIST deftypefn
+ %spacesblockattr;>
+<!ELEMENT deftypefnx (definitionterm)>
+<!ATTLIST deftypefnx
+ %spacesattr;>
+<!ELEMENT deftypeop (definitionterm, (pre | deftypeopx | %indexentry.cmds;)*, definitionitem?)>
+<!ATTLIST deftypeop
+ %spacesblockattr;>
+<!ELEMENT deftypeopx (definitionterm)>
+<!ATTLIST deftypeopx
+ %spacesattr;>
+<!ELEMENT deftypevr (definitionterm, (pre | deftypevrx | %indexentry.cmds;)*, definitionitem?)>
+<!ATTLIST deftypevr
+ %spacesblockattr;>
+<!ELEMENT deftypevrx (definitionterm)>
+<!ATTLIST deftypevrx
+ %spacesattr;>
+<!ELEMENT defcv (definitionterm, (pre | defcvx | %indexentry.cmds;)*, definitionitem?)>
+<!ATTLIST defcv
+ %spacesblockattr;>
+<!ELEMENT defcvx (definitionterm)>
+<!ATTLIST defcvx
+ %spacesattr;>
+<!ELEMENT deftypecv (definitionterm, (pre | deftypecvx | %indexentry.cmds;)*, definitionitem?)>
+<!ATTLIST deftypecv
+ %spacesblockattr;>
+<!ELEMENT deftypecvx (definitionterm)>
+<!ATTLIST deftypecvx
+ %spacesattr;>
+<!ELEMENT defop (definitionterm, (pre | defopx | %indexentry.cmds;)*, definitionitem?)>
+<!ATTLIST defop
+ %spacesblockattr;>
+<!ELEMENT defopx (definitionterm)>
+<!ATTLIST defopx
+ %spacesattr;>
+<!ELEMENT deftp (definitionterm, (pre | deftpx | %indexentry.cmds;)*, definitionitem?)>
+<!ATTLIST deftp
+ %spacesblockattr;>
+<!ELEMENT deftpx (definitionterm)>
+<!ATTLIST deftpx
+ %spacesattr;>
+<!ELEMENT defun (definitionterm, (pre | defunx | %indexentry.cmds;)*, definitionitem?)>
+<!ATTLIST defun
+ %spacesblockattr;>
+<!ELEMENT defunx (definitionterm)>
+<!ATTLIST defunx
+ %spacesattr;>
+<!ELEMENT defmac (definitionterm, (pre | defmacx | %indexentry.cmds;)*, definitionitem?)>
+<!ATTLIST defmac
+ %spacesblockattr;>
+<!ELEMENT defmacx (definitionterm)>
+<!ATTLIST defmacx
+ %spacesattr;>
+<!ELEMENT defspec (definitionterm, (pre | defspecx | %indexentry.cmds;)*, definitionitem?)>
+<!ATTLIST defspec
+ %spacesblockattr;>
+<!ELEMENT defspecx (definitionterm)>
+<!ATTLIST defspecx
+ %spacesattr;>
+<!ELEMENT defvar (definitionterm, (pre | defvarx | %indexentry.cmds;)*, definitionitem?)>
+<!ATTLIST defvar
+ %spacesblockattr;>
+<!ELEMENT defvarx (definitionterm)>
+<!ATTLIST defvarx
+ %spacesattr;>
+<!ELEMENT defopt (definitionterm, (pre | defoptx | %indexentry.cmds;)*, definitionitem?)>
+<!ATTLIST defopt
+ %spacesblockattr;>
+<!ELEMENT defoptx (definitionterm)>
+<!ATTLIST defoptx
+ %spacesattr;>
+<!ELEMENT deftypefun (definitionterm, (pre | deftypefunx | %indexentry.cmds;)*, definitionitem?)>
+<!ATTLIST deftypefun
+ %spacesblockattr;>
+<!ELEMENT deftypefunx (definitionterm)>
+<!ATTLIST deftypefunx
+ %spacesattr;>
+<!ELEMENT deftypevar (definitionterm, (pre | deftypevarx | %indexentry.cmds;)*, definitionitem?)>
+<!ATTLIST deftypevar
+ %spacesblockattr;>
+<!ELEMENT deftypevarx (definitionterm)>
+<!ATTLIST deftypevarx
+ %spacesattr;>
+<!ELEMENT defivar (definitionterm, (pre | defivarx | %indexentry.cmds;)*, definitionitem?)>
+<!ATTLIST defivar
+ %spacesblockattr;>
+<!ELEMENT defivarx (definitionterm)>
+<!ATTLIST defivarx
+ %spacesattr;>
+<!ELEMENT deftypeivar (definitionterm, (pre | deftypeivarx | %indexentry.cmds;)*, definitionitem?)>
+<!ATTLIST deftypeivar
+ %spacesblockattr;>
+<!ELEMENT deftypeivarx (definitionterm)>
+<!ATTLIST deftypeivarx
+ %spacesattr;>
+<!ELEMENT defmethod (definitionterm, (pre | defmethodx | %indexentry.cmds;)*, definitionitem?)>
+<!ATTLIST defmethod
+ %spacesblockattr;>
+<!ELEMENT defmethodx (definitionterm)>
+<!ATTLIST defmethodx
+ %spacesattr;>
+<!ELEMENT deftypemethod (definitionterm, (pre | deftypemethodx | %indexentry.cmds;)*, definitionitem?)>
+<!ATTLIST deftypemethod
+ %spacesblockattr;>
+<!ELEMENT deftypemethodx (definitionterm)>
+<!ATTLIST deftypemethodx
+ %spacesattr;>
+
+<!--
<!ELEMENT definition (definitionterm | definitionitem | indexterm)+>
-<!ELEMENT definitionterm (%definition.cmds; | indexterm)+>
+<!ELEMENT definitionterm (%definition.args; | indexterm)+>
+-->
+<!ELEMENT definitionterm (indexterm?, (%definition.args;)+)>
<!ELEMENT definitionitem (%block;)*>
-<!ELEMENT defcategory (#PCDATA | %Inline.phrase;)*>
-<!ELEMENT deffunction (#PCDATA | %Inline.phrase;)*>
-<!ELEMENT defvariable (#PCDATA | %Inline.phrase;)*>
-<!ELEMENT defparam (#PCDATA | %Inline.phrase;)*>
-<!ELEMENT defdelimiter (#PCDATA | %Inline.phrase;)*>
-<!ELEMENT deftype (#PCDATA | %Inline.phrase;)*>
-<!ELEMENT defparamtype (#PCDATA | %Inline.phrase;)*>
-<!ELEMENT defdatatype (#PCDATA | %Inline.phrase;)*>
-<!ELEMENT defclass (#PCDATA | %Inline.phrase;)*>
-<!ELEMENT defclassvar (#PCDATA | %Inline.phrase;)*>
-<!ELEMENT defoperation (#PCDATA | %Inline.phrase;)*>
-
-<!-- INLINE Elements -->
-
-<!-- options -->
-<!ELEMENT frenchspacing (#PCDATA)> <!-- must be on or off -->
-<!ATTLIST frenchspacing val (%onoff;) 'off'>
+<!ENTITY % defargattr
+ "%bracketedattr; %spacesattr;">
+<!ELEMENT defcategory (#PCDATA | %Inline.line;)*>
+<!ATTLIST defcategory
+ %defargattr;
+ automatic (%onoff;) 'off'>
+<!ELEMENT deffunction (#PCDATA | %Inline.line;)*>
+<!ATTLIST deffunction
+ %defargattr;>
+<!ELEMENT defvariable (#PCDATA | %Inline.line;)*>
+<!ATTLIST defvariable
+ %defargattr;>
+<!ELEMENT defparam (#PCDATA | %Inline.line;)*>
+<!ATTLIST defparam
+ %defargattr;>
+<!ELEMENT defdelimiter (#PCDATA | %Inline.line;)*>
+<!ELEMENT deftype (#PCDATA | %Inline.line;)*>
+<!ATTLIST deftype
+ %defargattr;>
+<!ELEMENT defparamtype (#PCDATA | %Inline.line;)*>
+<!ATTLIST defparamtype
+ %defargattr;>
+<!ELEMENT defdatatype (#PCDATA | %Inline.line;)*>
+<!ATTLIST defdatatype
+ %defargattr;>
+<!ELEMENT defclass (#PCDATA | %Inline.line;)*>
+<!ATTLIST defclass
+ %defargattr;>
+<!ELEMENT defclassvar (#PCDATA | %Inline.line;)*>
+<!ATTLIST defclassvar
+ %defargattr;>
+<!ELEMENT defoperation (#PCDATA | %Inline.line;)*>
+<!ATTLIST defoperation
+ %defargattr;>
+
+<!-- emacs-page
+ Inline elements -->
+
+<!ELEMENT hyphenation (#PCDATA)>
<!-- emphasize -->
<!ELEMENT strong (#PCDATA | %Inline.phrase;)*>
@@ -309,7 +983,7 @@
<!ELEMENT sansserif (#PCDATA | %Inline.phrase;)*>
<!ELEMENT slanted (#PCDATA | %Inline.phrase;)*>
<!ELEMENT titlefont (#PCDATA | %Inline.phrase;)*>
-<!ELEMENT tt (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT t (#PCDATA | %Inline.phrase;)*>
<!-- markup -->
<!ELEMENT code (#PCDATA | %Inline.phrase;)*>
@@ -323,64 +997,260 @@
<!ELEMENT key (#PCDATA | %Inline.phrase;)*>
<!ELEMENT kbd (#PCDATA | %Inline.phrase;)*>
<!ELEMENT var (#PCDATA | %Inline.phrase;)*>
-<!ELEMENT url (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT indicateurl (#PCDATA | %Inline.phrase;)*>
+<!ATTLIST indicateurl
+ %spacesattr;>
+<!ELEMENT clicksequence (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT w (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT asis (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT verb (#PCDATA)>
+<!ATTLIST verb
+ delimiter CDATA #REQUIRED>
<!ELEMENT acronym (acronymword, acronymdesc?)>
+<!ATTLIST acronym
+ %spacesattr;>
<!ELEMENT acronymword (#PCDATA | %Inline.phrase;)*>
<!ELEMENT acronymdesc (#PCDATA | %Inline.phrase;)*>
+<!ATTLIST acronymdesc
+ %spacesattr;>
-<!ELEMENT abbrev (abbrevword, abbrevdesc?)>
-<!ELEMENT abbrevword (#PCDATA | %Inline.phrase;)*>
-<!ELEMENT abbrevdesc (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT abbr (abbrword, abbrdesc?)>
+<!ATTLIST abbr
+ %spacesattr;>
+<!ELEMENT abbrword (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT abbrdesc (#PCDATA | %Inline.phrase;)*>
+<!ATTLIST abbrdesc
+ %spacesattr;>
<!-- math -->
<!ELEMENT math (#PCDATA | %Inline.phrase;)*>
+<!ATTLIST math
+ %spacesattr;>
<!ELEMENT dmn (#PCDATA | %Inline.phrase;)*>
<!-- reference -->
-<!ELEMENT anchor EMPTY>
+<!ELEMENT anchor (#PCDATA | %Inline.phrase;)*>
<!ATTLIST anchor
+ %spacesattr;
name CDATA #IMPLIED>
-<!ELEMENT xref (xrefnodename | xrefinfoname | xrefinfofile
- | xrefprintedname | xrefprinteddesc)*>
+<!ELEMENT errormsg (#PCDATA | %Inline.phrase;)*>
+<!ATTLIST errormsg
+ %spacesattr;>
+
+<!-- inline conditionals -->
+<!ELEMENT inlineraw (inlinerawformat, inlinerawcontent)>
+<!ATTLIST inlineraw
+ %spacesattr;>
+<!ELEMENT inlinerawformat (#PCDATA)>
+<!ELEMENT inlinerawcontent (#PCDATA | %Inline.phrase;)*>
+<!ATTLIST inlinerawcontent
+ %spacesattr;>
+
+<!ELEMENT inlinefmt (inlinefmtformat, inlinefmtcontent)>
+<!ATTLIST inlinefmt
+ %spacesattr;>
+<!ELEMENT inlinefmtformat (#PCDATA)>
+<!ELEMENT inlinefmtcontent (#PCDATA | %Inline.phrase;)*>
+<!ATTLIST inlinefmtcontent
+ %spacesattr;>
+
+<!ELEMENT inlineifclear (inlineifclearformat, inlineifclearcontent)>
+<!ATTLIST inlineifclear
+ %spacesattr;>
+<!ELEMENT inlineifclearformat (#PCDATA)>
+<!ELEMENT inlineifclearcontent (#PCDATA | %Inline.phrase;)*>
+<!ATTLIST inlineifclearcontent
+ %spacesattr;>
+
+<!ELEMENT inlineifset (inlineifsetformat, inlineifsetcontent)>
+<!ATTLIST inlineifset
+ %spacesattr;>
+<!ELEMENT inlineifsetformat (#PCDATA)>
+<!ELEMENT inlineifsetcontent (#PCDATA | %Inline.phrase;)*>
+<!ATTLIST inlineifsetcontent
+ %spacesattr;>
+
+<!ELEMENT inlinefmtifelse (inlinefmtifelseformat, inlinefmtifelsecontentif?, inlinefmtifelsecontentelse?)>
+<!ATTLIST inlinefmtifelse
+ %spacesattr;>
+<!ELEMENT inlinefmtifelseformat (#PCDATA)>
+<!ELEMENT inlinefmtifelsecontentif (#PCDATA | %Inline.phrase;)*>
+<!ATTLIST inlinefmtifelsecontentif
+ %spacesattr;>
+<!ELEMENT inlinefmtifelsecontentelse (#PCDATA | %Inline.phrase;)*>
+<!ATTLIST inlinefmtifelsecontentelse
+ %spacesattr;>
+
+
+<!-- command defined by definfoenclose -->
+<!ELEMENT infoenclose (#PCDATA | %Inline.phrase;)*>
+<!ATTLIST infoenclose
+ command CDATA #REQUIRED
+ begin CDATA #IMPLIED
+ end CDATA #IMPLIED>
+
+<!ENTITY % xref.args "xrefnodename?, xrefinfoname?, xrefprinteddesc?,
+ xrefinfofile?, xrefprintedname?">
+<!ENTITY % xref.attr
+ "%spacesattr;
+ label CDATA #IMPLIED
+ manual CDATA #IMPLIED">
+
+<!ELEMENT xref (%xref.args;)>
+<!ATTLIST xref
+ %xref.attr;>
+<!ELEMENT ref (%xref.args;)>
+<!ATTLIST ref
+ %xref.attr;>
+<!ELEMENT pxref (%xref.args;)>
+<!ATTLIST pxref
+ %xref.attr;>
+
<!ELEMENT xrefnodename (#PCDATA | %Inline.phrase;)*>
<!ELEMENT xrefinfoname (#PCDATA | %Inline.phrase;)*>
+<!ATTLIST xrefinfoname
+ %spacesattr;>
<!ELEMENT xrefinfofile (#PCDATA | %Inline.phrase;)*>
+<!ATTLIST xrefinfofile
+ %spacesattr;>
<!ELEMENT xrefprintedname (#PCDATA | %Inline.phrase;)*>
+<!ATTLIST xrefprintedname
+ %spacesattr;>
<!ELEMENT xrefprinteddesc (#PCDATA | %Inline.phrase;)*>
+<!ATTLIST xrefprinteddesc
+ %spacesattr;>
-<!ELEMENT inforef (inforefnodename | inforefrefname | inforefinfoname)*>
+<!ELEMENT inforef (inforefnodename?, inforefrefname?, inforefinfoname?)>
+<!ATTLIST inforef
+ %xref.attr;>
<!ELEMENT inforefnodename (#PCDATA | %Inline.phrase;)*>
<!ELEMENT inforefrefname (#PCDATA | %Inline.phrase;)*>
+<!ATTLIST inforefrefname
+ %spacesattr;>
<!ELEMENT inforefinfoname (#PCDATA | %Inline.phrase;)*>
-
-<!ELEMENT synindex EMPTY>
-<!ATTLIST synindex
- code (yes|no) 'no'
- from NMTOKEN #REQUIRED
- to NMTOKEN #REQUIRED>
-<!ELEMENT indexterm (#PCDATA | %Inline.phrase;)*>
-<!ATTLIST indexterm
- index CDATA #IMPLIED>
+<!ATTLIST inforefinfoname
+ %spacesattr;>
<!ELEMENT email (emailaddress, emailname?)>
+<!ATTLIST email
+ %spacesattr;>
<!ELEMENT emailaddress (#PCDATA | %Inline.phrase;)*>
<!ELEMENT emailname (#PCDATA | %Inline.phrase;)*>
+<!ATTLIST emailname
+ %spacesattr;>
<!ELEMENT uref (urefurl, urefdesc?, urefreplacement?)>
+<!ATTLIST uref
+ %spacesattr;>
+<!ELEMENT url (urefurl, urefdesc?, urefreplacement?)>
+<!ATTLIST url
+ %spacesattr;>
<!ELEMENT urefurl (#PCDATA | %Inline.phrase;)*>
<!ELEMENT urefdesc (#PCDATA | %Inline.phrase;)*>
+<!ATTLIST urefdesc
+ %spacesattr;>
<!ELEMENT urefreplacement (#PCDATA | %Inline.phrase;)*>
-<!ELEMENT footnote (para)>
+<!ELEMENT footnote (%block;)*>
+<!ATTLIST footnote
+ %spacesattr;>
+
+<!-- deprecated -->
+
+<!ELEMENT ctrl (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT refill EMPTY>
+<!ELEMENT quote-arg EMPTY>
+<!ELEMENT allow-recursion EMPTY>
+<!-- index commands -->
+
+<!ENTITY % indexcmdattr
+ "%spacesattr;
+ index CDATA #IMPLIED">
+
+<!ELEMENT defindex EMPTY>
+<!ATTLIST defindex
+ %lineattr;
+ value NMTOKEN #REQUIRED>
+<!ELEMENT defcodeindex EMPTY>
+<!ATTLIST defcodeindex
+ %lineattr;
+ value NMTOKEN #REQUIRED>
+<!ELEMENT synindex EMPTY>
+<!ATTLIST synindex
+ %lineattr;
+ from NMTOKEN #REQUIRED
+ to NMTOKEN #REQUIRED>
+<!ELEMENT syncodeindex EMPTY>
+<!ATTLIST syncodeindex
+ %lineattr;
+ from NMTOKEN #REQUIRED
+ to NMTOKEN #REQUIRED>
+<!ELEMENT indexterm (#PCDATA | %Inline.line;)*>
+<!ATTLIST indexterm
+ index CDATA #IMPLIED
+ mergedindex CDATA #IMPLIED
+ number CDATA #REQUIRED
+ incode (%zeroone;) #IMPLIED>
+<!ELEMENT indexcommand (indexterm)>
+<!ATTLIST indexcommand
+ %indexcmdattr;
+ command CDATA #REQUIRED>
+<!ELEMENT cindex (indexterm)>
+<!ATTLIST cindex
+ %indexcmdattr;>
+<!ELEMENT findex (indexterm)>
+<!ATTLIST findex
+ %indexcmdattr;>
+<!ELEMENT kindex (indexterm)>
+<!ATTLIST kindex
+ %indexcmdattr;>
+<!ELEMENT pindex (indexterm)>
+<!ATTLIST pindex
+ %indexcmdattr;>
+<!ELEMENT tindex (indexterm)>
+<!ATTLIST tindex
+ %indexcmdattr;>
+<!ELEMENT vindex (indexterm)>
+<!ATTLIST vindex
+ %indexcmdattr;>
+<!ELEMENT printindex EMPTY>
+<!ATTLIST printindex
+ %lineattr;
+ value NMTOKEN #REQUIRED>
+
+<!-- misc -->
+
+<!ELEMENT bye EMPTY>
+
+<!-- space and accent commands -->
+<!ELEMENT spacecmd EMPTY>
+<!ATTLIST spacecmd
+ type (%spacetype;) #IMPLIED>
+<!ELEMENT accent (#PCDATA | accent | dotless)*>
+<!ATTLIST accent
+ %bracketedattr;
+ %spacesattr;
+ type CDATA #REQUIRED>
+<!ELEMENT dotless (#PCDATA)>
+<!ELEMENT click EMPTY>
+<!ATTLIST click
+ command CDATA #REQUIRED>
+<!ELEMENT today EMPTY>
+
+
+<!-- emacs-page
+ Punctuation and special symbols. -->
<!ELEMENT punct (#PCDATA)>
<!ATTLIST punct
end-of-sentence (yes|no) #IMPLIED>
<!ELEMENT logo (#PCDATA)>
<!ELEMENT linebreak EMPTY>
+<!ELEMENT noeos EMPTY>
+<!ELEMENT formfeed EMPTY>
<!ENTITY tex "<logo>TeX</logo>">
<!ENTITY latex "<logo>LaTeX</logo>">
@@ -394,28 +1264,55 @@
<!ENTITY pounds "&#xa3;">
<!ENTITY minus "&#x2212;">
<!ENTITY linebreak "<linebreak/>">
-<!ENTITY space " "> <!-- Should become an element. -->
<!ENTITY dots "<punct end-of-sentence='no'>&#x2026;</punct>">
<!ENTITY enddots "<punct end-of-sentence='yes'>&#x2026;</punct>">
<!ENTITY amp "&#x26;">
<!ENTITY lsquo "&#x2018;">
+<!ENTITY textlsquo "&#x2018;">
<!ENTITY rsquo "&#x2019;">
+<!ENTITY textrsquo "&#x2019;">
<!ENTITY sbquo "&#x201a;">
<!ENTITY ldquo "&#x201c;">
+<!ENTITY textldquo "&#x201c;">
<!ENTITY rdquo "&#x201d;">
+<!ENTITY textrdquo "&#x201d;">
<!ENTITY bdquo "&#x201e;">
<!ENTITY laquo "&#xab;">
<!ENTITY raquo "&#xbb;">
<!ENTITY lsaquo "&#x2039;">
<!ENTITY rsaquo "&#x203a;">
-<!ENTITY mdash "&#x2014;">
-<!ENTITY ndash "&#x2013;">
+<!ENTITY textmdash "&#x2014;">
+<!ENTITY textndash "&#x2013;">
+<!ENTITY formfeed "<formfeed/>">
+<!ENTITY attrformfeed "\f">
<!ENTITY period "<punct end-of-sentence='no'>.</punct>">
<!ENTITY eosperiod "<punct end-of-sentence='yes'>.</punct>">
<!ENTITY quest "<punct end-of-sentence='no'>?</punct>">
<!ENTITY eosquest "<punct end-of-sentence='yes'>?</punct>">
<!ENTITY excl "<punct end-of-sentence='no'>!</punct>">
<!ENTITY eosexcl "<punct end-of-sentence='yes'>!</punct>">
+<!ENTITY hyphenbreak "&#x00ad;">
+<!ENTITY slashbreak "/">
+<!ENTITY noeos "<noeos/>">
+<!ENTITY arobase "@">
+<!ENTITY lbrace "{">
+<!ENTITY rbrace "}">
+<!ENTITY comma ",">
+<!ENTITY atchar "@">
+<!ENTITY lbracechar "{">
+<!ENTITY rbracechar "}">
+<!ENTITY backslashchar "\\">
+<!ENTITY hashchar "#">
+<!ENTITY nbsp "&#xa0;">
+<!ENTITY deg "&#xb0;">
+<!ENTITY expansion "&#x2192;">
+<!ENTITY point "&#x2605;">
+<!ENTITY printglyph "&#x22a3;">
+<!ENTITY errorglyph "error--&gt;">
+<!ENTITY result "&#x21d2;">
+<!ENTITY le "&#x2264;">
+<!ENTITY ge "&#x2265;">
+<!ENTITY equiv "&#x2261;">
<!ENTITY auml "&#xe4;">
<!ENTITY ouml "&#xf6;">
@@ -478,6 +1375,15 @@
<!ENTITY oslash "&#xf8;">
<!ENTITY Oslash "&#xd8;">
+<!ENTITY lslash "&#x0142;">
+<!ENTITY Lslash "&#x0141;">
+
+<!ENTITY THORN "&#xde;">
+<!ENTITY thorn "&#xfe;">
+
+<!ENTITY eth "&#xf0;">
+<!ENTITY ETH "&#xd0;">
+
<!ENTITY ordm "&#xba;">
<!ENTITY ordf "&#xaa;">
@@ -497,11 +1403,4 @@
<!ENTITY macr "&#xaf;">
-
-<!-- fixxme: not yet classified -->
-
-<!ELEMENT sp (#PCDATA)>
-<!ATTLIST sp
- lines CDATA #IMPLIED>
-<!ELEMENT printindex (#PCDATA)>
-
+<!ENTITY backslash "\">
diff --git a/util/texinfo.xsl b/util/texinfo.xsl
deleted file mode 100644
index 5225517..0000000
--- a/util/texinfo.xsl
+++ /dev/null
@@ -1,242 +0,0 @@
-<?xml version='1.0'?>
-<!-- $Id: texinfo.xsl,v 1.1 2004/04/11 17:56:47 karl Exp $ -->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="1.0">
-
-<xsl:output method="html" indent="yes"/>
-
-<!-- root rule -->
-<xsl:template match="/">
- <html>
- <head><title>
- <xsl:apply-templates select="TEXINFO/SETTITLE" mode="head"/>
- </title></head>
- <body bgcolor="#FFFFFF"><xsl:apply-templates/>
-</body></html>
-</xsl:template>
-
-
-<xsl:template match="TEXINFO">
- <xsl:apply-templates/>
-</xsl:template>
-
-
-<xsl:template match="TEXINFO/SETFILENAME">
-</xsl:template>
-
-<xsl:template match="TEXINFO/SETTITLE" mode="head">
- <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="TEXINFO/SETTITLE">
- <h1><xsl:apply-templates/></h1>
-</xsl:template>
-
-
-<xsl:template match="TEXINFO/DIRCATEGORY">
-</xsl:template>
-
-<xsl:template match="//PARA">
- <p><xsl:apply-templates/></p>
-</xsl:template>
-
-<xsl:template match="//EMPH">
- <i><xsl:apply-templates/></i>
-</xsl:template>
-
-<!-- The node -->
-<xsl:template match="TEXINFO/NODE">
- <hr/>
- <p>
- <xsl:apply-templates select="NODENAME" mode="select"/>
- <xsl:apply-templates select="NODEPREV" mode="select"/>
- <xsl:apply-templates select="NODEUP" mode="select"/>
- <xsl:apply-templates select="NODENEXT" mode="select"/>
- <xsl:apply-templates/>
- <h2>Footnotes</h2>
- <ol>
- <xsl:apply-templates select=".//FOOTNOTE" mode="footnote"/>
- </ol>
- </p>
-</xsl:template>
-
-<xsl:template match="TEXINFO/NODE/NODENAME" mode="select">
-<h2>
- <a>
- <xsl:attribute name="name">
- <xsl:apply-templates/>
- </xsl:attribute>
- <xsl:apply-templates/>
- </a>
-</h2>
-</xsl:template>
-
-<xsl:template match="TEXINFO/NODE/NODENAME"/>
-
-
-<xsl:template match="TEXINFO/NODE/NODEPREV" mode="select">
- [ <b>Previous: </b>
- <a>
- <xsl:attribute name="href">
- <xsl:text>#</xsl:text>
- <xsl:apply-templates/>
- </xsl:attribute>
- <xsl:apply-templates/>
- </a> ]
-</xsl:template>
-
-<xsl:template match="TEXINFO/NODE/NODEPREV"/>
-
-<xsl:template match="TEXINFO/NODE/NODEUP" mode="select">
- [ <b>Up: </b>
- <a>
- <xsl:attribute name="href">
- <xsl:text>#</xsl:text>
- <xsl:apply-templates/>
- </xsl:attribute>
- <xsl:apply-templates/>
- </a> ]
-</xsl:template>
-
-<xsl:template match="TEXINFO/NODE/NODEUP"/>
-
-<xsl:template match="TEXINFO/NODE/NODENEXT" mode="select">
- [ <b>Next: </b>
- <a>
- <xsl:attribute name="href">
- <xsl:text>#</xsl:text>
- <xsl:apply-templates/>
- </xsl:attribute>
- <xsl:apply-templates/>
- </a> ]
-</xsl:template>
-
-<xsl:template match="TEXINFO/NODE/NODENEXT"/>
-
-<!-- Menu -->
-<xsl:template match="//MENU">
- <h3>Menu</h3>
- <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="//MENU/MENUENTRY">
- <a>
- <xsl:attribute name="href">
- <xsl:text>#</xsl:text>
- <xsl:apply-templates select="MENUNODE"/>
- </xsl:attribute>
- <xsl:apply-templates select="MENUTITLE"/>
- </a>:
- <xsl:apply-templates select="MENUCOMMENT"/>
- <br/>
-</xsl:template>
-
-<xsl:template match="//MENU/MENUENTRY/MENUNODE">
- <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="//MENU/MENUENTRY/MENUTITLE">
- <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="//MENU/MENUENTRY/MENUCOMMENT">
- <xsl:apply-templates mode="menucomment"/>
-</xsl:template>
-
-<xsl:template match="PARA" mode="menucomment">
- <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="//PARA">
- <p><xsl:apply-templates/></p>
-</xsl:template>
-
-<!-- LISTS -->
-<xsl:template match="//ITEMIZE">
- <ul>
- <xsl:apply-templates/>
- </ul>
-</xsl:template>
-
-<xsl:template match="//ITEMIZE/ITEM">
- <li>
- <xsl:apply-templates/>
- </li>
-</xsl:template>
-
-<xsl:template match="//ENUMERATE">
- <ol>
- <xsl:apply-templates/>
- </ol>
-</xsl:template>
-
-<xsl:template match="//ENUMERATE/ITEM">
- <li>
- <xsl:apply-templates/>
- </li>
-</xsl:template>
-
-<!-- INLINE -->
-<xsl:template match="//CODE">
- <tt>
- <xsl:apply-templates/>
- </tt>
-</xsl:template>
-
-<xsl:template match="//DFN">
- <i><b>
- <xsl:apply-templates/>
- </b></i>
-</xsl:template>
-
-<xsl:template match="//STRONG">
- <b>
- <xsl:apply-templates/>
- </b>
-</xsl:template>
-
-<xsl:template match="//CENTER">
- <center>
- <xsl:apply-templates/>
- </center>
-</xsl:template>
-
-<xsl:template match="//VAR">
- <i>
- <xsl:apply-templates/>
- </i>
-</xsl:template>
-
-<xsl:template match="//KBD">
- <tt>
- <xsl:apply-templates/>
- </tt>
-</xsl:template>
-
-<xsl:template match="//KEY">
- <b>
- <xsl:apply-templates/>
- </b>
-</xsl:template>
-
-<!-- BLOCKS -->
-<xsl:template match="//DISPLAY">
- <pre>
- <xsl:apply-templates/>
- </pre>
-</xsl:template>
-
-
-<!-- INDEX -->
-<xsl:template match="//INDEXTERM">
-</xsl:template>
-
-<!-- FOOTNOTE -->
-<xsl:template match="//FOOTNOTE">
-</xsl:template>
-
-<xsl:template match="//FOOTNOTE" mode="footnote">
- <li><xsl:apply-templates/></li>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/util/txixml2texi.pl b/util/txixml2texi.pl
new file mode 100755
index 0000000..fa3413c
--- /dev/null
+++ b/util/txixml2texi.pl
@@ -0,0 +1,452 @@
+#! /usr/bin/env perl
+#
+# texixml2texi -- convert Texinfo XML to Texinfo code
+#
+# Copyright 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License,
+# or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Original author: Patrice Dumas <pertusus@free.fr>
+
+use strict;
+use Getopt::Long qw(GetOptions);
+# for dirname.
+use File::Basename;
+use File::Spec;
+
+Getopt::Long::Configure("gnu_getopt");
+
+BEGIN
+{
+ # emulate -w
+ $^W = 1;
+ my ($real_command_name, $command_directory, $command_suffix)
+ = fileparse($0, '.pl');
+
+ my $datadir = '@datadir@';
+ my $package = '@PACKAGE@';
+ my $updir = File::Spec->updir();
+
+ my $texinfolibdir;
+ my $lib_dir;
+
+ # in-source run
+ if (($command_suffix eq '.pl' and !(defined($ENV{'TEXINFO_DEV_SOURCE'})
+ and $ENV{'TEXINFO_DEV_SOURCE'} eq 0)) or $ENV{'TEXINFO_DEV_SOURCE'}) {
+ my $srcdir = defined $ENV{'srcdir'} ? $ENV{'srcdir'} : $command_directory;
+ $texinfolibdir = File::Spec->catdir($srcdir, $updir, 'tp');
+ $lib_dir = File::Spec->catdir($texinfolibdir, 'maintain');
+ unshift @INC, $texinfolibdir;
+ } elsif ($datadir ne '@' .'datadir@' and $package ne '@' . 'PACKAGE@'
+ and $datadir ne '') {
+ $texinfolibdir = File::Spec->catdir($datadir, $package);
+ # try to make package relocatable, will only work if standard relative paths
+ # are used
+ if (! -f File::Spec->catfile($texinfolibdir, 'Texinfo', 'Parser.pm')
+ and -f File::Spec->catfile($command_directory, $updir, 'share',
+ 'texinfo', 'Texinfo', 'Parser.pm')) {
+ $texinfolibdir = File::Spec->catdir($command_directory, $updir,
+ 'share', 'texinfo');
+ }
+ $lib_dir = $texinfolibdir;
+ unshift @INC, $texinfolibdir;
+ }
+
+ # '@USE_EXTERNAL_LIBINTL @ and similar are substituted in the
+ # makefile using values from configure
+ if (defined($texinfolibdir)) {
+ if ('@USE_EXTERNAL_LIBINTL@' ne 'yes') {
+ unshift @INC, (File::Spec->catdir($lib_dir, 'lib', 'libintl-perl', 'lib'));
+ }
+ if ('@USE_EXTERNAL_EASTASIANWIDTH@' ne 'yes') {
+ unshift @INC, (File::Spec->catdir($lib_dir, 'lib', 'Unicode-EastAsianWidth', 'lib'));
+ }
+ if ('@USE_EXTERNAL_UNIDECODE@' ne 'yes') {
+ unshift @INC, (File::Spec->catdir($lib_dir, 'lib', 'Text-Unidecode', 'lib'));
+ }
+ }
+}
+
+use XML::LibXML::Reader;
+
+# gather information on Texinfo XML elements
+use Texinfo::Common;
+use Texinfo::Convert::TexinfoXML;
+
+my $debug = 0;
+my $result_options = Getopt::Long::GetOptions (
+ 'debug|d' => \$debug,
+);
+
+sub command_with_braces($)
+{
+ my $command = shift;
+ if ($command =~ /^[a-z]/i) {
+ return "\@".$command.'{}';
+ } else {
+ return "\@".$command;
+ }
+}
+
+my %ignored_elements = (
+ 'prepend' => 1,
+ 'formalarg' => 1,
+ # not ignored everytime
+ 'indexterm' => 1,
+);
+
+my %elements_end_attributes = (
+ 'accent' => 1,
+ 'menunode' => 1,
+ 'menutitle' => 1,
+);
+
+my %element_at_commands;
+my %entity_texts = (
+ 'textldquo' => '``',
+ 'textrdquo' => "''",
+ 'textmdash' => '---',
+ 'textndash' => '--',
+ 'textrsquo' => "'",
+ 'textlsquo' => '`',
+ 'formfeed' => "\f",
+ # this is not used in pratice, as attrformfeed appears in an
+ # attribute and thus is already expanded to text.
+ 'attrformfeed' => "\f",
+);
+
+foreach my $command (keys(%Texinfo::Convert::TexinfoXML::commands_formatting)) {
+ if (!ref($Texinfo::Convert::TexinfoXML::commands_formatting{$command})) {
+ $entity_texts{$Texinfo::Convert::TexinfoXML::commands_formatting{$command}}
+ = command_with_braces($command);
+ } else {
+ my $spec = $Texinfo::Convert::TexinfoXML::commands_formatting{$command};
+ my $element = $spec->[0];
+ if ($element eq 'spacecmd') {
+ if ($spec->[1] eq 'type') {
+ $element_at_commands{$element}->{"type"}->{$spec->[2]}
+ = command_with_braces($command);
+ } else {
+ die "BUG, bad spacecmd specification";
+ }
+ } else {
+ $element_at_commands{$element} = command_with_braces($command);
+ }
+ }
+}
+
+$element_at_commands{'accent'} = 0;
+
+my %arg_elements;
+foreach my $command (keys(%Texinfo::Convert::TexinfoXML::commands_args_elements)) {
+ my $arg_index = 0;
+ foreach my $element_argument (@{$Texinfo::Convert::TexinfoXML::commands_args_elements{$command}}) {
+ $arg_elements{$element_argument} = [$arg_index, $command];
+ $arg_index++;
+ }
+}
+
+my %accent_type_command;
+foreach my $accent_command (keys(%Texinfo::Convert::TexinfoXML::accent_types)) {
+ $accent_type_command{$Texinfo::Convert::TexinfoXML::accent_types{$accent_command}}
+ = $accent_command;
+}
+
+my %eat_space_elements;
+foreach my $element ('texinfo', 'filename') {
+ $eat_space_elements{$element} = 1;
+}
+
+my $infile = shift @ARGV;
+
+if (!defined($infile) or $infile !~ /\S/) {
+ die "Missing file\n";
+}
+
+my $reader = XML::LibXML::Reader->new('location' => $infile,
+ 'expand_entities' => 0,
+ )
+ or die "cannot read $infile\n";
+
+#(my $mydir = $0) =~ s,/[^/]*$,,; # dir we are in
+#my $txi_dtd_libdir = "$mydir"; # find tp relative to $0
+
+sub skip_until_end($$)
+{
+ my $reader = shift;
+ my $name = shift;
+ while ($reader->read) {
+ if ($reader->nodeType() eq XML_READER_TYPE_END_ELEMENT
+ and $reader->name eq $name) {
+ return;
+ }
+ }
+}
+
+my $eat_space = 0;
+my @commands_with_args_stack;
+
+while ($reader->read) {
+
+ # ============================================================ begin debug
+ if ($debug) {
+ printf STDERR "(args: @commands_with_args_stack) (eat_space $eat_space) %d %d %s %d", ($reader->depth,
+ $reader->nodeType,
+ $reader->name,
+ $reader->isEmptyElement);
+ my $value = '';
+ if ($reader->hasValue()) {
+ $value = $reader->value();
+ $value =~ s/\n/\\n/g;
+ print STDERR " |$value|";
+ }
+ if ($reader->nodeType() eq XML_READER_TYPE_ELEMENT
+ and $reader->hasAttributes()
+ and defined($reader->getAttribute('spaces'))) {
+ my $spaces = $reader->getAttribute('spaces');
+ print STDERR " spaces:$spaces|";
+ }
+ print STDERR "\n";
+ }
+ # ============================================================ end debug
+
+ if ($reader->nodeType() eq XML_READER_TYPE_SIGNIFICANT_WHITESPACE
+ and $eat_space) {
+ $eat_space = 0;
+ next;
+ } elsif ($reader->nodeType() eq XML_READER_TYPE_TEXT
+ or $reader->nodeType() eq XML_READER_TYPE_WHITESPACE
+ or $reader->nodeType() eq XML_READER_TYPE_SIGNIFICANT_WHITESPACE
+ ) {
+ if ($reader->hasValue()) {
+ print $reader->value();
+ }
+ }
+ my $name = $reader->name;
+ if ($reader->nodeType() eq XML_READER_TYPE_ELEMENT) {
+ if (($name eq 'entry' or $name eq 'indexcommand')
+ and $reader->hasAttributes()
+ and defined($reader->getAttribute('command'))) {
+ $name = $reader->getAttribute('command');
+ } elsif ($name eq 'listitem') {
+ $name = 'item';
+ }
+ if ($Texinfo::Convert::TexinfoXML::commands_args_elements{$name}) {
+ push @commands_with_args_stack, 0;
+ }
+ if (exists $element_at_commands{$name}) {
+ if ($name eq 'accent') {
+ if ($reader->hasAttributes()) {
+ if (defined($reader->getAttribute('type'))) {
+ my $command = $accent_type_command{$reader->getAttribute('type')};
+ print "\@$command"
+ if (defined($command));
+ }
+ if (!defined($reader->getAttribute('spaces'))
+ and !(defined($reader->getAttribute('bracketed'))
+ and $reader->getAttribute('bracketed') eq 'off')) {
+ print '{';
+ }
+ } else {
+ print '{';
+ }
+ } elsif (!ref($element_at_commands{$name})) {
+ print $element_at_commands{$name};
+ } else {
+ my ($attribute) = keys(%{$element_at_commands{$name}});
+ if ($reader->hasAttributes()
+ and defined($reader->getAttribute($attribute))) {
+ print
+ $element_at_commands{$name}->{$attribute}->{$reader->getAttribute($attribute)};
+ }
+ }
+ } elsif (exists($Texinfo::Common::brace_commands{$name})) {
+ print "\@${name}{";
+ if ($name eq 'verb' and $reader->hasAttributes()
+ and defined($reader->getAttribute('delimiter'))) {
+ print $reader->getAttribute('delimiter');
+ }
+ } elsif (exists($Texinfo::Common::block_commands{$name})) {
+ print "\@$name";
+ if ($name eq 'macro') {
+ if ($reader->hasAttributes() and defined($reader->getAttribute('line'))) {
+ print $reader->getAttribute('line');
+ }
+ print "\n";
+ }
+ } elsif (defined($Texinfo::Common::misc_commands{$name})) {
+ if ($reader->hasAttributes()
+ and defined($reader->getAttribute('originalcommand'))) {
+ $name = $reader->getAttribute('originalcommand');
+ }
+ if ($name eq 'documentencoding' and $reader->hasAttributes()
+ and defined($reader->getAttribute('encoding'))) {
+ my ($texinfo_encoding, $perl_encoding, $output_encoding)
+ = Texinfo::Encoding::encoding_alias($reader->getAttribute('encoding'));
+
+ if (defined($perl_encoding)) {
+ if ($debug) {
+ print STDERR "Using encoding $perl_encoding\n";
+ }
+ binmode(STDOUT, ":encoding($perl_encoding)");
+ }
+ }
+ print "\@$name";
+ if ($reader->hasAttributes() and defined($reader->getAttribute('line'))) {
+ my $line = $reader->getAttribute('line');
+ $line =~ s/\\\\/\x{1F}/g;
+ $line =~ s/\\f/\f/g;
+ $line =~ s/\x{1F}/\\/g;
+ print $line;
+ }
+ if ($name eq 'set' or $name eq 'clickstyle') {
+ skip_until_end($reader, $name);
+ }
+ } elsif ($arg_elements{$name}) {
+ if ($reader->hasAttributes()
+ and defined($reader->getAttribute('automatic'))
+ and $reader->getAttribute('automatic') eq 'on') {
+ skip_until_end($reader, $name);
+ next;
+ }
+ while ($arg_elements{$name}->[0]
+ and $commands_with_args_stack[-1] < $arg_elements{$name}->[0]) {
+ $commands_with_args_stack[-1]++;
+ print ',';
+ }
+ } elsif ($ignored_elements{$name}) {
+ my $keep_indexterm = 0;
+ if ($name eq 'indexterm') {
+ my $node_path = $reader->nodePath();
+ if ($node_path =~ m:([a-z]+)/indexterm$:) {
+ my $parent = $1;
+ if ($parent =~ /^[a-z]?[a-z]index$/ or $parent eq 'indexcommand') {
+ $keep_indexterm = 1;
+ }
+ }
+ }
+ if (!$keep_indexterm) {
+ skip_until_end($reader, $name);
+ next;
+ }
+ } elsif ($name eq 'formattingcommand') {
+ if ($reader->hasAttributes()
+ and defined($reader->getAttribute('command'))) {
+ print '@'.$reader->getAttribute('command');
+ }
+ # def* automatic
+ } elsif ($reader->hasAttributes()
+ and defined($reader->getAttribute('automatic'))
+ and $reader->getAttribute('automatic') eq 'on') {
+ skip_until_end($reader, $name);
+ # eat the following space
+ $reader->read();
+ } elsif ($eat_space_elements{$name}) {
+ $eat_space = 1;
+ } else {
+ print STDERR "UNKNOWN $name\n" if ($debug);
+ }
+ if ($reader->hasAttributes()) {
+ if (defined($reader->getAttribute('bracketed'))
+ and $reader->getAttribute('bracketed') eq 'on') {
+ print '{';
+ }
+ if (defined($reader->getAttribute('spaces'))) {
+ my $spaces = $reader->getAttribute('spaces');
+ $spaces =~ s/\\n/\n/g;
+ $spaces =~ s/\\f/\f/g;
+ print $spaces;
+ }
+ if (defined($reader->getAttribute('leadingtext'))) {
+ print $reader->getAttribute('leadingtext');
+ }
+ }
+ if ($Texinfo::Common::item_line_commands{$name}
+ and $reader->hasAttributes()
+ and defined($reader->getAttribute('commandarg'))) {
+ print '@'.$reader->getAttribute('commandarg');
+ }
+ } elsif ($reader->nodeType() eq XML_READER_TYPE_END_ELEMENT) {
+ if ($Texinfo::Convert::TexinfoXML::commands_args_elements{$name}) {
+ pop @commands_with_args_stack;
+ }
+ if ($reader->hasAttributes()) {
+ if (defined($reader->getAttribute('bracketed'))
+ and $reader->getAttribute('bracketed') eq 'on') {
+ print '}';
+ }
+ }
+ if (exists ($Texinfo::Common::brace_commands{$name})) {
+ if ($name eq 'verb' and $reader->hasAttributes()
+ and defined($reader->getAttribute('delimiter'))) {
+ print $reader->getAttribute('delimiter');
+ }
+ print '}';
+ } elsif (exists($Texinfo::Common::block_commands{$name})) {
+ my $end_spaces;
+ if ($reader->hasAttributes()
+ and defined($reader->getAttribute('endspaces'))) {
+ $end_spaces = $reader->getAttribute('endspaces');
+ }
+ $end_spaces = ' ' if (!defined($end_spaces) or $end_spaces eq '');
+ print "\@end".$end_spaces."$name";
+ } elsif (defined($Texinfo::Common::misc_commands{$name})) {
+ if ($Texinfo::Common::root_commands{$name} and $name ne 'node') {
+ $eat_space = 1;
+ }
+ } elsif ($elements_end_attributes{$name}) {
+ if ($name eq 'accent') {
+ if ($reader->hasAttributes()) {
+ if (!defined($reader->getAttribute('spaces'))
+ and !(defined($reader->getAttribute('bracketed'))
+ and $reader->getAttribute('bracketed') eq 'off')) {
+ print '}';
+ }
+ } else {
+ print '}';
+ }
+ } elsif ($reader->hasAttributes()
+ and defined($reader->getAttribute('separator'))) {
+ print $reader->getAttribute('separator');
+ }
+ } elsif ($eat_space_elements{$name}) {
+ $eat_space = 1;
+ } else {
+ print STDERR "END UNKNOWN $name\n" if ($debug);
+ }
+ if ($reader->hasAttributes()
+ and defined($reader->getAttribute('trailingspaces'))) {
+ my $trailingspaces = $reader->getAttribute('trailingspaces');
+ $trailingspaces =~ s/\\f/\f/g;
+ print $trailingspaces;
+ }
+ } elsif ($reader->nodeType() eq XML_READER_TYPE_ENTITY_REFERENCE) {
+ if (defined($entity_texts{$name})) {
+ print $entity_texts{$name};
+ }
+ } elsif ($reader->nodeType() eq XML_READER_TYPE_COMMENT) {
+ my $comment;
+ if ($reader->hasValue()) {
+ $comment = $reader->value();
+ $comment =~ s/^ (comment|c)//;
+ my $command = $1;
+ $comment =~ s/ $//;
+ print "\@${command}$comment";
+ }
+ } elsif ($reader->nodeType() eq XML_READER_TYPE_DOCUMENT_TYPE) {
+ $eat_space = 1;
+ }
+}
+
+1;