chiark / gitweb /
@@@ wip type definitions in manpage synopses
[mLib] / buf / pkbuf.3
index 80eed4b549ae39d8026c23cf6ffc07469aa3ac51..01c42404adbd3730045903d4f2bb9458cd3db717 100644 (file)
@@ -13,6 +13,19 @@ pkbuf \- split packets out of asynchronously received blocks
 .nf
 .B "#include <mLib/pkbuf.h>"
 
+.B "enum {"
+.B "\h'4n'PKBUF_ENABLE = ..."
+.B "};"
+
+.B "typedef struct {"
+.B "\h'4n'unsigned f;"
+.B "\h'4n'..."
+.B "} pkbuf;"
+
+.ds mT \fBtypedef void pkbuf_func(
+.B "\*(mToctet *" b ", size_t " sz ", pkbuf *" p ,
+.BI "\h'\w'\*(mT'u'size_t *" keep ", void *" p );
+
 .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 +153,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