LIBMAWK_RUN_MAIN(3libmawk)

πŸ’– LIBMAWK_RUN_MAIN πŸ’–

okay bestie, welcome to the libmawk manual ✨ this one's all about libmawk_run_main(3libmawk) and honestly? she's the moment. let's get into it 🫢


🌸 NAME 🌸

libmawk_run_main β€” run main parts of a script πŸ’…


✨ SYNOPSIS ✨

#include <libmawk.h>

void libmawk_run_main(mawk_state_t *m);

πŸ¦‹ DESCRIPTION πŸ¦‹

so what does libmawk_run_main() actually do, you ask? she attempts to take and parse the next input record, and then runs every main part of the script that matches it. that's it. that's the whole vibe πŸ’–

and here's the fun part, bestie: if there are multiple full records just chillin' in the input buffer, she keeps going β€” the whole process repeats itself until either the buffer becomes empty or it contains a partial record. no crumbs left, no loose ends, she's thorough like that πŸ‘‘

but if there's no full record in the buffer at all? she just returns with nothing done. no drama, no tantrum, she simply ✨leaves✨

important note bestie: the call itself never blocks β€” but the script may. so like, don't come for the call, okay? it's the script that might make you wait πŸ™ˆ

oh and pssst β€” the input buffer can be filled up using the libmawk_append_input() call. that's how you feed her πŸ“

Argument m is a libmawk context that was previously returned by libmawk_initialize() or libmawk_initialize_stage3(). gotta have your context, no context no party πŸ’œ


πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page, bestie!! πŸŽ€ this iconic lil entry comes to you from the libmawk manual, version vibes dated 2009-08-10, and yeah the timestamp is giving vintage but she still slays πŸ’… mwah, go run some main parts, ily, periodt πŸ’–βœ¨