line_parse - simple C line parser without context
#include "line.h"
typedef int line_cb_t(char *, size_t, void *);
int line_parse(int fd, line_cb_t *line_cb, void *data);
line_parse is a simple C line parser function without context.
It reads and parses data from file descriptor fd. Then it calls back line_cb function when an end-of-line is met.
test-line.c is a good example of how to use the line_parse function.
Written by Vivien DIDELOT vivien.didelot@savoirfairelinux.com and Gaël PORTAY gael.portay@savoirfairelinux.com
Copyright (c) 2017 Vivien DIDELOT and Gaël PORTAY
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.