X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib/blobdiff_plain/83af686b3f8fa028e75e3bd6c3babef4c143ddbe..cededfbe1efb12e68c1defe008f1d69d97f4cbe3:/man/selbuf.3 diff --git a/man/selbuf.3 b/man/selbuf.3 index bedae52..e15beaa 100644 --- a/man/selbuf.3 +++ b/man/selbuf.3 @@ -11,11 +11,13 @@ selbuf \- line-buffering input selector .BI "void selbuf_enable(selbuf *" b ); .BI "void selbuf_disable(selbuf *" b ); +.BI "void selbuf_setsize(selbuf *" b ", size_t " sz ); .BI "void selbuf_init(selbuf *" b , .BI " sel_state *" s , .BI " int " fd , .BI " void (*" func ")(char *" s ", void *" p ), .BI " void *" p ); +.BI "void selbuf_destroy(selbuf *" b ); .fi .SH DESCRIPTION The @@ -31,7 +33,7 @@ what gets considered to be a line of text and what doesn't, and the exact rules about what your line handling function should and shouldn't do. .PP -All the data for a +The data for a .B selbuf selector is stored in an object of type .BR selbuf . @@ -88,6 +90,15 @@ queued up from the last I/O operation: it doesn't necessarily wait for the next .B sel_select call. +.PP +The line buffer has a finite amount of memory for reading strings. The +size of this buffer is set by calling +.B selbuf_setsize +with the requested size. The default buffer size is 256 bytes. +.PP +When it's finished with, a line buffer selector must be destroyed by +calling +.BR selbuf_destroy . .SH "SEE ALSO" .BR lbuf (3), .BR sel (3),