buffer_getline(3diet)

buffer_getline3diet

Read line from buffer

Usage

#include <buffer.h>

ssize_t buffer_getline(buffer* b,char* x,size_t len);

Overview

buffer_getline copies data from b to x[0], x[1], ..., x[len-1] until len bytes have been copied or a new-line character ('\n') is encountered. That character is also copied.

Note that line is not 0-terminated to make reading lines with 0-bytes possible through this interface.

Return value

Number of bytes read (without '\n'), -1 on error (setting errno).

Releases

4 releases since Debian 3.1 (Sarge); the text changed 2 times.

  1. 3.1
  2. 4.0
  3. 5.0–6.0

From libowfat-dev 0.28-2 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.