X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Funicase%2Fcased.c;h=13b88e454edf72dcac00b020b5fe0b2d343090a8;hb=c7a120f0df82737c24832f6a0c6cc7e1bfd4e671;hp=1dc19c50014c98a4d6d149eb6f1555591f82d744;hpb=1111a3b8dc022eee7fc87b371c00ac9da498e38e;p=gnulib.git diff --git a/lib/unicase/cased.c b/lib/unicase/cased.c index 1dc19c500..13b88e454 100644 --- a/lib/unicase/cased.c +++ b/lib/unicase/cased.c @@ -1,5 +1,5 @@ /* Test whether a Unicode character is cased. - Copyright (C) 2009 Free Software Foundation, Inc. + Copyright (C) 2002, 2006-2007, 2009 Free Software Foundation, Inc. Written by Bruno Haible , 2009. This program is free software: you can redistribute it and/or modify it @@ -20,16 +20,34 @@ /* Specification. */ #include "caseprop.h" +/* Quoting the Unicode standard: + Definition: A character is defined to be "cased" if it has the Lowercase + or Uppercase property or has a General_Category value of + Titlecase_Letter. */ + +#if 0 + #include "unictype.h" bool uc_is_cased (ucs4_t uc) { - /* Quoting the Unicode standard: - Definition: A character is defined to be "cased" if it has the Lowercase - or Uppercase property or has a General_Category value of - Titlecase_Letter. */ return (uc_is_property_lowercase (uc) - || uc_is_property_uppercase (uc) - || uc_is_general_category (uc, UC_TITLECASE_LETTER)); + || uc_is_property_uppercase (uc) + || uc_is_general_category (uc, UC_TITLECASE_LETTER)); } + +#else + +#include "unictype/bitmap.h" + +/* Define u_casing_property_cased table. */ +#include "cased.h" + +bool +uc_is_cased (ucs4_t uc) +{ + return bitmap_lookup (&u_casing_property_cased, uc); +} + +#endif