texlive[65057] Build/source/texk: upmendex: ver1.07, Improve

commits+takuji at tug.org commits+takuji at tug.org
Sun Nov 20 09:09:39 CET 2022


Revision: 65057
          http://tug.org/svn/texlive?view=revision&revision=65057
Author:   takuji
Date:     2022-11-20 09:09:38 +0100 (Sun, 20 Nov 2022)
Log Message:
-----------
upmendex: ver1.07, Improve detection of hanzi header

Modified Paths:
--------------
    trunk/Build/source/texk/README
    trunk/Build/source/texk/upmendex/ChangeLog
    trunk/Build/source/texk/upmendex/configure
    trunk/Build/source/texk/upmendex/configure.ac
    trunk/Build/source/texk/upmendex/exhanzi.h
    trunk/Build/source/texk/upmendex/fwrite.c
    trunk/Build/source/texk/upmendex/hanzi.h
    trunk/Build/source/texk/upmendex/sort.c

Modified: trunk/Build/source/texk/README
===================================================================
--- trunk/Build/source/texk/README	2022-11-20 00:49:52 UTC (rev 65056)
+++ trunk/Build/source/texk/README	2022-11-20 08:09:38 UTC (rev 65057)
@@ -108,7 +108,7 @@
 
 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
 

Modified: trunk/Build/source/texk/upmendex/ChangeLog
===================================================================
--- trunk/Build/source/texk/upmendex/ChangeLog	2022-11-20 00:49:52 UTC (rev 65056)
+++ trunk/Build/source/texk/upmendex/ChangeLog	2022-11-20 08:09:38 UTC (rev 65057)
@@ -1,3 +1,10 @@
+2022-11-20  TANAKA Takuji  <ttk at 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 at t-lab.opal.ne.jp>
 
 	* version 1.06  Stable version.

Modified: trunk/Build/source/texk/upmendex/configure
===================================================================
--- trunk/Build/source/texk/upmendex/configure	2022-11-20 00:49:52 UTC (rev 65056)
+++ trunk/Build/source/texk/upmendex/configure	2022-11-20 08:09:38 UTC (rev 65057)
@@ -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 @@
 # 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 @@
   # 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 @@
 
 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 @@
 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 @@
 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 @@
 
 # Define the identity of the package.
  PACKAGE='upmendex--tex-live-'
- VERSION='1.06'
+ VERSION='1.07'
 
 
 # Some tools Automake needs.
@@ -18942,7 +18942,7 @@
 Report bugs to <bug-libtool at 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 @@
 # 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 @@
 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\\"
 

Modified: trunk/Build/source/texk/upmendex/configure.ac
===================================================================
--- trunk/Build/source/texk/upmendex/configure.ac	2022-11-20 00:49:52 UTC (rev 65056)
+++ trunk/Build/source/texk/upmendex/configure.ac	2022-11-20 08:09:38 UTC (rev 65057)
@@ -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.06])
+AC_INIT([upmendex (TeX Live)],[1.07])
 AC_PREREQ([2.71])
 AC_CONFIG_SRCDIR([main.c])
 AC_CONFIG_AUX_DIR([../../build-aux])

Modified: trunk/Build/source/texk/upmendex/exhanzi.h
===================================================================
--- trunk/Build/source/texk/upmendex/exhanzi.h	2022-11-20 00:49:52 UTC (rev 65056)
+++ trunk/Build/source/texk/upmendex/exhanzi.h	2022-11-20 08:09:38 UTC (rev 65057)
@@ -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[];

Modified: trunk/Build/source/texk/upmendex/fwrite.c
===================================================================
--- trunk/Build/source/texk/upmendex/fwrite.c	2022-11-20 00:49:52 UTC (rev 65056)
+++ trunk/Build/source/texk/upmendex/fwrite.c	2022-11-20 08:09:38 UTC (rev 65057)
@@ -784,13 +784,13 @@
 
 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 @@
 		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;
 		}

Modified: trunk/Build/source/texk/upmendex/hanzi.h
===================================================================
--- trunk/Build/source/texk/upmendex/hanzi.h	2022-11-20 00:49:52 UTC (rev 65056)
+++ trunk/Build/source/texk/upmendex/hanzi.h	2022-11-20 08:09:38 UTC (rev 65057)
@@ -2,6 +2,7 @@
 
 struct hanzi_index hz_index[HZIDXSIZE];
 int hz_index_len;
+int hanzi_mode=0;
 
 /*
    U+FDD0 (Noncharacter) is used.

Modified: trunk/Build/source/texk/upmendex/sort.c
===================================================================
--- trunk/Build/source/texk/upmendex/sort.c	2022-11-20 00:49:52 UTC (rev 65056)
+++ trunk/Build/source/texk/upmendex/sort.c	2022-11-20 08:09:38 UTC (rev 65057)
@@ -3,6 +3,7 @@
 
 #include "exkana.h"
 #include "exvar.h"
+#include "exhanzi.h"
 
 #define RULEBUFSIZE  29210+STYBUFSIZE
 /*
@@ -550,6 +551,12 @@
 		                              /* 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;
 }
 



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