getln(3)

getln3

Read one line of data

Usage

#include <getln.h>

int getln(&ss,&sa,&match,sep);

substdio ss;
stralloc sa;
int match;
int sep;

Overview

getln reads a line of characters, terminated by a sep character, from ss. It returns the line in sa and sets match to 1.

If getln sees end-of-input before it sees sep, it returns the partial line in sa and sets match to 0.

getln normally returns 0. If it runs out of memory, or encounters an error from ss, it returns -1, setting errno appropriately.

Releases

Unchanged in 4 releases since Debian 7 (Wheezy).

  1. 7–10

From qmail 1.06-6.2~deb10u1 in Debian 10 (Buster). Parsed by carta from the page's man source.