1LIBMAWK_APPEND_INPUT(3) libmawk manual LIBMAWK_APPEND_INPUT(3)
2
3
4
6 libmawk_append_input - append a string to an input buffer
7
9 #include <libmawk.h>
10
11 void libmawk_append_input(mawk_state_t *m, const char *input_str);
12
13 void libmawk_append_ninput(mawk_state_t *m, const char *input, intlen);
14
15
17 The libmawk_append_input() and libmawk_append_ninput() functions allow
18 the application to fill the input buffer of a libmawk context. No
19 record separator is appended, only the bytes donated by input_str or
20 input, thus it is possible to append partial records. Appending to the
21 input doesn't have the side effect of any script being run. There may
22 be multiple libmawk_append_input() calls before a call to lib‐
23 mawk_run_main(). The latter all is used to let the script process the
24 input buffer.
25
26 The only difference between the two calls are the input format: lib‐
27 mawk_append_input() expects a nul-terminated string, whereas lib‐
28 mawk_append_ninput() takes an arbitrary binary data and its length.
29
30 Argument m is a libmawk context previously returned by libmawk_initial‐
31 ize() or libmawk_initialize_stage3().
32
34 libmawk_initialize_stage(3libmawk), libmawk_initialize(3libmawk), lib‐
35 mawk_run_main(3libmawk).
36
37
38
39
40libmawk 2009-08-10 LIBMAWK_APPEND_INPUT(3)