Gabriel Krisman Bertazi | 9d53690 | 2019-04-25 13:51:22 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | #ifndef _LINUX_UNICODE_H |
| 3 | #define _LINUX_UNICODE_H |
| 4 | |
| 5 | #include <linux/init.h> |
| 6 | #include <linux/dcache.h> |
| 7 | |
| 8 | struct unicode_map { |
| 9 | const char *charset; |
| 10 | int version; |
| 11 | }; |
| 12 | |
| 13 | int utf8_validate(const struct unicode_map *um, const struct qstr *str); |
| 14 | |
| 15 | int utf8_strncmp(const struct unicode_map *um, |
| 16 | const struct qstr *s1, const struct qstr *s2); |
| 17 | |
| 18 | int utf8_strncasecmp(const struct unicode_map *um, |
| 19 | const struct qstr *s1, const struct qstr *s2); |
Gabriel Krisman Bertazi | 3ae7256 | 2019-06-19 23:45:09 -0400 | [diff] [blame] | 20 | int utf8_strncasecmp_folded(const struct unicode_map *um, |
| 21 | const struct qstr *cf, |
| 22 | const struct qstr *s1); |
Gabriel Krisman Bertazi | 9d53690 | 2019-04-25 13:51:22 -0400 | [diff] [blame] | 23 | |
| 24 | int utf8_normalize(const struct unicode_map *um, const struct qstr *str, |
| 25 | unsigned char *dest, size_t dlen); |
| 26 | |
| 27 | int utf8_casefold(const struct unicode_map *um, const struct qstr *str, |
| 28 | unsigned char *dest, size_t dlen); |
| 29 | |
Daniel Rosenberg | d6f41217 | 2020-02-05 16:40:52 -0800 | [diff] [blame] | 30 | int utf8_casefold_hash(const struct unicode_map *um, const void *salt, |
| 31 | struct qstr *str); |
| 32 | |
Gabriel Krisman Bertazi | 9d53690 | 2019-04-25 13:51:22 -0400 | [diff] [blame] | 33 | struct unicode_map *utf8_load(const char *version); |
| 34 | void utf8_unload(struct unicode_map *um); |
| 35 | |
| 36 | #endif /* _LINUX_UNICODE_H */ |