texlive[73805] Build/source/texk/mendexk: mendex: Version 3.8
commits+ymorimi at tug.org
commits+ymorimi at tug.org
Sun Feb 9 12:57:48 CET 2025
Revision: 73805
https://tug.org/svn/texlive?view=revision&revision=73805
Author: ymorimi
Date: 2025-02-09 12:57:47 +0100 (Sun, 09 Feb 2025)
Log Message:
-----------
mendex: Version 3.8 [09-Feb-2025]
Modified Paths:
--------------
trunk/Build/source/texk/mendexk/ChangeLog
trunk/Build/source/texk/mendexk/configure
trunk/Build/source/texk/mendexk/configure.ac
trunk/Build/source/texk/mendexk/fread.c
trunk/Build/source/texk/mendexk/styfile.c
trunk/Build/source/texk/mendexk/tests/mendex.test
trunk/Build/source/texk/mendexk/tests/ok-tort.ind
trunk/Build/source/texk/mendexk/tests/tort.idx
trunk/Build/source/texk/mendexk/tests/tortW.idx
trunk/Build/source/texk/mendexk/version.h
Added Paths:
-----------
trunk/Build/source/texk/mendexk/tests/head1.ist
trunk/Build/source/texk/mendexk/tests/ok-tort2.ind
Modified: trunk/Build/source/texk/mendexk/ChangeLog
===================================================================
--- trunk/Build/source/texk/mendexk/ChangeLog 2025-02-09 10:24:16 UTC (rev 73804)
+++ trunk/Build/source/texk/mendexk/ChangeLog 2025-02-09 11:57:47 UTC (rev 73805)
@@ -1,3 +1,15 @@
+2025-02-09 Yukimasa Morimi <h20y6m at yahoo.co.jp>
+
+ * configure.ac, version.h:
+ Version 3.8 [09-Feb-2025].
+ * fread.c: Improved compatibility with makeindex.
+ * styfile.c: Fix escaping of string parameters.
+ https://github.com/texjporg/tex-jp-build/issues/173
+ * tests/mendex.test, tests/head1.ist,
+ tests/tort{,W}.idx, tests/ok-tort{,2}.ind:
+ Add tests for encap escape & headinng_{pre,post}fix
+ from TANAKA Takuji.
+
2025-01-25 Karl Berry <karl at freefriends.org>
* COPYRIGHT,
Modified: trunk/Build/source/texk/mendexk/configure
===================================================================
--- trunk/Build/source/texk/mendexk/configure 2025-02-09 10:24:16 UTC (rev 73804)
+++ trunk/Build/source/texk/mendexk/configure 2025-02-09 11:57:47 UTC (rev 73805)
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.72 for mendex (TeX Live) 3.7.
+# Generated by GNU Autoconf 2.72 for mendex (TeX Live) 3.8.
#
#
# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation,
@@ -611,8 +611,8 @@
# Identity of this package.
PACKAGE_NAME='mendex (TeX Live)'
PACKAGE_TARNAME='mendex--tex-live-'
-PACKAGE_VERSION='3.7'
-PACKAGE_STRING='mendex (TeX Live) 3.7'
+PACKAGE_VERSION='3.8'
+PACKAGE_STRING='mendex (TeX Live) 3.8'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1366,7 +1366,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 mendex (TeX Live) 3.7 to adapt to many kinds of systems.
+'configure' configures mendex (TeX Live) 3.8 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1438,7 +1438,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of mendex (TeX Live) 3.7:";;
+ short | recursive ) echo "Configuration of mendex (TeX Live) 3.8:";;
esac
cat <<\_ACEOF
@@ -1560,7 +1560,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-mendex (TeX Live) configure 3.7
+mendex (TeX Live) configure 3.8
generated by GNU Autoconf 2.72
Copyright (C) 2023 Free Software Foundation, Inc.
@@ -2102,7 +2102,7 @@
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.7, which was
+It was created by mendex (TeX Live) $as_me 3.8, which was
generated by GNU Autoconf 2.72. Invocation command line was
$ $0$ac_configure_args_raw
@@ -8994,7 +8994,7 @@
# Define the identity of the package.
PACKAGE='mendex--tex-live-'
- VERSION='3.7'
+ VERSION='3.8'
# Some tools Automake needs.
@@ -15978,7 +15978,7 @@
Report bugs to <bug-libtool at gnu.org>."
lt_cl_version="\
-mendex (TeX Live) config.lt 3.7
+mendex (TeX Live) config.lt 3.8
configured by $0, generated by GNU Autoconf 2.72.
Copyright (C) 2024 Free Software Foundation, Inc.
@@ -17630,7 +17630,7 @@
# 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.7, which was
+This file was extended by mendex (TeX Live) $as_me 3.8, which was
generated by GNU Autoconf 2.72. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -17698,7 +17698,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-mendex (TeX Live) config.status 3.7
+mendex (TeX Live) config.status 3.8
configured by $0, generated by GNU Autoconf 2.72,
with options \\"\$ac_cs_config\\"
Modified: trunk/Build/source/texk/mendexk/configure.ac
===================================================================
--- trunk/Build/source/texk/mendexk/configure.ac 2025-02-09 10:24:16 UTC (rev 73804)
+++ trunk/Build/source/texk/mendexk/configure.ac 2025-02-09 11:57:47 UTC (rev 73805)
@@ -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([mendex (TeX Live)], [3.7])
+AC_INIT([mendex (TeX Live)], [3.8])
AC_PREREQ([2.71])
AC_CONFIG_SRCDIR([main.c])
AC_CONFIG_AUX_DIR([../../build-aux])
Modified: trunk/Build/source/texk/mendexk/fread.c
===================================================================
--- trunk/Build/source/texk/mendexk/fread.c 2025-02-09 10:24:16 UTC (rev 73804)
+++ trunk/Build/source/texk/mendexk/fread.c 2025-02-09 11:57:47 UTC (rev 73805)
@@ -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++;
@@ -417,28 +419,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/mendexk/styfile.c
===================================================================
--- trunk/Build/source/texk/mendexk/styfile.c 2025-02-09 10:24:16 UTC (rev 73804)
+++ trunk/Build/source/texk/mendexk/styfile.c 2025-02-09 11:57:47 UTC (rev 73805)
@@ -197,6 +197,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/mendexk/tests/head1.ist
===================================================================
--- trunk/Build/source/texk/mendexk/tests/head1.ist (rev 0)
+++ trunk/Build/source/texk/mendexk/tests/head1.ist 2025-02-09 11:57:47 UTC (rev 73805)
@@ -0,0 +1,3 @@
+headings_flag 1
+heading_prefix "aaa\tbbb\|ccc\\ddd\n\[\{\(\"\'"
+heading_suffix "\'\"\)\}\]\naaa\tbbb\|ccc\\ddd"
Property changes on: trunk/Build/source/texk/mendexk/tests/head1.ist
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Build/source/texk/mendexk/tests/mendex.test
===================================================================
--- trunk/Build/source/texk/mendexk/tests/mendex.test 2025-02-09 10:24:16 UTC (rev 73804)
+++ trunk/Build/source/texk/mendexk/tests/mendex.test 2025-02-09 11:57:47 UTC (rev 73805)
@@ -42,5 +42,11 @@
$_mendex $srcdir/tests/tortW.idx -o tortW.ind1 -t tortW.ilg1 \
&& diff $srcdir/tests/ok-tort.ind tortW.ind1 || :
+$_mendex $srcdir/tests/tort.idx -s $srcdir/tests/head1.ist -o tort2.ind1 -t tort2.ilg1 \
+ && diff $srcdir/tests/ok-tort2.ind tort2.ind1 || :
+$_mendex $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
Modified: trunk/Build/source/texk/mendexk/tests/ok-tort.ind
===================================================================
--- trunk/Build/source/texk/mendexk/tests/ok-tort.ind 2025-02-09 10:24:16 UTC (rev 73804)
+++ trunk/Build/source/texk/mendexk/tests/ok-tort.ind 2025-02-09 11:57:47 UTC (rev 73805)
@@ -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
Added: trunk/Build/source/texk/mendexk/tests/ok-tort2.ind
===================================================================
--- trunk/Build/source/texk/mendexk/tests/ok-tort2.ind (rev 0)
+++ trunk/Build/source/texk/mendexk/tests/ok-tort2.ind 2025-02-09 11:57:47 UTC (rev 73805)
@@ -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}
Property changes on: trunk/Build/source/texk/mendexk/tests/ok-tort2.ind
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Build/source/texk/mendexk/tests/tort.idx
===================================================================
--- trunk/Build/source/texk/mendexk/tests/tort.idx 2025-02-09 10:24:16 UTC (rev 73804)
+++ trunk/Build/source/texk/mendexk/tests/tort.idx 2025-02-09 11:57:47 UTC (rev 73805)
@@ -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/mendexk/tests/tortW.idx
===================================================================
--- trunk/Build/source/texk/mendexk/tests/tortW.idx 2025-02-09 10:24:16 UTC (rev 73804)
+++ trunk/Build/source/texk/mendexk/tests/tortW.idx 2025-02-09 11:57:47 UTC (rev 73805)
@@ -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/mendexk/version.h
===================================================================
--- trunk/Build/source/texk/mendexk/version.h 2025-02-09 10:24:16 UTC (rev 73804)
+++ trunk/Build/source/texk/mendexk/version.h 2025-02-09 11:57:47 UTC (rev 73805)
@@ -1,2 +1,2 @@
-#define VERSION "version " PACKAGE_VERSION " [09-Nov-2024]"
+#define VERSION "version " PACKAGE_VERSION " [09-Feb-2025]"
#define BUG_ADDRESS "issue at texjp.org"
More information about the tex-live-commits
mailing list.