summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2015-07-31 21:06:52 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2015-07-31 21:12:07 +0200
commit356e7d79925f91b9b703ee63e3680694c53a59a4 (patch)
treebc06b59ee637c2695055b62221abad696d66eb7c /util.h
parenteb586eda26967183de91c314a57d323b124110bb (diff)
Various improvements
- Only escape characters in "content" field, these can contain newlines. - Trim newlines and tabs, etc from the title, id and author fields. - Make decodefield, xmlencode functions easier to "chain" without allocatting new buffers. - Move printutf8pad from util (only used by sfeed_plain) to sfeed_plain. - Update README, still need to update the man-page and improve the documentation in general. - Code cleanup.
Diffstat (limited to 'util.h')
-rw-r--r--util.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/util.h b/util.h
index 1cc0983..84450f7 100644
--- a/util.h
+++ b/util.h
@@ -26,15 +26,13 @@ enum { FieldUnixTimestamp = 0, FieldTimeFormatted, FieldTitle, FieldLink,
FieldLast };
int absuri(const char *, const char *, char *, size_t);
+void decodefield(const char *, FILE *, int (*)(int, FILE *));
int encodeuri(const char *, char *, size_t);
int parseline(char **, size_t *, char **, unsigned int, int, FILE *);
int parseuri(const char *, struct uri *, int);
-void printcontent(const char *, FILE *);
-void printxmlencoded(const char *, FILE *);
-void printutf8pad(FILE *, const char *, size_t, int);
+void print(const char *, FILE *, int (*)(int, FILE *));
int strtotime(const char *, time_t *);
-char * trimstart(const char *);
-char * trimend(const char *);
char * xbasename(const char *);
+int xmlencode(int, FILE *);