DOKK / manpages / debian 11 / libzt-doc / zt_pack_rune.3.en
zt_pack_rune(3) Library Functions Manual (prm) zt_pack_rune(3)

zt_pack_runepack a character into a variant

#include <zt.h>

zt_value
zt_pack_rune(int value, const char *source);

zt_pack_rune packs a rune, as well as the string describing the expression evaluated to obtain it, into a variant-like zt_value. The source argument is retained by the value and is typically a constant string literal produced by the preprocessor.

Runes are generalized characters. Unlike char, they are never negative and can be though of as Unicode code points.

zt_pack_rune() compensates for signed negative characters by masking them with 0xFF.

The packed value.

zt_pack_nothing(3), zt_pack_integer(3), zt_pack_rune(3), zt_pack_integer(3), zt_pack_unsigned(3), zt_pack_string(3), zt_pack_pointer(3) zt_value(3),

zt_pack_rune first appeared in libzt 0.1

Zygmunt Krynicki <me@zygoon.pl>

January 12, 2020 libzt 0.3.1