summaryrefslogtreecommitdiff
path: root/man/buffer.3
diff options
context:
space:
mode:
authorJannis Hoffmann <jannis@fehcom.de>2024-09-28 17:13:21 +0200
committerJannis Hoffmann <jannis@fehcom.de>2024-09-28 17:13:21 +0200
commit4ab19268268cd96b9706625d42a16d2a629134eb (patch)
tree0894a92709675955abb1b15647e8fe2911d89c7f /man/buffer.3
parent96cf8dffe4f7b0b910f790066ae622dc429eb522 (diff)
update to version 25
Diffstat (limited to 'man/buffer.3')
-rw-r--r--man/buffer.310
1 files changed, 7 insertions, 3 deletions
diff --git a/man/buffer.3 b/man/buffer.3
index 2d4d0d2..331c32e 100644
--- a/man/buffer.3
+++ b/man/buffer.3
@@ -31,9 +31,9 @@ int \fBbuffer_flush\fP(buffer *\fIb\fR);
.br
int \fBbuffer_copy\fP(buffer *\fIbo\fR,buffer *\fIbi\fR);
-int \fBbuffer_unixread\fP(int \fIfd\fR,char *\fIbuf\fR,size_t \fIlen\fR);
+ssize_t \fBbuffer_unixread\fP(int \fIfd\fR,char *\fIbuf\fR,size_t \fIlen\fR);
.br
-int \fBbuffer_unixwrite\fP(int \fIfd\fR,char *\fIbuf\fR,size_t \fIlen\fR);
+ssize_t \fBbuffer_unixwrite\fP(int \fIfd\fR,char *\fIbuf\fR,size_t \fIlen\fR);
.SH DESCRIPTION
.B buffer.h
describes a generic buffer interface that can be used for
@@ -111,13 +111,17 @@ fills all available space with data before calling
copies one buffer to other one.
The output buffer needs to have at least the
preallocated size of the input buffer.
+
.B buffer_unixread
and
.B buffer_unixwrite
perform the same operation like standard Unix
.B read
or
-.BR write.
+.B write
+however provide the function return signature
+.IR ssize_t
+required to be used with the buffer interface.
.SH MACROS
Apart from this basic usage, some helpful macro
definitions are provided: