Commit Graph

2384 Commits

Author SHA1 Message Date
Tatsuya Kinoshita
54fb5fa186 Update ChangeLog 2023-01-06 19:44:13 +09:00
Tatsuya Kinoshita
dbb708c56f Avoid locale sensitive tolower in wc_charset_to_ces 2023-01-06 19:42:04 +09:00
Sertaç Ö. Yıldız
df0325c01e Fix charset declaration parser fails with turkish locale 2023-01-06 19:41:43 +09:00
Sertaç Ö. Yıldız
162d585f37 Use st_mtime instead of st_mtim.tv_sec to compile on macos 2023-01-06 19:41:36 +09:00
Tatsuya Kinoshita
bbe2a76b5d Merge pull request #259 from rkta/dfn
Recognize link targets in dfn elements
2023-01-06 19:39:20 +09:00
Tatsuya Kinoshita
4ae311f02a Merge pull request #257 from rkta/failed_system_call
Handle failed system calls
2023-01-06 19:38:58 +09:00
Tatsuya Kinoshita
13e5c361cb Merge pull request #256 from rkta/softhyphen
Skip soft hyphen when reading token
2023-01-06 19:38:36 +09:00
Tatsuya Kinoshita
d8b820d6cb Merge pull request #254 from rkta/check_lessopen
Check LESSOPEN to avoid undefined behaviour
2023-01-06 19:38:13 +09:00
Tatsuya Kinoshita
8cafc619c1 Update ChangeLog 2023-01-05 20:05:19 +09:00
Markus Hiereth
7ff3210f99 Update German message catalogue
Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1011945#10
2023-01-05 20:03:29 +09:00
Rene Kita
07bccf3e36 Exit with error if a new buffer can't be allocated
When building with gcc and -Wnull-dereference, -O3 and -flto we get a
lot of warnings about potential null dereferences. Exiting instead of
returning NULL solves all of it.

If we cannot alloc memory, there is not much to do - exiting is the
easiest option.
2023-01-05 20:03:14 +09:00
Tatsuya Kinoshita
3750197410 Merge pull request #247 from rkta/hist
Do not override history file if it was changed
2023-01-05 20:02:07 +09:00
Tatsuya Kinoshita
c56a66a93d Merge pull request #238 from albfan/w3mman
Turn ansi escape sequences into html tags
2023-01-05 20:01:30 +09:00
Rene Kita
4e23ee03ca Handle failed system calls
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
2023-01-04 13:59:49 +01:00
Rene Kita
7c7af9e70c Move declarations to appropiate header files
This is in preparation for the next patch.
2023-01-04 13:59:49 +01:00
Rene Kita
da9722e3b7 Check LESSOPEN to avoid undefined behaviour
Like less, w3m can use an input preprocessor when displaying files. The
preprocessor command is taken from the environment variable LESSOPEN.
The command line in LESSOPEN should include one occurrence of the string
"%s", which will be replaced by the filename when the input preprocessor
command is invoked. Giving more than one "%s" - or a any other
conversion specifier - will lead to undefined behaviour.

Add a check to make sure the command given has only one "%s".

This fixes https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=991608
2023-01-04 13:59:13 +01:00
Rene Kita
8df395e7a2 Refactor lessopen_stream
Use early returns to spare a level of indentation.
2023-01-04 13:59:13 +01:00
Rene Kita
c77029570d Merge history file if it was modified after start
w3m reads the history file on startup and writes it on exit. That means
if you open multiple instances of w3m, the history file will contain the
history of the last instance closed. All other history changes are lost.

Check if the modification time of the history file has changed before
writing. If it has changed read the history file from the disk into a
new history. Push the entries that are in the current history but not in
the history file into the new history and write the new history to disk.
2023-01-04 13:58:58 +01:00
Rene Kita
e0c9a02784 Move declarations to the appropriate header file 2023-01-04 13:58:58 +01:00
Rene Kita
14c8274d16 Add comment to explain placement of the ifdef 2023-01-04 13:58:58 +01:00
Rene Kita
f186e8331f Let loadHistory return an error code
This is in preparation for a following patch.
2023-01-04 13:58:58 +01:00
Rene Kita
de813c322c Use 'goto fail' to remove code duplication 2023-01-04 13:58:58 +01:00
Rene Kita
047b448a3a Recognize link targets in dfn elements
This fixes https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1018696
2023-01-04 13:58:40 +01:00
Rene Kita
900b3d7b41 Refactor html.c 2023-01-04 13:58:40 +01:00
Rene Kita
ba68a3b3e6 Align in html.c 2023-01-04 13:58:40 +01:00
Rene Kita
e8287f36b0 Skip soft hyphen when reading token
The soft hyphen should only appear if a word is broken at the hyphen
position. Filter it out.

Adjust the entity test files to reflect the new behaviour.

This fixes Issue #224 and Debian Bug #830173.

Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=830173
Bug-Debian: https://github.com/tats/w3m/issues/224
2023-01-04 13:58:10 +01:00
Rene Kita
2692d22006 Fix generated HTML for entity test
- Remove stray elements: </td>
- Add missing elements: <tr></tr>
- Add link to show where to get qjs from
2023-01-04 13:58:10 +01:00
Tatsuya Kinoshita
7c233b6590 Update ChangeLog 2023-01-04 19:30:58 +09:00
Tatsuya Kinoshita
576d8580d9 Update PO strings 2023-01-04 19:29:45 +09:00
Tatsuya Kinoshita
b0940e8cec English fixes
cf. https://github.com/tats/w3m/pull/241
2023-01-04 19:18:46 +09:00
Tatsuya Kinoshita
d86a975061 Merge pull request #255 from rkta/fix_GH_action
Don't error out on deprecated declaration warnings
2023-01-04 19:17:29 +09:00
Tatsuya Kinoshita
57b6c8ecd1 Merge pull request #251 from nsanmartin/high-intensity-colors
Add high-intensity colors option and cli flag.
2023-01-04 19:16:58 +09:00
Tatsuya Kinoshita
b80737409b Merge pull request #241 from trafficone/master
Minor Fixes of English Docs
2023-01-04 19:16:19 +09:00
Alberto Fanjul
44af9271e0 Turn ansi escape sequences into html tags 2022-12-27 11:39:02 +01:00
Rene Kita
7078c78443 Remove unused variable 2022-12-25 11:55:58 +01:00
Rene Kita
a2ce4d8ace Remove a warning for bzero with GCC 12
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
2022-12-25 11:55:58 +01:00
Rene Kita
e6b8a4e250 Fix potential null pointer dereference
Found when compiling with '-O3 -flto'.
2022-12-25 11:55:58 +01:00
Rene Kita
9759579283 Don't error out on deprecated declaration warnings
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.
2022-12-25 11:55:53 +01:00
Tatsuya Kinoshita
07a53f4d34 Update ChangeLog 2022-12-25 10:33:51 +09:00
Tatsuya Kinoshita
6c06bf1c0c Update configure with acinclude.m4 2022-12-25 10:32:42 +09:00
Tatsuya Kinoshita
584f3756d0 Merge pull request #248 from thesamesam/implicit-func-decls
acinclude.m4: fix configure tests broken with Clang 15 (implicit func…
2022-12-25 10:09:30 +09:00
Tatsuya Kinoshita
9724f060ef Merge pull request #246 from rokuyama/master
For sixel, no need to round image size to multiple of character size.
2022-12-25 10:08:48 +09:00
Tatsuya Kinoshita
954dfbb27b Merge pull request #245 from rokuyama/fix_osc5379
Display resized image for OSC 5379 (mlterm).
2022-12-25 10:08:31 +09:00
Tatsuya Kinoshita
c15b1aab53 Merge pull request #237 from rkta/siteconf_docs
Improve siteconf docs
2022-12-25 10:08:05 +09:00
Tatsuya Kinoshita
57380d6e19 Merge pull request #235 from rkta/retry_filename
Retry if loading of a file fails
2022-12-25 10:06:27 +09:00
Tatsuya Kinoshita
989b788269 Merge pull request #234 from N-R-K/testing
Fix -Wmissing-prototypes and -Wstrict-prototypes warnings
2022-12-25 10:05:43 +09:00
Tatsuya Kinoshita
f663d1f57f Merge pull request #228 from rkta/gh_action
Add GitHub Action to build source when pushing
2022-12-25 10:05:15 +09:00
Tatsuya Kinoshita
d5055e6171 Update ChangeLog 2022-12-21 20:42:58 +09:00
Tatsuya Kinoshita
f7c476f196 Update PO strings 2022-12-21 20:34:14 +09:00
Tatsuya Kinoshita
dff69f1281 Merge pull request #219 from rkta/add_option_for_temp_files
Add option to set directory for temporary files
2022-12-21 20:20:27 +09:00