texlive[73836] Build/source/texk/upmendex: upmendex: version 1.11
commits+takuji at tug.org
commits+takuji at tug.org
Mon Feb 10 00:42:04 CET 2025
Revision: 73836
https://tug.org/svn/texlive?view=revision&revision=73836
Author: takuji
Date: 2025-02-10 00:42:04 +0100 (Mon, 10 Feb 2025)
Log Message:
-----------
upmendex: version 1.11
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/styfile.c
trunk/Build/source/texk/upmendex/tests/ok-tort.ind
trunk/Build/source/texk/upmendex/tests/tort.idx
trunk/Build/source/texk/upmendex/tests/tortW.idx
trunk/Build/source/texk/upmendex/tests/upmendex.test
Added Paths:
-----------
trunk/Build/source/texk/upmendex/tests/head1.ist
trunk/Build/source/texk/upmendex/tests/ok-tort2.ind
Modified: trunk/Build/source/texk/upmendex/ChangeLog
===================================================================
--- trunk/Build/source/texk/upmendex/ChangeLog 2025-02-09 23:41:59 UTC (rev 73835)
+++ trunk/Build/source/texk/upmendex/ChangeLog 2025-02-09 23:42:04 UTC (rev 73836)
@@ -1,3 +1,16 @@
+2025-02-10 TANAKA Takuji <ttk at t-lab.opal.ne.jp>
+
+ * version 1.11 Stable version.
+ * configure.ac: Bump version.
+ * fread.c: Improve compatibility with makeindex.
+ * styfile.c: Fix escaping of string parameters.
+ Thanks to Yukimasa Morimi.
+ https://github.com/texjporg/tex-jp-build/issues/173
+ * tests/upmendex.test, tests/head1.ist,
+ tests/tort{,W}.idx, tests/ok-tort{,2}.ind:
+ Add tests for encap escape & heading_{pre,post}fix.
+ * Makefile.am: Adjust.
+
2025-01-25 Karl Berry <karl at freefriends.org>
* COPYRIGHT,
@@ -10,7 +23,7 @@
* {mendex,var,exvar}.h, fread.c, fwrite.c, sort.c, styfile.c:
Support for indices with four sublevels,
conventionally two sublevels.
- Thanks to upll request by Sergei Golovan.
+ Thanks to pull request by Sergei Golovan.
https://github.com/t-tk/upmendex-package/pull/9
* fread.c: Improve error message when reading index entries.
https://github.com/t-tk/upmendex-package/issues/13
Modified: trunk/Build/source/texk/upmendex/Makefile.am
===================================================================
--- trunk/Build/source/texk/upmendex/Makefile.am 2025-02-09 23:41:59 UTC (rev 73835)
+++ trunk/Build/source/texk/upmendex/Makefile.am 2025-02-09 23:42:04 UTC (rev 73836)
@@ -62,8 +62,9 @@
EXTRA_DIST += tests/foo.idx tests/foo.ind \
tests/uni.idx tests/uni.dict tests/uni.ist \
tests/uni1.ist tests/uni2.ist tests/uni.ind \
- tests/tort.idx tests/tortW.idx tests/ok-tort.ind
-DISTCLEANFILES = foo.* uni.*
+ tests/tort.idx tests/tortW.idx tests/head1.ist \
+ tests/ok-tort.ind tests/ok-tort2.ind
+DISTCLEANFILES = foo.* uni.* tort*.*
## tests/pprec.test
EXTRA_DIST += tests/range.idx \
tests/range1.ist tests/range2.ist tests/range3.ist \
Modified: trunk/Build/source/texk/upmendex/Makefile.in
===================================================================
--- trunk/Build/source/texk/upmendex/Makefile.in 2025-02-09 23:41:59 UTC (rev 73835)
+++ trunk/Build/source/texk/upmendex/Makefile.in 2025-02-09 23:42:04 UTC (rev 73836)
@@ -623,23 +623,24 @@
EXTRA_DIST = COPYRIGHT indexsty upmendex.ja.txt $(TESTS) tests/foo.idx \
tests/foo.ind tests/uni.idx tests/uni.dict tests/uni.ist \
tests/uni1.ist tests/uni2.ist tests/uni.ind tests/tort.idx \
- tests/tortW.idx tests/ok-tort.ind tests/range.idx \
- tests/range1.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/nested3.ist \
- tests/nested3.ind tests/nested.ist tests/nested.ind \
- tests/toodeep.idx tests/locale1.ist tests/locale2.ist \
- tests/locale3.ist tests/rule.idx tests/attr1.ist \
- tests/attr1.ind tests/locale1.ind tests/locale2-rule.ind \
+ tests/tortW.idx tests/head1.ist tests/ok-tort.ind \
+ tests/ok-tort2.ind tests/range.idx tests/range1.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/nested3.ist tests/nested3.ind \
+ tests/nested.ist tests/nested.ind tests/toodeep.idx \
+ tests/locale1.ist tests/locale2.ist tests/locale3.ist \
+ tests/rule.idx tests/attr1.ist tests/attr1.ind \
+ tests/locale1.ind tests/locale2-rule.ind \
tests/locale3-rule.ind tests/rule1.ist tests/rule2.ist \
tests/rule3.ist tests/rule4.ist rule.ind
TESTS = tests/upmendex.test \
@@ -647,8 +648,8 @@
tests/nest.test \
tests/icu.test
-DISTCLEANFILES = foo.* uni.* range*.* pprec*.* romalp*.* nested*.* \
- toodeep*.* locale*.* attr*.* rule*.*
+DISTCLEANFILES = foo.* uni.* tort*.* range*.* pprec*.* romalp*.* \
+ nested*.* toodeep*.* 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 2025-02-09 23:41:59 UTC (rev 73835)
+++ trunk/Build/source/texk/upmendex/configure 2025-02-09 23:42:04 UTC (rev 73836)
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.72 for upmendex (TeX Live) 1.10.
+# Generated by GNU Autoconf 2.72 for upmendex (TeX Live) 1.11.
#
#
# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation,
@@ -611,8 +611,8 @@
# Identity of this package.
PACKAGE_NAME='upmendex (TeX Live)'
PACKAGE_TARNAME='upmendex--tex-live-'
-PACKAGE_VERSION='1.10'
-PACKAGE_STRING='upmendex (TeX Live) 1.10'
+PACKAGE_VERSION='1.11'
+PACKAGE_STRING='upmendex (TeX Live) 1.11'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1382,7 +1382,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.10 to adapt to many kinds of systems.
+'configure' configures upmendex (TeX Live) 1.11 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1454,7 +1454,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of upmendex (TeX Live) 1.10:";;
+ short | recursive ) echo "Configuration of upmendex (TeX Live) 1.11:";;
esac
cat <<\_ACEOF
@@ -1580,7 +1580,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-upmendex (TeX Live) configure 1.10
+upmendex (TeX Live) configure 1.11
generated by GNU Autoconf 2.72
Copyright (C) 2023 Free Software Foundation, Inc.
@@ -2284,7 +2284,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.10, which was
+It was created by upmendex (TeX Live) $as_me 1.11, which was
generated by GNU Autoconf 2.72. Invocation command line was
$ $0$ac_configure_args_raw
@@ -9392,7 +9392,7 @@
# Define the identity of the package.
PACKAGE='upmendex--tex-live-'
- VERSION='1.10'
+ VERSION='1.11'
# Some tools Automake needs.
@@ -20955,7 +20955,7 @@
Report bugs to <bug-libtool at gnu.org>."
lt_cl_version="\
-upmendex (TeX Live) config.lt 1.10
+upmendex (TeX Live) config.lt 1.11
configured by $0, generated by GNU Autoconf 2.72.
Copyright (C) 2024 Free Software Foundation, Inc.
@@ -23173,7 +23173,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.10, which was
+This file was extended by upmendex (TeX Live) $as_me 1.11, which was
generated by GNU Autoconf 2.72. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -23241,7 +23241,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.10
+upmendex (TeX Live) config.status 1.11
configured by $0, generated by GNU Autoconf 2.72,
with options \\"\$ac_cs_config\\"
Modified: trunk/Build/source/texk/upmendex/configure.ac
===================================================================
--- trunk/Build/source/texk/upmendex/configure.ac 2025-02-09 23:41:59 UTC (rev 73835)
+++ trunk/Build/source/texk/upmendex/configure.ac 2025-02-09 23:42:04 UTC (rev 73836)
@@ -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.10])
+AC_INIT([upmendex (TeX Live)],[1.11])
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 2025-02-09 23:41:59 UTC (rev 73835)
+++ trunk/Build/source/texk/upmendex/fread.c 2025-02-09 23:42:04 UTC (rev 73836)
@@ -93,7 +93,9 @@
continue;
}
- if (quo==0 && buff[j]==escape) {
+ if (esc==1 && buff[j]==escape) {
+ esc=0;
+ } else if (quo==0 && buff[j]==escape) {
esc=1;
}
@@ -150,7 +152,7 @@
if (buff[j]==encap) {
j++;
cc=getestr(&buff[j],estr);
- if (cc<0 || strchr(estr,encap)) {
+ if (cc<0) {
fprintf(efp,"\nError: Bad encap string in %s, line %d.",filename,ind[i].lnum);
if (efp!=stderr) fprintf(stderr,"\nError: Bad encap string in %s, line %d.",filename,ind[i].lnum);
eflg++;
@@ -422,28 +424,37 @@
/* pic up encap string */
static int getestr(char *buff, char *estr)
{
- int i,nest=0;
+ int i,j,nest=0,esc=0,quo=0;
- for (i=0;i<strlen(buff);i++) {
- if (buff[i]==encap) {
- if (i>0) {
- if ((unsigned char)buff[i-1]<0x80) {
- estr[i]=buff[i];
- i++;
- }
+ for (i=0,j=0;i<strlen(buff);i++,j++) {
+ /* If a "quote" character is found, it is removed and the
+ following character is not treated as a special character.
+ If a "quote" character follows an odd number of
+ consecutive "escape" characters, it is not treated as a
+ special character and is left as is.
+ Note that the "escape" characters are not removed. */
+ esc=0; quo=0;
+ if (buff[i]==escape) {
+ estr[j]=buff[i];
+ i++; j++;
+ esc=1;
+ } else if (buff[i]==quote) {
+ i++;
+ quo=1;
+ }
+ if (quo==0) {
+ if (nest==0 && esc==0 && buff[i]==arg_close) {
+ estr[j]='\0';
+ return i;
}
- else {
- estr[i]=buff[i];
- i++;
+ if (esc==0 && buff[i]==arg_open) nest++;
+ else if (esc==0 && buff[i]==arg_close) nest--;
+ else if (buff[i]==level || buff[i]==actual || buff[i]==encap) {
+ fprintf(efp, "\nError: Extra `%c\' at position %d in encap string.",buff[i],i);
+ return -1;
}
}
- if (nest==0 && buff[i]==arg_close) {
- estr[i]='\0';
- return i;
- }
- if (buff[i]==arg_open) nest++;
- else if (buff[i]==arg_close) nest--;
- copy_multibyte_char(buff, estr, &i, NULL);
+ copy_multibyte_char(buff, estr, &i, &j);
}
return -1;
Modified: trunk/Build/source/texk/upmendex/styfile.c
===================================================================
--- trunk/Build/source/texk/upmendex/styfile.c 2025-02-09 23:41:59 UTC (rev 73835)
+++ trunk/Build/source/texk/upmendex/styfile.c 2025-02-09 23:42:04 UTC (rev 73836)
@@ -279,6 +279,12 @@
else if (buff1[i]=='t') buff2[j]='\t';
else if (buff1[i]=='r') buff2[j]='\r';
else if (buff1[i]=='\"') buff2[j]='\"';
+ else {
+ /* Otherwise, the '\' is simply ignored here and the
+ following character is copied as is in the next loop. */
+ i--;
+ continue;
+ }
}
else buff2[j]=buff1[i];
j++;
Added: trunk/Build/source/texk/upmendex/tests/head1.ist
===================================================================
--- trunk/Build/source/texk/upmendex/tests/head1.ist (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/head1.ist 2025-02-09 23:42:04 UTC (rev 73836)
@@ -0,0 +1,3 @@
+headings_flag 1
+heading_prefix "aaa\tbbb\|ccc\\ddd\n\[\{\(\"\'"
+heading_suffix "\'\"\)\}\]\naaa\tbbb\|ccc\\ddd"
Modified: trunk/Build/source/texk/upmendex/tests/ok-tort.ind
===================================================================
--- trunk/Build/source/texk/upmendex/tests/ok-tort.ind 2025-02-09 23:41:59 UTC (rev 73835)
+++ trunk/Build/source/texk/upmendex/tests/ok-tort.ind 2025-02-09 23:42:04 UTC (rev 73836)
@@ -4,6 +4,11 @@
\indexspace
+ \item encap-escape1 aaa at bbb|ccc!ddd"eee{fff}, \ppp{11}, 10--12
+ \item encap-escape2, \aaa at bbb|ccc!ddd"eee{fff}{20--22}
+
+ \indexspace
+
\item implicit-range, 10--12
\item incons-encaps, \ii{6}, 5--7
\item incons-encaps2, \ii{5}, 5
Copied: trunk/Build/source/texk/upmendex/tests/ok-tort2.ind (from rev 73835, trunk/Build/source/texk/upmendex/tests/ok-tort.ind)
===================================================================
--- trunk/Build/source/texk/upmendex/tests/ok-tort2.ind (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/ok-tort2.ind 2025-02-09 23:42:04 UTC (rev 73836)
@@ -0,0 +1,39 @@
+\begin{theindex}
+aaa bbb|ccc\ddd
+[{("'B'")}]
+aaa bbb|ccc\ddd
+ \item bad-encaps, \ii{5--7}
+
+ \indexspace
+aaa bbb|ccc\ddd
+[{("'E'")}]
+aaa bbb|ccc\ddd
+ \item encap-escape1 aaa at bbb|ccc!ddd"eee{fff}, \ppp{11}, 10--12
+ \item encap-escape2, \aaa at bbb|ccc!ddd"eee{fff}{20--22}
+
+ \indexspace
+aaa bbb|ccc\ddd
+[{("'I'")}]
+aaa bbb|ccc\ddd
+ \item implicit-range, 10--12
+ \item incons-encaps, \ii{6}, 5--7
+ \item incons-encaps2, \ii{5}, 5
+ \item incons-entries, 6, \xx{6}
+
+ \indexspace
+aaa bbb|ccc\ddd
+[{("'M'")}]
+aaa bbb|ccc\ddd
+ \item missing(, 6
+ \item missing), 6
+ \item mixed-range, i, 6
+ \item mixed-range1, i--iv, 3--6
+ \item mixed-range2, \xx{ii}, i--ii, \yy{3--6}
+
+ \indexspace
+aaa bbb|ccc\ddd
+[{("'O'")}]
+aaa bbb|ccc\ddd
+ \item ok-encaps, \ii{5--7}
+
+\end{theindex}
Modified: trunk/Build/source/texk/upmendex/tests/tort.idx
===================================================================
--- trunk/Build/source/texk/upmendex/tests/tort.idx 2025-02-09 23:41:59 UTC (rev 73835)
+++ trunk/Build/source/texk/upmendex/tests/tort.idx 2025-02-09 23:42:04 UTC (rev 73836)
@@ -51,3 +51,11 @@
\indexentry{mixed-range2|xx}{ii}
\indexentry{mixed-range2|yy}{3}
\indexentry{mixed-range2|)}{6}
+
+\indexentry{encap-escape1 aaa"@bbb"|ccc"!ddd""eee"{fff"}|(}{10}
+\indexentry{encap-escape1 aaa"@bbb"|ccc"!ddd""eee"{fff"}|ppp}{11}
+\indexentry{encap-escape1 aaa"@bbb"|ccc"!ddd""eee"{fff"}|)}{12}
+
+\indexentry{encap-escape2|(aaa"@bbb"|ccc"!ddd""eee"{fff"}}{20}
+\indexentry{encap-escape2|aaa"@bbb"|ccc"!ddd""eee"{fff"}}{21}
+\indexentry{encap-escape2|)}{22}
Modified: trunk/Build/source/texk/upmendex/tests/tortW.idx
===================================================================
--- trunk/Build/source/texk/upmendex/tests/tortW.idx 2025-02-09 23:41:59 UTC (rev 73835)
+++ trunk/Build/source/texk/upmendex/tests/tortW.idx 2025-02-09 23:42:04 UTC (rev 73836)
@@ -51,3 +51,11 @@
\indexentry{mixed-range2|xx}{ii}
\indexentry{mixed-range2|yy}{3}
\indexentry{mixed-range2|)}{6}
+
+\indexentry{encap-escape1 aaa"@bbb"|ccc"!ddd""eee"{fff"}|(}{10}
+\indexentry{encap-escape1 aaa"@bbb"|ccc"!ddd""eee"{fff"}|ppp}{11}
+\indexentry{encap-escape1 aaa"@bbb"|ccc"!ddd""eee"{fff"}|)}{12}
+
+\indexentry{encap-escape2|(aaa"@bbb"|ccc"!ddd""eee"{fff"}}{20}
+\indexentry{encap-escape2|aaa"@bbb"|ccc"!ddd""eee"{fff"}}{21}
+\indexentry{encap-escape2|)}{22}
Modified: trunk/Build/source/texk/upmendex/tests/upmendex.test
===================================================================
--- trunk/Build/source/texk/upmendex/tests/upmendex.test 2025-02-09 23:41:59 UTC (rev 73835)
+++ trunk/Build/source/texk/upmendex/tests/upmendex.test 2025-02-09 23:42:04 UTC (rev 73836)
@@ -1,6 +1,6 @@
#! /bin/sh -vx
# $Id$
-# Copyright 2021-2024 TANAKA Takuji <ttk at t-lab.opal.ne.jp>
+# Copyright 2021-2025 TANAKA Takuji <ttk at t-lab.opal.ne.jp>
# 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.
@@ -42,5 +42,11 @@
$_upmendex $srcdir/tests/tortW.idx -o tortW.ind1 -t tortW.ilg1 \
&& diff $srcdir/tests/ok-tort.ind tortW.ind1 || :
+$_upmendex $srcdir/tests/tort.idx -s $srcdir/tests/head1.ist -o tort2.ind1 -t tort2.ilg1 \
+ && diff $srcdir/tests/ok-tort2.ind tort2.ind1 || :
+$_upmendex $srcdir/tests/tortW.idx -s $srcdir/tests/head1.ist -o tortW2.ind1 -t tortW2.ilg1 \
+ && diff $srcdir/tests/ok-tort2.ind tortW2.ind1 || :
+
+
exit $rc
More information about the tex-live-commits
mailing list.