From 8e640a5f32160fd786cc4722c8b46bbca7ba500a Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Wed, 10 Jun 2020 08:26:06 -0400 Subject: [Ada] AI12-0004 Normalization and allowed characters gcc/ada/ * scng.adb (Scan): Detect wide characters not in NFKC. * libgnat/a-chahan.adb, libgnat/a-chahan.ads, libgnat/a-wichha.adb, libgnat/a-wichha.ads, libgnat/a-wichun.adb, libgnat/a-wichun.ads, libgnat/a-zchhan.adb, libgnat/a-zchhan.ads, libgnat/a-zchuni.adb, libgnat/a-zchuni.ads (Is_NFKC): New. * libgnat/s-utf_32.ads, libgnat/s-utf_32.adb (Is_UTF_32_NFKC): New. --- gcc/ada/libgnat/a-wichun.ads | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gcc/ada/libgnat/a-wichun.ads') diff --git a/gcc/ada/libgnat/a-wichun.ads b/gcc/ada/libgnat/a-wichun.ads index c9eb938..9e42749 100644 --- a/gcc/ada/libgnat/a-wichun.ads +++ b/gcc/ada/libgnat/a-wichun.ads @@ -131,7 +131,7 @@ package Ada.Wide_Characters.Unicode is pragma Inline (Is_Other); -- Returns true iff U is an other format character, which means that it -- can be used to extend an identifier, but is ignored for the purposes of - -- matching of identiers, or if C is one of the corresponding categories, + -- matching of identifiers, or if C is one of the corresponding categories, -- which are the following: -- Other, Format (Cf) @@ -150,6 +150,12 @@ package Ada.Wide_Characters.Unicode is -- of the corresponding categories, which are the following: -- Separator, Space (Zs) + function Is_NFKC (U : Wide_Character) return Boolean; + pragma Inline (Is_NFKC); + -- Returns True if the Wide_Character designated by U could be present + -- in a string normalized to Normalization Form KC (as defined by Clause + -- 21 of ISO/IEC 10646:2017), otherwise returns False. + function Is_Non_Graphic (U : Wide_Character) return Boolean; function Is_Non_Graphic (C : Category) return Boolean; pragma Inline (Is_Non_Graphic); -- cgit v1.1