@@@ wip type definitions in manpage synopses
[mLib] / buf / lbuf.3
index 6595f30..d1663a2 100644 (file)
@@ -13,6 +13,20 @@ lbuf \- split lines out of asynchronously received blocks
 .nf
 .B "#include <mLib/lbuf.h>"
 
+.B "enum {"
+.B "\h'4n'LBUF_CRLF,"
+.B "\h'4n'LBUF_STRICTCRLF,"
+.B "\h'4n'..."
+.B "};"
+.B "#define LBUF_ENABLE ..."
+
+.B "typedef struct {"
+.B "\h'4n'unsigned f;"
+.B "\h'4n'..."
+.B "} lbuf;"
+
+.B "typedef void lbuf_func(char *" s ", size_t " len ", void *" p );
+
 .BI "void lbuf_flush(lbuf *" b ", char *" p ", size_t " len );
 .BI "void lbuf_close(lbuf *" b );
 .BI "size_t lbuf_free(lbuf *" b ", char **" p );
@@ -161,12 +175,7 @@ and return only the initial portion.  It will ignore the rest of the
 line completely.
 .SS "Line-handler functions"
 Completed lines, as already said, are passed to the caller's
-line-handler function.  This function has the signature
-.IP
-.B "void"
-.IB func "(char *" s ", size_t " len ", void *" p );
-.PP
-It is given three arguments: the address
+line-handler function.  It is given three arguments: the address
 .I s
 of the line which has just been read; the length
 .I len