Introduce a separate TU for utility functions util.c. Add a function
exec_cmd to simplify execution of system commands with error handling.
While at it, suppress a warning about unused result when executing a
shell command. As we only display the command's output we do not care
about the exit code.
This fixes Debian bug #398989[0]
[0]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=398989
GCC 12.2.0 on Arch reports:
.table.c: In function ???set_table_matrix0???:
.table.c:3536:5: error: ???__builtin_memset??? specified size between
18446744071562067969 and 18446744073709551615 exceeds maximum object
size 9223372036854775807 [-Werror=stringop-overflow=]
lto1: all warnings being treated as errors
lto-wrapper: fatal error: gcc returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
child exited with value 1
make: *** [Makefile:132: w3m] Error 1
The function `unsigned char *MD5(const unsigned char *d, size_t n,
unsigned char *md)` from OpenSSL is deprecated and therefore generates
lots of warnings in the build when compiling against OpenSSL 3.0.
Do not treat these warnings as errors, but keep the warning active. This
should be reverted once OpenSSL-3.0 support arrives.
* Translating Documentation
* Create README.SSL from doc-jp
* Clarified wording on some functions
* Clarified English in README.img
* Created README.keymap
* Translated README.menu
* Minor grammar changes
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.