From fa9a70b20ec8185187665ef1c5cbb41a3afeaed7 Mon Sep 17 00:00:00 2001 From: Takuji Tanaka Date: Sun, 21 Mar 2021 08:56:17 +0000 Subject: upmendex: Fix a bug about page_precedence in style git-svn-id: svn://tug.org/texlive/trunk@58576 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/upmendex/ChangeLog | 12 +++++++++--- Build/source/texk/upmendex/Makefile.am | 6 ++++-- Build/source/texk/upmendex/Makefile.in | 6 ++++-- Build/source/texk/upmendex/configure | 24 ++++++++++++------------ Build/source/texk/upmendex/configure.ac | 2 +- Build/source/texk/upmendex/fread.c | 20 +++++++++++++++----- Build/source/texk/upmendex/tests/pprec0.ist | 11 +++++++++++ Build/source/texk/upmendex/tests/pprec1.ist | 11 +++++++++++ Build/source/texk/upmendex/tests/pprec2.ist | 11 +++++++++++ Build/source/texk/upmendex/tests/pprecA-0.ind | 5 +++++ Build/source/texk/upmendex/tests/pprecA-1.ind | 5 +++++ Build/source/texk/upmendex/tests/pprecA-2.ind | 5 +++++ Build/source/texk/upmendex/tests/pprecA.idx | 9 +++++++++ Build/source/texk/upmendex/tests/upmendex.test | 10 ++++++++++ 14 files changed, 112 insertions(+), 25 deletions(-) create mode 100644 Build/source/texk/upmendex/tests/pprec0.ist create mode 100644 Build/source/texk/upmendex/tests/pprec1.ist create mode 100644 Build/source/texk/upmendex/tests/pprec2.ist create mode 100644 Build/source/texk/upmendex/tests/pprecA-0.ind create mode 100644 Build/source/texk/upmendex/tests/pprecA-1.ind create mode 100644 Build/source/texk/upmendex/tests/pprecA-2.ind create mode 100644 Build/source/texk/upmendex/tests/pprecA.idx (limited to 'Build/source/texk/upmendex') diff --git a/Build/source/texk/upmendex/ChangeLog b/Build/source/texk/upmendex/ChangeLog index 30928e5d28e..bcce4b00e36 100644 --- a/Build/source/texk/upmendex/ChangeLog +++ b/Build/source/texk/upmendex/ChangeLog @@ -1,7 +1,13 @@ -2021-02-17 Karl Berry +2021-03-21 TANAKA Takuji - * COPYRIGHT, - * main.c: copyright 2021. + * version 0.55 Beta version. + * configure.ac, main.c, COPYRIGHT: Bump version + and copyright year. + * fread.c: Fix a bug about page_precedence in style. + Thanks to Suzana Sagadin for the report. + * tests/pprec[012].ist, tests/pprecA.idx, tests/pprecA-[012].ind, + tests/upmendex.test, Makefile.am: + Add new tests. 2020-05-01 TANAKA Takuji diff --git a/Build/source/texk/upmendex/Makefile.am b/Build/source/texk/upmendex/Makefile.am index 8f1aa54f996..94bea187b33 100644 --- a/Build/source/texk/upmendex/Makefile.am +++ b/Build/source/texk/upmendex/Makefile.am @@ -58,5 +58,7 @@ EXTRA_DIST += $(TESTS) ## tests/upmendex.test EXTRA_DIST += tests/foo.idx tests/foo.ind \ - tests/uni.idx tests/uni.dict tests/uni.ist tests/uni.ind -DISTCLEANFILES = foo.* uni.* + tests/uni.idx tests/uni.dict tests/uni.ist tests/uni.ind \ + tests/pprec0.ist tests/pprec1.ist tests/pprec2.ist tests/pprecA.idx \ + tests/pprecA-0.ind tests/pprecA-1.ind tests/pprecA-2.ind +DISTCLEANFILES = foo.* uni.* pprec*.* diff --git a/Build/source/texk/upmendex/Makefile.in b/Build/source/texk/upmendex/Makefile.in index ed150c49478..1447494020a 100644 --- a/Build/source/texk/upmendex/Makefile.in +++ b/Build/source/texk/upmendex/Makefile.in @@ -610,9 +610,11 @@ nodist_EXTRA_upmendex_SOURCES = dummy.cxx LDADD = $(KPATHSEA_LIBS) $(ICU_LIBS) $(PTHREAD_LIB) $(ICU_LIBS_EXTRA) EXTRA_DIST = COPYRIGHT indexsty upmendex.ja.txt $(TESTS) tests/foo.idx \ tests/foo.ind tests/uni.idx tests/uni.dict tests/uni.ist \ - tests/uni.ind + tests/uni.ind tests/pprec0.ist tests/pprec1.ist \ + tests/pprec2.ist tests/pprecA.idx tests/pprecA-0.ind \ + tests/pprecA-1.ind tests/pprecA-2.ind TESTS = tests/upmendex.test -DISTCLEANFILES = foo.* uni.* +DISTCLEANFILES = foo.* uni.* pprec*.* all: c-auto.h $(MAKE) $(AM_MAKEFLAGS) all-am diff --git a/Build/source/texk/upmendex/configure b/Build/source/texk/upmendex/configure index 02198c4fb94..7559fffe575 100755 --- a/Build/source/texk/upmendex/configure +++ b/Build/source/texk/upmendex/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for upmendex (TeX Live) 0.54. +# Generated by GNU Autoconf 2.69 for upmendex (TeX Live) 0.55. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -587,8 +587,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='upmendex (TeX Live)' PACKAGE_TARNAME='upmendex--tex-live-' -PACKAGE_VERSION='0.54' -PACKAGE_STRING='upmendex (TeX Live) 0.54' +PACKAGE_VERSION='0.55' +PACKAGE_STRING='upmendex (TeX Live) 0.55' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1345,7 +1345,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures upmendex (TeX Live) 0.54 to adapt to many kinds of systems. +\`configure' configures upmendex (TeX Live) 0.55 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1416,7 +1416,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of upmendex (TeX Live) 0.54:";; + short | recursive ) echo "Configuration of upmendex (TeX Live) 0.55:";; esac cat <<\_ACEOF @@ -1541,7 +1541,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -upmendex (TeX Live) configure 0.54 +upmendex (TeX Live) configure 0.55 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2474,7 +2474,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by upmendex (TeX Live) $as_me 0.54, which was +It was created by upmendex (TeX Live) $as_me 0.55, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -8668,7 +8668,7 @@ fi # Define the identity of the package. PACKAGE='upmendex--tex-live-' - VERSION='0.54' + VERSION='0.55' # Some tools Automake needs. @@ -17745,7 +17745,7 @@ ac_config_headers="$ac_config_headers c-auto.h:c-auto.in" -$as_echo "#define TL_VERSION \"TeX Live 2021\"" >>confdefs.h +$as_echo "#define TL_VERSION \"TeX Live 2021/dev\"" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C99 variadic macros are supported" >&5 @@ -18197,7 +18197,7 @@ Usage: $0 [OPTIONS] Report bugs to ." lt_cl_version="\ -upmendex (TeX Live) config.lt 0.54 +upmendex (TeX Live) config.lt 0.55 configured by $0, generated by GNU Autoconf 2.69. Copyright (C) 2011 Free Software Foundation, Inc. @@ -20337,7 +20337,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by upmendex (TeX Live) $as_me 0.54, which was +This file was extended by upmendex (TeX Live) $as_me 0.55, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -20403,7 +20403,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -upmendex (TeX Live) config.status 0.54 +upmendex (TeX Live) config.status 0.55 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/Build/source/texk/upmendex/configure.ac b/Build/source/texk/upmendex/configure.ac index c95d31520be..b3043309fad 100644 --- a/Build/source/texk/upmendex/configure.ac +++ b/Build/source/texk/upmendex/configure.ac @@ -8,7 +8,7 @@ dnl This file is free software; the copyright holder dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl -AC_INIT([upmendex (TeX Live)], [0.54]) +AC_INIT([upmendex (TeX Live)], [0.55]) AC_PREREQ([2.63]) AC_CONFIG_SRCDIR([main.c]) AC_CONFIG_AUX_DIR([../../build-aux]) diff --git a/Build/source/texk/upmendex/fread.c b/Build/source/texk/upmendex/fread.c index 358c21a4987..a336022e11b 100644 --- a/Build/source/texk/upmendex/fread.c +++ b/Build/source/texk/upmendex/fread.c @@ -511,35 +511,45 @@ ATTRLOOP: switch(page_precedence[pattr[cc]]) { case 'r': if (strchr("ivxlcdm",p->page[i])==NULL) { - pattr[cc]++; + if (pattr[cc]page[i])==NULL) { - pattr[cc]++; + if (pattr[cc]page[i]<'0' || p->page[i]>'9') { - pattr[cc]++; + if (pattr[cc]page[i]<'a' || p->page[i]>'z') { - pattr[cc]++; + if (pattr[cc]page[i]<'A' || p->page[i]>'Z') { - pattr[cc]++; + if (pattr[cc]uni.ind2 2>uni.ilg2 \ && diff $srcdir/tests/uni.ind uni.ind2 || exit 1 +# test for page_precedence +./upmendex -s $srcdir/tests/pprec0.ist $srcdir/tests/pprecA.idx -o pprecA-0.ind1 -t pprecA-0.ilg \ + && diff $srcdir/tests/pprecA-0.ind pprecA-0.ind1 || exit 1 + +./upmendex -s $srcdir/tests/pprec1.ist $srcdir/tests/pprecA.idx -o pprecA-1.ind1 -t pprecA-1.ilg \ + && diff $srcdir/tests/pprecA-1.ind pprecA-1.ind1 || exit 1 + +./upmendex -s $srcdir/tests/pprec2.ist $srcdir/tests/pprecA.idx -o pprecA-2.ind1 -t pprecA-2.ilg \ + && diff $srcdir/tests/pprecA-2.ind pprecA-2.ind1 || exit 1 + -- cgit v1.2.3