summaryrefslogtreecommitdiff
path: root/util.h
AgeCommit message (Collapse)Author
2019-07-04util: struct feed: remove old unused fields and tiny code-styleHiltjo Posthuma
2019-04-14sfeed: add support for the first enclosure of an itemHiltjo Posthuma
This is useful for example for podcasts (audio attachment), newsposts (usually some image) or comic strips (link to page, image as enclosure). thanks leot for the feedback!
2018-10-08util.h: remove unused macro ISUTF8()Hiltjo Posthuma
2018-10-05Makefile: just use OpenBSD #ifdef for pledge(2)Hiltjo Posthuma
2018-03-11sfeed_tail improvementsHiltjo Posthuma
keep sfeed_tail until sfeed is reworked to support tail -f (eventually)
2017-12-09sfeed_mbox: move murmur to this file, cleanupHiltjo Posthuma
2017-04-27simplify pledge stub: add to util.hHiltjo Posthuma
2016-08-06add USE_PLEDGE, remove pledge dummy functionHiltjo 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-03-29remove time fieldHiltjo Posthuma
2016-02-27fix missing includes for uint32_t and time_tHiltjo 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-01-31always add strlcpy, strlcat, remove COMPAT #ifdefHiltjo Posthuma
The overhead for OpenBSD is minimal. I will periodically sync from OpenBSD libc.
2015-10-04portability: dont use HOST_NAME_MAX, just use 256 as maximumHiltjo Posthuma
2015-09-09util.h: HOST_NAME_MAX+1 for nul-terminatorHiltjo 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_opml_import: does not need util but may need compat.h for strlcpy, strlcatHiltjo Posthuma
2015-08-22use HOST_NAME_MAX for hostnameHiltjo Posthuma
2015-08-22util: support ipv6 address, parse port separatelyHiltjo Posthuma
2015-08-02util: simplify parseline() and check t for strtotime().Hiltjo Posthuma
2015-08-02refactor print, decodefield into xmlencodeHiltjo Posthuma
... put specific formatting-logic per program (printcontent()).
2015-07-31Various improvementsHiltjo Posthuma
- 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.
2015-07-28util: rewrite uri parserHiltjo Posthuma
- don't print directly but use an internal buffer (also better for testing). - encode uri when printing (security). - add some comments.
2015-06-21improvementsHiltjo Posthuma
2015-05-25util.h: add LEN() macroHiltjo Posthuma
2015-05-24sfeed_frames and util cleanupHiltjo Posthuma
- remove xerr and xerrx, assume the OS closes and flushes file descriptors on OS process exit. - move esnprintf, printcontent to util.
2015-05-16util: parseline can return error, unsigned int -> intHiltjo Posthuma
2015-01-05add and use BSD queue.h, cleanupHiltjo Posthuma
2015-01-03code styleHiltjo Posthuma
2015-01-02trim stringHiltjo Posthuma
2015-01-02improve compatHiltjo Posthuma
2015-01-02compat: separate compat stuff, strlcpy atmHiltjo Posthuma
2014-11-11code style, use actual column width of charHiltjo Posthuma
2014-11-11move printutf8padded to utilHiltjo Posthuma
2014-05-13cleanup, tested with tccHiltjo Posthuma
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-03-31new versionHiltjo Posthuma
lots of things changed, but cleanup todo. changelog and consistent stream of small updates will come in the future. Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>