aboutsummaryrefslogtreecommitdiff
path: root/lib/unicode/prop
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-09-15 19:20:44 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-09-15 19:20:44 +0200
commitd8760ab5cf8378fa50e48453149e96a1392253e2 (patch)
tree3ee857325aefe46070d21c0339feee068987222a /lib/unicode/prop
parentb6792f703c715ccfc0854c4e8ee3ca703565f4eb (diff)
Shorten the string view type names
Diffstat (limited to 'lib/unicode/prop')
-rw-r--r--lib/unicode/prop/uprop_blkname.c4
-rw-r--r--lib/unicode/prop/uprop_get_na.c6
-rw-r--r--lib/unicode/prop/uprop_get_na1.c6
3 files changed, 8 insertions, 8 deletions
diff --git a/lib/unicode/prop/uprop_blkname.c b/lib/unicode/prop/uprop_blkname.c
index 490f133..d55d731 100644
--- a/lib/unicode/prop/uprop_blkname.c
+++ b/lib/unicode/prop/uprop_blkname.c
@@ -4,7 +4,7 @@
#define _(...) \
{(const char8_t []){__VA_ARGS__}, sizeof((const char8_t []){__VA_ARGS__})}
-static const struct u8view lookup[] = {
+static const u8view_t lookup[] = {
[BLK_NB] = _('N', 'o', ' ', 'B', 'l', 'o', 'c', 'k'),
[BLK_ADLAM] = _('A', 'd', 'l', 'a', 'm'),
[BLK_AEGEAN_NUMBERS] = _('A', 'e', 'g', 'e', 'a', 'n', ' ', 'N', 'u', 'm', 'b', 'e', 'r', 's'),
@@ -336,7 +336,7 @@ static const struct u8view lookup[] = {
[BLK_ZNAMENNY_MUSIC] = _('Z', 'n', 'a', 'm', 'e', 'n', 'n', 'y', ' ', 'M', 'u', 's', 'i', 'c', 'a', 'l', ' ', 'N', 'o', 't', 'a', 't', 'i', 'o', 'n'),
};
-struct u8view
+u8view_t
uprop_blkname(enum uprop_blk blk)
{
ASSUME(blk < lengthof(lookup));
diff --git a/lib/unicode/prop/uprop_get_na.c b/lib/unicode/prop/uprop_get_na.c
index f9df254..9b51838 100644
--- a/lib/unicode/prop/uprop_get_na.c
+++ b/lib/unicode/prop/uprop_get_na.c
@@ -7,7 +7,7 @@
#define _(...) \
{(const char8_t []){__VA_ARGS__}, sizeof((const char8_t []){__VA_ARGS__})}
-static const struct u8view lookup[] = {
+static const u8view_t lookup[] = {
[RUNE_C(0x000020)] = _('S', 'P', 'A', 'C', 'E'),
[RUNE_C(0x000021)] = _('E', 'X', 'C', 'L', 'A', 'M', 'A', 'T', 'I', 'O', 'N', ' ', 'M', 'A', 'R', 'K'),
[RUNE_C(0x000022)] = _('Q', 'U', 'O', 'T', 'A', 'T', 'I', 'O', 'N', ' ', 'M', 'A', 'R', 'K'),
@@ -34838,8 +34838,8 @@ static const struct u8view lookup[] = {
[RUNE_C(0x0E01EF)] = _('V', 'A', 'R', 'I', 'A', 'T', 'I', 'O', 'N', ' ', 'S', 'E', 'L', 'E', 'C', 'T', 'O', 'R', '-', '2', '5', '6'),
};
-struct u8view
+u8view_t
uprop_get_na(rune ch)
{
- return ch < lengthof(lookup) ? lookup[ch] : (struct u8view){};
+ return ch < lengthof(lookup) ? lookup[ch] : (u8view_t){};
}
diff --git a/lib/unicode/prop/uprop_get_na1.c b/lib/unicode/prop/uprop_get_na1.c
index d1b9ec9..ac6fe06 100644
--- a/lib/unicode/prop/uprop_get_na1.c
+++ b/lib/unicode/prop/uprop_get_na1.c
@@ -7,7 +7,7 @@
#define _(...) \
{(const char8_t []){__VA_ARGS__}, sizeof((const char8_t []){__VA_ARGS__})}
-static const struct u8view lookup[] = {
+static const u8view_t lookup[] = {
[RUNE_C(0x000000)] = _('N', 'U', 'L', 'L'),
[RUNE_C(0x000001)] = _('S', 'T', 'A', 'R', 'T', ' ', 'O', 'F', ' ', 'H', 'E', 'A', 'D', 'I', 'N', 'G'),
[RUNE_C(0x000002)] = _('S', 'T', 'A', 'R', 'T', ' ', 'O', 'F', ' ', 'T', 'E', 'X', 'T'),
@@ -1988,8 +1988,8 @@ static const struct u8view lookup[] = {
[RUNE_C(0x00FFE4)] = _('F', 'U', 'L', 'L', 'W', 'I', 'D', 'T', 'H', ' ', 'B', 'R', 'O', 'K', 'E', 'N', ' ', 'V', 'E', 'R', 'T', 'I', 'C', 'A', 'L', ' ', 'B', 'A', 'R'),
};
-struct u8view
+u8view_t
uprop_get_na1(rune ch)
{
- return ch < lengthof(lookup) ? lookup[ch] : (struct u8view){};
+ return ch < lengthof(lookup) ? lookup[ch] : (u8view_t){};
}