Skip to content

Commit

Permalink
bibtex-x: enable to build with icu.dll for Windows 10
Browse files Browse the repository at this point in the history
git-svn-id: svn://tug.org/texlive/trunk/Build/source@67578 c570f23f-e606-0410-a88d-b1316a301751
  • Loading branch information
t-tk committed Jul 8, 2023
1 parent a15537e commit 1c07a53
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 1 deletion.
9 changes: 9 additions & 0 deletions texk/bibtex-x/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2023-07-08 TANAKA Takuji <ttk@t-lab.opal.ne.jp>

* utils.c, gblprocs.h:
Enable to build with system ICU DLL icu.dll
for Windows 10 version 1903 (May 2019 Update) or later.
https://learn.microsoft.com/en-us/windows/win32/intl/international-components-for-unicode--icu-
* bibtex-{1,4}.c:
Enable to build with older ICU.

2023-04-12 Karl Berry <karl@freefriends.org>

* tests/bibtex8.test,
Expand Down
2 changes: 2 additions & 0 deletions texk/bibtex-x/bibtex-1.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,10 @@ BEGIN
case UBLOCK_LATIN_EXTENDED_C:
case UBLOCK_LATIN_EXTENDED_D:
case UBLOCK_LATIN_EXTENDED_E:
#if defined(UBLOCK_LATIN_EXTENDED_G)
case UBLOCK_LATIN_EXTENDED_F:
case UBLOCK_LATIN_EXTENDED_G:
#endif
case UBLOCK_LATIN_EXTENDED_ADDITIONAL:
case UBLOCK_GREEK:
case UBLOCK_GREEK_EXTENDED:
Expand Down
6 changes: 6 additions & 0 deletions texk/bibtex-x/bibtex-4.c
Original file line number Diff line number Diff line change
Expand Up @@ -2818,16 +2818,22 @@ BEGIN
case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D:
case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E:
case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_F:
#if defined(UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_G)
case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_G:
#endif
string_width |= 0x001;
break;
/* kana */
case UBLOCK_HIRAGANA:
case UBLOCK_KATAKANA:
case UBLOCK_KATAKANA_PHONETIC_EXTENSIONS:
case UBLOCK_KANA_EXTENDED_A:
#if defined(UBLOCK_KANA_EXTENDED_B)
case UBLOCK_KANA_EXTENDED_B:
#endif
#if defined(UBLOCK_SMALL_KANA_EXTENSION)
case UBLOCK_SMALL_KANA_EXTENSION:
#endif
string_width |= 0x002;
break;
/* hangul */
Expand Down
4 changes: 4 additions & 0 deletions texk/bibtex-x/gblprocs.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,14 @@


#ifdef UTF_8
#if defined(WIN32) && defined(WITH_SYSTEM_ICU)
#include "icu.h"
#else
#include "unicode/uchar.h"
#include "unicode/ustdio.h"
#include "unicode/ustring.h"
#include "unicode/ucol.h"
#endif
int32_t icu_toUChars (BufType_T buf,
BufPointer_T bf_ptr,
BufPointer_T len,
Expand Down
4 changes: 3 additions & 1 deletion texk/bibtex-x/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@

#include <stdarg.h>
#ifdef WIN32
#if !defined(_MSC_VER)
#include <getopt.h>
#endif
#else
#include <unistd.h>
#endif
Expand All @@ -133,7 +135,7 @@
#include <kpathsea/paths.h>
#include <kpathsea/variable.h>
#include <kpathsea/lib.h>
#ifndef WIN32
#if !defined(WIN32) || defined(_MSC_VER)
#include <kpathsea/getopt.h>
#endif
#endif
Expand Down

0 comments on commit 1c07a53

Please sign in to comment.