projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix test crash.
[gnulib.git]
/
lib
/
unicase
/
cased.c
diff --git
a/lib/unicase/cased.c
b/lib/unicase/cased.c
index
1dc19c5
..
13b88e4
100644
(file)
--- a/
lib/unicase/cased.c
+++ b/
lib/unicase/cased.c
@@
-1,5
+1,5
@@
/* Test whether a Unicode character is cased.
/* Test whether a Unicode character is cased.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 200
2, 2006-2007, 200
9 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
Written by Bruno Haible <bruno@clisp.org>, 2009.
This program is free software: you can redistribute it and/or modify it
@@
-20,16
+20,34
@@
/* Specification. */
#include "caseprop.h"
/* 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)
{
#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)
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