summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorTakuji Tanaka <ttk@t-lab.opal.ne.jp>2021-03-21 08:54:52 +0000
committerTakuji Tanaka <ttk@t-lab.opal.ne.jp>2021-03-21 08:54:52 +0000
commit14f747595ca6558b495c45aaf3bcdd54e0bf1800 (patch)
treeee0b3792fd89a27baa47ea224d88b251f098e2fc /Build
parent1f5fe3a3717f4afa6c1c38e67804612d2e915161 (diff)
mendexk: Fix a bug about page_precedence in style
git-svn-id: svn://tug.org/texlive/trunk@58575 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/mendexk/ChangeLog12
-rw-r--r--Build/source/texk/mendexk/Makefile.am6
-rw-r--r--Build/source/texk/mendexk/Makefile.in6
-rwxr-xr-xBuild/source/texk/mendexk/configure24
-rw-r--r--Build/source/texk/mendexk/configure.ac2
-rw-r--r--Build/source/texk/mendexk/fread.c20
-rwxr-xr-xBuild/source/texk/mendexk/tests/mendex.test10
-rw-r--r--Build/source/texk/mendexk/tests/pprec0.ist11
-rw-r--r--Build/source/texk/mendexk/tests/pprec1.ist11
-rw-r--r--Build/source/texk/mendexk/tests/pprec2.ist11
-rw-r--r--Build/source/texk/mendexk/tests/pprecA-0.ind5
-rw-r--r--Build/source/texk/mendexk/tests/pprecA-1.ind5
-rw-r--r--Build/source/texk/mendexk/tests/pprecA-2.ind5
-rw-r--r--Build/source/texk/mendexk/tests/pprecA.idx9
-rw-r--r--Build/source/texk/mendexk/version.h2
15 files changed, 113 insertions, 26 deletions
diff --git a/Build/source/texk/mendexk/ChangeLog b/Build/source/texk/mendexk/ChangeLog
index 447c678b823..6f5e19b84cf 100644
--- a/Build/source/texk/mendexk/ChangeLog
+++ b/Build/source/texk/mendexk/ChangeLog
@@ -1,7 +1,13 @@
-2020-01-16 Karl Berry <karl@freefriends.org>
+2021-03-21 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
- * COPYRIGHT,
- * main.c: 2021.
+ * main.c, configure.ac, version.h:
+ Version 3.3 [21-Mar-2021].
+ * main.c, COPYRIGHT: Update 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/mendex.test, Makefile.am:
+ Add new tests.
2020-05-01 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
diff --git a/Build/source/texk/mendexk/Makefile.am b/Build/source/texk/mendexk/Makefile.am
index d031b90e50d..d3f6c148c28 100644
--- a/Build/source/texk/mendexk/Makefile.am
+++ b/Build/source/texk/mendexk/Makefile.am
@@ -57,6 +57,8 @@ EXTRA_DIST += $(TESTS)
## tests/mendex.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/mendexk/Makefile.in b/Build/source/texk/mendexk/Makefile.in
index 8a7551aaa83..6804e8091a6 100644
--- a/Build/source/texk/mendexk/Makefile.in
+++ b/Build/source/texk/mendexk/Makefile.in
@@ -581,9 +581,11 @@ dist_man1_MANS = mendex.1
EXTRA_DIST = COPYRIGHT COPYRIGHT.ja ChangeLog.ja indexsty \
mendex.ja.txt mendex.1 mendex.1.ja $(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/mendex.test
-DISTCLEANFILES = foo.* uni.*
+DISTCLEANFILES = foo.* uni.* pprec*.*
all: c-auto.h
$(MAKE) $(AM_MAKEFLAGS) all-am
diff --git a/Build/source/texk/mendexk/configure b/Build/source/texk/mendexk/configure
index 3b940d28399..ca765187e71 100755
--- a/Build/source/texk/mendexk/configure
+++ b/Build/source/texk/mendexk/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for mendex (TeX Live) 3.2.
+# Generated by GNU Autoconf 2.69 for mendex (TeX Live) 3.3.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='mendex (TeX Live)'
PACKAGE_TARNAME='mendex--tex-live-'
-PACKAGE_VERSION='3.2'
-PACKAGE_STRING='mendex (TeX Live) 3.2'
+PACKAGE_VERSION='3.3'
+PACKAGE_STRING='mendex (TeX Live) 3.3'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1329,7 +1329,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 mendex (TeX Live) 3.2 to adapt to many kinds of systems.
+\`configure' configures mendex (TeX Live) 3.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1400,7 +1400,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of mendex (TeX Live) 3.2:";;
+ short | recursive ) echo "Configuration of mendex (TeX Live) 3.3:";;
esac
cat <<\_ACEOF
@@ -1521,7 +1521,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-mendex (TeX Live) configure 3.2
+mendex (TeX Live) configure 3.3
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2173,7 +2173,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 mendex (TeX Live) $as_me 3.2, which was
+It was created by mendex (TeX Live) $as_me 3.3, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -7855,7 +7855,7 @@ fi
# Define the identity of the package.
PACKAGE='mendex--tex-live-'
- VERSION='3.2'
+ VERSION='3.3'
# Some tools Automake needs.
@@ -13455,7 +13455,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
@@ -13907,7 +13907,7 @@ Usage: $0 [OPTIONS]
Report bugs to <bug-libtool@gnu.org>."
lt_cl_version="\
-mendex (TeX Live) config.lt 3.2
+mendex (TeX Live) config.lt 3.3
configured by $0, generated by GNU Autoconf 2.69.
Copyright (C) 2011 Free Software Foundation, Inc.
@@ -15516,7 +15516,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 mendex (TeX Live) $as_me 3.2, which was
+This file was extended by mendex (TeX Live) $as_me 3.3, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -15582,7 +15582,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="\\
-mendex (TeX Live) config.status 3.2
+mendex (TeX Live) config.status 3.3
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/Build/source/texk/mendexk/configure.ac b/Build/source/texk/mendexk/configure.ac
index 89f48b15219..d6ce8301d47 100644
--- a/Build/source/texk/mendexk/configure.ac
+++ b/Build/source/texk/mendexk/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([mendex (TeX Live)], [3.2])
+AC_INIT([mendex (TeX Live)], [3.3])
AC_PREREQ([2.63])
AC_CONFIG_SRCDIR([main.c])
AC_CONFIG_AUX_DIR([../../build-aux])
diff --git a/Build/source/texk/mendexk/fread.c b/Build/source/texk/mendexk/fread.c
index 2a5deb2cd91..793bc4c593f 100644
--- a/Build/source/texk/mendexk/fread.c
+++ b/Build/source/texk/mendexk/fread.c
@@ -474,35 +474,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/mendexk/tests/mendex.test b/Build/source/texk/mendexk/tests/mendex.test
index 6c7fe0f42c4..df8658ceb7b 100755
--- a/Build/source/texk/mendexk/tests/mendex.test
+++ b/Build/source/texk/mendexk/tests/mendex.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
+./mendex -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
+
+./mendex -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
+
+./mendex -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
+
diff --git a/Build/source/texk/mendexk/tests/pprec0.ist b/Build/source/texk/mendexk/tests/pprec0.ist
new file mode 100644
index 00000000000..ec1242bbbad
--- /dev/null
+++ b/Build/source/texk/mendexk/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/mendexk/tests/pprec1.ist b/Build/source/texk/mendexk/tests/pprec1.ist
new file mode 100644
index 00000000000..8f9221ebce5
--- /dev/null
+++ b/Build/source/texk/mendexk/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/mendexk/tests/pprec2.ist b/Build/source/texk/mendexk/tests/pprec2.ist
new file mode 100644
index 00000000000..eeec1e95cfa
--- /dev/null
+++ b/Build/source/texk/mendexk/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/mendexk/tests/pprecA-0.ind b/Build/source/texk/mendexk/tests/pprecA-0.ind
new file mode 100644
index 00000000000..245eacacdd6
--- /dev/null
+++ b/Build/source/texk/mendexk/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/mendexk/tests/pprecA-1.ind b/Build/source/texk/mendexk/tests/pprecA-1.ind
new file mode 100644
index 00000000000..772e302d7c4
--- /dev/null
+++ b/Build/source/texk/mendexk/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/mendexk/tests/pprecA-2.ind b/Build/source/texk/mendexk/tests/pprecA-2.ind
new file mode 100644
index 00000000000..52d35cb3d7d
--- /dev/null
+++ b/Build/source/texk/mendexk/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/mendexk/tests/pprecA.idx b/Build/source/texk/mendexk/tests/pprecA.idx
new file mode 100644
index 00000000000..8e770b9d0d2
--- /dev/null
+++ b/Build/source/texk/mendexk/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/mendexk/version.h b/Build/source/texk/mendexk/version.h
index 5d2e795d5ea..64a0419d5af 100644
--- a/Build/source/texk/mendexk/version.h
+++ b/Build/source/texk/mendexk/version.h
@@ -1,2 +1,2 @@
-#define VERSION "version " PACKAGE_VERSION " [16-Jan-2020]"
+#define VERSION "version " PACKAGE_VERSION " [21-Mar-2021]"
#define BUG_ADDRESS "issue@texjp.org"