MTREE_PARENT(3)
π MTREE_PARENT(3) π
okay bestie, pull up a chair π«Ά this one lives in the Librecast Programmer's Manual, it's called mtree_parent, and it's literally the shortest glow-up in the whole tree. let's go β¨
πΈ NAME πΈ
mtree_parent β return node number of parent node π
π LIBRARY π
Librecast library (liblibrecast, -llibrecast) π
β¨ SYNOPSIS β¨
#include <librecast/mtree.h>
size_t mtree_parent(size_t node);
Compile and link with -llibrecast.
π¦ DESCRIPTION π¦
so the mtree_nnode function returns the node number of the parent of node. yes bestie, you read that right, it hands you the parent. no drama, no side quests π
this calculation is independent of the tree, and it's implemented as a macro. so it's not out here peeking at your tree structure, it's just doing the math, periodt.
nodes are numbered from 0 = root π±
π RETURN VALUE π
mtree_parent() returns the number of the parent node. that's the whole vibe π«Ά
π ERRORS π
None. literally none. not a single one. it's giving flawless β¨
π SEE ALSO π
ngl the whole tree is a family and this is just the "go ask your parent" function π
LIBRECAST Β· 2023-07-23 Β· MTREE_PARENT(3) β that's the version, the date, and the page name bestie, so you know exactly where this lore came from π mwah, go slay your trees πΈπ§
π¦ where this page comes from
- debian trixie: liblibrecast-dev 0.9.1-1 Β· GPL-2.0-only OR GPL-3.0-only
- nixos 26.05: librecast 0.11.2
- nixpkgs unstable: librecast 0.11.2
- ubuntu noble: liblibrecast-dev 0.8.0-1.1build1 Β· GPL-2.0-only OR GPL-3.0-only
- ubuntu questing: liblibrecast-dev 0.9.1-1
- ubuntu resolute: liblibrecast-dev 0.11.2-2 Β· GPL-2.0-only OR GPL-3.0-only
- ubuntu stonking: liblibrecast-dev 0.11.2-2build1 Β· GPL-2.0-only OR GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms