diff options
Diffstat (limited to 'runcap.3')
-rw-r--r-- | runcap.3 | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -153,13 +153,22 @@ A pointer to the line monitor function. If set, the \fIflags\fR. .sp The line monitor function allows the caller to monitor the arrival of -each input line in the corresponding stream. Its signature is: +the new data in the corresponding stream. Its signature is: .sp .BI "void linemon(const char *" line ", size_t " size ", void *" data ) .sp where \fIline\fR is the line that has been read, \fIsize\fR is its length, and \fIdata\fR is an opaque pointer to application-specific data, supplied in the \fBsc_monarg\fR member. +.sp +The line monitor function is invoked each time a newline character is +encountered in the stream, or when the stream buffer becomes full (and, +therefore is about to be flushed into the storage file) and some +characters remain unreported. This means that, if the +\fBsc_linemon\fR function is designed to log each input line, it +should keep the state of processing (e.g. in the \fIdata\fR argument), +and concatenate the \fIline\fR parameters until +\fBline[size-1] == '\\n'\fR. .TP .B sc_monarg The value of the \fIdata\fR parameter for the \fBsc_linemon\fR |