summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorTakuji Tanaka <ttk@t-lab.opal.ne.jp>2021-03-21 08:56:17 +0000
committerTakuji Tanaka <ttk@t-lab.opal.ne.jp>2021-03-21 08:56:17 +0000
commitfa9a70b20ec8185187665ef1c5cbb41a3afeaed7 (patch)
tree89974440cdc34d92e057f1223aac4b09ce9b9a0d /Build
parent14f747595ca6558b495c45aaf3bcdd54e0bf1800 (diff)
upmendex: Fix a bug about page_precedence in style
git-svn-id: svn://tug.org/texlive/trunk@58576 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/upmendex/ChangeLog12
-rw-r--r--Build/source/texk/upmendex/Makefile.am6
-rw-r--r--Build/source/texk/upmendex/Makefile.in6
-rwxr-xr-xBuild/source/texk/upmendex/configure24
-rw-r--r--Build/source/texk/upmendex/configure.ac2
-rw-r--r--Build/source/texk/upmendex/fread.c20
-rw-r--r--Build/source/texk/upmendex/tests/pprec0.ist11
-rw-r--r--Build/source/texk/upmendex/tests/pprec1.ist11
-rw-r--r--Build/source/texk/upmendex/tests/pprec2.ist11
-rw-r--r--Build/source/texk/upmendex/tests/pprecA-0.ind5
-rw-r--r--Build/source/texk/upmendex/tests/pprecA-1.ind5
-rw-r--r--Build/source/texk/upmendex/tests/pprecA-2.ind5
-rw-r--r--Build/source/texk/upmendex/tests/pprecA.idx9
-rwxr-xr-xBuild/source/texk/upmendex/tests/upmendex.test10
14 files changed, 112 insertions, 25 deletions
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 <karl@freefriends.org>
+2021-03-21 TANAKA Takuji <ttk@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@t-lab.opal.ne.jp>
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 <bug-libtool@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 @@ 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]<strlen(page_precedence)-1)
+ pattr[cc]++;
+ else pattr[cc]=0;
for (j=cc+1;j<3;j++) pattr[j]=0;
goto ATTRLOOP;
}
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;
}
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;
}
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;
}
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;
}
diff --git a/Build/source/texk/upmendex/tests/pprec0.ist b/Build/source/texk/upmendex/tests/pprec0.ist
new file mode 100644
index 00000000000..ec1242bbbad
--- /dev/null
+++ b/Build/source/texk/upmendex/tests/pprec0.ist
@@ -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]]"
+
diff --git a/Build/source/texk/upmendex/tests/pprec1.ist b/Build/source/texk/upmendex/tests/pprec1.ist
new file mode 100644
index 00000000000..8f9221ebce5
--- /dev/null
+++ b/Build/source/texk/upmendex/tests/pprec1.ist
@@ -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]]"
+
diff --git a/Build/source/texk/upmendex/tests/pprec2.ist b/Build/source/texk/upmendex/tests/pprec2.ist
new file mode 100644
index 00000000000..eeec1e95cfa
--- /dev/null
+++ b/Build/source/texk/upmendex/tests/pprec2.ist
@@ -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]]"
+
diff --git a/Build/source/texk/upmendex/tests/pprecA-0.ind b/Build/source/texk/upmendex/tests/pprecA-0.ind
new file mode 100644
index 00000000000..245eacacdd6
--- /dev/null
+++ b/Build/source/texk/upmendex/tests/pprecA-0.ind
@@ -0,0 +1,5 @@
+\begin{theindex}
+
+ \item entryA[[delim0]]i[[sfx 3p]], 1[[sfx 3p]], I[[sfx 3p]]
+
+\end{theindex}
diff --git a/Build/source/texk/upmendex/tests/pprecA-1.ind b/Build/source/texk/upmendex/tests/pprecA-1.ind
new file mode 100644
index 00000000000..772e302d7c4
--- /dev/null
+++ b/Build/source/texk/upmendex/tests/pprecA-1.ind
@@ -0,0 +1,5 @@
+\begin{theindex}
+
+ \item entryA[[delim0]]1[[sfx 3p]], i[[sfx 3p]], I[[sfx 3p]]
+
+\end{theindex}
diff --git a/Build/source/texk/upmendex/tests/pprecA-2.ind b/Build/source/texk/upmendex/tests/pprecA-2.ind
new file mode 100644
index 00000000000..52d35cb3d7d
--- /dev/null
+++ b/Build/source/texk/upmendex/tests/pprecA-2.ind
@@ -0,0 +1,5 @@
+\begin{theindex}
+
+ \item entryA[[delim0]]I[[sfx 3p]], 1[[sfx 3p]], i[[sfx 3p]]
+
+\end{theindex}
diff --git a/Build/source/texk/upmendex/tests/pprecA.idx b/Build/source/texk/upmendex/tests/pprecA.idx
new file mode 100644
index 00000000000..8e770b9d0d2
--- /dev/null
+++ b/Build/source/texk/upmendex/tests/pprecA.idx
@@ -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}
diff --git a/Build/source/texk/upmendex/tests/upmendex.test b/Build/source/texk/upmendex/tests/upmendex.test
index da75821d10e..99ec7f11c14 100755
--- a/Build/source/texk/upmendex/tests/upmendex.test
+++ b/Build/source/texk/upmendex/tests/upmendex.test
@@ -24,3 +24,13 @@ cat $srcdir/tests/uni.idx | \
>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
+