aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-04-12 00:16:18 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-04-12 00:16:18 +0200
commiteaa205db54705622580b77aef57f6bdbd2fa5bf2 (patch)
treefe00a725920a34c0716c5617f455975f6dce7917
parent4be9da8d2d4f428de60dd7af874a28630d33b542 (diff)
Use the __mlib_uprop_attrs macro for attributes
-rwxr-xr-xgen/prop/bool-props2
-rw-r--r--include/unicode/prop.h138
2 files changed, 71 insertions, 69 deletions
diff --git a/gen/prop/bool-props b/gen/prop/bool-props
index 04e1e32..bac9ac7 100755
--- a/gen/prop/bool-props
+++ b/gen/prop/bool-props
@@ -91,7 +91,7 @@ for prop in $props3; do gen $prop emoji-data & done
for prop in $props4; do gen $prop DerivedNormalizationProps & done
for prop in $props5; do gen $prop DerivedBinaryProperties & done
-printf '[[__nodiscard__, __unsequenced__]] bool uprop_is_%s(rune);\n' \
+printf '[[__mlib_uprop_attrs]] bool uprop_is_%s(rune);\n' \
$(printf '%s\n' $props1 $props2 $props3 $props4 $props5 | cut -d= -f1) \
| gawk '
/PROP PREDICATES END/ { no = 0 }
diff --git a/include/unicode/prop.h b/include/unicode/prop.h
index 9d1f815..ebbc817 100644
--- a/include/unicode/prop.h
+++ b/include/unicode/prop.h
@@ -143,78 +143,80 @@ enum uprop_nt {
NT_NU, /* Numeric */
};
-[[__nodiscard__, __unsequenced__]] double uprop_get_nv(rune);
-[[__nodiscard__, __unsequenced__]] enum uprop_bpt uprop_get_bpt(rune);
-[[__nodiscard__, __unsequenced__]] enum uprop_dt uprop_get_dt(rune);
-[[__nodiscard__, __unsequenced__]] enum uprop_ea uprop_get_ea(rune);
-[[__nodiscard__, __unsequenced__]] enum uprop_gc uprop_get_gc(rune);
-[[__nodiscard__, __unsequenced__]] enum uprop_lb uprop_get_lb(rune);
-[[__nodiscard__, __unsequenced__]] enum uprop_nt uprop_get_nt(rune);
-[[__nodiscard__, __unsequenced__]] rune uprop_get_bpb(rune);
-[[__nodiscard__, __unsequenced__]] rune uprop_get_slc(rune);
-[[__nodiscard__, __unsequenced__]] rune uprop_get_stc(rune);
-[[__nodiscard__, __unsequenced__]] rune uprop_get_suc(rune);
-[[__nodiscard__, __unsequenced__]] struct u8view uprop_get_na1(rune);
-[[__nodiscard__, __unsequenced__]] struct u8view uprop_get_na(rune);
+#define __mlib_uprop_attrs __nodiscard__, __unsequenced__
+
+[[__mlib_uprop_attrs]] double uprop_get_nv(rune);
+[[__mlib_uprop_attrs]] enum uprop_bpt uprop_get_bpt(rune);
+[[__mlib_uprop_attrs]] enum uprop_dt uprop_get_dt(rune);
+[[__mlib_uprop_attrs]] enum uprop_ea uprop_get_ea(rune);
+[[__mlib_uprop_attrs]] enum uprop_gc uprop_get_gc(rune);
+[[__mlib_uprop_attrs]] enum uprop_lb uprop_get_lb(rune);
+[[__mlib_uprop_attrs]] enum uprop_nt uprop_get_nt(rune);
+[[__mlib_uprop_attrs]] rune uprop_get_bpb(rune);
+[[__mlib_uprop_attrs]] rune uprop_get_slc(rune);
+[[__mlib_uprop_attrs]] rune uprop_get_stc(rune);
+[[__mlib_uprop_attrs]] rune uprop_get_suc(rune);
+[[__mlib_uprop_attrs]] struct u8view uprop_get_na1(rune);
+[[__mlib_uprop_attrs]] struct u8view uprop_get_na(rune);
/* PROP PREDICATES START */
-[[__nodiscard__, __unsequenced__]] bool uprop_is_ahex(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_alpha(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_bidi_c(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_bidi_m(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_cased(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_ci(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_cwcf(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_cwcm(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_cwkcf(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_cwl(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_cwt(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_cwu(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_dash(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_dep(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_di(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_dia(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_ebase(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_ecomp(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_emod(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_emoji(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_epres(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_ext(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_extpic(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_gr_base(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_gr_ext(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_hex(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_id_compat_math_continue(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_id_compat_math_start(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_idc(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_ideo(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_ids(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_idsb(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_incb(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_loe(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_lower(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_math(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_pat_syn(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_pat_ws(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_pcm(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_qmark(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_radical(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_sd(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_sterm(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_term(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_uideo(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_upper(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_vs(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_wspace(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_xidc(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_xids(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_ahex(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_alpha(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_bidi_c(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_bidi_m(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_cased(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_ci(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_cwcf(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_cwcm(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_cwkcf(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_cwl(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_cwt(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_cwu(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_dash(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_dep(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_di(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_dia(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_ebase(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_ecomp(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_emod(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_emoji(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_epres(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_ext(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_extpic(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_gr_base(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_gr_ext(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_hex(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_id_compat_math_continue(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_id_compat_math_start(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_idc(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_ideo(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_ids(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_idsb(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_incb(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_loe(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_lower(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_math(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_pat_syn(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_pat_ws(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_pcm(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_qmark(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_radical(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_sd(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_sterm(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_term(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_uideo(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_upper(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_vs(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_wspace(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_xidc(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_xids(rune);
/* PROP PREDICATES END */
/* Manually implemented predicates */
-[[__nodiscard__, __unsequenced__]] bool uprop_is_idst(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_idsu(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_join_c(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_nchar(rune);
-[[__nodiscard__, __unsequenced__]] bool uprop_is_ri(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_idst(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_idsu(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_join_c(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_nchar(rune);
+[[__mlib_uprop_attrs]] bool uprop_is_ri(rune);
#endif /* !MLIB_UNICODE_PROP_H */