2018-05-31 15:00:31 -03:00
|
|
|
/*
|
|
|
|
|
* This structure helps apfs_normalize_next() to retrieve one normalized
|
|
|
|
|
* (and case-folded) UTF-32 character at a time from a UTF-8 string.
|
|
|
|
|
*/
|
|
|
|
|
struct apfs_unicursor {
|
2018-07-25 00:23:38 -03:00
|
|
|
const char *utf8curr; /* Start of UTF-8 to decompose and reorder */
|
|
|
|
|
int length; /* Length of normalization until next starter */
|
|
|
|
|
int last_pos; /* Offset in substring of last char returned */
|
|
|
|
|
u8 last_ccc; /* CCC of the last character returned */
|
2018-05-31 15:00:31 -03:00
|
|
|
};
|
|
|
|
|
|
2018-07-25 00:23:38 -03:00
|
|
|
extern void apfs_init_unicursor(struct apfs_unicursor *cursor,
|
|
|
|
|
const char *utf8str);
|
2018-11-13 00:36:13 -03:00
|
|
|
extern unicode_t apfs_normalize_next(struct apfs_unicursor *cursor,
|
|
|
|
|
bool case_fold);
|
2018-05-31 15:00:31 -03:00
|
|
|
|
|
|
|
|
#endif /* _APFS_UNICODE_H */
|