texlive[58575] Build/source/texk/mendexk: mendexk: Fix a bug about

commits+takuji at tug.org commits+takuji at tug.org
Sun Mar 21 09:54:53 CET 2021


Revision: 58575
          http://tug.org/svn/texlive?view=revision&revision=58575
Author:   takuji
Date:     2021-03-21 09:54:52 +0100 (Sun, 21 Mar 2021)
Log Message:
-----------
mendexk: Fix a bug about page_precedence in style

Modified Paths:
--------------
    trunk/Build/source/texk/mendexk/ChangeLog
    trunk/Build/source/texk/mendexk/Makefile.am
    trunk/Build/source/texk/mendexk/Makefile.in
    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/tests/mendex.test
    trunk/Build/source/texk/mendexk/version.h

Added Paths:
-----------
    trunk/Build/source/texk/mendexk/tests/pprec0.ist
    trunk/Build/source/texk/mendexk/tests/pprec1.ist
    trunk/Build/source/texk/mendexk/tests/pprec2.ist
    trunk/Build/source/texk/mendexk/tests/pprecA-0.ind
    trunk/Build/source/texk/mendexk/tests/pprecA-1.ind
    trunk/Build/source/texk/mendexk/tests/pprecA-2.ind
    trunk/Build/source/texk/mendexk/tests/pprecA.idx

Modified: trunk/Build/source/texk/mendexk/ChangeLog
===================================================================
--- trunk/Build/source/texk/mendexk/ChangeLog	2021-03-21 01:47:19 UTC (rev 58574)
+++ trunk/Build/source/texk/mendexk/ChangeLog	2021-03-21 08:54:52 UTC (rev 58575)
@@ -1,7 +1,13 @@
-2020-01-16  Karl Berry  <karl at freefriends.org>
+2021-03-21  TANAKA Takuji  <ttk at 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 at t-lab.opal.ne.jp>
 

Modified: trunk/Build/source/texk/mendexk/Makefile.am
===================================================================
--- trunk/Build/source/texk/mendexk/Makefile.am	2021-03-21 01:47:19 UTC (rev 58574)
+++ trunk/Build/source/texk/mendexk/Makefile.am	2021-03-21 08:54:52 UTC (rev 58575)
@@ -57,6 +57,8 @@
 
 ## 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*.*
 

Modified: trunk/Build/source/texk/mendexk/Makefile.in
===================================================================
--- trunk/Build/source/texk/mendexk/Makefile.in	2021-03-21 01:47:19 UTC (rev 58574)
+++ trunk/Build/source/texk/mendexk/Makefile.in	2021-03-21 08:54:52 UTC (rev 58575)
@@ -581,9 +581,11 @@
 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
 

Modified: trunk/Build/source/texk/mendexk/configure
===================================================================
--- trunk/Build/source/texk/mendexk/configure	2021-03-21 01:47:19 UTC (rev 58574)
+++ trunk/Build/source/texk/mendexk/configure	2021-03-21 08:54:52 UTC (rev 58575)
@@ -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 @@
 # 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 @@
   # 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 @@
 
 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 @@
 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 @@
 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 @@
 
 # Define the identity of the package.
  PACKAGE='mendex--tex-live-'
- VERSION='3.2'
+ VERSION='3.3'
 
 
 # Some tools Automake needs.
@@ -13455,7 +13455,7 @@
 
 
 
-$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 @@
 Report bugs to <bug-libtool at 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 @@
 # 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 @@
 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\\"
 

Modified: trunk/Build/source/texk/mendexk/configure.ac
===================================================================
--- trunk/Build/source/texk/mendexk/configure.ac	2021-03-21 01:47:19 UTC (rev 58574)
+++ trunk/Build/source/texk/mendexk/configure.ac	2021-03-21 08:54:52 UTC (rev 58575)
@@ -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.2])
+AC_INIT([mendex (TeX Live)], [3.3])
 AC_PREREQ([2.63])
 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	2021-03-21 01:47:19 UTC (rev 58574)
+++ trunk/Build/source/texk/mendexk/fread.c	2021-03-21 08:54:52 UTC (rev 58575)
@@ -474,7 +474,9 @@
 			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;
 				}
@@ -481,7 +483,9 @@
 				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;
 				}
@@ -488,7 +492,9 @@
 				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;
 				}
@@ -495,7 +501,9 @@
 				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;
 				}
@@ -502,7 +510,9 @@
 				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;
 				}

Modified: trunk/Build/source/texk/mendexk/tests/mendex.test
===================================================================
--- trunk/Build/source/texk/mendexk/tests/mendex.test	2021-03-21 01:47:19 UTC (rev 58574)
+++ trunk/Build/source/texk/mendexk/tests/mendex.test	2021-03-21 08:54:52 UTC (rev 58575)
@@ -24,3 +24,13 @@
 	>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
+

Added: trunk/Build/source/texk/mendexk/tests/pprec0.ist
===================================================================
--- trunk/Build/source/texk/mendexk/tests/pprec0.ist	                        (rev 0)
+++ trunk/Build/source/texk/mendexk/tests/pprec0.ist	2021-03-21 08:54:52 UTC (rev 58575)
@@ -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]]"
+

Added: trunk/Build/source/texk/mendexk/tests/pprec1.ist
===================================================================
--- trunk/Build/source/texk/mendexk/tests/pprec1.ist	                        (rev 0)
+++ trunk/Build/source/texk/mendexk/tests/pprec1.ist	2021-03-21 08:54:52 UTC (rev 58575)
@@ -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]]"
+

Added: trunk/Build/source/texk/mendexk/tests/pprec2.ist
===================================================================
--- trunk/Build/source/texk/mendexk/tests/pprec2.ist	                        (rev 0)
+++ trunk/Build/source/texk/mendexk/tests/pprec2.ist	2021-03-21 08:54:52 UTC (rev 58575)
@@ -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]]"
+

Added: trunk/Build/source/texk/mendexk/tests/pprecA-0.ind
===================================================================
--- trunk/Build/source/texk/mendexk/tests/pprecA-0.ind	                        (rev 0)
+++ trunk/Build/source/texk/mendexk/tests/pprecA-0.ind	2021-03-21 08:54:52 UTC (rev 58575)
@@ -0,0 +1,5 @@
+\begin{theindex}
+
+  \item entryA[[delim0]]i[[sfx 3p]], 1[[sfx 3p]], I[[sfx 3p]]
+
+\end{theindex}

Added: trunk/Build/source/texk/mendexk/tests/pprecA-1.ind
===================================================================
--- trunk/Build/source/texk/mendexk/tests/pprecA-1.ind	                        (rev 0)
+++ trunk/Build/source/texk/mendexk/tests/pprecA-1.ind	2021-03-21 08:54:52 UTC (rev 58575)
@@ -0,0 +1,5 @@
+\begin{theindex}
+
+  \item entryA[[delim0]]1[[sfx 3p]], i[[sfx 3p]], I[[sfx 3p]]
+
+\end{theindex}

Added: trunk/Build/source/texk/mendexk/tests/pprecA-2.ind
===================================================================
--- trunk/Build/source/texk/mendexk/tests/pprecA-2.ind	                        (rev 0)
+++ trunk/Build/source/texk/mendexk/tests/pprecA-2.ind	2021-03-21 08:54:52 UTC (rev 58575)
@@ -0,0 +1,5 @@
+\begin{theindex}
+
+  \item entryA[[delim0]]I[[sfx 3p]], 1[[sfx 3p]], i[[sfx 3p]]
+
+\end{theindex}

Added: trunk/Build/source/texk/mendexk/tests/pprecA.idx
===================================================================
--- trunk/Build/source/texk/mendexk/tests/pprecA.idx	                        (rev 0)
+++ trunk/Build/source/texk/mendexk/tests/pprecA.idx	2021-03-21 08:54:52 UTC (rev 58575)
@@ -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}

Modified: trunk/Build/source/texk/mendexk/version.h
===================================================================
--- trunk/Build/source/texk/mendexk/version.h	2021-03-21 01:47:19 UTC (rev 58574)
+++ trunk/Build/source/texk/mendexk/version.h	2021-03-21 08:54:52 UTC (rev 58575)
@@ -1,2 +1,2 @@
-#define VERSION  "version " PACKAGE_VERSION " [16-Jan-2020]"
+#define VERSION  "version " PACKAGE_VERSION " [21-Mar-2021]"
 #define BUG_ADDRESS "issue at texjp.org"



More information about the tex-live-commits mailing list.