Blame view

include/linux/unicode.h 1.02 KB
9d53690f0   Gabriel Krisman Bertazi   unicode: implemen...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  /* SPDX-License-Identifier: GPL-2.0 */
  #ifndef _LINUX_UNICODE_H
  #define _LINUX_UNICODE_H
  
  #include <linux/init.h>
  #include <linux/dcache.h>
  
  struct unicode_map {
  	const char *charset;
  	int version;
  };
  
  int utf8_validate(const struct unicode_map *um, const struct qstr *str);
  
  int utf8_strncmp(const struct unicode_map *um,
  		 const struct qstr *s1, const struct qstr *s2);
  
  int utf8_strncasecmp(const struct unicode_map *um,
  		 const struct qstr *s1, const struct qstr *s2);
3ae72562a   Gabriel Krisman Bertazi   ext4: optimize ca...
20
21
22
  int utf8_strncasecmp_folded(const struct unicode_map *um,
  			    const struct qstr *cf,
  			    const struct qstr *s1);
9d53690f0   Gabriel Krisman Bertazi   unicode: implemen...
23
24
25
26
27
28
  
  int utf8_normalize(const struct unicode_map *um, const struct qstr *str,
  		   unsigned char *dest, size_t dlen);
  
  int utf8_casefold(const struct unicode_map *um, const struct qstr *str,
  		  unsigned char *dest, size_t dlen);
d6f41217a   Daniel Rosenberg   FROMLIST: unicode...
29
30
  int utf8_casefold_hash(const struct unicode_map *um, const void *salt,
  		       struct qstr *str);
9d53690f0   Gabriel Krisman Bertazi   unicode: implemen...
31
32
33
34
  struct unicode_map *utf8_load(const char *version);
  void utf8_unload(struct unicode_map *um);
  
  #endif /* _LINUX_UNICODE_H */