X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Funictype.h;h=a5e59e61eacfd881819a3a8896a263ad80c4f22e;hb=abe9c758009394a09d0cb84cdaae37e5752953f2;hp=ab5477c5741a6da7678e72ac9b14b7850c446614;hpb=41fa1f3dd121044739645fe8ba80f138514de692;p=gnulib.git diff --git a/lib/unictype.h b/lib/unictype.h index ab5477c57..a5e59e61e 100644 --- a/lib/unictype.h +++ b/lib/unictype.h @@ -1,5 +1,5 @@ /* Unicode character classification and properties. - Copyright (C) 2002, 2005-2008 Free Software Foundation, Inc. + Copyright (C) 2002, 2005-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published @@ -56,7 +56,8 @@ uc_general_category_t; /* Bits and bit masks denoting General category values. UnicodeData-3.2.0.html says a 32-bit integer will always suffice to represent them. - These bit masks are just informative; you cannot use them in any API. */ + These bit masks can only be used with the uc_is_general_category_withtable + function. */ enum { UC_CATEGORY_MASK_L = 0x0000001f, @@ -182,14 +183,14 @@ extern const uc_general_category_t _UC_CATEGORY_NONE; This corresponds to the unions of the two sets of characters. */ extern uc_general_category_t uc_general_category_or (uc_general_category_t category1, - uc_general_category_t category2); + uc_general_category_t category2); /* Return the intersection of two general categories as bit masks. This *does*not* correspond to the intersection of the two sets of characters. */ extern uc_general_category_t uc_general_category_and (uc_general_category_t category1, - uc_general_category_t category2); + uc_general_category_t category2); /* Return the intersection of a general category with the complement of a second general category, as bit masks. @@ -197,7 +198,7 @@ extern uc_general_category_t viewing the categories as sets of characters. */ extern uc_general_category_t uc_general_category_and_not (uc_general_category_t category1, - uc_general_category_t category2); + uc_general_category_t category2); /* Return the name of a general category. */ extern const char * @@ -212,7 +213,7 @@ extern uc_general_category_t uc_general_category (ucs4_t uc); /* Test whether a Unicode character belongs to a given category. - The CATEGORY argument can be the combination of several built-in + The CATEGORY argument can be the combination of several predefined general categories. */ extern bool uc_is_general_category (ucs4_t uc, uc_general_category_t category); @@ -301,7 +302,7 @@ extern bool /* ========================================================================= */ /* Field 5 of Unicode Character Database: Character decomposition mapping. - See "unicomp.h". */ + See "uninorm.h". */ /* ========================================================================= */ @@ -462,6 +463,9 @@ extern const uc_property_t UC_PROPERTY_IGNORABLE_CONTROL; extern uc_property_t uc_property_byname (const char *property_name); +/* Test whether a property is valid. */ +#define uc_property_is_valid(property) ((property).test_fn != NULL) + /* Test whether a Unicode character has a given property. */ extern bool uc_is_property (ucs4_t uc, uc_property_t property); @@ -547,7 +551,7 @@ extern bool uc_is_property_ignorable_control (ucs4_t uc); /* ========================================================================= */ -/* Subdivision of the the Unicode characters into scripts. */ +/* Subdivision of the Unicode characters into scripts. */ typedef struct { @@ -693,9 +697,8 @@ extern bool extern bool uc_is_upper (ucs4_t uc); -/* Test for any character that corresponds to a hexadecimal-digit character - equivalent to that performed by the functions described in the previous - subclause. */ +/* Test for any character that corresponds to a hexadecimal-digit + character. */ extern bool uc_is_xdigit (ucs4_t uc);