diff options
author | Chris Loer <chris.loer@gmail.com> | 2018-06-27 15:01:54 -0700 |
---|---|---|
committer | Chris Loer <chris.loer@mapbox.com> | 2018-07-03 10:03:05 -0700 |
commit | 251f5e605f1f1bb3e56115f8cef66cacabfd9d83 (patch) | |
tree | 55c81152898be05016ed8a55e975e0998719191d /vendor/nunicode/src/libnu/toupper.c | |
parent | 71a72d269a3f0de6f3cdb7780d2bf44f6a4e2c21 (diff) | |
download | qtlocation-mapboxgl-251f5e605f1f1bb3e56115f8cef66cacabfd9d83.tar.gz |
[core, vendor] Create vendored nunicode 1.8.
- Version bump to 1.8 necessary for "unaccent" functionality
- Qt now depends on nunicode, ruling out use of precompiled binaries
Diffstat (limited to 'vendor/nunicode/src/libnu/toupper.c')
-rw-r--r-- | vendor/nunicode/src/libnu/toupper.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/vendor/nunicode/src/libnu/toupper.c b/vendor/nunicode/src/libnu/toupper.c new file mode 100644 index 0000000000..fad3941e6d --- /dev/null +++ b/vendor/nunicode/src/libnu/toupper.c @@ -0,0 +1,32 @@ +#include <libnu/casemap.h> + +#ifdef NU_WITH_TOUPPER + +#include <libnu/casemap_internal.h> +#include "gen/_toupper.c" + +const char* nu_toupper(uint32_t codepoint) { + return _nu_to_something(codepoint, NU_TOUPPER_G, NU_TOUPPER_G_SIZE, + NU_TOUPPER_VALUES_C, NU_TOUPPER_VALUES_I, NU_TOUPPER_COMBINED); +} + +const char* _nu_toupper(const char *encoded, const char *limit, nu_read_iterator_t read, + uint32_t *u, const char **transform, + void *context) { + + (void)(limit); + (void)(context); + + uint32_t _u = 0; + const char *np = read(encoded, &_u); + + *transform = nu_toupper(_u); + + if (u != 0) { + *u = _u; + } + + return np; +} + +#endif /* NU_WITH_TOUPPER */ |