summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2014-06-27 15:42:53 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2014-06-27 15:42:53 +0200
commitf6a0aabfa27e19ad57823e104db7eac1252e6f1f (patch)
treee69a3f3c6e14a2b566a18e19710e7f01b30c4dba /util.c
parent5acace38c73074fa08c8b44d1109cfc9c6b0d66e (diff)
small fixes
reorder static -> public xml functions. Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
Diffstat (limited to 'util.c')
-rw-r--r--util.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/util.c b/util.c
index 4f4a332..776a579 100644
--- a/util.c
+++ b/util.c
@@ -76,6 +76,12 @@ printlink(const char *link, const char *baseurl, FILE *fp) {
fputs(link, fp);
}
+/* read a field-separated line from 'fp',
+ * separated by a character 'separator',
+ * 'fields' is a list of pointer with a maximum size of 'maxfields'.
+ * 'line' buffer is allocated using malloc, 'size' will contain the
+ * allocated buffer size.
+ * returns: amount of fields read. */
unsigned int
parseline(char **line, size_t *size, char **fields,
unsigned int maxfields, int separator, FILE *fp)