diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-05-20 21:17:56 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-05-20 21:17:56 +0200 |
commit | 82a976c742ba88ecd2aa66074e388025f9af6231 (patch) | |
tree | 3242dca909c1d27afd9f388026dae4c6fc891cb0 /include/unicode | |
parent | 2e125c1c7e75db14a88f0b8b09e61a132977c63e (diff) |
Rename normtype/NT to normform/NF
Diffstat (limited to 'include/unicode')
-rw-r--r-- | include/unicode/string.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/include/unicode/string.h b/include/unicode/string.h index 17ce561..975e4eb 100644 --- a/include/unicode/string.h +++ b/include/unicode/string.h @@ -18,14 +18,14 @@ enum [[clang::flag_enum]] caseflags { CF_ẞ = 1 << 3, /* Use ‘ẞ’ as the uppercase of ‘ß’; alias for CF_SS */ }; -enum normtype { +enum normform { /* If bit 0 is set, then composition is performed after decomposition. If bit-1 is set then compatibility (de)composition is used as opposed to canonical (de)composition. */ - NT_NFD = 0b00, - NT_NFC = 0b01, - NT_NFKD = 0b10, - NT_NFKC = 0b11, + NF_NFD = 0b00, + NF_NFC = 0b01, + NF_NFKD = 0b10, + NF_NFKC = 0b11, }; /* clang-format on */ @@ -45,7 +45,7 @@ size_t u8wnext_human(struct u8view *, struct u8view *); [[nodiscard]] char8_t *u8upper(size_t *, struct u8view, enum caseflags, alloc_fn, void *); [[nodiscard]] char8_t *u8norm(size_t *, struct u8view, alloc_fn, void *, - enum normtype); + enum normform); /* Encoding-generic macros */ #define ucsgcnt(sv) _Generic((sv), struct u8view: u8gcnt)((sv)) @@ -67,8 +67,8 @@ size_t u8wnext_human(struct u8view *, struct u8view *); #define ucsupper(dstn, sv, flags, alloc, ctx) \ _Generic((sv), struct u8view: u8upper)((dstn), (sv), (flags), (alloc), \ (ctx)) -#define ucsnorm(dstn, sv, alloc, ctx, nt) \ - _Generic((sv), struct u8view: u8norm)((dstn), (sv), (alloc), (ctx), (nt)) +#define ucsnorm(dstn, sv, alloc, ctx, nf) \ + _Generic((sv), struct u8view: u8norm)((dstn), (sv), (alloc), (ctx), (nf)) constexpr double U8CASEFOLD_SCALE = 3; constexpr double U8LOWER_SCALE = 1.5; |