Commits


inline dispatch_imsg(); start to use some newer imsg api


save finger:// and gopher:// URLs to the history gemini is handled when the 2x reply is received. Gopher and Finger lack an equivalent, so call history_add() for them at EOF.


cache finger pages as well


removed -C/--colours flag


rework the history management It was a huge pile of spaghetti with useless utility functions and lots of code reaching into the "data structure" (if you can call it so) to do stuff. Instead, provide a "module" with a clean interface and noone reaching in the insides.


attempt to fix relative URLs Was broken in 2590504796 with the switch to the new APIs. The previous implementation accepted a parsed URL as base, while the new one takes a string and we pass NULL when we want to refer to the current URL...


use the new imsg_get_data() in a few places


fix handling of redirects with relative URLs


add default-protocol knob So that now one can decide to assume a finger:// or gopher:// protocol instead of gemini:// for load-url.


use iri_setport instead of reaching into the struct iri


convert the remainig uses of phos_uri to the iri API


move cwd to fs.c


apply load-url-use-heuristic for command line arguments too This semplifies a bit the handling. humanify_url() now takes the base URL which we can then use when not using the heuristics. Command-line arguments now take an implicit base of <file://$PWD/> when the heuristics are disabled, so that foo.gmi resolves to the local file even without <./>. See github issue #10.


convert humanify_url to iri APIs


make do_load_url and friends return void The 0/1 difference was once important since it would give the caller an idea whether the page was loaded immediately or asynchronously. This doesn't matter anymore. Furthermore, this whole family of function can't really fail (as telescope doesn't handle memory allocation failures gracefully.)