libopkg: do not rely on getline()
[oweals/opkg-lede.git] / libopkg / parse_util.h
index e4e2abef134bc0d624f8d20c61dc501d18cd30d5..3263509814dd95931b45436418dbd89e2f02477d 100644 (file)
@@ -22,4 +22,8 @@ int is_field(const char *type, const char *line);
 char *parse_simple(const char *type, const char *line);
 char **parse_list(const char *raw, unsigned int *count, const char sep, int skip_field);
 
+typedef int (*parse_line_t)(void *, const char *, uint);
+int parse_from_stream_nomalloc(parse_line_t parse_line, void *item, FILE *fp, uint mask,
+                                               char **buf0, size_t buf0len);
+
 #endif