EC_PNODE_FIND_NEXT(3)
β¨ EC_PNODE_FIND_NEXT(3) β¨
okay bestie, so this one lives in the Libecoli Programmer's Manual and it's literally the "and what's NEXT" of node-finding π
πΈ NAME πΈ
ec_pnode_find_next β find the next node matching an identifier. yes, the next one. the sequel. the part two. π¬
π¦ SYNOPSIS π¦
#include <ecoli/parse.h>
const struct ec_pnode * ec_pnode_find_next(
/*
* The root of the search, as passed to ec_pnode_find().
*/
const struct ec_pnode *root,
const struct ec_pnode *prev, /* The node returned by the previous search. */
const char *id, /* The node identifier string to match. */
/*
* True to iterate the children of "prev", false to skip them.
*/
bool iter_children
);
π DESCRIPTION π
so after you've had a successful call to ec_pnode_find() or ec_pnode_find_next() (key word: successful, no cap), you can go grab the next node that has the id you're matching on. slay.
there are 2 options for how you wanna do that:
- continue the depth-first search where it was interrupted π
- skip the children of the current node, and continue the depth-first search π«Ά
that's it. that's the whole vibe. you're either picking up right where you left off, or you're ghosting the children and moving on. main character energy fr fr.
π RETURN VALUE π
the next node matching the identifier, or NULL if it's not found π (not me getting ghosted by a node).
π SEE ALSO π
the whole friend group, obviously π
ec_pnode_len(3)ec_pnode_get_strvec(3)ec_parse(3)ec_parse_strvec(3)ec_pnode(3)ec_pnode_free_children(3)ec_pnode_get_root(3)ec_pnode_get_parent(3)ec_pnode_get_first_child(3)ec_pnode_free(3)ec_pnode_dup(3)ec_pnode_matches(3)ec_pnode_dump(3)ec_pnode_unlink_child(3)ec_pnode_next(3)ec_pnode_del_last_child(3)ec_pnode_link_child(3)ec_pnode_count(3)ec_pnode_get_attrs(3)ec_pnode_get_last_child(3)ec_pnode_get_node(3)ec_pnode_find(3)ec_parse_child(3)
π COPYRIGHT π
Copyright (C) 2010-2026 Olivier Matz, Robin Jarry.
ok and that's the tea π this lil page came out of libecoli on 2026-06-11, and honestly? iconic. go find ur next node bestie, i believe in u πβ¨π¦
π¦ where this page comes from
- fedora 44: libecoli-devel 0.11.7-1.fc44 Β· BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
- fedora 44: libecoli-devel 0.11.7-1.fc44 Β· BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms