Commits


copyright years++


don't have the config being a global


switch to the more usual log.c


rename log.[ch] to logger.[ch]


provide a more usual fatal fatal usually appends the error string. Add 'fatalx' that doesn't. Fix callers and move the prototypes to log.h


retire the deprecated `mime' and `map' config options


make the mime types fixed-sized too


copyright years


hardcode the mapping text/gemini -> .gmi/.gemini It's still possible to override this automatic mapping by just adding an entry like application/octet-stream gemini gmi in the `types' block.


sort the MIME mappings and do a binary search to match


allow add_mime to fail add_mime nows allocate dinamically copies of the passed strings, so that we can actually free what we parse from the config file. This matters a lot especially with lengthy `types' block: strings that reach the internal mapping are never free'd, so every manual addition is leaked.


const-ify some tables matches found with % grep -R '=[ ]*{' . | fgrep -v const


missing comma ,


use `text/x-patch' for .patch and .diff files


fix various compilation errors Include gmid.h as first header in every file, as it then includes config.h (that defines _GNU_SOURCE for instance). Fix also a warning about unsigned vs signed const char pointers in openssl.