From bcf06b0c94483291a280c82242ecbd634cb3a921 Mon Sep 17 00:00:00 2001 From: javiplx@gmail.com Date: Tue, 26 Apr 2011 09:45:15 -0400 Subject: Introduce a specific pointer typedef for parse_line functions git-svn-id: http://opkg.googlecode.com/svn/trunk@620 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- (limited to 'libopkg/parse_util.h') diff --git a/libopkg/parse_util.h b/libopkg/parse_util.h index d1aba4c..26e2d5b 100644 --- a/libopkg/parse_util.h +++ b/libopkg/parse_util.h @@ -18,13 +18,14 @@ #ifndef PARSE_UTIL_H #define PARSE_UTIL_H -#include "pkg.h" - 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); -int parse_from_stream_nomalloc(pkg_t *pkg, FILE *fp, uint mask, +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); +#define EXCESSIVE_LINE_LEN (4096 << 8) + #endif -- cgit v0.9.1