Codebase list libmawk / debian/1.0.0-1 doc / libmawk_append_input.3libmawk.html

Tree @debian/1.0.0-1 (Download .tar.gz)

libmawk_append_input.3libmawk.html @debian/1.0.0-1raw · history · blame

<!-- Creator     : groff version 1.22.2 -->
<!-- CreationDate: Sat Jun 14 14:27:30 2014 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<meta name="generator" content="groff -Thtml, see">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p       { margin-top: 0; margin-bottom: 0; vertical-align: top }
       pre     { margin-top: 0; margin-bottom: 0; vertical-align: top }
       table   { margin-top: 0; margin-bottom: 0; vertical-align: top }
       h1      { text-align: center }


<h1 align="center">LIBMAWK_APPEND_INPUT</h1>

<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>


<a name="NAME"></a>

<p style="margin-left:11%; margin-top: 1em">libmawk_append_input
&minus; append a string to an input buffer</p>

<a name="SYNOPSIS"></a>

<p style="margin-left:11%; margin-top: 1em"><b>#include

<p style="margin-left:11%; margin-top: 1em"><b>void
libmawk_append_input(mawk_state_t *</b><i>m</i><b>, const
char *</b><i>input_str</i><b>);</b></p>

<p style="margin-left:11%; margin-top: 1em"><b>void
libmawk_append_ninput(mawk_state_t *</b><i>m</i><b>, const
char *</b><i>input</i><b>, int</b><i>len</i><b>);</b></p>

<a name="DESCRIPTION"></a>

<p style="margin-left:11%; margin-top: 1em">The
<b>libmawk_append_input</b>() and
<b>libmawk_append_ninput</b>() 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&rsquo;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.</p>

<p style="margin-left:11%; margin-top: 1em">The only
difference between the two calls are the input format:
<b>libmawk_append_input</b>() expects a nul-terminated
string, whereas <b>libmawk_append_ninput</b>() takes an
arbitrary binary data and its length.</p>

<p style="margin-left:11%; margin-top: 1em">Argument m is a
libmawk context previously returned by libmawk_initialize()
or libmawk_initialize_stage3().</p>

<a name="SEE ALSO"></a>

<p style="margin-left:11%; margin-top: 1em"><b>libmawk_initialize_stage</b>(3libmawk),