Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

20 lines
698 B

  1. .TH buffer_getline 3
  2. .SH NAME
  3. buffer_getline \- read line from buffer
  4. .SH SYNTAX
  5. .B #include <buffer.h>
  6. int \fBbuffer_getline\fP(buffer* \fIb\fR,char* \fIx\fR,unsigned int \fIlen\fR);
  7. .SH DESCRIPTION
  8. buffer_getline copies data from \fIb\fR to \fIx\fR[0], \fIx\fR[1], ...,
  9. \fIx\fR[\fIlen\fR-1] until \fIlen\fR bytes have been copied or a
  10. new-line character ('\\n') is encountered. That character is also
  11. copied.
  12. Note that line is not 0-terminated to make reading lines with 0-bytes
  13. possible through this interface.
  14. .SH "RETURN VALUE"
  15. Number of bytes read (without '\\n'), -1 on error (setting \fIerrno\fR).
  16. .SH "SEE ALSO"
  17. buffer_init(3), buffer_feed(3), buffer_peek(3), buffer_seek(3), buffer(3)