Commit Briefs


Omar Polo

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!)


Omar Polo

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.


Omar Polo

fmt



Omar Polo

guard against wprintw(window, "%.*s", 0, NULL)

even if textlen is zero, it still complains in syslog that the string passed is NULL (which kind of makes sense actually.)


Omar Polo

first draft of client certificate support

At the moment telescope loads a mapping host:port/path -> certificate from a file and always uses it, no ways to change it, use a temporary one, generate a new one, etc are provided yet. The format of ~/.telescope/certs/certs is host port path certificate file name where the certificate file name is the name of a file inside ~/.telescope/certs. ~/.telescope/certs/ is ~/.local/share/telescope/ when using XDG.


Omar Polo

removed -C/--colours flag


Omar Polo

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.


Omar Polo

don't strlcat in a loop

not that of a big deal, but since we memset() at the start, just add the spaces directly instead of using strlcat. saves some cpu cycles.


Omar Polo

fix wrapping of link lines


Omar Polo

fix comment


Omar Polo

add missing void to please clang


Omar Polo

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!)