LIBMAWK_APPEND_INPUT(3libmawk)
π LIBMAWK_APPEND_INPUT π
ok so this is libmawk_append_input(3libmawk) from the libmawk manual, bestie, and it's literally the "here's some input, go off" function. sit down, grab a strawberry, we're doing this π
β¨ NAME β¨
libmawk_append_input β append a string to an input buffer π
π¦ SYNOPSIS π¦
#include <libmawk.h>
void libmawk_append_input(mawk_state_t *m, const char *input_str);
void libmawk_append_ninput(mawk_state_t *m, const char *input, intlen);
πΈ DESCRIPTION πΈ
okok so libmawk_append_input() and libmawk_append_ninput() are the two functions that let your application go fill up the input buffer of a libmawk context. it's giving "you bring the bytes, awk does the rest" π
here's the tea tho: no record separator gets appended. literally none. only the exact bytes you donate via input_str or input. which means β and this is actually so useful β you can append partial records if you want. slay π«Ά
another thing: appending to the input does not have the side effect of any script being run. nope, nothing fires yet. it's just chillin' in the buffer. so you can call libmawk_append_input() as many times as you want before you ever call libmawk_run_main(). and that latter one? that's the call that actually lets the script process the input buffer. that's the main character moment π
the only difference between the two calls is the input format, periodt:
libmawk_append_input()β expects a nul-terminated string.libmawk_append_ninput()β takes arbitrary binary data plus its length.
oh and the argument m? that's a libmawk context that you already got back from libmawk_initialize() or libmawk_initialize_stage3(). don't just make one up bestie, it has to come from there π
π SEE ALSO π
and that's the whole page, no cap π this was LIBMAWK_APPEND_INPUT(3libmawk) from the libmawk manual, dated 2009-08-10, source libmawk. go forth and append, icon πβ¨π
π¦ 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