texlive[72806] Build/source: upmendex: Version 1.10
commits+takuji at tug.org
commits+takuji at tug.org
Sat Nov 9 11:39:33 CET 2024
Revision: 72806
https://tug.org/svn/texlive?view=revision&revision=72806
Author: takuji
Date: 2024-11-09 11:39:33 +0100 (Sat, 09 Nov 2024)
Log Message:
-----------
upmendex: Version 1.10
Modified Paths:
--------------
trunk/Build/source/libs/icu/ChangeLog
trunk/Build/source/texk/README
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/convert.c
trunk/Build/source/texk/upmendex/exvar.h
trunk/Build/source/texk/upmendex/fread.c
trunk/Build/source/texk/upmendex/fwrite.c
trunk/Build/source/texk/upmendex/mendex.h
trunk/Build/source/texk/upmendex/sort.c
trunk/Build/source/texk/upmendex/styfile.c
trunk/Build/source/texk/upmendex/tests/upmendex.test
trunk/Build/source/texk/upmendex/var.h
Added Paths:
-----------
trunk/Build/source/texk/upmendex/tests/icu.test
trunk/Build/source/texk/upmendex/tests/nest.test
trunk/Build/source/texk/upmendex/tests/nested.idx
trunk/Build/source/texk/upmendex/tests/nested.ind
trunk/Build/source/texk/upmendex/tests/nested.ist
trunk/Build/source/texk/upmendex/tests/nested3.idx
trunk/Build/source/texk/upmendex/tests/nested3.ind
trunk/Build/source/texk/upmendex/tests/nested3.ist
trunk/Build/source/texk/upmendex/tests/ok-tort.ind
trunk/Build/source/texk/upmendex/tests/pprec.test
trunk/Build/source/texk/upmendex/tests/toodeep.idx
trunk/Build/source/texk/upmendex/tests/tort.idx
trunk/Build/source/texk/upmendex/tests/tortW.idx
Modified: trunk/Build/source/libs/icu/ChangeLog
===================================================================
--- trunk/Build/source/libs/icu/ChangeLog 2024-11-09 10:39:26 UTC (rev 72805)
+++ trunk/Build/source/libs/icu/ChangeLog 2024-11-09 10:39:33 UTC (rev 72806)
@@ -8,7 +8,7 @@
2024-10-27 Karl Berry <karl at freefriends.org>
- * Import 76.2.
+ * Import 76.1.
(version.ac): update.
2023-12-22 Karl Berry <karl at freefriends.org>
Modified: trunk/Build/source/texk/README
===================================================================
--- trunk/Build/source/texk/README 2024-11-09 10:39:26 UTC (rev 72805)
+++ trunk/Build/source/texk/README 2024-11-09 10:39:33 UTC (rev 72806)
@@ -106,7 +106,7 @@
ttfdump - maintained here, by us, since Taiwan upstream apparently gone.
-upmendex 1.09 - by Takuji Tanaka
+upmendex 1.10 - by Takuji Tanaka
https://ctan.org/pkg/upmendex
https://github.com/t-tk/upmendex-package
Modified: trunk/Build/source/texk/upmendex/ChangeLog
===================================================================
--- trunk/Build/source/texk/upmendex/ChangeLog 2024-11-09 10:39:26 UTC (rev 72805)
+++ trunk/Build/source/texk/upmendex/ChangeLog 2024-11-09 10:39:33 UTC (rev 72806)
@@ -1,3 +1,24 @@
+2024-11-09 TANAKA Takuji <ttk at t-lab.opal.ne.jp>
+
+ * version 1.10 Stable version.
+ * configure.ac: Bump version.
+ * {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.
+ 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
+ * sort.c: Extend RULEBUFSIZE to adjust ICU 76.1.
+ Revise to avoid compiler warnings.
+ * convert.c: Tweak comment.
+ * tests/{upmendex,pprec,icu}.test: Split test scripts.
+ * tests/nest.test, tests/nested{,3}.{ist,idx,ind},
+ tests/toodeep.idx: Add new tests for nested depth.
+ * tests/upmendex.test, tests/tort{,W}.idx, tests/ok-tort.ind:
+ Add new tests for error/warning.
+ * Makefile.am: Adjust.
+
2024-07-06 TANAKA Takuji <ttk at t-lab.opal.ne.jp>
* version 1.09 Stable version.
Modified: trunk/Build/source/texk/upmendex/Makefile.am
===================================================================
--- trunk/Build/source/texk/upmendex/Makefile.am 2024-11-09 10:39:26 UTC (rev 72805)
+++ trunk/Build/source/texk/upmendex/Makefile.am 2024-11-09 10:39:33 UTC (rev 72806)
@@ -52,7 +52,10 @@
## Tests
##
-TESTS = tests/upmendex.test
+TESTS = tests/upmendex.test \
+ tests/pprec.test \
+ tests/nest.test \
+ tests/icu.test
EXTRA_DIST += $(TESTS)
## tests/upmendex.test
@@ -59,7 +62,11 @@
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/range.idx tests/range2.ist tests/range2.ist tests/range3.ist \
+ tests/tort.idx tests/tortW.idx tests/ok-tort.ind
+DISTCLEANFILES = foo.* uni.*
+## tests/pprec.test
+EXTRA_DIST += 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 \
@@ -69,7 +76,13 @@
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*.*
+DISTCLEANFILES += range*.* pprec*.* romalp*.*
+## tests/nest.test
+EXTRA_DIST += tests/nested3.ist tests/nested3.ind \
+ tests/nested.ist tests/nested.ind \
+ tests/toodeep.idx
+DISTCLEANFILES += nested*.* toodeep*.*
+## tests/icu.test
EXTRA_DIST += 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 \
Modified: trunk/Build/source/texk/upmendex/Makefile.in
===================================================================
--- trunk/Build/source/texk/upmendex/Makefile.in 2024-11-09 10:39:26 UTC (rev 72805)
+++ trunk/Build/source/texk/upmendex/Makefile.in 2024-11-09 10:39:33 UTC (rev 72806)
@@ -622,8 +622,9 @@
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/uni1.ist tests/uni2.ist tests/uni.ind tests/range.idx \
- tests/range2.ist tests/range2.ist tests/range3.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 \
@@ -634,14 +635,20 @@
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/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
-DISTCLEANFILES = foo.* uni.* range*.* pprec*.* romalp*.* locale*.* \
- attr*.* rule*.*
+ 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 \
+ tests/pprec.test \
+ tests/nest.test \
+ tests/icu.test
+
+DISTCLEANFILES = foo.* uni.* 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 2024-11-09 10:39:26 UTC (rev 72805)
+++ trunk/Build/source/texk/upmendex/configure 2024-11-09 10:39:33 UTC (rev 72806)
@@ -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.09.
+# Generated by GNU Autoconf 2.72 for upmendex (TeX Live) 1.10.
#
#
# 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.09'
-PACKAGE_STRING='upmendex (TeX Live) 1.09'
+PACKAGE_VERSION='1.10'
+PACKAGE_STRING='upmendex (TeX Live) 1.10'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1380,7 +1380,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.09 to adapt to many kinds of systems.
+'configure' configures upmendex (TeX Live) 1.10 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1452,7 +1452,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of upmendex (TeX Live) 1.09:";;
+ short | recursive ) echo "Configuration of upmendex (TeX Live) 1.10:";;
esac
cat <<\_ACEOF
@@ -1578,7 +1578,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-upmendex (TeX Live) configure 1.09
+upmendex (TeX Live) configure 1.10
generated by GNU Autoconf 2.72
Copyright (C) 2023 Free Software Foundation, Inc.
@@ -2282,7 +2282,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.09, which was
+It was created by upmendex (TeX Live) $as_me 1.10, 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.09'
+ VERSION='1.10'
# Some tools Automake needs.
@@ -19772,7 +19772,7 @@
Report bugs to <bug-libtool at gnu.org>."
lt_cl_version="\
-upmendex (TeX Live) config.lt 1.09
+upmendex (TeX Live) config.lt 1.10
configured by $0, generated by GNU Autoconf 2.72.
Copyright (C) 2011 Free Software Foundation, Inc.
@@ -21991,7 +21991,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.09, which was
+This file was extended by upmendex (TeX Live) $as_me 1.10, which was
generated by GNU Autoconf 2.72. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -22059,7 +22059,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.09
+upmendex (TeX Live) config.status 1.10
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 2024-11-09 10:39:26 UTC (rev 72805)
+++ trunk/Build/source/texk/upmendex/configure.ac 2024-11-09 10:39:33 UTC (rev 72806)
@@ -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.09])
+AC_INIT([upmendex (TeX Live)],[1.10])
AC_PREREQ([2.71])
AC_CONFIG_SRCDIR([main.c])
AC_CONFIG_AUX_DIR([../../build-aux])
Modified: trunk/Build/source/texk/upmendex/convert.c
===================================================================
--- trunk/Build/source/texk/upmendex/convert.c 2024-11-09 10:39:26 UTC (rev 72805)
+++ trunk/Build/source/texk/upmendex/convert.c 2024-11-09 10:39:33 UTC (rev 72806)
@@ -193,7 +193,7 @@
return 0;
}
-/* convert to capital-hiragana character */
+/* convert to YOMI (reading) or strings of phonograms */
int convert(UChar *buff1, UChar *buff2)
{
int i=0,j=0,k;
Modified: trunk/Build/source/texk/upmendex/exvar.h
===================================================================
--- trunk/Build/source/texk/upmendex/exvar.h 2024-11-09 10:39:26 UTC (rev 72805)
+++ trunk/Build/source/texk/upmendex/exvar.h 2024-11-09 10:39:33 UTC (rev 72806)
@@ -17,9 +17,9 @@
extern char group_skip[];
extern char lethead_prefix[],lethead_suffix[];
extern int lethead_flag;
-extern char item_0[],item_1[],item_2[];
-extern char item_01[],item_x1[],item_12[],item_x2[];
-extern char delim_0[],delim_1[],delim_2[],delim_n[],delim_r[],delim_t[];
+extern char item_0[][STYBUFSIZE];
+extern char item_01[][STYBUFSIZE],item_x[][STYBUFSIZE];
+extern char delim_0[][STYBUFSIZE],delim_n[],delim_r[],delim_t[];
extern char suffix_2p[],suffix_3p[],suffix_mp[];
extern char encap_prefix[],encap_infix[],encap_suffix[];
extern int line_max;
Modified: trunk/Build/source/texk/upmendex/fread.c
===================================================================
--- trunk/Build/source/texk/upmendex/fread.c 2024-11-09 10:39:26 UTC (rev 72805)
+++ trunk/Build/source/texk/upmendex/fread.c 2024-11-09 10:39:33 UTC (rev 72806)
@@ -111,7 +111,7 @@
if (nest==0) {
if (buff[j]==level) {
esc=0;
- if (indent>=2) {
+ if (indent>=MAXDEPTH-1) {
fprintf(efp,"\nError: Extra `%c\' in %s, line %d.",level,filename,ind[i].lnum);
if (efp!=stderr) fprintf(stderr,"\nError: Extra `%c\' in %s, line %d.",level,filename,ind[i].lnum);
eflg++;
@@ -150,9 +150,9 @@
if (buff[j]==encap) {
j++;
cc=getestr(&buff[j],estr);
- if (cc<0) {
- fprintf(efp,"\nBad encap string in %s, line %d.",filename,ind[i].lnum);
- if (efp!=stderr) fprintf(stderr,"\nBad encap string in %s, line %d.",filename,ind[i].lnum);
+ if (cc<0 || strchr(estr,encap)) {
+ 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++;
reject++;
n++;
@@ -208,6 +208,17 @@
if (buff[j]!=escape) esc=0;
copy_multibyte_char(buff, wbuff, &j, &k);
}
+ for (k=0; k<=indent; k++) {
+ if ((u_strlen(ind[i].idx[k])==0 && ind[i].org[k]==NULL) ||
+ (ind[i].org[k] && u_strlen(ind[i].org[k])==0)) {
+ fprintf(efp,"\nError: Illegal null field in %s, line %d.",filename,ind[i].lnum);
+ if (efp!=stderr) fprintf(stderr,"\nError: Illegal null field in %s, line %d.",filename,ind[i].lnum);
+ eflg++;
+ reject++;
+ n++;
+ goto LOOP;
+ }
+ }
ind[i].words=indent+1;
/* kana-convert */
Modified: trunk/Build/source/texk/upmendex/fwrite.c
===================================================================
--- trunk/Build/source/texk/upmendex/fwrite.c 2024-11-09 10:39:26 UTC (rev 72805)
+++ trunk/Build/source/texk/upmendex/fwrite.c 2024-11-09 10:39:33 UTC (rev 72806)
@@ -165,7 +165,7 @@
/* write ind file */
void indwrite(char *filename, struct index *ind, int pagenum)
{
- int i,j,k,hpoint=0,tpoint=0,ipoint=0,jpoint=0,block_open=0;
+ int i,j,k,q,hpoint=0,tpoint=0,ipoint=0,jpoint=0,block_open=0;
char lbuff[BUFFERLEN],obuff[BUFFERLEN];
UChar initial[INITIALLENGTH],initial_prev[INITIALLENGTH];
int chset,chset_prev;
@@ -220,8 +220,6 @@
fprint_uchar(fp,initial,lethead_flag,-1);
fputs(lethead_suffix,fp);
}
- widechar_to_multibyte(obuff,BUFFERLEN,ind[i].idx[0]);
- SPRINTF(lbuff,"%s%s",item_0,obuff);
}
else if (chset==CH_KANA) {
if (lethead_flag!=0) {
@@ -241,8 +239,6 @@
}
fputs(lethead_suffix,fp);
}
- widechar_to_multibyte(obuff,BUFFERLEN,ind[i].idx[0]);
- SPRINTF(lbuff,"%s%s",item_0,obuff);
for (hpoint=0;hpoint<(u_strlen(kana_head));) {
if (initial_cmp_char(initial,&kana_head[hpoint])) {
break;
@@ -265,8 +261,6 @@
}
fputs(lethead_suffix,fp);
}
- widechar_to_multibyte(obuff,BUFFERLEN,ind[i].idx[0]);
- SPRINTF(lbuff,"%s%s",item_0,obuff);
for (tpoint=0;tpoint<(u_strlen(hangul_head));tpoint++) {
if (initial_cmp_char(initial,&hangul_head[tpoint])) {
break;
@@ -291,8 +285,6 @@
}
fputs(lethead_suffix,fp);
}
- widechar_to_multibyte(obuff,BUFFERLEN,ind[i].idx[0]);
- SPRINTF(lbuff,"%s%s",item_0,obuff);
for (jpoint=0;jpoint<(u_strlen(devanagari_head));) {
if (initial_cmp_char(initial,&devanagari_head[jpoint])) {
break;
@@ -315,8 +307,6 @@
}
fputs(lethead_suffix,fp);
}
- widechar_to_multibyte(obuff,BUFFERLEN,ind[i].idx[0]);
- SPRINTF(lbuff,"%s%s",item_0,obuff);
for (ipoint=0;ipoint<(u_strlen(thai_head));ipoint++) {
if (initial_cmp_char(initial,&thai_head[ipoint])) {
break;
@@ -330,35 +320,9 @@
if (lethead_flag!=0 && (symbol_flag==1 || (symbol_flag==2 && chset!=CH_NUMERIC))) {
fprintf(fp,"%s%s%s",lethead_prefix,symhead,lethead_suffix);
}
- widechar_to_multibyte(obuff,BUFFERLEN,ind[i].idx[0]);
- SPRINTF(lbuff,"%s%s",item_0,obuff);
}
- switch (ind[i].words) {
- case 1:
- SAPPENDF(lbuff,"%s",delim_0);
- break;
-
- case 2:
- widechar_to_multibyte(obuff,BUFFERLEN,ind[i].idx[1]);
- SAPPENDF(lbuff,"%s",item_x1);
- SAPPENDF(lbuff,"%s",obuff);
- SAPPENDF(lbuff,"%s",delim_1);
- break;
-
- case 3:
- widechar_to_multibyte(obuff,BUFFERLEN,ind[i].idx[1]);
- SAPPENDF(lbuff,"%s",item_x1);
- SAPPENDF(lbuff,"%s",obuff);
- widechar_to_multibyte(obuff,BUFFERLEN,ind[i].idx[2]);
- SAPPENDF(lbuff,"%s",item_x2);
- SAPPENDF(lbuff,"%s",obuff);
- SAPPENDF(lbuff,"%s",delim_2);
- break;
-
- default:
- break;
- }
- printpage(ind,fp,i,lbuff);
+ SPRINTF(lbuff,"%s",item_0[0]);
+ k=0;
}
else {
index_normalize(ind[i-1].dic[0], initial_prev, &chset_prev);
@@ -466,70 +430,30 @@
}
}
- switch (ind[i].words) {
- case 1:
- widechar_to_multibyte(obuff,BUFFERLEN,ind[i].idx[0]);
- SAPPENDF(lbuff,"%s",item_0);
- SAPPENDF(lbuff,"%s",obuff);
- SAPPENDF(lbuff,"%s",delim_0);
- break;
-
- case 2:
- if (u_strcmp(ind[i-1].idx[0],ind[i].idx[0])!=0 || u_strcmp(ind[i-1].dic[0],ind[i].dic[0])!=0) {
- widechar_to_multibyte(obuff,BUFFERLEN,ind[i].idx[0]);
- SAPPENDF(lbuff,"%s",item_0);
- SAPPENDF(lbuff,"%s",obuff);
- SAPPENDF(lbuff,"%s",item_x1);
+ q=0;
+ for (j=0;j<ind[i-1].words && j<ind[i].words;j++) {
+ if (u_strcmp(ind[i-1].idx[j],ind[i].idx[j])!=0 ||
+ u_strcmp(ind[i-1].dic[j],ind[i].dic[j])!=0) {
+ k=j;
+ SAPPENDF(lbuff,"%s",item_0[k]);
+ q=1;
+ break;
}
- else {
- if (ind[i-1].words==1) {
- SAPPENDF(lbuff,"%s",item_01);
- }
- else {
- SAPPENDF(lbuff,"%s",item_1);
- }
- }
- widechar_to_multibyte(obuff,BUFFERLEN,ind[i].idx[1]);
- SAPPENDF(lbuff,"%s",obuff);
- SAPPENDF(lbuff,"%s",delim_1);
- break;
+ }
+ if (q==0) {
+ k=ind[i-1].words;
+ SAPPENDF(lbuff,"%s",item_01[k-1]);
+ }
- case 3:
- if (u_strcmp(ind[i-1].idx[0],ind[i].idx[0])!=0 || u_strcmp(ind[i-1].dic[0],ind[i].dic[0])!=0) {
- widechar_to_multibyte(obuff,BUFFERLEN,ind[i].idx[0]);
- SAPPENDF(lbuff,"%s",item_0);
- SAPPENDF(lbuff,"%s",obuff);
- widechar_to_multibyte(obuff,BUFFERLEN,ind[i].idx[1]);
- SAPPENDF(lbuff,"%s",item_x1);
- SAPPENDF(lbuff,"%s",obuff);
- SAPPENDF(lbuff,"%s",item_x2);
- }
- else if (ind[i-1].words==1) {
- widechar_to_multibyte(obuff,BUFFERLEN,ind[i].idx[1]);
- SAPPENDF(lbuff,"%s",item_01);
- SAPPENDF(lbuff,"%s",obuff);
- SAPPENDF(lbuff,"%s",item_x2);
- }
- else if (u_strcmp(ind[i-1].idx[1],ind[i].idx[1])!=0 || u_strcmp(ind[i-1].dic[1],ind[i].dic[1])!=0) {
- widechar_to_multibyte(obuff,BUFFERLEN,ind[i].idx[1]);
- SAPPENDF(lbuff,"%s",item_1);
- SAPPENDF(lbuff,"%s",obuff);
- if (ind[i-1].words==2) SAPPENDF(lbuff,"%s",item_12);
- else SAPPENDF(lbuff,"%s",item_x2);
- }
- else {
- SAPPENDF(lbuff,"%s",item_2);
- }
- widechar_to_multibyte(obuff,BUFFERLEN,ind[i].idx[2]);
- SAPPENDF(lbuff,"%s",obuff);
- SAPPENDF(lbuff,"%s",delim_2);
- break;
-
- default:
- break;
- }
- printpage(ind,fp,i,lbuff);
}
+ for (j=k;;j++) {
+ widechar_to_multibyte(obuff,BUFFERLEN,ind[i].idx[j]);
+ SAPPENDF(lbuff,"%s",obuff);
+ if (j==ind[i].words-1) break;
+ SAPPENDF(lbuff,"%s",item_x[j]);
+ }
+ SAPPENDF(lbuff,"%s",delim_0[j]);
+ printpage(ind,fp,i,lbuff);
}
if (is_any_script(chset) && strlen(script_postamble[chset]) && block_open) {
fputs(script_postamble[chset],fp);
Modified: trunk/Build/source/texk/upmendex/mendex.h
===================================================================
--- trunk/Build/source/texk/upmendex/mendex.h 2024-11-09 10:39:26 UTC (rev 72805)
+++ trunk/Build/source/texk/upmendex/mendex.h 2024-11-09 10:39:33 UTC (rev 72806)
@@ -17,6 +17,7 @@
#endif
#define PAGE_COMPOSIT_DEPTH 10
+#define MAXDEPTH 5
struct page {
char *page;
@@ -27,9 +28,9 @@
struct index {
int num;
unsigned char words;
- UChar *dic[3];
- UChar *org[3];
- UChar *idx[3];
+ UChar *dic[MAXDEPTH];
+ UChar *org[MAXDEPTH];
+ UChar *idx[MAXDEPTH];
struct page *p;
int lnum;
};
Modified: trunk/Build/source/texk/upmendex/sort.c
===================================================================
--- trunk/Build/source/texk/upmendex/sort.c 2024-11-09 10:39:26 UTC (rev 72805)
+++ trunk/Build/source/texk/upmendex/sort.c 2024-11-09 10:39:33 UTC (rev 72806)
@@ -5,9 +5,9 @@
#include "exvar.h"
#include "exhanzi.h"
-#define RULEBUFSIZE 29210+STYBUFSIZE
+#define RULEBUFSIZE 29652+STYBUFSIZE
/*
- length of collation rule in ICU 68.2
+ length of collation rule in ICU 76.1
icu_locale length
ja 6410
@@ -15,9 +15,9 @@
ko 12577
ko at collation=unihan 51
ko at collation=search 782
- zh (pinin) 26909
+ zh (pinin) 27369
zh at collation=unihan 82
- zh at collation=stroke 29208
+ zh at collation=stroke 29651
zh at collation=zhuyin 28880
*/
@@ -186,7 +186,7 @@
scount++;
- for (j=0;j<3;j++) {
+ for (j=0;j<MAXDEPTH;j++) {
/* check level */
if (((*index1).words==j)&&((*index2).words!=j)) return -1;
@@ -432,29 +432,29 @@
int is_latin(UChar *c)
{
- if (((*c>=L'A')&&(*c<=L'Z'))||((*c>=L'a')&&(*c<=L'z'))) return 1;
- else if ((*c==0x00AA)||(*c==0x00BA)) return 1; /* Latin-1 Supplement */
- else if ((*c>=0x00C0)&&(*c<=0x00D6)) return 1;
- else if ((*c>=0x00D8)&&(*c<=0x00F6)) return 1;
- else if ((*c>=0x00F8)&&(*c<=0x00FF)) return 1;
- else if ((*c>=0x0100)&&(*c<=0x024F)) return 1; /* Latin Extended-A,B */
- else if ((*c>=0x0250)&&(*c<=0x02AF)) return 1; /* IPA Extensions */
- else if ((*c>=0x2C60)&&(*c<=0x2C7F)) return 1; /* Latin Extended-C */
- else if ((*c>=0xA720)&&(*c<=0xA7FF)) return 1; /* Latin Extended-D */
- else if ((*c>=0xAB30)&&(*c<=0xAB6F)) return 1; /* Latin Extended-E */
- else if ((*c>=0x1E00)&&(*c<=0x1EFF)) return 1; /* Latin Extended Additional */
- else if ((*c>=0xFB00)&&(*c<=0xFB06)) return 1; /* Latin ligatures */
- else if ((*c>=0xFF21)&&(*c<=0xFF3A)) return 1; /* Fullwidth Latin Capital Letter */
- else if ((*c>=0xFF41)&&(*c<=0xFF5A)) return 1; /* Fullwidth Latin Small Letter */
+ if (( *c>=L'A' && *c<=L'Z' )||( *c>=L'a' && *c<=L'z' )) return 1;
+ else if ( *c==0x00AA || *c==0x00BA ) return 1; /* Latin-1 Supplement */
+ else if ( *c>=0x00C0 && *c<=0x00D6 ) return 1;
+ else if ( *c>=0x00D8 && *c<=0x00F6 ) return 1;
+ else if ( *c>=0x00F8 && *c<=0x00FF ) return 1;
+ else if ( *c>=0x0100 && *c<=0x024F ) return 1; /* Latin Extended-A,B */
+ else if ( *c>=0x0250 && *c<=0x02AF ) return 1; /* IPA Extensions */
+ else if ( *c>=0x2C60 && *c<=0x2C7F ) return 1; /* Latin Extended-C */
+ else if ( *c>=0xA720 && *c<=0xA7FF ) return 1; /* Latin Extended-D */
+ else if ( *c>=0xAB30 && *c<=0xAB6F ) return 1; /* Latin Extended-E */
+ else if ( *c>=0x1E00 && *c<=0x1EFF ) return 1; /* Latin Extended Additional */
+ else if ( *c>=0xFB00 && *c<=0xFB06 ) return 1; /* Latin ligatures */
+ else if ( *c>=0xFF21 && *c<=0xFF3A ) return 1; /* Fullwidth Latin Capital Letter */
+ else if ( *c>=0xFF41 && *c<=0xFF5A ) return 1; /* Fullwidth Latin Small Letter */
/* Property of followings is "Common, So (other symbol)", but seem to be treated as Latin by ICU collator */
- else if ((*c>=0x24B6) /* CIRCLED LATIN CAPITAL LETTER */
- &&(*c<=0x24E9)) return 1; /* CIRCLED LATIN SMALL LETTER */
+ else if ( *c>=0x24B6 /* CIRCLED LATIN CAPITAL LETTER */
+ && *c<=0x24E9 ) return 1; /* CIRCLED LATIN SMALL LETTER */
if (is_surrogate_pair(c)) {
UChar32 c32;
c32=U16_GET_SUPPLEMENTARY(*c,*(c+1));
- if ((c32>=0x10780) && (c32<=0x107BF)) return 2; /* Latin Extended-F */
- else if ((c32>=0x1DF00) && (c32<=0x1DFFF)) return 2; /* Latin Extended-G */
+ if ( c32>=0x10780 && c32<=0x107BF ) return 2; /* Latin Extended-F */
+ else if ( c32>=0x1DF00 && c32<=0x1DFFF ) return 2; /* Latin Extended-G */
}
return 0;
}
@@ -463,13 +463,13 @@
{
UChar32 c32;
- if ((*c>=L'0')&&(*c<=L'9')) return 1;
- else if ((*c>=0xFF10)&&(*c<=0xFF19)) return 1; /* Fullwidth Digit */
+ if ( *c>=L'0' && *c<=L'9' ) return 1;
+ else if ( *c>=0xFF10 && *c<=0xFF19 ) return 1; /* Fullwidth Digit */
/* followings do not seem to be treated as numbers by ICU collator though charType is U_OTHER_NUMBER */
- else if ((*c>=0x3192)&&(*c<=0x3195)) return 0; /* IDEOGRAPHIC ANNOTATION ONE MARK..IDEOGRAPHIC ANNOTATION FOUR MARK */
- else if ((*c>=0x3220)&&(*c<=0x3229)) return 0; /* PARENTHESIZED IDEOGRAPH ONE..PARENTHESIZED IDEOGRAPH TEN */
- else if ((*c>=0x3280)&&(*c<=0x3289)) return 0; /* CIRCLED IDEOGRAPH ONE..CIRCLED IDEOGRAPH TEN */
- else if ((*c>=0xA830)&&(*c<=0xA835)) return 0; /* NORTH INDIC FRACTION ONE QUARTER..NORTH INDIC FRACTION THREE SIXTEENTHS */
+ else if ( *c>=0x3192 && *c<=0x3195 ) return 0; /* IDEOGRAPHIC ANNOTATION ONE MARK..IDEOGRAPHIC ANNOTATION FOUR MARK */
+ else if ( *c>=0x3220 && *c<=0x3229 ) return 0; /* PARENTHESIZED IDEOGRAPH ONE..PARENTHESIZED IDEOGRAPH TEN */
+ else if ( *c>=0x3280 && *c<=0x3289 ) return 0; /* CIRCLED IDEOGRAPH ONE..CIRCLED IDEOGRAPH TEN */
+ else if ( *c>=0xA830 && *c<=0xA835 ) return 0; /* NORTH INDIC FRACTION ONE QUARTER..NORTH INDIC FRACTION THREE SIXTEENTHS */
if (is_surrogate_pair(c))
c32=U16_GET_SUPPLEMENTARY(*c,*(c+1));
@@ -487,23 +487,23 @@
int is_jpn_kana(UChar *c)
{
- if (*c==0x30A0) return 0; /* KATAKANA-HIRAGANA DOUBLE HYPHEN */
- else if (*c==0x30FB) return 0; /* KATAKANA MIDDLE DOT */
- else if ((*c>=0x3040)&&(*c<=0x30FF)) return 1; /* Hiragana, Katakana */
- else if ((*c>=0x31F0)&&(*c<=0x31FF)) return 1; /* Katakana Phonetic Extensions */
- else if ((*c>=0x32D0)&&(*c<=0x32FE)) return 1; /* Circled Katakana */
- else if ((*c>=0xFF66)&&(*c<=0xFF9F)) return 1; /* Halfwidth Katakana */
- else if ((*c>=0x3300)&&(*c<=0x3357)) return 1; /* Squared Katakana words */
+ if ( *c==0x30A0 ) return 0; /* KATAKANA-HIRAGANA DOUBLE HYPHEN */
+ else if ( *c==0x30FB ) return 0; /* KATAKANA MIDDLE DOT */
+ else if ( *c>=0x3040 && *c<=0x30FF ) return 1; /* Hiragana, Katakana */
+ else if ( *c>=0x31F0 && *c<=0x31FF ) return 1; /* Katakana Phonetic Extensions */
+ else if ( *c>=0x32D0 && *c<=0x32FE ) return 1; /* Circled Katakana */
+ else if ( *c>=0xFF66 && *c<=0xFF9F ) return 1; /* Halfwidth Katakana */
+ else if ( *c>=0x3300 && *c<=0x3357 ) return 1; /* Squared Katakana words */
if (is_surrogate_pair(c)) {
UChar32 c32;
c32=U16_GET_SUPPLEMENTARY(*c,*(c+1));
- if ((c32>=0x1B130) && (c32<=0x1B16F)) return 2; /* Small Kana Extensions */
- else if ((c32==0x1B000)) return 2; /* KATAKANA LETTER ARCHAIC E */
- else if ((c32>=0x1B11F) /* HIRAGANA LETTER ARCHAIC WU */
- && (c32<=0x1B122)) return 2; /* KATAKANA LETTER ARCHAIC WU */
- else if ((c32==0x1F200)) return 2; /* SQUARE HIRAGANA HOKA */
- else if (c32==0x1B001) {
+ if ( c32>=0x1B130 && c32<=0x1B16F ) return 2; /* Small Kana Extensions */
+ else if ( c32==0x1B000 ) return 2; /* KATAKANA LETTER ARCHAIC E */
+ else if ( c32>=0x1B11F /* HIRAGANA LETTER ARCHAIC WU */
+ && c32<=0x1B122 ) return 2; /* KATAKANA LETTER ARCHAIC WU */
+ else if ( c32==0x1F200 ) return 2; /* SQUARE HIRAGANA HOKA */
+ else if ( c32==0x1B001 ) {
/* check whether U+1B001 is HIRAGANA LETTER ARCHAIC YE or not.
It may be HENTAIGANA LETTER E-1 */
if (kana_ye_mode==0) {
@@ -528,33 +528,33 @@
int is_kor_hngl(UChar *c)
{
- if ((*c>=0xAC00)&&(*c<=0xD7AF)) return 1; /* Hangul Syllables */
- else if ((*c>=0x1100)&&(*c<=0x11FF)) return 1; /* Hangul Jamo */
- else if ((*c>=0xA960)&&(*c<=0xA97F)) return 1; /* Hangul Jamo Extended-A */
- else if ((*c>=0xD7B0)&&(*c<=0xD7FF)) return 1; /* Hangul Jamo Extended-B */
- else if ((*c>=0x3130)&&(*c<=0x318F)) return 1; /* Hangul Compatibility Jamo */
- else if ((*c>=0xFFA0)&&(*c<=0xFFDC)) return 1; /* Hangul Halfwidth Jamo */
- else if ((*c>=0x3200)&&(*c<=0x321E)) return 1; /* Enclosed CJK Letters and Months */
- else if ((*c>=0x3260)&&(*c<=0x327E)) return 1; /* Enclosed CJK Letters and Months */
+ if ( *c>=0xAC00 && *c<=0xD7AF ) return 1; /* Hangul Syllables */
+ else if ( *c>=0x1100 && *c<=0x11FF ) return 1; /* Hangul Jamo */
+ else if ( *c>=0xA960 && *c<=0xA97F ) return 1; /* Hangul Jamo Extended-A */
+ else if ( *c>=0xD7B0 && *c<=0xD7FF ) return 1; /* Hangul Jamo Extended-B */
+ else if ( *c>=0x3130 && *c<=0x318F ) return 1; /* Hangul Compatibility Jamo */
+ else if ( *c>=0xFFA0 && *c<=0xFFDC ) return 1; /* Hangul Halfwidth Jamo */
+ else if ( *c>=0x3200 && *c<=0x321E ) return 1; /* Enclosed CJK Letters and Months */
+ else if ( *c>=0x3260 && *c<=0x327E ) return 1; /* Enclosed CJK Letters and Months */
else return 0;
}
int is_hanzi(UChar *c)
{
- if ((*c>=0x2E80) /* CJK Radicals Supplement */
- &&(*c<=0x2FDF)) return 1; /* Kangxi Radicals */
- else if ((*c>=0x31C0)&&(*c<=0x31EF)) return 1; /* CJK Strokes */
- else if ((*c>=0x3300) /* CJK Compatibility */
- &&(*c<=0x4DBF)) return 1; /* CJK Unified Ideographs Extension A */
- else if ((*c>=0x4E00)&&(*c<=0x9FFF)) return 1; /* CJK Unified Ideographs */
- else if ((*c>=0xF900)&&(*c<=0xFAFF)) return 1; /* CJK Compatibility Ideographs */
+ if ( *c>=0x2E80 /* CJK Radicals Supplement */
+ && *c<=0x2FDF ) return 1; /* Kangxi Radicals */
+ else if ( *c>=0x31C0 && *c<=0x31EF ) return 1; /* CJK Strokes */
+ else if ( *c>=0x3300 /* CJK Compatibility */
+ && *c<=0x4DBF ) return 1; /* CJK Unified Ideographs Extension A */
+ else if ( *c>=0x4E00 && *c<=0x9FFF ) return 1; /* CJK Unified Ideographs */
+ else if ( *c>=0xF900 && *c<=0xFAFF ) return 1; /* CJK Compatibility Ideographs */
if (is_surrogate_pair(c)) {
UChar32 c32;
c32=U16_GET_SUPPLEMENTARY(*c,*(c+1));
- if ((c32>=0x20000) && /* CJK Unified Ideographs Extension B,C,D,E,F,I */
+ if ( c32>=0x20000 && /* CJK Unified Ideographs Extension B,C,D,E,F,I */
/* CJK Compatibility Ideographs Supplement */
- (c32<=0x323AF)) return 2; /* CJK Unified Ideographs Extension G,H */
+ c32<=0x323AF ) return 2; /* CJK Unified Ideographs Extension G,H */
}
if (*c==0xFDD0) { /* Noncharacter */
if (hanzi_mode==HANZI_PINYIN &&
@@ -567,24 +567,24 @@
int is_zhuyin(UChar *c)
{
- if ((*c>=0x3100)&&(*c<=0x312F)) return 1; /* Bopomofo */
- else if ((*c>=0x31A0)&&(*c<=0x31BF)) return 1; /* Bopomofo Extended */
+ if ( *c>=0x3100 && *c<=0x312F ) return 1; /* Bopomofo */
+ else if ( *c>=0x31A0 && *c<=0x31BF ) return 1; /* Bopomofo Extended */
else return 0;
}
int is_cyrillic(UChar *c)
{
- if ((*c==0x0482)) return 0; /* Cyrillic Thousands Sign */
- else if ((*c>=0x0400) /* Cyrillic */
- &&(*c<=0x052F)) return 1; /* Cyrillic Supplement */
- else if ((*c>=0x1C80)&&(*c<=0x1C8F)) return 1; /* Cyrillic Extended-C */
- else if ((*c>=0x2DE0)&&(*c<=0x2DFF)) return 1; /* Cyrillic Extended-A */
- else if ((*c>=0xA640)&&(*c<=0xA69F)) return 1; /* Cyrillic Extended-B */
+ if ( *c==0x0482 ) return 0; /* Cyrillic Thousands Sign */
+ else if ( *c>=0x0400 /* Cyrillic */
+ && *c<=0x052F ) return 1; /* Cyrillic Supplement */
+ else if ( *c>=0x1C80 && *c<=0x1C8F ) return 1; /* Cyrillic Extended-C */
+ else if ( *c>=0x2DE0 && *c<=0x2DFF ) return 1; /* Cyrillic Extended-A */
+ else if ( *c>=0xA640 && *c<=0xA69F ) return 1; /* Cyrillic Extended-B */
if (is_surrogate_pair(c)) {
UChar32 c32;
c32=U16_GET_SUPPLEMENTARY(*c,*(c+1));
- if ((c32>=0x1E030) && (c32<=0x1E08F)) return 2; /* Cyrillic Extended-D */
+ if ( c32>=0x1E030 && c32<=0x1E08F ) return 2; /* Cyrillic Extended-D */
}
return 0;
}
@@ -591,23 +591,23 @@
int is_greek(UChar *c)
{
- if ((*c==0x03F6)) return 0; /* Greek Reversed Lunate Epsilon Symbol */
- else if ((*c>=0x0370)&&(*c<=0x03FF)) return 1; /* Greek */
- else if ((*c>=0x1F00)&&(*c<=0x1FFF)) return 1; /* Greek Extended */
+ if ( *c==0x03F6 ) return 0; /* Greek Reversed Lunate Epsilon Symbol */
+ else if ( *c>=0x0370 && *c<=0x03FF ) return 1; /* Greek */
+ else if ( *c>=0x1F00 && *c<=0x1FFF ) return 1; /* Greek Extended */
else return 0;
}
int is_devanagari(UChar *c)
{
- if ((*c>=0x0964) /* Generic punctuation for scripts of India */
- &&(*c<=0x096F)) return 0; /* Devanagari Digit */
- else if ((*c>=0x0900)&&(*c<=0x097F)) return 1; /* Devanagari */
- else if ((*c>=0xA8E0)&&(*c<=0xA8FF)) return 1; /* Devanagari Extended */
+ if ( *c>=0x0964 /* Generic punctuation for scripts of India */
+ && *c<=0x096F ) return 0; /* Devanagari Digit */
+ else if ( *c>=0x0900 && *c<=0x097F ) return 1; /* Devanagari */
+ else if ( *c>=0xA8E0 && *c<=0xA8FF ) return 1; /* Devanagari Extended */
if (is_surrogate_pair(c)) {
UChar32 c32;
c32=U16_GET_SUPPLEMENTARY(*c,*(c+1));
- if ((c32>=0x11B00) && (c32<=0x11B5F)) return 2; /* Devanagari Extended-A */
+ if ( c32>=0x11B00 && c32<=0x11B5F ) return 2; /* Devanagari Extended-A */
}
return 0;
}
@@ -614,48 +614,48 @@
int is_thai(UChar *c)
{
- if ((*c==0x0E3F)) return 0; /* Thai Currency Symbol Baht */
- else if ((*c>=0x0E50)&&(*c<=0x0E59)) return 0; /* Thai Digit */
- else if ((*c>=0x0E00)&&(*c<=0x0E7F)) return 1; /* Thai */
+ if ( *c==0x0E3F ) return 0; /* Thai Currency Symbol Baht */
+ else if ( *c>=0x0E50 && *c<=0x0E59 ) return 0; /* Thai Digit */
+ else if ( *c>=0x0E00 && *c<=0x0E7F ) return 1; /* Thai */
else return 0;
}
int is_arabic(UChar *c)
{
- if ((*c>=0x0600) /* ARABIC NUMBER SIGN..ARABIC SIGN SAMVAT */
+ if ( *c>=0x0600 /* ARABIC NUMBER SIGN..ARABIC SIGN SAMVAT */
/* ARABIC NUMBER MARK ABOVE */
- &&(*c<=0x0608)) return 0; /* ARABIC-INDIC CUBE ROOT..ARABIC RAY */
- else if ((*c==0x060B)) return 0; /* AFGHANI SIGN */
- else if ((*c==0x060C)) return 0; /* ARABIC COMMA */
- else if ((*c>=0x060E)&&(*c<=0x060F)) return 0; /* ARABIC POETIC VERSE SIGN..ARABIC SIGN MISRA */
- else if ((*c>=0x0660)&&(*c<=0x0669)) return 0; /* ARABIC-INDIC DIGIT ZERO..ARABIC-INDIC DIGIT NINE */
- else if ((*c==0x061B)) return 0; /* ARABIC SEMICOLON */
- else if ((*c==0x061C)) return 0; /* ARABIC LETTER MARK */
- else if ((*c==0x061F)) return 0; /* ARABIC QUESTION MARK */
- else if ((*c==0x0640)) return 0; /* ARABIC TATWEEL */
- else if ((*c==0x06DD)) return 0; /* ARABIC END OF AYAH */
- else if ((*c==0x06DE)) return 0; /* ARABIC START OF RUB EL HIZB */
- else if ((*c==0x06E9)) return 0; /* ARABIC PLACE OF SAJDAH */
- else if ((*c>=0x06F0)&&(*c<=0x06F9)) return 0; /* EXTENDED ARABIC-INDIC DIGIT ZERO..EXTENDED ARABIC-INDIC DIGIT NINE */
- else if ((*c>=0x06FD)&&(*c<=0x06FE)) return 0; /* ARABIC SIGN SINDHI AMPERSAND..ARABIC SIGN SINDHI POSTPOSITION MEN */
- else if ((*c==0x08E2)) return 0; /* ARABIC DISPUTED END OF AYAH */
- else if ((*c>=0x0890)&&(*c<=0x0891)) return 0; /* ARABIC POUND MARK ABOVE..ARABIC PIASTRE MARK ABOVE */
- else if ((*c>=0xFD40)&&(*c<=0xFD4F)) return 0; /* ARABIC LIGATURE RAHIMAHU ALLAAH..ARABIC LIGATURE RAHIMAHUM ALLAAH */
- else if ((*c==0xFDCF)) return 0; /* ARABIC LIGATURE SALAAMUHU ALAYNAA */
- else if ((*c==0xFDFC)) return 0; /* RIAL SIGH */
- else if ((*c>=0xFDFD)&&(*c<=0xFDFF)) return 0; /* ARABIC LIGATURE BISMILLAH AR-RAHMAN AR-RAHEEM..ARABIC LIGATURE AZZA WA JALL */
+ && *c<=0x0608 ) return 0; /* ARABIC-INDIC CUBE ROOT..ARABIC RAY */
+ else if ( *c==0x060B ) return 0; /* AFGHANI SIGN */
+ else if ( *c==0x060C ) return 0; /* ARABIC COMMA */
+ else if ( *c>=0x060E && *c<=0x060F ) return 0; /* ARABIC POETIC VERSE SIGN..ARABIC SIGN MISRA */
+ else if ( *c>=0x0660 && *c<=0x0669 ) return 0; /* ARABIC-INDIC DIGIT ZERO..ARABIC-INDIC DIGIT NINE */
+ else if ( *c==0x061B ) return 0; /* ARABIC SEMICOLON */
+ else if ( *c==0x061C ) return 0; /* ARABIC LETTER MARK */
+ else if ( *c==0x061F ) return 0; /* ARABIC QUESTION MARK */
+ else if ( *c==0x0640 ) return 0; /* ARABIC TATWEEL */
+ else if ( *c==0x06DD ) return 0; /* ARABIC END OF AYAH */
+ else if ( *c==0x06DE ) return 0; /* ARABIC START OF RUB EL HIZB */
+ else if ( *c==0x06E9 ) return 0; /* ARABIC PLACE OF SAJDAH */
+ else if ( *c>=0x06F0 && *c<=0x06F9 ) return 0; /* EXTENDED ARABIC-INDIC DIGIT ZERO..EXTENDED ARABIC-INDIC DIGIT NINE */
+ else if ( *c>=0x06FD && *c<=0x06FE ) return 0; /* ARABIC SIGN SINDHI AMPERSAND..ARABIC SIGN SINDHI POSTPOSITION MEN */
+ else if ( *c==0x08E2 ) return 0; /* ARABIC DISPUTED END OF AYAH */
+ else if ( *c>=0x0890 && *c<=0x0891 ) return 0; /* ARABIC POUND MARK ABOVE..ARABIC PIASTRE MARK ABOVE */
+ else if ( *c>=0xFD40 && *c<=0xFD4F ) return 0; /* ARABIC LIGATURE RAHIMAHU ALLAAH..ARABIC LIGATURE RAHIMAHUM ALLAAH */
+ else if ( *c==0xFDCF ) return 0; /* ARABIC LIGATURE SALAAMUHU ALAYNAA */
+ else if ( *c==0xFDFC ) return 0; /* RIAL SIGH */
+ else if ( *c>=0xFDFD && *c<=0xFDFF ) return 0; /* ARABIC LIGATURE BISMILLAH AR-RAHMAN AR-RAHEEM..ARABIC LIGATURE AZZA WA JALL */
- else if ((*c>=0x0600)&&(*c<=0x06FF)) return 1; /* Arabic */
- else if ((*c>=0x0750)&&(*c<=0x077F)) return 1; /* Arabic Supplement */
- else if ((*c>=0x0870) /* Arabic Extended-B */
- &&(*c<=0x08FF)) return 1; /* Arabic Extended-A */
- else if ((*c>=0xFB50)&&(*c<=0xFDFF)) return 1; /* Arabic Presentation Forms-A */
- else if ((*c>=0xFE70)&&(*c<=0xFEFF)) return 1; /* Arabic Presentation Forms-B */
+ else if ( *c>=0x0600 && *c<=0x06FF ) return 1; /* Arabic */
+ else if ( *c>=0x0750 && *c<=0x077F ) return 1; /* Arabic Supplement */
+ else if ( *c>=0x0870 /* Arabic Extended-B */
+ && *c<=0x08FF ) return 1; /* Arabic Extended-A */
+ else if ( *c>=0xFB50 && *c<=0xFDFF ) return 1; /* Arabic Presentation Forms-A */
+ else if ( *c>=0xFE70 && *c<=0xFEFF ) return 1; /* Arabic Presentation Forms-B */
if (is_surrogate_pair(c)) {
UChar32 c32;
c32=U16_GET_SUPPLEMENTARY(*c,*(c+1));
- if ((c32>=0x10EC0) && (c32<=0x10EFF)) return 2; /* Arabic Extended-C */
+ if ( c32>=0x10EC0 && c32<=0x10EFF ) return 2; /* Arabic Extended-C */
}
return 0;
}
@@ -662,9 +662,9 @@
int is_hebrew(UChar *c)
{
- if ((*c==0xFB29)) return 0; /* Hebrew Letter Alternative Plus Sign */
- else if ((*c>=0x0590)&&(*c<=0x05FF)) return 1; /* Hebrew */
- else if ((*c>=0xFB1D)&&(*c<=0xFB4F)) return 1; /* Hebrew presentation forms */
+ if ( *c==0xFB29 ) return 0; /* Hebrew Letter Alternative Plus Sign */
+ else if ( *c>=0x0590 && *c<=0x05FF ) return 1; /* Hebrew */
+ else if ( *c>=0xFB1D && *c<=0xFB4F ) return 1; /* Hebrew presentation forms */
else return 0;
}
Modified: trunk/Build/source/texk/upmendex/styfile.c
===================================================================
--- trunk/Build/source/texk/upmendex/styfile.c 2024-11-09 10:39:26 UTC (rev 72805)
+++ trunk/Build/source/texk/upmendex/styfile.c 2024-11-09 10:39:33 UTC (rev 72806)
@@ -37,7 +37,7 @@
/* read style file */
void styread(const char *filename)
{
- int i,cc;
+ int i,j,q,cc;
char buff[4096],tmp[4096];
filename = KP_find_file(&kp_ist,filename);
@@ -87,16 +87,31 @@
priority=atoi(&buff[cc]);
continue;
}
- if (getparam(buff,"item_0",item_0)) continue;
- if (getparam(buff,"item_1",item_1)) continue;
- if (getparam(buff,"item_2",item_2)) continue;
- if (getparam(buff,"item_01",item_01)) continue;
- if (getparam(buff,"item_x1",item_x1)) continue;
- if (getparam(buff,"item_12",item_12)) continue;
- if (getparam(buff,"item_x2",item_x2)) continue;
- if (getparam(buff,"delim_0",delim_0)) continue;
- if (getparam(buff,"delim_1",delim_1)) continue;
- if (getparam(buff,"delim_2",delim_2)) continue;
+ q=0;
+ for (j=0;;j++) {
+ sprintf(tmp,"item_%d",j);
+ if (getparam(buff,tmp,item_0[j])) {
+ q=1;
+ break;
+ }
+ sprintf(tmp,"delim_%d",j);
+ if (getparam(buff,tmp,delim_0[j])) {
+ q=1;
+ break;
+ }
+ if (j==MAXDEPTH-1) break;
+ sprintf(tmp,"item_%d%d",j,j+1);
+ if (getparam(buff,tmp,item_01[j])) {
+ q=1;
+ break;
+ }
+ sprintf(tmp,"item_x%d",j+1);
+ if (getparam(buff,tmp,item_x[j])) {
+ q=1;
+ break;
+ }
+ }
+ if (q==1) continue;
if (getparam(buff,"delim_n",delim_n)) continue;
if (getparam(buff,"delim_r",delim_r)) continue;
if (getparam(buff,"delim_t",delim_t)) continue;
Added: trunk/Build/source/texk/upmendex/tests/icu.test
===================================================================
--- trunk/Build/source/texk/upmendex/tests/icu.test (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/icu.test 2024-11-09 10:39:33 UTC (rev 72806)
@@ -0,0 +1,66 @@
+#! /bin/sh -vx
+# $Id$
+# Copyright 2021-2024 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.
+
+BinDir=${BinDir:-.}
+ExeExt=${ExeExt:-}
+_upmendex=$BinDir/upmendex$ExeExt
+
+TEXMFCNF=$srcdir/../kpathsea
+export TEXMFCNF
+
+rm -f locale*.* attr*.* rule*.*
+rc=0
+
+# 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 || 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 || 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 || 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 || rc=54
+
+# malformed input
+$_upmendex -s $srcdir/tests/uni.ist -s $srcdir/tests/rule3.ist $srcdir/tests/rule.idx \
+ -o rule3.ind1 -t rule3.ilg
+if [ $? -eq 254 ]; then
+ echo "Error check: OK"
+else
+ echo "Error check: NG"
+ exit 1
+fi
+
+$_upmendex -s $srcdir/tests/uni.ist -s $srcdir/tests/rule4.ist $srcdir/tests/rule.idx \
+ -o rule4.ind1 -t rule4.ilg
+if [ $? -eq 254 ]; then
+ echo "Error check: OK"
+else
+ echo "Error check: NG"
+ exit 1
+fi
+
+# 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 || rc=55
+
+$_upmendex -s $srcdir/tests/uni.ist -s $srcdir/tests/locale3.ist -s $srcdir/tests/rule1.ist $srcdir/tests/rule.idx \
+ -o locale3-rule1.ind1 -t locale3-rule1.ilg \
+ && diff $srcdir/tests/locale3-rule.ind locale3-rule1.ind1 || rc=56
+
+
+exit $rc
Property changes on: trunk/Build/source/texk/upmendex/tests/icu.test
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Build/source/texk/upmendex/tests/nest.test
===================================================================
--- trunk/Build/source/texk/upmendex/tests/nest.test (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/nest.test 2024-11-09 10:39:33 UTC (rev 72806)
@@ -0,0 +1,41 @@
+#! /bin/sh -vx
+# $Id$
+# Copyright 2024 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.
+
+BinDir=${BinDir:-.}
+ExeExt=${ExeExt:-}
+_upmendex=$BinDir/upmendex$ExeExt
+
+TEXMFCNF=$srcdir/../kpathsea
+export TEXMFCNF
+
+rm -f nested*.* toodeep*.*
+rc=0
+
+# test for nested items and delimiters
+$_upmendex -s $srcdir/tests/nested3.ist -o nested3.ind1 -t nested3.ilg $srcdir/tests/nested3.idx \
+ && diff $srcdir/tests/nested3.ind nested3.ind1 || rc=30
+$_upmendex -s $srcdir/tests/nested.ist -o nested.ind1 -t nested.ilg $srcdir/tests/nested.idx \
+ && diff $srcdir/tests/nested.ind nested.ind1 || rc=31
+
+# check compatibility with makeindex if exist
+if type makeindex > /dev/null 2>&1; then
+ makeindex -s $srcdir/tests/nested3.ist -o nested_mi.ind1 -t nested_mi.ilg $srcdir/tests/nested3.idx \
+ && diff $srcdir/tests/nested3.ind nested_mi.ind1 || rc=32
+fi
+
+# test for too deep indexentry
+$_upmendex $srcdir/tests/toodeep.idx -o toodeep.ind1 -t toodeep.ilg
+
+if [ $? -eq 255 ]; then
+ echo "Error check: OK"
+else
+ echo "Error check: NG"
+ rc=56
+fi
+
+
+exit $rc
Property changes on: trunk/Build/source/texk/upmendex/tests/nest.test
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Build/source/texk/upmendex/tests/nested.idx
===================================================================
--- trunk/Build/source/texk/upmendex/tests/nested.idx (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/nested.idx 2024-11-09 10:39:33 UTC (rev 72806)
@@ -0,0 +1,46 @@
+\indexentry{xa}{1}
+\indexentry{xb}{1}
+\indexentry{xc}{1}
+\indexentry{ya!x}{1}
+\indexentry{ya!y}{1}
+\indexentry{ya!z}{1}
+\indexentry{yb!x!x}{1}
+\indexentry{yb!x!y}{1}
+\indexentry{yb!x!z}{1}
+\indexentry{yc!x!y!x}{1}
+\indexentry{yc!x!y!y}{1}
+\indexentry{yc!x!y!z}{1}
+\indexentry{yd!x!y!z!x}{1}
+\indexentry{yd!x!y!z!y}{1}
+\indexentry{yd!x!y!z!z}{1}
+\indexentry{a}{1}
+\indexentry{a!a}{2}
+\indexentry{a!a!a}{3}
+\indexentry{a!a!a!a}{4}
+\indexentry{a!a!a!a!a}{5}
+\indexentry{ab}{6}
+\indexentry{ac!a!a!a!a}{7}
+\indexentry{ad!a}{8}
+\indexentry{ad!b}{9}
+\indexentry{ad!b!a!a!a}{10}
+\indexentry{ae!a!a}{11}
+\indexentry{ae!b!b}{12}
+\indexentry{ae!b!b!a!a}{13}
+\indexentry{af!b!a!a}{14}
+\indexentry{af!b!b!b}{15}
+\indexentry{af!b!b!b!a}{16}
+\indexentry{ag!b!b!a}{17}
+\indexentry{ag!b!b!b}{18}
+\indexentry{ag!b!b!b!a}{19}
+\indexentry{pa}{21}
+\indexentry{pa!qa!ra}{22}
+\indexentry{pb}{23}
+\indexentry{pb!qb!rb!sb}{24}
+\indexentry{pc}{25}
+\indexentry{pc!qc!rc!sc!tc}{26}
+\indexentry{pd!qd}{27}
+\indexentry{pd!qd!rd!sd}{28}
+\indexentry{pe!qe}{29}
+\indexentry{pe!qe!re!se!te}{30}
+\indexentry{pf!qf!rf}{31}
+\indexentry{pf!qf!rf!sf!tf}{32}
Added: trunk/Build/source/texk/upmendex/tests/nested.ind
===================================================================
--- trunk/Build/source/texk/upmendex/tests/nested.ind (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/nested.ind 2024-11-09 10:39:33 UTC (rev 72806)
@@ -0,0 +1,101 @@
+\begin{theindex}
+
+ \item_0 a(0) 1
+ \item_01 a(1) 2
+ \item_12 a(2) 3
+ \item_23 a(3) 4
+ \item_34 a(4) 5
+ \item_0 ab(0) 6
+ \item_0 ac
+ \item_x1 a
+ \item_x2 a
+ \item_x3 a
+ \item_x4 a(4) 7
+ \item_0 ad
+ \item_x1 a(1) 8
+ \item_1 b(1) 9
+ \item_12 a
+ \item_x3 a
+ \item_x4 a(4) 10
+ \item_0 ae
+ \item_x1 a
+ \item_x2 a(2) 11
+ \item_1 b
+ \item_x2 b(2) 12
+ \item_23 a
+ \item_x4 a(4) 13
+ \item_0 af
+ \item_x1 b
+ \item_x2 a
+ \item_x3 a(3) 14
+ \item_2 b
+ \item_x3 b(3) 15
+ \item_34 a(4) 16
+ \item_0 ag
+ \item_x1 b
+ \item_x2 b
+ \item_x3 a(3) 17
+ \item_3 b(3) 18
+ \item_34 a(4) 19
+
+ \indexspace
+
+ \item_0 pa(0) 21
+ \item_01 qa
+ \item_x2 ra(2) 22
+ \item_0 pb(0) 23
+ \item_01 qb
+ \item_x2 rb
+ \item_x3 sb(3) 24
+ \item_0 pc(0) 25
+ \item_01 qc
+ \item_x2 rc
+ \item_x3 sc
+ \item_x4 tc(4) 26
+ \item_0 pd
+ \item_x1 qd(1) 27
+ \item_12 rd
+ \item_x3 sd(3) 28
+ \item_0 pe
+ \item_x1 qe(1) 29
+ \item_12 re
+ \item_x3 se
+ \item_x4 te(4) 30
+ \item_0 pf
+ \item_x1 qf
+ \item_x2 rf(2) 31
+ \item_23 sf
+ \item_x4 tf(4) 32
+
+ \indexspace
+
+ \item_0 xa(0) 1
+ \item_0 xb(0) 1
+ \item_0 xc(0) 1
+
+ \indexspace
+
+ \item_0 ya
+ \item_x1 x(1) 1
+ \item_1 y(1) 1
+ \item_1 z(1) 1
+ \item_0 yb
+ \item_x1 x
+ \item_x2 x(2) 1
+ \item_2 y(2) 1
+ \item_2 z(2) 1
+ \item_0 yc
+ \item_x1 x
+ \item_x2 y
+ \item_x3 x(3) 1
+ \item_3 y(3) 1
+ \item_3 z(3) 1
+ \item_0 yd
+ \item_x1 x
+ \item_x2 y
+ \item_x3 z
+ \item_x4 x(4) 1
+ \item_4 y(4) 1
+ \item_4 z(4) 1
+
+\end{theindex}
Added: trunk/Build/source/texk/upmendex/tests/nested.ist
===================================================================
--- trunk/Build/source/texk/upmendex/tests/nested.ist (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/nested.ist 2024-11-09 10:39:33 UTC (rev 72806)
@@ -0,0 +1,18 @@
+item_0 "\n \\item_0 "
+item_1 "\n \\item_1 "
+item_2 "\n \\item_2 "
+item_3 "\n \\item_3 "
+item_4 "\n \\item_4 "
+item_01 "\n \\item_01 "
+item_12 "\n \\item_12 "
+item_23 "\n \\item_23 "
+item_34 "\n \\item_34 "
+item_x1 "\n \\item_x1 "
+item_x2 "\n \\item_x2 "
+item_x3 "\n \\item_x3 "
+item_x4 "\n \\item_x4 "
+delim_0 "(0) "
+delim_1 "(1) "
+delim_2 "(2) "
+delim_3 "(3) "
+delim_4 "(4) "
Added: trunk/Build/source/texk/upmendex/tests/nested3.idx
===================================================================
--- trunk/Build/source/texk/upmendex/tests/nested3.idx (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/nested3.idx 2024-11-09 10:39:33 UTC (rev 72806)
@@ -0,0 +1,19 @@
+\indexentry{xa}{1}
+\indexentry{xb}{1}
+\indexentry{xc}{1}
+\indexentry{ya!x}{1}
+\indexentry{ya!y}{1}
+\indexentry{ya!z}{1}
+\indexentry{yb!x!x}{1}
+\indexentry{yb!x!y}{1}
+\indexentry{yb!x!z}{1}
+\indexentry{a}{1}
+\indexentry{a!a}{2}
+\indexentry{a!a!a}{3}
+\indexentry{ab}{6}
+\indexentry{ad!a}{8}
+\indexentry{ad!b}{9}
+\indexentry{ae!a!a}{11}
+\indexentry{ae!b!b}{12}
+\indexentry{pa}{21}
+\indexentry{pa!qa!ra}{22}
Added: trunk/Build/source/texk/upmendex/tests/nested3.ind
===================================================================
--- trunk/Build/source/texk/upmendex/tests/nested3.ind (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/nested3.ind 2024-11-09 10:39:33 UTC (rev 72806)
@@ -0,0 +1,40 @@
+\begin{theindex}
+
+ \item_0 a(0) 1
+ \item_01 a(1) 2
+ \item_12 a(2) 3
+ \item_0 ab(0) 6
+ \item_0 ad
+ \item_x1 a(1) 8
+ \item_1 b(1) 9
+ \item_0 ae
+ \item_x1 a
+ \item_x2 a(2) 11
+ \item_1 b
+ \item_x2 b(2) 12
+
+ \indexspace
+
+ \item_0 pa(0) 21
+ \item_01 qa
+ \item_x2 ra(2) 22
+
+ \indexspace
+
+ \item_0 xa(0) 1
+ \item_0 xb(0) 1
+ \item_0 xc(0) 1
+
+ \indexspace
+
+ \item_0 ya
+ \item_x1 x(1) 1
+ \item_1 y(1) 1
+ \item_1 z(1) 1
+ \item_0 yb
+ \item_x1 x
+ \item_x2 x(2) 1
+ \item_2 y(2) 1
+ \item_2 z(2) 1
+
+\end{theindex}
Added: trunk/Build/source/texk/upmendex/tests/nested3.ist
===================================================================
--- trunk/Build/source/texk/upmendex/tests/nested3.ist (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/nested3.ist 2024-11-09 10:39:33 UTC (rev 72806)
@@ -0,0 +1,10 @@
+item_0 "\n \\item_0 "
+item_1 "\n \\item_1 "
+item_2 "\n \\item_2 "
+item_01 "\n \\item_01 "
+item_12 "\n \\item_12 "
+item_x1 "\n \\item_x1 "
+item_x2 "\n \\item_x2 "
+delim_0 "(0) "
+delim_1 "(1) "
+delim_2 "(2) "
Added: trunk/Build/source/texk/upmendex/tests/ok-tort.ind
===================================================================
--- trunk/Build/source/texk/upmendex/tests/ok-tort.ind (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/ok-tort.ind 2024-11-09 10:39:33 UTC (rev 72806)
@@ -0,0 +1,24 @@
+\begin{theindex}
+
+ \item bad-encaps, \ii{5--7}
+
+ \indexspace
+
+ \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
+
+ \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
+
+ \item ok-encaps, \ii{5--7}
+
+\end{theindex}
Added: trunk/Build/source/texk/upmendex/tests/pprec.test
===================================================================
--- trunk/Build/source/texk/upmendex/tests/pprec.test (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/pprec.test 2024-11-09 10:39:33 UTC (rev 72806)
@@ -0,0 +1,68 @@
+#! /bin/sh -vx
+# $Id$
+# Copyright 2021-2024 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.
+
+BinDir=${BinDir:-.}
+ExeExt=${ExeExt:-}
+_upmendex=$BinDir/upmendex$ExeExt
+
+TEXMFCNF=$srcdir/../kpathsea
+export TEXMFCNF
+
+rm -f range*.* pprec*.* romalp*.*
+rc=0
+
+# test for range suffix_2p, suffix_3p, suffix_mp
+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
+
+
+# test for page_precedence and suffix_3p
+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
+
+
+# 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
+
+
+exit $rc
Property changes on: trunk/Build/source/texk/upmendex/tests/pprec.test
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Build/source/texk/upmendex/tests/toodeep.idx
===================================================================
--- trunk/Build/source/texk/upmendex/tests/toodeep.idx (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/toodeep.idx 2024-11-09 10:39:33 UTC (rev 72806)
@@ -0,0 +1,6 @@
+\indexentry{a}{1}
+\indexentry{a!a}{2}
+\indexentry{a!a!a}{3}
+\indexentry{a!a!a!a}{4}
+\indexentry{a!a!a!a!a}{5}
+\indexentry{a!a!a!a!a!a}{6}
Added: trunk/Build/source/texk/upmendex/tests/tort.idx
===================================================================
--- trunk/Build/source/texk/upmendex/tests/tort.idx (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/tort.idx 2024-11-09 10:39:33 UTC (rev 72806)
@@ -0,0 +1,53 @@
+\indexentry{@illegal-null-field}{9}
+\indexentry{!illegal-null-field}{10}
+\indexentry{too-may-ats at x@}{10}
+\indexentry{too-may-bangs!x!y!z!v!w}{10}
+\indexentry{too-may-bars|x|}{10}
+\indexentry{hoge!@illegal-null-field}{9}
+\indexentry{hoge!fuga!@illegal-null-field}{9}
+\indexentry{haha!@!illegal-null-field}{10}
+\indexentry{illegal-null-field-in-bangs!p!@r}{10}
+\indexentry{illegal-null-field-in-bangs!!r}{10}
+\indexentry{fff!p!q at r@s}{11}
+\indexentry{ggg!p!q|r|}{12}
+\indexentry{hhh|t at p|s}{13}
+\indexentry{iii|t!p|s}{14}
+
+\indexentry{incons-entries|xx}{6}
+\indexentry{incons-entries}{6}
+
+\indexentry{implicit-range}{10}
+\indexentry{implicit-range}{11}
+\indexentry{implicit-range}{12}
+
+\indexentry{missing(|)}{6}
+\indexentry{missing)|(}{6}
+
+\indexentry{ok-encaps|(ii}{5}
+\indexentry{ok-encaps|ii}{6}
+\indexentry{ok-encaps|)}{7}
+
+\indexentry{bad-encaps|(ii}{5}
+\indexentry{bad-encaps|ii}{6}
+\indexentry{bad-encaps|)iii}{7}
+
+\indexentry{incons-encaps|(}{5}
+\indexentry{incons-encaps|ii}{6}
+\indexentry{incons-encaps|)}{7}
+
+\indexentry{incons-encaps2|(}{5}
+\indexentry{incons-encaps2|ii}{5}
+\indexentry{incons-encaps2|)}{5}
+
+\indexentry{mixed-range|(}{i}
+\indexentry{mixed-range|)}{6}
+
+\indexentry{mixed-range1|(}{i}
+\indexentry{mixed-range1}{iv}
+\indexentry{mixed-range1}{3}
+\indexentry{mixed-range1|)}{6}
+
+\indexentry{mixed-range2|(}{i}
+\indexentry{mixed-range2|xx}{ii}
+\indexentry{mixed-range2|yy}{3}
+\indexentry{mixed-range2|)}{6}
Added: trunk/Build/source/texk/upmendex/tests/tortW.idx
===================================================================
--- trunk/Build/source/texk/upmendex/tests/tortW.idx (rev 0)
+++ trunk/Build/source/texk/upmendex/tests/tortW.idx 2024-11-09 10:39:33 UTC (rev 72806)
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\indexentry{incons-entries|xx}{6}
+\indexentry{incons-entries}{6}
+
+\indexentry{implicit-range}{10}
+\indexentry{implicit-range}{11}
+\indexentry{implicit-range}{12}
+
+\indexentry{missing(|)}{6}
+\indexentry{missing)|(}{6}
+
+\indexentry{ok-encaps|(ii}{5}
+\indexentry{ok-encaps|ii}{6}
+\indexentry{ok-encaps|)}{7}
+
+\indexentry{bad-encaps|(ii}{5}
+\indexentry{bad-encaps|ii}{6}
+\indexentry{bad-encaps|)iii}{7}
+
+\indexentry{incons-encaps|(}{5}
+\indexentry{incons-encaps|ii}{6}
+\indexentry{incons-encaps|)}{7}
+
+\indexentry{incons-encaps2|(}{5}
+\indexentry{incons-encaps2|ii}{5}
+\indexentry{incons-encaps2|)}{5}
+
+\indexentry{mixed-range|(}{i}
+\indexentry{mixed-range|)}{6}
+
+\indexentry{mixed-range1|(}{i}
+\indexentry{mixed-range1}{iv}
+\indexentry{mixed-range1}{3}
+\indexentry{mixed-range1|)}{6}
+
+\indexentry{mixed-range2|(}{i}
+\indexentry{mixed-range2|xx}{ii}
+\indexentry{mixed-range2|yy}{3}
+\indexentry{mixed-range2|)}{6}
Modified: trunk/Build/source/texk/upmendex/tests/upmendex.test
===================================================================
--- trunk/Build/source/texk/upmendex/tests/upmendex.test 2024-11-09 10:39:26 UTC (rev 72805)
+++ trunk/Build/source/texk/upmendex/tests/upmendex.test 2024-11-09 10:39:33 UTC (rev 72806)
@@ -1,6 +1,6 @@
#! /bin/sh -vx
# $Id$
-# Copyright 2021-2023 TANAKA Takuji <ttk at t-lab.opal.ne.jp>
+# Copyright 2021-2024 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.
@@ -12,7 +12,7 @@
TEXMFCNF=$srcdir/../kpathsea
export TEXMFCNF
-rm -f foo.* uni.* range*.* pprec*.* romalp*.* locale*.* attr*.* rule*.*
+rm -f foo.* uni.* tort*.*
rc=0
$_upmendex $srcdir/tests/foo.idx -o foo.ind1 -t foo.ilg1 \
@@ -34,103 +34,13 @@
$srcdir/tests/uni.idx -o uni.ind3 -t uni.ilg3 \
&& diff $srcdir/tests/uni.ind uni.ind3 || rc=5
+$_upmendex $srcdir/tests/tort.idx -o tort.ind1 -t tort.ilg1 \
+ && rc=20
+#$_upmendex $srcdir/tests/tort.idx -o tort.ind1 -t tort.ilg1 \
+# && diff $srcdir/tests/ok-tort.ind tort.ind1 || :
-# test for range suffix_2p, suffix_3p, suffix_mp
-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 $srcdir/tests/tortW.idx -o tortW.ind1 -t tortW.ilg1 \
+ && diff $srcdir/tests/ok-tort.ind tortW.ind1 || :
-# test for page_precedence and suffix_3p
-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
-
-
-# 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
-
-
-# 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 || 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 || 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 || 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 || rc=54
-
-# malformed input
-$_upmendex -s $srcdir/tests/uni.ist -s $srcdir/tests/rule3.ist $srcdir/tests/rule.idx \
- -o rule3.ind1 -t rule3.ilg
-if [ $? -eq 254 ]; then
- echo "Error check: OK"
-else
- echo "Error check: NG"
- exit 1
-fi
-
-$_upmendex -s $srcdir/tests/uni.ist -s $srcdir/tests/rule4.ist $srcdir/tests/rule.idx \
- -o rule4.ind1 -t rule4.ilg
-if [ $? -eq 254 ]; then
- echo "Error check: OK"
-else
- echo "Error check: NG"
- exit 1
-fi
-
-# 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 || rc=55
-
-$_upmendex -s $srcdir/tests/uni.ist -s $srcdir/tests/locale3.ist -s $srcdir/tests/rule1.ist $srcdir/tests/rule.idx \
- -o locale3-rule1.ind1 -t locale3-rule1.ilg \
- && diff $srcdir/tests/locale3-rule.ind locale3-rule1.ind1 || rc=56
-
-
exit $rc
Modified: trunk/Build/source/texk/upmendex/var.h
===================================================================
--- trunk/Build/source/texk/upmendex/var.h 2024-11-09 10:39:26 UTC (rev 72805)
+++ trunk/Build/source/texk/upmendex/var.h 2024-11-09 10:39:33 UTC (rev 72806)
@@ -18,9 +18,21 @@
char group_skip[STYBUFSIZE]={"\n\n \\indexspace\n"};
char lethead_prefix[STYBUFSIZE]={""},lethead_suffix[STYBUFSIZE]={""};
int lethead_flag=0;
-char item_0[STYBUFSIZE]={"\n \\item "},item_1[STYBUFSIZE]={"\n \\subitem "},item_2[STYBUFSIZE]={"\n \\subsubitem "};
-char item_01[STYBUFSIZE]={"\n \\subitem "},item_x1[STYBUFSIZE]={"\n \\subitem "},item_12[STYBUFSIZE]={"\n \\subsubitem "},item_x2[STYBUFSIZE]={"\n \\subsubitem "};
-char delim_0[STYBUFSIZE]={", "},delim_1[STYBUFSIZE]={", "},delim_2[STYBUFSIZE]={", "},delim_n[STYBUFSIZE]={", "},delim_r[STYBUFSIZE]={"--"},delim_t[STYBUFSIZE]={""};
+char item_0[][STYBUFSIZE] ={{"\n \\item "},
+ {"\n \\subitem "},
+ {"\n \\subsubitem "},
+ {"\n \\subsubsubitem "},
+ {"\n \\subsubsubsubitem "}};
+char item_01[][STYBUFSIZE]={{"\n \\subitem "},
+ {"\n \\subsubitem "},
+ {"\n \\subsubsubitem "},
+ {"\n \\subsubsubsubitem "}};
+char item_x[][STYBUFSIZE] ={{"\n \\subitem "},
+ {"\n \\subsubitem "},
+ {"\n \\subsubsubitem "},
+ {"\n \\subsubsubsubitem "}};
+char delim_0[][STYBUFSIZE]={{", "},{", "},{", "},{", "},{", "}};
+char delim_n[STYBUFSIZE]={", "},delim_r[STYBUFSIZE]={"--"},delim_t[STYBUFSIZE]={""};
char suffix_2p[STYBUFSIZE]={""},suffix_3p[STYBUFSIZE]={""},suffix_mp[STYBUFSIZE]={""};
char encap_prefix[STYBUFSIZE]={"\\"},encap_infix[STYBUFSIZE]={"{"},encap_suffix[STYBUFSIZE]={"}"};
int line_max=72;
More information about the tex-live-commits
mailing list.