1 | #ifndef NU_DUCET_H |
2 | #define NU_DUCET_H |
3 | |
4 | #include <stdint.h> |
5 | |
6 | #include <libnu/config.h> |
7 | #include <libnu/defines.h> |
8 | |
9 | #if defined (__cplusplus) || defined (c_plusplus) |
10 | extern "C" { |
11 | #endif |
12 | |
13 | #ifdef NU_WITH_DUCET |
14 | |
15 | /** Get DUCET value of codepoint |
16 | * |
17 | * Normally, for unlisted codepoints, this function will return number greater |
18 | * than max weight of listed codepoints, hence putting all unlisted codepoints |
19 | * (not letters and not numbers) to the end of the sorted list (in codepoint |
20 | * order). |
21 | * |
22 | * @ingroup udb |
23 | * @param codepoint codepoint |
24 | * @param weight previous weight for compound weight (not used here) |
25 | * @param context pointer passed to nu_strcoll() |
26 | * @return comparable weight of the codepoint |
27 | */ |
28 | NU_EXPORT |
29 | int32_t nu_ducet_weight(uint32_t codepoint, int32_t *weight, void *context); |
30 | |
31 | #endif /* NU_WITH_DUCET */ |
32 | |
33 | #if defined (__cplusplus) || defined (c_plusplus) |
34 | } |
35 | #endif |
36 | |
37 | #endif /* NU_DUCET_H */ |
38 | |