From 2fecc28015258d269433f08f9a34e3e9d10156cd Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 26 Mar 2011 11:20:29 +0100 Subject: Support names and long names of canonical combining classes. --- ChangeLog | 7 +++++++ NEWS | 5 +++++ doc/unictype.texi | 26 ++++++++++++++++++++++++++ 3 files changed, 38 insertions(+) diff --git a/ChangeLog b/ChangeLog index 56796eb..5c71eeb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-03-26 Bruno Haible + + Support names and long names of canonical combining classes. + * doc/unictype.texi (Canonical combining class): Mention UC_CCC_ATA. + Document the functions uc_combining_class_name, + uc_combining_class_long_name, uc_combining_class_byname. + 2011-03-25 Bruno Haible Support long names of general category values. diff --git a/NEWS b/NEWS index 68ed9f3..cfe771c 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,11 @@ New in 0.9.4: version 6.0.0. * In the include file unictype.h, constants are defined for the group of general categories LC ("Cased Letter"). +* In the include file unictype.h, functions for associating canonical + combining classes with names have been added: + uc_combining_class_name + uc_combining_class_long_name + uc_combining_class_byname * In the include file unictype.h, functions for the Arabic joining type and the Arabic joining group have been added: uc_joining_type_name diff --git a/doc/unictype.texi b/doc/unictype.texi index 83f9915..90b372f 100644 --- a/doc/unictype.texi +++ b/doc/unictype.texi @@ -425,6 +425,10 @@ The canonical combining class value for ``Attached Below Left'' characters. The canonical combining class value for ``Attached Below'' characters. @end deftypevr +@deftypevr Constant int UC_CCC_ATA +The canonical combining class value for ``Attached Above'' characters. +@end deftypevr + @deftypevr Constant int UC_CCC_ATAR The canonical combining class value for ``Attached Above Right'' characters. @end deftypevr @@ -473,6 +477,28 @@ The canonical combining class value for ``Double Above'' characters. The canonical combining class value for ``Iota Subscript'' characters. @end deftypevr +The following functions associate canonical combining classes with their name. + +@deftypefun {const char *} uc_combining_class_name (int @var{ccc}) +Returns the name of a canonical combining class, more precisely, the +abbreviated name. +Returns NULL if the canonical combining class is a numeric value without a +name. +@end deftypefun + +@deftypefun {const char *} uc_combining_class_long_name (int @var{ccc}) +Returns the long name of a canonical combining class. +Returns NULL if the canonical combining class is a numeric value without a +name. +@end deftypefun + +@deftypefun int uc_combining_class_byname (const char *@var{ccc_name}) +Returns the canonical combining class given by name, e.g@. @code{"BL"}, or by +long name, e.g@. @code{"Below Left"}. +This lookup ignores spaces, underscores, or hyphens as word separators and is +case-insignificant. +@end deftypefun + The following function looks up the canonical combining class of a character. @deftypefun int uc_combining_class (ucs4_t @var{uc}) -- cgit v1.2.1