Commit Briefs

Omar Polo

parsers: add serialize function

Add a parser_serialize function and an optional function `serialize' for parsers. The default implementation just prints the text line, which is suitable for parser_textplain and parser_textpatch; gemtext and gophermap uses their own specific unparse functions. This is intended for an incoming cache refactoring: we'll cache the page serialized in the correct format, not once it has been translated to gemtext. This will allow in the future to provide commands such as ``save page to disk'' or interface with an on-disk cache.


Omar Polo

move util.c declarations in utils.h

it's not spelled `util.h' because otherwise it'd get included instead of /usr/include/util.h



Omar Polo

[gopher] prevent crash on malformed item lines

initialize selector, address and port to "" to prevent a NUL deferencing on emit_line


Omar Polo

replace TAILQ_EMPTY/INSERT_HEAD/TAIL dance with a single TAILQ_INSERT_TAIL

Now that all the queues are correctly initialised, there's no need for that dance.


Omar Polo

initialize all the queues


Omar Polo

initial gophermaps support