diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2016-02-27 16:21:30 +0100 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2016-02-27 16:21:30 +0100 |
commit | 13927fc6083c3d134e456ccfafb953c6cea17662 (patch) | |
tree | e34286bfbef190e29a49ed8a12fd5565d7e36f1a /sfeed_opml_import.c | |
parent | fc6c2a381742aba4deaf8538fa2c85750361a2d9 (diff) |
various improvements
- pledge tools and add define to enable it on platforms that support it, currently
only OpenBSD 5.9+
- separate getline and parseline functionality.
- use murmur3 hash instead of jenkins1: faster and less collisions.
- make some error messages a bit more clear, for example with path truncation.
- some small cleanups, move printutf8pad to util.
Diffstat (limited to 'sfeed_opml_import.c')
-rw-r--r-- | sfeed_opml_import.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sfeed_opml_import.c b/sfeed_opml_import.c index ce6df5b..bf1a742 100644 --- a/sfeed_opml_import.c +++ b/sfeed_opml_import.c @@ -1,4 +1,5 @@ #include <ctype.h> +#include <err.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> @@ -84,6 +85,9 @@ xml_handler_attrentity(XMLParser *p, const char *tag, size_t taglen, int main(void) { + if (pledge("stdio", NULL) == -1) + err(1, "pledge"); + parser.xmlattr = xml_handler_attr; parser.xmlattrentity = xml_handler_attrentity; parser.xmltagend = xml_handler_end_element; |