summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2016-01-03 16:07:40 +0000
committerVincent Sanders <vince@kyllikki.org>2016-01-03 16:07:40 +0000
commit74fdde2b572d9cd8f6f3306c847c6c9334684b7d (patch)
tree5aecc71306898fd3bb40e4941cef68d106e7f57c
parentb54a1fe4cbc9ac1e0d695f2a339d70e752967849 (diff)
downloadnetsurf-74fdde2b572d9cd8f6f3306c847c6c9334684b7d.tar.gz
netsurf-74fdde2b572d9cd8f6f3306c847c6c9334684b7d.tar.bz2
remove necessity for header change in libutf8proc
The combining character class definition was put in the libutf8proc header instead of being local to the IDNA implementation.
-rw-r--r--utils/idna.c4
-rw-r--r--utils/idna.h5
2 files changed, 7 insertions, 2 deletions
diff --git a/utils/idna.c b/utils/idna.c
index d8d4ae497..2d1bb4ccb 100644
--- a/utils/idna.c
+++ b/utils/idna.c
@@ -168,7 +168,7 @@ static bool idna__contextj_rule(int32_t *label, int index, size_t len)
return false; /* No previous character */
}
unicode_props = utf8proc_get_property(label[index - 1]);
- if (unicode_props->combining_class == UTF8PROC_CCC_VIRAMA) {
+ if (unicode_props->combining_class == IDNA_UNICODE_CCC_VIRAMA) {
return true;
}
@@ -207,7 +207,7 @@ static bool idna__contextj_rule(int32_t *label, int index, size_t len)
return false; /* No previous character */
}
unicode_props = utf8proc_get_property(label[index - 1]);
- if (unicode_props->combining_class == UTF8PROC_CCC_VIRAMA) {
+ if (unicode_props->combining_class == IDNA_UNICODE_CCC_VIRAMA) {
return true;
}
return false;
diff --git a/utils/idna.h b/utils/idna.h
index c59a22763..1fb344730 100644
--- a/utils/idna.h
+++ b/utils/idna.h
@@ -24,6 +24,11 @@
#define _NETSURF_UTILS_IDNA_H_
/**
+ * Unicode canonical combining class for virama
+ */
+#define IDNA_UNICODE_CCC_VIRAMA 9
+
+/**
* Convert a hostname to an ACE version suitable for DNS lookup
*
* \param host String containing host