linux-scalability-benchmarks / libowfat / buffer / buffer_getn.3

The default branch has multiple heads

.TH buffer_getn 3
.SH NAME
buffer_getn \- read binary data from buffer
.SH SYNTAX
.B #include <buffer.h>

ssize_t \fBbuffer_getn\fP(buffer* \fIb\fR,char* \fIx\fR,size_t \fIlen\fR);
.SH DESCRIPTION
buffer_getn copies data to \fIx\fR[0], \fIx\fR[1], ...,
\fIx\fR[\fIlen\fR-1] from the buffer, calling buffer_feed as needed, and
returns \fIlen\fR.

If a read error occurs, buffer_getn returns -1 and sets \fIerrno\fR
appropriately.  It may then have put any number between 0 and \fIlen\fR
in the buffer, you can't tell.  That makes this function only useful if
you don't care when an error occurs.  Use buffer_get otherwise.

If the read operation signals end-of-file before \fIlen\fR bytes were
read, buffer_getn returns the number of bytes read from the buffer
before end-of-file.
.SH "SEE ALSO"
buffer_init(3), buffer_get(3), buffer(3)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.