From: Bruno Haible Date: Sat, 14 Sep 2024 19:13:20 +0000 (+0200) Subject: unilbrk: Fix handling of unassigned code points (regression yesterday). X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=3df05b38654be1bc8cf003ccbcb5dea24b5803c5;p=gnulib.git unilbrk: Fix handling of unassigned code points (regression yesterday). * lib/unilbrk/lbrktables.h (unilbrkprop_lookup): Correct the default return value. --- diff --git a/ChangeLog b/ChangeLog index 2b35fe2905..66d54669f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-09-14 Bruno Haible + + unilbrk: Fix handling of unassigned code points (regression yesterday). + * lib/unilbrk/lbrktables.h (unilbrkprop_lookup): Correct the default + return value. + 2024-09-14 Bruno Haible unilbrk/tables: Fix table (regression yesterday). diff --git a/lib/unilbrk/lbrktables.h b/lib/unilbrk/lbrktables.h index e8d0719d1a..865bea1690 100644 --- a/lib/unilbrk/lbrktables.h +++ b/lib/unilbrk/lbrktables.h @@ -96,6 +96,13 @@ enum #include "lbrkprop1.h" +/* Combining prop and ea to a table entry. */ +#define PROP_EA(prop,ea) (((prop) << 1) | (ea)) + +/* Splitting a table entry into prop and ea. */ +#define PROP(entry) ((entry) >> 1) +#define EA(entry) ((entry) & 1) + /* Returns (prop << 1) | ea, where - prop is the line breaking property, - ea is the EastAsian property (1 bit) @@ -118,16 +125,9 @@ unilbrkprop_lookup (ucs4_t uc) } } } - return LBP_XX; + return PROP_EA (LBP_XX, 0); } -/* Splitting a table entry into prop and ea. */ -#define PROP(entry) ((entry) >> 1) -#define EA(entry) ((entry) & 1) - -/* Combining prop and ea to a table entry. */ -#define PROP_EA(prop,ea) (((prop) << 1) | (ea)) - /* Table indexed by two line breaking classifications. */ #define D 1 /* direct break opportunity, empty in table 7.3 of UTR #14 */