summaryrefslogtreecommitdiff
path: root/Build/source/utils/xindy-old/rte
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/utils/xindy-old/rte')
-rw-r--r--Build/source/utils/xindy-old/rte/Makefile.am49
-rw-r--r--Build/source/utils/xindy-old/rte/Makefile.in562
-rw-r--r--Build/source/utils/xindy-old/rte/NEWS16
-rw-r--r--Build/source/utils/xindy-old/rte/README31
-rw-r--r--Build/source/utils/xindy-old/rte/ordrules/Makefile.am46
-rw-r--r--Build/source/utils/xindy-old/rte/ordrules/Makefile.in361
-rw-r--r--Build/source/utils/xindy-old/rte/ordrules/debug.h166
-rwxr-xr-xBuild/source/utils/xindy-old/rte/ordrules/link.sh12
-rw-r--r--Build/source/utils/xindy-old/rte/ordrules/mkind.h67
-rw-r--r--Build/source/utils/xindy-old/rte/ordrules/ordrulei.lsp111
-rw-r--r--Build/source/utils/xindy-old/rte/ordrules/ordrules.c733
-rw-r--r--Build/source/utils/xindy-old/rte/ordrules/ordrules.h211
-rw-r--r--Build/source/utils/xindy-old/rte/ordrules/rxsub.c173
-rw-r--r--Build/source/utils/xindy-old/rte/ordrules/rxsub.h102
-rw-r--r--Build/source/utils/xindy-old/rte/ordrules/version.lisp.in13
15 files changed, 2653 insertions, 0 deletions
diff --git a/Build/source/utils/xindy-old/rte/Makefile.am b/Build/source/utils/xindy-old/rte/Makefile.am
new file mode 100644
index 00000000000..3b6b112c88f
--- /dev/null
+++ b/Build/source/utils/xindy-old/rte/Makefile.am
@@ -0,0 +1,49 @@
+## Use `autoreconf' in top-level directory to recreate all
+## autoconf/automake files.
+## Or, call `automake Makefile' to create only Makefile.in.
+
+## Copyright (C) 2004-2005 by Gour.
+## Copyright (C) 2006-2007 by Jörg Sommer.
+## Copyright (C) 2008 by Joachim Schrod.
+##
+## 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 2 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 in the file COPYING; if not, write to the
+## Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+## Boston, MA 02110-1301 USA.
+
+SUBDIRS = ordrules
+EXTRA_DIST = NEWS README
+
+ORDRULES_FILES = ordrules.c ordrules.h rxsub.c rxsub.h mkind.h debug.h link.sh
+binariesdir = ../binaries
+
+all-local: $(binariesdir)/$(XINDY_RUN) $(binariesdir)/base.mem
+
+# Serialize to allow parallel builds
+#
+$(binariesdir)/base.mem: $(binariesdir)/$(XINDY_RUN)
+ cp xindy-build-dir/lispinit.mem $(binariesdir)/base.mem
+# The clisp-link command 'add-module-set' of Versions <=2.47
+# has been replaced by 'add' in Version 2.48 (different args!).
+$(binariesdir)/$(XINDY_RUN):
+ rm -rf xindy-build-dir
+ test -f ordrules/link.sh || for i in $(ORDRULES_FILES); do cp -p $(top_srcdir)/rte/ordrules/$$i ordrules/$$i; done
+ $(MAKE) -C ordrules ordrulei.c
+ env CLISP_LINKKIT='$(CLISP_LIB)/linkkit' MAKE="$(MAKE)" \
+ sh '$(CLISP_LIB)/clisp-link' add-module-set ordrules '$(CLISP_LIB)/full' xindy-build-dir || \
+ sh '$(CLISP_LIB)/clisp-link' add '$(CLISP_LIB)/full' xindy-build-dir ordrules
+ $(INSTALL_STRIP_PROGRAM) xindy-build-dir/$(LISP_RUN) $(binariesdir)/$(XINDY_RUN)
+
+clean-local:
+ rm -rf xindy-build-dir
+ test "$(builddir)" = "$(srcdir)" || for i in $(ORDRULES_FILES); do rm -f ordrules/$$i; done
diff --git a/Build/source/utils/xindy-old/rte/Makefile.in b/Build/source/utils/xindy-old/rte/Makefile.in
new file mode 100644
index 00000000000..ce3b7292e58
--- /dev/null
+++ b/Build/source/utils/xindy-old/rte/Makefile.in
@@ -0,0 +1,562 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.
+
+# 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.
+
+@SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = rte
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in NEWS
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/tl_msg_error.m4 \
+ $(top_srcdir)/ac/xindy.ac $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CLISP = @CLISP@
+CLISP_LIB = @CLISP_LIB@
+CONVERT_FROM_UTF8 = @CONVERT_FROM_UTF8@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LATEX = @LATEX@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LISP_RUN = @LISP_RUN@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PDFLATEX = @PDFLATEX@
+PERL = @PERL@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+XINDY_RUN = @XINDY_RUN@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = ordrules
+EXTRA_DIST = NEWS README
+ORDRULES_FILES = ordrules.c ordrules.h rxsub.c rxsub.h mkind.h debug.h link.sh
+binariesdir = ../binaries
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign rte/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign rte/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(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)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ 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; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ 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: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ 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)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ 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 -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile all-local
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+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
+mostlyclean-generic:
+
+clean-generic:
+
+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)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-local mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+ install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am all-local check check-am clean clean-generic \
+ clean-local ctags ctags-recursive distclean distclean-generic \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
+ tags-recursive uninstall uninstall-am
+
+
+all-local: $(binariesdir)/$(XINDY_RUN) $(binariesdir)/base.mem
+
+# Serialize to allow parallel builds
+#
+$(binariesdir)/base.mem: $(binariesdir)/$(XINDY_RUN)
+ cp xindy-build-dir/lispinit.mem $(binariesdir)/base.mem
+# The clisp-link command 'add-module-set' of Versions <=2.47
+# has been replaced by 'add' in Version 2.48 (different args!).
+$(binariesdir)/$(XINDY_RUN):
+ rm -rf xindy-build-dir
+ test -f ordrules/link.sh || for i in $(ORDRULES_FILES); do cp -p $(top_srcdir)/rte/ordrules/$$i ordrules/$$i; done
+ $(MAKE) -C ordrules ordrulei.c
+ env CLISP_LINKKIT='$(CLISP_LIB)/linkkit' MAKE="$(MAKE)" \
+ sh '$(CLISP_LIB)/clisp-link' add-module-set ordrules '$(CLISP_LIB)/full' xindy-build-dir || \
+ sh '$(CLISP_LIB)/clisp-link' add '$(CLISP_LIB)/full' xindy-build-dir ordrules
+ $(INSTALL_STRIP_PROGRAM) xindy-build-dir/$(LISP_RUN) $(binariesdir)/$(XINDY_RUN)
+
+clean-local:
+ rm -rf xindy-build-dir
+ test "$(builddir)" = "$(srcdir)" || for i in $(ORDRULES_FILES); do rm -f ordrules/$$i; done
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Build/source/utils/xindy-old/rte/NEWS b/Build/source/utils/xindy-old/rte/NEWS
new file mode 100644
index 00000000000..d5ab36e69ca
--- /dev/null
+++ b/Build/source/utils/xindy-old/rte/NEWS
@@ -0,0 +1,16 @@
+# $Id: NEWS,v 1.3 2008/01/09 11:35:06 jschrod Exp $
+#------------------------------------------------------------
+
+
+XINDY RUN TIME ENVIRONMENT RELEASE NOTES
+========================================
+
+
+Version Date Remarks
+
+2.3 2008-01-09 Release 2.3
+ Updated to CLISP 2.43; this can be compiled with gcc 4.
+
+2.2 2005-06-14 Release 2.2, `LaTeX Companion Release'.
+ ordrules module ported to current CLISP.
+ Created "configure ; make ; make install" installation.
diff --git a/Build/source/utils/xindy-old/rte/README b/Build/source/utils/xindy-old/rte/README
new file mode 100644
index 00000000000..32c827cb2de
--- /dev/null
+++ b/Build/source/utils/xindy-old/rte/README
@@ -0,0 +1,31 @@
+
+This is the source distribution of the xindy run time environment.
+It consists of CLISP (see http://clisp.cons.org/) and the
+xindy-specific CLISP module ordrules.
+
+Release notes are available in the file NEWS, in this directory.
+
+
+LEGALESE
+--------
+
+This package is freely distributable software; you can redistribute it
+and/or modify it under the terms of the GNU General Public License
+(GPL) as published by the Free Software Foundation.
+
+This package contains CLISP which is released under GPL, version 2
+(only). Please refer to clisp-<version>/COPYRIGHT for the formal
+statement.
+
+The xindy-specific parts of this package, i.e., everything outside the
+clisp-<version>/ directory, are release under GPL version 2 or any
+later version.
+
+This software 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 in
+the file COPYING along with this package; if not, write to the Free
+Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
diff --git a/Build/source/utils/xindy-old/rte/ordrules/Makefile.am b/Build/source/utils/xindy-old/rte/ordrules/Makefile.am
new file mode 100644
index 00000000000..2293cb16edc
--- /dev/null
+++ b/Build/source/utils/xindy-old/rte/ordrules/Makefile.am
@@ -0,0 +1,46 @@
+## Use `autoreconf' in top-level directory to recreate all
+## autoconf/automake files.
+## Or, call `automake Makefile' to create only Makefile.in.
+
+# Makefile for xindy
+
+## Copyright (C) 2004-2005 by Gour.
+## Copyright (C) 2008 by Joachim Schrod.
+##
+## 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 2 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 in the file COPYING; if not, write to the
+## Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+## Boston, MA 02110-1301 USA.
+
+INCLUDES=
+
+ordrulei.c: $(srcdir)/ordrulei.lsp
+ $(CLISP) -q -norc -c $(srcdir)/ordrulei.lsp -o ordrulei.fas
+
+ordrulei.o: ordrulei.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -I$(INCLUDES) -c ordrulei.c
+
+ordrules.o: ordrules.c ordrules.h rxsub.h debug.h mkind.h
+ $(CC) $(CFLAGS) $(CPPFLAGS) -I$(INCLUDES) -funsigned-char -I. -c ordrules.c
+
+rxsub.o: rxsub.c rxsub.h mkind.h
+ $(CC) $(CFLAGS) $(CPPFLAGS) -I. -c rxsub.c
+
+# Make a module
+clisp-module: ordrulei.o ordrules.o rxsub.o
+
+EXTRA_DIST = ordrulei.lsp ordrules.c ordrules.h rxsub.c rxsub.h mkind.h debug.h link.sh
+
+CLEANFILES = ordrulei.c ordrulei.fas ordrulei.lib ordrulei.o ordrules.o rxsub.o
+
+DISTCLEANFILES = version.lisp
diff --git a/Build/source/utils/xindy-old/rte/ordrules/Makefile.in b/Build/source/utils/xindy-old/rte/ordrules/Makefile.in
new file mode 100644
index 00000000000..2c8d4c90b39
--- /dev/null
+++ b/Build/source/utils/xindy-old/rte/ordrules/Makefile.in
@@ -0,0 +1,361 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.
+
+# 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.
+
+@SET_MAKE@
+
+# Makefile for xindy
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = rte/ordrules
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/version.lisp.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/tl_msg_error.m4 \
+ $(top_srcdir)/ac/xindy.ac $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES = version.lisp
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CLISP = @CLISP@
+CLISP_LIB = @CLISP_LIB@
+CONVERT_FROM_UTF8 = @CONVERT_FROM_UTF8@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LATEX = @LATEX@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LISP_RUN = @LISP_RUN@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PDFLATEX = @PDFLATEX@
+PERL = @PERL@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+XINDY_RUN = @XINDY_RUN@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+INCLUDES =
+EXTRA_DIST = ordrulei.lsp ordrules.c ordrules.h rxsub.c rxsub.h mkind.h debug.h link.sh
+CLEANFILES = ordrulei.c ordrulei.fas ordrulei.lib ordrulei.o ordrules.o rxsub.o
+DISTCLEANFILES = version.lisp
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign rte/ordrules/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign rte/ordrules/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(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)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+version.lisp: $(top_builddir)/config.status $(srcdir)/version.lisp.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ 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 -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-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
+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."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+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
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am
+
+
+ordrulei.c: $(srcdir)/ordrulei.lsp
+ $(CLISP) -q -norc -c $(srcdir)/ordrulei.lsp -o ordrulei.fas
+
+ordrulei.o: ordrulei.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -I$(INCLUDES) -c ordrulei.c
+
+ordrules.o: ordrules.c ordrules.h rxsub.h debug.h mkind.h
+ $(CC) $(CFLAGS) $(CPPFLAGS) -I$(INCLUDES) -funsigned-char -I. -c ordrules.c
+
+rxsub.o: rxsub.c rxsub.h mkind.h
+ $(CC) $(CFLAGS) $(CPPFLAGS) -I. -c rxsub.c
+
+# Make a module
+clisp-module: ordrulei.o ordrules.o rxsub.o
+
+# 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/Build/source/utils/xindy-old/rte/ordrules/debug.h b/Build/source/utils/xindy-old/rte/ordrules/debug.h
new file mode 100644
index 00000000000..6c59927d61a
--- /dev/null
+++ b/Build/source/utils/xindy-old/rte/ordrules/debug.h
@@ -0,0 +1,166 @@
+/* $Id: debug.h,v 1.3 2005/05/02 21:39:53 jschrod Exp $
+ *------------------------------------------------------------
+ *
+ * AU: Makros zur Unterstuetzung von Debug-Ausgaben
+ * with friendly permission by U. Graef
+ *
+ * ST: Um die Macros zu definieren:
+ * #define debug
+ * #include "debug.h"
+ * Im Hauptprogramm bzw. Tester mu"s dann noch debug.o dazugebunden
+ * werden, um die externe Variable Debug_Output_Indent zur Verf"ugung
+ * zu stellen.
+ * Um im Modul die Macros zu deaktivieren:
+ * #undef debug
+ * #include "debug.h"
+ *
+ * PO: HPUX, Linux, AIX
+ */
+
+
+#ifndef _debug_h
+#define _debug_h
+
+/*
+ * Beim ersten include werden folgende Deklarationen defininert:
+ *
+ * Die globale Variable f"ur die Einr"uckung wird definiert.
+ */
+extern
+int Debug_Output_Indent;
+
+#ifdef debug_special
+/*
+ * Die Funktion f"ur den Memory-Print wird definiert
+ */
+extern
+void debug_printmem_asc( char* desc, char* str, char* lenname, int len );
+#endif /* debug_special */
+
+#define Debug_Output_Indent_Step 4
+
+#endif /* _debug_h */
+
+
+/*
+ * Falls die Macros bereits definiert waren, dann werden sie jetzt
+ * zuerst wegdefiniert. Damit kann man "debug.h" benutzen um die Macros
+ * zu (de-)aktivieren.
+ */
+
+#ifdef dispstart
+
+#undef dispstart
+#undef dispend
+#undef displong
+#undef dispint
+#undef dispuint
+#undef dispdouble
+#undef dispchar
+#undef dispstr
+#undef dispmem
+#undef dispmsg
+
+#endif
+
+/*
+ * Hier werden die Macros wieder definert bzw. erstmals definiert
+ */
+#ifdef debug
+
+/* Start und Ende von Prozeduren */
+
+#define dispstart(p) \
+ { \
+ fprintf( stderr, "\n%*s%s: Start -----\n", \
+ Debug_Output_Indent, "", #p ); \
+ Debug_Output_Indent += Debug_Output_Indent_Step; \
+ }
+
+#define dispend(p) \
+ { \
+ Debug_Output_Indent -= Debug_Output_Indent_Step; \
+ fprintf( stderr, "%*s%s: End -----\n\n", \
+ Debug_Output_Indent, "", #p ); \
+ }
+
+
+/* Ausgabe von Werten verschiedenen Typs */
+/* (mit Ausgabe der Variablen bzw. des Ausdrucks) */
+
+
+#define displong(l) \
+ fprintf( stderr, "%*s%s = %ld = 0x%lX \n",\
+ Debug_Output_Indent, "", #l, (long) l, (long) l );
+
+
+#define dispint(i) \
+ fprintf( stderr, "%*s%s = %d = 0x%X \n", \
+ Debug_Output_Indent, "", #i, (int) i, (int) i );
+
+#define dispuint(i) \
+ fprintf( stderr, "%*s%s = %d = 0x%X \n", \
+ Debug_Output_Indent, "", #i, (unsigned int) i, (unsigned int) i );
+
+#define dispdouble(d) \
+ fprintf( stderr, "%*s%s = %20.10g \n",\
+ Debug_Output_Indent, "", #d, (double) d );
+
+#define dispchar(c) \
+ fprintf( stderr, "%*s%s = %d = 0x%X = '%c' \n", \
+ Debug_Output_Indent, "", #c, (char) c, \
+ (char) c, (char) c );
+
+#define dispstr(s) \
+ fprintf( stderr, "%*s%s = \"%s\"\n", \
+ Debug_Output_Indent, "", #s, (char*) s );
+
+#ifdef debug_special
+#define dispmem(str,len) \
+ debug_printmem_asc( (char*)#str, (char*)str, (char*)#len, (int) len );
+#endif /* debug_special */
+
+#define dispmsg(p) \
+ { \
+ fprintf( stderr, "%*s%s:\n", Debug_Output_Indent, "", #p ); \
+ }
+
+#else /* debug */
+
+/*
+ * Falls kein weiteres Debugging erw"unscht, dann definiere die
+ * Macros auf leer.
+ */
+#define dispstart(p)
+#define dispend(p)
+#define displong(l)
+#define dispint(i)
+#define dispuint(i)
+#define dispdouble(d)
+#define dispchar(c)
+#define dispstr(s)
+#define dispmem(str,len)
+#define dispmsg(p)
+
+#endif /* debug */
+
+
+/*======================================================================
+ *
+ * $Log: debug.h,v $
+ * Revision 1.3 2005/05/02 21:39:53 jschrod
+ * xindy run time engine 3.0; as used for CLISP 2.33.2.
+ *
+ * Revision 1.2 1996/07/18 15:56:38 kehr
+ * Checkin after all changes that resulted from the define-letter-group
+ * modification were finished. Additionally I found an ugly bug in the
+ * ordrules.c file that was discovered when running the system under
+ * Solaris (which seems to have signed chars..Whee!). This is fixed now
+ * and the Imakefiles and that stuff was improved, too.
+ *
+ * Revision 1.1 1996/03/27 20:29:03 kehr
+ * It works. Today I had my first success in getting the FFI running with
+ * the ordrules-library. The interface is defined in `ordrulei.lsp' and
+ * allows direct access to the functions in `ordrules.c'.
+ *
+ */
diff --git a/Build/source/utils/xindy-old/rte/ordrules/link.sh b/Build/source/utils/xindy-old/rte/ordrules/link.sh
new file mode 100755
index 00000000000..ce63f387501
--- /dev/null
+++ b/Build/source/utils/xindy-old/rte/ordrules/link.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+file_list=''
+mod_list=''
+if test -r ordrulei.c; then
+ file_list="$file_list"' ordrulei.o'
+ mod_list="$mod_list"' ordrulei'
+fi
+${MAKE-make} clisp-module CC="${CC}" CFLAGS="${CFLAGS}" INCLUDES="$absolute_linkkitdir"
+NEW_FILES="$file_list ordrules.o rxsub.o"
+NEW_LIBS="$file_list ordrules.o rxsub.o"
+NEW_MODULES="$mod_list"
+TO_LOAD='ordrulei version'
diff --git a/Build/source/utils/xindy-old/rte/ordrules/mkind.h b/Build/source/utils/xindy-old/rte/ordrules/mkind.h
new file mode 100644
index 00000000000..2defd7077fa
--- /dev/null
+++ b/Build/source/utils/xindy-old/rte/ordrules/mkind.h
@@ -0,0 +1,67 @@
+/*
+ $Id: mkind.h,v 1.2 1999/07/30 08:35:38 kehr Exp $
+
+ This is the minimum excerpt form the original `mkind.h' of the
+ makeindex-3 system making the modified version of ordrules compile.
+
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#ifndef _MKIND_H
+#define _MKIND_H
+
+#ifndef PROTO
+#define PROTO( x ) x
+#endif
+
+#if ANSI_PROTOTYPES
+#define ARGS(arg_list) arg_list
+#define VOIDP void*
+#else
+#define ARGS(arg_list) ()
+#define const
+#define VOIDP char*
+#endif
+
+#define SIZE_T unsigned
+
+#undef TRUE
+#define TRUE 1
+
+#undef FALSE
+#define FALSE 0
+
+#ifndef STRING_MAX
+/* T. Henlich reported a bug that was caused by the 128Byte limit
+ here, which was too small for his applications. Stupid thing,
+ really took me 1.5 hours to find it ;-(
+*/
+
+#define STRING_MAX 1024 /* 128 */
+#endif
+
+#define BSH '\\'
+
+#undef NUL
+#define NUL '\0'
+
+extern VOIDP fmalloc ARGS((SIZE_T size));
+
+#endif /* _MKIND_H */
+
+
+/*
+ $Log: mkind.h,v $
+ Revision 1.2 1999/07/30 08:35:38 kehr
+ Lifted length of STRING_MAX to 4096. Caused bugs in Linux as reported
+ by T. Henlich.
+
+ Revision 1.1 1996/03/27 20:29:05 kehr
+ It works. Today I had my first success in getting the FFI running with
+ the ordrules-library. The interface is defined in `ordrulei.lsp' and
+ allows direct access to the functions in `ordrules.c'.
+
+
+ */
diff --git a/Build/source/utils/xindy-old/rte/ordrules/ordrulei.lsp b/Build/source/utils/xindy-old/rte/ordrules/ordrulei.lsp
new file mode 100644
index 00000000000..c18294c2670
--- /dev/null
+++ b/Build/source/utils/xindy-old/rte/ordrules/ordrulei.lsp
@@ -0,0 +1,111 @@
+;; $Id: ordrulei.lsp,v 1.5 2005/05/02 21:39:53 jschrod Exp $
+;; ------------------------------------------------------------
+
+;;;
+;;; Interface definition of the ordrules module
+;;;
+
+(defpackage :ordrules
+ (:use :cl :ffi)
+ (:export :initialize
+ :add-keyword-sort-rule :add-keyword-merge-rule
+ :gen-keyword-sortkey :gen-keyword-mergekey))
+
+(in-package :ordrules)
+
+(c-lines "#include \"ordrules.h\"~%")
+
+; Common OS definitions:
+(def-c-type size_t uint)
+
+(def-c-var *string-buffer*
+ (:name "ordrules_string_buffer")
+ (:type (c-array char 1024))
+ (:alloc :NONE))
+
+(def-c-var *string-buffer-used-bytes*
+ (:name "ordrules_string_buffer_used_bytes")
+ (:type int)
+ (:alloc :NONE))
+
+(def-c-var *string-buffer-used-bytes*
+ (:name "ordrules_string_buffer_used_bytes")
+ (:type int)
+ (:alloc :NONE))
+
+(def-c-var *message-logging*
+ (:name "ordrules_msg_logging")
+ (:type int)
+ (:alloc :NONE))
+
+(def-c-var *message-buffer*
+ (:name "ordrules_msg_buffer")
+ (:type c-string)
+ (:alloc :NONE))
+
+(def-c-var *message-buffer-ptr*
+ (:name "ordrules_msg_buffer_ptr")
+ (:type int)
+ (:alloc :NONE))
+
+(def-call-out initialize
+ (:language :stdc)
+ (:name "initialize")
+ (:arguments (num-sort-tables int))
+ (:return-type int))
+
+(def-call-out add-keyword-sort-rule
+ (:language :stdc)
+ (:name "add_sort_rule")
+ (:arguments (run int)
+ (left c-string)
+ (right c-string)
+ (isreject int)
+ (ruletype int))
+ (:return-type int))
+
+(def-call-out add-keyword-merge-rule
+ (:language :stdc)
+ (:name "add_merge_rule")
+ (:arguments (left c-string)
+ (right c-string)
+ (isreject int)
+ (ruletype int))
+ (:return-type int))
+
+(def-call-out gen-keyword-sortkey
+ (:language :stdc)
+ (:name "gen_sortkey")
+ (:arguments (key c-string)
+ (run int))
+ (:return-type c-string :malloc-free))
+
+(def-call-out gen-keyword-mergekey
+ (:language :stdc)
+ (:name "gen_mergekey")
+ (:arguments (key c-string))
+ (:return-type c-string :malloc-free))
+
+#|
+
+ $Log: ordrulei.lsp,v $
+ Revision 1.5 2005/05/02 21:39:53 jschrod
+ xindy run time engine 3.0; as used for CLISP 2.33.2.
+
+ Revision 1.4 1997/10/20 11:23:12 kehr
+ New version of sorting rules. Sorting of more complex indexes (i.e.
+ French) is now possible.
+
+ Revision 1.3 1997/01/17 16:43:38 kehr
+ Several changes for new version 1.1.
+
+ Revision 1.2 1996/04/30 15:56:38 kehr
+ Renamed some of the functions to avoid conflicts with other functions
+ in other packages (only for the sake of convenience).
+
+ Revision 1.1 1996/03/27 20:29:07 kehr
+ It works. Today I had my first success in getting the FFI running with
+ the ordrules-library. The interface is defined in `ordrulei.lsp' and
+ allows direct access to the functions in `ordrules.c'.
+
+|#
diff --git a/Build/source/utils/xindy-old/rte/ordrules/ordrules.c b/Build/source/utils/xindy-old/rte/ordrules/ordrules.c
new file mode 100644
index 00000000000..fae3e936d80
--- /dev/null
+++ b/Build/source/utils/xindy-old/rte/ordrules/ordrules.c
@@ -0,0 +1,733 @@
+/* $Id: ordrules.c,v 1.9 2008/01/09 11:33:44 jschrod Exp $
+ *----------------------------------------------------------------------
+ *
+ * Ordering Rules for Strings
+ *
+ * [history at end]
+ */
+
+#include "ordrules.h"
+#include "rxsub.h"
+
+#include <string.h>
+
+/* switch on debugging by excluding the undef directive. */
+#define debug
+#undef debug /* */
+#include "debug.h"
+
+#ifdef debug
+#define DEBUG
+#endif
+
+RULE_TABLE* SortRules; /* rules for generating sortkeys */
+
+RULE_TABLE MergeRules; /* rules for generating mergekeys */
+GROUP_LIST GroupList; /* list of character groups */
+GROUP_LIST HeadingList; /* list of group headings */
+
+/* The following rule-types can be set by the user: */
+#define RT_AUTOMATIC 0
+#define RT_STRING 1
+#define RT_REGEXP_BASIC 2
+#define RT_REGEXP_EXTENDED 3
+#define RT_CHAR 4
+
+static RULE_TYPE get_ruletype PROTO(( char *lside, char *rside ));
+static int is_regexp PROTO(( char *s ));
+static int is_CHR_RULE PROTO(( char *s, char *r ));
+
+char ordrules_string_buffer [BUFLEN];
+int ordrules_string_buffer_used_bytes = 0;
+
+ int ordrules_msg_logging = 0;
+ char* ordrules_msg_buffer = 0;
+ int ordrules_msg_buffer_ptr = 0;
+static size_t ordrules_msg_buffer_len = BUFLEN;
+static size_t ordrules_msg_buffer_avail = 0;
+static int ordrules_sort_rule_tables = 0;
+
+#define DEFAULT_SORT_RULE_TABLES 8
+
+#define DBG( expr ) if (ordrules_msg_logging!=0) { expr; }
+
+
+static void
+logs( msg )
+char* msg;
+{
+ size_t msglen = strlen( msg );
+
+ if (NULL == ordrules_msg_buffer) {
+ ordrules_msg_buffer = (char*) malloc (ordrules_msg_buffer_len);
+ ordrules_msg_buffer_avail = ordrules_msg_buffer_len - 1;
+ ordrules_msg_buffer_ptr = 0;
+ }
+ if (msglen > ordrules_msg_buffer_avail) {
+ ordrules_msg_buffer_len *= 2;
+ ordrules_msg_buffer = (char*) realloc (ordrules_msg_buffer,
+ ordrules_msg_buffer_len);
+ ordrules_msg_buffer_avail = ordrules_msg_buffer_len -
+ ordrules_msg_buffer_ptr - 1;
+ }
+ strcpy(&ordrules_msg_buffer[ordrules_msg_buffer_ptr], msg );
+ ordrules_msg_buffer_ptr += msglen;
+ ordrules_msg_buffer_avail -= msglen;
+ ordrules_msg_buffer[ordrules_msg_buffer_ptr] = '\0';
+}
+
+static void
+logc( c )
+char c;
+{
+ char msg[2];
+ msg[0] = c;
+ msg[1] = '\0';
+ logs(msg);
+}
+
+static void
+logi( n )
+int n;
+{
+ char msg[16];
+ sprintf(msg, "%d", n);
+ logs(msg);
+}
+
+/*
+ * This function initializes the memory for the SortRules. Since the
+ * number of tables is defined dynamically, we allow the repeated
+ * definition of tables. In this case the old table is discarded.
+ */
+
+int
+initialize (num_sort_tables)
+int num_sort_tables;
+{
+ size_t fullsize = num_sort_tables * sizeof(RULE_TABLE);
+ if (SortRules != NULL) {
+ logs("ORDRULES: Removing old Sort-Tables!\n");
+ free( SortRules );
+ }
+ ordrules_sort_rule_tables = num_sort_tables;
+ SortRules = (RULE_TABLE*) malloc (fullsize);
+ if (SortRules == NULL) {
+ fprintf(stderr,"ordrules: malloc() of %d SortTables failed!\n",
+ num_sort_tables);
+ exit(1);
+ }
+ logs("ORDRULES: Initializing "); logi(num_sort_tables);
+ logs(" Sort Tables.\n");
+ memset(SortRules, 0, fullsize);
+ return(num_sort_tables);
+}
+
+int
+add_sort_rule (run, left, right, isreject, ruletype)
+int run;
+char *left;
+char *right;
+int isreject;
+int ruletype;
+{
+ if (SortRules == NULL) { /* No malloc() done yet */
+ if (ordrules_sort_rule_tables == 0) { /* No specification yet. */
+ ordrules_sort_rule_tables = DEFAULT_SORT_RULE_TABLES; /* use default */
+ }
+ logs("ORDRULES: Performing implicit initialization.\n");
+ initialize( ordrules_sort_rule_tables ); /* ...then initialize */
+ }
+ if (0 <= run && run < ordrules_sort_rule_tables) {
+ return( add_rule( SortRules[run], left, right, isreject, ruletype, run ));
+ } else {
+ logs("ORDRULES: add_sort_rule(): run is out of range.\n");
+ return -1;
+ }
+}
+
+int
+add_merge_rule (left, right, isreject, ruletype)
+char *left;
+char *right;
+int isreject;
+int ruletype;
+{
+ return( add_rule( MergeRules, left, right, isreject, ruletype, -1));
+}
+
+/* insert rule 'left --> right' into ruletable 'table' */
+int
+add_rule( table, left, right, isreject, ruletype, run)
+RULE_TABLE table;
+char *left;
+char *right;
+int isreject;
+int ruletype;
+int run;
+{
+ RULE *r;
+ RULE_LIST *list;
+ char buffer[STRING_MAX];
+ char *bptr = buffer;
+ unsigned int pos = 0;
+
+ /* new stuff */
+ int errcode;
+ char errmsg[STRING_MAX];
+
+ /* Use extended regular expression syntax as default. */
+ int cflag = REG_EXTENDED;
+
+ dispstart( add_rule );
+ dispstr( left );
+ dispstr( right );
+
+ r = (RULE *) malloc( sizeof(RULE) );
+
+ switch ( ruletype ) {
+ case RT_AUTOMATIC:
+ r->type = get_ruletype( left, right ); break;
+ case RT_STRING:
+ r->type = STR_RULE; break;
+ case RT_CHAR:
+ r->type = CHR_RULE; break;
+ case RT_REGEXP_BASIC:
+ case RT_REGEXP_EXTENDED:
+ r->type = REG_RULE; break;
+ }
+
+ switch (r->type) {
+
+ case REG_RULE:
+
+ if (ruletype == RT_REGEXP_BASIC) {
+ /* Use the basic regular expressions as specified. */
+ cflag = 0;
+ }
+ dispstart( REG_RULE );
+ dispmsg( bptr copy );
+ /* insert '^' in regular expression to match string prefix only */
+ *bptr++ = '^'; strcpy( bptr, left );
+ r->r.reg.lstr = (char *) malloc( strlen(buffer) + 1);
+ r->r.reg.type = cflag;
+ strcpy( r->r.reg.lstr, buffer );
+ dispmsg( malloc );
+ r->r.reg.lside = (regex_t*) malloc (sizeof(regex_t));
+ displong( r->r.reg.lside );
+ dispstart( regcomp );
+ if ( 0 != (errcode = regcomp( r->r.reg.lside, buffer, REG_EXTENDED ))) {
+ regerror( errcode, r->r.reg.lside, errmsg, STRING_MAX );
+ DBG(logs("Regular Expression Error: "); logs(errmsg); logs("\n");)
+ return( errcode );
+ }
+ dispend( regcomp );
+ r->r.reg.rside = (char *) malloc( strlen(right) + 1);
+ strcpy( r->r.reg.rside, right );
+ dispstr( r->r.reg.rside );
+ displong( r->type );
+
+ /*
+ * calculate table index as the first character of 'left'
+ * or FORALL_POS if the rule does not start with a fixed charater.
+ * A rule starts with a fixed character if this char is escaped.
+ * Otherwise the first character might be variable (ie, a character
+ * class) or it might be optional.
+ */
+
+ if ( left[0] == BSH ) pos = (unsigned char)(left[1]); /* quoted */
+ else
+ if ( strchr(".([",left[0])==NULL || strchr("*?",left[1])==NULL )
+ pos = FORALL_POS; /* character class or optional */
+ else
+ pos = (unsigned char)(left[0]); /* fixed */
+
+ dispend( REG_RULE );
+ break;
+
+ case CHR_RULE:
+ dispstart( CHR_RULE );
+ r->r.chr = *right;
+ pos = (unsigned char)(*left);
+ dispend( CHR_RULE );
+ break;
+
+ case STR_RULE:
+ dispstart( STR_RULE );
+ r->r.str.llen = strlen(left);
+ r->r.str.lside = (char *) malloc( (size_t)(r->r.str.llen + 1) );
+ strcpy(r->r.str.lside,left);
+ r->r.str.rlen = strlen(right);
+ r->r.str.rside = (char *) malloc( (size_t)(r->r.str.rlen + 1) );
+ strcpy(r->r.str.rside,right);
+ pos = (unsigned char)(*left);
+ dispend( STR_RULE );
+ break;
+ }
+
+ if (isreject) r->type |= REJECT;
+
+ /* insert new rule into table */
+ dispstart(inserting into table);
+ dispuint(pos);
+ displong(&table[0]);
+ list = &table[pos];
+ displong(list);
+ displong(NULL);
+ displong(list->first);
+ displong(r);
+ if (list->first == NULL) {
+ list->first = r;
+ } else {
+ displong(list->last);
+ displong(list->last->next);
+ list->last->next = r;
+ }
+ displong(list->last);
+ list->last = r;
+ displong(r->next);
+ r->next = NULL;
+ dispend(inserting into table);
+
+ DBG(
+ logs("Mappings: add (");
+ if (table == MergeRules) logs("merge"); else logs("sort");
+ logs("-rule ");
+ switch ( r->type & ~REJECT ) {
+ case CHR_RULE:
+ logs("`");logc(*left);logs("' `");logc(r->r.chr);logs("' :char");
+ break;
+ case STR_RULE:
+ logs("`");;logs(r->r.str.lside); logs("' `");
+ logs(r->r.str.rside);logs("' :string");
+ break;
+ case REG_RULE:
+ logs("`");logs(buffer);logs("' `");
+ logs(r->r.reg.rside);logs("' :");
+ logc( (r->r.reg.type == REG_EXTENDED) ? 'e' : 'b' );
+ logs("regexp");
+ break;
+ }
+ if (run != -1) {
+ logs(" :run ");
+ logi(run);
+ }
+ if (r->type&REJECT) logs(" :again");
+ logs(").\n");
+ )
+ dispend( add_rule );
+ return( 0 );
+}
+
+/* get the type of the rule 'lside --> rside' */
+static
+RULE_TYPE get_ruletype( lside, rside )
+char *lside;
+char *rside;
+{
+ if ( is_regexp( lside ) || is_regexp( rside ) ) return REG_RULE;
+
+ if ( lside[0] != NUL && lside[1] == NUL &&
+ rside[0] != NUL && rside[1] == NUL ) return CHR_RULE;
+
+ return STR_RULE;
+}
+
+static
+int is_CHR_RULE ( lside, rside )
+char *lside;
+char *rside;
+{
+ if ( lside[0] != NUL && lside[1] == NUL &&
+ rside[0] != NUL && rside[1] == NUL ) return CHR_RULE;
+
+ return STR_RULE;
+}
+
+/* return TRUE, if 's' is a regular expression. */
+static
+int is_regexp( s )
+char *s;
+{
+ for (;*s ; s++ )
+ if (*s == BSH) {
+ s++;
+ if ('0' <= *s && *s <= '9') return TRUE;
+ }
+ else if (strchr("[]().*+$^?&",*s)) return TRUE;
+ return FALSE;
+}
+
+#ifdef UNESCAPE
+/* not necessary anymore */
+
+/* replace all '\x' sequences with the character they represent */
+static void
+unescape( s )
+register char *s;
+{
+ register char *d;
+ for (d = s; *d = *s; d++)
+ if (*s++ == BSH) *d = *s++;
+}
+#endif
+
+/* apply the rules from 'table' to 'source' and place the substituted result
+ in 'dest' */
+void apply_rules( table, source, dest, buflen )
+RULE_TABLE table;
+register char *source;
+register char *dest;
+register size_t buflen;
+{
+ register RULE *r;
+ register RULE_TYPE rtype;
+ register char *newdest = 0;
+ char newsource[STRING_MAX];
+
+ /* new stuff */
+#define NMATCH 10
+ regmatch_t regmatch [NMATCH];
+ int eflags = 0;
+
+#ifdef DEBUG
+ char *in = source, *out = dest;
+#endif
+
+ dispstart( apply_rules );
+ dispstr( source );
+ dispstr( dest );
+ dispint( buflen );
+
+ while ( *source ) {
+
+ /* first check the rules beginning with character '*source' */
+ dispint( (unsigned) *source );
+ dispint( (unsigned)(*source) );
+ dispint( (unsigned char)(*source) );
+ dispint( (unsigned int)(*source) );
+ for ( r = table[(unsigned char) *source].first; r; r = r->next ) {
+
+ displong( r );
+ rtype = (r->type & ~REJECT);
+
+ if ( rtype == CHR_RULE ) {
+ dispstart( CHR_RULE );
+ if ((r->type & REJECT))
+ newdest = dest;
+ DBG(
+ logs("Mappings: (compare `");logs(source);logs("' :char `");
+ logc(*source); logs("') match!\n");
+ )
+ *dest++ = r->r.chr;
+ source++;
+ dispend( CHR_RULE );
+ break;
+ }
+
+ else if ( rtype == STR_RULE &&
+ !strncmp(source, r->r.str.lside, (size_t)r->r.str.llen)) {
+ DBG(
+ logs("Mappings: (compare `");logs(source);logs("' :string `");
+ logs(r->r.str.lside); logs("') match!\n");
+ )
+ dispstart( STR_RULE );
+ displong( dest );
+ strcpy(dest, r->r.str.rside);
+ if ((r->type & REJECT)) newdest = dest;
+ displong( newdest );
+ dest += r->r.str.rlen;
+ displong( dest );
+ source += r->r.str.llen;
+ displong( source );
+ dispend( STR_RULE );
+ break;
+ }
+
+ else {
+ if ( rtype == REG_RULE ) {
+ dispstart( REG_RULE );
+ DBG(
+ logs("Mappings: (compare `");logs(source);logs("' :");
+ logc( (r->r.reg.type == REG_EXTENDED) ? 'e' : 'b' );
+ logs("regexp `");
+ logs(r->r.reg.lstr); logs("')");
+ )
+ if ( 0 == regexec( r->r.reg.lside, source,
+ NMATCH, regmatch, eflags ) ) {
+ DBG( logs(" match!\n"); )
+ nrxsub( r->r.reg.rside, regmatch, source, dest, buflen );
+ if ((r->type & REJECT))
+ newdest = dest;
+ dest = strchr(dest,0);
+ source += regmatch[0].rm_eo;
+ dispend( REG_RULE );
+ break;
+ }
+ DBG( logs("\n"); )
+ dispend( REG_RULE );
+ }
+ }
+
+ }
+
+ displong( r );
+ if ( r == NULL ) {
+
+ dispmsg( r == NULL );
+ /* check regular expression rules, that could match all prefixes */
+ for ( r = table[FORALL_POS].first; r; r = r->next ) {
+ dispstart( for-loop regexps );
+ dispstr( r->r.reg.lstr );
+ dispstr( r->r.reg.rside );
+ displong( r->type );
+ dispstr( source );
+ DBG(
+ logs("Mappings: (compare `");logs(source);logs("' :");
+ logc( (r->r.reg.type == REG_EXTENDED) ? 'e' : 'b' );
+ logs("regexp `");
+ logs(r->r.reg.lstr); logs("')");
+ )
+ if ( 0 == regexec( r->r.reg.lside, source,
+ NMATCH, regmatch, eflags ) ) {
+ DBG( logs(" match!\n"); )
+ dispstart( regexec match! );
+ nrxsub( r->r.reg.rside, regmatch, source, dest, buflen );
+ if ((r->type & REJECT)) newdest = dest;
+ displong( dest );
+ displong( newdest );
+ source += regmatch[0].rm_eo;
+ displong( source );
+ dest = strchr(dest,0);
+ displong( dest );
+ dispend( regexec match! );
+ dispend( for-loop regexps );
+ break;
+ }
+ DBG( logs("\n"); )
+ dispend( for-loop regexps );
+ }
+ /* no rule matched, copy character */
+ if ( r == NULL ){
+ dispstart( no rule matched! );
+ displong( dest );
+ displong( source );
+ *dest++ = *source++;
+ displong( dest );
+ displong( source );
+ dispend( no rule matched! );
+ }
+ }
+
+ displong( r );
+ /* should we reject? */
+ if ( r != NULL && (r->type & REJECT)) {
+ dispstart( REJECT );
+ strcpy(dest,source);
+ strcpy(newsource,newdest);
+#ifdef DEBUG
+ fprintf(stderr,"\nordrules: reject in '%s': '%s'.",in,newsource);
+#endif
+ apply_rules( table, newsource, newdest, STRING_MAX );
+ dispend( REJECT );
+ dispend( apply_rules );
+ return;
+ }
+ }
+
+ dispstart( last part );
+ displong( dest );
+ *dest = 0;
+ ordrules_string_buffer_used_bytes = strlen( ordrules_string_buffer );
+#ifdef DEBUG
+#ifdef debug
+ dispstr( out );
+#endif
+#endif
+
+#ifdef DEBUG
+ /* if ( strcmp(in,out) ) */
+ fprintf(stderr,"\nordrules: %s '%s' generated for '%s'.", table == MergeRules ? "mergekey" : "sortkey", out, in );
+#endif
+
+ dispend( last part );
+ dispend( apply_rules );
+}
+
+char *gen_sortkey ( key, run )
+char *key;
+int run;
+{
+ char *sortkey;
+ dispstart( gen_sortkey );
+ dispstr( key );
+
+ /* If no initialization has been done yet, then do a fallback to the
+ default tables. This should not happen usually. */
+ if (SortRules == NULL) {
+ logs("ORDRULES: Performing implicit initialization.\n");
+ initialize( DEFAULT_SORT_RULE_TABLES );
+ }
+
+ if (0 <= run && run < ordrules_sort_rule_tables) {
+ apply_rules( SortRules[run], key, ordrules_string_buffer, BUFLEN );
+ }
+
+ sortkey = (char*) malloc (strlen( ordrules_string_buffer ) +1);
+ strcpy( sortkey, ordrules_string_buffer );
+ DBG(
+ logs("Mappings: (sort-mapping `"); logs(key);
+ logs("' :run "); logi(run); logs(") -> `");
+ logs(sortkey); logs("'.\n\n");
+ )
+ dispend( gen_sortkey );
+ return( sortkey );
+}
+
+
+char *gen_mergekey ( key )
+char *key;
+{
+ char *mergekey;
+ apply_rules( MergeRules, key, ordrules_string_buffer, BUFLEN );
+ mergekey = (char*) malloc (strlen( ordrules_string_buffer ) +1);
+ strcpy( mergekey, ordrules_string_buffer );
+ DBG(
+ logs("Mappings: (merge-mapping `"); logs(key); logs("') -> `");
+ logs(mergekey); logs("'.\n\n");
+ )
+ return( mergekey );
+}
+
+
+/* insert a new group entry ('group','letter') into 'list' */
+#if 0
+void
+add_group( list, group, letter )
+GROUP_LIST *list;
+int group;
+char *letter;
+{
+ GROUP_RULE *new;
+ new = (GROUP_RULE *) malloc(sizeof(GROUP_RULE));
+ new->id = (group >= 0 ? group + USORTGROUP : group - USORTGROUP);
+ new->len = strlen(letter);
+ new->let = (char *) malloc(new->len + 1);
+ strcpy(new->let,letter);
+
+ /* insert rule into list */
+ if (list->first == NULL) list->first = new;
+ else list->last->next = new;
+ list->last = new;
+ new->next = NULL;
+
+#ifdef DEBUG
+ fprintf(stderr,"\nordrules: added group into list '%s' '%s' -> group: %d.",list == &GroupList ? "GroupList" : "HeadingList", new->let,new->id);
+#endif
+}
+
+/* find the user defined group id for 'sortkey' */
+int get_group( sortkey )
+char *sortkey;
+{
+ register GROUP_RULE *r;
+ for (r = GroupList.first; r && strncmp(sortkey,r->let,r->len); r = r->next);
+#ifdef DEBUG
+ if (r != NULL)
+ fprintf(stderr,"\nordrules: sortkey '%s' is in group: %d.",sortkey,r->id);
+#endif
+ return ( r ? r->id : *sortkey );
+}
+
+/* find the user defined group heading for id 'group' */
+char *get_heading( group )
+int group;
+{
+ register GROUP_RULE *r;
+ for ( r = HeadingList.first; r && r->id != group; r = r->next);
+#ifdef DEBUG
+ if (r != NULL)
+ fprintf(stderr,"\nordrules: group: %d has heading '%s'.",r->id,r->let);
+#endif
+ return ( r ? r->let : NULL );
+}
+#endif
+
+
+/*======================================================================
+ *
+ * $Log: ordrules.c,v $
+ * Revision 1.9 2008/01/09 11:33:44 jschrod
+ * Update to CLISP 2.43.
+ *
+ * Revision 1.8 2005/05/02 21:39:53 jschrod
+ * xindy run time engine 3.0; as used for CLISP 2.33.2.
+ *
+ * Revision 1.7 1999/07/30 08:34:32 kehr
+ * Checked in some debug stuff that was integrated for better testing.
+ *
+ * Revision 1.6 1997/10/20 11:23:13 kehr
+ * New version of sorting rules. Sorting of more complex indexes (i.e.
+ * French) is now possible.
+ *
+ * Revision 1.5 1997/01/17 16:43:40 kehr
+ * Several changes for new version 1.1.
+ *
+ * Revision 1.4 1996/07/18 15:56:40 kehr
+ * Checkin after all changes that resulted from the define-letter-group
+ * modification were finished. Additionally I found an ugly bug in the
+ * ordrules.c file that was discovered when running the system under
+ * Solaris (which seems to have signed chars..Whee!). This is fixed now
+ * and the Imakefiles and that stuff was improved, too.
+ *
+ * Revision 1.3 1996/07/03 18:48:48 kehr
+ * Changed ordrules.c. The unescape() mechanism was removed so that not too
+ * much quoting is necessary anymore. This feature was olnly for the use in
+ * the old makeindex-3 systems.
+ *
+ * Revision 1.2 1996/03/27 20:29:10 kehr
+ * It works. Today I had my first success in getting the FFI running with
+ * the ordrules-library. The interface is defined in `ordrulei.lsp' and
+ * allows direct access to the functions in `ordrules.c'.
+ *
+ * Revision 1.1 1996/03/26 17:30:58 kehr
+ * First check-in of the rx-support for clisp.
+ *
+ * Revision 1.9 1992/01/03 13:22:10 schrod
+ * "unsigned" is not a type. Computation of table index was wrong.
+ *
+ * Revision 1.8 1991/12/16 14:44:54 schrod
+ * fmalloc() statt allocate()
+ *
+ * Revision 1.7 1991/12/10 20:25:50 schrod
+ * Changed all function declarations to ANSI prototypes using ARGS().
+ *
+ * Revision 1.6 1991/12/10 20:09:58 schrod
+ * Reject-rules (*merge_rule and *sort_rule) implemented.
+ *
+ * Revision 1.5 1991/12/10 19:59:53 schrod
+ * Fixed bug in ordrules. Inserting a new group rule at the beginning of
+ * a rule list works not with groups, that have the same prefix:
+ *
+ * group_rule "ae" 1
+ * group_rule "a" 2
+ *
+ * would put 'aexxx' in group 2.
+ *
+ * Revision 1.4 1991/12/10 19:49:59 schrod
+ * Optimized group-rule handling.
+ *
+ * Revision 1.3 1991/12/10 19:43:38 schrod
+ * Optimized module 'ordrules':
+ * - all three types of rules (chr,str,regexp) now allowed for both sort
+ * and merge keys
+ *
+ * Revision 1.2 1991/12/10 19:20:31 schrod
+ * Changed the group merging algorithm to create the group-id of an index key
+ * using user defined rules (specified in the style file with commands:
+ * `sort_group' and `group_head') instead of the sortkey's first character.
+ *
+ * Revision 1.1 1991/12/10 17:15:54 schrod
+ * Initial revision
+ *
+ */
diff --git a/Build/source/utils/xindy-old/rte/ordrules/ordrules.h b/Build/source/utils/xindy-old/rte/ordrules/ordrules.h
new file mode 100644
index 00000000000..0b09a32ccf8
--- /dev/null
+++ b/Build/source/utils/xindy-old/rte/ordrules/ordrules.h
@@ -0,0 +1,211 @@
+/* $Id: ordrules.h,v 1.9 2008/01/09 11:33:44 jschrod Exp $
+ *----------------------------------------------------------------------
+ *
+ * Ordering Rules for Strings
+ *
+ * [history at end]
+ */
+
+#ifndef _ORDRULES_H
+#define _ORDRULES_H
+
+/* for regex functions on platforms w/o regex; but this causes segfaults
+ on some other platforms; to be investigated */
+/* #include "clisp.h" */
+#include <stdio.h>
+#include "mkind.h"
+#undef debug
+#include "debug.h"
+#include "regex.h"
+
+#define BEGIN 1 /* representation of '\b' */
+#define END 255 /* representation of '\e' */
+
+/* values for RULE_TYPE */
+#define CHR_RULE 0001
+#define STR_RULE 0002
+#define REG_RULE 0004
+#define REJECT 0200
+
+#define RULE_TYPE unsigned char
+
+/* structure representing a substitution rule */
+typedef struct rule {
+
+ RULE_TYPE type; /* rule descriptor */
+
+ union {
+
+ char chr; /* character transformation: 'chr1' --> 'chr2' */
+
+ struct { /* string substitution: 'str1' --> 'str2' */
+ char *lside;
+ int llen;
+ char *rside;
+ int rlen;
+ } str;
+
+ struct { /* regular expression rule: 'rexp' --> 'str' */
+ regex_t *lside;
+ char *lstr;
+ char *rside;
+ char type;
+ } reg;
+
+ } r;
+
+ struct rule *next; /* link to next rule */
+
+} RULE;
+
+/* RULE_LIST is a linked list of RULE's with a pointer to the last entry,
+ which allows efficient appending of new rules. */
+typedef struct {
+ RULE *first;
+ RULE *last;
+} RULE_LIST;
+
+/* RULE_TABLE is a table of RULE_LIST's, where at position 'c' it contains
+ rules that could match strings beginning with character 'c'. The
+ last position (FORALL_POS) in this table has a special meaning. It stands for
+ regular expression rules that begin with a character class and
+ therefore they should be matched against all strings.
+
+ RULE_TABLE[c] rules in this list: 'cxxxxx' --> 'foo'
+ RULE_TABLE[FORALL_POS] rules in this list: '[y-z]xxxx' --> 'foo'
+
+*/
+
+#define MAX_RULE_TABLE 257 /* # entries in a rule table */
+#define FORALL_POS 256 /* position of regexp rules, that must be applied to all strings */
+
+typedef RULE_LIST RULE_TABLE[MAX_RULE_TABLE];
+
+extern RULE_TABLE* SortRules; /* rules for generating sortkeys */
+extern RULE_TABLE MergeRules; /* rules for generating mergekeys */
+
+typedef struct grouprule {
+ short id; /* group id */
+ char *let; /* sortkey prefix */
+ int len; /* len(let) */
+ struct grouprule *next; /* link to next rule */
+} GROUP_RULE;
+
+typedef struct {
+ GROUP_RULE *first;
+ GROUP_RULE *last;
+} GROUP_LIST;
+
+extern GROUP_LIST GroupList; /* list of character groups */
+extern GROUP_LIST HeadingList; /* list of group headings */
+
+/* These variables are used in ordrulei.lsp. The generated code, in
+ ordrulei.c uses sizeof() on them, thus the buffer size must be
+ defined. */
+#define BUFLEN ((size_t)1024)
+extern char ordrules_string_buffer[BUFLEN];
+extern int ordrules_string_buffer_used_bytes;
+extern int ordrules_msg_logging;
+extern char* ordrules_msg_buffer;
+extern int ordrules_msg_buffer_ptr;
+
+
+#define add_group_rule(letter, group) \
+ add_group( &GroupList, group, letter )
+
+#define add_heading(group, head) \
+ add_group( &HeadingList, group, head )
+
+int initialize PROTO(( int num_sort_tables ));
+int open_debug_file PROTO(( char* filename ));
+int close_debug_file PROTO(( ));
+
+int get_group PROTO(( char *sortkey ));
+char *get_heading PROTO(( int group ));
+
+int add_rule PROTO(( RULE_TABLE table, char *left, char *right,
+ int isreject, int ruletype, int run ));
+void apply_rules PROTO(( RULE_TABLE table, char *source, char *dest, size_t buflen ));
+void add_group PROTO(( GROUP_LIST *list, int group, char *letter ));
+
+int add_sort_rule PROTO((int run, char *left, char *right, int isreject, int ruletype));
+int add_merge_rule PROTO((char *left, char *right, int isreject, int ruletype));
+
+char* gen_sortkey PROTO((char *key, int run));
+char* gen_mergekey PROTO((char *key));
+
+#endif /* _ORDRULES_H */
+
+
+/*======================================================================
+ *
+ * $Log: ordrules.h,v $
+ * Revision 1.9 2008/01/09 11:33:44 jschrod
+ * Update to CLISP 2.43.
+ *
+ * Revision 1.8 2005/06/14 11:22:04 jschrod
+ * ordrulei.lisp is now ordrulei.lsp in distribution, as it is in CVS.
+ *
+ * Revision 1.7 2005/05/02 21:39:53 jschrod
+ * xindy run time engine 3.0; as used for CLISP 2.33.2.
+ *
+ * Revision 1.6 1999/07/30 08:37:38 kehr
+ * Intermediate checkin.
+ *
+ * Revision 1.5 1997/10/20 11:23:14 kehr
+ * New version of sorting rules. Sorting of more complex indexes (i.e.
+ * French) is now possible.
+ *
+ * Revision 1.4 1997/01/17 16:43:42 kehr
+ * Several changes for new version 1.1.
+ *
+ * Revision 1.3 1996/07/18 15:56:42 kehr
+ * Checkin after all changes that resulted from the define-letter-group
+ * modification were finished. Additionally I found an ugly bug in the
+ * ordrules.c file that was discovered when running the system under
+ * Solaris (which seems to have signed chars..Whee!). This is fixed now
+ * and the Imakefiles and that stuff was improved, too.
+ *
+ * Revision 1.2 1996/03/27 20:29:11 kehr
+ * It works. Today I had my first success in getting the FFI running with
+ * the ordrules-library. The interface is defined in `ordrulei.lsp' and
+ * allows direct access to the functions in `ordrules.c'.
+ *
+ * Revision 1.1 1996/03/26 17:31:00 kehr
+ * First check-in of the rx-support for clisp.
+ *
+ * Revision 1.8 1991/12/16 14:47:04 schrod
+ * updated documentation
+ *
+ * Revision 1.7 1991/12/10 20:25:53 schrod
+ * Changed all function declarations to ANSI prototypes using ARGS().
+ *
+ * Revision 1.6 1991/12/10 20:10:02 schrod
+ * Reject-rules (*merge_rule and *sort_rule) implemented.
+ *
+ * Revision 1.5 1991/12/10 19:59:57 schrod
+ * Fixed bug in ordrules. Inserting a new group rule at the beginning of
+ * a rule list works not with groups, that have the same prefix:
+ *
+ * group_rule "ae" 1
+ * group_rule "a" 2
+ *
+ * would put 'aexxx' in group 2.
+ *
+ * Revision 1.4 1991/12/10 19:50:03 schrod
+ * Optimized group-rule handling.
+ *
+ * Revision 1.3 1991/12/10 19:43:42 schrod
+ * Optimized module 'ordrules':
+ * - all three types of rules (chr,str,regexp) now allowed for both sort
+ * and merge keys
+ *
+ * Revision 1.2 1991/12/10 19:20:35 schrod
+ * Changed the group merging algorithm to create the group-id of an index key
+ * using user defined rules (specified in the style file with commands:
+ * `sort_group' and `group_head') instead of the sortkey's first character.
+ *
+ * Revision 1.1 1991/12/10 17:15:58 schrod
+ * Initial revision
+ *
+ */
diff --git a/Build/source/utils/xindy-old/rte/ordrules/rxsub.c b/Build/source/utils/xindy-old/rte/ordrules/rxsub.c
new file mode 100644
index 00000000000..904b9613c72
--- /dev/null
+++ b/Build/source/utils/xindy-old/rte/ordrules/rxsub.c
@@ -0,0 +1,173 @@
+/* $Id: rxsub.c,v 1.4 2005/05/02 21:39:53 jschrod Exp $
+ *------------------------------------------------------------
+
+ This piece of code was inspired from the regsub implementation of
+ Henry Spencer. I modified it to make it compatible with the GNU Rx
+ library.
+
+ */
+
+#include "rxsub.h"
+
+#include <string.h>
+
+/*
+ nrxsub - perform substitutions after a regexp match
+
+ substpat : a string consisting of ordinary characters and subexpression
+ specifiers like `&' and `\0'..`\9'.
+ pmatch[] : the vector of subexpression specifiers into `source'
+ source : the string that was used in the regexec call yielding `pmatch'
+ dest : where to store the result
+ nsize : buffer length
+
+ Returns one of the error codes.
+ */
+
+#define chkbuf( x ) if ( x ) return RXSUB_ESPACE;
+
+rxsub_errcode_t
+nrxsub (char *substpat,
+ regmatch_t pmatch[],
+ char *source,
+ char *dest,
+ size_t nsize)
+{
+ register char *sub;
+ register char *dst;
+ register char c;
+ register int no;
+ register size_t len;
+ register char* bufend;
+
+ if ( pmatch == NULL || source == NULL ||
+ dest == NULL || substpat == NULL ||
+ nsize <= 0 ) {
+ return RXSUB_INVAL;
+ }
+
+ sub = substpat;
+ dst = dest;
+
+ bufend = dst + nsize; /* compute pointer to bufend */
+
+ while ((c = *sub++) != '\0') {
+ if (c == '&')
+ no = 0;
+ else if (c == '\\' && '0' <= *sub && *sub <= '9')
+ no = *sub++ - '0';
+ else
+ no = -1;
+
+ if (no < 0) { /* Ordinary character. */
+ if (c == '\\' && (*sub == '\\' || *sub == '&'))
+ c = *sub++;
+ chkbuf( dst >= bufend );
+ *dst++ = c;
+ } else { /* we found a subexpr specifier */
+ if ( pmatch[no].rm_so >= 0 && pmatch[no].rm_eo >= 0 ) {
+ len = pmatch[no].rm_eo - pmatch[no].rm_so;
+ chkbuf(dst + len >= bufend);
+ (void) strncpy( dst, source + pmatch[no].rm_so, len );
+ dst += len;
+ if (len != 0 && *(dst-1) == '\0') { /* strncpy hit NULL */
+ return RXSUB_DAMAGE;
+ }
+ }
+ }
+ }
+ chkbuf( dst >= bufend );
+ *dst++ = '\0';
+ return RXSUB_NOERROR;
+}
+
+
+/*
+ rxsub - perform substitutions after a regexp match
+
+ substpat : a string consisting of ordinary characters and subexpression
+ specifiers like `&' and `\0'..`\9'.
+ pmatch[] : the vector of subexpression specifiers into `source'
+ source : the string that was used in the regexec call yielding `pmatch'
+ dest : pointer to a char*, which is used to store the pointer of the
+ result string
+
+ Returns one of the error codes.
+ */
+
+rxsub_errcode_t
+rxsub (char *substpat,
+ regmatch_t pmatch[],
+ char *source,
+ char **dest)
+{
+ register size_t len;
+
+ if ( pmatch == NULL || source == NULL ||
+ dest == NULL || substpat == NULL ) {
+ return RXSUB_INVAL;
+ }
+
+ *dest = (char*)malloc( len = rxsub_len( substpat, pmatch ));
+
+ return nrxsub( substpat, pmatch, source, *dest, len );
+}
+
+
+
+/*
+ rxsub_len - calculate the neccessary space to hold the result of the
+ rxsub-call.
+
+ substpat : a string consisting of ordinary characters and subexpression
+ specifiers like `&' and `\0'..`\9'.
+ pmatch[] : the vector of subexpression specifiers into `source'
+
+ Returns the length of the string neccessary to hold the substituted
+ result with the final '\0' character included, or 0 of a fatal error occured.
+ */
+
+extern size_t
+rxsub_len (char *substpat,
+ regmatch_t pmatch[])
+{
+ register char *sub;
+ register char c;
+ register int no;
+ register size_t len;
+ register size_t totlen = 0;
+
+ if ( substpat == NULL || pmatch == NULL )
+ return 0;
+
+ sub = substpat;
+
+ while ((c = *sub++) != '\0') {
+ if (c == '&')
+ no = 0;
+ else if (c == '\\' && '0' <= *sub && *sub <= '9')
+ no = *sub++ - '0';
+ else
+ no = -1;
+
+ if (no < 0) { /* Ordinary character. */
+ if (c == '\\' && (*sub == '\\' || *sub == '&'))
+ c = *sub++;
+ totlen++;
+ } else { /* we found a subexpr specifier */
+ if ( pmatch[no].rm_so >= 0 && pmatch[no].rm_eo >= 0 ) {
+ len = pmatch[no].rm_eo - pmatch[no].rm_so;
+ totlen += len;
+ }
+ }
+ }
+ return ++totlen;
+}
+
+/*======================================================================
+
+ $Log: rxsub.c,v $
+ Revision 1.4 2005/05/02 21:39:53 jschrod
+ xindy run time engine 3.0; as used for CLISP 2.33.2.
+
+*/
diff --git a/Build/source/utils/xindy-old/rte/ordrules/rxsub.h b/Build/source/utils/xindy-old/rte/ordrules/rxsub.h
new file mode 100644
index 00000000000..03c22edfb7c
--- /dev/null
+++ b/Build/source/utils/xindy-old/rte/ordrules/rxsub.h
@@ -0,0 +1,102 @@
+/* $Id: rxsub.h,v 1.3 2005/05/02 21:39:53 jschrod Exp $
+ *------------------------------------------------------------
+
+ This piece of code was inspired from the regsub implementation of
+ Henry Spencer. I modified it to make it compatible with the GNU Rx
+ library.
+
+ I added a more flexible interface that also allows dynamic
+ allocation of the string buffer and a function that computes the
+ length of the resulting string.
+
+*/
+
+#ifndef RXSUB_H
+#define RXSUB_H
+
+#include "mkind.h"
+#include "regex.h"
+
+/* The error codes used by the rxsub-library */
+
+typedef enum
+{
+ RXSUB_NOERROR = 0, /* Success. */
+ RXSUB_INVAL, /* Invalid arguments */
+ RXSUB_ESPACE, /* The given buffer is too small */
+ RXSUB_DAMAGE /* Damaged source string */
+} rxsub_errcode_t;
+
+/*
+ nrxsub - perform substitutions after a regexp match
+
+ substpat : a string consisting of ordinary characters and subexpression
+ specifiers like `&' and `\0'..`\9'.
+ pmatch[] : the vector of subexpression specifiers into `source'
+ source : the string that was used in the regexec call yielding `pmatch'
+ dest : where to store the result
+ nsize : buffer length
+
+ Returns one of the error codes.
+ */
+
+
+extern rxsub_errcode_t nrxsub
+PROTO( (char *substpat,
+ regmatch_t pmatch[],
+ char *source,
+ char *dest,
+ size_t nsize) );
+
+/*
+ rxsub - perform substitutions after a regexp match
+
+ substpat : a string consisting of ordinary characters and subexpression
+ specifiers like `&' and `\0'..`\9'.
+ pmatch[] : the vector of subexpression specifiers into `source'
+ source : the string that was used in the regexec call yielding `pmatch'
+ dest : pointer to a char*, which is used to store the pointer of the
+ result string. The neccessary space for the result is allocated
+ dynamically.
+
+ Returns one of the error codes.
+ */
+
+rxsub_errcode_t rxsub
+PROTO( (char *substpat,
+ regmatch_t pmatch[],
+ char *source,
+ char **dest) );
+
+/*
+ rxsub_len - calculate the neccessary space to hold the result of the
+ rxsub-call.
+
+ substpat : a string consisting of ordinary characters and subexpression
+ specifiers like `&' and `\0'..`\9'.
+ pmatch[] : the vector of subexpression specifiers into `source'
+
+ Returns the length of the string neccessary to hold the substituted
+ result with the final '\0' character included, or 0 of a fatal error occured.
+ */
+
+extern size_t rxsub_len
+PROTO( (char *substpat,
+ regmatch_t pmatch[]) );
+
+#endif /* RXSUB_H */
+
+
+/*======================================================================
+
+ $Log: rxsub.h,v $
+ Revision 1.3 2005/05/02 21:39:53 jschrod
+ xindy run time engine 3.0; as used for CLISP 2.33.2.
+
+ Revision 1.2 1999/07/30 08:37:09 kehr
+ Intermediate checkin.
+
+ Revision 1.1 1996/03/26 17:31:04 kehr
+ First check-in of the rx-support for clisp.
+
+*/
diff --git a/Build/source/utils/xindy-old/rte/ordrules/version.lisp.in b/Build/source/utils/xindy-old/rte/ordrules/version.lisp.in
new file mode 100644
index 00000000000..d2e580157d0
--- /dev/null
+++ b/Build/source/utils/xindy-old/rte/ordrules/version.lisp.in
@@ -0,0 +1,13 @@
+;; $Id: version.lisp.in,v 1.1 2005/06/14 01:41:58 jschrod Exp $ -*- Lisp -*-
+;;------------------------------------------------------------
+
+;;;
+;;; xindy run time engine version number
+;;;
+
+(defpackage :xindy-version
+ (:export "*XINDY-RTE-VERSION*" "*XINDY-PLATFORM*"))
+(in-package :xindy-version)
+
+(defparameter *xindy-rte-version* "2.2")
+(defparameter *xindy-platform* "@host_cpu@-@host_os@")