This is useful if we want to use the parser when we cannot walk through
the file line by line.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
return td_file_walk(self, __td_file_parse, parser);
}
+int td_file_parse_line(td_file* self, td_file_parser* parser, char* line, size_t length) {
+ return __td_file_parse(self->ctx, self, 0, line, length, parser);
+}
+
int td_read_uint64(td_ctx* ctx, const char* path, uint64_t* number) {
td_file* file = NULL;
int r;
{ .s = _s, .n = 4, .v1 = _v1, .v2 = _v2, .v3 = _v3, .v4 = _v4 }
int td_file_parse(td_file* self, td_file_parser* parser);
+int td_file_parse_line(td_file* self, td_file_parser* parser, char* line, size_t length);
// Shorthands