summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorTakuji Tanaka <ttk@t-lab.opal.ne.jp>2022-11-20 08:09:38 +0000
committerTakuji Tanaka <ttk@t-lab.opal.ne.jp>2022-11-20 08:09:38 +0000
commit2609330d04fe58864656ce2f23d6a307f9a72ff7 (patch)
treec5979aac54b95e5cec74a147bca8ba063bcd0820 /Build
parent3cf6d7f77a0756aadb12c69f0d532e7aaa3acb75 (diff)
upmendex: ver1.07, Improve detection of hanzi header
git-svn-id: svn://tug.org/texlive/trunk@65057 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/README2
-rw-r--r--Build/source/texk/upmendex/ChangeLog7
-rwxr-xr-xBuild/source/texk/upmendex/configure22
-rw-r--r--Build/source/texk/upmendex/configure.ac2
-rw-r--r--Build/source/texk/upmendex/exhanzi.h1
-rw-r--r--Build/source/texk/upmendex/fwrite.c11
-rw-r--r--Build/source/texk/upmendex/hanzi.h1
-rw-r--r--Build/source/texk/upmendex/sort.c7
8 files changed, 33 insertions, 20 deletions
diff --git a/Build/source/texk/README b/Build/source/texk/README
index a780ecfcafa..5da788773a0 100644
--- a/Build/source/texk/README
+++ b/Build/source/texk/README
@@ -108,7 +108,7 @@ ttf2pk2 - maintained here, by us
ttfdump - maintained here, by us, since Taiwan upstream apparently gone.
-upmendex 1.06 - by Takuji Tanaka
+upmendex 1.07 - by Takuji Tanaka
https://ctan.org/pkg/upmendex
https://github.com/t-tk/upmendex-package
diff --git a/Build/source/texk/upmendex/ChangeLog b/Build/source/texk/upmendex/ChangeLog
index fe24a1cd3c2..65eb5d9d7ec 100644
--- a/Build/source/texk/upmendex/ChangeLog
+++ b/Build/source/texk/upmendex/ChangeLog
@@ -1,3 +1,10 @@
+2022-11-20 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
+
+ * version 1.07 Stable version.
+ * configure.ac: Bump version.
+ * sort.c, fwrite.c, {,ex}hanzi.h:
+ Improve detection of hanzi header.
+
2022-11-16 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
* version 1.06 Stable version.
diff --git a/Build/source/texk/upmendex/configure b/Build/source/texk/upmendex/configure
index b906de77c5e..34ccf41dd5d 100755
--- a/Build/source/texk/upmendex/configure
+++ b/Build/source/texk/upmendex/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for upmendex (TeX Live) 1.06.
+# Generated by GNU Autoconf 2.71 for upmendex (TeX Live) 1.07.
#
#
# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
@@ -626,8 +626,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='upmendex (TeX Live)'
PACKAGE_TARNAME='upmendex--tex-live-'
-PACKAGE_VERSION='1.06'
-PACKAGE_STRING='upmendex (TeX Live) 1.06'
+PACKAGE_VERSION='1.07'
+PACKAGE_STRING='upmendex (TeX Live) 1.07'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1390,7 +1390,7 @@ if test "$ac_init_help" = "long"; then
# 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.06 to adapt to many kinds of systems.
+\`configure' configures upmendex (TeX Live) 1.07 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1462,7 +1462,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of upmendex (TeX Live) 1.06:";;
+ short | recursive ) echo "Configuration of upmendex (TeX Live) 1.07:";;
esac
cat <<\_ACEOF
@@ -1587,7 +1587,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-upmendex (TeX Live) configure 1.06
+upmendex (TeX Live) configure 1.07
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2268,7 +2268,7 @@ cat >config.log <<_ACEOF
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.06, which was
+It was created by upmendex (TeX Live) $as_me 1.07, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
@@ -8806,7 +8806,7 @@ fi
# Define the identity of the package.
PACKAGE='upmendex--tex-live-'
- VERSION='1.06'
+ VERSION='1.07'
# Some tools Automake needs.
@@ -18942,7 +18942,7 @@ Usage: $0 [OPTIONS]
Report bugs to <bug-libtool@gnu.org>."
lt_cl_version="\
-upmendex (TeX Live) config.lt 1.06
+upmendex (TeX Live) config.lt 1.07
configured by $0, generated by GNU Autoconf 2.71.
Copyright (C) 2011 Free Software Foundation, Inc.
@@ -21114,7 +21114,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# 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.06, which was
+This file was extended by upmendex (TeX Live) $as_me 1.07, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -21182,7 +21182,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-upmendex (TeX Live) config.status 1.06
+upmendex (TeX Live) config.status 1.07
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
diff --git a/Build/source/texk/upmendex/configure.ac b/Build/source/texk/upmendex/configure.ac
index 33d5236a8a8..9b5c1511b65 100644
--- a/Build/source/texk/upmendex/configure.ac
+++ b/Build/source/texk/upmendex/configure.ac
@@ -8,7 +8,7 @@ dnl This file is free software; the copyright holder
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.06])
+AC_INIT([upmendex (TeX Live)],[1.07])
AC_PREREQ([2.71])
AC_CONFIG_SRCDIR([main.c])
AC_CONFIG_AUX_DIR([../../build-aux])
diff --git a/Build/source/texk/upmendex/exhanzi.h b/Build/source/texk/upmendex/exhanzi.h
index 3f8f6ded84b..c61ee2bfff3 100644
--- a/Build/source/texk/upmendex/exhanzi.h
+++ b/Build/source/texk/upmendex/exhanzi.h
@@ -8,6 +8,7 @@
extern struct hanzi_index hz_index[];
extern int hz_index_len;
+extern int hanzi_mode;
extern struct hanzi_index HZ_RADICAL[];
extern struct hanzi_index HZ_STROKE[];
diff --git a/Build/source/texk/upmendex/fwrite.c b/Build/source/texk/upmendex/fwrite.c
index a27d269fb67..f33230df8e6 100644
--- a/Build/source/texk/upmendex/fwrite.c
+++ b/Build/source/texk/upmendex/fwrite.c
@@ -784,13 +784,13 @@ static void crcheck(char *lbuff, FILE *fp)
static void index_normalize(UChar *istr, UChar *ini, int *chset)
{
- int k, len, hi, lo, mi;
+ int k, hi, lo, mi;
UChar ch,src[2],dest[8],strX[4],strY[4],strZ[4];
UChar32 c32;
UErrorCode perr;
UCollationResult order;
UCollationStrength strgth;
- static int hanzi_mode=0, i_y_mode=0;
+ static int i_y_mode=0;
ch=istr[0];
*chset=charset(istr);
@@ -907,20 +907,17 @@ static void index_normalize(UChar *istr, UChar *ini, int *chset)
ini[0]=ch;
return;
}
- else if ((len=is_hanzi(istr))>0) {
+ else if (is_hanzi(istr)) {
if (hanzi_mode==0) hanzi_mode=init_hanzi_header();
if (hanzi_mode==HANZI_UNKNOWN) {
u_strcpy(ini, hz_index[0].idx);
return;
}
- strX[0] =istr[0];
- if (len==2){ strX[1] =istr[1]; }
- strX[len]=L'\0';
lo=0; hi=hz_index_len;
while (lo<hi) {
mi = (lo+hi)/2;
u_strcpy(strZ,hz_index[mi].threshold);
- order = ucol_strcoll(icu_collator, strZ, -1, strX, -1);
+ order = ucol_strcoll(icu_collator, strZ, -1, istr, -1);
if (order!=UCOL_GREATER) lo=mi+1;
else hi=mi;
}
diff --git a/Build/source/texk/upmendex/hanzi.h b/Build/source/texk/upmendex/hanzi.h
index e16cb793138..3d416713c61 100644
--- a/Build/source/texk/upmendex/hanzi.h
+++ b/Build/source/texk/upmendex/hanzi.h
@@ -2,6 +2,7 @@
struct hanzi_index hz_index[HZIDXSIZE];
int hz_index_len;
+int hanzi_mode=0;
/*
U+FDD0 (Noncharacter) is used.
diff --git a/Build/source/texk/upmendex/sort.c b/Build/source/texk/upmendex/sort.c
index 0dd9e9e37cc..6ba8818156a 100644
--- a/Build/source/texk/upmendex/sort.c
+++ b/Build/source/texk/upmendex/sort.c
@@ -3,6 +3,7 @@
#include "exkana.h"
#include "exvar.h"
+#include "exhanzi.h"
#define RULEBUFSIZE 29210+STYBUFSIZE
/*
@@ -550,6 +551,12 @@ int is_hanzi(UChar *c)
/* CJK Compatibility Ideographs Supplement */
(c32<=0x323AF)) return 2; /* CJK Unified Ideographs Extension G,H */
}
+ if (*c==0xFDD0) { /* Noncharacter */
+ if (hanzi_mode==HANZI_PINYIN &&
+ *(c+1)>=L'A' && *(c+1)<=L'Z' ) return -1; /* Pinyin Index */
+ if (hanzi_mode==HANZI_ZHUYIN &&
+ *(c+1)>=0x3105 && *(c+1)<=0x3129) return -1; /* Zhuyin Index */
+ }
return 0;
}