[gnome-characters] libgc: Make search match against hex codepoint
- From: Daiki Ueno <dueno src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-characters] libgc: Make search match against hex codepoint
- Date: Fri, 6 Mar 2015 03:25:28 +0000 (UTC)
commit 9c67aec63f4dabb5fab98677c7c76ab0021a8114
Author: Daiki Ueno <dueno src gnome org>
Date: Fri Mar 6 12:23:57 2015 +0900
libgc: Make search match against hex codepoint
lib/gc.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/lib/gc.c b/lib/gc.c
index cb49f4c..46498c3 100644
--- a/lib/gc.c
+++ b/lib/gc.c
@@ -378,6 +378,17 @@ filter_keywords (GcCharacterIter *iter, ucs4_t uc)
return TRUE;
}
+ /* Match against the hexadecimal code point. */
+ if (*keywords && *(keywords + 1) == NULL)
+ {
+ size_t length = strlen (*keywords);
+
+ if (length <= 6
+ && strspn (*keywords, "0123456789abcdefABCDEF") == length
+ && strtoul (*keywords, NULL, 16) == uc)
+ return TRUE;
+ }
+
/* Match against the name. */
if (!unicode_character_name (uc, buffer))
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]