texlive[58576] Build/source/texk/upmendex: upmendex: Fix a bug about
commits+takuji at tug.org
commits+takuji at tug.org
Sun Mar 21 09:56:17 CET 2021
Revision: 58576
http://tug.org/svn/texlive?view=revision&revision=58576
Author: takuji
Date: 2021-03-21 09:56:17 +0100 (Sun, 21 Mar 2021)
Log Message:
-----------
upmendex: Fix a bug about page_precedence in style
Modified Paths:
--------------
trunk/Build/source/texk/upmendex/ChangeLog
trunk/Build/source/texk/upmendex/Makefile.am
trunk/Build/source/texk/upmendex/Makefile.in
trunk/Build/source/texk/upmendex/configure
trunk/Build/source/texk/upmendex/configure.ac
trunk/Build/source/texk/upmendex/fread.c
trunk/Build/source/texk/upmendex/tests/upmendex.test
Added Paths:
-----------
trunk/Build/source/texk/upmendex/tests/pprec0.ist
trunk/Build/source/texk/upmendex/tests/pprec1.ist
trunk/Build/source/texk/upmendex/tests/pprec2.ist
trunk/Build/source/texk/upmendex/tests/pprecA-0.ind
trunk/Build/source/texk/upmendex/tests/pprecA-1.ind
trunk/Build/source/texk/upmendex/tests/pprecA-2.ind
trunk/Build/source/texk/upmendex/tests/pprecA.idx
Modified: trunk/Build/source/texk/upmendex/ChangeLog
===================================================================
--- trunk/Build/source/texk/upmendex/ChangeLog 2021-03-21 08:54:52 UTC (rev 58575)
+++ trunk/Build/source/texk/upmendex/ChangeLog 2021-03-21 08:56:17 UTC (rev 58576)
@@ -1,7 +1,13 @@
-2021-02-17 Karl Berry <karl at freefriends.org>
+2021-03-21 TANAKA Takuji <ttk at t-lab.opal.ne.jp>
- * 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 <ttk at t-lab.opal.ne.jp>
Modified: trunk/Build/source/texk/upmendex/Makefile.am
===================================================================
--- trunk/Build/source/texk/upmendex/Makefile.am 2021-03-21 08:54:52 UTC (rev 58575)
+++ trunk/Build/source/texk/upmendex/Makefile.am 2021-03-21 08:56:17 UTC (rev 58576)
@@ -58,5 +58,7 @@
## 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*.*
Modified: trunk/Build/source/texk/upmendex/Makefile.in
===================================================================
--- trunk/Build/source/texk/upmendex/Makefile.in 2021-03-21 08:54:52 UTC (rev 58575)
+++ trunk/Build/source/texk/upmendex/Makefile.in 2021-03-21 08:56:17 UTC (rev 58576)
@@ -610,9 +610,11 @@
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
Modified: trunk/Build/source/texk/upmendex/configure
===================================================================
--- trunk/Build/source/texk/upmendex/configure 2021-03-21 08:54:52 UTC (rev 58575)
+++ trunk/Build/source/texk/upmendex/configure 2021-03-21 08:56:17 UTC (rev 58576)
@@ -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 @@
# 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 @@
# 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 @@
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 @@
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 @@
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 @@
# Define the identity of the package.
PACKAGE='upmendex--tex-live-'
- VERSION='0.54'
+ VERSION='0.55'
# Some tools Automake needs.
@@ -17745,7 +17745,7 @@
-$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 @@
Report bugs to <bug-libtool at gnu.org>."
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 @@
# 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 @@
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\\"
Modified: trunk/Build/source/texk/upmendex/configure.ac
===================================================================
--- trunk/Build/source/texk/upmendex/configure.ac 2021-03-21 08:54:52 UTC (rev 58575)
+++ trunk/Build/source/texk/upmendex/configure.ac 2021-03-21 08:56:17 UTC (rev 58576)
@@ -8,7 +8,7 @@
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])
Modified: trunk/Build/source/texk/upmendex/fread.c
===================================================================
--- trunk/Build/source/texk/upmendex/fread.c 2021-03-21 08:54:52 UTC (rev 58575)
+++ trunk/Build/source/texk/upmendex/fread.c 2021-03-21 08:56:17 UTC (rev 58576)
@@ -511,7 +511,9 @@
switch(page_precedence[pattr[cc]]) {
case 'r':
if (strchr("ivxlcdm",p->page[i])==NULL) {
- pattr[cc]++;
+ if (pattr[cc]<strlen(page_precedence)-1)
+ pattr[cc]++;
+ else pattr[cc]=0;
for (j=cc+1;j<3;j++) pattr[j]=0;
goto ATTRLOOP;
}
@@ -518,7 +520,9 @@
break;
case 'R':
if (strchr("IVXLCDM",p->page[i])==NULL) {
- pattr[cc]++;
+ if (pattr[cc]<strlen(page_precedence)-1)
+ pattr[cc]++;
+ else pattr[cc]=0;
for (j=cc+1;j<3;j++) pattr[j]=0;
goto ATTRLOOP;
}
@@ -525,7 +529,9 @@
break;
case 'n':
if (p->page[i]<'0' || p->page[i]>'9') {
- pattr[cc]++;
+ if (pattr[cc]<strlen(page_precedence)-1)
+ pattr[cc]++;
+ else pattr[cc]=0;
for (j=cc+1;j<3;j++) pattr[j]=0;
goto ATTRLOOP;
}
@@ -532,7 +538,9 @@
break;
case 'a':
if (p->page[i]<'a' || p->page[i]>'z') {
- pattr[cc]++;
+ if (pattr[cc]<strlen(page_precedence)-1)
+ pattr[cc]++;
+ else pattr[cc]=0;
for (j=cc+1;j<3;j++) pattr[j]=0;
goto ATTRLOOP;
}
@@ -539,7 +547,9 @@
break;
case 'A':
if (p->page[i]<'A' || p->page[i]>'Z') {
- pattr[cc]++;
+ if (pattr[cc]<strlen(page_precedence)-1)
+ pattr[cc]++;
+ else pattr[cc]=0;
for (j=cc+1;j<3;j++) pattr[j]=0;
goto ATTRLOOP;
}
Added: trunk/Build/source/texk/upmendex/tests/pprec0.ist
===================================================================
--- trunk/Build/source/texk/upmendex/tests/pprec0.ist (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/pprec0.ist 2021-03-21 08:56:17 UTC (rev 58576)
@@ -0,0 +1,11 @@
+% -*- coding: utf-8 -*-
+
+%page_precedence "rnaRA"
+
+delim_0 "[[delim0]]"
+delim_1 "[[delim1]]"
+delim_2 "[[delim2]]"
+delim_r "[[delimr]]"
+suffix_2p "[[sfx 2p]]"
+suffix_3p "[[sfx 3p]]"
+
Added: trunk/Build/source/texk/upmendex/tests/pprec1.ist
===================================================================
--- trunk/Build/source/texk/upmendex/tests/pprec1.ist (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/pprec1.ist 2021-03-21 08:56:17 UTC (rev 58576)
@@ -0,0 +1,11 @@
+% -*- coding: utf-8 -*-
+
+page_precedence "nrR"
+
+delim_0 "[[delim0]]"
+delim_1 "[[delim1]]"
+delim_2 "[[delim2]]"
+delim_r "[[delimr]]"
+suffix_2p "[[sfx 2p]]"
+suffix_3p "[[sfx 3p]]"
+
Added: trunk/Build/source/texk/upmendex/tests/pprec2.ist
===================================================================
--- trunk/Build/source/texk/upmendex/tests/pprec2.ist (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/pprec2.ist 2021-03-21 08:56:17 UTC (rev 58576)
@@ -0,0 +1,11 @@
+% -*- coding: utf-8 -*-
+
+page_precedence "Rnr"
+
+delim_0 "[[delim0]]"
+delim_1 "[[delim1]]"
+delim_2 "[[delim2]]"
+delim_r "[[delimr]]"
+suffix_2p "[[sfx 2p]]"
+suffix_3p "[[sfx 3p]]"
+
Added: trunk/Build/source/texk/upmendex/tests/pprecA-0.ind
===================================================================
--- trunk/Build/source/texk/upmendex/tests/pprecA-0.ind (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/pprecA-0.ind 2021-03-21 08:56:17 UTC (rev 58576)
@@ -0,0 +1,5 @@
+\begin{theindex}
+
+ \item entryA[[delim0]]i[[sfx 3p]], 1[[sfx 3p]], I[[sfx 3p]]
+
+\end{theindex}
Added: trunk/Build/source/texk/upmendex/tests/pprecA-1.ind
===================================================================
--- trunk/Build/source/texk/upmendex/tests/pprecA-1.ind (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/pprecA-1.ind 2021-03-21 08:56:17 UTC (rev 58576)
@@ -0,0 +1,5 @@
+\begin{theindex}
+
+ \item entryA[[delim0]]1[[sfx 3p]], i[[sfx 3p]], I[[sfx 3p]]
+
+\end{theindex}
Added: trunk/Build/source/texk/upmendex/tests/pprecA-2.ind
===================================================================
--- trunk/Build/source/texk/upmendex/tests/pprecA-2.ind (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/pprecA-2.ind 2021-03-21 08:56:17 UTC (rev 58576)
@@ -0,0 +1,5 @@
+\begin{theindex}
+
+ \item entryA[[delim0]]I[[sfx 3p]], 1[[sfx 3p]], i[[sfx 3p]]
+
+\end{theindex}
Added: trunk/Build/source/texk/upmendex/tests/pprecA.idx
===================================================================
--- trunk/Build/source/texk/upmendex/tests/pprecA.idx (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/pprecA.idx 2021-03-21 08:56:17 UTC (rev 58576)
@@ -0,0 +1,9 @@
+\indexentry{entryA}{i}
+\indexentry{entryA}{ii}
+\indexentry{entryA}{iii}
+\indexentry{entryA}{1}
+\indexentry{entryA}{2}
+\indexentry{entryA}{3}
+\indexentry{entryA}{I}
+\indexentry{entryA}{II}
+\indexentry{entryA}{III}
Modified: trunk/Build/source/texk/upmendex/tests/upmendex.test
===================================================================
--- trunk/Build/source/texk/upmendex/tests/upmendex.test 2021-03-21 08:54:52 UTC (rev 58575)
+++ trunk/Build/source/texk/upmendex/tests/upmendex.test 2021-03-21 08:56:17 UTC (rev 58576)
@@ -24,3 +24,13 @@
>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
+
More information about the tex-live-commits
mailing list.