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 πβ¨
π¦ where this page comes from
- debian bookworm: libmawk1 1.0.2-3
- debian trixie: libmawk1t64 1.0.4-4
- fedora 43: libmawk-devel 1.0.3-8.fc41 Β· GPLv2
- fedora 43: libmawk-devel 1.0.3-8.fc41 Β· GPLv2
- fedora 44: libmawk-devel 1.0.5-1.fc44 Β· GPL-2.0-only
- fedora 44: libmawk-devel 1.0.5-1.fc44 Β· GPL-2.0-only
- ubuntu jammy: libmawk1 1.0.2-3
- ubuntu noble: libmawk1t64 1.0.4-3build1
- ubuntu questing: libmawk1t64 1.0.4-5
- ubuntu resolute: libmawk1t64 1.0.5-1
- ubuntu stonking: libmawk1t64 1.0.5-1
- Copyright 2009 Tibor Palinkas (mawk@inno.bme.hu)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms