summaryrefslogtreecommitdiff
path: root/vendor/nunicode/include/libnu/ducet.h
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/nunicode/include/libnu/ducet.h')
-rw-r--r--vendor/nunicode/include/libnu/ducet.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/vendor/nunicode/include/libnu/ducet.h b/vendor/nunicode/include/libnu/ducet.h
new file mode 100644
index 0000000000..ecc65e84d8
--- /dev/null
+++ b/vendor/nunicode/include/libnu/ducet.h
@@ -0,0 +1,37 @@
+#ifndef NU_DUCET_H
+#define NU_DUCET_H
+
+#include <stdint.h>
+
+#include <libnu/config.h>
+#include <libnu/defines.h>
+
+#if defined (__cplusplus) || defined (c_plusplus)
+extern "C" {
+#endif
+
+#ifdef NU_WITH_DUCET
+
+/** Get DUCET value of codepoint
+ *
+ * Normally, for unlisted codepoints, this function will return number greater
+ * than max weight of listed codepoints, hence putting all unlisted codepoints
+ * (not letters and not numbers) to the end of the sorted list (in codepoint
+ * order).
+ *
+ * @ingroup udb
+ * @param codepoint codepoint
+ * @param weight previous weight for compound weight (not used here)
+ * @param context pointer passed to nu_strcoll()
+ * @return comparable weight of the codepoint
+ */
+NU_EXPORT
+int32_t nu_ducet_weight(uint32_t codepoint, int32_t *weight, void *context);
+
+#endif /* NU_WITH_DUCET */
+
+#if defined (__cplusplus) || defined (c_plusplus)
+}
+#endif
+
+#endif /* NU_DUCET_H */