fs/unicode/utf8n.h
Source file repositories/reference/linux-study-clean/fs/unicode/utf8n.h
File Facts
- System
- Linux kernel
- Corpus path
fs/unicode/utf8n.h- Extension
.h- Size
- 1943 bytes
- Lines
- 84
- Domain
- Core OS
- Bucket
- VFS And Filesystem Core
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/export.hlinux/string.hlinux/module.hlinux/unicode.h
Detected Declarations
struct utf8cursorstruct utf8datastruct utf8data_table
Annotated Snippet
struct utf8cursor {
const struct unicode_map *um;
enum utf8_normalization n;
const char *s;
const char *p;
const char *ss;
const char *sp;
unsigned int len;
unsigned int slen;
short int ccc;
short int nccc;
unsigned char hangul[UTF8HANGULLEAF];
};
/*
* Initialize a utf8cursor to normalize a string.
* Returns 0 on success.
* Returns -1 on failure.
*/
int utf8ncursor(struct utf8cursor *u8c, const struct unicode_map *um,
enum utf8_normalization n, const char *s, size_t len);
/*
* Get the next byte in the normalization.
* Returns a value > 0 && < 256 on success.
* Returns 0 when the end of the normalization is reached.
* Returns -1 if the string being normalized is not valid UTF-8.
*/
extern int utf8byte(struct utf8cursor *u8c);
struct utf8data {
unsigned int maxage;
unsigned int offset;
};
struct utf8data_table {
const unsigned int *utf8agetab;
int utf8agetab_size;
const struct utf8data *utf8nfdicfdata;
int utf8nfdicfdata_size;
const struct utf8data *utf8nfdidata;
int utf8nfdidata_size;
const unsigned char *utf8data;
};
extern const struct utf8data_table utf8_data_table;
#endif /* UTF8NORM_H */
Annotation
- Immediate include surface: `linux/types.h`, `linux/export.h`, `linux/string.h`, `linux/module.h`, `linux/unicode.h`.
- Detected declarations: `struct utf8cursor`, `struct utf8data`, `struct utf8data_table`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.