summaryrefslogtreecommitdiff
path: root/sfeed.c
AgeCommit message (Collapse)Author
2016-08-06gettzoffset: simplify, default is 0 so remove UTC zones to checkHiltjo Posthuma
2016-04-18simplify sfeed(5) format, remove feedtype alsoHiltjo Posthuma
Remove type of feed per item, it is not that interesting. sfeed(1) can parse both RSS and Atom feeds.
2016-04-10absuri, encodeuri: make encodeuri static, change argument orderHiltjo Posthuma
2016-04-10strtotime: improveHiltjo Posthuma
use long long: atleast 32-bit, but now time_t (real) to 32-bit or 64-bit is supported. Long long is C99 though, but that is fine. check errno, it can have ERANGE.
2016-04-10small style fixHiltjo Posthuma
2016-04-03fix warning: return early, fixes bogus end NULL dereference warningHiltjo Posthuma
2016-04-03just initialize to zero, no need for memsetHiltjo Posthuma
2016-03-29add time parsing to sfeed itself, remove time fieldHiltjo Posthuma
- less overhead (we only need GMT time) so no setenv("TZ", ...) tzset() crap. - timezone format (for example %z in strptime) is non-standard, this will add some lines of code and some complexity to our code though, but the trade-off is worth it imho.
2016-03-27time experimentHiltjo Posthuma
2016-03-21check for tagid == TagUnknown, bit more clearHiltjo Posthuma
2016-03-20code cleanup: put table of parsed tagid at top (near reverse table)Hiltjo Posthuma
2016-03-20fix crash with repeated <link href=""> tags in Atom feedsHiltjo Posthuma
add some detail to the comments
2016-03-19don't use temporary pointer for realloc, it will exit on errorHiltjo Posthuma
2016-03-10remove cast of unused variablesHiltjo Posthuma
2016-03-04remove optimization with no effect, makes the code cleanerHiltjo Posthuma
2016-03-02sfeed: no need to call strlen, we know the length alreadyHiltjo Posthuma
2016-02-27various improvementsHiltjo Posthuma
- 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.
2016-02-27check <author><name> tag case-insensitively, just like the restHiltjo Posthuma
2016-02-27consistency: check snprintf result == -1Hiltjo Posthuma
2016-02-27remove some unneeded checksHiltjo Posthuma
2016-01-31Revert "sfeed: realloc, faster near pow 2 bufsiz"Hiltjo Posthuma
This reverts commit 5e43bd658e578ced54f6065e95f6efb4892e114c. It is a neat bit trick, but it doesn't matter much in thiscase and it's less readable and possibly less portable.
2016-01-31sfeed: realloc, faster near pow 2 bufsizHiltjo Posthuma
2016-01-31code-styleHiltjo Posthuma
2015-10-04sfeed: fix ctype functions againHiltjo Posthuma
2015-10-02sfeed: fix escape of backslash, simplifyHiltjo Posthuma
2015-10-02dont used deprecated timegm, use mktime with TZ set to UTCHiltjo Posthuma
this also makes it compile on NetBSD
2015-10-02update README, fix some typos and wordingHiltjo Posthuma
2015-08-23sfeed: use separate enum field for content fieldsHiltjo Posthuma
2015-08-23simplify unknown or less priority tag case, fix gettag bug (wrong sort order)Hiltjo Posthuma
2015-08-23simplify field map code (add list tagid -> field.Hiltjo Posthuma
also: - parse tag media:description for RSS. - be more strict about using the order of fields, this is more consistent now. - remove buffer_init: don't allocate buffers on start. - realloc, be slightly more aggresive with memory allocating: initial buffer size 16 to 64 bytes.
2015-08-22xml: simplify XML readerHiltjo Posthuma
2015-08-22sfeed: use <title>, it is required, never use media:titleHiltjo Posthuma
2015-08-22use HOST_NAME_MAX for hostnameHiltjo Posthuma
2015-08-21sfeed: xml_entitytostr returns ssize_tHiltjo Posthuma
2015-08-16code-style, wrap some lines, etcHiltjo Posthuma
2015-08-14minor code-style improvementsHiltjo Posthuma
2015-08-14xml: separate reader context from parserHiltjo Posthuma
also: - rename xmlparser_ prefix to xml_. - make xml_parse public, this allows a custom reader like a direct mmap, see: XMLParser.getnext and (optionall) XMLParser.getnext_data. - improve the README text.
2015-08-08Revert "sfeed: set TZ=UTC at start, use mktime() not the deprecated timegm()."Hiltjo Posthuma
Some libc implementations like musl provide a heavy optimized version of timeg() which mktime() cannot provide. We use -D_BSD_SOURCE anyway (also for strlcpy, strlcat), so just keep using this for now. This reverts commit f7c579c3b8e77215d60f1948367221b738823585.
2015-08-08sfeed: use snprintf -> strlcpy for some caseHiltjo Posthuma
2015-08-07sfeed: set TZ=UTC at start, use mktime() not the deprecated timegm().Hiltjo Posthuma
... timegm() is also -D_BSD_SOURCE.
2015-08-07sfeed: only handle tags in HTML content, strip tags from type "text"Hiltjo Posthuma
2015-08-06sfeed: proper sort order for comparing tagHiltjo Posthuma
2015-08-06general cleanupsHiltjo Posthuma
2015-08-06sfeed: fix, skip milliseconds for: %Y-%m-%dT%H:%M:%S.000ZHiltjo Posthuma
2015-08-05sfeed: minor cleanupHiltjo Posthuma
2015-08-05sfeed: gettag: simplifyHiltjo Posthuma
2015-08-05sfeed: consistency, use XMLParser instead of struct xmlparserHiltjo Posthuma
2015-08-05sfeed: cleanup code a bit, shorten element to el + cleanupHiltjo Posthuma
- end element, restructure control flow - simplify and some code cleanups
2015-08-02sfeed: add support for media:description and media:title (used by youtube et al)Hiltjo Posthuma
2015-08-02sfeed: cleanup a bit and improve checking if in contentHiltjo Posthuma