cs_render(3)

✨ cs_render(3) ✨

okay bestie, sit down, hydrate, because today we're rendering a CS parse tree and honestly it's giving main character energy. πŸ’… this one lives in cs/cs.h (section 3, iykyk) so go ahead and get comfy with it.


πŸŽ€ NAME πŸŽ€

cs_render β€” render a CS parse tree πŸ¦‹


🌸 SYNOPSIS 🌸

#include <cs/cs.h>

NEOERR *cs_render (CSPARSE *parse, void *ctx, CSOUTFUNC cb);

πŸ’– ARGUMENTS πŸ’–

  • parse β€” the CSPARSE structure holding the CS parse tree that's gonna get evaluated. that's the whole point, bestie. πŸ‘‘
  • ctx β€” user data, and it gets passed as the first variable to the CSOUTFUNC. it's your lil passenger, do what you want with it.
  • cb β€” a CSOUTFUNC that gets called to render the output. and a CSOUTFUNC is defined as, verbatim, no edits:
typedef NEOERR* (*CSOUTFUNC)(void *, char *);

✨ DESCRIPTION ✨

so cs_render evaluates a CS parse tree and calls the CSOUTFUNC you handed it for output. that's the vibe. 🌈

⚠️ listen up though: calling cs_render multiple times on the same parse tree may or may not render the same output, because the set statement has side-effects β€” it updates the HDF data used by the render. so it's not a "same input, same output" situation, bestie. no cap. 😭

typically you'll call one of the cs_parse functions before you call this one. order matters, periodt. 🫢


🧚 RETURN VALUE 🧚

None. that's it. that's the whole section. πŸ’€


πŸ”₯ SEE ALSO πŸ”₯

cs_dump(3), cs_destroy(3), cs_render(3), cs_register_esc_strfunc(3), cs_arg_parsev(3), cs_register_fileload(3), cs_init(3), cs_register_strfunc(3), cs_arg_parse(3), cs_parse_string(3), cs_parse_file(3), =(3), cs_register_function


and that's the tea πŸ“ this lil page came to you from ClearSilver, dated 12 July 2007 β€” yeah, she's an elder icon but she still slays πŸ’œ stay rendering, bestie βœ¨πŸŽ€