chiark / gitweb /
Makefile: Use check_PROGRAMS target.
[mLib] / man / pkbuf.3
index cdc6bac33010c6306881178c4ae7fa14a6407a7c..80eed4b549ae39d8026c23cf6ffc07469aa3ac51 100644 (file)
@@ -28,7 +28,7 @@ implement a
 .IR "packet buffer" .
 Given unpredictably-sized chunks of data, the packet buffer extracts
 completed packets of data, with sizes ascertained by a handler
-function. 
+function.
 .PP
 The state of a packet buffer is stored in an object of type
 .BR pkbuf .
@@ -78,7 +78,7 @@ This function is given three arguments: a pointer
 .I pk
 to a packet buffer structure; a pointer
 .I p
- to a chunk of data to read; and the size
+to a chunk of data to read; and the size
 .I sz
 of the chunk of data.  The data is pushed through the packet buffer and
 any complete packets are passed on to the packet handler.
@@ -88,11 +88,11 @@ The complex interface is the pair of functions
 and
 .IR pkbuf_flush .
 .PP
-The 
+The
 .B pkbuf_free
 function returns the address and size of a free portion of the packet
 buffer's memory into which data may be written.  The function is passed
-the address 
+the address
 .I pk
 of the packet buffer.  Its result is the size of the free area, and it
 writes the base address of this free space to the location pointed to by
@@ -128,7 +128,7 @@ each one in turn to the packet-handler function.
 The
 .B pkbuf_snarf
 function is trivially implemented in terms of the more complex
-.B pkbuf_free / pkbuf_flush
+.BR pkbuf_free / pkbuf_flush
 interface.
 .SS "Packet breaking and the handler function"
 The function
@@ -191,18 +191,18 @@ the object so that it doesn't see any more data.
 .PP
 Clearly, since an
 .B pkbuf_flush
-call can emit more than one packet, so it must be aware that the packet
+call can emit more than one packet, it must be aware that the packet
 handler isn't interested in any more packet.  However, this fact must
 also be signalled to the higher-level object so that it can detach
 itself from its data source.
 .PP
 Rather than invent some complex interface for this, the packet buffer
-exports one of its structure members,
-.BR flags .
+exports one of its structure members, a flags words called
+.BR f .
 A higher-level object wishing to disable the packet buffer simply clears
 the bit
 .B PKBUF_ENABLE
-in the flags word.
+in this flags word.
 .PP
 Disabling a buffer causes an immediate return from
 .BR pkbuf_flush .
@@ -222,4 +222,4 @@ general
 .BR selpk (3),
 .BR mLib (3).
 .SH "AUTHOR"
-Mark Wooding, <mdw@nsict.org>
+Mark Wooding, <mdw@distorted.org.uk>