With this fix combined with fix to libsixel:
https://github.com/saitoha/libsixel/pull/170
browsing on slow machines (e.g., when floating-point calculation is
emulated by kernel) gets significantly speed up.
Note that if i->cache->a_width (i->cache->a_height) is zero, width
(height) should be set to zero. Otherwise, image in screen boundary
(i.e., partially displayed) becomes strangely resized.
Let's at least ensure that the source builds without warnings.
The build image used, Ubuntu, spits out quite some warnings about
ignored return values. Use '-Wno-unused-result' for now.
The configure options are chosen to resemble the default Debian version.
With this patch applied the user can configure a directory to store
temporary/cache files. The history and cookies remain in RC_DIR.
I suppose the intent of writing the history to a temp file first is to
make the actual write an atomic operation. As rename() does not work
across mount points, we need to handle the temp file for the history
different to keep this behaviour.
Add a new type for the temp history file and handle this case different
when creating a temp file.
The if clause is true if cache is NULL. man 3 fclose says:
The behaviour of fclose() is undefined if the stream parameter is an
illegal pointer, or is a descriptor already passed to a previous invo‐
cation of fclose().
Check if cache is NULL before calling fclose().
This if is only true if both strchr return NULL, making sure that *q is
a NULL dereference.
The intention was to remove trailing '>' (or '\t') from the message-id
(p) for add_news_message().
Adjust the condition.
If, while adding the link number, we detect that we need to flush the
line, the anchor will be broken. When returning to the last breakpoint
only the link number will be removed, the internal anchor reference '<a
hseq=... >' remains on the flushed line.
Instead of adding the link number in a separate operation, check if we
just processed an anchor tag and prepend the current token with the link
number.
Fix all reported warnings when -Wall is enabled and enable -Wall by default. While there, move OPTS to end of CFLAGS. This allows the user to override default options.