From 00893e79fc62966067af1a106567db96bd170338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 3 Mar 2024 19:11:32 +0100 Subject: New upstream version 1.2 --- lib/unigbrk/gbrkprop.h | 4 ++-- lib/unigbrk/u-grapheme-breaks.h | 33 ++++++++++++++++++++++++++++++++- lib/unigbrk/u16-grapheme-breaks.c | 2 +- lib/unigbrk/u16-grapheme-next.c | 2 +- lib/unigbrk/u16-grapheme-prev.c | 2 +- lib/unigbrk/u32-grapheme-breaks.c | 2 +- lib/unigbrk/u32-grapheme-next.c | 2 +- lib/unigbrk/u32-grapheme-prev.c | 2 +- lib/unigbrk/u8-grapheme-breaks.c | 2 +- lib/unigbrk/u8-grapheme-next.c | 2 +- lib/unigbrk/u8-grapheme-prev.c | 2 +- lib/unigbrk/uc-gbrk-prop.c | 2 +- lib/unigbrk/uc-grapheme-breaks.c | 2 +- lib/unigbrk/uc-is-grapheme-break.c | 2 +- lib/unigbrk/ulc-grapheme-breaks.c | 2 +- 15 files changed, 47 insertions(+), 16 deletions(-) (limited to 'lib/unigbrk') diff --git a/lib/unigbrk/gbrkprop.h b/lib/unigbrk/gbrkprop.h index b91ce07a..1cc9c497 100644 --- a/lib/unigbrk/gbrkprop.h +++ b/lib/unigbrk/gbrkprop.h @@ -1,8 +1,8 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Grapheme break property of Unicode characters. */ -/* Generated automatically by gen-uni-tables.c for Unicode 15.0.0. */ +/* Generated automatically by gen-uni-tables.c for Unicode 15.1.0. */ -/* Copyright (C) 2000-2022 Free Software Foundation, Inc. +/* Copyright (C) 2000-2024 Free Software Foundation, Inc. This file is free software. It is dual-licensed under "the GNU LGPLv3+ or the GNU GPLv2+". diff --git a/lib/unigbrk/u-grapheme-breaks.h b/lib/unigbrk/u-grapheme-breaks.h index 9adce155..3e8f4953 100644 --- a/lib/unigbrk/u-grapheme-breaks.h +++ b/lib/unigbrk/u-grapheme-breaks.h @@ -1,5 +1,5 @@ /* Grapheme cluster break function. - Copyright (C) 2010-2022 Free Software Foundation, Inc. + Copyright (C) 2010-2024 Free Software Foundation, Inc. Written by Ben Pfaff , 2010. This file is free software. @@ -37,6 +37,16 @@ FUNC (const UNIT *s, size_t n, char *p) -1 at the very beginning of the string. */ int last_char_prop = -1; + /* True if the last character ends a sequence of Indic_Conjunct_Break + values: consonant {extend|linker}* */ + bool incb_consonant_extended = false; + /* True if the last character ends a sequence of Indic_Conjunct_Break + values: consonant {extend|linker}* linker */ + bool incb_consonant_extended_linker = false; + /* True if the last character ends a sequence of Indic_Conjunct_Break + values: consonant {extend|linker}* linker {extend|linker}* */ + bool incb_consonant_extended_linker_extended = false; + /* True if the last character ends an emoji modifier sequence \p{Extended_Pictographic} Extend*. */ bool emoji_modifier_sequence = false; @@ -56,6 +66,7 @@ FUNC (const UNIT *s, size_t n, char *p) ucs4_t uc; int count = U_MBTOUC (&uc, s, s_end - s); int prop = uc_graphemeclusterbreak_property (uc); + int incb = uc_indic_conjunct_break (uc); /* Break at the start of the string (GB1). */ if (last_char_prop < 0) @@ -96,6 +107,15 @@ FUNC (const UNIT *s, size_t n, char *p) /* No break after Prepend characters (GB9b). */ else if (last_char_prop == GBP_PREPEND) /* *p = 0 */; + /* No break within certain combinations of Indic_Conjunct_Break + values: Between + consonant {extend|linker}* linker {extend|linker}* + and + consonant + (GB9c). */ + else if (incb_consonant_extended_linker_extended + && incb == UC_INDIC_CONJUNCT_BREAK_CONSONANT) + /* *p = 0 */; /* No break within emoji modifier sequences or emoji zwj sequences (GB11). */ else if (last_char_prop == GBP_ZWJ @@ -111,6 +131,17 @@ FUNC (const UNIT *s, size_t n, char *p) *p = 1; } + incb_consonant_extended_linker = + incb_consonant_extended && incb == UC_INDIC_CONJUNCT_BREAK_LINKER; + incb_consonant_extended_linker_extended = + (incb_consonant_extended_linker + || (incb_consonant_extended_linker_extended + && incb >= UC_INDIC_CONJUNCT_BREAK_LINKER)); + incb_consonant_extended = + (incb == UC_INDIC_CONJUNCT_BREAK_CONSONANT + || (incb_consonant_extended + && incb >= UC_INDIC_CONJUNCT_BREAK_LINKER)); + emoji_modifier_sequence_before_last_char = emoji_modifier_sequence; emoji_modifier_sequence = (emoji_modifier_sequence && prop == GBP_EXTEND) diff --git a/lib/unigbrk/u16-grapheme-breaks.c b/lib/unigbrk/u16-grapheme-breaks.c index 43939747..0ae5b4aa 100644 --- a/lib/unigbrk/u16-grapheme-breaks.c +++ b/lib/unigbrk/u16-grapheme-breaks.c @@ -1,5 +1,5 @@ /* Grapheme cluster breaks function. - Copyright (C) 2010-2022 Free Software Foundation, Inc. + Copyright (C) 2010-2024 Free Software Foundation, Inc. Written by Ben Pfaff , 2010. This file is free software. diff --git a/lib/unigbrk/u16-grapheme-next.c b/lib/unigbrk/u16-grapheme-next.c index 79ba2ee1..1df56740 100644 --- a/lib/unigbrk/u16-grapheme-next.c +++ b/lib/unigbrk/u16-grapheme-next.c @@ -1,5 +1,5 @@ /* Next grapheme cluster function. - Copyright (C) 2010-2022 Free Software Foundation, Inc. + Copyright (C) 2010-2024 Free Software Foundation, Inc. Written by Ben Pfaff , 2010. This file is free software. diff --git a/lib/unigbrk/u16-grapheme-prev.c b/lib/unigbrk/u16-grapheme-prev.c index 6bff9566..804d7bc1 100644 --- a/lib/unigbrk/u16-grapheme-prev.c +++ b/lib/unigbrk/u16-grapheme-prev.c @@ -1,5 +1,5 @@ /* Previous grapheme cluster function. - Copyright (C) 2010-2022 Free Software Foundation, Inc. + Copyright (C) 2010-2024 Free Software Foundation, Inc. Written by Ben Pfaff , 2010. This file is free software. diff --git a/lib/unigbrk/u32-grapheme-breaks.c b/lib/unigbrk/u32-grapheme-breaks.c index 92795584..c4872c27 100644 --- a/lib/unigbrk/u32-grapheme-breaks.c +++ b/lib/unigbrk/u32-grapheme-breaks.c @@ -1,5 +1,5 @@ /* Grapheme cluster breaks function. - Copyright (C) 2010-2022 Free Software Foundation, Inc. + Copyright (C) 2010-2024 Free Software Foundation, Inc. Written by Ben Pfaff , 2010. This file is free software. diff --git a/lib/unigbrk/u32-grapheme-next.c b/lib/unigbrk/u32-grapheme-next.c index 419e3d5b..198857d9 100644 --- a/lib/unigbrk/u32-grapheme-next.c +++ b/lib/unigbrk/u32-grapheme-next.c @@ -1,5 +1,5 @@ /* Next grapheme cluster function. - Copyright (C) 2010-2022 Free Software Foundation, Inc. + Copyright (C) 2010-2024 Free Software Foundation, Inc. Written by Ben Pfaff , 2010. This file is free software. diff --git a/lib/unigbrk/u32-grapheme-prev.c b/lib/unigbrk/u32-grapheme-prev.c index f01c6c11..a6b6983a 100644 --- a/lib/unigbrk/u32-grapheme-prev.c +++ b/lib/unigbrk/u32-grapheme-prev.c @@ -1,5 +1,5 @@ /* Previous grapheme cluster function. - Copyright (C) 2010-2022 Free Software Foundation, Inc. + Copyright (C) 2010-2024 Free Software Foundation, Inc. Written by Ben Pfaff , 2010. This file is free software. diff --git a/lib/unigbrk/u8-grapheme-breaks.c b/lib/unigbrk/u8-grapheme-breaks.c index b21ba262..887c1864 100644 --- a/lib/unigbrk/u8-grapheme-breaks.c +++ b/lib/unigbrk/u8-grapheme-breaks.c @@ -1,5 +1,5 @@ /* Grapheme cluster breaks function. - Copyright (C) 2001-2003, 2006-2022 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2006-2024 Free Software Foundation, Inc. Written by Ben Pfaff , 2010, based on code written by Bruno Haible , 2009. diff --git a/lib/unigbrk/u8-grapheme-next.c b/lib/unigbrk/u8-grapheme-next.c index 44df62ee..431c5ee7 100644 --- a/lib/unigbrk/u8-grapheme-next.c +++ b/lib/unigbrk/u8-grapheme-next.c @@ -1,5 +1,5 @@ /* Next grapheme cluster function. - Copyright (C) 2010-2022 Free Software Foundation, Inc. + Copyright (C) 2010-2024 Free Software Foundation, Inc. Written by Ben Pfaff , 2010. This file is free software. diff --git a/lib/unigbrk/u8-grapheme-prev.c b/lib/unigbrk/u8-grapheme-prev.c index f61d01f9..8a63f55f 100644 --- a/lib/unigbrk/u8-grapheme-prev.c +++ b/lib/unigbrk/u8-grapheme-prev.c @@ -1,5 +1,5 @@ /* Previous grapheme cluster function. - Copyright (C) 2010-2022 Free Software Foundation, Inc. + Copyright (C) 2010-2024 Free Software Foundation, Inc. Written by Ben Pfaff , 2010. This file is free software. diff --git a/lib/unigbrk/uc-gbrk-prop.c b/lib/unigbrk/uc-gbrk-prop.c index fb618fa1..953fe006 100644 --- a/lib/unigbrk/uc-gbrk-prop.c +++ b/lib/unigbrk/uc-gbrk-prop.c @@ -1,5 +1,5 @@ /* Grapheme cluster break property function. - Copyright (C) 2010-2022 Free Software Foundation, Inc. + Copyright (C) 2010-2024 Free Software Foundation, Inc. Written by Ben Pfaff , 2010. This file is free software. diff --git a/lib/unigbrk/uc-grapheme-breaks.c b/lib/unigbrk/uc-grapheme-breaks.c index 73130a59..fbebdac2 100644 --- a/lib/unigbrk/uc-grapheme-breaks.c +++ b/lib/unigbrk/uc-grapheme-breaks.c @@ -1,5 +1,5 @@ /* Grapheme cluster breaks function. - Copyright (C) 2010-2022 Free Software Foundation, Inc. + Copyright (C) 2010-2024 Free Software Foundation, Inc. Written by Ben Pfaff , 2010. This file is free software. diff --git a/lib/unigbrk/uc-is-grapheme-break.c b/lib/unigbrk/uc-is-grapheme-break.c index 2cf82f16..acf4bf3e 100644 --- a/lib/unigbrk/uc-is-grapheme-break.c +++ b/lib/unigbrk/uc-is-grapheme-break.c @@ -1,5 +1,5 @@ /* Grapheme cluster break function. - Copyright (C) 2010-2022 Free Software Foundation, Inc. + Copyright (C) 2010-2024 Free Software Foundation, Inc. Written by Ben Pfaff , 2010. This file is free software. diff --git a/lib/unigbrk/ulc-grapheme-breaks.c b/lib/unigbrk/ulc-grapheme-breaks.c index 97e4c9e8..7b32ad8d 100644 --- a/lib/unigbrk/ulc-grapheme-breaks.c +++ b/lib/unigbrk/ulc-grapheme-breaks.c @@ -1,5 +1,5 @@ /* Grapheme cluster breaks function. - Copyright (C) 2001-2003, 2006-2022 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2006-2024 Free Software Foundation, Inc. Written by Ben Pfaff , 2010, based on code written by Bruno Haible , 2009. -- cgit v1.2.3