Commits


convert telescope to use ev instead of libevent libevent is a very cool library, I like the APIs and enjoy using it. However, telescope is not as large and doesn't have as many file descriptor, so libevent is quite ``too big'' for our needs. ev started as a small event loop on top of poll(2) for amused, and can be used here too, it just needed to grow the ability to handle several timers, as we need quite some on telescope (in fact, we use more timers than fds!)


support gopher urls for search; document default-search-engine


add cmd_search to search using a search engine This adds a new command `search', bound by default to `s', that prompts for a query and loads and consult the ``oracle'' (the search engine) using default_search_engine (which will be made customizable.) It also temporarly supports only gemini URLs. Feature requested by -fab-, thanks!


add client_cert_temp flag to the struct tab This way we can improve unload-certificate prompt. While here, move the cert handling in make_request().


some headers cleanup try to not include headers from headers, and remove some redundant include. This helps in modularizing the codebase and also helps during incremental compilations.


add unload-certificate to stop using a certificate


include cmd.h only where it is really needed


add client-certificate-info


load and optionally remember client certificates This adds use-certificate, a user function to start using a certificate or switch to a different one. It asks whether to persist the certificate, if not it will only be used for the current session. use-certificate is implicitly called when the server replies with a 6x status code.


make cmd_home more robust look exactly for /~user/, not just for a tilde that happens to be inside the path like~this.


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.


actually implement cmd_home


add the up, root and home commands These navigates respectively one level up in the path hierarchy, to the root directory and to the "home". The home is considered to be the first path component in the form of ~username. `home' is yet to be implemented.


start to refactor the rendering Previously each vline (visual line) had a full copy of its associated string, this changes it so it only slices a part of the parent line. Reduces significantly the memory usage. This actually worsen the emojify-link glitch reported by Freezr after the some recent refactoring in the wrapping code. Not a big deal since I'm about to restructure the whole rendering bit by bit (hopefully!)


replace has_prefix with strncmp