diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2015-07-31 21:06:52 +0200 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2015-07-31 21:12:07 +0200 |
commit | 356e7d79925f91b9b703ee63e3680694c53a59a4 (patch) | |
tree | bc06b59ee637c2695055b62221abad696d66eb7c /util.h | |
parent | eb586eda26967183de91c314a57d323b124110bb (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.h | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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 *); |