You've already forked apfs-ucd-parser
mirror of
https://github.com/linux-apfs/apfs-ucd-parser.git
synced 2026-05-01 15:01:06 -07:00
09a7616c2f
Add support for case sensitivity to unicode.c, and take advantage of this to simplify the testing procedure.
18 lines
652 B
C
18 lines
652 B
C
/*
|
|
* 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 {
|
|
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 */
|
|
};
|
|
|
|
extern void apfs_init_unicursor(struct apfs_unicursor *cursor,
|
|
const char *utf8str);
|
|
extern unicode_t apfs_normalize_next(struct apfs_unicursor *cursor,
|
|
bool case_fold);
|
|
|
|
#endif /* _APFS_UNICODE_H */
|