DOKK / manpages / debian 12 / libmawk1 / libmawk_append_input.3libmawk.en
LIBMAWK_APPEND_INPUT(3libmawk) libmawk manual LIBMAWK_APPEND_INPUT(3libmawk)

libmawk_append_input - append a string to an input buffer

#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);

The libmawk_append_input() and libmawk_append_ninput() functions allow the application to fill the input buffer of a libmawk context. No record separator is appended, only the bytes donated by input_str or input, thus it is possible to append partial records. Appending to the input doesn't have the side effect of any script being run. There may be multiple libmawk_append_input() calls before a call to libmawk_run_main(). The latter all is used to let the script process the input buffer.

The only difference between the two calls are the input format: libmawk_append_input() expects a nul-terminated string, whereas libmawk_append_ninput() takes an arbitrary binary data and its length.

Argument m is a libmawk context previously returned by libmawk_initialize() or libmawk_initialize_stage3().

libmawk_initialize_stage(3libmawk), libmawk_initialize(3libmawk), libmawk_run_main(3libmawk).

2009-08-10 libmawk