chiark / gitweb /
fileio: add new helper call read_line() as bounded getline() replacement
authorLennart Poettering <lennart@poettering.net>
Fri, 22 Sep 2017 15:55:53 +0000 (17:55 +0200)
committerSven Eden <yamakuzure@gmx.net>
Mon, 25 Sep 2017 12:40:23 +0000 (14:40 +0200)
commite269048bf8b638a5fa8451fdfae104d353a208be
tree413cdfb740b5bc2c6dad74b19d314fdc6be791c2
parent346e1907ca4800b8998c40138f9f2c1fcd53891b
fileio: add new helper call read_line() as bounded getline() replacement

read_line() is much like getline(), and returns a line read from a
FILE*, of arbitrary sizes. In contrast to gets() it will grow the buffer
dynamically, and in contrast to getline() it will place a user-specified
boundary on the line.
src/basic/fileio.c
src/basic/fileio.h