4 #include <linux/init.h>
6 /* unicode character */
12 int (*uni2char
) (wchar_t uni
, unsigned char *out
, int boundlen
);
13 int (*char2uni
) (const unsigned char *rawstring
, int boundlen
,
15 const unsigned char *charset2lower
;
16 const unsigned char *charset2upper
;
18 struct nls_table
*next
;
21 /* this value hold the maximum octet of charset */
22 #define NLS_MAX_CHARSET_SIZE 6 /* for UTF-8 */
25 extern int register_nls(struct nls_table
*);
26 extern int unregister_nls(struct nls_table
*);
27 extern struct nls_table
*load_nls(char *);
28 extern void unload_nls(struct nls_table
*);
29 extern struct nls_table
*load_nls_default(void);
31 extern int utf8_mbtowc(wchar_t *, const __u8
*, int);
32 extern int utf8_mbstowcs(wchar_t *, const __u8
*, int);
33 extern int utf8_wctomb(__u8
*, wchar_t, int);
34 extern int utf8_wcstombs(__u8
*, const wchar_t *, int);
36 static inline unsigned char nls_tolower(struct nls_table
*t
, unsigned char c
)
38 unsigned char nc
= t
->charset2lower
[c
];
43 static inline unsigned char nls_toupper(struct nls_table
*t
, unsigned char c
)
45 unsigned char nc
= t
->charset2upper
[c
];
50 static inline int nls_strnicmp(struct nls_table
*t
, const unsigned char *s1
,
51 const unsigned char *s2
, int len
)
54 if (nls_tolower(t
, *s1
++) != nls_tolower(t
, *s2
++))
61 #define MODULE_ALIAS_NLS(name) MODULE_ALIAS("nls_" __stringify(name))
63 #endif /* _LINUX_NLS_H */
This page took 0.040307 seconds and 5 git commands to generate.