Fix evaluation of "Before C" condition of FINAL_SIGMA.
[gnulib.git] / lib / unicase / cased.c
index 1dc19c5..5fbf4cb 100644 (file)
@@ -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 <bruno@clisp.org>, 2009.
 
    This program is free software: you can redistribute it and/or modify it
 /* 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));
 }
+
+#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