@@@ man wip
[mLib] / buf / pkbuf.3
index 80eed4b..dd48a33 100644 (file)
@@ -11,8 +11,22 @@ pkbuf \- split packets out of asynchronously received blocks
 .\" @pkbuf_destroy
 .SH "SYNOPSIS"
 .nf
+.ta 2n
 .B "#include <mLib/pkbuf.h>"
-
+.PP
+.B "enum {"
+.B "   PKBUF_ENABLE = ..."
+.B "};"
+.PP
+.B "typedef struct {"
+.B "   unsigned f;"
+.B "   ..."
+.B "} pkbuf;"
+.PP
+.ta \w'\fBtypedef void pkbuf_func('u
+.B "typedef void pkbuf_func(octet *" b ", size_t " sz ", pkbuf *" p ,
+.BI "  size_t *" keep ", void *" p );
+.PP
 .BI "void pkbuf_flush(pkbuf *" pk ", octet *" p ", size_t " len );
 .BI "void pkbuf_close(pkbuf *" pk );
 .BI "size_t pkbuf_free(pkbuf *" pk ", octet **" p );
@@ -140,15 +154,8 @@ to the packet buffer and a size
 .I sz
 of the packet.
 .PP
-When enough data has arrived, the packet-handler function is called.
-This has the signature
-.IP
-.nf
-.BI "void (*" func ")(octet *" b ", size_t " sz ", pkbuf *" p ,
-.BI "             size_t *" keep ", void *" p );
-.fi
-.PP
-It is passed:
+When enough data has arrived, the packet-handler function is called.  It
+is passed:
 .TP
 .BI "octet *" b
 A pointer to the packet data in the buffer, or zero to signify