ZT_CMP_RUNE(3)
π ZT_CMP_RUNE(3) β bestie, it's a rune comparison claim β¨
okay so this is ZT_CMP_RUNE(3) from the LOCAL manual, and it's literally the cutest lil thing: it builds a claim that two characters (runes) are in some relation to each other. π¦
β¨ NAME β¨
ZT_CMP_RUNE, zt_cmp_rune β construct a claim of a relation between two characters (runes) π
πΈ SYNOPSIS πΈ
#include <zt.h>
#define ZT_CMP_RUNE(left, rel, right) \
zt_cmp_rune( \
ZT_CURRENT_LOCATION(), \
zt_pack_rune((left), (#left)), \
zt_pack_string((#rel), (#rel)), \
zt_pack_rune((right), (#right)))
zt_claim
zt_cmp_rune(zt_location location, zt_value left, zt_value rel,
zt_value right);
no cap, that's the whole thing π«Ά
π DESCRIPTION π
zt_cmp_rune() constructs a claim of a relation between two unsigned integers. bestie, you should use it through the macro ZT_CMP_RUNE() β that's the one that passes the source code location and does all the packing for you. π
The relation must be one of ==, !=, <, <=, > or >=. that's it. those six. periodt. β¨
π§ IMPLEMENTATION NOTES π§
ZT_CMP_RUNE() evaluates left and right exactly once. so like, if you were worried about your fancy side-effecty expression getting run twice β it does not. slay. π
π RETURN VALUES π
Both the macro and the function return a claim structure with the right attributes set. the returned claim is usually passed to zt_check() or to zt_assert(). that's the whole vibe β you build the claim, then you hand it off. π
π SEE ALSO π
ZT_CMP_BOOL(3)ZT_CMP_RUNE(3)ZT_CMP_CSTR(3)ZT_CMP_PTR(3)ZT_CMP_UINT(3)ZT_FALSE(3)ZT_NOT_NULL(3)ZT_NULL(3)ZT_TRUE(3)zt_check(3)
(the whole comparison squad fr fr π)
β HISTORY β
The ZT_CMP_RUNE() macro and the zt_cmp_rune() function first appeared in libzt 0.1. baby's first release, iconic behavior. π
π AUTHORS π
Zygmunt Krynicki <me@zygoon.pl> β the main character who wrote this. π
libzt 0.3.1 Β· January 12, 2020 β mwah, that's a wrap on ZT_CMP_RUNE(3), go build some claims bestie π¦πβ¨
π¦ where this page comes from
- debian bookworm: libzt-doc 0.3.1-4 Β· LGPL-3.0-only
- debian trixie: libzt-doc 0.3.1-4 Β· LGPL-3.0-only
- ubuntu jammy: libzt-doc 0.3.1-4 Β· LGPL-3.0-only
- ubuntu noble: libzt-doc 0.3.1-4build1 Β· LGPL-3.0-only
- ubuntu questing: libzt-doc 0.3.1-4build1
- ubuntu resolute: libzt-doc 0.3.1-4build2 Β· LGPL-3.0-only
- ubuntu stonking: libzt-doc 0.3.1-4build2 Β· LGPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms