texlive[63363] Build/source/texk/upmendex: upmendex: Improve
commits+takuji at tug.org
commits+takuji at tug.org
Sun May 22 14:54:30 CEST 2022
Revision: 63363
http://tug.org/svn/texlive?view=revision&revision=63363
Author: takuji
Date: 2022-05-22 14:54:30 +0200 (Sun, 22 May 2022)
Log Message:
-----------
upmendex: Improve heuristic detection of page number types
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/pprec5.ist
trunk/Build/source/texk/upmendex/tests/pprec6.ist
trunk/Build/source/texk/upmendex/tests/pprec7.ist
trunk/Build/source/texk/upmendex/tests/romalpA-5.ind
trunk/Build/source/texk/upmendex/tests/romalpA-6.ind
trunk/Build/source/texk/upmendex/tests/romalpA.idx
trunk/Build/source/texk/upmendex/tests/romalpB-5.ind
trunk/Build/source/texk/upmendex/tests/romalpB-6.ind
trunk/Build/source/texk/upmendex/tests/romalpB-7.ind
trunk/Build/source/texk/upmendex/tests/romalpB.idx
trunk/Build/source/texk/upmendex/tests/romalpC-5.ind
trunk/Build/source/texk/upmendex/tests/romalpC.idx
trunk/Build/source/texk/upmendex/tests/romalpD-5.ind
trunk/Build/source/texk/upmendex/tests/romalpD-6.ind
trunk/Build/source/texk/upmendex/tests/romalpD-7.ind
trunk/Build/source/texk/upmendex/tests/romalpD.idx
Modified: trunk/Build/source/texk/upmendex/ChangeLog
===================================================================
--- trunk/Build/source/texk/upmendex/ChangeLog 2022-05-22 12:54:25 UTC (rev 63362)
+++ trunk/Build/source/texk/upmendex/ChangeLog 2022-05-22 12:54:30 UTC (rev 63363)
@@ -1,3 +1,15 @@
+2022-05-22 TANAKA Takuji <ttk at t-lab.opal.ne.jp>
+
+ * version 1.01 Stable version.
+ * configure.ac: Bump version.
+ * fread.c:
+ Modify heuristic detection of page number types
+ for ambiguous ones between roman number and alphabet.
+ * tests/upmendex.test, tests/pprec[567].ist,
+ tests/romalp[ABCD].idx, tests/romalpA-[56].ind,
+ tests/romalp[BD]-[567].ind, tests/romalpC-5.ind, Makefile.am:
+ Update tests.
+
2022-03-21 Karl Berry <karl at tug.org>
* TL'22 release.
Modified: trunk/Build/source/texk/upmendex/Makefile.am
===================================================================
--- trunk/Build/source/texk/upmendex/Makefile.am 2022-05-22 12:54:25 UTC (rev 63362)
+++ trunk/Build/source/texk/upmendex/Makefile.am 2022-05-22 12:54:30 UTC (rev 63363)
@@ -57,7 +57,20 @@
## tests/upmendex.test
EXTRA_DIST += tests/foo.idx tests/foo.ind \
- 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*.*
+ tests/uni.idx tests/uni.dict tests/uni.ist \
+ tests/uni1.ist tests/uni2.ist tests/uni.ind \
+ tests/range.idx tests/range2.ist tests/range2.ist tests/range3.ist \
+ tests/range1.ind tests/range2.ind tests/range3.ind \
+ tests/pprec0.ist tests/pprec1.ist tests/pprec2.ist tests/pprec3.ist \
+ tests/pprec4.ist tests/pprec5.ist tests/pprec6.ist tests/pprec7.ist \
+ tests/pprecA.idx tests/pprecA-0.ind tests/pprecA-1.ind tests/pprecA-2.ind \
+ tests/pprecB.idx tests/pprecB-0.ind tests/pprecB-3.ind tests/pprecB-4.ind \
+ tests/romalpA.idx tests/romalpA-5.ind tests/romalpA-6.ind \
+ tests/romalpB.idx tests/romalpB-5.ind tests/romalpB-6.ind tests/romalpB-7.ind \
+ tests/romalpC.idx tests/romalpC-5.ind \
+ tests/romalpD.idx tests/romalpD-5.ind tests/romalpD-6.ind tests/romalpD-7.ind
+DISTCLEANFILES = foo.* uni.* range*.* pprec*.* romalp*.*
+EXTRA_DIST += tests/locale1.ist tests/locale2.ist tests/rule.idx \
+ tests/attr1.ist tests/attr1.ind tests/locale1.ind tests/locale2-rule.ind \
+ tests/rule1.ist tests/rule2.ist tests/rule3.ist tests/rule4.ist rule.ind
+DISTCLEANFILES += locale*.* attr*.* rule*.*
Modified: trunk/Build/source/texk/upmendex/Makefile.in
===================================================================
--- trunk/Build/source/texk/upmendex/Makefile.in 2022-05-22 12:54:25 UTC (rev 63362)
+++ trunk/Build/source/texk/upmendex/Makefile.in 2022-05-22 12:54:30 UTC (rev 63363)
@@ -609,11 +609,26 @@
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/pprec0.ist tests/pprec1.ist \
- tests/pprec2.ist tests/pprecA.idx tests/pprecA-0.ind \
- tests/pprecA-1.ind tests/pprecA-2.ind
+ tests/uni1.ist tests/uni2.ist tests/uni.ind tests/range.idx \
+ tests/range2.ist tests/range2.ist tests/range3.ist \
+ tests/range1.ind tests/range2.ind tests/range3.ind \
+ tests/pprec0.ist tests/pprec1.ist tests/pprec2.ist \
+ tests/pprec3.ist tests/pprec4.ist tests/pprec5.ist \
+ tests/pprec6.ist tests/pprec7.ist tests/pprecA.idx \
+ tests/pprecA-0.ind tests/pprecA-1.ind tests/pprecA-2.ind \
+ tests/pprecB.idx tests/pprecB-0.ind tests/pprecB-3.ind \
+ tests/pprecB-4.ind tests/romalpA.idx tests/romalpA-5.ind \
+ tests/romalpA-6.ind tests/romalpB.idx tests/romalpB-5.ind \
+ tests/romalpB-6.ind tests/romalpB-7.ind tests/romalpC.idx \
+ tests/romalpC-5.ind tests/romalpD.idx tests/romalpD-5.ind \
+ tests/romalpD-6.ind tests/romalpD-7.ind tests/locale1.ist \
+ tests/locale2.ist tests/rule.idx tests/attr1.ist \
+ tests/attr1.ind tests/locale1.ind tests/locale2-rule.ind \
+ tests/rule1.ist tests/rule2.ist tests/rule3.ist \
+ tests/rule4.ist rule.ind
TESTS = tests/upmendex.test
-DISTCLEANFILES = foo.* uni.* pprec*.*
+DISTCLEANFILES = foo.* uni.* range*.* pprec*.* romalp*.* locale*.* \
+ attr*.* rule*.*
all: c-auto.h
$(MAKE) $(AM_MAKEFLAGS) all-am
Modified: trunk/Build/source/texk/upmendex/configure
===================================================================
--- trunk/Build/source/texk/upmendex/configure 2022-05-22 12:54:25 UTC (rev 63362)
+++ trunk/Build/source/texk/upmendex/configure 2022-05-22 12:54:30 UTC (rev 63363)
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for upmendex (TeX Live) 1.00.
+# Generated by GNU Autoconf 2.71 for upmendex (TeX Live) 1.01.
#
#
# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
@@ -626,8 +626,8 @@
# Identity of this package.
PACKAGE_NAME='upmendex (TeX Live)'
PACKAGE_TARNAME='upmendex--tex-live-'
-PACKAGE_VERSION='1.00'
-PACKAGE_STRING='upmendex (TeX Live) 1.00'
+PACKAGE_VERSION='1.01'
+PACKAGE_STRING='upmendex (TeX Live) 1.01'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1390,7 +1390,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) 1.00 to adapt to many kinds of systems.
+\`configure' configures upmendex (TeX Live) 1.01 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1462,7 +1462,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of upmendex (TeX Live) 1.00:";;
+ short | recursive ) echo "Configuration of upmendex (TeX Live) 1.01:";;
esac
cat <<\_ACEOF
@@ -1587,7 +1587,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-upmendex (TeX Live) configure 1.00
+upmendex (TeX Live) configure 1.01
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2268,7 +2268,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 1.00, which was
+It was created by upmendex (TeX Live) $as_me 1.01, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
@@ -8806,7 +8806,7 @@
# Define the identity of the package.
PACKAGE='upmendex--tex-live-'
- VERSION='1.00'
+ VERSION='1.01'
# Some tools Automake needs.
@@ -18942,7 +18942,7 @@
Report bugs to <bug-libtool at gnu.org>."
lt_cl_version="\
-upmendex (TeX Live) config.lt 1.00
+upmendex (TeX Live) config.lt 1.01
configured by $0, generated by GNU Autoconf 2.71.
Copyright (C) 2011 Free Software Foundation, Inc.
@@ -21114,7 +21114,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 1.00, which was
+This file was extended by upmendex (TeX Live) $as_me 1.01, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -21182,7 +21182,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-upmendex (TeX Live) config.status 1.00
+upmendex (TeX Live) config.status 1.01
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
Modified: trunk/Build/source/texk/upmendex/configure.ac
===================================================================
--- trunk/Build/source/texk/upmendex/configure.ac 2022-05-22 12:54:25 UTC (rev 63362)
+++ trunk/Build/source/texk/upmendex/configure.ac 2022-05-22 12:54:30 UTC (rev 63363)
@@ -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)],[1.00])
+AC_INIT([upmendex (TeX Live)],[1.01])
AC_PREREQ([2.71])
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 2022-05-22 12:54:25 UTC (rev 63362)
+++ trunk/Build/source/texk/upmendex/fread.c 2022-05-22 12:54:30 UTC (rev 63363)
@@ -268,7 +268,7 @@
nest++;
else if (buff[j]==arg_close) {
if (nest==0) {
- table[k]='\0';
+ table[k]='\0';
ind[0].p[0].page=xstrdup(table);
break;
}
@@ -495,6 +495,7 @@
{
int i,j,cc=0,cnt,pplen,pclen;
char buff[16],*pcpos,*page0;
+ static char pattr_prev[PAGE_COMPOSIT_DEPTH] = {0};
pplen=strlen(page_precedence);
pclen=strlen(page_compositor);
@@ -538,23 +539,25 @@
switch(page_precedence[pattr[cc]]) {
case 'r':
if (strchr("ivxlcdm",*page0)==NULL ||
- (strchr("lcdm",*page0) && strchr(page_precedence,'a') && strlen(buff)==1 && pcpos)) {
+ (strchr("lcdm",*page0) && strchr(page_precedence,'a') && strlen(buff)==1 &&
+ pattr_prev[cc]!='r')) {
/* heuristic detection as alphabet since L=50, C=100, D=100, M=1000 are quite large */
if (pattr[cc]<pplen-1)
pattr[cc]++;
else pattr[cc]=0;
- for (j=cc+1;j<3;j++) pattr[j]=0;
+ for (j=cc+1;j<PAGE_COMPOSIT_DEPTH;j++) pattr[j]=0;
goto ATTRLOOP;
}
break;
case 'R':
if (strchr("IVXLCDM",*page0)==NULL ||
- (strchr("LCDM",*page0) && strchr(page_precedence,'A') && strlen(buff)==1 && pcpos)) {
+ (strchr("LCDM",*page0) && strchr(page_precedence,'A') && strlen(buff)==1 &&
+ pattr_prev[cc]!='R')) {
/* heuristic detection as alphabet since L=50, C=100, D=100, M=1000 are quite large */
if (pattr[cc]<pplen-1)
pattr[cc]++;
else pattr[cc]=0;
- for (j=cc+1;j<3;j++) pattr[j]=0;
+ for (j=cc+1;j<PAGE_COMPOSIT_DEPTH;j++) pattr[j]=0;
goto ATTRLOOP;
}
break;
@@ -563,29 +566,31 @@
if (pattr[cc]<pplen-1)
pattr[cc]++;
else pattr[cc]=0;
- for (j=cc+1;j<3;j++) pattr[j]=0;
+ for (j=cc+1;j<PAGE_COMPOSIT_DEPTH;j++) pattr[j]=0;
goto ATTRLOOP;
}
break;
case 'a':
if (*page0<'a' || *page0>'z' || strlen(buff)>1 ||
- (strchr("ivx",*page0) && strchr(page_precedence,'r') && !pcpos)) {
+ (strchr("ivx",*page0) && strchr(page_precedence,'r') &&
+ pattr_prev[cc]!='a')) {
/* heuristic detection as roman number since I=1, V=5, X=10 are quite small */
if (pattr[cc]<pplen-1)
pattr[cc]++;
else pattr[cc]=0;
- for (j=cc+1;j<3;j++) pattr[j]=0;
+ for (j=cc+1;j<PAGE_COMPOSIT_DEPTH;j++) pattr[j]=0;
goto ATTRLOOP;
}
break;
case 'A':
if (*page0<'A' || *page0>'Z' || strlen(buff)>1 ||
- (strchr("IVX",*page0) && strchr(page_precedence,'R') && !pcpos)) {
+ (strchr("IVX",*page0) && strchr(page_precedence,'R') &&
+ pattr_prev[cc]!='A')) {
/* heuristic detection as roman number since I=1, V=5, X=10 are quite small */
if (pattr[cc]<pplen-1)
pattr[cc]++;
else pattr[cc]=0;
- for (j=cc+1;j<3;j++) pattr[j]=0;
+ for (j=cc+1;j<PAGE_COMPOSIT_DEPTH;j++) pattr[j]=0;
goto ATTRLOOP;
}
break;
@@ -594,6 +599,7 @@
page_precedence[pattr[cc]], page_precedence);
exit(253);
}
+ pattr_prev[cc] = page_precedence[pattr[cc]];
}
}
p->attr[cc]=pattr[cc];
Added: trunk/Build/source/texk/upmendex/tests/pprec5.ist
===================================================================
--- trunk/Build/source/texk/upmendex/tests/pprec5.ist (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/pprec5.ist 2022-05-22 12:54:30 UTC (rev 63363)
@@ -0,0 +1,3 @@
+% page_precedence "rnaRA"
+
+line_max 299
Added: trunk/Build/source/texk/upmendex/tests/pprec6.ist
===================================================================
--- trunk/Build/source/texk/upmendex/tests/pprec6.ist (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/pprec6.ist 2022-05-22 12:54:30 UTC (rev 63363)
@@ -0,0 +1,3 @@
+page_precedence "rnR"
+
+line_max 299
Added: trunk/Build/source/texk/upmendex/tests/pprec7.ist
===================================================================
--- trunk/Build/source/texk/upmendex/tests/pprec7.ist (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/pprec7.ist 2022-05-22 12:54:30 UTC (rev 63363)
@@ -0,0 +1,3 @@
+page_precedence "naA"
+
+line_max 299
Added: trunk/Build/source/texk/upmendex/tests/romalpA-5.ind
===================================================================
--- trunk/Build/source/texk/upmendex/tests/romalpA-5.ind (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/romalpA-5.ind 2022-05-22 12:54:30 UTC (rev 63363)
@@ -0,0 +1,5 @@
+\begin{theindex}
+
+ \item foo, I-13, I-15--I-17, II-10, II-20, II-30
+
+\end{theindex}
Added: trunk/Build/source/texk/upmendex/tests/romalpA-6.ind
===================================================================
--- trunk/Build/source/texk/upmendex/tests/romalpA-6.ind (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/romalpA-6.ind 2022-05-22 12:54:30 UTC (rev 63363)
@@ -0,0 +1,5 @@
+\begin{theindex}
+
+ \item foo, I-13, I-15--I-17, II-10, II-20, II-30
+
+\end{theindex}
Added: trunk/Build/source/texk/upmendex/tests/romalpA.idx
===================================================================
--- trunk/Build/source/texk/upmendex/tests/romalpA.idx (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/romalpA.idx 2022-05-22 12:54:30 UTC (rev 63363)
@@ -0,0 +1,7 @@
+\indexentry{foo}{I-13}
+\indexentry{foo}{I-15}
+\indexentry{foo}{I-16}
+\indexentry{foo}{I-17}
+\indexentry{foo}{II-10}
+\indexentry{foo}{II-20}
+\indexentry{foo}{II-30}
Added: trunk/Build/source/texk/upmendex/tests/romalpB-5.ind
===================================================================
--- trunk/Build/source/texk/upmendex/tests/romalpB-5.ind (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/romalpB-5.ind 2022-05-22 12:54:30 UTC (rev 63363)
@@ -0,0 +1,14 @@
+\begin{theindex}
+
+ \item bar, I-i-10-C-c, I-i-20-C-c, I-v-10-C-c, I-v-20-C-c, I-x-10-C-c, I-x-20-C-c, I-l-10-C-c, I-l-20-C-c, I-c-10-C-c, I-c-20-C-c, I-d-10-C-c, I-d-20-C-c, I-m-10-C-c, I-m-20-C-c
+ \item baz, I-i-10-C-c, I-i-10-D-c, I-i-10-I-c, I-i-10-L-c, I-i-10-M-c, I-i-10-V-c, I-i-10-X-c, I-i-20-C-c, I-i-20-D-c, I-i-20-I-c, I-i-20-L-c, I-i-20-M-c, I-i-20-V-c, I-i-20-X-c
+
+ \indexspace
+
+ \item foo, I-i-10-C-c, I-i-20-C-c, V-i-10-C-c, V-i-20-C-c, X-i-10-C-c, X-i-20-C-c, L-i-10-C-c, L-i-20-C-c, C-i-10-C-c, C-i-20-C-c, D-i-10-C-c, D-i-20-C-c, M-i-10-C-c, M-i-20-C-c
+
+ \indexspace
+
+ \item qux, I-i-10-C-c, I-i-10-C-d, I-i-10-C-i, I-i-10-C-l, I-i-10-C-m, I-i-10-C-v, I-i-10-C-x, I-i-20-C-c, I-i-20-C-d, I-i-20-C-i, I-i-20-C-l, I-i-20-C-m, I-i-20-C-v, I-i-20-C-x
+
+\end{theindex}
Added: trunk/Build/source/texk/upmendex/tests/romalpB-6.ind
===================================================================
--- trunk/Build/source/texk/upmendex/tests/romalpB-6.ind (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/romalpB-6.ind 2022-05-22 12:54:30 UTC (rev 63363)
@@ -0,0 +1,14 @@
+\begin{theindex}
+
+ \item bar, I-i-10-C-c, I-i-20-C-c, I-v-10-C-c, I-v-20-C-c, I-x-10-C-c, I-x-20-C-c, I-l-10-C-c, I-l-20-C-c, I-c-10-C-c, I-c-20-C-c, I-d-10-C-c, I-d-20-C-c, I-m-10-C-c, I-m-20-C-c
+ \item baz, I-i-10-I-c, I-i-10-V-c, I-i-10-X-c, I-i-10-L-c, I-i-10-C-c, I-i-10-D-c, I-i-10-M-c, I-i-20-I-c, I-i-20-V-c, I-i-20-X-c, I-i-20-L-c, I-i-20-C-c, I-i-20-D-c, I-i-20-M-c
+
+ \indexspace
+
+ \item foo, I-i-10-C-c, I-i-20-C-c, V-i-10-C-c, V-i-20-C-c, X-i-10-C-c, X-i-20-C-c, L-i-10-C-c, L-i-20-C-c, C-i-10-C-c, C-i-20-C-c, D-i-10-C-c, D-i-20-C-c, M-i-10-C-c, M-i-20-C-c
+
+ \indexspace
+
+ \item qux, I-i-10-C-i, I-i-10-C-v, I-i-10-C-x, I-i-10-C-l, I-i-10-C-c, I-i-10-C-d, I-i-10-C-m, I-i-20-C-i, I-i-20-C-v, I-i-20-C-x, I-i-20-C-l, I-i-20-C-c, I-i-20-C-d, I-i-20-C-m
+
+\end{theindex}
Added: trunk/Build/source/texk/upmendex/tests/romalpB-7.ind
===================================================================
--- trunk/Build/source/texk/upmendex/tests/romalpB-7.ind (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/romalpB-7.ind 2022-05-22 12:54:30 UTC (rev 63363)
@@ -0,0 +1,14 @@
+\begin{theindex}
+
+ \item bar, I-c-10-C-c, I-c-20-C-c, I-d-10-C-c, I-d-20-C-c, I-i-10-C-c, I-i-20-C-c, I-l-10-C-c, I-l-20-C-c, I-m-10-C-c, I-m-20-C-c, I-v-10-C-c, I-v-20-C-c, I-x-10-C-c, I-x-20-C-c
+ \item baz, I-i-10-C-c, I-i-10-D-c, I-i-10-I-c, I-i-10-L-c, I-i-10-M-c, I-i-10-V-c, I-i-10-X-c, I-i-20-C-c, I-i-20-D-c, I-i-20-I-c, I-i-20-L-c, I-i-20-M-c, I-i-20-V-c, I-i-20-X-c
+
+ \indexspace
+
+ \item foo, C-i-10-C-c, C-i-20-C-c, D-i-10-C-c, D-i-20-C-c, I-i-10-C-c, I-i-20-C-c, L-i-10-C-c, L-i-20-C-c, M-i-10-C-c, M-i-20-C-c, V-i-10-C-c, V-i-20-C-c, X-i-10-C-c, X-i-20-C-c
+
+ \indexspace
+
+ \item qux, I-i-10-C-c, I-i-10-C-d, I-i-10-C-i, I-i-10-C-l, I-i-10-C-m, I-i-10-C-v, I-i-10-C-x, I-i-20-C-c, I-i-20-C-d, I-i-20-C-i, I-i-20-C-l, I-i-20-C-m, I-i-20-C-v, I-i-20-C-x
+
+\end{theindex}
Added: trunk/Build/source/texk/upmendex/tests/romalpB.idx
===================================================================
--- trunk/Build/source/texk/upmendex/tests/romalpB.idx (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/romalpB.idx 2022-05-22 12:54:30 UTC (rev 63363)
@@ -0,0 +1,60 @@
+\indexentry{foo}{I-i-10-C-c}
+\indexentry{foo}{I-i-20-C-c}
+\indexentry{foo}{V-i-10-C-c}
+\indexentry{foo}{V-i-20-C-c}
+\indexentry{foo}{X-i-10-C-c}
+\indexentry{foo}{X-i-20-C-c}
+\indexentry{foo}{L-i-10-C-c}
+\indexentry{foo}{L-i-20-C-c}
+\indexentry{foo}{C-i-10-C-c}
+\indexentry{foo}{C-i-20-C-c}
+\indexentry{foo}{D-i-10-C-c}
+\indexentry{foo}{D-i-20-C-c}
+\indexentry{foo}{M-i-10-C-c}
+\indexentry{foo}{M-i-20-C-c}
+
+\indexentry{bar}{I-i-10-C-c}
+\indexentry{bar}{I-i-20-C-c}
+\indexentry{bar}{I-v-10-C-c}
+\indexentry{bar}{I-v-20-C-c}
+\indexentry{bar}{I-x-10-C-c}
+\indexentry{bar}{I-x-20-C-c}
+\indexentry{bar}{I-l-10-C-c}
+\indexentry{bar}{I-l-20-C-c}
+\indexentry{bar}{I-c-10-C-c}
+\indexentry{bar}{I-c-20-C-c}
+\indexentry{bar}{I-d-10-C-c}
+\indexentry{bar}{I-d-20-C-c}
+\indexentry{bar}{I-m-10-C-c}
+\indexentry{bar}{I-m-20-C-c}
+
+\indexentry{baz}{I-i-10-C-c}
+\indexentry{baz}{I-i-20-C-c}
+\indexentry{baz}{I-i-10-D-c}
+\indexentry{baz}{I-i-20-D-c}
+\indexentry{baz}{I-i-10-I-c}
+\indexentry{baz}{I-i-20-I-c}
+\indexentry{baz}{I-i-10-L-c}
+\indexentry{baz}{I-i-20-L-c}
+\indexentry{baz}{I-i-10-M-c}
+\indexentry{baz}{I-i-20-M-c}
+\indexentry{baz}{I-i-10-V-c}
+\indexentry{baz}{I-i-20-V-c}
+\indexentry{baz}{I-i-10-X-c}
+\indexentry{baz}{I-i-20-X-c}
+
+\indexentry{qux}{I-i-10-C-c}
+\indexentry{qux}{I-i-20-C-c}
+\indexentry{qux}{I-i-10-C-d}
+\indexentry{qux}{I-i-20-C-d}
+\indexentry{qux}{I-i-10-C-i}
+\indexentry{qux}{I-i-20-C-i}
+\indexentry{qux}{I-i-10-C-l}
+\indexentry{qux}{I-i-20-C-l}
+\indexentry{qux}{I-i-10-C-m}
+\indexentry{qux}{I-i-20-C-m}
+\indexentry{qux}{I-i-10-C-v}
+\indexentry{qux}{I-i-20-C-v}
+\indexentry{qux}{I-i-10-C-x}
+\indexentry{qux}{I-i-20-C-x}
+
Added: trunk/Build/source/texk/upmendex/tests/romalpC-5.ind
===================================================================
--- trunk/Build/source/texk/upmendex/tests/romalpC-5.ind (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/romalpC-5.ind 2022-05-22 12:54:30 UTC (rev 63363)
@@ -0,0 +1,14 @@
+\begin{theindex}
+
+ \item bar, I-i-10-C-c, I-i-20-C-c, I-ii-10-C-c, I-ii-20-C-c, I-iii-10-C-c, I-iii-20-C-c, I-v-10-C-c, I-v-20-C-c, I-x-10-C-c, I-x-20-C-c, I-l-10-C-c, I-l-20-C-c, I-c-10-C-c, I-c-20-C-c, I-d-10-C-c, I-d-20-C-c, I-m-10-C-c, I-m-20-C-c
+ \item baz, I-i-10-A-c, I-i-10-B-c, I-i-10-C-c, I-i-10-D-c, I-i-10-I-c, I-i-10-L-c, I-i-10-M-c, I-i-10-V-c, I-i-10-X-c, I-i-20-A-c, I-i-20-B-c, I-i-20-C-c, I-i-20-D-c, I-i-20-I-c, I-i-20-L-c, I-i-20-M-c, I-i-20-V-c, I-i-20-X-c
+
+ \indexspace
+
+ \item foo, I-i-10-C-c, I-i-20-C-c, II-i-10-C-c, II-i-20-C-c, III-i-10-C-c, III-i-20-C-c, V-i-10-C-c, V-i-20-C-c, X-i-10-C-c, X-i-20-C-c, L-i-10-C-c, L-i-20-C-c, C-i-10-C-c, C-i-20-C-c, D-i-10-C-c, D-i-20-C-c, M-i-10-C-c, M-i-20-C-c
+
+ \indexspace
+
+ \item qux, I-i-10-C-a--I-i-10-C-d, I-i-10-C-i, I-i-10-C-l, I-i-10-C-m, I-i-10-C-v, I-i-10-C-x, I-i-20-C-a--I-i-20-C-d, I-i-20-C-i, I-i-20-C-l, I-i-20-C-m, I-i-20-C-v, I-i-20-C-x
+
+\end{theindex}
Added: trunk/Build/source/texk/upmendex/tests/romalpC.idx
===================================================================
--- trunk/Build/source/texk/upmendex/tests/romalpC.idx (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/romalpC.idx 2022-05-22 12:54:30 UTC (rev 63363)
@@ -0,0 +1,76 @@
+\indexentry{foo}{I-i-10-C-c}
+\indexentry{foo}{I-i-20-C-c}
+\indexentry{foo}{II-i-10-C-c}
+\indexentry{foo}{II-i-20-C-c}
+\indexentry{foo}{III-i-10-C-c}
+\indexentry{foo}{III-i-20-C-c}
+\indexentry{foo}{V-i-10-C-c}
+\indexentry{foo}{V-i-20-C-c}
+\indexentry{foo}{X-i-10-C-c}
+\indexentry{foo}{X-i-20-C-c}
+\indexentry{foo}{L-i-10-C-c}
+\indexentry{foo}{L-i-20-C-c}
+\indexentry{foo}{C-i-10-C-c}
+\indexentry{foo}{C-i-20-C-c}
+\indexentry{foo}{D-i-10-C-c}
+\indexentry{foo}{D-i-20-C-c}
+\indexentry{foo}{M-i-10-C-c}
+\indexentry{foo}{M-i-20-C-c}
+
+\indexentry{bar}{I-i-10-C-c}
+\indexentry{bar}{I-i-20-C-c}
+\indexentry{bar}{I-ii-10-C-c}
+\indexentry{bar}{I-ii-20-C-c}
+\indexentry{bar}{I-iii-10-C-c}
+\indexentry{bar}{I-iii-20-C-c}
+\indexentry{bar}{I-v-10-C-c}
+\indexentry{bar}{I-v-20-C-c}
+\indexentry{bar}{I-x-10-C-c}
+\indexentry{bar}{I-x-20-C-c}
+\indexentry{bar}{I-l-10-C-c}
+\indexentry{bar}{I-l-20-C-c}
+\indexentry{bar}{I-c-10-C-c}
+\indexentry{bar}{I-c-20-C-c}
+\indexentry{bar}{I-d-10-C-c}
+\indexentry{bar}{I-d-20-C-c}
+\indexentry{bar}{I-m-10-C-c}
+\indexentry{bar}{I-m-20-C-c}
+
+\indexentry{baz}{I-i-10-A-c}
+\indexentry{baz}{I-i-20-A-c}
+\indexentry{baz}{I-i-10-B-c}
+\indexentry{baz}{I-i-20-B-c}
+\indexentry{baz}{I-i-10-C-c}
+\indexentry{baz}{I-i-20-C-c}
+\indexentry{baz}{I-i-10-D-c}
+\indexentry{baz}{I-i-20-D-c}
+\indexentry{baz}{I-i-10-I-c}
+\indexentry{baz}{I-i-20-I-c}
+\indexentry{baz}{I-i-10-L-c}
+\indexentry{baz}{I-i-20-L-c}
+\indexentry{baz}{I-i-10-M-c}
+\indexentry{baz}{I-i-20-M-c}
+\indexentry{baz}{I-i-10-V-c}
+\indexentry{baz}{I-i-20-V-c}
+\indexentry{baz}{I-i-10-X-c}
+\indexentry{baz}{I-i-20-X-c}
+
+\indexentry{qux}{I-i-10-C-a}
+\indexentry{qux}{I-i-20-C-a}
+\indexentry{qux}{I-i-10-C-b}
+\indexentry{qux}{I-i-20-C-b}
+\indexentry{qux}{I-i-10-C-c}
+\indexentry{qux}{I-i-20-C-c}
+\indexentry{qux}{I-i-10-C-d}
+\indexentry{qux}{I-i-20-C-d}
+\indexentry{qux}{I-i-10-C-i}
+\indexentry{qux}{I-i-20-C-i}
+\indexentry{qux}{I-i-10-C-l}
+\indexentry{qux}{I-i-20-C-l}
+\indexentry{qux}{I-i-10-C-m}
+\indexentry{qux}{I-i-20-C-m}
+\indexentry{qux}{I-i-10-C-v}
+\indexentry{qux}{I-i-20-C-v}
+\indexentry{qux}{I-i-10-C-x}
+\indexentry{qux}{I-i-20-C-x}
+
Added: trunk/Build/source/texk/upmendex/tests/romalpD-5.ind
===================================================================
--- trunk/Build/source/texk/upmendex/tests/romalpD-5.ind (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/romalpD-5.ind 2022-05-22 12:54:30 UTC (rev 63363)
@@ -0,0 +1,9 @@
+\begin{theindex}
+
+ \item bar, 1--3, c, d, i, l, m, v, x, I, V, X, L, C, D, M
+
+ \indexspace
+
+ \item foo, i, v, x, l, c, d, m, 1--3, C, D, I, L, M, V, X
+
+\end{theindex}
Added: trunk/Build/source/texk/upmendex/tests/romalpD-6.ind
===================================================================
--- trunk/Build/source/texk/upmendex/tests/romalpD-6.ind (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/romalpD-6.ind 2022-05-22 12:54:30 UTC (rev 63363)
@@ -0,0 +1,9 @@
+\begin{theindex}
+
+ \item bar, i, v, x, l, c, d, m, 1--3, I, V, X, L, C, D, M
+
+ \indexspace
+
+ \item foo, i, v, x, l, c, d, m, 1--3, I, V, X, L, C, D, M
+
+\end{theindex}
Added: trunk/Build/source/texk/upmendex/tests/romalpD-7.ind
===================================================================
--- trunk/Build/source/texk/upmendex/tests/romalpD-7.ind (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/romalpD-7.ind 2022-05-22 12:54:30 UTC (rev 63363)
@@ -0,0 +1,9 @@
+\begin{theindex}
+
+ \item bar, 1--3, c, d, i, l, m, v, x, C, D, I, L, M, V, X
+
+ \indexspace
+
+ \item foo, 1--3, c, d, i, l, m, v, x, C, D, I, L, M, V, X
+
+\end{theindex}
Added: trunk/Build/source/texk/upmendex/tests/romalpD.idx
===================================================================
--- trunk/Build/source/texk/upmendex/tests/romalpD.idx (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/romalpD.idx 2022-05-22 12:54:30 UTC (rev 63363)
@@ -0,0 +1,35 @@
+\indexentry{foo}{1}
+\indexentry{foo}{2}
+\indexentry{foo}{3}
+\indexentry{foo}{C}
+\indexentry{foo}{D}
+\indexentry{foo}{I}
+\indexentry{foo}{L}
+\indexentry{foo}{M}
+\indexentry{foo}{V}
+\indexentry{foo}{X}
+\indexentry{foo}{i}
+\indexentry{foo}{v}
+\indexentry{foo}{x}
+\indexentry{foo}{l}
+\indexentry{foo}{c}
+\indexentry{foo}{d}
+\indexentry{foo}{m}
+
+\indexentry{bar}{1}
+\indexentry{bar}{2}
+\indexentry{bar}{3}
+\indexentry{bar}{I}
+\indexentry{bar}{V}
+\indexentry{bar}{X}
+\indexentry{bar}{L}
+\indexentry{bar}{C}
+\indexentry{bar}{D}
+\indexentry{bar}{M}
+\indexentry{bar}{c}
+\indexentry{bar}{d}
+\indexentry{bar}{i}
+\indexentry{bar}{l}
+\indexentry{bar}{m}
+\indexentry{bar}{v}
+\indexentry{bar}{x}
Modified: trunk/Build/source/texk/upmendex/tests/upmendex.test
===================================================================
--- trunk/Build/source/texk/upmendex/tests/upmendex.test 2022-05-22 12:54:25 UTC (rev 63362)
+++ trunk/Build/source/texk/upmendex/tests/upmendex.test 2022-05-22 12:54:30 UTC (rev 63363)
@@ -1,6 +1,6 @@
#! /bin/sh -vx
# $Id$
-# Copyright 2017 Karl Berry <tex-live at tug.org>
+# Copyright 2017-2022 Karl Berry <tex-live at tug.org>
# Copyright 2013 Peter Breitenlohner <tex-live at tug.org>
# You may freely use, modify and/or distribute this file.
@@ -7,83 +7,97 @@
TEXMFCNF=$srcdir/../kpathsea
export TEXMFCNF
-rm -f foo.* uni.* range*.* pprec*.* locale*.* attr*.* rule*.*
+rm -f foo.* uni.* range*.* pprec*.* romalp*.* locale*.* attr*.* rule*.*
+rc=0
./upmendex $srcdir/tests/foo.idx -o foo.ind1 -t foo.ilg1 \
- && diff $srcdir/tests/foo.ind foo.ind1 || exit 1
+ && diff $srcdir/tests/foo.ind foo.ind1 || rc=1
cat $srcdir/tests/foo.idx | ./upmendex >foo.ind2 2>foo.ilg2 \
- && diff $srcdir/tests/foo.ind foo.ind2 || exit 1
+ && diff $srcdir/tests/foo.ind foo.ind2 || rc=2
./upmendex -d $srcdir/tests/uni.dict -s $srcdir/tests/uni.ist \
$srcdir/tests/uni.idx -o uni.ind1 -t uni.ilg1 \
- && diff $srcdir/tests/uni.ind uni.ind1 || exit 1
+ && diff $srcdir/tests/uni.ind uni.ind1 || rc=3
cat $srcdir/tests/uni.idx | \
./upmendex -d $srcdir/tests/uni.dict -s $srcdir/tests/uni.ist \
>uni.ind2 2>uni.ilg2 \
- && diff $srcdir/tests/uni.ind uni.ind2 || exit 1
+ && diff $srcdir/tests/uni.ind uni.ind2 || rc=4
./upmendex -d $srcdir/tests/uni.dict -s $srcdir/tests/uni1.ist -s $srcdir/tests/uni2.ist \
$srcdir/tests/uni.idx -o uni.ind3 -t uni.ilg3 \
- && diff $srcdir/tests/uni.ind uni.ind3 || exit 1
+ && diff $srcdir/tests/uni.ind uni.ind3 || rc=5
+
# test for range suffix_2p, suffix_3p, suffix_mp
-./upmendex -s $srcdir/tests/range1.ist $srcdir/tests/range.idx \
- -o range1.ind1 -t range1.ilg \
- && diff $srcdir/tests/range1.ind range1.ind1 || exit 1
+for num in 1 2 3; do
+./upmendex -s $srcdir/tests/range$num.ist $srcdir/tests/range.idx \
+ -o range$num.ind1 -t range$num.ilg \
+ && diff $srcdir/tests/range$num.ind range$num.ind1 || rc=6
+done
-./upmendex -s $srcdir/tests/range2.ist $srcdir/tests/range.idx \
- -o range2.ind1 -t range2.ilg \
- && diff $srcdir/tests/range2.ind range2.ind1 || exit 1
-./upmendex -s $srcdir/tests/range3.ist $srcdir/tests/range.idx \
- -o range3.ind1 -t range3.ilg \
- && diff $srcdir/tests/range3.ind range3.ind1 || exit 1
-
# test for page_precedence and suffix_3p
-./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
+sfx=A
+for num in 0 1 2; do
+./upmendex -s $srcdir/tests/pprec$num.ist $srcdir/tests/pprec$sfx.idx \
+ -o pprec$sfx-$num.ind1 -t pprec$sfx-$num.ilg \
+ && diff $srcdir/tests/pprec$sfx-$num.ind pprec$sfx-$num.ind1 || rc=7
+done
+sfx=B
+for num in 0 3 4; do
+./upmendex -s $srcdir/tests/pprec$num.ist $srcdir/tests/pprec$sfx.idx \
+ -o pprec$sfx-$num.ind1 -t pprec$sfx-$num.ilg \
+ && diff $srcdir/tests/pprec$sfx-$num.ind pprec$sfx-$num.ind1 || rc=8
+done
-./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
+# test for page_precedence, heuristic detection if a letter is Roman or Alpha
+sfx=A
+for num in 5 6; do
+./upmendex -s $srcdir/tests/pprec$num.ist $srcdir/tests/romalp$sfx.idx \
+ -o romalp$sfx-$num.ind1 -t romalp$sfx-$num.ilg \
+ && diff $srcdir/tests/romalp$sfx-$num.ind romalp$sfx-$num.ind1 || rc=9
+done
+sfx=B
+for num in 5 6 7; do
+./upmendex -s $srcdir/tests/pprec$num.ist $srcdir/tests/romalp$sfx.idx \
+ -o romalp$sfx-$num.ind1 -t romalp$sfx-$num.ilg \
+ && diff $srcdir/tests/romalp$sfx-$num.ind romalp$sfx-$num.ind1 || rc=10
+done
+sfx=C
+for num in 5; do
+./upmendex -s $srcdir/tests/pprec$num.ist $srcdir/tests/romalp$sfx.idx \
+ -o romalp$sfx-$num.ind1 -t romalp$sfx-$num.ilg \
+ && diff $srcdir/tests/romalp$sfx-$num.ind romalp$sfx-$num.ind1 || rc=11
+done
+sfx=D
+for num in 5 6 7; do
+./upmendex -s $srcdir/tests/pprec$num.ist $srcdir/tests/romalp$sfx.idx \
+ -o romalp$sfx-$num.ind1 -t romalp$sfx-$num.ilg \
+ && diff $srcdir/tests/romalp$sfx-$num.ind romalp$sfx-$num.ind1 || rc=12
+done
-./upmendex -s $srcdir/tests/pprec0.ist $srcdir/tests/pprecB.idx \
- -o pprecB-0.ind1 -t pprecB-0.ilg \
- && diff $srcdir/tests/pprecB-0.ind pprecB-0.ind1 || exit 1
-./upmendex -s $srcdir/tests/pprec3.ist $srcdir/tests/pprecB.idx \
- -o pprecB-3.ind1 -t pprecB-3.ilg \
- && diff $srcdir/tests/pprecB-3.ind pprecB-3.ind1 || exit 1
-
-./upmendex -s $srcdir/tests/pprec4.ist $srcdir/tests/pprecB.idx \
- -o pprecB-4.ind1 -t pprecB-4.ilg \
- && diff $srcdir/tests/pprecB-4.ind pprecB-4.ind1 || exit 1
-
# test for icu_locale
./upmendex -s $srcdir/tests/uni.ist -s $srcdir/tests/locale1.ist $srcdir/tests/rule.idx \
-o locale1.ind1 -t locale1.ilg \
- && diff $srcdir/tests/locale1.ind locale1.ind1 || exit 1
+ && diff $srcdir/tests/locale1.ind locale1.ind1 || rc=51
# test for icu_attributes
./upmendex -s $srcdir/tests/uni.ist -s $srcdir/tests/attr1.ist $srcdir/tests/rule.idx \
-o attr1.ind1 -t attr1.ilg \
- && diff $srcdir/tests/attr1.ind attr1.ind1 || exit 1
+ && diff $srcdir/tests/attr1.ind attr1.ind1 || rc=52
# test for icu_rules
./upmendex -s $srcdir/tests/uni.ist -s $srcdir/tests/rule1.ist $srcdir/tests/rule.idx \
-o rule1.ind1 -t rule1.ilg \
- && diff $srcdir/tests/rule.ind rule1.ind1 || exit 1
+ && diff $srcdir/tests/rule.ind rule1.ind1 || rc=53
./upmendex -s $srcdir/tests/uni.ist -s $srcdir/tests/rule2.ist $srcdir/tests/rule.idx \
-o rule2.ind1 -t rule2.ilg \
- && diff $srcdir/tests/rule.ind rule2.ind1 || exit 1
+ && diff $srcdir/tests/rule.ind rule2.ind1 || rc=54
# malformed input
./upmendex -s $srcdir/tests/uni.ist -s $srcdir/tests/rule3.ist $srcdir/tests/rule.idx \
@@ -107,4 +121,7 @@
# test for icu_locale + icu_rules
./upmendex -s $srcdir/tests/uni.ist -s $srcdir/tests/locale2.ist -s $srcdir/tests/rule1.ist $srcdir/tests/rule.idx \
-o locale2-rule1.ind1 -t locale2-rule1.ilg \
- && diff $srcdir/tests/locale2-rule.ind locale2-rule1.ind1 || exit 1
+ && diff $srcdir/tests/locale2-rule.ind locale2-rule1.ind1 || rc=55
+
+
+exit $rc
More information about the tex-live-commits
mailing list.