]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: tools: add fgets_from_mem
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Mon, 5 Aug 2024 08:03:46 +0000 (10:03 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 7 Aug 2024 16:41:41 +0000 (18:41 +0200)
commit007f7f2f0243384c941bd8bcb93bf022d0dae9a2
tree771f975b5c15ac331bf4cf860f6091bf9b4f5b81
parent03e63b98ca1bb9c3b706eac01529c3834917a10f
MINOR: tools: add fgets_from_mem

Add fgets_from_mem() helper to read lines from configuration files, stored now
as memory chunks. In order to limit changes in the first-level parser code
(readcfgfile()), it is better to reimplement the standard fgets, i.e. to
have a fgets, which can read the serialized data line by line from some memory
area, instead of file stream, and can keep the same behaviour as libc
implementations fgets.
include/haproxy/tools.h
src/tools.c